original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
CHANGE devtools example for previewWrapper Apply this change to `dev-kits/addon-preview-wrapper/src/register.tsx` and return the full updated file. ```typescript import React, { FunctionComponent } from 'react'; import { addons, types } from '@storybook/addons'; import { ADDON_ID } from './constants'; const PreviewW...
```typescript import React, { FunctionComponent } from 'react'; import { addons, types } from '@storybook/addons'; import { ADDON_ID } from './constants'; const PreviewWrapper: FunctionComponent<{}> = p => ( <div style={{ width: '100%', height: '100%', boxSizing: 'border-box', boxShadow: ...
null
null
Add cache resource provider to toolbox Apply this change to `src/Ob_Ivan/DropboxProxy/ToolboxFactory.php` and return the full updated file. ```php <?php namespace Ob_Ivan\DropboxProxy; use Ob_Ivan\DropboxProxy\ResourceProvider\DropboxResourceProvider; use Ob_Ivan\ResourceContainer\ResourceContainer; class ToolboxFa...
```php <?php namespace Ob_Ivan\DropboxProxy; use Ob_Ivan\DropboxProxy\ResourceProvider\CacheResourceProvider; use Ob_Ivan\DropboxProxy\ResourceProvider\DropboxResourceProvider; use Ob_Ivan\ResourceContainer\ResourceContainer; class ToolboxFactory { /** * TODO: Replace $storagePath argument with a substitutio...
null
null
Fix missing container runtime on upgrade Signed-off-by: Kenfe-Mickael Laventure <10e26728841e39109c2809b6029d4b0763bd81d3@gmail.com> (cherry picked from commit d7ceda4e375250e6868854cca96c49a369503745) Apply this change to `daemon/start_linux.go` and return the full updated file. ```go package daemon import ( "fmt...
```go package daemon import ( "fmt" "github.com/docker/docker/container" "github.com/docker/docker/libcontainerd" "github.com/docker/engine-api/types" ) func (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Container) (*[]libcontainerd.CreateOption, error) { createOptions := []libcontainerd.C...
null
null
Update GDAXProductTicker obj name from bitstampTicker to gdaxTicker Looks to be a copy paste mistake. Updated the name to reference gdax as opposed to bitstamp in this gdax example. Apply this change to `xchange-examples/src/main/java/org/knowm/xchange/examples/gdax/GDAXTickerDemo.java` and return the full updated fi...
```java package org.knowm.xchange.examples.gdax; import java.io.IOException; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeFactory; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.gdax.GDAXExchange; import org.knowm.xchange...
null
null
Update test to set state on change Apply this change to `types/react-radio-group/react-radio-group-tests.tsx` and return the full updated file. ```typescript import * as React from 'react'; import { Radio, RadioGroup } from "react-radio-group"; class ReactRadioGroup extends React.Component<RadioGroup.RadioGroupProps...
```typescript import * as React from 'react'; import { Radio, RadioGroup } from "react-radio-group"; class ReactRadioGroup extends React.Component<RadioGroup.RadioGroupProps, { selectedValue: React.InputHTMLAttributes<HTMLInputElement>['value'] }> { state = { selectedValue: 2, }; handleChange: Rad...
null
null
Add a missing call for `fallbackHandler` Former-commit-id: a1ce94b39d326657cdbce34276477c34752f0000 Apply this change to `_examples/routing/fallback-handlers/main.go` and return the full updated file. ```go package main import ( "github.com/kataras/iris" ) func main() { app := iris.New() // this works as exp...
```go package main import ( "github.com/kataras/iris" ) func main() { app := iris.New() // add a fallback handler to process requests that would not be declared in the router. app.Fallback(fallbackHandler) // this works as expected now, // will handle *all* expect DELETE requests, even if there is no routes ...
null
null
Use the CAPI_DEVICE_PATH property in blockmap tests Apply this change to `src/java/blockmap/test/com/ibm/research/blockmap/CapiTestSupport.java` and return the full updated file. ```java /* IBM_PROLOG_BEGIN_TAG * This is an automatically generated prolog. * * $Source: src/java/test/blockmap/com/ibm/research/blockm...
```java /* IBM_PROLOG_BEGIN_TAG * This is an automatically generated prolog. * * $Source: src/java/test/blockmap/com/ibm/research/blockmap/CapiTestSupport.java $ * * IBM Data Engine for NoSQL - Power Systems Edition User Library Project * * Contributors Listed Below - COPYRIGHT 2015,2016,2017 * [+] Internationa...
null
null
Work on a function to get the poem IRI from the poem title (first step). Apply this change to `src/client/app/statisch/werkliste-unselbst.component.ts` and return the full updated file. ```typescript /** * Created by Roberta Padlina (roberta.padlina@unibas.ch) on 27/10/17. */ import { Component } from '@angular/co...
```typescript /** * Created by Roberta Padlina (roberta.padlina@unibas.ch) on 27/10/17. */ import { Component } from '@angular/core'; import { Http, Response } from '@angular/http'; import { globalSearchVariableService } from '../suche/globalSearchVariablesService'; @Component({ moduleId: module.id, selector: '...
null
null
Correct syntax while creating indexes Change-Id: I90625647d8723531dbc7498d5d25e84ef1a3ed2b Reviewed-on: http://review.couchbase.org/50007 Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com> Reviewed-by: Michael Wiederhold <a17fed27eaa842282862ff7c1b9c8395a26ac320@couchbase.com> Apply this cha...
```python INDEX_STATEMENTS = { 'basic': ( 'CREATE INDEX by_city ON `{}` (city.f.f)', 'CREATE INDEX by_county ON `{}` (county.f.f)', 'CREATE INDEX by_realm ON `{}` (`realm.f`)', ), 'range': ( 'CREATE INDEX by_coins ON `{}` (coins.f)', 'CREATE INDEX by_achievement ON `{...
null
null
Update NodeDOMTreeConstruction to match arg signature of `insertHTMLBefore`. The signature was changed in a recent refactor, but since the node tests were not running this was not caught during that refactors CI. Apply this change to `packages/@glimmer/node/lib/node-dom-helper.ts` and return the full updated file. `...
```typescript import * as SimpleDOM from 'simple-dom'; import { DOMTreeConstruction, Bounds, Simple, ConcreteBounds } from '@glimmer/runtime'; export default class NodeDOMTreeConstruction extends DOMTreeConstruction { protected document: SimpleDOM.Document; constructor(doc: Simple.Document) { super(doc); } ...
null
null
Implement IntoSV for Option<T: IntoSV> Apply this change to `src/convert.rs` and return the full updated file. ```rust //! Traits for converting to and from Perl scalars. use std::fmt::Display; use raw; use SV; /// Fast unsafe conversion from raw SV pointer. pub trait FromSV { /// Perform the conversion. un...
```rust //! Traits for converting to and from Perl scalars. use std::fmt::Display; use raw; use SV; /// Fast unsafe conversion from raw SV pointer. pub trait FromSV { /// Perform the conversion. unsafe fn from_sv(pthx: raw::Interpreter, raw: *mut raw::SV) -> Self; } /// Construct new `SV` from `self`. pub tr...
null
null
Use double-quotes on all lines Apply this change to `Formula/p0f.rb` and return the full updated file. ```ruby require 'formula' class P0f < Formula homepage 'http://lcamtuf.coredump.cx/p0f3/' url 'http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.07b.tgz' sha1 'ae2c4fbcddf2a5ced33abd81992405b93207e7c8' def in...
```ruby require "formula" class P0f < Formula homepage "http://lcamtuf.coredump.cx/p0f3/" url "http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.07b.tgz" sha1 "ae2c4fbcddf2a5ced33abd81992405b93207e7c8" def install inreplace "config.h", "p0f.fp", "#{etc}/p0f/p0f.fp" system "./build.sh" sbin.install "p...
null
null
Install jq for working with json files Apply this change to `scripts/homebrew.sh` and return the full updated file. ```bash #!/bin/sh homebrew=$HOME/homebrew brewbin=$homebrew/bin git clone http://github.com/Homebrew/homebrew $homebrew symlink () { local src="$1" dest="$2" test -h "$dest" || \ ln -s "$src"...
```bash #!/bin/sh homebrew=$HOME/homebrew brewbin=$homebrew/bin git clone http://github.com/Homebrew/homebrew $homebrew symlink () { local src="$1" dest="$2" test -h "$dest" || \ ln -s "$src" "$dest" } brew install coreutils brew install gawk # gawk installs awk symlink # Get version 2+. brew install git ...
null
null
Fix bug causing audio to not toggle. Apply this change to `src/reducers/audioSettings.ts` and return the full updated file. ```typescript import { ChangeVolume, ToggleAudioEnabled } from '../actions/audio'; import { AudioSettings } from '../types'; import { CHANGE_VOLUME, TOGGLE_AUDIO_ENABLED } from '../constants';...
```typescript import { ChangeVolume, ToggleAudioEnabled } from '../actions/audio'; import { AudioSettings } from '../types'; import { CHANGE_VOLUME, TOGGLE_AUDIO_ENABLED } from '../constants'; const initial: AudioSettings = { enabled: true, volume: 0.1 }; type AudioAction = ChangeVolume | ToggleAudioEnab...
null
null
Add clean before creating docker image for ci Apply this change to `build-ci.sh` and return the full updated file. ```bash #!/bin/sh set -e -x team_repo=$GOPATH/src/github.bus.zalan.do/acid project_dir=$team_repo/postgres-operator mkdir -p $team_repo ln -s $PWD $project_dir cd $project_dir glide install make dock...
```bash #!/bin/sh set -e -x team_repo=$GOPATH/src/github.bus.zalan.do/acid project_dir=$team_repo/postgres-operator mkdir -p $team_repo ln -s $PWD $project_dir cd $project_dir glide install make clean docker push ```
null
null
Add close button to button test dialog Apply this change to `examples/button_test.rs` and return the full updated file. ```rust extern crate kiss_ui; use kiss_ui::button::Button; use kiss_ui::container::Horizontal; use kiss_ui::callback::OnClick; use kiss_ui::dialog::Dialog; use kiss_ui::text::Label; fn main() { ...
```rust extern crate kiss_ui; use kiss_ui::button::Button; use kiss_ui::container::Horizontal; use kiss_ui::callback::{OnClick, CallbackStatus}; use kiss_ui::dialog::Dialog; use kiss_ui::text::Label; fn main() { kiss_ui::show_gui(|| Dialog::new(Horizontal::new(|builder|{ builder.add_child( ...
null
null
Update the versioning for macOS Big Sur Apply this change to `csrc/uname.c` and return the full updated file. ```c #include <sys/utsname.h> #include <wchar.h> #include <stdlib.h> #define OS_VERSION_MAX_SIZE 128 wchar_t* getOS() { struct utsname system_info; if (uname(&system_info) != 0) return NULL; wchar_t...
```c #include <sys/utsname.h> #include <wchar.h> #include <stdlib.h> #define OS_VERSION_MAX_SIZE 128 wchar_t* getOS() { struct utsname system_info; if (uname(&system_info) != 0) return NULL; wchar_t* os = malloc(sizeof(os) * OS_VERSION_MAX_SIZE); #ifdef __APPLE__ int major_version = atoi(system_info.release...
null
null
Remove problematic not tool from the equation toolbar; \not is used in conjunction with other commands such as \equiv or \infty. Mathquill however does not support this and changes \not to \neg. Apply this change to `app/latexCommands.js` and return the full updated file. ```javascript module.exports = [ { actio...
```javascript module.exports = [ { action: '\\sqrt', label: '\\sqrt{X}' }, { action: '^', label: 'x^{X}' }, { action: '\\frac', label: '\\frac{X}{X}' }, { action: '\\int', label: '\\int_{X}^{X}' }, { action: '\\lim_', label: '\\lim_{X}' }, { action: '\\overrightarrow', label: '\\overrightarrow{X...
null
null
Return local server time on request Apply this change to `src/main.c` and return the full updated file. ```c #include <stdlib.h> #include <event2/event.h> #include <event2/http.h> static void time_request_cb(struct evhttp_request *req, void *arg) { (void) arg; printf("Received request for %s\n", evhttp_requ...
```c #include <stdlib.h> #include <time.h> #include <event2/buffer.h> #include <event2/event.h> #include <event2/http.h> static void time_request_cb(struct evhttp_request *req, void *arg) { (void) arg; struct evbuffer *evb = evbuffer_new(); printf("Received request for %s\n", evhttp_request_get_uri(req))...
null
null
Update spinner's binding adapter name Apply this change to `droidbox/src/main/java/com/github/jackparisi/droidbox/binding/SpinnerAdapters.kt` and return the full updated file. ```kotlin package com.github.jackparisi.droidbox.binding import android.databinding.BindingAdapter import android.widget.ListPopupWindow impo...
```kotlin package com.github.jackparisi.droidbox.binding import android.databinding.BindingAdapter import android.widget.ListPopupWindow import android.widget.Spinner import com.github.jackparisi.droidbox.utility.dpToPx /** * Created by Giacomo Parisi on 21/08/17. * https://github.com/JackParisi */ /** * * Set ...
null
null
Adjust test to new API Apply this change to `tests/sanity.rs` and return the full updated file. ```rust extern crate pandoc; use std::path::PathBuf; #[test] fn creation() { use pandoc::PandocOption::*; use pandoc::OutputKind; let mut pandoc = pandoc::new(); pandoc.add_input("cake"); pandoc.set_...
```rust extern crate pandoc; use std::path::PathBuf; #[test] fn creation() { use pandoc::PandocOption::*; use pandoc::OutputKind; let mut pandoc = pandoc::new(); pandoc.add_input("cake"); pandoc.set_output(OutputKind::File(String::from("lie"))); pandoc.set_chapters(); pandoc.set_number_se...
null
null
Upgrade ACTPrinter for Mac.app to v3.2.2 Apply this change to `Casks/actprinter.rb` and return the full updated file. ```ruby cask :v1 => 'actprinter' do version '3.2.1' sha256 '979768faafd99b5714d3397ef7dd29ff085b3f7c7aac59ea6c96c4f15f0ceb6d' # actprinter.com is the official download host per the vendor homep...
```ruby cask :v1 => 'actprinter' do version '3.2.2' sha256 '6e49ac75f8a660e33b3f0d3033bf9788cfeef5a0838faad93f06b21af0efb2ee' # actprinter.com is the official download host per the vendor homepage url "http://www.actprinter.com/mac/ACTPrinter%20for%20Mac%20#{version}.zip" name 'ACTPrinter' appcast 'http://...
null
null
Order dependency error types alphabetically Apply this change to `Conche/DependencyResolverError.swift` and return the full updated file. ```swift public enum DependencyResolverError : ErrorType, Equatable, CustomStringConvertible { case NoSuchDependency(Dependency) case CircularDependency(DependencyGraph) case...
```swift public enum DependencyResolverError : ErrorType, Equatable, CustomStringConvertible { case CircularDependency(DependencyGraph) case Conflict(String, requiredBy: [Dependency]) case NoSuchDependency(Dependency) public var description: String { switch self { case .CircularDependency(let graph): ...
null
null
Add "equal to" operator to Vector3 Apply this change to `nwn2mdk-lib/cgmath.h` and return the full updated file. ```c #pragma once template <typename T> class Vector3 { public: T x, y, z; Vector3(T x, T y, T z) { this->x = x; this->y = y; this->z = z; } Vector3() : Vector3(0, 0, 0) { } T &operator[]...
```c #pragma once template <typename T> class Vector3 { public: T x, y, z; Vector3(T x, T y, T z) { this->x = x; this->y = y; this->z = z; } Vector3() : Vector3(0, 0, 0) { } T &operator[](unsigned i) { return (&x)[i]; } bool operator==(const Vector3 &v) const { return x == v.x && y == v.y && ...
null
null
Add BitByteData as a dependency of swift package Apply this change to `Package.swift` and return the full updated file. ```swift // swift-tools-version:4.0 import PackageDescription let package = Package( name: "SWCompression", products: [ .library( name: "SWCompression", targ...
```swift // swift-tools-version:4.0 import PackageDescription let package = Package( name: "SWCompression", products: [ .library( name: "SWCompression", targets: ["SWCompression"]) ], dependencies: [ // SWCOMP: Uncomment the line below to build swcomp example pro...
null
null
Refactor subcommands into individual functions Apply this change to `spam/main.swift` and return the full updated file. ```swift let path = "example.swift" if let streamReader = StreamReader(path: path) { if let line = streamReader.nextLine() { if let repository = repo(line) { mkdir(".spam") ...
```swift // MARK: main function func main(repository: String) { if contains(Process.arguments, "install") { install(repository) } else if contains(Process.arguments, "uninstall") { uninstall() } else { usage() } } // MARK: subcommands func install(repository: String) { mkd...
null
null
Send the "* BYE Logging out" before closing mailbox. --HG-- branch : HEAD Apply this change to `src/imap/cmd-logout.c` and return the full updated file. ```c /* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_logout(struct client *client) { client_send_line(client, "* BYE Log...
```c /* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_logout(struct client *client) { client_send_line(client, "* BYE Logging out"); o_stream_uncork(client->output); if (client->mailbox != NULL) { /* this could be done at client_disconnect() as well, but eg. mbox rew...
null
null
Add support for image trust commands Apply this change to `ipxe/local/general.h` and return the full updated file. ```c #define DIGEST_CMD /* Image crypto digest commands */ #define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ #define IMAGE_COMBOOT /* COMBOOT */ #define NET_...
```c #define DIGEST_CMD /* Image crypto digest commands */ #define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ #define IMAGE_COMBOOT /* COMBOOT */ #define IMAGE_TRUST_CMD /* Image trust management commands */ #define NET_PROTO_IPV6 /* IPv6 protocol */ #define VLA...
null
null
Define M_PI instead of CAL_PI Apply this change to `src/math.h` and return the full updated file. ```c #ifndef G_EBKLRON9896QUFJSD3FNA40IITV3F #define G_EBKLRON9896QUFJSD3FNA40IITV3F #ifdef __cplusplus extern "C" { #endif /*@self.public()*/ static const double CAL_PI = 3.141592653589793238462643383279502884197169399...
```c #ifndef G_EBKLRON9896QUFJSD3FNA40IITV3F #define G_EBKLRON9896QUFJSD3FNA40IITV3F #ifdef __cplusplus extern "C" { #endif /*@self.public()*/ #ifndef M_PI #define M_PI 3.141592653589793238462643383279502884197169399375 #endif #ifdef __cplusplus } #endif #endif ```
null
null
FreeBSD: Use quotes around hostname in rc.conf Use double quotes around the hostname value in /etc/rc.conf Apply this change to `plugins/guests/freebsd/cap/change_host_name.rb` and return the full updated file. ```ruby module VagrantPlugins module GuestFreeBSD module Cap class ChangeHostName def ...
```ruby module VagrantPlugins module GuestFreeBSD module Cap class ChangeHostName def self.change_host_name(machine, name) if !machine.communicate.test("hostname -f | grep '^#{name}$' || hostname -s | grep '^#{name}$'", {shell: "sh"}) machine.communicate.sudo("sed -i '' 's/^hos...
null
null
Truncate activity log table before altering it Apply this change to `upgrade/includes/311to320.sql` and return the full updated file. ```sql UPDATE `settings` SET `cmumversion`='3.2.0', `dbversion`='3.2.0' WHERE `id`=1; ALTER TABLE `groups` ADD `enabled` tinyint(1) NULL DEFAULT '1' AFTER `comment`; ALTER TABLE `setti...
```sql UPDATE `settings` SET `cmumversion`='3.2.0', `dbversion`='3.2.0' WHERE `id`=1; ALTER TABLE `groups` ADD `enabled` tinyint(1) NULL DEFAULT '1' AFTER `comment`; ALTER TABLE `settings` DROP `dbversion`; ALTER TABLE `settings` ADD `autoupdcheck` TINYINT(1) NULL AFTER `soonexpusrorder`; UPDATE `settings` SET `autoupd...
null
null
Fix bug with account additions using old Entity API Apply this change to `awsom/__init__.py` and return the full updated file. ```python #!/usr/bin/python from awsom.entity import Entity, Factory from awsom.config import AccountEntity, config class ModelRootFactory(Factory): def __init__(self, entity): s...
```python #!/usr/bin/python from awsom.entity import Entity, Factory from awsom.config import AccountEntity, config class ModelRootFactory(Factory): def __init__(self, entity): super(ModelRootFactory, self).__init__(entity) def populate(self): # Attach all configuration-defined accounts as chil...
null
null
Use context from std lib. Apply this change to `main.go` and return the full updated file. ```go package main import ( "github.com/Sirupsen/logrus" "github.com/verath/archipelago/lib" "golang.org/x/net/context" "os" "os/signal" ) func main() { log := logrus.New() log.Level = logrus.DebugLevel log.Formatter ...
```go package main import ( "github.com/Sirupsen/logrus" "github.com/verath/archipelago/lib" "os" "os/signal" "context" ) func main() { log := logrus.New() log.Level = logrus.DebugLevel log.Formatter = &logrus.TextFormatter{} ctx, halt := context.WithCancel(context.Background()) // Listen for interrupts ...
null
null
Prepare for next development iteration Apply this change to `NModbus4/Properties/AssemblyInfo.cs` and return the full updated file. ```csharp using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("NModbus4")] [assembly: Asse...
```csharp using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("NModbus4")] [assembly: AssemblyProduct("NModbus4")] [assembly: AssemblyCompany("Maxwe11")] [assembly: AssemblyCopyright("Licensed under MIT License.")] [assem...
null
null
Add tests for Word class. Apply this change to `src/test/java/com/tyleryates/util/WordTest.java` and return the full updated file. ```java package com.tyleryates.util; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @SuppressWar...
```java package com.tyleryates.util; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @SuppressWarnings("JavaDoc") public...
null
null
Add a new function to know if a pathdir represents the path of a git repository Apply this change to `utils/utils.go` and return the full updated file. ```go package utils import ( "os" "os/user" ) /*GetUserHomeDir returns the home directory of the current user. */ func GetUserHomeDir() string { usr, err := use...
```go package utils import ( "os" "os/user" "path/filepath" "github.com/k0pernicus/goyave/consts" ) /*IsGitRepository returns if the path, given as an argument, is a git repository or not. *This function returns a boolean value: true if the pathdir pointed to a git repository, else false. */ func IsGitReposito...
null
null
Improve existing methods, add new ones for packing longs Apply this change to `src/org/bouncycastle/crypto/util/Pack.java` and return the full updated file. ```java package org.bouncycastle.crypto.util; public abstract class Pack { public static int bigEndianToInt(byte[] bs, int off) { int n = bs[off...
```java package org.bouncycastle.crypto.util; public abstract class Pack { public static int bigEndianToInt(byte[] bs, int off) { int n = bs[ off] << 24; n |= (bs[++off] & 0xff) << 16; n |= (bs[++off] & 0xff) << 8; n |= (bs[++off] & 0xff); return n; } public st...
null
null
Correct root resource link to real order_book route Apply this change to `src/github.com/stellar/go-horizon/actions_root.go` and return the full updated file. ```go package horizon import ( "net/http" "github.com/jagregory/halgo" "github.com/stellar/go-horizon/render/hal" ) // RootResource is the initial map of...
```go package horizon import ( "net/http" "github.com/jagregory/halgo" "github.com/stellar/go-horizon/render/hal" ) // RootResource is the initial map of links into the api. type RootResource struct { halgo.Links } var globalRootResource = RootResource{ Links: halgo.Links{}. Self("/"). Link("account", "/ac...
null
null
Add additional test case for package versions Apply this change to `Rant.Tests/PackageVersions.cs` and return the full updated file. ```csharp using NUnit.Framework; using Rant.Resources; namespace Rant.Tests { [TestFixture] public class PackageVersions { [TestCase("1.2.5", "1.2.4", true)] [TestCase("0.2.5"...
```csharp using NUnit.Framework; using Rant.Resources; namespace Rant.Tests { [TestFixture] public class PackageVersions { [TestCase("1.2.5", "1.2.4", true)] [TestCase("0.2.5", "0.2.4", true)] [TestCase("0.0.3", "0.0.4", false)] [TestCase("0.3.1", "0.4.0", false)] public void VersionGreaterThan(string v...
null
null
build: Use only one job for building Apply this change to `ipa-fun-build.sh` and return the full updated file. ```bash #! /bin/bash ############################################################################## # Author: Tomas Babej <tbabej@redhat.com> # # Builds the FreeIPA rpms from sources. # Removes everything f...
```bash #! /bin/bash ############################################################################## # Author: Tomas Babej <tbabej@redhat.com> # # Builds the FreeIPA rpms from sources. # Removes everything from the $DIST_DIR and moves newly built RPMs there # # Usage: $0 # Returns: 0 on success, 1 on failure ##########...
null
null
Add handling of image loading error. Apply this change to `Mechanism/Texture.ts` and return the full updated file. ```typescript class Texture { source: HTMLImageElement; constructor(source: HTMLImageElement = undefined) { this.source = source; } static fromImage(url: string): Texture { ...
```typescript class Texture { source: HTMLImageElement; constructor(source: HTMLImageElement = undefined) { this.source = source; } static fromImage(url: string): Texture { const image = new Image(); const texture = new Texture(image); image.src = url; image.one...
null
null
Make the namespace uniform accross the project Apply this change to `table.cs` and return the full updated file. ```csharp using System; namespace Table { public class Table { public int Width; public int Spacing; public Table(int width, int spacing) { Width = width; Spacing = spacing; ...
```csharp using System; namespace Hangman { public class Table { public int Width; public int Spacing; public Table(int width, int spacing) { Width = width; Spacing = spacing; } } } ```
null
null
Change EEPROM write() to update() Apply this change to `src/audio/audio.cpp` and return the full updated file. ```cpp #include "Arduboy.h" #include "audio.h" bool ArduboyAudio::audio_enabled = false; void ArduboyAudio::on() { audio_enabled = true; } bool ArduboyAudio::enabled() { return audio_enabled; } void ...
```cpp #include "Arduboy.h" #include "audio.h" bool ArduboyAudio::audio_enabled = false; void ArduboyAudio::on() { audio_enabled = true; } bool ArduboyAudio::enabled() { return audio_enabled; } void ArduboyAudio::off() { audio_enabled = false; } void ArduboyAudio::saveOnOff() { EEPROM.update(EEPROM_AUDIO_O...
null
null
Allow to use value as closure. Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com> Apply this change to `src/helpers.php` and return the full updated file. ```php <?php if (! function_exists('messages')) { /** * Add a message to the bag. * * @param string $key * @...
```php <?php if (! function_exists('messages')) { /** * Add a message to the bag. * * @param string $key * @param string $message * * @return \Orchestra\Messages\MessageBag */ function messages($key, $message) { return app('orchestra.messages')->add($key, valu...
null
null
:+1: Make RxComamnd canExecute true as default Apply this change to `library/src/main/kotlin/com/wada811/rxviewmodel/commands/RxCommand.kt` and return the full updated file. ```kotlin package com.wada811.rxviewmodel.commands import android.databinding.ObservableBoolean import io.reactivex.Flowable import io.reactive...
```kotlin package com.wada811.rxviewmodel.commands import android.databinding.ObservableBoolean import io.reactivex.Flowable import io.reactivex.Observable import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.Disposable import io.reactivex.processors.FlowableProcessor import io.reactivex...
null
null
Add more info regarding internal classes. Apply this change to `log4j-api/src/main/java/org/apache/logging/log4j/util/package-info.java` and return the full updated file. ```java /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed...
```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"); y...
null
null
Add NVRTC to Warp's dependencies Apply this change to `Package.swift` and return the full updated file. ```swift import PackageDescription let package = Package( name: "CUDA", targets: [ Target(name: "CUDADriver"), Target(name: "CUDARuntime", dependencies: [ "CUDADriver" ]), Target(na...
```swift import PackageDescription let package = Package( name: "CUDA", targets: [ Target(name: "CUDADriver"), Target(name: "CUDARuntime", dependencies: [ "CUDADriver" ]), Target(name: "NVRTC", dependencies: [ "CUDADriver" ]), Target(name: "CuBLAS", dependencies: [ "CUDADriver",...
null
null
Improve code quality by change '==' into '===' Apply this change to `lib/profile.js` and return the full updated file. ```javascript /** * Parse profile. * * @param {Object|String} json * @return {Object} * @api private */ exports.parse = function(json) { if ('string' == typeof json) { json = JSON.parse(j...
```javascript /** * Parse profile. * * @param {Object|String} json * @return {Object} * @api private */ exports.parse = function(json) { if ('string' === typeof json) { json = JSON.parse(json); } var profile = {}; profile.id = json.iupi; profile.email = json.email; return profile; }; ```
null
null
Fix wrong import / remove console log Apply this change to `front/src/app/shared/base.service.ts` and return the full updated file. ```typescript import { Injectable } from '@angular/core'; import { Error } from './error/error'; import { Observable } from 'rxjs/Observable'; import { environment } from '../../environm...
```typescript import { Injectable } from '@angular/core'; import { Error } from './error/error'; import { Observable } from 'rxjs/Observable'; import { environment } from '../../environments/environment'; import { HttpErrorResponse } from '@angular/common/http'; import 'rxjs/add/operator/map'; import 'rxjs/add/operato...
null
null
Index size added to i4:invalid indexes report Apply this change to `sql/i4_invalid_indexes.sql` and return the full updated file. ```sql -- List of invalid indexes -- Use it to see invalid indexes list -- This query doesn't need any additional extensions to be installed -- (except plpgsql), and doesn't create anyth...
```sql -- List of invalid indexes -- Use it to see invalid indexes list -- This query doesn't need any additional extensions to be installed -- (except plpgsql), and doesn't create anything (like views or smth) -- -- so feel free to use it in your clouds (Heroku, AWS RDS, etc) -- (Keep in mind, that on replicas, the...
null
null
SR: Refactor the tests in the LogoutHandler slightly. Apply this change to `src/Voter.Tests/Api/Users/Handlers/LogoutHandlerTests.cs` and return the full updated file. ```csharp using DavidLievrouw.Utils.ForTesting.DotNet; using DavidLievrouw.Voter.Api.Users.Models; using DavidLievrouw.Voter.Security; using FakeItEa...
```csharp using DavidLievrouw.Utils.ForTesting.DotNet; using DavidLievrouw.Voter.Api.Users.Models; using DavidLievrouw.Voter.Security; using FakeItEasy; using NUnit.Framework; namespace DavidLievrouw.Voter.Api.Users.Handlers { [TestFixture] public class LogoutHandlerTests { LogoutHandler _sut; [SetUp] ...
null
null
Revert "Fix error on creating test schema for MySQL" This reverts commit cafeb47c80c3affa415c059fd6fe3099538cbfc6. Apply this change to `testdata/schema/mysql.sql` and return the full updated file. ```sql DROP TABLE IF EXISTS comments; DROP TABLE IF EXISTS posts_tags; DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS...
```sql DROP TABLE IF EXISTS comments; DROP TABLE IF EXISTS posts_tags; DROP TABLE IF EXISTS posts; DROP TABLE IF EXISTS tags; CREATE TABLE posts ( id INT PRIMARY KEY AUTO_INCREMENT ,title VARCHAR(255) NOT NULL ,content TEXT NOT NULL ,created_at TIMESTAMP NOT NULL ,updated_at TIMESTAMP NOT NULL ); CREATE TABLE ta...
null
null
Add 1 to row and column, since the numbers are 0-based and the Eclipse editor shows 1-based Apply this change to `org.metaborg.core/src/main/java/org/metaborg/core/tracing/Resolution.java` and return the full updated file. ```java package org.metaborg.core.tracing; import javax.annotation.Nullable; import org.metab...
```java package org.metaborg.core.tracing; import javax.annotation.Nullable; import org.metaborg.core.source.ISourceLocation; import org.metaborg.core.source.ISourceRegion; /** * Represents a resolution produced by reference resolution. */ public class Resolution { /** * Area in the source file to highlig...
null
null
Correct a small bug in the SQL which caused the creation of the function to fail Apply this change to `sql/geo_distance.sql` and return the full updated file. ```sql DROP FUNCTION IF EXISTS geo_distance; DELIMITER $$ CREATE FUNCTION geo_distance (lat1 double, long1 double, lat2 double, long2 double) RETURNS doub...
```sql DROP FUNCTION IF EXISTS geo_distance; DELIMITER $$ CREATE FUNCTION geo_distance (lat1 double, long1 double, lat2 double, long2 double) RETURNS double DETERMINISTIC BEGIN DECLARE pt1 POINT; DECLARE pt2 POINT; DECLARE dist DOUBLE; SET pt1 = POINT(long1, lat1); SET pt2 = POINT(long2, lat2); SET di...
null
null
Check if best move in transposition table is valid Apply this change to `search/src/transposition_table.rs` and return the full updated file. ```rust use game::{Position, Move, ZobristHash, NumPlies}; use negamax::Bound; #[derive(Clone, Debug)] pub struct Data { pub hash: ZobristHash, pub depth: NumPlies, ...
```rust use game::{Position, Move, ZobristHash, NumPlies}; use negamax::Bound; #[derive(Clone, Debug)] pub struct Data { pub hash: ZobristHash, pub depth: NumPlies, pub bound: Bound, pub best_move_opt: Option<Move>, } pub struct TranspositionTable(Vec<Option<Data>>); impl TranspositionTable { pub...
null
null
Change seed generation using MINSTD Apply this change to `code/ranlux32.cpp` and return the full updated file. ```cpp /* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), p...
```cpp /* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint seed_num) { ...
null
null
Add separator before action item in tool bar Apply this change to `Src/Roflcopter.Plugin/TodoItems/TodoItemsCountDummyAction.cs` and return the full updated file. ```csharp using System.Linq; using JetBrains.ActionManagement; using JetBrains.Annotations; using JetBrains.Application.DataContext; using JetBrains.ReShar...
```csharp using System.Linq; using JetBrains.ActionManagement; using JetBrains.Annotations; using JetBrains.Application.DataContext; using JetBrains.ReSharper.Features.Inspections.Actions; using JetBrains.UI.ActionsRevised; namespace Roflcopter.Plugin.TodoItems { [ActionGroup(nameof(TodoItemsCountDummyActionGroup)...
null
null
Add testing of close event Apply this change to `test/server-test.js` and return the full updated file. ```javascript /* jshint mocha: true */ 'use strict'; var assert = require('assert'); var http = require('http'); var bowerBrowser = require('../lib/'); describe('Server', function () { this.timeout(10000); ...
```javascript /* jshint mocha: true */ 'use strict'; var assert = require('assert'); var http = require('http'); var _ = require('lodash'); var bowerBrowser = require('../lib/'); var baseOptions = { path: 'test/fixtures', open: false, silent: true }; describe('Server', function () { this.timeout(10000); ...
null
null
Make Snapshot() actually check for an existing destination as documented. Apply this change to `btrfs.go` and return the full updated file. ```go package main import ( "os" "os/exec" ) const ( // BtrfsCommand is the name of the btrfs command-line tool binary. BtrfsCommand = "btrfs" ) // Snapshot creates a Btrf...
```go package main import ( "fmt" "os" "os/exec" ) const ( // BtrfsCommand is the name of the btrfs command-line tool binary. BtrfsCommand = "btrfs" ) // Snapshot creates a Btrfs snapshot of src at dst, optionally making // it writable. If dst already exists, the snapshot is not created and // an error is retur...
null
null
Add unavailability annotations for renamed protocols Apply this change to `Sources/UnavailableItems.swift` and return the full updated file. ```swift // // UnavailableItems.swift // Swinject // // Created by Yoichi Tagaya on 11/30/16. // Copyright © 2016 Swinject Contributors. All rights reserved. // // MARK: Fo...
```swift // // UnavailableItems.swift // Swinject // // Created by Yoichi Tagaya on 11/30/16. // Copyright © 2016 Swinject Contributors. All rights reserved. // // MARK: For auto migration from Swinject v1 to v2. extension ObjectScope { @available(*, unavailable, renamed: "transient") public static let non...
null
null
Fix injectable service due to rc.7 changes. Apply this change to `src/client/app/mix-ng1-ng2.js` and return the full updated file. ```javascript "use strict"; (function () { angular .module("dummy", []); var fooS = ng.core .Injectable() .Class({ const...
```javascript "use strict"; (function () { angular .module("dummy", []); var fooS = ng.core .Class({ constructor: [ng.http.Http, function FooService(http) { this.http = http; }], getFoo: function () { ...
null
null
Allow to have separate DB instances for each server Apply this change to `libraries/db.php` and return the full updated file. ```php <?php final class Db { protected static $_instances = Array(); public static function factory($driver = Null, $config) { $driver = isset($driver) ? $driver : App::i...
```php <?php final class Db { protected static $_instances = Array(); public static function factory($driver = Null, $config) { $driver = isset($driver) ? $driver : App::instance()->config['database']['driver']; $instanceName = $driver . ':' . $config['host'] . ':' . $config['port']; ...
null
null
Rename Development category to Software Development. Apply this change to `src/CompetitionPlatform/Data/ProjectCategory/ProjectCategoriesRepository.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CompetitionPlatfor...
```csharp using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CompetitionPlatform.Data.ProjectCategory; namespace CompetitionPlatform.Data.ProjectCategory { public class ProjectCategoriesRepository : IProjectCategoriesRepository { public List<string> ...
null
null
Implement all the integer comparison operators in swift.swift. Despite the indirection, each of these compiles into nice simple IR at -O3, with: swift swift.swift -I test -emit-llvm | opt -O3 -S | less for example: define i1 @_TSsop1gFT3lhsNSs5int643rhsS__NSs4bool(i64, i64) nounwind readnone { entry: %2 = icmp sg...
```cpp #include <inttypes.h> #include <stdio.h> extern "C" void _T3fib5printFT1iNSs5int64_T_(int64_t l) { printf("%lld\n", l); } extern "C" void _T3fib5printFT1iNS_6double_T_(double l) { printf("%f\n", l); } extern "C" void _T5nbody5printFT1iNSs6double_T_(double l) { printf("%f\n", l); } // This cannot be imp...
null
null
Use a Form for Discard Changes Apply this change to `app/src/ui/discard-changes/index.tsx` and return the full updated file. ```typescript import * as React from 'react' import { Repository } from '../../models/repository' import { Dispatcher } from '../../lib/dispatcher' import { WorkingDirectoryFileChange } from '...
```typescript import * as React from 'react' import { Repository } from '../../models/repository' import { Dispatcher } from '../../lib/dispatcher' import { WorkingDirectoryFileChange } from '../../models/status' import { Form } from '../lib/form' import { Button } from '../lib/button' interface IDiscardChangesProps ...
null
null
Fix compile errors on Linux Apply this change to `source/Pictus/reg_filter_mode_translator.cpp` and return the full updated file. ```cpp #include "reg_filter_mode_translator.h" #include "orz/types.h" namespace Reg { namespace Internal { boost::optional<FilterModeTranslator::external_type> FilterModeTranslator::ge...
```cpp #include "reg_filter_mode_translator.h" #include "orz/types.h" namespace Reg { namespace Internal { boost::optional<FilterModeTranslator::external_type> FilterModeTranslator::get_value(internal_type const sval) { if (sval.empty()) return boost::none; if (sval == "Bilinear") { return Filter::Mode::B...
null
null
Fix SPM Dependency definition to RxSwift Apply this change to `Package.swift` and return the full updated file. ```swift // swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "RxGCXMultic...
```swift // swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "RxGCXMulticastDNSKit", platforms: [ .iOS(.v9), ], products: [ // Products define the executables ...
null
null
Test native use of Varint32 zero Apply this change to `src/io/operations/mod.rs` and return the full updated file. ```rust //! Netherrack-specific I/O operations for Rust pub mod reader; pub mod writer; #[cfg(test)] mod test { use super::reader::NetherrackReader; use super::writer::NetherrackWriter; ...
```rust //! Netherrack-specific I/O operations for Rust pub mod reader; pub mod writer; #[cfg(test)] mod test { use super::reader::NetherrackReader; use super::writer::NetherrackWriter; use std::io::Cursor; #[test] fn test_read_write_unsigned_varint_32() { let mut vector = Cursor::new...
null
null
Add new Status for when images are set but project is not Apply this change to `XCAssetGenerator/StatusCrafter.swift` and return the full updated file. ```swift // // StatusViewModel.swift // XCAssetGenerator // // Created by Bader on 5/26/15. // Copyright (c) 2015 Bader Alabdulrazzaq. All rights reserved. // im...
```swift // // StatusViewModel.swift // XCAssetGenerator // // Created by Bader on 5/26/15. // Copyright (c) 2015 Bader Alabdulrazzaq. All rights reserved. // import Foundation typealias Status = String struct StatusCrafter { static func postGeneration(catalog: Path, amount: Int) -> Status { let s =...
null
null
Add radar latitude / longitude to query results Apply this change to `documentation/aggregate-data.sql` and return the full updated file. ```sql -- Aggregate bird_migration_altitude_profile data: -- - Aggregate on time frame (e.g. 20 min) -- - Aggregate on altitude band (e.g. 200-1600m, 1600+ m) -- - Average values ...
```sql -- Aggregate bird_migration_altitude_profile data: -- - Aggregate on time frame (e.g. 20 min) -- - Aggregate on altitude band (e.g. 200-1600m, 1600+ m) -- - Average values WITH aggregated_data AS ( SELECT b.radar_id, ST_X(r.the_geom) AS longitude, ST_Y(r.the_geom) AS latitude, date_t...
null
null
Add PI to user details Apply this change to `etl/scripts/sql/etl_redcap_userDetails.sql` and return the full updated file. ```sql SELECT DISTINCT pc.value AS practice_code, d.value AS email_address FROM redcap6170_briccsext.redcap_data d INNER JOIN redcap6170_briccsext.redcap_data pc ON pc.project...
```sql SELECT DISTINCT pc.value AS practice_code, d.value AS email_address FROM redcap6170_briccsext.redcap_data d INNER JOIN redcap6170_briccsext.redcap_data pc ON pc.project_id = d.project_id AND pc.field_name = 'practice_code' AND pc.record = d.record WHERE d.project_id IN (29, 53) ...
null
null
Add a missing newline character Apply this change to `src/KeyValueHttpHeader.php` and return the full updated file. ```php <?php namespace Kevinrob\GuzzleCache; class KeyValueHttpHeader { const REGEX_SPLIT = '/^([^=]*)=(.*)$/'; /** * @var string[] */ protected $values = []; /** * ...
```php <?php namespace Kevinrob\GuzzleCache; class KeyValueHttpHeader { const REGEX_SPLIT = '/^([^=]*)=(.*)$/'; /** * @var string[] */ protected $values = []; /** * @param array $values */ public function __construct(array $values) { foreach ($values as $value) ...
null
null
Use export { default as ... } syntax Apply this change to `packages/react-form-with-constraints/src/index.ts` and return the full updated file. ```typescript export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * fro...
```typescript export * from './FormWithConstraints'; export * from './FieldFeedbacks'; export * from './FieldFeedback'; export * from './FieldFeedbackWhenValid'; export * from './Async'; export { default as Field } from './Field'; export * from './FieldsStore'; export * from './EventEmitter'; export * from './withValid...
null
null
Add a criterion kind for extends/implements. It's not used anywhere yet. An option would be to have separate constants for extends and implements, but that's probably not needed. Apply this change to `annotation-file-utilities/src/annotator/find/Criterion.java` and return the full updated file. ```java package annota...
```java package annotator.find; import com.sun.source.util.TreePath; import com.sun.source.tree.Tree; /** * A criterion for locating a program element in an AST. A Criterion does * not actually give a location. Given a location, the isSatisfiedBy * method indicates whether that location is a desired one. */ pub...
null
null
Add new notification center convenience methods so that the older ones can eventually be retired Apply this change to `Source/common/extensions/NotificationCenterExtensions.swift` and return the full updated file. ```swift // // NotificationCenterExtensions.swift // KTSwiftExtensions // // Created by Kyle Thomas o...
```swift // // NotificationCenterExtensions.swift // KTSwiftExtensions // // Created by Kyle Thomas on 6/27/16. // Copyright © 2016 Kyle Thomas. All rights reserved. // import Foundation public extension NotificationCenter { func postNotificationName(_ aName: String) { post(name: Notification.Name(ra...
null
null
Update query: add extra where clause Apply this change to `api/queries/groupMembersByGenderOfRoles.sql` and return the full updated file. ```sql SELECT (ud.profile->'gender'->>'value')::text AS gender, count(*) AS count FROM general_settings gs, jsonb_array_elements(gs.data) roles JOIN user_...
```sql SELECT (ud.profile->'gender'->>'value')::text AS gender, count(*) AS count FROM general_settings gs, jsonb_array_elements(gs.data) roles JOIN user_data ud ON LOWER((ud.profile->'roleCategory'->>'value')::text) = LOWER((roles->>'originalRole')::text) JOIN "user" u ON u.research_en...
null
null
Set optional verbose mode to carthage command Apply this change to `step.sh` and return the full updated file. ```bash #!/bin/bash set -e NO_USE_BINARIES="" if [[ "${no_use_binaries}" == "true" ]] ; then NO_USE_BINARIES='--no-use-binaries' fi # # Bootstrap carthage "${carthage_command}" --platform iOS ${NO_USE_B...
```bash #!/bin/bash set -e NO_USE_BINARIES="" VERBOSE_MODE="" if [[ "${no_use_binaries}" == "true" ]] ; then NO_USE_BINARIES='--no-use-binaries' fi if [[ "${verbose_output}" == "true" ]] ; then VERBOSE_MODE='--verbose' fi # # Bootstrap carthage "${carthage_command}" --platform iOS ${NO_USE_BINARIES} ${VERBOSE_MO...
null
null
Testcase: Remove UNKNOWN annotation from assert that now succeeds Apply this change to `tests/regression/29-svcomp/04-lustre-minimal.c` and return the full updated file. ```c // PARAM: --enable ana.int.interval --enable ana.int.def_exc // issue #120 #include <assert.h> int main() { // should be LP64 unsigned...
```c // PARAM: --enable ana.int.interval --enable ana.int.def_exc // issue #120 #include <assert.h> int main() { // should be LP64 unsigned long n = 16; unsigned long size = 4912; assert(!(0xffffffffffffffffUL / size < n)); } ```
null
null
Fix JNI for C instead of C++ (because apparently there is a significant difference...) Apply this change to `src/java/org_bitcoin_NativeSecp256k1.c` and return the full updated file. ```c #include "org_bitcoin_NativeSecp256k1.h" #include "include/secp256k1.h" JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_...
```c #include "org_bitcoin_NativeSecp256k1.h" #include "include/secp256k1.h" JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify (JNIEnv* env, jclass classObject, jobject byteBufferObject) { unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); i...
null
null
Simplify importing Foundation while still compatible with C++ Apply this change to `Sources/KeepLayout.h` and return the full updated file. ```c // // KeepLayout.h // Keep Layout // // Created by Martin Kiss on 28.1.13. // Copyright (c) 2013 Triceratops. All rights reserved. // #ifdef __cplusplus #import <Found...
```c // // KeepLayout.h // Keep Layout // // Created by Martin Kiss on 28.1.13. // Copyright (c) 2013 Triceratops. All rights reserved. // #import <Foundation/Foundation.h> FOUNDATION_EXPORT double KeepLayoutVersionNumber; FOUNDATION_EXPORT const unsigned char KeepLayoutVersionString[]; #import "KeepTypes.h"...
null
null
Print message if signing in failed Apply this change to `githubsetupircnotifications.py` and return the full updated file. ```python """ github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = ...
```python """ github-setup-irc-notifications - Configure all repositories in an organization with irc notifications """ import argparse import getpass import github3 def main(): parser = argparse.ArgumentParser() parser.add_argument('--username'), parser.add_argument('--password'), args = parser.par...
null
null
Change name of module made by cython to rk4cython to test. Apply this change to `setup.py` and return the full updated file. ```python from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy import configuration ext_modules = [Extension("sourcete...
```python from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy import configuration ext_modules = [Extension("sourceterm.srccython", ["sourceterm/srccython.pyx"], extra_compile_args=["-g"], extra_link_args=["-g"],...
null
null
Use class_name instead of name for Hubspot events Apply this change to `lib/carto/tracking/services/hubspot.rb` and return the full updated file. ```ruby require 'hubspot/events_api' module Carto module Tracking module Services module Hubspot def report_to_hubspot return unless ::Hubspo...
```ruby require 'hubspot/events_api' module Carto module Tracking module Services module Hubspot def report_to_hubspot return unless ::Hubspot::EventsAPI.instance.enabled? event_name = class_name.downcase.tr(' ', '_') id = fetch_event_id_for_event_name(event_name) ...
null
null
Add test for deliverToView without view Apply this change to `thirtyinch-kotlin/src/test/java/net/grandcentrix/thirtyinch/kotlin/TiPresenterTest.kt` and return the full updated file. ```kotlin package net.grandcentrix.thirtyinch.kotlin import com.nhaarman.mockito_kotlin.mock import com.nhaarman.mockito_kotlin.verify...
```kotlin package net.grandcentrix.thirtyinch.kotlin import com.nhaarman.mockito_kotlin.* import net.grandcentrix.thirtyinch.TiPresenter import net.grandcentrix.thirtyinch.TiView import org.junit.* import org.junit.runner.* import org.junit.runners.* @RunWith(JUnit4::class) class TiPresenterTest { interface View...
null
null
Add missing node packages for functional express app Apply this change to `provision.sh` and return the full updated file. ```bash #!/usr/bin/env bash apt-get -y update apt-get -y install build-essential # Use the nodejs PPA curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh bash nodesource_setup...
```bash #!/usr/bin/env bash apt-get -y update apt-get -y install build-essential # Use the nodejs PPA curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh bash nodesource_setup.sh apt-get -y install nodejs npm install -g serve-favicon morgan cookie-parser body-parser debug jade express express-gene...
null
null
Fix the bug that the config for NUnit was not in the correct folder Apply this change to `NBi.Services/RunnerConfig/NUnitRunnerConfigBuilder.cs` and return the full updated file. ```csharp using System; using System.IO; using System.Linq; namespace NBi.Service.RunnerConfig { class NUnitRunnerConfigBuilder...
```csharp using System; using System.IO; using System.Linq; namespace NBi.Service.RunnerConfig { class NUnitRunnerConfigBuilder : AbstractRunnerConfigBuilder { public NUnitRunnerConfigBuilder() : base("NBi.config", "NUnit.nunit") { } public NUnitRunn...
null
null
Allow lv for everyone in not playing Apply this change to `src/commands/music/leave.js` and return the full updated file. ```javascript const { getGuildString } = require('../../locales.js'); const music = require('../../music.js'); module.exports = { variants: ['leave', 'lv'], usage: 'lv', async action(messa...
```javascript const { getGuildString } = require('../../locales.js'); const music = require('../../music.js'); module.exports = { variants: ['leave', 'lv'], usage: 'lv', async action(message, arg) { const l = getGuildString(message.guild); const queue = music.getQueue(message.guild.id); if (!queue.c...
null
null
ENHANCEMENT: Allow a grid of the latest items of one particular class type Apply this change to `code/GridRowsExtension.php` and return the full updated file. ```php <?php class GridRowsExtension extends DataExtension { /* If you are laying out using some form of grid, e.g. HTML table (ugh) or bootstraps span c...
```php <?php class GridRowsExtension extends DataExtension { /* If you are laying out using some form of grid, e.g. HTML table (ugh) or bootstraps span classes it is useful to have the DataList split by row. Here the DataList is generated from a method accessible to the current cotnroller See README.md for ...
null
null
Use MySQL database backend in Travis CI. Apply this change to `travis_settings.py` and return the full updated file. ```python # Settings used for running tests in Travis # # Load default settings # noinspection PyUnresolvedReferences from settings import * # Database DATABASES = { 'default': { 'ENGINE'...
```python # Settings used for running tests in Travis # # Load default settings # noinspection PyUnresolvedReferences from settings import * # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'alexia_test', ...
null
null
Fix setting of ownertrust on own key Previously failed because the ownertrust was set prior to the key being added. Apply this change to `setup.sh` and return the full updated file. ```bash #!/bin/bash # Setup symlinks in $HOME, overwriting existing stuff for DOTFILE in \ .bash_logout \ .bash_profile \ ...
```bash #!/bin/bash # Setup symlinks in $HOME, overwriting existing stuff for DOTFILE in \ .bash_logout \ .bash_profile \ .bashrc \ .gitconfig \ .gnupg \ .inputrc \ .ssh \ .vim \ .vimoutlinerrc \ .vimrc do ln -f -s -t $HOME dotfiles/$DOTFILE done # fix permissions; not rec...
null
null
Update plugin com.diffplug.spotless to v6.0.2 Apply this change to `settings.gradle.kts` and return the full updated file. ```kotlin pluginManagement { repositories { gradlePluginPortal() } plugins { id("com.diffplug.eclipse.apt") version "3.33.3" id("com.diffplug.spotless") versio...
```kotlin pluginManagement { repositories { gradlePluginPortal() } plugins { id("com.diffplug.eclipse.apt") version "3.33.3" id("com.diffplug.spotless") version "6.0.2" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("net.researchgate.release") version ...
null
null
Throw Error object instead of returning a string. Apply this change to `src/api/returnHit.ts` and return the full updated file. ```typescript import axios from 'axios'; import { API_URL } from '../constants'; export type HitReturnStatus = 'repeat' | 'success' | 'error'; export const sendReturnHitRequest = asyn...
```typescript import axios from 'axios'; import { API_URL } from '../constants'; export type HitReturnStatus = 'repeat' | 'success' | 'error'; export const sendReturnHitRequest = async (hitId: string) => { try { const response = await axios.get(`${API_URL}/mturk/return`, { params: { hitId...
null
null
Add tests for finding a country using code or name Apply this change to `tests/LaravelAddressingTest.php` and return the full updated file. ```php <?php use Galahad\LaravelAddressing\Entity\Country; use Galahad\LaravelAddressing\LaravelAddressing; /** * Class LaravelAddressingTest * * @author Junior Grossi <juni...
```php <?php use Galahad\LaravelAddressing\Entity\Country; use Galahad\LaravelAddressing\LaravelAddressing; /** * Class LaravelAddressingTest * * @author Junior Grossi <juniorgro@gmail.com> */ class LaravelAddressingTest extends PHPUnit_Framework_TestCase { /** * @var LaravelAddressing */ protec...
null
null
Add support for `SupportAddress` on `Account` create and update Apply this change to `src/Stripe.net/Services/Accounts/AccountBusinessProfileOptions.cs` and return the full updated file. ```csharp namespace Stripe { using Newtonsoft.Json; public class AccountBusinessProfileOptions : INestedOptions { ...
```csharp namespace Stripe { using System; using Newtonsoft.Json; public class AccountBusinessProfileOptions : INestedOptions { /// <summary> /// The merchant category code for the account. MCCs are used to classify businesses based /// on the goods or services they provide. ...
null
null
Remove obrigatoriedade da versão para retorno da SEFAZ MG Apply this change to `src/main/java/com/fincatto/documentofiscal/nfe400/classes/NFProtocolo.java` and return the full updated file. ```java package com.fincatto.documentofiscal.nfe400.classes; import org.simpleframework.xml.Attribute; import org.simpleframewo...
```java package com.fincatto.documentofiscal.nfe400.classes; import org.simpleframework.xml.Attribute; import org.simpleframework.xml.Element; import org.simpleframework.xml.Root; import com.fincatto.documentofiscal.DFBase; @Root(name = "protNFe") public class NFProtocolo extends DFBase { private static final lo...
null
null
Make unary plus/minus generic functions. Apply this change to `src/main/java/org/klips/dsl/Asserter.kt` and return the full updated file. ```kotlin package org.klips.dsl interface Asserter { val asserted: List<Fact> val retired: List<Fact> fun assert(vararg facts: Fact): Array<out Fact> fun retire(...
```kotlin package org.klips.dsl interface Asserter { val asserted: List<Fact> val retired: List<Fact> fun assert(vararg facts: Fact): Array<out Fact> fun retire(vararg facts: Fact): Array<out Fact> operator fun <T : Fact> T.unaryPlus() : T { assert(this) return this } op...
null
null
Test commit : remove CR Apply this change to `ConnectSdk/src/com/gettyimages/connectsdk/Download.java` and return the full updated file. ```java package com.gettyimages.connectsdk; import java.util.Dictionary; import java.util.Hashtable; import java.util.Map; public class Download { private String MustSpecifyAt...
```java package com.gettyimages.connectsdk; import java.util.Dictionary; import java.util.Hashtable; import java.util.Map; public class Download { private String MustSpecifyAtLeastOneImageIdMessage = "Must specify at least one image id."; private String AutoDownloadString = "auto_download"; private String...
null
null
Make config branch name a constant Apply this change to `app/services/classroom_config.rb` and return the full updated file. ```ruby # frozen_string_literal: true class ClassroomConfig CONFIGURABLES = %w[issues].freeze attr_reader :github_repository def initialize(github_repository) raise ArgumentError, ...
```ruby # frozen_string_literal: true class ClassroomConfig CONFIGURABLES = %w[issues].freeze CONFIGBRANCH = "github-classroom" attr_reader :github_repository def initialize(github_repository) raise ArgumentError, "Invalid configuration repo" unless github_repository.branch_present? CONFIGBRANCH ...
null
null
Document that multiple clients may share a single SPIFFE ID Apply this change to `server/src/main/resources/db/mysql/migration/V11__add_spiffe_id_to_clients.sql` and return the full updated file. ```sql # https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md#23-maximum-spiffe-id-length # maximum SPIFFE ...
```sql # https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md#23-maximum-spiffe-id-length # maximum SPIFFE ID length is 2048 bytes using (per https://tools.ietf.org/html/rfc3986) US-ASCII # chars, which in utf-8 encoding occupy one byte each # Multiple clients may be associated with a given SPIFFE ID, so...
null
null
Remove containing div and style svg-icon directly. Apply this change to `app/demo-app.component.ts` and return the full updated file. ```typescript import {Component} from 'angular2/core'; import {SvgIconComponent} from './svg-icon.component'; @Component({ selector: 'demo-app', directives: [ SvgIconComponent ], t...
```typescript import {Component} from 'angular2/core'; import {SvgIconComponent} from './svg-icon.component'; @Component({ selector: 'demo-app', directives: [ SvgIconComponent ], template: ` <div style="width:100px;"> <svg-icon src="images/eye.svg" style="fill:red;"></svg-icon> <svg-icon src="images/eye.svg...
null
null