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 |
|---|---|---|---|---|---|---|---|
@@ -185,6 +185,7 @@ namespace MvvmCross.Platforms.Ios.Views
}
else
{
+ keyboardFrame.Height -= scrollView.SafeAreaInsets.Bottom;
scrollView.CenterView(activeView, keyboardFrame);
}
} | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
using System;
using CoreGraphics;
using Foundation;
using MvvmCross.ViewModels;
using UIKit;
namespace MvvmCross... | 1 | 15,254 | Please add a check to see if SafeAreaInsets is available. It isn't on all iOS versions. | MvvmCross-MvvmCross | .cs |
@@ -77,7 +77,7 @@ class RolesController < ApplicationController
# rubocop:disable LineLength
render json: {
code: 1,
- msg: _("Successfully changed the permissions for #{@role.user.email}. They have been notified via email.")
+ msg: _("Successfully changed the permissions for %{emai... | 1 | # frozen_string_literal: true
class RolesController < ApplicationController
include ConditionalUserMailer
respond_to :html
after_action :verify_authorized
def create
registered = true
@role = Role.new(role_params)
authorize @role
plan = Plan.find(role_params[:plan_id])
message = ""
... | 1 | 18,438 | interpolation here was causing the translation to not get picked up | DMPRoadmap-roadmap | rb |
@@ -69,8 +69,13 @@ StatelessWriter::StatelessWriter(
StatelessWriter::~StatelessWriter()
{
- AsyncWriterThread::removeWriter(*this);
logInfo(RTPS_WRITER,"StatelessWriter destructor";);
+
+ mp_RTPSParticipant->async_thread().unregister_writer(this);
+
+ // After unregistering writer from AsyncWriterThr... | 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 | 14,644 | We don't need to disable the flow controller here as in `StatefulWriter`s destructor? | eProsima-Fast-DDS | cpp |
@@ -24,7 +24,7 @@ class Service(service.ChromiumService):
"""
def __init__(self, executable_path, port=0, service_args=None,
- log_path=None, env=None):
+ log_path=None, env=None, create_no_window=False):
"""
Creates a new instance of the Service
| 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 17,876 | I would rather no have this as a `kwarg` as it encourages "growth" which lead to an unweildy constructor in other classes. Let's add a method or property to take care of this instead as I think it's usage is going to be quite low. | SeleniumHQ-selenium | java |
@@ -313,11 +313,17 @@ func (r *DefaultRuleRenderer) filterOutputChain() *Chain {
// That decision is based on pragmatism; it's generally very useful to be able to contact
// any local workload from the host and policing the traffic doesn't really protect
// against host compromise. If a host is compromised, then... | 1 | // Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 15,812 | I just noticed that we use Return here, when we have logically allowed a packet, whereas in the forward chain we use AcceptAction. Do you know why that is? | projectcalico-felix | c |
@@ -60,3 +60,11 @@ func isABuildFile(name string, config *core.Configuration) bool {
}
return false
}
+
+// Max is an incredibly complicated function, which is presumably why it didn't make it into the Go stdlib
+func Max(x, y int) int {
+ if x < y {
+ return y
+ }
+ return x
+} | 1 | // Package utils contains various utility functions and whatnot.
package utils
import (
"path"
"path/filepath"
"strings"
"gopkg.in/op/go-logging.v1"
"cli"
"core"
"fs"
)
var log = logging.MustGetLogger("utils")
// FindAllSubpackages finds all packages under a particular path.
// Used to implement rules with ... | 1 | 8,226 | There's one for floats but not for ints. The float implementation is non-trivial though which I guess is the argument there. | thought-machine-please | go |
@@ -51,6 +51,9 @@ const (
// 6. QueryWorkflow
// please also reference selectedAPIsForwardingRedirectionPolicyWhitelistedAPIs
DCRedirectionPolicySelectedAPIsForwarding = "selected-apis-forwarding"
+
+ // DCRedirectionPolicyAllAPIsForwarding means forwarding all APIs based on namespace active cluster
+ DCRedirecti... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 13,788 | If we have a redirection policy for Selected API forwarding, why isn't "redirect all" just a special case where they are all Selected? | temporalio-temporal | go |
@@ -130,6 +130,8 @@ const (
FrameworkTally = "tally"
// FrameworkOpentelemetry OpenTelemetry framework id
FrameworkOpentelemetry = "opentelemetry"
+ // FrameworkCustom Custom framework id
+ FrameworkCustom = "custom"
)
// tally sanitizer options that satisfy both Prometheus and M3 restrictions. | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 11,754 | I wouldn't add this. Just completely ignore config if custom reporter is not `nil` in server options. | temporalio-temporal | go |
@@ -159,10 +159,19 @@ int main(int argc, char *argv[]) {
auto ioThreadPool = std::make_shared<folly::IOThreadPoolExecutor>(FLAGS_num_io_threads);
+ std::string clusteridFile =
+ folly::stringPrintf("%s/%s", paths[0].c_str(), "/storage.cluster.id");
+ auto clusterMan
+ = std::make_unique<neb... | 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 "common/base/SignalHandler.h"
#include <thrift/lib/cpp2/server/ThriftServer.h>
#include ... | 1 | 20,422 | What's the meaning about the code? | vesoft-inc-nebula | cpp |
@@ -172,7 +172,7 @@ public class WebViewLocalServer {
return null;
}
- if (isLocalFile(loadingUrl) || (bridge.getConfig().getString("server.url") == null && !bridge.getAppAllowNavigationMask().matches(loadingUrl.getHost()))) {
+ if (isLocalFile(loadingUrl) || loadingUrl.getHost().contains(bridge.get... | 1 | /*
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 1 | 9,244 | Would this incorrectly trigger if `loadingUrl.getHost() = "something.app"` and `bridge.getHost() = "app"`? | ionic-team-capacitor | js |
@@ -23,7 +23,11 @@ class AnchorHead(BaseDenseHead, BBoxTestMixin):
anchor_generator (dict): Config dict for anchor generator
bbox_coder (dict): Config of bounding box coder.
reg_decoded_bbox (bool): If true, the regression loss would be
- applied on decoded bounding boxes. Default:... | 1 | import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from mmcv.runner import force_fp32
from mmdet.core import (anchor_inside_flags, build_anchor_generator,
build_assigner, build_bbox_coder, build_sampler,
images_to_levels, multi_apply, multiclass_nms, unm... | 1 | 22,289 | Note generally it -> It | open-mmlab-mmdetection | py |
@@ -81,8 +81,7 @@ public abstract class ConfigSetService {
) ? false: true;
SolrConfig solrConfig = createSolrConfig(dcore, coreLoader, trusted);
- IndexSchema indexSchema = createIndexSchema(dcore, solrConfig, false);
- return new ConfigSet(configSetName(dcore), solrConfig, force -> i... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 36,690 | Does this mean that every call to `configSet.getIndexSchema()` will create a new schema object (if shared schema is not enabled)? | apache-lucene-solr | java |
@@ -1,12 +1,11 @@
/*
- * 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
- * (... | 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,070 | License header should use the Apache one. | apache-servicecomb-java-chassis | java |
@@ -107,6 +107,8 @@ func (globber *Globber) Glob(rootPath string, includes, excludes []string, inclu
matches, err := globber.glob(rootPath, include, excludes, includeHidden, includeSymlinks)
if err != nil {
panic(fmt.Errorf("error globbing files with %v: %v", include, err))
+ } else if len(matches) == 0 {
+ ... | 1 | package fs
import (
"fmt"
"path"
"path/filepath"
"regexp"
"strings"
)
type matcher interface {
Match(name string) (bool, error)
}
type builtInGlob string
func (p builtInGlob) Match(name string) (bool, error) {
matched, err := filepath.Match(string(p), name)
if err != nil {
return false, fmt.Errorf("failed... | 1 | 10,268 | I think this makes more sense to be applied within the parser code where we evaluate the `glob` builtin? This function looks generic in the sense of where it can be used, and perhaps no matches is fine in other cases? | thought-machine-please | go |
@@ -226,6 +226,14 @@ func NewConfig(ec2client ec2.EC2MetadataClient) (*Config, error) {
}
config := &envConfig
+ if config.OnPrem.Enabled() {
+ if config.AWSRegion == "" {
+ return nil, errors.New("AWS_DEFAULT_REGION has to be set when running on-premises")
+ }
+ // Use fake ec2 metadata client if on prem co... | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file acco... | 1 | 25,346 | should we validate that AWSRegion has also been set here so that we don't get into the if-block that relies on the ec2 metadata client below? | aws-amazon-ecs-agent | go |
@@ -89,11 +89,13 @@ class ThriftRequestHandler():
checker_md_docs,
checker_md_docs_map,
suppress_handler,
- db_version_info):
+ db_version_info,
+ version):
self.__checker_md_docs = checker_md_docs
... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 6,511 | maybe naming `version` to `package_version` or something similar can be more descriptive | Ericsson-codechecker | c |
@@ -235,7 +235,7 @@ class MessageTypeToType extends ParquetTypeVisitor<Type> {
return current;
}
- private int getId(org.apache.parquet.schema.Type type) {
+ protected int getId(org.apache.parquet.schema.Type type) {
org.apache.parquet.schema.Type.ID id = type.getId();
if (id != null) {
ret... | 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,388 | Why was this changed? | apache-iceberg | java |
@@ -1,3 +1,4 @@
+//go:build !arm64
// +build !arm64
package nodeps | 1 | // +build !arm64
package nodeps
// MariaDBDefaultVersion is the default MariaDB version
const MariaDBDefaultVersion = MariaDB103
// ValidMariaDBVersions is the versions of MariaDB that are valid
var ValidMariaDBVersions = map[string]bool{
MariaDB55: true,
MariaDB100: true,
MariaDB101: true,
MariaDB102: true,
M... | 1 | 15,789 | Should not have snuck in here right? This is a golang 1.17 feature, wii definitely want to update these | drud-ddev | php |
@@ -1,10 +1,10 @@
module OrgAdmin
class PlansController < ApplicationController
- after_action :verify_authorized
-
+ # GET org_admin/plans
def index
- authorize Plan
-
+ # Test auth directly and throw Pundit error sincePundit is unaware of namespacing
+ raise Pundit::NotAuthorizedErro... | 1 | module OrgAdmin
class PlansController < ApplicationController
after_action :verify_authorized
def index
authorize Plan
vals = Role.access_values_for(:reviewer)
@feedback_plans = Plan.joins(:roles).where('roles.user_id = ? and roles.access IN (?)', current_user.id, vals)
@plans = ... | 1 | 17,267 | Pundit is unaware of namespacing, however you can still create the class under policies/org_admin/plans_policy.rb. That means, the condition for the unless can be reused in other places too. You would call the policy as OrgAdmin::PlansPolicy.new(current_user).index? after that unless | DMPRoadmap-roadmap | rb |
@@ -203,6 +203,13 @@ public class PMD {
return 0;
}
+ // Log warning only once, if not explicitly disabled
+ if (!configuration.isIgnoreIncrementalAnalysis() && LOG.isLoggable(Level.WARNING)) {
+ final String version = PMDVersion.isUnknown() || PMDVersion.isSnapshot() ? ... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;... | 1 | 13,698 | this warning shouldn't be produced if we configured a cache either | pmd-pmd | java |
@@ -16,6 +16,7 @@ describe('examples(change-stream):', function() {
client = await this.configuration.newClient().connect();
db = client.db(this.configuration.db);
+ await db.createCollection('inventory');
await db.collection('inventory').deleteMany({});
});
| 1 | /* eslint no-unused-vars: 0 */
'use strict';
const setupDatabase = require('../functional/shared').setupDatabase;
const expect = require('chai').expect;
describe('examples(change-stream):', function() {
let client;
let db;
before(async function() {
await setupDatabase(this.configuration);
});
beforeEa... | 1 | 16,571 | what if the collection is already there? | mongodb-node-mongodb-native | js |
@@ -24,8 +24,7 @@ import java.io.OutputStream;
import java.util.Base64;
/**
- * Defines the output type for a screenshot. See org.openqa.selenium.Screenshot for usage and
- * examples.
+ * Defines the output type for a screenshot.
*
* @see TakesScreenshot
* @param <T> Type for the screenshot output. | 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,489 | instead of removing can you reference org.openqa.selenium.TakesScreenshot ? | SeleniumHQ-selenium | java |
@@ -644,4 +644,6 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
}
}
}
+
+
} | 1 | package de.danoeh.antennapod.fragment;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.LightingColorFilter;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.Contex... | 1 | 20,120 | Please revert unrelated changes | AntennaPod-AntennaPod | java |
@@ -1224,6 +1224,11 @@ var AppRouter = Backbone.Router.extend({
path: [countlyGlobal.cdn + 'localization/min/'],
mode: 'map',
callback: function() {
+ if (countlyGlobal.company) {
+ for (var key in jQuery.i18n.map) {
+ jQuer... | 1 | /* global Backbone, Handlebars, countlyEvent, countlyCommon, countlyGlobal, CountlyHelpers, countlySession, moment, Drop, _, store, countlyLocation, jQuery, $*/
/**
* Default Backbone View template from which all countly views should inherit.
* A countly view is defined as a page corresponding to a url fragment such
* ... | 1 | 13,300 | As far as I know, this will replace only first occurance of Countly, not others, if there are more than one Countly word in localized string | Countly-countly-server | js |
@@ -111,9 +111,9 @@ public class LocalRepository implements Repository {
if (StringUtils.isBlank(jsonTypeDTO.getId())) {
if (!StringUtils.isBlank(jsonTypeDTO.getName())) {
- typeDTOBuilder.withId(jsonTypeDTO.getName().replaceAll("[^a-zA-Z0-9]", ... | 1 | /*
* Copyright (C) 2015-2017 PÂRIS Quentin
*
* 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 2 of the License, or
* (at your option) any later version.
*
* This program is... | 1 | 11,664 | I suggest, that we move the regex (`[^a-zA-Z0-9_]`) to a separate constant field, because we're using it in multiple places and I think it's quite prone to misspellings. | PhoenicisOrg-phoenicis | java |
@@ -1,7 +1,7 @@
import logging
import time
from collections import OrderedDict, defaultdict
-from typing import Iterable, Optional
+from typing import Dict, Iterable, List, Optional, Union
from dagster import check
from dagster.core.definitions.events import AssetKey | 1 | import logging
import time
from collections import OrderedDict, defaultdict
from typing import Iterable, Optional
from dagster import check
from dagster.core.definitions.events import AssetKey
from dagster.core.events import DagsterEventType
from dagster.core.events.log import EventLogEntry
from dagster.serdes import ... | 1 | 17,749 | Feel free to disregard, but I've been trying to use `Mapping` and `Sequence` instead of `Dict` and `List` when possible, because they communicate that the type is immutable, and also are covariant. | dagster-io-dagster | py |
@@ -27,6 +27,9 @@ import (
"testing"
"time"
+ "github.com/nats-io/jwt/v2"
+ "github.com/nats-io/nkeys"
+
"github.com/nats-io/nats.go"
)
| 1 | // Copyright 2012-2020 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 11,319 | No need for blank line here. This block will then be reordered alphabatically. | nats-io-nats-server | go |
@@ -5,9 +5,14 @@ import (
"fmt"
k8s "k8s.io/client-go/kubernetes"
+ "k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
)
+const (
+ localCluster = "local"
+)
+
type ClientsetManager interface {
Clientsets() map[string]ContextClientset
GetK8sClientset(clientset, cluster, namespace string) (Contex... | 1 | package k8s
import (
"errors"
"fmt"
k8s "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
)
type ClientsetManager interface {
Clientsets() map[string]ContextClientset
GetK8sClientset(clientset, cluster, namespace string) (ContextClientset, error)
}
type ContextClientset interface {
k8s.Interfa... | 1 | 8,248 | let's call it `in-cluster` instead of `local`. less chance of confusion. | lyft-clutch | go |
@@ -95,6 +95,8 @@ class Product extends BaseAction implements EventSubscriberInterface
$con->beginTransaction();
try {
+ $prev_ref = $product->getRef();
+
$product
->setDispatcher($event->getDispatcher())
->setRef($eve... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 11,490 | Please use camelCase instead of underscore_case | thelia-thelia | php |
@@ -87,7 +87,8 @@ def get_contents(bucket, key, ext, *, etag, version_id, s3_client, size):
s3_client=s3_client,
version_id=version_id
)
- content = extract_parquet(get_bytes(obj["Body"], compression), as_html=False)[0]
+ body, info = extract_parquet(... | 1 | """
phone data into elastic for supported file extensions.
note: we truncate outbound documents to DOC_SIZE_LIMIT characters
(to bound memory pressure and request size to elastic)
"""
import datetime
import json
import pathlib
from urllib.parse import unquote, unquote_plus
import boto3
import botocore
import nbformat... | 1 | 18,353 | Ideally, we'd fold the schema into an expanded system_meta, but this is a good first step. | quiltdata-quilt | py |
@@ -95,6 +95,7 @@ public class TableMetadataParser {
static final String SNAPSHOT_ID = "snapshot-id";
static final String TIMESTAMP_MS = "timestamp-ms";
static final String SNAPSHOT_LOG = "snapshot-log";
+ static final String FIELDS = "fields";
public static void overwrite(TableMetadata metadata, OutputF... | 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 | 15,746 | Is this used? | apache-iceberg | java |
@@ -16,7 +16,7 @@
using System;
using System.Diagnostics;
-#if NET45 || NET46
+#if NET452 || NET46
using System.Diagnostics.CodeAnalysis;
using System.Threading;
#endif | 1 | // <copyright file="PreciseTimestamp.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.apac... | 1 | 14,366 | Should we use `#if NETFRAMEWORK` for consistency with the other projects? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -46,7 +46,12 @@ type DecodedContainerRecord struct {
func (d *ContianerRecordDecoder) DecodeContainerRecord(ctx context.Context, record *v1alpha1.Record) (decoded DecodedContainerRecord, err error) {
var pod v1.Pod
- podId, containerName := controller.ParseNamespacedNameContainer(record.Id)
+ podId, containerNa... | 1 | // Copyright 2021 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 23,482 | If it parses failed, both of the `containerName` and `podId` should be the empty strings, it's non-sense to define this error, I suggest just return it. | chaos-mesh-chaos-mesh | go |
@@ -61,17 +61,6 @@ export default Service.extend({
}
},
- sendTestRequest(testApplicationId) {
- let url = `${API_URL}/photos/random`;
- let headers = {};
-
- headers.Authorization = `Client-ID ${testApplicationId}`;
- headers['Accept-Version'] = API_VERSION;
-
- re... | 1 | import Service from '@ember/service';
import fetch from 'fetch';
import {inject as injectService} from '@ember/service';
import {isEmpty} from '@ember/utils';
import {or} from '@ember/object/computed';
import {reject, resolve} from 'rsvp';
import {task, taskGroup, timeout} from 'ember-concurrency';
const API_URL = 'ht... | 1 | 8,618 | line 26 can be removed i think > applicationId: or('config.unsplashAPI.applicationId', 'settings.unsplash.applicationId'), | TryGhost-Admin | js |
@@ -340,9 +340,9 @@ void Config::CheckParamConflict() {
Log::Warning("CUDA currently requires double precision calculations.");
gpu_use_dp = true;
}
- // linear tree learner must be serial type and cpu device
+ // linear tree learner must be serial type and run on cpu device
if (linear_tree) {
- if... | 1 | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <LightGBM/config.h>
#include <LightGBM/cuda/vector_cudahost.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include ... | 1 | 27,541 | To generalize for possible future new enum options. | microsoft-LightGBM | cpp |
@@ -877,6 +877,9 @@ def main(argv):
from scapy.arch.windows import route_add_loopback
route_add_loopback()
+ # Add SCAPY_ROOT_DIR environment variable, used for tests
+ os.environ['SCAPY_ROOT_DIR'] = os.environ.get("PWD", os.getcwd())
+
except getopt.GetoptError as msg:
... | 1 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more informations
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
# flake8: noqa: E501
"""
Unit testing infrastructure for Scapy
"""
from __future__ import absolute_import
from __future__ i... | 1 | 13,431 | Shall we remove this variable at the end of UTScapy execution? | secdev-scapy | py |
@@ -29,6 +29,10 @@ public class ProtoModels {
/** Gets the interfaces for the apis in the service config. */
public static List<Interface> getInterfaces(Model model) {
+ if (model.getServiceConfig().getApisCount() == 0) {
+ // A valid service config was not given.
+ return model.getSymbolTable().ge... | 1 | /* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | 1 | 28,161 | What is this checking for? Why is returning the list of interfaces the correct behaviour in this case? | googleapis-gapic-generator | java |
@@ -20,6 +20,9 @@ namespace Nethermind.Blockchain
{
public interface ISyncConfig : IConfig
{
+ [ConfigItem(Description = "HMB Sync.", DefaultValue = "false")]
+ bool HmbSync { get; set; }
+
[ConfigItem(Description = "If set to 'true' then the Fast Sync (eth/63) synchronization ... | 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 | 22,880 | Please name it correctly as Beam ;) | NethermindEth-nethermind | .cs |
@@ -184,9 +184,9 @@ func shouldRetryWithWait(tripper http.RoundTripper, err error, multiplier int) b
apiErr, ok := err.(*googleapi.Error)
var retry bool
switch {
- case !ok && tkValid:
- // Not a googleapi.Error and the token is still valid.
- return false
+ case !ok:
+ // Not a googleapi.Error. Likely a trans... | 1 | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 9,456 | After chatting with Andrew, we think it's better to look for this particular error string that is causing issues ("connection reset by peer") instead of blindly retrying on any error we don't know about. | GoogleCloudPlatform-compute-image-tools | go |
@@ -25,14 +25,14 @@ namespace AutoRest.Swagger.Validation.Core
/// <summary>
/// What kind of open api document type this rule should be applied to
/// </summary>
- public virtual ServiceDefinitionDocumentType ServiceDefinitionDocumentType => ServiceDefinitionDocumentType.ARM;
+ ... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Collections.Generic;
using AutoRest.Core.Logging;
using AutoRest.Swagger.Model;
using System;
namespace AutoRest.Swagger.Validation.Core
{
/// ... | 1 | 25,104 | any reason to not have defaults here like you had before? (ARM)? | Azure-autorest | java |
@@ -1,4 +1,3 @@
-<% page_info = paginate_params(@response) %>
<%= tag :meta, :name => "totalResults", :content => @response.total %>
-<%= tag :meta, :name => "startIndex", :content => (page_info.current_page == 1 ? 1 : @response.start ) %>
-<%= tag :meta, :name => "itemsPerPage", :content => page_info.limit_value %>
+... | 1 | <% page_info = paginate_params(@response) %>
<%= tag :meta, :name => "totalResults", :content => @response.total %>
<%= tag :meta, :name => "startIndex", :content => (page_info.current_page == 1 ? 1 : @response.start ) %>
<%= tag :meta, :name => "itemsPerPage", :content => page_info.limit_value %>
| 1 | 4,602 | This is a change. The old code was just wrong before, but now here (and one other machine-readable place) we expose the start index as 0 for the first item. | projectblacklight-blacklight | rb |
@@ -178,11 +178,11 @@ namespace RDKit {
};
} // end of SLNParse namespace
- RWMol *SLNToMol(std::string sln,bool sanitize,int debugParse){
+ RWMol *SLNToMol(const std::string &sln,bool sanitize,int debugParse){
// FIX: figure out how to reset lexer state
yysln_debug = debugParse;
// strip a... | 1 | // $Id$
//
// Copyright (c) 2008, Novartis Institutes for BioMedical Research Inc.
// 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... | 1 | 14,181 | This changes the behavior of the parser, right? Any particular reason to do this aside from the fact that you have to since the function takes a const? | rdkit-rdkit | cpp |
@@ -17,5 +17,16 @@ function Portal(props) {
* @param {import('./internal').PreactElement} container The DOM node to continue rendering in to.
*/
export function createPortal(vnode, container) {
+ // Note: We can't use Fragment here because a component that returned a Portal
+ // (e.g. `const App = () => createPort... | 1 | import { createElement } from 'preact';
/**
* Portal component
* @this {import('./internal').Component}
* @param {object | null | undefined} props
*
* TODO: use createRoot() instead of fake root
*/
function Portal(props) {
return props.children;
}
/**
* Create a `Portal` to continue rendering the vnode tree a... | 1 | 16,850 | Given how simple the Portal implementation is, I wonder if we should move it core... Though we'd have to export it which would be more bytes we can't crawl back... | preactjs-preact | js |
@@ -348,6 +348,7 @@ Schema.prototype.clone = function() {
s.callQueue = this.callQueue.map(function(f) { return f; });
s.methods = utils.clone(this.methods);
s.statics = utils.clone(this.statics);
+ s.s.hooks = utils.clone(this.s.hooks);
return s;
};
| 1 | /*!
* Module dependencies.
*/
var readPref = require('./drivers').ReadPreference;
var EventEmitter = require('events').EventEmitter;
var VirtualType = require('./virtualtype');
var utils = require('./utils');
var MongooseTypes;
var Kareem = require('kareem');
var each = require('async/each');
var SchemaType = requir... | 1 | 13,441 | The more correct way of doing this is `this.s.hooks.clone()` but either way works. Thanks for finding this :+1: | Automattic-mongoose | js |
@@ -123,14 +123,13 @@ func (b *ClusterNetworkPolicySpecBuilder) GetAppliedToPeer(podSelector map[strin
func (b *ClusterNetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol,
port *int32, portName *string, endPort *int32, cidr *string,
podSelector map[string]string, nsSelector map[string]string,
- podSelectorMatc... | 1 | // Copyright 2020 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 42,368 | Can we update bool to an enum instead of a string? This helps future extensibility | antrea-io-antrea | go |
@@ -8,6 +8,13 @@ module Ncr
EXPENSE_TYPES = %w(BA60 BA61 BA80)
BUILDING_NUMBERS = YAML.load_file("#{Rails.root}/config/data/ncr/building_numbers.yml")
+ FY16 = Time.zone.parse('2015-10-01')
+ if Time.zone.now > FY16
+ MAX_AMOUNT = 3500.0
+ else
+ MAX_AMOUNT = 3000.0
+ end
+ MIN_AMOUNT = 0.0
clas... | 1 | require 'csv'
module Ncr
# Make sure all table names use 'ncr_XXX'
def self.table_name_prefix
'ncr_'
end
EXPENSE_TYPES = %w(BA60 BA61 BA80)
BUILDING_NUMBERS = YAML.load_file("#{Rails.root}/config/data/ncr/building_numbers.yml")
class WorkOrder < ActiveRecord::Base
include ValueHelper
include ... | 1 | 14,041 | Should we share, since this is also being used with gsa18f? | 18F-C2 | rb |
@@ -1835,7 +1835,7 @@ window.CrashgroupView = countlyView.extend({
// `d` is the original data object for the row
var str = '';
if (data) {
- str += '<div class="datatablesubrow">' +
+ str += '<div id="crash-data-subrow" class="datatablesubrow">' +
'<... | 1 | /*globals countlyView,_,countlyDeviceDetails,countlyDeviceList,marked,addDrill,extendViewWithFilter,hljs,production,countlyUserdata,moment,store,jQuery,countlySession,$,countlyGlobal,Handlebars,countlyCrashes,app,CountlyHelpers,CrashesView,CrashgroupView,countlySegmentation,countlyCommon */
window.CrashesView = countly... | 1 | 13,349 | There can be multiple subrows, so it is not a good idea to use `id` there, as id should identify single unique element. Instead you could just add the id of whole table or of whole crash plugin view | Countly-countly-server | js |
@@ -284,7 +284,6 @@ class TestAnalyze(unittest.TestCase):
# We expect a failure archive to be in the failed directory.
failed_files = os.listdir(failed_dir)
self.assertEquals(len(failed_files), 1)
- self.assertIn("failure.c", failed_files[0])
fail_zip = os.path.join(failed_d... | 1 | #
# -----------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------... | 1 | 11,178 | Why was this assert removed? Shouldn't we check if the file is in the zip? | Ericsson-codechecker | c |
@@ -149,13 +149,17 @@ func (cb *ControllerBuilder) Build() (*Controller, error) {
return cb.Controller, nil
}
-// addSpc is the add event handler for spc.
+// addSpc is the add event handler for spc
func (c *Controller) addSpc(obj interface{}) {
spc, ok := obj.(*apis.StoragePoolClaim)
if !ok {
runtime.Hand... | 1 | /*
Copyright 2017 The OpenEBS Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | 1 | 16,234 | This logic should be handled at informer handle functions i.e. AddFunc, UpdateFunc, DeleteFunc | openebs-maya | go |
@@ -39,3 +39,15 @@ type PSList struct {
func (c *PSList) Len() int {
return len(c.items)
}
+
+// IsStripePoolSpec returns true if pool spec is stripe pool or else it will
+// return false
+func IsStripePoolSpec(poolSpec *apisv1alpha1.PoolSpec) bool {
+ if len(poolSpec.RaidGroups[0].Type) != 0 {
+ if apisv1alpha1.P... | 1 | /*
Copyright 2019 The OpenEBS Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | 1 | 17,932 | S1008: should use 'return <expr>' instead of 'if <expr> { return <bool> }; return <bool>' (from `gosimple`) | openebs-maya | go |
@@ -22,9 +22,15 @@ import (
)
func TestProcessIssueEvent(t *testing.T) {
+ const (
+ defaultTitle = "foo: bar"
+ )
+
tests := []struct {
description string
action string
+ title string // defaults to defaultTitle
+ prevTitle string
labels []string
want *issueEdits
}{ | 1 | // Copyright 2018 The Go Cloud 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 applicable law or agr... | 1 | 11,078 | Just to remove branching, use `defaultTitle` explicitly in the test cases. (Is this gofmt'd?) | google-go-cloud | go |
@@ -64,7 +64,7 @@ public class CSharpGapicSnippetsTransformer implements ModelToViewTransformer<Pr
private final StaticLangApiMethodTransformer apiMethodTransformer =
new CSharpApiMethodTransformer();
private final CSharpCommonTransformer csharpCommonTransformer = new CSharpCommonTransformer();
- private ... | 1 | /* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | 1 | 28,025 | I don't think you use this variable anywhere. (You call `SampleTransformer.newBuilder()` below) | googleapis-gapic-generator | java |
@@ -54,6 +54,18 @@ char *chirp_wrap_whoami(const char *hostname, time_t stoptime)
return xxstrdup(id);
}
+char *chirp_wrap_hash(const char *hostname, const char *path, const char *algorithm, time_t stoptime) {
+ int result;
+ unsigned char digest[CHIRP_DIGEST_MAX];
+
+ result = chirp_reli_hash(hostname, path, algo... | 1 | #include "buffer.h"
#include "chirp_reli.h"
#include "chirp_types.h"
#include "xxmalloc.h"
static void accumulate_one_acl(const char *line, void *args)
{
buffer_t *B = (struct buffer *) args;
if(buffer_pos(B) > 0) {
buffer_printf(B, "\n");
}
buffer_putstring(B, line);
}
struct chirp_stat *chirp_wrap_stat(cons... | 1 | 12,150 | The digest is in binary and variable size (the digest size is result if > 0). So we can't use xxstrdup. | cooperative-computing-lab-cctools | c |
@@ -25,6 +25,9 @@ public interface Span extends AutoCloseable, TraceContext {
Span setAttribute(String key, Number value);
Span setAttribute(String key, String value);
+ Span addEvent(String name);
+ Span addEvent(String name, long timestamp);
+
Span setStatus(Status status);
@Override | 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 | 17,759 | We don't need this additional method. | SeleniumHQ-selenium | java |
@@ -44,4 +44,5 @@ type ClientConfig interface {
// have already been started.
GetUnaryOutbound() UnaryOutbound
GetOnewayOutbound() OnewayOutbound
+ GetStreamOutbound() StreamOutbound
} | 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 | 16,576 | We can't do this. Adding a method to an interface is a breaking change. This was an oversight on our part when we converted ClientConfig from a struct to an interface. OutboundConfig was introduced to fix this, the idea being that we should use OutboundConfig everywhere instead of ClientConfig. In case of Dispatcher, w... | yarpc-yarpc-go | go |
@@ -32,7 +32,9 @@ namespace domain {
DomainParticipant::DomainParticipant(
uint32_t did)
: dds::core::Reference<detail::DomainParticipant>(
- eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->create_participant(did))
+ eprosima::fastdds::dds::DomainParticipantFactory::get_in... | 1 | /*
* Copyright 2019, Proyectos y Sistemas de Mantenimiento SL (eProsima).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unles... | 1 | 18,620 | Why not using the constant `PARTICIPANT_QOS_DEFAULT` here? | eProsima-Fast-DDS | cpp |
@@ -29,7 +29,8 @@ from pkg_resources import resource_stream
def getScalarMetricWithTimeOfDayAnomalyParams(metricData,
minVal=None,
maxVal=None,
- minResolution=None):
+ ... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... | 1 | 20,909 | Shouldn't this be `tm_cpp` to match `temporalImp`? (There are multiple CPP implementations, so 'cpp' is ambiguous.) | numenta-nupic | py |
@@ -30,7 +30,18 @@ module RSpec
# @param line [String] current code line
# @return [String] relative path to line
def self.relative_path(line)
- line = line.sub(File.expand_path("."), ".")
+ # Matches strings either at the beginning of the input or prefixed with a whitespace,
+ ... | 1 | module RSpec
module Core
# Each ExampleGroup class and Example instance owns an instance of
# Metadata, which is Hash extended to support lazy evaluation of values
# associated with keys that may or may not be used by any example or group.
#
# In addition to metadata that is used internally, this ... | 1 | 14,070 | Need to remove this empty line for rubocop to be happy. | rspec-rspec-core | rb |
@@ -63,9 +63,9 @@ func newController(objects ...runtime.Object) (*fake.Clientset, *networkPolicyCo
addressGroupStore := store.NewAddressGroupStore()
internalNetworkPolicyStore := store.NewNetworkPolicyStore()
npController := NewNetworkPolicyController(client, informerFactory.Core().V1().Pods(), informerFactory.Co... | 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 | 15,534 | just checking: do we need to remove this because otherwise the `List` operations may not return the entire set of Pods / Namespaces? do you know why we used `alwaysReady` in the first place, I can't remember? | antrea-io-antrea | go |
@@ -439,10 +439,14 @@ function createTopology(mongoClient, topologyType, options, callback) {
}
const MongoClient = loadClient();
- const connectionString =
- os.platform() === 'win32'
- ? 'mongodb://localhost:27020/?serverSelectionTimeoutMS=1000'
- : 'mongodb://%2Ftmp%2Fmongocryptd.so... | 1 | 'use strict';
const deprecate = require('util').deprecate;
const Logger = require('../core').Logger;
const MongoError = require('../core').MongoError;
const Mongos = require('../topologies/mongos');
const parse = require('../core').parseConnectionString;
const ReadPreference = require('../core').ReadPreference;
const ... | 1 | 15,914 | maybe we can replace `mongoClient.s.options.autoEncryption.cryptdConnectionString` with `options.autoEncryption.cryptdConnectionString`? | mongodb-node-mongodb-native | js |
@@ -3719,9 +3719,11 @@ dr_create_client_thread(void (*func)(void *param), void *arg)
# endif
LOG(THREAD, LOG_ALL, 1, "dr_create_client_thread xsp=" PFX " dstack=" PFX "\n", xsp,
get_clone_record_dstack(crec));
+ os_clone_pre(dcontext);
thread_id_t newpid =
dynamorio_clone(flags, x... | 1 | /* *******************************************************************************
* Copyright (c) 2010-2019 Google, Inc. All rights reserved.
* Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* ****************************... | 1 | 16,430 | But we're already doing os_switch_lib_tls to app a few lines above, so there is now redundancy we should alleviate. | DynamoRIO-dynamorio | c |
@@ -52,10 +52,11 @@ namespace Datadog.Trace
/// <param name="parent">The parent context.</param>
/// <param name="traceContext">The trace context.</param>
/// <param name="serviceName">The service name to propagate to child spans.</param>
- internal SpanContext(ISpanContext parent, ITr... | 1 | using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Logging;
using Datadog.Trace.Util;
namespace Datadog.Trace
{
/// <summary>
/// The SpanContext contains all the information needed to express relationships between spans inside or outside the process boundaries.
/// </summary>
public class SpanC... | 1 | 18,713 | Under what circumstance would we have a span id already? Is this for testing purposes? | DataDog-dd-trace-dotnet | .cs |
@@ -2986,7 +2986,8 @@ static bool PreCallValidateQueueSubmit(layer_data *dev_data, VkQueue queue, uint
skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT,
HandleToUint64(semaphore), kVUID_Core_DrawStat... | 1 | /* Copyright (c) 2015-2018 The Khronos Group Inc.
* Copyright (c) 2015-2018 Valve Corporation
* Copyright (c) 2015-2018 LunarG, Inc.
* Copyright (C) 2015-2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... | 1 | 8,748 | The original text can be read to say "not waited on by queue ..." meaing that the second queue was supposed to have *waited* for the signal... which is especially confusing when it's the same queue that has signalled the semaphore *twice* without a wait. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -136,8 +136,8 @@ func (le *LookupEngine) Lookup(ctx context.Context, a types.Address) (peer.ID, e
case out := <-ch:
return out.(peer.ID), nil
case <-time.After(time.Second * 10):
- return "", fmt.Errorf("timed out waiting for response")
+ return "", fmt.Errorf("lookup timed out waiting for response")
case... | 1 | package lookup
import (
"context"
"encoding/json"
"fmt"
"sync"
"time"
logging "gx/ipfs/QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8/go-log"
floodsub "gx/ipfs/QmSFihvoND3eDaAYRCeLgLPt62yCPgMZs1NSZmKFEtJQQw/go-libp2p-floodsub"
peer "gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer"
pubsu... | 1 | 11,052 | just clarifying the error messages a bit. | filecoin-project-venus | go |
@@ -0,0 +1,18 @@
+// <copyright file="TelemetryRequestTypes.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.
+// </copyri... | 1 | 1 | 25,687 | Have those (and other data like conf...) shared across tracers? | DataDog-dd-trace-dotnet | .cs | |
@@ -0,0 +1,17 @@
+// +build !windows
+
+// Copyright 2020 Antrea Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+//... | 1 | 1 | 27,372 | could we add this file only when we need one? | antrea-io-antrea | go | |
@@ -37,4 +37,7 @@ type Context struct {
// ACMEHTTP01SolverImage is the image to use for solving ACME HTTP01
// challenges
ACMEHTTP01SolverImage string
+ // acmeDNS01ResolvConfFile is an optional custom resolv.conf file for
+ // solve ACME DNS01 challenges
+ ACMEDNS01ResolvConfFile string
} | 1 | package issuer
import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/record"
clientset "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
informers "github.com/jetstack/cert-manager/pkg/client/informers/externalversions"
kubeinformers "github.com/jetstack/cert-manager/third_party/k8s.io/c... | 1 | 11,176 | This may not even be needed. | jetstack-cert-manager | go |
@@ -70,6 +70,12 @@ var KnownFields = map[string]bool{
"Test.Flakiness": true,
"Test.Results": true, // Recall that unsuccessful test results aren't cached...
+ // Debug fields don't contribute to any hash
+ "Debug": true,
+ "Debug.Command": true,
+ "Debug.tools": true,
+ "Debug.namedTools": t... | 1 | // Test to make sure that every field in BuildTarget has been thought of
// in the rule hash calculation.
// Not every field necessarily needs to be hashed there (and indeed not
// all should be), this is just a guard against adding new fields and
// forgetting to update that function.
package build
import (
"fmt"
... | 1 | 10,203 | Capitalisation seems inconsistent here? | thought-machine-please | go |
@@ -1,7 +1,11 @@
-namespace Nevermind.Core
+using System;
+
+namespace Nevermind.Core
{
public interface ILogger
{
void Log(string text);
+ void Debug(string text);
+ void Error(string text, Exception ex = null);
}
} | 1 | namespace Nevermind.Core
{
public interface ILogger
{
void Log(string text);
}
} | 1 | 22,277 | maybe better Error(string text) and Error(Exception ex) separately? | NethermindEth-nethermind | .cs |
@@ -58,7 +58,7 @@ func matchingTools(config *core.Configuration, prefix string) map[string]string
"jarcat": config.Java.JarCatTool,
"javacworker": config.Java.JavacWorker,
"junitrunner": config.Java.JUnitRunner,
- "langserver": path.Join(config.Please.Location, "build_langserver"),
+ "lps": path.J... | 1 | // Package tool implements running Please's sub-tools (via "plz tool jarcat" etc).
//
// N.B. This is not how they are invoked during the build; that runs them directly.
// This is only a convenience thing at the command line.
package tool
import (
"os"
"path"
"strings"
"syscall"
"github.com/jessevdk/go-fla... | 1 | 8,684 | can you leave the old one in too please? at least for now, otherwise anyone using it now will break. | thought-machine-please | go |
@@ -3501,6 +3501,10 @@ void Player::onAttackedCreature(Creature* target)
{
Creature::onAttackedCreature(target);
+ if (target && target->getZone() == ZONE_PVP) {
+ return;
+ }
+
if (target == this) {
addInFightTicks();
return; | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2016 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 | 12,377 | Trailing tab, remove it in another PR. | otland-forgottenserver | cpp |
@@ -156,6 +156,9 @@ func (w *taskWriter) allocTaskIDs(count int) ([]int64, error) {
if w.taskIDBlock.start > w.taskIDBlock.end {
// we ran out of current allocation block
newBlock, err := w.tlMgr.allocTaskIDBlock(w.taskIDBlock.end)
+ if err != nil && w.tlMgr.errShouldUnload(err) {
+ w.tlMgr.signalFatalP... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 12,287 | what about merging the error checking logic to within `errShouldUnload`? | temporalio-temporal | go |
@@ -0,0 +1,6 @@
+class ArticlesController < ApplicationController
+ def index
+ @topic = Topic.find_by_slug(params[:id])
+ @articles = @topic.articles.by_published
+ end
+end | 1 | 1 | 6,444 | Probably want Topic.find_by_slug! to handle bogus topics. The next line will try to load articles off of nil otherwise. | thoughtbot-upcase | rb | |
@@ -34,6 +34,11 @@ public:
static constexpr std::int64_t column_count = 2;
static constexpr std::int64_t element_count = row_count * column_count;
+ bool not_available_on_device() {
+ constexpr bool is_svd = std::is_same_v<Method, pca::method::svd>;
+ return get_policy().is_gpu() && is_svd;... | 1 | /*******************************************************************************
* Copyright 2020-2021 Intel Corporation
*
* 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 | 27,196 | Should it really be done on test side? | oneapi-src-oneDAL | cpp |
@@ -350,7 +350,8 @@ func (mtask *managedTask) steadyState() bool {
}
}
-// cleanupCredentials removes credentials for a stopped task
+// cleanupCredentials removes credentials for a stopped task (execution credentials are removed in cleanupTask
+// due to its potential usage in the later phase of the task cleanup ... | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file acco... | 1 | 26,417 | Can we elaborate on why? I'm guessing because we need the execution role to call FE stopTask during `cleanupTask`, but would be good if we make it clear here. | aws-amazon-ecs-agent | go |
@@ -62,6 +62,10 @@ func newAgentCommand() *cobra.Command {
if err := opts.validate(args); err != nil {
klog.Fatalf("Failed to validate: %v", err)
}
+ // Not passing args again as they are already validated and are not used in flow exporter config
+ if err := opts.validateFlowExporterConfig(); err != ni... | 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 | 19,310 | is there a reason why this is not called from inside `validate`? | antrea-io-antrea | go |
@@ -46,7 +46,12 @@ type clientServer struct {
// New returns a client/server to bidirectionally communicate with the backend.
// The returned struct should have both 'Connect' and 'Serve' called upon it
// before being used.
-func New(url string, cfg *config.Config, credentialProvider *credentials.Credentials, stats... | 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... | 1 | 17,589 | :+1: I much prefer this style for functions with more than a few arguments. | aws-amazon-ecs-agent | go |
@@ -762,8 +762,7 @@ class CommandLine
}
}
}
-
- if (hasQualifiers)
+ else if (hasQualifiers)
{
sb.AppendLine().Append(" Actions:").AppendLine();
| 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics;
using System.Text;
using System.Collections.Generic;
using System.IO;
using ... | 1 | 10,739 | Are these mutually exclusive options (parameters vs qualifiers)? If parameters aren't supported, may want to consider throwing an exception for "hasParameters". If parameters and qualifiers are both legit options, then maybe change this to `if (hasQualifiers) { ... } if(!hasQualifiers && !hasParameters)` | dotnet-buildtools | .cs |
@@ -43,7 +43,6 @@ public class InvocationStartProcessingEventListener implements EventListener {
if (InvocationType.PRODUCER.equals(event.getInvocationType())) {
ProducerInvocationMonitor monitor = registryMonitor.getProducerInvocationMonitor(event.getOperationName());
monitor.getWaitInQueue().increm... | 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,790 | Why did you remove this line? | apache-servicecomb-java-chassis | java |
@@ -80,6 +80,7 @@ MSG(object_does_not_provide_read_access_to_columns,
MSG(object_does_not_provide_write_access_to_columns,
"Given object does not provide write access to columns")
MSG(unsupported_conversion_types, "Unsupported conversion types")
+MSG(invalid_indices, "Invalid indices")
/* Ranges */
MSG(inval... | 1 | /*******************************************************************************
* Copyright 2020-2021 Intel Corporation
*
* 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 | 28,586 | Very unclear error message. Remember that these are messages that your users see. Please be more specific | oneapi-src-oneDAL | cpp |
@@ -39,6 +39,12 @@ const (
DisablePublicIP = "DISABLED"
PublicSubnetsPlacement = "PublicSubnets"
PrivateSubnetsPlacement = "PrivateSubnets"
+
+ // RuntimePlatform configuration.
+ linuxOS = "LINUX"
+ // windowsCoreOS = "WINDOWS_SERVER_2019_CORE"
+ // windowsFullOS = "WINDOWS_SERVER_2019_FULL"
+ x86Arch =... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package template
import (
"bytes"
"fmt"
"text/template"
"github.com/google/uuid"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ecs"
)
// Constants for template paths.
const (
// ... | 1 | 18,788 | Can we add these when we need them | aws-copilot-cli | go |
@@ -460,12 +460,13 @@ class EDS extends DefaultRecord
*/
public function getPrimaryAuthors()
{
- return array_unique(
- $this->extractEbscoDataFromRecordInfo(
- 'BibRecord/BibRelationships/HasContributorRelationships/*/'
+ $authors = $this->extractEbscoDataFromRec... | 1 | <?php
/**
* Model for EDS records.
*
* PHP version 7
*
* Copyright (C) Villanova University 2010.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is dist... | 1 | 30,550 | I believe you can simplify this to simply `return array_unique(array_filter($authors));` -- the default behavior of array_filter is to filter out empty elements, so the callback should not be required in this situation. Do you mind giving it a try and updating the PR if it works? | vufind-org-vufind | php |
@@ -305,6 +305,10 @@ class UIAHandler(COMObject):
return
import NVDAObjects.UIA
obj=NVDAObjects.UIA.UIA(UIAElement=sender)
+ if not obj:
+ # Sometimes notification events can be fired on a UIAElement that has no windowHandle and does not connect through parents back to the desktop.
+ # There is nothing w... | 1 | #_UIAHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2011-2018 NV Access Limited, Joseph Lee, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
from ctypes import *
from ctypes.wintypes import *
import comtypes.client
from comtyp... | 1 | 22,294 | Would it make sense to log a debug warning here? | nvaccess-nvda | py |
@@ -35,14 +35,6 @@ var loginCmd = &cobra.Command{
os.Exit(1)
}
- if err := ks.SetDefault(addr); err != nil {
- cmd.Printf("Given address is not present into keystore.\r\nAvailable addresses:\r\n")
- for _, addr := range ks.List() {
- cmd.Println(addr.Address.Hex())
- }
- return
- }
-
... | 1 | package commands
import (
"os"
"github.com/ethereum/go-ethereum/crypto"
"github.com/sonm-io/core/accounts"
"github.com/sonm-io/core/util"
"github.com/spf13/cobra"
)
var loginCmd = &cobra.Command{
Use: "login [addr]",
Short: "Open or generate Ethereum keys",
Run: func(cmd *cobra.Command, args []string) {
... | 1 | 7,142 | "in the keystore", but nevermind | sonm-io-core | go |
@@ -337,7 +337,7 @@ void nano::network::republish_vote (std::shared_ptr<nano::vote> vote_a)
void nano::network::broadcast_confirm_req (std::shared_ptr<nano::block> block_a)
{
auto list (std::make_shared<std::vector<nano::peer_information>> (node.peers.representatives (std::numeric_limits<size_t>::max ())));
- if (l... | 1 | #include <nano/node/node.hpp>
#include <nano/lib/interface.h>
#include <nano/lib/utility.hpp>
#include <nano/node/common.hpp>
#include <nano/node/rpc.hpp>
#include <algorithm>
#include <cstdlib>
#include <future>
#include <sstream>
#include <boost/polymorphic_cast.hpp>
#include <boost/property_tree/json_parser.hpp>
... | 1 | 14,714 | This should be done in a separate PR. | nanocurrency-nano-node | cpp |
@@ -138,8 +138,9 @@ public class DropPartyPlugin extends Plugin
{
continue;
}
- if (Text.standardize(player.getName()).equalsIgnoreCase(playerName))
+ if (player.getName().equalsIgnoreCase(playerName))
{
+ log.error("found running player");
runningPlayer = player;
break;
} | 1 | /*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
*
* Modified by farhan1666
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain... | 1 | 15,768 | Rather than this maybe `Text.sanitize` would be better here | open-osrs-runelite | java |
@@ -82,7 +82,7 @@ public class NeighborsMsgSerializer : DiscoveryMsgSerializerBase, IMessageSerial
}
ReadOnlySpan<byte> id = ctx.DecodeByteArraySpan();
- return new Node(new PublicKey(id), address);
+ return new Node(new PublicKey(id), address, false);
});
... | 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,529 | lot of places setting default 'false' to static value - noise in PR | NethermindEth-nethermind | .cs |
@@ -361,11 +361,19 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
// Dispatch image processing event
$this->dispatcher->dispatch(TheliaEvents::IMAGE_PROCESS, $event);
+ $originalImageSize = getimagesize($sourceFilePath);
+
+ $im... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 11,593 | I think you should use `$event->getOriginalFileUrl()` instead of `$sourceFilePath` here. | thelia-thelia | php |
@@ -99,6 +99,7 @@ def run(inventory_index_id,
# pylint: disable=too-many-locals
global_configs = service_config.get_global_config()
notifier_configs = service_config.get_notifier_config()
+ api_quota_configs = notifier_configs.get('api_quota')
with service_config.scoped_session() as session:
... | 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 | 35,001 | nit: It's a matter of taste, but it would be tighter if this is called `api_quota`. | forseti-security-forseti-security | py |
@@ -16,9 +16,10 @@ package org.hyperledger.besu.ethereum.mainnet.precompiles;
import static org.assertj.core.api.Assertions.assertThat;
-import org.hyperledger.besu.ethereum.core.Gas;
-import org.hyperledger.besu.ethereum.vm.GasCalculator;
-import org.hyperledger.besu.ethereum.vm.MessageFrame;
+import org.hyperled... | 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,988 | I noticed in all of these we now have to import the PrecompiledContract under testing. Could also rename the package these are in s/precompiles/precompile to keep them in the same package as they are elsewhere. | hyperledger-besu | java |
@@ -288,7 +288,7 @@ class SnakebiteHdfsClient(HdfsClient):
client_kwargs = dict(filter(lambda (k, v): v is not None and v != '', {
'hadoop_version': self.config.getint("hdfs", "client_version", None),
'effective_user': self.config.get("hdfs", "effective_user", None)
- ... | 1 | # Copyright (c) 2012 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 1 | 10,490 | doubt this matters... | spotify-luigi | py |
@@ -36,6 +36,7 @@ from scapy.automaton import *
from scapy.autorun import *
from scapy.main import *
+from scapy.consts import *
from scapy.layers.all import *
| 1 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Aggregate top level objects from all Scapy modules.
"""
from scapy.base_classes import *
from scapy.config import *
... | 1 | 10,283 | Gets updated versions of `LOOPBACK_INTERFACE`, `LOOPBACK_NAME` when importing scapy. | secdev-scapy | py |
@@ -372,7 +372,7 @@ public class SparkTableUtil {
try {
PartitionSpec spec = SparkSchemaUtil.specForTable(spark, sourceTableIdentWithDB.unquotedString());
- if (spec == PartitionSpec.unpartitioned()) {
+ if (Objects.equal(spec, PartitionSpec.unpartitioned())) {
importUnpartitionedSparkT... | 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 | 38,577 | checking for ref. equality is probably fine here, but it takes a reader longer to navigate the code and figure out whether ref equality is really wanted here vs just using `equals()` | apache-iceberg | java |
@@ -60,12 +60,14 @@ type (
matchingClient matchingservice.MatchingServiceClient
config *configs.Config
searchAttributesProvider searchattribute.Provider
+ workflowDeleteManager workflow.DeleteManager
}
)
func newTransferQueueTaskExecutorBase(
shard shard.Context,
histo... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 13,825 | looks like it's not used? Do we plan to use it in the future? | temporalio-temporal | go |
@@ -34,8 +34,8 @@ import (
)
type (
- // Config supports common options that apply to statsd exporters.
- Config struct {
+ // Options supports common options that apply to statsd exporters.
+ Options struct {
// URL describes the destination for exporting statsd data.
// e.g., udp://host:port
// tcp... | 1 | // Copyright 2019, 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/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... | 1 | 10,856 | I think this is an unrelated remark. I thought we had moved toward the practice of using "Config" as the structure name, and Option as a functional argument (`func(*Config)`), and Options as a `[]Option`. See api/trace `StartConfig` and `StartOption`, for example. That's why I prefer this struct be called Config. | open-telemetry-opentelemetry-go | go |
@@ -2,7 +2,8 @@ import random
import string
from kinto.core.storage import generators, exceptions
-from pyramid import httpexceptions
+from pyramid.httpexceptions import (HTTPNotFound)
+from kinto.core.errors import http_error, ERRORS
class NameGenerator(generators.Generator): | 1 | import random
import string
from kinto.core.storage import generators, exceptions
from pyramid import httpexceptions
class NameGenerator(generators.Generator):
def __call__(self):
ascii_letters = ('abcdefghijklmopqrstuvwxyz'
'ABCDEFGHIJKLMOPQRSTUVWXYZ')
alphabet = ascii_l... | 1 | 9,979 | nitpick: superfluous parenthesis | Kinto-kinto | py |
@@ -219,6 +219,7 @@ namespace Datadog.Trace.ClrProfiler.Integrations
private static void DecorateSpan(Span span, GraphQLTags tags)
{
span.Type = SpanTypes.GraphQL;
+ span.SetMetric(Tags.Measured, 1);
}
private static Scope CreateScopeFromValidate(object docu... | 1 | using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Datadog.Trace.ClrProfiler.Emit;
using Datadog.Trace.ClrProfiler.Helpers;
using Datadog.Trace.Logging;
namespace Datadog.Trace.ClrProfiler.Integrations
{
/// <summary>
/// Tracing integration for GraphQL.Serve... | 1 | 18,463 | If, for a given integration, the tag/measure is always set, it should be added to the strongly-typed tags (here for instance, in GraphQLTags). This way, the underlying dictionary is allocated only in the rare case where users add custom tags | DataDog-dd-trace-dotnet | .cs |
@@ -243,12 +243,12 @@ func ExecuteContract(
if err := stateDB.CommitContracts(); err != nil {
return nil, nil, errors.Wrap(err, "failed to commit contracts to underlying db")
}
- stateDB.clear()
receipt.AddLogs(stateDB.Logs()...).AddTransactionLogs(depositLog, burnLog)
if receipt.Status == uint64(iotextypes.... | 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 | 24,666 | The position change of this line may be a hard fork. | iotexproject-iotex-core | go |
@@ -541,12 +541,7 @@ void Items::buildInventoryList()
void Items::parseItemNode(const pugi::xml_node& itemNode, uint16_t id)
{
- if (id > 30000 && id < 30100) {
- id -= 30000;
-
- if (id >= items.size()) {
- items.resize(id + 1);
- }
+ if (id > 0 && id < 100) {
ItemType& iType = items[id];
iType.id = id;... | 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 | 17,967 | id is unsigned | otland-forgottenserver | cpp |
@@ -13,6 +13,7 @@ Puppet::Functions.create_function(:run_command) do
# @param options A hash of additional options.
# @option options [Boolean] _catch_errors Whether to catch raised errors.
# @option options [String] _run_as User to run as using privilege escalation.
+ # @option options [Hash] _env_vars Map o... | 1 | # frozen_string_literal: true
require 'bolt/error'
# Runs a command on the given set of targets and returns the result from each command execution.
# This function does nothing if the list of targets is empty.
#
# > **Note:** Not available in apply block
Puppet::Functions.create_function(:run_command) do
# Run a co... | 1 | 15,232 | It looks like Puppet doesn't provide type validation for options and we don't provide it ourselves as part of the function. Is that something we'd want to do at some point? | puppetlabs-bolt | rb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.