original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Fix missing '/' in forum route Apply this change to `src/InsaLan/NewsBundle/Controller/DefaultController.php` and return the full updated file. ```php <?php namespace InsaLan\NewsBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; ...
```php <?php namespace InsaLan\NewsBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use InsaLan\NewsBundle\Entity; class DefaultController extends Controller { /*...
null
null
Remove GLKMatrixStack ... thanks Twilight! :D Apply this change to `3rdparty/GLKit/GLKMath.h` and return the full updated file. ```c // // GLKMath.h // GLKit // // Copyright (c) 2011, Apple Inc. All rights reserved. // #include <GLKit/GLKMathTypes.h> #include <GLKit/GLKMatrix3.h> #include <GLKit/GLKMatrix4.h> #i...
```c // // GLKMath.h // GLKit // // Copyright (c) 2011, Apple Inc. All rights reserved. // #include <GLKit/GLKMathTypes.h> #include <GLKit/GLKMatrix3.h> #include <GLKit/GLKMatrix4.h> #include <GLKit/GLKVector2.h> #include <GLKit/GLKVector3.h> #include <GLKit/GLKVector4.h> #include <GLKit/GLKQuaternion.h> //#inclu...
null
null
Update vigenereDicitonaryHacker: fixed error reported in forum Apply this change to `books/CrackingCodesWithPython/Chapter20/vigenereDictionaryHacker.py` and return the full updated file. ```python # Vigenère Cipher Dictionary Hacker # https://www.nostarch.com/crackingcodes/ (BSD Licensed) import detectEnglish, vige...
```python # Vigenère Cipher Dictionary Hacker # https://www.nostarch.com/crackingcodes/ (BSD Licensed) import detectEnglish, vigenereCipher, pyperclip def main(): ciphertext = """Tzx isnz eccjxkg nfq lol mys bbqq I lxcz.""" hackedMessage = hackVigenereDictionary(ciphertext) if hackedMessage != None: ...
null
null
Add assertion for forecast test Apply this change to `tests/test_midas.py` and return the full updated file. ```python import datetime from midas import mix from midas.midas import estimate, forecast def test_estimate(gdp_data, farmpay_data): y, yl, x, yf, ylf, xf = mix.mix_freq(gdp_data.gdp, farmpay_data.far...
```python import datetime import numpy as np from midas import mix from midas.midas import estimate, forecast def test_estimate(gdp_data, farmpay_data): y, yl, x, yf, ylf, xf = mix.mix_freq(gdp_data.gdp, farmpay_data.farmpay, 3, 1, 1, start_date=datetime.datetime(1985, 1...
null
null
Update default behavior of Watch button Apply this change to `test/e2e/main.js` and return the full updated file. ```javascript 'use strict'; describe('Sign up page', function () { var watchButton; beforeEach(function () { watchButton = element('.btn-primary'); }); it('should have Watch/Unwatch disabled by ...
```javascript 'use strict'; describe('Sign up page', function () { var watchButton; beforeEach(function () { watchButton = element('.btn-primary'); }); it('should have Watch enabled by default', function() { expect(watchButton.attr('disabled')).toBeFalsy(); }); it('should enable Watch/Unwatch button', fu...
null
null
Add method to verify that all strategy probabilities add to 1 Apply this change to `tools/game_utils.py` and return the full updated file. ```python import scipy.misc import scipy.special def get_num_hole_card_combinations(game): num_players = game.get_num_players() num_hole_cards = game.get_num_hole_cards(...
```python import numpy as np import scipy.misc import scipy.special from tools.walk_tree import walk_tree from tools.game_tree.nodes import ActionNode def get_num_hole_card_combinations(game): num_players = game.get_num_players() num_hole_cards = game.get_num_hole_cards() num_cards = game.get_num_suits()...
null
null
Support extends of the interface Apply this change to `commons-db/src/main/java/com/palantir/nexus/db/sql/AgnosticResultSet.java` and return the full updated file. ```java /** * Copyright 2015 Palantir Technologies * * Licensed under the BSD-3 License (the "License"); * you may not use this file except in complia...
```java /** * Copyright 2015 Palantir Technologies * * Licensed under the BSD-3 License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://opensource.org/licenses/BSD-3-Clause * * Unless required by applicable law or agreed t...
null
null
[Refactoring] Convert methods bodies to expression Apply this change to `src/main/kotlin/com/elpassion/intelijidea/task/edit/MFBeforeRunTaskDialog.kt` and return the full updated file. ```kotlin package com.elpassion.intelijidea.task.edit import com.elpassion.intelijidea.task.MFTaskData import com.intellij.openapi.p...
```kotlin package com.elpassion.intelijidea.task.edit import com.elpassion.intelijidea.task.MFTaskData import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.ui.TextFieldWithBrowseButton import com.intellij.openapi.ui.ValidationInfo import javax.swing.JComp...
null
null
Create matrix out of input data to simplify algorithm Apply this change to `MatrixMinCostPath/MatrixMinCostPath/main.cpp` and return the full updated file. ```cpp #include <iostream> #include "..\..\shared\ProblemEngine.h" int FindShortestPath(const int * const data, int size); int main(int argc, char * argv[]) { ...
```cpp #include <iostream> #include "..\..\shared\ProblemEngine.h" int FindShortestPath(int ** data, int rowSize); int** CreateMatrix(const int * const input, int rowSize) { auto ret = new int*[rowSize]; for (int i = 0; i < rowSize; ++i) { ret[i] = new int[rowSize]; for (int j = 0; j < rowSize; ++j) ret[i]...
null
null
Add information about the video url. Apply this change to `cpp/example.cpp` and return the full updated file. ```cpp /** * @file example.cpp * @author Marcus Edel * * Simple random agent. */ #include <iostream> #include "environment.hpp" using namespace gym; int main(int argc, char* argv[]) { const std::st...
```cpp /** * @file example.cpp * @author Marcus Edel * * Simple random agent. */ #include <iostream> #include "environment.hpp" using namespace gym; int main(int argc, char* argv[]) { const std::string environment = "CartPole-v0"; const std::string host = "kurg.org"; const std::string port = "4040"; d...
null
null
Add newline at end of file in JKF Apply this change to `src/api.ts` and return the full updated file. ```typescript import * as stringify from "json-stringify-pretty-compact"; import { JSONKifuFormat } from "./shogiUtils"; export default class Api { static fetchJKF() { const begin = new Date(); return fetc...
```typescript import * as stringify from "json-stringify-pretty-compact"; import { JSONKifuFormat } from "./shogiUtils"; export default class Api { static fetchJKF() { const begin = new Date(); return fetch('/jkf') .then(response => response.json()) .then(json => { const end = new Date();...
null
null
Fix package comment in doc-gen. Apply this change to `gke-deploy/doc-gen/main.go` and return the full updated file. ```go / doc-gen generates gke-deploy's help docs. package main import ( "fmt" "log" "os" "github.com/GoogleCloudPlatform/cloud-builders/gke-deploy/cmd" "github.com/spf13/cobra" "github.com/spf13...
```go // doc-gen generates gke-deploy's help docs. package main import ( "fmt" "log" "os" "github.com/GoogleCloudPlatform/cloud-builders/gke-deploy/cmd" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" ) var dir string var root = &cobra.Command{ Use: "gendoc", Short: "Generate gke-deploy's help docs",...
null
null
Revert "Give proper name to webpack output" Apply this change to `webpack.config.js` and return the full updated file. ```javascript 'use strict'; var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'sourcemap', entry: { app: ['./src/index.ts'] }, output: { path...
```javascript 'use strict'; var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'sourcemap', entry: { app: ['./src/index.ts'] }, output: { path: path.join(__dirname, 'dist'), publicPath: 'dist', filename: 'bundle.js', library: 'JSONFormatter', libr...
null
null
Use brace (browserified ace) for editor. Also fix the bundled map file locations. Change-Id: Icbe5b54e1ff71fab4ddef0607acd5ffd5ba61df3 Apply this change to `client/playground/client/index.js` and return the full updated file. ```javascript var _ = require('lodash'); // TODO(sadovsky): Neither CodeMirror (npm: code...
```javascript var _ = require('lodash'); var ace = require('brace'); require('brace/mode/javascript'); require('brace/mode/golang'); require('brace/theme/solarized_light'); // TODO(sadovsky): Neither CodeMirror (npm: codemirror or code-mirror) nor Ace // (npm: brace) seem to work with Browserify. Ace comes close, but ...
null
null
Add Gradle API generated extensions to implicit imports Signed-off-by: Paul Merlin <a027184a55211cd23e3f3094f1fdc728df5e0500@gradle.com> Apply this change to `subprojects/provider/src/main/kotlin/org/gradle/kotlin/dsl/support/ImplicitImports.kt` and return the full updated file. ```kotlin /* * Copyright 2016 the or...
```kotlin /* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
null
null
Add (`thread`, `id`) multi-column key to optimize rebuilding index pages. This SQL command can be used to add the key to existing board tables: create index `thread_id` on posts_%s (`thread`, `id`); Apply this change to `templates/posts.sql` and return the full updated file. ```sql CREATE TABLE IF NOT EXISTS `posts_...
```sql CREATE TABLE IF NOT EXISTS `posts_{{ board }}` ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `thread` int(11) DEFAULT NULL, `subject` varchar(100) DEFAULT NULL, `email` varchar(30) DEFAULT NULL, `name` varchar(35) DEFAULT NULL, `trip` varchar(15) DEFAULT NULL, `capcode` varchar(50) DEFAUL...
null
null
Use latest Gradle Enterprise plugin Apply this change to `settings.gradle.kts` and return the full updated file. ```kotlin rootProject.name = "bean-validators" plugins { id("com.gradle.enterprise") version "3.4.1" } gradleEnterprise { buildScan { val isCi = !System.getenv("GITHUB_WORKFLOW").isNullOr...
```kotlin rootProject.name = "bean-validators" plugins { id("com.gradle.enterprise") version "3.6.3" } gradleEnterprise { buildScan { val isCi = !System.getenv("GITHUB_WORKFLOW").isNullOrEmpty() if(isCi || file("gradle/.build-scans-tos-agree").exists()) { termsOfServiceUrl = "https...
null
null
Fix compilation of TS _proto generated services Apply this change to `test/ts/webpack.config.ts` and return the full updated file. ```typescript const path = require('path'); module.exports = { entry: "./src/spec.ts", output: { path: path.resolve(__dirname, 'build'), filename: 'integration-tests.js' }, ...
```typescript const path = require('path'); module.exports = { entry: "./src/spec.ts", output: { path: path.resolve(__dirname, 'build'), filename: 'integration-tests.js' }, devtool: 'inline-source-map', module: { rules: [ { test: /\.js$/, include: /src/, loader: "babe...
null
null
Add the tree read-only attribute to the AbstractProcess class. Apply this change to `lib/scorm2004/sequencing/abstract_process.rb` and return the full updated file. ```ruby require 'scorm2004/sequencing' require 'forwardable' module Scorm2004 module Sequencing class AbstractProcess include SequencingExce...
```ruby require 'scorm2004/sequencing' require 'forwardable' module Scorm2004 module Sequencing class AbstractProcess include SequencingException attr_reader :tree ACTIVITY_TREE_METHODS = [ :current_activity, :current_activity=, :suspended_activity, :suspended_activity=, ...
null
null
New: Handle thelogin and user register - Add flash messages for a better user experience - Create the user_params method to keep the user params in one place. - Add the business logic to the create controller ø Apply this change to `app/controllers/users_controller.rb` and return the full updated file. ```ruby class...
```ruby class UsersController < ApplicationController # GET - Show a user. def show @user = User.find(params[:id]) end # GET - Show template to create a user. def new @user = User.new end # POST - Create a user. def create @user = User.new(user_params) ...
null
null
Fix up the unit test a bit. Apply this change to `test/sample/java/project/SampleJavaProjectTest.java` and return the full updated file. ```java package sample.java.project; import junit.framework.TestCase; /** * A sample JUnit test. * * This test exists as a placeholder for the test unit framework. */ public c...
```java package sample.java.project; import junit.framework.TestCase; /** * A sample JUnit test. * * This test exists as a placeholder for the test unit framework. */ public class SampleJavaProjectTest extends TestCase { /** * Holds an instance of the class we are testing. */ private SampleJava...
null
null
Refactor for Data table changes Apply this change to `database/procedures/GetLeaderboardForStat.sql` and return the full updated file. ```sql DELIMITER $$ CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetLeaderboardForStat`(IN `stat_name` VARCHAR(20)) READS SQL DATA BEGIN DROP TABLE IF EXISTS LeaderboardForStat;...
```sql DELIMITER $$ CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetLeaderboardForStat`(IN `stat_key` VARCHAR(20)) READS SQL DATA BEGIN DROP TABLE IF EXISTS LeaderboardForStat; CREATE TEMPORARY TABLE LeaderboardForStat AS SELECT @rank := @rank + 1 AS rank, agent, date, value, age FR...
null
null
Add a product to the swift package file. Apply this change to `Package.swift` and return the full updated file. ```swift // swift-tools-version:4.0 import PackageDescription let package = Package( name: "Outlaw", dependencies: [ ], targets: [ .target(name: "Outlaw", dependencies: []), ...
```swift // swift-tools-version:4.0 import PackageDescription let package = Package( name: "Outlaw", products: [ .library(name: "Outlaw", targets: ["Outlaw"]) ], dependencies: [ ], targets: [ .target(name: "Outlaw", dependencies: []), .testTarget(name: "OutlawTests", de...
null
null
Use latest rc of stutter Apply this change to `settings.gradle.kts` and return the full updated file. ```kotlin pluginManagement { plugins { id("com.gradle.plugin-publish") version "0.20.0" id("org.ajoberstar.grgit") version "4.1.1" id("org.ajoberstar.reckon") version "0.13.1" id("org.ajoberstar.st...
```kotlin pluginManagement { plugins { id("com.gradle.plugin-publish") version "0.20.0" id("org.ajoberstar.grgit") version "4.1.1" id("org.ajoberstar.reckon") version "0.13.1" id("org.ajoberstar.stutter") version "0.7.0-rc.1" id("com.diffplug.spotless") version "6.2.1" } } rootProject.name = ...
null
null
Reset folder server IDs in Account Apply this change to `app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo75.kt` and return the full updated file. ```kotlin package com.fsck.k9.storage.migrations import android.database.sqlite.SQLiteDatabase import com.fsck.k9.mailstore.MigrationsHelper internal ...
```kotlin package com.fsck.k9.storage.migrations import android.database.sqlite.SQLiteDatabase import com.fsck.k9.mailstore.MigrationsHelper internal class MigrationTo75(private val db: SQLiteDatabase, private val migrationsHelper: MigrationsHelper) { fun updateAccountWithSpecialFolderIds() { val account ...
null
null
Fix pickling/unpickling of Resource objects Add __getstate__ and __setstate__ methods to the Resource class to avoid hitting the recursion limit when trying to pickle/unpickle Resource objects. A similar issue/solution can be found here: https://stackoverflow.com/a/12102691 Apply this change to `groupy/api/base.py` ...
```python from groupy import utils class Manager: """Class for interacting with the endpoint for a resource. :param session: the requests session :type session: :class:`~groupy.session.Session` :param str path: path relative to the base URL """ #: the base URL base_url = 'https://api.gro...
null
null
Fix erronous error with call to write Apply this change to `src/cargo/util/hex.rs` and return the full updated file. ```rust #![allow(deprecated)] use std::fs::File; use std::hash::{Hash, Hasher, SipHasher}; use std::io::Read; pub fn to_hex(num: u64) -> String { hex::encode(&[ (num >> 0) as u8, ...
```rust #![allow(deprecated)] use std::fs::File; use std::hash::{Hash, Hasher, SipHasher}; use std::io::Read; pub fn to_hex(num: u64) -> String { hex::encode(&[ (num >> 0) as u8, (num >> 8) as u8, (num >> 16) as u8, (num >> 24) as u8, (num >> 32) as u8, (num >> 40) ...
null
null
Improve based on the given feedback Apply this change to `exercises/saddle-points/example.rs` and return the full updated file. ```rust pub fn find_saddle_points(input: &[Vec<u64>]) -> Vec<(usize, usize)> { let (width, height) = match (input.len(), input[0].len()) { (0, _) | (_, 0) => return Vec::new(), ...
```rust pub fn find_saddle_points(input: &[Vec<u64>]) -> Vec<(usize, usize)> { let height = if !input.is_empty() && !input[0].is_empty() { input[0].len() } else { return Vec::new(); }; let mut saddle_points = Vec::new(); let col_mins: Vec<u64> = (0..height) .filter_map(|j| ...
null
null
Add snapshot tests for interpolated leading component Apply this change to `tests/test_path.rs` and return the full updated file. ```rust use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree}; use std::iter::FromIterator; use syn::{Expr, Type}; #[test] fn parse_interpolated_leading...
```rust #[macro_use] mod macros; use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree}; use std::iter::FromIterator; use syn::{Expr, Type}; #[test] fn parse_interpolated_leading_component() { // mimics the token stream corresponding to `$mod::rest` let tokens = TokenStream::...
null
null
Return unformatted list from get_language_list. Apply this change to `zerver/lib/i18n.py` and return the full updated file. ```python # -*- coding: utf-8 -*- from django.conf import settings from django.utils import translation from django.utils.translation import ugettext as _ from six import text_type from typing ...
```python # -*- coding: utf-8 -*- from __future__ import absolute_import from django.conf import settings from django.utils import translation from django.utils.translation import ugettext as _ from six import text_type from typing import Any import os import ujson def with_language(string, language): # type: (...
null
null
Support enums in proxying request objects Apply this change to `code/framework/java-server/src/main/java/io/github/ibuildthecloud/gdapi/util/ProxyUtils.java` and return the full updated file. ```java package io.github.ibuildthecloud.gdapi.util; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Met...
```java package io.github.ibuildthecloud.gdapi.util; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Map; import org.apache.commons.lang3.StringUtils; public class ProxyUtils { @SuppressWarnings("unchecked") public static <T> T pr...
null
null
Complete Mock definition to unsure tests to pass Apply this change to `features/step_definitions/get_steps.rb` and return the full updated file. ```ruby Given(/^I created an OVH client with my credentials$/) do # pending # Write code here that turns the phrase above into concrete actions @client = OVH::Client.n...
```ruby Given(/^I created an OVH client with my credentials$/) do # pending # Write code here that turns the phrase above into concrete actions @client = OVHApi::Client.new(application_key: 'app_key', application_secret: 'app_secret', consumer_key: 'consumer_key') end When(/^I get '\/me' with the sdk$/) do # p...
null
null
Adjust a rustc test to the safety changes Apply this change to `src/test/run-pass-fulldeps/newtype_index.rs` and return the full updated file. ```rust #![feature(rustc_attrs, rustc_private, step_trait)] #[macro_use] extern crate rustc_data_structures; extern crate rustc_serialize; use rustc_data_structures::indexed...
```rust #![feature(rustc_attrs, rustc_private, step_trait, min_const_unsafe_fn)] #[macro_use] extern crate rustc_data_structures; extern crate rustc_serialize; use rustc_serialize::{Decodable, Decoder}; use rustc_data_structures::indexed_vec::Idx; newtype_index!(struct MyIdx { MAX = 0xFFFF_FFFA }); use std::mem::si...
null
null
Fix backticks inside context string ttag cli is unable to find these strings Apply this change to `applications/calendar/src/app/components/onboarding/CalendarOnboardingModal.tsx` and return the full updated file. ```typescript import { c } from 'ttag'; import { OnboardingContent, OnboardingModal, Onboar...
```typescript import { c } from 'ttag'; import { OnboardingContent, OnboardingModal, OnboardingStep, OnboardingStepRenderCallback, useSettingsLink, } from '@proton/components'; import { APPS } from '@proton/shared/lib/constants'; import { CALENDAR_APP_NAME } from '@proton/shared/lib/calendar/constan...
null
null
Update script to allow use with integers without a cast Apply this change to `formatbase--1.0.0.sql` and return the full updated file. ```sql -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION formatbase" to load this file. \quit CREATE FUNCTION to_base(val bigint,...
```sql -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION formatbase" to load this file. \quit CREATE FUNCTION to_base(val bigint, base integer) RETURNS text LANGUAGE sql IMMUTABLE STRICT AS $$ WITH cte AS ( SELECT regexp_split_to_array( '0123456789abcdef...
null
null
Add PersistentStore to test stack Apply this change to `CoreDataKitTests/TestCase.swift` and return the full updated file. ```swift // // TestCase.swift // CoreDataKit // // Created by Mathijs Kadijk on 15-10-14. // Copyright (c) 2014 Mathijs Kadijk. All rights reserved. // import XCTest import CoreData import C...
```swift // // TestCase.swift // CoreDataKit // // Created by Mathijs Kadijk on 15-10-14. // Copyright (c) 2014 Mathijs Kadijk. All rights reserved. // import XCTest import CoreData import CoreDataKit class TestCase: XCTestCase { private struct Holder { static var token: dispatch_once_t = 0 } ...
null
null
r515: Handle site_config.rb in Cap deployment Apply this change to `config/recipes/cruisecontrol.rb` and return the full updated file. ```ruby Capistrano.configuration(:must_exist).load do desc 'deploy CC.rb' task :deploy_ccrb do stop_ccrb update_code after_update_code symlink start_ccrb ...
```ruby Capistrano.configuration(:must_exist).load do desc 'deploy CC.rb' task :deploy_ccrb do stop_ccrb update_code after_update_code symlink start_ccrb end desc 'stop CC.rb' task :stop_ccrb do sudo "sv force-stop ccrb_dashboard_1" rescue nil sudo "sv force-stop ccrb_dashboard...
null
null
Add some allocator constants like minimum alignment or maximum small size. Signed-off-by: Michael Lippautz <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com> Apply this change to `src/common.h` and return the full updated file. ```c // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // ...
```c // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #ifndef SCALLOC_COMMON_H_ #define SCALLOC_COMMON_H_ #include <stddef.h> // size_t #include "...
null
null
Add type of variable budget Apply this change to `gvi/budgets/models.py` and return the full updated file. ```python from django.db import models class Budget(models.Model): number = models.CharField(max_length=100, unique=True) initial_date = models.DateTimeField() final_date = models.DateTimeField(blan...
```python from django.db import models class Budget(models.Model): number = models.CharField(max_length=100, unique=True) initial_date = models.DateTimeField() final_date = models.DateTimeField(blank=True) hub = models.ForeignKey('hubs.Hubs') def __str__(self): return self.number class Bu...
null
null
Change name to match middlware behavior Apply this change to `src/middlewares/logger.ts` and return the full updated file. ```typescript import { Store, Dispatch, Action } from "redux"; const crashReporter = (store: Store) => (next: Dispatch) => ( action: Action ) => { const { getState } = store; const beforeA...
```typescript import { Store, Dispatch, Action } from "redux"; const logger = (store: Store) => (next: Dispatch) => (action: Action) => { const { getState } = store; const beforeActionState = getState(); const result = next(action); const afterActionState = getState(); console.info( "action", action,...
null
null
chore: Update target URL for sending feedback input Apply this change to `frontend/src/component/feedback/FeedbackCES/sendFeedbackInput.ts` and return the full updated file. ```typescript import { IFeedbackCESForm } from 'component/feedback/FeedbackCES/FeedbackCESForm'; interface IFeedbackEndpointRequestBody { s...
```typescript import { IFeedbackCESForm } from 'component/feedback/FeedbackCES/FeedbackCESForm'; interface IFeedbackEndpointRequestBody { source: 'app' | 'app:segments'; data: { score: number; comment?: string; customerType?: 'open source' | 'paying'; openedManually?: boolean; ...
null
null
Fix count on random related Apply this change to `src/panini-helpers/random-related-blocks.js` and return the full updated file. ```javascript var _ = require('lodash'); module.exports = function(context, number, options) { if(context.page && context['building-blocks'][context.page]) { var ret = ''; var cu...
```javascript var _ = require('lodash'); module.exports = function(context, number, options) { if(context.page && context['building-blocks'][context.page]) { var ret = ''; var currentBlock = context['building-blocks'][context.page]; var category = context['building-blocks'][context.page].category; va...
null
null
Update test to match new instance syntax. Apply this change to `src/test/java/org/clafer/instance/InstanceModelTest.java` and return the full updated file. ```java package org.clafer.instance; import org.clafer.ast.AstConcreteClafer; import org.clafer.ast.AstModel; import static org.clafer.ast.Asts.IntType; import s...
```java package org.clafer.instance; import org.clafer.ast.AstConcreteClafer; import org.clafer.ast.AstModel; import static org.clafer.ast.Asts.IntType; import static org.clafer.ast.Asts.newModel; import static org.junit.Assert.*; import org.junit.Test; /** * * @author jimmy */ public class InstanceModelTest { ...
null
null
Use = default for default constructor. Apply this change to `searchcore/src/vespa/searchcore/proton/matching/search_session.cpp` and return the full updated file. ```cpp // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "search_session.h" #...
```cpp // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "search_session.h" #include "match_tools.h" #include "match_context.h" namespace proton::matching { SearchSession::SearchSession(const SessionId &id, fastos::TimeStamp time_of_doom, ...
null
null
Add virtual property to album model Apply this change to `Bravo/Models/Album.cs` and return the full updated file. ```csharp using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Bravo.Models { public class Album { [Required] public int AlbumId { get; set; } [Required, Max...
```csharp using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Bravo.Models { public class Album { [Required] public int AlbumId { get; set; } [Required, MaxLength(255), Display(Name = "Title")] public string AlbumName { get; set; } [Required] public int GenreId { ge...
null
null
Set second groups controller test to pending Apply this change to `spec/controllers/groups_controller_spec.rb` and return the full updated file. ```ruby require 'rails_helper' RSpec.describe GroupsController, type: :controller do describe 'GET groups/:id' do let!(:user) { User.create!(name: "Matt", email: ...
```ruby require 'rails_helper' RSpec.describe GroupsController, type: :controller do describe 'GET groups/:id' do let!(:user) { User.create!(name: "Matt", email: "matt@matt.com", password: 'password') } let!(:group) { Group.create!(name: 'Grouptastic', admin_id: user.id) } before(:each) do control...
null
null
fix: Extend duration if last event is a sustain Apply this change to `src/app/time/duration/duration.service.ts` and return the full updated file. ```typescript import { Injectable } from '@angular/core'; import { Observable, ReplaySubject } from 'rxjs'; import { Track, getTrack } from '../../track/track'; import { ...
```typescript import { Injectable } from '@angular/core'; import { Observable, ReplaySubject } from 'rxjs'; import { Track, getTrack } from '../../track/track'; import { ModelService } from '../../model/model.service'; import { Model, ModelTrackEvent } from '../../model/model'; const minDuration = 1; @Injectable() e...
null
null
Add constant SUID and minor reformatting svn path=/incubator/harmony/enhanced/classlib/trunk/; revision=410563 Apply this change to `modules/archive/src/main/java/java/util/zip/DataFormatException.java` and return the full updated file. ```java /* Copyright 1998, 2002 The Apache Software Foundation or its licensors,...
```java /* Copyright 1998, 2002 The Apache Software Foundation or its licensors, as applicable * * 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/lice...
null
null
Connect securely with web irc Apply this change to `app/views/default/irc.blade.php` and return the full updated file. ```php @section('content') <div class="container main content"> <iframe src="https://kiwiirc.com/client/irc.rizon.net/?theme=cli#r/a/dio" style="border:0; width:100%; height:700px;" ></iframe...
```php @section('content') <div class="container main content"> <iframe src="https://kiwiirc.com/client/irc.rizon.net:+6697/?theme=cli#r/a/dio" style="border:0; width:100%; height:700px;" ></iframe> </div> @stop ```
null
null
Revert "Change return type hinting to reference the Proxy class" This reverts commit 9ea4df8541c682097304bc9b1b42f68307f8d57e. Apply this change to `src/ProxyManager/ProxyGenerator/NullObject/MethodGenerator/StaticProxyConstructor.php` and return the full updated file. ```php <?php declare(strict_types=1); namespa...
```php <?php declare(strict_types=1); namespace ProxyManager\ProxyGenerator\NullObject\MethodGenerator; use ProxyManager\Generator\MethodGenerator; use ProxyManager\ProxyGenerator\Util\Properties; use ReflectionClass; use ReflectionProperty; use Zend\Code\Generator\Exception\InvalidArgumentException; use function ar...
null
null
Update insets on the bio view in settings. [Fixes #93944182] Apply this change to `Sources/Views/ElloEditableTextView.swift` and return the full updated file. ```swift // // ElloEditableTextView.swift // Ello // // Created by Tony DiPasquale on 4/2/15. // Copyright (c) 2015 Ello. All rights reserved. // import ...
```swift // // ElloEditableTextView.swift // Ello // // Created by Tony DiPasquale on 4/2/15. // Copyright (c) 2015 Ello. All rights reserved. // import UIKit public class ElloEditableTextView: UITextView { required override public init(frame: CGRect, textContainer: NSTextContainer?) { super.init(fram...
null
null
[PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy Apply this change to `Tests/YamlTest.php` and return the full updated file. ```php <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license informat...
```php <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Yaml\Tests; use Symfony\Component\Yaml\Yaml; ...
null
null
Add priority attribute for command tag Apply this change to `DependencyInjection/Compiler/CommandCompilerPass.php` and return the full updated file. ```php <?php /** * User: boshurik * Date: 25.04.16 * Time: 15:45 */ namespace BoShurik\TelegramBotBundle\DependencyInjection\Compiler; use Symfony\Component\Depend...
```php <?php /** * User: boshurik * Date: 25.04.16 * Time: 15:45 */ namespace BoShurik\TelegramBotBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Ref...
null
null
Revert "Catch and ignore CTRL_LOGOFF_EVENT when run as a windows service" This reverts commit a7ddf81b37b578b1448f83b0efb4f7116de0c3fb. Apply this change to `salt/utils/saltminionservice.py` and return the full updated file. ```python # Import salt libs from salt.utils.winservice import Service, instart import salt ...
```python # Import salt libs from salt.utils.winservice import Service, instart import salt # Import third party libs import win32serviceutil import win32service import winerror # Import python libs import sys class MinionService(Service): def start(self): self.runflag = True self.log("Starting...
null
null
Use explicit path for library Apply this change to `build.rs` and return the full updated file. ```rust extern crate "pkg-config" as pkg_config; use std::os; use std::old_io::{self, fs, Command}; use std::old_io::process::InheritFd; fn main() { match pkg_config::find_library("sass") { Ok(_) => return, ...
```rust extern crate "pkg-config" as pkg_config; use std::os; use std::old_io::{self, fs, Command}; use std::old_io::process::InheritFd; fn main() { match pkg_config::find_library("sass") { Ok(_) => return, Err(_) => {} } let src = Path::new(os::getenv("CARGO_MANIFEST_DIR").unwrap()); l...
null
null
Revert accidental committal of client test-data Client should not get test-data right now; that was just for debugging. Apply this change to `packages/constraint-solver/package.js` and return the full updated file. ```javascript Package.describe({ summary: "Given the set of the constraints, picks a satisfying conf...
```javascript Package.describe({ summary: "Given the set of the constraints, picks a satisfying configuration", version: "1.0.15" }); Npm.depends({ 'mori': '0.2.6' }); Package.on_use(function (api) { api.export('ConstraintSolver'); api.use(['underscore', 'ejson', 'check', 'package-version-parser', ...
null
null
Fix the imports in the new Kotlin test. Apply this change to `app/src/test/java/com/google/android/stardroid/units/LatLongRoboTest.kt` and return the full updated file. ```kotlin package com.google.android.stardroid.units import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import com.google....
```kotlin package com.google.android.stardroid.units import com.google.common.truth.Truth.assertThat import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config /** * Tests that require roboelectric for API calls. */ @RunWith(Robolectri...
null
null
Fix missing newline in cal controller menu Apply this change to `src/CalController.cpp` and return the full updated file. ```cpp #include <string> #include <map> #include "CalController.h" #include "TEMLogger.h" BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(my_cal_logger, severity_channel_logger_t) { return severity_channe...
```cpp #include <string> #include <map> #include "CalController.h" #include "TEMLogger.h" BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(my_cal_logger, severity_channel_logger_t) { return severity_channel_logger_t(keywords::channel = "CALIB"); } severity_channel_logger_t& CalController::clg = my_cal_logger::get(); std::stri...
null
null
Make it possible to override rabbitmqctl location via RABBITMQCTL Apply this change to `bin/ci/before_build.sh` and return the full updated file. ```bash #!/bin/sh # guest:guest has full access to / sudo rabbitmqctl add_vhost / sudo rabbitmqctl add_user guest guest sudo rabbitmqctl set_permissions -p / guest ".*" "...
```bash #!/bin/sh ${RABBITMQCTL:="sudo rabbitmqctl"} # guest:guest has full access to / $RABBITMQCTL add_vhost / $RABBITMQCTL add_user guest guest $RABBITMQCTL set_permissions -p / guest ".*" ".*" ".*" # guest:guest has full access to amq_client_testbed # amq_client_gem:amq_client_gem has full access to /amq_clien...
null
null
Make Login Redirect Uri dynamic for prod and dev environments Apply this change to `src/app/main/sidebar/sidebar.component.ts` and return the full updated file. ```typescript import {Component, OnInit} from '@angular/core'; import {Http, URLSearchParams} from '@angular/http'; @Component({ selector: 'app-sidebar', ...
```typescript import {Component, OnInit} from '@angular/core'; import {Http, URLSearchParams} from '@angular/http'; @Component({ selector: 'app-sidebar', templateUrl: './sidebar.component.html', styleUrls: ['./sidebar.component.scss'] }) export class SidebarComponent implements OnInit { public links = [ { ...
null
null
OF-2148: Change to wider type to prevent information loss Prevent a possible issue where a wider type gets added to narrower type. Ideally, this is replaced by proper types (eg: Duration, Instant), but the cost/benefit of applying that larger change does not pay off. Apply this change to `xmppserver/src/main/java/or...
```java /* * Copyright (C) 2004 Jive Software. 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 requ...
null
null
Fix errors when reloading a page Apply this change to `src/renderer/app/components/NavigationButtons/index.tsx` and return the full updated file. ```typescript import { observer } from 'mobx-react'; import * as React from 'react'; import store from '~/renderer/app/store'; import ToolbarButton from '~/renderer/app/co...
```typescript import { observer } from 'mobx-react'; import * as React from 'react'; import store from '~/renderer/app/store'; import ToolbarButton from '~/renderer/app/components/ToolbarButton'; import { icons } from '~/renderer/app/constants/icons'; import { StyledContainer } from './style'; import { ipcRenderer } f...
null
null
Remove custom header in login controller Apply this change to `azure-active-directory-server/src/main/kotlin/org/jetbrains/teamcity/aad/LoginViaAADController.kt` and return the full updated file. ```kotlin package org.jetbrains.teamcity.aad import jetbrains.buildServer.controllers.AuthorizationInterceptor import jet...
```kotlin package org.jetbrains.teamcity.aad import jetbrains.buildServer.controllers.AuthorizationInterceptor import jetbrains.buildServer.controllers.BaseController import jetbrains.buildServer.web.openapi.WebControllerManager import org.springframework.web.servlet.ModelAndView import org.springframework.web.servlet...
null
null
Replace deprecated sha1 with sha256 Apply this change to `cmc.rb` and return the full updated file. ```ruby require "formula" class Cmc < Formula homepage "https://github.com/ClockworkNet/cmc" url "https://github.com/ClockworkNet/cmc/archive/1.0.1.tar.gz" sha1 "ba6502a6b034ab7af44e7a7152f78f9ba65fa14a" def ...
```ruby require "formula" class Cmc < Formula homepage "https://github.com/ClockworkNet/cmc" url "https://github.com/ClockworkNet/cmc/archive/1.0.1.tar.gz" sha256 "bc9a35770c365ef254e39ead061aab2dc29ada04d053387b7ee0a0e955853910" def install bin.install "cmc" prefix.install "LICENSE", "README.rst" ...
null
null
Add server alive and shutdown api endpoints Apply this change to `cea/interfaces/dashboard/server/__init__.py` and return the full updated file. ```python """ The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division ...
```python """ The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint, current_app from flask_restplus import Api, Resource from .jobs import api as jobs from .streams import api as stream...
null
null
Update return datatype function 'createRandomPopulation'. Apply this change to `src/population.cpp` and return the full updated file. ```cpp #include <iostream> #include <cstdlib> #include "population.h" int **POPULATION::initializePopulation(int individuals, int genes, bool FILL_ZERO) { int **population; if (...
```cpp #include <iostream> #include <cstdlib> #include "population.h" int **POPULATION::initializePopulation(int individuals, int genes, bool FILL_ZERO) { int **population; if (!FILL_ZERO) { population = (int **) malloc(individuals * sizeof(int *)); for (int i = 0; i < individuals; i++) populatio...
null
null
Build script now creates individual zip file packages to align with the NuGet packages and semantic versioning. Apply this change to `Properties/VersionAssemblyInfo.cs` and return the full updated file. ```csharp //------------------------------------------------------------------------------ // <auto-generated> /...
```csharp //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </aut...
null
null
Remove file logging for now, as it is broken Apply this change to `goat/logger.go` and return the full updated file. ```go package goat import ( "bufio" "fmt" "log" "os" "time" ) // LogManager is responsible for creating the main loggers func LogManager() { // Create log directory and file, and pull current d...
```go package goat import ( "fmt" "time" ) // LogManager is responsible for creating the main loggers func LogManager() { // Start the system status logger go StatusLogger() // Wait for error to be passed on the logChan channel, or termination signal for { select { case msg := <-Static.LogChan: now := t...
null
null
Replace strchr() condition with TrimSuffixC(). Apply this change to `sbr/read_line.c` and return the full updated file. ```c #include <h/mh.h> const char * read_line(void) { char *cp; static char line[BUFSIZ]; fflush(stdout); if (fgets(line, sizeof(line), stdin) == NULL) return NULL; ...
```c #include <h/mh.h> #include <h/utils.h> const char * read_line(void) { static char line[BUFSIZ]; fflush(stdout); if (fgets(line, sizeof(line), stdin) == NULL) return NULL; TrimSuffixC(line, '\n'); return line; /* May not be a complete line. */ } ```
null
null
Remove this os.Remove, it is handled inside inceptionmain now. Apply this change to `generator/generator.go` and return the full updated file. ```go /** * Copyright 2014 Paul Querna * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lic...
```go /** * Copyright 2014 Paul Querna * * 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 ...
null
null
Use CRLF instead of LF. Apply this change to `osu.Game/Audio/SampleInfoList.cs` and return the full updated file. ```csharp // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; namespac...
```csharp // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; namespace osu.Game.Audio { public class SampleInfoList : List<SampleInfo> { public SampleInfoList()...
null
null
Add newline at end of file Apply this change to `twilio.py` and return the full updated file. ```python from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", ...
```python from twilio.rest import TwilioRestClient import config client = TwilioRestClient(account_sid, auth_token) message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!") ```
null
null
Add a private constructor taking an Int. Apply this change to `TesseractCore/Identifier.swift` and return the full updated file. ```swift // Copyright (c) 2014 Rob Rix. All rights reserved. public struct Identifier: Comparable, Hashable, Printable { public init(graph: Graph<Node>) { value = graph.nodes.isEmpty ?...
```swift // Copyright (c) 2014 Rob Rix. All rights reserved. public struct Identifier: Comparable, Hashable, Printable { public init(graph: Graph<Node>) { value = graph.nodes.isEmpty ? 0 : maxElement(graph.nodes.keys).value + 1 } public init() { self.value = Identifier.cursor++ } // MARK: Endpoint constru...
null
null
Add test for jukebox observing Apply this change to `EveryoneGetsToDJ/EveryoneGetsToDJTests/EveryoneGetsToDJTests.swift` and return the full updated file. ```swift // // EveryoneGetsToDJTests.swift // EveryoneGetsToDJTests // // Created by Patrick O'Leary on 6/7/17. // Copyright © 2017 Patrick O'Leary. All rights...
```swift // // EveryoneGetsToDJTests.swift // EveryoneGetsToDJTests // // Created by Patrick O'Leary on 6/7/17. // Copyright © 2017 Patrick O'Leary. All rights reserved. // import XCTest @testable import EveryoneGetsToDJ import PromiseKit class EveryoneGetsToDJTests: XCTestCase { override func setUp() { ...
null
null
Make specs pass on Ruby 1.9 Apply this change to `lib/r_fast_r_furious.rb` and return the full updated file. ```ruby require "r_fast_r_furious/version" require "v8" require "net/http" require "uri" module RFastRFurious SOURCE = "https://raw.github.com/alunny/r_fast_r_furious/master/fast.js" def check(string, url...
```ruby require "r_fast_r_furious/version" require "v8" require "net/http" require "uri" module RFastRFurious SOURCE = "https://raw.github.com/alunny/r_fast_r_furious/master/fast.js" def check(string, url = SOURCE) uri = URI.parse(SOURCE) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true ...
null
null
Add a toString() for debugging purpose. Apply this change to `src/main/java/com/magnet/mmx/protocol/Count.java` and return the full updated file. ```java package com.magnet.mmx.protocol; /** * Count object to represent the results of the operation */ public class Count { private int requested; private int sent...
```java package com.magnet.mmx.protocol; /** * Count object to represent the results of the operation */ public class Count { private int requested; private int sent; private int unsent; public Count(int requested, int sent, int unsent) { this.requested = requested; this.sent = sent; this.unsent...
null
null
Bring `this` back into scope Apply this change to `app/controllers/login.js` and return the full updated file. ```javascript import Ember from 'ember'; import RestUtils from 'moviematcher/utils/rest'; import Cookie from 'moviematcher/utils/cookies'; export default Ember.Controller.extend({ queryParams: ['redirect'...
```javascript import Ember from 'ember'; import RestUtils from 'moviematcher/utils/rest'; import Cookie from 'moviematcher/utils/cookies'; export default Ember.Controller.extend({ queryParams: ['redirect'], actions: { userLogin(username, password) { const sessionDurationSeconds = 2 * 60 * 60; // 2 hours ...
null
null
Improve notification performance with some more goroutines Apply this change to `runner/runner.go` and return the full updated file. ```go package runner import ( "log" "github.com/sivel/overseer/monitor" "github.com/sivel/overseer/notifier" "github.com/sivel/overseer/status" ) type Runner struct { StatusChan...
```go package runner import ( "log" "github.com/sivel/overseer/monitor" "github.com/sivel/overseer/notifier" "github.com/sivel/overseer/status" ) type Runner struct { StatusChan chan *status.Status Monitors []monitor.Monitor Notifiers []notifier.Notifier } func NewRunner(monitors []monitor.Monitor, notifi...
null
null
Fix some bugs in the search engine. Apply this change to `app/src/main/java/exh/search/Text.kt` and return the full updated file. ```kotlin package exh.search import exh.anyChar import ru.lanwen.verbalregex.VerbalExpression class Text: QueryComponent() { val components = mutableListOf<TextComponent>() fun ...
```kotlin package exh.search import exh.anyChar import ru.lanwen.verbalregex.VerbalExpression class Text: QueryComponent() { val components = mutableListOf<TextComponent>() fun asRegex(): VerbalExpression.Builder { val builder = VerbalExpression.regex() for(component in components) { ...
null
null
Use arc4random() in tests if available. Apply this change to `test/default/cmptest.h` and return the full updated file. ```c #ifndef __CMPTEST_H__ #define __CMPTEST_H__ #include <stdio.h> #include "sodium.h" #define TEST_NAME_RES TEST_NAME ".res" #define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp" FILE *fp_re...
```c #ifndef __CMPTEST_H__ #define __CMPTEST_H__ #include <stdio.h> #include "sodium.h" #define TEST_NAME_RES TEST_NAME ".res" #define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp" #ifdef HAVE_ARC4RANDOM # undef rand # define rand(X) arc4random(X) #endif FILE *fp_res; int xmain(void); int main(void) { FIL...
null
null
[arp_zonenplan_pub] Select auf Schema arp_npl geändert Apply this change to `arp_zonenplan_pub/arp_zonenplan_pub_digitalisierter_zonenplan.sql` and return the full updated file. ```sql SELECT ogc_fid AS t_id, ST_Multi(wkb_geometry) AS geometrie, zcode, zcode_text, gem_bfs, exact, bearbeite...
```sql SELECT ogc_fid AS t_id, ST_Multi(wkb_geometry) AS geometrie, zcode, zcode_text, gem_bfs, exact, bearbeiter, verifiziert, datum FROM digizone.zonenplan WHERE archive = 0 AND gem_bfs NOT IN (2405,2408,2457,2473,2474,2476,2498,2501,2502,2580,2613,2614,2615) ; ```
null
null
Use modal presentation for SVWebViewController. Apply this change to `KomicaViewer/KomicaViewer/ViewController/SVWebViewProtocol.swift` and return the full updated file. ```swift // // SVWebViewProtocol.swift // KomicaViewer // // Created by Craig Zheng on 21/08/2016. // Copyright © 2016 Craig. All rights reserve...
```swift // // SVWebViewProtocol.swift // KomicaViewer // // Created by Craig Zheng on 21/08/2016. // Copyright © 2016 Craig. All rights reserved. // import UIKit import SVWebViewController protocol SVWebViewProtocol: class { var svWebViewGuardDog: WebViewGuardDog? { get set } var svWebViewURL: URL? { ge...
null
null
Test passing multiple arguments to Y f Apply this change to `src/lib/vm/y_test.go` and return the full updated file. ```go package vm import "testing" func TestY(t *testing.T) { for _, n := range []float64{0, 1, 2, 3, 4, 5, 6, 100} { n1 := float64(Y(Normal(NewLazyFunction(lazyFactorial))).(Callable).Call(NumberT...
```go package vm import "testing" func TestY(t *testing.T) { for _, n := range []float64{0, 1, 2, 3, 4, 5, 6, 100} { n1 := lazyFactorial(NumberThunk(n)) n2 := strictFactorial(n) t.Logf("%d: %f == %f?\n", int(n), n1, n2) if n1 != n2 { t.Fail() } } for _, ts := range [][]*Thunk{ {NumberThunk(7)}, ...
null
null
Copy the node options too. Apply this change to `webpack.production.js` and return the full updated file. ```javascript 'use strict' const common = require('./webpack.common') const webpack = require('webpack') const webpackTargetElectronRenderer = require('webpack-target-electron-renderer') const ExtractTextPlugin...
```javascript 'use strict' const common = require('./webpack.common') const webpack = require('webpack') const webpackTargetElectronRenderer = require('webpack-target-electron-renderer') const ExtractTextPlugin = require('extract-text-webpack-plugin') const config = { devtool: 'cheap-module-source-map', entry: c...
null
null
Revert "뷰에 포커스를 주고 동시에 키보드를 띄우는 확장 매서드 추가" This reverts commit 4b14402b2c40c17a1af636310079e712fc346b6a. Apply this change to `src/main/kotlin/com/ridi/books/helper/view/SoftKeyboardHelper.kt` and return the full updated file. ```kotlin package com.ridi.books.helper.view import android.content.Context import androi...
```kotlin package com.ridi.books.helper.view import android.content.Context import android.view.View import android.view.inputmethod.InputMethodManager private val Context.inputMethodManager: InputMethodManager get() = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager @JvmOverloads fun View.sh...
null
null
Change naming for method receiver Apply this change to `testutil/testclient/main.go` and return the full updated file. ```go package testclient import ( "io/ioutil" "net/http" "net/http/httptest" "testing" "github.com/parnurzeal/gorequest" ) // TODO consider drop *testing.T parameter func New(t *testing.T, ha...
```go package testclient import ( "io/ioutil" "net/http" "net/http/httptest" "testing" "github.com/parnurzeal/gorequest" ) // TODO consider drop *testing.T parameter func New(t *testing.T, handler http.Handler) *gorequest.SuperAgent { mockTransport := mockTransport{ handler: handler, } // Don't replace htt...
null
null
refactor: Remove unused App struct field Apply this change to `src/http/app.rs` and return the full updated file. ```rust use std::path::PathBuf; use std::process::Child; use std::process::Command; pub struct App { pub name: String, pub port: u16, #[allow(dead_code)] process: Child, } impl App { ...
```rust use std::path::PathBuf; use std::process::Child; use std::process::Command; pub struct App { pub port: u16, #[allow(dead_code)] process: Child, } impl App { pub fn new(name: &str, port: u16, app_home: &str) -> App { let mut path_buf = PathBuf::from(app_home); path_buf.push(&nam...
null
null
Make temp dir prefix optional Apply this change to `swift/misc/Util.swift` and return the full updated file. ```swift import Foundation internal struct Util { static func createTempDirectory(prefix: String) -> URL? { let tempDirPath = NSTemporaryDirectory() + prefix + NSUUID().uuidString let temp...
```swift import Foundation internal struct Util { static func createTempDirectory(prefix: String = "") -> URL? { let tempDirPath = NSTemporaryDirectory() + prefix + NSUUID().uuidString let tempDirURL = URL(fileURLWithPath: tempDirPath, isDirectory: true) do { try FileManager.de...
null
null
Fix bug when pre-registered activator is instance Apply this change to `Source/Orleankka.Runtime/Cluster/ServiceCollectionExtensions.cs` and return the full updated file. ```csharp using System; using System.Linq; namespace Orleankka.Cluster { using Microsoft.Extensions.DependencyInjection; using Microsoft....
```csharp using System; using System.Linq; namespace Orleankka.Cluster { using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; static class ServiceCollectionExtensions { public static void Decorate<T>(this IServiceCollection services, Func<...
null
null
Fix import to original repository Probably not intended in: 65b6f423deecb93f09601aef352356a1d57c7c0f Apply this change to `main.go` and return the full updated file. ```go package main import ( "github.com/dmaj/docker-volume-netshare/netshare" ) var VERSION string = "" var BUILD_DATE string = "" func main() { n...
```go package main import ( "github.com/ContainX/docker-volume-netshare/netshare" ) var VERSION string = "" var BUILD_DATE string = "" func main() { netshare.Version = VERSION netshare.BuildDate = BUILD_DATE netshare.Execute() } ```
null
null
Add UNIQUE constraint to oskari_maplayer_externalid.externalid Apply this change to `content-resources/src/main/resources/flyway/oskari/V1_46_8__move_externalid_to_separate_table.sql` and return the full updated file. ```sql BEGIN; SELECT id AS maplayerid, externalid INTO oskari_maplayer_externalid FROM oskari_mapla...
```sql BEGIN; SELECT id AS maplayerid, externalid INTO oskari_maplayer_externalid FROM oskari_maplayer WHERE externalid <> ''; ALTER TABLE oskari_maplayer_externalid ADD PRIMARY KEY (maplayerid); ALTER TABLE oskari_maplayer_externalid ADD FOREIGN KEY (maplayerid) REFERENCES oskari_maplayer (id) ON DELETE CASCADE; ALT...
null
null
Use range for instead of for Apply this change to `ch16/ex16.5/main.cpp` and return the full updated file. ```cpp /*************************************************************************** * @file main.cpp * @author Alan.W * @date 02 Feb 2014 * 13 Oct 2014 * @remark This ...
```cpp /*************************************************************************** * @file main.cpp * @author Alan.W * @date 02 Feb 2014 * 13 Oct 2014 * @remark This code is for the exercises from C++ Primer 5th Edition * @note ********************************************...
null
null
Add null check for guest_id and guest_app Apply this change to `migrations/1507451462_create_rooms.up.sql` and return the full updated file. ```sql DROP TYPE IF EXISTS app; CREATE TYPE app AS ENUM ('telegram', 'vk'); CREATE TABLE IF NOT EXISTS rooms ( id SERIAL PRIMARY KEY, owner_id BIGINT NOT NULL, owner_app ...
```sql DROP TYPE IF EXISTS app; CREATE TYPE app AS ENUM ('telegram', 'vk'); CREATE TABLE IF NOT EXISTS rooms ( id SERIAL PRIMARY KEY, owner_id BIGINT NOT NULL, owner_app app NOT NULL, guest_id BIGINT, guest_app app, active BOOLEAN NOT NULL DEFAULT TRUE, created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW(...
null
null
Add get_project_author ability in project track repository Apply this change to `src/Eadrax/Core/Usecase/Project/Track/Repository.php` and return the full updated file. ```php <?php /** * @license MIT * Full license text in LICENSE file */ namespace Eadrax\Core\Usecase\Project\Track; interface Repository { p...
```php <?php /** * @license MIT * Full license text in LICENSE file */ namespace Eadrax\Core\Usecase\Project\Track; interface Repository { public function is_user_tracking_project($fan, $project); public function remove_project($fan, $project); public function if_fan_of($fan, $idol); public functio...
null
null
Fix for Ubuntu 14.04, CentOS should work too Assign zero to tv.tv_usec, or it maybe any value. The c version tiemout works on Ubuntu 14.04 after my fix. Apply this change to `client.c` and return the full updated file. ```c #include <stdio.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #include <...
```c #include <stdio.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #include <unistd.h> int main(int argc, char *argv[]) { char *host = "127.0.0.1"; int port = 2000; int timeout = 2; int sockfd, n; char buffer[256]; struct sockaddr_in serv_addr; struct hostent *server;...
null
null
Fix `typings/` directory structure after rename Apply this change to `src/utils/config.ts` and return the full updated file. ```typescript export const PROJECT_NAME = 'typings' export const CONFIG_FILE = `${PROJECT_NAME}.json` export const TYPINGS_DIR = `${PROJECT_NAME}_typings` export const DTS_MAIN_FILE = `${PROJEC...
```typescript export const PROJECT_NAME = 'typings' export const CONFIG_FILE = `${PROJECT_NAME}.json` export const TYPINGS_DIR = PROJECT_NAME export const DTS_MAIN_FILE = 'main.d.ts' export const DTS_BROWSER_FILE = 'browser.d.ts' ```
null
null
Add scheduling of events to occur later on the timeline Apply this change to `src/Totem/Runtime/Timeline/ITimeline.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Totem.Runtime.Timeline { /// <summary> /// D...
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Totem.Runtime.Timeline { /// <summary> /// Describes a series of domain events /// </summary> public interface ITimeline : IFluent { void Append(TimelinePosition cause, Many<Event> events); v...
null
null
Tweak resolving location of tree-sitter-ruby.wasm Apply this change to `packages/language-server-ruby/src/util/TreeSitterFactory.ts` and return the full updated file. ```typescript import path from 'path'; import Parser from 'web-tree-sitter'; const TREE_SITTER_RUBY_WASM = path.resolve(__dirname, 'tree-sitter-ruby.w...
```typescript import path from 'path'; import fs from 'fs'; import Parser from 'web-tree-sitter'; const TREE_SITTER_RUBY_WASM = ((): string => { let wasmPath = path.resolve(__dirname, 'tree-sitter-ruby.wasm'); if (!fs.existsSync(wasmPath)) { wasmPath = path.resolve(__dirname, '..', 'tree-sitter-ruby.wasm'); } r...
null
null
Change exception wanted by IntMath test Apply this change to `core/src/test/java/ciir/jfoley/chai/IntMathTest.java` and return the full updated file. ```java package ciir.jfoley.chai; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.jun...
```java package ciir.jfoley.chai; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; public class IntMathTest { @Test public void testNearestPowerOfTwo() throws Exception { assertEquals(1, IntMath.nearestPowerOf...
null
null
Exclude Videos article and non-scrapable info-galleries and picture-galleries via URL-pattern Apply this change to `parsers/RPOnline.py` and return the full updated file. ```python from baseparser import BaseParser from BeautifulSoup import BeautifulSoup, Tag class RPOParser(BaseParser): domains = ['www.rp-onli...
```python from baseparser import BaseParser from BeautifulSoup import BeautifulSoup, Tag class RPOParser(BaseParser): domains = ['www.rp-online.de'] feeder_pat = '(?<!(vid|bid|iid))(-1\.\d*)$' feeder_pages = ['http://www.rp-online.de/'] def _parse(self, html): soup = BeautifulSoup(html, conv...
null
null