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 |
|---|---|---|---|---|---|
Go | Go | fix lint error on sprintf call for runtime string | 6fd94aa933f774dc6f582a96f800b1e875628be3 | <ide><path>daemon/reload_unix.go
<ide> func (daemon *Daemon) reloadPlatform(conf *config.Config, attributes map[string]
<ide> if runtimeList.Len() > 0 {
<ide> runtimeList.WriteRune(' ')
<ide> }
<del> runtimeList.WriteString(fmt.Sprintf("%s:%s", name, rt))
<add> runtimeList.WriteString(fmt.Sprintf("%s:%s", name... | 1 |
PHP | PHP | convert time to seconds once | aae5c4acf3492ffac107ac2e466914e455623da8 | <ide><path>src/Illuminate/Cache/Repository.php
<ide> public function setMultiple($values, $ttl = null)
<ide> */
<ide> public function add($key, $value, $ttl = null)
<ide> {
<add> $seconds = null;
<add>
<ide> if ($ttl !== null) {
<del> if ($this->getSeconds($ttl) <= 0) {
<add> ... | 1 |
Python | Python | add type hints for unispeech | 0540d1b6c0bc1eae80144c5d228e89e87589ea99 | <ide><path>src/transformers/models/data2vec/modeling_data2vec_audio.py
<ide> def _mask_hidden_states(
<ide> )
<ide> def forward(
<ide> self,
<del> input_values,
<del> attention_mask=None,
<del> mask_time_indices=None,
<del> output_attentions=None,
<del> output_hidden_s... | 8 |
Javascript | Javascript | use relative imports for container | 6aa70081f55feefc106b2c2cfaae369ab8d74d60 | <ide><path>packages/container/lib/index.js
<ide> The public API, specified on the application namespace should be considered the
<ide> @private
<ide> */
<ide>
<del>import Registry from 'container/registry';
<del>import Container from 'container/container';
<del>import { getOwner, setOwner } from 'container/owner';
<... | 1 |
Ruby | Ruby | remove unnecessary overriding of `#initialize` | daf0f23b77a582340c0a52a3024069fd21ade633 | <ide><path>activerecord/lib/active_record/reflection.rb
<ide> def primary_key(klass)
<ide> end
<ide>
<ide> class HasManyReflection < AssociationReflection # :nodoc:
<del> def initialize(name, scope, options, active_record)
<del> super(name, scope, options, active_record)
<del> end
<del>
<ide> ... | 1 |
Javascript | Javascript | fix custom webpack config in inferno example | 6685d633e1f4921c1df92a3dee317e16ffa99085 | <ide><path>examples/using-inferno/next.config.js
<ide> module.exports = {
<ide> }
<ide>
<ide> config.resolve.alias = {
<add> ...config.resolve.alias,
<ide> react: 'inferno-compat',
<ide> 'react-dom': 'inferno-compat'
<ide> } | 1 |
Javascript | Javascript | remove special test entries | 357230f4b7174380467edfb0a65a00b65b0af66c | <ide><path>benchmark/assert/deepequal-buffer.js
<ide> const bench = common.createBenchmark(main, {
<ide> n: [2e4],
<ide> len: [1e2, 1e3],
<ide> strict: [0, 1],
<del> method: [ 'deepEqual', 'notDeepEqual' ],
<add> method: ['deepEqual', 'notDeepEqual'],
<ide> });
<ide>
<ide> function main({ len, n, method, stric... | 41 |
Javascript | Javascript | fix null pointer err for some collada models | eb3dfab0bb313ca2059b33b6e57c0eeae02a7bc2 | <ide><path>src/objects/SkinnedMesh.js
<ide> THREE.SkinnedMesh = function ( geometry, material, useVertexTexture ) {
<ide>
<ide> gbone = this.geometry.bones[ b ];
<ide>
<del> if ( gbone.parent !== - 1 ) {
<add> if ( gbone.parent !== - 1 && gbone.parent !== null) {
<ide>
<ide> bones[ gbone.parent ].add( bon... | 1 |
Javascript | Javascript | put the map in the dist directory | b20f536748300d5aef31ad68cc5adff849a1ee13 | <ide><path>Gruntfile.js
<ide> module.exports = function( grunt ) {
<ide> },
<ide> options: {
<ide> banner: "/*! jQuery v<%= pkg.version %> jquery.com | jquery.org/license */",
<del> sourceMap: "jquery.min.map",
<add> sourceMap: "dist/jquery.min.map",
<ide> beautify: {
<ide> ascii_only: t... | 1 |
Javascript | Javascript | add test for escaping require.context id | ed558f2cad107c45fb2b7ca57d5906e9054daeb2 | <ide><path>test/configCases/code-generation/require-context-id/folder/a.js
<add>module.exports = "a";
<ide><path>test/configCases/code-generation/require-context-id/folder/b.js
<add>module.exports = "b";
<ide><path>test/configCases/code-generation/require-context-id/index.js
<add>it("should escape require.context id co... | 4 |
PHP | PHP | update all uses of first() | 41b4dd009463bd26c8322857340925692bb83301 | <ide><path>src/Illuminate/Database/Eloquent/Collection.php
<ide> public function find($key, $default = null)
<ide> $key = $key->getKey();
<ide> }
<ide>
<del> return Arr::first($this->items, function ($itemKey, $model) use ($key) {
<add> return Arr::first($this->items, function ($model... | 8 |
Text | Text | make minor corrections in docs | 9f07d9edeb5656b13de17ab8f1ca7347bac334b0 | <ide><path>docs/community/funding.md
<ide> REST framework continues to be open-source and permissively licensed, but we fir
<ide> ## What future funding will enable
<ide>
<ide> * Realtime API support, using WebSockets. This will consist of documentation and support for using REST framework together with Django Channel... | 2 |
Ruby | Ruby | prefer object/nil over `true`/`false` | bc8cc56a2ae0b73276782d66b7dceba1ecd294a2 | <ide><path>activesupport/lib/active_support/message_verifier.rb
<ide> def initialize(secret, options = {})
<ide> end
<ide>
<ide> def valid_message?(signed_message)
<del> return false if signed_message.blank?
<del>
<add> return if signed_message.blank?
<add>
<ide> data, digest = signed_mes... | 1 |
PHP | PHP | fix edge case with using now() in query | c049fcb4fb95b2a3c604cec0095ad024c4d07ec7 | <ide><path>tests/TestCase/ORM/QueryRegressionTest.php
<ide> public function testFunctionInWhereClause()
<ide> {
<ide> $this->loadFixtures('Comments');
<ide> $table = $this->getTableLocator()->get('Comments');
<del> $table->updateAll(['updated' => Time::tomorrow()], ['id' => 6]);
<add> ... | 1 |
Ruby | Ruby | apply tests to new head format | 458f9a008cc5316de9ec18ebae3b0f3990583540 | <ide><path>Library/Homebrew/test/test_formula.rb
<ide> def test_version_with_revision
<ide> assert_equal PkgVersion.parse("1.0_1"), f.pkg_version
<ide> end
<ide>
<del> def test_head_ignores_revisions
<add> def test_head_uses_revisions
<ide> f = formula("test", Pathname.new(__FILE__).expand_path, :head) do
... | 2 |
Ruby | Ruby | fix missing dependency on hash#to_query | 399d5338acdebd51648c8ed784e38e7a7c2d8867 | <ide><path>actionpack/lib/action_controller/test_case.rb
<ide> require 'rack/session/abstract/id'
<ide> require 'active_support/core_ext/object/blank'
<add>require 'active_support/core_ext/object/to_query'
<ide>
<ide> module ActionController
<ide> module TemplateAssertions | 1 |
Javascript | Javascript | use node_env to enable/disable opbeat frontend | 73b8ba96afb85817cde55b35d0e00e93a4db5dd2 | <ide><path>client/index.js
<del>/* global __OPBEAT__ORG_ID __OPBEAT__APP_ID */
<ide> import initOpbeat from 'opbeat-react';
<ide> import { createOpbeatMiddleware } from 'opbeat-react/redux';
<ide> import Rx from 'rx';
<ide> import {
<ide> saveToColdStorage
<ide> } from './cold-reload';
<ide>
<del>const localhostRE =... | 2 |
PHP | PHP | update queue config with sqs example | 96237d884e75c9fcadf945c9bf6516bf27c70b2e | <ide><path>app/config/queue.php
<ide> |
<ide> */
<ide>
<del> 'default' => 'sync',
<add> 'default' => 'sqs',
<ide>
<ide> /*
<ide> |--------------------------------------------------------------------------
<ide> 'queue' => 'default',
<ide> ),
<ide>
<add> 'sqs' => array(
<add> 'driver' => 'sqs',
<add> '... | 1 |
Text | Text | add doc for starting ci job via label | d5e64952fe1697ba7d085ae75dc6839e5975ec59 | <ide><path>doc/guides/collaborator-guide.md
<ide> Copy/paste the URL for the job into a comment in the pull request.
<ide> [`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)
<ide> is an exception where the GitHub bot will automatically post for you.
<ide>
<add>The [`node-test-pull-request`](... | 1 |
Javascript | Javascript | remove use of hastemap class | a435fbcbd1cb984ea67a21401ffb11d97d548a76 | <ide><path>packager/src/node-haste/index.js
<ide>
<ide> const Cache = require('./Cache');
<ide> const DependencyGraphHelpers = require('./DependencyGraph/DependencyGraphHelpers');
<del>const HasteMap = require('./DependencyGraph/HasteMap');
<ide> const JestHasteMap = require('jest-haste-map');
<ide> const Module = req... | 1 |
Text | Text | match text with translation file example | c41576ea45c4b092c6dd105ec6bb1b9c8830016e | <ide><path>guides/source/i18n.md
<ide> en:
<ide> long: "%B %d, %Y"
<ide> ```
<ide>
<del>So, all of the following equivalent lookups will return the `:short` date format `"%B %d"`:
<add>So, all of the following equivalent lookups will return the `:short` date format `"%b %d"`:
<ide>
<ide> ```ruby
<ide> I18n.t 'd... | 1 |
Javascript | Javascript | add test case for process.dlopen with undefined | 2355c843ba935323a160bf44da33ccf756086f97 | <ide><path>test/parallel/test-process-dlopen-undefined-exports.js
<add>'use strict';
<add>
<add>require('../common');
<add>const assert = require('assert');
<add>
<add>const someBindingPath = './test/addons/hello-world/build/Release/binding.node';
<add>
<add>assert.throws(() => {
<add> process.dlopen({ exports: undefi... | 1 |
Text | Text | fix spelling in changelog | f0a8bc3f8411c469a7d80244b843446dfd759a36 | <ide><path>CHANGELOG.md
<ide> See https://github.com/nodejs/io.js/labels/confirmed-bug for complete and curren
<ide> Full details at https://github.com/nodejs/io.js/wiki/Breaking-Changes#200-from-1x
<ide>
<ide> * V8 upgrade to 4.2, minor changes to C++ API
<del>* `os.tmpdir()` is now cross-platform consistent and will... | 1 |
Javascript | Javascript | use buffer.from instead of new buffer | 7f303e5260734c118005fec331d2ef7e650426af | <ide><path>lib/Compiler.js
<ide> class Compiler extends Tapable {
<ide> let content = source.source();
<ide>
<ide> if(!Buffer.isBuffer(content)) {
<del> content = new Buffer(content, "utf8"); // eslint-disable-line
<add> content = Buffer.from(content, "utf8");
<ide> }
<ide>
<ide> source.... | 5 |
PHP | PHP | improve error message for missing shells | bb153ca1074f5b7228c6526d6a90724d75221494 | <ide><path>src/Console/Exception/MissingShellException.php
<ide> class MissingShellException extends Exception
<ide> {
<ide>
<del> protected $_messageTemplate = 'Shell class for "%s" could not be found.';
<add> protected $_messageTemplate = 'Shell class for "%s" could not be found. If you are trying to use a plu... | 1 |
Javascript | Javascript | add missing resizemode prop on image android | f634a0fc2388a34774d9e7dceb0890535c6f7a29 | <ide><path>Libraries/Image/Image.android.js
<ide> var Image = React.createClass({
<ide> * Used to locate this view in end-to-end tests.
<ide> */
<ide> testID: PropTypes.string,
<add> /**
<add> * Determines how to resize the image when the frame doesn't match the raw
<add> * image dimensions.
<a... | 1 |
Python | Python | handle empty eval results in estimator_benchmark. | 7ac267a82d8078bbae58fac87021ed6e4f0e8eb3 | <ide><path>official/resnet/estimator_benchmark.py
<ide> def _report_benchmark(self,
<ide> 'value': exp_per_sec})
<ide> flags_str = flags_core.get_nondefault_flags_as_str()
<ide> self.report_benchmark(
<del> iters=eval_results['global_step'],
<add> iters=eval_results.get('glob... | 1 |
Python | Python | improve tests by designating dtype of sample data | b13326498e7cf7338a397f93a75248509256adc3 | <ide><path>keras/utils/np_utils.py
<ide> def to_categorical(y, num_classes=None):
<ide> if not num_classes:
<ide> num_classes = np.max(y) + 1
<ide> n = y.shape[0]
<del> categorical = np.zeros((n, num_classes))
<add> categorical = np.zeros((n, num_classes), dtype=np.float32)
<ide> categorical[n... | 2 |
Text | Text | adjust readme and release notes | 2aa33ed54460f016c157cbf13e7e122b7040704b | <ide><path>README.md
<ide> There is a live example API for testing purposes, [available here][sandbox].
<ide> # Requirements
<ide>
<ide> * Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
<del>* Django (1.5.6+, 1.6.3+, 1.7, 1.8)
<add>* Django (1.6.3+, 1.7, 1.8)
<ide>
<ide> # Installation
<ide>
<ide><path>docs/topics/release-note... | 2 |
Javascript | Javascript | prefer window.getselection for ie | e7299f60393f95b346285181c6ca8e09d8edea1b | <ide><path>src/browser/eventPlugins/SelectEventPlugin.js
<ide> function getSelection(node) {
<ide> start: node.selectionStart,
<ide> end: node.selectionEnd
<ide> };
<add> } else if (window.getSelection) {
<add> var selection = window.getSelection();
<add> return {
<add> anchorNode: selection... | 1 |
Javascript | Javascript | remove ie8 testswarm hacks for offset | 3478cbb4d4f59473512891a6ba83158d47f26bf1 | <ide><path>test/unit/offset.js
<ide> testIframe("offset/relative", "relative", function( $ ) {
<ide> testIframe("offset/static", "static", function( $ ) {
<ide>
<ide> // IE is collapsing the top margin of 1px; detect and adjust accordingly
<del> var ie = $("#static-1").offset().top === 6,
<del> swarmy = document.doc... | 1 |
Go | Go | improve handling of rootlesskit_parent_euid | aa4dce742fca6bebe8254a9309364e2cd8f5d76c | <ide><path>daemon/daemon_unix.go
<ide> func (daemon *Daemon) setupSeccompProfile() error {
<ide>
<ide> // RawSysInfo returns *sysinfo.SysInfo .
<ide> func (daemon *Daemon) RawSysInfo(quiet bool) *sysinfo.SysInfo {
<del> var opts []sysinfo.Opt
<add> var siOpts []sysinfo.Opt
<ide> if daemon.getCgroupDriver() == cgroupS... | 2 |
Ruby | Ruby | initialize deprecators before configuring them | 3d6a7b2faab61305fc4c8d84780c4d48483464b5 | <ide><path>actioncable/lib/action_cable/engine.rb
<ide> class Engine < Rails::Engine # :nodoc:
<ide> config.action_cable.mount_path = ActionCable::INTERNAL[:default_mount_path]
<ide> config.action_cable.precompile_assets = true
<ide>
<del> initializer "action_cable.deprecator" do |app|
<add> initializer ... | 12 |
Javascript | Javascript | fix typo in _http-benchmarkers.js | d8965d5b0ec57d628e11bba17d0ff14aad28bf78 | <ide><path>benchmark/_http-benchmarkers.js
<ide> exports.run = function(options, callback) {
<ide> const result = benchmarker.processResults(stdout);
<ide> if (result === undefined) {
<ide> callback(new Error(
<del> `${options.benchmarker} produced strange output: ${stdout}`, code));
<add> `... | 1 |
Python | Python | fix tf 2.0 tf.data api usage | 1577ed076cab2d38be4885a1b0678756f7aacd8b | <ide><path>official/recommendation/data_test.py
<ide> def drain_dataset(self, dataset, g):
<ide> # type: (tf.data.Dataset, tf.Graph) -> list
<ide> with self.session(graph=g) as sess:
<ide> with g.as_default():
<del> batch = dataset.make_one_shot_iterator().get_next()
<add> batch = tf.compat.... | 1 |
PHP | PHP | fix error code | cec1b1bf947ce47a2c218a37544dff2b24635db2 | <ide><path>app/Exceptions/Handler.php
<ide> protected function invalid($request, ValidationException $exception)
<ide> $errors = $exception->validator->errors()->messages();
<ide>
<ide> return $request->expectsJson()
<del> ? response()->json(['message' => $exception->getMessage(), 'e... | 1 |
Python | Python | remove forgotten log message | 8fc5bbf9fef7af5e4bf90d08bd7c5bae0a327815 | <ide><path>glances/plugins/glances_sensors.py
<ide> def get(self, type='temperature_core'):
<ide> """Get sensors list."""
<ide> self.__update__()
<ide> if type == 'temperature_core':
<del> logger.info(type)
<ide> ret = [s for s in self.sensors_list if s['unit'] == SENSOR_T... | 1 |
Python | Python | add comment explaining _block_dispatcher | 024c728ef42d12a2bf10ce3b44791301c4d66f80 | <ide><path>numpy/core/shape_base.py
<ide> def _block(arrays, max_depth, result_ndim, depth=0):
<ide>
<ide>
<ide> def _block_dispatcher(arrays):
<add> # Use type(...) is list to match the behavior of np.block(), which special
<add> # cases list specifically rather than allowing for generic iterables or
<add> ... | 1 |
Javascript | Javascript | upgrade dllmodulefactory to es6 | af1b2fc8e211722a2b5d512b10521015b2c53be0 | <ide><path>lib/DllModuleFactory.js
<ide> MIT License http://www.opensource.org/licenses/mit-license.php
<ide> Author Tobias Koppers @sokra
<ide> */
<add>"use strict";
<add>
<ide> var Tapable = require("tapable");
<ide> var DllModule = require("./DllModule");
<ide>
<del>function DllModuleFactory() {
<del> Tapable.cal... | 1 |
Python | Python | add test cases for it | cf884251d98f7a67a5b35055caa4108500dbc654 | <ide><path>libcloud/test/storage/test_azure_blobs.py
<ide>
<ide> import os
<ide> import sys
<del>import unittest
<ide> import tempfile
<ide> from io import BytesIO
<ide>
<ide> from libcloud.utils.py3 import httplib
<ide> from libcloud.utils.py3 import urlparse
<ide> from libcloud.utils.py3 import parse_qs
<ide> from ... | 1 |
Text | Text | fix typos in asset_pipeline.md | f7d825d778062a6a337e9064aabdb0fda7db12d2 | <ide><path>guides/source/asset_pipeline.md
<ide> gem 'coffee-rails'
<ide> ```
<ide>
<ide> Using the `--skip-sprockets` option will prevent Rails 4 from adding
<del>`sass-rails` and `uglifier` to Gemfile, so if you later want to enable
<add>`sass-rails` and `uglifier` to your Gemfile, so if you later want to enable
<id... | 1 |
PHP | PHP | fix annotations around entity | 4774e2604470ed3b0d29c554f0afa08ecb53b009 | <ide><path>src/ORM/Behavior/Translate/TranslateTrait.php
<ide> trait TranslateTrait
<ide> * it.
<ide> *
<ide> * @param string $language Language to return entity for.
<del> * @return $this|\Cake\ORM\Entity
<add> * @return $this|\Cake\Datasource\EntityInterface
<ide> */
<ide> public funct... | 3 |
Python | Python | add linear congruential generator | 875c6cde16e21684b96ad5545c68ac1667b157bc | <ide><path>other/LinearCongruentialGenerator.py
<add>__author__ = "Tobias Carryer"
<add>
<add>from time import time
<add>
<add>class LinearCongruentialGenerator(object):
<add> """
<add> A pseudorandom number generator.
<add> """
<add>
<add> def __init__( self, multiplier, increment, modulo, seed=int(tim... | 1 |
Javascript | Javascript | fix ocean shader for webgl2 | d2c7ae35a46970303dbc60911d2085b13cd641f5 | <ide><path>examples/js/shaders/OceanShaders.js
<ide> THREE.OceanShaders[ 'ocean_initial_spectrum' ] = {
<ide> 'return sqrt(G * k * (1.0 + pow2(k / KM)));',
<ide> '}',
<ide>
<add> '#if __VERSION__ == 100',
<ide> 'float tanh (float x) {',
<ide> 'return (1.0 - exp(-2.0 * x)) / (1.0 + exp(-2.0 * x));',
<ide> ... | 2 |
Go | Go | add unit test for swarm labels on containers | 6f8d17dad3cf29c2ff2d019204c68227ebadfcc8 | <ide><path>daemon/cluster/executor/container/container_test.go
<ide> func TestIsolationConversion(t *testing.T) {
<ide> })
<ide> }
<ide> }
<add>
<add>func TestContainerLabels(t *testing.T) {
<add> c := &containerConfig{
<add> task: &swarmapi.Task{
<add> ID: "real-task.id",
<add> Spec: swarmapi.TaskSpec{
<add> ... | 1 |
PHP | PHP | add additional container tests | 2154cc9b3ce6b269e12eca52311b988633b8323d | <ide><path>tests/Container/ContainerTest.php
<ide> public function testBindIfDoesntRegisterIfServiceAlreadyRegistered()
<ide> $this->assertEquals('Taylor', $container->make('name'));
<ide> }
<ide>
<add> public function testBindIfDoesRegisterIfServiceNotRegisteredYet()
<add> {
<add> $container ... | 1 |
Text | Text | add challenge name to issue template | b834b0675f884041383df20a1e2a61ca7401e767 | <ide><path>.github/ISSUE_TEMPLATE.md
<del>#### FreeCodeCamp Issue template
<del>To Use this Template:
<del>* Fill out what you can
<del>* Delete what you do not fill out
<add><!--
<add>FreeCodeCamp Issue Template
<add>NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at
<add>https://gitter.im/FreeCodeCamp/Help
<add>-->... | 1 |
Python | Python | add test for astype to stringlength tests | 22ee97190db0e2432e21d3d830e04776feb0f0a6 | <ide><path>numpy/core/tests/test_array_coercion.py
<ide> def test_basic_stringlength(self, obj):
<ide> # A nested array is also discovered correctly
<ide> arr = np.array(obj, dtype="O")
<ide> assert np.array(arr, dtype="S").dtype == expected
<add> # Check that .astype() behaves identical
... | 1 |
Javascript | Javascript | simplify animation system | ec2a091f937a9b95c1812ca81187b9dc41e2a766 | <ide><path>examples/js/loaders/FBXLoader.js
<ide>
<ide> }
<ide>
<del> // Parses animation information from nodes in
<del> // FBXTree.Objects.subNodes.AnimationCurve: child of an AnimationCurveNode, holds the raw animation data (e.g. x axis rotation )
<del> // FBXTree.Objects.subNodes.AnimationCurveNode: child of an ... | 1 |
Java | Java | check the user of a sockjs request | dc5b5ca8ee09c890352f89b2dae58bc0132d6545 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java
<ide> package org.springframework.web.socket.sockjs.transport;
<ide>
<ide> import java.io.IOException;
<add>import java.net.InetSocketAddress;
<add>import java.security.Principal;
<ide> import ... | 2 |
Javascript | Javascript | fix jshint warnings | 47b5ad60ae798787bad97f2d478dab396536b752 | <ide><path>src/elements/element.line.js
<ide> module.exports = function(Chart) {
<ide> points.push(points[0]);
<ide> }
<ide>
<add> var index, current, previous, currentVM;
<add>
<ide> // Fill Line
<ide> if (points.length && vm.fill) {
<ide> ctx.beginPath();
<ide>
<del> for (var index = 0; index ... | 1 |
Python | Python | fix exception message from 3190abcd. refs | 0a0fe8f71d54e8479e3050ef3bb9d545fd734a65 | <ide><path>django/db/models/fields/related.py
<ide> def __set__(self, instance, value):
<ide> related_pk = getattr(instance, self.related.field.rel.get_related_field().attname)
<ide> if related_pk is None:
<ide> raise ValueError('Cannot assign "%r": "%s" instance isn\'t saved in the database... | 1 |
Javascript | Javascript | put perf integration behind a feature flag | 3b27160f82d9934f7ea9ddf064424634526702ca | <ide><path>packages/react-cs-renderer/src/ReactNativeCSFeatureFlags.js
<ide> * @flow
<ide> */
<ide>
<add>import invariant from 'fbjs/lib/invariant';
<add>
<ide> import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
<ide> import typeof * as CSFeatureFlagsType from './ReactNativeCSFeatureFlags';
<ide>
... | 10 |
Ruby | Ruby | handle nil newest_committed_revision | 0dd004f53d8c513b9b0f5fffcbf07e82bfb567fe | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def audit_revision_and_version_scheme
<ide> !previous_revision.nil? &&
<ide> current_revision < previous_revision
<ide> problem "revision should not decrease (from #{previous_revision} to #{current_revision})"
<del> elsif current_re... | 1 |
Go | Go | fix copy from a "created" container. fixes | 289ee90b04a2315cd36d6ff363b41c89f8ebf2aa | <ide><path>daemon/container.go
<ide> import (
<ide> "github.com/docker/docker/image"
<ide> "github.com/docker/docker/pkg/archive"
<ide> "github.com/docker/docker/pkg/broadcastwriter"
<add> "github.com/docker/docker/pkg/fileutils"
<ide> "github.com/docker/docker/pkg/ioutils"
<ide> "github.com/docker/docker/pkg/json... | 3 |
Text | Text | add 0.70.2 changelog | 3610168bb0fc37d393b10f30e21f66b4eac7d1bd | <ide><path>CHANGELOG.md
<ide> # Changelog
<ide>
<add>## v0.70.2
<add>
<add>### Added
<add>
<add>#### iOS specific
<add>
<add>- Add support for "Prefer Cross-Fade Transitions" into AccessibilityInfo ([be7c50fefd](https://github.com/facebook/react-native/commit/be7c50fefd7f13201fb538ded93d91b374341173) by [@gabrieldonad... | 1 |
PHP | PHP | use routable key name | 3249c620a19cb97f6f2ff55b9712ac4d3326996a | <ide><path>src/Illuminate/Routing/Router.php
<ide> protected function substituteImplicitBindings($route)
<ide>
<ide> if (array_key_exists($parameter->name, $parameters) &&
<ide> ! $route->getParameter($parameter->name) instanceof Model) {
<del> $method = $parameter->isDefault... | 1 |
Python | Python | set version to v3.0.0a5 | 71242327b2c7e27dd76db1235b772176fb4716a3 | <ide><path>spacy/about.py
<ide> # fmt: off
<ide> __title__ = "spacy-nightly"
<del>__version__ = "3.0.0a4"
<add>__version__ = "3.0.0a5"
<ide> __release__ = True
<ide> __download_url__ = "https://github.com/explosion/spacy-models/releases/download"
<ide> __compatibility__ = "https://raw.githubusercontent.com/explosion/sp... | 1 |
Text | Text | specify request method in guides [ci skip] | 867138aa9909e8371340e38db12faf59a43ae31e | <ide><path>guides/source/action_controller_overview.md
<ide> NOTE: Support for parsing XML parameters has been extracted into a gem named `ac
<ide> The `params` hash will always contain the `:controller` and `:action` keys, but you should use the methods `controller_name` and `action_name` instead to access these value... | 2 |
Javascript | Javascript | fix some cors issues in ie | 3a51db27f26d8e2c49923566e376938a5f533be1 | <ide><path>fixtures/src/components/Header.js
<ide> const Header = React.createClass({
<ide> return { version, versions };
<ide> },
<ide> componentWillMount() {
<del> fetch('http://api.github.com/repos/facebook/react/tags')
<add> fetch('https://api.github.com/repos/facebook/react/tags', { mode: 'cors' })
<... | 1 |
PHP | PHP | add localizedtime() to datetime object test | 52e592e6a1a58504100a16f18c0aa1c6eabec968 | <ide><path>tests/TestCase/Validation/ValidationTest.php
<ide> public function testDateTimeObject()
<ide> $this->assertTrue(Validation::date($dateTime));
<ide> $this->assertTrue(Validation::time($dateTime));
<ide> $this->assertTrue(Validation::dateTime($dateTime));
<add> $this->assertTrue(... | 1 |
Python | Python | add example for ma.unique function | 1d556d97b20d9a6e1d6fa4dbfd6672e4b2bedeff | <ide><path>numpy/ma/extras.py
<ide> def unique(ar1, return_index=False, return_inverse=False):
<ide> --------
<ide> numpy.unique : Equivalent function for ndarrays.
<ide>
<add> Examples
<add> --------
<add> >>> a = [1, 2, 1000, 2, 3]
<add> >>> mask = [0, 0, 1, 0, 0]
<add> >>> masked_a = ma.maske... | 1 |
Text | Text | translate contributing.md to arabic | abb7a626a92c4cee97c071b955e71628000fbaca | <ide><path>CONTRIBUTING.md
<ide> <!-- Do not translate this table -->
<ide> <td> Read these guidelines in </td>
<ide> <td><a href="/CONTRIBUTING.md"> English </a></td>
<del> <td><a href="/docs/arabic/CONTRIBUTING.md"> عربى </a></td>
<add> <td><a href="/docs/arabic/CONTRIBUTING.md">... | 32 |
Text | Text | add solutions to bootstrap challenges | c08f3785cba163becb98b68ef99ecaab6e0eb80a | <ide><path>curriculum/challenges/english/03-front-end-libraries/bootstrap/add-font-awesome-icons-to-all-of-our-buttons.english.md
<ide> tests:
<ide> ## Solution
<ide> <section id='solution'>
<ide>
<del>```js
<del>// solution required
<add>```html
<add><link href="https://fonts.googleapis.com/css?family=Lobster" rel="s... | 3 |
Javascript | Javascript | remove unstable_ prefix from suspense | d75c69e0cf2a842adc47edab87ca5103411e6949 | <ide><path>fixtures/dom/src/components/fixtures/suspense/index.js
<ide> import TestCase from '../../TestCase';
<ide> const React = window.React;
<ide> const ReactDOM = window.ReactDOM;
<ide>
<del>const Suspense = React.unstable_Suspense;
<add>const Suspense = React.Suspense;
<ide>
<ide> let cache = new Set();
<ide>
... | 16 |
PHP | PHP | fix spelling of 'optionally' | dc7c76d28d5dad3ee1223be6019f3cad4afded13 | <ide><path>src/Illuminate/Support/helpers.php
<ide> function windows_os()
<ide>
<ide> if (! function_exists('with')) {
<ide> /**
<del> * Return the given value, optionaly passed through the given callback.
<add> * Return the given value, optionally passed through the given callback.
<ide> *
<ide> ... | 1 |
Javascript | Javascript | remove erroneous whitespace | 8de83725ac3aa05a12acbbd27012c4282af7635c | <ide><path>lib/util.js
<ide> function getPrefix(constructor, tag) {
<ide> return '';
<ide> }
<ide>
<del>function formatValue(ctx, value, recurseTimes, ln) {
<add>function formatValue(ctx, value, recurseTimes) {
<ide> // Primitive types cannot have properties
<ide> if (typeof value !== 'object' && typeof value !=... | 4 |
Ruby | Ruby | move path utils out of formula.rb | 1b372d7840a60c8d592aa03e5c95fb41a6c5fb6b | <ide><path>Library/Homebrew/extend/fileutils.rb
<add>require 'fileutils'
<add>
<add># We enhance FileUtils to make our Formula code more readable.
<add>module Homebrew::FileUtils
<add> include FileUtils
<add>
<add> # Create a temporary directory then yield. When the block returns,
<add> # recursively delete the temp... | 2 |
Ruby | Ruby | rescue a specific exception | 01dc9c4900b42d8d3556c316dbcb4a8597d8b7f4 | <ide><path>Library/Contributions/cmd/brew-pull.rb
<ide> def tap arg
<ide>
<ide> begin
<ide> safe_system 'git', 'am', *patch_args
<del> rescue => e
<add> rescue ErrorDuringExecution
<ide> system 'git', 'am', '--abort'
<ide> odie 'Patch failed to apply: aborted.'
<ide> end | 1 |
Python | Python | remove other color_style override | b3cec920a2a7d547944823c539a7ebd99b3af23a | <ide><path>django/core/management/commands/makemigrations.py
<ide> from optparse import make_option
<ide>
<ide> from django.core.management.base import BaseCommand
<del>from django.core.management.color import color_style
<ide> from django.core.exceptions import ImproperlyConfigured
<ide> from django.db import connect... | 1 |
Go | Go | fix ipmask marshalling | 1fe48e8608717139d24de937c2d8ea86259769a7 | <ide><path>libnetwork/drivers/overlay/peerdb.go
<ide> type peerEntry struct {
<ide> }
<ide>
<ide> func (p *peerEntry) MarshalDB() peerEntryDB {
<add> ones, bits := p.peerIPMask.Size()
<ide> return peerEntryDB{
<del> eid: p.eid,
<del> vtep: p.vtep.String(),
<del> peerIPMask: p.peerIPMask.String(),
<del... | 2 |
Ruby | Ruby | use a lookup table for `assert_response` | 908bc79729fdb3cc2acbd346d9ed34c9286d57cc | <ide><path>actionpack/lib/action_dispatch/testing/assertions/response.rb
<ide> module ActionDispatch
<ide> module Assertions
<ide> # A small suite of assertions that test responses from \Rails applications.
<ide> module ResponseAssertions
<add> RESPONSE_PREDICATES = { # :nodoc:
<add> success: :su... | 2 |
Text | Text | add all descriptions in app directory [skip ci] | c1a3ab2227930ee27dc8039ca91091a02833e06d | <ide><path>guides/source/engines.md
<ide> important parts about namespacing, and is discussed later in the
<ide>
<ide> Inside the `app` directory are the standard `assets`, `controllers`, `helpers`,
<ide> `jobs`, `mailers`, `models`, and `views` directories that you should be familiar with
<del>from an application. Th... | 1 |
Javascript | Javascript | move progress bar from bundler to server | 8fbf0dad1f211af4f020a6f2d71aef9114c25d30 | <ide><path>packager/react-packager/src/Bundler/index.js
<ide> */
<ide> 'use strict';
<ide>
<add>const Promise = require('promise');
<add>
<ide> const assert = require('assert');
<ide> const fs = require('fs');
<ide> const path = require('path');
<del>const Promise = require('promise');
<del>const ProgressBar = requir... | 2 |
PHP | PHP | add test for facebook style status line | dda401ea376c628a05632066ed09037010db146d | <ide><path>tests/TestCase/Network/Http/ResponseTest.php
<ide> public function testHeaderParsing() {
<ide> $response->headers['Content-Type']
<ide> );
<ide> $this->assertTrue(isset($response->headers));
<add>
<add> $headers = [
<add> 'HTTP/1.0 200',
<add> ];
<add> $response = new Response($headers, 'ok');
<a... | 1 |
PHP | PHP | fix version in docblocks | 5a5bdecf9d11cf85fe4689425625223a021a47fe | <ide><path>src/Database/SchemaCache.php
<ide> *
<ide> * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<ide> * @link https://cakephp.org CakePHP(tm) Project
<del> * @since 3.5.0
<add> * @since 3.6.0
<ide> * @license https://opensource.org/lice... | 2 |
Javascript | Javascript | fix incorrect wording | 36c82fd1275f761232f652c6b8da6c7b03a2fb1b | <ide><path>server/render.js
<ide> async function doRender (req, res, pathname, query, {
<ide>
<ide> if (isResSent(res)) return
<ide>
<del> if (!Document.prototype || !Document.prototype.isReactComponent) throw new Error('_document.js is not exporting a React element')
<add> if (!Document.prototype || !Document.pr... | 1 |
Javascript | Javascript | add try and catch for computedstyle | 90ce2d7143ff5d5006cc7a9784bc52731ab551f4 | <ide><path>src/js/utils/computed-style.js
<ide> function computedStyle(el, prop) {
<ide> }
<ide>
<ide> if (typeof window.getComputedStyle === 'function') {
<del> const computedStyleValue = window.getComputedStyle(el);
<add> let computedStyleValue;
<add>
<add> try {
<add> computedStyleValue = window.g... | 1 |
Javascript | Javascript | replace anonymous function with arrow | ccd1ed9e9199eabdb136908a7676d6eb26198a70 | <ide><path>test/parallel/test-tls-peer-certificate-encoding.js
<ide> const options = {
<ide> ca: [ fixtures.readKey('ca2-cert.pem') ]
<ide> };
<ide>
<del>const server = tls.createServer(options, function(cleartext) {
<add>const server = tls.createServer(options, (cleartext) => {
<ide> cleartext.end('World');
<ide>... | 1 |
Go | Go | move convertvolumes to composetransform package | 7685e80fc9cb79206d81757eee071f0244323600 | <ide><path>api/types/mount/mount.go
<ide> const (
<ide> PropagationSlave Propagation = "slave"
<ide> )
<ide>
<add>// Propagations is the list of all valid mount propagations
<add>var Propagations = []Propagation{
<add> PropagationRPrivate,
<add> PropagationPrivate,
<add> PropagationRShared,
<add> PropagationShared,
<... | 7 |
Mixed | Ruby | remove warning when overwriting existing scopes | 0e8432e97404edf5a259374e6aa0cf47ce009273 | <ide><path>activerecord/CHANGELOG.md
<add>* Remove warning when overwriting existing scopes
<add>
<add> Removes the following unnecessary warning message that appeared when overwriting existing scopes
<add>
<add> ```
<add> Creating scope :my_scope_name. Overwriting existing method "MyClass.my_scope_name" whe... | 4 |
PHP | PHP | add wherekey method | 5526aece584c1d21bc6d1a3d9f294aaaa36b3c50 | <ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> public function find($id, $columns = ['*'])
<ide> return $this->findMany($id, $columns);
<ide> }
<ide>
<del> $this->query->where($this->model->getQualifiedKeyName(), '=', $id);
<del>
<del> return $this->first($columns);
<ad... | 1 |
Go | Go | update verification message | 85fd8213afe9497da5df5583d776659ed187c9e9 | <ide><path>graph/pull.go
<ide> func (s *TagStore) pullV2Tag(eng *engine.Engine, r *registry.Session, out io.Wri
<ide> }
<ide>
<ide> if verified {
<del> out.Write(sf.FormatStatus(localName+":"+tag, "The image you are pulling has been digitally signed by Docker, Inc."))
<add> out.Write(sf.FormatStatus(localName+":"+... | 1 |
Text | Text | fix spelling error | e60f2cada59b15010eb63fdf5e86e57e358bda1e | <ide><path>docs/guides/components.md
<ide> myComponent.on(otherComponent, 'eventName', myFunc);
<ide>
<ide> otherComponent.trigger('eventName');
<ide> // logs 'myFunc called' twice
<del>myComponent.off(ootherComponent.el(), 'eventName', myFunc);
<add>myComponent.off(otherComponent.el(), 'eventName', myFunc);
<ide> myC... | 1 |
Javascript | Javascript | add curly braces around if statements | 11206eca7659fb865c81e69c6510468461cf808d | <ide><path>packages/dev-live-reload/lib/package-watcher.js
<ide> module.exports = class PackageWatcher extends Watcher {
<ide>
<ide> const stylesheetsPath = this.pack.getStylesheetsPath()
<ide>
<del> if (fs.isDirectorySync(stylesheetsPath))
<add> if (fs.isDirectorySync(stylesheetsPath)) {
<ide> this.w... | 4 |
Ruby | Ruby | remove unnecessary scoping | 05d1e9e413a87bee5b0c1c200fa9f84dba0e1d15 | <ide><path>activerecord/test/cases/persistence_test.rb
<ide> def test_update_many_with_invalid_id
<ide> topic_data = { 1 => { "content" => "1 updated" }, 2 => { "content" => "2 updated" }, 99999 => {} }
<ide>
<ide> assert_raise(ActiveRecord::RecordNotFound) do
<del> Topic.where("1=0").scoping { Topic.upda... | 1 |
Javascript | Javascript | pass errorboundary to logcapturederror | 9503abe5c700d0d3be76b45e7841e44ba2eab3ba | <ide><path>src/renderers/shared/fiber/ReactFiberScheduler.js
<ide> export type CapturedError = {
<ide> componentName : ?string,
<ide> componentStack : string,
<ide> error : Error,
<add> errorBoundary : ?Object,
<ide> errorBoundaryFound : boolean,
<ide> errorBoundaryName : string | null,
<ide> willRetry : b... | 1 |
Text | Text | update authentication docs to be an examples list. | 28501c6af4270937f67c460c1358ac4d3e489b43 | <ide><path>docs/authentication.md
<ide> Both of these libraries support either authentication pattern. If you're interes
<ide> - [with-passport](https://github.com/vercel/next.js/tree/canary/examples/with-passport)
<ide> - [with-passport-and-next-connect](https://github.com/vercel/next.js/tree/canary/examples/with-pass... | 1 |
Text | Text | fix links to some headings with special chars | 7d3c0834f3b5083e65e186b4d522390aee7b2ff5 | <ide><path>docs/faq/Performance.md
<ide> hide_title: true
<ide> ## Table of Contents
<ide>
<ide> - [How well does Redux “scale” in terms of performance and architecture?](#how-well-does-redux-scale-in-terms-of-performance-and-architecture)
<del>- [Won't calling “all my reducers” for each action be slow?](#won-t-callin... | 2 |
Ruby | Ruby | use classes instead of strings for exceptions | 560408d01b5b2bba26bc0926802246687e48911b | <ide><path>Library/Homebrew/extend/ARGV.rb
<ide> class UsageError <RuntimeError; end
<ide> class FormulaUnspecifiedError <UsageError; end
<ide> class KegUnspecifiedError <UsageError; end
<ide>
<add>class MultipleVersionsInstalledError <RuntimeError
<add> attr :name
<add>
<add> def initialize name
<add> @name = na... | 1 |
Go | Go | fix tarsum iteration test | 8d9e25dbddc189f4094e0f25a90f2b8a25deec9d | <ide><path>pkg/tarsum/tarsum_test.go
<ide> func TestIteration(t *testing.T) {
<ide> data []byte
<ide> }{
<ide> {
<del> "tarsum+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
<add> "tarsum+sha256:626c4a2e9a467d65c33ae81f7f3dedd4de8ccaee72af73223c4bc4718cbc7bbd",
<ide> Versio... | 1 |
Javascript | Javascript | remove lookup in favor of passed arg | 0c9ea6c67dbc036fde949ce41301c3773ab0f2bc | <ide><path>src/package-transpilation-registry.js
<ide> Object.assign(PackageTranspilationRegistry.prototype, {
<ide> },
<ide>
<ide> transpileWithPackageTranspiler: function (sourceCode, filePath, spec) {
<del> var spec = this.specByFilePath[filePath]
<del>
<ide> Resolve = Resolve || require('resolve')
<ide>... | 1 |
Text | Text | add cii best practices badge to readme.md | fea3ba4f4b19044cac75b90d356c39637f7d7b02 | <ide><path>README.md
<ide> Node.js
<ide> =======
<ide>
<del>[](https://gitter.im/nodejs/node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<add>[](https://gitter.im/nodejs/node?utm_source=badg... | 1 |
Python | Python | add description in docstring | 0df57515070ed11020feb1e5f1fa88112ee5e09e | <ide><path>numpy/lib/arraysetops.py
<ide> def unique(ar, return_index=False, return_inverse=False,
<ide> -----
<ide> When an axis is specified the subarrays indexed by the axis are sorted.
<ide> This is done by making the specified axis the first dimension of the array
<add> (move the axis to the first d... | 1 |
Javascript | Javascript | add apollo state func | 1e3534e1694f2c59b32025357039cd006d6e3532 | <ide><path>examples/with-apollo/lib/apolloClient.js
<ide> import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'
<ide> import { concatPagination } from '@apollo/client/utilities'
<ide> import merge from 'deepmerge'
<ide>
<add>export const APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__'
<add>
<ide> let apol... | 3 |
Javascript | Javascript | delete unused code in reactdomframescheduling | 2d7c754f3ba482d69ee3a06dd101ba12cb4592c9 | <ide><path>packages/shared/ReactDOMFrameScheduling.js
<ide> if (!ExecutionEnvironment.canUseDOM) {
<ide> } else if (typeof requestIdleCallback !== 'function') {
<ide> // Polyfill requestIdleCallback.
<ide>
<del> var scheduledRAFCallback = null;
<ide> var scheduledRICCallback = null;
<ide>
<ide> var isIdleSched... | 1 |
Javascript | Javascript | remove use of innerhtml | 8e3f626f8a0d9b5799633011dc18497d6c03557b | <ide><path>web/viewer.js
<ide> var TextLayerBuilder = function textLayerBuilder(textLayerDiv, pageIdx) {
<ide> function beginText(begin, className) {
<ide> var divIdx = begin.divIdx;
<ide> var div = textDivs[divIdx];
<del> div.innerHTML = '';
<add> div.textContent = '';
<ide>
<ide> var ... | 1 |
Python | Python | remove unused code from spacy pretrain | 0f83b98afad8e533ec482f0b603da9ec18690d6e | <ide><path>spacy/cli/pretrain.py
<ide> def pretrain(
<ide> pretrained_vectors=pretrained_vectors,
<ide> bilstm_depth=0, # Requires PyTorch. Experimental.
<ide> cnn_maxout_pieces=3, # You can try setting this higher
<del> subword_features=True,
<add> subword_fe... | 1 |
Text | Text | improve docs radial linear grid | c6120f9e7143c66d5e7a1b4052ae3b0f1165d5da | <ide><path>docs/axes/radial/linear.md
<ide> Namespace: `options.scales[scaleId]`
<ide> | `pointLabels` | `object` | | Point label configuration. [more...](#point-label-options)
<ide> | `startAngle` | `number` | `0` | Starting angle of the scale. In degrees, 0 is at top.
<ide>
<del>!!!include(axes/_common.md)!!!
<add>#... | 2 |
Javascript | Javascript | fix cancelrequestanimationframe polyfill | bf644ea5ff0f784c8991122692677c30cec39e1d | <ide><path>src/Three.js
<ide> if ( ! self.Int32Array ) {
<ide> for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
<ide> window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
<ide> window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
<d... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.