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 |
|---|---|---|---|---|---|---|---|
@@ -58,6 +58,12 @@ var (
Value: metadata.DefaultNetwork.AccessPolicyOracleAddress,
})
+ mmnAddressFlag = altsrc.NewStringFlag(cli.StringFlag{
+ Name: "mmn-address",
+ Usage: "URL of my.mysterium.network API",
+ Value: metadata.DefaultNetwork.MMNAddress,
+ })
+
brokerAddressFlag = altsrc.NewStringFlag(cli.S... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 14,935 | This looks a bit cryptic to me, and also it contains a dash. How about `mymysterium.url`? | mysteriumnetwork-node | go |
@@ -0,0 +1,8 @@
+#include<stdio.h>
+
+void main(){
+ int var = 100;
+ if (&var == 0){
+ print("Got the value");
+ }
+} | 1 | 1 | 12,493 | You did notice the no newline at the end of this file, right? | Ericsson-codechecker | c | |
@@ -75,10 +75,10 @@ namespace Microsoft.CodeAnalysis.Sarif
public ISet<Stack> Stacks { get; set; }
/// <summary>
- /// An array of arrays of 'annotatedCodeLocation` objects, each inner array of which comprises a code flow (a possible execution path through the code).
+ /// An array of ... | 1 | // Copyright (c) Microsoft. 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.CodeDom.Compiler;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Microsoft.CodeAnalysis.Sarif
{... | 1 | 10,597 | Here's the object model change. `CodeFlows` is a set of objects of type `CodeFlow`, rather than a list of list of `AnnotatedCodeLocation`. Exactly parallel with `Stacks`. | microsoft-sarif-sdk | .cs |
@@ -31,6 +31,7 @@ from .core import decode_node, encode_node, find_object_hashes, hash_contents, F
from .models import (Access, Customer, Instance, Invitation, Log, Package,
S3Blob, Tag, UTF8_GENERAL_CI, Version)
from .schemas import LOG_SCHEMA, PACKAGE_SCHEMA
+from .config import BAN_PUBLIC_USE... | 1 | # Copyright (c) 2017 Quilt Data, Inc. All rights reserved.
"""
API routes.
"""
from datetime import timedelta, timezone
from functools import wraps
import json
import time
from urllib.parse import urlencode
import boto3
from flask import abort, g, redirect, render_template, request, Response
from flask_cors import C... | 1 | 15,646 | Sorry, one more thing... You should use `app.config` instead of importing it directly. See the code below. | quiltdata-quilt | py |
@@ -44,8 +44,13 @@ public interface VectorizedReader<T> {
void setRowGroupInfo(PageReadStore pages, Map<ColumnPath, ColumnChunkMetaData> metadata);
/**
- * Set up the reader to reuse the underlying containers used for storing batches
+ * Setup the reader to reuse the underlying containers used for storing b... | 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 | 17,450 | This was correct before; "setup" is a noun and "set up" is the verb form. | apache-iceberg | java |
@@ -61,7 +61,7 @@ class AdSenseSetupWidget extends Component {
async getAccounts() {
try {
- const responseData = await data.get( TYPE_MODULES, 'adsense', 'accounts' );
+ const responseData = await data.get( TYPE_MODULES, 'adsense', 'accounts', { maybeSetAccount: true } );
/**
* Defines the accoun... | 1 | /**
* AdSenseSetupWidget 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/LICENSE-... | 1 | 26,815 | What's the reason for this change here? I didn't see it mentioned in the PR and it's a bit of a confusing param name | google-site-kit-wp | js |
@@ -12,7 +12,9 @@ function Search() {
}
Search.prototype.query = function(q) {
- return this.index.search(q)
+ return q === '~'
+ ? this.storage.config.localList.get().map( function( package ){ return { ref: package, score: 1 }; } )
+ : this.index.search(q);
}
Search.prototype.add = function(package) { | 1 | var lunr = require('lunr')
function Search() {
var self = Object.create(Search.prototype)
self.index = lunr(function() {
this.field('name' , { boost: 10 })
this.field('description' , { boost: 4 })
this.field('author' , { boost: 6 })
this.field('readme')
})
return self
}
Search.pr... | 1 | 16,942 | I wonder why ~ and not a wildcard instead? | verdaccio-verdaccio | js |
@@ -63,6 +63,9 @@ public class PojoProducers implements BeanPostProcessor {
// aop后,新的实例的父类可能是原class,也可能只是个proxy,父类不是原class
// 所以,需要先取出原class,再取标注
Class<?> beanCls = BeanUtils.getImplClassFromBean(bean);
+ if(beanCls == null) {
+ return;
+ }
RpcSchema rpcSchema = beanCls.getAnnotation(RpcS... | 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 | 10,458 | when will this happened? if happened, just ignore it Silently? | apache-servicecomb-java-chassis | java |
@@ -239,8 +239,10 @@ public class TestMergeAppend extends TableTestBase {
public void testManifestMergeMinCount() throws IOException {
Assert.assertEquals("Table should start empty", 0, listManifestFiles().size());
table.updateProperties().set(TableProperties.MANIFEST_MIN_MERGE_COUNT, "2")
- // each... | 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 | 31,013 | 3x the smaller size would be around 17k, and we need it to be at least about 13k, which is 2x the larger size. I'd probably set this to 15k to split the difference and hopefully avoid needing to update this again as tests change. This is minor, though. | apache-iceberg | java |
@@ -360,7 +360,9 @@ class DateEncoder(Encoder):
if input == SENTINEL_VALUE_FOR_MISSING_DATA:
output[0:] = 0
else:
- assert isinstance(input, datetime.datetime)
+ assert isinstance(input, datetime.datetime), (
+ "Input is type %s, expected datetime. Value: %s" % (type(input),
+ ... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... | 1 | 12,916 | @scottpurdy, strictly speaking, should this scenario raise a ValueError exception instead of AssertionError? | numenta-nupic | py |
@@ -0,0 +1,7 @@
+package azkaban.spi;
+
+public enum ExecutorType {
+ // Type of executor where flow runs
+ BAREMETAL,
+ KUBERNETES
+} | 1 | 1 | 21,701 | Can you please add open source disclaimer? | azkaban-azkaban | java | |
@@ -81,13 +81,11 @@ func (u *unaryHandler) Handle(ctx context.Context, transportRequest *transport.R
var wireError *wirepb.Error
if appErr != nil {
responseWriter.SetApplicationError()
- wireError = &wirepb.Error{
- appErr.Error(),
- }
+ wireError = &wirepb.Error{Message: appErr.Error()}
}
wireResponse ... | 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 | 12,821 | I dont want to do composite keys on purpose to verify at compile time if the message is completely filled out appropriately @sectioneight | yarpc-yarpc-go | go |
@@ -1170,6 +1170,8 @@ func TestServer_SendAction(t *testing.T) {
}}
chain.EXPECT().ChainID().Return(uint32(1)).Times(2)
+ chain.EXPECT().TipHeight().Return(uint64(4)).Times(2)
+ svr.cfg.Genesis.KamchatkaBlockHeight = 10
ap.EXPECT().Add(gomock.Any(), gomock.Any()).Return(nil).Times(2)
for i, test := range se... | 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,674 | don't need this line, since it is not tested in api_test? | iotexproject-iotex-core | go |
@@ -164,7 +164,7 @@ func CheckForCStorPoolCRD(clientset clientset.Interface) {
// CheckForCStorVolumeReplicaCRD is Blocking call for checking status of CStorVolumeReplica CRD.
func CheckForCStorVolumeReplicaCRD(clientset clientset.Interface) {
for {
- _, err := clientset.OpenebsV1alpha1().CStorVolumeReplicas().Lis... | 1 | /*
Copyright 2018 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 | 8,690 | Does this mean the list operation is done for all the namespaces? How to list the volume replicas per namespace? | openebs-maya | go |
@@ -136,10 +136,14 @@ def batched_nms(bboxes, scores, inds, nms_cfg):
Returns:
tuple: kept bboxes and indice.
"""
- max_coordinate = bboxes.max()
- offsets = inds.to(bboxes) * (max_coordinate + 1)
- bboxes_for_nms = bboxes + offsets[:, None]
nms_cfg_ = nms_cfg.copy()
+ class_agnostic... | 1 | import numpy as np
import torch
from . import nms_ext
def nms(dets, iou_thr, device_id=None):
"""Dispatch to either CPU or GPU NMS implementations.
The input can be either a torch tensor or numpy array. GPU NMS will be used
if the input is a gpu tensor or device_id is specified, otherwise CPU NMS
wi... | 1 | 19,299 | I suggest adding `class_agnostic` as an argument of `batched_nms()`, with the default value False. | open-mmlab-mmdetection | py |
@@ -44,6 +44,7 @@ public class MetadataColumns {
Integer.MAX_VALUE - 101, "file_path", Types.StringType.get(), "Path of a file in which a deleted row is stored");
public static final NestedField DELETE_FILE_POS = NestedField.required(
Integer.MAX_VALUE - 102, "pos", Types.LongType.get(), "Ordinal posit... | 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 | 39,712 | @rdblue, did we not add the name on purpose? | apache-iceberg | java |
@@ -41,12 +41,12 @@ import org.apache.orc.TypeDescription;
*/
public final class ORCSchemaUtil {
- private enum BinaryType {
+ public enum BinaryType {
UUID, FIXED, BINARY
}
- private enum IntegerType {
- TIME, INTEGER
+ public enum LongType {
+ TIME, LONG
}
private static class OrcFiel... | 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 | 17,723 | Why is this now public? | apache-iceberg | java |
@@ -111,9 +111,7 @@ module Blacklight::SearchContext
response, documents = search_service.previous_and_next_documents_for_search index, search_state.reset(current_search_session.query_params).to_hash
search_session['total'] = response.total
- @search_context_response = response
- @previous_doc... | 1 | # frozen_string_literal: true
module Blacklight::SearchContext
extend ActiveSupport::Concern
# The following code is executed when someone includes blacklight::catalog::search_session in their
# own controller.
included do
helper_method :current_search_session, :search_session
end
module ClassMethods
... | 1 | 7,674 | I guess we should backport some deprecation for this? | projectblacklight-blacklight | rb |
@@ -57,11 +57,10 @@ module Selenium
is_relative = Regexp.last_match(1).strip == '1'
when /^Path=(.+)$/
path = Regexp.last_match(1).strip
+ p = path_for(name, is_relative, path)
+ @profile_paths[name] = p if p
end
end
-
- ... | 1 | # encoding: utf-8
#
# 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
# "Li... | 1 | 13,901 | Moving this code inside the last case statement doesn't seem right. Why are we defining `name` and `is_relative` variables there if we aren't using them anywhere? | SeleniumHQ-selenium | rb |
@@ -105,6 +105,7 @@ static byte buf[8192];
#define IMMARG(sz) opnd_create_immed_int(37, sz)
#define TGTARG opnd_create_instr(instrlist_last(ilist))
#define REGARG(reg) opnd_create_reg(REG_##reg)
+#define DR_REGARG(reg) opnd_create_reg(DR_REG_##reg)
#define REGARG_PARTIAL(reg, sz) opnd_create_reg_partial(REG_##reg, ... | 1 | /* **********************************************************
* Copyright (c) 2011-2019 Google, Inc. All rights reserved.
* Copyright (c) 2007-2008 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 16,527 | I would say just change REGARG: no need for a separate thing. | DynamoRIO-dynamorio | c |
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>C2</title>
+ <meta name="viewport" content="width=device-width"/>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <link rel="stylesheet" type="text/css" href="<%= stylesheet_url("mailer.css") %>">
+</head>
+<body class="c2-notificat... | 1 | 1 | 16,402 | we can remove this template, it is no longer in use | 18F-C2 | rb | |
@@ -45,11 +45,9 @@ module Beaker
end
it "recursively dumps values" do
- options.merge({'k' => 'v', 'key' => {'subkey' => 'subvalue'}, 'array_key' => ['array1', 'array2'], 'array_key2' => [['subarray1', 'subarray2'], 'anotherval']})
- expect(options.dump).to be === "Options:\n\t\tk : v\n\t\... | 1 | require "spec_helper"
module Beaker
module Options
describe OptionsHash do
let(:options) { Beaker::Options::OptionsHash.new }
#test options hash methods
it "converts all string keys to symbols when doing direct assignment" do
options['key'] = 'value'
expect(options.has_key?(... | 1 | 4,772 | This doesn't look like it has as much coverage of the recursive code as it once did. | voxpupuli-beaker | rb |
@@ -107,6 +107,10 @@ type AWSLoadBalancerSpec struct {
// Defaults to false.
// +optional
CrossZoneLoadBalancing bool `json:"crossZoneLoadBalancing,omitempty"`
+
+ // SecurityGroups sets the security groups used by the load balancer
+ // +optional
+ SecurityGroups []SecurityGroup `json:"securityGroups,omitempty"`... | 1 | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 14,360 | Do we actually expect users to provide more information here than possibly a SecurityGroup ID? If not, then this should probably use a new type, otherwise users might be confused by what options would be respected/ignored when used in this context. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -1,6 +1,8 @@
package edu.harvard.iq.dataverse.util;
import com.ocpsoft.pretty.PrettyContext;
+import com.rometools.utils.Strings;
+
import edu.harvard.iq.dataverse.DataFile;
import edu.harvard.iq.dataverse.Dataset;
import edu.harvard.iq.dataverse.Dataverse; | 1 | package edu.harvard.iq.dataverse.util;
import com.ocpsoft.pretty.PrettyContext;
import edu.harvard.iq.dataverse.DataFile;
import edu.harvard.iq.dataverse.Dataset;
import edu.harvard.iq.dataverse.Dataverse;
import edu.harvard.iq.dataverse.DataverseServiceBean;
import edu.harvard.iq.dataverse.DvObjectContainer;
import e... | 1 | 45,439 | This seems like a new dependency on rometools. Do we need it? | IQSS-dataverse | java |
@@ -93,7 +93,7 @@ public class Docker {
throw new WebDriverException("Unable to pull container: " + name);
}
- LOG.info(String.format("Pull of %s:%s complete", name, tag));
+ LOG.fine(String.format("Pull of %s:%s complete", name, tag));
return findImage(new ImageNamePredicate(name, tag))
... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 17,123 | Waiting for the pull takes a long time. This message informs the user that at least one of the images being pulled is available. Please leave. | SeleniumHQ-selenium | js |
@@ -7,13 +7,12 @@ import (
"sync/atomic"
"testing"
+ "github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/require"
"github.com/spiffe/spire/pkg/common/util"
"github.com/spiffe/spire/pkg/server/plugin/datastore"
"github.com/spiffe/spire/pkg/server/plugin/datastore/sql"
- spi "github.com/s... | 1 | package fakedatastore
import (
"context"
"fmt"
"sort"
"sync/atomic"
"testing"
"github.com/stretchr/testify/require"
"github.com/spiffe/spire/pkg/common/util"
"github.com/spiffe/spire/pkg/server/plugin/datastore"
"github.com/spiffe/spire/pkg/server/plugin/datastore/sql"
spi "github.com/spiffe/spire/proto/sp... | 1 | 16,304 | I can not think in a good use for it, but may we allow a way to setup a fake with a hook for logs? this fake is special, and we may need access to some of thoe logs, at the same time it may be an overkill because we dont want to test "sql" implementation but results.. but we can create some tests with end to end logs i... | spiffe-spire | go |
@@ -149,6 +149,10 @@ void dag_close_over_environment(struct dag *d)
{
dag_variable_add_value(name, d->default_category->mf_variables, 0, value_env);
}
+
+ if(!value_env && !strcmp(name, RESOURCES_CORES)) {
+ dag_variable_add_value(name, d->default_category->mf_variables, 0, "1");
+ }
}
}
| 1 | /*
Copyright (C) 2008- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <signal.h>
#... | 1 | 12,739 | I don't think you should be changing the dag unilaterally at parse time. If cores isn't specified, then it isn't specified. | cooperative-computing-lab-cctools | c |
@@ -26,6 +26,16 @@
// see URLOpener.
// See https://godoc.org/gocloud.dev#hdr-URLs for background information.
//
+// Message Delivery Semantics
+//
+// Azure ServiceBus supports at-least-once semantics in the default Peek-Lock
+// mode; applications must call Message.Ack/Nack after processing a message, or
+// it w... | 1 | // Copyright 2018 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 16,505 | Instead of just "See SubscriberOptions....", say something like "Use ... to choose between the two." | google-go-cloud | go |
@@ -0,0 +1,10 @@
+import argparse
+from rdkit import Chem
+sdf = Chem.SDMolSupplier("cdk2.sdf")
+f = open("cdk2.smi","w")
+for mol in sdf:
+ name = mol.GetProp("_Name")
+ smi = Chem.MolToSmiles( mol )
+ f.write( "{}\t{}\n".format(name,smi))
+f.close()
+ | 1 | 1 | 17,810 | Use with statement for `f` | rdkit-rdkit | cpp | |
@@ -426,3 +426,16 @@ TEST_F(BadPonyTest, AnnotatedIfClause)
TEST_COMPILE(src);
}
+
+TEST_F(BadPonyTest, CapSubtypeInConstrainSubtyping)
+{
+ // From PR #1816
+ const char* src =
+ "trait T\n"
+ " fun alias[X: Any iso](x: X!) : X^\n"
+ "class C is T\n"
+ " fun alias[X: Any tag](x: X!) : X^ => x\n";... | 1 | #include <gtest/gtest.h>
#include <platform.h>
#include "util.h"
/** Pony code that parses, but is erroneous. Typically type check errors and
* things used in invalid contexts.
*
* We build all the way up to and including code gen and check that we do not
* assert, segfault, etc but that the build fails and at l... | 1 | 10,397 | It's a small style point, but could you remove the "extra" space before the colon that precedes the return type? This would make it more closely match the prevailing style in these tests and in the standard libraries. | ponylang-ponyc | c |
@@ -594,6 +594,13 @@ func (md *MDOpsStandard) PruneBranch(
return md.config.MDServer().PruneBranch(ctx, id, bid)
}
+// ResolveBranch implements the MDOps interface for MDOpsStandard.
+func (md *MDOpsStandard) ResolveBranch(
+ ctx context.Context, id TlfID, bid BranchID,
+ blocksToDelete []BlockID, rmd *RootMetadat... | 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"
"sync"
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"golang.org/x/net/context"
)
/... | 1 | 14,021 | seems clunky to me to have an `MDOps` interface method that some implementations don't implement. Perhaps define a separate interface, like, `BranchResolver`, and then callers that have an `MDOps` object can check via type assertion? | keybase-kbfs | go |
@@ -105,7 +105,7 @@ public interface WebDriver extends SearchContext {
* @see org.openqa.selenium.WebDriver.Timeouts
*/
@Override
- List<WebElement> findElements(By by);
+ <T extends WebElement> List<T> findElements(By by);
/** | 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 | 19,274 | This change should also probably go into the corresponding method of the abstract By class? | SeleniumHQ-selenium | java |
@@ -42,6 +42,7 @@ import (
"github.com/iotexproject/iotex-core/test/mock/mock_dispatcher"
ta "github.com/iotexproject/iotex-core/test/testaddress"
"github.com/iotexproject/iotex-core/testutil"
+ "github.com/iotexproject/iotex-core/pkg/util/byteutil"
)
const ( | 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 | 15,772 | File is not `gofmt`-ed with `-s` (from `gofmt`) | iotexproject-iotex-core | go |
@@ -82,9 +82,9 @@ func (fsrv *FileServer) serveBrowse(dirPath string, w http.ResponseWriter, r *ht
w.Header().Set("Content-Type", "text/html; charset=utf-8")
}
- buf.WriteTo(w)
+ _, err = buf.WriteTo(w)
- return nil
+ return err
}
func (fsrv *FileServer) loadDirectoryContents(dir *os.File, urlPath string, ... | 1 | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | 1 | 15,744 | This is likely to return an error value if the client fails to read the response we write, which is why I chose to ignore this error. | caddyserver-caddy | go |
@@ -649,6 +649,9 @@ class Channel(AbstractChannel):
def is_static_remotekey_enabled(self) -> bool:
return bool(self.storage.get('static_remotekey_enabled'))
+ def is_upfront_shutdown_script_enabled(self) -> bool:
+ return bool(self.storage.get('upfront_shutdown_script_enabled'))
+
def get... | 1 | # Copyright (C) 2018 The Electrum developers
#
# 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,971 | this method is not used | spesmilo-electrum | py |
@@ -1016,7 +1016,15 @@ class AbstractTab(QWidget):
return
sess_manager.save_autosave()
+ self.load_finished.emit(ok)
+
+ if not self.title():
+ self.title_changed.emit(self.url().toDisplayString())
+ self.zoom.reapply()
+
+ def _update_load_status(self, ok: b... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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 | 23,480 | Right now it's a bit unclear that this needs to be called explicitly by the implementing class. If, for example, there's another backend, it won't get this update unless we add the same function as webkit. Could you either add a note to this docstring explaining that this needs to be called, or find some way to automat... | qutebrowser-qutebrowser | py |
@@ -162,7 +162,7 @@ var xdpTestCases = []xdpTest{
SrcPort: 54321,
},
Drop: false,
- Metadata: true,
+ Metadata: false,
},
{
Description: "6 - Match against a deny policy, must drop", | 1 | // Copyright (c) 2021 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 appli... | 1 | 19,293 | Why this change (test name still says "must pass with metadata")? | projectcalico-felix | go |
@@ -45,7 +45,8 @@ module Travis
end
def ruby_version
- config[:rvm].to_s.gsub(/-(1[89]|2[01])mode$/, '-d\1')
+ vers = config[:rvm].to_s.gsub(/-(1[89]|2[01])mode$/, '-d\1')
+ force_187_p371 vers
end
def setup_rvm | 1 | module Travis
module Build
class Script
module RVM
include Chruby
MSGS = {
setup_ruby_head: 'Setting up latest %s'
}
CONFIG = %w(
rvm_remote_server_url3=https://s3.amazonaws.com/travis-rubies/binaries
rvm_remote_server_type3=rubies
... | 1 | 14,667 | Another nitpick: parens around the arg pretty please | travis-ci-travis-build | rb |
@@ -54,7 +54,6 @@ module Selenium
it 'does not set the chrome.detach capability by default' do
Driver.new(http_client: http)
- expect(caps['goog:chromeOptions']).to eq({})
expect(caps['chrome.detach']).to be nil
end
| 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 15,563 | This spec can be modified, giving you extra strength (Check this fetch key doesn't work and therefore returns `nil`) | SeleniumHQ-selenium | py |
@@ -877,3 +877,7 @@ type CtxKey string
// context.WithValue to access the original request URI that accompanied the
// server request. The associated value will be of type string.
const URLPathCtxKey CtxKey = "url_path"
+
+// URIxRewriteCtxKey is a context key used to store original unrewritten
+// URI in context.Wi... | 1 | // Package caddy implements the Caddy server manager.
//
// To use this package:
//
// 1. Set the AppName and AppVersion variables.
// 2. Call LoadCaddyfile() to get the Caddyfile.
// Pass in the name of the server type (like "http").
// Make sure the server type's package is imported
// (import _ "g... | 1 | 10,262 | Oh, I guess I mentioned/pressed this point in the other issue, that this should probably go into the httpserver package. In fact, so should the const above this (URLPathCtxKey). These are specific to the HTTP server. | caddyserver-caddy | go |
@@ -41,7 +41,7 @@ type ValidationFunc func(certificate *cmapi.Certificate, secret *corev1.Secret)
// ExpectValidKeysInSecret checks that the secret contains valid keys
func ExpectValidKeysInSecret(_ *cmapi.Certificate, secret *corev1.Secret) error {
- validKeys := [5]string{corev1.TLSPrivateKeyKey, corev1.TLSCertKe... | 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 | 30,679 | Not added by you, but we don't really need the '5' here.. | jetstack-cert-manager | go |
@@ -284,7 +284,6 @@ function getDefaultService() {
Options.prototype.CAPABILITY_KEY = 'goog:chromeOptions'
Options.prototype.BROWSER_NAME_VALUE = Browser.CHROME
Driver.getDefaultService = getDefaultService
-Driver.prototype.VENDOR_COMMAND_PREFIX = 'goog'
// PUBLIC API
exports.Driver = Driver | 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,744 | The vendor prefix is still being used on Chromium based browsers like Edge Chromium and Chrome. Did you mean to remove this? | SeleniumHQ-selenium | py |
@@ -36,6 +36,7 @@ def _makeKbEmulateScript(scriptName):
# __name__ must be str; i.e. can't be unicode.
scriptName = scriptName.encode("mbcs")
func.__name__ = "script_%s" % scriptName
+ func.emuGesture = emuGesture
func.__doc__ = _("Emulates pressing %s on the system keyboard") % emuGesture.displayName
retur... | 1 | #scriptHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2007-2017 NV Access Limited, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import time
import weakref
import inspect
import config
import speech
import sayAllHandler
i... | 1 | 20,407 | I don't think this is needed anymore? | nvaccess-nvda | py |
@@ -91,8 +91,15 @@ func (s *Service) ListAgents(ctx context.Context, req *agentv1.ListAgentsRequest
// Parse proto filter into datastore request
if req.Filter != nil {
filter := req.Filter
+
+ // TODO should this be a helper function?
+ var byBanned *bool
+ if filter.ByBanned != nil {
+ byBanned = &filter.B... | 1 | package agent
import (
"context"
"crypto/x509"
"errors"
"fmt"
"path"
"time"
"github.com/andres-erbsen/clock"
"github.com/gofrs/uuid"
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/v2/spiffeid"
agentv1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/agent/v1"
"github.com/spiffe/spire-api... | 1 | 16,648 | This is the only occurrence I see in the code where we now need to convert from a boolean protobuf wrapper to a boolean pointer. This felt a little cumbersome here; should we consider moving it somewhere else as a helper function? | spiffe-spire | go |
@@ -46,9 +46,6 @@ void HBProcessor::process(const cpp2::HBReq& req) {
}
HostInfo info(time::WallClock::fastNowInMilliSec(), req.get_role(), req.get_git_info_sha());
- if (req.version_ref().has_value()) {
- info.version_ = *req.version_ref();
- }
if (req.leader_partIds_ref().has_value()) {
ret = Act... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "meta/processors/admin/HBProcessor.h"
#include "common/time/WallClock.h"
#include "meta/ActiveHostsMan.h"
#include "meta/KVBasedClusterIdMan.h"
#include "meta/MetaVersionMan.h"
namespace n... | 1 | 32,309 | Need you to delete the `version_` from `HostInfo` struct ? | vesoft-inc-nebula | cpp |
@@ -0,0 +1,5 @@
+const { getBaseLang } = axe.commons.utils;
+const primaryLangValue = getBaseLang(node.getAttribute('lang') || '');
+const primaryXmlLangValue = getBaseLang(node.getAttribute('xml:lang') || '');
+
+return primaryLangValue === primaryXmlLangValue; | 1 | 1 | 12,935 | This could be the cleanest looking check we've got. Great job Jey. | dequelabs-axe-core | js | |
@@ -148,7 +148,7 @@ class Controller
$url = Request::path();
}
- if (!strlen($url)) {
+ if ('' === $url) {
$url = '/';
}
| 1 | <?php namespace Cms\Classes;
use Cms;
use Url;
use Str;
use App;
use File;
use View;
use Lang;
use Flash;
use Config;
use Session;
use Request;
use Response;
use Exception;
use BackendAuth;
use Twig_Environment;
use Twig_Cache_Filesystem;
use Cms\Twig\Loader as TwigLoader;
use Cms\Twig\DebugExtension;
use Cms\Twig\Ext... | 1 | 13,002 | Who invited yoda? In all seriousness though, wouldn't an `if (empty())` be better here? | octobercms-october | php |
@@ -1341,7 +1341,7 @@ define(['playbackManager', 'dom', 'inputManager', 'datetime', 'itemHelper', 'med
});
} catch (e) {
require(['appRouter'], function(appRouter) {
- appRouter.showDirect('/');
+ window.location.href = 'index.html';
... | 1 | define(['playbackManager', 'dom', 'inputManager', 'datetime', 'itemHelper', 'mediaInfo', 'focusManager', 'imageLoader', 'scrollHelper', 'events', 'connectionManager', 'browser', 'globalize', 'apphost', 'layoutManager', 'userSettings', 'keyboardnavigation', 'scrollStyles', 'emby-slider', 'paper-icon-button-light', 'css!... | 1 | 16,333 | You can use `appRouter.goHome` to do this (It's defined in site.js), it's less hacky than overriding the href. | jellyfin-jellyfin-web | js |
@@ -101,7 +101,14 @@ bool NebulaStore::init() {
enginePtr->removePart(partId);
continue;
} else {
- partIds.emplace_back(partId);
+ auto it = std::find(partIds.begin(), partIds.end(... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "kvstore/NebulaStore.h"
#include <folly/Likely.h>
#include <algorithm>
#include <cstdint... | 1 | 28,208 | When could this happen? | vesoft-inc-nebula | cpp |
@@ -55,8 +55,7 @@ namespace Datadog.Trace.Agent.Transports
await memoryStream.FlushAsync().ConfigureAwait(false);
memoryStream.Seek(0, SeekOrigin.Begin);
var buffer = memoryStream.GetBuffer();
- _headers.Add("Content-Type", "application/json");
- ... | 1 | // <copyright file="HttpStreamRequest.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using System;
using ... | 1 | 23,237 | I assume this was removed because it was redundant? and conflicted with the now dynamic contentType? Edit: Oh I see it being set was moved to the `PostSegmentAsync` call. | DataDog-dd-trace-dotnet | .cs |
@@ -21,7 +21,9 @@ public class ProxyConfig {
public static ProxyConfig http(String host, int port, String username, String password) {
return new ProxyConfig(Proxy.Type.HTTP, host, port, username, password);
}
-
+ public static ProxyConfig socks(String host, int port, String username, String passw... | 1 | package de.danoeh.antennapod.core.service.download;
import android.support.annotation.Nullable;
import java.net.Proxy;
public class ProxyConfig {
public final Proxy.Type type;
@Nullable public final String host;
public final int port;
@Nullable public final String username;
@Nullable public fina... | 1 | 14,933 | Here is a newline missing | AntennaPod-AntennaPod | java |
@@ -126,7 +126,7 @@ module Travis
# R-devel builds available at mac.r-project.org
if r_version == 'devel'
- r_url = "https://mac.r-project.org/el-capitan/R-devel/R-devel-el-capitan.pkg"
+ r_url = "http://mac.r-project.org/high-sierra/R-4.0-branch/R-4... | 1 | # Maintained by:
# Jim Hester @jimhester james.hester@rstudio.com
# Jeroen Ooms @jeroen jeroen@berkeley.edu
#
module Travis
module Build
class Script
class R < Script
DEFAULTS = {
# Basic config options
cran: 'https://cloud.r-project.org',
repos: {... | 1 | 17,437 | Did you mean to make this http rather than https? | travis-ci-travis-build | rb |
@@ -1,15 +1,14 @@
#appModules/audacity.py
#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2010 NVDA Contributors <http://www.nvda-project.org/>
+#Copyright (C) 2006-2018 NVDA Contributors <https://www.nvaccess.org/>
#This file is covered by the GNU General Public License.
#See the file COPYING for m... | 1 | #appModules/audacity.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2010 NVDA Contributors <http://www.nvda-project.org/>
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import appModuleHandler
import winUser
import controlTypes
class AppMo... | 1 | 21,979 | The updated copyright header should be: # Copyright (C) 2006-2018 NV Access Limited, yourname | nvaccess-nvda | py |
@@ -21,6 +21,7 @@ class PerformanceTestSamplesAggregator
$maxQueryCount = 0;
$isSuccessful = true;
$worstStatusCode = null;
+ $performanceTestSample = null;
foreach ($performanceTestSamplesOfUrl as $performanceTestSample) {
/* @var $perfo... | 1 | <?php
namespace Tests\ShopBundle\Performance\Page;
class PerformanceTestSamplesAggregator
{
/**
* @param \Tests\ShopBundle\Performance\Page\PerformanceTestSample[] $performanceTestSamples
* @return \Tests\ShopBundle\Performance\Page\PerformanceTestSample[]
*/
public function getPerformanceTestS... | 1 | 16,264 | wow :+1: , i do not even know how this test works. | shopsys-shopsys | php |
@@ -2,14 +2,12 @@
// 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 MvvmCross.Plugins;
using MvvmCross.UI;
namespace MvvmCross.Plugin.Visibility.Platform.Uap
{
- public class Plugin
- : IMvxPlugin
+ ... | 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 MvvmCross.Plugins;
using MvvmCross.UI;
namespace MvvmCross.Plugin.Visibility.Platform.Uap
{
public cl... | 1 | 13,751 | File should be renamed `PlugIn` -> `Plugin` | MvvmCross-MvvmCross | .cs |
@@ -17,6 +17,7 @@ package egress
import (
"context"
"fmt"
+ "net"
"testing"
"time"
| 1 | // Copyright 2021 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 | 38,646 | I scanned the new test cases quickly. Do we have one for an egressIPPool with multiple different IP ranges? | antrea-io-antrea | go |
@@ -148,6 +148,17 @@ abstract class Abstract_Component implements Component {
add_action( 'init', [ $this, 'define_settings' ] );
}
+ /**
+ * Method to filter component loading if needed.
+ *
+ * @since 1.0.1
+ * @access public
+ * @return bool
+ */
+ public function should_component_be_active() {
+ ret... | 1 | <?php
/**
* Abstract Component class for Header Footer Grid.
*
* Name: Header Footer Grid
* Author: Bogdan Preda <bogdan.preda@themeisle.com>
*
* @version 1.0.0
* @package HFG
*/
namespace HFG\Core\Components;
use HFG\Core\Interfaces\Component;
use HFG\Core\Settings;
use HFG\Core\Settings\Manager as Setti... | 1 | 19,231 | you can use a different name, like `maybe_activate` or `is_active` without `component` in the method name as this is used in the class name. E.g: `$component->should_component_be_active` is using twice the `component` word | Codeinwp-neve | php |
@@ -114,6 +114,11 @@ class OrderedBulkOperation extends BulkOperationBase {
*/
execute(_writeConcern, options, callback) {
const ret = this.bulkExecute(_writeConcern, options, callback);
+
+ if (!(ret && ret.options && ret.callback)) {
+ return ret;
+ }
+
options = ret.options;
callback... | 1 | 'use strict';
const common = require('./common');
const BulkOperationBase = common.BulkOperationBase;
const utils = require('../utils');
const toError = utils.toError;
const handleCallback = utils.handleCallback;
const BulkWriteResult = common.BulkWriteResult;
const Batch = common.Batch;
const mergeBatchResults = comm... | 1 | 15,187 | I think this might not be a complete enough check: what if `options` is `null`/`undefined`? | mongodb-node-mongodb-native | js |
@@ -0,0 +1,19 @@
+require "rails_helper"
+
+feature "Masquerade" do
+ scenario "admin masquerades as a user" do
+ email = "foo@bar.com"
+ user = create(:user, email: email)
+ admin = create(:user, admin: true)
+
+ sign_in_as(admin)
+ visit admin_users_path
+ click_on("Masquerade")
+
+ expect(page)... | 1 | 1 | 15,566 | Useless assignment to variable - `user`. | thoughtbot-upcase | rb | |
@@ -74,8 +74,8 @@ module Travis
sh.echo "#{release} is not installed. Downloading and installing pre-build binary.", ansi: :yellow
sh.echo "Downloading archive: ${archive_url}", ansi: :yellow
- sh.cmd "wget -o ${TRAVIS_HOME}/erlang.tar.bz2 ${archive_url}"
- sh.cmd "mkdi... | 1 | module Travis
module Build
class Script
class Erlang < Script
DEFAULTS = {
otp_release: 'R14B04'
}
def export
super
sh.export 'TRAVIS_OTP_RELEASE', otp_release, echo: false
end
def setup
super
sh.if "! -f #{activate_... | 1 | 17,373 | I think we would want to keep `-O` instead. I wonder how this worked before, though. | travis-ci-travis-build | rb |
@@ -26,13 +26,17 @@ namespace OpenTelemetry.Metrics
internal sealed class AggregatorStore
{
private static readonly ObjectArrayEqualityComparer ObjectArrayComparer = new ObjectArrayEqualityComparer();
+ private static readonly StringArrayEqualityComparer StringArrayComparer = new StringArrayEq... | 1 | // <copyright file="AggregatorStore.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 | 23,156 | another alternate option which doesn't have the risk of too many entries (when user keeps providing keys in different order) Have the dictionary as before If tagKeys lookup fail, sort and lookup again. If fails, insert both original tagKeys and its sorted one to the dictionary. So that we only store atmost 2 entries pe... | open-telemetry-opentelemetry-dotnet | .cs |
@@ -370,6 +370,13 @@ void PlanNode::releaseSymbols() {
}
}
+void PlanNode::updateSymbols() {
+ auto symTbl = qctx_->symTable();
+ for (auto out : outputVars_) {
+ out && symTbl->updateWrittenBy(out->name, out->name, this);
+ }
+}
+
std::ostream& operator<<(std::ostream& os, PlanNode::Kind kind) {
os << ... | 1 | /* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "graph/planner/plan/PlanNode.h"
#include <folly/String.h>
#include <folly/json.h>
#include <memory>
#include <vector>
#include "common/graph/Response.h"
#include "graph/context/QueryConte... | 1 | 33,336 | if (out != nullptr) | vesoft-inc-nebula | cpp |
@@ -79,6 +79,18 @@ def profile(user_name):
user = _get_user(user_name)
+ need_exact = request.args.get("exact")
+ if not need_exact:
+ listen_count = db_conn.get_listen_count_for_user(user_name)
+ # round off to nearest 10 as we can't guarantee that the values
+ # are not old, so sho... | 1 | from __future__ import absolute_import
from flask import Blueprint, render_template, request, url_for, Response, redirect, flash, current_app
from flask_login import current_user, login_required
from werkzeug.exceptions import NotFound, BadRequest, RequestEntityTooLarge, InternalServerError
from werkzeug.utils import s... | 1 | 14,070 | In the listenstore you catch the exception and then pass it on via Raise. However, here you do not catch the exception. You should catch the exception, but since this is a minor aspect of this page, perhaps show an error message when the count cannot be loaded in time. Then the rest of the page can still be rendered, r... | metabrainz-listenbrainz-server | py |
@@ -406,13 +406,14 @@ class TabbedBrowser(QWidget):
else:
yes_action()
- def close_tab(self, tab, *, add_undo=True, new_undo=True):
+ def close_tab(self, tab, *, add_undo=True, new_undo=True, transfer=False):
"""Close a tab.
Args:
tab: The QWebView to be cl... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2021 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 | 26,501 | wouldn't it be simpler to just add `or transfer` here? That way the more complicated set of conditionals down below don't have to get more clauses. | qutebrowser-qutebrowser | py |
@@ -13,8 +13,8 @@
# limitations under the License.
"""Wrapper for the BigQuery API client."""
-from googleapiclient import errors
from httplib2 import HttpLib2Error
+from googleapiclient import errors
from google.cloud.forseti.common.gcp_api import _base_repository
from google.cloud.forseti.common.gcp_api impo... | 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 | 29,252 | ditto; please fix everywhere | forseti-security-forseti-security | py |
@@ -164,6 +164,18 @@ Home directory can be found in a shared folder called "home"
Default: false,
Help: "Set to skip any symlinks and any other non regular files.",
Advanced: true,
+ }, {
+ Name: "subsystem",
+ Default: "sftp",
+ Help: "Specifies the SSH2 subsystem on the remote host.",... | 1 | // Package sftp provides a filesystem interface using github.com/pkg/sftp
// +build !plan9
package sftp
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"os/user"
"path"
"regexp"
"strconv"
"strings"
"sync"
"time"
"github.com/pkg/errors"
"github.com/pkg/sftp"
"github.com/rclone/rclone/fs"
"git... | 1 | 11,571 | Can you break this line into two parts - the first line makes the option help text for `--sftp-server` and its too long! `Specifies the path or command to run a sftp server on the remote host. The subsystem option is ignored when sftp_server is defined.` | rclone-rclone | go |
@@ -45,7 +45,7 @@ class LoopAnalyzer
Context &$inner_context = null,
bool $is_do = false,
bool $always_enters_loop = false
- ) {
+ ): ?bool {
$traverser = new PhpParser\NodeTraverser;
$assignment_mapper = new \Psalm\Internal\PhpVisitor\AssignmentMapVisitor($loop_scop... | 1 | <?php
namespace Psalm\Internal\Analyzer\Statements\Block;
use PhpParser;
use Psalm\Internal\Analyzer\ScopeAnalyzer;
use Psalm\Internal\Analyzer\Statements\ExpressionAnalyzer;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Internal\Clause;
use Psalm\CodeLocation;
use Psalm\Config;
use Psalm\Context;
use Psal... | 1 | 9,158 | I reverted that one in a previous PR because of a CI failure but it was actually unrelated | vimeo-psalm | php |
@@ -112,12 +112,13 @@ func Add2ToolsList(toolList map[string]types.ToolsInstaller, flagData map[string
if kubeVer == "" {
var latestVersion string
for i := 0; i < util.RetryTimes; i++ {
- latestVersion, err := util.GetLatestVersion()
+ version, err := util.GetLatestVersion()
if err != nil {
return ... | 1 | /*
Copyright 2019 The KubeEdge 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, so... | 1 | 16,228 | The for loop is useless here, since any error will make the function return. | kubeedge-kubeedge | go |
@@ -0,0 +1,16 @@
+#! /usr/bin/env python
+
+
+# import unittest2 as unittest
+
+# from nupic.bindings.algorithms import FlatSpatialPooler as FlatSpatialPooler
+
+# import spatial_pooler_py_api_test as pytest
+
+# pytest.SpatialPooler = FlatSpatialPooler
+
+# SpatialPoolerFlatAPITest = pytest.SpatialPoolerAPITest
+
+
+#... | 1 | 1 | 12,613 | Fix file endings here and elsewhere. | numenta-nupic | py | |
@@ -1188,7 +1188,7 @@ void CLIENT_STATE::check_project_timeout() {
if (p->possibly_backed_off && now > p->min_rpc_time) {
p->possibly_backed_off = false;
char buf[256];
- snprintf(buf, sizeof(buf), "Backoff ended for %s", p->get_project_name());
+ snprintf(buf, s... | 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,728 | I'd better increase `buf` length to MAXPATHLEN and not cut p->get_project_name() output twice | BOINC-boinc | php |
@@ -172,6 +172,7 @@ func (*impl) createStorageMiner(vmctx runtime.InvocationContext, params CreateSt
SectorSize: params.SectorSize,
})
if err != nil {
+ fmt.Printf("here it is: %s\n", err)
return fmt.Errorf("Could not set power table at address: %s", actorIDAddr)
}
return nil | 1 | package power
import (
"context"
"fmt"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/ipfs/go-hamt-ipld"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/filecoin-project/go-filecoin/internal/pkg/enccid"
"github.com/filecoin-project/go-filecoin/i... | 1 | 22,891 | Please remove the prints, even though this code will be trashed. | filecoin-project-venus | go |
@@ -26,8 +26,8 @@ import (
"runtime/debug"
"github.com/projectcalico/felix/config"
- "github.com/projectcalico/felix/dataplane/external"
- "github.com/projectcalico/felix/dataplane/linux"
+ extdataplane "github.com/projectcalico/felix/dataplane/external"
+ intdataplane "github.com/projectcalico/felix/dataplane/li... | 1 | // +build !windows
// Copyright (c) 2017-2019 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
//
//... | 1 | 16,847 | Not sure if you added deliberately but I've seen these popping up; is goimports adding them? | projectcalico-felix | go |
@@ -75,6 +75,9 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error { // nolint
dst.Spec.NetworkSpec.VPC.AvailabilityZoneSelection = restored.Spec.NetworkSpec.VPC.AvailabilityZoneSelection
}
+ dst.Spec.NetworkSpec.SecurityGroupOverrides = restored.Spec.NetworkSpec.SecurityGroupOverrides
+ dst.Spec.Ne... | 1 | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 14,391 | I think we might need some special handling for `Spec.ControlPlaneLoadBalancer.SecurityGroups`, it looks like we are currently only handling the case that `Spec.ControlPlaneLoadBalancer` is nil. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -0,0 +1,18 @@
+_base_ = '../cascade_rcnn/cascade_mask_rcnn_r50_fpn_20e_coco.py'
+
+model = dict(
+ pretrained='open-mmlab://dla60',
+ backbone=dict(
+ type='DLANet',
+ depth=60,
+ num_stages=4,
+ out_indices=(0, 1, 2, 3),
+ frozen_stages=1,
+ norm_cfg=dict(type='BN', r... | 1 | 1 | 22,386 | Is this from a third-party library? | open-mmlab-mmdetection | py | |
@@ -70,3 +70,18 @@ dom.isNativelyFocusable = function(el) {
}
return false;
};
+
+/**
+ * Determines if an element is in the focus order, but would not be if its
+ * tabindex were unspecified.
+ * @method insertedIntoFocusOrder
+ * @memberof axe.commons.dom
+ * @instance
+ * @param {HTMLElement} el The HTMLElement... | 1 | /* global dom */
/* jshint maxcomplexity: 20 */
/**
* Determines if focusing has been disabled on an element.
* @param {HTMLElement} el The HTMLElement
* @return {Boolean} Whether focusing has been disabled on an element.
*/
function focusDisabled(el) {
return el.disabled ||
(!dom.isVisible(el, true) && el.node... | 1 | 11,960 | Please put the `el.tabIndex > -1` in the first part of the expression. The matcher will run on every node on the page, so we should put the fastest part first. | dequelabs-axe-core | js |
@@ -20,14 +20,14 @@ package mysterium
import (
"path/filepath"
- log "github.com/cihub/seelog"
"github.com/mitchellh/go-homedir"
+ "github.com/mysteriumnetwork/go-openvpn/openvpn3"
"github.com/mysteriumnetwork/node/cmd"
"github.com/mysteriumnetwork/node/core/connection"
"github.com/mysteriumnetwork/node/co... | 1 | /*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 12,553 | `identity` is unused now, is it for future usage? | mysteriumnetwork-node | go |
@@ -9,11 +9,14 @@ Puppet::Functions.create_function(:prompt) do
# @param prompt The prompt to display.
# @param options A hash of additional options.
# @option options [Boolean] sensitive Disable echo back and mark the response as sensitive.
+ # The returned value will be wrapped by the `Sensitive` data typ... | 1 | # frozen_string_literal: true
require 'bolt/error'
# Display a prompt and wait for a response.
#
# > **Note:** Not available in apply block
Puppet::Functions.create_function(:prompt) do
# @param prompt The prompt to display.
# @param options A hash of additional options.
# @option options [Boolean] sensitive Di... | 1 | 16,555 | This would have assisted me a lot! I am on the "functions" page more than any other page in the docs | puppetlabs-bolt | rb |
@@ -971,7 +971,7 @@ class JobTask(BaseHadoopJobTask):
if self.__module__ == '__main__':
d = pickle.dumps(self)
module_name = os.path.basename(sys.argv[0]).rsplit('.', 1)[0]
- d = d.replace(b'(c__main__', "(c" + module_name)
+ d = d.replace(b'c... | 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 | 20,031 | I think it's better we keep `(` and encode with default encoding (utf-8). | spotify-luigi | py |
@@ -52,11 +52,12 @@ class BaselineFormat extends AbstractBaselinePlugin {
java.removeUnusedImports();
// use empty string to specify one group for all non-static imports
java.importOrder("");
- java.trimTrailingWhitespace();
if (eclips... | 1 | /*
* (c) Copyright 2018 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,348 | this is gonna be different in an IDE vs from gradlew?? | palantir-gradle-baseline | java |
@@ -140,3 +140,18 @@ end
Spork.each_run do
end
+
+shared_context "with isolated syntax" do
+ orig_matchers_syntax = nil
+ orig_mocks_syntax = nil
+
+ before(:each) do
+ orig_matchers_syntax = RSpec::Matchers.configuration.syntax
+ orig_mocks_syntax = RSpec::Mocks.configuration.syntax
+ end
+
+ after(:eac... | 1 | require 'rubygems'
unless ENV['NO_COVERALLS']
require 'simplecov' if RUBY_VERSION.to_f > 1.8
require 'coveralls'
Coveralls.wear! do
add_filter '/bundle/'
add_filter '/spec/'
add_filter '/tmp/'
end
end
begin
require 'spork'
rescue LoadError
module Spork
def self.prefork
yield
end
... | 1 | 9,982 | Do we not already have something for isolating syntax? | rspec-rspec-core | rb |
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
-## Copyright (C) 2012 CERN.
+## Copyright (C) 2013, 2014 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as | 1 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2012 CERN.
##
## Invenio 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) a... | 1 | 12,800 | 1: D100 Docstring missing 4: I102 copyright year is outdated, expected 2014 but got 2012 158: D103 Docstring missing 168: D101 Docstring missing 170: D102 Docstring missing 180: D102 Docstring missing 187: D102 Docstring missing | inveniosoftware-invenio | py |
@@ -1,11 +1,14 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
+# Purpose
+# This code example demonstrates how deny uploads of objects without
+# server-side AWS KMS encryption to an Amazon Simple Storage Solution (Amazon S3).
+
+# snippet-start:[... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
require 'aws-sdk-s3'
# Denies uploads of objects without server-side AWS KMS encryption to
# an Amazon S3 bucket.
#
# Prerequisites:
#
# - The Amazon S3 bucket to deny uploading objects without... | 1 | 20,532 | how **to** deny | awsdocs-aws-doc-sdk-examples | rb |
@@ -19,6 +19,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core
/// </summary>
public class ListenOptions : IEndPointInformation, IConnectionBuilder
{
+ private const string Http2ExperimentSwitch = "Switch.Microsoft.AspNetCore.Server.Kestrel.Experiential.Http2";
+ private const string ... | 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.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Protocols... | 1 | 14,612 | The only beef I have with this is that it's app domain global. | aspnet-KestrelHttpServer | .cs |
@@ -562,8 +562,11 @@ func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
if err = tc.SetKeepAlive(true); err != nil {
return
}
- if err = tc.SetKeepAlivePeriod(3 * time.Minute); err != nil {
- return
+ // OpenBSD has no user-settable per-socket TCP keepalive
+ if runtime.GOOS != "openbsd" {
+ if ... | 1 | // Copyright 2015 Light Code Labs, 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 13,654 | Can you link to the GitHub issue and/or PR so that it is easy for future readers to find out more about this? | caddyserver-caddy | go |
@@ -3009,3 +3009,18 @@ void StatelessValidation::PostCallRecordDestroyRenderPass(VkDevice device, VkRen
// Track the state necessary for checking vkCreateGraphicsPipeline (subpass usage of depth and color attachments)
renderpasses_states.erase(renderPass);
}
+
+bool StatelessValidation::manual_PreCallValidat... | 1 | /* Copyright (c) 2015-2019 The Khronos Group Inc.
* Copyright (c) 2015-2019 Valve Corporation
* Copyright (c) 2015-2019 LunarG, Inc.
* Copyright (C) 2015-2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... | 1 | 9,742 | Typical to report the value found as well as the valid bounds. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -151,7 +151,7 @@ var clerkCmd = &cobra.Command{
},
}
-func waitForCommit(client libgoal.Client, txid string) error {
+func waitForCommit(client libgoal.Client, txid string, transactionLastValidRound uint64) error {
// Get current round information
stat, err := client.Status()
if err != nil { | 1 | // Copyright (C) 2019-2021 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 | 42,380 | maybe we want 0 as a default value? | algorand-go-algorand | go |
@@ -193,7 +193,16 @@ func (api *Server) GetAccount(ctx context.Context, in *iotexapi.GetAccountReques
PendingNonce: pendingNonce,
NumActions: numActions,
}
- return &iotexapi.GetAccountResponse{AccountMeta: accountMeta}, nil
+ tipHeight := api.bc.TipHeight()
+ header, err := api.bc.BlockHeaderByHeight(tipHeig... | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 21,961 | can we get height from sf at very beginning of the function and use that as height of the block? | iotexproject-iotex-core | go |
@@ -0,0 +1,6 @@
+namespace Microsoft.AspNet.Server.Kestrel
+{
+ public class StandardsPoliceCompileModule : Microsoft.StandardsPolice.StandardsPoliceCompileModule
+ {
+ }
+} | 1 | 1 | 5,722 | Does this have to be public and in the primary namespace? | aspnet-KestrelHttpServer | .cs | |
@@ -1206,6 +1206,15 @@ func (fbo *folderBranchOps) initMDLocked(
return err
}
+ fbo.headLock.Lock(lState)
+ defer fbo.headLock.Unlock(lState)
+ // Some other thread got here first, so give up and let it go
+ // before we push anything to the servers.
+ if fbo.head != (ImmutableRootMetadata{}) {
+ fbo.log.CDebug... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"errors"
"fmt"
"os"
"reflect"
"strings"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/logger"
"github.com... | 1 | 14,613 | I'm a bit confused. Doesn't `mdWriterLock` already synchronizes calls to this function? | keybase-kbfs | go |
@@ -120,7 +120,13 @@ final class DailyMotionProvider extends BaseVideoProvider
public function getReferenceUrl(MediaInterface $media): string
{
- return sprintf('http://www.dailymotion.com/video/%s', $media->getProviderReference());
+ $providerReference = $media->getProviderReference();
+
+ ... | 1 | <?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\Provider;... | 1 | 12,406 | Does it make sense to generate a dailyMotion url without the video reference? It does not to me, but can we throw an exception here? | sonata-project-SonataMediaBundle | php |
@@ -24,10 +24,11 @@ import (
"sort"
"strings"
- stringutils "github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/string"
- "github.com/GoogleCloudPlatform/compute-image-tools/daisy"
computeBeta "google.golang.org/api/compute/v0.beta"
"google.golang.org/api/compute/v1"
+
+ stringutils "gi... | 1 | // Copyright 2018 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 | 13,356 | Why the separation of imports here? | GoogleCloudPlatform-compute-image-tools | go |
@@ -4,14 +4,14 @@ import (
"context"
"github.com/influxdata/flux/ast"
- "github.com/influxdata/flux/dependencies"
+
"github.com/influxdata/flux/interpreter"
"github.com/influxdata/flux/parser"
"github.com/influxdata/flux/semantic"
"github.com/influxdata/flux/values"
)
-func Eval(ctx context.Context, de... | 1 | package interptest
import (
"context"
"github.com/influxdata/flux/ast"
"github.com/influxdata/flux/dependencies"
"github.com/influxdata/flux/interpreter"
"github.com/influxdata/flux/parser"
"github.com/influxdata/flux/semantic"
"github.com/influxdata/flux/values"
)
func Eval(ctx context.Context, deps dependen... | 1 | 11,864 | Random extra newline. | influxdata-flux | go |
@@ -0,0 +1,18 @@
+/* global dom */
+
+/**
+ * Get all descendents that are focusable from a given node
+ * @method getFocusableElements
+ * @memberof axe.commons.dom
+ * @instance
+ * @param {Object} virtualNode The virtualNode to assess
+ * @return {Boolean}
+ */
+dom.getFocusableElements = function getFocusableEleme... | 1 | 1 | 13,439 | No need for this variable. | dequelabs-axe-core | js | |
@@ -79,6 +79,15 @@ def authentication_required(url, authenticator, abort_on):
return answer
+def _format_msg(msg: str) -> str:
+ """Convert message to HTML suitable for rendering."""
+ ret = msg
+ ret = html.escape(ret)
+ ret = ret.strip()
+ ret = ret.replace('\n', '<br />')
+ return ret
+
+
... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2021 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 | 25,809 | Why not use `msg` directly below? | qutebrowser-qutebrowser | py |
@@ -29,9 +29,8 @@ import org.apache.parquet.schema.OriginalType;
import org.apache.parquet.schema.PrimitiveType;
import org.apache.parquet.schema.Type;
-import static org.apache.parquet.schema.Type.Repetition.REPEATED;
-
public class ParquetTypeVisitor<T> {
+ @SuppressWarnings({"checkstyle:IllegalType", "checksty... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 15,950 | I think other places changed to use `Deque` instead of suppressing the warning. | apache-iceberg | java |
@@ -4,8 +4,11 @@
#include "engine/guidance/toolkit.hpp"
#include <boost/assert.hpp>
+#include <boost/range/algorithm_ext/erase.hpp>
+
#include <iostream>
-#include <vector>
+#include <cstddef>
+#include <utility>
using TurnInstruction = osrm::extractor::guidance::TurnInstruction;
using TurnType = osrm::extract... | 1 | #include "engine/guidance/post_processing.hpp"
#include "extractor/guidance/turn_instruction.hpp"
#include "engine/guidance/toolkit.hpp"
#include <boost/assert.hpp>
#include <iostream>
#include <vector>
using TurnInstruction = osrm::extractor::guidance::TurnInstruction;
using TurnType = osrm::extractor::guidance::Tu... | 1 | 15,658 | missing: utility, cstddef also: vector is already included in the header (interface requires vectors as in/out types) | Project-OSRM-osrm-backend | cpp |
@@ -16,6 +16,9 @@ module.exports = {
'html',
'text-summary',
],
+ globals: {
+ fetchMock: '',
+ },
rootDir: '../../',
transform: {
'^.+\\.[jt]sx?$': '<rootDir>/node_modules/@wordpress/scripts/config/babel-transform', | 1 | const { preset } = require( '@wordpress/scripts/config/jest-unit.config' );
module.exports = {
preset,
collectCoverage: true,
collectCoverageFrom: [
'assets/**/**.js',
],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/node_modules/',
'<rootDir>/assets/js/googl... | 1 | 29,220 | I'm not sure this is necessary in the config here, as Jest would be setting the global `fetchMock = ''`. See below. | google-site-kit-wp | js |
@@ -57,7 +57,7 @@ public abstract class Message implements Part, Body {
final int MULTIPLIER = 31;
int result = 1;
- result = MULTIPLIER * result + mFolder.getName().hashCode();
+ result = MULTIPLIER * result + (mFolder != null ? mFolder.getName().hashCode() : 0);
result = MUL... | 1 |
package com.fsck.k9.mail;
import java.io.IOException;
import java.util.Collections;
import java.util.Date;
import java.util.EnumSet;
import java.util.Set;
import android.support.annotation.NonNull;
import com.fsck.k9.mail.filter.CountingOutputStream;
import com.fsck.k9.mail.filter.EOLConvertingOutputStream;
import ... | 1 | 16,166 | Can `mFolder == null` happen during regular operations? Or is it only so we can be lazy in tests? | k9mail-k-9 | java |
@@ -0,0 +1,8 @@
+require "migrate"
+
+class AddPreferredEmailFormat < ActiveRecord::Migration
+ def change
+ create_enumeration :email_format_enum, %w(text_only multipart)
+ add_column :users, :preferred_email_format, :email_format_enum, :null => false, :default => "multipart"
+ end
+end | 1 | 1 | 10,673 | I'd suggest using the actual MIME types here - so `text/plain` and `multipart/alternative` or does that cause problems with what postgres allows for enumeration names? If so then maybe just replace the slash with an underscore? | openstreetmap-openstreetmap-website | rb | |
@@ -619,9 +619,9 @@ def package_put(owner, package_name, package_hash):
if team_access is None:
raise ApiException(
requests.codes.forbidden,
- ("%(user)s/%(pkg)s is private. To share it with the team, " +
- "run `quilt access add... | 1 | # Copyright (c) 2017 Quilt Data, Inc. All rights reserved.
"""
API routes.
"""
from collections import defaultdict
from datetime import datetime, timedelta, timezone
from functools import wraps
import json
import time
from urllib.parse import urlencode
import boto3
from flask import abort, g, redirect, render_templa... | 1 | 16,163 | Ohh. `TeamName` is actually a "friendly" name displayed in the Catalog - not the name used in the CLI. So I guess we'll need a new variable here. (That is, this is going to be mainly a `quilt.yaml` change. You won't need the `.lower()`, though.) | quiltdata-quilt | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.