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 |
|---|---|---|---|---|---|---|---|
@@ -11,8 +11,12 @@ var Parser = imports.Parser || require('./util/BinaryParser');
var Step = imports.Step || require('step');
var buffertools = imports.buffertools || require('buffertools');
var error = imports.error || require('./util/error');
+var networks = ... | 1 | var imports = require('soop').imports();
var config = imports.config || require('./config');
var log = imports.log || require('./util/log');
var Address = imports.Address || require('./Address');
var Script = imports.Script || require('./Script');
var ScriptI... | 1 | 12,321 | I'm not totally sure I like the idea of putting a default fee here, but I guess so long as we make sure to track the default fee of bitcoin core, we're good. We should really also take a look at the byte size of the transaction, and use that to determine what the fee should be. But that could also be a different PR. | bitpay-bitcore | js |
@@ -17,13 +17,13 @@
* </thead>
* <tbody>
* <tr><td>{@linkplain javaslang.collection.Array}</td><td><small>const</small></td><td><small>linear</small></td><td><small>const</small></td><td><small>const</small></td><td><small>linear</small></td><td><small>linear</small></td></tr>
- * <tr><td>{@linkplain javaslang.co... | 1 | /**
* Purely functional collections based on {@linkplain javaslang.collection.Traversable}.
*
* <h2>Performance Characteristics of Javaslang Collections</h2>
* <table cellpadding="5" cellspacing="0" border="1" style="border-collapse: collapse">
* <caption>Time Complexity of Sequential Operations</caption>
* <thea... | 1 | 9,243 | oh yeah, `tail`, `update`, `prepend`, `append`, `subSequence`, `trim` just became effectively constant (without memory leak) :) | vavr-io-vavr | java |
@@ -232,15 +232,12 @@ class ResourceTags extends Gateway
*
* @return void
*/
- public function destroyLinks($resource, $user, $list = null, $tag = null)
+ public function destroyResourceLinks($resource, $user, $list = null, $tag = null)
{
$callback = function ($select) use ($resour... | 1 | <?php
/**
* Table Definition for resource_tags
*
* PHP version 7
*
* Copyright (C) Villanova University 2010.
*
* 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 pro... | 1 | 29,688 | Can you add back a deprecated `destroyLinks` method for backward compatibility? It can simply proxy `destroyResourceLinks`, and we can remove it in the next major release. | vufind-org-vufind | php |
@@ -43,6 +43,7 @@ func init() {
RegisterGlobalOption("local_certs", parseOptTrue)
RegisterGlobalOption("key_type", parseOptSingleString)
RegisterGlobalOption("auto_https", parseOptAutoHTTPS)
+ RegisterGlobalOption("servers", parseServerOptions)
}
func parseOptTrue(d *caddyfile.Dispenser) (interface{}, error) ... | 1 | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | 1 | 15,872 | A reminder that we should discuss whether to rename this to "sockets" or "listeners". | caddyserver-caddy | go |
@@ -39,6 +39,7 @@ using eprosima::fastdds::dds::Log;
using eprosima::fastrtps::rtps::RTPSDomain;
using eprosima::fastrtps::rtps::RTPSParticipant;
+using eprosima::fastrtps::rtps::RTPSParticipantAttributes;
namespace eprosima {
namespace fastdds { | 1 | // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... | 1 | 20,110 | Why do you need to include this using declaration? | eProsima-Fast-DDS | cpp |
@@ -59,7 +59,7 @@ namespace Microsoft.AspNet.Server.Kestrel.GeneratedCode
{
ulong mask = 0;
ulong comp = 0;
- for (var scan = 0; scan != count; ++scan)
+ for (var scan = 0; scan < count; scan++)
{
var ch =... | 1 | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Dnx.Compilation.CSharp;
namespace Microsoft.AspNet.Server.Kestrel.GeneratedCode
{
// This project can output the Class library as a NuGet Package.
// To enable this option, right-click on the project and select the Properties m... | 1 | 6,018 | @halter73 where is this file generated from? | aspnet-KestrelHttpServer | .cs |
@@ -19,6 +19,7 @@ namespace Datadog.Trace.ClrProfiler.IntegrationTests
[SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1516:Elements must be separated by blank line", Justification = "This is an auto-generated file.")]
public class PackageVersions
{
+#if TRUE
public static IEnumerable<object[... | 1 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by the GeneratePackageVersions tool. To safely
// modify this file, edit PackageVersionsGeneratorDefinitions.json and
// re-run the GeneratePackageVersions project in Visual Studio... | 1 | 15,818 | What do these `#if TRUE` accomplish? | DataDog-dd-trace-dotnet | .cs |
@@ -39,6 +39,11 @@ namespace OpenTelemetry.Instrumentation
public void OnNext(KeyValuePair<string, object> value)
{
+ if (Sdk.SuppressInstrumentation)
+ {
+ return;
+ }
+
if (!this.handler.SupportsNullActivity && Activity.Current == null)
... | 1 | // <copyright file="DiagnosticSourceListener.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://... | 1 | 16,228 | Probably a good optimization to have this, but I don't think it's strictly required. For "legacy" Activity flows we pass them through an ActivitySource for sampling. So the logic below should also catch these? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -1,6 +1,6 @@
<%= @activity %>
-<%= t("mailer.proposal_link_text",
- proposal_url: proposal_url(@proposal)) %>
+<%= t("mailer.view_request_cta") %>
+<%= proposal_url(@proposal) %>
<%= t("mailer.footer", feedback_url: feedback_url) %> | 1 | <%= @activity %>
<%= t("mailer.proposal_link_text",
proposal_url: proposal_url(@proposal)) %>
<%= t("mailer.footer", feedback_url: feedback_url) %>
| 1 | 16,842 | @jessieay Intentionally moving away from passing a param? | 18F-C2 | rb |
@@ -1378,13 +1378,12 @@ class PAIA extends DAIA
$lastname = $nameArr[0];
} else {
$nameArr = explode(' ', $username);
- $firstname = $nameArr[0];
- $lastname = '';
- array_shift($nameArr);
+ $firstname = '';
+ $lastname = array_po... | 1 | <?php
/**
* PAIA ILS Driver for VuFind to get patron information
*
* PHP version 7
*
* Copyright (C) Oliver Goldschmidt, Magda Roos, Till Kinstler, André Lahmann 2013,
* 2014, 2015.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License v... | 1 | 32,537 | I think you could condense this code considerably by getting rid of the initialization and foreach loop and simply saying: `$firstname = trim(implode(' ', $nameArr));` What do you think? | vufind-org-vufind | php |
@@ -1,5 +1,4 @@
#!/usr/bin/env node
-'use strict'
const userAgent = process.env.npm_config_user_agent
if (!userAgent) { | 1 | #!/usr/bin/env node
'use strict'
const userAgent = process.env.npm_config_user_agent
if (!userAgent) {
// not much we can do
process.exit()
}
if (/^npm\/7/.test(userAgent)) {
console.error('Please use npm 6 to work in the Uppy monorepo.')
console.error('You can execute individual commands with npm 6 like belo... | 1 | 13,826 | hmm, we actually should _add_ `'use strict'` everywhere | transloadit-uppy | js |
@@ -905,7 +905,7 @@ public class JdbcProjectImpl implements ProjectLoader {
propsName);
if (properties == null || properties.isEmpty()) {
- logger.warn("Project " + projectId + " version " + projectVer + " property " + propsName
+ logger.debug("Project " + projectId + " version... | 1 | /*
* Copyright 2017 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 17,053 | it's not just fetching override properties here, right? | azkaban-azkaban | java |
@@ -200,6 +200,7 @@ func (acsSession *session) Start() error {
if shouldReconnectWithoutBackoff(acsError) {
// If ACS closed the connection, there's no need to backoff,
// reconnect immediately
+ seelog.Info("ACS Websocket connection closed for a valid reason")
acsSession.backoff.Reset()
send... | 1 | // Copyright 2014-2017 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 | 17,034 | Is it worth logging the error? | aws-amazon-ecs-agent | go |
@@ -16,6 +16,19 @@ import watchdog.events
from watchdog.observers import polling
+class NS:
+ def __init__(self, ns):
+ self.__dict__["ns"] = ns
+
+ def __getattr__(self, key):
+ if key not in self.ns:
+ raise AttributeError("No such element: %s", key)
+ return self.ns[key]
+
... | 1 | from __future__ import absolute_import, print_function, division
import contextlib
import os
import shlex
import sys
import threading
import traceback
from mitmproxy import exceptions
from mitmproxy import controller
from mitmproxy import ctx
import watchdog.events
from watchdog.observers import polling
def parse... | 1 | 11,997 | What's the point of this class? | mitmproxy-mitmproxy | py |
@@ -411,7 +411,7 @@ import template from './libraryoptionseditor.template.html';
parent.querySelector('.chkEnableEmbeddedEpisodeInfosContainer').classList.add('hide');
}
- parent.querySelector('.chkAutomaticallyAddToCollectionContainer').classList.toggle('hide', contentType !== 'movies');... | 1 | /* eslint-disable indent */
/**
* Module for library options editor.
* @module components/libraryoptionseditor/libraryoptionseditor
*/
import globalize from '../../scripts/globalize';
import dom from '../../scripts/dom';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-select/emby-s... | 1 | 20,188 | I'm being picky here, but I think I would prefer `toggle` to be kept here and just change the condition to `contentType !== 'movies' && contentType !== 'mixed'` or `!['movies', 'mixed'].includes(contentType)`. | jellyfin-jellyfin-web | js |
@@ -7,6 +7,9 @@ package libkbfs
import (
"encoding/json"
"fmt"
+ "github.com/syndtr/goleveldb/leveldb"
+ "os"
+ sysPath "path"
"sort"
"strings"
"sync" | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"encoding/json"
"fmt"
"sort"
"strings"
"sync"
"time"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/kbfs/kbfsblo... | 1 | 20,966 | Please put this down with the other "github.com" imports. | keybase-kbfs | go |
@@ -67,7 +67,7 @@ void nano::block_processor::add (std::shared_ptr<nano::block> block_a, uint64_t
add (info);
}
-void nano::block_processor::add (nano::unchecked_info const & info_a)
+void nano::block_processor::add (nano::unchecked_info const & info_a, bool push_front_preference)
{
if (!nano::work_validate (in... | 1 | #include <nano/lib/timer.hpp>
#include <nano/node/blockprocessor.hpp>
#include <nano/node/node.hpp>
#include <nano/secure/blockstore.hpp>
#include <boost/format.hpp>
#include <cassert>
std::chrono::milliseconds constexpr nano::block_processor::confirmation_request_delay;
nano::block_processor::block_processor (nano... | 1 | 16,272 | Minor but probably want `push_front_preference` to have a trailing `_a` to be consistent with the other parameter | nanocurrency-nano-node | cpp |
@@ -53,8 +53,16 @@ public class InclusiveManifestEvaluator {
}
public InclusiveManifestEvaluator(PartitionSpec spec, Expression rowFilter) {
+ this(spec, rowFilter, true);
+ }
+
+ public InclusiveManifestEvaluator(PartitionSpec spec, Expression rowFilter, boolean caseSensitive) {
this.struct = spec.pa... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 12,567 | Nit: the formatting is a bit off. I would expect this to be 2 indentations from `this.expr = ...` but this is 8 spaces, not 4. Also, most places leave the `);` on the last line of the method arguments. | apache-iceberg | java |
@@ -14,8 +14,8 @@
*/
package com.google.api.codegen.transformer.csharp;
-import com.google.api.codegen.transformer.ApiMethodTransformer;
import com.google.api.codegen.transformer.MethodTransformerContext;
+import com.google.api.codegen.transformer.StaticLangApiMethodTransformer;
import com.google.api.codegen.vie... | 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 | 20,946 | Ack, @chrisdunelm snuck this class extension past me. This is not a pattern I want to have used... | googleapis-gapic-generator | java |
@@ -67,7 +67,16 @@ def main(global_config, config=None, **settings):
# Scan Kinto views.
kwargs = {}
flush_enabled = asbool(settings.get('flush_endpoint_enabled'))
- if not flush_enabled:
+
+ if flush_enabled:
+ config.add_api_capability(
+ "flush_endpoint",
+ descripti... | 1 | import pkg_resources
import logging
import cliquet
from pyramid.config import Configurator
from pyramid.settings import asbool
from pyramid.security import Authenticated
from kinto.authorization import RouteFactory
# Module version, as defined in PEP-0396.
__version__ = pkg_resources.get_distribution(__package__).ve... | 1 | 8,935 | nitpick: I wonder if we should name it `flush` only (?) | Kinto-kinto | py |
@@ -0,0 +1,19 @@
+package hub
+
+import "github.com/prometheus/client_golang/prometheus"
+
+var (
+ tasksGauge = prometheus.NewGauge(prometheus.GaugeOpts{
+ Name: "sonm_tasks_current",
+ Help: "Number of currently running tasks",
+ })
+ dealsGauge = prometheus.NewGauge(prometheus.GaugeOpts{
+ Name: "sonm_deals_curre... | 1 | 1 | 6,229 | Why gauges, not counters? | sonm-io-core | go | |
@@ -45,7 +45,7 @@ const (
// hash of origin cluster name and <server> is 6 characters hash of origin server pub key.
gwReplyPrefix = "_GR_."
gwReplyPrefixLen = len(gwReplyPrefix)
- gwHashLen = 6
+ gwHashLen = sysHashLen
gwClusterOffset = gwReplyPrefixLen
gwServerOffset = gwClusterOffset + ... | 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,249 | Just making a note here that this may break pre GWs between pre 2.2.0 and 2.2.0 servers. Not sure, will have to experiment/dig a bit more. | nats-io-nats-server | go |
@@ -93,6 +93,8 @@ public class WebUtils {
return "Killing";
case DISPATCHING:
return "Dispatching";
+ case POD_FAILED:
+ return "Pod Failure";
default:
}
return "Unknown"; | 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 | 22,146 | Shall we rename this status to CONTAINER_FAILED? ^^ cc: @sshardool | azkaban-azkaban | java |
@@ -30,6 +30,14 @@ const (
requestTimeout = 60 * time.Second
)
+// Fetcher defines an interface that may be used to fetch data from the network.
+type Fetcher interface {
+ // FetchTipSets will only fetch TipSets that evaluate to `false` when passed to `done`,
+ // this includes the provided `ts`. The TipSet that ... | 1 | package net
import (
"context"
"fmt"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"
bstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log"
"github.com/ipld/go-ipld-prime"
ipldfree "github.com/ipld/go-ipld-prime/impl/free"
cidlin... | 1 | 21,226 | Thinking out loud here: I believe the only reason we need `peer.ID` as a parameter to this method is because we are not persisting blocks from pubsub (instead we are refetching them). If nodes persist the blocks they received over pubsub then I think we can guarantee peers we share a connection with (i.e. that are in t... | filecoin-project-venus | go |
@@ -42,7 +42,7 @@ func init() {
// MatchExpression matches requests by evaluating a
// [CEL](https://github.com/google/cel-spec) expression.
// This enables complex logic to be expressed using a comfortable,
-// familiar syntax.
+// familiar syntax. The standard definitions of CEL functions and operators can be foun... | 1 | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | 1 | 15,045 | I know it has no effect but my eyes can't help. Is that line not too long? | caddyserver-caddy | go |
@@ -645,13 +645,6 @@ func (r *DefaultRuleRenderer) filterOutputChain(ipVersion uint8) *Chain {
},
)
- // Jump to chain for blocking service CIDR loops.
- rules = append(rules,
- Rule{
- Action: JumpAction{Target: ChainCIDRBlock},
- },
- )
-
return &Chain{
Name: ChainFilterOutput,
Rules: rules, | 1 | // Copyright (c) 2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 18,427 | Does that mean we disable service loop prevention for packet generated by local host? | projectcalico-felix | go |
@@ -107,6 +107,7 @@ module Beaker
when host['platform'] =~ /cumulus/
check_and_install_packages_if_needed(host, CUMULUS_PACKAGES)
when (host['platform'] =~ /windows/ and host.is_cygwin?)
+ raise RuntimeError, "cygwin is not installed on #{host}" if !host.cygwin_installed?
... | 1 | require 'pathname'
[ 'command', "dsl" ].each do |lib|
require "beaker/#{lib}"
end
module Beaker
#Provides convienience methods for commonly run actions on hosts
module HostPrebuiltSteps
include Beaker::DSL::Patterns
NTPSERVER = 'pool.ntp.org'
SLEEPWAIT = 5
TRIES = 5
UNIX_PACKAGES = ['curl',... | 1 | 15,207 | It seems a little odd to have both `host.is_cygwin?` *and* `host.cygwin_installed?` defined (with a possibility of having `is_cygwin?` be `true`, but `cygwin_installed?` returning `false`). Do the docs clearly explain the difference? | voxpupuli-beaker | rb |
@@ -73,8 +73,8 @@ public class ManifestFiles {
* @return a manifest writer
*/
public static ManifestWriter write(PartitionSpec spec, OutputFile outputFile) {
- // always use a v1 writer for appended manifests because sequence number must be inherited
- return write(1, spec, outputFile, null);
+ // a... | 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 | 19,512 | Does this mean manifests will be written with the v2 schema (i.e. with sequence numbers) even though `TableMetadata` is v1 and the manifest list is written with v1? And this should work because we do a projection on read and sequence number is optional? | apache-iceberg | java |
@@ -47,4 +47,7 @@ public class SparkWriteOptions {
// Checks if input schema and table schema are same(default: true)
public static final String CHECK_ORDERING = "check-ordering";
+
+ // File scan task set ID that is being rewritten
+ public static final String REWRITTEN_FILE_SCAN_TASK_SET_ID = "rewritten-fil... | 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,350 | Should we be sharing this property key with the read? Maybe it should be belong to the file-scan-task object itself? | apache-iceberg | java |
@@ -82,6 +82,15 @@ type TestFields struct {
NoOutput bool `name:"no_test_output"`
}
+type DebugFields struct {
+ // Shell command to debug targets.
+ Command string `name:"debug_cmd"`
+ // Like tools but available to the debug_cmd instead
+ tools []BuildInput `name:"debug_tools"`
+ // Named debug tools, similar to... | 1 | package core
import (
"fmt"
"os"
"path"
"path/filepath"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"golang.org/x/sync/errgroup"
"github.com/thought-machine/please/src/fs"
)
// OutDir is the root output directory for everything.
const OutDir string = "plz-out"
// TmpDir is the root of the temporary dir... | 1 | 10,205 | Nice! Good idea to move these out of the main struct. | thought-machine-please | go |
@@ -201,7 +201,10 @@ func CreateGitIgnore(targetDir string, ignores ...string) error {
if fileutil.FileExists(gitIgnoreFilePath) {
sigFound, err := fileutil.FgrepStringInFile(gitIgnoreFilePath, DdevFileSignature)
- util.CheckErr(err)
+ if err != nil {
+ return err
+ }
+
// If we sigFound the file and did... | 1 | package ddevapp
import (
"fmt"
"path"
"path/filepath"
"strings"
"github.com/fatih/color"
"github.com/fsouza/go-dockerclient"
"github.com/gosuri/uitable"
"errors"
"os"
"text/template"
"github.com/Masterminds/sprig"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/fileutil"
"github.com/d... | 1 | 13,134 | Thanks for paying attention to other places this might happen. This one is particularly important; I probably never should have gotten in the habit of CheckErr(), since it does a log.Panic() explicitly, which looks like something else until you look closely. It's supposed to be used places where "can't happen" but Thin... | drud-ddev | go |
@@ -16,10 +16,13 @@ import java.util.Map;
* @see com.fsck.k9.mail.store.StoreConfig#getTransportUri()
*/
public class ServerSettings {
+
+ public enum Type { IMAP, SMTP, WebDAV, POP3 }
+
/**
- * Name of the store or transport type (e.g. "IMAP").
+ * Name of the store or transport type (e.g. IMAP).
... | 1 | package com.fsck.k9.mail;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* This is an abstraction to get rid of the store- and transport-specific URIs.
*
* <p>
* Right now it's only used for settings import/export. But the goal is to get rid of
* store/transport URIs altogether... | 1 | 12,971 | Converting this to an enum makes it obvious that I combined things that don't really belong together. It would probably be better to create two enums `StoreType` and `TransportType` (in more appropriate locations). That also makes it necessary to have (at least) two `ServerSettings` classes. `IncomingServerSettings` an... | k9mail-k-9 | java |
@@ -1,7 +1,14 @@
-/*global axe */
-
+/* global axe */
+/**
+ * Converts space delimited token list to an Array
+ * @method tokenList
+ * @memberof axe.commons.utils
+ * @instance
+ * @param {String} str
+ * @return {Array}
+ */
axe.utils.tokenList = function (str) {
'use strict';
return str.trim().replace(/\s{2... | 1 | /*global axe */
axe.utils.tokenList = function (str) {
'use strict';
return str.trim().replace(/\s{2,}/g, ' ').split(' ');
}; | 1 | 11,659 | It's out of scope for this PR, but I don't find this utility's name to be particularly intuitive. It speaks to nothing of what it does. Does it create a token list? Process one? Get one? `tokenListToArray` would be nice. | dequelabs-axe-core | js |
@@ -3,7 +3,9 @@ let nodeName = node.nodeName.toUpperCase();
let type = (node.getAttribute('type') || '').toLowerCase();
let label = node.getAttribute('value');
-this.data(label);
+if (label) {
+ this.data('has-label');
+}
if (nodeName === 'INPUT' && ['submit', 'reset'].includes(type)) {
return label === null; | 1 | // Check for 'default' names, which are given to reset and submit buttons
let nodeName = node.nodeName.toUpperCase();
let type = (node.getAttribute('type') || '').toLowerCase();
let label = node.getAttribute('value');
this.data(label);
if (nodeName === 'INPUT' && ['submit', 'reset'].includes(type)) {
return label ==... | 1 | 15,144 | The message for this check used the existence of a label to determine the output, which doesn't work with the current schema. So I updated it since the data only needed to know a label was present and not what it was. | dequelabs-axe-core | js |
@@ -267,6 +267,14 @@ func (a *WebAPI) SyncApplication(ctx context.Context, req *webservice.SyncApplic
return nil, err
}
+ claims, err := rpcauth.ExtractClaims(ctx)
+ if err != nil {
+ return nil, err
+ }
+ if app.ProjectId != claims.Role.ProjectId {
+ return nil, status.Error(codes.PermissionDenied, "applicati... | 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 | 7,491 | nit: "The current project does not have requested application" | pipe-cd-pipe | go |
@@ -14,6 +14,7 @@ use Ergonode\SharedKernel\Domain\AbstractCode;
class AttributeCode extends AbstractCode
{
public const PATTERN = '/^([a-zA-Z0-9_]+)$/';
+ public const FORBIDDEN = ['id'];
public function __construct(string $value)
{ | 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\Attribute\Domain\ValueObject;
use Ergonode\SharedKernel\Domain\AbstractCode;
class AttributeCode extends AbstractCode
{
public const PATTERN = '/^... | 1 | 9,654 | Extend Unit test for this class | ergonode-backend | php |
@@ -62,6 +62,18 @@ namespace Datadog.Trace.Configuration
/// </summary>
public const string AppSecRules = "DD_APPSEC_RULES";
+ /// <summary>
+ /// Configuration key indicating the optional name of the custom header to take into account for the ip address.
+ /// Default is value ... | 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>
namespace Datadog.Tr... | 1 | 22,145 | This is this a copy / paste error from above. | DataDog-dd-trace-dotnet | .cs |
@@ -0,0 +1,8 @@
+/**
+ * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
+ */
+
+package net.sourceforge.pmd.lang.java.typeresolution.typeinterference;
+
+public class Variable {
+} | 1 | 1 | 12,502 | this package has to be renamed to `typeinference` | pmd-pmd | java | |
@@ -124,6 +124,9 @@ module.exports = {
let credentials = Realm.Credentials.anonymous();
let user = await app.logIn(credentials);
TestCase.assertInstanceOf(user, Realm.User);
+ TestCase.assertNotNull(user.deviceId);
+ TestCase.assertNotNull(user.providerType);
+ TestCase.a... | 1 | 'use strict';
/* global navigator, WorkerNavigator */
const require_method = require;
// Prevent React Native packager from seeing modules required with this
function node_require(module) {
return require_method(module);
}
const { ObjectId } = require("bson");
const Realm = require('realm');
const TestCase = r... | 1 | 19,301 | This cancels the above null-check I guess. | realm-realm-js | js |
@@ -31,9 +31,9 @@ public final class Configuration {
//// 2.1 configuration items
public static final String PROP_ROOT = "servicecomb.loadbalance.";
- public static final String RPOP_SERVER_EXPIRED_IN_SECONDS = "servicecomb.loadbalance.stats.serverExpiredInSeconds";
+ public static final String PROP_SERVER_EX... | 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 | 11,579 | change to timerIntervalInMillis | apache-servicecomb-java-chassis | java |
@@ -121,6 +121,8 @@ return [
'email' => 'Email',
'role_field' => 'Role',
'role_comment' => 'Roles define user permissions, which can be overriden on the user level, on the Permissions tab.',
+ 'role_none' => 'None',
+ 'role_none_comment' => 'This administrator does not belong to... | 1 | <?php
return [
'auth' => [
'title' => 'Administration Area',
'invalid_login' => 'The details you entered did not match our records. Please double-check and try again.'
],
'field' => [
'invalid_type' => 'Invalid field type used :type.',
'options_method_invalid_model' => "The ... | 1 | 13,646 | `any rules` should be `any roles` | octobercms-october | php |
@@ -105,13 +105,12 @@ public class AllEpisodesFragment extends EpisodesListFragment {
@NonNull
@Override
protected List<FeedItem> loadData() {
- return feedItemFilter.filter(DBReader.getRecentlyPublishedEpisodes(0, page * EPISODES_PER_PAGE));
+ return DBReader.getRecentlyPublishedEpisodesFi... | 1 | package de.danoeh.antennapod.fragment;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.N... | 1 | 17,459 | Why does the method need to be renamed? I would just keep the old name and update the other uses (which are only tests). That way, we can reduce code duplication. | AntennaPod-AntennaPod | java |
@@ -29,9 +29,11 @@ from qutebrowser.utils import message
from qutebrowser.config import config
from qutebrowser.keyinput import keyparser
from qutebrowser.utils import usertypes, log, objreg, utils
+from qutebrowser.config.parsers import keyconf
-STARTCHARS = ":/?"
+conf = keyconf.KeyConfigParser(None, None)
+S... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 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 | 16,081 | I'm not sure if this is going to work - I think it's fine to keep them hardcoded here, as the statusbar can still show `:`, `/` and `?` even if the key is rebound. | qutebrowser-qutebrowser | py |
@@ -69,7 +69,6 @@ public abstract class TomcatServerBootstrap extends EmbeddedServerBootstrap {
.useLegacyLocalRepo(true).configureViaPlugin();
WebArchive wa = ShrinkWrap.create(WebArchive.class, "rest-test.war").setWebXML(webXmlPath)
- .addAsLibraries(resolver.resolve("org.codehaus.jackson:jackson... | 1 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 1 | 11,630 | @tmetzke shouldn't we replace this library with the `2.12.1` instead of removing it? | camunda-camunda-bpm-platform | java |
@@ -40,10 +40,16 @@ type Miner struct {
// PeerID is the peer ID to set as the miners owner
PeerID string
- // Power is the amount of power this miner should start off with
+ // NumCommittedSectors is the number of sectors that this miner has
+ // committed to the network.
+ //
+ // TODO: This struct needs a fiel... | 1 | package gengen
import (
"context"
"fmt"
"io"
"math/big"
mrand "math/rand"
"strconv"
"github.com/filecoin-project/go-filecoin/actor"
"github.com/filecoin-project/go-filecoin/actor/builtin"
"github.com/filecoin-project/go-filecoin/actor/builtin/account"
"github.com/filecoin-project/go-filecoin/address"
"gith... | 1 | 19,248 | uint64 seems excessive here. Should we reduce to a uint32 @whyrusleeping ? | filecoin-project-venus | go |
@@ -109,7 +109,6 @@ type initStorageOpts struct {
ws wsAddonManager
store store
- app *config.Application
sel wsSelector
}
| 1 | // Copyright Amazon.com, Inc or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"encoding"
"fmt"
"github.com/aws/copilot-cli/internal/pkg/addon"
"github.com/aws/copilot-cli/internal/pkg/config"
"github.com/aws/copilot-cli/internal/pkg/template"
"github.com/aws/c... | 1 | 14,687 | Hmm, I thought this was getting used. These are used elsewhere as a cached value (in `svc deploy` it's `o.targetApp`) but I guess since storage doesn't actually need to validate that the app exists, just that there are local services, we never used it. | aws-copilot-cli | go |
@@ -337,6 +337,12 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}
+ // Get the remote host
+ remoteHost, _, err := net.SplitHostPort(r.RemoteAddr)
+ if err != nil {
+ remoteHost = r.RemoteAddr
+ }
+
if vh, ok := s.vhosts[host]; ok {
status, _ := vh.stack.ServeHTTP(w, r)
| 1 | // Package server implements a configurable, general-purpose web server.
// It relies on configurations obtained from the adjacent config package
// and can execute middleware as defined by the adjacent middleware package.
package server
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
"net"
"net/htt... | 1 | 7,614 | To keep it simple, how would you feel about just using r.RemoteAddr? Since every request comes through here I want it to be as lean as possible. Frankly I'm OK with the port showing up in the log; maybe it'd even be useful to someone. | caddyserver-caddy | go |
@@ -221,7 +221,13 @@ func (p *Protocol) GrantEpochReward(
}
// Reward additional bootstrap bonus
- if epochNum <= a.foundationBonusLastEpoch || (epochNum >= p.foundationBonusP2StartEpoch && epochNum <= p.foundationBonusP2EndEpoch) {
+ var grantFB bool
+ if a.hasFoundationBonusExtension() {
+ grantFB = a.grantFou... | 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,731 | grant bonus depends on both `admin{}` stored in statedb, and `P2Start/End` in local struct, which is kind of weird at Kamchatka height, we add the bonus Start/End epoch into `admin{}`, so it solely depends on `admin{}` stored in statedb | iotexproject-iotex-core | go |
@@ -222,8 +222,7 @@ class RandomFlip(object):
flipped[..., 1::4] = h - bboxes[..., 3::4]
flipped[..., 3::4] = h - bboxes[..., 1::4]
else:
- raise ValueError(
- 'Invalid flipping direction "{}"'.format(direction))
+ raise ValueError(f'Invalid flippi... | 1 | import inspect
import mmcv
import numpy as np
from numpy import random
from mmdet.core import PolygonMasks
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
from ..builder import PIPELINES
try:
from imagecorruptions import corrupt
except ImportError:
corrupt = None
try:
import albumentations... | 1 | 19,260 | Use single quote to wrap the str. | open-mmlab-mmdetection | py |
@@ -100,7 +100,7 @@ public enum JsonRpcError {
"The permissioning whitelist configuration file is out of sync. The changes have been applied, but not persisted to disk"),
WHITELIST_RELOAD_ERROR(
-32000,
- "Error reloading permissions file. Please use perm_getAccountsWhitelist and perm_getNodesWhi... | 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 | 22,893 | Is the plan to rename this later? | hyperledger-besu | java |
@@ -340,7 +340,9 @@ class ChoiceAuth extends AbstractBase
return false;
}
- if (!in_array($this->strategy, $this->strategies)) {
+ if ('Email' !== $this->strategy
+ && !in_array($this->strategy, $this->strategies)
+ ) {
throw new InvalidArgumentExcept... | 1 | <?php
/**
* MultiAuth Authentication plugin
*
* PHP version 7
*
* Copyright (C) Villanova University 2010.
*
* 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 progra... | 1 | 27,939 | Is there a reason why we need a special case for Email at this point? Is the idea that other methods can turn into Email even if it's not configured as a top-level option? | vufind-org-vufind | php |
@@ -130,6 +130,9 @@ func makeJournalServer(
bcache BlockCache, dirtyBcache DirtyBlockCache, bserver BlockServer,
mdOps MDOps, onBranchChange branchChangeListener,
onMDFlush mdFlushListener, diskLimiter diskLimiter) *JournalServer {
+ if len(dir) == 0 {
+ panic("dir unexpectedly empty")
+ }
jServer := JournalSe... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"path/filepath"
"sync"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/... | 1 | 15,546 | This wording is a bit ambiguos, I first thought it meant the directory has no entries in it. maybe "dir" -> "dir string"? | keybase-kbfs | go |
@@ -53,6 +53,9 @@ namespace Kokkos {
namespace Experimental {
bool HPX::m_hpx_initialized = false;
+bool HPX::m_was_initialized = false;
+bool HPX::m_was_finalized = false;
+
std::atomic<uint32_t> HPX::m_next_instance_id{1};
#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
std::atomic<uint32_t> HPX::m_active_para... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 30,630 | Why do we need both `HPX::m_hpx_initialized` and `HPX:: m_was_initialized`? | kokkos-kokkos | cpp |
@@ -108,8 +108,8 @@ func NewMetadata(
}
versionToClusterName[info.InitialFailoverVersion] = clusterName
- if info.Enabled && (len(info.RPCName) == 0 || len(info.RPCAddress) == 0) {
- panic(fmt.Sprintf("Cluster %v: rpc name / address is empty", clusterName))
+ if info.Enabled && info.RPCAddress == "" {
+ p... | 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 | 11,465 | also check RPCName? | temporalio-temporal | go |
@@ -76,9 +76,11 @@ import org.springframework.security.oauth2.client.userinfo.ReactiveOAuth2UserSer
import org.springframework.security.oauth2.client.web.server.AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository;
import org.springframework.security.oauth2.client.web.server.OAuth2AuthorizationCodeGrantWebFil... | 1 | /*
* Copyright 2002-2019 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 | 14,689 | Remove unused import | spring-projects-spring-security | java |
@@ -182,7 +182,7 @@ func (i *Instance) Restart(newCaddyfile Input) (*Instance, error) {
newInst := &Instance{serverType: newCaddyfile.ServerType(), wg: i.wg}
// attempt to start new instance
- err := startWithListenerFds(newCaddyfile, newInst, restartFds)
+ err := startWithListenerFds(newCaddyfile, newInst, resta... | 1 | // Package caddy implements the Caddy server manager.
//
// To use this package:
//
// 1. Set the AppName and AppVersion variables.
// 2. Call LoadCaddyfile() to get the Caddyfile.
// Pass in the name of the server type (like "http").
// 3. Call caddy.Start() to start Caddy. You get back
// an Instance,... | 1 | 9,897 | I assume there will never be a scenario where justValidate is expected to be true on a restart | caddyserver-caddy | go |
@@ -356,6 +356,9 @@ public class PMD {
sortFiles(configuration, files);
+ // Make sure the cache is listening for analysis results
+ ctx.getReport().addListener(configuration.getAnalysisCache());
+
/*
* Check if multithreaded support is available. ExecutorService ca... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
im... | 1 | 11,694 | Report listeners are synchronized, even 'though the cache is thread-safe... I've not profiled it, but it may be a cause of contingency. Any better way around this? Also, do listeners **really** need to be synchronized? Can't we just make them thread-safe? | pmd-pmd | java |
@@ -3,7 +3,7 @@ module Travis
class Script
class C < Script
DEFAULTS = {
- compiler: 'gcc'
+ compiler: ''
}
def export | 1 | module Travis
module Build
class Script
class C < Script
DEFAULTS = {
compiler: 'gcc'
}
def export
super
sh.export 'CC', compiler
if data.cache?(:ccache)
sh.export 'PATH', "/usr/lib/ccache:$PATH"
end
end
... | 1 | 13,763 | I don't think this is correct. When `compiler` is not given in `.travis.yml`, the announcement will be `--version`, which results in "`command not found`" (though not critical), and the cache slug will lack this information (also not critical). | travis-ci-travis-build | rb |
@@ -33,6 +33,9 @@ const instanceMethods = {
},
async callFunction(name, args, service = undefined) {
+ if (!args) {
+ args = [];
+ }
const cleanedArgs = cleanArguments(args);
const stringifiedArgs = EJSON.stringify(cleanedArgs, { relaxed: false });
const r... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2020 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 | 20,461 | Why do this rather than `args = []` in the function signature? | realm-realm-js | js |
@@ -22,6 +22,8 @@ module Bolt
%w[service-url cacert token-file task-environment local-validation]
end
+ PROVIDED_FEATURES = ['puppet-agent'].freeze
+
def self.validate(options)
validation_flag = options['local-validation']
unless !!validation_flag == validation_flag | 1 | # frozen_string_literal: true
require 'base64'
require 'concurrent'
require 'json'
require 'orchestrator_client'
require 'bolt/transport/base'
require 'bolt/transport/orch/connection'
require 'bolt/result'
module Bolt
module Transport
class Orch < Base
CONF_FILE = File.expand_path('~/.puppetlabs/client-to... | 1 | 8,609 | I think we probably *should* do validation of whether there is a suitable implementation if local-validation is true. I'm not sure how useful that actually is though | puppetlabs-bolt | rb |
@@ -1640,6 +1640,11 @@ class Dataset(object):
if self.handle is None or other.handle is None:
raise ValueError('Both source and target Datasets must be constructed before adding features')
_safe_call(_LIB.LGBM_DatasetAddFeaturesFrom(self.handle, other.handle))
+ if other.data is No... | 1 | # coding: utf-8
"""Wrapper for C API of LightGBM."""
from __future__ import absolute_import
import copy
import ctypes
import os
import warnings
from tempfile import NamedTemporaryFile
from collections import OrderedDict
import numpy as np
import scipy.sparse
from .compat import (PANDAS_INSTALLED, DataFrame, Series, ... | 1 | 22,146 | @StrikerRUS here may need to concat two data by col. | microsoft-LightGBM | cpp |
@@ -64,7 +64,7 @@ public interface NodeWithJavadoc<N extends Node> {
*/
@SuppressWarnings("unchecked")
default N setJavadocComment(String comment) {
- return setJavadocComment(new JavadocComment(comment));
+ return setJavadocComment(new JavadocComment(" " + comment));
}
default... | 1 | /*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the ... | 1 | 12,156 | Why the space? | javaparser-javaparser | java |
@@ -38,10 +38,10 @@ public interface ZalcanoConfig extends Config
{
@ConfigTitleSection(
- keyName = "zalcanoTitle",
- name = "Zalcano",
- description = "",
- position = 0
+ keyName = "zalcanoTitle",
+ name = "Zalcano",
+ description = "",
+ position = 0
)
default Title zalcanoTitle()
{ | 1 | /*
*
* * Copyright (c) 2019, gazivodag <https://github.com/gazivodag>
* * All rights reserved.
* *
* * Redistribution and use in source and binary forms, with or without
* * modification, are permitted provided that the following conditions are met:
* *
* * 1. Redistributions of source code must retain t... | 1 | 16,106 | please resolve the extra indentation | open-osrs-runelite | java |
@@ -69,8 +69,9 @@ namespace pwiz.Skyline.Model.Lib
protected override bool StateChanged(SrmDocument document, SrmDocument previous)
{
return previous == null ||
- !ReferenceEquals(document.Settings.PeptideSettings.Libraries, previous.Settings.PeptideSettings.Libraries) ||
-... | 1 | /*
* Original author: Brendan MacLean <brendanx .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2009 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | 1 | 14,649 | More proof that this check is needed always. | ProteoWizard-pwiz | .cs |
@@ -86,9 +86,7 @@ lbann_comm::~lbann_comm() {
}
}
#ifdef LBANN_HAS_ALUMINUM
- for (auto&& c : al_comms) {
- delete c.second;
- }
+ m_al_comms.clear();
allreduces::Finalize();
#endif
} | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 12,474 | `m_al_comms` now contains smart pointers. | LLNL-lbann | cpp |
@@ -80,6 +80,10 @@ namespace AutoRest.CSharp
{
return "new " + type.Name + "()";
}
+ if (type is EnumType && (type as EnumType).ModelAsString)
+ {
+ return Instance.QuoteValue(defaultValue);
+ }
... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using AutoRest.Core;
using AutoRest.Core.Model;
using AutoRest.C... | 1 | 23,607 | Did you do a test run with the compare script? I'm nervous about what happens on all the generators... | Azure-autorest | java |
@@ -390,6 +390,19 @@ func (c *client) initClient() {
}
}
+// RemoteAddress expose the Address of the client connection,
+// nil when not connected or unknown
+func (c *client) RemoteAddress() net.Addr {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ if c.nc == nil {
+ return nil
+ }
+
+ return c.nc.RemoteAddr()
+}
+
//... | 1 | // Copyright 2012-2018 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 8,493 | For a client, we store host, as string c.host. That is what we use for monitoring and statsz. Not sure if its useful here or not. Looks like probably not. | nats-io-nats-server | go |
@@ -196,6 +196,6 @@ public class TestDataSourceOptions {
.option("split-size", String.valueOf(562L)) // 562 bytes is the size of SimpleRecord(1,"a")
.load(tableLocation);
- Assert.assertEquals("Spark partitions should match", 2, resultDf.javaRDD().getNumPartitions());
+ Assert.assertEquals("Sp... | 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,498 | This change is suspicious. Why did the number of partitions increase? | apache-iceberg | java |
@@ -20,8 +20,7 @@ class ProposalPolicy
end
def can_create!
- # TODO restrict by client_slug
- true
+ slug_matches? || @user.admin?
end
alias_method :can_new!, :can_create!
| 1 | class ProposalPolicy
include ExceptionPolicy
def initialize(user, record)
super(user, record)
@proposal = record
end
def can_approve!
approver! && pending_approval! && not_cancelled!
end
def can_edit!
requester! && not_approved! && not_cancelled!
end
alias_method :can_update!, :can_ed... | 1 | 14,090 | I'm still new to this area, so please forgive what may be a stupid question: When would this be false? And do we have a test for that situation? | 18F-C2 | rb |
@@ -1710,10 +1710,11 @@ namespace pwiz.Skyline.EditUI
private void UpdateMoleculeType()
{
bool isPeptide = radioPeptide.Checked;
- btnCustomMoleculeColumns.Enabled = radioMolecule.Checked;
+ btnCustomMoleculeColumns.Enabled = true;
Settings.Default.Trans... | 1 | /*
* Original author: Nick Shulman <nicksh .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2009 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complia... | 1 | 14,423 | Should there be any changes to this file at all? | ProteoWizard-pwiz | .cs |
@@ -87,6 +87,7 @@ func parseTLS(h Helper) ([]ConfigValue, error) {
var folderLoader caddytls.FolderLoader
var certSelector caddytls.CustomCertSelectionPolicy
var acmeIssuer *caddytls.ACMEIssuer
+ var autoPolicy *caddytls.AutomationPolicy
var internalIssuer *caddytls.InternalIssuer
var issuers []certmagic.Issu... | 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,081 | The only field being used is the KeyType; Instead, we can probably just make a `keyType` variable here. | caddyserver-caddy | go |
@@ -36,8 +36,11 @@ var SwaggerPetstore = ( /** @lends SwaggerPetstore */ function() {
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*/
function SwaggerPetstore(baseUri, options) {
- SwaggerPetstore['super_'].call(this, options);
-
+ if (!options) {
+ options ... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */
// Code generated by Microsoft (R) AutoRest Code Generator 0.9.7.0
// Changes may ... | 1 | 20,707 | This should be done by code-gen change happening in the hydra repo. I am tweaking it just to get CI into a 'passing' state | Azure-autorest | java |
@@ -23,13 +23,15 @@ import { createTestRegistry } from './utils';
* Renders the given UI into a container to make assertions.
*
* @since 1.7.1
+ * @since 1.25.0 Added `features` option.
* @see {@link https://testing-library.com/docs/react-testing-library/api#render}
* @private
*
- * @param {*} ui ... | 1 | /**
* External dependencies
*/
import { render } from '@testing-library/react';
import { renderHook, act as actHook } from '@testing-library/react-hooks';
import invariant from 'invariant';
/**
* WordPress dependencies
*/
import { RegistryProvider } from '@wordpress/data';
/**
* Internal dependencies
*/
import ... | 1 | 36,611 | Cleaned up when I originally added support for passing `screenContext` here (and later `viewContext`) but that was removed. | google-site-kit-wp | js |
@@ -251,14 +251,14 @@ std::string CPlusPlusLanguage::MethodName::GetScopeQualifiedName() {
bool CPlusPlusLanguage::IsCPPMangledName(const char *name) {
// FIXME!! we should really run through all the known C++ Language plugins
// and ask each one if this is a C++ mangled name
-
+
if (name == nullptr)
r... | 1 | //===-- CPlusPlusLanguage.cpp -----------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 1 | 16,989 | This looks like a bunch of whitespace fixing that's unrelated. Can you revert? | apple-swift-lldb | cpp |
@@ -25,7 +25,7 @@ class AppKernel extends Kernel
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
- new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
+... | 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.
*/
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Dep... | 1 | 11,475 | should be removed instead | EasyCorp-EasyAdminBundle | php |
@@ -88,10 +88,14 @@ public class TestRegExp extends LuceneTestCase {
assertTrue(a.toString().length() > 0);
}
+
+ boolean caseSensitiveQuery = true;
+
public void testCoreJavaParity() {
// Generate random doc values and random regular expressions
// and check for same matching behaviour as... | 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 | 34,458 | should use randomization ? | apache-lucene-solr | java |
@@ -102,7 +102,7 @@ func (c *CmdVolumeOptions) RunVolumeInfo(cmd *cobra.Command) error {
// controller's IP, status, iqn, replica IPs etc.
volumeInfo, err := NewVolumeInfo(mapiserver.GetURL()+VolumeAPIPath+c.volName, c.volName, c.namespace)
if err != nil {
- return err
+ return nil
}
// Initiallize an ins... | 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,365 | returning nil because we want to mayactl to exit with 0 status code. | openebs-maya | go |
@@ -112,7 +112,7 @@ static void send_response(struct st_h2o_status_collector_t *collector)
resp[cur_resp++] = (h2o_iovec_t){H2O_STRLIT("\n}\n")};
req->res.status = 200;
- h2o_add_header(&req->pool, &req->res.headers, H2O_TOKEN_CONTENT_TYPE, H2O_STRLIT("text/plain; charset=utf-8"));
+ h2o_add_header(&r... | 1 | /*
* Copyright (c) 2016 DeNA Co., Ltd., Kazuho Oku
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify,... | 1 | 11,329 | Is this change relevant to the PR? (and I believe we should use `text/plain` considering the fact that it can be displayed using web browsers...) | h2o-h2o | c |
@@ -9,12 +9,12 @@ namespace Microsoft.CodeAnalysis.Sarif
/// <summary>
/// The state of a result relative to a baseline of a previous run.
/// </summary>
- [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.28.0.0")]
[Flags]
+ [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.30.0.0")]
... | 1 | // Copyright (c) Microsoft. 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.CodeDom.Compiler;
namespace Microsoft.CodeAnalysis.Sarif
{
/// <summary>
/// The state of a result relative to a baselin... | 1 | 10,780 | `[Flags]` is now auto-generated by an argument to the `EnumHint`. (The attributes happen to come out in this order. I don't think it's worth controlling the order.) #Resolved | microsoft-sarif-sdk | .cs |
@@ -376,6 +376,9 @@ configRetry:
} else {
// Use the syncer locally.
syncer = felixsyncer.New(backendClient, datastoreConfig.Spec, syncerToValidator)
+
+ log.Info("using resource updates where applicable")
+ configParams.SetUseResourceUpdates(true)
}
log.WithField("syncer", syncer).Info("Created Syncer")
... | 1 | // Copyright (c) 2017-2019 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 16,724 | I think same here - in general we don't need to use Setters / Getters since configParams isn't a public API. | projectcalico-felix | c |
@@ -62,8 +62,13 @@ func main() {
ddata, err := ioutil.ReadFile(os.Args[3])
failFast(err)
+ programstr := fmt.Sprintf("%s", pdata)
+
+ programbytes, err := logic.AssembleString(programstr)
+ failFast(err)
+
dsig := sec.Sign(logic.Msg{
- ProgramHash: crypto.HashObj(logic.Program(pdata)),
+ ProgramHash... | 1 | // Copyright (C) 2019-2020 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) ... | 1 | 37,355 | Why using `fmt.Sprintf` where `fmt.Sprint` would do the work (notice no `f` in function name)? | algorand-go-algorand | go |
@@ -257,6 +257,12 @@ class VirtualBufferTextInfo(browseMode.BrowseModeDocumentTextInfo,textInfos.offs
return lineStart.value,lineEnd.value
def _normalizeControlField(self,attrs):
+
+ ariaCurrent = attrs.get("IAccessible2::attribute_current")
+ if ariaCurrent != None:
+ attrs['current']= ariaCurrent
+ del a... | 1 | # -*- coding: UTF-8 -*-
#virtualBuffers/__init__.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2007-2015 NV Access Limited, Peter Vágner
import time
import threading
import ctypes
import collection... | 1 | 18,433 | Extraneous blank line. | nvaccess-nvda | py |
@@ -43,5 +43,5 @@ var errWalletNotFound = fmt.Errorf("wallet not found")
var errSQLiteWrongType = fmt.Errorf("sqlite wallet driver returned wrong wallet type")
var errNameTooLong = fmt.Errorf("wallet name too long, must be <= %d bytes", sqliteMaxWalletNameLen)
var errIDTooLong = fmt.Errorf("wallet id too long, must ... | 1 | // Copyright (C) 2019-2020 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) ... | 1 | 39,488 | nit: syntax : neither -> nor | algorand-go-algorand | go |
@@ -45,11 +45,11 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Log4Net
loggingEvent.Properties[CorrelationIdentifier.VersionKey] = tracer.Settings.ServiceVersion ?? string.Empty;
loggingEvent.Properties[CorrelationIdentifier.EnvKey] = tracer.Settings.Environment ?? string.... | 1 | // <copyright file="AppenderAttachedImplIntegration.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 ... | 1 | 25,064 | Is it safe to assume that these two keys are always present? `this[string]` will throw a `KeyNotFoundException` if they are not. | DataDog-dd-trace-dotnet | .cs |
@@ -689,8 +689,9 @@ public class ExecutionController extends EventHandler implements ExecutorManager
this.maxConcurrentRunsPerFlowMap);
if (running.size() > maxConcurrentRuns) {
this.commonMetrics.markSubmitFlowSkip();
- throw new ExecutorManagerException("Flow " + flowId
- ... | 1 | /*
* Copyright 2018 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 | 18,775 | Is the `flowDefinitionId` sufficient to uniquely identify the flow or does it need to be the tuple `<flowId,flowDefinitionId>` ? | azkaban-azkaban | java |
@@ -1774,6 +1774,7 @@ return [
'DateTime::add' => ['static', 'interval'=>'DateInterval'],
'DateTime::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'],
'DateTime::createFromImmutable' => ['static', 'datetTimeImmutable'=>'DateTimeImmutable'],
+'DateTime::createF... | 1 | <?php // phpcs:ignoreFile
namespace Phan\Language\Internal;
/**
* CURRENT PHP TARGET VERSION: 7.4
* The version above has to match Psalm\Internal\Codebase\InternalCallMapHandler::PHP_(MAJOR|MINOR)_VERSION
*
* Format
*
* '<function_name>' => ['<return_type>, '<arg_name>'=>'<arg_type>']
* alternative signature fo... | 1 | 9,864 | Shouldn't it be in the reverse order? `DateTime::createFromInterface()` returns `self` and accepts `DateTimeInterface`. | vimeo-psalm | php |
@@ -114,12 +114,6 @@ function getArrayBuffer (chunk) {
function getFileType (file) {
const fileExtension = file.name ? getFileNameAndExtension(file.name).extension : null
-
- if (file.isRemote) {
- // some remote providers do not support file types
- return file.type ? file.type : mimeTypes[fileExtension]
... | 1 | const throttle = require('lodash.throttle')
const mimeTypes = require('./mime-types.js')
/**
* A collection of small utility functions that help with dom manipulation, adding listeners,
* promises and other good things.
*
* @module Utils
*/
function isTouchDevice () {
return 'ontouchstart' in window || // work... | 1 | 10,868 | this check is now redundant. The rest of the function downwards basically does the same thing but with safer checks. | transloadit-uppy | js |
@@ -71,7 +71,7 @@ class Feature extends BaseI18nLoop implements PropelSearchLoopInterface
new Argument(
'order',
new TypeCollection(
- new Type\EnumListType(array('id', 'id_reverse', 'alpha', 'alpha-reverse', 'manual', 'manual_reverse'))
+ ... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 11,648 | Please could you remove the useless space. | thelia-thelia | php |
@@ -1082,12 +1082,14 @@ public final class OrdsSegmentTermsEnum extends BaseTermsEnum {
if (FST.targetHasArcs(arc)) {
// System.out.println(" targetHasArcs");
result.grow(1+upto);
-
+ if (arc.target < 0 || arc.target > Integer.MAX_VALUE) {
+ assert(arc.target >= 0);
+ ... | 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 | 29,015 | What's the point of this block (and isn't it effectively dead code)? | apache-lucene-solr | java |
@@ -5,7 +5,7 @@ class ForumSessionsController < ApplicationController
def new
sso = DiscourseSignOn.parse(
request.query_string,
- ENV["DISCOURSE_SSO_SECRET"]
+ ENV.fetch("DISCOURSE_SSO_SECRET"),
)
populate_sso_for_current_user(sso)
track_forum_access | 1 | class ForumSessionsController < ApplicationController
before_action :require_login
before_action :must_have_forum_access
def new
sso = DiscourseSignOn.parse(
request.query_string,
ENV["DISCOURSE_SSO_SECRET"]
)
populate_sso_for_current_user(sso)
track_forum_access
redirect_to sso.... | 1 | 16,045 | Put a comma after the last parameter of a multiline method call. | thoughtbot-upcase | rb |
@@ -0,0 +1,6 @@
+from dagster import job, SourceHashVersionStrategy
+
+
+@job(version_strategy=SourceHashVersionStrategy())
+def the_job():
+ ... | 1 | 1 | 17,464 | Newline at end of file plz | dagster-io-dagster | py | |
@@ -18,7 +18,10 @@ package v1alpha3
import (
"fmt"
+ "github.com/aws/aws-sdk-go/aws"
+ "k8s.io/apimachinery/pkg/types"
"reflect"
+ clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
)
// Tags defines a map of tags. | 1 | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 16,736 | Can this be refactored to avoid including the aws sdk in the types that we expose? I know it's not being exposed directly through the types we expose, but I do worry that it might make it easier to accidentally do that in the future and not realize it as easily. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -1028,4 +1028,18 @@ class Queue
]
);
}
+
+ /**
+ * Sets the timestamp of when an item last has been indexed.
+ *
+ * @param Item $item
+ */
+ public function updateIndexQueueByItem(Item $item)
+ {
+ $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
+ 'tx_so... | 1 | <?php
namespace ApacheSolrForTypo3\Solr\IndexQueue;
/***************************************************************
* Copyright notice
*
* (c) 2009-2015 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribu... | 1 | 6,212 | Hi thomas, i would propose to indicate in the name, that only the indextime is updated, otherwise somebody might think the whole items is getting updated. I would propose something like "updateIndexTimeByItem(Item $item)" | TYPO3-Solr-ext-solr | php |
@@ -95,6 +95,8 @@ class visibility_of(object):
def _element_if_visible(element, visibility=True):
+ if isinstance(element, str) or isinstance(element, dict):
+ raise StaleElementReferenceException("Invalid locator")
return element if element.is_displayed() == visibility else 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 | 14,205 | This is not the right exception class. There is an InvalidSelectorException class that covers bad locators. | SeleniumHQ-selenium | js |
@@ -45,6 +45,10 @@
#include <Kokkos_Macros.hpp>
#ifdef KOKKOS_ENABLE_CUDA
+#include <Kokkos_Core.hpp>
+#include <Kokkos_Cuda.hpp>
+#include <Kokkos_CudaSpace.hpp>
+
#include <cstdlib>
#include <iostream>
#include <sstream> | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 26,903 | I assume this came from format? | kokkos-kokkos | cpp |
@@ -56,6 +56,13 @@ class ReIndexTask extends AbstractTask
*/
protected $indexingConfigurationsToReIndex = array();
+ /**
+ * Clear Index for selected sites and record types
+ *
+ * @var boolean
+ */
+ protected $clearSearchIndex;
+
/**
* Purges/commits all Solr indexes, i... | 1 | <?php
namespace ApacheSolrForTypo3\Solr\Task;
/***************************************************************
* Copyright notice
*
* (c) 2011-2015 Christoph Moeller <support@network-publishing.de>
* (c) 2012-2015 Ingo Renner <ingo@typo3.org>
*
* All rights reserved
*
* This script is part of the TYPO3 pr... | 1 | 6,070 | I'd suggest a default value of `false` just to make sure existing tasks are ok when they get deserialized after an update to a version containing this code. | TYPO3-Solr-ext-solr | php |
@@ -237,6 +237,8 @@ func (km *KeyManagerStandard) getTLFCryptKeyParams(
kbfscrypto.CryptPublicKey{},
localMakeRekeyReadError(err)
}
+ km.log.CDebugf(ctx, "Trying to decrypt with keys = %s",
+ dumpConfig().Sdump(keys))
var index int
clientHalf, index, err = crypto.DecryptTLFCryptKeyClientHalfAny(ct... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/key... | 1 | 15,161 | Do we really need this? Seems like it would pollute the logs pretty badly. | keybase-kbfs | go |
@@ -9,6 +9,8 @@ namespace Microsoft.AspNet.Server.Kestrel.Infrastructure
{
public struct MemoryPoolIterator2
{
+ private readonly static int _vectorSpan = Vector<byte>.Count;
+
private MemoryPoolBlock2 _block;
private int _index;
| 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.Diagnostics;
using System.Numerics;
namespace Microsoft.AspNet.Server.Kestrel.Infrastructure
{
public struct MemoryPool... | 1 | 7,668 | `Vector<byte>.Count` should Jit to const when intrinsic; not sure when `Vector.IsHardwareAccelerated == false` ; however we know `readonly static int` does Jit to const. | aspnet-KestrelHttpServer | .cs |
@@ -208,6 +208,9 @@ class PostgresqlStorageMigrationTest(unittest.TestCase):
class PostgresqlPermissionMigrationTest(unittest.TestCase):
def __init__(self, *args, **kw):
super(PostgresqlPermissionMigrationTest, self).__init__(*args, **kw)
+ from kinto.core.utils import sqlalchemy
+ if sqlal... | 1 | import os
import mock
import six
from pyramid import testing
from kinto.core.cache import postgresql as postgresql_cache
from kinto.core.permission import postgresql as postgresql_permission
from kinto.core.storage import postgresql as postgresql_storage, exceptions
from kinto.core.utils import json
from .support im... | 1 | 9,543 | Can we use a skipIf decorator instead? | Kinto-kinto | py |
@@ -3,6 +3,14 @@
module Faker
class Number < Base
class << self
+ ##
+ # Produce a random number.
+ #
+ # @param digits [Integer] Number of digits that the generated number should have.
+ # @return [Integer]
+ #
+ # @example
+ # Faker::Number.number(digits: 10) #=> 196... | 1 | # frozen_string_literal: true
module Faker
class Number < Base
class << self
def number(legacy_digits = NOT_GIVEN, digits: 10)
warn_for_deprecated_arguments do |keywords|
keywords << :digits if legacy_digits != NOT_GIVEN
end
return if digits < 1
return rand(0..9).... | 1 | 9,395 | Missing version tags | faker-ruby-faker | rb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.