original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Move listener into Buildr Namespace Apply this change to `lib/redfish/buildr_integration.rb` and return the full updated file. ```ruby # # 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 # # ...
```ruby # # 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, software # distribute...
null
null
Fix an unstable warning in testing. Apply this change to `src/httpcommon/lib.rs` and return the full updated file. ```rust //! Common HTTP functionality for the Teepee project. //! //! Anything shared between both client and server belongs in here, but this crate is not expected //! to be used directly. //! //! Any c...
```rust //! Common HTTP functionality for the Teepee project. //! //! Anything shared between both client and server belongs in here, but this crate is not expected //! to be used directly. //! //! Any crate using types from this crate should re‐export them. For example, the ``status`` module //! should be exported in ...
null
null
Set cross-platform compatible path to zsh Apply this change to `script/upgrade.sh` and return the full updated file. ```bash #!/usr/bin/zsh # Shamelessly copied from oh my zsh printf '\033[0;34m%s\033[0m\n' "Upgrading Dotfiles" cd "$DOTS" oldcommit=$(git rev-parse master) if git pull --rebase --stat origin master th...
```bash #!/bin/zsh # Shamelessly copied from oh my zsh printf '\033[0;34m%s\033[0m\n' "Upgrading Dotfiles" cd "$DOTS" oldcommit=$(git rev-parse master) if git pull --rebase --stat origin master then printf '\033[0;34m%s\033[0m\n' 'Dotfiles updated to current version.' printf '\033[0;34m%s\033[0m\n' 'Bootstrapping ...
null
null
Make lexer test more robust Apply this change to `test/lexer-spec.ts` and return the full updated file. ```typescript import test from "ava"; import HclLexer from '../src/lexer'; test('Should find tokens correctly', t => { const SOURCE_TEXT = ` foo = { bar = "baz \$\${quux} \${var.mumble}" quux = 42 } // Exam...
```typescript import test from "ava"; import HclLexer from '../src/lexer'; function stringChars(str: string, type = 'stringChar') { return str.split('').map((c: string) => [type, c]); } test('Should find tokens correctly', t => { const SOURCE_TEXT = ` foo = { bar = "baz \$\${quux} \${var.mumble}" quux = 42 } ...
null
null
Create index on statuses (read) for performance reasons. Apply this change to `Frameworks/Database/CreateStatements.sql` and return the full updated file. ```sql CREATE TABLE if not EXISTS articles (articleID TEXT NOT NULL PRIMARY KEY, feedID TEXT NOT NULL, uniqueID TEXT NOT NULL, title TEXT, contentHTML TEXT, conten...
```sql CREATE TABLE if not EXISTS articles (articleID TEXT NOT NULL PRIMARY KEY, feedID TEXT NOT NULL, uniqueID TEXT NOT NULL, title TEXT, contentHTML TEXT, contentText TEXT, url TEXT, externalURL TEXT, summary TEXT, imageURL TEXT, bannerImageURL TEXT, datePublished DATE, dateModified DATE); CREATE TABLE if not EXISTS...
null
null
Convert bin/storage workflow to presume utf8mb4 as the default encoding Summary: see comments on rP68904d941c54 Test Plan: run ,/bin/storage upgrade Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D1637...
```php <?php final class PhabricatorStorageManagementShellWorkflow extends PhabricatorStorageManagementWorkflow { protected function didConstruct() { $this ->setName('shell') ->setExamples('**shell** [__options__]') ->setSynopsis(pht('Launch an interactive shell.')); } protected functio...
null
null
Refactor identifyOutliers to functional style. Apply this change to `src/lib/statistics.ts` and return the full updated file. ```typescript const _ss = require('simple-statistics'); import { Person } from './models'; const FENCE_FACTOR = 1.5; const QUARTILES = [0.25, 0.5, 0.75]; export class Statistics { static ...
```typescript const _ss = require('simple-statistics'); import { Person } from './models'; const FENCE_FACTOR = 1.5; const QUARTILES = [0.25, 0.5, 0.75]; export class Statistics { static calculateBoxPlotData(sample: number[]): number[] { let [lowerQuartile, median, upperQuartile] = QUARTILES.map(p => _ss.quant...
null
null
Make `process()` public and callable from C Apply this change to `src/lib.rs` and return the full updated file. ```rust use std::thread; #[no_mangle] fn process() { let handles: Vec<_> = (0..10).map(|_| { thread::spawn(|| { let mut x = 0; for _ in (0..5_000_000) { ...
```rust use std::thread; #[no_mangle] pub extern fn process() { let handles: Vec<_> = (0..10).map(|_| { thread::spawn(|| { let mut x = 0; for _ in (0..5_000_000) { x += 1 } x }) }).collect(); for h in handles { println!("T...
null
null
Change \s to [ ] to make OS X/BSD sed happy. Apply this change to `utils/bump-version.sh` and return the full updated file. ```bash #!/bin/bash VER="$1" if [[ "x${VER}" = "x" ]] then echo "Usage: $0 <version number>" echo " e.g. $0 0.1.0" exit 1 fi sed -i".bak" -e "s/\(version\s*=\s*[\"']\)\(.*\)\([\"']...
```bash #!/bin/bash VER="$1" if [[ "x${VER}" = "x" ]] then echo "Usage: $0 <version number>" echo " e.g. $0 0.1.0" exit 1 fi sed -i".bak" -e "s/\(version[ ]*=[ ]*[\"']\)\(.*\)\([\"'].*\)/\1${VER}\3/" setup.py ```
null
null
test: Add test case for `EffectScatterSerie.RippleEffect.BrushType` Apply this change to `SwiftyEchartsTest_iOS/EffectScatterSerieSpec.swift` and return the full updated file. ```swift // // EffectScatterSerieSpec.swift // SwiftyEcharts // // Created by Pluto Y on 09/07/2017. // Copyright © 2017 com.pluto-y. All ...
```swift // // EffectScatterSerieSpec.swift // SwiftyEcharts // // Created by Pluto Y on 09/07/2017. // Copyright © 2017 com.pluto-y. All rights reserved. // import Quick import Nimble @testable import SwiftyEcharts class EffectScatterSerieSpec: QuickSpec { override func spec() { let renderShowEffectO...
null
null
Fix broken test stemmed from private class method Apply this change to `test/wolverine_test.rb` and return the full updated file. ```ruby require File.join(File.expand_path('../test_helper', __FILE__)) class WolverineTest < MiniTest::Unit::TestCase def test_redis Wolverine.config.redis = :redis assert_equ...
```ruby require File.join(File.expand_path('../test_helper', __FILE__)) class WolverineTest < MiniTest::Unit::TestCase def test_redis Wolverine.config.redis = :redis assert_equal :redis, Wolverine.redis end def test_reset! dir = Wolverine.send(:root_directory) assert_equal Wolverine.send(:root_...
null
null
Change rule set description to string Apply this change to `db/migrate/20121008153758_create_rule_sets.rb` and return the full updated file. ```ruby class CreateRuleSets < ActiveRecord::Migration def change create_table :qwester_rule_sets do |t| t.string :title t.string :description t.string :...
```ruby class CreateRuleSets < ActiveRecord::Migration def change create_table :qwester_rule_sets do |t| t.string :title t.text :description t.string :url t.timestamps end create_table :qwester_answers_rule_sets, :id => false do |t| t.integer :answer_id t.integer :...
null
null
Make discriminant test values huge to make mistakes more apparent Apply this change to `enum-map/tests/discriminants.rs` and return the full updated file. ```rust #![no_std] #[macro_use] extern crate enum_map; use enum_map::EnumMap; #[derive(Debug, EnumMap, PartialEq)] enum Discriminants { A = 2, B = 0, ...
```rust #![no_std] #[macro_use] extern crate enum_map; use enum_map::EnumMap; #[derive(Debug, EnumMap, PartialEq)] enum Discriminants { A = 2000, B = 3000, C = 1000, } #[test] fn discriminants() { let mut map = EnumMap::new(); map[Discriminants::A] = 3; map[Discriminants::B] = 2; map[Dis...
null
null
Send mail in the test Apply this change to `webcontact_test.go` and return the full updated file. ```go package nlgids import ( "testing" "github.com/miekg/nlgids/email" "github.com/miekg/nlgids/webcontact" ) func newContact() *webcontact.Contact { return &webcontact.Contact{ Name: "Miek Gieben", Email:...
```go package nlgids import ( "testing" "github.com/miekg/nlgids/email" "github.com/miekg/nlgids/webcontact" ) func newContact() *webcontact.Contact { return &webcontact.Contact{ Name: "Miek Gieben", Email: "miek@miek.nl", Phone: "07774 517 566", Message: "Hee, hoe is het daar?", } } func TestCo...
null
null
Add js target back to Multiplatform0GradleIntegrationTest Apply this change to `integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts` and return the full updated file. ```kotlin import org.jetbrains.dokka.gradle.DokkaTask plugins { kotlin("multiplatform") id("org.jetbrains.dokka") } apply(f...
```kotlin import org.jetbrains.dokka.gradle.DokkaTask plugins { kotlin("multiplatform") id("org.jetbrains.dokka") } apply(from = "../template.root.gradle.kts") kotlin { jvm() linuxX64("linux") macosX64("macos") js() sourceSets { named("commonMain") { dependencies { ...
null
null
Add two test projects to start with Apply this change to `create_db.sql` and return the full updated file. ```sql -- Create the tables. CREATE TABLE users ( name NVARCHAR(320) PRIMARY KEY, -- 320 is the maximum email length. salt CHAR(256), password CHAR(256) -- Password is salted and encrypted. ); CREATE...
```sql -- Create the tables. CREATE TABLE users ( name NVARCHAR(320) PRIMARY KEY, -- 320 is the maximum email length. salt CHAR(256), password CHAR(256) -- Password is salted and encrypted. ); CREATE TABLE projects ( id INT PRIMARY KEY, -- Is this required?? name NVARCHAR(100), -- Type?? percent...
null
null
git-checkout-store: Use Print instead of Println for cmd output Since we're just outputting the output of `git-checkout`, there's already a newline at the end. We don't want to output an extra one, so just send the `git-checkout` output to the screen verbatim. Apply this change to `git-checkout-store/main.go` and ret...
```go package main import ( "bytes" "fmt" "github.com/teddywing/git-checkout-history/utils" "os" "os/exec" ) func main() { args := os.Args[1:] if len(args) > 0 { utils.Store(args[0]) cmd := exec.Command("git", "checkout", args[0]) var out bytes.Buffer cmd.Stderr = &out err := cmd.Run() if err ...
null
null
Update canvas (test dependency only). Apply this change to `package.js` and return the full updated file. ```javascript Package.describe({ name: "froatsnook:bardcode", version: "1.1.0", summary: "Draw 1-D barcodes to Canvases (client and server)", git: "https://github.com/froatsnook/bardcode" }); Pac...
```javascript Package.describe({ name: "froatsnook:bardcode", version: "1.1.0", summary: "Draw 1-D barcodes to Canvases (client and server)", git: "https://github.com/froatsnook/bardcode" }); Package.onUse(function(api) { api.versionsFrom("1.0.3.1"); api.addFiles("lib/01-bardcode.js"); api....
null
null
Fix for infinite recursion in recursive partials example. Apply this change to `examples/recursive_partials/RecursivePartials.php` and return the full updated file. ```php <?php class RecursivePartials extends Mustache { protected $_partials = array( 'child' => "* {{ name }}", ); public $name = 'George'; pub...
```php <?php class RecursivePartials extends Mustache { protected $_partials = array( 'child' => "* {{ name }}\n{{#child}}{{>child}}\n{{/child}}", ); public $name = 'George'; public $child = array( 'name' => 'Dan', 'child' => array( 'name' => 'Justin', 'child' => false, ) ); } ```
null
null
Add explain to the extension of UIImage Apply this change to `RGUIExtension/RGUIExtension/UIImage/UIImage+URL.swift` and return the full updated file. ```swift // // UIImage+URL.swift // RGUIExtension // // Created by RAIN on 15/11/30. // Copyright © 2015年 Smartech. All rights reserved. // import UIKit extensio...
```swift // // UIImage+URL.swift // RGUIExtension // // Created by RAIN on 15/11/30. // Copyright © 2015年 Smartech. All rights reserved. // import UIKit extension UIImage { /** 通过URL路径获取Image - parameter contentsOfURL: 图片的 URL 地址 */ public convenience init?(contentsOfURL URLString: St...
null
null
Use less strict condition to avoid problems with concurrency In latest go versions TestWatcher fails pretty often, because it is "more concurrent" now. Reproducible with go master: while go test github.com/mholt/caddy/middleware/markdown; do :; done Signed-off-by: Alexander Morozov <4efb7da3e38416208b41d8021a942884d8...
```go package markdown import ( "fmt" "strings" "sync" "testing" "time" ) func TestWatcher(t *testing.T) { expected := "12345678" interval := time.Millisecond * 100 i := 0 out := "" stopChan := TickerFunc(interval, func() { i++ out += fmt.Sprint(i) }) // wait little more because of concurrency time.S...
null
null
Set MicrogameCollection dirty in editor update Apply this change to `Assets/Editor/MicrogameCollectionEditor.cs` and return the full updated file. ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; [CustomEditor(typeof(MicrogameCollection))] public class Micr...
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; [CustomEditor(typeof(MicrogameCollection))] public class MicrogameCollectionEditor : Editor { public override void OnInspectorGUI() { MicrogameCollection collection = (MicrogameCollection)target; if (GUIL...
null
null
Create a test.php file to facilitate phpcs quick failure in working copy testing. Apply this change to `test/create_working_copy.sh` and return the full updated file. ```bash #!/bin/bash # This script creates a working copy of grunt-drupal-tasks by initializing a # project using the example in the test/working_copy ...
```bash #!/bin/bash # This script creates a working copy of grunt-drupal-tasks by initializing a # project using the example in the test/working_copy directory. if [ ! -f "Gruntfile.js" ]; then echo "This script should be run from the grunt-drupal-tasks directory."; exit 1; fi; # Initialize the working_copy director...
null
null
Allow dispatch of thunks for side-effects Apply this change to `Sources/Redux/Store.swift` and return the full updated file. ```swift import Foundation final class Store<State>: StoreProtocol { private(set) var state: State { didSet { publish(state) }} private let reduce: Reducer<State> private var subsc...
```swift import Foundation final class Store<State>: StoreProtocol { private(set) var state: State { didSet { publish(state) }} private let reduce: Reducer<State> private var subscribers = [String: (State) -> Void]() private var dispatcher: Dispatch! init (initialState: State, red...
null
null
Test if CI fails on a broken unit test. Apply this change to `ui/test/config.spec.ts` and return the full updated file. ```typescript "use strict"; import chai from "chai"; import {Config} from "../src/app/config"; import {RouterConfigurationStub} from "./stubs"; describe("Config test suite", () => { it("shoul...
```typescript "use strict"; import chai from "chai"; import {Config} from "../src/app/config"; import {RouterConfigurationStub} from "./stubs"; describe("Config test suite", () => { it("should initialize correctly", () => { let routerConfiguration = new RouterConfigurationStub(); let sut = new Co...
null
null
Change argument type to "E extends Entiti" instead of "T" OPEN - task 32: Add "Create Item" functionalities http://github.com/DevOpsDistilled/OpERP/issues/issue/32 Apply this change to `OpERP/src/main/java/devopsdistilled/operp/server/data/service/EntityService.java` and return the full updated file. ```java packag...
```java package devopsdistilled.operp.server.data.service; import java.io.Serializable; import org.springframework.data.jpa.repository.JpaRepository; import devopsdistilled.operp.server.data.entity.Entiti; public interface EntityService<E extends Entiti, ID extends Serializable> extends JpaRepository<E, ID>, Seri...
null
null
Switch magenta for lighter color Apply this change to `src/themes/GradientLight.js` and return the full updated file. ```javascript const BasicColorTheme = require('./templates/BasicColorTheme') const ColorSchemeTransformations = require('./ColorSchemeTransformations') const BasicTiming = require('./timings/BasicTi...
```javascript const BasicColorTheme = require('./templates/BasicColorTheme') const ColorSchemeTransformations = require('./ColorSchemeTransformations') const BasicTiming = require('./timings/BasicTiming') module.exports = { name: 'Gradient - Light', theme: BasicColorTheme( ColorSchemeTransformations.fro...
null
null
Add a blank line in a test so that gofmt won't break the magic comment's location. Apply this change to `testdata/blank-import-lib.go` and return the full updated file. ```go // Test that blank imports in library packages are flagged. // Package foo ... package foo // The instructions need to go before the imports ...
```go // Test that blank imports in library packages are flagged. // Package foo ... package foo // The instructions need to go before the imports below so they will not be // mistaken for documentation. /* MATCH /blank import/ */ import _ "encoding/json" import ( "fmt" /* MATCH /blank import/ */ _ "os" /* MAT...
null
null
Add unfinished loop to encode message Apply this change to `PSET2/caesar.c` and return the full updated file. ```c #include <stdio.h> #include <cs50.h> int main(int argc, char *argv[]) { // check entered key if (argc != 2 || atoi(argv[1]) < 0) { printf("Usage: ./caesar k\nWhere k is a non negative ...
```c #include <stdio.h> #include <cs50.h> #include <string.h> #define ALPHA_NUM 26 int main(int argc, char *argv[]) { // check argument number and argument key to be greater than -1 if (argc != 2 || atoi(argv[1]) < 0) { printf("Usage (k >= 0):\n./caesar k \n"); return 1; } int key = a...
null
null
Deploy indexes to speed up the database upgrade process significantly Apply this change to `res/raw/migrate_v4_xfer.sql` and return the full updated file. ```sql INSERT INTO objects (account, id, objectType, published, updated, _json) SELECT 1, id, objectType, published, updated, _json FRO...
```sql INSERT INTO objects (account, id, objectType, published, updated, _json) SELECT 1, id, objectType, published, updated, _json FROM objects_old; CREATE INDEX ix_objects_by_just_id ON objects (id, _ID); CREATE INDEX ix_objects_old_by_id ON objects_old (id, author, inReplyTo); UPDATE ob...
null
null
Use high-resolution timestamps in verbose mode only Apply this change to `apps/sniff.go` and return the full updated file. ```go package main import ( "log" "os" "os/signal" "github.com/ecc1/medtronic" ) const ( verbose = false ) var ( signalChan = make(chan os.Signal, 1) ) func main() { pump, err := medt...
```go package main import ( "log" "os" "os/signal" "github.com/ecc1/medtronic" ) const ( verbose = true ) var ( signalChan = make(chan os.Signal, 1) ) func main() { if verbose { log.SetFlags(log.Ltime | log.Lmicroseconds | log.LUTC) } pump, err := medtronic.Open() if err != nil { log.Fatal(err) } ...
null
null
Revert "Add bounds checking to BaseHandler.read()" This reverts commit 045ead44ef69d6ebf2cb0dddf084762efcc62995. Apply this change to `handlers/base_handler.py` and return the full updated file. ```python from collections import OrderedDict class BaseHandler: def __init__(self, file, file_name): self.f...
```python from collections import OrderedDict class BaseHandler: def __init__(self, file, file_name): self.file = file self.file_name = file_name self.info = OrderedDict() def read(self, offset, size): return self.file[offset:offset + size] ```
null
null
Update with the new entry_before_display hook Apply this change to `extension.php` and return the full updated file. ```php <?php class HelloWorldExtension extends Minz_Extension { public function init() { Minz_View::appendStyle($this->getFileUrl('style.css', 'css')); Minz_View::appendScript($this->getFileUrl('...
```php <?php class HelloWorldExtension extends Minz_Extension { public function init() { Minz_View::appendStyle($this->getFileUrl('style.css', 'css')); Minz_View::appendScript($this->getFileUrl('script.js', 'js')); $this->registerController('hello'); $this->registerController('index'); $this->registerViews...
null
null
Add zebra background color for table section. Apply this change to `Resources/windows/table_sections.js` and return the full updated file. ```javascript W.TableSections = function () { var win = UI.Win({title:'Table Sections'}); // Create the first TableViewSections. var section1 = Ti.UI.createTableViewSecti...
```javascript W.TableSections = function () { var win = UI.Win({title:'Table Sections'}); // Create the first TableViewSections. var section1 = Ti.UI.createTableViewSection({headerTitle:'Header 1'}); // Add some rows to this table. for (var i = 0; i < 4; i++) { section1.add(Ti.UI.createTableViewRow({ ...
null
null
Remove rendering for debugging click handlers Apply this change to `app/props/clickable.js` and return the full updated file. ```javascript import Prop from 'props/prop'; import canvas from 'canvas'; import mouse from 'lib/mouse'; // http://stackoverflow.com/questions/16628184/add-onclick-and-onmouseover-to-canvas-el...
```javascript import Prop from 'props/prop'; import canvas from 'canvas'; import mouse from 'lib/mouse'; // http://stackoverflow.com/questions/16628184/add-onclick-and-onmouseover-to-canvas-element export default class Clickable extends Prop { constructor(x, y, width, height, fn) { super(x, y, width, height); ...
null
null
Remove unused worker (and thus a worker leak) Apply this change to `src/main/java/rsc/publisher/PublisherSubscribeOnValue.java` and return the full updated file. ```java package rsc.publisher; import java.util.Objects; import org.reactivestreams.Subscriber; import rsc.flow.Cancellation; import rsc.scheduler.Schedu...
```java package rsc.publisher; import java.util.Objects; import org.reactivestreams.Subscriber; import rsc.flow.Cancellation; import rsc.scheduler.Scheduler; /** * Publisher indicating a scalar/empty source that subscribes on the specified scheduler. * * @param <T> */ final class PublisherSubscribeOnValue<T> e...
null
null
Set correct name for boost IPC Apply this change to `src/qt/qtipcserver.h` and return the full updated file. ```c #ifndef QTIPCSERVER_H #define QTIPCSERVER_H // Define Bitcoin-Qt message queue name #define BITCOINURI_QUEUE_NAME "BitcoinURI" void ipcScanRelay(int argc, char *argv[]); void ipcInit(int argc, char *arg...
```c #ifndef QTIPCSERVER_H #define QTIPCSERVER_H // Define Bitcoin-Qt message queue name #define BITCOINURI_QUEUE_NAME "CrainCoinURI" void ipcScanRelay(int argc, char *argv[]); void ipcInit(int argc, char *argv[]); #endif // QTIPCSERVER_H ```
null
null
Clean only app and web from dist/cnc Apply this change to `gulp/tasks/clean.js` and return the full updated file. ```javascript import gulp from 'gulp'; import del from 'del'; const list = [ 'src/web/**/*.css', 'src/web/**/*.css.map', 'src/web/**/*.js.map', 'dist/**/*', // exclusion '!src/web...
```javascript import gulp from 'gulp'; import del from 'del'; const list = [ 'dist/cnc/app', 'dist/cnc/web', 'src/web/**/*.css', 'src/web/**/*.css.map', 'src/web/**/*.js.map', // exclusion '!src/web/vendor/**' ]; export default (options) => { gulp.task('clean', (callback) => { ...
null
null
Add user reference to post and comment Apply this change to `src/main/resources/db/migration/V4__append_user_reference.sql` and return the full updated file. ```sql /* ALTER TABLE posts ADD user_id INT NOT NULL; ALTER TABLE comments ADD user_id INT NOT NULL; ALTER TABLE posts ADD FOREIGN KEY (user_id) REFERENCES us...
```sql ALTER TABLE posts ADD user_id INT NOT NULL; ALTER TABLE comments ADD user_id INT NOT NULL; ALTER TABLE posts ADD FOREIGN KEY (user_id) REFERENCES users(id); ALTER TABLE comments ADD FOREIGN KEY (user_id) REFERENCES users(id); ```
null
null
Add the button to the screen Apply this change to `JumpingBall/JumpingBall/GameScene.swift` and return the full updated file. ```swift import SpriteKit class GameScene: SKScene { // Play button node let playButton = SKSpriteNode(imageNamed: "play") override func didMoveToView(view: SKView) { ...
```swift import SpriteKit class GameScene: SKScene { // Play button node let playButton = SKSpriteNode(imageNamed: "play") override func didMoveToView(view: SKView) { // Position the play button in the middle of the screen // It position the button in the middle of the frame. s...
null
null
TODO: Move updates to main process Apply this change to `src/workbench/controllers/footer.js` and return the full updated file. ```javascript 'use strict'; /** * Provides controller constructor for footer view. * * @constructor * @param {Object} scope - injected scope object * @param {function} http - angular h...
```javascript /** * Copyright (c) Ajay Sreedhar. All rights reserved. * * Licensed under the MIT License. * Please see LICENSE file located in the project root for more information. */ 'use strict'; /** * Provides controller constructor for footer view. * * @constructor * @param {Object} scope - injected sco...
null
null
Add functionality to new webservice and return all traits to an organism by its id Apply this change to `src/webservice/ajax/details/Traits_to_organism.php` and return the full updated file. ```php <?php namespace ajax\listing; use \PDO as PDO; /** * Web Service. * Returns Trait informatio */ class Traits_to_or...
```php <?php namespace ajax\details; use \PDO as PDO; /** * Web Service. * Returns Trait information to an organism by its id */ class Traits_to_organism extends \WebService { /** * @param $querydata[] * @returns organism id */ public function execute($querydata) { global $db; ...
null
null
Move to the new StripeBasicService instead of StripeService Apply this change to `src/Stripe.net/Services/EphemeralKeys/StripeEphemeralKeyService.cs` and return the full updated file. ```csharp using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Stripe.Infrastructure; namesp...
```csharp using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Stripe.Infrastructure; namespace Stripe { public class StripeEphemeralKeyService : StripeBasicService<StripeEphemeralKey> { public StripeEphemeralKeyService(string apiKey = null) : base(apiKey) { } ...
null
null
Add dbconnection to env support. Apply this change to `platform/main.go` and return the full updated file. ```go package main import ( "flag" "fmt" "github.com/BurntSushi/toml" log "github.com/Sirupsen/logrus" ) func StartServer(config *SiteConfig) { gb := NewGoblin(config) err := gb.Init() if err != nil { ...
```go package main import ( "flag" "fmt" "github.com/BurntSushi/toml" log "github.com/Sirupsen/logrus" "os" ) func StartServer(config *SiteConfig) { gb := NewGoblin(config) err := gb.Init() if err != nil { log.Errorf("Goblin init fail. %s", err) return } gb.StartServer() } func main() { configPtr := f...
null
null
Set `prepareKotlinBuildScriptModel` task group explicitly Apply this change to `subprojects/kotlin-dsl-tooling-builders/src/main/kotlin/org/gradle/kotlin/dsl/tooling/builders/KotlinScriptingModelBuildersRegistrationAction.kt` and return the full updated file. ```kotlin /* * Copyright 2016 the original author or auth...
```kotlin /* * Copyright 2016 the original author or authors. * * 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 ...
null
null
Add index for english fraction Apply this change to `src/SFA.DAS.EAS.Employer_Financial.Database/Tables/EnglishFraction.sql` and return the full updated file. ```sql CREATE TABLE [employer_financial].[EnglishFraction] ( [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY, [DateCalculated] DATETIME NOT NULL, [Amount...
```sql CREATE TABLE [employer_financial].[EnglishFraction] ( [Id] BIGINT NOT NULL PRIMARY KEY IDENTITY, [DateCalculated] DATETIME NOT NULL, [Amount] DECIMAL(18, 5) NULL, [EmpRef] NVARCHAR(50) NULL ) GO CREATE INDEX [IX_EnglishFraction_Empref_DateCalculated] ON [employer_financial].[EnglishFraction] (...
null
null
Fix issue with Ruby < 2.0 and non US-ASCII characters Apply this change to `lib/hanzo/cli.rb` and return the full updated file. ```ruby require 'hanzo/modules/deploy' require 'hanzo/modules/install' module Hanzo class CLI < Base def run @options.parse!(@args) if @opts.respond_to? :parse! puts @optio...
```ruby require 'hanzo/modules/deploy' require 'hanzo/modules/install' module Hanzo class CLI < Base def run @options.parse!(@args) if @opts.respond_to? :parse! puts @options unless @options.to_s == "Usage: hanzo [options]\n" end protected def initialize_variables @app = extract_argu...
null
null
[FC] Allow specifying source rect and arrow direction for popovers Apply this change to `SwiftPlusPlus/iOS/UIViewController+Helpers.swift` and return the full updated file. ```swift // // UIViewController+Helpers.swift // SwiftPlusPlus // // Created by Andrew J Wagner on 4/2/16. // Copyright © 2016 Drewag LLC. Al...
```swift // // UIViewController+Helpers.swift // SwiftPlusPlus // // Created by Andrew J Wagner on 4/2/16. // Copyright © 2016 Drewag LLC. All rights reserved. // import Foundation extension UIViewController { public func present(popoverViewController viewController: UIViewController, fromSourceView sourceVie...
null
null
Remove Path variants that were never constructed Apply this change to `src/path.rs` and return the full updated file. ```rust use std::fmt::{self, Display}; /// Path to the current value in the input, like `dependencies.serde.typo1`. #[derive(Copy, Clone)] pub enum Path<'a> { Root, Seq { parent: &'a Path<'a>...
```rust use std::fmt::{self, Display}; /// Path to the current value in the input, like `dependencies.serde.typo1`. #[derive(Copy, Clone)] pub enum Path<'a> { Root, Seq { parent: &'a Path<'a>, index: usize }, Map { parent: &'a Path<'a>, key: &'a str }, Alias { parent: &'a Path<'a> }, Unknown { pare...
null
null
Fix circular import problem in Django console (PY-9030). Apply this change to `python/helpers/pycharm/django_manage_shell.py` and return the full updated file. ```python #!/usr/bin/env python from fix_getpass import fixGetpass import os from django.core import management import sys try: from runpy import run_modul...
```python #!/usr/bin/env python from fix_getpass import fixGetpass import os from django.core import management import sys try: from runpy import run_module except ImportError: from runpy_compat import run_module def run(working_dir): sys.path.insert(0, working_dir) manage_file = os.getenv('PYCHARM_DJANGO_MA...
null
null
Trim space for multiple media type entries Rack is strict about spaces between entries: https://github.com/rack/rack/blob/master/lib/rack/request.rb#L50-L60 Apply this change to `octokit/octokit.go` and return the full updated file. ```go package octokit const ( gitHubAPIURL = "https://api.github.com" userAge...
```go package octokit const ( gitHubAPIURL = "https://api.github.com" userAgent = "Octokit Go " + version version = "0.3.0" defaultMediaType = "application/vnd.github.v3+json;charset=utf-8" ) ```
null
null
Add aws_s3_bucket resource address to terraform target flag Apply this change to `aws/deploy-local.sh` and return the full updated file. ```bash #!/usr/bin/env bash set -eEuo pipefail script="$(basename "${BASH_SOURCE[0]}")" function usage { echo "Usage: $script" exit 1 } if [[ $# -gt 0 ]]; then echo ...
```bash #!/usr/bin/env bash set -eEuo pipefail script="$(basename "${BASH_SOURCE[0]}")" function usage { echo "Usage: $script" exit 1 } if [[ $# -gt 0 ]]; then echo "No argument excepted" usage fi environment="local" export TF_VAR_region=$AWS_DEFAULT_REGION export TF_VAR_environment=$environment c...
null
null
Create type alias to simplify code Apply this change to `src/errors.rs` and return the full updated file. ```rust use std::fmt; pub enum OscError { BadOscPacket(String), BadOscAddress(String), BadOscMessage(String), BadOscString(String), BadOscBundle, } impl fmt::Display for OscError { fn fm...
```rust use std::fmt; type OscResult<T> = Result<T, OscError>; pub enum OscError { BadOscPacket(String), BadOscAddress(String), BadOscMessage(String), BadOscString(String), BadOscBundle, } impl fmt::Display for OscError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match se...
null
null
Add message to indicate polling has begun Apply this change to `lib/helios/listener.rb` and return the full updated file. ```ruby module Helios class Listener def initialize(aws = nil) @aws ||= (aws || AWS::SQS.new) end def listen! @aws.queues.named('helios').poll do |message| begin...
```ruby module Helios class Listener def initialize(aws = nil) @aws ||= (aws || AWS::SQS.new) end def listen! puts "Beginning polling..." @aws.queues.named('helios').poll do |message| begin puts "Received message:" puts "\t#{message.body}" message =...
null
null
Make public variable instead of extension Apply this change to `Sources/XCUIElement+IsVisible.swift` and return the full updated file. ```swift import XCTest @available(iOS 9.0, OSX 10.11, *) public extension XCUIElement { var isVisible: Bool { return exists && !frame.isEmpty && XCUIApplication().wind...
```swift import XCTest @available(iOS 9.0, OSX 10.11, *) extension XCUIElement { public var isVisible: Bool { return exists && !frame.isEmpty && XCUIApplication().windows.element(boundBy: 0).frame.contains(frame) } } ```
null
null
Use old Kotlin JVM compiler backend for views-dsl module Apply this change to `modules/views-dsl/build.gradle.kts` and return the full updated file. ```kotlin /* * Copyright 2019-2021 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ plugins { id("com.android.librar...
```kotlin /* * Copyright 2019-2021 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ plugins { id("com.android.library") kotlin("multiplatform") publish } android { setDefaults(generateBuildConfig = true) } kotlin { android() configure(targets) {...
null
null
Update a test case's expected output Apply this change to `validation-test/Sema/SwiftUI/rdar57201781.swift` and return the full updated file. ```swift // RUN: %target-typecheck-verify-swift -target x86_64-apple-macosx10.15 -swift-version 5 // REQUIRES: objc_interop // REQUIRES: OS=macosx import SwiftUI struct Conte...
```swift // RUN: %target-typecheck-verify-swift -target x86_64-apple-macosx10.15 -swift-version 5 // REQUIRES: objc_interop // REQUIRES: OS=macosx import SwiftUI struct ContentView : View { @State var foo: [String] = Array(repeating: "", count: 5) var body: some View { VStack { // expected-error{{type of exp...
null
null
Allow custom context for the roomDb(…) fun Will allow using directBootCtx Apply this change to `arch-room/src/main/java/splitties/arch/room/Room.kt` and return the full updated file. ```kotlin /* * Copyright (c) 2018. Louis Cognault Ayeva Derman * * Licensed under the Apache License, Version 2.0 (the "License"); ...
```kotlin /* * Copyright (c) 2018. Louis Cognault Ayeva Derman * * 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 a...
null
null
Use section attributes for confirm dialog builder section Apply this change to `releaf-core/app/builders/releaf/builders/confirm_dialog_builder.rb` and return the full updated file. ```ruby class Releaf::Builders::ConfirmDialogBuilder include Releaf::Builders::ResourceDialog attr_accessor :form def output ...
```ruby class Releaf::Builders::ConfirmDialogBuilder include Releaf::Builders::ResourceDialog attr_accessor :form def output tag(:section, section_attributes) do form_for(resource, confirm_form_options) do |form| self.form = form safe_join do section_blocks end ...
null
null
Fix inline static local warning Apply this change to `test2/inline/static_local.c` and return the full updated file. ```c // RUN: %check %s // extern extern inline int f() { static int i; return i++; } // static static inline int h() { static int i; return i++; } // neither inline int g() { static int i; // C...
```c // RUN: %check %s // extern extern inline int f() { static int i; return i++; } // static static inline int h() { static int i; return i++; } // neither inline int g() { static int i; // CHECK: warning: mutable static variable in pure-inline function - may differ per file return i++; } // neither, but co...
null
null
Add support for " and ' character literals Apply this change to `src/main/kotlin/venus/riscv/utils.kt` and return the full updated file. ```kotlin package venus.riscv fun userStringToInt(s: String): Int { if (isCharacterLiteral(s)) { return characterLiteralToInt(s) } val radix = when (s.take(2)) ...
```kotlin package venus.riscv fun userStringToInt(s: String): Int { if (isCharacterLiteral(s)) { return characterLiteralToInt(s) } val radix = when (s.take(2)) { "0x" -> 16 "0b" -> 2 else -> return s.toLong().toInt() } return s.drop(2).toLong(radix).toInt() } privat...
null
null
Set the default Iago hostname to localhost Apply this change to `configuration/configuration.go` and return the full updated file. ```go package configuration import ( "flag" "log" "github.com/FogCreek/mini" ) type iagoConfiguration struct { Hostname string Protocol string Port string Path string } ...
```go package configuration import ( "flag" "log" "github.com/FogCreek/mini" ) type iagoConfiguration struct { Hostname string Protocol string Port string Path string } var ( Iago iagoConfiguration ) func Process() { path := flag.String("config", "/etc/miloud.ini", "Configuration file path") flag...
null
null
Rename local var in AdminService Apply this change to `client/src/app/admin/admin.service.ts` and return the full updated file. ```typescript import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import { Observable } from "rxjs"; @Injectable() export class AdminService { private url:...
```typescript import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import { Observable } from "rxjs"; @Injectable() export class AdminService { private url: string = API_URL; constructor(private http:Http) { } getUploadIDs(): Observable<string[]> { return this.http.req...
null
null
Make collisions with invaders destroy the player Apply this change to `core/src/uk/co/alynn/games/ld30/world/Invader.java` and return the full updated file. ```java package uk.co.alynn.games.ld30.world; public abstract class Invader implements Adversary { private final float m_x, m_y; public Invader(fl...
```java package uk.co.alynn.games.ld30.world; public abstract class Invader implements Adversary { private final float m_x, m_y; public Invader(float x, float y) { m_x = x; m_y = y; } @Override public String getImage() { return "invader"; } @Override ...
null
null
Use verticalLayout() in widget compile test Apply this change to `dsl/testData/compile/AndroidWidgetTest.kt` and return the full updated file. ```kotlin package com.example.android_test import android.app.Activity import android.os.Bundle import org.jetbrains.anko.* import android.widget.LinearLayout public open cl...
```kotlin package com.example.android_test import android.app.Activity import android.os.Bundle import org.jetbrains.anko.* import android.widget.LinearLayout public open class MyActivity() : Activity() { public override fun onCreate(savedInstanceState: Bundle?): Unit { super.onCreate(savedInstanceState) ...
null
null
Comment "make check" because it's failing Apply this change to `recipes/graphviz/build.sh` and return the full updated file. ```bash #!/bin/bash export CFLAGS="-Wall -g -m${ARCH} -pipe -O2 -fPIC" export CXXLAGS="${CFLAGS}" export CPPFLAGS="-I${PREFIX}/include" export LDFLAGS="-L${PREFIX}/lib" if [ `uname` == Darwin...
```bash #!/bin/bash export CFLAGS="-Wall -g -m${ARCH} -pipe -O2 -fPIC" export CXXLAGS="${CFLAGS}" export CPPFLAGS="-I${PREFIX}/include" export LDFLAGS="-L${PREFIX}/lib" if [ `uname` == Darwin ]; then ./configure --prefix=$PREFIX \ --with-quartz \ --disable-java \ --...
null
null
Add shortcuts for levels and config Apply this change to `src/Console/Application.php` and return the full updated file. ```php <?php declare(strict_types=1); namespace Rector\Console; use Jean85\PrettyVersions; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Input\Inp...
```php <?php declare(strict_types=1); namespace Rector\Console; use Jean85\PrettyVersions; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; final class Application extends SymfonyApplication { /*...
null
null
Annotate a crash test that depends on AppKit Apply this change to `validation-test/compiler_crashers/28185-llvm-foldingset-swift-genericfunctiontype-nodeequals.swift` and return the full updated file. ```swift // RUN: not --crash %target-swift-frontend %s -parse // REQUIRES: objc_interop // Distributed under the ter...
```swift // RUN: not --crash %target-swift-frontend %s -parse // The test requires that NSControl is a class. Remove this requirement when // the crash is fixed. // REQUIRES: OS=macosx // Distributed under the terms of the MIT license // Test case found by https://github.com/benshan (Ben Shanfelder) import Cocoa p...
null
null
Fix delete duplicate log output label Apply this change to `lib/rundock/operation/task.rb` and return the full updated file. ```ruby module Rundock module Operation class Task < Base def run(backend, attributes = {}) @instruction.each do |i| unless attributes[:task].key?(i) L...
```ruby module Rundock module Operation class Task < Base def run(backend, attributes = {}) @instruction.each do |i| unless attributes[:task].key?(i) Logger.warn("task not found and ignored: #{i}") next end backend.run_commands(attributes[:task]...
null
null
Reset image when choosing new filter Apply this change to `src/ui/RGBPanel.java` and return the full updated file. ```java package ui; import rgb.InvertRGBStrategy; import rgb.RGBStrategy; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; /** * Created by nick on 10/22/15. */ public c...
```java package ui; import rgb.InvertRGBStrategy; import rgb.RGBStrategy; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; /** * Created by nick on 10/22/15. */ public class RGBPanel extends JPanel { private BufferedImage originalImage; private BufferedImage image; private...
null
null
Fix fetching R2DT hits for precompute Apply this change to `files/precompute/queries/r2dt-hits.sql` and return the full updated file. ```sql COPY ( select json_build_object( 'id', todo.id, 'urs_id', todo.precompute_urs_id, 'urs_taxid', todo.urs_taxid, 'model_id', r2dt.id, 'model_name', r2dt.mode...
```sql COPY ( select json_build_object( 'id', todo.id, 'urs_id', todo.precompute_urs_id, 'urs_taxid', todo.urs_taxid, 'model_id', r2dt.id, 'model_name', r2dt.model_name, 'model_source', r2dt.model_source, 'model_so_term', r2dt.so_term_id, 'sequence_coverage', ss.sequence_coverage, ...
null
null
[kafka] Add a new flag for cluster name It's cleaner for the cluster name to be a separate flag (than being included in the suffix). Separating it out in this diff. Apply this change to `common/kafka/stats_enum.cpp` and return the full updated file. ```cpp /// Copyright 2019 Pinterest Inc. /// /// Licensed under the...
```cpp /// Copyright 2019 Pinterest Inc. /// /// 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 a...
null
null
Add complex support for tan At the moment tan in tensorflow supports float and double, but not complex types. This fix adds the support for tan, and removes related TODO in the test Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com> Apply this change to `tensorflow/core/kernels/cwise_op...
```cpp /* Copyright 2015 The TensorFlow Authors. 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
null
null
Add rust code for pascals-triangle case It passed all testcases Apply this change to `rust/pascals-triangle/src/lib.rs` and return the full updated file. ```rust pub struct PascalsTriangle; impl PascalsTriangle { pub fn new(row_count: u32) -> Self { unimplemented!(); } pub fn rows(&self) -> Vec...
```rust pub struct PascalsTriangle { row: u32, } impl PascalsTriangle { pub fn new(row_count: u32) -> Self { PascalsTriangle { row: row_count } } fn pascal(row: u32) -> Vec<u32> { let mut result = Vec::with_capacity(row as usize); result.push(1); for k in 0..row { ...
null
null
Add more information to SnowballStemmer Apply this change to `examples/snowball_stemmer_example.py` and return the full updated file. ```python #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer from nltk import word_tokenize stemmer = H...
```python #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer from nltk import word_tokenize stemmer = HungarianStemmer() test_sentence = "Péter szereti Enikőt és Marit" tokenized_sentence = word_tokenize(test_sentence) print('With Snowb...
null
null
Fix for treating enum types as primitives due non-enumeration facets Apply this change to `Src/Codge.Generator/Presentations/Xsd/XmlSchemaExtensions.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; usin...
```csharp using System.Collections.Generic; using System.Linq; using System.Xml.Schema; namespace Codge.Generator.Presentations.Xsd { public static class XmlSchemaExtensions { public static bool IsEmptyType(this XmlSchemaComplexType type) { return type.ContentModel == null && type....
null
null
Move handling the error into separate method. Apply this change to `lib/travis/hub/error_reporter.rb` and return the full updated file. ```ruby require 'thread' require 'hubble' require 'active_support/core_ext/class/attribute' module Travis class Hub class ErrorReporter class_attribute :queue attr...
```ruby require 'thread' require 'hubble' require 'active_support/core_ext/class/attribute' module Travis class Hub class ErrorReporter class_attribute :queue attr_accessor :thread self.queue = Queue.new def run @thread = Thread.new &method(:error_loop) end def error...
null
null
Remove hack for lua pkg-config file Apply this change to `recipes/rpm-tools/build.sh` and return the full updated file. ```bash #!/usr/bin/env bash LUA_VERSION=$(lua -v | cut -f 2 -d ' ') (sed -e "s@LUA_VERSION@${LUA_VERSION}@g" -e "s@CONDA_PREFIX@${PREFIX}@g" | \ sed -E "s@^(V=.+)\.[0-9]+@\1@g" \ > "lua.pc") << "...
```bash #!/usr/bin/env bash ./configure \ --prefix="${PREFIX}" \ --enable-python \ --with-external-db \ --with-lua \ --with-cap \ PYTHON="${PYTHON}" make "-j${CPU_COUNT}" install make check make installcheck "${PYTHON}" -m pip install ./python -vv ```
null
null
Clean up old folders from the content model store Apply this change to `rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/workspace/UnitySolutionManagerExtensions.kt` and return the full updated file. ```kotlin package com.jetbrains.rider.plugins.unity.workspace import com.intellij.ide.util.PropertiesComponent...
```kotlin package com.jetbrains.rider.plugins.unity.workspace import com.intellij.ide.util.PropertiesComponent import com.jetbrains.rdclient.util.idea.toVirtualFile import com.jetbrains.rider.UnityProjectDiscoverer import com.jetbrains.rider.projectView.SolutionManagerExtensions import java.nio.file.Path class UnityS...
null
null
Add data-automation tag to text field error message Apply this change to `react/fields/TextField/TextField.js` and return the full updated file. ```javascript import styles from './TextField.less'; import React, { Component, PropTypes } from 'react'; import classNames from 'classnames'; import ErrorIcon from '../.....
```javascript import styles from './TextField.less'; import React, { Component, PropTypes } from 'react'; import classNames from 'classnames'; import ErrorIcon from '../../icons/ErrorIcon/ErrorIcon'; export default class TextField extends Component { static propTypes = { className: PropTypes.string, input...
null
null
Return JIRA home directory SAL-59 git-svn-id: 2433085265c0232ec46d186f8a8240da49417e22@36264 2c54a935-e501-0410-bc05-97a93f6bca70 Apply this change to `sal-jira-plugin/src/main/java/com/atlassian/sal/jira/JiraApplicationProperties.java` and return the full updated file. ```java package com.atlassian.sal.jira; impor...
```java package com.atlassian.sal.jira; import com.atlassian.jira.util.BuildUtils; import com.atlassian.jira.util.velocity.VelocityRequestContextFactory; import com.atlassian.jira.config.util.JiraHome; import com.atlassian.sal.api.ApplicationProperties; import java.util.Date; import java.io.File; /** * JIRA impleme...
null
null
Fix parens after inline block Apply this change to `config/routes.rb` and return the full updated file. ```ruby Rails.application.routes.draw do get "/rails/active_storage/disk/:encoded_key/*filename" => "active_storage/disk#show", as: :rails_disk_blob post "/rails/active_storage/direct_uploads" => "active_stora...
```ruby Rails.application.routes.draw do get "/rails/active_storage/disk/:encoded_key/*filename" => "active_storage/disk#show", as: :rails_disk_blob post "/rails/active_storage/direct_uploads" => "active_storage/direct_uploads#create", as: :rails_direct_uploads get "/rails/active_storage/variants/:encoded_blob...
null
null
Add compress/decompress subcommands to pdfutil Apply this change to `pdfutil/src/main.rs` and return the full updated file. ```rust extern crate lopdf; use lopdf::{Document}; #[macro_use] extern crate clap; use clap::{App, Arg}; fn main() { let arguments = App::new("PDF utility program using lopdf library") .ver...
```rust extern crate lopdf; use lopdf::Document; #[macro_use] extern crate clap; use clap::{App, Arg, SubCommand}; fn main() { let app = App::new("PDF utility program using lopdf library") .version(crate_version!()) .author(crate_authors!()) .arg(Arg::with_name("input") .short("i") .long("input") .val...
null
null
Test: Update swift 5 keypath tests to reflect and test new behavior Apply this change to `test/Constraints/keypath_swift_5.swift` and return the full updated file. ```swift // RUN: %target-swift-frontend -typecheck -verify %S/Inputs/keypath.swift -primary-file %s -swift-version 5 struct S { let i: Int init() { ...
```swift // RUN: %target-swift-frontend -typecheck -verify %S/Inputs/keypath.swift -primary-file %s -swift-version 5 struct S { let i: Int init() { let _: WritableKeyPath<S, Int> = \.i // expected-error {{cannot convert value of type 'KeyPath<S, Int>' to specified type 'WritableKeyPath<S, Int>'}} S()[key...
null
null
Fix for browser type checking when undefined or null When a browser called getType on an undefined or null value it returns “DOMWindow” instead of “[object Undefined]” (in some cases at least). Let’s treat undefined and null special and simply return them as “undefined” and “null”, respectively. Apply this change to ...
```javascript msngr.extend((function () { "use strict"; return { utils: { getType: function (obj) { if (!msngr.utils.exists(obj)) { return "" + obj; } return Object.prototype.toString.call(obj); }, isNullOrUndefined: function (obj) { return (obj === undefined || obj === null); }, ...
null
null
Fix prices with only 2 decimal places not working. Apply this change to `SourceSchemaParser/JsonConverters/DotaSchemaItemPriceJsonConverter.cs` and return the full updated file. ```csharp using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using Syste...
```csharp using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SourceSchemaParser.JsonConverters { public class DotaSchemaItemPriceJsonConverter : JsonConverter { public override...
null
null
Make sure default options are used when partial options are supplied Closes #6 Apply this change to `index.ts` and return the full updated file. ```typescript import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core"; import { AirOptions } from "./lib/options"; import { AirCalendar } from "./li...
```typescript import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core"; import { AirOptions } from "./lib/options"; import { AirCalendar } from "./lib/calendar"; import { LANGUAGES, AirLanguage } from "./lib/languages"; @Component({ selector: 'air-datepicker', templateUrl: './template.ht...
null
null
Read initial commands from file Apply this change to `uiMain.cpp` and return the full updated file. ```cpp #include <iostream> #include <memory> #include <boost/interprocess/ipc/message_queue.hpp> #include "messageQueue.h" using namespace boost::interprocess; int main() { std::unique_ptr<message_queue> mq = nu...
```cpp #include <iostream> #include <memory> #include <fstream> #include <boost/interprocess/ipc/message_queue.hpp> #include "messageQueue.h" using namespace boost::interprocess; int main() { std::unique_ptr<message_queue> mq = nullptr; try { mq = std::make_unique<message_queue>(open_only, mqName); ...
null
null
Change string to LibraryGroup for CAMERA Test: ./gradlew --no-daemon -PofflineDocs=true buildOnServer Test: ./gradlew --no-daemon test Test: ./gradlew --no-daemon buildTestApks -Pandroidx.enableAffectedModuleDetection Change-Id: I91992ac10e90eccd66c7aef820a11eb4a9f4f0e6 Apply this change to `buildSrc/src/main/kotlin...
```kotlin package androidx.build /** * Library groups for unpublished libraries. * * <p>This is being used temporarily for development of androidx.camera. * TODO(b/124783972): Merge into LibraryGroups.kt when ready. */ object UnpublishedLibraryGroups { val CAMERA = LibraryGroup("androidx.camera", false) } ```
null
null
Make sure a ball can't happen while a goal has already happened! Apply this change to `Assets/Client/Controllers/BallController.cs` and return the full updated file. ```csharp using System; using Client.Common; using Client.Game; using UnityEngine; namespace Client.Controllers { // Create a ball. Once there is ...
```csharp using System; using Client.Common; using Client.Game; using UnityEngine; namespace Client.Controllers { // Create a ball. Once there is a Goal, create a new // ball at the given time frame. public class BallController : MonoBehaviour { [SerializeField] [Tooltip("The soccer ba...
null
null
Add template section for page menu. Apply this change to `application/views/templates/default/index.php` and return the full updated file. ```php <?php $website_name = (isset($page_title)) ? $page_title . ' - ' . lang('website_name') : lang('website_name'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="u...
```php <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title><?php echo (isset($page_title)) ? $page_title . ' - ' . lang('website_name') : lang('website_name'); ?></title> <base href="<?php echo base_url(); ?>" /> <link rel="shortcut icon" href="<?php echo base_url('favicon.ico'); ?>" /> <?php ech...
null
null
Remove keyPrefix from the channel passed into the callback Apply this change to `src/subscribers/redis-subscriber.ts` and return the full updated file. ```typescript var Redis = require('ioredis'); import { Log } from './../log'; import { Subscriber } from './subscriber'; export class RedisSubscriber implements Subs...
```typescript var Redis = require('ioredis'); import { Log } from './../log'; import { Subscriber } from './subscriber'; export class RedisSubscriber implements Subscriber { /** * Redis pub/sub client. * * @type {object} */ private _redis: any; /** * * KeyPrefix for used in t...
null
null
Fix Framework::programDirectory on OS X Apply this change to `lms/core/main/framework_unix.cpp` and return the full updated file. ```cpp //TODO remove unused imports #include <climits> #include <cstring> #include <unistd.h> #include <sys/stat.h> #include <algorithm> #include <string> #include <core/loader.h> #includ...
```cpp //TODO remove unused imports #include <climits> #include <cstring> #include <unistd.h> #include <sys/stat.h> #include <algorithm> #include <string> #include <core/loader.h> #include <core/module.h> #include <core/logger.h> #include <core/framework.h> #ifdef __APPLE__ #include <mach-o/dyld.h> #endif namesp...
null
null
Add flag to not escape slashes in json encoding Apply this change to `lib/JWX/JWT/Claims.php` and return the full updated file. ```php <?php namespace JWX\JWT; use JWX\JWT\Claim\Claim; class Claims { /** * Claims * * @var Claim[] $_claims */ protected $_claims; /** * Constructor * * @param Clai...
```php <?php namespace JWX\JWT; use JWX\JWT\Claim\Claim; class Claims { /** * Claims * * @var Claim[] $_claims */ protected $_claims; /** * Constructor * * @param Claim ...$claims */ public function __construct(Claim ...$claims) { $this->_claims = $claims; } /** * Initialize from JSON ...
null
null
Fix for upgrade issue from 0.7.4 to 0.8.0 This fixes the following problem found during testing: ``` ALTER EXTENSION cartodb UPDATE TO '0.8.0'; ERROR: cannot change return type of existing function HINT: Use DROP FUNCTION cdb_usertables(text) first. ``` Apply this change to `scripts-available/CDB_UserTables.sql` an...
```sql -- Function returning list of cartodb user tables -- -- The optional argument restricts the result to tables -- of the specified access type. -- -- Currently accepted permissions are: 'public', 'private' or 'all' -- DROP FUNCTION IF EXISTS cdb_usertables(text); CREATE OR REPLACE FUNCTION CDB_UserTables(perm text...
null
null
Check for missing arguments and show a usage in that case Apply this change to `library/remove-from-tg.sh` and return the full updated file. ```bash #!/bin/sh -x # This file is part of the Ops-T Portal. # # Copyright 2014 Operations Security Administration, Inc. # # Licensed under the Apache License, Version 2.0...
```bash #!/bin/sh -x # This file is part of the Ops-T Portal. # # Copyright 2014 Operations Security Administration, Inc. # # 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 # # ht...
null
null
Fix line size too long Apply this change to `src/Dy/Ring/Rule/SizeRule.php` and return the full updated file. ```php <?php /** * Created by PhpStorm. * User: gpl * Date: 15/10/27 * Time: 下午2:55 */ namespace Dy\Ring\Rule; use Dy\Ring\Exception\InvalidArgumentException; use Dy\Ring\Exception\OutOfBoundsException...
```php <?php /** * Created by PhpStorm. * User: gpl * Date: 15/10/27 * Time: 下午2:55 */ namespace Dy\Ring\Rule; use Dy\Ring\Exception\InvalidArgumentException; use Dy\Ring\Exception\OutOfBoundsException; use Dy\Ring\Source\AbstractSource; final class SizeRule extends AbstractRule { /** * @var int *...
null
null
Update dependencies so installation is simpler. The pull request, and a new release of py-moneyed has occurred. Apply this change to `setup.py` and return the full updated file. ```python from distutils.core import setup # Load in babel support, if available. try: from babel.messages import frontend as babel ...
```python from distutils.core import setup # Load in babel support, if available. try: from babel.messages import frontend as babel cmdclass = {"compile_catalog": babel.compile_catalog, "extract_messages": babel.extract_messages, "init_catalog": babel.init_catalog, ...
null
null
Install some of the metrics tools. Apply this change to `works_in_progress/centos-7-amd64/scripts/yum.sh` and return the full updated file. ```bash #Yum and RPM package installations #Install the EPEL 7 beta: rpm -Uvhi http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm #Install the Cen...
```bash #Yum and RPM package installations #Install the EPEL 7 beta: rpm -Uvhi http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm #Install the CentOS Software Collections repo. More info available here: # https://access.redhat.com/site/documentation/en-US/Red_Hat_Software_Collections/1/h...
null
null
Solve bug henk import script Apply this change to `src/StudentFollowingSystem/Views/Students/Import.cshtml` and return the full updated file. ```csharp @{ ViewBag.Title = "Studenten importeren"; } <h2>Studenten importeren</h2> @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-hori...
```csharp @{ ViewBag.Title = "Studenten importeren"; } <h2>Studenten importeren</h2> @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"> <p>Kopieer het CSV bestand in het veld hieronder.</p> <textarea name="csv" id="csv" class="form-control"></textarea> ...
null
null