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 |
|---|---|---|---|---|---|---|---|
@@ -0,0 +1,19 @@
+import { always } from 'ramda';
+
+/**
+ * A function that returns empty string.
+ *
+ * @func stubString
+ * @memberOf RA
+ * @since {@link https://char0n.github.io/ramda-adjunct/2.1.0|v2.1.0}
+ * @category Function
+ * @sig ... -> ''
+ * @return {''}
+ * @example
+ *
+ * RA.stubString(); //=> ''
+ *... | 1 | 1 | 4,976 | Hindley-Milner signatures don't use literal types. They explusively use types. It's deal with that | char0n-ramda-adjunct | js | |
@@ -61,3 +61,11 @@ type Priority struct {
PolicyPriority float64
RulePriority int32
}
+
+// OFPolicyRule groups all configurations that the openflow module needs to install flow for PolicyRule.
+type OFPolicyRule struct {
+ OfID uint32
+ OfRule *PolicyRule
+ NpName string
+ NpNamespace string
+} | 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 | 19,781 | Could we just extend PolicyRule with more fields? It was originally designed as the struct required by openflow client, nested structs seem not helping. And for the name of the fields, initialism should be uppercase, OFID and NPName doesn't look good, then maybe FlowID, PolicyName.. | antrea-io-antrea | go |
@@ -485,9 +485,13 @@ class Functions
// bcmath
'bcscale',
-
+
// json
'json_last_error',
+
+ // opcache
+ 'opcache_compile_file', 'opcache_get_configuration', 'opcache_get_status',
+ 'opcache_invalidate', 'opcache_is_scri... | 1 | <?php
namespace Psalm\Internal\Codebase;
use function array_shift;
use function explode;
use function implode;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Internal\Provider\FileStorageProvider;
use Psalm\Internal\Provider\FunctionExistenceProvider;
use Psalm\Internal\Provider\Function... | 1 | 10,413 | I really dislike this alignment approach, as it makes identifying individual functions quite hard, but I kept consistent with the previous style. Since no sorting was evident, I pushed it to the end of the block. Meanwhile, is this supposed to be tested or meaningfully testable somehow? | vimeo-psalm | php |
@@ -127,6 +127,10 @@ class StepDelegatingExecutor(Executor):
running_steps[step.key] = step
last_check_step_health_time = pendulum.now("UTC")
+
+ # Order of events is important here. During an interation, we call handle_event, then get_steps_to_execute,
+ # then... | 1 | import time
from typing import Dict, List, Optional, cast
import pendulum
from dagster import check
from dagster.core.events import DagsterEvent, EngineEventData, EventMetadataEntry, log_step_event
from dagster.core.execution.context.system import PlanOrchestrationContext
from dagster.core.execution.plan.plan import E... | 1 | 16,961 | Could also consider modifying the ActiveExecution... | dagster-io-dagster | py |
@@ -1522,3 +1522,19 @@ def get_iterating_dictionary_name(
return node.iter.as_string()
return None
+
+
+def get_subscript_const_value(node: astroid.Subscript) -> astroid.Const:
+ """
+ Returns the value (subscript.slice) of a Subscript node,
+ also supports python <3.9 windows where node.slice ... | 1 | # Copyright (c) 2006-2007, 2009-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2009 Mads Kiilerich <mads@kiilerich.com>
# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>
# Copyright (c) 2012-2014 Google, Inc.
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2013-202... | 1 | 13,882 | Does it make sense to change that to a custom error instead of `ValueError`? | PyCQA-pylint | py |
@@ -259,7 +259,7 @@ func (vm *VM) ApplyTipSetMessages(blocks []interpreter.BlockMessagesInfo, head b
// Pay block reward.
// Dragons: missing final protocol design on if/how to determine the nominal power
- rewardMessage := makeBlockRewardMessage(blk.Miner, minerPenaltyTotal, minerGasRewardTotal, blk.TicketCou... | 1 | package vmcontext
import (
"context"
"fmt"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/specs-actors/actors/builtin/... | 1 | 23,565 | I guess this will need to change soon. | filecoin-project-venus | go |
@@ -37,10 +37,9 @@ import (
// The header directive goes second so that headers
// can be manipulated before doing redirects.
var directiveOrder = []string{
+ "map",
"root",
-
"header",
-
"redir",
"rewrite",
| 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 | 14,601 | Restore this spacing - not sure why it has to be removed? | caddyserver-caddy | go |
@@ -16,7 +16,10 @@
// clang-format off
// Dont't remove `format off`, it prevent reordering of win-includes.
-#define _POSIX_C_SOURCE 200112L // For stat from stat/stat.h and fseeko() (POSIX extensions).
+
+# define _XOPEN_SOURCE 700L
+# define _POSIX_C_SOURCE 200809L
+
#ifdef _WIN32
# ifndef WIN32_LEAN_AND_ME... | 1 | /*
* Copyright 2016 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 | 17,862 | These defines cause issues in base.h leading to failing android builds. Locale independency is now set in multiple spots, in cmake and in base.h. The base.h uses feature test macros wrong. Feature test macros can be used to indicate that a feature should be made available. They do not guarantee that it is available. On... | google-flatbuffers | java |
@@ -504,7 +504,7 @@ SubPlan GoPlanner::mToNStepsPlan(SubPlan& startVidPlan) {
}
const auto& projectInput =
- (joinInput || joinDst) ? loopBody->outputVar() : sampleLimit->outputVar();
+ (loopBody != getDst) ? loopBody->outputVar() : sampleLimit->outputVar();
loopBody = Project::make(qctx, loopBody,... | 1 | /* Copyright (c) 2021 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 "graph/planner/ngql/GoPlanner.h"
#include "graph/planner/plan/Logic.h"
#include "graph/util/ExpressionUtils.h"... | 1 | 31,574 | Why not delete these codes? | vesoft-inc-nebula | cpp |
@@ -112,7 +112,7 @@ bool StorageServer::start() {
metaClient_ = std::make_unique<meta::MetaClient>(ioThreadPool_,
metaAddrs_,
options);
- if (!metaClient_->waitForMetadReady()) {
+ if (!metaClient_->wa... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "storage/StorageServer.h"
#include "network/NetworkUtils.h"
#include "storage/StorageFlags.h"
#include "storage... | 1 | 29,980 | If pull message failed after some reties, we should ensure the storaged exit, otherwise it has risk to loss data. | vesoft-inc-nebula | cpp |
@@ -7,7 +7,7 @@
import pytest
import random
import datatable as dt
-from datatable import f, stype, ltype
+from datatable import f, stype, ltype, first, count
from tests import list_equals
| 1 | #!/usr/bin/env python
# © H2O.ai 2018; -*- encoding: utf-8 -*-
# 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/.
#---------------------------------------------------... | 1 | 11,057 | looks like you don't need to import first and count here anymore | h2oai-datatable | py |
@@ -2511,6 +2511,18 @@ func (e *historyEngineImpl) NotifyNewTransferTasks(
}
}
+func (e *historyEngineImpl) NotifyNewVisibilityTasks(
+ tasks []persistence.Task,
+) {
+
+ if len(tasks) > 0 {
+ // TODO (alex): add visibility processor
+ // task := tasks[0]
+ // clusterName := e.clusterMetadata.ClusterNameForFail... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 10,845 | FYI, visibility task processing is local only, meaning pushing something to local ES cluster / local archival endpoint | temporalio-temporal | go |
@@ -36,6 +36,8 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
+import com.netflix.config.DynamicPropertyFactory;
+
public class SpringmvcClient {
private static RestTemplate templateUrlWithServiceName = new CseRe... | 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 | 9,838 | This import can be removed. | apache-servicecomb-java-chassis | java |
@@ -48,6 +48,10 @@ func ParseResource(s string, resParser ResourceParser) (resARN Resource, err err
return nil, InvalidARNError{ARN: a, Reason: "service is not supported"}
}
+ if strings.HasPrefix(a.Region, "fips-") || strings.HasSuffix(a.Region, "-fips") {
+ return nil, InvalidARNError{ARN: a, Reason: "FIPS re... | 1 | package arn
import (
"fmt"
"strings"
"github.com/aws/aws-sdk-go/aws/arn"
)
var supportedServiceARN = []string{
"s3",
"s3-outposts",
"s3-object-lambda",
}
func isSupportedServiceARN(service string) bool {
for _, name := range supportedServiceARN {
if name == service {
return true
}
}
return false
}
... | 1 | 10,340 | 1. Nit: We can have a general helper to identify if a region is pseudo region. We might already have one somewhere. 2. Does any type of ARN support FIPS? If not, we may just move this check in arn package? | aws-aws-sdk-go | go |
@@ -8,10 +8,14 @@ name of the service that is used by Boto 3.
This factory is used by the make_stubber fixture found in the set of common fixtures.
"""
-from test_tools.s3_stubber import S3Stubber
from test_tools.dynamodb_stubber import DynamoStubber
+from test_tools.iam_stubber import IamStubber
+from test_tools.... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
A factory function that returns the stubber for an AWS service, based on the
name of the service that is used by Boto 3.
This factory is used by the make_stubber fixture found in the set of common fixtures.
... | 1 | 17,033 | is this phrase completed in a next line? Or forgot to add... what? | awsdocs-aws-doc-sdk-examples | rb |
@@ -0,0 +1,11 @@
+_base_ = [
+ '../_base_/models/mask_rcnn_r50_fpn.py',
+ '../_base_/datasets/deepfashion.py', '../_base_/schedules/schedule_1x.py',
+ '../_base_/default_runtime.py'
+]
+model = dict(
+ roi_head=dict(
+ bbox_head=dict(num_classes=15), mask_head=dict(num_classes=15)))
+# runtime settin... | 1 | 1 | 19,981 | `('train', 5)` and `('train', 1)` are actually the same. | open-mmlab-mmdetection | py | |
@@ -205,8 +205,8 @@ func (bt *backpressureTracker) beforeDiskBlockCachePut(blockResources int64) (
return availableResources
}
-func (bt *backpressureTracker) getLimitInfo() (used int64, limit int64) {
- return bt.used, bt.limit
+func (bt *backpressureTracker) getLimitInfo() (used int64, limit float64) {
+ return ... | 1 | // Copyright 2017 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"math"
"sync"
"time"
"github.com/keybase/client/go/logger"
"github.com/keybase/kbfs/kbfssync"
"github.com/pkg/errors"
"golang.or... | 1 | 16,812 | Would it be too complicated to refactor `currLimit` to be an `int64`? | keybase-kbfs | go |
@@ -23,6 +23,13 @@ module RSpec
def assertions
@assertions ||= 0
end
+
+ RSPEC_SKIP_IMPLEMENTATION = ::RSpec::Core::Pending.instance_method(:skip)
+ # Minitest::Assertions has it's own `skip`, we need to make sure
+ # RSpec::Core::Pending#skip is used instead.
+ def skip(*args... | 1 | begin
# Only the minitest 5.x gem includes the minitest.rb and assertions.rb files.
require 'minitest'
require 'minitest/assertions'
rescue LoadError
# We must be using Ruby Core's MiniTest or the Minitest gem 4.x.
require 'minitest/unit'
Minitest = MiniTest
end
module RSpec
module Core
# @private
... | 1 | 14,439 | Would it be more performant to just `include ::RSpec::Core::Pending` here? /cc @myronmarston | rspec-rspec-core | rb |
@@ -92,6 +92,10 @@ type IoChaosSpec struct {
// IoChaosStatus defines the observed state of IoChaos
type IoChaosStatus struct {
ChaosStatus `json:",inline"`
+
+ // Instances always specifies podnetworkchaos generation or empty
+ // +optional
+ Instances map[string]int64 `json:"instances,omitempty"`
}
func (obj ... | 1 | // Copyright 2019 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 21,820 | Should be podiochaos? | chaos-mesh-chaos-mesh | go |
@@ -35,6 +35,10 @@ import api
import guiHelper
import winVersion
+# Temporary: #8599: add cp65001 codec
+# #7105: upgrading to python 3 should fix this issue. See https://bugs.python.org/issue13216
+codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None)
+
try:
import updat... | 1 | # -*- coding: UTF-8 -*-
#gui/__init__.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee, Thomas Stivers, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
i... | 1 | 22,983 | Is the `codecs.register(lambda name: None)` gracefully handled by codecs? The lambda is expected to return a tuple of functions (encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object), according to the docs. I've only checked python's built-in help, though. | nvaccess-nvda | py |
@@ -154,6 +154,18 @@ namespace OpenTelemetry.Metrics
{
var metricStreamConfig = metricStreamConfigs[i];
var metricStreamName = metricStreamConfig?.Name ?? instrument.Name;
+
+ if (!MeterProviderBuilderSdk.IsVal... | 1 | // <copyright file="MeterProviderSdk.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.apach... | 1 | 21,999 | in this case, it could be either instrument name or the view name, which could be invalid. might be better if we can offer very specific message. (not blocking this, we can add this as a follow up,if needed) | open-telemetry-opentelemetry-dotnet | .cs |
@@ -1654,9 +1654,10 @@ class TargetLocator {
* when the driver has changed focus to the specified window.
*/
window(nameOrHandle) {
+ let paramName = this.driver_.getExecutor().w3c ? 'handle' : 'name';
return this.driver_.schedule(
new command.Command(command.Name.SWITCH_TO_WINDOW).
- ... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 13,590 | I'd rather just send the parameter twice than break encapsulation here. There's already precedence with webelement IDs | SeleniumHQ-selenium | py |
@@ -0,0 +1,5 @@
+_base_ = '../cascade_rcnn/cascade_mask_rcnn_r50_fpn_20e_coco.py'
+model = dict(
+ pretrained= # NOQA
+ 'https://shanghuagao.oss-cn-beijing.aliyuncs.com/res2net/res2net101_v1b_26w_4s_mmdetv2-f0a600f9.pth', # NOQA
+ backbone=dict(type='Res2Net', depth=101, scale=4, base_width=26)) | 1 | 1 | 18,747 | You may put 'open-mmlab://res2net101_v1d_26w_4s' here. MMCV will be updated later. | open-mmlab-mmdetection | py | |
@@ -17,3 +17,12 @@
*/
export const STORE_NAME = 'modules/pagespeed-insights';
+
+// Form ID for PageSpeed widget.
+export const FORM_DASH_WIDGET = 'pagespeedWidget';
+// Report strategies.
+export const STRATEGY_MOBILE = 'mobile';
+export const STRATEGY_DESKTOP = 'desktop';
+// Report data sources.
+export const D... | 1 | /**
* PageSpeed Insights Constants.
*
* 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/LICENSE-... | 1 | 29,336 | May be worth making this more specific, to avoid potential conflicts, maybe `pagespeedDashboardWidget`? Or `webVitalsDashboardWidget`? | google-site-kit-wp | js |
@@ -151,7 +151,7 @@ module.exports = class AwsS3Multipart extends Plugin {
const onError = (err) => {
this.uppy.log(err)
this.uppy.emit('upload-error', file, err)
- err.message = `Failed because: ${err.message}`
+ err.message = `${err.message}`
queuedRequest.done()
... | 1 | const { Plugin } = require('@uppy/core')
const { Socket, Provider, RequestClient } = require('@uppy/companion-client')
const EventTracker = require('@uppy/utils/lib/EventTracker')
const emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress')
const getSocketHost = require('@uppy/utils/lib/getSocketHost')
cons... | 1 | 12,860 | I guess this assignment is now redundant? | transloadit-uppy | js |
@@ -218,7 +218,9 @@ func (s *Server) handleSingleRPC(ctx context.Context, req *RPCReq) *RPCRes {
return backendRes
}
- backendRes, err = s.backendGroups[group].Forward(ctx, req)
+ // NOTE: We call into the specific backend here to ensure that the RPCRes is synchronized with the blockNum.
+ var blockNum uint64
+ ... | 1 | package proxyd
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"math"
"net/http"
"strconv"
"strings"
"time"
"github.com/ethereum/go-ethereum/log"
"github.com/gorilla/mux"
"github.com/gorilla/websocket"
"github.com/prometheus/client_golang/prometheus"
"github.com/rs/cors"
)
const (
... | 1 | 21,654 | See above note re: blockNum synchronization. | ethereum-optimism-optimism | go |
@@ -10,8 +10,10 @@ import (
"time"
"github.com/andres-erbsen/clock"
+ "github.com/cenkalti/backoff/v3"
observer "github.com/imkira/go-observer"
"github.com/spiffe/spire/pkg/agent/client"
+ spire_backoff "github.com/spiffe/spire/pkg/agent/common/backoff"
"github.com/spiffe/spire/pkg/agent/manager/cache"
"g... | 1 | package manager
import (
"context"
"crypto/ecdsa"
"crypto/x509"
"errors"
"fmt"
"sync"
"time"
"github.com/andres-erbsen/clock"
observer "github.com/imkira/go-observer"
"github.com/spiffe/spire/pkg/agent/client"
"github.com/spiffe/spire/pkg/agent/manager/cache"
"github.com/spiffe/spire/pkg/agent/svid"
"git... | 1 | 12,390 | wonder if we could avoid doing named imports if we type aliased `backoff.Backoff` in the `.../agent/common/backoff` package? | spiffe-spire | go |
@@ -44,7 +44,6 @@
#include "disassemble.h"
#include "instr.h"
#include "instr_create.h"
-
#include "codec.h"
| 1 | /* **********************************************************
* Copyright (c) 2017 Google, Inc. All rights reserved.
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modif... | 1 | 13,354 | Or maybe put into alphabetical order with the other #includes. | DynamoRIO-dynamorio | c |
@@ -235,8 +235,11 @@ func watchConfigFile(filename, adapterName string) {
return false
}
+ ticker := time.NewTicker(1 * time.Second)
+ defer ticker.Stop()
+
// begin poller
- for range time.Tick(1 * time.Second) {
+ for range ticker.C {
// get the file info
info, err := os.Stat(filename)
if err != nil... | 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 | 15,737 | This runs the entire duration of the program; this change is not needed. | caddyserver-caddy | go |
@@ -20,6 +20,10 @@ export class TouchScroll extends BasePlugin {
return PLUGIN_PRIORITY;
}
+ static get ALWAYS_UPDATE() {
+ return true;
+ }
+
constructor(hotInstance) {
super(hotInstance);
| 1 | import { addClass, removeClass } from '../../helpers/dom/element';
import { arrayEach } from '../../helpers/array';
import { BasePlugin } from '../base';
import { isTouchSupported } from '../../helpers/feature';
export const PLUGIN_KEY = 'touchScroll';
export const PLUGIN_PRIORITY = 200;
/**
* @private
* @plugin To... | 1 | 20,747 | I don't feel well about the `ALWAYS_UPDATE` option sounds like a workaround. I can imagine that some of the plugins want to observe all options. Maybe, in that case, we can reuse the `CONFIG_KEYS` that would return an empty array for observing all settings and `false` for disabling observing at all? I just thi... | handsontable-handsontable | js |
@@ -34,6 +34,11 @@
* by asynch interrupt.
*/
+/* clang-format off */
+/* XXX: clang-format incorrectly detected a tab difference at "clang-format on"
+ * below. This is why "clang-format off" has been moved outside the ifdef until
+ * bug is fixed.
+ */
#ifndef ASM_CODE_ONLY /* C code */
# include "configure... | 1 | /* **********************************************************
* Copyright (c) 2015-2018 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... | 1 | 15,302 | A "tab difference"? As in, there are tab characters somewhere? This disabling of clang-format for all the code here seems like overkill. Are you sure there's not some other solution? I don't really understand the problem though. Do you mean clang-format-diff? | DynamoRIO-dynamorio | c |
@@ -31,12 +31,7 @@ import org.openqa.selenium.grid.sessionmap.SessionMap;
import org.openqa.selenium.grid.sessionmap.local.LocalSessionMap;
import org.openqa.selenium.netty.server.NettyServer;
import org.openqa.selenium.remote.SessionId;
-import org.openqa.selenium.remote.http.HttpClient;
-import org.openqa.selenium... | 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,921 | Could you please leave the explicit imports? | SeleniumHQ-selenium | js |
@@ -265,6 +265,9 @@ public abstract class GapicInterfaceConfig implements InterfaceConfig {
}
List<T> methodConfigs = new ArrayList<>();
for (MethodConfigProto methodConfigProto : interfaceConfigProto.getMethodsList()) {
+ if (methodConfigMap.get(methodConfigProto.getName()) == null) {
+ cont... | 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 | 28,835 | Can we check for containsKey here? | googleapis-gapic-generator | java |
@@ -35,9 +35,14 @@ import (
"golang.org/x/tools/go/types/typeutil"
)
+const usage = "usage: wire [gen] [PKG] | wire show [...] | wire check [...]"
+
func main() {
var err error
switch {
+ case len(os.Args) == 2 && (os.Args[1] == "help" || os.Args[1] == "-h" || os.Args[1] == "-help" || os.Args[1] == "--help"):... | 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 | 10,527 | Exit successfully. We served the help the user wanted. | google-go-cloud | go |
@@ -15,13 +15,13 @@ import (
// RepoRoot is the root of the Please repository
var RepoRoot string
-// initialWorkingDir is the directory we began in. Early on we chdir() to the repo root but for
+// InitialWorkingDir is the directory we began in. Early on we chdir() to the repo root but for
// some things we need ... | 1 | package core
import (
"bytes"
"crypto/sha1"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"github.com/thought-machine/please/src/fs"
)
// RepoRoot is the root of the Please repository
var RepoRoot string
// initialWorkingDir is the directory we began in. Early on we chdir() to the repo root but for
// some th... | 1 | 10,123 | Had to rename this because `InitialPackage()` already existed. | thought-machine-please | go |
@@ -19,4 +19,15 @@ module IntegrationSpecHelper
}
)
end
+
+ def with_18f_procurement_env_variables(setup_vars=nil)
+ old_approver_email = ENV['GSA18F_APPROVER_EMAIL']
+ old_purchaser_email = ENV['GSA18F_PURCHASER_EMAIL']
+
+ ENV['GSA18F_APPROVER_EMAIL'] = 'test_approver@some-dot-gov.gov'
+ E... | 1 | module IntegrationSpecHelper
def setup_mock_auth(service_name=:myusa, user=FactoryGirl.create(:user))
OmniAuth.config.mock_auth[service_name] = OmniAuth::AuthHash.new(
provider: service_name.to_s,
raw_info: {
'name' => "George Jetson"
},
uid: '12345',
nickname: 'georgejetsonm... | 1 | 13,225 | Can we put this in a different helper? | 18F-C2 | rb |
@@ -603,6 +603,9 @@ insert_push_all_registers(dcontext_t *dcontext, clean_call_info_t *cci,
DR_REG_LIST_LENGTH_ARM, DR_REG_LIST_ARM));
}
dstack_offs += 15 * XSP_SZ;
+
+ /* Make dstack_offs 8-byte algined, as we only accounted for 31 4-byte slots */
+ dstack_offs += XSP... | 1 | /* **********************************************************
* Copyright (c) 2014-2017 Google, Inc. All rights reserved.
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* ... | 1 | 12,783 | I'm not sure where your 31 comes from? I see 15 here and 2 above for pc and flags, for 17 total beyond the SIMD. | DynamoRIO-dynamorio | c |
@@ -46,4 +46,10 @@ public class Info extends AbstractApiBean {
public Response getServer() {
return response( req -> ok(systemConfig.getDataverseServer()));
}
+
+ @GET
+ @Path("apiTermsOfUse")
+ public Response getTermsOfUse() {
+ return response( req -> ok(systemConfig.getApiTerm... | 1 | package edu.harvard.iq.dataverse.api;
import edu.harvard.iq.dataverse.settings.SettingsServiceBean;
import edu.harvard.iq.dataverse.util.SystemConfig;
import javax.ejb.EJB;
import javax.json.Json;
import javax.json.JsonValue;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
@Path("in... | 1 | 37,493 | If you want, you could change this to `allowCors(response` (like in "version", above) to allow Cross-Origin Resource Sharing. I'm sort of wondering what's returned if no API terms of use are set. | IQSS-dataverse | java |
@@ -1616,4 +1616,9 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
}
}
}
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ }
} | 1 | package com.fsck.k9.activity;
import java.util.Collection;
import java.util.List;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.FragmentManager;
import android.app.FragmentManager.OnBackStackChangedListener;
import android.app.FragmentTransaction;
import android.app.SearchM... | 1 | 16,102 | Why do we need to override this if all we're doing is passing it up? | k9mail-k-9 | java |
@@ -356,6 +356,9 @@ void CmpSeabaseDDL::createSeabaseTableLike(
query += keyClause;
}
+ // send any user CQDs down
+ Lng32 retCode = sendAllControls(FALSE, FALSE, TRUE);
+
ExeCliInterface cliInterface(STMTHEAP, NULL, NULL,
CmpCommon::context()->sqlSession()->getParentQid());
| 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 10,334 | Just wondering whether it's safe to send all CQDs to the child compiler. As this missing CQD is causing trouble, maybe some other user CQDs that now get sent could also cause the statement to fail? Also, if I have a table with a nullable unique column, should I have to set this CQD to create another table like it, or s... | apache-trafodion | cpp |
@@ -1,11 +1,16 @@
import os
+import packaging.version
+import requests
+
from ..defines import GCP_CREDS_LOCAL_FILE
from ..module_build_spec import ModuleBuildSpec
from ..utils import connect_sibling_docker_container, network_buildkite_container
from .test_images import publish_test_images, test_image_depends_fn... | 1 | import os
from ..defines import GCP_CREDS_LOCAL_FILE
from ..module_build_spec import ModuleBuildSpec
from ..utils import connect_sibling_docker_container, network_buildkite_container
from .test_images import publish_test_images, test_image_depends_fn
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
def inte... | 1 | 15,106 | EARLIEST_TESTED_RELEASE might be slightly more clear | dagster-io-dagster | py |
@@ -81,7 +81,7 @@ MSG_STATE_CONFIDENCE = 2
# Allow stopping after the first semicolon/hash encountered,
# so that an option can be continued with the reasons
# why it is active or disabled.
-OPTION_RGX = re.compile(r"\s*#.*\bpylint:\s*([^;#]+)[;#]{0,1}")
+OPTION_RGX = re.compile(r'.*#\s*pylint:\s*([^;#]+)[;#]?.*')
... | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2009 Vincent
# Copyright (c) 2009 Mads Kiilerich <mads@kiilerich.com>
# Copyright (c) 2012-2014 Google, Inc.
# Copyright (c) 2014-2018 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014-2015 Michal... | 1 | 10,754 | I think replacing `.*` with `\s*` from after the hash makes sense, but not the rest of the changes. | PyCQA-pylint | py |
@@ -220,6 +220,8 @@ type NetworkPolicyRule struct {
// action “nil” defaults to Allow action, which would be the case for rules created for
// K8s Network Policy.
Action *secv1alpha1.RuleAction `json:"action,omitempty" protobuf:"bytes,6,opt,name=action,casttype=github.com/vmware-tanzu/antrea/pkg/apis/security/v1a... | 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 | 24,522 | interesting .. did not know varint tag covered bool as well | antrea-io-antrea | go |
@@ -35,6 +35,11 @@ struct st_duration_stats_t {
struct gkc_summary *process_time;
struct gkc_summary *response_time;
struct gkc_summary *total_time;
+
+ /**
+ * average event loop latency per worker thread
+ */
+ H2O_VECTOR(uint64_t) evloop_latency_ms;
};
struct st_duration_agg_stats_t ... | 1 | /*
* Copyright (c) 2016 Fastly
*
* 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, dis... | 1 | 13,700 | Could you please elaborate the reason for not using `gkc_summary` like the values above? I ask this, because I assume what we want to collect is a histogram of event loop latency, and we use `gkc_summary` for collecting histograms. | h2o-h2o | c |
@@ -187,7 +187,7 @@ Block.prototype.getTransactionHashes = function getTransactionHashes() {
return [Block.Values.NULL_HASH];
}
for (var t = 0; t < this.txs.length; t++) {
- hashes.push(this.txs[t].hash());
+ hashes.push(this.txs[t]._getHash());
}
return hashes;
}; | 1 | 'use strict';
var _ = require('lodash');
var BlockHeader = require('./blockheader');
var BN = require('./crypto/bn');
var bu = require('./util/buffer');
var BufferReader = require('./encoding/bufferreader');
var BufferWriter = require('./encoding/bufferwriter');
var Hash = require('./crypto/hash');
var ju = require('.... | 1 | 13,259 | getHash should be a public and without an `_` if used here. | bitpay-bitcore | js |
@@ -71,6 +71,10 @@ func (dv *DefaultBlockValidator) ValidateSemantic(ctx context.Context, child *ty
// ValidateSyntax validates a single block is correctly formed.
func (dv *DefaultBlockValidator) ValidateSyntax(ctx context.Context, blk *types.Block) error {
+ // hack validate genesisblock
+ if blk.Height == 0 {
+ ... | 1 | package consensus
import (
"context"
"fmt"
"time"
"github.com/filecoin-project/go-filecoin/clock"
"github.com/filecoin-project/go-filecoin/types"
)
// BlockValidator defines an interface used to validate a blocks syntax and
// semantics.
type BlockValidator interface {
BlockSemanticValidator
BlockSyntaxValida... | 1 | 20,247 | Unrelated to these changes -- we will probably want some special handling for genesis block validation. | filecoin-project-venus | go |
@@ -75,6 +75,10 @@ type diskBlockCacheSetter interface {
MakeDiskBlockCacheIfNotExists() error
}
+type diskBlockCacheFractionSetter interface {
+ SetDiskBlockCacheFraction(float64)
+}
+
type clockGetter interface {
Clock() Clock
} | 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"
kbname "github.com/keybase/client/go/kbun"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/chat1"
"gi... | 1 | 20,318 | This is probably overkill since we don't actually need to pass this specific interface anywhere, but I don't mind it! | keybase-kbfs | go |
@@ -56,6 +56,8 @@ func (d *Driver) AddPeer(ctx context.Context, addr swarm.Address) error {
d.mtx.Unlock()
return nil
}
+
+ d.receivedPeers[addr.ByteString()] = struct{}{}
d.mtx.Unlock()
connectedPeers := d.p2pService.Peers() | 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 full
import (
"context"
"math/rand"
"sync"
"time"
"github.com/ethersphere/bee/pkg/addressbook"
"github.com/ethersphere/bee/pkg/discovery"
"g... | 1 | 9,057 | @janos I moved this back here, to avoid having multiple add peer calls being handled. I think it's either this or a global lock across the whole function. I think this is a better approach, especially since `hive.Broadcast` is blocking . We can remove the map entry on errors if needed. LMKWYT? | ethersphere-bee | go |
@@ -0,0 +1,19 @@
+<% if display_response_actions?(cart, current_user) %>
+ <div id='reply-section'>
+ <p>
+ <%= link_to "Approve",
+ approval_response_path(approver_action: 'approve',
+ cart_id: cart.id,
+ scheme: 'https',
+ ... | 1 | 1 | 12,431 | Minor: can we put the conditional outside of the partial? | 18F-C2 | rb | |
@@ -887,7 +887,8 @@ class AsyncSniffer(object):
if isinstance(offline, Packet):
tempfile_written, offline = _write_to_pcap([offline])
- elif isinstance(offline, list) and \
+ elif (isinstance(offline, list) or
+ isinstance(offl... | 1 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
Functions to send and receive packets.
"""
from __future__ import absolute_import, print_function
from collections import... | 1 | 18,888 | We need to find something more efficient than this. We can probably just check the first element and assume the type list is consistent.. | secdev-scapy | py |
@@ -29,6 +29,9 @@ var (
executions and is good for jobs which need to run frequently. "Fixed Schedule"
lets you use a predefined or custom cron schedule and is good for less-frequent
jobs or those which require specific execution schedules.`
+
+ fmtJobInitTypeHelp = `A %s is a task which can be programmatically run... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"github.com/aws/copilot-cli/internal/pkg/aws/sessions"
"github.com/aws/copilot-cli/internal/pkg/cli/group"
"github.com/aws/copilot-cli/internal/pkg/config"
"github.co... | 1 | 15,531 | How " via service code in response to event."? I don't think we'll get in the no schedule option to the release. We should probably wait for some customer feedback first to make sure we're addressing different event-triggers the best way | aws-copilot-cli | go |
@@ -65,7 +65,6 @@ PER_YIELD = 1024
def generate_model_handle():
"""Generate random model handle.
-
Returns:
str: random bytes for handle
""" | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 33,710 | Please move unrelated formatting changes to their own PR (same with the resources.py file). | forseti-security-forseti-security | py |
@@ -2171,6 +2171,7 @@ class CommandDispatcher:
window = self._tabbed_browser.window()
if window.isFullScreen():
- window.showNormal()
+ window.setWindowState(window._state_before_fullscreen & ~Qt.WindowFullScreen)
else:
+ window._state_before_fullscreen = wi... | 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 | 18,061 | Make this a public attribute (remove the leading `_`) if you want to access it from the outside. | qutebrowser-qutebrowser | py |
@@ -116,7 +116,7 @@ define(['layoutManager', 'browser', 'actionsheet', 'css!./emby-select', 'registe
inputId++;
}
- if (!browser.firefox) {
+ if (browser) {
this.classList.add('emby-select-withcolor');
if (layoutManager.tv) { | 1 | define(['layoutManager', 'browser', 'actionsheet', 'css!./emby-select', 'registerElement'], function (layoutManager, browser, actionsheet) {
'use strict';
var EmbySelectPrototype = Object.create(HTMLSelectElement.prototype);
function enableNativeMenu() {
if (browser.edgeUwp || browser.xboxOne) {
... | 1 | 11,386 | this conditional is useless now so it should be removed | jellyfin-jellyfin-web | js |
@@ -262,8 +262,8 @@ void AccessFlatBufferTest(const uint8_t *flatbuf, size_t length,
auto vecofstructs = monster->testarrayofsortedstruct();
if (vecofstructs) { // not filled in monster_test.bfbs
for (size_t i = 0; i < vecofstructs->size()-1; i++) {
- auto left = vecofstructs->Get(i);
- auto right... | 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 | 11,579 | `vecofstructs->size()` already returns a `uoffset_t`. So if you just change the type of `i`, you don't need any casts. | google-flatbuffers | java |
@@ -197,7 +197,14 @@ public abstract class GapicProductConfig implements ProductConfig {
}
// Toggle on/off proto annotations parsing.
- ProtoParser protoParser = new ProtoParser(getDefaultLanguageFeatureConfig(language, null));
+ ProtoParser protoParser;
+ // TODO(andrealin): Expose command-line o... | 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,967 | Nit: Maybe merge this with the configProto check on line 208? Don't feel that strongly though, please keep separate if you prefer. | googleapis-gapic-generator | java |
@@ -138,7 +138,7 @@ describe.skip('Buffering Proxy', function() {
if (die) {
request.connection.destroy();
} else {
- if (doc.ismaster) {
+ if (doc.ismaster || doc.hello) {
request.reply(primary[currentIsMasterIndex]);
} else if (doc.i... | 1 | 'use strict';
var test = require('./shared').assert;
var co = require('co');
var mock = require('mongodb-mock-server');
var extend = function(template, fields) {
var object = {};
for (var name in template) {
object[name] = template[name];
}
for (var fieldName in fields) {
object[fieldName] = fields[na... | 1 | 20,069 | I know we already did this in 4.0 so carry on, but I'm facepalming here we should've made an overrided setMessageHandler that sets ismaster to true when hello is present. Esp in 4.0 where we already have some overrides written. We can keep going here and maybe open a ticket to some effect of that solution | mongodb-node-mongodb-native | js |
@@ -7,6 +7,10 @@
<%= json_api_link_tag %>
<% end %>
+<% content_for(:skip_links) do -%>
+ <a href="#documents" class="element-invisible element-focusable" data-turbolinks="false">Skip to first result</a>
+<% end %>
+
<% content_for(:container_header) do -%>
<h1 class="sr-only top-content-title"><%= t('blackl... | 1 | <% @page_title = t('blacklight.search.page_title.title', :constraints => render_search_to_page_title(params), :application_name => application_name) %>
<% content_for(:head) do -%>
<%= render_opensearch_response_metadata %>
<%= rss_feed_link_tag %>
<%= atom_feed_link_tag %>
<%= json_api_link_tag %>
<% end %>
... | 1 | 8,413 | I believe we could use `link_to` here (although not super important). Also, we should internationalize this value. I'm not 100% sure what our process is for adding new UI strings these days (e.g. skip the specs that will fail if we add a new key to only one language, use Google Translate to translate the value for us, ... | projectblacklight-blacklight | rb |
@@ -1323,11 +1323,9 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD
instance_data->instance_dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties);
lock.lock();
- if (result == VK_SUCCESS) {
- if (pProperties) {
- ... | 1 | /* Copyright (c) 2015-2018 The Khronos Group Inc.
* Copyright (c) 2015-2018 Valve Corporation
* Copyright (c) 2015-2018 LunarG, Inc.
* Copyright (C) 2015-2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... | 1 | 9,249 | This was already in vkGetPhysicalDeviceDisplayProperties2KHR... | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -498,3 +498,7 @@ type tasksStopper interface {
type serviceLinkedRoleCreator interface {
CreateECSServiceLinkedRole() error
}
+
+type dockerEngineValidator interface {
+ IsDockerEngineRunning() (string, error)
+} | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"encoding"
"io"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/copilot-cli/internal/pkg/aws/cloudformation"
"github.com/aws/copilot-cli/internal/pkg/aws/codepipeline"
"gith... | 1 | 16,123 | nit: I'd expect a public method called IsDockerEngineRunning to return a boolean yes/no, not the error message. Can we change either the return value or the name? Something like `CallDockerEngine` | aws-copilot-cli | go |
@@ -322,12 +322,12 @@ def define_model(model_name, dbengine, model_seed):
cai_resource_name = Column(String(4096))
cai_resource_type = Column(String(512))
full_name = Column(String(2048), nullable=False)
- type_name = Column(get_string_by_dialect(dbengine.dialect.name, 512),
+ t... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 35,019 | If i remembered correctly, type_name is '{RESOURCE_TYPE}/{RESOURCE_NAME}', if type_name is 700 max then name cannot exceed that size | forseti-security-forseti-security | py |
@@ -20,6 +20,13 @@ def GetSizePrefix(buf, offset):
"""Extract the size prefix from a buffer."""
return encode.Get(packer.int32, buf, offset)
+def GetBufferIdentifier(buf, offset, size_prefixed = False):
+ """Extract the file_identifier from a buffer"""
+ offset+=(number_types.UOffsetTFlags.bytewidth... | 1 | # Copyright 2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 1 | 14,851 | When calling functions with keyword arguments: please provide the arguments as keyword arguments, not positional arguments. | google-flatbuffers | java |
@@ -41,7 +41,7 @@ class BasicResBlock(nn.Module):
out_channels,
kernel_size=1,
bias=False,
- activation=None,
+ act_cfg=None,
conv_cfg=conv_cfg,
norm_cfg=norm_cfg)
| 1 | import torch.nn as nn
from mmcv.cnn.weight_init import normal_init, xavier_init
from ..backbones.resnet import Bottleneck
from ..registry import HEADS
from ..utils import ConvModule
from .bbox_head import BBoxHead
class BasicResBlock(nn.Module):
"""Basic residual block.
This block is a little different from... | 1 | 18,780 | We may follow the argument order: conv_cfg, norm_cfg, act_cfg. | open-mmlab-mmdetection | py |
@@ -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 | rb |
@@ -5,6 +5,7 @@
*/
#include <errno.h>
+#include <folly/ssl/Init.h>
#include <signal.h>
#include <string.h>
#include <thrift/lib/cpp2/server/ThriftServer.h> | 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 <errno.h>
#include <signal.h>
#include <string.h>
#include <thrift/lib/cpp2/server/ThriftServer.h>
#include "c... | 1 | 30,648 | folly library should be put on the top. | vesoft-inc-nebula | cpp |
@@ -35,6 +35,7 @@ let CAMEL_REG = /-?(?=[A-Z])/g;
function setProperty(dom, name, value, oldValue, isSvg) {
let v;
if (name==='class' || name==='className') name = isSvg ? 'class' : 'className';
+ const ns = isSvg && (name !== (name = name.replace(/^xlink:?/, '')));
if (name==='style') {
| 1 | import { IS_NON_DIMENSIONAL } from '../constants';
import options from '../options';
/**
* Diff the old and new properties of a VNode and apply changes to the DOM node
* @param {import('../internal').PreactElement} dom The DOM node to apply
* changes to
* @param {object} newProps The new props
* @param {object} o... | 1 | 12,803 | Do we have to restrict this to SVG elements? I think setting namespaced attributes on normal dom elements (while not as common) is still valid, so perhaps we can save some bytes by removing the `isSvg` check? | preactjs-preact | js |
@@ -134,7 +134,7 @@ class DataProvider {
* @returns {boolean}
*/
_isHiddenRow(row) {
- return this.hot.hasHook('hiddenRow') && this.hot.runHooks('hiddenRow', row);
+ return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(row));
}
/** | 1 | import { rangeEach } from '../../helpers/number';
// Waiting for jshint >=2.9.0 where they added support for destructing
// jshint ignore: start
/**
* @plugin ExportFile
* @private
*/
class DataProvider {
constructor(hotInstance) {
/**
* Handsontable instance.
*
* @type {Core}
*/
this... | 1 | 16,692 | Please add it to the `REMOVED_HOOKS` constant. | handsontable-handsontable | js |
@@ -1,7 +1,9 @@
describe('fieldset', function () {
'use strict';
var fixture = document.getElementById('fixture');
+ var shadowSupport = axe.testUtils.shadowSupport;
var fixtureSetup = axe.testUtils.fixtureSetup;
+
var checkContext = {
_data: null,
data: function (d) { | 1 | describe('fieldset', function () {
'use strict';
var fixture = document.getElementById('fixture');
var fixtureSetup = axe.testUtils.fixtureSetup;
var checkContext = {
_data: null,
data: function (d) {
this._data = d;
},
relatedNodes: function (nodes) {
this._relatedNodes = Array.isArray(nodes) ? nodes... | 1 | 11,349 | This variable needs `.v1` at the end of it, or the tests below need it. There are some test failures as a result | dequelabs-axe-core | js |
@@ -25,6 +25,12 @@ class AccountsController < ApplicationController
render json: Chart.new(@account).commits_by_language(params[:scope])
end
+ def label_as_spammer
+ @account = Account.find_by(id: params[:id])
+ Account::Access.new(@account).spam!
+ render template: 'accounts/disabled'
+ end
+
p... | 1 | class AccountsController < ApplicationController
before_action :account, only: [:show, :commits_by_project_chart, :commits_by_language_chart]
before_action :redirect_if_disabled, only: [:show, :commits_by_project_chart, :commits_by_language_chart]
# before_action :account_context, only: [:show]
def index
@... | 1 | 7,013 | Is this access protected so that only admins can access this route? | blackducksoftware-ohloh-ui | rb |
@@ -328,7 +328,7 @@ void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
return;
}
- double min_x = DBL_MAX, min_y = DBL_MAX, min_distance = DBL_MAX;
+ double min_x = 0, min_y = 0, min_distance = DBL_MAX;
struct wlr_output_layout_output *l_output;
wl_list_for_each(l_output, &layout->outputs... | 1 | #include <assert.h>
#include <float.h>
#include <limits.h>
#include <stdlib.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
#include "util/signal.h"
struct wlr_output_layout_state {
struct wlr_box _box; // should never be read dire... | 1 | 14,326 | What happens if the minimum x coord is > 0? This will incorrectly set it as zero, right? | swaywm-wlroots | c |
@@ -1637,6 +1637,11 @@ func (o *consumer) processNextMsgReq(_ *subscription, c *client, _, reply string
return
}
+ if o.maxp > 0 && batchSize > o.maxp {
+ sendErr(409, "Exceeded MaxAckPending")
+ return
+ }
+
// In case we have to queue up this request.
wr := waitingRequest{client: c, reply: reply, n: batc... | 1 | // Copyright 2019-2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,731 | I think you want to look at current pending + batchSize and if that is > o.maxp no? | nats-io-nats-server | go |
@@ -189,7 +189,7 @@ func (h *Harness) testSpan(tracerFactory func() trace.Tracer) {
span.AddEventWithTimestamp(context.Background(), time.Now(), "test event")
},
"#SetStatus": func(span trace.Span) {
- span.SetStatus(codes.Internal, "internal")
+ span.SetStatus(codes.Ok, "internal")
},
"#SetName": f... | 1 | // 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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 13,406 | Should this be `codes.Error`? `codes.Internal` was an error status before. | open-telemetry-opentelemetry-go | go |
@@ -26,6 +26,11 @@ class AccountsController < ApplicationController
@projects, @logos = @account.project_core.used
@twitter_detail = TwitterDetail.new(@account)
page_context[:page_header] = 'accounts/show/header'
+ respond_to do |format|
+ format.html
+ format.xml
+ format.json
+ end... | 1 | class AccountsController < ApplicationController
include RedirectIfDisabled
helper MapHelper
before_action :session_required, only: [:edit, :destroy, :confirm_delete, :me]
before_action :set_account, only: [:destroy, :show, :update, :edit, :confirm_delete, :disabled, :settings]
before_action :redirect_if_di... | 1 | 7,969 | I don't think you need these lines. | blackducksoftware-ohloh-ui | rb |
@@ -195,7 +195,7 @@ type tlfJournal struct {
// Invariant: this tlfJournal acquires exactly
// blockJournal.getStoredBytes() and
// blockJournal.getStoredFiles() until shutdown.
- DiskLimiter DiskLimiter
+ diskLimiter DiskLimiter
// All the channels below are used as simple on/off
// signals. They're buffer... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"path/filepath"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/pr... | 1 | 16,266 | You didn't mean to export this, right? | keybase-kbfs | go |
@@ -3,7 +3,7 @@
# Purpose:
# sns-ruby-example-show-topics.rb demonstrates how to list Amazon Simple Notification Services (SNS) topics using
-# the AWS SDK for JavaScript (v3).
+# the AWS SDK for Ruby.
# Inputs:
# - REGION | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Purpose:
# sns-ruby-example-show-topics.rb demonstrates how to list Amazon Simple Notification Services (SNS) topics using
# the AWS SDK for JavaScript (v3).
# Inputs:
# - REGION
# snippet-start:[sn... | 1 | 20,569 | Simple Notification **Service** (singular) | awsdocs-aws-doc-sdk-examples | rb |
@@ -313,6 +313,7 @@ type client struct {
replayMutex sync.RWMutex
nodeConfig *config.NodeConfig
networkConfig *config.NetworkConfig
+ egressConfig *config.EgressConfig
gatewayOFPort uint32
// ovsDatapathType is the type of the datapath used by the bridge.
ovsDatapathType ovsconfig.OVSDatapathType | 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 | 45,021 | Do we still need this? | antrea-io-antrea | go |
@@ -108,9 +108,6 @@ public abstract class AbstractEeaSendRawTransaction implements JsonRpcMethod {
final Transaction privateMarkerTransaction =
createPrivateMarkerTransaction(privateTransaction, user);
- LOG.error("CHEESE");
- LOG.error(privateMarkerTransaction.getHash());
-
... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 25,540 | We do have a disconnect between the privateMarkerTransactionFactory.getSender() call and the createPrivateMarkerTransaction() call. When the plugin receives the call to create the PMT it does not know what the sender was returned by the other call. At a minimum we need to pass in the sender to the second call. I would ... | hyperledger-besu | java |
@@ -217,7 +217,7 @@ import 'css!./imageeditor';
reload(context, null, focusContext);
}, function () {
import('alert').then(({default: alert}) => {
- alert(globalize.translate('DefaultErrorMessage'));
+ alert(globalize.translate('MessageDefaultError'));
... | 1 | import dialogHelper from 'dialogHelper';
import connectionManager from 'connectionManager';
import loading from 'loading';
import dom from 'dom';
import layoutManager from 'layoutManager';
import focusManager from 'focusManager';
import globalize from 'globalize';
import scrollHelper from 'scrollHelper';
import imageLo... | 1 | 17,051 | This is a bit inconsistent with the `ErrorStartHourGreaterThanEnd` in the previous file. Wouldn't `ErrorDefault``fit better here? | jellyfin-jellyfin-web | js |
@@ -35,12 +35,13 @@ import (
"antrea.io/antrea/pkg/features"
)
-func skipIfNetworkPolicyStatsDisabled(tb testing.TB, data *TestData) {
- skipIfFeatureDisabled(tb, data, features.NetworkPolicyStats, true, true)
+func skipIfNetworkPolicyStatsDisabled(tb testing.TB) {
+ skipIfFeatureDisabled(tb, features.NetworkPolic... | 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 | 39,097 | I think it will revert the change @antoninbas did on purpose 05eee251c9c53400277def576f92d614ca234898 | antrea-io-antrea | go |
@@ -614,6 +614,8 @@ func (m *bpfEndpointManager) attachDataIfaceProgram(ifaceName string, polDirecti
epType := tc.EpTypeHost
if ifaceName == "tunl0" {
epType = tc.EpTypeTunnel
+ } else if ifaceName == "wireguard.cali" {
+ epType = tc.EpTypeWireguard
}
ap := m.calculateTCAttachPoint(epType, polDirection, ifa... | 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 appli... | 1 | 18,141 | nit: a switch perhaps? | projectcalico-felix | c |
@@ -14,7 +14,7 @@
<![endif]-->
<title><%= render_page_title %></title>
- <link href="<%= opensearch_catalog_path(:format => 'xml', :only_path => false) %>" title="<%= application_name%>" type="application/opensearchdescription+xml" rel="search"/>
+ <%= opensearch_description_tag application_name, open... | 1 | <!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Mobile viewport optimization h5bp.com/ad -->
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width,initia... | 1 | 5,234 | Would it make sense for `opensearch_description_tag` to have default values for the title and href attributes? | projectblacklight-blacklight | rb |
@@ -281,7 +281,7 @@ func (j journalMDOps) getRange(
[]ImmutableRootMetadata, error) {
// Grab the range from the journal first.
jirmds, err := j.getRangeFromJournal(ctx, id, bid, mStatus, start, stop)
- if err != nil {
+ if err != nil && err != errTLFJournalDisabled {
return nil, err
}
| 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/kbfs/kbfscrypto"
"github.com/keybase/kbfs/tlf"
"golang.org/x... | 1 | 14,276 | Just noticed this while debugging -- it's unlikely to be causing issues in practice. | keybase-kbfs | go |
@@ -75,7 +75,7 @@ describe( 'setting up the Analytics module with no existing account and no exist
await expect( page ).toClick( '.googlesitekit-analytics__select-country' );
await expect( page ).toClick( '.mdc-menu-surface--open li', { text: /united kingdom/i } );
- await expect( page ).toMatchElement( 'p', {... | 1 | /**
* WordPress dependencies
*/
import { activatePlugin, createURL, visitAdminPage } from '@wordpress/e2e-test-utils';
/**
* Internal dependencies
*/
import {
deactivateUtilityPlugins,
resetSiteKit,
useRequestInterception,
setSearchConsoleProperty,
} from '../../../utils';
describe( 'setting up the Analytics ... | 1 | 30,916 | That seems unrelated - did that fix a random test failure you noticed while working on this issue? | google-site-kit-wp | js |
@@ -98,8 +98,11 @@ public abstract class BaseMetastoreTableOperations implements TableOperations {
LOG.info("Nothing to commit.");
return;
}
+ TableMetadata updated = (base != null && base.file() != null) ?
+ metadata.addPreviousMetadata(base.file().location(), base.lastUpdatedMillis())... | 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,614 | This kind of concern should be handled in the `TableMetadata` update methods. This is similar to `metadata.rollbackTo`, which not only sets the current version, but also updates the table history. I think that all of those methods should add the current object's `file.location()` to the previous metadata location list,... | apache-iceberg | java |
@@ -82,3 +82,18 @@ def flip_tensor(src_tensor, flip_direction):
else:
out_tensor = torch.flip(src_tensor, [2, 3])
return out_tensor
+
+
+def collect_mlvl_tensor_single(mlvl_tensors, batch_id, detach=True):
+ assert isinstance(mlvl_tensors, (list, tuple))
+ num_levels = len(mlvl_tensors)
+
+ ... | 1 | from functools import partial
import numpy as np
import torch
from six.moves import map, zip
from ..mask.structures import BitmapMasks, PolygonMasks
def multi_apply(func, *args, **kwargs):
"""Apply function to a list of arguments.
Note:
This function applies the ``func`` to multiple inputs and
... | 1 | 23,924 | We need to know why all the tensors are detached in `get_bboxed`. | open-mmlab-mmdetection | py |
@@ -309,3 +309,13 @@ class Foo:
def method(self):
print(self.__class__.__ham)
+
+
+class TypeSelfCallInMethod:
+ """Regression test for issue 5569"""
+ @classmethod
+ def b(cls) -> None:
+ cls.__a = '' # [unused-private-member]
+
+ def a(self):
+ return type(self).__a | 1 | # pylint: disable=missing-docstring, invalid-name, too-few-public-methods, no-self-use, line-too-long, unused-argument, protected-access
class AnotherClass():
def __test(self): # [unused-private-member]
pass
class HasUnusedInClass():
__my_secret = "I have no secrets" # [unused-private-member]
__... | 1 | 20,271 | Unrelated but shouldn't this raise `attribute-defined-outside-init`? | PyCQA-pylint | py |
@@ -24,7 +24,7 @@ class Service(service.ChromiumService):
"""
def __init__(self, executable_path, port=0, service_args=None,
- log_path=None, env=None):
+ log_path=None, env=None, create_no_window=False):
"""
Creates a new instance of the Service
| 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 17,876 | I would rather no have this as a `kwarg` as it encourages "growth" which lead to an unweildy constructor in other classes. Let's add a method or property to take care of this instead as I think it's usage is going to be quite low. | SeleniumHQ-selenium | js |
@@ -98,8 +98,7 @@ class Phase < ActiveRecord::Base
# TODO: Move this to Plan model as `num_answered_questions(phase=nil)`
# Returns the number of answered question for the phase.
def num_answered_questions(plan)
- return 0 if plan.nil?
- sections.to_a.sum { |s| s.num_answered_questions(plan) }
+ plan&... | 1 | # == Schema Information
#
# Table name: phases
#
# id :integer not null, primary key
# description :text
# modifiable :boolean
# number :integer
# title :string
# created_at :datetime
# updated_at :datetime
# template_id :integer
#
# Indexes
#
# index_phases_on_template_id (tem... | 1 | 18,071 | You just changed my life :) I grew very attached to this safe nav approach when working with Groovy years ago `obj?.method`. Glad to see its now a part of Ruby! | DMPRoadmap-roadmap | rb |
@@ -23,9 +23,10 @@
<div class="checkbox">
<%= f.label :published, raw("#{f.check_box :published, as: :check_boxes, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for this guidance to appear on user's plans.")} #{_('Published?')}") %>
</div>
-
- <%= f.submit _('Save'), ... | 1 | <%# locals: { guidance, themes, guidance_groups, options } %>
<div class="row">
<div class="col-xs-12">
<h1><%= _('Guidance') %></h1>
<%= link_to _('View all guidance'), admin_index_guidance_path(current_user.org_id), class: 'btn btn-default pull-right' %>
</div>
</div>
<div class="row">
<div class="col-x... | 1 | 17,668 | do you mean 'clearfix' class? | DMPRoadmap-roadmap | rb |
@@ -391,6 +391,7 @@ MongoClient.connect = function(url, options, callback) {
* Starts a new session on the server
*
* @param {SessionOptions} [options] optional settings for a driver session
+ * @param {boolean} [options.causalConsistency=true] Enables or disables causal consistency for the session.
* @return {... | 1 | 'use strict';
const ChangeStream = require('./change_stream');
const Db = require('./db');
const EventEmitter = require('events').EventEmitter;
const executeOperation = require('./utils').executeOperation;
const inherits = require('util').inherits;
const MongoError = require('mongodb-core').MongoError;
const resolveRe... | 1 | 14,914 | `causalConsistency` is already defined on `SessionOptions`. We do not need to duplicate it here. | mongodb-node-mongodb-native | js |
@@ -46,9 +46,7 @@ import java.lang.reflect.Method;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyString;
-import... | 1 | /*
* Copyright 2002-2018 the original author or 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 ap... | 1 | 12,947 | This should not be included since there are no code changes. | spring-projects-spring-security | java |
@@ -56,6 +56,18 @@ func askCredentials(c *context.Context, status int, text string) {
func HTTPContexter() macaron.Handler {
return func(c *context.Context) {
+ if len(setting.HTTP.AccessControlAllowOrigin) > 0 {
+ // Set CORS headers for browser-based git clients
+ c.Resp.Header().Set("Access-Control-Allow-O... | 1 | // Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package repo
import (
"bytes"
"compress/gzip"
"fmt"
"net/http"
"os"
"os/exec"
"path"
"regexp"
"strconv"
"strings"
"time"
"github.com/Unknwon/com... | 1 | 12,665 | If all we need just response 200, then we could use `c.Status(http.StatusOK)` here. | gogs-gogs | go |
@@ -683,6 +683,11 @@ func loadConfigFromDatastore(
Name: "node." + hostname,
Namespace: "",
}, "")
+ n, err := client.Get(ctx, model.ResourceKey{
+ Kind: apiv2.KindNode,
+ Name: hostname,
+ Namespace: "",
+ }, "")
if _, ok := err.(errors2.ErrorResourceDoesNotExist); err != nil && !ok {
re... | 1 | // Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 15,852 | Should be checking for error here | projectcalico-felix | c |
@@ -431,7 +431,7 @@ class Form extends WidgetBase
$this->fields = [];
}
- $this->allTabs->outside = new FormTabs(FormTabs::SECTION_OUTSIDE, $this->config);
+ $this->allTabs->outside = new FormTabs(FormTabs::SECTION_OUTSIDE, (array)$this->config);
$this->addFields($this->fi... | 1 | <?php namespace Backend\Widgets;
use Lang;
use Form as FormHelper;
use Backend\Classes\FormTabs;
use Backend\Classes\FormField;
use Backend\Classes\WidgetBase;
use Backend\Classes\WidgetManager;
use Backend\Classes\FormWidgetBase;
use October\Rain\Database\Model;
use October\Rain\Html\Helper as HtmlHelper;
use Applica... | 1 | 13,512 | Put a space between `(array)` and `$this` and I'll merge it | octobercms-october | php |
@@ -0,0 +1,6 @@
+package runtime
+
+// Stack is a stub, not implemented
+func Stack(buf []byte, all bool) int {
+ return 0
+} | 1 | 1 | 9,608 | You could add this to stack.go, which has similar functions (to avoid yet another small file). None of these are likely to be implemented considering what TinyGo is designed for. | tinygo-org-tinygo | go | |
@@ -0,0 +1,13 @@
+package com.fsck.k9.notification;
+
+
+class NotificationHolder {
+ public final int notificationId;
+ public final NotificationContent content;
+
+
+ public NotificationHolder(int notificationId, NotificationContent content) {
+ this.notificationId = notificationId;
+ this.cont... | 1 | 1 | 13,196 | the class names `NotificationHolder` and `NotificationsHolder` are fairly difficult to quickly tell apart, particularly since they are often used close to each other | k9mail-k-9 | java | |
@@ -23,10 +23,7 @@
*/
package net.runelite.client.plugins.freezetimers;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Actor; | 1 | /*
* Copyright (c) 2019, pklite <https://github.com/pklite/pklite>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright noti... | 1 | 15,537 | Avoid wildcard imports | open-osrs-runelite | java |
@@ -71,7 +71,7 @@ type (
GetContractState(hash.PKHash, hash.Hash32B) (hash.Hash32B, error)
SetContractState(hash.PKHash, hash.Hash32B, hash.Hash32B) error
// Candidate pool
- candidates() (uint64, []*Candidate)
+ Candidates() (uint64, []*Candidate)
CandidatesByHeight(uint64) ([]*Candidate, error)
}
| 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 | 12,603 | Need to do this to unblock mockgen. The interface method needs to be public to be visible in another package. The right fix is to delete this test only interface method | iotexproject-iotex-core | go |
@@ -101,6 +101,13 @@ module.exports = function(url, options, callback) {
record = record[0].join('');
const parsedRecord = qs.parse(record);
const items = Object.keys(parsedRecord);
+ if (
+ Object.keys(items)
+ .map(k => k.toLowerCase())
+ .indexOf('load... | 1 | 'use strict';
const ReadPreference = require('./core').ReadPreference;
const parser = require('url');
const f = require('util').format;
const Logger = require('./core').Logger;
const dns = require('dns');
const ReadConcern = require('./read_concern');
const qs = require('querystring');
const MongoParseError = require(... | 1 | 21,101 | same question here as I have on the other file regarding doing this check here vs L112 vs not at all | mongodb-node-mongodb-native | js |
@@ -1,3 +1,5 @@
+// +build !openbsd
+
package fuse
import ( | 1 | package fuse
import (
"os"
"bazil.org/fuse"
"bazil.org/fuse/fs"
"golang.org/x/net/context"
"github.com/restic/restic"
"github.com/restic/restic/repository"
)
// Statically ensure that *dir implement those interface
var _ = fs.HandleReadDirAller(&dir{})
var _ = fs.NodeStringLookuper(&dir{})
type dir struct {
... | 1 | 6,840 | Adding `// +build !windows` (as a separate line) will do the same for Windows. So while you are at it we might add it as well. | restic-restic | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.