repo stringlengths 8 50 | commit stringlengths 40 40 | path stringlengths 5 171 | lang stringclasses 5
values | license stringclasses 13
values | message stringlengths 21 1.33k | old_code stringlengths 15 2.4k | new_code stringlengths 140 2.61k | n_added int64 0 81 | n_removed int64 0 58 | n_hunks int64 1 8 | change_kind stringclasses 3
values | udiff stringlengths 88 3.33k | udiff-h stringlengths 85 3.32k | udiff-l stringlengths 95 3.57k | search-replace stringlengths 89 3.36k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agoda-com/Kakao | c31ae715cbba04b6d8a366b53cd101c0bad92159 | sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt | kotlin | apache-2.0 | Add test for picker dialogs
| package com.agoda.sample
| package com.agoda.sample
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import androidx.test.rule.ActivityTestRule
import com.agoda.kakao.screen.Screen
import com.agoda.sample.screen.PickersActivityScreen
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(Androi... | 43 | 0 | 1 | add_only | --- a/sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt
+++ b/sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt
@@ -2 +2,44 @@
+import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
+import androidx.test.rule.ActivityTestRule
+import com.agoda.kakao.screen.Screen
+import com.ago... | --- a/sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt
+++ b/sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt
@@ ... @@
+import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
+import androidx.test.rule.ActivityTestRule
+import com.agoda.kakao.screen.Screen
+import com.agoda.sa... | --- a/sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt
+++ b/sample/src/androidTest/kotlin/com/agoda/sample/PickersTest.kt
@@ -2 +2,44 @@
CON
ADD import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
ADD import androidx.test.rule.ActivityTestRule
ADD import com.agoda.kakao.screen.Screen
ADD... | <<<<<<< SEARCH
package com.agoda.sample
=======
package com.agoda.sample
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import androidx.test.rule.ActivityTestRule
import com.agoda.kakao.screen.Screen
import com.agoda.sample.screen.PickersActivityScreen
import org.junit.Rule
import org.junit.Tes... |
garystafford/voter-service | f48164f5b521205989b840c5dcf76e9fc43f4c56 | src/main/java/com/example/voter/HostInfoContributor.java | java | apache-2.0 | Add Mongo host info to info endpoint
| package com.example.voter;
import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;
@Component
pu... | package com.example.voter;
import com.mongodb.CommandResult;
import com.mongodb.MongoClient;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframewo... | 20 | 1 | 4 | mixed | --- a/src/main/java/com/example/voter/HostInfoContributor.java
+++ b/src/main/java/com/example/voter/HostInfoContributor.java
@@ -2,4 +2,9 @@
+import com.mongodb.CommandResult;
+import com.mongodb.MongoClient;
+import org.bson.Document;
+import org.springframework.beans.factory.annotation.Autowired;
import org.sprin... | --- a/src/main/java/com/example/voter/HostInfoContributor.java
+++ b/src/main/java/com/example/voter/HostInfoContributor.java
@@ ... @@
+import com.mongodb.CommandResult;
+import com.mongodb.MongoClient;
+import org.bson.Document;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframe... | --- a/src/main/java/com/example/voter/HostInfoContributor.java
+++ b/src/main/java/com/example/voter/HostInfoContributor.java
@@ -2,4 +2,9 @@
CON
ADD import com.mongodb.CommandResult;
ADD import com.mongodb.MongoClient;
ADD import org.bson.Document;
ADD import org.springframework.beans.factory.annotation.Autowired;
CO... | <<<<<<< SEARCH
package com.example.voter;
import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;... |
mindriot101/rust-fitsio | deabbce2100cb976a5acd9f4630193c34b79b002 | fitsio/src/columndescription.rs | rust | apache-2.0 | Add implementations of data description types
| /// Description for new columns
#[derive(Debug, Clone)]
pub struct ColumnDescription {
pub name: String,
// TODO: make this use one of the enums
/// Type of the data, see the cfitsio documentation
pub data_type: String,
}
| /// Description for new columns
#[derive(Debug, Clone)]
pub struct ColumnDescription {
pub name: String,
// TODO: make this use one of the enums
/// Type of the data, see the cfitsio documentation
pub data_type: String,
}
#[derive(Debug, Clone)]
pub struct ColumnDataDescription {
pub repeat: usize... | 54 | 0 | 1 | add_only | --- a/fitsio/src/columndescription.rs
+++ b/fitsio/src/columndescription.rs
@@ -9 +9,55 @@
}
+
+#[derive(Debug, Clone)]
+pub struct ColumnDataDescription {
+ pub repeat: usize,
+ pub width: usize,
+ pub typ: ColumnDataType,
+}
+
+impl ColumnDataDescription {
+ pub fn new(typ: ColumnDataType) -> Self {
+ ... | --- a/fitsio/src/columndescription.rs
+++ b/fitsio/src/columndescription.rs
@@ ... @@
}
+
+#[derive(Debug, Clone)]
+pub struct ColumnDataDescription {
+ pub repeat: usize,
+ pub width: usize,
+ pub typ: ColumnDataType,
+}
+
+impl ColumnDataDescription {
+ pub fn new(typ: ColumnDataType) -> Self {
+ ... | --- a/fitsio/src/columndescription.rs
+++ b/fitsio/src/columndescription.rs
@@ -9 +9,55 @@
CON }
ADD
ADD #[derive(Debug, Clone)]
ADD pub struct ColumnDataDescription {
ADD pub repeat: usize,
ADD pub width: usize,
ADD pub typ: ColumnDataType,
ADD }
ADD
ADD impl ColumnDataDescription {
ADD pub fn new(ty... | <<<<<<< SEARCH
pub data_type: String,
}
=======
pub data_type: String,
}
#[derive(Debug, Clone)]
pub struct ColumnDataDescription {
pub repeat: usize,
pub width: usize,
pub typ: ColumnDataType,
}
impl ColumnDataDescription {
pub fn new(typ: ColumnDataType) -> Self {
ColumnDataDescript... |
Jitsusama/lets-do-dns | f83282b1747e255d35e18e9fecad1750d1564f9e | do_record/record.py | python | apache-2.0 | Remove Code That Doesn't Have a Test
| """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | 1 | 5 | 1 | mixed | --- a/do_record/record.py
+++ b/do_record/record.py
@@ -35,6 +35,2 @@
def number(self, value):
- if self.number is None:
- self._number = value
- else:
- raise ValueError(
- 'Cannot externally reset a record\'s number identifier.')
+ self._number = value | --- a/do_record/record.py
+++ b/do_record/record.py
@@ ... @@
def number(self, value):
- if self.number is None:
- self._number = value
- else:
- raise ValueError(
- 'Cannot externally reset a record\'s number identifier.')
+ self._number = value
| --- a/do_record/record.py
+++ b/do_record/record.py
@@ -35,6 +35,2 @@
CON def number(self, value):
DEL if self.number is None:
DEL self._number = value
DEL else:
DEL raise ValueError(
DEL 'Cannot externally reset a record\'s number identifier.')
ADD se... | <<<<<<< SEARCH
@number.setter
def number(self, value):
if self.number is None:
self._number = value
else:
raise ValueError(
'Cannot externally reset a record\'s number identifier.')
=======
@number.setter
def number(self, value):
self._num... |
jieter/python-lora | e5fe2994b05ffbb5abca5641ae75114da315e888 | setup.py | python | mit | Use twine to upload package
| #!/usr/bin/env python
import os
import sys
from setuptools import setup
from lora import VERSION
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
if sys.argv[-1] == 'tag':
os.system("git tag -a v{} -m 'tagging v{}'".format(VERSION, VERSION))
os.system('git push && ... | #!/usr/bin/env python
import os
import sys
from setuptools import setup
from lora import VERSION
package_name = 'python-lora'
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist')
os.system('twine upload -r pypi dist/%s-%s.tar.gz' % (package_name, VERSION))
sys.exit()
if sys.argv[-1] == 'ta... | 4 | 1 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -9,4 +9,7 @@
+package_name = 'python-lora'
+
if sys.argv[-1] == 'publish':
- os.system('python setup.py sdist upload')
+ os.system('python setup.py sdist')
+ os.system('twine upload -r pypi dist/%s-%s.tar.gz' % (package_name, VERSION))
sys.exit() | --- a/setup.py
+++ b/setup.py
@@ ... @@
+package_name = 'python-lora'
+
if sys.argv[-1] == 'publish':
- os.system('python setup.py sdist upload')
+ os.system('python setup.py sdist')
+ os.system('twine upload -r pypi dist/%s-%s.tar.gz' % (package_name, VERSION))
sys.exit()
| --- a/setup.py
+++ b/setup.py
@@ -9,4 +9,7 @@
CON
ADD package_name = 'python-lora'
ADD
CON if sys.argv[-1] == 'publish':
DEL os.system('python setup.py sdist upload')
ADD os.system('python setup.py sdist')
ADD os.system('twine upload -r pypi dist/%s-%s.tar.gz' % (package_name, VERSION))
CON sys.exit()... | <<<<<<< SEARCH
from lora import VERSION
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
=======
from lora import VERSION
package_name = 'python-lora'
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist')
os.system('twine upload -r pypi dist/%s-%s.tar.gz... |
rrussell39/selenium | c0470d7f93fab4bff5364a2d5e55250075cd79df | selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java | java | apache-2.0 | SimonStewart: Make the selenium-backed webdriver emulate the normal webdriver's xpath mode
r10674
| /*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.
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 require... | /*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.
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 require... | 5 | 0 | 1 | add_only | --- a/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
+++ b/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
@@ -29,2 +29,7 @@
selenium.start();
+
+ // Emulate behaviour of webdriver
+ selenium.useXpathLibrary("javascript-xpath");
+ selenium.allow... | --- a/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
+++ b/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
@@ ... @@
selenium.start();
+
+ // Emulate behaviour of webdriver
+ selenium.useXpathLibrary("javascript-xpath");
+ selenium.allowNativeXp... | --- a/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
+++ b/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
@@ -29,2 +29,7 @@
CON selenium.start();
ADD
ADD // Emulate behaviour of webdriver
ADD selenium.useXpathLibrary("javascript-xpath");
ADD ... | <<<<<<< SEARCH
public Map<String, Object> apply(Selenium selenium, Map<String, ?> args) {
selenium.start();
Capabilities capabilities = (Capabilities) args.get("desiredCapabilities");
Map<String, Object> seenCapabilities = new HashMap<String, Object>();
=======
public Map<String, Object> apply(Sele... |
endoli/hostinfo.rs | eb0f2ee0f33a360cc38b086a86f27b092ea95adb | src/lib.rs | rust | apache-2.0 | Include core_foundation crate on macOS only.
| // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Host Info
//!
/... | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Host Info
//!
/... | 1 | 0 | 1 | add_only | --- a/src/lib.rs
+++ b/src/lib.rs
@@ -24,2 +24,3 @@
+#[cfg(target_os = "macos")]
extern crate core_foundation; | --- a/src/lib.rs
+++ b/src/lib.rs
@@ ... @@
+#[cfg(target_os = "macos")]
extern crate core_foundation;
| --- a/src/lib.rs
+++ b/src/lib.rs
@@ -24,2 +24,3 @@
CON
ADD #[cfg(target_os = "macos")]
CON extern crate core_foundation;
| <<<<<<< SEARCH
unused_import_braces, unused_qualifications)]
extern crate core_foundation;
extern crate libc;
=======
unused_import_braces, unused_qualifications)]
#[cfg(target_os = "macos")]
extern crate core_foundation;
extern crate libc;
>>>>>>> REPLACE
|
tock/libtock-rs | c877a6c44324b0135017ab1e1300c0d666746c84 | core/platform/src/syscalls_impl.rs | rust | apache-2.0 | Move yield_no_wait's flag init out of `unsafe`.
Turns out core::mem::MaybeUninit::uninit is not `unsafe`!
| //! Implements `Syscalls` for all types that implement `RawSyscalls`.
use crate::{RawSyscalls, Syscalls, YieldNoWaitReturn};
mod yield_op {
pub const NO_WAIT: u32 = 0;
pub const WAIT: u32 = 1;
}
impl<S: RawSyscalls> Syscalls for S {
// ---------------------------------------------------------------------... | //! Implements `Syscalls` for all types that implement `RawSyscalls`.
use crate::{RawSyscalls, Syscalls, YieldNoWaitReturn};
mod yield_op {
pub const NO_WAIT: u32 = 0;
pub const WAIT: u32 = 1;
}
impl<S: RawSyscalls> Syscalls for S {
// ---------------------------------------------------------------------... | 5 | 7 | 1 | mixed | --- a/core/platform/src/syscalls_impl.rs
+++ b/core/platform/src/syscalls_impl.rs
@@ -15,10 +15,8 @@
fn yield_no_wait() -> YieldNoWaitReturn {
+ let mut flag = core::mem::MaybeUninit::<YieldNoWaitReturn>::uninit();
+
unsafe {
- // flag can be uninitialized because it is not read before t... | --- a/core/platform/src/syscalls_impl.rs
+++ b/core/platform/src/syscalls_impl.rs
@@ ... @@
fn yield_no_wait() -> YieldNoWaitReturn {
+ let mut flag = core::mem::MaybeUninit::<YieldNoWaitReturn>::uninit();
+
unsafe {
- // flag can be uninitialized because it is not read before the yield
... | --- a/core/platform/src/syscalls_impl.rs
+++ b/core/platform/src/syscalls_impl.rs
@@ -15,10 +15,8 @@
CON fn yield_no_wait() -> YieldNoWaitReturn {
ADD let mut flag = core::mem::MaybeUninit::<YieldNoWaitReturn>::uninit();
ADD
CON unsafe {
DEL // flag can be uninitialized because it is no... | <<<<<<< SEARCH
fn yield_no_wait() -> YieldNoWaitReturn {
unsafe {
// flag can be uninitialized because it is not read before the yield
// system call, and the kernel promises to only write to it (not
// read it).
let mut flag = core::mem::MaybeUninit::<YieldN... |
hughrawlinson/meyda | 5ad80c5925dc6b47510fb238d33439192500602c | webpack.config.js | javascript | mit | Change libraryTarget to UMD, remove add-module-export plugin
| var path = require('path');
var webpack = require('webpack');
module.exports = {
regular: {
devtool: 'source-map',
output: {
filename: 'meyda.js',
library: 'Meyda',
libraryTarget: 'var'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
... | var path = require('path');
var webpack = require('webpack');
module.exports = {
regular: {
devtool: 'source-map',
output: {
filename: 'meyda.js',
library: 'Meyda',
libraryTarget: 'umd'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
... | 4 | 10 | 4 | mixed | --- a/webpack.config.js
+++ b/webpack.config.js
@@ -9,3 +9,3 @@
library: 'Meyda',
- libraryTarget: 'var'
+ libraryTarget: 'umd'
},
@@ -18,6 +18,3 @@
options: {
- presets: ['es2015'],
- plugins: [
- 'add-module-exports'
- ]
+ presets:... | --- a/webpack.config.js
+++ b/webpack.config.js
@@ ... @@
library: 'Meyda',
- libraryTarget: 'var'
+ libraryTarget: 'umd'
},
@@ ... @@
options: {
- presets: ['es2015'],
- plugins: [
- 'add-module-exports'
- ]
+ presets: [['es2015', {... | --- a/webpack.config.js
+++ b/webpack.config.js
@@ -9,3 +9,3 @@
CON library: 'Meyda',
DEL libraryTarget: 'var'
ADD libraryTarget: 'umd'
CON },
@@ -18,6 +18,3 @@
CON options: {
DEL presets: ['es2015'],
DEL plugins: [
DEL 'add-module-exports'
DEL ... | <<<<<<< SEARCH
filename: 'meyda.js',
library: 'Meyda',
libraryTarget: 'var'
},
module: {
=======
filename: 'meyda.js',
library: 'Meyda',
libraryTarget: 'umd'
},
module: {
>>>>>>> REPLACE
<<<<<<< SEARCH
loader: 'babel-loader',
options: {
pr... |
jmeas/api-pls | acbd1a7b82d756ffd553d8ec23c402e8e6a42571 | server/api.js | javascript | mit | Add 404 handler to unhandled requests
| 'use strict';
const express = require('express');
const routeBuilder = require('express-routebuilder');
const Resource = require('./resource');
const loadResources = require('./util/load-resources');
module.exports = function() {
const router = express.Router();
// This version needs to be externalized
var api... | 'use strict';
const express = require('express');
const routeBuilder = require('express-routebuilder');
const Resource = require('./resource');
const serverErrors = require('./util/server-errors');
const loadResources = require('./util/load-resources');
module.exports = function() {
const router = express.Router();... | 8 | 0 | 2 | add_only | --- a/server/api.js
+++ b/server/api.js
@@ -5,2 +5,3 @@
const Resource = require('./resource');
+const serverErrors = require('./util/server-errors');
const loadResources = require('./util/load-resources');
@@ -41,2 +42,9 @@
+ // All other requests get a default 404 error.
+ router.get('*', (req, res) => {
+ r... | --- a/server/api.js
+++ b/server/api.js
@@ ... @@
const Resource = require('./resource');
+const serverErrors = require('./util/server-errors');
const loadResources = require('./util/load-resources');
@@ ... @@
+ // All other requests get a default 404 error.
+ router.get('*', (req, res) => {
+ res.status(serv... | --- a/server/api.js
+++ b/server/api.js
@@ -5,2 +5,3 @@
CON const Resource = require('./resource');
ADD const serverErrors = require('./util/server-errors');
CON const loadResources = require('./util/load-resources');
@@ -41,2 +42,9 @@
CON
ADD // All other requests get a default 404 error.
ADD router.get('*', (req... | <<<<<<< SEARCH
const routeBuilder = require('express-routebuilder');
const Resource = require('./resource');
const loadResources = require('./util/load-resources');
=======
const routeBuilder = require('express-routebuilder');
const Resource = require('./resource');
const serverErrors = require('./util/server-errors'... |
sigp/lighthouse | dc0696754be06da921b2536af1771f9bdbc9d200 | beacon_node/beacon_chain/test_harness/tests/chain.rs | rust | apache-2.0 | Raise log level on test_harness tests
| use env_logger::{Builder, Env};
use log::debug;
use test_harness::BeaconChainHarness;
use types::ChainSpec;
#[test]
fn it_can_build_on_genesis_block() {
Builder::from_env(Env::default().default_filter_or("trace")).init();
let spec = ChainSpec::few_validators();
let validator_count = 8;
let mut harnes... | use env_logger::{Builder, Env};
use log::debug;
use test_harness::BeaconChainHarness;
use types::ChainSpec;
#[test]
fn it_can_build_on_genesis_block() {
Builder::from_env(Env::default().default_filter_or("info")).init();
let spec = ChainSpec::few_validators();
let validator_count = 8;
let mut harness... | 2 | 2 | 2 | mixed | --- a/beacon_node/beacon_chain/test_harness/tests/chain.rs
+++ b/beacon_node/beacon_chain/test_harness/tests/chain.rs
@@ -7,3 +7,3 @@
fn it_can_build_on_genesis_block() {
- Builder::from_env(Env::default().default_filter_or("trace")).init();
+ Builder::from_env(Env::default().default_filter_or("info")).init();
... | --- a/beacon_node/beacon_chain/test_harness/tests/chain.rs
+++ b/beacon_node/beacon_chain/test_harness/tests/chain.rs
@@ ... @@
fn it_can_build_on_genesis_block() {
- Builder::from_env(Env::default().default_filter_or("trace")).init();
+ Builder::from_env(Env::default().default_filter_or("info")).init();
@@ ..... | --- a/beacon_node/beacon_chain/test_harness/tests/chain.rs
+++ b/beacon_node/beacon_chain/test_harness/tests/chain.rs
@@ -7,3 +7,3 @@
CON fn it_can_build_on_genesis_block() {
DEL Builder::from_env(Env::default().default_filter_or("trace")).init();
ADD Builder::from_env(Env::default().default_filter_or("info")).... | <<<<<<< SEARCH
#[test]
fn it_can_build_on_genesis_block() {
Builder::from_env(Env::default().default_filter_or("trace")).init();
let spec = ChainSpec::few_validators();
=======
#[test]
fn it_can_build_on_genesis_block() {
Builder::from_env(Env::default().default_filter_or("info")).init();
let spec = ... |
dkrathi457/app | 870800d5240e9fdc2f610204fd495c69bfae7f63 | lib/forgot/forgot-view.js | javascript | mit | Remove unneeded switchOff function from forgot view
| /*
* Module dependencies.
*/
var template = require('./forgot-form');
var t = require('t');
var FormView = require('form-view');
var page = require('page');
/**
* Expose ForgotView.
*/
module.exports = ForgotView;
/**
* Forgot password view
*
* @return {ForgotView} `ForgotView` instance.
* @api public
*/
... | /*
* Module dependencies.
*/
var template = require('./forgot-form');
var t = require('t');
var FormView = require('form-view');
var page = require('page');
/**
* Expose ForgotView.
*/
module.exports = ForgotView;
/**
* Forgot password view
*
* @return {ForgotView} `ForgotView` instance.
* @api public
*/
... | 0 | 5 | 1 | del_only | --- a/lib/forgot/forgot-view.js
+++ b/lib/forgot/forgot-view.js
@@ -41,7 +41,2 @@
-ForgotView.prototype.switchoff = function() {
- this.off('success', this.bound('onsuccess'));
- this.off('error', this.bound('onerror'));
-};
-
/** | --- a/lib/forgot/forgot-view.js
+++ b/lib/forgot/forgot-view.js
@@ ... @@
-ForgotView.prototype.switchoff = function() {
- this.off('success', this.bound('onsuccess'));
- this.off('error', this.bound('onerror'));
-};
-
/**
| --- a/lib/forgot/forgot-view.js
+++ b/lib/forgot/forgot-view.js
@@ -41,7 +41,2 @@
CON
DEL ForgotView.prototype.switchoff = function() {
DEL this.off('success', this.bound('onsuccess'));
DEL this.off('error', this.bound('onerror'));
DEL };
DEL
CON /**
| <<<<<<< SEARCH
};
ForgotView.prototype.switchoff = function() {
this.off('success', this.bound('onsuccess'));
this.off('error', this.bound('onerror'));
};
/**
* Show success message
=======
};
/**
* Show success message
>>>>>>> REPLACE
|
elpassion/android-commons | 2ca7bff437f0bf9b90d871689346d774df1a78e0 | espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt | kotlin | apache-2.0 | Add does not have ChildWithTextAssertionsTests
| package com.elpassion.android.commons.espresso
import android.os.Bundle
import android.support.test.rule.ActivityTestRule
import android.widget.Button
import android.widget.FrameLayout
import org.junit.Rule
import org.junit.Test
class HasChildWithTextAssertionsTest {
@JvmField @Rule
val activityRule = Activi... | package com.elpassion.android.commons.espresso
import android.os.Bundle
import android.support.test.rule.ActivityTestRule
import android.widget.Button
import android.widget.FrameLayout
import org.junit.Rule
import org.junit.Test
class HasChildWithTextAssertionsTest {
@JvmField @Rule
val activityRule = Activi... | 10 | 0 | 1 | add_only | --- a/espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt
+++ b/espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt
@@ -24,2 +24,12 @@
+ @Test
+ fun shouldConfirmDoesNotHaveChildWithText() {
+ onId(anId)... | --- a/espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt
+++ b/espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt
@@ ... @@
+ @Test
+ fun shouldConfirmDoesNotHaveChildWithText() {
+ onId(anId).doesNotH... | --- a/espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt
+++ b/espresso/src/androidTest/java/com/elpassion/android/commons/espresso/HasChildWithTextAssertionsTest.kt
@@ -24,2 +24,12 @@
CON
ADD @Test
ADD fun shouldConfirmDoesNotHaveChildWithText() {
ADD ... | <<<<<<< SEARCH
}
class Activity : android.app.Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
=======
}
@Test
fun shouldConfirmDoesNotHaveChildWithText() {
onId(anId).doesNotHaveChildWithText("not existing text")
}
@Test
fun shouldConfirmDoesNotHaveC... |
vespa-engine/vespa | 9d46e55257521413d7171958d674a800332840e6 | config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java | java | apache-2.0 | Add method to get SystemName.Environment.RegionName
| // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision.zone;
import com.yahoo.config.provision.CloudName;
import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.RegionName;
import com.yahoo.config.provision.S... | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision.zone;
import com.yahoo.config.provision.CloudName;
import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.RegionName;
import com.yahoo.config.provision.S... | 5 | 0 | 1 | add_only | --- a/config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java
@@ -16,2 +16,7 @@
ZoneId getId();
+
+ /** Returns the SYSTEM.ENVIRONMENT.REGION string. */
+ default String getFullName() {
+ return... | --- a/config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java
@@ ... @@
ZoneId getId();
+
+ /** Returns the SYSTEM.ENVIRONMENT.REGION string. */
+ default String getFullName() {
+ return getSyst... | --- a/config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/zone/ZoneApi.java
@@ -16,2 +16,7 @@
CON ZoneId getId();
ADD
ADD /** Returns the SYSTEM.ENVIRONMENT.REGION string. */
ADD default String getFullName() {
ADD... | <<<<<<< SEARCH
ZoneId getId();
/**
=======
ZoneId getId();
/** Returns the SYSTEM.ENVIRONMENT.REGION string. */
default String getFullName() {
return getSystemName().value() + "." + getEnvironment().value() + "." + getRegionName().value();
}
/**
>>>>>>> REPLACE
|
jwilm/strava-rs | e59ffa425f1614ce226c66b4d6c341f3126a7062 | src/api.rs | rust | mpl-2.0 | Add paging methods to Paginated
| use accesstoken::AccessToken;
#[doc(hidden)]
pub fn v3(token: &AccessToken, url: String) -> String {
format!("https://www.strava.com/api/v3/{}?access_token={}", url, token.get())
}
#[derive(Debug)]
pub struct Paginated<T> {
page: i32,
per_page: i32,
url: String,
data: Vec<T>
}
impl<T> Paginated<T... | use accesstoken::AccessToken;
#[doc(hidden)]
pub fn v3(token: &AccessToken, url: String) -> String {
format!("https://www.strava.com/api/v3/{}?access_token={}", url, token.get())
}
/// Wrapper for endpoints that paginate
///
/// A Paginated<T> will be returned from any endpoint that supports paging. Provides meth... | 29 | 2 | 2 | mixed | --- a/src/api.rs
+++ b/src/api.rs
@@ -7,6 +7,10 @@
+/// Wrapper for endpoints that paginate
+///
+/// A Paginated<T> will be returned from any endpoint that supports paging. Provides methods for
+/// fetching the next page and checking if more pages are available.
#[derive(Debug)]
pub struct Paginated<T> {
- pag... | --- a/src/api.rs
+++ b/src/api.rs
@@ ... @@
+/// Wrapper for endpoints that paginate
+///
+/// A Paginated<T> will be returned from any endpoint that supports paging. Provides methods for
+/// fetching the next page and checking if more pages are available.
#[derive(Debug)]
pub struct Paginated<T> {
- page: i32,... | --- a/src/api.rs
+++ b/src/api.rs
@@ -7,6 +7,10 @@
CON
ADD /// Wrapper for endpoints that paginate
ADD ///
ADD /// A Paginated<T> will be returned from any endpoint that supports paging. Provides methods for
ADD /// fetching the next page and checking if more pages are available.
CON #[derive(Debug)]
CON pub struct Pa... | <<<<<<< SEARCH
}
#[derive(Debug)]
pub struct Paginated<T> {
page: i32,
per_page: i32,
url: String,
data: Vec<T>
=======
}
/// Wrapper for endpoints that paginate
///
/// A Paginated<T> will be returned from any endpoint that supports paging. Provides methods for
/// fetching the next page and checkin... |
AcapellaSoft/Aconite | 68efdf458c0985c48ff8a1d9f3d38bed007f5632 | aconite-core/src/io/aconite/utils/Async.kt | kotlin | mit | Use of COROUTINE_SUSPENDED from Kotlin internals
| package io.aconite.utils
import java.lang.reflect.InvocationTargetException
import kotlin.coroutines.experimental.Continuation
import kotlin.coroutines.experimental.CoroutineContext
import kotlin.coroutines.experimental.suspendCoroutine
import kotlin.reflect.KFunction
/**
* This object can be used as the return valu... | package io.aconite.utils
import java.lang.reflect.InvocationTargetException
import kotlin.coroutines.experimental.suspendCoroutine
import kotlin.reflect.KFunction
/**
* This object can be used as the return value of the async function to indicate
* that function was suspended.
* TODO: find better way to use suspen... | 10 | 22 | 3 | mixed | --- a/aconite-core/src/io/aconite/utils/Async.kt
+++ b/aconite-core/src/io/aconite/utils/Async.kt
@@ -3,4 +3,2 @@
import java.lang.reflect.InvocationTargetException
-import kotlin.coroutines.experimental.Continuation
-import kotlin.coroutines.experimental.CoroutineContext
import kotlin.coroutines.experimental.suspend... | --- a/aconite-core/src/io/aconite/utils/Async.kt
+++ b/aconite-core/src/io/aconite/utils/Async.kt
@@ ... @@
import java.lang.reflect.InvocationTargetException
-import kotlin.coroutines.experimental.Continuation
-import kotlin.coroutines.experimental.CoroutineContext
import kotlin.coroutines.experimental.suspendCorout... | --- a/aconite-core/src/io/aconite/utils/Async.kt
+++ b/aconite-core/src/io/aconite/utils/Async.kt
@@ -3,4 +3,2 @@
CON import java.lang.reflect.InvocationTargetException
DEL import kotlin.coroutines.experimental.Continuation
DEL import kotlin.coroutines.experimental.CoroutineContext
CON import kotlin.coroutines.experime... | <<<<<<< SEARCH
import java.lang.reflect.InvocationTargetException
import kotlin.coroutines.experimental.Continuation
import kotlin.coroutines.experimental.CoroutineContext
import kotlin.coroutines.experimental.suspendCoroutine
import kotlin.reflect.KFunction
/**
* This object can be used as the return value of the a... |
Reinaesaya/OUIRL-ChatBot | 396ab20874a0c3492482a8ae03fd7d61980917a5 | chatterbot/adapters/logic/closest_match.py | python | bsd-3-clause | Update closest match adapter docstring.
| # -*- coding: utf-8 -*-
from fuzzywuzzy import fuzz
from .base_match import BaseMatchAdapter
class ClosestMatchAdapter(BaseMatchAdapter):
"""
The ClosestMatchAdapter logic adapter creates a response by
using fuzzywuzzy's process class to extract the most similar
response to the input. This adapter s... | # -*- coding: utf-8 -*-
from fuzzywuzzy import fuzz
from .base_match import BaseMatchAdapter
class ClosestMatchAdapter(BaseMatchAdapter):
"""
The ClosestMatchAdapter logic adapter selects a known response
to an input by searching for a known statement that most closely
matches the input based on the L... | 3 | 6 | 2 | mixed | --- a/chatterbot/adapters/logic/closest_match.py
+++ b/chatterbot/adapters/logic/closest_match.py
@@ -2,3 +2,2 @@
from fuzzywuzzy import fuzz
-
from .base_match import BaseMatchAdapter
@@ -8,7 +7,5 @@
"""
- The ClosestMatchAdapter logic adapter creates a response by
- using fuzzywuzzy's process class to e... | --- a/chatterbot/adapters/logic/closest_match.py
+++ b/chatterbot/adapters/logic/closest_match.py
@@ ... @@
from fuzzywuzzy import fuzz
-
from .base_match import BaseMatchAdapter
@@ ... @@
"""
- The ClosestMatchAdapter logic adapter creates a response by
- using fuzzywuzzy's process class to extract the m... | --- a/chatterbot/adapters/logic/closest_match.py
+++ b/chatterbot/adapters/logic/closest_match.py
@@ -2,3 +2,2 @@
CON from fuzzywuzzy import fuzz
DEL
CON from .base_match import BaseMatchAdapter
@@ -8,7 +7,5 @@
CON """
DEL The ClosestMatchAdapter logic adapter creates a response by
DEL using fuzzywuzzy's ... | <<<<<<< SEARCH
# -*- coding: utf-8 -*-
from fuzzywuzzy import fuzz
from .base_match import BaseMatchAdapter
class ClosestMatchAdapter(BaseMatchAdapter):
"""
The ClosestMatchAdapter logic adapter creates a response by
using fuzzywuzzy's process class to extract the most similar
response to the input.... |
mchung94/latest-versions | b0814b95ea854f7b3f0b9db48ae9beee078c2a30 | versions/software/openjdk.py | python | mit | Update OpenJDK version to support both 8 and 9.
| import re
from versions.software.utils import get_command_stderr, get_soup, \
get_text_between
def name():
"""Return the precise name for the software."""
return 'Zulu OpenJDK'
def installed_version():
"""Return the installed version of the jdk, or None if not installed."""
try:
version... | import re
from versions.software.utils import get_command_stderr, get_soup, \
get_text_between
def name():
"""Return the precise name for the software."""
return 'Zulu OpenJDK'
def installed_version():
"""Return the installed version of the jdk, or None if not installed."""
try:
version... | 12 | 15 | 2 | mixed | --- a/versions/software/openjdk.py
+++ b/versions/software/openjdk.py
@@ -15,2 +15,3 @@
version_string = get_command_stderr(('java', '-version'))
+ # "1.8.0_162" or "9.0.4.1" for example
return get_text_between(version_string, '"', '"')
@@ -20,21 +21,17 @@
-def downloadable_version(url):
- ... | --- a/versions/software/openjdk.py
+++ b/versions/software/openjdk.py
@@ ... @@
version_string = get_command_stderr(('java', '-version'))
+ # "1.8.0_162" or "9.0.4.1" for example
return get_text_between(version_string, '"', '"')
@@ ... @@
-def downloadable_version(url):
- """Strip the vers... | --- a/versions/software/openjdk.py
+++ b/versions/software/openjdk.py
@@ -15,2 +15,3 @@
CON version_string = get_command_stderr(('java', '-version'))
ADD # "1.8.0_162" or "9.0.4.1" for example
CON return get_text_between(version_string, '"', '"')
@@ -20,21 +21,17 @@
CON
DEL def downloadable_ver... | <<<<<<< SEARCH
try:
version_string = get_command_stderr(('java', '-version'))
return get_text_between(version_string, '"', '"')
except FileNotFoundError:
pass
def downloadable_version(url):
"""Strip the version out of the Zulu OpenJDK manual download link."""
# example: http://... |
google/evergreen-checker | 6b15019a023f26228cf0baeb0e4b1a052987e6ab | build.gradle.kts | kotlin | apache-2.0 | Update `kotlin_version` from `1.4.21` to `1.5.0`
| // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | 1 | 1 | 1 | mixed | --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,3 +19,3 @@
buildscript {
- extra["kotlin_version"] = "1.4.21"
+ extra["kotlin_version"] = "1.5.0"
| --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ ... @@
buildscript {
- extra["kotlin_version"] = "1.4.21"
+ extra["kotlin_version"] = "1.5.0"
| --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,3 +19,3 @@
CON buildscript {
DEL extra["kotlin_version"] = "1.4.21"
ADD extra["kotlin_version"] = "1.5.0"
CON
| <<<<<<< SEARCH
buildscript {
extra["kotlin_version"] = "1.4.21"
repositories {
=======
buildscript {
extra["kotlin_version"] = "1.5.0"
repositories {
>>>>>>> REPLACE
|
dtolnay/syn | d9e61a5ebe2d3bc0b1077f304a31bf377d9c83d0 | tests/test_ty.rs | rust | apache-2.0 | Add test for Type containing macro metavariable
| use syn::Type;
#[test]
fn test_mut_self() {
syn::parse_str::<Type>("fn(mut self)").unwrap();
syn::parse_str::<Type>("fn(mut self: ())").unwrap();
syn::parse_str::<Type>("fn(mut self: ...)").unwrap_err();
syn::parse_str::<Type>("fn(mut self: mut self)").unwrap_err();
syn::parse_str::<Type>("fn(mut s... | #[macro_use]
mod macros;
use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
use quote::quote;
use std::iter::FromIterator;
use syn::Type;
#[test]
fn test_mut_self() {
syn::parse_str::<Type>("fn(mut self)").unwrap();
syn::parse_str::<Type>("fn(mut self: ())").unwrap();
... | 43 | 0 | 2 | add_only | --- a/tests/test_ty.rs
+++ b/tests/test_ty.rs
@@ -1 +1,7 @@
+#[macro_use]
+mod macros;
+
+use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
+use quote::quote;
+use std::iter::FromIterator;
use syn::Type;
@@ -10 +16,38 @@
}
+
+#[test]
+fn test_macro_variable_type() {
+ // mim... | --- a/tests/test_ty.rs
+++ b/tests/test_ty.rs
@@ ... @@
+#[macro_use]
+mod macros;
+
+use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
+use quote::quote;
+use std::iter::FromIterator;
use syn::Type;
@@ ... @@
}
+
+#[test]
+fn test_macro_variable_type() {
+ // mimics the tok... | --- a/tests/test_ty.rs
+++ b/tests/test_ty.rs
@@ -1 +1,7 @@
ADD #[macro_use]
ADD mod macros;
ADD
ADD use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
ADD use quote::quote;
ADD use std::iter::FromIterator;
CON use syn::Type;
@@ -10 +16,38 @@
CON }
ADD
ADD #[test]
ADD fn test_ma... | <<<<<<< SEARCH
use syn::Type;
=======
#[macro_use]
mod macros;
use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
use quote::quote;
use std::iter::FromIterator;
use syn::Type;
>>>>>>> REPLACE
<<<<<<< SEARCH
syn::parse_str::<Type>("fn(mut self::T)").unwrap_err();
}
=====... |
kvakil/venus | a70c35802d37fff0efdf24235963269731ca93d9 | src/main/kotlin/venus/simulator/impls/ECALLImpl.kt | kotlin | mit | Add terminate with exit code
| package venus.simulator.impls
import venus.riscv.Instruction
import venus.simulator.Simulator
import venus.simulator.InstructionImplementation
import venus.glue.Renderer
object ECALLImpl : InstructionImplementation {
override operator fun invoke(inst: Instruction, sim: Simulator) {
val which = sim.getReg(... | package venus.simulator.impls
import venus.riscv.Instruction
import venus.simulator.Simulator
import venus.simulator.InstructionImplementation
import venus.glue.Renderer
object ECALLImpl : structionImplementation {
override operator fun invoke(inst: Instruction, sim: Simulator) {
val which = sim.getReg(10... | 6 | 1 | 2 | mixed | --- a/src/main/kotlin/venus/simulator/impls/ECALLImpl.kt
+++ b/src/main/kotlin/venus/simulator/impls/ECALLImpl.kt
@@ -7,3 +7,3 @@
-object ECALLImpl : InstructionImplementation {
+object ECALLImpl : structionImplementation {
override operator fun invoke(inst: Instruction, sim: Simulator) {
@@ -39,2 +39,7 @@
... | --- a/src/main/kotlin/venus/simulator/impls/ECALLImpl.kt
+++ b/src/main/kotlin/venus/simulator/impls/ECALLImpl.kt
@@ ... @@
-object ECALLImpl : InstructionImplementation {
+object ECALLImpl : structionImplementation {
override operator fun invoke(inst: Instruction, sim: Simulator) {
@@ ... @@
}
+ ... | --- a/src/main/kotlin/venus/simulator/impls/ECALLImpl.kt
+++ b/src/main/kotlin/venus/simulator/impls/ECALLImpl.kt
@@ -7,3 +7,3 @@
CON
DEL object ECALLImpl : InstructionImplementation {
ADD object ECALLImpl : structionImplementation {
CON override operator fun invoke(inst: Instruction, sim: Simulator) {
@@ -39,2 +3... | <<<<<<< SEARCH
import venus.glue.Renderer
object ECALLImpl : InstructionImplementation {
override operator fun invoke(inst: Instruction, sim: Simulator) {
val which = sim.getReg(10)
=======
import venus.glue.Renderer
object ECALLImpl : structionImplementation {
override operator fun invoke(inst: Inst... |
carnesen/mathjs-app | b710962f59a12613deb5e9197bd166dad19161b1 | webpack.config.babel.js | javascript | mit | Purge style loader from webpack config
| import path from 'path'
import webpack from 'webpack'
const { NODE_ENV } = process.env
const production = NODE_ENV === 'production'
const plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(NODE_ENV)
})
]
let extension = '.js'
if (production) {
plugins.push(new webpack.optimize.Ug... | import path from 'path'
import webpack from 'webpack'
const { NODE_ENV } = process.env
const production = NODE_ENV === 'production'
const plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(NODE_ENV)
})
]
let extension = '.js'
if (production) {
plugins.push(new webpack.optimize.Ug... | 1 | 2 | 1 | mixed | --- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ -37,4 +37,3 @@
},
- { test: /\.json$/, loader: 'json-loader' },
- { test: /\.css$/, loader: 'style-loader!css-loader' }
+ { test: /\.json$/, loader: 'json-loader' }
] | --- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ ... @@
},
- { test: /\.json$/, loader: 'json-loader' },
- { test: /\.css$/, loader: 'style-loader!css-loader' }
+ { test: /\.json$/, loader: 'json-loader' }
]
| --- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ -37,4 +37,3 @@
CON },
DEL { test: /\.json$/, loader: 'json-loader' },
DEL { test: /\.css$/, loader: 'style-loader!css-loader' }
ADD { test: /\.json$/, loader: 'json-loader' }
CON ]
| <<<<<<< SEARCH
exclude: /node_modules/
},
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.css$/, loader: 'style-loader!css-loader' }
]
}
=======
exclude: /node_modules/
},
{ test: /\.json$/, loader: 'json-loader' }
]
}
>>>>>>> REPL... |
rbartoli/react-boilerplate | ba9b586cd4567b739cbe94e51b47e1f933ae1242 | webpack.config.js | javascript | mit | Change log level to info
| var path = require('path');
var devConfig = {
context: path.join(__dirname, '/app'),
entry: [
'./app.js'
],
output: {
path: path.join(__dirname, '/build/'),
publicPath: '/public/assets/js/',
filename: 'app.js',
},
devtool: 'eval-source-map',
devServer: {
... | var path = require('path');
var devConfig = {
context: path.join(__dirname, '/app'),
entry: [
'./app.js'
],
output: {
path: path.join(__dirname, '/build/'),
publicPath: '/public/assets/js/',
filename: 'app.js',
},
devtool: 'eval-source-map',
devServer: {
... | 1 | 3 | 1 | mixed | --- a/webpack.config.js
+++ b/webpack.config.js
@@ -15,5 +15,3 @@
contentBase: 'public',
- historyApiFallback: false,
-
- stats: 'errors-only'
+ historyApiFallback: false
}, | --- a/webpack.config.js
+++ b/webpack.config.js
@@ ... @@
contentBase: 'public',
- historyApiFallback: false,
-
- stats: 'errors-only'
+ historyApiFallback: false
},
| --- a/webpack.config.js
+++ b/webpack.config.js
@@ -15,5 +15,3 @@
CON contentBase: 'public',
DEL historyApiFallback: false,
DEL
DEL stats: 'errors-only'
ADD historyApiFallback: false
CON },
| <<<<<<< SEARCH
devServer: {
contentBase: 'public',
historyApiFallback: false,
stats: 'errors-only'
},
module: {
=======
devServer: {
contentBase: 'public',
historyApiFallback: false
},
module: {
>>>>>>> REPLACE
|
androidx/androidx | 7439b9a7bdf87fca17db852766191cee05fceb37 | lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt | kotlin | apache-2.0 | Fix broken Lint version check for lifecycle
Bug: 189211535
Test: ApiLintVersionsTest#versionsCheck
Change-Id: I6b87f10803b615ab6a4e305883b7a5d9f118b77f
| /*
* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | /*
* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 1 | 1 | 1 | mixed | --- a/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
+++ b/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
@@ -37,3 +37,3 @@
// studio and command line
- Assert.assertEquals(3, registry.minApi)
+ ... | --- a/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
+++ b/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
@@ ... @@
// studio and command line
- Assert.assertEquals(3, registry.minApi)
+ Assert.a... | --- a/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
+++ b/lifecycle/lifecycle-runtime-ktx-lint/src/test/java/androidx/lifecycle/lint/ApiLintVersionsTest.kt
@@ -37,3 +37,3 @@
CON // studio and command line
DEL Assert.assertEquals(3, registry.minApi)
ADD... | <<<<<<< SEARCH
// Intentionally fails in IDE, because we use different API version in
// studio and command line
Assert.assertEquals(3, registry.minApi)
}
}
=======
// Intentionally fails in IDE, because we use different API version in
// studio and command line
Asse... |
dirvine/rust-utp | 3a8fa9325a54a4ca4837cc63a577f4cf9c78056c | src/lib.rs | rust | apache-2.0 | Add example to module documentation.
| //! Implementation of the Micro Transport Protocol.[^spec]
//!
//! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
// __________ ____ ____
// /_ __/ __ \/ __ \/ __ \
// / / / / / / / / / / / /
// / / / /_/ / /_/ / /_/ /
// /_/ \____/_____/\____/
//
// - Lossy UDP socket for testing purposes: send and r... | //! Implementation of the Micro Transport Protocol.[^spec]
//!
//! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
//! # Examples
//!
//! ```
//! extern crate utp;
//!
//! use utp::UtpStream;
//! use std::io::{Read, Write};
//!
//! fn main() {
//! // Connect to an hypothetical local server running on port 80... | 30 | 0 | 1 | add_only | --- a/src/lib.rs
+++ b/src/lib.rs
@@ -3,2 +3,32 @@
//! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
+
+//! # Examples
+//!
+//! ```
+//! extern crate utp;
+//!
+//! use utp::UtpStream;
+//! use std::io::{Read, Write};
+//!
+//! fn main() {
+//! // Connect to an hypothetical local server running on port 80... | --- a/src/lib.rs
+++ b/src/lib.rs
@@ ... @@
//! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
+
+//! # Examples
+//!
+//! ```
+//! extern crate utp;
+//!
+//! use utp::UtpStream;
+//! use std::io::{Read, Write};
+//!
+//! fn main() {
+//! // Connect to an hypothetical local server running on port 8080
+//!... | --- a/src/lib.rs
+++ b/src/lib.rs
@@ -3,2 +3,32 @@
CON //! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
ADD
ADD //! # Examples
ADD //!
ADD //! ```
ADD //! extern crate utp;
ADD //!
ADD //! use utp::UtpStream;
ADD //! use std::io::{Read, Write};
ADD //!
ADD //! fn main() {
ADD //! // Connect to an hypothet... | <<<<<<< SEARCH
//!
//! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
// __________ ____ ____
=======
//!
//! [^spec]: http://www.bittorrent.org/beps/bep_0029.html
//! # Examples
//!
//! ```
//! extern crate utp;
//!
//! use utp::UtpStream;
//! use std::io::{Read, Write};
//!
//! fn main() {
//! // Co... |
orekyuu/intellij-community | 5a9210545798d7590ab786fb49f82078b3a9afc6 | runtimesource/com/intellij/rt/execution/junit2/RunOnce.java | java | apache-2.0 | Upgrade to JUnit 4.0: Fixing Vector -> List update consequences.
| package com.intellij.rt.execution.junit2;
import junit.framework.TestResult;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.framework.Test;
import java.util.Hashtable;
import java.util.Enumeration;
public class RunOnce extends TestResult {
private Hashtable myPeformedTests = new Ha... | package com.intellij.rt.execution.junit2;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
import java.util.Hashtable;
public class RunOnce extends TestResult {
private Hashtable myPeformedTests = new Hashtable();
private static fi... | 8 | 8 | 3 | mixed | --- a/runtimesource/com/intellij/rt/execution/junit2/RunOnce.java
+++ b/runtimesource/com/intellij/rt/execution/junit2/RunOnce.java
@@ -2,9 +2,8 @@
+import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestResult;
-import junit.framework.TestCase;
import junit.framework.TestSuite;
-... | --- a/runtimesource/com/intellij/rt/execution/junit2/RunOnce.java
+++ b/runtimesource/com/intellij/rt/execution/junit2/RunOnce.java
@@ ... @@
+import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestResult;
-import junit.framework.TestCase;
import junit.framework.TestSuite;
-import... | --- a/runtimesource/com/intellij/rt/execution/junit2/RunOnce.java
+++ b/runtimesource/com/intellij/rt/execution/junit2/RunOnce.java
@@ -2,9 +2,8 @@
CON
ADD import junit.framework.Test;
ADD import junit.framework.TestCase;
CON import junit.framework.TestResult;
DEL import junit.framework.TestCase;
CON import junit.fram... | <<<<<<< SEARCH
package com.intellij.rt.execution.junit2;
import junit.framework.TestResult;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.framework.Test;
import java.util.Hashtable;
import java.util.Enumeration;
public class RunOnce extends TestResult {
=======
package com.intellij... |
ATLauncher/Discord-Bot | 2bd205f87133ac7b4406514964a35d5d0758e02e | src/watchers/TextSpamWatcher.js | javascript | mit | Add in new Kazuto Kirigia spam
| import BaseWatcher from './BaseWatcher';
import config from '../config';
/**
* This checks for people spamming text stuff.
*/
class TextSpamWatcher extends BaseWatcher {
usesBypassRules = true;
/**
* The method this watcher should listen on.
*
* @type {string[]}
*/
method = [
... | import BaseWatcher from './BaseWatcher';
import config from '../config';
/**
* This checks for people spamming text stuff.
*/
class TextSpamWatcher extends BaseWatcher {
usesBypassRules = true;
/**
* The method this watcher should listen on.
*
* @type {string[]}
*/
method = [
... | 2 | 1 | 1 | mixed | --- a/src/watchers/TextSpamWatcher.js
+++ b/src/watchers/TextSpamWatcher.js
@@ -37,3 +37,4 @@
cleanMessage.indexOf('DMing inappropriate photos of underage children') !== -1 ||
- cleanMessage.indexOf('bots are joining servers and sending mass') !== -1
+ cleanMessage.indexOf('bots are j... | --- a/src/watchers/TextSpamWatcher.js
+++ b/src/watchers/TextSpamWatcher.js
@@ ... @@
cleanMessage.indexOf('DMing inappropriate photos of underage children') !== -1 ||
- cleanMessage.indexOf('bots are joining servers and sending mass') !== -1
+ cleanMessage.indexOf('bots are joining s... | --- a/src/watchers/TextSpamWatcher.js
+++ b/src/watchers/TextSpamWatcher.js
@@ -37,3 +37,4 @@
CON cleanMessage.indexOf('DMing inappropriate photos of underage children') !== -1 ||
DEL cleanMessage.indexOf('bots are joining servers and sending mass') !== -1
ADD cleanMessage.indexOf('b... | <<<<<<< SEARCH
cleanMessage.indexOf('jessica davies') !== -1 ||
cleanMessage.indexOf('DMing inappropriate photos of underage children') !== -1 ||
cleanMessage.indexOf('bots are joining servers and sending mass') !== -1
) {
const warningMessage = await messageToAct... |
dshaps10/full-stack-demo-site | 5d35cfe5b2655eca9e60c382a13ad092c3e99df4 | server/server.js | javascript | mit | Add routes for posting new products and retrieving list of products
| // npm dependencies
const express = require('express');
const hbs = require('hbs');
// local packages
let {mongoose} = require('./db/mongoose');
let {Product} = require('./db/models/products');
// instantiate Express.js
const app = express();
// Tell Handlebars where to look for partials
hbs.registerPartials(__dirna... | // npm dependencies
const express = require('express');
const hbs = require('hbs');
const bodyParser = require('body-parser');
// local packages
let {mongoose} = require('./db/mongoose');
let {Product} = require('./models/products');
// instantiate Express.js
const app = express();
// Tell Handlebars where to look f... | 30 | 1 | 4 | mixed | --- a/server/server.js
+++ b/server/server.js
@@ -3,2 +3,3 @@
const hbs = require('hbs');
+const bodyParser = require('body-parser');
@@ -6,3 +7,3 @@
let {mongoose} = require('./db/mongoose');
-let {Product} = require('./db/models/products');
+let {Product} = require('./models/products');
@@ -19,2 +20,5 @@
app.u... | --- a/server/server.js
+++ b/server/server.js
@@ ... @@
const hbs = require('hbs');
+const bodyParser = require('body-parser');
@@ ... @@
let {mongoose} = require('./db/mongoose');
-let {Product} = require('./db/models/products');
+let {Product} = require('./models/products');
@@ ... @@
app.use(express.static(__... | --- a/server/server.js
+++ b/server/server.js
@@ -3,2 +3,3 @@
CON const hbs = require('hbs');
ADD const bodyParser = require('body-parser');
CON
@@ -6,3 +7,3 @@
CON let {mongoose} = require('./db/mongoose');
DEL let {Product} = require('./db/models/products');
ADD let {Product} = require('./models/products');
CON
@@ ... | <<<<<<< SEARCH
const express = require('express');
const hbs = require('hbs');
// local packages
let {mongoose} = require('./db/mongoose');
let {Product} = require('./db/models/products');
// instantiate Express.js
=======
const express = require('express');
const hbs = require('hbs');
const bodyParser = require('bo... |
zensum/franz | 4c3b4267c5b60d94a25373aaa97009da81c502b1 | src/main/kotlin/engine/mock/MockConsumerBase.kt | kotlin | mit | Update to MockConsumerActorBase to actually implement ConsumerActor (add arg "scope" to function createWorker).
| package franz.engine.mock
import franz.JobStateException
import franz.JobStatus
import franz.Message
import franz.engine.ConsumerActor
import franz.engine.WorkerFunction
import kotlinx.coroutines.runBlocking
abstract class MockConsumerActorBase<T, U> : ConsumerActor<T, U> {
data class Result(
val throwab... | package franz.engine.mock
import franz.JobStateException
import franz.JobStatus
import franz.Message
import franz.engine.ConsumerActor
import franz.engine.WorkerFunction
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking
abstract class MockConsumerActorBase<T, U> : ConsumerActor<T, U> {
... | 2 | 1 | 2 | mixed | --- a/src/main/kotlin/engine/mock/MockConsumerBase.kt
+++ b/src/main/kotlin/engine/mock/MockConsumerBase.kt
@@ -7,2 +7,3 @@
import franz.engine.WorkerFunction
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking
@@ -32,3 +33,3 @@
- override fun createWorker(fn: WorkerFunction<T, U>) {
... | --- a/src/main/kotlin/engine/mock/MockConsumerBase.kt
+++ b/src/main/kotlin/engine/mock/MockConsumerBase.kt
@@ ... @@
import franz.engine.WorkerFunction
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking
@@ ... @@
- override fun createWorker(fn: WorkerFunction<T, U>) {
+ override ... | --- a/src/main/kotlin/engine/mock/MockConsumerBase.kt
+++ b/src/main/kotlin/engine/mock/MockConsumerBase.kt
@@ -7,2 +7,3 @@
CON import franz.engine.WorkerFunction
ADD import kotlinx.coroutines.CoroutineScope
CON import kotlinx.coroutines.runBlocking
@@ -32,3 +33,3 @@
CON
DEL override fun createWorker(fn: WorkerFun... | <<<<<<< SEARCH
import franz.engine.ConsumerActor
import franz.engine.WorkerFunction
import kotlinx.coroutines.runBlocking
=======
import franz.engine.ConsumerActor
import franz.engine.WorkerFunction
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking
>>>>>>> REPLACE
<<<<<<< SEARCH
}
... |
Wallacoloo/serde_osc | c8449319aad7a52fc5adefa7eaa29074dbe054d3 | examples/to_from_vec.rs | rust | apache-2.0 | Update example to conform to new message arg behavior
| #[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_bytes;
extern crate serde_osc;
use serde_bytes::ByteBuf;
use serde_osc::{de, ser};
/// Struct we'll serialize.
/// This represents a single OSC message with three arguments:
/// one of type 'i', 'f' and 'b', encoded in the order they app... | #[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_bytes;
extern crate serde_osc;
use serde_bytes::ByteBuf;
use serde_osc::{de, ser};
/// Struct we'll serialize.
/// This represents a single OSC message with three arguments:
/// one of type 'i', 'f' and 'b', encoded in the order they app... | 7 | 6 | 4 | mixed | --- a/examples/to_from_vec.rs
+++ b/examples/to_from_vec.rs
@@ -15,4 +15,2 @@
address: String,
- num_channels: i32,
- rate: f32,
// ByteBuf is the object we use for OSC "blobs".
@@ -20,3 +18,3 @@
// for more computationally-efficient serialization/deserialization.
- content: ByteBuf,
+ args: ... | --- a/examples/to_from_vec.rs
+++ b/examples/to_from_vec.rs
@@ ... @@
address: String,
- num_channels: i32,
- rate: f32,
// ByteBuf is the object we use for OSC "blobs".
@@ ... @@
// for more computationally-efficient serialization/deserialization.
- content: ByteBuf,
+ args: (i32, f32, ByteB... | --- a/examples/to_from_vec.rs
+++ b/examples/to_from_vec.rs
@@ -15,4 +15,2 @@
CON address: String,
DEL num_channels: i32,
DEL rate: f32,
CON // ByteBuf is the object we use for OSC "blobs".
@@ -20,3 +18,3 @@
CON // for more computationally-efficient serialization/deserialization.
DEL content: By... | <<<<<<< SEARCH
struct Message {
address: String,
num_channels: i32,
rate: f32,
// ByteBuf is the object we use for OSC "blobs".
// It's a thin wrapper over Vec<u8> provided by Serde that allows
// for more computationally-efficient serialization/deserialization.
content: ByteBuf,
}
fn main(... |
mrjmad/invocations | fc75f5843af70c09e0d63284277bf88689cbb06d | invocations/docs.py | python | bsd-2-clause | Add apidoc to doc building
| import os
from invoke.tasks import task
from invoke.runner import run
docs_dir = 'docs'
build = os.path.join(docs_dir, '_build')
@task
def clean_docs():
run("rm -rf %s" % build)
@task
def browse_docs():
run("open %s" % os.path.join(build, 'index.html'))
@task
def docs(clean=False, browse=False):
if... | import os
from invoke.tasks import task
from invoke.runner import run
docs_dir = 'docs'
build = os.path.join(docs_dir, '_build')
@task
def clean_docs():
run("rm -rf %s" % build)
@task
def browse_docs():
run("open %s" % os.path.join(build, 'index.html'))
@task
def api_docs(target, output="api", exclude=... | 35 | 1 | 1 | mixed | --- a/invocations/docs.py
+++ b/invocations/docs.py
@@ -21,3 +21,37 @@
@task
-def docs(clean=False, browse=False):
+def api_docs(target, output="api", exclude=""):
+ """
+ Runs ``sphinx-apidoc`` to autogenerate your API docs.
+
+ Must give target directory/package as ``target``. Results are written out
+ t... | --- a/invocations/docs.py
+++ b/invocations/docs.py
@@ ... @@
@task
-def docs(clean=False, browse=False):
+def api_docs(target, output="api", exclude=""):
+ """
+ Runs ``sphinx-apidoc`` to autogenerate your API docs.
+
+ Must give target directory/package as ``target``. Results are written out
+ to ``docs/... | --- a/invocations/docs.py
+++ b/invocations/docs.py
@@ -21,3 +21,37 @@
CON @task
DEL def docs(clean=False, browse=False):
ADD def api_docs(target, output="api", exclude=""):
ADD """
ADD Runs ``sphinx-apidoc`` to autogenerate your API docs.
ADD
ADD Must give target directory/package as ``target``. Results a... | <<<<<<< SEARCH
@task
def docs(clean=False, browse=False):
if clean:
clean_docs.body()
=======
@task
def api_docs(target, output="api", exclude=""):
"""
Runs ``sphinx-apidoc`` to autogenerate your API docs.
Must give target directory/package as ``target``. Results are written out
to ``doc... |
edelooff/sqlalchemy-json | db6b869eae416e72fa30b1d7271b0ed1d7dc1a55 | sqlalchemy_json/__init__.py | python | bsd-2-clause | Fix error when setting JSON value to be `None`
Previously this would raise an attribute error as `None` does not
have the `coerce` attribute.
| from sqlalchemy.ext.mutable import (
Mutable,
MutableDict)
from sqlalchemy_utils.types.json import JSONType
from . track import (
TrackedDict,
TrackedList)
__all__ = 'MutableJson', 'NestedMutableJson'
class NestedMutableDict(TrackedDict, Mutable):
@classmethod
def coerce(cls, key, value):
... | from sqlalchemy.ext.mutable import (
Mutable,
MutableDict)
from sqlalchemy_utils.types.json import JSONType
from . track import (
TrackedDict,
TrackedList)
__all__ = 'MutableJson', 'NestedMutableJson'
class NestedMutableDict(TrackedDict, Mutable):
@classmethod
def coerce(cls, key, value):
... | 2 | 0 | 1 | add_only | --- a/sqlalchemy_json/__init__.py
+++ b/sqlalchemy_json/__init__.py
@@ -37,2 +37,4 @@
"""Convert plain dictionary to NestedMutable."""
+ if value is None:
+ return value
if isinstance(value, cls): | --- a/sqlalchemy_json/__init__.py
+++ b/sqlalchemy_json/__init__.py
@@ ... @@
"""Convert plain dictionary to NestedMutable."""
+ if value is None:
+ return value
if isinstance(value, cls):
| --- a/sqlalchemy_json/__init__.py
+++ b/sqlalchemy_json/__init__.py
@@ -37,2 +37,4 @@
CON """Convert plain dictionary to NestedMutable."""
ADD if value is None:
ADD return value
CON if isinstance(value, cls):
| <<<<<<< SEARCH
def coerce(cls, key, value):
"""Convert plain dictionary to NestedMutable."""
if isinstance(value, cls):
return value
=======
def coerce(cls, key, value):
"""Convert plain dictionary to NestedMutable."""
if value is None:
return value
... |
OJFord/tapioca | a03f6af6dd476a8ac19496a4c0d118e16249396e | examples/httpbin.rs | rust | mit | Improve example as a demo
| #![feature(associated_consts)]
#![feature(use_extern_macros)]
#[macro_use]
extern crate tapioca;
infer_api!(httpbin, "https://raw.githubusercontent.com/OJFord/tapioca/master/tests/schemata/httpbin.yml");
use httpbin::basic_auth__user__hunter_2 as basic_auth;
use basic_auth::get::OpAuth::HttpBasic;
static USER: &str... | #![feature(associated_consts)]
#![feature(use_extern_macros)]
#[macro_use]
extern crate tapioca;
infer_api!(httpbin, "https://raw.githubusercontent.com/OJFord/tapioca/master/tests/schemata/httpbin.yml");
use httpbin::basic_auth__user__hunter_2 as basic_auth;
use basic_auth::get::OpAuth::HttpBasic;
static USER: &str... | 13 | 15 | 2 | mixed | --- a/examples/httpbin.rs
+++ b/examples/httpbin.rs
@@ -19,16 +19,5 @@
httpbin::ip::get::OkBody::Status200(body) => println!("Your IP is {}", body.origin),
- _ => panic!(),
+ _ => println!("httbin.org did something unexpected"),
},
- _ => println!("Failed to find IP ad... | --- a/examples/httpbin.rs
+++ b/examples/httpbin.rs
@@ ... @@
httpbin::ip::get::OkBody::Status200(body) => println!("Your IP is {}", body.origin),
- _ => panic!(),
+ _ => println!("httbin.org did something unexpected"),
},
- _ => println!("Failed to find IP address"),
... | --- a/examples/httpbin.rs
+++ b/examples/httpbin.rs
@@ -19,16 +19,5 @@
CON httpbin::ip::get::OkBody::Status200(body) => println!("Your IP is {}", body.origin),
DEL _ => panic!(),
ADD _ => println!("httbin.org did something unexpected"),
CON },
DEL _ => println!("Faile... | <<<<<<< SEARCH
Ok(response) => match response.body() {
httpbin::ip::get::OkBody::Status200(body) => println!("Your IP is {}", body.origin),
_ => panic!(),
},
_ => println!("Failed to find IP address"),
}
let query = httpbin::post::post::QueryParams {
echo... |
alexrudy/Cauldron | 4623c8f0de7ff41f78754df6811570a4d4367728 | Cauldron/ext/commandkeywords/__init__.py | python | bsd-3-clause | Make command-keyword compatible with DFW implementation
| # -*- coding: utf-8 -*-
"""
An extension for a command-based keyword.
"""
from __future__ import absolute_import
from Cauldron.types import Boolean, DispatcherKeywordType
from Cauldron.exc import NoWriteNecessary
class CommandKeyword(Boolean, DispatcherKeywordType):
"""This keyword will receive boolean writes as ... | # -*- coding: utf-8 -*-
"""
An extension for a command-based keyword.
"""
from __future__ import absolute_import
from Cauldron.types import Boolean, DispatcherKeywordType
from Cauldron.exc import NoWriteNecessary
from Cauldron.utils.callbacks import Callbacks
class CommandKeyword(Boolean, DispatcherKeywordType):
... | 11 | 0 | 3 | add_only | --- a/Cauldron/ext/commandkeywords/__init__.py
+++ b/Cauldron/ext/commandkeywords/__init__.py
@@ -8,2 +8,3 @@
from Cauldron.exc import NoWriteNecessary
+from Cauldron.utils.callbacks import Callbacks
@@ -22,2 +23,7 @@
super(CommandKeyword, self).__init__(*args, **kwargs)
+ self._cbs = Callbacks()
+ ... | --- a/Cauldron/ext/commandkeywords/__init__.py
+++ b/Cauldron/ext/commandkeywords/__init__.py
@@ ... @@
from Cauldron.exc import NoWriteNecessary
+from Cauldron.utils.callbacks import Callbacks
@@ ... @@
super(CommandKeyword, self).__init__(*args, **kwargs)
+ self._cbs = Callbacks()
+
+ def co... | --- a/Cauldron/ext/commandkeywords/__init__.py
+++ b/Cauldron/ext/commandkeywords/__init__.py
@@ -8,2 +8,3 @@
CON from Cauldron.exc import NoWriteNecessary
ADD from Cauldron.utils.callbacks import Callbacks
CON
@@ -22,2 +23,7 @@
CON super(CommandKeyword, self).__init__(*args, **kwargs)
ADD self._cbs = ... | <<<<<<< SEARCH
from Cauldron.types import Boolean, DispatcherKeywordType
from Cauldron.exc import NoWriteNecessary
class CommandKeyword(Boolean, DispatcherKeywordType):
=======
from Cauldron.types import Boolean, DispatcherKeywordType
from Cauldron.exc import NoWriteNecessary
from Cauldron.utils.callbacks import Call... |
Doist/TodoistPojos | bc9e1ff1d8f31cebe6a4820572482dc318427bd4 | src/main/java/com/todoist/pojo/Workspace.kt | kotlin | mit | Remove members from workspace model
| package com.todoist.pojo
open class Workspace(
id: Long,
open var name: String,
open var description: String?,
open var logoBig: String?,
open var logoMedium: String?,
open var logoSmall: String?,
open var logoS640: String?,
open var isInviteOnlyDefault: Boolean,
open var defaultCol... | package com.todoist.pojo
open class Workspace(
id: Long,
open var name: String,
open var description: String?,
open var logoBig: String?,
open var logoMedium: String?,
open var logoSmall: String?,
open var logoS640: String?,
open var isInviteOnlyDefault: Boolean,
open var defaultCol... | 0 | 1 | 1 | del_only | --- a/src/main/java/com/todoist/pojo/Workspace.kt
+++ b/src/main/java/com/todoist/pojo/Workspace.kt
@@ -14,3 +14,2 @@
open var isCollapsed: Boolean,
- open var members: List<WorkspaceMember>?,
isDeleted: Boolean, | --- a/src/main/java/com/todoist/pojo/Workspace.kt
+++ b/src/main/java/com/todoist/pojo/Workspace.kt
@@ ... @@
open var isCollapsed: Boolean,
- open var members: List<WorkspaceMember>?,
isDeleted: Boolean,
| --- a/src/main/java/com/todoist/pojo/Workspace.kt
+++ b/src/main/java/com/todoist/pojo/Workspace.kt
@@ -14,3 +14,2 @@
CON open var isCollapsed: Boolean,
DEL open var members: List<WorkspaceMember>?,
CON isDeleted: Boolean,
| <<<<<<< SEARCH
open var createdAt: Long,
open var isCollapsed: Boolean,
open var members: List<WorkspaceMember>?,
isDeleted: Boolean,
) : Model(id, isDeleted) {
=======
open var createdAt: Long,
open var isCollapsed: Boolean,
isDeleted: Boolean,
) : Model(id, isDeleted) {
>>>>>>> REPLACE
|
jonschlinkert/add-banner | 2d47d3a2c16ca1a855953ac0e1c91bf8cace6c1a | test.js | javascript | mit | Add backwards compatibility for Node.js 0.10
| var banner = require('./');
let chai = require('chai');
let expect = chai.expect;
describe('banner', () => {
const FILEPATH = 'test-target.js';
context('without options (using defaults)', () => {
let expectation = `/*!
* add-banner <https://github.com/jonschlinkert/add-banner>
*
* Copyright (c) 2018 Jon S... | var banner = require('./');
let chai = require('chai');
let expect = chai.expect;
describe('banner', () => {
let filepath = 'test-target.js';
context('without options (using defaults)', () => {
let expectation = `/*!
* add-banner <https://github.com/jonschlinkert/add-banner>
*
* Copyright (c) 2018 Jon Sch... | 3 | 3 | 3 | mixed | --- a/test.js
+++ b/test.js
@@ -6,3 +6,3 @@
- const FILEPATH = 'test-target.js';
+ let filepath = 'test-target.js';
@@ -18,3 +18,3 @@
it('expected to populate banner', () => {
- expect(banner(FILEPATH)).to.eql(expectation);
+ expect(banner(filepath)).to.eql(expectation);
});
@@ -43,3 +43,3 @@
... | --- a/test.js
+++ b/test.js
@@ ... @@
- const FILEPATH = 'test-target.js';
+ let filepath = 'test-target.js';
@@ ... @@
it('expected to populate banner', () => {
- expect(banner(FILEPATH)).to.eql(expectation);
+ expect(banner(filepath)).to.eql(expectation);
});
@@ ... @@
it('expected to p... | --- a/test.js
+++ b/test.js
@@ -6,3 +6,3 @@
CON
DEL const FILEPATH = 'test-target.js';
ADD let filepath = 'test-target.js';
CON
@@ -18,3 +18,3 @@
CON it('expected to populate banner', () => {
DEL expect(banner(FILEPATH)).to.eql(expectation);
ADD expect(banner(filepath)).to.eql(expectation);
CON ... | <<<<<<< SEARCH
describe('banner', () => {
const FILEPATH = 'test-target.js';
context('without options (using defaults)', () => {
=======
describe('banner', () => {
let filepath = 'test-target.js';
context('without options (using defaults)', () => {
>>>>>>> REPLACE
<<<<<<< SEARCH
`;
it('expected to po... |
pgollakota/django-chartit | b974bbcc7e243fca7c3dc63fbbaf530fe9b69e50 | runtests.py | python | bsd-2-clause | Load DB migrations before testing and use verbose=2 and failfast
Note that we use `manage.py test` instead of
`manage.py migrate` and manually running the tests. This
lets Django take care of applying migrations before running tests.
This works around https://code.djangoproject.com/ticket/22487
which causes a test fai... | import sys
try:
from django.conf import settings
from django.test.utils import get_runner
settings.configure(
DEBUG=True,
USE_TZ=True,
DATABASES={
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
... | import os
import sys
try:
sys.path.append('demoproject')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings")
from django.conf import settings
from django.core.management import call_command
settings.DATABASES['default']['NAME'] = ':memory:'
settings.INSTALLED_APPS.append('... | 11 | 30 | 3 | mixed | --- a/runtests.py
+++ b/runtests.py
@@ -1 +1,2 @@
+import os
import sys
@@ -3,26 +4,10 @@
try:
+ sys.path.append('demoproject')
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings")
+
from django.conf import settings
- from django.test.utils import get_runner
+ from django.core.ma... | --- a/runtests.py
+++ b/runtests.py
@@ ... @@
+import os
import sys
@@ ... @@
try:
+ sys.path.append('demoproject')
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings")
+
from django.conf import settings
- from django.test.utils import get_runner
+ from django.core.management imp... | --- a/runtests.py
+++ b/runtests.py
@@ -1 +1,2 @@
ADD import os
CON import sys
@@ -3,26 +4,10 @@
CON try:
ADD sys.path.append('demoproject')
ADD os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demoproject.settings")
ADD
CON from django.conf import settings
DEL from django.test.utils import get_runner
... | <<<<<<< SEARCH
import sys
try:
from django.conf import settings
from django.test.utils import get_runner
settings.configure(
DEBUG=True,
USE_TZ=True,
DATABASES={
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
... |
pluggerjs/plugger | 3085397f29285a2a0b2f8e08cd839ed7a2278b26 | lib/core/pmodule.js | javascript | mit | Add automatic pjs module search
| const pp = require('./ppublish');
const pt = require('./ptalk');
const utils = require('../common/utils');
const fs = require('fs');
const commander = require('commander');
const path = require('path');
commander
.option('-m --module <file>', 'specify a pjs file')
.option('-s --se... | const pp = require('./ppublish');
const pt = require('./ptalk');
const utils = require('../common/utils');
const fs = require('fs');
const commander = require('commander');
const path = require('path');
const { exec } = require('child_process');
commander
.option('-m --module <file>'... | 38 | 16 | 2 | mixed | --- a/lib/core/pmodule.js
+++ b/lib/core/pmodule.js
@@ -6,2 +6,3 @@
const path = require('path');
+const { exec } = require('child_process');
@@ -12,24 +13,45 @@
+function findFiles(folder, extension, cb){
+ folder = path.resolve(folder);
+
+ var command = "";
+
+ if(/^win/.test(process.platform... | --- a/lib/core/pmodule.js
+++ b/lib/core/pmodule.js
@@ ... @@
const path = require('path');
+const { exec } = require('child_process');
@@ ... @@
+function findFiles(folder, extension, cb){
+ folder = path.resolve(folder);
+
+ var command = "";
+
+ if(/^win/.test(process.platform)){
+ com... | --- a/lib/core/pmodule.js
+++ b/lib/core/pmodule.js
@@ -6,2 +6,3 @@
CON const path = require('path');
ADD const { exec } = require('child_process');
CON
@@ -12,24 +13,45 @@
CON
ADD function findFiles(folder, extension, cb){
ADD folder = path.resolve(folder);
ADD
ADD var command = "";
ADD
ADD i... | <<<<<<< SEARCH
const commander = require('commander');
const path = require('path');
commander
=======
const commander = require('commander');
const path = require('path');
const { exec } = require('child_process');
commander
>>>>>>> REPLACE
<<<<<<< SEARCH
.parse(process.argv);
if (commander.module... |
iandeboisblanc/evolution | 73bc382819f98c30d6e4a77e0f8bc75ce18dc2c9 | server/runEves.js | javascript | cc0-1.0 | Add derived eves to Eves array
| import settings from './helpers/settings'
import {findDistance, limitPositions, chooseOne, randomInt, getAvgPostion} from './helpers/general'
import {applyLimbForces, updateBodyPartPositions} from './helpers/movement'
import {createEveData, deriveEveData} from './helpers/eveCreation'
import {killEve, collectStats, save... | import settings from './helpers/settings'
import {findDistance, limitPositions, chooseOne, randomInt, getAvgPostion} from './helpers/general'
import {applyLimbForces, updateBodyPartPositions} from './helpers/movement'
import {createEveData, deriveEveData} from './helpers/eveCreation'
import {killEve, collectStats, save... | 1 | 2 | 2 | mixed | --- a/server/runEves.js
+++ b/server/runEves.js
@@ -16,3 +16,2 @@
updateBodyPartPositions(Eves);
- // console.log('YO!',chooseOne.valueOf())
}, settings.stepTime)
@@ -23,3 +22,3 @@
var eve = chooseOne(Eves);
- deriveEveData(eve);
+ Eves.push(deriveEveData(eve));
}, settings.killTime) | --- a/server/runEves.js
+++ b/server/runEves.js
@@ ... @@
updateBodyPartPositions(Eves);
- // console.log('YO!',chooseOne.valueOf())
}, settings.stepTime)
@@ ... @@
var eve = chooseOne(Eves);
- deriveEveData(eve);
+ Eves.push(deriveEveData(eve));
}, settings.killTime)
| --- a/server/runEves.js
+++ b/server/runEves.js
@@ -16,3 +16,2 @@
CON updateBodyPartPositions(Eves);
DEL // console.log('YO!',chooseOne.valueOf())
CON }, settings.stepTime)
@@ -23,3 +22,3 @@
CON var eve = chooseOne(Eves);
DEL deriveEveData(eve);
ADD Eves.push(deriveEveData(eve));
CON }, settings.killTime)
| <<<<<<< SEARCH
applyLimbForces(Eves);
updateBodyPartPositions(Eves);
// console.log('YO!',chooseOne.valueOf())
}, settings.stepTime)
=======
applyLimbForces(Eves);
updateBodyPartPositions(Eves);
}, settings.stepTime)
>>>>>>> REPLACE
<<<<<<< SEARCH
killEve(Eves);
var eve = chooseOne(Eves);
deriveEve... |
quarkusio/quarkus | a33daeae19c81846bf61b817d7a2f76297792d47 | extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java | java | apache-2.0 | Reimplement the QuarkusJTAPlatform to avoid leaking the ORM registry
| package io.quarkus.hibernate.orm.runtime.customized;
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;
import org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform;
public final class QuarkusJtaPlatform extends AbstractJtaPlatform {
public static final Q... | package io.quarkus.hibernate.orm.runtime.customized;
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;
import org.hibernate.engine.transaction.jta.platform.int... | 52 | 6 | 4 | mixed | --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java
+++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java
@@ -2,2 +2,5 @@
+import javax.transaction.Synchronization;
+import javax.tra... | --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java
+++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java
@@ ... @@
+import javax.transaction.Synchronization;
+import javax.transacti... | --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java
+++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/customized/QuarkusJtaPlatform.java
@@ -2,2 +2,5 @@
CON
ADD import javax.transaction.Synchronization;
ADD import ... | <<<<<<< SEARCH
package io.quarkus.hibernate.orm.runtime.customized;
import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;
import org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform;
public final class QuarkusJtaPlatform extends AbstractJtaPlatform {
public... |
databrary/databrary | 05d65d646ee1fba5f07e1b203c421810da2908aa | app/assets/view/searchView.js | javascript | agpl-3.0 | Include citation data in search targets
| 'use strict';
module.controller('searchView', [
'$scope', 'volumes', 'pageService', function ($scope, volumes, page) {
page.display.title = page.constants.message('page.title.search');
//
var updateData = function (data) {
angular.forEach(data, function (volume) {
volume.more = '';
... | 'use strict';
module.controller('searchView', [
'$scope', 'volumes', 'pageService', function ($scope, volumes, page) {
page.display.title = page.constants.message('page.title.search');
//
var updateData = function (data) {
angular.forEach(data, function (volume) {
volume.more = '';
... | 7 | 0 | 1 | add_only | --- a/app/assets/view/searchView.js
+++ b/app/assets/view/searchView.js
@@ -21,2 +21,9 @@
});
+
+ if (volume.citation) {
+ angular.forEach(volume.citation, function (v) {
+ volume.more += ' ' + v;
+ });
+ }
+
}); | --- a/app/assets/view/searchView.js
+++ b/app/assets/view/searchView.js
@@ ... @@
});
+
+ if (volume.citation) {
+ angular.forEach(volume.citation, function (v) {
+ volume.more += ' ' + v;
+ });
+ }
+
});
| --- a/app/assets/view/searchView.js
+++ b/app/assets/view/searchView.js
@@ -21,2 +21,9 @@
CON });
ADD
ADD if (volume.citation) {
ADD angular.forEach(volume.citation, function (v) {
ADD volume.more += ' ' + v;
ADD });
ADD }
ADD
CON });
| <<<<<<< SEARCH
}
});
});
=======
}
});
if (volume.citation) {
angular.forEach(volume.citation, function (v) {
volume.more += ' ' + v;
});
}
});
>>>>>>> REPLACE
|
soasme/retries | b0efb7db50080dd1e9e96ad8d818e3b0859bbca3 | retry/__init__.py | python | mit | Add a usage in retry
| # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
'''
def __init__(self, errors=(Exception, ), tries=3, delay=... | # -*- coding: utf-8 -*-
from functools import wraps
import time
class RetryExceededError(Exception):
pass
class retry(object):
'''A decorator encapsulated retry logic.
Usage:
@retry(errors=(TTransportException, AnyExpectedError))
@retry() # detect whatsoever errors and retry 3 times
'''
... | 1 | 0 | 1 | add_only | --- a/retry/__init__.py
+++ b/retry/__init__.py
@@ -14,2 +14,3 @@
@retry(errors=(TTransportException, AnyExpectedError))
+ @retry() # detect whatsoever errors and retry 3 times
''' | --- a/retry/__init__.py
+++ b/retry/__init__.py
@@ ... @@
@retry(errors=(TTransportException, AnyExpectedError))
+ @retry() # detect whatsoever errors and retry 3 times
'''
| --- a/retry/__init__.py
+++ b/retry/__init__.py
@@ -14,2 +14,3 @@
CON @retry(errors=(TTransportException, AnyExpectedError))
ADD @retry() # detect whatsoever errors and retry 3 times
CON '''
| <<<<<<< SEARCH
@retry(errors=(TTransportException, AnyExpectedError))
'''
=======
@retry(errors=(TTransportException, AnyExpectedError))
@retry() # detect whatsoever errors and retry 3 times
'''
>>>>>>> REPLACE
|
petertseng/exercism-rust | 45513c97ca37ef5ca2a071e4c9bd27653eca89dc | exercises/roman-numerals/example.rs | rust | mit | roman-numerals: Use `iter` instead of `into_iter` when not moving
Clippy suggested
https://travis-ci.org/exercism/rust/builds/456432005
error: this .into_iter() call is equivalent to .iter() and will not move the array
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/in... | use std::fmt;
static ROMAN_MAP: [(usize, &'static str); 13] = [
(1, "I"),
(4, "IV"),
(5, "V"),
(9, "IX"),
(10, "X"),
(40, "XL"),
(50, "L"),
(90, "XC"),
(100, "C"),
(400, "CD"),
(500, "D"),
(900, "CM"),
(1000, "M"),
];
pub struct Roman {
num: usize,
}
impl From<... | use std::fmt;
static ROMAN_MAP: [(usize, &'static str); 13] = [
(1, "I"),
(4, "IV"),
(5, "V"),
(9, "IX"),
(10, "X"),
(40, "XL"),
(50, "L"),
(90, "XC"),
(100, "C"),
(400, "CD"),
(500, "D"),
(900, "CM"),
(1000, "M"),
];
pub struct Roman {
num: usize,
}
impl From<... | 1 | 1 | 1 | mixed | --- a/exercises/roman-numerals/example.rs
+++ b/exercises/roman-numerals/example.rs
@@ -32,3 +32,3 @@
let mut result = String::new();
- for &(numeric, roman_string) in ROMAN_MAP.into_iter().rev() {
+ for &(numeric, roman_string) in ROMAN_MAP.iter().rev() {
while start >= numeric { | --- a/exercises/roman-numerals/example.rs
+++ b/exercises/roman-numerals/example.rs
@@ ... @@
let mut result = String::new();
- for &(numeric, roman_string) in ROMAN_MAP.into_iter().rev() {
+ for &(numeric, roman_string) in ROMAN_MAP.iter().rev() {
while start >= numeric {
| --- a/exercises/roman-numerals/example.rs
+++ b/exercises/roman-numerals/example.rs
@@ -32,3 +32,3 @@
CON let mut result = String::new();
DEL for &(numeric, roman_string) in ROMAN_MAP.into_iter().rev() {
ADD for &(numeric, roman_string) in ROMAN_MAP.iter().rev() {
CON while start >= ... | <<<<<<< SEARCH
let mut start = self.num.clone();
let mut result = String::new();
for &(numeric, roman_string) in ROMAN_MAP.into_iter().rev() {
while start >= numeric {
result.push_str(roman_string);
=======
let mut start = self.num.clone();
let mut re... |
saltstack/salt | 3a5e2e34374f92f0412d121fb9552278105f230a | salt/acl/__init__.py | python | apache-2.0 | Fix typo documention -> documentation
| # -*- coding: utf-8 -*-
'''
The acl module handles client_acl operations
Additional information on client_acl can be
found by reading the salt documention:
http://docs.saltstack.com/en/latest/ref/clientacl.html
'''
# Import python libraries
from __future__ import absolute_import
import re
class ClientACL(objec... | # -*- coding: utf-8 -*-
'''
The acl module handles client_acl operations
Additional information on client_acl can be
found by reading the salt documentation:
http://docs.saltstack.com/en/latest/ref/clientacl.html
'''
# Import python libraries
from __future__ import absolute_import
import re
class ClientACL(obj... | 1 | 1 | 1 | mixed | --- a/salt/acl/__init__.py
+++ b/salt/acl/__init__.py
@@ -5,3 +5,3 @@
Additional information on client_acl can be
-found by reading the salt documention:
+found by reading the salt documentation:
| --- a/salt/acl/__init__.py
+++ b/salt/acl/__init__.py
@@ ... @@
Additional information on client_acl can be
-found by reading the salt documention:
+found by reading the salt documentation:
| --- a/salt/acl/__init__.py
+++ b/salt/acl/__init__.py
@@ -5,3 +5,3 @@
CON Additional information on client_acl can be
DEL found by reading the salt documention:
ADD found by reading the salt documentation:
CON
| <<<<<<< SEARCH
Additional information on client_acl can be
found by reading the salt documention:
http://docs.saltstack.com/en/latest/ref/clientacl.html
=======
Additional information on client_acl can be
found by reading the salt documentation:
http://docs.saltstack.com/en/latest/ref/clientacl.html
>>>>>... |
android/compose-samples | 641e9341d54e0b4c7e71bef861750b91d07e47e5 | Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt | kotlin | apache-2.0 | [Owl] Update scrim to use `drawWithCache`
Change-Id: I157671de17dd51a9e5031d07f49eb6ccf5b7d1b9
| /*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | /*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 9 | 18 | 2 | mixed | --- a/Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
+++ b/Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
@@ -18,9 +18,4 @@
-import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.remember
-import androidx.compose.runtime.setValue
i... | --- a/Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
+++ b/Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
@@ ... @@
-import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.remember
-import androidx.compose.runtime.setValue
import an... | --- a/Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
+++ b/Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
@@ -18,9 +18,4 @@
CON
DEL import androidx.compose.runtime.getValue
DEL import androidx.compose.runtime.mutableStateOf
DEL import androidx.compose.runtime.remember
DEL import androidx.compose.runt... | <<<<<<< SEARCH
package com.example.owl.ui.utils
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.dr... |
pie-flavor/Kludge | 45b81721b38db06289a32db7896f932d07691dc9 | src/main/kotlin/flavor/pie/kludge/players.kt | kotlin | mit | Add ChatTypeMessageReceiver methods to MessageReceiver
| package flavor.pie.kludge
import org.spongepowered.api.entity.living.player.Player
import org.spongepowered.api.item.inventory.Inventory
import org.spongepowered.api.item.inventory.type.GridInventory
import org.spongepowered.api.item.inventory.entity.Hotbar
val Player.storageInventory
get() = inventory.query<Inve... | package flavor.pie.kludge
import org.spongepowered.api.entity.living.player.Player
import org.spongepowered.api.item.inventory.Inventory
import org.spongepowered.api.item.inventory.type.GridInventory
import org.spongepowered.api.item.inventory.entity.Hotbar
import org.spongepowered.api.text.Text
import org.spongepower... | 50 | 0 | 2 | add_only | --- a/src/main/kotlin/flavor/pie/kludge/players.kt
+++ b/src/main/kotlin/flavor/pie/kludge/players.kt
@@ -6,2 +6,8 @@
import org.spongepowered.api.item.inventory.entity.Hotbar
+import org.spongepowered.api.text.Text
+import org.spongepowered.api.text.TextElement
+import org.spongepowered.api.text.TextTemplate
+import ... | --- a/src/main/kotlin/flavor/pie/kludge/players.kt
+++ b/src/main/kotlin/flavor/pie/kludge/players.kt
@@ ... @@
import org.spongepowered.api.item.inventory.entity.Hotbar
+import org.spongepowered.api.text.Text
+import org.spongepowered.api.text.TextElement
+import org.spongepowered.api.text.TextTemplate
+import org.sp... | --- a/src/main/kotlin/flavor/pie/kludge/players.kt
+++ b/src/main/kotlin/flavor/pie/kludge/players.kt
@@ -6,2 +6,8 @@
CON import org.spongepowered.api.item.inventory.entity.Hotbar
ADD import org.spongepowered.api.text.Text
ADD import org.spongepowered.api.text.TextElement
ADD import org.spongepowered.api.text.TextTempl... | <<<<<<< SEARCH
import org.spongepowered.api.item.inventory.type.GridInventory
import org.spongepowered.api.item.inventory.entity.Hotbar
val Player.storageInventory
get() = inventory.query<Inventory>(GridInventory::class.java, Hotbar::class.java)!!
=======
import org.spongepowered.api.item.inventory.type.GridInvent... |
google/evergreen-checker | 6f12c7b3c7bbb1a232c54fa70fb53980710ccbd9 | build.gradle.kts | kotlin | apache-2.0 | Update Kotlin version from 1.3.61 to 1.4.10.
| // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | 1 | 1 | 1 | mixed | --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,3 +19,3 @@
buildscript {
- extra["kotlin_version"] = "1.3.61"
+ extra["kotlin_version"] = "1.4.10"
| --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ ... @@
buildscript {
- extra["kotlin_version"] = "1.3.61"
+ extra["kotlin_version"] = "1.4.10"
| --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,3 +19,3 @@
CON buildscript {
DEL extra["kotlin_version"] = "1.3.61"
ADD extra["kotlin_version"] = "1.4.10"
CON
| <<<<<<< SEARCH
buildscript {
extra["kotlin_version"] = "1.3.61"
repositories {
=======
buildscript {
extra["kotlin_version"] = "1.4.10"
repositories {
>>>>>>> REPLACE
|
benweier/blizzard.js | 68d1f704f477b12490b33ceb4298a6302148d30c | index.js | javascript | mit | Update Blizzard instance function signature
| /**
* @file Blizzard.js
* @description A Node.js wrapper for the Blizzard Battle.net Community Platform API
* @copyright Copyright(c) 2016 Ben Weier <ben.weier@gmail.com>
* @license MIT
* @version 1.0.0
* @module index
* @requires lib/blizzard
*/
'use strict';
const Blizzard = require('./lib/blizzard');
/**
... | /**
* @file Blizzard.js
* @description A Node.js wrapper for the Blizzard Battle.net Community Platform API
* @copyright Copyright(c) 2016 Ben Weier <ben.weier@gmail.com>
* @license MIT
* @version 1.0.0
* @module index
* @requires lib/blizzard
*/
'use strict';
/**
* @typedef {Object} Blizzard
* @prop {Obj... | 18 | 7 | 2 | mixed | --- a/index.js
+++ b/index.js
@@ -11,2 +11,12 @@
+/**
+ * @typedef {Object} Blizzard
+ * @prop {Object} account Account API methods
+ * @prop {Object} d3 D3 API methods
+ * @prop {Object} sc2 Sc2 API methods
+ * @prop {Object} wow WoW API methods
+ * @prop {Function} params Filter an o... | --- a/index.js
+++ b/index.js
@@ ... @@
+/**
+ * @typedef {Object} Blizzard
+ * @prop {Object} account Account API methods
+ * @prop {Object} d3 D3 API methods
+ * @prop {Object} sc2 Sc2 API methods
+ * @prop {Object} wow WoW API methods
+ * @prop {Function} params Filter an objects ke... | --- a/index.js
+++ b/index.js
@@ -11,2 +11,12 @@
CON
ADD /**
ADD * @typedef {Object} Blizzard
ADD * @prop {Object} account Account API methods
ADD * @prop {Object} d3 D3 API methods
ADD * @prop {Object} sc2 Sc2 API methods
ADD * @prop {Object} wow WoW API methods
ADD * @prop {Func... | <<<<<<< SEARCH
'use strict';
const Blizzard = require('./lib/blizzard');
/**
* Initialize the Blizzard.js instance.
*
* @param {Object} args Blizzard.js configuration options
* @return {Object} An instance of Blizzard.js
* @example
* const blizzard = require('blizzard.js').initialize({api_key: process.env... |
gyn/exercism | 11fdd9c3cd22a52f07ae825c742fea5a8ef8d0c1 | rust/all-your-base/src/lib.rs | rust | bsd-2-clause | Clean up rust code for all-your-base
It looks better now
| ///
/// Convert a number between two bases.
///
/// A number is any slice of digits.
/// A digit is any unsigned integer (e.g. u8, u16, u32, u64, or usize).
/// Bases are specified as unsigned integers.
///
/// Return an `Err(.)` if the conversion is impossible.
/// The tests do not test for specific values inside the ... | pub fn convert(number: &[u32], from_base: u32, to_base: u32) -> Result<Vec<u32>, ()> {
if from_base < 2 || to_base < 2 {
return Err(());
}
if number.iter().any(|&x| x >= from_base) {
return Err(());
}
let limit = number.iter().fold(0, |acc, &x| acc * from_base + x);
let mut r =... | 8 | 39 | 2 | mixed | --- a/rust/all-your-base/src/lib.rs
+++ b/rust/all-your-base/src/lib.rs
@@ -1,38 +1,2 @@
-///
-/// Convert a number between two bases.
-///
-/// A number is any slice of digits.
-/// A digit is any unsigned integer (e.g. u8, u16, u32, u64, or usize).
-/// Bases are specified as unsigned integers.
-///
-/// Return an `E... | --- a/rust/all-your-base/src/lib.rs
+++ b/rust/all-your-base/src/lib.rs
@@ ... @@
-///
-/// Convert a number between two bases.
-///
-/// A number is any slice of digits.
-/// A digit is any unsigned integer (e.g. u8, u16, u32, u64, or usize).
-/// Bases are specified as unsigned integers.
-///
-/// Return an `Err(.)` ... | --- a/rust/all-your-base/src/lib.rs
+++ b/rust/all-your-base/src/lib.rs
@@ -1,38 +1,2 @@
DEL ///
DEL /// Convert a number between two bases.
DEL ///
DEL /// A number is any slice of digits.
DEL /// A digit is any unsigned integer (e.g. u8, u16, u32, u64, or usize).
DEL /// Bases are specified as unsigned integers.
DEL ... | <<<<<<< SEARCH
///
/// Convert a number between two bases.
///
/// A number is any slice of digits.
/// A digit is any unsigned integer (e.g. u8, u16, u32, u64, or usize).
/// Bases are specified as unsigned integers.
///
/// Return an `Err(.)` if the conversion is impossible.
/// The tests do not test for specific val... |
k13n/asmstubber | 3fc5b21b1970acecd54afc11122775ec668aa93b | src/main/java/org/k13n/swtstubber/util/FileUtil.java | java | mit | Add methods to write the transformed bytecode to a file
| package org.k13n.swtstubber.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileUtil {
public static byte[] writeStreamToArray(InputStream stream)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buf... | package org.k13n.swtstubber.util;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileUtil {
public static byte[] writeStreamToArray(InputStream stream)
throws IOException {
ByteArrayOutputStr... | 41 | 0 | 2 | add_only | --- a/src/main/java/org/k13n/swtstubber/util/FileUtil.java
+++ b/src/main/java/org/k13n/swtstubber/util/FileUtil.java
@@ -3,2 +3,4 @@
import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
@@ -18,2 +20,41 @@
+ public static void writeBytecode(Strin... | --- a/src/main/java/org/k13n/swtstubber/util/FileUtil.java
+++ b/src/main/java/org/k13n/swtstubber/util/FileUtil.java
@@ ... @@
import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
@@ ... @@
+ public static void writeBytecode(String targetDirecto... | --- a/src/main/java/org/k13n/swtstubber/util/FileUtil.java
+++ b/src/main/java/org/k13n/swtstubber/util/FileUtil.java
@@ -3,2 +3,4 @@
CON import java.io.ByteArrayOutputStream;
ADD import java.io.File;
ADD import java.io.FileOutputStream;
CON import java.io.IOException;
@@ -18,2 +20,41 @@
CON
ADD public static void w... | <<<<<<< SEARCH
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
=======
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
>>>>>>> REPLACE
<<<<<<< SEARCH
}
}
=======
}... |
depcheck/depcheck | 74fe70d18f56b8f3cdf9576f79a022f5e2538695 | src/utils/get-scripts.js | javascript | mit | Add cache logic to get script utility.
| import fs from 'fs';
import path from 'path';
import yaml from 'js-yaml';
const travisCommands = [
// Reference: http://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle
'before_install',
'install',
'before_script',
'script',
'after_success or after_failure',
'before_deploy',
'deploy',... | import fs from 'fs';
import path from 'path';
import yaml from 'js-yaml';
const scriptCache = {};
function getCacheOrFile(key, fn) {
if (scriptCache[key]) {
return scriptCache[key];
}
const value = fn();
scriptCache[key] = value;
return value;
}
const travisCommands = [
// Reference: http://docs.tr... | 24 | 9 | 2 | mixed | --- a/src/utils/get-scripts.js
+++ b/src/utils/get-scripts.js
@@ -3,2 +3,15 @@
import yaml from 'js-yaml';
+
+const scriptCache = {};
+
+function getCacheOrFile(key, fn) {
+ if (scriptCache[key]) {
+ return scriptCache[key];
+ }
+
+ const value = fn();
+ scriptCache[key] = value;
+
+ return value;
+}
@@ -26,... | --- a/src/utils/get-scripts.js
+++ b/src/utils/get-scripts.js
@@ ... @@
import yaml from 'js-yaml';
+
+const scriptCache = {};
+
+function getCacheOrFile(key, fn) {
+ if (scriptCache[key]) {
+ return scriptCache[key];
+ }
+
+ const value = fn();
+ scriptCache[key] = value;
+
+ return value;
+}
@@ ... @@
exp... | --- a/src/utils/get-scripts.js
+++ b/src/utils/get-scripts.js
@@ -3,2 +3,15 @@
CON import yaml from 'js-yaml';
ADD
ADD const scriptCache = {};
ADD
ADD function getCacheOrFile(key, fn) {
ADD if (scriptCache[key]) {
ADD return scriptCache[key];
ADD }
ADD
ADD const value = fn();
ADD scriptCache[key] = value... | <<<<<<< SEARCH
import path from 'path';
import yaml from 'js-yaml';
const travisCommands = [
=======
import path from 'path';
import yaml from 'js-yaml';
const scriptCache = {};
function getCacheOrFile(key, fn) {
if (scriptCache[key]) {
return scriptCache[key];
}
const value = fn();
scriptCache[key] = ... |
kidaa/rave | ed6bcfc4fa30882b9f4cfce01d90a20e83f04e68 | rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java | java | apache-2.0 | Add apache headers to interceptor
git-svn-id: 2c5eef89e506a7ff64d405e714ba3c778b83051b@1506125 13f79535-47bb-0310-9956-ffa450edef68
| package org.apache.rave.rest.interceptor;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.rave.rest.model.JsonResponseWrapper;
/**
* Created with IntelliJ IDEA.
* User: erinnp
... | /*
* 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"); you ... | 19 | 0 | 1 | add_only | --- a/rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java
+++ b/rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java
@@ -1 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
... | --- a/rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java
+++ b/rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java
@@ ... @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * o... | --- a/rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java
+++ b/rave-components/rave-core-api/src/main/java/org/apache/rave/rest/interceptor/JsonResponseWrapperInterceptor.java
@@ -1 +1,20 @@
ADD /*
ADD * Licensed to the Apache Software Foundation (ASF) unde... | <<<<<<< SEARCH
package org.apache.rave.rest.interceptor;
=======
/*
* 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... |
mudalov/safe-service | 6b3846f61836132e048cebba184535a694583053 | src/main/java/com/mudalov/safe/impl/SafeCommands.java | java | bsd-2-clause | Remove unnecessary lock on context creation
| package com.mudalov.safe.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
/**
* API Entry point, links commands and execution contexts
*
* User: mudalov
* Date: 22/01/15
* Time: 23... | package com.mudalov.safe.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
/**
* API Entry point, links commands and execution contexts
*
* User: mudalov
* Date: 22/01/15
* Time: 23... | 6 | 15 | 2 | mixed | --- a/src/main/java/com/mudalov/safe/impl/SafeCommands.java
+++ b/src/main/java/com/mudalov/safe/impl/SafeCommands.java
@@ -18,7 +18,3 @@
- private static final Logger log = LoggerFactory.getLogger(SafeCommands.class);
-
- private static final ReentrantLock groupContextLock = new ReentrantLock();
-
- private... | --- a/src/main/java/com/mudalov/safe/impl/SafeCommands.java
+++ b/src/main/java/com/mudalov/safe/impl/SafeCommands.java
@@ ... @@
- private static final Logger log = LoggerFactory.getLogger(SafeCommands.class);
-
- private static final ReentrantLock groupContextLock = new ReentrantLock();
-
- private static ... | --- a/src/main/java/com/mudalov/safe/impl/SafeCommands.java
+++ b/src/main/java/com/mudalov/safe/impl/SafeCommands.java
@@ -18,7 +18,3 @@
CON
DEL private static final Logger log = LoggerFactory.getLogger(SafeCommands.class);
DEL
DEL private static final ReentrantLock groupContextLock = new ReentrantLock();
DE... | <<<<<<< SEARCH
public class SafeCommands {
private static final Logger log = LoggerFactory.getLogger(SafeCommands.class);
private static final ReentrantLock groupContextLock = new ReentrantLock();
private static final Map<String, GroupExecutionContext> groupContexts = new ConcurrentHashMap<String, GroupE... |
praekelt/vumi-go | 33598fd8baf527d63cef965eddfc90548b6c52b3 | go/apps/jsbox/definition.py | python | bsd-3-clause | Remove non-unicode endpoints from the endpoint list.
| import json
from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class ViewLogsAction(ConversationAction):
action_name = 'view_logs'
action_display_name = 'View Sandbox Logs'
redirect_to = 'jsbox_logs'
class ConversationDefinition(ConversationDefinition... | import json
from go.vumitools.conversation.definition import (
ConversationDefinitionBase, ConversationAction)
class ViewLogsAction(ConversationAction):
action_name = 'view_logs'
action_display_name = 'View Sandbox Logs'
redirect_to = 'jsbox_logs'
class ConversationDefinition(ConversationDefinition... | 8 | 6 | 2 | mixed | --- a/go/apps/jsbox/definition.py
+++ b/go/apps/jsbox/definition.py
@@ -26,8 +26,7 @@
- endpoints = set()
# vumi-jssandbox-toolkit v2 endpoints
try:
- endpoints.update(js_config["endpoints"].keys())
+ v2_endpoints = list(js_config["endpoints"].keys())
except Exc... | --- a/go/apps/jsbox/definition.py
+++ b/go/apps/jsbox/definition.py
@@ ... @@
- endpoints = set()
# vumi-jssandbox-toolkit v2 endpoints
try:
- endpoints.update(js_config["endpoints"].keys())
+ v2_endpoints = list(js_config["endpoints"].keys())
except Exception:
... | --- a/go/apps/jsbox/definition.py
+++ b/go/apps/jsbox/definition.py
@@ -26,8 +26,7 @@
CON
DEL endpoints = set()
CON # vumi-jssandbox-toolkit v2 endpoints
CON try:
DEL endpoints.update(js_config["endpoints"].keys())
ADD v2_endpoints = list(js_config["endpoints"].keys())
C... | <<<<<<< SEARCH
return []
endpoints = set()
# vumi-jssandbox-toolkit v2 endpoints
try:
endpoints.update(js_config["endpoints"].keys())
except Exception:
pass
# vumi-jssandbox-toolkit v1 endpoints
try:
pool, tag = js_config["... |
parzonka/prm4j | d56b16212167742937ab5b18508f75248830179b | src/main/java/prm4j/indexing/realtime/LowLevelBinding.java | java | epl-1.0 | Remove todo and add comment
| /*
* Copyright (c) 2012 Mateusz Parzonka, Eric Bodden
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:... | /*
* Copyright (c) 2012 Mateusz Parzonka, Eric Bodden
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:... | 3 | 3 | 1 | mixed | --- a/src/main/java/prm4j/indexing/realtime/LowLevelBinding.java
+++ b/src/main/java/prm4j/indexing/realtime/LowLevelBinding.java
@@ -28,7 +28,7 @@
/**
- * Register a map where this binding is used.
+ * Register a map which uses this binding as key.
*
- * @param mapReference
+ * @param nodeRe... | --- a/src/main/java/prm4j/indexing/realtime/LowLevelBinding.java
+++ b/src/main/java/prm4j/indexing/realtime/LowLevelBinding.java
@@ ... @@
/**
- * Register a map where this binding is used.
+ * Register a map which uses this binding as key.
*
- * @param mapReference
+ * @param nodeRef
... | --- a/src/main/java/prm4j/indexing/realtime/LowLevelBinding.java
+++ b/src/main/java/prm4j/indexing/realtime/LowLevelBinding.java
@@ -28,7 +28,7 @@
CON /**
DEL * Register a map where this binding is used.
ADD * Register a map which uses this binding as key.
CON *
DEL * @param mapReference
ADD ... | <<<<<<< SEARCH
/**
* Register a map where this binding is used.
*
* @param mapReference
*/
void registerNode(WeakReference<Node> nodeReference); // TODO resource registration
boolean isDisabled();
=======
/**
* Register a map which uses this binding as key.
*
* @pa... |
songzhw/AndroidTestDemo | 46defa9ca3f361158a463276425601aa9f6c242a | IntoJFace/src/cn/six/uav/util/CommandRunner.java | java | apache-2.0 | Fix the bug : the running of two processes are not synchronous
| package cn.six.uav.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
* Created by songzhw on 2016/3/10.
*/
public class CommandRunner {
private List<String> outputs;
public v... | package cn.six.uav.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
* Created by songzhw on 2016/3/10.
*/
public class CommandRunner {
private List<String> outputs;
public i... | 2 | 1 | 2 | mixed | --- a/IntoJFace/src/cn/six/uav/util/CommandRunner.java
+++ b/IntoJFace/src/cn/six/uav/util/CommandRunner.java
@@ -16,3 +16,3 @@
- public void run(List<String> cmds) throws Exception {
+ public int run(List<String> cmds) throws Exception {
outputs = new ArrayList<>();
@@ -43,2 +43,3 @@
+ return... | --- a/IntoJFace/src/cn/six/uav/util/CommandRunner.java
+++ b/IntoJFace/src/cn/six/uav/util/CommandRunner.java
@@ ... @@
- public void run(List<String> cmds) throws Exception {
+ public int run(List<String> cmds) throws Exception {
outputs = new ArrayList<>();
@@ ... @@
+ return proc.waitFor();... | --- a/IntoJFace/src/cn/six/uav/util/CommandRunner.java
+++ b/IntoJFace/src/cn/six/uav/util/CommandRunner.java
@@ -16,3 +16,3 @@
CON
DEL public void run(List<String> cmds) throws Exception {
ADD public int run(List<String> cmds) throws Exception {
CON outputs = new ArrayList<>();
@@ -43,2 +43,3 @@
CON
... | <<<<<<< SEARCH
private List<String> outputs;
public void run(List<String> cmds) throws Exception {
outputs = new ArrayList<>();
ProcessBuilder procBuilder = new ProcessBuilder(cmds)
=======
private List<String> outputs;
public int run(List<String> cmds) throws Exception {
outp... |
remigourdon/sound-editors | 16b164dce67ead1336c9042daa9818617abf0e42 | framework/Player.java | java | mit | Add methods to add and remove sounds from the player.
| import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.SourceDataLine;
import java.util.ArrayList;
import framework.Sound;
/**
* Handles the playing of the sounds inside the list.
*/
public class Player {
public Player() {
final AudioFormat af = new Aud... | import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.SourceDataLine;
import java.util.ArrayList;
import framework.Sound;
/**
* Handles the playing of the sounds inside the list.
*/
public class Player {
public Player() {
final AudioFormat af = new Aud... | 16 | 0 | 1 | add_only | --- a/framework/Player.java
+++ b/framework/Player.java
@@ -24,2 +24,18 @@
+ /**
+ * Add the specified Sound to the list.
+ * @param s the sound to be added
+ */
+ public void addSound(Sound s) {
+ list.add(s);
+ }
+
+ /**
+ * Remove the specified Sound from the list.
+ * @param... | --- a/framework/Player.java
+++ b/framework/Player.java
@@ ... @@
+ /**
+ * Add the specified Sound to the list.
+ * @param s the sound to be added
+ */
+ public void addSound(Sound s) {
+ list.add(s);
+ }
+
+ /**
+ * Remove the specified Sound from the list.
+ * @param s the So... | --- a/framework/Player.java
+++ b/framework/Player.java
@@ -24,2 +24,18 @@
CON
ADD /**
ADD * Add the specified Sound to the list.
ADD * @param s the sound to be added
ADD */
ADD public void addSound(Sound s) {
ADD list.add(s);
ADD }
ADD
ADD /**
ADD * Remove the specified So... | <<<<<<< SEARCH
}
private final SourceDataLine line;
private ArrayList<Sound> list;
=======
}
/**
* Add the specified Sound to the list.
* @param s the sound to be added
*/
public void addSound(Sound s) {
list.add(s);
}
/**
* Remove the specified ... |
nikolay-radkov/EBudgie | c20354f89ab7e4c020ab2d38e4bcb56eb2154e62 | android/app/src/main/java/com/ebudgie/MainApplication.java | java | mit | Increase the AsyncStorage capacity fromm 5mb to 100mb
| package com.ebudgie;
import android.app.Application;
import android.util.Log;
import com.facebook.react.ReactApplication;
import io.underscope.react.fbak.RNAccountKitPackage;
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactIns... | package com.ebudgie;
import android.app.Application;
import android.util.Log;
import com.facebook.react.ReactApplication;
import io.underscope.react.fbak.RNAccountKitPackage;
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.modules.... | 4 | 0 | 2 | add_only | --- a/android/app/src/main/java/com/ebudgie/MainApplication.java
+++ b/android/app/src/main/java/com/ebudgie/MainApplication.java
@@ -9,2 +9,3 @@
import com.oblador.vectoricons.VectorIconsPackage;
+import com.facebook.react.modules.storage.ReactDatabaseSupplier;
import com.facebook.react.ReactInstanceManager;
@@ -28,... | --- a/android/app/src/main/java/com/ebudgie/MainApplication.java
+++ b/android/app/src/main/java/com/ebudgie/MainApplication.java
@@ ... @@
import com.oblador.vectoricons.VectorIconsPackage;
+import com.facebook.react.modules.storage.ReactDatabaseSupplier;
import com.facebook.react.ReactInstanceManager;
@@ ... @@
... | --- a/android/app/src/main/java/com/ebudgie/MainApplication.java
+++ b/android/app/src/main/java/com/ebudgie/MainApplication.java
@@ -9,2 +9,3 @@
CON import com.oblador.vectoricons.VectorIconsPackage;
ADD import com.facebook.react.modules.storage.ReactDatabaseSupplier;
CON import com.facebook.react.ReactInstanceManager... | <<<<<<< SEARCH
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
=======
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
import com.oblador.vectoricons.VectorI... |
kamatama41/embulk-test-helpers | 446cc75abeed059d285595c5241186b59202f53d | build.gradle.kts | kotlin | mit | Cut off support for Java 7
| import com.github.kamatama41.gradle.gitrelease.GitReleaseExtension
buildscript {
val kotlinVersion = "1.2.31"
extra["kotlinVersion"] = kotlinVersion
repositories {
jcenter()
maven { setUrl("http://kamatama41.github.com/maven-repository/repository") }
}
dependencies {
classpa... | import com.github.kamatama41.gradle.gitrelease.GitReleaseExtension
buildscript {
val kotlinVersion = "1.2.31"
extra["kotlinVersion"] = kotlinVersion
repositories {
jcenter()
maven { setUrl("http://kamatama41.github.com/maven-repository/repository") }
}
dependencies {
classpa... | 2 | 2 | 1 | mixed | --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -26,4 +26,4 @@
configure<JavaPluginConvention> {
- sourceCompatibility = JavaVersion.VERSION_1_7
- targetCompatibility = JavaVersion.VERSION_1_7
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
} | --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ ... @@
configure<JavaPluginConvention> {
- sourceCompatibility = JavaVersion.VERSION_1_7
- targetCompatibility = JavaVersion.VERSION_1_7
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
}
| --- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -26,4 +26,4 @@
CON configure<JavaPluginConvention> {
DEL sourceCompatibility = JavaVersion.VERSION_1_7
DEL targetCompatibility = JavaVersion.VERSION_1_7
ADD sourceCompatibility = JavaVersion.VERSION_1_8
ADD targetCompatibility = JavaVersion.VERSION_1_8
CO... | <<<<<<< SEARCH
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
=======
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
>>>>>>> REPLACE
|
nafarlee/thoughtfuck | f8a5b27ca6932cb433643fbe4971cac2e6a00667 | src/program.rs | rust | mit | Adjust depth when jump commands are seen
| use command::Command;
use vm::VM;
pub struct Program {
instructions : Vec<Command>,
instruction_pointer: Option<usize>,
is_seeking: bool,
current_depth: u64,
goal_depth: Option<u64>,
}
impl Program {
pub fn new () -> Program {
Program {
instructions: Vec::new(),
... | use command::Command;
use vm::VM;
pub struct Program {
instructions : Vec<Command>,
instruction_pointer: Option<usize>,
is_seeking: bool,
current_depth: u64,
goal_depth: Option<u64>,
}
impl Program {
pub fn new () -> Program {
Program {
instructions: Vec::new(),
... | 2 | 0 | 1 | add_only | --- a/src/program.rs
+++ b/src/program.rs
@@ -37,2 +37,4 @@
let command = self.instructions[index];
+ if command == Command::JumpForward { self.current_depth = self.current_depth + 1}
+ if command == Command::JumpBackward { self.current_depth = self.current_dep... | --- a/src/program.rs
+++ b/src/program.rs
@@ ... @@
let command = self.instructions[index];
+ if command == Command::JumpForward { self.current_depth = self.current_depth + 1}
+ if command == Command::JumpBackward { self.current_depth = self.current_depth - 1}
... | --- a/src/program.rs
+++ b/src/program.rs
@@ -37,2 +37,4 @@
CON let command = self.instructions[index];
ADD if command == Command::JumpForward { self.current_depth = self.current_depth + 1}
ADD if command == Command::JumpBackward { self.current_depth = self.cu... | <<<<<<< SEARCH
while index < self.instructions.len() {
let command = self.instructions[index];
vm.apply(command);
index = index + 1;
=======
while index < self.instructions.len() {
let command = self.instruc... |
Acizza/bcnotif | f85e32852cd3265bd515853c2cd71a42af4cce22 | src/util/mod.rs | rust | agpl-3.0 | Return error when a file is empty
| #[macro_use] pub mod error;
use std::path::{Path, PathBuf};
use std::fs::File;
use std::io::{self, Read};
pub fn local_path(path: &str) -> io::Result<PathBuf> {
let mut base = ::std::env::current_exe()?;
base.pop();
base.push(path);
Ok(base)
}
/// Creates a file only if it doesn't already exist and r... | #[macro_use] pub mod error;
use std::path::{Path, PathBuf};
use std::fs::File;
use std::io::{self, Read, Error, ErrorKind};
pub fn local_path(path: &str) -> io::Result<PathBuf> {
let mut base = ::std::env::current_exe()?;
base.pop();
base.push(path);
Ok(base)
}
/// Creates a file only if it doesn't a... | 10 | 2 | 2 | mixed | --- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -4,3 +4,3 @@
use std::fs::File;
-use std::io::{self, Read};
+use std::io::{self, Read, Error, ErrorKind};
@@ -36,3 +36,11 @@
- Ok(buffer)
+ if buffer.len() > 0 {
+ Ok(buffer)
+ } else {
+ let path = path.to_str().ok_or(Error::new(
+ ... | --- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ ... @@
use std::fs::File;
-use std::io::{self, Read};
+use std::io::{self, Read, Error, ErrorKind};
@@ ... @@
- Ok(buffer)
+ if buffer.len() > 0 {
+ Ok(buffer)
+ } else {
+ let path = path.to_str().ok_or(Error::new(
+ Erro... | --- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -4,3 +4,3 @@
CON use std::fs::File;
DEL use std::io::{self, Read};
ADD use std::io::{self, Read, Error, ErrorKind};
CON
@@ -36,3 +36,11 @@
CON
DEL Ok(buffer)
ADD if buffer.len() > 0 {
ADD Ok(buffer)
ADD } else {
ADD let path = path.to_str().ok... | <<<<<<< SEARCH
use std::path::{Path, PathBuf};
use std::fs::File;
use std::io::{self, Read};
pub fn local_path(path: &str) -> io::Result<PathBuf> {
=======
use std::path::{Path, PathBuf};
use std::fs::File;
use std::io::{self, Read, Error, ErrorKind};
pub fn local_path(path: &str) -> io::Result<PathBuf> {
>>>>>>> R... |
adamsea/recipes-api | 6732c4705caf7816423bc42c6f9b7db9079e61d6 | routes/login/index.js | javascript | mit | Add section 6.1 code to provide login for users
| var express = require('express');
var router = express.Router();
// Login a user with basic auth
router.post('/', function (req, res, next) {});
module.exports = router;
| var express = require('express');
var router = express.Router();
var auth = require('../../utils/auth');
var _ = require('lodash');
var JsonDB = require('node-json-db');
var crypto = require('crypto');
// Login a user with basic auth
router.post('/', auth.basic, function (req, res, next) {
var db = new JsonDB('db', ... | 40 | 1 | 1 | mixed | --- a/routes/login/index.js
+++ b/routes/login/index.js
@@ -2,5 +2,44 @@
var router = express.Router();
+var auth = require('../../utils/auth');
+var _ = require('lodash');
+var JsonDB = require('node-json-db');
+var crypto = require('crypto');
// Login a user with basic auth
-router.post('/', function (req, res, n... | --- a/routes/login/index.js
+++ b/routes/login/index.js
@@ ... @@
var router = express.Router();
+var auth = require('../../utils/auth');
+var _ = require('lodash');
+var JsonDB = require('node-json-db');
+var crypto = require('crypto');
// Login a user with basic auth
-router.post('/', function (req, res, next) {}... | --- a/routes/login/index.js
+++ b/routes/login/index.js
@@ -2,5 +2,44 @@
CON var router = express.Router();
ADD var auth = require('../../utils/auth');
ADD var _ = require('lodash');
ADD var JsonDB = require('node-json-db');
ADD var crypto = require('crypto');
CON
CON // Login a user with basic auth
DEL router.post('/... | <<<<<<< SEARCH
var express = require('express');
var router = express.Router();
// Login a user with basic auth
router.post('/', function (req, res, next) {});
module.exports = router;
=======
var express = require('express');
var router = express.Router();
var auth = require('../../utils/auth');
var _ = require('lo... |
openspending/subsidystories.eu | 557f276f3886a35bf97eb44e8192dfe682243112 | app/scripts/widgets/visualizations.js | javascript | mit | Remove top padding from the iframe's wrapping div and set minimum height. Also, remove the .col-xs-12 class
| 'use strict';
var _ = require('lodash');
var $ = require('jquery');
function render(container, options) {
container = $(container);
options = _.extend({
items: []
}, options);
_.each(options.items, function(url) {
var wrapper = $('<div>')
.css({
position: 'relative',
paddingTop:... | 'use strict';
var _ = require('lodash');
var $ = require('jquery');
function render(container, options) {
container = $(container);
options = _.extend({
items: []
}, options);
_.each(options.items, function(url) {
var wrapper = $('<div>')
.css({
position: 'relative',
minHeight: ... | 2 | 2 | 2 | mixed | --- a/app/scripts/widgets/visualizations.js
+++ b/app/scripts/widgets/visualizations.js
@@ -15,3 +15,3 @@
position: 'relative',
- paddingTop: '100%'
+ minHeight: '250vh'
})
@@ -39,3 +39,3 @@
- $('<div>').addClass('content-grid-item col-md-6')
+ $('<div>').addClass('content-grid-ite... | --- a/app/scripts/widgets/visualizations.js
+++ b/app/scripts/widgets/visualizations.js
@@ ... @@
position: 'relative',
- paddingTop: '100%'
+ minHeight: '250vh'
})
@@ ... @@
- $('<div>').addClass('content-grid-item col-md-6')
+ $('<div>').addClass('content-grid-item')
.appe... | --- a/app/scripts/widgets/visualizations.js
+++ b/app/scripts/widgets/visualizations.js
@@ -15,3 +15,3 @@
CON position: 'relative',
DEL paddingTop: '100%'
ADD minHeight: '250vh'
CON })
@@ -39,3 +39,3 @@
CON
DEL $('<div>').addClass('content-grid-item col-md-6')
ADD $('<div>').addCl... | <<<<<<< SEARCH
.css({
position: 'relative',
paddingTop: '100%'
})
.append(
=======
.css({
position: 'relative',
minHeight: '250vh'
})
.append(
>>>>>>> REPLACE
<<<<<<< SEARCH
);
$('<div>').addClass('content-grid-item col-md-6')
.appe... |
alphagov/finder-frontend | 5c875d9125aa71f16e1d9cc0653baa8e2bc2596d | app/assets/javascripts/modules/track-brexit-qa-choices.js | javascript | mit | Change jquery `find` to `querySelectorAll`
Using `querySelectorAll` rather than `querySelector` as input is a list
of radio buttons or checkboxes
Remove global JQuery object as we're no longer using it.
| window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (global, GOVUK) {
'use strict'
var $ = global.jQuery
GOVUK.Modules.TrackBrexitQaChoices = function () {
this.start = function (element) {
track(element)
}
function track (element) {
element.o... | window.GOVUK = window.GOVUK || {}
window.GOVUK.Modules = window.GOVUK.Modules || {};
(function (global, GOVUK) {
'use strict'
GOVUK.Modules.TrackBrexitQaChoices = function () {
this.start = function (element) {
track(element)
}
function track (element) {
element.on('submit', function (eve... | 2 | 4 | 2 | mixed | --- a/app/assets/javascripts/modules/track-brexit-qa-choices.js
+++ b/app/assets/javascripts/modules/track-brexit-qa-choices.js
@@ -5,4 +5,2 @@
'use strict'
-
- var $ = global.jQuery
@@ -16,4 +14,4 @@
var $checkedOption, eventLabel, options
- var $submittedForm = $(event.target)
- var $chec... | --- a/app/assets/javascripts/modules/track-brexit-qa-choices.js
+++ b/app/assets/javascripts/modules/track-brexit-qa-choices.js
@@ ... @@
'use strict'
-
- var $ = global.jQuery
@@ ... @@
var $checkedOption, eventLabel, options
- var $submittedForm = $(event.target)
- var $checkedOptions = $... | --- a/app/assets/javascripts/modules/track-brexit-qa-choices.js
+++ b/app/assets/javascripts/modules/track-brexit-qa-choices.js
@@ -5,4 +5,2 @@
CON 'use strict'
DEL
DEL var $ = global.jQuery
CON
@@ -16,4 +14,4 @@
CON var $checkedOption, eventLabel, options
DEL var $submittedForm = $(event.target)
... | <<<<<<< SEARCH
(function (global, GOVUK) {
'use strict'
var $ = global.jQuery
GOVUK.Modules.TrackBrexitQaChoices = function () {
=======
(function (global, GOVUK) {
'use strict'
GOVUK.Modules.TrackBrexitQaChoices = function () {
>>>>>>> REPLACE
<<<<<<< SEARCH
element.on('submit', function (event) ... |
claudiopastorini/claudiopastorini.github.io | ac863c20ac4094168b07d6823241d55e985ba231 | site.py | python | mit | Create custom test for Jinja2
| import sys
from flask import Flask, render_template
from flask_flatpages import FlatPages, flatpages
from flask_frozen import Freezer
DEBUG = True
FLATPAGES_AUTO_RELOAD = DEBUG
FLATPAGES_EXTENSION = '.md'
FREEZER_DESTINATION = 'dist'
app = Flask(__name__)
app.config.from_object(__name__)
pages = FlatPages(app)
freez... | import sys
from flask import Flask, render_template
from flask_flatpages import FlatPages, flatpages
from flask_frozen import Freezer
DEBUG = True
FLATPAGES_AUTO_RELOAD = DEBUG
FLATPAGES_EXTENSION = '.md'
FREEZER_DESTINATION = 'dist'
app = Flask(__name__)
app.config.from_object(__name__)
pages = FlatPages(app)
freez... | 6 | 0 | 1 | add_only | --- a/site.py
+++ b/site.py
@@ -41,2 +41,8 @@
+
+@app.template_test("list")
+def is_list(value):
+ return isinstance(value, list)
+
+
if __name__ == '__main__': | --- a/site.py
+++ b/site.py
@@ ... @@
+
+@app.template_test("list")
+def is_list(value):
+ return isinstance(value, list)
+
+
if __name__ == '__main__':
| --- a/site.py
+++ b/site.py
@@ -41,2 +41,8 @@
CON
ADD
ADD @app.template_test("list")
ADD def is_list(value):
ADD return isinstance(value, list)
ADD
ADD
CON if __name__ == '__main__':
| <<<<<<< SEARCH
return render_template('page.html', page=page)
if __name__ == '__main__':
if len(sys.argv) > 1 and sys.argv[1] == "build":
freezer.freeze()
else:
app.run(port=8080)
=======
return render_template('page.html', page=page)
@app.template_test("list")
def is_list(value):
... |
bitcoin-solutions/multibit-hd | b4574bd20bca63ff09e8d91b93338293582e21be | mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java | java | mit | Add support for brand names in message keys to reduce translation burden
| package org.multibit.hd.core.dto;
/**
* <p>Enum to provide the following to various UI models:</p>
* <ul>
* <li>High level wallet type selection (standard, Trezor, KeepKey etc)</li>
* </ul>
*
* <p>This reduces code complexity in factory methods when deciding how to build supporting objects</p>
*
* @since 0.0.1... | package org.multibit.hd.core.dto;
/**
* <p>Enum to provide the following to various UI models:</p>
* <ul>
* <li>High level wallet type selection (standard, Trezor, KeepKey etc)</li>
* </ul>
*
* <p>This reduces code complexity in factory methods when deciding how to build supporting objects</p>
*
* @since 0.0.1... | 15 | 4 | 5 | mixed | --- a/mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java
+++ b/mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java
@@ -11,3 +11,2 @@
* @since 0.0.1
- *
*/
@@ -18,3 +17,3 @@
*/
- STANDARD,
+ STANDARD("MultiBit"),
@@ -23,3 +22,3 @@
*/
- TREZOR,
+ TREZOR("Trezor"),
@@ -28,3 +... | --- a/mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java
+++ b/mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java
@@ ... @@
* @since 0.0.1
- *
*/
@@ ... @@
*/
- STANDARD,
+ STANDARD("MultiBit"),
@@ ... @@
*/
- TREZOR,
+ TREZOR("Trezor"),
@@ ... @@
*/
- KEEP_KEY,
+ K... | --- a/mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java
+++ b/mbhd-core/src/main/java/org/multibit/hd/core/dto/WalletMode.java
@@ -11,3 +11,2 @@
CON * @since 0.0.1
DEL *
CON */
@@ -18,3 +17,3 @@
CON */
DEL STANDARD,
ADD STANDARD("MultiBit"),
CON
@@ -23,3 +22,3 @@
CON */
DEL TREZOR,
ADD ... | <<<<<<< SEARCH
*
* @since 0.0.1
*
*/
public enum WalletMode {
=======
*
* @since 0.0.1
*/
public enum WalletMode {
>>>>>>> REPLACE
<<<<<<< SEARCH
* Target a standard soft wallet (BIP 32 or BIP 44)
*/
STANDARD,
/**
* Target a Trezor wallet (BIP 44 only)
*/
TREZOR,
/**
* Target a KeepKe... |
carols10cents/sassers | 9058174b23f381c57c016bfd929cd89a2e1c92fd | src/main.rs | rust | mit | Print nicer error messages for myself
| extern crate sassers;
extern crate docopt;
use docopt::Docopt;
use std::fs::File;
use std::io::Read;
use std::path::Path;
fn main() {
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
static USAGE: &'static str = "
Usage:
sassers [-t <style>] <inputfile>
sassers [-vh]
Options:
-h, --help ... | extern crate sassers;
extern crate docopt;
use docopt::Docopt;
use std::fs::File;
use std::io::Read;
use std::path::Path;
fn main() {
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
static USAGE: &'static str = "
Usage:
sassers [-t <style>] <inputfile>
sassers [-vh]
Options:
-h, --help ... | 12 | 5 | 1 | mixed | --- a/src/main.rs
+++ b/src/main.rs
@@ -32,7 +32,14 @@
let mut sass = String::new();
- File::open(&Path::new(&inputfile)).unwrap().read_to_string(&mut sass).unwrap();
-
- match sassers::compile(&sass, style) {
- Ok(compiled) => println!("{}", compiled),
- Err(msg) => println... | --- a/src/main.rs
+++ b/src/main.rs
@@ ... @@
let mut sass = String::new();
- File::open(&Path::new(&inputfile)).unwrap().read_to_string(&mut sass).unwrap();
-
- match sassers::compile(&sass, style) {
- Ok(compiled) => println!("{}", compiled),
- Err(msg) => println!("Compil... | --- a/src/main.rs
+++ b/src/main.rs
@@ -32,7 +32,14 @@
CON let mut sass = String::new();
DEL File::open(&Path::new(&inputfile)).unwrap().read_to_string(&mut sass).unwrap();
DEL
DEL match sassers::compile(&sass, style) {
DEL Ok(compiled) => println!("{}", compiled),
DEL E... | <<<<<<< SEARCH
let mut sass = String::new();
File::open(&Path::new(&inputfile)).unwrap().read_to_string(&mut sass).unwrap();
match sassers::compile(&sass, style) {
Ok(compiled) => println!("{}", compiled),
Err(msg) => println!("Compilation failed: {}", msg),
}
... |
wahn/Rust_Examples | 998b9161811cdf69a9f5aa437ae48bcc65a9489f | skat/src/main.rs | rust | mit | Select player first (before entering the loop).
| extern crate rand;
use rand::Rng;
use std::io;
enum Card {
ClubsAce,
ClubsTen,
ClubsKing,
ClubsQueen,
ClubsJack,
ClubsNine,
ClubsEight,
ClubsSeven,
SpadesAce,
SpadesTen,
SpadesKing,
SpadesQueen,
SpadesJack,
SpadesNine,
SpadesEight,
SpadesSeven,
Heart... | extern crate rand;
use rand::Rng;
use std::io;
enum Card {
ClubsAce,
ClubsTen,
ClubsKing,
ClubsQueen,
ClubsJack,
ClubsNine,
ClubsEight,
ClubsSeven,
SpadesAce,
SpadesTen,
SpadesKing,
SpadesQueen,
SpadesJack,
SpadesNine,
SpadesEight,
SpadesSeven,
Heart... | 8 | 8 | 1 | mixed | --- a/skat/src/main.rs
+++ b/skat/src/main.rs
@@ -47,11 +47,11 @@
fn main() {
+ // randomly select player
+ let player_number = rand::thread_rng().gen_range(0, 3);
+ match player_number {
+ 0 => println!("player A:"),
+ 1 => println!("player B:"),
+ 2 => println!("player C:"),
+ _ ... | --- a/skat/src/main.rs
+++ b/skat/src/main.rs
@@ ... @@
fn main() {
+ // randomly select player
+ let player_number = rand::thread_rng().gen_range(0, 3);
+ match player_number {
+ 0 => println!("player A:"),
+ 1 => println!("player B:"),
+ 2 => println!("player C:"),
+ _ => panic!(... | --- a/skat/src/main.rs
+++ b/skat/src/main.rs
@@ -47,11 +47,11 @@
CON fn main() {
ADD // randomly select player
ADD let player_number = rand::thread_rng().gen_range(0, 3);
ADD match player_number {
ADD 0 => println!("player A:"),
ADD 1 => println!("player B:"),
ADD 2 => println!("pla... | <<<<<<< SEARCH
fn main() {
loop {
// randomly select player
let player_number = rand::thread_rng().gen_range(0, 3);
match player_number {
0 => println!("player A:"),
1 => println!("player B:"),
2 => println!("player C:"),
_ => break,
}... |
allen-garvey/photog-spark | 1c14c4ac824f2242cc8beeb14f836ee4a9e030cc | src/main/kotlin/main/main.kt | kotlin | mit | Edit routes to allow matches with trailing slash
| package main
/**
* Created by allen on 7/28/16.
*/
import spark.Spark.*
import com.google.gson.Gson
import controllers.SqliteController
import models.User
import spark.ModelAndView
import spark.template.handlebars.HandlebarsTemplateEngine
import java.util.*
fun main(args : Array<String>) {
port(3000)
stati... | package main
/**
* Created by allen on 7/28/16.
*/
import spark.Spark.*
import com.google.gson.Gson
import controllers.SqliteController
import models.User
import spark.ModelAndView
import spark.template.handlebars.HandlebarsTemplateEngine
import java.util.*
fun main(args : Array<String>) {
port(3000)
stati... | 9 | 1 | 1 | mixed | --- a/src/main/kotlin/main/main.kt
+++ b/src/main/kotlin/main/main.kt
@@ -16,3 +16,11 @@
- staticFiles.location("/public");
+ staticFiles.location("/public")
+
+ //allow routes to match with trailing slash
+ before({ req, res ->
+ val path = req.pathInfo()
+ if (path.endsWith("/")){
+ ... | --- a/src/main/kotlin/main/main.kt
+++ b/src/main/kotlin/main/main.kt
@@ ... @@
- staticFiles.location("/public");
+ staticFiles.location("/public")
+
+ //allow routes to match with trailing slash
+ before({ req, res ->
+ val path = req.pathInfo()
+ if (path.endsWith("/")){
+ res.... | --- a/src/main/kotlin/main/main.kt
+++ b/src/main/kotlin/main/main.kt
@@ -16,3 +16,11 @@
CON
DEL staticFiles.location("/public");
ADD staticFiles.location("/public")
ADD
ADD //allow routes to match with trailing slash
ADD before({ req, res ->
ADD val path = req.pathInfo()
ADD if (path.... | <<<<<<< SEARCH
port(3000)
staticFiles.location("/public");
//gzip everything
=======
port(3000)
staticFiles.location("/public")
//allow routes to match with trailing slash
before({ req, res ->
val path = req.pathInfo()
if (path.endsWith("/")){
res.redirect(pa... |
StewEsho/Wa-Tor | e9251220406d1e31abbc5e9ba82e50ba94709996 | core/src/com/stewesho/wator/Main.java | java | mit | Revert "added entity lists(libgdx arrays) for fishes and sharks"
This reverts commit 80c76c829d63f67faa83ef7c2aaa8a601ce461ef.
| package com.stewesho.wator;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.OrthographicCamera;
public class Main extends Applica... | package com.stewesho.wator;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.OrthographicCamera;
public class Main extends Applica... | 1 | 3 | 3 | mixed | --- a/core/src/com/stewesho/wator/Main.java
+++ b/core/src/com/stewesho/wator/Main.java
@@ -12,3 +12,2 @@
OrthographicCamera cam;
- WorldManager world;
@@ -18,3 +17,2 @@
cam = new OrthographicCamera(50, 50);
- world = new WorldManager(25, 25);
}
@@ -29,3 +27,3 @@
- batch.draw(world.run(), -world.getMap.get... | --- a/core/src/com/stewesho/wator/Main.java
+++ b/core/src/com/stewesho/wator/Main.java
@@ ... @@
OrthographicCamera cam;
- WorldManager world;
@@ ... @@
cam = new OrthographicCamera(50, 50);
- world = new WorldManager(25, 25);
}
@@ ... @@
- batch.draw(world.run(), -world.getMap.getWidth()/2, -world.getMap... | --- a/core/src/com/stewesho/wator/Main.java
+++ b/core/src/com/stewesho/wator/Main.java
@@ -12,3 +12,2 @@
CON OrthographicCamera cam;
DEL WorldManager world;
CON
@@ -18,3 +17,2 @@
CON cam = new OrthographicCamera(50, 50);
DEL world = new WorldManager(25, 25);
CON }
@@ -29,3 +27,3 @@
CON
DEL batch.draw(world.... | <<<<<<< SEARCH
SpriteBatch batch;
OrthographicCamera cam;
WorldManager world;
@Override
public void create () {
batch = new SpriteBatch();
cam = new OrthographicCamera(50, 50);
world = new WorldManager(25, 25);
}
=======
SpriteBatch batch;
OrthographicCamera cam;
@Override
public void create () {
... |
virtool/virtool | ad73789f74106a2d6014a2f737578494d2d21fbf | virtool/api/processes.py | python | mit | Remove specific process API GET endpoints | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | import virtool.http.routes
import virtool.utils
from virtool.api.utils import json_response
routes = virtool.http.routes.Routes()
@routes.get("/api/processes")
async def find(req):
db = req.app["db"]
documents = [virtool.utils.base_processor(d) async for d in db.processes.find()]
return json_response(d... | 0 | 18 | 1 | del_only | --- a/virtool/api/processes.py
+++ b/virtool/api/processes.py
@@ -25,19 +25 @@
return json_response(virtool.utils.base_processor(document))
-
-
-@routes.get("/api/processes/software_update")
-async def get_software_update(req):
- db = req.app["db"]
-
- document = await db.processes.find_one({"type": "softwar... | --- a/virtool/api/processes.py
+++ b/virtool/api/processes.py
@@ ... @@
return json_response(virtool.utils.base_processor(document))
-
-
-@routes.get("/api/processes/software_update")
-async def get_software_update(req):
- db = req.app["db"]
-
- document = await db.processes.find_one({"type": "software_updat... | --- a/virtool/api/processes.py
+++ b/virtool/api/processes.py
@@ -25,19 +25 @@
CON return json_response(virtool.utils.base_processor(document))
DEL
DEL
DEL @routes.get("/api/processes/software_update")
DEL async def get_software_update(req):
DEL db = req.app["db"]
DEL
DEL document = await db.processes.fi... | <<<<<<< SEARCH
return json_response(virtool.utils.base_processor(document))
@routes.get("/api/processes/software_update")
async def get_software_update(req):
db = req.app["db"]
document = await db.processes.find_one({"type": "software_update"})
return json_response(virtool.utils.base_processor(docu... |
tdaede/mpv-rice | a84842ddc7c7149b085ba7791b3c46fec3d6ac7f | src/main.rs | rust | lgpl-2.1 | Remove deprecated mpv option usage.
| extern crate gtk;
use gtk::prelude::*;
use std::error::Error;
use std::io::prelude::*;
use std::fs::File;
use std::path::Path;
use std::env;
fn main() {
gtk::init().expect("Failed to initialize GTK.");
let window = gtk::Window::new(gtk::WindowType::Toplevel);
window.set_title("mpv-rice");
window.se... | extern crate gtk;
use gtk::prelude::*;
use std::error::Error;
use std::io::prelude::*;
use std::fs::File;
use std::path::Path;
use std::env;
fn main() {
gtk::init().expect("Failed to initialize GTK.");
let window = gtk::Window::new(gtk::WindowType::Toplevel);
window.set_title("mpv-rice");
window.se... | 1 | 1 | 1 | mixed | --- a/src/main.rs
+++ b/src/main.rs
@@ -38,3 +38,3 @@
let _ = file.write_all(b"# generated by mpv-rice\n");
- let _ = file.write_all(b"vo=opengl-hq\n");
+ let _ = file.write_all(b"profile=opengl-hq\n");
}); | --- a/src/main.rs
+++ b/src/main.rs
@@ ... @@
let _ = file.write_all(b"# generated by mpv-rice\n");
- let _ = file.write_all(b"vo=opengl-hq\n");
+ let _ = file.write_all(b"profile=opengl-hq\n");
});
| --- a/src/main.rs
+++ b/src/main.rs
@@ -38,3 +38,3 @@
CON let _ = file.write_all(b"# generated by mpv-rice\n");
DEL let _ = file.write_all(b"vo=opengl-hq\n");
ADD let _ = file.write_all(b"profile=opengl-hq\n");
CON });
| <<<<<<< SEARCH
};
let _ = file.write_all(b"# generated by mpv-rice\n");
let _ = file.write_all(b"vo=opengl-hq\n");
});
window.add(&button);
=======
};
let _ = file.write_all(b"# generated by mpv-rice\n");
let _ = file.write_all(b"profile=opengl-hq\n");
});
... |
hgschmie/presto | ca1d7307edd44e7f5b24d4fae6b8f8f6c1f8832e | presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java | java | apache-2.0 | Convert anonymous class to lambda
| /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... | 1 | 8 | 1 | mixed | --- a/presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java
+++ b/presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java
@@ -21,10 +21,3 @@
{
- OrcPredicate TRUE = new OrcPredicate()
- {
- @Override
- public boolean matches(long numberOfRows, Map<Integer, ColumnStatistics> statisticsByCo... | --- a/presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java
+++ b/presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java
@@ ... @@
{
- OrcPredicate TRUE = new OrcPredicate()
- {
- @Override
- public boolean matches(long numberOfRows, Map<Integer, ColumnStatistics> statisticsByColumnIndex... | --- a/presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java
+++ b/presto-orc/src/main/java/io/prestosql/orc/OrcPredicate.java
@@ -21,10 +21,3 @@
CON {
DEL OrcPredicate TRUE = new OrcPredicate()
DEL {
DEL @Override
DEL public boolean matches(long numberOfRows, Map<Integer, ColumnStatistics>... | <<<<<<< SEARCH
public interface OrcPredicate
{
OrcPredicate TRUE = new OrcPredicate()
{
@Override
public boolean matches(long numberOfRows, Map<Integer, ColumnStatistics> statisticsByColumnIndex)
{
return true;
}
};
/**
=======
public interface OrcPredicate
... |
tracek/gee_asset_manager | 8eca7b30865e4d02fd440f55ad3215dee6fab8a1 | gee_asset_manager/batch_remover.py | python | apache-2.0 | Add warning when removing an asset without full path
| import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
if not filtered_names:
logging.warning('Nothin... | import fnmatch
import logging
import sys
import ee
def delete(asset_path):
root_idx = asset_path.rfind('/')
if root_idx == -1:
logging.warning('Asset not found. Make sure you pass full asset name, e.g. users/pinkiepie/rainbow')
sys.exit(1)
root = asset_path[:root_idx]
all_assets_names... | 5 | 1 | 1 | mixed | --- a/gee_asset_manager/batch_remover.py
+++ b/gee_asset_manager/batch_remover.py
@@ -8,3 +8,7 @@
def delete(asset_path):
- root = asset_path[:asset_path.rfind('/')]
+ root_idx = asset_path.rfind('/')
+ if root_idx == -1:
+ logging.warning('Asset not found. Make sure you pass full asset name, e.g. user... | --- a/gee_asset_manager/batch_remover.py
+++ b/gee_asset_manager/batch_remover.py
@@ ... @@
def delete(asset_path):
- root = asset_path[:asset_path.rfind('/')]
+ root_idx = asset_path.rfind('/')
+ if root_idx == -1:
+ logging.warning('Asset not found. Make sure you pass full asset name, e.g. users/pink... | --- a/gee_asset_manager/batch_remover.py
+++ b/gee_asset_manager/batch_remover.py
@@ -8,3 +8,7 @@
CON def delete(asset_path):
DEL root = asset_path[:asset_path.rfind('/')]
ADD root_idx = asset_path.rfind('/')
ADD if root_idx == -1:
ADD logging.warning('Asset not found. Make sure you pass full asset ... | <<<<<<< SEARCH
def delete(asset_path):
root = asset_path[:asset_path.rfind('/')]
all_assets_names = [e['id'] for e in ee.data.getList({'id': root})]
filtered_names = fnmatch.filter(all_assets_names, asset_path)
=======
def delete(asset_path):
root_idx = asset_path.rfind('/')
if root_idx == -1:
... |
mikegehard/user-management-evolution-kotlin | b57aa414e1584911963940112eb0e502ec8b2b08 | applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt | kotlin | mit | Use lateinit for autowired variables
According to the Kotlin docs, this seems to be the preferred way to handle dependency
injected instance variables.
See: https://kotlinlang.org/docs/reference/properties.html#late-initialized-properties
| package com.example.billing.reocurringPayments
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.actuate.metrics.CounterService
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springf... | package com.example.billing.reocurringPayments
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.actuate.metrics.CounterService
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springf... | 6 | 6 | 2 | mixed | --- a/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
+++ b/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
@@ -16,9 +16,9 @@
@Autowired
- private var paymentGateway: com.example.payments.Gateway? = null
+ private lateinit va... | --- a/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
+++ b/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
@@ ... @@
@Autowired
- private var paymentGateway: com.example.payments.Gateway? = null
+ private lateinit var paymen... | --- a/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
+++ b/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
@@ -16,9 +16,9 @@
CON @Autowired
DEL private var paymentGateway: com.example.payments.Gateway? = null
ADD private la... | <<<<<<< SEARCH
class Controller {
@Autowired
private var paymentGateway: com.example.payments.Gateway? = null
@Autowired
private var counter: CounterService? = null
@Autowired
private var service: Service? = null
@RequestMapping(value = "/reocurringPayment", method = arrayOf(RequestMethod... |
JakeWharton/dex-method-list | 3816b5f3848ff9d53f80f1b64c7fb65b4bf2a98d | diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt | kotlin | apache-2.0 | Add label to signature table
| package com.jakewharton.diffuse.diff
import com.jakewharton.diffuse.Signatures
import com.jakewharton.diffuse.diffuseTable
import okio.ByteString
internal class SignaturesDiff(
val oldSignatures: Signatures,
val newSignatures: Signatures
) {
val changed = oldSignatures != newSignatures
}
internal fun Signature... | package com.jakewharton.diffuse.diff
import com.jakewharton.diffuse.Signatures
import com.jakewharton.diffuse.diffuseTable
import com.jakewharton.picnic.TextAlignment.TopRight
import okio.ByteString
internal class SignaturesDiff(
val oldSignatures: Signatures,
val newSignatures: Signatures
) {
val changed = old... | 23 | 10 | 2 | mixed | --- a/diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt
+++ b/diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt
@@ -4,2 +4,3 @@
import com.jakewharton.diffuse.diffuseTable
+import com.jakewharton.picnic.TextAlignment.TopRight
import okio.ByteString
@@ -17,18 +18,30 @@
he... | --- a/diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt
+++ b/diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt
@@ ... @@
import com.jakewharton.diffuse.diffuseTable
+import com.jakewharton.picnic.TextAlignment.TopRight
import okio.ByteString
@@ ... @@
header {
- ro... | --- a/diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt
+++ b/diffuse/src/main/kotlin/com/jakewharton/diffuse/diff/SignaturesDiff.kt
@@ -4,2 +4,3 @@
CON import com.jakewharton.diffuse.diffuseTable
ADD import com.jakewharton.picnic.TextAlignment.TopRight
CON import okio.ByteString
@@ -17,18 +18,30 @... | <<<<<<< SEARCH
import com.jakewharton.diffuse.Signatures
import com.jakewharton.diffuse.diffuseTable
import okio.ByteString
=======
import com.jakewharton.diffuse.Signatures
import com.jakewharton.diffuse.diffuseTable
import com.jakewharton.picnic.TextAlignment.TopRight
import okio.ByteString
>>>>>>> REPLACE
<<<<<... |
google/android-fhir | aab389a177fa93ed6772c640ff38eebf6b3efeb9 | datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt | kotlin | apache-2.0 | Fix test case to make sure item control extension code is part of supported codes
| /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | 4 | 1 | 1 | mixed | --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt
+++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt
@@ -33,3 +33,6 @@
if (it.system.value.equals(EXTENSION_ITEM_CONTROL_SYSTEM)) {
- ... | --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt
+++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt
@@ ... @@
if (it.system.value.equals(EXTENSION_ITEM_CONTROL_SYSTEM)) {
- ... | --- a/datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt
+++ b/datacapture/src/main/java/com/google/android/fhir/datacapture/MoreQuestionnaireItemExtensions.kt
@@ -33,3 +33,6 @@
CON if (it.system.value.equals(EXTENSION_ITEM_CONTROL_SYSTEM)) {
DEL ... | <<<<<<< SEARCH
it.value.codeableConcept.codingList.forEach {
if (it.system.value.equals(EXTENSION_ITEM_CONTROL_SYSTEM)) {
return it.code.value
}
}
=======
it.value.codeableConcept.codingList.forEach {
... |
Ruben-Sten/TeXiFy-IDEA | bc680b2d0d88196c81d362c6c9c8a3f8af53e0a7 | src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt | kotlin | mit | Remove check which does not do forward search in preamble because this is unnecessary (forward search works fine) and behaves incorrectly (at least in one case).
| package nl.rubensten.texifyidea.run.evince
import com.intellij.execution.runners.ExecutionEnvironment
import nl.rubensten.texifyidea.TeXception
import nl.rubensten.texifyidea.psi.LatexEnvironment
import nl.rubensten.texifyidea.run.LatexRunConfiguration
import nl.rubensten.texifyidea.util.*
import org.jetbrains.concurr... | package nl.rubensten.texifyidea.run.evince
import com.intellij.execution.runners.ExecutionEnvironment
import nl.rubensten.texifyidea.TeXception
import nl.rubensten.texifyidea.psi.LatexEnvironment
import nl.rubensten.texifyidea.run.LatexRunConfiguration
import nl.rubensten.texifyidea.util.*
import org.jetbrains.concurr... | 0 | 9 | 1 | del_only | --- a/src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt
+++ b/src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt
@@ -27,11 +27,2 @@
- // Do not do forward search when editing the preamble.
- if (psiFile.isRoot()) {
- val element = psiFile.findElementAt(edito... | --- a/src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt
+++ b/src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt
@@ ... @@
- // Do not do forward search when editing the preamble.
- if (psiFile.isRoot()) {
- val element = psiFile.findElementAt(editor.caretOf... | --- a/src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt
+++ b/src/nl/rubensten/texifyidea/run/evince/EvinceForwardSearch.kt
@@ -27,11 +27,2 @@
CON
DEL // Do not do forward search when editing the preamble.
DEL if (psiFile.isRoot()) {
DEL val element = psiFile.findEle... | <<<<<<< SEARCH
}
// Do not do forward search when editing the preamble.
if (psiFile.isRoot()) {
val element = psiFile.findElementAt(editor.caretOffset()) ?: return@run
val environment = element.parentOfType(LatexEnvironment::class) ?: return@run
... |
Abica/piston-examples | a0b048a0d8df16b657f0195b2096fac5d7a13540 | image/src/main.rs | rust | mit | Fix old_path import in image example
| #![feature(old_path)]
extern crate piston;
extern crate graphics;
extern crate sdl2_window;
extern crate opengl_graphics;
use std::cell::RefCell;
use opengl_graphics::{
GlGraphics,
OpenGL,
Texture,
};
use sdl2_window::Sdl2Window;
fn main() {
let opengl = OpenGL::_3_2;
let window = Sdl2Window::new... | #![feature(old_path)]
extern crate piston;
extern crate graphics;
extern crate sdl2_window;
extern crate opengl_graphics;
use std::old_path::*;
use std::cell::RefCell;
use opengl_graphics::{
GlGraphics,
OpenGL,
Texture,
};
use sdl2_window::Sdl2Window;
fn main() {
let opengl = OpenGL::_3_2;
let w... | 8 | 5 | 4 | mixed | --- a/image/src/main.rs
+++ b/image/src/main.rs
@@ -6,2 +6,4 @@
extern crate opengl_graphics;
+
+use std::old_path::*;
@@ -28,4 +30,4 @@
- let image = Path::new("./bin/assets/rust-logo.png");
- let image = Texture::from_path(&image).unwrap();
+ let rust_logo = Path::new("./bin/assets/rust-logo.png");
+ ... | --- a/image/src/main.rs
+++ b/image/src/main.rs
@@ ... @@
extern crate opengl_graphics;
+
+use std::old_path::*;
@@ ... @@
- let image = Path::new("./bin/assets/rust-logo.png");
- let image = Texture::from_path(&image).unwrap();
+ let rust_logo = Path::new("./bin/assets/rust-logo.png");
+ let rust_logo... | --- a/image/src/main.rs
+++ b/image/src/main.rs
@@ -6,2 +6,4 @@
CON extern crate opengl_graphics;
ADD
ADD use std::old_path::*;
CON
@@ -28,4 +30,4 @@
CON
DEL let image = Path::new("./bin/assets/rust-logo.png");
DEL let image = Texture::from_path(&image).unwrap();
ADD let rust_logo = Path::new("./bin/asse... | <<<<<<< SEARCH
extern crate sdl2_window;
extern crate opengl_graphics;
use std::cell::RefCell;
=======
extern crate sdl2_window;
extern crate opengl_graphics;
use std::old_path::*;
use std::cell::RefCell;
>>>>>>> REPLACE
<<<<<<< SEARCH
);
let image = Path::new("./bin/assets/rust-logo.png");
let image... |
smarturban/sstu_schedule | c076d54e4dd1200724cb5e28ebed2711af466838 | src/main/java/com/ssu/schedule/model/Day.java | java | apache-2.0 | fix(date): Update date for new study year
| package com.ssu.schedule.model;
public class Day {
private String start = "01.09.2016";
private String end = "01.07.2017";
private int weekday;
private int week = 0;
public void setWeekday(int weekday) {
this.weekday = weekday;
}
public void setWeek(int week) {
this.week ... | package com.ssu.schedule.model;
public class Day {
private String start = "01.09.2017";
private String end = "01.07.2018";
private int weekday;
private int week = 0;
public void setWeekday(int weekday) {
this.weekday = weekday;
}
public void setWeek(int week) {
this.week ... | 2 | 2 | 1 | mixed | --- a/src/main/java/com/ssu/schedule/model/Day.java
+++ b/src/main/java/com/ssu/schedule/model/Day.java
@@ -3,4 +3,4 @@
public class Day {
- private String start = "01.09.2016";
- private String end = "01.07.2017";
+ private String start = "01.09.2017";
+ private String end = "01.07.2018";
private int... | --- a/src/main/java/com/ssu/schedule/model/Day.java
+++ b/src/main/java/com/ssu/schedule/model/Day.java
@@ ... @@
public class Day {
- private String start = "01.09.2016";
- private String end = "01.07.2017";
+ private String start = "01.09.2017";
+ private String end = "01.07.2018";
private int weekd... | --- a/src/main/java/com/ssu/schedule/model/Day.java
+++ b/src/main/java/com/ssu/schedule/model/Day.java
@@ -3,4 +3,4 @@
CON public class Day {
DEL private String start = "01.09.2016";
DEL private String end = "01.07.2017";
ADD private String start = "01.09.2017";
ADD private String end = "01.07.2018";
C... | <<<<<<< SEARCH
public class Day {
private String start = "01.09.2016";
private String end = "01.07.2017";
private int weekday;
=======
public class Day {
private String start = "01.09.2017";
private String end = "01.07.2018";
private int weekday;
>>>>>>> REPLACE
|
inejge/ldap3 | 3c58b124a8ad6b84a3082844fa33833cd6fc3c82 | protocol/src/lib.rs | rust | apache-2.0 | Use if let because why not
| extern crate byteorder;
pub mod ber;
pub mod error;
use ber::common;
use ber::types::ASNType;
pub type Result<T> = std::result::Result<T, error::LDAPError>;
pub fn build_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
{
let msgidtag = msgid.into_ber_universal();
... | extern crate byteorder;
pub mod ber;
pub mod error;
use ber::common;
use ber::types::ASNType;
pub type Result<T> = std::result::Result<T, error::LDAPError>;
pub fn construct_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
{
let msgidtag = msgid.into_ber_universal();
... | 5 | 4 | 3 | mixed | --- a/protocol/src/lib.rs
+++ b/protocol/src/lib.rs
@@ -10,3 +10,3 @@
-pub fn build_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
+pub fn construct_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
{
@@ -15,4 +15,5 @@
- let ... | --- a/protocol/src/lib.rs
+++ b/protocol/src/lib.rs
@@ ... @@
-pub fn build_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
+pub fn construct_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
{
@@ ... @@
- let plvec = if contr... | --- a/protocol/src/lib.rs
+++ b/protocol/src/lib.rs
@@ -10,3 +10,3 @@
CON
DEL pub fn build_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
ADD pub fn construct_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
CON {
@@ -15,4 +15,5 @@... | <<<<<<< SEARCH
pub type Result<T> = std::result::Result<T, error::LDAPError>;
pub fn build_envelope(msgid: i32, protocolOp: common::Tag, controls: Option<common::Tag>) -> common::Tag
{
let msgidtag = msgid.into_ber_universal();
let plvec = if controls.is_some() {
vec![msgidtag, protocolOp, controls.u... |
MitocGroup/aws-sdk-js | 225d94b2aa021213165d5780118290443a1649a1 | lib/services/cloudsearchdomain.js | javascript | apache-2.0 | Add constructor and customized class documentation
| var AWS = require('../core');
/**
* Note: the `AWS.CloudSearchDomain` constructor must be created with a
* valid endpoint.
*/
AWS.util.update(AWS.CloudSearchDomain.prototype, {
/**
* @api private
*/
validateService: function validateService() {
if (!this.config.endpoint || this.config.endpoint.i... | var AWS = require('../core');
/**
* Constructs a service interface object. Each API operation is exposed as a
* function on service.
*
* ### Sending a Request Using CloudSearchDomain
*
* ```javascript
* var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});
* csd.search(params, function (err, data) {
... | 52 | 2 | 1 | mixed | --- a/lib/services/cloudsearchdomain.js
+++ b/lib/services/cloudsearchdomain.js
@@ -3,4 +3,54 @@
/**
- * Note: the `AWS.CloudSearchDomain` constructor must be created with a
- * valid endpoint.
+ * Constructs a service interface object. Each API operation is exposed as a
+ * function on service.
+ *
+ * ### Send... | --- a/lib/services/cloudsearchdomain.js
+++ b/lib/services/cloudsearchdomain.js
@@ ... @@
/**
- * Note: the `AWS.CloudSearchDomain` constructor must be created with a
- * valid endpoint.
+ * Constructs a service interface object. Each API operation is exposed as a
+ * function on service.
+ *
+ * ### Sending a R... | --- a/lib/services/cloudsearchdomain.js
+++ b/lib/services/cloudsearchdomain.js
@@ -3,4 +3,54 @@
CON /**
DEL * Note: the `AWS.CloudSearchDomain` constructor must be created with a
DEL * valid endpoint.
ADD * Constructs a service interface object. Each API operation is exposed as a
ADD * function on service.
A... | <<<<<<< SEARCH
/**
* Note: the `AWS.CloudSearchDomain` constructor must be created with a
* valid endpoint.
*/
AWS.util.update(AWS.CloudSearchDomain.prototype, {
=======
/**
* Constructs a service interface object. Each API operation is exposed as a
* function on service.
*
* ### Sending a Request Using... |
homeworkprod/byceps | 11fd3e5c8a2c7f591dff1ba1949508d178d1e5d5 | byceps/util/irc.py | python | bsd-3-clause | Make IRC message delay configurable
| """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | 5 | 4 | 2 | mixed | --- a/byceps/util/irc.py
+++ b/byceps/util/irc.py
@@ -19,5 +19,3 @@
DEFAULT_ENABLED = False
-
-DELAY_IN_SECONDS = 2
-
+DEFAULT_DELAY_IN_SECONDS = 2
DEFAULT_TEXT_PREFIX = '[BYCEPS] '
@@ -43,3 +41,6 @@
# because of flooding.
- sleep(DELAY_IN_SECONDS)
+ delay = int(
+ current_app.config.get('ANNOUNCE_I... | --- a/byceps/util/irc.py
+++ b/byceps/util/irc.py
@@ ... @@
DEFAULT_ENABLED = False
-
-DELAY_IN_SECONDS = 2
-
+DEFAULT_DELAY_IN_SECONDS = 2
DEFAULT_TEXT_PREFIX = '[BYCEPS] '
@@ ... @@
# because of flooding.
- sleep(DELAY_IN_SECONDS)
+ delay = int(
+ current_app.config.get('ANNOUNCE_IRC_DELAY', DEFAU... | --- a/byceps/util/irc.py
+++ b/byceps/util/irc.py
@@ -19,5 +19,3 @@
CON DEFAULT_ENABLED = False
DEL
DEL DELAY_IN_SECONDS = 2
DEL
ADD DEFAULT_DELAY_IN_SECONDS = 2
CON DEFAULT_TEXT_PREFIX = '[BYCEPS] '
@@ -43,3 +41,6 @@
CON # because of flooding.
DEL sleep(DELAY_IN_SECONDS)
ADD delay = int(
ADD curr... | <<<<<<< SEARCH
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_ENABLED = False
DELAY_IN_SECONDS = 2
DEFAULT_TEXT_PREFIX = '[BYCEPS] '
=======
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_ENABLED = False
DEFAULT_DELAY_IN_SECONDS = 2
DEFAULT_TEXT_PREFIX = '[BYCEPS] '
>>>>>>> REPLACE
<<<<<<< SEARCH
#... |
superdesk/liveblog | c52a8db8276e1f6c49c427bb23547e3f65e7f257 | client/app/scripts/liveblog-syndication/directives/incoming-syndication.js | javascript | agpl-3.0 | Remove amount of round trip to the server
| liveblogSyndication
.directive('lbIncomingSyndication',
['$routeParams', 'IncomingSyndicationActions', 'IncomingSyndicationReducers', 'Store',
function($routeParams, IncomingSyndicationActions, IncomingSyndicationReducers, Store) {
return {
templateUrl: 'scripts/liveblog-... | liveblogSyndication
.directive('lbIncomingSyndication',
['$routeParams', 'IncomingSyndicationActions', 'IncomingSyndicationReducers', 'Store',
function($routeParams, IncomingSyndicationActions, IncomingSyndicationReducers, Store) {
return {
templateUrl: 'scripts/liveblog-... | 4 | 3 | 1 | mixed | --- a/client/app/scripts/liveblog-syndication/directives/incoming-syndication.js
+++ b/client/app/scripts/liveblog-syndication/directives/incoming-syndication.js
@@ -36,5 +36,6 @@
// Not very fast, but easy to setup
- scope.$on('posts', function() {
- Incom... | --- a/client/app/scripts/liveblog-syndication/directives/incoming-syndication.js
+++ b/client/app/scripts/liveblog-syndication/directives/incoming-syndication.js
@@ ... @@
// Not very fast, but easy to setup
- scope.$on('posts', function() {
- IncomingSyndi... | --- a/client/app/scripts/liveblog-syndication/directives/incoming-syndication.js
+++ b/client/app/scripts/liveblog-syndication/directives/incoming-syndication.js
@@ -36,5 +36,6 @@
CON // Not very fast, but easy to setup
DEL scope.$on('posts', function() {
DEL ... | <<<<<<< SEARCH
// On incoming post, we reload all the posts.
// Not very fast, but easy to setup
scope.$on('posts', function() {
IncomingSyndicationActions
.getPosts(scope.blogId, scope.syndId);
... |
paulfanelli/planet_alignment | 1423085230a010b5a96ce9eaf63abeb9e5af58a4 | setup.py | python | mit | Add a data_files option to install the config and plugin files in /etc/planet_alignment.
| import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Utility function to read the README file, used for the long desc.
def read(fn):
return open(os.path.join(os.path.dirname(__file__), fn)).read()
setup(
name='planet_alignment',
version='1.0.0',
... | import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Utility function to read the README file, used for the long desc.
def read(fn):
return open(os.path.join(os.path.dirname(__file__), fn)).read()
setup(
name='planet_alignment',
version='1.0.0',
... | 4 | 1 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -40,3 +40,6 @@
},
- include_package_data=True
+ include_package_data=True,
+ data_files=[
+ ('/etc/planet_alignment', ['align1.py', 'align2.py', 'system.yaml'])
+ ]
) | --- a/setup.py
+++ b/setup.py
@@ ... @@
},
- include_package_data=True
+ include_package_data=True,
+ data_files=[
+ ('/etc/planet_alignment', ['align1.py', 'align2.py', 'system.yaml'])
+ ]
)
| --- a/setup.py
+++ b/setup.py
@@ -40,3 +40,6 @@
CON },
DEL include_package_data=True
ADD include_package_data=True,
ADD data_files=[
ADD ('/etc/planet_alignment', ['align1.py', 'align2.py', 'system.yaml'])
ADD ]
CON )
| <<<<<<< SEARCH
]
},
include_package_data=True
)
=======
]
},
include_package_data=True,
data_files=[
('/etc/planet_alignment', ['align1.py', 'align2.py', 'system.yaml'])
]
)
>>>>>>> REPLACE
|
sourrust/flac | 3223bba9bc100a5c48fa8fee3f7d5954553007ca | src/frame/subframe/types.rs | rust | bsd-3-clause | Add new initializer for `PartitionedRiceContents`
| pub const MAX_FIXED_ORDER: usize = 4;
pub struct SubFrame {
pub data: Data,
pub wasted_bits: u32,
}
pub enum Data {
Constant(i32),
Verbatim(Vec<i32>),
Fixed(Fixed),
}
pub struct Fixed {
pub entropy_coding_method: EntropyCodingMethod,
pub order: u8,
pub warmup: [i32; MAX_FIXED_ORDER],
pub residual: ... | pub const MAX_FIXED_ORDER: usize = 4;
pub struct SubFrame {
pub data: Data,
pub wasted_bits: u32,
}
pub enum Data {
Constant(i32),
Verbatim(Vec<i32>),
Fixed(Fixed),
}
pub struct Fixed {
pub entropy_coding_method: EntropyCodingMethod,
pub order: u8,
pub warmup: [i32; MAX_FIXED_ORDER],
pub residual: ... | 19 | 0 | 1 | add_only | --- a/src/frame/subframe/types.rs
+++ b/src/frame/subframe/types.rs
@@ -41 +41,20 @@
}
+
+impl PartitionedRiceContents {
+ pub fn new(capacity_by_order: u32) -> PartitionedRiceContents {
+ let capacity = 2_usize.pow(capacity_by_order);
+ let mut parameters = Vec::with_capacity(capacity);
+ let mut raw_... | --- a/src/frame/subframe/types.rs
+++ b/src/frame/subframe/types.rs
@@ ... @@
}
+
+impl PartitionedRiceContents {
+ pub fn new(capacity_by_order: u32) -> PartitionedRiceContents {
+ let capacity = 2_usize.pow(capacity_by_order);
+ let mut parameters = Vec::with_capacity(capacity);
+ let mut raw_bits ... | --- a/src/frame/subframe/types.rs
+++ b/src/frame/subframe/types.rs
@@ -41 +41,20 @@
CON }
ADD
ADD impl PartitionedRiceContents {
ADD pub fn new(capacity_by_order: u32) -> PartitionedRiceContents {
ADD let capacity = 2_usize.pow(capacity_by_order);
ADD let mut parameters = Vec::with_capacity(capacity);... | <<<<<<< SEARCH
pub capacity_by_order: u32,
}
=======
pub capacity_by_order: u32,
}
impl PartitionedRiceContents {
pub fn new(capacity_by_order: u32) -> PartitionedRiceContents {
let capacity = 2_usize.pow(capacity_by_order);
let mut parameters = Vec::with_capacity(capacity);
let mut raw_bits ... |
MarkusAmshove/Kluent | be463c6823c2fc26e8189b513674ba181454750a | jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt | kotlin | mit | Add unit tests for times verification mode
| package org.amshove.kluent.tests.mocking
import org.amshove.kluent.*
import org.amshove.kluent.tests.helpclasses.Database
import kotlin.test.Test
import kotlin.test.assertFails
class VerifyCalledOnceShould {
@Test
fun passWhenAMethodWasCalledOnlyOnce() {
val mock = mock(Database::class)
mock.... | package org.amshove.kluent.tests.mocking
import org.amshove.kluent.*
import org.amshove.kluent.tests.helpclasses.Database
import kotlin.test.Test
import kotlin.test.assertFails
class VerifyUsingTimesShould {
@Test
fun passWhenAMethodWasCalledSpecifiedTimes() {
val mock = mock(Database::class)
... | 18 | 7 | 3 | mixed | --- a/jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt
+++ b/jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt
@@ -7,11 +7,12 @@
-class VerifyCalledOnceShould {
+class VerifyUsingTimesShould {
@Test
- fun passWhenAMethodWasCalledOnlyOnce() {
+ fu... | --- a/jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt
+++ b/jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt
@@ ... @@
-class VerifyCalledOnceShould {
+class VerifyUsingTimesShould {
@Test
- fun passWhenAMethodWasCalledOnlyOnce() {
+ fun passWh... | --- a/jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt
+++ b/jvm/src/test/kotlin/org/amshove/kluent/tests/mocking/VerifyCalledOnceShould.kt
@@ -7,11 +7,12 @@
CON
DEL class VerifyCalledOnceShould {
ADD class VerifyUsingTimesShould {
CON
CON @Test
DEL fun passWhenAMethodWasCalledOn... | <<<<<<< SEARCH
import kotlin.test.assertFails
class VerifyCalledOnceShould {
@Test
fun passWhenAMethodWasCalledOnlyOnce() {
val mock = mock(Database::class)
mock.getPerson(1)
mock.getPerson(1)
Verify times 2 on mock that mock.getPerson(1) was called
assertFails { Verify... |
piemonkey/TodoTree-prototype | a74a5a59f08ae21b9f8aa5ecd5e2c1914c5e3eaf | app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java | java | mit | Add number of sub items to model
| package com.placeholder.rich.todotreeprototype.model;
public class Item {
private final String name;
private boolean complete;
public Item(String name) {
this(name, false);
}
public Item(String name, boolean complete) {
this.name = name;
this.complete = complete;
}
... | package com.placeholder.rich.todotreeprototype.model;
public class Item {
private final String name;
private boolean complete;
private int nSubItems;
private int nItemsLeft;
public Item(String name) {
this(name, false, 0, 0);
}
public Item(String name, boolean complete) {
... | 21 | 1 | 3 | mixed | --- a/app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java
+++ b/app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java
@@ -5,5 +5,7 @@
private boolean complete;
+ private int nSubItems;
+ private int nItemsLeft;
public Item(String name) {
- this(name, fals... | --- a/app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java
+++ b/app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java
@@ ... @@
private boolean complete;
+ private int nSubItems;
+ private int nItemsLeft;
public Item(String name) {
- this(name, false);
+ ... | --- a/app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java
+++ b/app/src/main/java/com/placeholder/rich/todotreeprototype/model/Item.java
@@ -5,5 +5,7 @@
CON private boolean complete;
ADD private int nSubItems;
ADD private int nItemsLeft;
CON
CON public Item(String name) {
DEL ... | <<<<<<< SEARCH
private final String name;
private boolean complete;
public Item(String name) {
this(name, false);
}
public Item(String name, boolean complete) {
this.name = name;
this.complete = complete;
}
=======
private final String name;
private boolean co... |
nickvandewiele/RMG-Py | 98ca37ed174e281542df2f1026a298387845b524 | rmgpy/tools/data/generate/input.py | python | mit | Cut down on the loading of families in the normal GenerateReactionsTest
Change generateReactions input reactant to propyl
| # Data sources for kinetics
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = 'default',
#this section lists possible reaction families to find reactioons with
kineticsFamilies = ['!Intra_Disproportionation','!Substitutio... | # Data sources for kinetics
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = 'default',
#this section lists possible reaction families to find reactioons with
kineticsFamilies = ['R_Recombination'],
kineticsEstimator... | 5 | 11 | 4 | mixed | --- a/rmgpy/tools/data/generate/input.py
+++ b/rmgpy/tools/data/generate/input.py
@@ -7,3 +7,3 @@
#this section lists possible reaction families to find reactioons with
- kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'],
+ kineticsFamilies = ['R_Recombination'],
kineticsEstimator = 'ra... | --- a/rmgpy/tools/data/generate/input.py
+++ b/rmgpy/tools/data/generate/input.py
@@ ... @@
#this section lists possible reaction families to find reactioons with
- kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'],
+ kineticsFamilies = ['R_Recombination'],
kineticsEstimator = 'rate rul... | --- a/rmgpy/tools/data/generate/input.py
+++ b/rmgpy/tools/data/generate/input.py
@@ -7,3 +7,3 @@
CON #this section lists possible reaction families to find reactioons with
DEL kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'],
ADD kineticsFamilies = ['R_Recombination'],
CON kineticsEst... | <<<<<<< SEARCH
kineticsDepositories = 'default',
#this section lists possible reaction families to find reactioons with
kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'],
kineticsEstimator = 'rate rules',
)
# List all species you want reactions between
species(
label='ethane',
... |
release-notes/release-notes-hub | 82853862625336f68ec127b25a33c32b6869d2cb | controllers/IndexController.js | javascript | mit | Load the latest 6 release notes to the start page.
| 'use strict';
const AbstractController = require('./AbstractController');
const ReleaseNotesLoader = require('@release-notes/node/lib/ReleaseNotesLoader');
const multer = require('multer');
const releaseNotesLoader = new ReleaseNotesLoader();
const uploadHandler = multer();
class IndexController extends AbstractCont... | 'use strict';
const AbstractController = require('./AbstractController');
class IndexController extends AbstractController {
indexAction(req, res, next) {
this.serviceManager.get('releaseNotesRepository').findNewest(
6, (err, releaseNotesList) => {
if (err) {
return void next(err);
... | 9 | 29 | 3 | mixed | --- a/controllers/IndexController.js
+++ b/controllers/IndexController.js
@@ -3,7 +3,2 @@
const AbstractController = require('./AbstractController');
-const ReleaseNotesLoader = require('@release-notes/node/lib/ReleaseNotesLoader');
-const multer = require('multer');
-
-const releaseNotesLoader = new ReleaseNotesLoade... | --- a/controllers/IndexController.js
+++ b/controllers/IndexController.js
@@ ... @@
const AbstractController = require('./AbstractController');
-const ReleaseNotesLoader = require('@release-notes/node/lib/ReleaseNotesLoader');
-const multer = require('multer');
-
-const releaseNotesLoader = new ReleaseNotesLoader();
-... | --- a/controllers/IndexController.js
+++ b/controllers/IndexController.js
@@ -3,7 +3,2 @@
CON const AbstractController = require('./AbstractController');
DEL const ReleaseNotesLoader = require('@release-notes/node/lib/ReleaseNotesLoader');
DEL const multer = require('multer');
DEL
DEL const releaseNotesLoader = new Re... | <<<<<<< SEARCH
const AbstractController = require('./AbstractController');
const ReleaseNotesLoader = require('@release-notes/node/lib/ReleaseNotesLoader');
const multer = require('multer');
const releaseNotesLoader = new ReleaseNotesLoader();
const uploadHandler = multer();
class IndexController extends AbstractCon... |
Madsn/ripple-client | 6f4a3ca3df610de6fdbd8a2a148641f57c0eee12 | config-example.js | javascript | isc | Set default connection_offset to 0 seconds
| /**
* Ripple Client Configuration
*
* Copy this file to config.js and edit to suit your preferences.
*/
var Options = {
server: {
trace : true,
trusted: true,
local_signing: true,
servers: [
{ host: 's_west.ripple.com', port: 443, secure: true },
{ host: 's_east.ripple... | /**
* Ripple Client Configuration
*
* Copy this file to config.js and edit to suit your preferences.
*/
var Options = {
server: {
trace : true,
trusted: true,
local_signing: true,
servers: [
{ host: 's_west.ripple.com', port: 443, secure: true },
{ host: 's_east.ripple... | 1 | 1 | 1 | mixed | --- a/config-example.js
+++ b/config-example.js
@@ -16,3 +16,3 @@
- connection_offset: 1
+ connection_offset: 0
}, | --- a/config-example.js
+++ b/config-example.js
@@ ... @@
- connection_offset: 1
+ connection_offset: 0
},
| --- a/config-example.js
+++ b/config-example.js
@@ -16,3 +16,3 @@
CON
DEL connection_offset: 1
ADD connection_offset: 0
CON },
| <<<<<<< SEARCH
],
connection_offset: 1
},
=======
],
connection_offset: 0
},
>>>>>>> REPLACE
|
group-policy/rally | d8d2e4b763fbd7cedc42046f6f45395bf15caa79 | samples/plugins/scenario/scenario_plugin.py | python | apache-2.0 | Fix the scenario plugin sample
We forgot to fix scenario plugin sample when we were doing
rally.task.scenario refactoring
Change-Id: Iadbb960cf168bd3b9cd6c1881a5f7a8dffd7036f
| # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 6 | 5 | 3 | mixed | --- a/samples/plugins/scenario/scenario_plugin.py
+++ b/samples/plugins/scenario/scenario_plugin.py
@@ -15,9 +15,10 @@
-from rally.task.scenarios import base
+from rally.plugins.openstack import scenario
+from rally.task import atomic
-class ScenarioPlugin(base.Scenario):
+class ScenarioPlugin(scenario.OpenStackS... | --- a/samples/plugins/scenario/scenario_plugin.py
+++ b/samples/plugins/scenario/scenario_plugin.py
@@ ... @@
-from rally.task.scenarios import base
+from rally.plugins.openstack import scenario
+from rally.task import atomic
-class ScenarioPlugin(base.Scenario):
+class ScenarioPlugin(scenario.OpenStackScenario):... | --- a/samples/plugins/scenario/scenario_plugin.py
+++ b/samples/plugins/scenario/scenario_plugin.py
@@ -15,9 +15,10 @@
CON
DEL from rally.task.scenarios import base
ADD from rally.plugins.openstack import scenario
ADD from rally.task import atomic
CON
CON
DEL class ScenarioPlugin(base.Scenario):
ADD class ScenarioPl... | <<<<<<< SEARCH
# under the License.
from rally.task.scenarios import base
class ScenarioPlugin(base.Scenario):
"""Sample plugin which lists flavors."""
@base.atomic_action_timer("list_flavors")
def _list_flavors(self):
"""Sample of usage clients - list flavors
=======
# under the License.
from... |
PDXFinder/pdxfinder | 36b8fd8e0c040a07d94283745f3ac06d66742c1d | data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java | java | apache-2.0 | Create Search Filter for the Persisted Mapping Entities
| package org.pdxfinder.rdbms.repositories;
import org.pdxfinder.rdbms.dao.MappingEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Repository
public... | package org.pdxfinder.rdbms.repositories;
import org.pdxfinder.rdbms.dao.MappingEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springfram... | 27 | 1 | 3 | mixed | --- a/data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java
+++ b/data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java
@@ -3,4 +3,7 @@
import org.pdxfinder.rdbms.dao.MappingEntity;
+import org.springframework.data.domain.Page;
+import org.springframewo... | --- a/data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java
+++ b/data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java
@@ ... @@
import org.pdxfinder.rdbms.dao.MappingEntity;
+import org.springframework.data.domain.Page;
+import org.springframework.dat... | --- a/data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java
+++ b/data-model/src/main/java/org/pdxfinder/rdbms/repositories/MappingEntityRepository.java
@@ -3,4 +3,7 @@
CON import org.pdxfinder.rdbms.dao.MappingEntity;
ADD import org.springframework.data.domain.Page;
ADD import org.spri... | <<<<<<< SEARCH
import org.pdxfinder.rdbms.dao.MappingEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Repository
public interface MappingEntityRep... |
pennlabs/penn-mobile-android | b0c8c151aaab98c76f5396b93f4b2d8ef2aba40b | PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java | java | mit | Update Dining API URL and add URL methods
| package com.pennapps.labs.pennmobile.api;
public class DiningAPI extends API {
public DiningAPI() {
super();
BASE_URL = "https://37922702.ngrok.com/";
}
}
| package com.pennapps.labs.pennmobile.api;
import android.util.Log;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import java.io.IOException;
public class DiningAPI extends API {
public... | 59 | 1 | 2 | mixed | --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java
+++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java
@@ -2,2 +2,12 @@
+
+import android.util.Log;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.json.JSONExcept... | --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java
+++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java
@@ ... @@
+
+import android.util.Log;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.json.JSONException;
+i... | --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java
+++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/api/DiningAPI.java
@@ -2,2 +2,12 @@
CON
ADD
ADD import android.util.Log;
ADD
ADD import org.apache.http.HttpResponse;
ADD import org.apache.http.client.methods.HttpGet;
ADD impor... | <<<<<<< SEARCH
package com.pennapps.labs.pennmobile.api;
public class DiningAPI extends API {
public DiningAPI() {
super();
BASE_URL = "https://37922702.ngrok.com/";
}
}
=======
package com.pennapps.labs.pennmobile.api;
import android.util.Log;
import org.apache.http.HttpResponse;
import ... |
99designs/colorific | 64e515f87fa47f44ed8c18e9c9edc76fee49ce84 | setup.py | python | isc | Use patched Pillow as a packaging dependency.
| # -*- coding: utf-8 -*-
#
# setup.py
# colorific
#
"""
Package information for colorific.
"""
import sys
# check for the supported Python version
version = tuple(sys.version_info[:2])
if version != (2, 7):
sys.stderr.write('colorific requires Python 2.7 (you have %d.%d)\n' %\
version)
sys.stder... | # -*- coding: utf-8 -*-
#
# setup.py
# colorific
#
"""
Package information for colorific.
"""
import sys
# check for the supported Python version
version = tuple(sys.version_info[:2])
if version != (2, 7):
sys.stderr.write('colorific requires Python 2.7 (you have %d.%d)\n' %\
version)
sys.stder... | 4 | 1 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -35,5 +35,8 @@
install_requires=[
- 'PIL>=1.1.6',
+ 'Pillow==1.7.8',
'colormath>=1.0.8',
'numpy>=1.6.1',
+ ],
+ dependency_links=[
+ 'http://github.com/larsyencken/Pillow/tarball/master#egg=Pillow-1.7.8',
... | --- a/setup.py
+++ b/setup.py
@@ ... @@
install_requires=[
- 'PIL>=1.1.6',
+ 'Pillow==1.7.8',
'colormath>=1.0.8',
'numpy>=1.6.1',
+ ],
+ dependency_links=[
+ 'http://github.com/larsyencken/Pillow/tarball/master#egg=Pillow-1.7.8',
],
| --- a/setup.py
+++ b/setup.py
@@ -35,5 +35,8 @@
CON install_requires=[
DEL 'PIL>=1.1.6',
ADD 'Pillow==1.7.8',
CON 'colormath>=1.0.8',
CON 'numpy>=1.6.1',
ADD ],
ADD dependency_links=[
ADD 'http://github.com/larsyencken/Pillow/tarball/master#egg... | <<<<<<< SEARCH
py_modules=['colorific'],
install_requires=[
'PIL>=1.1.6',
'colormath>=1.0.8',
'numpy>=1.6.1',
],
license='ISC',
=======
py_modules=['colorific'],
install_requires=[
'Pillow==1.7.8',
'colormath>=1.0.8',
'... |
denkmal/denkmal.org | fa5ac37b0a17c68fc56f7cd93d2406a70c9dac7c | library/Denkmal/library/Denkmal/Component/HeaderBar.js | javascript | mit | Hide weekday menu on navigate:start
| /**
* @class Denkmal_Component_HeaderBar
* @extends Denkmal_Component_Abstract
*/
var Denkmal_Component_HeaderBar = Denkmal_Component_Abstract.extend({
/** @type String */
_class: 'Denkmal_Component_HeaderBar',
events: {
'click .menu.dates a': function() {
var state = !this.el.hasAttribute('data-we... | /**
* @class Denkmal_Component_HeaderBar
* @extends Denkmal_Component_Abstract
*/
var Denkmal_Component_HeaderBar = Denkmal_Component_Abstract.extend({
/** @type String */
_class: 'Denkmal_Component_HeaderBar',
events: {
'click .menu.dates a': function() {
if (!this.getWeekdayMenuVisible()) {
... | 17 | 2 | 2 | mixed | --- a/library/Denkmal/library/Denkmal/Component/HeaderBar.js
+++ b/library/Denkmal/library/Denkmal/Component/HeaderBar.js
@@ -11,4 +11,12 @@
'click .menu.dates a': function() {
- var state = !this.el.hasAttribute('data-weekday-menu');
- this.setWeekdayMenuVisible(state);
+ if (!this.getWeekdayMenuVi... | --- a/library/Denkmal/library/Denkmal/Component/HeaderBar.js
+++ b/library/Denkmal/library/Denkmal/Component/HeaderBar.js
@@ ... @@
'click .menu.dates a': function() {
- var state = !this.el.hasAttribute('data-weekday-menu');
- this.setWeekdayMenuVisible(state);
+ if (!this.getWeekdayMenuVisible()) ... | --- a/library/Denkmal/library/Denkmal/Component/HeaderBar.js
+++ b/library/Denkmal/library/Denkmal/Component/HeaderBar.js
@@ -11,4 +11,12 @@
CON 'click .menu.dates a': function() {
DEL var state = !this.el.hasAttribute('data-weekday-menu');
DEL this.setWeekdayMenuVisible(state);
ADD if (!this.getW... | <<<<<<< SEARCH
events: {
'click .menu.dates a': function() {
var state = !this.el.hasAttribute('data-weekday-menu');
this.setWeekdayMenuVisible(state);
}
},
=======
events: {
'click .menu.dates a': function() {
if (!this.getWeekdayMenuVisible()) {
this.setWeekdayMenuVisible(... |
cfpb/capital-framework | 8ef7cb57c0473a2f383a7139993e9a839d835652 | src/cf-tables/src/cf-table-row-links.js | javascript | cc0-1.0 | Remove table row links init method
|
/* ==========================================================================
Table Row Links
Mixin for adding row link click functionality to table organism.
========================================================================== */
'use strict';
var closest = require( 'atomic-component/src/utilities/... |
/* ==========================================================================
Table Row Links
Mixin for adding row link click functionality to table organism.
========================================================================== */
'use strict';
var closest = require( 'atomic-component/src/utilities/... | 0 | 15 | 1 | del_only | --- a/src/cf-tables/src/cf-table-row-links.js
+++ b/src/cf-tables/src/cf-table-row-links.js
@@ -35,17 +35,2 @@
if( link ) window.location = link.getAttribute( 'href' );
- },
-
- /**
- * Handle initilization of Table Row Links. Added for standalone
- * use cases.
- *
- */
- init: function() {
- var el... | --- a/src/cf-tables/src/cf-table-row-links.js
+++ b/src/cf-tables/src/cf-table-row-links.js
@@ ... @@
if( link ) window.location = link.getAttribute( 'href' );
- },
-
- /**
- * Handle initilization of Table Row Links. Added for standalone
- * use cases.
- *
- */
- init: function() {
- var elements = ... | --- a/src/cf-tables/src/cf-table-row-links.js
+++ b/src/cf-tables/src/cf-table-row-links.js
@@ -35,17 +35,2 @@
CON if( link ) window.location = link.getAttribute( 'href' );
DEL },
DEL
DEL /**
DEL * Handle initilization of Table Row Links. Added for standalone
DEL * use cases.
DEL *
DEL */
DEL ini... | <<<<<<< SEARCH
var link = target.querySelector( 'a' );
if( link ) window.location = link.getAttribute( 'href' );
},
/**
* Handle initilization of Table Row Links. Added for standalone
* use cases.
*
*/
init: function() {
var elements = document.querySelector( TableRowLinks.ui.base );
... |
tipsy/javalin | 81eea95c5885a08fd0934ed323c38f307bc65336 | src/test/java/io/javalin/TestLifecycleEvents.kt | kotlin | apache-2.0 | [tests] Add test for ws handler added
| /*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*
*/
package io.javalin
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
class TestLifecycleEvents {
@Test
fun `life cycle events work`()... | /*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*
*/
package io.javalin
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
class TestLifecycleEvents {
@Test
fun `life cycle events work`()... | 9 | 0 | 1 | add_only | --- a/src/test/java/io/javalin/TestLifecycleEvents.kt
+++ b/src/test/java/io/javalin/TestLifecycleEvents.kt
@@ -37,2 +37,11 @@
+ @Test
+ fun `wsHandlerAdded event works`() = TestUtil.test { app, http ->
+ var log = ""
+ app.on.wsHandlerAdded { handlerMetaInfo -> log += handlerMetaInfo.path }
+ ... | --- a/src/test/java/io/javalin/TestLifecycleEvents.kt
+++ b/src/test/java/io/javalin/TestLifecycleEvents.kt
@@ ... @@
+ @Test
+ fun `wsHandlerAdded event works`() = TestUtil.test { app, http ->
+ var log = ""
+ app.on.wsHandlerAdded { handlerMetaInfo -> log += handlerMetaInfo.path }
+ app.o... | --- a/src/test/java/io/javalin/TestLifecycleEvents.kt
+++ b/src/test/java/io/javalin/TestLifecycleEvents.kt
@@ -37,2 +37,11 @@
CON
ADD @Test
ADD fun `wsHandlerAdded event works`() = TestUtil.test { app, http ->
ADD var log = ""
ADD app.on.wsHandlerAdded { handlerMetaInfo -> log += handlerMetaIn... | <<<<<<< SEARCH
}
}
=======
}
@Test
fun `wsHandlerAdded event works`() = TestUtil.test { app, http ->
var log = ""
app.on.wsHandlerAdded { handlerMetaInfo -> log += handlerMetaInfo.path }
app.on.wsHandlerAdded { handlerMetaInfo -> log += handlerMetaInfo.path }
app.ws("/... |
C4K3/Portals | 167e2cce98fea152f27cce2358b490c189f1f344 | src/Portals.java | java | cc0-1.0 | Make justTeleportedEntities a HashSet instead of ArrayList
| package net.simpvp.Portals;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
public class Portals extends JavaPlugin {
public static JavaPlugin instance;
public static List<UUID> justTeleporte... | package net.simpvp.Portals;
import java.io.File;
import java.util.UUID;
import java.util.HashSet;
import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
public class Portals extends JavaPlugin {
public static JavaPlugin instance;
public static HashSet<UUID> justTeleportedEntities = new HashSe... | 2 | 3 | 2 | mixed | --- a/src/Portals.java
+++ b/src/Portals.java
@@ -3,5 +3,4 @@
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
import java.util.UUID;
+import java.util.HashSet;
@@ -14,3 +13,3 @@
- public static List<UUID> justTeleportedEntities = new ArrayList<UUID>();
+ public static HashSet<UUID> justT... | --- a/src/Portals.java
+++ b/src/Portals.java
@@ ... @@
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
import java.util.UUID;
+import java.util.HashSet;
@@ ... @@
- public static List<UUID> justTeleportedEntities = new ArrayList<UUID>();
+ public static HashSet<UUID> justTeleportedEntit... | --- a/src/Portals.java
+++ b/src/Portals.java
@@ -3,5 +3,4 @@
CON import java.io.File;
DEL import java.util.ArrayList;
DEL import java.util.List;
CON import java.util.UUID;
ADD import java.util.HashSet;
CON
@@ -14,3 +13,3 @@
CON
DEL public static List<UUID> justTeleportedEntities = new ArrayList<UUID>();
ADD public... | <<<<<<< SEARCH
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import org.bukkit.entity.Entity;
=======
import java.io.File;
import java.util.UUID;
import java.util.HashSet;
import org.bukkit.entity.Entity;
>>>>>>> REPLACE
<<<<<<< SEARCH
public static JavaPlugin in... |
justinas/gettext | e487626b6a98f96fab4948e59a7d41aca2a4032f | src/parse_options.rs | rust | mit | Remove Debug implementation for now.
DebugStruct only stabilized in 1.2.0
| extern crate encoding;
use std::fmt;
use self::encoding::types::EncodingRef;
/// ParseOptions allows setting options for parsing MO catalogs.
pub struct ParseOptions {
force_encoding: Option<EncodingRef>,
}
impl ParseOptions {
/// Returns a new instance of ParseOptions with default options.
pub fn new()... | extern crate encoding;
use std::fmt;
use self::encoding::types::EncodingRef;
/// ParseOptions allows setting options for parsing MO catalogs.
#[allow(missing_debug_implementations)]
pub struct ParseOptions {
force_encoding: Option<EncodingRef>,
}
impl ParseOptions {
/// Returns a new instance of ParseOption... | 1 | 18 | 2 | mixed | --- a/src/parse_options.rs
+++ b/src/parse_options.rs
@@ -7,2 +7,3 @@
/// ParseOptions allows setting options for parsing MO catalogs.
+#[allow(missing_debug_implementations)]
pub struct ParseOptions {
@@ -27,19 +28 @@
}
-
-// Cannot derive as Encoding does not implement Debug.
-impl fmt::Debug for ParseOptions {
- ... | --- a/src/parse_options.rs
+++ b/src/parse_options.rs
@@ ... @@
/// ParseOptions allows setting options for parsing MO catalogs.
+#[allow(missing_debug_implementations)]
pub struct ParseOptions {
@@ ... @@
}
-
-// Cannot derive as Encoding does not implement Debug.
-impl fmt::Debug for ParseOptions {
- fn fmt(&se... | --- a/src/parse_options.rs
+++ b/src/parse_options.rs
@@ -7,2 +7,3 @@
CON /// ParseOptions allows setting options for parsing MO catalogs.
ADD #[allow(missing_debug_implementations)]
CON pub struct ParseOptions {
@@ -27,19 +28 @@
CON }
DEL
DEL // Cannot derive as Encoding does not implement Debug.
DEL impl fmt::Debug ... | <<<<<<< SEARCH
/// ParseOptions allows setting options for parsing MO catalogs.
pub struct ParseOptions {
force_encoding: Option<EncodingRef>,
=======
/// ParseOptions allows setting options for parsing MO catalogs.
#[allow(missing_debug_implementations)]
pub struct ParseOptions {
force_encoding: Option<Enco... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.