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 |
|---|---|---|---|---|---|---|---|
@@ -77,6 +77,8 @@ class Thelia extends Kernel
);
$serviceContainer = Propel::getServiceContainer();
$serviceContainer->setAdapterClass('thelia', 'mysql');
+ $serviceContainer->setDefaultDatasource('thelia');
+
$manager = new ConnectionManagerSingle();
$manager->setCon... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 10,126 | @lunika Please see this. It allows us to do `Propel::getConnection()` easily, as we have only one database. | thelia-thelia | php |
@@ -92,7 +92,9 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.AspNet
var controllerContext = (IHttpControllerContext)state.State;
// some fields aren't set till after execution, so populate anything missing
- AspNetWebApi2Integration.UpdateSpan(controllerContext, scope... | 1 | // <copyright file="ApiController_ExecuteAsync_Integration.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>
... | 1 | 24,082 | Not related to this particular cast but I wonder if we shouldn't have a cast helper that would log if null to gain visibility. | DataDog-dd-trace-dotnet | .cs |
@@ -2,7 +2,8 @@ const request = require('request')
// @ts-ignore
const purest = require('purest')({ request })
const logger = require('../logger')
-
+const DRIVE_FILE_FIELDS = 'kind,id,name,mimeType,ownedByMe,permissions(role,emailAddress),size,modifiedTime,iconLink,thumbnailLink'
+const DRIVE_FILES_FIELDS = `kind,n... | 1 | const request = require('request')
// @ts-ignore
const purest = require('purest')({ request })
const logger = require('../logger')
/**
* @class
* @implements {Provider}
*/
class Drive {
constructor (options) {
this.authProvider = options.provider = Drive.authProvider
options.alias = 'drive'
this.clie... | 1 | 11,040 | why do we need to explicitly declare these fields? | transloadit-uppy | js |
@@ -99,12 +99,8 @@ class OaiController extends AbstractBase
$this->getRequest()->getQuery()->toArray(),
$this->getRequest()->getPost()->toArray()
);
- $server = new $serverClass(
- $this->serviceLocator->get('VuFind\Search\Results\PluginManager'),... | 1 | <?php
/**
* OAI Module Controller
*
* PHP version 7
*
* Copyright (C) Villanova University 2011.
*
* 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 program is distr... | 1 | 26,937 | Note that there are multiple OAI servers -- that's why `$serverClass` is a variable here. You'll want to fetch `$serverClass` from the service manager rather than a hard-coded value, and also set up a module.config.php for the authority record version, `VuFind\OAI\Server\Auth`. Should be easy enough since it can share ... | vufind-org-vufind | php |
@@ -265,6 +265,12 @@ describe Beaker do
context "validate_host" do
subject { dummy_class.new }
+ before(:each) do
+ # Must reset additional_pkgs between each test as it hangs around
+ #Beaker::HostPrebuiltSteps.class_variable_set(:@@additional_pkgs, [])
+ Beaker::HostPrebuiltSteps.module_eva... | 1 | require 'spec_helper'
describe Beaker do
let( :options ) { make_opts.merge({ 'logger' => double().as_null_object }) }
let( :ntpserver ) { Beaker::HostPrebuiltSteps::NTPSERVER }
let( :apt_cfg ) { Beaker::HostPrebuiltSteps::APT_CFG }
let( :ips_pkg_repo ) { Beaker::HostPrebuiltSteps::IPS_PKG_... | 1 | 7,213 | This is no longer needed and should be removed. | voxpupuli-beaker | rb |
@@ -57,8 +57,12 @@ func ParseFlags(ctx *cli.Context) service.Options {
}
// ParseJSONOptions function fills in Openvpn options from JSON request
-func ParseJSONOptions(request json.RawMessage) (service.Options, error) {
+func ParseJSONOptions(request *json.RawMessage) (service.Options, error) {
+ if request == nil ... | 1 | /*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
... | 1 | 13,727 | could use named return params here to avoid declaring the opts, and using naked returns instead. | mysteriumnetwork-node | go |
@@ -84,6 +84,11 @@ module.exports = class Instagram extends Plugin {
}
getItemIcon (item) {
+ if (!item.images) {
+ return <svg viewBox="0 0 58 58" opacity="0.6">
+ <path d="M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-... | 1 | const Plugin = require('../../core/Plugin')
const { Provider } = require('../../server')
const { ProviderView } = require('../../views')
const { h } = require('preact')
module.exports = class Instagram extends Plugin {
constructor (uppy, opts) {
super(uppy, opts)
this.type = 'acquirer'
this.id = this.opt... | 1 | 10,773 | this is an unrelated fix. I noticed when an instagram carousel post is mixed with images and videos, the videos don't come with thumbnails, so I am adding a fallback thumbnail for this case. | transloadit-uppy | js |
@@ -58,12 +58,14 @@ type syncChainSelector interface {
// IsHeaver returns true if tipset a is heavier than tipset b and false if
// tipset b is heavier than tipset a.
IsHeavier(ctx context.Context, a, b types.TipSet, aStateID, bStateID cid.Cid) (bool, error)
+ // NewWeight returns the weight of a tipset
+ NewWei... | 1 | package chain
import (
"context"
"sync"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
"github.com/pkg/errors"
"go.opencensus.io/trace"
"github.com/filecoin-project/go-filecoin/clock"
"github.com/filecoin-project/go-filecoin/consensus"
"github.com/filecoin-project/go-filecoin/metrics"
"github.co... | 1 | 21,766 | "... after protocol version 1"? | filecoin-project-venus | go |
@@ -32,7 +32,7 @@ from scapy.compat import (
_mib_re_integer = re.compile(r"^[0-9]+$")
_mib_re_both = re.compile(r"^([a-zA-Z_][a-zA-Z0-9_-]*)\(([0-9]+)\)$")
_mib_re_oiddecl = re.compile(
- r"$\s*([a-zA-Z0-9_-]+)\s+OBJECT([^:\{\}]|\{[^:]+\})+::=\s*\{([^\}]+)\}", re.M)
+ r"$\s*([a-zA-Z0-9_-]+)\s+OBJECT[^:\{\}]+:... | 1 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# Modified by Maxence Tury <maxence.tury@ssi.gouv.fr>
# This program is published under a GPLv2 license
"""
Management Information Base (MIB) parsing
"""
from __future__ impor... | 1 | 20,208 | Is there a unit test that covers this regexp? I am afraid that changing it might break things =/ | secdev-scapy | py |
@@ -57,7 +57,7 @@ public class RubyNameFormatter implements NameFormatter {
@Override
public String varReference(Name name) {
- return "@" + name.toLowerUnderscore();
+ return name.toLowerUnderscore();
}
@Override | 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 | 23,956 | This change is okay IMO because an `@` variable in Ruby is not a reference -- `@` variables are instance variables. Also, it's never used by the Ruby transformers. | googleapis-gapic-generator | java |
@@ -27,9 +27,9 @@ class PaymentImageUploadCest
$me->amOnPage('/admin/payment/edit/1');
$entityEditPage->uploadTestImage(self::IMAGE_UPLOAD_FIELD_ID, self::TEST_IMAGE_NAME);
$me->clickByName(self::SAVE_BUTTON_NAME);
- $me->seeTranslationAdmin('Payment <strong><a href="{{ url }}">%name%<... | 1 | <?php
declare(strict_types=1);
namespace Tests\ShopBundle\Acceptance\acceptance;
use Tests\ShopBundle\Acceptance\acceptance\PageObject\Admin\EntityEditPage;
use Tests\ShopBundle\Acceptance\acceptance\PageObject\Admin\LoginPage;
use Tests\ShopBundle\Test\Codeception\AcceptanceTester;
class PaymentImageUploadCest
{
... | 1 | 18,335 | Why this change was needed? Because in `po` files it's with curly braces? | shopsys-shopsys | php |
@@ -370,14 +370,14 @@ patch_branch(dr_isa_mode_t isa_mode, cache_pc branch_pc, cache_pc target_pc,
ASSERT(ALIGNED(branch_pc, 4) && ALIGNED(target_pc, 4));
if ((enc & 0xfc000000) == 0x14000000) { /* B */
ASSERT(off + 0x8000000 < 0x10000000);
- *pc_writable = (0x14000000 | (0x03ffffff & off >> 2... | 1 | /* **********************************************************
* Copyright (c) 2014-2021 Google, Inc. All rights reserved.
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* ... | 1 | 24,495 | Wait -- where did this change come from? This seems unrelated to trace building and seems like it could affect basic execution, unlike the rest of this PR which is all under the off-by-default trace option. Please separate this into its own PR and probably ask @AssadHashmi to review. | DynamoRIO-dynamorio | c |
@@ -0,0 +1,3 @@
+module.exports = {
+ presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
+}; | 1 | 1 | 18,016 | seems to be redundant (mention `docusaurus` ) | handsontable-handsontable | js | |
@@ -206,6 +206,12 @@ public interface Table {
*/
Rollback rollback();
+ /**
+ *
+ * @return
+ */
+ CherryPick cherrypick();
+
/**
* Create a new {@link Transaction transaction API} to commit multiple table operations at once.
* | 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 | 17,106 | Can we combine this with the Rollback API? We could still support the `rollback` method here, but combine `Rollback` and `CherryPick` into something like `ManageSnapshots`. Then we could reuse logic for enforcing checks of the current snapshot. What do you think? | apache-iceberg | java |
@@ -52,7 +52,7 @@ static struct internal_amazon_batch_amazon_ids{
char* aws_secret_access_key;
char* aws_region;
char* aws_email;
- char* master_env_prefix;
+ char* manager_env_prefix;
}initialized_data;
static unsigned int gen_guid(){ | 1 | /*
* Copyright (C) 2018- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "batch_job_internal.h"
#include "process.h"
#include "batch_job.h"
#include "stringtools.h"
#include "debug.h"
#include "jx_parse.h"
#include "jx.h"
#i... | 1 | 15,071 | Maybe just `env_prefix`, I don't think this is referring to the WQ manager. | cooperative-computing-lab-cctools | c |
@@ -11,7 +11,6 @@ import android.widget.FrameLayout;
import com.bytehamster.lib.preferencesearch.SearchPreferenceResult;
import com.bytehamster.lib.preferencesearch.SearchPreferenceResultListener;
-
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.ante... | 1 | package de.danoeh.antennapod.activity;
import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.preference.PreferenceFragmentCompat;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.Fr... | 1 | 18,375 | Unrelated line change :) | AntennaPod-AntennaPod | java |
@@ -2,9 +2,13 @@ package net
import (
"strings"
+ "syscall"
+ "time"
"github.com/coreos/go-iptables/iptables"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
+ utilwait "k8s.io/apimachinery/pkg/util/wait"
)
// AddChainWithRules creates a chain and appends given rules to it. | 1 | package net
import (
"strings"
"github.com/coreos/go-iptables/iptables"
"github.com/pkg/errors"
)
// AddChainWithRules creates a chain and appends given rules to it.
//
// If the chain exists, but its rules are not the same as the given ones, the
// function will flush the chain and then will append the rules.
fu... | 1 | 16,029 | I raised an eyebrow at making `net` depend on `k8s.io`, but it seems we're already doing that. | weaveworks-weave | go |
@@ -228,6 +228,9 @@
* @returns {string} encode string
*/
countlyCommon.encodeSomeHtml = function(html, options) {
+ if (countlyGlobal.company) {
+ html.replace("Countly", countlyGlobal.company);
+ }
if (options) {
return filte... | 1 | /*global store, countlyGlobal, _, Gauge, d3, moment, countlyTotalUsers, jQuery, filterXSS*/
/**
* Object with common functions to be used for multiple purposes
* @name countlyCommon
* @global
* @namespace countlyCommon
*/
(function(window, $, undefined) {
var CommonConstructor = function() {
// Privat... | 1 | 13,301 | I think ticket meant, not applying replacement in this method, but rather applying encodeSomeHtml to each and every localization string | Countly-countly-server | js |
@@ -207,7 +207,9 @@ function isNodeShuttingDownError(err) {
* @param {Server} server
*/
function isSDAMUnrecoverableError(error, server) {
- if (error instanceof MongoParseError) {
+ // NOTE: null check is here for a strictly pre-CMAP world, a timeout or
+ // close event are considered unrecoverable
+ if... | 1 | 'use strict';
const mongoErrorContextSymbol = Symbol('mongoErrorContextSymbol');
const maxWireVersion = require('./utils').maxWireVersion;
/**
* Creates a new MongoError
*
* @augments Error
* @param {Error|string|object} message The error message
* @property {string} message The error message
* @property {strin... | 1 | 16,891 | ticket for the 4.0 epic? | mongodb-node-mongodb-native | js |
@@ -87,6 +87,10 @@ def main():
if cfg.get('cudnn_benchmark', False):
torch.backends.cudnn.benchmark = True
cfg.model.pretrained = None
+ if cfg.model.get('neck', False):
+ if cfg.model.neck.get('rfp_backbone', False):
+ if cfg.model.neck.rfp_backbone.get('pretrained', False):
+ ... | 1 | import argparse
import os
import mmcv
import torch
from mmcv import Config, DictAction
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import get_dist_info, init_dist, load_checkpoint
from tools.fuse_conv_bn import fuse_module
from mmdet.apis import multi_gpu_test, single_gpu_test... | 1 | 20,174 | `cfg.model.get('neck')` will return None if neck does not exist, thus we can omit the default value. | open-mmlab-mmdetection | py |
@@ -5,7 +5,7 @@ module Blacklight
module Facet
def facet_paginator field_config, display_facet
- Blacklight::Solr::FacetPaginator.new(display_facet.items,
+ blacklight_config.facet_paginator_class.new(display_facet.items,
sort: display_facet.sort,
offset: display_facet.offset, ... | 1 | # These are methods that are used at both the view helper and controller layers
# They are only dependent on `blacklight_config` and `@response`
#
module Blacklight
module Facet
def facet_paginator field_config, display_facet
Blacklight::Solr::FacetPaginator.new(display_facet.items,
sort: display_... | 1 | 5,980 | Trailing whitespace detected. | projectblacklight-blacklight | rb |
@@ -38,6 +38,7 @@ type TargetSpec struct {
AutoStackSize *bool `json:"automatic-stack-size"` // Determine stack size automatically at compile time.
DefaultStackSize uint64 `json:"default-stack-size"` // Default stack size if the size couldn't be determined at compile time.
CFlags []string `jso... | 1 | package compileopts
// This file loads a target specification from a JSON file.
import (
"encoding/json"
"errors"
"io"
"os"
"os/exec"
"path/filepath"
"reflect"
"runtime"
"strings"
"github.com/tinygo-org/tinygo/goenv"
)
// Target specification for a given target. Used for bare metal targets.
//
// The targ... | 1 | 13,291 | I don't see why a `cxxflags` key is necessary? C flags are important in the target file because they define things like the float ABI. But these flags are also used for C++. I can't think of a reason why you would want to configure C++ flags in a target file. | tinygo-org-tinygo | go |
@@ -352,12 +352,13 @@ instrument_annotation(dcontext_t *dcontext, IN OUT app_pc *start_pc,
# endif
instr_init(dcontext, &scratch);
- TRY_EXCEPT(my_dcontext, { identify_annotation(dcontext, &layout, &scratch); },
- { /* EXCEPT */
- LOG(THREAD, LOG_ANNOTATIONS, 2,
- ... | 1 | /* ******************************************************
* Copyright (c) 2014-2021 Google, Inc. All rights reserved.
* ******************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditio... | 1 | 25,873 | Update year range in Copyright notice, and elsewhere too. | DynamoRIO-dynamorio | c |
@@ -179,10 +179,10 @@ type ACMEIssuerDNS01ProviderCloudflare struct {
// ACMEIssuerDNS01ProviderRoute53 is a structure containing the Route 53
// configuration for AWS
type ACMEIssuerDNS01ProviderRoute53 struct {
- AccessKeyID string `json:"accessKeyID"`
- SecretAccessKey SecretKeySelector `json:"secr... | 1 | /*
Copyright 2017 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 | 11,053 | Can we update this PR to not be a breaking change? i.e. if a user specifies `accessKeyID`, it is still used. But if a user specifies `accessKeyIDSecretRef`, it takes precedence? | jetstack-cert-manager | go |
@@ -36,7 +36,7 @@ class UsersController < ApplicationController
def save
@title = t "users.new.title"
- if params[:decline]
+ if params[:decline] || !params[:read_tou] || params[:read_tou] == "0"
if current_user
current_user.terms_seen = true
| 1 | class UsersController < ApplicationController
layout "site"
skip_before_action :verify_authenticity_token, :only => [:auth_success]
before_action :disable_terms_redirect, :only => [:terms, :save, :logout]
before_action :authorize_web
before_action :set_locale
before_action :check_database_readable
autho... | 1 | 11,607 | You don't actually need both tests here as "truthiness" means that `"0"` is false and hence the first test will be true... | openstreetmap-openstreetmap-website | rb |
@@ -39,7 +39,15 @@ feature 'User downgrades subscription', js: true do
click_button I18n.t('subscriptions.confirm_cancel')
- expect(page).to have_content "Scheduled for cancellation on February 19, 2013"
expect(page).to have_content I18n.t('subscriptions.flashes.cancel.success')
+
+ click_link I18n.... | 1 | require 'spec_helper'
feature 'User downgrades subscription', js: true do
scenario 'successfully downgrades and then cancels' do
create(:plan, sku: 'prime', name: 'Prime')
basic_plan = create(:basic_plan)
workshop = create(:workshop)
sign_in_as_user_with_subscription
@current_user.should have_ac... | 1 | 9,295 | Everything else in here is using `I18n`. Should we do that here to be consistent? | thoughtbot-upcase | rb |
@@ -242,8 +242,8 @@ type Config struct {
PrometheusGoMetricsEnabled bool `config:"bool;true"`
PrometheusProcessMetricsEnabled bool `config:"bool;true"`
- FailsafeInboundHostPorts []ProtoPort `config:"port-list;tcp:22,udp:68,tcp:179,tcp:2379,tcp:2380,tcp:5473,tcp:6443,tcp:6666,tcp:6667;die-on-fail"`
- Fa... | 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,603 | What do you think about changing the ordering to be `<protocol>:<cidr>:<port>`? I think it matches the most with what we previously had so that it doesn't change too much for our users. | projectcalico-felix | go |
@@ -442,9 +442,9 @@ std::string MolToSmiles(const ROMol &mol, bool doIsomericSmiles, bool doKekule,
if (rootedAtAtom == -1) {
rootedAtAtom = std::rand() % mol.getNumAtoms();
// need to find an atom id between 0 and mol.getNumAtoms() exclusively
- PRECONDITION(rootedAtAtom < 0 || static_c... | 1 | //
// Copyright (C) 2002-2019 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 "SmilesWrit... | 1 | 20,242 | I'm fairly sure this precondition is always true due to the mod (%) | rdkit-rdkit | cpp |
@@ -404,7 +404,7 @@ final class ReaderPool implements Closeable {
private boolean noDups() {
Set<String> seen = new HashSet<>();
for(SegmentCommitInfo info : readerMap.keySet()) {
- assert !seen.contains(info.info.name);
+ assert !seen.contains(info.info.name) : "seen twice: " + info.info.name ;
... | 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 | 35,175 | I love seeing diffs like this one, adding a `String` message to an otherwise cryptic `assert`! It makes me realize you must have had a hellacious debugging session! | apache-lucene-solr | java |
@@ -731,6 +731,8 @@ func loadConfigFromFile(configFile string) (c Local, err error) {
}
// Migrate in case defaults were changed
+ // If a config file does not have version, it is assumed to be zero.
+ // All fields listed in migrate() might be changed if an actual value matches to default value from a previous v... | 1 | // Copyright (C) 2019 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any l... | 1 | 36,610 | 1. No logger exists to produce a message 2. Can't assume the latest version because missed version means 0. | algorand-go-algorand | go |
@@ -633,6 +633,14 @@ class Config
return $config;
}
+ /**
+ * Computes the hash to use for a cache folder from CLI flags and from the config file's xml contents
+ */
+ public function computeHash(): string
+ {
+ return sha1($this->hash . ':' . $this->level);
+ }
+
/**
... | 1 | <?php
namespace Psalm;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
use DOMDocument;
use LogicException;
use OutOfBoundsException;
use Psalm\Config\IssueHandler;
use Psalm\Config\ProjectFileFilter;
use Psalm\Config\TaintAnalysisFileFilter;
use Psalm\Exception\ConfigException;
use Psalm\Except... | 1 | 11,020 | I saw a wrong reuse of the cache between a partial analysis of a single file and a full run where errors due to lack of context on the first partial run was reported on the full run. Shouldn't we use a hash that is composer.lock + psalm.xml + command line to be safe? | vimeo-psalm | php |
@@ -3077,14 +3077,12 @@ defaultdict(<class 'list'>, {'col..., 'col...})]
2018-04-09 00:00:00 1
2018-04-12 01:00:00 4
"""
- from databricks.koalas.indexes import DatetimeIndex
-
axis = validate_axis(axis)
if axis != 0:
raise NotImplementedError("betwee... | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 18,119 | Could you also update it in `at_time`? | databricks-koalas | py |
@@ -143,8 +143,9 @@ class Reader implements DataSourceReader, SupportsScanColumnarBatch, SupportsPus
} catch (IOException ioe) {
LOG.warn("Failed to get Hadoop Filesystem", ioe);
}
+ Boolean localityFallback = LOCALITY_WHITELIST_FS.contains(scheme);
this.localityPreferred = options.ge... | 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 | 23,372 | Because schema is non-final we can't just switch this to a lambda | apache-iceberg | java |
@@ -136,7 +136,7 @@ namespace NLog.Conditions
}
catch (Exception exception)
{
- if (exception.MustBeRethrown())
+ if (exception.MustBeRethrown("While resolving function '{0}' follwing exception occured: {1}", functionName, exception))
... | 1 | //
// Copyright (c) 2004-2011 Jaroslaw Kowalski <jaak@jkowalski.net>
//
// 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 source code must retain the above co... | 1 | 11,658 | proposal: **always** add the exception to the end of the message. So no need to to pass exception twice (implicit and explicit). Need a lot of changes. | NLog-NLog | .cs |
@@ -41,9 +41,14 @@ public class InvocationStartProcessingEventListener implements EventListener {
public void process(Event data) {
InvocationStartProcessingEvent event = (InvocationStartProcessingEvent) data;
InvocationMonitor monitor = registryMonitor.getInvocationMonitor(event.getOperationName());
+ ... | 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 | 8,123 | why? event.getInvocationType is not you want? | apache-servicecomb-java-chassis | java |
@@ -29,6 +29,7 @@ import (
type Info struct {
ID string `json:"server_id"`
Version string `json:"version"`
+ GitHash string `json:"git_hash"`
GoVersion string `json:"go"`
Host string `json:"host"`
Port int `json:"port"` | 1 | // Copyright 2012-2016 Apcera Inc. All rights reserved.
package server
import (
"bufio"
"crypto/tls"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"sync"
"time"
// Allow dynamic profiling.
_ "net/http/pprof"
"github.com/nats-io/gnatsd/util"
)
// Info ... | 1 | 7,444 | nit: how about `GitSHA`? | nats-io-nats-server | go |
@@ -93,6 +93,7 @@ an example.
*/
#define MAX_REMOTE_JOBS_DEFAULT 100
+#define FAIL_DIR "makeflow.failed.%d"
static sig_atomic_t makeflow_abort_flag = 0;
static int makeflow_failed_flag = 0; | 1 | /*
Copyright (C) 2008- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "auth_all.h"
#include "auth_ticket.h"
#include "batch_job.h"
#include "cctools.h"
#include "copy_stream.h"
#include "create_dir.h"
#include "debug.h"
#inc... | 1 | 13,932 | If you move the other functions, this should also be moved to `makeflow_gc.h`. | cooperative-computing-lab-cctools | c |
@@ -55,8 +55,12 @@ def _send_listens_to_queue(listen_type, listens):
for listen in listens:
if listen_type == LISTEN_TYPE_PLAYING_NOW:
try:
- expire_time = listen["track_metadata"]["additional_info"].get("duration",
- current_app.config['PLAYI... | 1 | import listenbrainz.webserver.rabbitmq_connection as rabbitmq_connection
import listenbrainz.webserver.redis_connection as redis_connection
import pika
import pika.exceptions
import sys
import time
import ujson
import uuid
from flask import current_app
from listenbrainz.listen import Listen
from listenbrainz.webserver... | 1 | 15,150 | This whole block bugs me. Expire_time to me suggest that an absolute time of when something happens and duration is an interval of time. While the code looks correct, it feels awkward to read. | metabrainz-listenbrainz-server | py |
@@ -93,7 +93,9 @@ export function coerceToVNode(possibleVNode) {
// Clone vnode if it has already been used. ceviche/#57
if (possibleVNode._dom!=null) {
- return createVNode(possibleVNode.type, possibleVNode.props, possibleVNode.text, possibleVNode.key, null);
+ let vnode = createVNode(possibleVNode.type, possi... | 1 | import options from './options';
/**
* Create an virtual node (used for JSX)
* @param {import('./internal').VNode["type"]} type The node name or Component
* constructor for this virtual node
* @param {object | null | undefined} [props] The properties of the virtual node
* @param {Array<import('.').ComponentC... | 1 | 12,941 | Can we add `_dom` as an argument to createVNode here? I think it might be shorter (could totally be wrong!) | preactjs-preact | js |
@@ -1964,6 +1964,8 @@ mangle_return(dcontext_t *dcontext, instrlist_t *ilist, instr_t *instr,
instr_set_src(popf, 1, memop);
PRE(ilist, instr, popf);
}
+ /* Mangles single step exception after a popf. */
+ mangle_single_step(dcontext, ilist, popf);
#ifdef X64
... | 1 | /* ******************************************************************************
* Copyright (c) 2010-2016 Google, Inc. All rights reserved.
* Copyright (c) 2010 Massachusetts Institute of Technology All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* *****************************... | 1 | 10,996 | I think that the iret handling is not yet good. | DynamoRIO-dynamorio | c |
@@ -78,7 +78,7 @@ const DeviceSizeTabBar = ( {
{ icon }
</Tab>
);
- }
+ },
) }
</TabBar>
); | 1 | /**
* DeviceSizeTabBar component.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | 1 | 40,145 | Huh, that's kinda weird. I get it, but it's unexpected to me... | google-site-kit-wp | js |
@@ -172,15 +172,6 @@ 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
-func (t *Tag) DoneSplit(address swarm.Address) ... | 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,770 | why is this removed? it is important when you upload from stream of unknown size | ethersphere-bee | go |
@@ -3,7 +3,7 @@ class ApiToken < ActiveRecord::Base
before_create :generate_token
- belongs_to :approval
+ belongs_to :approval, class_name: 'Approvals::Individual'
has_one :proposal, through: :approval
has_one :user, through: :approval
| 1 | class ApiToken < ActiveRecord::Base
has_paper_trail
before_create :generate_token
belongs_to :approval
has_one :proposal, through: :approval
has_one :user, through: :approval
# TODO validates :access_token, presence: true
validates :approval_id, presence: true
scope :unexpired, -> { where('expires_a... | 1 | 13,628 | Out of curiosity, why is this needed? Does it enforce what class can be assigned? | 18F-C2 | rb |
@@ -174,6 +174,11 @@ func (a *Agent) initEndpoints() error {
return fmt.Errorf("Error creating GRPC listener: %s", err)
}
+ if addr.Network() == "unix" {
+ // Any process should be able to use this unix socket
+ os.Chmod(addr.String(), os.ModePerm)
+ }
+
go func() {
a.config.ErrorCh <- a.grpcServer.Serve(... | 1 | package agent
import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"io/ioutil"
"net"
"net/url"
"os"
"path"
"time"
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/uri"
"github.com/spiffe/spire/pkg/agent/auth"
"github.com/spiff... | 1 | 8,671 | non-blocking: Now that we have a handful of statements which deal with creating a listener, it may make sense to introduce a `createListener` method or something similar | spiffe-spire | go |
@@ -34,6 +34,8 @@ namespace Nethermind.Mev
}
public IBlockProcessor.IBlockTransactionsExecutor Create(ReadOnlyTxProcessingEnv readOnlyTxProcessingEnv) =>
- new MevBlockProductionTransactionsExecutor(readOnlyTxProcessingEnv, _specProvider, _logManager);
+ LastExecutor = new Mev... | 1 | // Copyright (c) 2021 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of... | 1 | 26,102 | factory should be stateless if possible, looks like much complexity added | NethermindEth-nethermind | .cs |
@@ -527,6 +527,12 @@ class BigQueryLoadTask(MixinBigQueryBulkComplete, luigi.Task):
""" Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false."""
return False
+ @property
+ def project_id(self):
+ """Project ID ... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Twitter 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 ... | 1 | 19,970 | Could you please add short description for the default value as well? | spotify-luigi | py |
@@ -744,7 +744,7 @@ func (bc *blockchain) commitBlock(blk *Block) error {
if bc.sf != nil {
ExecuteContracts(blk, bc)
if err := bc.sf.CommitStateChanges(blk.Height(), blk.Transfers, blk.Votes, blk.Executions); err != nil {
- return err
+ logger.Fatal().Err(err).Msgf("Failed to commit state changes on height... | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 11,854 | Leave a TODO message to say we will fix the log level in the future, once committing the block and the state become a transaction | iotexproject-iotex-core | go |
@@ -107,6 +107,18 @@ public class TableProperties {
public static final String DELETE_PARQUET_COMPRESSION_LEVEL = "write.delete.parquet.compression-level";
public static final String PARQUET_COMPRESSION_LEVEL_DEFAULT = null;
+ public static final String PARQUET_ROW_GROUP_CHECK_MIN_RECORD_COUNT =
+ "write.... | 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 | 42,409 | this can be integer | apache-iceberg | java |
@@ -69,6 +69,8 @@ class CompletionView(QTreeView):
{{ color['completion.category.border.top'] }};
border-bottom: 1px solid
{{ color['completion.category.border.bottom'] }};
+ font: {{ font['completion.category'] }};
+
}
QTreeView::item:select... | 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,469 | nitpick: Please remove the blank line here | qutebrowser-qutebrowser | py |
@@ -4,6 +4,7 @@ class Way < ActiveRecord::Base
include ConsistencyValidations
set_table_name 'current_ways'
+ foreign_key 'changeset_id'
belongs_to :changeset
| 1 | class Way < ActiveRecord::Base
require 'xml/libxml'
include ConsistencyValidations
set_table_name 'current_ways'
belongs_to :changeset
has_many :old_ways, :order => 'version'
has_many :way_nodes, :order => 'sequence_id'
has_many :nodes, :through => :way_nodes, :order => 'sequence_id'
has_many ... | 1 | 7,515 | What is this for? The only methods I can see by that name in the rails doc are generating a foreign key name from a model class name but you seem to be giving a key name as argument? | openstreetmap-openstreetmap-website | rb |
@@ -798,6 +798,12 @@ public class CoreContainer {
SecurityConfHandler.SecurityConfig securityConfig = securityConfHandler.getSecurityConfig(false);
initializeAuthorizationPlugin((Map<String, Object>) securityConfig.getData().get("authorization"));
initializeAuthenticationPlugin((Map<String, Object>) secu... | 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 | 27,769 | Is this second check necessary? we know that just after the plugin was created its metricRegistry is null, it's set only after `initializeMetrics` has been called. | apache-lucene-solr | java |
@@ -130,6 +130,16 @@ TalkActionResult_t TalkActions::playerSaySpell(Player* player, SpeakClasses type
}
}
+ if (it->second.fromLua) {
+ if (it->second.getNeedAccess() && !player->getGroup()->access) {
+ return TALKACTION_CONTINUE;
+ }
+
+ if (player->getAccountType() < it->second.getRequiredAccountTy... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* This program 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; eithe... | 1 | 18,294 | shouldn't this be `return TALKACTION_BREAK;` as the player does not meet the required group access? | otland-forgottenserver | cpp |
@@ -72,6 +72,8 @@ public class CliqueMiningAcceptanceTest extends AcceptanceTestBase {
cluster.stopNode(minerNode2);
cluster.stopNode(minerNode3);
minerNode1.verify(net.awaitPeerCount(0));
+ minerNode1.verify(clique.blockIsCreatedByProposer(minerNode1));
+
minerNode1.verify(clique.noNewBlockCreat... | 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 | 24,534 | does this still work if minerNode1 has already proposed a block before 2 & 3 are stopped? | hyperledger-besu | java |
@@ -91,6 +91,12 @@ var _ topicreconciler.Interface = (*Reconciler)(nil)
func (r *Reconciler) ReconcileKind(ctx context.Context, topic *v1.Topic) reconciler.Event {
ctx = logging.WithLogger(ctx, r.Logger.With(zap.Any("topic", topic)))
+ if v, present := topic.Annotations[v1.LoggingE2ETestAnnotation]; present {
+ /... | 1 | /*
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 1 | 18,627 | I am wondering if we can either make this a feature or have a way to turn it off in production. My concern is that we might be adding more of these kind of code in the future. | google-knative-gcp | go |
@@ -960,11 +960,8 @@ class DataFrame(_Frame, Generic[T]):
# sum 12.0 NaN
#
# Aggregated output is usually pretty much small. So it is fine to directly use pandas API.
- pdf = kdf.to_pandas().transpose().reset_index()
- pdf = pdf.groupby(['level_1']).apply(
- lam... | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 11,716 | We can just use `.stack()` here? Then I guess we can reuse when supporting multi-index columns. | databricks-koalas | py |
@@ -14,8 +14,13 @@ namespace Datadog.Trace.ClrProfiler
private static readonly Lazy<bool> _enabled = new Lazy<bool>(
() =>
{
+#if NETSTANDARD2_0
+ // TODO: figure out configuration in .NET Standard 2.0
+ return true;
+#else
string setting... | 1 | using System;
using System.Configuration;
using System.Threading;
// [assembly: System.Security.SecurityCritical]
// [assembly: System.Security.AllowPartiallyTrustedCallers]
namespace Datadog.Trace.ClrProfiler
{
/// <summary>
/// Provides instrumentation probes that can be injected into profiled code.
/// ... | 1 | 14,342 | What are the possibilities here? Since we plan on supporting .net standard 2.0 from day 1, we might as well tackle that now. | DataDog-dd-trace-dotnet | .cs |
@@ -28,9 +28,9 @@ namespace OpenTelemetry.Metrics
/// <summary>
/// Adds the given value to the bound counter metric.
/// </summary>
- /// <param name="context">the associated <see cref="SpanContext"/>.</param>
+ /// <param name="context">the associated <see cref="SpanReference"... | 1 | // <copyright file="BoundCounterMetric.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.apa... | 1 | 17,556 | should the parameters be called reference or context? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -184,7 +184,7 @@ module Bolt
begin
if writable && index < in_buffer.length
- to_print = in_buffer[index..-1]
+ to_print = in_buffer.byteslice(index..-1)
written = inp.write_nonblock to_print
index += written
| 1 | # frozen_string_literal: true
require 'open3'
require 'fileutils'
require 'bolt/node/output'
require 'bolt/util'
module Bolt
module Transport
class Local < Sudoable
class Shell < Sudoable::Connection
attr_accessor :user, :logger, :target
attr_writer :run_as
CHUNK_SIZE = 4096
... | 1 | 14,393 | Do we need to also change `length` here (and below) to `bytesize`? Perhaps we ought to make a copy of `in_buffer` encoded as binary and then the existing algorithm should work. | puppetlabs-bolt | rb |
@@ -166,6 +166,7 @@ def get_filename_question(*, suggested_filename, url, parent=None):
q.title = "Save file to:"
q.text = "Please enter a location for <b>{}</b>".format(
html.escape(url.toDisplayString()))
+ q.yank_text = url.toString()
q.mode = usertypes.PromptMode.download
q.completed... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 20,585 | This should be `toDisplayString()` to not contain e.g. passwords. | qutebrowser-qutebrowser | py |
@@ -180,6 +180,10 @@ class <%= controller_name.classify %>Controller < ApplicationController
# If there are more than this many search results, no spelling ("did you
# mean") suggestion is offered.
config.spell_max = 5
+
+ # Configuration for autocomplete suggestor
+ config.autocomplete_enabled = ... | 1 | # -*- encoding : utf-8 -*-
class <%= controller_name.classify %>Controller < ApplicationController
include Blacklight::Catalog
configure_blacklight do |config|
## Default parameters to send to solr for all search-like requests. See also SearchBuilder#processed_parameters
config.default_solr_params = {
... | 1 | 6,209 | Can we just say that having a non-nil `autocomplete_path` implies that autocomplete is enabled? | projectblacklight-blacklight | rb |
@@ -25,7 +25,7 @@ import (
"github.com/caddyserver/caddy/v2"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
- "github.com/gogo/protobuf/proto"
+ "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/google/cel-go/cel"
"github.com/google/cel-go/checker/decls" | 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,212 | Note that the package github.com/golang/protobuf/proto is deprecated. We're instructed to use the "google.golang.org/protobuf/proto" package instead. I didn't want to change it now to avoid intrusive changes whose consequences are, currently, unknown. | caddyserver-caddy | go |
@@ -4,14 +4,3 @@ get "/pages/*id" => "pages#show", format: false
get "/subscribe" => "promoted_catalogs#show", as: 'subscribe'
get "/privacy" => "pages#show", as: :privacy, id: 'privacy'
get "/terms" => "pages#show", as: :terms, id: 'terms'
-
-get(
- "/group-training" => "pages#show",
- as: :group_training,
- id:... | 1 | get "/purchases/:lookup" => "pages#show", id: "purchase-show"
get "/pages/*id" => "pages#show", format: false
get "/subscribe" => "promoted_catalogs#show", as: 'subscribe'
get "/privacy" => "pages#show", as: :privacy, id: 'privacy'
get "/terms" => "pages#show", as: :terms, id: 'terms'
get(
"/group-training" => "pag... | 1 | 12,268 | Are these gone routes? Do we need to 301 them? | thoughtbot-upcase | rb |
@@ -18,10 +18,13 @@ import (
"bytes"
"encoding/json"
"fmt"
+ "github.com/vmware-tanzu/antrea/pkg/apis/networking/v1beta1"
+ "github.com/vmware-tanzu/antrea/pkg/controller/networkpolicy"
"io"
"os"
"reflect"
"sort"
+ "strconv"
"strings"
"text/tabwriter"
| 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 22,037 | move them to internal group of imports | antrea-io-antrea | go |
@@ -124,6 +124,7 @@ func (c *CStorPoolController) cStorPoolEventHandler(operation common.QueueOperat
status, err := c.getPoolStatus(cStorPoolGot)
return status, err
}
+ glog.Errorf("Please handle cStorPool '%s' event on '%s'", string(operation), string(cStorPoolGot.ObjectMeta.Name))
return string(apis.CStorPo... | 1 | /*
Copyright 2018 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 12,190 | can we rewrite this as: `ignored event '%s' for cstor pool '%s'` | openebs-maya | go |
@@ -4,6 +4,8 @@ module Test
end
class ClientRequest < ActiveRecord::Base
+ belongs_to :approving_official, class_name: User
+
def self.purchase_amount_column_name
:amount
end | 1 | module Test
def self.table_name_prefix
"test_"
end
class ClientRequest < ActiveRecord::Base
def self.purchase_amount_column_name
:amount
end
include ClientDataMixin
include PurchaseCardMixin
def editable?
true
end
def name
project_title
end
def self.e... | 1 | 16,677 | not all client data types have an approving official (eg: 18F does not). do we still want to include the relation here? | 18F-C2 | rb |
@@ -105,7 +105,7 @@ public interface WebDriver extends SearchContext {
* @see org.openqa.selenium.WebDriver.Timeouts
*/
@Override
- List<WebElement> findElements(By by);
+ <T extends WebElement> List<T> findElements(By by);
/** | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 19,274 | This change should also probably go into the corresponding method of the abstract By class? | SeleniumHQ-selenium | rb |
@@ -127,9 +127,6 @@ module.exports = function(config, auth, storage) {
} else {
next(HTTPError[err.message ? 401 : 500](err.message));
}
-
- let base = Utils.combineBaseUrl(Utils.getWebProtocol(req), req.get('host'), config.url_prefix);
- res.redirect(base);
});
});
| 1 | 'use strict';
const bodyParser = require('body-parser');
const express = require('express');
const marked = require('marked');
const Search = require('../../lib/search');
const Middleware = require('./middleware');
const match = Middleware.match;
const validateName = Middleware.validate_name;
const validatePkg = Middl... | 1 | 17,143 | why this remove? | verdaccio-verdaccio | js |
@@ -54,7 +54,7 @@ type Reader interface {
Stat(ctx context.Context, path string) (os.FileInfo, error)
// Open opens an existing file for reading, as os.Open.
- Open(ctx context.Context, path string) (io.ReadCloser, error)
+ Open(ctx context.Context, path string) (FileReader, error)
// Glob returns all the pat... | 1 | /*
* Copyright 2015 The Kythe Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 1 | 11,316 | As the test failures indicate, making this change is going to mean changing everything which currently implements this interface. | kythe-kythe | go |
@@ -13,7 +13,7 @@ get(
get "/humans-present/oss" => redirect( "https://www.youtube.com/watch?v=VMBhumlUP-A")
get "/ios-on-rails" => redirect("https://gumroad.com/l/ios-on-rails")
get "/ios-on-rails-beta" => redirect("https://gumroad.com/l/ios-on-rails")
-get "/live" => redirect(OfficeHours.url)
+get "/live" => redir... | 1 | get "/5by5" => redirect("/design-for-developers?utm_source=5by5")
get "/:id/articles" => redirect("http://robots.thoughtbot.com/tags/%{id}")
get "/backbone-js-on-rails" => redirect("https://gumroad.com/l/backbone-js-on-rails")
get "/courses.json" => redirect("/video_tutorials.json")
get "/courses/:id" => redirect("/vid... | 1 | 11,934 | Do we want to redirect this to the forum or something in case people have it linked/bookmarked? | thoughtbot-upcase | rb |
@@ -21,7 +21,7 @@ export default Component.extend({
}),
backgroundStyle: computed('member.{name,email}', function () {
- let name = this.member.name || this.member.email;
+ let name = this.member.name || this.member.email || 'NM';
if (name) {
let color = stringToHslColor(... | 1 | import Component from '@ember/component';
import {computed} from '@ember/object';
import {htmlSafe} from '@ember/string';
const stringToHslColor = function (str, saturation, lightness) {
var hash = 0;
for (var i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
var... | 1 | 9,334 | @peterzimon came up with this 'NM' piece as a placeholder for New Member initials, without this the screen looks broken. It changes to normal initials calculation once email or name is entered. Lmk if you'd like to put something different here ;) | TryGhost-Admin | js |
@@ -4,5 +4,6 @@ import attr from 'ember-data/attr';
export default DS.Model.extend({
name: attr('string'),
email: attr('string'),
- createdAt: attr('moment-utc')
+ createdAt: attr('moment-utc'),
+ subscriptions: attr('member-subscription')
}); | 1 | import DS from 'ember-data';
import attr from 'ember-data/attr';
export default DS.Model.extend({
name: attr('string'),
email: attr('string'),
createdAt: attr('moment-utc')
});
| 1 | 9,224 | @kevinansfield Would be cool if you can take a if this is the best way to add `subscriptions` info on member model. This uses the transform + separate model definition way which seemed to be the right way from other references in Admin | TryGhost-Admin | js |
@@ -31,10 +31,12 @@ try:
import matplotlib.pyplot as plt
import matplotlib.cm as cm
except ImportError:
- # Suppress; we log it at debug level to avoid polluting the logs of apps
- # and services that don't care about plotting
- logging.debug("Cannot import matplotlib. Plot class will not work.",
- ... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This p... | 1 | 20,855 | This is the common way of dealing with optional dependencies | numenta-nupic | py |
@@ -67,8 +67,8 @@ func (t testHelper) AvailableEndpoints() *corev1.Endpoints {
}
}
-func (t testHelper) ReadyDependencyStatus() *duckv1.KResource {
- kr := &duckv1.KResource{}
+func (t testHelper) ReadyDependencyStatus() *duckv1.Source {
+ kr := &duckv1.Source{}
kr.Status.SetConditions(apis.Conditions{{
Type:... | 1 | /*
Copyright 2020 Google LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | 1 | 18,741 | nit: we can replace all `kr` in this file with like `src`. | google-knative-gcp | go |
@@ -101,7 +101,7 @@ ReadPreference.fromOptions = function(options) {
if (typeof readPreference === 'string') {
return new ReadPreference(readPreference, readPreferenceTags);
} else if (!(readPreference instanceof ReadPreference) && typeof readPreference === 'object') {
- const mode = readPreference.mode |... | 1 | 'use strict';
/**
* The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is
* used to construct connections.
* @class
* @param {string} mode A string describing the read preference mode (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
* @param {array} tags The tags o... | 1 | 17,693 | same concern here as above | mongodb-node-mongodb-native | js |
@@ -147,7 +147,7 @@ module Mongoid
def raw
validate_out!
cmd = command
- opts = { read: cmd.delete(:read) } if cmd[:read]
+ opts = { read: criteria.options.fetch(:read) } if criteria.options[:read]
@map_reduce.database.command(cmd, (opts || {}).merge(session: _session)).f... | 1 | # frozen_string_literal: true
module Mongoid
module Contextual
class MapReduce
extend Forwardable
include Enumerable
include Command
def_delegators :results, :[]
def_delegators :entries, :==, :empty?
# Get all the counts returned by the map/reduce.
#
# @example G... | 1 | 13,471 | Thank you for this, I gather this repairs failures that I've seen in another PR. | mongodb-mongoid | rb |
@@ -159,7 +159,7 @@ abstract class BaseSparkAction<ThisT, R> implements Action<ThisT, R> {
.repartition(spark.sessionState().conf().numShufflePartitions()) // avoid adaptive execution combining tasks
.as(Encoders.bean(ManifestFileBean.class));
- return allManifests.flatMap(new ReadManifest(ioBroa... | 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,012 | This place probably makes sense to me. We can consider exposing an argument to make the dedup step optional (I am not sure it is a good idea but I want to think this through together). The dedup step we are adding is going to trigger a shuffle. Technically, we are fine in the existing expire snapshots action as it does... | apache-iceberg | java |
@@ -1516,6 +1516,11 @@ func (c *ClusterManager) NodeRemoveDone(nodeID string, result error) {
nodeID, err)
logrus.Errorf(msg)
}
+
+ // Remove osdconfig data from etcd
+ if err := c.configManager.DeleteNodeConf(nodeID); err != nil {
+ logrus.Warn("error removing node from osdconfig:", err)
+ }
}
func (c *C... | 1 | // Package cluster implements a cluster state machine. It relies on a cluster
// wide keyvalue store for coordinating the state of the cluster.
// It also stores the state of the cluster in this keyvalue store.
package cluster
import (
"container/list"
"encoding/gob"
"errors"
"fmt"
"net"
"os"
"os/exec"
"strin... | 1 | 6,660 | can we move the code before deleteNodeFromDB ? this way even if the node crashes after remove config we can still re-run decommission again ? | libopenstorage-openstorage | go |
@@ -6684,7 +6684,7 @@ defaultdict(<class 'list'>, {'col..., 'col...})]
return self._internal.copy(sdf=sdf, data_columns=columns, column_index=idx)
- def melt(self, id_vars=None, value_vars=None, var_name='variable',
+ def melt(self, id_vars=None, value_vars=None, var_name=None,
value_na... | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 12,221 | Seems the default value of `melt`'s `var_name` at namespace.py should be changed as well. | databricks-koalas | py |
@@ -608,6 +608,17 @@ def test_query_parser_path_params_with_slashes():
assert params == {"ResourceArn": resource_arn}
+def test_parse_cloudtrail_with_botocore():
+ _botocore_parser_integration_test(
+ service="cloudtrail",
+ action="DescribeTrails",
+ headers={
+ "X-Amz-Targe... | 1 | from datetime import datetime
from urllib.parse import urlencode
from botocore.serialize import create_serializer
from localstack.aws.api import HttpRequest
from localstack.aws.protocol.parser import QueryRequestParser, RestJSONRequestParser, create_parser
from localstack.aws.spec import load_service
from localstack.... | 1 | 14,296 | I think botocore's serializer should already create the correct headers. However, they are currently not used in `_botocore_parser_integration_test`(line #217). Maybe we could remove the headers here and just use a fallback in the `_botocore_parser_integration_test` (i.e. use the given headers if they are set, otherwis... | localstack-localstack | py |
@@ -83,7 +83,7 @@ export default AbstractEditController.extend(ChargeActions, PatientSubmodule, {
closeModalOnConfirm: false,
confirmAction: 'deleteCharge',
title: this.get('i18n').t('procedures.titles.deleteMedicationUsed'),
- message: this.get('i18n').t('procedures.messages.deleteMed... | 1 | import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller';
import ChargeActions from 'hospitalrun/mixins/charge-actions';
import Ember from 'ember';
import PatientSubmodule from 'hospitalrun/mixins/patient-submodule';
export default AbstractEditController.extend(ChargeActions, PatientSubmod... | 1 | 13,485 | This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. | HospitalRun-hospitalrun-frontend | js |
@@ -8,12 +8,12 @@ export default class Provider {
constructor (opts) {
this.opts = opts
this.provider = opts.provider
- this.id = this.provider
+ this.id = opts.id || this.provider
this.name = this.opts.name || _getName(this.id)
}
auth () {
- return fetch(`${this.opts.host}/${this.pro... | 1 | 'use strict'
const _getName = (id) => {
return id.split('-').map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(' ')
}
export default class Provider {
constructor (opts) {
this.opts = opts
this.provider = opts.provider
this.id = this.provider
this.name = this.opts.name || _getName(this.id)
... | 1 | 9,387 | in case you want to rename one of the plugins when instantiating, from options? | transloadit-uppy | js |
@@ -22,6 +22,7 @@ from libcodechecker.logger import add_verbose_arguments
from libcodechecker.logger import LoggerFactory
LOG = LoggerFactory.get_new_logger('ANALYZE')
+CTU_FUNC_MAP_CMD = 'clang-func-mapping'
class OrderedCheckersAction(argparse.Action): | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 7,099 | This default variable should be moved into a config variable, created by `package_context`, and read from `config\package_layout.json`. | Ericsson-codechecker | c |
@@ -202,4 +202,16 @@ describe('Walkontable.ViewportColumnsCalculator', () => {
expect(calc.stretchAllColumnsWidth.length).toBe(0);
expect(calc.needVerifyLastColumnWidth).toBe(true);
});
+
+ it('should calculate the number of columns based on a default width, ' +
+ 'when the width returned from the func... | 1 | describe('Walkontable.ViewportColumnsCalculator', () => {
function allColumns20() {
return 20;
}
it('should render first 5 columns in unscrolled container', () => {
const calc = new Walkontable.ViewportColumnsCalculator(100, 0, 1000, allColumns20);
expect(calc.startColumn).toBe(0);
expect(calc.st... | 1 | 14,921 | Can I ask you to add a new line after `const` assignment? I believe that this increases the code readability by encapsulating assignment and logic (expecting) blocks. | handsontable-handsontable | js |
@@ -313,6 +313,7 @@ void CudaInternal::initialize(int cuda_device_id, cudaStream_t stream) {
enum { WordSize = sizeof(size_type) };
+#ifndef KOKKOS_IMPL_TURN_OFF_CUDA_HOST_INIT_CHECK
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
if (!HostSpace::execution_space::is_initialized()) {
#else | 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 | 22,043 | So the intention is you configure with `-CMAKE_CXX_FLAGS="-D KOKKOS_IMPL_TURN_OFF_CUDA_HOST_INIT_CHECK"`? | kokkos-kokkos | cpp |
@@ -396,7 +396,7 @@ void AssignHsResidueInfo(RWMol &mol) {
h_label = h_label.substr(3, 1) + h_label.substr(0, 3);
AtomPDBResidueInfo *newInfo = new AtomPDBResidueInfo(
h_label, max_serial, "", info->getResidueName(),
- info->getResidueNumber(), info->getChainId(), "",
+... | 1 | //
// Copyright (C) 2003-2019 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 "RDKitBase.... | 1 | 19,423 | This was a bug. | rdkit-rdkit | cpp |
@@ -210,6 +210,19 @@ class ImageExtension extends Twig_Extension
$htmlAttributes = $attributes;
unset($htmlAttributes['type'], $htmlAttributes['size']);
+ $useLazyLoading = array_key_exists('lazy', $attributes) ? (bool)$attributes['lazy'] : true;
+ $isAttributeClassExistsAndNotEmpty = ... | 1 | <?php
declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Twig;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Shopsys\FrameworkBundle\Component\Image\ImageFacade;
use Shopsys\FrameworkBundle\Component\Image\ImageLocator;
use Shopsys\FrameworkBundle\Component\Utils\Utils;
use Symfony\Bundle\Framewor... | 1 | 19,661 | Is OK that we don't have some placeholder? | shopsys-shopsys | php |
@@ -447,11 +447,11 @@ func (node *Node) setupStorageMining(ctx context.Context) error {
PoStProofType: postProofType,
SealProofType: sealProofType,
Miner: minerAddr,
- WorkerThreads: 1,
+ WorkerThreads: 2,
Paths: []fs.PathConfig{
{
Path: sectorDir,
- Cache: false,
+ Cache: true,... | 1 | package node
import (
"context"
"fmt"
"os"
"reflect"
"runtime"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-sectorbuilder"
"github.com/filecoin-project/go-sectorbuilder/fs"
"github.com/filecoin-project/specs-actors/actors/abi"
fbig "github.com/filecoin-project/specs-actors/actors... | 1 | 23,422 | Sectorbuilder behaves differently depending on whether it's given 1 or more threads. It won't seal if only given 1. | filecoin-project-venus | go |
@@ -16,8 +16,11 @@
package azkaban.metrics;
+import static azkaban.ServiceProvider.SERVICE_PROVIDER;
+
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;
+import com.google.inject.Inject;
import java.util.concurrent.atomic.AtomicLong;
/** | 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 | 13,692 | Sort of believe We should put MetricManager in constructor parameter given this case. | azkaban-azkaban | java |
@@ -28,11 +28,13 @@ import org.apache.iceberg.transforms.Transform;
*/
public class PartitionField implements Serializable {
private final int sourceId;
+ private final int fieldId;
private final String name;
private final Transform<?, ?> transform;
- PartitionField(int sourceId, String name, Transform<... | 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 | 18,692 | Do we need to check `fieldId` is larger than 1000? | apache-iceberg | java |
@@ -356,10 +356,7 @@ void StatefulWriter::unsent_change_added_to_history(
periodic_hb_event_->restart_timer(max_blocking_time);
}
- if ( (mp_listener != nullptr) && this->is_acked_by_all(change) )
- {
- mp_listener->onWriterChangeR... | 1 | // Copyright 2016 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 | 19,333 | I think this should be called after the if below (the one for disable positive acks) | eProsima-Fast-DDS | cpp |
@@ -271,7 +271,7 @@ public class SparkTableUtil {
* @param metricsConfig a metrics conf
* @return a List of DataFile
*/
- public static List<DataFile> listPartition(Map<String, String> partition, String uri, String format,
+ public static List<DataFile> listPartition(Map<String, String> partition, URI uri... | 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 | 21,995 | I'd like to avoid changing this method since it is public and using a URI will probably change behavior for users passing strings (String -> URI -> Path instead of String -> Path). | apache-iceberg | java |
@@ -5,11 +5,13 @@ import (
"path/filepath"
"testing"
+ "github.com/aws/aws-sdk-go/internal/sdktesting"
"github.com/aws/aws-sdk-go/internal/shareddefaults"
)
func TestSharedCredentialsProvider(t *testing.T) {
- os.Clearenv()
+
+ sdktesting.StashEnv()
p := SharedCredentialsProvider{Filename: "example.ini"... | 1 | package credentials
import (
"os"
"path/filepath"
"testing"
"github.com/aws/aws-sdk-go/internal/shareddefaults"
)
func TestSharedCredentialsProvider(t *testing.T) {
os.Clearenv()
p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
creds, err := p.Retrieve()
if err != nil {
t.Errorf("expec... | 1 | 9,757 | Should these restore the stashed env after the test runs? | aws-aws-sdk-go | go |
@@ -402,7 +402,10 @@ def is_default_argument(
if not scope:
scope = node.scope()
if isinstance(scope, (nodes.FunctionDef, nodes.Lambda)):
- for default_node in scope.args.defaults:
+ all_defaults = scope.args.defaults + [
+ d for d in scope.args.kw_defaults if d is not None
+... | 1 | # Copyright (c) 2006-2007, 2009-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2009 Mads Kiilerich <mads@kiilerich.com>
# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>
# Copyright (c) 2012-2014 Google, Inc.
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2013-202... | 1 | 16,050 | We're calculating the full list of kwargs here (even if the first element of the list would return True) so we could improve performance by using a generator line 408 in ``for default_node in all_defaults:``. | PyCQA-pylint | py |
@@ -119,6 +119,14 @@ type accountDelta struct {
new basics.AccountData
}
+// accountDeltaCount is an extention to accountDelta that is being used by the commitRound function for counting the
+// number of changes we've made per account. The ndeltas is used execlusively for consistency checking - making sure that
+... | 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 | 41,221 | Can ndelta differ depending on when the deltas are compacted? That is, when intermediate updates are dropped? | algorand-go-algorand | go |
@@ -21,13 +21,12 @@ import net.sourceforge.pmd.lang.rule.xpath.JaxenXPathRuleQuery;
import net.sourceforge.pmd.lang.rule.xpath.SaxonXPathRuleQuery;
import net.sourceforge.pmd.lang.rule.xpath.XPathRuleQuery;
import net.sourceforge.pmd.properties.EnumeratedProperty;
-import net.sourceforge.pmd.properties.PropertySourc... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.rule;
import static net.sourceforge.pmd.lang.rule.xpath.XPathRuleQuery.XPATH_1_0;
import static net.sourceforge.pmd.lang.rule.xpath.XPathRuleQuery.XPATH_1_0_COMPATIBILITY;
import static net.sourcef... | 1 | 13,487 | Our checkstyle config likes it better when the `<p>` is before the first word of the next paragraph, and not on a blank line | pmd-pmd | java |
@@ -1498,6 +1498,8 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *
if err := cmd.Start(); err != nil {
return err
}
+ // we close criuServer so that even if CRIU crashes or unexpectedly exits, runc will not hang.
+ criuServer.Close()
// cmd.Process will be replaced by a rest... | 1 | // +build linux
package libcontainer
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path/filepath"
"reflect"
"strings"
"sync"
"syscall" // only for SysProcAttr and Signal
"time"
securejoin "github.com/cyphar/filepath-securejoin"
"github.com/opencontainers/runc... | 1 | 19,029 | This looks to be the only place where we return early before the close below, so if the "double close" is bothering people, closing manually here (and removing the `defer`) could be an option | opencontainers-runc | go |
@@ -91,8 +91,8 @@ gulp.task( 'default', () => {
);
} );
-gulp.task( 'qunit', function() {
- execSync( 'node-qunit-phantomjs ./tests/qunit/index.html', { stdio: [ 0, 1, 2 ] } );
+gulp.task( 'jest', function() {
+ execSync( 'npm run test:js', { stdio: [ 0, 1, 2 ] } );
} );
gulp.task( 'phpunit', function() { | 1 | /**
* Gulp config.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | 1 | 24,765 | This task can probably be deleted since we don't need gulp to run Jest. | google-site-kit-wp | js |
@@ -23,6 +23,9 @@ require 'socket'
module Selenium
module WebDriver
class SocketPoller
+ NOT_CONNECTED_ERRORS = [Errno::ECONNREFUSED, Errno::ENOTCONN, SocketError]
+ NOT_CONNECTED_ERRORS << Errno::EPERM if Platform.cygwin?
+
def initialize(host, port, timeout = 0, interval = 0.25)
@ho... | 1 | # encoding: utf-8
#
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | 1 | 13,776 | Doesn't this need to include `Errno::ECONNRESET` to fix the issue? | SeleniumHQ-selenium | js |
@@ -28,6 +28,19 @@ module Faker
def quote
fetch('movie.quote')
end
+
+ ##
+ # Produces a qirector from a movie.
+ #
+ # @return [String]
+ #
+ # @example
+ # Faker::Movie.qirector #=> "Quentin Tarantino"
+ #
+ # @faker.version next
+ def directo... | 1 | # frozen_string_literal: true
module Faker
class Movie < Base
class << self
##
# Produces a title from a movie.
#
# @return [String]
#
# @example
# Faker::Movie.title #=> "The Lord of the Rings: The Two Towers"
#
# @faker.version 2.13.0
def title
... | 1 | 10,228 | never heard of a qirector... what's their role again? (also should be 'for a movie') | faker-ruby-faker | rb |
@@ -86,6 +86,14 @@ kvstore::ResultCode QueryBoundProcessor::processVertex(PartitionID partId, Verte
}
}
vResp.set_tag_data(std::move(td));
+ } else if (tagContexts_.empty() && onlyVertexProps_) {
+ std::vector<cpp2::TagData> td;
+ auto ret = collectVertexProps(partId, vId... | 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 "storage/query/QueryBoundProcessor.h"
#include <algorithm>
#include "time/Duration.h"
#include "dataman/RowRead... | 1 | 26,502 | Implement the "collect all props for one vertex" logic inside QueryVertexPropsProcessor | vesoft-inc-nebula | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.