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 |
|---|---|---|---|---|---|---|---|
@@ -88,6 +88,12 @@ class TestHeaders:
headers = Headers(Host="foobarfoo.com", Accept="foo/bar")
replacements = headers.replace("foo", "bar", count=1)
assert replacements == 1
+ assert headers["Host"] == "barbarfoo.com"
+ assert headers["Accept"] == "foo/bar"
+ replacement... | 1 | import collections
import pytest
from mitmproxy.net.http.headers import Headers, parse_content_type, assemble_content_type
class TestHeaders:
def _2host(self):
return Headers(
(
(b"Host", b"example.com"),
(b"host", b"example.org")
)
)
d... | 1 | 14,670 | This test does not really verify that we're doing the correct thing now, is it? It seems to pass with and without the patch. | mitmproxy-mitmproxy | py |
@@ -16,7 +16,13 @@ const BlocksTopic = "/fil/blocks"
const MessageTopic = "/fil/msgs"
// AddNewBlock processes a block on the local chain and publishes it to the network.
-func (node *Node) AddNewBlock(ctx context.Context, b *types.Block) error {
+func (node *Node) AddNewBlock(ctx context.Context, b *types.Block) (... | 1 | package node
import (
"context"
"gx/ipfs/QmSFihvoND3eDaAYRCeLgLPt62yCPgMZs1NSZmKFEtJQQw/go-libp2p-floodsub"
"gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors"
"github.com/filecoin-project/go-filecoin/types"
)
// BlocksTopic is the pubsub topic identifier on which new blocks are announced.
const Blo... | 1 | 11,777 | should just be able to defer the call directly here too | filecoin-project-venus | go |
@@ -916,7 +916,7 @@ class LayoutPlot(GenericLayoutPlot, CompositePlot):
# Create title handle
if self.show_title and len(self.coords) > 1:
- title = self.handles['fig'].suptitle('', **self._fontsize('title'))
+ title = self.handles['fig'].suptitle('', y=1.05, **self._fontsize('... | 1 | from __future__ import division
from collections import defaultdict
import numpy as np
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D # noqa (For 3D plots)
from matplotlib import pyplot as plt
from matplotlib import gridspec, animation
import param
from ...core import (OrderedDict, HoloMap, Adjoint... | 1 | 14,259 | Is this a magic number? I assume this makes it look better. | holoviz-holoviews | py |
@@ -88,8 +88,8 @@ func (ob *Outbox) Send(ctx context.Context, from, to address.Address, value type
msgSendErrCt.Inc(ctx, 1)
}
ob.journal.Write("Send",
- "to", to.String(), "from", from.String(), "value", value.AsBigInt().Uint64(), "method", method,
- "gasPrice", gasPrice.AsBigInt().Uint64(), "gasLimit", u... | 1 | package message
import (
"context"
"sync"
"github.com/filecoin-project/go-address"
"github.com/ipfs/go-cid"
"github.com/pkg/errors"
"github.com/filecoin-project/go-filecoin/internal/pkg/block"
"github.com/filecoin-project/go-filecoin/internal/pkg/journal"
"github.com/filecoin-project/go-filecoin/internal/pkg... | 1 | 22,887 | Would welcome a stringification method on big.Int in specs-actors | filecoin-project-venus | go |
@@ -49,6 +49,8 @@ type (
WorkingSet interface {
// states and actions
RunActions(context.Context, uint64, []action.SealedEnvelope) (hash.Hash32B, map[hash.Hash32B]*action.Receipt, error)
+ RunAction(context.Context, action.SealedEnvelope) (*action.Receipt, error)
+ PersistBlockLevelInfo(blockHeight uint64) ha... | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 14,757 | PersistBlockLevelInfo -> UpdateBlockLevelInfo | iotexproject-iotex-core | go |
@@ -0,0 +1,10 @@
+_base_ = [
+ 'retinanet_pvt_t_fpn_1x_coco.py',
+]
+model = dict(
+ backbone=dict(
+ num_layers=[3, 4, 6, 3],
+ init_cfg=dict(
+ type='Pretrained',
+ checkpoint='https://github.com/whai362/PVT/'
+ 'releases/download/v2/pvt_small.pth'))) | 1 | 1 | 25,014 | Type is redundant since it is inherited. | open-mmlab-mmdetection | py | |
@@ -94,6 +94,10 @@ public class TiTableInfo implements Serializable {
primaryKeyColumn = primaryKey;
}
+ public boolean isNotView() {
+ return this.viewInfo == null;
+ }
+
public boolean isView() {
return this.viewInfo != null;
} | 1 | /*
* Copyright 2017 PingCAP, 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 ... | 1 | 11,042 | better use `!isView()` so that we don't need to modify multiple lines in future. | pingcap-tispark | java |
@@ -43,6 +43,12 @@ module RSpec
extend RSpec::Core::Warnings
+ class << self
+ # Setters for shared global objects
+ # @api private
+ attr_writer :configuration, :world
+ end
+
# Used to ensure examples get reloaded and user configuration gets reset to
# defaults between multiple runs in the sam... | 1 | # rubocop:disable Style/GlobalVars
$_rspec_core_load_started_at = Time.now
# rubocop:enable Style/GlobalVars
require 'rbconfig'
require "rspec/support"
RSpec::Support.require_rspec_support "caller_filter"
RSpec::Support.define_optimized_require_for_rspec(:core) { |f| require_relative f }
%w[
version
warnings
... | 1 | 14,389 | I know you don't usually open up the singleton class, but I was getting a `private method called` error when trying to use `self.attr_writer` - any idea? | rspec-rspec-core | rb |
@@ -273,8 +273,13 @@ define(['apphost', 'globalize'], function (appHost, globalize) {
},
canRate: function (item) {
+ var itemType = item.Type;
+
+ if (item.Type === 'Program' || item.Type === 'Timer' || item.Type === 'SeriesTimer' || item.Type === 'CollectionFolder' || item.Ty... | 1 | define(['apphost', 'globalize'], function (appHost, globalize) {
'use strict';
function getDisplayName(item, options) {
if (!item) {
throw new Error("null item passed into getDisplayName");
}
options = options || {};
if (item.Type === 'Timer') {
item =... | 1 | 12,124 | There's no need to create a new variable here, the other checks just use the item type directly. | jellyfin-jellyfin-web | js |
@@ -19,6 +19,14 @@ class Product < ActiveRecord::Base
where product_type: 'book'
end
+ def self.workshops
+ where product_type: 'workshop'
+ end
+
+ def self.videos
+ where product_type: 'video'
+ end
+
def self.ordered
order("name asc")
end | 1 | class Product < ActiveRecord::Base
has_many :purchases
has_many :downloads
has_many :classifications, as: :classifiable
has_many :topics, through: :classifications
has_many :videos
validates_presence_of :name, :sku, :individual_price, :company_price, :fulfillment_method
accepts_nested_attributes_for :dow... | 1 | 6,564 | Any other possible names? Feels like going with "workshop" for this product_type could increase the confusion between course/workshop in the codebase. | thoughtbot-upcase | rb |
@@ -114,7 +114,10 @@ const baseResolvers = {
return;
}
- yield fetchGetURLChannelsStore.actions.fetchGetURLChannels( accountID, clientID );
+ const { error } = yield fetchGetURLChannelsStore.actions.fetchGetURLChannels( accountID, clientID );
+ if ( error ) {
+ yield errorStoreActions.receiveError( error,... | 1 | /**
* `modules/adsense` data store: URL channels.
*
* 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/lic... | 1 | 36,633 | @eugene-manuilov Isn't this already taken care of by `fetchGetURLChannels` via `createFetchStore`? Why is the extra `receiveError` call needed here? (This was already in the IB, but just struck me while reviewing here.) | google-site-kit-wp | js |
@@ -22,6 +22,7 @@ import time
from concurrent import futures
import grpc
+import googlecloudprofiler
from google.cloud.forseti.common.util import logger
| 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 34,627 | nit: should go before `grpc`? | forseti-security-forseti-security | py |
@@ -71,7 +71,7 @@ func init() {
}
func testWorkflow() *Workflow {
- ctx, cancel := context.WithCancel(context.Background())
+ cancel := make(chan struct{})
return &Workflow{
Name: testWf,
GCSPath: testGCSPath, | 1 | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 6,318 | Why not using the Cancel? I thought cancelling a "parent" context would cascade to "children" contexts, cancelling them as well. In short, how does cancel work? | GoogleCloudPlatform-compute-image-tools | go |
@@ -28,10 +28,12 @@ func (w *contentTypeOverridingResponseWriter) overrideMimeType(
// by the frontend WebView.
ty := strings.ToLower(mimeType)
switch {
- // First reject anything containing javascript/xml/html.
+ // First anything textual as text/plain.
+ // Includes javascript, html, xml. (note that the type ma... | 1 | // Copyright 2018 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 libhttpserver
import (
"net/http"
"strings"
)
type contentTypeOverridingResponseWriter struct {
original http.ResponseWriter
}
var _ http.ResponseWriter = ... | 1 | 20,189 | Could you explain why we default to binary now? It seems it's safer to default to text to avoid stuff getting executed or parsed by browsers accidentally. If we need to add support for particular types, we can add them explicitly right? | keybase-kbfs | go |
@@ -139,6 +139,8 @@ type Config struct {
MetadataAddr string `config:"hostname;127.0.0.1;die-on-fail"`
MetadataPort int `config:"int(0,65535);8775;die-on-fail"`
+ OpenstackRegion string `config:"string;;local"`
+
InterfacePrefix string `config:"iface-list;cali;non-zero,die-on-fail"`
InterfaceExclude strin... | 1 | // Copyright (c) 2016-2018 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 ap... | 1 | 16,662 | Bit worried about the prefix since this seem to be being used for non-Openstack data too (host endpoints). Should we just leave host endpoint status at the old path (or remove it since AIFAIK, it's not used anywhere)? | projectcalico-felix | c |
@@ -68,7 +68,7 @@ public class Timeline {
private static final Pattern TIMECODE_LINK_REGEX = Pattern.compile("antennapod://timecode/((\\d+))");
private static final String TIMECODE_LINK = "<a class=\"timecode\" href=\"antennapod://timecode/%d\">%s</a>";
- private static final Pattern TIMECODE_REGEX = Pat... | 1 | package de.danoeh.antennapod.core.util.playback;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.Log;
import android.util.Typed... | 1 | 14,492 | This might be a silly question, but what happens to files with durations > 24 hours? | AntennaPod-AntennaPod | java |
@@ -92,7 +92,7 @@ namespace OpenTelemetry.Trace
/// <returns>Returns <see cref="TracerProviderBuilder"/> for chaining.</returns>
internal static TracerProviderBuilder AddDiagnosticSourceInstrumentation<TInstrumentation>(
this TracerProviderBuilder tracerProviderBuilder,
- Func<... | 1 | // <copyright file="TracerProviderBuilderExtensions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// h... | 1 | 19,242 | `AddDiagnosticSourceInstrumentation` method can now be eliminated and simply use `AddInstrumentation` | open-telemetry-opentelemetry-dotnet | .cs |
@@ -78,9 +78,9 @@ describe Bolt::Project do
describe "with namespaced project names" do
let(:config) { { 'name' => 'puppetlabs-foo' } }
- it "strips namespace and hyphen" do
- project = Bolt::Project.new(config, pwd)
- expect(project.name).to eq('foo')
+ it "raises an error" do
+ ... | 1 | # frozen_string_literal: true
require 'spec_helper'
require 'bolt/project'
describe Bolt::Project do
it "loads from system-wide config path if homedir expansion fails" do
allow(File).to receive(:expand_path).and_call_original
allow(File)
.to receive(:expand_path)
.with(File.join('~', '.puppetlab... | 1 | 15,094 | I think we also need to add `name:` to the bolt-project.yaml files in `spec/fixtures/projects`. | puppetlabs-bolt | rb |
@@ -3225,6 +3225,11 @@ func (fbo *folderBranchOps) getAndApplyMDUpdates(ctx context.Context,
return nil
}
+// getUnmergedMDUpdates returns a slice of the unmerged MDs for this
+// TLF's current unmerged branch and unmerged branch, between the
+// merge point for the branch and the current head. The returned MDs
+... | 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"
"reflect"
"strings"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/logger"
keybase1 "github.... | 1 | 11,456 | worth mentioning the same warning here as in `md_util.go`, I think. | keybase-kbfs | go |
@@ -134,8 +134,12 @@ func (p *Provisioner) GetNodeObjectFromHostName(hostName string) (*v1.Node, erro
Limit: 1,
}
nodeList, err := p.kubeClient.CoreV1().Nodes().List(listOptions)
- if err != nil {
- return nil, errors.Errorf("Unable to get the Node with the NodeHostName")
+ if err != nil || nodeList.Ite... | 1 | /*
Copyright 2019 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 18,411 | Do we need both the checks, for `Items` not nil and `len(Items)` | openebs-maya | go |
@@ -349,6 +349,14 @@ ActiveRecord::Schema.define(version: 20160927192531) do
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
+ create_table "test_client_requests", force: :cascade do |t|
+ t.decimal "amount"
+ t.string "project_title"
+ t.integer "approving_offic... | 1 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | 1 | 17,963 | Do you know what this is coming from? It keeps getting deleted/created @nickbristow | 18F-C2 | rb |
@@ -63,11 +63,7 @@ public class FlinkCatalogFactory implements CatalogFactory {
public static final String ICEBERG_CATALOG_TYPE_HADOOP = "hadoop";
public static final String ICEBERG_CATALOG_TYPE_HIVE = "hive";
- public static final String HIVE_URI = "uri";
- public static final String HIVE_CLIENT_POOL_SIZE = ... | 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 | 26,606 | Nit: leaving these in place would have reduce the number of files that this needed to touch, and avoided a possible problem removing public fields. I don't think it's worth blocking for this change, but we like to keep patches as small as possible by not breaking references like these. | apache-iceberg | java |
@@ -444,6 +444,7 @@ class AdminController extends Controller
*/
protected function prePersistEntity($entity)
{
+ @trigger_error(sprintf('The %s is deprecated since EasyAdmin 1.x and will be removed in 2.0 veresion. Use persistEntity instead', __METHOD__), E_USER_DEPRECATED);
}
/** | 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 EasyCorp\Bundle\EasyAdminBundle\Controller;
use Doctrine\DBAL\Excep... | 1 | 11,342 | `The %s is deprecated...` -> `The %s method is deprecated...` | EasyCorp-EasyAdminBundle | php |
@@ -19,6 +19,9 @@ import (
"github.com/filecoin-project/go-filecoin/internal/pkg/encoding"
)
+// TODO: If this is gonna stay, it should move to specs-actors
+const BlockMessageLimit = 512
+
// Block is a block in the blockchain.
type Block struct {
// control field for encoding struct as an array | 1 | package block
import (
"encoding/json"
"fmt"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
fbig "github.com/filecoin-project/specs-actors/actors/abi/big"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
... | 1 | 23,749 | No, it wouldn't go there because that code won't reference or enforce it. Here is ok for now. | filecoin-project-venus | go |
@@ -127,7 +127,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client
}
catch (Exception exception)
{
- var completeArgs = new TestRunCompleteEventArgs(null, false, true, exception, new Collection<AttachmentSet>(), TimeSpan.Zero);
+ ... | 1 | // Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework;
... | 1 | 11,370 | How will we show that test run aborted (because of a crash) if we don't set aborted to true? | microsoft-vstest | .cs |
@@ -18,8 +18,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
internal sealed class SocketConnection : TransportConnection
{
- private const int MinAllocBufferSize = 2048;
- public readonly static bool IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows... | 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.Buffers;
using System.Diagnostics;
using System.IO;
using System.IO.Pipelines;
using System.Net;
using System.Net.Sockets;
u... | 1 | 15,406 | Nit: Might as well make this same change to AdaptedPipeline. | aspnet-KestrelHttpServer | .cs |
@@ -42,12 +42,13 @@ public class IcebergTimestampWithZoneObjectInspector extends AbstractPrimitiveJa
@Override
public OffsetDateTime convert(Object o) {
- return o == null ? null : OffsetDateTime.ofInstant(((Timestamp) o).toInstant(), ZoneOffset.UTC);
+ return o == null ? null : OffsetDateTime.of(((Timest... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 34,260 | Just to clarify: I see that only the hive2 withZone object inspector is changed. Does that mean that the predicate pushdown problem only occurred on hive2? | apache-iceberg | java |
@@ -11,7 +11,7 @@ module Bolt
class ModuleInstaller
class Specs
class ForgeSpec
- NAME_REGEX = %r{\A[a-z][a-z0-9_]*[-/](?<name>[a-z][a-z0-9_]*)\z}.freeze
+ NAME_REGEX = %r{\A[a-zA-Z0-9]+[-/](?<name>[a-z][a-z0-9_]*)\z}.freeze
REQUIRED_KEYS = Set.new(%w[name]).freeze
K... | 1 | # frozen_string_literal: true
require 'semantic_puppet'
require 'set'
require 'bolt/error'
# This class represents a Forge module specification.
#
module Bolt
class ModuleInstaller
class Specs
class ForgeSpec
NAME_REGEX = %r{\A[a-z][a-z0-9_]*[-/](?<name>[a-z][a-z0-9_]*)\z}.freeze
REQUI... | 1 | 16,725 | Based on username requirements for forge.puppet.com - only letters and digits permitted. | puppetlabs-bolt | rb |
@@ -73,11 +73,6 @@ public class StructLikeWrapper {
return false;
}
- int len = struct.size();
- if (len != that.struct.size()) {
- return false;
- }
-
return comparator.compare(this.struct, that.struct) == 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 ... | 1 | 23,412 | Was this removed to ignore the extra columns coming from the file projection? | apache-iceberg | java |
@@ -1,3 +1,5 @@
+// +build !windows
+
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); | 1 | // Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 15,963 | Please can you pull out the shared function into a shared file? I think that'd be pretty easy to do for this module. I think you could: - pull out a function `configureSyslog` that is implemented on Linux, but stubbed on Windows - pull out a function `openLogFile` that is implemented differently on each - share everyth... | projectcalico-felix | c |
@@ -26,6 +26,6 @@ public class NotificationServiceFactoryImpl implements NotificationServiceFactor
@Override
public NotificationService create() {
- return new EmailNotificationService();
+ return new EmailNotificationService(new AWSEmailProvider());
}
} | 1 | /*
* Copyright 2019 Oath Holdings 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 agr... | 1 | 4,931 | Instead of hardcoding the AWSEmailProvider here, it should come from properties, so that it can be replaced with another EmailProvider for ZMS vs ZTS | AthenZ-athenz | java |
@@ -0,0 +1,10 @@
+require_relative '../config/environment'
+
+login = ARGV[0] || :admin_user
+password = ARGV[1] || :admin_password
+email = ARGV[2] || 'admin@example.com'
+
+account = Account.create!(login: login, level: 10, activated_at: Time.current,
+ email: email, email_confirmation: email... | 1 | 1 | 9,003 | +1 for creating this script to help people get boot strapped | blackducksoftware-ohloh-ui | rb | |
@@ -7,6 +7,7 @@ export const ASYNC_RENDER = 3;
export const ATTR_KEY = '__preactattr_';
+export const ELT_KEY_PREFIX = 'preact-';
// DOM properties that should NOT have "px" added when numeric
export const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; | 1 | // render modes
export const NO_RENDER = 0;
export const SYNC_RENDER = 1;
export const FORCE_RENDER = 2;
export const ASYNC_RENDER = 3;
export const ATTR_KEY = '__preactattr_';
// DOM properties that should NOT have "px" added when numeric
export const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[... | 1 | 11,457 | Do you need the prefix? | preactjs-preact | js |
@@ -10558,7 +10558,12 @@ short CmpSeabaseDDL::unregisterNativeTable
objectNamePart.data(),
objType
);
-
+
+ // drop comment text
+ retcode = deleteFromTextTable(&cliInterface,
+ objUID,
+ ComTextType::COM_OBJECT_COMMENT_TEXT,
+ ... | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// 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. ... | 1 | 21,304 | if retcode is < 0, it should return -1 indicating an error. | apache-trafodion | cpp |
@@ -1,5 +1,5 @@
"""Emit a message for iteration through dict keys and subscripting dict with key."""
-# pylint: disable=line-too-long,missing-docstring,unsubscriptable-object,too-few-public-methods,redefined-outer-name,use-dict-literal
+# pylint: disable=locally-disabled,useless-suppression,suppressed-message,line-too... | 1 | """Emit a message for iteration through dict keys and subscripting dict with key."""
# pylint: disable=line-too-long,missing-docstring,unsubscriptable-object,too-few-public-methods,redefined-outer-name,use-dict-literal
def bad():
a_dict = {1: 1, 2: 2, 3: 3}
for k in a_dict: # [consider-using-dict-items]
... | 1 | 19,988 | Are those necessary? I feel like `useless-suppression` could be avoided here? | PyCQA-pylint | py |
@@ -309,13 +309,11 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
if (codecProfile.Type === 'Audio') {
(codecProfile.Conditions || []).map(function (condition) {
if (condition.Condition === 'LessThanEqual' && condition.Property === ... | 1 | define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'playQueueManager', 'userSettings', 'globalize', 'connectionManager', 'loading', 'apphost', 'screenfull'], function (events, datetime, appSettings, itemHelper, pluginManager, PlayQueueManager, userSettings, globalize, connectionManager, loading... | 1 | 14,664 | Is this equivalent in JavaScript? | jellyfin-jellyfin-web | js |
@@ -16,8 +16,8 @@ void GetEdgeIndexProcessor::process(const cpp2::GetEdgeIndexReq& req) {
auto edgeIndexIDRet = getIndexID(spaceID, indexName);
if (!nebula::ok(edgeIndexIDRet)) {
auto retCode = nebula::error(edgeIndexIDRet);
- LOG(ERROR) << "Get Edge Index SpaceID: " << spaceID << " Index Name: " << index... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "meta/processors/index/GetEdgeIndexProcessor.h"
namespace nebula {
namespace meta {
void GetEdgeIndexProcessor::process(const cpp2::GetEdgeIndexReq& req) {
auto spaceID = req.get_space_i... | 1 | 33,170 | get/list operation is not schema change, it is supposed to use VLOG | vesoft-inc-nebula | cpp |
@@ -92,7 +92,7 @@ namespace System.Diagnostics.Metrics
T delta,
params KeyValuePair<string, object?>[] tags)
{
- this.RecordMeasurement(delta, tags);
+ this.RecordMeasurement(delta, new ReadOnlySpan<KeyValuePair<string, object?>>(tags));
}
}
} | 1 | // <copyright file="Counter.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.apache.org/lic... | 1 | 20,240 | we'll need to delete this whole file, right? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -41,6 +41,13 @@ public interface Table {
/**
* Refresh the current table metadata.
+ *
+ * <p>If this table is associated with a TransactionalCatalog, this refresh will be bounded by
+ * the visibility that the {@code IsolationLevel} of that transaction exposes. For example, if
+ * we are in a conte... | 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 | 29,003 | "this table hasn't mutated within this transaction" may sound like implying that if this transaction contains table mutation changes, `refresh` may have impact, which I think is not true? I guess what you were saying was if other transactions committed to this table successfully when this transaction is half way throug... | apache-iceberg | java |
@@ -143,6 +143,18 @@ const (
VenafiPickupIDAnnotationKey = "venafi.cert-manager.io/pickup-id"
)
+// TODO
+const (
+ // TODO
+ CertificateSigningRequestDurationAnnotationKey = "cert-manager.io/request-duration"
+
+ // TODO
+ CertificateSigningRequestIsCAAnnotationKey = "cert-manager.io/request-is-ca"
+
+ // TODO
+ ... | 1 | /*
Copyright 2020 The cert-manager 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 | 26,919 | Can we move these into some kind of experimental API group? I don't think we want to call them `v1` just yet :) | jetstack-cert-manager | go |
@@ -31,6 +31,8 @@ class Section < ActiveRecord::Base
include ActsAsSortable
include VersionableModel
+ # Sort order: Number ASC
+ default_scope { order(number: :asc) }
# ================
# = Associations = | 1 | # frozen_string_literal: true
# == Schema Information
#
# Table name: sections
#
# id :integer not null, primary key
# description :text
# modifiable :boolean
# number :integer
# title :string
# created_at :datetime
# updated_at :datetime
# phase_id :i... | 1 | 18,781 | I think this makes a lot of sense but we may want to highlight the change for people doing UAT in case the ordering of sections is off anywhere when customizing or using the drag-drop feature | DMPRoadmap-roadmap | rb |
@@ -0,0 +1,4 @@
+var script = document.createElement('script')
+script.type = 'text/javascript'
+script.src = '{}'
+document.head.appendChild(script) | 1 | 1 | 18,012 | These files should in `/javascript/brython` | SeleniumHQ-selenium | rb | |
@@ -265,7 +265,7 @@ runLoop:
continue
}
s.close(err)
- break runLoop
+ continue
}
// This is a bit unclean, but works properly, since the packet always
// begins with the public header and we never copy it. | 1 | package quic
import (
"errors"
"fmt"
"net"
"sync/atomic"
"time"
"github.com/lucas-clemente/quic-go/ackhandler"
"github.com/lucas-clemente/quic-go/congestion"
"github.com/lucas-clemente/quic-go/flowcontrol"
"github.com/lucas-clemente/quic-go/frames"
"github.com/lucas-clemente/quic-go/handshake"
"github.com/... | 1 | 6,121 | I'm not sure this is the right fix - I'd be more happy with a `continue`. That way, we don't enter the code at the bottom of the run loop (e.g. sending packets). Keep in mind that this error here may be triggered by a peer doing something security-relevant, so I don't think we should do much more work other than sendin... | lucas-clemente-quic-go | go |
@@ -107,7 +107,11 @@ bool load_model::load_model_weights(const std::string& ckpt_dir,
closedir(weight_dir);
// load weights that appear in weight list.
- m->reload_weights(active_ckpt_dir, weight_list);
+ // load weights that appear in weight list.
+ // for(auto&& w : m_weights) {
+ // w->load_from_save(l... | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 15,934 | Can we fix this, or is it going to stay broken. | LLNL-lbann | cpp |
@@ -57,7 +57,6 @@ except Exception:
# to avoid copying:
-@attr('postgres')
class CopyToTestDB(postgres.CopyToTable):
host = host
database = database | 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 | 13,668 | Is there a reason to remove this attr? | spotify-luigi | py |
@@ -0,0 +1,19 @@
+package config
+
+import (
+ "github.com/kubeedge/beehive/pkg/common/config"
+ "github.com/kubeedge/beehive/pkg/common/log"
+ "github.com/kubeedge/kubeedge/cloud/edgecontroller/pkg/devicecontroller/constants"
+)
+
+// MessageLayer used, context or ssmq, default is context
+var MessageLayer string
+
+f... | 1 | 1 | 9,878 | log message should be started with upper-case word. | kubeedge-kubeedge | go | |
@@ -17,6 +17,9 @@ const (
// aim to create chunks of 20 bits or about 1MiB on average.
averageBits = 20
+ // default buffer size
+ bufSize = 512 * KiB
+
// MinSize is the minimal size of a chunk.
MinSize = 512 * KiB
// MaxSize is the maximal size of a chunk. | 1 | package chunker
import (
"errors"
"hash"
"io"
"sync"
)
const (
KiB = 1024
MiB = 1024 * KiB
// WindowSize is the size of the sliding window.
windowSize = 64
// aim to create chunks of 20 bits or about 1MiB on average.
averageBits = 20
// MinSize is the minimal size of a chunk.
MinSize = 512 * KiB
// Ma... | 1 | 6,486 | I guess this is not needed anymore now? | restic-restic | go |
@@ -24,7 +24,7 @@
#include "h2o.h"
static ssize_t add_header(h2o_mem_pool_t *pool, h2o_headers_t *headers, h2o_iovec_t *name, const char *orig_name, const char *value,
- size_t value_len, h2o_header_flags_t flags)
+ size_t value_len)
{
h2o_header_t *slot;
| 1 | /*
* Copyright (c) 2014 DeNA Co., Ltd.
*
* 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, publ... | 1 | 13,671 | I think I would prefer retaining the argument. It's true that we are not using it now, but it's harmless, it's good to have a constructor function that accepts all the field values as arguments. Performance-wise, it does not matter. | h2o-h2o | c |
@@ -836,8 +836,11 @@ Blockly.Gesture.prototype.duplicateOnDrag_ = function() {
try {
// Note: targetBlock_ should have no children. If it has children we would
// need to update shadow block IDs to avoid problems in the VM.
+ // Resizes will be reenabled at the end of the drag.
+ this.startWorkspace... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2017 Google Inc.
* https://developers.google.com/blockly/
*
* 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.apach... | 1 | 8,776 | Is this a different fix? | LLK-scratch-blocks | js |
@@ -45,10 +45,12 @@ func (s *DaemonServer) SetDNSServer(ctx context.Context,
}
// backup the /etc/resolv.conf
- cmd := bpm.DefaultProcessBuilder("sh", "-c", fmt.Sprintf("ls %s.chaos.bak || cp %s %s.chaos.bak", DNSServerConfFile, DNSServerConfFile, DNSServerConfFile)).
- SetNS(pid, bpm.MountNS).
- SetContex... | 1 | // Copyright 2020 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 19,117 | Why not add a `EnterNS` filed instead of `WithoutNS`? | chaos-mesh-chaos-mesh | go |
@@ -27,6 +27,13 @@ import (
)
var _ = Describe("Endpoints", func() {
+ const (
+ ProtoUDP = 17
+ ProtoIPIP = 4
+ VXLANPort = 0
+ VXLANVNI = 0
+ )
+
for _, trueOrFalse := range []bool{true, false} {
kubeIPVSEnabled := trueOrFalse
var rrConfigNormalMangleReturn = Config{ | 1 | // Copyright (c) 2017-2018 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 16,990 | Same points as in other test file. | projectcalico-felix | go |
@@ -158,6 +158,16 @@ void SettingsStruct_tmpl<N_TASKS>::ApDontForceSetup(bool value) {
bitWrite(VariousBits1, 14, value);
}
+template<unsigned int N_TASKS>
+bool SettingsStruct_tmpl<N_TASKS>::JSONBoolWithQuotes() const {
+ return bitRead(VariousBits1, 15);
+}
+
+template<unsigned int N_TASKS>
+void SettingsStruc... | 1 | #include "../DataStructs/SettingsStruct.h"
#include "../Globals/Plugins.h"
#include "../Globals/CPlugins.h"
#include "../CustomBuild/ESPEasyLimits.h"
#include "../DataStructs/DeviceStruct.h"
#include "../../ESPEasy_common.h"
template<unsigned int N_TASKS>
SettingsStruct_tmpl<N_TASKS>::SettingsStruct_tmpl() : ResetFac... | 1 | 21,651 | I have a PR pending, can you change this bit index to `16`? | letscontrolit-ESPEasy | cpp |
@@ -310,11 +310,12 @@ public class JavaParserInterfaceDeclaration extends AbstractTypeDeclaration impl
private ResolvedReferenceType toReferenceType(ClassOrInterfaceType classOrInterfaceType) {
SymbolReference<? extends ResolvedTypeDeclaration> ref = null;
- if (classOrInterfaceType.toString().in... | 1 | /*
* Copyright 2016 Federico Tomassetti
*
* 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 | 12,345 | we should probably have some utility class for this sort of things | javaparser-javaparser | java |
@@ -1,4 +1,4 @@
-#pylint: disable=missing-docstring, no-else-return, invalid-name, unused-variable, superfluous-parens
+#pylint: disable=missing-docstring, no-else-return, invalid-name, unused-variable, superfluous-parens, try-except-raise
"""Testing inconsistent returns"""
import math
import sys | 1 | #pylint: disable=missing-docstring, no-else-return, invalid-name, unused-variable, superfluous-parens
"""Testing inconsistent returns"""
import math
import sys
# These ones are consistent
def explicit_returns(var):
if var >= 0:
return math.sqrt(var)
else:
return None
def explicit_returns2(var)... | 1 | 9,926 | Curious that I'm not seeing any occurrence of the new error check in this file. Why was it disabled? | PyCQA-pylint | py |
@@ -341,6 +341,13 @@ class Realm {
*/
static deleteFile(config) { }
+ /**
+ * Checks if the Realm already exists on disk.
+ * @param {Realm~Configuration} config The configuration for the Realm.
+ * @throws {Error} if anything in the provided `config` is invalid.
+ */
+ static exists(... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm 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/li... | 1 | 17,866 | does it return something? | realm-realm-js | js |
@@ -265,7 +265,7 @@ const withData = (
// If we have an error, display the DataErrorComponent.
if ( error ) {
- return ( 'string' !== typeof error ) ? error : getDataErrorComponent( moduleName, error, layoutOptions.inGrid, layoutOptions.fullWidth, layoutOptions.createGrid );
+ return ( 'string' !== type... | 1 | /**
* withData higher-order component.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICEN... | 1 | 30,436 | This function is also called in various Site Kit module components, where the error object (here `data`) also needs to be passed, otherwise the link to fix the issue won't appear. | google-site-kit-wp | js |
@@ -14,6 +14,8 @@ var log = logging.MustGetLogger("scm")
// An SCM represents an SCM implementation that we can ask for various things.
type SCM interface {
+ // DescribeIdentifier returns the string that is a "human-readable" identifier of the given revision.
+ DescribeIdentifier(sha string) string
// CurrentRev... | 1 | // Package scm abstracts operations on various tools like git
// Currently, only git is supported.
package scm
import (
"path"
"gopkg.in/op/go-logging.v1"
"github.com/thought-machine/please/src/fs"
)
var log = logging.MustGetLogger("scm")
// An SCM represents an SCM implementation that we can ask for various th... | 1 | 8,931 | super nit: `revision string` (the passed value might not be a SHA hash). | thought-machine-please | go |
@@ -54,7 +54,7 @@ namespace NLog.Layouts
/// Is this layout initialized? See <see cref="Initialize(NLog.Config.LoggingConfiguration)"/>
/// </summary>
internal bool IsInitialized;
- private bool _scannedForObjects;
+ internal bool _scannedForObjects;
/// <summary>
... | 1 | //
// Copyright (c) 2004-2021 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen
//
// 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 s... | 1 | 22,595 | @snakefoot why is internal needed? | NLog-NLog | .cs |
@@ -190,11 +190,14 @@ func (s *server) startService() common.Daemon {
}
params.PublicClient, err = sdkclient.NewClient(sdkclient.Options{
- HostPort: s.cfg.PublicClient.HostPort,
- Namespace: common.SystemLocalNamespace,
- MetricsScope: params.MetricScope,
- Logger: l.Ne... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 9,986 | Why were we disabling health checks before? | temporalio-temporal | go |
@@ -22,7 +22,7 @@ def check_src_files_have_test():
def check_test_files_have_src():
unknown_test_files = []
- excluded = ['test/mitmproxy/data/', 'test/mitmproxy/net/data/', '/tservers.py']
+ excluded = ['test/mitmproxy/data/', 'test/mitmproxy/net/data/', '/tservers.py', '/conftest.py']
test_files = ... | 1 | import os
import re
import glob
import sys
def check_src_files_have_test():
missing_test_files = []
excluded = ['mitmproxy/contrib/', 'mitmproxy/test/', 'mitmproxy/tools/', 'mitmproxy/platform/']
src_files = glob.glob('mitmproxy/**/*.py', recursive=True) + glob.glob('pathod/**/*.py', recursive=True)
... | 1 | 13,481 | did `conftest.py` actually show up for you? `test_files` should never contain it... | mitmproxy-mitmproxy | py |
@@ -561,7 +561,8 @@ StmtDDLDropSchema::StmtDDLDropSchema(//const SchemaName & schemaName,
// If the schema name specified is reserved name, users cannot drop them.
// They can only be dropped internally.
if ((! Get_SqlParser_Flags(INTERNAL_QUERY_FROM_EXEUTIL)) &&
- (ComIsTrafodionReservedSchemaName(schema... | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// 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. ... | 1 | 7,449 | Should this be a ! on line 565? I would have expected the condition to be similar to line 564. If I am wrong please excuse my mistake. | apache-trafodion | cpp |
@@ -288,6 +288,10 @@ class DBUpgrader {
db.execSQL("DROP TABLE " + PodDBAdapter.TABLE_NAME_FEED_IMAGES);
}
+ if (oldVersion < 1070296) {
+ db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
+ + " ADD COLUMN " + PodDBAdapter.KEY_FEED_VOLUME_REDUCTION + ... | 1 | package de.danoeh.antennapod.core.storage;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.media.MediaMetadataRetriever;
import android.util.Log;
import de.danoeh.antennapod.core.feed.FeedItem;
class DBUpgrader {
/**
* Upgra... | 1 | 14,867 | Please change to `1070400`. I promise to look into this PR in more detail before the 1.7.4 release ;) | AntennaPod-AntennaPod | java |
@@ -68,15 +68,15 @@ public class FlinkParquetWriters {
}
@Override
- public ParquetValueWriter<?> message(RowType sStruct, MessageType message, List<ParquetValueWriter<?>> fields) {
+ public ParquetValueWriter<?> message(LogicalType sStruct, MessageType message, List<ParquetValueWriter<?>> fields) {
... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 23,726 | Can we change to use `LogicalType.getChildren`? | apache-iceberg | java |
@@ -1,10 +1,11 @@
require 'spec_helper'
describe '#create' do
- it 'sets the payment_method on Purchase to free' do
+ it 'sets the payment_method on Purchase to subscription' do
user = create(:user, :with_subscription)
create_subscriber_purchase(create(:book_product), user)
- user.purchases.last.paym... | 1 | require 'spec_helper'
describe '#create' do
it 'sets the payment_method on Purchase to free' do
user = create(:user, :with_subscription)
create_subscriber_purchase(create(:book_product), user)
user.purchases.last.payment_method.should == 'free'
end
it 'sets the comments on the purchase if provided' ... | 1 | 7,438 | I'm confused as to how these are both passing. | thoughtbot-upcase | rb |
@@ -0,0 +1,17 @@
+module DashboardsHelper
+ def learn_live_link(&block)
+ if current_user_has_access_to?(:office_hours)
+ link_to OfficeHours.url, target: "_blank", &block
+ else
+ content_tag "a", &block
+ end
+ end
+
+ def learn_repo_link(&block)
+ if current_user_has_access_to?(:source_code)... | 1 | 1 | 9,871 | Prefer single-quoted strings when you don't need string interpolation or special symbols. | thoughtbot-upcase | rb | |
@@ -28,7 +28,7 @@ class CategoryData
public $seoH1s;
/**
- * @var string[]
+ * @var string[]|null[]
*/
public $descriptions;
| 1 | <?php
namespace Shopsys\FrameworkBundle\Model\Category;
use Shopsys\FrameworkBundle\Component\FileUpload\ImageUploadData;
use Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\UrlListData;
class CategoryData
{
/**
* @var string[]
*/
public $name;
/**
* @var string[]|null[]
*/
... | 1 | 14,143 | there is `"` sign in commit message and colon. can you rename also `descrition` to plural `descriptions` and add there `$` ? | shopsys-shopsys | php |
@@ -108,7 +108,9 @@ func (ti *TelemetryInterceptor) Intercept(
resp, err := handler(ctx, req)
if val, ok := metrics.ContextCounterGet(ctx, metrics.HistoryWorkflowExecutionCacheLatency); ok {
- timerNoUserLatency.Subtract(time.Duration(val))
+ userLatencyDuration := time.Duration(val)
+ timerNoUserLatency.Subtr... | 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,270 | timerNoUserLatency is not being used? | temporalio-temporal | go |
@@ -603,6 +603,8 @@ class Serializer(object):
:param Date attr: Object to be serialized.
:rtype: str
"""
+ if isinstance(attr, str):
+ attr = isodate.parse_date(attr)
t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day)
return t
| 1 | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 1 | 22,576 | @lmazuel - I've made a couple of minor changes to serialization.py, if you could do a quick review :) They should not be breaking, and I doubt are used by the existing clients so may not need a new release yet. Effectively it's a change to support default/constant date and datetime values by allowing strings to passed ... | Azure-autorest | java |
@@ -553,8 +553,8 @@ namespace pwiz.SkylineTest
AssertEx.DeserializeNoError<StaticMod>("<static_modification name=\"15N\" label_15N=\"true\" />", true, true, isotopeModificationType);
AssertEx.DeserializeNoError<StaticMod>("<static_modification name=\"Heavy K\" aminoacid=\"K\" label_13C=\"true\... | 1 | /*
* Original author: Brendan MacLean <brendanx .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2009 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in com... | 1 | 13,227 | Why change the name in the XML? | ProteoWizard-pwiz | .cs |
@@ -132,7 +132,11 @@ class User < ActiveRecord::Base
# = Callbacks =
# =============
- after_update :when_org_changes
+ before_update :clear_other_organisation, if: :org_id_changed?
+
+ after_update :delete_perms!, if: :org_id_changed?, unless: :can_change_org?
+
+ after_update :remove_token!, if: :org_id_c... | 1 | # == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# accept_terms :boolean
# active :boolean default(TRUE)
# api_token :string
# confirmation_sent_at :datetime
# confirmation_token :string
# confir... | 1 | 18,000 | This is much cleaner. makes it easier to tell what happens on a save. | DMPRoadmap-roadmap | rb |
@@ -212,6 +212,8 @@ func refineFiltersOperator(filters []datastore.ListFilter) ([]datastore.ListFilt
filter.Operator = "IN"
case datastore.OperatorNotIn:
filter.Operator = "NOT IN"
+ case datastore.OperatorContains:
+ // FIXME: Convert contains operator into one dedicated to MySQL
case datastore.Operat... | 1 | // Copyright 2021 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 | 16,921 | Could you add return error unsupported operator here | pipe-cd-pipe | go |
@@ -6,7 +6,8 @@
package javaslang.collection;
import javaslang.*;
-import javaslang.collection.Stream.*;
+import javaslang.collection.Stream.Cons;
+import javaslang.collection.Stream.Empty;
import javaslang.collection.StreamModule.*;
import javaslang.control.Option;
| 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 8,370 | (Mhh, we seem to use different formatters - we should unify them. I like the wildcards) | vavr-io-vavr | java |
@@ -54,8 +54,11 @@ func AdminDescribeTaskQueue(c *cli.Context) {
ctx, cancel := newContext(c)
defer cancel()
request := &workflowservice.DescribeTaskQueueRequest{
- Namespace: namespace,
- TaskQueue: &taskqueuepb.TaskQueue{Name: taskQueue},
+ Namespace: namespace,
+ TaskQueue: &taskq... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 9,869 | Should `kind` be a command line parameter also? | temporalio-temporal | go |
@@ -43,7 +43,7 @@ namespace Nethermind.JsonRpc.Data
Gas = transaction.GasLimit;
Input = Data = transaction.Data;
Type = transaction.Type;
- AccessList = TryGetAccessListItems();
+ AccessList = transaction.AccessList is null ? null : AccessListItemForRpc.FromA... | 1 | // Copyright (c) 2021 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of... | 1 | 25,212 | can we have it inside FromAccessList? | NethermindEth-nethermind | .cs |
@@ -64,6 +64,19 @@ var rawRequestPaths = map[string]bool{
"/v2/teal/compile": true,
}
+// unauthorizedRequestError is generated when we receive 401 error from the server. This error includes the inner error
+// as well as the likely parameters that caused the issue.
+type unauthorizedRequestError struct {
+ errorS... | 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,645 | Why not embed filterASCII in this function? | algorand-go-algorand | go |
@@ -1872,7 +1872,11 @@ public class ExecutorManager extends EventHandler implements
// process flow with current snapshot of activeExecutors
selectExecutorAndDispatchFlow(reference, exflow, new HashSet<Executor>(activeExecutors));
}
- currentContinuousFlowProcessed++;
+
+ //... | 1 | /*
* Copyright 2014 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 10,872 | I am curious, shouldn't "currentContinuousFlowProcessed++;" be added right after line 1873? otherwise we will count 1 extra when a exflow wakes up from the sleep section,.even though it hasn't been assigned | azkaban-azkaban | java |
@@ -162,6 +162,7 @@ def _get_configtypes():
configtypes._Numeric] and
issubclass(e, configtypes.BaseType))
yield from inspect.getmembers(configtypes, predicate)
+ # pylint: enable=protected-access
def _get_setting_types_quickref(): | 1 | #!/usr/bin/env python3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | 1 | 19,419 | You can probably move this up after the `._Numeric` line. | qutebrowser-qutebrowser | py |
@@ -203,6 +203,7 @@ class SGEJobTask(luigi.Task):
description="don't tarball (and extract) the luigi project files")
def __init__(self, *args, **kwargs):
+ super(SGEJobTask, self).__init__(*args, **kwargs)
if self.job_name:
# use explicitly provided job name
pas... | 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 | 15,656 | @Tarrasch this is another change you need to pay attention, it seems `SGEJobTask` is not calling `super.__init__` which break the test case some how. | spotify-luigi | py |
@@ -0,0 +1,14 @@
+class CreateCompletions < ActiveRecord::Migration
+ def change
+ create_table :completions do |t|
+ t.string :trail_object_id
+ t.string :trail_name
+ t.belongs_to :user
+
+ t.timestamps
+ end
+
+ add_index :completions, :user_id
+ add_index :completions, :trail_object... | 1 | 1 | 7,556 | Do we need indices for this table? | thoughtbot-upcase | rb | |
@@ -447,6 +447,19 @@ static int process_data(struct flb_http_client *c)
return FLB_HTTP_MORE;
}
+#if defined FLB_HAVE_TESTS_OSSFUZZ
+int fuzz_process_data(struct flb_http_client *c);
+int fuzz_process_data(struct flb_http_client *c) {
+ return process_data(c);
+}
+
+int fuzz_check_connection(struct flb_http_cli... | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | 1 | 13,252 | what about making this function static inline to avoid the extra declaration ? | fluent-fluent-bit | c |
@@ -21,6 +21,7 @@ import (
type protocol = string
type TableIDType uint8
+type GroupIDType = uint32
const LastTableID TableIDType = 0xff
| 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 | 14,735 | I forget the difference between type definition with "=" and without "=" again, but can we unify the style? I believe the difference doesn't apply to TableIDType and GroupIDType whatever it is? | antrea-io-antrea | go |
@@ -49,7 +49,7 @@ return_code parseArguments(int argc,
"Number of threads to use")(
"core,k",
boost::program_options::value<double>(&contractor_config.core_factor)->default_value(1.0),
- "Percentage of the graph (in vertices) to contract [0..1]")(
+ "Percentage of the graph (in ... | 1 | #include "storage/io.hpp"
#include "osrm/contractor.hpp"
#include "osrm/contractor_config.hpp"
#include "osrm/exception.hpp"
#include "util/log.hpp"
#include "util/timezones.hpp"
#include "util/version.hpp"
#include <boost/filesystem.hpp>
#include <boost/program_options.hpp>
#include <boost/program_options/errors.hpp>... | 1 | 22,948 | would be `DEPRECATED Percentage of the graph (in vertices) to contract [0..1]` better? | Project-OSRM-osrm-backend | cpp |
@@ -318,4 +318,11 @@ public interface DriverCommand {
// Mobile API
String GET_NETWORK_CONNECTION = "getNetworkConnection";
String SET_NETWORK_CONNECTION = "setNetworkConnection";
+
+ // Cast Media Router API
+ String GET_CAST_SINKS = "getCastSinks";
+ String SET_CAST_SINK_TO_USE = "selectCastSink";
+ Stri... | 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,690 | These command names are specific to Chromium-based browsers. Please move to `ChromiumDriverCommand` | SeleniumHQ-selenium | py |
@@ -108,7 +108,7 @@ namespace OpenTelemetry.Exporter.Zipkin
}
string serviceName = null;
- Dictionary<string, object> tags = null;
+ Dictionary<string, object> tags = new Dictionary<string, object>();
foreach (var label in resource.Attributes)
... | 1 | // <copyright file="ZipkinExporter.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.apache.... | 1 | 18,686 | if we won't use, should we remove this? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -230,7 +230,10 @@ namespace MvvmCross.Platforms.Android.Core
protected virtual IDictionary<string, string> ViewNamespaceAbbreviations => new Dictionary<string, string>
{
- { "Mvx", "MvvmCross.Platforms.Android.Views" }
+ { "Mvx", "mvvmcross.platforms.android.views"
+ ... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Reflection;
using Android.Content;
using Android.Vie... | 1 | 14,958 | Having 2 items with the same key (Mvx) won't work in a dictionary | MvvmCross-MvvmCross | .cs |
@@ -0,0 +1,17 @@
+class CouponsController < ApplicationController
+ def show
+ if coupon.valid?
+ session[:coupon] = coupon.code
+ else
+ flash[:notice] = "The coupon code you supplied is not valid."
+ end
+
+ redirect_to root_path
+ end
+
+ private
+
+ def coupon
+ @coupon ||= Coupon.new(p... | 1 | 1 | 13,797 | @cpytel how does the flow work right now? I expect to go to the sign up as customer page after putting in my code, but it goes to the longer landing page? | thoughtbot-upcase | rb | |
@@ -75,10 +75,10 @@ void show_message(
//
switch (priority) {
case MSG_INTERNAL_ERROR:
- snprintf(event_msg, sizeof(event_msg), "[error] %s", message);
+ snprintf(event_msg, sizeof(event_msg), "[error] %.512s", message);
break;
case MSG_SCHEDULER_ALERT:
- snprintf(event... | 1 | // This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC 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 Licens... | 1 | 13,723 | `event_msg` has the same size (1024) as a `message`. Maybe should be increased to 2048 instead? Then this `"[error] %.512s", message` could be changed to this: `"[error] %.*s", sizeof(message), message` | BOINC-boinc | php |
@@ -35,6 +35,7 @@ package org.apache.iceberg;
* changes.
*/
public interface ReplacePartitions extends SnapshotUpdate<ReplacePartitions> {
+
/**
* Add a {@link DataFile} to the table.
* | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 40,194 | Nit: unnecessary whitespace change. | apache-iceberg | java |
@@ -176,7 +176,7 @@ func (b *PinnedMap) Iter(f MapIter) error {
args := cmd[1:]
printCommand(prog, args...)
- output, err := exec.Command(prog, args...).CombinedOutput()
+ output, err := exec.Command(prog, args...).Output()
if err != nil {
return errors.Errorf("failed to dump in map (%s): %s\n%s", b.versione... | 1 | // Copyright (c) 2019-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 ... | 1 | 17,841 | Hit a flake here where I think there may have been some output to stderr that got mixed in with the output from Stdout. Hence switching to `Output()`, which does also capture stderr as `err.Stderr` | projectcalico-felix | c |
@@ -119,7 +119,15 @@ void image_data_reader::set_input_params(const int width, const int height, cons
bool image_data_reader::fetch_label(CPUMat& Y, int data_id, int mb_idx) {
const label_t label = m_image_list[data_id].second;
- Y.Set(label, mb_idx, 1);
+ if (label >= 0 && label < m_num_labels) {
+ Y.Set(la... | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 15,275 | I would use static_cast<label_t>(0) and static_cast<label_T>(m_num_labels) just in case. | LLNL-lbann | cpp |
@@ -406,4 +406,18 @@ public class ZMSUtils {
return authorityFilter;
}
+
+ public static String lowerDomainInResource(String resource) {
+ if (resource == null) {
+ return null;
+ }
+
+ int delimiterIndex = resource.indexOf(":");
+ if (delimiterIndex == -1) {
+ ... | 1 | /*
* Copyright 2016 Yahoo Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 5,356 | Even if we want to keep in original case - domain will be lower-cased. | AthenZ-athenz | java |
@@ -0,0 +1,9 @@
+class RenameTopicBodyHtmlToTrailMap < ActiveRecord::Migration
+ def up
+ rename_column :topics, :body_html, :trail_map
+ end
+
+ def down
+ rename_column :topics, :trail_map, :body_html
+ end
+end | 1 | 1 | 6,482 | Based on discussion with Chad it feels like trail_map_json could be a good column name. | thoughtbot-upcase | rb | |
@@ -98,9 +98,9 @@ class Users extends Controller
'comment' => $permission->comment,
'type' => 'balloon-selector',
'options' => [
- 1 => 'Allow',
- 0 => 'Inherit',
- -1 => 'Deny',
+ 1 => Lang::g... | 1 | <?php namespace Backend\Controllers;
use Lang;
use Backend;
use Redirect;
use BackendMenu;
use BackendAuth;
use Backend\Classes\Controller;
use System\Classes\SettingsManager;
/**
* Backend user controller
*
* @package october\backend
* @author Alexey Bobkov, Samuel Georges
*
*/
class Users extends Controller
{... | 1 | 10,466 | This array should be logic-less, just the language string (without `Lang::get()`) should appear. Then `trans()` is [or should be] used when the balloon selector renders the values. | octobercms-october | php |
@@ -253,7 +253,7 @@ module Beaker
else
task = 'defaultgroup:ensure_default_group'
end
- on dashboard, "/opt/puppet/bin/rake -sf /opt/puppet/share/puppet-dashboard/Rakefile #{task} RAILS_ENV=production"
+ on dashboard, "BUNDLE_GEMFILE=/opt/puppet/share/puppet-dashboard/Gemfile ... | 1 | require 'pathname'
module Beaker
module DSL
#
# This module contains methods to help cloning, extracting git info,
# ordering of Puppet packages, and installing ruby projects that
# contain an `install.rb` script.
module InstallUtils
# The default install path
SourcePath = "/opt/pup... | 1 | 4,609 | This looks like it runs both pre 3.0 rake tasks and 3 rake tasks, and since pre 3.0 we didn't use bundler, my guess is it will fail then. | voxpupuli-beaker | rb |
@@ -450,7 +450,14 @@ func (m *Manager) Set(container *configs.Config) error {
}
func getUnitName(c *configs.Cgroup) string {
- return fmt.Sprintf("%s-%s.scope", c.Parent, c.Name)
+ allowed := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:-_.\\"
+ sanitizeFunc := func(r rune) rune {
+ if strings.C... | 1 | // +build linux
package systemd
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
systemdDbus "github.com/coreos/go-systemd/dbus"
systemdUtil "github.com/coreos/go-systemd/util"
"github.com/godbus/dbus"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/ope... | 1 | 8,524 | I'm not sure the replacement is a good idea, and as I said in #336 , this "parent-name.scope" is not a good idea in the first place, specially when we support assigning a slice as the parent, so we should change this, WDYT? | opencontainers-runc | go |
@@ -627,7 +627,7 @@ func (dao *blockDAO) putBlock(blk *block.Block) error {
log.L().Error("failed to serialize receipits for block", zap.Uint64("height", blkHeight))
}
}
- if err = kv.Commit(batchForBlock); err != nil {
+ if err = kv.WriteBatch(batchForBlock); err != nil {
return err
}
| 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 | 20,358 | sloppyReassign: re-assignment to `err` can be replaced with `err := kv.WriteBatch(batchForBlock)` (from `gocritic`) | iotexproject-iotex-core | go |
@@ -123,7 +123,11 @@ public class VertxServerResponseToHttpServletResponse extends AbstractHttpServle
@Override
public CompletableFuture<Void> sendPart(Part part) {
DownloadUtils.prepareDownloadHeader(this, part);
-
+ if (part == null) {
+ CompletableFuture<Void> future = new CompletableFuture<>();
+... | 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 | 12,435 | using factory method. return CompletableFuture.completedFuture | apache-servicecomb-java-chassis | java |
@@ -31,7 +31,7 @@ storiesOf( 'Global', module )
title={ __( 'Top content over the last 28 days', 'google-site-kit' ) }
headerCtaLink="https://analytics.google.com"
headerCtaLabel={ __( 'See full stats in Analytics', 'google-site-kit' ) }
- footerCtaLabel={ __( 'Analytics', 'google-site-kit' ) }
+ f... | 1 | /**
* External dependencies
*/
import { storiesOf } from '@storybook/react';
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import Layout from 'GoogleComponents/layout/layout';
import AnalyticsDashboardWidgetTopPagesTable from 'GoogleModules/analytics/dashboard/dashboard-widget-top-pages-tabl... | 1 | 25,369 | The `_x` function needs to be imported at the top of the file (in addition to `__`) | google-site-kit-wp | js |
@@ -19,7 +19,7 @@ type ofFlow struct {
// The Flow.Table field can be updated by Reset(), which can be called by
// ReplayFlows() when replaying the Flow to OVS. For thread safety, any access
// to Flow.Table should hold the replayMutex read lock.
- ofctrl.Flow
+ *ofctrl.Flow
// matchers is string slice, it i... | 1 | package openflow
import (
"fmt"
"strings"
"github.com/contiv/libOpenflow/openflow13"
"github.com/contiv/ofnet/ofctrl"
)
type FlowStates struct {
TableID uint8
PacketCount uint64
DurationNSecond uint32
}
type ofFlow struct {
table *ofTable
// The Flow.Table field can be updated by Reset(), which... | 1 | 22,096 | this looks like the only controversial change potentially. @MatthewHinton56 Could let us know why you made this change (which `go vet` warning was triggered)? @wenyingd could you take a look and let us know if you're okay with this change? | antrea-io-antrea | go |
@@ -26,7 +26,7 @@ using pwiz.Skyline.Util;
namespace pwiz.Skyline.Controls.Graphs
{
- public sealed partial class AreaCVToolbar : GraphSummaryToolbar //UserControl // for designer
+ public sealed partial class AreaCVToolbar : GraphSummaryToolbar //GraphSummaryToolbar UserControl // for designer
{
... | 1 | /*
* Original author: Tobias Rohde <tobiasr .at. uw.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2017 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with ... | 1 | 13,588 | This seems like left-over debugging code. I think I fixed this to no longer be necessary, switching to UserControl for the designer. | ProteoWizard-pwiz | .cs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.