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 |
|---|---|---|---|---|---|---|---|
@@ -66,7 +66,7 @@ static void on_setup_ostream(h2o_filter_t *_self, h2o_req_t *req, h2o_ostream_t
if (!req->res.mime_attr->is_compressible)
goto Next;
/* 100 is a rough estimate */
- if (req->res.content_length <= 100)
+ if (req->res.content_length <= self->args.min_size)
goto Next;
... | 1 | /*
* Copyright (c) 2015,2016 Justin Zhu, DeNA Co., Ltd., Kazuho Oku
*
* 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 u... | 1 | 11,118 | Should we better change the operator to `<` since the variable defines the minimum size that gets compressed? | h2o-h2o | c |
@@ -233,6 +233,14 @@ public class StreamTest extends AbstractLinearSeqTest {
assertThat(actual).isEqualTo(3);
}
+ // -- append
+
+ @Test
+ public void shouldAppendMillionTimes() {
+ final int bigNum = 1_000_000;
+ assertThat(Stream.range(0, bigNum).foldLeft(Stream.empty(), Stream:... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _ _____
* / / \/ \ / \/ \ / /\__\/ // \/ \ / / _ \ Javaslang
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \__/ / Copyright 2014-now Daniel Dietrich
* /___/\_/ \_/\____/\_/ \_/\__\/__/___\_/ \_// \__/_____/ Licensed under... | 1 | 7,329 | I'm really impressed by the AppendElements addition! Very cool! :-) | vavr-io-vavr | java |
@@ -230,7 +230,7 @@ public class GridLauncherV3 {
}
configureLogging(common.getLog(), common.getDebug());
- log.info(version());
+ log.finest(version());
return true;
}
| 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,456 | This change means that users can't easily see which version of the selenium server they're using. This is `info` level information. | SeleniumHQ-selenium | js |
@@ -41,6 +41,8 @@ from qutebrowser.misc import editor, guiprocess
from qutebrowser.completion.models import urlmodel, miscmodels
from qutebrowser.mainwindow import mainwindow
+# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-69904
+MAX_WORLD_ID = 256 if qtutils.version_check('5.11.2') else 11
class Command... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 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 | 21,901 | This should be in qtutils and imported to here and the other place instead of declaring it twice. | qutebrowser-qutebrowser | py |
@@ -73,6 +73,15 @@ func (l *Logger) FetchCert(ctx context.Context, url string, bundle bool) ([][]by
return l.baseCl.FetchCert(ctx, url, bundle)
}
+func (l *Logger) FetchCertAlternatives(ctx context.Context, url string, bundle bool) ([][][]byte, error) {
+ l.log.V(logf.TraceLevel).Info("Calling FetchCertAlternative... | 1 | /*
Copyright 2019 The Jetstack cert-manager contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 23,197 | Seems a bit weird to add a timeout in "logging" middleware, but I see that that is done elsewhere, so fine. | jetstack-cert-manager | go |
@@ -25,7 +25,7 @@ export default AbstractIndexRoute.extend(ModalHelper, UserSession, {
actions: {
deleteItem(item) {
let i18n = this.get('i18n');
- let message = i18n.t('admin.customForms.messages.deleteForm');
+ let message = i18n.t('messages.delete_singular', { name: 'form' });
let mod... | 1 | import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route';
import Ember from 'ember';
import ModalHelper from 'hospitalrun/mixins/modal-helper';
import UserSession from 'hospitalrun/mixins/user-session';
import { translationMacro as t } from 'ember-i18n';
const { computed } = Ember;
export default Abst... | 1 | 13,474 | This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted. | HospitalRun-hospitalrun-frontend | js |
@@ -556,6 +556,13 @@ class Uppy {
files: updatedFiles
})
+ // If nothing is uploading anymore, and if nothing has uploaded yet - allow new uploads!
+ if (Object.keys(updatedFiles).length === 0) {
+ this.setState({
+ allowNewUpload: true
+ })
+ }
+
removeUploads.forEach((uplo... | 1 | const Translator = require('@uppy/utils/lib/Translator')
const ee = require('namespace-emitter')
const cuid = require('cuid')
const throttle = require('lodash.throttle')
const prettyBytes = require('@uppy/utils/lib/prettyBytes')
const match = require('mime-match')
const DefaultStore = require('@uppy/store-default')
con... | 1 | 12,334 | Could we combine this with the `setState` call above, so we don't have to call it twice? | transloadit-uppy | js |
@@ -31,10 +31,10 @@ class String
end
def fix_encoding_if_invalid!
- unless valid_encoding?
- encode!('utf-8', 'binary', invalid: :replace, undef: :replace)
- end
- force_encoding('utf-8')
+ # All new strings claim to be 8-bit ASCII in the DB, but are really saved as UTF-8...
+ force_encoding... | 1 | class String
def strip_tags
gsub(/<.*?>/, '')
end
def strip_tags_preserve_line_breaks
html = CGI.unescapeHTML(self).gsub(/\r/, '')
# Preserve line-breaking tags by converting them to carriage returns
html.gsub!(/<br\s*\/?>\s*\n?/, "\n")
html.gsub!(/<\/p>\s*\n?/, "\n\n")
html.gsub!(/<p\s*... | 1 | 7,528 | That part that still leaves me mystified is how the String class, when populated with a value from the SQL_ASCII encoded database is set to "UTF-8" encoding. Since the database is SQL_ASCII, each byte in the string stored in the database is considered one character. Ruby, however, is using UTF-8, which is writing a ser... | blackducksoftware-ohloh-ui | rb |
@@ -233,13 +233,14 @@ func PrecreatedDaoOption(dao *blockDAO) Option {
}
}
-// BoltDBDaoOption sets blockchain's dao with BoltDB from config.Chain.ChainDBPath
+// BoltDBDaoOption sets blockchain's dao with BoltDB from config.Chain.ChainDBPath and cfg.DB.IndexDBPath
func BoltDBDaoOption() Option {
return func(bc... | 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 | 18,823 | Is it a doable way and does it make sense. | iotexproject-iotex-core | go |
@@ -95,7 +95,10 @@ def verify_limit_range(limit):
max_query_limit = constants.MAX_QUERY_SIZE
if limit > max_query_limit:
LOG.warning('Query limit %d was larger than max query limit %d, '
- 'setting limit to %d', limit, max_query_limit, max)
+ 'setting limit to %d... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 11,399 | max was wrong here. As its buitlt-in, not a number, and a TypeError was thrown. | Ericsson-codechecker | c |
@@ -1,3 +1,5 @@
+#! /usr/bin/env python
+
# MIT License
# Copyright (c) 2018 Jose Amores | 1 | # MIT License
# Copyright (c) 2018 Jose Amores
# 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, pu... | 1 | 16,523 | This change is not needed, please revert it. | secdev-scapy | py |
@@ -40,7 +40,9 @@ def train(params, train_set, num_boost_round=100,
Customized objective function.
feval : callable or None, optional (default=None)
Customized evaluation function.
+ Should accept two parameters: preds, train_data.
Note: should return (eval_name, eval_result, is_h... | 1 | # coding: utf-8
# pylint: disable = invalid-name, W0105
"""Training Library containing training routines of LightGBM."""
from __future__ import absolute_import
import collections
import warnings
from operator import attrgetter
import numpy as np
from . import callback
from .basic import Booster, Dataset, LightGBMErr... | 1 | 18,374 | @ClimbsRocks Please add that it could be a string. `feval : callable, string or None, optional (default=None)` | microsoft-LightGBM | cpp |
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Faker
- class Sports
+ class Sports < Base
class Basketball < Base
class << self
## | 1 | # frozen_string_literal: true
module Faker
class Sports
class Basketball < Base
class << self
##
# Produces the name of a basketball team.
#
# @return [String]
#
# @example
# Faker::Sports::Basketball.team #=> "Golden State Warriors"
#
... | 1 | 9,364 | now that I have started using, I realized, I could have named my new class singular `Sport` and not having to make this change. let me know, I will update | faker-ruby-faker | rb |
@@ -23,7 +23,7 @@ func GetApps() map[string][]App {
apps := make(map[string][]App)
for platformType := range PluginMap {
labels := map[string]string{
- "com.ddev.platform": platformType,
+ "com.ddev.platform": "ddev",
"com.docker.compose.service": "web",
}
sites, err := dockerutil... | 1 | package platform
import (
"fmt"
"path/filepath"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/fatih/color"
"github.com/fsouza/go-dockerclient"
"github.com/gosuri/uitable"
"errors"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/util"
homedir "... | 1 | 11,384 | Not sure why this is changing to a hard-coded string. | drud-ddev | php |
@@ -453,6 +453,15 @@ class FlowContentView(RequestHandler):
))
+class Commands(RequestHandler):
+ def post(self):
+ result = self.master.commands.execute(self.json["command"])
+ if result is None:
+ self.write({"result": ""})
+ return
+ self.write({"result": st... | 1 | import asyncio
import hashlib
import json
import logging
import os.path
import re
from io import BytesIO
from typing import ClassVar, Optional
import tornado.escape
import tornado.web
import tornado.websocket
import mitmproxy.flow
import mitmproxy.tools.web.master # noqa
from mitmproxy import contentviews
from mitmp... | 1 | 15,791 | Is there a reason why we `str` the result? It would be nice to eventually support more datatypes here, so we want to generally aim for arbitrary JSON. | mitmproxy-mitmproxy | py |
@@ -29,7 +29,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.commons.lang.SerializationUtils;
+import org.apache.commons.lang3.SerializationUtils;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapreduce.InputFormat;
import org.... | 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,920 | Why did we update the to this api? | apache-iceberg | java |
@@ -164,4 +164,17 @@ public class Preferences {
public SharedPreferences getPreferences() {
return mStorage;
}
+
+ public static <T extends Enum<T>> T getEnumStringPref(SharedPreferences prefs, String key, T defaultEnum) {
+ String stringPref = prefs.getString(key, defaultEnum.name());
+ ... | 1 |
package com.fsck.k9;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import co... | 1 | 12,938 | should probably just catch `IllegalArgumentException` here | k9mail-k-9 | java |
@@ -38,7 +38,9 @@ type truncateFunc func(t Time, d Duration) Time
func (w *Window) getTruncateFunc(d Duration) (truncateFunc, error) {
switch months, nsecs := d.Months(), d.Nanoseconds(); {
case months != 0 && nsecs != 0:
- return nil, errors.New(codes.Invalid, "duration used as an interval cannot mix month and n... | 1 | package execute
import (
"time"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/internal/errors"
"github.com/influxdata/flux/values"
)
type Window struct {
Every Duration
Period Duration
Offset Duration
}
// NewWindow creates a window with the given parameters,
// and normalizes the offset to... | 1 | 15,095 | What does this error message mean? | influxdata-flux | go |
@@ -864,7 +864,7 @@ def get_utf8_value(value):
return value
if not isinstance(value, six.string_types):
- value = six.text_type(value)
+ value = six.text_type(value).encode('utf-8')
if isinstance(value, six.text_type):
value = value.encode('utf-8') | 1 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation file... | 1 | 12,086 | I don't think this change is necessary. If we cast `value` to type `six.text_type`, then the next if statement should evaluate to True and do the encoding for us. | boto-boto | py |
@@ -54,6 +54,11 @@ class CartItem < ActiveRecord::Base
)
end
end
+ else
+ self.cart_item_traits.build(
+ name: trait[0],
+ value: handle_trait_values_for(trait)
+ )
end
end
end | 1 | class CartItem < ActiveRecord::Base
include PropMixin
belongs_to :cart
has_many :cart_item_traits
has_many :comments, as: :commentable
has_many :properties, as: :hasproperties
def green?
cart_item_traits.map(&:name).include?('green')
end
def features
cart_item_traits.select{ |trait| trait.name... | 1 | 12,105 | Can we move this into a method(s)? | 18F-C2 | rb |
@@ -22,3 +22,13 @@ func uitoa(val uint) string {
buf[i] = byte(val + '0')
return string(buf[i:])
}
+
+// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
+func clen(n []byte) int {
+ for i := 0; i < len(n); i++ {
+ if n[i] == 0 {
+ return i
+ }
+ }
+ return len(n)
+} | 1 | // Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
return "-" + uitoa(uint(-val))
}
return ui... | 1 | 12,951 | You could perhaps call this `strlen` (although I don't particularly care about the name as it is an implementation detail). | tinygo-org-tinygo | go |
@@ -15,13 +15,8 @@ public class Regula
{
public const int Iterations = 4000000;
- public static volatile object VolatileObject;
-
[MethodImpl(MethodImplOptions.NoInlining)]
- private static void Escape(object obj)
- {
- VolatileObject = obj;
- }
+ private static void Escape(object _) ... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// The modified regula-falsi routine adapted from Conte and De Boor
using BenchmarkDotNet.Attributes;
using Syste... | 1 | 11,804 | should we have a common `Escape()` method that can be used everywhere? | dotnet-performance | .cs |
@@ -228,7 +228,6 @@ export function diff(
*/
export function commitRoot(commitQueue, root) {
if (options._commit) options._commit(root, commitQueue);
-
commitQueue.some(c => {
try {
commitQueue = c._renderCallbacks; | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component } from '../component';
import { Fragment } from '../create-element';
import { diffChildren, toChildArray } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '../options';
/**
... | 1 | 14,858 | The whitespace removal above here is probably unintentional :slightly_smiling_face: | preactjs-preact | js |
@@ -90,14 +90,14 @@ func newServer(cfg config.Config, testing bool) (*Server, error) {
func (s *Server) Start(ctx context.Context) error {
cctx, cancel := context.WithCancel(context.Background())
s.subModuleCancel = cancel
- if err := s.p2pAgent.Start(cctx); err != nil {
- return errors.Wrap(err, "error when star... | 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 | 22,896 | should we start p2p even after dispatcher? b/c dispatcher handles msg from p2p | iotexproject-iotex-core | go |
@@ -101,13 +101,13 @@ func TestHandleInterfaceEmptySuccess(t *testing.T) {
handler := jsonHandler{reader: ifaceEmptyReader{}, handler: reflect.ValueOf(h)}
reqBuf := yarpc.NewBufferString(`["a", "b", "c"]`)
- _, _, err := handler.Handle(context.Background(), &yarpc.Request{
+ _, respBuf, err := handler.Handle(cont... | 1 | // Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 17,486 | Did we decide once and for all to use req/resp throughout spring? | yarpc-yarpc-go | go |
@@ -8,8 +8,13 @@ describe "videos/_access_callout" do
render_callout video, signed_out: true
- expect(rendered).to have_css ".access-callout.auth-to-access"
- expect(rendered).to have_auth_to_access_link_for(video)
+ expect(rendered).to have_content(
+ I18n.t("videos.show.auth... | 1 | require "rails_helper"
describe "videos/_access_callout" do
context "when the user is a guest" do
context "and the video is a free sample" do
it "displays an auth to access message and button for the video" do
video = build_stubbed(:video, :free_sample)
render_callout video, signed_out: tr... | 1 | 16,891 | Put a comma after the last parameter of a multiline method call. | thoughtbot-upcase | rb |
@@ -71,8 +71,18 @@ func populateScratchBucketGcsPath(scratchBucketGcsPath *string, zone string, mgc
if err != nil {
return "", daisy.Errf("invalid scratch bucket GCS path %v", scratchBucketGcsPath)
}
+
if !scratchBucketCreator.IsBucketInProject(*project, scratchBucketName) {
- return "", daisy.Errf("Scra... | 1 | // Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 12,354 | This will delete the whole bucket, which could have unforseen consequences in normal use cases. We should be deleting args.SourceFile instead. | GoogleCloudPlatform-compute-image-tools | go |
@@ -721,5 +721,9 @@ public class Constants {
// Constant to allow test version to be passed as flow parameter. Passing test version will be
// allowed for Azkaban ADMIN role only
public static final String FLOW_PARAM_ALLOW_IMAGE_TEST_VERSION = "allow.image.test.version";
+
+ //
+ public static fina... | 1 | /*
* Copyright 2018 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 22,457 | Lets move the whole string to next line for better readability | azkaban-azkaban | java |
@@ -104,7 +104,7 @@ app.controller('CalendarListController', ['$scope', '$rootScope', '$window', 'Ha
$scope.subscription.newSubscriptionLocked = false;
})
.catch(function() {
- OC.Notification.showTemporary(t('calendar', 'Error saving WebCal-calendar'));
+ OC.Notification.showTemporary(t('c... | 1 | /**
* Calendar App
*
* @author Raghu Nayyar
* @author Georg Ehrke
* @copyright 2016 Raghu Nayyar <hey@raghunayyar.com>
* @copyright 2016 Georg Ehrke <oc.list@georgehrke.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
*... | 1 | 6,268 | Please change this back to `Error saving WebCal-calendar` (and `Error saving WebCal-calendar` only) | nextcloud-calendar | js |
@@ -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 | rb |
@@ -3,14 +3,18 @@ using Datadog.Trace.Logging;
using Datadog.Trace.Logging.LogProviders;
using NLog;
using NLog.Config;
+using NLog.Layouts;
using NLog.Targets;
using Xunit;
namespace Datadog.Trace.Tests.Logging
{
[Collection(nameof(Datadog.Trace.Tests.Logging))]
+ [TestCaseOrderer("Datadog.Trace.TestH... | 1 | using System.Collections.Generic;
using Datadog.Trace.Logging;
using Datadog.Trace.Logging.LogProviders;
using NLog;
using NLog.Config;
using NLog.Targets;
using Xunit;
namespace Datadog.Trace.Tests.Logging
{
[Collection(nameof(Datadog.Trace.Tests.Logging))]
public class NLogLogProviderTests
{
priv... | 1 | 15,839 | Not ideal, but I used a test case orderer so I could avoid a bug that occurs when running two tracer's sequentially with different DD_LOGS_INJECTION settings. | DataDog-dd-trace-dotnet | .cs |
@@ -129,6 +129,13 @@ func (p *Packer) Size() uint {
return p.bytes
}
+// HeaderFull returns true if the pack header is at maximum capacity.
+func (p *Packer) HeaderFull() bool {
+ p.m.Lock()
+ defer p.m.Unlock()
+ return EntrySize+crypto.Extension+(uint(headerLengthSize)*uint(len(p.blobs)-1)) <= uint(maxHeaderSize... | 1 | package pack
import (
"encoding/binary"
"fmt"
"io"
"sync"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/crypto"
)
// Packer is used to create a new Pack.
type Packer struct {
blobs []restic.... | 1 | 12,922 | I think the condition should be ` uint(headerLengthSize) + crypto.Extension + (len(p.blobs)+1)*uint(EntrySize) > uint(maxHeaderSize)` `headerLengthSize` is only the length field. But the pack header also includes the blob type and its ID. And the result of the check, currently seems to be inverted. | restic-restic | go |
@@ -19,7 +19,6 @@ namespace Nethermind.Mev.Test
{
public enum SelectorType
{
- V1,
V2,
}
} | 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,457 | Remove selector if only 1 version is supported | NethermindEth-nethermind | .cs |
@@ -1188,7 +1188,7 @@ class Application extends BaseApplication {
const selectedNoteIds = state.selectedNoteIds;
const note = selectedNoteIds.length === 1 ? await Note.load(selectedNoteIds[0]) : null;
- for (const itemId of ['copy', 'paste', 'cut', 'selectAll', 'bold', 'italic', 'link', 'code', 'insertDateTime... | 1 | require('app-module-path').addPath(__dirname);
const { BaseApplication } = require('lib/BaseApplication');
const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
const Setting = require('lib/models/Setting.js');
const { shim } = require('lib/shim.js');
const MasterKey = require('lib/models/MasterKey');... | 1 | 13,088 | Why did you remove more than the asked command? | laurent22-joplin | js |
@@ -320,11 +320,15 @@ func (s *session) handlePacketImpl(p *receivedPacket) error {
s.largestRcvdPacketNumber,
hdr.PacketNumber,
)
- if utils.Debug() {
- utils.Debugf("<- Reading packet 0x%x (%d bytes) for connection %x @ %s", hdr.PacketNumber, len(data)+len(hdr.Raw), hdr.ConnectionID, time.Now().Format("15:04... | 1 | package quic
import (
"crypto/tls"
"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"... | 1 | 5,696 | I just realized that we are logging time now - we shouldn't do that here, that's the logger's job. I've opened a new issue for that #444. | lucas-clemente-quic-go | go |
@@ -44,13 +44,13 @@ const char *MolHolderBaseDoc =
"The API is quite simple: \n"
" AddMol(mol) -> adds a molecule to the molecule holder, returns index of "
"molecule\n"
- " GetMol(idx) -> return the molecule at index idx\n";
+ " GetMol(idx,sanitize=True) -> return the molecule at index idx\n";
... | 1 | // Copyright (c) 2017-2019, Novartis Institutes for BioMedical Research Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the abo... | 1 | 20,104 | why is the `sanitize=True` here in the docs? | rdkit-rdkit | cpp |
@@ -9,6 +9,9 @@ class Approval < ActiveRecord::Base
end
belongs_to :proposal
+ belongs_to :user
+ has_many :delegations, through: :user, source: :outgoing_delegates
+ has_many :delegates, through: :delegations, source: :assignee
acts_as_list scope: :proposal
belongs_to :parent, class_name: 'Approval' | 1 | class Approval < ActiveRecord::Base
include WorkflowModel
has_paper_trail
workflow do # overwritten in child classes
state :pending
state :actionable
state :approved
end
belongs_to :proposal
acts_as_list scope: :proposal
belongs_to :parent, class_name: 'Approval'
has_many :child_approva... | 1 | 13,749 | Didn't end up using this, but I think it's useful anyway. | 18F-C2 | rb |
@@ -121,7 +121,16 @@ namespace Microsoft.DotNet.Build.Tasks
// Every test project comes with 4 of them, so not producing a warning here.
else if (!string.IsNullOrEmpty(relativePath))
{
- copyCommands.AppendLine($"call :copyandcheck \"%PACKAGE_DIR%\\{... | 1 | using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.IO;
using System.Text;
namespace Microsoft.DotNet.Build.Tasks
{
public class GenerateTestExecutionScripts : Task
{
[Required]
public string[] TestCommands { get; set; }
[Required]
publ... | 1 | 9,805 | I'm pretty sure there's already a metadata item that contains what you're calculating here (PackageRelativePath)? | dotnet-buildtools | .cs |
@@ -79,6 +79,15 @@ module ProjectsHelper
end
end
+ def browse_security_button(project)
+ css_class = project.uuid.blank? ? 'disabled' : 'btn-primary'
+ project_name = CGI.escape(project.name)
+ url = ENV['OH_SECURITY_URL'] + "/#{project_name}/#{project.uuid}?project_id=#{project.id}"
+ haml_tag :... | 1 | module ProjectsHelper
def project_activity_level_class(project, image_size)
haml_tag :a, href: 'http://blog.openhub.net/about-project-activity-icons/', target: '_blank',
class: project_activity_css_class(project, image_size),
title: project_activity_text(project, true)
end
d... | 1 | 8,429 | We want to show this button only when there is a page for us to connect to. There is no reason to put the Browse Security Info button on the page at all unless we've identified the UUID from the KB. | blackducksoftware-ohloh-ui | rb |
@@ -42,10 +42,14 @@
#include "res/windowsicon.xpm"
#include "res/macosicon.xpm"
#include "res/linuxicon.xpm"
+#include "res/androidicon.xpm"
#include "res/freebsdicon.xpm"
+#include "res/linuxarmicon2.xpm"
#include "res/atiicon.xpm"
+#include "res/amdicon2.xpm"
#include "res/nvidiaicon.xpm"
-#include "res/android... | 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 | 11,361 | Why `2` in this and others? | BOINC-boinc | php |
@@ -118,6 +118,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting
var testHostProcessName = (this.architecture == Architecture.X86) ? X86TestHostProcessName : X64TestHostProcessName;
var currentWorkingDirectory = Path.GetDirectoryName(typeof(DefaultTestHostManager).GetT... | 1 | // Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.VisualStudio.TestP... | 1 | 11,208 | This may cause a new allocation, please consider merging the concat in above line. Same applies to change in dotnethostmanager. | microsoft-vstest | .cs |
@@ -490,6 +490,16 @@ given file (report RP0402 must not be disabled)'}
importedname = node.modname
else:
importedname = node.names[0][0].split('.')[0]
+ if isinstance(node, astroid.ImportFrom) and \
+ node.as_string().startswith('from .'):
+ ... | 1 | # Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, o... | 1 | 8,398 | Alternatively (and better) would be to look for the .level attribute of the node. If it's bigger or equal to 1, than that is a relative import. So "from . import x" should have level 1, while "from .. import z" should have level 2 and so on. The same should happen for "from .c import z". | PyCQA-pylint | py |
@@ -25,4 +25,14 @@ public abstract class AbstractASTXPathHandler implements XPathHandler {
public void initialize(IndependentContext context, Language language, Class<?> functionsClass) {
context.declareNamespace("pmd-" + language.getTerseName(), "java:" + functionsClass.getName());
}
+
+ @Overrid... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.ast.xpath;
import org.jaxen.Navigator;
import net.sourceforge.pmd.annotation.InternalApi;
import net.sourceforge.pmd.lang.Language;
import net.sourceforge.pmd.lang.XPathHandler;
import net.sf.sax... | 1 | 17,229 | Btw. this API must definitely change with PMD 7 - we are exposing here a implementation detail (that we use Saxon). And it happens, that the way, how custom functions are registered, changed with Saxon 9.5... which makes the need for a implementation agnostic API relevant... | pmd-pmd | java |
@@ -44,6 +44,8 @@ type GenericDeploymentSpec struct {
Timeout Duration `json:"timeout,omitempty" default:"6h"`
// List of encrypted secrets and targets that should be decoded before using.
Encryption *SecretEncryption `json:"encryption"`
+ // Notification to be sent to users via Slack or email
+ Notification *Not... | 1 | // Copyright 2020 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 19,952 | nit: `Additional configuration used while sending notification to external services.` | pipe-cd-pipe | go |
@@ -1656,7 +1656,7 @@ class TargetLocator {
window(nameOrHandle) {
return this.driver_.schedule(
new command.Command(command.Name.SWITCH_TO_WINDOW).
- setParameter('name', nameOrHandle),
+ setParameter('handle', nameOrHandle),
'WebDriver.switchTo().window(' + nameOrHandle... | 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 | 13,587 | This should only be sent if the driver is speaking to a W3C conformant remote, so we need an if-condition check like we have in the Python bindings. | SeleniumHQ-selenium | js |
@@ -247,7 +247,7 @@ describe 'LinksControllerTest' do
get :new, project_id: project.url_name, category_id: category_id
assigns(:category_name).must_equal 'Homepage'
- assigns(:link).title.must_equal :Homepage
+ assigns(:link).title.must_equal 'Homepage'
end
it 'load_category_and_title_for_new_... | 1 | require 'test_helper'
describe 'LinksControllerTest' do
let(:project) { create(:project) }
let(:admin) { create(:admin) }
let(:user) { create(:account) }
before do
@link_homepage = create(:link, project: project, link_category_id: Link::CATEGORIES[:Homepage])
@link_download = create(:link, project: pr... | 1 | 6,968 | This should have failed before. | blackducksoftware-ohloh-ui | rb |
@@ -0,0 +1,19 @@
+package paymentchannel
+
+import (
+ "github.com/filecoin-project/go-address"
+ "github.com/filecoin-project/specs-actors/actors/builtin/paych"
+)
+
+// ChannelInfo is the primary payment channel record
+type ChannelInfo struct {
+ Owner address.Address // Payout (From) address for this channel, ha... | 1 | 1 | 23,040 | the paymentchannel dir is where the paymentchannel manager will live. it will store the types below. | filecoin-project-venus | go | |
@@ -219,7 +219,9 @@ webdriver.CommandName = {
GET_SESSION_LOGS: 'getSessionLogs',
// Non-standard commands used by the standalone Selenium server.
- UPLOAD_FILE: 'uploadFile'
+ UPLOAD_FILE: 'uploadFile',
+
+ GET_CANVAS_URL: 'getCanvasUrl'
};
| 1 | // Copyright 2011 Software Freedom Conservancy. 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 req... | 1 | 11,766 | This is Safari specific and should be defined somewhere in the `safaridriver` namespace | SeleniumHQ-selenium | rb |
@@ -58,13 +58,13 @@ func TestNewRound(t *testing.T) {
require := require.New(t)
bc, roll := makeChain(t)
rc := &roundCalculator{bc, true, roll, bc.CandidatesByHeight, 0}
- proposer, err := rc.calculateProposer(5, 1, []string{"1", "2", "3", "4", "5"})
+ _, err := rc.calculateProposer(5, 1, []string{"1", "2", "3", ... | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 19,334 | assignments should only be cuddled with other assignments (from `wsl`) | iotexproject-iotex-core | go |
@@ -641,12 +641,13 @@ Blockly.genUid.soup_ = '!#%()*+,-./:;=?@[]^_`{|}~' +
* Measure some text using a canvas in-memory.
* @param {string} fontSize E.g., '10pt'
* @param {string} fontFamily E.g., 'Arial'
+ * @param {string} fontWeight E.g., '600'
* @param {string} text The actual text to measure
* @return {nu... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2012 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 | 7,717 | prefer changing the signature by adding params to the end, not the middle, I think. | LLK-scratch-blocks | js |
@@ -301,6 +301,15 @@ func makeStatefulSetService(p *monitoringv1.Prometheus, config Config) *v1.Servi
},
},
}
+
+ if p.Spec.Thanos != nil {
+ svc.Spec.Ports = append(svc.Spec.Ports, v1.ServicePort{
+ Name: "grpc",
+ Port: 10901,
+ TargetPort: intstr.FromString("grpc"),
+ })
+ }
+
return s... | 1 | // Copyright 2016 The prometheus-operator 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 ... | 1 | 13,114 | I guess we aim for hardcoded port for Prometheus operated ports right? | prometheus-operator-prometheus-operator | go |
@@ -602,8 +602,10 @@ class FormatChecker(BaseTokenChecker):
isinstance(node.parent, nodes.TryFinally) and node in node.parent.finalbody
):
prev_line = node.parent.body[0].tolineno + 1
+ elif isinstance(node.parent, nodes.Module):
+ prev_line = 0
else:
- ... | 1 | # Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2012-2015 Google, Inc.
# Copyright (c) 2013 moxian <aleftmail@inbox.ru>
# Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 frost-nzcr4 <frost.nzcr4@jagmort.com>
# Copyright (c) 2014 Brett Cannon ... | 1 | 17,810 | This is the same effect as doing `node.parent.fromlineno` but avoids the `StatementMissing` exception from calling `statement`. | PyCQA-pylint | py |
@@ -165,12 +165,15 @@ def request_candidate_sets(days, top, similar):
@cli.command(name='request_recommendations')
@click.option("--top", type=int, default=200, help="Generate given number of top artist recommendations")
@click.option("--similar", type=int, default=200, help="Generate given number of similar artist ... | 1 | import sys
import click
import listenbrainz.utils as utils
import os
import pika
import ujson
from flask import current_app
from listenbrainz.webserver import create_app
QUERIES_JSON_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'request_queries.json')
cli = click.Group()
class InvalidSparkRequ... | 1 | 16,637 | I think user-ids might be better; also note that options should use - and not _ to separate words. Also, how are more than one id specified? comma seperated? I think the usage statement should indicate this. | metabrainz-listenbrainz-server | py |
@@ -117,14 +117,7 @@ func nanosecondsToTicks(ns int64) timeUnit {
// sleepTicks should sleep for specific number of microseconds.
func sleepTicks(d timeUnit) {
- for d != 0 {
- ticks() // update timestamp
- ticks := uint32(d) // current scaling only supports 100 usec to 6553 msec
- if !timerSleep(tick... | 1 | // +build stm32,stm32f103
package runtime
import (
"device/arm"
"device/stm32"
"machine"
"runtime/interrupt"
"runtime/volatile"
)
func init() {
initCLK()
initRTC()
initTIM()
machine.UART0.Configure(machine.UARTConfig{})
}
func putchar(c byte) {
machine.UART0.WriteByte(c)
}
// initCLK sets clock to 72MHz ... | 1 | 11,485 | This code is necessary. It makes sure that you can sleep for longer durations than the timer supports. | tinygo-org-tinygo | go |
@@ -96,7 +96,7 @@ public interface ExpireSnapshots extends PendingUpdate<List<Snapshot>> {
* @param executorService an executor service to parallelize tasks to delete manifests and data files
* @return this for method chaining
*/
- ExpireSnapshots executeWith(ExecutorService executorService);
+ ExpireSnap... | 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 | 22,960 | Can we add the new name in parallel and deprecate this name? We should be careful about changes to the public API and give people at least a release to switch over before removing public methods. | apache-iceberg | java |
@@ -32,8 +32,10 @@ bool wlr_backend_start(struct wlr_backend *backend) {
}
void wlr_backend_destroy(struct wlr_backend *backend) {
- if (backend->impl->destroy) {
+ if (backend->impl && backend->impl->destroy) {
backend->impl->destroy(backend);
+ } else {
+ free(backend);
}
}
| 1 | #include <wayland-server.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <libinput.h>
#include <wlr/backend/session.h>
#include <wlr/backend/interface.h>
#include <wlr/backend/drm.h>
#include <wlr/backend/libinput.h>
#include <wlr/backend/wayland.h>
#includ... | 1 | 7,700 | If you're going to start testing that impl itself is not NULL you should probably be doing it everywhere. | swaywm-wlroots | c |
@@ -159,7 +159,7 @@ func ParseFromStructuredObject(s interface{}) (Manifest, error) {
}, nil
}
-func LoadPlainYAMLManifests(ctx context.Context, dir string, names []string) ([]Manifest, error) {
+func LoadPlainYAMLManifests(ctx context.Context, dir string, names []string, configFileName string) ([]Manifest, error)... | 1 | // Copyright 2020 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 8,973 | `ctx` is unused in LoadPlainYAMLManifests | pipe-cd-pipe | go |
@@ -87,7 +87,7 @@ public class BlockHeaderBuilder {
}
public static BlockHeaderBuilder fromBuilder(final BlockHeaderBuilder fromBuilder) {
- BlockHeaderBuilder toBuilder =
+ final BlockHeaderBuilder toBuilder =
create()
.parentHash(fromBuilder.parentHash)
.ommersHash(fro... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 25,130 | why is this called toBuilder when the method is called fromBuilder? (I realise you did not change this...) | hyperledger-besu | java |
@@ -40,4 +40,10 @@ public class FlinkConfigOptions {
.intType()
.defaultValue(100)
.withDescription("Sets max infer parallelism for source operator.");
+
+ public static final ConfigOption<Integer> SOURCE_READER_FETCH_BATCH_SIZE = ConfigOptions
+ .key("source.iceberg.reader.fetch-... | 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,644 | nit: seems rather large. | apache-iceberg | java |
@@ -119,7 +119,7 @@ def get_listens(user_name):
latest_listen = db_conn.fetch_listens(
user_name,
limit=1,
- to_ts=max_ts,
+ to_ts=int(time.time()),
)
latest_listen_ts = latest_listen[0].ts_since_epoch if len(latest_listen) > 0 else 0
| 1 | import ujson
from flask import Blueprint, request, jsonify, current_app
from listenbrainz.webserver.errors import APIBadRequest, APIInternalServerError, APIUnauthorized, APINotFound, APIServiceUnavailable
from listenbrainz.db.exceptions import DatabaseException
from listenbrainz.webserver.decorators import crossdomain
... | 1 | 15,362 | I think it'd make sense to only calculate time.time() once (it's also used if max_ts and min_ts aren't set) | metabrainz-listenbrainz-server | py |
@@ -53,6 +53,8 @@ public abstract class TestCaseView {
public abstract GrpcStreamingType grpcStreamingType();
+ public abstract String grpcStubTypeName();
+
public abstract String mockGrpcStubTypeName();
public abstract String createStubFunctionName(); | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 21,982 | Use existing `grpcStubCallString` instead | googleapis-gapic-generator | java |
@@ -0,0 +1,7 @@
+namespace Datadog.Trace
+{
+ internal static class TraceConstants
+ {
+ public const ulong MaxTraceId = 9_223_372_036_854_775_807; // 2^63-1
+ }
+} | 1 | 1 | 15,933 | In a recent PR, Bob added a `TracerConstants` class. Do you think this makes sense to put in that class instead so that we can consolidate? | DataDog-dd-trace-dotnet | .cs | |
@@ -73,6 +73,10 @@ type Service struct {
auth BlockAuthenticator
parallelBlocks uint64
deadlineTimeout time.Duration
+ // catchpointWriting defines whether we've ran into a state where the ledger is currently busy writing the
+ // catchpoint file. If so, we want to pospone all the catchup process unti... | 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,588 | I want to propose couple of different names for catchpointWriting: syncInterruptedWaitingCatchpointWriting syncWaitingForCatchpointWriting catchpointWriting is lacking context, and I found it difficult to understand the logic without this context. | algorand-go-algorand | go |
@@ -92,7 +92,7 @@ class InventoryImporter(object):
Args:
session (object): Database session.
- model (str): Model name to create.
+ model (Model): Model name to create.
dao (object): Data Access Object from dao.py
service_config (ServiceConfig): Se... | 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,446 | Do you still need the `name` in the arg description, if this is not `str` type anymore.? | forseti-security-forseti-security | py |
@@ -42,15 +42,5 @@ def allreduce_grads(params, coalesce=True, bucket_size_mb=-1):
class DistOptimizerHook(OptimizerHook):
-
- def __init__(self, grad_clip=None, coalesce=True, bucket_size_mb=-1):
- self.grad_clip = grad_clip
- self.coalesce = coalesce
- self.bucket_size_mb = bucket_size_mb
... | 1 | from collections import OrderedDict
import torch.distributed as dist
from mmcv.runner import OptimizerHook
from torch._utils import (_flatten_dense_tensors, _take_tensors,
_unflatten_dense_tensors)
def _allreduce_coalesced(tensors, world_size, bucket_size_mb=-1):
if bucket_size_mb > 0:
... | 1 | 19,887 | We may raise a warning. | open-mmlab-mmdetection | py |
@@ -2,8 +2,10 @@ import AbstractModel from 'hospitalrun/models/abstract';
import DS from 'ember-data';
export default AbstractModel.extend({
- patient: DS.belongsTo('patient'),
+ // Attributes
name: DS.attr('string'),
icd9CMCode: DS.attr('string'),
- icd10Code: DS.attr('string')
+ icd10Code: DS.attr('stri... | 1 | import AbstractModel from 'hospitalrun/models/abstract';
import DS from 'ember-data';
export default AbstractModel.extend({
patient: DS.belongsTo('patient'),
name: DS.attr('string'),
icd9CMCode: DS.attr('string'),
icd10Code: DS.attr('string')
});
| 1 | 13,292 | Trailing comma caused the eslint test to fail | HospitalRun-hospitalrun-frontend | js |
@@ -0,0 +1,6 @@
+from werkzeug.utils import import_string
+
+from .config import CFG_RELATIONSHIPS_NODE_ENGINE, CFG_RELATIONSHIPS_EDGE_ENGINE
+
+Node = import_string(CFG_RELATIONSHIPS_NODE_ENGINE)
+Edge = import_string(CFG_RELATIONSHIPS_EDGE_ENGINE) | 1 | 1 | 15,073 | I think you should use `app.config`. In the usual case, the config file is not overwritten, there is additional config file outside of the source of `Invenio`. | inveniosoftware-invenio | py | |
@@ -86,6 +86,16 @@ public final class JwtIssuerAuthenticationManagerResolver implements Authenticat
new TrustedIssuerJwtAuthenticationManagerResolver(
Collections.unmodifiableCollection(trustedIssuers)::contains));
}
+
+ /**
+ * Construct a {@link JwtIssuerAuthenticationManagerResolver} using the pro... | 1 | /*
* Copyright 2002-2020 the original author or 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 a... | 1 | 17,748 | Will you please update the copyright message to now include `2021`? | spring-projects-spring-security | java |
@@ -38,8 +38,8 @@ void test_rw(const Offsets &offsets, const Data &data)
for (std::size_t index = 0; index < offsets.size() - 1; ++index)
{
- typename IndexedData::ResultType expected_result(&data[offsets[index]],
- &data[offsets[index + 1]]);
+... | 1 | #include "util/indexed_data.hpp"
#include "common/temporary_file.hpp"
#include "util/exception.hpp"
#include <boost/test/unit_test.hpp>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <typeinfo>
#include <vector>
BOOST_AUTO_TEST_SUITE(indexed_data)
using namespace osrm;
using namespace osrm::util... | 1 | 24,186 | Potential subscript out of range. | Project-OSRM-osrm-backend | cpp |
@@ -185,7 +185,6 @@ func (ps *peerSelector) PeerDownloadDurationToRank(peer network.Peer, blockDownl
default: // i.e. peerRankInitialFourthPriority
return downloadDurationToRank(blockDownloadDuration, lowBlockDownloadThreshold, highBlockDownloadThreshold, peerRank3LowBlockTime, peerRank3HighBlockTime)
-
}
}... | 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,330 | please undo this change. you didn't really meant to make it, right ? | algorand-go-algorand | go |
@@ -0,0 +1,13 @@
+import initStoryshots from '@storybook/addon-storyshots';
+import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer';
+import path from 'path';
+
+initStoryshots( {
+ suite: 'Puppeteer storyshots',
+ test: puppeteerTest( {
+ // eslint-disable-next-line sitekit/acronym-case
+ storybookUrl... | 1 | 1 | 40,479 | To check! are these millseconds or seconds :thinking: The docs aren't clear | google-site-kit-wp | js | |
@@ -508,6 +508,7 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker) (*UploadOutput, error) {
// Read and queue the rest of the parts
for u.geterr() == nil {
+ num++
// This upload exceeded maximum number of supported parts, error now.
if num > int64(u.ctx.MaxUploadParts) || num > int64(MaxUploadPart... | 1 | package s3manager
import (
"bytes"
"fmt"
"io"
"sort"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3if... | 1 | 7,789 | Why was this moved? | aws-aws-sdk-go | go |
@@ -15,6 +15,10 @@ limitations under the License.
*/
package v1alpha1
+type CStorPoolExpansion interface{}
+
+type CStorVolumeReplicaExpansion interface{}
+
type StoragePoolExpansion interface{}
type StoragePoolClaimExpansion interface{} | 1 | /*
Copyright 2017 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, soft... | 1 | 7,520 | What are these object with suffix Expansion? | openebs-maya | go |
@@ -831,6 +831,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
arity = "1")
private final Wei txFeeCap = DEFAULT_RPC_TX_FEE_CAP;
+ @Option(
+ names = {"--rpc-allow-unprotected-txs"},
+ description =
+ "Allow for unprotected (non EIP155 signed) transactions to b... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 24,732 | This breaks backwards compatibility, so it will have to wait for the next quarterly release of the default is to deny. I would recommend adding the flag with the default to allow and then at the next quarterly release rc cycle flip the flag to deny. | hyperledger-besu | java |
@@ -57,12 +57,12 @@
// league_size) is not limited by physical constraints. Its a pure logical
// number.
-typedef Kokkos::TeamPolicy<> team_policy;
-typedef team_policy::member_type team_member;
+using team_policy = Kokkos::TeamPolicy<>;
+using team_member = team_policy::member_type;
// Define a functor which c... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 24,405 | I'm kind of surprised this doesn't require `typename`? | kokkos-kokkos | cpp |
@@ -38,8 +38,7 @@ GLIB_TESTS
AC_CHECK_HEADER([sys/xattr.h],,[AC_MSG_ERROR([You must have sys/xattr.h from glibc])])
-AC_CHECK_PROGS(YACC, 'bison -y', :)
-AS_IF([test "$YACC" = :], [AC_MSG_ERROR([bison not found but required])])
+AS_IF([test "$YACC" != "bison -y"], [AC_MSG_ERROR([bison not found but required])])
... | 1 | AC_PREREQ([2.63])
AC_INIT([ostree], [2016.5], [walters@verbum.org])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([buildutil])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.13 -Wno-portability foreign no-define tar-ustar no-dist-gzip dist-xz
color-tests subdir-objects])
AM_MAINTAINER_MODE([en... | 1 | 7,729 | I think this will break the case (you can try even with /usr/bin/bison as value): `YACC="/path/to/bison -y" ./configure` I wonder if we should use AC_PROG_YACC at all or simply use AC_CHECK_PROGS since we want to use bison and not another yacc | ostreedev-ostree | c |
@@ -66,8 +66,14 @@ namespace Nethermind.KeyStore.Config
[ConfigItem(Description = "Plain private key to be used in test scenarios")]
string TestNodeKey { get; set; }
- [ConfigItem(Description = "Account to be used by the block author / coinbase")]
+ [ConfigItem(Description = "Account t... | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 24,762 | can we explain to users in the docs what happens if they leave the field blank? | NethermindEth-nethermind | .cs |
@@ -442,10 +442,10 @@ class EC2Connection(AWSQueryConnection):
[('item', Reservation)], verb='POST')
def run_instances(self, image_id, min_count=1, max_count=1,
- key_name=None, security_groups=None,
- user_data=None, addressing_type=None,
-... | 1 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, 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
# w... | 1 | 7,880 | We try not to change the function footprints unless absolutely necessary. Why is it necessary to have both secuirty_group_ids and security_groups? | boto-boto | py |
@@ -105,7 +105,7 @@ public class JavaSourceFolderProvider implements SourceFolderProvider {
if (Strings.isNullOrEmpty(relativePath)) {
return parentPackagePrefix;
}
- relativePath = relativePath.replaceAll(File.separator, ".");
+ relativePath = relativePath.replace(File.separator, ".");
retu... | 1 | /*
* Copyright 2016 The Bazel 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 a... | 1 | 5,364 | Thanks! We're already replacing File.separatorChar with '/' in the call to FileUtil#toCanonicalPath above, so the correct fix here should be: `relativePath.replace('/', '.')` I'll make the change upstream. | bazelbuild-intellij | java |
@@ -2,8 +2,8 @@
namespace Shopsys\FrameworkBundle\Model\Product\Exception;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Symfony\Component\HttpKernel\Exception\GoneHttpException;
-class ProductNotFoundException extends NotFoundHttpException implements ProductException
+class ProductNotF... | 1 | <?php
namespace Shopsys\FrameworkBundle\Model\Product\Exception;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class ProductNotFoundException extends NotFoundHttpException implements ProductException
{
}
| 1 | 22,325 | It could be nice to be explicit about this change in upgrade notes, what do you think? | shopsys-shopsys | php |
@@ -27,7 +27,7 @@ function logout (req, res, next) {
}
delete companion.providerTokens[providerName]
- tokenService.removeFromCookies(res, companion.options, companion.provider.authProviderName)
+ tokenService.removeFromCookies(res, companion.options, companion.provider.authProvider)
cl... | 1 | const tokenService = require('../helpers/jwt')
const { errorToResponse } = require('../provider/error')
/**
*
* @param {object} req
* @param {object} res
*/
function logout (req, res, next) {
const cleanSession = () => {
if (req.session.grant) {
req.session.grant.state = null
req.session.grant.dy... | 1 | 13,670 | spotted a bug. | transloadit-uppy | js |
@@ -148,7 +148,7 @@ public class SmartStoreFullTextSearchSpeedTest extends SmartStoreTestCase {
private double queryData(Type textFieldType, int rowsPerAnimal, int matchingRowsPerAnimal) throws JSONException {
long totalQueryTime = 0;
for (String animal : ANIMALS) {
- String prefix = S... | 1 | /*
* Copyright (c) 2015, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice, this... | 1 | 14,767 | We were always using 0000000 prefix | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -306,7 +306,9 @@ void signalHandler(int sig) {
}
{
auto gJobMgr = nebula::meta::JobManager::getInstance();
- gJobMgr->shutDown();
+ if (gJobMgr) {
+ gJobMgr->shutDown();
+ }
}
if (gKVS... | 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 "common/base/SignalHandler.h"
#include <thrift/lib/cpp2/server/ThriftServer.h>
#include ... | 1 | 29,987 | Here we also need to determine if gJobMgr has called the init function. | vesoft-inc-nebula | cpp |
@@ -0,0 +1,18 @@
+module Mongoid
+ module Matcher
+
+ # @api private
+ module All
+ module_function def matches?(exists, value, condition)
+ condition.any? && condition.all? do |c|
+ case c
+ when ::Regexp, BSON::Regexp::Raw
+ Regex.matches_array_or_scalar?(value, c)
+ ... | 1 | 1 | 12,499 | Out of curiosity, why is `condition.any?` also necessary here? | mongodb-mongoid | rb | |
@@ -12,14 +12,16 @@ namespace meta {
std::unordered_map<GraphSpaceID, std::shared_ptr<HostManager>> HostManager::hostManagers_;
-
// static
std::shared_ptr<const HostManager> HostManager::get(GraphSpaceID space) {
auto it = hostManagers_.find(space);
if (it != hostManagers_.end()) {
return it-... | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "base/Base.h"
#include "meta/HostManager.h"
namespace nebula {
namespace meta {
std::unordered_map<GraphSpaceID, ... | 1 | 14,917 | Always use `std::make_shared` whenever possible, it will save you one memory allocation. | vesoft-inc-nebula | cpp |
@@ -30,7 +30,7 @@ var DBATag = "v0.2.0"
var RouterImage = "drud/nginx-proxy" // Note that this is overridden by make
// RouterTag defines the tag used for the router.
-var RouterTag = "v0.3.0" // Note that this is overridden by make
+var RouterTag = "router-expose" // Note that this is overridden by make
// COMM... | 1 | package version
// VERSION is supplied with the git committish this is built from
var VERSION = ""
// IMPORTANT: These versions are overridden by version ldflags specifications VERSION_VARIABLES in the Makefile
// DdevVersion is the current version of ddev, by default the git committish (should be current git tag)
v... | 1 | 11,156 | Update to real tag before pull. | drud-ddev | go |
@@ -73,7 +73,7 @@ public class ITZipkinHealth {
// ensure we don't track health in prometheus
assertThat(scrape())
- .doesNotContain("health");
+ .doesNotContain("health_check");
}
String scrape() throws InterruptedException { | 1 | /*
* Copyright 2015-2019 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 1 | 16,959 | Is there any better string that only exposed by prometheus? We have changed the meter tags to contain method and service name. For example `scrape()` contains `method=getHealth` and `service=server.internal.health.ITzipkinHealth` which made this test failed. | openzipkin-zipkin | java |
@@ -33,7 +33,7 @@ namespace Datadog.Trace.Vendors.Serilog.Core
/// be disposed to flush any events buffered within it. Most application
/// code should depend on <see cref="ILogger"/>, not this class.
/// </summary>
- internal sealed class Logger : ILogger, ILogEventSink, IDisposable
+ internal sea... | 1 | //------------------------------------------------------------------------------
// <auto-generated />
// This file was automatically generated by the UpdateVendors tool.
//------------------------------------------------------------------------------
// Copyright 2013-2016 Serilog Contributors
//
// Licensed under the... | 1 | 16,493 | Adding ICoreLogger here lets us pull this into Core as a strategy | DataDog-dd-trace-dotnet | .cs |
@@ -38,7 +38,7 @@ type UsageStats struct {
// ContainerMetadata contains meta-data information for a container.
type ContainerMetadata struct {
- DockerID string `json:"-"`
+ DockerID string
}
// StatsContainer abstracts methods to gather and aggregate utilization data for a container. | 1 | // Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... | 1 | 18,417 | why did you change this? | aws-amazon-ecs-agent | go |
@@ -138,9 +138,15 @@ module RSpec::Core
# @param colorizer [#wrap] An object to colorize the message_lines by
# @return [Array(String)] The example failure message colorized
def colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes)
- message_lines.map do |line|
- ... | 1 | RSpec::Support.require_rspec_core "formatters/helpers"
module RSpec::Core
# Notifications are value objects passed to formatters to provide them
# with information about a particular event of interest.
module Notifications
# The `StartNotification` represents a notification sent by the reporter
# when t... | 1 | 13,161 | This is invalid syntax on 1.8. | rspec-rspec-core | rb |
@@ -408,10 +408,10 @@ M END
rxn = rdChemReactions.ReactionFromSmarts('[C:1]1[O:2][N:3]1>>[C:1][O:2].[N:3]')
r1 = rxn.GetReactantTemplate(0)
sma = Chem.MolToSmarts(r1)
- self.assertEqual(sma, '[C:1]1-,:[O:2]-,:[N:3]-,:1')
+ self.assertEqual(sma, '[C:1]1[O:2][N:3]1')
p1 = rxn.GetProductTemplate... | 1 | # $Id$
#
# Copyright (c) 2007-2014, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the a... | 1 | 18,325 | This isn't part of the PR, but I can't find in the smarts definition that "[C][C]" == "[C]-,:[C]" There is a line saying essentially not to specify undefined items (but that's a bracket versus non bracket thing). | rdkit-rdkit | cpp |
@@ -77,14 +77,14 @@ var (
// UnsignedMessage is an exchange of information between two actors modeled
// as a function call.
-// Messages are the equivalent of transactions in Ethereum.
type UnsignedMessage struct {
+ _ struct{} `cbor:",toarray"`
To address.Address `json:"to"`
From address.Address ... | 1 | package types
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"math/big"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-amt-ipld/v2"
"github.com/filecoin-project/specs-actors/actors/abi"
specsbig "github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/ipfs/... | 1 | 22,851 | Is this required for tuple encoding? This is confusing. | filecoin-project-venus | go |
@@ -112,6 +112,7 @@ public class FlowRunnerManager implements EventListener,
private final ExecutorLoader executorLoader;
private final ProjectLoader projectLoader;
private final JobTypeManager jobtypeManager;
+ private final FlowPreparer flowPreparer;
private final Props azkabanProps;
private final F... | 1 | /*
* Copyright 2012 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 | 12,464 | Does it need to be a member variable? It is currently only used in one method. | azkaban-azkaban | java |
@@ -37,7 +37,7 @@ function showNewJoinGroupSelection (button, user, apiClient) {
console.debug('No item is currently playing.');
}
- apiClient.sendSyncPlayCommand(sessionId, 'ListGroups').then(function (response) {
+ apiClient.sendSyncPlayCommand('ListGroups').then(function (response) {
r... | 1 | import events from 'events';
import connectionManager from 'connectionManager';
import playbackManager from 'playbackManager';
import syncPlayManager from 'syncPlayManager';
import loading from 'loading';
import toast from 'toast';
import actionsheet from 'actionsheet';
import globalize from 'globalize';
import playbac... | 1 | 16,307 | @MrTimscampi doesn't this need an update to apiclient?.. | jellyfin-jellyfin-web | js |
@@ -472,7 +472,7 @@ static const byte xop_a_extra[256] = {
*/
int
decode_sizeof(dcontext_t *dcontext, byte *start_pc,
- int *num_prefixes _IF_X64(uint *rip_rel_pos))
+ int *num_prefixes _IF_X86_64(uint *rip_rel_pos))
{
byte *pc = start_pc;
uint opc = (uint)*pc; | 1 | /* **********************************************************
* Copyright (c) 2011-2014 Google, Inc. All rights reserved.
* Copyright (c) 2001-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 14,978 | This is a nop: prob best for history to not change the line | DynamoRIO-dynamorio | c |
@@ -21,7 +21,8 @@ type TrivialTestSlasher struct {
SendCalls uint64
}
-// Slash is a required function for storageFaultSlasher interfaces and is intended to do nothing.
+// Slash is a required function for storageFaultSlasher interfaces and does nothing but track
+// how many times it's called.
func (ts *TrivialT... | 1 | package storage
import (
"context"
"github.com/filecoin-project/go-filecoin/types"
)
// FakeProver provides fake PoSt proofs for a miner.
type FakeProver struct{}
// CalculatePoSt returns a fixed fake proof.
func (p *FakeProver) CalculatePoSt(ctx context.Context, start, end *types.BlockHeight, inputs []PoStInputs... | 1 | 20,812 | Can you delete this whole file now? | filecoin-project-venus | go |
@@ -24,6 +24,7 @@ type ReturnedContract struct {
Erc721Token blockchain.Erc721Token
ArrDelete blockchain.ArrayDelete
ArrString blockchain.ArrayString
+ ArrPassing blockchain.ArrayPassing
}
// StartContracts deploys and starts fp token smart contract and stable token smart contract,erc721 token smart cont... | 1 | package assetcontract
import (
"math/rand"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
"github.com/iotexproject/iotex-core/config"
"github.com/iotexproject/iotex-core/tools/executiontester/blockchain"
)
const (
// ChainIP is the ip address of iotex api endpoint
chainIP = "localhost"
)
// ReturnedCo... | 1 | 17,062 | can you combine this passing test, code, solidity binary into existing ArrDelete? the function is much similar, pushing int value into an array, and delete one item in the array | iotexproject-iotex-core | go |
@@ -340,10 +340,10 @@ public class QueueFragment extends Fragment {
SortOrder sortOrder = UserPreferences.getQueueKeepSortedOrder();
DBWriter.reorderQueue(sortOrder, true);
if (recyclerAdapter != null) {
- recyclerAdap... | 1 | package de.danoeh.antennapod.fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view... | 1 | 16,639 | I think that could lead to problems when setting it to not sorted again. In that case, it will not be reset. What about using one single method for the adapter (`setDragDropEnabled`)? | AntennaPod-AntennaPod | java |
@@ -47,8 +47,8 @@ func handleSequelProCommand(appLocation string) (string, error) {
return "", err
}
- if app.SiteStatus() != "running" {
- return "", errors.New("app not running locally. Try `ddev start`")
+ if app.SiteStatus() != platform.SiteRunning {
+ return "", errors.New("App not running locally. Try `d... | 1 | package cmd
import (
"fmt"
"log"
"os"
"os/exec"
"path/filepath"
"strconv"
"runtime"
"github.com/drud/ddev/pkg/appports"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/plugins/platform"
"github.com/drud/ddev/pkg/util"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
// SequelproLoc is... | 1 | 11,413 | I'd say the error should be an error, not instructions to the user. So error would be something like "site should be running and is not" | drud-ddev | go |
@@ -60,11 +60,12 @@ const (
// 9) Add 'ipToTask' map to state file
// 10) Add 'healthCheckType' field in 'apicontainer.Container'
// 11)
- // a) Add 'PrivateDNSName' field to 'api.ENI'
- // b)Remove `AppliedStatus` field form 'apicontainer.Container'
+ // a) Add 'PrivateDNSName' field to 'api.ENI'
+ // b)Re... | 1 | // Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... | 1 | 20,396 | Are you sure `v3EndpointIDToContainerName` and `v3EndpointIDToTask` are saved in the state file, can you verify that? | aws-amazon-ecs-agent | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.