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 | add regression tests for pickleable record arrays | 64d5832d0b675436a52e10a06d5386611c8eb889 | <ide><path>numpy/core/tests/test_records.py
<ide>
<ide> import warnings
<ide> import collections
<add>import pickle
<ide>
<ide>
<ide> class TestFromrecords(TestCase):
<ide> def test_out_of_order_fields(self):
<ide> y = self.data[['col2', 'col1']]
<ide> assert_equal(x[0][0], y[0][1])
<ide>
<add> d... | 1 |
Go | Go | add ipv4forwarding check | 05418df539dfed118da099aacfe4250f2f6ad5e0 | <ide><path>pkg/sysinfo/sysinfo.go
<ide> import (
<ide> "io/ioutil"
<ide> "os"
<ide> "path"
<add> "strconv"
<add> "strings"
<ide>
<ide> "github.com/Sirupsen/logrus"
<ide> "github.com/docker/libcontainer/cgroups"
<ide> func New(quiet bool) *SysInfo {
<ide> }
<ide> }
<ide>
<add> // Checek if ipv4_forward is disa... | 1 |
Javascript | Javascript | eliminate need for render() method | 0bcfd33c38c64c6a38470764e613566a4cfea430 | <ide><path>examples/with-react-jss/pages/_document.js
<ide> import React from 'react'
<del>import Document, { Head, Main, NextScript } from 'next/document'
<add>import Document from 'next/document'
<ide> import { SheetsRegistry, JssProvider, createGenerateId } from 'react-jss'
<ide>
<ide> export default class JssDocum... | 1 |
Java | Java | fix checkstyle violation | f47481749bb9d00a9e8b88c46c787c209856e01d | <ide><path>spring-jdbc/src/test/java/org/springframework/jdbc/datasource/init/ScriptUtilsUnitTests.java
<ide> public void readAndSplitScriptContainingCommentsWithWindowsLineEnding() throws E
<ide> String script = readScript("test-data-with-comments.sql").replaceAll("\n", "\r\n");
<ide> splitScriptContainingComments... | 1 |
Javascript | Javascript | fix a few more flow warnings | e0202e459fd0181db551d0025ef562d7998186b0 | <ide><path>Libraries/Alert/Alert.js
<ide> const Platform = require('Platform');
<ide>
<ide> import type { AlertType, AlertButtonStyle } from 'AlertIOS';
<ide>
<del>type Buttons = Array<{
<add>export type Buttons = Array<{
<ide> text?: string,
<ide> onPress?: ?Function,
<ide> style?: AlertButtonStyle, | 1 |
PHP | PHP | add assertpushedtimes and assertsenttimes methods | 55b9ee34dfbb83576c09b4bb7d1ac286dfa7bd7e | <ide><path>src/Illuminate/Support/Testing/Fakes/MailFake.php
<ide> public function assertSent($mailable, $callback = null)
<ide> );
<ide> }
<ide>
<add> /**
<add> * Assert if a mailable was sent a number of times based on a truth-test callback.
<add> *
<add> * @param string $mailable
<add> ... | 2 |
Javascript | Javascript | remove unused isdescriptortrap | 3db7357a47731a448f7b51d23cfb16c75b9a3e59 | <ide><path>packages/ember-metal/lib/meta.js
<ide> if (DEBUG) {
<ide> meta._counters = counters;
<ide> }
<ide>
<del>// Using `symbol()` here causes some node test to fail, presumably
<del>// because we define the CP with one copy of Ember and boot the app
<del>// with a different copy, so the random key we generate d... | 1 |
Javascript | Javascript | reset elements for polar area chart | c2d6e4c31f027fc2bbba0a594ab41d156523bd71 | <ide><path>src/Chart.PolarArea.js
<ide> _options: this.options,
<ide> }, this);
<ide>
<add> // Fit the scale before we animate
<add> this.updateScaleRange();
<add> this.scale.calculateRange();
<add> Chart.scaleService.fitScalesForChart(this, this.... | 1 |
Ruby | Ruby | make bazel write to .brew_home | 65f52806f6e04f2013838d5c9ecc70eb1b91ab82 | <ide><path>Library/Homebrew/formula.rb
<ide> def setup_home(home)
<ide> import site; site.addsitedir("#{HOMEBREW_PREFIX}/lib/python2.7/site-packages")
<ide> import sys, os; sys.path = (os.environ["PYTHONPATH"].split(os.pathsep) if "PYTHONPATH" in os.environ else []) + ["#{HOMEBREW_PREFIX}/lib/python2.7/site... | 1 |
Javascript | Javascript | expand the test fixture | d6257d382d6f9910fb36ad1b4707bfa23ac965d2 | <ide><path>shells/dev/app/SuspenseTree/index.js
<ide> function SuspenseTree() {
<ide> return (
<ide> <>
<ide> <h1>Suspense</h1>
<del> <Suspense fallback={<Fallback>Loading outer</Fallback>}>
<add> <PrimaryFallbackTest />
<add> <NestedSuspenseTest />
<add> </>
<add> );
<add>}
<add>
<add>fu... | 1 |
Ruby | Ruby | simplify array#in_groups_of code | 50e11e989727b6886b25d61333ce40060514c3e2 | <ide><path>activesupport/lib/active_support/core_ext/array/grouping.rb
<ide> def in_groups_of(number, fill_with = nil)
<ide> if block_given?
<ide> collection.each_slice(number) { |slice| yield(slice) }
<ide> else
<del> groups = []
<del> collection.each_slice(number) { |group| groups << group }
<... | 1 |
PHP | PHP | use array<> type annotation | 118341bcc85972b2675141e74e68650e5db7dec1 | <ide><path>src/Http/ContentTypeNegotiation.php
<ide> protected function parseQualifiers(string $header): array
<ide> * You can expect null when the request has no Accept header.
<ide> *
<ide> * @param \Psr\Http\Message\RequestInterface $request The request to use.
<del> * @param string[] $choices The... | 1 |
PHP | PHP | add missing property. | e6a81b6d3617b6de3baa87afbc1bd68ae91ea1ba | <ide><path>src/Illuminate/Session/CookieSessionHandler.php
<ide> class CookieSessionHandler implements SessionHandlerInterface
<ide> */
<ide> protected $request;
<ide>
<add> /*
<add> * The number of minutes the session should be valid.
<add> *
<add> * @var int
<add> */
<add> protected $m... | 1 |
Python | Python | add transparency for unsupported connection type | d05900b233d03849a4d9650bfc80840a466ef99a | <ide><path>airflow/sensors/sql.py
<ide> def _get_hook(self):
<ide> }
<ide> if conn.conn_type not in allowed_conn_type:
<ide> raise AirflowException(
<del> "The connection type is not supported by SqlSensor. "
<add> f"Connection type ({conn.conn_type}) is not sup... | 1 |
Mixed | Javascript | add option to disable line drawing | 24e4a924c4b6adcb787e13eb417b3e1845e9cf11 | <ide><path>docs/02-Line-Chart.md
<ide> The default options for line chart are defined in `Chart.defaults.Line`.
<ide>
<ide> Name | Type | Default | Description
<ide> --- | --- | --- | ---
<add>showLines | Boolean | true | If false, the lines between points are not drawn
<ide> stacked | Boolean | false | If true, lines... | 3 |
Go | Go | fix typos in daemon | b00a67be6e3d3f241879110bd342abaa8e23cbac | <ide><path>daemon/cluster/controllers/plugin/controller.go
<ide> import (
<ide> // We'll also end up with many tasks all pointing to the same plugin ID.
<ide> //
<ide> // TODO(@cpuguy83): registry auth is intentionally not supported until we work out
<del>// the right way to pass registry crednetials via secrets.
<add>... | 3 |
Javascript | Javascript | add deprecation warning for v8breakiterator | 105e628f84ad03cfd32ffac112746285be28c872 | <ide><path>lib/internal/process.js
<ide> function setupConfig(_source) {
<ide> return value;
<ide> });
<ide> const processConfig = process.binding('config');
<del> // Intl.v8BreakIterator() would crash w/ fatal error, so throw instead.
<del> if (processConfig.hasIntl &&
<del> processConfig.hasSmallICU &&... | 2 |
Python | Python | fix transformer width in textcatensemble | 3983bc6b1e8355eb0fa17e7787e94074c1eb4a63 | <ide><path>spacy/ml/models/textcat.py
<ide> from thinc.api import SparseLinear, Softmax, softmax_activation, Maxout, reduce_sum
<ide> from thinc.api import HashEmbed, with_array, with_cpu, uniqued
<ide> from thinc.api import Relu, residual, expand_window
<add>from thinc.layers.chain import init as init_chain
<ide>
<id... | 2 |
PHP | PHP | remove unneeded method arguments | 9796669a6d6bf6c3ba2aa1e1cd22e202412a6bb5 | <ide><path>src/ORM/Behavior/Translate/EavStrategy.php
<ide> public function __construct(Table $table, array $config = [])
<ide> $this->table = $table;
<ide> $this->translationTable = $this->getTableLocator()->get($this->_config['translationTable']);
<ide>
<del> $this->setupFieldAssociations(
<de... | 2 |
Javascript | Javascript | remove supports in webglcapabilities | d4f5a1f4456da6efef4e106f0e9ea305a491f4f8 | <ide><path>src/renderers/webgl/WebGLCapabilities.js
<ide> THREE.WebGLCapabilities = function( gl, extensions, parameters ) {
<ide>
<ide> this.vertexTextures = this.maxVertexTextures > 0;
<ide> this.floatFragmentTextures = !! extensions.get( 'OES_texture_float' );
<del> this.floatVertexTextures = this.supportsVertexT... | 1 |
Ruby | Ruby | add test for window + partition + order | 4a72415555de19ca33c8ea16ee9ba26d1b73b078 | <ide><path>test/test_select_manager.rb
<ide> def test_manager_stores_bind_values
<ide> }
<ide> end
<ide>
<add> it 'takes a partition and an order' do
<add> table = Table.new :users
<add> manager = Arel::SelectManager.new Table.engine
<add> manager.from table
<add> manag... | 1 |
Ruby | Ruby | add home-assistant to github_prerelease_allowlist | 41fe6b5e7c83e7934fd08ec958b315247ae87dce | <ide><path>Library/Homebrew/utils/shared_audits.rb
<ide> def github_release_data(user, repo, tag)
<ide> "elm-format" => "0.8.3",
<ide> "freetube" => :all,
<ide> "gitless" => "0.8.8",
<add> "home-assistant" => :all,
<ide> "infrakit" => "0.5",
<ide> "pock" ... | 1 |
Text | Text | recommend gdm for go resources | 30455d0fb5fce2652ca8cadd5941aecccc611e5b | <ide><path>share/doc/homebrew/Formula-Cookbook.md
<ide> end
<ide>
<ide> [jrnl](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/jrnl.rb) is an example of a formula that does this well. The end result means the user doesn't have use `pip` or Python and can just run `jrnl`.
<ide>
<del>[homebrew-pypi-poe... | 1 |
Ruby | Ruby | fix dummy_app configuration | 8967170164186f2408776ff5b193878f1c82a541 | <ide><path>railties/lib/rails/generators/rails/plugin/templates/rails/application.rb
<ide> <% if include_all_railties? -%>
<ide> require 'rails/all'
<ide> <% else -%>
<add>require "rails"
<ide> # Pick the frameworks you want:
<add>require "active_model/railtie"
<add>require "active_job/railtie"
<ide> <%= comment_if :sk... | 1 |
Python | Python | fix linting errors | 291ffceb877595ef00f1e9ad53fb10f2e48185db | <ide><path>libcloud/compute/drivers/dimensiondata.py
<ide> def _to_firewall_address(self, element):
<ide> port_list = element.find(fixxpath('portList', TYPES_URN))
<ide> address_list = element.find(fixxpath('ipAddressList', TYPES_URN))
<ide> if address_list is None:
<del> return Dimen... | 1 |
Python | Python | improve type coverage in test_unique | 5a929a4875bc3e33d0333d8684d6eeaa0e4d45f4 | <ide><path>numpy/lib/tests/test_arraysetops.py
<ide> import warnings
<ide>
<ide> class TestAso(TestCase):
<del> def test_unique( self ):
<del> a = np.array( [5, 7, 1, 2, 1, 5, 7] )
<del>
<del> ec = np.array( [1, 2, 5, 7] )
<del> c = unique( a )
<del> assert_array_equal( c, ec )
<del>
<de... | 1 |
Javascript | Javascript | extract creation of async chunk | 3dc08aec2aed5df0394ebc0456d7755c0e64d25a | <ide><path>lib/optimize/CommonsChunkPlugin.js
<ide> The available options are:
<ide> });
<ide> }
<ide>
<add> createAsyncChunk(compilation, asyncOption, commonChunk) {
<add> const asyncChunk = compilation.addChunk(typeof asyncOption === "string" ? asyncOption : undefined);
<add> asyncChunk.chunkReason = "async com... | 1 |
PHP | PHP | use new config setter in connection manager | e8baecdaadc28786f289e1c8bfafd7d0cc85c701 | <ide><path>src/Datasource/ConnectionManager.php
<ide> class ConnectionManager
<ide> {
<ide>
<ide> use StaticConfigTrait {
<del> config as protected _config;
<add> setConfig as protected _setConfig;
<ide> parseDsn as protected _parseDsn;
<ide> }
<ide>
<ide> class ConnectionManager
<ide> ... | 1 |
PHP | PHP | simplify check for wildcard listeners | 6aa3a468dab0f0ed93640221cc4a082176b95e7a | <ide><path>src/Illuminate/Events/Dispatcher.php
<ide> public function hasListeners($eventName)
<ide> */
<ide> public function hasWildcardListeners($eventName)
<ide> {
<del> foreach ($this->wildcards as $key => $listeners) {
<del> if (Str::is($key, $eventName)) {
<del> retur... | 1 |
Ruby | Ruby | fix usage of word alternatively in docs [ci skip] | fe33c15d4d66b7a0ebd6257fb1eef21335424bba | <ide><path>actionpack/lib/action_dispatch/routing.rb
<ide> module ActionDispatch
<ide> # resources :posts, :comments
<ide> # end
<ide> #
<del> # Alternately, you can add prefixes to your path without using a separate
<add> # Alternatively, you can add prefixes to your path without using a separate
<ide> ... | 2 |
PHP | PHP | fix html dump from artisan console | a879001ce96fae833695854b7f77a4f15b73a988 | <ide><path>src/Illuminate/Exception/ExceptionServiceProvider.php
<ide> protected function registerPlainDisplayer()
<ide> {
<ide> $this->app['exception.plain'] = $this->app->share(function($app)
<ide> {
<del> $handler = new KernelHandler($app['config']['app.debug']);
<add> // If the application is running in a ... | 1 |
Go | Go | implement docker wait with standalone client lib | 51efb1480a58b2317e1ad1833964ccad4456e6be | <ide><path>api/client/lib/wait.go
<add>package lib
<add>
<add>import (
<add> "encoding/json"
<add>
<add> "github.com/docker/docker/api/types"
<add>)
<add>
<add>// ContainerWait pauses execution util a container is exits.
<add>// It returns the API status code as response of its readiness.
<add>func (cli *Client) Contai... | 4 |
Python | Python | create directory if missing in save_to_directory | d0e19267e8d14463a50f5ca24367015ca50c97d9 | <ide><path>spacy/language.py
<ide> def save_to_directory(self, path):
<ide> }
<ide>
<ide> path = util.ensure_path(path)
<add> if not path.exists():
<add> path.mkdir()
<ide> self.setup_directory(path, **configs)
<ide>
<ide> strings_loc = path / 'vocab' / 'strings.json' | 1 |
Javascript | Javascript | fix startof issues across dst with updateoffset | 3dd80ba2891a304511fb83da0ffb0ffa343b84c8 | <ide><path>moment.js
<ide> moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false);
<ide> moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false);
<ide> moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false);
<del> moment.fn.hour = moment.fn.hours... | 2 |
Ruby | Ruby | fix error if a compatible bottle was not found | 59dc0ed6521b98265230ac76e762064cedd25bcb | <ide><path>Library/Homebrew/cmd/--cache.rb
<ide> def __cache
<ide> sig { params(formula: Formula, args: CLI::Args).void }
<ide> def print_formula_cache(formula, args:)
<ide> if fetch_bottle?(formula, args: args)
<del> puts formula.bottle_for_tag(args.bottle_tag).cached_download
<add> puts formula.bott... | 4 |
PHP | PHP | simplify boolean check | 2cfdc9228dd0a227e6ecc8d90d4e6d405b05ccb3 | <ide><path>src/Database/Statement/StatementDecorator.php
<ide> public function bind(array $params, array $types): void
<ide> return;
<ide> }
<ide>
<del> $anonymousParams = is_int(key($params)) ? true : false;
<add> $anonymousParams = is_int(key($params));
<ide> $offset = 1;
<i... | 1 |
Javascript | Javascript | run the basic tests for each helper configuration | 5fa2a238b69e6067d3a43ca576ea268be22be4fd | <ide><path>packages/ember-glimmer/tests/integration/helpers/inline-if-test.js
<ide> moduleFor('@glimmer Helpers test: {{if}} used with another helper', class extend
<ide> return `(if ${cond} ${truthy} ${falsy})`;
<ide> }
<ide>
<del>});
<add>}, BASIC_TRUTHY_TESTS, BASIC_FALSY_TESTS);
<ide>
<ide> moduleFor('@glim... | 1 |
PHP | PHP | fix example & incorrect import | 6292fc707d5d4cf885c0a10a6a3abdb6dc263d3c | <ide><path>lib/Cake/Routing/Route/CakeRoute.php
<ide> * @since CakePHP(tm) v 1.3
<ide> * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
<ide> */
<del>
<del>App::uses('Set', 'Utility');
<add>App::uses('Hash', 'Utility');
<ide>
<ide> /**
<ide> * A single Route used by the Rou... | 2 |
Javascript | Javascript | remove iscomposite and hide toplevelwrapper | acd67c368d1ff66d80657094f136e87b36413210 | <ide><path>src/isomorphic/ReactDebugTool.js
<ide> function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
<ide> }
<ide> }
<ide>
<add>// This can be removed once TopLevelWrapper is gone.
<add>function isTopLevelWrapper(debugID) {
<add> return debugID === 0;
<add>}
<add>
<ide> var ReactDebugTool = {
<... | 12 |
Javascript | Javascript | fix haste resolution (and better warnings) | fa0da5682b17e93b4d06957b5aa27797ee5bbcd9 | <ide><path>packager/react-packager/src/DependencyResolver/DependencyGraph/HasteMap.js
<ide> const chalk = require('chalk');
<ide> const path = require('path');
<ide> const getPlatformExtension = require('../../lib/getPlatformExtension');
<ide>
<add>const GENERIC_PLATFORM = 'generic';
<add>
<ide> class HasteMap {
<ide>... | 2 |
Python | Python | simplify s3 ``unify_bucket_name_and_key`` | 6e101317a22bb58a9edf512bbda662c862e53c78 | <ide><path>airflow/providers/amazon/aws/hooks/s3.py
<ide> def unify_bucket_name_and_key(func: T) -> T:
<ide> def wrapper(*args, **kwargs) -> T:
<ide> bound_args = function_signature.bind(*args, **kwargs)
<ide>
<del> def get_key_name() -> Optional[str]:
<del> if 'wildcard_key' in bound_arg... | 1 |
Javascript | Javascript | fix crash of lint rule no-document-import-in-page | 90eae2c00fd086e61aaa2a784deef83b344b6af9 | <ide><path>packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js
<ide> module.exports = {
<ide> }
<ide>
<ide> const page = context.getFilename().split('pages')[1]
<add> if (!page) {
<add> return
<add> }
<ide> const { name, dir } = path.parse(page)
<ide> ... | 2 |
Java | Java | simplify iteration over maps | aaeabc3c85befe72c6c22df9ac9b83a6c67bdef2 | <ide><path>spring-jms/src/main/java/org/springframework/jms/support/SimpleJmsHeaderMapper.java
<ide> public void fromHeaders(MessageHeaders headers, javax.jms.Message jmsMessage) {
<ide> logger.debug("Failed to set JMSType - skipping", ex);
<ide> }
<ide> }
<del> Set<String> headerNames = headers.keySet();... | 3 |
Text | Text | remove url from merge sort challenge | 0751fe2e5313bebb159ade9c3bf64c50c34056a4 | <ide><path>curriculum/challenges/russian/08-coding-interview-prep/algorithms/implement-merge-sort.russian.md
<ide> id: 587d825c367417b2b2512c8f
<ide> title: Implement Merge Sort
<ide> challengeType: 1
<del>videoUrl: 'https://www.youtube.com/watch?v=TzeBrDU-JaY'
<add>videoUrl: ''
<ide> localeTitle: Реализация Merge Sort... | 1 |
Ruby | Ruby | add test to ar's counter_cache_test.rb | 0123c39f41e2062311b2197e6e230ef8ad67e20e | <ide><path>activerecord/test/cases/counter_cache_test.rb
<ide> class ::SpecialReply < ::Reply
<ide> end
<ide> end
<ide>
<add> test 'reset multiple association counters' do
<add> Topic.increment_counter(:replies_count, @topic.id)
<add> assert_difference '@topic.reload.replies_count', -1 do
<add> Topic... | 3 |
Ruby | Ruby | write a test for `#form_data?` | 7f546318d56b75bafb798d0c178578600fd6939e | <ide><path>actionpack/lib/action_dispatch/http/request.rb
<ide> def body
<ide> end
<ide> end
<ide>
<add> # Determine whether the request body contains form-data by checking
<add> # the request Content-Type for one of the media-types:
<add> # "application/x-www-form-urlencoded" or "multipart/form-dat... | 2 |
Python | Python | remove duplicated methods | 9b0512f148f36d3f53145edd2192ceba78d12109 | <ide><path>test/storage/test_cloudfiles.py
<ide> def test_create_container_already_exists(self):
<ide> self.fail(
<ide> 'Container already exists but an exception was not thrown')
<ide>
<del> def test_create_container_invalid_name(self):
<del> try:
<del> self.driver.cre... | 1 |
Java | Java | fix checkstyle violation | 5e561623944665f282f5549e3c21b5c1261d7359 | <ide><path>spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java
<ide> public static boolean sameResourceFactory(ResourceTransactionManager tm, Object
<ide> /**
<ide> * Unwrap the given resource handle if necessary; otherwise return
<ide> * the given handle as-is.
<de... | 1 |
PHP | PHP | add return typehint | a5ee2b8d59baac9f548dfe480e0fc4f74226b939 | <ide><path>src/ORM/AssociationCollection.php
<ide> public function cascadeDelete(EntityInterface $entity, array $options): void
<ide> * @param array $options The options used in the delete operation.
<ide> * @return \Cake\ORM\Association[]
<ide> */
<del> protected function _getNoCascadeItems(EntityInt... | 1 |
Javascript | Javascript | add gl_position as a keyword | e2b702c13ccd1acb1539123f369913d45164df7d | <ide><path>editor/js/libs/codemirror/mode/glsl.js
<ide> "do for while if else in out inout float int void bool true false " +
<ide> "lowp mediump highp precision invariant discard return mat2 mat3 " +
<ide> "mat4 vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 sampler2D " +
<del> "samplerCube struct g... | 1 |
PHP | PHP | fix problems with rate limiter | be225adf0c54f87f14a686141d1bf8126cfad9d1 | <ide><path>src/Illuminate/Foundation/Auth/ThrottlesLogins.php
<ide> trait ThrottlesLogins
<ide> protected function hasTooManyLoginAttempts(Request $request)
<ide> {
<ide> return app(RateLimiter::class)->tooManyAttempts(
<del> $request->input($this->loginUsername()).$request->ip(),
<add> ... | 1 |
PHP | PHP | update the signature of allowemptystring() | d1a0cfe0fc0677d78f69cfec589acca296384720 | <ide><path>src/Validation/Validator.php
<ide> public function allowEmpty($field, $when = true, $message = null)
<ide> }
<ide>
<ide> /**
<del> * Indicate that a field can be empty.
<add> * Low-level method to indicate that a field can be empty.
<ide> *
<del> * Using an array will let you provid... | 2 |
Javascript | Javascript | add missing semicolons in nodematerial | 5918295ba320ba435e37a46f3caa92da73fa8712 | <ide><path>examples/js/nodes/NodeMaterial.js
<ide> THREE.NodeMaterial.addShortcuts = function( proto, prop, list ) {
<ide> }
<ide> };
<ide>
<del> };
<add> }
<ide>
<ide> return ( function() {
<ide>
<ide> THREE.NodeMaterial.prototype.getVar = function( uuid, type, ns ) {
<ide> var index = this.vars.length,
<id... | 1 |
PHP | PHP | add link to explain mentioned problem | 4d3ee09a455c97c18fe2328854013e1726e585f0 | <ide><path>src/Database/SchemaCache.php
<ide> * can prevent thundering herd effects on the metadata cache when new
<ide> * versions of your application are deployed, or when migrations
<ide> * requiring updated metadata are required.
<add> *
<add> * @link https://en.wikipedia.org/wiki/Thundering_herd_problem About t... | 1 |
Python | Python | add basic unit tests for pattern | 46637369aaffc0ba0e62cec675289b8275d149c5 | <ide><path>spacy/tests/pattern/__init__.py
<add># coding: utf-8
<ide><path>spacy/tests/pattern/parser.py
<add># coding: utf-8
<add>
<add>
<add>import re
<add>from ...pattern.parser import PatternParser
<add>
<add>
<add>class TestPatternParser:
<add> def test_empty_query(self):
<add> assert PatternParser.parse... | 3 |
Python | Python | fix permission issues | 367dd01a338e67c772362af62889a53a1302fb02 | <ide><path>djangorestframework/permissions.py
<ide> class IsAuthenticated(BasePermission):
<ide> """
<ide>
<ide> def check_permission(self, request, obj=None):
<del> if request.user.is_authenticated():
<add> if request.user and request.user.is_authenticated():
<ide> return True
<ide> ... | 1 |
Text | Text | update 5.12.6 and 5.12.3 | 254683b5cd62832d4764fcd06e4650a1b4ba4c87 | <ide><path>CHANGELOG.md
<ide> <a name="5.12.6"></a>
<del>## [5.12.6](https://github.com/videojs/video.js/compare/v5.10.7...v5.12.6) (2016-10-25)
<del>
<del>### Features
<del>
<del>* **lang:** add missing translations in fr.json ([280ecd4](https://github.com/videojs/video.js/commit/280ecd4))
<del>* **lang:** add missing... | 1 |
Text | Text | fix set_autoload_paths and set_load_path document | 02d57b6270e82ea55574df44db64936f3904c740 | <ide><path>guides/source/configuring.md
<ide> Below is a comprehensive list of all the initializers found in Rails in the orde
<ide>
<ide> * `action_mailer.compile_config_methods` Initializes methods for the config settings specified so that they are quicker to access.
<ide>
<del>* `set_load_path` This initializer ru... | 1 |
Java | Java | add missing marble diagams to single | e6406b362994bcb4b5c2a00a6c10c6dbde4de3c4 | <ide><path>src/main/java/io/reactivex/rxjava3/core/Single.java
<ide> public static <T> Flowable<T> concatArray(SingleSource<? extends T>... sources)
<ide> /**
<ide> * Concatenates a sequence of SingleSource eagerly into a single stream of values.
<ide> * <p>
<add> * <img width="640" height="257" src="... | 1 |
Ruby | Ruby | add test for `csp_meta_tag` | 3f186e30452b700483c42c8d07f095c7b5c031b8 | <ide><path>actionview/test/template/csp_helper_test.rb
<add># frozen_string_literal: true
<add>
<add>require "abstract_unit"
<add>
<add>class CspHelperWithCspEnabledTest < ActionView::TestCase
<add> tests ActionView::Helpers::CspHelper
<add>
<add> def content_security_policy_nonce
<add> "iyhD0Yc0W+c="
<add> end
<... | 1 |
Javascript | Javascript | make animation oncomplete callbacks async | e31104fa6c9e5efd93ac69cd70c70cffaf200843 | <ide><path>src/ngAnimate/animate.js
<ide> angular.module('ngAnimate', ['ng'])
<ide> var NG_ANIMATE_STATE = '$$ngAnimateState';
<ide> var rootAnimateState = {running:true};
<ide>
<del> $provide.decorator('$animate', ['$delegate', '$injector', '$sniffer', '$rootElement',
<del> function($delegate, $inject... | 3 |
Ruby | Ruby | add bottle info | 2df6ad1beda5f29f6eaf6807ec4a53f59bb20260 | <ide><path>Library/Homebrew/formula.rb
<ide> def to_hash
<ide> { "option" => opt.flag, "description" => opt.description }
<ide> end
<ide>
<add> hsh["bottle"] = {}
<add> %w[stable devel].each do |spec_sym|
<add> next unless spec = send(spec_sym)
<add> next unless (bottle_spec = spec.bottle_spe... | 1 |
PHP | PHP | update react preset to latest version | 29c7deb6562a09a120e63d81d53f3c5fa412b7f7 | <ide><path>src/Illuminate/Foundation/Console/Presets/React.php
<ide> protected static function updatePackageArray(array $packages)
<ide> {
<ide> return [
<ide> 'babel-preset-react' => '^6.23.0',
<del> 'react' => '^15.4.2',
<del> 'react-dom' => '^15.4.2',
<add> 'r... | 1 |
Python | Python | handle json encoding of v1pod in task callback | 92389cf090f336073337517f2460c2914a9f0d4b | <ide><path>airflow/callbacks/callback_requests.py
<ide> def __init__(
<ide> self.is_failure_callback = is_failure_callback
<ide>
<ide> def to_json(self) -> str:
<del> dict_obj = self.__dict__.copy()
<del> dict_obj["simple_task_instance"] = self.simple_task_instance.as_dict()
<del> retu... | 8 |
Javascript | Javascript | fix ui explorer in android | 0b72eba8698c5d1ef014fe735c299321e6030352 | <ide><path>Examples/UIExplorer/NavigationExperimental/NavigationBasicExample.js
<ide> const NavigationBasicExample = React.createClass({
<ide> return (
<ide> <ScrollView style={styles.topView}>
<ide> <NavigationExampleRow
<del> text={`Current page: ${this.state.croutes[this.state.index].key}`... | 2 |
Javascript | Javascript | fix typos in test/parallel | 58b60c1393dd65cd228a8b0084a19acd2c1d16aa | <ide><path>test/parallel/test-event-capture-rejections.js
<ide> function globalSetting() {
<ide> }
<ide>
<ide> // We need to be able to configure this for streams, as we would
<del>// like to call destro(err) there.
<add>// like to call destroy(err) there.
<ide> function configurable() {
<ide> const ee = new EventEm... | 2 |
Python | Python | add some type hints for hive providers | f760823b4af3f0fdfacf63dae199ec4d88028f71 | <ide><path>airflow/providers/apache/hive/transfers/vertica_to_hive.py
<ide>
<ide> from collections import OrderedDict
<ide> from tempfile import NamedTemporaryFile
<add>from typing import Any, Dict, Optional
<ide>
<ide> import unicodecsv as csv
<ide>
<ide> class VerticaToHiveOperator(BaseOperator):
<ide> :param ... | 1 |
Java | Java | remove some dead code | 115a095a6009a1d0a59b1a055077b79813b3bd9e | <ide><path>src/main/java/io/reactivex/internal/observers/InnerQueuedObserver.java
<ide>
<ide> volatile boolean done;
<ide>
<del> long produced;
<del>
<ide> int fusionMode;
<ide>
<ide> public InnerQueuedObserver(InnerQueuedObserverSupport<T> parent, int prefetch) {
<ide><path>src/main/java/io/reactivex... | 6 |
Go | Go | remove "quiet" argument | 9b795c3e502906bb042e207db6b7583c9bfa34e5 | <ide><path>cmd/dockerd/daemon.go
<ide> func warnOnDeprecatedConfigOptions(config *config.Config) {
<ide> func initRouter(opts routerOptions) {
<ide> decoder := runconfig.ContainerDecoder{
<ide> GetSysInfo: func() *sysinfo.SysInfo {
<del> return opts.daemon.RawSysInfo(true)
<add> return opts.daemon.RawSysInfo()
<... | 15 |
Javascript | Javascript | adjust layoutselector for i18n | b45e78d1eedec74876b9b84496536bd9afab75b3 | <ide><path>client/utils/gatsby/layoutSelector.js
<ide> export default function layoutSelector({ element, props }) {
<ide> if (element.type === FourOhFourPage) {
<ide> return <DefaultLayout pathname={pathname}>{element}</DefaultLayout>;
<ide> }
<del> if (/^\/certification(\/.*)*/.test(pathname)) {
<add> if (/\... | 1 |
PHP | PHP | apply fixes from styleci | 34af980c3e9668c98d48025634ab0d18bc964367 | <ide><path>src/Illuminate/Foundation/Exceptions/Handler.php
<ide> protected function renderExceptionWithWhoops(Exception $e)
<ide> $whoops->writeToOutput(false);
<ide>
<ide> $whoops->allowQuit(false);
<del> })->handleException($e);
<add> }
<add> )->handleException($e);
<ide... | 1 |
Python | Python | modify representation for some objects | 5a0f8c95e253025229f2ed1e8e80ea4c4f142d60 | <ide><path>libcloud/common/dimensiondata.py
<ide> def __init__(self, id, name, action, location, network_domain,
<ide> self.enabled = enabled
<ide>
<ide> def __repr__(self):
<del> return (('<DimensionDataNetworkDomain: id=%s, name=%s, '
<del> 'action=%s, location=%s, status=%s>')
<ad... | 1 |
Javascript | Javascript | fix style in readline | 65f2e72d770158502eacdc0a847ca538534749b7 | <ide><path>lib/readline.js
<ide> Interface.prototype._ttyWrite = function (b) {
<ide> } else if (b[1] === 91 && b[2] === 66) { // down arrow
<ide> this._historyNext();
<ide> } else if (b[1] === 91 && b[2] === 51 && this.cursor < this.line.length) { // delete right
<del> this.line = this.line.... | 1 |
PHP | PHP | use arr class | b310b1ec45d0097ac1cee30b26c7bdd2e139090d | <ide><path>src/Illuminate/Filesystem/FilesystemAdapter.php
<ide>
<ide> use RuntimeException;
<ide> use Illuminate\Http\File;
<add>use Illuminate\Support\Arr;
<ide> use Illuminate\Support\Str;
<ide> use InvalidArgumentException;
<ide> use Illuminate\Support\Carbon;
<ide> public function __construct(FilesystemInterface ... | 1 |
PHP | PHP | fix style violation | 3c907066923823ff8e3f6079f8f49bf4eb9a6c26 | <ide><path>tests/Database/DatabaseEloquentModelTest.php
<ide> public function testWithoutEventDispatcher()
<ide> $model = EloquentModelSaveStub::withoutEventDispatcher(function () {
<ide> $model = new EloquentModelSaveStub;
<ide> $model->save();
<add>
<ide> return $model;
<id... | 1 |
Python | Python | add benchmark for small array coercions | ad1dd9066f04f0dda10a1c991480ba506d53676a | <ide><path>benchmarks/benchmarks/bench_array_coercion.py
<add>from __future__ import absolute_import, division, print_function
<add>
<add>from .common import Benchmark
<add>
<add>import numpy as np
<add>
<add>
<add>class ArrayCoercionSmall(Benchmark):
<add> # More detailed benchmarks for array coercion,
<add> # s... | 1 |
Ruby | Ruby | use rails convetions | ade741e113928b6ee4b376ee5d60e6813ecc35c4 | <ide><path>activerecord/test/cases/associations/belongs_to_associations_test.rb
<ide> def test_belongs_to_with_touch_option_on_touch
<ide> end
<ide>
<ide> def test_belongs_to_with_touch_option_on_touch_without_updated_at_attributes
<del> assert !LineItem.column_names.include?("updated_at")
<add> assert_not L... | 1 |
Text | Text | update coverage badge and link to coveralls | 58798d5b359e69021b299b0f601db601f41452de | <ide><path>README.md
<ide> <a href="https://travis-ci.org/cakephp/cakephp" target="_blank">
<ide> <img alt="Build Status" src="https://img.shields.io/travis/cakephp/cakephp/master.svg?style=flat-square">
<ide> </a>
<del> <a href="https://codecov.io/github/cakephp/cakephp" target="_blank">
<del> ... | 1 |
Go | Go | change floats to ints recursively on env encoding | 1d3d1c5d2b762a32fbee348702af96f9c00fff83 | <ide><path>engine/env.go
<ide> func (env *Env) SetAuto(k string, v interface{}) {
<ide> }
<ide> }
<ide>
<add>func changeFloats(v interface{}) interface{} {
<add> switch v := v.(type) {
<add> case float64:
<add> return int(v)
<add> case map[string]interface{}:
<add> for key, val := range v {
<add> v[key] = changeF... | 2 |
Javascript | Javascript | remove old reference to rootresponder | 4a250b3b7062e531955bcad3d017f998e60fe75f | <ide><path>packages/ember-handlebars/tests/handlebars_test.js
<ide> test("Child views created using the view helper should have their IDs registered
<ide>
<ide> var childView = firstChild(view);
<ide> var id = childView.$()[0].id;
<del> equal(Ember.View.views[id], childView, 'childView without passed ID is regist... | 1 |
PHP | PHP | fix failing schemacollection tests | 32be6679dac00f28885046c65f876689b30b2553 | <ide><path>Cake/Test/TestCase/Database/Schema/CollectionTest.php
<ide> class CollectionTest extends TestCase {
<ide> public function setUp() {
<ide> parent::setUp();
<ide> $this->connection = ConnectionManager::get('test');
<add> Cache::clear(false, '_cake_model_');
<add> Cache::enable();
<ide> }
<ide>
<ide> /... | 1 |
Javascript | Javascript | allow serializing of objects with null prototype | 44663f8c673eb0f3a10aca7f5ca60b65381f59dd | <ide><path>lib/serialization/NullPrototypeObjectSerializer.js
<add>/*
<add> MIT License http://www.opensource.org/licenses/mit-license.php
<add>*/
<add>
<add>"use strict";
<add>
<add>class NullPrototypeObjectSerializer {
<add> serialize(obj, { write }) {
<add> const keys = Object.keys(obj);
<add> for (const key of ke... | 5 |
Text | Text | update all-langs.js link | 135d93ee6df123c1636f4fe46c5096f87e18979c | <ide><path>docs/how-to-work-on-localized-client-webapp.md
<ide> You can test the client app in any language available in the [list of languages
<ide>
<ide> If you are testing a new language, create a folder with the language name as the title next to the other languages and copy the JSON files from another language in... | 1 |
PHP | PHP | update docs + add tests for tableregistry | 132232294af3d70a141d082afea638a6b8012aa5 | <ide><path>Cake/ORM/TableRegistry.php
<ide> class TableRegistry {
<ide> protected static $_instances = [];
<ide>
<ide> /**
<del> * Stores a list of options to be used when instantiating an object for the table
<del> * with the same name as $table. The options that can be stored are those that
<del> * are recognized b... | 2 |
Javascript | Javascript | use arguments rather than an array of keys | e27f9fe458ad798bacd545c10ba3b53104b5bc9c | <ide><path>packages/sproutcore-runtime/lib/mixins/observable.js
<ide> SC.Observable = SC.Mixin.create(/** @scope SC.Observable.prototype */ {
<ide>
<ide> /**
<ide> To get multiple properties at once, call getProperties
<del> with an Array:
<add> with a list of strings:
<ide>
<del> record.getPrope... | 2 |
Ruby | Ruby | add fuse migrations | bd5083f970e26b3978f26493300951f9be0fad75 | <ide><path>Library/Homebrew/tap_migrations.rb
<ide> TAP_MIGRATIONS = {
<ide> "adobe-air-sdk" => "homebrew/binary",
<add> "afuse" => "homebrew/fuse",
<ide> "agedu" => "homebrew/head-only",
<ide> "aimage" => "homebrew/boneyard",
<ide> "aplus" => "homebrew/boneyard",
<ide> "apple-gcc42" => "homebrew/dupes",
<id... | 1 |
Ruby | Ruby | remove some warning with ruby 2.2 | 156c6577313ca4183c72423bab5ffd24c1b9353d | <ide><path>railties/test/generators/actions_test.rb
<ide> def test_environment_with_block_should_include_block_contents_in_environment_ini
<ide> run_generator
<ide>
<ide> action :environment do
<del> '# This wont be added'
<add> _ = '# This wont be added'# assignment to silence parse-time warning "un... | 1 |
Javascript | Javascript | fix paths of module system and polyfills | 7eb005b4df541ecc5940175b945f82523281d831 | <ide><path>packager/src/ModuleGraph/types.flow.js
<ide> export type TransformedSourceFile =
<ide> export type LibraryOptions = {|
<ide> dependencies?: Array<string>,
<ide> platform?: string,
<del> root: string,
<add> rebasePath: string => string,
<ide> |};
<ide>
<ide> export type Base64Content = string; | 1 |
Text | Text | improve russian translation in challenge | 3a66452896fb3728999c6bb2c5b44d46ce66af6f | <ide><path>curriculum/challenges/russian/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.russian.md
<ide> localeTitle: Добавить текстовую альтернативу изо
<ide> ## Description
<ide>
<ide>
<add>
<ide> <section id="description"> Вероятно, вы видели атр... | 1 |
Ruby | Ruby | handle optional build-time deps correctly | 93af660c7fd043d1dce809a7bfb5017252f28990 | <ide><path>Library/Homebrew/build.rb
<ide> def expand_reqs
<ide>
<ide> def expand_deps
<ide> f.recursive_dependencies do |dependent, dep|
<del> if dep.optional? || dep.recommended?
<del> Dependency.prune unless dependent.build.with?(dep.name)
<del> elsif dep.build?
<del> Dependency.prune ... | 1 |
Javascript | Javascript | add test for responses to http connect req | 0ecc430894f087e69518dc34e57d66cbae5a39d9 | <ide><path>test/parallel/test-http-connect-req-res.js
<add>'use strict';
<add>const common = require('../common');
<add>const assert = require('assert');
<add>const http = require('http');
<add>
<add>const server = http.createServer(function(req, res) {
<add> assert(false);
<add>});
<add>server.on('connect', common.mu... | 1 |
Python | Python | fix blenderbot tok | 2aa9c2f20445312955078d3d46cc699ea8de33cf | <ide><path>src/transformers/models/blenderbot/tokenization_blenderbot.py
<ide> class BlenderbotTokenizer(RobertaTokenizer):
<ide> "tokenizer_config_file": "tokenizer_config.json",
<ide> }
<ide> pretrained_vocab_files_map = {
<del> "vocab_file": {CKPT_3B: "https://cdn.huggingface.co/facebook/blend... | 2 |
Javascript | Javascript | remove unused comments | a65979d02897e924ca54d80270315f5814f55ff1 | <ide><path>test/cases/parsing/issue-11353/index.js
<ide> it('should correctly build the correct function string', () => {
<ide> });
<ide>
<ide> it('should correctly provide the generator function interface', () => {
<del> var gen = generator(); // "Generator { }"
<del> expect(gen.next().value).toBe(0); // 0
<del> expe... | 1 |
Python | Python | fix linter issue | 78c6713b4ee06bec1fa579f94b466cbe5fe4e8f3 | <ide><path>numpy/distutils/ccompiler_opt.py
<ide> class _Config:
<ide> ## Power9/ISA 3.00
<ide> VSX3 = dict(interest=3, implies="VSX2", implies_detect=False),
<ide> ## Power10/ISA 3.1
<del> VSX4 = dict(interest=4, implies="VSX3", extra_checks="VSX4_MMA", implies_detect=False),
<add> ... | 1 |
Ruby | Ruby | add documentation for create_with | 97350762da7c723eb49e30f827ee2e4eb5997fd8 | <ide><path>activerecord/lib/active_record/relation/query_methods.rb
<ide> def offset!(value)
<ide> end
<ide>
<ide> # Specifies locking settings (default to +true+). For more information
<del> # on locking, please see +ActiveRecord::Locking+.
<add> # on locking, please see +ActiveRecord::Lockin+g.
<ide> ... | 1 |
Javascript | Javascript | remove reference to `.controller` on components | 13afe72bd37cdf5db007bda269eca0d18e7f1ac7 | <ide><path>packages/ember-glimmer/lib/renderer.js
<ide> import { RootReference } from './utils/references';
<ide> import run from 'ember-metal/run_loop';
<ide> import { setHasViews } from 'ember-metal/tags';
<del>import { CURRENT_TAG } from 'glimmer-reference';
<add>import { CURRENT_TAG, UNDEFINED_REFERENCE } from 'gli... | 3 |
Text | Text | add url to a missing link | 56021117899497d0e2098874c10e9ee2b6523ef4 | <ide><path>guide/english/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/boo-who/index.md
<ide> Uses the operator `typeof` to check if the variable is a boolean. If it is, it w
<ide>
<ide> #### Relevant Links
<ide>
<del>* <a>Using typeof</a>
<ide> * <a href='https://developer.mo... | 1 |
Javascript | Javascript | fix timing sensitivity in debugger test | 21b05cd6cd66afb86145bc0a22e571dd5842112e | <ide><path>test/parallel/test-debugger-util-regression.js
<ide> const path = require('path');
<ide> const spawn = require('child_process').spawn;
<ide> const assert = require('assert');
<ide>
<add>const DELAY = common.platformTimeout(200);
<add>
<ide> const fixture = path.join(
<ide> common.fixturesDir,
<ide> 'deb... | 1 |
Text | Text | add link to code of conduct in contributing | 16630ecb5107b75dfa4cf1104f0bc8baee01413c | <ide><path>.github/CONTRIBUTING.md
<ide> Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
<ide> disclosure of security bugs. In those cases, please go through the process
<ide> outlined on that page and do not file a public issue.
<ide>
<add>## Code of Conduct
<add>
<add>Facebook has ad... | 1 |
Mixed | Javascript | add hijackstdout and hijackstderr | d00e5f1a04fa4bcf15bbeb6c0f1f6de1e8f8afd4 | <ide><path>test/common/README.md
<ide> Checks whether `IPv6` is supported on this platform.
<ide>
<ide> Checks if there are multiple localhosts available.
<ide>
<add>### hijackStderr(listener)
<add>* `listener` [<Function>][MDN-Function]: a listener with a single parameter called `data`.
<add>
<add>Eavesdrop to `p... | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.