original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Use tornado settings, webapp deprecated Apply this change to `ipython_notebook_config.py` and return the full updated file. ```python # Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-F...
```python # Configuration file for ipython-notebook. c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 8888 # Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- # For headerssent by the upstream reverse proxy. Necessary if the proxy handles # SS...
null
null
Read commands from stdin "forever" Apply this change to `main.cpp` and return the full updated file. ```cpp #include <iostream> #include <string> std::string parse_command(const std::string& input) { return input.substr(0, input.find(' ')); } int main() { std::cout << "PUCRS FAT16 SHELL\n"; std::cout << "$ ";...
```cpp #include <iostream> #include <string> std::string parse_command(const std::string& input) { return input.substr(0, input.find(' ')); } int main() { std::cout << "PUCRS FAT16 SHELL\n"; while (true) { std::cout << "$ "; std::string cmd; getline (std::cin, cmd); std::cout << "-> Will execute...
null
null
fix(Desktop): Remove duplicated Window Close menu item Close #1176 Apply this change to `desktop/src/main/menu/window.ts` and return the full updated file. ```typescript import { MenuItemConstructorOptions } from 'electron' import { openLauncherWindow } from '../launcher/window' import { showLogs } from '../logging/...
```typescript import { MenuItemConstructorOptions } from 'electron' import { openLauncherWindow } from '../launcher/window' import { showLogs } from '../logging/window' import { isMac } from './utils' export const baseWindowSubMenu: MenuItemConstructorOptions[] = [ { role: 'minimize' }, { role: 'zoom' }, { type:...
null
null
Remove unnecessary info from CSV Apply this change to `app/models/member/adapter/csv.rb` and return the full updated file. ```ruby class Member module Adapter module CSV extend self def adapt(members) ::CSV.generate do |csv| csv << columns members.each { |member| csv <<...
```ruby class Member module Adapter module CSV extend self def adapt(members) ::CSV.generate do |csv| csv << [:name, :email] members.each { |member| csv << [member.full_name, member.email] } end end end end end ```
null
null
Allow access to index value Apply this change to `src/indices.rs` and return the full updated file. ```rust use super::Wasmbin; macro_rules! newtype_idx { ($name:ident) => { #[derive(Debug, PartialEq, Eq, Clone, Copy, Wasmbin)] pub struct $name(u32); }; } newtype_idx!(TypeIdx); newtype_idx!(...
```rust use super::Wasmbin; macro_rules! newtype_idx { ($name:ident) => { #[derive(Debug, PartialEq, Eq, Clone, Copy, Wasmbin)] #[repr(transparent)] pub struct $name { pub index: u32, } }; } newtype_idx!(TypeIdx); newtype_idx!(FuncIdx); newtype_idx!(TableIdx); newty...
null
null
MSR: Support double quotes in standard output Apply this change to `tests/shell/shell_recorder/common.sh` and return the full updated file. ```bash replace_newline_return () { awk '{if (NR>1) {printf line"⏎";} line=$0;} END { printf line; }' } regex_escape () { sed 's/\\/\\\\/g' | sed 's/\[/\\\[/g' | sed 's/\]/\\\...
```bash replace_newline_return () { awk '{if (NR>1) {printf line"⏎";} line=$0;} END { printf line; }' } regex_escape () { sed 's/\\/\\\\/g' | sed 's/\[/\\\[/g' | sed 's/\]/\\\]/g' | sed 's/\./\\\./g' | sed 's/\*/\\\*/g' | sed 's/\?/\\\?/g' \ | sed 's/(/\\\(/g' | sed 's/)/\\\)/g' | sed 's/"/\\"/g' } if [ -z "@USE...
null
null
Reorder error handler and '/' route Apply this change to `app.js` and return the full updated file. ```javascript const express = require('express'), app = express(), bodyParser = require('body-parser'), methodOverride = require('method-override'), mongoose = require('mongoose'); mongoose.con...
```javascript const express = require('express'), app = express(), bodyParser = require('body-parser'), methodOverride = require('method-override'), mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/mojibox'); app.set('view engine', 'pug'); app.use(express.static(__dirname +...
null
null
Fix xml tags for ingredients Apply this change to `src/main/java/mealplaner/io/xml/model/v3/RecipeXml.java` and return the full updated file. ```java // SPDX-License-Identifier: MIT package mealplaner.io.xml.model.v3; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType...
```java // SPDX-License-Identifier: MIT package mealplaner.io.xml.model.v3; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrap...
null
null
Check success exists before using it Apply this change to `src/pusher/class-http.php` and return the full updated file. ```php <?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $dat...
```php <?php namespace Isotop\Cargo\Pusher; class HTTP extends Abstract_Pusher { /** * Send data to receiver. * * @param mixed $data * * @return mixed */ public function send( $data ) { $options = $this->cargo->config( 'pusher.http', ['url' => ''] ); $options = is_array( $options ) ? $options : ['...
null
null
Update SQL DDL to match renamed table Apply this change to `sql/wf_ac_group_roles.sql` and return the full updated file. ```sql DROP TABLE IF EXISTS wf_access_contexts; -- CREATE TABLE wf_access_contexts ( id INT NOT NULL AUTO_INCREMENT, ns_id INT NOT NULL, group_id INT NOT NULL, role_id INT NOT NUL...
```sql DROP TABLE IF EXISTS wf_ac_group_roles; -- CREATE TABLE wf_ac_group_roles ( id INT NOT NULL AUTO_INCREMENT, ns_id INT NOT NULL, group_id INT NOT NULL, role_id INT NOT NULL, PRIMARY KEY (id), FOREIGN KEY (group_id) REFERENCES wf_groups_master(id), FOREIGN KEY (role_id) REFERENCES wf_...
null
null
Drop all datastores, in the hope to pass the build on travis Apply this change to `spec/acceptance/admin_spec.rb` and return the full updated file. ```ruby require 'acceptance/acceptance_helper' feature 'Admin', %q{ In order control and administrate the application As a Admin I want a webfrontend to manage the...
```ruby require 'acceptance/acceptance_helper' feature 'Admin', %q{ In order control and administrate the application As a Admin I want a webfrontend to manage the data } do background do drop_data_stores @user = FactoryGirl.create(:user) end scenario 'Admin visits the Rails admin webfrontend' do...
null
null
Refactor split_path code for brevity and clarity Apply this change to `conman/routes/utils.py` and return the full updated file. ```python import os def split_path(path): """ Split a url path into its sub-paths. A url's sub-paths consist of all substrings ending in / and starting at the start of th...
```python from collections import deque def split_path(path): """ Split a url path into its sub-paths. A url's sub-paths consist of all substrings ending in / and starting at the start of the url. eg: /path/containing/subpaths/ becomes: / /path/ /path/containing/ ...
null
null
Update for move of BuildUserAgentFromProduct in Chrome 35 See https://codereview.chromium.org/186883002 Apply this change to `brightray/common/content_client.cc` and return the full updated file. ```cpp // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-s...
```cpp // Copyright (c) 2012 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-CHROMIUM file. #include "common/content_client.h" #include "common/application_info.h" #include "base/strings/stringprintf.h" #include "base/string...
null
null
Upgrade Vivaldi.app to v1.0.162.4 (Technical Preview 3) Apply this change to `Casks/vivaldi.rb` and return the full updated file. ```ruby cask :v1 => 'vivaldi' do version '1.0.118.19' sha256 :no_check # required as upstream package is updated in-place url "https://vivaldi.com/download/Vivaldi_TP2.#{version}.dm...
```ruby cask :v1 => 'vivaldi' do version '1.0.162.4' sha256 :no_check # required as upstream package is updated in-place url "https://vivaldi.com/download/Vivaldi_TP3.#{version}.dmg" name 'Vivaldi' homepage 'https://vivaldi.com' license :gratis app 'Vivaldi.app' end ```
null
null
Fix homepage URL in gemspec. Apply this change to `net-socket.gemspec` and return the full updated file. ```ruby # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'net/socket/version' Gem::Specification.new do |spec| spec.name = "net...
```ruby # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'net/socket/version' Gem::Specification.new do |spec| spec.name = "net-socket" spec.version = Net::Socket::VERSION spec.authors = ["Ellen Marie Dash"] spec.ema...
null
null
Use torch 1.4.0 for exporting Tacotron2 ONNX models This is to workaround type error in validation of Tacotron2 decoder generated with torch 1.5.x Signed-off-by: Rajeev Rao <19c92b5a16bf20c576205f71d12c68705f41f65b@nvidia.com> Apply this change to `demo/Tacotron2/scripts/install_prerequisites.sh` and return the full...
```bash #!/bin/bash # Copyright (c) 2020, NVIDIA CORPORATION. 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 # # Unle...
null
null
Fix non-portable include path in senion broadcast receiver include. Buddy: Blair Apply this change to `android/jni/InteriorsPosition/View/SenionLab/SenionLabBroadcastReceiverJni.cpp` and return the full updated file. ```cpp // Copyright eeGeo Ltd (2012-2017), All Rights Reserved #include <jni.h> #include "AndroidA...
```cpp // Copyright eeGeo Ltd (2012-2017), All Rights Reserved #include <jni.h> #include "AndroidAppThreadAssertionMacros.h" #include "SenionLabBroadcastReceiver.h" #include "SenionLabBroadcastReceiverJni.h" extern "C" { JNIEXPORT void JNICALL Java_com_eegeo_interiorsposition_senionlab_SenionLabBroadcastReceiverJniM...
null
null
Add getInvoiceNumber for merchant's reference of a particular transaction. Apply this change to `src/Message/RapidResponse.php` and return the full updated file. ```php <?php /** * eWAY Rapid Response */ namespace Omnipay\Eway\Message; use Omnipay\Common\Message\RedirectResponseInterface; /** * eWAY Rapid Respo...
```php <?php /** * eWAY Rapid Response */ namespace Omnipay\Eway\Message; use Omnipay\Common\Message\RedirectResponseInterface; /** * eWAY Rapid Response * * This is the response class for Rapid Direct & Transparent Redirect (Rapid) * */ class RapidResponse extends AbstractResponse implements RedirectResponse...
null
null
Use CC instead of gcc Apply this change to `recipes/dsfmt/build.sh` and return the full updated file. ```bash #!/usr/bin/env bash make std make std-check make sse2-check gcc -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -DDSFMT_MEXP=19937 \ -fPIC -fno-strict-aliasing --param max-inline-insns-single=1800 -W...
```bash #!/usr/bin/env bash make std make std-check make sse2-check ${CC} -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -DDSFMT_MEXP=19937 \ -fPIC -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes \ -Wall -std=c99 -shared dSFMT.c -o libdSFMT.${SHLIB_EXT} mkdir -p ${PREFIX}/lib...
null
null
Update Spoofax 2 Gradle plugin to 0.4.2. Apply this change to `build.gradle.kts` and return the full updated file. ```kotlin plugins { id("org.metaborg.gradle.config.root-project") version "0.3.21" id("org.metaborg.gitonium") version "0.1.3" // Set versions for plugins to use, only applying them in subprojects...
```kotlin plugins { id("org.metaborg.gradle.config.root-project") version "0.3.21" id("org.metaborg.gitonium") version "0.1.3" // Set versions for plugins to use, only applying them in subprojects (apply false here). id("org.metaborg.spoofax.gradle.langspec") version "0.4.2" apply false id("de.set.ecj") vers...
null
null
Add <fcntl.h> to list of commonly included files. Apply this change to `src/condor_includes/condor_common.h` and return the full updated file. ```c #include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include <limits.h> #include <string.h> #include <ctype.h> #include <fcntl.h> #include "_...
```c #include "condor_fix_stdio.h" #include <stdlib.h> #include "condor_fix_unistd.h" #include <limits.h> #include <string.h> #include <ctype.h> #include "_condor_fix_types.h" #include <fcntl.h> #include <errno.h> ```
null
null
Add logic to this behavior Apply this change to `Behaviors/GoBackward.cpp` and return the full updated file. ```cpp /* * GoForward.cpp * * Created on: Mar 25, 2014 * Author: user */ #include "GoBackward.h" GoBackward::GoBackward(Robot* robot):Behavior(robot) { // TODO Auto-generated constructor stub } ...
```cpp /* * GoForward.cpp * * Created on: Mar 25, 2014 * Author: user */ #include "GoBackward.h" GoBackward::GoBackward(Robot* robot):Behavior(robot), _steps_count(0) { } bool GoBackward::startCondition() { return true; } void GoBackward::action() { ++_steps_count; _robot->setSpeed(-0.1,0.0); } bool ...
null
null
Add integration test for starting the API Apply this change to `test/cli/test_cmd_piperd.py` and return the full updated file. ```python from piper.cli import cmd_piperd from piper.api import api import mock class TestEntry(object): @mock.patch('piper.cli.cmd_piperd.CLIBase') def test_calls(self, clibase):...
```python from piper.cli import cmd_piperd from piper.api import api import mock class TestEntry(object): @mock.patch('piper.cli.cmd_piperd.CLIBase') def test_calls(self, clibase): self.mock = mock.Mock() cmd_piperd.entry(self.mock) clibase.assert_called_once_with( 'piperd...
null
null
Update plugin com.diffplug.eclipse.apt to v3.36.2 Apply this change to `settings.gradle.kts` and return the full updated file. ```kotlin pluginManagement { repositories { gradlePluginPortal() } plugins { id("com.diffplug.eclipse.apt") version "3.36.1" id("com.diffplug.spotless") ve...
```kotlin pluginManagement { repositories { gradlePluginPortal() } plugins { id("com.diffplug.eclipse.apt") version "3.36.2" id("com.diffplug.spotless") version "6.4.2" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("net.researchgate.release") version ...
null
null
_s: Use braces in all conditionals. Formatting updates for file comment, conditional braces, and indentation. Apply this change to `sidebar.php` and return the full updated file. ```php <?php /** * The sidebar containing the main widget areas. * * @package _s */ if ( ! is_active_sidebar( 'sidebar-1' ) ) return...
```php <?php /** * The sidebar containing the main widget area. * * @package _s */ if ( ! is_active_sidebar( 'sidebar-1' ) ) { return; } ?> <div id="secondary" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-1' ); ?> </div><!-- #secondary --> ```
null
null
Update documentation for main() in tester Apply this change to `testmain.cpp` and return the full updated file. ```cpp #include <cstring> #include <iostream> #include <UnitTest++/UnitTest++.h> #include <UnitTest++/TestReporterStdout.h> using std::cerr; using std::endl; using std::strcmp; /* Function object retur...
```cpp #include <cstring> #include <iostream> #include <UnitTest++/UnitTest++.h> #include <UnitTest++/TestReporterStdout.h> using std::cerr; using std::endl; using std::strcmp; /* Function object returning true for a specified test name */ struct MatchTestName { const char * const tname; MatchTestName (const ...
null
null
Fix invalid heap issues with load simulator Apply this change to `pipbench/server/load_simulator.c` and return the full updated file. ```c #include <Python.h> static PyObject * simulate_install(PyObject *self, PyObject *args) { long cpu_units; long mem_bytes; if (!PyArg_ParseTuple(args, "LL", &cpu_units...
```c #include <Python.h> static PyObject * simulate_install(PyObject *self, PyObject *args) { long cpu_units; long mem_bytes; if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) { return NULL; } char *p; p = (char *) malloc(mem_bytes); int j = 0; for (long i = 0; i < c...
null
null
Add compact allocation on BioU. Apply this change to `cpumap.c` and return the full updated file. ```c #ifdef GUADALUPE_SPREAD int cpumap(int i, int nprocs) { return (i / 36) * 36 + (i % 2) * 18 + (i % 36 / 2); } #elif GUADALUPE_MIC_COMPACT int cpumap(int i, int nprocs) { return (i + 1) % 228; } #else int cp...
```c #ifdef GUADALUPE_SPREAD int cpumap(int i, int nprocs) { return (i / 36) * 36 + (i % 2) * 18 + (i % 36 / 2); } #elif GUADALUPE_MIC_COMPACT int cpumap(int i, int nprocs) { return (i + 1) % 228; } #elif BIOU_COMPACT int cpumap(int i, int nprocs) { return (i % 4) * 32 + i / 4; } #else int cpumap(int id, i...
null
null
Destroy Img breaks and fixes the img source Apply this change to `src/main.ts` and return the full updated file. ```typescript import { HtmlDestroyer } from "./html-destroyer"; var htmlDestroyer:HtmlDestroyer = new HtmlDestroyer(); chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { ...
```typescript import { HtmlDestroyer } from "./html-destroyer"; var htmlDestroyer:HtmlDestroyer = new HtmlDestroyer(); chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request == "destroyH") { destroyH(); sendResponse("destroyH"); } else if (reque...
null
null
Add warning for Ruby < 2 Apply this change to `lib/deterministic.rb` and return the full updated file. ```ruby require "deterministic/version" module Deterministic; end require 'deterministic/monad' require 'deterministic/either/match' require 'deterministic/either' require 'deterministic/either/attempt_all' requir...
```ruby require "deterministic/version" warn "WARN: Deterministic is meant to run on Ruby 2+" if RUBY_VERSION.to_f < 2 module Deterministic; end require 'deterministic/monad' require 'deterministic/either/match' require 'deterministic/either' require 'deterministic/either/attempt_all' require 'deterministic/either/s...
null
null
Add autojump to zsh plugin Apply this change to `zsh/oh_my.zsh` and return the full updated file. ```bash is_linux() { [ "$(uname -s)" = Linux ] } ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" COMPLETION_WAITING_DOTS="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) pl...
```bash is_linux() { [ "$(uname -s)" = Linux ] } ZSH=$HOME/.oh-my-zsh ZSH_THEME="robbyrussell" COMPLETION_WAITING_DOTS="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) plugins=(colored-man code-dir command-not-found history-substring-search vi-mode web-search z autojump...
null
null
Add sumRating methods to fetch rating when using +1/-1 style ratings. Apply this change to `src/Rateable/Rateable.php` and return the full updated file. ```php <?php namespace willvincent\Rateable; trait Rateable { /** * This model has many ratings. * * @return Rating */ public function r...
```php <?php namespace willvincent\Rateable; trait Rateable { /** * This model has many ratings. * * @return Rating */ public function ratings() { return $this->morphMany('willvincent\Rateable\Rating', 'rateable'); } public function averageRating() { return ...
null
null
Add space before closing bracket Apply this change to `template-parts/hero.php` and return the full updated file. ```php <?php /** * Default hero template file. * * This is the default hero image for page templates, called * 'slide'. Strictly air specific. * * @package air */ ?> <div class="slide" style="bac...
```php <?php /** * Default hero template file. * * This is the default hero image for page templates, called * 'slide'. Strictly air specific. * * @package air */ ?> <div class="slide" style="background-image:url('<?php if ( has_post_thumbnail() ) : ?><?php echo esc_url(wp_get_attachment_url( get_post_thumbnai...
null
null
Fix identation error on template Apply this change to `templates/content.go` and return the full updated file. ```go package templates func ScopeTemplateContent() string { return `#cloud-config {{ .Name}}: {{ range .Services }}{{ .GetName }}: {{ range $key, $value := .GetParameters }}{{ $key }}: {{ $value }}...
```go package templates func ScopeTemplateContent() string { return `#cloud-config {{ .Name}}: {{ range .Services }}{{ .GetName }}: {{ range $key, $value := .GetParameters }}{{ $key }}: {{ $value }} {{ end }} {{ end }}units: {{ range .Units }}- name: {{ .GetName }} command: {{ .GetCommand }} ...
null
null
Hide Jobs admin pages from users Apply this change to `public/modules/jobs/config/jobs.client.config.js` and return the full updated file. ```javascript 'use strict'; // Configuring the Articles module angular.module('jobs').run(['Menus', function(Menus) { // Set top bar menu items Menus.addMenuItem('topbar', '...
```javascript 'use strict'; // Configuring the Articles module angular.module('jobs').run(['Menus', function(Menus) { // Set top bar menu items Menus.addMenuItem('topbar', 'Jobs', 'jobs', 'dropdown', '/jobs(/create)?', false, ['admin']); Menus.addSubMenuItem('topbar', 'jobs', 'List Jobs', 'jobs'); Menus.addSu...
null
null
Add earth_date method to Photo class Apply this change to `lib/explore_mars/photo.rb` and return the full updated file. ```ruby module ExploreMars class Photo attr_reader :src, :sol, :camera def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s ...
```ruby module ExploreMars class Photo attr_reader :src, :sol, :camera LANDING_DATE = DateTime.new(2012,8,6,5,17,57) SOL_IN_SECONDS = 88775.244 def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s @src end def earth_date ...
null
null
Update example to conform to new message arg behavior Apply this change to `examples/to_from_vec.rs` and return the full updated file. ```rust #[macro_use] extern crate serde_derive; extern crate serde; extern crate serde_bytes; extern crate serde_osc; use serde_bytes::ByteBuf; use serde_osc::{de, ser}; /// Struct ...
```rust #[macro_use] extern crate serde_derive; extern crate serde; extern crate serde_bytes; extern crate serde_osc; use serde_bytes::ByteBuf; use serde_osc::{de, ser}; /// Struct we'll serialize. /// This represents a single OSC message with three arguments: /// one of type 'i', 'f' and 'b', encoded in the order ...
null
null
Add simplified New and support env value Apply this change to `geocodio.go` and return the full updated file. ```go package geocodio import ( "errors" ) const ( // GeocodioAPIBaseURLv1 is the Geocod.io Base URL GeocodioAPIBaseURLv1 = "https://api.geocod.io/v1.5" ) // NewGeocodio is a helper to create new Geocod...
```go package geocodio import ( "os" "strings" ) const ( // GeocodioAPIBaseURLv1 is the Geocod.io Base URL GeocodioAPIBaseURLv1 = "https://api.geocod.io/v1.6" ) // Geocodio is the base struct type Geocodio struct { APIKey string } type Input struct { AddressComponents Components `json:"address_components"` F...
null
null
Fix camel case on the Learners response Apply this change to `src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api/Controllers/LearnerController.cs` and return the full updated file. ```csharp using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using SFA.DAS.Commitm...
```csharp using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using SFA.DAS.CommitmentsV2.Api.Types.Responses; using SFA.DAS.CommitmentsV2.Application.Queries.GetAllLearners; using System; using System.Net; using System.Th...
null
null
Remove primary key from user_int_id Apply this change to `scripts/cronRefreshGradesCrTable.sql` and return the full updated file. ```sql CREATE DATABASE IF NOT EXISTS EdxPrivate; USE EdxPrivate; CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade ( name VARCHAR(255) NOT NULL DEFAULT '', screen_name VARCHAR(255) N...
```sql CREATE DATABASE IF NOT EXISTS EdxPrivate; USE EdxPrivate; CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade ( name VARCHAR(255) NOT NULL DEFAULT '', screen_name VARCHAR(255) NOT NULL DEFAULT '', grade double NOT NULL DEFAULT 0.0, course_id VARCHAR(255) NOT NULL DEFAULT '', distinction TINYINT N...
null
null
Fix for absolute paths when using params Apply this change to `src/main/java/com/crowdin/cli/commands/functionality/PropertiesBuilder.java` and return the full updated file. ```java package com.crowdin.cli.commands.functionality; import com.crowdin.cli.properties.CliProperties; import com.crowdin.cli.properties.Para...
```java package com.crowdin.cli.commands.functionality; import com.crowdin.cli.properties.CliProperties; import com.crowdin.cli.properties.Params; import com.crowdin.cli.properties.PropertiesBean; import com.crowdin.cli.utils.file.FileReader; import java.io.File; import java.nio.file.Files; public class PropertiesBu...
null
null
Add missing prefix to droplet route group Apply this change to `Sources/VaporJsonApi/Toolbox/Droplet+VaporJsonApi.swift` and return the full updated file. ```swift // // Droplet+VaporJsonApi.swift // VaporJsonApi // // Created by Koray Koska on 10/05/2017. // // import Vapor import HTTP public extension Droplet ...
```swift // // Droplet+VaporJsonApi.swift // VaporJsonApi // // Created by Koray Koska on 10/05/2017. // // import Vapor import HTTP public extension Droplet { public func jsonApiResource<C: JsonApiResourceController>(controller: C) { let resourceType = controller.resourceType.parse() // Get r...
null
null
Update test with environnement variables Apply this change to `tests/TestCase/Controller/Component/GcmComponentTest.php` and return the full updated file. ```php <?php namespace ker0x\CakeGcm\Test\TestCase\Controller\Component; use Cake\Controller\ComponentRegistry; use Cake\Controller\Controller; use Cake\Network\R...
```php <?php namespace ker0x\CakeGcm\Test\TestCase\Controller\Component; use Cake\Controller\ComponentRegistry; use Cake\Controller\Controller; use Cake\Network\Request; use Cake\Network\Response; use Cake\TestSuite\IntegrationTestCase; use ker0x\CakeGcm\Controller\Component\GcmComponent; class GcmComponentTest exten...
null
null
Revert "Increase timeout for long running functional tests" This reverts commit f32f44adc8af3bec60f4466ae1f6a0781fde0f86. Apply this change to `.teamcity/Gradle_Check/configurations/FunctionalTest.kt` and return the full updated file. ```kotlin package configurations import jetbrains.buildServer.configs.kotlin.v10....
```kotlin package configurations import jetbrains.buildServer.configs.kotlin.v10.BuildType import model.CIBuildModel import model.OS import model.TestCoverage import model.TestType class FunctionalTest(model: CIBuildModel, testCoverage : TestCoverage, subProject: String = "") : BuildType({ uuid = testCoverage.asC...
null
null
Use 'anko.toast' instead of 'Toast.makeText(...).show()'. Apply this change to `ZMain/ImkGithubApp/src/main/java/net/imknown/imkgithub/mvp/BaseMvpPresenterActivity.kt` and return the full updated file. ```kotlin package net.imknown.imkgithub.mvp import android.content.pm.ActivityInfo import android.os.Bundle import ...
```kotlin package net.imknown.imkgithub.mvp import android.content.pm.ActivityInfo import android.os.Bundle import android.support.v7.app.AppCompatActivity import butterknife.ButterKnife import butterknife.Unbinder import org.jetbrains.anko.toast abstract class BaseMvpPresenterActivity : AppCompatActivity(), BaseMvpV...
null
null
Use the same User-Agent everywhere, just because Apply this change to `viewer/KVNetworkAccessManager.cpp` and return the full updated file. ```cpp #include "KVNetworkAccessManager.h" #include <QDebug> #include "KVNetworkReply.h" KVNetworkAccessManager::KVNetworkAccessManager(QObject *parent) : QNetworkAccessManag...
```cpp #include "KVNetworkAccessManager.h" #include <QDebug> #include "KVNetworkReply.h" KVNetworkAccessManager::KVNetworkAccessManager(QObject *parent) : QNetworkAccessManager(parent) { } QNetworkReply *KVNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData) { Q...
null
null
Add ability to enter commands Apply this change to `ArduinoWindowsRemoteControl/UI/EditCommandForm.cs` and return the full updated file. ```csharp using ArduinoWindowsRemoteControl.Helpers; using ArduinoWindowsRemoteControl.Interfaces; using System; using System.Collections.Generic; using System.ComponentModel; usin...
```csharp using ArduinoWindowsRemoteControl.Helpers; using ArduinoWindowsRemoteControl.Interfaces; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; names...
null
null
Add test for more than one filter for compiler Apply this change to `detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt` and return the full updated file. ```kotlin package io.gitlab.arturbosch.detekt.core import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe i...
```kotlin package io.gitlab.arturbosch.detekt.core import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe import org.jetbrains.spek.api.dsl.it import kotlin.test.assertNull import kotlin.test.assertTrue /** * @author Artur Bosch */ class KtTre...
null
null
Use early return instead of convoluted find Removes double `get` Apply this change to `lib/econfig/configuration.rb` and return the full updated file. ```ruby module Econfig class Configuration attr_accessor :default_write_backend def backends @backends ||= BackendCollection.new end def fet...
```ruby module Econfig class Configuration attr_accessor :default_write_backend def backends @backends ||= BackendCollection.new end def fetch(key) self[key] or raise Econfig::NotFound, "configuration key '#{key}' is not set" end def [](key) backends.each do |backend| ...
null
null
Refactor apps loader to use map instead of forEach Apply this change to `src/apps/routers.js` and return the full updated file. ```javascript const router = require('express').Router() const fs = require('fs') const { setHomeBreadcrumb } = require('./middleware') const appsRouters = [] const subApps = fs.readdirSyn...
```javascript const router = require('express').Router() const fs = require('fs') const { setHomeBreadcrumb } = require('./middleware') const subApps = fs.readdirSync(__dirname) const appsRouters = subApps.map(subAppDir => { const subApp = require(`./${subAppDir}`) if (subApp.mountpath) { return router.use(...
null
null
Use sudo to manipulate files output by docker run of asciidoctor Apply this change to `spec/collect-versioned-docs.sh` and return the full updated file. ```bash #!/usr/bin/env bash # Ensure script directory is CWD cd "${0%/*}"/output if [[ "${TRAVIS_TAG}x" != "x" ]] then cp detail.html seed-${TRAVIS_TAG}.html ...
```bash #!/usr/bin/env bash # Ensure script directory is CWD cd "${0%/*}"/output if [[ "${TRAVIS_TAG}x" != "x" ]] then sudo cp detail.html seed-${TRAVIS_TAG}.html sudo cp detail.pdf seed-${TRAVIS_TAG}.pdf; fi # Grab all available versions to place in gh-pages for VERSION in $(cat ../../.versions) do sudo...
null
null
Exclude misses and empty window hits from UR calculation Apply this change to `osu.Game/Screens/Ranking/Statistics/UnstableRate.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...
```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 System; using System.Collections.Generic; using System.Linq; using osu.Game.Rulesets.Scoring; namespace osu.Game.Screens.Ranking.Statistics { /// <su...
null
null
Print each entry, one per line, with table name and absolute path Apply this change to `TEST2/test2.rb` and return the full updated file. ```ruby # http://ruby-doc.org/stdlib-2.0.0/libdoc/open-uri/rdoc/OpenURI.html require 'open-uri' require 'nokogiri' require 'uri' # Go fetch the contents of a URL & store them as ...
```ruby # http://ruby-doc.org/stdlib-2.0.0/libdoc/open-uri/rdoc/OpenURI.html require 'open-uri' require 'nokogiri' require 'uri' # Go fetch the contents of a URL & store them as a String response = open('http://www2.stat.duke.edu/courses/Spring01/sta114/data/andrews.html') doc = Nokogiri::HTML(response) rows = {} mo...
null
null
Refactor again, to ease testing. Apply this change to `lib/pith/plugins/publication/input.rb` and return the full updated file. ```ruby require "pith/input" require "time" module Pith module Input class Abstract def published? false end end class Template def ...
```ruby require "pith/input" require "time" module Pith module Plugins module Publication module TemplateMethods def published? !published_at.nil? end def published_at parse_date(meta["published"]) end def updated_at parse_date(meta[...
null
null
Add passing of information to prepareforsegue method Apply this change to `bikepath/ResultsMapViewController.h` and return the full updated file. ```c // // ResultsMapViewController.h // bikepath // // Created by Farheen Malik on 8/14/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <UIKit/UI...
```c // // ResultsMapViewController.h // bikepath // // Created by Farheen Malik on 8/14/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <UIKit/UIKit.h> #import <GoogleMaps/GoogleMaps.h> #import "SearchItem.h" @interface ResultsMapViewController : UIViewController <GMSMapViewDelegate> @proper...
null
null
Add missing illegalArg(argument: Any?) fun Apply this change to `exceptions/src/main/java/splitties/exceptions/Exceptions.kt` and return the full updated file. ```kotlin /* * Copyright (c) 2017. Louis Cognault Ayeva Derman * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this ...
```kotlin /* * Copyright (c) 2017. 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
Replace ((MAIN_BUNDLE_URL)) keyword with mainBundle path Apply this change to `Sources/TVMLBridging.swift` and return the full updated file. ```swift // // TVMLBridging.swift // TVMLKitchen // // Created by toshi0383 on 12/11/15. // Copyright © 2015 toshi0383. All rights reserved. // internal func openTVMLTempla...
```swift // // TVMLBridging.swift // TVMLKitchen // // Created by toshi0383 on 12/11/15. // Copyright © 2015 toshi0383. All rights reserved. // internal func openTVMLTemplateFromXMLString(xmlString: String, type: PresentationType = .Default) { let js = "openTemplateFromXMLString(`\(xmlString)`, \(type.rawValue...
null
null
Add isOpen property to FileChooser Apply this change to `src/main/kotlin/net/bjoernpetersen/musicbot/api/config/ConfigUi.kt` and return the full updated file. ```kotlin package net.bjoernpetersen.musicbot.api.config import com.google.common.annotations.Beta import java.io.File sealed class UiNode<T> object TextBox ...
```kotlin package net.bjoernpetersen.musicbot.api.config import com.google.common.annotations.Beta import java.io.File sealed class UiNode<T> object TextBox : UiNode<String>() object PasswordBox : UiNode<String>() object CheckBox : UiNode<Boolean>() // TODO sure about that? @Beta data class ActionButton<T>( val l...
null
null
Use more reliable method to get router address list contents Apply this change to `get-router-address-list.sh` and return the full updated file. ```bash #!/bin/sh set -e die() { echo >&2 "$@" exit 1 } [ "$#" -eq 1 ] || die "Usage: $0 <SSH address of router>" ssh "$1" '/ip firewall address-list export' | grep -F...
```bash #!/bin/sh set -e die() { echo >&2 "$@" exit 1 } [ "$#" -eq 1 ] || die "Usage: $0 <SSH address of router>" #ssh "$1" '/ip firewall address-list export compact' | grep -F 'list=spamhaus-drop' | grep -oE 'address=((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(/([1-2]?[0-9]|3[0-...
null
null
Add conversion to/from io::Error for kv::Error And keep the original error, so that an io error inside the visitor is returned accessible by the call to `visit`. Apply this change to `src/kv/error.rs` and return the full updated file. ```rust use std::fmt; /// An error encountered while working with structured data...
```rust use std::fmt; /// An error encountered while working with structured data. #[derive(Debug)] pub struct Error { inner: Inner } #[derive(Debug)] enum Inner { #[cfg(feature = "std")] Io(std::io::Error), Msg(&'static str), Fmt, } impl Error { /// Create an error from the given message. ...
null
null
Fix confusing generator comment (adaptor => adapter) Apply this change to `rails_generators/pickle/templates/env.rb` and return the full updated file. ```ruby <%= current_env -%> <%- if pickle -%> require 'pickle/world' # Example of configuring pickle: # # Pickle.configure do |config| # config.adaptors = [:machinis...
```ruby <%= current_env -%> <%- if pickle -%> require 'pickle/world' # Example of configuring pickle: # # Pickle.configure do |config| # config.adapters = [:machinist] # config.map 'I', 'myself', 'me', 'my', :to => 'user: "me"' # end <%- end -%> <%- if pickle_path -%>require 'pickle/path/world' <%- end -%> <%- if p...
null
null
Add an empty line. Yeah, that's a fantastic commit. Apply this change to `src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c` and return the full updated file. ```c #include "crypto_scalarmult_curve25519.h" size_t crypto_scalarmult_curve25519_bytes(void) { return crypto_scalarmult_curve25519_...
```c #include "crypto_scalarmult_curve25519.h" size_t crypto_scalarmult_curve25519_bytes(void) { return crypto_scalarmult_curve25519_BYTES; } size_t crypto_scalarmult_curve25519_scalarbytes(void) { return crypto_scalarmult_curve25519_SCALARBYTES; } ```
null
null
Make sure we use Python 3 here Apply this change to `run_travis_lambdas.py` and return the full updated file. ```python #!/usr/bin/env python # -*- encoding: utf-8 """ Usage: run_travis_lambdas.py (test|publish) """ import os import subprocess import sys if __name__ == '__main__': try: verb = sys.argv[...
```python #!/usr/bin/env python # -*- encoding: utf-8 """ Usage: run_travis_lambdas.py (test|publish) """ import os import subprocess import sys if __name__ == '__main__': try: verb = sys.argv[1] assert verb in ('test', 'publish') except (AssertionError, IndexError): sys.exit(__doc__....
null
null
Add new interface for type Apply this change to `src/Walisph/Merchant/ProductInterface.php` and return the full updated file. ```php <?php namespace Walisph\Merchant; interface ProductInterface { public function getProductName(); public function getDescription(); public function getPrice(); public function g...
```php <?php namespace Walisph\Merchant; interface ProductInterface { public function getProductName(); public function getDescription(); public function getPrice(); public function getManufacturer(); public function getBrand(); public function getProductModel(); public function getType(); } ```
null
null
Update branch for git updater Apply this change to `CultureObject.php` and return the full updated file. ```php <?php /** * Plugin Name: Culture Object * Plugin URI: http://cultureobject.co.uk * Description: A framework as a plugin to enable sync of culture objects into WordPress. * Version: 3.0.0-alpha.2 * Auth...
```php <?php /** * Plugin Name: Culture Object * Plugin URI: http://cultureobject.co.uk * Description: A framework as a plugin to enable sync of culture objects into WordPress. * Version: 3.0.0-alpha.2 * Author: Liam Gladdy / Thirty8 Digital * Text Domain: culture-object * Author URI: https://github.com/lgladdy ...
null
null
Add jo -- command to create JSON Apply this change to `.zsh/plugins.zsh` and return the full updated file. ```bash if [ -r $HOME/.zplug/zplug ]; then source $HOME/.zplug/zplug zplug 'mafredri/zsh-async' zplug 'sindresorhus/pure' zplug 'mollifier/anyframe' zplug 'b4b4r07/enhancd', of:enhancd.sh zplug 'zsh...
```bash if [ -r $HOME/.zplug/zplug ]; then source $HOME/.zplug/zplug zplug 'mafredri/zsh-async' zplug 'sindresorhus/pure' zplug 'mollifier/anyframe' zplug 'b4b4r07/enhancd', of:enhancd.sh zplug 'zsh-users/zsh-completions' zplug 'zsh-users/zsh-autosuggestions' zplug 'jpmens/jo', \ as:command, \ ...
null
null
Make isVisual a resolved result Apply this change to `view/utils/is-visual.js` and return the full updated file. ```javascript // Are we in visual interface (or maybe it's just programmatical document generator) 'use strict'; module.exports = function () { if ((typeof window !== 'object') || !window) return false;...
```javascript // Are we in visual interface (or maybe it's just programmatical document generator) 'use strict'; module.exports = (function () { if ((typeof window !== 'object') || !window) return false; if ((typeof document !== 'object') || !document) return false; if (typeof window.getComputedStyle !== 'function...
null
null
Declare public function in header. git-svn-id: 0f3f1c46c6da7ffd142db61e503a7ff63af3a195@35475 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 Apply this change to `src/modules/conf_theme/e_int_config_theme.h` and return the full updated file. ```c /* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #ifdef E_TYPEDEFS #...
```c /* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #ifdef E_TYPEDEFS #else #ifndef E_INT_CONFIG_THEME_H #define E_INT_CONFIG_THEME_H EAPI E_Config_Dialog *e_int_config_theme(E_Container *con, const char *params __UNUSED__); EAPI void e_int_config_theme_import_done(E_Config_Dialog *dia); EAPI...
null
null
Change: Access operator for array is now "item" Apply this change to `src/reni2/FeatureTest/Reference/ArrayElementType.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Linq; using hw.UnitTest; namespace Reni.FeatureTest.Reference { [TestFixture] [Ar...
```csharp using System; using System.Collections.Generic; using System.Linq; using hw.UnitTest; namespace Reni.FeatureTest.Reference { [TestFixture] [ArrayElementType1] [Target(@" a: 'Text'; t: a type item; t dump_print ")] [Output("(bit)*8[text_item]")] public sealed class ArrayElementType : Compi...
null
null
Add more attributes to initial teacher state Apply this change to `src/app/shared/reducers/teacher.reducer.ts` and return the full updated file. ```typescript import { ActionReducer } from '@ngrx/store'; import { Teacher } from '../models'; export const TEACHER = 'TEACHER'; export const SET_TEACHER = 'SET_TEACHER'...
```typescript import { ActionReducer } from '@ngrx/store'; import { Teacher } from '../models'; export const TEACHER = 'TEACHER'; export const SET_TEACHER = 'SET_TEACHER'; let initialState = new Teacher.Builder() .withId('1') .withClasses(['AM', 'PM']) .build(); export const teacherReducer: ActionReducer<Tea...
null
null
Use the hosts for each application Apply this change to `src/main/java/se/arbetsformedlingen/venice/probe/ProbeCheckScheduler.java` and return the full updated file. ```java package se.arbetsformedlingen.venice.probe; import se.arbetsformedlingen.venice.common.Application; import se.arbetsformedlingen.venice.common....
```java package se.arbetsformedlingen.venice.probe; import se.arbetsformedlingen.venice.common.Application; import se.arbetsformedlingen.venice.common.Applications; import se.arbetsformedlingen.venice.common.Host; import java.util.LinkedList; import java.util.List; import java.util.concurrent.Executors; import java.u...
null
null
desktop_aura: Prepare to build desktop_aura/ as part of views only. Replace the usage of WaylandDisplay class with OzoneDisplay, so we dont have to build Ozone-Wayland as part of views but rather have it as it's dependency. Apply this change to `ui/desktop_aura/desktop_factory_wayland.cc` and return the full updated ...
```cpp // Copyright 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ozone/ui/desktop_aura/desktop_factory_wayland.h" #include "ozone/ui/desktop_aura/desktop_screen_wayland.h" #include "ozone/ui/desktop_aura/...
null
null
Add tests for content type's elements Apply this change to `Example/Tests/DeliveryService/DeliveryClient/GetContentType.swift` and return the full updated file. ```swift // // GetContentType.swift // KenticoCloud // // Created by Martin Makarsky on 13/10/2017. // Copyright © 2017 CocoaPods. All rights reserved. /...
```swift // // GetContentType.swift // KenticoCloud // // Created by Martin Makarsky on 13/10/2017. // Copyright © 2017 CocoaPods. All rights reserved. // import Quick import Nimble import KenticoCloud class GetContentTypeSpec: QuickSpec { override func spec() { describe("Get content type request") { ...
null
null
Update rustdoc test to make it work with newly added rustc passes Apply this change to `src/test/rustdoc/implementor-stable-version.rs` and return the full updated file. ```rust #![crate_name = "foo"] #![feature(staged_api)] #[stable(feature = "bar", since = "OLD 1.0")] pub trait Bar {} #[stable(feature = "baz", s...
```rust #![stable(feature = "bar", since = "OLD 1.0")] #![crate_name = "foo"] #![feature(staged_api)] #[stable(feature = "bar", since = "OLD 1.0")] pub trait Bar {} #[stable(feature = "baz", since = "OLD 1.0")] pub trait Baz {} #[stable(feature = "baz", since = "OLD 1.0")] pub struct Foo; // @has foo/trait.Bar.htm...
null
null
Improve time visibility on Milestone Apply this change to `app/src/main/java/com/alorma/github/utils/NaturalTimeFormatter.java` and return the full updated file. ```java package com.alorma.github.utils; import android.content.Context; import tk.zielony.naturaldateformat.AbsoluteDateFormat; import tk.zielony.naturald...
```java package com.alorma.github.utils; import android.content.Context; import tk.zielony.naturaldateformat.AbsoluteDateFormat; import tk.zielony.naturaldateformat.NaturalDateFormat; import tk.zielony.naturaldateformat.RelativeDateFormat; public class NaturalTimeFormatter implements TimeFormatter { private Context...
null
null
Integrate response factory into the deck controller." Apply this change to `src/MoFlashCards/DeckBundle/Controller/DeckController.php` and return the full updated file. ```php <?php namespace MoFlashCards\DeckBundle\Controller; use JMS\Serializer\SerializationContext; use Symfony\Bundle\FrameworkBundle\Control...
```php <?php namespace MoFlashCards\DeckBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class DeckController extends Controller { /** * Lists all available...
null
null
Change method 'alias' to 'bind' for provide facade Apply this change to `src/ObjectsServiceProvider.php` and return the full updated file. ```php <?php namespace AndrewNovikof\Objects; use Illuminate\Support\ServiceProvider; /** * Class ObjectsServiceProvider * @package Objects */ class ObjectsServiceProvider e...
```php <?php namespace AndrewNovikof\Objects; use Illuminate\Support\ServiceProvider; /** * Class ObjectsServiceProvider * @package Objects */ class ObjectsServiceProvider extends ServiceProvider { /** * Bootstrap the application services. * * @return void */ public function boot() ...
null
null
Fix problem of translation exception being penetrated Apply this change to `src/main/kotlin/cn/yiiguxing/plugin/translate/documentation/TranslateDocumentationTask.kt` and return the full updated file. ```kotlin package cn.yiiguxing.plugin.translate.documentation import cn.yiiguxing.plugin.translate.trans.Translator ...
```kotlin package cn.yiiguxing.plugin.translate.documentation import cn.yiiguxing.plugin.translate.trans.Translator import cn.yiiguxing.plugin.translate.util.TranslateService import cn.yiiguxing.plugin.translate.util.invokeLater import com.intellij.lang.Language import com.intellij.openapi.application.ModalityState im...
null
null
Update response mapping for transit Apply this change to `SimpleRestClient/Classes/TransitRoutes.swift` and return the full updated file. ```swift // // TransitRoutes.swift // Pods // // Created by John Neyer on 8/24/17. // // import Foundation import ObjectMapper public class TransitRoutes : RestResponse { ...
```swift // // TransitRoutes.swift // Pods // // Created by John Neyer on 8/24/17. // // import Foundation import ObjectMapper public class TransitRoutes : RestResponse { var results: Int? var route: Int? var transit: [TransitRoute]? public override func mapping(map: Map) { s...
null
null
Add DARK_BLUE enum value back to avoid crash Apply this change to `app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt` and return the full updated file. ```kotlin package eu.kanade.tachiyomi.data.preference import eu.kanade.tachiyomi.R const val UNMETERED_NETWORK = "wifi" const val CHARGING =...
```kotlin package eu.kanade.tachiyomi.data.preference import eu.kanade.tachiyomi.R const val UNMETERED_NETWORK = "wifi" const val CHARGING = "ac" /** * This class stores the values for the preferences in the application. */ object PreferenceValues { /* ktlint-disable experimental:enum-entry-name-case */ ...
null
null
Use the new pkgconfig API Apply this change to `sdl2-sys/build.rs` and return the full updated file. ```rust #[cfg(feature="pkg-config")] extern crate "pkg-config" as pkg_config; fn main() { if !build_pkgconfig() { println!("cargo:rustc-flags=-l SDL2"); } } #[cfg(not(feature="pkg-config"))] fn build_p...
```rust #[cfg(feature="pkg-config")] extern crate "pkg-config" as pkg_config; fn main() { if !build_pkgconfig() { println!("cargo:rustc-flags=-l SDL2"); } } #[cfg(not(feature="pkg-config"))] fn build_pkgconfig() -> bool { false } #[cfg(feature="pkg-config")] fn build_pkgconfig() -> bool { if pk...
null
null
Fix index for msg table. Apply this change to `schema.sql` and return the full updated file. ```sql CREATE TABLE mq_server_msgs( id SERIAL NOT NULL PRIMARY KEY, msg_id VARCHAR(255) NOT NULL UNIQUE, priority INT NOT NULL, destination VARCHAR(255) NOT NULL, timestamp TIMESTAMP WITHOUT TIME ZONE NOT...
```sql CREATE TABLE mq_server_msgs( id SERIAL NOT NULL PRIMARY KEY, msg_id VARCHAR(255) NOT NULL UNIQUE, priority INT NOT NULL, destination VARCHAR(255) NOT NULL, timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL, ack_timeout FLOAT NOT NULL, body TEXT NOT NULL ); CREATE TABLE mq_server_ack_ms...
null
null
Add python(2to3) used in building grte. Apply this change to `build_grte.sh` and return the full updated file. ```bash #!/bin/bash # This runs inside docker container as root to build GRTE set -ex apt-get update # Make sure requires packages are installed(either on host or insider # docker) # xz-utils: needed to un...
```bash #!/bin/bash # This runs inside docker container as root to build GRTE set -ex apt-get update # Make sure requires packages are installed(either on host or insider # docker) # xz-utils: needed to unpack kernel source # gawk: used by building glibc # rpm: rpmbuild to build rpm package # alien, fakeroot, debhelp...
null
null
Fix code warning in test Apply this change to `src/UnitTests/GitHub.App/ViewModels/PullRequestCreationViewModelTests.cs` and return the full updated file. ```csharp using System.Reactive.Linq; using System.Threading.Tasks; using NSubstitute; using Xunit; using UnitTests; using GitHub.Models; using System; using GitH...
```csharp using System.Reactive.Linq; using System.Threading.Tasks; using NSubstitute; using Xunit; using UnitTests; using GitHub.Models; using System; using GitHub.Services; using GitHub.ViewModels; public class PullRequestCreationViewModelTests : TempFileBaseClass { [Fact] public async Task NullDescriptionB...
null
null
Add recursive logging of causes for the bus error handler. Apply this change to `keratin-core/src/ca/szc/keratin/core/net/BusErrorHandler.java` and return the full updated file. ```java /** * Copyright (C) 2013 Alexander Szczuczko * * This file may be modified and distributed under the terms * of the MIT license....
```java /** * Copyright (C) 2013 Alexander Szczuczko * * This file may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ package ca.szc.keratin.core.net; import org.pmw.tinylog.Logger; import net.engio.mbassy.IPublicationErrorHandler; import net.engio.mbassy.P...
null
null
Fix catch socket timeout and error exceptions Apply this change to `isso/utils/http.py` and return the full updated file. ```python # -*- encoding: utf-8 -*- import socket try: import httplib except ImportError: import http.client as httplib from isso.wsgi import urlsplit class curl(object): """Easy ...
```python # -*- encoding: utf-8 -*- import socket try: import httplib except ImportError: import http.client as httplib from isso.wsgi import urlsplit class curl(object): """Easy to use wrapper around :module:`httplib`. Use as context-manager so we can close the response properly. .. code-blo...
null
null
Fix XML docs containing an ampersand Apply this change to `src/Common/src/System/Net/Http/HttpHandlerDefaults.cs` and return the full updated file. ```csharp // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespac...
```csharp // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace System.Net.Http { /// <summary> /// Defines default values for http handler properties which is meant to be re-used across WinHttp and UnixH...
null
null
Use Ember.TextField instead of generic Ember.Component Datepicker is an input field, so it much better to use Ember.TextField. It automatically gives attributes like `name`, `size`, `placeholder` and etc. This also closes #2 Apply this change to `addon/components/bootstrap-datepicker.js` and return the full updated ...
```javascript import Ember from 'ember'; export default Ember.TextField.extend({ setupBootstrapDatepicker: function() { var self = this, element = this.$(), value = this.get('value'); element. datepicker({ autoclose: this.get('autoclose') || true, format: this.get('form...
null
null
Move error collection to a safe method with the same name Apply this change to `lib/activerecord-prunable.rb` and return the full updated file. ```ruby # frozen_string_literal: true require 'active_record/prunable' module Prunable @@eager_load = nil class << self def models @@eager_load ||= Rails.app...
```ruby # frozen_string_literal: true require 'active_record/prunable' module Prunable @@eager_load = nil class << self def models @@eager_load ||= Rails.application.eager_load! ActiveRecord::Prunable.includes end def prune!(*models, prune_method: nil, current_time: nil, params: []) ...
null
null
Replace SQLite path for MBTiles files with full path, so that doesn't throw an exception on UWP Apply this change to `Samples/Mapsui.Samples.Common/Maps/MbTilesSample.cs` and return the full updated file. ```csharp using System.IO; using BruTile.MbTiles; using Mapsui.Layers; using Mapsui.UI; using SQLite; namespace...
```csharp using System.IO; using BruTile.MbTiles; using Mapsui.Layers; using Mapsui.UI; using SQLite; namespace Mapsui.Samples.Common.Maps { public class MbTilesSample : ISample { // This is a hack used for iOS/Android deployment public static string MbTilesLocation { get; set; } = @"." + Path...
null
null
Add proxy prefix to HsConfig Apply this change to `config.service.ts` and return the full updated file. ```typescript export class HsConfig { cesiumTime: any; componentsEnabled: any; mapInteractionsEnabled: boolean; allowAddExternalDatasets: boolean; sidebarClosed: boolean; layer_order: string; box_laye...
```typescript export class HsConfig { cesiumTime: any; componentsEnabled: any; mapInteractionsEnabled: boolean; allowAddExternalDatasets: boolean; sidebarClosed: boolean; layer_order: string; box_layers: Array<any>; senslog: any; cesiumdDebugShowFramesPerSecond: boolean; cesiumShadows: number; ces...
null
null
Update pip before installing IPython Potential fix for gibiansky/IHaskell#160 Apply this change to `installation/ipython.sh` and return the full updated file. ```bash #!/bin/bash set -e # Which virtualenv to use. VIRTUALENV=$1 # Commit hash to install. COMMIT=$2 # Activate the virtualenv. source $VIRTUALENV/bin/a...
```bash #!/bin/bash set -e # Which virtualenv to use. VIRTUALENV=$1 # Commit hash to install. COMMIT=$2 # Activate the virtualenv. source $VIRTUALENV/bin/activate # Upgrade pip. echo "Upgrading pip" pip install --upgrade "pip>=1.4.1" # Install all necessary dependencies with Pip. echo "Installing dependency (pyzmq...
null
null
Add Stripe to known facets. Apply this change to `SoftU2FTool/KnownFacets.swift` and return the full updated file. ```swift // // KnownFacets.swift // SoftU2F // // Created by Benjamin P Toews on 1/27/17. // import Foundation let KnownFacets: [Data: String] = [ SHA256.digest("https://github.com/u2f/trusted_f...
```swift // // KnownFacets.swift // SoftU2F // // Created by Benjamin P Toews on 1/27/17. // import Foundation let KnownFacets: [Data: String] = [ SHA256.digest("https://github.com/u2f/trusted_facets"): "https://github.com", SHA256.digest("https://demo.yubico.com"): "https://demo.yubico.com", SHA256.di...
null
null
Document on getters of argc and argv Apply this change to `src/crt/crt1.c` and return the full updated file. ```c #include <stdint.h> void __wasm_call_ctors(void); int __argc(void); void __argv(uintptr_t[static 1]); void __args(char[static 1]); int main(int, char**); void _start(void) { int argc = __argc(); ...
```c #include <stdint.h> void __wasm_call_ctors(void); /*! * `argc` getter * * This function returns 0 if passing arguments to main() is unsupported. */ int __argc(void); /*! * `argv` builder * * This function stores `argv` as offset from `argv[0]`, * and appends `sizeof(args)`. * * For example, if the com...
null
null
Use weak reference in object factory to avoid cyclical references Apply this change to `Source/JSObjectFactory.h` and return the full updated file. ```c #import <Foundation/Foundation.h> @class JSObjectionInjector; @interface JSObjectFactory : NSObject @property (nonatomic, readonly, strong) JSObjectionInjector *in...
```c #import <Foundation/Foundation.h> @class JSObjectionInjector; @interface JSObjectFactory : NSObject @property (nonatomic, readonly, weak) JSObjectionInjector *injector; - (id)initWithInjector:(JSObjectionInjector *)injector; - (id)getObject:(id)classOrProtocol; - (id)objectForKeyedSubscript: (id)key; - (id)getO...
null
null
Make ConvertPath to allow this functionality to be modified to allow for slashes in path Apply this change to `src/SoapCore/TrailingServicePathTuner.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using...
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace SoapCore { /// <summary> /// This tuner truncates the incoming http request to the last path-part. ie. /DynamicPath/Service.svc becomes /Service.svc...
null
null
Move to using build tools 28.0.3. Test: ./gradlew assembleDebug Change-Id: I6baec9ffeeb113444c30b48552499fa135c21813 Apply this change to `buildSrc/src/main/kotlin/androidx/build/SupportConfig.kt` and return the full updated file. ```kotlin /* * Copyright 2017 The Android Open Source Project * * Licensed under th...
```kotlin /* * Copyright 2017 The Android Open Source Project * * 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
Set User-Agent to fix gist imports Apply this change to `proxy.php` and return the full updated file. ```php <?php if (!isset($_GET['url'])) die(); $url = urldecode($_GET['url']); if (strpos($url, 'http://', 0) !== 0 && strpos($url, 'https://', 0) !== 0) die(); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNT...
```php <?php if (!isset($_GET['url'])) die(); $url = urldecode($_GET['url']); if (strpos($url, 'http://', 0) !== 0 && strpos($url, 'https://', 0) !== 0) die(); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array("U...
null
null
Fix bug where directories would fail to open when recursing Apply this change to `src/utils/directory.cc` and return the full updated file. ```cpp // // src/utils/directory.cc // tbd // // Created by inoahdev on 10/17/17. // Copyright © 2017 inoahdev. All rights reserved. // #include "directory.h" namespace uti...
```cpp // // src/utils/directory.cc // tbd // // Created by inoahdev on 10/17/17. // Copyright © 2017 inoahdev. All rights reserved. // #include "directory.h" namespace utils { directory::open_result directory::open(const char *path) { this->path = path; this->dir = opendir(path); if ...
null
null
Update ps test: add All option Apply this change to `ps_test.go` and return the full updated file. ```go package dockercommand import ( "testing" "github.com/stretchr/testify/assert" ) func TestShortDockerPs(t *testing.T) { docker, err := NewDockerForTest() if err != nil { t.Fatalf("err: %s", err) } conta...
```go package dockercommand import ( "testing" "github.com/stretchr/testify/assert" ) func TestShortDockerPs(t *testing.T) { docker, err := NewDockerForTest() if err != nil { t.Fatalf("err: %s", err) } containers, err := docker.Ps(&PsOptions{All: true}) if err != nil { t.Fatalf("err: %s", err) } assert...
null
null