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 | apply type errors from code review | ae7b2c20347e246068d93e76573225f92ecad2a9 | <ide><path>client/src/client-only-routes/ShowCertification.js
<ide> const propTypes = {
<ide> name: PropTypes.string,
<ide> certName: PropTypes.string,
<ide> certTitle: PropTypes.string,
<del> completionTime: PropTypes.string,
<add> completionTime: PropTypes.number,
<ide> date: PropTypes.string
<i... | 2 |
Javascript | Javascript | add example for the provider | 36ab132b8288a515d2e75cbb445dac5a93643f15 | <ide><path>src/ng/interpolate.js
<ide> var $interpolateMinErr = minErr('$interpolate');
<ide> * @description
<ide> *
<ide> * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
<add> *
<add> * @example
<add> <doc:example>
<add> <doc:source>
<add> <script>
<add> var myApp = an... | 1 |
PHP | PHP | replace schema with search_path in pgsql config | 195a7e03746b71e91838b73d8ed763c16985fd1c | <ide><path>config/database.php
<ide> 'charset' => 'utf8',
<ide> 'prefix' => '',
<ide> 'prefix_indexes' => true,
<del> 'schema' => 'public',
<add> 'search_path' => 'public',
<ide> 'sslmode' => 'prefer',
<ide> ],
<ide> | 1 |
Ruby | Ruby | rewrite associationcollection#find using relations | 5565bab994af1e54f34df5891c635590d22feea0 | <ide><path>activerecord/lib/active_record/associations/association_collection.rb
<ide> def find(*args)
<ide> load_target.select { |r| ids.include?(r.id) }
<ide> end
<ide> else
<del> conditions = "#{@finder_sql}"
<del> if sanitized_conditions = sanitize_sql(options[:condit... | 1 |
Javascript | Javascript | treat dates as atomic values instead of objects | 6cbbd966479448591f819cbf904e0a3b757613dc | <ide><path>src/Angular.js
<ide> function baseExtend(dst, objs, deep) {
<ide> var src = obj[key];
<ide>
<ide> if (deep && isObject(src)) {
<del> if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
<del> baseExtend(dst[key], [src], true);
<add> if (isDate(src)) {
<add> d... | 2 |
PHP | PHP | fix method order | 6b13ac843d5046a41e62cc4ff318caebd01eeef5 | <ide><path>src/Illuminate/Foundation/helpers.php
<ide> function get($uri, $action)
<ide> }
<ide> }
<ide>
<del>if ( ! function_exists('resource'))
<del>{
<del> /**
<del> * Route a resource to a controller.
<del> *
<del> * @param string $name
<del> * @param string $controller
<del> * @param array $options
<... | 1 |
Ruby | Ruby | add a global flag to silent warning when auditing | d45ff9c0fdfa834c55c01f9c95fe18064fabd76a | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> module Homebrew
<ide>
<ide> def audit
<ide> Homebrew.inject_dump_stats!(FormulaAuditor, /^audit_/) if ARGV.switch? "D"
<add> Homebrew.auditing = true
<ide>
<ide> formula_count = 0
<ide> problem_count = 0
<ide><path>Library/Homebrew/global.rb
<ide> de... | 3 |
Ruby | Ruby | add documentation for after_touch [ci skip] | 72a3dd85e415c9ec0e51d4b812b7264d4f54c75b | <ide><path>activerecord/lib/active_record/callbacks.rb
<ide> module ActiveRecord
<ide> # Check out <tt>ActiveRecord::Transactions</tt> for more details about <tt>after_commit</tt> and
<ide> # <tt>after_rollback</tt>.
<ide> #
<add> # Additionally, an <tt>after_touch</tt> callback is triggered whenever an
<add> #... | 2 |
Text | Text | fix pluralization in doc [ci skip] | f5d6aaa31bc86e01209af767d6a3c7b5617e6911 | <ide><path>guides/source/active_record_migrations.md
<ide> column names can not be derived from the table names, you can use the
<ide> `:column` and `:primary_key` options.
<ide>
<ide> Rails will generate a name for every foreign key starting with
<del>`fk_rails_` followed by 10 character which is deterministically
<a... | 1 |
Java | Java | add subjects for single, maybe and completable | d173b6d4f8713907f7a38e00da65c30abfb4a7e2 | <ide><path>src/main/java/io/reactivex/subjects/CompletableSubject.java
<add>/**
<add> * Copyright 2016 Netflix, Inc.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
<add> * compliance with the License. You may obtain a copy of the License at
<add> *
<a... | 6 |
Javascript | Javascript | handle cases where the item may be destroyed | d646f70f12c68d47ffc319e47d90e45672419d5b | <ide><path>src/workspace.js
<ide> module.exports = class Workspace extends Model {
<ide> // It's important to call handleGrammarUsed after emitting the did-add event:
<ide> // if we activate a package between adding the editor to the registry and emitting
<ide> // the package may receive the edi... | 1 |
Text | Text | fix changelog formatting | 1a6c9640001f319fffbcf77fbd934738dfa4ff87 | <ide><path>CHANGELOG.md
<ide>
<ide> - [#19472](https://github.com/emberjs/ember.js/pull/19472) [BUGFIX] Prevent transformation of block params called `attrs`
<ide>
<del>## v3.27.5 (June 10, 2021)
<add>### v3.27.5 (June 10, 2021)
<ide>
<ide> - [#19597](https://github.com/emberjs/ember.js/pull/19597) [BIGFIX] Fix `<Li... | 1 |
Javascript | Javascript | fix commandinstaller tests | 0d6b5d9e733948e9ca2bc6ff5b12ccf3d7e805d7 | <ide><path>spec/command-installer-spec.js
<ide> const path = require('path')
<ide> const fs = require('fs-plus')
<ide> const temp = require('temp').track()
<add>const {it, fit, ffit, fffit, beforeEach, afterEach} = require('./async-spec-helpers');
<ide> const CommandInstaller = require('../src/command-installer')
<ide>... | 2 |
Javascript | Javascript | add speced event.defaultprevented | f3166ad082612d156fb36fbec173105939f6c609 | <ide><path>src/js/events.js
<ide> vjs.fixEvent = function(event) {
<ide> }
<ide> event.returnValue = false;
<ide> event.isDefaultPrevented = returnTrue;
<add> event.defaultPrevented = true;
<ide> };
<ide>
<ide> event.isDefaultPrevented = returnFalse;
<add> event.defaultPrevented = fal... | 1 |
Javascript | Javascript | pass parsed request-url into the run-method | f6510c05b26934e544fad2c48c93caed7ac2de58 | <ide><path>examples/custom-server-hapi/next-wrapper.js
<ide> const pathWrapper = (app, pathName, opts) => ({ raw, query }, hapiReply) =>
<ide> app.renderToHTML(raw.req, raw.res, pathName, query, opts)
<ide> .then(hapiReply)
<ide>
<del>const defaultHandlerWrapper = app => ({ raw }, hapiReply) =>
<del>app.run(raw.req, r... | 1 |
PHP | PHP | add polymorphic many to many tests | e04ed2899eba1c7b04d00d99504f0fb9a2c8e450 | <ide><path>src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
<ide> protected function setWhere()
<ide> {
<ide> parent::setWhere();
<ide>
<del> $this->query->where($this->morphType, get_class($this->parent));
<add> $this->query->where($this->table.'.'.$this->morphType, get_class($this->parent));
<ide>
<i... | 2 |
Python | Python | fix wrong type in docstring | a68b3d013c3115f9374b0a24ed99960aabf25d32 | <ide><path>celery/canvas.py
<ide> class group(Signature):
<ide> [4, 8]
<ide>
<ide> Arguments:
<del> *tasks (Signature): A list of signatures that this group will call.
<del> If there's only one argument, and that argument is an iterable,
<del> then that'll define the list of si... | 1 |
PHP | PHP | form validation working now | a558a1e92240be7a681494ab5a00c76595f44af4 | <ide><path>libs/controller.php
<ide> function validateErrors ()
<ide>
<ide> function render($action=null, $layout=null, $file=null)
<ide> {
<del>
<ide> $view =& View::getInstance();
<ide> $view->_viewVars =& $this->_viewVars;
<ide> $view->action =& $this->action;
<ide> function render($action=null, $lay... | 3 |
Javascript | Javascript | fix memory leak in settimeout | f2f30286bf5e5332b1e788f3c745c5231e1b098b | <ide><path>lib/timers.js
<ide> exports.setTimeout = function(callback, after) {
<ide> timer = new Timer();
<ide>
<ide> if (arguments.length <= 2) {
<del> timer._onTimeout = callback;
<add> timer._onTimeout = function() {
<add> callback();
<add> timer.close();
<add> }
<ide> } el... | 2 |
Java | Java | set heartbeat to 0,0 on connect to message broker | a109d6adc701e981eede518fd4b707b888ea4623 | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
<ide> public void handleMessage(Message<?> message) {
<ide>
<ide> try {
<ide> if ((destination == null) || supportsDestination(destination)) {
<add>
<ide> if (logger.isTraceEnabled()) {
<ide>... | 1 |
Ruby | Ruby | simplify restore state condition | 48e606f25af80cf1b774c659ed444322fa11106c | <ide><path>activerecord/lib/active_record/transactions.rb
<ide> def force_clear_transaction_record_state
<ide>
<ide> # Restore the new record state and id of a record that was previously saved by a call to save_record_state.
<ide> def restore_transaction_record_state(force_restore_state = false)
<del> ... | 1 |
Javascript | Javascript | create `userefeffect` utility | cb25638a0ec5e639afbd4bf23386783c675003f0 | <ide><path>Libraries/Utilities/__tests__/useRefEffect-test.js
<add>/**
<add> * Copyright (c) Facebook, Inc. and its affiliates.
<add> *
<add> * This source code is licensed under the MIT license found in the
<add> * LICENSE file in the root directory of this source tree.
<add> *
<add> * @emails oncall+react_native
<add... | 2 |
Javascript | Javascript | add another resampling test for points near poles | ad30a774f03123746372ae4c45ad7c1ee6cf8da2 | <ide><path>test/geo/path-test.js
<ide> suite.addBatch({
<ide> .rotate([0, 0])
<ide> .precision(1));
<ide> },
<del> "doesn't introduce artefacts in areas of high distortion": function(path) {
<add> "resampling near poles": function(path) {
<ide> path({type: "LineString... | 1 |
Ruby | Ruby | expose some keg methods | da0df8eabea0caf939af80ed7f0226a4b1c0fefd | <ide><path>Library/Homebrew/keg_fix_install_names.rb
<ide> def each_unique_file_matching string
<ide> end
<ide> end
<ide>
<del> private
<del>
<ide> def install_name_tool(*args)
<ide> system(MacOS.locate("install_name_tool"), *args)
<ide> end | 1 |
PHP | PHP | fix more links | 4e04ef566f1f73f6b67e38f4cb8ac3899750d2a8 | <ide><path>src/Utility/Text.php
<ide> protected static function _wordWrap($text, $width = 72, $break = "\n", $cut = fa
<ide> * @param string|array $phrase The phrase or phrases that will be searched.
<ide> * @param array $options An array of HTML attributes and options.
<ide> * @return string The highlig... | 1 |
Text | Text | add note about not capitalizing php in tags | 93c092d5e7a2b8528f3d6fd2668c471baee03197 | <ide><path>guide/english/php/php-tags/index.md
<ide> title: PHP tags
<ide>
<ide> When PHP parses a file, it looks for opening and closing tags, which are `<?php` and `?>` which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different docu... | 1 |
Ruby | Ruby | add check for insecure hackage urls | 58cf0ec2b908d4bcd12d77036ef8eac60ee95697 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_urls
<ide> %r{^http://www\.mirrorservice\.org/},
<ide> %r{^http://launchpad\.net/},
<ide> %r{^http://bitbucket\.org/},
<add> %r{^http://hackage\.haskell\.org/},
<ide> %r{^http://(?:[^/]*\.)?archive\.org}
<ide>... | 1 |
PHP | PHP | update validation for new mastercard card numbers | 319f66a00bd9d61120e5b62dc92dccedf8140160 | <ide><path>src/Validation/Validation.php
<ide> public static function cc($check, $type = 'fast', $deep = false, $regex = null)
<ide> 'jcb' => '/^(3\\d{4}|2100|1800)\\d{11}$/',
<ide> 'maestro' => '/^(?:5020|6\\d{3})\\d{12}$/',
<ide> 'mc' => '/^5[1-5]\\d{14}$/',
<add> ... | 2 |
Text | Text | change allow_none to allow_null | 080fa4f5f863609f5647ce1424f13b01e9f427ad | <ide><path>docs/topics/3.0-announcement.md
<ide> We now use the following:
<ide> * `Field` is the base class for all fields. It does not include any default implementation for either serializing or deserializing data.
<ide> * `ReadOnlyField` is a concrete implementation for read-only fields that simply returns the attr... | 1 |
Go | Go | use errors.wrap() in daemon/config | a8d2b29e8d515296e559228a72895daba138c8be | <ide><path>daemon/config/config.go
<ide> package config // import "github.com/docker/docker/daemon/config"
<ide> import (
<ide> "bytes"
<ide> "encoding/json"
<del> "errors"
<ide> "fmt"
<ide> "io"
<ide> "io/ioutil"
<ide> import (
<ide> "github.com/docker/docker/pkg/discovery"
<ide> "github.com/docker/docker/regis... | 2 |
Python | Python | change disable_verify_ssl behaviour | 2071519e7462cfc7613c50dc42acb4672dbca4a7 | <ide><path>airflow/kubernetes/kube_client.py
<ide> has_kubernetes = True
<ide>
<ide> def _disable_verify_ssl() -> None:
<del> configuration = Configuration()
<add> if hasattr(Configuration, 'get_default_copy'):
<add> configuration = Configuration.get_default_copy()
<add> else:
<... | 2 |
Javascript | Javascript | add htmlbars version of makeboundhelper | 6ebca89f578125c617e9b0770d694730649c2d5e | <ide><path>packages/ember-htmlbars/lib/main.js
<ide> import { DOMHelper } from "morph";
<ide> import template from "ember-htmlbars/system/template";
<ide> import compile from "ember-htmlbars/system/compile";
<ide> import makeViewHelper from "ember-htmlbars/system/make-view-helper";
<add>import makeBoundHelper from "emb... | 3 |
Javascript | Javascript | remove rollbar from loading in client | a2762fe4c3401bd9104051b59860ee57c8ee5b5e | <ide><path>client/gatsby-ssr.js
<del>/* global ROLLBAR_CLIENT_ID ENVIRONMENT */
<ide> import React from 'react';
<ide> import PropTypes from 'prop-types';
<ide> import { Provider } from 'react-redux';
<ide> export const onRenderBody = ({ setHeadComponents, setPostBodyComponents }) => {
<ide> setHeadComponents([...hea... | 2 |
Javascript | Javascript | increase coverage for diagnostics_channel | 51dfb869f345ec5eb658fab4d8fd5500f8bbfb1e | <ide><path>test/parallel/test-diagnostics-channel-object-channel-pub-sub.js
<ide> channel.publish(input);
<ide> // Should not publish after subscriber is unsubscribed
<ide> channel.unsubscribe(subscriber);
<ide> assert.ok(!channel.hasSubscribers);
<add>
<add>assert.throws(() => {
<add> channel.subscribe(null);
<add>},... | 2 |
Javascript | Javascript | generalize upgrade support | 31c16f0fffdb1caebd8ae86c5dd05db5ef1e58b2 | <ide><path>packages/ember-metal/lib/meta.js
<ide> export function meta(obj, writable) {
<ide> let newRet = Object.create(ret);
<ide> newRet.parentMeta = ret;
<ide> ret = newRet;
<del> ret._cache = undefined;
<add> for (let i = 0; i < memberNames.length; i++) {
<add> let name = memberNames[i];
<ad... | 1 |
Javascript | Javascript | fix modal import in graph.js | b8868fa4744d42f5c3dd972376c605505157182f | <ide><path>airflow/www/static/js/graph.js
<ide> */
<ide>
<ide> /*
<del> global d3, document, call_modal, nodes, taskInstances, tasks, edges, dagreD3, localStorage, $
<add> global d3, document, nodes, taskInstances, tasks, edges, dagreD3, localStorage, $
<ide> */
<ide>
<ide> import getMetaValue from './meta_value';... | 1 |
Go | Go | fix race between dispatchers.run and todisk | f17410da5e4b5fa0e0dd2614f9b6e00dbcf66da6 | <ide><path>builder/internals.go
<ide> func (b *Builder) commit(id string, autoCmd []string, comment string) error {
<ide> return nil
<ide> }
<ide>
<del> container, warnings, err := b.Daemon.Create(b.Config, "")
<add> container, err := b.create()
<ide> if err != nil {
<ide> return err
<ide> }
<del> for _... | 1 |
Javascript | Javascript | move legacy hidden api to new internal fiber type | 914b57be27a8697d8ed83266466b30378af379f0 | <ide><path>packages/react-reconciler/src/ReactFiber.new.js
<ide> import {
<ide> ScopeComponent,
<ide> Block,
<ide> OffscreenComponent,
<add> LegacyHiddenComponent,
<ide> } from './ReactWorkTags';
<ide> import getComponentName from 'shared/getComponentName';
<ide>
<ide> import {
<ide> REACT_SCOPE_TYPE,
<ide> ... | 11 |
Text | Text | add major version note to release guide | 58cfb329627fabdfa988c3cf7bdb13407cb12809 | <ide><path>doc/contributing/releases.md
<ide> Revert all changes that were made to `src/node_version.h`:
<ide> $ git checkout --ours HEAD -- src/node_version.h
<ide> ```
<ide>
<add><details>
<add><summary>Major version release</summary>
<add>
<add>On the main branch, instead of reverting changes made to `src/node_vers... | 1 |
Ruby | Ruby | upgrade virtualenv to 16.6.0 | 0bb29e82533ceba1fa3bdc4b4c38d4201928f53d | <ide><path>Library/Homebrew/language/python_virtualenv_constants.rb
<ide> # frozen_string_literal: true
<ide>
<ide> PYTHON_VIRTUALENV_URL =
<del> "https://files.pythonhosted.org/packages/6a/56" \
<del> "/74dce1fdeeabbcc0a3fcf299115f6814bd9c39fc4161658b513240a75ea7" \
<del> "/virtualenv-16.5.0.tar.gz"
<add> "https:... | 1 |
Text | Text | add digitalinfinity to collaborators | 734fa44000cfe3fceabf19c801d4972fb280ca5d | <ide><path>README.md
<ide> For more information about the governance of the Node.js project, see
<ide> **Jamie Davis** <davisjam@vt.edu> (he/him)
<ide> * [devsnek](https://github.com/devsnek) -
<ide> **Gus Caplan** <me@gus.host> (he/him)
<add>* [digitalinfinity](https://github.com/digitalinfinity) -
<add>**... | 1 |
Text | Text | add process for pr acceptance, review, rejection | e4a09cd79d0ee3fbb6a33552a21c53491d9f3953 | <ide><path>hack/MAINTAINERS.md
<ide> All decisions affecting docker, big and small, follow the same 3 steps:
<ide>
<ide> * Step 3: Accept (`LGTM`) or refuse a pull request. The relevant maintainers do
<ide> this (see below "Who decides what?")
<del>
<add> + Accepting pull requests
<add> - If the pull request appears... | 1 |
Go | Go | remove ansiescape package | 3f829aa6e436dc741785abd795fdcd28afd2da40 | <ide><path>pkg/ansiescape/split.go
<del>package ansiescape
<del>
<del>import "bytes"
<del>
<del>// dropCR drops a leading or terminal \r from the data.
<del>func dropCR(data []byte) []byte {
<del> if len(data) > 0 && data[len(data)-1] == '\r' {
<del> data = data[0 : len(data)-1]
<del> }
<del> if len(data) > 0 && data[... | 2 |
Ruby | Ruby | convert dsl test to spec | d8e515004c68b82532401a26ae0d6a4f27844d91 | <ide><path>Library/Homebrew/cask/spec/cask/dsl_spec.rb
<add>require "spec_helper"
<add>
<add>describe Hbc::DSL do
<add> let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/#{token}.rb") }
<add> let(:token) { "basic-cask" }
<add>
<add> context "stanzas" do
<add> it "lets you set url, homepage,... | 2 |
Javascript | Javascript | replace string replace with string templates | ac46837d356738984b70e1591678f6b325fd15a1 | <ide><path>packages/react-native-codegen/src/generators/modules/GenerateModuleJavaSpec.js
<ide> const {unwrapNullable} = require('../../parsers/flow/modules/utils');
<ide>
<ide> type FilesOutput = Map<string, string>;
<ide>
<del>const moduleTemplate = `
<add>const FileTemplate = ({
<add> packageName,
<add> classNam... | 1 |
Text | Text | add v3.6.0-beta.4 to changelog | 2765c4806f805100cf2ab8693eb7bb9a31922df1 | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### v3.6.0-beta.4 (November 12, 2018)
<add>
<add>- [#17184](https://github.com/emberjs/ember.js/pull/17184) [BUGFIX] Ensures removeAllListeners does not break subsequent adds
<add>- [#17186](https://github.com/emberjs/ember.js/pull/17186) [BUGFIX] Fix RouteInf... | 1 |
Javascript | Javascript | add extra anti-dos tech to net.server | 38dde9684f43dff636d1b798e7537b93d2b6b7fd | <ide><path>benchmark/idle_clients.js
<ide> var errors = 0, connections = 0;
<ide>
<ide> var lastClose = 0;
<ide>
<del>function maybeConnect (s) {
<del> var now = new Date();
<del> if (now - lastClose > 5000) {
<del> // Just connect immediately
<del> connect();
<del> } else {
<del> // Otherwise wait a litt... | 2 |
Go | Go | get mtu from default route | ff4e58ff560d864432261a68502a8a5543145fdf | <ide><path>daemon/daemon.go
<ide> import (
<ide> "github.com/docker/docker/registry"
<ide> "github.com/docker/docker/runconfig"
<ide> "github.com/docker/docker/trust"
<add> "github.com/docker/libcontainer/netlink"
<ide> "github.com/docker/libnetwork"
<ide> )
<ide>
<ide> func (daemon *Daemon) RegisterLinks(containe... | 1 |
Python | Python | add solution method for project_euler/problem_37 | 6541236fdf807a185a7eaf5c159c45fa885d85fb | <ide><path>project_euler/problem_37/sol1.py
<ide> def compute_truncated_primes(count: int = 11) -> list[int]:
<ide> return list_truncated_primes
<ide>
<ide>
<add>def solution() -> int:
<add> """
<add> Returns the sum of truncated primes
<add> """
<add> return sum(compute_truncated_primes(11))
<add>
<a... | 1 |
PHP | PHP | remove uneeded implementedevents() | 01e44dc6f63046eddc8f46a7f3186dd64ad05f15 | <ide><path>src/Controller/Component/AuthComponent.php
<ide> public function startup(Event $event)
<ide> return $this->_unauthorized($controller);
<ide> }
<ide>
<del> /**
<del> * Events supported by this component.
<del> *
<del> * @return array
<del> */
<del> public function implemente... | 1 |
Ruby | Ruby | initialize instance variables | 5ddb60f2b35e67b500efbc2da0c752a64e36385b | <ide><path>activerecord/lib/active_record/base.rb
<ide> def initialize(attributes = nil, options = {})
<ide> @marked_for_destruction = false
<ide> @previously_changed = {}
<ide> @changed_attributes = {}
<add> @relation = nil
<ide>
<ide> ensure_proper_type
<ide> set_serial... | 1 |
Javascript | Javascript | remove event config | b6df4417c79c11cfb44f965fab55b573882b1d54 | <ide><path>packages/react-dom/src/client/ReactDOMComponent.js
<ide> import {
<ide> registrationNameDependencies,
<ide> possibleRegistrationNames,
<del>} from '../events/EventPluginRegistry';
<add>} from '../events/EventRegistry';
<ide> import {canUseDOM} from 'shared/ExecutionEnvironment';
<ide> import invariant fr... | 10 |
PHP | PHP | add test for entity clean() | 6b8245dfebf0ce519263b326e8a0d84d9049da1e | <ide><path>tests/TestCase/ORM/TableTest.php
<ide> public function testSavePrimaryKeyEntityExists()
<ide> $this->assertSame($entity, $table->save($entity));
<ide> }
<ide>
<del>
<ide> /**
<ide> * Test that save works with replace saveStrategy and are not deleted once they are not null
<ide> *
<... | 1 |
Go | Go | replace flaky testfollowlogshandledecodeerr | c91e09bee27fe4e4e106c4959400eb12d8adbedb | <ide><path>daemon/logger/loggerutils/follow_test.go
<add>package loggerutils // import "github.com/docker/docker/daemon/logger/loggerutils"
<add>
<add>import (
<add> "io"
<add> "os"
<add> "testing"
<add>
<add> "gotest.tools/v3/assert"
<add>)
<add>
<add>func TestHandleDecoderErr(t *testing.T) {
<add> f, err := os.Create... | 2 |
Javascript | Javascript | reduce require calls in http2/core | 557f5702eccd48da757df9adc5385d664717a173 | <ide><path>lib/internal/http2/core.js
<ide> const { onServerStream,
<ide> Http2ServerResponse,
<ide> } = require('internal/http2/compat');
<ide> const { utcDate } = require('internal/http');
<del>const { promisify } = require('internal/util');
<add>const {
<add> promisify,
<add> customInspectSymbol: kInspect
... | 1 |
Go | Go | make volumes-from a slice instead of string split | b4f2821e6d4ba6f6073365a244681df21f5d4472 | <ide><path>runconfig/hostconfig.go
<ide> type HostConfig struct {
<ide> PublishAllPorts bool
<ide> Dns []string
<ide> DnsSearch []string
<del> VolumesFrom string
<add> VolumesFrom []string
<ide> }
<ide>
<ide> func ContainerHostConfigFromJob(job *engine.Job) *HostConfig {
<ide> hostConfig ... | 3 |
Javascript | Javascript | support concurrent rendering | c774f9e97e37c5dec41044256a8fa33ed49a3501 | <ide><path>Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js
<ide> * @format
<ide> */
<ide>
<add>import useAnimatedProps from './useAnimatedProps';
<add>import useMergeRefs from '../Utilities/useMergeRefs';
<ide> import * as React from 'react';
<ide>
<ide> /**
<ide> import * as React from 'react';
<ide> ex... | 2 |
Python | Python | move import at the top of the file | ea865e4955e94326bbe9a12d2da653bd0f2c0993 | <ide><path>kubernetes_tests/test_kubernetes_pod_operator_backcompat.py
<ide> from airflow.models import DAG, TaskInstance
<ide> from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator
<ide> from airflow.utils import timezone
<add>from airflow.utils.state import State
<ide> from airf... | 1 |
Python | Python | remove some weird syntax for kwargs | cf377c766d6ac8d72116bc71ad5c9d2f29996e03 | <ide><path>numpy/lib/function_base.py
<ide> def insert(arr, obj, values, axis=None):
<ide>
<ide> if isinstance(obj, slice):
<ide> # turn it into a range object
<del> indices = arange(*obj.indices(N), **{'dtype': intp})
<add> indices = arange(*obj.indices(N), dtype=intp)
<ide> else:
<ide> ... | 1 |
Python | Python | add dtypes to the _array_api namespace | 9934cf3abcd6ba9438c340042e94f8343e3f3d13 | <ide><path>numpy/_array_api/__init__.py
<ide>
<ide> __all__ += ['arange', 'empty', 'empty_like', 'eye', 'full', 'full_like', 'linspace', 'ones', 'ones_like', 'zeros', 'zeros_like']
<ide>
<add>from .dtypes import int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64, bool
<add>
<add>__all__ += ['i... | 2 |
Go | Go | add a builder.commit method | 7bccdc0d33d0589792b9b867b13c9e50dcf48358 | <ide><path>builder.go
<ide> func (builder *Builder) Run(image *Image, cmd ...string) (*Container, error) {
<ide> return container, nil
<ide> }
<ide>
<add>func (builder *Builder) Commit(container *Container, repository, tag, comment, author string) (*Image, error) {
<add> return builder.runtime.Commit(container.Id, re... | 1 |
Python | Python | fix example tests | c7c1408875909ddb58111a82fd0e8250137d0490 | <ide><path>examples/blogpost/tests.py
<ide> from django.core.urlresolvers import reverse
<ide> from django.utils import simplejson as json
<ide>
<add>from djangorestframework.compat import RequestFactory
<add>
<ide> from blogpost import models
<ide> import blogpost
<ide> | 1 |
Python | Python | add math.isclose to see also | 74c111f0c40978ad064daabfe17658a308721a2d | <ide><path>numpy/core/numeric.py
<ide> def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
<ide> See Also
<ide> --------
<ide> allclose
<add> math.isclose
<ide>
<ide> Notes
<ide> ----- | 1 |
Javascript | Javascript | move chunk graph building into separate file | a430d5564c7d68baa07865b058621ab7c54d2cbd | <ide><path>lib/Compilation.js
<ide> const {
<ide> } = require("tapable");
<ide> const util = require("util");
<ide> const { CachedSource } = require("webpack-sources");
<del>const AsyncDependencyToInitialChunkError = require("./AsyncDependencyToInitialChunkError");
<ide> const Chunk = require("./Chunk");
<ide> const Ch... | 2 |
PHP | PHP | fix path in testsuite | ed22c17eba39388c30de4ea79fe38b8533ff4a77 | <ide><path>lib/Cake/Test/Case/AllDatabaseTest.php
<ide> public static function suite() {
<ide>
<ide> $path = CORE_TEST_CASES . DS . 'Model' . DS;
<ide> $tasks = array(
<del> 'DbAcl',
<add> 'AclNode',
<ide> 'CakeSchema',
<ide> 'ConnectionManager',
<ide> 'Datasource' . DS . 'DboSource', | 1 |
Python | Python | add indirection file to ncf async process. | c6bef65adab528927a821a1bfff25104dcdb25d1 | <ide><path>official/recommendation/data_preprocessing.py
<ide> from official.datasets import movielens
<ide> from official.recommendation import constants as rconst
<ide> from official.recommendation import stat_utils
<del>
<del>
<del>_ASYNC_GEN_PATH = os.path.join(os.path.dirname(__file__),
<del> ... | 3 |
Ruby | Ruby | add a test case for range type casting | 3ba9d32c6cb7e288ae6473298673bf1f2797f846 | <ide><path>activerecord/test/cases/base_test.rb
<ide> def test_find_by_slug_with_array
<ide> assert_equal Topic.find(['1-meowmeow', '2-hello']), Topic.find([1, 2])
<ide> end
<ide>
<add> def test_find_by_slug_with_range
<add> assert_equal Topic.where(id: '1-meowmeow'..'2-hello'), Topic.where(id: 1..2)
<add> ... | 1 |
Javascript | Javascript | use electron version only in fingerprint | c3bf0893b4280eaadd1d20fdd175279989da775c | <ide><path>script/utils/fingerprint.js
<ide> var fingerprintPath = path.resolve(__dirname, '..', '..', 'node_modules', '.atom
<ide> module.exports = {
<ide> fingerprint: function () {
<ide> var packageJson = fs.readFileSync(path.resolve(__dirname, '..', '..', 'package.json'))
<del> var body = packageJson.toStr... | 1 |
Mixed | Ruby | accept json with no backslashes/escaping | 45635098ac827ee5b243ac01b6267843cd89200a | <ide><path>actioncable/CHANGELOG.md
<add>* Allow channel identifiers with no backslahes/escaping to be accepted
<add> by the subscription storer.
<add>
<add> *Jon Moss*
<add>
<ide> * Safely support autoloading and class unloading, by preventing concurrent
<ide> loads, and disconnecting all cables during reload... | 4 |
Ruby | Ruby | test basic auth with symbols in login and password | 2ae757d76bdc4c02e47a43ebc5ecbfc8bb8dee41 | <ide><path>actionpack/test/controller/http_basic_authentication_test.rb
<ide> class DummyController < ActionController::Base
<ide> before_action :authenticate, only: :index
<ide> before_action :authenticate_with_request, only: :display
<ide> before_action :authenticate_long_credentials, only: :show
<add> ... | 1 |
Python | Python | update backend functionality | 69a8acc05a40a523aa4e51b2e281b94a2e8bdc43 | <ide><path>keras/backend/__init__.py
<ide> from __future__ import absolute_import
<add>from __future__ import print_function
<add>import os
<add>import json
<ide> from .common import epsilon, floatx, set_epsilon, set_floatx
<ide>
<ide> _BACKEND = 'theano'
<add>_config_path = os.path.expanduser(os.path.join('~', '.kera... | 4 |
PHP | PHP | add test to cover uncovered cases in redirectroute | 1b10d28dfe16252fe0c29a914d5cf12d5ac5927c | <ide><path>tests/TestCase/Routing/Route/RedirectRouteTest.php
<ide> public function setUp()
<ide> Router::connect('/:controller/:action/*');
<ide> }
<ide>
<add> /**
<add> * test match
<add> *
<add> * @return void
<add> */
<add> public function testMatch()
<add> {
<add> $rout... | 1 |
Text | Text | improve the changelog entry | c4f2f5b9d7902c280fb341560cf23c52c99e4e55 | <ide><path>actionpack/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* Fixed `ActionView::Helpers::CaptureHelper#content_for` regression when trying to use it in
<add> a boolean statement.
<add> Fixes #9360.
<add>
<add> *Nikolay Shebanov*
<add>
<ide> * `format: true` does not override existi... | 1 |
Ruby | Ruby | remove deprecations from active support | 6a6fc4e1db2469bd309c074f607abb60764ba20d | <ide><path>activesupport/lib/active_support.rb
<ide> module ActiveSupport
<ide> autoload :Gzip
<ide> autoload :Inflector
<ide> autoload :JSON
<del> autoload :Memoizable
<ide> autoload :MessageEncryptor
<ide> autoload :MessageVerifier
<ide> autoload :Multibyte
<ide><path>activesupport/lib/acti... | 9 |
PHP | PHP | fix query strings handling | 1fdc127aeda134b175e115142cdccd4d9d6611a4 | <ide><path>src/Illuminate/Routing/UrlGenerator.php
<ide> public function to($path, $extra = [], $secure = null)
<ide> // for passing the array of parameters to this URL as a list of segments.
<ide> $root = $this->getRootUrl($scheme);
<ide>
<del> return $this->trimUrl($root, $path, $tail);
<add> ... | 2 |
Text | Text | add missing article in session ticket section | b98386c977d0082f3218afe5a746202d40b24d9d | <ide><path>doc/api/tls.md
<ide> handlers.
<ide>
<ide> The servers encrypt the entire session state and send it
<ide> to the client as a "ticket". When reconnecting, the state is sent to the server
<del>in the initial connection. This mechanism avoids the need for server-side
<add>in the initial connection. This mechan... | 1 |
PHP | PHP | add integration test for issue in | dd063dfcbd3e5df8224b91febd1d213909f2f37e | <ide><path>tests/TestCase/Routing/DispatcherFactoryTest.php
<ide> */
<ide> namespace Cake\Test\TestCase\Routing;
<ide>
<add>use Cake\Core\Configure;
<add>use Cake\Network\Request;
<ide> use Cake\Routing\DispatcherFactory;
<ide> use Cake\TestSuite\TestCase;
<ide>
<ide> class DispatcherFactoryTest extends TestCase
<id... | 1 |
Ruby | Ruby | require string extension before exceptions | 8818e008e360a6b6e94a1b470218efa951874e15 | <ide><path>Library/Homebrew/test/testing_env.rb
<ide>
<ide> $:.push(File.expand_path(__FILE__+'/../..'))
<ide> require 'extend/pathname'
<add>require 'extend/string'
<ide> require 'exceptions'
<ide> require 'utils'
<del>require 'extend/string'
<ide>
<ide> # these are defined in global.rb, but we don't want to break o... | 1 |
Text | Text | add whitespace check to else-if test | 5418307936c3bc23c86adb8149769faba5b2ec51 | <ide><path>curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.english.md
<ide> tests:
<ide> - text: You should have at least two <code>if</code> statements
<ide> testString: assert(code.match(/if/g).length > 1);
<ide> - text: You should hav... | 1 |
PHP | PHP | correct doc blocks | 7132f47fafc7f4c03e2227256c70930d2ea789ff | <ide><path>src/Database/Expression/QueryExpression.php
<ide> class QueryExpression implements ExpressionInterface, Countable
<ide> * expression objects. Optionally, you can set the conjunction keyword to be used
<ide> * for joining each part of this level of the expression tree.
<ide> *
<del> * @para... | 1 |
Python | Python | restore use of batch norm in model | a4633fff6fd7f5c84b41c24178c5d8b22aa09724 | <ide><path>spacy/_ml.py
<ide> def Tok2Vec(width, embed_size, preprocess=None):
<ide> >> uniqued(embed, column=5)
<ide> >> drop_layer(
<ide> Residual(
<del> (ExtractWindow(nW=1) >> ReLu(width, width*3))
<add> (ExtractWindow... | 1 |
Text | Text | fix reference to workerdata in worker_threads | 31d5bdea70e44802918d6f4aa7c378bc1992be54 | <ide><path>doc/api/worker_threads.md
<ide> if (isMainThread) {
<ide> * `options` {Object}
<ide> * `eval` {boolean} If true, interpret the first argument to the constructor
<ide> as a script that is executed once the worker is online.
<del> * `data` {any} Any JavaScript value that will be cloned and made
<add> *... | 1 |
Go | Go | fix missing container runtime on upgrade | d7ceda4e375250e6868854cca96c49a369503745 | <ide><path>daemon/start_linux.go
<ide> import (
<ide>
<ide> "github.com/docker/docker/container"
<ide> "github.com/docker/docker/libcontainerd"
<add> "github.com/docker/engine-api/types"
<ide> )
<ide>
<ide> func (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Container) (*[]libcontainerd.CreateO... | 1 |
Python | Python | remove context copying from run_async function | cb13128cf03b2f1b3c5b48eab518e57e7b5f6516 | <ide><path>src/flask/helpers.py
<ide> def run_async(func: t.Callable[..., t.Coroutine]) -> t.Callable[..., t.Any]:
<ide> )
<ide>
<ide> @wraps(func)
<del> def outer(*args: t.Any, **kwargs: t.Any) -> t.Any:
<del> """This function grabs the current context for the inner function.
<del>
<del> ... | 1 |
Java | Java | hide buffer/blocking subscribeon behavior | 1cac6fc588b61416db4e59930019fe3411653391 | <ide><path>rxjava-core/src/main/java/rx/Observable.java
<ide> public final Subscription subscribe(Subscriber<? super T> observer, Scheduler sc
<ide> * @see #subscribeOn(rx.Scheduler, int)
<ide> */
<ide> public final Observable<T> subscribeOn(Scheduler scheduler) {
<del> return nest().lift(new Oper... | 4 |
Python | Python | add clip value as in neural turing machines | 69afdd7ec40f23b056bafa73a82535a41e29e764 | <ide><path>keras/optimizers.py
<ide> def clip_norm(g, c, n):
<ide> return g
<ide>
<ide>
<add>def clip_value(g, c):
<add> if c > 0:
<add> g = T.switch(T.ge(g, c), c, g)
<add> return g
<add>
<add>
<ide> def kl_divergence(p, p_hat):
<ide> return p_hat - p + p * T.log(p / p_hat)
<ide>
<ide> def get_... | 1 |
Go | Go | add _llseek syscall | 923609179b18fb5fc9d4ad7820646af7e09786a2 | <ide><path>daemon/execdriver/native/seccomp_default.go
<ide> var defaultSeccompProfile = &configs.Seccomp{
<ide> Action: configs.Allow,
<ide> Args: []*configs.Arg{},
<ide> },
<add> {
<add> Name: "_llseek",
<add> Action: configs.Allow,
<add> Args: []*configs.Arg{},
<add> },
<ide> {
<ide> Name:... | 1 |
Ruby | Ruby | add nodoc to hashmerger and merger | 28e534136f1d4a496eb39d752896603f6ef5d6ff | <ide><path>activerecord/lib/active_record/relation/merger.rb
<ide>
<ide> module ActiveRecord
<ide> class Relation
<del> class HashMerger
<add> class HashMerger # :nodoc:
<ide> attr_reader :relation, :hash
<ide>
<ide> def initialize(relation, hash)
<ide> def other
<ide> end
<ide> end
<ide... | 1 |
Go | Go | remove unused containerlistoptions.quiet field | 4d3f64da6348c20f57efe01ca483b130bcf5dd9b | <ide><path>api/types/client.go
<ide> type ContainerExecInspect struct {
<ide>
<ide> // ContainerListOptions holds parameters to list containers with.
<ide> type ContainerListOptions struct {
<del> Quiet bool
<ide> Size bool
<ide> All bool
<ide> Latest bool
<ide><path>testutil/environment/clean.go
<ide> fu... | 2 |
Ruby | Ruby | fix migration version in doc of #up_only | 46a2f93614ccf0d1628e6fc3c4666cee476d17c8 | <ide><path>activerecord/lib/active_record/migration.rb
<ide> def reversible
<ide> # In the following example, the new column `published` will be given
<ide> # the value `true` for all existing records.
<ide> #
<del> # class AddPublishedToPosts < ActiveRecord::Migration[5.3]
<add> # class AddPubl... | 1 |
Python | Python | make schema in dbapihook private | 04b6559f8a06363a24e70f6638df59afe43ea163 | <ide><path>airflow/hooks/dbapi.py
<ide> def connect(self, host: str, port: int, username: str, schema: str) -> Any:
<ide> # #
<ide> #########################################################################################
<ide> class ... | 3 |
Java | Java | expose principal in serverrequest | ba39697f2e568b27a97b2bf195b6b8c99ae1ce95 | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequest.java
<ide> import java.net.InetSocketAddress;
<ide> import java.net.URI;
<ide> import java.nio.charset.Charset;
<add>import java.security.Principal;
<ide> import java.util.Collections;
<ide> import java.util.Li... | 5 |
Ruby | Ruby | skip directory in env_script_all_files | 328fa80f413af936fb1612156208d27c42dd4697 | <ide><path>Library/Homebrew/extend/pathname.rb
<ide> def write_env_script target, env
<ide> def env_script_all_files dst, env
<ide> dst.mkpath
<ide> Pathname.glob("#{self}/*") do |file|
<add> next if file.directory?
<ide> dst.install_p file
<ide> new_file = dst+file.basename
<ide> file.... | 1 |
Javascript | Javascript | use native promise in local-cli | 812591ac422bcec0b2aaaa7169d3ba0d55e39acf | <ide><path>local-cli/bundle/buildBundle.js
<ide> 'use strict';
<ide>
<ide> const log = require('../util/log').out('bundle');
<del>const Promise = require('promise');
<ide> const Server = require('../../packager/react-packager/src/Server');
<ide>
<ide> const outputBundle = require('./output/bundle');
<ide><path>local-... | 12 |
Python | Python | add __f2py_numpy_version__ attribute | 908d865712d423dcd6117929fca463c1708dc702 | <ide><path>numpy/f2py/rules.py
<ide> from . import __version__
<ide> f2py_version = __version__.version
<ide>
<add>from .. import version as _numpy_version
<add>numpy_version = _numpy_version.version
<add>
<ide> import os
<ide> import time
<ide> import copy
<ide> \t\t\"This module '#modulename#' is auto-generated with... | 2 |
Javascript | Javascript | fix broken lang tests in argentina | 26333668cf5c1158ae425af338b3dcc5bf51e645 | <ide><path>test/lang/en-ca.js
<ide> exports["lang:en-ca"] = {
<ide> "weeks year starting tuesday" : function (test) {
<ide> test.expect(6);
<ide>
<del> test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
<add> test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 200... | 11 |
PHP | PHP | fix memcached engine | 4f4e8a5be8ed5acc971cf71d664ddcf7e1d4b895 | <ide><path>lib/Cake/Cache/Engine/MemcachedEngine.php
<ide> * @since CakePHP(tm) v 2.5.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<add>namespace Cake\Cache\Engine;
<add>
<add>use Cake\Cache\CacheEngine;
<add>use Cake\Error;
<add>use Cake\Utility\Inflector;... | 2 |
Java | Java | delete unused imports in spring-messaging module | 9bc32ac199ad649b095ad5f8af63c82c2b9d7dc5 | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java
<ide> import org.springframework.context.ApplicationContextAware;
<ide> import org.springframework.context.annotation.Bean;
<ide> import org.springframework.messaging.Message;
<del>import org.spri... | 1 |
PHP | PHP | remove behaviors contant | 66ae2396295703b6421953c1de3fb2ad057bbfed | <ide><path>lib/Cake/bootstrap.php
<ide> define('APP', ROOT.DS.APP_DIR.DS);
<ide> }
<ide>
<del>/**
<del> * Path to model behaviors directory.
<del> */
<del> define('BEHAVIORS', MODELS.'Behavior'.DS);
<del>
<ide> /**
<ide> * Path to the application's libs directory.
<ide> */ | 1 |
Python | Python | use official endpoint for ec2 prices | 1f58fcea7943e38360267cbbfa8cb23f255d84b1 | <ide><path>contrib/scrape-ec2-prices.py
<ide> from collections import defaultdict, OrderedDict
<ide>
<ide> import requests
<del>import _jsonnet # pylint: disable=import-error
<del>
<del>LINUX_PRICING_URLS = [
<del> # Deprecated instances (JSON format)
<del> "https://aws.amazon.com/ec2/pricing/json/linux-od.json... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.