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 |
|---|---|---|---|---|---|---|---|
@@ -342,6 +342,10 @@ func (s *Service) createStressChaos(exp *core.ExperimentInfo) error {
chaos.Spec.Duration = &exp.Scheduler.Duration
}
+ if exp.Target.StressChaos.ContainerName != nil {
+ chaos.Spec.ContainerName = exp.Target.StressChaos.ContainerName
+ }
+
return s.kubeCli.Create(context.Background(), ch... | 1 | // Copyright 2020 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 16,513 | Do we need to check if `exp.Target.StressChaos` is `nil`? | chaos-mesh-chaos-mesh | go |
@@ -1,4 +1,4 @@
-//snippet-sourcedescription:[CreateAccessKey.java demonstrates how to create an access key for an AWS Identity and Access Management (IAM) user.]
+//snippet-sourcedescription:[CreateAccessKey.java demonstrates how to create an access key for an AWS Identity and Access Management (AWS IAM) user.]
//sni... | 1 | //snippet-sourcedescription:[CreateAccessKey.java demonstrates how to create an access key for an AWS Identity and Access Management (IAM) user.]
//snippet-keyword:[AWS SDK for Java v2]
//snippet-keyword:[Code Sample]
//snippet-service:[AWS IAM]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[11/02/2020]... | 1 | 18,231 | AWS Identity and Access Management (IAM) | awsdocs-aws-doc-sdk-examples | rb |
@@ -110,7 +110,6 @@ spec:
run:
tasks:
- cstor-volume-create-getstorageclass-default
- - cstor-volume-create-getpvc-default
- cstor-volume-create-listclonecstorvolumereplicacr-default
- cstor-volume-create-listcstorpoolcr-default
- cstor-volume-create-puttargetservice-default | 1 | /*
Copyright 2018 The OpenEBS Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | 1 | 17,757 | not calling this is going to impact current functionality which depends on PVC.. let us still call this and set the values to default as 'none' (or empty) by handling the error from 'get' operation | openebs-maya | go |
@@ -306,7 +306,9 @@ int ioctl(int fd, unsigned long request, ...)
if (gEnableIRQ && fme_irq->evtfd >= 0) {
uint64_t data = 1;
// Write to the eventfd to signal one IRQ event.
- write(fme_irq->evtfd, &data, sizeof(data));
+ if (write(fme_irq->evtfd, &data, sizeof(data)) != sizeof(data)) {
+ FPGA_... | 1 | // Copyright(c) 2017, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 15,913 | `!=` is no the same as `<` | OPAE-opae-sdk | c |
@@ -0,0 +1,8 @@
+from .transformer import (FFN, MultiheadAttention, Transformer,
+ TransformerDecoder, TransformerDecoderLayer,
+ TransformerEncoder, TransformerEncoderLayer)
+
+__all__ = [
+ 'FFN', 'MultiheadAttention', 'Transformer', 'TransformerDecoder',
+ 'Tra... | 1 | 1 | 21,481 | No need to create a dir for transformer. Simply move transformer.py into mmdet/models/utils/ | open-mmlab-mmdetection | py | |
@@ -531,6 +531,10 @@ public class MainActivity extends CastEnabledActivity {
bottomSheetCallback.onSlide(null, 1.0f);
} else if (Intent.ACTION_VIEW.equals(intent.getAction())) {
handleDeeplink(intent.getData());
+ } else if (Intent.ACTION_CREATE_SHORTCUT.equals(intent.getAction... | 1 | package de.danoeh.antennapod.activity;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import andro... | 1 | 21,025 | Can't you just add `SelectSubscriptionActivity` directly to the manifest instead of opening `MainActivity` that then starts it? | AntennaPod-AntennaPod | java |
@@ -46,6 +46,7 @@ var (
rpmsDir = app.Flag("rpm-dir", "Directory containing built RPMs.").Required().ExistingDir()
distTag = app.Flag("dist-tag", "The distribution tag the SPEC will be built with.").Required().String()
workerTar = app.Flag("worker-tar", "Full path to worker_chroot.tar.gz. If this argument is... | 1 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// specreader is a tool to parse spec files into a JSON structure
package main
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"microsoft.com/pkggen/internal/buildpipeline"
"microsoft.com/pkggen/internal/... | 1 | 14,506 | Maybe say "the spec's %check section" so it's clearer what we mean. | microsoft-CBL-Mariner | go |
@@ -649,7 +649,7 @@ class ColumnSorting extends BasePlugin {
* @returns {Number} Physical row index.
*/
onModifyRow(row, source) {
- if (this.blockPluginTranslation === false && source !== this.pluginName) {
+ if (this.blockPluginTranslation === false && source !== this.pluginName && this.isSorted()) {... | 1 | import {
addClass,
removeClass,
} from '../../helpers/dom/element';
import { isUndefined, isDefined } from '../../helpers/mixed';
import { isObject } from '../../helpers/object';
import { arrayMap } from '../../helpers/array';
import { rangeEach } from '../../helpers/number';
import BasePlugin from '../_base';
impo... | 1 | 15,017 | I think after change this check `rowInMapper === null` is always false, so it's useless. | handsontable-handsontable | js |
@@ -166,7 +166,7 @@ func initClocks() {
nxp.ClockIpLpi2c2.Enable(false) //
nxp.ClockIpLpi2c3.Enable(false) //
nxp.DivIpLpi2c.Div(0) // divide LPI2C_CLK_PODF (DIV1)
- nxp.MuxIpLpi2c.Mux(0) // LPI2C select PLL3_SW_60M
+ nxp.MuxIpLpi2c.Mux(1) // LPI2C select OSC
nxp.ClockIpCan1.Enab... | 1 | // +build mimxrt1062
package runtime
import (
"device/nxp"
)
// Core clock frequencies (Hz)
const (
CORE_FREQ = 600000000 // 600 MHz
OSC_FREQ = 24000000 // 24 MHz
)
// Note from Teensyduino (cores/teensy4/startup.c):
//
// | ARM SysTick is used for most Ardiuno timing functions, delay(), millis(),
// | micr... | 1 | 11,118 | ClockIpLpi2c4.Enable() is required. The same change is required for enablePeripheralClocks(). | tinygo-org-tinygo | go |
@@ -67,6 +67,9 @@ type PrometheusSpec struct {
Version string `json:"version,omitempty"`
// Tag of Prometheus container image to be deployed. Defaults to the value of `version`.
Tag string `json:"tag,omitempty"`
+ // Sha of Prometheus container image to be deployed. Defaults to the value of `version`.
+ // Simila... | 1 | // Copyright 2016 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 11,334 | nit: this should be `SHA` since it is an acronym for `Secure Hash Algorithm`, no? | prometheus-operator-prometheus-operator | go |
@@ -27,6 +27,13 @@ import jstz from 'jstz'
* @returns {String} Current timezone of user
*/
export default () => {
+ if (window.Intl && typeof window.Intl === 'object') {
+ const { timeZone } = Intl.DateTimeFormat().resolvedOptions()
+ if (timeZone) {
+ return timeZone
+ }
+ }
+
const determinedTimezone = js... | 1 | /**
* @copyright Copyright (c) 2019 Georg Ehrke
*
* @author Georg Ehrke <oc.list@georgehrke.com>
*
* @license GNU AGPL version 3 or any later version
*
* 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... | 1 | 7,002 | Not sure if Intl can be defined but not `Intl.DateTimeFormat`. Both seem to have the same percentage on CanIUse. | nextcloud-calendar | js |
@@ -121,7 +121,7 @@ func (p *Provisioner) Provision(opts pvController.VolumeOptions) (*v1.Persistent
if reqMap != nil {
size = pvc.Spec.Resources.Requests["storage"]
}
- sendEventOrIgnore(name, size.String(), stgType, analytics.VolumeProvision)
+ sendEventOrIgnore(pvc.Name, name, size.String(), stgType, analytic... | 1 | /*
Copyright 2019 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 | 18,532 | PTAL, looks like the order of PVC & PV is reversed for different storage-engine types, for Jiva/CStor the args sent to sendEventOrIgnore are `PV, PVCName`. | openebs-maya | go |
@@ -65,7 +65,7 @@ import vn.mbm.phimp.me.utils.RSSPhotoItem_Personal;
@SuppressWarnings("deprecation")
public class PhimpMe extends AppCompatActivity implements BottomNavigationView.OnNavigationItemSelectedListener //, android.view.GestureDetector.OnGestureListener
{
- public static Context ctx;
+ public stati... | 1 | package vn.mbm.phimp.me;
import android.Manifest;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.da... | 1 | 10,740 | Remove the trailing white space | fossasia-phimpme-android | java |
@@ -21,7 +21,7 @@ mmcv_version = digit_version(mmcv.__version__)
assert (mmcv_version >= digit_version(mmcv_minimum_version)
- and mmcv_version <= digit_version(mmcv_maximum_version)), \
+ and mmcv_version < digit_version(mmcv_maximum_version)), \
f'MMCV=={mmcv.__version__} is used but incompati... | 1 | import mmcv
from .version import __version__, short_version
def digit_version(version_str):
digit_version = []
for x in version_str.split('.'):
if x.isdigit():
digit_version.append(int(x))
elif x.find('rc') != -1:
patch_version = x.split('rc')
digit_version... | 1 | 21,801 | No need to modify this. | open-mmlab-mmdetection | py |
@@ -14,7 +14,7 @@ import (
madns "github.com/multiformats/go-multiaddr-dns"
)
-func Discover(ctx context.Context, addr ma.Multiaddr, f func(ma.Multiaddr) (stop bool, err error)) (stopped bool, err error) {
+func Discover(ctx context.Context, addr ma.Multiaddr, f func(ma.Multiaddr) (bool, error)) (bool, error) {
... | 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 p2p
import (
"context"
"errors"
"fmt"
"math/rand"
ma "github.com/multiformats/go-multiaddr"
madns "github.com/multiformats/go-multiaddr-dns"
... | 1 | 12,204 | would be nice at some point to clean this signature up... not relevant for this PR | ethersphere-bee | go |
@@ -342,6 +342,12 @@ class Configurator
),
$fieldConfiguration
);
+
+ // if the 'type' is not set explicitly for a virtual field,
+ // consider it as a string, so the backend displays its contents
+ if (null === $nor... | 1 | <?php
/*
* This file is part of the EasyAdminBundle.
*
* (c) Javier Eguiluz <javier.eguiluz@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JavierEguiluz\Bundle\EasyAdminBundle\Configuration;
use Doctrine\Co... | 1 | 9,115 | Here, is it `null` because it is `null` in `$fieldConfiguration`, or because it has been set to `null` above in the `array_replace` ? If it doesn't exists at all in `$fieldConfiguration`, I think you should add `type => 'text'` above in the `array_replace`. | EasyCorp-EasyAdminBundle | php |
@@ -620,7 +620,7 @@ public class JavaParserFacade {
* references an outer class -- as its ancestor, return the declaration corresponding to the class name specified.
*/
protected Node findContainingTypeDeclOrObjectCreationExpr(Node node, String className) {
- if (node instanceof ClassOrInterface... | 1 | /*
* Copyright (C) 2015-2016 Federico Tomassetti
* Copyright (C) 2017-2020 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License... | 1 | 14,342 | I was thinking about this for #2928 too, which also uses `endsWith`... Presumably `SomeOtherObject` would match `endsWith("Object")`, meaning that something more sophisticated like splitting it then iterating right to left would be needed in order to do this robustly? | javaparser-javaparser | java |
@@ -51,5 +51,15 @@ namespace OpenTelemetry.Exporter.Zipkin
/// </summary>
public int? MaxPayloadSizeInBytes { get; set; } = DefaultMaxPayloadSizeInBytes;
#endif
+
+ /// <summary>
+ /// Gets or sets the exporter type for Zipkin Exporter.
+ /// </summary>
+ public ExporterTy... | 1 | // <copyright file="ZipkinExporterOptions.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,070 | I think this name is a bit confusing because if you asked someone what type of exporter they were using they would probably say Zipkin or Jaeger, etc. How about `ProcessorType` with `Simple` and `Batch` definitions? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -95,6 +95,12 @@ func (a *FakeWebAPI) RegisterPiped(ctx context.Context, req *webservice.Register
}, nil
}
+func (a *FakeWebAPI) RecreatePipedKey(ctx context.Context, req *webservice.RecreatePipedKeyRequest) (*webservice.RecreatePipedKeyResponse, error) {
+ return &webservice.RecreatePipedKeyResponse{
+ Key: "9... | 1 | // Copyright 2020 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 8,304 | `req` is unused in RecreatePipedKey | pipe-cd-pipe | go |
@@ -85,11 +85,11 @@ export default function SetupAccountApproved() {
__( 'Site Kit detected AdSense code for a different account %s on your site. For a better ads experience, you should remove AdSense code that’s not linked to this AdSense account.', 'google-site-kit' ),
parseAccountID( existingTag )
);
- u... | 1 | /**
* AdSense Setup Account Approved component.
*
* Site Kit by Google, Copyright 2021 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/licen... | 1 | 37,298 | The "Adsense" term needs to be capitalized - I just noticed this was wrong through ACs and IB, so not a problem of the PR itself really. I'll quickly fix it. | google-site-kit-wp | js |
@@ -45,11 +45,15 @@ func init() {
beam.RegisterFunction(defToDecorPiece)
beam.RegisterFunction(fileToDecorPiece)
beam.RegisterFunction(groupCrossRefs)
+ beam.RegisterFunction(groupEdges)
beam.RegisterFunction(keyByPath)
beam.RegisterFunction(keyRef)
beam.RegisterFunction(moveSourceToKey)
beam.RegisterFunc... | 1 | /*
* Copyright 2018 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 applicabl... | 1 | 8,490 | do which methods need to be registered? is it basically just the ones that are directly referenced in ParDo calls? (The Beam GoDoc doesn't say anything about it. :/ ) | kythe-kythe | go |
@@ -143,7 +143,8 @@ public class Access extends AbstractApiBean {
downloadInstance.setFileCitationEndNote(datasetService.createCitationXML(datasetVersion, fileMetadata));
downloadInstance.setFileCitationRIS(datasetService.createCitationRIS(datasetVersion, fileMetadata));
-
+ d... | 1 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.harvard.iq.dataverse.api;
import edu.harvard.iq.dataverse.DataFile;
import edu.harvard.iq.dataverse.FileMetadata;
import ... | 1 | 34,921 | @bmckinney does this mean that the bibtex citation will be available via API? | IQSS-dataverse | java |
@@ -28,11 +28,11 @@ if sys.version_info < (3,):
])
POSTGRESQL_REQUIREMENTS = REQUIREMENTS + [
- 'cliquet[postgresql]>=2.14,<3'
+ 'cliquet[postgresql]>=2.15,<3'
]
MONITORING_REQUIREMENTS = REQUIREMENTS + [
- 'cliquet[monitoring]>=2.14,<3'
+ 'cliquet[monitoring]>=2.15,<3'
]
FXA_REQUIREMENTS = ... | 1 | import codecs
import os
import sys
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read_file(filename):
"""Open a related file and return its content."""
with codecs.open(os.path.join(here, filename), encoding='utf-8') as f:
content = f.read()
ret... | 1 | 8,637 | We should probably tag the cliquet-fxa version as well. | Kinto-kinto | py |
@@ -317,7 +317,7 @@ static socklen_t parse_hostport(h2o_mem_pool_t *pool, h2o_iovec_t host, h2o_iove
4 &&
parsed_len == host.len && d1 <= UCHAR_MAX && d2 <= UCHAR_MAX && d3 <= UCHAR_MAX && d4 <= UCHAR_MAX) {
if (sscanf(port.base, "%" SCNd32 "%n", &_port, &parsed_len) == 1 && p... | 1 | /*
* Copyright (c) 2017 Ichito Nagata, Fastly, 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... | 1 | 13,163 | IIRC we need to use memset, because an empty brace is not C99 comformant, and because we cannot use `{0}` because how the struct is organized is not defined in POSIX (the initializer cannot be `{0}` if the first property of the struct is a struct). | h2o-h2o | c |
@@ -434,6 +434,11 @@ type NetworkPolicyPeer struct {
// Exact FQDNs, i.e. "google.com", "db-svc.default.svc.cluster.local"
// Wildcard expressions, i.e. "*wayfair.com".
FQDN string `json:"fqdn,omitempty"`
+ // Select all Pods with the ServiceAccount matched by this field, as
+ // workloads in AppliedTo/To/From ... | 1 | // Copyright 2021 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 | 49,149 | Will we be adding this to `AppliedTo` as well? If not, any reason why not? | antrea-io-antrea | go |
@@ -813,6 +813,13 @@ Tries to force this object to take the focus.
"""
return False
+ def shouldAcceptShowHideCaretEvent(self):
+ """Some objects/applications send show/hide caret events when we don't expect it, such as when the cursor is blinking.
+ @return: if show/hide caret events should be accepted for t... | 1 | # -*- coding: UTF-8 -*-
#NVDAObjects/__init__.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""Module that conta... | 1 | 20,043 | Just a note that this feels weird being on the base NVDAObject rather than IAccessible, but right now, I understand that's how it has to be because we fire MSAA caret events on the focus object regardless of whether it's IAccessible. I think we should consider restricting these caret events to focus objects that are IA... | nvaccess-nvda | py |
@@ -71,7 +71,9 @@ class PaymentController extends AdminBaseController
{
$paymentEditData = $this->paymentEditDataFactory->createDefault();
- $form = $this->createForm(PaymentEditFormType::class, $paymentEditData);
+ $form = $this->createForm(PaymentEditFormType::class, $paymentEditData, [
... | 1 | <?php
namespace Shopsys\FrameworkBundle\Controller\Admin;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Shopsys\FrameworkBundle\Component\Controller\AdminBaseController;
use Shopsys\FrameworkBundle\Component\Router\Security\Annotation\CsrfProtection;
use Shopsys\FrameworkBundle\Form\Admin\Payment\Pa... | 1 | 9,839 | This change and other similar ones should not be part of this commit. This commit is about adding a ImageUploadType not fixing controllers and stuff. | shopsys-shopsys | php |
@@ -57,6 +57,7 @@ const (
leafNodeConnectEventSubj = "$SYS.ACCOUNT.%s.LEAFNODE.CONNECT" // for internal use only
remoteLatencyEventSubj = "$SYS.LATENCY.M2.%s"
inboxRespSubj = "$SYS._INBOX.%s.%s"
+ accConnzReqSubj = "$SYS.REQ.ACCOUNT.PING.CONNZ"
// FIXME(dlc) - Should account scope, even ... | 1 | // Copyright 2018-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 | 13,848 | I am a bit confused about PING here. Ping is implied and it overlaps with "$SYS.REQ.ACCOUNT.%s.%s" where the last token is what is requested (CONNZ) and the one before is the requested account id. | nats-io-nats-server | go |
@@ -708,3 +708,15 @@ func (v *volumeClient) CloudMigrateStatus() (*api.CloudMigrateStatusResponse, er
}
return statusResponse, nil
}
+
+// Du specified volume id and specifically path (if provided)
+func (v *volumeClient) Catalog(id, subfolder, maxDepth string) (api.CatalogResponse, error) {
+ var catalog api.Cata... | 1 | package volume
import (
"bytes"
"errors"
"fmt"
"io"
"io/ioutil"
"strconv"
"github.com/libopenstorage/openstorage/api"
"github.com/libopenstorage/openstorage/api/client"
"github.com/libopenstorage/openstorage/volume"
)
const (
graphPath = "/graph"
volumePath = "/osd-volumes"
snapPath = "/osd-snapshot"
... | 1 | 7,209 | nit: use the OptSubFolder constants. Also in the client you are using "maxdepth" but in the server the constant for "depth" is being used. | libopenstorage-openstorage | go |
@@ -76,8 +76,8 @@ describe('Config file', () => {
test('parse docker.yaml', () => {
const config = new Config(parseConfigFile(resolveConf('docker')));
checkDefaultUplink(config);
- expect(config.storage).toBe('/verdaccio/storage');
- expect(config.auth.htpasswd.file).toBe('/verdaccio/conf/h... | 1 | import path from 'path';
import _ from 'lodash';
import Config from '../../../src/lib/config';
import {parseConfigFile} from '../../../src/lib/utils';
import {DEFAULT_REGISTRY, DEFAULT_UPLINK, ROLES, WEB_TITLE} from '../../../src/lib/constants';
const resolveConf = (conf) => path.join(__dirname, `../../../conf/${co... | 1 | 18,364 | I also moved this to `/verdaccio/storage` since it's written in runtime, and the approach here is to make the configuration by default read-only. | verdaccio-verdaccio | js |
@@ -318,13 +318,13 @@ public class NodeJSGapicContext extends GapicContext implements NodeJSContext {
resourceTypeName = "a " + jsTypeName(resourceType);
}
return callbackMessage
- + "\n@returns {Stream|gax.EventEmitter}\n"
+ + "\n@returns {Stream|Promise}\n"
+ " An ... | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 18,654 | nit: s/has cancel method/has a cancel method | googleapis-gapic-generator | java |
@@ -5,6 +5,16 @@ describe Quiz do
it { should have_many(:questions).dependent(:destroy) }
+ describe ".with_questions" do
+ it "returns only quizzes with questions" do
+ first_quiz, second_quiz = create_pair(:quiz)
+
+ question = create(:question, quiz: first_quiz)
+
+ expect(Quiz.with_questio... | 1 | require "rails_helper"
describe Quiz do
it { should validate_presence_of(:title) }
it { should have_many(:questions).dependent(:destroy) }
describe "#first_question" do
it "returns the first question" do
quiz = create(:quiz)
questions = create_list(:question, 2, quiz: quiz)
expect(quiz.f... | 1 | 14,705 | Useless assignment to variable - `second_quiz`. Use `_` or `_second_quiz` as a variable name to indicate that it won't be used. | thoughtbot-upcase | rb |
@@ -81,6 +81,9 @@ func (g Gzip) Validate() error {
// used in the Accept-Encoding request headers.
func (Gzip) AcceptEncoding() string { return "gzip" }
+// Suffix returns the filename suffix of precompressed files.
+func (Gzip) Suffix() string { return ".gz" }
+
// NewEncoder returns a new gzip writer.
func (g G... | 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,363 | Is this still needed since there's the `GzipPrecompressed` type? | caddyserver-caddy | go |
@@ -29,6 +29,13 @@ from PyRegion import PyRegion
from nupic.algorithms.cla_classifier_factory import CLAClassifierFactory
+class _NumCatgoriesNotSpecified(Exception):
+ pass
+
+
+class _UnknownOutput(Exception):
+ pass
+
class CLAClassifierRegion(PyRegion):
""" | 1 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013-15, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditio... | 1 | 19,247 | this is spelled wrong and also not used so remove it | numenta-nupic | py |
@@ -65,6 +65,7 @@ public abstract class ServerWebExchangeMatchers {
* Matches any exchange
* @return the matcher to use
*/
+ @SuppressWarnings("Convert2Lambda")
public static ServerWebExchangeMatcher anyExchange() {
// we don't use a lambda to ensure a unique equals and hashcode
// which otherwise can ... | 1 | /*
* Copyright 2002-2017 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 1 | 13,759 | It might be right here that's the issue ^ | spring-projects-spring-security | java |
@@ -71,8 +71,10 @@ public interface SortedMap<K, V> extends Map<K, V>, Ordered<K> {
/**
* Returns the underlying key-comparator which defines the order of the elements contained in this map.
*
+ * @deprecated Use {@link SortedMap#comparator()} instead
* @return This map's key-comparator.
... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2017 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 11,981 | @danieldietrich let's leave existing extension. Here we just mark `keyComparator()` with `@Deprecated` annotation | vavr-io-vavr | java |
@@ -21,6 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
* HIT_END
*/
+#include <io.h>
#include <iostream>
#include <vector>
#include <stdio.h> | 1 | /* Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, co... | 1 | 8,893 | This breaks CI. I am not sure why you need to include io.h in this file especially on linux. | ROCm-Developer-Tools-HIP | cpp |
@@ -48,7 +48,7 @@ export function render(vnode, parentDom, replaceNode) {
? [replaceNode]
: oldVNode
? null
- : parentDom.firstChild
+ : parentDom.childNodes.length
? slice.call(parentDom.childNodes)
: null,
commitQueue, | 1 | import { EMPTY_OBJ } from './constants';
import { commitRoot, diff } from './diff/index';
import { createElement, Fragment } from './create-element';
import options from './options';
import { slice } from './util';
/**
* Render a Preact virtual node into a DOM element
* @param {import('./internal').ComponentChild} v... | 1 | 17,247 | this seems equivalent | preactjs-preact | js |
@@ -371,10 +371,10 @@ func NewConfig(dc *dynamicconfig.Collection, numberOfShards int, storeType strin
BlobSizeLimitError: dc.GetIntPropertyFilteredByNamespace(dynamicconfig.BlobSizeLimitError, 2*1024*1024),
BlobSizeLimitWarn: dc.GetIntPropertyFilteredByNamespace(dynamicconfig.BlobSizeLimitWarn, 512*10... | 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,248 | change size to 50MB criticial, 10MB warn... change count to 50k critical, 5k warn... | temporalio-temporal | go |
@@ -1033,9 +1033,9 @@ public class FacetComponent extends SearchComponent {
}
for (Entry<String,List<NamedList<Object>>> pivotFacetResponseFromShard : pivotFacetResponsesFromShard) {
- PivotFacet masterPivotFacet = fi.pivotFacets.get(pivotFacetResponseFromShard.getKey());
- masterPiv... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 36,007 | This has nothing to do with master/slave replication. Is this something we want to change too? If so, I guess this is an aggregation? | apache-lucene-solr | java |
@@ -91,9 +91,12 @@ module RSpec
end
def dispatch_specs(run_descriptor)
- fork { run_specs(run_descriptor) }
+ pid = fork { run_specs(run_descriptor) }
# We don't use Process.waitpid here as it was causing bisects to
- # block due to the file descript... | 1 | require 'stringio'
RSpec::Support.require_rspec_core "formatters/base_bisect_formatter"
RSpec::Support.require_rspec_core "bisect/utilities"
module RSpec
module Core
module Bisect
# A Bisect runner that runs requested subsets of the suite by forking
# sub-processes. The main process bootstraps RSpec ... | 1 | 17,750 | Maybe it makes sense to mention that those zombies are not forever, but only up to the moment when the parent process exits? Is that correct according to your observations, @benoittgt ? Please disregard this note if zombies remain after. | rspec-rspec-core | rb |
@@ -543,7 +543,18 @@ def apply_patches():
def start_apigateway(port=None, backend_port=None, asynchronous=None, update_listener=None):
port = port or config.PORT_APIGATEWAY
apply_patches()
- result = start_moto_server(
+
+ # Why here?
+ # 1. The moto mocking has to happen before any usage of botocor... | 1 | import json
import logging
import re
from typing import Dict, Optional, Tuple
from urllib.parse import parse_qs, urlparse
from moto.apigateway import models as apigateway_models
from moto.apigateway.exceptions import NoIntegrationDefined, UsagePlanNotFoundException
from moto.apigateway.responses import APIGatewayRespo... | 1 | 14,308 | moto mock setup needs to happen before boto usage. | localstack-localstack | py |
@@ -199,6 +199,8 @@ def train(params, train_set, num_boost_round=100,
callbacks = set()
else:
for i, cb in enumerate(callbacks):
+ if hasattr(cb, 'first_metric_only') and cb.first_metric_only and feval is not None:
+ raise LightGBMError("`first_metric_only` and `feval` a... | 1 | # coding: utf-8
# pylint: disable = invalid-name, W0105
"""Library with training routines of LightGBM."""
from __future__ import absolute_import
import collections
import copy
import warnings
from operator import attrgetter
import numpy as np
from . import callback
from .basic import Booster, Dataset, LightGBMError,... | 1 | 20,419 | `hasattr(cb, 'first_metric_only') and cb.first_metric_only` -> `getattr(cb, 'first_metric_only', False)` | microsoft-LightGBM | cpp |
@@ -107,3 +107,17 @@ func getProtoRequest(ctx context.Context, transportRequest *transport.Request, n
}
return ctx, call, request, nil
}
+
+type streamHandler struct {
+ handle func(ServerStream) error
+}
+
+func newStreamHandler(
+ handle func(ServerStream) error,
+) *streamHandler {
+ return &streamHandler{h... | 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 | 15,181 | no newline for function | yarpc-yarpc-go | go |
@@ -240,7 +240,7 @@ static void config_head_handle_set_scale(struct wl_client *client,
return;
}
- double scale = wl_fixed_to_double(scale_fixed);
+ float scale = wl_fixed_to_double(scale_fixed);
if (scale <= 0) {
wl_resource_post_error(config_head_resource,
ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INV... | 1 | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/util/log.h>
#include "util/signal.h"
#include "wlr-output-management-unstable-v1-protocol.h"
#define OUTPUT_MANAGER_VERSION 2
enum {
HEAD_STATE_ENABLED = 1 << 0,
HEAD_STATE_MODE = 1 << 1,
HEAD_S... | 1 | 16,367 | This makes me feel icky. We could also go the route of making `wlr_output.scale` a double instead of a float, but that would be a more widely reaching change. | swaywm-wlroots | c |
@@ -219,7 +219,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
while (true) {
if (!vp->atp &&
!(node = (vp->nl) ? vp->nl->GetItem(g, vp->k++, tdp->Usedom ? node : NULL)
- : NULL))
+ : NULL)) {
if (j) {
vp = lvlp... | 1 | /************* Tabxml C++ Program Source Code File (.CPP) **************/
/* PROGRAM NAME: TABXML */
/* ------------- */
/* Version 3.0 */
/* ... | 1 | 14,172 | Again, would be awesome if you could remove the tabs in these 3-4 lines as well. | MariaDB-server | cpp |
@@ -234,9 +234,14 @@ util::json::Object makeRouteStep(guidance::RouteStep step, util::json::Value geo
util::json::Object route_step;
route_step.values["distance"] = std::round(step.distance * 10) / 10.;
route_step.values["duration"] = std::round(step.duration * 10) / 10.;
- route_step.values["name"] =... | 1 | #include "engine/api/json_factory.hpp"
#include "engine/hint.hpp"
#include "engine/polyline_compressor.hpp"
#include "util/integer_range.hpp"
#include "util/guidance/bearing_class.hpp"
#include "util/guidance/entry_class.hpp"
#include "util/guidance/toolkit.hpp"
#include "util/typedefs.hpp"
#include <boost/assert.hp... | 1 | 17,866 | You're moving multiple times from `step.name`; you're not allowed to do that. Instead you have to copy the `step.name` string and (if you want to) move once at the very last. | Project-OSRM-osrm-backend | cpp |
@@ -124,15 +124,15 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion
$scope.validate = function() {
var error = false;
if ($scope.properties.summary === null || $scope.properties.summary.value.trim() === '') {
- OC.Notification.showTemporary(t('calendar', 'Please add a ti... | 1 | /**
* Calendar App
*
* @author Raghu Nayyar
* @author Georg Ehrke
* @copyright 2016 Raghu Nayyar <hey@raghunayyar.com>
* @copyright 2016 Georg Ehrke <oc.list@georgehrke.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
*... | 1 | 5,959 | What about `may not end`? @jancborchardt | nextcloud-calendar | js |
@@ -1236,7 +1236,7 @@ func (a *WebAPI) validateApprover(stages []*model.PipelineStage, commander, stag
return nil
}
}
- return status.Error(codes.FailedPrecondition, fmt.Sprintf("Could not approve the stage because %q isn't set as an approver.", commander))
+ return status.Error(codes.FailedPrecondition, fmt.S... | 1 | // Copyright 2020 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 20,888 | If you think about it, the status should be PermissionDenied? | pipe-cd-pipe | go |
@@ -260,8 +260,7 @@ class MappingJobQueue(threading.Thread):
low_quality_rate=stats["low_quality"] - stats["last_low_quality"],
no_match_rate=stats["no_match"] - stats["last_no_match"],
listens_per_sec=listens_per_sec,
- l... | 1 | from concurrent.futures import ThreadPoolExecutor, wait, FIRST_COMPLETED
from dataclasses import dataclass, field
import datetime
from queue import PriorityQueue, Queue, Empty
from typing import Any
from time import monotonic, sleep
import threading
import traceback
from io import StringIO
from flask import current_ap... | 1 | 19,788 | Calculation looks good but don't know what format etc grafana expects this to be in. | metabrainz-listenbrainz-server | py |
@@ -722,6 +722,18 @@ class TestDockerClient:
assert env_variable in stdout
assert "EXISTING_VAR=test_var" in stdout
+ def test_run_with_additional_arguments_add_host(self, docker_client: ContainerClient):
+ additional_flags = "--add-host sometest.localstack.cloud:127.0.0.1"
+ stdout... | 1 | import logging
import re
import time
from subprocess import CalledProcessError
from typing import NamedTuple
import pytest
from localstack import config
from localstack.utils.common import safe_run, short_uid
from localstack.utils.docker import (
ContainerClient,
ContainerException,
DockerContainerStatus,... | 1 | 13,058 | nit: We could use the `to_str(..)` util here. (let's not bother changing for this PR.. ) | localstack-localstack | py |
@@ -29,6 +29,7 @@ import (
"time"
"github.com/gogo/protobuf/types"
+ executiongenproto "github.com/temporalio/temporal/.gen/proto/execution"
tasklistpb "go.temporal.io/temporal-proto/tasklist"
)
| 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 | 9,560 | Can you rename alias to `executiongenpb`. The rule is package+"pb" for `temporal-proto` and package+"genpb" for server protos. | temporalio-temporal | go |
@@ -261,7 +261,9 @@ func addNodeToResults(n *node, results *SublistResult) {
if i := findQSliceForSub(qr[0], results.qsubs); i >= 0 {
results.qsubs[i] = append(results.qsubs[i], qr...)
} else {
- results.qsubs = append(results.qsubs, qr)
+ copyqr := make([]*subscription, len(qr))
+ copy(copyqr, qr)
+ ... | 1 | // Copyright 2016-2017 Apcera Inc. All rights reserved.
// Package sublist is a routing mechanism to handle subject distribution
// and provides a facility to match subjects from published messages to
// interested subscribers. Subscribers can have wildcard subjects to match
// multiple published subjects.
package ser... | 1 | 7,495 | Any noticeable performance hit? Any other way to avoid the allocation and copy even of the array? | nats-io-nats-server | go |
@@ -234,8 +234,8 @@ func (i2c I2C) readByte() byte {
func (i2c I2C) readLastByte() byte {
for i2c.Bus.EVENTS_RXDREADY == 0 {
}
- i2c.Bus.EVENTS_RXDREADY = 0
i2c.signalStop() // signal 'stop' now, so it is sent when reading RXD
+ i2c.Bus.EVENTS_RXDREADY = 0
return byte(i2c.Bus.RXD)
}
| 1 | // +build nrf
package machine
import (
"device/arm"
"device/nrf"
)
type GPIOMode uint8
const (
GPIO_INPUT = (nrf.GPIO_PIN_CNF_DIR_Input << nrf.GPIO_PIN_CNF_DIR_Pos) | (nrf.GPIO_PIN_CNF_INPUT_Connect << nrf.GPIO_PIN_CNF_INPUT_Pos)
GPIO_INPUT_PULLUP = GPIO_INPUT | (nrf.GPIO_PIN_CNF_PULL_Pullup << nrf.G... | 1 | 7,052 | What if you remove this line entirely from here? | tinygo-org-tinygo | go |
@@ -124,11 +124,13 @@ class PAFPN(FPN):
outs.append(F.max_pool2d(outs[-1], 1, stride=2))
# add conv layers on top of original feature maps (RetinaNet)
else:
- if self.extra_convs_on_inputs:
+ if self.add_extra_convs == 'on_input':
... | 1 | import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule
from mmcv.runner import auto_fp16
from ..builder import NECKS
from .fpn import FPN
@NECKS.register_module()
class PAFPN(FPN):
"""Path Aggregation Network for Instance Segmentation.
This is an implementation of the `PAFPN i... | 1 | 21,929 | `on_lateral` can also be implemented | open-mmlab-mmdetection | py |
@@ -67,11 +67,14 @@ public class ItunesAdapter extends ArrayAdapter<PodcastSearchResult> {
//Set the title
viewHolder.titleView.setText(podcast.title);
- if(podcast.feedUrl != null && !podcast.feedUrl.contains("itunes.apple.com")) {
- viewHolder.urlView.setText(podcast.feedUrl);
- ... | 1 | package de.danoeh.antennapod.adapter.itunes;
import android.content.Context;
import androidx.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bum... | 1 | 15,658 | Please add a space between `if` and `(`. | AntennaPod-AntennaPod | java |
@@ -30,6 +30,12 @@ import (
const (
PoolOperator = "zpool"
StatusNoPoolsAvailable = "no pools available"
+ ZpoolStatusDegraded = "DEGRADED"
+ ZpoolStatusFaulted = "FAULTED"
+ ZpoolStatusOffline = "OFFLINE"
+ ZpoolStatusOnline = "ONLINE"
+ ZpoolStatusRemoved = "REMOVED"
+ ZpoolStatusUn... | 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 | 10,606 | This statuses might have been better off with some custom status type. However, good for now. | openebs-maya | go |
@@ -165,9 +165,11 @@ func GetIPNetDeviceByName(ifaceName string) (v4IPNet *net.IPNet, v6IPNet *net.IP
if ipNet, ok := addr.(*net.IPNet); ok {
if ipNet.IP.IsGlobalUnicast() {
if ipNet.IP.To4() != nil {
+ if v4IPNet == nil {
+ v4IPNet = ipNet
+ }
+ } else if v6IPNet == nil {
v6IPNet = ip... | 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 | 44,279 | Thanks for catching the bug. Here your change lets `v4IPNet` and `v6IPNet` take the first IPv4/IPv6 address in `addrList`. Maybe choose the last one also works and makes code simpler? What's your idea? @tnqn | antrea-io-antrea | go |
@@ -680,8 +680,12 @@ class UserResource(object):
try:
return self.model.get_record(record_id)
except storage_exceptions.RecordNotFoundError:
- response = http_error(HTTPNotFound(),
- errno=ERRORS.INVALID_RESOURCE_ID)
+ detail_dict = {... | 1 | import re
import functools
import colander
import venusian
import six
from pyramid import exceptions as pyramid_exceptions
from pyramid.decorator import reify
from pyramid.security import Everyone
from pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,
HTTPNotFo... | 1 | 9,971 | nitpick: you can name this variable just `details` | Kinto-kinto | py |
@@ -0,0 +1,18 @@
+#include "general.h"
+#include "parse.h"
+
+static void installJadeParser (const langType language)
+{
+ addTagRegex(language, "^mixin[ \t]*([a-sA-Z0-9_]+)", "\\1", "d,definition", NULL);
+}
+
+
+extern parserDefinition* JadeParser (void)
+{
+ static const char* extensions[] = { "jade", NULL };
+ p... | 1 | 1 | 11,376 | The character class in the regex should probably be "[a-zA-Z0-9_]". | universal-ctags-ctags | c | |
@@ -290,12 +290,6 @@ public class GlobalSettings {
s.put("pgpSignOnlyDialogCounter", Settings.versions(
new V(45, new IntegerRangeSetting(0, Integer.MAX_VALUE, 0))
));
- s.put("openPgpProvider", Settings.versions(
- new V(46, new StringSetting(K9.NO_OPENPGP_PROVI... | 1 | package com.fsck.k9.preferences;
import java.io.File;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import android.os.Environment;
import com.fsck.k9.Account;
import com.fsck.k9.... | 1 | 16,677 | Please also increment `Settings.VERSION` and update `AccountSettings`. | k9mail-k-9 | java |
@@ -18,6 +18,12 @@ import (
"time"
)
+var builddate string // set by the Makefile
+
+func versionString() string {
+ return "Weave of " + builddate
+}
+
func ensureInterface(ifaceName string, wait bool) (iface *net.Interface, err error) {
iface, err = findInterface(ifaceName)
if err == nil || !wait { | 1 | package main
import (
"code.google.com/p/gopacket/layers"
"crypto/sha256"
"flag"
"fmt"
"github.com/davecheney/profile"
"github.com/zettio/weave"
"io"
"log"
"net"
"net/http"
"os"
"os/signal"
"runtime"
"syscall"
"time"
)
func ensureInterface(ifaceName string, wait bool) (iface *net.Interface, err error) ... | 1 | 7,168 | I think this should just say "build <date>". And when builddate wasn't set, e.g. somebody built weave with 'go build' or some other way, this should return "unknown". | weaveworks-weave | go |
@@ -142,7 +142,8 @@ public class BaseRewriteManifestsSparkAction
@Override
public RewriteManifests.Result execute() {
- JobGroupInfo info = newJobGroupInfo("REWRITE-MANIFESTS", "REWRITE-MANIFESTS");
+ JobGroupInfo info = newJobGroupInfo("REWRITE-MANIFESTS",
+ String.format("Rewriting manifests(stag... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 36,574 | Can we move this into a separate var and call it `desc` like below? | apache-iceberg | java |
@@ -19,6 +19,14 @@ package io.servicecomb.demo.pojo.server;
import java.util.Arrays;
import java.util.List;
+import javax.ws.rs.core.MediaType;
+
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotati... | 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 | 7,260 | why RpcSchema need this annotations? | apache-servicecomb-java-chassis | java |
@@ -1673,7 +1673,9 @@ func (s *Server) debugSubscribers(sub *subscription, c *client, subject, reply s
}
// Cleanup the WC entry.
s.mu.Lock()
- delete(s.sys.replies, replySubj)
+ if s.sys != nil && s.sys.replies != nil {
+ delete(s.sys.replies, replySubj)
+ }
s.mu.Unlock()
// Send the response.
s... | 1 | // Copyright 2018-2020 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,311 | Not sure it makes sense to send the reply if we did not delete from the map, but I guess it does not hurt.. | nats-io-nats-server | go |
@@ -187,10 +187,11 @@ DataMap.prototype.getSchema = function() {
* @returns {Number} Returns number of created rows.
*/
DataMap.prototype.createRow = function(index, amount, source) {
- var row,
- colCount = this.instance.countCols(),
- numberOfCreatedRows = 0,
- currentIndex;
+ let row = null;
+ let c... | 1 | import SheetClip from './../lib/SheetClip/SheetClip.js';
import {cellMethodLookupFactory} from './helpers/data';
import {columnFactory} from './helpers/setting';
import {createObjectPropListener, duckSchema, deepExtend, deepClone, isObject, deepObjectSize, hasOwnProperty} from './helpers/object';
import {extendArray, t... | 1 | 14,515 | Most of these variables can be moved after `return` or to the body of `if` statement. | handsontable-handsontable | js |
@@ -115,6 +115,10 @@ public enum JsonRpcError {
DECODE_ERROR(-50100, "Unable to decode the private signed raw transaction"),
GET_PRIVATE_TRANSACTION_NONCE_ERROR(-50100, "Unable to determine nonce for account in group."),
+ // Privacy multi-tenancy errors
+ PRIVACY_MULTI_TENANCY_NO_TOKEN(-50100, "No token prov... | 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 | 21,002 | nit: Is this actually just a http "unauthorised" response? Or is that too vague? If this is the right way to go ... is "token" the right word" Or do we want to say something else? | hyperledger-besu | java |
@@ -247,7 +247,7 @@ module Bolt
def puppetdb_client
return @puppetdb_client if @puppetdb_client
- puppetdb_config = Bolt::PuppetDB::Config.load_config(nil, config.puppetdb)
+ puppetdb_config = Bolt::PuppetDB::Config.load_config(nil, config.puppetdb, config.boltdir.path)
@puppetdb_client =... | 1 | # frozen_string_literal: true
# Avoid requiring the CLI from other files. It has side-effects - such as loading r10k -
# that are undesirable when using Bolt as a library.
require 'uri'
require 'benchmark'
require 'json'
require 'io/console'
require 'logging'
require 'optparse'
require 'bolt/analytics'
require 'bolt/... | 1 | 13,074 | We check for `$future` in PuppetDB::Config, so this won't change behavior if you don't have `future` set. | puppetlabs-bolt | rb |
@@ -1279,6 +1279,8 @@ class _Frame(object):
col_by = [_resolve_col(df, col_or_s) for col_or_s in by]
return DataFrameGroupBy(df_or_s, col_by, as_index=as_index)
if isinstance(df_or_s, Series):
+ if not isinstance(by[0], Series):
+ raise KeyError(by[0])
... | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 13,343 | I think you should remove `if isinstance(by, str):`,. We also should fix the error message `raise ValueError('Not a valid index: TODO')` to match with pandas' | databricks-koalas | py |
@@ -48,6 +48,7 @@ namespace OpenTelemetry.Instrumentation.Grpc.Implementation
activity.SetKind(ActivityKind.Client);
activity.DisplayName = grpcMethod?.Trim('/');
+ activity.SetCustomProperty("GrpcHandler.Request", request);
this.activitySource.Start(activity);
| 1 | // <copyright file="GrpcClientDiagnosticListener.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
//
// htt... | 1 | 16,358 | Curious - do we want this to be `OTel.GrpcHandler.Request`? For example, if someone is debugging a crash dump, they would get some hint that it was added by OpenTelemetry. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -52,6 +52,12 @@ public interface TableOperations {
* Implementations must check that the base metadata is current to avoid overwriting updates.
* Once the atomic commit operation succeeds, implementations must not perform any operations that
* may fail because failure in this method cannot be distinguish... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 34,901 | nit: unnecessary `</p>` | apache-iceberg | java |
@@ -194,7 +194,16 @@ std::shared_ptr<Engine> ADIOS::Open(const std::string &name,
"HDF5 library, can't use HDF5\n");
#endif
}
-
+ else if (type == "HDF5Reader") // -Junmin
+ {
+#if defined(ADIOS_HAVE_PHDF5) && defined(ADIOS_HAVE_MPI)
+ return std::make_shared<HDF5... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* ADIOS.cpp
*
* Created on: Sep 29, 2016
* Author: William F Godoy
*/
#include "ADIOS.h"
#include "ADIOS.tcc"
#include <fstream>
#include <ios> //std::ios_base::failure
#include <io... | 1 | 11,457 | Should just be `#ifdef ADIOS2_HAVE_HDF5` | ornladios-ADIOS2 | cpp |
@@ -1691,7 +1691,11 @@ def add_default_resource_props(
props["LogGroupName"] = resource_name
elif res_type == "AWS::Lambda::Function" and not props.get("FunctionName"):
- props["FunctionName"] = "{}-lambda-{}".format(stack_name[:45], short_uid())
+ # FunctionName is up to 64 characters lon... | 1 | import base64
import copy
import json
import logging
import re
import traceback
from typing import Optional
from urllib.parse import urlparse
import botocore
from moto.cloudformation import parsing
from moto.core import CloudFormationModel as MotoCloudFormationModel
from moto.ec2.utils import generate_route_id
from si... | 1 | 13,022 | FYI: I deployed a stack with multiple lengths for the stack name and resource id to cloudformation, to see how it truncates the parts for the final FunctionName | localstack-localstack | py |
@@ -301,7 +301,6 @@ func (w *WorkloadInitializer) newLoadBalancedWebServiceManifest(i *ServiceProps)
},
Port: i.Port,
HealthCheck: i.HealthCheck,
- AppDomain: i.appDomain,
Path: "/",
}
existingSvcs, err := w.Store.ListServices(i.App) | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package initialize contains methods and structs needed to initialize jobs and services.
package initialize
import (
"encoding"
"fmt"
"os"
"path/filepath"
"github.com/aws/aws-sdk-go/aws"
"github.com/a... | 1 | 18,043 | Did we not use this field @_@ | aws-copilot-cli | go |
@@ -83,6 +83,10 @@ const Config = function () {
this.extraGnArgs = {}
this.extraNinjaOpts = []
this.braveSafetyNetApiKey = getNPMConfig(['brave_safetynet_api_key']) || ''
+ this.androidKeystorePath = getNPMConfig(['android_keystore_path']) || ''
+ this.androidKeyAlias = getNPMConfig(['android_key_alias']) ||... | 1 | 'use strict'
const path = require('path')
const fs = require('fs')
const assert = require('assert')
const packages = require('../package')
const getNPMConfig = (path) => {
const key = path.join('_').replace('-', '_')
const npm_prefix = 'npm_config_'
const package_config_prefix = 'npm_package_config_'
const p... | 1 | 6,302 | shouldn't this be `android_keystore_name`? | brave-brave-browser | js |
@@ -39,7 +39,12 @@ func (c *controller) issuersForSecret(secret *corev1.Secret) ([]*v1alpha2.Cluste
}
if (iss.Spec.ACME != nil && iss.Spec.ACME.PrivateKey.Name == secret.Name) ||
(iss.Spec.CA != nil && iss.Spec.CA.SecretName == secret.Name) ||
- (iss.Spec.Vault != nil && iss.Spec.Vault.Auth.TokenSecretRef.N... | 1 | /*
Copyright 2019 The Jetstack cert-manager contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 19,782 | Double check the issuers package too :) | jetstack-cert-manager | go |
@@ -170,7 +170,7 @@ TYPING_NAMES = frozenset(
class VariableVisitConsumerAction(Enum):
- """Used after _visit_consumer to determine the action to be taken
+ """Used after _check_consumer to determine the action to be taken
Continue -> continue loop to next consumer
Return -> return and thereby br... | 1 | # Copyright (c) 2006-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) 2011-2014, 2017 Google, Inc.
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2013-2020 Cla... | 1 | 20,529 | This is out of date right? Now that `_is_first_level_self_reference` uses it as well? Perhaps we should make the docstring more general and not refer to method names that could change. | PyCQA-pylint | py |
@@ -305,6 +305,7 @@ func createK8sAppMonitoring(
}
func testPromRemoteWriteWithTLS(t *testing.T) {
+ t.Parallel()
// can't extend the names since ns cannot be created with more than 63 characters
tests := []testFramework.PromRemoteWriteTestConfig{
// working configurations | 1 | // Copyright 2016 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 17,033 | This test alone takes around 10-12 minutes to run. It has 20 subtests each of which takes around one minute. We should see if we there are redundant subtests that we can remove, or look for a way to optimize them. | prometheus-operator-prometheus-operator | go |
@@ -10,11 +10,14 @@ import options from '../options';
* @param {boolean} isSvg Whether or not this node is an SVG node
*/
export function diffProps(dom, newProps, oldProps, isSvg) {
- for (let i in newProps) {
- if (i!=='children' && i!=='key' && (!oldProps || ((i==='value' || i==='checked') ? dom : oldProps)[i]!... | 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,721 | Good call, we need to keep that check :+1: | preactjs-preact | js |
@@ -11,5 +11,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
bool ParseRequestLine(TRequestHandler handler, in ReadOnlySequence<byte> buffer, out SequencePosition consumed, out SequencePosition examined);
bool ParseHeaders(TRequestHandler handler, in ReadOnlySequence<byte> buff... | 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.Buffers;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
public interface IHttpParser<TRequestHandler... | 1 | 17,067 | Should the interface have 2 `ParseHeaders` methods? | aspnet-KestrelHttpServer | .cs |
@@ -87,9 +87,11 @@ public class HiveTableOperations extends BaseMetastoreTableOperations {
private static final String HIVE_LOCK_CHECK_MIN_WAIT_MS = "iceberg.hive.lock-check-min-wait-ms";
private static final String HIVE_LOCK_CHECK_MAX_WAIT_MS = "iceberg.hive.lock-check-max-wait-ms";
private static final Strin... | 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 | 44,597 | Nit: Does this make more sense as `iceberg.hive.metadata...`? The rest of the configs seem to start with `iceberg.hive`. | apache-iceberg | java |
@@ -184,6 +184,17 @@ func ValidateACMEIssuerDNS01Config(iss *v1alpha1.ACMEIssuerDNS01Config, fldPath
}
}
}
+ if p.DNSMadeEasy != nil {
+ if numProviders > 0 {
+ el = append(el, field.Forbidden(fldPath.Child("dnsmadeeasy"), "may not specify more than one provider type"))
+ } else {
+ numProviders+... | 1 | /*
Copyright 2018 The Jetstack cert-manager contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 13,680 | Is `baseURL` not required? | jetstack-cert-manager | go |
@@ -101,6 +101,7 @@ class EmbeddingRPNHead(nn.Module):
"""Forward function in testing stage."""
return self._decode_init_proposals(img, img_metas)
+ # TODO: is right ?
def show_result(self, data):
"""Show the init proposals in EmbeddingRPN.
| 1 | import mmcv
import torch
import torch.nn as nn
from mmcv import tensor2imgs
from mmdet.models.builder import HEADS
from ...core import bbox_cxcywh_to_xyxy
@HEADS.register_module()
class EmbeddingRPNHead(nn.Module):
"""RPNHead in the `Sparse R-CNN <https://arxiv.org/abs/2011.12450>`_ .
Unlike traditional RPN... | 1 | 22,732 | Just delete it, `embedding_rpn_head` is not a `Detector` which should have `show_result`. | open-mmlab-mmdetection | py |
@@ -7,6 +7,12 @@ namespace Datadog.Trace.ClrProfiler.ExtensionMethods
internal static string GetHttpMethod(this ISpan span)
=> span.GetTag(Tags.HttpMethod);
+ internal static string GetHost(this ISpan span)
+ => span.GetTag(Tags.HttpRequestHeadersHost);
+
+ internal stat... | 1 | using Datadog.Trace.Interfaces;
namespace Datadog.Trace.ClrProfiler.ExtensionMethods
{
internal static class SpanExtensions
{
internal static string GetHttpMethod(this ISpan span)
=> span.GetTag(Tags.HttpMethod);
internal static void DecorateWebServerSpan(
this Span spa... | 1 | 15,204 | Where do we _get_ tag values? edit: I mean, where are these `GetFoo()` methods called from? It just seems weird to me that we are getting tag values from spans. I thought we only ever _set_ tags on spans. | DataDog-dd-trace-dotnet | .cs |
@@ -197,6 +197,7 @@ func NewReader(r io.ReaderAt, size int64) (*Reader, error) {
if err != nil {
return nil, err
}
+ log.Printf("Reading kzip with %v encoding", pref)
return &Reader{
zip: archive,
root: root, | 1 | /*
* Copyright 2018 The Kythe 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 | 11,880 | This seems like log spam. Maybe expose the encoding as a method and log at the point of interest? | kythe-kythe | go |
@@ -464,7 +464,7 @@ PCO_PROTOCOL_TYPES = {
0x000c: 'P-CSCF IPv4 Address Request',
0x0010: 'IPv4 Link MTU Request',
0x8021: 'IPCP',
- 0xc023: 'Password Authentification Protocol',
+ 0xc023: 'Password Authentication Protocol',
0xc223: 'Challenge Handshake Authentication Protocol',
}
| 1 | #! /usr/bin/env python
# Copyright (C) 2017 Alessio Deiana <adeiana@gmail.com>
# 2017 Alexis Sultan <alexis.sultan@sfr.com>
# This file is part of Scapy
# Scapy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation... | 1 | 13,620 | I looked up that one, and it seems correct: Authentification is French, Authentication seems to be correct | secdev-scapy | py |
@@ -22,9 +22,13 @@
"""
Plot class used in monitor mixin framework.
"""
-import matplotlib.pyplot as plt
-import matplotlib.cm as colorModel
+import traceback
+try:
+ # We import in here to avoid creating a matplotlib dependency in nupic.
+ import matplotlib.pyplot as plt
+except ImportError:
+ print traceback.f... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This p... | 1 | 17,306 | Can we print a more human-friendly warning here, saying that plotting won't work or something along those lines? | numenta-nupic | py |
@@ -1,13 +1,15 @@
import html
import time
from typing import Optional, Tuple
-from mitmproxy import connections
+
from mitmproxy import flow
from mitmproxy import version
from mitmproxy.net import http
+from mitmproxy.proxy import context
HTTPRequest = http.Request
HTTPResponse = http.Response
+HTTPMessage = ... | 1 | import html
import time
from typing import Optional, Tuple
from mitmproxy import connections
from mitmproxy import flow
from mitmproxy import version
from mitmproxy.net import http
HTTPRequest = http.Request
HTTPResponse = http.Response
class HTTPFlow(flow.Flow):
"""
An HTTPFlow is a collection of objects re... | 1 | 15,251 | @mhils didn't we try to get rid of these (now empty) wrapper classes? | mitmproxy-mitmproxy | py |
@@ -19,6 +19,7 @@ import (
log "github.com/sirupsen/logrus"
+ "github.com/projectcalico/felix/ipsets"
"github.com/projectcalico/libcalico-go/lib/set"
)
| 1 | // Copyright (c) 2017-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 19,772 | I would avoid importing `felix/ipsets` package because this package is the windows equivalent and should be at the same level of `felix/ipsets`. We could add linux specific dependencies into `felix/ipsets` later and it will break Windows build. | projectcalico-felix | go |
@@ -137,4 +137,13 @@ public interface Catalog {
* @throws NoSuchTableException if the table does not exist
*/
Table loadTable(TableIdentifier identifier);
+
+ /**
+ * Register a table.
+ *
+ * @param identifier a table identifier
+ * @param metadataFileLocation the location of a metadata file
+ * ... | 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 | 14,266 | Maybe, `import` would be a better name. | apache-iceberg | java |
@@ -21,10 +21,11 @@ import java.util.List;
public class ProtoPagingParameters implements PagingParameters {
private static final String PARAMETER_PAGE_TOKEN = "page_token";
private static final String PARAMETER_NEXT_PAGE_TOKEN = "next_page_token";
- private static final String PARAMETER_MAX_RESULTS = "page_size... | 1 | /* Copyright 2017 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 | 30,952 | Wouldn't we want `PARAMETER_MAX_RESULTS` in here as well? (I might be miunderstanding how this is used) | googleapis-gapic-generator | java |
@@ -21,4 +21,8 @@ RSpec.configure do |config|
Capybara.default_host = "http://localhost:3000"
OmniAuth.config.test_mode = true
+
+ config.before(:suite) do
+ Role.ensure_system_roles_exist
+ end
end | 1 | ENV["RAILS_ENV"] ||= "test"
require "spec_helper"
require File.expand_path("../../config/environment", __FILE__)
require "rspec/rails"
require "shoulda/matchers"
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/support/fixtur... | 1 | 17,639 | We can re-use the config in our tests. | 18F-C2 | rb |
@@ -308,7 +308,7 @@ AC_MSG_RESULT([$LIBS])
# Dependencies that themselves have a pkg-config file available.
#
PC_REQUIRES=""
-AS_IF([test "$pmix_hwloc_support_will_build" = "yes"],
+AS_IF([test "$pmix_hwloc_source" != "cobuild"],
[PC_REQUIRES="$PC_REQUIRES hwloc"])
AS_IF([test $pmix_libevent_support -eq 1],
... | 1 | # -*- shell-script -*-
#
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2010 The University of Tennessee and The University
# o... | 1 | 9,683 | Wouldn't we have the same issue with the internal libevent? IIRC, the integration is pretty close to an exact duplicate. Or does the libevent m4 code already take that into account when setting this variable? PMIx _requires_ libevent, so it isn't like pmix_libevent_support can be anything other than 1. I'm okay with le... | openpmix-openpmix | c |
@@ -51,6 +51,9 @@ func (h *tlsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
strings.Contains(ua, "Trident") {
checked = true
mitm = !info.looksLikeEdge()
+ } else if strings.Contains(ua, "CRiOS") {
+ checked = true
+ mitm = !info.looksLikeChromeOniOS()
} else if strings.Contains(ua, "Chrome"... | 1 | package httpserver
import (
"bytes"
"context"
"crypto/tls"
"io"
"net"
"net/http"
"strings"
"sync"
"time"
)
// tlsHandler is a http.Handler that will inject a value
// into the request context indicating if the TLS
// connection is likely being intercepted.
type tlsHandler struct {
next http.Handler
... | 1 | 10,147 | The actual User-Agent string uses "CriOS" not "CRiOS" | caddyserver-caddy | go |
@@ -19,10 +19,8 @@ namespace Nethermind.Core
{
public interface IKeyValueStoreWithBatching : IKeyValueStore
{
- byte[]? this[byte[] key] { get; set; }
-
void StartBatch();
-
+
void CommitBatch();
}
-}
+} | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 24,816 | Unused code deletion. Is that a desired thing? No implementation of this actually used this indexer, so removing it seemed reasonable (and was suggested by the compiler). Maybe this had an indexer so plugins could use it? This change is definitely pushing the limits of what is appropriate in a "cleanup" as it is changi... | NethermindEth-nethermind | .cs |
@@ -489,6 +489,14 @@ module Beaker
end
rescue Exception => teardown_exception
+ begin
+ if !host.is_pe?
+ dump_puppet_log(host)
+ end
+ rescue Exception => dumping_exception
+ logger.error("Raised during attempt to dum... | 1 | require 'resolv'
require 'inifile'
require 'timeout'
require 'beaker/dsl/outcomes'
module Beaker
module DSL
# This is the heart of the Puppet Acceptance DSL. Here you find a helper
# to proxy commands to hosts, more commands to move files between hosts
# and execute remote scripts, confine test cases to ... | 1 | 5,325 | We'd lose the data here from the original teardown_exception and only get the dump_exception - I fear that that could make the actual error difficult to track if it cascades. | voxpupuli-beaker | rb |
@@ -266,6 +266,9 @@ function diffElementNodes(dom, newVNode, oldVNode, context, isSvg, excessDomChil
dom.innerHTML = newHtml && newHtml.__html || '';
}
}
+ if (newVNode.props.multiple && newVNode.type==='select') {
+ dom.multiple = newVNode.props.multiple;
+ }
diffChildren(dom, newVNode, oldVN... | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component, enqueueRender } from '../component';
import { coerceToVNode, Fragment } from '../create-element';
import { diffChildren } from './children';
import { diffProps } from './props';
import { assign } from '../util';
import options from '../options';
... | 1 | 12,667 | At this point in `diff()` we should know if we're dealing with a `component` or a native `html` element. We can reuse that information in this if-statement here :+1: | preactjs-preact | js |
@@ -215,7 +215,7 @@ func (p *Protocol) GrantEpochReward(
}
// Reward additional bootstrap bonus
- if epochNum <= a.foundationBonusLastEpoch {
+ if epochNum <= a.foundationBonusLastEpoch || (epochNum >= a.foundationBonusP2StartEpoch && epochNum <= a.foundationBonusP2EndEpoch) {
for i, count := 0, uint64(0); i <... | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 21,703 | somewhere in reward protocol, we need to do if epoch is Fairbank { a.foundationBonusP2StartEpoch = genesis.xxx a.foundationBonusP2EndEpoch = genesis.yyy p.state(sm, adminKey, &a) } that is to write the 2 new values at Fairbank height then this logic can follow | iotexproject-iotex-core | go |
@@ -200,6 +200,10 @@ if __name__ == '__main__':
inventory_dao.initialize(SQL_ENGINE)
scanner_dao.initialize(SQL_ENGINE)
+ # Drop and recreate the CloudAssetInventory table
+ inventory_dao.CaiTemporaryStore.__table__.drop(SQL_ENGINE)
+ inventory_dao.CaiTemporaryStore.__table__.create(SQL_ENGINE)
+
... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 1 | 32,604 | Dropping and recreating would delete all t he previous records, are they any important? | forseti-security-forseti-security | py |
@@ -50,6 +50,15 @@ func (m *mockCgroupManager) Destroy() error {
return nil
}
+func (m *mockCgroupManager) Exists() bool {
+ paths := m.GetPaths()
+ if paths != nil {
+ _, err := os.Lstat(paths["devices"])
+ return err == nil
+ }
+ return false
+}
+
func (m *mockCgroupManager) GetPaths() map[string]string {
r... | 1 | // +build linux
package libcontainer
import (
"fmt"
"io/ioutil"
"os"
"testing"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/intelrdt"
"github.com/opencontainers/runc/libcontainer/system"
)
type mockCg... | 1 | 19,358 | While it is technically OK to use `m.GetPaths()` here, and it's a mock code so it doesn't really matter, I'd still like to have `m.Path("devices")` used here, because since commit 714c91e9f73a1512808476eb532b4aa36bbb7530 we're not supposed to use GetPaths() for anything other than state save/restore. | opencontainers-runc | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.