content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Javascript | Javascript | return this for http2serverrequest#settimeout | ac80fed3b80cdda4cf68df67ba569f208b87922e | <ide><path>lib/internal/http2/compat.js
<ide> class Http2ServerRequest extends Readable {
<ide> }
<ide>
<ide> setTimeout(msecs, callback) {
<del> if (this[kState].closed)
<del> return;
<del> this[kStream].setTimeout(msecs, callback);
<add> if (!this[kState].closed)
<add> this[kStream].setTimeout... | 2 |
Python | Python | fix typos in returndict and returnlist docstrings | 400078311bae2055a4d4ab6f5933439d6111e3cb | <ide><path>rest_framework/utils/serializer_helpers.py
<ide>
<ide> class ReturnDict(OrderedDict):
<ide> """
<del> Return object from `serialier.data` for the `Serializer` class.
<add> Return object from `serializer.data` for the `Serializer` class.
<ide> Includes a backlink to the serializer instance for ... | 1 |
Javascript | Javascript | remove deprecated function requirerepl | 4d6297fef05267e82dd653f7ad99c95f9a5e2cef | <ide><path>lib/module.js
<ide> const NativeModule = require('native_module');
<ide> const util = require('util');
<ide> const internalModule = require('internal/module');
<del>const internalUtil = require('internal/util');
<ide> const vm = require('vm');
<ide> const assert = require('assert').ok;
<ide> const fs = requi... | 1 |
Mixed | Ruby | add authenticate_by when using has_secure_password | 9becc41df989bfccff091852d45925d41f0a13d8 | <ide><path>activerecord/CHANGELOG.md
<add>* Add `authenticate_by` when using `has_secure_password`.
<add>
<add> `authenticate_by` is intended to replace code like the following, which
<add> returns early when a user with a matching email is not found:
<add>
<add> ```ruby
<add> User.find_by(email: "...")&.... | 7 |
Javascript | Javascript | remove unused catch bindings | 9d68e568569aa9b8ddf387b3d58adb6ae7e3cc22 | <ide><path>lib/fs.js
<ide> function exists(path, callback) {
<ide>
<ide> try {
<ide> fs.access(path, F_OK, suppressedCallback);
<del> } catch (err) {
<add> } catch {
<ide> return callback(false);
<ide> }
<ide> }
<ide> function existsSync(path) {
<ide> try {
<ide> path = toPathIfFileURL(path);
<ide>... | 1 |
PHP | PHP | return entire string if search is not found | 1509e58ad15fc1a59b44d7804f29be00024e3eff | <ide><path>src/Illuminate/Support/Str.php
<ide> class Str
<ide> public static function after($subject, $search)
<ide> {
<ide> if (! static::contains($subject, $search)) {
<del> return '';
<add> return $subject;
<ide> }
<ide>
<ide> $searchEndPos = strpos($subject, $... | 3 |
Ruby | Ruby | use set.new instead of array#to_set | 9628a613cfe75669c180bf78d086f0372efce30e | <ide><path>Library/Homebrew/metafiles.rb
<ide>
<ide> class Metafiles
<ide> # https://github.com/github/markup#markups
<del> EXTENSIONS = %w[
<add> EXTENSIONS = Set.new %w[
<ide> .adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn
<ide> .org .pod .rdoc .rst .rtf .textile .txt .wiki
<del... | 1 |
Javascript | Javascript | unify stream utils | bb275ef2a4105c3a66920f64d32c5a024a14921f | <ide><path>lib/_http_client.js
<ide> const {
<ide> prepareError,
<ide> } = require('_http_common');
<ide> const { OutgoingMessage } = require('_http_outgoing');
<del>const { kDestroy } = require('internal/streams/destroy');
<ide> const Agent = require('_http_agent');
<ide> const { Buffer } = require('buffer');
<ide> ... | 10 |
Javascript | Javascript | avoid hostname spoofing w/ javascript protocol | b77f699a84219702ccef6387882c0fdcb58529bb | <ide><path>lib/url.js
<ide> Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
<ide> if (slashesDenoteHost || proto || hostPattern.test(rest)) {
<ide> var slashes = rest.charCodeAt(0) === CHAR_FORWARD_SLASH &&
<ide> rest.charCodeAt(1) === CHAR_FORWARD_SLASH;
<del> ... | 2 |
Python | Python | use the old clone loss name instead | 289b439308be829db258d5b1bb33a6de03769e57 | <ide><path>slim/deployment/model_deploy.py
<ide> def _gather_clone_loss(clone, num_clones, regularization_losses):
<ide> sum_loss = tf.add_n(all_losses)
<ide> # Add the summaries out of the clone device block.
<ide> if clone_loss is not None:
<del> tf.summary.scalar('clone_loss', clone_loss)
<add> tf.su... | 1 |
Ruby | Ruby | add didyoumean for parametermissing | 5411565d44d9a60ed00ba3158abcb6ed80129b33 | <ide><path>actionpack/lib/action_controller/metal/strong_parameters.rb
<ide> module ActionController
<ide> # params.require(:a)
<ide> # # => ActionController::ParameterMissing: param is missing or the value is empty: a
<ide> class ParameterMissing < KeyError
<del> attr_reader :param # :nodoc:
<add> attr... | 2 |
Javascript | Javascript | use relative imports in ember-htmlbars | 94d379d95f992c395ffae407d7df92589c7cc0a5 | <ide><path>packages/ember-htmlbars/lib/env.js
<ide> import { hooks } from 'htmlbars-runtime';
<ide> import assign from 'ember-metal/assign';
<ide> import isEnabled from 'ember-metal/features';
<ide>
<del>import subexpr from 'ember-htmlbars/hooks/subexpr';
<del>import concat from 'ember-htmlbars/hooks/concat';
<del>imp... | 38 |
Ruby | Ruby | mailgun copes with a 204 response status | 96f8ca37fb47062e0cdc9e3a2765dfe58dcb6770 | <ide><path>app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb
<ide> class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ActionMailbox
<ide>
<ide> def create
<ide> ActionMailbox::InboundEmail.create_and_extract_message_id! params.require("body-mime")
<del> head :ok
<id... | 1 |
Text | Text | use dashes instead of asterisks | 9ca4ab13171f2148a986062ac564161a1f6e124f | <ide><path>doc/guides/writing-tests.md
<ide> const freelist = require('internal/freelist');
<ide>
<ide> When writing assertions, prefer the strict versions:
<ide>
<del>* `assert.strictEqual()` over `assert.equal()`
<del>* `assert.deepStrictEqual()` over `assert.deepEqual()`
<add>- `assert.strictEqual()` over `assert.... | 2 |
Javascript | Javascript | support null titles in alertios | d726c2c8ca328f51d345c71608f9259b51d3e95e | <ide><path>Libraries/Alert/AlertIOS.js
<ide> class AlertIOS {
<ide> * Create and display a popup alert.
<ide> * @static
<ide> * @method alert
<del> * @param title The dialog's title.
<del> *
<del> * An empty string hides the title.
<add> * @param title The dialog's title. Passing null or '' will hid... | 1 |
Javascript | Javascript | remove `previouspagenumber` from the b2g viewer | e65606d271a097ec81c6a14b0c751fc9cc81835d | <ide><path>extensions/b2g/viewer.js
<ide> var PDFViewerApplication = {
<ide>
<ide> container.addEventListener('pagechange', function (evt) {
<ide> var page = evt.pageNumber;
<del> if (evt.previousPageNumber !== page) {
<del> document.getElementById('pageNumber').value = page;
<del> }
<ide> ... | 1 |
Javascript | Javascript | resolve merge conflict in handlebars unit tests | e5b8957890820f2bac7b8cb551d6cd90207cd278 | <ide><path>packages/sproutcore-handlebars/lib/helpers/binding.js
<ide> var get = SC.get, getPath = SC.getPath, fmt = SC.String.fmt;
<ide> inverseTemplate: inverse,
<ide> property: property,
<ide> previousContext: ctx,
<del> isEscaped: options.hash.escaped
<add> isEscaped: options.h... | 2 |
Java | Java | fix regression in abstractjackson2encoder | 1afc1fc90d4f4b6df80c5aa384c2a47e01da6345 | <ide><path>spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java
<ide> public Flux<DataBuffer> encode(Publisher<?> inputStream, DataBufferFactory buffe
<ide> bufferFactory.join(Arrays.asList(bufferFactory.wrap(prefix), dataBuffer)) :
<ide> dataBuffer);
<ide> ... | 2 |
Java | Java | enforce jdk version on ci server | 6fe50b502fa2a564692be3419d7f21d96b6c5f64 | <ide><path>spring-core/src/test/java/org/springframework/tests/BuildTests.java
<add>/*
<add> * Copyright 2002-2013 the original author or authors.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> * you may not use this file except in compliance with the License.
<add> * You may obta... | 3 |
Javascript | Javascript | improve getstringwidth performance | 2e82982984a595af24ffb260ff22eb0a73b075c7 | <ide><path>lib/internal/util/inspect.js
<ide> function formatWithOptionsInternal(inspectOptions, ...args) {
<ide> return str;
<ide> }
<ide>
<del>function prepareStringForGetStringWidth(str, removeControlChars) {
<del> str = str.normalize('NFC');
<del> if (removeControlChars)
<del> str = stripVTControlCharacters... | 1 |
Text | Text | update callbacks documentation | 59406a7148bac8c88ebb59a8c404d12016d926d5 | <ide><path>docs/sources/callbacks.md
<ide> keras.callbacks.Callback()
<ide> - __on_batch_end__(batch, logs={}): Method called at the end of batch `batch`.
<ide>
<ide> The `logs` dictionary will contain keys for quantities relevant to the current batch or epoch. Currently, the `.fit()` method of the `Sequential` mo... | 1 |
PHP | PHP | use json_throw_on_error for php 7.3+ | 1d16890cdc61d47169d38dc5735039e8a94b8aab | <ide><path>src/View/JsonView.php
<ide> protected function _serialize($serialize): string
<ide> $jsonOptions |= JSON_PRETTY_PRINT;
<ide> }
<ide>
<add> if (defined('JSON_THROW_ON_ERROR')) {
<add> $jsonOptions |= JSON_THROW_ON_ERROR;
<add> }
<add>
<ide> $return = json_... | 1 |
Javascript | Javascript | fix future relativetime altering unrelated strings | 303882604f988a47080838c3e5d16bc6b5ac5456 | <ide><path>src/locale/ka.js
<ide> export default moment.defineLocale('ka', {
<ide> },
<ide> relativeTime: {
<ide> future: function (s) {
<del> return /(წამი|წუთი|საათი|წელი)/.test(s)
<del> ? s.replace(/ი$/, 'ში')
<del> : s + 'ში';
<add> return s.replac... | 1 |
Ruby | Ruby | prevent minitest from printing a --seed run option | c15862ae0cb876d745609170f0f90a9bb9b5e0ae | <ide><path>activesupport/lib/active_support/test_case.rb
<ide> rescue LoadError
<ide> end
<ide>
<add># FIXME: We force sorted test order below, but minitest includes --seed SEED in
<add># the printed run options, which could be misleading, since users could assume
<add># from that trace that tests are being randomized... | 1 |
PHP | PHP | add some methods for manipulating middleware | 6f33feba124d4a7ff2af4f3ed18583d67fb68f7c | <ide><path>src/Illuminate/Foundation/Http/Kernel.php
<ide> use Illuminate\Routing\Pipeline;
<ide> use Illuminate\Routing\Router;
<ide> use Illuminate\Support\Facades\Facade;
<add>use InvalidArgumentException;
<ide> use Symfony\Component\Debug\Exception\FatalThrowableError;
<ide> use Throwable;
<ide>
<ide> public funct... | 1 |
Go | Go | fix compilation on darwin | 2b55874584f034b5113359ced6b05c143d31e03c | <ide><path>utils/uname_darwin.go
<ide> package utils
<ide>
<ide> import (
<ide> "errors"
<del> "syscall"
<ide> )
<ide>
<del>func uname() (*syscall.Utsname, error) {
<add>type Utsname struct {
<add> Release [65]byte
<add>}
<add>
<add>func uname() (*Utsname, error) {
<ide> return nil, errors.New("Kernel version detec... | 2 |
Mixed | Javascript | check input in defaultmaxlisteners | 221b03ad20453f08cef7ac3fcc788b8466edc3ef | <ide><path>doc/api/events.md
<ide> By default, a maximum of `10` listeners can be registered for any single
<ide> event. This limit can be changed for individual `EventEmitter` instances
<ide> using the [`emitter.setMaxListeners(n)`][] method. To change the default
<ide> for *all* `EventEmitter` instances, the `EventEm... | 3 |
PHP | PHP | fix validation of ipv6 on ipv4 checks | 1302fba6326f854f3a587da421a0374c64f8dca5 | <ide><path>cake/libs/validation.php
<ide> function extension($check, $extensions = array('gif', 'jpeg', 'png', 'jpg')) {
<ide> }
<ide>
<ide> /**
<del> * Validation of an IPv4 address.
<add> * Validation of an IP address.
<add> *
<add> * Valid IP version strings for type restriction are:
<add> * - both: Check both IPv... | 2 |
Ruby | Ruby | broaden refute_predicate nudge | a0f48619341c2cf6f1980a019bcd4005cf066e21 | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def line_problems(line, _lineno)
<ide> problem "Use `assert_predicate <path_to_file>, :exist?` instead of `#{Regexp.last_match(1)}`"
<ide> end
<ide>
<del> if line =~ /assert !File\.exist\?/
<del> problem "Use `refute_predicate <path_to_file>, :exist?... | 1 |
Java | Java | add test to corner potential bug with @cacheevict | 0053319c6279a55094a723dc5fc0955b901cfd1c | <ide><path>org.springframework.context/src/test/java/org/springframework/cache/annotation/AnnotationCacheOperationSourceTest.java
<ide> public void singleStereotype() {
<ide> @EvictBar
<ide> public void multipleStereotype() {
<ide> }
<add>
<add> @Caching(cacheable = { @Cacheable(value = "test", key = "a"), @Cach... | 2 |
Python | Python | check like= type for __array_function__ | 5a3180cf8513910208e1653e40d9b8722d1c8756 | <ide><path>numpy/core/overrides.py
<ide> def set_array_function_like_doc(public_api):
<ide>
<ide>
<ide> def array_function_dispatch_like(func, *args, **kwargs):
<del> if not hasattr(kwargs['like'], '__array_function__'):
<add> if not hasattr(type(kwargs['like']), '__array_function__'):
<ide> raise TypeE... | 1 |
Mixed | Text | improve changelog entry from [ci skip] | b1c72a3675d57a3a575563acbc120d125d2c667b | <ide><path>actionpack/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<del>* Fix `image_alt` method to work with underscored or hyphenated file names.
<del> Currently, underscored filenames become
<del> `<img alt="A_long_file_name_with_underscores"` in HTML, which is
<del> poor for accessibility; ... | 2 |
PHP | PHP | fix cookie decryption when using psr7 | c7704bea42ee1db02dea0acebc4ec0285ba7544e | <ide><path>src/Http/ResponseTransformer.php
<ide> protected static function parseCookies(array $cookieHeader)
<ide> }
<ide>
<ide> list($name, $value) = explode('=', array_shift($parts), 2);
<del> $parsed = compact('name', 'value');
<add> $parsed = compact('name') + ['value... | 3 |
Javascript | Javascript | fix beautify test | 1fa2ba750cf873bc1d2f8316501dd20b102e256c | <ide><path>bin/webpack.js
<ide> function processOptions(options) {
<ide> if(!options.exitByHelpOrVersion && !validationErrorOcurred) {
<ide> processOptions(options);
<ide> }
<del> | 1 |
Text | Text | revise ci text in collaborator guide | 67bc0ec7ac9054358b57c13e711deae7cb62aed3 | <ide><path>doc/guides/collaborator-guide.md
<ide> the comment anyway to avoid any doubt.
<ide> All fixes must have a test case which demonstrates the defect. The test should
<ide> fail before the change, and pass after the change.
<ide>
<del>Do not land any pull requests without a passing (green or yellow) CI run.
<de... | 1 |
Javascript | Javascript | add e2e testing of command | ecec4319c4fda9bebc90216d5340442b2a5725df | <ide><path>local-cli/__mocks__/fs.js
<ide> fs.readdir.mockImplementation((filepath, callback) => {
<ide> return callback(null, Object.keys(node));
<ide> });
<ide>
<del>fs.readFile.mockImplementation(function(filepath, encoding, callback) {
<del> filepath = path.normalize(filepath);
<del> callback = asyncCallback(c... | 2 |
Python | Python | fix endianness in unstuctured_to_structured test | ae6ac2e085635e383a38cc43e85edec39aa6e8d3 | <ide><path>numpy/lib/tests/test_recfunctions.py
<ide> def test_structured_to_unstructured(self):
<ide> ( 5, ( 6., 7), [ 8., 9.]),
<ide> (10, (11., 12), [13., 14.]),
<ide> (15, (16., 17), [18., 19.])],
<del> dtype=[('a', '<i... | 1 |
Javascript | Javascript | unify import syntax for turbomoduleregistry | 0e72137c99b6493e6f015d7a0a6976a73e07faca | <ide><path>Libraries/TurboModule/samples/NativeSampleTurboModule.js
<ide> 'use strict';
<ide>
<ide> import type {TurboModule} from 'RCTExport';
<del>import {getEnforcing} from 'TurboModuleRegistry';
<add>import * as TurboModuleRegistry from 'TurboModuleRegistry';
<ide>
<ide> export interface Spec extends TurboModule ... | 1 |
Javascript | Javascript | improve assertion fail messages | 0ce54a7ec96431a088a15a5e24614428184497f0 | <ide><path>test/parallel/test-stream-inheritance.js
<ide> assert.ok(!(undefined instanceof Writable));
<ide>
<ide> // Simple inheritance check for `Writable` works fine in a subclass constructor.
<ide> function CustomWritable() {
<del> assert.ok(this instanceof Writable, 'inherits from Writable');
<del> assert.ok(th... | 1 |
PHP | PHP | fix cs error | c302b9fd4b356bb0b2936174327ce083c657cc62 | <ide><path>src/Mailer/Email.php
<ide> public function createFromArray($config)
<ide> /**
<ide> * Serializes the Email object.
<ide> *
<del> * @return void.
<add> * @return string
<ide> */
<ide> public function serialize()
<ide> {
<ide><path>src/View/ViewBuilder.php
<ide> public functi... | 2 |
Ruby | Ruby | show the new short-form in an example | f9a4cf15627ba0c905bf0ab3de2b49b515ac197d | <ide><path>railties/lib/rails/generators/rails/app/templates/config/routes.rb
<ide> # first created -> highest priority.
<ide>
<ide> # Sample of regular route:
<del> # match 'products/:id', :to => 'catalog#view'
<add> # match 'products/:id' => 'catalog#view'
<ide> # Keep in mind you can assign values other... | 1 |
Ruby | Ruby | use consistent order of the arguments | fe21c8589fc44d3e08fb45baa4da8321a7c8f00c | <ide><path>railties/lib/rails/generators/app_base.rb
<ide> def comment_if(value)
<ide> options[value] ? '# ' : ''
<ide> end
<ide>
<del> class GemfileEntry < Struct.new(:name, :comment, :version, :options, :commented_out)
<del> def initialize(name, comment, version, options = {}, commented_out... | 1 |
Javascript | Javascript | move wip fibers to childinprogress | af7dd8e0a13600870a18b244608cfa37da5ae21c | <ide><path>src/renderers/noop/ReactNoop.js
<ide> var ReactNoop = {
<ide>
<ide> function logFiber(fiber : Fiber, depth) {
<ide> console.log(
<del> ' '.repeat(depth) + '- ' + (fiber.type ? fiber.type.name || fiber.type : '[root]'),
<add> ' '.repeat(depth) + '- ' + (fiber.type ? fiber.type.name... | 9 |
Python | Python | add restore functions to numpy.dual | 6a30aaf84be313b29a4072ec3357ff5e4a6b2d74 | <ide><path>numpy/dual.py
<ide> def restore_func(name):
<ide> if name not in __all__:
<ide> raise ValueError, "%s not a dual function." % name
<ide> try:
<del> sys._getframe(0).f_globals[name] = _restore_dict[name]
<add> val = _restore_dict[name]
<ide> except KeyError:
<del> pass... | 1 |
PHP | PHP | remove meaningless code | 727a0e409b6ca477994078b7b805e92a38fa3e83 | <ide><path>src/Utility/Hash.php
<ide> protected static function _simpleOp($op, $data, $path, $values = null)
<ide> $count = count($path);
<ide> $last = $count - 1;
<ide> foreach ($path as $i => $key) {
<del> if ((is_numeric($key) && (int)$key > 0 || $key === '0') &&
<del> ... | 1 |
Text | Text | add changelog for fix [skip ci] | 4e757746a626ead999c4cabf443d3b683ac34ffc | <ide><path>activerecord/CHANGELOG.md
<add>* Dont enroll records in the transaction if they dont have commit callbacks.
<add> That was causing a memory grow problem when creating a lot of records inside a transaction.
<add>
<add> Fixes #15549.
<add>
<add> *Will Bryant*, *Aaron Patterson*
<add>
<ide> * Corre... | 1 |
Go | Go | move inspect into the loop on inspectexecid test | f06620ece3557eb263b221e476cef2955235ba75 | <ide><path>integration-cli/docker_cli_exec_test.go
<ide> func (s *DockerSuite) TestInspectExecID(c *check.C) {
<ide> c.Fatalf("failed to start the exec cmd: %q", err)
<ide> }
<ide>
<del> // Since its still running we should see the exec as part of the container
<del> out, err = inspectField(id, "ExecIDs")
<del> if ... | 1 |
Ruby | Ruby | permit weak imports in go reverse deps | 3c6529851991eed20c75ba4661a1734d8a889468 | <ide><path>Library/Homebrew/build.rb
<ide> def install
<ide>
<ide> ENV.activate_extensions!
<ide>
<add> # Go makes extensive use of weak imports.
<add> if formula_deps.any? { |f| f.name == "go" }
<add> ENV.permit_weak_imports
<add> end
<add>
<ide> if superenv?
<ide> ENV.keg_only_deps = keg... | 1 |
Go | Go | create internal directory | 204ce3e31d4ec7275fc58032740a82f6bd656466 | <ide><path>libnetwork/diagnostic/server.go
<ide> import (
<ide> "sync/atomic"
<ide>
<ide> stackdump "github.com/docker/docker/pkg/signal"
<del> "github.com/docker/libnetwork/common"
<add> "github.com/docker/libnetwork/internal/caller"
<ide> "github.com/sirupsen/logrus"
<ide> )
<ide>
<ide> func notImplemented(ctx i... | 11 |
Javascript | Javascript | add missing semicolon | 54551f17730eaf164416fc6019211194085bd628 | <ide><path>examples/js/BufferGeometryUtils.js
<ide> THREE.BufferGeometryUtils = {
<ide>
<ide> if ( isIndexed ) {
<ide>
<del> count = geometry.index.count
<add> count = geometry.index.count;
<ide>
<ide> } else if ( geometry.attributes.position !== undefined ) {
<ide> | 1 |
PHP | PHP | remove unused property from validator | 46bf67aeedeeab5bdba33c9578bdebef0014f6ee | <ide><path>laravel/validator.php
<ide> class Validator {
<ide> */
<ide> protected $size_rules = array('size', 'between', 'min', 'max');
<ide>
<del> /**
<del> * The inclusion related validation rules.
<del> *
<del> * @var array
<del> */
<del> protected $inclusion_rules = array('in', 'not_in', 'mimes');
<del>
<id... | 1 |
Text | Text | remove duplicate template | 14308b0958995b118a77c3169099634736a0b342 | <ide><path>.github/ISSUE_TEMPLATE/bug-report--issues-with-coding-challenge.md
<del>---
<del>name: 'Bug Report: Issues with Coding challenge'
<del>about: Reporting issue with a specific challenge, like broken tests, unclear instructions.
<del>
<del>---
<del>
<del><!--
<del>NOTE: If you're reporting a security issue, do... | 1 |
Ruby | Ruby | reduce hash creation in formhelper | cade89e034ae7bc37422f4a0b395559e7fc2ec81 | <ide><path>actionview/lib/action_view/helpers/form_helper.rb
<ide> def emitted_hidden_id? # :nodoc:
<ide>
<ide> private
<ide> def objectify_options(options)
<del> @default_options.merge(options.merge(object: @object))
<add> result = @default_options.merge(options)
<add> result[... | 1 |
Python | Python | update a number of example scripts | 803e2869c76c5c73bfe1fbf6ab4af269b4a0d551 | <ide><path>examples/addition_rnn.py
<ide>
<ide> Five digits inverted:
<ide> + One layer LSTM (128 HN), 550k training examples = 99% train/test accuracy in 30 epochs
<del>
<ide> '''
<ide>
<ide> from __future__ import print_function
<ide> from keras.models import Sequential
<del>from keras.engine.training import slice_... | 7 |
Go | Go | move network settings into separate file | f00ca72baa6c43de35d622caa728587a752d6e5e | <ide><path>runtime/container.go
<ide> type Container struct {
<ide> activeLinks map[string]*links.Link
<ide> }
<ide>
<del>// FIXME: move deprecated port stuff to nat to clean up the core.
<del>type PortMapping map[string]string // Deprecated
<del>
<del>type NetworkSettings struct {
<del> IPAddress string
<del> IPPr... | 2 |
PHP | PHP | remove unneeded test | 80cc5fd606afc2afd3d89f6e1636c5fc2e0dd296 | <ide><path>tests/Database/DatabaseQueryBuilderTest.php
<ide> public function testQuickPaginateCorrectlyCreatesPaginatorInstance()
<ide> }
<ide>
<ide>
<del> public function testGetPaginationCountGetsResultCountWithSelectDistinct()
<del> {
<del> unset($_SERVER['orders']);
<del> $builder = $this->getBuilder();
<del> ... | 1 |
Go | Go | unify the defer syntax | 6a3d1e3e3e076724a92ffd589b66010afbce8c58 | <ide><path>client/container_inspect.go
<ide> func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (ty
<ide> if err != nil {
<ide> return types.ContainerJSON{}, wrapResponseError(err, serverResp, "container", containerID)
<ide> }
<add> defer ensureReaderClosed(serverResp)
<ide>
<ide> var re... | 1 |
Python | Python | add support for digitalocean spaces sgp1 region | d649a2be5b3f28d5921f5e8a826d20edd3e6b45e | <ide><path>libcloud/storage/drivers/digitalocean_spaces.py
<ide> ]
<ide>
<ide> DO_SPACES_HOSTS_BY_REGION = {'nyc3': 'nyc3.digitaloceanspaces.com',
<del> 'ams3': 'ams3.digitaloceanspaces.com'}
<add> 'ams3': 'ams3.digitaloceanspaces.com',
<add> ... | 1 |
Ruby | Ruby | remove unused blue color | 153e16ac770f865853dd8379f4053d7a21b67d74 | <ide><path>railties/lib/rails/test_unit/reporter.rb
<ide> class TestUnitReporter < Minitest::StatisticsReporter
<ide> COLOR_CODES = {
<ide> red: 31,
<ide> green: 32,
<del> yellow: 33,
<del> blue: 34
<add> yellow: 33
<ide> }
<ide>
<ide> def record(result) | 1 |
PHP | PHP | add a shell commend to list loaded plugins | 9ec101c759bbf3a1a60d0d93c8661b42ddc99426 | <ide><path>src/Shell/PluginShell.php
<ide> namespace Cake\Shell;
<ide>
<ide> use Cake\Console\Shell;
<add>use Cake\Core\Plugin;
<ide>
<ide> /**
<ide> * Shell for tasks related to plugins.
<ide> class PluginShell extends Shell
<ide> 'Unload',
<ide> ];
<ide>
<add> /**
<add> * @return void
<add> ... | 1 |
Javascript | Javascript | remove some duplicate conditions | 4d12812bb4b8ffd04e6587f075b5c5036b612ac6 | <ide><path>test/e2e/tools/fixture.js
<ide> function generateFixture(test, query) {
<ide> }
<ide> });
<ide>
<del> if (jquery && (!('jquery' in query) || (/^(0|no|false|off|n)$/i).test(query.jquery))) {
<del> $(jquery).remove();
<del> } else if ('jquery' in query) {
<del> if ((/^(0|no|false|off|n)$/i).test... | 1 |
PHP | PHP | add additional test coverage to shelltask | 2c44702ef2ff62106cc027129fb35f90604550f8 | <ide><path>tests/TestCase/Console/Command/Task/SimpleBakeTaskTest.php
<ide> public function subclassProvider() {
<ide> ['Cake\Console\Command\Task\BehaviorTask'],
<ide> ['Cake\Console\Command\Task\ComponentTask'],
<ide> ['Cake\Console\Command\Task\HelperTask'],
<add> ['Cake\Console\Command\Task\ShellTask'],
... | 1 |
Java | Java | expose jsresponderhandler api in fabric uimanager | 470ace0932bab425348304928a83a9b92ccb7cf2 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java
<ide> <T extends View> int addRootView(
<ide> */
<ide> void dispatchCommand(int reactTag, String commandId, @Nullable ReadableArray commandArgs);
<ide>
<del> void setJSResponder(int reactTag, boolean blockNativeResponder);
<del>
<del>... | 3 |
Javascript | Javascript | fix modal actions | a73ba4b3af65ff392a05fe09f656a91b51401c4d | <ide><path>airflow/www/static/js/dag.js
<ide> export function callModal(t, d, extraLinks, tryNumbers, sd) {
<ide> export function callModalDag(dag) {
<ide> $('#dagModal').modal({});
<ide> $('#dagModal').css('margin-top', '0');
<add> executionDate = dag.execution_date;
<ide> updateButtonUrl(buttons.dag_graph_view... | 1 |
Python | Python | unflake optimizer test | 3bf913dc35596015c736e56458042be65859e682 | <ide><path>tests/keras/test_optimizers.py
<ide> from __future__ import print_function
<ide> import pytest
<add>import numpy as np
<add>np.random.seed(1337)
<ide>
<ide> from keras.utils.test_utils import get_test_data
<ide> from keras.optimizers import SGD, RMSprop, Adagrad, Adadelta, Adam, Adamax, Nadam | 1 |
Ruby | Ruby | allow symbols as name | 4d0780e9c796aab7c70dc138fea4374eb73b16cf | <ide><path>actionpack/lib/action_view/helpers/form_tag_helper.rb
<ide> def check_box_tag(name, value = "1", checked = false, options = {})
<ide> # # => <input checked="checked" class="color_input" id="color_green" name="color" type="radio" value="green" />
<ide> def radio_button_tag(name, value, checked =... | 1 |
Python | Python | fix mypy errors at bfs_zero_one_shortest_path | 86baec0bc9d790e2be6f49492e2e4f0f788060af | <ide><path>graphs/bfs_zero_one_shortest_path.py
<ide> from collections import deque
<add>from collections.abc import Iterator
<ide> from dataclasses import dataclass
<del>from typing import Iterator, List
<add>from typing import Optional, Union
<ide>
<ide> """
<ide> Finding the shortest path in 0-1-graph in O(E + V) w... | 1 |
Python | Python | update save_model function | d03a41b4262e6aab8ad56cd8395808cacf5921e3 | <ide><path>keras/models.py
<ide> def get_json_type(obj):
<ide> if not proceed:
<ide> return
<ide>
<del> f = h5py.File(filepath, 'w')
<del> f.attrs['keras_version'] = str(keras_version).encode('utf8')
<del> f.attrs['backend'] = K.backend().encode('utf8')
<del> f.attrs['model_config'] = j... | 1 |
Python | Python | add tests for "_get_standard_range_str" method | 6b92599eb92d813860f96f7ca43e69b8e577e99d | <ide><path>libcloud/test/storage/test_base.py
<ide> def test_upload_object_via_stream_illegal_seek_errors_are_ignored(self):
<ide> request_path='/',
<ide> stream=iterator)
<ide>
<add> def test_get_standard_range_str(self):
<add> result = self.driv... | 1 |
PHP | PHP | replace is_a with instanceof | 88604ac757198dbb2db55bd69e91060904c7b442 | <ide><path>lib/Cake/View/Helper/JsHelper.php
<ide> public function __call($method, $params) {
<ide> $this->buffer($out);
<ide> return null;
<ide> }
<del> if (is_object($out) && is_a($out, 'JsBaseEngineHelper')) {
<add> if (is_object($out) && $out instanceof JsBaseEngineHelper) {
<ide> return $this;
<... | 1 |
Ruby | Ruby | remove argv usage | 25009f94e72ee69e982e832c15e8a8e27893d999 | <ide><path>Library/Homebrew/cmd/list.rb
<ide> def filtered_list(args:)
<ide>
<ide> def list_casks(args:)
<ide> cask_list = Cask::Cmd::List.new args.named
<del> cask_list.one = ARGV.include? "-1"
<add> cask_list.one = args.public_send(:'1?')
<ide> cask_list.versions = args.versions?
<ide> cask_list.... | 1 |
Text | Text | fix notable changes for v13.9.0 | 31290824de068eb4b282ab74829450b988ae225b | <ide><path>doc/changelogs/CHANGELOG_V13.md
<ide>
<ide> ### Notable changes
<ide>
<del>* [[`6be51296e4`](https://github.com/nodejs/node/commit/6be51296e4)] - **(SEMVER-MINOR)** **async_hooks**: add executionAsyncResource (Matteo Collina) [#30959](https://github.com/nodejs/node/pull/30959)
<del>* [[`15b24b71ce`](https:... | 1 |
Text | Text | correct config.host_authorization reference | ef291097fce773744f297599304373adabcb13fa | <ide><path>guides/source/configuring.md
<ide> Rails.application.config.hosts << ".product.com"
<ide> ```
<ide>
<ide> You can exclude certain requests from Host Authorization checks by setting
<del>`config.host_configuration.exclude`:
<add>`config.host_authorization.exclude`:
<ide>
<ide> ```ruby
<ide> # Exclude reques... | 1 |
Java | Java | recognize content-type as special header in mhsrb | 8b35c3ff74347f32194149ec91773c4eb2eb21ea | <ide><path>spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java
<ide> /*
<del> * Copyright 2002-2013 the original author or authors.
<add> * Copyright 2002-2014 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "Lic... | 2 |
Python | Python | make sdist use distutils | fed2509471e77e0357c5252e69fc6159881f6cb2 | <ide><path>setup.py
<ide> os.remove('MANIFEST')
<ide>
<ide> # We need to import setuptools here in order for it to persist in sys.modules.
<del># Its presence/absence is used in subclassing setup in numpy/distutils/core.py,
<del># which may not be the most robust design.
<add># Its presence/absence is used in subc... | 1 |
Javascript | Javascript | fix port validation | 53cd3d8bab6e79a109565aafe2bed2c9ff4e9dd6 | <ide><path>lib/internal/errors.js
<ide> E('ERR_SOCKET_BAD_PORT', (name, port, allowZero = true) => {
<ide> assert(typeof allowZero === 'boolean',
<ide> "The 'allowZero' argument must be of type boolean.");
<ide> const operator = allowZero ? '>=' : '>';
<del> return `${name} should be ${operator} 0 and < 6... | 2 |
Text | Text | fix text to follow portuguese language syntax | d62a520dd7ed565aa521bc1d18f659e8f2efd48a | <ide><path>curriculum/challenges/portuguese/01-responsive-web-design/css-flexbox/use-display-flex-to-position-two-boxes.portuguese.md
<ide> localeTitle: 'Use display: flex para posicionar duas caixas'
<ide> ---
<ide>
<ide> ## Description
<del><section id="description"> Esta seção usa estilos de desafio alternados para... | 1 |
Java | Java | use list.sort instead of collection.sort in tests | 523d2f88be9f2087b058f45f7830f8f2b8d5707e | <ide><path>spring-core/src/test/java/org/springframework/core/annotation/OrderSourceProviderTests.java
<ide> void plainComparator() {
<ide> C c2 = new C(-5);
<ide> items.add(c);
<ide> items.add(c2);
<del> Collections.sort(items, comparator);
<add> items.sort(comparator);
<ide> assertOrder(items, c2, c);
<ide>... | 3 |
Text | Text | move inactive collaborators to emeriti | e6a55b4391aaaa6ddbf373e2b1fd8e90c2609a9c | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Сковорода Никита Андреевич** <chalkerx@gmail.com> (he/him)
<ide> * [cjihrig](https://github.com/cjihrig) -
<ide> **Colin Ihrig** <cjihrig@gmail.com> (he/him)
<del>* [claudiorodriguez](https://github.com/claud... | 1 |
PHP | PHP | apply fixes from styleci | 6cece2455c5894f4bd6202747fce244cc6c693f2 | <ide><path>src/Illuminate/Routing/RedirectController.php
<ide> public function __invoke(Request $request, UrlGenerator $url)
<ide> $destination = $parameters->pop();
<ide>
<ide> $route = (new Route('GET', $destination, [
<del> 'as' => 'laravel_route_redirect_destination'
<add> 'as... | 1 |
Javascript | Javascript | remove unused parameters | 80587bb68dd7a1b5d6bea2f70b0362378bf27a62 | <ide><path>src/core/core.controller.js
<ide> helpers.extend(Chart.prototype, /** @lends Chart */ {
<ide> easing: config.easing || animationOptions.easing,
<ide>
<ide> render: function(chart, animationObject) {
<del> var easingFunction = helpers.easing.effects[animationObject.easing];
<del> var currentS... | 1 |
Text | Text | add changelog entry | 4d4440c5a86fc1611b0a236b3253aa3339366788 | <ide><path>actionpack/CHANGELOG.md
<ide>
<ide> *Adam Forsyth*
<ide>
<add>* Allow `Bearer` as token-keyword in `Authorization-Header`.
<add>
<add> Aditionally to `Token`, the keyword `Bearer` is acceptable as a keyword
<add> for the auth-token. The `Bearer` keyword is described in the original
<add> OAu... | 1 |
Ruby | Ruby | remove useless `new` implementation | ef2d7a69ece612762c199dc1a7fca0ff49400b45 | <ide><path>actionpack/lib/action_dispatch/testing/test_request.rb
<ide> class TestRequest < Request
<ide> "rack.request.cookie_hash" => {}.with_indifferent_access
<ide> )
<ide>
<del> def self.new(env = {})
<del> super
<del> end
<del>
<ide> def initialize(env = {})
<ide> env = Rails.appli... | 1 |
Java | Java | add shortcut in testgenerationcontext | c5fc0a5ef3fb85a69fd8d9f92c86a2798344df98 | <ide><path>spring-core-test/src/main/java/org/springframework/aot/test/generate/TestGenerationContext.java
<ide> public TestGenerationContext(ClassNameGenerator classNameGenerator) {
<ide>
<ide> /**
<ide> * Create an instance using the specified {@code target}.
<del> * @param target the default target class to use... | 1 |
PHP | PHP | use crlf in mail headers | 931c7528e983b224357b62aa72fe1face9522749 | <ide><path>src/Mailer/Transport/MailTransport.php
<ide> public function send(Message $message): array
<ide> $to = $message->getHeaders(['to'])['To'];
<ide> $to = str_replace("\r\n", '', $to);
<ide>
<del> $eol = $this->getConfig('eol', PHP_EOL);
<add> $eol = $this->getConfig('eol', "\r\n")... | 2 |
Javascript | Javascript | improve the extractinfo code to be more robust | ae2d130f40fda83f24c3222e953e448864e190f2 | <ide><path>fonts.js
<ide> var Type1Parser = function() {
<ide> * extracted from and eexec encrypted block of data
<ide> */
<ide> this.extractFontProgram = function t1_extractFontProgram(stream) {
<del> var eexecString = decrypt(stream, kEexecEncryptionKey, 4);
<del> var subrs = [], glyphs = [];
<del> ... | 1 |
Java | Java | add reflection hints for httpentity | 93b340e5633d623e0899dd296bda7ce86ce02b20 | <ide><path>spring-core/src/main/java/org/springframework/aot/hint/support/BindingReflectionHintsRegistrar.java
<ide> import org.springframework.core.KotlinDetector;
<ide> import org.springframework.core.MethodParameter;
<ide> import org.springframework.core.ResolvableType;
<add>import org.springframework.lang.Nullable;... | 3 |
Javascript | Javascript | deprecate the non-block params {{with}} syntax | 99854697b6e88f58bf85e1acc5e5f8a80b3ecd1a | <ide><path>packages/ember-htmlbars/lib/helpers/with.js
<ide> import WithView from "ember-views/views/with_view";
<ide>
<ide> NOTE: The alias should not reuse a name from the bound property path.
<ide> For example: `{{#with foo as |foo.bar|}}` is not supported because it attempts to alias using
<del> the first par... | 8 |
Text | Text | add rafael to the tsc | e4b1be63c10729e3664caa7cf94afd868a3d0ea1 | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
<ide> * [mhdawson](https://github.com/mhdawson) -
<ide> **Michael Dawson** <<midawson@redhat.com>> (he/him)
<add>* [RafaelGSS](https://github.com/RafaelGSS) -
<a... | 1 |
Text | Text | fix the link to advanced features | ea2d8691437e09c2efc379fae57ca61ca5223709 | <ide><path>docs/recipes/ConfiguringYourStore.md
<ide> The only extra change here is that we have encapsulated our app's rendering into
<ide>
<ide> ## Next Steps
<ide>
<del>Now that you know how to encapsulate your store configuration to make it easier to maintain, you can [learn more about the advanced features Redux... | 1 |
Text | Text | fix translation problems that difficult reading | e9fae2dc10e20aad799388bf476ec2386469bc51 | <ide><path>curriculum/challenges/portuguese/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.portuguese.md
<ide> videoUrl: ''
<ide> localeTitle: Evitar problemas de daltonismo usando o contraste suficiente
<ide> ---
<ide>
<del>## Description
<del><section id="desc... | 1 |
Go | Go | add virtual-ip of an endpoint as a secondary ip | f0292e04b8333c9bd88e3a9c1e3965853b61158b | <ide><path>libnetwork/osl/interface_linux.go
<ide> type nwIface struct {
<ide> mac net.HardwareAddr
<ide> address *net.IPNet
<ide> addressIPv6 *net.IPNet
<add> ipAliases []*net.IPNet
<ide> llAddrs []*net.IPNet
<ide> routes []*net.IPNet
<ide> bridge bool
<ide> func (i *nwIface) LinkLoca... | 4 |
Python | Python | relax required version for `python-telegram-bot` | ea7e64fd4bc5245725f9fff2121e21e7b2d7fa17 | <ide><path>setup.py
<ide> def get_sphinx_theme_version() -> str:
<ide> 'tableauserverclient',
<ide> ]
<ide> telegram = [
<del> 'python-telegram-bot==13.0',
<add> 'python-telegram-bot~=13.0',
<ide> ]
<ide> trino = ['trino']
<ide> vertica = [ | 1 |
Ruby | Ruby | fix javascript syntax in code comment [ci skip] | 8a13721b8cad5cabc2d26e509d49616dc187b9b1 | <ide><path>actionpack/lib/action_view/helpers/form_helper.rb
<ide> def label(object_name, method, content_or_options = nil, options = nil, &block)
<ide> # text_field(:post, :title, class: "create_input")
<ide> # # => <input type="text" id="post_title" name="post[title]" value="#{@post.title}" class="cre... | 1 |
Javascript | Javascript | remove unnecessary else | c00903be7ac91cd9cd29c265409eea96198b32c7 | <ide><path>src/ng/interpolate.js
<ide> function $InterpolateProvider() {
<ide> if (value) {
<ide> startSymbol = value;
<ide> return this;
<del> } else {
<del> return startSymbol;
<ide> }
<add> return startSymbol;
<ide> };
<ide>
<ide> /**
<ide> function $InterpolateProvider() {
<ide> ... | 1 |
Javascript | Javascript | fix dynamic import from eval | 4ec02d5afdad4610b59fbc22ff2279e35120294e | <ide><path>lib/internal/modules/esm/loader.js
<ide> const defaultResolve = require('internal/modules/esm/default_resolve');
<ide> const createDynamicModule = require(
<ide> 'internal/modules/esm/create_dynamic_module');
<ide> const { translators } = require('internal/modules/esm/translators');
<del>const { ModuleWrap... | 3 |
PHP | PHP | register env command | 83bad25e26edf04891c1bee6de1b596c0ef94628 | <ide><path>src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
<ide> public function register()
<ide> return new EnvironmentCommand;
<ide> });
<ide>
<del> $this->commands('command.changes');
<add> $this->commands('command.changes', 'command.environment');
<ide> }
<ide>
<ide> /** | 1 |
Javascript | Javascript | exclude opera from toggle test, too (#863) | 5cfaef9ff9b121850f1e27afae6819023acadbf7 | <ide><path>src/event/eventTest.js
<ide> test("toggle(Function, Function) - add toggle event and fake a few clicks", func
<ide> fn2 = function(e) { count--; },
<ide> preventDefault = function(e) { e.preventDefault() },
<ide> link = $('#mark');
<del> if($.browser.msie)
<del> ok( false, "click() on link gets execut... | 1 |
Ruby | Ruby | simplify value logic by always typecasting | 23750b4733e1d8e7ef334d70998258d1d2e2c6c8 | <ide><path>activerecord/lib/active_record/validations/uniqueness.rb
<ide> def build_relation(klass, table, attribute, value) #:nodoc:
<ide> end
<ide>
<ide> column = klass.columns_hash[attribute.to_s]
<del>
<del> if !value.nil? && column.text? && column.limit
<del> value = value.to_s[0, ... | 1 |
Ruby | Ruby | normalize the hash of transformations | 6be1446fc7f4b159097533562920662b85155113 | <ide><path>activestorage/app/models/active_storage/variation.rb
<ide> def encode(transformations)
<ide> end
<ide>
<ide> def initialize(transformations)
<del> @transformations = transformations
<add> @transformations = transformations.deep_symbolize_keys
<ide> end
<ide>
<ide> # Accepts a File object, per... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.