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 |
|---|---|---|---|---|---|
Python | Python | fix gfile reading | 8b18491b26e4b8271db757a3245008882ea112b3 | <ide><path>official/transformer/compute_bleu.py
<ide> def bleu_tokenize(string):
<ide> def bleu_wrapper(ref_filename, hyp_filename, case_sensitive=False):
<ide> """Compute BLEU for two files (reference and hypothesis translation)."""
<ide> ref_lines = tokenizer.native_to_unicode(
<del> tf.gfile.Open(ref_filena... | 1 |
PHP | PHP | avoid side effects in router.php | d5e758433909b954fc011ec4ca521025f79f32b6 | <ide><path>src/Routing/Router.php
<ide> protected static function _loadRoutes()
<ide> include CONFIG . 'routes.php';
<ide> }
<ide> }
<del>
<del>//Save the initial state
<del>Router::reload();
<ide><path>tests/bootstrap.php
<ide> use Cake\Datasource\ConnectionManager;
<ide> use Cake\I18n\I18n;
<ide> use Cake... | 2 |
PHP | PHP | reduce scope of changes in previous commit | 7e0cfa9c4611bd6f25697d2c327bb2ac1c01198a | <ide><path>src/ORM/ResultSet.php
<ide> public function valid()
<ide> $this->_current = $this->_results[$this->_index];
<ide> return true;
<ide> }
<add> if (!$valid) {
<add> return $valid;
<add> }
<ide> }
<ide>
<ide> $this-... | 3 |
Javascript | Javascript | remove babel include from react-loader | 6de9ff2debfd17de5e897cc252165085ea7646f8 | <ide><path>fixtures/public/react-loader.js
<ide>
<ide> var REACT_PATH = 'react.js';
<ide> var DOM_PATH = 'react-dom.js';
<del>var BABEL_PATH = 'https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.19.0/babel.js';
<ide>
<ide> function parseQuery(qstr) {
<ide> var query = {};
<ide> function parseQuery(qstr) {
<i... | 1 |
Go | Go | remove dead code after decoupling from jsonlog | d3b3ebc3a4e185da08ec049bbeba46e942f30c80 | <ide><path>daemon/container.go
<ide> func (streamConfig *StreamConfig) StdinPipe() io.WriteCloser {
<ide>
<ide> func (streamConfig *StreamConfig) StdoutPipe() io.ReadCloser {
<ide> reader, writer := io.Pipe()
<del> streamConfig.stdout.AddWriter(writer, "")
<add> streamConfig.stdout.AddWriter(writer)
<ide> return iou... | 5 |
Javascript | Javascript | add $httpbackend mock | cd28a2e952efbc2f76ff86b6b7d21fd5e41cec65 | <ide><path>angularFiles.js
<ide> angularFiles = {
<ide> 'src/service/sniffer.js',
<ide> 'src/service/window.js',
<ide> 'src/service/http.js',
<add> 'src/service/httpBackend.js',
<ide> 'src/service/locale.js',
<ide> 'src/directives.js',
<ide> 'src/markups.js',
<ide><path>src/AngularPublic.js
<... | 8 |
Text | Text | add docs link to to_internal_value() | ffde1691025761c97927f9f4bbd5a9f3ec9ea96e | <ide><path>docs/api-guide/relations.md
<ide> output representation should be generated from the model instance.
<ide>
<ide> To implement a custom relational field, you should override `RelatedField`, and implement the `.to_representation(self, value)` method. This method takes the target of the field as the `value` ar... | 1 |
Python | Python | add some docstrings in optimizers | 59e67fd049252fe1d9194071ed38e81f9fbc2dcf | <ide><path>keras/optimizers.py
<ide> def serialize(optimizer):
<ide>
<ide>
<ide> def deserialize(config, custom_objects=None):
<add> """Inverse of the `serialize` function.
<add>
<add> # Arguments
<add> config: Optimizer configuration dictionary.
<add> custom_objects: Optional dictionary mapping
<... | 1 |
Text | Text | fix example of parsing request.url | fff75645e9e9793397d89327c1bed87795ccb9b0 | <ide><path>doc/api/http.md
<ide> When `request.url` is `'/status?name=ryan'` and
<ide>
<ide> ```console
<ide> $ node
<del>> new URL(request.url, request.headers.host)
<add>> new URL(request.url, `http://${request.headers.host}`)
<ide> URL {
<ide> href: 'http://localhost:3000/status?name=ryan',
<ide> origin: 'http:... | 1 |
Text | Text | update links to api documentation & add a todo | 90d780c027e4f5d55d21d068f5b3c6310eaf3931 | <ide><path>guides/source/action_view_overview.md
<ide> TODO...
<ide> Overview of all the helpers provided by Action View
<ide> ---------------------------------------------------
<ide>
<del>The following is only a brief overview summary of the helpers available in Action View. It's recommended that you review the API ... | 1 |
Python | Python | make numpy._array_api.array.device return "cpu" | 3cab20ee117d39c74abd2a28f142529e379844b1 | <ide><path>numpy/_array_api/_array_object.py
<ide> def dtype(self) -> Dtype:
<ide>
<ide> @property
<ide> def device(self) -> Device:
<del> """
<del> Array API compatible wrapper for :py:meth:`np.ndaray.device <numpy.ndarray.device>`.
<del>
<del> See its docstring for more information.
<del... | 1 |
Javascript | Javascript | make debugging of inspector-port-zero easier | 5c7b1ecbceeb32d947bea31c1256b1a9a42b8cba | <ide><path>test/sequential/test-inspector-port-zero.js
<ide> function test(arg, port = '') {
<ide> };
<ide> proc.stdout.on('close', mustCall(() => onclose()));
<ide> proc.stderr.on('close', mustCall(() => onclose()));
<del> proc.on('exit', mustCall((exitCode) => assert.strictEqual(exitCode, 0)));
<add> ... | 1 |
Mixed | Python | add missing pronoums/determiners | 28db7dd5d9aaf53a3c4e9b13048415502d998aae | <ide><path>.github/contributors/jonesmartins.md
<add># spaCy contributor agreement
<add>
<add>This spaCy Contributor Agreement (**"SCA"**) is based on the
<add>[Oracle Contributor Agreement](http://www.oracle.com/technetwork/oca-405177.pdf).
<add>The SCA applies to any contribution that you make to any product or proje... | 3 |
Python | Python | append host info in network.extra for kvm | 40faf235d48c6d9fef7d1d50be87229dece648a5 | <ide><path>libcloud/compute/drivers/libvirt_driver.py
<ide> def ex_list_networks(self):
<ide> networks = []
<ide> try:
<ide> for net in self.connection.listAllNetworks():
<del> extra = {'bridge': net.bridgeName(), 'xml': net.XMLDesc()}
<add> extra = {'bridge': n... | 1 |
Python | Python | add test for vector resizing, re issue #544 | e7af75e0a91a8d0f2eb2e3c5a3e680750d4324c0 | <ide><path>spacy/tests/vocab/test_add_vectors.py
<add>import numpy
<add>
<add>import spacy.en
<add>
<add>
<add>def test_add_vector():
<add> vocab = spacy.en.English.Defaults.create_vocab()
<add> vocab.resize_vectors(10)
<add> lex = vocab[u'Hello']
<add> lex.vector = numpy.ndarray((10,), dtype='float32')
<ad... | 1 |
Ruby | Ruby | use array.wrap instead of using ternary | e12810178cebc0c40a90b4aba3976537852b71b4 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
<ide> def initialize_schema_migrations_table
<ide> end
<ide>
<ide> def assume_migrated_upto_version(version, migrations_paths = ActiveRecord::Migrator.migrations_paths)
<del> migrations_paths = [migrations_pa... | 2 |
Ruby | Ruby | fix a typo | fb7ce8c4847bc6bacd8b6f3fb684332228847df7 | <ide><path>Library/Contributions/example-formula.rb
<ide> def install
<ide> # patch you have to resort to `inreplace`, because in the patch
<ide> # you don't have access to any var defined by the formula. Only
<ide> # HOMEBREW_PREFIX is available in the embedded patch.
<del> # inreplace supports reg. exe... | 1 |
Python | Python | make files in numpy/lib pep8 compliant | 01b0d7e82211b581aaff925e3ccc36cff9ac1895 | <ide><path>numpy/lib/_datasource.py
<ide> """A file interface for handling local and remote data files.
<del>The goal of datasource is to abstract some of the file system operations when
<del>dealing with data files so the researcher doesn't have to know all the
<add>
<add>The goal of datasource is to abstract some of ... | 20 |
PHP | PHP | update deprecation description | e9694863787e55678e8f1a2d769c9c785403a2ca | <ide><path>src/Controller/Controller.php
<ide> public function redirect($url, int $status = 302): ?Response
<ide> * Any other parameters passed to this method will be passed as parameters to the new action.
<ide> * @param mixed ...$args Arguments passed to the action
<ide> * @return mixed Returns the r... | 1 |
Python | Python | remove broken test. closes | 7b42c5ed17a2430d66da88932ad4e81492d9b914 | <ide><path>tests/test_routers.py
<ide> def test_list_and_detail_route_decorators(self):
<ide> else:
<ide> method_map = 'get'
<ide> self.assertEqual(route.mapping[method_map], method_name)
<del>
<del>
<del>class TestRootWithAListlessViewset(TestCase):
<del> def setUp(self):
<de... | 1 |
Javascript | Javascript | remove target argument from node.module#newchild | d703813c27fbef30a3f9c7a63189365cc514db01 | <ide><path>src/node.js
<ide> node.Module.prototype.loadScript = function (loadPromise) {
<ide> content = content.replace(/^\#\!.*/, '');
<ide>
<ide> function requireAsync (url) {
<del> return self.newChild(url, {});
<add> return self.newChild(url);
<ide> }
<ide>
<ide> function require (url) ... | 1 |
Javascript | Javascript | fix typo in code comment | ce2e5b3469560d0b1eccab9ce28ef6c6c57ada12 | <ide><path>packages/ember-views/lib/views/view.js
<ide> class:
<ide> eventManager: Ember.Object.create({
<ide> mouseEnter: function(event, view){
<ide> // view might be instance of either
<del> // OutsideView or InnerView depending on
<add> // OuterView or InnerView depending on
<ide> ... | 1 |
PHP | PHP | update core cake.php to match other versions | 72b9eb540eaf16565d08461bb581ff2dda5ca238 | <ide><path>lib/Cake/Console/cake.php
<ide> * @since CakePHP(tm) v 1.2.0.5012
<ide> * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
<ide> */
<del>require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ShellDispatcher.php');
<add>$ds = DIRECTORY_SEPARATOR;
<add>$dispatcher = ... | 1 |
Javascript | Javascript | remove unneeded code | 77ce7471397a6d37304af54c6d4bd10c4ded9e45 | <ide><path>lib/DelegatedModule.js
<ide> class DelegatedModule extends Module {
<ide> return obj;
<ide> }
<ide>
<del> deserialize(context) {
<del> super.deserialize(context);
<del> }
<del>
<ide> /**
<ide> * Assuming this module is in the cache. Update the (cached) module with
<ide> * the fresh module from the ... | 4 |
Ruby | Ruby | fix tap name for linuxbrew | 45c61cdcdbe182d2ed2d8deb8dab2b3ab2507095 | <ide><path>Library/Homebrew/dev-cmd/pull.rb
<ide> def pull
<ide> elsif (api_match = arg.match HOMEBREW_PULL_API_REGEX)
<ide> _, user, repo, issue = *api_match
<ide> url = "https://github.com/#{user}/#{repo}/pull/#{issue}"
<del> tap = Tap.fetch(user, repo) if repo.start_with?("homebrew-")
<a... | 3 |
Javascript | Javascript | update webdriverio config to match the new schema | ece51f97ac46086843b1a54f3802838a9d7de14c | <ide><path>spec/integration/helpers/start-atom.js
<ide> const ChromedriverPath = path.resolve(
<ide> 'bin',
<ide> 'chromedriver'
<ide> );
<del>const ChromedriverPort = 9515;
<add>const ChromedriverPort = 8082;
<ide> const ChromedriverURLBase = '/wd/hub';
<ide> const ChromedriverStatusURL = `http://localhost:${Chrom... | 1 |
Java | Java | fix ise in [http|rsocket]serviceproxyfactory | 5aeafc07616b9adcf0f37f6dd81f18ecf5faba6c | <ide><path>spring-messaging/src/main/java/org/springframework/messaging/rsocket/service/RSocketServiceProxyFactory.java
<ide> public void setCustomArgumentResolvers(List<RSocketServiceArgumentResolver> reso
<ide> @Deprecated(since = "6.0.0-RC2", forRemoval = true)
<ide> @Override
<ide> public void setEmbeddedValueRe... | 2 |
Javascript | Javascript | resolve merge conflict | 9cdb2588b4295d06627c3032699da536d324323f | <ide><path>controllers/story.js
<ide> function hotRank(timeValue, rank) {
<ide> */
<ide> var hotness;
<ide> var z = Math.log(rank) / Math.log(10);
<del> hotness = z + (timeValue / 45000000);
<add> hotness = z + (timeValue / 172800000);
<ide> return hotness;
<ide>
<ide> }
<ide><path>controllers/u... | 2 |
Ruby | Ruby | require reporting before attempting to "shush" | 3b325d624ccb5b390356d61a3ba72f09709066a4 | <ide><path>activesupport/lib/active_support/core_ext/rexml.rb
<add>require 'active_support/core_ext/kernel/reporting'
<add>
<ide> # Fixes the rexml vulnerability disclosed at:
<ide> # http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
<ide> # This fix is identical to rexml-expansion-fix version 1.0... | 2 |
Javascript | Javascript | move container border removal to the display layer | 30d63b0c502e0b55590bc4bd4fb12c7fa5a7a5d9 | <ide><path>src/core/annotation.js
<ide> var HighlightAnnotation = (function HighlightAnnotationClosure() {
<ide>
<ide> this.data.annotationType = AnnotationType.HIGHLIGHT;
<ide> this._preparePopup(parameters.dict);
<del>
<del> // PDF viewers completely ignore any border styles.
<del> this.data.borderStyl... | 2 |
PHP | PHP | fix cs error | aeea5d8cba5dbff97557e4984867b9761be4c9d6 | <ide><path>src/Validation/Validator.php
<ide> protected function sortMessageAndWhen($first, $second, $method)
<ide> */
<ide> public function allowEmptyString($field, ?string $message = null, $when = true)
<ide> {
<del> list($message, $when) = $this->sortMessageAndWhen($message, $when, __METHOD__);
<... | 3 |
Javascript | Javascript | add an example with custom loading component | f2bfcd01b0ea12a3dd267f7d714b6cdbccf4b1e9 | <ide><path>examples/with-dynamic-import/components/hello.js
<del>export default () => (
<del> <p>Hello World (imported dynamiclly) </p>
<del>)
<ide><path>examples/with-dynamic-import/components/hello1.js
<add>export default () => (
<add> <p>Hello World 1 (imported dynamiclly) </p>
<add>)
<ide><path>examples/with-dyna... | 5 |
Javascript | Javascript | add second argument to assert.throws() | 1377d5ac2e3d47940121a873806a03f13128691a | <ide><path>test/parallel/test-util-inspect-proxy.js
<ide> assert.strictEqual(processUtil.getProxyDetails({}), undefined);
<ide> // and the get function on the handler object defined above
<ide> // is actually invoked.
<ide> assert.throws(
<del> () => util.inspect(proxyObj)
<add> () => util.inspect(proxyObj),
<add> /... | 1 |
Java | Java | fix textinput contentsize | 7c268b31c25441ad56f08ab9f769a3efe90bfea9 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.java
<ide> public class ReactContentSizeChangedEvent extends Event<ReactTextChangedEvent> {
<ide>
<ide> public static final String EVENT_NAME = "topContentSizeChange";
<ide>
<del> private int mContentWidth;
<del> ... | 3 |
PHP | PHP | fix two testing cases in paginationpaginatortest | 9ef5b650f7dd7643f0f9a13063ec9dc0e4e7d7a6 | <ide><path>tests/Pagination/PaginationPaginatorTest.php
<ide> public function testPresenterCanGetAUrlRangeForAWindowOfLinks()
<ide>
<ide> public function testBootstrapPresenterCanGeneratorLinksForSlider()
<ide> {
<del> return;
<ide> $array = [];
<ide> for ($i = 1; $i <= 13; $i++)
<ide> $array[$i] = 'item'.$i... | 1 |
Python | Python | fix psutilversion plugin (#815) | 84e8759a8deae2060fc8731d7f11f03a32485985 | <ide><path>glances/plugins/glances_psutilversion.py
<ide> # You should have received a copy of the GNU Lesser General Public License
<ide> # along with this program. If not, see <http://www.gnu.org/licenses/>.
<ide>
<add>from glances.globals import psutil_version
<ide> from glances.plugins.glances_plugin import Glance... | 1 |
Javascript | Javascript | pass config options to package transpilers | 4f7b22c84edd00de5718dbca0158cdb6b99077f2 | <ide><path>src/package-transpilation-registry.js
<ide> PackageTranspilationRegistry.prototype.transpileWithPackageTranspiler = function
<ide> if (transpilerPath) {
<ide> this.transpilerPaths[transpilerPath] = true
<ide> var transpiler = require(transpilerPath)
<del> var result = transpiler.compile(sourceCo... | 1 |
Ruby | Ruby | condense artifact entries | 5c7e7eebe4d779dca0d5aaaec440105fb3e85c83 | <ide><path>Library/Homebrew/cask/cask.rb
<ide> def to_hash_with_variations
<ide>
<ide> def artifacts_list
<ide> artifacts.map do |artifact|
<del> if artifact.is_a? Artifact::AbstractFlightBlock
<del> { type: artifact.summarize }
<add> key, value = if artifact.is_a? Artifact::AbstractFl... | 2 |
Java | Java | add spel support for increment/decrement operators | f64325882da41bb128dec1b6d687b6eb6525623f | <ide><path>spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java
<ide> /*
<del> * Copyright 2002-2011 the original author or authors.
<add> * Copyright 2002-2012 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * ... | 19 |
Ruby | Ruby | add the storage.yml file by default | 3e723543296a1553452887e27801e563aadcdcb1 | <ide><path>railties/lib/rails/generators/rails/app/app_generator.rb
<ide> def config
<ide> template "cable.yml" unless options[:skip_action_cable]
<ide> template "puma.rb" unless options[:skip_puma]
<ide> template "spring.rb" if spring_install?
<add> template "storage.yml"
<ide>
<ide> ... | 1 |
PHP | PHP | pass scope to log engines | d819fa48c1782d49506438806182f83d94e70ddf | <ide><path>Cake/Log/Engine/ConsoleLog.php
<ide> public function __construct($config = array()) {
<ide> *
<ide> * @param string $type The type of log you are making.
<ide> * @param string $message The message you want to log.
<add> * @param string|array $scope The scope(s) a log message is being created in.
<add> * ... | 8 |
Mixed | Ruby | add `if_exists` option to `remove_index` | 36ea1084fb77496a249fd0b90d647bc5394f2f32 | <ide><path>activerecord/CHANGELOG.md
<add>* Add support for `if_exists` option for removing an index.
<add>
<add> The `remove_index` method can take an `if_exists` option. If this is set to true an error won't be raised if the index doesn't exist.
<add>
<add> *Eileen M. Uchitelle*
<add>
<ide> * Remove ibm_db,... | 5 |
Javascript | Javascript | fix race in parallel/test-vm-debug-context | 8d1c87ea0a0534d42938f1f8804c48cf6599f617 | <ide><path>test/parallel/test-vm-debug-context.js
<ide> var proc = spawn(process.execPath, [script]);
<ide> var data = [];
<ide> proc.stdout.on('data', assert.fail);
<ide> proc.stderr.on('data', data.push.bind(data));
<add>proc.stderr.once('end', common.mustCall(function() {
<add> var haystack = Buffer.concat(data).to... | 1 |
Mixed | Javascript | fix skewx on android and in the js decomposition | 797367c0890a38ec51cfaf7bd90b9cc7db0e97c7 | <ide><path>Libraries/Utilities/MatrixMath.js
<ide> const MatrixMath = {
<ide> skew[0] = MatrixMath.v3Dot(row[0], row[1]);
<ide> row[1] = MatrixMath.v3Combine(row[1], row[0], 1.0, -skew[0]);
<ide>
<del> // Compute XY shear factor and make 2nd row orthogonal to 1st.
<del> skew[0] = MatrixMath.v3Dot(row[0],... | 2 |
Python | Python | fix morph rules | 782056d11722a5b3eb352cfdf29a4b5deabd49a8 | <ide><path>spacy/lang/en/morph_rules.py
<ide> "will",
<ide> ]
<ide>
<del>_relative_pronouns = ["this", "that", "those", "these"]
<add># This seems kind of wrong too?
<add>#_relative_pronouns = ["this", "that", "those", "these"]
<ide>
<ide> MORPH_RULES = {
<del> "DT": {word: {"POS": "PRON"} for word in _relativ... | 1 |
PHP | PHP | add 'proccessing' message to queue worker output | 4ee7aa8c1ff3cbea1441ef0b4c2968eaf4a3c0d5 | <ide><path>src/Illuminate/Queue/Console/WorkCommand.php
<ide> use Illuminate\Queue\WorkerOptions;
<ide> use Illuminate\Queue\Events\JobFailed;
<ide> use Illuminate\Queue\Events\JobProcessed;
<add>use Illuminate\Queue\Events\JobProcessing;
<ide>
<ide> class WorkCommand extends Command
<ide> {
<ide> protected function g... | 1 |
Mixed | Ruby | return a 405 response for unknown http methods | ec462b4de7904e0e55a312940e88b9e825bf955c | <ide><path>actionpack/CHANGELOG.md
<ide> ## Rails 4.0.0 (unreleased) ##
<ide>
<add>* Return a 405 Method Not Allowed response when a request contains an unknown
<add> HTTP method.
<add>
<add> *Lewis Marshall*
<add>
<ide> * Add support for extracting the port from the `:host` option passed to `url_for`.
<ide>... | 4 |
Text | Text | add variable expansion note | c86466f4ee13817c190f6bbe34ee70bb96508261 | <ide><path>docs/basic-features/environment-variables.md
<ide> export async function getStaticProps() {
<ide> }
<ide> ```
<ide>
<add>> **Note**: Next.js will automatically expand variables (`$VAR`) inside of your `.env*` files.
<add>> This allows you to reference other secrets, like so:
<add>>
<add>> ```bash
<add>> # .... | 1 |
PHP | PHP | expose randombytes in the string class | a389ec1c98ed4e5f0961921e2e2ea9298e953363 | <ide><path>src/Illuminate/Support/Str.php
<ide> public static function plural($value, $count = 2)
<ide> * @throws \RuntimeException
<ide> */
<ide> public static function random($length = 16)
<add> {
<add> $bytes = static::randomBytes($length * 2);
<add>
<add> $string = substr(str_replace(... | 1 |
PHP | PHP | trim model class name | 54d33832ec1e9c3c0a894c941334e2a6ba6d2be6 | <ide><path>src/Illuminate/Auth/Middleware/Authorize.php
<ide> protected function getGateArguments($request, $models)
<ide> */
<ide> protected function getModel($request, $model)
<ide> {
<del> return $this->isClassName($model) ? $model : $request->route($model, $model);
<add> return $this->isC... | 1 |
Go | Go | remove use of table from 'docker diff' | 49c72506ace177e33d867123ca15f193c38bcf45 | <ide><path>api/client/diff.go
<ide> package client
<ide>
<ide> import (
<add> "encoding/json"
<ide> "fmt"
<ide>
<del> "github.com/docker/docker/engine"
<add> "github.com/docker/docker/api/types"
<ide> "github.com/docker/docker/pkg/archive"
<ide> flag "github.com/docker/docker/pkg/mflag"
<ide> )
<ide>
<ide> // Cmd... | 3 |
Javascript | Javascript | leave div commands on stack and change evaluation | 8fccd199484c7bd1935da23c08c7df39293d8ecd | <ide><path>src/fonts.js
<ide> var Type1Parser = function type1Parser() {
<ide>
<ide> var kEscapeCommand = 12;
<ide>
<del> // The initial stack can have numbers expressed with the div command which
<del> // need to be calculated before conversion. Looking at the spec it doesn't
<del> // appear div should even be ... | 1 |
Java | Java | fix javadoc typo | 06d3e1b94ef482c9055805abcff19be613ae31c4 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurer.java
<ide> public interface WebSocketMessageBrokerConfigurer {
<ide>
<ide> /**
<ide> * Configure the {@link org.springframework.messaging.MessageChannel} used for
<del> * incoming messages fr... | 1 |
PHP | PHP | fix code style | 07419646263ab7fdf872a1087019c9f4917b5f02 | <ide><path>tests/TestCase/BasicsTest.php
<ide> public function testEventManagerReset2($prevEventManager)
<ide> $this->assertInstanceOf(EventManager::class, $prevEventManager);
<ide> $this->assertNotSame($prevEventManager, EventManager::instance());
<ide> }
<del>
<ide> } | 1 |
Javascript | Javascript | improve fs coverage | 2465062c45bb73025ecf06f475339bcf6e783de2 | <ide><path>test/parallel/test-fs-read.js
<ide> assert.throws(
<ide> }
<ide> );
<ide>
<del>['buffer', 'offset', 'length'].forEach((option) =>
<del> assert.throws(
<del> () => fs.read(fd, {
<del> [option]: null
<del> }),
<del> `not throws when options.${option} is null`
<del> ));
<add>assert.throws(
<a... | 2 |
Ruby | Ruby | raise helpful error when role doesn't exist | 22a1265828d9f743b8348fe53424fffb60d6d824 | <ide><path>activerecord/lib/active_record/connection_handling.rb
<ide> def lookup_connection_handler(handler_key) # :nodoc:
<ide> end
<ide>
<ide> def with_handler(handler_key, &blk) # :nodoc:
<add> unless ActiveRecord::Base.connection_handlers.keys.include?(handler_key)
<add> raise ArgumentError, "... | 3 |
PHP | PHP | fix variable name to prevent type warning in ide | 03580bd554fe2379b53def0f95166b02de3f7dcf | <ide><path>src/Validation/Validator.php
<ide> public function count()
<ide> */
<ide> public function add($field, $name, $rule = [])
<ide> {
<del> $field = $this->field($field);
<add> $validationSet = $this->field($field);
<ide>
<ide> if (!is_array($name)) {
<ide> $rules =... | 1 |
Ruby | Ruby | require string extensions | d99cfd139424b12f662eecba28acb05994865aa0 | <ide><path>Library/Homebrew/tap.rb
<add>require "extend/string"
<add>
<ide> # a {Tap} is used to extend the formulae provided by Homebrew core.
<ide> # Usually, it's synced with a remote git repository. And it's likely
<ide> # a Github repository with the name of `user/homebrew-repo`. In such | 1 |
Javascript | Javascript | remove some dead code | 20bcabb1ea4cf492ade240bd6915b4bd44f04895 | <ide><path>src/renderers/shared/stack/reconciler/ReactHostComponent.js
<ide>
<ide> var invariant = require('invariant');
<ide>
<del>var autoGenerateWrapperClass = null;
<ide> var genericComponentClass = null;
<ide> // This registry keeps track of wrapper classes around host tags.
<ide> var tagToComponentClass = {};
<... | 1 |
PHP | PHP | return response from named limiter | efcb7e9ef40cbcc087331fec997853926219d72e | <ide><path>src/Illuminate/Routing/Middleware/ThrottleRequests.php
<ide> protected function handleRequestUsingNamedLimiter($request, Closure $next, $limi
<ide> $limiterResponse = call_user_func($limiter, $request);
<ide>
<ide> if ($limiterResponse instanceof Response) {
<del> return $limit;
<... | 1 |
Text | Text | clarify installation instructions | 7b859625b727aa7f8e7fffd4481693d81b82a532 | <ide><path>README.md
<ide> To install the stable version:
<ide> npm install --save redux
<ide> ```
<ide>
<add>This assumes you are using [npm](https://www.npmjs.com/) as your package manager.
<add>If you don’t, you can [access these files on npmcdn](https://npmcdn.com/redux/), download them, or point your package ma... | 1 |
Ruby | Ruby | pass args properly | c494789d700fbb76035c2cd5d8c92cbe3ef2c0b0 | <ide><path>Library/Homebrew/cmd/list.rb
<ide> def list_args
<ide> def list
<ide> args = list_args.parse
<ide>
<del> return list_casks if args.cask?
<add> return list_casks(args: args) if args.cask?
<ide>
<ide> return list_unbrewed if args.unbrewed?
<ide>
<ide> def list
<ide> end
<ide>
<ide> ... | 1 |
PHP | PHP | fix cs error | 176d21a71592ad0778bd913fcb25df2029c472d2 | <ide><path>src/Validation/Validation.php
<ide> public static function comparison($check1, $operator = null, $check2 = null)
<ide> * @param array $context The validation context.
<ide> * @return bool
<ide> */
<del> public static function compareWith($check, $field, $context) {
<add> public static fu... | 1 |
Text | Text | fix typo in image-classification/readme.md | 7d5ce6802ec5bab29d60e3501337d3477f31b866 | <ide><path>examples/pytorch/image-classification/README.md
<ide> This directory contains 2 scripts that showcase how to fine-tune any model suppo
<ide> Try out the inference widget here: https://huggingface.co/google/vit-base-patch16-224
<ide>
<ide> Content:
<del>- [PyTorch version, Trainer](#pytorch-version-no-traine... | 1 |
Python | Python | implement cors for the restful api | 6a1d74276341caccd7dc653f6f7787b70597d4f9 | <ide><path>glances/outputs/glances_bottle.py
<ide>
<ide> # Import mandatory Bottle lib
<ide> try:
<del> from bottle import Bottle, template, static_file, TEMPLATE_PATH, abort, response
<add> from bottle import Bottle, template, static_file, TEMPLATE_PATH, abort, response, request
<ide> except ImportError:
<ide> ... | 1 |
PHP | PHP | add setcollection method to the paginator | 2fdb5d13d05f771877dcdd9a44cb8e6d403cd8ac | <ide><path>src/Illuminate/Pagination/AbstractPaginator.php
<ide> public function getCollection()
<ide> return $this->items;
<ide> }
<ide>
<add> /**
<add> * Set the paginator's underlying collection.
<add> *
<add> * @param \Illuminate\Support\Collection $collection
<add> * @return $this
... | 1 |
PHP | PHP | remove redundant setloggers() call | 621ac4fd477286387ee934deb65fdf31885631c0 | <ide><path>src/Console/Shell.php
<ide> public function __construct(ConsoleIo $io = null)
<ide> ['tasks'],
<ide> ['associative' => ['tasks']]
<ide> );
<del> $this->_io->setLoggers(true);
<ide>
<ide> if (isset($this->modelClass)) {
<ide> $this->loadModel();
<ide... | 2 |
Ruby | Ruby | fix bad install names in executables | 186a76c741a92c25d58b85d597bbb9fb5774c668 | <ide><path>Library/Homebrew/keg_fix_install_names.rb
<ide> def fix_install_names
<ide> system MacOS.locate("install_name_tool"), "-id", id, file if file.dylib?
<ide>
<ide> bad_names.each do |bad_name|
<del> new_name = bad_name
<del> new_name = Pathname.new(bad_name).basename u... | 1 |
Text | Text | update information on test/known_issues | 1807080d3d94f930cdf6f145fc33b916bec8c4be | <ide><path>test/README.md
<ide> On how to run tests in this direcotry, see
<ide> </tr>
<ide> <tr>
<ide> <td>known_issues</td>
<del> <td>No</td>
<del> <td>Tests reproducing known issues within the system.</td>
<add> <td>Yes</td>
<add> <td>
<add> Tests reproducing known issues wit... | 1 |
Javascript | Javascript | use async/await in before-quit handler | 9d30003e58ca837a1593b4cac03da0df706e6ea4 | <ide><path>src/main-process/atom-application.js
<ide> class AtomApplication extends EventEmitter {
<ide> this.openPathOnEvent('application:open-your-stylesheet', 'atom://.atom/stylesheet')
<ide> this.openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md'))
<ide>
<del> this... | 1 |
Text | Text | update v5.5 changelog (fix) | 6b692b327d667610ed22265c8de8291551e2d749 | <ide><path>CHANGELOG-5.5.md
<ide> - ⚠️ Call `setConnection()` in `Model::save()` ([#20466](https://github.com/laravel/framework/pull/20466))
<ide> - ⚠️ Touch parent timestamp only if the model is dirty ([#20489](https://github.com/laravel/framework/pull/20489))
<ide> - Added `Model::loadMissing()` method ([#20630](http... | 1 |
Javascript | Javascript | remove unused function argument from http test | f52fb0ac8fc0369aff7635bcb37aadc57d98a645 | <ide><path>test/sequential/test-http-server-consumed-timeout.js
<ide> server.listen(0, common.mustCall(() => {
<ide> const req = http.request({
<ide> port: server.address().port,
<ide> method: 'POST'
<del> }, (res) => {
<add> }, () => {
<ide> const interval = setInterval(() => {
<ide> intervalWasI... | 1 |
Ruby | Ruby | remove outdated comment [ci skip] | d33bdef821e6fafac0eed39fd0329761d6f180ae | <ide><path>actionmailer/lib/action_mailer/base.rb
<ide> def respond_to_missing?(method, include_all = false)
<ide>
<ide> attr_internal :message
<ide>
<del> # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer
<del> # will be initialized according to the named method. If not, the mail... | 1 |
Mixed | Go | build tag to enable showing version info | 25154682a5cd57aa4fc3ef88baeee3ce1f204060 | <ide><path>daemon/graphdriver/btrfs/btrfs.go
<ide> func (d *Driver) String() string {
<ide> }
<ide>
<ide> func (d *Driver) Status() [][2]string {
<del> return [][2]string{
<del> {"Build Version", BtrfsBuildVersion()},
<del> {"Library Version", fmt.Sprintf("%d", BtrfsLibVersion())},
<add> status := [][2]string{}
<add... | 4 |
PHP | PHP | update doc block | e94859827747678b8d96575adb64d98ad4e3f288 | <ide><path>lib/Cake/Core/CakePlugin.php
<ide> public static function load($plugin, $config = array()) {
<ide> * {{{
<ide> * CakePlugin::loadAll(array(
<ide> * array('bootstrap' => true),
<del> * 'DebugKit' => array('routes' => true),
<add> * 'DebugKit' => array('routes' => true, 'bootstrap' => false),
<ide> *... | 1 |
Javascript | Javascript | make prereleases less verbose [ci skip] | ca0b20ae8b25aa3d4b7b6b21e72b610cb8e2adce | <ide><path>website/src/widgets/changelog.js
<ide> function formatReleases(json) {
<ide> }))
<ide> }
<ide>
<del>const ChangelogTable = ({ data = [] }) => {
<del> return (
<del> <Table>
<del> <thead>
<del> <Tr>
<del> <Th>Date</Th>
<del> <T... | 1 |
Ruby | Ruby | add missing public method doc to timewithzone.name | 9b854ccd77498e5c0f30912596737f0b8efa4654 | <ide><path>activesupport/lib/active_support/time_with_zone.rb
<ide> module ActiveSupport
<ide> # t.is_a?(ActiveSupport::TimeWithZone) # => true
<ide> #
<ide> class TimeWithZone
<add>
<add> # Report class name as 'Time' to thwart type checking
<ide> def self.name
<del> 'Time' # Report class name as ... | 1 |
Javascript | Javascript | use task.pagelimit properly | ecf831b44bb712dca16dfb1616140cc1faf99202 | <ide><path>test/driver.js
<ide> function nextTask() {
<ide> }
<ide>
<ide> function isLastPage(task) {
<del> return task.pageNum > (task.pageLimit || task.pdfDoc.numPages);
<add> var limit = task.pageLimit || 0;
<add> if (!limit || limit > task.pdfDoc.numPages)
<add> limit = task.pdfDoc.numPages;
<add>
<add> retu... | 1 |
Go | Go | pass root to chroot to for chroot untar | d089b639372a8f9301747ea56eaf0a42df24016a | <ide><path>daemon/archive.go
<ide> type archiver interface {
<ide> }
<ide>
<ide> // helper functions to extract or archive
<del>func extractArchive(i interface{}, src io.Reader, dst string, opts *archive.TarOptions) error {
<add>func extractArchive(i interface{}, src io.Reader, dst string, opts *archive.TarOptions, ro... | 5 |
Python | Python | drop python 3.6 compatibility objects/modules | 1dccaad46b901189c1928cef8419f1ea1160d550 | <ide><path>airflow/compat/asyncio.py
<del># Licensed to the Apache Software Foundation (ASF) under one
<del># or more contributor license agreements. See the NOTICE file
<del># distributed with this work for additional information
<del># regarding copyright ownership. The ASF licenses this file
<del># to you under th... | 6 |
Java | Java | fix javadoc for flowable and observable reduce. | cf6f5b887bdd0f2e568c600a94bb931d8969c581 | <ide><path>src/main/java/io/reactivex/Flowable.java
<ide> public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
<ide> }
<ide>
<ide> /**
<del> * Returns a Flowable that applies a specified accumulator function to the first item emitted by a source
<add> * Returns a Single that applies a specified ... | 2 |
Javascript | Javascript | use common.mustcall in test-https-strict | f11d4a1556a5536d69c1ae524822a709689c46ac | <ide><path>test/parallel/test-https-strict.js
<ide> server2.listen(0, listening());
<ide> server3.listen(0, listening());
<ide>
<ide> const responseErrors = {};
<del>let expectResponseCount = 0;
<del>let responseCount = 0;
<ide> let pending = 0;
<ide>
<ide>
<ide> function makeReq(path, port, error, host, ca) {
<ide>... | 1 |
PHP | PHP | improve setup warnings for security.salt | d839d01d25a7f49ec0b74bbf3384f0a1052e851b | <ide><path>src/Error/Debugger.php
<ide> public static function formatHtmlMessage(string $message): string
<ide> */
<ide> public static function checkSecurityKeys(): void
<ide> {
<del> if (Security::getSalt() === '__SALT__') {
<del> trigger_error(sprintf(
<del> 'Please chang... | 1 |
PHP | PHP | remove uneeded type casting | 1823d99dec990e484a13aec28395468a2a6952d4 | <ide><path>src/Mailer/Renderer.php
<ide> public function render(string $content, array $types = []): array
<ide> $view->setTemplatePath(static::TEMPLATE_FOLDER . DIRECTORY_SEPARATOR . $type);
<ide> $view->setLayoutPath(static::TEMPLATE_FOLDER . DIRECTORY_SEPARATOR . $type);
<ide>
<del> ... | 1 |
Javascript | Javascript | move checkbox js files to fb internal | dff17effe54dc58dda19fcc81ebacbd8f46e9005 | <ide><path>Libraries/Components/CheckBox/AndroidCheckBoxNativeComponent.js
<del>/**
<del> * Copyright (c) Facebook, Inc. and its affiliates.
<del> *
<del> * This source code is licensed under the MIT license found in the
<del> * LICENSE file in the root directory of this source tree.
<del> *
<del> * @flow strict-local
... | 6 |
Ruby | Ruby | fix code example for word_wrap helper | 334c43370b3a0f179a282080e1d47f072706e1bc | <ide><path>actionpack/lib/action_view/helpers/text_helper.rb
<ide> def pluralize(count, singular, plural = nil)
<ide> # # => Once upon a time
<ide> #
<ide> # word_wrap('Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding a successor to the throne turned out to be more ... | 1 |
PHP | PHP | return empty string on non-existent session read() | 1b0b4fc0625a6b0bda8cb92f6bdf8db6672a8b9a | <ide><path>src/Network/Session/CacheSession.php
<ide> public function close()
<ide> * Method used to read from a cache session.
<ide> *
<ide> * @param string $id The key of the value to read
<del> * @return mixed The value of the key or false if it does not exist
<add> * @return string The value ... | 2 |
Text | Text | use code markup/markdown in headers | 933fd9b14983f960101f4f1a8200ff318fa39175 | <ide><path>doc/api/net.md
<ide> net.createServer().listen(
<ide> path.join('\\\\?\\pipe', process.cwd(), 'myctl'));
<ide> ```
<ide>
<del>## Class: net.Server
<add>## Class: `net.Server`
<ide> <!-- YAML
<ide> added: v0.1.90
<ide> -->
<ide> added: v0.1.90
<ide>
<ide> This class is used to create a TCP or [IPC][] serv... | 1 |
Javascript | Javascript | improve throughput of actionsfor by 30%-40% | 9b3e1eca1f9b0e9e649adcfea15e50b8d895e29f | <ide><path>packages/ember-metal/lib/events.js
<ide> function indexOf(array, target, method) {
<ide> function actionsFor(obj, eventName) {
<ide> var meta = metaFor(obj, true);
<ide> var actions;
<add> var listeners = meta.listeners;
<ide>
<del> if (!meta.listeners) { meta.listeners = {}; }
<del>
<del> if (!meta.... | 1 |
PHP | PHP | make getdictionary public | e747c4a1098d5c33073588ce91d4025f8e9d629e | <ide><path>src/Illuminate/Database/Eloquent/Collection.php
<ide> public function unique()
<ide> * @param \Illuminate\Support\Collection $collection
<ide> * @return array
<ide> */
<del> protected function getDictionary($collection)
<add> public function getDictionary($collection)
<ide> {
<ide> $dictionary = a... | 1 |
PHP | PHP | fix whitespace and comment errors | 6f7557898d2e5bb22b2d030b860d111f76279fb3 | <ide><path>lib/Cake/Network/CakeSocket.php
<ide> class CakeSocket {
<ide> * @var array
<ide> */
<ide> protected $_baseConfig = array(
<del> 'persistent' => false,
<del> 'host' => 'localhost',
<del> 'protocol' => 'tcp',
<del> 'port' => 80,
<del> 'timeout' => 30
<add> 'persistent' => false,
<add> 'host' =... | 3 |
Text | Text | fix typo in reconciliation.md | 2ba571c24618b97049898532e2e220897f9b4c43 | <ide><path>docs/docs/reconciliation.md
<ide> Whenever the root elements have different types, React will tear down the old tr
<ide>
<ide> When tearing down a tree, old DOM nodes are destroyed. Component instances receive `componentWillUnmount()`. When building up a new tree, new DOM nodes are inserted into the DOM. Co... | 1 |
Mixed | Python | update helm chart release docs | 339eb0ae41adb3a3b20459ab6ea4c7f6aef87360 | <ide><path>dev/README_RELEASE_HELM_CHART.md
<ide>
<ide> - [Prepare the Apache Airflow Helm Chart Release Candidate](#prepare-the-apache-airflow-helm-chart-release-candidate)
<ide> - [Pre-requisites](#pre-requisites)
<add> - [Build Changelog](#build-changelog)
<ide> - [Build RC artifacts](#build-rc-artifacts)
<ide... | 4 |
Python | Python | remove some unusefull import | 491eb4cfc24bd4e2709da1b124ee72eed1943efc | <ide><path>glances/core/glances_main.py
<ide> import argparse
<ide>
<ide> # Import Glances libs
<del># !!! Todo: rename class
<del># GlancesExemple
<ide> from glances.core.glances_globals import __appname__, __version__, __author__, __license__
<ide> from glances.core.glances_globals import *
<add># !!! Todo: rename c... | 1 |
Go | Go | fix error message for pause a restarting container | 2c63ac3a974a7ab56ffeddece76cc29710ef2996 | <ide><path>daemon/pause.go
<ide> func (daemon *Daemon) containerPause(container *container.Container) error {
<ide> return derr.ErrorCodeAlreadyPaused.WithArgs(container.ID)
<ide> }
<ide>
<add> // We cannot Pause the container which is restarting
<add> if container.Restarting {
<add> return derr.ErrorCodeContainer... | 1 |
Ruby | Ruby | fix tap issue url | 54fc1946f96cf9f4391e33f9c692b5aba317ebac | <ide><path>Library/Homebrew/exceptions.rb
<ide> def dump
<ide> puts "#{Tty.red}READ THIS#{Tty.reset}: #{Tty.em}#{ISSUES_URL}#{Tty.reset}"
<ide> if formula.tap?
<ide> user, repo = formula.tap.split '/'
<del> tap_issues_url = "https://github.com/#{user}/homebrew-#{repo}/issues"
<add> tap... | 1 |
Javascript | Javascript | remove the `customstyle` class | d36c46b2c9b0dc526804aacea97609f2fdd49dad | <ide><path>src/display/annotation_layer.js
<ide> */
<ide>
<ide> import {
<del> addLinkAttributes, CustomStyle, DOMSVGFactory, getDefaultSetting,
<del> getFilenameFromUrl, LinkTarget
<add> addLinkAttributes, DOMSVGFactory, getDefaultSetting, getFilenameFromUrl,
<add> LinkTarget
<ide> } from './dom_utils';
<ide> im... | 6 |
Ruby | Ruby | use fullpaths to file and strip | 1c28de653805994814937c5e1b1aa4932134c731 | <ide><path>Library/Homebrew/cleaner.rb
<ide> def strip path, args=''
<ide> puts "strip #{path}" if ARGV.verbose?
<ide> path.chmod 0644 # so we can strip
<ide> unless path.stat.nlink > 1
<del> system "strip", *(args+path)
<add> system "/usr/bin/strip", *(args+path)
<ide> else
<ide> path =... | 1 |
Go | Go | pull scratch for pull test | 77d29847e2a59a7b3e56144c774c28a3b7370c91 | <ide><path>integration-cli/docker_cli_pull_test.go
<ide> import (
<ide>
<ide> // pulling an image from the central registry should work
<ide> func TestPullImageFromCentralRegistry(t *testing.T) {
<del> pullCmd := exec.Command(dockerBinary, "pull", "busybox:latest")
<add> pullCmd := exec.Command(dockerBinary, "pull", "... | 1 |
Javascript | Javascript | add attributes to editorcontrols | ba347be773d0226a01e99940b6cc4b755c3d662a | <ide><path>examples/js/controls/EditorControls.js
<ide> THREE.EditorControls = function ( object, domElement ) {
<ide>
<ide> this.enabled = true;
<ide> this.center = new THREE.Vector3();
<add> this.panSpeed = 0.001
<add> this.zoomSpeed = 0.001
<add> this.rotationSpeed = 0.005
<ide>
<ide> // internals
<ide>
<ide> ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.