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 |
|---|---|---|---|---|---|---|---|
@@ -97,6 +97,7 @@ std::string FlatCompiler::GetUsageString(const char *program_name) const {
" Default value is \"T\"\n"
" --no-js-exports Removes Node.js style export lines in JS.\n"
" --goog-js-export Uses goog.exports* for closure compiler exporting in JS.\n"
+ " --es6-j... | 1 | /*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 1 | 13,543 | Can you also add this to Compiler.md ? | google-flatbuffers | java |
@@ -144,8 +144,9 @@ class HttpClient {
* @param {function(!Error)} onError The function to call if the request fails.
* @param {?string=} opt_data The data to send with the request.
* @param {?RequestOptions=} opt_proxy The proxy server to use for the request.
+ * @param {!number=} retries The current number of r... | 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 | 14,969 | !numbers -> numbers | SeleniumHQ-selenium | java |
@@ -413,9 +413,9 @@ public class JavaSurfaceNamer extends SurfaceNamer {
* <p>All Google cloud java libraries have package names like "com.google.cloud.library.v1" and
* the respective examples have package names like
* "com.google.cloud.examples.library.v1.snippets". This method assumes {@code packageName}... | 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,502 | This description doesn't seem quite right for the longrunning case - `longrunning` isn't an orgname. | googleapis-gapic-generator | java |
@@ -93,4 +93,11 @@ public interface LeafCollector {
*/
void collect(int doc) throws IOException;
+ /*
+ * optionally returns an iterator over competitive documents
+ */
+ default DocIdSetIterator iterator() {
+ return null;
+ }
+
} | 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 | 33,181 | maybe give it a more descriptive name, e.g. `competitiveFilter` | apache-lucene-solr | java |
@@ -106,7 +106,7 @@ public class JWTVerificationkeyResolver implements VerificationKeyResolver {
}
}
- // Add all keys into a master list
+ // Add all keys into a primary list
if (issuerConfig.usesHttpsJwk()) {
keysSource = "[" + String.join(", ", issuerConfig.getJwksUrls()) ... | 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 | 35,962 | This occurrence of "master" is unrelated to master/slave replication. Maybe simply remove the word "master" or replace it with "reference" but "primary" doesn't really make sense. | apache-lucene-solr | java |
@@ -15,6 +15,7 @@ import (
"github.com/filecoin-project/go-filecoin/actor/builtin/miner"
"github.com/filecoin-project/go-filecoin/address"
"github.com/filecoin-project/go-filecoin/exec"
+ "github.com/filecoin-project/go-filecoin/proofs"
"github.com/filecoin-project/go-filecoin/types"
"github.com/filecoin-proj... | 1 | package storagemarket
import (
"context"
"fmt"
"math/big"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-hamt-ipld"
cbor "github.com/ipfs/go-ipld-cbor"
"github.com/libp2p/go-libp2p-peer"
"github.com/filecoin-project/go-filecoin/abi"
"github.com/filecoin-project/go-filecoin/actor"
"github.com/filecoin-project... | 1 | 18,395 | BLOCKING: This is a problem. We shouldn't be introducing new dependencies on proofs into actors. The miner has some dependencies that should be removed (#2555). This could be accomplished either by moving `proofs.Mode` to `types.ProofsMode` or by forgoing a new type altogether and replacing it with a boolean. The later... | filecoin-project-venus | go |
@@ -74,7 +74,9 @@ func verifyReceiveMessage(r *request.Request) {
for _, msg := range out.Messages {
err := checksumsMatch(msg.Body, msg.MD5OfBody)
if err != nil {
- ids = append(ids, *msg.MessageId)
+ if msg.MessageId != nil {
+ ids = append(ids, *msg.MessageId)
+ }
}
}
if len(ids) > ... | 1 | package sqs
import (
"crypto/md5"
"encoding/hex"
"fmt"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
)
var (
errChecksumMissingBody = fmt.Errorf("cannot compute checksum. missing body")
errChecksumMissingMD5 = fmt.Errorf("cannot ver... | 1 | 8,000 | We probably want to log the fact that a `MessageId` was not present in the response. In addition the `RequestID` from `request.Request` should be included in the message so that the user is aware of the issue. | aws-aws-sdk-go | go |
@@ -38,10 +38,11 @@ apiFetchMock.mockImplementation( ( ...args ) => {
const setupRegistry = ( { dispatch } ) => {
const { id, webPropertyId, accountId } = fixtures.propertiesProfiles.profiles[ 0 ];
+ const propertyID = webPropertyId;
dispatch( STORE_NAME ).setAccountID( accountId );
dispatch( STORE_NAME ).setP... | 1 | /**
* Profile Select component tests.
*
* 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/licenses/LICENS... | 1 | 28,514 | It feels a bit strange to re-assign that here, as that line itself has no context on why it's reassigned. I'd prefer if we could pass `{ propertyID: webPropertyId }` below instead (that's how we do that elsewhere too). This also applies to other similar re-assignments below - let's rather pass the values within the obj... | google-site-kit-wp | js |
@@ -172,6 +172,7 @@ module.exports = function(grunt) {
'frontend/express/public/core/events/javascripts/countly.overview.views.js',
'frontend/express/public/core/events/javascripts/countly.details.views.js',
'frontend/express/public/core/events/javascripts/... | 1 | module.exports = function(grunt) {
grunt.initConfig({
eslint: {
options: {
configFile: './.eslintrc.json'
},
target: ['./']
},
concat: {
options: {
separator: ';'
},
dom: {
... | 1 | 14,257 | remove this in the new pr aswell when moving compare to plugins as discussed. | Countly-countly-server | js |
@@ -210,10 +210,16 @@ Status YieldClauseWrapper::prepare(
yieldColsHolder_ = std::make_unique<YieldColumns>();
for (auto *col : cols) {
if (col->expr()->isInputExpression()) {
+ if (inputs == nullptr) {
+ return Status::Error("Inputs nullptr.");
+ }
i... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "graph/TraverseExecutor.h"
#include "parser/TraverseSentences.h"
#include "dataman/RowRe... | 1 | 25,028 | check varHolder is nullptr is redundant, ExecutionContext ensure | vesoft-inc-nebula | cpp |
@@ -0,0 +1,8 @@
+module UnsubscribesHelper
+ def unsubscribe_token_verifier
+ @_unsubscribe_token_verifier ||= ActiveSupport::MessageVerifier.new(
+ ENV.fetch("UNSUBSCRIBE_SECRET_BASE"),
+ digest: "SHA256".freeze,
+ )
+ end
+end | 1 | 1 | 17,535 | Make these frozen constants? | thoughtbot-upcase | rb | |
@@ -55,8 +55,9 @@ def browseableMessage(message,title=None,isHtml=False):
if not title:
# Translators: The title for the dialog used to present general NVDA messages in browse mode.
title = _("NVDA Message")
- isHtmlArgument = "true" if isHtml else "false"
- dialogString = u"{isHtml};{title};{message}".format( ... | 1 | # -*- coding: utf-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2008-2020 NV Access Limited, James Teh, Dinesh Kaushal, Davy Kager, André-Abush Clause,
# Babbage B.V., Leonard de Ruijter, Michael Curran, Accessolutions, Julien Cochuyt
# This file may be used under the terms of the GNU General Pu... | 1 | 31,586 | Please use something like html.escape() to ensure that the text is totally safe to include within html. < is not enough. | nvaccess-nvda | py |
@@ -130,7 +130,7 @@ func (s *Service) RetrieveChunk(ctx context.Context, addr swarm.Address, origin
var (
peerAttempt int
peersResults int
- resultC = make(chan retrievalResult, maxSelects)
+ resultC = make(chan retrievalResult, 2)
)
requestAttempt := 0 | 1 | // 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 retrieval provides the retrieval protocol
// implementation. The protocol is used to retrieve
// chunks over the network using forwarding-kademlia... | 1 | 15,073 | why is a buffered channel larger than 1 needed here? the separate goroutines can just try to write to the channel with a select-default block, and then it is not needed. i find the current implementation a bit convoluted, maybe we could simplify it a bit? not sure why it is needed for example to communicate an empty re... | ethersphere-bee | go |
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20150410155813) do
+ActiveRecord::Schema.define(version: 20150415145819) do
# These are extensions that must be enabled in order to support this database
enable_ex... | 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 | 14,481 | There seem to be more changes in here than I'd expect (mostly `limit: 255` additions). | thoughtbot-upcase | rb |
@@ -38,6 +38,10 @@ namespace OpenTelemetry.Context.Propagation
private static readonly int VersionAndTraceIdAndSpanIdLength = "00-0af7651916cd43dd8448eb211c80319c-00f067aa0ba902b7-".Length;
private static readonly int OptionsLength = "00".Length;
private static readonly int TraceparentLengthV... | 1 | // <copyright file="TraceContextPropagator.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... | 1 | 18,697 | I'm not sure, but I think it's `Tenant` | open-telemetry-opentelemetry-dotnet | .cs |
@@ -15,8 +15,9 @@ namespace Datadog.Trace.Configuration
/// <paramref name="data"/>.
/// </summary>
/// <param name="data">A string containing key-value pairs which are comma-separated, and for which the key and value are colon-separated.</param>
+ /// <param name="allowOptionalMapping... | 1 | using System.Collections.Concurrent;
using System.Collections.Generic;
using Datadog.Trace.ExtensionMethods;
namespace Datadog.Trace.Configuration
{
/// <summary>
/// A base <see cref="IConfigurationSource"/> implementation
/// for string-only configuration sources.
/// </summary>
public abstract c... | 1 | 19,501 | Not sure if it's an issue, but this is a breaking change in a public API. Maybe we should add as an overload without optional parameter instead and delegate the existing call to this one? | DataDog-dd-trace-dotnet | .cs |
@@ -147,6 +147,11 @@ func (o *Outbound) Transports() []transport.Transport {
return []transport.Transport{o.transport}
}
+// Chooser returns the outbound's peer chooser.
+func (o *Outbound) Chooser() peer.Chooser {
+ return o.chooser
+}
+
// Start the HTTP outbound
func (o *Outbound) Start() error {
return o.o... | 1 | // Copyright (c) 2017 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 | 13,360 | as opposed to exposing the chooser function and increasing our API exposure for the purpose of tests, can we move the HTTP transport config test into this package? | yarpc-yarpc-go | go |
@@ -461,6 +461,17 @@ error_conn:
return 0;
}
+static void wlr_drm_connector_set_dpms(struct wlr_output *output, enum dpms_enum level) {
+ struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
+ struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
+
+ if (drmModeObjectSetProper... | 1 | #include <assert.h>
#include <drm_mode.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <errno.h>
#include <gbm.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wayland-server.h>
#include <wayland-uti... | 1 | 10,993 | This is using the legacy DRM interface. DPMS levels have been removed from the atomic interface IIRC. Should we handle DPMS levels at all? | swaywm-wlroots | c |
@@ -162,13 +162,13 @@ type confirmedTx struct {
watch *transactionWatch
}
-// potentiallyConfirmedWatches returns all watches with nonce less than what was specified
+// potentiallyConfirmedWatches returns all watches with nonce less than or equal what was specified
func (tm *transactionMonitor) potentiallyConf... | 1 | // Copyright 2021 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 transaction
import (
"context"
"errors"
"io"
"math/big"
"sync"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/co... | 1 | 14,915 | I think this was correct before. The nonce passed in here is the nonce at a block (which is the next nonce not yet used, e.g. 0 if the account was never used, 1 if only the tx with nonce 0 has been sent). So if the in-block nonce is 12, then a transaction with nonce 12 cannot have been included yet. | ethersphere-bee | go |
@@ -0,0 +1,13 @@
+const { NativeModules, Platform } = require('react-native');
+
+const ext = (Platform.OS === 'android' && NativeModules.ShareExtension) ?
+ {
+ data: () => NativeModules.ShareExtension.data(),
+ close: () => NativeModules.ShareExtension.close(),
+ } :
+ {
+ data: () => {},
+ close: () => {},
+ };
... | 1 | 1 | 13,669 | Please name the file ShareExtension.js, as you import it under this name (also could you convert it to TypeScript please?) | laurent22-joplin | js | |
@@ -45,6 +45,7 @@ type ClusterOpts struct {
TLSTimeout float64 `json:"-"`
TLSConfig *tls.Config `json:"-"`
TLSMap bool `json:"-"`
+ TLSInsecure bool `json:"tls_insecure"`
ListenStr string `json:"-"`
Advertise string ... | 1 | // Copyright 2012-2019 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 8,740 | Not sure if we need it, but if we set it, be sure to add `,omitempty`. | nats-io-nats-server | go |
@@ -17,7 +17,7 @@ var (
errGetLengthNotForVersionNegotiation = errors.New("PublicHeader: GetLength cannot be called for VersionNegotiation packets")
)
-// The PublicHeader of a QUIC packet
+// The PublicHeader of a QUIC packet.
type PublicHeader struct {
Raw []byte
ConnectionID protoc... | 1 | package quic
import (
"bytes"
"errors"
"github.com/lucas-clemente/quic-go/protocol"
"github.com/lucas-clemente/quic-go/qerr"
"github.com/lucas-clemente/quic-go/utils"
)
var (
errPacketNumberLenNotSet = errors.New("PublicHeader: PacketNumberLen not set")
errResetAndVersionFlagSet = error... | 1 | 5,704 | It's the whole `PublicHeader` that will change soon, and we should state that here, not in the member functions. If Jana's proposal for a new header is accepted, we might also want to rename the fields here. For example, there won't be a dedicated version flag anymore, so a more appropriate name might be `ContainsVersi... | lucas-clemente-quic-go | go |
@@ -1003,8 +1003,8 @@ public final class CharSeq implements CharSequence, IndexedSeq<Character>, Seria
}
@Override
- public int indexOf(Character element, int from) {
- return back.indexOf(element, from);
+ public int indexOf(Object element, int from) {
+ return back.indexOf((Character) ... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _ _____
* / / \/ \ / \/ \ / /\__\/ // \/ \ / / _ \ Javaslang
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \__/ / Copyright 2014-now Daniel Dietrich
* /___/\_/ \_/\____/\_/ \_/\__\/__/___\_/ \_// \__/_____/ Licensed under... | 1 | 7,281 | I think `element` can stay of type `Character` because `Character` is a final class. The we do not need the cast in the line below. | vavr-io-vavr | java |
@@ -260,6 +260,15 @@ public interface ASTAnyTypeDeclaration
}
+ /**
+ * Returns true if this is a regular interface declaration (not an annotation).
+ * Note that {@link #isInterface()} counts annotations in.
+ */
+ default boolean isRegularInterface() {
+ return false;
+ }
+
+
... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.ast;
import static net.sourceforge.pmd.lang.java.ast.JModifier.ABSTRACT;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker... | 1 | 18,486 | Not sure, if we should do it the other way round. If you ask be in the middle of the night, whether Interface should return true as "isInterface" and what Annotation would return. I'd tell you, Annotations should return false.... I want to say, on first glance, I'd say, it's easier to have "isInterface" and "isAnnotati... | pmd-pmd | java |
@@ -67,7 +67,6 @@ def lambda_handler(request):
raise ValueError("'packages' action searching indexes that don't end in '_packages'")
_source = user_source
size = user_size
- terminate_after = None
elif action == 'search':
query = request.args.get('query', '')
... | 1 | """
Sends the request to ElasticSearch.
TODO: Implement a higher-level search API.
"""
import os
from copy import deepcopy
from itertools import filterfalse, tee
from aws_requests_auth.boto_utils import BotoAWSRequestsAuth
from elasticsearch import Elasticsearch, RequestsHttpConnection
from t4_lambda_shared.decorato... | 1 | 19,699 | This will potentially skip package results. Do we really want that? | quiltdata-quilt | py |
@@ -787,7 +787,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_RUNTIME_TYPE_NAME_MAP {
{"cudaErrorInvalidPc", {"hipErrorInvalidPc", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 718
// CUDA_ERROR_LAUNCH_FAILE... | 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 | 8,902 | Please remove `HIP_UNSUPPORTED` | ROCm-Developer-Tools-HIP | cpp |
@@ -438,7 +438,7 @@ type (
// CreateWorkflowExecutionResponse is the response to CreateWorkflowExecutionRequest
CreateWorkflowExecutionResponse struct {
- HistorySize int64
+ NewMutableStateStats MutableStateStatus
}
// GetWorkflowExecutionRequest is used to retrieve the info of a workflow execution | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 12,637 | if this is a "Status" type then the variable name "Stats" (which implies "statistics") seems wrong (or at least confusing to me) | temporalio-temporal | go |
@@ -35,6 +35,10 @@ const (
exportKeystorePath = "/var/lib/sonm/worker_keystore"
)
+var (
+ leakedInsecureKey = common.HexToAddress("0x8125721c2413d99a33e351e1f6bb4e56b6b633fd")
+)
+
type options struct {
version string
cfg *Config | 1 | package worker
import (
"context"
"crypto/ecdsa"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"errors"
"fmt"
"os"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/noxiouz/zapctx/ctxlog"
"github.co... | 1 | 7,858 | maybe will be better to put it into the default worker's config rather than hardcoding the address? | sonm-io-core | go |
@@ -2737,14 +2737,11 @@ describe('Find', function() {
var db = client.db(configuration.db);
var collection = db.collection('shouldNotMutateUserOptions');
var options = { raw: 'TEST' };
- collection.find({}, options, function(error) {
- test.equal(null, error);
- test.... | 1 | 'use strict';
const test = require('./shared').assert;
const setupDatabase = require('./shared').setupDatabase;
const expect = require('chai').expect;
const Buffer = require('safe-buffer').Buffer;
describe('Find', function() {
before(function() {
return setupDatabase(this.configuration);
});
/**
* Test a... | 1 | 14,965 | It seems like this is not meant to test the option failure, but rather that `raw` can be set. This may be a superfluous test now, and we might want to delete it. | mongodb-node-mongodb-native | js |
@@ -715,6 +715,16 @@ struct roots_seat_view *roots_seat_view_from_view(
return seat_view;
}
+static void release_fullscreen(struct roots_output *output) {
+ if (output->fullscreen_view) {
+ if (output->fullscreen_view->set_fullscreen) {
+ output->fullscreen_view->set_fullscreen(
+ output->fullscreen_view, fa... | 1 | #include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <wayland-server.h>
#include <wlr/config.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/util/log.h>
#include "rootston/cursor.h"
#include "rootston/input.h"
#include "rootston/keyboard.h"
#include "rootston/... | 1 | 10,064 | This is already done by `view_set_fullscreen` | swaywm-wlroots | c |
@@ -101,6 +101,15 @@ func (pr *PeerRing) RemoveAll() []peer.Peer {
return peers
}
+// All returns a snapshot of all the peers from the ring as a list.
+func (pr *PeerRing) All() []peer.Peer {
+ peers := make([]peer.Peer, 0, len(pr.peerToNode))
+ for _, node := range pr.peerToNode {
+ peers = append(peers, getPeer... | 1 | // Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 11,935 | mmm I followed the convention of this collection. It has Add, Remove, RemoveAll, so All sounds reasonable. Else It would likely be AddPeer, RemovePeer, RemovePeers and Peers. | yarpc-yarpc-go | go |
@@ -65,6 +65,15 @@ class FlagFacade
return $this->flagRepository->getByIds($flagIds);
}
+ /**
+ * @param string $uuid
+ * @return \Shopsys\FrameworkBundle\Model\Product\Flag\Flag
+ */
+ public function getByUuid(string $uuid): Flag
+ {
+ return $this->flagRepository->getByUui... | 1 | <?php
declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Model\Product\Flag;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class FlagFacade
{
/**
* @var \Doctrine\ORM\EntityManagerInterface
*/
protected $em;
/**
* @var \S... | 1 | 23,792 | _nitpick_ I'm thinking about whether this method should be in the previous commit or not. I know it's not yet used there, but in theory, neither do UUID itself. | shopsys-shopsys | php |
@@ -760,6 +760,13 @@ void RaftPart::replicateLogs(folly::EventBase* eb,
break;
}
+ if (term_ != currTerm) {
+ VLOG(2) << idStr_ << "Term has been updated, previous "
+ << currTerm << ", current " << term_;
+ currTerm = term_;
+ break;
+ ... | 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 "kvstore/raftex/RaftPart.h"
#include <folly/io/async/EventBaseManager.h>
#include <folly... | 1 | 29,876 | "break" is right? You skip the line 768. | vesoft-inc-nebula | cpp |
@@ -0,0 +1,19 @@
+# RailsAdmin config file. Generated on May 30, 2012 16:34
+# See github.com/sferik/rails_admin for more informations
+
+RailsAdmin.config do |config|
+ config.authenticate_with do
+ unless current_user
+ session[:return_to] = request.url
+ redirect_to "/sign_in", :alert => "You must firs... | 1 | 1 | 6,330 | Can this use the route helper instead? | thoughtbot-upcase | rb | |
@@ -44,6 +44,7 @@ var Set = wire.NewSet(
// The zero value is a server with the default options.
type Server struct {
reqlog requestlog.Logger
+ Handler http.Handler
healthHandler health.Handler
te trace.Exporter
sampler trace.Sampler | 1 | // Copyright 2018 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 | 16,459 | Why is this field exported and others aren't? | google-go-cloud | go |
@@ -273,6 +273,7 @@ var testFiles = [
, '/test/functional/byo_promises_tests.js'
// Functionality tests
+ , '/test/functional/dns_txt_records_tests.js'
, '/test/functional/mongo_client_tests.js'
, '/test/functional/collection_tests.js'
, '/test/functional/db_tests.js' | 1 | "use strict";
var Runner = require('integra').Runner
, Cover = require('integra').Cover
, RCover = require('integra').RCover
, f = require('util').format
, path = require('path')
, NodeVersionFilter = require('./filters/node_version_filter')
, MongoDBVersionFilter = require('./filters/mongodb_version_filte... | 1 | 14,145 | should we rename this like `mongodb_srv_tests.js`? | mongodb-node-mongodb-native | js |
@@ -46,7 +46,7 @@ class SearchConsoleDashboardWidgetSiteStats extends Component {
setOptions() {
const { selectedStats, series, vAxes } = this.props;
- const pageTitle = '' === googlesitekit.pageTitle ? '' : sprintf( __( 'Search Traffic Summary for %s', 'google-site-kit' ), decodeHtmlEntity( googlesitekit.pageT... | 1 | /**
* SearchConsoleDashboardWidgetSiteStats 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.or... | 1 | 25,462 | This should still have a value when there is no page title, e.g. just `__( 'Search Traffic Summary', 'google-site-kit' )`. | google-site-kit-wp | js |
@@ -60,7 +60,10 @@ import static org.apache.solr.common.params.CollectionParams.CollectionAction.*;
import static org.apache.solr.common.params.CommonAdminParams.ASYNC;
import static org.apache.solr.common.params.CommonAdminParams.NUM_SUB_SHARDS;
-
+/**
+ * Index split request processed by Overseer. Requests from h... | 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,865 | Oops.. meant to link to SplitOp here. I'll clean up in my next commit | apache-lucene-solr | java |
@@ -14,6 +14,10 @@ import android.widget.Toast;
import com.afollestad.materialdialogs.MaterialDialog;
import com.fasterxml.jackson.databind.JsonNode;
import com.firebase.jobdispatcher.JobParameters;
+
+import io.reactivex.SingleObserver;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex... | 1 | package openfoodfacts.github.scrachx.openfood.network;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import androi... | 1 | 66,411 | Remove these unnecessary imports that you've added. | openfoodfacts-openfoodfacts-androidapp | java |
@@ -28,8 +28,8 @@ from qutebrowser.utils import usertypes
# Note this has entries for success/error/warn from widgets.webview:LoadStatus
-UrlType = usertypes.enum('UrlType', ['success', 'error', 'warn', 'hover',
- 'normal'])
+UrlType = usertypes.enum('UrlType', ['success', 'succ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 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 | 13,759 | That space shouldn't be here :wink: This lead to an exception whenever a page with an error was loaded, e.g. an inexistent host - I just fixed that :smile: | qutebrowser-qutebrowser | py |
@@ -735,7 +735,7 @@ class TLSServerAutomaton(Automaton):
self.local_port)
return
self.socket, addr = s.accept()
- self.remote_ip, self.remote_port = addr
+ self.remote_ip, self.remote_port = addr, self.local_port
... | 1 | ## This file is part of Scapy
## Copyright (C) 2007, 2008, 2009 Arnaud Ebalard
## 2015, 2016 Maxence Tury
## This program is published under a GPLv2 license
"""
TLS automatons. This makes for a primitive TLS stack.
SSLv3 is not guaranteed, and SSLv2 is not supported.
Obviously you need rights for n... | 1 | 9,412 | It seems this is not the way to fix issue #505. | secdev-scapy | py |
@@ -104,7 +104,7 @@ def binary_cross_entropy(pred,
if weight is not None:
weight = weight.float()
loss = F.binary_cross_entropy_with_logits(
- pred, label.float(), pos_weight=class_weight, reduction='none')
+ pred, label.float(), weight=class_weight, reduction='none')
# do the redu... | 1 | import torch
import torch.nn as nn
import torch.nn.functional as F
from ..builder import LOSSES
from .utils import weight_reduce_loss
def cross_entropy(pred,
label,
weight=None,
reduction='mean',
avg_factor=None,
class_weight=N... | 1 | 24,946 | Please take a look at the docstring of `F.binary_cross_entropy_with_logits`. `weight` should be a tensor that matches the input tensor shape. It is Not the class-aware weight. `pos_weight` should be a vector with a length equal to the number of classes. | open-mmlab-mmdetection | py |
@@ -85,12 +85,15 @@ func TestSuite(
testSuiteName, fmt.Sprintf("[%v] %v", testType, "Windows 2012 R2 two disks, Network setting (path)"))
machineImageImportStorageLocationTestCase := junitxml.NewTestCase(
testSuiteName, fmt.Sprintf("[%v] %v", testType, "Centos 7.4, Storage location"))
+ machineImageImportNe... | 1 | // Copyright 2020 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 | 13,629 | Same here, merge with an existing test. | GoogleCloudPlatform-compute-image-tools | go |
@@ -28,7 +28,7 @@ EFI_DRIVER_BINDING_PROTOCOL gSdMmcPciHcDriverBinding = {
NULL
};
-#define SLOT_INIT_TEMPLATE {0, UnknownSlot, 0, 0, 0, 0,\
+#define SLOT_INIT_TEMPLATE {0, UnknownSlot, 0, 0, 0,\
{EDKII_SD_MMC_BUS_WIDTH_IGNORE,\
EDKII_SD_MMC_CLOCK... | 1 | /** @file
This driver is used to manage SD/MMC PCI host controllers which are compliance
with SD Host Controller Simplified Specification version 3.00 plus the 64-bit
System Addressing support in SD Host Controller Simplified Specification version
4.20.
It would expose EFI_SD_MMC_PASS_THRU_PROTOCOL for... | 1 | 17,688 | @aimanrosli23 Could you help to confirm if you do not revert the change in below commit: SHA-1: 643623147a1feaddd734ddd84604e1d8e9dcebee * MdeModulePkg/SdMmcPciHcDxe: Send SEND_STATUS at lower frequency | tianocore-edk2 | c |
@@ -76,8 +76,10 @@ public class AvroSchemaUtil {
return TypeUtil.visit(type, new TypeToSchema(names));
}
- public static Type convert(Schema schema) {
- return AvroSchemaVisitor.visit(schema, new SchemaToType(schema));
+ public static org.apache.iceberg.Schema convert(Schema schema) {
+ final Type typ... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 16,319 | Can we do this without a breaking API change? What about adding a different name to convert directly to a Schema? | apache-iceberg | java |
@@ -1,7 +1,8 @@
'use strict';
-var MongoClient = require('../../').MongoClient,
- expect = require('chai').expect;
+const Promise = require('bluebird');
+const MongoClient = require('../../').MongoClient;
+const expect = require('chai').expect;
function connectToDb(url, db, options, callback) {
if (typeof opt... | 1 | 'use strict';
var MongoClient = require('../../').MongoClient,
expect = require('chai').expect;
function connectToDb(url, db, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
MongoClient.connect(url, options || {}, function(err, client) {
if (err) retu... | 1 | 14,229 | Why do we need to pull bluebird in here? | mongodb-node-mongodb-native | js |
@@ -121,9 +121,10 @@ public class FlowPreparer extends AbstractFlowPreparer {
(flowPrepCompletionTime - criticalSectionStartTime) / 1000,
flow.getExecutionId(), execDir.getPath());
} catch (final Exception ex) {
- FileIOUtils.deleteDirectorySilently(tempDir);
LOGGER.error("Error i... | 1 | /*
* Copyright 2017 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 22,120 | If *two* threads successfully download the same project into two different temp dirs, and one of them successfully renames one to its final destination, the `if`on line 102 will be false _in the other thread_, and it would leave its temp dir behind. | azkaban-azkaban | java |
@@ -37,6 +37,7 @@ struct pool_entry_t {
h2o_socket_export_t sockinfo;
h2o_socketpool_target_t *target;
h2o_linklist_t link;
+ h2o_linklist_t target_link;
uint64_t added_at;
};
| 1 | /*
* Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku
*
* 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, mo... | 1 | 12,523 | I would appreciate it if you could rename `link` to `all_link` so that the roles of the two links (the other is `target_link`) become clearer. | h2o-h2o | c |
@@ -826,10 +826,16 @@ class InitialDevelopmentTests(unittest.TestCase):
"Testing testing ",
speech.PitchCommand(offset=100),
"1 2 3 4",
- smi.create_ConfigProfileTriggerCommand(t1, True, expectedToBecomeIndex=1),
- smi.create_ConfigProfileTriggerCommand(t2, True, expectedToBecomeIndex=2),
+ ExpectedIn... | 1 | # A part of NonVisual Desktop Access (NVDA)
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2020 NV Access Limited
"""Unit tests for speech/manager module
"""
import unittest
import config
import speech
from unittest import mock
from unittes... | 1 | 30,834 | Is there a reason not to use `smi.create_expectedIndex` here (and in other places)? The `smi.create_expectedIndex` function will also check to make sure that you don't accidentally skip or duplicate any indexes. With the goal of avoiding errors in the test. It does mean that you have to be diligent with how the expecte... | nvaccess-nvda | py |
@@ -43,8 +43,8 @@ class StripeSubscription
def create_customer
new_stripe_customer = Stripe::Customer.create(
card: @checkout.stripe_token,
- description: @checkout.email,
- email: @checkout.email
+ description: @checkout.user_email,
+ email: @checkout.user_email,
)
@checkou... | 1 | class StripeSubscription
attr_reader :id
def initialize(checkout)
@checkout = checkout
end
def create
rescue_stripe_exception do
ensure_customer_exists
update_subscription
end
end
private
def rescue_stripe_exception
yield
true
rescue Stripe::StripeError => exception
... | 1 | 15,659 | Put a comma after the last parameter of a multiline method call. | thoughtbot-upcase | rb |
@@ -29,7 +29,7 @@ type ImageWithPort struct {
type LBFargateConfig struct {
RoutingRule `yaml:"http,flow"`
ContainersConfig `yaml:",inline"`
- Public bool `yaml:"public"`
+ Public *bool `yaml:"public"` // A pointer because we don't want the environment override t... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package manifest
import (
"bytes"
"text/template"
"github.com/aws/amazon-ecs-cli-v2/templates"
)
// LBFargateManifest holds the configuration to build a container image with an exposed port that rece... | 1 | 10,757 | I don't know if we even need this parameter. | aws-copilot-cli | go |
@@ -1,5 +1,5 @@
"""Test that we are emitting arguments-differ when the arguments are different."""
-# pylint: disable=missing-docstring, too-few-public-methods, unused-argument,useless-super-delegation, useless-object-inheritance
+# pylint: disable= arguments-renamed, missing-docstring, too-few-public-methods, unused-... | 1 | """Test that we are emitting arguments-differ when the arguments are different."""
# pylint: disable=missing-docstring, too-few-public-methods, unused-argument,useless-super-delegation, useless-object-inheritance
class Parent(object):
def test(self):
pass
class Child(Parent):
def test(se... | 1 | 13,534 | What is the new result of this file if we keep it the same than before? It's just to picture easily what changed in this MR :) (thinking is hard) | PyCQA-pylint | py |
@@ -165,7 +165,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
using (var reader = new StreamReader(stream, Encoding.ASCII))
{
- var response = reader.ReadToEnd();
+ var response = await reader.ReadToEndAsync();... | 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.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
usin... | 1 | 12,834 | This needs to be synchronous for the timeout to work. | aspnet-KestrelHttpServer | .cs |
@@ -23,11 +23,7 @@ Where
<% if purchaseable.city.present? %><%= purchaseable.city %>, <% end %><%= purchaseable.state %> <%= purchaseable.zip %>
<% end -%>
-<% unless purchaseable.starts_immediately? -%>
-We will be in touch before <%= purchase.starts_on.to_s(:simple) %> with a reminder and any further instructions... | 1 | Thank you! <%= purchase.name %> is now registered for <%= purchaseable.name %>.
You can view the workshop lessons and other workshop resources here:
<%= purchase_url(purchase) %>
<% if purchaseable.in_person? -%>
<% if purchase.comments.present? -%>
You provided us with the following comments:
<%= purchase.comments %>... | 1 | 8,399 | Can you break this onto multiple lines? | thoughtbot-upcase | rb |
@@ -298,11 +298,11 @@ const instr_info_t A32_ext_bit7[][2] = {
*/
const instr_info_t A32_ext_bit19[][2] = {
{ /* 0 */
- {EXT_SIMD8, 0xf2800000, "(ext simd8 0)", xx, xx, xx, xx, xx, no, x, 0},
- {EXT_SIMD5, 0xf2880000, "(ext simd5 0)", xx, xx, xx, xx, xx, no, x, 0},
+ {EXT_SIMD8, ... | 1 | /* **********************************************************
* Copyright (c) 2014-2015 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... | 1 | 11,883 | OK, it looks like all children have bit 4 set, but it doesn't really matter at this split point: just informative, nothing reads it. | DynamoRIO-dynamorio | c |
@@ -32,6 +32,12 @@ type DNSZoneSpec struct {
// Zone is the DNS zone to host
Zone string `json:"zone"`
+ // LinkToParentDomain specifies whether DNS records should
+ // be automatically created to link this DNSZone with a
+ // parent domain.
+ // +optional
+ LinkToParentDomain bool `json:"linkToParentDomain,omite... | 1 | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 5,751 | Sorry for the very basic question but why do we still have a DNSZone CRD in light of the DNSEndpoint, I don't fully understand the differences. | openshift-hive | go |
@@ -0,0 +1,17 @@
+package session
+
+import (
+ "testing"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestManagerHasUniqueSessionsStored(t *testing.T) {
+ manager := Manager{}
+ length := 10
+
+ for i := 0; i < length; i++ {
+ manager.Create()
+ }
+
+ assert.Len(t, manager.Sessions, length)
+} | 1 | 1 | 9,520 | Looks like loop with overhead. You can: - create SID - test private function `sessionIsUnique()` | mysteriumnetwork-node | go | |
@@ -54,6 +54,7 @@ public class UserPreferences {
private static final String PREF_SHOW_DOWNLOAD_REPORT = "prefShowDownloadReport";
public static final String PREF_BACK_BUTTON_BEHAVIOR = "prefBackButtonBehavior";
private static final String PREF_BACK_BUTTON_GO_TO_PAGE = "prefBackButtonGoToPage";
+ publ... | 1 | package de.danoeh.antennapod.core.preferences;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.v4.app.NotificationCompat;
import android.t... | 1 | 14,943 | In my opinion, it would be better to have two separate settings. One that stores if sorting is enabled and one that stores the order. That allows to toggle automatic sort without having to re-select the order. | AntennaPod-AntennaPod | java |
@@ -1,7 +1,10 @@
package main
-import "github.com/spiffe/sri/control_plane/cli"
-import "os"
+import (
+ "os"
+
+ "github.com/spiffe/sri/control_plane/cli"
+)
func main() {
control_plane_cli.Run(os.Args) | 1 | package main
import "github.com/spiffe/sri/control_plane/cli"
import "os"
func main() {
control_plane_cli.Run(os.Args)
}
| 1 | 8,204 | /me can't wait to rename this repo :) | spiffe-spire | go |
@@ -18,10 +18,14 @@ const handleCallback = require('../utils').handleCallback;
const indexInformationDb = require('./db_ops').indexInformation;
const isObject = require('../utils').isObject;
const Long = require('mongodb-core').BSON.Long;
+const makeLazyLoader = require('../utils').makeLazyLoader;
const MongoError ... | 1 | 'use strict';
const applyWriteConcern = require('../utils').applyWriteConcern;
const applyRetryableWrites = require('../utils').applyRetryableWrites;
const checkCollectionName = require('../utils').checkCollectionName;
const Code = require('mongodb-core').BSON.Code;
const createIndexDb = require('./db_ops').createInde... | 1 | 15,111 | nit: maybe call these `loadCollection()/loadDb()` | mongodb-node-mongodb-native | js |
@@ -562,6 +562,19 @@ class Task(object):
Default behavior is to send an None value"""
pass
+ def on_external_failure(self):
+ """
+ Override for custom error handling for failed external tasks.
+
+ This method gets called if a task is an :py:class:`luigi.task.ExternalTask`, o... | 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 | 16,673 | Did you consider just do `return Task is an external data dependency and data does not exist (yet?).'`? Less `None`'s and `ifs`. | spotify-luigi | py |
@@ -2,13 +2,10 @@
<li class="cite">
<%= link_to t('blacklight.tools.cite'), citation_catalog_path(:sort=>params[:sort], :per_page=>params[:per_page], :id => @bookmarks.collect{|doc| doc.document_id}), {:id => 'citeLink', :name => 'citation', :class => 'btn btn-default', :data => {:ajax_modal => "trigger... | 1 | <ul class="bookmarkTools nav nav-pills">
<li class="cite">
<%= link_to t('blacklight.tools.cite'), citation_catalog_path(:sort=>params[:sort], :per_page=>params[:per_page], :id => @bookmarks.collect{|doc| doc.document_id}), {:id => 'citeLink', :name => 'citation', :class => 'btn btn-default', :data =>... | 1 | 4,953 | Some day, we really need to make these toolbars pluggable.. | projectblacklight-blacklight | rb |
@@ -100,7 +100,11 @@ class WebEngineAction(browsertab.AbstractAction):
"""Save the current page."""
self._widget.triggerPageAction(QWebEnginePage.SavePage)
- def show_source(self):
+ def show_source(self, pygment):
+ if pygment:
+ self._show_source_pygment()
+ retu... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 20,845 | This should be `pygment=False` like in `browsertab.py` | qutebrowser-qutebrowser | py |
@@ -766,6 +766,11 @@ func (s *Server) createClient(conn net.Conn) *client {
return c
}
+ // If there is a max subscriptions specified, add to the client.
+ if opts.MaxSubs > 0 {
+ c.msubs = opts.MaxSubs
+ }
+
// If there is a max connections specified, check that adding
// this new client would not push us ... | 1 | // Copyright 2012-2018 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 | 7,700 | Should this be moved down (or up) to under the client lock instead of server lock? | nats-io-nats-server | go |
@@ -273,8 +273,6 @@ fpga_result __FPGA_API__ xfpga_fpgaGetMetricsByIndex(fpga_handle handle,
result = FPGA_OK;
}
- } else {
- result = FPGA_INVALID_PARAM;
}
out_unlock: | 1 | // Copyright(c) 2018, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 17,879 | Why are we removing this? | OPAE-opae-sdk | c |
@@ -76,7 +76,7 @@ module Gsa18f
# @todo - this is pretty ugly
def public_identifier
- self.cart.id
+ "##{self.cart.id}"
end
def total_price | 1 | module Gsa18f
# Make sure all table names use 'gsa18f_XXX'
def self.table_name_prefix
'gsa18f_'
end
DATA = YAML.load_file("#{Rails.root}/config/data/18f.yaml")
class Procurement < ActiveRecord::Base
URGENCY = DATA['URGENCY']
OFFICES = DATA['OFFICES']
RECURRENCE = DATA['RECURRENCE']
#... | 1 | 13,039 | What do you think about using `self.id` ? | 18F-C2 | rb |
@@ -442,7 +442,17 @@ configRetry:
log.Infof("Starting the Typha connection")
err := typhaConnection.Start(context.Background())
if err != nil {
- log.WithError(err).Fatal("Failed to connect to Typha")
+ retry := 0
+ for err != nil && retry < 10 {
+ // Set Ready and Live to false
+ healthAggregator.... | 1 | // Copyright (c) 2017-2019 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 16,830 | Please log once here at Error level "Failed to connect to Typha, will retry..." | projectcalico-felix | go |
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Faker #:nodoc:
- VERSION = '2.18.0'
+ VERSION = '2.18.1'
end | 1 | # frozen_string_literal: true
module Faker #:nodoc:
VERSION = '2.18.0'
end
| 1 | 10,414 | Can you revert this change? The `VERSION` value will be updated after maintainer determines the version at release. | faker-ruby-faker | rb |
@@ -25,13 +25,13 @@ public interface DefinitionConst {
String nameKey = "name";
- String qulifiedServiceNameKey = serviceDescriptionKey + "." + nameKey;
+ String qualifiedServiceNameKey = serviceDescriptionKey + "." + nameKey;
- String qulifiedServiceVersionKey = serviceDescriptionKey + ".version";
+ Strin... | 1 | /*
* Copyright 2017 Huawei Technologies Co., Ltd
*
* 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 l... | 1 | 6,881 | It could be better if we use the up case letter to specify the constant string name. Such as QUALIFIED_SERVICE_NAME_KEY can let the user know it's a constant string. | apache-servicecomb-java-chassis | java |
@@ -108,8 +108,12 @@ module RSpec
# or the configured failure exit code (1 by default) if specs
# failed.
def run_specs(example_groups)
- @configuration.reporter.report(@world.example_count(example_groups)) do |reporter|
+ examples_count = @world.example_count(example_groups)
+ ... | 1 | module RSpec
module Core
# Provides the main entry point to run a suite of RSpec examples.
class Runner
# @attr_reader
# @private
attr_reader :options, :configuration, :world
# Register an `at_exit` hook that runs the suite when the process exits.
#
# @note This is not gen... | 1 | 16,298 | This should be `@configuration.failure_exit_code`, we don't want to hard code 1. | rspec-rspec-core | rb |
@@ -359,11 +359,10 @@ Blockly.FieldVariable.prototype.onItemSelected = function(menu, menuItem) {
};
/**
- * Whether this field references any Blockly variables. If true it may need to
- * be handled differently during serialization and deserialization. Subclasses
- * may override this.
- * @return {boolean} True... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2012 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | 1 | 9,274 | Changed per review in Blockly. | LLK-scratch-blocks | js |
@@ -968,12 +968,13 @@ func (c *client) bridgeAndUplinkFlows(uplinkOfport uint32, bridgeLocalPort uint3
Cookie(c.cookieAllocator.Request(category).Raw()).
Done(),
// Forward the packet to conntrackTable if it enters the OVS pipeline from the bridge interface and is sent to
- // local Pods.
+ // local Pods. ... | 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 | 20,979 | Hi @wenyingd . so what's the original dst MAC of the reply packet from kube-proxy? | antrea-io-antrea | go |
@@ -402,6 +402,15 @@ class MisdesignChecker(BaseChecker):
"statement (see R0916).",
},
),
+ (
+ "exclude-too-few-public-methods",
+ {
+ "default": (),
+ "type": "csv",
+ "metavar": "<comma separated list of ... | 1 | # Copyright (c) 2006, 2009-2010, 2012-2015 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2012, 2014 Google, Inc.
# Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Arun Persaud <arun@nubati.net>
# Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro>
# Copyri... | 1 | 16,924 | Note: I wasn't sure what the right wording would be for this, so I used existing language from elsewhere in the codebase. | PyCQA-pylint | py |
@@ -113,3 +113,13 @@ class Config(object):
# grab config_file default from molecule if it's not set in the user-supplied ansible options
if 'config_file' not in self.config['ansible']:
self.config['ansible']['config_file'] = self.config['molecule']['config_file']
+
+ def populate_insta... | 1 | # Copyright (c) 2015 Cisco Systems
#
# 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, publish, ... | 1 | 5,729 | Docstring for `platform`. | ansible-community-molecule | py |
@@ -85,7 +85,9 @@ func Main() {
if err != nil {
fmt.Fprintf(os.Stderr, "%s: %v\n", subcommand.Name, err)
}
-
+ if err := cleanup(); err != nil {
+ fmt.Fprintf(os.Stderr, "error restoring console to functional state: %v\n", err)
+ }
os.Exit(exitCode)
}
| 1 | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | 1 | 16,960 | This should be called before any `os.Exit` otherwise it could still mess up things. | caddyserver-caddy | go |
@@ -7,16 +7,16 @@ package MyGame.Example;
*/
public final class Color {
private Color() { }
- public static final byte Red = 1;
+ public static final int Red = 1;
/**
* \brief color Green
* Green is bit_flag with value (1u << 1)
*/
- public static final byte Green = 2;
+ public static final int... | 1 | // automatically generated by the FlatBuffers compiler, do not modify
package MyGame.Example;
/**
* Composite components of Monster color.
*/
public final class Color {
private Color() { }
public static final byte Red = 1;
/**
* \brief color Green
* Green is bit_flag with value (1u << 1)
*/
public ... | 1 | 20,269 | shouldn't this be `short` ? | google-flatbuffers | java |
@@ -63,15 +63,15 @@ func (c *CmdVolumeOptions) RunVolumesList(cmd *cobra.Command) error {
}
out := make([]string, len(cvols.Items)+2)
- out[0] = "Namespace|Name|Status|Type"
- out[1] = "---------|----|------|----"
+ out[0] = "Namespace|Name|Status|Type|Capacity"
+ out[1] = "---------|----|------|----|--------"
... | 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 | 10,043 | Can you please paste the output of `volume list` command which will show capacity of a openebs volume. | openebs-maya | go |
@@ -83,10 +83,15 @@ public class MetricRegistry implements MetricSet {
* @param metric the metric
* @param <T> the type of the metric
* @return {@code metric}
- * @throws IllegalArgumentException if the name is already registered
+ * @throws IllegalArgumentException if the name is already r... | 1 | package com.codahale.metrics;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util... | 1 | 7,295 | I'd make this a `throw new NullPointerException("metric == null");` instead | dropwizard-metrics | java |
@@ -27,6 +27,7 @@ extern "C" {
#include "ScriptingEnvironment.h"
#include "../typedefs.h"
#include "../Util/OpenMPWrapper.h"
+#include "../Util/LuaUtil.h"
ScriptingEnvironment::ScriptingEnvironment() {}
ScriptingEnvironment::ScriptingEnvironment(const char * fileName) { | 1 | /*
open source routing machine
Copyright (C) Dennis Luxen, others 2010
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU AFFERO General Public License as published by
the Free Software Foundation; either version 3 of the License, or
any later version.
This progr... | 1 | 12,295 | Include should be order lexicographically. | Project-OSRM-osrm-backend | cpp |
@@ -538,7 +538,7 @@ public class OAuthWebviewHelper implements KeyChainAliasCallback {
final PasscodeManager passcodeManager = mgr.getPasscodeManager();
passcodeManager.storeMobilePolicyForOrg(account, id.screenLockTimeout * 1000 * 60, id.pinLength);
passcodeManager.se... | 1 | /*
* Copyright (c) 2011-present, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright noti... | 1 | 15,953 | We need to pass in the Activity context here, so that LoginActivity is used, and so that LoginActivity can get onActivityResult from the PasscodeActivity. Without this, the application context is used, and we don't get a callback when the passcode is done. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -39,4 +39,10 @@ class Tracepoint < ActiveRecord::Base
el1 << (XML::Node.new("time") << timestamp.xmlschema) if print_timestamp
el1
end
+
+ # Return points of trackable traces in original order
+ scope :trackable_ordered, -> { joins(:trace).where(:gpx_files => { :visibility => %w[trackable identifiable... | 1 | # == Schema Information
#
# Table name: gps_points
#
# altitude :float
# trackid :integer not null
# latitude :integer not null
# longitude :integer not null
# gpx_id :integer not null
# timestamp :datetime
# tile :integer
#
# Indexes
#
# points_gpxid_idx (gpx_id... | 1 | 11,717 | Can you move these to the top please, for consistency with other models - normally we put scopes immediately after the associations at the top of the model. As to names I agree with @gravitystorm that these names may be confusing but I'm not sure the ones I suggested are perfect either so I'm not really sure what's bes... | openstreetmap-openstreetmap-website | rb |
@@ -1117,7 +1117,10 @@ public class PlaybackService extends MediaBrowserServiceCompat {
// only mark the item as played if we're not keeping it anyways
DBWriter.markItemPlayed(item, FeedItem.PLAYED, ended);
// don't know if it actually matters to not autodownload when ... | 1 | package de.danoeh.antennapod.core.service.playback;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.app.UiModeManager;
import android.bluetooth.BluetoothA2dp;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import andr... | 1 | 20,667 | Looks like the episode should also not be deleted when repeating | AntennaPod-AntennaPod | java |
@@ -13,6 +13,7 @@ package proxy
import (
"crypto/tls"
+ "github.com/mholt/caddy/caddyhttp/httpserver"
"io"
"net"
"net/http" | 1 | // This file is adapted from code in the net/http/httputil
// package of the Go standard library, which is by the
// Go Authors, and bears this copyright and license info:
//
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found i... | 1 | 8,742 | I feel like goimports would move this import line by the other non-std packages... can you double-check that? Run goimports or set up your editor to run it on save. :+1: | caddyserver-caddy | go |
@@ -60,6 +60,19 @@ module Selenium
class << self
def chrome(opts = {})
+ define_method(:options) { @capabilities[:chrome_options] ||= {} }
+ define_method("options=") { |value| @capabilities[:chrome_options] = value }
+ define_method("profile=") do |profile|
+ ... | 1 | # encoding: utf-8
#
# 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
# "Li... | 1 | 14,241 | `options['binary'] = WebDriver::Chrome.path` if set? | SeleniumHQ-selenium | java |
@@ -134,6 +134,9 @@ var (
DB: DB{
UseBadgerDB: false,
NumRetries: 3,
+ SQLITE3: SQLITE3{
+ SQLite3File: "./explorer.db",
+ },
},
}
| 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 14,107 | File is not `goimports`-ed (from `goimports`) | iotexproject-iotex-core | go |
@@ -19,13 +19,18 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core
/// </summary>
public class ListenOptions : IEndPointInformation, IConnectionBuilder
{
+ internal const string Http2ExperimentSwitch = "Switch.Microsoft.AspNetCore.Server.Kestrel.Experimental.Http2";
+
private FileHand... | 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.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Protocols... | 1 | 14,623 | Nit: Supported -> Enabled. | aspnet-KestrelHttpServer | .cs |
@@ -128,7 +128,7 @@ class ImportTest(QuiltTestCase):
# Modify an existing dataframe
csv = package1.dataframes2.csv._data()
- csv.set_value(0, 'Int0', 42)
+ csv.at[0, 'Int0'] = 42
# Add a new dataframe
df = pd.DataFrame(dict(a=[1, 2, 3])) | 1 | """
Tests for magic imports.
"""
import os
import pandas as pd
from six import string_types
from quilt.data import GroupNode, DataNode
from quilt.tools import command
from quilt.tools.const import PACKAGE_DIR_NAME
from quilt.tools.package import PackageException
from .utils import QuiltTestCase
class ImportTest(Qui... | 1 | 15,263 | Yay! I was too lazy to fix this. | quiltdata-quilt | py |
@@ -28,8 +28,7 @@ import (
apis "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1"
clientset "github.com/openebs/maya/pkg/client/generated/clientset/versioned"
"github.com/openebs/maya/pkg/debug"
- merrors "github.com/openebs/maya/pkg/errors/v1alpha1"
- pkg_errors "github.com/pkg/errors"
+ errors "github.com/... | 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, sof... | 1 | 17,663 | other declaration of errors (from `typecheck`) | openebs-maya | go |
@@ -13,12 +13,15 @@ import (
)
var (
- errValueEmpty = errors.New("value must not be empty")
- errValueTooLong = errors.New("value must not exceed 255 characters")
- errValueBadFormat = errors.New("value must start with a letter and contain only lower-case letters, numbers, and hyphens")
- errValueNotAStri... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"regexp"
"strings"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/manifest"
)
var (
errValueEmpty = errors.New("value must not be empty")
errValueTooLong ... | 1 | 11,019 | nit: error starts with capital letter | aws-copilot-cli | go |
@@ -1616,16 +1616,7 @@ public class ImapStore extends Store {
ImapList flags = fetchList.getKeyedList("FLAGS");
if (flags != null) {
for (int i = 0, count = flags.size(); i < count; i++) {
- String flag = flags.getString(i);
- ... | 1 |
package com.fsck.k9.mail.store;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.... | 1 | 11,743 | the original code ignores \Draft and \Recent, whereas your change will not. what this matters, i'm not sure. | k9mail-k-9 | java |
@@ -381,6 +381,8 @@ func TestQuotaReclamationDeletedBlocks(t *testing.T) {
}
// Stall the puts that comes as part of the sync call.
+ oldBServer := config2.BlockServer()
+ defer config2.SetBlockServer(oldBServer)
onWriteStalledCh, writeUnstallCh, ctxStall := StallBlockOp(
ctx, config2, StallableBlockPut)
| 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"
"reflect"
"testing"
"time"
"github.com/keybase/client/go/libkb"
"golang.org/x/net/context"
)
func totalBlockRefs(m map[BlockID]... | 1 | 13,076 | Why was this necessary? | keybase-kbfs | go |
@@ -111,6 +111,7 @@ var opts struct {
Test struct {
FailingTestsOk bool `long:"failing_tests_ok" hidden:"true" description:"Exit with status 0 even if tests fail (nonzero only if catastrophe happens)"`
NumRuns int `long:"num_runs" short:"n" default:"1" description:"Number of times to r... | 1 | package main
import (
"context"
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"path"
"runtime/pprof"
"strings"
"sync"
"syscall"
"github.com/jessevdk/go-flags"
"gopkg.in/op/go-logging.v1"
"github.com/thought-machine/please/src/build"
"github.com/thought-machine/please/src/cache"
"github.com/thought-machine/... | 1 | 9,091 | Can you also do this for Cover? | thought-machine-please | go |
@@ -4978,6 +4978,16 @@ bool CoreChecks::ValidateImageSubresourceRange(const uint32_t image_mip_count, c
}
}
+ if (subresourceRange.aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) {
+ if (subresourceRange.aspectMask &
+ (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT | VK_IMAGE_AS... | 1 | /* Copyright (c) 2015-2021 The Khronos Group Inc.
* Copyright (c) 2015-2021 Valve Corporation
* Copyright (c) 2015-2021 LunarG, Inc.
* Copyright (C) 2015-2021 Google Inc.
* Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (t... | 1 | 18,833 | So I tried adding this VU a long time ago, thought it would be this simple of a check, but turns out there were other validation in the way for getting here in `ValidateImageAspectMask` I assume that is what is failing CI here, realized it would require some more refactoring | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -0,0 +1,6 @@
+class Arel::Table
+ def coalesce_and_sum(column, value)
+ coalesce_result = Arel::Nodes::NamedFunction.new('COALESCE', [self[column], value])
+ Arel::Nodes::NamedFunction.new('SUM', [coalesce_result], column.to_s)
+ end
+end | 1 | 1 | 7,133 | This method is not needed for postgresql, by default sum function omits null values so we can remove this file | blackducksoftware-ohloh-ui | rb | |
@@ -378,7 +378,10 @@ dnl We have separate checks for libsystemd and the unit dir for historical reaso
PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd], [have_libsystemd=yes], [have_libsystemd=no])
AM_CONDITIONAL(BUILDOPT_LIBSYSTEMD, test x$have_libsystemd = xyes)
AM_COND_IF(BUILDOPT_LIBSYSTEMD,
- AC_DEFINE([HA... | 1 | AC_PREREQ([2.63])
dnl If incrementing the version here, remember to update libostree.sym too
m4_define([year_version], [2017])
m4_define([release_version], [5])
m4_define([package_version], [year_version.release_version])
AC_INIT([libostree], [package_version], [walters@verbum.org])
AC_CONFIG_HEADER([config.h])
AC_CON... | 1 | 10,566 | Can you provide a `--with-systemdsystemgeneratordir` option here? So that I can do unprivileged installs without completely turning off systemd. I can add it as a follow-up PR too. | ostreedev-ostree | c |
@@ -396,11 +396,10 @@ class CLAModel(Model):
inferences = self._multiStepCompute(rawInput=inputRecord)
# For temporal classification. Not used, and might not work anymore
elif self._isClassificationModel():
- inferences = self._classificationCompute()
-
- results.inferences.update(inferences)
-... | 1 | # ----------------------------------------------------------------------
# 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 apply:
#
# This progra... | 1 | 17,112 | `classification` is misspelled | numenta-nupic | py |
@@ -152,7 +152,7 @@ public class SampleTransformer {
// to
// use is the first one on the list, since we set it in the overload of generateSamples.
if (methodSampleViews.size() > 0) {
- methodViewBuilder.initCode(methodSampleViews.get(0).initCode());
+ methodViewBuilder.initCode(methodSampleVie... | 1 | /* Copyright 2018 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,962 | Can you change this to `sampleInitCode`? | googleapis-gapic-generator | java |
@@ -823,6 +823,7 @@ public class TiDAGRequest implements Serializable {
sb.append(", Limit: ");
sb.append("[").append(limit).append("]");
}
+ sb.append(", startTs: ").append(startTs.getVersion());
return sb.toString();
}
| 1 | /*
* Copyright 2017 PingCAP, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | 1 | 9,631 | I added a startTs information in `TiDagRequest` output. Not really sure if it is useful? @zhexuany | pingcap-tispark | java |
@@ -27,7 +27,12 @@ function collectResultsFromFrames(
frames.forEach(frame => {
const tabindex = parseInt(frame.node.getAttribute('tabindex'), 10);
const focusable = isNaN(tabindex) || tabindex >= 0;
+
const rect = frame.node.getBoundingClientRect();
+ let width = parseInt(frame.node.getAttribute('... | 1 | import queue from './queue';
import sendCommandToFrame from './send-command-to-frame';
import mergeResults from './merge-results';
import getSelector from './get-selector';
/**
* Sends a message to axe running in frames to start analysis and collate results (via `mergeResults`)
* @private
* @param {Context} paren... | 1 | 16,303 | This prevents margin/border/padding CSS from affecting the width/height (otherwise in Chrome a width and height of 1 would result in a rect size of 5x5). | dequelabs-axe-core | js |
@@ -22,10 +22,11 @@ class PublicPagesController < ApplicationController
@template = Template.live(params[:id])
# covers authorization for this action.
# Pundit dosent support passing objects into scoped policies
+ skip_authorization
unless PublicPagePolicy.new(@template).template_export?
- r... | 1 | # frozen_string_literal: true
class PublicPagesController < ApplicationController
after_action :verify_authorized, except: [:template_index, :plan_index]
# GET template_index
# -----------------------------------------------------
def template_index
templates = Template.live(Template.families(Org.funder.... | 1 | 18,299 | prefer to just add this to the `verify_authorized` exception list above since we're already making exceptions. | DMPRoadmap-roadmap | rb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.