original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Add full syntax for SHOW TABLES to help Apply this change to `presto-main/src/main/java/com/facebook/presto/cli/Help.java` and return the full updated file. ```java package com.facebook.presto.cli; public final class Help { private Help() {} public static String getHelpText() { return "" + ...
```java package com.facebook.presto.cli; public final class Help { private Help() {} public static String getHelpText() { return "" + "Supported commands:\n" + "QUIT\n" + "DESCRIBE <table>\n" + "SHOW COLUMNS FROM <table>\n" + ...
null
null
Define this in the correct n/s git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@30671 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `lib/Support/ManagedStatic.cpp` and return the full updated file. ```cpp //===-- ManagedStatic.cpp - Static Global wrapper -------------------------===// // // ...
```cpp //===-- ManagedStatic.cpp - Static Global wrapper -------------------------===// // // The LLVM Compiler Infrastructure // // This file was developed by Chris Lattner and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===-------------...
null
null
Add getter/setter so we can actually use this... Apply this change to `src/main/java/io/prowave/chargify/webhook/bean/SubscriptionProductChange.java` and return the full updated file. ```java /* * Copyright (C) 2016 Prowave Consulting, LLC * * This program is free software: you can redistribute it and/or modify *...
```java /* * Copyright (C) 2016 Prowave Consulting, LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Th...
null
null
Fix ambiguity for 32-bit gcc. Apply this change to `test/ofp/protocoliterator_unittest.cpp` and return the full updated file. ```cpp // Copyright (c) 2015-2016 William W. Fisher (at gmail dot com) // This file is distributed under the MIT License. #include "ofp/protocoliterator.h" #include "ofp/unittest.h" using na...
```cpp // Copyright (c) 2015-2016 William W. Fisher (at gmail dot com) // This file is distributed under the MIT License. #include "ofp/protocoliterator.h" #include "ofp/unittest.h" using namespace ofp; TEST(protocoliterator, ProtocolRangeItemCount) { UInt64 buffer; ByteRange data{&buffer, static_cast<size_t>(0)...
null
null
Initialize bounding box for coordinate system node. Apply this change to `src/coordinate_system_node.cpp` and return the full updated file. ```cpp #include "./coordinate_system_node.h" #include <Eigen/Core> CoordinateSystemNode::CoordinateSystemNode() { persistable = false; x = std::make_shared<Graphics::Connec...
```cpp #include "./coordinate_system_node.h" #include <Eigen/Core> CoordinateSystemNode::CoordinateSystemNode() { persistable = false; x = std::make_shared<Graphics::Connector>(Eigen::Vector3f(0, 0, 0), Eigen::Vector3f(1, 0, 0)); x->color = Eigen::Vector4f(1, 0, 0, 1)...
null
null
Replace single if lines with brackets in astyle Apply this change to `Tools/fix_code_style.sh` and return the full updated file. ```bash #!/bin/sh astyle \ --style=linux \ --indent=force-tab=8 \ --indent-cases \ --indent-preprocessor \ --break-blocks=all \ --pad-oper \ --pad-header \...
```bash #!/bin/sh astyle \ --style=linux \ --indent=force-tab=8 \ --indent-cases \ --indent-preprocessor \ --break-blocks=all \ --pad-oper \ --pad-header \ --unpad-paren \ --keep-one-line-blocks \ --keep-one-line-statements \ --align-pointer=name \ --align-referenc...
null
null
Increase the QImageReader allocation limit. Apply this change to `src/main.cpp` and return the full updated file. ```cpp /* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" int main(int argc, char **argv)...
```cpp /* Copyright (c), Helios All rights reserved. Distributed under a permissive license. See COPYING.txt for details. */ #include "ImageViewerApplication.h" #include <QImageReader> int main(int argc, char **argv){ try{ //Set the limit to 1 GiB. QImageReader::setAllocationLimit(1024); initial...
null
null
Sort pods in the right order. Apply this change to `app/js/app/directives/PodCarousel.js` and return the full updated file. ```javascript /** * Copyright 2015 Ian Davies * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * You...
```javascript /** * Copyright 2015 Ian Davies * * 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 o...
null
null
Change thing.tasks.table_cleaner to delete TaskState objects for any invalid APIKeys Apply this change to `thing/tasks/tablecleaner.py` and return the full updated file. ```python import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.m...
```python import datetime from celery import task from celery.utils.log import get_task_logger logger = get_task_logger(__name__) from django.db.models import Q from thing.models import APIKey, TaskState # --------------------------------------------------------------------------- # Periodic task to perform databas...
null
null
Fix env frontend dev config Apply this change to `frontend/src/environments/environment.ts` and return the full updated file. ```typescript // The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do...
```typescript // The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be fo...
null
null
Check realm action in schema details class Apply this change to `migration/src/main/java/br/com/bloder/migration/schema/BetterSchema.kt` and return the full updated file. ```kotlin package br.com.bloder.migration.schema import io.realm.DynamicRealm import io.realm.RealmObjectSchema import io.realm.RealmSchema /** ...
```kotlin package br.com.bloder.migration.schema import io.realm.DynamicRealm import io.realm.RealmObjectSchema import io.realm.RealmSchema /** * Created by bloder on 28/09/16. */ class BetterSchema { private var schema: RealmSchema? = null private val add: String = "add" fun getSchema(dynamicRealm:...
null
null
Use coroutine in Kotlin file Apply this change to `app/src/main/java/org/wikipedia/page/PageAvailableOfflineHandler.kt` and return the full updated file. ```kotlin package org.wikipedia.page import android.annotation.SuppressLint import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers...
```kotlin package org.wikipedia.page import android.annotation.SuppressLint import kotlinx.coroutines.* import org.wikipedia.WikipediaApp import org.wikipedia.readinglist.database.ReadingListDbHelper import org.wikipedia.readinglist.database.ReadingListPage import org.wikipedia.util.log.L object PageAvailableOfflineH...
null
null
Add function to provide interpreter interface Apply this change to `src/main.rs` and return the full updated file. ```rust mod vm; mod command; mod parse; mod program; use vm::VM; use program::Program; use std::io::Write; use std::env; fn main() { for argument in env::args() { println!("{}", argument);...
```rust mod vm; mod command; mod parse; mod program; use vm::VM; use program::Program; use std::io::Write; use std::env; use std::path::Path; use std::fs::File; use std::io::prelude::*; fn main() { for argument in env::args() { println!("{}", argument); } let vm = VM::new(); let program = Pr...
null
null
Update plugin com.diffplug.eclipse.apt to v3.37.0 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.2" id("com.diffplug.spotless") ve...
```kotlin pluginManagement { repositories { gradlePluginPortal() } plugins { id("com.diffplug.eclipse.apt") version "3.37.0" id("com.diffplug.spotless") version "6.7.2" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("net.researchgate.release") version ...
null
null
Fix task execution clean up blocking loading Resolves #1591 Apply this change to `ui/src/app/tasks-jobs/executions/cleanup/cleanup.component.ts` and return the full updated file. ```typescript import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { TaskExecution } from '../../../shared/mode...
```typescript import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { TaskExecution } from '../../../shared/model/task-execution.model'; import { TaskService } from '../../../shared/api/task.service'; import { NotificationService } from '../../../shared/service/notification.service'; @Compone...
null
null
Implement a basic recursive_delete_if that passes the failing test. Apply this change to `lib/json/merge_patch.rb` and return the full updated file. ```ruby require 'json' require "json/merge_patch/version" module JSON MergeError = Class.new(StandardError) def self.merge(document, merge_patch) document = JS...
```ruby require 'json' require "json/merge_patch/version" module JSON MergeError = Class.new(StandardError) def self.merge(document, merge_patch) document = JSON.parse(document) merge_patch = JSON.parse(merge_patch) if merge_patch.is_a? Array return JSON.dump(merge_patch) end if docume...
null
null
Add NSNumber cast from JavaScript function Apply this change to `src/casts.cc` and return the full updated file. ```cpp #include <node.h> #include <v8.h> #include "helpers.h" using namespace v8; using namespace node; namespace node_objc { // Cast a JavaScript "String" to an "NSString" v8::Handle<Value> Cast_NS...
```cpp #import <Foundation/Foundation.h> #include <node.h> #include <v8.h> #include "helpers.h" using namespace v8; using namespace node; namespace node_objc { // Cast a JavaScript "String" to an "NSString" v8::Handle<Value> Cast_NSString (const Arguments& args) { HandleScope scope; String::Utf8Value val...
null
null
Fix test that was reaching over its call stack size. Apply this change to `test/yeti-ending-test.js` and return the full updated file. ```javascript const chai = require('chai'); const assert = chai.assert; const Yeti = require('../app/lib/yeti'); const Skier = require('../app/lib/skier'); var yetiEnding = require('...
```javascript const chai = require('chai'); const assert = chai.assert; const Yeti = require('../app/lib/yeti'); const Skier = require('../app/lib/skier'); var yetiEnding = require('../app/lib/yeti-ending'); describe('yetiEnding', function() { beforeEach(function () { this.canvas = document.createElement('canva...
null
null
Add wait() to login test with wrong credentials to fix WebDriver test Apply this change to `apps/basic/tests/acceptance/LoginCept.php` and return the full updated file. ```php <?php use tests\_pages\LoginPage; $I = new WebGuy($scenario); $I->wantTo('ensure that login works'); $loginPage = LoginPage::openBy($I); $...
```php <?php use tests\_pages\LoginPage; $I = new WebGuy($scenario); $I->wantTo('ensure that login works'); $loginPage = LoginPage::openBy($I); $I->see('Login', 'h1'); $I->amGoingTo('try to login with empty credentials'); $loginPage->login('', ''); $I->expectTo('see validations errors'); $I->see('Username cannot b...
null
null
Test level 6 with a variable instead of a constant Apply this change to `main.c` and return the full updated file. ```c // Copyright (c) 2016 LEGOAnimal22 #include <stdio.h> #include <inttypes.h> #include "electron.h" int main() { printf("Periodic Table by LEGOAnimal22\n"); electron_config carbon = create_elec...
```c // Copyright (c) 2016 LEGOAnimal22 #include <stdio.h> #include <inttypes.h> #include "electron.h" int main() { printf("Periodic Table by LEGOAnimal22\n"); electron_config carbon = create_electron_config(6); printf("%d, %d, %d, %d\n", carbon.atomic_number, carbon.highest_energy_level, carbon.valence_electr...
null
null
Mark IFrameTest.InEmptyFrame FAILS_ on OS_CHROMEOS. BUG=100101 TEST=Failures expected on ChromeOS. TBR=oshima Review URL: http://codereview.chromium.org/8248004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@105155 0039d316-1c4b-4281-b951-d872f2087c98 Apply this change to `chrome/browser/iframe_uitest.cc` and...
```cpp // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/basictypes.h" #include "base/file_path.h" #include "build/build_config.h" #include "chrome/test/ui/ui_test.h" #include "net/base...
null
null
Allow the factory to specify a cookieStorage object Apply this change to `src/CookieFactory.php` and return the full updated file. ```php <?php namespace Rosio\EncryptedCookie; use Rosio\EncryptedCookie\CryptoSystem\iCryptoSystem; class CookieFactory { private $cryptoSystem; function __construct (iCryptoSystem ...
```php <?php namespace Rosio\EncryptedCookie; use Rosio\EncryptedCookie\CryptoSystem\iCryptoSystem; use Rosio\EncryptedCookie\CookieStorage; class CookieFactory { private $cryptoSystem; private $cookieStorage; function __construct (iCryptoSystem $cryptoSystem, CookieStorage $cookieStorage = null) { $this->cry...
null
null
Fix ssh recipe: mkdir_p /var/run/sshd Apply this change to `cookbooks/ssh/recipes/default.rb` and return the full updated file. ```ruby # # Cookbook Name:: ssh # Recipe:: default # # Copyright 2013, YOUR_COMPANY_NAME # # All rights reserved - Do Not Redistribute # package "ssh" do action :install end template "/et...
```ruby # # Cookbook Name:: ssh # Recipe:: default # # Copyright 2013, YOUR_COMPANY_NAME # # All rights reserved - Do Not Redistribute # package "ssh" do action :install end template "/etc/ssh/sshd_config" do source "sshd_config.erb" owner "root" group "root" mode 0644 end directory '/var/run/sshd' do own...
null
null
Remove more SSL verification (ugh) Apply this change to `lib/Scat/Service/Ordure.php` and return the full updated file. ```php <?php namespace Scat\Service; class Ordure { public $url; public $key; public $static_url; public function __construct(Config $config) { $this->url= $config->get('ordure.url'); ...
```php <?php namespace Scat\Service; class Ordure { public $url; public $key; public $static_url; public function __construct(Config $config) { $this->url= $config->get('ordure.url'); $this->key= $config->get('ordure.key'); $this->static_url= $config->get('ordure.static_url'); } public functi...
null
null
Refactor to follow coding guidelines Apply this change to `addon/mixins/sl-input-based.js` and return the full updated file. ```javascript import Ember from 'ember'; /** * @module mixins * @class sl-input-based */ export default Ember.Mixin.create({ /** * Class name bindings for the component * ...
```javascript import Ember from 'ember'; /** * @module mixins * @class sl-input-based */ export default Ember.Mixin.create({ // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- //...
null
null
Change filter example to use KeyMap Apply this change to `v1/cmd/filter/main.go` and return the full updated file. ```go package main import ( "bufio" "encoding/json" "fmt" "io" "os" "github.com/mgutz/logxi/v1" ) func sendExternal(obj map[string]interface{}) { // normally you would send this to an external ...
```go package main import ( "bufio" "encoding/json" "fmt" "io" "os" "github.com/mgutz/logxi/v1" ) func sendExternal(obj map[string]interface{}) { // normally you would send this to an external service like InfluxDB // or some logging framework. Let's filter out some data. fmt.Printf("Time: %s Level: %s Mess...
null
null
Test case for B0 -> mu Apply this change to `EVGEN/AliDecayer.h` and return the full updated file. ```c #ifndef ALI_DECAYER__H #define ALI_DECAYER__H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #i...
```c #ifndef ALI_DECAYER__H #define ALI_DECAYER__H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #include "RVersion.h" #include "TVirtualMCDecayer.h" typedef TVirtualMCDecayer AliDecayer; #if ROOT_V...
null
null
Add a test to verify that the DriveDisabled policy prevents Drive access for realz. BUG=165490 TEST=browser_tests:DriveSystemServiceBrowserTest.DisableDrivePolicyTest Review URL: https://chromiumcodereview.appspot.com/12226057 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@181482 0039d316-1c4b-4281-b951-d872f...
```cpp // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/drive/drive_system_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profil...
null
null
Set publishing fequenzy from 1 to 30 hz Apply this change to `src/openni_laserscan_node.cpp` and return the full updated file. ```cpp #include "ros/ros.h" #include "sensor_msgs/LaserScan.h" #include "OpenniLaserScanner.h" class MyMwListener : public OpenniLaser::OpenniLaserScanner::Listener { public: sensor_msgs::L...
```cpp #include "ros/ros.h" #include "sensor_msgs/LaserScan.h" #include "OpenniLaserScanner.h" class MyMwListener : public OpenniLaser::OpenniLaserScanner::Listener { public: sensor_msgs::LaserScan scan; void readyForNextData(OpenniLaser::OpenniLaserScanner* scanner) { openni::VideoFrameRef frame; scan = scanne...
null
null
Update datasets at with list dataset Apply this change to `WP_LIST_DATASET/local.template.sql` and return the full updated file. ```sql requirevars 'input_local_tbl'; var 'a' from select count(distinct(__rid)) as sum1 from (select distinct rid as __rid from(postgresraw dataset)); var 'b' from select execprogram(null...
```sql requirevars 'input_local_tbl'; select execprogram(null, "/root/exareme/set-local-datasets.sh"); var 'a' from select count(distinct(__rid)) as sum1 from (select distinct rid as __rid from(postgresraw dataset)); var 'b' from select execprogram(null,'cat','/root/exareme/etc/exareme/name'); select var('a') as sum1...
null
null
Document that this part of the unit test code must remain in src/ git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@602096 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: cc2bf2cbe435b46f10d576d25c73048cd4ac9736 Apply this change to `src/jorphan/org/apache/jorphan/test/UnitTestManager.java` an...
```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 'MAX' to ControllerMaxLen enum set. Apply this change to `src/ofp/yaml/ycontrollermaxlen.cpp` and return the full updated file. ```cpp // Copyright 2014-present Bill Fisher. All rights reserved. #include "ofp/yaml/yllvm.h" #include "ofp/yaml/ycontrollermaxlen.h" using namespace ofp; using ofp::yaml::EnumConvert...
```cpp // Copyright 2014-present Bill Fisher. All rights reserved. #include "ofp/yaml/yllvm.h" #include "ofp/yaml/ycontrollermaxlen.h" using namespace ofp; using ofp::yaml::EnumConverterSparse; #define OFP_NAME(s) \ { OFPCML_##s, #s } OFP_BEGIN_IGNORE_GLOBAL_CONSTRUCTOR static std::pair<OFPControllerMaxLen, llvm...
null
null
Set the name of the dynamic plugin conversion tests Apply this change to `podoc/conftest.py` and return the full updated file. ```python # -*- coding: utf-8 -*- """py.test utilities.""" #------------------------------------------------------------------------------ # Imports #---------------------------------------...
```python # -*- coding: utf-8 -*- """py.test utilities.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import logging from tempfile import TemporaryDirectory from pytest import yield_fixture...
null
null
Add listen to all events Apply this change to `src/watchfolder.js` and return the full updated file. ```javascript const chokidar = require("chokidar"); const log = require("./services/logger.service"); const FileIndex = require("./util/fileIndex"); const FileRecognizer = require("./util/fileRecognizer"); const optio...
```javascript const chokidar = require("chokidar"); const log = require("./services/logger.service"); const FileIndex = require("./util/fileIndex"); const FileRecognizer = require("./util/fileRecognizer"); const options = require("./util/cmdargs").parseArguments(); const Publisher = require("./amqp/publisher"); const G...
null
null
Remove old LayoutView.Position.CustomValue enum, and use LayoutView.Position.custom((CGSize) -> CGRect) instead, which is much more powerful and customizable Apply this change to `NotAutoLayout/NotAutoLayout/LayoutViewPosition.swift` and return the full updated file. ```swift // // LayoutViewPosition.swift // NotAu...
```swift // // LayoutViewPosition.swift // NotAutoLayout // // Created by 史翔新 on 2017/02/09. // Copyright © 2017年 史翔新. All rights reserved. // import Foundation extension LayoutView { public enum Position { case absolute(CGRect) case relative(CGRect) case custom((CGSize) -> CGRect) } } extensio...
null
null
[clean] Use the specifiers in the JCC order Apply this change to `d02/d02s04/src/main/java/net/safedata/springboot/training/d02/s04/exceptions/ExceptionHandlers.java` and return the full updated file. ```java package net.safedata.springboot.training.d02.s04.exceptions; import net.safedata.springboot.training.d02.s04...
```java package net.safedata.springboot.training.d02.s04.exceptions; import net.safedata.springboot.training.d02.s04.dto.MessageDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springfra...
null
null
Upgrade Kotlin DSL to 1.0-rc-13 Apply this change to `buildSrc/subprojects/configuration/src/main/kotlin/org/gradle/gradlebuild/build-environment.kt` and return the full updated file. ```kotlin package org.gradle.gradlebuild import org.gradle.api.JavaVersion import org.gradle.internal.os.OperatingSystem object Bui...
```kotlin package org.gradle.gradlebuild import org.gradle.api.JavaVersion import org.gradle.internal.os.OperatingSystem object BuildEnvironment { val isCiServer = "CI" in System.getenv() val gradleKotlinDslVersion = "1.0-rc-13" val jvm = org.gradle.internal.jvm.Jvm.current() val javaVersion = JavaVe...
null
null
Move chores notice to debug level Apply this change to `src/community/community-manager.js` and return the full updated file. ```javascript const Quest = require('./quest') const winston = require('winston') class CommunityManager { static start() { if (this.choreTimer) { return winston.info('Community ...
```javascript const Quest = require('./quest') const winston = require('winston') class CommunityManager { static start() { if (this.choreTimer) { return winston.info('Community manager already running.') } this.choreTimer = setInterval(() => { this.doChores() }, 10 * 60 * 1000) wi...
null
null
Include JS file in coverage for `simple-async` test Apply this change to `tests/__tests__/ts-coverage-async.spec.ts` and return the full updated file. ```typescript import runJest from '../__helpers__/runJest'; import * as fs from 'fs'; import * as path from 'path'; describe('hello_world', () => { const snapshot =...
```typescript import runJest from '../__helpers__/runJest'; import * as fs from 'fs'; import * as path from 'path'; describe('hello_world', () => { const snapshot = `------------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Unc...
null
null
Add a constraint and comment to verified Apply this change to `branch.sql` and return the full updated file. ```sql BEGIN; CREATE TABLE emails ( id serial PRIMARY KEY , address text NOT NULL , verified boolean DEFAUL...
```sql BEGIN; CREATE TABLE emails ( id serial PRIMARY KEY , address text NOT NULL , verified boolean DEFAULT NULL CONSTRAINT verified_cant_be_false ...
null
null
Make password optional with default parameter Apply this change to `keystore/src/main/kotlin/org/kethereum/keystore/api/KeyStore.kt` and return the full updated file. ```kotlin package org.kethereum.keystore.api import org.kethereum.model.Address import org.kethereum.model.ECKeyPair interface KeyStore { fun add...
```kotlin package org.kethereum.keystore.api import org.kethereum.model.Address import org.kethereum.model.ECKeyPair interface KeyStore { fun addKey(key: ECKeyPair, password: String = "", light: Boolean = false): Address? fun deleteKey(address: Address): Boolean fun getKeyForAddress(address: Address, pass...
null
null
Add otp field to clients column. Apply this change to `ykval-db.sql` and return the full updated file. ```sql -- DROP DATABASE ykval; CREATE DATABASE ykval; USE ykval; CREATE TABLE clients ( id INT NOT NULL AUTO_INCREMENT, active BOOLEAN DEFAULT TRUE, created DATETIME NOT NULL, secret VARCHAR(60) NOT NULL DE...
```sql -- DROP DATABASE ykval; CREATE DATABASE ykval; USE ykval; CREATE TABLE clients ( id INT NOT NULL AUTO_INCREMENT, active BOOLEAN DEFAULT TRUE, created DATETIME NOT NULL, secret VARCHAR(60) NOT NULL DEFAULT '', email VARCHAR(255), otp VARCHAR(100) DEFAULT '', notes VARCHAR(100) DEFAULT '', PRIMARY...
null
null
Update the demo to start the server and respond with "Hello, world!" Apply this change to `SwiftCGIDemo/SwiftCGIDemo/main.swift` and return the full updated file. ```swift // Copyright 2015 Tony Allevato // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
```swift // Copyright 2015 Tony Allevato // // 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 ag...
null
null
Allow creating EntityId directly from int64_t Apply this change to `src/engine/entity/include/halley/entity/entity_id.h` and return the full updated file. ```c #pragma once #include <cstdint> #include "halley/bytes/config_node_serializer.h" namespace Halley { class World; struct alignas(8) EntityId { int64_t v...
```c #pragma once #include <cstdint> #include "halley/bytes/config_node_serializer.h" namespace Halley { class World; struct alignas(8) EntityId { int64_t value; EntityId(int64_t value = -1) : value(value) {} explicit EntityId(const String& str); bool isValid() const { return value != -1; } bool opera...
null
null
Build the error message earlier Apply this change to `network/src/main/java/org/rocket/network/props/PropPresenceValidator.java` and return the full updated file. ```java package org.rocket.network.props; import org.rocket.network.MutProp; import org.rocket.network.NetworkClient; import org.rocket.network.PropId; im...
```java package org.rocket.network.props; import org.rocket.network.MutProp; import org.rocket.network.NetworkClient; import org.rocket.network.PropId; import org.rocket.network.PropValidator; public class PropPresenceValidator implements PropValidator { private final PropId pid; private String messageError; ...
null
null
Use enum instead of conditional Apply this change to `lib/ExecutionControlEpic/Plugins/Flowtype/index.js` and return the full updated file. ```javascript "use babel"; // @flow import type { PlanConfig } from "../../PlanConfigurationFeature/Types/types.js.flow"; import path from "path"; import FlowDiagnostic from "./...
```javascript "use babel"; // @flow import type { PlanConfig } from "../../PlanConfigurationFeature/Types/types.js.flow"; import path from "path"; import FlowDiagnostic from "./Presenters/FlowDiagnostic.js"; export default { infos: { name: "flow", iconUri: "atom://molecule-dev-environment/.storybook/p...
null
null
inventory_report: Add documentation about tables values Code readability improvement. Change-Id: Ia35ea91f812e9b9a2a564770c054abef2babc7bc Signed-off-by: Douglas Schilling Landgraf <cb5f9630225b7afa1e13760d30868c8ce876fc60@redhat.com> Apply this change to `src/inventory_report/sqls/storage_create_related_lookup_tabl...
```sql CREATE table storage_type_temp ( id NUMERIC, text varchar ); ---------------------------------------------------------------- -- All values defined in ovirt-engine project: -- backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/StorageType.java ----------------...
null
null
Install apt PHP source list if missing Install composer if missing and run install as vagrant user Apply this change to `provision/init.sh` and return the full updated file. ```bash apt-get install -y apt-transport-https lsb-release ca-certificates wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/...
```bash apt-get install -y apt-transport-https lsb-release ca-certificates if [ ! -e /etc/apt/sources.list.d/sury.php.list ]; then wget -O /etc/apt/trusted.gpg.d/sury.php.gpg https://packages.sury.org/php/apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/sury.php.lis...
null
null
Improve performance counter test stability Apply this change to `tests/Okanshi.Tests/PerformanceCounterTest.cs` and return the full updated file. ```csharp using System.Diagnostics; using FluentAssertions; using Xunit; namespace Okanshi.Test { public class PerformanceCounterTest { [Fact] public void Performan...
```csharp using System.Diagnostics; using FluentAssertions; using Xunit; namespace Okanshi.Test { public class PerformanceCounterTest { [Fact] public void Performance_counter_without_instance_name() { var performanceCounter = new PerformanceCounter("Memory", "Available Bytes"); var monitor = new Perfor...
null
null
Correct bug in auth where username=None Apply this change to `oscar/apps/customer/auth_backends.py` and return the full updated file. ```python from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, p...
```python from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
null
null
Fix non-const literal string warning with g++ 4.3. * tests/libport/pthread.cc: Here. Apply this change to `tests/libport/pthread.cc` and return the full updated file. ```cpp #include <string> #include <libport/pthread.h> #include <libport/unit-test.hh> using libport::test_suite; std::string truth("vim is future"...
```cpp #include <string> #include <libport/pthread.h> #include <libport/unit-test.hh> using libport::test_suite; std::string truth("vim is future"); void* thread1(void* data) { std::string del((char *) data); size_t pos = truth.find(del); truth.erase(pos, pos + del.size()); return 0; } void* thread2(void* ...
null
null
Fix implicit types on assertsharp Apply this change to `assertsharp/assertsharp.d.ts` and return the full updated file. ```typescript // Type definitions for assertsharp // Project: https://www.npmjs.com/package/assertsharp // Definitions by: Bruno Leonardo Michels <https://github.com/brunolm> // Definitions: https:/...
```typescript // Type definitions for assertsharp // Project: https://www.npmjs.com/package/assertsharp // Definitions by: Bruno Leonardo Michels <https://github.com/brunolm> // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module "assertsharp" { export default class Assert { static A...
null
null
Make it more obvious we're referenceing a non-bare repository. Apply this change to `spec/clamshell/dsl/project_spec.rb` and return the full updated file. ```ruby require 'spec_helper' describe Clamshell::Project do before :each do @project = Clamshell::Project.new("MyProject") end describe "project" do ...
```ruby require 'spec_helper' describe Clamshell::Project do before :each do @project = Clamshell::Project.new("MyProject") end describe "project" do it "should set the project's name" do @project.instance_variable_get(:@name).should == "MyProject" end end describe "git" do it "should...
null
null
Add body of solution of prob 3 Apply this change to `excercise05/03.cpp` and return the full updated file. ```cpp #include <stdio.h> #include "../excercise04/make_random_data/make_random_data.hpp" #include "../excercise04/sort/quick.hpp" int main(void) { int k; printf("Enter k= "); scanf("%d", &k); ...
```cpp #include <stdio.h> #include "../excercise04/make_random_data/make_random_data.hpp" #include "../excercise04/sort/quick.hpp" int get_index_smallest(const int k, int *data, const int start, const int end) { if(k < 0 || k > end) return -1; /* Base case */ int p = partition(data, start, end); if(k == ...
null
null
Use var for enabling or disabling sound Apply this change to `main.cpp` and return the full updated file. ```cpp #include <SFML/Graphics.hpp> //#include "libs/GUI-SFML/include/GUI-SFML.hpp" #include <iostream> #include "Game.hpp" int main() { sf::RenderWindow window(sf::VideoMode(800, 600), "My window"); //g...
```cpp #include <SFML/Graphics.hpp> //#include "libs/GUI-SFML/include/GUI-SFML.hpp" #include <iostream> #include "Game.hpp" int main() { sf::RenderWindow window(sf::VideoMode(800, 600), "My window"); //gsf::GUIEnvironment environment( window ); bool soundEnabled{ false }; Game game(false, true, soundEnab...
null
null
Add more bases and toppings Apply this change to `src/main/resources/data.sql` and return the full updated file. ```sql insert into Pizza_Base (id, name, description, active, price) VALUES (1, 'Thin', 'Thin and crispy base', 1, 3.75); insert into Pizza_Base (id, name, description, active, price) VALUES (2, 'Big dough...
```sql insert into Pizza_Base (id, name, description, active, price) VALUES (1, 'Thin and small', 'Thin and crispy base', 1, 3.75); insert into Pizza_Base (id, name, description, active, price) VALUES (2, 'Thin and wide', 'Your preferred crust but bigger', 1, 4.95); insert into Pizza_Base (id, name, description, active...
null
null
Rename unit test: WebViewTest.GetContentAsPlainText -> WebViewTest.ActiveState. I'm responsible for misnaming it in the first place (cut-and-paste error). Oops. BUG=23501 TEST=none Review URL: http://codereview.chromium.org/414034 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@32612 4ff67af0-8c30-449e-8e8b-ad...
```cpp // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_...
null
null
Fix :bug: with assets watch deletion. Apply this change to `dash/_watch.py` and return the full updated file. ```python import collections import os import re import time def watch(folders, on_change, pattern=None, sleep_time=0.1): pattern = re.compile(pattern) if pattern else None watched = collections.def...
```python import collections import os import re import time def watch(folders, on_change, pattern=None, sleep_time=0.1): pattern = re.compile(pattern) if pattern else None watched = collections.defaultdict(lambda: -1) def walk(): walked = [] for folder in folders: for current...
null
null
Change to real question api Apply this change to `SocialRadar/SocialRadar/SocialRadarRestAPI.swift` and return the full updated file. ```swift // // SocialRadarRestAPI.swift // SocialRadar // // Created by DSTRS TRAC Web on 10/31/2557 BE. // Copyright (c) 2557 dsthackathon. All rights reserved. // import Foundat...
```swift // // SocialRadarRestAPI.swift // SocialRadar // // Created by DSTRS TRAC Web on 10/31/2557 BE. // Copyright (c) 2557 dsthackathon. All rights reserved. // import Foundation import AlamoFire class SocialRadarRestAPI: NSObject { func getQuestion() { // var questionJSON : String; ...
null
null
Reset motor encoders in pre_auton Apply this change to `src/new/autonomous.c` and return the full updated file. ```c /* ====================================================================================================== ____________________________________________________________________________________________...
```c /* ====================================================================================================== ___________________________________________________________________________________________________ | __ __ ________ __ __ __ ______ __ __ _________ ________ | ...
null
null
Add accessibility modifier and return type Apply this change to `app/src/lib/stores/helpers/onboarding-tutorial.ts` and return the full updated file. ```typescript export class OnboardingTutorial { public constructor() { this.skipInstallEditor = false this.skipCreatePR = false } getCurrentStep() { ...
```typescript export class OnboardingTutorial { public constructor() { this.skipInstallEditor = false this.skipCreatePR = false } public getCurrentStep() { // call all other methods to check where we're at } if (this.skipInstallEditor) { private async isEditorInstalled(): Promise<boolean> { ...
null
null
Comment out gevent until we need it Apply this change to `app/wsgi.py` and return the full updated file. ```python # TODO, figure out how to load gevent monkey patch cleanly in production try: from gevent.monkey import patch_all patch_all() except ImportError: print "unable to apply gevent monkey.patch_al...
```python # TODO, figure out how to load gevent monkey patch cleanly in production # try: # from gevent.monkey import patch_all # patch_all() # except ImportError: # print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application ...
null
null
Include main hdf5 header to successful build Apply this change to `src/benchpress.cpp` and return the full updated file. ```cpp //============================================================================ // Name : benchpress.cpp // Author : Ulrik Kofoed Pedersen // Version : // Copyright : MIT. S...
```cpp //============================================================================ // Name : benchpress.cpp // Author : Ulrik Kofoed Pedersen // Version : // Copyright : MIT. See LICENSE file. // Description : Use blosc with different algorithms to compress data from // datasets in an...
null
null
Add debug info in the Travis script Apply this change to `.travis-ci.sh` and return the full updated file. ```bash # OPAM packages needed to build tests. OPAM_PACKAGES="camlzip dolog core_kernel cryptokit uri \ cmdliner sha mstruct re ocamlgraph \ alcotest lwt conduit uri mirage-fs-unix ...
```bash # OPAM packages needed to build tests. OPAM_PACKAGES="camlzip dolog core_kernel cryptokit uri \ cmdliner sha mstruct re ocamlgraph \ alcotest lwt conduit uri mirage-fs-unix io-page" ppa=avsm/ocaml41+opam11 echo "yes" | sudo add-apt-repository ppa:$ppa sudo apt-get update -qq sudo ...
null
null
Fix test to not use the AttributeSet's AttributeWithIndex creation method. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@173608 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `unittests/IR/AttributesTest.cpp` and return the full updated file. ```cpp //===- llvm/unittest/IR/AttributesTest.cpp - Attr...
```cpp //===- llvm/unittest/IR/AttributesTest.cpp - Attributes unit tests --------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------...
null
null
Add proper header for darwin build Apply this change to `native/fallocate_darwin.c` and return the full updated file. ```c #define _FILE_OFFSET_BITS 64 #include <fcntl.h> int native_fallocate(int fd, uint64_t len) { fstore_t fstore; fstore.fst_flags = F_ALLOCATECONTIG; fstore.fst_posmode = F_PEOFPOSMODE...
```c #define _FILE_OFFSET_BITS 64 #include <fcntl.h> #include <stdint.h> int native_fallocate(int fd, uint64_t len) { fstore_t fstore; fstore.fst_flags = F_ALLOCATECONTIG; fstore.fst_posmode = F_PEOFPOSMODE; fstore.fst_offset = 0; fstore.fst_length = len; fstore.fst_bytesalloc = 0; return ...
null
null
Switch python to grpc protocol Apply this change to `riff-cli/pkg/initializers/utils/resolve_opts.go` and return the full updated file. ```go /* * Copyright 2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance...
```go /* * Copyright 2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
null
null
Add formpost pointer in curl handle Apply this change to `include/cpr/curlholder.h` and return the full updated file. ```c #ifndef CPR_CURL_HOLDER_H #define CPR_CURL_HOLDER_H #include <memory> #include <curl/curl.h> namespace cpr { struct CurlHolder { CURL* handle; struct curl_slist* chunk; char error...
```c #ifndef CPR_CURL_HOLDER_H #define CPR_CURL_HOLDER_H #include <memory> #include <curl/curl.h> namespace cpr { struct CurlHolder { CURL* handle; struct curl_slist* chunk; struct curl_httppost* formpost; char error[CURL_ERROR_SIZE]; }; } // namespace cpr #endif ```
null
null
Rearrange mappings columns into a more logical order Apply this change to `script/export_for_foi/export_mappings.sql` and return the full updated file. ```sql COPY ( SELECT sites.abbr AS "Abbreviation", path AS "Old Path", new_url AS "Redirect URL", suggested_url AS "Suggested URL", archive_url ...
```sql COPY ( SELECT sites.abbr AS "Abbreviation", path AS "Old Path", CASE type WHEN 'unresolved' THEN 410 WHEN 'archive' THEN 410 WHEN 'redirect' THEN 301 END AS http_status, new_url AS "Redirect URL", archive_url AS "Custom Archive URL", suggested_url AS "Suggested URL" FROM mappings ...
null
null
Add scaffolding for skipping ease-in But it doesn't work yet. So we'll see if we bother with this one. Apply this change to `bees-in-the-trap/Assets/Scripts/MainCamera.cs` and return the full updated file. ```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class MainCam...
```csharp using System.Collections; using System.Collections.Generic; using UnityEngine; public class MainCamera : MonoBehaviour { public GameObject cursor; private IEnumerator currentMove; // Use this for initialization void Start () { } // Update is called once per frame void Update () { //this.tran...
null
null
Fix web app failing to display items in Chrome The web app was detecting its environment as a Chrome extension when run in Chrome and trying to use the Chrome Extension Dropbox auth driver. Make the test for the Chrome extension environment stricter by testing for window.chrome.extension Apply this change to `lib/ba...
```typescript /// <reference path="../../typings/DefinitelyTyped/node/node.d.ts" /> // env.ts provides functions to query the host Javascript // environment // This module has no dependencies to facilitate easier re-use across // different JS environments /** Returns true if running in the main browser * environme...
null
null
Fix show keyboard method for the view to requestFocus first Apply this change to `k4kotlin-core/src/main/java/com/livinglifetechway/k4kotlin/core/Keyboard.kt` and return the full updated file. ```kotlin package com.livinglifetechway.k4kotlin.core import android.app.Activity import android.content.Context import andr...
```kotlin package com.livinglifetechway.k4kotlin.core import android.app.Activity import android.content.Context import android.view.View import android.view.inputmethod.InputMethodManager /** * Hides the soft keyboard * @receiver Activity * @return a boolean value if the action was performed or not */ fun Activi...
null
null
Use store instead of "=" for atomic. Apply this change to `server/src/os/windows.cpp` and return the full updated file. ```cpp #include "signal_handlers.h" #include <cstring> #include <iostream> #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> namespace keron { namespace server { std::atomic_int stop(0); stat...
```cpp #include "signal_handlers.h" #include <cstring> #include <iostream> #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> namespace keron { namespace server { std::atomic_int stop(0); static BOOL handler(DWORD fdwCtrlType) { switch (fdwCtrlType) { case CTRL_C_EVENT: case CTRL_CLOSE_EVENT: std::cout <...
null
null
Make decorators obey base tower's build up time Apply this change to `src/main/java/engine/objects/tower/TowerBehaviorDecorator.java` and return the full updated file. ```java package main.java.engine.objects.tower; import main.java.engine.EnvironmentKnowledge; abstract class TowerBehaviorDecorator implements ITow...
```java package main.java.engine.objects.tower; import main.java.engine.EnvironmentKnowledge; abstract class TowerBehaviorDecorator implements ITower { /** * The base tower will have behaviors added to it ("decorations") */ protected ITower baseTower; public TowerBehaviorDecorator (ITower base...
null
null
Add Python 3 to the classifiers. Apply this change to `setup.py` and return the full updated file. ```python from setuptools import setup setup(name='s3same', version='0.1', description='Configure Travis-CI artifact uploading to S3', classifiers=[ 'Development Status :: 2 - Pre-Alpha', ...
```python from setuptools import setup setup(name='s3same', version='0.1', description='Configure Travis-CI artifact uploading to S3', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', ...
null
null
Use route handler defined for instance Apply this change to `src/RestfulRouting/Mapper.cs` and return the full updated file. ```csharp using System.Web.Mvc; using System.Web.Routing; namespace RestfulRouting { public abstract class Mapper { private readonly IRouteHandler _routeHandler; protected Mapper() {...
```csharp using System.Web.Mvc; using System.Web.Routing; namespace RestfulRouting { public abstract class Mapper { private readonly IRouteHandler _routeHandler; protected Mapper() { _routeHandler = new MvcRouteHandler(); } protected Route GenerateRoute(string path, string controller, string action, ...
null
null
Add temporary fix for Comment.replies serialization Apply this change to `addon/serializers/comment.js` and return the full updated file. ```javascript import OsfSerializer from './osf-serializer'; export default OsfSerializer.extend({ serialize(snapshot, options) { // jshint ignore:line // Add relation...
```javascript import Ember from 'ember'; import OsfSerializer from './osf-serializer'; export default OsfSerializer.extend({ serialize(snapshot, options) { // jshint ignore:line // Add relationships field to identify comment target let serialized = this._super(...arguments); // For POST r...
null
null
Add check if a file supports animations Right now it only checks for gifs, this method could include a check a png is an apng Apply this change to `Assets/Stickers/Editor/StickerEditorUtility.cs` and return the full updated file. ```csharp using System.Globalization; namespace Agens.Stickers { public static cl...
```csharp using System.Globalization; namespace Agens.Stickers { public static class StickerEditorUtility { /// <summary> /// Checks the file extension of a filename /// </summary> /// <param name="fileName">filename with extension or full path of a file</param> /// <re...
null
null
Add default values to VkAllocation Apply this change to `include/vkalloc.h` and return the full updated file. ```c #ifndef VKALLOC_VKALLOC_H #define VKALLOC_VKALLOC_H #include <stdlib.h> #include <stdint.h> #include <vulkan/vulkan.h> #ifndef VKA_ALLOC_SIZE #define VKA_ALLOC_SIZE 1024*1024*4 #endif struct VkAllocat...
```c #ifndef VKALLOC_VKALLOC_H #define VKALLOC_VKALLOC_H #include <stdlib.h> #include <stdint.h> #include <vulkan/vulkan.h> #ifndef VKA_ALLOC_SIZE #define VKA_ALLOC_SIZE 1024*1024*4 #endif struct VkAllocation { VkDeviceMemory deviceMemory = VK_NULL_HANDLE; uint64_t offset = 0; uint64_t size = 0; }; void...
null
null
Reduce transition durations to 300ms Apply this change to `public/editor/preview_export/scripts/loadPresentation.js` and return the full updated file. ```javascript var loadPresentation = function() { var presentation = localStorage.getItem('preview-string'); var config = JSON.parse(localStorage.getItem('preview-co...
```javascript var loadPresentation = function() { var presentation = localStorage.getItem('preview-string'); var config = JSON.parse(localStorage.getItem('preview-config')); if (presentation) { document.querySelector('#kine_ppt').innerHTML = presentation; document.querySelector('#impress').setAttribute('dat...
null
null
Support invalid certificates (e.g. if Fiddler is in use) and more security protocols (adds Tls1.1 and Tls1.2) Apply this change to `DrawShip.Viewer/Program.cs` and return the full updated file. ```csharp using System; using System.Windows.Forms; namespace DrawShip.Viewer { static class Program { /// <summary> ...
```csharp using System; using System.Net; using System.Windows.Forms; namespace DrawShip.Viewer { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { ServicePointManager.ServerCertificateValidationCallback = (sender, certi...
null
null
Set db default collation & charset Hopefully this will fix Travis errors which occur when loading fixtures, like ```ruby ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect string value: '\xCE\x95\xCE\xBB\xCE\xBB...' for column 'name' at row 1: INSERT INTO `languages` (`locale`, `name`, `order`, `official`, `beta...
```sql drop database if exists mo_development; create database mo_development DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; drop database if exists mo_test; create database mo_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; drop database if exists mo_tmp; create database mo_tmp; u...
null
null
Create relay for gear shifter, set relay values Apply this change to `src/com/saintsrobotics/frc/RobotMap.java` and return the full updated file. ```java package com.saintsrobotics.frc; import edu.wpi.first.wpilibj.Relay; /** * The RobotMap is a mapping from the ports sensors and actuators are wired into * to a v...
```java package com.saintsrobotics.frc; import edu.wpi.first.wpilibj.Relay; /** * The RobotMap is a mapping from the ports sensors and actuators are wired into * to a variable name. This provides flexibility changing wiring, makes checking * the wiring easier and significantly reduces the number of magic numbers ...
null
null
Use sleep instead of a busy-wait while loop to retain the output. git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@3867 a9d63959-f2ad-4865-b262-bf0e56cfafb6 Apply this change to `proctor/src/main.cpp` and return the full updated file. ```cpp #include <omp.h> #include "proctor/detector.h" #include "proctor/proct...
```cpp #include <omp.h> #include "proctor/detector.h" #include "proctor/proctor.h" #include "proctor/scanning_model_source.h" using pcl::proctor::Detector; //using pcl::proctor::ProctorMPI; using pcl::proctor::Proctor; using pcl::proctor::ScanningModelSource; Detector detector; Proctor proctor; int main(int argc, c...
null
null
Update phone number example for compatibility Apply this change to `exercises/phone-number/src/example/kotlin/PhoneNumber.kt` and return the full updated file. ```kotlin data class PhoneNumber(private val rawNumber: String) { companion object { private val validationRegex = Regex("^1?(\\d{10})$") } ...
```kotlin data class PhoneNumber(private val rawNumber: String) { companion object { private val validationRegex = Regex("^1?([2-9]\\d{2}[2-9]\\d{6})$") } private val cleanedNumber = rawNumber.replace(Regex("[^\\d]"), "") val number = validationRegex.matchEntire(cleanedNumber)?.groupValues?.las...
null
null
Remove unused positional constructor arg Apply this change to `csharp/HOLMS.Platform/HOLMS.Platform/Types/Extensions/Booking/CancellationPolicy.cs` and return the full updated file. ```csharp using HOLMS.Types.Booking.Indicators; using HOLMS.Types.Extensions; using HOLMS.Types.Primitive; namespace HOLMS.Types.Booki...
```csharp using HOLMS.Types.Booking.Indicators; using HOLMS.Types.Extensions; using HOLMS.Types.Primitive; namespace HOLMS.Types.Booking { public partial class CancellationPolicy : EntityDTO<CancellationPolicyIndicator> { public CancellationPolicy(CancellationPolicyIndicator id, string description, ...
null
null
Add converter test confirming "_Called" field Apply this change to `lib/converter_test.go` and return the full updated file. ```go package fm_test import ( "go/ast" "testing" "github.com/enocom/fm/lib" ) func TestConvertBuildsAddsSpyToTypeSpecName(t *testing.T) { converter := &fm.SpyStructConverter{} typeSpe...
```go package fm_test import ( "go/ast" "testing" "github.com/enocom/fm/lib" ) func TestConvertBuildsAddsSpyToTypeSpecName(t *testing.T) { converter := &fm.SpyStructConverter{} typeSpec := converter.Convert( &ast.TypeSpec{Name: ast.NewIdent("Tester")}, &ast.InterfaceType{ Methods: &ast.FieldList{List: m...
null
null
Make AlertBar hide after X ms. Appear on hover. Apply this change to `packages/tux/src/components/AlertBar/index.tsx` and return the full updated file. ```typescript import React from 'react' import classNames from 'classnames' import { tuxColors } from '../../styles' const AlertBar = () => ( <div className="Alert...
```typescript import React, { Component } from 'react' import classNames from 'classnames' import { tuxColors } from '../../styles' class AlertBar extends Component { hideDelay = 1500 state = { isHidden: false, } componentDidMount() { this.timer = setTimeout(() => { this.setState({ isHi...
null
null
Fix hash function to actually hash by character value Apply this change to `hashfns.go` and return the full updated file. ```go package gash // a collection of various hash function implementations. // a simple djb2 implementation func Djb2(s string) int { hash := 5381 for c := range s { hash += (ha...
```go package gash // a collection of various hash function implementations. // a simple djb2 implementation func Djb2(s string) int { hash := 5381 for _, c := range s { hash += (hash * 33) + int(c) } return hash } ```
null
null
Add PMs to service creation. Apply this change to `src/foam/nanos/boot/NSpecFactory.java` and return the full updated file. ```java /** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ package foam.nanos.boot; import foam.core.*; import foam.nano...
```java /** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ package foam.nanos.boot; import foam.core.*; import foam.nanos.*; import foam.nanos.pm.PM; public class NSpecFactory implements XFactory { NSpec spec_; ProxyX x_; boolean isCr...
null
null
Change hard coded mount point. Apply this change to `cmd/etcfs.go` and return the full updated file. ```go package main import ( "log" "bazil.org/fuse" "bazil.org/fuse/fs" "github.com/a2sdl/etcfs" ) func main() { mountpoint := "/tmp/nginx" conn, err := fuse.Mount( mountpoint, fuse.FSName("etcfs"), fuse...
```go package main import ( "log" "bazil.org/fuse" "bazil.org/fuse/fs" "github.com/a2sdl/etcfs" ) func main() { mountpoint := "/Users/gtarcea/fuse/nginx" conn, err := fuse.Mount( mountpoint, fuse.FSName("etcfs"), fuse.Subtype("etcfs"), fuse.LocalVolume(), fuse.VolumeName("etcfs"), ) if err != nil {...
null
null
Fix "Trying to get property of non-object" Apply this change to `resources/views/emails/category-removal-warning.blade.php` and return the full updated file. ```php @component('mail::message') # Dear {{ '@' . $user->username }}, moderator of [#{{ $category->name }}](https://voten.co/c/{{ $category->name }}?ref=email...
```php @component('mail::message') # Dear {{ '@' . $user->username }}, moderator of [#{{ $category->name }}](https://voten.co/c/{{ $category->name }}?ref=email) During the beta phase, to keep the community clean and active, we are deleting all the inactive channels that haven't had any activities in the last 60 days....
null
null
Remove explicit type argument since java defines declares it itself Apply this change to `app/src/main/java/de/dotwee/rgb/canteen/model/helper/SpinnerHelper.java` and return the full updated file. ```java package de.dotwee.rgb.canteen.model.helper; import android.content.Context; import android.widget.ArrayAdapter; ...
```java package de.dotwee.rgb.canteen.model.helper; import android.content.Context; import android.widget.ArrayAdapter; import java.util.List; /** * Created by lukas on 19.11.2016. */ public class SpinnerHelper { private static final String TAG = SpinnerHelper.class.getSimpleName(); public static ArrayAda...
null
null
Fix spec to call a method twice To make sure that a method is memoized, I think the method should be called twice under conditions where it normally returns a different value. Otherwise, we can't know if the result is memoized or the original method is invoked every time. Apply this change to `spec/mem_spec.rb` and ...
```ruby require "spec_helper" describe Mem do describe "#memoize" do let(:klass) do Class.new do extend Mem def foo(&block) bar(&block) end memoize :foo def bar yield end end end let(:object) do klass.new end ...
null
null
Add comment about verifying default tablespace Apply this change to `oracle/default_tablespace.sql` and return the full updated file. ```sql set define '^' set verify off ACCEPT default_tbs CHAR PROMPT 'Please enter the tablespace you would like to make the default [USERS]: ' declare l_new_tablespace varchar2(5...
```sql /* Default tablespace verified with the query: select * from database_properties where property_name = 'DEFAULT_PERMANENT_TABLESPACE'; */ set define '^' set verify off ACCEPT default_tbs CHAR PROMPT 'Please enter the tablespace you would like to make the default [USERS]: ' declare l_new_tablespace varc...
null
null
Revert "Testing GPG key on github" This reverts commit 22b0c196d0aa47ffbd016da66e98207b80bcdc82. Apply this change to `a_filter.h` and return the full updated file. ```c #ifndef A_FILTER_HDR #define A_FILTER_HDR #include "u_vector.h" namespace a { struct source; struct filterInstance { virtual void filter(flo...
```c #ifndef A_FILTER_HDR #define A_FILTER_HDR #include "u_vector.h" namespace a { struct source; struct filterInstance { virtual void filter(float *buffer, size_t samples, bool strero, float sampleRate) = 0; virtual ~filterInstance(); }; struct filter { virtual void init(source *audioSource); virtu...
null
null
Add extension method test() in Observable to easier test chain method connected with Observable. This action is similar to RxJava 2. Apply this change to `rxjava-test/src/main/java/com/elpassion/android/commons/rxjavatest/ObservableExtension.kt` and return the full updated file. ```kotlin package com.elpassion.androi...
```kotlin package com.elpassion.android.commons.rxjavatest import org.mockito.stubbing.OngoingStubbing import rx.Observable import rx.observers.TestSubscriber fun <T> OngoingStubbing<Observable<T>>.thenNeverending(): OngoingStubbing<Observable<T>> = thenReturn(Observable.never()) fun <T> OngoingStubbing<Observable<T...
null
null
Add test for inputRef prop Apply this change to `types/react-input-mask/react-input-mask-tests.tsx` and return the full updated file. ```typescript import ReactInputMask from 'react-input-mask'; import * as React from 'react'; <div> <ReactInputMask mask="+4\9 99 999 99" maskChar={null} /> <ReactInputMask mas...
```typescript import ReactInputMask from 'react-input-mask'; import * as React from 'react'; let ref: HTMLInputElement | null = null; <div> <ReactInputMask mask="+4\9 99 999 99" maskChar={null} /> <ReactInputMask mask="+7 (999) 999-99-99" /> <ReactInputMask mask="99-99-9999" defaultValue= "13-00-2017" /> ...
null
null
Set default stroke-width to 1 Apply this change to `SvgWin2D.Shared/style.cpp` and return the full updated file. ```cpp #include "pch.h" #include "style.h" using namespace Windows::Foundation; style::style() : fill_(paint_type::color, Colors::Black) , stroke_(paint_type::none, Colors::Black) , strokeWi...
```cpp #include "pch.h" #include "style.h" using namespace Windows::Foundation; style::style() : fill_(paint_type::color, Colors::Black) , stroke_(paint_type::none, Colors::Black) , strokeWidth_(length{ 1, unit::unspecified }) { } ICanvasBrush^ style::fillBrush(ICanvasResourceCreator^ resourceCreator) ...
null
null
Add -fblocks for the test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@72280 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/Sema/nonnull-check.c` and return the full updated file. ```c // RUN: clang-cc -Wnonnull -fsyntax-only -verify %s extern void func1 (void (^block1)(), void (^block2)()...
```c // RUN: clang-cc -fblocks -Wnonnull -fsyntax-only -verify %s extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull)); extern void func3 (void (^block1)(), int, void (^block2)(), int) __attribute__((nonnull(1,3))); extern void func4 (void (^block1)(), void (^block2)()) __attribute_...
null
null