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 |
|---|---|---|---|---|---|---|---|
@@ -28,3 +28,6 @@ var ErrIncomplete = errors.New("incomplete config")
// ErrNotReady is the error when a broker is not ready.
var ErrNotReady = errors.New("not ready")
+
+// ErrOverflow is the error when a broker ingress is sending too many requests to PubSub.
+var ErrOverflow = errors.New("bundler reached buffered... | 1 | /*
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 1 | 18,054 | Can you import `bundler.ErrOverflow` rather than redefine it here? | google-knative-gcp | go |
@@ -305,7 +305,7 @@ public abstract class FlatteningConfig {
}
ResourceNameTreatment resourceNameTreatment = ResourceNameTreatment.NONE;
- String resourceNameType = protoParser.getResourceType(parameterField.getProtoField());
+ String resourceNameType = protoParser.getResourceReference(paramet... | 1 | /* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | 1 | 27,535 | This is just a renaming of the function getResourceType() to getResourceReference() | googleapis-gapic-generator | java |
@@ -106,7 +106,7 @@ module Beaker
ip = ''
if File.file?(@vagrant_file) #we should have a vagrant file available to us for reading
f = File.read(@vagrant_file)
- m = /#{hostname}.*?ip:\s*('|")\s*([^'"]+)('|")/m.match(f)
+ m = /'#{hostname}'.*?ip:\s*('|")\s*([^'"]+)('|")/m.match(f)
... | 1 | require 'open3'
module Beaker
class Vagrant < Beaker::Hypervisor
# Return a random mac address
#
# @return [String] a random mac address
def randmac
"080027" + (1..3).map{"%0.2X"%rand(256)}.join
end
def rand_chunk
(2 + rand(252)).to_s #don't want a 0, 1, or a 255
end
de... | 1 | 11,738 | Seems like this might need to allow for `"`s to be used here? | voxpupuli-beaker | rb |
@@ -295,8 +295,8 @@ CombatSpell::~CombatSpell()
bool CombatSpell::loadScriptCombat()
{
- combat = g_luaEnvironment.getCombatObject(g_luaEnvironment.lastCombatId);
- return combat != nullptr;
+ Combat_ptr combatPtr = g_luaEnvironment.getCombatObject(g_luaEnvironment.lastCombatId);
+ return combatPtr != nullptr;
}
... | 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,019 | here you assigning it to a local variable, in the original code it assigned to combat(CombatSpell member). Not sure if CombatSpell needs to use a shared_ptr since currently it does not and it works "good". | otland-forgottenserver | cpp |
@@ -1,7 +1,5 @@
<section id="terms">
<dl>
- <dt><p>How often is this video tutorial offered?</p></dt>
- <dd><p>This online video tutorial starts as soon as you register.</p></dd>
<dt><p>What if I'm not happy?</p></dt>
<dd><p>If you’re not happy, just let us know within 30 days and we’ll ... | 1 | <section id="terms">
<dl>
<dt><p>How often is this video tutorial offered?</p></dt>
<dd><p>This online video tutorial starts as soon as you register.</p></dd>
<dt><p>What if I'm not happy?</p></dt>
<dd><p>If you’re not happy, just let us know within 30 days and we’ll refund your money. It&... | 1 | 13,284 | Should we also remove this? This applies to subscriptions in general, but it seems sort of weird in the context of products now. | thoughtbot-upcase | rb |
@@ -27,7 +27,6 @@ from dagster.core.errors import DagsterExecutionInterruptedError, DagsterInvaria
from dagster.seven import IS_WINDOWS, multiprocessing
from dagster.seven.abc import Mapping
-from .alert import make_email_on_pipeline_failure_sensor, make_email_on_run_failure_sensor
from .merger import merge_dicts
... | 1 | import contextlib
import contextvars
import datetime
import errno
import functools
import inspect
import os
import re
import signal
import socket
import subprocess
import sys
import tempfile
import threading
from collections import OrderedDict, defaultdict, namedtuple
from datetime import timezone
from enum import Enum... | 1 | 18,150 | I think we should keep these, o.w. our examples will be wrong (where we're importing from `dagster.utils`). Also, we might break folks who've imported following our docs. | dagster-io-dagster | py |
@@ -24,7 +24,7 @@ namespace OpenTelemetry.Trace
/// <summary>
/// Build TracerProvider with Resource, Sampler, Processors and Instrumentation.
/// </summary>
- internal class TracerProviderBuilderSdk : TracerProviderBuilder
+ public class TracerProviderBuilderSdk : TracerProviderBuilder
{
... | 1 | // <copyright file="TracerProviderBuilderSdk.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://w... | 1 | 19,647 | This is good and something that I think opens a lot of possibilities. I think what would be even better is to change up `TracerProviderSdk` to take factories for the processors just like it already does for the instrumentations. Should probably use use a factory for the sampler. If we made those 2 changes then we could... | open-telemetry-opentelemetry-dotnet | .cs |
@@ -48,9 +48,14 @@ func (t *Table) Normalize() {
if len(t.Data) > 0 {
t.KeyValues[j] = t.Data[0][idx]
}
- v := values.New(t.KeyValues[j])
- if v.Type() == semantic.Invalid {
- panic(fmt.Errorf("invalid value: %s", t.KeyValues[j]))
+ var v values.Value
+ if t.KeyValues[j] == nil {
+ v = values... | 1 | package executetest
import (
"fmt"
"github.com/apache/arrow/go/arrow/array"
"github.com/influxdata/flux"
"github.com/influxdata/flux/arrow"
"github.com/influxdata/flux/execute"
"github.com/influxdata/flux/semantic"
"github.com/influxdata/flux/values"
)
// Table is an implementation of execute.Table
// It is d... | 1 | 9,475 | Is there a way to make it so `values.New(nil)` works instead of adding a new function? | influxdata-flux | go |
@@ -85,7 +85,11 @@ class ApiMediaType extends AbstractType
*/
public function getParent()
{
- return 'sonata_media_api_form_doctrine_media';
+ // NEXT_MAJOR: Return 'Sonata\MediaBundle\Form\Type\ApiDoctrineMediaType'
+ // (when requirement of Symfony is >= 2.8)
+ return metho... | 1 | <?php
/*
* 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\Form\Type;
use Sonata\MediaBundle\... | 1 | 8,217 | > when requirement of Symfony **will be** >= 2.8 Same for others. | sonata-project-SonataMediaBundle | php |
@@ -104,7 +104,8 @@ PROJECT_IAM_ROLES_SERVER = [
'roles/storage.objectViewer',
'roles/storage.objectCreator',
'roles/cloudsql.client',
- 'roles/logging.logWriter'
+ 'roles/logging.logWriter',
+ 'roles/iam.serviceAccountTokenCreator'
]
PROJECT_IAM_ROLES_CLIENT = [ | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 1 | 30,112 | I'd like to see if this can just be set on the service account instead of the project. Using the SVC_ACCT_ROLES (which should otherwise be deleted as I don't think anything else is using it.) | forseti-security-forseti-security | py |
@@ -7,6 +7,7 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.database.DataSetObserver;
+import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler; | 1 | package de.danoeh.antennapod.activity;
import android.annotation.TargetApi;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.database.DataSetObserver;
import andro... | 1 | 13,684 | Please remove the unused imports :) | AntennaPod-AntennaPod | java |
@@ -82,11 +82,11 @@ ActiveRecord::Schema.define(version: 20140723160957) do
end
create_table "comments", force: true do |t|
+ t.text "comment_text"
t.datetime "created_at"
t.datetime "updated_at"
- t.string "commentable_type"
t.integer "commentable_id"
- t.text "comment_text"
... | 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 | 11,857 | Were these local edits? There doesn't appear to be a change here. If so, let's remove this from the commit. | 18F-C2 | rb |
@@ -3,8 +3,13 @@ package server
import (
"crypto/ecdsa"
"crypto/x509"
+ "github.com/spiffe/spire/pkg/common/profiling"
"net"
+ "net/http"
+ _ "net/http/pprof"
"net/url"
+ "runtime"
+ "strconv"
"sync"
"syscall"
| 1 | package server
import (
"crypto/ecdsa"
"crypto/x509"
"net"
"net/url"
"sync"
"syscall"
"github.com/sirupsen/logrus"
common "github.com/spiffe/spire/pkg/common/catalog"
"github.com/spiffe/spire/pkg/server/ca"
"github.com/spiffe/spire/pkg/server/catalog"
"github.com/spiffe/spire/pkg/server/endpoints"
tomb "g... | 1 | 9,160 | nit: this should be further down w/ the rest of the github imports | spiffe-spire | go |
@@ -2,7 +2,7 @@ Hi <%= @user.first_name %>,
This is a reminder that your Learn <%= @subscription.plan_name %> subscription
will be automatically renewed on <%= l @subscription.next_payment_on %> for the
-amount of <%= number_to_currency(@subscription.next_payment_amount) %>.
+amount of <%= number_to_currency(@subsc... | 1 | Hi <%= @user.first_name %>,
This is a reminder that your Learn <%= @subscription.plan_name %> subscription
will be automatically renewed on <%= l @subscription.next_payment_on %> for the
amount of <%= number_to_currency(@subscription.next_payment_amount) %>.
If you need to make any changes, you can do so by accessing... | 1 | 10,073 | I don't know if this is something we should address now, but we have a cents_to_dollars private method in both `SubscriptionCoupon` and `Invoice`. | thoughtbot-upcase | rb |
@@ -1619,7 +1619,9 @@ void ihipPrintKernelLaunch(const char* kernelName, const grid_launch_parm* lp,
// Allows runtime to track some information about the stream.
hipStream_t ihipPreLaunchKernel(hipStream_t stream, dim3 grid, dim3 block, grid_launch_parm* lp,
const char* kernelNameStr... | 1 | /*
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to us... | 1 | 9,053 | Formatting here and all below: missing space before open bracket for the compound statement. | ROCm-Developer-Tools-HIP | cpp |
@@ -44,7 +44,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.mortbay.util.ajax.JSON;
import static org.apache.solr.security.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.AUTZ_HEADER_PROBLEM;
import static org.apache.solr.security.JWTAuthPl... | 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 | 28,380 | Avoid using old mortbay utilities for converting JSON. Uses existing Solr Utils to convert from JSON string. | apache-lucene-solr | java |
@@ -0,0 +1,19 @@
+'use strict';
+
+const CommandOperationV2 = require('./command_v2');
+const defineAspects = require('./operation').defineAspects;
+const Aspect = require('./operation').Aspect;
+
+class CommandDirect extends CommandOperationV2 {
+ constructor(parent, command, options) {
+ super(parent, options);
+... | 1 | 1 | 17,792 | I actually think this wrapping is great, but let's call it `RunCommandOperation`? | mongodb-node-mongodb-native | js | |
@@ -122,11 +122,15 @@ func errorsParse(c *caddy.Controller) (*ErrorHandler, error) {
}
f.Close()
- whatInt, err := strconv.Atoi(what)
- if err != nil {
- return hadBlock, c.Err("Expecting a numeric status code, got '" + what + "'")
+ if what == "*" {
+ handler.GenericErrorPage = where
+ ... | 1 | package errors
import (
"io"
"log"
"os"
"path/filepath"
"strconv"
"github.com/hashicorp/go-syslog"
"github.com/mholt/caddy"
"github.com/mholt/caddy/caddyhttp/httpserver"
)
// setup configures a new errors middleware instance.
func setup(c *caddy.Controller) error {
handler, err := errorsParse(c)
if err != ... | 1 | 8,832 | Maybe it is better to add checking for status code duplications? It can prevent some stupid copy-paste user errors. | caddyserver-caddy | go |
@@ -5,14 +5,14 @@ describe Invoice do
invoices = Invoice.
find_all_by_stripe_customer_id(FakeStripe::CUSTOMER_ID)
- invoices.length.should eq 1
- invoices.first.stripe_invoice_id.should eq 'in_1s4JSgbcUaElzU'
+ expect(invoices.length).to eq 1
+ expect(invoices.first.stripe_invoice_id).to eq 'i... | 1 | require 'spec_helper'
describe Invoice do
it 'retrieves all invoices for a customer' do
invoices = Invoice.
find_all_by_stripe_customer_id(FakeStripe::CUSTOMER_ID)
invoices.length.should eq 1
invoices.first.stripe_invoice_id.should eq 'in_1s4JSgbcUaElzU'
end
it 'does not find invoices with a ... | 1 | 9,673 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -1823,6 +1823,9 @@ mangle_return(dcontext_t *dcontext, instrlist_t *ilist, instr_t *instr,
IF_X64(ASSERT_TRUNCATE(val, int, opnd_get_immed_int(instr_get_src(instr, 0))));
/* addl sizeof_param_area, %xsp
* except that clobbers the flags, so we use lea */
+ /* XXX i#3307: unimplement... | 1 | /* ******************************************************************************
* Copyright (c) 2010-2018 Google, Inc. All rights reserved.
* Copyright (c) 2010 Massachusetts Institute of Technology All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* *****************************... | 1 | 15,145 | This lea should match instr_check_xsp_mangling and be undone. I don't think i#3307 applies here. | DynamoRIO-dynamorio | c |
@@ -87,6 +87,11 @@ type Store struct {
tipIndex *TipIndex
}
+type ipldStateThing interface {
+ Get(ctx context.Context, c cid.Cid, out interface{}) error
+ Put(ctx context.Context, v interface{}) (cid.Cid, error)
+}
+
// NewStore constructs a new default store.
func NewStore(ds repo.Datastore, cst state.IpldStor... | 1 | package chain
import (
"context"
"runtime/debug"
"sync"
"github.com/cskr/pubsub"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
cbor "github.com/ipfs/go-ipld-cbor"
logging "github.com/ipfs/go-log"
"github.com/pkg/errors"
"go.opencensus.io/trace"
"github.com/filecoin-project/go-filecoin/actor/buil... | 1 | 20,264 | I like the idea of this being an interface as it makes the test setup a bit easier, thoughts? | filecoin-project-venus | go |
@@ -608,7 +608,8 @@ class ColdcardPlugin(HW_PluginBase):
pubkey_deriv_info = wallet.get_public_keys_with_deriv_info(address)
pubkey_hexes = sorted([pk.hex() for pk in list(pubkey_deriv_info)])
xfp_paths = []
- for pubkey in pubkey_deriv_info:
+ for pubkey_hex... | 1 | #
# Coldcard Electrum plugin main code.
#
#
import os, time, io
import traceback
from typing import TYPE_CHECKING, Optional
import struct
from electrum import bip32
from electrum.bip32 import BIP32Node, InvalidMasterKeyVersionBytes
from electrum.i18n import _
from electrum.plugin import Device, hook
from electrum.keys... | 1 | 13,776 | Nit: I believe the electrum convention is to use `bfh` instead of `bytes.fromhex`. Great catch on this bug! | spesmilo-electrum | py |
@@ -1910,7 +1910,10 @@ def _getPredictedField(options):
predictedFieldInfo = info
break
- assert predictedFieldInfo
+ if predictedFieldInfo is None:
+ raise Exception(
+ "Predicted field '%s' does not exist in included fields." % predictedField
+ )
predictedFieldType = predictedFieldInfo... | 1 | #! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | 1 | 15,191 | Use a more granular error type. I would recommend `ValueError` in this case. | numenta-nupic | py |
@@ -2699,6 +2699,9 @@ void Game::playerRequestTrade(uint32_t playerId, const Position& pos, uint8_t st
player->sendTextMessage(MSG_INFO_DESCR, "You can not trade more than 100 items.");
return;
}
+ if (!g_events->eventPlayerOnTradeRequest(player,tradePartner,tradeItem)) {
+ return;
+ }
internalStartTrade(p... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2014 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 | 9,863 | A space after each argument, and an empty line above this if-statement. | otland-forgottenserver | cpp |
@@ -27,8 +27,8 @@ export function memo(c, comparer) {
this.shouldComponentUpdate = shouldUpdate;
return createElement(c, props);
}
- Memoed.prototype.isReactComponent = true;
Memoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';
+ Memoed.prototype.isReactComponent = true;
Memoed._forwarded = true;... | 1 | import { createElement } from 'preact';
import { shallowDiffers } from './util';
/**
* Memoize a component, so that it only updates when the props actually have
* changed. This was previously known as `React.pure`.
* @param {import('./internal').FunctionalComponent} c functional component
* @param {(prev: object, ... | 1 | 16,002 | Things like this make me wonder whether we should ship a "development" and a "production" version. I remember the discussions about making things more complex bundling wise but couldn't we omit this line in a "production" or "minimal" variant of our build? That would save us some bytes here and there. Or are we somehow... | preactjs-preact | js |
@@ -6,6 +6,8 @@ namespace Datadog.Trace
Scope Activate(Span span, bool finishOnClose);
+ void AddScopeListener(IScopeListener listener);
+
void Close(Scope scope);
}
} | 1 | namespace Datadog.Trace
{
internal interface IScopeManager
{
Scope Active { get; }
Scope Activate(Span span, bool finishOnClose);
void Close(Scope scope);
}
}
| 1 | 15,092 | Maybe rename to `RegisterListener` or `RegisterSubscriber`? | DataDog-dd-trace-dotnet | .cs |
@@ -34,7 +34,8 @@ export function diffChildren(
oldDom,
isHydrating
) {
- let i, j, oldVNode, newDom, sibDom, firstChildDom, refs;
+ let i, j, oldVNode, newDom, sibDom, firstChildDom;
+ let refs = [];
// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children ||... | 1 | import { diff, unmount, applyRef } from './index';
import { createVNode } from '../create-element';
import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { removeNode } from '../util';
import { getDomSibling } from '../component';
/**
* Diff the children of a virtual node
* @param {import('../internal').Preact... | 1 | 14,563 | My one concern here is that we are adding a new array allocation for each depth of the tree which could add some non-trivial GC churn. Perhaps this would be okay if we think that refs are used through a tree commonly enough such that they'll get allocated anyway but I'm not sure refs are *that* often used. Every app ha... | preactjs-preact | js |
@@ -45,7 +45,7 @@ class TestDeterminism < Test::Unit::TestCase
def subclasses
Faker.constants.delete_if do |subclass|
- %i[Base Bank Books Cat Char Base58 ChileRut Config Creature Date Dog DragonBall Dota ElderScrolls Fallout Games GamesHalfLife HeroesOfTheStorm Internet JapaneseMedia LeagueOfLegends Mov... | 1 | # frozen_string_literal: true
require_relative 'test_helper'
# rubocop:disable Security/Eval,Style/EvalWithLocation
class TestDeterminism < Test::Unit::TestCase
def setup
@all_methods = all_methods.freeze
@first_run = []
end
def test_determinism
Faker::Config.random = Random.new(42)
@all_methods... | 1 | 8,995 | We should get rid of this big array and think about a better way to check this. | faker-ruby-faker | rb |
@@ -67,6 +67,11 @@ namespace MvvmCross.Droid.Shared.Presenter
var serializedRequest = Serializer.Serializer.SerializeObject(request);
bundle.PutString(ViewModelRequestBundleKey, serializedRequest);
+ if (request is MvxViewModelInstanceRequest)
+ {
+ Mvx.R... | 1 | // MvxFragmentsPresenter.cs
// (c) Copyright Cirrious Ltd. http://www.cirrious.com
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
using Android.OS;
using MvvmCross.Core.ViewMo... | 1 | 12,586 | Should we cache the result of `Mvx.Resolve<IMvxChildViewModelCache>()` to avoid a lookup each time? | MvvmCross-MvvmCross | .cs |
@@ -89,7 +89,10 @@ class RequestConsumer:
self.connect_to_rabbitmq()
self.init_rabbitmq_channels()
- avg_size_of_message //= num_of_messages
+ try:
+ avg_size_of_message //= num_of_messages
+ except ZeroDivisionError:
+ current_app.l... | 1 | # listenbrainz-labs
#
# Copyright (C) 2019 Param Singh <iliekcomputers@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; either version 2
# of the License, or (at your option) any lat... | 1 | 17,500 | If you get to this line avg_size_of_message is an undefined value, yet you use it below. You you should set this value to something in the exception block. | metabrainz-listenbrainz-server | py |
@@ -0,0 +1,10 @@
+package mux
+
+import (
+ "net/http"
+ "net/http/pprof"
+)
+
+func pprofHandlers(httpMux *http.ServeMux) {
+ httpMux.HandleFunc("/debug/pprof/", pprof.Index)
+} | 1 | 1 | 9,461 | let's just fold this inline in mux.go, no need for the indirection to this new file | lyft-clutch | go | |
@@ -31,6 +31,7 @@ import com.github.javaparser.ast.nodeTypes.NodeWithTokenRange;
import com.github.javaparser.ast.observer.AstObserver;
import com.github.javaparser.ast.observer.ObservableProperty;
import com.github.javaparser.ast.observer.PropagatingAstObserver;
+import com.github.javaparser.ast.stmt.BlockStmt;
im... | 1 | /*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the ... | 1 | 13,723 | This bit confused me just now as I was reading through -- turns out this is due to the `{@link}` on line 316. Reading up on this, the alternative seems to be to state the fully qualified name instead. Happy to edit if requested as I don't have a strong view either way (perhaps a small leaning towards keeping the import... | javaparser-javaparser | java |
@@ -159,6 +159,18 @@ public class CPPTokenizerTest {
tokenizer.tokenize(code, new Tokens());
}
+ @Test
+ public void testDigitSeparators() {
+ final String code = "auto integer_literal = 1'000'000;" + PMD.EOL
+ + "auto floating_point_literal = 0.000'015'3;" + PMD.EOL
+ ... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.nio.charset.StandardCh... | 1 | 15,938 | There's a unnecessary System.out. | pmd-pmd | java |
@@ -532,6 +532,15 @@ func (c *client) InstallGatewayFlows() error {
// Add flow to ensure the liveness check packet could be forwarded correctly.
flows = append(flows, c.localProbeFlow(gatewayIPs, cookie.Default)...)
flows = append(flows, c.ctRewriteDstMACFlows(gatewayConfig.MAC, cookie.Default)...)
+ if c.enable... | 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 | 27,809 | Should we add the flows only when NodePort is enabled? | antrea-io-antrea | go |
@@ -2,12 +2,12 @@ AC_PREREQ([2.63])
dnl To do a release: follow the instructions to update libostree-released.sym from
dnl libostree-devel.sym, update the checksum in test-symbols.sh, set is_release_build=yes
dnl below. Then make another post-release commit to bump the version and set
-dnl is_release_build=no
+dnl i... | 1 | AC_PREREQ([2.63])
dnl To do a release: follow the instructions to update libostree-released.sym from
dnl libostree-devel.sym, update the checksum in test-symbols.sh, set is_release_build=yes
dnl below. Then make another post-release commit to bump the version and set
dnl is_release_build=no
dnl Seed the release notes w... | 1 | 17,879 | ITYM to flip this one... | ostreedev-ostree | c |
@@ -7,7 +7,9 @@ module.exports = {
},
extends: [
'airbnb',
- 'plugin:@typescript-eslint/recommended',
+ "eslint:recommended",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended",
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/rec... | 1 | module.exports = {
ignorePatterns: ['commitlint.config.js', 'jest.config.js'],
env: {
browser: true,
es6: true,
'jest/globals': true,
},
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'es... | 1 | 15,120 | What's the difference between typescript-eslint/eslint-recommended and typescript-eslint/recommended? I really can't get it. | HospitalRun-hospitalrun-frontend | js |
@@ -223,6 +223,14 @@ type Config struct {
// If the timeout is exceeded, the connection is closed.
// If this value is zero, the timeout is set to 30 seconds.
IdleTimeout time.Duration
+ // AttackTimeout is the maximum duration that may pass after a suspicious packet is
+ // received without any incoming network ... | 1 | package quic
import (
"context"
"crypto/tls"
"io"
"net"
"time"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/quictrace"
)
// The StreamID is the ID of a QUIC stream.
type StreamID = protocol.StreamID
// A VersionNumber is a QUIC version number.
type VersionNumber = ... | 1 | 8,407 | Thinking: Maybe it would be more useful to define this in terms of RTTs. That would also make it easier to switch this to a bool, since we could then pick a reasonable default value. Unless of course an attacker could influence our RTT estimate. Is that the case? | lucas-clemente-quic-go | go |
@@ -1,4 +1,3 @@
-// Copyright 2019 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. | 1 | // Copyright 2019 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 | 8,235 | Why is this line deleted? | GoogleCloudPlatform-compute-image-tools | go |
@@ -115,9 +115,9 @@ void nano::active_transactions::request_confirm (std::unique_lock<std::mutex> &
std::deque<std::shared_ptr<nano::block>> rebroadcast_bundle;
std::deque<std::pair<std::shared_ptr<nano::block>, std::shared_ptr<std::vector<std::shared_ptr<nano::transport::channel>>>>> confirm_req_bundle;
- // Con... | 1 | #include <nano/node/active_transactions.hpp>
#include <nano/node/node.hpp>
#include <boost/pool/pool_alloc.hpp>
#include <numeric>
size_t constexpr nano::active_transactions::max_broadcast_queue;
using namespace std::chrono;
nano::active_transactions::active_transactions (nano::node & node_a) :
node (node_a),
mult... | 1 | 15,854 | minor type `boostrap` | nanocurrency-nano-node | cpp |
@@ -20,9 +20,12 @@
package com.netflix.iceberg;
import com.google.common.base.Objects;
+import com.google.common.collect.Lists;
import com.netflix.iceberg.expressions.Expression;
import com.netflix.iceberg.expressions.ResidualEvaluator;
+import java.util.Iterator;
+
class BaseFileScanTask implements FileScanTa... | 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 | 12,834 | Nit: please don't separate imports into groups. | apache-iceberg | java |
@@ -31,7 +31,10 @@ public class ApplicationSidebarToggleGroupSkin extends
final ToggleButton allCategoryButton = createSidebarToggleButton(tr("All"));
allCategoryButton.setId("allButton");
- allCategoryButton.setOnAction(event -> getControl().getOnAllCategorySelection().run());
+ allCa... | 1 | package org.phoenicis.javafx.components.skin;
import javafx.scene.control.ToggleButton;
import org.phoenicis.javafx.components.control.ApplicationSidebarToggleGroup;
import org.phoenicis.javafx.views.mainwindow.apps.ApplicationsSidebar;
import org.phoenicis.repository.dto.CategoryDTO;
import java.util.Optional;
impo... | 1 | 12,439 | Thinking if it would be nice to have something like `setNothingSelected`. | PhoenicisOrg-phoenicis | java |
@@ -141,7 +141,7 @@ func (f *FileCertificateSource) updateCertificateFromDisk() error {
f.Log.V(logf.DebugLevel).Info("key and certificate on disk have not changed")
return nil
}
- f.Log.Info("detected private key or certificate data on disk has changed. reloading certificate")
+ f.Log.V(logf.DebugLevel).Info("... | 1 | /*
Copyright 2019 The Jetstack cert-manager contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 22,899 | I think this is a useful InfoLevel message. In production, if webhook client connections suddenly start failing due to change of serving cert, you'd want to see this information in the logs. | jetstack-cert-manager | go |
@@ -28,7 +28,7 @@ void AddTagProcessor::process(const cpp2::AddTagReq& req) {
auto version = time::TimeUtils::nowInMSeconds();
TagID tagId = autoIncrementId();
data.emplace_back(MetaUtils::indexKey(EntryType::TAG, req.get_tag_name()),
- std::string(reinterpret_cast<const char*>(&tagI... | 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 "meta/processors/AddTagProcessor.h"
#include "time/TimeUtils.h"
namespace nebula {
namespace meta {
void AddTagPr... | 1 | 15,444 | Generally, if cast from int to char*, you could cast directly. Because no errors should happen. | vesoft-inc-nebula | cpp |
@@ -26,5 +26,12 @@ public class ServerInternals {
public static final String AZKABAN_EXECUTOR_PORT_FILENAME = "executor.port";
public static final String AZKABAN_SERVLET_CONTEXT_KEY = "azkaban_app";
-
+
+
+ // Memory check retry interval when OOM in ms
+ public static final long MEMORY_CHECK_INTERVAL = 1000... | 1 | /*
* Copyright 2016 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 12,394 | Is 10 min too long? What do you think about 1 minute? Unless there are many jobs in this state, I don't expect the CPU overhead to be too high. | azkaban-azkaban | java |
@@ -28,10 +28,10 @@ type BackendServiceConfig struct {
ImageConfig ImageWithPortAndHealthcheck `yaml:"image,flow"`
ImageOverride `yaml:",inline"`
TaskConfig `yaml:",inline"`
- *Logging `yaml:"logging,flow"`
+ Logging `yaml:"logging,flow"`
Sidecars map[string]*SidecarConfig... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package manifest
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/copilot-cli/internal/pkg/template"
"github.com/imdario/mergo"
)
const (
backendSvcManifestPath = "workloads/services/backend/manif... | 1 | 19,157 | can you remind me why we keep the pointer if it's a `map[string]<PStruct>`? are there other scenarios where the pointer is kept? | aws-copilot-cli | go |
@@ -61,8 +61,9 @@ public class RewriteDataFilesAction extends BaseRewriteDataFilesAction<RewriteDa
return this;
}
- public void maxParallelism(int parallelism) {
+ public RewriteDataFilesAction maxParallelism(int parallelism) {
Preconditions.checkArgument(parallelism > 0, "Invalid max parallelism %d", ... | 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 | 27,563 | Would it make sense to also add `setMaxParallelism` in addition to this to match the Flink API? | apache-iceberg | java |
@@ -1,4 +1,13 @@
import ModalComponent from 'ghost-admin/components/modal-base';
+import {inject as service} from '@ember/service';
export default ModalComponent.extend({
+ billing: service(),
+
+ actions: {
+ closeModal() {
+ this._super(arguments);
+ this.billing.closeBillingWin... | 1 | import ModalComponent from 'ghost-admin/components/modal-base';
export default ModalComponent.extend({
});
| 1 | 9,387 | Not needed for actions. `_super(...arguments)` is only needed when you're extending from a base class and want to run the logic in the base class before your own logic | TryGhost-Admin | js |
@@ -104,7 +104,14 @@ Suspense.prototype._childDidSuspend = function(promise, suspendingComponent) {
}
};
- if (!c._pendingSuspensionCount++) {
+ /**
+ * We do not set `suspended: true` during hydration because we want the actual markup
+ * to remain on screen and hydrate it when the suspense actually gets reso... | 1 | import { Component, createElement, options, Fragment } from 'preact';
import { assign } from './util';
const oldCatchError = options._catchError;
options._catchError = function(error, newVNode, oldVNode) {
if (error.then) {
/** @type {import('./internal').Component} */
let component;
let vnode = newVNode;
fo... | 1 | 16,148 | I still need to run this code to verify my understanding, but my first reading through makes me think this may need to be `suspendingComponent._vnode` since we set `vnode._hydrating` on the vnode that threw the error (diff/index.js:275), not on `Suspense._vnode` (though we could in Suspense's `_catchError` implementati... | preactjs-preact | js |
@@ -372,8 +372,14 @@ def get_path_if_valid(pathstr, cwd=None, relative=False, check_exists=False):
path = None
if check_exists:
- if path is not None and os.path.exists(path):
- log.url.debug("URL is a local file")
+ if path is not None:
+ # If the path contains chara... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 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 | 19,326 | I think it's a good idea to log this as debug, the same way the other branch gets logged. | qutebrowser-qutebrowser | py |
@@ -73,7 +73,7 @@ class TestJSONLD(AnnotationTestCase):
"comment": 1}
a = API.add_annotation(model='annotation_note', **data)
- # JSONAlchemy issue with overwritting fields
+ # JSONAlchemy issue with overwriting fields
self.assert_(len(a.validate()) == 0)
ld... | 1 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) a... | 1 | 11,057 | 1:D100: Docstring missing 35:D101: Docstring missing 37:D102: Docstring missing 42:D101: Docstring missing 44:D102: Docstring missing 57:D102: Docstring missing 66:D101: Docstring missing 69:D102: Docstring missing | inveniosoftware-invenio | py |
@@ -20,6 +20,10 @@ import (
"context"
)
+const (
+ systemGuestRoleName = "system.guest"
+)
+
var (
systemTokenInst TokenGenerator = &noauth{}
| 1 | /*
Package auth can be used for authentication and authorization
Copyright 2018 Portworx
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required... | 1 | 8,609 | keeping this as an unexported constant, as importing the role pkg creates a cyclic dependency. | libopenstorage-openstorage | go |
@@ -349,9 +349,12 @@ func (c *collection) newPut(a *driver.Action, opts *driver.RunActionsOptions) (*
// It doesn't make sense to generate a random sort key.
return nil, fmt.Errorf("missing sort key %q", c.sortKey)
}
- rev := driver.UniqueString()
- if av.M[c.opts.RevisionField], err = encodeValue(rev); err != ... | 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 | 19,113 | Why `c.RevisionField()` here but `c.opts.RevisionField` just below? | google-go-cloud | go |
@@ -139,7 +139,6 @@ type Context struct {
OriginalTargetReached bool
OvmExecutionManager dump.OvmDumpAccount
OvmStateManager dump.OvmDumpAccount
- OvmMockAccount dump.OvmDumpAccount
OvmSafetyChecker dump.OvmDumpAccount
}
| 1 | // Copyright 2014 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum 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 the License... | 1 | 14,947 | nit: this file diff seems unrelated and probably should have been a separate PR | ethereum-optimism-optimism | go |
@@ -38,7 +38,7 @@ extern "C" {
void latte(int *, int *, double *, int *, int *,
double *, double *, double *, double *,
double *, double *, double *, int*,
- double *, double *, double *, double * );
+ double *, double *, double *, double *, bool *);
}
#define ... | 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 | 24,436 | @sjplimp just checked this API in the latte repository master branch (which is what Install.py downloads) and this still does not provide the 18th argument. We cannot merge this pull request until this is available. i would also suggest to implement a second binding, a function called latte_abiversion() returning an in... | lammps-lammps | cpp |
@@ -214,7 +214,10 @@ namespace Nethermind.JsonRpc.Modules.Eth
}
Account account = _stateReader.GetAccount(header.StateRoot, address);
- return Task.FromResult(ResultWrapper<UInt256?>.Success(account?.Nonce ?? 0));
+ UInt256 nonce = account?.Nonce ?? 0;
+ _log... | 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 | 24,644 | Is this from debugging? | NethermindEth-nethermind | .cs |
@@ -51,12 +51,17 @@ class NodeTest extends TestCase
/**
*/
- public function testAddChildren():void
+ public function testAddChildren(): void
{
+ $categoryId2 = new CategoryId('cde02652-70ce-484e-bc9d-3bf61391522d');
+
/** @var Node|MockObject $children */
- $children = $t... | 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\CategoryTree\Tests\Domain\ValueObject;
use Ergonode\Category\Domain\Entity\CategoryId;
use Ergonode\CategoryTree\Domain\ValueObject\Node;
use PHPUnit... | 1 | 8,473 | Its betet use MockedObject | ergonode-backend | php |
@@ -840,8 +840,12 @@ type DiskBlockCache interface {
// Put puts a block to the disk cache.
Put(ctx context.Context, tlfID tlf.ID, blockID kbfsblock.ID, buf []byte,
serverHalf kbfscrypto.BlockCryptKeyServerHalf) error
- // DeleteByTLF deletes some blocks from the disk cache.
- DeleteByTLF(ctx context.Context, tl... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"githu... | 1 | 16,314 | "including"? Since it doesn't take any parameters, I'm not sure how it can update anything else... | keybase-kbfs | go |
@@ -674,7 +674,7 @@ namespace AutoRest.Core.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Non-HTTPS/HTTP schemes have limited support.
+ /// Looks up a localized string similar to Azure Resource Management only supports HTTPS scheme..
//... | 1 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... | 1 | 24,332 | nit: I'm assuming you have verified this is what the error message should read like | Azure-autorest | java |
@@ -850,4 +850,4 @@ def main(argv):
return glob_result
if __name__ == "__main__":
- exit(main(sys.argv[1:]))
+ sys.exit(main(sys.argv[1:])) | 1 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Unit testing infrastructure for Scapy
"""
from __future__ import absolute_import
from __future__ import print_functi... | 1 | 10,981 | Why do you need that? (real question) | secdev-scapy | py |
@@ -1788,7 +1788,7 @@ static void skipCppTemplateParameterList (void)
}
}
else if(CollectingSignature)
- vStringPut (Signature, x);
+ vStringPut (Signature, c);
}
else if (c == '>')
{ | 1 | /*
* Copyright (c) 1996-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for parsing and scanning C, C++, C#, D and Java
* source files.
*/
/*
* ... | 1 | 13,214 | If I understand the patch correctly the `else` is no longer required. | universal-ctags-ctags | c |
@@ -11,14 +11,14 @@ import (
var (
dealsSearchCount uint64
- addToBlacklist bool
+ blacklistTypeStr string
crNewDurationFlag string
crNewPriceFlag string
)
func init() {
dealListCmd.PersistentFlags().Uint64Var(&dealsSearchCount, "limit", 10, "Deals count to show")
- dealCloseCmd.PersistentFlags()... | 1 | package commands
import (
"os"
"time"
pb "github.com/sonm-io/core/proto"
"github.com/sonm-io/core/util"
"github.com/spf13/cobra"
)
var (
dealsSearchCount uint64
addToBlacklist bool
crNewDurationFlag string
crNewPriceFlag string
)
func init() {
dealListCmd.PersistentFlags().Uint64Var(&dealsSearchCou... | 1 | 7,153 | Properly describe valid flag values here: `neither` should be replaced with `none` as they parsed below. | sonm-io-core | go |
@@ -379,7 +379,16 @@ public class AzkabanExecutorServer {
logger.info(("Exception when logging top memory consumers"), e);
}
- logger.info("Shutting down...");
+ String host = app.getHost();
+ int port = app.getPort();
+ try {
+ logger.info(String.format("Remov... | 1 | /*
* Copyright 2012 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 12,437 | Can we escalate this to `warn`. It is a major event. | azkaban-azkaban | java |
@@ -86,6 +86,8 @@ var (
_ = stateOffDstPort
stateOffPostNATDstPort int16 = 24
stateOffIPProto int16 = 26
+ stateOffICMPType int16 = 22
+ stateOffICMPCode int16 = 23
// Compile-time check that IPSetEntrySize hasn't changed; if it changes, the code will need to chan... | 1 | // Copyright (c) 2020 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 applica... | 1 | 17,643 | Please move these up to line 86 so the numbers are in order. | projectcalico-felix | go |
@@ -0,0 +1,16 @@
+from ..builder import DETECTORS
+from .single_stage import SingleStageDetector
+
+
+@DETECTORS.register_module()
+class NASFCOS(SingleStageDetector):
+
+ def __init__(self,
+ backbone,
+ neck,
+ bbox_head,
+ train_cfg=None,
+ ... | 1 | 1 | 19,567 | Add a docstring to contain the paper link. | open-mmlab-mmdetection | py | |
@@ -170,7 +170,11 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(stri
for i, path := range config.ExtraFiles() {
abspath := filepath.Join(root, path)
outpath := filepath.Join(dir, "extra-"+strconv.Itoa(i)+"-"+filepath.Base(path)+".o")
- err := runCCompiler(config.Target.Comp... | 1 | // Package builder is the compiler driver of TinyGo. It takes in a package name
// and an output path, and outputs an executable. It manages the entire
// compilation pipeline in between.
package builder
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/tinygo-org/tinygo... | 1 | 9,421 | Instead of adding the `--target` flag here, the `Target` struct should be set up correctly. Assuming this is for the Raspberry Pi 3, adding it to the `cflags` key of the JSON file should be enough (if not, you can print `config.CFlags()` here to check whether `--target` is already included). | tinygo-org-tinygo | go |
@@ -280,7 +280,9 @@ func (s *Service) BatchCreateFederatedBundle(ctx context.Context, req *bundlev1.
r := s.createFederatedBundle(ctx, b, req.OutputMask)
results = append(results, r)
- rpccontext.AuditRPCWithTypesStatus(ctx, r.Status, fieldsFromBundleProto(b, nil))
+ if _, ok := rpccontext.AuditLog(ctx); ok {... | 1 | package bundle
import (
"context"
"fmt"
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/v2/spiffeid"
bundlev1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/bundle/v1"
"github.com/spiffe/spire-api-sdk/proto/spire/api/types"
"github.com/spiffe/spire/pkg/common/idutil"
"github.com/spiffe/spir... | 1 | 17,083 | The changes in this file look unnecessary since `rpccontext.AuditRPCWithTypesStatus()` already does this check. Was there a reason you needed to add them? | spiffe-spire | go |
@@ -0,0 +1,9 @@
+// Copyright 2020 The Swarm Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package batchstore
+
+const StateKey = stateKey
+
+var BatchKey = batchKey | 1 | 1 | 13,300 | you could probably use `const` for both? | ethersphere-bee | go | |
@@ -0,0 +1,9 @@
+import { isDataTable } from '../commons/table';
+import { isFocusable } from '../commons/dom';
+
+// TODO: es-modules add tests. No way to access this on the `axe` object
+function dataTableMatches(node) {
+ return !isDataTable(node) && !isFocusable(node);
+}
+
+export default dataTableMatches; | 1 | 1 | 15,756 | This looks like an "ES Module" to me. I do not understand this TODO. | dequelabs-axe-core | js | |
@@ -103,8 +103,8 @@ public class RowDataRewriter implements Serializable {
OutputFileFactory fileFactory = new OutputFileFactory(
spec, format, locations, io.value(), encryptionManager.value(), partitionId, taskId);
- TaskWriter<InternalRow> writer;
- if (spec.fields().isEmpty()) {
+ final Task... | 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 | 32,296 | Iceberg doesn't use `final` because it is unlikely that this actually helps. In Java 8, final detection is quite good, which is why non-final variables can be used in closures and lambdas. And final doesn't produce different byte code so it can't do much to help at runtime. | apache-iceberg | java |
@@ -7391,7 +7391,7 @@ int LuaScriptInterface::luaPlayerGetIp(lua_State* L)
// player:getIp()
Player* player = getUserdata<Player>(L, 1);
if (player) {
- lua_pushnumber(L, player->getIP());
+ lua_pushstring(L, player->getIP().to_string().c_str());
} else {
lua_pushnil(L);
} | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2017 Mark Samman <mark.samman@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; eithe... | 1 | 14,610 | There's `pushString` to use with C++ strings. | otland-forgottenserver | cpp |
@@ -306,6 +306,13 @@ var _ = infrastructure.DatastoreDescribe("service loop prevention; with 2 nodes"
cfg.Spec.ServiceLoopPrevention = "Disabled"
})
+ // Expect to see empty cali-cidr-block chains. (Allowing time for a Felix
+ // restart.) This ensures that the cali-cidr-block chain has been cleared
+ // ... | 1 | // Copyright (c) 2020-2021 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 | 19,564 | qq: Should this include the iptables6-save sim. to the inverse checks above? | projectcalico-felix | go |
@@ -622,7 +622,11 @@ bool RTPSParticipantImpl::create_writer(
std::lock_guard<std::recursive_mutex> guard(*mp_mutex);
m_allWriterList.push_back(SWriter);
- if (!is_builtin)
+ if (is_builtin)
+ {
+ async_thread().wake_up(SWriter);
+ }
+ else
{
m_userWriterList.push_back(SW... | 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 | 20,414 | What about async user writers? We could be checking `param.mode == ASYNCHRONOUS_WRITER` | eProsima-Fast-DDS | cpp |
@@ -84,7 +84,7 @@ public class UseUtilityClassRule extends AbstractLombokAwareRule {
private boolean isOkUsingLombok(ASTClassOrInterfaceDeclaration parent) {
// check if there's a lombok no arg private constructor, if so skip the rest of the rules
if (hasClassLombokAnnotation()) {
- AS... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import java.util.List;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.java.ast.ASTAnnotation;
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterf... | 1 | 13,769 | this double check for lombok annotation + specific lombok annotation seems pointless, just keep the second (specific) check. Moreover, since we have a property with ignored annotations... why don't we use it? a user may setup the property and it will be ignored here. Also, this class should probably not extend `Abstrac... | pmd-pmd | java |
@@ -67,9 +67,11 @@ func Mux(pattern string, mux *http.ServeMux) InboundOption {
// route requests through YARPC. The http.Handler returned by this function
// may delegate requests to the provided YARPC handler to route them through
// YARPC.
+// If more than one Interception is provided, they will be invoked in the... | 1 | // Copyright (c) 2021 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 19,768 | nit: the ordering may be misunderstood, as "invoked in the same order" could suggest the passed-in functions are called in-order, but the actual wrapping is LIFO. Some other ways to describe it (don't think any of these are ideal, but maybe it will help you come up with something better), * the handled returned by the ... | yarpc-yarpc-go | go |
@@ -101,6 +101,8 @@ import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import static org.apache.solr.common.params.QueryElevationParams.ELEVATE_DOCS_WITHOUT_MATCHING_Q;
+
/**
* A component to elevate some documents to the top of the result set.
* | 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 | 38,868 | We should not use a static import to be consistent with other existing use of the QueryElevationParams. | apache-lucene-solr | java |
@@ -277,7 +277,7 @@ void *ap6_thread(void *thread_context)
uint32_t num_matches = 0;
struct bitstream_info null_gbs_info ;
- memset(&null_gbs_info, 0, sizeof(null_gbs_info));
+ memset_s(&null_gbs_info, sizeof(null_gbs_info), 0);
ON_GOTO(c->config->num_null_gbs == 0, out_exit, "no NULL bitstreams registered.")... | 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 | 15,941 | No need to check return value? | OPAE-opae-sdk | c |
@@ -42,6 +42,11 @@ from typing import (Any, Callable, IO, Iterator, Optional, Sequence, Tuple, Type
from PyQt5.QtCore import QUrl, QVersionNumber
from PyQt5.QtGui import QClipboard, QDesktopServices
from PyQt5.QtWidgets import QApplication
+# We cannot use the stdlib version on 3.7-3.8 because we need the files() AP... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2020 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 | 25,445 | ~~Feel free to ignore that one, I'll fix things up when regenerating the `requirements.txt`.~~ As for the one below, this smells like a pylint bug... | qutebrowser-qutebrowser | py |
@@ -279,6 +279,7 @@ func (fa *flowAggregator) InitCollectingProcess() error {
IsEncrypted: false,
}
}
+ cpInput.NumExtraElements = len(antreaSourceStatsElementList) + len(antreaDestinationStatsElementList) + len(antreaLabelsElementList)
var err error
fa.collectingProcess, err = ipfix.NewIPFIXCollectingPr... | 1 | // Copyright 2020 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 | 42,528 | it's a bit strange that this doesn't match `aggregationElements` which is what I would expect. I guess I am not familiar enough with go-ipfix. | antrea-io-antrea | go |
@@ -35,11 +35,13 @@
#include "instr.h"
static int num_simd_saved;
+static int num_simd_saved_abs;
void
proc_init_arch(void)
{
num_simd_saved = MCXT_NUM_SIMD_SLOTS;
+ num_simd_saved_abs = MCXT_NUM_SIMD_SLOTS;
/* FIXME i#1569: NYI */
} | 1 | /* **********************************************************
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... | 1 | 15,716 | Same thing: `num_simd_registers`. Ditto below. | DynamoRIO-dynamorio | c |
@@ -47,7 +47,7 @@ DEPENDENCY_LINKS = [
]
setup(name='kinto',
- version='2.2.0.dev0',
+ version='2.2.1',
description='Kinto Web Service - Store, Sync, Share, and Self-Host.',
long_description=README + "\n\n" + CHANGELOG + "\n\n" + CONTRIBUTORS,
license='Apache License (2.0)', | 1 | import codecs
import os
import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read_file(filename):
"""Open a related file and return its content."""
with codecs.open(os.path.join(here, filename), encoding='utf-8') as f:
content = f.read()
ret... | 1 | 9,078 | Should be 2.1.1 | Kinto-kinto | py |
@@ -7,14 +7,16 @@ from localstack.utils.common import to_str, short_uid
TEST_BUCKET_NAME_WITH_NOTIFICATIONS = 'test_bucket_notif_1'
TEST_QUEUE_NAME_FOR_S3 = 'test_queue'
TEST_TOPIC_NAME = 'test_topic_name_for_sqs'
+TEST_S3_TOPIC_NAME = 'test_topic_name_for_s3_to_sns_to_sqs'
TEST_QUEUE_NAME_FOR_SNS = 'test_queue_for... | 1 | import json
from io import BytesIO
from localstack.utils import testutil
from localstack.utils.aws import aws_stack
from localstack.utils.common import to_str, short_uid
TEST_BUCKET_NAME_WITH_NOTIFICATIONS = 'test_bucket_notif_1'
TEST_QUEUE_NAME_FOR_S3 = 'test_queue'
TEST_TOPIC_NAME = 'test_topic_name_for_sqs'
TEST_QU... | 1 | 9,264 | nitpick: `required_subject` doesn't seem to be used here | localstack-localstack | py |
@@ -19,6 +19,7 @@ package org.openqa.selenium.grid.graphql;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
+
import org.openqa.selenium.grid.distributor.Distributor;
import org.openqa.selenium.internal.Require;
| 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,791 | We can revert this to reduce the diff of the PR. | SeleniumHQ-selenium | rb |
@@ -871,6 +871,14 @@ class UIA(Window):
states.add(controlTypes.STATE_CHECKED)
return states
+ def _get_presentationType(self):
+ presentationType=super(UIA,self).presentationType
+ # UIA NVDAObjects can only be considered content if UI Automation considers them both a control and content.
+ if presentati... | 1 | #NVDAObjects/UIA/__init__.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) 2009-2016 NV Access Limited, Joseph Lee, Mohammad Suliman
from ctypes import byref
from ctypes.wintypes import POINT, RECT
from... | 1 | 19,368 | Extraneous blank line. | nvaccess-nvda | py |
@@ -20,7 +20,8 @@ from codechecker_lib.analyzers import analyzer_clangsa
from codechecker_lib.analyzers import config_handler_clang_tidy
from codechecker_lib.analyzers import config_handler_clangsa
from codechecker_lib.analyzers import result_handler_clang_tidy
-from codechecker_lib.analyzers import result_handler_c... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 6,275 | Is this the same import as in the line 20? | Ericsson-codechecker | c |
@@ -5,6 +5,7 @@ class Template < ActiveRecord::Base
validates_with TemplateLinksValidator
before_validation :set_defaults
+ after_update :reconcile_published, if: Proc.new { |template| template.published? && template.version.present? && template.version > 0 }
# Stores links as an JSON object: { funder: [... | 1 | class Template < ActiveRecord::Base
include GlobalHelpers
include ActiveModel::Validations
include TemplateScope
validates_with TemplateLinksValidator
before_validation :set_defaults
# Stores links as an JSON object: { funder: [{"link":"www.example.com","text":"foo"}, ...], sample_plan: [{"link":"www.exa... | 1 | 17,591 | why those additional checks after published? template.version should always be present and greater than zero | DMPRoadmap-roadmap | rb |
@@ -61,6 +61,16 @@ type ExternalEntityReference struct {
Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
}
+// EntityReference represents a reference to either a Pod or an ExternalEntity.
+// TODO: replace Pod and ExternalEntity in GroupMember to embed EntityReference
+// when ... | 1 | // Copyright 2020 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 | 31,815 | I did not see this is used in the controlplane API? Is it for internal use only? Then no need to define it here? | antrea-io-antrea | go |
@@ -138,7 +138,7 @@ void printDeviceProp(int deviceId) {
cout << setw(w1) << "arch.hasSurfaceFuncs: " << props.arch.hasSurfaceFuncs << endl;
cout << setw(w1) << "arch.has3dGrid: " << props.arch.has3dGrid << endl;
cout << setw(w1) << "arch.hasDynamicParallelism: " << props.arch.hasDynamicParallelism << en... | 1 | /*
Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use,... | 1 | 9,342 | Should we also add a line to print gcnArch? | ROCm-Developer-Tools-HIP | cpp |
@@ -87,6 +87,7 @@ module.exports.rebaseBraveStringFilesOnChromiumL10nFiles = (path) =>
.replace('<include name="IDR_MD_HISTORY_SIDE_BAR_HTML"', '<include name="IDR_MD_HISTORY_SIDE_BAR_HTML" flattenhtml="true"')
.replace(pageVisibility, bravePageVisibility + pageVisibility)
.replace(/settings_... | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const path = require('path')
const fs = require('fs')
const srcDir = path.resolve(path.join(__dirname, '..', 'src... | 1 | 5,361 | I merged already so need another PR, but I think this needs to be at the bottom. | brave-brave-browser | js |
@@ -150,6 +150,7 @@ bool ConfigManager::load()
boolean[ONLINE_OFFLINE_CHARLIST] = getGlobalBoolean(L, "showOnlineStatusInCharlist", false);
boolean[YELL_ALLOW_PREMIUM] = getGlobalBoolean(L, "yellAlwaysAllowPremium", false);
boolean[FORCE_MONSTERTYPE_LOAD] = getGlobalBoolean(L, "forceMonsterTypesOnLoad", true);
+ ... | 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 | 16,899 | space in key string? | otland-forgottenserver | cpp |
@@ -48,9 +48,13 @@ func (b *ProcessBuilder) Build() *ManagedProcess {
if len(b.nsOptions) > 0 {
args = append([]string{"--", cmd}, args...)
for _, option := range b.nsOptions {
- args = append([]string{"-" + nsArgMap[option.Typ] + option.Path}, args...)
+ args = append([]string{"-" + nsArgMap[option.Typ], o... | 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,679 | The commends of this function should be updated | chaos-mesh-chaos-mesh | go |
@@ -48,6 +48,7 @@ class AnchorHead(nn.Module):
type='DeltaXYWHBBoxCoder',
target_means=(.0, .0, .0, .0),
target_stds=(1.0, 1.0, 1.0, 1.0)),
+ reg_decoded_bbox=False,
background_label=None,
loss_cls=dict... | 1 | from __future__ import division
import numpy as np
import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from mmdet.core import (AnchorGenerator, anchor_inside_flags, build_assigner,
build_bbox_coder, build_sampler, force_fp32,
images_to_levels, multi_appl... | 1 | 18,618 | The docstring is outdated. | open-mmlab-mmdetection | py |
@@ -7,6 +7,9 @@ namespace Datadog.Trace
/// </summary>
public static class CorrelationIdentifier
{
+ internal static readonly string ServiceKey = "dd.service";
+ internal static readonly string VersionKey = "dd.version";
+ internal static readonly string EnvKey = "dd.env";
i... | 1 | using System;
namespace Datadog.Trace
{
/// <summary>
/// An API to access the active trace and span ids.
/// </summary>
public static class CorrelationIdentifier
{
internal static readonly string TraceIdKey = "dd.trace_id";
internal static readonly string SpanIdKey = "dd.span_id";
... | 1 | 16,904 | Could rename to `ServiceVersionKey` for consistency with the suggestion to rename the TracerSetting. | DataDog-dd-trace-dotnet | .cs |
@@ -826,6 +826,12 @@ def install(package, hash=None, version=None, tag=None, force=False):
store = PackageStore()
existing_pkg = store.get_package(owner, pkg)
+ if existing_pkg is not None and not force:
+ print("{owner}/{pkg} already installed.".format(owner=owner, pkg=pkg))
+ overwrite = ... | 1 | # -*- coding: utf-8 -*-
"""
Command line parsing and command dispatch
"""
from __future__ import print_function
from builtins import input # pylint:disable=W0622
from datetime import datetime
import gzip
import hashlib
import json
import os
import re
from shutil import copyfileobj, move, rmtree
import stat
import... | 1 | 15,498 | I seem to recall a UI issue with this... @akarve I think you didn't like this for some reason... | quiltdata-quilt | py |
@@ -84,7 +84,7 @@ class MediaBlockService extends BaseBlockService
/**
* {@inheritdoc}
*/
- public function getDefaultSettings(OptionsResolverInterface $resolver)
+ public function setDefaultSettings(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'm... | 1 | <?php
/*
* This file is part of the Sonata project.
*
* (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\Block;
use Sonata\AdminBundle\Form\FormMapp... | 1 | 6,075 | The `MediaBlockService` commit must be remove | sonata-project-SonataMediaBundle | php |
@@ -239,11 +239,17 @@ rules:
maximum_retention: 365
"""
+
+ def test_number_of_rules(self):
+ """The number of rules should be exactly the same as the length of SUPPORTED_RETENTION_RES_TYPES."""
+ rules_engine = get_rules_engine_with_rule(RetentionRulesEngineTest.yaml_str_only_max_retention)
+ ... | 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 | 32,976 | Use a literal constant here, and use `assertEqual`, e.g. `self.assertEqual(2, len(...))` You should also check that the number of rules is correct, i.e. 1 rule for buckets, 0 rules for tables. | forseti-security-forseti-security | py |
@@ -15,8 +15,8 @@
* will expire before some files can be uploaded.
*
* The long-term solution to this problem is to change the upload pipeline so that files
- * can be sent to the next step individually. That requires a breakig change, so it is
- * planned for Uppy v2.
+ * can be sent to the next step individuall... | 1 | /**
* This plugin is currently a A Big Hack™! The core reason for that is how this plugin
* interacts with Uppy's current pipeline design. The pipeline can handle files in steps,
* including preprocessing, uploading, and postprocessing steps. This plugin initially
* was designed to do its work in a preprocessing st... | 1 | 14,195 | @Murderlon Should it just say `some future version`? | transloadit-uppy | js |
@@ -122,12 +122,14 @@ func (c *Controller) syncCSPC(cspcGot *apis.CStorPoolCluster) error {
return nil
}
- cspcGot, err := c.populateVersion(cspcGot)
+ cspcObj := cspcGot
+ cspcObj, err := c.populateVersion(cspcObj)
if err != nil {
klog.Errorf("failed to add versionDetails to CSPC %s:%s", cspcGot.Name, err.... | 1 | /*
Copyright 2018 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, soft... | 1 | 17,521 | change looks good.. but, better to make populateVersion to return same object in the case of error.. that avoids lot of complex logic and probable issues | openebs-maya | go |
@@ -1358,6 +1358,10 @@ func (exp *Service) GetBlockOrActionByHash(hashStr string) (explorer.GetBlkOrAct
return explorer.GetBlkOrActResponse{Execution: &exe}, nil
}
+ if exe, err := exp.getAddressDetails(hashStr); err == nil {
+ return explorer.GetBlkOrActResponse{Address: &exe}, nil
+ }
+
return explorer.GetB... | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 15,052 | invalid operation: exp (variable of type *Service) has no field or method getAddressDetails (from `typecheck`) | iotexproject-iotex-core | go |
@@ -4479,7 +4479,8 @@ func TestKBFSOpsBackgroundFlush(t *testing.T) {
// start the background flusher
ops := getOps(config, rootNode.GetFolderBranch().Tlf)
- go ops.backgroundFlusher(1 * time.Millisecond)
+ config.SetBGFlushPeriod(1 * time.Millisecond)
+ go ops.backgroundFlusher()
// Make sure we get the noti... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"bytes"
"fmt"
"math/rand"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 16,556 | Probably overkill, but maybe we should be using a fake clock here. I won't push on whatever you decide though. | keybase-kbfs | go |
@@ -690,7 +690,7 @@ func TestKBFSOpsConcurBlockSyncTruncate(t *testing.T) {
wg.Wait()
- // Do this in the main goroutine since t isn't goroutine safe,
+ // Do this in the main goroutine since it isn't goroutine safe,
// and do this after wg.Wait() since we only know it's set
// after the goroutine exits.
if... | 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"
"runtime"
"sync"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/keybase/client/go/libkb"
"github.com/k... | 1 | 15,281 | If you feel like it, may as well apply all the suggestions below to this test too. | keybase-kbfs | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.