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 | add a plugin parsing test | baf1ce93f2c44b49c0d592034d7b543febaba785 | <ide><path>lib/Cake/Test/Case/Console/Command/TestShellTest.php
<ide> public function testMapAppFileToCase() {
<ide> $this->assertSame('My/File/Is/Here', $return);
<ide> }
<ide>
<add>/**
<add> * testMapPluginFileToCategory
<add> *
<add> * @return void
<add> */
<add> public function testMapPluginFileToCategory() {
... | 1 |
Python | Python | fix coding style for project euler problem 39 | 261be28120712f66a5bdb643585659eb4e2f932a | <ide><path>project_euler/problem_39/sol1.py
<ide> """
<add>Problem 39: https://projecteuler.net/problem=39
<add>
<ide> If p is the perimeter of a right angle triangle with integral length sides,
<ide> {a,b,c}, there are exactly three solutions for p = 120.
<ide> {20,48,52}, {24,45,51}, {30,40,50}
<ide>
<ide> from __fu... | 1 |
PHP | PHP | add test for getroutesbyname() | e64f5b195626f8e88f2afbd201cc48060ca9cd45 | <ide><path>tests/Routing/RouteCollectionTest.php
<ide> public function testRouteCollectionCanGetAllRoutes()
<ide> $this->assertEquals($allRoutes, $this->routeCollection->getRoutes());
<ide> }
<ide>
<add> public function testRouteCollectionCanGetRoutesByName()
<add> {
<add> $routesByName = [
<a... | 1 |
Javascript | Javascript | fix an issue with the vhea/vmtx tables | 5cb2a07b3d224e40874bb9d96173eb6ce2fdc6ab | <ide><path>fonts.js
<ide> var Font = (function Font() {
<ide> var end = denseRange[1];
<ide> var index = firstCode;
<ide> for (var j = start; j <= end; j++) {
<del> var code = j - firstCode - 1;
<add> var code = glyphs[j - start];
<ide> var map... | 1 |
Ruby | Ruby | add salt to blocklist | d530cf68078d3b60f12032a606e5f319a4052288 | <ide><path>Library/Homebrew/utils/pypi.rb
<ide> module PyPI
<ide> dxpy
<ide> ipython
<ide> molecule
<add> salt
<ide> xonsh
<ide> ].freeze
<ide> | 1 |
PHP | PHP | add contract to let dispatcher use pipelines | fb40aba786421581781ae59be98132e13724ed42 | <ide><path>src/Illuminate/Contracts/Bus/PipingDispatcher.php
<add><?php namespace Illuminate\Contracts\Bus;
<add>
<add>interface PipingDispatcher extends Dispatcher {
<add>
<add> /**
<add> * Set the pipes commands should be piped through before dispatching.
<add> *
<add> * @param array $pipes
<add> * @return $thi... | 1 |
Javascript | Javascript | use .chunk when calling adapters's writev | 54bc3c9afaf6d3b28552536d6aac2d1887fbe8df | <ide><path>lib/internal/webstreams/adapters.js
<ide> function newStreamWritableFromWritableStream(writableStream, options = {}) {
<ide>
<ide> writev(chunks, callback) {
<ide> function done(error) {
<add> error = error.filter((e) => e);
<ide> try {
<del> callback(error);
<add> ... | 3 |
Text | Text | update layer documentation | 0c48b89f0b5808bb4653759535469294105d5190 | <ide><path>official/nlp/modeling/layers/README.md
<ide> assemble new `tf.keras` layers or models.
<ide> of self multi-head attention, cross multi-head attention and feedforward
<ide> network.
<ide>
<add>* [RandomFeatureGaussianProcess](gaussian_process.py) implements random
<add> feature-based Gaussian pr... | 1 |
Javascript | Javascript | remove duplicate of bordercolorpicker | 4e51e845bb1fd3d044ccc2b7a121584d172f5ebd | <ide><path>client/src/components/helpers/AvatarRenderer.js
<ide> import PropTypes from 'prop-types';
<ide> import { Image } from '@freecodecamp/react-bootstrap';
<ide> import DefaultAvatar from '../../assets/icons/DefaultAvatar';
<ide> import { defaultUserImage } from '../../../../config/misc';
<add>import { borderColo... | 1 |
Go | Go | use imagebuildoptions in builder | 5190794f1d85d5406611eb69c270df62ac1cdc7f | <ide><path>api/client/build.go
<ide> import (
<ide>
<ide> "github.com/docker/docker/api"
<ide> "github.com/docker/docker/api/types"
<add> "github.com/docker/docker/api/types/container"
<ide> "github.com/docker/docker/builder/dockerignore"
<ide> Cli "github.com/docker/docker/cli"
<ide> "github.com/docker/docker/op... | 14 |
PHP | PHP | use container call | 8529ee504f8caf7abd3776e62a3029c1ea437e82 | <ide><path>src/Illuminate/Routing/RouteServiceProvider.php
<ide> class RouteServiceProvider extends ServiceProvider {
<ide> */
<ide> public function boot()
<ide> {
<del> $this->before();
<add> $this->app->call([$this, 'before']);
<ide>
<ide> if ($this->app->routesAreCached())
<ide> {
<ide> public function bo... | 1 |
Go | Go | move httputils error helpers to errdefs package | 2a9c987e5a72549775ffa4dc31595ceff4f06a78 | <ide><path>api/server/httputils/errors_deprecated.go
<add>package httputils // import "github.com/docker/docker/api/server/httputils"
<add>import "github.com/docker/docker/errdefs"
<add>
<add>// GetHTTPErrorStatusCode retrieves status code from error message.
<add>//
<add>// Deprecated: use errdefs.GetHTTPErrorStatusCo... | 8 |
Ruby | Ruby | fix `page_headers` method for multiple headers | 10b5548eace342387afc97f5a809792dbd94b4b5 | <ide><path>Library/Homebrew/livecheck/strategy.rb
<ide> def from_url(url, livecheck_strategy: nil, regex_provided: nil)
<ide>
<ide> def self.page_headers(url)
<ide> @headers ||= {}
<del> @headers[url] ||= curl_output("--head", "--location", url).stdout
<del> ... | 1 |
Python | Python | add v3 info to project docs [ci skip] | a4c51f0f18e0eea6d994b53de9571e07fa077ded | <ide><path>spacy/cli/project/document.py
<ide>
<ide>
<ide> DOCS_URL = "https://nightly.spacy.io"
<add>INTRO = f"""> ⚠️ This project template uses the new [**spaCy v3.0**]({DOCS_URL}), which
<add>> is currently available as a nightly pre-release. You can install it from pip as `spacy-nightly`:
<add>> `pip install spac... | 1 |
PHP | PHP | remove check for items in file cache driver | de19b8db40190804e0703c3c8254cd39c9961fd1 | <ide><path>system/cache/driver/file.php
<ide> public function has($key)
<ide> */
<ide> public function get($key)
<ide> {
<del> if (array_key_exists($key, $this->items))
<del> {
<del> return $this->items[$key];
<del> }
<del>
<ide> if ( ! file_exists(APP_PATH.'storage/cache/'.$key))
<ide> {
<ide> return ... | 1 |
Go | Go | handle push/pull of repositories | 11c4294846b55914ec5c5b475012a2234be9a9ff | <ide><path>auth/auth.go
<ide> import (
<ide> const CONFIGFILE = "/var/lib/docker/.dockercfg"
<ide>
<ide> // the registry server we want to login against
<del>const REGISTRY_SERVER = "https://registry.docker.io"
<add>//const REGISTRY_SERVER = "https://registry.docker.io"
<add>const REGISTRY_SERVER = "http://192.168.56.... | 3 |
PHP | PHP | clear` command fails | ad670c8423a5fdfc929644f63db1b7ca39a8ba59 | <ide><path>src/Illuminate/Cache/Console/ClearCommand.php
<ide> public function handle()
<ide> 'cache:clearing', [$this->argument('store'), $this->tags()]
<ide> );
<ide>
<del> $this->cache()->flush();
<add> if (! $this->cache()->flush()) {
<add> return $this->error('Failed t... | 1 |
Ruby | Ruby | remove duplicates after autoloading modules | d92fb27885ddcb0a92ac67f69bf0eb8c912f4dc7 | <ide><path>activesupport/lib/active_support/dependencies.rb
<ide> def autoload_module!(into, const_name, qualified_name, path_suffix)
<ide> mod = Module.new
<ide> into.const_set const_name, mod
<ide> autoloaded_constants << qualified_name unless autoload_once_paths.include?(base_path)
<add> autol... | 1 |
Javascript | Javascript | fix incorrect copy-paste in test | 08e69f65b44f5e5501c796be6f7b272441ebd0e6 | <ide><path>packages/react-dom/src/events/__tests__/DOMPluginEventSystem-test.internal.js
<ide> describe('DOMPluginEventSystem', () => {
<ide> <div ref={middleDivRef}>
<ide> <div
<ide> ref={divRef}
<del> onClick={onFocus}
<del> onClickCapt... | 1 |
Text | Text | limit markdown file to 80 chars per line | 84df9351b07f2384ee0f49cce8a789f1adbccbac | <ide><path>official/vision/beta/projects/yolo/README.md
<ide> [](https://arxiv.org/abs/1804.02767)
<ide> [](https://arxiv.org/abs/2004.10934)
<ide>
<del>This repos... | 1 |
Python | Python | move get_non_empty_box_indices to box_utils | 48693cad45ed57441ee2b4a3f77f355102e2b9ee | <ide><path>official/vision/detection/dataloader/maskrcnn_parser.py
<ide> def _parse_train_data(self, data):
<ide> boxes, image_scale, (image_height, image_width), offset)
<ide>
<ide> # Filters out ground truth boxes that are all zeros.
<del> indices = input_utils.get_non_empty_box_indices(boxes)
<add> ... | 5 |
Javascript | Javascript | fix scripting test related to keystroke event | 880ac6037c91b62b2c6c75b0112eefc0540c5bab | <ide><path>test/unit/scripting_spec.js
<ide> describe("Scripting", function () {
<ide> value: "3F?",
<ide> change: "0",
<ide> name: "Keystroke",
<del> willCommit: true,
<add> willCommit: false,
<ide> selStart: 3,
<ide> selEnd: 3,
<ide> });
<ide... | 1 |
Javascript | Javascript | fix redundant styles on refreshcontrol for android | 39c18186e1a5bcc4cc5c5f42a9193c1a8b86cd30 | <ide><path>Libraries/Components/ScrollView/ScrollView.js
<ide> const ScrollView = React.createClass({
<ide> // On Android wrap the ScrollView with a AndroidSwipeRefreshLayout.
<ide> // Since the ScrollView is wrapped add the style props to the
<ide> // AndroidSwipeRefreshLayout and use flex: 1 f... | 1 |
Javascript | Javascript | add missing article | c414ece5cf9749dd6924b4b00cb5773d2d7088bb | <ide><path>src/ng/sce.js
<ide> function $SceDelegateProvider() {
<ide> * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`
<ide> * to the top of your HTML document.
<ide> *
<del> * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing ... | 1 |
Text | Text | remove outdated documentation for completion (#99) | e0264302c7cca1b6b472aba912bfe100489bd698 | <ide><path>share/doc/homebrew/Tips-N'-Tricks.md
<ide> Use `brew info $FORMULA` to check what versions are installed but not currently
<ide> ./configure --prefix=/usr/local/Cellar/foo/1.2 && make && make install && brew link foo
<ide> ```
<ide>
<del>## Command tab-completion
<del>
<del>### Bash
<del>Add to your `~/.bas... | 1 |
Ruby | Ruby | relocate virtualenv orig-prefix.txt | 22d3a67b73214727bf2deed06f90799e688c6af0 | <ide><path>Library/Homebrew/keg_relocate.rb
<ide> def text_files
<ide> files = Set.new path.find.reject { |pn|
<ide> next true if pn.symlink?
<ide> next true if pn.directory?
<add> next false if pn.basename.to_s == "orig-prefix.txt" # for python virtualenvs
<ide> next true if Metafi... | 1 |
Text | Text | fix typo in doc | 3af40ba58457e5000fe0c2c07a6eb99fa27dc4b3 | <ide><path>docs/sources/layers/core.md
<ide> keras.layers.core.ActivityRegularization(l1=0., l2=0.)
<ide>
<ide> Leaves the input unchanged, but adds a term to the loss function based on the input activity. L1 and L2 regularization supported.
<ide>
<del>This layer can be use, for instance, to induce activation sparsit... | 1 |
Python | Python | fix mypy errors for databricks provider. | cad39274d9a8eceba2845dc39e8c870959746478 | <ide><path>airflow/providers/databricks/hooks/databricks.py
<ide> """
<ide> import time
<ide> from time import sleep
<add>from typing import Dict
<ide> from urllib.parse import urlparse
<ide>
<ide> import requests
<ide> def __init__(
<ide> ) -> None:
<ide> super().__init__()
<ide> self.databricks_c... | 1 |
Ruby | Ruby | use one 'be' | 9ff2e928ef90411c5bd5dc6a61dfe735f3002cb1 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
<ide> def create_table(table_name, options = {})
<ide> end
<ide>
<ide> # Creates a new join table with the name created using the lexical order of the first two
<del> # arguments. These arguments can be be a St... | 1 |
PHP | PHP | add typehints to collection classes | a0c8826dafa33b8db980d5a1e8e166973fcf8762 | <ide><path>src/Collection/Collection.php
<ide> public function unserialize($collection)
<ide> *
<ide> * @return int
<ide> */
<del> public function count()
<add> public function count(): int
<ide> {
<ide> $traversable = $this->optimizeUnwrap();
<ide>
<ide> public function count()
<ide> ... | 11 |
Python | Python | fix syntax error | 3a5335f09f58439f8e3c0bddbed8e4c7eeb32482 | <ide><path>rest_framework/fields.py
<ide> def enforce_timezone(self, value):
<ide> return value
<ide>
<ide> def to_internal_value(self, value):
<del> if (isinstance(value, datetime.date) and not isinstance(value, datetime.datetime):
<add> if isinstance(value, datetime.date) and not isinstance... | 1 |
Text | Text | add additional information on layer 7 | 8be46155c1d68a87edea1cde02665c20250bae81 | <ide><path>guide/english/network-engineering/osi-layers/index.md
<ide> In the diagram above, to the extreme left is the unit of data that is used in ea
<ide>
<ide> * _**Layer 6 - Presentation Layer:**_ The presentation layer formats the data to be presented to the application layer.
<ide>
<del>* _**Layer 7 - Applica... | 1 |
Javascript | Javascript | prioritize current dir for local lookups | d38503ab01c607ca55b4816e2c249411a3f10269 | <ide><path>lib/module.js
<ide> Module._resolveLookupPaths = function(request, parent) {
<ide> if (!parent || !parent.id || !parent.filename) {
<ide> // make require('./path/to/foo') work - normally the path is taken
<ide> // from realpath(__filename) but with eval there is no filename
<del> var mainPaths =... | 2 |
Text | Text | remove empty line from top of article | 26f08342881de309c6351547b4c810c37b1addec | <ide><path>guide/spanish/blockchain/features/index.md
<del>
<ide> ---
<ide> title: Features of BlockTech
<ide> localeTitle: Características de BlockTech | 1 |
Python | Python | fix the test for numpy.ndindex() | aef2cf73aafc9a945d88cb9464f62135b177a2f4 | <ide><path>numpy/lib/index_tricks.py
<ide> class ndindex(object):
<ide>
<ide> """
<ide> # This is a hack to handle 0-d arrays correctly.
<del> # Fixing nditer would be more work but should be done eventually.
<add> # Fixing nditer would be more work but should be done eventually,
<add> # and then thi... | 2 |
Ruby | Ruby | correct error message for failed creation | 8c110387f442aeaf19357f44fb20c2464a4f2754 | <ide><path>activesupport/lib/active_support/testing/assertions.rb
<ide> def assert_difference(expression, difference = 1, message = nil, &block)
<ide> #
<ide> # A error message can be specified.
<ide> #
<del> # assert_no_difference 'Article.count', "An Article should not be destroyed" do
<add> ... | 1 |
Ruby | Ruby | require mocha >= 0.9.0 for as tests | f927a60d0fa33f3e0fc3c0c891ae7657a227707f | <ide><path>activesupport/test/abstract_unit.rb
<ide> require 'active_support'
<ide> require 'active_support/test_case'
<ide>
<del>def uses_mocha(test_name, &block)
<del> yield
<del>end
<del>
<ide> def uses_memcached(test_name)
<ide> require 'memcache'
<ide> MemCache.new('localhost').stats
<ide><path>activesupport... | 14 |
Javascript | Javascript | replace flushdiscreteupdates with flushsync | 32eefcb3c5131f4d77a2195ff11a00a2513cf62f | <ide><path>packages/react-dom/src/__tests__/ReactDOMFiber-test.js
<ide> describe('ReactDOMFiber', () => {
<ide> expect(ops).toEqual(['A']);
<ide>
<ide> if (__DEV__) {
<del> const errorCalls = console.error.calls.count();
<add> expect(console.error.calls.count()).toBe(2);
<ide> expect(console.er... | 11 |
Text | Text | replace function with arrow function in vm.md | c9da77405133a2934fdb19c349cc3ed2a6bc1a33 | <ide><path>doc/api/vm.md
<ide> to the `http` module passed to it. For instance:
<ide> const vm = require('vm');
<ide>
<ide> const code = `
<del>(function(require) {
<add>((require) => {
<ide> const http = require('http');
<ide>
<ide> http.createServer((request, response) => { | 1 |
Ruby | Ruby | fix defaults for database configs | 5b9e96d38f5f83097f0cc46a45f53d90e83d3a0b | <ide><path>activerecord/lib/active_record/database_configurations/hash_config.rb
<ide> def database
<ide> end
<ide>
<ide> def pool
<del> configuration_hash.fetch(:pool, 5).to_i
<add> (configuration_hash[:pool] || 5).to_i
<ide> end
<ide>
<ide> def checkout_timeout
<del> con... | 2 |
Javascript | Javascript | remove json check for jscs config | 1514dca501fd383a9cdb6b42cce7c71fdad1ee38 | <ide><path>Gruntfile.js
<ide> module.exports = function( grunt ) {
<ide> src: [ "package.json" ]
<ide> },
<ide>
<del> jscs: {
<del> src: [ ".jscs.json" ]
<del> },
<del>
<ide> bower: {
<ide> src: [ "bower.json" ]
<ide> } | 1 |
Python | Python | codebase improvements on fileuploadparser | e36e4f48ad481b4303e68ed524677add07b224f7 | <ide><path>rest_framework/parsers.py
<ide> class FileUploadParser(BaseParser):
<ide> media_type = '*/*'
<ide>
<ide> def parse(self, stream, media_type=None, parser_context=None):
<add> """
<add> Returns a DataAndFiles object.
<add>
<add> `.data` will be None (we expect request body to be a... | 2 |
Text | Text | add a breakathon for testing | 6fc83eefd9e8d78044a51250d2ad185513fddd27 | <ide><path>hack/RELEASE-CHECKLIST.md
<ide> docker run \
<ide> hack/release.sh
<ide> ```
<ide>
<del>### 9. Apply tag
<add>### 9. Breakathon
<add>
<add>Spend several days along with the community explicitly investing time and
<add>resources to try and break Docker in every possible way, documenting any
<add>findi... | 1 |
PHP | PHP | fix tmpdir path | 1f47e127ab79bad66372a0f806af4dab3b1b203a | <ide><path>src/Log/Engine/FileLog.php
<ide> public function __construct(array $config = [])
<ide> {
<ide> parent::__construct($config);
<ide>
<del> $this->_path = $this->getConfig('path', sys_get_temp_dir());
<add> $this->_path = $this->getConfig('path', sys_get_temp_dir() . DIRECTORY_SEPARAT... | 1 |
Javascript | Javascript | get remainder of query_params_test.js passing | 97c10391c8d3a98c5ffba3a940f2b3dcf73485e2 | <ide><path>packages/ember-htmlbars/tests/system/make_view_helper_test.js
<ide> import makeViewHelper from "ember-htmlbars/system/make-view-helper";
<ide>
<ide> QUnit.module("ember-htmlbars: makeViewHelper");
<ide>
<add>// note: fixing this probably means breaking link-to component, which accepts params
<ide> QUnit.sk... | 5 |
Javascript | Javascript | add spec for alertmanager | 122cc8ba8ab7c5bbcc042f5221f5c0c53ec99c19 | <ide><path>Libraries/Alert/Alert.js
<ide>
<ide> 'use strict';
<ide>
<del>import NativeModules from '../BatchedBridge/NativeModules';
<ide> import Platform from '../Utilities/Platform';
<del>import DialogManagerAndroid, {
<add>import NativeDialogManagerAndroid, {
<ide> type DialogOptions,
<ide> } from '../NativeModu... | 3 |
Javascript | Javascript | add a simple (failing) test for named block usage | 19fb4a7eb8078c92c6c98b9c5ca98052722231e7 | <ide><path>packages/@ember/-internals/glimmer/tests/integration/helpers/yield-test.js
<ide> import { Component } from '../../utils/helpers';
<ide> moduleFor(
<ide> 'Helpers test: {{yield}} helper',
<ide> class extends RenderingTestCase {
<del> ['@test can yield to block']() {
<add> ['@test can yield to a defa... | 1 |
Ruby | Ruby | accept ldflags as string or array(string) | 97bc320836deb1195a1bf8f646a26c8c72ff845e | <ide><path>Library/Homebrew/formula.rb
<ide> def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework
<ide> end
<ide>
<ide> # Standard parameters for Go builds.
<del> sig { params(output: T.any(String, Pathname), ldflags: T.nilable(String)).returns(T::Array[String]) }
<add> sig {
<add> ... | 1 |
Javascript | Javascript | remove unnecessary tag end from commitranked view | ed94600fc6bbe0d6ea34a581672190e369b3d805 | <ide><path>packages/react-devtools-shared/src/devtools/views/Profiler/CommitRanked.js
<ide> function CommitRanked({chartData, commitTree, height, width}: Props) {
<ide> width={width}>
<ide> {CommitRankedListItem}
<ide> </FixedSizeList>
<del> >
<ide> </Tooltip>
<ide> );
<ide> } | 1 |
PHP | PHP | class. | f4a509a38edbbe6908685ee22e06b9d2159fb3f5 | <ide><path>src/Illuminate/Console/GeneratorCommand.php
<ide> protected function alreadyExists($rawName)
<ide> */
<ide> protected function getPath($name)
<ide> {
<del> $name = str_replace_first($this->rootNamespace(), '', $name);
<add> $name = Str::replaceFirst($this->rootNamespace(), '', $nam... | 6 |
PHP | PHP | fix docblock typo | 9c226485ba79eeaf483d8ed587341161c9202219 | <ide><path>src/Routing/RouteCollection.php
<ide> class RouteCollection {
<ide> * Add a route to the collection.
<ide> *
<ide> * @param \Cake\Routing\Route\Route $route The route object to add.
<del> * @param array $options Addtional options for the route. Primarily for the
<add> * @param array $options Additional op... | 1 |
Java | Java | add flux<part> serverrequest.parts() | 92981ac9dee2f8145b1253478264643df709cda9 | <ide><path>spring-test/src/main/java/org/springframework/mock/web/reactive/function/server/MockServerRequest.java
<ide> /*
<del> * Copyright 2002-2018 the original author or authors.
<add> * Copyright 2002-2019 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "Licens... | 8 |
Go | Go | fix tests and windows service | 6e7405ebd4df360bc84f651c977ece31283eb3ee | <ide><path>cli/cobra.go
<ide> func FlagErrorFunc(cmd *cobra.Command, err error) error {
<ide> if cmd.HasSubCommands() {
<ide> usage = "\n\n" + cmd.UsageString()
<ide> }
<del> return fmt.Errorf("%s\nSee '%s --help'.%s", err, cmd.CommandPath(), usage)
<add> return StatusError{
<add> Status: fmt.Sprintf("%s\nSee ... | 12 |
Javascript | Javascript | update examples to use modules | 74014f57edd45e1628db501ab7a44b8dcb741b1b | <ide><path>src/ng/filter/filters.js
<ide> *
<ide> *
<ide> * @example
<del> <example>
<add> <example module="currencyExample">
<ide> <file name="index.html">
<ide> <script>
<del> function Ctrl($scope) {
<del> $scope.amount = 1234.56;
<del> }
<add> angular.module('curr... | 1 |
PHP | PHP | update owasp synchronizer token pattern link | 125bd6eb6920f0be07101e7b47500643da663c6e | <ide><path>src/Http/Middleware/SessionCsrfProtectionMiddleware.php
<ide> *
<ide> * If you use this middleware *do not* also use CsrfProtectionMiddleware.
<ide> *
<del> * @see https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#sychronizer-token-pattern
<add> * @see h... | 1 |
Javascript | Javascript | add tests for matching 'otherwise' routes | 65e57a7c3d53fad536797301fe59b5912ed4db16 | <ide><path>test/ng/routeSpec.js
<ide> describe('$route', function() {
<ide> });
<ide>
<ide>
<del> it('should handle unknown routes with "otherwise" route definition', function() {
<del> function NotFoundCtrl() {}
<del>
<add> it('should chain whens and otherwise', function() {
<ide> module(function($routePr... | 1 |
PHP | PHP | fix getfailedloginmessage typo | b7d653e408dd8ef396b2a7552f81460d71db25da | <ide><path>src/Illuminate/Foundation/Auth/AuthenticatesAndRegistersUsers.php
<ide> public function postLogin(Request $request)
<ide> return redirect($this->loginPath())
<ide> ->withInput($request->only('email', 'remember'))
<ide> ->withErrors([
<del> 'email' => $this->getFailedLoginMesssage(),
<add> ... | 1 |
Javascript | Javascript | use default asset roots on `default.config.js` | 47926abca9d60b0a6090c3e82f50fb75ec659c6c | <ide><path>local-cli/default.config.js
<ide> var path = require('path');
<ide> */
<ide> var config = {
<ide> getProjectRoots() {
<del> if (__dirname.match(/node_modules[\/\\]react-native[\/\\]local-cli$/)) {
<del> // packager is running from node_modules of another project
<del> return [path.resolve(__d... | 1 |
Javascript | Javascript | keep track of min/max attars on-the-fly | 4b653aeac1aca7ac551738870a2446b6810ca0df | <ide><path>src/ng/directive/input.js
<ide> function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
<ide> });
<ide>
<ide> if (attr.min) {
<del> var min = parseFloat(attr.min);
<ide> var minValidator = function(value) {
<add> var min = parseFloat(attr.min);
<ide> if (!ctrl.$isEmp... | 2 |
Javascript | Javascript | fix initial aspect ratio when not responsive | 16bcd6adc579cb3deae16ea915680bc219924cdc | <ide><path>src/core/core.controller.js
<ide> module.exports = function(Chart) {
<ide>
<ide> var helpers = Chart.helpers;
<add>
<ide> // Create a dictionary of chart types, to allow for extension of existing types
<ide> Chart.types = {};
<ide>
<ide> module.exports = function(Chart) {
<ide> // Controllers available... | 3 |
Python | Python | add option to log only once in multinode training | f086652b16e59bece9571fb9a266557ad3181b2a | <ide><path>examples/pytorch/language-modeling/run_clm.py
<ide> set_seed,
<ide> )
<ide> from transformers.testing_utils import CaptureLogger
<del>from transformers.trainer_utils import get_last_checkpoint, is_main_process
<add>from transformers.trainer_utils import get_last_checkpoint
<ide> from transformers.utils i... | 15 |
Go | Go | improve the error print of image inspect | cc9ed0a31b0656c58ad7953f2c54d46258380443 | <ide><path>daemon/image_inspect.go
<ide> package daemon
<ide>
<ide> import (
<del> "fmt"
<ide> "time"
<ide>
<ide> "github.com/docker/docker/api/types"
<ide> "github.com/docker/docker/layer"
<ide> "github.com/docker/docker/reference"
<add> "github.com/pkg/errors"
<ide> )
<ide>
<ide> // LookupImage looks up an ima... | 2 |
Ruby | Ruby | add go@1.14 to binary urls allowlist | 8142bf2797e7411584e219255d0f849b3e9f0a90 | <ide><path>Library/Homebrew/rubocops/urls.rb
<ide> class Urls < FormulaCop
<ide> go@1.11
<ide> go@1.12
<ide> go@1.13
<add> go@1.14
<ide> haskell-stack
<ide> ldc
<ide> mlton | 1 |
Javascript | Javascript | avoid page double render with emotion vanilla | 789a665a036ede0fc8006ff27d29ef38650f6efc | <ide><path>examples/with-emotion-vanilla/pages/_document.js
<ide> import * as React from 'react'
<ide> import { renderStatic } from '../shared/renderer'
<ide> export default class AppDocument extends Document {
<ide> static async getInitialProps(ctx) {
<del> const page = await ctx.renderPage()
<del> const { css... | 1 |
Ruby | Ruby | ignore changed dependents | 424ded8fdb9e3e71851a5f8678bfab5a2c3d76c7 | <ide><path>Library/Homebrew/cmd/test-bot.rb
<ide> def formula formula_name
<ide> changed_dependences = dependencies - unchanged_dependencies
<ide>
<ide> dependents = `brew uses #{formula_name}`.split("\n")
<add> dependents -= @formulae
<ide> dependents = dependents.map {|d| Formulary.factory(d)}... | 1 |
Ruby | Ruby | drop unnecessary parens in tests | eed8af9b80979fcdd55dc44c963392dc84e63d4f | <ide><path>Library/Homebrew/test/test_build_environment.rb
<ide> def setup
<ide> end
<ide>
<ide> def test_shovel_returns_self
<del> assert_same @env, (@env << :foo)
<add> assert_same @env, @env << :foo
<ide> end
<ide>
<ide> def test_merge_returns_self
<ide><path>Library/Homebrew/test/test_compiler_queue... | 4 |
Python | Python | fix typo in retribert docstring | 9586e222affa86870fef603512ee5b9c6025a42e | <ide><path>src/transformers/models/retribert/tokenization_retribert.py
<ide> class RetriBertTokenizer(BertTokenizer):
<ide> r"""
<ide> Constructs a RetriBERT tokenizer.
<ide>
<del> [`RetroBertTokenizer`] is identical to [`BertTokenizer`] and runs end-to-end tokenization: punctuation splitting
<add> [`Ret... | 1 |
Ruby | Ruby | add tests for env.{append,prepend}_path | 865b68de103ccd4a0386dbd127db1827105aae4d | <ide><path>Library/Homebrew/test/test_ENV.rb
<ide> def test_with_build_environment_does_not_mutate_interface
<ide> @env.with_build_environment { assert_equal expected, @env.methods }
<ide> assert_equal expected, @env.methods
<ide> end
<add>
<add> def test_append_path
<add> @env.append_path 'FOO', '/usr/bi... | 1 |
PHP | PHP | fix failing tests | d95ef5d5e861de0bf34009a7ed9888732b23a40c | <ide><path>lib/Cake/Test/Case/Network/CakeSocketTest.php
<ide> public function testGetContext() {
<ide> 'host' => 'smtp.gmail.com',
<ide> 'port' => 465,
<ide> 'timeout' => 5,
<del> 'request' => array(
<del> 'context' => array(
<del> 'ssl' => array('capture_peer' => true)
<del> )
<add> 'context' =... | 2 |
Ruby | Ruby | require turn only for minitest | edf7c9a6a3331bfc0beabc9dc9c8beac22677e53 | <ide><path>activesupport/lib/active_support/test_case.rb
<ide> end
<ide>
<ide> # Added by Turn to support natural case names in the output formatting
<del>if defined?(MiniTest) && MiniTest::Unit.respond_to?(:use_natural_language_case_names=)
<del> MiniTest::Unit.use_natural_language_case_names = true
<add>if defined... | 1 |
Go | Go | run btrfs rescan only if userdiskquota is enabled | b36e613d9f311e69387ccec2be16f8618fa1f558 | <ide><path>daemon/graphdriver/btrfs/btrfs.go
<ide> func init() {
<ide> graphdriver.Register("btrfs", Init)
<ide> }
<ide>
<del>var (
<del> quotaEnabled = false
<del> userDiskQuota = false
<del>)
<del>
<ide> type btrfsOptions struct {
<ide> minSpace uint64
<ide> size uint64
<ide> func Init(home string, options [... | 1 |
Go | Go | parse runtime name | 1a96cf95ca23b62ba71f9bd8e8a4fb176bcf243b | <ide><path>daemon/info_unix.go
<ide> func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
<ide>
<ide> defaultRuntimeBinary := daemon.configStore.GetRuntime(v.DefaultRuntime).Path
<ide> if rv, err := exec.Command(defaultRuntimeBinary, "--version").Output(); err == nil {
<del> if _, commit,... | 2 |
Ruby | Ruby | clarify caveats usage | 10970a5c54c0723126bef3582f9e9a63d25e1b54 | <ide><path>Library/Homebrew/formula.rb
<ide> def run_post_install
<ide> @prefix_returns_versioned_prefix = false
<ide> end
<ide>
<del> # Tell the user about any caveats regarding this package.
<add> # Tell the user about any Homebrew-specific caveats or locations regarding
<add> # this package. These should n... | 1 |
Javascript | Javascript | improve semver range detection | a9993bbabf96299741d6a50e94da3b00e945490f | <ide><path>lib/sharing/utils.js
<ide> const { join, dirname, readJson } = require("../util/fs");
<ide> */
<ide> exports.isRequiredVersion = str => {
<ide> if (str === "*") return true;
<del> return /^[\d^=<>~]/.test(str) || /\|\|/.test(str);
<add> return /^[\d^=v<>~]/.test(str);
<ide> };
<ide>
<ide> /** | 1 |
Text | Text | update my name in kickstarter-supporters | 32c69ed789044cb898146eb0591f809ec09d0c83 | <ide><path>docs/Kickstarter-Supporters.md
<ide> These wonderful people supported our Kickstarter by giving us £10 or more:
<ide> * [Andrew Brown](http://pvalu.es)
<ide> * [Bethany Sumner](http://www.bethanysumner.com/)
<ide> * [Orta](http://orta.io)
<del>* [Michał Gołębiowski](https://github.com/mgol)
<add>* [Michał Go... | 1 |
Python | Python | censor possibly secret settings. concerns | 71649be305eb84fb1d073a9dcd27d29bd78ce1cc | <ide><path>celery/app/utils.py
<ide>
<ide> import os
<ide> import platform as _platform
<add>import re
<ide> import types
<ide>
<ide> try:
<ide> {human_settings}
<ide> """
<ide>
<add>HIDDEN_SETTINGS = re.compile(
<add> 'API|TOKEN|KEY|SECRET|PASS|PROFANITIES_LIST|SIGNATURE|DATABASE',
<add> re.IGNORECASE,
<add>)... | 1 |
Ruby | Ruby | remove ruby 1.8 compatible codes | e423617d771b934da4c82ab30683d0a05aa20b45 | <ide><path>Library/Homebrew/brew.rb
<ide> std_trap = trap("INT") { exit! 130 } # no backtrace thanks
<ide>
<add># check ruby version before requiring any modules.
<add>RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2
<add>raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO
<add>
<ide> require "pathname"
<ide>... | 6 |
Ruby | Ruby | remove unnecessary constant | e9e11072d32707f903b66936efef8ecc9133dd8a | <ide><path>activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
<ide>
<ide> module ActiveSupport
<ide> module BigDecimalWithDefaultFormat #:nodoc:
<del> DEFAULT_STRING_FORMAT = 'F'
<del>
<del> def to_s(format = nil)
<del> super(format || DEFAULT_STRING_FORMAT)
<add> def to_s(format = 'F... | 1 |
Ruby | Ruby | fix bottling non-testing jobs | 793a75f3f3e5b46639683df610cc819d796cbba8 | <ide><path>Library/Homebrew/dev-cmd/test-bot.rb
<ide> def test_ci_upload(tap)
<ide> safe_system "brew", "pull", "--clean", pull_pr
<ide> end
<ide>
<del> if ENV["UPSTREAM_BOTTLE_KEEP_OLD"] || ENV["BOT_PARAMS"].include?("--keep-old")
<add> if ENV["UPSTREAM_BOTTLE_KEEP_OLD"] || ENV["BOT_PARAMS"].to_s.incl... | 1 |
Text | Text | fix the language in engines guide | dd898fe6a015ab47405ac3851ba50ffd5bc1c22a | <ide><path>guides/source/engines.md
<ide> module Blorgh
<ide> end
<ide> ```
<ide>
<del>NOTE: The `ApplicationController` class being inherited from here is the
<add>NOTE: The `ArticlesController` class inherits from
<ide> `Blorgh::ApplicationController`, not an application's `ApplicationController`.
<ide>
<ide> The h... | 1 |
PHP | PHP | fix typeerror in csrfprotectionmiddleware | 4044e676b4ddfe898f109910021707caebc09d0d | <ide><path>src/Http/Middleware/CsrfProtectionMiddleware.php
<ide> public function process(ServerRequestInterface $request, RequestHandlerInterface
<ide> $cookieData = Hash::get($cookies, $this->_config['cookieName']);
<ide>
<ide> if (is_string($cookieData) && strlen($cookieData) > 0) {
<del> ... | 2 |
Text | Text | remove oauth2 from docs | 957700ecfb36322a8ea40ea473dc43ff1e92592f | <ide><path>docs/api-guide/authentication.md
<ide> Unauthenticated responses that are denied permission will result in an `HTTP 401
<ide>
<ide> **Note:** If you use `TokenAuthentication` in production you must ensure that your API is only available over `https` only.
<ide>
<del>## OAuth2Authentication
<add><!--## OAut... | 1 |
PHP | PHP | apply fixes from styleci | 09bb0ab08626df5cbb5b2dc01db8677bf988debd | <ide><path>src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
<ide> public function touch()
<ide> $key = $this->getRelated()->getKeyName();
<ide>
<ide> $columns = [
<del> $this->related->getUpdatedAtColumn() =>
<del> $this->related->freshTimestampString()
<add> ... | 1 |
Ruby | Ruby | exclude hardlinks from mach_o_files | d3ef56425a6b4c190317c2527137b97c0ff5daf8 | <ide><path>Library/Homebrew/keg_relocate.rb
<ide> def find_dylib(bad_name)
<ide> end
<ide>
<ide> def mach_o_files
<add> hardlinks = Set.new
<ide> mach_o_files = []
<ide> path.find do |pn|
<ide> next if pn.symlink? || pn.directory?
<del> mach_o_files << pn if pn.dylib? || pn.mach_o_bundle? || ... | 1 |
Javascript | Javascript | fix crash in xmlhttprequest example on android | 16e4971121435879e4f621214948379ab4ea2734 | <ide><path>RNTester/js/XHRExampleFormData.js
<ide> class XHRExampleFormData extends React.Component<Object, Object> {
<ide> _fetchRandomPhoto = () => {
<ide> CameraRoll.getPhotos({
<ide> first: PAGE_SIZE,
<del> groupTypes: 'All',
<add> groupTypes: Platform.OS === 'ios' ? 'All' : undefined,
<ide> ... | 1 |
Javascript | Javascript | improve `worker_threads ` coverage | ba5b5acaf10799206229793f71a4f6542235439f | <ide><path>test/parallel/test-worker-environmentdata.js
<ide> 'use strict';
<add>// Flags: --expose-internals
<ide>
<ide> require('../common');
<ide> const {
<ide> const {
<ide> threadId,
<ide> } = require('worker_threads');
<ide>
<add>const { assignEnvironmentData } = require('internal/worker');
<add>
<ide> const ... | 2 |
Ruby | Ruby | stop printing message | 12c454822aff7320cee503c0708d30a99f4a0e0c | <ide><path>Library/Homebrew/cmd/postinstall.rb
<ide> def run_post_install(formula)
<ide> args << "--devel"
<ide> end
<ide>
<del> Sandbox.print_sandbox_message if Sandbox.formula?(formula)
<del>
<ide> Utils.safe_fork do
<ide> if Sandbox.formula?(formula)
<ide> sandbox = Sandbox.new
<ide><... | 4 |
Python | Python | add test for internal ip creation for gcp | 7a5abfa9de3c9442a7db189bbd1f662b80c680cf | <ide><path>libcloud/test/compute/test_gce.py
<ide> def test_ex_create_address(self):
<ide> self.assertTrue(isinstance(address, GCEAddress))
<ide> self.assertEqual(address.name, address_name)
<ide>
<add> def test_ex_create_address_internal(self):
<add> address_name = 'lcaddressinternal'
<add> ... | 1 |
PHP | PHP | add typehint for consistency | 2f01353e7f72e1ac910f260af5a85e58e7946833 | <ide><path>src/Illuminate/Support/helpers.php
<ide> function array_has($array, $key)
<ide> * @param mixed $default
<ide> * @return mixed
<ide> */
<del> function array_last($array, $callback = null, $default = null)
<add> function array_last($array, callable $callback = null, $default = null)
<ide... | 1 |
PHP | PHP | catch the `stopexception` when execute a command | 649c0a44df6677f38fe342782d5047066630009b | <ide><path>src/Console/CommandRunner.php
<ide> public function run(array $argv, ConsoleIo $io = null)
<ide> $result = $this->runShell($shell, $argv);
<ide> }
<ide> if ($shell instanceof Command) {
<del> $result = $shell->run($argv, $io);
<add> $result = $this->runComman... | 1 |
Javascript | Javascript | reduce duplication in drawgrid | 99596b04345ab79fc2bca9016779b2671db87bd7 | <ide><path>src/core/core.scale.js
<ide> export default class Scale extends Element {
<ide> const items = me._gridLineItems || (me._gridLineItems = me._computeGridLineItems(chartArea));
<ide> let i, ilen;
<ide>
<add> const drawLine = (p1, p2, style) => {
<add> if (!style.width || !style.color) {
<add> ... | 1 |
Javascript | Javascript | update error message keywords | 340161b9ff949f1b2be271548b9cab1581cb1e1e | <ide><path>test/parallel/test-module-loading-error.js
<ide> const errorMessagesByPlatform = {
<ide> win32: ['is not a valid Win32 application'],
<ide> linux: ['file too short', 'Exec format error'],
<ide> sunos: ['unknown file type', 'not an ELF file'],
<del> darwin: ['file too short'],
<add> darwin: ['file too... | 1 |
Javascript | Javascript | use async/await in test-debugger-preserve-breaks | 0098af1e371d3f1b161bad312571ce55a776c987 | <ide><path>test/sequential/test-debugger-preserve-breaks.js
<ide> const startCLI = require('../common/debugger');
<ide> const assert = require('assert');
<ide> const path = require('path');
<ide>
<add>const scriptFullPath = fixtures.path('debugger', 'three-lines.js');
<add>const script = path.relative(process.cwd(), s... | 1 |
Javascript | Javascript | add date comparison to ember.compare | b3f2c9c3ff07658fc5b31a152ef17952a785a160 | <ide><path>packages/ember-runtime/lib/core.js
<ide> Ember.compare = function compare(v, w) {
<ide> }
<ide> return 0;
<ide>
<add> case 'date':
<add> var vNum = v.getTime();
<add> var wNum = w.getTime();
<add> if (vNum < wNum) { return -1; }
<add> if (vNum > wNum) { return 1; }
<add> ... | 2 |
PHP | PHP | fix callback return for durationlimiter | d50929802e98a140018d42f2115c8d4ce8db6ced | <ide><path>src/Illuminate/Redis/Limiters/DurationLimiter.php
<ide> public function block($timeout, $callback = null)
<ide> }
<ide>
<ide> if (is_callable($callback)) {
<del> $callback();
<add> return $callback();
<ide> }
<ide>
<ide> return true;
<ide><path>tests/Re... | 2 |
Javascript | Javascript | add debug stuff | 64f12f8ee103365a8585e958a22f2bd5d3375917 | <ide><path>config/passport.js
<ide> passport.deserializeUser(function(id, done) {
<ide> });
<ide>
<ide> function sendWelcomeEmail(user) {
<del> var transporter = nodemailer.createTransport({
<del> service: 'Mandrill',
<del> auth: {
<del> user: secrets.mandrill.user,
<del> pass: s... | 1 |
Javascript | Javascript | update error message | 30f103f0044d881d0c00166e58c80b770514d224 | <ide><path>src/geometries/ParametricGeometry.js
<ide> function ParametricBufferGeometry( func, slices, stacks ) {
<ide>
<ide> if ( func.length < 3 ) {
<ide>
<del> console.error( 'THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.' );
<add> console.error( 'THREE.ParametricGeometry: "fu... | 1 |
Text | Text | add commit format | f56101a26ad435dcf87fec6363fc18b0c7938e58 | <ide><path>share/doc/homebrew/Migrating-A-Formula-To-A-Tap.md
<ide> There are times when we may wish to migrate a formula from Homebrew's core (the main repository) into a tap (another repository). To do this:
<ide>
<ide> 1. Create a pull request to the new tap adding the formula file as-is from the main Homebrew repo... | 1 |
Java | Java | add mention of shortcut methods in bodyinserters | ce895d7a84a851426a11548de3b942458540a413 | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyInserters.java
<ide> public static <T> BodyInserter<T, ReactiveHttpOutputMessage> empty() {
<ide>
<ide> /**
<ide> * Return a {@code BodyInserter} that writes the given single object.
<add> * <p>Note also that
<add> * {@link org.... | 1 |
Ruby | Ruby | use bind parameters for ranges in where clauses | 6efb39456a8ee3569f3787cc2f26c041365a0e27 | <ide><path>activerecord/lib/active_record/relation/predicate_builder.rb
<ide> def initialize(table)
<ide> register_handler(Class, ClassHandler.new(self))
<ide> register_handler(Base, BaseHandler.new(self))
<ide> register_handler(Range, RangeHandler.new(self))
<add> register_handler(RangeHandler::... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.