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 |
|---|---|---|---|---|---|---|---|
@@ -10,11 +10,11 @@ import (
"context"
"crypto/sha256"
"encoding/hex"
+ "github.com/facebookgo/clock"
"math/big"
"strings"
"testing"
- "github.com/facebookgo/clock"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/blake2b" | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 12,244 | File is not `goimports`-ed | iotexproject-iotex-core | go |
@@ -227,9 +227,6 @@ func invokeErrorToYARPCError(err error, responseMD metadata.MD) error {
// CallStream implements transport.StreamOutbound#CallStream.
func (o *Outbound) CallStream(ctx context.Context, request *transport.StreamRequest) (*transport.ClientStream, error) {
- if _, ok := ctx.Deadline(); !ok {
- ret... | 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 | 16,391 | do we want to still validate that the context had a nonzero TTL? i suppose it's fine to let clients determine whether or not their streams will timeout (though we still don't have the means to cancel them from the server other than EOF), and they can still cancel their own contexts - so maybe not a huge deal, but thoug... | yarpc-yarpc-go | go |
@@ -72,4 +72,9 @@ public class JavaNameFormatter implements NameFormatter {
public String classFileNameBase(Name name) {
return name.toOriginal();
}
+
+ @Override
+ public String humanName(Name name) {
+ throw new UnsupportedOperationException();
+ }
} | 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 | 17,330 | Go ahead and provide the same implementation for all of the languages - I'm not sure there's a reason for it to be different. | googleapis-gapic-generator | java |
@@ -253,6 +253,15 @@ class TestApp(tornado.testing.AsyncHTTPTestCase):
assert self.put_json("/settings", {"anticache": True}).code == 200
assert self.put_json("/settings", {"wtf": True}).code == 400
+ def test_options(self):
+ j = json(self.fetch("/options"))
+ assert type(j) == lis... | 1 | import json as _json
from unittest import mock
import os
import tornado.testing
from tornado import httpclient
from tornado import websocket
from mitmproxy import exceptions
from mitmproxy import proxy
from mitmproxy import options
from mitmproxy.test import tflow
from mitmproxy.tools.web import app
from mitmproxy.to... | 1 | 13,335 | We should also test type confusion here (e.g. `{"anticache": "foo"}`) | mitmproxy-mitmproxy | py |
@@ -236,6 +236,10 @@ MESSAGE
end
sh.cmd 'unformatted=`dartfmt -n .`'
+ # If `dartfmt` fails for some reason
+ sh.if '$? -ne 0' do
+ sh.failure ""
+ end
sh.if '! -z "$unformatted"' do
sh.echo "Files are unformatted:", a... | 1 | module Travis
module Build
class Script
class Dart < Script
DEFAULTS = {
dart: 'stable',
with_content_shell: false,
install_dartium: false,
xvfb: true
}
attr_reader :task
def initialize(*args)
super
@task = config... | 1 | 15,244 | I'd love to trim the content of `unformatted` too. Any ideas? | travis-ci-travis-build | rb |
@@ -17,6 +17,7 @@
"""
Utilities to deal with types. This is mostly focused on python3.
"""
+
import typing
from inspect import getfullargspec
from functools import wraps | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 8,612 | can you remove this unrelated change? | databricks-koalas | py |
@@ -145,6 +145,17 @@ class MainWindow(QWidget):
_private: Whether the window is in private browsing mode.
"""
+ # Application wide stylesheets
+ STYLESHEET = """
+ QLabel#hint {
+ background-color: {{ conf.colors.hints.bg }};
+ color: {{ conf.colors.hints.fg }};
+ ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-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,207 | Would using `HintLabel` here instead (without `setObjectName`) work? | qutebrowser-qutebrowser | py |
@@ -51,7 +51,7 @@ type solver interface {
// It is useful for mocking out a given provider since an alternate set of
// constructors may be set.
type dnsProviderConstructors struct {
- cloudDNS func(project string, serviceAccount []byte, dns01Nameservers []string) (*clouddns.DNSProvider, error)
+ cloudDNS func(p... | 1 | /*
Copyright 2018 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 | 12,842 | From what I can tell, the `serviceAccountFile` is never set to anything except ""? It'd be best to remove this altogether, so we don't mislead future developers | jetstack-cert-manager | go |
@@ -18,11 +18,6 @@
</li>
</ul>
</nav>
- <nav>
- <ul>
- <li class="account"><%= link_to 'Sign in', sign_in_path %></li>
- </ul>
- </nav>
</div>
</section>
| 1 | <!DOCTYPE html>
<html lang="en">
<head prefix="og: http://ogp.me/ns#">
<%= render 'application/head_contents' %>
</head>
<body class="<%= body_class %> <%= yield(:additional_body_classes) %>">
<section id="header-wrapper">
<div class="header-container">
<h1 class="small-logo">
<%=... | 1 | 12,270 | Why do we remove the Sign in link? | thoughtbot-upcase | rb |
@@ -186,11 +186,6 @@ public class FeedItemMenuHandler {
GpodnetPreferences.enqueueEpisodeAction(actionNew);
}
break;
- case R.id.move_to_top_item:
- DBWriter.moveQueueItemToTop(selectedItem.getId(), true);
- return true;
- ... | 1 | package de.danoeh.antennapod.menuhandler;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import ... | 1 | 12,676 | holy crap, were we really missing a 'break' statement here? | AntennaPod-AntennaPod | java |
@@ -28,6 +28,10 @@ type logMaker interface {
MakeLogger(module string) logger.Logger
}
+type debugForcedLogMaker interface {
+ MakeLoggerForceEnableDebug(module string) logger.Logger
+}
+
type blockCacher interface {
BlockCache() BlockCache
} | 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 (
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"githu... | 1 | 18,514 | This doesn't seem to be used anywhere, probably doesn't need to be a new interface. | keybase-kbfs | go |
@@ -363,7 +363,9 @@ func (f *FS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.Sta
usageBytes, limitBytes, err := f.quotaUsage.Get(ctx, quotaUsageStaleTolerance)
if err != nil {
f.log.CDebugf(ctx, "Getting quota usage error: %v", err)
- return err
+ // Ignore the error here so Statfs() can su... | 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 libfuse
import (
"net"
"net/http"
"net/http/pprof"
"os"
"runtime"
"strconv"
"strings"
"sync"
"time"
"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.co... | 1 | 16,502 | This is a good start, but what do you think about just using `libkbfs.GetCurrentSessionIfPossible()` to avoid calling this altogether if there's no session? That way we can avoid continuous RTTs to the server when logged out. | keybase-kbfs | go |
@@ -0,0 +1,18 @@
+<div class="dropdown edit_menu">
+ <%= link_to link_text, edit_path,
+ :id => 'editanchor',
+ :class => "geolink tab #{link_class}" %>
+ <a class='dropdown-toggle' data-toggle='dropdown' href='#'>
+ <b class="caret"></b>
+ </a>
+ <ul class='dropdown-menu' role='menu' a... | 1 | 1 | 8,695 | This `aria-labelledby` stuff is all new to me, but my reading of the spec is that the value should be a list of element id values, and `dLabel` doesn't seem to be the id of any element? | openstreetmap-openstreetmap-website | rb | |
@@ -6,16 +6,16 @@ module Bolt
class Step
class Upload < Step
def self.allowed_keys
- super + Set['source', 'destination']
+ super + Set['source', 'destination', 'upload']
end
def self.required_keys
- Set['destination', 'source', 'target... | 1 | # frozen_string_literal: true
module Bolt
class PAL
class YamlPlan
class Step
class Upload < Step
def self.allowed_keys
super + Set['source', 'destination']
end
def self.required_keys
Set['destination', 'source', 'targets']
end
... | 1 | 15,357 | Does this fail validation if you now use the `upload` key instead of `source`? | puppetlabs-bolt | rb |
@@ -733,7 +733,7 @@ CmpStoredProc::ExecStatus CmpStoredProc::close(CmpSPDataObject&)
// Methods of CmpISPFuncs
// -----------------------------------------------------------------------
-NAList<CmpISPFuncs::ProcFuncsStruct> CmpISPFuncs::procFuncsArray_(256);
+NAList<CmpISPFuncs::ProcFuncsStruct> CmpISPFuncs::procFu... | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 14,290 | Can we use GetCliGlobals(false)->exCollHeap() here instead | apache-trafodion | cpp |
@@ -17,7 +17,10 @@ namespace storage {
TEST(AddEdgesTest, SimpleTest) {
fs::TempDir rootPath("/tmp/AddEdgesTest.XXXXXX");
- std::unique_ptr<kvstore::KVStore> kv = TestUtils::initKV(rootPath.path());
+ constexpr int32_t partitions = 6;
+ std::unique_ptr<kvstore::KVStore> kv = TestUtils::initKV(rootPath.... | 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 "utils/NebulaKeyUtils.h"
#include <gtest/gtest.h>
#include <rocksdb/db.h>
#include "fs/T... | 1 | 28,916 | I suggest you move the waitUntilAllElected into init::KV() method. | vesoft-inc-nebula | cpp |
@@ -28,6 +28,11 @@ namespace OpenTelemetry
public class BatchExportProcessor<T> : BaseExportProcessor<T>
where T : class
{
+ public const int DefaultMaxQueueLength = 2048;
+ public const int DefaultScheduledDelayMilliseconds = 5000;
+ public const int DefaultTimeoutMilliseconds =... | 1 | // <copyright file="BatchExportProcessor.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.a... | 1 | 18,097 | no need of pub;lic. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -237,6 +237,10 @@ type ConsensusParams struct {
// max decimal precision for assets
MaxAssetDecimals uint32
+
+ // whether to use the old buggy Credential.lowestOutput function
+ // TODO(upgrade): Please remove as soon as the upgrade goes through
+ UseBuggyProposalLowestOutput bool
}
// Consensus tracks th... | 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 | 37,307 | Do you think we can name this variable in a less ...negative.. language ? maybe `ProposalTieBreakerEqualizer` | algorand-go-algorand | go |
@@ -48,7 +48,7 @@ class PartitionKey implements StructLike {
private final Accessor<InternalRow>[] accessors;
@SuppressWarnings("unchecked")
- PartitionKey(PartitionSpec spec) {
+ PartitionKey(PartitionSpec spec, Schema inputSchema) {
this.spec = spec;
List<PartitionField> fields = spec.fields(); | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 17,570 | Can you add back these newlines? We try to avoid non-functional changes like this because they can cause commit conflicts. | apache-iceberg | java |
@@ -755,7 +755,8 @@ const reducer = (state = defaultState, action) => {
case 'SEARCH_ADD':
{
newState = Object.assign({}, state);
- const searches = newState.searches.slice();
+ let searches = newState.searches.slice();
+ searches = searches.filter(s => s.title !== action.search.title);
se... | 1 | const Note = require('lib/models/Note.js');
const Folder = require('lib/models/Folder.js');
const ArrayUtils = require('lib/ArrayUtils.js');
const { ALL_NOTES_FILTER_ID } = require('lib/reserved-ids');
const defaultState = {
notes: [],
notesSource: '',
notesParentType: null,
folders: [],
tags: [],
masterKeys: []... | 1 | 13,762 | Why not just `if (!searches.includes(action.search)) searches.push(action.search)`? That way you don't need to remove then add the element. | laurent22-joplin | js |
@@ -276,6 +276,17 @@ class Demo extends AbstractBase
return $a . $b . "." . $c;
}
+ /**
+ * Generate a fake call number prefix.
+ *
+ * @return string
+ */
+ protected function getFakeCallNumPrefix()
+ {
+ $codes = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ return substr(str_... | 1 | <?php
/**
* Advanced Dummy ILS Driver -- Returns sample values based on Solr index.
*
* Note that some sample values (holds, transactions, fines) are stored in
* the session. You can log out and log back in to get a different set of
* values.
*
* PHP version 7
*
* Copyright (C) Villanova University 2007.
* C... | 1 | 31,676 | @demiankatz I'm not sure that this is very useful. I just did it to get started. If we had a small handful of predetermined prefixes that were randomly chosen, it would be easier to distinguish them from the rest of the call number. Would that be preferable? | vufind-org-vufind | php |
@@ -313,16 +313,6 @@ func createUpstreamRequest(rw http.ResponseWriter, r *http.Request) (*http.Reque
// Original incoming server request may be canceled by the
// user or by std lib(e.g. too many idle connections).
ctx, cancel := context.WithCancel(r.Context())
- if cn, ok := rw.(http.CloseNotifier); ok {
- not... | 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,255 | Why is this deleted too? | caddyserver-caddy | go |
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
namespace Datadog.Trace.Agent
{
- internal class ApiWebResponse : IApiResponse
+ internal class ApiWebResponse : IApiResponse, IDisposable
{
- private HttpWebResponse _response;
+ private readonly HttpWebResponse _response;
public Api... | 1 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Datadog.Trace.Agent
{
internal class ApiWebResponse : IApiResponse
{
private HttpWebResponse _response;
public ApiWebResponse(HttpWeb... | 1 | 17,494 | Given that IApiResponse is already made disposable, this is not necessary. | DataDog-dd-trace-dotnet | .cs |
@@ -97,7 +97,10 @@ class ItemPricesOverlay extends Overlay
switch (action)
{
case ITEM_USE_ON_WIDGET:
- if (!menuEntry.getTarget().contains("High Level Alchemy") || !plugin.isShowAlchProfit()) return null;
+ if (!menuEntry.getTarget().contains("High Level Alchemy") || !plugin.isShowAlchProfit())
+ {
... | 1 | /*
* Copyright (c) 2018, Charlie Waters
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of cond... | 1 | 15,213 | client.getSelectedSpellName() can be used for this | open-osrs-runelite | java |
@@ -14,6 +14,12 @@
"""Common formatting methods."""
+# Filename patterns.
+VIOLATION_JSON_FMT = 'violations.{}.{}.{}.json'
+SCANNER_OUTPUT_CSV_FMT = 'scanner_output_base.{}.csv'
+FINDINGS_FILENAME = 'forseti_findings_{}.json'
+
+# Timestamps.
# Example: '2018-03-01T21:31:52'
TIMESTAMP_UTC_OFFSET = '%Y-%m-%dT%H:%... | 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,257 | Please alpha sort these filenames. | forseti-security-forseti-security | py |
@@ -147,17 +147,6 @@ func (p *Protocol) validateTransfer(_ context.Context, act action.Action) error
if tsf.TotalSize() > TransferSizeLimit {
return errors.Wrap(action.ErrActPool, "oversized data")
}
- // Reject transfer of negative amount
- if tsf.Amount().Sign() < 0 {
- return errors.Wrap(action.ErrBalance, "... | 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,466 | is this already called by actPool.validate()? | iotexproject-iotex-core | go |
@@ -707,6 +707,16 @@ void updateStereoBonds(RWMOL_SPTR product, const ROMol &reactant,
if (pStart->getTotalDegree() < 3 || pEnd->getTotalDegree() < 3) {
pBond->setStereo(Bond::BondStereo::STEREONONE);
+ } else {
+ // Ring bonds shouldn't be marked as STEREOANY
+
+ if (!product->getR... | 1 | //
// Copyright (c) 2014-2017, Novartis Institutes for BioMedical Research Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the ... | 1 | 20,801 | It is relatively cheap to tell whether a bond is a ring bond, we don't have to perform an SSSR. | rdkit-rdkit | cpp |
@@ -18,7 +18,7 @@ const (
nameFlag = "name"
svcFlag = "svc"
envFlag = "env"
- appTypeFlag = "app-type"
+ svcTypeFlag = "svc-type"
profileFlag = "profile"
yesFlag = "yes"
jsonFlag = "json" | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"fmt"
"strconv"
"strings"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/manifest"
)
// Long flag names.
const (
// Common flags.
appFlag = "app"
nameFlag = "name"
svcFlag ... | 1 | 13,111 | Maybe we should add flag aliases for service as well. | aws-copilot-cli | go |
@@ -31,10 +31,7 @@ type Block struct {
Ticket Ticket `json:"ticket"`
// ElectionProof is the vrf proof giving this block's miner authoring rights
- ElectionProof crypto.VRFPi
-
- // EPoStInfo wraps all data for verifying this block's Election PoSt
- EPoStInfo EPoStInfo `json:"ePoStInfo"`
+ ElectionProof crypto.El... | 1 | package block
import (
"encoding/json"
"fmt"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
fbig "github.com/filecoin-project/specs-actors/actors/abi/big"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
... | 1 | 23,585 | This LGTM but don't we need a winning PoSts field to fully implement the protocol? No need to add here as I'm working on this in another PR, but curious how we can interop with lotus blocks without post proofs. | filecoin-project-venus | go |
@@ -12,3 +12,10 @@ import "github.com/iotexproject/iotex-core/blockchain/block"
type BlockCreationSubscriber interface {
ReceiveBlock(*block.Block) error
}
+
+// pubSub includes Subscriber, buffered channel for storing the pending blocks and cancel channel to end the handler thread
+type pubSub struct {
+ Blocklist... | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 20,645 | can you move the [] into pubSub? so Blockchain just contains a pubSub, not [] | iotexproject-iotex-core | go |
@@ -224,6 +224,11 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {
queryResultWindowSize = Math.max(1, getInt("query/queryResultWindowSize", 1));
queryResultMaxDocsCached = getInt("query/queryResultMaxDocsCached", Integer.MAX_VALUE);
enableLazyFieldLoading = getBool("query/en... | 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 | 35,287 | I don't think 100 is a safe default here, since later we check that the value is between 50-95. | apache-lucene-solr | java |
@@ -49,5 +49,9 @@ namespace NLog.Layouts
/// Layout renderer method can handle concurrent threads
/// </summary>
ThreadSafe = 1,
+ /// <summary>
+ /// Layout renderer method is agnostic to current thread context
+ /// </summary>
+ ThreadAgnostic = 2 | ThreadSafe,
... | 1 | //
// Copyright (c) 2004-2019 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of ... | 1 | 20,726 | I would be nice if we could describe this without the word "agnostic" | NLog-NLog | .cs |
@@ -406,6 +406,16 @@ class KNNClassifier(object):
print " active inputs:", _labeledInput(inputPattern,
cellsPerCol=self.cellsPerCol)
+ if isSparse > 0:
+ isSorted = all(inputPattern[i] <= inputPattern[i+1]
+ for i in xrange(len(inputPa... | 1 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013-15, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditio... | 1 | 20,844 | Pick more specific exception types for these cases. Not sure what would be best for this one (`ValueError`?) but the next one could be `IndexError`. | numenta-nupic | py |
@@ -0,0 +1,6 @@
+const jestConfig = require( './jest.config' );
+
+module.exports = {
+ ...jestConfig,
+ testMatch: [ '<rootDir>/.storybook/?(*.)test.js' ],
+}; | 1 | 1 | 40,481 | This seemed like the easiest solution We need to include this path in `testMatch` to run the test AFAIK *BUT* we don't want this test ran when running them all normally I'm sure there are other ways to do this! | google-site-kit-wp | js | |
@@ -114,7 +114,7 @@ namespace OpenTelemetry.Exporter.Jaeger.Implementation.Tests
var ex = Assert.Throws<TTransportException>(() => transport.Flush());
- Assert.Equal("Cannot flush closed transport. message, yo", ex.Message);
+ Assert.Equal("Cannot flush closed transport", ex.Messa... | 1 | // <copyright file="ThriftUdpClientTransportTests.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
//
// htt... | 1 | 21,675 | Most of the following test changes can be avoided if need be. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -181,14 +181,8 @@ int Partitioner::Run(const PartitionConfig &config)
TIMER_STOP(packed_mlp);
util::Log() << "MultiLevelPartition constructed in " << TIMER_SEC(packed_mlp) << " seconds";
- TIMER_START(cell_storage);
- CellStorage storage(mlp, *edge_based_graph);
- TIMER_STOP(cell_storage);
- ... | 1 | #include "partition/partitioner.hpp"
#include "partition/bisection_graph.hpp"
#include "partition/bisection_to_partition.hpp"
#include "partition/compressed_node_based_graph_reader.hpp"
#include "partition/edge_based_graph_reader.hpp"
#include "partition/io.hpp"
#include "partition/multi_level_partition.hpp"
#include "... | 1 | 20,595 | Eventually we might want to move this back as generating this data structure takes some time (for large datasets) and we don't want it in the hot-path of `osrm-customize` runs. Thinking long-term making `osrm-customize` eventually digest `.osrm.cells` will will enable only updating cells selectively and using an earlie... | Project-OSRM-osrm-backend | cpp |
@@ -110,8 +110,15 @@ func (cmd *CommandRun) Wait() error {
return cmd.vpnServer.Wait()
}
-func (cmd *CommandRun) Kill() {
+func (cmd *CommandRun) Kill() (err error) {
cmd.vpnServer.Stop()
- cmd.dialogWaiter.Stop()
- cmd.natService.Stop()
+ err = cmd.dialogWaiter.Stop()
+ if err != nil {
+ return err
+ }
+ err =... | 1 | package command_run
import (
log "github.com/cihub/seelog"
"github.com/mysterium/node/communication"
"github.com/mysterium/node/identity"
"github.com/mysterium/node/ipify"
"github.com/mysterium/node/location"
"github.com/mysterium/node/nat"
"github.com/mysterium/node/openvpn"
"github.com/mysterium/node/openvpn... | 1 | 10,168 | You're not really using named result variable - you can just leave `error`. | mysteriumnetwork-node | go |
@@ -37,16 +37,14 @@ public class SortOrderUtil {
}
public static SortOrder buildSortOrder(Table table) {
- return buildSortOrder(table.spec(), table.sortOrder());
+ return buildSortOrder(table.schema(), table.spec(), table.sortOrder());
}
- public static SortOrder buildSortOrder(PartitionSpec spec, ... | 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 | 33,632 | It wasn't possible to call this method with `PartitionSpec.unpartitioned()` as the schema in the spec was empty. | apache-iceberg | java |
@@ -26,11 +26,13 @@ use Thelia\Exception\ModuleException;
use Thelia\Log\Tlog;
use Thelia\Model\Cart;
use Thelia\Model\Country;
+use Thelia\Model\Hook;
use Thelia\Model\HookQuery;
use Thelia\Model\Lang;
use Thelia\Model\Map\ModuleImageTableMap;
use Thelia\Model\Map\ModuleTableMap;
use Thelia\Model\Module;
+use ... | 1 | <?php
/*************************************************************************************/
/* This file is part of the Thelia package. */
/* */
/* Copyright (c) OpenStudio ... | 1 | 10,476 | this namespace is never used | thelia-thelia | php |
@@ -26,6 +26,13 @@
// see URLOpener.
// See https://godoc.org/gocloud.dev#hdr-URLs for background information.
//
+// Message Delivery Semantics
+//
+// AWS SNS and SQS combine to support at-least-once semantics; applications must
+// call Message.Ack/Nack after processing a message, or it will be redelivered.
+// S... | 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,507 | Well, if you call `Nack`, it _will_ be redelivered. So maybe reword. | google-go-cloud | go |
@@ -7,7 +7,9 @@
<div class="text-box-wrapper">
<div class="text-box">
- <p class="videowrapper"><%= wistia_video_embed('39245f55fd') %></p>
+ <p class="videowrapper">
+ <iframe allowtransparency="true" class="wistia_embed" frameborder="0" height="367" name="wistia_embed" scrolling="no" src="https://fas... | 1 | <% content_for :page_title, "An OSS Lifestyle" %>
<% content_for :subject, "An OSS Lifestyle" %>
<div class="summary">
<p>In this <b>free 34 minute video</b> Mike Burns, Linux user and thoughtbot developer, and Chad Pytel, Founder and CEO of thoughtbot, discuss the current state of using Linux as your operating syst... | 1 | 9,586 | Why did we make this a static string? | thoughtbot-upcase | rb |
@@ -148,7 +148,7 @@ def bigquery_dataset(item):
parent = item.parent()
name = '//bigquery.googleapis.com/projects/{}/datasets/{}'.format(
parent['projectNumber'], item['datasetReference']['datasetId'])
- asset_type = 'google.bigquery.Dataset'
+ asset_type = 'google.cloud.bigquery.Dataset'
... | 1 | # Copyright 2018 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 | 32,917 | Please re-run PYTHONPATH=. python tests/services/inventory/update_cai_dumps.py following the instructions at the top of this file to ensure the test files have the correct CAI asset type. | forseti-security-forseti-security | py |
@@ -66,9 +66,9 @@ func TestCreateContract(t *testing.T) {
addr := identityset.Address(28)
_, err = accountutil.LoadOrCreateAccount(sm, addr.String())
require.NoError(err)
- stateDB := NewStateDBAdapter(sm, 0, !cfg.Genesis.IsAleutian(0),
- cfg.Genesis.IsGreenland(0), cfg.Genesis.IsKamchatka(0),
- cfg.Genesis.IsL... | 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,958 | `stateDB := NewStateDBAdapter(sm, 0, hash.ZeroHash256, NotFixTopicCopyBugOption())` | iotexproject-iotex-core | go |
@@ -446,8 +446,17 @@ class HintManager(QObject):
# Short hints are the number of hints we can possibly show which are
# (needed - 1) digits in length.
if needed > min_chars:
- short_count = math.floor((len(chars) ** needed - len(elems)) /
- len(c... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 19,787 | There are unneeded parens here, but I'll fix it up when merging. | qutebrowser-qutebrowser | py |
@@ -62,6 +62,12 @@ static void setup_globals(mrb_state *mrb)
h2o_mruby_eval_expr(mrb, "$LOAD_PATH << \"#{$H2O_ROOT}/share/h2o/mruby\"");
h2o_mruby_assert(mrb);
+
+ /* require and include built-in libraries */
+ h2o_mruby_eval_expr(mrb, "require \"h2o.rb\"\n"
+ "require \"ac... | 1 | /*
* Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Ryosuke Matsumoto,
* Masayoshi Takahashi
*
* 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 restr... | 1 | 11,302 | Just one more thing... How about doing all of the following? 1. renaming h2o.rb to bootstrap.rb 2. require and include the acl code _from_ bootstrap.rb | h2o-h2o | c |
@@ -82,14 +82,6 @@ double get_timestamp (void)
return ((double) tm.tv_sec + (tm.tv_nsec/1.0e9));
}
-static void timeout_cb (flux_t *h, cron_task_t *t, void *arg)
-{
- cron_entry_t *e = arg;
- flux_log (h, LOG_INFO, "cron-%ju: task timeout at %.2fs. Killing",
- e->id, e->timeout);
- cron_ta... | 1 | /************************************************************\
* Copyright 2016 Lawrence Livermore National Security, LLC
* (c.f. AUTHORS, NOTICE.LLNS, COPYING)
*
* This file is part of the Flux resource manager framework.
* For details, see https://github.com/flux-framework.
*
* SPDX-License-Identifier: LGPL-3.... | 1 | 31,452 | Commit message: "remove" is misspelled. | flux-framework-flux-core | c |
@@ -60,6 +60,11 @@ public abstract class BytesValues {
return value.slice(toTrim);
}
+ public static BytesValue trimTrailingZeros(final BytesValue value) {
+ final int toTrim = trailingZeros(value);
+ return value.slice(0, value.size() - toTrim + 1);
+ }
+
/**
* Returns the smallest bytes value... | 1 | /*
* Copyright 2018 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 wr... | 1 | 19,505 | This is a pretty idiosyncratic method - I'd move it into the JSON-RPC package rather than adding it to `BytesValue`. | hyperledger-besu | java |
@@ -424,11 +424,15 @@ module RSpec
superclass.method(:next_runnable_index_for),
description, *args, &example_group_block
)
+
+ config = RSpec.configuration
+ config.apply_derived_metadata_to(@metadata)
+
ExampleGroups.assign_const(self)
@currently_executi... | 1 | RSpec::Support.require_rspec_support 'recursive_const_methods'
module RSpec
module Core
# rubocop:disable Metrics/ClassLength
# ExampleGroup and {Example} are the main structural elements of
# rspec-core. Consider this example:
#
# RSpec.describe Thing do
# it "does something" do
... | 1 | 17,389 | Is there a way to deduplicate this somehow? Could we roll it into `RSpec.configuration` with a bit of memoization or is there a chicken and egg problem. | rspec-rspec-core | rb |
@@ -49,6 +49,7 @@ public class ResultSetPropertyTester extends PropertyTester
public static final String PROP_CAN_NAVIGATE_HISTORY = "canNavigateHistory";
public static final String PROP_EDITABLE = "editable";
public static final String PROP_CHANGED = "changed";
+ private static final String PROP_UPDA... | 1 | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* 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/LICE... | 1 | 11,672 | Generally, I wouldn't say I like the idea of providing properties that return negative/inverted values. It would be more convenient to return whether the update is **in** progress or not. | dbeaver-dbeaver | java |
@@ -256,7 +256,7 @@ import 'flexStyles';
const runtimeTicks = playbackManager.duration(options.player);
if (runtimeTicks) {
- const timeRemainingTicks = runtimeTicks - playbackManager.currentTime(options.player);
+ const timeRemainingTicks = runtimeTicks - playb... | 1 | import dom from 'dom';
import playbackManager from 'playbackManager';
import connectionManager from 'connectionManager';
import events from 'events';
import mediaInfo from 'mediaInfo';
import layoutManager from 'layoutManager';
import focusManager from 'focusManager';
import globalize from 'globalize';
import itemHelpe... | 1 | 17,371 | Converting playbackManager to operate in ms (preferred solution, imo) would allow us to completely drop this function. | jellyfin-jellyfin-web | js |
@@ -8,6 +8,7 @@
DEFINE_int32(max_handlers_per_req, 10, "The max handlers used to handle one request");
DEFINE_int32(min_vertices_per_bucket, 3, "The min vertices number in one bucket");
+DEFINE_int32(max_edge_returned_per_vertex, 1000, "The max edge number returnred searching vertex");
namespace nebula {
namesp... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "storage/QueryBaseProcessor.h"
DEFINE_int32(max_handlers_per_req, 10, "The max handlers used to handle one req... | 1 | 24,129 | The default value should be a bigger one, I'd like it is the maximum of int32. That means we will not cut-off anything by default. And users would config it with an appropriate value in config-file, such as 1000 or 5000, etc. | vesoft-inc-nebula | cpp |
@@ -221,7 +221,10 @@ func (c *cliApp) settle(args []string) {
clio.Info(fmt.Sprintf("Hermes fee: %v MYST", hermesFee.String()))
return
}
- hermesID := c.config.GetStringByFlag(config.FlagHermesID)
+ hermesID, err := c.config.GetHermesID()
+ if err != nil {
+ clio.Warn("could not get hermes id: ", err)
+ }
cl... | 1 | /*
* Copyright (C) 2020 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 | 16,911 | Probably missing return here as well | mysteriumnetwork-node | go |
@@ -109,6 +109,12 @@ type ConfigSettings struct {
//
// EXPERIMENTAL: Subject to change.
LoadRaw json.RawMessage `json:"load,omitempty" caddy:"namespace=caddy.config_loaders inline_key=module"`
+
+ // The interval to pull config. With a non-zero value, will pull config
+ // from config loader (eg. a http loader) ... | 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 | 16,669 | On second thought... this affects how often the function specified by the `load` property is run. So I wonder if, for consistency, we should call this `LoadInterval` instead. Does that make sense? | caddyserver-caddy | go |
@@ -2,7 +2,8 @@ var exported = {},
common = require('../../../api/utils/common.js'),
crypto = require('crypto'),
countlyCommon = require('../../../api/lib/countly.common.js'),
- plugins = require('../../pluginManager.js');
+ plugins = require('../../pluginManager.js'),
+ localize = require('../.... | 1 | var exported = {},
common = require('../../../api/utils/common.js'),
crypto = require('crypto'),
countlyCommon = require('../../../api/lib/countly.common.js'),
plugins = require('../../pluginManager.js');
(function() {
/**
* register internalEvent
*/
plugins.internalEvents.push('[CL... | 1 | 13,243 | Now you don't need the localization module here then :) | Countly-countly-server | js |
@@ -264,11 +264,16 @@ public class InclusiveMetricsEvaluator {
@Override
public <T> Boolean in(BoundReference<T> ref, Set<T> literalSet) {
- return ROWS_MIGHT_MATCH;
+ // in(col, {X, Y}) => eq(col, x) OR eq(col, x)
+ if (literalSet.stream().anyMatch(v -> eq(ref, toLiteral(v)))) {
+ ret... | 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 | 16,440 | This should not convert each value to a literal on every invocation. Instead, this PR can add a `literals` method to `BoundSetPredicate` to access the values as literals. That way, the conversion happens once and can be lazy. | apache-iceberg | java |
@@ -22,7 +22,7 @@ def _load_lib():
"""Load LightGBM Library."""
lib_path = find_lib_path()
if len(lib_path) == 0:
- raise Exception("cannot find LightGBM library")
+ return None
lib = ctypes.cdll.LoadLibrary(lib_path[0])
lib.LGBM_GetLastError.restype = ctypes.c_char_p
return ... | 1 | # coding: utf-8
# pylint: disable = invalid-name, C0111, C0301
# pylint: disable = R0912, R0913, R0914, W0105, W0201, W0212
"""Wrapper c_api of LightGBM"""
from __future__ import absolute_import
import ctypes
import os
import warnings
from tempfile import NamedTemporaryFile
import numpy as np
import scipy.sparse
fro... | 1 | 16,659 | I think we still need this exception if doesn't have LIGHTGBM_BUILD_DOC | microsoft-LightGBM | cpp |
@@ -71,15 +71,9 @@ func (h *Helper) waitForCertificateCondition(client clientset.CertificateInterfa
if pollErr != nil && certificate != nil {
log.Logf("Failed waiting for certificate %v: %v\n", name, pollErr.Error())
- if len(certificate.Status.Conditions) > 0 {
- log.Logf("Observed certificate conditions:\n"... | 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 | 28,866 | Does this make it easier to read? Previously this would have run `kubectl describe certificate` right? In which case it would have included events related to the cert. Will we miss that? Would the old `kubectl describe` output have gone to stderr? | jetstack-cert-manager | go |
@@ -24,11 +24,14 @@ import com.google.gson.annotations.SerializedName;
public class Internals {
public static final String SERIALIZED_APPLICATION_SERVER = "application-server";
+ public static final String SERIALIZED_CAMUNDA_INTEGRATION = "camunda-integration";
protected Database database;
@SerializedNam... | 1 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 1 | 10,866 | Just an understanding question: do we need a map here, would a list/set of Strings be sufficient? we are not adding entries with `false` here, are we? Being in the list already means it's used, right? | camunda-camunda-bpm-platform | java |
@@ -567,7 +567,8 @@ class CentralPlannerScheduler(Scheduler):
for task in self._state.get_active_tasks():
self._state.fail_dead_worker_task(task, self._config, assistant_ids)
- if task.id not in necessary_tasks and self._state.prune(task, self._config):
+ removed = self._st... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 1 | 14,010 | Ah, so the change is that you want the `prune()` side effect before doing the `task.id not in necessary_tasks` membership check? Stupid non-Haskell programming languages :p | spotify-luigi | py |
@@ -2,6 +2,13 @@ package cmd
import (
"fmt"
+ "os"
+ osexec "os/exec"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+
"github.com/drud/ddev/pkg/ddevapp"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/fileutil" | 1 | package cmd
import (
"fmt"
"github.com/drud/ddev/pkg/ddevapp"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/nodeps"
"github.com/drud/ddev/pkg/testcommon"
"github.com/drud/ddev/pkg/util"
asrt "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/requi... | 1 | 14,675 | This change was not really intended but made by the linter of VS Code. And looking at other packages this looks like a best practise to place interal packages on the top and gh imports afterwards. | drud-ddev | go |
@@ -494,6 +494,8 @@ function findAndModify(coll, query, sort, doc, options, callback) {
queryObject.bypassDocumentValidation = finalOptions.bypassDocumentValidation;
}
+ finalOptions.readPreference = ReadPreference.primary;
+
// Have we specified collation
decorateWithCollation(queryObject, coll, final... | 1 | 'use strict';
const applyWriteConcern = require('../utils').applyWriteConcern;
const checkCollectionName = require('../utils').checkCollectionName;
const Code = require('mongodb-core').BSON.Code;
const createIndexDb = require('./db_ops').createIndex;
const decorateCommand = require('../utils').decorateCommand;
const d... | 1 | 14,586 | Do we normally force ReadPreference primary on other write operations? Or is it just that we normally ignore it? | mongodb-node-mongodb-native | js |
@@ -292,6 +292,12 @@ public class Spark3Util {
return Expressions.hours(sourceName);
}
+ @Override
+ public Transform alwaysNull(int fieldId, String sourceName, int sourceId) {
+ // do nothing for alwaysNull, it doesn't need to be converted to a transform
+ ... | 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 | 36,025 | Instead of returning null here and discarding nulls automatically, I think this should return null (or some other signaling value) and fix the part that consumes the output of the visitor. | apache-iceberg | java |
@@ -95,8 +95,13 @@ public class ForkingValidatorProvider implements ValidatorProvider {
final long prevBlockNumber = blockNumber - 1L;
final Optional<BlockHeader> prevBlockHeader = blockchain.getBlockHeader(prevBlockNumber);
if (prevBlockHeader.isPresent()) {
- return resolveValidato... | 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 | 26,606 | Really, we want to be setting the validatorsForPreviousBlock against the yet to be created block, so it might make sense to update the cache once the block is created/imported instead. | hyperledger-besu | java |
@@ -60,11 +60,11 @@ int set_properties_from_args(fpga_properties filter, fpga_result *result,
{"segment", required_argument, NULL, 0xe},
{0, 0, 0, 0},
};
- int supported_options = sizeof(longopts) / sizeof(longopts[0]) - 1;
int getopt_ret = -1;
int option_index = 0;
char *endptr = NULL;
int found_opts[]... | 1 | // Copyright(c) 2018, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 17,319 | It seems to me that the original implementation was correct. Can you share what the scanner was pointing out? | OPAE-opae-sdk | c |
@@ -178,6 +178,8 @@ function* webpackConfig( env, argv ) {
'./assets/js/googlesitekit-modules-search-console.js',
'googlesitekit-modules-subscribe-with-google':
'./assets/js/googlesitekit-modules-subscribe-with-google.js',
+ 'googlesitekit-subscribe-with-google-bulk-edit':
+ './assets/js/modules/subs... | 1 | /**
* Webpack config.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unle... | 1 | 41,299 | Instead of doing that, please create an `assets/js/googlesitekit-subscribe-with-google-bulk-edit.js` file as entry point - all our entry points should be located in `assets/js`. | google-site-kit-wp | js |
@@ -39,7 +39,11 @@ storiesOf( 'WordPress', module )
<div id="dashboard-widgets">
<div className="metabox-holder">
<div id="google_dashboard_widget" className="postbox">
- <h2 className="hndle ui-sortable-handle"><span><SvgIcon id="logo-g" height="19" width="19" /><SvgIcon id="logo-sitekit" height="1... | 1 | import { storiesOf } from '@storybook/react';
import SvgIcon from 'GoogleUtil/svg-icon';
import WPDashboardMain from 'GoogleComponents/wp-dashboard/wp-dashboard-main';
import { googlesitekit as wpDashboardData } from '../.storybook/data/wp-admin-index.php--googlesitekit';
import WPSearchConsoleDashboardWidget from 'Goo... | 1 | 24,677 | This is not valid, a `div` shouldn't be in a `span`. You could apply the `className` attribute to the `span` tag. | google-site-kit-wp | js |
@@ -100,6 +100,8 @@ func AddFlags(flagSet *pflag.FlagSet) {
flags.IntVarP(flagSet, &fs.Config.MultiThreadStreams, "multi-thread-streams", "", fs.Config.MultiThreadStreams, "Max number of streams to use for multi-thread downloads.")
flags.DurationVarP(flagSet, &fs.Config.RcJobExpireDuration, "rc-job-expire-duration"... | 1 | // Package configflags defines the flags used by rclone. It is
// decoupled into a separate package so it can be replaced.
package configflags
// Options set by command line flags
import (
"log"
"net"
"path/filepath"
"strings"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/config"
"github.com/ncw/rclone... | 1 | 8,773 | Would it be possible to reuse RcJobExpireDuration and RcJobExpireInterval and auto delete them when job is deleted? | rclone-rclone | go |
@@ -18,7 +18,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
+from __future__ import print_function
+
import copy
+import sys
+
+from jinja2 import Environment
+from jinja2 import PackageLoader
def merge_dicts(a, b, raise_conflicts=False, path=None): | 1 | # Copyright (c) 2015 Cisco Systems
#
# 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, publish, ... | 1 | 5,676 | Python wants **future** imports to come first. | ansible-community-molecule | py |
@@ -2267,4 +2267,5 @@ detach_on_permanent_stack(bool internal, bool do_cleanup, dr_stats_t *drstats)
SELF_PROTECT_DATASEC(DATASEC_RARELY_PROT);
dynamo_detaching_flag = LOCK_FREE_STATE;
EXITING_DR();
+ options_detach();
} | 1 | /* **********************************************************
* Copyright (c) 2012-2018 Google, Inc. All rights reserved.
* Copyright (c) 2008-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 14,051 | Better to call this before EXITING_DR which is supposed to be last. | DynamoRIO-dynamorio | c |
@@ -295,8 +295,6 @@ public class MainActivity extends BaseActivity implements CustomTabActivityHelpe
switch ((int) drawerItem.getIdentifier()) {
case ITEM_HOME:
fragment = new HomeFragment();
- // recreate when Home is... | 1 | package openfoodfacts.github.scrachx.openfood.views;
import android.Manifest;
import android.app.LoaderManager;
import android.app.SearchManager;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.conte... | 1 | 64,442 | Does this work at runtime? | openfoodfacts-openfoodfacts-androidapp | java |
@@ -24,8 +24,9 @@ import (
const (
userAgentHeader = "User-Agent"
- credsTimeout = 10 * time.Second
- clientTimeout = 30 * time.Second
+ maxRetriesOnRecoverableFailures = 8 // Default provided by SDK is 3 which means requests are retried up to only 2 seconds.
+ credsTimeout = 10 * time.Second
+... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package sessions provides functions that return AWS sessions to use in the AWS SDK.
package sessions
import (
"context"
"fmt"
"net/http"
"runtime"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws/creden... | 1 | 16,510 | Hmm why do we need to make this change? Like which one requires this change? | aws-copilot-cli | go |
@@ -4,12 +4,6 @@
// Use define from require.js not webpack's define
var _define = window.define;
-// document-register-element
-var docRegister = require("document-register-element");
-_define("document-register-element", function() {
- return docRegister;
-});
-
// fetch
var fetch = require("whatwg-fetch");
... | 1 | /**
* require.js module definitions bundled by webpack
*/
// Use define from require.js not webpack's define
var _define = window.define;
// document-register-element
var docRegister = require("document-register-element");
_define("document-register-element", function() {
return docRegister;
});
// fetch
var fe... | 1 | 12,355 | why remove this and other piece? | jellyfin-jellyfin-web | js |
@@ -41,7 +41,7 @@ describe('dom.hasContentVirtual', function() {
it('is false if the element has an aria label but `ignoreAria=true`', function() {
fixture.innerHTML = '<div id="target" aria-label="my-label"> </div>';
tree = axe.utils.getFlattenedTree(fixture);
- assert.isTrue(
+ assert.isFalse(
hasConten... | 1 | /* global xit */
describe('dom.hasContentVirtual', function() {
'use strict';
var hasContentVirtual = axe.commons.dom.hasContentVirtual;
var fixture = document.getElementById('fixture');
var shadowSupport = axe.testUtils.shadowSupport.v1;
var tree;
it('returns false if there is no content', function() {
fixtur... | 1 | 14,918 | Yikes... That was probably me. | dequelabs-axe-core | js |
@@ -622,7 +622,7 @@ class Application extends BaseApplication {
// the following menu items will be available for all OS under Tools
const toolsItemsAll = [{
- label: _('Resources'),
+ label: _('Note attachments...'),
click: () => {
this.dispatch({
type: 'NAV_GO', | 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,506 | It would be better to move the ... outside of the l8n block. This way it won't need to be translated for each language twice. | laurent22-joplin | js |
@@ -35,6 +35,11 @@
#include "monster.h"
#include "scheduler.h"
#include "databasetasks.h"
+#include "actions.h"
+#include "movement.h"
+#include "weapons.h"
+#include "globalevent.h"
+#include "events.h"
extern Chat* g_chat;
extern Game g_game; | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2017 Mark Samman <mark.samman@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; eithe... | 1 | 13,278 | That's a huge load of new dependencies. I think it's better to create a reload function on ScriptManager and control with enum instead. | otland-forgottenserver | cpp |
@@ -42,6 +42,7 @@ func NewJob() *cobra.Command {
NewUpgradeJivaVolumeJob(),
NewUpgradeCStorSPCJob(),
NewUpgradeCStorVolumeJob(),
+ NewUpgradeTaskJob(),
)
cmd.PersistentFlags().StringVarP(&options.fromVersion, | 1 | /*
Copyright 2019 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 17,226 | `NewUpgradeTaskJob` -> `NewUpgradeResource` | openebs-maya | go |
@@ -0,0 +1,16 @@
+#include "system.h"
+
+#include <glibtop.h>
+#include <glibtop/mem.h>
+
+#include <glib.h>
+#include <unistd.h>
+
+int luaA_sys_get_meminfo(lua_State *L)
+{
+ glibtop_mem mem;
+ glibtop_init();
+ glibtop_get_mem(&mem);
+ lua_pushinteger(L, mem.cached);
+ return 1;
+} | 1 | 1 | 8,824 | Is that the memory usage of the system or the process / awesome? | awesomeWM-awesome | c | |
@@ -209,8 +209,8 @@ class Realm {
/**
* Add a listener `callback` for the specified event `name`.
* @param {string} name - The name of event that should cause the callback to be called.
- * _Currently, only the "change" event supported_.
- * @param {callback(Realm, string)} callback - Functio... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/li... | 1 | 17,033 | "change" *and* "schema" events (A bunch of these; not marking them all). | realm-realm-js | js |
@@ -73,4 +73,13 @@ public interface RewriteFiles extends SnapshotUpdate<RewriteFiles> {
* @return this for method chaining
*/
RewriteFiles validateFromSnapshot(long snapshotId);
+
+ /**
+ * Use the specified sequence number for the new manifest of the data files added in this update,
+ * instead of inhe... | 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 | 45,767 | I think there is probably a shorter, more descriptive name for this. Something like `commitAtSequenceNumber`? | apache-iceberg | java |
@@ -23,6 +23,7 @@ class Organization < ActiveRecord::Base
scope :case_insensitive_url_name, ->(mixed_case) { where(['lower(url_name) = ?', mixed_case.downcase]) }
validates :name, presence: true, length: 3..85, uniqueness: { case_sensitive: false }
+ validates :url_name, presence: true, length: 1..60, allow_ni... | 1 | class Organization < ActiveRecord::Base
include OrganizationSearchables
include Tsearch
ORG_TYPES = { 'Commercial' => 1, 'Education' => 2, 'Government' => 3, 'Non-Profit' => 4 }
fix_string_column_encodings!
belongs_to :logo
has_one :permission, as: :target
has_many :projects, -> { where.not(deleted: tr... | 1 | 7,658 | The `url_name` should definitely be more than just 1 character long at the shortest. How about 3 or 4 characters? | blackducksoftware-ohloh-ui | rb |
@@ -22,9 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-
/**
* Page Indexer to index TYPO3 pages used by the... | 1 | <?php
/***************************************************************
* Copyright notice
*
* (c) 2009-2015 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU G... | 1 | 5,512 | Please revert this change | TYPO3-Solr-ext-solr | php |
@@ -57,13 +57,10 @@ module OrgAdmin
# preview a phase
# GET /org_admin/phases/[:id]/preview
def preview
- phase = Phase.includes(:template).find(params[:id])
- authorize phase
- render("/org_admin/phases/preview",
- locals: {
- template: phase.template,
- phase: ph... | 1 | # frozen_string_literal: true
module OrgAdmin
class PhasesController < ApplicationController
include Versionable
after_action :verify_authorized
# GET /org_admin/templates/:template_id/phases/[:id]
def show
phase = Phase.includes(:template, :sections).order(:number).find(params[:id])
... | 1 | 18,027 | Nice. I hadn't even heard of presenters in Rails before (learn something new every day) :) | DMPRoadmap-roadmap | rb |
@@ -22,10 +22,19 @@ class Pool
*/
protected $providers = array();
+ /**
+ * @var array
+ */
protected $contexts = array();
+ /**
+ * @var DownloadStrategyInterface[]
+ */
protected $downloadSecurities = array();
+ /**
+ * @var string
+ */
protected $defau... | 1 | <?php
/*
* This file is part of the Sonata project.
*
* (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;
use Sonata\CoreBundle\Validator\... | 1 | 7,139 | `string[]` ? not sure, can you verify this @core23 ? Thank you | sonata-project-SonataMediaBundle | php |
@@ -1224,12 +1224,14 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
return null;
}
+ let playPauseClickTimeout;
function onViewHideStopPlayback() {
if (playbackManager.isPlayingVideo()) {
require(['shell'], functi... | 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 | 13,140 | are we aware that this breaks older browsers like WebOS? :) they don't handle `let` | jellyfin-jellyfin-web | js |
@@ -86,7 +86,7 @@ class Cache(CacheBase):
if ttl == 0:
self.delete(key)
else:
- # We can't use touch here because we need to update the TTL value in the record.
+ # We can't use touch here because we need to update the TTL value in the object.
value = se... | 1 | import logging
from functools import wraps
from math import ceil, floor
from time import time
from pyramid.settings import aslist
from kinto.core.cache import CacheBase
from kinto.core.storage import exceptions
from kinto.core.utils import json, memcache
logger = logging.getLogger(__name__)
def wrap_memcached_erro... | 1 | 11,965 | This isn't really a Kinto record but a Memcached record. I could kind of go either way on this. | Kinto-kinto | py |
@@ -582,6 +582,7 @@ public class OAuthWebviewHelper implements KeyChainAliasCallback {
displayName(accountOptions.displayName).email(accountOptions.email).
photoUrl(accountOptions.photoUrl).thumbnailUrl(accountOptions.thumbnailUrl).
additionalOauthValues(ac... | 1 | /*
* Copyright (c) 2011-present, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright noti... | 1 | 16,959 | Kick off the download after login. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -286,7 +286,7 @@ class ErrorBaseline
$xml = preg_replace_callback(
'/<files (psalm-version="[^"]+") (?:php-version="(.+)"(\/?>)\n)/',
/**
- * @param array<int, string> $matches
+ * @param string[] $matches
*/
function (array $match... | 1 | <?php
namespace Psalm;
use function array_filter;
use function array_intersect;
use function array_map;
use function array_merge;
use function array_reduce;
use function get_loaded_extensions;
use function implode;
use function ksort;
use const LIBXML_NOBLANKS;
use function min;
use const PHP_VERSION;
use function php... | 1 | 10,318 | I don't think you need to change this, `array<int, string>` should be accepted whenever `string[]` is expected. (`string[]` is an alias of `array<string>` itself an alias of `array<array-key, string>` which is a parent type of `array<int, string>` | vimeo-psalm | php |
@@ -1257,8 +1257,9 @@ bool wlr_seat_touch_has_grab(struct wlr_seat *seat) {
}
bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial) {
- return serial == seat->pointer_state.grab_serial ||
- serial == seat->touch_state.grab_serial;
+ return true;
+ //return serial == seat->pointer_state.grab_se... | 1 | #define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wayland-server.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
... | 1 | 10,419 | TODO: fix this, probably in another PR | swaywm-wlroots | c |
@@ -591,6 +591,17 @@ class HintManager(QObject):
message.error("No elements found.")
return
+ # Because _start_cb is called asynchronously, it's possible that the
+ # user switched to another tab or closed the tab/window. In that case
+ # we should not start hinting.
+ ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-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,562 | Is there any case that tab is None? | qutebrowser-qutebrowser | py |
@@ -132,8 +132,14 @@ func (e *endpoint) Apply(ctx context.Context, req ctrl.Request, chaos v1alpha1.I
Namespace: pod.Namespace,
})
- t.Append(sourceSet)
- t.Append(targetSet)
+ e := t.Append(sourceSet)
+ if e != nil {
+ return e
+ }
+ e = t.Append(targetSet)
+ if e != nil {
+ return e
+ }
}
s... | 1 | // Copyright 2019 Chaos Mesh Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 21,520 | pls use `err` instead of `e` | chaos-mesh-chaos-mesh | go |
@@ -159,7 +159,9 @@ function attachGamepadScript(e) {
}
// No need to check for gamepads manually at load time, the eventhandler will be fired for that
-window.addEventListener("gamepadconnected", attachGamepadScript);
+if (navigator.getGamepads) { /* eslint-disable-line compat/compat */
+ window.addEventListene... | 1 | /**
* Module for performing keyboard navigation.
* @module components/input/keyboardnavigation
*/
import inputManager from "inputManager";
import layoutManager from "layoutManager";
/**
* Key name mapping.
*/
const KeyNames = {
13: "Enter",
19: "Pause",
27: "Escape",
32: "Space",
37: "ArrowLe... | 1 | 14,337 | `attachGamepadScript` above can also be placed inside. | jellyfin-jellyfin-web | js |
@@ -108,7 +108,7 @@ func decodeBytecode() ([]byte, error) {
return hex.DecodeString(util.TrimHexPrefix(bytecodeFlag.Value().(string)))
}
-func signer() (address string, err error) {
+func Signer() (address string, err error) {
return util.GetAddress(signerFlag.Value().(string))
}
| 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,902 | when we use RegisterWriteCommand,this func should be exported,so we can use this to get signer at the outside action package | iotexproject-iotex-core | go |
@@ -123,7 +123,7 @@ func (management *Management) serveNewConnection(connection net.Conn) {
func (management *Management) deliverLines() {
for {
line := <-management.lineReceiver
- log.Debug(management.logPrefix, "Line delivering: ", line)
+ // log.Debug(management.logPrefix, "Line delivering: ", line)
lin... | 1 | package openvpn
import (
"bufio"
"net"
"net/textproto"
"sync"
"time"
log "github.com/cihub/seelog"
)
// https://openvpn.net/index.php/open-source/documentation/miscellaneous/79-management-interface.html
type Management struct {
socketAddress string
logPrefix string
lineReceiver chan string
middlewares... | 1 | 10,385 | Dead code - we should remove it or use `log.Trace` for lower logging level. Same applies for change at line 138. | mysteriumnetwork-node | go |
@@ -55,6 +55,11 @@ boost::optional<ParameterT> parseParameters(std::string::iterator &iter,
// iterator to the failing position. Extract the position from the exception ourselves.
iter = failure.first;
}
+ catch (const boost::numeric::bad_numeric_cast &e)
+ {
+ // this can happen if ... | 1 | #include "server/api/parameters_parser.hpp"
#include "server/api/match_parameter_grammar.hpp"
#include "server/api/nearest_parameter_grammar.hpp"
#include "server/api/route_parameters_grammar.hpp"
#include "server/api/table_parameter_grammar.hpp"
#include "server/api/tile_parameter_grammar.hpp"
#include "server/api/tr... | 1 | 17,982 | How does this make sure invalid coordinates making the parser fail? Relying on the Coordinate type's boost numeric_cast calls in the ctor? Shouldn't we rely on a coordinate's `.IsValid()` member function instead? | Project-OSRM-osrm-backend | cpp |
@@ -1,8 +1,11 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
+# Purpose
# This code example demonstrates how to upload an item
-# (file) to a folder within a bucket in Amazon S3.
+# (file) to a folder within a bucket in Amazon Simple Storage Solu... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
# This code example demonstrates how to upload an item
# (file) to a folder within a bucket in Amazon S3.
# Prerequisites:
# - An existing Amazon S3 bucket.
# - An existing folder within the bucket.
# -... | 1 | 20,527 | Simple Storage **Service** | awsdocs-aws-doc-sdk-examples | rb |
@@ -54,6 +54,8 @@ if (!is_dir($cacheDir)) {
// Enable caching unless in dev mode or running tests:
$useCache = APPLICATION_ENV != 'development' && !defined('VUFIND_PHPUNIT_RUNNING');
+defined('CACHE_ENABLED') || define('CACHE_ENABLED', $useCache);
+
// Build configuration:
return [
'modules' => array_unique(... | 1 | <?php
// Set up modules:
$modules = [
'Zend\Router', 'ZfcRbac',
'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin', 'VuFindApi'
];
if (PHP_SAPI == 'cli' && !defined('VUFIND_PHPUNIT_RUNNING')) {
$modules[] = 'Zend\Mvc\Console';
$modules[] = 'VuFindConsole';
}
if (APPLICATION_ENV == 'development') {
... | 1 | 26,267 | Does this line (and the corresponding one in the test bootstrap) actually do anything? I don't see where CACHE_ENABLED is used as a global constant. | vufind-org-vufind | php |
@@ -445,13 +445,14 @@ func assertResolved(f func(target *api.Container, dep *api.Container) bool, targ
}
}
-func TestTransitionDependenciesResolved(t *testing.T) {
+func TestVerifyTransitionDependenciesResolved(t *testing.T) {
testcases := []struct {
Name string
TargetKnown api.ContainerSt... | 1 | // +build !integration
// Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
/... | 1 | 19,138 | has this changed? are we testing "all possible situations" now? | aws-amazon-ecs-agent | go |
@@ -236,13 +236,13 @@ public class SolrCLI implements CLIO {
.argName("HOST")
.hasArg()
.required(false)
- .desc("Address of the Zookeeper ensemble; defaults to: "+ZK_HOST)
+ .desc("Address of the Zookeeper ensemble; defaults to: "+ ZK_HOST + '.')
.build(),
... | 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 | 39,930 | ZK is properly spelled 'ZooKeeper' (capital 'K'). | apache-lucene-solr | java |
@@ -73,6 +73,8 @@ public class RubyGapicSurfaceTransformer implements ModelToViewTransformer {
ImmutableList.of("GOOGLE_CLOUD_KEYFILE", "GCLOUD_KEYFILE");
private static final List<String> DEFAULT_JSON_ENV_VARS =
ImmutableList.of("GOOGLE_CLOUD_KEYFILE_JSON", "GCLOUD_KEYFILE_JSON");
+ private static fi... | 1 | /* Copyright 2017 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 23,951 | Guessing this locates the key you get when you run `gcloud auth application-default login`? What was the previous behavior/the behavior for the manual Veneer creds? | googleapis-gapic-generator | java |
@@ -85,7 +85,7 @@
entireColumnSelection = [0, selected[1], this.view.wt.wtTable.getRowStrategy().cellCount - 1, selected[1]],
columnSelected = entireColumnSelection.join(',') == selected.join(',');
- return selected[0] < 0 || this.countRows() >= this.getSettings().maxRows || c... | 1 | (function (Handsontable) {
'use strict';
function prepareVerticalAlignClass(className, alignment) {
if (className.indexOf(alignment) != -1) {
return className;
}
className = className
.replace('htTop', '')
.replace('htMiddle', '')
.replace('htBottom', '')
.replace(' ', '... | 1 | 13,873 | looks good to me, but it would be better if you assigned `this.countRows()` into a variable, so it doesn't trigger twice in the return statement | handsontable-handsontable | js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.