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 |
|---|---|---|---|---|---|---|---|
@@ -83,9 +83,12 @@ func (opts *InitAppOpts) Validate() error {
}
}
if opts.DockerfilePath != "" {
- if _, err := listDockerfiles(opts.fs, opts.DockerfilePath); err != nil {
+ if _, err := opts.fs.Stat(opts.DockerfilePath); err != nil {
return err
}
+ if !strings.HasSuffix(opts.DockerfilePath, "/Dockerf... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/session"
"github.com/a... | 1 | 11,489 | Should we validate the suffix before going to the filesystem? | aws-copilot-cli | go |
@@ -23,8 +23,12 @@ var (
plugin = "local"
// 1 week
updateInterval = time.Hour * 24 * 7
+ siteName string
+ serviceType string
)
+const netName = "ddev_default"
+
// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Use: "ddev", | 1 | package cmd
import (
"fmt"
"os"
"path/filepath"
"strings"
"time"
log "github.com/Sirupsen/logrus"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/plugins/platform"
"github.com/drud/ddev/pkg/updatecheck"
"github.com/drud/ddev/pkg/util"
"github.com/drud/ddev/pkg/version"
"github.com/mitchell... | 1 | 11,317 | It feels like we should be working to reduce/eliminate our global vars. I'm not sure it adds much here. Any objection to just removing it? | drud-ddev | go |
@@ -0,0 +1,13 @@
+class AddScheduledReports < ActiveRecord::Migration
+ def change
+ create_table :scheduled_reports do |t|
+ t.string :name, null: false
+ t.string :frequency, null: false
+ t.integer :user_id, null: false
+ t.integer :report_id, null: false
+ t.timestamps
+ end
+ add... | 1 | 1 | 16,714 | did you consider using AR enums for this? would give us all the boolean methods (`weekly?` etc) for free | 18F-C2 | rb | |
@@ -378,6 +378,8 @@ class Engine(object):
:param filename: file basename to find
:type filename: str
"""
+ if not filename:
+ return None
filename = os.path.expanduser(filename)
if os.path.exists(filename):
return filename | 1 | """
Main BZT classes
Copyright 2015 BlazeMeter 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 | 13,726 | This may change "" into None. Better return filename. | Blazemeter-taurus | py |
@@ -126,4 +126,11 @@ type Resources struct {
// CpuWeight sets a proportional bandwidth limit.
CpuWeight uint64 `json:"cpu_weight"`
+
+ // SkipDevices allows to skip configuring device permissions.
+ // Used by e.g. kubelet while creating a parent cgroup (kubepods)
+ // common for many containers.
+ //
+ // NOTE ... | 1 | package configs
import (
systemdDbus "github.com/coreos/go-systemd/v22/dbus"
)
type FreezerState string
const (
Undefined FreezerState = ""
Frozen FreezerState = "FROZEN"
Thawed FreezerState = "THAWED"
)
type Cgroup struct {
// Deprecated, use Path instead
Name string `json:"name,omitempty"`
// name o... | 1 | 20,472 | :+1: That does resolve my security concerns about this feature. | opencontainers-runc | go |
@@ -61,8 +61,13 @@ def get_if(iff, cmd):
return ifreq
+def get_if_raw_hwaddr(iff):
+ from scapy.arch import SIOCGIFHWADDR
+ return struct.unpack("16xh6s8x", get_if(iff, SIOCGIFHWADDR))
+
# SOCKET UTILS
+
def _select_nonblock(sockets, remain=None):
"""This function is called during sendrecv() rou... | 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 common to different architectures
"""
import ctypes
import os
import socket
import struct
import subprocess
imp... | 1 | 15,903 | Could you add a docstring? | secdev-scapy | py |
@@ -92,7 +92,7 @@ func TestClientDisableIMDS(t *testing.T) {
svc := ec2metadata.New(unit.Session, &aws.Config{
LogLevel: aws.LogLevel(aws.LogDebugWithHTTPBody),
})
- resp, err := svc.Region()
+ resp, err := svc.GetUserData()
if err == nil {
t.Fatalf("expect error, got none")
} | 1 | package ec2metadata_test
import (
"net/http"
"net/http/httptest"
"os"
"strings"
"sync"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/unit"
"g... | 1 | 10,031 | Shouldn't this still be `Region()`? | aws-aws-sdk-go | go |
@@ -89,6 +89,7 @@ class CompletionView(QTreeView):
# https://github.com/The-Compiler/qutebrowser/issues/117
resize_completion = pyqtSignal()
+ connected = None
def __init__(self, win_id, parent=None):
super().__init__(parent) | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 13,065 | This shouldn't be here but `self.connected = None` in `__init__` instead, otherwise that'd be an attribute which is set this way in _every_ instance of that class (i.e. a class rather than an instance variable). I'd also say let's make it "private" (i.e. `_connected`) and please add a quick note about what it is to the... | qutebrowser-qutebrowser | py |
@@ -24,7 +24,7 @@ class ChromiumService(service.Service):
"""
def __init__(self, executable_path, port=0, service_args=None,
- log_path=None, env=None, start_error_message=None):
+ log_path=None, env=None, start_error_message=None, create_no_window=False):
"""
... | 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,877 | This would be better served as a method/property that is set when people don't want to a window. | SeleniumHQ-selenium | rb |
@@ -33,7 +33,7 @@ public class PageStreamingTransformer {
public List<PageStreamingDescriptorView> generateDescriptors(SurfaceTransformerContext context) {
List<PageStreamingDescriptorView> descriptors = new ArrayList<>();
- for (Method method : context.getInterface().getMethods()) {
+ for (Method metho... | 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 | 16,217 | I was dubious about putting getNonStreamingMethods in the context, but after some thought, I have decided to embrace the approach. In this particular case, the loop is supposed to be over page streaming methods. So, could you add a getPageStreamingMethods() method in the context, use it here, and remove the isPageStrea... | googleapis-gapic-generator | java |
@@ -600,7 +600,8 @@ class JMeterExecutor(ScenarioExecutor, WidgetProvider, FileLister, HavingInstall
self.__add_result_listeners(jmx)
if not is_jmx_generated:
self.__force_tran_parent_sample(jmx)
- if self.settings.get('version', self.JMETER_VER) >= '3.2':
+ version ... | 1 | """
Module holds all stuff regarding JMeter tool usage
Copyright 2015 BlazeMeter 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... | 1 | 14,531 | LooseVersion class can help here | Blazemeter-taurus | py |
@@ -220,7 +220,9 @@ void HDF5Common::AddVar(IO &io, std::string const &name, hid_t datasetId)
shape[i] = dims[i];
}
- auto &foo = io.DefineVariable<T>(name, shape);
+ Dims zeros(shape.size(), 0);
+
+ auto &foo = io.DefineVariable<T>(name, shape, zeros, shape);
/... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* HDF5Common.cpp
*
* Created on: April 20, 2017
* Author: Junmin
*/
#include "HDF5Common.h"
#include "HDF5Common.tcc"
#include <complex>
#include <ios>
#include <iostream>
#include ... | 1 | 12,039 | `const Dims zeros(shape.size(), 0);` | ornladios-ADIOS2 | cpp |
@@ -135,8 +135,8 @@ module RSpec::Core
options[:color] = o
end
- parser.on('-p', '--profile', 'Enable profiling of examples and list 10 slowest examples.') do |o|
- options[:profile_examples] = o
+ parser.on('-p', '--profile [COUNT]', 'Enable profiling of examples and list 1... | 1 | # http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html
require 'optparse'
module RSpec::Core
class Parser
def self.parse!(args)
new.parse!(args)
end
class << self
alias_method :parse, :parse!
end
def parse!(args)
return {} if args.empty?
convert... | 1 | 8,404 | Would be good for this not to say `10` anymore... | rspec-rspec-core | rb |
@@ -174,7 +174,7 @@ class AdSenseDashboardWidget extends Component {
</div>
}
{ ! receivingData && (
- error ? getDataErrorComponent( _x( 'AdSense', 'Service name', 'google-site-kit' ), error, true, true, true, errorObj ) : getNoDataComponent( _x( 'AdSense', 'Service name', 'google-site-... | 1 | /**
* AdSenseDashboardWidget component.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICE... | 1 | 31,916 | See above, we don't need to pass the module name here. | google-site-kit-wp | js |
@@ -4,8 +4,10 @@ declare(strict_types=1);
namespace Shopsys\FrontendApiBundle\Controller;
+use BadMethodCallException;
use Overblog\GraphQLBundle\Controller\GraphController;
use Shopsys\FrontendApiBundle\Component\Domain\EnabledOnDomainChecker;
+use Shopsys\FrontendApiBundle\Model\GraphqlConfigurator;
use Symfo... | 1 | <?php
declare(strict_types=1);
namespace Shopsys\FrontendApiBundle\Controller;
use Overblog\GraphQLBundle\Controller\GraphController;
use Shopsys\FrontendApiBundle\Component\Domain\EnabledOnDomainChecker;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Com... | 1 | 23,656 | This is random line :-) overridden String type by custom trimmed - please change that commit message to something like "introduced custom String type with automatic trimming" | shopsys-shopsys | php |
@@ -104,6 +104,19 @@ module.exports = function(realmConstructor) {
setConstructorOnPrototype(realmConstructor.Sync.User);
setConstructorOnPrototype(realmConstructor.Sync.Session);
+
+ if (realmConstructor.Sync._setFeatureToken) {
+ realmConstructor.Sync.setFeatureToken = function(f... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm 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/li... | 1 | 16,265 | My personal taste: "depreciated" -> "deprecated" | realm-realm-js | js |
@@ -58,6 +58,8 @@ var (
"destinationPodName",
"destinationPodNamespace",
"destinationNodeName",
+ "destinationClusterIP",
+ "destinationServiceName",
}
)
| 1 | // Copyright 2020 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | 1 | 21,521 | this includes the port as well right? should the name be `destinationServicePortName`? | antrea-io-antrea | go |
@@ -23,13 +23,15 @@ import os
import json
import logging
import socket
-import time
import base64
from urllib.parse import urljoin, urlencode, urlparse
from urllib.request import urlopen, Request
from urllib.error import URLError
+from tenacity import retry
+from tenacity import wait_fixed
+from tenacity imp... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 1 | 20,002 | We can import all of them in one line. | spotify-luigi | py |
@@ -1656,7 +1656,7 @@ interface StreamModule {
@Override
public Stream<T> appendAll(Iterable<? extends T> elements) {
- Objects.requireNonNull(queue, "elements is null");
+ Objects.requireNonNull(elements, "elements is null");
return isEmpty() ? Stream.ofAll(queue)... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 7,752 | this was wrong, the rest were just inconsistent :) | vavr-io-vavr | java |
@@ -23,7 +23,7 @@
</div>
</div>
- <div class="row past-pr">
+ <div id="proposals-completed" class="row past-pr">
<div class="col-md-12">
<h3>Recently Completed Purchase Requests</h3>
<%- if @approved_data.rows.any? %> | 1 | <% content_for :title, "My Requests" %>
<div class="inset">
<%= render partial: 'search_ui' %>
<div id="proposals-pending-review" class="row pending-pr first">
<div class="col-md-12">
<h3>Purchase Requests Needing Review</h3>
<%- if @pending_review_data.rows.any? %>
<%= render partial: "shar... | 1 | 16,129 | I gave them the EXACT SAME NAMES in my branch :) | 18F-C2 | rb |
@@ -96,6 +96,16 @@ func (*RunCLI) Run(args []string) int {
return 1
}
+ // Create uds dir and parents if not exists
+ dir := filepath.Dir(c.BindAddress.String())
+ if _, statErr := os.Stat(dir); os.IsNotExist(statErr) {
+ c.Log.WithField("dir", dir).Infof("Creating spire agent UDS directory")
+ if err := os.Mk... | 1 | package run
import (
"context"
"crypto/x509"
"encoding/pem"
"errors"
"flag"
"fmt"
"io/ioutil"
"net"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/hashicorp/hcl"
"github.com/imdario/mergo"
"github.com/spiffe/spire/pkg/agent"
"github.com/spiffe/spire/pkg/common/catalog"
"github.com/spiffe/spire/... | 1 | 11,715 | What would you think stat'ing the directory first before doing the log+mkdirall and only proceeding if the directory does not exist? The logging might be less confusing (I'd be wondering why it was logging that it was creating the directory when I knew it already existed). | spiffe-spire | go |
@@ -339,7 +339,7 @@ namespace Datadog.Trace.Agent
}
// Add the current keep rate to the root span
- var rootSpan = trace.Array[trace.Offset].Context.TraceContext?.RootSpan;
+ var rootSpan = trace.Array[trace.Offset].InternalContext.TraceContext?.RootSpan;
i... | 1 | // <copyright file="AgentWriter.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using System;
using System... | 1 | 24,070 | Sorry about the confusion, I'm trying to address that in the PR follow-up. If we ever have `Span` objects, then accessing their properties is going to be safe. The only question remaining is "What is the runtime type for Scope.Span?" and we just have to account for it when it is `Datadog.Trace.Span` and when it is not | DataDog-dd-trace-dotnet | .cs |
@@ -9,6 +9,12 @@ import static com.github.javaparser.JavaParser.*;
import static com.github.javaparser.utils.Utils.EOL;
import static org.junit.Assert.*;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.io.BufferedWriter;
+
publ... | 1 | package com.github.javaparser.printer;
import com.github.javaparser.JavaParser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.expr.Expression;
import org.junit.Test;
import static com.github.javaparser.JavaParser.*;
import static com.github.javaparser.utils.Utils.EOL;
import stati... | 1 | 12,155 | I was using this imports for writing the results to file to more easily check that it was valid JSON. You can probably remove these `java.io` imports. | javaparser-javaparser | java |
@@ -21,6 +21,11 @@ type pid struct {
Pid int `json:"Pid"`
}
+type logentry struct {
+ Msg string
+ Level string
+}
+
func TestNsenterValidPaths(t *testing.T) {
args := []string{"nsenter-exec"}
parent, child, err := newPipe() | 1 | package nsenter
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"strings"
"testing"
"github.com/opencontainers/runc/libcontainer"
"github.com/vishvananda/netlink/nl"
"golang.org/x/sys/unix"
)
type pid struct {
Pid int `json:"Pid"`
}
func TestNsenterValidPaths(t *testing.T) {
ar... | 1 | 17,610 | You should probably include a `json:...` annotation here. | opencontainers-runc | go |
@@ -38,6 +38,7 @@ import (
const (
ecsMaxReasonLength = 255
+ ecsMaxRuntimeIDLength = 255
pollEndpointCacheSize = 1
pollEndpointCacheTTL = 20 * time.Minute
roundtripTimeout = 5 * time.Second | 1 | // Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... | 1 | 23,019 | can container ID > 255 chars? why are we doing this check? | aws-amazon-ecs-agent | go |
@@ -111,6 +111,7 @@ return [
'prohibited' => 'This field is prohibited.',
'prohibited_if' => 'This field is prohibited when :other is :value.',
'prohibited_unless' => 'This field is prohibited unless :other is in :values.',
+ 'prohibits' => 'This field field prohibits :o... | 1 | <?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator ... | 1 | 9,250 | *"This **field field** prohibits :other from being present."*, **field** word repeated is right? | Laravel-Lang-lang | php |
@@ -36,6 +36,7 @@ import (
"github.com/vmware-tanzu/antrea/pkg/agent/flowexporter/flowrecords"
"github.com/vmware-tanzu/antrea/pkg/agent/interfacestore"
"github.com/vmware-tanzu/antrea/pkg/agent/metrics"
+ npl "github.com/vmware-tanzu/antrea/pkg/agent/npl"
"github.com/vmware-tanzu/antrea/pkg/agent/openflow"
"... | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 27,432 | nit: no need to add an alias for this case. | antrea-io-antrea | go |
@@ -4,15 +4,16 @@ import (
"fmt"
"io"
"os"
+ "strconv"
"sync"
)
-var out io.Writer = os.Stdout
-
// LogLevel of quic-go
type LogLevel uint8
const (
+ logEnv = "QUIC_GO_LOG_LEVEL"
+
// LogLevelDebug enables debug logs (e.g. packet contents)
LogLevelDebug LogLevel = iota
// LogLevelInfo enables info... | 1 | package utils
import (
"fmt"
"io"
"os"
"sync"
)
var out io.Writer = os.Stdout
// LogLevel of quic-go
type LogLevel uint8
const (
// LogLevelDebug enables debug logs (e.g. packet contents)
LogLevelDebug LogLevel = iota
// LogLevelInfo enables info logs (e.g. packets)
LogLevelInfo
// LogLevelError enables er... | 1 | 5,822 | Or `QUIC_LOG_LEVEL`. Which one do you prefer? | lucas-clemente-quic-go | go |
@@ -117,7 +117,14 @@ func GetDiskInfos(virtualHardware *ovf.VirtualHardwareSection, diskSection *ovf.
return diskInfos, err
}
- byteCapacity, err := Parse(int64(capacityRaw), *virtualDiscDesc.CapacityAllocationUnits)
+ var allocationUnits string
+ if virtualDiscDesc.CapacityAllocationUnits == nil ||
+ ... | 1 | // Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 9,462 | Minor: you can set it to byte here and only set it to *virtualDiscDesc.CapacityAllocationUnits if that's not nil/"". Saves two lines | GoogleCloudPlatform-compute-image-tools | go |
@@ -70,6 +70,18 @@ class BucketViewTest(BaseWebTest, unittest.TestCase):
headers=self.headers,
status=400)
+ def test_buckets_can_handle_arbitrary_attributes(self):
+ bucket = MINIMALIST_BUCKET.copy()
+ fingerprint = "5866f245a00bb3a39100d31b2f14d... | 1 | from pyramid.security import Authenticated
from .support import (BaseWebTest, unittest, get_user_headers,
MINIMALIST_BUCKET, MINIMALIST_GROUP,
MINIMALIST_COLLECTION, MINIMALIST_RECORD)
class BucketViewTest(BaseWebTest, unittest.TestCase):
collection_url = '/buckets'
... | 1 | 8,753 | While reading this I found that it makes actually little sense for "beers" to have a "fingerprint". We might want to do another pass on the examples here to use something that actually makes more sense to the reader. This could be done in another issue. | Kinto-kinto | py |
@@ -365,7 +365,7 @@ public abstract class AbstractMultimapTest extends AbstractTraversableTest {
@Test
public void shouldConvertToMap() {
Multimap<Integer, Integer> mm = emptyIntInt().put(1, 2).put(1, 3);
- assertThat(mm.asMap().get(1).get().mkString(",")).isEqualTo("2,3");
+ assertThat... | 1 | /* __ __ __ __ __ ___
* \ \ / / \ \ / / __/
* \ \/ / /\ \ \/ / /
* \____/__/ \__\____/__/
*
* Copyright 2014-2018 Vavr, http://vavr.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... | 1 | 13,033 | Thank you! That's better, especially the conversion test should not test the mkString method :) | vavr-io-vavr | java |
@@ -70,9 +70,10 @@ class ScintillaTextInfo(textInfos.offsets.OffsetsTextInfo):
return watchdog.cancellableSendMessage(self.obj.windowHandle,SCI_POSITIONFROMPOINT,x,y)
def _getPointFromOffset(self,offset):
+ location = self.obj.location
point=textInfos.Point(
- watchdog.cancellableSendMessage(self.obj.window... | 1 | import ctypes
import IAccessibleHandler
import speech
import textInfos.offsets
import winKernel
import winUser
import globalVars
import controlTypes
import config
from . import Window
from .. import NVDAObjectTextInfo
from ..behaviors import EditableTextWithAutoSelectDetection
import locale
import watchdog... | 1 | 24,868 | You're basically converting client to screen coordinates here, doing it manually. Is there a specific reason why you aren't using clientToScreen here? Does it fail? | nvaccess-nvda | py |
@@ -340,6 +340,10 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj
}
// If can't server side copy, do it manually
if err == fs.ErrorCantCopy {
+ if fs.Config.MaxTransfer >= 0 && (accounting.Stats(ctx).GetBytes() >= int64(fs.Config.MaxTransfer) ||
+ (fs.Config.MaxTransfer... | 1 | // Package operations does generic operations on filesystems and objects
package operations
import (
"bytes"
"context"
"encoding/csv"
"fmt"
"io"
"io/ioutil"
"path"
"path/filepath"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/pkg/errors"
"github.com/rclone/rclone/fs"
"github.com/... | 1 | 9,723 | This needs to be done for server-side copies too, earlier in the function. | rclone-rclone | go |
@@ -26,7 +26,13 @@ import (
"github.com/lyft/clutch/backend/service"
)
-var scopes = []string{oidc.ScopeOpenID, "email"} // TODO(maybe): make scopes part of config?
+// TODO(maybe): make scopes part of config?
+// For more documentation on scopes see: https://developer.okta.com/docs/reference/api/oidc/#scopes
+var... | 1 | package authn
// <!-- START clutchdoc -->
// description: Produces tokens for the configured OIDC provider.
// <!-- END clutchdoc -->
import (
"context"
"errors"
"fmt"
"net/http"
"net/url"
"strings"
"time"
"github.com/coreos/go-oidc"
"github.com/dgrijalva/jwt-go"
"github.com/golang/protobuf/ptypes"
"githu... | 1 | 8,758 | Do we want to add in `profile` here as well so we request access to the end user's default profile claims like name? | lyft-clutch | go |
@@ -0,0 +1,10 @@
+module ProposalSpecHelper
+ def fully_approve(proposal)
+ proposal.individual_approvals.each do |approval|
+ approval.reload
+ approval.approve!
+ end
+ expect(proposal.reload).to be_approved # sanity check
+ deliveries.clear
+ end
+end | 1 | 1 | 15,076 | I am not sure what the difference between approving and full approving is... | 18F-C2 | rb | |
@@ -17,7 +17,7 @@ package main
import (
"time"
- "github.com/docopt/docopt-go"
+ docopt "github.com/docopt/docopt-go"
log "github.com/sirupsen/logrus"
"github.com/projectcalico/felix/iptables" | 1 | // Copyright (c) 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 appli... | 1 | 16,673 | Please back out the import changes in files you haven't touched. I think these happen if you run goimports without having the vendor directory populated | projectcalico-felix | c |
@@ -127,7 +127,7 @@ public class TestSubQueryTransformer extends SolrTestCaseJ4 {
//System.out.println("p "+peopleMultiplier+" d "+deptMultiplier);
assertQ("subq1.fl is limited to single field",
req("q","name_s:(john nancy)", "indent","true",
- "fl","name_s_dv,depts:[subquery]",
+ ... | 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 | 26,055 | Many tests in this class seem to have just been fortunate that `SolrIndexSearcher` ignored `fl` and retrieved all fields when not using lazy loading. | apache-lucene-solr | java |
@@ -14,7 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with Scapy. If not, see <http://www.gnu.org/licenses/>.
-# scapy.contrib.description = GENEVE
+# flake8: noqa: E501
+
+# scapy.contrib.description = Generic Network Virtualization Encapsulation (GENEVE)
# scapy.contrib.st... | 1 | # Copyright (C) 2018 Hao Zheng <haozheng10@gmail.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, either version 2 of the License, or
# any later version.
#
# Scapy is... | 1 | 13,299 | Is this really needed? | secdev-scapy | py |
@@ -39,8 +39,12 @@ module RSpec
example_group_aliases << name
- (class << RSpec; self; end).__send__(:define_method, name) do |*args, &example_group_block|
- RSpec.world.register RSpec::Core::ExampleGroup.__send__(name, *args, &example_group_block)
+ (class << RSpec; self; end).insta... | 1 | module RSpec
module Core
# DSL defines methods to group examples, most notably `describe`,
# and exposes them as class methods of {RSpec}. They can also be
# exposed globally (on `main` and instances of `Module`) through
# the {Configuration} option `expose_dsl_globally`.
#
# By default the me... | 1 | 14,451 | Is this necessary with line 38? | rspec-rspec-core | rb |
@@ -148,7 +148,7 @@ if "CI_EXTRA_COMPILE_ARGS" in os.environ:
# https://stackoverflow.com/questions/29870629/pip-install-test-dependencies-for-tox-from-setup-py
test_deps = [
"pandas",
- "pytest>=3.0",
+ "pytest>=3.1",
"pytest-cov",
"pytest-benchmark>=3.1",
] | 1 | #!/usr/bin/env python
# Copyright 2017 H2O.ai; Apache License Version 2.0; -*- encoding: utf-8 -*-
"""
Build script for the `datatable` module.
$ python setup.py bdist_wheel
$ twine upload dist/*
"""
import os
import sys
import re
import subprocess
import sysconfig
from setuptools import setup, find_packages
... | 1 | 10,790 | DO we want to have >= here? Or == | h2oai-datatable | py |
@@ -10,7 +10,7 @@ namespace Datadog.Trace
/// <summary>
/// The environment of the profiled service.
/// </summary>
- public const string Env = "env";
+ public const string Env = CoreTags.Env;
/// <summary>
/// The version of the profiled service. | 1 | using System;
namespace Datadog.Trace
{
/// <summary>
/// Standard span tags used by integrations.
/// </summary>
public static class Tags
{
/// <summary>
/// The environment of the profiled service.
/// </summary>
public const string Env = "env";
/// <summa... | 1 | 16,510 | Can you also add this `"version"` tag to the CoreTags? Now that we're targeting the service/env/version trio | DataDog-dd-trace-dotnet | .cs |
@@ -29,6 +29,14 @@ class SkuTest extends TestCase
$this->assertEquals($sku, $sku->getValue());
}
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testInvalidVAlue(): void
+ {
+ $sku = new Sku('yKL3rWXluEM7NapnMSVpYHpicQJkpJ0Obfx91mma0xwnQxUfsrwy5Nfki1... | 1 | <?php
/**
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types = 1);
namespace Ergonode\Product\Tests\Domain\ValueObject;
use Ergonode\Product\Domain\ValueObject\Sku;
use PHPUnit\Framework\TestCase;
/**
* Class SkuTest
*/
class SkuTes... | 1 | 8,474 | This entry will be incompatible with the currently implemented formatting rules. Maximum 120 characters per line. | ergonode-backend | php |
@@ -234,7 +234,11 @@ module Beaker
output_callback = nil
else
@logger.debug "\n#{log_prefix} #{Time.new.strftime('%H:%M:%S')}$ #{cmdline}"
- output_callback = logger.method(:host_output)
+ if @options[:preserve_host_output]
+ output_callback = logger.method(:preserve_host... | 1 | require 'socket'
require 'timeout'
require 'benchmark'
require 'rsync'
[ 'command', 'ssh_connection'].each do |lib|
require "beaker/#{lib}"
end
module Beaker
class Host
SELECT_TIMEOUT = 30
class CommandFailure < StandardError; end
# This class provides array syntax for using puppet --configprint on ... | 1 | 10,296 | Let's call this color_host_output or some such - preserve_host_output makes it sound like you won't get any output without this being set. | voxpupuli-beaker | rb |
@@ -6,7 +6,7 @@ var attr,
attrName,
allowed,
role = node.getAttribute('role'),
- attrs = node.attributes;
+ attrs = axe.utils.getNodeAttributes(node);
if (!role) {
role = axe.commons.aria.implicitRole(node); | 1 | options = options || {};
var invalid = [];
var attr,
attrName,
allowed,
role = node.getAttribute('role'),
attrs = node.attributes;
if (!role) {
role = axe.commons.aria.implicitRole(node);
}
allowed = axe.commons.aria.allowedAttr(role);
if (Array.isArray(options[role])) {
allowed = axe.utils.uniqueArray(optio... | 1 | 14,132 | suggestion: if we perhaps make `attributes` a getter in `virtualNode`, it does look seamless to access the property, same as what we have done for `isFocusable` or `tabbableElements`. `node.attributes` can become `virtualNode.attributes` | dequelabs-axe-core | js |
@@ -55,6 +55,7 @@ public class FeedMedia extends FeedFile implements Playable {
private Date playbackCompletionDate;
private int startPosition = -1;
private int playedDurationWhenStarted;
+ private String lastPlaybackSpeed = null;
// if null: unknown, will be checked
private Boolean hasEmb... | 1 | package de.danoeh.antennapod.core.feed;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.database.Cursor;
import android.media.MediaMetadataRetriever;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.... | 1 | 15,097 | I think a float value fits better. | AntennaPod-AntennaPod | java |
@@ -90,6 +90,11 @@ func (s *server) setupRouting() {
),
})
+ handle(router, "/pss/{topic}/ws", jsonhttp.MethodHandler{
+ "GET": http.HandlerFunc(s.pssPostHandler),
+ //"POST": http.HandlerFunc(s.pssPostHandler), // WS does not use verbs
+ })
+
handle(router, "/tags", web.ChainHandlers(
s.gatewayModeForbid... | 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 api
import (
"fmt"
"net/http"
"strings"
"github.com/ethersphere/bee/pkg/jsonhttp"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethers... | 1 | 12,383 | This should be (POST,DELETE) `/pss/subscribe/{topic}` for subscriptions and there should be `/pss/send/{topic}` for sending. | ethersphere-bee | go |
@@ -13,6 +13,9 @@ export function createContext(defaultValue) {
_id: '__cC' + i++,
_defaultValue: defaultValue,
Consumer(props, context) {
+ this.shouldComponentUpdate = function (_props, _state, _context) {
+ return _context !== context;
+ };
return props.children(context);
},
Provider(props)... | 1 | import { enqueueRender } from './component';
export let i = 0;
/**
*
* @param {any} defaultValue
*/
export function createContext(defaultValue) {
const ctx = {};
const context = {
_id: '__cC' + i++,
_defaultValue: defaultValue,
Consumer(props, context) {
return props.children(context);
},
Provider(... | 1 | 14,118 | Closing over the closure arguments is a neat trick :+1: Love it :100: | preactjs-preact | js |
@@ -156,11 +156,12 @@ public class TestEvaluatior {
@Test
public void testCaseSensitiveNot() {
TestHelpers.assertThrows(
- "X != x when case sensitivity is on",
- ValidationException.class,
- "Cannot find field 'X' in struct",
- () -> { new Evaluator(STRUCT, not(equal("X", 7)), true); }
-... | 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 | 13,111 | Does this need to be a block or can it be an expression? | apache-iceberg | java |
@@ -148,7 +148,7 @@ public abstract class LoginAbstractAzkabanServlet extends
buf.append("\"");
buf.append(req.getMethod()).append(" ");
buf.append(req.getRequestURI()).append(" ");
- if (req.getQueryString() != null) {
+ if (req.getQueryString() != null && allowedPostRequest(req)) {
buf.app... | 1 | /*
* Copyright 2012 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 13,997 | req.getQueryString() != null is not necessary since same check is already done in allowedPostRequest | azkaban-azkaban | java |
@@ -128,6 +128,8 @@ public abstract class DynamicLangXApiView implements ViewModel {
@Nullable
public abstract String grpcTransportImportName();
+ public abstract boolean isRestOnlyTransport();
+
@Override
public String resourceRoot() {
return SnippetSetRunner.SNIPPET_RESOURCE_ROOT; | 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 | 31,000 | As per go/actools-regapic-design, in the final product, generated GAPICs must be able to support multiple transports if supported by the API. For Java, we'll support this in the microgenerator; the monolith generates single-transport GAPICs. For PHP, the situation is likely similar, though on a longer timescale. All th... | googleapis-gapic-generator | java |
@@ -13,5 +13,5 @@ return [
*/
'failed' => 'یہ تفصیلات ہمارے ریکارڈ سے مطابقت نہیں رکھتیں۔',
- 'throttle' => 'لاگ اِن کرنے کی بہت زیادہ کوششیں۔ براہِ مہربانی :seconds سیکنڈ میں دوبارہ کوشش کریں۔',
+ 'throttle' => 'لاگ اِن کرنے کی بہت زیادہ کوششیں۔ براہِ مہربانی کچھ سیکنڈز میں دوبارہ کوشش کریں۔',
]; | 1 | <?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages th... | 1 | 6,991 | here is `:seconds` missing again | Laravel-Lang-lang | php |
@@ -5,14 +5,14 @@ module DelayedJobsHelpers
end
end
- def stub_mail_method(method_name)
+ def stub_mail_method(klass, method_name)
stub('mail', deliver: true).tap do |mail|
- Mailer.stubs(method_name => mail)
+ klass.stubs(method_name => mail)
end
end
- def stub_mail_method_to_rais... | 1 | module DelayedJobsHelpers
def stubbed_purchase
build_stubbed(:section_purchase).tap do |purchase|
Purchase.stubs(:find).with(purchase.id).returns(purchase)
end
end
def stub_mail_method(method_name)
stub('mail', deliver: true).tap do |mail|
Mailer.stubs(method_name => mail)
end
end
... | 1 | 7,701 | Changed this helper to also get class name. | thoughtbot-upcase | rb |
@@ -35,6 +35,7 @@ public interface CapabilityType {
String PROXY = "proxy";
String SUPPORTS_WEB_STORAGE = "webStorageEnabled";
String ROTATABLE = "rotatable";
+ String APPLICATION_NAME = "applicationName";
// Enable this capability to accept all SSL certs by defaults.
String ACCEPT_SSL_CERTS = "acceptSs... | 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,114 | I think there's another spot for this in DefaultCapabilityMatcher | SeleniumHQ-selenium | rb |
@@ -15,6 +15,9 @@
#include <valgrind/helgrind.h>
#endif
+// default actor batch size
+#define PONY_ACTOR_DEFAULT_BATCH 100
+
// Ignore padding at the end of the type.
pony_static_assert((offsetof(pony_actor_t, gc) + sizeof(gc_t)) ==
sizeof(pony_actor_pad_t), "Wrong actor pad size!"); | 1 | #define PONY_WANT_ATOMIC_DEFS
#include "actor.h"
#include "../sched/scheduler.h"
#include "../sched/cpu.h"
#include "../mem/pool.h"
#include "../gc/cycle.h"
#include "../gc/trace.h"
#include "ponyassert.h"
#include <assert.h>
#include <string.h>
#include <dtrace.h>
#ifdef USE_VALGRIND
#include <valgrind/helgrind.h>
#... | 1 | 13,407 | Why the rename from PONY_SCHED_BATCH ? ACTOR_DEFAULT_BATCH is less meaningful to me than SCHED_BATCH. | ponylang-ponyc | c |
@@ -35,6 +35,10 @@ var log = logging.Logger("/fil/storage")
const makeDealProtocol = protocol.ID("/fil/storage/mk/1.0.0")
const queryDealProtocol = protocol.ID("/fil/storage/qry/1.0.0")
+// TODO: replace this with a queries to pick reasonable gas price and limits.
+const submitPostGasPrice = 0
+const submitPostGasL... | 1 | package storage
import (
"context"
"fmt"
"math/big"
"math/rand"
"sync"
"time"
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
hamt "gx/ipfs/QmRXf2uUSdGSunRJsM9wXSUNVwLUGCY3So5fAs7h2CBJVf/go-hamt-ipld"
bserv "gx/ipfs/QmVDTbzzTwnuBwNbJdhW3u7LoBQp46bezm9yp4z1RoEepM/go-blockservice"
"gx/ipfs/QmV... | 1 | 15,644 | Let's be sure we have an issue that tracks this, filed against testnet. | filecoin-project-venus | go |
@@ -9,6 +9,9 @@ function SIN(type, payload) {
SIN.super_.call(this, type, payload);
return;
}
+ if ( !Buffer.isBuffer(payload) || payload.length != 20)
+ throw new Error('Payload must be 20 bytes');
+
this.data = new Buffer(1 + 1 + payload.length);
this.converters = this.encodings['binary'].conv... | 1 | 'use strict';
var VersionedData = require('../util/VersionedData');
var EncodedData = require('../util/EncodedData');
var util = require('util');
var coinUtil = require('../util');
function SIN(type, payload) {
if (typeof type != 'number') {
SIN.super_.call(this, type, payload);
return;
}
this.data = new... | 1 | 12,872 | There should be no space before !Buffer | bitpay-bitcore | js |
@@ -57,4 +57,6 @@ storiesOf( 'Global', module )
/>
</p>
</div>;
+ }, {
+ padding: 0,
} ); | 1 | /**
* Page Header Stories.
*
* 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/licenses/LICENSE-2.0
*
*... | 1 | 38,266 | Same here, we need the default padding for this story. | google-site-kit-wp | js |
@@ -348,8 +348,12 @@ class InfluxListenStore(ListenStore):
int: the number of bytes this user's listens take in the dump file
"""
self.log.info('Dumping user %s...', username)
+
+ t0 = time.time()
offset = 0
bytes_written = 0
+ listen_count = 0
+
#... | 1 | # coding=utf-8
import listenbrainz.db.user as db_user
import os.path
import subprocess
import tarfile
import tempfile
import time
import shutil
import ujson
import uuid
from collections import defaultdict
from datetime import datetime
from influxdb import InfluxDBClient
from influxdb.exceptions import InfluxDBClientE... | 1 | 14,725 | I think this should go away, its noise in the grand scheme of things. | metabrainz-listenbrainz-server | py |
@@ -1273,6 +1273,17 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e
}
}
+ // Create/Remove git-daemon-export-ok for git-daemon...
+ daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`)
+ if repo.IsPrivate {
+ // NOTE: Gogs doesn't actually care about t... | 1 | // Copyright 2014 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 models
import (
"bytes"
"errors"
"fmt"
"html/template"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"sort"
"strings"
"sync... | 1 | 10,969 | Maybe just call `ioutil.WriteFile` with 0 bytes? And Make an error log `log.Error` if any error occurs. | gogs-gogs | go |
@@ -490,6 +490,18 @@ class Builder {
return this;
}
+ /**
+ * Sets the {@link ie.ServiceBuilder} to use to manage the geckodriver
+ * child process when creating IE sessions locally.
+ *
+ * @param {ie.ServiceBuilder} service the service to use.
+ * @return {!Builder} a self reference.
+ */
+ se... | 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 | 15,736 | `this.ieService_` should be initialized to null in the constructor. | SeleniumHQ-selenium | js |
@@ -313,11 +313,17 @@ func (r *DefaultRuleRenderer) filterOutputChain() *Chain {
// That decision is based on pragmatism; it's generally very useful to be able to contact
// any local workload from the host and policing the traffic doesn't really protect
// against host compromise. If a host is compromised, then... | 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,812 | I just noticed that we use Return here, when we have logically allowed a packet, whereas in the forward chain we use AcceptAction. Do you know why that is? | projectcalico-felix | go |
@@ -35,7 +35,7 @@ public class PojoProducers implements BeanPostProcessor {
pojoMgr.register(pojoProducer.getSchemaId(), pojoProducer);
}
- public Collection<PojoProducerMeta> getProcucers() {
+ public Collection<PojoProducerMeta> getProducers() {
return pojoMgr.values();
}
| 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,668 | This is public method , we need to deprecated this method first and add new updated method for it. | apache-servicecomb-java-chassis | java |
@@ -199,7 +199,10 @@ func generateNetworkTemplate(templateFilename string, wallets, relays, nodeHosts
newNode.NodeNameMatchRegex = ""
newNode.FractionApply = 0.0
newNode.Name = name
- newNode.IsRelay = true
+ if newNode.NetAddress == "" {
+ // if not set by relayTemplate ensure that it is a relay
+ newNo... | 1 | // Copyright (C) 2019 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any l... | 1 | 35,810 | I think that you don't want to have these workarounds; you want to make sure that the relayTemplates is configured correctly. If not, we need to fix it there. | algorand-go-algorand | go |
@@ -306,7 +306,8 @@ public class ProtocolScheduleBuilder {
config.getEvmStackSize(),
isRevertReasonEnabled,
config.getEcip1017EraRounds(),
- quorumCompatibilityMode));
+ quorumCompatibilityMode,
+ config.getThanosBlockNumber()));
LOG.info("P... | 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 | 23,957 | This field is not needed. | hyperledger-besu | java |
@@ -6,7 +6,10 @@ class Subscriber::CancellationsController < ApplicationController
end
def create
- @cancellation = Cancellation.new(subscription: current_user.subscription)
+ @cancellation = Cancellation.new(
+ subscription: current_user.subscription,
+ reason: cancellation_params[:reason],
+ ... | 1 | class Subscriber::CancellationsController < ApplicationController
before_filter :must_be_subscription_owner
def new
@cancellation = Cancellation.new(subscription: current_user.subscription)
end
def create
@cancellation = Cancellation.new(subscription: current_user.subscription)
if @cancellation.s... | 1 | 18,370 | Put a comma after the last parameter of a multiline method call. | thoughtbot-upcase | rb |
@@ -9,6 +9,7 @@ package e2etest
import (
"context"
"fmt"
+ "github.com/iotexproject/iotex-address/address"
"math/big"
"math/rand"
"testing" | 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 | 23,696 | move to line 18 below | iotexproject-iotex-core | go |
@@ -1,11 +1,16 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
+# Purpose
+# This code example demonstrates how to upload an encrypted object to an
+# Amazon Simple Storage Solution (Amazon S3) bucket.
+
+# snippet-start:[s3.ruby.s3_add_csaes_encry... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
require 'aws-sdk-s3'
require 'openssl'
# Uploads an encrypted object to an Amazon S3 bucket.
#
# Prerequisites:
#
# - An Amazon S3 bucket.
#
# @param s3_encryption_client [Aws::S3::EncryptionV2... | 1 | 20,534 | Simple Storage **Service** | awsdocs-aws-doc-sdk-examples | rb |
@@ -81,6 +81,19 @@ root
")
end
+ it "can output indented messages" do
+ root = RSpec.describe("root")
+ root.example("example") {|example| example.reporter.message("message")}
+
+ root.run(reporter)
+
+ expect(formatter_output.string).to eql("
+root
+ message
+ example
+")
+ end
+
... | 1 | require 'rspec/core/formatters/documentation_formatter'
module RSpec::Core::Formatters
RSpec.describe DocumentationFormatter do
include FormatterSupport
before do
send_notification :start, start_notification(2)
end
def execution_result(values)
RSpec::Core::Example::ExecutionResult.new.t... | 1 | 17,422 | Thats odd, I'd actually not expect this output at all... | rspec-rspec-core | rb |
@@ -53,7 +53,7 @@ module Travis
go_version_aliases: ENV.fetch(
'TRAVIS_BUILD_GO_VERSION_ALIASES', (
{
- '1' => '1.7.4',
+ '1' => '1.8',
'1.0' => '1.0.3',
'1.0.x' => '1.0.3',
'1.1.x' => '1.1.2', | 1 | require 'hashr'
require 'travis/config'
module Travis
module Build
class Config < Travis::Config
extend Hashr::Env
self.env_namespace = 'travis_build'
def go_version_aliases_hash
@go_version_aliases_hash ||= begin
{}.tap do |aliases|
go_version_aliases.untaint.spl... | 1 | 14,941 | As a side note, I get why this is up here (sort order), but it'd be easier to not forget to update it if it were down next to `1.x` -- would it be acceptable to make that change the next time I make this sort of PR? :smile: :innocent: (don't want to hold this one up since folks are blocked on getting this one in, it's ... | travis-ci-travis-build | rb |
@@ -92,14 +92,14 @@ public class AccountPermissioningControllerFactoryTest {
}
@Test
- public void createOnchainConfigWithAccountPermissioningDisabledShouldReturnEmpty() {
- SmartContractPermissioningConfiguration onchainConfig =
+ public void createFlexibleConfigWithAccountPermissioningDisabledShouldRetur... | 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 | 26,750 | this class is permissioning so let's keep "Onchain" here | hyperledger-besu | java |
@@ -4,7 +4,7 @@ using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attrib... | 1 | using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an ... | 1 | 20,771 | we can be more specific to call out the it is "AutoRest C# code generator"? | Azure-autorest | java |
@@ -124,3 +124,5 @@ class VirtualNode extends axe.AbstractVirtualNode {
return this._cache.boundingClientRect;
}
}
+
+axe.VirtualNode = VirtualNode; | 1 | // class is unused in the file...
// eslint-disable-next-line no-unused-vars
class VirtualNode extends axe.AbstractVirtualNode {
/**
* Wrap the real node and provide list of the flattened children
* @param {Node} node the node in question
* @param {VirtualNode} parent The parent VirtualNode
* @param {String} s... | 1 | 15,118 | Ditto for not adding this to the axe namespace. | dequelabs-axe-core | js |
@@ -0,0 +1 @@
+package registration | 1 | 1 | 8,624 | Should we just remove this file? Having it present but empty feels misleading | spiffe-spire | go | |
@@ -69,6 +69,14 @@ func (tracker *PeerTracker) UpdateTrusted(ctx context.Context) error {
return tracker.updatePeers(ctx, tracker.trustedPeers()...)
}
+// Trust adds `pid` to the peer trackers trusted node set.
+func (tracker *PeerTracker) Trust(pid peer.ID) {
+ tracker.mu.Lock()
+ defer tracker.mu.Unlock()
+ trac... | 1 | package net
import (
"context"
"sort"
"sync"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/pkg/errors"
"golang.org/x/sync/errgroup"
"github.com/filecoin-project/go-filecoin/types"
)
var logPeerTracker = logging.Logger("peer-t... | 1 | 21,303 | Would it make sense to include an `Untrust` as well? If I were playing around with this on the CLI I wouldn't want to make a change I couldn't undo. | filecoin-project-venus | go |
@@ -43,6 +43,13 @@ use VuFindSearch\Backend\Solr\Response\Json\RecordCollectionFactory;
*/
class SolrDefaultBackendFactory extends AbstractSolrBackendFactory
{
+ /**
+ * Callback for creating a record driver.
+ *
+ * @var string
+ */
+ protected $createRecordCallback = 'getSolrRecord';
+
... | 1 | <?php
/**
* Factory for the default SOLR backend.
*
* PHP version 7
*
* Copyright (C) Villanova University 2013.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This... | 1 | 28,389 | It might be better to call this `$createRecordMethod` since it's not a full PHP callback, just a method name for the plugin manager. | vufind-org-vufind | php |
@@ -15,7 +15,12 @@ namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Cart\CartEvent;
+use Thelia\Core\Event\Currency\CurrencyChangeEvent;
use Thelia\Core\Event\TheliaEvents;
+use Thelia\Core\... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 10,057 | remove this line | thelia-thelia | php |
@@ -24,7 +24,7 @@ class NavigationManager
protected $callbacks = [];
/**
- * @var array List of registered items.
+ * @var MainMenuItem[] List of registered items.
*/
protected $items;
| 1 | <?php namespace Backend\Classes;
use Event;
use BackendAuth;
use System\Classes\PluginManager;
use Validator;
use SystemException;
use Log;
use Config;
/**
* Manages the backend navigation.
*
* @package october\backend
* @author Alexey Bobkov, Samuel Georges
*/
class NavigationManager
{
use \October\Rain\Sup... | 1 | 18,085 | I've never seen this syntax before, it's still just an array, the difference is that it's an array of MainMenuItems instead of an array of arrays. | octobercms-october | php |
@@ -1532,10 +1532,15 @@ map_api_set_dll(const char *name, privmod_t *dependent)
str_case_prefix(name, "API-MS-Win-Eventing-Provider-L1-1"))
return "kernelbase.dll";
else if (str_case_prefix(name, "API-MS-Win-Core-PrivateProfile-L1-1") ||
- str_case_prefix(name, "API-MS-Win-Core-A... | 1 | /* **********************************************************
* Copyright (c) 2011-2018 Google, Inc. All rights reserved.
* Copyright (c) 2009-2010 Derek Bruening All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or w... | 1 | 13,416 | nit: to match the others: s/private/Private/ | DynamoRIO-dynamorio | c |
@@ -96,8 +96,9 @@ namespace Nethermind.Network
public IReadOnlyCollection<Peer> ActivePeers => _activePeers.Values.ToList().AsReadOnly();
public IReadOnlyCollection<Peer> CandidatePeers => _peerPool.CandidatePeers.ToList();
+ public IReadOnlyCollection<Peer> ConnectedPeers => _activePeers.Val... | 1 | // Copyright (c) 2021 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,900 | Maybe just IEnumerable? Not sure myself. | NethermindEth-nethermind | .cs |
@@ -54,7 +54,8 @@ public abstract class TestIcebergSourceHiveTables extends TestIcebergSourceTable
@Override
public Table createTable(TableIdentifier ident, Schema schema, PartitionSpec spec) {
TestIcebergSourceHiveTables.currentIdentifier = ident;
- return TestIcebergSourceHiveTables.catalog.createTable(... | 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 | 35,774 | do we need this change? | apache-iceberg | java |
@@ -586,7 +586,17 @@ func (s *Server) configureAccounts() error {
// Check opts and walk through them. We need to copy them here
// so that we do not keep a real one sitting in the options.
for _, acc := range s.opts.Accounts {
- a := acc.shallowCopy()
+ var a *Account
+ if acc.Name == globalAccountName {
+ ... | 1 | // Copyright 2012-2020 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 11,566 | Would want @matthiashanel to have a look since if I recall he had to add the shallowCopy() to fix some bugs during reload. That being said, since I believe the $G account cannot referenced in configurations, this should not be a problem, but Matthias has looked at this in more details in the past. | nats-io-nats-server | go |
@@ -320,3 +320,19 @@ func (volInfo *VolumeInfo) GetNodeName() string {
}
return ""
}
+
+// GetVolumeStatus returns the status of the volume
+func (volInfo *VolumeInfo) GetVolumeStatus() string {
+ if len(volInfo.Volume.Status.Reason) > 0 {
+ return volInfo.Volume.Status.Reason
+ }
+ return volumeStatusOK
+}
+
+//... | 1 | /*
Copyright 2017 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 9,515 | The descriptions are incorrect | openebs-maya | go |
@@ -1229,6 +1229,14 @@ class WebDriver {
if (target && cdpTargets.indexOf(target.toLowerCase()) === -1) {
throw new error.InvalidArgumentError('invalid target value')
}
+
+ if (debuggerAddress.match(/\/se\/cdp/)) {
+ if (debuggerAddress.match("ws:\/\/", "http:\/\/")) {
+ return debuggerA... | 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 | 19,062 | if we are returning the `ws` here when passing in `se:cdp` we can just return it straight or do we have to make a request to get the `ws` address? | SeleniumHQ-selenium | py |
@@ -1749,7 +1749,8 @@ class CommandDispatcher:
elif going_up and tab.scroller.pos_px().y() > old_scroll_pos.y():
message.info("Search hit TOP, continuing at BOTTOM")
else:
- message.warning("Text '{}' not found on page!".format(text))
+ message.warning("Text ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 19,467 | Please only indent this by four spaces. | qutebrowser-qutebrowser | py |
@@ -74,7 +74,7 @@ func isLink(s string) bool {
func randString(n int) string {
gen := rand.New(rand.NewSource(time.Now().UnixNano()))
- letters := "abcdefghijklmnopqrstuvwxyz"
+ letters := "bdghjlmnpqrstvwxyz0123456789"
b := make([]byte, n)
for i := range b {
b[i] = letters[gen.Int63()%int64(len(letters))] | 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 appl... | 1 | 6,363 | What's the reason behind these characters? | GoogleCloudPlatform-compute-image-tools | go |
@@ -13,9 +13,12 @@ describe ParallelDispatcher do
end
it 'creates a new token for each approver' do
- expect(ApiToken).to receive(:create!).exactly(2).times
expect(dispatcher).to receive(:send_notification_email).twice
dispatcher.deliver_new_cart_emails(cart)
+
+ cart.approver_approv... | 1 | describe ParallelDispatcher do
let(:cart) { FactoryGirl.create(:cart_with_approvals) }
let(:dispatcher) { ParallelDispatcher.new }
describe '#deliver_new_cart_emails' do
it "sends emails to the requester and all approvers" do
dispatcher.deliver_new_cart_emails(cart)
expect(email_recipients).to eq... | 1 | 12,553 | Minor: The name of this specs seems a little off now | 18F-C2 | rb |
@@ -1126,10 +1126,12 @@ ast_result_t pass_syntax(ast_t** astp, pass_opt_t* options)
case TK_VALUEFORMALARG:
case TK_VALUEFORMALPARAM:
ast_error(options->check.errors, ast,
- "Value formal parameters not yet supported");
+ "Value formal parameters not yet supported. "
+ "Note that m... | 1 | #include "syntax.h"
#include "../ast/id.h"
#include "../ast/parser.h"
#include "../ast/stringtab.h"
#include "../ast/token.h"
#include "../pkg/package.h"
#include "../pkg/platformfuns.h"
#include "../type/assemble.h"
#include "../../libponyrt/mem/pool.h"
#include <assert.h>
#include <string.h>
#include <ctype.h>
#def... | 1 | 9,355 | I'd suggest using `ast_error_continue` here to get the `apply` message in the `Info` part of the error report. | ponylang-ponyc | c |
@@ -72,6 +72,13 @@ class SearchTabsHelper extends \Laminas\View\Helper\AbstractHelper
*/
protected $permissionConfig;
+ /**
+ * Tab detailed configuration
+ *
+ * @var array
+ */
+ protected $detailConfig;
+
/**
* Request
* | 1 | <?php
/**
* "Search tabs" helper
*
* PHP version 7
*
* Copyright (C) Villanova University 2010.
* Copyright (C) The National Library of Finland 2015-2016.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published b... | 1 | 33,323 | If we decide to change the name of the .ini setting, we might also want to review the naming of this property and related code. Maybe a simple `getOptions` or `getSettings` would be more concise than `getTabDetailConfig`. At very least, I don't think we need Tab in the method name since the method belongs to a helper w... | vufind-org-vufind | php |
@@ -175,6 +175,10 @@ func isListResource(msg *beehiveModel.Message) bool {
return true
}
}
+ // user data
+ if msg.GetGroup() == "user" {
+ return true
+ }
return false
} | 1 | package channelq
import (
"fmt"
"strings"
"sync"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"
"k8s.io/klog/v2"
beehiveContext "github.com/kubeedge/beehive/pkg/core/context"
beehiveModel "github.com/kubeedge... | 1 | 20,258 | Use const for "user", same as below | kubeedge-kubeedge | go |
@@ -79,6 +79,7 @@ class Newsletter extends BaseAction implements EventSubscriberInterface
$nl->setEmail($event->getEmail())
->setFirstname($event->getFirstname())
->setLastname($event->getLastname())
+ ->setUnsubscribed(0)
->setLocale($event... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 12,423 | ->setUnsubscribed(false) would be better :) | thelia-thelia | php |
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module Faker
+ class Sports < Base
+ class << self
+ def name
+ fetch('sports.name')
+ end
+ end
+ end
+end | 1 | 1 | 9,365 | I now think singular `Sport` is better, but I will wait for the first round of feedback before updating. | faker-ruby-faker | rb | |
@@ -167,6 +167,9 @@ class UserResource:
parent_id=parent_id,
auth=auth)
+ # Initialize timestamp as soon as possible.
+ self.timestamp
+
self.request = request
self.context = context
self.record_id = self.request.matchdict.get('id') | 1 | import re
import functools
import colander
import venusian
from pyramid import exceptions as pyramid_exceptions
from pyramid.decorator import reify
from pyramid.security import Everyone
from pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,
HTTPNotFound, HTTPS... | 1 | 10,800 | Don't you need = something ? | Kinto-kinto | py |
@@ -1869,10 +1869,12 @@ bool CoreChecks::ValidateCmdQueueFlags(const CMD_BUFFER_STATE *cb_node, const ch
const char *error_code) const {
auto pool = cb_node->command_pool.get();
if (pool) {
- VkQueueFlags queue_flags = GetPhysicalDeviceState()->queue_family_prope... | 1 | /* Copyright (c) 2015-2020 The Khronos Group Inc.
* Copyright (c) 2015-2020 Valve Corporation
* Copyright (c) 2015-2020 LunarG, Inc.
* Copyright (C) 2015-2020 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 | 14,416 | Looks like this could be `const` (I realize it wasn't like that before)? | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -7,7 +7,8 @@ import com.fsck.k9.message.preview.PreviewResult.PreviewType;
public enum DatabasePreviewType {
NONE("none", PreviewType.NONE),
TEXT("text", PreviewType.TEXT),
- ENCRYPTED("encrypted", PreviewType.ENCRYPTED);
+ ENCRYPTED("encrypted", PreviewType.ENCRYPTED),
+ FAILED_TO_LOAD("failedTo... | 1 | package com.fsck.k9.mailstore;
import com.fsck.k9.message.preview.PreviewResult.PreviewType;
public enum DatabasePreviewType {
NONE("none", PreviewType.NONE),
TEXT("text", PreviewType.TEXT),
ENCRYPTED("encrypted", PreviewType.ENCRYPTED);
private final String databaseValue;
private final Previe... | 1 | 13,501 | Maybe just `FAILED`. We can't be sure loading was the thing that failed. | k9mail-k-9 | java |
@@ -1,5 +1,5 @@
-define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSettings', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'dom', 'indicators', 'imageLoader', 'libraryMenu', 'globalize', 'browser', 'events', 'playbackManager', 'scrollStyles', ... | 1 | define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSettings', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'dom', 'indicators', 'imageLoader', 'libraryMenu', 'globalize', 'browser', 'events', 'playbackManager', 'scrollStyles', 'emby-itemscontai... | 1 | 15,546 | You have replaced single quotes with double ones, this fails linting and our current coding style. Please fix this, otherwise it's a whopping of 1200 LoC while in reality it should be rather small. | jellyfin-jellyfin-web | js |
@@ -43,6 +43,9 @@ public class PlaybackPreferences implements
/** True if last played media was a video. */
public static final String PREF_CURRENT_EPISODE_IS_VIDEO = "de.danoeh.antennapod.preferences.lastIsVideo";
+ /** Value of PREF_QUEUE_ADD_TO_FRONT if no media is playing. */
+ public static final String PREF... | 1 | package de.danoeh.antennapod.core.preferences;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;
import org.apache.commons.lang3.Validate;
import de.danoeh.antennapod.core.BuildConfig;
/**
* Provides access to preferences... | 1 | 11,756 | @danieloeh @TomHennen. Some of these files are using spaces, the others use tabs. Is there a project wide preference? I personally like spaces, because they are consistent across editors | AntennaPod-AntennaPod | java |
@@ -11,10 +11,12 @@ module Blacklight
# @param [SolrDocument] document
# @param [ActionView::Base] view_context scope for linking and generating urls
# @param [Blacklight::Configuration] configuration
- def initialize(document, view_context, configuration = view_context.blacklight_config)
+ # @para... | 1 | # frozen_string_literal: true
module Blacklight
# An abstract class that the view presenters for SolrDocuments descend from
class DocumentPresenter
attr_reader :document, :configuration, :view_context
class_attribute :thumbnail_presenter
self.thumbnail_presenter = ThumbnailPresenter
# @param [Sol... | 1 | 8,742 | I guess this is ok for backwards-compatibility? Maybe it'd be better to check arity in the helpers? Or just call it out in the release notes, because there are at least a couple projects on github that overrode `initialize`.. | projectblacklight-blacklight | rb |
@@ -194,8 +194,8 @@ public class AzkabanWebServer extends AzkabanServer {
// TODO remove hack. Move injection to constructor
executorManager = SERVICE_PROVIDER.getInstance(ExecutorManager.class);
projectManager = SERVICE_PROVIDER.getInstance(ProjectManager.class);
+ triggerManager = SERVICE_PROVIDER.g... | 1 | /*
* Copyright 2012 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 13,595 | At some point, we would like to get rid of these custom injections as well. Looks Ok for now. | azkaban-azkaban | java |
@@ -349,6 +349,13 @@ namespace Datadog.Trace.Configuration
/// </summary>
/// <seealso cref="TracerSettings.DelayWcfInstrumentationEnabled"/>
public const string DelayWcfInstrumentationEnabled = "DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED";
+
+ /// <summary>
+ ... | 1 | // <copyright file="ConfigurationKeys.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using System;
names... | 1 | 25,350 | nit: Not a fan of "fix" in the name, but don't have a better suggestion | DataDog-dd-trace-dotnet | .cs |
@@ -181,6 +181,11 @@ class TabWidget(QTabWidget):
except qtutils.QtValueError:
fields['current_url'] = ''
+ try:
+ fields['protocol'] = self.tab_url(idx).scheme()
+ except qtutils.QtValueError:
+ fields['protocol'] = ''
+
y = tab.scroller.pos_perc()[1... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 19,944 | Since we're calling `self.tab_url(idx)` a third time here already, can you please add a `url = self.tab_url(idx)` somewhere above (e.g. after all the `fields[...] = ...` assignments) and change the calls here to `url.host()` etc.? | qutebrowser-qutebrowser | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.