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 |
|---|---|---|---|---|---|---|---|
@@ -39,5 +39,5 @@ class InputDevice(object):
def clear_actions(self):
self.actions = []
- def create_pause(self, duraton=0):
+ def create_pause(self, duration=0):
pass | 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,870 | we should probably deprecate (and display a warning) the misspelled keyword arg here rather than removing it... and then add the new one. This changes a public API and will break any code that is currently using the misspelled version. | SeleniumHQ-selenium | py |
@@ -191,7 +191,7 @@ public class FileHandler {
final long copied = Files.copy(from.toPath(), out);
final long length = from.length();
if (copied != length) {
- throw new IOException("Could not transfer all bytes.");
+ throw new IOException("Could not transfer all bytes of " + from.toP... | 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,214 | seems reasonable to also want to include the 'to' location? | SeleniumHQ-selenium | py |
@@ -77,9 +77,10 @@ module Beaker
# @option opts [Beaker::Logger] :logger A {Beaker::Logger} object
def validate_host host, opts
logger = opts[:logger]
+ # Additional Packages to be determined at runtime
+ additional_pkgs = Array.new
if opts[:collect_perf_data]
- UNIX_PACKAGES <<... | 1 | [ 'command', "dsl/patterns" ].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', 'ntpdate']... | 1 | 7,200 | This `if` statement can be merged with the above `if opts[:collect_perf_data]`. | voxpupuli-beaker | rb |
@@ -110,6 +110,8 @@ func (d Document) Get(fp []string) (interface{}, error) {
}
func (d Document) structField(name string) (reflect.Value, error) {
+ // We do case-insensitive match here to cover the MongoDB's lowercaseFields
+ // option.
f := d.fields.MatchFold(name)
if f == nil {
return reflect.Value{}, gc... | 1 | // Copyright 2019 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 18,863 | But won't we do case-insensitive matching for all the drivers? For example, we will get the revision field case-insensitively. Let's make this case-sensitive. I think the way the mongo driver works, by lowercasing field names, will be OK with that. | google-go-cloud | go |
@@ -5,7 +5,10 @@
<div class="text-box-wrapper">
<div class="text-box">
- <h2><%= @product.tagline %></h2>
+ <hgroup class="product-title">
+ <h2><%= @product.tagline %></h2>
+ <h3 class="workshop-type">Online Workshop</h3>
+ </hgroup>
<%== @product.description %>
</div> | 1 | <% content_for :meta_description, @product.short_description %>
<% content_for :meta_keywords, @product.meta_keywords %>
<% content_for :page_title, "#{@product.name}: a #{@product.product_type} by thoughtbot" %>
<% content_for :subject, @product.name %>
<div class="text-box-wrapper">
<div class="text-box">
<h2>... | 1 | 6,727 | I believe this should be on `workshops/show` now, not `products/show` | thoughtbot-upcase | rb |
@@ -16,6 +16,7 @@ func TestDetectorDetectCountry(t *testing.T) {
{"95.85.39.36", "NL", ""},
{"127.0.0.1", "", ""},
{"8.8.8.8.8", "", "failed to parse IP"},
+ {"185.243.112.225", "", ""},
{"asd", "", "failed to parse IP"},
}
| 1 | package location
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestDetectorDetectCountry(t *testing.T) {
tests := []struct {
ip string
want string
wantErr string
}{
{"8.8.8.8", "US", ""},
{"8.8.4.4", "US", ""},
{"95.85.39.36", "NL", ""},
{"127.0.0.1", "", ""},
{"8.8.8.8.8"... | 1 | 10,573 | If we return error when we are unable to found country in database, using country detector would be much easier - if error was not returned, that means country was returned :) This doesn't have to be solved in this PR, but since you're adding such case, we can add a `TODO` just to track this :) | mysteriumnetwork-node | go |
@@ -24,7 +24,12 @@ namespace Datadog.Trace.ClrProfiler.Managed.Loader
var corlib461Version = new Version(corlib461FileVersionString);
var tracerFrameworkDirectory = corlibVersion < corlib461Version ? "net45" : "net461";
- var tracerHomeDirectory = Environment.GetEnvironmentVariabl... | 1 | #if NETFRAMEWORK
using System;
using System.IO;
using System.Reflection;
namespace Datadog.Trace.ClrProfiler.Managed.Loader
{
/// <summary>
/// A class that attempts to load the Datadog.Trace.ClrProfiler.Managed .NET assembly.
/// </summary>
public partial class Startup
{
private static st... | 1 | 16,331 | .NET Framework: Fallback to `DD_INTEGRATIONS` if `DD_DOTNET_TRACER_HOME` was not set. | DataDog-dd-trace-dotnet | .cs |
@@ -111,7 +111,8 @@ def _read_request_line(line: bytes) -> Tuple[str, int, bytes, bytes, bytes, byte
raise ValueError
else:
scheme, rest = target.split(b"://", maxsplit=1)
- authority, path_ = rest.split(b"/", maxsplit=1)
+ authority, *paths_ = rest.split(b"/... | 1 | import re
import time
from typing import List, Tuple, Iterable, Optional
from mitmproxy.http import Request, Headers, Response
from mitmproxy.net.http import url
def get_header_tokens(headers, key):
"""
Retrieve all tokens for a header key. A number of different headers
follow a pattern where eac... | 1 | 15,445 | Can you use `authority, _, path = rest.partition(b"/")` here? That should make stuff a bit cleaner. | mitmproxy-mitmproxy | py |
@@ -75,6 +75,10 @@ module RSpec::Core
options[:order] = "rand:#{seed}"
end
+ parser.on('--stress-test LIMIT', Float, 'Repeatedly run randomly selected examples for LIMIT seconds.') do |o|
+ options[:stress_test] = o.to_f
+ end
+
parser.on('-d', '--debugger', 'Enable... | 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 | 9,176 | I don't think this needs to be a float if its a number of seconds... :) | rspec-rspec-core | rb |
@@ -38,7 +38,7 @@ interface FieldProcessor
/**
* process method
*
- * @param array Array of values, an array because of multivalued fields
+ * @param array $values of values, an array because of multivalued fields
* @return array Modified array of values
*/
public function proc... | 1 | <?php
namespace ApacheSolrForTypo3\Solr\FieldProcessor;
/***************************************************************
* 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 redist... | 1 | 5,912 | Please add "Array" back, right now it's not a proper sentence. | TYPO3-Solr-ext-solr | php |
@@ -509,7 +509,9 @@ public class QueryElevationComponent extends SearchComponent implements SolrCore
rb.setQuery(new BoostQuery(elevation.includeQuery, 0f));
} else {
BooleanQuery.Builder queryBuilder = new BooleanQuery.Builder();
- queryBuilder.add(rb.getQuery(), BooleanClause.Occur.SHOULD);
+ ... | 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 | 38,884 | @tkaessmann when I ran tests I saw this line has a bug. It inverts the SHOULD and MUST. Hopefully I fixed it and merged it without the bug. | apache-lucene-solr | java |
@@ -301,7 +301,7 @@ func initTelemetry(genesis bookkeeping.Genesis, log logging.Logger, dataDirector
}
// If the telemetry URI is not set, periodically check SRV records for new telemetry URI
- if log.GetTelemetryURI() == "" {
+ if telemetryConfig.Enable && log.GetTelemetryURI() == "" {
network.... | 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,300 | There may be another bug, it looks like we're already in a `if telemetryConfig.Enable` block at this point, maybe that block should be unnested? | algorand-go-algorand | go |
@@ -944,7 +944,9 @@ class Request(Message):
def _set_multipart_form(self, value):
self.content = multipart.encode(self.headers, value)
- self.headers["content-type"] = "multipart/form-data"
+ if "content-type" not in self.headers:
+ # Don't overwrite header if it already exists ... | 1 | import re
import time
import urllib.parse
from dataclasses import dataclass
from dataclasses import fields
from email.utils import formatdate
from email.utils import mktime_tz
from email.utils import parsedate_tz
from typing import Callable
from typing import Dict
from typing import Iterable
from typing import Iterator... | 1 | 15,761 | This... looks like it plainly didn't work before? Good catch. I would suggest we change the logic here to 1. Check if `self.headers["content_type"].startswith("multipart/form-data")`, and if that's not the case, add a content-type header with a random (?) boundary. The point here is that if someone assigns to `.multipa... | mitmproxy-mitmproxy | py |
@@ -86,9 +86,14 @@ func TestSignBlock(t *testing.T) {
func TestWrongNonce(t *testing.T) {
cfg := config.Default
+
+ require := require.New(t)
+ registry := protocol.Registry{}
+ require.NoError(registry.Register(account.ProtocolID, account.NewProtocol()))
+
ctx := protocol.WithValidateActionsCtx(
context.Back... | 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 | 19,993 | importShadow: shadow of imported from 'github.com/stretchr/testify/require' package 'require' (from `gocritic`) | iotexproject-iotex-core | go |
@@ -1963,9 +1963,8 @@ get_ibl_routine_type_ex(dcontext_t *dcontext, cache_pc target, ibl_type_t *type
/* a decent compiler should inline these nested loops */
/* iterate in order <linked, unlinked> */
- for (link_state = IBL_LINKED;
- /* keep in mind we need a signed comparison when going downwar... | 1 | /* **********************************************************
* Copyright (c) 2010-2017 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 12,722 | Wouldn't it be enough to change the condition in the for loop to `link_state != IBL_UNLINKED`? | DynamoRIO-dynamorio | c |
@@ -31,7 +31,10 @@
#include <glib/gi18n.h>
+static gboolean opt_verify;
+
static GOptionEntry options[] = {
+ { "verify", 'V', 0, G_OPTION_ARG_NONE, &opt_verify, "Print the commit verification status", NULL },
{ NULL }
};
| 1 | /*
* Copyright (C) 2012,2013 Colin Walters <walters@verbum.org>
*
* SPDX-License-Identifier: LGPL-2.0+
*
* This 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 2 of the ... | 1 | 19,278 | I'm not familiar with signed setups, but this does not seem to offer a way to choose between GPG and signapi verification. Are they usually either both enabled or both disabled? Would this be better suited as a verb with flags for different methods? | ostreedev-ostree | c |
@@ -951,7 +951,7 @@ func (dao *blockDAO) getBlockValue(blockNS string, h hash.Hash256) ([]byte, erro
if err != nil {
return nil, err
}
- value, err = db.Get(blockNS, h[:])
+ value, _ = db.Get(blockNS, h[:])
}
return value, err
} | 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 | 19,330 | assignments should only be cuddled with other assignments (from `wsl`) | iotexproject-iotex-core | go |
@@ -11,6 +11,7 @@ C2::Application.routes.draw do
post "/feedback" => "feedback#create"
match "/auth/:provider/callback" => "auth#oauth_callback", via: [:get]
+ get "/auth/failure" => "auth#failure"
post "/logout" => "auth#logout"
resources :help, only: [:index, :show] | 1 | C2::Application.routes.draw do
ActiveAdmin.routes(self)
root to: "home#index"
get "/error" => "home#error"
get "/profile" => "profile#show"
post "/profile" => "profile#update"
get "/summary" => "summary#index"
get "/summary/:fiscal_year" => "summary#index"
get "/feedback" => "feedback#index"
get "/fe... | 1 | 16,365 | would it make sense to mock oauth in a way that we direct a user to this endpoint on login (in a test)? | 18F-C2 | rb |
@@ -5,13 +5,14 @@ define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotific
var html = "";
html += '<div class="listItem listItem-border">';
var color = "Error" == entry.Severity || "Fatal" == entry.Severity || "Warn" == entry.Severity ? "#cc0000" : "#00a4dc";
+ ... | 1 | define(["events", "globalize", "dom", "datetime", "userSettings", "serverNotifications", "connectionManager", "emby-button", "listViewStyle"], function(events, globalize, dom, datetime, userSettings, serverNotifications, connectionManager) {
"use strict";
function getEntryHtml(entry, apiClient) {
var h... | 1 | 11,339 | Since these two lines use the same logic, it may be cleaner to use an `if` statement rather than duplicating it. | jellyfin-jellyfin-web | js |
@@ -3,7 +3,6 @@
namespace Shopsys\ShopBundle\Controller\Front;
use Exception;
-use Shopsys\FrameworkBundle\Component\Controller\FrontBaseController;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Shopsys\FrameworkBundle\Component\Error\ErrorPagesFacade;
use Shopsys\FrameworkBundle\Component\Error\Excep... | 1 | <?php
namespace Shopsys\ShopBundle\Controller\Front;
use Exception;
use Shopsys\FrameworkBundle\Component\Controller\FrontBaseController;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Shopsys\FrameworkBundle\Component\Error\ErrorPagesFacade;
use Shopsys\FrameworkBundle\Component\Error\ExceptionController;
... | 1 | 10,604 | unnecessary blank line | shopsys-shopsys | php |
@@ -38,6 +38,12 @@ public class MetadataColumns {
Integer.MAX_VALUE - 2, "_pos", Types.LongType.get(), "Ordinal position of a row in the source data file");
public static final NestedField IS_DELETED = NestedField.required(
Integer.MAX_VALUE - 3, "_deleted", Types.BooleanType.get(), "Whether the row ha... | 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 | 40,856 | Nit: no need for "to" at the end of the doc because it already uses "to which". | apache-iceberg | java |
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Scope = "member... | 1 | 1 | 20,610 | I would just say "Signed before publishing." | Azure-autorest | java | |
@@ -21,13 +21,14 @@
#include <gtest/gtest.h>
-#include <fastrtps/transport/UDPv4Transport.h>
-#include "../cpp/rtps/transport/shared_mem/test_SharedMemTransportDescriptor.h"
+#include <rtps/transport/shared_mem/test_SharedMemTransportDescriptor.h>
+#include <rtps/transport/UDPv4Transport.h>
using namespace epro... | 1 | // Copyright 2020 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,526 | We can just include the public UDPv4TransportDescriptor header here ... | eProsima-Fast-DDS | cpp |
@@ -196,6 +196,9 @@ class BlazeMeterUploader(Reporter, AggregatorListener, MonitoringListener, Singl
self._session = Session(self._user, {'id': sess_id})
self._session['userId'] = self.parameters.get("user-id", None)
self._session['testId'] = self.parameters.get("test-id", None)
+... | 1 | """
Module for reporting into http://www.blazemeter.com/ service
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
Unles... | 1 | 14,487 | Why do we need this change? | Blazemeter-taurus | py |
@@ -172,11 +172,15 @@ func (t *Tag) Done(s State) bool {
return err == nil && n == total
}
-// DoneSplit sets total count to SPLIT count and sets the associated swarm hash for this tag
-// is meant to be called when splitter finishes for input streams of unknown size
+// DoneSplit adds the total with the split cou... | 1 | // Copyright 2019 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum 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 the License... | 1 | 10,754 | These three atomic functions done separately are not atomic. There is a possibility of data race, as nothing is guarding Total in between lines 182 and 183. Total got on line 182 may be changed before new value is stored on line 183 by some other goroutine resulting an incorrect value. Mutex should be used. | ethersphere-bee | go |
@@ -392,7 +392,7 @@ namespace Nethermind.BeaconNode.Tests.EpochProcessing
foreach (var checkpoint in checkpoints)
{
var startSlot = beaconChainUtility.ComputeStartSlotOfEpoch(checkpoint.Epoch);
- var slotIndex = startSlot % timeParameters.SlotsPerHistoricalRoot;... | 1 | using System;
using System.Collections;
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nethermind.BeaconNode.Configuration;
using Nethermind.BeaconNode.Containers;
using Nethermind.BeaconNode.Tests.Helpers... | 1 | 22,804 | Is this because you don't have % on your version of Slot? I don't really care either way. | NethermindEth-nethermind | .cs |
@@ -212,9 +212,14 @@
return {
pre: function ($scope, $elm, $attrs, uiGridCtrl) {
if ( uiGridCtrl.grid.options.enableExpandableRowHeader !== false ) {
- var expandableRowHeaderColDef = {name: 'expandableButtons', displayName: '', enableColumnResizing: false, width: 4... | 1 | (function () {
'use strict';
/**
* @ngdoc overview
* @name ui.grid.expandable
* @description
*
* # ui.grid.expandable
* This module provides the ability to create subgrids with the ability to expand a row
* to show the subgrid.
*
* <div doc-module-components="ui.grid.expandable"></div>
... | 1 | 10,448 | Please use var declaration for variables you are declaring. I could not find one for userInjectedExpandableRowHeaderColDef and finalExpandableRowHeaderColDef. Also code styling in the if block needs to be corrected. | angular-ui-ui-grid | js |
@@ -158,12 +158,10 @@ NABoolean TMUDFDllInteraction::describeParamsAndMaxOutputs(
dummyUser,
cachedLibName, cachedLibPath))
{
- NAString cachedFullName = cachedLibPath+"/"+cachedLibName;
char errString[200];
... | 1 | /**********************************************************************
//
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership... | 1 | 22,779 | If cachedLibPath > 200 bytes, it will overflow errString. | apache-trafodion | cpp |
@@ -202,6 +202,10 @@ const ariaRoles = {
allowedAttrs: ['aria-expanded'],
superclassRole: ['landmark']
},
+ generic: {
+ type: 'structure',
+ prohibitedAttrs: ['aria-label', 'aria-labelledby']
+ },
grid: {
type: 'composite',
requiredOwned: ['rowgroup', 'row'], | 1 | // Source: https://www.w3.org/TR/wai-aria-1.1/#roles
/* easiest way to see allowed roles is to filter out the global ones
from the list of inherited states and properties. The dpub spec
does not have the global list so you'll need to copy over from
the wai-aria one:
const globalAttrs = Array.from(
docu... | 1 | 16,279 | Talked this through with a few more folks. I think it would be better to flag prohibited attributes for review, instead of outright failing them. ARIA labels are used fairly liberally. We don't really know if they are actually needed whenever they are used. | dequelabs-axe-core | js |
@@ -565,8 +565,11 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
}
// Transactor should have enough funds to cover the costs
// cost == V + GP * GL
- if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 {
- return ErrInsufficientFunds
+ if !rcfg.UsingOVM {
+ // This check is do... | 1 | // Copyright 2014 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum 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 the License... | 1 | 19,138 | Let's keep it to avoid the diff | ethereum-optimism-optimism | go |
@@ -63,7 +63,8 @@ public class SparkTable implements org.apache.spark.sql.connector.catalog.Table,
private static final Logger LOG = LoggerFactory.getLogger(SparkTable.class);
- private static final Set<String> RESERVED_PROPERTIES = Sets.newHashSet("provider", "format", "current-snapshot-id");
+ private static... | 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,023 | nit: not directly related to this PR, but shall we use `ImmutableSet` for consistency? | apache-iceberg | java |
@@ -109,10 +109,10 @@ module Blacklight
# @return [Blacklight::Solr::Response] the solr response object
def to_hash
return @params unless params_need_update?
- @params = processed_parameters.
- reverse_merge(@reverse_merged_params).
- merge(@merged_params).
- ... | 1 | # frozen_string_literal: true
module Blacklight
##
# Blacklight's SearchBuilder converts blacklight request parameters into
# query parameters appropriate for search index. It does so by evaluating a
# chain of processing methods to populate a result hash (see {#to_hash}).
class SearchBuilder
class_attrib... | 1 | 7,736 | Layout/DotPosition: Place the . on the previous line, together with the method call receiver. | projectblacklight-blacklight | rb |
@@ -628,7 +628,10 @@ public class ClientManager {
Log.w("AccMgrAuthTokenProvider:fetchNewAuthToken", "accountManager.getAuthToken returned null bundle");
} else {
newAuthToken = bundle.getString(AccountManager.KEY_AUTHTOKEN);
- newInstanceUrl... | 1 | /*
* Copyright (c) 2014, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice, this... | 1 | 15,027 | We send the `instanceUrl` encrypted, but never bothered to decrypt it. I guess it was working because we never did any org split testing where the `instanceUrl` actually changes. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -43,6 +43,12 @@ public class BftBlockHeaderFunctions implements BlockHeaderFunctions {
bftExtraDataCodec);
}
+ public static BlockHeaderFunctions forCmsSignature(final BftExtraDataCodec bftExtraDataCodec) {
+ return new BftBlockHeaderFunctions(
+ h -> new BftBlockHashing(bftExtraDataCodec).c... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 25,871 | Can this be moved to QbftBlockHeaderFunctions class as it is only used for qbft | hyperledger-besu | java |
@@ -95,14 +95,6 @@ namespace Microsoft.CodeAnalysis.Sarif.Driver
}
}
- public IList<string> Tags
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
public void Analyze(TestAnalysisContext context)
... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis.Sarif.Readers;
namespace Microsoft.CodeAnalysis.Sarif.Driver
{
internal class Excepti... | 1 | 10,809 | `Tags` now comes from the `PropertyBagHolder` base class. | microsoft-sarif-sdk | .cs |
@@ -61,7 +61,7 @@ class TextPlot(ElementPlot):
data[k].extend(eld)
return data, elmapping, style
- def get_extents(self, element, ranges=None):
+ def get_extents(self, element, ranges=None, range_type='combined'):
return None, None, None, None
| 1 | from collections import defaultdict
import param
import numpy as np
from bokeh.models import Span, Arrow, Div as BkDiv
try:
from bokeh.models.arrow_heads import TeeHead, NormalHead
arrow_start = {'<->': NormalHead, '<|-|>': NormalHead}
arrow_end = {'->': NormalHead, '-[': TeeHead, '-|>': NormalHead,
... | 1 | 19,943 | I'm not sure where this should go, but one of the `get_extents` methods should mention that `range_type` can be `'data'` or `'combined'` (are there others?). I found out those are the two expected values by searching the code... | holoviz-holoviews | py |
@@ -25,14 +25,13 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
-import java.util.logging.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import zipkin2.codec.SpanBytesDecoder;
import zipkin2.codec.SpanBytesEncoder;
import zipkin2.internal.Nul... | 1 | /*
* Copyright 2015-2019 The OpenZipkin 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 a... | 1 | 15,927 | please revert all of this stuff in core.. I'll take another pass after. cheers and thanks for the help! | openzipkin-zipkin | java |
@@ -50,6 +50,7 @@ public class TestCreateTableAsSelect extends SparkCatalogTestBase {
@After
public void removeTables() {
sql("DROP TABLE IF EXISTS %s", tableName);
+ sql("DROP TABLE IF EXISTS %s", sourceName);
}
@Test | 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 | 26,243 | Why was this needed? | apache-iceberg | java |
@@ -179,8 +179,8 @@ func (brq *blockRetrievalQueue) Request(ctx context.Context, priority int, kmd K
brq.config.BlockCache().GetWithPrefetch(ptr)
if err == nil && cachedBlock != nil {
block.Set(cachedBlock, brq.config.codec())
- brq.triggerPrefetchAfterBlockRetrieved(
- cachedBlock, kmd, priority, ... | 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 (
"container/heap"
"errors"
"io"
"reflect"
"sync"
"github.com/keybase/kbfs/kbfscodec"
"golang.org/x/net/context"
)
const (
defaultBlock... | 1 | 15,351 | I see that CI found a couple test hangs, maybe your `TogglePrefetcher` change below wasn't enough and this still needs to be a `go` invocation for some reason? | keybase-kbfs | go |
@@ -125,7 +125,7 @@ class DomainInfoCommand extends Command
$propertyExtractor = new ReflectionExtractor();
$io->writeln('You can access these properties:');
- $io->listing($propertyExtractor->getProperties($domainConfig));
+ $io->listing($propertyExtractor->getProperties(get_class($do... | 1 | <?php
declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Command;
use Shopsys\FrameworkBundle\Component\Domain\Config\DomainConfig;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Cons... | 1 | 22,606 | I do not understand this change | shopsys-shopsys | php |
@@ -5398,6 +5398,9 @@ type InputService24TestShapeInputService24TestCaseOperation1Input struct {
Header1 *string `location:"header" type:"string"`
+ // By default keys received from the service api response will be formatted
+ // using net/http.CanonicalHeaderKey.
+ // Set aws.Config.LowerCaseHeaderMaps to `true`... | 1 | // Code generated by models/protocol_tests/generate.go. DO NOT EDIT.
package restjson_test
import (
"bytes"
"encoding/json"
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"reflect"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sd... | 1 | 10,074 | It would be helpful to clarify this is only for unmarshaling a response. not marshaling a request. | aws-aws-sdk-go | go |
@@ -109,7 +109,7 @@ describe('nested-interactive virtual-rule', function() {
var results = axe.runVirtualRule('nested-interactive', node);
- assert.lengthOf(results.passes, 0);
+ assert.lengthOf(results.passes, 1);
assert.lengthOf(results.violations, 1);
assert.lengthOf(results.incomplete, 0);
... | 1 | describe('nested-interactive virtual-rule', function() {
it('should pass for element without focusable content', function() {
var node = new axe.SerialVirtualNode({
nodeName: 'button'
});
var child = new axe.SerialVirtualNode({
nodeName: '#text',
nodeType: 3,
nodeValue: 'Hello Worl... | 1 | 17,307 | I have no explanation for why this test wasn't erroring before... There are two applicable nodes in this tree, one passes, the other fails. | dequelabs-axe-core | js |
@@ -26,7 +26,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif // HAVE_CONFIG_H
+#endif // HAVE_CONFIG_Hrm
#include <glob.h>
#include <stdio.h> | 1 | // Copyright(c) 2019-2020, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and... | 1 | 19,562 | Remove the "rm" from the end of "HAVE_CONFIG_H" | OPAE-opae-sdk | c |
@@ -15,3 +15,11 @@ func (p *FakeProver) CalculatePoSt(ctx context.Context, start, end *types.BlockH
Proofs: []types.PoStProof{[]byte("test proof")},
}, nil
}
+
+// TrivialTestSlasher is a storage fault slasher that does nothing
+type TrivialTestSlasher struct{}
+
+// Slash is a required function for storageFaultS... | 1 | package storage
import (
"context"
"github.com/filecoin-project/go-filecoin/types"
)
// FakeProver provides fake PoSt proofs for a miner.
type FakeProver struct{}
// CalculatePoSt returns a fixed fake proof.
func (p *FakeProver) CalculatePoSt(ctx context.Context, start, end *types.BlockHeight, inputs []PoStInputs... | 1 | 20,639 | Non-Blocking: This might be too trivial. It doesn't allow us to test that it's being callled. | filecoin-project-venus | go |
@@ -278,6 +278,8 @@ switch (datatype)
case REC_INT_FRACTION: return extFormat? (char *)"INTERVAL FRACTION":(char *)"REC_INT_FRACTION";
case REC_BLOB: return extFormat? (char *)"BLOB":(char *)"REC_BLOB";
case REC_CLOB: return extFormat? (char *)"CLOB":(char *)"REC_CLOB";
+ case REC_BOOLEAN: return extFormat ? ... | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 12,843 | Not sure why the ternary expressions are used here, since the true and false results are the same. | apache-trafodion | cpp |
@@ -263,7 +263,7 @@ func getTranslationFunc(driverName string) (func() translationFunc, error) {
switch driverName {
case "sqlite3":
return SqliteColumnTranslateFunc, nil
- case "postgres", "sqlmock":
+ case "postgres", "sqlmock", "vertica", "vertigo":
return PostgresColumnTranslateFunc, nil
case "mysql":
... | 1 | package sql
import (
"database/sql"
"fmt"
"strings"
"github.com/influxdata/flux"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/execute"
"github.com/influxdata/flux/internal/errors"
"github.com/influxdata/flux/plan"
"github.com/influxdata/flux/runtime"
"github.com/influxdata/flux/values"
)
... | 1 | 15,612 | Is `vertigo` another name for Vertica databases? | influxdata-flux | go |
@@ -236,6 +236,7 @@ class HintActions:
utils.supports_selection())
urlstr = url.toString(QUrl.FullyEncoded | QUrl.RemovePassword)
+ urlstr = urlstr.lstrip('mailto:')
utils.set_clipboard(urlstr, selection=sel)
msg = "Yanked URL to {}: {}".format( | 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 | 17,205 | That doesn't do the right thing - it strips any of the characters m, a, i, l, t, o and :. It'd probably be cleaner to do this before converting the URL to a string. | qutebrowser-qutebrowser | py |
@@ -98,12 +98,14 @@ cliUtils.makeCommandArgs = function(cmd, argv) {
}
}
+
const args = yargParser(argv, {
boolean: booleanFlags,
alias: aliases,
string: ['_'],
});
+
for (let i = 1; i < cmdUsage['_'].length; i++) {
const a = cliUtils.parseCommandArg(cmdUsage['_'][i]);
if (a.required && !a... | 1 | const yargParser = require('yargs-parser');
const { _ } = require('lib/locale.js');
const { time } = require('lib/time-utils.js');
const stringPadding = require('string-padding');
const { Logger } = require('lib/logger.js');
const cliUtils = {};
cliUtils.printArray = function(logFunction, rows) {
if (!rows.length) r... | 1 | 15,176 | Why the white space changes? | laurent22-joplin | js |
@@ -0,0 +1,8 @@
+class LicenseMailerPreview < ActionMailer::Preview
+ def fullfillment_error
+ user = User.new(name: 'John Doe')
+ repository = Repository.first
+
+ LicenseMailer.fulfillment_error(repository, user)
+ end
+end | 1 | 1 | 18,312 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb | |
@@ -235,12 +235,11 @@ func (zone *ZoneDb) DomainLookupInaddr(inaddr string) (res []ZoneRecord, err err
func (zone *ZoneDb) startUpdatingName(name string) {
if zone.refreshInterval > 0 {
zone.mx.Lock()
- defer zone.mx.Unlock()
-
// check if we should enqueue a refresh request for this name
n := zone.getName... | 1 | package nameserver
import (
"net"
"time"
"github.com/miekg/dns"
. "github.com/weaveworks/weave/common"
)
type uniqZoneRecordKey struct {
name string
ipv4 IPv4
}
// A group of ZoneRecords where there are no duplicates (according to the name & IPv4)
type uniqZoneRecords map[uniqZoneRecordKey]ZoneRecord
func ne... | 1 | 9,279 | This is now outside the mutex, so could race. | weaveworks-weave | go |
@@ -43,11 +43,7 @@ import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.SortedSetSelector;
-import org.apache.lucene.store.ByteBuffersDataOutput;
-import org.apache.lucene.store.ByteBuffersIndexO... | 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 | 40,045 | hmmm did this pass spotless check? I don't think we typically use wildcard imports | apache-lucene-solr | java |
@@ -222,8 +222,8 @@ func (j journalMDOps) getRangeFromJournal(
return irmds, nil
}
-func (j journalMDOps) GetForHandle(
- ctx context.Context, handle *TlfHandle, mStatus MergeStatus) (
+func (j journalMDOps) GetForHandle(ctx context.Context, handle *TlfHandle,
+ mStatus MergeStatus, lockBeforeLock *keybase1.LockID... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/kbfs/kbfsblock"
"github.com/keybase/kbfs/kbfscrypto"
"github.c... | 1 | 17,654 | `lockBeforeLock` -> `lockBeforeGet` (here and everywhere below). | keybase-kbfs | go |
@@ -12,7 +12,7 @@ import java.util.List;
import org.junit.Test;
import net.sourceforge.pmd.PMD;
-import net.sourceforge.pmd.lang.java.ast.JavaParserConstants;
+import net.sourceforge.pmd.lang.java.ast.JavaTokenKinds;
public class JavaTokensTokenizerTest {
| 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.List;
import org.junit.Test;
import net.sourceforge.pmd.PMD;
import net.sourceforge.pmd.lang.java.ast.Ja... | 1 | 16,885 | Do we need to internalize net.sourceforge.pmd.lang.java.ast.JavaParserConstants on master, so that we can rename it? | pmd-pmd | java |
@@ -36,7 +36,7 @@ namespace Nethermind.Vault
{1, new Guid("deca2436-21ba-4ff5-b225-ad1b0b2f5c59")},
{3, new Guid("66d44f30-9092-4182-a3c4-bc02736d6ae5")},
{4, new Guid("07102258-5e49-480e-86af-6d0c3260827d")},
- {5, new Guid("1b16996e-3595-4985-816c-043345d22f")},
+ ... | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 24,568 | The GUID here was incorrect, because of that, Vault plugin loading was failing. Should I change to any correct GUID, or it has some special meaning? | NethermindEth-nethermind | .cs |
@@ -84,9 +84,6 @@ namespace OpenTelemetry.Instrumentation.AspNetCore.Tests
// giving some breezing room for the End callback to complete
await Task.Delay(TimeSpan.FromSeconds(1));
- // Invokes the TestExporter which will invoke ProcessExport
- metricReader.Collect();
-
... | 1 | // <copyright file="MetricTests.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org... | 1 | 21,623 | just confirming: if we remove explicit Collect(), then we are relying on the provider dispose... which has a hard-coded 5000 msec to finish flushing. On the other hand, if we keep explicit Collect(), we can pass an explicit timeout to it. (we were not doing it now and was relying on Infinite timeout). Net effect of thi... | open-telemetry-opentelemetry-dotnet | .cs |
@@ -22,4 +22,16 @@ public class Constants {
public static final String AZKABAN_PRIVATE_PROPERTIES_FILE = "azkaban.private.properties";
public static final String DEFAULT_CONF_PATH = "conf";
public static final String AZKABAN_EXECUTOR_PORT_FILENAME = "executor.port";
+
+ public static final String AZKABAN_SERVER_... | 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 | 11,772 | What do you think of a name like azkaban.server.logging.kafka.brokerList? This way the name signals that this is a server config. | azkaban-azkaban | java |
@@ -449,6 +449,12 @@ namespace NLog.Targets
get
{
#if SupportsMutex
+
+ if (!PlatformDetector.SupportsSharableMutex)
+ {
+ return _concurrentWrites ?? false; // Better user experience for mobile platforms
+ }
+
... | 1 | //
// Copyright (c) 2004-2018 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of s... | 1 | 18,126 | Maybe change into `return _concurrentWrites ?? PlatformDetector.SupportsSharableMutex` ? | NLog-NLog | .cs |
@@ -63,7 +63,8 @@ public class CircleStyleFinalizerTests {
finalizer.createCircleReport();
- String report = Resources.toString(targetFile.toURI().toURL(), StandardCharsets.UTF_8);
+ String report = Resources.toString(targetFile.toURI().toURL(), StandardCharsets.UTF_8)
+ .repla... | 1 | /*
* (c) Copyright 2017 Palantir Technologies 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 requ... | 1 | 6,711 | indentation of resulting file is different between 11 and 8 where 8 doesn't indent lines and 11 does | palantir-gradle-baseline | java |
@@ -82,13 +82,14 @@ func (u *unaryTransportHandler) Handle(ctx context.Context, req *Request, reqBuf
}
if appErr != nil {
- // TODO: This is a bit odd; we set the error in response AND return it.
- // However, to preserve the current behavior of YARPC, this is
- // necessary. This is most likely where the erro... | 1 | // Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 18,339 | Do we still need to return the `Response` here? | yarpc-yarpc-go | go |
@@ -18,3 +18,4 @@ if (global.document) {
}));
document.execCommand = jest.fn();
}
+global.VERDACCIO_API_URL = 'http://localhost/-/verdaccio/' | 1 | /**
* @prettier
* Setup configuration for Jest
* This file includes global settings for the JEST environment.
*/
import 'raf/polyfill';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
global.__APP_VERSION__ = '1.0.0';
// mocking few DOM me... | 1 | 19,241 | Here `global.VERDACCIO_API_URL` I'd use something different as `global.TEST_VERDACCIO_API_URL` then when you search by `VERDACCIO_API_URL` we don't confuse with `window.VERDACCIO_API_URL` | verdaccio-verdaccio | js |
@@ -57,6 +57,13 @@ public class DiscoveryFragmentGeneratorTool {
.hasArg()
.argName("OUTPUT-DIRECTORY")
.build());
+ options.addOption(
+ Option.builder()
+ .longOpt("auth_url")
+ .desc("A comma delimited map of language to auth instructions URL.")
... | 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 | 17,155 | This is totally fine, but consider whether in the future a YAML input format would be better. If so, we can plan for it. | googleapis-gapic-generator | java |
@@ -277,6 +277,14 @@ namespace Datadog.Trace.Configuration
/// </summary>
public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED";
+ /// <summary>
+ /// Configuration key for the semantic convention to be used.
+ /// The Tracer uses it to define operation na... | 1 | namespace Datadog.Trace.Configuration
{
/// <summary>
/// String constants for standard Datadog configuration keys.
/// </summary>
public static class ConfigurationKeys
{
/// <summary>
/// Configuration key for the path to the configuration file.
/// Can only be set with an e... | 1 | 19,602 | This should be `DD_TRACE_CONVENTION` to follow our ... conventions. | DataDog-dd-trace-dotnet | .cs |
@@ -241,8 +241,7 @@ Status VariablePropertyExpression::prepare() {
OptVariantType EdgeTypeExpression::eval(Getters &getters) const {
- UNUSED(getters);
- return *alias_;
+ return getters.getAliasProp(*alias_, *prop_);
}
Status EdgeTypeExpression::prepare() { | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "base/Cord.h"
#include "filter/Expressions.h"
#include "filter/FunctionManager.h"
#... | 1 | 27,982 | Be careful memory leaks. memory leaks occur when getters.getAliasProp == nullptr . right? | vesoft-inc-nebula | cpp |
@@ -281,6 +281,7 @@ type readCache struct {
// This is for routes and gateways to have their own L1 as well that is account aware.
pacache map[string]*perAccountCache
+ losc int64 // last orphan subs check
// This is for when we deliver messages across a route. We use this structure
// to make sure to on... | 1 | // Copyright 2012-2019 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 9,228 | Why not just a time.Time? | nats-io-nats-server | go |
@@ -213,7 +213,7 @@ class DefaultFormatBundle:
continue
results[key] = DC(to_tensor(results[key]))
if 'gt_masks' in results:
- results['gt_masks'] = DC(results['gt_masks'], cpu_only=True)
+ results['gt_masks'] = DC(to_tensor(results['gt_masks']), cpu_only=Tru... | 1 | # Copyright (c) OpenMMLab. All rights reserved.
from collections.abc import Sequence
import mmcv
import numpy as np
import torch
from mmcv.parallel import DataContainer as DC
from ..builder import PIPELINES
def to_tensor(data):
"""Convert objects of various python types to :obj:`torch.Tensor`.
Supported ty... | 1 | 26,552 | Please do not submit a commit that is not part of this PR. | open-mmlab-mmdetection | py |
@@ -410,11 +410,11 @@ func (d *HandlerImpl) UpdateDomain(
if updateRequest.UpdatedInfo != nil {
updatedInfo := updateRequest.UpdatedInfo
- if updatedInfo.Description != nil {
+ if updatedInfo.GetDescription() != "" {
configurationChanged = true
info.Description = updatedInfo.GetDescription()
}
- if... | 1 | // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 9,096 | This is small braking change: there is no way to clear description any more. If value is empty string, description will not be updated at all. It will affect existing Thrift endpoints also. | temporalio-temporal | go |
@@ -16,5 +16,8 @@ func DNS01Record(domain, value string) (string, string, int) {
if err == nil && r.Rcode == dns.RcodeSuccess {
fqdn = updateDomainWithCName(r, fqdn)
}
- return fqdn, value, 60
+ if err != nil {
+ return "", "", 0, err
+ }
+ return fqdn, value, 60, nil
} | 1 | package util
import (
"fmt"
"github.com/miekg/dns"
)
// DNS01Record returns a DNS record which will fulfill the `dns-01` challenge
// TODO: move this into a non-generic place by resolving import cycle in dns package
func DNS01Record(domain, value string) (string, string, int) {
fqdn := fmt.Sprintf("_acme-challeng... | 1 | 13,219 | Can you open a separate PR with this patch? It seems valuable outside the context of this PR! | jetstack-cert-manager | go |
@@ -52,6 +52,9 @@ func (s *server) setupRouting() {
router.Handle("/peers/{address}", jsonhttp.MethodHandler{
"DELETE": http.HandlerFunc(s.peerDisconnectHandler),
})
+ router.Handle("/chunk/{address}", jsonhttp.MethodHandler{
+ "GET": http.HandlerFunc(s.hasChunkHandler),
+ })
baseRouter.Handle("/", web.Chai... | 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 debugapi
import (
"expvar"
"net/http"
"net/http/pprof"
"github.com/ethersphere/bee/pkg/jsonhttp"
"github.com/ethersphere/bee/pkg/logging"
"gi... | 1 | 9,476 | I would suggest to have plurals in the api `"/chunks/{address}"` | ethersphere-bee | go |
@@ -1365,6 +1365,7 @@ namespace pwiz.Skyline.Model
ALL_LABEL_SUBSTITUTIONS = ImmutableList.ValueOf(new[]
{
Tuple.Create(LabelAtoms.C13, BioMassCalc.C, BioMassCalc.C13),
+ Tuple.Create(LabelAtoms.C14, BioMassCalc.C, BioMassCalc.C14),
Tuple.Create(LabelAtoms.N15,... | 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 | 12,517 | Let's just not do this. We don't have LabelAtoms.O17 here. This is just a short-cut to avoid needing to write out a more verbose function like: 5O" - 5O i.e. Add 5 x 17O atoms to replace 5 x 16O atoms. This was the original implementation in Skyline before I added the checkboxes to denote simply labeling all atoms in t... | ProteoWizard-pwiz | .cs |
@@ -56,7 +56,7 @@ def bootstrap_accept_mini(field, **kwargs):
name="submitButton",
type="submit",
value=field.label.text,
- onclick="mini_approval('Accept', event, %s);" % (objectid,),)
+ onclic... | 1 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013, 2013, 2014 CERN.
##
## Invenio 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 (at yo... | 1 | 10,996 | 1:D100: Docstring missing 23:D400: First line should end with '.', not 'p' 23:D200: One-line docstring should not occupy 3 lines 36:D400: First line should end with '.', not 'n' 36:D200: One-line docstring should not occupy 3 lines 48:D400: First line should end with '.', not 'p' 48:D200: One-line docstring should not ... | inveniosoftware-invenio | py |
@@ -73,6 +73,10 @@ class CarouselLoop extends Image
{
/** @var \Carousel\Model\Carousel $carousel */
foreach ($loopResult->getResultDataCollection() as $carousel) {
+ if (!file_exists($carousel->getUploadDir() . DS . $carousel->getFile())) {
+ continue;
+ }
+
... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 12,165 | Adding a warning or an error in the Thelia log would be a nice idea. | thelia-thelia | php |
@@ -26,6 +26,8 @@ var CONNECTED = 'connected';
var DESTROYING = 'destroying';
var DESTROYED = 'destroyed';
+const CONNECTION_EVENTS = ['error', 'close', 'timeout', 'parseError', 'connect', 'message'];
+
var _id = 0;
/** | 1 | 'use strict';
const inherits = require('util').inherits;
const EventEmitter = require('events').EventEmitter;
const MongoError = require('../error').MongoError;
const MongoNetworkError = require('../error').MongoNetworkError;
const MongoWriteConcernError = require('../error').MongoWriteConcernError;
const Logger = req... | 1 | 15,903 | nit: `Set` (and swap `forEach`s for `for (const i of CONNECTION_EVENTS)`) | mongodb-node-mongodb-native | js |
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
-using System.Runtime.InteropServices;
+using Datadog.Trace.ClrProfiler.ExtensionMethods;
using Datadog.Trace.ClrProfiler.Helpers;
using Datadog.Trace.Configuration;
using Datadog.Trace.Logg... | 1 | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using Datadog.Trace.ClrProfiler.Helpers;
using Datadog.Trace.Configuration;
using Datadog.Trace.Logging;
using Sigil;
name... | 1 | 15,609 | nit: Is this `using` statement still needed? | DataDog-dd-trace-dotnet | .cs |
@@ -26,7 +26,7 @@ func (endpoint *identitiesApi) List(writer http.ResponseWriter, request *http.Re
idsSerializable := make([]identityDto, len(idArry))
for i, id := range idArry {
idsSerializable[i] = identityDto{
- Id: string(id),
+ Id: string(id.Id),
}
}
| 1 | package endpoints
import (
"net/http"
"github.com/julienschmidt/httprouter"
"github.com/mysterium/node/identity"
"github.com/mysterium/node/tequilapi/utils"
)
type identityDto struct {
Id string `json:"id"`
}
type identitiesApi struct {
idm identity.IdentityManagerInterface
}
func NewIdentitiesEndpoint(idm i... | 1 | 9,752 | Dont need to cast `string` -> `string` | mysteriumnetwork-node | go |
@@ -35,6 +35,11 @@ func (s *server) peerConnectHandler(w http.ResponseWriter, r *http.Request) {
return
}
+ s.Addressbook.Put(address, addr)
+ if err := s.TopologyDriver.AddPeer(r.Context(), address); err != nil {
+ s.Logger.Debugf("debug api: topologyDriver.AddPeer %s: %v", addr, err)
+ }
+
jsonhttp.OK(w, pe... | 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 debugapi
import (
"errors"
"net/http"
"github.com/ethersphere/bee/pkg/jsonhttp"
"github.com/ethersphere/bee/pkg/p2p"
"github.com/ethersphere/b... | 1 | 9,004 | why doesn't the API return an error in this case? | ethersphere-bee | go |
@@ -583,3 +583,18 @@ class InvalidInstanceMetadataError(Exception):
def __init__(self, msg):
final_msg = msg + '\n' + self.MSG
super(InvalidInstanceMetadataError, self).__init__(final_msg)
+
+
+class BaseEndpointResolverError(Exception):
+ """Base error for endpoint resolving errors.
+
+ Sh... | 1 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without res... | 1 | 11,840 | Not sure how particularly useful these exceptions are. Seem to be exceptions required in copying and pasting the EndpointResolver over. I wonder if it makes sense to move these out of ``exceptions.py`` | boto-boto | py |
@@ -203,9 +203,6 @@ class Proposal < ActiveRecord::Base
end
end
-
- ## delegated methods ##
-
def public_identifier
self.delegate_with_default(:public_identifier) { "##{self.id}" }
end | 1 | class Proposal < ActiveRecord::Base
include WorkflowModel
include ValueHelper
has_paper_trail class_name: 'C2Version'
CLIENT_MODELS = [] # this gets populated later
FLOWS = %w(parallel linear).freeze
workflow do
state :pending do
event :approve, :transitions_to => :approved
event :restart... | 1 | 14,669 | Can we re-add this? I think that grouping is useful (though would be open to putting them in a mixin or something). | 18F-C2 | rb |
@@ -319,7 +319,7 @@ public class PartitionSpec implements Serializable {
private final Schema schema;
private final List<PartitionField> fields = Lists.newArrayList();
private final Set<String> partitionNames = Sets.newHashSet();
- private Map<Integer, PartitionField> timeFields = Maps.newHashMap();
+... | 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 | 31,474 | Overall LGTM, one nit is that I think `partitionFields` here would be good to be renamed so that it's easy to tell it's just for collision detection. Also I wonder if we want to do this check for other transformations too (e.g. bucket, and record numBuckets in the string), so that we might be able to combine `fields` a... | apache-iceberg | java |
@@ -34,6 +34,8 @@ class Config(object):
datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
self.identifier = None
self.force_no_cloudshell = bool(kwargs.get('no_cloudshell'))
+ self.service_account_key_path = kwargs.get(
+ 'service_account_key_path') or ... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 1 | 31,028 | Don't need the `or None` here as the flag will already default to None. Also, `some_dict.get('foo')` will also default to `None`. | forseti-security-forseti-security | py |
@@ -68,6 +68,7 @@ storiesOf( 'Settings', module )
options: {
delay: 3000, // Wait for tabs to animate.
},
+ padding: 0,
} )
.add( 'Connected Services', () => {
const setupRegistry = ( registry ) => { | 1 | /**
* Settings 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
*
* Un... | 1 | 38,260 | Please, use the default padding here. | google-site-kit-wp | js |
@@ -3,11 +3,12 @@
const Aspect = require('./operation').Aspect;
const OperationBase = require('./operation').OperationBase;
const resolveReadPreference = require('../utils').resolveReadPreference;
+const serverLacksFeature = require('../utils').serverLacksFeature;
const ReadConcern = require('../read_concern');
co... | 1 | 'use strict';
const Aspect = require('./operation').Aspect;
const OperationBase = require('./operation').OperationBase;
const resolveReadPreference = require('../utils').resolveReadPreference;
const ReadConcern = require('../read_concern');
const WriteConcern = require('../write_concern');
const maxWireVersion = requi... | 1 | 17,400 | let's actually use the direct include: `require('../core/error').MongoError;` | mongodb-node-mongodb-native | js |
@@ -227,6 +227,16 @@ def data(readonly=False):
"How to open links in an existing instance if a new one is "
"launched."),
+ ('new-instance-open-target.window',
+ SettingValue(typ.String(
+ valid_values=typ.ValidValues(
+ ('last-ope... | 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 | 15,863 | You're missing a space before the `"` here and below, but I'll fix it up when merging. | qutebrowser-qutebrowser | py |
@@ -119,6 +119,11 @@ void testBookmarks(ROMol m) {
m.clearBondBookmark(777);
}
+void dump(STR_VECT &p) {
+ std::cerr << "----------------------------------" << std::endl;
+ for(size_t i=0;i<p.size();++i)
+ std::cerr << p[i] << std::endl;
+}
void testMolProps() {
BOOST_LOG(rdInfoLog)
<< "----------... | 1 | // $Id$
//
// Copyright (C) 2001-2008 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <G... | 1 | 14,761 | remove this debugging code? | rdkit-rdkit | cpp |
@@ -22,14 +22,14 @@ class ParallelPostingsArray {
final static int BYTES_PER_POSTING = 3 * Integer.BYTES;
final int size;
- final int[] textStarts;
- final int[] intStarts;
- final int[] byteStarts;
+ final int[] textStarts; // maps term ID to the terms text start in the bytesHash
+ final int[] addressOffs... | 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,787 | s/`terms text`/`terms's text` | apache-lucene-solr | java |
@@ -23,6 +23,7 @@ module.exports = class Form extends Plugin {
resultName: 'uppyResult',
getMetaFromForm: true,
addResultToForm: true,
+ replaceResultInFormWithNew: true,
submitOnSuccess: false,
triggerUploadOnSubmit: false
} | 1 | const { Plugin } = require('@uppy/core')
const findDOMElement = require('@uppy/utils/lib/findDOMElement')
const toArray = require('@uppy/utils/lib/toArray')
// Rollup uses get-form-data's ES modules build, and rollup-plugin-commonjs automatically resolves `.default`.
// So, if we are being built using rollup, this requ... | 1 | 12,202 | :bike: :derelict_house: , but maybe the default option should be `multipleResults: false` or `combineMultipleResults: false`? i feel like `replaceResultInFormWithNew` is very verbose but also doesn't immediately clarify what it's for. | transloadit-uppy | js |
@@ -1,15 +1,16 @@
require "rails_helper"
-feature 'Visitor signs up for a subscription' do
+feature "Visitor signs up for a subscription" do
background do
create_plan
end
- scenario 'visitor signs up by navigating from landing page' do
+ scenario "visitor signs up by navigating from landing page", js:... | 1 | require "rails_helper"
feature 'Visitor signs up for a subscription' do
background do
create_plan
end
scenario 'visitor signs up by navigating from landing page' do
create(:trail, :published)
visit root_path
click_link "Sign Up Now!"
fill_out_account_creation_form
fill_out_credit_card_f... | 1 | 17,109 | Line is too long. [87/80] | thoughtbot-upcase | rb |
@@ -2,10 +2,8 @@
# Copyright (C) 2006 Greg Landrum
# This file is part of RDKit and covered by $RDBASE/license.txt
#
-
-
-import argparse
import sys
+import argparse
from rdkit import Chem
from rdkit import Geometry | 1 | #
# Copyright (C) 2006 Greg Landrum
# This file is part of RDKit and covered by $RDBASE/license.txt
#
import argparse
import sys
from rdkit import Chem
from rdkit import Geometry
from rdkit.Chem import rdDepictor
def AlignDepict(mol, core, corePattern=None, acceptFailure=False):
"""
Arguments:
- mol: ... | 1 | 23,954 | Are you using an automated tool for sorting the imports? | rdkit-rdkit | cpp |
@@ -41,11 +41,11 @@ class ApiClient(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
- def fetch_bigquery_dataset_policy(self, project_id, dataset_id):
+ def fetch_bigquery_dataset_policy(self, project_number, dataset_id):
"""Dataset policy Iterator for a dataset from gcp API call.
... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 32,414 | If this is `project_number` now, can we also update the `id` the description? | forseti-security-forseti-security | py |
@@ -132,6 +132,7 @@ func (s *receiveStream) readImpl(p []byte) (bool /*stream completed */, int, err
}
if deadlineTimer == nil {
deadlineTimer = utils.NewTimer()
+ defer deadlineTimer.Stop()
}
deadlineTimer.Reset(deadline)
} | 1 | package quic
import (
"fmt"
"io"
"sync"
"time"
"github.com/lucas-clemente/quic-go/internal/flowcontrol"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/utils"
"github.com/lucas-clemente/quic-go/internal/wire"
)
type receiveStreamI interface {
ReceiveStream
... | 1 | 9,010 | * This will defer until the function returns. Are you sure this won't happen multiple times. * Alternatively, why is the deadline timer not defined outside the outer loop? * More generally, why are we looping in the first place instead of reading one frame and returning? | lucas-clemente-quic-go | go |
@@ -36,10 +36,10 @@ namespace Datadog.Trace.Agent.Transports
_request.Headers.Add(name, value);
}
- public async Task<IApiResponse> PostAsync(ArraySegment<byte> traces)
+ public async Task<IApiResponse> PostAsync(ArraySegment<byte> traces, string contentType)
{
... | 1 | // <copyright file="ApiWebRequest.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 Syst... | 1 | 23,236 | Should we rename the traces parameter now that this isn't just traces? | DataDog-dd-trace-dotnet | .cs |
@@ -28,14 +28,14 @@ static void atomic_begin(struct wlr_drm_crtc *crtc, struct atomic *atom) {
atom->failed = false;
}
-static bool atomic_end(int drm_fd, struct atomic *atom) {
+static bool atomic_end(int drm_fd, uint32_t flags, struct atomic *atom) {
if (atom->failed) {
return false;
}
- uint32_t flags ... | 1 | #include <gbm.h>
#include <stdlib.h>
#include <wlr/util/log.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include "backend/drm/drm.h"
#include "backend/drm/iface.h"
#include "backend/drm/util.h"
struct atomic {
drmModeAtomicReq *req;
int cursor;
bool failed;
};
static void atomic_begin(struct wlr_drm_crtc *crt... | 1 | 14,826 | I don't think it makes sense to have both `TEST_ONLY` and `NONBLOCK`. We should probably leave `NONBLOCK` out. | swaywm-wlroots | c |
@@ -109,7 +109,10 @@ static void touch_point_handle_surface_destroy(struct wl_listener *listener,
void *data) {
struct wlr_touch_point *point =
wl_container_of(listener, point, surface_destroy);
- touch_point_destroy(point);
+ // Touch point itself is destroyed on up event
+ point->surface = NULL;
+ wl_list_rem... | 1 | #define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
#include "types/wlr_seat.h"
#include "util/signal.h"
static uint32_t default_touch_down(struct wlr_seat_touch_grab ... | 1 | 14,007 | Need to remove the surface destroy listener (and `wl_list_init` it so that `touch_point_destroy` still works) | swaywm-wlroots | c |
@@ -31,7 +31,8 @@ class ResearchProjectsController < ApplicationController
def fetch_projects
Rails.cache.fetch(["research_projects", funder_type], expires_in: expiry) do
- Thread.new { ExternalApis::OpenAireService.search(funder: funder_type) }.value
+ #Thread.new { ExternalApis::OpenAireService.se... | 1 | # frozen_string_literal: true
class ResearchProjectsController < ApplicationController
def index
render json: research_projects
end
def search
@results = research_projects.select { |r| r.description.match(params[:description]) }
render json: @results
end
private
def research_projects
re... | 1 | 19,048 | create ticket to investigate this | DMPRoadmap-roadmap | rb |
@@ -90,7 +90,7 @@ typedef struct
struct sockaddr_storage addr;
} ipaddress_t;
-static socklen_t address_length(ipaddress_t* ipaddr)
+PONY_API socklen_t address_length(ipaddress_t* ipaddr)
{
switch(ipaddr->addr.ss_family)
{ | 1 | #ifdef __linux__
#define _GNU_SOURCE
#endif
#include <platform.h>
#include "../asio/asio.h"
#include "../asio/event.h"
#include "ponyassert.h"
#include <stdbool.h>
#include <string.h>
#ifdef PLATFORM_IS_WINDOWS
// Disable warnings about deprecated non-unicode WSA functions.
#pragma warning(disable:4996)
#include "..... | 1 | 12,538 | If we want to expose this for FFI use in the standard library, it needs to get either a `pony_` or `ponyint_` prefix to its name, for cleanliness of the function namespace. `pony_` means it is a public API meant for use by third party code, whereas `ponyint_` means it is internal. Unless there is a good reason to make ... | ponylang-ponyc | c |
@@ -17,6 +17,8 @@ const (
OptionsWaitBeforeDelete = "WAIT_BEFORE_DELETE"
// OptionsRedirectDetach Redirect detach to the node where volume is attached
OptionsRedirectDetach = "REDIRECT_DETACH"
+ // OptionsDeviceFuseMount name of fuse mount device
+ OptionsDeviceFuseMount = "DEV_FUSE_MOUNT"
)
func IsBoolOption... | 1 | package options
import (
"strconv"
)
// Options specifies keys from a key-value pair
// that can be passed in to the APIS
const (
// OptionsSecret Key to use for secure devices
OptionsSecret = "SECRET_KEY"
// OptionsUnmountBeforeDetach Issue an Unmount before trying the detach
OptionsUnmountBeforeDetach = "UNMOU... | 1 | 6,383 | Fuse for shared volumes is a px specific implementation. libopenstorage doesn't know about it, right? So should this be called DeviceVirtualMount (or something similar) instead? | libopenstorage-openstorage | go |
@@ -24,6 +24,13 @@ namespace Datadog.Trace.ClrProfiler
public ushort TargetSignatureTypesLength;
+ [MarshalAs(UnmanagedType.U1)]
+ public bool UseTargetMethodArgumentsToLoad;
+
+ public IntPtr TargetMethodArgumentsToLoad;
+
+ public ushort TargetMethodArgumentsToLoadLength;
+
... | 1 | // <copyright file="NativeCallTargetDefinition.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 Syste... | 1 | 23,685 | `bool` vs `BOOL` in native side :) | DataDog-dd-trace-dotnet | .cs |
@@ -17,6 +17,7 @@ const chromiumRebaseL10n = require('../lib/chromiumRebaseL10n')
const createDist = require('../lib/createDist')
const upload = require('../lib/upload')
const test = require('../lib/test')
+const lint = require('../lib/lint')
program
.version(process.env.npm_package_version) | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const program = require('commander');
const path = require('path')
const fs = require('fs-extra')
const config = r... | 1 | 5,413 | I think maybe you moved it to util but this is still around and it should get it from util instead. | brave-brave-browser | js |
@@ -0,0 +1,16 @@
+class RepositoriesController < ApplicationController
+ def index
+ @catalog = Catalog.new
+ end
+
+ def show
+ repository = Repository.friendly.find(params[:id])
+ @offering = Offering.new(repository, current_user)
+
+ if @offering.user_has_license?
+ redirect_to repository.github_... | 1 | 1 | 11,642 | Do we need to test the redirection? | thoughtbot-upcase | rb | |
@@ -372,12 +372,12 @@ public class EpisodesApplyActionFragment extends Fragment {
}
private void markedCheckedPlayed() {
- DBWriter.markItemPlayed(getActivity(), FeedItem.PLAYED, checkedIds.toArray());
+ DBWriter.markItemPlayed(FeedItem.PLAYED, checkedIds.toArray());
close();
}
... | 1 | package de.danoeh.antennapod.dialog;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
impo... | 1 | 12,497 | Tsts, that's why... activity leak about to happen | AntennaPod-AntennaPod | java |
@@ -3160,6 +3160,9 @@ func (s *Server) startGWReplyMapExpiration() {
}
case cttl := <-s.gwrm.ch:
ttl = cttl
+ if !t.Stop() {
+ <-t.C
+ }
t.Reset(ttl)
case <-s.quitCh:
return | 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 | 14,134 | You should do a select here IMO just to be safe so we do not block forever. | nats-io-nats-server | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.