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 |
|---|---|---|---|---|---|---|---|
@@ -26,7 +26,8 @@ import org.apache.iceberg.io.CloseableIterable;
class StaticTableScan extends BaseTableScan {
private final Function<StaticTableScan, DataTask> buildTask;
- StaticTableScan(TableOperations ops, Table table, Schema schema, Function<StaticTableScan, DataTask> buildTask) {
+ StaticTableScan(Table... | 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 | 37,769 | Looks like this didn't need to change. | apache-iceberg | java |
@@ -595,6 +595,10 @@ class PyLinter(config.OptionsManagerMixIn,
for msg_id in self._checker_messages('python3'):
if msg_id.startswith('E'):
self.enable(msg_id)
+ config_parser = self.cfgfile_parser
+ if config_parser.has_option('MESSAGES CONTROL',... | 1 | # Copyright (c) 2006-2015 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2011-2014 Google, Inc.
# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>
# Copyright (c) 2014-2016 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014-2015 Michal Nowikowski <godfryd@gmail.com>
# Copyright (c) 2015 M... | 1 | 9,697 | I don't understand why this is here and what's the intention with it? Can you elaborate what's the reasoning behind this change? | PyCQA-pylint | py |
@@ -25,13 +25,13 @@ package sqlplugin
import "database/sql"
type (
- // historyShard is the SQL persistence interface for history shards
- historyShard interface {
+ // HistoryShard is the SQL persistence interface for history shards
+ HistoryShard interface {
InsertIntoShards(rows *ShardsRow) (sql.Result, error... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limit... | 1 | 10,306 | I think @sergeybykov converted (wanted to convert) all `shardID` to `int32` from `int64`. Please check with him. | temporalio-temporal | go |
@@ -2289,7 +2289,8 @@ void ProtocolGame::sendCreatureHealth(const Creature* creature)
if (creature->isHealthHidden()) {
msg.addByte(0x00);
} else {
- msg.addByte(std::ceil((static_cast<double>(creature->getHealth()) / std::max<int32_t>(creature->getMaxHealth(), 1)) * 100));
+ int32_t maxHealth = std::max(creat... | 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,471 | This will only fix client side (so showing it in-game) server still gonna hold invalid values I guess? | otland-forgottenserver | cpp |
@@ -287,6 +287,18 @@ class Dataset(Element):
class to each underlying element.
"""
if isinstance(data, DynamicMap):
+ class_name = cls.__name__
+ repr_kdims = 'kdims=%r' % kdims if kdims else None
+ repr_vdims = 'vdims=%r' % vdims if vdims else None
+ ... | 1 | from __future__ import absolute_import
try:
import itertools.izip as zip
except ImportError:
pass
import types
import copy
import numpy as np
import param
from param.parameterized import add_metaclass, ParameterizedMetaclass
from .. import util
from ..accessors import Redim
from ..dimension import (
Dime... | 1 | 23,508 | Shouldn't this be `cls.param.warning`? | holoviz-holoviews | py |
@@ -54,7 +54,6 @@ module Selenium
it 'does not set the chrome.detach capability by default' do
Driver.new(http_client: http)
- expect(caps['goog:chromeOptions']).to eq({})
expect(caps['chrome.detach']).to be nil
end
| 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 | 15,563 | This spec can be modified, giving you extra strength (Check this fetch key doesn't work and therefore returns `nil`) | SeleniumHQ-selenium | rb |
@@ -107,9 +107,14 @@ class ServerConnectionMixin:
"""
address = self.server_conn.address
if address:
+ forbidden_hosts = ["localhost", "127.0.0.1", "::1"]
+
+ if self.config.options.listen_host:
+ forbidden_hosts.append(self.config.options.listen_host)
+
... | 1 | from mitmproxy import exceptions
from mitmproxy import connections
from mitmproxy import controller # noqa
from mitmproxy.proxy import config # noqa
class _LayerCodeCompletion:
"""
Dummy class that provides type hinting in PyCharm, which simplifies development a lot.
"""
def __init__(self, **mixin... | 1 | 15,153 | Could we not just always include `self.config.options.listen_host`? If that is empty, the `address[0]` check should also never be true. | mitmproxy-mitmproxy | py |
@@ -102,8 +102,8 @@ public class DataFilesTable extends BaseMetadataTable {
}
@Override
- protected long targetSplitSize(TableOperations ops) {
- return ops.current().propertyAsLong(
+ public long targetSplitSize() {
+ return tableOps().current().propertyAsLong(
TableProperties.ME... | 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 | 34,216 | Why not just access `ops` directly like before? | apache-iceberg | java |
@@ -389,17 +389,13 @@ void Creature::onRemoveTileItem(const Tile* tile, const Position& pos, const Ite
}
}
-void Creature::onCreatureAppear(Creature* creature, bool isLogin)
+void Creature::onCreatureAppear(Creature* creature, bool)
{
if (creature == this) {
if (useCacheMap()) {
isMapLoaded = true;
u... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2017 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 | 13,785 | Is there even a need to keep the bool? | otland-forgottenserver | cpp |
@@ -42,7 +42,7 @@ class HotgymRegressionTest(unittest.TestCase):
def testHotgymRegression(self):
experimentDir = os.path.join(
- os.path.dirname(__file__).partition("tests/integration/nupic/opf")[0],
+ os.path.dirname(__file__).partition(os.path.normpath("tests/integration/nupic/opf"))[0],
"e... | 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 | 19,975 | wrap to stay under 80 characters | numenta-nupic | py |
@@ -67,6 +67,7 @@ shared_ptr<Layer<Dtype> > GetConvolutionLayer(
#endif
} else {
LOG(FATAL) << "Layer " << param.name() << " has unknown engine.";
+ throw; // Avoids missing return warning
}
}
| 1 | // Make sure we include Python.h before any system header
// to avoid _POSIX_C_SOURCE redefinition
#ifdef WITH_PYTHON_LAYER
#include <boost/python.hpp>
#endif
#include <string>
#include "caffe/layer.hpp"
#include "caffe/layer_factory.hpp"
#include "caffe/layers/conv_layer.hpp"
#include "caffe/layers/lrn_layer.hpp"
#in... | 1 | 37,671 | `return NULL` is more clear than `throw` at least in my reading, and consistent with #3362. | BVLC-caffe | cpp |
@@ -87,8 +87,6 @@ class LocustIOExecutor(ScenarioExecutor, WidgetProvider, FileLister, HavingInsta
wrapper = os.path.join(get_full_path(__file__, step_up=2), "resources", "locustio-taurus-wrapper.py")
- self.env.add_path({"PYTHONPATH": self.engine.artifacts_dir})
- self.env.add_path({"PYTHONP... | 1 | """
Module holds all stuff regarding Locust tool usage
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required... | 1 | 15,067 | Both of these are important. Without it, locust won't find my libraries in the cloud. | Blazemeter-taurus | py |
@@ -87,7 +87,7 @@ func (o *listSvcOpts) Execute() error {
return fmt.Errorf("get application: %w", err)
}
- svcs, err := o.store.ListServices(o.appName)
+ svcs, err := o.store.ListWorkloads(o.appName)
if err != nil {
return err
} | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"encoding/json"
"fmt"
"io"
"math"
"os"
"strings"
"text/tabwriter"
"github.com/aws/copilot-cli/internal/pkg/config"
"github.com/aws/copilot-cli/internal/pkg/term/prompt"
"github.... | 1 | 15,127 | This should remain as `ListServices` | aws-copilot-cli | go |
@@ -0,0 +1,2 @@
+package v2
+ | 1 | 1 | 20,490 | If no tests, remove this file. | kubeedge-kubeedge | go | |
@@ -116,7 +116,7 @@ cp bin/protoc /usr/local/bin/protoc
if SHOULD_INVENTORY_GROUPS:
GROUPS_DOMAIN_SUPER_ADMIN_EMAIL = context.properties[
'groups-domain-super-admin-email']
- GROUPS_SERVICE_ACCOUNT_KEY_FILE = context.properties[
+ GSUITE_SERVICE_ACCOUNT_KEY_FILE = context.proper... | 1 | # Copyright 2017 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 writing, s... | 1 | 26,618 | This will require changes to the docs. I suggest searching the gh-pages branch for the previous variable name. | forseti-security-forseti-security | py |
@@ -249,7 +249,7 @@ class RemoteHandler(logging.Handler):
def __init__(self):
#Load nvdaHelperRemote.dll but with an altered search path so it can pick up other dlls in lib
- path=os.path.abspath(os.path.join(u"lib",buildVersion.version,u"nvdaHelperRemote.dll"))
+ path = os.path.join(globalVars.appDir, "lib", ... | 1 | # A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2007-2020 NV Access Limited, Rui Batista, Joseph Lee, Leonard de Ruijter, Babbage B.V.,
# Accessolutions, Julien Cochuyt
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
"""Utilities and classes to manag... | 1 | 30,804 | `RemoteHandler` is used in nvda_slave and slave does not have access to `globalVars` currently. Perhaps `globalVars.appDir` should be set to `None` in `globalVarrs by default and set to NVDA directory when they're imported for the first time. | nvaccess-nvda | py |
@@ -12,10 +12,11 @@ type MetricsConfig struct {
}
type FileConfig struct {
- Prometheus *PrometheusConfig `hcl:"Prometheus"`
- DogStatsd []DogStatsdConfig `hcl:"DogStatsd"`
- Statsd []StatsdConfig `hcl:"Statsd"`
- M3 []M3Config `hcl:"M3"`
+ Prometheus *PrometheusConfig `hcl:"Prometheus"`
+ ... | 1 | package telemetry
import (
"github.com/sirupsen/logrus"
)
type MetricsConfig struct {
FileConfig FileConfig
Logger logrus.FieldLogger
ServiceName string
Sinks []Sink
}
type FileConfig struct {
Prometheus *PrometheusConfig `hcl:"Prometheus"`
DogStatsd []DogStatsdConfig `hcl:"DogStatsd"`
Statsd ... | 1 | 12,312 | In case there is more configuration to be added to the "inmem" metrics later (however unlikely that is), we may want to play it safe and create an `InMemConfig` struct and include the disabled flag there. This also gives the config symmetry across the plugins. | spiffe-spire | go |
@@ -35,6 +35,16 @@ describe ProposalSearch do
end
context Gsa18f::Procurement do
+ around(:each) do |example|
+ ENV['GSA18F_APPROVER_EMAIL'] = 'test_approver@some-dot-gov.gov'
+ ENV['GSA18F_PURCHASER_EMAIL'] = 'test_purchaser@some-dot-gov.gov'
+ example.run
+
+ ENV['GSA18F_A... | 1 | describe ProposalSearch do
describe '#execute' do
it "returns an empty list for no Proposals" do
results = ProposalSearch.new.execute('')
expect(results).to eq([])
end
it "returns the Proposal when searching by ID" do
proposal = FactoryGirl.create(:proposal)
results = ProposalSear... | 1 | 13,213 | I'll need to pull this out of here since we're sharing this in other tests. Same for `procurement_spec.rb` | 18F-C2 | rb |
@@ -6,7 +6,7 @@ class ObservationsController < ApplicationController
def create
obs = @proposal.add_observer(observer_email, current_user, params[:observation][:reason])
- flash[:success] = "#{obs.user.full_name} has been added as an observer"
+ prep_create_response_msg(obs)
redirect_to proposal_pa... | 1 | class ObservationsController < ApplicationController
before_action :authenticate_user!
before_action :find_proposal
before_action -> { authorize self.observation_for_auth }
rescue_from Pundit::NotAuthorizedError, with: :auth_errors
def create
obs = @proposal.add_observer(observer_email, current_user, par... | 1 | 15,327 | what about `observer` as a var name here (and below) rather than `obs` ? -- would be clearer, imo! | 18F-C2 | rb |
@@ -110,7 +110,7 @@ class ErrorHandler(object):
value = message
try:
message = message['message']
- except TypeError:
+ except KeyError:
messa... | 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 14,479 | could you change this to instead of being a `try.. except` be `message = message.get('message')` | SeleniumHQ-selenium | js |
@@ -1,4 +1,5 @@
-// Copyright (c) Microsoft. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities
{
using Syste... | 1 | // Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities
{
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestPlatform.... | 1 | 11,395 | Add space between License and nameapace | microsoft-vstest | .cs |
@@ -0,0 +1,15 @@
+class ProfileController < ApplicationController
+ def show
+ end
+
+ def update
+ first_name = params[:first_name]
+ last_name = params[:last_name]
+ user = current_user
+ user.first_name = first_name
+ user.last_name = last_name
+ user.save!
+ flash[:success] = "Your profile i... | 1 | 1 | 15,461 | should we have a `before_filter` for auth here? | 18F-C2 | rb | |
@@ -575,6 +575,17 @@ func (r *AWSMachineReconciler) reconcileLBAttachment(machineScope *scope.Machine
// In order to prevent sending request to a "not-ready" control plane machines, it is required to remove the machine
// from the ELB as soon as the machine gets deleted or when the machine is in a not running state... | 1 | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 15,282 | @vincepri I know we discussed moving this up and only calling it once, but I didn't (quickly) see an easy way to generate the right event based on the appropriate action (attach vs detach). Happy to move it around if you have suggestions. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -0,0 +1,15 @@
+class TsearchHooks
+ def after_save(record)
+ record.class.where(id: record).update_all(
+ "vector = #{ vector(record) }, popularity_factor = #{ record.searchable_factor }")
+ end
+
+ def vector(record)
+ weighted_sql = []
+ record.searchable_vector.each do |weight, attr_value|
+ ... | 1 | 1 | 6,808 | Can we use record.update here? | blackducksoftware-ohloh-ui | rb | |
@@ -243,7 +243,7 @@ func (rw *responseWriter) Close() error {
retErr = appendError(retErr, fmt.Errorf("SetApplicationError() failed: %v", err))
}
}
- retErr = appendError(retErr, writeHeaders(rw.format, rw.headers, rw.response.Arg2Writer))
+ retErr = appendError(retErr, writeHeaders(rw.format, rw.headers.Items... | 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,189 | Shouldn't the exact case option matter here? | yarpc-yarpc-go | go |
@@ -184,7 +184,7 @@ def Derived(parent_cls):
n = luigi.IntParameter()
# ...
- class MyTask(luigi.uti.Derived(AnotherTask)):
+ class MyTask(luigi.util.Derived(AnotherTask)):
def requires(self):
return self.parent_obj
def run(self): | 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,072 | Errr, why haven't we noticed this until now? | spotify-luigi | py |
@@ -456,7 +456,11 @@ public final class Lucene50PostingsFormat extends PostingsFormat {
@Override
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException {
PostingsWriterBase postingsWriter = new Lucene50PostingsWriter(state);
- state.segmentInfo.putAttribute(MODE_KEY, fstLoadMode... | 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 | 28,923 | It's a little spooky that this method throws exception if you try to set the attribute to a different value than it was set before, but then does leave the new value set in the attributes? | apache-lucene-solr | java |
@@ -48,7 +48,7 @@ public class PodDBAdapter {
private static final String TAG = "PodDBAdapter";
public static final String DATABASE_NAME = "Antennapod.db";
- public static final int VERSION = 1090000;
+ public static final int VERSION = 1091000;
/**
* Maximum number of arguments for IN-op... | 1 | package de.danoeh.antennapod.core.storage;
import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.DatabaseErrorHandler;
import android.database.DatabaseUtils;
import android.database.DefaultDatabaseErrorHandl... | 1 | 15,927 | Please only increment by 1. | AntennaPod-AntennaPod | java |
@@ -348,7 +348,7 @@ namespace Microsoft.Rest.Generator.Java
else if (primaryType == PrimaryType.TimeSpan ||
primaryType.Name == "Period")
{
- return "java.time.Period";
+ return "org.joda.time.Period";
}
else
... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.Rest.Generat... | 1 | 21,149 | Sorry I might have missed some context, but what's the reason you choose `Period` over `Duration` or `Interval`? (Thumbs up for using `org.joda.time` instead!) | Azure-autorest | java |
@@ -2359,6 +2359,19 @@ DefaultSettings.prototype = {
*/
preventOverflow: false,
+ /**
+ * Prevents wheel event on overlays for doing default action.
+ *
+ * @type {Boolean}
+ * @default false
+ *
+ * @example
+ * ```js
+ * preventWheel: false,
+ * ```
+ */
+ preventWheel: false,
+
/**
... | 1 | import { isDefined } from './helpers/mixed';
import { isObjectEqual } from './helpers/object';
/**
* @alias Options
* @constructor
* @description
* ## Constructor options
*
* Constructor options are applied using an object literal passed as a second argument to the Handsontable constructor.
*
* ```js
* const... | 1 | 15,444 | Please check if is it possible to mark it as private. What's more please add this to the TypeScript definition file. | handsontable-handsontable | js |
@@ -28,6 +28,10 @@ static std::string GeneratedFileName(const std::string &path,
return path + file_name + "_generated.h";
}
+char ToUpper(char c) {
+ return static_cast<char>(::toupper(c));
+}
+
namespace cpp {
class CppGenerator : public BaseGenerator {
public: | 1 | /*
* Copyright 2014 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 applica... | 1 | 11,580 | Maybe move this to `util.h` ? | google-flatbuffers | java |
@@ -4,7 +4,8 @@
package Example
-import "github.com/google/flatbuffers/go"
+#include "flatbuffers/grpc.h"
+
import (
context "golang.org/x/net/context" | 1 | //Generated by gRPC Go plugin
//If you make any local changes, they will be lost
//source: monster_test
package Example
import "github.com/google/flatbuffers/go"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Client API for MonsterStorage service
type MonsterStorageClient interfa... | 1 | 11,736 | oops. this won't work will it | google-flatbuffers | java |
@@ -208,12 +208,16 @@ func (extra ExtraMetadataV3) IsReaderKeyBundleNew() bool {
// must be done separately.
func MakeInitialRootMetadataV3(tlfID tlf.ID, h tlf.Handle) (
*RootMetadataV3, error) {
- if tlfID.Type() != h.Type() {
+ switch {
+ case h.TypeForKeying() == tlf.TeamKeying && tlfID.Type() != tlf.SingleTeam:... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package kbfsmd
import (
"fmt"
"runtime"
goerrors "github.com/go-errors/errors"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/go-codec/codec... | 1 | 18,464 | @strib I assumed this is what you meant; but let me know if I'm wrong! | keybase-kbfs | go |
@@ -106,7 +106,7 @@ func (wh *WorkflowNilCheckHandler) DeprecateNamespace(ctx context.Context, reque
// StartWorkflowExecution starts a new long running workflow instance. It will create the instance with
// 'WorkflowExecutionStarted' event in history and also schedule the first WorkflowTask for the worker to make... | 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 | 9,834 | I believe the error has changed | temporalio-temporal | go |
@@ -41,6 +41,16 @@ module Blacklight
self.class.new(params || ActionController::Parameters.new, blacklight_config, controller)
end
+ ##
+ # Check if the query has any constraints defined (a query, facet, etc)
+ #
+ # @return [Boolean]
+ # rubocop:disable Style/PredicateName
+ def has_con... | 1 | # frozen_string_literal: true
module Blacklight
# This class encapsulates the search state as represented by the query
# parameters namely: :f, :q, :page, :per_page and, :sort
class SearchState
attr_reader :blacklight_config # Must be called blacklight_config, because Blacklight::Facet calls blacklight_config... | 1 | 6,900 | Lint/UnneededDisable: Unnecessary disabling of Naming/PredicateName. | projectblacklight-blacklight | rb |
@@ -58,6 +58,8 @@ describe ProposalsController do
end
it 'should redirect random users' do
+ skip "flaky spec"
+
proposal = FactoryGirl.create(:proposal)
get :show, id: proposal.id
expect(response).to redirect_to(proposals_path) | 1 | describe ProposalsController do
include ReturnToHelper
let(:user) { FactoryGirl.create(:user) }
describe '#index' do
before do
login_as(user)
end
it 'sets data fields' do
proposal1 = FactoryGirl.create(:proposal, requester: user)
proposal2 = FactoryGirl.create(:proposal)
prop... | 1 | 13,757 | Should this be removed now? | 18F-C2 | rb |
@@ -25,6 +25,8 @@ public abstract class MockGrpcMethodView {
public abstract String responseTypeName();
+ public abstract String streamHandle();
+
public abstract GrpcStreamingType grpcStreamingType();
public static Builder newBuilder() { | 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 | 19,287 | streamHandle sounds vague to me. Can you be more specific? | googleapis-gapic-generator | java |
@@ -736,7 +736,8 @@ Cursor.prototype._initializeCursor = function(callback) {
return;
}
- server.command(cursor.ns, cursor.cmd, cursor.options, queryCallback);
+ const commandOptions = Object.assign({}, cursor.options, cursor.cursorState);
+ server.command(cursor.ns, cursor.cmd, commandOptions, q... | 1 | 'use strict';
const Logger = require('./connection/logger');
const retrieveBSON = require('./connection/utils').retrieveBSON;
const MongoError = require('./error').MongoError;
const MongoNetworkError = require('./error').MongoNetworkError;
const mongoErrorContextSymbol = require('./error').mongoErrorContextSymbol;
con... | 1 | 16,020 | Does everything on cursorState belong in the command options? | mongodb-node-mongodb-native | js |
@@ -559,7 +559,7 @@ func (m *MatchNot) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
for d.Next() {
var mp matcherPair
matcherMap := make(map[string]RequestMatcher)
- for d.NextBlock(0) {
+ for d.NextArg() || d.NextBlock(0) {
matcherName := d.Val()
mod, err := caddy.GetModule("http.matchers." + m... | 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 | 14,614 | This is clever, but I do admit I think it's kinda weird. We can go with it for now and fix it later if people complain. | caddyserver-caddy | go |
@@ -31,7 +31,9 @@ import (
)
var (
- gsRegex = regexp.MustCompile(`^gs://([a-z0-9][-_.a-z0-9]*)/(.+)$`)
+ bucket = `([a-z0-9][-_.a-z0-9]*)`
+ bucketRegex = regexp.MustCompile(fmt.Sprintf(`^gs://%s/?$`, bucket))
+ gsRegex = regexp.MustCompile(fmt.Sprintf(`^gs://%s/(.+)$`, bucket))
)
// StorageClient implements d... | 1 | // Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 8,739 | the variable names are not entirely clear. "bucket" is essentially the regex that follows gcs naming pattern, right? if so, it should be changed to bucketregex. and then bucketregex, gsregex should be changed to something more specific to what pattern the regex is supposed to match. | GoogleCloudPlatform-compute-image-tools | go |
@@ -26,8 +26,8 @@ import com.google.common.collect.Lists;
import java.util.List;
/** Responsible for producing package meta-data related views for Java GAPIC clients */
-public class JavaGapicPackageTransformer extends JavaPackageTransformer
- implements ModelToViewTransformer {
+public class JavaGapicPackageTra... | 1 | /* Copyright 2017 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 | 25,666 | I think `ApiModelT` would be clearer than `T` | googleapis-gapic-generator | java |
@@ -1,6 +1,5 @@
-// $Id$
//
-// Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
+// Copyright (C) 2004-2016 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit. | 1 | // $Id$
//
// Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include "Ri... | 1 | 19,518 | Shouldn't this be 2019? | rdkit-rdkit | cpp |
@@ -30,6 +30,8 @@ public enum Status {
SUCCEEDED(50),
KILLING(55),
KILLED(60),
+ // POD_FAILED refers to a failed containerized flow due to pod failure
+ POD_FAILED(65),
FAILED(70),
FAILED_FINISHING(80),
SKIPPED(90), | 1 | /*
* Copyright 2014 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 22,150 | We should consider giving this state a more generic name which could be used for flows in similar state in non-containerized Azkban. For instance in the event of a bare-metal executor crashing we could the switch any flows assigned to that executor to this state. Something like `EXECUTE_INFRA_FAILED`, better alternativ... | azkaban-azkaban | java |
@@ -4,8 +4,12 @@ var bad = [],
virtualNode.children.forEach(({ actualNode }) => {
var nodeName = actualNode.nodeName.toUpperCase();
- if (actualNode.nodeType === 1 && nodeName !== 'DT' && nodeName !== 'DD' && permitted.indexOf(nodeName) === -1) {
- bad.push(actualNode);
+
+ if (actualNode.nodeType === 1 && permit... | 1 | var bad = [],
permitted = ['STYLE', 'META', 'LINK', 'MAP', 'AREA', 'SCRIPT', 'DATALIST', 'TEMPLATE'],
hasNonEmptyTextNode = false;
virtualNode.children.forEach(({ actualNode }) => {
var nodeName = actualNode.nodeName.toUpperCase();
if (actualNode.nodeType === 1 && nodeName !== 'DT' && nodeName !== 'DD' && permitte... | 1 | 11,593 | This should allow `role=definition` and `role=term`, possibly also `role=list`? | dequelabs-axe-core | js |
@@ -511,6 +511,19 @@ public class Spark3Util {
TableProperties.PARQUET_BATCH_SIZE, TableProperties.PARQUET_BATCH_SIZE_DEFAULT));
}
+ public static Boolean propertyAsBoolean(CaseInsensitiveStringMap options, String property, Boolean defaultValue) {
+ if (defaultValue != null) {
+ return option... | 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 | 34,219 | Should this use `boolean` instead of `Boolean`? | apache-iceberg | java |
@@ -135,7 +135,6 @@ namespace OpenTelemetry.Exporter.Zipkin.Tests
[Theory]
[InlineData(true, false, false)]
[InlineData(false, false, false)]
- [InlineData(false, true, false)]
[InlineData(false, false, true)]
[InlineData(false, false, false, StatusCode.Ok)]
... | 1 | // <copyright file="ZipkinExporterTests.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.ap... | 1 | 18,688 | Currently in our Zipkin tests, only one passed parameter would instantiate a Resource and checks for its tags populating. I left the If(UseTestResource) clause in the code in case we would like to return to the old resource tag checking, but if it makes more sense I can remove that parameter entirely. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -944,6 +944,11 @@ public class ZkStateReader implements SolrCloseable {
return null;
}
+ public boolean isNodeLive(String node) {
+ return liveNodes.contains(node);
+
+ }
+
/**
* Get shard leader properties, with retry if none exist.
*/ | 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 | 31,382 | While this is potentially convenient it seems off topic for the PR/Issue. Also if it is kept, in the realm of taste/style I tend to not use get/set/is for things that are not properties of the object. maybe hasLiveNode(String node) thus someone using it might write `if (zkReader.hasLiveNode("foo")) ...` which reads qui... | apache-lucene-solr | java |
@@ -10,11 +10,13 @@ import (
)
var (
- svidPath = path.Join(ProjectRoot(), "test/fixture/certs/svid.pem")
- svidKeyPath = path.Join(ProjectRoot(), "test/fixture/certs/svid_key.pem")
- caPath = path.Join(ProjectRoot(), "test/fixture/certs/ca.pem")
- caKeyPath = path.Join(ProjectRoot(), "test/fixture/certs/... | 1 | package util
import (
"crypto/ecdsa"
"crypto/x509"
"encoding/pem"
"fmt"
"io/ioutil"
"path"
)
var (
svidPath = path.Join(ProjectRoot(), "test/fixture/certs/svid.pem")
svidKeyPath = path.Join(ProjectRoot(), "test/fixture/certs/svid_key.pem")
caPath = path.Join(ProjectRoot(), "test/fixture/certs/ca.pem"... | 1 | 9,299 | What's the difference between blogSvid and the SVID above? Looks like the functions that use these aren't being called currently - can they be removed? | spiffe-spire | go |
@@ -67,7 +67,7 @@ namespace Nethermind.Serialization.Json
return (long) reader.Value;
}
- string s = (string) reader.Value;
+ string s = reader.Value?.ToString();
if (s == "0x0")
{
return BigInteger.Zero; | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 24,601 | can you add numbers with this change? the CLI is a javascript engine and it can worh number - java adds strings vi concatenation | NethermindEth-nethermind | .cs |
@@ -116,6 +116,8 @@ class OrderDirective
// Note the `lower()` in the `addOrderBy()`. It is essential to sorting the
// results correctly. See also https://github.com/bolt/core/issues/1190
// again: lower breaks postgresql jsonb compatibility, first cast as txt
+ ... | 1 | <?php
declare(strict_types=1);
namespace Bolt\Storage\Directive;
use Bolt\Doctrine\Version;
use Bolt\Entity\Field\NumberField;
use Bolt\Storage\QueryInterface;
use Bolt\Twig\Notifications;
use Bolt\Utils\ContentHelper;
use Bolt\Utils\LocaleHelper;
use Twig\Environment;
/**
* Directive to alter query based on 'ord... | 1 | 12,630 | Shouldn't this `TEXT` also be dependent on the platform, then? | bolt-core | php |
@@ -17,6 +17,15 @@ type Typer interface {
Type() semantic.MonoType
}
+// ITableObject serves as sort of a "marker trait" to allow us to check if a
+// value is a TableObject without having to import TableObject which would be a
+// cyclical import.
+// Identical purpose to the interface in the interpreter package,... | 1 | // Package values declares the flux data types and implements them.
package values
import (
"bytes"
"fmt"
"regexp"
"runtime/debug"
"strconv"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/internal/errors"
"github.com/influxdata/flux/semantic"
)
type Typer interface {
Type() semantic.MonoType... | 1 | 17,564 | Can we name this `TableObject`? I'm not a big fan of the `I` prefix for interfaces and that's not really used in Go. Is it also possible to have the method be unexported? I don't know if that's possible. If it's not, this is good. If it is possible, I'd prefer this method to be unexported. | influxdata-flux | go |
@@ -31,11 +31,15 @@
#include <stdlib.h> // malloc and free
#include <tbb/tbb.h>
#include <tbb/spin_mutex.h>
- #include "tbb/scalable_allocator.h"
+ #include <tbb/scalable_allocator.h>
#include <tbb/global_control.h>
#include <tbb/task_arena.h>
#include "services/daal_atomic_int.h"
... | 1 | /* file: threading.cpp */
/*******************************************************************************
* Copyright 2014-2020 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... | 1 | 22,869 | If tbb.h is included, there is no big sense to include other TBB headers. | oneapi-src-oneDAL | cpp |
@@ -915,12 +915,9 @@ def uses_path_addressing(headers):
def get_bucket_name(path, headers):
parsed = urlparse.urlparse(path)
- # try pick the bucket_name from the path
- bucket_name = parsed.path.split('/')[1]
-
- # is the hostname not starting with a bucket name?
- if uses_path_addressing(headers):... | 1 | import time
import re
import json
import uuid
import base64
import codecs
import random
import logging
import datetime
import xmltodict
import collections
import dateutil.parser
import urllib.parse
import six
import botocore.config
from pytz import timezone
from urllib.parse import parse_qs
from botocore.compat import ... | 1 | 12,180 | Let's use the same `S3_HOSTNAME_PATTERN` as above here. | localstack-localstack | py |
@@ -215,6 +215,7 @@ function parseConnectionString(url, options) {
let r = parser.parse(f('mongodb://%s', hosts[i].trim()));
if (r.path && r.path.indexOf('.sock') !== -1) continue;
if (r.path && r.path.indexOf(':') !== -1) {
+ console.log("R: ",r)
// Not connecting to a socket so check for an... | 1 | 'use strict';
const ReadPreference = require('./core').ReadPreference,
parser = require('url'),
f = require('util').format,
Logger = require('./core').Logger,
dns = require('dns');
const ReadConcern = require('./read_concern');
module.exports = function(url, options, callback) {
if (typeof options === 'func... | 1 | 16,347 | This shouldn't be here. | mongodb-node-mongodb-native | js |
@@ -24,11 +24,16 @@ module ValueHelper
end
def property_to_s(val)
- # assume all decimals are currency
- if decimal?(val)
+ if decimal?(val) # assume all decimals are currency
number_to_currency(val)
+ elsif val.is_a?(ActiveSupport::TimeWithZone)
+ I18n.l(val, format: :date)
+ elsif v... | 1 | module ValueHelper
include ActionView::Helpers::NumberHelper
def date_with_tooltip(time, ago = false)
# make sure we are dealing with a Time object
unless time.is_a?(Time)
time = Time.zone.parse(time.to_s)
end
# timezone adjustment is handled via browser-timezone-rails gem
# so coerce in... | 1 | 16,978 | A `case` statement may be simpler here. | 18F-C2 | rb |
@@ -1081,10 +1081,15 @@ public class JDBCConnection implements ObjectStoreConnection {
throw notFoundError(caller, ZMSConsts.OBJECT_DOMAIN, domainName);
}
int curTagCount = getDomainTagsCount(domainId);
- int remainingTagsToInsert = domainTagsLimit - curTagCount;
+ int newTa... | 1 | /*
* Copyright 2016 Yahoo 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 | 5,644 | why are we adding the current tag count to new tag count ? | AthenZ-athenz | java |
@@ -12,7 +12,7 @@ func (c *ServerConfig) SetServerMode(port int, network, netmask string) {
func (c *ServerConfig) SetTLSServer() {
c.setFlag("tls-server")
- c.AddOptions(OptionFile("dh", "none"))
+ c.AddOptions(OptionFile("dh", "none", "none"))
}
func (c *ServerConfig) SetProtocol(protocol string) { | 1 | package openvpn
type ServerConfig struct {
*Config
}
func (c *ServerConfig) SetServerMode(port int, network, netmask string) {
c.SetPort(port)
c.setParam("server", network+" "+netmask)
c.setParam("topology", "subnet")
}
func (c *ServerConfig) SetTLSServer() {
c.setFlag("tls-server")
c.AddOptions(OptionFile("dh... | 1 | 11,024 | Are you writing "none" to file content? no good | mysteriumnetwork-node | go |
@@ -21,10 +21,10 @@ class SnippetWidget extends BaseWidget
string $target = Target::NOWHERE,
string $zone = RequestZone::NOWHERE
) {
- $this->template = $snippet;
- $this->name = $name;
- $this->target = $target;
- $this->zone = $zone;
+ $this->setTemplate($snip... | 1 | <?php
declare(strict_types=1);
namespace Bolt\Widget;
use Bolt\Widget\Injector\RequestZone;
use Bolt\Widget\Injector\Target;
class SnippetWidget extends BaseWidget
{
protected $name;
protected $type;
protected $target;
protected $zone;
protected $priority;
public function __construct(
... | 1 | 12,710 | Should we allow `string|string[]` here? | bolt-core | php |
@@ -546,7 +546,17 @@ module.exports = class Dashboard extends Plugin {
})
// 4. Add all dropped files
- getDroppedFiles(event.dataTransfer)
+ let executedDropErrorOnce = false
+ const logDropError = (error) => {
+ this.uppy.log(error.message, 'error')
+
+ // In practice all drop errors ar... | 1 | const { Plugin } = require('@uppy/core')
const Translator = require('@uppy/utils/lib/Translator')
const DashboardUI = require('./components/Dashboard')
const StatusBar = require('@uppy/status-bar')
const Informer = require('@uppy/informer')
const ThumbnailGenerator = require('@uppy/thumbnail-generator')
const findAllDO... | 1 | 12,399 | Is there a reason for logging `error.message` specifically, maybe log the whole error object? | transloadit-uppy | js |
@@ -42,7 +42,9 @@ namespace OpenTelemetry.Trace
var aspnetOptions = new AspNetInstrumentationOptions();
configureAspNetInstrumentationOptions?.Invoke(aspnetOptions);
- builder.AddDiagnosticSourceInstrumentation((activitySource) => new AspNetInstrumentation(activitySource, aspnetOp... | 1 | // <copyright file="TracerProviderBuilderExtensions.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
//
// h... | 1 | 19,267 | Why is this needed? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -404,6 +404,14 @@ func (proxy *Proxy) ContainerStarted(ident string) {
proxy.notifyWaiters(ident, err)
}
+func (proxy *Proxy) ContainerConnected(ident string) {
+ err := proxy.attach(ident)
+ // if err != nil {
+ // TODO: Not sure what is needed here.
+ // }
+ proxy.notifyWaiters(ident, err)
+}
+
func containe... | 1 | package proxy
import (
"bytes"
"crypto/tls"
"errors"
"fmt"
"net"
"net/http"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"syscall"
"time"
docker "github.com/fsouza/go-dockerclient"
weaveapi "github.com/weaveworks/weave/api"
weavedocker "github.com/weaveworks/weave/common/docker"
weavenet "github.co... | 1 | 14,516 | Nothing. We only expect container-connected events when going via the plugin, not the proxy. | weaveworks-weave | go |
@@ -11,6 +11,8 @@ import { mount } from './diff/mount';
import { patch } from './diff/patch';
import { createInternal } from './tree';
+let rootId = 0;
+
/**
*
* @param {import('./internal').PreactElement} parentDom The DOM element to | 1 | import {
MODE_HYDRATE,
MODE_MUTATIVE_HYDRATE,
MODE_SVG,
UNDEFINED
} from './constants';
import { commitRoot } from './diff/commit';
import { createElement, Fragment } from './create-element';
import options from './options';
import { mount } from './diff/mount';
import { patch } from './diff/patch';
import { create... | 1 | 17,561 | We might want to introduce some randomness here in case there are multiple completely separate Preact installations running, i.e. 2 widgets as those will be two roots with a resetting `_domDepth` | preactjs-preact | js |
@@ -488,7 +488,7 @@ func TestPushChunkToNextClosest(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if ta2.Get(tags.StateSent) != 2 {
+ if ta2.Get(tags.StateSent) != 1 {
t.Fatalf("tags error")
}
| 1 | // Copyright 2020 The Swarm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package pushsync_test
import (
"bytes"
"context"
"errors"
"io/ioutil"
"sync"
"testing"
"time"
"github.com/ethersphere/bee/pkg/accounting"
accounti... | 1 | 14,935 | this seems a bit wrong no? why is this change needed? | ethersphere-bee | go |
@@ -145,7 +145,7 @@ Transaction.prototype._validateFees = function() {
return 'Fee is more than ' + Transaction.FEE_SECURITY_MARGIN + ' times the suggested amount';
}
if (this._getUnspentValue() < this._estimateFee() / Transaction.FEE_SECURITY_MARGIN) {
- return 'Fee is less than ' + Transaction.FEE_SECUR... | 1 | 'use strict';
var _ = require('lodash');
var $ = require('../util/preconditions');
var buffer = require('buffer');
var errors = require('../errors');
var BufferUtil = require('../util/buffer');
var JSUtil = require('../util/js');
var BufferReader = require('../encoding/bufferreader');
var BufferWriter = require('../e... | 1 | 14,102 | Still confusing. Why don't we return something like `'Fee too low: expected X but found Y'`? | bitpay-bitcore | js |
@@ -81,14 +81,16 @@ type ProviderModeConfig struct {
type ConsumerConfig struct {
PublicKey string `json:"PublicKey"`
// IP is needed when provider is behind NAT. In such case provider parses this IP and tries to ping consumer.
- IP string `json:"IP,omitempty"`
+ IP string `json:"IP,omitempty"`
+ Ports []int `... | 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 | 15,766 | Should be from lowercase `json:"ports"` the same is defined in MarshalJSON | mysteriumnetwork-node | go |
@@ -3,7 +3,7 @@
# Purpose:
# sns-ruby-example-create-subscription.rb demonstrates how to create an Amazon Simple Notification Services (SNS) subscription using
-# the AWS SDK for JavaScript (v3).
+# the AWS SDK for Ruby.
# Inputs:
# - REGION | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Purpose:
# sns-ruby-example-create-subscription.rb demonstrates how to create an Amazon Simple Notification Services (SNS) subscription using
# the AWS SDK for JavaScript (v3).
# Inputs:
# - REGION
# ... | 1 | 20,564 | Simple Notification **Service** (singular) | awsdocs-aws-doc-sdk-examples | rb |
@@ -32,7 +32,9 @@ public class NashornScriptInterpreter implements ScriptInterpreter {
@Override
public void runScript(String scriptContent, Consumer<Exception> errorCallback) {
- nashornEngineFactory.createEngine().eval(scriptContent, errorCallback);
+ final NashornEngine engine = nashornEngi... | 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 | 10,273 | This code should be executed in NashornEngineFactory | PhoenicisOrg-phoenicis | java |
@@ -53,6 +53,7 @@ type Tags struct {
// NewTags creates a tags object
func NewTags(stateStore storage.StateStorer, logger logging.Logger) *Tags {
+ rand.Seed(time.Now().UnixNano())
return &Tags{
tags: &sync.Map{},
stateStore: stateStore, | 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 | 15,349 | this is not so great as it sets the global rand seed. in tests that invoke this method multiple times for whatever reason, the global seed would be overridden every time the constructor would be called and the instances would have a different seed after every constructor call. it would be better to just pass a new sour... | ethersphere-bee | go |
@@ -831,6 +831,14 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
arity = "1")
private final Wei txFeeCap = DEFAULT_RPC_TX_FEE_CAP;
+ @Option(
+ names = {"--rpc-require-chainid-in-txs"},
+ description =
+ "Allow for unprotected (non EIP155 signed) transactions to ... | 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,753 | This looks inverted to me: if `--rpc-require-chainid-in-txs=true`, then shouldn't `unprotectedTransactionsAllowed == false`? Suggest changing this variable to `requireTxReplayProtection` or similar. I think the flag name could be clearer as well, maybe: `--require-tx-replay-protection`. | hyperledger-besu | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.