original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Copy config file as private read-only. Apply this change to `deploy.sh` and return the full updated file. ```bash #!/bin/bash set -eu if [[ $# -ne 1 ]]; then echo >&2 "Usage: $0 statbot-config.json" exit 1 fi repo_dir="$(dirname "$0")" dest_dir=~statbot/repo mkdir -p "$dest_dir" cp -a "$repo_dir" "$dest_dir" cho...
```bash #!/bin/bash set -eu if [[ $# -ne 1 ]]; then echo >&2 "Usage: $0 statbot-config.json" exit 1 fi repo_dir="$(dirname "$0")" dest_dir=~statbot/repo mkdir -p "$dest_dir" cp -a "$repo_dir" "$dest_dir" chown -R statbot "$dest_dir" install -m400 "$1" "$dest_dir/config.json" install -m644 "$repo_dir/misc/statbot.s...
null
null
Set default for bindable in object initializer Fixes the CI failure. Apply this change to `osu.Game/Screens/Edit/Verify/VisibilitySection.cs` and return the full updated file. ```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for f...
```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Overlays; using osu.Game.Overlays.Settings; using os...
null
null
Fix error in `pip install` command. PiperOrigin-RevId: 341479312 Apply this change to `kokoro/common.sh` and return the full updated file. ```bash #!/bin/bash # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
```bash #!/bin/bash # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
null
null
Extend logging of error, related to android.media.MediaMetadataRetriever.MediaMetadataRetriever (occurs at Travis-ci) Apply this change to `app/src/androidTest/kotlin/org/andstatus/app/graphics/MediaMetadataTest.kt` and return the full updated file. ```kotlin /* * Copyright (c) 2020 yvolk (Yuri Volkov), http://yuriv...
```kotlin /* * Copyright (c) 2020 yvolk (Yuri Volkov), http://yurivolkov.com * * 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 * * U...
null
null
Use a test notifier instead of stub Apply this change to `worker/spec/notification_service_spec.rb` and return the full updated file. ```ruby require 'spec_helper' describe NotificationService do let(:created_at) { Time.now } let(:device_notification_attrs) { { "creator" => { "id" => 1, "email" ...
```ruby require 'spec_helper' describe NotificationService do let(:created_at) { Time.now } let(:device_notification_attrs) { { "creator" => { "id" => 1, "email" => "eric@example.com" }, "devices" => [{ "device_id" => "device id", "device_type" => "android" }], "s3_file...
null
null
Raise the deployment target to 10.8 because of a used NSNib method. Apply this change to `KSPAutomaticHeightCalculationTableCellView.podspec` and return the full updated file. ```ruby Pod::Spec.new do |spec| spec.name = 'KSPAutomaticHeightCalculationTableCellView' spec.version = '1.0.0' spec.authors = {'Kons...
```ruby Pod::Spec.new do |spec| spec.name = 'KSPAutomaticHeightCalculationTableCellView' spec.version = '1.0.0' spec.authors = {'Konstantin Pavlikhin' => 'k.pavlikhin@gmail.com'} spec.social_media_url = 'https://twitter.com/kpavlikhin' spec.license = {:type => 'MIT', :file => 'License.md'} spec.homepa...
null
null
Fix an error that made it not go-buildable. Signed-off-by: Ronald G. Minnich <f569d0af9a3481c4007b95c7180d6c41009f2513@gmail.com> Apply this change to `p/srv/examples/ufs/ufs.go` and return the full updated file. ```go // Copyright 2009 The go9p Authors. All rights reserved. // Use of this source code is governed b...
```go // Copyright 2009 The go9p Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "flag" "log" "github.com/lionkov/go9p/p/srv/ufs" ) var ( debug = flag.Int("d", 0, "print debug messages") addr = flag.Str...
null
null
Make all apt-get installs automatically install.` Apply this change to `phpbridge.sh` and return the full updated file. ```bash #! /bin/bash # Install applications and files to Raspberry Pi that are needed for PHPBridge $packages = [ aptitude tightvncserver gedit gedit-source-code-browser-plugin git apache2...
```bash #! /bin/bash # Install applications and files to Raspberry Pi that are needed for PHPBridge $packages = [ aptitude tightvncserver gedit gedit-source-code-browser-plugin git apache2 php5 php5-cli php5-xdebug mysql-client mysql-server ] for package in $packages; do sudo apti-get install $package ...
null
null
Add ES 3.0 support for iPhone Apply this change to `gfx/gl_common.h` and return the full updated file. ```c #ifndef _GL_COMMON_H #define _GL_COMMON_H #if defined(USING_GLES2) #ifdef IOS // I guess we can soon add ES 3.0 here too #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> #else #include <GLES2/gl2.h...
```c #ifndef _GL_COMMON_H #define _GL_COMMON_H #if defined(USING_GLES2) #ifdef IOS #include <OpenGLES/ES3/gl.h> #include <OpenGLES/ES3/glext.h> #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> #else #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #ifndef MAEMO #include <EGL/egl.h> #endif // !MAEMO #endif ...
null
null
Disable failing spec for now Apply this change to `test/maml/maml-spec.ts` and return the full updated file. ```typescript import { expect } from "chai"; import { Frame, FrameExpr, FrameString } from "../../src/frames"; import { maml } from "../../src/maml"; describe("maml", () => { const text = "Hello, MAML!"; ...
```typescript import { expect } from "chai"; import { Frame, FrameExpr, FrameString } from "../../src/frames"; import { maml } from "../../src/maml"; describe("maml", () => { const text = "Hello, MAML!"; const body = new FrameString(text); const result = maml.call(body); const result_string = result.toString()...
null
null
Change var declaration to const. Apply this change to `src/utils/notifications.ts` and return the full updated file. ```typescript import { SearchResult } from '../types'; import { formatAsCurrency } from './formatting'; import { secondsToMinutes } from './dates'; export var requestNotificationPermission = async...
```typescript import { SearchResult } from '../types'; import { formatAsCurrency } from './formatting'; import { secondsToMinutes } from './dates'; export const requestNotificationPermission = async (): Promise< NotificationPermission > => { try { return await Notification.requestPermission(); } cat...
null
null
Revert removing returning value, actually call execute and print result Apply this change to `problem1-swift/problem1.swift` and return the full updated file. ```swift /** If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Fin...
```swift /** If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. */ let MAX = 1000 // Upperbound let factors:Array<Int> = [3,5] //...
null
null
Change ValueNotAllowedError code & message to match ActiveModel::Errors. Apply this change to `lib/input_sanitizer/errors.rb` and return the full updated file. ```ruby module InputSanitizer class OptionalValueOmitted < StandardError; end class KeyNotAllowedError < ArgumentError; end class ValidationError < S...
```ruby module InputSanitizer class OptionalValueOmitted < StandardError; end class KeyNotAllowedError < ArgumentError; end class ValidationError < StandardError attr_accessor :field attr_reader :value end class ConversionError < ValidationError; end class ValueMissingError < ValidationError ...
null
null
Update userHandle to be consistent in all examples instead of random Apply this change to `Source/CodeBlueDev.PluralSight.Core.Models/CourseExerciseFiles.cs` and return the full updated file. ```csharp // ----------------------------------------------------------------------------------------------------------------...
```csharp // -------------------------------------------------------------------------------------------------------------------- // <copyright file="CourseExerciseFiles.cs" company="CodeBlueDev"> // All rights reserved. // </copyright> // <summary> // Represents a PluralSight Course's exercise files information. ...
null
null
Add test case for remove_dir_contents We check a few error behaviours too. Signed-off-by: Ian Jackson <d68d4287c1430ca128ad85033356c9d259238c74@chiark.greenend.org.uk> Apply this change to `src/portable.rs` and return the full updated file. ```rust use std::io; use std::path::Path; #[cfg(windows)] use crate::fs::_...
```rust use std::io; use std::path::Path; #[cfg(windows)] use crate::fs::_remove_dir_contents; #[cfg(not(windows))] use crate::unix::_remove_dir_contents; /// Deletes the contents of `dir_path`, but not the directory iteself. /// /// If `dir_path` is a symlink to a directory, deletes the contents /// of that directo...
null
null
Update Axe Cop plugin for 1.7.9 compatibility Apply this change to `af_axecop/init.php` and return the full updated file. ```php <?php class Af_AxeCop extends Plugin { function about() { return array(0.1, "Fetch image from the Axe Cop webcomic", "Markus Wiik"); } function init($host) { $...
```php <?php class Af_AxeCop extends Plugin { function about() { return array(0.1, "Fetch image from the Axe Cop webcomic", "Markus Wiik"); } function init($host) { $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); } function hook_article_filter($article) { $owner_uid = ...
null
null
Fix error in travis script Apply this change to `.travis-ci.sh` and return the full updated file. ```bash echo "yes" | sudo add-apt-repository ppa:avsm/ocaml41+opam12 sudo apt-get update -qq sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam sudo apt-get install libpcre3-dev libssl-dev export OPA...
```bash echo "yes" | sudo add-apt-repository ppa:avsm/ocaml41+opam12 sudo apt-get update -qq sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam sudo apt-get install libpcre3-dev libssl-dev export OPAMYES=1 opam init eval `opam config env` case $OCSIGENSERVER3 in true) opam repository ad...
null
null
Implement method hash for Entry Former-commit-id: 83a82707f122ae14a204ea50723eeae0aa8e871a Apply this change to `exonum/src/storage2/entry.rs` and return the full updated file. ```rust use std::marker::PhantomData; use super::{BaseIndex, BaseIndexIter, Result, Snapshot, Fork, StorageKey, StorageValue}; pub struct...
```rust use std::marker::PhantomData; use crypto::Hash; use super::{BaseIndex, BaseIndexIter, Result, Snapshot, Fork, StorageKey, StorageValue}; pub struct Entry<T, V> { base: BaseIndex<T>, _v: PhantomData<V>, } impl<T, V> Entry<T, V> { pub fn new(prefix: Vec<u8>, base: T) -> Self { Entry { ...
null
null
Add API endpoint for getting tasks from a list Apply this change to `app/Http/routes.php` and return the full updated file. ```php <?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | ...
```php <?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | This route group applies the "web" middleware group to every route | it contains. The "web" middleware group is defined in you...
null
null
Disable test failing since r29947. TBR=tony@chromium.org Review URL: http://codereview.chromium.org/338006 git-svn-id: http://src.chromium.org/svn/trunk/src@29966 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 00b4a1b4b87ba3177230f64998343d95dfafdff3 Apply this change to `chrome/browser/extensions/extensio...
```cpp // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" // Started failing with r29947. WebKit merge 49961:49992. IN_PROC_BROWSER_TEST_F(DISA...
null
null
Bring back public headers search path Apply this change to `Package.swift` and return the full updated file. ```swift // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "AudioKit", ...
```swift // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "AudioKit", platforms: [.macOS(.v10_14), .iOS(.v13), .tvOS(.v13)], products: [.library(name: "AudioKit", targets: ["Au...
null
null
Update podspec for local fork Apply this change to `TSMessages.podspec` and return the full updated file. ```ruby Pod::Spec.new do |s| s.name = "TSMessages" s.version = "0.9.9" s.summary = "Easy to use and customizable messages/notifications for iOS à la Tweetbot." s.description = <<-DESC ...
```ruby Pod::Spec.new do |s| s.name = "TSMessages" s.version = "0.9.9" s.summary = "Easy to use and customizable messages/notifications for iOS à la Tweetbot." s.description = <<-DESC This framework provides an easy to use class to show little notification views on the top...
null
null
Make sure Docker has the AUFS module installed and activated. Apply this change to `scripts/docker.sh` and return the full updated file. ```bash #!/bin/bash # Add the Docker repository to your apt sources list. sudo apt-get -y install curl wget git sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" sud...
```bash #!/bin/bash # Add the Docker repository to your apt sources list. sudo apt-get -y install curl wget git sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" # Update your sources sudo apt-get update...
null
null
Add methods to the storage interface to inject query an error log processors Apply this change to `src/Storage/StorageInterface.php` and return the full updated file. ```php <?php namespace Silktide\Reposition\Storage; use Silktide\Reposition\QueryBuilder\TokenSequencerInterface; use Silktide\Reposition\Metadata\En...
```php <?php namespace Silktide\Reposition\Storage; use Silktide\Reposition\QueryBuilder\TokenSequencerInterface; use Silktide\Reposition\Metadata\EntityMetadataProviderInterface; use Silktide\Reposition\Storage\Logging\QueryLogProcessorInterface; use Silktide\Reposition\Storage\Logging\ErrorLogProcessorInterface; /...
null
null
Fix token given story hrefs Summary: derp to tha derp Fixes T2578. Test Plan: click click Reviewers: chad Reviewed By: chad CC: aran Maniphest Tasks: T2578 Differential Revision: https://secure.phabricator.com/D5054 Apply this change to `src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php` and retu...
```php <?php final class PhabricatorTokenGivenFeedStory extends PhabricatorFeedStory { public function getPrimaryObjectPHID() { return $this->getValue('objectPHID'); } public function getRequiredHandlePHIDs() { $phids = array(); $phids[] = $this->getValue('objectPHID'); $phids[] = $this->getV...
null
null
Remove "Journal of Micropalaeontology" from The Geological Society of London See https://github.com/citation-style-language/journals/pull/60 (journal moved to Copernicus) Apply this change to `the-geological-society/_journals.tab` and return the full updated file. ```sql Title ISSN eISSN Engineering Geology Special ...
```sql Title ISSN eISSN Engineering Geology Special Publications 0267-9914 2041-4730 Geochemistry: Exploration, Environment, Analysis 1467-7873 2041-4943 Geological Society, London, Memoirs 0435-4052 2041-4722 Geological Society, London, Special Publications 0305-8719 2041-4927 Journal of the Geological Society 0016-76...
null
null
Simplify and cleanup previous commit. Apply this change to `numba/tests/broken_issues/test_closure_modulo.py` and return the full updated file. ```python from numba import autojit import numpy as np print np.zeros(10).dtype @autojit def closure_modulo(a, b): c = np.zeros(10) @jit('f8[:]()') def foo(): ...
```python from numba import autojit @autojit def closure_modulo(a, b): @jit('int32()') def foo(): return a % b return foo() print closure_modulo(100, 48) ```
null
null
Set database character set to UTF-8 Apply this change to `db/create_database.sql` and return the full updated file. ```sql -- Script: create_database.sql -- -- Description: Creates (or recreates) the ABRAID-MP database itself. Must be run as a user that is able to create databases. -- -- Parameters: -- database_...
```sql -- Script: create_database.sql -- -- Description: Creates (or recreates) the ABRAID-MP database itself. Must be run as a user that is able to create databases. -- -- Parameters: -- database_name: The ABRAID-MP database name -- application_username: The ABRAID-MP application's username -- applicati...
null
null
[Unity] Implement "enable" event to reenable after "stop". Signed-off-by: Juri Berlanda <5bfdca9e82c53adb0603ce7083f4ba4f2da5cacf@hotmail.com> Apply this change to `Unity/ServoController/ServoControllerClient.cs` and return the full updated file. ```csharp using UnityEngine; using SocketIOClient; public class S...
```csharp using UnityEngine; using SocketIOClient; public class ServoControllerClient : AbstractSocketioClient { private static readonly string SOCKETIO_SERVER = "http://192.168.1.51:5000"; private static readonly string SOCKETIO_NAMESPACE = "/servo"; public ServoControllerClient() : base(SOCKETIO_SERVE...
null
null
Fix summary default and implement author summary on structs Apply this change to `traits/src/lib.rs` and return the full updated file. ```rust pub trait Summarizable { fn author_summary(&self) -> String; fn summary(&self) -> String { String::from("Read more from {}...", self.author_summary()) } }...
```rust pub trait Summarizable { fn author_summary(&self) -> String; fn summary(&self) -> String { format!("Read more from {}...", self.author_summary()) } } pub struct NewsArticle { pub headline: String, pub location: String, pub author: String, pub content: String, } impl Summar...
null
null
Convert left over 5.4 closing bracket Closing bracked of array was not converted to 5.3 style Apply this change to `scripts/input_registry.php` and return the full updated file. ```php <?php namespace Aura\Html\Helper\Input; return array( 'button' => function () { return new Generic; }, 'checkbox...
```php <?php namespace Aura\Html\Helper\Input; return array( 'button' => function () { return new Generic; }, 'checkbox' => function () { return new Checkbox; }, 'color' => function () { return new Generic; }, 'date' => function () { return new Generic; }, ...
null
null
Fix DataDir to handle the case when the file doesn't exist If the directory doesn't exist, EvalSymlinks returns an error and an empty dir string, which will fail. This works around that by only calling Abs in the success case. Apply this change to `internal/config/config.go` and return the full updated file. ```go /...
```go // Package config provides configuration primitives for Overlord package config import ( "os" "path/filepath" ) // DataDir returns the path to the Overlord data directory func DataDir() (string, error) { data, valid := os.LookupEnv("OVERLORD_DATA") if !valid { homedir, err := os.UserHomeDir() if err !=...
null
null
Tweak expected error message, although we still fail this test git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@89875 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp` and return the full updated file. ```cpp // RUN: clang-cc -fsyntax-only -verify...
```cpp // RUN: clang-cc -fsyntax-only -verify %s // XFAIL: * class C { public: C(int a, int b); }; C::C(int a, // expected-note {{previous definition}} int b) // expected-note {{previous definition}} try { int c; } catch (int a) { // expected-error {{redefinition of 'a'}} int b; // expected-error {{redefi...
null
null
Implement PartialOrd, PartialEq for Score This allows Scores to be compared and sorted. Apply this change to `src/fuzzy/score.rs` and return the full updated file. ```rust #[derive(Copy, Clone, Debug)] pub struct Score { /// The computed score value pub value: f32 } impl Score { /// Creates a new Score ...
```rust use std::cmp::Ordering; #[derive(Copy, Clone, Debug)] pub struct Score { /// The computed score value pub value: f32 } impl Score { /// Creates a new Score with the provided value /// /// # Examples /// /// ``` /// let score = rff::fuzzy::Score::new(1.0); /// assert_eq!(sco...
null
null
Add extension function for RemoteKonfigIntDelegation. Apply this change to `library/src/main/java/com/chibatching/remotekonfig/KonfigModel.kt` and return the full updated file. ```kotlin package com.chibatching.remotekonfig interface KonfigModel fun KonfigModel.konfig(key: String, default: Long): RemoteKonfigLongD...
```kotlin package com.chibatching.remotekonfig interface KonfigModel fun KonfigModel.konfig(key: String, default: Long): RemoteKonfigLongDelegate { return RemoteKonfigLongDelegate(key, default) } fun KonfigModel.konfig(key: String, default: Int): RemoteKonfigIntDelegate { return RemoteKonfigIntDelegate(key,...
null
null
Add missing api key in product picker. Fixes #6185 Apply this change to `backend/app/assets/javascripts/spree/backend/product_picker.js` and return the full updated file. ```javascript $.fn.productAutocomplete = function (options) { 'use strict'; // Default options options = options || {}; var multiple = ty...
```javascript $.fn.productAutocomplete = function (options) { 'use strict'; // Default options options = options || {}; var multiple = typeof(options.multiple) !== 'undefined' ? options.multiple : true; this.select2({ minimumInputLength: 3, multiple: multiple, initSelection: function (element, c...
null
null
Mark append(protobufData:) as internal since it is library only. Apply this change to `Sources/SwiftProtobuf/UnknownStorage.swift` and return the full updated file. ```swift // Sources/SwiftProtobuf/UnknownStorage.swift - Handling unknown fields // // Copyright (c) 2014 - 2016 Apple Inc. and the project authors // Li...
```swift // Sources/SwiftProtobuf/UnknownStorage.swift - Handling unknown fields // // Copyright (c) 2014 - 2016 Apple Inc. and the project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See LICENSE.txt for license information: // https://github.com/apple/swift-protobuf/blob/master/L...
null
null
veyron.js: Add runtime arg to ShutdownOnSignals. Change-Id: Ib773c40e7cb7f7c5df3b5cf5fea73a03dd709cb5 Apply this change to `go/src/test_service/test_serviced/main.go` and return the full updated file. ```go // Command test_serviced is an implementation of the test_service service. package main import ( "fmt" "log...
```go // Command test_serviced is an implementation of the test_service service. package main import ( "fmt" "log" "veyron.io/veyron/veyron/lib/signals" _ "veyron.io/veyron/veyron/profiles" "veyron.io/veyron/veyron2/rt" ) func main() { // Create the runtime r := rt.Init() defer r.Cleanup() s, endpoint, err...
null
null
Hide link if no photo Apply this change to `NavigationReactMobile/sample/twitter/Tweet.js` and return the full updated file. ```javascript import React from 'react'; import {NavigationLink} from 'navigation-react'; import Banner from './Banner'; import Tweets from './Tweets'; export default ({tweet: {account: {id: a...
```javascript import React from 'react'; import {NavigationLink} from 'navigation-react'; import Banner from './Banner'; import Tweets from './Tweets'; export default ({tweet: {account: {id: accountId, name, username, logo}, id, text, photo, time, retweets, likes, replies}}) => ( <div> <Banner title="Tweet" /...
null
null
Move run into new method Apply this change to `cod.c` and return the full updated file. ```c #include <stdio.h> unsigned int x; char in; void input(void); void main(void){ x = 0; input(); } void input(void){ printf(">> "); /* Bash-like input */ scanf("%c", &in); /* Get char input */ /* Boundary checks ...
```c #include <stdio.h> unsigned int x; char in; void input(void); void run(char c); void main(void){ x = 0; input(); } void input(void){ printf(">> "); /* Bash-like input */ scanf("%c", &in); /* Get char input */ run(in); input(); /* Loop */ } void run(char c){ /* Boundary checks */ if(x == 256 || ...
null
null
Fix the wildcards in watch task Apply this change to `Gruntfile.js` and return the full updated file. ```javascript module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), watch: { react: { files: ['components/*.jsx', 'dashboards/*.jsx'], tasks:...
```javascript module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), watch: { react: { files: ['components/**/*.jsx', 'dashboards/**/*.jsx'], tasks: ['browserify'] } }, browserify: { options: { transform: [ require('g...
null
null
Make it work for simple additions Apply this change to `src/main.rs` and return the full updated file. ```rust fn main(expr: &str) -> i32 { let result = 0; for c in expr.chars() { match c { '0' ... '9' => println!("number"), ' ' => println!("space"), '+' => println!("plus"), _ => panic...
```rust fn main(expr: &str) -> i32 { let mut result = 0; let mut stack:Vec<i32> = Vec::new(); for token in expr.split_whitespace() { let wrapped_operand = token.parse::<i32>(); let is_operator = wrapped_operand.is_err(); if is_operator { // xxxFlorent: Any way to destructure like this? Not sure ...
null
null
Implement read, write, and test of filtered user UUIDs. Apply this change to `PartyUP/Defensive.swift` and return the full updated file. ```swift // // Defensive.swift // PartyUP // // Created by Fritz Vander Heide on 2016-02-28. // Copyright © 2016 Sandcastle Application Development. All rights reserved. // imp...
```swift // // Defensive.swift // PartyUP // // Created by Fritz Vander Heide on 2016-02-28. // Copyright © 2016 Sandcastle Application Development. All rights reserved. // import Foundation class Defensive { static let shared = Defensive() init() { if let input = NSInputStream(URL: Defensive.p...
null
null
feat(card-impl): Add code to remove effects Apply this change to `Sources/Rosetta/Tasks/SimpleTasks/RemoveEnchantmentTask.cpp` and return the full updated file. ```cpp // This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // RosettaStone is hearthstone simula...
```cpp // This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // RosettaStone is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Models/Enchantment.hpp> #include <Ros...
null
null
Revert "drop the _pk index to resolve issue with repeatable migrations" Apply this change to `flyway-core/src/main/resources/org/flywaydb/core/internal/dbsupport/db2/upgradeMetaDataTable.sql` and return the full updated file. ```sql -- -- Copyright 2010-2017 Boxfuse GmbH -- -- Licensed under the Apache License, Versi...
```sql -- -- Copyright 2010-2017 Boxfuse GmbH -- -- 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 ...
null
null
Add multi in place of workers in latest set report. Apply this change to `reports/report_latest.sql` and return the full updated file. ```sql WITH lastset AS ( SELECT max(set) as lastset from tests ) SELECT set,script,scale,test,clients,workers, rate_limit AS limit, client_limit AS client_limit, round(tps) ...
```sql WITH lastset AS ( SELECT max(set) as lastset from tests ) SELECT set,script,scale,test,clients,multi, rate_limit AS limit, client_limit AS client_limit, round(tps) AS tps, round(1000*avg_latency)/1000 AS avg_latency, round(1000*percentile_90_latency)/1000 AS "90%<", 1000*round(max_latency)/1000 A...
null
null
Put disassembly into simple core Apply this change to `examples/ZXSpectrum/cpusimple.c` and return the full updated file. ```c /* * ZXSpectrum * * Uses Z80 step core built in EDL * Rest is C for now */ #include <stdio.h> #include <stdint.h> void STEP(void); void RESET(void); void INTERRUPT(uint8_t); extern ...
```c /* * ZXSpectrum * * Uses Z80 step core built in EDL * Rest is C for now */ #include <stdio.h> #include <stdint.h> void STEP(void); void RESET(void); void INTERRUPT(uint8_t); extern uint16_t PC; extern uint8_t CYCLES; int Disassemble(unsigned int address,int registers); void CPU_RESET() { RESET(); } in...
null
null
Work around incomatibility in SGMiner 4.0 with the CGMiner RPC API Apply this change to `MultiMiner.Xgminer.Api/Parsers/VersionInformationParser.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Linq; namespace MultiMiner.Xgminer.Api.Parsers { class Ver...
```csharp using System; using System.Collections.Generic; using System.Linq; namespace MultiMiner.Xgminer.Api.Parsers { class VersionInformationParser : ResponseTextParser { public static void ParseTextForVersionInformation(string text, MultiMiner.Xgminer.Api.Data.VersionInformation versionInformation...
null
null
Edit routes to allow matches with trailing slash Apply this change to `src/main/kotlin/main/main.kt` and return the full updated file. ```kotlin package main /** * Created by allen on 7/28/16. */ import spark.Spark.* import com.google.gson.Gson import controllers.SqliteController import models.User import spark.Mo...
```kotlin package main /** * Created by allen on 7/28/16. */ import spark.Spark.* import com.google.gson.Gson import controllers.SqliteController import models.User import spark.ModelAndView import spark.template.handlebars.HandlebarsTemplateEngine import java.util.* fun main(args : Array<String>) { port(3000) ...
null
null
Fix crash when dragging a thread state track Only when you have enabled track_ordering_feature, this class inherit OnDrag from Track and crashed. Related to b/173093860. Apply this change to `OrbitGl/ThreadStateTrack.h` and return the full updated file. ```c // Copyright (c) 2020 The Orbit Authors. All rights reser...
```c // Copyright (c) 2020 The Orbit Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ORBIT_GL_THREAD_STATE_TRACK_H_ #define ORBIT_GL_THREAD_STATE_TRACK_H_ #include "Track.h" // This is a track dedicated to displaying thread...
null
null
Fix minor bug in docs Apply this change to `volohov/java/io/github/lionell/lab1/Runner.java` and return the full updated file. ```java package io.github.lionell.lab1; import com.google.common.base.Joiner; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWrite...
```java package io.github.lionell.lab1; import com.google.common.base.Joiner; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Set; import io.github.lionell.lab1.io.WordReader; /** *...
null
null
Fix grammar of printed messaged Apply this change to `spec/load/plot.sh` and return the full updated file. ```bash #!/bin/bash NAME=$1 N=$2 C=$3 # Execute gnuplot template commands /usr/local/bin/gnuplot << EOF # output as png image set terminal png size 1280,720 # save file to "<argument>.png" set output "graph...
```bash #!/bin/bash NAME=$1 N=$2 C=$3 # Execute gnuplot template commands /usr/local/bin/gnuplot << EOF # output as png image set terminal png size 1280,720 # save file to "<argument>.png" set output "graphs/$NAME.png" # graph a title set title "ab -k -n $N -c $C -g data/$NAME.txt http://54.72.161.42/" # Set t...
null
null
Use Kentucky instead of UKY on portal. Apply this change to `bin/add-uky-ig-of.sql` and return the full updated file. ```sql -- ----------------------------------------------------------------- -- Create the entry for the University of Kentucky InstaGENI FOAM aggregate: -- -- Execute as: -- -- psql -U portal -h lo...
```sql -- ----------------------------------------------------------------- -- Create the entry for the University of Kentucky InstaGENI FOAM aggregate: -- -- Execute as: -- -- psql -U portal -h localhost -f add-uky-ig-of.sql portal -- -- ----------------------------------------------------------------- insert into...
null
null
Fix miner_test unit test bug Apply this change to `src/test/miner_tests.cpp` and return the full updated file. ```cpp #include <boost/test/unit_test.hpp> #include "../uint256.h" extern void SHA256Transform(void* pstate, void* pinput, const void* pinit); BOOST_AUTO_TEST_SUITE(miner_tests) BOOST_AUTO_TEST_CASE(sha2...
```cpp #include <boost/test/unit_test.hpp> #include "../uint256.h" extern void SHA256Transform(void* pstate, void* pinput, const void* pinit); BOOST_AUTO_TEST_SUITE(miner_tests) BOOST_AUTO_TEST_CASE(sha256transform_equality) { unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0...
null
null
Check / and /boot for uuids, not only /. Apply this change to `src/libclient/deviceinfo_unix.cpp` and return the full updated file. ```cpp #include "deviceinfo.h" #include "log/logger.h" #include <QCryptographicHash> #include <QDir> #include <fstab.h> LOGGER(DeviceInfo); DeviceInfo::DeviceInfo() : d(NULL) { } Dev...
```cpp #include "deviceinfo.h" #include "log/logger.h" #include <QCryptographicHash> #include <QDir> #include <fstab.h> LOGGER(DeviceInfo); namespace { static const char* FSEntries[] = { "/", "/boot", NULL }; } DeviceInfo::DeviceInfo() : d(NULL) { } DeviceInfo::~DeviceInfo() { } QS...
null
null
Fix missing import in contrib script added in [2630]. git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@2631 af82e41b-90c4-0310-8c96-b1721e28e2e2 Apply this change to `contrib/migrateticketmodel.py` and return the full updated file. ```python #!/usr/bin/env python # # This script completely migrates a <= 0.8.x T...
```python #!/usr/bin/env python # # This script completely migrates a <= 0.8.x Trac environment to use the new # default ticket model introduced in Trac 0.9. # # In particular, this means that the severity field is removed (or rather # disabled by removing all possible values), and the priority values are # changed t...
null
null
Revert "force fd back to non-block mode to make go 1.13 happier" This is causing trouble on the APs. We never complete a read of the tunnel. I'll have to figure out what go 1.13 was complaining about when we switch to it. This reverts commit f86332f6add367e0afc8e1d03e2413f0308791ed. Apply this change to `tun_linux....
```go package tuntap import ( "os" "strings" "syscall" "unsafe" ) func createInterface(file *os.File, ifPattern string, kind DevKind) (string, error) { var req ifReq req.Flags = 0 copy(req.Name[:15], ifPattern) switch kind { case DevTun: req.Flags |= iffTun case DevTap: req.Flags |= iffTap default: p...
null
null
Change calcSizes from function to arrow function Apply this change to `src/image-sizes.ts` and return the full updated file. ```typescript export {}; // To get around: Cannot redeclare block-scoped variable 'mockLogger'.ts(2451) /** * Calculate the sizes to be used for resizing the image based on the current size ...
```typescript export {}; // To get around: Cannot redeclare block-scoped variable 'mockLogger'.ts(2451) /** * Calculate the sizes to be used for resizing the image based on the current size * @param width - the width of the original image * @return - an array of up to 4 elements representing the size * in each gro...
null
null
Correct the expected exception to be EmptyPhpSourceCode Apply this change to `test/unit/SourceLocator/StringSourceLocatorTest.php` and return the full updated file. ```php <?php namespace BetterReflectionTest\SourceLocator; use BetterReflection\Identifier\Identifier; use BetterReflection\Identifier\IdentifierType; ...
```php <?php namespace BetterReflectionTest\SourceLocator; use BetterReflection\Identifier\Identifier; use BetterReflection\Identifier\IdentifierType; use BetterReflection\SourceLocator\StringSourceLocator; use BetterReflection\SourceLocator\Exception\EmptyPhpSourceCode; /** * @covers \BetterReflection\SourceLocato...
null
null
Make the script sh compatible Apply this change to `.travis/build.sh` and return the full updated file. ```bash #!/bin/sh set -e export PULL_REQUEST=${PULL_REQUEST:-true} echo $PULL_REQUEST export BRANCH=${BRANCH:-master} echo $BRANCH export TAG=${TAG:-latest} echo $TAG export DOCKER_ORG=${DOCKER_ORG:-$USER} echo $D...
```bash #!/bin/sh set -e export PULL_REQUEST=${PULL_REQUEST:-true} export BRANCH=${BRANCH:-master} export TAG=${TAG:-latest} export DOCKER_ORG=${DOCKER_ORG:-$USER} export DOCKER_REGISTRY=${DOCKER_REGISTRY:-docker.io} export DOCKER_TAG=$TAG export DOCKER_VERSION_ARG=${COMMIT:-latest} #make docker_build if [ "$PULL_RE...
null
null
Make ZSH the default shell Apply this change to `system/macOS/macOS.sh` and return the full updated file. ```bash #!/usr/bin/env bash # Create a folder to hold all the solarized color schemes mkdir -p ${SOLARIZED:=$HOME/.solarized} # Download solarized color schemes git clone git@github.com:tomislav/osx-terminal.ap...
```bash #!/usr/bin/env bash # Create a folder to hold all the solarized color schemes mkdir -p ${SOLARIZED:=$HOME/.solarized} # Download solarized color schemes git clone git@github.com:tomislav/osx-terminal.app-colors-solarized.git \ $SOLARIZED/osx-terminal.app-colors-solarized git clone git@github.com:seebi/dirc...
null
null
Use string literals when declaring event listeners Apply this change to `app/Providers/EventServiceProvider.php` and return the full updated file. ```php <?php namespace NUSWhispers\Providers; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class EventServiceProvider extends Se...
```php <?php namespace NUSWhispers\Providers; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; class EventServiceProvider extends ServiceProvider { /** * The event listener mappings for the application. * * @var array */ protected $listen = [ 'N...
null
null
Update method name in comment Apply this change to `src/SyntaxNodes/InlineSyntaxNode.ts` and return the full updated file. ```typescript import { SyntaxNode } from './SyntaxNode' export interface InlineSyntaxNode extends SyntaxNode { // Represents the text of the syntax node as it should appear inline. Some inlin...
```typescript import { SyntaxNode } from './SyntaxNode' export interface InlineSyntaxNode extends SyntaxNode { // Represents the text of the syntax node as it should appear inline. Some inline conventions // don't have any e.g. (footnotes, images). textAppearingInline(): string // Represents the searchable t...
null
null
Check for `.exe` case insensitively On Windows `foo.exe`, `foo.eXe` and `foo.EXE` are equally executable. Signed-off-by: Ian Campbell <a8db091655a7f47ecb9c39a2d278e9662e440dc0@docker.com> Apply this change to `cli-plugins/manager/suffix_windows.go` and return the full updated file. ```go package manager import ( ...
```go package manager import ( "path/filepath" "strings" "github.com/pkg/errors" ) // This is made slightly more complex due to needing to be case insensitive. func trimExeSuffix(s string) (string, error) { ext := filepath.Ext(s) if ext == "" { return "", errors.Errorf("path %q lacks required file extension",...
null
null
Add upper bound on partitioning block size Apply this change to `src/RoundRobinPartitioner.cpp` and return the full updated file. ```cpp #include "RoundRobinPartitioner.hpp" #include <vector> #include <iostream> #include "LogicalProcess.hpp" namespace warped { std::vector<std::vector<LogicalProcess*>> RoundRobinP...
```cpp #include "RoundRobinPartitioner.hpp" #include <vector> #include <iostream> #include "LogicalProcess.hpp" namespace warped { std::vector<std::vector<LogicalProcess*>> RoundRobinPartitioner::partition( const std::vector<LogicalProcess*>& lps, ...
null
null
Fix static parition selection test cases Signed-off-by: Bhunvesh Chaudhary <42e1caa12835fdb01374f9f3057a95ba5351c8b1@pivotal.io> Apply this change to `src/test/tinc/tincrepo/partitioning/staticselection/sql/setup/setup.sql` and return the full updated file. ```sql create language plpythonu; create or replace functi...
```sql create language plpythonu; create or replace function get_selected_parts(explain_query text) returns text as $$ rv = plpy.execute(explain_query) search_text = 'Partition Selector' result = [] result.append(0) result.append(0) for i in range(len(rv)): cur_line = rv[i]['QUERY PLAN'] if search_text.lower()...
null
null
Add border color name to collection view cell Apply this change to `Sources/CustomCollectionCell.swift` and return the full updated file. ```swift /* | _ ____ ____ _ | | |‾| ⚈ |-| ⚈ |‾| | | | | ‾‾‾‾| |‾‾‾‾ | | | ‾ ‾ ‾ */ import UIKit @IBDesignable open class CustomCollectionCell: UICo...
```swift /* | _ ____ ____ _ | | |‾| ⚈ |-| ⚈ |‾| | | | | ‾‾‾‾| |‾‾‾‾ | | | ‾ ‾ ‾ */ import UIKit @IBDesignable open class CustomCollectionCell: UICollectionViewCell, BackgroundColorNameable, TintColorNameable, BorderColorNameable { // MARK: - Inspectable properties @IBI...
null
null
Test for async Amount init Apply this change to `tests/testnet/aio/test_amount.py` and return the full updated file. ```python # -*- coding: utf-8 -*- import pytest import logging from bitshares.aio.amount import Amount log = logging.getLogger("grapheneapi") log.setLevel(logging.DEBUG) @pytest.mark.asyncio async ...
```python # -*- coding: utf-8 -*- import pytest import logging from bitshares.aio.amount import Amount log = logging.getLogger("grapheneapi") log.setLevel(logging.DEBUG) @pytest.mark.asyncio async def test_aio_amount_init(bitshares, assets): amount = await Amount("10 USD", blockchain_instance=bitshares) ass...
null
null
Add stub code for printing mapped messages Apply this change to `src/main.rs` and return the full updated file. ```rust #![feature(rustc_private)] // TODO Migrate to crates.io variant (json) #![feature(core)] extern crate hyper; extern crate regex; extern crate serialize; extern crate websocket; extern crate rustc_s...
```rust #![feature(rustc_private)] // TODO Migrate to crates.io variant (json) #![feature(core)] extern crate hyper; extern crate regex; extern crate serialize; extern crate websocket; extern crate rustc_serialize; mod authentication; mod messages_stream; mod user_view; mod user; mod message; mod channel; mod current...
null
null
Convert input to lowercase before correcting Apply this change to `src/main.rs` and return the full updated file. ```rust extern crate ghoti; extern crate getopts; use getopts::Options; use ghoti::correction; use std::env; fn print_usage(opts: Options) { let usage = "Usage: ghoti [options] <word>"; print!(...
```rust extern crate ghoti; extern crate getopts; use getopts::Options; use ghoti::correction; use std::env; fn print_usage(opts: Options) { let usage = "Usage: ghoti [options] <word>"; print!("{}", opts.usage(usage)); } fn main() { // Set up CLI options let mut opts = Options::new(); opts.optfl...
null
null
Test comic availability of all supported comics independently through parametrization Apply this change to `webcomix/tests/test_comic_availability.py` and return the full updated file. ```python import pytest from webcomix.comic import Comic from webcomix.supported_comics import supported_comics from webcomix.util i...
```python import pytest from webcomix.comic import Comic from webcomix.supported_comics import supported_comics from webcomix.util import check_first_pages @pytest.mark.slow @pytest.mark.parametrize("comic_name", list(supported_comics.keys())) def test_supported_comics(comic_name): comic = Comic(comic_name, *sup...
null
null
Remove unused repository declaration in build-scan-init Apply this change to `gradle/init-scripts/build-scan.init.gradle.kts` and return the full updated file. ```kotlin /* * This is an init script for internal usage at Gradle Inc. */ initscript { repositories { gradlePluginPortal() } dependenci...
```kotlin /* * This is an init script for internal usage at Gradle Inc. */ if (!gradle.startParameter.systemPropertiesArgs.containsKey("disableScanPlugin")) { rootProject { pluginManager.withPlugin("com.gradle.build-scan") { extensions["buildScan"].withGroovyBuilder { if (gradl...
null
null
server/proxy: Add return statement in demo_filter.c Apply this change to `server/proxy/filters/filter_demo.c` and return the full updated file. ```c #include "filters_api.h" static PF_FILTER_RESULT demo_filter_keyboard_event(connectionInfo* info, void* param) { proxyKeyboardEventInfo* event_data = (proxyKeyboardEve...
```c #include "filters_api.h" static PF_FILTER_RESULT demo_filter_keyboard_event(connectionInfo* info, void* param) { proxyKeyboardEventInfo* event_data = (proxyKeyboardEventInfo*) param; return FILTER_PASS; } static PF_FILTER_RESULT demo_filter_mouse_event(connectionInfo* info, void* param) { proxyMouseEventInfo*...
null
null
Add redirectTo - user -> user/profile Apply this change to `app/module/Users/routing.php` and return the full updated file. ```php <?php use Rudolf\Component\Routing; use Rudolf\Component\Modules; $module = new Modules\Module('dashboard'); $config = $module->getConfig(); $collection->add('user/login', new Routing\...
```php <?php use Rudolf\Component\Routing\Route; $collection->add('user/login', new Route( 'user/login(/redirect-to/<page>)?', 'Rudolf\Modules\Users\Login\Controller::login', ['page' => '.*$'], ['page' => 'dashboard'] )); $collection->add('user', new Route( 'user([\/])?', 'Rudolf\Modules\User...
null
null
Remove the fallback to the old bridge for tf.XlaReplicaId PiperOrigin-RevId: 409854723 Change-Id: I6d099e1874c56f24ada98b81036e14647af50c76 Apply this change to `tensorflow/compiler/tf2xla/kernels/replica_id_op.cc` and return the full updated file. ```cpp /* Copyright 2017 The TensorFlow Authors. All Rights Reserved...
```cpp /* Copyright 2017 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 16 to bottom inset Apply this change to `Rocket.Chat/Controllers/User/UserDetail/UserDetailTableView.swift` and return the full updated file. ```swift // // UserDetailTableView.swift // Rocket.Chat // // Created by Matheus Cardoso on 6/26/18. // Copyright © 2018 Rocket.Chat. All rights reserved. // import UI...
```swift // // UserDetailTableView.swift // Rocket.Chat // // Created by Matheus Cardoso on 6/26/18. // Copyright © 2018 Rocket.Chat. All rights reserved. // import UIKit class UserDetailTableView: UITableView { private var headerViewHeight: CGFloat { let topInset: CGFloat if #available(iOS 11...
null
null
Disable the offline plugin for Gatsby Apply this change to `gatsby-config.js` and return the full updated file. ```javascript module.exports = { siteMetadata: { title: `Neon Tsunami`, author: `Dwight Watson`, description: `A blog on Laravel & Rails.`, siteUrl: `https://www.neontsunami.com`, soci...
```javascript module.exports = { siteMetadata: { title: `Neon Tsunami`, author: `Dwight Watson`, description: `A blog on Laravel & Rails.`, siteUrl: `https://www.neontsunami.com`, social: { twitter: `DwightConrad`, }, }, plugins: [ `gatsby-plugin-postcss`, { resolve: `g...
null
null
Write output file to temp directory. The tests shouldn't assume that they can write to the current working directory. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@240388 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/Modules/explicit-build-prefer-self.cpp` and return the full updated file. `...
```cpp // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fno-implicit-modules -emit-module -fmodule-name=a %S/Inputs/explicit-build-prefer-self/map -o %t/a.pcm // RUN: %clang_cc1 -fmodules -fno-implicit-modules -emit-module -fmodule-name=b %S/Inputs/explicit-build-prefer-self/map -o %t/b.pcm ```
null
null
Remove default value in Storagemgr Apply this change to `osu.Game.Tournament/Configuration/TournamentStorageManager.cs` and return the full updated file. ```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. usin...
```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Configuration; using osu.Framework.Platform; namespace osu.Game.Tournament.Configuration { public class TournamentStorageManager : IniC...
null
null
Update script benchmark for unstable feature change Hopefully fixes #218 (untested) Apply this change to `collector/benchmarks/script-servo/components/dom_struct/lib.rs` and return the full updated file. ```rust /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of t...
```rust /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![feature(proc_macro, proc_macro_non_items)] extern crate proc_macro; use proc_macro::{TokenStream, quo...
null
null
Use didSet instead of a private var Using a private var here is overkill. If all we need to do is notify our subscribers that we've changed our value, we can do that by triggering on didSet. Apply this change to `Flux/ObservableProperty.swift` and return the full updated file. ```swift public protocol ObservableProp...
```swift public protocol ObservablePropertyType { typealias ValueType var value: ValueType { get set } } public class ObservableProperty<ValueType> { public typealias CallbackType = (ValueType -> ()) private var subscriptions = [CallbackType]() public var value: ValueType { didSet { ...
null
null
Update signature for NOP codepath Apply this change to `cgo/cgo_main_noop.go` and return the full updated file. ```go // +build lambdabinary,noop package cgo import ( "net/http" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" sparta "github.com/mweagle/Sparta" ) ///////////...
```go // +build lambdabinary,noop package cgo import ( "net/http" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" sparta "github.com/mweagle/Sparta" ) //////////////////////////////////////////////////////////////////////////////// // cgoMain is the primary entrypoint for the...
null
null
Fix normalizing a vector results in a zero vector Apply this change to `SharpMath/Geometry/VectorExtensions.cs` and return the full updated file. ```csharp namespace SharpMath.Geometry { public static class VectorExtensions { public static T Negate<T>(this Vector vector) where T : Vector, new() ...
```csharp using SharpMath.Geometry.Exceptions; namespace SharpMath.Geometry { public static class VectorExtensions { public static T Negate<T>(this Vector vector) where T : Vector, new() { var resultVector = new T(); if (vector.Dimension != resultVector.Dimension) ...
null
null
Update spec with real user agent Apply this change to `spec/request_spec.rb` and return the full updated file. ```ruby module HotelsCombined describe Request do describe ".city_search" do let(:parameters) { { :city_id => 1948, :arrival => "2013-01-01", :departure => "2013-01-02...
```ruby module HotelsCombined describe Request do describe ".city_search" do let(:parameters) { { :city_id => 1948, :arrival => "2013-01-01", :departure => "2013-01-02", :guests => 2, :rooms => 1, :user_id => 504, :user_ip_address => "71.88...
null
null
Add better logging when getting a broken BlockState from item meta Apply this change to `src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBlockStateMeta.java` and return the full updated file. ```java package com.laytonsmith.abstraction.bukkit; import com.laytonsmith.abstraction.blocks.MCBlockState; import c...
```java package com.laytonsmith.abstraction.bukkit; import com.laytonsmith.abstraction.blocks.MCBlockState; import com.laytonsmith.abstraction.MCBlockStateMeta; import com.laytonsmith.core.Static; import org.bukkit.block.BlockState; import org.bukkit.inventory.meta.BlockStateMeta; import java.util.logging.Level; pub...
null
null
Add message when no search results. Begin filter functionality. Apply this change to `public/includes/js/searchThingy.js` and return the full updated file. ```javascript /** * Search functionality for filtering tiles. * * Matt Weeks */ function stuff() { var $frame = $('#projectScroller'); removeEDR(document.g...
```javascript /** * Search functionality for filtering tiles. * * Matt Weeks */ function stuff() { var $frame = $('#projectScroller'); removeEDR(document.getElementById('navbarInput-01').value, "tileLiproject"); $frame.sly('reload'); } function removeEDR(stringFind, tileClass) { if (stringFind != "") { var ...
null
null
Add booting substate for message Apply this change to `Tokaido/TKDApp.h` and return the full updated file. ```c // // TKDApp.h // Tokaido // // Created by Mucho Besos on 10/25/12. // Copyright (c) 2012 Tilde. All rights reserved. // #import <Cocoa/Cocoa.h> typedef enum : NSUInteger { TKDAppOff, TKDAppBo...
```c // // TKDApp.h // Tokaido // // Created by Mucho Besos on 10/25/12. // Copyright (c) 2012 Tilde. All rights reserved. // #import <Cocoa/Cocoa.h> typedef enum : NSUInteger { TKDAppOff, TKDAppBooting, TKDAppOn, TKDAppShuttingDown } TKDAppState; typedef enum : NSUInteger { TKDAppBundling, ...
null
null
Return response body instead of the whole object Apply this change to `src/Keyteq/Keymedia/Util/RequestWrapper.php` and return the full updated file. ```php <?php namespace Keyteq\Keymedia\Util; /** * @codeCoverageIgnore */ class RequestWrapper { public function get($url, $headers = array(), $options = array(...
```php <?php namespace Keyteq\Keymedia\Util; /** * @codeCoverageIgnore */ class RequestWrapper { public function get($url, $headers = array(), $options = array()) { $request = \Requests::get($url, $headers, $options); return $request->body; } } ```
null
null
Fix missing requirement (overwrote in last batch of commits, due to conflicts). Apply this change to `trunk/0.3/abstract/cs_webapplibs.abstract.class.php` and return the full updated file. ```php <?php /* * Created on Aug 19, 2009 * * SVN INFORMATION::: * ------------------- * Last Author::::::::: $Author$ * ...
```php <?php /* * Created on Aug 19, 2009 * * SVN INFORMATION::: * ------------------- * Last Author::::::::: $Author$ * Current Revision:::: $Revision$ * Repository Location: $HeadURL$ * Last Updated:::::::: $Date$ */ require_once(dirname(__FILE__) .'/../../cs-content/abstract/cs_version.abstract.class.p...
null
null
Add functions to read/put values for pref_display_weeks_as_letters Apply this change to `app/src/main/java/com/satsumasoftware/timetable/PrefUtils.kt` and return the full updated file. ```kotlin package com.satsumasoftware.timetable import android.content.Context import android.preference.PreferenceManager import co...
```kotlin package com.satsumasoftware.timetable import android.content.Context import android.preference.PreferenceManager import com.satsumasoftware.timetable.db.util.TimetableUtils import com.satsumasoftware.timetable.framework.Timetable class PrefUtils { companion object { const val PREF_CURRENT_TIME...
null
null
Revert "Disable backtrace test on miri" Fixed in nightly-2022-07-26. Closes #246. This reverts commit 8d25d6b2c9bb04c9f0d222ed6b900f696c0e7ebe. Apply this change to `tests/test_backtrace.rs` and return the full updated file. ```rust #![cfg(not(miri))] #[rustversion::not(nightly)] #[ignore] #[test] fn test_backtra...
```rust #[rustversion::not(nightly)] #[ignore] #[test] fn test_backtrace() {} #[rustversion::nightly] #[test] fn test_backtrace() { use anyhow::anyhow; let error = anyhow!("oh no!"); let _ = error.backtrace(); } ```
null
null
Remove 'use strict' because using eslint Apply this change to `src/mavensmate/mavensMateAppConfig.ts` and return the full updated file. ```typescript 'use strict'; import path = require('path'); import * as operatingSystem from '../../src/workspace/operatingSystem'; import * as jsonFile from '../../src/workspace/js...
```typescript import path = require('path'); import * as operatingSystem from '../../src/workspace/operatingSystem'; import * as jsonFile from '../../src/workspace/jsonFile'; export function getConfig(){ let configFileDirectory = getUserHomeDirectory(); let configFileName = '.mavensmate-config.json'; let ...
null
null
Add modal for ipad links Apply this change to `wp-content/themes/bullettshop/atriangle/atc-modals.php` and return the full updated file. ```php <?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscr'+ 'iption/']").attr('data-reveal-id', 'ipadPopUp'); <?php...
```php <?php function ipadPopUpScript(){ ?> jQuery("a[href$='http://bullettstoreat.wpengine.com/p/ipad-magazine-subscription/']").attr('data-reveal-id', 'ipadPopUp'); <?php } function ipadPopUpModal(){ ?> jQuery('#colophon').after('<div id="ipadPopUp" class="reveal-modal"><h2>Th'+ 'is will open a new tab.</h2>...
null
null
Add in a way to specify the utmp file path for unit testing Apply this change to `src/collectors/users/users.py` and return the full updated file. ```python # coding=utf-8 """ Collects the number of users logged in and shells per user #### Dependencies * [pyutmp](http://software.clapper.org/pyutmp/) """ import ...
```python # coding=utf-8 """ Collects the number of users logged in and shells per user #### Dependencies * [pyutmp](http://software.clapper.org/pyutmp/) """ import diamond.collector from pyutmp import UtmpFile class UsersCollector(diamond.collector.Collector): def get_default_config_help(self): ""...
null
null
Split `alert` method into two different methods Apply this change to `src/Mailables/AlertMailable.php` and return the full updated file. ```php <?php namespace TomIrons\Tuxedo\Mailables; use TomIrons\Tuxedo\Message; use TomIrons\Tuxedo\TuxedoMailable; class AlertMailable extends TuxedoMailable { use Message; ...
```php <?php namespace TomIrons\Tuxedo\Mailables; use TomIrons\Tuxedo\Message; use TomIrons\Tuxedo\TuxedoMailable; class AlertMailable extends TuxedoMailable { use Message; /** * The view to use for the message. * * @var string */ public $view = 'tuxedo::templates.alert'; /** ...
null
null
Fix compilation against Qt 5.13. Apply this change to `tools/worldeditor/SettingsDialog.cpp` and return the full updated file. ```cpp /* Copyright (C) 2014,2015,2018 Rodrigo Jose Hernandez Cordoba Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the ...
```cpp /* Copyright (C) 2014,2015,2018,2019 Rodrigo Jose Hernandez Cordoba 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 ...
null
null
Set day and month to 1 if not set Apply this change to `src/core/documents/docedit/forms/date.component.ts` and return the full updated file. ```typescript import {Component, Input} from '@angular/core'; import {NgbDateParserFormatter, NgbDateStruct} from '@ng-bootstrap/ng-bootstrap'; import {Resource} from '../../.....
```typescript import {Component, Input} from '@angular/core'; import {NgbDateParserFormatter, NgbDateStruct} from '@ng-bootstrap/ng-bootstrap'; import {Resource} from '../../../model/resource'; import {DocumentEditChangeMonitor} from '../document-edit-change-monitor'; @Component({ moduleId: module.id, selecto...
null
null
Update file, Alura, Introdução a C, Aula 1.5 Apply this change to `alura/c/adivinhacao.c` and return the full updated file. ```c #include <stdio.h> int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); ...
```c #include <stdio.h> int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; printf("Qual é o seu chu...
null
null
[Freenews] Use internal RSS 2.0 parser Apply this change to `bridges/FreenewsBridge.php` and return the full updated file. ```php <?php define("FREENEWS_RSS", 'http://feeds.feedburner.com/Freenews-Freebox?format=xml'); class FreenewsBridge extends FeedExpander { const MAINTAINER = "mitsukarenai"; const NAME = "Fre...
```php <?php class FreenewsBridge extends FeedExpander { const MAINTAINER = "mitsukarenai"; const NAME = "Freenews"; const URI = "http://freenews.fr"; const DESCRIPTION = "Un site d'actualité pour les freenautes (mais ne parlant pas que de la freebox). Ne rentrez pas d'id si vous voulez accéder aux act...
null
null
Fix name and warning on Gradle 6. Apply this change to `settings.gradle.kts` and return the full updated file. ```kotlin rootProject.name = "sdf" pluginManagement { repositories { maven("https://artifacts.metaborg.org/content/groups/public/") } } enableFeaturePreview("GRADLE_METADATA") fun includeProject(i...
```kotlin rootProject.name = "sdf.root" pluginManagement { repositories { maven("https://artifacts.metaborg.org/content/groups/public/") } } if(org.gradle.util.VersionNumber.parse(gradle.gradleVersion).major < 6) { enableFeaturePreview("GRADLE_METADATA") } fun includeProject(id: String, path: String = "org...
null
null