original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Add dependent => nullify to display_fomat Apply this change to `app/models/display_format.rb` and return the full updated file. ```ruby class DisplayFormat < ActiveRecord::Base attr_accessible :name has_many :categorical_traits has_many :continuous_traits def format_value(value) case name when 'inte...
```ruby class DisplayFormat < ActiveRecord::Base attr_accessible :name has_many :categorical_traits, :dependent => :nullify has_many :continuous_traits, :dependent => :nullify def format_value(value) case name when 'integer' value = Integer(value) when 'float' value = Float(value...
null
null
Rearrange cron in UI to correspond to the actual order of work Apply this change to `public/include/config/monitor_crons.inc.php` and return the full updated file. ```php <?php // Small helper array that may be used on some page controllers to // fetch the crons we wish to monitor $aMonitorCrons = array('statistics'...
```php <?php // Small helper array that may be used on some page controllers to // fetch the crons we wish to monitor switch ($config['payout_system']) { case 'pplns': $sPayoutSystem = $config['payout_system'] . '_payout'; break; case 'pps': $sPayoutSystem = $config['payout_system'] . '_payout'; br...
null
null
feat: Fix use search parse error Apply this change to `src/commons/hooks/useSearch.ts` and return the full updated file. ```typescript import useUrlState, { Options } from '@ahooksjs/use-url-state' interface ExtOptions<T> { arrayNames?: string[] numberNames?: string[] booleanNames?: string[] } export function...
```typescript import useUrlState, { Options } from '@ahooksjs/use-url-state' interface ExtOptions<T> { arrayNames?: string[] numberNames?: string[] booleanNames?: string[] } export function useSearch<T>(initialState?: T, options?: Options & ExtOptions<T>) { const { arrayNames, numberNames, booleanNames, ...ta...
null
null
Use a shorter issuer/subject key due to mysql limitations Apply this change to `resources/butterflynet/migrations/V1__Initial_schema.sql` and return the full updated file. ```sql CREATE TABLE user ( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(64) NOT NULL, issuer VARCHAR(256) NOT NULL, subject...
```sql CREATE TABLE user ( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(64) NOT NULL, issuer VARCHAR(100) NOT NULL, subject VARCHAR(100) NOT NULL, name TEXT NOT NULL, email TEXT NOT NULL, UNIQUE issuer_subject_unique (issuer, subject) ); CREATE TABLE capture ( id BIGINT NOT NULL ...
null
null
Remove old versions before testing Apply this change to `examples/weather/genbindings.sh` and return the full updated file. ```bash PYTHONPATH=../.. export PYTHONPATH URI='http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl' PREFIX='weather' WSDL="${PREFIX}.wsdl" if [ ! -f ${WSDL} ] ; then wget -O ${WSDL} "${URI}" fi ...
```bash PYTHONPATH=../.. export PYTHONPATH URI='http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl' PREFIX='weather' WSDL="${PREFIX}.wsdl" if [ ! -f ${WSDL} ] ; then wget -O ${WSDL} "${URI}" fi rm -rf raw weather.pyc weather.py mkdir -p raw touch raw/__init__.py ../../scripts/pyxbgen \ -m "${PREFIX}" \ -W "${WSDL...
null
null
Remove commented out old logic Apply this change to `util/logger.go` and return the full updated file. ```go package util import ( "fmt" "io" "log" "os" ) // Create a logger with the given prefix func CreateLogger(prefix string) *log.Logger { return CreateLoggerWithWriter(os.Stderr, prefix) // return log.New(...
```go package util import ( "fmt" "io" "log" "os" ) // Create a logger with the given prefix func CreateLogger(prefix string) *log.Logger { return CreateLoggerWithWriter(os.Stderr, prefix) } // CreateLoggerWithWriter Create a lgogger around the given output stream and prefix func CreateLoggerWithWriter(writer i...
null
null
Correct 'message status' nav label Apply this change to `app/main/views/sub_navigation_dictionaries.py` and return the full updated file. ```python def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", ...
```python def features_nav(): return [ { "name": "Features", "link": "main.features", }, { "name": "Emails", "link": "main.features_email", }, { "name": "Text messages", "link": "main.features_sms", ...
null
null
Update installation script for LaTeX Apply this change to `setup-scripts/latex.sh` and return the full updated file. ```bash #!/bin/bash echo echo "Installing texlive" sudo pacman -S texlive-{bibtexextra,bin,core,fontsextra,formatsextra,langextra,latexextra,pictures,science} biber echo "Installing auctex" sudo pac...
```bash #!/bin/bash echo echo "Installing texlive" sudo pacman -S texlive-{bibtexextra,bin,core,fontsextra,formatsextra,langextra,latexextra,pictures,science,publishers} biber echo "Installing auctex" sudo pacman -S auctex ```
null
null
Allow skipping publish of package when fixing docs. Apply this change to `res/scripts/appveyor.cake` and return the full updated file. ```csharp public sealed class AppVeyorSettings { public bool IsLocal { get; set; } public bool IsRunningOnAppVeyor { get; set; } public bool IsPullRequest { get; set; } ...
```csharp public sealed class AppVeyorSettings { public bool IsLocal { get; set; } public bool IsRunningOnAppVeyor { get; set; } public bool IsPullRequest { get; set; } public bool IsDevelopBranch { get; set; } public bool IsMasterBranch { get; set; } public bool IsTaggedBuild { get; set; } ...
null
null
Add a function to extract the device model number from the OS itself. Apply this change to `Sources/Device.swift` and return the full updated file. ```swift // // Device // Device // // Created by Bojan Dimovski on 21.11.16. // Copyright (c) 2016 Bojan Dimovski. // // Permission is hereby granted, free of charge, to ...
```swift // // Device // Device // // Created by Bojan Dimovski on 21.11.16. // Copyright (c) 2016 Bojan Dimovski. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, i...
null
null
Add custom color for Picker's Nav Bar Background If setting your app's color scheme in AppDelegate, this picker will not conform to a chosen pickerStyle. This proposed change would allow you to set a custom color when presenting the picker. Apply this change to `GBHFacebookImagePicker/Classes/Controller/GBHFacebookIm...
```swift // // GBHFacebookImagePicker.swift // GBHFacebookImagePicker // // Created by Florian Gabach on 09/10/2016. // Copyright (c) 2016 Florian Gabach <contact@floriangabach.fr> import UIKit public class GBHFacebookImagePicker: NSObject { // Picker configuration settings public static var pickerConfig...
null
null
Remove "-f" from "docker tag" (deprecated in Docker 1.10, removed in 1.12+) Apply this change to `docker/build.sh` and return the full updated file. ```bash #!/bin/bash set -e cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( */ ) if [ ${#versions[@]} -eq 0 ]; then versions=( */ ) fi versions=( "${version...
```bash #!/bin/bash set -e cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( */ ) if [ ${#versions[@]} -eq 0 ]; then versions=( */ ) fi versions=( "${versions[@]%/}" ) image='tianon/docker-master' for version in "${versions[@]}"; do docker build -t "$image:$version" --pull "$version" docker build -t "$im...
null
null
Set curation concerns working path from UPLOAD_PATH environment variable Apply this change to `config/initializers/curation_concerns.rb` and return the full updated file. ```ruby CurationConcerns.configure do |config| # Location on local file system where derivatives will be stored. # If you use a multi-server ar...
```ruby CurationConcerns.configure do |config| # Location on local file system where derivatives will be stored. # If you use a multi-server architecture, this MUST be a shared volume. config.derivatives_path = ENV['DERIVATIVES_PATH'] || File.join(Rails.root, 'tmp', 'derivatives') # Location on local file syst...
null
null
Implement `type` in terms of `destructure`. Apply this change to `Manifold/Elaborated.swift` and return the full updated file. ```swift // Copyright © 2015 Rob Rix. All rights reserved. public enum Elaborated<Term: TermType>: TermContainerType { indirect case Unroll(Term, Expression<Elaborated>) /// Construct an...
```swift // Copyright © 2015 Rob Rix. All rights reserved. public enum Elaborated<Term: TermType>: TermContainerType { indirect case Unroll(Term, Expression<Elaborated>) /// Construct an elaborated term by coiteration. public static func coiterate(elaborate: Term throws -> Expression<Term>)(_ seed: Term) rethrows...
null
null
Add permission to manage mailblock. Apply this change to `code/extensions/MailblockSiteConfig.php` and return the full updated file. ```php <?php /** * TODO * * @package silverstripe-mailblock * @subpackage extensions */ class MailblockSiteConfig extends DataExtension { private static $db = array( 'Mailbloc...
```php <?php /** * Adds a mailblock section to the 'Settings' section of the CMS. * * @package silverstripe-mailblock * @subpackage extensions */ class MailblockSiteConfig extends DataExtension implements PermissionProvider { private static $db = array( 'MailblockEnabled' => 'Boolean', ); public function u...
null
null
Update data chart controller to use route params Apply this change to `public/app/project-detail/data-visualization/data-chart-controller.js` and return the full updated file. ```javascript define(function() { var DataChartController = function($rootScope, $q, HubResource, HubSelectionService) { var self ...
```javascript define(function() { var DataChartController = function($rootScope, $routeParams, HubResource, HubSelectionService) { var self = this this.isLoaded = false // Fake promise to get around ig data source this.dataChart = HubResource.listDataPoints() // Load data o...
null
null
Disable metadata for android publications Apply this change to `buildSrc/src/main/kotlin/publishing/KotlinTargetsMavenPublications.kt` and return the full updated file. ```kotlin /* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ @file:Suppress("Packa...
```kotlin /* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ @file:Suppress("PackageDirectoryMismatch") import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.androidJvm import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.common import o...
null
null
Fix the drop harvest event Apply this change to `src/main/java/com/techern/minecraft/melonblockdrop/MelonBlockHarvestEventHandler.java` and return the full updated file. ```java package com.techern.minecraft.melonblockdrop; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftfo...
```java package com.techern.minecraft.melonblockdrop; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; /** * An event handler for when breaking {@link net.minecraft.block.BlockMel...
null
null
Update default char limit for project description Apply this change to `azkaban-sql/src/sql/create.projects.sql` and return the full updated file. ```sql CREATE TABLE projects ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(64) NOT NULL, active BOOLEAN, modified_time BIGINT NOT NULL, create_time BIGI...
```sql CREATE TABLE projects ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(64) NOT NULL, active BOOLEAN, modified_time BIGINT NOT NULL, create_time BIGINT NOT NULL, version INT, last_modified_by VARCHAR(64) NOT NULL, description VARCHAR(2048), enc_type TINYINT, settings_blob LONGBLOB, UNIQUE IND...
null
null
Fix NPE in `RsGeneratedSourceFilter` on 2019.3 Apply this change to `src/main/kotlin/org/rust/ide/navigation/goto/RsGeneratedSourcesFilter.kt` and return the full updated file. ```kotlin /* * Use of this source code is governed by the MIT license that can be * found in the LICENSE file. */ package org.rust.ide.na...
```kotlin /* * Use of this source code is governed by the MIT license that can be * found in the LICENSE file. */ package org.rust.ide.navigation.goto import com.intellij.openapi.project.Project import com.intellij.openapi.roots.GeneratedSourcesFilter import com.intellij.openapi.vfs.VirtualFile import com.intellij...
null
null
Use URLConnection.getContentLengthLong now that we don't support Java-6 Signed-off-by: Peter Ansell <aaf1ec639befe0a570b950d5d6cbd0c6638a063e@yahoo.com> Apply this change to `core/src/main/java/com/github/jsonldjava/utils/JarCacheResource.java` and return the full updated file. ```java package com.github.jsonldjava....
```java package com.github.jsonldjava.utils; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import org.apache.http.client.cache.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JarCacheResource implements Resource { priv...
null
null
PP9-8544: Make action button configurable implementation Apply this change to `src/picturepark-sdk-v1-angular/projects/picturepark-sdk-v1-angular-ui/src/lib/configuration.ts` and return the full updated file. ```typescript import { InjectionToken } from '@angular/core'; export interface ConfigActions { [key: str...
```typescript import { InjectionToken } from '@angular/core'; export interface ConfigActions { [key: string]: boolean } export interface PictureparkUIConfiguration { 'ContentBrowserComponent': ConfigActions, 'BasketComponent': ConfigActions } export const PICTUREPARK_UI_CONFIGURATION = new InjectionToken...
null
null
Remove the test for deleted endpoint Apply this change to `test/runner.js` and return the full updated file. ```javascript "use strict"; require('should'); var wordpressLib = require(__dirname + '/../lib/wordpress.js'); describe('Wordpressorg', function () { describe('getYoastAnalysis', function () { var blog...
```javascript "use strict"; require('should'); var wordpressLib = require(__dirname + '/../lib/wordpress.js'); describe('Wordpressorg', function () { }); ```
null
null
Use =delete to disallow copy Apply this change to `Ndapi/Ndapi.h` and return the full updated file. ```c #pragma once #include <ORATYPES.H> using namespace System; using namespace System::Runtime::InteropServices; namespace Ndapi { [Serializable] public ref class NdapiException : public Exception { ...
```c #pragma once #include <ORATYPES.H> using namespace System; using namespace System::Runtime::InteropServices; namespace Ndapi { [Serializable] public ref class NdapiException : public Exception { private: long _status; public: property long Status { long get() { ret...
null
null
Clear the test configurations before adding new ones. Apply this change to `modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/TestDirective.kt` and return the full updated file. ```kotlin package com.beust.kobalt import com.beust.kobalt.api.Project import com.beust.kobalt.api.annotation.Directive class Tes...
```kotlin package com.beust.kobalt import com.beust.kobalt.api.Project import com.beust.kobalt.api.annotation.Directive class TestConfig(val project: Project) { val testArgs = arrayListOf<String>() val jvmArgs = arrayListOf<String>() val testIncludes = arrayListOf("**/*Test.class") val testExcludes = ...
null
null
Use interface{} instead of error Apply this change to `tracing/spanError.go` and return the full updated file. ```go package tracing import "bytes" // SpanError is a simple slice of Spans that implements error. To be meaningful, // at least (1) Span in the slice must have an error. type SpanError []Span func (se ...
```go package tracing import "bytes" // SpanError is a simple slice of Spans that implements error. To be meaningful, // at least (1) Span in the slice must have an error. type SpanError []Span func (se SpanError) String() string { return se.Error() } // Spans implements the Spanned interface, making it convenien...
null
null
[core] Update class in com.b2international.snowowl.core bundle Apply this change to `core/com.b2international.snowowl.core/src/com/b2international/snowowl/core/api/ITreeComponent.java` and return the full updated file. ```java /* * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the A...
```java /* * Copyright 2011-2016 B2i Healthcare Pte Ltd, http://b2i.sg * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless...
null
null
Add uniqueness index for follows Apply this change to `lib/generators/partisan/templates/migration.rb` and return the full updated file. ```ruby class AddFollowsMigration < ActiveRecord::Migration def up create_table :follows do |t| t.references :followable, polymorphic: true t.references :follower,...
```ruby class AddFollowsMigration < ActiveRecord::Migration def up create_table :follows do |t| t.references :followable, polymorphic: true t.references :follower, polymorphic: true t.timestamps null: false end add_index :follows, ['follower_id', 'follower_type'], name: 'index_partisan...
null
null
Update the SQL migration script Apply this change to `awa/db/migrate/awa-1.0-migrate.sql` and return the full updated file. ```sql ALTER TABLE awa_blog ADD COLUMN `url` VARCHAR(255) BINARY NOT NULL; ALTER TABLE awa_post CHANGE `text` `text` TEXT NOT NULL; ALTER TABLE awa_question CHANGE `description` `description` T...
```sql ALTER TABLE awa_blog ADD COLUMN `url` VARCHAR(255) BINARY NOT NULL; ALTER TABLE awa_post CHANGE `text` `text` TEXT NOT NULL; ALTER TABLE awa_question CHANGE `description` `description` TEXT NOT NULL; ALTER TABLE awa_answer CHANGE `answer` `answer` TEXT NOT NULL; ALTER TABLE awa_comments CHANGE `date` `create_d...
null
null
Put update to UserDefaults on main thread. Apply this change to `Frameworks/Account/CloudKit/CKContainer+Extensions.swift` and return the full updated file. ```swift // // CKContainer+Extensions.swift // Account // // Created by Maurice Parker on 4/4/20. // Copyright © 2020 Ranchero Software, LLC. All rights rese...
```swift // // CKContainer+Extensions.swift // Account // // Created by Maurice Parker on 4/4/20. // Copyright © 2020 Ranchero Software, LLC. All rights reserved. // import Foundation import CloudKit extension CKContainer { private static let userRecordIDKey = "cloudkit.server.userRecordID" var userRecord...
null
null
Move gyro to class scope. Apply this change to `src/navx_test.cc` and return the full updated file. ```cpp #include <chrono> #include <iostream> #include <thread> #include "AHRS.h" #include "WPILib.h" /* * This program is used to measure the frequency of NavX errors. * * It prints a stream of millisecond timesta...
```cpp #include <chrono> #include <iostream> #include <thread> #include "AHRS.h" #include "WPILib.h" /* * This program is used to measure the frequency of NavX errors. * * It prints a stream of millisecond timestamps corresponding to the last good * sensor read. Any errors noted by the NavX library are printed to...
null
null
Fix migration to retain the previous municipality Apply this change to `db/changes/131_replace_company_municipality_name_and_number_with_id.sql` and return the full updated file. ```sql -- Add field for municipality ID in company table. ALTER TABLE company ADD CompanyMunicipalityID INT(11); -- Populate this field wi...
```sql -- Add field for municipality ID in company table. ALTER TABLE company ADD CompanyMunicipalityID INT(11); -- Add municipality if not existing in the kommune table REPLACE INTO kommune (KommuneNumber, KommuneName, Sone) SELECT CompanyMunicipality, CompanyMunicipalityName, 1 FROM company WHERE CompanyMunicipality...
null
null
Add planning and template getKeywords function Apply this change to `src/main/java/com/google/sps/servlets/SearchServlet.java` and return the full updated file. ```java // Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance ...
```java // Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
null
null
Improve sb init for svelte Apply this change to `lib/cli/src/generators/SVELTE/index.ts` and return the full updated file. ```typescript import { baseGenerator, Generator } from '../baseGenerator'; const generator: Generator = async (packageManager, npmOptions, options) => { baseGenerator(packageManager, npmOption...
```typescript import fse from 'fs-extra'; import { logger } from '@storybook/node-logger'; import { baseGenerator, Generator } from '../baseGenerator'; const generator: Generator = async (packageManager, npmOptions, options) => { await baseGenerator(packageManager, npmOptions, options, 'svelte', { extraPackages...
null
null
Check for permission in apq Apply this change to `utils/decorators/require.py` and return the full updated file. ```python import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign def require(resource_namespace, permissions, resource_id=None): ...
```python import json import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign from utils.exceptions import HttpUnauthorized def require(resource_namespace, permissions, resource_id=None): def decorator(f): @wraps(f) def decorated_functi...
null
null
Fix FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t' Apply this change to `scattertext/frequencyreaders/DefaultBackgroundFrequencies.py` and return the full updated file. ```python import pkgutil from io import StringIO import pandas as pd from scipy.stats import rankdata class Backg...
```python import pkgutil from io import StringIO import pandas as pd from scipy.stats import rankdata class BackgroundFrequencies(object): @staticmethod def get_background_frequency_df(frequency_path=None): raise Exception @classmethod def get_background_rank_df(cls, frequency_path=None): ...
null
null
Use imports from main file Apply this change to `src/test.ts` and return the full updated file. ```typescript import Course from './Course'; import { generateCourses } from './CourseGenerator'; import { parseCourses } from './CourseParser'; for (let i = 0; i < 100; i++) { const sample = [...generateCourses(5)]; ...
```typescript import { generateCourses, parseCourses, Course } from './main'; for (let i = 0; i < 100; i++) { const sample = [...generateCourses(5)]; const parsedCourses = parseCourses(sample); const possibleCombinations = Course.possibleSectionCombinations(parsedCourses); if (possibleCombinations.s...
null
null
Remove & re-create output directory for CI builds Apply this change to `.travis/publish.sh` and return the full updated file. ```bash #!/usr/bin/env sh # CI publish script export DITA_HOME=$PWD/dita-ot-$DITA_OT_VERSION export DITA_OT_DEV=$(find $PWD -name 'dita-ot-*+*' -type d | head -1) export SITE_DIR=$PWD/dita-o...
```bash #!/usr/bin/env sh # CI publish script export DITA_HOME=$PWD/dita-ot-$DITA_OT_VERSION export DITA_OT_DEV=$(find $PWD -name 'dita-ot-*+*' -type d | head -1) export SITE_DIR=$PWD/dita-ot.github.io #if [ "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_BRANCH" = "develop" ]; then # Remove target output directory b...
null
null
Add some default values for 2.2.9-2.2.10 scheme Apply this change to `setup/db/db/schema-229to2210.sql` and return the full updated file. ```sql --; -- Schema upgrade from 2.2.9 to 2.2.10; --; ALTER TABLE `cloud`.`account` ADD COLUMN `network_domain` varchar(255); ALTER TABLE `cloud`.`domain` ADD COLUMN `networ...
```sql --; -- Schema upgrade from 2.2.9 to 2.2.10; --; ALTER TABLE `cloud`.`account` ADD COLUMN `network_domain` varchar(255); ALTER TABLE `cloud`.`domain` ADD COLUMN `network_domain` varchar(255); INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'use.external.dns', 'false', 'B...
null
null
Remove some functions that not use Apply this change to `src/aguin/model/app.go` and return the full updated file. ```go package model import ( "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "time" ) type Application struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` Userid bson.ObjectId Name ...
```go package model import ( "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "time" ) type Application struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` Userid bson.ObjectId Name string Secret string Description string } func (m *Application) Save(session *mgo.Session) error { r...
null
null
Add a test for casts of univariant C-like enums Apply this change to `src/test/run-pass/issue-23304-2.rs` and return the full updated file. ```rust // Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // L...
```rust // Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE...
null
null
Test that the 0-ary product is the unit term. Apply this change to `ManifoldTests/ValueTests.swift` and return the full updated file. ```swift // Copyright (c) 2015 Rob Rix. All rights reserved. final class ValueTests: XCTestCase { func testQuotation() { assert(Value.pi(.type, id).quote, ==, Value.pi(.type, id)....
```swift // Copyright (c) 2015 Rob Rix. All rights reserved. final class ValueTests: XCTestCase { func testQuotation() { assert(Value.pi(.type, id).quote, ==, Value.pi(.type, id).quote) } func testNestedQuotation() { assert(Value.pi(.type) { Value.pi(.type, const($0)) }.quote, ==, Term(.Pi(Box(.type), Box(Ter...
null
null
Remove unused function param caught by eslint Apply this change to `app/routes/signin.js` and return the full updated file. ```javascript import Ember from 'ember'; export default Ember.Route.extend({ beforeModel(transition) { if (this.get('session.isAuthenticated')) { this.transitionTo('/'); } }, ...
```javascript import Ember from 'ember'; export default Ember.Route.extend({ beforeModel() { if (this.get('session.isAuthenticated')) { this.transitionTo('/'); } }, resetController(controller, isExiting) { if (isExiting) { controller.resetController(); } } }); ```
null
null
Use osirium prefix to avoid possible conflicts with PyPI Apply this change to `setup.py` and return the full updated file. ```python from setuptools import setup, find_packages setup( version='4.0.0', name='vcdriver', description='A vcenter driver based on pyvmomi, fabric and pywinrm', url='https://...
```python from setuptools import setup, find_packages setup( version='4.0.0', name='osirium-vcdriver', description='A vcenter driver based on pyvmomi, fabric and pywinrm', url='https://github.com/Osirium/vcdriver', license='MIT', install_requires=['colorama', 'Fabric3', 'pyvmomi', 'pywinrm', '...
null
null
Move delegate conformance into extension Apply this change to `Sources/Controllers/Settings/DynamicSettingCategoryViewController.swift` and return the full updated file. ```swift // // DynamicSettingCategoryViewController.swift // Ello // // Created by Tony DiPasquale on 4/13/15. // Copyright (c) 2015 Ello. All r...
```swift // // DynamicSettingCategoryViewController.swift // Ello // // Created by Tony DiPasquale on 4/13/15. // Copyright (c) 2015 Ello. All rights reserved. // import UIKit class DynamicSettingCategoryViewController: UITableViewController { var category: DynamicSettingCategory? var currentUser: User? ...
null
null
Fix single node execute inspec test to check for just a single node Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io> Apply this change to `test/integration/service-execute/inspec/run_spec.rb` and return the full updated file. ```ruby describe command('etcdctl member list') do its(:exit_s...
```ruby describe command('etcdctl member list') do its(:exit_status) { should eq 0 } its(:stdout) { should match(%r{name=default peerURLs=http://localhost:2380 clientURLs=http://localhost:2379 isLeader=true}) } end ```
null
null
Remove attempt to migrate from existing SMTP since it is unsafe in multi user environments and confusing + breaks relationships when entries are de-duped. Apply this change to `db/migrations/20160227180335_0.1.2_store-smtp-settings.sql` and return the full updated file. ```sql -- +goose Up -- SQL in section 'Up' is ...
```sql -- +goose Up -- SQL in section 'Up' is executed when this migration is applied -- Move the relationship between campaigns and smtp to campaigns ALTER TABLE campaigns ADD COLUMN "smtp_id" bigint; -- Create a new table to store smtp records DROP TABLE smtp; CREATE TABLE smtp( id integer primary key autoincrement...
null
null
Remove file structure comment from doc summary Apply this change to `MoreLinq/MoreEnumerable.cs` and return the full updated file. ```csharp #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. // // Licensed under the Apache License, Version...
```csharp #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at ...
null
null
Fix imgtool publishing missing python package Add missing `packaging` to allow version comparison. Signed-off-by: Fabio Utzig <66676b1ceaf93296e098708c09494361103aa635@apache.org> Apply this change to `ci/imgtool_install.sh` and return the full updated file. ```bash #!/bin/bash -x # Licensed under the Apache Licen...
```bash #!/bin/bash -x # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
null
null
Add published year to title Apply this change to `share/spice/arxiv/arxiv.js` and return the full updated file. ```javascript (function (env) { "use strict"; env.ddg_spice_arxiv = function(api_result){ if (!api_result) { return Spice.failed('arxiv'); } Spice.add({ ...
```javascript (function (env) { "use strict"; env.ddg_spice_arxiv = function(api_result){ if (!api_result) { return Spice.failed('arxiv'); } Spice.add({ id: "arxiv", name: "Reference", data: api_result, meta: { ...
null
null
Update comment for new column Apply this change to `synapse/storage/schema/delta/56/current_state_events_membership.sql` and return the full updated file. ```sql /* Copyright 2019 The Matrix.org Foundation C.I.C. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except...
```sql /* Copyright 2019 The Matrix.org Foundation C.I.C. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
null
null
Change saved report reload to use the new product feature Apply this change to `app/helpers/application_helper/toolbar/saved_reports_center.rb` and return the full updated file. ```ruby class ApplicationHelper::Toolbar::SavedReportsCenter < ApplicationHelper::Toolbar::Basic button_group('saved_report_reloading', [ ...
```ruby class ApplicationHelper::Toolbar::SavedReportsCenter < ApplicationHelper::Toolbar::Basic button_group('saved_report_reloading', [ button( :miq_report_saved_reports_reload, 'fa fa-refresh fa-lg', N_('Refresh selected Reports'), nil, :url => "reload", :klass => Applicat...
null
null
Rename alpha -> learning_rate and gamma -> discount_factor Apply this change to `capstone/rl/learners/qlearning.py` and return the full updated file. ```python from ..learner import Learner from ..policies import RandomPolicy from ..util import max_action_value from ..value_functions import TabularF from ...utils imp...
```python from ..learner import Learner from ..policies import RandomPolicy from ..util import max_action_value from ..value_functions import TabularF from ...utils import check_random_state class QLearning(Learner): def __init__(self, env, policy=None, qf=None, learning_rate=0.1, discount_facto...
null
null
Fix name and formatting of ast children count test Apply this change to `ast_test.go` and return the full updated file. ```go package go_sat_solver import "testing" func TestPrint(t *testing.T) { cases := []struct { expr Expr want int }{ {And{[]Expr{Symbol{"x1"}, Symbol{"x2"}}}, 2}, {Or{[]Expr{Symbol{"x1...
```go package go_sat_solver import "testing" func TestChildrenCount(t *testing.T) { cases := []struct { expr Expr want int }{ {And{[]Expr{Symbol{"x1"}, Symbol{"x2"}}}, 2}, {Or{[]Expr{Symbol{"x1"}, Symbol{"x2"}, Symbol{"x3"}}}, 3}, {Not{[1]Expr{Symbol{"x1"}}}, 1}, {Symbol{"x1"}, 0}, {Literal{true}, 0}...
null
null
Return a fake comm object Apply this change to `jupyter-js-widgets/src/embed-manager.ts` and return the full updated file. ```typescript // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import { ManagerBase } from './manager-base'; export class EmbedManager ...
```typescript // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import { ManagerBase } from './manager-base'; export class EmbedManager extends ManagerBase<HTMLElement> { display_widget_state(models, el) { return this.set_state(models, { el: el, dis...
null
null
[Array] Update Solution to Sliding Window Maximum Apply this change to `Array/SlidingWindowMaximum.swift` and return the full updated file. ```swift /** * Question Link: https://leetcode.com/problems/sliding-window-maximum/ * Primary idea: Use an array to store indices of elements, from larger to smaller, * ...
```swift /** * Question Link: https://leetcode.com/problems/sliding-window-maximum/ * Primary idea: Use an array to store indices of elements, from larger to smaller, * adjust it while iterating the array * * Time Complexity: O(n), Space Complexity: O(n) * */ class SlidingWindowMaximum { func...
null
null
Update digest usage in benchmark Apply this change to `benches/generate.rs` and return the full updated file. ```rust #![feature(test)] extern crate identicon; extern crate openssl; extern crate test; use openssl::crypto::hash::{hash, Type}; use test::Bencher; use identicon::Identicon; #[bench] fn generate(x: &mu...
```rust #![feature(test)] extern crate identicon; extern crate openssl; extern crate test; use openssl::hash::{hash2, MessageDigest}; use test::Bencher; use identicon::Identicon; #[bench] fn generate(x: &mut Bencher) { let input = "42".as_bytes(); let md5 = MessageDigest::md5(); x.iter(|| match hash2(m...
null
null
Revert "Revert "Revert "added try catch, test commit""" This reverts commit 9ba17068fe9978121210a2652deadf655e58e28d. Apply this change to `Samples/Core.CrossDomainImages/Core.CrossDomainImagesWeb/Pages/Default.aspx.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; usin...
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Core.CrossDomainImagesWeb { public partial class Default : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) ...
null
null
Add an option to pass in generated TEI, for speed & troubleshooting Apply this change to `readux/books/management/commands/web_export.py` and return the full updated file. ```python from eulfedora.server import Repository from django.core.management.base import BaseCommand import shutil from readux.books import anno...
```python from eulfedora.server import Repository from eulxml.xmlmap import load_xmlobject_from_file from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume from readux.books.tei import Facsimile class Command(BaseCommand): ...
null
null
Revert "Add support for the Python Stdout Log" This reverts commit 6dd58324c052cc893f6ce8f009903805185a71d1. Apply this change to `Source/UnrealEnginePython/Public/UnrealEnginePython.h` and return the full updated file. ```c // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #pragma once #include "Module...
```c // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #pragma once #include "ModuleManager.h" DECLARE_LOG_CATEGORY_EXTERN(LogPython, Log, All); class UNREALENGINEPYTHON_API FUnrealEnginePythonModule : public IModuleInterface { public: bool PythonGILAcquire(); void PythonGILRelease(); virtual void ...
null
null
[os] Add more directories to create at start to organise ebooks and videos Apply this change to `src/os/create_directories.sh` and return the full updated file. ```bash #!/usr/bin/env bash cd "$(dirname "${BASH_SOURCE[0]}")" \ && . "utils.sh" declare -a DIRECTORIES=( "$HOME/Desktop/Screenshots" "$HOME/D...
```bash #!/usr/bin/env bash cd "$(dirname "${BASH_SOURCE[0]}")" \ && . "utils.sh" declare -a DIRECTORIES=( "$HOME/Desktop/Screenshots" "$HOME/Development/code/bitbucket" "$HOME/Development/code/github" "$HOME/Development/code/playground" "$HOME/Documents/ebook/_to-organise" "$HOME/Document...
null
null
Improve dummy user generate in example 2 Accept password as parameter to prevent hashing problem. Since hash is used before saving the Password field, cannot get the real password in the struct. Apply this change to `_examples/2_server/user_test.go` and return the full updated file. ```go package main import ( "ma...
```go package main import ( "math/rand" "testing" ) func dummyNewUser(password string) *User { var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") randSeq := func(n int) string { b := make([]rune, n) for i := range b { b[i] = letters[rand.Intn(len(letters))] } return string(b)...
null
null
Use toJSON() on enum type Apply this change to `Tests/Person.swift` and return the full updated file. ```swift // // Person.swift // FreddyTests // // Created by Matthew D. Mathias on 3/21/15. // Copyright © 2015 Big Nerd Ranch. Licensed under MIT. // import Freddy public struct Person: CustomStringConvertible ...
```swift // // Person.swift // FreddyTests // // Created by Matthew D. Mathias on 3/21/15. // Copyright © 2015 Big Nerd Ranch. Licensed under MIT. // import Freddy public struct Person: CustomStringConvertible { public enum EyeColor: String { case Brown = "brown" case Blue = "blue" cas...
null
null
Add example for ng_words size Apply this change to `spec/message_filter_spec.rb` and return the full updated file. ```ruby require 'rspec/its' require_relative '../lib/message_filter' describe MessageFilter do shared_examples 'MessageFilter with argument "foo"' do it { is_expected.to be_detect('hello from foo') }...
```ruby require 'rspec/its' require_relative '../lib/message_filter' describe MessageFilter do shared_examples 'MessageFilter with argument "foo"' do it { is_expected.to be_detect('hello from foo') } it { is_expected.not_to be_detect('hello, world!') } its(:ng_words) { is_expected.not_to be_empty } end c...
null
null
Rearrange to give precedence to the resource path Apply this change to `Sources/Fakery/Data/Provider.swift` and return the full updated file. ```swift import Foundation public final class Provider { var translations: [String: Data] = [:] // MARK: - Locale data public func dataForLocale(_ locale: String) -> D...
```swift import Foundation public final class Provider { var translations: [String: Data] = [:] // MARK: - Locale data public func dataForLocale(_ locale: String) -> Data? { var translation: Data? if let translationData = translations[locale] { translation = translationData } else { le...
null
null
Update support to minimum of Ubuntu Precise Apply this change to `metadata.rb` and return the full updated file. ```ruby name 'sysctl' maintainer 'OneHealth Solutions, Inc.' maintainer_email 'cookbooks@onehealth.com' license 'Apache v2.0' description 'Configures sysctl parameters' long_description IO.read(File.join(...
```ruby name 'sysctl' maintainer 'OneHealth Solutions, Inc.' maintainer_email 'cookbooks@onehealth.com' license 'Apache v2.0' description 'Configures sysctl parameters' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.4.0' supports 'ubuntu', '>= 12.04' supports 'debian', '>= 7.0' sup...
null
null
Add commented out Storyshots test This allows interactive interaction with what Storyshots sees. Apply this change to `app.js` and return the full updated file. ```javascript /* eslint-disable consistent-return */ /* eslint-disable no-console */ /* eslint-disable import/no-extraneous-dependencies */ const compressio...
```javascript /* eslint-disable consistent-return */ /* eslint-disable no-console */ /* eslint-disable import/no-extraneous-dependencies */ const compression = require('compression'); const express = require('express'); const port = process.env.PORT || 9001; // Create server const app = express(); // Compress all fi...
null
null
Call RelaxNgWriter as a temporary hack. git-svn-id: ca8e9bb6f3f9b50a093b443c23951d3c25ca0913@283 369101cc-9a96-11dd-8e58-870c635edf7a Apply this change to `dtdinst/src/com/thaiopensource/xml/dtd/app/Driver.java` and return the full updated file. ```java package com.thaiopensource.xml.dtd.app; import java.io.IOExce...
```java package com.thaiopensource.xml.dtd.app; import java.io.IOException; import java.io.BufferedWriter; import java.io.OutputStreamWriter; import com.thaiopensource.xml.out.CharRepertoire; import com.thaiopensource.xml.out.XmlWriter; import com.thaiopensource.xml.util.EncodingMap; import com.thaiopensource.xml.dtd...
null
null
Fix CGFloat type definition for 32-bit. Apply this change to `src/base.rs` and return the full updated file. ```rust // Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // htt...
```rust // Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/M...
null
null
Print usage message on getopt error Apply this change to `src/main.c` and return the full updated file. ```c // Copyright 2016 Mitchell Kember. Subject to the MIT License. #include "translate.h" #include "transmit.h" #include "util.h" #include <stdio.h> #include <unistd.h> int main(int argc, char **argv) { setup_...
```c // Copyright 2016 Mitchell Kember. Subject to the MIT License. #include "translate.h" #include "transmit.h" #include "util.h" #include <stdio.h> #include <unistd.h> int main(int argc, char **argv) { setup_util(argv[0]); // Initialize the default mode. int mode = 'e'; // Get command line options. int c; ...
null
null
Add default "0" to fizzbuzz_tweets twitter_tweet_id. Apply this change to `misc/sql/ddl.sql` and return the full updated file. ```sql DROP DATABASE IF EXISTS fizzbuzz_twitterbot; CREATE DATABASE fizzbuzz_twitterbot CHARACTER SET utf8; USE fizzbuzz_twitterbot; DROP TABLE IF EXISTS fizzbuzz_tweets; CREATE TABLE fizzbu...
```sql DROP DATABASE IF EXISTS fizzbuzz_twitterbot; CREATE DATABASE fizzbuzz_twitterbot CHARACTER SET utf8; USE fizzbuzz_twitterbot; DROP TABLE IF EXISTS fizzbuzz_tweets; CREATE TABLE fizzbuzz_tweets ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, number BIGINT UNSIGNED NOT NULL, tweet VARCHAR(140) NOT NULL, twi...
null
null
Make sure to only invoke defaults once Apply this change to `src/SqlPersistence/SqlPersistence.cs` and return the full updated file. ```csharp namespace NServiceBus { using Settings; using Features; using Persistence; using Persistence.Sql; /// <summary> /// The <see cref="PersistenceDefinit...
```csharp namespace NServiceBus { using Settings; using Features; using Persistence; using Persistence.Sql; /// <summary> /// The <see cref="PersistenceDefinition"/> for the SQL Persistence. /// </summary> public class SqlPersistence : PersistenceDefinition { /// <summary> ...
null
null
Revert "Added a `ci` task for `grunt`." This reverts commit fc2e56b49ced252632f6d018596131fe51e1b3e2. Apply this change to `Gruntfile.js` and return the full updated file. ```javascript module.exports = function(grunt) { 'use strict'; // Configuration grunt.initConfig({ pkg: grunt.file.readJSON(...
```javascript module.exports = function(grunt) { 'use strict'; // Configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: true }, bin: 'bin/**/*.js', grunt: 'Gruntfile.js', ...
null
null
Add sql for altering table Apply this change to `oscm-devruntime/javares/sql/upd_postgresql_02_09_13.sql` and return the full updated file. ```sql -- ALTER TABLE "subscription" ADD COLUMN "uuid" uuid; -- ALTER TABLE "subscription" ADD COLUMN "eventpublished" boolean NOT NULL DEFAULT false; -- ALTER TABLE "subscript...
```sql ALTER TABLE "subscription" ADD COLUMN "uuid" uuid; ALTER TABLE "subscription" ADD COLUMN "eventpublished" boolean NOT NULL DEFAULT false; ALTER TABLE "subscriptionhistory" ADD "eventpublished" boolean NOT NULL DEFAULT false; run:MigrateSubscriptions; ```
null
null
Allow passing an event loop to XapianServer Apply this change to `src/server.h` and return the full updated file. ```c #ifndef XAPIAND_INCLUDED_SERVER_H #define XAPIAND_INCLUDED_SERVER_H #include <ev++.h> #include "threadpool.h" #include "database.h" const int XAPIAND_HTTP_PORT_DEFAULT = 8880; const int XAPIAND_B...
```c #ifndef XAPIAND_INCLUDED_SERVER_H #define XAPIAND_INCLUDED_SERVER_H #include <ev++.h> #include "threadpool.h" #include "database.h" const int XAPIAND_HTTP_PORT_DEFAULT = 8880; const int XAPIAND_BINARY_PORT_DEFAULT = 8890; class XapiandServer : public Task { private: ev::dynamic_loop dynamic_loop; ev::loop_...
null
null
Remove remaining bare trait object Apply this change to `examples/custom-header.rs` and return the full updated file. ```rust //! This example shows how to transmit a request with a custom HTTP header. extern crate xmlrpc; extern crate reqwest; use xmlrpc::{Request, Transport}; use xmlrpc::http::{build_headers, che...
```rust //! This example shows how to transmit a request with a custom HTTP header. extern crate xmlrpc; extern crate reqwest; use xmlrpc::{Request, Transport}; use xmlrpc::http::{build_headers, check_response}; use reqwest::{Client, RequestBuilder}; use reqwest::header::COOKIE; use std::error::Error; /// Custom t...
null
null
Fix a couple type declarations. Apply this change to `lib/rb-inotify/native.rb` and return the full updated file. ```ruby require 'ffi' module INotify # This module contains the low-level foreign-function interface code # for dealing with the inotify C APIs. # It's an implementation detail, and not meant for u...
```ruby require 'ffi' module INotify # This module contains the low-level foreign-function interface code # for dealing with the inotify C APIs. # It's an implementation detail, and not meant for users to deal with. # # @private module Native extend FFI::Library # The C struct describing an inotif...
null
null
Sort tweets by descending creation date (most recent first) Apply this change to `app/src/main/java/net/squanchy/tweets/service/TwitterService.kt` and return the full updated file. ```kotlin package net.squanchy.tweets.service import io.reactivex.Observable import io.reactivex.functions.BiFunction import net.squanch...
```kotlin package net.squanchy.tweets.service import io.reactivex.Observable import io.reactivex.functions.BiFunction import net.squanchy.service.firestore.FirestoreDbService import net.squanchy.tweets.domain.view.TwitterScreenViewModel import net.squanchy.tweets.view.TweetUrlSpanFactory internal class TwitterService...
null
null
Fix input message type name game to snake command Apply this change to `connections/input_message.go` and return the full updated file. ```go package connections import "encoding/json" type InputMessageType uint8 const ( InputMessageTypeGameCommand InputMessageType = iota ) type InputMessage struct { Type In...
```go package connections import "encoding/json" type InputMessageType uint8 const ( InputMessageTypeSnakeCommand InputMessageType = iota ) type InputMessage struct { Type InputMessageType Payload json.RawMessage } ```
null
null
Enable move and disable copy for key implementations. Apply this change to `src/keyimpl.h` and return the full updated file. ```c #pragma once #include "jwtxx/jwt.h" #include <string> namespace JWTXX { struct Key::Impl { virtual ~Impl() {} virtual std::string sign(const void* data, size_t size) const = 0;...
```c #pragma once #include "jwtxx/jwt.h" #include <string> namespace JWTXX { struct Key::Impl { // Need this for polymorphic behavior. virtual ~Impl() = default; // Need this due to the Rule of Five. Impl() = default; Impl(const Impl&) = delete; Impl& operator=(const Impl&) = delete; Imp...
null
null
Remove build scan init from Colony Comp build We do not have that script in the other repository. Apply this change to `.teamcity/Gradle_Check/configurations/ColonyCompatibility.kt` and return the full updated file. ```kotlin package configurations import jetbrains.buildServer.configs.kotlin.v10.BuildStep import je...
```kotlin package configurations import jetbrains.buildServer.configs.kotlin.v10.BuildStep import jetbrains.buildServer.configs.kotlin.v10.BuildType import jetbrains.buildServer.configs.kotlin.v10.buildSteps.gradle import jetbrains.buildServer.configs.kotlin.v10.buildSteps.script import model.CIBuildModel object Colo...
null
null
Enlarge SQL fields to more comfortable sizes Apply this change to `tools/issues-mysql.sql` and return the full updated file. ```sql SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
```sql SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- CREATE TA...
null
null
Fix for places with no origin such as 127.0.0.1 Apply this change to `server/schema.sql` and return the full updated file. ```sql CREATE TABLE IF NOT EXISTS ip_storage ( ip CIDR PRIMARY KEY, country_code TEXT CHECK (char_length(country_code) = 2), accessed BIGINT DEFAULT 1, last_updated TIMESTAMP DE...
```sql CREATE TABLE IF NOT EXISTS ip_storage ( ip CIDR PRIMARY KEY, country_code TEXT CHECK (char_length(country_code) <= 2), accessed BIGINT DEFAULT 1, last_updated TIMESTAMP DEFAULT now() ); ```
null
null
Add UUID to trails view Apply this change to `geotrek/core/sql/post_60_views.sql` and return the full updated file. ```sql CREATE VIEW {# geotrek.core #}.v_trails AS ( SELECT core_topology.geom, core_topology.id, core_trail.* FROM core_trail, core_topology WHERE core_trail.topo_object_id = core_topology.i...
```sql CREATE VIEW {# geotrek.core #}.v_trails AS ( SELECT core_topology.geom, core_topology.id, core_topology.uuid, core_trail.* FROM core_trail, core_topology WHERE core_trail.topo_object_id = core_topology.id AND core_topology.deleted = FALSE ); ```
null
null
Use test fixture in GetUserName unit tests Apply this change to `src/tests/test-getusername.cpp` and return the full updated file. ```cpp #include <string> #include <vector> #include <unistd.h> #include <gtest/gtest.h> #include <scxcorelib/scxstrencodingconv.h> #include "getusername.h" TEST(GetUserName,simple) { //...
```cpp #include <string> #include <vector> #include <unistd.h> #include <gtest/gtest.h> #include <scxcorelib/scxstrencodingconv.h> #include "getusername.h" class GetUserNameTest : public ::testing::Test { protected: DWORD lpnSize; std::vector<WCHAR_T> lpBuffer; BOOL result; std::string userName; GetUserNameTest(...
null
null
Change www repo to owncloud.org repo Apply this change to `404.php` and return the full updated file. ```php <?php get_template_part('templates/page', 'header'); ?> <div class="alert alert-warning"> <p>Sorry, but the page you were trying to view does not exist.</p> </div> <div class="row"> <div class="span12"> ...
```php <?php get_template_part('templates/page', 'header'); ?> <div class="alert alert-warning"> <p>Sorry, but the page you were trying to view does not exist.</p> </div> <div class="row"> <div class="span12"> <p>We've recently reorganised the website and some old links may no longer be working correctly. If you ...
null
null
Write services and topology JSONs to file Apply this change to `topology/Main.cpp` and return the full updated file. ```cpp #include "Topology.hpp" #include "Host.hpp" #include "Hop.hpp" using namespace std; /*nmap -oX traceroute_all_subnet.xml -O -sV localhost*/ int main(int argc, char **argv) { if(argc < 1) {...
```cpp #include "Topology.hpp" #include "Host.hpp" #include "Hop.hpp" #include <fstream> using namespace std; /*nmap -oX traceroute_all_subnet.xml -O -sV localhost*/ int main(int argc, char **argv) { if(argc < 1) { cout << "Invalid number of program arguments: "; cout << "Usage ./build_topology <tracerout...
null
null
Add public Map<BigInteger, BigInteger> mapeiaRelacoes() Apply this change to `src/dao/AmigoDataAccessObject.java` and return the full updated file. ```java package dao; import java.math.BigInteger; import java.util.List; import java.util.Map; import model.Info; import model.Nodo; public interface AmigoDataAccessOb...
```java package dao; import java.math.BigInteger; import java.util.List; import java.util.Map; import model.Info; import model.Vertice; public interface AmigoDataAccessObject { public int quantidadeAmigos(); public void comparaTabelas(); public List<Info> listaAmigosPorGenero(String sex); public List<Ver...
null
null
Fix bugs in test case Apply this change to `reader_test.go` and return the full updated file. ```go package proof import ( "bytes" "ioutil" "testing" ) func TestCRC(t *testing.T) { data := []byte("Hello, World!") cases := []struct { csum uint32 err error }{ {0xec4ac3d0, nil}, {0xdeadbeef, EHASHFAIL},...
```go package proof import ( "bytes" "hash/crc32" "io/ioutil" "testing" ) func TestCRC(t *testing.T) { data := []byte("Hello, World!") cases := []struct { csum uint32 err error }{ {0xec4ac3d0, nil}, {0xdeadbeef, EHASHFAIL}, } for _, c := range cases { buf := bytes.NewBuffer(data) h := crc32.New...
null
null
Allow homebrew to be installed in non-standard locations Closes #197 Apply this change to `cli/includes/compatibility.php` and return the full updated file. ```php <?php /** * Check the system's compatibility with Valet. */ $inTestingEnvironment = strpos($_SERVER['SCRIPT_NAME'], 'phpunit') !== false; if (PHP_OS ...
```php <?php /** * Check the system's compatibility with Valet. */ $inTestingEnvironment = strpos($_SERVER['SCRIPT_NAME'], 'phpunit') !== false; if (PHP_OS !== 'Darwin' && ! $inTestingEnvironment) { echo 'Valet only supports the Mac operating system.'.PHP_EOL; exit(1); } if (version_compare(PHP_VERSION, '...
null
null
Clean up some namespace things Apply this change to `src/applicationMain.cc` and return the full updated file. ```cpp #include <stdio.h> #include "mutex.h" #include "thread.h" #include "window.h" using System::Window; class DisplayThreadEntry : public System::ThreadEntry { public: virtual ~DisplayThreadEntry() {}...
```cpp #include <stdio.h> #include "mutex.h" #include "thread.h" #include "window.h" using System::Window; using System::Thread; using System::ThreadEntry; class DisplayThreadEntry : public ThreadEntry { public: virtual ~DisplayThreadEntry() {} virtual void *Run(void *arg) { Window *mainWindow = Window::Create(...
null
null
Add missing test implementation dependency Apply this change to `subprojects/composite-builds/build.gradle.kts` and return the full updated file. ```kotlin plugins { id("gradlebuild.distribution.api-java") } dependencies { implementation(project(":base-services")) implementation(project(":messaging")) ...
```kotlin plugins { id("gradlebuild.distribution.api-java") } dependencies { implementation(project(":base-services")) implementation(project(":messaging")) implementation(project(":logging")) implementation(project(":core-api")) implementation(project(":model-core")) implementation(project...
null
null
Fix failing test for rendering internal resources. Apply this change to `lib/app/helpers/esi_helper.rb` and return the full updated file. ```ruby require 'net/http' require 'uri' require 'action_controller' require 'ventilation/deep_stack' module Ventilation module EsiHelper # Render resource on the edge ...
```ruby require 'net/http' require 'uri' require 'action_controller' require 'ventilation/deep_stack' module Ventilation module EsiHelper # Render resource on the edge def esi(resource, options = {}) env = ENV['RAILS_ENV'] # If we were passed a url... if resource =~ URI.regexp # ....
null
null
Enforce limits to robot name pattern Apply this change to `robot-name/robot_name_test.rb` and return the full updated file. ```ruby require 'minitest/autorun' require_relative 'robot' class RobotTest < MiniTest::Unit::TestCase def test_has_name assert_match /[a-zA-Z]{2}\d{3}/, Robot.new.name end def test_...
```ruby require 'minitest/autorun' require_relative 'robot' class RobotTest < MiniTest::Unit::TestCase def test_has_name assert_match /^[a-zA-Z]{2}\d{3}$/, Robot.new.name end def test_name_sticks skip robot = Robot.new robot.name assert_equal robot.name, robot.name end def test_differen...
null
null
Add github homepage to gemspec Apply this change to `dears3.gemspec` and return the full updated file. ```ruby # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'dears3/version' Gem::Specification.new do |spec| spec.name = "dears3" ...
```ruby # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'dears3/version' Gem::Specification.new do |spec| spec.name = "dears3" spec.version = DearS3::VERSION spec.authors = ["7imon7ays"] spec.homepage = "https:...
null
null
Fix up indices for users_who_share_rooms Apply this change to `synapse/storage/schema/delta/43/user_share.sql` and return the full updated file. ```sql /* Copyright 2017 Vector Creations Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with th...
```sql /* Copyright 2017 Vector Creations Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
null
null
Add missing i18n and use bootstrap-react Apply this change to `client/src/components/Index.js` and return the full updated file. ```javascript import React, { Component } from 'react'; import { Link } from 'react-router'; import gamepad from '../dependencies/img/gamepad.png'; import keyboard from '../dependencies/img...
```javascript import React, { Component } from 'react'; import { Link } from 'react-router'; import { translate } from 'react-i18next'; import { Row, Col, Panel } from 'react-bootstrap'; import gamepad from '../dependencies/img/gamepad.png'; import keyboard from '../dependencies/img/keyboard.png'; class Index extends ...
null
null
Remove strange old "showTaskList" call now and forever! Apply this change to `src/test/java/org/scenarioo/mytinytodo/TaskListManagementWebTest.java` and return the full updated file. ```java package org.scenarioo.mytinytodo; import org.junit.Before; import org.junit.Test; import org.scenarioo.mytinytodo.base.TinyTod...
```java package org.scenarioo.mytinytodo; import org.junit.Before; import org.junit.Test; import org.scenarioo.mytinytodo.base.TinyTodoWebTest; import org.scenarioo.mytinytodo.pages.TaskListsPage; import org.scenarioo.mytinytodo.pages.TasksPage; public class TaskListManagementWebTest extends TinyTodoWebTest { priv...
null
null
Add RLP encoding for CrosslinkRecord Apply this change to `src/state/crosslink_record.rs` and return the full updated file. ```rust use super::utils::types::Sha256Digest; pub struct CrosslinkRecord { pub epoch: u64, pub hash: Sha256Digest } impl CrosslinkRecord { pub fn new(epoch: u64, hash: Sha256Diges...
```rust use super::utils::types::Sha256Digest; use super::rlp::{ RlpStream, Encodable }; pub struct CrosslinkRecord { pub epoch: u64, pub hash: Sha256Digest } impl CrosslinkRecord { pub fn new(epoch: u64, hash: Sha256Digest) -> CrosslinkRecord { CrosslinkRecord { epoch: epoch, ...
null
null
Make view did load calls on test Apply this change to `UnitTests/Controller/Home/TCHome.swift` and return the full updated file. ```swift import XCTest @testable import gattaca class TCHome:XCTestCase { private var session:MSession? private var controller:CHome? private let kWaitSession:UInt32 = 3 ...
```swift import XCTest @testable import gattaca class TCHome:XCTestCase { private var session:MSession? private var controller:CHome? private let kWaitSession:UInt32 = 3 override func setUp() { super.setUp() let session:MSession = MSession() self.session = sess...
null
null