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 |
|---|---|---|---|---|---|
Ruby | Ruby | check env_url only once | d035ba143a46e64e6110b6a690e0655e8574fd49 | <ide><path>activerecord/lib/active_record/connection_handling.rb
<ide> def config
<ide> if key.to_s == env
<ide> env_url = ENV["DATABASE_URL"]
<ide> end
<add>
<ide> env_url ||= ENV["DATABASE_URL_#{key.upcase}"]
<del> entry ||= {} if env_url
<del> e... | 1 |
Javascript | Javascript | make properties on blob and url enumerable | 6fb466bc38b1b489afe16ab4c88f08105b9ddb94 | <ide><path>lib/internal/blob.js
<ide> const {
<ide> ArrayFrom,
<ide> MathMax,
<ide> MathMin,
<add> ObjectDefineProperties,
<ide> ObjectDefineProperty,
<ide> PromiseResolve,
<ide> PromiseReject,
<ide> const {
<ide> createDeferredPromise,
<ide> customInspectSymbol: kInspect,
<ide> kEmptyObject,
<add> ... | 4 |
Java | Java | remove actions utility methods | 24c535e85f396331106c621bd713a08964e0ba97 | <ide><path>src/main/java/rx/functions/Actions.java
<ide> public void call(Object... args) {
<ide> }
<ide> }
<ide>
<del> /**
<del> * Extracts a method reference to the Observer's {@link Observer#onNext onNext} method in the form of an
<del> * {@link Action1}.
<del> * <p>Java 8: observer::... | 1 |
Ruby | Ruby | return a null object from `attributeset#[]` | 6d7ac31ddb9b5457177ee6b127624ad7e8cdd9d3 | <ide><path>activerecord/lib/active_record/attribute_methods/before_type_cast.rb
<ide> module BeforeTypeCast
<ide> # task.read_attribute_before_type_cast('completed_on') # => "2012-10-21"
<ide> # task.read_attribute_before_type_cast(:completed_on) # => "2012-10-21"
<ide> def read_attribute_before_... | 6 |
Javascript | Javascript | remove repeated compression algorithm | 242c1d97828b54032e151eab36c9b3913577b855 | <ide><path>lib/adapters/http.js
<ide> export default function httpAdapter(config) {
<ide> return reject(customErr);
<ide> }
<ide>
<del> headers.set('Accept-Encoding', 'gzip, deflate, gzip, br', false);
<add> headers.set('Accept-Encoding', 'gzip, deflate, br', false);
<ide>
<ide> const options = {
... | 1 |
Text | Text | add changelogs for vm | 08d5ab9aaed95f95fb9831b4e36c8c1ef4ebc7a3 | <ide><path>doc/api/vm.md
<ide> executed in specific sandboxes (or "contexts").
<ide> ### new vm.Script(code, options)
<ide> <!-- YAML
<ide> added: v0.3.1
<add>changes:
<add> - version: v5.7.0
<add> pr-url: https://github.com/nodejs/node/pull/4777
<add> description: The `cachedData` and `produceCachedData` option... | 1 |
Text | Text | use https for hyperlinks in readme | 73415da25d964ee31ec1804d55f5af0199a1378e | <ide><path>build/fixtures/README.md
<ide>
<ide> > jQuery is a fast, small, and feature-rich JavaScript library.
<ide>
<del>For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
<add>For information on how to get started and how to use jQuery, please ... | 1 |
PHP | PHP | add braces to key call | 716b4a12e0f2a7fa6fbb0579152dfbf486d2936e | <ide><path>src/Http/Client/Response.php
<ide> public function __isset($name)
<ide> return $val !== null;
<ide> }
<ide>
<del> return isset($this->$key);
<add> return isset($this->{$key});
<ide> }
<ide> } | 1 |
Javascript | Javascript | remove duplicate import | cca8cde2c63700e45e0cd4c9a4d068ccacf301f8 | <ide><path>lib/ContextModule.js
<ide> const {
<ide> compareLocations,
<ide> concatComparators,
<ide> compareSelect,
<del> keepOriginalOrder
<add> keepOriginalOrder,
<add> compareModulesById
<ide> } = require("./util/comparators");
<del>const { compareModulesById } = require("./util/comparators");
<ide> const { conte... | 1 |
Javascript | Javascript | document the error event | 4e2b4a215c12071bf4efe85f45675dd142c463ea | <ide><path>src/js/player.js
<ide> vjs.Player.prototype.onFullscreenChange = function() {
<ide> }
<ide> };
<ide>
<add>/**
<add> * Fired when an error occurred
<add> * @event error
<add> */
<add>vjs.Player.prototype.onError;
<add>
<ide> // /* Player API
<ide> // ========================================================... | 1 |
Text | Text | update supervisord example | e38678e6601cc597b621aaf3cf630419a7963ae9 | <ide><path>docs/admin/using_supervisord.md
<ide> parent = "engine_admin"
<ide> > - **If you don't like sudo** then see [*Giving non-root
<ide> > access*](../installation/binaries.md#giving-non-root-access)
<ide>
<del>Traditionally a Docker container runs a single process when it is
<del>launched, for example an Apac... | 1 |
Ruby | Ruby | use bottlecollector in bottle softwarespec | e2af1cbeeb8f68150037dbf8612b69290b9e85aa | <ide><path>Library/Homebrew/bottles.rb
<ide> require 'extend/ARGV'
<ide> require 'bottle_version'
<ide>
<del>def bottle_filename f, bottle_revision=nil
<add>def bottle_filename f, options={:tag=>bottle_tag, :bottle_revision=>nil}
<ide> name = f.name.downcase
<ide> version = f.stable.version
<ide> bottle_revision... | 5 |
Text | Text | fix syntax error in the doc [ci skip] | 97feb4996b1c88f770101dfce6d4d3a6baf6bb33 | <ide><path>guides/source/active_record_querying.md
<ide> This is almost the same as defining a class method, except for that scopes alway
<ide>
<ide> ```ruby
<ide> class Article < ApplicationRecord
<del> scope :by_user, ()-> { where(user: user) if user }
<add> scope :by_user, ->(user) { where(user: user) if user }
<... | 1 |
Mixed | Go | add a docker_api_version env var | 6287ec9095f380449f0b4f1a06d4e5df43fc4449 | <ide><path>api/client/cli.go
<ide> func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
<ide> }
<ide> customHeaders["User-Agent"] = "Docker-Client/" + dockerversion.Version + " (" + runtime.GOOS + ")"
<ide>
<del> client, err := lib.NewClient(host, string(api.Version), clientFlags.Commo... | 9 |
Ruby | Ruby | remove most code related to serialized properties | 90c8be76a7d00475be5ff4db2eeedde5cc936c2d | <ide><path>activerecord/lib/active_record/attribute_methods.rb
<ide> def attributes
<ide> }
<ide> end
<ide>
<del> # Placeholder so it can be overriden when needed by serialization
<del> def attributes_for_coder # :nodoc:
<del> attributes_before_type_cast
<del> end
<del>
<ide> # Returns an <... | 12 |
Go | Go | use apierror in server version middleware | bcb0405239e0c820516b05ccc2bb7e8d4a1599f9 | <ide><path>api/server/httputils/errors.go
<ide> func GetHTTPErrorStatusCode(err error) int {
<ide> return statusCode
<ide> }
<ide>
<add>func apiVersionSupportsJSONErrors(version string) bool {
<add> const firstAPIVersionWithJSONErrors = "1.23"
<add> return version == "" || versions.GreaterThan(version, firstAPIVersio... | 2 |
PHP | PHP | fix route cache path | dda4c05b2c5527a4b8ca9a460fec20fc0a264cf7 | <ide><path>src/Illuminate/Foundation/Application.php
<ide> public function routesAreCached()
<ide> */
<ide> public function getRouteCachePath()
<ide> {
<del> return $this['path'].'/routing/cache.php';
<add> return $this['path.storage'].'/meta/routes.php';
<ide> }
<ide>
<ide> /**
<ide><path>src/Illuminate/Found... | 2 |
Go | Go | check error before defer | 04ef69a1e963e0c9bc9b685188f2c584ef275e45 | <ide><path>integration-cli/docker_cli_build_test.go
<ide> RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio'
<ide> "test_file3": "test3",
<ide> "test_file4": "test4",
<ide> })
<del> defer ctx.Close()
<ide> if err != nil {
<ide> c.Fatal(err)
<ide> }
<add> defer ctx.Close()
<ide>... | 1 |
Javascript | Javascript | introduce objecttypeannotation utility type | 688caa0bdc5cffe83e2e7b715eb28d45de82fd1b | <ide><path>packages/react-native-codegen/src/CodegenSchema.js
<ide> export type StringEnumTypeAnnotation = $ReadOnly<{|
<ide> |}>,
<ide> |}>;
<ide>
<del>type NamedShape<+T> = $ReadOnly<{
<add>type ObjectTypeAnnotation<+T> = $ReadOnly<{|
<add> type: 'ObjectTypeAnnotation',
<add> properties: $ReadOnlyArray<NamedShap... | 12 |
Text | Text | add v3.28.3 to changelog.md | da6db350af275e7dff93e1b3a3042b2d15d5186d | <ide><path>CHANGELOG.md
<ide> - [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
<ide> - [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
<ide>
<add>## v3.28.3 (October 22, 2021)
<add>
<add>- [#19799](https://github.com/emberjs... | 1 |
Mixed | Go | support insecure registry in configuration reload | 582803f00addb597efbfc64a5143f2f848b76ae6 | <ide><path>daemon/daemon.go
<ide> func (daemon *Daemon) initDiscovery(config *Config) error {
<ide> // These are the settings that Reload changes:
<ide> // - Daemon labels.
<ide> // - Daemon debug log level.
<add>// - Daemon insecure registries.
<ide> // - Daemon max concurrent downloads
<ide> // - Daemon max concurren... | 8 |
Javascript | Javascript | remove unused options from swc-loader | 40cf9313387955c75e00c1b4f653fb0e63e28759 | <ide><path>packages/next/build/swc/index.js
<ide> async function transform(src, options) {
<ide> options.jsc.parser.syntax = options.jsc.parser.syntax ?? 'ecmascript'
<ide> }
<ide>
<del> const { plugin, ...newOptions } = options
<del>
<del> if (plugin) {
<del> const m =
<del> typeof src === 'string'
<d... | 1 |
PHP | PHP | add missing sprintf in shell.php | 5b05adea8c8621addd0f870c3ad6cac49854811e | <ide><path>src/Console/Shell.php
<ide> public function startup() {
<ide> */
<ide> protected function _welcome() {
<ide> $this->out();
<del> $this->out('<info>Welcome to CakePHP %s Console</info>', 'v' . Configure::version());
<add> $this->out(sprintf('<info>Welcome to CakePHP %s Console</info>', 'v' . Configure::... | 1 |
Javascript | Javascript | fix broken inline script | 4c2c45338a583b12c055750c57ae66710eaae384 | <ide><path>examples/amp-first/pages/index.js
<ide> const Home = props => (
<ide> id="hello-world"
<ide> layout="fixed-height"
<ide> height="64"
<del> script={() => {
<del> const btn = document.querySelector('button')
<add> script="
<add> ... | 1 |
Go | Go | expect uncompressed tar for applydiff | 273f50c741e82a0be3e9f9d4c975cc18801dfe38 | <ide><path>daemon/graphdriver/aufs/aufs.go
<ide> func (a *Driver) Diff(id, parent string) (archive.Archive, error) {
<ide> }
<ide>
<ide> func (a *Driver) applyDiff(id string, diff archive.ArchiveReader) error {
<del> return chrootarchive.Untar(diff, path.Join(a.rootPath(), "diff", id), nil)
<add> return chrootarchive.... | 4 |
Ruby | Ruby | report some exceptions | c5cd206169c57609b1c6d2f4cff9e390b6350a27 | <ide><path>Library/brew.rb
<ide> def require?(path)
<ide> $stderr.puts # seemingly a newline is typical
<ide> exit 130
<ide> rescue BuildError => e
<add> report_analytics_exception(e)
<ide> e.dump
<ide> exit 1
<ide> rescue RuntimeError, SystemCallError => e
<add> report_analytics_exception(e)
<ide> raise if... | 1 |
PHP | PHP | add tests for the required_without validation rule | 8523dd30312dea0c8e3ba017d5c052ce5ae5b777 | <ide><path>tests/Validation/ValidationValidatorTest.php
<ide> public function testValidateRequiredWith()
<ide> $this->assertFalse($v->passes());
<ide> }
<ide>
<add> public function testValidateRequiredWithout()
<add> {
<add> $trans = $this->getRealTranslator();
<add> $v = new Validator($trans, array('first' => 'T... | 1 |
Mixed | Text | fix permute layer | 4b6bf1dbfe0d0b49f876c701b95a6ff66e9f206d | <ide><path>README.md
<ide> In the examples folder, you will find example models for real datasets:
<ide> - Reuters newswires topic classification: Multilayer Perceptron (MLP)
<ide> - MNIST handwritten digits classification: MLP & CNN
<ide> - Character-level text generation with LSTM
<add>
<ide> ...and more.
<ide>
<ide... | 3 |
Javascript | Javascript | ignore stylesheetvalidation if profiling | d7b34dd38d396bb692d6f5a3bb20245e5e3aac8f | <ide><path>Libraries/StyleSheet/StyleSheetValidation.js
<ide> const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
<ide>
<ide> class StyleSheetValidation {
<ide> static validateStyleProp(prop: string, style: Object, caller: string) {
<del> if (!__DEV__) {
<add> if (!__DEV__ || global.__... | 1 |
Javascript | Javascript | fix the bookmark button and redo the anchor prefix | dd8c39d8e14d283777f8c4e5788ada2c719d9542 | <ide><path>web/viewer.js
<ide> var PDFView = {
<ide> },
<ide>
<ide> getDestinationHash: function pdfViewGetDestinationHash(dest) {
<del> // We add the full url for the extension so the anchor links don't come up
<del> // as resource:// urls and so open in new tab/window works.
<del> var url = PDFJS.isFire... | 1 |
Javascript | Javascript | fix documentation for {{with}} helper | 826d33d2b6eaf178ac65a22d455b41e4a4c5b205 | <ide><path>packages/ember-htmlbars/lib/helpers/with.js
<ide> import shouldDisplay from "ember-views/streams/should_display";
<ide> Use the `{{with}}` helper when you want to alias a property to a new name. This is helpful
<ide> for semantic clarity as it allows you to retain default scope or to reference a property... | 1 |
Javascript | Javascript | add default options for *stat() | 4111c57f7ca3fd2993b60e86bea2abe63d124c65 | <ide><path>lib/fs.js
<ide> function readdirSync(path, options) {
<ide> return options.withFileTypes ? getDirents(path, result) : result;
<ide> }
<ide>
<del>function fstat(fd, options, callback) {
<add>function fstat(fd, options = { bigint: false }, callback) {
<ide> if (typeof options === 'function') {
<ide> c... | 2 |
Java | Java | handle noclassdeffounderror consistently for tels | fb12e234fcee416c4ea6359a2242ce7e3977b0b6 | <ide><path>spring-test/src/main/java/org/springframework/test/context/TestContextManager.java
<ide> private TestExecutionListener[] retrieveTestExecutionListeners(Class<?> clazz) {
<ide> List<Class<? extends TestExecutionListener>> classesList = new ArrayList<Class<? extends TestExecutionListener>>();
<ide>
<ide> ... | 1 |
PHP | PHP | fix php 8.1 warnings | d5c49a1f4f646f63e56b23395f52d594048235ee | <ide><path>src/Database/Type/DateTimeType.php
<ide> public function marshal($value): ?DateTimeInterface
<ide> return null;
<ide> }
<ide>
<del> if (ctype_digit($value)) {
<add> if (is_int($value) || (is_string($value) && ctype_digit($value))) {
<ide> /**... | 3 |
Ruby | Ruby | fix cctools invocation check regular expression | e7554b0b3f71e0658e52e8dea974c511bc58aeba | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def audit_line(line, _lineno)
<ide> problem "'fails_with :llvm' is now a no-op so should be removed"
<ide> end
<ide>
<del> if line =~ /system\s+['"](otool)|(install_name_tool)|(lipo)/
<add> if line =~ /system\s+['"](otool|install_name_tool|lipo)/ && fo... | 1 |
Python | Python | fix typo in retinanet_model.py | 090c7149a7073bd4da4e057ddd4fa4398e095199 | <ide><path>official/vision/detection/modeling/retinanet_model.py
<ide> def __init__(self, params):
<ide> params.postprocess)
<ide>
<ide> self._transpose_input = params.train.transpose_input
<del> assert not self._transpose_input, 'Transpose input is not supportted.'
<add> assert not self._transpose_i... | 1 |
Python | Python | add a decoder layer for bert | cd6a59d5c1cb9c7905675fc82ce50df5e2bdf3f0 | <ide><path>transformers/modeling_bert.py
<ide> def forward(self, hidden_states, attention_mask=None, head_mask=None):
<ide> class BertDecoderLayer(nn.Module):
<ide> def __init__(self, config):
<ide> super(BertDecoderLayer, self).__init__()
<del> raise NotImplementedError
<add> self.self_attent... | 1 |
PHP | PHP | fix coding standards and missing doc blocks | 53337387ad632d3ddddc3092a959376acf334a84 | <ide><path>Cake/Test/TestCase/View/Helper/PaginatorHelperTest.php
<ide> public function testTemplates() {
<ide> * @return void
<ide> */
<ide> public function testHasPrevious() {
<del> $this->assertFalse($this->Paginator->hasPrev());
<add> $this->assertSame($this->Paginator->hasPrev(), false);
<ide> $this->Pagina... | 3 |
Text | Text | add note on compat import in tutorial | 02ae1682b5585581e88bbd996f7cb7fd22b146f7 | <ide><path>docs/tutorial/1-serialization.md
<ide> At this point we've translated the model instance into Python native datatypes.
<ide>
<ide> Deserialization is similar. First we parse a stream into Python native datatypes...
<ide>
<add> # This import will use either `StringIO.StringIO` or `io.BytesIO`
<add> ... | 1 |
Text | Text | improve dns introduction | 40d363d2bc31c1d454d2a248189684e1b9964c8b | <ide><path>doc/api/dns.md
<ide>
<ide> > Stability: 2 - Stable
<ide>
<del>The `dns` module contains functions belonging to two different categories:
<add>The `dns` module enables name resolution. For example, use it to look up IP
<add>addresses of host names.
<ide>
<del>1. Functions that use the underlying operating ... | 1 |
Javascript | Javascript | fix typo in text-editor-spec.js | 08226f27b23622c6f51701da5d22fb4999e09cf2 | <ide><path>spec/text-editor-spec.js
<ide> describe('TextEditor', () => {
<ide>
<ide> describe('when there is a single selection', () => {
<ide> describe('when the selection spans a single line', () => {
<del> describe('when there is no fold in the preceeding row', () =>
<add> describe('... | 1 |
Mixed | Ruby | fix inheritance of stored_attributes (fixes ) | 6de710d6648e451ef47e9215172901e8d736ba0c | <ide><path>activerecord/CHANGELOG.md
<add>* Fix `stored_attributes` to correctly merge the details of stored
<add> attributes defined in parent classes.
<add>
<add> Fixes #14672.
<add>
<add> *Brad Bennett*, *Jessica Yao*, *Lakshmi Parthasarathy*
<add>
<ide> * `change_column_default` allows `[]` as argument... | 3 |
PHP | PHP | apply fixes from styleci | ab06a52f31f40583bf831ef8402b072c41f6c38f | <ide><path>src/Illuminate/Console/Command.php
<ide> protected function context()
<ide> 'no-ansi',
<ide> 'no-interaction',
<ide> 'quiet',
<del> 'verbose'
<add> 'verbose',
<ide> ]))->mapWithKeys(function ($value, $key) {
<ide> return ["--{$key}... | 1 |
PHP | PHP | rename some interfaces for consistency | 26982391b8ecf8f9160cec324c74ded96861f2b6 | <add><path>src/Illuminate/Contracts/Support/Arrayable.php
<del><path>src/Illuminate/Contracts/Support/ArrayableInterface.php
<ide> <?php namespace Illuminate\Contracts\Support;
<ide>
<del>interface ArrayableInterface {
<add>interface Arrayable {
<ide>
<ide> /**
<ide> * Get the instance as an array.
<add><path>src/... | 27 |
Text | Text | reduce confusion about passing an object to `push` | aac4e21d46f300d8433b0bd94a7a0f51e443b7d4 | <ide><path>packages/next/README.md
<ide> function ReadMore() {
<ide> export default ReadMore
<ide> ```
<ide>
<del>This uses the same exact parameters as in the `<Link>` component.
<add>This uses the same exact parameters as [in the `<Link>` component](#with-url-object). The first parameter maps to `href` while the sec... | 1 |
PHP | PHP | fix route match | e8d523cbbc1fc5270925b1532cb166ea0855b537 | <ide><path>src/Illuminate/Routing/Route.php
<ide> protected static function compileParameters($value, array $wheres = array())
<ide> {
<ide> $value = static::compileWhereParameters($value, $wheres);
<ide>
<del> return preg_replace('/\{(([\w\-]+)[^?])\}/', static::$wildcard, $value);
<add> return preg_replace('/\{... | 1 |
Go | Go | fix relative path on windows for uuid paths | 684633f734f86b6a66873b42c9356eb543e12917 | <ide><path>builder/remotecontext/lazycontext.go
<ide> import (
<ide> "io"
<ide> "os"
<ide> "path/filepath"
<add> "runtime"
<add> "strings"
<ide>
<ide> "github.com/docker/docker/builder"
<ide> "github.com/docker/docker/pkg/pools"
<ide> func (c *lazyContext) Stat(path string) (string, builder.FileInfo, error) {
<id... | 1 |
Text | Text | add missing toc entry in contributing.md | 3f1cca4817653606a5d78fa3653427ffd211dd43 | <ide><path>CONTRIBUTING.md
<ide> expect throughout each step of the process.
<ide> * [Commit message guidelines](#commit-message-guidelines)
<ide> * [Step 5: Rebase](#step-5-rebase)
<ide> * [Step 6: Test](#step-6-test)
<add> * [Test Coverage](#test-coverage)
<ide> * [Step 7: Push](#step-7-push)
<... | 1 |
Ruby | Ruby | remove deprecation warning | 75e3464e5868522c3c277d7008238d0d3ed93bf8 | <ide><path>activerecord/lib/active_record/fixtures.rb
<ide> def initialize(connection, name, class_name, path, config = ActiveRecord::Base)
<ide> @config = config
<ide> @model_class = nil
<ide>
<del> if class_name.is_a?(String)
<del> ActiveSupport::Deprecation.warn("The ability to pass in str... | 1 |
Javascript | Javascript | fix installation instructions | 921f80e1eabf04ecd4dcfda85e7ac801a8f17728 | <ide><path>src/ngMock/angular-mocks.js
<ide> angular.mock.$ComponentControllerProvider = ['$compileProvider', function($compi
<ide> * First, download the file:
<ide> * * [Google CDN](https://developers.google.com/speed/libraries/devguide#angularjs) e.g.
<ide> * `"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/... | 1 |
Go | Go | create a copy of dockerinit | 110c4f20434af89d81580670f2cec25b1e82633a | <ide><path>runtime.go
<ide> type Capabilities struct {
<ide>
<ide> type Runtime struct {
<ide> repository string
<add> sysInitPath string
<ide> containers *list.List
<ide> networkManager *NetworkManager
<ide> graph *Graph
<ide> func (runtime *Runtime) Create(config *Config, name string) (*Conta... | 2 |
Ruby | Ruby | pass caller to deprecation warning | 29f04510e9529a7f3b1e09a6ec6e8f296e7c0993 | <ide><path>actionpack/lib/action_controller/base.rb
<ide> def url_for(options = {}, *parameters_for_method_reference) #:doc:
<ide> when Symbol
<ide> ActiveSupport::Deprecation.warn(
<ide> "You called url_for(:#{options}), which is a deprecated API call. Instead you should use the nam... | 1 |
Python | Python | add test for setdiff1d on character arrays | c7b8c2842dff3f62f1dba62cd4a3431377a68bd7 | <ide><path>numpy/lib/tests/test_arraysetops.py
<ide> def check_setdiff1d( self ):
<ide>
<ide> assert_array_equal([], setdiff1d([],[]))
<ide>
<add> def check_setdiff1d_char_array(self):
<add> a = numpy.array(['a','b','c'])
<add> b = numpy.array(['a','b','s'])
<add> assert_array_equal(se... | 1 |
Javascript | Javascript | change conditon style | 706a375a06e963e32b9ad86af405a5170514d3ae | <ide><path>examples/js/lines/LineSegments2.js
<ide> THREE.LineSegments2.prototype = Object.assign( Object.create( THREE.Mesh.prototy
<ide>
<ide> }
<ide>
<del> var threshold = 0;
<del> if ( 'Line2' in raycaster.params ) {
<del>
<del> threshold = raycaster.params.Line2.threshold || 0.0;
<del>
<del> }
<add> ... | 2 |
Javascript | Javascript | add a space in <foo /> | b2cd77d2e63281e8105c57c27c72cb613d2f491e | <ide><path>src/devtools/views/utils.js
<ide> export function createRegExp(string: string): RegExp {
<ide> export function getMetaValueLabel(data: Object): string | null {
<ide> switch (data[meta.type]) {
<ide> case 'react_element':
<del> return `<${data[meta.name]}/>`;
<add> return `<${data[meta.name]} ... | 1 |
Text | Text | apply sentence-consistently in c++ style guide | a0df3a8b79a82ed3b34ee073c5127ee6e24b4f41 | <ide><path>doc/guides/cpp-style-guide.md
<del># C++ Style Guide
<add># C++ style guide
<ide>
<ide> See also the [C++ codebase README](../../src/README.md) for C++ idioms in the
<ide> Node.js codebase not related to stylistic issues.
<ide>
<del>## Table of Contents
<add>## Table of contents
<ide>
<del>* [Guides and R... | 1 |
Javascript | Javascript | use isserializationfirstnode in _rendermode test | 24070c437bcce9c8e563081b32a28ee549decf4e | <ide><path>packages/ember-application/tests/system/visit_test.js
<ide> import Application from '../../system/application';
<ide> import ApplicationInstance from '../../system/application-instance';
<ide> import Engine from '../../system/engine';
<ide> import { Route } from 'ember-routing';
<del>import { Component, help... | 1 |
Ruby | Ruby | support stringinquirer string | 2bf0b217545527b5eb85a11e297d0ff2dfc676e3 | <ide><path>lib/arel/visitors/to_sql.rb
<ide> def visit_String o; quote(o, @last_column) end
<ide> alias :visit_Time :visit_String
<ide> alias :visit_TrueClass :visit_String
<ide> alias :visit_NilClass :visit_String
<add> alias :visit_ActiveSupport_StringInquirer :visit_String
<ide>
<ide> d... | 1 |
PHP | PHP | add logoutcurrentdevice method | 6cd0b1bd909cd48ca40d2d8e1826364684e123ec | <ide><path>src/Illuminate/Auth/Events/CurrentDeviceLogout.php
<add><?php
<add>
<add>namespace Illuminate\Auth\Events;
<add>
<add>use Illuminate\Queue\SerializesModels;
<add>
<add>class CurrentDeviceLogout
<add>{
<add> use SerializesModels;
<add>
<add> /**
<add> * The authentication guard name.
<add> *
<ad... | 4 |
Go | Go | simplify the nopwriter code | 27ee261e6048c6fa0334bcce2116610dcd04aaed | <ide><path>utils/utils.go
<ide> func SelfPath() string {
<ide> return path
<ide> }
<ide>
<del>type NopWriter struct {
<del>}
<add>type NopWriter struct{}
<ide>
<del>func (w *NopWriter) Write(buf []byte) (int, error) {
<add>func (*NopWriter) Write(buf []byte) (int, error) {
<ide> return len(buf), nil
<ide> }
<ide> | 1 |
PHP | PHP | add missing return type to manytophp | 4dd7cfce9d5dde3c7d85b72b84974192e9aff220 | <ide><path>src/Database/Type/DateTimeType.php
<ide> public function setKeepDatabaseTimezone(bool $keep)
<ide> /**
<ide> * @inheritDoc
<ide> */
<del> public function manyToPHP(array $values, array $fields, DriverInterface $driver)
<add> public function manyToPHP(array $values, array $fields, DriverIn... | 1 |
Text | Text | add require statement in the example | 48d2aca39b5d9a42afb2e2598e7e463406798eac | <ide><path>doc/api/v8.md
<ide> Chrome DevTools. The JSON schema is undocumented and specific to the
<ide> V8 engine, and may change from one version of V8 to the next.
<ide>
<ide> ```js
<add>// Print heap snapshot to the console
<add>const v8 = require('v8');
<ide> const stream = v8.getHeapSnapshot();
<ide> stream.pip... | 1 |
Python | Python | remove default value of exponential_term | 806b3864c36e24459cb4685b400e74c5685f5674 | <ide><path>maths/bailey_borwein_plouffe.py
<ide> def _subsum(
<ide> sum = 0.0
<ide> for sum_index in range(digit_pos_to_extract + precision):
<ide> denominator = 8 * sum_index + denominator_addend
<del> exponential_term = 0.0
<ide> if sum_index < digit_pos_to_extract:
<ide> # ... | 1 |
Javascript | Javascript | remove the line requiring events | 1cb6fe47fce9ad02622b790e398cbbd3d600ec55 | <ide><path>lib/util.js
<ide> // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
<ide> // USE OR OTHER DEALINGS IN THE SOFTWARE.
<ide>
<del>var events = require('events');
<del>
<del>
<ide> var formatRegExp = /%[sdj%]/g;
<ide> exports.format = function(f) {
<ide> if (typeof f !== 'string') { | 1 |
Text | Text | add way to compile and run c programs via cygwin | 785f22e985ad3766797e37bf14643798fa969383 | <ide><path>guide/english/c/index.md
<ide> Once you've got it compiled, run the following command:
<ide>
<ide> If everything has gone well, you should see `Hello, World!` printed to the screen.
<ide>
<add>##### Compilation and running C in Windows with Cygwin
<add>[*Cygwin*](htttp://www.cygwin.com) is a program that p... | 1 |
Ruby | Ruby | move defaultscope and namedscope under scoping | 2b22564c4efaa63d4bbc006762838c4025c1bdca | <ide><path>activerecord/lib/active_record.rb
<ide> module ActiveRecord
<ide> autoload :Base
<ide> autoload :Callbacks
<ide> autoload :CounterCache
<del> autoload :DefaultScope
<ide> autoload :DynamicMatchers
<ide> autoload :DynamicFinderMatch
<ide> autoload :DynamicScopeMatch
<ide> module Act... | 7 |
Python | Python | simplify unicode test | 05a220dd9289d9c38ac22b9ffd7ca00830033e65 | <ide><path>numpy/core/tests/test_unicode.py
<ide> from numpy.compat import unicode
<ide> from numpy.testing import assert_, assert_equal, assert_array_equal
<ide>
<del># Python 3.3+ uses a flexible string representation
<del>ucs4 = False
<del>
<ide> def buffer_length(arr):
<ide> if isinstance(arr, unicode):
<ide> ... | 1 |
Javascript | Javascript | change assetemitted hook to include more info | ba1a3e6f261b0165ad46d6b97ce1784b72424df7 | <ide><path>lib/Compiler.js
<ide> const { makePathsRelative } = require("./util/identifier");
<ide> * @param {Compilation=} compilation
<ide> */
<ide>
<add>/**
<add> * @typedef {Object} AssetEmittedInfo
<add> * @property {Buffer} content
<add> * @property {Source} source
<add> * @property {Compilation} compilation
<a... | 2 |
Javascript | Javascript | add mit license header | e79b945f75ae7fa0fe3858082f6b4006df19ae50 | <ide><path>Libraries/vendor/core/whatwg-fetch.js
<add>/**
<add>* Copyright (c) 2015-present, Facebook, Inc.
<add>*
<add>* This source code is licensed under the MIT license found in the
<add>* LICENSE file in the root directory of this source tree.
<add>*
<add>* @format
<add>*/
<add>
<ide> // Fork of https://github.com... | 1 |
Javascript | Javascript | fix bugs in prefer-primordials linter rule | 6700b5c9e114d507f3e5425e4da3ca5724d3e23c | <ide><path>test/parallel/test-eslint-prefer-primordials.js
<ide> new RuleTester({
<ide> `,
<ide> options: [{ name: 'Function' }],
<ide> },
<add> {
<add> code: 'function identifier() {}',
<add> options: [{ name: 'identifier' }]
<add> },
<add> {
<add> code: 'funct... | 2 |
Go | Go | fix bug on lxc container start. fixes | 752c57ae567813f354aca66ff51d8d64100ae01b | <ide><path>daemon/execdriver/lxc/driver.go
<ide> func (d *driver) waitForStart(c *execdriver.Command, waitLock chan struct{}) (in
<ide> }
<ide>
<ide> output, err = d.getInfo(c.ID)
<del> if err != nil {
<del> output, err = d.getInfo(c.ID)
<add> if err == nil {
<add> info, err := parseLxcInfo(string(output))
<... | 1 |
Text | Text | add clairfication on nan | 4225f20c912c31ada8eb76d522ac3c16738a9e69 | <ide><path>guide/english/javascript/booleans/index.md
<ide> There are only a few values that will be coerced to false:
<ide> - false (not really coerced as it already is false)
<ide> - null
<ide> - undefined
<del>- NaN
<add>- NaN (stands for "Not a number")
<ide> - 0
<ide> - '' or "" (empty string)
<ide> | 1 |
Go | Go | add tests for long log-lines and trailing lines | ee34dd9f8a8a0246dae94385ed2ca56691085842 | <ide><path>daemon/logger/copier_test.go
<ide> import (
<ide> "fmt"
<ide> "io"
<ide> "os"
<add> "strings"
<ide> "sync"
<ide> "testing"
<ide> "time"
<ide> func (l *TestLoggerJSON) Name() string { return "json" }
<ide> func TestCopier(t *testing.T) {
<ide> stdoutLine := "Line that thinks that it is log line from do... | 1 |
Text | Text | add missing instructions for lang attribute | 85b8029582ba27af6c13088d7888f3205e192347 | <ide><path>curriculum/challenges/english/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6140c7e645d8e905819f1dd4.md
<ide> dashedName: step-1
<ide>
<ide> # --description--
<ide>
<del>Begin with the standard boilerplate. Add your `DOCTYPE` declaration, your `html` element, your `head` and `b... | 7 |
Ruby | Ruby | remove test that does not apply anymore | f4d600865c6bcb170f34d9ba5bfc8ace432fee8b | <ide><path>activerecord/test/cases/relation/merging_test.rb
<ide> def test_relation_merging_with_association
<ide> assert merged.to_sql.include?("bbq")
<ide> end
<ide>
<del> def test_merging_removes_rhs_bind_parameters
<del> left = Post.where(id: Arel::Nodes::BindParam.new('?'))
<del> column = Post.colum... | 1 |
Python | Python | extend pipelines for automodel tupels | 2056f26e853574034e426d97e4f803b47f8c7159 | <ide><path>src/transformers/pipelines/__init__.py
<ide> PipelineDataFormat,
<ide> PipelineException,
<ide> get_default_model,
<del> infer_framework_from_model,
<add> infer_framework_load_model,
<ide> )
<ide> from .conversational import Conversation, ConversationalPipeline
<ide> from .feature_extractio... | 3 |
Ruby | Ruby | handle failing devel requirements | ec852045b14029557e6d27d91e5eab8167803397 | <ide><path>Library/Contributions/cmd/brew-test-bot.rb
<ide> def skip formula
<ide> puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula}#{Tty.reset}"
<ide> end
<ide>
<add> def satisfied_requirements? formula_object, spec=:stable
<add> requirements = if spec == :stable
<add> formula_object.recursive_requ... | 1 |
PHP | PHP | fix sortby bug | 307f6fb8d9579427a9521a07e8700355a3e9d948 | <ide><path>src/Illuminate/Collections/Collection.php
<ide> public function sortDesc($options = SORT_REGULAR)
<ide> */
<ide> public function sortBy($callback, $options = SORT_REGULAR, $descending = false)
<ide> {
<del> if (is_array($callback)) {
<add> if (is_array($callback) && ! is_callable($... | 1 |
Javascript | Javascript | add flow-typing to messagequeue | acdd08aef725e283cf290b4785205a7dfb181ad2 | <ide><path>Libraries/Utilities/MessageQueue.js
<ide> * of patent rights can be found in the PATENTS file in the same directory.
<ide> *
<ide> * @providesModule MessageQueue
<add> * @flow
<ide> */
<ide>
<ide> /*eslint no-bitwise: 0*/
<ide>
<ide> 'use strict';
<ide>
<del>const Systrace = require('Systrace');
<ide>... | 2 |
Javascript | Javascript | preserve case as long as we can | cfa7f99b01c063a7f74ee265399473230eda6ec5 | <ide><path>src/git-repository-async.js
<ide> export default class GitRepositoryAsync {
<ide>
<ide> workingDirectory = workingDirectory.replace(/\/$/, '')
<ide>
<add> const originalPath = _path
<ide> if (this.isCaseInsensitive) {
<ide> _path = _path.toLowerCase()
<ide> workingDirectory = working... | 1 |
Go | Go | move var and comment to where it's used | 3b9b5842b3d6f27283b952bb190db5641307ee4d | <ide><path>pkg/idtools/idtools_unix.go
<ide> var (
<ide> )
<ide>
<ide> func mkdirAs(path string, mode os.FileMode, owner Identity, mkAll, chownExisting bool) error {
<del> // make an array containing the original path asked for, plus (for mkAll == true)
<del> // all path components leading up to the complete path that... | 1 |
Python | Python | add test for ndarray.flat modifying data | 883205409195195d33877a787fd3220fb0b0db1e | <ide><path>numpy/core/tests/test_regression.py
<ide> def test_ticket_1770(self):
<ide> except:
<ide> raise AssertionError
<ide>
<add> def test_ticket_1608(self):
<add> "x.flat shouldn't modify data"
<add> x = np.array([[1,2],[3,4]]).T
<add> y = np.array(x.flat)
<add> ... | 1 |
PHP | PHP | use one line | 622cdda7cf014121c01ba2090003c9902be3cceb | <ide><path>config/cache.php
<ide> |
<ide> */
<ide>
<del> 'prefix' => env(
<del> 'CACHE_PREFIX',
<del> Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'
<del> ),
<add> 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
<ide>
<ide> ]; | 1 |
PHP | PHP | add missing middlewareinterface check | e8e444f5b300dddc94fd870a80a9239aa62c9186 | <ide><path>src/Http/MiddlewareQueue.php
<ide> protected function resolve($middleware): ?MiddlewareInterface
<ide> $middleware = new $className();
<ide> }
<ide>
<add> if ($middleware instanceof MiddlewareInterface) {
<add> return $middleware;
<add> }
<add>
<ide> if (... | 1 |
Python | Python | add common class to access to the cpu | c66a7a8fd2607a1d3b4d1143a9f757c134c69fe0 | <ide><path>glances/core/glances_cpu_percent.py
<add># -*- coding: utf-8 -*-
<add>#
<add># This file is part of Glances.
<add>#
<add># Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
<add>#
<add># Glances is free software; you can redistribute it and/or modify
<add># it under the terms of the GNU Lesser General Pub... | 1 |
Java | Java | remove return statements in finally blocks | bb8be509cdcd2d9512bcbab487dd5d85c6e888fe | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
<ide> protected void doService(HttpServletRequest request, HttpServletResponse respons
<ide> doDispatch(request, response);
<ide> }
<ide> finally {
<del> if (WebAsyncUtils.getAsyncManager(request).isConcurrentHandling... | 1 |
Javascript | Javascript | ensure proper handling in runinasyncscope | 503900b4633a541ecbebc159487f775c2669f54d | <ide><path>lib/async_hooks.js
<ide> const {
<ide> executionAsyncId,
<ide> triggerAsyncId,
<ide> // Private API
<del> hasAsyncIdStack,
<ide> getHookArrays,
<ide> enableHooks,
<ide> disableHooks,
<ide> class AsyncResource {
<ide> runInAsyncScope(fn, thisArg, ...args) {
<ide> const asyncId = this[async_... | 1 |
Javascript | Javascript | use const where applicable in compilation | 0bc09a803357e89b0445f3164e00eb74b47af2dd | <ide><path>lib/Compilation.js
<ide> class Compilation extends Tapable {
<ide> let _this = this;
<ide> const start = _this.profile && +new Date();
<ide>
<del> let factories = [];
<add> const factories = [];
<ide> for(let i = 0; i < dependencies.length; i++) {
<ide> const factory = _this.dependencyFactories.g... | 1 |
Mixed | Javascript | add dynamic layouts with _app.js example | 6dcc9bd59a1ad8200f28d32ffe07a805a9fa5368 | <ide><path>examples/with-dynamic-app-layout/layouts/BlueLayout.js
<add>export default ({ children }) => {
<add> return <main style={{ border: '4px dashed blue' }}>
<add> {children}
<add> </main>
<add>}
<ide><path>examples/with-dynamic-app-layout/layouts/GreenLayout.js
<add>export default ({ children }) => {
<add> ... | 8 |
Javascript | Javascript | fix array expansion when using "..." | e63e73371324bee6bc45d40c0dd37726f064ab7b | <ide><path>lib/config/defaults.js
<ide> const A = (obj, prop, factory) => {
<ide> const item = value[i];
<ide> if (item === "...") {
<ide> if (newArray === undefined) {
<del> newArray = i > 0 ? value.slice(0, i - 1) : [];
<add> newArray = value.slice(0, i);
<ide> obj[prop] = /** @type {T[P]} */ (... | 1 |
Ruby | Ruby | replace env["home"] with dir.home | e78665f4f7a73bf18a26f2cb32d310de38e67898 | <ide><path>Library/Homebrew/cask/artifact/abstract_uninstall.rb
<ide> def uninstall_launchctl(*services, command: nil, **_)
<ide> +"/Library/LaunchAgents/#{service}.plist",
<ide> +"/Library/LaunchDaemons/#{service}.plist",
<ide> ]
<del> paths.each { |elt| elt.prepend(E... | 10 |
Text | Text | update highlighted lines in tutorial | 42dee34146c7ef24cf6bf6962a39a1b468bcd03a | <ide><path>docs/docs/tutorial.md
<ide> That's it!
<ide>
<ide> Let's replace the hard-coded data with some dynamic data from the server. We will remove the data prop and replace it with a URL to fetch:
<ide>
<del>```javascript{2}
<add>```javascript{3}
<ide> // tutorial11.js
<ide> React.renderComponent(
<ide> <Commen... | 1 |
Javascript | Javascript | simplify `reactnativestyleattributes` type | 33b385825c7220e89d02cc2de42e45563b9b5e30 | <ide><path>Libraries/Components/View/ReactNativeStyleAttributes.js
<ide> * @flow
<ide> */
<ide>
<del>'use strict';
<ide> import DeprecatedImageStylePropTypes from '../../DeprecatedPropTypes/DeprecatedImageStylePropTypes';
<ide> import DeprecatedTextStylePropTypes from '../../DeprecatedPropTypes/DeprecatedTextStylePr... | 3 |
Javascript | Javascript | update interpolation to use new color format | 042862a010da0ceda4af507d5c8ca1b3ac764681 | <ide><path>Libraries/Animated/src/Interpolation.js
<ide> function colorToRgba(input: string): string {
<ide>
<ide> int32Color = int32Color || 0; // $FlowIssue
<ide>
<del> var a = ((int32Color & 0xff000000) >>> 24) / 255;
<del> var r = (int32Color & 0x00ff0000) >>> 16;
<del> var g = (int32Color & 0x0000ff00) >>> ... | 1 |
Javascript | Javascript | remove extra call to _getlabelcapacity | 251f3832bc472f530747a66131200045c51032af | <ide><path>src/scales/scale.time.js
<ide> function determineMajorUnit(unit) {
<ide> * Important: this method can return ticks outside the min and max range, it's the
<ide> * responsibility of the calling code to clamp values if needed.
<ide> */
<del>function generate(scale, min, max, capacity) {
<add>function genera... | 1 |
Javascript | Javascript | add handle ref/unref stubs in rr mode | fa98b97171d9b8519bdbf5d9f8dbd8639ac3c050 | <ide><path>lib/cluster.js
<ide> function workerInit() {
<ide> return 0;
<ide> }
<ide>
<add> // XXX(bnoordhuis) Probably no point in implementing ref() and unref()
<add> // because the control channel is going to keep the worker alive anyway.
<add> function ref() {
<add> }
<add>
<add> function ... | 2 |
Go | Go | remove unused daemon/sorter.go | 8913ec4912e529be44b7cc2aaf465b0d9b03ffc9 | <ide><path>daemon/sorter.go
<del>package daemon
<del>
<del>import "sort"
<del>
<del>type containerSorter struct {
<del> containers []*Container
<del> by func(i, j *Container) bool
<del>}
<del>
<del>func (s *containerSorter) Len() int {
<del> return len(s.containers)
<del>}
<del>
<del>func (s *containerSorter) S... | 1 |
PHP | PHP | fix another failing test | ba373574de0964d329a0cf4facea27df73c38698 | <ide><path>tests/TestCase/Command/HelpCommandTest.php
<ide> public function testMainAsXml()
<ide> $find = '<shell name="sample" call_as="sample" provider="TestApp\Shell\SampleShell" help="sample -h"';
<ide> $this->assertOutputContains($find);
<ide>
<del> $find = '<shell name="schema_cache" call_... | 1 |
PHP | PHP | use correct argument order | ed1a64ca04dce5f21833f0e9fbad0c632a670e2f | <ide><path>lib/Cake/Utility/Xml.php
<ide> protected static function _fromArray($dom, $node, &$data, $format) {
<ide> if ($key[0] === '@') {
<ide> throw new XmlException(__d('cake_dev', 'Invalid array'));
<ide> }
<del> if (is_numeric(implode(array_keys($value), ''))) { // List
<add> if (is_numeri... | 1 |
Javascript | Javascript | fix a mistake in reactchildren refactor | 6498f62edcdf0bcc02ed96efdad92b7e89330d8a | <ide><path>packages/react-dom/src/client/ReactDOMOption.js
<ide> function flattenChildren(children) {
<ide> if (child == null) {
<ide> return;
<ide> }
<del> content += child;
<add> content += (child: any);
<ide> // Note: we don't warn about invalid children here.
<ide> // Instead, this is do... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.