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 |
|---|---|---|---|---|---|---|---|
@@ -139,6 +139,8 @@ static const char* generate_multi_dot_name(ast_t* ast, ast_t** def_found) {
default:
{
+ if (def == NULL)
+ return stringtab("");
pony_assert(0);
}
} | 1 | #include "refer.h"
#include "../ast/id.h"
#include "../pass/expr.h"
#include "../../libponyrt/mem/pool.h"
#include "ponyassert.h"
#include <string.h>
enum lvalue_t {
NOT_LVALUE, // when the left value is something that cannot be assigned to
LVALUE, // when the left value is something that can be assigned to
ERR_... | 1 | 14,469 | @jemc , this is one change needed in `generate_multi_dot_name`. I believe this * will do no harm to working pony code: The new code was added in a place where it is throwing an assert. So no working code will get affected. * is in sync with the rest of the method: if the parent ast node has null `data`, we are supposed... | ponylang-ponyc | c |
@@ -88,6 +88,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.apache.solr.common.params.CommonParams.SORT;
+import static org.apache.solr.common.params.QueryElevationParams.ONLY_ELEVATED_REPRESENTATIVE;
/**
| 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,870 | Should not be a static import. | apache-lucene-solr | java |
@@ -288,13 +288,13 @@ func (client *APIECSClient) getCustomAttributes() []*ecs.Attribute {
func (client *APIECSClient) SubmitTaskStateChange(change api.TaskStateChange) error {
// Submit attachment state change
- if change.Attachments != nil {
+ if change.Attachment != nil {
var attachments []*ecs.AttachmentSta... | 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... | 1 | 16,872 | should we be using `aws.String` here? it seems there are a few other spots we could use `aws.String` in the `if change.Attachment != nil { ...` block. | aws-amazon-ecs-agent | go |
@@ -66,7 +66,9 @@ function DashboardTopEarningPagesWidget( { Widget, WidgetReportZero, WidgetRepor
return {
isAdSenseLinked: select( MODULES_ANALYTICS ).getAdsenseLinked(),
- analyticsMainURL: select( MODULES_ANALYTICS ).getServiceURL(),
+ analyticsMainURL: select( MODULES_ANALYTICS ).getServiceReportURL( ... | 1 | /**
* DashboardTopEarningPagesWidget 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/licen... | 1 | 36,219 | We can't pass raw dates like this because they need to be formatted as `YYYYMMDD` as noted in the IB. We added the `generateDateRangeArgs` utilities to handle this for us, as well as abstracting the relationship between arg name and specific dates which is not obvious just by looking at it. Let's update it to use `gene... | google-site-kit-wp | js |
@@ -313,6 +313,8 @@ class worker(Config):
no_install_shutdown_handler = BoolParameter(default=False,
description='If true, the SIGUSR1 shutdown handler will'
'NOT be install on the worker')
+ save_summary_data = Bo... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 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 | 14,202 | `default=True` shouldn't be used for BoolParameters iirc. | spotify-luigi | py |
@@ -35,6 +35,10 @@ func parsePrettyFormatLog(repo *Repository, logByts []byte) (*list.List, error)
}
func RefEndName(refStr string) string {
+ if strings.HasPrefix(refStr, "refs/heads/") {
+ return strings.TrimPrefix(refStr, "refs/heads/")
+ }
+
index := strings.LastIndex(refStr, "/")
if index != -1 {
retur... | 1 | // Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package git
import (
"bytes"
"container/list"
"fmt"
"os"
"path/filepath"
"strings"
)
const prettyLogFormat = `--pretty=format:%H`
func parsePrettyFor... | 1 | 9,602 | It would be better to use `return refStr[12:]`. or `11`... I have problem with counting.. | gogs-gogs | go |
@@ -211,9 +211,7 @@ func ruleHash(state *core.BuildState, target *core.BuildTarget, runtime bool) []
for _, licence := range target.Licences {
h.Write([]byte(licence))
}
- for _, output := range target.TestOutputs {
- h.Write([]byte(output))
- }
+
for _, output := range target.OptionalOutputs {
h.Write([]b... | 1 | // Utilities to help with incremental builds.
//
// There are four things we consider for each rule:
// - the global config, some parts of which affect all rules
// - the rule definition itself (the command to run, etc)
// - any input files it might have
// - any dependencies.
//
// If all of those are the same as ... | 1 | 10,047 | Pretty sure these should only contribute to the runtime hash. | thought-machine-please | go |
@@ -1,4 +1,4 @@
-<div id="ncr-layout">
+<div id="gsa18f-layout">
<table class="w-container main-container" width='800'>
<tr>
<td> | 1 | <div id="ncr-layout">
<table class="w-container main-container" width='800'>
<tr>
<td>
<h1 class="communicart_header"><%= title %>: <%= cart.proposal.name %></h1>
<div class="communicart_description">
<p>
Requested by:
<strong><%= cart.requester.full_name %>... | 1 | 12,755 | Just verifying: this change doesn't break the 18f layout, right? | 18F-C2 | rb |
@@ -120,14 +120,6 @@ func (c call) endStats(elapsed time.Duration, err error, isApplicationError bool
counter.Inc()
}
return
- case yarpcerrors.CodeOK:
- // If we got "CodeOK" it really means that this is not a yarpcError, in
- // which case this is another level of "unknown" error.
- c.edge.serverErrLaten... | 1 | // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 15,268 | we should keep this counter using the "isYarpcError" api | yarpc-yarpc-go | go |
@@ -28,16 +28,16 @@ import org.apache.iceberg.Schema;
import org.apache.iceberg.StructLike;
import org.apache.iceberg.relocated.com.google.common.base.Objects;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
-import org.apache.iceberg.relocated.com.google.common.collect.Maps;
import org.ap... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 38,583 | Could we just use case insensitive strings as keys instead of creating a new map implementation? e.g. simply using a treemap with a comparator `Map<String, Integer> idToPos = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);` could work I think | apache-iceberg | java |
@@ -67,7 +67,14 @@ namespace OpenTelemetry.Context
/// <returns>The slot previously registered.</returns>
public static RuntimeContextSlot<T> GetSlot<T>(string name)
{
- return (RuntimeContextSlot<T>)Slots[name];
+ if (Slots.TryGetValue(name, out var slot) && slot is Run... | 1 | // <copyright file="RuntimeContext.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... | 1 | 16,328 | I think this should be a throw. Or the method should be TryGetSlot? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -3991,7 +3991,15 @@ int LuaScriptInterface::luaGameLoadMap(lua_State* L)
{
// Game.loadMap(path)
const std::string& path = getString(L, 1);
- g_dispatcher.addTask(createTask(std::bind(&Game::loadMap, &g_game, path)));
+ g_dispatcher.addTask(createTask( [path]() {
+ try {
+ g_game.loadMap(path);
+ } catch (c... | 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; eith... | 1 | 15,180 | We don't usually put spaces between ( and [, and I think `path` should be passed by reference. | otland-forgottenserver | cpp |
@@ -419,12 +419,11 @@ int Zone::SaveTempItem(uint32 merchantid, uint32 npcid, uint32 item, int32 charg
if (!ml.origslot) {
ml.origslot = ml.slot;
}
-
- if (charges > 0) {
+ bool IsStackable = database.GetItem(item)->Stackable;
+ if ((IsStackable && charges > 0) || (!IsStackable && sold)) {
... | 1 | /* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
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; version 2 of the License.
This program... | 1 | 10,352 | Make sure to `snake_case` locally scoped variable names in the future | EQEmu-Server | cpp |
@@ -56,6 +56,7 @@ type LogsConfig struct {
// RoutingRule holds the path to route requests to the service.
type RoutingRule struct {
Path string `yaml:"path"`
+ HealthCheckPath string `yaml:"healthcheck"`
}
// AutoScalingConfig is the configuration to scale the service with target tracking scaling policies. | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package manifest
import (
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/template"
)
const (
lbFargateManifestPath = "lb-fargate-service/manifest.yml"
// LogRetentionInDays is the default log retenti... | 1 | 12,299 | Maybe we should use underscores like `health_check` - what do you think? | aws-copilot-cli | go |
@@ -139,6 +139,12 @@ func (v *volumeAPIOpsV1alpha1) read(volumeName string) (*v1alpha1.CASVolume, err
vol.Namespace = hdrNS
}
+ // use sc name from header if present
+ scName := v.req.Header.Get(string(v1alpha1.StorageClassKey))
+ if scName != "" {
+ vol.Annotations[string(v1alpha1.StorageClassKey)] = scName
+ ... | 1 | package server
import (
"fmt"
"net/http"
"strings"
"github.com/golang/glog"
"github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1"
"github.com/openebs/maya/pkg/template"
"github.com/openebs/maya/pkg/volume"
)
type volumeAPIOpsV1alpha1 struct {
req *http.Request
resp http.ResponseWriter
}
// volumeV1alpha1... | 1 | 8,828 | Do a TrimSpace before setting. | openebs-maya | go |
@@ -41,6 +41,9 @@ type ENI struct {
// PrivateDNSName is the dns name assigned by the vpc to this eni
PrivateDNSName string `json:",omitempty"`
+ // SubnetGatewayIPV4Address is the address to the subnet gateway for
+ // the eni
+ SubnetGatewayIPV4Address string `json:",omitempty"`
}
// GetIPV4Addresses return... | 1 | // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... | 1 | 20,052 | Are the fields in this struct grouped by IP address family or by function? There are separate fields for IPv4Addresses and IPv6Addresses, but a single field for DomainNameServers. Should this new field be named SubnetGatewayAddress with type array consisting of both IPv4 and IPv6 gateways? | aws-amazon-ecs-agent | go |
@@ -38,7 +38,7 @@ class LinkTest < ActiveSupport::TestCase
new_link.revive_or_create
end
- deleted_link = Link.find(link)
+ deleted_link = Link.where(id: link.id).first
deleted_link.title.must_equal new_title
deleted_link.link_category_id.must_equal Link::CATEGORIES[:Forums]
end | 1 | require 'test_helper'
class LinkTest < ActiveSupport::TestCase
it 'must raise an error when no editor' do
skip 'Integrate alongwith acts_as_editable'
-> { create(:link) }.must_raise(ActiveRecord::Acts::Editable::MissingEditorError)
end
it 'must create a link' do
link = create(:link, project: project... | 1 | 6,974 | .find(id) is being deprecated to Rails 5. | blackducksoftware-ohloh-ui | rb |
@@ -4,6 +4,9 @@ import datetime
from itertools import product
import iris
+from iris.coords import DimCoord
+from iris.cube import CubeList
+from iris.experimental.equalise_cubes import equalise_attributes
from iris.util import guess_coord_axis
import numpy as np | 1 | from __future__ import absolute_import
import datetime
from itertools import product
import iris
from iris.util import guess_coord_axis
import numpy as np
from .interface import Interface, DataError
from .grid import GridInterface
from ..dimension import Dimension
from ..element import Element
from ..ndmapping impo... | 1 | 21,185 | Will be good to have the iris interface moved to geoviews. Could this be done for 1.10.6? | holoviz-holoviews | py |
@@ -152,7 +152,10 @@ func (cs *ClientServerImpl) Connect() error {
request, _ := http.NewRequest("GET", parsedURL.String(), nil)
// Sign the request; we'll send its headers via the websocket client which includes the signature
- utils.SignHTTPRequest(request, cs.AgentConfig.AWSRegion, ServiceName, cs.CredentialPr... | 1 | // 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 in the "license... | 1 | 20,065 | does this get wrapped in the calling method? | aws-amazon-ecs-agent | go |
@@ -195,6 +195,8 @@ class DictAuth(unittest.TestCase):
subprocess.check_output(
store_cmd, encoding="utf-8", errors="ignore")
+ # TODO: This test should not test case-insensivity, only the successful
+ # group authorization. The permission tests should do that.
def test_group_... | 1 | #
# -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# -------------------------------------------------... | 1 | 13,568 | Do we still need this test case? If your new test cases test this, then we can remove it. | Ericsson-codechecker | c |
@@ -641,6 +641,15 @@ class Plan < ActiveRecord::Base
User.joins(:roles).where('roles.plan_id = ? AND roles.access IN (?)', self.id, vals).first
end
+ ##
+ # returns the shared roles of a plan, excluding the creator
+ def shared
+ role_values = Role.access_values_for(:commenter)
+ .c... | 1 | class Plan < ActiveRecord::Base
include ConditionalUserMailer
before_validation :set_creation_defaults
##
# Associations
belongs_to :template
has_many :phases, through: :template
has_many :sections, through: :phases
has_many :questions, through: :sections
has_many :themes, through: :questions
has_m... | 1 | 17,122 | If you want to express "any role that is not creator" you could use the following statement: Role.where(plan: self).where(Role.not_creator_condition).any? which would be less verbose and a bit more efficient if it is used for Yes/No shared? | DMPRoadmap-roadmap | rb |
@@ -188,14 +188,12 @@ func migrateJSONFile(from, to string) (bool, error) {
if len(chain) == 0 {
return nil, nil
}
- // The chain is in one of three states:
+ // The chain is in one of two states:
// 1) single self-signed cert
- // 2) single upstream-signed cert, implying upstream_bundle=false
- // 3) ... | 1 | package ca
import (
"crypto/x509"
"encoding/json"
"encoding/pem"
"io/ioutil"
"os"
"sort"
"sync"
"time"
"github.com/golang/protobuf/proto"
"github.com/spiffe/spire/pkg/common/diskutil"
"github.com/spiffe/spire/proto/private/server/journal"
"github.com/spiffe/spire/proto/spire/common"
"github.com/zeebo/err... | 1 | 14,290 | Do we need any update on the test side? | spiffe-spire | go |
@@ -4663,6 +4663,10 @@ func (fbo *folderBranchOps) notifyOneOpLocked(ctx context.Context,
return nil
}
}
+ // Cancel any block prefetches for unreferenced blocks.
+ for _, ptr := range op.Unrefs() {
+ fbo.config.BlockOps().Prefetcher().CancelPrefetch(ptr.ID)
+ }
fbo.observers.batchChanges(ctx, changes)
... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"os"
"reflect"
"strings"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 18,605 | There's a few `return nil` cases above this -- we should probably move this above the big switch. | keybase-kbfs | go |
@@ -33,6 +33,19 @@ func (tile TransactionInLedgerError) Error() string {
return fmt.Sprintf("transaction already in ledger: %v", tile.Txid)
}
+// LeaseInLedgerError is returned when a transaction cannot be added because it has a lease that already being used in the relavant rounds
+type LeaseInLedgerError struct {... | 1 | // Copyright (C) 2019-2020 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) ... | 1 | 40,589 | `lile *LeaseInLedgerError` to reduce copying? | algorand-go-algorand | go |
@@ -76,6 +76,8 @@ public abstract class NewSessionQueuer implements HasReadyState, Routable {
.with(requiresSecret),
get("/se/grid/newsessionqueuer/queue/size")
.to(() -> new GetNewSessionQueueSize(tracer, this)),
+ get("/se/grid/newsessionqueue")
+ .to(() -> new GetSessionQueue(tra... | 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 | 18,614 | should it be `newsessionqueue` or `newsessionqueuer`? In case we'd like to be consistent | SeleniumHQ-selenium | java |
@@ -35,9 +35,9 @@ namespace Microsoft.VisualStudio.TestPlatform.Utilities.Helpers
}
/// <inheritdoc/>
- public Stream GetStream(string filePath, FileMode mode)
+ public Stream GetStream(string filePath, FileMode mode, FileAccess access = FileAccess.ReadWrite)
{
- re... | 1 | // 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.Utilities.Helpers
{
using System;
using System.Collections.Generic;
using System.IO;
using Sys... | 1 | 11,368 | We don't have a requirement anywhere in Test Platform for GetStream() with write access. It is ok to directly change `return new FileStream(filePath, mode, FileAccess.Read)`. | microsoft-vstest | .cs |
@@ -22,12 +22,17 @@
import os
import os.path
import textwrap
+import string
+import functools
+import operator
import attr
import yaml
import pytest
import bs4
+import qutebrowser.browser.hints
+
def collect_tests():
basedir = os.path.dirname(__file__) | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 19,780 | FWIW `from qutebrowser.browser import hints` is okay - it's just things like `from qutebrowser.browser.hints import HintManager` I try to avoid. | qutebrowser-qutebrowser | py |
@@ -11,7 +11,12 @@
namespace HFG;
use HFG\Core\Builder\Header as HeaderBuilder;
+
+$transparent_header_class = '';
+if ( get_theme_mod( 'neve_transparent_header', false ) ) {
+ $transparent_header_class = ' neve-tansparent-header';
+}
?>
-<div id="header-grid" class="<?php echo esc_attr( get_builder( HeaderBuilde... | 1 | <?php
/**
* Template used for header rendering.
*
* Name: Header Footer Grid
*
* @version 1.0.0
* @package HFG
*/
namespace HFG;
use HFG\Core\Builder\Header as HeaderBuilder;
?>
<div id="header-grid" class="<?php echo esc_attr( get_builder( HeaderBuilder::BUILDER_NAME )->get_property( 'panel' ) ); ?> site-... | 1 | 19,234 | @preda-bogdan let's use a filter for the header classes, something like, hfg_header_classes where we hook this logic, in neve pro | Codeinwp-neve | php |
@@ -21,7 +21,7 @@ import (
"time"
"github.com/containernetworking/plugins/pkg/ip"
- "k8s.io/api/core/v1"
+ corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/informers" | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 22,207 | Out of curiosity.. is there a rule to determine the package name as prevDirectory+currentDirectory. | antrea-io-antrea | go |
@@ -53,7 +53,9 @@ get_xmm_vals(priv_mcontext_t *mc)
#ifdef X86
if (preserve_xmm_caller_saved()) {
ASSERT(proc_has_feature(FEATURE_SSE));
- if (YMM_ENABLED())
+ if (ZMM_ENABLED())
+ get_zmm_caller_saved(&mc->simd[0]);
+ else if (YMM_ENABLED())
get_ymm_caller_sa... | 1 | /* **********************************************************
* Copyright (c) 2013-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 | 18,006 | It seems this needs to check the lazy cxt switching flag. It is used on the initial thread for early injection and in other places where the lazy switch should apply. | DynamoRIO-dynamorio | c |
@@ -21,9 +21,10 @@ import { isValidPropertyID } from './validation';
/**
* Parses the bits of a valid property ID into an object of its components.
*
+ * See: https://support.google.com/analytics/answer/7372977.
+ *
* @since 1.8.0
*
- * @see {@link https://support.google.com/analytics/answer/7372977}
* @para... | 1 | /**
* Property ID parser.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* ... | 1 | 32,160 | Why not use the JSdoc annotation as it did before? | google-site-kit-wp | js |
@@ -108,7 +108,11 @@ public class ParseUtil {
String version = packageImplementationVersion;
String edition = ProcessEngineDetails.EDITION_COMMUNITY;
- if (version != null && version.contains("-ee")) {
+ if (version == null){
+ version = ProductPropertiesUtil.getProductVersion();
+ }
+
+ if... | 1 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 1 | 11,663 | Why don't we drop the packageImplementationVersion in general? That way the version will be fetch all that time only from the properties file and it will be consistent. | camunda-camunda-bpm-platform | java |
@@ -1076,6 +1076,9 @@ class CppGenerator : public BaseGenerator {
code_ += " };";
}
+ // Found fields with union type.
+ std::vector<const FieldDef*> union_fields;
+
// Generate the accessors.
for (auto it = struct_def.fields.vec.begin();
it != struct_def.fields.vec.end(); ++it)... | 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,338 | Please use the style of the rest of the code, a space between the type and `*` | google-flatbuffers | java |
@@ -25,6 +25,8 @@ namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer.UnitTests
private MockProcessManager mockProcessManager;
+
+
[TestInitialize]
public void TestInit()
{ | 1 | // Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer.UnitTests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.TestPlatform.VsTestConsole.TranslationLayer.Interfaces;
... | 1 | 11,179 | nit: remove extra blank lines. | microsoft-vstest | .cs |
@@ -39,6 +39,7 @@ const (
appEnvOptionNone = "None (run in default VPC)"
defaultDockerfilePath = "Dockerfile"
imageTagLatest = "latest"
+ taskGroupNameDefault = "copilot-task"
)
const ( | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"path/filepath"
awscloudformation "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation"
"github.com/aws/copilot-cli/internal/pkg/aws/cloudwatchlogs"
"github.co... | 1 | 14,549 | nit: What do you think of `copilot-task-group`? | aws-copilot-cli | go |
@@ -156,6 +156,7 @@ export function setProperty(dom, name, value, oldValue, isSvg) {
*/
function eventProxy(e) {
this._listeners[e.type + false](options.event ? options.event(e) : e);
+ if (e.type === 'input' || e.type === 'change') this.value = this._prevValue || '';
}
function eventProxyCapture(e) { | 1 | import { IS_NON_DIMENSIONAL } from '../constants';
import options from '../options';
/**
* Diff the old and new properties of a VNode and apply changes to the DOM node
* @param {import('../internal').PreactElement} dom The DOM node to apply
* changes to
* @param {object} newProps The new props
* @param {object} o... | 1 | 16,269 | We should check whether or not the input node has a value since we can just have an onChange on an uncontrolled component as well. | preactjs-preact | js |
@@ -13,7 +13,7 @@ how the API has changed as well as the range of API versions supported by this b
"""
CURRENT = (buildVersion.version_year, buildVersion.version_major, buildVersion.version_minor)
-BACK_COMPAT_TO = (2019, 3, 0)
+BACK_COMPAT_TO = (2021, 1, 0)
"""
As BACK_COMPAT_TO is incremented, the changed / rem... | 1 | #A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2018 NV Access Limited
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import buildVersion
import re
from logHandler import log
"""
This module contains add-on API version information for this build of... | 1 | 31,429 | I think there should be some reasoning below this line about the version updating. | nvaccess-nvda | py |
@@ -371,6 +371,17 @@ static int on_body(h2o_http1client_t *client, const char *errstr)
return 0;
}
+static char compress_hint_to_enum(const char *val, size_t len)
+{
+ if (!strncasecmp("ON", val, len)) {
+ return H2O_COMPRESS_HINT_ENABLE;
+ }
+ if (!strncasecmp("OFF", val, len)) {
+ retur... | 1 | /*
* Copyright (c) 2014,2015 DeNA Co., Ltd., Kazuho Oku, Masahiro Nagano
*
* 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... | 1 | 11,681 | Please use `h2o_lcstris` instead of `strncasecmp` so that the comparison would be a complete match (instead of a prefix match; current code would yield true if [val,len] is ["O", 1]) and that it would be locale-independent. | h2o-h2o | c |
@@ -333,7 +333,13 @@ var _ fbmHelper = (*folderBranchOps)(nil)
// newFolderBranchOps constructs a new folderBranchOps object.
func newFolderBranchOps(config Config, fb FolderBranch,
bType branchType) *folderBranchOps {
- nodeCache := newNodeCacheStandard(fb)
+ var nodeCache NodeCache
+ if config.Mode() != InitMinim... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"os"
"reflect"
"strings"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 16,221 | I prefer if possible for `if`/`else` statements to have the positive case first. | keybase-kbfs | go |
@@ -33,9 +33,18 @@ from scapy.base_classes import BasePacketList
## Tools ##
###########
+def issubtype(x, t):
+ """issubtype(C, B) -> bool
+
+ Return whether C is a class and if it is a subclass of class B.
+ When using a tuple as the second argument issubtype(X, (A, B, ...)),
+ is a shortcut for issub... | 1 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
General utility functions.
"""
from __future__ import absolute_import
from __future__ import print_function
import o... | 1 | 12,513 | Docstring would be nice | secdev-scapy | py |
@@ -23,6 +23,7 @@ import org.gradle.api.provider.ListProperty;
public class BaselineErrorProneExtension {
private static final ImmutableList<String> DEFAULT_PATCH_CHECKS = ImmutableList.of(
// Baseline checks
+ "CatchBlockLogException",
"ExecutorSubmitRunnableFutureIgnored",
... | 1 | /*
* (c) Copyright 2019 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 | 7,814 | Low risk to fix this by default because existing baseline consumers pass this check. We don't attempt to fix checks that have been opted out of. | palantir-gradle-baseline | java |
@@ -77,7 +77,16 @@ void OpenMPTargetInternal::impl_finalize() {
Kokkos::kokkos_free<Kokkos::Experimental::OpenMPTargetSpace>(
space.m_uniquetoken_ptr);
}
-void OpenMPTargetInternal::impl_initialize() { m_is_initialized = true; }
+void OpenMPTargetInternal::impl_initialize() {
+ m_is_initialized = true;
... | 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 | 29,167 | What about `VOLTA72`, `TURING75`, `AMPERE80` and `AMPERE86`? We only want to set the number of teams for these two architectures or for all the architectures newer than Maxwell? | kokkos-kokkos | cpp |
@@ -1,7 +1,7 @@
# model settings
model = dict(
type='FasterRCNN',
- pretrained='modelzoo://resnet50',
+ pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50, | 1 | # model settings
model = dict(
type='FasterRCNN',
pretrained='modelzoo://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[256, ... | 1 | 18,522 | Since we have specified `load_from`, `pretrained` can be left None. | open-mmlab-mmdetection | py |
@@ -71,6 +71,9 @@ func logParse(c *caddy.Controller) ([]*Rule, error) {
},
Format: DefaultLogFormat,
})
+ } else if len(args) > 3 {
+ // Maxiumum number of args in log directive is 3.
+ return nil, c.ArgErr()
} else {
// Path scope, output file, and maybe a format specified
| 1 | package log
import (
"strings"
"github.com/mholt/caddy"
"github.com/mholt/caddy/caddyhttp/httpserver"
)
// setup sets up the logging middleware.
func setup(c *caddy.Controller) error {
rules, err := logParse(c)
if err != nil {
return err
}
for _, rule := range rules {
for _, entry := range rule.Entries {... | 1 | 10,848 | I prefer to translate these `else if` into `switch` for more readability. | caddyserver-caddy | go |
@@ -3,12 +3,13 @@ class Api::V1::StatusesController < ApiController
def create
exercise.statuses.create!(user: resource_owner, state: params[:state])
+ exercise.update_trails_state_for(resource_owner)
render nothing: true
end
private
def exercise
- Exercise.find_by!(uuid: params[:exerc... | 1 | class Api::V1::StatusesController < ApiController
doorkeeper_for :all
def create
exercise.statuses.create!(user: resource_owner, state: params[:state])
render nothing: true
end
private
def exercise
Exercise.find_by!(uuid: params[:exercise_uuid])
end
end
| 1 | 12,496 | This can also be a local variable in `create`. | thoughtbot-upcase | rb |
@@ -1273,6 +1273,19 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e
}
}
+ // Create/Remove git-daemon-export-ok for git-daemon...
+ daemonExportFile := strings.Join([]string{repo.RepoPath(), `git-daemon-export-ok`}, "/")
+ if repo.IsPrivate {
+ // NOTE: Gogs doesn't act... | 1 | // Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models
import (
"bytes"
"errors"
"fmt"
"html/template"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"sort"
"strings"
"sync... | 1 | 10,966 | Why not use `path.Join`? | gogs-gogs | go |
@@ -7,4 +7,8 @@ if ( typeof global.googlesitekit === 'undefined' ) {
global.googlesitekit = {};
}
-global.googlesitekit.api = API;
+if ( typeof global.googlesitekit.api === 'undefined' ) {
+ global.googlesitekit.api = API;
+}
+
+export * from 'assets/js/googlesitekit/api'; | 1 | /**
* External dependencies
*/
import * as API from 'assets/js/googlesitekit/api';
if ( typeof global.googlesitekit === 'undefined' ) {
global.googlesitekit = {};
}
global.googlesitekit.api = API;
| 1 | 26,502 | Why not `export default API` instead? This ensures we export the same that we export on the global. | google-site-kit-wp | js |
@@ -552,7 +552,7 @@ def imread(filename, pixel_type=None, fallback_only=False):
increase_dimension=False
kwargs={'FileName':filename}
if pixel_type:
- imageIO = itk.ImageIOFactory.CreateImageIO(io_filename, itk.ImageIOFactory.ReadMode)
+ imageIO = itk.ImageIOFactory.CreateImageIO(io... | 1 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | 1 | 12,146 | This is a good change I think. It greatly helps reduce name conflicts. | InsightSoftwareConsortium-ITK | cpp |
@@ -46,6 +46,12 @@ type jetStreamCluster struct {
consumerResults *subscription
}
+// Used to guide placement of streams in clustered JetStream.
+type Placement struct {
+ Cluster string `json:"cluster"`
+ Tags []string `json:"tags,omitempty"`
+}
+
// Define types of the entry.
type entryOp uint8
| 1 | // Copyright 2020-2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,486 | cluster not having omitempty, does this imply that cluster is required? seems empty is valid so just checking | nats-io-nats-server | go |
@@ -758,3 +758,19 @@ func (c *Container) ShouldCreateWithSSMSecret() bool {
}
return false
}
+
+// MergeEnvironmentVariables appends additional envVarName:envVarValue pairs to
+// the the container's enviornment values structure
+func (c *Container) MergeEnvironmentVariables(secrets map[string]string) {
+ c.lock.L... | 1 | // 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 in the "license... | 1 | 21,176 | @aws/aws-ecs-agent, @yumex93: how concerned should we be about user provided envvar names clobbering existing envvars? i'm not convinced we should be doing additional validation here. | aws-amazon-ecs-agent | go |
@@ -0,0 +1,14 @@
+'use strict';
+
+function defineAspects(operation, aspects) {
+ aspects = new Set(aspects);
+ Object.defineProperty(operation, 'aspects', {
+ value: aspects,
+ writable: false
+ });
+ return aspects;
+}
+
+module.exports = {
+ defineAspects
+}; | 1 | 1 | 15,318 | nit: aspects are defined in `OperationBase`, should `defineAspects` live there as well? | mongodb-node-mongodb-native | js | |
@@ -5,12 +5,15 @@ from collections import OrderedDict
from kinto.core.permission import PermissionBase
from kinto.core.storage.postgresql.client import create_from_config
+from kinto.core.storage.postgresql.migrator import Migrator
logger = logging.getLogger(__name__)
+HERE = os.path.abspath(os.path.dirname(... | 1 | import logging
import os
from collections import OrderedDict
from kinto.core.permission import PermissionBase
from kinto.core.storage.postgresql.client import create_from_config
logger = logging.getLogger(__name__)
class Permission(PermissionBase):
"""Permission backend using PostgreSQL.
Enable in config... | 1 | 11,351 | Why the `os.path.abspath`? `os.path.dirname` should always give a valid directory path. | Kinto-kinto | py |
@@ -143,4 +143,8 @@ public class ControllerConfiguration {
settingsConfiguration.settingsManager()
);
}
+
+ public String getWineEnginesPath() {
+ return this.wineEnginesPath;
+ }
} | 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 | 9,544 | I think we should not consider special engine types on this level. I would prefer to build the specific engine path based on `application.user.engines` later on. | PhoenicisOrg-phoenicis | java |
@@ -78,6 +78,12 @@ bool IndexPolicyMaker::buildPolicy() {
if (exist == scanItems_.end()) {
break;
}
+ // Stop build policy when last operator is range scan,
+ // And other fields will use expression filtering.
+ auto it = scanItems_.rbegin()->second;
+ if (it.e... | 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 "storage/index/IndexPolicyMaker.h"
#include "utils/NebulaKeyUtils.h"
namespace nebula {
namespace storage {
cp... | 1 | 30,062 | Is `rbegin` correct? We can't make sure that the last index column is the `rbegin` of `scanItems`. | vesoft-inc-nebula | cpp |
@@ -108,6 +108,8 @@ func main() {
glog.Fatalln("EVM Network ID is not set, call config.New() first")
}
+ config.SetChainID(cfg.Chain.ID)
+
cfg.Genesis = genesisCfg
cfgToLog := cfg
cfgToLog.Chain.ProducerPrivKey = "" | 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 | 23,638 | check it is != 0, just like `EVMNetworkID` above | iotexproject-iotex-core | go |
@@ -186,6 +186,8 @@ namespace OpenTelemetry
this.shutdownDrainTarget = this.circularBuffer.AddedCount;
this.shutdownTrigger.Set();
+ OpenTelemetrySdkEventSource.Log.DroppedExportProcessorItems(nameof(BatchExportProcessor<T>), typeof(T).Name, this.exporter.GetType().Name, this.drop... | 1 | // <copyright file="BatchExportProcessor.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.a... | 1 | 21,322 | if you just do "this.GetType().Name" and "this.exporter.GetType().Name", we get what we need. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -26,16 +26,13 @@
*/
package com.salesforce.androidsdk.rest;
-import com.salesforce.androidsdk.R;
-import com.salesforce.androidsdk.app.SalesforceSDKManager;
/**
* This is where all the API version info lives. This allows us to change one
* line here and affect all our api calls.
*/
public class ApiVe... | 1 | /*
* Copyright (c) 2013, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice, this... | 1 | 13,797 | That's the code that would prevent any SalesforceSDKTest from running. At class loading time, SalesforceSDKManager.getInstance() would throw a RuntimeException because init() had never been called. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -34,4 +34,6 @@ public interface DefinitionConst {
String VERSION_RULE_LATEST = "latest";
String VERSION_RULE_ALL = "0.0.0+";
+
+ String DEFAULT_REVISION = "0";
} | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 8,340 | there is no "DEFAULT_REVISION" logic, no need to define this. | apache-servicecomb-java-chassis | java |
@@ -289,6 +289,9 @@ public class SalesforceSDKManager {
loginOptions = new LoginOptions(url, getPasscodeHash(), config.getOauthRedirectURI(),
config.getRemoteAccessConsumerKey(), config.getOauthScopes(), null, jwt);
}
+ } else {
+ loginOptions.set... | 1 | /*
* Copyright (c) 2014, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice, this... | 1 | 15,491 | so this is to fix a scenario where the app is first launched normally, then background and foreground through the link, we are not updating loginOption | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -322,6 +322,14 @@ class Application extends BaseApplication {
});
}
+ checkLayout(layout) {
+ if (layout === 'viewer') {
+ this.focusElement_('noteTextViewer');
+ } else {
+ this.focusElement_('noteBody');
+ }
+ }
+
async updateMenu(screen) {
if (this.lastMenuScreen_ === screen) return;
| 1 | require('app-module-path').addPath(__dirname);
const { BaseApplication } = require('lib/BaseApplication');
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
const Setting = require('lib/models/Setting.js');
const { shim } = require('lib/shim.js');
const MasterKey = require('lib/models/MasterKey');... | 1 | 13,250 | It doesn't seem like the right way to implement this, because you add a new element that doesn't really exist (noteTextViewer). Instead you should modify the command handler `if (command.name === 'focusElement' && command.target === 'noteBody') {` in NoteText.jsx. Then focus either the editor or the viewer depending on... | laurent22-joplin | js |
@@ -21,7 +21,12 @@ package org.apache.iceberg.avro;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
+
+import java.util.HashSet;
+import java.util.LinkedList;
import java.util.List;
+import java.util.Set;
+
import org.apache.avro.LogicalType;
import org.apache.avro.LogicalTyp... | 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 | 20,047 | We don't add blank lines in imports. | apache-iceberg | java |
@@ -1,7 +1,7 @@
# -*- coding: UTF-8 -*-
#addonHandler.py
#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2012-2018 Rui Batista, NV Access Limited, Noelia Ruiz Martínez, Joseph Lee, Babbage B.V.
+#Copyright (C) 2012-2019 Rui Batista, NV Access Limited, Noelia Ruiz Martínez, Joseph Lee, Babbage B.V.
#This ... | 1 | # -*- coding: UTF-8 -*-
#addonHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2012-2018 Rui Batista, NV Access Limited, Noelia Ruiz Martínez, Joseph Lee, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import sys
import os.path
... | 1 | 24,946 | Please add your name to the copyright list. | nvaccess-nvda | py |
@@ -243,6 +243,11 @@ func (r *replacer) getSubstitution(key string) string {
case "{path_escaped}":
u, _ := r.request.Context().Value(OriginalURLCtxKey).(url.URL)
return url.QueryEscape(u.Path)
+ case "{request_id}":
+ reqid, _ := r.request.Context().Value(RequestIDCtxKey).(string)
+ if reqid != "" {
+ retu... | 1 | package httpserver
import (
"bytes"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path"
"strconv"
"strings"
"time"
"github.com/mholt/caddy"
)
// requestReplacer is a strings.Replacer which is used to
// encode literal \r and \n characters and keep everything
// on one line
var re... | 1 | 11,001 | You can elide the `if` check for empty string, because if it's not a value that is set, the string will be empty anyway. | caddyserver-caddy | go |
@@ -1,8 +1,8 @@
/*global countlyVue, CV, countlyCommon, Promise, moment*/
(function(countlyPushNotification) {
- var messagesSentLabel = CV.i18n('push-notification.time-chart-serie-messages-sent');
- var actionsPerformedLabel = CV.i18n('push-notification.time-chart-serie-actions-performed');
+ var messages... | 1 | /*global countlyVue, CV, countlyCommon, Promise, moment*/
(function(countlyPushNotification) {
var messagesSentLabel = CV.i18n('push-notification.time-chart-serie-messages-sent');
var actionsPerformedLabel = CV.i18n('push-notification.time-chart-serie-actions-performed');
var StatusFinderHelper = {
... | 1 | 14,058 | Different i18n keys. By mistake or on purpose? | Countly-countly-server | js |
@@ -59,3 +59,18 @@ type SecretKeySelector struct {
const (
TLSCAKey = "ca.crt"
)
+
+// Describes how the ACME challenge self check behaves when it fails.
+type ACMESelfCheckFailurePolicy string
+
+const (
+ // The default failure policy. This policy will cause the request to be
+ // sent to the certificate provider... | 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 | 21,169 | Given the description for this is `// Describes how the ACME challenge self check behaves when it fails.`, perhaps `RetryForever` is better terminology here as when the check fails, we don't just wait, we retry periodically. | jetstack-cert-manager | go |
@@ -187,14 +187,14 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self,
gpg_error = gpgme_data_new_from_fd (&kdata, fd);
if (gpg_error != GPG_ERR_NO_ERROR)
{
- ot_gpgme_error_to_gio_error (gpg_error, error);
+ ot_gpgme_throw (gpg_error, error, "... | 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2011 Colin Walters <walters@verbum.org>
* Copyright (C) 2013 Sjoerd Simons <sjoerd.simons@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Publi... | 1 | 12,094 | Nit: let's add a more descriptive prefix in line with the other ones? E.g. `Unable to import key` ? | ostreedev-ostree | c |
@@ -13,6 +13,7 @@ describe Bolt::SSH do
let(:user) { ENV['BOLT_SSH_USER'] || "vagrant" }
let(:password) { ENV['BOLT_SSH_PASSWORD'] || "vagrant" }
let(:port) { ENV['BOLT_SSH_PORT'] || 2224 }
+ let(:key) { ENV['BOLT_SSH_KEY'] || Dir[".vagrant/**/private_key"] }
let(:command) { "pwd" }
let(:ssh) { Bolt::SS... | 1 | require 'spec_helper'
require 'bolt_spec/errors'
require 'bolt_spec/files'
require 'bolt/node'
require 'bolt/node/ssh'
require 'bolt/config'
describe Bolt::SSH do
include BoltSpec::Errors
include BoltSpec::Files
let(:hostname) { ENV['BOLT_SSH_HOST'] || "localhost" }
let(:user) { ENV['BOLT_SSH_USER'] || "vagra... | 1 | 7,054 | This looks like it will pass an array as `:key` in the default case. That doesn't reflect how this will actually work in practice. | puppetlabs-bolt | rb |
@@ -0,0 +1,11 @@
+#if NETFRAMEWORK
+namespace Datadog.Trace.IntegrationTests
+{
+ public static class Program
+ {
+ public static void Main()
+ {
+ }
+ }
+}
+#endif | 1 | 1 | 19,359 | Do we need this? | DataDog-dd-trace-dotnet | .cs | |
@@ -282,6 +282,11 @@ func (b *ofFlowBuilder) MatchConjID(value uint32) FlowBuilder {
return b
}
+func (b *ofFlowBuilder) MatchPriority(priority uint16) FlowBuilder {
+ b.Match.Priority = priority
+ return b
+}
+
// MatchProtocol adds match condition for matching protocol type.
func (b *ofFlowBuilder) MatchProtoc... | 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 | 18,904 | I am a bit confused about this function. If it is used to set priority, we actually use function "Table.BuildFlow(priority uint16)" to set the value. If it is used to parse the priority value, I think adding a property(if you don't want to consume Match.Priority directly) to cache it and consume that property should be... | antrea-io-antrea | go |
@@ -68,7 +68,7 @@ func main() {
}
// addUnresolvedPackage adds an unresolved node to the graph representing the
-// packged described in the PackgetVer structure. Returns an error if the node
+// packaged described in the PackgetVer structure. Returns an error if the node
// could not be created.
func addUnresolv... | 1 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package main
import (
"fmt"
"os"
"strings"
"gonum.org/v1/gonum/graph"
"gonum.org/v1/gonum/graph/topo"
"gopkg.in/alecthomas/kingpin.v2"
"microsoft.com/pkggen/internal/exe"
"microsoft.com/pkggen/internal/logger"
"microsoft.com/pkggen/i... | 1 | 15,157 | In this case we probably meant "package". | microsoft-CBL-Mariner | go |
@@ -0,0 +1,19 @@
+const fs = require('fs');
+const { promisify } = require('util');
+const { dirname: getDirName } = require('path');
+const makeDir = require('make-dir');
+const writeFile = promisify(fs.writeFile);
+
+/**
+ * Create file with given contents at specified location
+ * @method createFile
+ * @param {Stri... | 1 | 1 | 13,742 | Just export `createFile` directly. | dequelabs-axe-core | js | |
@@ -175,6 +175,7 @@ func DefaultConfiguration() *Configuration {
config.Docker.ResultsTimeout = cli.Duration(20 * time.Second)
config.Docker.RemoveTimeout = cli.Duration(20 * time.Second)
config.Go.GoTool = "go"
+ config.Go.BuildIdTool = "//tools/go_buildid_replacer"
config.Go.CgoCCTool = "gcc"
config.Go.GoPa... | 1 | // Utilities for reading the Please config files.
package core
import (
"crypto/sha1"
"encoding/gob"
"fmt"
"os"
"path"
"reflect"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/jessevdk/go-flags"
"gopkg.in/gcfg.v1"
"cli"
)
// OsArch is the os/arch pair, like linux_amd64 etc.
const OsA... | 1 | 8,290 | This probably needs to get shipped with plz; you shouldn't have to redefine it within the user's repo. It should use `defaultPath` like the other things up the top of the file. | thought-machine-please | go |
@@ -4,7 +4,7 @@ var run = function() {
var WalletKey = bitcore.WalletKey;
var Builder = bitcore.TransactionBuilder;
var opts = {
- network: networks.testnet
+ network: networks['btc'].testnet
};
console.log('## Network: ' + opts.network.name); | 1 | var run = function() {
bitcore = typeof(bitcore) === 'undefined' ? require('../bitcore') : bitcore;
var networks = require('../networks');
var WalletKey = bitcore.WalletKey;
var Builder = bitcore.TransactionBuilder;
var opts = {
network: networks.testnet
};
console.log('## Network: ' + opts.network.n... | 1 | 12,941 | interface for bitcoin should not change if possible. i.e: networks.testnet should return networks['btc'].testnet | bitpay-bitcore | js |
@@ -12,6 +12,7 @@ import (
"fmt"
"math/big"
"syscall"
+ "io/ioutil"
"github.com/golang/protobuf/proto"
"github.com/spf13/cobra" | 1 | // Copyright (c) 2019 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 17,564 | File is not `gofmt`-ed with `-s` (from `gofmt`) | iotexproject-iotex-core | go |
@@ -929,3 +929,17 @@ void wlr_surface_send_leave(struct wlr_surface *surface,
}
}
}
+
+static inline int64_t timespec_to_msec(const struct timespec *a) {
+ return (int64_t)a->tv_sec * 1000 + a->tv_nsec / 1000000;
+}
+
+void wlr_surface_send_frame_done(struct wlr_surface *surface,
+ const struct timespec *when) {... | 1 | #include <assert.h>
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/util/log.h>
#include <wlr/render/interface.h>
#include <wlr/types/wlr_surface.h>
#include <wlr/render/egl.h>
#include <wlr/render/matrix.h>
static void wlr_surface_state_reset_buffer(struct wlr_surface_state *state) {
if (state->buffer)... | 1 | 9,179 | We have this functions in a couple of places. It should probably live in util or something. | swaywm-wlroots | c |
@@ -53,6 +53,7 @@ module Mongoid
# The associated object will be replaced by the below update if non-nil, so only
# run the callbacks and state-changing code by passing persist: false in that case.
_target.destroy(persist: !replacement) if persistable?
+ ... | 1 | # frozen_string_literal: true
module Mongoid
module Association
module Embedded
class EmbedsOne
class Proxy < Association::One
# The valid options when defining this association.
#
# @return [ Array<Symbol> ] The allowed options when defining this association.
... | 1 | 13,506 | maybe this should be inside the destroy? | mongodb-mongoid | rb |
@@ -106,10 +106,17 @@ class RPN(BaseDetector):
list[np.ndarray]: proposals
"""
x = self.extract_feat(img)
+ # get origin input shape to onnx dynamic input shape
+ import torch
+ if torch.onnx.is_in_onnx_export():
+ img_shape = torch._shape_as_tensor(img)[2:... | 1 | import mmcv
from mmcv.image import tensor2imgs
from mmdet.core import bbox_mapping
from ..builder import DETECTORS, build_backbone, build_head, build_neck
from .base import BaseDetector
@DETECTORS.register_module()
class RPN(BaseDetector):
"""Implementation of Region Proposal Network."""
def __init__(self,
... | 1 | 23,032 | Do not import torch in the test function because it will import torch every test iteration and will slow down the testing speed. | open-mmlab-mmdetection | py |
@@ -69,11 +69,16 @@ func (s *Service) InstanceByTags(machine *actuators.MachineScope) (*v1alpha1.Ins
}
// InstanceIfExists returns the existing instance or nothing if it doesn't exist.
-func (s *Service) InstanceIfExists(id string) (*v1alpha1.Instance, error) {
- klog.V(2).Infof("Looking for instance %q", id)
+func... | 1 | /*
Copyright 2018 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 | 8,584 | I think we want to return an error here, not nil. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -38,6 +38,7 @@ describe( 'core/user userInfo', () => {
picture: 'https://path/to/image',
},
verified: true,
+ userInputState: 'complete',
};
let registry; | 1 | /**
* `core/user` data store: userInfo tests.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/license... | 1 | 33,076 | Nitpicking, but I think it would be more accurate to use an actually supported value, i.e. `completed`. | google-site-kit-wp | js |
@@ -0,0 +1,17 @@
+class OhAdmin::JobsController < ApplicationController
+ before_action :admin_session_required
+ before_action :find_project
+ layout 'admin'
+ helper JobApiHelper
+
+ def index
+ @response = JSON.parse(ApiJob.new(@project.id, params[:page]).get)
+ end
+
+ private
+
+ def find_project
+ @... | 1 | 1 | 9,234 | How about renaming the `ApiJob` class to `JobApi`. As per rails convention, get method is to get a single object, not a collection, can we change that to `fetch`/`where`. It would be great if we can move the `get` method to a class method. | blackducksoftware-ohloh-ui | rb | |
@@ -427,12 +427,14 @@ func TestCreateBlockchain(t *testing.T) {
require.NoError(registry.Register(account.ProtocolID, acc))
rp := rolldpos.NewProtocol(cfg.Genesis.NumCandidateDelegates, cfg.Genesis.NumDelegates, cfg.Genesis.NumSubEpochs)
require.NoError(registry.Register(rolldpos.ProtocolID, rp))
- bc := NewBlock... | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 19,433 | assignments should only be cuddled with other assignments (from `wsl`) | iotexproject-iotex-core | go |
@@ -54,3 +54,11 @@ func (c *Cache) Delete(key interface{}) error {
c.values.Delete(key)
return nil
}
+
+func (c *Cache) GetAll() ([]interface{}, error) {
+ return nil, cache.ErrUnimplemented
+}
+
+func (c *Cache) PutHash(k interface{}, v interface{}) error {
+ return cache.ErrUnimplemented
+} | 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 | 17,836 | `k` is unused in PutHash | pipe-cd-pipe | go |
@@ -39,7 +39,7 @@ interface StatementsSource extends FileSource
public function isStatic(): bool;
- public function getSource(): ?StatementsSource;
+ public function getSource(): StatementsSource;
public function getCodebase() : Codebase;
| 1 | <?php
namespace Psalm;
interface StatementsSource extends FileSource
{
public function getNamespace(): ?string;
/**
* @return array<string, string>
*/
public function getAliasedClassesFlipped(): array;
/**
* @return array<string, string>
*/
public function getAliasedClassesFli... | 1 | 9,164 | None of the child return null here, plus it was creating an incoherence between interfaces. | vimeo-psalm | php |
@@ -1076,7 +1076,7 @@ pony_ctx_t* ponyint_sched_init(uint32_t threads, bool noyield, bool nopin,
// If minimum thread count is > thread count, cap it at thread count
if(min_threads > threads)
- min_threads = threads;
+ min_threads = threads; // this becomes the equivalent of --ponynoscale
// convert ... | 1 | #define PONY_WANT_ATOMIC_DEFS
#include "scheduler.h"
#include "cpu.h"
#include "mpmcq.h"
#include "../actor/actor.h"
#include "../gc/cycle.h"
#include "../asio/asio.h"
#include "../mem/pagemap.h"
#include "../mem/pool.h"
#include "ponyassert.h"
#include <dtrace.h>
#include <string.h>
#include "mutemap.h"
#define PONY... | 1 | 13,880 | Should we remove this entirely now then? | ponylang-ponyc | c |
@@ -0,0 +1,17 @@
+package monitor
+
+import (
+ "github.com/weaveworks/weave/net/address"
+)
+
+// Monitor is an interface for tracking changes in ring allocations.
+type Monitor interface {
+ // HandleUpdate is called whenever an address ring gets updated.
+ //
+ // prevRanges corresponds to ranges which were owned by... | 1 | 1 | 12,733 | That is way too generic a name. | weaveworks-weave | go | |
@@ -49,4 +49,11 @@ describe('duplicate-id', function () {
assert.isTrue(checks['duplicate-id'].evaluate.call(checkContext, node));
});
+ it('should allow overwrote ids', function () {
+ fixture.innerHTML = '<form data-testelm="1" id="target"><input name="id"></form>';
+ var node = fixture.querySelector('[data-... | 1 | describe('duplicate-id', function () {
'use strict';
var fixture = document.getElementById('fixture');
var checkContext = {
_relatedNodes: [],
_data: null,
data: function (d) {
this._data = d;
},
relatedNodes: function (rn) {
this._relatedNodes = rn;
}
};
afterEach(function () {
fixture.inn... | 1 | 11,201 | This might be overkill for test code...but as stewards of accessibility it would be appropriate to have a label in the fixture. | dequelabs-axe-core | js |
@@ -232,7 +232,16 @@ TEST_F(VkBestPracticesLayerTest, CmdClearAttachmentTest) {
ASSERT_NO_FATAL_FAILURE(InitRenderTarget());
m_commandBuffer->begin();
- m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo);
+
+ auto* secondary_full_clear = new VkCommandBufferObj(m_device, m_commandPool, VK_COMMAND_... | 1 | /*
* Copyright (c) 2015-2021 The Khronos Group Inc.
* Copyright (c) 2015-2021 Valve Corporation
* Copyright (c) 2015-2021 LunarG, Inc.
* Copyright (c) 2015-2021 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Y... | 1 | 17,268 | Are these allocations necessary, or can these be instantiated normally (i.e., `VkCommandBufferObj secondary_full_clear(...)`). If the allocations _are_ necessar, I'd vote for using something like `std::unique_ptr` and then remove the associated `delete`s. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -43,6 +43,8 @@ public class InternalForTests {
public static void clear(ElasticsearchHttpStorage es) throws IOException {
es.clear();
+ // clear servicespan cache in order to prevent tests breaking
+ ((ElasticsearchHttpSpanConsumer)es.asyncSpanConsumer()).resetIndexToServiceSpansCache();
}
pu... | 1 | /**
* Copyright 2015-2017 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 ... | 1 | 12,358 | es.clear should call this | openzipkin-zipkin | java |
@@ -54,6 +54,10 @@ class TPTest(unittest.TestCase):
def tearDown(self):
shutil.rmtree(self._tmpDir)
+
+ def testInitDefaultTP(self):
+ self.assertTrue(isinstance(TP(), TP))
+
def testCheckpointLearned(self):
# Create a model and give it some inputs to learn. | 1 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | 1 | 15,921 | please remove. this is true by the definition of the Python language | numenta-nupic | py |
@@ -1239,6 +1239,8 @@ KEY_DATA = collections.OrderedDict([
('stop', ['<Ctrl-s>']),
('print', ['<Ctrl-Alt-p>']),
('open qute:settings', ['Ss']),
+ ('select-follow', ['<Return>']),
+ ('select-follow -t', ['<Ctrl-Return>']),
])),
('insert', collections.OrderedDict([ | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 13,037 | Hmm, I wonder if binding `<Return>` is a good idea... this means it wouldn't be passed to webpages anymore, which makes me wonder how many people rely on that... I guess trying it is the only way to find out :wink: | qutebrowser-qutebrowser | py |
@@ -170,10 +170,18 @@ func udpPkt(src, dst string) packet {
func icmpPkt(src, dst string) packet {
return packetWithPorts(1, src+":0", dst+":0")
}
+func icmpPkt_with_type_code(src, dst string, icmpType, icmpCode int) packet {
+ return packet{
+ protocol: 1,
+ srcAddr: src,
+ srcPort: 0,
+ dstAddr: dst,
+ ds... | 1 | // Copyright (c) 2020 Tigera, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... | 1 | 17,658 | Golang naming convention is to use camel case `icmpPktWithTypeCode` Often the linter will complain | projectcalico-felix | c |
@@ -300,6 +300,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
protected FrameResponseHeaders FrameResponseHeaders { get; } = new FrameResponseHeaders();
+ public TimeSpan RequestBodyTimeout { get; set; }
+
+ public double RequestBodyMinimumDataRate { get; set; }
+
+ ... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.Com... | 1 | 13,352 | nit: Probably should renamed to `InitializeBody` | aspnet-KestrelHttpServer | .cs |
@@ -11,13 +11,15 @@ export default Component.extend({
open: false,
- navMenuIcon: computed('config.blogUrl', function () {
- let url = `${this.get('config.blogUrl')}/favicon.png`;
+ navMenuIcon: computed('config.blogUrl', 'settings.icon', function () {
+ let blogIcon = this.get('settings.ic... | 1 | import Component from 'ember-component';
import {htmlSafe} from 'ember-string';
import injectService from 'ember-service/inject';
import computed from 'ember-computed';
import calculatePosition from 'ember-basic-dropdown/utils/calculate-position';
export default Component.extend({
tagName: 'nav',
classNames: [... | 1 | 8,045 | is `settings.icon` always null/undefined when there's no icon or does is it get set to a blank string? It might be worth wrapping it in an `isBlank()` anyway | TryGhost-Admin | js |
@@ -90,8 +90,9 @@ var Module = fx.Options(
fx.Provide(MetadataManagerProvider),
fx.Provide(NamespaceCacheProvider),
fx.Provide(serialization.NewSerializer),
- fx.Provide(ArchiverProviderProvider),
fx.Provide(ArchivalMetadataProvider),
+ fx.Provide(ArchiverProviderProvider),
+ fx.Invoke(RegisterBootstrapContaine... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 12,832 | put invoke to the end of the list, and other module at beginning of the list (line 86) | temporalio-temporal | go |
@@ -166,7 +166,7 @@ func New(path string, baseKey []byte, o *Options, logger logging.Logger) (db *DB
if db.capacity == 0 {
db.capacity = defaultCapacity
}
- db.logger.Infof("db capacity: %v", db.capacity)
+ db.logger.Infof("database capacity: %d chunks, %d bytes, %.2f megabytes.", db.capacity, db.capacity*swarm.... | 1 | // Copyright 2018 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | 1 | 10,558 | I think that bytes is too precise. Can we just calculate the approximate value in appropriate units? Something like MB, GB depending on the value, `db capacity: 5000000 chunks (approximately 20GB)` . | ethersphere-bee | go |
@@ -0,0 +1,4 @@
+let label = node.getAttribute('alt');
+let text = node.textContent;
+
+return (!!label && axe.commons.text.sanitize(label).trim() !== '' && axe.commons.text.sanitize(text).trim() !== ''); | 1 | 1 | 11,880 | This check shouldn't look at the content, you're already doing this with `none-empty-text`. I also think this check should be renamed to `none-empty-alt` or something like it. There is nothing specific to applets in this check to warrant putting `applet` in the check ID. | dequelabs-axe-core | js | |
@@ -31,9 +31,11 @@ class TaxCreationForm extends BaseForm
protected $taxEngine = null;
- public function __construct(Request $request, $type = "form", $data = array(), $options = array(), TaxEngine $taxEngine = null)
+ public function __construct(Request $request, $type = "form", $data = array(), $option... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 10,722 | Why did you change the signature of this method ? You can break BC doing that | thelia-thelia | php |
@@ -49,6 +49,12 @@ func Run(ctx context.Context, cfg *config.Node) error {
}
template := configToml
+
+ if cfg.ConfigTemplate != "" {
+ fileBytes, _ := ioutil.ReadFile(cfg.ConfigTemplate)
+ template = string(fileBytes[:])
+ }
+
if !cfg.NoFlannel {
template += configCNIToml
} | 1 | package containerd
import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"syscall"
"time"
"github.com/containerd/containerd"
"github.com/containerd/containerd/namespaces"
"github.com/natefinch/lumberjack"
util2 "github.com/rancher/k3s/pkg/agent/util"
"github.com/rancher/k3s... | 1 | 7,287 | can you catch the error here please and return err if it can't read the template | k3s-io-k3s | go |
@@ -58,6 +58,7 @@ public class MainController {
appsController.setOnAppLoaded(() -> {
enginesController.loadEngines();
containersController.loadContainers();
+ libraryController.updateLibrary();
});
appsController.loadApps(); | 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,635 | Is this method called at another location too? I'm just asking because you didn't remove another call to `updateLibrary` | PhoenicisOrg-phoenicis | java |
@@ -14,7 +14,7 @@ class PublicPagePolicy < ApplicationPolicy
end
def template_export?
- @object.is_default || @object.org.funder?
+ @object.present? && ( @object.is_default || @object.org.funder? ) && @object.published
end
def plan_export? | 1 | class PublicPagePolicy < ApplicationPolicy
def initialize(object, object2 = nil)
@object = object
@object2 = object2
end
def plan_index?
true
end
def template_index?
true
end
def template_export?
@object.is_default || @object.org.funder?
end
def plan_export?
@object.public... | 1 | 18,300 | Not necessary but you should be able to add a `?` on `is_default?` and `published?` | DMPRoadmap-roadmap | rb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.