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 | fix incorrect alias name on joined associations | 22f82f53e8d45e573b13303745009efdc0cf15cf | <ide><path>src/ORM/ResultSet.php
<ide> protected function _groupResult($row)
<ide> $presentAliases[$table] = true;
<ide> }
<ide>
<add> // If the default table is not in the results, set
<add> // it to an empty array so that any contained
<add> // associations hydrate correctly.... | 3 |
Python | Python | add pre_save hook in generic views | 8c360770c18ac38a2f4da81a3553fb40592558c4 | <ide><path>rest_framework/mixins.py
<ide> class CreateModelMixin(object):
<ide> def create(self, request, *args, **kwargs):
<ide> serializer = self.get_serializer(data=request.DATA)
<ide> if serializer.is_valid():
<add> self.pre_save(serializer.object)
<ide> self.object = seri... | 1 |
Ruby | Ruby | add examples `alert=` and `notice=`, using memes | ebdb8633bfaddfee05b4207e5c51c7cf6a790f7d | <ide><path>actionpack/lib/action_dispatch/middleware/flash.rb
<ide> def [](k)
<ide> end
<ide>
<ide> # Convenience accessor for flash.now[:alert]=
<add> #
<add> # Example:
<add> #
<add> # flash.alert = "Error: no cheezburger"
<add> # # Equivlant to flash[:alert] = "No cheezburge... | 1 |
Go | Go | fix a wrong word in comment | 9be8bf019419be76e9582188888b80b0940abf74 | <ide><path>pkg/mflag/flag.go
<ide> // will display: `Warning: '-flagname' is deprecated, it will be removed soon. See usage.`
<ide> // so you can only use `-f`.
<ide> //
<del>// You can also group one letter flags, bif you declare
<add>// You can also group one letter flags, if you declare
<ide> // var v = flag.Bool([... | 1 |
Javascript | Javascript | improve error phrasing | 9e0a95e48b22c2853dca841561c12ad5b01e2c59 | <ide><path>bin/convert-argv.js
<ide> module.exports = function(optimist, argv, convertOptions) {
<ide> var webpackOptionsValidationErrors = validateWebpackOptions(options);
<ide>
<ide> if(webpackOptionsValidationErrors.length) {
<del> console.error("Configuration is invalid. Fix the following errors:", webpackOp... | 2 |
Javascript | Javascript | check range fix for slowtostring | a04721df66db6d18f35116bcebcd3c2c6ddb2d19 | <ide><path>test/parallel/test-buffer.js
<ide> b.copy(new Buffer(1), 1, 1, 1);
<ide> // try to copy 0 bytes from past the end of the source buffer
<ide> b.copy(new Buffer(1), 0, 2048, 2048);
<ide>
<del>// try to toString() a 0-length slice of a buffer, both within and without the
<del>// valid buffer range
<del>assert.... | 1 |
Python | Python | fix lint and object instantiation | eacb989478158c940d0dc9167e2bb4e71eaa2478 | <ide><path>libcloud/compute/drivers/ec2.py
<ide> def ex_delete_keypair(self, keypair):
<ide> warnings.warn('This method has been deprecated in favor of '
<ide> 'delete_key_pair method')
<ide>
<del> keypair = KeyPair(name=keypair, driver=self, public_key='', fingerprint='')
<add> ... | 1 |
Text | Text | add blog post to v2.1 page | 5944cf10c7b2b7ea399d51dde58cb811a8c3b8b8 | <ide><path>website/docs/usage/v2-1.md
<ide> design changes introduced in [v2.0](/usage/v2). As well as smaller models,
<ide> faster runtime, and many bug fixes, v2.1 also introduces experimental support
<ide> for some exciting new NLP innovations. For the full changelog, see the
<ide> [release notes on GitHub](https://... | 1 |
PHP | PHP | use connectioninterface instead of implementation | 64b30a8c493547a9ae07090ee83450a486d3cd06 | <ide><path>src/Illuminate/Database/ConnectionResolver.php
<ide> public function __construct(array $connections = array())
<ide> * Get a database connection instance.
<ide> *
<ide> * @param string $name
<del> * @return \Illuminate\Database\Connection
<add> * @return \Illuminate\Database\ConnectionInterface
<id... | 1 |
Text | Text | fix depreciation dates | 26701e2d9fc9e45f39b091351088b6b9a9f019d5 | <ide><path>docs/misc/deprecated.md
<ide> the path does not exist.
<ide> Version 1.9 adds a flag (`--disable-legacy-registry=false`) which prevents the docker daemon from `pull`, `push`, and `login` operations against v1 registries. Though disabled by default, this signals the intent to deprecate the v1 protocol.
<ide>... | 1 |
Ruby | Ruby | fix delete_all to remove records directly | e247f3257927e008ed89944249ac38a8838f719f | <ide><path>activerecord/lib/active_record/associations/collection_association.rb
<ide> def delete(*records)
<ide> dependent = _options[:dependent] || options[:dependent]
<ide>
<ide> if records.first == :all
<del> if loaded? || dependent == :destroy
<add> if (loaded? || dependent == :d... | 1 |
Text | Text | fix some ‘cocoapods’ capitalization | 539ff6476a896b79c153972e050db3ef9b0fa2d4 | <ide><path>docs/EmbeddedApp.md
<ide> permalink: docs/embeded-app.html
<ide> next: activityindicatorios
<ide> ---
<ide>
<del>Since React makes no assumptions about the rest of your technology stack – it’s commonly noted as simply the `V` in `MVC` – it’s easily embeddable within an existing non-React Native app. In fact... | 1 |
Python | Python | add upos as morphological field in ud_train | a6d153b0a0a9dcbefeca906cda37329ca15d7ce2 | <ide><path>spacy/cli/ud/ud_train.py
<ide> def read_data(
<ide> sent["words"].append(word)
<ide> sent["tags"].append(tag)
<ide> sent["morphology"].append(_parse_morph_string(morph))
<add> sent["morphology"][-1].add("POS_%s" % pos)
<ide> sent[... | 1 |
Text | Text | use comma after etc | c40113d9cc275ec00062cbc6a48a1ee65381d7f3 | <ide><path>guides/source/active_record_multiple_databases.md
<ide> database you can run `bin/rails db:create:animals`.
<ide> ## Connecting to Databases without Managing Schema and Migrations
<ide>
<ide> If you would like to connect to an external database without any database
<del>management tasks such as schema manag... | 1 |
Ruby | Ruby | add standalone requirement | 15916338888e48e70edc4ade7f0aff94e3607e76 | <ide><path>Library/Homebrew/requirements.rb
<ide> require "requirement"
<ide> require "requirements/apr_requirement"
<ide> require "requirements/fortran_requirement"
<add>require "requirements/gpg_requirement"
<ide> require "requirements/language_module_requirement"
<ide> require "requirements/minimum_macos_requirement... | 2 |
Javascript | Javascript | simplify hmr codepath | 4afeb4310b9004eff46466ad2c86cca4fc8df845 | <ide><path>local-cli/server/util/attachHMRServer.js
<ide> function attachHMRServer({httpServer, path, packagerServer}) {
<ide> entryFile: client.bundleEntry,
<ide> platform: client.platform,
<ide> modules: modulesToUpdate,
<del> });
<add> ... | 7 |
Javascript | Javascript | reorganize metal to support 2wb in glimmer | 9471527454b30b9a892d6d40f21735365b5a2897 | <ide><path>packages/ember-glimmer/lib/component.js
<ide> import AriaRoleSupport from 'ember-views/mixins/aria_role_support';
<ide> import ViewMixin from 'ember-views/mixins/view_support';
<ide> import EmberView from 'ember-views/views/view';
<ide> import symbol from 'ember-metal/symbol';
<add>import { get } from 'ember... | 18 |
Ruby | Ruby | fix directory leak in test_cleaner | 4d14cafaa543ebeb133d65a6e82967509c223ae8 | <ide><path>Library/Homebrew/test/test_cleaner.rb
<ide> def setup
<ide> end
<ide>
<ide> def teardown
<del> @f.prefix.rmtree if @f.prefix.exist?
<add> @f.rack.rmtree if @f.rack.exist?
<ide> end
<ide>
<ide> def test_clean_file | 1 |
PHP | PHP | fix publishing visibility | f2ce3d50073eedb49c806a6f2f0049b58b3b04bc | <ide><path>src/Illuminate/Foundation/Console/VendorPublishCommand.php
<ide> use League\Flysystem\Filesystem as Flysystem;
<ide> use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter;
<ide> use League\Flysystem\MountManager;
<add>use League\Flysystem\UnixVisibility\PortableVisibilityConverter;
<add>use Leagu... | 1 |
Mixed | Python | add script to generate chart changelog annotations | c56835304318f0695c79ac42df7a97ad05ccd21e | <ide><path>dev/README_RELEASE_HELM_CHART.md
<ide> commits between the last release, `1.1.0`, and `main`:
<ide> git log --oneline helm-chart/1.1.0..main --pretty='format:- %s' -- chart/ docs/helm-chart/
<ide> ```
<ide>
<add>### Add changelog annotations to `Chart.yaml`
<add>
<add>Once the changelog has been built, run ... | 2 |
Python | Python | add error message concerning revision | 401377e6796a5939bbd4cd6c3b8d8d00ca33495d | <ide><path>src/transformers/configuration_utils.py
<ide> def get_config_dict(
<ide> f"- '{pretrained_model_name_or_path}' is a correct model identifier listed on 'https://huggingface.co/models'\n\n"
<ide> f"- or '{pretrained_model_name_or_path}' is the correct path to a directory contain... | 3 |
Go | Go | fix mutex copy | 46077fcfb13008dd8692c4be5180104dfbfe5e39 | <ide><path>libnetwork/drivers/overlay/overlay.go
<ide> func Init(dc driverapi.DriverCallback, config map[string]interface{}) error {
<ide> d := &driver{
<ide> networks: networkTable{},
<ide> peerDb: peerNetworkMap{
<del> mp: map[string]peerMap{},
<add> mp: map[string]*peerMap{},
<ide> },
<ide> config: conf... | 2 |
Javascript | Javascript | fix test-worker-memory.js for large cpu #s | f96a6608eb63f4c6710c9c2078916655e32cf003 | <ide><path>test/parallel/test-worker-memory.js
<ide> const assert = require('assert');
<ide> const util = require('util');
<ide> const { Worker } = require('worker_threads');
<ide>
<del>const numWorkers = +process.env.JOBS || require('os').cpus().length;
<add>let numWorkers = +process.env.JOBS || require('os').cpus().... | 1 |
Python | Python | add special tokens to gpt-2 | c30139a013f8d65dc691efaac107691bb798419e | <ide><path>pytorch_pretrained_bert/modeling_gpt2.py
<ide> class GPT2Config(object):
<ide> def __init__(
<ide> self,
<ide> vocab_size_or_config_json_file=50257,
<add> n_special=0,
<ide> n_positions=1024,
<ide> n_ctx=1024,
<ide> n_embd=768,
<ide> def __init__(
<ide>
<id... | 3 |
Ruby | Ruby | remove the need for `ensure_cache_exists` | b2f67c6d776170b64a2963e175f96f23eef4646e | <ide><path>Library/Homebrew/cask/lib/hbc.rb
<ide>
<ide> module Hbc
<ide> def self.init
<del> Cache.ensure_cache_exists
<ide> Caskroom.ensure_caskroom_exists
<ide> end
<ide> end
<ide><path>Library/Homebrew/cask/lib/hbc/cache.rb
<ide> module Cache
<ide> def path
<ide> @path ||= HOMEBREW_CACHE.join("... | 6 |
Ruby | Ruby | handle nil key for memcachestore#normalize_key | d13937bab5d821fc2b68ac4c7215946fee02e53f | <ide><path>activesupport/lib/active_support/cache/mem_cache_store.rb
<ide> def delete_entry(key, **options)
<ide> # before applying the regular expression to ensure we are escaping all
<ide> # characters properly.
<ide> def normalize_key(key, options)
<del> key = super.dup
<del> ... | 2 |
Javascript | Javascript | add test for sync methods (type=sync) | 37bbfa663de8dfab6fdf1235c8f94efbd1046e91 | <ide><path>Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js
<ide> const remoteModulesConfig: $ReadOnlyArray<ModuleConfig> = [
<ide> [
<ide> 'RemoteModule1',
<ide> null,
<del> ['remoteMethod', 'promiseMethod', 'promiseReturningMethod'],
<add> ['remoteMethod', 'promiseMethod', 'promiseReturning... | 2 |
Javascript | Javascript | fix linter issue | 4d0f36f4afa6d4896f72ca20aab019fdadd469f5 | <ide><path>tasks/nuget.js
<ide> module.exports = function (grunt) {
<ide> });
<ide> grunt.registerTask('nugetkey_pre', function () {
<ide> grunt.option('key', process.env.NUGET_KEY);
<del> grunt.option('source', "https://www.nuget.org/api/v2/package");
<add> grunt.option('source', 'https:/... | 1 |
PHP | PHP | fix failing tests with requestaction() | c248470af204aa6f5f4610d89cfa046e4938570a | <ide><path>lib/Cake/Core/Object.php
<ide> public function toString() {
<ide> *
<ide> * #### Passing POST and GET data
<ide> *
<del> * POST and GET data can be simulated in requestAction. Use `$extra['url']` for
<del> * GET data. The `$extra['data']` parameter allows POST data simulation.
<add> * POST and GET data ... | 4 |
PHP | PHP | fix eager loading within global scope | 9cce184103e6ef40d90dd601224efa11e30884b2 | <ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> public function firstOrFail($columns = ['*'])
<ide> */
<ide> public function get($columns = ['*'])
<ide> {
<del> $models = $this->getModels($columns);
<add> $builder = $this->applyScopes();
<add>
<add> $models = $builder->ge... | 7 |
Text | Text | update directory name in sample commands | 23e6ad547cf30a7ddffaba4dc5f93c45f3ef4722 | <ide><path>guides/source/contributing_to_ruby_on_rails.md
<ide> $ TEST_DIR=generators bundle exec rake test
<ide> You can run the tests for a particular file by using:
<ide>
<ide> ```bash
<del>$ cd actionpack
<add>$ cd actionview
<ide> $ bundle exec ruby -w -Itest test/template/form_helper_test.rb
<ide> ```
<ide> | 1 |
Javascript | Javascript | add a null type test for memo | 48f1e5b3ced33aa2d5ba42afa38af9cf7e51a0ed | <ide><path>packages/react-reconciler/src/__tests__/ReactMemo-test.internal.js
<ide> describe('memo', () => {
<ide> expect(ReactNoop.getChildren()).toEqual([span(20)]);
<ide> });
<ide>
<del> it('warns if first argument is undefined', () => {
<add> it('warns if the first argument is undefined', (... | 2 |
Go | Go | move signal.dumpstacks() to a separate package | ea5c94cdb94f74808958732d8b3254921f52be4f | <ide><path>daemon/cluster/cluster.go
<ide> import (
<ide> "github.com/docker/docker/daemon/cluster/controllers/plugin"
<ide> executorpkg "github.com/docker/docker/daemon/cluster/executor"
<ide> lncluster "github.com/docker/docker/libnetwork/cluster"
<del> "github.com/docker/docker/pkg/signal"
<add> "github.com/docke... | 10 |
Mixed | Javascript | add perspective transform support on android | a06ced4b164c003992daec50c7c8f909f07b0d39 | <ide><path>Examples/UIExplorer/js/TransformExample.js
<ide> exports.title = 'Transforms';
<ide> exports.description = 'View transforms';
<ide> exports.examples = [
<ide> {
<del> title: 'Perspective',
<add> title: 'Perspective, Rotate, Animation',
<ide> description: 'perspective: 850, rotateX: Animated.timin... | 2 |
PHP | PHP | fix variadic routing parameters | 7ad809ddc026597806f7a7359ef44f5abd3a6ab0 | <ide><path>src/Controller/ControllerFactory.php
<ide> public function invoke($controller): ResponseInterface
<ide> );
<ide> }
<ide> }
<add> if (count($passed)) {
<add> $args = array_merge($args, $passed);
<add> }
<ide> $controller->invokeAction($actio... | 3 |
Javascript | Javascript | add max for http keepalive | 12894924af54114b1d9e8d19fff7dbaf1e2a23da | <ide><path>lib/_http_outgoing.js
<ide> function _storeHeader(firstLine, headers) {
<ide> header += 'Connection: keep-alive\r\n';
<ide> if (this._keepAliveTimeout && this._defaultKeepAlive) {
<ide> const timeoutSeconds = MathFloor(this._keepAliveTimeout / 1000);
<del> header += `Keep-Alive: ti... | 4 |
Text | Text | add more internal links to fs.stats object | 746da42cae214e27b97cd583eb3c5f6eb4777dec | <ide><path>doc/api/fs.md
<ide> added: v0.1.95
<ide>
<ide> * `fd` {Integer}
<ide>
<del>Synchronous fstat(2). Returns an instance of `fs.Stats`.
<add>Synchronous fstat(2). Returns an instance of [`fs.Stats`][].
<ide>
<ide> ## fs.fsync(fd, callback)
<ide> <!-- YAML
<ide> added: v0.1.30
<ide>
<ide> * `path` {String | B... | 1 |
Javascript | Javascript | add promisified readfile benchmark | b9fd4eb651dd26c3845aa46714593abae185455d | <ide><path>benchmark/fs/readfile-promises.js
<add>// Call fs.promises.readFile over and over again really fast.
<add>// Then see how many times it got called.
<add>// Yes, this is a silly benchmark. Most benchmarks are silly.
<add>'use strict';
<add>
<add>const path = require('path');
<add>const common = require('../c... | 1 |
Javascript | Javascript | unite iteration through modules into one loop | fc20348f970c7a187c6038f22e76186ea65f2d60 | <ide><path>lib/optimize/ConcatenatedModule.js
<ide> class ConcatenatedModule extends Module {
<ide> this.cacheable = modules.every(m => m.cacheable);
<ide> const modulesSet = new Set(modules);
<ide> this.reasons = rootModule.reasons.filter(reason => !modulesSet.has(reason.module));
<del> this.dependencies = [];
... | 1 |
Ruby | Ruby | add pinned taps count to brew tap-info | 4165b34ddeb99e67f9ad3ad856a28f28092aa779 | <ide><path>Library/Homebrew/cmd/tap-info.rb
<ide> def print_tap_info(taps)
<ide> tap_count = 0
<ide> formula_count = 0
<ide> command_count = 0
<add> pinned_count = 0
<ide> Tap.each do |tap|
<ide> tap_count += 1
<ide> formula_count += tap.formula_files.size
<ide> comm... | 1 |
Python | Python | correct linker flags for nag fortran compiler | acb0e9eb57674288ef18bf39908026bc4f42c4a4 | <ide><path>numpy/distutils/fcompiler/nag.py
<ide> def version_match(self, version_string):
<ide> return None
<ide>
<ide> def get_flags_linker_so(self):
<del> if sys.platform == 'darwin':
<del> return ['-unsharedf95',
<del> '-Wl,-bundle,-flat_namespace,-undefined,su... | 1 |
Go | Go | remove timeout on fifos opening | c178700a0420118fe7f632af4da1bc43abd3a9bf | <ide><path>libcontainerd/client_linux.go
<ide> func (clnt *client) GetServerVersion(ctx context.Context) (*ServerVersion, error
<ide> // AddProcess is the handler for adding a process to an already running
<ide> // container. It's called through docker exec. It returns the system pid of the
<ide> // exec'd process.
<de... | 3 |
Go | Go | fix jsonmessage in build | 95c0ade04bb8fe95029fed521126e3268a1eda7f | <ide><path>buildfile.go
<ide> type StdoutFormater struct {
<ide> }
<ide>
<ide> func (sf *StdoutFormater) Write(buf []byte) (int, error) {
<del> formattedBuf := sf.StreamFormatter.FormatStatus("", "%s", string(buf))
<add> formattedBuf := sf.StreamFormatter.FormatStream(string(buf))
<ide> n, err := sf.Writer.Write(form... | 4 |
Ruby | Ruby | use --time-cond when caching the formula api json | 8993ebca88e6462502d2bddae5393c54ba876a3d | <ide><path>Library/Homebrew/api/formula.rb
<ide> def all_formulae
<ide> if cached_formula_json_file.exist?
<ide> last_modified = cached_formula_json_file.mtime.utc
<ide> last_modified = last_modified.strftime("%a, %d %b %Y %H:%M:%S GMT")
<del> curl_args = ["--header"... | 1 |
Ruby | Ruby | fix word casing of `xhtml` and `xml builder` | c38d585ef042926a9e99775f092dea0543833110 | <ide><path>actionview/lib/action_view/helpers/atom_feed_helper.rb
<ide> module AtomFeedHelper
<ide> # end
<ide> #
<ide> # The Atom spec defines five elements (content rights title subtitle
<del> # summary) which may directly contain xhtml content if type: 'xhtml'
<add> # summary) which m... | 1 |
Ruby | Ruby | remove meaningless check | 7a0fe78d08c93574430be3304e83555602f1d875 | <ide><path>activesupport/lib/active_support/railtie.rb
<ide> class Railtie < Rails::Railtie # :nodoc:
<ide> end
<ide>
<ide> initializer "active_support.set_hash_digest_class" do |app|
<del> if app.config.active_support.respond_to?(:hash_digest_class) && app.config.active_support.hash_digest_class
<add> ... | 1 |
Javascript | Javascript | add generated file | 762f984dfb36f9a272eb9b7be24bfb252d88099e | <ide><path>d3.js
<ide> d3 = function() {
<ide> };
<ide> var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
<ide> var d3_time = d3.time = {}, d3_date = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday... | 1 |
Java | Java | remove use of simple executor in websocket clients | 9552c82e2d81bcb6c781793e1fe14708bd4db25b | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java
<ide> import org.eclipse.jetty.websocket.client.WebSocketClient;
<ide> import org.springframework.context.SmartLifecycle;
<ide> import org.springframework.core.task.AsyncListenableTaskExecutor;
<del>import or... | 4 |
Javascript | Javascript | use spread operator on cluster | 12845a8bd1a71f2cf26ae43adef76353dabd09b9 | <ide><path>lib/internal/cluster/master.js
<ide> cluster.setupMaster = function(options) {
<ide> // process has its own memory mappings.)
<ide> if (settings.execArgv.some((s) => s.startsWith('--prof')) &&
<ide> !settings.execArgv.some((s) => s.startsWith('--logfile='))) {
<del> settings.execArgv = settings.... | 1 |
Text | Text | add v4.8.0-beta.3 to changelog | 46774eba9a2e8956dd7227cdbd08aad96fe74b26 | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### v4.8.0-beta.3 (September 19, 2022)
<add>
<add>- [#20194](https://github.com/emberjs/ember.js/pull/20194) [BUGFIX] Provide a `.d.ts` file at types/stable
<add>- [#20196](https://github.com/emberjs/ember.js/pull/20196) [BUGFIX] types imports are at 'ember-so... | 1 |
Go | Go | fix flaky testserviceupdatesecrets | fc21fcc90e5e1270aeb60f8f871adfd18e618c21 | <ide><path>integration-cli/docker_cli_service_update_test.go
<ide> func (s *DockerSwarmSuite) TestServiceUpdateSecrets(c *check.C) {
<ide> c.Assert(err, checker.IsNil, check.Commentf(out))
<ide>
<ide> // add secret
<del> out, err = d.Cmd("service", "update", "test", "--secret-add", fmt.Sprintf("source=%s,target=%s",... | 1 |
Go | Go | fix race conditions in logs api | 2c252a48c252749d41079cf8c450d00a5c18296e | <ide><path>daemon/logs.go
<ide> import (
<ide> //
<ide> // if it returns nil, the config channel will be active and return log
<ide> // messages until it runs out or the context is canceled.
<del>func (daemon *Daemon) ContainerLogs(ctx context.Context, containerName string, config *types.ContainerLogsOptions) (<-chan *... | 1 |
Javascript | Javascript | replace double with single quotes | 6928b84f9244c5be300dce4d41709c3da83e6661 | <ide><path>src/lib/create/check-overflow.js
<del>import { daysInMonth } from "../units/month";
<del>import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND } from "../units/constants";
<add>import { daysInMonth } from '../units/month';
<add>import { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../... | 225 |
Java | Java | use computeifabsent in scriptfactorypostprocessor | 0f0b1ffe0d830cac89a2a0b104de6ed9fe10a858 | <ide><path>spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java
<ide>
<ide> package org.springframework.scripting.support;
<ide>
<del>import java.util.HashMap;
<ide> import java.util.Map;
<add>import java.util.concurrent.ConcurrentHashMap;
<ide>
<ide> import org.apache.c... | 1 |
Python | Python | add comment to new test | 91e916cb67867db9ce835be28b31904e6efda832 | <ide><path>spacy/tests/regression/test_issue1727.py
<add>'''Test that models with no pretrained vectors can be deserialized correctly
<add>after vectors are added.'''
<ide> from __future__ import unicode_literals
<ide> import numpy
<ide> from ...pipeline import Tagger | 1 |
Text | Text | fix a typo in crypto.generatekeypairsync() | 53eb264cb16f5c1815d4ccfda585b462f9fac92a | <ide><path>doc/api/crypto.md
<ide> behaves as if [`keyObject.export()`][] had been called on its result. Otherwise,
<ide> the respective part of the key is returned as a [`KeyObject`][].
<ide>
<ide> When encoding public keys, it is recommended to use `'spki'`. When encoding
<del>private keys, it is recommended to use ... | 1 |
Ruby | Ruby | reduce number of created objects in hash#to_json | 144df5b104d042792f3fa73576d3ca9fac74fa67 | <ide><path>activesupport/lib/active_support/json/encoding.rb
<ide> def jsonify(value)
<ide> when Numeric, NilClass, TrueClass, FalseClass
<ide> value.as_json
<ide> when Hash
<del> Hash[value.map { |k, v| [jsonify(k), jsonify(v)] }]
<add> result = {}
<add> ... | 1 |
Go | Go | fix wrong cache hits building from tars | f6c8266afddcf24a2eb629af3b8e924e9c78ce73 | <ide><path>integration/build/build_test.go
<ide> RUN cat somefile`
<ide> assert.Contains(t, image.Config.Env, "bar=baz")
<ide> }
<ide>
<add>// #35403 #36122
<add>func TestBuildUncleanTarFilenames(t *testing.T) {
<add> ctx := context.TODO()
<add> defer setupTest(t)()
<add>
<add> dockerfile := `FROM scratch
<add>COPY f... | 2 |
Python | Python | fix mypy errors for apache drill provider. | 433e0296ad1a5ff1c545aa477fe08000089a6e1e | <ide><path>airflow/providers/apache/drill/hooks/drill.py
<ide> def get_uri(self) -> str:
<ide> storage_plugin = conn_md.extra_dejson.get('storage_plugin', 'dfs')
<ide> return f'{conn_type}://{host}/{storage_plugin}' f'?dialect_driver={dialect_driver}'
<ide>
<del> def set_autocommit(self, conn: Conne... | 1 |
Javascript | Javascript | update rulesofhooks with useevent rules | c89a83695c18814e98a8e815a2389a11540e0160 | <ide><path>packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js
<ide> const tests = {
<ide> }, 1000);
<ide> return () => clearInterval(id);
<ide> }, [setCount]);
<del>
<add>
<ide> return <h1>{count}</h1>;
<ide> ... | 4 |
Javascript | Javascript | replace non-breaking with regular space | c6af18d61f4cec13b40d07a7170d2ec8c170e160 | <ide><path>src/renderers/webgl/WebGLProgram.js
<ide> function generateExtensions( extensions, parameters, rendererExtensions ) {
<ide> extensions = extensions || {};
<ide>
<ide> var chunks = [
<del> ( extensions.derivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || para... | 1 |
Javascript | Javascript | update example to use a module | d5305d565285ed805278ad7ad71b3b34b3e761c6 | <ide><path>src/ng/directive/select.js
<ide> var ngOptionsMinErr = minErr('ngOptions');
<ide> * `value` variable (e.g. `value.propertyName`).
<ide> *
<ide> * @example
<del> <example>
<add> <example module="selectExample">
<ide> <file name="index.html">
<ide> <script>
<del> function MyCn... | 1 |
Javascript | Javascript | check availability of canvas & pdf before printing | f4ba0e342e0de0bf94eb5b38d520c1d751d2d64b | <ide><path>web/mozPrintCallback_polyfill.js
<ide>
<ide> function renderProgress() {
<ide> var progressContainer = document.getElementById('mozPrintCallback-shim');
<del> if (canvases) {
<add> if (canvases && canvases.length) {
<ide> var progress = Math.round(100 * index / canvases.length);
<ide> ... | 2 |
Go | Go | add fallback for pull by tag | 495d623ae5b1b601667d82682c5c265be189a29b | <ide><path>distribution/errors.go
<ide> func TranslatePullError(err error, ref reference.Named) error {
<ide> return errdefs.Unknown(err)
<ide> }
<ide>
<add>func isNotFound(err error) bool {
<add> switch v := err.(type) {
<add> case errcode.Errors:
<add> for _, e := range v {
<add> if isNotFound(e) {
<add> retu... | 2 |
Ruby | Ruby | handle empty otool output | 02e5f8ed6b9618023e8adb372f8431e63e9666ba | <ide><path>Library/Homebrew/mach.rb
<ide> def initialize(path)
<ide> def parse_otool_L_output
<ide> ENV["HOMEBREW_MACH_O_FILE"] = path.expand_path.to_s
<ide> libs = `#{MacOS.locate("otool")} -L "$HOMEBREW_MACH_O_FILE"`.split("\n")
<add> return nil, [] if libs.empty?
<ide>
<ide> libs.shift # ... | 1 |
Javascript | Javascript | fix sys.inspect for regex in different context | 5dc2b9331149436b9331deb890bbd2deb6dfe0e5 | <ide><path>lib/sys.js
<ide> function isRegExp (re) {
<ide> && re.compile
<ide> && re.test
<ide> && re.exec
<del> && s.charAt(0) === "/"
<del> && s.substr(-1) === "/";
<add> && s.match(/^\/.*\/[gim]{0,3}$/);
<ide> }
<ide>
<ide> | 1 |
Python | Python | fix potential issue in topology engine | dacf017d3884a4b84342d891c1504ee3c8bf6a02 | <ide><path>keras/engine/topology.py
<ide> def summary(self):
<ide> print_summary(flattened_layers, getattr(self, 'container_nodes', None))
<ide>
<ide>
<del>def get_source_inputs(tensor):
<add>def get_source_inputs(tensor, layer=None, node_index=None, tensor_index=None):
<ide> '''Returns the list of input ... | 1 |
Javascript | Javascript | remove unused dependency | 3c3e6980b3584b0a63f03afaaf956dba3b8d93e0 | <ide><path>docs/spec/specs.js
<ide> if (global.jasmine) return;
<ide>
<ide> var jasmine = require('../../lib/jasmine-1.0.1');
<del>var sys = require('util');
<ide>
<ide> for(var key in jasmine) {
<ide> global[key] = jasmine[key]; | 1 |
Ruby | Ruby | fix regex for svn+http | 5f5fdb3284b1ff6c961242b1c659ea63ddaf2b67 | <ide><path>Library/Homebrew/download_strategy.rb
<ide> def detect_download_strategy url
<ide> when %r[^git://] then GitDownloadStrategy
<ide> when %r[^hg://] then MercurialDownloadStrategy
<ide> when %r[^svn://] then SubversionDownloadStrategy
<del> when %r[^svn+http://] then SubversionDownloadStrategy
<add> wh... | 1 |
Javascript | Javascript | add test for scale.quantize | f23cb315dea07c811098b7dcc75ef974f65dad79 | <ide><path>d3.js
<ide> d3.scale.quantize = function() {
<ide>
<ide> scale.domain = function(x) {
<ide> if (!arguments.length) return [x0, x1];
<del> x0 = x[0];
<del> x1 = x[1];
<add> x0 = +x[0];
<add> x1 = +x[x.length - 1];
<ide> kx = range.length / (x1 - x0);
<ide> return scale;
<ide> };
<... | 4 |
Javascript | Javascript | use simpler boolean check vs a function call | 4bf1a09522955eb52de1fafb4ee1ecc5982b7a3e | <ide><path>src/attributes/classes.js
<ide> jQuery.fn.extend( {
<ide>
<ide> toggleClass: function( value, stateVal ) {
<ide> var type = typeof value,
<del> classNames = type === "string" ? value.match( rnotwhite ) : "",
<del> checker = typeof stateVal === "boolean" ?
<del> function() { return !stateVal; } :
<... | 2 |
Text | Text | add line breaks & indentation | c1531cd7b349dadd58e5ebb463ba2224570bb17b | <ide><path>docs/Analytics.md
<ide> Homebrew gathers anonymous aggregate user behaviour analytics using Google Analytics. You will be notified the first time you run `brew update` or install Homebrew. Analytics are not enabled until after this notice is shown, to ensure that you can [opt out](Analytics.md#opting-out) wi... | 5 |
Text | Text | add default revalidate value to docs | fb7342ac7c8e90f3ac08ff896fa5ad95ddc4d16c | <ide><path>docs/basic-features/data-fetching.md
<ide> The `context` parameter is an object containing the following keys:
<ide> `getStaticProps` should return an object with:
<ide>
<ide> - `props` - An **optional** object with the props that will be received by the page component. It should be a [serializable object](... | 1 |
Text | Text | clarify instruction regarding color | 9b6dc9ee34ec3031244e2481f13705be2fc0a2df | <ide><path>curriculum/challenges/english/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/step-090.md
<ide> dashedName: step-90
<ide>
<ide> Now that you're familiar with the `box-shadow` property you can finalize the shadows, starting with the one for the red marker.
<ide>
<del>In the... | 1 |
Javascript | Javascript | replace timeouts in test with compiler done checks | ae0edf3fbb572948597a9da6376e3d49b0d2d18b | <ide><path>test/ChangesAndRemovals.test.js
<ide> const createSingleCompiler = () => {
<ide> });
<ide> };
<ide>
<add>const onceDone = (compiler, action) => {
<add> let initial = true;
<add> compiler.hooks.done.tap("ChangesAndRemovalsTest", () => {
<add> if (!initial) return;
<add> initial = false;
<add> setTimeout(... | 1 |
Javascript | Javascript | allow duplicate keys in formdata | 56fef9b6225ffc1ba87f784660eebe842866c57d | <ide><path>Libraries/Network/FormData.js
<ide> type FormDataPart = {
<ide> */
<ide> class FormData {
<ide> _parts: Array<FormDataNameValuePair>;
<del> _partsByKey: {[key: string]: FormDataNameValuePair};
<ide>
<ide> constructor() {
<ide> this._parts = [];
<del> this._partsByKey = {};
<ide> }
<ide>
<ide... | 1 |
Go | Go | improve some messages in the node subcmds | eb962235fbf1579cf36bb0582347e8639ec47205 | <ide><path>api/client/node/accept.go
<ide> func runAccept(dockerCli *client.DockerCli, flags *pflag.FlagSet, args []string)
<ide> }); err != nil {
<ide> return err
<ide> }
<del> fmt.Println(id, "attempting to accept a node in the swarm.")
<add> fmt.Fprintf(dockerCli.Out(), "Node %s accepted in the swarm.", id)... | 4 |
Mixed | Javascript | add case for url.parse throwing a urierror | 2ff107dad7faaef617916d84101bb43b73dbd4e6 | <ide><path>doc/api/url.md
<ide> added: v0.1.25
<ide> The `url.parse()` method takes a URL string, parses it, and returns a URL
<ide> object.
<ide>
<add>A `TypeError` is thrown if `urlString` is not a string.
<add>
<add>A `URIError` is thrown if the `auth` property is present but cannot be decoded.
<add>
<ide> ## url.r... | 2 |
PHP | PHP | organize requests differently | d306965007aed4fd9167f48228caa7813d07b7f8 | <ide><path>app/Http/Controllers/Auth/AuthController.php
<ide> <?php namespace App\Http\Controllers\Auth;
<ide>
<ide> use App\User;
<del>use Illuminate\Http\Request;
<add>use App\Http\Requests;
<ide> use App\Http\Controllers\Controller;
<ide> use Illuminate\Contracts\Auth\Guard;
<ide>
<ide> public function getRegister... | 6 |
PHP | PHP | fix phpcs doc errors | be7abf7d56c4fb4ea59350d894e0200b4effee14 | <ide><path>src/View/Cell.php
<ide> abstract class Cell
<ide> /**
<ide> * Constructor.
<ide> *
<del> * @param \Cake\Network\Request $request the request to use in the cell
<del> * @param \Cake\Network\Response $response the response to use in the cell
<del> * @param \Cake\Event\EventManager $ev... | 1 |
Ruby | Ruby | add a method for configuring abstract controllers | 9eddc8544417323dcd8460026027c3359b2ad717 | <ide><path>actionpack/lib/abstract_controller/base.rb
<ide> def config
<ide> @config ||= ActiveSupport::InheritableOptions.new(superclass < Base ? superclass.config : {})
<ide> end
<ide>
<add> def configure
<add> yield config
<add> end
<add>
<ide> # A list of all internal methods f... | 1 |
PHP | PHP | add type hints | 0068b6f8026734acbff1bbaa2a0bf380bd48fbfd | <ide><path>src/I18n/FormatterInterface.php
<ide> interface FormatterInterface
<ide> * @param array $tokenValues The list of values to interpolate in the message
<ide> * @return string The formatted message
<ide> */
<del> public function format($locale, $message, array $tokenValues): string;
<add> p... | 7 |
Ruby | Ruby | remove deprecated api | f53c247d10acbaacb0d61824cfce888c4b0520d2 | <ide><path>actionpack/lib/action_controller/test_case.rb
<ide> def paramify_values(hash_or_array_or_value)
<ide>
<ide> def process(action, http_method = 'GET', *args)
<ide> check_required_ivars
<del> http_method, args = handle_old_process_api(http_method, args)
<ide>
<ide> if args.first.... | 3 |
Javascript | Javascript | join iterables correctly | 83ec8a3c5747ab266bd3281288d4c82601e40061 | <ide><path>lib/FunctionModuleTemplatePlugin.js
<ide> const joinIterableWithComma = iterable => {
<ide> let str = "";
<ide> let first = true;
<ide> for (const item of iterable) {
<del> str += item;
<ide> if (first) {
<ide> first = false;
<ide> } else {
<ide> str += ", ";
<ide> }
<add> str += item;
<ide>... | 1 |
Javascript | Javascript | remove debugging code | daf23a0341eddeb38a4762af3cb7a95b4dc33747 | <ide><path>pdf.js
<ide> function warn(msg) {
<ide> }
<ide>
<ide> function error(msg) {
<del> console.log(backtrace());
<add> log(backtrace());
<ide> throw new Error(msg);
<ide> }
<ide>
<ide> var XRef = (function() {
<ide> return this.fetch(obj);
<ide> },
<ide> fetch: function(ref) {
<del>
<del>
<del... | 1 |
Go | Go | fix testauthzpluginalloweventstream for multiarch | 36a974a1a6267828b773de19ed298947c66c4945 | <ide><path>integration-cli/docker_cli_authz_unix_test.go
<ide> import (
<ide>
<ide> "bufio"
<ide> "bytes"
<add> "os/exec"
<add> "strconv"
<add> "time"
<add>
<ide> "github.com/docker/docker/pkg/authorization"
<ide> "github.com/docker/docker/pkg/integration/checker"
<ide> "github.com/docker/docker/pkg/plugins"
<ide... | 1 |
Javascript | Javascript | add end point for initializecore | 9687090b5bf5b5073d676482e78a508d590cd587 | <ide><path>Libraries/Core/InitializeCore.js
<ide> if (__DEV__) {
<ide>
<ide> if (startTime != null) {
<ide> const PerformanceLogger = require('PerformanceLogger');
<del> PerformanceLogger.markPoint('InitializeCoreStartTime', startTime);
<add> PerformanceLogger.markPoint('initializeCore_start', startTime);
<add> P... | 1 |
PHP | PHP | remove duplicate variable | a54268697a6c544312dd0b610c68db5021d267d3 | <ide><path>src/Illuminate/Database/Eloquent/Model.php
<ide> protected function performUpdate($query)
<ide> return false;
<ide> }
<ide>
<del> $dirty = $this->getDirty();
<del>
<ide> // Once we have run the update operation, we will fire the "updated" event for
<ide> // this model instance. This will allo... | 1 |
Python | Python | import mock module directly | 28d73f4619e5778760e2bc4057872b5bc1f84e09 | <ide><path>libcloud/test/compute/test_libvirt_driver.py
<ide>
<ide> from libcloud.test import unittest
<ide> if unittest2_required:
<del> from unittest2 import mock
<add> import mock
<ide> else:
<ide> from unittest import mock
<ide> | 1 |
Text | Text | fix typo in models.md | b1996a51a1a51e310df8ce08964359376bd11a46 | <ide><path>website/docs/usage/models.md
<ide> logic around spaCy's loader, you can use
<ide> [pytest](http://pytest.readthedocs.io/en/latest/)'s
<ide> [`importorskip()`](https://docs.pytest.org/en/latest/builtin.html#_pytest.outcomes.importorskip)
<ide> method to only run a test if a specific pipeline package or versio... | 1 |
Python | Python | fix some weird behavior with scaling | fe3838cb006de3606fd38d03ac168f09dc5b0507 | <ide><path>celery/tests/worker/test_autoscale.py
<ide> def test_body(self):
<ide> state.reserved_requests.clear()
<ide> x.body()
<ide> self.assertEqual(x.pool.num_processes, 10)
<del> x._last_action = monotonic() - 10000
<add> x._last_scale_up = monotonic() - 10000
<ide> x.... | 2 |
Text | Text | remove blank lines | 40563a3ab457f5b1d8a5defaecb7375c55bc3fd5 | <ide><path>guides/source/working_with_javascript_in_rails.md
<ide> In case of buttons the `data-turbo-confirm` attribute must be associated to the
<ide> ```erb
<ide> <%= button_to "Delete post', post, method: :delete, form: { data: { turbo_confirm: "Are you sure?" } } %>
<ide> ```
<del>
<del> | 1 |
Javascript | Javascript | log individual test results when in --debug mode | 4daeda1490bd12b64f1bb7a9bae017f957adb89f | <ide><path>grunt/config/webdriver-jasmine.js
<ide> exports.local = {
<ide> }
<ide> }
<ide>
<add>if (grunt.option('debug')) exports.local.url += '?debug=' + grunt.option('debug');
<add>
<ide>
<ide> exports.saucelabs = {
<ide> webdriver: {
<ide><path>test/lib/reportTestResults.browser.js
<add>console._log = console... | 2 |
Javascript | Javascript | simplify formulas based on code review | 463a8dd77899cde1a2c542c6c90d0c7614285f16 | <ide><path>src/helpers/helpers.easing.js
<ide> var effects = {
<ide> return 1;
<ide> }
<ide> if (!p) {
<del> p = 1 * 0.3;
<add> p = 0.3;
<ide> }
<del> if (a < Math.abs(1)) {
<add> if (a < 1) {
<ide> a = 1;
<ide> s = p / 4;
<ide> } else {
<ide> var effects = {
<ide> return 1;
<ide> }
<ide> ... | 1 |
Text | Text | define report version semantics | c127e4ea97d0d5111c46cf0703ad439e055ae251 | <ide><path>doc/api/report.md
<ide> includes the date, time, PID, and a sequence number. The sequence number helps
<ide> in associating the report dump with the runtime state if generated multiple
<ide> times for the same Node.js process.
<ide>
<add>Diagnostic report has an associated single-digit version number (`repo... | 1 |
Ruby | Ruby | add command to mirror to bintray. (#263) | 0123e04faed98c06dc395a2ec0d7fa0de2f56d5d | <ide><path>Library/Homebrew/dev-cmd/mirror.rb
<add># Mirrors the stable URL for a formula on Bintray.
<add>#
<add># Usage: brew mirror <formula> [<formula> ...]
<add>
<add>module Homebrew
<add> def mirror
<add> if ARGV.named.empty?
<add> odie "This command requires at least formula argument!"
<add> end
<add... | 1 |
Go | Go | skip existing volumes in volumes-from | 57b49efc98d2f4605c95d5579a6cd952dfd6f124 | <ide><path>container.go
<ide> func (container *Container) Start(hostConfig *HostConfig) error {
<ide> }
<ide> for volPath, id := range c.Volumes {
<ide> if _, exists := container.Volumes[volPath]; exists {
<del> return fmt.Errorf("The requested volume %s overlap one of the volume of the container %s", volPath... | 2 |
PHP | PHP | remove unused code | a9a53a743e5f854d9812f56f55e752f1cbdddb16 | <ide><path>src/Illuminate/Translation/Translator.php
<ide> use Illuminate\Support\Arr;
<ide> use Illuminate\Support\Str;
<ide> use Illuminate\Support\Collection;
<del>use Illuminate\Support\HtmlString;
<ide> use Illuminate\Support\Traits\Macroable;
<ide> use Illuminate\Contracts\Translation\Loader;
<ide> use Illuminate... | 1 |
Javascript | Javascript | use inputfilesystem instead of real filesystem | 17ca14ccd96dcb951c29f6762260cb7a3fc434d0 | <ide><path>lib/DllReferencePlugin.js
<ide> var DelegatedSourceDependency = require("./dependencies/DelegatedSourceDependency");
<ide> var DelegatedModuleFactoryPlugin = require("./DelegatedModuleFactoryPlugin");
<ide> var ExternalModuleFactoryPlugin = require("./ExternalModuleFactoryPlugin");
<del>var fs = require("fs"... | 1 |
Text | Text | add instructions to update local git config | 8b1db6df8012a33b3da74de245074021c4c0c8ff | <ide><path>doc/guides/contributing/pull-requests.md
<ide> These are detailed in the [Building guide][].
<ide> Once you have `git` and are sure you have all of the necessary dependencies,
<ide> it's time to create a fork.
<ide>
<del>Before getting started, it is recommended to configure `git` so that it knows
<del>who ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.