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 |
|---|---|---|---|---|---|
PHP | PHP | reword exception explanation | a8ef06d60914b41dbe89abf26119a938ed4db1a7 | <ide><path>src/Cache/SimpleCacheEngine.php
<ide> public function setMultiple($values, $ttl = null)
<ide> *
<ide> * @param iterable $keys A list of string-based keys to be deleted.
<ide> * @return bool True if the items were successfully removed. False if there was an error.
<del> * @throws \Psr\Simpl... | 1 |
PHP | PHP | use fluent routes | ef1ef753baa7192cbceb1771d18ce6727aaaf7f5 | <ide><path>app/Providers/RouteServiceProvider.php
<ide> public function map()
<ide> */
<ide> protected function mapWebRoutes()
<ide> {
<del> Route::group([
<del> 'middleware' => 'web',
<del> 'namespace' => $this->namespace,
<del> ], function ($router) {
<del> ... | 1 |
Javascript | Javascript | set the base href of the context in parsehtml | 10fc59007d717432ea126e49ce4142e6c4d5136e | <ide><path>src/core/parseHTML.js
<ide> jQuery.parseHTML = function( data, context, keepScripts ) {
<ide> context = false;
<ide> }
<ide>
<del> // Stop scripts or inline event handlers from being executed immediately
<del> // by using document.implementation
<del> context = context || ( support.createHTMLDocument ?
<... | 2 |
PHP | PHP | fix coding standards | 5aa3113cf8d13615ca458b174909b4dcbcc08d1c | <ide><path>Cake/ORM/Entity.php
<ide> public function dirty($property, $isDirty = null) {
<ide> unset($this->_dirty[$property]);
<ide> return false;
<ide> }
<del>
<add>
<ide> $this->_dirty[$property] = true;
<ide> return true;
<ide> }
<ide><path>Cake/ORM/Query.php
<ide> public function first() {
<ide> $... | 3 |
Python | Python | add test for boolean insert | 1688b29fb1ea4e548762ae79522c50abce88d55b | <ide><path>numpy/lib/tests/test_function_base.py
<ide> def test_basic(self):
<ide> assert_equal(insert(a, [1, 1, 1], [1, 2, 3]), [1, 1, 2, 3, 2, 3])
<ide> assert_equal(insert(a, 1,[1,2,3]), [1, 1, 2, 3, 2, 3])
<ide> assert_equal(insert(a,[1,2,3],9),[1,9,2,9,3,9])
<add> b = np.array([0, 1]... | 1 |
Javascript | Javascript | note the changes to gitrepository | 15b13e3ddc15d608d5c839a9ee160a3d1a6b56a8 | <ide><path>src/git-repository-async.js
<ide> const submoduleMode = 57344 // TODO: compose this from libgit2 constants
<ide> // Just using this for _.isEqual and _.object, we should impl our own here
<ide> import _ from 'underscore-plus'
<ide>
<add>// For the most part, this class behaves the same as `GitRepository`, w... | 1 |
Javascript | Javascript | fix javascript strict warnings in driver.js | 31cb9b49d502c387477e6c7f42da127243e6021b | <ide><path>test/driver.js
<ide> function nextTask() {
<ide> cleanup();
<ide>
<ide> if (currentTaskIdx == manifest.length) {
<del> return done();
<add> done();
<add> return;
<ide> }
<ide> var task = manifest[currentTaskIdx];
<ide> task.round = 0;
<ide> function nextTask() {
<ide> }
<ide>
<ide> funct... | 1 |
PHP | PHP | add missing options to numberhelper docblocks | 730ac10ae4d54b7dfb1af211ee804df7d2910eba | <ide><path>lib/Cake/View/Helper/NumberHelper.php
<ide> class NumberHelper extends AppHelper {
<ide> */
<ide> protected $_currencyDefaults = array(
<ide> 'wholeSymbol' => '', 'wholePosition' => 'before', 'fractionSymbol' => '', 'fractionPosition' => 'after',
<del> 'zero' => '0', 'places' => 2, 'thousands' => ',', '... | 1 |
Ruby | Ruby | remove spaces around make-style variables | fb8707df4e894e4828b6357d915326a98d81c534 | <ide><path>Library/Homebrew/utils.rb
<ide> module HomebrewInreplaceExtension
<ide> # value with "new_value", or removes the definition entirely.
<ide> # See inreplace in utils.rb
<ide> def change_make_var! flag, new_value
<del> new_value = "#{flag} = #{new_value}" unless new_value.to_s.empty?
<add> new_valu... | 1 |
Java | Java | add support for rsocket interface client | 8423b2cab77f0ecfdde93324f7a1e6a6cd0f2a2f | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/Payload.java
<ide> /*
<del> * Copyright 2002-2015 the original author or authors.
<add> * Copyright 2002-2022 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide>... | 22 |
Ruby | Ruby | allow pre-releases in cask-versions | 9ac31942fbf56518dc9bdf84748b3450265a1acb | <ide><path>Library/Homebrew/cask/audit.rb
<ide> def check_appcast_contains_version
<ide> end
<ide>
<ide> def check_github_prerelease_version
<add> return if cask.tap == "homebrew/cask-versions"
<add>
<ide> odebug "Auditing GitHub prerelease"
<ide> user, repo = get_repo_data(%r{https?://github\... | 1 |
Python | Python | replace bertlayernorm with layernorm | 9fd937ead17c21c671fd81abb62619893bffd200 | <ide><path>examples/research_projects/movement-pruning/emmental/modeling_bert_masked.py
<ide> from emmental.modules import MaskedLinear
<ide> from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_model_forward
<ide> from transformers.modeling_utils import PreTrainedModel, prune_linear_layer
... | 1 |
Text | Text | update documentation for new test log format | 6fe38e3947c0e744c4f6c48956044fc99a577806 | <ide><path>docs/project/test-and-docs.md
<ide> Run the entire test suite on your current repository:
<ide> successfully, you see the output concludes with something like this:
<ide>
<ide>
<del> [PASSED]: top - sleep process should be listed in privileged mode
<del> [PASSED]: version - verify that it... | 1 |
Javascript | Javascript | add noop stub for fswatcher.prototype.start | f04810531afba30c77163fe18f4d16c540d94eb9 | <ide><path>lib/internal/fs/watchers.js
<ide> FSWatcher.prototype[kFSWatchStart] = function(filename,
<ide> }
<ide> };
<ide>
<add>// To maximize backward-compatiblity for the end user,
<add>// a no-op stub method has been added instead of
<add>// totally removing FSWatcher.prototpye.start.
<add>// This should not be ... | 1 |
PHP | PHP | fix failing tests in phpunit 3.7.0-rc2 | d26040e3aa2173dfc3562ceb522287eb1083a5db | <ide><path>lib/Cake/Test/Case/Event/CakeEventManagerTest.php
<ide> public function testDispatchReturnValue() {
<ide> $manager->attach(array($anotherListener, 'listenerFunction'), 'fake.event');
<ide> $event = new CakeEvent('fake.event');
<ide>
<del> $firstStep = clone $event;
<del> $listener->expects($this->at(0... | 1 |
Text | Text | fix typo in the changelog | 7368bbd4046a062a45704f9f7449da4987e75871 | <ide><path>activerecord/CHANGELOG.md
<ide> #or
<ide> ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags = '--no-defaults --skip-add-drop-table'
<ide> ```
<del>
<add>
<ide> And also use it passing a hash, with one or more keys, where the key
<ide> is the adapter
<ide>
<ide> ```ruby
<id... | 1 |
Python | Python | fix example docstring | ced84d53bc01e1623da671187588a63dcc9a5a11 | <ide><path>examples/antirectifier.py
<ide> class Antirectifier(Layer):
<ide> Antirectifier allows to return all-positive outputs like ReLU,
<ide> without discarding any data.
<ide>
<del> Further, the samplewise normalization of the output
<del> allows to interpret output features as a pro... | 1 |
PHP | PHP | add a failing test | 508f3be6357c24796b1a7c677664e89356c8afed | <ide><path>tests/TestCase/Routing/Route/RouteTest.php
<ide> public function testMatchWithMultibytePattern()
<ide> $this->assertEquals("/articles/view/\xC4\x81", $result);
<ide> }
<ide>
<add> /**
<add> * Test that match() matches explicit GET routes
<add> *
<add> * @return void
<add> */
<... | 1 |
Text | Text | add supported platforms list | ef4768754c870e3a0b0d2e09c062cfbde03afb63 | <ide><path>BUILDING.md
<ide> If you consistently can reproduce a test failure, search for it in the
<ide> [Node.js issue tracker](https://github.com/nodejs/node/issues) or
<ide> file a new issue.
<ide>
<add>## Supported platforms
<add>
<add>This list of supported platforms is current as of the branch / release to
<add... | 1 |
Text | Text | translate 02.2 to korean | a04597eaa10ecbfdd8ec8ee0885721ff534cc6eb | <ide><path>docs/docs/02.2-jsx-spread.ko-KR.md
<add>---
<add>id: jsx-spread-ko-KR
<add>title: JSX 스프레드 어트리뷰트
<add>permalink: jsx-spread-ko-KR.html
<add>prev: jsx-in-depth-ko-KR.html
<add>next: jsx-gotchas-ko-KR.html
<add>---
<add>
<add>미리 컴포넌트에 넣을 모든 프로퍼티를 알게 된다면, JSX를 사용하기 쉬워집니다.
<add>
<add>```javascript
<add> var com... | 1 |
Javascript | Javascript | support ipv6 urls | b643f0d3223a627ef813f0777524e25d2dd95371 | <ide><path>src/ngResource/resource.js
<ide> function shallowClearAndCopy(src, dst) {
<ide> */
<ide> angular.module('ngResource', ['ng']).
<ide> provider('$resource', function() {
<add> var PROTOCOL_AND_DOMAIN_REGEX = /^https?:\/\/[^\/]*/;
<ide> var provider = this;
<ide>
<ide> this.defaults = {
<ide> ang... | 2 |
Go | Go | remove container rootfs mountpath after umount | 92e45b81e0a8b68d9567a2068247460a1ba59600 | <ide><path>daemon/graphdriver/devmapper/deviceset.go
<ide> func (devices *DeviceSet) UnmountDevice(hash, mountPath string) error {
<ide> }
<ide> logrus.Debug("devmapper: Unmount done")
<ide>
<add> // Remove the mountpoint here. Removing the mountpoint (in newer kernels)
<add> // will cause all other instances of thi... | 2 |
Ruby | Ruby | reap the process or make zombies | fe15b9b003fbbfb4805ad2cff5bee6003bd1f749 | <ide><path>Library/Homebrew/formula.rb
<ide> def system cmd, *args
<ide> wr.close
<ide> out << rd.read until rd.eof?
<ide> end
<add> Process.wait
<ide> unless $?.success?
<ide> puts out
<ide> raise | 1 |
Text | Text | add model card for ai4bharat/indic-bert | 35fd3d64e36e5dadde4a63dab75ee3b599293f18 | <ide><path>model_cards/ai4bharat/indic-bert/README.md
<add>---
<add>language: en
<add>license: mit
<add>datasets:
<add>- AI4Bharat IndicNLP Corpora
<add>---
<add>
<add># IndicBERT
<add>
<add>IndicBERT is a multilingual ALBERT model pretrained exclusively on 12 major Indian languages. It is pre-trained on our novel mono... | 1 |
Javascript | Javascript | use hasownproperty checks in object.assign | 25d63b43efdc5a13a174b412233179bb0b79698c | <ide><path>src/vendor/stubs/Object.assign.js
<ide> * @providesModule Object.assign
<ide> */
<ide>
<del>// This is an optimized version that fails on hasOwnProperty checks
<del>// and non objects. It's not spec-compliant. It's a perf optimization.
<del>
<del>var hasOwnProperty = Object.prototype.hasOwnProperty;
<add>... | 1 |
Text | Text | add text about getting help. | fbc399d35c187110425958155dce23299932fd6e | <ide><path>guide/english/linux/10-simple-and-useful-linux-commands/index.md
<ide> ifconfig allows you to see the addresses associated with each TCP/IP interface o
<ide>
<ide> 12. `systemctl`
<ide> This is a command which allows operators to work with the Linux system services. The standard use of the command is `syste... | 1 |
Ruby | Ruby | rename some variables | c4458b36024a20abacc39c069444bb0ac202778a | <ide><path>activerecord/lib/active_record/associations/has_one_through_association.rb
<ide> def replace(record)
<ide>
<ide> private
<ide>
<del> def create_through_record(new_value)
<del> proxy = @owner.send(:association_proxy, @reflection.through_reflection.name)
<del> record = proxy.send(:l... | 1 |
PHP | PHP | fix @param doc | d74ad86b2293c4d7151b65fb370c93cc1f5153eb | <ide><path>src/Database/Type/JsonType.php
<ide> public function marshal($value)
<ide> /**
<ide> * Set json_encode options.
<ide> *
<del> * @param int|null $jsonOptions Options. Use JSON_* flags
<add> * @param int $jsonOptions Options. Use JSON_* flags. Set `0` to reset.
<ide> * @return self... | 1 |
Go | Go | add func to get an io.reader for tail operations | 874867d4e575ef805d71759e703e4f11cce05bd3 | <ide><path>pkg/tailfile/tailfile.go
<ide> package tailfile // import "github.com/docker/docker/pkg/tailfile"
<ide>
<ide> import (
<add> "bufio"
<ide> "bytes"
<add> "context"
<ide> "errors"
<ide> "io"
<ide> "os"
<ide> var eol = []byte("\n")
<ide> // ErrNonPositiveLinesNumber is an error returned if the lines number... | 2 |
Python | Python | replace docs title. easy is a sucky word choice | 4dd7b5f376be7d5f28ba8865cf4ede7ad553b8de | <ide><path>mkdocs.py
<ide> toc += template + '\n'
<ide>
<ide> if filename == 'index.md':
<del> main_title = 'Django REST framework - APIs made easy'
<add> main_title = 'Django REST framework - Web APIs for Django'
<ide> else:
<ide> main_title = main_title +... | 1 |
PHP | PHP | clarify assoc array in docblock | 96b7a217218e5995c703e68be52e813abee0f27e | <ide><path>src/Auth/DigestAuthenticate.php
<ide> public function getUser(ServerRequest $request)
<ide> * Gets the digest headers from the request/environment.
<ide> *
<ide> * @param \Cake\Http\ServerRequest $request Request object.
<del> * @return array|null Array of digest information.
<add> * @... | 31 |
Javascript | Javascript | add test case | a45140d600e2c406e2a3baa446d6253d9f9f8357 | <ide><path>test/HotTestCases.template.js
<ide> const describeCases = config => {
<ide> category.tests.forEach(testName => {
<ide> const testDirectory = path.join(casesPath, category.name, testName);
<ide> const filterPath = path.join(testDirectory, "test.filter.js");
<del> if (fs.existsSync(filterPath... | 6 |
Python | Python | remove some tpu_lib not used at all | 58df0dc6e1e287770bc53c6985021914d5fa422a | <ide><path>official/modeling/model_training_utils.py
<ide> from absl import logging
<ide> import tensorflow as tf
<ide> from official.utils.misc import distribution_utils
<del>from official.utils.misc import tpu_lib
<ide>
<ide> _SUMMARY_TXT = 'training_summary.txt'
<ide> _MIN_SUMMARY_STEPS = 10
<ide><path>official/mod... | 2 |
Python | Python | replace double occurrences as the last step | 0cbddfb190ab9b05b6575fbf818aae17bad4d24a | <ide><path>src/transformers/convert_slow_tokenizer.py
<ide> def normalizer(self, proto):
<ide> list_normalizers = [
<ide> normalizers.Replace("``", '"'),
<ide> normalizers.Replace("''", '"'),
<del> normalizers.Replace(Regex(" {2,}"), " "),
<ide> ]
<ide> if not ... | 1 |
Java | Java | fix checkstyle violation | f1af8a6ae956f2523cb7f2f63710164babac6ddf | <ide><path>spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java
<ide>
<ide> package org.springframework.web.servlet.mvc.method.annotation;
<ide>
<del>import java.awt.*;
<add>import java.awt.Color;
<ide> import java.lang.annotation.Document... | 1 |
Java | Java | support @requestbody flux<part> in webflux | b5089ac09208daa12b19b06924eff95b670eb764 | <ide><path>spring-web/src/main/java/org/springframework/http/codec/DefaultServerCodecConfigurer.java
<ide> import org.springframework.core.codec.Encoder;
<ide> import org.springframework.core.codec.StringDecoder;
<ide> import org.springframework.http.codec.json.Jackson2JsonEncoder;
<del>import org.springframework.http.... | 9 |
Python | Python | add option to disable ansi background colours | ed83538ee13b1156dae73a7b06ff94be057a37b5 | <ide><path>glances/main.py
<ide> def init_args(self):
<ide> dest='disable_log', help='disable log module')
<ide> parser.add_argument('--disable-bold', action='store_false', default=True,
<ide> dest='disable_bold', help='disable bold mode in the terminal')
... | 2 |
Text | Text | retire lead maintainer position in febuary | a9d363fdfed53803955903374ae2cc8bf76251bd | <ide><path>docs/Maintainer-Guidelines.md
<ide> In the same way that Homebrew maintainers are expected to be spending more of th
<ide> Individual Homebrew repositories should not have formal lead maintainers (although those who do the most work will have the loudest voices).
<ide>
<ide> Maintainers should feel even mor... | 1 |
Go | Go | remove deprecated endpoint test | a34d804572882e2251de7769efd075886c76ea10 | <ide><path>integration/container/container_test.go
<ide> func TestContainerInvalidJSON(t *testing.T) {
<ide> defer setupTest(t)()
<ide>
<ide> endpoints := []string{
<del> "/containers/foobar/copy",
<ide> "/containers/foobar/exec",
<ide> "/exec/foobar/start",
<ide> } | 1 |
Text | Text | create model card | 8f7c1c7672386c8bab64c5452f8599f32ec7d8a0 | <ide><path>model_cards/mrm8488/bert-italian-finedtuned-squadv1-it-alfa/README.md
<add>---
<add>language: italian
<add>thumbnail:
<add>---
<add>
<add># Italian BERT :it: fine-tuned on SQuAD_it v1 :book: :mag: :question:
<add>
<add>[Italian BERT base cased](https://huggingface.co/dbmdz/bert-base-italian-cased) fine-tuned... | 1 |
Python | Python | handle leading slash in samba path | d17ae60be4d83e0bdfa6cb3c2c41e2bb1fcbf1b6 | <ide><path>airflow/providers/samba/hooks/samba.py
<ide> def __exit__(self, exc_type, exc_value, traceback):
<ide> self._connection_cache.clear()
<ide>
<ide> def _join_path(self, path):
<del> return f"//{posixpath.join(self._host, self._share, path)}"
<add> return f"//{posixpath.join(self._hos... | 2 |
Javascript | Javascript | check canusedom before calling iseventsupported | 932c45a7ab83746f9a6e1a2f21919492b18e7ba0 | <ide><path>src/eventPlugins/TextChangeEventPlugin.js
<ide> var AbstractEvent = require('AbstractEvent');
<ide> var EventConstants = require('EventConstants');
<ide> var EventPluginHub = require('EventPluginHub');
<ide> var EventPropagators = require('EventPropagators');
<add>var ExecutionEnvironment = require('Executio... | 1 |
Javascript | Javascript | remove more function keywords | 566aca3ce07e6af92e419b1e61f930bc796703e9 | <ide><path>spec/config-spec.js
<ide> describe('Config', () => {
<ide> atom.config.configFilePath = path.join(atom.config.configDirPath, 'atom.config.cson')
<ide> })
<ide>
<del> afterEach(function () {
<add> afterEach(() => {
<ide> atom.config.enablePersistence = false
<ide> fs.removeSync(dotAtomPath)
<... | 1 |
Javascript | Javascript | fix crossorigin propagation in objmtl loader | 4e1beb0b4861c54968c22cee0e40aac8b2247a81 | <ide><path>examples/js/loaders/MTLLoader.js
<ide> THREE.MTLLoader.prototype = {
<ide> }
<ide>
<ide> var materialCreator = new THREE.MTLLoader.MaterialCreator( this.baseUrl, this.options );
<add> materialCreator.crossOrigin = this.crossOrigin
<ide> materialCreator.setMaterials( materialsInfo );
<ide> return ma... | 2 |
Text | Text | remove rdoc formatting from markdown [ci skip] | abefa2f635c09fc51c0f63058acd0d1a46f30f60 | <ide><path>guides/source/active_support_core_extensions.md
<ide> NOTE: Defined in `active_support/core_ext/object/with_options.rb`.
<ide>
<ide> ### JSON support
<ide>
<del>Active Support provides a better implementation of `to_json` than the +json+ gem ordinarily provides for Ruby objects. This is because some classe... | 1 |
Javascript | Javascript | use native array.isarray | 751ebc17f7fc7be26613db0a3cdee05fc401318b | <ide><path>src/Angular.js
<ide> function isDate(value) {
<ide> * @param {*} value Reference to check.
<ide> * @returns {boolean} True if `value` is an `Array`.
<ide> */
<del>function isArray(value) {
<del> return toString.call(value) === '[object Array]';
<del>}
<del>
<add>var isArray = (function() {
<add> if (!is... | 1 |
Python | Python | fix endline in the signal.py | 1fbeb337c467a2be0f999606373fd1ba0e200908 | <ide><path>flask/signals.py
<ide> def _fail(self, *args, **kwargs):
<ide> appcontext_tearing_down = _signals.signal('appcontext-tearing-down')
<ide> appcontext_pushed = _signals.signal('appcontext-pushed')
<ide> appcontext_popped = _signals.signal('appcontext-popped')
<del>message_flashed = _signals.signal('message-fla... | 2 |
Java | Java | add test case based on spr-16615 | 2ff35daf9bc83a89c6ca579e4440e48627b9a56a | <ide><path>spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java
<ide> import static org.junit.Assert.*;
<ide>
<ide> /**
<add> * Unit tests for {@link StringDecoder}.
<ide> * @author Sebastien Deleuze
<ide> * @author Brian Clozel
<ide> * @author Mark Paluch
<ide> public class StringDecode... | 1 |
PHP | PHP | fix bug with chaining | 434245f73e694f90476437da8554b58d54ced25c | <ide><path>src/Illuminate/Bus/Queueable.php
<ide> public function chain($chain)
<ide> public function dispatchNextJobInChain()
<ide> {
<ide> if (! empty($this->chained)) {
<del> dispatch(unserialize(array_shift($this->chained))->chain($this->chained));
<add> dispatch(tap(unserializ... | 2 |
PHP | PHP | provide a path to view in compiled view | db774be8588f9d30ce4577bc06fac9711e08d9cb | <ide><path>src/Illuminate/View/Compilers/BladeCompiler.php
<ide> public function compile($path = null)
<ide> }
<ide>
<ide> if (! is_null($this->cachePath)) {
<del> $contents = $this->compileString($this->files->get($this->getPath()));
<add> $contents = "<?php/* {$this->getPath()} ... | 2 |
PHP | PHP | allow default value in find method | 99d0fd9819b8a0a972a7b535d175e960ff50d14c | <ide><path>src/Illuminate/Database/Eloquent/Collection.php
<ide> class Collection extends BaseCollection {
<ide> * Find a model in the collection by key.
<ide> *
<ide> * @param mixed $key
<add> * @param mixed $default
<ide> * @return Illuminate\Database\Eloquent\Model
<ide> */
<del> public function find(... | 2 |
Ruby | Ruby | fix tests on sqlite3 | 7312b8318f0c770d363a62d679aa8f67a18e549b | <ide><path>activerecord/test/cases/migration_test.rb
<ide> class MigrationTest < ActiveRecord::TestCase
<ide>
<ide> def setup
<ide> super
<add> %w(reminders people_reminders prefix_reminders_suffix).each do |table|
<add> Reminder.connection.drop_table(table) rescue nil
<add> end
<add> Reminder.rese... | 1 |
PHP | PHP | fix locale matcher | 91a632f98351ba0e1c033b9e597eac2e5ca5b244 | <ide><path>src/Illuminate/Http/Request.php
<ide> public function handleUriLocales(array $locales)
<ide>
<ide> foreach ($locales as $locale)
<ide> {
<del> if (starts_with($path, '/'.$locale)) return $this->removeLocaleFromUri($locale);
<add> if (preg_match("#^\/{$locale}(?:$|/)#i", $path))
<add> {
<add> re... | 1 |
PHP | PHP | convert spaces to tabs | 6f847732a4414dbb82ad31aa90f05e884e8f577c | <ide><path>system/str.php
<ide> class Str {
<ide> */
<ide> public static function entities($value)
<ide> {
<del> return htmlentities($value, ENT_QUOTES, Config::get('application.encoding'), false);
<add> return htmlentities($value, ENT_QUOTES, Config::get('application.encoding'), false);
<ide> }
<ide>
<de... | 1 |
Javascript | Javascript | remove duplicate encoding tests in favor of wpt | dce2f3ed93ffd3a6374a4e578f686343494519ad | <ide><path>test/parallel/test-whatwg-encoding-api-basics.js
<del>'use strict';
<del>
<del>// From: https://github.com/w3c/web-platform-tests/blob/master/encoding/api-basics.html
<del>// TODO(joyeecheung): replace this with WPT
<del>
<del>const common = require('../common');
<del>
<del>if (!common.hasIntl)
<del> common... | 8 |
Python | Python | reduce indentation (#741) | 8b8a6d881cbda0e6d64aacf5284fbccf27772eec | <ide><path>file_transfer_protocol/ftp_send_receive.py
<ide> """
<del> File transfer protocol used to send and receive files using FTP server.
<del> Use credentials to provide access to the FTP client
<add>File transfer protocol used to send and receive files using FTP server.
<add>Use credentials to provide access to t... | 1 |
PHP | PHP | improve tests for arguments in ability checks | 7ea01d451274e7851e6f3292a84d078cdd06a12a | <ide><path>tests/Auth/AuthAccessGateTest.php
<ide> public function test_a_single_argument_can_be_passed_when_checking_abilities()
<ide> });
<ide>
<ide> $gate->define('foo', function ($user, $x) use ($dummy) {
<del> $this->assertEquals($dummy, $x);
<add> $this->assertSame($dummy, $... | 1 |
Go | Go | switch skipping from error to debug | af6ab357e8db8888429a28014f629af19a2250b8 | <ide><path>server/server.go
<ide> func (srv *Server) pullImage(r *registry.Registry, out io.Writer, imgID, endpoin
<ide>
<ide> // ensure no two downloads of the same layer happen at the same time
<ide> if c, err := srv.poolAdd("pull", "layer:"+id); err != nil {
<del> utils.Errorf("Image (id: %s) pull is already ... | 1 |
Ruby | Ruby | compare base with http | bdb61c1dadd64ad4e146228ac8048fd0034fa8cc | <ide><path>actionpack/examples/minimal.rb
<ide> require 'action_controller/new_base' if ENV['NEW']
<ide> require 'benchmark'
<ide>
<del>class BaseController < ActionController::Base
<del> def index
<del> render :text => ''
<del> end
<del>end
<del>
<ide> class Runner
<ide> def initialize(app)
<ide> @app = ap... | 1 |
Text | Text | fix a typo [ci skip] | 5fc50c20874d4ae5310dc54a3727d70a1ca412b1 | <ide><path>guides/source/constant_autoloading_and_reloading.md
<ide> role.rb
<ide>
<ide> modulus some additional directory lookups we are going to cover soon.
<ide>
<del>INFO. 'Constant::Name'.underscore gives the relative path without extension of
<add>INFO. `'Constant::Name'.underscore` gives the relative path with... | 1 |
Python | Python | remove u from literals | 6af31ed3945fd051a6e8c08851d7a656637d1f00 | <ide><path>rest_framework/tests/test_renderers.py
<ide> def keys(self):
<ide> x['a'] = 1
<ide> x['b'] = "string value"
<ide> ret = JSONRenderer().render(x)
<del> self.assertEquals(json.loads(ret), {u'a': 1, u'b': u'string value'})
<add> self.assertEquals(json.loads(ret), {'a': 1, '... | 1 |
PHP | PHP | add $path param for docblock | 8c45fba521d318a22387404442e3daa1b2e3e426 | <ide><path>src/Illuminate/Support/helpers.php
<ide> function asset($path, $secure = null)
<ide> /**
<ide> * Get the path to the base of the install.
<ide> *
<add> * @param string $path
<ide> * @return string
<ide> */
<ide> function base_path($path = '')
<ide> function preg_replace_sub($pattern, &$replacemen... | 1 |
Text | Text | add 2.9.0-beta.4 to changelog.md | 9449635a147c4761276e63178a03eb62d5b8a4fe | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### 2.9.0-beta.4 (September 28, 2016)
<add>
<add>- [#14361](https://github.com/emberjs/ember.js/pull/14361) [BUGFIX] Prevent usage of `this.element` when running in a non-interactive environment (i.e. FastBoot).
<add>- [#14361](https://github.com/emberjs/ember... | 1 |
Python | Python | fix issue with docutils < 0.5 | 2951b794d0b6498c5d6b2fd8c0f188a447bd8d14 | <ide><path>doc/sphinxext/numpydoc.py
<ide> def setup(app, get_doc_object_=get_doc_object):
<ide> from docutils.statemachine import ViewList
<ide>
<ide> def get_directive(name):
<del> from docutils.parsers.rst.directives import directive
<add> from docutils.parsers.rst import directives
<ide> try:
<del> ... | 1 |
Go | Go | use event functions from golang.org/x/sys/windows | e942513ac46656c3f54cd103e990e2b7bd5c2b14 | <ide><path>cmd/dockerd/daemon_windows.go
<ide> import (
<ide> "path/filepath"
<ide>
<ide> "github.com/docker/docker/libcontainerd"
<del> "github.com/docker/docker/pkg/system"
<ide> "github.com/sirupsen/logrus"
<ide> "golang.org/x/sys/windows"
<ide> )
<ide> func (cli *DaemonCli) setupConfigReloadTrap() {
<ide> sa... | 4 |
Python | Python | change version to 2.8 | 29298a4f9a8bd2712a1f754595066c478d2b75ee | <ide><path>glances/__init__.py
<ide> import sys
<ide>
<ide> # Global name
<del>__version__ = '2.8_DEVELOP'
<add>__version__ = '2.8'
<ide> __author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
<ide> __license__ = 'LGPL'
<ide> | 1 |
PHP | PHP | apply fixes from styleci | bfa6e3c948ec2aaf41486da6021061d1ea09e24c | <ide><path>src/Illuminate/Foundation/Testing/TestResponse.php
<ide> namespace Illuminate\Foundation\Testing;
<ide>
<ide> use Closure;
<del>use Illuminate\Support\Str;
<ide> use Illuminate\Http\Response;
<ide> use Illuminate\Contracts\View\View;
<ide> use PHPUnit_Framework_Assert as PHPUnit; | 1 |
Ruby | Ruby | use temporary_path accessor | 4a2fc89c4699f3c5e4ad93f9d7c26698c4a0c989 | <ide><path>Library/Homebrew/download_strategy.rb
<ide> def _fetch
<ide> s3url = obj.public_url
<ide> end
<ide>
<del> curl s3url, '-C', downloaded_size, '-o', @temporary_path
<add> curl s3url, '-C', downloaded_size, '-o', temporary_path
<ide> end
<ide> end
<ide> | 1 |
Go | Go | return error when listnode fails | 8e04e9902a9739a13e5e824339082cc3d361d097 | <ide><path>cli/command/system/info.go
<ide> func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
<ide> fmt.Fprintf(dockerCli.Out(), " Error: %v\n", info.Swarm.Error)
<ide> }
<ide> fmt.Fprintf(dockerCli.Out(), " Is Manager: %v\n", info.Swarm.ControlAvailable)
<del> if info.Swarm.ControlAva... | 2 |
Ruby | Ruby | fix build error caused by | 5c6e11d6b89444eefcb12e24d5419dadefdea1ba | <ide><path>railties/test/application/rake/notes_test.rb
<ide> def teardown
<ide> assert_match(/note in less/, output)
<ide> assert_match(/note in rake/, output)
<ide>
<del> assert_equal 10, lines.size
<add> assert_equal 11, lines.size
<ide>
<ide> lines.each do |line|
<i... | 1 |
Python | Python | use nvidia-ml-py3 for python3 compatibility | 1cf84dfcef7f59435ccf10d2e4afd7bb8aeef948 | <ide><path>setup.py
<ide> def run(self):
<ide> 'influxdb>=1.0.0', 'kafka-python', 'pika', 'potsdb',
<ide> 'prometheus_client', 'pyzmq', 'statsd'],
<ide> 'folders': ['scandir'], # python_version<"3.5"
<del> 'gpu': ['nvidia-ml-py'], # python_version=="2.7"
<add> ... | 1 |
Go | Go | show usage when global --help present | 4d55877e278ea62b98927c6b9fb23b4b935431c1 | <ide><path>docker/daemon.go
<ide> func handleGlobalDaemonFlag() {
<ide> }
<ide>
<ide> if *flDaemon {
<del> if *flHelp {
<del> // We do not show the help output here, instead, we tell the user about the new daemon command,
<del> // because the help output is so long they would not see the warning anyway.
<del> ... | 2 |
Text | Text | fix broken url to event loop guide | 0674771f233bd79ea2d9c61e072a89487321f533 | <ide><path>doc/api/timers.md
<ide> added: v0.0.1
<ide> Cancels a `Timeout` object created by [`setTimeout()`][].
<ide>
<ide>
<del>[the Node.js Event Loop]: https://github.com/nodejs/node/blob/master/doc/topics/event-loop-timers-and-nexttick.md
<add>[the Node.js Event Loop]: https://nodejs.org/en/docs/guides/event-loo... | 1 |
PHP | PHP | has/get | 41aec8abcc86e1bee4d72c3bb86173368458df11 | <ide><path>src/Illuminate/Support/Arr.php
<ide> public static function get($array, $key, $default = null)
<ide> return $array;
<ide> }
<ide>
<del> if (isset($array[$key])) {
<add> if (static::exists($array, $key)) {
<ide> return $array[$key];
<ide> }
<ide>
<ide> p... | 1 |
Python | Python | fix mkl for linux | 7cebe883b612efe2a3bf51b83917ea6cdb8f679f | <ide><path>numpy/distutils/fcompiler/intel.py
<ide> def get_flags(self):
<ide> return ['-fPIC']
<ide>
<ide> def get_flags_opt(self):
<del> return ['-xhost -openmp -fp-model strict']
<add> return ['-xhost -openmp -fp-model strict -O1']
<ide>
<ide> def get_flags_arch(self):
<ide> r... | 1 |
Text | Text | update infobox [ci skip] | 2a3a4565cdc5c18725673484a493d03836f3a149 | <ide><path>website/docs/usage/index.md
<ide> $ pip install -U spacy
<ide>
<ide> <Infobox variant="warning">
<ide>
<del>To install additional data tables for lemmatization in **spaCy v2.2+** (to
<del>create blank models or lemmatize in languages that don't yet come with
<del>pre-trained models), you can run `pip insta... | 1 |
Go | Go | normalize values for pids-limit | ffa1728d4bc7c9c662c6090e48d438bc728df5dc | <ide><path>api/server/router/container/container_routes.go
<ide> func (s *containerRouter) postContainerUpdate(ctx context.Context, w http.Respon
<ide> if versions.LessThan(httputils.VersionFromContext(ctx), "1.40") {
<ide> updateConfig.PidsLimit = nil
<ide> }
<add> if updateConfig.PidsLimit != nil && *updateConfig... | 3 |
Go | Go | replace string.contains* with net.ip.to4() check | ec7df9373108899ba8472cdb0a8fefccd25a04c0 | <ide><path>libnetwork/drivers/bridge/port_mapping.go
<ide> import (
<ide> "errors"
<ide> "fmt"
<ide> "net"
<del> "strings"
<ide>
<ide> "github.com/docker/libnetwork/types"
<ide> "github.com/ishidawataru/sctp"
<ide> func (n *bridgeNetwork) releasePort(bnd types.PortBinding) error {
<ide>
<ide> portmapper := n.po... | 2 |
Javascript | Javascript | add test for getmixer, getclip & getroot | c802a474795da6d60ae82533e57e138e76d0f5c4 | <ide><path>test/unit/src/animation/AnimationAction.tests.js
<ide> import { LoopOnce, LoopRepeat, LoopPingPong } from '../../../../src/constants';
<ide>
<ide> function createAnimation(){
<ide>
<del>
<del> var mixer = new AnimationMixer(new Object3D());
<add> var root = new Object3D();
<add> var mixer = new Animatio... | 1 |
Python | Python | use closing context on mp pool | d5a242e9f6c17a60bbbc7bd114b34ba59dfcca29 | <ide><path>keras/utils/data_utils.py
<ide> import traceback
<ide> import zipfile
<ide> from abc import abstractmethod
<add>from contextlib import closing
<ide> from multiprocessing.pool import ThreadPool
<ide>
<ide> import numpy as np
<ide> def __init__(self, sequence,
<ide> self.use_multiprocessing = use_mult... | 1 |
PHP | PHP | move deprecation closer to where it happens | da4b8bc89788898426e77fdfd2e524160ea5d631 | <ide><path>src/Error/Middleware/ErrorHandlerMiddleware.php
<ide> public function __construct($errorHandler = [])
<ide> return;
<ide> }
<ide> if ($errorHandler instanceof ErrorHandler) {
<add> deprecationWarning(
<add> 'Using an `ErrorHandler` is deprecated. You shou... | 2 |
Go | Go | move docker build to client | 0f312113d3ce37d57fb28eb98c8abcdcbfcd39a3 | <ide><path>api.go
<ide> func postImagesPush(srv *Server, w http.ResponseWriter, r *http.Request, vars ma
<ide> return nil
<ide> }
<ide>
<del>func postBuild(srv *Server, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<del> in, out, err := hijackServer(w)
<del> if err != nil {
<del> return err... | 7 |
Python | Python | add python 3 compatibility | 8f3230a61913e7884dca244d853f0eadc9b4f1e1 | <ide><path>glances/glances.py
<ide> import time
<ide> from datetime import datetime, timedelta
<ide> import gettext
<del>from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
<add>try:
<add> # For Python v2.x
<add> from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
<add>except:
<add> # For P... | 1 |
PHP | PHP | remove old comment tags | dd1b8eeb21fe8e642054bf777f996cbf0a7c38ec | <ide><path>lib/Cake/Core/Plugin.php
<ide> <?php
<ide> /**
<del> * Plugin class
<del> *
<ide> * PHP 5
<ide> *
<ide> * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
<ide> *
<ide> * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<ide> * @link http://... | 1 |
Go | Go | hide updatestatus when it is not present | 0e70d96a6813704498a3ce9cc2786648c84daa3a | <ide><path>api/types/swarm/service.go
<ide> import "time"
<ide> type Service struct {
<ide> ID string
<ide> Meta
<del> Spec ServiceSpec `json:",omitempty"`
<del> PreviousSpec *ServiceSpec `json:",omitempty"`
<del> Endpoint Endpoint `json:",omitempty"`
<del> UpdateStatus UpdateStatus `json:",omitempty... | 5 |
PHP | PHP | reduce logic duplication | 7d1cddead17e106b343570580f6c1e63bba3f1a9 | <ide><path>src/Database/ValueBinder.php
<ide> public function generateManyNamed($values, $type = 'string')
<ide> {
<ide> $placeholders = [];
<ide> foreach ($values as $k => $value) {
<del> $param = ":c" . $this->_bindingsCount;
<add> $param = $this->placeholder('c');
<ide> ... | 1 |
Go | Go | expose endpoints api for a sandbox | 7a769684855a6559be0e72aad40afb09cbbc6f0e | <ide><path>libnetwork/libnetwork_test.go
<ide> func (f *fakeSandbox) ResolveIP(ip string) string {
<ide> return ""
<ide> }
<ide>
<add>func (f *fakeSandbox) Endpoints() []libnetwork.Endpoint {
<add> return nil
<add>}
<add>
<ide> func TestExternalKey(t *testing.T) {
<ide> externalKeyTest(t, false)
<ide> }
<ide><path>l... | 3 |
Mixed | Ruby | allow resetting singular associations | 725ee799712e551c1e5a1687036d9a0c18ad2fb8 | <ide><path>activerecord/CHANGELOG.md
<add>* `has_one` and `belongs_to` associations now define a `reset_association` method
<add> on the owner model (where `association` is the name of the association). This
<add> method unloads the cached associate record, if any, and causes the next access
<add> to query i... | 6 |
PHP | PHP | fix missing argument on missingmethod | 52ade3b85c5f6425f1a3b4911fc892f5caf1c05c | <ide><path>src/Illuminate/Routing/Controller.php
<ide> public function callAction($method, $parameters)
<ide> * @param array $parameters
<ide> * @return mixed
<ide> */
<del> public function missingMethod($method, $parameters)
<add> public function missingMethod($method, $parameters = array())
<ide> {
<ide> ... | 1 |
Mixed | Ruby | remove more uses of eos.undent | 4d4722c97c2e92f1fd17ed056f5a700e881eab4d | <ide><path>Library/Homebrew/test/dev-cmd/audit_spec.rb
<ide> class Foo < Formula
<ide> describe "a dependency on a macOS-provided keg-only formula" do
<ide> describe "which is whitelisted" do
<ide> let(:fa) do
<del> formula_auditor "foo", <<-EOS.undent, new_formula: true
<add> formul... | 2 |
Javascript | Javascript | bring voroboids examples up-to-date | 29ece588f0581eb1f7397017056cba18cb57b2b2 | <ide><path>examples/voroboids/boid.js
<ide> var boid = (function() {
<ide> }
<ide>
<ide> function d3_ai_boidWrap(position) {
<del> if (position[0] > w) position[0] = 0;
<del> else if (position[0] < 0) position[0] = w;
<del> if (position[1] > h) position[1] = 0;
<del> else if (position[1] < 0) position[... | 2 |
Javascript | Javascript | expose errors correctly | e56b5be904e097bf2b95cdac5922675bf3452e6a | <ide><path>packager/src/lib/JsonReporter.js
<ide>
<ide> import {Writable} from 'stream';
<ide>
<del>class JsonReporter<TEvent> {
<add>class JsonReporter<TEvent: {}> {
<ide>
<ide> _stream: Writable;
<ide>
<ide> constructor(stream: Writable) {
<ide> this._stream = stream;
<ide> }
<ide>
<add> /**
<add> *... | 1 |
Javascript | Javascript | expect 0 assertions to fix | 7e40b5342af6a523608501dfefe3defe11564733 | <ide><path>src/test/moment/add_subtract.js
<ide> test('add across DST', function (assert) {
<ide> // Detect Safari bug and bail. Hours on 13th March 2011 are shifted
<ide> // with 1 ahead.
<ide> if (new Date(2011, 2, 13, 5, 0, 0).getHours() !== 5) {
<add> assert.expect(0);
<ide> return;
<ide>... | 1 |
PHP | PHP | use unix socket or host and port | b9586cc46d55451e24ead6adea7eeb7246a57817 | <ide><path>src/Illuminate/Database/Connectors/MySqlConnector.php
<ide> protected function getDsn(array $config)
<ide> // need to establish the PDO connections and return them back for use.
<ide> extract($config);
<ide>
<del> $dsn = "mysql:host={$host};dbname={$database}";
<del>
<del> if (isset($config['port']))
... | 1 |
PHP | PHP | implement interface on integration stub | f2357580ecf3746f5e17d1ddbf3271b7c31b0e39 | <ide><path>src/Error/Middleware/ErrorHandlerMiddleware.php
<ide> class ErrorHandlerMiddleware implements MiddlewareInterface
<ide> *
<ide> * @var \Cake\Error\ErrorHandler|null
<ide> */
<del> protected $errorHandler;
<add> protected $errorHandler = null;
<ide>
<ide> /**
<ide> * ExceptionTr... | 2 |
PHP | PHP | link command | 0b8f550419baa95c32f5d0f3005023f1cd58a47c | <ide><path>src/Illuminate/Foundation/Console/StorageLinkCommand.php
<add><?php
<add>
<add>namespace Illuminate\Foundation\Console;
<add>
<add>use Illuminate\Console\Command;
<add>
<add>class StorageLinkCommand extends Command
<add>{
<add> /**
<add> * The console command signature.
<add> *
<add> * @var st... | 2 |
Javascript | Javascript | open plnkr.co with https | 56861c0ae9fd52a8d47d4cc5c1db7f4c9b60526b | <ide><path>docs/app/src/examples.js
<ide> angular.module('examples', [])
<ide>
<ide> postData.description = ctrl.example.name;
<ide>
<del> formPostData('http://plnkr.co/edit/?p=preview', newWindow, postData);
<add> formPostData('https://plnkr.co/edit/?p=preview', newWindow, postData)... | 1 |
Ruby | Ruby | fix a nomethoderror schema_statements.rb | 01fbdb311d0661b4db89024a9b1c9fafcaceaafd | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
<ide> def index_name_for_remove(table_name, options = {})
<ide> checks << lambda { |i| i.columns.join("_and_") == column_names.join("_and_") }
<ide> end
<ide>
<del> raise ArgumentError "No name or... | 2 |
Text | Text | remove duplicated test | 09b62480f280d31c7be2b082dec546c1c73826ea | <ide><path>curriculum/challenges/english/10-coding-interview-prep/rosetta-code/sum-to-100.md
<ide> assert.deepEqual(sumTo100(243), [
<ide> ]);
<ide> ```
<ide>
<del>`sumTo100(199)` should return `["-1+2-3+45+67+89", "123-4+5+6+78-9", "123-4+56+7+8+9"]`.
<del>
<del>```js
<del>assert.deepEqual(sumTo100(199), [
<del> '-1... | 1 |
Go | Go | fix basicauth function not in go1.3.3 | 4a2ef6c8053d5b0eb768297af8609505198c7187 | <ide><path>pkg/requestdecorator/requestdecorator_test.go
<ide> package requestdecorator
<ide>
<ide> import (
<add> "encoding/base64"
<ide> "net/http"
<ide> "strings"
<ide> "testing"
<ide> )
<ide>
<add>// The following 2 functions are here for 1.3.3 support
<add>// After we drop 1.3.3 support we can use the functio... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.