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 |
|---|---|---|---|---|---|---|---|
@@ -185,11 +185,7 @@
<% if policy(@proposal).can_approve_or_reject? %>
<div class="centered">
<p>
- <%= link_to "Approve",
- approval_response_path(approver_action: 'approve',
- # @todo: get rid of cart
- cart_id: @proposal.cart.id, ... | 1 | <div class="inset">
<div class="row">
<div class="col-md-12 col-xs-12">
<h1 class="communicart_header">
<%= @proposal.name %>
</h1>
<div class="communicart_description">
<p>
Purchase Request: <strong><%= @proposal.public_identifier %></strong>
</p>
<p>... | 1 | 12,986 | `version` isn't need anymore because it's built into `approve_proposal_url`, yes? | 18F-C2 | rb |
@@ -11,9 +11,10 @@ import struct
from scapy.compat import orb, chb
from scapy.config import conf
-from scapy.data import MTU, DLT_BLUETOOTH_LE_LL
+from scapy.data import MTU, DLT_BLUETOOTH_LE_LL, DLT_BLUETOOTH_LE_LL_WITH_PHDR
from scapy.packet import *
from scapy.fields import *
+from scapy.layers.dot11 import _d... | 1 | # This file is for use with Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Airbus DS CyberSecurity
# Authors: Jean-Michel Picod, Arnaud Lebrun, Jonathan Christofer Demay
# This program is published under a GPLv2 license
"""Bluetooth 4LE layer"""
import socket
import struct
from... | 1 | 13,743 | Moved to the bottom of the file. `CtrlPDU` sits on `BTLE_DATA` so let's put it after | secdev-scapy | py |
@@ -48,6 +48,7 @@ module Blacklight::SolrHelper
extend ActiveSupport::Concern
include Blacklight::SearchFields
include Blacklight::Facet
+ require 'json'
included do
if self.respond_to?(:helper_method) | 1 | # -*- encoding : utf-8 -*-
# SolrHelper is a controller layer mixin. It is in the controller scope: request params, session etc.
#
# NOTE: Be careful when creating variables here as they may be overriding something that already exists.
# The ActionController docs: http://api.rubyonrails.org/classes/ActionController/Ba... | 1 | 4,841 | This ends up requiring the `json` gem, right? Is there any way we can do this to be implementation agnostic (e.g. to let me use `yajl-ruby` for performance reasons (or because my app already brings in a JSON library) | projectblacklight-blacklight | rb |
@@ -56,8 +56,13 @@ type byteReadCloser struct{ io.ReadCloser }
// ReadByte implements the io.ByteReader interface.
func (b byteReadCloser) ReadByte() (byte, error) {
var buf [1]byte
- _, err := b.Read(buf[:])
- return buf[0], err
+ for {
+ n, err := b.Read(buf[:])
+ if n == 0 && err == nil {
+ continue
+ }
+ ... | 1 | /*
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... | 1 | 8,657 | This seems dangerous. What circumstances lead to the need for a retry? Can that happen more than once? I'm concerned that if we hit the pathological state, this could turn into a CPU spinner. I wonder if we could get the same benefit from just "trying again" and failing if it fails the second time. | kythe-kythe | go |
@@ -20,11 +20,18 @@
package org.apache.iceberg;
import java.util.List;
+import java.util.Optional;
import org.apache.iceberg.exceptions.ValidationException;
import org.apache.iceberg.expressions.Expressions;
+import org.apache.iceberg.util.PartitionSet;
public class BaseReplacePartitions
extends MergingSn... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 40,213 | If there is a reference to other fields or methods, please do the initialization in the constructor. | apache-iceberg | java |
@@ -0,0 +1,13 @@
+// This object is imported into the documentation site. An example for the documentation site should be part of the pull request for the component. The object key is the kabob case of the "URL folder". In the case of `http://localhost:8080/components/app-launcher/`, `app-launcher` is the `key`. The fo... | 1 | 1 | 11,983 | These should be importing from `pill-container` | salesforce-design-system-react | js | |
@@ -2593,12 +2593,12 @@ void Game::playerRequestTrade(uint32_t playerId, const Position& pos, uint8_t st
Player* tradePartner = getPlayerByID(tradePlayerId);
if (!tradePartner || tradePartner == player) {
- player->sendTextMessage(MESSAGE_INFO_DESCR, "Sorry, not possible.");
+ player->sendCancelMessage(RETURNVA... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 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 | 19,068 | Why this change? It will now only show on the bottom of the screen as white text, is it correct behaviour? | otland-forgottenserver | cpp |
@@ -46,7 +46,7 @@ module Blacklight
fields = Array.wrap(view_config.title_field) + [configuration.document_model.unique_key]
f = fields.lazy.map { |field| field_config(field) }.detect { |field_config| field_presenter(field_config).any? }
- field_value(f, except_operations: [Rendering::HelperMethod]... | 1 | # frozen_string_literal: true
module Blacklight
# An abstract class that the view presenters for SolrDocuments descend from
class DocumentPresenter
attr_reader :document, :configuration, :view_context
class_attribute :thumbnail_presenter
self.thumbnail_presenter = ThumbnailPresenter
# @param [Sol... | 1 | 8,782 | Does this need to allocate a string or would a nil value (indicating no header) be a better? | projectblacklight-blacklight | rb |
@@ -13,6 +13,7 @@ import { Fragment } from './create-element';
export function Component(props, context) {
this.props = props;
this.context = context;
+ // this.constructor // When component is functional component, this is reseted to functional component
// if (this.state==null) this.state = {};
// this.state... | 1 | import { assign } from './util';
import { diff, commitRoot } from './diff/index';
import options from './options';
import { Fragment } from './create-element';
/**
* Base Component class. Provides `setState()` and `forceUpdate()`, which
* trigger rendering
* @param {object} props The initial component props
* @par... | 1 | 12,768 | Nit: Past tense of `reset` is also `reset`. | preactjs-preact | js |
@@ -672,6 +672,12 @@ class Commands:
""" return wallet synchronization status """
return self.wallet.is_up_to_date()
+ @command('')
+ def getfee(self):
+ """Return current optimal fee per kilobyte, according to
+ config settings (static/dynamic)"""
+ return self.config.fee... | 1 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious
#
# 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 witho... | 1 | 12,188 | Shouldn't this use `'n'` instead? | spesmilo-electrum | py |
@@ -451,10 +451,10 @@ func (t *timerQueueProcessorBase) getTimerTaskType(
switch taskType {
case enumsspb.TASK_TYPE_USER_TIMER:
return "UserTimer"
- case enumsspb.TASK_TYPE_ACTIVITY_TIMEOUT:
- return "ActivityTimeout"
- case enumsspb.TASK_TYPE_DECISION_TIMEOUT:
- return "DecisionTimeout"
+ case enumsspb.TASK_T... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 9,852 | revert back to 'TASK_TYPE_ACTIVITY_TIMEOUT' | temporalio-temporal | go |
@@ -105,6 +105,9 @@ Engine::Engine(core::Engine *engine) : m_Engine(engine) {}
template void Engine::Get<T>(const std::string &, std::vector<T> &, \
const Mode); \
... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* Engine.h :
*
* Created on: Jun 4, 2018
* Author: William F Godoy godoywf@ornl.gov
*/
#include "Engine.h"
#include "Engine.tcc"
#include "adios2/core/Engine.h"
#include "adios2/hel... | 1 | 12,371 | Shouldn't we prefer passing a pointer by reference T*&, since these are C++ bindings? | ornladios-ADIOS2 | cpp |
@@ -146,9 +146,15 @@ func (n *NetworkPolicyController) processClusterNetworkPolicy(cnp *secv1alpha1.C
appliedToGroupNamesForRule = append(appliedToGroupNamesForRule, atGroup)
appliedToGroupNamesSet.Insert(atGroup)
}
+ cgExists := len(ingressRule.SourceGroups) > 0
+ iFromPeers := n.toAntreaPeerForCRD(ingres... | 1 | // Copyright 2020 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 31,042 | nit: Personally I feel that it's cleaner to let `toAntreaPeerForCRD` to take `ingressRule` as a param instead of `ingressRule.From`. It can call `processRefCGs` inside the function and do the ipBlock/AG union within the function itself. It might not be worth the refactor though. | antrea-io-antrea | go |
@@ -98,6 +98,7 @@ func updateSPCVersion(name string) error {
return err
}
spcObj.VersionDetails.Desired = upgradeVersion
+ spcObj.VersionDetails.Status.State = apis.ReconcilePending
_, err = client.Update(spcObj)
if err != nil {
return err | 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, soft... | 1 | 17,493 | Pending has been set only for SPC.. why? for other CRs as well, this need to be done.. right? | openebs-maya | go |
@@ -61,11 +61,13 @@ class VimeoProvider extends BaseVideoProvider
$box = $this->getBoxHelperProperties($media, $format, $options);
$params = array(
- 'src' => http_build_query($player_parameters),
- 'id' => $player_parameters['js_swf_id'],
- 'framebo... | 1 | <?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\Provider;
use Sonata\CoreBundle\Mo... | 1 | 7,412 | would use an empty string here as default and then check for emptiness in the twig template. I dont like mixing types @core23 what do you think? | sonata-project-SonataMediaBundle | php |
@@ -169,6 +169,8 @@ public class PhpSampleMethodToViewTransformer implements SampleMethodToViewTrans
builder.isResourceMap(fieldInfo.type().isMap());
builder.pageVarName(
symbolTable.getNewSymbol(namer.localVarName(Name.lowerCamel(fieldInfo.name()))));
+ builder.pageTokenName(methodInfo.requestPag... | 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 | 20,433 | How come we need case manipulation for the nextPageToken and not for pageToken? | googleapis-gapic-generator | java |
@@ -2,7 +2,8 @@ C2::Application.routes.draw do
ActiveAdmin.routes(self)
root :to => 'home#index'
get '/error' => 'home#error'
- get '/me' => 'home#me'
+ get '/me' => 'profile#show'
+ post '/me' => 'profile#update'
get '/feedback' => 'feedback#index'
get '/feedback/thanks' => 'feedback#thanks'
... | 1 | C2::Application.routes.draw do
ActiveAdmin.routes(self)
root :to => 'home#index'
get '/error' => 'home#error'
get '/me' => 'home#me'
get '/feedback' => 'feedback#index'
get '/feedback/thanks' => 'feedback#thanks'
post '/feedback' => 'feedback#create'
match '/auth/:provider/callback' => 'auth#oauth_c... | 1 | 15,459 | why use these rather than regular named paths? | 18F-C2 | rb |
@@ -61,6 +61,9 @@ module Bolt
{ flags: OPTIONS[:global],
banner: GROUP_HELP }
end
+ when 'guide'
+ { flags: OPTIONS[:global] + %w[format],
+ banner: GUIDE_HELP }
when 'plan'
case action
when 'convert' | 1 | # frozen_string_literal: true
# Note this file includes very few 'requires' because it expects to be used from the CLI.
require 'optparse'
module Bolt
class BoltOptionParser < OptionParser
OPTIONS = { inventory: %w[targets query rerun description],
authentication: %w[user password password-prom... | 1 | 15,671 | Hm, I don't think the extra flags are doing any harm here, but it does seem like `--help` is the only flag you could *actually* use with this command. We might eventually want to separate those out. | puppetlabs-bolt | rb |
@@ -1,3 +1,18 @@
+# This script is responsible to create candidate sets for all users. The generated candidate sets
+# will be given as input to the recommender to assign ratings to the recordings in candidate sets.
+# The general flow is as follows:
+#
+# Last 7 days listens are filtered from mapped_listens_df and is ... | 1 | import os
import sys
import uuid
import logging
import time
from datetime import datetime
from collections import defaultdict
from py4j.protocol import Py4JJavaError
import listenbrainz_spark
from listenbrainz_spark import stats, utils, path
from listenbrainz_spark.recommendations.utils import save_html
from listenbra... | 1 | 17,125 | We should make this a docstring, so that editors are able to pick it up. | metabrainz-listenbrainz-server | py |
@@ -14,5 +14,13 @@ feature "User without a subscription views sample video" do
expect(current_path).to eq(video_path(video))
expect(page).to have_css("h1", text: video.name)
expect(page).not_to have_css(".locked-message")
+ expect_authed_to_access_event_fired_for(video)
+ end
+
+ def expect_authed_t... | 1 | require "rails_helper"
feature "User without a subscription views sample video" do
scenario "successfully" do
user = create(:user)
trail = create(:trail, :video)
video = trail.first_completeable
video.update accessible_without_subscription: true
visit trail_path(trail)
click_on "Start Course... | 1 | 16,271 | Put a comma after the last parameter of a multiline method call. | thoughtbot-upcase | rb |
@@ -150,10 +150,8 @@ public class SalesforceDroidGapActivity extends CordovaActivity {
webSettings.setDomStorageEnabled(true);
String cachePath = getApplicationContext().getCacheDir().getAbsolutePath();
webSettings.setAppCachePath(cachePath);
- webSettings.setAppCacheMaxSize(1024 * 1024 ... | 1 | /*
* Copyright (c) 2011-12, 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, t... | 1 | 14,490 | App cache size is now managed dynamically by the `WebView`. This statement has no effect in the new framework. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -1,4 +1,6 @@
-var nn = node.nodeName.toLowerCase();
-return (
- node.hasAttribute('alt') && (nn === 'img' || nn === 'input' || nn === 'area')
-);
+const { nodeName } = virtualNode.props;
+if (['img', 'input', 'area'].includes(nodeName) === false) {
+ return false;
+}
+
+return typeof virtualNode.attr('alt') === 'str... | 1 | var nn = node.nodeName.toLowerCase();
return (
node.hasAttribute('alt') && (nn === 'img' || nn === 'input' || nn === 'area')
);
| 1 | 15,124 | VirtualNode has a `hasAttr` function, any reason why you're not using it? | dequelabs-axe-core | js |
@@ -69,7 +69,6 @@ public class HttpAccess {
* Initializes HttpAccess. Should be called from the application.
*/
public static void init(Context app) {
- assert DEFAULT == null : "HttpAccess.init should be called once per process";
DEFAULT = new HttpAccess(app, null /* user agent will be... | 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 | 17,992 | This now throws when running tests (maybe the move to java 11??). Do we want to keep it? | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -45,8 +45,8 @@ func EncodeSha1(str string) string {
}
func ShortSha(sha1 string) string {
- if len(sha1) == 40 {
- return sha1[:10]
+ if len(sha1) > 7 {
+ return sha1[:7]
}
return sha1
} | 1 | // Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package base
import (
"crypto/hmac"
"crypto/md5"
"crypto/rand"
"crypto/sha1"
"encoding/base64"
"encoding/hex"
"fmt"
"hash"
"html/template"
"math"
... | 1 | 11,761 | We can allow 7-char SHA, does not mean we want to show with 7-char in default, please change to `if len() > 10`, then cut. | gogs-gogs | go |
@@ -66,8 +66,10 @@ en_US.strings = {
loading: 'Loading...',
logOut: 'Log out',
myDevice: 'My Device',
+ noDuplicates: 'Cannot add the duplicate file %{fileName}, it already exists',
noFilesFound: 'You have no files or folders here',
noInternetConnection: 'No Internet connection',
+ noNewAlreadyUploadin... | 1 | const en_US = {}
en_US.strings = {
addBulkFilesFailed: {
'0': 'Failed to add %{smart_count} file due to an internal error',
'1': 'Failed to add %{smart_count} files due to internal errors'
},
addMore: 'Add more',
addMoreFiles: 'Add more files',
addingMoreFiles: 'Adding more files',
allowAccessDescr... | 1 | 12,780 | this one should also have quotes i guess :) | transloadit-uppy | js |
@@ -106,12 +106,14 @@ func TestBuilderForYAML(t *testing.T) {
"Test 2": {fakeInvalidK8sResource, "", true},
}
for name, mock := range tests {
+ name := name // pin it
+ mock := mock // pin it
t.Run(name, func(t *testing.T) {
b := BuilderForYaml(mock.resourceYAML)
if mock.expectError && len(b.errs) =... | 1 | // Copyright © 2018-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 o... | 1 | 15,527 | Using the variable on range scope `mock` in function literal (from `scopelint`) | openebs-maya | go |
@@ -1020,7 +1020,7 @@ public class Datasets extends AbstractApiBean {
PublishDatasetResult res = execCommand(new PublishDatasetCommand(ds,
createDataverseRequest(user),
isMinor));
- return res.isCompleted() ? ok(json(res.getDataset())) : accepted(jso... | 1 | package edu.harvard.iq.dataverse.api;
import edu.harvard.iq.dataverse.ControlledVocabularyValue;
import edu.harvard.iq.dataverse.DataFile;
import edu.harvard.iq.dataverse.DataFileServiceBean;
import edu.harvard.iq.dataverse.Dataset;
import edu.harvard.iq.dataverse.DatasetField;
import edu.harvard.iq.dataverse.DatasetF... | 1 | 42,843 | does this result in a 200 when the dataset is still inprogress/publishing not yet finalized? Seems like 202 is the right code for that (as it was) and the test should be watching for a 202? | IQSS-dataverse | java |
@@ -65,6 +65,7 @@ public class SmartStorePlugin extends ForcePlugin {
public static final String LIKE_KEY = "likeKey";
public static final String MATCH_KEY = "matchKey";
public static final String SMART_SQL = "smartSql";
+ public static final String ORDER_PATH = "orderPath";
public static final String ORDER = "... | 1 | /*
* Copyright (c) 2011-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,... | 1 | 14,749 | Previously you could only order by the field you were searching by. But for full-text search, you can search across all indexed fields, and it didn't make sense not to have a sorting. For backward compatibility, the javascript code uses indexPath as the orderPath when no orderPath is provided. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -38,7 +38,7 @@ export function flushMounts() {
* Apply differences in a given vnode (and it's deep children) to a real DOM Node.
* @param {import('../dom').PreactElement} dom A DOM node to mutate into the shape of a `vnode`
* @param {import('../vnode').VNode} vnode A VNode (with descendants forming a tree) rep... | 1 | import { ATTR_KEY } from '../constants';
import { isSameNodeType, isNamedNode } from './index';
import { buildComponentFromVNode } from './component';
import { createNode, setAccessor } from '../dom/index';
import { unmountComponent } from './component';
import options from '../options';
import { applyRef } from '../ut... | 1 | 12,288 | VIM didn't like your whitespace. | preactjs-preact | js |
@@ -3,14 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Threading;
-using System.Threading.Tasks;... | 1 | // <copyright file="CustomTestFramework.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using System;
usin... | 1 | 21,524 | Are you sure the namespace should change? | DataDog-dd-trace-dotnet | .cs |
@@ -12,7 +12,7 @@ namespace MvvmCross.ViewModels
void Initialize();
- void Startup(object hint);
+ object Startup(object hint);
void Reset();
} | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
using MvvmCross.Plugin;
namespace MvvmCross.ViewModels
{
public interface IMvxApplication : IMvxViewModelLoc... | 1 | 14,337 | @martijn00 I'm not sure why we're keeping the object parameter and return type since this can be done by using MvxApplication<THint> with THint set to object | MvvmCross-MvvmCross | .cs |
@@ -31,6 +31,7 @@ import com.pingcap.tikv.meta.TiColumnInfo.InternalTypeHolder;
// https://dev.mysql.com/doc/refman/8.0/en/time.html
public class TimeType extends DataType {
+ public static final TimeType TIME = new TimeType(MySQLType.TypeDuration);
public static final MySQLType[] subTypes = new MySQLType[] {My... | 1 | /*
*
* Copyright 2017 PingCAP, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | 1 | 10,686 | why do we create a time type here? | pingcap-tispark | java |
@@ -1,4 +1,4 @@
-define(["jQuery", "datetime", "loading", "libraryMenu", "listViewStyle", "paper-icon-button-light"], function ($, datetime, loading, libraryMenu) {
+define(["jQuery", "datetime", "loading", "libraryMenu", "css!components/listview/listview", "paper-icon-button-light"], function ($, datetime, loading, li... | 1 | define(["jQuery", "datetime", "loading", "libraryMenu", "listViewStyle", "paper-icon-button-light"], function ($, datetime, loading, libraryMenu) {
"use strict";
function populateRatings(allParentalRatings, page) {
var html = "";
html += "<option value=''></option>";
var i;
var ... | 1 | 12,938 | Does this style actually need to get loaded in all of these components? | jellyfin-jellyfin-web | js |
@@ -30,6 +30,9 @@ import io.servicecomb.foundation.ssl.SSLCustom;
import io.servicecomb.foundation.ssl.SSLOption;
import io.servicecomb.foundation.ssl.SSLOptionFactory;
import io.servicecomb.foundation.vertx.VertxTLSBuilder;
+import io.servicecomb.transport.rest.vertx.accesslog.AccessLogConfiguration;
+import io.ser... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 8,030 | import but not used so you did not resolve compile warnings? | apache-servicecomb-java-chassis | java |
@@ -865,15 +865,10 @@ BlockType_t Creature::blockHit(Creature* attacker, CombatType_t combatType, int3
}
if (checkArmor) {
- int32_t armorValue = getArmor();
- if (armorValue > 1) {
- double armorFormula = armorValue * 0.475;
- int32_t armorReduction = static_cast<int32_t>(std::ceil(armorFormula));
- ... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2016 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 | 12,966 | This is so much more concise and beautiful than the previous formula | otland-forgottenserver | cpp |
@@ -41,9 +41,19 @@ import org.hyperledger.besu.tests.acceptance.dsl.transaction.perm.PermissioningT
import org.hyperledger.besu.tests.acceptance.dsl.transaction.privacy.PrivacyTransactions;
import org.hyperledger.besu.tests.acceptance.dsl.transaction.web3.Web3Transactions;
+import java.io.File;
+
+import org.apache... | 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 | 21,547 | Is there any reason not to have the `static` modifier for the logger? _(that would be in keeping with the reference being uppercase)_ | hyperledger-besu | java |
@@ -27,11 +27,18 @@ import (
// DialogCreator creates new dialog between consumer and provider, using given contact information
type DialogCreator func(consumerID, providerID identity.Identity, contact market.Contact) (communication.Dialog, error)
+// SessionCreationConfig are the parameters that get sent to the pr... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 12,986 | It's not about session creation config. It's about passing consumer config parameters to underlying transport - nothing to do with session itself | mysteriumnetwork-node | go |
@@ -97,7 +97,7 @@ type ConfigLocal struct {
kbpki KBPKI
renamer ConflictRenamer
registry metrics.Registry
- loggerFn func(prefix string) logger.Logger
+ loggerFn func(prefix string, overrideEnableDebug bool) logger.Logger
noBGFlush bool // logic opposite so the... | 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 (
"flag"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
... | 1 | 18,513 | Why is there an "enable" in the param name? Couldn't it just be `overrideDebug`? Here are everywhere else. | keybase-kbfs | go |
@@ -1,4 +1,8 @@
class VideosController < ApplicationController
+ def index
+ @videos = Video.published.recently_published_first
+ end
+
def show
@video = Video.find(params[:id])
@offering = Offering.new(@video.watchable, current_user) | 1 | class VideosController < ApplicationController
def show
@video = Video.find(params[:id])
@offering = Offering.new(@video.watchable, current_user)
if @offering.user_has_license?
render "show_licensed"
elsif @video.preview_wistia_id.present?
render "show"
else
redirect_to @video.w... | 1 | 12,698 | `published.recently_published_first` reads a little oddly to me. Is this the same thing as `Video.published.ordered`? | thoughtbot-upcase | rb |
@@ -20,7 +20,11 @@ var createIntegrationPreprocessor = function(logger) {
// and add the test data to it
var htmlpath = file.originalPath.replace(extRegex, '.html');
var html = fs.readFileSync(htmlpath, 'utf-8');
- var test = JSON.parse(content);
+ try {
+ var test = JSON.parse(con... | 1 | var path = require('path');
var fs = require('fs');
var extRegex = /\.json$/;
var template = fs.readFileSync(path.join(__dirname, 'runner.js'), 'utf-8');
/**
* Turn each rule.json integration test JSON into a js file using
* the runner.js script. This allow us to load the JSON files in
* the karma config and they'l... | 1 | 16,490 | Encountered this because I had a stray comma. Figured I'd tweak it a bit. | dequelabs-axe-core | js |
@@ -306,6 +306,13 @@ var _ = infrastructure.DatastoreDescribe("service loop prevention; with 2 nodes"
cfg.Spec.ServiceLoopPrevention = "Disabled"
})
+ // Expect to see empty cali-cidr-block chains. (Allowing time for a Felix
+ // restart.) This ensures that the cali-cidr-block chain has been cleared
+ // ... | 1 | // Copyright (c) 2020-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 19,564 | qq: Should this include the iptables6-save sim. to the inverse checks above? | projectcalico-felix | c |
@@ -195,8 +195,16 @@ func (cfg *Config) Merge(rhs Config) *Config {
for i := 0; i < left.NumField(); i++ {
leftField := left.Field(i)
- if utils.ZeroOrNil(leftField.Interface()) {
- leftField.Set(reflect.ValueOf(right.Field(i).Interface()))
+ switch leftField.Interface().(type) {
+ case BooleanDefaultFalse,... | 1 | // Copyright 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" file acco... | 1 | 24,719 | im open to explicitly checking NotSet value here but json logic already handles it so kept it this way. | aws-amazon-ecs-agent | go |
@@ -27,6 +27,7 @@ extern "C" {
#include "ScriptingEnvironment.h"
#include "../typedefs.h"
#include "../Util/OpenMPWrapper.h"
+#include "../Util/Lua.h"
ScriptingEnvironment::ScriptingEnvironment() {}
ScriptingEnvironment::ScriptingEnvironment(const char * fileName) { | 1 | /*
open source routing machine
Copyright (C) Dennis Luxen, others 2010
This program 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
any later version.
This progr... | 1 | 12,289 | The naming of the include file appears to be unlucky. | Project-OSRM-osrm-backend | cpp |
@@ -1018,7 +1018,8 @@ class BarPlot(BarsMixin, ColorbarPlot, LegendPlot):
if self.show_legend and any(len(l) for l in labels) and (sdim or not self.multi_level):
leg_spec = self.legend_specs[self.legend_position]
if self.legend_cols: leg_spec['ncol'] = self.legend_cols
- ax... | 1 | from __future__ import absolute_import, division, unicode_literals
import param
import numpy as np
import matplotlib as mpl
from matplotlib import cm
from matplotlib.collections import LineCollection
from matplotlib.dates import DateFormatter, date2num
from ...core.dimension import Dimension, dimension_name
from ...... | 1 | 23,808 | Bit worried about this. At minimum you should make a copy of the dict here to avoid modifying a user supplied variable. | holoviz-holoviews | py |
@@ -455,6 +455,11 @@ func (r *AWSMachinePoolReconciler) reconcileLaunchTemplate(machinePoolScope *sco
// userdata, OR we've discovered a new AMI ID.
if needsUpdate || tagsChanged || *imageID != *launchTemplate.AMI.ID || launchTemplateUserDataHash != bootstrapDataHash {
machinePoolScope.Info("creating new version... | 1 | /*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 19,519 | Is it better to create one before pruning? In case creation fails we don't want to delete the previous one. We create a new one, it is tagged as latest, so the previous can be deleted. `CreateLaunchTemplateVersion` returns the version created, how about directly trying to delete the previous version? Assuming the numbe... | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -27,13 +27,13 @@ class ContainerInformationTab extends Tab {
private final WinePrefixContainerDTO container;
- private Consumer<ContainerDTO> onDeletePrefix;
+ private Consumer<ContainerDTO> onDeleteContainer;
private Consumer<ContainerDTO> onOpenFileBrowser;
- ContainerInformationTab(WinePr... | 1 | package org.phoenicis.javafx.views.mainwindow.containers;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.Tab;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.s... | 1 | 13,008 | Do we require the specific implementation information here? | PhoenicisOrg-phoenicis | java |
@@ -0,0 +1,13 @@
+class DomainBlacklist < ActiveRecord::Base
+ validates :domain, uniqueness: { case_sensitive: false }
+
+ class << self
+ def email_banned?(email_address)
+ contains?(email_address.split('@').last)
+ end
+
+ def contains?(domain)
+ exists?(['lower(domain) LIKE ?', "%#{domain.downc... | 1 | 1 | 6,576 | How about `exists?(['domain ~* ?', domain.downcase])` ? | blackducksoftware-ohloh-ui | rb | |
@@ -729,6 +729,15 @@ func newContextForLongPoll(c *cli.Context) (context.Context, context.CancelFunc)
return newContextWithTimeout(c, defaultContextTimeoutForLongPoll)
}
+func newContextForBackground(c *cli.Context) (context.Context, context.CancelFunc) {
+ if c.GlobalIsSet(FlagContextTimeout) {
+ timeout := time... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 9,525 | Is this getting used in other places? Can we switch all the places to use the new API you added? | temporalio-temporal | go |
@@ -483,17 +483,6 @@ int HTTP_OP::libcurl_exec(
curl_easy_setopt(curlEasy, CURLOPT_SSL_VERIFYPEER, 1L);
//curl_easy_setopt(curlEasy, CURLOPT_SSL_VERIFYPEER, FALSE);
- // if the above is nonzero, you need the following:
- //
-#ifndef _WIN32
- if (boinc_file_exists(CA_BUNDLE_FILENAME)) {
- // ... | 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 | 16,159 | This need to be checked with linux. AFAIK, we have this file in our bin directory that is a link to the system file. | BOINC-boinc | php |
@@ -1,12 +1,12 @@
-define(['browser', 'dom', 'layoutManager', 'css!components/viewManager/viewContainer'], function (browser, dom, layoutManager) {
- 'use strict';
+import 'css!components/viewManager/viewContainer';
+/* eslint-disable indent */
function setControllerClass(view, options) {
if (options... | 1 | define(['browser', 'dom', 'layoutManager', 'css!components/viewManager/viewContainer'], function (browser, dom, layoutManager) {
'use strict';
function setControllerClass(view, options) {
if (options.controllerFactory) {
return Promise.resolve();
}
var controllerUrl = view.... | 1 | 17,088 | Shouldn't we import `default`? I can't get here to test. | jellyfin-jellyfin-web | js |
@@ -99,7 +99,7 @@ class UNIXServerClient(object):
self.unix_socket = os.path.join(self.temp_dir, 'luigid.sock')
def run_server(self):
- luigi.server.run(unix_socket=unix_socket)
+ luigi.server.run(unix_socket=self.unix_socket)
def scheduler(self):
url = ParseResult( | 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 | 12,822 | !!!!!!!!!!!!! @graingert, does this mean that tests haven't been running??? | spotify-luigi | py |
@@ -484,11 +484,11 @@ namespace Microsoft.DotNet.Execute
public string FormatSetting(string option, string value, string type, string toolName)
{
string commandOption = null;
- if (type.Equals("passThrough"))
+ if (type != null && type.Equals("passThrough"))
... | 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.
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace M... | 1 | 12,006 | I've already tried the null-coalescing operator here and got a strange error, so did this the old-fashioned way. | dotnet-buildtools | .cs |
@@ -1,4 +1,11 @@
var parent = axe.commons.dom.getComposedParent(node);
-return (['UL', 'OL'].includes(parent.nodeName.toUpperCase()) ||
- (parent.getAttribute('role') || '').toLowerCase() === 'list');
-
+
+var parentRole = (parent.getAttribute('role') || '').toLowerCase();
+
+var isListRole = parentRole === 'list... | 1 | var parent = axe.commons.dom.getComposedParent(node);
return (['UL', 'OL'].includes(parent.nodeName.toUpperCase()) ||
(parent.getAttribute('role') || '').toLowerCase() === 'list');
| 1 | 11,592 | This doesn't follow our spacing convention. It's also a little hard to read. Can you reformat? | dequelabs-axe-core | js |
@@ -4,10 +4,10 @@
package stack
import (
- "github.com/aws/amazon-ecs-cli-v2/internal/pkg/template"
"github.com/aws/aws-sdk-go/service/cloudformation"
+ "github.com/aws/copilot-cli/internal/pkg/template"
- "github.com/aws/amazon-ecs-cli-v2/internal/pkg/deploy"
+ "github.com/aws/copilot-cli/internal/pkg/deploy"
... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package stack
import (
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/template"
"github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/deploy"
)
const pipelineCf... | 1 | 13,857 | The deploy should come before template? EDIT: I see that in other files, we put a separate line and put deploy at the end. What is the reason for this? | aws-copilot-cli | go |
@@ -60,7 +60,7 @@ public class Program
// turn off the above default. i.e any
// instrument which does not match any views
// gets dropped.
- // .AddView(instrumentName: "*", new DropAggregationConfig())
+ // .AddView(instrumentName: "*", new MetricStreamConf... | 1 | // <copyright file="Program.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/lic... | 1 | 21,702 | Consider making a constant (e.g. `MetricStreamConfiguration.Drop`). | open-telemetry-opentelemetry-dotnet | .cs |
@@ -18,6 +18,7 @@ try:
except ImportError:
from rdkit.piddle import piddle
import ClusterUtils
+from rdkit.six.moves import xrange
import numpy
| 1 | # $Id$
#
# Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""Cluster tree visual... | 1 | 15,995 | same question: why not just switch this to range too? | rdkit-rdkit | cpp |
@@ -111,10 +111,10 @@ Variable IO::InquireVariable(const std::string &name)
helper::CheckForNullptr(m_IO, "for variable " + name +
", in call to IO::InquireVariable");
- const std::string type(m_IO->InquireVariableType(name));
+ const Type type(m_IO->InquireVariableTy... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* py11IO.cpp
*
* Created on: Mar 14, 2017
* Author: William F Godoy godoywf@ornl.gov
*/
#include "py11IO.h"
#include "adios2/common/ADIOSMacros.h"
#include "adios2/helper/adiosFunct... | 1 | 14,271 | @chuckatkins most places used an empty string for "no type", but a few used `"unknown"`. I've converted both cases to `Type::None`. Do you know why there was a distinction before? | ornladios-ADIOS2 | cpp |
@@ -408,7 +408,7 @@ void CUDATreeLearner::copyDenseFeature() {
// looking for dword_features_ non-sparse feature-groups
if (!train_data_->IsMultiGroup(i)) {
dense_feature_group_map_.push_back(i);
- auto sizes_in_byte = train_data_->FeatureGroupSizesInByte(i);
+ auto sizes_in_byte = std::min(t... | 1 | /*!
* Copyright (c) 2020 IBM Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifdef USE_CUDA
#include "cuda_tree_learner.h"
#include <LightGBM/bin.h>
#include <LightGBM/network.h>
#include <LightGBM/cuda/cuda_utils.h>
#include <Lig... | 1 | 27,816 | should we assert for the type for `FeatureGroupData` ? I think it should be 1-Byte type. | microsoft-LightGBM | cpp |
@@ -51,10 +51,10 @@ class TestCube(ComparisonTestCase):
def test_dimension_values_vdim(self):
cube = Dataset(self.cube, kdims=['longitude', 'latitude'])
self.assertEqual(cube.dimension_values('unknown', flat=False),
- np.flipud(np.array([[ 0, 4, 8],
- ... | 1 | import numpy as np
import unittest
try:
from iris.tests.stock import lat_lon_cube
except ImportError:
raise unittest.SkipTest("Could not import iris, skipping iris interface "
"tests.")
from holoviews.core.data import Dataset
from holoviews.core.data.iris import coord_to_dimension
... | 1 | 15,261 | As long as you are sure this is definitely correct now... :-) | holoviz-holoviews | py |
@@ -166,7 +166,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
tempBasal.setVisibility(View.GONE);
tempBasalCancel.setVisibility(View.VISIBLE);
final TemporaryBasal activeTemp = MainApp.getConfig... | 1 | package info.nightscout.androidaps.plugins.Actions;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.View;
im... | 1 | 29,679 | ... so that all action buttons have the same height :-) | MilosKozak-AndroidAPS | java |
@@ -21,6 +21,12 @@
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/dds/log/Colors.hpp>
#include <fastrtps/xmlparser/XMLProfileManager.h>
+#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
+#include <fastdds/dds/domain/DomainParticipant.hpp>
+#include <fastdds/dds/publisher/DataWriterListener.hpp>
+#inc... | 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 21,435 | Use correct, alpha sorted, include order. Correct order means: 1. Header corresponding to this source (i.e. `"LatencyTestPublisher.hpp"`) 2. C system headers 3. C++ system headers 4. Alpha-sorted external libraries headers 5. Alpha-sorted public headers from this project 6. Alpha-sorted private headers | eProsima-Fast-DDS | cpp |
@@ -58,6 +58,10 @@ type OutboundOption func(*Outbound)
func (OutboundOption) httpOption() {}
+// RequestFactory allows clients to configure their outgoing http requests. If not set,
+// a default implemenation will use the HostPort to make a POST request with the request body.
+type RequestFactory func(*transport.... | 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,408 | I hate this name, open to suggestions. | yarpc-yarpc-go | go |
@@ -199,7 +199,13 @@ func (c *Client) locallyCacheResults(target *core.BuildTarget, digest *pb.Digest
}
data, _ := proto.Marshal(ar)
metadata.RemoteAction = data
- c.state.Cache.Store(target, c.localCacheKey(digest), nil)
+ // TODO(jpoole): Similar to retrieveTargetMetadataFromCache, it would be cleaner if we cou... | 1 | package remote
import (
"bytes"
"context"
"crypto/sha1"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"fmt"
treesdk "github.com/bazelbuild/remote-apis-sdks/go/pkg/tree"
"io/ioutil"
"os"
"path"
"sort"
"strings"
"time"
"github.com/bazelbuild/remote-apis-sdks/go/pkg/chunker"
"github.com/bazelbuild/rem... | 1 | 9,078 | Does this log line work? We need Warningf or just warning without the format string. | thought-machine-please | go |
@@ -62,6 +62,7 @@ func New(checkpointer export.Checkpointer, exporter export.Exporter, opts ...Opt
impl := sdk.NewAccumulator(
checkpointer,
sdk.WithResource(c.Resource),
+ sdk.WithMetricsProcessors(c.MetricsProcessors...),
)
return &Controller{
provider: registry.NewMeterProvider(impl), | 1 | // Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 13,580 | The pull controller would need similar updates. | open-telemetry-opentelemetry-go | go |
@@ -1,5 +1,5 @@
/**
- * Copyright 2015-2017 The OpenZipkin Authors
+ * Copyright 2015-2018 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 | 1 | /**
* Copyright 2015-2017 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... | 1 | 13,202 | ignore this.. just didn't want to litter with a commit update to satisfy license plugin | openzipkin-zipkin | java |
@@ -807,8 +807,8 @@ module Beaker
end
if host['is_cygwin'].nil? or host['is_cygwin'] == true
- dest = "/cygdrive/c/Windows/Temp/#{host['dist']}.msi"
- on host, "curl -O #{dest} #{link}"
+ dest = "#{host['dist']}.msi"
+ on host, "curl -O #{link}"
#Beca... | 1 | require 'pathname'
module Beaker
module DSL
#
# This module contains methods to help cloning, extracting git info,
# ordering of Puppet packages, and installing ruby projects that
# contain an `install.rb` script.
#
# To mix this is into a class you need the following:
# * a method *hosts... | 1 | 8,833 | Is this definition needed since it doesn't look like it's being used anywhere? | voxpupuli-beaker | rb |
@@ -35,6 +35,11 @@ module Mongoid
class << self
delegate :discriminator_key, to: ::Mongoid
end
+ end
+
+ unless fields.has_key?(self.discriminator_key) || descendants.length == 0
+ default_proc = lambda { self.class.name }
+ field(self.discriminator_ke... | 1 | # frozen_string_literal: true
# encoding: utf-8
module Mongoid
# Provides behavior around traversing the document graph.
#
# @since 4.0.0
module Traversable
extend ActiveSupport::Concern
def _parent
@__parent ||= nil
end
def _parent=(p)
@__parent = p
end
# Module used fo... | 1 | 12,656 | Can this condition be reworded using `if` please? | mongodb-mongoid | rb |
@@ -135,13 +135,15 @@ Status FetchEdgesExecutor::setupEdgeKeysFromRef() {
const InterimResult *inputs;
if (sentence_->ref()->isInputExpr()) {
inputs = inputs_.get();
- if (inputs == nullptr) {
+ if (inputs == nullptr
+ || (inputs != nullptr && !inputs->hasData())) {
... | 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 "base/Base.h"
#include "graph/FetchEdgesExecutor.h"
namespace nebula {
namespace graph {
FetchEdgesExecutor::F... | 1 | 21,447 | after ||, no need inputs != nullptr | vesoft-inc-nebula | cpp |
@@ -159,7 +159,14 @@ func (s *Source) Owner() (string, error) {
// is deloying to and the containerized applications that will be deployed.
type PipelineStage struct {
*AssociatedEnvironment
- LocalApplications []string
+ LocalApplications []AppInStage
+}
+
+// AppInStage represents configurations for an app in a p... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package deploy holds the structures to deploy infrastructure resources.
// This file defines pipeline deployment resources.
package deploy
import (
"errors"
"fmt"
"regexp"
"github.com/aws/aws-sdk-... | 1 | 11,389 | Is it just preference or on purpose that using slice of structs instead of slice of pointers? | aws-copilot-cli | go |
@@ -90,7 +90,7 @@ export function diff(parentDom, newVNode, oldVNode, context, isSvg, excessDomChi
c.state = c._nextState;
c._dirty = false;
c._vnode = newVNode;
- newVNode._dom = oldDom!=null ? oldDom!==oldVNode._dom ? oldDom : oldVNode._dom : null;
+ newVNode._dom = oldVNode._dom;
newV... | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component, enqueueRender } from '../component';
import { Fragment } from '../create-element';
import { diffChildren, toChildArray } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '../... | 1 | 14,293 | This line always confused me anyway. Good catch! | preactjs-preact | js |
@@ -130,6 +130,6 @@ func (j journalBlockServer) IsUnflushed(ctx context.Context, tlfID tlf.ID,
}
func (j journalBlockServer) Shutdown() {
- j.jServer.shutdown()
+ j.jServer.shutdown(context.Background())
j.BlockServer.Shutdown()
} | 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 (
"github.com/keybase/kbfs/kbfsblock"
"github.com/keybase/kbfs/kbfscrypto"
"github.com/keybase/kbfs/tlf"
"github.com/pkg/errors"
"golang.org... | 1 | 15,649 | Should we add `ctx` to `BlockServer.Shutdown()` for this purpose? Would be nice, but I don't care too much. | keybase-kbfs | go |
@@ -42,7 +42,7 @@ bool DeadlineQosPolicy::addToCDRMessage(CDRMessage_t* msg)
bool valid = CDRMessage::addUInt16(msg, this->Pid);
valid &= CDRMessage::addUInt16(msg, this->length);//this->length);
valid &= CDRMessage::addInt32(msg,period.seconds);
- valid &= CDRMessage::addUInt32(msg,period.fraction);
... | 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 14,289 | Duration_t at RTPS level must be serialized using fractions. | eProsima-Fast-DDS | cpp |
@@ -28,6 +28,14 @@ import (
"go.uber.org/yarpc/yarpcerrors"
)
+var msgInboundDispatcherNotRunning = "peer for service %q is not running"
+
+// NotRunningInboundError builds a YARPC error with code
+// yarpcerrors.CodeUnavailable when the dispatcher is not running.
+func NotRunningInboundError(service string) error... | 1 | // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 15,874 | "peer" has its own meaning within YARPC with its own class of objects. This should probably be "dispatcher" too? | yarpc-yarpc-go | go |
@@ -172,9 +172,18 @@ class ClangSA(analyzer_base.SourceAnalyzer):
'-Xclang', checker_name])
if config.ctu_dir and not self.__disable_ctu:
+ # ctu-clang5 compatibility
analyzer_cmd.extend(['-Xclang', '-analyzer-config',
... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 9,420 | I do not like this line break before `=true`. Maybe starting the list in the next line would help to reduce the indent? This way we could keep this string together. | Ericsson-codechecker | c |
@@ -34,18 +34,10 @@ import (
// the default value in Default var.
func init() {
- flag.StringVar(&_overwritePath, "config-path", "", "Config path")
- flag.StringVar(&_secretPath, "secret-path", "", "Secret path")
- flag.StringVar(&_subChainPath, "sub-config-path", "", "Sub chain Config path")
flag.Var(&_plugins, ... | 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,286 | _plugins should be removed too | iotexproject-iotex-core | go |
@@ -0,0 +1,5 @@
+let nn = node.nodeName.toLowerCase();
+let validSetup =
+ node.hasAttribute('alt') && (nn === 'img' || nn === 'input' || nn === 'area');
+let validAttrValue = /^\s+$/.test(node.getAttribute('alt'));
+return validSetup && validAttrValue; | 1 | 1 | 13,664 | The rule selector will not include `<input>` and `<area>` elements. Why not make this a new, separate rule altogether? | dequelabs-axe-core | js | |
@@ -1122,7 +1122,7 @@ class CommandDispatcher:
try:
userscripts.run_async(tab, cmd, *args, win_id=self._win_id,
env=env, verbose=verbose)
- except userscripts.UnsupportedError as e:
+ except (userscripts.UnsupportedError, userscripts.NotFoundError) ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 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 | 16,644 | @The-Compiler Is this style okay or would you prefer a common userscript exception base? | qutebrowser-qutebrowser | py |
@@ -98,7 +98,8 @@ SchemaBuffer.prototype.cast = function (value, doc, init) {
return value;
} else if (value instanceof Binary) {
- return new MongooseBuffer(value.value(true), [this.path, doc]);
+ var sub_type = value.sub_type || 0x00;
+ return (new MongooseBuffer(value.value(true), [this.path, doc]... | 1 | /*!
* Module dependencies.
*/
var SchemaType = require('../schematype')
, CastError = SchemaType.CastError
, MongooseBuffer = require('../types').Buffer
, Binary = MongooseBuffer.Binary
, Query = require('../query')
, utils = require('../utils')
, Document
/**
* Buffer SchemaType constructor
*
* @par... | 1 | 11,906 | we'd need to return a MongooseBuffer here instead of the Binary. lets add the subtype option to the buffer schema type as referenced in #1000 instead. | Automattic-mongoose | js |
@@ -1158,7 +1158,6 @@ function updateDocuments(coll, selector, document, options, callback) {
if ('function' === typeof options) (callback = options), (options = null);
if (options == null) options = {};
if (!('function' === typeof callback)) callback = null;
-
// If we are not providing a selector or docum... | 1 | 'use strict';
const applyWriteConcern = require('../utils').applyWriteConcern;
const applyRetryableWrites = require('../utils').applyRetryableWrites;
const checkCollectionName = require('../utils').checkCollectionName;
const Code = require('../core').BSON.Code;
const createIndexDb = require('./db_ops').createIndex;
co... | 1 | 15,889 | Let's remove this change. | mongodb-node-mongodb-native | js |
@@ -727,7 +727,7 @@ def processNegativeStates(role, states, reason, negativeStates=None):
# but only if it is either focused or this is something other than a change event.
# The condition stops "not selected" from being spoken in some broken controls
# when the state change for the previous focus is issued befor... | 1 | #controlTypes.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2007-2016 NV Access Limited, Babbage B.V.
ROLE_UNKNOWN=0
ROLE_WINDOW=1
ROLE_TITLEBAR=2
ROLE_PANE=3
ROLE_DIALOG=4
ROLE_CHECKBOX=5
ROLE_R... | 1 | 23,530 | Could you split this into multiple lines? | nvaccess-nvda | py |
@@ -25,12 +25,17 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
-import Layout from '../../../components/layout/layout';
+import Data from 'googlesitekit-data';
import DashboardModuleHeader from '../../../components/dashboard/dashboard-module-header';
import DashboardPageSpeed from '../c... | 1 | /**
* DashboardSpeed component.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
... | 1 | 29,699 | This technically works, however it may be safer to use both `getCurrentReferenceURL` and `getCurrentEntityURL` and then make this condition `currentReferenceURL === currentEntityURL`. Currently, this code only works based on the internals of `getCurrentReferenceURL`, so by checking both we would decouple that. | google-site-kit-wp | js |
@@ -69,9 +69,9 @@ func (c *WSClient) Connect() (conn.Connection, error) {
if resp != nil {
body, errRead := ioutil.ReadAll(resp.Body)
if errRead == nil {
- respMsg = fmt.Sprintf("response code: %d, response body: %s", resp.StatusCode, string(body))
+ respMsg = fmt.Sprintf("Response code: %d, response body: ... | 1 | package client
import (
"fmt"
"io/ioutil"
"k8s.io/klog/v2"
"github.com/gorilla/websocket"
"github.com/kubeedge/viaduct/pkg/api"
"github.com/kubeedge/viaduct/pkg/conn"
"github.com/kubeedge/viaduct/pkg/lane"
"github.com/kubeedge/viaduct/pkg/utils"
)
// the client based on websocket
type WSClient struct {
opt... | 1 | 22,406 | It does not recommend capitalization | kubeedge-kubeedge | go |
@@ -113,6 +113,17 @@ feature 'User creates a subscription' do
expect(page).to have_content(I18n.t('subscriptions.flashes.update.success'))
end
+ scenario 'updates Stripe subscription with declining credit card', :js => true do
+ FakeStripe.failure = true
+ sign_in_as_subscriber
+ visit my_account_pa... | 1 | require 'spec_helper'
feature 'User creates a subscription' do
VALID_SANDBOX_CREDIT_CARD_NUMBER = '4111111111111111'
background do
create_subscribeable_product
sign_in
end
scenario 'creates a Stripe subscription with a valid credit card' do
subscribe_with_valid_credit_card
expect(current_user... | 1 | 7,334 | Minor thing, but can you use 1.9 hash syntax for this? | thoughtbot-upcase | rb |
@@ -361,6 +361,7 @@ class LambdaExecutorReuseContainers(LambdaExecutorContainers):
mount_volume = not config.LAMBDA_REMOTE_DOCKER
lambda_cwd_on_host = Util.get_host_path_for_path_in_docker(lambda_cwd)
+ lambda_cwd_on_host = Util.format_windows_path(lambda_cwd)
... | 1 | import os
import re
import glob
import json
import time
import logging
import threading
import subprocess
import six
from multiprocessing import Process, Queue
try:
from shlex import quote as cmd_quote
except ImportError:
from pipes import quote as cmd_quote # for Python 2.7
from localstack import config
from ... | 1 | 10,934 | I tried to follow the code structure already present. | localstack-localstack | py |
@@ -191,7 +191,7 @@ public class FileHandler {
final long copied = Files.copy(from.toPath(), out);
final long length = from.length();
if (copied != length) {
- throw new IOException("Could not transfer all bytes.");
+ throw new IOException("Could not transfer all bytes of " + from.toP... | 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,214 | seems reasonable to also want to include the 'to' location? | SeleniumHQ-selenium | rb |
@@ -118,7 +118,7 @@ class ExperimentTestBaseClass(HelperTestCaseBase):
global g_myEnv
if not g_myEnv:
# Setup environment
- params = type('obj', (object,), {'installDir' : os.environ['NUPIC']})
+ params = type('obj', (object,), {'installDir' : resource_filename("nupic","")})
g_myEnv = ... | 1 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | 1 | 18,606 | Please leave 1 space char between commas here and other places in this PR. | numenta-nupic | py |
@@ -100,8 +100,8 @@ bool ThreadsExec::spawn() {
pthread_attr_t attr;
- if (0 == pthread_attr_init(&attr) ||
- 0 == pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) ||
+ if (0 == pthread_attr_init(&attr) &&
+ 0 == pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) &&
0 == pthread_attr_setdeta... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 29,849 | hm is this really &&? Not ||? Was it initially correct if any of these things are not set that it needs to recreated? | kokkos-kokkos | cpp |
@@ -149,7 +149,8 @@ public class PackageTool extends SolrCLI.ToolBase {
String version = parsedVersion.second();
boolean noprompt = cli.hasOption('y');
boolean isUpdate = cli.hasOption("update") || cli.hasOption('u');
- packageManager.deploy(packageName,... | 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,323 | Please don't use C-style array declarations. IMO our pre-commit ought to be enhanced to not allow this | apache-lucene-solr | java |
@@ -259,6 +259,12 @@ bool pmix_value_cmp(pmix_value_t *p, pmix_value_t *p1)
case PMIX_STRING:
rc = strcmp(p->data.string, p1->data.string);
break;
+ case PMIX_COMPRESSED_STRING:
+ if (p->data.bo.size != p1->data.bo.size) {
+ return false;
+ ... | 1 | /*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Resea... | 1 | 6,819 | @rhc54 This doesn't look like a comprehensive comparison. For `PMIX_STRING` we seem to actually compare the content of the data while here we only compare meta-information which doesn't ensure that values are the same. | openpmix-openpmix | c |
@@ -1601,6 +1601,7 @@ void nano::json_handler::bootstrap ()
{
std::string address_text = request.get<std::string> ("address");
std::string port_text = request.get<std::string> ("port");
+ const bool confirmed_frontiers = request.get<bool> ("confirmed_frontiers", false);
boost::system::error_code address_ec;
au... | 1 | #include <nano/lib/config.hpp>
#include <nano/lib/json_error_response.hpp>
#include <nano/lib/timer.hpp>
#include <nano/node/common.hpp>
#include <nano/node/ipc.hpp>
#include <nano/node/json_handler.hpp>
#include <nano/node/json_payment_observer.hpp>
#include <nano/node/node.hpp>
#include <nano/node/node_rpc_config.hpp... | 1 | 15,961 | I think `bypass_frontier_confirmation` conveys the intention better (default false as well) | nanocurrency-nano-node | cpp |
@@ -5,12 +5,9 @@ import (
"fmt"
"testing"
- "github.com/ipfs/go-cid"
- "github.com/ipfs/go-hamt-ipld"
- "github.com/pkg/errors"
"github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
+ "github.com/filecoin-project/go-filecoin/address"
"github.com/filecoin-project/go-filecoin/chain"
"... | 1 | package core_test
import (
"context"
"fmt"
"testing"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-hamt-ipld"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-filecoin/chain"
"github.com/filecoin-project/go-filecoin/config"
"... | 1 | 20,257 | This looks like it goes beyond the scope of removing `BlockHeight()`, in the future please do this in a separate commit at a minimum -- separate PR is fine too. | filecoin-project-venus | go |
@@ -666,9 +666,10 @@ class AbstractAudio(QObject):
muted_changed = pyqtSignal(bool)
recently_audible_changed = pyqtSignal(bool)
- def __init__(self, parent=None):
+ def __init__(self, tab, parent=None):
super().__init__(parent)
self._widget = None
+ self._tab = tab
def ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-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 | 22,155 | You'll also need to adjust `FakeWebTabAudio` in `tests/helpers/stubs.py`. | qutebrowser-qutebrowser | py |
@@ -1,19 +1,3 @@
-/*
-Copyright 2019 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable la... | 1 | /*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 6,589 | @csrwng what should we do here? This one is from origin. | openshift-hive | go |
@@ -17,6 +17,7 @@
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/threading.h>
+#include <LightGBM/utils/LocaleContext.h>
#include <string>
#include <cstdio> | 1 | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <LightGBM/c_api.h>
#include <LightGBM/boosting.h>
#include <LightGBM/config.h>
#include <LightGBM/dataset.h>
#include <LightGBM/dataset_loa... | 1 | 22,664 | Follow alphabetical order. | microsoft-LightGBM | cpp |
@@ -0,0 +1,16 @@
+// <copyright file="IAutomaticTracer.cs" company="Datadog">
+// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
+// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
+// </copyright>
+... | 1 | 1 | 23,854 | As far as I can tell, these always get and set the context as an `IReadOnlyDictionary<string, string>`. Can we use that here instead of `object` and get rid of the `as IReadOnlyDictionary<string, string>`? | DataDog-dd-trace-dotnet | .cs | |
@@ -206,7 +206,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
else:
self._doc.setPlainText(self._opt.text)
else:
- self._doc.setHtml('<b>{}</b>'.format(html.escape(self._opt.text)))
+ self._doc.setHtml('{}'.format(html.escape(self._opt.text)))
... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 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 | 15,466 | As you only have `{}` as the format string (without anything else in it), this is the same as doing `self._doc.setHtml(html.escape(self._opt.text))` | qutebrowser-qutebrowser | py |
@@ -161,6 +161,8 @@ public class Constants {
// enable Quartz Scheduler if true.
public static final String ENABLE_QUARTZ= "azkaban.server.schedule.enable_quartz";
+
+ public static final String CUSTOM_CREDENTIAL_NAME = "azkaban.security.credential";
}
public static class FlowProperties { | 1 | /*
* Copyright 2017 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 | 15,268 | Where would this be configured? In azkaban.properties? | azkaban-azkaban | java |
@@ -2101,6 +2101,12 @@ Collection.prototype.findOneAndUpdate = function(filter, update, options, callba
if (typeof options === 'function') (callback = options), (options = {});
options = options || {};
+ var err = checkForAtomicOperators(update);
+ if (err) {
+ if (typeof callback === 'function') return ca... | 1 | 'use strict';
const checkCollectionName = require('./utils').checkCollectionName;
const ObjectID = require('mongodb-core').BSON.ObjectID;
const Long = require('mongodb-core').BSON.Long;
const Code = require('mongodb-core').BSON.Code;
const f = require('util').format;
const AggregationCursor = require('./aggregation_cu... | 1 | 14,340 | 1. Use `const` instead of `var` here. 2. Move the check to after the `if (update == null || typeof update !== 'object')`. | mongodb-node-mongodb-native | js |
@@ -29,6 +29,13 @@ struct st_h2o_multithread_queue_t {
#if H2O_USE_LIBUV
uv_async_t async;
#else
+#if defined(__linux__) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+/**
+ * The kernel overhead of an eventfd file descriptor is
+ * much lower than that of a pipe, and only one file descriptor is required
+ *... | 1 | /*
* Copyright (c) 2015-2016 DeNA Co., Ltd., Kazuho Oku, Tatsuhiko Kubo,
* Chul-Woong Yang
*
* 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,... | 1 | 12,703 | Let's assume that on Linux `eventfd` is always available as a wrapper of the eventfd2 system call. It is supported since linux 2.6.27 + glibc 2.9, as well as from the ancient versions of bionic. In other words, it would be fair to argue that the pair would be available on practically all platforms that provide `pipe2`.... | h2o-h2o | c |
@@ -61,6 +61,7 @@ public class DatabaseTransferConsumer implements IDataTransferConsumer<DatabaseC
IDataTransferNodePrimary, DBPReferentialIntegrityController {
private static final Log log = Log.getLog(DatabaseTransferConsumer.class);
+ private DBCStatistics statistics = new DBCStatistics();
pr... | 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,682 | This field could be `final`. | dbeaver-dbeaver | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.