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 |
|---|---|---|---|---|---|---|---|
@@ -30,8 +30,11 @@ abstract class BaseAction<R> implements Action<R> {
String tableName = table().toString();
if (tableName.contains("/")) {
return tableName + "#" + type;
- } else if (tableName.startsWith("hadoop.") || tableName.startsWith("hive.")) {
- // HiveCatalog and HadoopCatalog prepend... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 21,175 | Looks like this needs to be updated. There is no need to remove `hadoop.` if Hadoop tables don't use this code path. | apache-iceberg | java |
@@ -1,4 +1,5 @@
require 'fileutils'
+require 'digest'
module RSpec
module Core | 1 | require 'fileutils'
module RSpec
module Core
# Stores runtime configuration information.
#
# @example Standard settings
# RSpec.configure do |c|
# c.drb = true
# c.drb_port = 1234
# c.default_path = 'behavior'
# end
#
# @example Hooks
... | 1 | 8,280 | This require isn't need anymore, right? | rspec-rspec-core | rb |
@@ -32,6 +32,7 @@ import (
"github.com/mysteriumnetwork/node/session"
"github.com/mysteriumnetwork/node/session/balance"
"github.com/mysteriumnetwork/node/session/promise"
+ "github.com/mysteriumnetwork/payments/crypto"
"github.com/pkg/errors"
)
| 1 | /*
* Copyright (C) 2017 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 | 14,950 | a bit weird to see payments crypto package inside connection manager. There probably will be services not having any relation with payments that will use connection manager. Thats why probably ping-ping by itself can be useful without any relation to payments.. | mysteriumnetwork-node | go |
@@ -889,7 +889,7 @@ trait MarcAdvancedTrait
'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
'http://www.w3.org/2001/XMLSchema-instance'
);
- $xml->record->addAttribute('type', 'Bibliographic');
+ $xml->record->addAttribute('type', $this-... | 1 | <?php
/**
* Functions to add advanced MARC-driven functionality to a record driver already
* powered by the standard index spec. Depends upon MarcReaderTrait.
*
* PHP version 7
*
* Copyright (C) Villanova University 2017.
* Copyright (C) The National Library of Finland 2020.
*
* This program is free software; ... | 1 | 32,625 | I like the overall idea here, but I wonder if it would be more clear to define the property in the trait, and then set it in the constructors of the classes using the trait. Alternatively, at a bare minimum, it may be a good idea to add `?? 'Bibliographic'` here, to account for the possibility of the trait being used i... | vufind-org-vufind | php |
@@ -2,6 +2,10 @@ package protocol
import "time"
+// NonForwardSecurePacketSizeReduction is the number of bytes a non forward-secure packet has to be smaller than a forward-secure packet
+// This makes sure that those packets can always be retransmitted without splitting the contained StreamFrames
+const NonForward... | 1 | package protocol
import "time"
// DefaultMaxCongestionWindow is the default for the max congestion window
const DefaultMaxCongestionWindow = 1000
// InitialCongestionWindow is the initial congestion window in QUIC packets
const InitialCongestionWindow = 32
// MaxUndecryptablePackets limits the number of undecryptab... | 1 | 5,718 | I would prefer to not have a magic number, but construct this value out of other constants we already have. | lucas-clemente-quic-go | go |
@@ -101,6 +101,15 @@ def setup_authentication(config):
from configuration.
"""
config.include('pyramid_multiauth')
+ settings = config.get_settings()
+
+ policies = aslist(settings['multiauth.policies'])
+ if 'basicauth' in policies:
+ config.add_api_capability(
+ "basicauth",
... | 1 | import re
import warnings
from datetime import datetime
from dateutil import parser as dateparser
import structlog
from pyramid.events import NewRequest, NewResponse
from pyramid.exceptions import ConfigurationError
from pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone,
... | 1 | 10,236 | The limitation is if somebody configure another policy with the same name, but it is an edge case we can ignore I guess. | Kinto-kinto | py |
@@ -31,8 +31,8 @@ import (
_ "gocloud.dev/secrets/awskms"
_ "gocloud.dev/secrets/azurekeyvault"
_ "gocloud.dev/secrets/gcpkms"
- _ "gocloud.dev/secrets/hashivault"
_ "gocloud.dev/secrets/localsecrets"
+ _ "gocloud.dev/secrets/vault"
)
const helpSuffix = ` | 1 | // Copyright 2019 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 19,073 | ? The package is named `hashivault`. | google-go-cloud | go |
@@ -240,6 +240,9 @@ static int config_ini_handler(void *user, const char *section, const char *name,
if (strcmp(name, "xwayland") == 0) {
if (strcasecmp(value, "true") == 0) {
config->xwayland = true;
+ } else if (strcasecmp(value, "lazy") == 0) {
+ config->xwayland = true;
+ config->xwayland_lazy =... | 1 | #ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <assert.h>
#include <getopt.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/param.h>
#include <unistd.h>
#include <wlr/config.h>
#include <wlr/types/wlr_box.h>
#include <wlr/util/log.h>
#include "ro... | 1 | 11,276 | I don't think this should enable xwayland, because it's convenient to toggle xwayland just by setting `xwayland` to `false` | swaywm-wlroots | c |
@@ -28,7 +28,6 @@ import (
fakeclientset "k8s.io/client-go/kubernetes/fake"
certutil "k8s.io/client-go/util/cert"
"k8s.io/client-go/util/keyutil"
-
fakeaggregatorclientset "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/fake"
)
| 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 | 33,415 | Remove this line by accident? | antrea-io-antrea | go |
@@ -16,12 +16,13 @@
package com.palantir.baseline.plugins;
+import java.util.Collections;
import java.util.Objects;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.tasks.SourceSe... | 1 | /*
* (c) Copyright 2021 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless ... | 1 | 9,063 | Calling `.stream()` on a `DomainObjectCollection` is pretty much always a bug, as it doesn't include objects added later (and encourages people to use afterEvaluate). I wonder if we should make this an error prone check? | palantir-gradle-baseline | java |
@@ -201,7 +201,10 @@ func CreateGitIgnore(targetDir string, ignores ...string) error {
if fileutil.FileExists(gitIgnoreFilePath) {
sigFound, err := fileutil.FgrepStringInFile(gitIgnoreFilePath, DdevFileSignature)
- util.CheckErr(err)
+ if err != nil {
+ return err
+ }
+
// If we sigFound the file and did... | 1 | package ddevapp
import (
"fmt"
"path"
"path/filepath"
"strings"
"github.com/fatih/color"
"github.com/fsouza/go-dockerclient"
"github.com/gosuri/uitable"
"errors"
"os"
"text/template"
"github.com/Masterminds/sprig"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/fileutil"
"github.com/d... | 1 | 13,134 | Thanks for paying attention to other places this might happen. This one is particularly important; I probably never should have gotten in the habit of CheckErr(), since it does a log.Panic() explicitly, which looks like something else until you look closely. It's supposed to be used places where "can't happen" but Thin... | drud-ddev | php |
@@ -275,6 +275,15 @@ func (b *ofFlowBuilder) MatchARPOp(op uint16) FlowBuilder {
return b
}
+// MatchIPDscp adds match condition for matching DSCP field in the IP header. Note, OVS use TOS to present DSCP, and
+// the field name is shown as "nw_tos" with OVS command line, and the value is calculated by shifting th... | 1 | package openflow
import (
"fmt"
"net"
"strings"
"github.com/contiv/libOpenflow/openflow13"
"github.com/contiv/ofnet/ofctrl"
)
type ofFlowBuilder struct {
ofFlow
}
func (b *ofFlowBuilder) MatchTunMetadata(index int, data uint32) FlowBuilder {
rng := openflow13.NewNXRange(0, 31)
tm := &ofctrl.NXTunMetadata{
... | 1 | 21,861 | What is the different between nw_tos and ip_dscp? Only high 6 bits vs low 6 bits and supported version? | antrea-io-antrea | go |
@@ -329,12 +329,17 @@ extern "C" bool isValidMolBlob(char *data, int len) {
return res;
}
-extern "C" char *makeMolText(CROMol data, int *len, bool asSmarts) {
+extern "C" char *makeMolText(CROMol data, int *len, bool asSmarts,
+ bool cxSmiles) {
ROMol *mol = (ROMol *)data;
try... | 1 | //
// Copyright (c) 2010-2013, 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 the ... | 1 | 19,864 | I'm assuming that asSmarts & cxSmiles == asSmarts | rdkit-rdkit | cpp |
@@ -780,7 +780,9 @@ class LabelledData(param.Parameterized):
except:
self.warning("Could not unpickle custom style information.")
self.__dict__.update(d)
-
+ # TODO: super's setstate not called?
+ if "param" not in self.__dict__:
+ self.param = type(self.param)(se... | 1 | """
Provides Dimension objects for tracking the properties of a value,
axis or map dimension. Also supplies the Dimensioned abstract
baseclass for classes that accept Dimension values.
"""
from __future__ import unicode_literals
import re
import datetime as dt
from operator import itemgetter
import numpy as np
import ... | 1 | 21,411 | Seems like an oversight but I don't think the super would do anything else in this case unless I'm mistaken. | holoviz-holoviews | py |
@@ -30,8 +30,8 @@ namespace Examples.Console
internal class InstrumentationWithActivitySource : IDisposable
{
private const string RequestPath = "/api/request";
- private SampleServer server = new SampleServer();
- private SampleClient client = new SampleClient();
+ private reado... | 1 | // <copyright file="InstrumentationWithActivitySource.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
//
// ... | 1 | 20,460 | Curious, do we consider this as pedantic for example code? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -609,7 +609,7 @@ class AdminController extends Controller
$formType = $this->useLegacyFormComponent() ? 'easyadmin' : 'JavierEguiluz\\Bundle\\EasyAdminBundle\\Form\\Type\\EasyAdminFormType';
- return $this->get('form.factory')->createNamedBuilder('form', $formType, $entity, $formOptions);
+ ... | 1 | <?php
/*
* This file is part of the EasyAdminBundle.
*
* (c) Javier Eguiluz <javier.eguiluz@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JavierEguiluz\Bundle\EasyAdminBundle\Controller;
use Doctrine\DBAL\... | 1 | 9,846 | Should we convert the entity name to snake case using `Doctrine\Common\Inflector\Inflector::tableize` or similar ? Should a `snaked_name` or whatever be part of the entity metadata in order to use it for form names, ids, & other html attributes ? | EasyCorp-EasyAdminBundle | php |
@@ -12,9 +12,15 @@ func NewClientFake(IP string) Client {
type clientFake struct {
ip string
+ outboundIp string
}
-func (client *clientFake) GetIp() (string, error) {
+func (client *clientFake) GetPublicIP() (string, error) {
+ log.Info(IPIFY_API_LOG_PREFIX, "IP faked: ", client.ip)
+ return client.ip, nil
+}
... | 1 | package ipify
import (
log "github.com/cihub/seelog"
)
func NewClientFake(IP string) Client {
return &clientFake{
ip: IP,
}
}
type clientFake struct {
ip string
}
func (client *clientFake) GetIp() (string, error) {
log.Info(IPIFY_API_LOG_PREFIX, "IP faked: ", client.ip)
return client.ip, nil
}
| 1 | 9,838 | Should be `client.outboundIp` | mysteriumnetwork-node | go |
@@ -31,6 +31,9 @@
// THE POSSIBILITY OF SUCH DAMAGE.
//
+using System.IO;
+using System.Threading.Tasks;
+
namespace NLog.UnitTests.LayoutRenderers
{
using System; | 1 | //
// Copyright (c) 2004-2011 Jaroslaw Kowalski <jaak@jkowalski.net>
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above co... | 1 | 12,441 | Must these `using` statements not go inside the `namespace` block? | NLog-NLog | .cs |
@@ -92,8 +92,8 @@ type fboMutexLevel mutexLevel
const (
fboMDWriter fboMutexLevel = 1
- fboHead = 2
- fboBlock = 3
+ fboHead fboMutexLevel = 2
+ fboBlock fboMutexLevel = 3
)
func (o fboMutexLevel) String() string { | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"errors"
"fmt"
"os"
"reflect"
"strings"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/logger"
"github.com... | 1 | 14,126 | Why? I thought the previous way was idiomatic. (Same with the `MetadataVer` stuff above.) | keybase-kbfs | go |
@@ -12,11 +12,7 @@ define([], function() {
}
function uploadContent(connectionManager, server, options) {
- return new Promise(function(resolve, reject) {
- require(["contentuploader"], function(ContentUploader) {
- (new ContentUploader).uploadImages(connectionManager, serve... | 1 | define([], function() {
"use strict";
function performSync(connectionManager, server, options) {
console.log("ServerSync.performSync to server: " + server.Id), options = options || {};
var cameraUploadServers = options.cameraUploadServers || [];
console.log("ServerSync cameraUploadServe... | 1 | 10,535 | shouldn't we `reject` here instead? | jellyfin-jellyfin-web | js |
@@ -167,10 +167,12 @@ func printActionProto(action *iotextypes.Action) (string, error) {
if err != nil {
return "", output.NewError(output.ConvertError, "failed to convert bytes into address", err)
}
+ //ioctl action should display IOTX unit instead Raul
+ gasPriceUnitIOTX, err := util.StringToIOTX(action.Core.G... | 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 | 21,365 | check err or use gasPriceUnitIOTX, _ := if we are sure action.Core.GasPrice is correct | iotexproject-iotex-core | go |
@@ -34,7 +34,7 @@ func newHarness(t *testing.T) (drivertest.Harness, error) {
return &harness{vars: map[string][]byte{}}, nil
}
-func (h *harness) MakeWatcher(ctx context.Context, name string, decoder *runtimevar.Decoder, wait time.Duration) (driver.Watcher, error) {
+func (h *harness) MakeWatcher(ctx context.Cont... | 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 | 12,438 | Just curious, was wait not used at all before? | google-go-cloud | go |
@@ -7,9 +7,10 @@ package manifest
import (
"errors"
"fmt"
+ "github.com/google/shlex"
"path/filepath"
"strconv"
- "strings"
+ //"strings"
"github.com/aws/aws-sdk-go/aws"
"gopkg.in/yaml.v3" | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package manifest provides functionality to create Manifest files.
package manifest
import (
"errors"
"fmt"
"path/filepath"
"strconv"
"strings"
"github.com/aws/aws-sdk-go/aws"
"gopkg.in/yaml.v3"
)
c... | 1 | 16,546 | nit: can we remove this? | aws-copilot-cli | go |
@@ -44,11 +44,11 @@ public class NotificationStore {
}
}
- public Notification get(int index) {
+ public synchronized Notification get(int index) {
return store.get(index);
}
- public void add(Notification n) {
+ public synchronized void add(Notification n) {
log.inf... | 1 | package info.nightscout.androidaps.plugins.Overview.notifications;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.AudioAttributes;
import android.media.RingtoneManager;
im... | 1 | 29,907 | is it not a problem when one synchronized function is called by other? | MilosKozak-AndroidAPS | java |
@@ -1,6 +1,7 @@
ActiveAdmin.register Account do
- permit_params :level
- actions :index, :show, :edit
+ permit_params :login, :email, :level, :country_code, :location, :url, :hide_experience, :email_master, :email_posts,
+ :email_kudos, :email_new_followers, :twitter_account, :affiliation_type, :orga... | 1 | ActiveAdmin.register Account do
permit_params :level
actions :index, :show, :edit
controller do
defaults finder: :fetch_by_login_or_email
end
filter :login
filter :email
filter :name
filter :level, as: :select, collection: [['Default', Account::Access::DEFAULT],
... | 1 | 8,480 | We (even as admins) shouldn't override the User Preference settings like `email_master`, `email_posts`, `email_kudos`, `email_new_followers`. These all would be set by the user of their choice. Please do remove these attributes from editing//updating. Thanks! | blackducksoftware-ohloh-ui | rb |
@@ -20,7 +20,7 @@ return [
'alpha_dash' => 'O campo :attribute deve conter apenas letras, números e traços.',
'alpha_num' => 'O campo :attribute deve conter apenas letras e números .',
'array' => 'O campo :attribute deve conter um array.',
- 'attached' =... | 1 | <?php
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multip... | 1 | 8,637 | "Este :attribute j est anexado." sounds better. | Laravel-Lang-lang | php |
@@ -0,0 +1,6 @@
+
+if __name__ == "__main__":
+ import doctest
+ import databricks.koalas as ks
+ from databricks.koalas import frame, series
+ doctest.testmod(frame, extraglobs={"ks": ks}) | 1 | 1 | 8,532 | This line should be repeated for every module that needs testing. One cannot rely on nosetest to automatically discover all the modules. On the bright side, there is no need to change any of the other files. | databricks-koalas | py | |
@@ -301,5 +301,3 @@ var failedIssuanceMu sync.RWMutex
// If this value is recent, do not make any on-demand certificate requests.
var lastIssueTime time.Time
var lastIssueTimeMu sync.Mutex
-
-var errNoCert = errors.New("no certificate available") | 1 | package caddytls
import (
"crypto/tls"
"errors"
"fmt"
"log"
"strings"
"sync"
"sync/atomic"
"time"
)
// configGroup is a type that keys configs by their hostname
// (hostnames can have wildcard characters; use the getConfig
// method to get a config by matching its hostname). Its
// GetCertificate function can... | 1 | 9,350 | This error was unused | caddyserver-caddy | go |
@@ -212,6 +212,11 @@ type (
PreviousRangeID int64
}
+ // CloseShardRequest is used to notify persistence that we're unloading a shard
+ CloseShardRequest struct {
+ ShardID int32
+ }
+
// AddTasksRequest is used to write new tasks
AddTasksRequest struct {
ShardID int32 | 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,200 | Personally I wish we didn't have a proto for every single little thing we do. RequestShardAction with an enum for the action type would be a lot cleaner imo, but I'm pretty sure that ship has sailed :) Just kvetching. | temporalio-temporal | go |
@@ -0,0 +1,5 @@
+<% if trail.complete? %>
+ <%= render "completed_trails/trail", trail: trail %>
+<% else %>
+ <%= render "trails/incomplete_trail", trail: trail %>
+<% end %> | 1 | 1 | 14,241 | Does this make more sense as `trails/_trail` now? | thoughtbot-upcase | rb | |
@@ -435,6 +435,17 @@ func (agent *ecsAgent) getEC2InstanceID() string {
return instanceID
}
+// getoutpostARN gets the Outpost ARN from the metadata service
+func (agent *ecsAgent) getoutpostARN() string {
+ outpostARN, err := agent.ec2MetadataClient.OutpostARN()
+ if err != nil {
+ seelog.Warnf(
+ "Unable to o... | 1 | // Copyright 2018 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" fil... | 1 | 23,501 | synced offline. let's move this to `agent_unix.go` to make the IMDS call, since this is not supported in Windows. | aws-amazon-ecs-agent | go |
@@ -12,6 +12,10 @@ class PythonMappings
fun.add_mapping("py_env", Python::VirtualEnv.new)
fun.add_mapping("py_docs", Python::GenerateDocs.new)
+
+ fun.add_mapping("py_install", Python::Install.new)
+
+ fun.add_mapping("py_prep", Python::Prep.new)
end
end
| 1 | require 'rake'
require 'rake-tasks/browsers.rb'
require 'rake-tasks/crazy_fun/mappings/common'
class PythonMappings
def add_all(fun)
fun.add_mapping("py_test", Python::CheckPreconditions.new)
fun.add_mapping("py_test", Python::PrepareTests.new)
fun.add_mapping("py_test", Python::AddDependencies.new)
... | 1 | 11,997 | Too much indentation here. Should match the lines above, which have four spaces. | SeleniumHQ-selenium | js |
@@ -15,14 +15,6 @@ BOOST_AUTO_TEST_CASE(test_incompatible_with_mld)
osrm::exception);
}
-BOOST_AUTO_TEST_CASE(test_incompatible_with_corech)
-{
- // Note - CH-only data can't be used with the CoreCH algorithm
- BOOST_CHECK_THROW(
- getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm", osrm::EngineConfi... | 1 | #include <boost/test/test_case_template.hpp>
#include <boost/test/unit_test.hpp>
#include "fixture.hpp"
#include "osrm/exception.hpp"
BOOST_AUTO_TEST_SUITE(table)
BOOST_AUTO_TEST_CASE(test_incompatible_with_mld)
{
// Can't use the MLD algorithm with CH data
BOOST_CHECK_THROW(
getOSRM(OSRM_TEST_DATA_... | 1 | 22,954 | Same here we still need this test to make sure the fallback works. | Project-OSRM-osrm-backend | cpp |
@@ -0,0 +1,8 @@
+using System;
+namespace MvvmCross.iOS.Views.Presenters.Attributes
+{
+ public interface IMvxOverridePresentationAttribute
+ {
+ MvxBasePresentationAttribute OverridePresentationAttribute();
+ }
+} | 1 | 1 | 12,726 | I'm wondering if we can actually base this on a `IMvxPresentationAttribute` instead of the base one. | MvvmCross-MvvmCross | .cs | |
@@ -430,7 +430,7 @@ export function unmount(vnode, parentVNode, skipRemove) {
}
}
- r.base = r._parentDom = null;
+ r.base = r._parentDom = r._vnode = vnode._component = null;
}
if ((r = vnode._children)) { | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component } from '../component';
import { Fragment } from '../create-element';
import { diffChildren } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '../options';
/**
* Diff two vi... | 1 | 15,244 | could we switch to `undefined` here? | preactjs-preact | js |
@@ -94,6 +94,7 @@ public class SyncManager {
this.smartStore = smartStore;
this.restClient = restClient;
SyncState.setupSyncsSoupIfNeeded(smartStore);
+ SyncState.cleanupSyncsSoupIfNeeded(smartStore);
}
/** | 1 | /*
* Copyright (c) 2014-present, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright noti... | 1 | 17,343 | The cleanup call | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -288,10 +288,11 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
icon: 'album'
});
}
-
- if (options.openArtist !== false && item.ArtistItems && item.ArtistItems.length) {
+ // Show Album Artist by default, as a song can have mult... | 1 | define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter', 'playbackManager', 'loading', 'appSettings', 'browser', 'actionsheet'], function (appHost, globalize, connectionManager, itemHelper, appRouter, playbackManager, loading, appSettings, browser, actionsheet) {
'use strict';
function g... | 1 | 16,134 | I think "View artist" is a bit more standard and expected. Or even "Go to artist" to take the Spotify terminology as-is. | jellyfin-jellyfin-web | js |
@@ -196,6 +196,9 @@ module Bolt
# This works on deeply nested data structures composed of Hashes, Arrays, and
# and plain-old data types (int, string, etc).
def unwrap_sensitive_args(arguments)
+ # Skip this if Puppet isn't loaded
+ return arguments unless defined?(Puppet::Pops::Types... | 1 | # frozen_string_literal: true
require 'logging'
module Bolt
module Transport
# This class provides the default behavior for Transports. A Transport is
# responsible for uploading files and running commands, scripts, and tasks
# on Targets.
#
# Bolt executes work on the Transport in "batches". To... | 1 | 9,440 | It might make sense to refactor this later so that we use a Bolt-native type to hide sensitive values. | puppetlabs-bolt | rb |
@@ -30,3 +30,7 @@ from extensive_tm_test_base import ExtensiveTemporalMemoryTest
class ExtensiveTemporalMemoryTestCPP(ExtensiveTemporalMemoryTest, unittest.TestCase):
def getTMClass(self):
return nupic.bindings.algorithms.TemporalMemory
+
+
+if __name__ == "__main__":
+ unittest.main() | 1 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | 1 | 21,381 | We were trying to move away from this to force people to always run tests under py.test. | numenta-nupic | py |
@@ -933,6 +933,8 @@ from selenium.webdriver.common.keys import Keys
browser = self._check_platform()
+ body.append(self._get_selenium_options())
+
if browser == 'firefox':
body.extend(self._get_firefox_options() + self._get_firefox_profile() + [self._get_firefox_webdriver()])
| 1 | """
Copyright 2018 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 by applicable law or agreed to in writing, software... | 1 | 15,848 | 1 - create browser specific options class: - chromeoptions - firefoxoptions - argsoptions | Blazemeter-taurus | py |
@@ -681,7 +681,9 @@ class ProxyListenerS3(ProxyListener):
# fix content-type: https://github.com/localstack/localstack/issues/618
# https://github.com/localstack/localstack/issues/549
- if 'text/html' in response.headers.get('Content-Type', ''):
+ ... | 1 | import re
import logging
import json
import uuid
import base64
import codecs
import xmltodict
import collections
import botocore.config
import six
import datetime
import dateutil.parser
from six import iteritems
from six.moves.urllib import parse as urlparse
from botocore.client import ClientError
from requests.models ... | 1 | 10,269 | should be a case insensitive match though no? DOCTYPE and doctype are both widely used | localstack-localstack | py |
@@ -0,0 +1,15 @@
+class AccountWidgetsController < WidgetsController
+ before_action :set_account
+ before_action :render_gif_image
+ before_action :account_context, only: :index
+
+ def index
+ @widgets = AccountWidget.create_widgets(params[:account_id])
+ end
+
+ private
+
+ def set_account
+ @account = ... | 1 | 1 | 7,245 | We must have a `fail ParamNotFound` here for cases where `@account.nil?`. | blackducksoftware-ohloh-ui | rb | |
@@ -144,6 +144,7 @@ namespace Datadog.Trace.Vendors.Newtonsoft.Json.Serialization
return property;
}
+#if !NETCOREAPP
private bool TryGetValue(string key, out JsonProperty item)
{
if (Dictionary == null) | 1 | //------------------------------------------------------------------------------
// <auto-generated />
// This file was automatically generated by the UpdateVendors tool.
//------------------------------------------------------------------------------
#region License
// Copyright (c) 2007 James Newton-King
//
// Permis... | 1 | 17,643 | How come this change was needed? | DataDog-dd-trace-dotnet | .cs |
@@ -25,3 +25,13 @@ const (
UART_TX_PIN = 6
UART_RX_PIN = 8
)
+
+// ADC pins
+const (
+ ADC0 = 3
+ ADC1 = 4
+ ADC2 = 28
+ ADC3 = 29
+ ADC4 = 30
+ ADC5 = 31
+) | 1 | // +build nrf,pca10040
package machine
// LEDs on the PCA10040 (nRF52832 dev board)
const (
LED = LED1
LED1 = 17
LED2 = 18
LED3 = 19
LED4 = 20
)
// Buttons on the PCA10040 (nRF52832 dev board)
const (
BUTTON = BUTTON1
BUTTON1 = 13
BUTTON2 = 14
BUTTON3 = 15
BUTTON4 = 16
)
// UART pins for NRF52840-DK
con... | 1 | 5,898 | Why are there only 6 pins here, while below it appears to have 8 ADC inputs? Are pin 2 and 5 used for something else on this board? | tinygo-org-tinygo | go |
@@ -224,7 +224,9 @@ func (gsf *GraphSyncFetcher) fetchRemainingTipsets(ctx context.Context, starting
// non-recursively
func (gsf *GraphSyncFetcher) fetchBlocks(ctx context.Context, cids []cid.Cid, targetPeer peer.ID) error {
selector := gsf.ssb.ExploreFields(func(efsb selectorbuilder.ExploreFieldsSpecBuilder) {
- ... | 1 | package net
import (
"context"
"fmt"
"sync"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"
bstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log"
"github.com/ipld/go-ipld-prime"
ipldfree "github.com/ipld/go-ipld-prime/impl/free"... | 1 | 21,792 | I think we need an issue to track that chain sync omits BLS messages, and then to fix and test it! | filecoin-project-venus | go |
@@ -1,7 +1,7 @@
C2::Application.configure do
config.action_mailer.preview_path = "#{Rails.root}/lib/mail_previews"
config.action_mailer.register_preview_interceptor :css_inline_styler
- config.action_mailer.asset_host = "http://localhost:5000"
+ config.action_mailer.asset_host = "http://2c429f18.ngrok.io" || "... | 1 | C2::Application.configure do
config.action_mailer.preview_path = "#{Rails.root}/lib/mail_previews"
config.action_mailer.register_preview_interceptor :css_inline_styler
config.action_mailer.asset_host = "http://localhost:5000"
config.action_controller.perform_caching = false
config.action_mailer.delivery_metho... | 1 | 16,407 | what is this default about? I am not using ngrok atm so would prefer an env var. | 18F-C2 | rb |
@@ -93,6 +93,19 @@ return [
'backendSkin' => 'Backend\Skins\Standard',
+ /*
+ |--------------------------------------------------------------------------
+ | Determines if logging in backend should run UpdateManager
+ |--------------------------------------------------------------------------
+ ... | 1 | <?php
return [
/*
|--------------------------------------------------------------------------
| Specifies the default CMS theme.
|--------------------------------------------------------------------------
|
| This parameter value can be overridden by the CMS back-end settings.
|
*/
... | 1 | 15,278 | @Samuell1 Might be better to say "Automatically check for plugin updates on login". | octobercms-october | php |
@@ -1,4 +1,6 @@
+using System;
using System.Diagnostics;
+using System.Runtime.CompilerServices;
namespace Datadog.Trace.Util
{ | 1 | using System.Diagnostics;
namespace Datadog.Trace.Util
{
internal static class ProcessHelpers
{
/// <summary>
/// Wrapper around <see cref="Process.GetCurrentProcess"/> and <see cref="Process.ProcessName"/>
///
/// On .NET Framework the <see cref="Process"/> class is guarded by ... | 1 | 18,231 | Thanks for the additional Process helper! Can we also cache the first `Process.GetCurrentProcess()` result in a static field so we don't have to repeatedly call it? It means we would also need to dispose it when the static `_runtimeMetricsWriter` instance is disposed | DataDog-dd-trace-dotnet | .cs |
@@ -73,6 +73,19 @@ func (*mockStatsEngine) GetTaskHealthMetrics() (*ecstcs.HealthMetadata, []*ecstc
return nil, nil, nil
}
+// TestDisableMetrics tests the StartMetricsSession will return immediately if
+// the metrics was disabled
+func TestDisableMetrics(t *testing.T) {
+ params := TelemetrySessionParams{
+ Cfg... | 1 | // +build unit
// Copyright 2014-2018 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... | 1 | 21,204 | just wondering what is the result of breaking the logic we test here? it seems that in that case we will just not return immediately, but i'm not sure whether the test will fail? | aws-amazon-ecs-agent | go |
@@ -198,8 +198,9 @@ func TestInferModulePath(t *testing.T) {
t.Error(err)
}
}()
-
- pctx := newTestProcessContext(dir)
+ srcDir := filepath.Join(dir, "src")
+ os.Mkdir(srcDir, 0777)
+ pctx := newTestProcessContext(srcDir)
gopath, cleanup := tc.testGOPATH(dir)
defer cleanup()
pctx.env ... | 1 | // Copyright 2019 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 18,495 | We should fail the test if this returns `err != nil`. | google-go-cloud | go |
@@ -140,6 +140,9 @@ func (r *ReconcileClusterDeployment) reconcileExistingInstallingClusterInstall(c
}
updated = false
+ // Fun extra variable to keep track of whether we should increment metricProvisionFailedTerminal
+ // later; because we only want to do that if (we change that status and) the status update suc... | 1 | package clusterdeployment
import (
"context"
"reflect"
"time"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io... | 1 | 19,471 | What is the drawback of not having this flag as a gating condition to report the metric? | openshift-hive | go |
@@ -22,9 +22,14 @@ import (
)
func gracefullyStopProcess(pid int) error {
+ fmt.Printf("Graceful stop...")
err := syscall.Kill(pid, syscall.SIGINT)
if err != nil {
return fmt.Errorf("kill: %v", err)
}
return nil
}
+
+func getAppName() string {
+ return filepath.Base(os.Args[0])
+} | 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 | 13,349 | `getProcessName()` will be less ambiguous, since Caddy has "apps" that it runs internally. | caddyserver-caddy | go |
@@ -4741,6 +4741,7 @@ const char * const DMLFormats[] =
"<exec cmd=\"!DumpIL /i %s\">%s</exec>", // DML_IL
"<exec cmd=\"!DumpRCW -cw /d %s\">%s</exec>", // DML_ComWrapperRCW
"<exec cmd=\"!DumpCCW -cw /d %s\">%s</exec>", // DML_ComWrapperCCW
+ "<exec cmd=\"dps %s L2\">%s</exec>", ... | 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.
// ==++==
//
//
// ==--==
#include "sos.h"
#include "disasm.h"
#include <dbghelp.h>
#include "corhdr.h"
#include... | 1 | 14,148 | Is there any way to not hardcode this given we know the size in bytes? The public API has the flexibility of being a Span. Should we maybe not do anything printing DML? The runtime allocates the buffer, but it's a "scratch memory" area, The delegate gets it passed in and they decide how to use it. Also, how is DML used... | dotnet-diagnostics | cpp |
@@ -64,6 +64,13 @@ nebula::cpp2::ErrorCode ScanEdgeProcessor::checkAndBuildContexts(const cpp2::Sca
std::vector<cpp2::EdgeProp> returnProps = {*req.return_columns_ref()};
ret = handleEdgeProps(returnProps);
buildEdgeColName(returnProps);
+ ret = buildFilter(req, [](const cpp2::ScanEdgeRequest& r) -> const std... | 1 | /* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "storage/query/ScanEdgeProcessor.h"
#include "common/utils/NebulaKeyUtils.h"
#include "storage/StorageFlags.h"
#include "storage/exec/QueryUtils.h"
namespace nebula {
namespace storage {
... | 1 | 32,124 | How about just override the `buildFilter`? Passing another function here is a little weird. | vesoft-inc-nebula | cpp |
@@ -71,8 +71,9 @@ var (
ignoredPackages = app.Flag("ignored-packages", "Space separated list of specs ignoring rebuilds if their dependencies have been updated. Will still build if all of the spec's RPMs have not been built.").String()
- pkgsToBuild = app.Flag("packages", "Space separated list of top-level pack... | 1 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package main
import (
"fmt"
"os"
"os/signal"
"runtime"
"sync"
"github.com/juliangruber/go-intersect"
"golang.org/x/sys/unix"
"gopkg.in/alecthomas/kingpin.v2"
"microsoft.com/pkggen/internal/exe"
"microsoft.com/pkggen/internal/logger"... | 1 | 16,114 | This should just be a `.Bool()` flag I think, we don't encode anything beyond y/n here. See `$(RUN_CHECK)` and `$(STOP_ON_PKG_FAIL)` for examples of how to pass those in. | microsoft-CBL-Mariner | go |
@@ -2042,6 +2042,7 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_Promise(
address.SetLoadAddress(val_ptr_addr, &m_process->GetTarget());
return true;
} break;
+ case swift::MetadataKind::Function:
case swift::MetadataKind::Optional:
case swift::MetadataKind::Struct:
case swift::MetadataK... | 1 | //===-- SwiftLanguageRuntime.cpp --------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | 1 | 17,941 | Is this needed? | apple-swift-lldb | cpp |
@@ -348,7 +348,7 @@ export default Ember.Controller.extend(BillingCategories, EKMixin,
confirmDeleteValue(value) {
let i18n = this.get('i18n');
let title = i18n.t('admin.lookup.titles.deleteLookupValue');
- let message = i18n.t('admin.lookup.messages.deleteLookupValue', { value });
+ ... | 1 | import Ember from 'ember';
import BillingCategories from 'hospitalrun/mixins/billing-categories';
import csvParse from 'npm:csv-parse';
import ModalHelper from 'hospitalrun/mixins/modal-helper';
import InventoryTypeList from 'hospitalrun/mixins/inventory-type-list';
import UnitTypes from 'hospitalrun/mixins/unit-types'... | 1 | 13,475 | This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. | HospitalRun-hospitalrun-frontend | js |
@@ -18,6 +18,8 @@ package container
import (
"context"
+ "github.com/chaos-mesh/chaos-mesh/pkg/selector/generic"
+
"go.uber.org/fx"
v1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client" | 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 agreed to... | 1 | 25,398 | how about moving it under L26 | chaos-mesh-chaos-mesh | go |
@@ -0,0 +1,17 @@
+/**
+ * Memoize a function.
+ * @method memoize
+ * @memberof axe.utils
+ * @param {Function} fn Function to memoize
+ * @return {Function}
+ */
+axe._memoizedFns = [];
+axe.utils.memoize = function(fn) {
+ // keep track of each function that is memoized so it can be cleared at
+ // the end of a run. ... | 1 | 1 | 15,097 | I think this needs to be tested | dequelabs-axe-core | js | |
@@ -2,6 +2,9 @@ class Trail < ApplicationRecord
extend FriendlyId
include PgSearch
+
+ DEFAULT_IMAGE_URL = "https://images.thoughtbot.com/upcase/trail-title-cards/default.jpg"
+
multisearchable against: [:name, :description], if: :published?
validates :name, :description, presence: true | 1 | class Trail < ApplicationRecord
extend FriendlyId
include PgSearch
multisearchable against: [:name, :description], if: :published?
validates :name, :description, presence: true
has_many :classifications, as: :classifiable
has_many :repositories, dependent: :destroy
has_many :statuses, as: :completeable... | 1 | 18,682 | Style/MutableConstant: Freeze mutable objects assigned to constants. | thoughtbot-upcase | rb |
@@ -155,16 +155,15 @@ public final class DeflateWithPresetDictCompressionMode extends CompressionMode
private static class DeflateWithPresetDictCompressor extends Compressor {
- final byte[] dictBytes;
- final int blockLength;
+ private final int dictLength, blockLength;
final Deflater compressor;
... | 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,735 | Just a thought, really. If it's a bug that can be probed for (and it can be - see Adrian's repro) then it could as well be a static initialization of a supplier of Deflater instances; if we probe for a buggy JVM, we return the wrapper. If we don't we return the Deflater. This way on non-affected JVMs nothing happens an... | apache-lucene-solr | java |
@@ -95,7 +95,7 @@ public class FSTTester<T> {
return br;
}
- static String getRandomString(Random random) {
+ public static String getRandomString(Random random) {
final String term;
if (random.nextBoolean()) {
term = TestUtil.randomRealisticUnicodeString(random); | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 38,333 | Looks like this should be publicly accessible for tests in any modules? | apache-lucene-solr | java |
@@ -19,7 +19,7 @@ if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else {
$path = dirname(__DIR__).'/.env';
- $dotenv = new Dotenv(false);
+ $dotenv = n... | 1 | <?php
use Symfony\Component\Dotenv\Dotenv;
setlocale(LC_CTYPE, 'en_US.utf8');
setlocale(LC_NUMERIC, 'en_US.utf8');
// Configure PHP
error_reporting(E_ALL);
ini_set('display_errors', '0');
// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=... | 1 | 23,205 | Allow putenv is necessary to be able to get environment variables with `getenv`? | shopsys-shopsys | php |
@@ -0,0 +1,17 @@
+#include <iostream>
+#include <conio.h>
+using namespace std;
+
+int main()
+{
+ int year;
+ cout<<"Enter year to check\n";
+ cin>>year;
+ if((year%4==0 && year%100!=0) || year%400==0){
+ cout<<"leap year.\n";
+ }
+ else{
+ cout<<" Not leap year.\n";
+ }
+ return 0;
+} | 1 | 1 | 5,031 | use function to check it. - don't do everything in main | shoaibrayeen-Programmers-Community | c | |
@@ -50,7 +50,7 @@ class BaseRulesEngine(object):
self.full_rules_path = rules_file_path.strip()
self.snapshot_timestamp = snapshot_timestamp
- def build_rule_book(self):
+ def build_rule_book(self, global_configs):
"""Build RuleBook from the rules definition file."""
raise No... | 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,649 | Sorry I'm confused. Why not kwarg this like the others? | forseti-security-forseti-security | py |
@@ -7171,15 +7171,15 @@ const instr_info_t vex_W_extensions[][2] = {
* registers are identical. We don't bother trying to detect that.
*/
{OP_vpgatherdd,0x66389018,"vpgatherdd",Vx,Hx,MVd,Hx,xx, mrm|vex|reqp,x,END_LIST},
- {OP_vpgatherdq,0x66389058,"vpgatherdq",Vx,Hx,MVq,Hx,xx, mrm|vex|reqp,x,END_LI... | 1 | /* **********************************************************
* Copyright (c) 2011-2019 Google, Inc. All rights reserved.
* Copyright (c) 2001-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 17,308 | First, any changes here should be synchronized with instr_compute_VSIB_index(). Second, the original looks correct to me: the first letter of the opcode name suffix is the index size, while the second is the memory size. So "vpgatherdq" is a d-sized index and q-sized memory. The operand size we store for memory accesse... | DynamoRIO-dynamorio | c |
@@ -118,6 +118,9 @@ class ExternalProgramTask(luigi.Task):
file_object.seek(0)
return ''.join(map(lambda s: s.decode('utf-8'), file_object.readlines()))
+ def build_tracking_url(self, logs_output):
+ return logs_output
+
def run(self):
args = list(map(str, self.program_args()... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2016 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... | 1 | 19,579 | Sorry for going back and forth. Adding docstring here would be very helpful for others to understand the need of this method. | spotify-luigi | py |
@@ -121,10 +121,7 @@ bool Creature::canSee(const Position& pos) const
bool Creature::canSeeCreature(const Creature* creature) const
{
- if (!canSeeInvisibility() && creature->isInvisible()) {
- return false;
- }
- return true;
+ return canSeeInvisibility() && creature->isInvisible();
}
void Creature::setSkull(... | 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,817 | You introduced a bug here. | otland-forgottenserver | cpp |
@@ -261,6 +261,14 @@ namespace Microsoft.DotNet.Build.Tasks.VersionTools
"true",
StringComparison.OrdinalIgnoreCase);
+ string oldValue = step.GetMetadata("ReplacementSubstituteOld");
+ string newValue = step.GetMetadata("ReplacementSubstituteNew");
+
+ ... | 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 Microsoft.Build.Framework;
using Microsoft.DotNet.VersionTools;
using Microsoft.DotNet.VersionTools.Automatio... | 1 | 15,084 | Should we log a warning/error if only one is specified and not the other? | dotnet-buildtools | .cs |
@@ -463,4 +463,15 @@ func (c *fakeClient) ReportApplicationLiveStateEvents(ctx context.Context, req *
return &pipedservice.ReportApplicationLiveStateEventsResponse{}, nil
}
+func (c *fakeClient) GetLatestEvent(ctx context.Context, req *pipedservice.GetLatestEventRequest, opts ...grpc.CallOption) (*pipedservice.Get... | 1 | // Copyright 2020 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 13,259 | `ctx` is unused in GetLatestEvent | pipe-cd-pipe | go |
@@ -128,6 +128,14 @@ void nano_daemon::daemon::run (boost::filesystem::path const & data_path, nano::
logger.always_log (boost::format ("Open file descriptors limit is %1%") % file_descriptor_limit);
}
+ // a 0-valued port means for the node 'let the OS decide'; however, for the daemon start up, if
+ // ... | 1 | #include <nano/boost/process/child.hpp>
#include <nano/lib/signal_manager.hpp>
#include <nano/lib/threading.hpp>
#include <nano/lib/tlsconfig.hpp>
#include <nano/lib/utility.hpp>
#include <nano/nano_node/daemon.hpp>
#include <nano/node/cli.hpp>
#include <nano/node/daemonconfig.hpp>
#include <nano/node/ipc/ipc_server.hp... | 1 | 17,078 | This looks good to me. Personally, I would have the following for maximum flexibility: * convert peering_port from uint64_t to int. * Set the default value to "-1" to specify the value is not set * if the value is -1 then do `config.node.peering_port = network_params.network.default_node_port` That would allow for 0 to... | nanocurrency-nano-node | cpp |
@@ -10,7 +10,6 @@ __all__ = [
class ImageTransform(object):
"""Preprocess an image.
-
1. rescale the image to expected size
2. normalize the image
3. flip the image (if needed) | 1 | import mmcv
import numpy as np
import torch
__all__ = [
'ImageTransform', 'BboxTransform', 'MaskTransform', 'SegMapTransform',
'Numpy2Tensor'
]
class ImageTransform(object):
"""Preprocess an image.
1. rescale the image to expected size
2. normalize the image
3. flip the image (if needed)
... | 1 | 17,826 | The blank line between the summary and detailed description is better to be kept. | open-mmlab-mmdetection | py |
@@ -167,6 +167,11 @@ func (a *API) Setup() {
a.setMetadataEndpointsKey()
a.writeShapeNames()
a.resolveReferences()
+
+ if !a.NoRemoveUnusedShapes {
+ a.removeUnusedShapes()
+ }
+
a.fixStutterNames()
a.renameExportable()
a.applyShapeNameAliases() | 1 | // +build codegen
package api
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"sort"
"strings"
)
// APIs provides a set of API models loaded by API package name.
type APIs map[string]*API
// LoadAPIs loads the API model files from disk returning the map of API
// package. Returns error if multiple API mod... | 1 | 9,579 | Curiously, are these indents intended or should they be aligned? | aws-aws-sdk-go | go |
@@ -1130,7 +1130,9 @@ def getControlFieldSpeech(attrs,ancestorAttrs,fieldType,formatConfig=None,extraD
else:
tableID = None
- roleText=getSpeechTextForProperties(reason=reason,role=role)
+ roleText=attrs.get('roleText')
+ if not roleText:
+ roleText=getSpeechTextForProperties(reason=reason,role=role)
stateTex... | 1 | # -*- coding: UTF-8 -*-
#speech.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Babbage B.V.
"""High-level functions to speak information.
""... | 1 | 22,381 | What if we changed this to this? roleText=attrs.get('roleText', lambda:getSpeechTextForProperties(reason=reason,role=role)) That will prevent the function from ever needing called in the roletext case, and removes that if. | nvaccess-nvda | py |
@@ -4801,7 +4801,15 @@ master_signal_handler_C(byte *xsp)
return;
}
#endif
- dcontext_t *dcontext = get_thread_private_dcontext();
+ /* We avoid using safe_read_tls_magic during detach. This thread may already have
+ * lost its TLS. A safe read may result into a race affecting asynchronous non-... | 1 | /* **********************************************************
* Copyright (c) 2011-2019 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 16,466 | This will still result in a safe_read_tls_magic on AMD in tls_thread_preinit(). | DynamoRIO-dynamorio | c |
@@ -561,5 +561,4 @@ public class TestJdbcCatalog {
String nsString = JdbcUtil.namespaceToString(ns);
Assert.assertEquals(ns, JdbcUtil.stringToNamespace(nsString));
}
-
} | 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 | 44,054 | Can you remove this change? | apache-iceberg | java |
@@ -48,7 +48,7 @@ func ValidateCertificateForACMEIssuer(crt *cmapi.CertificateSpec, issuer *cmapi.
el := field.ErrorList{}
if crt.IsCA {
- el = append(el, field.Invalid(specPath.Child("isCA"), crt.KeyAlgorithm, "ACME does not support CA certificates"))
+ el = append(el, field.Invalid(specPath.Child("isCA"), crt... | 1 | /*
Copyright 2019 The Jetstack cert-manager contributors.
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... | 1 | 22,373 | Oh, was that a bug in the validation? | jetstack-cert-manager | go |
@@ -134,6 +134,10 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
} else {
Log.d(TAG, "Activity was started with url " + feedUrl);
setLoadingLayout();
+ //Remove subscribeonandroid.com from feed URL in order to subscribe to the actual feed URL
+ ... | 1 | package de.danoeh.antennapod.activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.LightingColorFilter;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.an... | 1 | 15,576 | Please use the Google java code style. Basically, add more space characters like in the statements below. Next to method arguments and curly braces. This is currently not checked on CI because it is too inconsistent in the code base but I would prefer new code to be consistent. | AntennaPod-AntennaPod | java |
@@ -145,10 +145,12 @@ TEST(UpdateEdgeTest, Set_Filter_Yield_Test) {
decltype(req.return_columns) tmpColumns;
tmpColumns.emplace_back(Expression::encode(val1));
tmpColumns.emplace_back(Expression::encode(val2));
- std::string name = folly::to<std::string>(3002);
- std::string prop = "tag_3002_col_2"... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "base/NebulaKeyUtils.h"
#include <gtest/gtest.h>
#include <rocksdb/db.h>
#include <limit... | 1 | 22,999 | Actually, I don't think we need to create object on heap. | vesoft-inc-nebula | cpp |
@@ -84,7 +84,7 @@ void GenerateImports(grpc_generator::File *file, grpc_generator::Printer *printe
}
printer->Print("import (\n");
printer->Indent();
- printer->Print(vars, "$context$ \"golang.org/x/net/context\"\n");
+ printer->Print(vars, "$context$ \"context\"\n");
printer->Print(vars, "$grpc$ \"google.golan... | 1 | /*
*
* Copyright 2015, Google 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 the above copyright
* notice, this list of condi... | 1 | 14,022 | this is a file we copy from gRPC, sp ideally it be fixed upstream as well.. | google-flatbuffers | java |
@@ -14,7 +14,6 @@
package zipkin2.storage.cassandra.v1;
import com.datastax.driver.core.Session;
-import com.google.common.cache.CacheBuilderSpec;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.LinkedHashSet; | 1 | /*
* Copyright 2015-2020 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 1 | 16,860 | changes like this, just strangle guava usages to be replaced by DelayLimiter into one place | openzipkin-zipkin | java |
@@ -27,8 +27,8 @@ const Widget = ( {
className,
slug,
noPadding,
- header: Header,
- footer: Footer,
+ Header,
+ Footer,
} ) => {
return (
<div | 1 | /**
* Widget component.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Un... | 1 | 35,839 | PropTypes need to be updated accordingly here. Note that the type also needs updating, not just the case. That is, these should both expect a `PropTypes.elementType` now instead of an `element`. | google-site-kit-wp | js |
@@ -221,7 +221,7 @@ int get_ctest_gpu(const char* local_rank_str) {
}
auto const* comma = std::strchr(resource_str, ',');
- if (!comma || strncmp(resource_str, "id:", 3)) {
+ if (!comma || strncmp(resource_str, "id:", 3) != 0) {
std::ostringstream ss;
ss << "Error: invalid value of " << ctest_resour... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 32,464 | maybe extra paren around `strncmp(...) != 0` | kokkos-kokkos | cpp |
@@ -510,6 +510,8 @@ public class Windows implements TrayListener, TopBarWidget.Delegate, TitleBarWid
TelemetryWrapper.resetOpenedWindowsCount(mRegularWindows.size(), false);
TelemetryWrapper.resetOpenedWindowsCount(mPrivateWindows.size(), true);
+ GleanMetricsService.resetOpenedWindowsCount(m... | 1 | package org.mozilla.vrbrowser.ui.widgets;
import android.content.Context;
import android.util.Log;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
im... | 1 | 9,397 | We should call `Windows.onResume `: - When the app is launched for the first time - When the app is resumed after being paused (home button and resume or device goes to sleep) - After a permission prompt is displayed | MozillaReality-FirefoxReality | java |
@@ -31,7 +31,7 @@ import java.util.function.Function;
import com.google.common.annotations.VisibleForTesting;
-public class BftForksSchedule<C extends BftConfigOptions> {
+public class BftForksSchedule<C> {
private final NavigableSet<ForkSpec<C>> forks =
new TreeSet<>( | 1 | /*
* Copyright Hyperledger Besu Contributors.
*
* 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 agr... | 1 | 26,801 | Rename to ForksSchedule? Maybe in separate PR. | hyperledger-besu | java |
@@ -1,11 +1,12 @@
-import pytest
import time
from unittest import mock
+import pytest
+
from pyramid import testing
-from kinto.core.storage import exceptions
from kinto.core.cache import heartbeat
+from kinto.core.storage import exceptions
class CacheTest: | 1 | import pytest
import time
from unittest import mock
from pyramid import testing
from kinto.core.storage import exceptions
from kinto.core.cache import heartbeat
class CacheTest:
backend = None
settings = {}
def setUp(self):
super().setUp()
self.cache = self.backend.load_from_config(self... | 1 | 12,558 | Why a blank line here? | Kinto-kinto | py |
@@ -14,6 +14,10 @@ class Subscription < ActiveRecord::Base
notifier.send_notifications
end
+ def active?
+ deactivated_on.nil?
+ end
+
private
def self.subscriber_emails | 1 | # This class represents a user's subscription to Learn content
class Subscription < ActiveRecord::Base
belongs_to :user
delegate :stripe_customer, to: :user
def self.deliver_welcome_emails
recent.each do |subscription|
Mailer.welcome_to_prime(subscription.user).deliver
end
end
def self.deliver... | 1 | 7,315 | I have a sense that this will actually eventually change to check the actual date so that subscriptions can be deactivated in the future. But I mention that here just to keep you in the loop. We should not make that change now, because it's not needed functionality. | thoughtbot-upcase | rb |
@@ -36,6 +36,10 @@ public class EnvironmentVariableDefaultProvider implements IDefaultValueProvider
@Override
public String defaultValue(final ArgSpec argSpec) {
+ if (!argSpec.isOption()) {
+ return null; // skip default for positional params
+ }
+
return envVarNames((OptionSpec) argSpec)
... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 22,055 | What is the reasoning for using the negation of `isOption()` instead of simply using `isPositional()` to identify a positional param? | hyperledger-besu | java |
@@ -1415,7 +1415,13 @@ void ProtocolGame::sendBasicData()
msg.addByte(0);
msg.add<uint32_t>(0);
}
+
msg.addByte(player->getVocation()->getClientId());
+
+ if (version >= 1100) {
+ msg.addByte(player->getVocation()->getId() != VOCATION_NONE ? 0x01 : 0x00); // prey data
+ }
+
msg.add<uint16_t>(0xFF); // numb... | 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 | 19,532 | Why would you add those if client version min is set to 1100? | otland-forgottenserver | cpp |
@@ -7,12 +7,13 @@
package snapshotsync
import (
+ reflect "reflect"
+ sync "sync"
+
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
- refl... | 1 | // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: external_downloader.proto
package snapshotsync
import (
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/p... | 1 | 22,109 | You can delete this, it will now need to live in `gointerfaces` package | ledgerwatch-erigon | go |
@@ -3,7 +3,7 @@
<%= render 'previous_next_doc' %>
-<% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => application_name) -%>
+<% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => ap... | 1 | <div id="content" class="col-md-9 show-document">
<%= render 'previous_next_doc' %>
<% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => application_name) -%>
<% content_for(:head) { render_link_rel_alternates } -%>
<%# this should be in a partial ... | 1 | 5,094 | Okay, I still don't understand why you have to add `html_safe` here, and it still seems like a very bad idea. It will allow html tags in the title, and keep Rails from escaping literal greater-than or less-than chars not intended as HTML tags. It ought to work to just let Rails do HTML-escaing as normal, without any ma... | projectblacklight-blacklight | rb |
@@ -1435,6 +1435,8 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
public void displayMessageSubject(String subject) {
if (mDisplayMode == DisplayMode.MESSAGE_VIEW) {
mActionBarSubject.setText(subject);
+ } else {
+ mActionBarSubject.showS... | 1 | package com.fsck.k9.activity;
import java.util.Collection;
import java.util.List;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.FragmentManager;
import android.app.FragmentManager.OnBackStackChangedListener;
import android.app.FragmentTransaction;
import android.app.SearchM... | 1 | 14,486 | What is is subject when it's not the email subject. Why are we having to do this crap? What's calling this with an empty string? | k9mail-k-9 | java |
@@ -65,7 +65,7 @@ func NewProvider(opts ...ProviderOption) (*Provider, error) {
namedTracer: make(map[string]*tracer),
}
tp.config.Store(&Config{
- DefaultSampler: ProbabilitySampler(defaultSamplingProbability),
+ DefaultSampler: AlwaysSample(),
IDGenerator: defIDGenerator(),
MaxAttr... | 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 | 11,320 | Could you also remove the `defaultSamplingProbability` constant from `sampling.go`? It seems to became unused with this change. | open-telemetry-opentelemetry-go | go |
@@ -63,9 +63,9 @@ func (s *svc) UpdateDeployment(ctx context.Context, clientset, cluster, namespac
}
newDeployment := oldDeployment.DeepCopy()
- mergeLabelsAndAnnotations(newDeployment, fields)
+ mergeDeploymentLabelsAndAnnotations(newDeployment, fields)
- patchBytes, err := generateDeploymentStrategicPatch(old... | 1 | package k8s
import (
"context"
"encoding/json"
"fmt"
appsv1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/util/retry"
k8sapiv1 "github.com/lyft/clutch/backend/api/k8s/v1"
)
func (s *svc) Des... | 1 | 9,078 | can you delete the `generateDeploymentStrategicPatch` function as well? | lyft-clutch | go |
@@ -61,7 +61,7 @@ class UnboundZmqEventBus implements EventBus {
return thread;
});
- LOG.info(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));
+ LOG.finest(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));
sub = context.creat... | 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 | 16,464 | I'd keep this at `info` level... | SeleniumHQ-selenium | rb |
@@ -50,6 +50,10 @@ StatusOr<OptRule::TransformResult> LimitPushDownRule::transform(
const auto proj = static_cast<const Project *>(projGroupNode->node());
const auto gn = static_cast<const GetNeighbors *>(gnGroupNode->node());
+ DCHECK(graph::ExpressionUtils::isEvaluableExpr(limit->countExpr()));
+ if (!graph... | 1 | /* Copyright (c) 2020 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 "graph/optimizer/rule/LimitPushDownRule.h"
#include "common/expression/BinaryExpression.h"
#include "common/ex... | 1 | 31,048 | Don't use DCHECK to debug your code if it's the regular branch you need to handle. | vesoft-inc-nebula | cpp |
@@ -46,11 +46,6 @@ public interface AntlrNode extends Node {
throw new UnsupportedOperationException("Out of scope for antlr current implementations");
}
- @Override
- default String getImage() {
- throw new UnsupportedOperationException("Out of scope for antlr current implementations");
- ... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.ast;
/**
* Base interface for all Antlr-based implementation of Node interface.
* <p>
* Initially all the methods implemented here will be no-op due to scope limitations
*/
public interface Ant... | 1 | 16,053 | You should return null here instead. Null is an acceptable default value for the image attribute. | pmd-pmd | java |
@@ -246,9 +246,14 @@ export function useErrorBoundary(cb) {
function flushAfterPaintEffects() {
afterPaintEffects.some(component => {
if (component._parentDom) {
- component.__hooks._pendingEffects.forEach(invokeCleanup);
- component.__hooks._pendingEffects.forEach(invokeEffect);
- component.__hooks._pendin... | 1 | import { options } from 'preact';
/** @type {number} */
let currentIndex;
/** @type {import('./internal').Component} */
let currentComponent;
/** @type {Array<import('./internal').Component>} */
let afterPaintEffects = [];
let oldBeforeRender = options._render;
let oldAfterDiff = options.diffed;
let oldCommit = opt... | 1 | 14,842 | react bails as well? | preactjs-preact | js |
@@ -7,7 +7,6 @@ namespace Shopsys\FrameworkBundle\Model\Security;
class Roles
{
public const ROLE_ADMIN = 'ROLE_ADMIN';
- public const ROLE_ADMIN_AS_CUSTOMER = 'ROLE_ADMIN_AS_CUSTOMER';
public const ROLE_LOGGED_CUSTOMER = 'ROLE_LOGGED_CUSTOMER';
public const ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN';
| 1 | <?php
declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Model\Security;
class Roles
{
public const ROLE_ADMIN = 'ROLE_ADMIN';
public const ROLE_ADMIN_AS_CUSTOMER = 'ROLE_ADMIN_AS_CUSTOMER';
public const ROLE_LOGGED_CUSTOMER = 'ROLE_LOGGED_CUSTOMER';
public const ROLE_SUPER_ADMIN = 'ROLE_SUPE... | 1 | 21,633 | Can you please tell me why you did this? | shopsys-shopsys | php |
@@ -168,9 +168,12 @@ module.exports = class Webcam extends Plugin {
this.opts.modes.indexOf('video-only') !== -1 ||
this.opts.modes.indexOf('picture') !== -1
+ const videoConstraints = this.opts.videoConstraints ?? {}
+ videoConstraints.facingMode = this.opts.facingMode
+
return {
audi... | 1 | const { h } = require('preact')
const { Plugin } = require('@uppy/core')
const Translator = require('@uppy/utils/lib/Translator')
const getFileTypeExtension = require('@uppy/utils/lib/getFileTypeExtension')
const mimeTypes = require('@uppy/utils/lib/mimeTypes')
const canvasToBlob = require('@uppy/utils/lib/canvasToBlob... | 1 | 13,278 | Reading this again it should prob prefer the `videoConstraints.facingMode` value over `facingMode` if the former was already set | transloadit-uppy | js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.