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 |
|---|---|---|---|---|---|
Javascript | Javascript | remove server error listener so that it throws | 45ed000d4b29c4c621b95e6c75d6ac76a4cd9ddb | <ide><path>packager/react-packager/src/SocketInterface/SocketServer.js
<ide> class SocketServer {
<ide> this._server = net.createServer();
<ide> this._server.listen(sockPath);
<ide> this._ready = new Promise((resolve, reject) => {
<del> this._server.on('error', (e) => reject(e));
<del> this._serve... | 1 |
Python | Python | fix python2 tests | 6dacc79d395bd41e0ef76c2a043c2ef90cc79925 | <ide><path>pytorch_transformers/tests/tokenization_tests_commons.py
<ide> # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<ide> # See the License for the specific language governing permissions and
<ide> # limitations under the License.
<del>from __future__ import absolute_import
<del>from __... | 2 |
Python | Python | relocate a stray parenthesis | c0e3b273c2e358f260e688e08e146e428314e0d4 | <ide><path>research/astronet/third_party/kepler_spline/kepler_spline.py
<ide> def choose_kepler_spline(all_time,
<ide> # Don't fit a spline on less than 4 points.
<ide> if len(time) < 4:
<ide> spline.append(flux)
<del> spline_mask.append(np.ones_like(flux), dtype=np.bool)
<add> spline_... | 1 |
Text | Text | add a consideration note and a wip note | fe661915157ccdb9dc5db752edbb511dc9ddc193 | <ide><path>guides/source/action_view_overview.md
<ide> TODO...
<ide> Overview of all the helpers provided by Action View
<ide> ---------------------------------------------------
<ide>
<add>WIP: Not all the helpers are listed here. For a full list see the [API documentation](http://api.rubyonrails.org/classes/ActionVi... | 1 |
Ruby | Ruby | start output with the name/email | 5ecdf10e27f872d445be9947147071f13b280881 | <ide><path>Library/Homebrew/dev-cmd/contributions.rb
<ide> def contributions
<ide> coauthorships += git_log_coauthor_cmd(T.must(repo_path), args)
<ide> end
<ide>
<del> sentence = "Person #{args.named.first} directly authored #{commits} commits " \
<add> sentence = "#{args.named.first} directly authored... | 1 |
Javascript | Javascript | replace a tab with a space | 169e97e97226653691446334cddf374065ba3537 | <ide><path>examples/js/loaders/GLTFLoader.js
<ide> THREE.GLTFLoader = ( function () {
<ide>
<ide> }
<ide>
<del> } else {
<add> } else {
<ide>
<ide> if ( shaderParam && shaderParam.value ) {
<ide> | 1 |
Ruby | Ruby | convert emoji test to spec | 6799081f8a156fbb07246cab936717fc00826857 | <ide><path>Library/Homebrew/test/emoji_spec.rb
<add>require "emoji"
<add>
<add>describe Emoji do
<add> describe "#install_badge" do
<add> subject { described_class.install_badge }
<add>
<add> it "returns 🍺 by default" do
<add> expect(subject).to eq "🍺"
<add> end
<add>
<add> it "returns the contents ... | 2 |
Go | Go | fix race between copyto and set | d0f3f77432f8fbbcd25b58015b925c66cd9e50f5 | <ide><path>libnetwork/bitseq/sequence.go
<ide> func (h *Handle) set(ordinal, start, end uint64, any bool, release bool) (uint64
<ide> )
<ide>
<ide> for {
<del> if h.store != nil {
<del> if err := h.store.GetObject(datastore.Key(h.Key()...), h); err != nil && err != datastore.ErrKeyNotFound {
<add> var store data... | 1 |
Text | Text | remove unneeded assert text | 84edc070761b0556c9eacca196f832be5791bf4b | <ide><path>curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cumulative-standard-deviation.english.md
<ide> forumTopicId: 302240
<ide> ---
<ide>
<ide> ## Description
<add>
<ide> <section id='description'>
<ide>
<ide> Write a function that takes an array of numbers as parameter and returns the <a hre... | 46 |
Text | Text | add jsdelivr as cdn install option | c81a55fed1d9da9f97cc26391083876e5471e84f | <ide><path>docs/getting-started/installation.md
<ide> Chart.js can be installed via npm or bower. It is recommended to get Chart.js th
<ide>
<ide> ## npm
<ide> [](https://npmjs.com/package/chart.js)
<add>[
<ide> generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
<ide> # frozen_string_literal: true
<ide> def #{name}
<del> @active_... | 3 |
PHP | PHP | add validation guess for postgress inet field | 744558de90c4a408fba6c5602783ff465d6eb3e3 | <ide><path>lib/Cake/Console/Command/Task/ModelTask.php
<ide> public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
<ide> $guess = $methods['date'];
<ide> } elseif ($metaData['type'] == 'time') {
<ide> $guess = $methods['time'];
<add> } elseif ($metaData['type'] == 'inet') {
<add>... | 1 |
Python | Python | remove some temporary debugging stuff | cb4b4f6be6eeac3d2383614998a5e1436cb4226e | <ide><path>djangorestframework/resource.py
<ide> def dispatch(self, request, *args, **kwargs):
<ide>
<ide> except ErrorResponse, exc:
<ide> response = exc.response
<del>
<del> except:
<del> import traceback
<del> traceback.print_exc()
<ide>
<ide> # ... | 1 |
Javascript | Javascript | use eslint with prettier to format code | fc8c71ad16a8c0c23bfd6ffb284226bf795ca4b2 | <ide><path>api-server/server/middlewares/add-return-to.js
<ide> export default function addReturnToUrl() {
<ide> req.method !== 'GET' ||
<ide> pathsOfNoReturnRegex.test(path) ||
<ide> !whiteListRegex.test(path) ||
<del> (/hot/i).test(req.path)
<add> /hot/i.test(req.path)
<ide> ) {
<ide> ... | 70 |
Go | Go | use ms_private instead of ms_slave | 757b5775725fb90262cee1fa6068fa9dcbbff59f | <ide><path>pkg/libcontainer/nsinit/mount.go
<ide> const defaultMountFlags = syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_NOD
<ide> // is no longer in use, the mounts will be removed automatically
<ide> func setupNewMountNamespace(rootfs, console string, readonly bool) error {
<ide> // mount as slave so that the ... | 1 |
Javascript | Javascript | fix typo in comment | bb36bc7edf4f87a41d4269b619fc88ba662ef4df | <ide><path>src/Angular.js
<ide> function shallowCopy(src, dst) {
<ide>
<ide> for(var key in src) {
<ide> // shallowCopy is only ever called by $compile nodeLinkFn, which has control over src
<del> // so we don't need to worry hasOwnProperty here
<add> // so we don't need to worry about using our custom has... | 1 |
Ruby | Ruby | fix tests that assumed implicit order by id | c50223b76fdb843dc7e4d4522627a5b20f955a03 | <ide><path>activerecord/test/cases/associations/has_many_through_associations_test.rb
<ide> def test_count_with_include_should_alias_join_table
<ide> end
<ide>
<ide> def test_get_ids
<del> assert_equal [posts(:welcome).id, posts(:authorless).id], people(:michael).post_ids
<add> assert_equal [posts(:welcome).... | 1 |
Javascript | Javascript | fix typos across the project | 285529a643de078fae1a286c5b092494713f2945 | <ide><path>lib/AbstractMethodError.js
<ide> function Message() {
<ide> * @example
<ide> * class FooClass {
<ide> * abstractMethod() {
<del> * throw new AbstractMethodError(); // error message: Abstract method FooClass.abstractMethod. Must be overriden.
<add> * throw new AbstractMethodError(); // ... | 22 |
Javascript | Javascript | fix a tiny typo | 2eb9a128e2aded663f3b68f89bf3666cc317dad2 | <ide><path>test/benchmark/core/TriangleClosestPoint.js
<ide> s.add('9^3 points, 20 triangles', function() {
<ide> var target = new THREE.Vector3();
<ide> for (var tidx = 0; tidx < triangles.length; tidx++) {
<del> triangle = triangles[tidx];
<add> var triangle = triangles[tidx];
<ide> for (var... | 1 |
Python | Python | fix tests with mock timezone | a0a2c5cb370ff80a95deaa8d23f099acc4e5e0c5 | <ide><path>tests/test_fields.py
<ide> class TestNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues):
<ide> }
<ide> outputs = {}
<ide>
<del> class MockTimezone:
<add> class MockTimezone(pytz.BaseTzInfo):
<ide> @staticmethod
<ide> def localize(value, is_dst):
<ide> raise p... | 1 |
Text | Text | remove trailing slash in url's | 7f09b3c3ba8fc26c09df5c1cc87020c5f9a681dd | <ide><path>README.md
<ide> This architecture might seem like an overkill for a counter app, but the beauty
<ide>
<ide> ### Discussion
<ide>
<del>Join the **#redux** channel of the [Reactiflux](http://reactiflux.com/) Slack community.
<add>Join the **#redux** channel of the [Reactiflux](http://reactiflux.com) Slack co... | 1 |
Ruby | Ruby | require base64 in the places we're using it | d04dbcfcbd4b8ef0a7d4c607949c5d9c7860346f | <ide><path>activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb
<ide> # frozen_string_literal: true
<ide>
<ide> require "openssl"
<del>require "base64"
<ide>
<ide> module ActiveRecord
<ide> module Encryption
<ide><path>activerecord/lib/active_record/encryption/message_serializer.rb
<ide> # frozen_string_l... | 4 |
Python | Python | fail tests if malformed status file | 02590b4cfa2cefc512cdee4244490a09676a58b2 | <ide><path>tools/test.py
<ide> def ReadConfigurationInto(path, sections, defs):
<ide> if prefix_match:
<ide> prefix = SplitPath(prefix_match.group(1).strip())
<ide> continue
<del> print "Malformed line: '%s'." % line
<del> return False
<del> return True
<add> raise Exception("Malformed line: '... | 1 |
Ruby | Ruby | fix an error on 1.8.7 | b1ae796284850e29d5ad0fc769e55ed4a43676a4 | <ide><path>actionpack/lib/action_dispatch/testing/integration.rb
<ide> def cookies
<ide>
<ide> # Create and initialize a new Session instance.
<ide> def initialize(app)
<del> super
<add> super()
<ide> @app = app
<ide>
<ide> # If the app is a Rails app, make url_helpers availa... | 1 |
PHP | PHP | add test for merging associative properties | d2cde877778e2058d61b6c9e215330f0c49fadfe | <ide><path>tests/TestCase/Utility/MergeVariablesTraitTest.php
<ide> class Child extends Base {
<ide> 'Orange'
<ide> ];
<ide>
<add> public $nestedProperty = [
<add> 'Red' => [
<add> 'apple' => 'gala',
<add> ],
<add> 'Green' => [
<add> 'citrus' => 'lime'
<add> ],
<add> ];
<add>
<ide> }
<ide>
<ide> class Gran... | 1 |
Ruby | Ruby | fix hombrew typo | 95f226cf51ae3df39ed3930cf27a77e077a177f0 | <ide><path>Library/Homebrew/cmd/list.rb
<ide> def list
<ide> # Unbrewed uses the PREFIX, which will exist
<ide> # Things below use the CELLAR, which doesn't until the first formula is installed.
<ide> unless HOMEBREW_CELLAR.exist?
<del> raise NoSuchKegError, Hombrew.args.named.first if args.named.prese... | 1 |
Ruby | Ruby | improve bottle error messages | 4b0e663c2c36db0870688e99fc8a28a758968021 | <ide><path>Library/Homebrew/bottles.rb
<ide> def bottle_filename f, bottle_version=nil
<ide> end
<ide>
<ide> def install_bottle? f
<del> return true if ARGV.include? '--install-bottle'
<add> return true if ARGV.include? '--install-bottle' and MacOS.bottles_supported?(true)
<ide> return true if f.downloader and def... | 3 |
Python | Python | use get_flags_version to set version cmd flags | cb082e0ec4da42ac1f2022754d98c0a03a38d020 | <ide><path>numpy/distutils/fcompiler/__init__.py
<ide> def customize(self, dist = None):
<ide> # methods may call self.get_version.
<ide> vers_cmd = self.command_vars.version_cmd
<ide> if vers_cmd:
<del> vflags = self.flag_vars.version
<add> vflags = self.get_flags_version(... | 1 |
Ruby | Ruby | use an encapsulated factory method | a2d55dfdc3878521793a8472c00b7a648ff21ae3 | <ide><path>lib/action_cable/connection/base.rb
<ide> def initialize(server, env)
<ide>
<ide> @server, @env = server, env
<ide>
<del> @logger = TaggedLoggerProxy.new(server.logger, tags: log_tags)
<add> @logger = initialize_tagged_logger
<ide>
<ide> @heartbeat = ActionCable::Connect... | 1 |
PHP | PHP | apply fixes from styleci | a1226cb5ad3b4fae45b8d20d4f8d9275c759b7d2 | <ide><path>tests/Integration/Queue/JobChainingTest.php
<ide> public function tearDown()
<ide> public function test_jobs_can_be_chained_on_success()
<ide> {
<ide> JobChainingTestFirstJob::dispatch()->chain([
<del> new JobChainingTestSecondJob
<add> new JobChainingTestSecondJob,
<ide... | 1 |
Ruby | Ruby | resolve hash with `url` key as a `urlconfig` | 94256a0aeb57e4031b1bbe5d782ed29e31fdd1ec | <ide><path>activerecord/lib/active_record/connection_adapters/resolver.rb
<ide> def resolve(config_or_env, pool_name = nil)
<ide> when String
<ide> DatabaseConfigurations::UrlConfig.new(env, "primary", config_or_env)
<ide> when Hash
<del> DatabaseConfigurations::HashConfig.new(env, "p... | 2 |
Javascript | Javascript | move `normalizeinjectionshash` definition to debug | 774a192ece628d08a3fcd877f8395f858aa33972 | <ide><path>packages/container/lib/container.js
<ide> class FactoryManager {
<ide> }
<ide>
<ide> toString() {
<del> if (!this.madeToString) {
<add> if (this.madeToString === undefined) {
<ide> this.madeToString = this.container.registry.makeToString(this.class, this.fullName);
<ide> }
<ide>
<ide><p... | 2 |
Go | Go | normalize comment formatting | 0b155db389715aaf60aef50e4015d3a4e0768c5f | <ide><path>pkg/jsonmessage/jsonmessage.go
<ide> func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error {
<ide> clearLine(out)
<ide> endl = "\r"
<ide> fmt.Fprint(out, endl)
<del> } else if jm.Progress != nil && jm.Progress.String() != "" { //disable progressbar in non-terminal
<add> } else if jm.Prog... | 1 |
Javascript | Javascript | fix crypto test case to use correct encoding | 5160dd0365a1493a0238a2119f2a7c185db49b46 | <ide><path>test/parallel/test-crypto-authenticated.js
<ide> for (const test of TEST_CASES) {
<ide> assert.strictEqual(msg, test.plain);
<ide> } else {
<ide> // assert that final throws if input data could not be verified!
<del> assert.throws(function() { decrypt.final('ascii'); }, errMessages.auth)... | 1 |
PHP | PHP | change compiled path | 203a0c3ba176dba6ddf2e4aecd3648452ca2273c | <ide><path>config/view.php
<ide> |
<ide> */
<ide>
<del> 'compiled' => realpath(storage_path().'/framework/views'),
<add> 'compiled' => realpath(storage_path().'/framework/templates'),
<ide>
<ide> ]; | 1 |
PHP | PHP | move httpclienttrait to http package | 6a5626e943689302c46c97cfc7af29097bdf78d4 | <ide><path>src/Http/TestSuite/HttpClientTrait.php
<add><?php
<add>declare(strict_types=1);
<add>
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For f... | 3 |
Ruby | Ruby | require a class for cache computations | 64669c11174162560aa490b57f2f8b0e45620fc7 | <ide><path>activerecord/lib/active_record/associations/preloader.rb
<ide> class Preloader #:nodoc:
<ide> def initialize(records, associations, preload_scope = nil)
<ide> @records = Array.wrap(records).compact.uniq
<ide> @associations = Array.wrap(associations)
<del> @preload_scope = ... | 2 |
Python | Python | fix a typo | 7f678aaf5a066ff71289743a64e5cd685b660428 | <ide><path>flask/exthook.py
<ide> def is_important_frame(self, important_module, tb):
<ide> if module_name == important_module:
<ide> return True
<ide>
<del> # Some python versions will will clean up modules so early that the
<add> # Some python versions will clean up modules so early... | 1 |
Javascript | Javascript | remove redundant initialisation | ce7425f2692abaa1a6b3a16828f7aa343657bef7 | <ide><path>src/extras/helpers/DirectionalLightHelper.js
<ide> THREE.DirectionalLightHelper = function ( light, sphereSize ) {
<ide> this.targetLine = new THREE.Line( lineGeometry, lineMaterial );
<ide> this.targetLine.properties.isGizmo = true;
<ide>
<del> }
<del> else {
<del>
<del> this.targetSphere = null;
<del... | 2 |
Java | Java | fix classcastexception in reactmodulespecprocessor | 379b60d5e8a2418f438e4291bf5ba140778db5bc | <ide><path>ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java
<ide> public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
<ide> Set<? extends Element> reactModuleListElements = roundEnv.getElementsAnnotatedWith(
<ide> ReactModuleList.class);... | 1 |
Python | Python | fix parsing of hostvirtual record names | 11b71d296b6a256c2660530a3630671efbe52501 | <ide><path>libcloud/dns/drivers/hostvirtual.py
<ide> def _to_records(self, items, zone=None):
<ide> def _to_record(self, item, zone=None):
<ide> extra = {'ttl': item['ttl']}
<ide> type = self._string_to_record_type(item['type'])
<del> record = Record(id=item['id'], name=item['name'],
<add> ... | 2 |
Python | Python | reduce the time spent for the tf slow tests | 2acae50a0c32b52f5d0b83cd06c75b98a0d44233 | <ide><path>src/transformers/modeling_tf_utils.py
<ide> def booleans_processing(config, **kwargs):
<ide>
<ide> if "use_cache" in kwargs:
<ide> final_booleans["use_cache"] = kwargs["use_cache"] if kwargs["use_cache"] is not None else config.use_cache
<del>
<ide> else:
<ide> if (
<ide> ... | 7 |
Text | Text | fix broken link | f9453d15e5342bb5a60498916635f1a5e5c6cb14 | <ide><path>README.md
<ide> You can use it to experiment with completions generated by `GPT2Model`, `Transfo
<ide>
<ide> > “🦄 Write with transformer is to writing what calculators are to calculus.”
<ide>
<del>
<add>![write_with_tr... | 1 |
Python | Python | add support for `np.dtype(ctypes.union)` | 1466e788a43b8d4356fe35951bf0c3b0aedb554f | <ide><path>numpy/core/_dtype_ctypes.py
<ide> def dtype_from_ctypes_scalar(t):
<ide> return np.dtype(t._type_)
<ide>
<ide>
<add>def dtype_from_ctypes_union(t):
<add> formats = []
<add> offsets = []
<add> names = []
<add> for fname, ftyp in t._fields_:
<add> names.append(fname)
<add> f... | 2 |
Mixed | Ruby | add support for minitest flags in testrunner | 176b57c5430ddae7668114994c35b3293b0a05a5 | <ide><path>guides/source/testing.md
<ide> Rails creates a `test` folder for you as soon as you create a Rails project usin
<ide>
<ide> ```bash
<ide> $ ls -F test
<del>
<ide> controllers/ helpers/ mailers/ test_helper.rb
<ide> fixtures/ integration/ models/
<ide> ```
<ide> Finished tests in 0.... | 4 |
Javascript | Javascript | copy array with slice instead of for loop | 8eabc5463c795d87f37e5a9eacbbb14435024061 | <ide><path>src/ng/filter/orderBy.js
<ide> function orderByFilter($parse) {
<ide> return compare(get(a),get(b));
<ide> }, descending);
<ide> });
<del> var arrayCopy = [];
<del> for (var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }
<del> return arrayCopy.sort(reverseComparator(co... | 1 |
Text | Text | add link to boilerplate glitch file | 24b3bed83ff9e89cbdcd848147a4cd1609bc622b | <ide><path>curriculum/challenges/english/05-apis-and-microservices/basic-node-and-express/meet-the-node-console.english.md
<ide> We recommend to keep the log panel open while working at these challenges. By re
<ide>
<ide> ## Instructions
<ide> <section id='instructions'>
<add>
<add>If you have not already done so, ple... | 1 |
Go | Go | remove perm change in archive | 6bc483fa59adc0be65ea9c804c69d861a02435bd | <ide><path>archive/diff.go
<ide> func ApplyLayer(dest string, layer ArchiveReader) error {
<ide> parent := filepath.Dir(hdr.Name)
<ide> parentPath := filepath.Join(dest, parent)
<ide> if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
<del> err = os.MkdirAll(parentPath, 0700)
<add> err... | 1 |
PHP | PHP | fix magic quotes | 8d169166308972158b380f2f8fb729882216026e | <ide><path>laravel/laravel.php
<ide>
<ide> error_reporting(-1);
<ide>
<add>/*
<add>|--------------------------------------------------------------------------
<add>| Magic Quotes Strip Slashes
<add>|--------------------------------------------------------------------------
<add>|
<add>| Even though "Magic Quotes" are... | 2 |
Python | Python | support new marian models | ba21001f4c6709a72c7a663078677cd5f9e5306b | <ide><path>src/transformers/models/marian/configuration_marian.py
<ide> class MarianConfig(PretrainedConfig):
<ide> def __init__(
<ide> self,
<ide> vocab_size=50265,
<add> decoder_vocab_size=None,
<ide> max_position_embeddings=1024,
<ide> encoder_layers=12,
<ide> encod... | 6 |
Text | Text | add the example for broadcast receiver | 7accf8929bf17fbdc7ecaac733c7df15a8ac61b5 | <ide><path>guide/english/android-development/core-components/index.md
<ide> There are three kinds of services:
<ide> 
<ide>
<ide> ### [Broadcast receivers](https://developer.android.com/guide/components/broadcasts)
<del>A _Broadcast recei... | 1 |
Java | Java | fix failing test | 1a8629d40825c073b6863ae2ab748b647b28506a | <ide><path>spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverter.java
<ide> protected void writeToResult(T t, HttpHeaders headers, Result result) throws IOE
<ide> */
<ide> protected XMLInputFactory createXmlInputFactory() {
<ide> XMLInputFactory inputFactory = XMLInput... | 2 |
PHP | PHP | add test for bigint primary keys in sqlite | d8fac4ef159716ca75196bbd27cbf16906825c9a | <ide><path>lib/Cake/Test/TestCase/Database/Schema/SqliteSchemaTest.php
<ide> public function testColumnSqlPrimaryKey() {
<ide> $this->assertEquals('', $result, 'Integer primary keys are special in sqlite.');
<ide> }
<ide>
<add>/**
<add> * Test generating a bigint column that is a primary key.
<add> *
<add> * @retur... | 1 |
PHP | PHP | add method assertsessionmissing(), fixe | 12a1823803ac007fbd650227c8236ba2915621c1 | <ide><path>src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php
<ide> public function assertSessionHasAll(array $bindings)
<ide> }
<ide> }
<ide>
<add> /**
<add> * Assert that the session has not a given key.
<add> *
<add> * @param string|array $key
<add> * @return void
<... | 1 |
Java | Java | fix javadoc errors | bfdc99ab799f652f33379bf8cc50d0cc5d08fd8a | <ide><path>spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreator.java
<ide> public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
<ide> * FactoryBean will get proxied. This default behavior applies as of Spring 2.0.
<ide> * If you intend to proxy a FactoryB... | 28 |
Javascript | Javascript | remove dead code | 717f24feb43cb71538a7c07e4aa013c916640006 | <ide><path>src/ngMock/angular-mocks.js
<ide> angular.mock.dump = function(object) {
<ide> </pre>
<ide> *
<ide> * Now we setup the mock backend and create the test specs.
<del> *
<add> *
<ide> <pre>
<ide> // testing controller
<ide> describe('MyController', function() {
<ide> angular.mock.dump = function(... | 2 |
Ruby | Ruby | preserve backtrace for download errors | 912a586d15daaa9daf4c4831dc5cc9022acc2b62 | <ide><path>Library/Homebrew/exceptions.rb
<ide> def initialize(formula)
<ide>
<ide> # Raised in Resource.fetch
<ide> class DownloadError < RuntimeError
<del> def initialize(resource, e)
<add> def initialize(resource, cause)
<ide> super <<-EOS.undent
<ide> Failed to download resource #{resource.download_nam... | 1 |
Javascript | Javascript | improve coverage on worker threads | 068efba973001901767ba4354d5bc459fc7d27fc | <ide><path>test/parallel/test-worker-unsupported-things.js
<ide> if (!process.env.HAS_STARTED_WORKER) {
<ide> assert.strictEqual(process.debugPort, before);
<ide> }
<ide>
<add> {
<add> const mask = 0o600;
<add> assert.throws(() => { process.umask(mask); }, {
<add> code: 'ERR_WORKER_UNSUPPORTED_OPERAT... | 1 |
Python | Python | modify some examples | 1220d2d3cae9382338c34f9a0be3a9c116cd63e0 | <ide><path>examples/app/myapp.py
<ide> from celery import Celery
<ide>
<ide> app = Celery('myapp', broker='amqp://guest@localhost//')
<del>
<add># New When celery > 3.1, must specify result_backend
<add>app.conf.CELERY_RESULT_BACKEND = 'amqp'
<ide>
<ide> @app.task()
<ide> def add(x, y):
<ide><path>examples/celery_htt... | 2 |
Javascript | Javascript | use helper for readability" | ff3989572acd50419e5b833776b1d2d0546fa616 | <ide><path>lib/internal/js_stream_socket.js
<ide> const kCurrentWriteRequest = Symbol('kCurrentWriteRequest');
<ide> const kCurrentShutdownRequest = Symbol('kCurrentShutdownRequest');
<ide> const kPendingShutdownRequest = Symbol('kPendingShutdownRequest');
<ide>
<del>function checkReusedHandle(self) {
<del> let socke... | 1 |
Ruby | Ruby | extend cmd_fail to all non-zero exit codes (#595) | 39453691ba3208dbd2e6ce1fd341d430b31dff55 | <ide><path>Library/Homebrew/test/test_integration_cmds.rb
<ide> def cmd(*args)
<ide> def cmd_fail(*args)
<ide> output = cmd_output(*args)
<ide> status = $?.exitstatus
<del> $stderr.puts "\n#{output}" if status != 1
<del> assert_equal 1, status
<add> $stderr.puts "\n#{output}" if status == 0
<add> ... | 1 |
Ruby | Ruby | view path strict type casting | e65d41a47af0c56cb2d60868e6ad2ba01d324d48 | <ide><path>actionview/lib/action_view/lookup_context.rb
<ide> def any?(name, prefixes = [], partial = false)
<ide> # Whenever setting view paths, makes a copy so that we can manipulate them in
<ide> # instance objects as we wish.
<ide> def build_view_paths(paths)
<del> ActionView::PathSet.new(A... | 2 |
Javascript | Javascript | change a test to be relevant in fiber | c6f10e2cee8c0ef6ceddf032ca318960d43820e7 | <ide><path>src/renderers/dom/__tests__/ReactDOMProduction-test.js
<ide> describe('ReactDOMProduction', () => {
<ide> expect(function() {
<ide> class Component extends React.Component {
<ide> render() {
<del> return ['this is wrong'];
<add> return undefined;
<ide> }
<ide> ... | 1 |
Text | Text | shorten troubleshooting wording | c91d0a99e211229bfa6630e7b80895e27fbb2f24 | <ide><path>CONTRIBUTING.md
<ide> Contributing to Homebrew
<ide>
<ide> Reporting Bugs
<ide> --------------
<del>Please run:
<add>First, please run `brew update` and `brew doctor`.
<ide>
<del>* `brew update`
<del>* `brew doctor`
<del>
<del>Please read:
<del>
<del>* [Troubleshooting Checklist](https://github.com/Homebre... | 1 |
Text | Text | add the text "indexed array" in example comment | 6ac087f16b597780dedd9649eedb633359e4d13c | <ide><path>client/src/pages/guide/english/php/array/index.md
<ide> Here is an example:
<ide> ```
<ide> <?php
<ide> // array without keys
<add>// This array is also an example of "indexed array"
<ide> $bikes = array("Suzuki","BMW","Yamaha");
<ide> echo "I like " . $bikes[0] . ", " . $bikes[1] . " and " . $bikes[2] . "."... | 1 |
Python | Python | fix creation for floating ips | ba21cf38629424e6c0f1d67adc0874c72fc1557c | <ide><path>libcloud/common/openstack.py
<ide> def parse_error(self):
<ide> context = self.connection.context
<ide> driver = self.connection.driver
<ide> key_pair_name = context.get('key_pair_name', None)
<del>
<ide> if len(values) > 0 and values[0]['code'] == 404 and key_... | 2 |
Go | Go | remove pools_nopool.go & build tag from pools.go | f01d755cd0af7b17596cc084871f7f032995cac3 | <ide><path>pkg/pools/pools.go
<del>// +build go1.3
<del>
<ide> // Package pools provides a collection of pools which provide various
<ide> // data types with buffers. These can be used to lower the number of
<ide> // memory allocations and reuse buffers.
<ide><path>pkg/pools/pools_nopool.go
<del>// +build !go1.3
<del>
... | 2 |
Javascript | Javascript | add common.mustcall test-dgram-listen-after-bind | eecf100049dd2d3ce6e4864a553cca43561a6a91 | <ide><path>test/parallel/test-dgram-listen-after-bind.js
<ide>
<ide> 'use strict';
<ide> require('../common');
<add>const common = require('../common');
<ide> const assert = require('assert');
<ide> const dgram = require('dgram');
<ide>
<ide> const timer = setTimeout(() => {
<ide> socket.close();
<ide> }, 100);
<id... | 1 |
Javascript | Javascript | avoid turbo cache miss on root package change | ec7609e28831429745ff5f93b201bcdd25056ede | <ide><path>scripts/normalize-version-bump.js
<ide> const writeJson = async (filePath, data) =>
<ide> await normalizeVersions(path.join(cwd, 'lerna.json'))
<ide> await fs.unlink(path.join(cwd, 'pnpm-lock.yaml'))
<ide> await fs.writeFile(path.join(cwd, 'pnpm-lock.yaml'), '')
<add>
<add> const rootPkgJsonPath = pat... | 2 |
Javascript | Javascript | avoid regex in istypedarray | c8768d12f2f0b31f9ac971aeac6d2c17c9ff3db5 | <ide><path>src/Angular.js
<ide> function isPromiseLike(obj) {
<ide> }
<ide>
<ide>
<del>var TYPED_ARRAY_REGEXP = /^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/;
<add>var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64... | 1 |
Python | Python | add batch_set_value for faster tf weight loading | 5dad3786f6a34c15ce11ee862bab7a59ed713d68 | <ide><path>keras/backend/tensorflow_backend.py
<ide> def set_value(x, value):
<ide> tf.assign(x, np.asarray(value)).op.run(session=get_session())
<ide>
<ide>
<add>def batch_set_value(tuples):
<add> '''Sets the values of many tensor variables at once.
<add>
<add> # Arguments
<add> tuples: a list of tu... | 3 |
Python | Python | fix denormal linspace test for longdouble | 9df4a528b57d0d95d84132394178e65ba2683159 | <ide><path>numpy/core/tests/test_function_base.py
<ide> from __future__ import division, absolute_import, print_function
<ide>
<del>from numpy import (logspace, linspace, geomspace, dtype, array, finfo,
<del> typecodes, arange, isnan, ndarray, sqrt)
<add>from numpy import (logspace, linspace, geomspa... | 1 |
Ruby | Ruby | move updater mock into test class namespace | 65673d60c1ee8aa5c4776bef0dd4fa9d95f81474 | <ide><path>Library/Homebrew/test/test_updater.rb
<ide> require 'cmd/update'
<ide> require 'yaml'
<ide>
<del>class UpdaterMock < Updater
<del> def in_repo_expect(cmd, output = '')
<del> @outputs ||= Hash.new { |h,k| h[k] = [] }
<del> @expected ||= []
<del> @expected << cmd
<del> @outputs[cmd] << output
<d... | 1 |
Text | Text | add socket.io guide | 12f7405781fb623e80af40c9e3a3e16965cab46f | <ide><path>README.md
<ide> for authentication with single page applications. If you insist on using
<ide> a client-side framework, it's best if you use a boilerplate of choice for your particular
<ide> client-side framework and just grab the pieces you need from the Hackathon Starter.
<ide>
<del>HOW IT WORKS (mini gui... | 1 |
Python | Python | handle none scores in evaluate printer | 26bf642afd6ddb496846dad9283b195897afe30b | <ide><path>spacy/cli/evaluate.py
<ide> def render_parses(
<ide> def print_prf_per_type(
<ide> msg: Printer, scores: Dict[str, Dict[str, float]], name: str, type: str
<ide> ) -> None:
<del> data = [
<del> (k, f"{v['p']*100:.2f}", f"{v['r']*100:.2f}", f"{v['f']*100:.2f}")
<del> for k, v in scores.ite... | 2 |
Python | Python | update boto3 to latest | dad318e2b2ce7946b46c6c5aa6031489202abad1 | <ide><path>setup.py
<ide> def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
<ide> 'oss2>=2.14.0',
<ide> ]
<ide> amazon = [
<del> 'boto3>=1.15.0,<1.19.0',
<add> 'boto3>=1.15.0,<2.0.0',
<ide> 'watchtower~=2.0.1',
<ide> 'jsonpath_ng>=1.5.3',
<ide> 'redshift_connector~=2... | 1 |
Text | Text | add git clone step to readmes | 7a98aeae189680d9a4e37cbb87c302488fc993ee | <ide><path>Examples/Movies/README.md
<ide> The Movies app is a demonstration of basic concepts, such as fetching data, rend
<ide>
<ide> Before running the app, make sure you ran:
<ide>
<add> git clone https://github.com/facebook/react-native.git
<ide> cd react-native
<ide> npm install
<ide>
<ide><path>Exa... | 2 |
Javascript | Javascript | fix renderer.render check camera bug | 8f1a4323de3b53700e6cd01d1e9aa25011ff8726 | <ide><path>src/renderers/WebGLRenderer.js
<ide> function WebGLRenderer( parameters ) {
<ide> // Rendering
<ide>
<ide> this.render = function ( scene, camera, renderTarget, forceClear ) {
<del>
<del> if ( camera !== undefined && camera.isCamera !== true ) {
<add> if ( ! ( camera && camera.isCamera ) ) {
<ide>
<ide... | 1 |
Python | Python | set version to v2.1.0a7.dev12 | 07617b6b7fddbfb5177813c2e6ecbee691b073cb | <ide><path>spacy/about.py
<ide> # fmt: off
<ide>
<ide> __title__ = "spacy-nightly"
<del>__version__ = "2.1.0a7.dev11"
<add>__version__ = "2.1.0a7.dev12"
<ide> __summary__ = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"
<ide> __uri__ = "https://spacy.io"
<ide> __author__ = "Explosion AI... | 1 |
Go | Go | add chroot for tar packing operations | 3029e765e241ea2b5249868705dbf9095bc4d529 | <ide><path>daemon/archive.go
<ide> func extractArchive(i interface{}, src io.Reader, dst string, opts *archive.TarO
<ide> return chrootarchive.UntarWithRoot(src, dst, opts, root)
<ide> }
<ide>
<del>func archivePath(i interface{}, src string, opts *archive.TarOptions) (io.ReadCloser, error) {
<add>func archivePath(i i... | 7 |
Javascript | Javascript | add abortcontroller to eslint globals | 2aab894acf83732591de861ee29f3ddbd25546c4 | <ide><path>packages/eslint-config-react-native-community/index.js
<ide> module.exports = {
<ide> __DEV__: true,
<ide> __dirname: false,
<ide> __fbBatchedBridgeConfig: false,
<add> AbortController: false,
<ide> alert: false,
<ide> cancelAnimationFrame: false,
<ide> cancelIdleCallback: false, | 1 |
Ruby | Ruby | generalise the untap step so we can add to update | d388c4386335390d1c57dc1f9857bbf373781f18 | <ide><path>Library/Homebrew/cmd/untap.rb
<ide> def untap
<ide>
<ide> raise "No such tap!" unless tapd.directory?
<ide>
<del> gitignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue []
<add> files = []
<add> tapd.find_formula{ |file| files << Pathname.new("#{user}-#{repo}").join(file) }
<ad... | 1 |
PHP | PHP | add some test for _basename() | 56271d933344f2a6489ab5ef7f946e0c067d97a9 | <ide><path>src/Filesystem/File.php
<ide> public function name()
<ide> $this->info();
<ide> }
<ide> if (isset($this->info['extension'])) {
<del> return $this->_basename($this->name, '.' . $this->info['extension']);
<add> return static::_basename($this->name, '.' . $this-... | 2 |
Python | Python | change int to enum | 50d866a5541e1fcc4ff1ceeab172cccc31af7e46 | <ide><path>tests/providers/trino/hooks/test_trino.py
<ide> TRINO_DBAPI_CONNECT = 'airflow.providers.trino.hooks.trino.trino.dbapi.connect'
<ide>
<ide>
<del>class TestTrinoHookConn(unittest.TestCase):
<add>class TestTrinoHookConn:
<ide> @patch(BASIC_AUTHENTICATION)
<ide> @patch(TRINO_DBAPI_CONNECT)
<ide> @... | 1 |
Javascript | Javascript | fix boolean logic error in view helper assert | 625e38267861b3e6e3281808c833ef7f668d543a | <ide><path>packages/ember-handlebars/lib/helpers/view.js
<ide> Ember.Handlebars.ViewHelper = Ember.Object.create({
<ide> var viewOptions = {};
<ide>
<ide> if (fn) {
<del> ember_assert("You cannot provide a template block if you also specified a templateName", !(get(viewOptions, 'templateName')) && !(newVi... | 1 |
Python | Python | mimic the statsd headers | 3768827a8e78531ca9fe10e715e26f26b67ea575 | <ide><path>airflow/settings.py
<ide>
<ide> class DummyStatsLogger(object):
<ide> @classmethod
<del> def incr(cls):
<add> def incr(cls, stat, count=1, rate=1):
<ide> pass
<ide> @classmethod
<del> def decr(cls):
<add> def decr(cls, stat, count=1, rate=1):
<ide> pass
<ide> @classme... | 1 |
Javascript | Javascript | flow type improvements to accept co-variant types | b7d873b1a07c863a96d8a9a494f699fdc81ede9c | <ide><path>Libraries/Lists/ListView/ListViewDataSource.js
<ide> class ListViewDataSource {
<ide> * this function as the `dataBlob`.
<ide> */
<ide> cloneWithRows(
<del> dataBlob: Array<any> | {[key: string]: any},
<del> rowIdentities: ?Array<string>
<add> dataBlob: $ReadOnlyArray<any> | {+[key... | 1 |
PHP | PHP | remove unused namespace | 359747b019fede505c0f19e9b9bcfc161c10e090 | <ide><path>tests/Cache/CacheRepositoryTest.php
<ide> <?php
<ide>
<ide> use Mockery as m;
<del>use Illuminate\Cache\ArrayStore;
<ide>
<ide> class CacheRepositoryTest extends PHPUnit_Framework_TestCase {
<ide> | 1 |
Ruby | Ruby | fix rubocop warnings | ba852444131d021b1190cb670b038b78818229fb | <ide><path>Library/Homebrew/language/python_virtualenv_constants.rb
<del>PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz"
<del>PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d... | 1 |
Ruby | Ruby | remove dead code | 3d6552f8e3a4f3d85c6856f62feb71b999b5afb7 | <ide><path>Library/Homebrew/cmd/--config.rb
<ide> def dump_verbose_config
<ide> end
<ide>
<ide> def dump_c1
<del> stuff = []
<ide> print "#{HOMEBREW_PREFIX}-#{HOMEBREW_VERSION} "
<ide> print MACOS_FULL_VERSION
<ide> print "-#{kernel}" if MacOS.version < :lion | 1 |
Javascript | Javascript | fix modal showing when challenge already completed | f1b29a6fd1b99d0767660281179a4ed797b9c05a | <ide><path>client/commonFramework.js
<ide> editor.setOption('extraKeys', {
<ide> }
<ide> },
<ide> 'Ctrl-Enter': function() {
<add> isInitRun = false;
<ide> bonfireExecute(true);
<ide> return false;
<ide> }
<ide> var testSuccess = function() {
<ide> if (goodTests === tests.length) {
<ide> retu... | 1 |
PHP | PHP | get router in function | bd9cd7703fe5d745af764ba1c5ac25bd70ed99e2 | <ide><path>src/Illuminate/Broadcasting/BroadcastManager.php
<ide> public function routes()
<ide>
<ide> $router = $this->app['router'];
<ide>
<del> $router->group(['middleware' => ['web']], function () {
<add> $router->group(['middleware' => ['web']], function ($router) {
<ide> $route... | 1 |
Text | Text | fix typos in step 66 of new js rbg project | 5b229e4f526063728b4867a4c2f9d22bd106490c | <ide><path>curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c1154d3ae11aee80353f.md
<ide> You should access the first element of the `button functions` property of the `l
<ide> assert.match(update.toString(), /location\[('|")button ... | 1 |
Javascript | Javascript | fix minimum values for writeint*() functions | 5d0b5a00aac6589091dce4345612d3fccb3c430c | <ide><path>lib/buffer.js
<ide> Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
<ide> assert.ok(offset < buffer.length,
<ide> 'Trying to write beyond buffer length');
<ide>
<del> verifsint(value, 0x7f, -0xf0);
<add> verifsint(value, 0x7f, -0x80);
<ide> }
<ide>
<ide> if (value >= ... | 2 |
PHP | PHP | add updateorcreate() function | 74c1b8027b5128026905bb9e49b7e77667b7ba34 | <ide><path>src/Illuminate/Database/Eloquent/Model.php
<ide> public static function firstOrNew(array $attributes)
<ide> return new static($attributes);
<ide> }
<ide>
<add> /**
<add> * Create or update a record matching the attributes, and fill it with values.
<add> *
<add> * @param array $attributes
<add> * @par... | 1 |
PHP | PHP | fix 12pm not validating with string data | 2716bcb81b3bc94368e30aafa6a7723bf8bb5620 | <ide><path>src/Validation/Validation.php
<ide> protected static function _getDateString($value)
<ide>
<ide> if (isset($value['hour'])) {
<ide> if (isset($value['meridian'])) {
<del> if ($value['hour'] === 12) {
<add> if ((int)$value['hour'] === 12) {
<ide> ... | 2 |
PHP | PHP | add setter and getter for autorender flag | 0b6e5ad7b5cdfec917c42f0dfabd73a85f76e01f | <ide><path>src/Controller/Controller.php
<ide> class Controller implements EventListenerInterface, EventDispatcherInterface
<ide> *
<ide> * @var bool
<ide> */
<del> public $autoRender = true;
<add> protected $autoRender = true;
<ide>
<ide> /**
<ide> * Instance of ComponentRegistry used to... | 3 |
Text | Text | update translation selection-sort | dcb03cbbf0b52bb2f2d1e0c88270f00ae8068bd0 | <ide><path>guide/portuguese/algorithms/sorting-algorithms/selection-sort/index.md
<ide> ---
<ide> title: Selection Sort
<del>localeTitle: Seleção de seleção
<add>localeTitle: Ordenação por Seleção
<ide> ---
<del>## Seleção de seleção
<add>## Ordenação por Seleção
<ide>
<del>A seleção de classificação é um dos algoritm... | 1 |
Python | Python | remove the `__reduce__` tests | f3fd03f37044930eb04c0625ad54ef58306a5576 | <ide><path>numpy/typing/tests/test_generic_alias.py
<ide> class TestGenericAlias:
<ide> ("__origin__", lambda n: n.__origin__),
<ide> ("__args__", lambda n: n.__args__),
<ide> ("__parameters__", lambda n: n.__parameters__),
<del> ("__reduce__", lambda n: n.__reduce__()[1][:3]),
<del> ... | 1 |
PHP | PHP | add additional test for get() with uuid | 0719af87ee426cf214dfc581e288def120bf5cbb | <ide><path>tests/TestCase/ORM/TableUuidTest.php
<ide> public function testSaveUpdate($tableName)
<ide> $this->assertEquals($entity->toArray(), $row->toArray());
<ide> }
<ide>
<add> /**
<add> * Test delete with string pk.
<add> *
<add> * @dataProvider uuidTableProvider
<add> * @return voi... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.