original_prompt stringlengths 327 2.5k | original_completion stringlengths 22 2.84k | enhanced_prompt float64 | enhanced_completion float64 |
|---|---|---|---|
Add mouseEvent streams to Node
Apply this change to `src/main/kotlin/rx/javafx/kt/Nodes.kt` and return the full updated file.
```kotlin
package rx.javafx.kt
import javafx.event.EventType
import javafx.scene.control.TableView
import javafx.scene.input.MouseEvent
import rx.observables.JavaFxObservable
//TableView Ext... | ```kotlin
package rx.javafx.kt
import javafx.event.EventType
import javafx.scene.Node
import javafx.scene.input.MouseEvent
import rx.observables.JavaFxObservable
fun <N: Node> N.mouseEvents(mouseEventType: EventType<MouseEvent>) =
JavaFxObservable.fromNodeEvents(this,mouseEventType)
fun <N: Node> N.mouseClic... | null | null |
Update env id generator test to handle hypenated lake names
[#121817095]
Apply this change to `helpers/env_id_generator_test.go` and return the full updated file.
```go
package helpers_test
import (
"crypto/rand"
"errors"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/pivotal-cf-experimenta... | ```go
package helpers_test
import (
"crypto/rand"
"errors"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/pivotal-cf-experimental/bosh-bootloader/fakes"
"github.com/pivotal-cf-experimental/bosh-bootloader/helpers"
)
var _ = Describe("EnvIDGenerator", func() {
Describe("Generate", func() {
... | null | null |
Update `ActiveState` as per new spec
Apply this change to `beacon_chain/types/src/active_state.rs` and return the full updated file.
```rust
use super::Hash256;
use super::attestation_record::AttestationRecord;
pub struct ActiveState {
pub pending_attestations: Vec<AttestationRecord>,
pub recent_block_hashes... | ```rust
use super::Hash256;
use super::{
AttestationRecord,
SpecialRecord,
};
pub struct ActiveState {
pub pending_attestations: Vec<AttestationRecord>,
pub pending_specials: Vec<SpecialRecord>,
pub recent_block_hashes: Vec<Hash256>,
pub randao_mix: Hash256,
}
``` | null | null |
Make XOPEN_SOURCE definition explicit per architecture
Fixes #441
Apply this change to `fmacros.h` and return the full updated file.
```c
#ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__CYGWIN__)
#include <sys/cdefs.h>
#e... | ```c
#ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__CYGWIN__)
#include <sys/cdefs.h>
#endif
#if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define _XOPEN_SOURCE 600
#elif defined(__APPLE__) && define... | null | null |
Change keys with single arg to keys with array of keys
Apply this change to `pages/helper.js` and return the full updated file.
```javascript
const path = require('path');
const os = require('os');
const modificatorKey = (os.type().toLowerCase() === 'darwin')
? 'COMMAND'
: 'CONTROL';
module.exports = function(brow... | ```javascript
const path = require('path');
const os = require('os');
const modificatorKey = (os.type().toLowerCase() === 'darwin')
? 'COMMAND'
: 'CONTROL';
module.exports = function(browser) {
return {
resetBuffer: function (text) {
return browser
.url(`file:///${path.resolve(process.cwd(... | null | null |
Update plugin com.diffplug.eclipse.apt to v3.36.1
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.0"
id("com.diffplug.spotless") ve... | ```kotlin
pluginManagement {
repositories {
gradlePluginPortal()
}
plugins {
id("com.diffplug.eclipse.apt") version "3.36.1"
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 |
Use a more descriptive variable name and point out, that the parameter must not be null.
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1721006 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: fb9867332588c499f86ee40c8f2e9e01fbce65af
Apply this change to `src/core/org/apache/jmeter/report/core/Sampl... | ```java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); ... | null | null |
Add env flag to enable SecretStoreFile
Apply this change to `go/libkb/secret_store_win_linux.go` and return the full updated file.
```go
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
// +build !darwin,!android
package libkb
func NewSecretSt... | ```go
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
// +build !darwin,!android
package libkb
import "os"
func NewSecretStoreAll(g *GlobalContext) SecretStoreAll {
// In order to not break production build releases, only
// use the SecretSt... | null | null |
Importer: Update schema filename to proxl-xml-v1.4.1.xsd
Apply this change to `proxl_importer/src_main_importer/org/yeastrc/proxl/import_xml_to_db/constants/Proxl_XSD_XML_Schema_Enabled_And_Filename_With_Path_Constant.java` and return the full updated file.
```java
package org.yeastrc.proxl.import_xml_to_db.constants... | ```java
package org.yeastrc.proxl.import_xml_to_db.constants;
public class Proxl_XSD_XML_Schema_Enabled_And_Filename_With_Path_Constant {
/**
* If true, then schema validation will be done
*/
public static final boolean PROXL_XSD_XML_SCHEMA_VALIDATION_ENABLED = true;
/**
* The "/" specifies... | null | null |
Add support for Ruby 2.1.2
Apply this change to `ext/did_you_mean/extconf.rb` and return the full updated file.
```ruby
require 'mkmf'
case RUBY_VERSION
when /1.9.3/, /2.0.0/, /2.1.0/, /2.1.1/, /2.2.0/
abs_ruby_header_path = File.join(File.dirname(File.realpath(__FILE__)), "ruby_headers")
version_suffix = if RU... | ```ruby
require 'mkmf'
case RUBY_VERSION
when /1.9.3/, /2.0.0/, /^2.1.\d/, /2.2.0/
abs_ruby_header_path = File.join(File.dirname(File.realpath(__FILE__)), "ruby_headers")
version_suffix = if /^2.1.\d/ =~ RUBY_VERSION
"210"
else
RUBY_VERSION.tr(".", "")
end
$CFLAGS += " -I#{abs_ruby_header_path}/#{v... | null | null |
Call navigator.app instead of window.app - since window.app will probably be removed.
Apply this change to `phonegap.js` and return the full updated file.
```javascript
document.write('<script type="text/javascript" charset="utf-8" src="../phonegap-0.9.6.1.js"></script>');
document.write('<script type="text/javascrip... | ```javascript
document.write('<script type="text/javascript" charset="utf-8" src="../phonegap-0.9.6.1.js"></script>');
document.write('<script type="text/javascript" charset="utf-8" src="phonegap-0.9.6.1.js"></script>');
function backHome() {
if (device.platform.toLowerCase() == 'android') {
navigator.app.exitApp()... | null | null |
Add "testDownload" curl test to replace ignored "testDownloadInBackground".
Apply this change to `ktor-client/ktor-client-curl/posix/test/io/ktor/client/engine/curl/test/CurlNativeTests.kt` and return the full updated file.
```kotlin
/*
* Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code ... | ```kotlin
/*
* Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.engine.curl.test
import io.ktor.client.*
import io.ktor.client.engine.curl.*
import io.ktor.client.request.*
import kotlinx.coroutines.*
import kotlin.native.... | null | null |
Simplify even more since we don't need a global reference to rootNode any more, either
Apply this change to `src/main.js` and return the full updated file.
```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import { connect, Provider } from 'react-redux';
import { createStore } from 'redux';
... | ```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import { connect, Provider } from 'react-redux';
import { createStore } from 'redux';
import store from './store';
import { Main } from './components';
import { increment, decrement } from './actions';
function mapStateToProps(state) {
retur... | null | null |
Test Commit for Slack Integration
Apply this change to `Assets/Scripts/AIController.cs` and return the full updated file.
```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AIController : MonoBehaviour
{
public UnityEngine.AI.NavMeshAgent agent { get; private set... | ```csharp
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AIController : MonoBehaviour
{
public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding
public Transform target; ... | null | null |
Add default drop item string to prevent NPE
Apply this change to `src/main/java/dmillerw/quadrum/common/lib/data/Drop.java` and return the full updated file.
```java
package dmillerw.quadrum.common.lib.data;
import cpw.mods.fml.common.registry.GameData;
import net.minecraft.item.Item;
import net.minecraft.util.MathH... | ```java
package dmillerw.quadrum.common.lib.data;
import cpw.mods.fml.common.registry.GameData;
import net.minecraft.item.Item;
import net.minecraft.util.MathHelper;
import java.util.Random;
/**
* @author dmillerw
*/
public class Drop {
private static Random random = new Random();
private Item dropItem;
... | null | null |
Add feed id as a parameter
Apply this change to `main.go` and return the full updated file.
```go
package main
import (
"net/http"
"fmt"
"encoding/json"
)
func handlePing(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "OK")
}
func handleRequest(w http.ResponseWriter, r *http.Request) {
... | ```go
package main
import (
"net/http"
"fmt"
"encoding/json"
)
func handlePing(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "OK")
}
func handleRequest(w http.ResponseWriter, r *http.Request) {
type Input struct {
FeedId string `json:"feed_id"`
FeedUrl string `json:"feed... | null | null |
Move OS comment to top of file
Apply this change to `aliases_ubuntu.bash` and return the full updated file.
```bash
#built ins declared before shared
alias grepc="grep -nrP --color=always"
source "${DOTFILES_DIR}aliases_shared.bash"
#Aliases for Ubuntu only
#alias for bash settings
alias settings="subl ~/.bash_ali... | ```bash
#Aliases for Ubuntu
#built ins declared before shared
alias grepc="grep -nrP --color=always"
source "${DOTFILES_DIR}aliases_shared.bash"
#alias for bash settings
alias settings="subl ~/.bash_aliases ~/.bashrc ~/.vimrc \"${DOTFILES_DIR}aliases_ubuntu.bash\" \"${DOTFILES_DIR}aliases_shared.bash\""
alias reload... | null | null |
Refactor names of clojure parameters in deserialization functional operation
Apply this change to `FireRecord/Source/Extensions/Database/FirebaseModel+Extension.swift` and return the full updated file.
```swift
//
// FirebaseModel+Extension.swift
// FirebaseCommunity
//
// Created by Victor Alisson on 15/08/17.
//... | ```swift
//
// FirebaseModel+Extension.swift
// FirebaseCommunity
//
// Created by Victor Alisson on 15/08/17.
//
import Foundation
import FirebaseCommunity
public extension FirebaseModel {
typealias JSON = [String: Any]
internal static var classPath: DatabaseReference {
return reference.child... | null | null |
Break a line exceeding 80 chars into two
Apply this change to `tmpl_test.go` and return the full updated file.
```go
// Copyright (C) 2017 Damon Revoe. All rights reserved.
// Use of this source code is governed by the MIT
// license, which can be found in the LICENSE file.
package main
import (
"testing"
)
func ... | ```go
// Copyright (C) 2017 Damon Revoe. All rights reserved.
// Use of this source code is governed by the MIT
// license, which can be found in the LICENSE file.
package main
import (
"testing"
)
func runTemplateFunctionTest(t *testing.T,
funcName, arg, expected string) {
result := funcMap[funcName].(func(stri... | null | null |
Make API changes backward compatible
Apply this change to `core/src/main/java/org/jboss/gwt/elemento/core/LazyElement.java` and return the full updated file.
```java
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obt... | ```java
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distr... | null | null |
Revert accidental `hello-kotlin` sample changes
Apply this change to `samples/hello-kotlin/build.gradle.kts` and return the full updated file.
```kotlin
buildscript {
repositories {
gradleScriptKotlin()
}
dependencies {
classpath(kotlinModule("gradle-plugin", version = "1.0.3"))
}
}
... | ```kotlin
buildscript {
repositories {
gradleScriptKotlin()
}
dependencies {
classpath(kotlinModule("gradle-plugin"))
}
}
apply {
plugin("kotlin")
plugin<ApplicationPlugin>()
}
configure<ApplicationPluginConvention> {
mainClassName = "samples.HelloWorldKt"
}
repositories... | null | null |
Tidy up comment broken over two lines.
Apply this change to `lib/meetup_thingy/event_list_file_writer.rb` and return the full updated file.
```ruby
module MeetupThingy
# class def
class EventListFileWriter
def write(events, file_name)
CSV.open(file_name, 'wb') do |csv|
csv << ['Group name', 'Eve... | ```ruby
module MeetupThingy
# class def
class EventListFileWriter
def write(events, file_name)
CSV.open(file_name, 'wb') do |csv|
csv << ['Group name', 'Event name', 'Day of week', 'Date',
'Start time', 'End time']
events.each do |event|
csv << extract_row(event)
... | null | null |
Add another case to qualifier-removal test
Apply this change to `test2/casts/rm_qual.c` and return the full updated file.
```c
// RUN: %check %s
struct A
{
int i;
};
int f(const void *p)
{
struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const)
struct A *b = (struct A *)p; // CHECK: !/warnin... | ```c
// RUN: %check %s
struct A
{
int i;
};
void take(void *);
int f(const void *p)
{
struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const)
struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/
(void)a;
(void)b;
const char c = 5;
take(&c); // CHECK: warning: impl... | null | null |
Add feature behind dev features
Apply this change to `app/src/lib/feature-flag.ts` and return the full updated file.
```typescript
const Disable = false
/**
* Enables the application to opt-in for preview features based on runtime
* checks. This is backed by the GITHUB_DESKTOP_PREVIEW_FEATURES environment
* varia... | ```typescript
const Disable = false
/**
* Enables the application to opt-in for preview features based on runtime
* checks. This is backed by the GITHUB_DESKTOP_PREVIEW_FEATURES environment
* variable, which is checked for non-development environments.
*/
function enableDevelopmentFeatures(): boolean {
if (Disab... | null | null |
Fix potential issue with Diagnostics_Debugger::Break
- Add code to remove warning about unused parameters
Apply this change to `src/CLR/CorLib/corlib_native_System_Diagnostics_Debugger.cpp` and return the full updated file.
```cpp
//
// Copyright (c) 2017 The nanoFramework project contributors
// Portions Copyright ... | ```cpp
//
// Copyright (c) 2017 The nanoFramework project contributors
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#include "CorLib.h"
HRESULT Library_corlib_native_System_Diagnostics_Debugger::get_IsAttached___STATIC_... | null | null |
Make coal nugget burn time pass through the Forge hook
Apply this change to `src/main/java/com/infinityraider/agricraft/content/core/ItemAgriNugget.java` and return the full updated file.
```java
package com.infinityraider.agricraft.content.core;
import com.infinityraider.agricraft.reference.Names;
import com.infini... | ```java
package com.infinityraider.agricraft.content.core;
import com.infinityraider.agricraft.reference.Names;
import com.infinityraider.infinitylib.item.ItemBase;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraftforge.common.ForgeHooks;
p... | null | null |
Add run solver first exception type
Apply this change to `base_solver.py` and return the full updated file.
```python
#!/usr/bin/env python
# encoding: utf-8
from datetime import datetime
class BaseSolver(object):
task = None
best_solution = None
best_distance = float('inf')
search_time = None
... | ```python
#!/usr/bin/env python
# encoding: utf-8
from datetime import datetime
class RunSolverFirst(Exception):
pass
class BaseSolver(object):
task = None
best_solution = None
best_distance = float('inf')
search_time = None
cycles = 0
def __init__(self, task):
self.task = task... | null | null |
Add direct repository getting method
Apply this change to `lib/docker_registry/registry.rb` and return the full updated file.
```ruby
require 'uri'
require 'docker_registry'
require 'docker_registry/client'
require 'docker_registry/repository'
require 'docker_registry/tag'
class DockerRegistry::Registry
attr_reade... | ```ruby
require 'uri'
require 'docker_registry'
require 'docker_registry/client'
require 'docker_registry/repository'
require 'docker_registry/tag'
class DockerRegistry::Registry
attr_reader :base_uri, :options, :client
# @see DockerRegistry::Client#initialize
def initialize(uri)
@uri = URI.parse(uri)
@... | null | null |
Reduce priority of aspect ratio constraints maringally
Attempts to maintain aspect ratio above all over constraints except those that are absolutley required
Apply this change to `Eurofurence/Modules/Shared/Views/AspectRatioConstrainedImageView.swift` and return the full updated file.
```swift
//
// AspectRatioCons... | ```swift
//
// AspectRatioConstrainedImageView.swift
// Eurofurence
//
// Created by Thomas Sherwood on 24/06/2018.
// Copyright © 2018 Eurofurence. All rights reserved.
//
import UIKit
class AspectRatioConstrainedImageView: UIImageView {
override var image: UIImage? {
didSet {
if let siz... | null | null |
[REF] openacademy: Modify copy method into inherit
Apply this change to `openacademy/model/openacademy_course.py` and return the full updated file.
```python
from openerp import models, fields, api
'''
This module is to create model of Course
'''
class Course(models.Model):
'''
This class create model of Co... | ```python
from openerp import api, fields, models
'''
This module is to create model of Course
'''
class Course(models.Model):
'''
This class create model of Course
'''
_name = 'openacademy.course' # Model odoo name
name = fields.Char(string='Title', required=True) # Field reserved to identified ... | null | null |
Add stub for legal notice.
Apply this change to `src/main.c` and return the full updated file.
```c
#include "common.h"
#include "arguments.h"
TCHAR *get_version(void)
{
return _T("HostKit Agent PREALPHA\nCompiled at ") __TIME__ _T(" on ") __DATE__ _T("\n");
}
int _tmain(int argc, TCHAR *argv[])
{
int result;
... | ```c
#include "common.h"
#include "arguments.h"
TCHAR *get_version(void)
{
return _T("HostKit Agent PREALPHA\nCompiled at ") __TIME__ _T(" on ") __DATE__ _T("\n");
}
TCHAR *get_copyright(void)
{
return _T("");
}
int _tmain(int argc, TCHAR *argv[])
{
int result;
initialize_arguments();
if(parse_arguments(argv... | null | null |
Use HTTPS for API requests
Apply this change to `src/api/server/giphy.ts` and return the full updated file.
```typescript
import 'whatwg-fetch';
export const BASE_URL = 'http://api.giphy.com/v1/gifs';
export function get(path): any {
return fetch(BASE_URL + path, {
method: 'get',
headers: {
'Accept... | ```typescript
import 'whatwg-fetch';
export const BASE_URL = 'https://api.giphy.com/v1/gifs';
export function get(path): any {
return fetch(BASE_URL + path, {
method: 'get',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
})
.then(response => response.json()... | null | null |
Remove unnecessary code from `Brand`
Apply this change to `src/types/brand.ts` and return the full updated file.
```typescript
import { Runtype, Static, create } from '../runtype';
export declare const RuntypeName: unique symbol;
export interface RuntypeBrand<B extends string> {
[RuntypeName]: B;
}
export interf... | ```typescript
import { Runtype, Static, create } from '../runtype';
export declare const RuntypeName: unique symbol;
export interface RuntypeBrand<B extends string> {
[RuntypeName]: B;
}
export interface Brand<B extends string, A extends Runtype>
extends Runtype<
// TODO: replace it by nominal type when it h... | null | null |
Add ObjectType: paymentout and cashout
Apply this change to `MoySkladSDK/Structs/Types.swift` and return the full updated file.
```swift
//
// Types.swift
// MoyskladNew
//
// Created by Andrey Parshakov on 14.10.16.
// Copyright © 2016 Andrey Parshakov. All rights reserved.
//
import Foundation
public enum MSO... | ```swift
//
// Types.swift
// MoyskladNew
//
// Created by Andrey Parshakov on 14.10.16.
// Copyright © 2016 Andrey Parshakov. All rights reserved.
//
import Foundation
public enum MSObjectType : String {
case customentity
case customentitymetadata
case attributemetadata
case product
case productfol... | null | null |
Update to new storage payload api
Apply this change to `erudite/components/commands/find_owner.py` and return the full updated file.
```python
"""
Command that will allow for a user to inject triples into a database.
"""
from rhobot.components.commands.base_command import BaseCommand
from rdflib.namespace import FOAF... | ```python
"""
Command that will allow for a user to inject triples into a database.
"""
from rhobot.components.commands.base_command import BaseCommand
from rdflib.namespace import FOAF, RDF
from rhobot.namespace import RHO
from rhobot.components.storage import ResultPayload, ResultCollectionPayload
import logging
log... | null | null |
Adjust screen resolution to samsung galaxy s4
Apply this change to `Assets/Scripts/MainMenu.cs` and return the full updated file.
```csharp
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Menu : MonoBehaviour
{
public Canvas MainCanvas;
static public int money = 1000;
publi... | ```csharp
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Menu : MonoBehaviour
{
public Canvas MainCanvas;
static public int money = 1000;
public void LoadOn()
{
Screen.SetResolution(1080, 1920, true);
//DontDestroyOnLoad(money);
Application.LoadLevel(1);
}
}
``` | null | null |
Clean commented code and a tiny optimization to return false if the value is null.
Apply this change to `src/ServiceStack.OrmLite/Expressions/Sql.cs` and return the full updated file.
```csharp
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
namespace ServiceStack.Orm... | ```csharp
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
namespace ServiceStack.OrmLite
{
public static class Sql
{
public static bool In<T>(T value, params object[] list)
{
if(value == null)
return false;
foreach (var obj in list)
{
if (ob... | null | null |
Revert "use fixed repo URL for 4.x docs"
This reverts commit 3e664a5c
Apply this change to `scripts/github/publishDocs.sh` and return the full updated file.
```bash
#!/bin/bash
set -e
REPO_BRANCH="${GIT_REF#refs/heads/}"
git clone "https://${GH_TOKEN}@github.com/d-fischer/d-fischer.github.io.git" docRepo
npm run... | ```bash
#!/bin/bash
set -e
REPO_BRANCH="${GIT_REF#refs/heads/}"
git clone "https://${GH_TOKEN}@github.com/${REPO_USER}/${REPO_USER}.github.io.git" docRepo
npm run docs -- --base-url / --repo-branch "${REPO_BRANCH}" --out-dir docRepo
cd docRepo
git config user.email "actions@github.com"
git config user.name "GitHu... | null | null |
Increase the maximum time we wait for long running tests from 5 to 10.
Apply this change to `JustSaying.TestingFramework/Patiently.cs` and return the full updated file.
```csharp
using System;
using System.Threading;
using NUnit.Framework;
namespace JustSaying.TestingFramework
{
public static class Patien... | ```csharp
using System;
using System.Threading;
using NUnit.Framework;
namespace JustSaying.TestingFramework
{
public static class Patiently
{
public static void VerifyExpectation(Action expression)
{
VerifyExpectation(expression, 5.Seconds());
}
publi... | null | null |
Fix english language for new line length
Apply this change to `src/lang-english.c` and return the full updated file.
```c
#include "num2words.h"
const Language LANG_ENGLISH = {
.hours = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"ele... | ```c
#include "num2words.h"
const Language LANG_ENGLISH = {
.hours = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve"
},
#ifdef PBL_PLATFORM_CHALK
.phrases = {
"*$1 o'clock ",
"five past *$1 ",
"ten pa... | null | null |
Rename JsType to JsT, JsT to JsTrait
Apply this change to `src/js_types/js_type.rs` and return the full updated file.
```rust
use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;
pub struct JsType {
uid: Uuid,
t: Box<JsT>,
}
impl JsType {
fn new(t: Box<JsT>) -> JsType {
JsType ... | ```rust
use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;
pub trait JsTrait {}
pub struct JsT {
uid: Uuid,
t: Box<JsTrait>,
}
impl JsT {
pub fn new(t: Box<JsTrait>) -> JsT {
JsT {
uid: Uuid::new_v4(),
t: t,
}
}
}
impl PartialEq for JsT {
... | null | null |
Prepend log entries to try to stay above the fold
Apply this change to `operation-queue/operation-queue-demo.js` and return the full updated file.
```javascript
(function() {
var opQueue = new OperationQueue(),
counter = 0;
function demoLog(msg) {
var li = document.createElement("li");
... | ```javascript
(function() {
var opQueue = new OperationQueue(),
counter = 0;
function demoLog(msg) {
var li = document.createElement("li");
li.appendChild(document.createTextNode(msg));
$("#logger").prepend(li);
}
$("#success").click(function() {
demoLog("Calli... | null | null |
Include cstddef for size_t in newer GCC.
Apply this change to `src/graph.h` and return the full updated file.
```c
#ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(si... | ```c
#ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
#include <cstddef>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
... | null | null |
Add a basic REST webservice
Apply this change to `src/main/kotlin/Application.kt` and return the full updated file.
```kotlin
import org.springframework.web.reactive.function.RouterFunction
import org.springframework.http.codec.BodyInserters
import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter
im... | ```kotlin
import org.springframework.web.reactive.function.RouterFunction
import org.springframework.http.codec.BodyInserters.fromObject
import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter
import org.springframework.web.reactive.function.HandlerFunction
import org.springframework.web.reactive.func... | null | null |
Add zap stanza for TunnelBear
Apply this change to `Casks/tunnelbear.rb` and return the full updated file.
```ruby
cask 'tunnelbear' do
version '2.5.8'
sha256 '5c79dc8478572d4abbc8867e3badc0639a1f3468a8ca6e8f2bdeeb83453cd803'
# amazonaws.com is the official download host per the vendor homepage
url "https://... | ```ruby
cask 'tunnelbear' do
version '2.5.8'
sha256 '5c79dc8478572d4abbc8867e3badc0639a1f3468a8ca6e8f2bdeeb83453cd803'
# amazonaws.com is the official download host per the vendor homepage
url "https://tunnelbear.s3.amazonaws.com/downloads/mac/TunnelBear-#{version}.zip"
appcast 'https://s3.amazonaws.com/tunn... | null | null |
Add some fixtures for project size
Apply this change to `src/Gitonomy/Bundle/CoreBundle/DataFixtures/ORM/LoadProjectData.php` and return the full updated file.
```php
<?php
namespace Gitonomy\Bundle\CoreBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\Order... | ```php
<?php
namespace Gitonomy\Bundle\CoreBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Gitonomy\Bundle\CoreBundle\Entity\Project;
/**
* Loads the fixtures for project object.
*
* @author Julien DIDIER <julien@jdidier.net... | null | null |
Make `AssetStore` return Err when empty
Closes https://github.com/PistonDevelopers/piston/issues/432
Apply this change to `src/asset_store.rs` and return the full updated file.
```rust
//! Storing sounds, textures, animations etc.
// Extern crates.
use std::os::self_exe_path;
/// A place to store sounds, textures... | ```rust
//! Storing sounds, textures, animations etc.
// Extern crates.
use std::os::self_exe_path;
/// A place to store sounds, textures, animations etc.
///
/// The idea is to have one object which the app can use
/// to load assets for the game with a simple interface.
pub struct AssetStore {
// The folder to... | null | null |
Mark ICCSaxDelegator class as internal.
Apply this change to `src/platform/ICCSAXDelegator.cs` and return the full updated file.
```csharp
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2009 Jason Booth
Copyright (c) 2011-2012 ope... | ```csharp
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2009 Jason Booth
Copyright (c) 2011-2012 openxlive.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentat... | null | null |
Remove phar:// from file path
Apply this change to `src/falkirks/simplewarp/utils/ChecksumVerify.php` and return the full updated file.
```php
<?php
namespace falkirks\simplewarp\utils;
use pocketmine\plugin\PharPluginLoader;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\Utils;
class ChecksumVerify {
... | ```php
<?php
namespace falkirks\simplewarp\utils;
use pocketmine\plugin\PharPluginLoader;
use pocketmine\plugin\PluginBase;
use pocketmine\utils\Utils;
class ChecksumVerify {
const POGGIT_ENDPOINT = "https://poggit.pmmp.io/get.sha1/";
/**
* WARNING! This is a blocking function that performs a web reque... | null | null |
Disable the YUICompressor and closure compiler tests
They're annoying because the fail on Travis half of the time.
Apply this change to `test/compressJavaScript-test.js` and return the full updated file.
```javascript
var vows = require('vows'),
assert = require('assert'),
AssetGraph = require('../lib');
vo... | ```javascript
var vows = require('vows'),
assert = require('assert'),
AssetGraph = require('../lib');
vows.describe('transforms.compressJavaScript').addBatch(function () {
var test = {};
// The YUICompressor and ClosureCompiler tests fail intermittently on Travis
[undefined, 'uglifyJs'/*, 'yuicompr... | null | null |
Remove empty newline from UnixTim
Apply this change to `core/src/main/java/se/ltu/emapal/compute/util/UnixTime.kt` and return the full updated file.
```kotlin
package se.ltu.emapal.compute.util
import java.util.*
/**
* Keeps track of time as an amount of milliseconds since the Unix 1970 epoch.
*
* This class rep... | ```kotlin
package se.ltu.emapal.compute.util
import java.util.*
/**
* Keeps track of time as an amount of milliseconds since the Unix 1970 epoch.
*
* This class represents the preferred way to store all times that are not directly presented to
* human users, or where conditions make its use nonviable.
*/
class U... | null | null |
Add deprecated 'tree list' type to formatter, because that's what __base templates still is :)
Apply this change to `src/Rainbow/Formatting/FieldFormatters/MultilistFormatter.cs` and return the full updated file.
```csharp
using System;
using System.Collections.Generic;
using Rainbow.Model;
using Sitecore.Data;
nam... | ```csharp
using System;
using System.Collections.Generic;
using Rainbow.Model;
using Sitecore.Data;
namespace Rainbow.Formatting.FieldFormatters
{
public class MultilistFormatter : FieldTypeBasedFormatter
{
public override string[] SupportedFieldTypes
{
get
{
return new[] { "Checklist", "Multilist", "... | null | null |
Improve method of detecting if running in screen
Apply this change to `zsh/aliases.zsh` and return the full updated file.
```bash
# Use colors in coreutils utilities output
alias ls='ls --color=auto'
export GREP_OPTIONS="--color"
# ls aliases
alias ll='ls -la'
alias la='ls -A'
alias l='ls'
# Update dotfiles
functio... | ```bash
# Use colors in coreutils utilities output
alias ls='ls --color=auto'
export GREP_OPTIONS="--color"
# ls aliases
alias ll='ls -la'
alias la='ls -A'
alias l='ls'
# Update dotfiles
function dfu() {
(
cd ~/.dotfiles && git pullff && ./install -q
)
}
# Use pip without requiring virtualenv
functio... | null | null |
Add tests for cassandra user, sadly comment out test that C* is actually running.
Apply this change to `test/integration/default/serverspec/default_spec.rb` and return the full updated file.
```ruby
require 'spec_helper'
describe 'cassandra' do
it 'installs it' do
expect(package 'dsc20').to be_installed
end... | ```ruby
require 'spec_helper'
describe 'cassandra' do
it 'installs it' do
expect(package 'dsc20').to be_installed
end
it 'is enabled' do
expect(service 'cassandra').to be_enabled
end
# On Centos, C* doesn't start due Java 6 being installed, and not 7.
# On ubuntu, C* doesn't start due a jamm err... | null | null |
Adjust angular2-jwt configuration to remove an error when the app reloads
Apply this change to `FrontEnd/src/app/app.module.ts` and return the full updated file.
```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/for... | ```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule, Http, RequestOptions } from '@angular/http';
import {RoutingModule} from './router/router.module';
import {RouterModule, Routes} from '@an... | null | null |
Fix the impossibility to override usb device driver
Apply this change to `src/app/states/devices/usb/abstract-usb-device.ts` and return the full updated file.
```typescript
import { AbstractDevice } from '../abstract-device';
export abstract class AbstractUSBDevice extends AbstractDevice {
abstract readonly pid: s... | ```typescript
import { AbstractDevice } from '../abstract-device';
export abstract class AbstractUSBDevice extends AbstractDevice {
abstract readonly pid: string;
abstract readonly vid: string;
readonly driver: string = 'CdcAcmSerialDriver';
abstract readonly baudRate: number;
abstract readonly dataBits: num... | null | null |
Create roll and grant priveleges
Apply this change to `db/schema.sql` and return the full updated file.
```sql
CREATE DATABASE FAM_SARP;
\c fam_sarp
CREATE TABLE participants (
subject smallserial NOT NULL,
email character varying(40) UNIQUE NOT NULL,
sessions_completed smallint NOT NULL,
rng_seed integer NO... | ```sql
CREATE DATABASE FAM_SARP;
\c fam_sarp
CREATE TABLE participants (
subject smallserial NOT NULL,
email character varying(40) UNIQUE NOT NULL,
sessions_completed smallint NOT NULL,
rng_seed integer NOT NULL,
PRIMARY KEY(subject)
);
CREATE TABLE stimuli (
id smallserial NOT NULL,
target character v... | null | null |
Use PingFactory for more testable code
Apply this change to `src/Loct/Pinger/Provider/CommandProvider.php` and return the full updated file.
```php
<?php
namespace Loct\Pinger\Provider;
use \Loct\Pinger\Command\PingCommand;
use \Pimple\Container;
use \Pimple\ServiceProviderInterface;
/**
* Service provider for com... | ```php
<?php
namespace Loct\Pinger\Provider;
use \Loct\Pinger\Command\PingCommand;
use \Loct\Pinger\PingFactory;
use \Pimple\Container;
use \Pimple\ServiceProviderInterface;
/**
* Service provider for command related classes and parameters.
*
* @author herloct <herloct@gmail.com>
*/
class CommandProvider implemen... | null | null |
Fix use of the new function signatures
Apply this change to `src/zwreec/lib.rs` and return the full updated file.
```rust
#![feature(plugin)]
#![plugin(rustlex)]
#[allow(plugin_as_library)]
extern crate rustlex;
#[macro_use] extern crate log;
extern crate time;
extern crate term;
pub mod frontend;
pub mod backend;
p... | ```rust
#![feature(plugin)]
#![plugin(rustlex)]
#[allow(plugin_as_library)]
extern crate rustlex;
#[macro_use] extern crate log;
extern crate time;
extern crate term;
pub mod frontend;
pub mod backend;
pub use backend::zcode::zfile;
pub mod utils;
use frontend::codegen;
use std::io::{Read,Write};
pub fn compile<R:... | null | null |
Use stop_tone() if velocity set to 0
Apply this change to `organ.c` and return the full updated file.
```c
#ifndef F_CPU
#define F_CPU F_OSC
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <ctype.h>
#include <math.h>
#include <stdint.h>
#include <util/delay.h>
#include "config.h"
#include "nco.h"
#inc... | ```c
#ifndef F_CPU
#define F_CPU F_OSC
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <ctype.h>
#include <math.h>
#include <stdint.h>
#include <util/delay.h>
#include "config.h"
#include "nco.h"
#include "uart.h"
static void handle_midi(void);
int main(void);
__attribute__((optimize("unroll-loops")))... | null | null |
Remove assertions that break non-Cocoapods installations
Apply this change to `OpalImagePicker/Source/Bundle+Helper.swift` and return the full updated file.
```swift
//
// Bundle+Helper.swift
// OpalImagePicker
//
// Created by Kris Katsanevas on 1/15/17.
// Copyright © 2017 Opal Orange LLC. All rights reserved.
... | ```swift
//
// Bundle+Helper.swift
// OpalImagePicker
//
// Created by Kris Katsanevas on 1/15/17.
// Copyright © 2017 Opal Orange LLC. All rights reserved.
//
import Foundation
extension Bundle {
static func podBundle(forClass: AnyClass) -> Bundle? {
let bundleForClass = Bundle(for: forClass... | null | null |
Fix URL transfomer when contains white space
Apply this change to `DribbbleKit/Sources/Transformer.swift` and return the full updated file.
```swift
//
// Transformer.swift
// DribbbleKit
//
// Created by 林達也 on 2017/04/15.
// Copyright © 2017年 jp.sora0077. All rights reserved.
//
import Foundation
import Alter
... | ```swift
//
// Transformer.swift
// DribbbleKit
//
// Created by 林達也 on 2017/04/15.
// Copyright © 2017年 jp.sora0077. All rights reserved.
//
import Foundation
import Alter
struct Transformer {
static let date: (String) throws -> Date = {
let formatter = DateFormatter()
formatter.dateFormat = ... | null | null |
Use java.lang.Long.MAX_VALUE as best example of loss of precision.
Apply this change to `featureset/src/main/java/com/redseal/featureset/SomeClass.java` and return the full updated file.
```java
package com.redseal.featureset;
public class SomeClass extends SomeAbstractClass {
public SomeClass() {
theIn... | ```java
package com.redseal.featureset;
public class SomeClass extends SomeAbstractClass {
public SomeClass() {
theInt = 42;
theLong = java.lang.Long.MAX_VALUE;
theString = "Just some class.";
}
public SomeClass(int x, long y, String z) {
theInt = x;
theLong = y;
... | null | null |
Make mailer test a bit more inclusive.
Apply this change to `mailer_test.go` and return the full updated file.
```go
package authboss
import (
"bytes"
"strings"
"testing"
)
func TestMailer(t *testing.T) {
mailServer := &bytes.Buffer{}
config := NewConfig()
config.Mailer = LogMailer(mailServer)
config.Storer... | ```go
package authboss
import (
"bytes"
"strings"
"testing"
)
func TestMailer(t *testing.T) {
mailServer := &bytes.Buffer{}
config := NewConfig()
config.Mailer = LogMailer(mailServer)
config.Storer = mockStorer{}
Init(config)
err := SendMail(Email{
To: []string{"some@email.com", "a@a.com"},
ToNam... | null | null |
Return type of extract() function added
Apply this change to `IExtractable.php` and return the full updated file.
```php
<?php
/**
* @author Shiplu Mokaddim <shiplu@mokadd.im>
* @copyright 2012 Shiplu Mokaddim
* @package Biriani
*/
/**
* class IExtractableBiriani
*/
interface IExtractable {
/**
* @r... | ```php
<?php
/**
* @author Shiplu Mokaddim <shiplu@mokadd.im>
* @copyright 2012 Shiplu Mokaddim
* @package Biriani
*/
/**
* class IExtractableBiriani
*/
interface IExtractable {
/**
* @return array extracted data in an associative array
* @abstract
* @access public
* @return Biriani_Dat... | null | null |
Move away from deprecated C++ APIs in the demo
A bit less cruft printed during tests which use it.
Apply this change to `demo/src/input.h` and return the full updated file.
```c
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in c... | ```c
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | null | null |
Fix channel json object parsing
Apply this change to `Harekaze/Models/Channel.swift` and return the full updated file.
```swift
//
// Channel.swift
// Harekaze
//
// Created by Yuki MIZUNO on 2016/07/10.
// Copyright © 2016年 Yuki MIZUNO. All rights reserved.
//
import RealmSwift
import ObjectMapper
class Channe... | ```swift
//
// Channel.swift
// Harekaze
//
// Created by Yuki MIZUNO on 2016/07/10.
// Copyright © 2016年 Yuki MIZUNO. All rights reserved.
//
import RealmSwift
import ObjectMapper
class Channel: Object, Mappable {
// MARK: - Managed instance fileds
dynamic var channel: Int = 0
dynamic var id: String = ""
dy... | null | null |
[OWL-1594] Add checking of least value on cache timeout(non-debug mode)
Apply this change to `modules/hbs/rpc/package.go` and return the full updated file.
```go
package rpc
import (
viper "github.com/spf13/viper"
log "github.com/Cepave/open-falcon-backend/common/logruslog"
nqmService "github.com/Cepave/open-fal... | ```go
package rpc
import (
viper "github.com/spf13/viper"
log "github.com/Cepave/open-falcon-backend/common/logruslog"
nqmService "github.com/Cepave/open-falcon-backend/common/service/nqm"
)
var logger = log.NewDefaultLogger("INFO")
func InitPackage(config *viper.Viper) {
initNqmConfig(config)
}
func initNqmCo... | null | null |
Fix tooltip message for titles
Apply this change to `src/schema/Heading.js` and return the full updated file.
```javascript
const React = require('react');
const classNames = require('classnames');
const { BLOCKS } = require('markup-it');
const TAGS = {
[BLOCKS.HEADING_1]: 'h1',
[BLOCKS.HEADING_2]: 'h2',
... | ```javascript
const React = require('react');
const classNames = require('classnames');
const { BLOCKS } = require('markup-it');
const TAGS = {
[BLOCKS.HEADING_1]: 'h1',
[BLOCKS.HEADING_2]: 'h2',
[BLOCKS.HEADING_3]: 'h3',
[BLOCKS.HEADING_4]: 'h4',
[BLOCKS.HEADING_5]: 'h5',
[BLOCKS.HEADING_... | null | null |
Add none-group statement parsing test
Apply this change to `tests/test_stmt.rs` and return the full updated file.
```rust
#[macro_use]
mod macros;
use syn::Stmt;
#[test]
fn test_raw_operator() {
let stmt = syn::parse_str::<Stmt>("let _ = &raw const x;").unwrap();
snapshot!(stmt, @r###"
Local(Local {
... | ```rust
#[macro_use]
mod macros;
use proc_macro2::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};
use std::iter::FromIterator;
use syn::Stmt;
#[test]
fn test_raw_operator() {
let stmt = syn::parse_str::<Stmt>("let _ = &raw const x;").unwrap();
snapshot!(stmt, @r###"
Local(Local {
pat: Pa... | null | null |
Add (w)char casting operator to windows char classes
Apply this change to `inc/winchar.h` and return the full updated file.
```c
//--------------------------------------------------------------------------//
/// Copyright (c) 2017 by Milos Tosic. All Rights Reserved. ///
/// License: http://www.opensou... | ```c
//--------------------------------------------------------------------------//
/// Copyright (c) 2017 by Milos Tosic. All Rights Reserved. ///
/// License: http://www.opensource.org/licenses/BSD-2-Clause ///
//--------------------------------------------------------------------------//... | null | null |
Fix return value and type
Apply this change to `src/ts/index.ts` and return the full updated file.
```typescript
export function insertHTMLBeforeBegin(element: HTMLElement, text: string) {
element.insertAdjacentHTML("beforebegin", text);
};
export function insertHTMLAfterBegin(element: HTMLElement, text: string) {
... | ```typescript
export function insertHTMLBeforeBegin(element: HTMLElement, text: string): void {
element.insertAdjacentHTML("beforebegin", text);
};
export function insertHTMLAfterBegin(element: HTMLElement, text: string): void {
element.insertAdjacentHTML("afterbegin", text);
};
export function insertHTMLBeforeEnd(el... | null | null |
Rearrange imports for proper dependencies
Apply this change to `tspapi/__init__.py` and return the full updated file.
```python
from __future__ import absolute_import
from tspapi.api_call import _ApiCall
from tspapi.api import API
from tspapi.measurement import Measurement
from tspapi.api_exception import ConnectionE... | ```python
from __future__ import absolute_import
from tspapi.api_exception import ConnectionError
from tspapi.api_exception import HTTPResponseError
from tspapi.measurement import Measurement
from tspapi.source import Source
from tspapi.event import RawEvent
from tspapi.event import Event
from tspapi.metric import Metr... | null | null |
Remove the pollInterval from the example - use the default 2000
Apply this change to `examples/consume.js` and return the full updated file.
```javascript
var kafka = require('../kafka-node')
var consumer = new kafka.Consumer({
host:'localhost',
port:9092,
topic:'test',
pollInterval: 1000
})
consumer.connect()
... | ```javascript
var kafka = require('../kafka-node')
var consumer = new kafka.Consumer({
host:'localhost',
port:9092,
topic:'test'
})
consumer.connect()
consumer.on('message', function(message) {
console.log('Consumed message:', message, '\n')
})
``` | null | null |
Fix create map not using MemberList property
Apply this change to `src/Abp.AutoMapper/AutoMapper/AutoMapFromAttribute.cs` and return the full updated file.
```csharp
using System;
using Abp.Collections.Extensions;
using AutoMapper;
namespace Abp.AutoMapper
{
public class AutoMapFromAttribute : AutoMapAttributeB... | ```csharp
using System;
using Abp.Collections.Extensions;
using AutoMapper;
namespace Abp.AutoMapper
{
public class AutoMapFromAttribute : AutoMapAttributeBase
{
public MemberList MemberList { get; set; } = MemberList.Destination;
public AutoMapFromAttribute(params Type[] targetTypes)
... | null | null |
Add support for web novels
Apply this change to `library/src/main/kotlin/me/proxer/library/enums/Medium.kt` and return the full updated file.
```kotlin
package me.proxer.library.enums
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
/**
* Enum holding the available mediums.
*
* @author Ruben Ge... | ```kotlin
package me.proxer.library.enums
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
/**
* Enum holding the available mediums.
*
* @author Ruben Gees
*/
@JsonClass(generateAdapter = false)
enum class Medium {
@Json(name = "animeseries")
ANIMESERIES,
@Json(name = "movie")
... | null | null |
Make quantization functions work for any block size.
Apply this change to `src/quantize.rs` and return the full updated file.
```rust
extern {
static dc_qlookup_Q3: [i16; 256];
static ac_qlookup_Q3: [i16; 256];
}
pub fn dc_q(qindex: usize) -> i16 {
unsafe {
dc_qlookup_Q3[qindex]
}
}
pub fn a... | ```rust
extern {
static dc_qlookup_Q3: [i16; 256];
static ac_qlookup_Q3: [i16; 256];
}
pub fn dc_q(qindex: usize) -> i16 {
unsafe {
dc_qlookup_Q3[qindex]
}
}
pub fn ac_q(qindex: usize) -> i16 {
unsafe {
ac_qlookup_Q3[qindex]
}
}
pub fn quantize_in_place(qindex: usize, coeffs: ... | null | null |
Use custom request execution using URLSession
Apply this change to `Sources/S3/Extensions/S3+Private.swift` and return the full updated file.
```swift
//
// S3+Private.swift
// S3
//
// Created by Ondrej Rafaj on 19/04/2018.
//
import Foundation
import Vapor
import HTTP
extension S3 {
/// Make an S3 re... | ```swift
import Foundation
import Vapor
import HTTP
extension S3 {
/// Make an S3 request
func make(request url: URL, method: HTTPMethod, headers: HTTPHeaders, data: Data? = nil, cachePolicy: URLRequest.CachePolicy = .useProtocolCachePolicy, on container: Container) throws -> Future<Response> {
va... | null | null |
Delete page using sf_admin styles
Apply this change to `modules/sfImagePoolAdmin/templates/deleteSuccess.php` and return the full updated file.
```php
<?php use_helper('ImagePool') ?>
<h2>Delete this image?</h2>
<?php echo pool_image_tag($image, '300') ?>
<p><?php echo $image['original_filename'] ?></p>
<?php if(c... | ```php
<?php use_helper('ImagePool') ?>
<div id="sf_admin_container">
<h1>Delete this image?</h1>
<div id="sf_admin_content">
<?php echo pool_image_tag($image, '300'); ?>
<p><?php echo $image['original_filename']; ?></p>
<?php if (count($models)): ?>
<h2 style="color:red !important;">Car... | null | null |
Add switch-target to embedded media and text following immediatly
Apply this change to `src/app/attribute-directives/tumblr-embedded-media.directive.ts` and return the full updated file.
```typescript
import {Directive, ElementRef, DoCheck} from '@angular/core';
@Directive({selector: '[tumblrEmbeddedMedia]'})
export... | ```typescript
import {Directive, ElementRef, DoCheck} from '@angular/core';
@Directive({selector: '[tumblrEmbeddedMedia]'})
export class TumblrEmbeddedMediaDirective implements DoCheck {
private el: ElementRef;
constructor(el: ElementRef) {
this.el = el;
}
ngDoCheck() {
const mediaEle... | null | null |
Add function to ensure the component always has a valid title
Apply this change to `app/src/ui/lib/avatar.tsx` and return the full updated file.
```typescript
import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonl... | ```typescript
import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonly title: string | null
}
const DefaultAvatarURL = 'https://github.com/hubot.png'
export class Avatar extends React.Component<IAvatarProps, void> ... | null | null |
Move item initialization into structure
Apply this change to `Peekazoo/Peekazoo/Core/Homepage/Service/WeasylHomepageFeed.swift` and return the full updated file.
```swift
// Copyright © 2017 Peekazoo. All rights reserved.
//
import Foundation
struct WeasylHomepageFeed: HomepageFeed {
struct WeasylHomepageItem... | ```swift
// Copyright © 2017 Peekazoo. All rights reserved.
//
import Foundation
struct WeasylHomepageFeed: HomepageFeed {
struct WeasylHomepageItem: HomepageItem {
var contentIdentifier: String
var title: String
fileprivate init?(jsonObject: [String : Any]) {
guard let tit... | null | null |
Remove sun setup for now
Apply this change to `test/teeminus10_helpers_test.py` and return the full updated file.
```python
from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetim... | ```python
from teeminus10_helpers import *
import unittest
class TestInTimeOfDay(unittest.TestCase):
def setUp(self):
self.location = ephem.city('London')
self.location.date = datetime(2013, 03, 14, 9, 0, 0)
self.pass_day_time = datetime(2013, 03, 14, 12, 0, 0)
self.pass_night_time ... | null | null |
Remove acknowledgement link to original feed detection code
It has changed significantly since then.
Apply this change to `lib/feed2email/feed_analyzer.rb` and return the full updated file.
```ruby
require 'feedzirra'
require 'feed2email/http_fetcher'
module Feed2Email
class FeedAnalyzer
def initialize(url)
... | ```ruby
require 'feedzirra'
require 'feed2email/http_fetcher'
module Feed2Email
class FeedAnalyzer
def initialize(url)
@url = url
end
def title
return unless response
Feedzirra::Feed.parse(response.body).title rescue nil
end
def type
return unless response
type_f... | null | null |
Remove requirement for sheet to be modal
Apply this change to `Eurofurence/Modules/Login/FormSheetLoginModuleProviding.swift` and return the full updated file.
```swift
import UIKit
struct FormSheetLoginModuleProviding: LoginModuleProviding {
var loginModuleProviding: LoginModuleProviding
func make... | ```swift
import UIKit
struct FormSheetLoginModuleProviding: LoginModuleProviding {
var loginModuleProviding: LoginModuleProviding
func makeLoginModule(_ delegate: LoginModuleDelegate) -> UIViewController {
let contentController = loginModuleProviding.makeLoginModule(delegate)
let navi... | null | null |
Tag increment and new keyword.
Apply this change to `setup.py` and return the full updated file.
```python
import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
... | ```python
import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'gis_metadat... | null | null |
Change Carthage aliases to have full command for visibility with explain
Apply this change to `.dotfiles/xcode/carthage.zsh` and return the full updated file.
```bash
#-------------------------------------------------------------------------------
#
# ios/carthage.zsh
# Carthage aliases
#
#---------------------------... | ```bash
#-------------------------------------------------------------------------------
#
# ios/carthage.zsh
# Carthage aliases
#
#-------------------------------------------------------------------------------
alias carthage-clean='rm -rf ~/Library/Caches/org.carthage.CarthageKit'
# Bootstrap
alias cbootios='carthag... | null | null |
Add Customer filter when listing CreditNote
Apply this change to `src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs` and return the full updated file.
```csharp
namespace Stripe
{
using Newtonsoft.Json;
public class CreditNoteListOptions : ListOptions
{
/// <summary>
/// ID of ... | ```csharp
namespace Stripe
{
using Newtonsoft.Json;
public class CreditNoteListOptions : ListOptions
{
/// <summary>
/// ID of the customer.
/// </summary>
[JsonProperty("customer")]
public string CustomerId { get; set; }
/// <summary>
/// ID of the ... | null | null |
Read credentials from the keyboard if the file is not found
Apply this change to `example/example.cpp` and return the full updated file.
```cpp
#include "../src/vault.h"
#include <fstream>
#include <iostream>
namespace
{
// Copy example/credentials.txt.example to example/credentials.txt and
// put your username an... | ```cpp
#include "../src/vault.h"
#include <fstream>
#include <iostream>
namespace
{
// Copy example/credentials.txt.example to example/credentials.txt and
// put your username and then password on the next line.
std::pair<std::string, std::string> read_credentials()
{
std::string username;
std::string passw... | null | null |
Add hero name edit textbox
Apply this change to `app/app.component.ts` and return the full updated file.
```typescript
import { Component } from '@angular/core';
export class Hero{
id:number;
name:string;
}
@Component({
selector: 'my-app',
template:`
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<... | ```typescript
import { Component } from '@angular/core';
export class Hero{
id:number;
name:string;
}
@Component({
selector: 'my-app',
template:`
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input value = "{{hero.name}... | null | null |
Add another polling command test.
Apply this change to `src/test/java/org/jenkinsci/plugins/visualworks_store/StoreSCMTest.java` and return the full updated file.
```java
package org.jenkinsci.plugins.visualworks_store;
import hudson.util.ArgumentListBuilder;
import org.junit.Test;
import java.util.Arrays;
import j... | ```java
package org.jenkinsci.plugins.visualworks_store;
import hudson.util.ArgumentListBuilder;
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class StoreSCMTest {
@Test
public void prepar... | null | null |
Fix deserialization of RegEx enabled properties
Fix type mismatch for RegEx (introduced in 6e50301 - my bad, sorry)
Apply this change to `app/Umbraco/Umbraco.Archetype/Models/ArchetypePreValueProperty.cs` and return the full updated file.
```csharp
using System;
using Newtonsoft.Json;
namespace Archetype.Models
{
... | ```csharp
using System;
using Newtonsoft.Json;
namespace Archetype.Models
{
public class ArchetypePreValueProperty
{
[JsonProperty("alias")]
public string Alias { get; set; }
[JsonProperty("remove")]
public bool Remove { get; set; }
[JsonProperty("collapse")]
... | null | null |
Add ability to display notifications without a project
Apply this change to `src/me/scana/okgradle/util/Notifier.kt` and return the full updated file.
```kotlin
package me.scana.okgradle.util
import com.intellij.notification.NotificationDisplayType
import com.intellij.notification.NotificationGroup
import com.intell... | ```kotlin
package me.scana.okgradle.util
import com.intellij.notification.NotificationDisplayType
import com.intellij.notification.NotificationGroup
import com.intellij.notification.NotificationType
import com.intellij.notification.Notifications
import com.intellij.openapi.application.ApplicationManager
import com.int... | null | null |
Use date as formatting type
Date is a formatting type instead of a real one. This seems to work.
Apply this change to `spec/definitions/invoice/index.js` and return the full updated file.
```javascript
'use strict';
module.exports = {
'required': [
'sender',
'receiver',
'items',
... | ```javascript
'use strict';
module.exports = {
'required': [
'sender',
'receiver',
'items',
'due',
'paymentDays'
],
'properties': {
'id': require('../id'),
'invoiceId': {
'type': 'number',
'description': 'Unique invoice id gen... | null | null |
Add bash completion for npm
Apply this change to `profile.d/nodejs.sh` and return the full updated file.
```bash
#!/bin/bash
function set_nodejs_env()
{
local NODEJS_PREFIX="/opt/nodejs"
for nodejs_root in $NODEJS_PREFIX/node-v*;do
local nodejs_bin_dir=$nodejs_root/bin
if [[ -x $nodejs_bin_dir/node ]] &... | ```bash
#!/bin/bash
function set_nodejs_env()
{
local NODEJS_PREFIX="/opt/nodejs"
for nodejs_root in $NODEJS_PREFIX/node-v*;do
local nodejs_bin_dir=$nodejs_root/bin
if [[ -x $nodejs_bin_dir/node ]];then
[[ $PATH != *$nodejs_bin_dir* ]] && export PATH=$nodejs_bin_dir:$PATH
type -P npm >/dev/nul... | null | null |
Switch imageunpacker/rpcd to lib/log/serverlogger package.
Apply this change to `imageunpacker/rpcd/api.go` and return the full updated file.
```go
package rpcd
import (
"github.com/Symantec/Dominator/imageunpacker/unpacker"
"github.com/Symantec/Dominator/lib/srpc"
"io"
"log"
"sync"
)
type srpcType struct {
u... | ```go
package rpcd
import (
"github.com/Symantec/Dominator/imageunpacker/unpacker"
"github.com/Symantec/Dominator/lib/log"
"github.com/Symantec/Dominator/lib/srpc"
"io"
"sync"
)
type srpcType struct {
unpacker *unpacker.Unpacker
logger log.Logger
addDeviceLock sync.Mutex
}
type htmlWriter srpcTyp... | null | null |
Add Neovim repository and package
Apply this change to `packages/apt.sh` and return the full updated file.
```bash
#!/usr/bin/bash
# Remove previously added repositories (to remain idempontent)
sudo rm -f /etc/apt/sources.list.d/*
## Repositories
# Adapta GTK theme
sudo apt-add-repository -y ppa:tista/adapta
# Pape... | ```bash
#!/usr/bin/bash
# Remove previously added repositories (to remain idempontent)
sudo rm -f /etc/apt/sources.list.d/*
## Repositories
# Adapta GTK theme
sudo apt-add-repository -y ppa:tista/adapta
# Paper icon theme
sudo apt-add-repository -y ppa:snwh/pulp
# Neovim editor
sudo add-apt-repository -y ppa:neovim-p... | null | null |
BAP-3040: Improve date conditions in filters
- fix error message
Apply this change to `src/Oro/Bundle/FilterBundle/Expression/Exception/ExpressionDenied.php` and return the full updated file.
```php
<?php
namespace Oro\Bundle\FilterBundle\Expression\Exception;
use Oro\Bundle\DataGridBundle\Exception\UserInputErr... | ```php
<?php
namespace Oro\Bundle\FilterBundle\Expression\Exception;
use Oro\Bundle\DataGridBundle\Exception\UserInputErrorExceptionInterface;
class ExpressionDenied extends SyntaxException implements UserInputErrorExceptionInterface
{
/** @var string */
private $template = 'Variable of type “%s” cannot be u... | null | null |
Update all tables of a SQL database
Apply this change to `install/update_v1-5_6.sql` and return the full updated file.
```sql
"#Update from 1.5 to 1.6 "
ALTER TABLE `projects_issues` ADD `duration` smallint(3) NOT NULL DEFAULT '100' AFTER `created_at`;
ALTER TABLE `projects` ADD `default_assignee` bigint(20) NULL DE... | ```sql
"#Update from 1.5 to 1.6 "
ALTER TABLE `projects_issues` ADD `duration` smallint(3) NOT NULL DEFAULT '100' AFTER `created_at`;
ALTER TABLE `projects` ADD `default_assignee` bigint(20) NULL DEFAULT '1';
ALTER TABLE `Issues Table` ADD `weight` bigint(20) NULL default '1';
ALTER TABLE `projects_issues`
CHANGE `cr... | null | null |
Fix hover state for return label (closes ARE-466)
Apply this change to `src/v2/components/TopBar/components/AdvancedPrimarySearch/components/AdvancedSearchReturnLabel/index.tsx` and return the full updated file.
```typescript
import React from 'react'
import { Link } from 'react-router-dom'
import styled from 'styled... | ```typescript
import React from 'react'
import { Link } from 'react-router-dom'
import styled from 'styled-components'
import { mixin as boxMixin } from 'v2/components/UI/Box'
import Text from 'v2/components/UI/Text'
const Label = styled(Text).attrs({
color: 'gray.medium',
})`
display: inline;
`
const Container ... | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.