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
pascalduez/react-module-boilerplate
37c5841c8d92254144b24dfff8cca8b2735f95aa
.storybook/webpack.config.js
javascript
unlicense
Make Storybook work with babel 7
/* eslint-disable no-param-reassign, global-require */ module.exports = baseConfig => { baseConfig.module.rules.push({ test: /\.css$/, use: [ { loader: 'style-loader', }, { loader: 'css-loader', options: { modules: true, localIdentName: '[name]-[l...
/* eslint-disable no-param-reassign, global-require */ module.exports = baseConfig => { // Replace storybook baseConfig rule. baseConfig.module.rules.splice(0, 1, { test: /\.js$/, exclude: /node_modules/, use: [ { loader: 'babel-loader', options: { presets: ['./babel.con...
14
0
1
add_only
--- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -3,2 +3,16 @@ module.exports = baseConfig => { + // Replace storybook baseConfig rule. + baseConfig.module.rules.splice(0, 1, { + test: /\.js$/, + exclude: /node_modules/, + use: [ + { + loader: 'babel-loader', + opt...
--- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ ... @@ module.exports = baseConfig => { + // Replace storybook baseConfig rule. + baseConfig.module.rules.splice(0, 1, { + test: /\.js$/, + exclude: /node_modules/, + use: [ + { + loader: 'babel-loader', + options: {...
--- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -3,2 +3,16 @@ CON module.exports = baseConfig => { ADD // Replace storybook baseConfig rule. ADD baseConfig.module.rules.splice(0, 1, { ADD test: /\.js$/, ADD exclude: /node_modules/, ADD use: [ ADD { ADD loader: 'bab...
<<<<<<< SEARCH module.exports = baseConfig => { baseConfig.module.rules.push({ test: /\.css$/, ======= module.exports = baseConfig => { // Replace storybook baseConfig rule. baseConfig.module.rules.splice(0, 1, { test: /\.js$/, exclude: /node_modules/, use: [ { loader: 'babel-load...
dmitriiabramov/esfmt
66f4b95e5c9ff60668df9e9446794ef1609f702f
__tests__/code_snippets/objects.js
javascript
bsd-3-clause
Add test for multiline object destructing
/* eslint-disable */ // input: property access a['a']; a[a]; a[b()]; a[b[c[0]]]; 'abc'[1]; // output: a['a']; a[a]; a[b()]; a[b[c[0]]]; 'abc'[1]; // input: declaration // config: {"max-len": 30} let a = { b: function() { return c; }, c: a.b.c.d.e.f, d: 1, e: 'abc', f: this, [a]: u...
/* eslint-disable */ // input: property access a['a']; a[a]; a[b()]; a[b[c[0]]]; 'abc'[1]; // output: a['a']; a[a]; a[b()]; a[b[c[0]]]; 'abc'[1]; // input: declaration // config: {"max-len": 30} let a = { b: function() { return c; }, c: a.b.c.d.e.f, d: 1, e: 'abc', f: this, [a]: u...
14
0
1
add_only
--- a/__tests__/code_snippets/objects.js +++ b/__tests__/code_snippets/objects.js @@ -45,2 +45,16 @@ +// input: multiline destructuring +// config: {"max-len": 30} +let a = { + aaaaaaaaaa, + bbbbbbbbbb, + dddddddddd +}; +// output: +let a = { + aaaaaaaaaa, + bbbbbbbbbb, + dddddddddd +}; + // input:...
--- a/__tests__/code_snippets/objects.js +++ b/__tests__/code_snippets/objects.js @@ ... @@ +// input: multiline destructuring +// config: {"max-len": 30} +let a = { + aaaaaaaaaa, + bbbbbbbbbb, + dddddddddd +}; +// output: +let a = { + aaaaaaaaaa, + bbbbbbbbbb, + dddddddddd +}; + // input: one line...
--- a/__tests__/code_snippets/objects.js +++ b/__tests__/code_snippets/objects.js @@ -45,2 +45,16 @@ CON ADD // input: multiline destructuring ADD // config: {"max-len": 30} ADD let a = { ADD aaaaaaaaaa, ADD bbbbbbbbbb, ADD dddddddddd ADD }; ADD // output: ADD let a = { ADD aaaaaaaaaa, ADD bbbbbbbb...
<<<<<<< SEARCH let a = {b, c, d}; // input: one line objects let a = {a: 1, b: 2}; ======= let a = {b, c, d}; // input: multiline destructuring // config: {"max-len": 30} let a = { aaaaaaaaaa, bbbbbbbbbb, dddddddddd }; // output: let a = { aaaaaaaaaa, bbbbbbbbbb, dddddddddd }; // input: one ...
AustinRochford/s3img-ipython-magic
b374221d8d0e902494066d666570c1a882c962bc
s3img_magic.py
python
mit
Add magic to save a Matplotlib figure to S3
from IPython.display import Image import boto def parse_s3_uri(uri): if uri.startswith('s3://'): uri = uri[5:] return uri.split('/', 1) def get_s3_key(uri): bucket_name, key_name = parse_s3_uri(uri) conn = boto.connect_s3() bucket = conn.get_bucket(bucket_name) return bucket.get_k...
from StringIO import StringIO from IPython.core.magic import Magics, magics_class, line_magic from IPython.display import Image import boto def parse_s3_uri(uri): if uri.startswith('s3://'): uri = uri[5:] return uri.split('/', 1) def get_s3_bucket(bucket_name): conn = boto.connect_s3() r...
34
3
4
mixed
--- a/s3img_magic.py +++ b/s3img_magic.py @@ -1 +1,4 @@ +from StringIO import StringIO + +from IPython.core.magic import Magics, magics_class, line_magic from IPython.display import Image @@ -3,2 +6,3 @@ import boto + @@ -11,9 +15,20 @@ +def get_s3_bucket(bucket_name): + conn = boto.connect_s3() + + return ...
--- a/s3img_magic.py +++ b/s3img_magic.py @@ ... @@ +from StringIO import StringIO + +from IPython.core.magic import Magics, magics_class, line_magic from IPython.display import Image @@ ... @@ import boto + @@ ... @@ +def get_s3_bucket(bucket_name): + conn = boto.connect_s3() + + return conn.get_bucket(buc...
--- a/s3img_magic.py +++ b/s3img_magic.py @@ -1 +1,4 @@ ADD from StringIO import StringIO ADD ADD from IPython.core.magic import Magics, magics_class, line_magic CON from IPython.display import Image @@ -3,2 +6,3 @@ CON import boto ADD CON @@ -11,9 +15,20 @@ CON ADD def get_s3_bucket(bucket_name): ADD conn = bo...
<<<<<<< SEARCH from IPython.display import Image import boto def parse_s3_uri(uri): ======= from StringIO import StringIO from IPython.core.magic import Magics, magics_class, line_magic from IPython.display import Image import boto def parse_s3_uri(uri): >>>>>>> REPLACE <<<<<<< SEARCH def get_s3_key(uri): ...
2017398956/picasso
97b5bc0257697856dbb144379b9e85346d4c2dfd
picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java
java
apache-2.0
Simplify menu debugging logic a bit.
package com.squareup.picasso.sample; import android.app.Activity; import android.os.Bundle; import android.os.StrictMode; import android.view.Menu; import android.view.MenuItem; import android.widget.ListView; import com.squareup.picasso.Picasso; public class SampleActivity extends Activity { private SampleAdapter ...
package com.squareup.picasso.sample; import android.app.Activity; import android.os.Bundle; import android.os.StrictMode; import android.view.Menu; import android.view.MenuItem; import android.widget.ListView; import com.squareup.picasso.Picasso; public class SampleActivity extends Activity { private SampleAdapter ...
12
15
1
mixed
--- a/picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java +++ b/picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java @@ -27,18 +27,15 @@ - @Override public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == 0) { - item.setChecked(!item.is...
--- a/picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java +++ b/picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java @@ ... @@ - @Override public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == 0) { - item.setChecked(!item.isChecked())...
--- a/picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java +++ b/picasso-sample/src/main/java/com/squareup/picasso/sample/SampleActivity.java @@ -27,18 +27,15 @@ CON DEL @Override public boolean onOptionsItemSelected(MenuItem item) { DEL if (item.getItemId() == 0) { DEL item.setChec...
<<<<<<< SEARCH } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == 0) { item.setChecked(!item.isChecked()); Picasso.with(this).setDebugging(item.isChecked()); adapter.notifyDataSetChanged(); return true; } return super.onOptionsItemSelected...
jeorme/OG-Platform
fb5c62d52bd62c29a826c5a80682f01df414f649
projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java
java
apache-2.0
Handle no currency properly, as well as multiple currency
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.financial.aggregation; import java.util.Collection; import java.util.Collections; import com.opengamma.core.position.Position; import com.opengamma.financial....
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.financial.aggregation; import java.util.Collection; import java.util.Collections; import com.opengamma.core.position.Position; import com.opengamma.financial....
8
2
3
mixed
--- a/projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java +++ b/projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java @@ -12,2 +12,3 @@ import com.opengamma.financial.security.FinancialSecurityUtils; +import com.opengamma.util.money.Cu...
--- a/projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java +++ b/projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java @@ ... @@ import com.opengamma.financial.security.FinancialSecurityUtils; +import com.opengamma.util.money.Currency; ...
--- a/projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java +++ b/projects/OG-Financial/src/com/opengamma/financial/aggregation/CurrencyAggregationFunction.java @@ -12,2 +12,3 @@ CON import com.opengamma.financial.security.FinancialSecurityUtils; ADD import com.opengamma.util.mo...
<<<<<<< SEARCH import com.opengamma.core.position.Position; import com.opengamma.financial.security.FinancialSecurityUtils; /** * Function to classify positions by Currency. ======= import com.opengamma.core.position.Position; import com.opengamma.financial.security.FinancialSecurityUtils; import com.opengamma.util.m...
pamods/planetary-annihilation-ui-mods
91ed82ae5a49c06f92ad40658c0c5a407ae43884
ui_mod_list.js
javascript
mit
Add reminder timer to the default mod list.
var rModsList = []; /* start ui_mod_list */ var global_mod_list = [ ]; var scene_mod_list = {'connect_to_game': [ ],'game_over': [ ], 'icon_atlas': [ ], 'live_game': [ //In game timer '../../mods/dTimer/dTimer.css', '../../mods/dTimer/dTimer.js', //Mex/Energy Count '../../mods/dMexCount/dMexCount.css', '.....
var rModsList = []; /* start ui_mod_list */ var global_mod_list = [ ]; var scene_mod_list = {'connect_to_game': [ ],'game_over': [ ], 'icon_atlas': [ ], 'live_game': [ //In game timer '../../mods/dTimer/dTimer.css', '../../mods/dTimer/dTimer.js', //Mex/Energy Count '../../mods/dMexCount/dMexCount.css', '.....
3
0
1
add_only
--- a/ui_mod_list.js +++ b/ui_mod_list.js @@ -28,2 +28,5 @@ + //Reminders + '../../mods/dReminderTimer/dReminderTimer.css', + '../../mods/dReminderTimer/dReminderTimer.js', ],
--- a/ui_mod_list.js +++ b/ui_mod_list.js @@ ... @@ + //Reminders + '../../mods/dReminderTimer/dReminderTimer.css', + '../../mods/dReminderTimer/dReminderTimer.js', ],
--- a/ui_mod_list.js +++ b/ui_mod_list.js @@ -28,2 +28,5 @@ CON ADD //Reminders ADD '../../mods/dReminderTimer/dReminderTimer.css', ADD '../../mods/dReminderTimer/dReminderTimer.js', CON ],
<<<<<<< SEARCH '../../mods/dBetterSystemView/dBetterSystemView.js', ], 'load_planet': [ ======= '../../mods/dBetterSystemView/dBetterSystemView.js', //Reminders '../../mods/dReminderTimer/dReminderTimer.css', '../../mods/dReminderTimer/dReminderTimer.js', ], 'load_planet': [ >>>>>>> REPLACE
dtolnay/cxx
fa66e2afa6f43034a564ded0f4ee8a6555f7160d
cmd/src/main.rs
rust
apache-2.0
Customize usage message of cmd
mod gen; mod syntax; use gen::include; use std::io::{self, Write}; use std::path::PathBuf; use structopt::StructOpt; #[derive(StructOpt, Debug)] #[structopt(name = "cxxbridge", author)] struct Opt { /// Input Rust source file containing #[cxx::bridge] #[structopt(parse(from_os_str), required_unless = "header"...
mod gen; mod syntax; use gen::include; use std::io::{self, Write}; use std::path::PathBuf; use structopt::StructOpt; #[derive(StructOpt, Debug)] #[structopt( name = "cxxbridge", author, about = "https://github.com/dtolnay/cxx", usage = "\ cxxbridge <input>.rs Emit .cc file for bridge ...
11
1
1
mixed
--- a/cmd/src/main.rs +++ b/cmd/src/main.rs @@ -9,3 +9,13 @@ #[derive(StructOpt, Debug)] -#[structopt(name = "cxxbridge", author)] +#[structopt( + name = "cxxbridge", + author, + about = "https://github.com/dtolnay/cxx", + usage = "\ + cxxbridge <input>.rs Emit .cc file for bridge to stdout...
--- a/cmd/src/main.rs +++ b/cmd/src/main.rs @@ ... @@ #[derive(StructOpt, Debug)] -#[structopt(name = "cxxbridge", author)] +#[structopt( + name = "cxxbridge", + author, + about = "https://github.com/dtolnay/cxx", + usage = "\ + cxxbridge <input>.rs Emit .cc file for bridge to stdout + c...
--- a/cmd/src/main.rs +++ b/cmd/src/main.rs @@ -9,3 +9,13 @@ CON #[derive(StructOpt, Debug)] DEL #[structopt(name = "cxxbridge", author)] ADD #[structopt( ADD name = "cxxbridge", ADD author, ADD about = "https://github.com/dtolnay/cxx", ADD usage = "\ ADD cxxbridge <input>.rs Emit .cc f...
<<<<<<< SEARCH #[derive(StructOpt, Debug)] #[structopt(name = "cxxbridge", author)] struct Opt { /// Input Rust source file containing #[cxx::bridge] ======= #[derive(StructOpt, Debug)] #[structopt( name = "cxxbridge", author, about = "https://github.com/dtolnay/cxx", usage = "\ cxxbridge <in...
attm2x/m2x-tessel
b68e2d2aea2341ef5ef7138e53dea65a9489abe8
examples/update-single.js
javascript
mit
Fix method name typo in examples
#!/usr/bin/env node // // See https://github.com/attm2x/m2x-nodejs/blob/master/README.md#example-usage // for instructions // var config = require("./config"); var M2X = require("m2x-tessel"); var m2xClient = new M2X(config.api_key); var stream = "temperature"; var stream_params = { "unit": { "label": "ce...
#!/usr/bin/env node // // See https://github.com/attm2x/m2x-nodejs/blob/master/README.md#example-usage // for instructions // var config = require("./config"); var M2X = require("m2x-tessel"); var m2xClient = new M2X(config.api_key); var stream = "temperature"; var stream_params = { "unit": { "label": "ce...
1
1
1
mixed
--- a/examples/update-single.js +++ b/examples/update-single.js @@ -31,3 +31,3 @@ // Update the latest stream value to our new value - m2xClient.devices.updateStreamValue(config.device, stream, {"value": new_value}, function(result) { + m2xClient.devices.setStreamValue(config.device, stream, {"va...
--- a/examples/update-single.js +++ b/examples/update-single.js @@ ... @@ // Update the latest stream value to our new value - m2xClient.devices.updateStreamValue(config.device, stream, {"value": new_value}, function(result) { + m2xClient.devices.setStreamValue(config.device, stream, {"value": ne...
--- a/examples/update-single.js +++ b/examples/update-single.js @@ -31,3 +31,3 @@ CON // Update the latest stream value to our new value DEL m2xClient.devices.updateStreamValue(config.device, stream, {"value": new_value}, function(result) { ADD m2xClient.devices.setStreamValue(config.device, str...
<<<<<<< SEARCH // Update the latest stream value to our new value m2xClient.devices.updateStreamValue(config.device, stream, {"value": new_value}, function(result) { if (result.isError()) { console.log(result.error()); ======= // Update the latest stream value to o...
open2c/cooltools
ad6bb5b787b4b959ff24c71122fc6f4d1a7e7ff9
cooltools/cli/__init__.py
python
mit
Add top-level cli debugging and verbosity options
# -*- coding: utf-8 -*- from __future__ import division, print_function import click from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_settings=CO...
# -*- coding: utf-8 -*- from __future__ import division, print_function import click import sys from .. import __version__ # Monkey patch click.core._verify_python3_env = lambda: None CONTEXT_SETTINGS = { 'help_option_names': ['-h', '--help'], } @click.version_option(version=__version__) @click.group(context_...
30
2
2
mixed
--- a/cooltools/cli/__init__.py +++ b/cooltools/cli/__init__.py @@ -3,2 +3,3 @@ import click +import sys from .. import __version__ @@ -17,4 +18,31 @@ @click.group(context_settings=CONTEXT_SETTINGS) -def cli(): - pass +@click.option( + '--debug/--no-debug', + help="Verbose logging", + default=False) +@...
--- a/cooltools/cli/__init__.py +++ b/cooltools/cli/__init__.py @@ ... @@ import click +import sys from .. import __version__ @@ ... @@ @click.group(context_settings=CONTEXT_SETTINGS) -def cli(): - pass +@click.option( + '--debug/--no-debug', + help="Verbose logging", + default=False) +@click.option( +...
--- a/cooltools/cli/__init__.py +++ b/cooltools/cli/__init__.py @@ -3,2 +3,3 @@ CON import click ADD import sys CON from .. import __version__ @@ -17,4 +18,31 @@ CON @click.group(context_settings=CONTEXT_SETTINGS) DEL def cli(): DEL pass ADD @click.option( ADD '--debug/--no-debug', ADD help="Verbose loggin...
<<<<<<< SEARCH from __future__ import division, print_function import click from .. import __version__ ======= from __future__ import division, print_function import click import sys from .. import __version__ >>>>>>> REPLACE <<<<<<< SEARCH @click.version_option(version=__version__) @click.group(context_settings=C...
imp/requests-rs
4fd200e94abd33a57ac820d29b84df86b6757803
src/lib.rs
rust
mit
Add very basic crate doc
extern crate hyper; extern crate json; mod request; mod response; pub use request::Request; pub use response::Response; pub use response::Codes; pub type Result = hyper::Result<Response>; pub type Error = hyper::error::Error; pub fn get(url: &str) -> Result { Request::default().get(url) } pub fn post(url: &str...
//! requests - HTTP client library with simple API.\ //! If you have used Python requests module you will find the API familiar. //! //! # Quick Start //! //! ```rust //! extern crate hyper; //! extern crate requests; //! let response = requests::get("http://httpbin.org/get").unwrap(); //! assert_eq!(response.url(), "h...
19
0
1
add_only
--- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,20 @@ +//! requests - HTTP client library with simple API.\ +//! If you have used Python requests module you will find the API familiar. +//! +//! # Quick Start +//! +//! ```rust +//! extern crate hyper; +//! extern crate requests; +//! let response = requests::get("http://htt...
--- a/src/lib.rs +++ b/src/lib.rs @@ ... @@ +//! requests - HTTP client library with simple API.\ +//! If you have used Python requests module you will find the API familiar. +//! +//! # Quick Start +//! +//! ```rust +//! extern crate hyper; +//! extern crate requests; +//! let response = requests::get("http://httpbin....
--- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,20 @@ ADD //! requests - HTTP client library with simple API.\ ADD //! If you have used Python requests module you will find the API familiar. ADD //! ADD //! # Quick Start ADD //! ADD //! ```rust ADD //! extern crate hyper; ADD //! extern crate requests; ADD //! let response ...
<<<<<<< SEARCH extern crate hyper; extern crate json; ======= //! requests - HTTP client library with simple API.\ //! If you have used Python requests module you will find the API familiar. //! //! # Quick Start //! //! ```rust //! extern crate hyper; //! extern crate requests; //! let response = requests::get("http:...
caromimo/textreader
7b9080ddb8569376454055668b1923dc044fb9b4
src/app.js
javascript
mit
Refactor to use spawn and more events.
var tmp = require('tmp'); var express = require('express'); var app = express(); app.use(express.bodyParser()); app.get('/vocalization/fr/homme', function (request, response) { response.header('Content-Type', 'audio/mpeg'); response.header('Content-Disposition', 'inline; filename=test.mp3'); var exec = require('...
var tmp = require('tmp'); var express = require('express'); var app = express(); app.use(express.bodyParser()); app.get('/vocalization/fr/homme', function (request, response) { response.header('Content-Type', 'audio/mpeg'); response.header('Content-Disposition', 'inline; filename=test.mp3'); var spawn = require(...
26
10
1
mixed
--- a/src/app.js +++ b/src/app.js @@ -8,16 +8,32 @@ response.header('Content-Disposition', 'inline; filename=test.mp3'); - var exec = require('child_process').exec; - var text = request.query.texte; + var spawn = require('child_process').spawn; + tmp.tmpName(function _tempNameGenerated(err, espeakTmpfile) { + ...
--- a/src/app.js +++ b/src/app.js @@ ... @@ response.header('Content-Disposition', 'inline; filename=test.mp3'); - var exec = require('child_process').exec; - var text = request.query.texte; + var spawn = require('child_process').spawn; + tmp.tmpName(function _tempNameGenerated(err, espeakTmpfile) { + if (e...
--- a/src/app.js +++ b/src/app.js @@ -8,16 +8,32 @@ CON response.header('Content-Disposition', 'inline; filename=test.mp3'); DEL var exec = require('child_process').exec; DEL var text = request.query.texte; ADD var spawn = require('child_process').spawn; CON ADD tmp.tmpName(function _tempNameGenerated(err, e...
<<<<<<< SEARCH response.header('Content-Type', 'audio/mpeg'); response.header('Content-Disposition', 'inline; filename=test.mp3'); var exec = require('child_process').exec; var text = request.query.texte; tmp.tmpName(function _tempNameGenerated(err, tempfile) { if (err) throw err; // Below espeak ta...
kamatama41/embulk-test-helpers
63df83e0ca712b939651fe1c686e6874fef383ba
build.gradle.kts
kotlin
mit
Add a limitation of memory usage for test task.
import com.github.kamatama41.gradle.gitrelease.GitReleaseExtension buildscript { repositories { jcenter() maven { setUrl("http://kamatama41.github.com/maven-repository/repository") } } dependencies { classpath("com.github.kamatama41:gradle-git-release-plugin:0.2.0") } } plugins...
import com.github.kamatama41.gradle.gitrelease.GitReleaseExtension buildscript { repositories { jcenter() maven { setUrl("http://kamatama41.github.com/maven-repository/repository") } } dependencies { classpath("com.github.kamatama41:gradle-git-release-plugin:0.2.0") } } plugins...
7
0
1
add_only
--- a/build.gradle.kts +++ b/build.gradle.kts @@ -43 +43,8 @@ } + +tasks { + named<Test>("test") { + // Not to exceed the limit of CircleCI (4GB) + maxHeapSize = "3g" + } +}
--- a/build.gradle.kts +++ b/build.gradle.kts @@ ... @@ } + +tasks { + named<Test>("test") { + // Not to exceed the limit of CircleCI (4GB) + maxHeapSize = "3g" + } +}
--- a/build.gradle.kts +++ b/build.gradle.kts @@ -43 +43,8 @@ CON } ADD ADD tasks { ADD named<Test>("test") { ADD // Not to exceed the limit of CircleCI (4GB) ADD maxHeapSize = "3g" ADD } ADD }
<<<<<<< SEARCH repoDir = file("${System.getProperty("user.home")}/gh-maven-repository") } ======= repoDir = file("${System.getProperty("user.home")}/gh-maven-repository") } tasks { named<Test>("test") { // Not to exceed the limit of CircleCI (4GB) maxHeapSize = "3g" } } >>>>>>> REPLAC...
ognjen-petrovic/js-dxf
cecfcff0977bb7d1ee7748e73ddfe2345c8f5736
src/Layer.js
javascript
mit
Add possibility to set true color for layer
class Layer { constructor(name, colorNumber, lineTypeName) { this.name = name; this.colorNumber = colorNumber; this.lineTypeName = lineTypeName; this.shapes = []; } toDxfString() { let s = '0\nLAYER\n'; s += '70\n64\n'; s += `2\n${this.name}\n...
class Layer { constructor(name, colorNumber, lineTypeName) { this.name = name; this.colorNumber = colorNumber; this.lineTypeName = lineTypeName; this.shapes = []; this.trueColor = -1; } toDxfString() { let s = '0\nLAYER\n'; s += '70\n64\n'; ...
14
1
2
mixed
--- a/src/Layer.js +++ b/src/Layer.js @@ -8,2 +8,3 @@ this.shapes = []; + this.trueColor = -1; } @@ -15,5 +16,17 @@ s += `2\n${this.name}\n`; - s += `62\n${this.colorNumber}\n`; + if (this.trueColor !== -1) + { + s += `420\n${this.trueColor}\n` + } + ...
--- a/src/Layer.js +++ b/src/Layer.js @@ ... @@ this.shapes = []; + this.trueColor = -1; } @@ ... @@ s += `2\n${this.name}\n`; - s += `62\n${this.colorNumber}\n`; + if (this.trueColor !== -1) + { + s += `420\n${this.trueColor}\n` + } + else + ...
--- a/src/Layer.js +++ b/src/Layer.js @@ -8,2 +8,3 @@ CON this.shapes = []; ADD this.trueColor = -1; CON } @@ -15,5 +16,17 @@ CON s += `2\n${this.name}\n`; DEL s += `62\n${this.colorNumber}\n`; ADD if (this.trueColor !== -1) ADD { ADD s += `420\n${this.tru...
<<<<<<< SEARCH this.lineTypeName = lineTypeName; this.shapes = []; } ======= this.lineTypeName = lineTypeName; this.shapes = []; this.trueColor = -1; } >>>>>>> REPLACE <<<<<<< SEARCH s += '70\n64\n'; s += `2\n${this.name}\n`; s += `62\n${this....
pix3ly/budget
2ad24b2dc3f38acdef8fa8023fdfcac9749094fc
resources/assets/js/app.js
javascript
mit
Update CommonJS importing to ES6
window.axios = require('axios') window.Vue = require('vue') Vue.component('chrome-picker', require('vue-color').Chrome) Vue.component('button-dropdown', require('./components/ButtonDropdown.vue')) Vue.component('datepicker', require('./components/DatePicker.vue')) // TODO DEPRECATE Vue.component('date-picker', requi...
import axios from 'axios'; import Vue from 'vue'; import { Chrome } from 'vue-color'; import ButtonDropdown from './components/ButtonDropdown.vue'; import DatePicker from './components/DatePicker.vue'; import BarChart from './components/BarChart.vue'; import Dropdown from './components/Dropdown.vue'; import Transacti...
25
12
1
mixed
--- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -1,16 +1,29 @@ -window.axios = require('axios') +import axios from 'axios'; +import Vue from 'vue'; -window.Vue = require('vue') +import { Chrome } from 'vue-color'; -Vue.component('chrome-picker', require('vue-color').Chrome) +import ButtonDropdo...
--- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ ... @@ -window.axios = require('axios') +import axios from 'axios'; +import Vue from 'vue'; -window.Vue = require('vue') +import { Chrome } from 'vue-color'; -Vue.component('chrome-picker', require('vue-color').Chrome) +import ButtonDropdown from ...
--- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -1,16 +1,29 @@ DEL window.axios = require('axios') ADD import axios from 'axios'; ADD import Vue from 'vue'; CON DEL window.Vue = require('vue') ADD import { Chrome } from 'vue-color'; CON DEL Vue.component('chrome-picker', require('vue-color').Chro...
<<<<<<< SEARCH window.axios = require('axios') window.Vue = require('vue') Vue.component('chrome-picker', require('vue-color').Chrome) Vue.component('button-dropdown', require('./components/ButtonDropdown.vue')) Vue.component('datepicker', require('./components/DatePicker.vue')) // TODO DEPRECATE Vue.component('date...
robinverduijn/gradle
07c71ee0574810bef961cf1174f4bfeb493e659a
subprojects/core-api/core-api.gradle.kts
kotlin
apache-2.0
Use Java 8 in Core API
import org.gradle.gradlebuild.testing.integrationtests.cleanup.WhenNotEmpty import org.gradle.gradlebuild.unittestandcompile.ModuleType /* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the L...
import org.gradle.gradlebuild.testing.integrationtests.cleanup.WhenNotEmpty import org.gradle.gradlebuild.unittestandcompile.ModuleType /* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the L...
1
1
1
mixed
--- a/subprojects/core-api/core-api.gradle.kts +++ b/subprojects/core-api/core-api.gradle.kts @@ -40,3 +40,3 @@ gradlebuildJava { - moduleType = ModuleType.WORKER + moduleType = ModuleType.CORE }
--- a/subprojects/core-api/core-api.gradle.kts +++ b/subprojects/core-api/core-api.gradle.kts @@ ... @@ gradlebuildJava { - moduleType = ModuleType.WORKER + moduleType = ModuleType.CORE }
--- a/subprojects/core-api/core-api.gradle.kts +++ b/subprojects/core-api/core-api.gradle.kts @@ -40,3 +40,3 @@ CON gradlebuildJava { DEL moduleType = ModuleType.WORKER ADD moduleType = ModuleType.CORE CON }
<<<<<<< SEARCH gradlebuildJava { moduleType = ModuleType.WORKER } ======= gradlebuildJava { moduleType = ModuleType.CORE } >>>>>>> REPLACE
PanDAWMS/panda-bigmon-atlas
ba32a22cc0cb41c4548c658a7195fab56dab6dbf
atlas/prodtask/tasks.py
python
apache-2.0
Add remove done staged rules
from __future__ import absolute_import, unicode_literals from atlas.celerybackend.celery import app from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed from atlas.prodtask.hashtag import hashtag_request_to_tasks from atlas.prodtask.mcevgen import sync_cvmfs_db from atlas.prodtask.open_e...
from __future__ import absolute_import, unicode_literals from atlas.celerybackend.celery import app from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed, delete_done_staging_rules from atlas.prodtask.hashtag import hashtag_request_to_tasks from atlas.prodtask.mcevgen import sync_cvmfs_db...
6
1
2
mixed
--- a/atlas/prodtask/tasks.py +++ b/atlas/prodtask/tasks.py @@ -3,3 +3,3 @@ from atlas.celerybackend.celery import app -from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed +from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed, delete_done_staging_rules fr...
--- a/atlas/prodtask/tasks.py +++ b/atlas/prodtask/tasks.py @@ ... @@ from atlas.celerybackend.celery import app -from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed +from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed, delete_done_staging_rules from atl...
--- a/atlas/prodtask/tasks.py +++ b/atlas/prodtask/tasks.py @@ -3,3 +3,3 @@ CON from atlas.celerybackend.celery import app DEL from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed ADD from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed, delete_done_staging_...
<<<<<<< SEARCH from atlas.celerybackend.celery import app from atlas.prestage.views import find_action_to_execute, submit_all_tapes_processed from atlas.prodtask.hashtag import hashtag_request_to_tasks from atlas.prodtask.mcevgen import sync_cvmfs_db ======= from atlas.celerybackend.celery import app from atlas.pres...
teamleadercrm/teamleader-ui
b78fed8d257a5fd2c841c37eb835ace986174c96
src/components/wysiwygEditor/decorators/linkDecorator.js
javascript
mit
:bug: Fix certain links not opening correctly
import React, { useState } from 'react'; import { IconExternalLinkSmallOutline } from '@teamleader/ui-icons'; import Box from '../../box'; import Link from '../../link'; import theme from './theme.css'; const findLinkEntities = (contentBlock, callback, contentState) => { contentBlock.findEntityRanges((character) =...
import React, { useState } from 'react'; import { IconExternalLinkSmallOutline } from '@teamleader/ui-icons'; import Box from '../../box'; import Link from '../../link'; import theme from './theme.css'; const findLinkEntities = (contentBlock, callback, contentState) => { contentBlock.findEntityRanges((character) =...
5
1
1
mixed
--- a/src/components/wysiwygEditor/decorators/linkDecorator.js +++ b/src/components/wysiwygEditor/decorators/linkDecorator.js @@ -20,3 +20,7 @@ const openLink = () => { - window.open(url, 'blank'); + let prefixedUrl = url; + if (!url.includes('//')) { + prefixedUrl = '//' + url; + } + window.open...
--- a/src/components/wysiwygEditor/decorators/linkDecorator.js +++ b/src/components/wysiwygEditor/decorators/linkDecorator.js @@ ... @@ const openLink = () => { - window.open(url, 'blank'); + let prefixedUrl = url; + if (!url.includes('//')) { + prefixedUrl = '//' + url; + } + window.open(prefixe...
--- a/src/components/wysiwygEditor/decorators/linkDecorator.js +++ b/src/components/wysiwygEditor/decorators/linkDecorator.js @@ -20,3 +20,7 @@ CON const openLink = () => { DEL window.open(url, 'blank'); ADD let prefixedUrl = url; ADD if (!url.includes('//')) { ADD prefixedUrl = '//' + url; ADD ...
<<<<<<< SEARCH const openLink = () => { window.open(url, 'blank'); }; ======= const openLink = () => { let prefixedUrl = url; if (!url.includes('//')) { prefixedUrl = '//' + url; } window.open(prefixedUrl, '_blank'); }; >>>>>>> REPLACE
jbranchaud/simple-sudoku-check
1c1b9577b538bfb7bc3cc7e2e392aa7a8f43ce86
Gruntfile.js
javascript
mit
Add a task to the Grunt file for just running the tests.
'use strict'; module.exports = function (grunt) { // Show elapsed time at the end require('time-grunt')(grunt); // Load all grunt tasks require('load-grunt-tasks')(grunt); // Project configuration. grunt.initConfig({ nodeunit: { files: ['test/**/*_test.js'] }, jshint: { options: { ...
'use strict'; module.exports = function (grunt) { // Show elapsed time at the end require('time-grunt')(grunt); // Load all grunt tasks require('load-grunt-tasks')(grunt); // Project configuration. grunt.initConfig({ nodeunit: { files: ['test/**/*_test.js'] }, jshint: { options: { ...
3
0
1
add_only
--- a/Gruntfile.js +++ b/Gruntfile.js @@ -47,2 +47,5 @@ + // Nodeunit Test task. + grunt.registerTask('test', ['nodeunit']); + };
--- a/Gruntfile.js +++ b/Gruntfile.js @@ ... @@ + // Nodeunit Test task. + grunt.registerTask('test', ['nodeunit']); + };
--- a/Gruntfile.js +++ b/Gruntfile.js @@ -47,2 +47,5 @@ CON ADD // Nodeunit Test task. ADD grunt.registerTask('test', ['nodeunit']); ADD CON };
<<<<<<< SEARCH grunt.registerTask('default', ['jshint', 'nodeunit']); }; ======= grunt.registerTask('default', ['jshint', 'nodeunit']); // Nodeunit Test task. grunt.registerTask('test', ['nodeunit']); }; >>>>>>> REPLACE
pyamsoft/pydroid
3e3d4d5f59244e15ee6ee1df8a158a3fffa407d5
core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt
kotlin
apache-2.0
Check for off and on main thread
/* * Copyright 2019 Peter Kenji Yamanaka * * 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 a...
/* * Copyright 2019 Peter Kenji Yamanaka * * 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 a...
17
1
1
mixed
--- a/core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt +++ b/core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt @@ -31,5 +31,21 @@ + @Deprecated( + "Use assertOffMainThread()", replaceWith = ReplaceWith( + "Enforcer.assertOffMainThread()", + imports = ["com.pyamsoft.pydro...
--- a/core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt +++ b/core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt @@ ... @@ + @Deprecated( + "Use assertOffMainThread()", replaceWith = ReplaceWith( + "Enforcer.assertOffMainThread()", + imports = ["com.pyamsoft.pydroid.core.E...
--- a/core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt +++ b/core/src/main/java/com/pyamsoft/pydroid/core/Enforcer.kt @@ -31,5 +31,21 @@ CON ADD @Deprecated( ADD "Use assertOffMainThread()", replaceWith = ReplaceWith( ADD "Enforcer.assertOffMainThread()", ADD imports = ["com...
<<<<<<< SEARCH } fun assertNotOnMainThread() { if (isMainThread()) { throw AssertionError("This operation must be off the Main/UI thread!") } } ======= } @Deprecated( "Use assertOffMainThread()", replaceWith = ReplaceWith( "Enforcer.assertOffMainThr...
salopensource/sal
f9c51c592483ab08417d4df33898d32f7700ffe9
sal/management/commands/update_admin_user.py
python
apache-2.0
Fix exception handling in management command. Clean up.
''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, pars...
"""Creates an admin user if there aren't any existing superusers.""" from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Creates/Updates an Admin user' def add_arguments(self, par...
8
8
3
mixed
--- a/sal/management/commands/update_admin_user.py +++ b/sal/management/commands/update_admin_user.py @@ -1,8 +1,8 @@ -''' -Creates an admin user if there aren't any existing superusers -''' +"""Creates an admin user if there aren't any existing superusers.""" + +from optparse import make_option + +from django.contri...
--- a/sal/management/commands/update_admin_user.py +++ b/sal/management/commands/update_admin_user.py @@ ... @@ -''' -Creates an admin user if there aren't any existing superusers -''' +"""Creates an admin user if there aren't any existing superusers.""" + +from optparse import make_option + +from django.contrib.auth...
--- a/sal/management/commands/update_admin_user.py +++ b/sal/management/commands/update_admin_user.py @@ -1,8 +1,8 @@ DEL ''' DEL Creates an admin user if there aren't any existing superusers DEL ''' ADD """Creates an admin user if there aren't any existing superusers.""" CON ADD ADD from optparse import make_option ...
<<<<<<< SEARCH ''' Creates an admin user if there aren't any existing superusers ''' from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from optparse import make_option ======= """Creates an admin user if there aren't any existing superusers.""" from optp...
bmuschko/gradle-docker-plugin
b5fd8908a7b56592952d60386db8a4650d5c40fa
buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt
kotlin
apache-2.0
Use the same version of AsciidoctorJ to avoid classpath issues
package com.bmuschko.gradle.docker import org.asciidoctor.gradle.AsciidoctorPlugin import org.asciidoctor.gradle.AsciidoctorTask import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.util.PatternSet import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.delegateClosureOf impor...
package com.bmuschko.gradle.docker import org.asciidoctor.gradle.AsciidoctorExtension import org.asciidoctor.gradle.AsciidoctorPlugin import org.asciidoctor.gradle.AsciidoctorTask import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.util.PatternSet import org.gradle.kotlin.dsl.apply i...
10
0
4
add_only
--- a/buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt +++ b/buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt @@ -2,2 +2,3 @@ +import org.asciidoctor.gradle.AsciidoctorExtension import org.asciidoctor.gradle.AsciidoctorPlugin @@ -8,2 +9,3 @@ import org.gradle.kotlin.dsl.a...
--- a/buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt +++ b/buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt @@ ... @@ +import org.asciidoctor.gradle.AsciidoctorExtension import org.asciidoctor.gradle.AsciidoctorPlugin @@ ... @@ import org.gradle.kotlin.dsl.apply +import...
--- a/buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt +++ b/buildSrc/src/main/kotlin/com/bmuschko/gradle/docker/UserGuidePlugin.kt @@ -2,2 +2,3 @@ CON ADD import org.asciidoctor.gradle.AsciidoctorExtension CON import org.asciidoctor.gradle.AsciidoctorPlugin @@ -8,2 +9,3 @@ CON import org.gradle....
<<<<<<< SEARCH package com.bmuschko.gradle.docker import org.asciidoctor.gradle.AsciidoctorPlugin import org.asciidoctor.gradle.AsciidoctorTask ======= package com.bmuschko.gradle.docker import org.asciidoctor.gradle.AsciidoctorExtension import org.asciidoctor.gradle.AsciidoctorPlugin import org.asciidoctor.gradle.A...
davidsusu/tree-printer
8b911a2da6ebca1129e63ec8d1a4ca1e20a42579
src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java
java
apache-2.0
Rename a variable in TrackingTreeNodeDecocator
package hu.webarticum.treeprinter.decorator; import hu.webarticum.treeprinter.TreeNode; public class TrackingTreeNodeDecorator extends AbstractTreeNodeDecorator { public final TrackingTreeNodeDecorator parent; public final int index; public TrackingTreeNodeDecorator(TreeNode baseNode) { ...
package hu.webarticum.treeprinter.decorator; import hu.webarticum.treeprinter.TreeNode; public class TrackingTreeNodeDecorator extends AbstractTreeNodeDecorator { public final TrackingTreeNodeDecorator parent; public final int index; public TrackingTreeNodeDecorator(TreeNode baseNode) { ...
4
4
2
mixed
--- a/src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java +++ b/src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java @@ -49,6 +49,6 @@ - TrackingTreeNodeDecorator otherReferenceTreeNode = (TrackingTreeNodeDecorator) other; - TrackingTreeNodeDecora...
--- a/src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java +++ b/src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java @@ ... @@ - TrackingTreeNodeDecorator otherReferenceTreeNode = (TrackingTreeNodeDecorator) other; - TrackingTreeNodeDecorator othe...
--- a/src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java +++ b/src/main/java/hu/webarticum/treeprinter/decorator/TrackingTreeNodeDecorator.java @@ -49,6 +49,6 @@ CON DEL TrackingTreeNodeDecorator otherReferenceTreeNode = (TrackingTreeNodeDecorator) other; DEL TrackingTreeN...
<<<<<<< SEARCH } TrackingTreeNodeDecorator otherReferenceTreeNode = (TrackingTreeNodeDecorator) other; TrackingTreeNodeDecorator otherParent = otherReferenceTreeNode.parent; if (this == otherReferenceTreeNode) { return true; } else if (parent == null) { ===...
superjohan/pfm
ed523bb7a59c9bc681a7608dcc560f2e0e77b3a3
app/src/main/java/com/aerodeko/pfm/MainActivity.kt
kotlin
mit
Test commit for Slack integrations.
package com.aerodeko.pfm import android.os.Bundle import android.support.design.widget.FloatingActionButton import android.support.design.widget.Snackbar import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.view.View import android.view.Menu import android.view.MenuIt...
package com.aerodeko.pfm import android.os.Bundle import android.support.design.widget.FloatingActionButton import android.support.design.widget.Snackbar import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.util.Log import android.view.View import android.view.Menu im...
4
0
2
add_only
--- a/app/src/main/java/com/aerodeko/pfm/MainActivity.kt +++ b/app/src/main/java/com/aerodeko/pfm/MainActivity.kt @@ -7,2 +7,3 @@ import android.support.v7.widget.Toolbar +import android.util.Log import android.view.View @@ -23,2 +24,5 @@ } + + // FIXME: remove this shit + Log.d("test", "test")...
--- a/app/src/main/java/com/aerodeko/pfm/MainActivity.kt +++ b/app/src/main/java/com/aerodeko/pfm/MainActivity.kt @@ ... @@ import android.support.v7.widget.Toolbar +import android.util.Log import android.view.View @@ ... @@ } + + // FIXME: remove this shit + Log.d("test", "test") }
--- a/app/src/main/java/com/aerodeko/pfm/MainActivity.kt +++ b/app/src/main/java/com/aerodeko/pfm/MainActivity.kt @@ -7,2 +7,3 @@ CON import android.support.v7.widget.Toolbar ADD import android.util.Log CON import android.view.View @@ -23,2 +24,5 @@ CON } ADD ADD // FIXME: remove this shit ADD ...
<<<<<<< SEARCH import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.view.View import android.view.Menu ======= import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.util.Log import android.view.View import android.view...
sirixdb/sirix
9107bad36365b4d1d87306654e340366d181c588
bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt
kotlin
bsd-3-clause
Add refactoring and performance tweak
package org.sirix.rest.crud import io.vertx.ext.web.Route import io.vertx.ext.web.RoutingContext import org.sirix.rest.crud.json.JsonCreate import org.sirix.rest.crud.xml.XmlCreate import java.nio.file.Path class CreateMultipleResources(private val location: Path) { suspend fun handle(ctx: RoutingContext...
package org.sirix.rest.crud import io.vertx.ext.web.Route import io.vertx.ext.web.RoutingContext import org.sirix.rest.crud.json.JsonCreate import org.sirix.rest.crud.xml.XmlCreate import java.nio.file.Path class CreateMultipleResources(private val location: Path) { suspend fun handle(ctx: RoutingContext...
20
14
3
mixed
--- a/bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt +++ b/bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt @@ -11,4 +11,4 @@ val fileUploads = ctx.fileUploads() - var xmlCount = 0 - var jsonCount = 0 + var isXmlFi...
--- a/bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt +++ b/bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt @@ ... @@ val fileUploads = ctx.fileUploads() - var xmlCount = 0 - var jsonCount = 0 + var isXmlFiles = fa...
--- a/bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt +++ b/bundles/sirix-rest-api/src/main/kotlin/org/sirix/rest/crud/CreateMultipleResources.kt @@ -11,4 +11,4 @@ CON val fileUploads = ctx.fileUploads() DEL var xmlCount = 0 DEL var jsonCount = 0 ADD ...
<<<<<<< SEARCH suspend fun handle(ctx: RoutingContext): Route { val fileUploads = ctx.fileUploads() var xmlCount = 0 var jsonCount = 0 fileUploads.forEach { fileUpload -> when (fileUpload.contentType()) { "application/xml" -> xmlCount++ ...
CS2103AUG2016-W14-C4/main
e3c44e4034a8626008b027e569b4d9db2eae5a37
src/main/java/seedu/taskitty/model/task/Name.java
java
mit
Improve task name by allowing wider input range
package seedu.taskitty.model.task; import seedu.taskitty.commons.exceptions.IllegalValueException; /** * Represents a Task's name in the task manager. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = "Tas...
package seedu.taskitty.model.task; import seedu.taskitty.commons.exceptions.IllegalValueException; /** * Represents a Task's name in the task manager. * Guarantees: immutable; is valid as declared in {@link #isValidName(String)} */ public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = ...
3
2
1
mixed
--- a/src/main/java/seedu/taskitty/model/task/Name.java +++ b/src/main/java/seedu/taskitty/model/task/Name.java @@ -10,4 +10,5 @@ - public static final String MESSAGE_NAME_CONSTRAINTS = "Task names should be spaces or alphanumeric characters"; - public static final String NAME_VALIDATION_REGEX_FORMAT = "[\\p{Al...
--- a/src/main/java/seedu/taskitty/model/task/Name.java +++ b/src/main/java/seedu/taskitty/model/task/Name.java @@ ... @@ - public static final String MESSAGE_NAME_CONSTRAINTS = "Task names should be spaces or alphanumeric characters"; - public static final String NAME_VALIDATION_REGEX_FORMAT = "[\\p{Alnum} ]+"...
--- a/src/main/java/seedu/taskitty/model/task/Name.java +++ b/src/main/java/seedu/taskitty/model/task/Name.java @@ -10,4 +10,5 @@ CON DEL public static final String MESSAGE_NAME_CONSTRAINTS = "Task names should be spaces or alphanumeric characters"; DEL public static final String NAME_VALIDATION_REGEX_FORMAT =...
<<<<<<< SEARCH public class Name { public static final String MESSAGE_NAME_CONSTRAINTS = "Task names should be spaces or alphanumeric characters"; public static final String NAME_VALIDATION_REGEX_FORMAT = "[\\p{Alnum} ]+"; public final String fullName; ======= public class Name { public static final...
DesertBot/DesertBot
81b6a138c476084f9ddd6063f31d3efd0ba6e2cf
start.py
python
mit
Make the logging level configurable
# -*- coding: utf-8 -*- import argparse import logging import os import sys from twisted.internet import reactor from desertbot.config import Config, ConfigError from desertbot.factory import DesertBotFactory if __name__ == '__main__': parser = argparse.ArgumentParser(description='An IRC bot written in Python.'...
# -*- coding: utf-8 -*- import argparse import logging import os import sys from twisted.internet import reactor from desertbot.config import Config, ConfigError from desertbot.factory import DesertBotFactory if __name__ == '__main__': parser = argparse.ArgumentParser(description='An IRC bot written in Python.'...
8
1
2
mixed
--- a/start.py +++ b/start.py @@ -17,2 +17,5 @@ type=str, required=True) + parser.add_argument('-l', '--loglevel', + help='the logging level (default INFO)', + type=str, default='INFO') cmdArgs = parser.parse_args() @@ -24,3 +27,7 @@ ro...
--- a/start.py +++ b/start.py @@ ... @@ type=str, required=True) + parser.add_argument('-l', '--loglevel', + help='the logging level (default INFO)', + type=str, default='INFO') cmdArgs = parser.parse_args() @@ ... @@ rootLogger = loggi...
--- a/start.py +++ b/start.py @@ -17,2 +17,5 @@ CON type=str, required=True) ADD parser.add_argument('-l', '--loglevel', ADD help='the logging level (default INFO)', ADD type=str, default='INFO') CON cmdArgs = parser.parse_args() @@ -24,3 +...
<<<<<<< SEARCH help='the config file to read from', type=str, required=True) cmdArgs = parser.parse_args() ======= help='the config file to read from', type=str, required=True) parser.add_argument('-l', '--loglevel...
gdit-cnd/RAPID
6858e4a2e2047c906a3b8f69b7cd7b04a0cbf666
pivoteer/writer/censys.py
python
mit
Resolve issues with exporting empty dataset for certificate list
""" Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record) """ from pivoteer.writer.core import CsvWriter class CensysCsvWriter(CsvWriter): """ A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record) """ def __init__(se...
""" Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record) """ from pivoteer.writer.core import CsvWriter class CensysCsvWriter(CsvWriter): """ A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record) """ def __init__(se...
13
11
2
mixed
--- a/pivoteer/writer/censys.py +++ b/pivoteer/writer/censys.py @@ -20,2 +20,3 @@ + def create_title_rows(self, indicator, records): @@ -27,12 +28,13 @@ def create_rows(self, record): - info = record["info"] - records = info["records"] - for record in records: - parsed = reco...
--- a/pivoteer/writer/censys.py +++ b/pivoteer/writer/censys.py @@ ... @@ + def create_title_rows(self, indicator, records): @@ ... @@ def create_rows(self, record): - info = record["info"] - records = info["records"] - for record in records: - parsed = record["parsed"] - ...
--- a/pivoteer/writer/censys.py +++ b/pivoteer/writer/censys.py @@ -20,2 +20,3 @@ CON ADD CON def create_title_rows(self, indicator, records): @@ -27,12 +28,13 @@ CON def create_rows(self, record): DEL info = record["info"] DEL records = info["records"] DEL for record in records: DEL ...
<<<<<<< SEARCH super(CensysCsvWriter, self).__init__(writer) def create_title_rows(self, indicator, records): yield ["Certificate Search Results"] ======= super(CensysCsvWriter, self).__init__(writer) def create_title_rows(self, indicator, records): yield ["Certificate Search...
bjpop/biotool
2acdacf6808c8d59448c69ae729d45fe8d8863aa
rust/src/main.rs
rust
mit
Use num_seqs == 1 to decide if min and max need initialisation
extern crate bio; use std::io; use std::cmp; use bio::io::fasta; fn main() { let reader = fasta::Reader::new(io::stdin()); let mut num_seqs = 0; let mut total = 0; let mut max_len = 0; let mut min_len = 0; let mut this_len; let mut first_seq = true; println!("FILENAME\tTOTAL\tNUMSEQ\tMIN\tAVG\...
extern crate bio; use std::io; use std::cmp; use bio::io::fasta; fn main() { let reader = fasta::Reader::new(io::stdin()); let mut num_seqs = 0; let mut total = 0; let mut max_len = 0; let mut min_len = 0; let mut this_len; println!("FILENAME\tTOTAL\tNUMSEQ\tMIN\tAVG\tMAX"); for next in reade...
3
4
2
mixed
--- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -12,3 +12,2 @@ let mut this_len; - let mut first_seq = true; @@ -22,8 +21,8 @@ total += this_len; - max_len = cmp::max(max_len, this_len); - if first_seq { + if num_seqs == 1 { + max_len = this_len; ...
--- a/rust/src/main.rs +++ b/rust/src/main.rs @@ ... @@ let mut this_len; - let mut first_seq = true; @@ ... @@ total += this_len; - max_len = cmp::max(max_len, this_len); - if first_seq { + if num_seqs == 1 { + max_len = this_len; min...
--- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -12,3 +12,2 @@ CON let mut this_len; DEL let mut first_seq = true; CON @@ -22,8 +21,8 @@ CON total += this_len; DEL max_len = cmp::max(max_len, this_len); DEL if first_seq { ADD if num_seqs == 1 { ADD ...
<<<<<<< SEARCH let mut min_len = 0; let mut this_len; let mut first_seq = true; println!("FILENAME\tTOTAL\tNUMSEQ\tMIN\tAVG\tMAX"); ======= let mut min_len = 0; let mut this_len; println!("FILENAME\tTOTAL\tNUMSEQ\tMIN\tAVG\tMAX"); >>>>>>> REPLACE <<<<<<< SEARCH this_len = record.se...
EmilStenstrom/nephele
f45b3e73b6258c99aed2bff2e7350f1c797ff849
providers/provider.py
python
mit
Remove support for Python 2.
import copy import json import requests import html5lib from application import APPLICATION as APP # Be compatible with python 2 and 3 try: from urllib import urlencode except ImportError: from urllib.parse import urlencode class BaseProvider(object): # ==== HELPER METHODS ==== def parse_html(self, ur...
import copy import json from urllib.parse import urlencode import html5lib import requests from application import APPLICATION as APP class BaseProvider(object): # ==== HELPER METHODS ==== def parse_html(self, url, css_selector, timeout=60, cache=True): html = self._http_get(url, timeout=timeout, cac...
3
6
1
mixed
--- a/providers/provider.py +++ b/providers/provider.py @@ -2,11 +2,8 @@ import json +from urllib.parse import urlencode + +import html5lib import requests -import html5lib from application import APPLICATION as APP -# Be compatible with python 2 and 3 -try: - from urllib import urlencode -except ImportError: -...
--- a/providers/provider.py +++ b/providers/provider.py @@ ... @@ import json +from urllib.parse import urlencode + +import html5lib import requests -import html5lib from application import APPLICATION as APP -# Be compatible with python 2 and 3 -try: - from urllib import urlencode -except ImportError: - fro...
--- a/providers/provider.py +++ b/providers/provider.py @@ -2,11 +2,8 @@ CON import json ADD from urllib.parse import urlencode ADD ADD import html5lib CON import requests DEL import html5lib CON from application import APPLICATION as APP CON DEL # Be compatible with python 2 and 3 DEL try: DEL from urllib import...
<<<<<<< SEARCH import copy import json import requests import html5lib from application import APPLICATION as APP # Be compatible with python 2 and 3 try: from urllib import urlencode except ImportError: from urllib.parse import urlencode class BaseProvider(object): ======= import copy import json from urlli...
bombless/rust-docs-chinese
bac68e4af3592dfcd6867fb8a73d2999daff744f
src/test/run-pass/lib-list.rs
rust
apache-2.0
stdlib: Add regression tests for std::list
use std; import std::list; import std::list::car; import std::list::cdr; import std::list::from_vec; fn test_from_vec() { auto l = from_vec([0, 1, 2]); assert (car(l) == 0); assert (car(cdr(l)) == 1); assert (car(cdr(cdr(l))) == 2); } fn main() { test_from_vec(); }
use std; import std::list; import std::list::car; import std::list::cdr; import std::list::from_vec; import std::option; fn test_from_vec() { auto l = from_vec([0, 1, 2]); assert (car(l) == 0); assert (car(cdr(l)) == 1); assert (car(cdr(cdr(l))) == 2); } fn test_foldl() { auto l = from_vec([0, 1, 2, 3, 4]);...
41
0
2
add_only
--- a/src/test/run-pass/lib-list.rs +++ b/src/test/run-pass/lib-list.rs @@ -5,2 +5,3 @@ import std::list::from_vec; +import std::option; @@ -13,4 +14,44 @@ +fn test_foldl() { + auto l = from_vec([0, 1, 2, 3, 4]); + fn add (&int a, &uint b) -> uint { + ret (a as uint) + b; + } + auto res = list::foldl(l, 0u,...
--- a/src/test/run-pass/lib-list.rs +++ b/src/test/run-pass/lib-list.rs @@ ... @@ import std::list::from_vec; +import std::option; @@ ... @@ +fn test_foldl() { + auto l = from_vec([0, 1, 2, 3, 4]); + fn add (&int a, &uint b) -> uint { + ret (a as uint) + b; + } + auto res = list::foldl(l, 0u, add); + asser...
--- a/src/test/run-pass/lib-list.rs +++ b/src/test/run-pass/lib-list.rs @@ -5,2 +5,3 @@ CON import std::list::from_vec; ADD import std::option; CON @@ -13,4 +14,44 @@ CON ADD fn test_foldl() { ADD auto l = from_vec([0, 1, 2, 3, 4]); ADD fn add (&int a, &uint b) -> uint { ADD ret (a as uint) + b; ADD } ADD ...
<<<<<<< SEARCH import std::list::cdr; import std::list::from_vec; fn test_from_vec() { ======= import std::list::cdr; import std::list::from_vec; import std::option; fn test_from_vec() { >>>>>>> REPLACE <<<<<<< SEARCH } fn main() { test_from_vec(); } ======= } fn test_foldl() { auto l = from_vec([0, 1, 2, 3...
world-federation-of-advertisers/common-jvm
b0637ab61d37372b4691d5eeef258b5b1b8a4510
src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt
kotlin
apache-2.0
Initialize properties on construction in Spanner testing AutoCloseables. This more closely follows common AutoCloseable semantics. Change-Id: I0fb47cf30ac2c17340791f4cc4572b706a816fa9
// Copyright 2020 The Measurement System Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
// Copyright 2020 The Measurement System Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
7
14
2
mixed
--- a/src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt +++ b/src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt @@ -28,4 +28,5 @@ */ -open class CloseableResource<T : AutoCloseable>(lazyResource: () -> T) : TestRule { - protected val resource by lazy { lazyResource()...
--- a/src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt +++ b/src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt @@ ... @@ */ -open class CloseableResource<T : AutoCloseable>(lazyResource: () -> T) : TestRule { - protected val resource by lazy { lazyResource() } +open...
--- a/src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt +++ b/src/main/kotlin/org/wfanet/measurement/common/testing/CloseableResource.kt @@ -28,4 +28,5 @@ CON */ DEL open class CloseableResource<T : AutoCloseable>(lazyResource: () -> T) : TestRule { DEL protected val resource by lazy { lazyR...
<<<<<<< SEARCH * [before][org.junit.rules.ExternalResource.before] throws an exception. */ open class CloseableResource<T : AutoCloseable>(lazyResource: () -> T) : TestRule { protected val resource by lazy { lazyResource() } override fun apply(base: Statement, description: Description) = object : Statement() { ...
BitLimit/BlockRegression
486b3d3ab6d2cca20ec47736b5e6fa45bfe869e1
src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java
java
mit
Check before casting a null.
package com.kolinkrewinkel.BitLimitBlockRegression; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import java.util.ArrayList; import java.util.HashMap; import java.util.Random; /** * Created with IntelliJ IDEA. * User: kolin * Date: 7/14/13 * Time: 4:26 PM * To change this template use File | Settings ...
package com.kolinkrewinkel.BitLimitBlockRegression; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import java.util.ArrayList; import java.util.HashMap; import java.util.Random; /** * Created with IntelliJ IDEA. * User: kolin * Date: 7/14/13 * Time: 4:26 PM * To change this template use File | Settings ...
9
1
1
mixed
--- a/src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java +++ b/src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java @@ -37,3 +37,11 @@ public void run() { - ArrayList<HashMap> conditionsList = (ArrayList<HashMap>) plugin.getConfig().g...
--- a/src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java +++ b/src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java @@ ... @@ public void run() { - ArrayList<HashMap> conditionsList = (ArrayList<HashMap>) plugin.getConfig().get("condi...
--- a/src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java +++ b/src/main/java/com/kolinkrewinkel/BitLimitBlockRegression/BlockGrowthManager.java @@ -37,3 +37,11 @@ CON public void run() { DEL ArrayList<HashMap> conditionsList = (ArrayList<HashMap>) plugin.getConf...
<<<<<<< SEARCH @Override public void run() { ArrayList<HashMap> conditionsList = (ArrayList<HashMap>) plugin.getConfig().get("conditions"); if (conditionsList != null) { ======= @Override public void run() { Object rawCon...
intellij-purescript/intellij-purescript
fe37475aed72028110a9b1567c83a0fd88833cfd
lexer/src/main/kotlin/org/purescript/PSLanguage.kt
kotlin
bsd-3-clause
Add all declarations from Prim to BUILTIN_TYPES
package org.purescript import com.intellij.lang.Language class PSLanguage : Language("Purescript", "text/purescript", "text/x-purescript", "application/x-purescript") { companion object { val INSTANCE = PSLanguage() /** * These modules are built into the purescript compiler, * a...
package org.purescript import com.intellij.lang.Language class PSLanguage : Language("Purescript", "text/purescript", "text/x-purescript", "application/x-purescript") { companion object { val INSTANCE = PSLanguage() /** * These modules are built into the purescript compiler, * a...
5
0
1
add_only
--- a/lexer/src/main/kotlin/org/purescript/PSLanguage.kt +++ b/lexer/src/main/kotlin/org/purescript/PSLanguage.kt @@ -32,2 +32,7 @@ val BUILTIN_TYPES = setOf( + "Function", // TODO Function is really a kind, not a type + "Record", // TODO Record is really a kind, not a type + "...
--- a/lexer/src/main/kotlin/org/purescript/PSLanguage.kt +++ b/lexer/src/main/kotlin/org/purescript/PSLanguage.kt @@ ... @@ val BUILTIN_TYPES = setOf( + "Function", // TODO Function is really a kind, not a type + "Record", // TODO Record is really a kind, not a type + "Partial"...
--- a/lexer/src/main/kotlin/org/purescript/PSLanguage.kt +++ b/lexer/src/main/kotlin/org/purescript/PSLanguage.kt @@ -32,2 +32,7 @@ CON val BUILTIN_TYPES = setOf( ADD "Function", // TODO Function is really a kind, not a type ADD "Record", // TODO Record is really a kind, not a type ADD ...
<<<<<<< SEARCH */ val BUILTIN_TYPES = setOf( "Int", "Number", ======= */ val BUILTIN_TYPES = setOf( "Function", // TODO Function is really a kind, not a type "Record", // TODO Record is really a kind, not a type "Partial", //...
googleinterns/step57-2020
05d81ff20390ac802a1ac2e914cf00a113a4b0cd
src/main/java/util/UserAuthUtil.java
java
apache-2.0
Add javadoc for authentication utility
package util; import com.google.appengine.api.users.User; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory; public class UserAuthUtil { /** * Returns a boolean for the user's login status * @return user login status */ public static boolean isUse...
package util; import com.google.appengine.api.users.User; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory; public class UserAuthUtil { /** * Returns a boolean for the user's login status * @return user login status */ public static boolean isUse...
18
1
5
mixed
--- a/src/main/java/util/UserAuthUtil.java +++ b/src/main/java/util/UserAuthUtil.java @@ -18,3 +18,3 @@ * @param redirect URL for webpage to return to after login - * @return + * @return URL for user to click to login */ @@ -24,2 +24,7 @@ } + + /** + * @param redirect URL for webpage to return to afte...
--- a/src/main/java/util/UserAuthUtil.java +++ b/src/main/java/util/UserAuthUtil.java @@ ... @@ * @param redirect URL for webpage to return to after login - * @return + * @return URL for user to click to login */ @@ ... @@ } + + /** + * @param redirect URL for webpage to return to after logout + * @...
--- a/src/main/java/util/UserAuthUtil.java +++ b/src/main/java/util/UserAuthUtil.java @@ -18,3 +18,3 @@ CON * @param redirect URL for webpage to return to after login DEL * @return ADD * @return URL for user to click to login CON */ @@ -24,2 +24,7 @@ CON } ADD ADD /** ADD * @param redirect URL for w...
<<<<<<< SEARCH /** * @param redirect URL for webpage to return to after login * @return */ public static String getLoginURL(String redirect) { UserService userServ = UserServiceFactory.getUserService(); return userServ.createLoginURL(redirect); } public static String getLogoutURL(String redirec...
blindpirate/gradle
64bee71e255b0e0f5359bf63fd4b8e26408b613c
subprojects/integ-test/integ-test.gradle.kts
kotlin
apache-2.0
Remove usage of `mavenLocal()` from `:integTest`
import org.gradle.gradlebuild.test.integrationtests.IntegrationTest import org.gradle.gradlebuild.testing.integrationtests.cleanup.WhenNotEmpty import org.gradle.gradlebuild.unittestandcompile.ModuleType plugins { gradlebuild.classycle } repositories { mavenLocal() } dependencies { integTestCompile(libra...
import org.gradle.gradlebuild.test.integrationtests.IntegrationTest import org.gradle.gradlebuild.testing.integrationtests.cleanup.WhenNotEmpty import org.gradle.gradlebuild.unittestandcompile.ModuleType plugins { gradlebuild.classycle } dependencies { integTestCompile(library("groovy")) integTestCompile(...
0
4
1
del_only
--- a/subprojects/integ-test/integ-test.gradle.kts +++ b/subprojects/integ-test/integ-test.gradle.kts @@ -6,6 +6,2 @@ gradlebuild.classycle -} - -repositories { - mavenLocal() }
--- a/subprojects/integ-test/integ-test.gradle.kts +++ b/subprojects/integ-test/integ-test.gradle.kts @@ ... @@ gradlebuild.classycle -} - -repositories { - mavenLocal() }
--- a/subprojects/integ-test/integ-test.gradle.kts +++ b/subprojects/integ-test/integ-test.gradle.kts @@ -6,6 +6,2 @@ CON gradlebuild.classycle DEL } DEL DEL repositories { DEL mavenLocal() CON }
<<<<<<< SEARCH plugins { gradlebuild.classycle } repositories { mavenLocal() } ======= plugins { gradlebuild.classycle } >>>>>>> REPLACE
EvilMcJerkface/atlasdb
219557a6c70df9bbb9cea1249e262a46af969977
atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java
java
apache-2.0
Make locks tables begin with _locks_, not just _locks
/** * Copyright 2016 Palantir Technologies * * Licensed under the BSD-3 License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://opensource.org/licenses/BSD-3-Clause * * Unless required by applicable law or agreed to in wri...
/** * Copyright 2016 Palantir Technologies * * Licensed under the BSD-3 License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://opensource.org/licenses/BSD-3-Clause * * Unless required by applicable law or agreed to in wri...
1
1
1
mixed
--- a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java +++ b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java @@ -26,3 +26,3 @@ private final Set<TableReference> hiddenTables; - static final String LOCK_TABLE_PREFIX = "_locks"; + ...
--- a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java +++ b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java @@ ... @@ private final Set<TableReference> hiddenTables; - static final String LOCK_TABLE_PREFIX = "_locks"; + stati...
--- a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java +++ b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/keyvalue/cassandra/HiddenTables.java @@ -26,3 +26,3 @@ CON private final Set<TableReference> hiddenTables; DEL static final String LOCK_TABLE_PREFIX = "_lock...
<<<<<<< SEARCH private TableReference lockTable; private final Set<TableReference> hiddenTables; static final String LOCK_TABLE_PREFIX = "_locks"; ======= private TableReference lockTable; private final Set<TableReference> hiddenTables; static final String LOCK_TABLE_PREFIX = "_locks_"; >>...
arturbosch/detekt
df23e6189b88beab3524fcef76269b95a23b6ccd
detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt
kotlin
apache-2.0
Add test for more than one filter for compiler
package io.gitlab.arturbosch.detekt.core import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe import org.jetbrains.spek.api.dsl.it import kotlin.test.assertNull import kotlin.test.assertTrue /** * @author Artur Bosch */ class KtTreeCompilerSpec : Spek({ describe("tree compiler functionali...
package io.gitlab.arturbosch.detekt.core import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe import org.jetbrains.spek.api.dsl.it import kotlin.test.assertNull import kotlin.test.assertTrue /** * @author Artur Bosch */ class KtTreeCompilerS...
9
0
2
add_only
--- a/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt +++ b/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt @@ -2,2 +2,3 @@ +import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek @@ -27,2 +28,10 @@ + it("should wo...
--- a/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt +++ b/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt @@ ... @@ +import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek @@ ... @@ + it("should work with two or ...
--- a/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt +++ b/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompilerSpec.kt @@ -2,2 +2,3 @@ CON ADD import org.assertj.core.api.Assertions.assertThat CON import org.jetbrains.spek.api.Spek @@ -27,2 +28,10 @@ CON ADD ...
<<<<<<< SEARCH package io.gitlab.arturbosch.detekt.core import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe ======= package io.gitlab.arturbosch.detekt.core import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe >>>>>...
intellij-purescript/intellij-purescript
5ab9a5ba9e98af59e0c3bd8118f194772493d0c6
src/main/kotlin/org/purescript/ide/purs/Npm.kt
kotlin
bsd-3-clause
Remove explicit use of default value
package org.purescript.ide.purs import com.intellij.openapi.diagnostic.logger import com.intellij.openapi.util.SystemInfo import com.intellij.util.io.exists import java.nio.file.Path import java.util.concurrent.TimeUnit class Npm { companion object { private val localBinPath: String by lazy { run("npm bi...
package org.purescript.ide.purs import com.intellij.openapi.diagnostic.logger import com.intellij.openapi.util.SystemInfo import com.intellij.util.io.exists import java.nio.file.Path import java.util.concurrent.TimeUnit class Npm { companion object { private val localBinPath: String by lazy { run("npm bi...
1
4
1
mixed
--- a/src/main/kotlin/org/purescript/ide/purs/Npm.kt +++ b/src/main/kotlin/org/purescript/ide/purs/Npm.kt @@ -20,6 +20,3 @@ } - val npmProc = ProcessBuilder(npmCmd) - .redirectError(ProcessBuilder.Redirect.PIPE) - .redirectOutput(ProcessBuilder.Redirect.PIPE) - ...
--- a/src/main/kotlin/org/purescript/ide/purs/Npm.kt +++ b/src/main/kotlin/org/purescript/ide/purs/Npm.kt @@ ... @@ } - val npmProc = ProcessBuilder(npmCmd) - .redirectError(ProcessBuilder.Redirect.PIPE) - .redirectOutput(ProcessBuilder.Redirect.PIPE) - ...
--- a/src/main/kotlin/org/purescript/ide/purs/Npm.kt +++ b/src/main/kotlin/org/purescript/ide/purs/Npm.kt @@ -20,6 +20,3 @@ CON } DEL val npmProc = ProcessBuilder(npmCmd) DEL .redirectError(ProcessBuilder.Redirect.PIPE) DEL .redirectOutput(ProcessBuilder.Redirect....
<<<<<<< SEARCH else -> listOf("/usr/bin/env", "bash", "-c", command) } val npmProc = ProcessBuilder(npmCmd) .redirectError(ProcessBuilder.Redirect.PIPE) .redirectOutput(ProcessBuilder.Redirect.PIPE) .start() npmProc.wait...
edloidas/rollrobot
217563dbab97f45e7608661db926dd462261c14d
src/handlers.js
javascript
mit
:bug: Fix inline query handler creation
const { inline, roll, full, random, help, deprecated } = require('./query'); const { createOptions, createInlineOptions } = require('./options'); const { error } = require('./text'); function createHandler(bot, query) { const { regexp, reply } = query; bot.onText(regexp, (msg, match) => { try { const { ...
const { inline, roll, full, random, help, deprecated } = require('./query'); const { createOptions, createInlineOptions } = require('./options'); const { error } = require('./text'); /* More event type are described in official API of `node-telegram-bot-api` https://github.com/yagop/node-telegram-bot-api/blob/master/d...
6
1
2
mixed
--- a/src/handlers.js +++ b/src/handlers.js @@ -3,2 +3,7 @@ const { error } = require('./text'); + +/* +More event type are described in official API of `node-telegram-bot-api` +https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md +*/ @@ -23,3 +28,3 @@ - bot.onText('inline_query', msg => { + b...
--- a/src/handlers.js +++ b/src/handlers.js @@ ... @@ const { error } = require('./text'); + +/* +More event type are described in official API of `node-telegram-bot-api` +https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md +*/ @@ ... @@ - bot.onText('inline_query', msg => { + bot.on('inline_...
--- a/src/handlers.js +++ b/src/handlers.js @@ -3,2 +3,7 @@ CON const { error } = require('./text'); ADD ADD /* ADD More event type are described in official API of `node-telegram-bot-api` ADD https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md ADD */ CON @@ -23,3 +28,3 @@ CON DEL bot.onText('i...
<<<<<<< SEARCH const { createOptions, createInlineOptions } = require('./options'); const { error } = require('./text'); function createHandler(bot, query) { ======= const { createOptions, createInlineOptions } = require('./options'); const { error } = require('./text'); /* More event type are described in official ...
Reduks/Reduks
94ce4240f2ec1c0e76950467ecbc698b74a66a47
src/test/java/com/reduks/reduks/StoreTest.kt
kotlin
mit
Create store get state test
package com.reduks.reduks import com.reduks.reduks.repository.FakeActions import com.reduks.reduks.repository.FakeData import com.reduks.reduks.repository.FakeState import com.reduks.reduks.subscription.Subscriber import com.reduks.reduks.subscription.Subscription import org.jetbrains.spek.api.Spek import org.jetbrain...
package com.reduks.reduks import com.reduks.reduks.repository.FakeActions import com.reduks.reduks.repository.FakeData import com.reduks.reduks.repository.FakeState import com.reduks.reduks.subscription.Subscriber import com.reduks.reduks.subscription.Subscription import org.jetbrains.spek.api.Spek import org.jetbrain...
9
4
3
mixed
--- a/src/test/java/com/reduks/reduks/StoreTest.kt +++ b/src/test/java/com/reduks/reduks/StoreTest.kt @@ -20,7 +20,6 @@ val subscription = Subscription { - print("\nunsubscribed") assertTrue(true) } + val subscriber = Subscriber<FakeState> { state -> - print...
--- a/src/test/java/com/reduks/reduks/StoreTest.kt +++ b/src/test/java/com/reduks/reduks/StoreTest.kt @@ ... @@ val subscription = Subscription { - print("\nunsubscribed") assertTrue(true) } + val subscriber = Subscriber<FakeState> { state -> - print("\n$sta...
--- a/src/test/java/com/reduks/reduks/StoreTest.kt +++ b/src/test/java/com/reduks/reduks/StoreTest.kt @@ -20,7 +20,6 @@ CON val subscription = Subscription { DEL print("\nunsubscribed") CON assertTrue(true) CON } ADD CON val subscriber = Subscriber<FakeState> { state -> ...
<<<<<<< SEARCH val subscription = Subscription { print("\nunsubscribed") assertTrue(true) } val subscriber = Subscriber<FakeState> { state -> print("\n$state") assertTrue(state.name.toLowerCase().trim() == "bloder") } beforeEach {...
sourrust/flac
2d24d4d1ab14f99d72461c2cef52c21dab9d88c9
src/lib.rs
rust
bsd-3-clause
Add documentation for type information of iter
//! An implementation of [FLAC](https://xiph.org/flac), free lossless audio //! codec, written in Rust. //! //! The code is available on [GitHub](https://github.com/sourrust/flac). //! //! # Examples //! //! Basic decoding from a file. //! //! ``` //! use flac::StreamReader; //! use std::fs::File; //! //! match StreamR...
//! An implementation of [FLAC](https://xiph.org/flac), free lossless audio //! codec, written in Rust. //! //! The code is available on [GitHub](https://github.com/sourrust/flac). //! //! # Examples //! //! Basic decoding from a file. //! //! ``` //! use flac::StreamReader; //! use std::fs::File; //! //! match StreamR...
3
0
1
add_only
--- a/src/lib.rs +++ b/src/lib.rs @@ -18,2 +18,5 @@ //! +//! // The explicit size for `Stream::iter` is the resulting decoded +//! // sample. You can usually find out the desired size of the +//! // samples with `info.bits_per_sample`. //! for sample in stream.iter::<i16>() {
--- a/src/lib.rs +++ b/src/lib.rs @@ ... @@ //! +//! // The explicit size for `Stream::iter` is the resulting decoded +//! // sample. You can usually find out the desired size of the +//! // samples with `info.bits_per_sample`. //! for sample in stream.iter::<i16>() {
--- a/src/lib.rs +++ b/src/lib.rs @@ -18,2 +18,5 @@ CON //! ADD //! // The explicit size for `Stream::iter` is the resulting decoded ADD //! // sample. You can usually find out the desired size of the ADD //! // samples with `info.bits_per_sample`. CON //! for sample in stream.iter::<i16>() {
<<<<<<< SEARCH //! let info = stream.info(); //! //! for sample in stream.iter::<i16>() { //! // Iterate over each decoded sample ======= //! let info = stream.info(); //! //! // The explicit size for `Stream::iter` is the resulting decoded //! // sample. You can usually find out the desired ...
tonyli71/designate
4a711a2709ec5d8a8e04bb0f735fcfaa319cffdf
designate/objects/validation_error.py
python
apache-2.0
Fix the displayed error message in V2 API Change-Id: I07c3f1ed79fa507dbe9b76eb8f5964475516754c
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 requir...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 requir...
1
3
2
mixed
--- a/designate/objects/validation_error.py +++ b/designate/objects/validation_error.py @@ -13,4 +13,2 @@ # under the License. -import six - from designate.objects import base @@ -35,3 +33,3 @@ e.path = list(getattr(js_error, 'releative_path', js_error.path)) - e.message = six.text_type(js_error) +...
--- a/designate/objects/validation_error.py +++ b/designate/objects/validation_error.py @@ ... @@ # under the License. -import six - from designate.objects import base @@ ... @@ e.path = list(getattr(js_error, 'releative_path', js_error.path)) - e.message = six.text_type(js_error) + e.messag...
--- a/designate/objects/validation_error.py +++ b/designate/objects/validation_error.py @@ -13,4 +13,2 @@ CON # under the License. DEL import six DEL CON from designate.objects import base @@ -35,3 +33,3 @@ CON e.path = list(getattr(js_error, 'releative_path', js_error.path)) DEL e.message = six.tex...
<<<<<<< SEARCH # License for the specific language governing permissions and limitations # under the License. import six from designate.objects import base ======= # License for the specific language governing permissions and limitations # under the License. from designate.objects import base >>>>>>> R...
prasos/bittiraha-walletd
2f0d51b524d5ca0e6a769cfcaeb81724c7c1491a
src/fi/bittiraha/walletd/WalletAccountManager.java
java
apache-2.0
Make walletextension non-mandatory for now since it's not in use.
package fi.bittiraha.walletd; import org.bitcoinj.core.*; import org.bitcoinj.kits.WalletAppKit; import net.minidev.json.*; import com.google.common.collect.ImmutableList; import java.util.*; import java.io.File; /** * This class extends WalletAppKit to add ability to tag individual addresses * with account names t...
package fi.bittiraha.walletd; import org.bitcoinj.core.*; import org.bitcoinj.kits.WalletAppKit; import net.minidev.json.*; import com.google.common.collect.ImmutableList; import java.util.*; import java.io.File; /** * This class extends WalletAppKit to add ability to tag individual addresses * with account names t...
2
1
1
mixed
--- a/src/fi/bittiraha/walletd/WalletAccountManager.java +++ b/src/fi/bittiraha/walletd/WalletAccountManager.java @@ -33,3 +33,4 @@ public boolean isWalletExtensionMandatory() { - return true; + // FIXME, set this to true when this module actually does something + return false; }
--- a/src/fi/bittiraha/walletd/WalletAccountManager.java +++ b/src/fi/bittiraha/walletd/WalletAccountManager.java @@ ... @@ public boolean isWalletExtensionMandatory() { - return true; + // FIXME, set this to true when this module actually does something + return false; }
--- a/src/fi/bittiraha/walletd/WalletAccountManager.java +++ b/src/fi/bittiraha/walletd/WalletAccountManager.java @@ -33,3 +33,4 @@ CON public boolean isWalletExtensionMandatory() { DEL return true; ADD // FIXME, set this to true when this module actually does something ADD return false; CON }...
<<<<<<< SEARCH } public boolean isWalletExtensionMandatory() { return true; } public byte[] serializeWalletExtension() { ======= } public boolean isWalletExtensionMandatory() { // FIXME, set this to true when this module actually does something return false; } public b...
azaroth42/iiif-harvester
c4103c00b51ddb9cb837d65b43c972505e533bdc
tilescraper.py
python
apache-2.0
Add in good practices for crawling
from PIL import Image import json, StringIO, requests import time service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/" resp = requests.get(service + "info.json") js = json.loads(resp.text) h = js['height'] w = js['width'] img = Image.new("RGB", (w,h), "white") tilesize = 400 for x in range(w/tilesize+...
from PIL import Image import json, StringIO, requests import time import robotparser import re host = "http://dlss-dev-azaroth.stanford.edu/" service = host + "services/iiif/f1rc/" resp = requests.get(service + "info.json") js = json.loads(resp.text) h = js['height'] w = js['width'] img = Image.new("RGB", (w,h), "whi...
32
2
3
mixed
--- a/tilescraper.py +++ b/tilescraper.py @@ -3,4 +3,8 @@ import time +import robotparser +import re -service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/" +host = "http://dlss-dev-azaroth.stanford.edu/" + +service = host + "services/iiif/f1rc/" resp = requests.get(service + "info.json") @@ -10,3 +14...
--- a/tilescraper.py +++ b/tilescraper.py @@ ... @@ import time +import robotparser +import re -service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/" +host = "http://dlss-dev-azaroth.stanford.edu/" + +service = host + "services/iiif/f1rc/" resp = requests.get(service + "info.json") @@ ... @@ img = I...
--- a/tilescraper.py +++ b/tilescraper.py @@ -3,4 +3,8 @@ CON import time ADD import robotparser ADD import re CON DEL service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/" ADD host = "http://dlss-dev-azaroth.stanford.edu/" ADD ADD service = host + "services/iiif/f1rc/" CON resp = requests.get(service ...
<<<<<<< SEARCH import json, StringIO, requests import time service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/" resp = requests.get(service + "info.json") js = json.loads(resp.text) h = js['height'] w = js['width'] img = Image.new("RGB", (w,h), "white") tilesize = 400 for x in range(w/tilesize+1): ==...
rlucioni/typesetter
f5206fa6cd94758202378b7616e578bd8a3a8dfe
tasks.py
python
mit
Use threads to allow simultaneous serving of site and building of assets
"""Task functions for use with Invoke.""" from invoke import task @task def clean(context): cmd = '$(npm bin)/gulp clean' context.run(cmd) @task def requirements(context): steps = [ 'pip install -r requirements.txt', 'npm install', '$(npm bin)/bower install', ] cmd = ' &...
"""Task functions for use with Invoke.""" from threading import Thread from invoke import task @task def clean(context): cmd = '$(npm bin)/gulp clean' context.run(cmd) @task def requirements(context): steps = [ 'pip install -r requirements.txt', 'npm install', '$(npm bin)/bower...
13
1
3
mixed
--- a/tasks.py +++ b/tasks.py @@ -1,2 +1,4 @@ """Task functions for use with Invoke.""" +from threading import Thread + from invoke import task @@ -24,3 +26,3 @@ @task -def run(context, host='127.0.0.1', port='5000'): +def serve(context, host='127.0.0.1', port='5000'): steps = [ @@ -40 +42,11 @@ context.ru...
--- a/tasks.py +++ b/tasks.py @@ ... @@ """Task functions for use with Invoke.""" +from threading import Thread + from invoke import task @@ ... @@ @task -def run(context, host='127.0.0.1', port='5000'): +def serve(context, host='127.0.0.1', port='5000'): steps = [ @@ ... @@ context.run(cmd) + + +@task +de...
--- a/tasks.py +++ b/tasks.py @@ -1,2 +1,4 @@ CON """Task functions for use with Invoke.""" ADD from threading import Thread ADD CON from invoke import task @@ -24,3 +26,3 @@ CON @task DEL def run(context, host='127.0.0.1', port='5000'): ADD def serve(context, host='127.0.0.1', port='5000'): CON steps = [ @@ -40 +...
<<<<<<< SEARCH """Task functions for use with Invoke.""" from invoke import task ======= """Task functions for use with Invoke.""" from threading import Thread from invoke import task >>>>>>> REPLACE <<<<<<< SEARCH @task def run(context, host='127.0.0.1', port='5000'): steps = [ 'open http://{host}:{...
klaseskilson/TNM031-labs
2596904080e1367a1d82fce2083a2d5b7f6e04a9
lab4/src/SecureElection/SecureElectionClient.java
java
mit
Add SSL setup to client
package SecureElection; /** * Created by Klas Eskilson on 15-11-16. */ public class SecureElectionClient { public static void main(String[] args) { } }
package SecureElection; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetAddress; import java.net.UnknownHostException; import java.security.KeyStore; import javax.net.ssl.*; import SecureElection.Common.Settings; /** * C...
63
0
2
add_only
--- a/lab4/src/SecureElection/SecureElectionClient.java +++ b/lab4/src/SecureElection/SecureElectionClient.java @@ -1,2 +1,13 @@ package SecureElection; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.InetAddress; +impo...
--- a/lab4/src/SecureElection/SecureElectionClient.java +++ b/lab4/src/SecureElection/SecureElectionClient.java @@ ... @@ package SecureElection; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.InetAddress; +import java...
--- a/lab4/src/SecureElection/SecureElectionClient.java +++ b/lab4/src/SecureElection/SecureElectionClient.java @@ -1,2 +1,13 @@ CON package SecureElection; ADD ADD import java.io.BufferedReader; ADD import java.io.FileInputStream; ADD import java.io.InputStreamReader; ADD import java.io.PrintWriter; ADD import java.n...
<<<<<<< SEARCH package SecureElection; /** * Created by Klas Eskilson on 15-11-16. */ public class SecureElectionClient { public static void main(String[] args) { } ======= package SecureElection; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; import java...
clchiou/garage
96fd8b71fd425d251e9cc07e8cc65b4fc040d857
samples/nanomsg/hello_world.py
python
mit
Fix message lost issue in samples
import os.path import shutil import tempfile import threading import sys import nanomsg as nn def ping(url, event): with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(url): event.wait() sock.send(b'Hello, World!') def pong(url, event): with nn.Socket(protocol=nn.Protocol.NN_...
import threading import sys import nanomsg as nn def ping(url, barrier): with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(url): sock.send(b'Hello, World!') # Shutdown the endpoint after the other side ack'ed; otherwise # the message could be lost. barrier.wait() ...
17
22
3
mixed
--- a/samples/nanomsg/hello_world.py +++ b/samples/nanomsg/hello_world.py @@ -1,4 +1 @@ -import os.path -import shutil -import tempfile import threading @@ -9,13 +6,15 @@ -def ping(url, event): +def ping(url, barrier): with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(url): - event.wait(...
--- a/samples/nanomsg/hello_world.py +++ b/samples/nanomsg/hello_world.py @@ ... @@ -import os.path -import shutil -import tempfile import threading @@ ... @@ -def ping(url, event): +def ping(url, barrier): with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(url): - event.wait() s...
--- a/samples/nanomsg/hello_world.py +++ b/samples/nanomsg/hello_world.py @@ -1,4 +1 @@ DEL import os.path DEL import shutil DEL import tempfile CON import threading @@ -9,13 +6,15 @@ CON DEL def ping(url, event): ADD def ping(url, barrier): CON with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(ur...
<<<<<<< SEARCH import os.path import shutil import tempfile import threading import sys ======= import threading import sys >>>>>>> REPLACE <<<<<<< SEARCH def ping(url, event): with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.connect(url): event.wait() sock.send(b'Hello, World!') de...
aaronkaplan/intelmq
648c7fb94f92e8ef722af8c9462c9ff65bf643fc
intelmq/bots/collectors/mail/collector_mail_body.py
python
agpl-3.0
Insert date when email was received Sometimes we receive email reports like "this is happening right now" and there is no date/time included. So if we process emails once per hour - we don't have info about event time. Additional field `extra.email_received` in the mail body collector would help.
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
# -*- coding: utf-8 -*- """ Uses the common mail iteration method from the lib file. """ from .lib import MailCollectorBot class MailBodyCollectorBot(MailCollectorBot): def init(self): super().init() self.content_types = getattr(self.parameters, 'content_types', ('plain', 'html')) if isi...
1
0
1
add_only
--- a/intelmq/bots/collectors/mail/collector_mail_body.py +++ b/intelmq/bots/collectors/mail/collector_mail_body.py @@ -31,2 +31,3 @@ report["extra.email_message_id"] = message.message_id + report["extra.email_received"] = message.date
--- a/intelmq/bots/collectors/mail/collector_mail_body.py +++ b/intelmq/bots/collectors/mail/collector_mail_body.py @@ ... @@ report["extra.email_message_id"] = message.message_id + report["extra.email_received"] = message.date
--- a/intelmq/bots/collectors/mail/collector_mail_body.py +++ b/intelmq/bots/collectors/mail/collector_mail_body.py @@ -31,2 +31,3 @@ CON report["extra.email_message_id"] = message.message_id ADD report["extra.email_received"] = message.date CON
<<<<<<< SEARCH report["extra.email_from"] = ','.join(x['email'] for x in message.sent_from) report["extra.email_message_id"] = message.message_id self.send_message(report) ======= report["extra.email_from"] = ','.join(x['email'] for x in message.sent_fro...
CyclopsMC/CyclopsCore
6946b0951e03821c0ca8a9380b45b7905a999488
src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java
java
mit
Fix incorrect translation key metadata export
package org.cyclops.cyclopscore.metadata; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.registries.ForgeRegistries; /** * Item translation key exporter. *...
package org.cyclops.cyclopscore.metadata; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.registries.ForgeRegistries; /** * Item translation key exporter. *...
0
3
1
del_only
--- a/src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java +++ b/src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java @@ -24,5 +24,2 @@ String translationKey = itemStack.getTranslationKey(); - if (!translationKey.endsWith(...
--- a/src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java +++ b/src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java @@ ... @@ String translationKey = itemStack.getTranslationKey(); - if (!translationKey.endsWith(".name")...
--- a/src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java +++ b/src/main/java/org/cyclops/cyclopscore/metadata/RegistryExportableItemTranslationKeys.java @@ -24,5 +24,2 @@ CON String translationKey = itemStack.getTranslationKey(); DEL if (!translationKey.end...
<<<<<<< SEARCH ItemStack itemStack = new ItemStack(value); String translationKey = itemStack.getTranslationKey(); if (!translationKey.endsWith(".name")) { translationKey += ".name"; } JsonObject object = new JsonObject(); ======= ...
vishwesh3/zulip-mobile
d093fea151e187e5e5c9014c6bfd54d6ce7f96f8
src/topics/TopicList.js
javascript
apache-2.0
ui: Add keyboardShouldPersistTaps to Topic List screen Now that we have a search field and potentially a keyboard popped make sure to process the first tap on the topic list.
/* @flow */ import React, { PureComponent } from 'react'; import { FlatList, StyleSheet } from 'react-native'; import type { Topic } from '../types'; import TopicItem from '../streams/TopicItem'; import { LoadingIndicator, SectionSeparatorBetween, SearchEmptyState } from '../common'; const styles = StyleSheet.create(...
/* @flow */ import React, { PureComponent } from 'react'; import { FlatList, StyleSheet } from 'react-native'; import type { Topic } from '../types'; import TopicItem from '../streams/TopicItem'; import { LoadingIndicator, SectionSeparatorBetween, SearchEmptyState } from '../common'; const styles = StyleSheet.create(...
1
0
1
add_only
--- a/src/topics/TopicList.js +++ b/src/topics/TopicList.js @@ -43,2 +43,3 @@ <FlatList + keyboardShouldPersistTaps="always" style={styles.list}
--- a/src/topics/TopicList.js +++ b/src/topics/TopicList.js @@ ... @@ <FlatList + keyboardShouldPersistTaps="always" style={styles.list}
--- a/src/topics/TopicList.js +++ b/src/topics/TopicList.js @@ -43,2 +43,3 @@ CON <FlatList ADD keyboardShouldPersistTaps="always" CON style={styles.list}
<<<<<<< SEARCH return ( <FlatList style={styles.list} data={topics} ======= return ( <FlatList keyboardShouldPersistTaps="always" style={styles.list} data={topics} >>>>>>> REPLACE
redox-os/sodium
ef920b64c53e66de9d303398b1ab4a667a390dbd
parse.rs
rust
mit
Fix issues with unicode control chars
use super::*; use redox::*; /// Get the next instruction // TODO: Should this be an iterator instead? pub fn next_inst(editor: &mut Editor) -> Inst { let mut n = 0; loop { if let EventOption::Key(k) = editor.window.poll().unwrap_or(Event::new()).to_option() { if k.pressed { ...
use super::*; use redox::*; /// Get the next instruction // TODO: Should this be an iterator instead? pub fn next_inst(editor: &mut Editor) -> Inst { let mut n = 0; let mut shifted = false; // TODO: Make the switch to normal mode shift more well-coded. loop { if let EventOption::Key(k) = edito...
31
20
1
mixed
--- a/parse.rs +++ b/parse.rs @@ -7,26 +7,37 @@ let mut n = 0; + let mut shifted = false; + // TODO: Make the switch to normal mode shift more well-coded. loop { if let EventOption::Key(k) = editor.window.poll().unwrap_or(Event::new()).to_option() { - if k.pressed { - ...
--- a/parse.rs +++ b/parse.rs @@ ... @@ let mut n = 0; + let mut shifted = false; + // TODO: Make the switch to normal mode shift more well-coded. loop { if let EventOption::Key(k) = editor.window.poll().unwrap_or(Event::new()).to_option() { - if k.pressed { - let c ...
--- a/parse.rs +++ b/parse.rs @@ -7,26 +7,37 @@ CON let mut n = 0; ADD let mut shifted = false; CON ADD // TODO: Make the switch to normal mode shift more well-coded. CON loop { CON if let EventOption::Key(k) = editor.window.poll().unwrap_or(Event::new()).to_option() { DEL if k.pres...
<<<<<<< SEARCH pub fn next_inst(editor: &mut Editor) -> Inst { let mut n = 0; loop { if let EventOption::Key(k) = editor.window.poll().unwrap_or(Event::new()).to_option() { if k.pressed { let c = k.character; match editor.cursor().mode { M...
ktorio/ktor
5cfc7caf2183b0446ea3c9e4bbe9042c69d653ff
ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt
kotlin
apache-2.0
Add DSL config to the gson-sample
package io.ktor.samples.gson import io.ktor.application.* import io.ktor.features.* import io.ktor.gson.* import io.ktor.http.* import io.ktor.response.* import io.ktor.routing.* data class Model(val name: String, val items: List<Item>) data class Item(val key: String, val value: String) /* > curl -v --comp...
package io.ktor.samples.gson import io.ktor.application.* import io.ktor.features.* import io.ktor.gson.* import io.ktor.http.* import io.ktor.response.* import io.ktor.routing.* import java.text.* data class Model(val name: String, val items: List<Item>) data class Item(val key: String, val value: String) /* ...
7
2
3
mixed
--- a/ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt +++ b/ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt @@ -8,2 +8,3 @@ import io.ktor.routing.* +import java.text.* @@ -15,2 +16,4 @@ {"name":"root","items":[{"key":"A","value":"Apache"},{"key":"B","v...
--- a/ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt +++ b/ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt @@ ... @@ import io.ktor.routing.* +import java.text.* @@ ... @@ {"name":"root","items":[{"key":"A","value":"Apache"},{"key":"B","value":"Bing"}]...
--- a/ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt +++ b/ktor-samples/ktor-samples-gson/src/io/ktor/samples/gson/GsonApplication.kt @@ -8,2 +8,3 @@ CON import io.ktor.routing.* ADD import java.text.* CON @@ -15,2 +16,4 @@ CON {"name":"root","items":[{"key":"A","value":"Apache"},{...
<<<<<<< SEARCH import io.ktor.response.* import io.ktor.routing.* data class Model(val name: String, val items: List<Item>) ======= import io.ktor.response.* import io.ktor.routing.* import java.text.* data class Model(val name: String, val items: List<Item>) >>>>>>> REPLACE <<<<<<< SEARCH > curl -v --com...
monokrome/django-drift
c12f040fe9b0bbc3e47aed8f942de04216251f51
importer/loaders.py
python
mit
Allow configuration of extensions for types.
import xlrd import os base_loader_error = 'The Loader class can only be used by extending it.' excel_extensions = [ '.xls', '.xlsx', ] class Loader(object): def __init__(self, file_info, autoload=True): self.filename = file_info.path if autoload is True: return self.open()...
from django.conf import settings import xlrd import os base_loader_error = 'The Loader class can only be used by extending it.' extensions = getattr( settings, 'IMPORTER_EXTENSIONS', { 'excel': ('.xls', '.xlsx'), } ) class Loader(object): def __init__(self, file_info, autoload=True): ...
11
5
3
mixed
--- a/importer/loaders.py +++ b/importer/loaders.py @@ -1 +1,3 @@ +from django.conf import settings + import xlrd @@ -7,6 +9,9 @@ -excel_extensions = [ - '.xls', - '.xlsx', -] +extensions = getattr( + settings, + 'IMPORTER_EXTENSIONS', + { + 'excel': ('.xls', '.xlsx'), + } +) @@ -52,3 +57,...
--- a/importer/loaders.py +++ b/importer/loaders.py @@ ... @@ +from django.conf import settings + import xlrd @@ ... @@ -excel_extensions = [ - '.xls', - '.xlsx', -] +extensions = getattr( + settings, + 'IMPORTER_EXTENSIONS', + { + 'excel': ('.xls', '.xlsx'), + } +) @@ ... @@ # TO...
--- a/importer/loaders.py +++ b/importer/loaders.py @@ -1 +1,3 @@ ADD from django.conf import settings ADD CON import xlrd @@ -7,6 +9,9 @@ CON DEL excel_extensions = [ DEL '.xls', DEL '.xlsx', DEL ] ADD extensions = getattr( ADD settings, ADD 'IMPORTER_EXTENSIONS', ADD { ADD 'excel': ('.xl...
<<<<<<< SEARCH import xlrd import os ======= from django.conf import settings import xlrd import os >>>>>>> REPLACE <<<<<<< SEARCH excel_extensions = [ '.xls', '.xlsx', ] ======= extensions = getattr( settings, 'IMPORTER_EXTENSIONS', { 'excel': ('.xls', '.xlsx'), } ) >>>>>>...
stallmanifold/rust-multiboot2
4abe342074bcacf7c9e6433846b07b7533bde6d2
src/elf_symbols.rs
rust
apache-2.0
Add basic support for ELF section parsing.
// Elf section headers have a fixed size. const ELF_SECTION_HEADER_SIZE: usize = 56; #[repr(packed)] struct ElfSymbolTag { tag_type: u32, size: u32, num: u16, entsize: u16, shndx: u16, reserved: u16, first_section: ElfSectionHeader } struct ElfSectionHeader { sh_name: u32, sh_typ...
#[repr(packed)] struct ElfSymbolTag { tag_type: u32, size: u32, num: u16, entsize: u16, shndx: u16, reserved: u16, first_section: ElfSectionHeader } impl ElfSymbolTag { pub fn elf_sections(&'static self) -> ElfSectionIter { ElfSectionIter { current_section: &self.fir...
37
8
3
mixed
--- a/src/elf_symbols.rs +++ b/src/elf_symbols.rs @@ -1,6 +1 @@ - - -// Elf section headers have a fixed size. -const ELF_SECTION_HEADER_SIZE: usize = 56; - #[repr(packed)] @@ -16,2 +11,14 @@ +impl ElfSymbolTag { + pub fn elf_sections(&'static self) -> ElfSectionIter { + ElfSectionIter { + curre...
--- a/src/elf_symbols.rs +++ b/src/elf_symbols.rs @@ ... @@ - - -// Elf section headers have a fixed size. -const ELF_SECTION_HEADER_SIZE: usize = 56; - #[repr(packed)] @@ ... @@ +impl ElfSymbolTag { + pub fn elf_sections(&'static self) -> ElfSectionIter { + ElfSectionIter { + current_section: &...
--- a/src/elf_symbols.rs +++ b/src/elf_symbols.rs @@ -1,6 +1 @@ DEL DEL DEL // Elf section headers have a fixed size. DEL const ELF_SECTION_HEADER_SIZE: usize = 56; DEL CON #[repr(packed)] @@ -16,2 +11,14 @@ CON ADD impl ElfSymbolTag { ADD pub fn elf_sections(&'static self) -> ElfSectionIter { ADD ElfSe...
<<<<<<< SEARCH // Elf section headers have a fixed size. const ELF_SECTION_HEADER_SIZE: usize = 56; #[repr(packed)] struct ElfSymbolTag { ======= #[repr(packed)] struct ElfSymbolTag { >>>>>>> REPLACE <<<<<<< SEARCH } struct ElfSectionHeader { sh_name: u32, ======= } impl ElfSymbolTag { pub fn elf_secti...
yunity/yunity-core
dc461956408ffa35e2391fccf4231d60144985f7
yunity/groups/api.py
python
agpl-3.0
Fix permissions for groups endpoint
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSerializer from yuni...
from rest_framework import filters from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission from rest_framework.response import Response from yunity.groups.serializers import GroupSeri...
16
2
3
mixed
--- a/yunity/groups/api.py +++ b/yunity/groups/api.py @@ -3,3 +3,3 @@ from rest_framework.decorators import detail_route -from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly +from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission from rest_frame...
--- a/yunity/groups/api.py +++ b/yunity/groups/api.py @@ ... @@ from rest_framework.decorators import detail_route -from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly +from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission from rest_framework.r...
--- a/yunity/groups/api.py +++ b/yunity/groups/api.py @@ -3,3 +3,3 @@ CON from rest_framework.decorators import detail_route DEL from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly ADD from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, BasePermission CON fro...
<<<<<<< SEARCH from rest_framework import status, viewsets from rest_framework.decorators import detail_route from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly from rest_framework.response import Response from yunity.groups.serializers import GroupSerializer from yunity.groups.models imp...
hch12907/wiz
7c8fa41625fd17c73876420e300e7c787cb056f6
src/wiz/extraction.rs
rust
bsd-3-clause
Use match instead of unwrap
extern crate tar; extern crate flate2; use std::fs::File; use std::io::{BufReader, Read, Write}; use std::path::Path; use self::tar::Archive; use self::flate2::read::GzDecoder; fn extract_tar(input: &Path, output: &Path) { let file = File::open(input).unwrap(); let mut archive = Archive::new(file); archi...
extern crate tar; extern crate flate2; use std::fs::File; use std::io::{BufReader, Read, Write}; use std::path::Path; use self::tar::Archive; use self::flate2::read::GzDecoder; fn extract_tar(input: &Path, output: &Path) { let file = match File::open(input) { Ok(x) => x, Err(why) => panic!("A...
17
4
2
mixed
--- a/src/wiz/extraction.rs +++ b/src/wiz/extraction.rs @@ -11,3 +11,8 @@ fn extract_tar(input: &Path, output: &Path) { - let file = File::open(input).unwrap(); + let file = match File::open(input) + { + Ok(x) => x, + Err(why) => panic!("An error occured. \n{}", why), + }; + let mut arch...
--- a/src/wiz/extraction.rs +++ b/src/wiz/extraction.rs @@ ... @@ fn extract_tar(input: &Path, output: &Path) { - let file = File::open(input).unwrap(); + let file = match File::open(input) + { + Ok(x) => x, + Err(why) => panic!("An error occured. \n{}", why), + }; + let mut archive = Ar...
--- a/src/wiz/extraction.rs +++ b/src/wiz/extraction.rs @@ -11,3 +11,8 @@ CON fn extract_tar(input: &Path, output: &Path) { DEL let file = File::open(input).unwrap(); ADD let file = match File::open(input) ADD { ADD Ok(x) => x, ADD Err(why) => panic!("An error occured. \n{}", why), ADD }...
<<<<<<< SEARCH fn extract_tar(input: &Path, output: &Path) { let file = File::open(input).unwrap(); let mut archive = Archive::new(file); archive.unpack(output).unwrap(); } fn extract_gz(input: &Path, output: &Path) { let file = File::open(input).unwrap(); let buffer = BufReader::new(file); le...
getguesstimate/guesstimate-app
15481c310e35027f011f541e7ae87fd089987fdf
src/components/calculators/input.js
javascript
mit
Add delay to field focus to ensure it will work
import React, {Component} from 'react' import Icon from 'react-fa' import {EditorState, Editor, ContentState} from 'draft-js' export class Input extends Component{ state = {editorState: EditorState.createWithContent(ContentState.createFromText(''))} componentDidMount() { if (this.props.isFirst) { // t...
import React, {Component} from 'react' import Icon from 'react-fa' import {EditorState, Editor, ContentState} from 'draft-js' export class Input extends Component{ state = {editorState: EditorState.createWithContent(ContentState.createFromText(''))} componentDidMount() { if (this.props.isFirst) { setT...
1
2
1
mixed
--- a/src/components/calculators/input.js +++ b/src/components/calculators/input.js @@ -11,4 +11,3 @@ if (this.props.isFirst) { - // this.refs.editor.focus() - window.thiswillwork = this.refs.editor + setTimeout(() => {this.refs.editor.focus()}, 1) }
--- a/src/components/calculators/input.js +++ b/src/components/calculators/input.js @@ ... @@ if (this.props.isFirst) { - // this.refs.editor.focus() - window.thiswillwork = this.refs.editor + setTimeout(() => {this.refs.editor.focus()}, 1) }
--- a/src/components/calculators/input.js +++ b/src/components/calculators/input.js @@ -11,4 +11,3 @@ CON if (this.props.isFirst) { DEL // this.refs.editor.focus() DEL window.thiswillwork = this.refs.editor ADD setTimeout(() => {this.refs.editor.focus()}, 1) CON }
<<<<<<< SEARCH componentDidMount() { if (this.props.isFirst) { // this.refs.editor.focus() window.thiswillwork = this.refs.editor } } ======= componentDidMount() { if (this.props.isFirst) { setTimeout(() => {this.refs.editor.focus()}, 1) } } >>>>>>> REPLACE
YACOWS/opps
5e1daf36d604ee1898e8486458013e63010d6888
opps/api/models.py
python
mit
Add missing translations on API model
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha.sha User = get_user_model() class ApiKey(models.Mod...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid import hmac from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model try: from hashlib import sha1 except ImportError: import sha sha1 = sha...
9
3
3
mixed
--- a/opps/api/models.py +++ b/opps/api/models.py @@ -7,2 +7,3 @@ from django.conf import settings +from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model @@ -20,5 +21,6 @@ class ApiKey(models.Model): - user = models.ForeignKey(settings.AUTH_USER_MODEL) - key = m...
--- a/opps/api/models.py +++ b/opps/api/models.py @@ ... @@ from django.conf import settings +from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model @@ ... @@ class ApiKey(models.Model): - user = models.ForeignKey(settings.AUTH_USER_MODEL) - key = models.CharFiel...
--- a/opps/api/models.py +++ b/opps/api/models.py @@ -7,2 +7,3 @@ CON from django.conf import settings ADD from django.utils.translation import ugettext_lazy as _ CON from django.contrib.auth import get_user_model @@ -20,5 +21,6 @@ CON class ApiKey(models.Model): DEL user = models.ForeignKey(settings.AUTH_USER_MODE...
<<<<<<< SEARCH from django.db import models from django.conf import settings from django.contrib.auth import get_user_model ======= from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model >>>>>>> REPLACE <<...
sgade/hgots-node
0b38c9c37b57ab6c857b85a7ce6dfc0911f917e0
src/web/routes/api/v1/users.js
javascript
mit
Set content type of api response to JSON.
var helpers = require('./helpers'); var db = helpers.db; /* /users */ exports.getAllUsers = function(req, res) { helpers.getRequestingUser(req, function(err, user) { if ( err ) { res.status(500).end(); console.log("getAllUsers:", err); } else { if ( !user ) { res.status(...
var helpers = require('./helpers'); var db = helpers.db; /* /users */ exports.getAllUsers = function(req, res) { helpers.getRequestingUser(req, function(err, user) { if ( err ) { res.status(500).end(); console.log("getAllUsers:", err); } else { if ( !user ) { res.status(...
2
0
2
add_only
--- a/src/web/routes/api/v1/users.js +++ b/src/web/routes/api/v1/users.js @@ -22,2 +22,3 @@ + res.set('Content-Type', 'application/json'); res.end(JSON.stringify(users)); @@ -56,2 +57,3 @@ if ( cards ) { + res.set('Content-Type', 'application/json'); ...
--- a/src/web/routes/api/v1/users.js +++ b/src/web/routes/api/v1/users.js @@ ... @@ + res.set('Content-Type', 'application/json'); res.end(JSON.stringify(users)); @@ ... @@ if ( cards ) { + res.set('Content-Type', 'application/json'); ...
--- a/src/web/routes/api/v1/users.js +++ b/src/web/routes/api/v1/users.js @@ -22,2 +22,3 @@ CON ADD res.set('Content-Type', 'application/json'); CON res.end(JSON.stringify(users)); @@ -56,2 +57,3 @@ CON if ( cards ) { ADD res.set('Content-Type', 'applic...
<<<<<<< SEARCH } else { res.end(JSON.stringify(users)); ======= } else { res.set('Content-Type', 'application/json'); res.end(JSON.stringify(users)); >>>>>>> REPLACE <<<<<<< SEARCH ...
google/site-kit-wp
efbf3086d5db81bfeaaf386d862a76a7b45e3020
assets/js/googlesitekit-activation.js
javascript
apache-2.0
Send plugin_activated event on activation.
/** * Activation component. * * This JavaScript loads on every admin page. Reserved for later. * * Site Kit by Google, 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 ...
/** * Activation component. * * This JavaScript loads on every admin page. Reserved for later. * * Site Kit by Google, 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 ...
2
1
2
mixed
--- a/assets/js/googlesitekit-activation.js +++ b/assets/js/googlesitekit-activation.js @@ -30,3 +30,3 @@ */ -import { loadTranslations } from 'GoogleUtil'; +import { loadTranslations, sendAnalyticsTrackingEvent } from 'GoogleUtil'; import 'GoogleComponents/notifications'; @@ -43,2 +43,3 @@ loadTranslations(); + ...
--- a/assets/js/googlesitekit-activation.js +++ b/assets/js/googlesitekit-activation.js @@ ... @@ */ -import { loadTranslations } from 'GoogleUtil'; +import { loadTranslations, sendAnalyticsTrackingEvent } from 'GoogleUtil'; import 'GoogleComponents/notifications'; @@ ... @@ loadTranslations(); + sendAnalyticsTr...
--- a/assets/js/googlesitekit-activation.js +++ b/assets/js/googlesitekit-activation.js @@ -30,3 +30,3 @@ CON */ DEL import { loadTranslations } from 'GoogleUtil'; ADD import { loadTranslations, sendAnalyticsTrackingEvent } from 'GoogleUtil'; CON import 'GoogleComponents/notifications'; @@ -43,2 +43,3 @@ CON loadTra...
<<<<<<< SEARCH * External dependencies */ import { loadTranslations } from 'GoogleUtil'; import 'GoogleComponents/notifications'; ======= * External dependencies */ import { loadTranslations, sendAnalyticsTrackingEvent } from 'GoogleUtil'; import 'GoogleComponents/notifications'; >>>>>>> REPLACE <<<<<<< SEARCH...
ksmithbaylor/emc-license-summarizer
afa811016080d53be1a5d92527aef3cfa728c55b
src/App/Header.js
javascript
cc0-1.0
Fix header alignment and silliness
import React from 'react'; import Paper from 'material-ui/lib/paper'; import { sideMargin, pageWidth } from 'data/layout'; export default () => ( <div> <Paper rounded={false} zDepth={1} style={barStyle} /> <div style={centerContainerStyle}> <Paper rounded={false} zDepth={2} style={logoStyle}> ...
import React from 'react'; import Paper from 'material-ui/lib/paper'; import { sideMargin, pageWidth } from 'data/layout'; export default () => ( <Paper rounded={false} zDepth={1} style={barStyle}> <div style={centerContainerStyle}> <Paper rounded={false} zDepth={2} style={logoStyle}> <img src="l...
15
20
6
mixed
--- a/src/App/Header.js +++ b/src/App/Header.js @@ -7,4 +7,3 @@ export default () => ( - <div> - <Paper rounded={false} zDepth={1} style={barStyle} /> + <Paper rounded={false} zDepth={1} style={barStyle}> <div style={centerContainerStyle}> @@ -17,7 +16,4 @@ </div> - </div> + </Paper> ); - -const logo...
--- a/src/App/Header.js +++ b/src/App/Header.js @@ ... @@ export default () => ( - <div> - <Paper rounded={false} zDepth={1} style={barStyle} /> + <Paper rounded={false} zDepth={1} style={barStyle}> <div style={centerContainerStyle}> @@ ... @@ </div> - </div> + </Paper> ); - -const logoSide = 6; -con...
--- a/src/App/Header.js +++ b/src/App/Header.js @@ -7,4 +7,3 @@ CON export default () => ( DEL <div> DEL <Paper rounded={false} zDepth={1} style={barStyle} /> ADD <Paper rounded={false} zDepth={1} style={barStyle}> CON <div style={centerContainerStyle}> @@ -17,7 +16,4 @@ CON </div> DEL </div> ADD </...
<<<<<<< SEARCH export default () => ( <div> <Paper rounded={false} zDepth={1} style={barStyle} /> <div style={centerContainerStyle}> <Paper rounded={false} zDepth={2} style={logoStyle}> ======= export default () => ( <Paper rounded={false} zDepth={1} style={barStyle}> <div style={centerContaine...
0xd4d/iced
015012dc3b909831e50e7793f261036f70e2ea6e
src/rust/iced-x86/src/iced_error.rs
rust
mit
Verify that IcedError is Send + Sync
// SPDX-License-Identifier: MIT // Copyright (C) 2018-present iced project and contributors use alloc::borrow::Cow; use alloc::string::String; use core::fmt; #[cfg(feature = "std")] use std::error::Error; /// iced error #[derive(Debug, Clone)] pub struct IcedError { error: Cow<'static, str>, } impl IcedError { #[a...
// SPDX-License-Identifier: MIT // Copyright (C) 2018-present iced project and contributors use alloc::borrow::Cow; use alloc::string::String; use core::fmt; #[cfg(feature = "std")] use std::error::Error; /// iced error #[derive(Debug, Clone)] pub struct IcedError { error: Cow<'static, str>, } struct _TraitsCheck w...
8
0
1
add_only
--- a/src/rust/iced-x86/src/iced_error.rs +++ b/src/rust/iced-x86/src/iced_error.rs @@ -14,2 +14,10 @@ } + +struct _TraitsCheck +where + IcedError: fmt::Debug + Clone + fmt::Display + Send + Sync; +#[cfg(feature = "std")] +struct _TraitsCheckStd +where + IcedError: Error;
--- a/src/rust/iced-x86/src/iced_error.rs +++ b/src/rust/iced-x86/src/iced_error.rs @@ ... @@ } + +struct _TraitsCheck +where + IcedError: fmt::Debug + Clone + fmt::Display + Send + Sync; +#[cfg(feature = "std")] +struct _TraitsCheckStd +where + IcedError: Error;
--- a/src/rust/iced-x86/src/iced_error.rs +++ b/src/rust/iced-x86/src/iced_error.rs @@ -14,2 +14,10 @@ CON } ADD ADD struct _TraitsCheck ADD where ADD IcedError: fmt::Debug + Clone + fmt::Display + Send + Sync; ADD #[cfg(feature = "std")] ADD struct _TraitsCheckStd ADD where ADD IcedError: Error; CON
<<<<<<< SEARCH error: Cow<'static, str>, } impl IcedError { ======= error: Cow<'static, str>, } struct _TraitsCheck where IcedError: fmt::Debug + Clone + fmt::Display + Send + Sync; #[cfg(feature = "std")] struct _TraitsCheckStd where IcedError: Error; impl IcedError { >>>>>>> REPLACE
burnnat/grunt-sauce-driver
5961263d10fa445ee98bc364bd95a74b4a16550e
drivers/siesta.js
javascript
mit
Add some handling to auto-retry failed tests in Siesta. This implementation will also click each failed test row to see the DOM and failed assertions.
/** * Selenium script for running Siesta unit tests. */ module.exports = function(browser, chain, options) { var runButton = '.x-btn a[title="Run all"]'; chain .waitForElementByCss(runButton, options.testReadyTimeout) .elementByCss(runButton, function(err, el) { browser.next('moveTo', el); browser.next(...
/** * Selenium script for running Siesta unit tests. */ module.exports = function(browser, chain, options) { var button = function(title) { return '.x-btn a[title="' + title + '"]'; }; var runAllButton = button('Run all'); var endCondition = '!!Siesta.my.activeHarness.endDate'; chain .waitForElementByCss...
30
5
2
mixed
--- a/drivers/siesta.js +++ b/drivers/siesta.js @@ -4,9 +4,14 @@ module.exports = function(browser, chain, options) { - var runButton = '.x-btn a[title="Run all"]'; + var button = function(title) { + return '.x-btn a[title="' + title + '"]'; + }; + + var runAllButton = button('Run all'); + var endCondition = '!!Sies...
--- a/drivers/siesta.js +++ b/drivers/siesta.js @@ ... @@ module.exports = function(browser, chain, options) { - var runButton = '.x-btn a[title="Run all"]'; + var button = function(title) { + return '.x-btn a[title="' + title + '"]'; + }; + + var runAllButton = button('Run all'); + var endCondition = '!!Siesta.my.a...
--- a/drivers/siesta.js +++ b/drivers/siesta.js @@ -4,9 +4,14 @@ CON module.exports = function(browser, chain, options) { DEL var runButton = '.x-btn a[title="Run all"]'; ADD var button = function(title) { ADD return '.x-btn a[title="' + title + '"]'; ADD }; ADD ADD var runAllButton = button('Run all'); ADD va...
<<<<<<< SEARCH */ module.exports = function(browser, chain, options) { var runButton = '.x-btn a[title="Run all"]'; chain .waitForElementByCss(runButton, options.testReadyTimeout) .elementByCss(runButton, function(err, el) { browser.next('moveTo', el); browser.next('clickElement', el); }) .elementByC...
csperkins/crtp
6efacc72a63af7c8dd35c7e5dd77fe1a823c075d
src/main.rs
rust
bsd-2-clause
Add structs to represent RTCP packets (SR, RR, SDES, BYE)
fn main() { println!("CRTP") }
// ================================================================================================ type SSRC = u32; type RtpTimestamp = u32; type NtpTimestamp = u64; #[deriving(Clone)] struct SenderInfo { ntp_ts : NtpTimestamp, rtp_ts : RtpTimestamp, pckt_count : u32, byte_count : u32 } #[deriving(C...
54
0
2
add_only
--- a/src/main.rs +++ b/src/main.rs @@ -1 +1,53 @@ +// ================================================================================================ + +type SSRC = u32; +type RtpTimestamp = u32; +type NtpTimestamp = u64; + +#[deriving(Clone)] +struct SenderInfo { + ntp_ts : NtpTimestamp, + rtp_ts : RtpTime...
--- a/src/main.rs +++ b/src/main.rs @@ ... @@ +// ================================================================================================ + +type SSRC = u32; +type RtpTimestamp = u32; +type NtpTimestamp = u64; + +#[deriving(Clone)] +struct SenderInfo { + ntp_ts : NtpTimestamp, + rtp_ts : RtpTimestamp...
--- a/src/main.rs +++ b/src/main.rs @@ -1 +1,53 @@ ADD // ================================================================================================ ADD ADD type SSRC = u32; ADD type RtpTimestamp = u32; ADD type NtpTimestamp = u64; ADD ADD #[deriving(Clone)] ADD struct SenderInfo { ADD ntp_ts : NtpTim...
<<<<<<< SEARCH fn main() { println!("CRTP") } ======= // ================================================================================================ type SSRC = u32; type RtpTimestamp = u32; type NtpTimestamp = u64; #[deriving(Clone)] struct SenderInfo { ntp_ts : NtpTimestamp, rtp_ts : RtpTimest...
janis-kra/dropbox-fetch
7b00cb9900a4286b6dc4204660a1f16f59bae321
dropbox-fetch.js
javascript
mit
Return the authorization url when `authorize` fails s.t. the user can manually authorize and set the token in `config.js`
/** * The authorization token with which calls to the API are made. * @type {String} */ let token = ''; /** * Authorize via OAuth 2.0 for Dropbox API calls. * * @parameter {string} clientId your app's key * @parameter {string} redirectUri the uri where the user should be redirected * to, after authorization ha...
/** * The authorization token with which calls to the API are made. * @type {String} */ let token = ''; const AUTHORIZE_ENDPOINT = 'https://www.dropbox.com/oauth2/authorize'; const getAuthorizationUrl = (clientId) => { return AUTHORIZE_ENDPOINT + '?' + 'response_type=token' + 'client_id=' + clientId; }; ...
10
1
2
mixed
--- a/dropbox-fetch.js +++ b/dropbox-fetch.js @@ -5,2 +5,10 @@ let token = ''; + +const AUTHORIZE_ENDPOINT = 'https://www.dropbox.com/oauth2/authorize'; + +const getAuthorizationUrl = (clientId) => { + return AUTHORIZE_ENDPOINT + '?' + + 'response_type=token' + + 'client_id=' + clientId; +}; @@ -17,3 +25,4 @@...
--- a/dropbox-fetch.js +++ b/dropbox-fetch.js @@ ... @@ let token = ''; + +const AUTHORIZE_ENDPOINT = 'https://www.dropbox.com/oauth2/authorize'; + +const getAuthorizationUrl = (clientId) => { + return AUTHORIZE_ENDPOINT + '?' + + 'response_type=token' + + 'client_id=' + clientId; +}; @@ ... @@ return new ...
--- a/dropbox-fetch.js +++ b/dropbox-fetch.js @@ -5,2 +5,10 @@ CON let token = ''; ADD ADD const AUTHORIZE_ENDPOINT = 'https://www.dropbox.com/oauth2/authorize'; ADD ADD const getAuthorizationUrl = (clientId) => { ADD return AUTHORIZE_ENDPOINT + '?' + ADD 'response_type=token' + ADD 'client_id=' + clientId;...
<<<<<<< SEARCH */ let token = ''; /** ======= */ let token = ''; const AUTHORIZE_ENDPOINT = 'https://www.dropbox.com/oauth2/authorize'; const getAuthorizationUrl = (clientId) => { return AUTHORIZE_ENDPOINT + '?' + 'response_type=token' + 'client_id=' + clientId; }; /** >>>>>>> REPLACE <<<<<<< SEARCH ...
kryptnostic/rhizome
61c53b5c19cbe54179b018f885622a2878718251
src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java
java
apache-2.0
Fix NPE if no auth info provided
package digital.loom.rhizome.authentication; import java.util.regex.Pattern; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import com.auth0.jwt.internal.org.apache.commons.lang3.StringUtils; import com.auth0.spring.security.api.Auth0AuthenticationFilter; import com.google.common.bas...
package digital.loom.rhizome.authentication; import java.util.regex.Pattern; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import com.auth0.jwt.internal.org.apache.commons.lang3.StringUtils; import com.auth0.spring.security.api.Auth0AuthenticationFilter; import com.google.common.bas...
6
3
1
mixed
--- a/src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java +++ b/src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java @@ -25,5 +25,8 @@ - final String authorizationHeader = httpRequest.getHeader( "authorization" ); - - fin...
--- a/src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java +++ b/src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java @@ ... @@ - final String authorizationHeader = httpRequest.getHeader( "authorization" ); - - final Strin...
--- a/src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java +++ b/src/main/java/digital/loom/rhizome/authentication/CookieReadingAuth0AuthenticationFilter.java @@ -25,5 +25,8 @@ CON DEL final String authorizationHeader = httpRequest.getHeader( "authorization" ); DEL DEL...
<<<<<<< SEARCH } final String authorizationHeader = httpRequest.getHeader( "authorization" ); final String[] parts = MoreObjects.firstNonNull( authorizationHeader, authorizationCookie ).split( " " ); if ( parts.length != 2 ) { // "Unauthorized: Format is Authorization: Bear...
premkumarbalu/scsb-etl
baed73a969b8f255093b71c94d4c4a4e0af426c7
src/main/java/org/recap/route/XMLFileLoadValidator.java
java
apache-2.0
Check to validated xml file has been loaded already; if so, dont load it again.
package org.recap.route; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.impl.DefaultMessage; import org.recap.model.jpa.ReportEntity; import org.recap.repository.ReportDetailRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframewo...
package org.recap.route; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.impl.DefaultMessage; import org.recap.model.jpa.ReportEntity; import org.recap.repository.ReportDetailRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframewo...
6
0
1
add_only
--- a/src/main/java/org/recap/route/XMLFileLoadValidator.java +++ b/src/main/java/org/recap/route/XMLFileLoadValidator.java @@ -22,2 +22,8 @@ + /** + * Check to see if the xml file has been loaded already. If so, set empty body such that the file doesn't get + * processed again. + * @param exchange + ...
--- a/src/main/java/org/recap/route/XMLFileLoadValidator.java +++ b/src/main/java/org/recap/route/XMLFileLoadValidator.java @@ ... @@ + /** + * Check to see if the xml file has been loaded already. If so, set empty body such that the file doesn't get + * processed again. + * @param exchange + * @th...
--- a/src/main/java/org/recap/route/XMLFileLoadValidator.java +++ b/src/main/java/org/recap/route/XMLFileLoadValidator.java @@ -22,2 +22,8 @@ CON ADD /** ADD * Check to see if the xml file has been loaded already. If so, set empty body such that the file doesn't get ADD * processed again. ADD * @par...
<<<<<<< SEARCH ReportDetailRepository reportDetailRepository; @Override public void process(Exchange exchange) throws Exception { ======= ReportDetailRepository reportDetailRepository; /** * Check to see if the xml file has been loaded already. If so, set empty body such that the file doesn'...
graydon/rust
1b681d6652bacce6b741ca66725f25b9afb16bc8
src/test/ui/if-attrs/cfg-false-if-attr.rs
rust
apache-2.0
Test that cfg-gated if-exprs are not type-checked
// check-pass #[cfg(FALSE)] fn simple_attr() { #[attr] if true {} #[allow_warnings] if true {} } #[cfg(FALSE)] fn if_else_chain() { #[first_attr] if true { } else if false { } else { } } #[cfg(FALSE)] fn if_let() { #[attr] if let Some(_) = Some(true) {} } macro_rules! custom_macro { ...
// check-pass #[cfg(FALSE)] fn simple_attr() { #[attr] if true {} #[allow_warnings] if true {} } #[cfg(FALSE)] fn if_else_chain() { #[first_attr] if true { } else if false { } else { } } #[cfg(FALSE)] fn if_let() { #[attr] if let Some(_) = Some(true) {} } fn bar() { #[cfg(FALSE)] ...
12
0
1
add_only
--- a/src/test/ui/if-attrs/cfg-false-if-attr.rs +++ b/src/test/ui/if-attrs/cfg-false-if-attr.rs @@ -21,2 +21,14 @@ +fn bar() { + #[cfg(FALSE)] + if true { + let x: () = true; // Should not error due to the #[cfg(FALSE)] + } + + #[cfg_attr(not(unset_attr), cfg(FALSE))] + if true { + let a:...
--- a/src/test/ui/if-attrs/cfg-false-if-attr.rs +++ b/src/test/ui/if-attrs/cfg-false-if-attr.rs @@ ... @@ +fn bar() { + #[cfg(FALSE)] + if true { + let x: () = true; // Should not error due to the #[cfg(FALSE)] + } + + #[cfg_attr(not(unset_attr), cfg(FALSE))] + if true { + let a: () = tru...
--- a/src/test/ui/if-attrs/cfg-false-if-attr.rs +++ b/src/test/ui/if-attrs/cfg-false-if-attr.rs @@ -21,2 +21,14 @@ CON ADD fn bar() { ADD #[cfg(FALSE)] ADD if true { ADD let x: () = true; // Should not error due to the #[cfg(FALSE)] ADD } ADD ADD #[cfg_attr(not(unset_attr), cfg(FALSE))] ADD ...
<<<<<<< SEARCH } macro_rules! custom_macro { ($expr:expr) => {} ======= } fn bar() { #[cfg(FALSE)] if true { let x: () = true; // Should not error due to the #[cfg(FALSE)] } #[cfg_attr(not(unset_attr), cfg(FALSE))] if true { let a: () = true; // Should not error due to the ap...
AcornUI/Acorn
82b02fa0f86aac1dea7b91971af341f7a5111bbf
acornui-spine/build.gradle.kts
kotlin
apache-2.0
Refactor acornui-spine to use 'basic' plugin
/* * Copyright 2019 PolyForest * * 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 i...
/* * Copyright 2019 PolyForest * * 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 i...
1
57
4
mixed
--- a/acornui-spine/build.gradle.kts +++ b/acornui-spine/build.gradle.kts @@ -17,3 +17,3 @@ plugins { - kotlin("multiplatform") + id("com.polyforest.acornui.basic") `maven-publish` @@ -21,31 +21,3 @@ -val KOTLIN_LANGUAGE_VERSION: String by extra -val KOTLIN_JVM_TARGET: String by extra kotlin { - js { ...
--- a/acornui-spine/build.gradle.kts +++ b/acornui-spine/build.gradle.kts @@ ... @@ plugins { - kotlin("multiplatform") + id("com.polyforest.acornui.basic") `maven-publish` @@ ... @@ -val KOTLIN_LANGUAGE_VERSION: String by extra -val KOTLIN_JVM_TARGET: String by extra kotlin { - js { - compilat...
--- a/acornui-spine/build.gradle.kts +++ b/acornui-spine/build.gradle.kts @@ -17,3 +17,3 @@ CON plugins { DEL kotlin("multiplatform") ADD id("com.polyforest.acornui.basic") CON `maven-publish` @@ -21,31 +21,3 @@ CON DEL val KOTLIN_LANGUAGE_VERSION: String by extra DEL val KOTLIN_JVM_TARGET: String by extra...
<<<<<<< SEARCH plugins { kotlin("multiplatform") `maven-publish` } val KOTLIN_LANGUAGE_VERSION: String by extra val KOTLIN_JVM_TARGET: String by extra kotlin { js { compilations.all { kotlinOptions { moduleKind = "amd" sourceMap = true so...
lise-henry/crowbook
9758f93d932ef8583c625eeca5563b03f69143b5
src/lib/misc.rs
rust
lgpl-2.1
Remove current directory from begginnig of displayed paths
// Copyright (C) 2016 Élisabeth HENRY. // // This file is part of Crowbook. // // Crowbook is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, either version 2.1 of the License, or // (at your option) any...
// Copyright (C) 2016 Élisabeth HENRY. // // This file is part of Crowbook. // // Crowbook is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, either version 2.1 of the License, or // (at your option) any...
12
3
2
mixed
--- a/src/lib/misc.rs +++ b/src/lib/misc.rs @@ -21,2 +21,3 @@ use std::path::Path; +use std::io::Result; @@ -25,7 +26,15 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> String { - if let Ok(path) = std::fs::canonicalize(path.as_ref()) { + try_canonicalize(path.as_ref()) + .unwrap_or(format!("{}", pa...
--- a/src/lib/misc.rs +++ b/src/lib/misc.rs @@ ... @@ use std::path::Path; +use std::io::Result; @@ ... @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> String { - if let Ok(path) = std::fs::canonicalize(path.as_ref()) { + try_canonicalize(path.as_ref()) + .unwrap_or(format!("{}", path.as_ref().displ...
--- a/src/lib/misc.rs +++ b/src/lib/misc.rs @@ -21,2 +21,3 @@ CON use std::path::Path; ADD use std::io::Result; CON @@ -25,7 +26,15 @@ CON pub fn canonicalize<P: AsRef<Path>>(path: P) -> String { DEL if let Ok(path) = std::fs::canonicalize(path.as_ref()) { ADD try_canonicalize(path.as_ref()) ADD .unwra...
<<<<<<< SEARCH use std; use std::path::Path; /// Try to canonicalize a path using std::fs::canonicalize, and returns the /// unmodified path if it fails (e.g. if the path doesn't exist (yet)) pub fn canonicalize<P: AsRef<Path>>(path: P) -> String { if let Ok(path) = std::fs::canonicalize(path.as_ref()) { f...
jean79/yested_fw
a875db9ef0304d20c80231d94df39af68a9c3c61
src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt
kotlin
mit
Add test to try and diagnose why format string isn't being honored.
package net.yested.ext.bootstrap3 import net.yested.core.properties.Property import net.yested.core.properties.toProperty import net.yested.ext.bootstrap3.utils.* import org.junit.Test import spec.* /** * A test for [dateInput], etc. * @author Eric Pabst (epabst@gmail.com) * Date: 9/29/16 * Time: 1:51 PM */ clas...
package net.yested.ext.bootstrap3 import net.yested.core.properties.Property import net.yested.core.properties.toProperty import net.yested.ext.bootstrap3.utils.* import org.junit.Test import spec.* /** * A test for [dateInput], etc. * @author Eric Pabst (epabst@gmail.com) * Date: 9/29/16 * Time: 1:51 PM */ clas...
12
0
1
add_only
--- a/src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt +++ b/src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt @@ -31,2 +31,14 @@ } + + @Test + fun MomentProperty_asText_shouldUseFormatString() { + val builder = FormatStringBuilder() + + val inputFormatString = (builder.month.oneDigi...
--- a/src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt +++ b/src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt @@ ... @@ } + + @Test + fun MomentProperty_asText_shouldUseFormatString() { + val builder = FormatStringBuilder() + + val inputFormatString = (builder.month.oneDigit + "/" +...
--- a/src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt +++ b/src/test/kotlin/net/yested/ext/bootstrap3/InputTest.kt @@ -31,2 +31,14 @@ CON } ADD ADD @Test ADD fun MomentProperty_asText_shouldUseFormatString() { ADD val builder = FormatStringBuilder() ADD ADD val inputFormatString = (...
<<<<<<< SEARCH text.get().mustContain(thisYear.toString()) } } ======= text.get().mustContain(thisYear.toString()) } @Test fun MomentProperty_asText_shouldUseFormatString() { val builder = FormatStringBuilder() val inputFormatString = (builder.month.oneDigit + "/" + bu...
angus-ai/angus-sdk-python
a53612d5f276180d204378b9e4974fcd812f6a5b
tests/fake_camera.py
python
apache-2.0
Add licence header in fake camera test file.
from os import listdir from os.path import isfile, join class Camera(object): def __init__(self, path): self.files = [join(path, f) for f in listdir(path)] self.files = sorted([f for f in self.files if isfile(f)]) self.current = 0 def reset(self): self.current = 0 def ha...
# -*- coding: utf-8 -*- # 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 # ...
19
0
1
add_only
--- a/tests/fake_camera.py +++ b/tests/fake_camera.py @@ -1 +1,20 @@ +# -*- coding: utf-8 -*- + +# 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 AS...
--- a/tests/fake_camera.py +++ b/tests/fake_camera.py @@ ... @@ +# -*- coding: utf-8 -*- + +# 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 lic...
--- a/tests/fake_camera.py +++ b/tests/fake_camera.py @@ -1 +1,20 @@ ADD # -*- coding: utf-8 -*- ADD ADD # Licensed to the Apache Software Foundation (ASF) under one ADD # or more contributor license agreements. See the NOTICE file ADD # distributed with this work for additional information ADD # regarding copyright ...
<<<<<<< SEARCH from os import listdir from os.path import isfile, join ======= # -*- coding: utf-8 -*- # 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. T...
nbigaouette/rust-sorting
33390f257dbc8d614f93354d0c7d3196106ea0bd
src/efficientsorts/quick.rs
rust
bsd-3-clause
Implement n = 1, n = 2 special cases
//! Quicksort algorithm. //! //! The `efficient` module contains the efficient sorting algorithm "Quicksort". //! //! Source: https://en.wikipedia.org/wiki/Quicksort /// Quicksort /// /// # Details /// /// /// /// # Scaling /// /// /// /// # Optimizations /// /// None /// /// # Notes /// /// The type T of the vector ...
//! Quicksort algorithm. //! //! The `efficient` module contains the efficient sorting algorithm "Quicksort". //! //! Source: https://en.wikipedia.org/wiki/Quicksort /// Quicksort /// /// # Details /// /// /// /// # Scaling /// /// /// /// # Optimizations /// /// None /// /// # Notes /// /// The type T of the vector ...
14
1
1
mixed
--- a/src/efficientsorts/quick.rs +++ b/src/efficientsorts/quick.rs @@ -35,3 +35,16 @@ pub fn sort<T: PartialOrd>(array: &mut Vec<T>) { - unimplemented!(); + let n = array.len(); + + if n <= 1 { + return; + } else if n == 2 { + if array.first() <= array.last() { + return; + ...
--- a/src/efficientsorts/quick.rs +++ b/src/efficientsorts/quick.rs @@ ... @@ pub fn sort<T: PartialOrd>(array: &mut Vec<T>) { - unimplemented!(); + let n = array.len(); + + if n <= 1 { + return; + } else if n == 2 { + if array.first() <= array.last() { + return; + } else { ...
--- a/src/efficientsorts/quick.rs +++ b/src/efficientsorts/quick.rs @@ -35,3 +35,16 @@ CON pub fn sort<T: PartialOrd>(array: &mut Vec<T>) { DEL unimplemented!(); ADD let n = array.len(); ADD ADD if n <= 1 { ADD return; ADD } else if n == 2 { ADD if array.first() <= array.last() { ADD ...
<<<<<<< SEARCH /// pub fn sort<T: PartialOrd>(array: &mut Vec<T>) { unimplemented!(); } ======= /// pub fn sort<T: PartialOrd>(array: &mut Vec<T>) { let n = array.len(); if n <= 1 { return; } else if n == 2 { if array.first() <= array.last() { return; } else { ...
aquatir/remember_java_api
c7b60080e3bd026ec75721c98e2df356bf22f026
code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt
kotlin
mit
Add kotlin object/function extension example
package codesample.kotlin.sandbox.classes interface One { fun doSomething() { println("One flying!") } } interface Two { fun doSomething() { println("Two flying!") } } /** * If both interfaces have a method with the same signature, you ccan override it once. * You can also call res...
package codesample.kotlin.sandbox.classes interface One { fun doSomething() { println("One flying!") } } interface Two { fun doSomething() { println("Two flying!") } } /** * If both interfaces have a method with the same signature, you ccan override it once. * You can also call res...
26
0
3
add_only
--- a/code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt +++ b/code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt @@ -24,2 +24,11 @@ } + + /** + * Kotlin's way to static methoods is companion objects! + */ + companion...
--- a/code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt +++ b/code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt @@ ... @@ } + + /** + * Kotlin's way to static methoods is companion objects! + */ + companion object {...
--- a/code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt +++ b/code-sample-kotlin/src/codesample/kotlin/sandbox/classes/ClassesSortOfMultipleInheritance.kt @@ -24,2 +24,11 @@ CON } ADD ADD /** ADD * Kotlin's way to static methoods is companion objects! ADD */...
<<<<<<< SEARCH super<Two>.doSomething() } } ======= super<Two>.doSomething() } /** * Kotlin's way to static methoods is companion objects! */ companion object { fun behaveLikeStaticButItsNot() { println("I'm not actually static") } } } >>>>>...
sipXtapi/sipXtapi-svn-mirror
52dfd59bea84a6cd434f6192fc812aabbe6dfccb
sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java
java
lgpl-2.1
FIX BUILD: Unit test assumed polycom authid was first visible on page git-svn-id: f26ccc5efe72c2bd8e1c40f599fe313f2692e4de@7583 a612230a-c5fa-0310-af8b-88eea846685b
/* * * * Copyright (C) 2004 SIPfoundry Inc. * Licensed by SIPfoundry under the LGPL license. * * Copyright (C) 2004 Pingtel Corp. * Licensed to SIPfoundry under a Contributor Agreement. * * $ */ package org.sipfoundry.sipxconfig.site.phone.polycom; import junit.framework.Test; import net.sourceforge.jweb...
/* * * * Copyright (C) 2004 SIPfoundry Inc. * Licensed by SIPfoundry under the LGPL license. * * Copyright (C) 2004 Pingtel Corp. * Licensed to SIPfoundry under a Contributor Agreement. * * $ */ package org.sipfoundry.sipxconfig.site.phone.polycom; import junit.framework.Test; import net.sourceforge.jweb...
2
0
2
add_only
--- a/sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java +++ b/sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java @@ -41,2 +41,3 @@ m_helper.seedLine(1); + SiteTestHelper.setScriptingEnabled(true); clickLink("Mana...
--- a/sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java +++ b/sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java @@ ... @@ m_helper.seedLine(1); + SiteTestHelper.setScriptingEnabled(true); clickLink("ManagePhones...
--- a/sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java +++ b/sipXconfig/web/test/org/sipfoundry/sipxconfig/site/phone/polycom/PasswordSettingTestUi.java @@ -41,2 +41,3 @@ CON m_helper.seedLine(1); ADD SiteTestHelper.setScriptingEnabled(true); CON clickL...
<<<<<<< SEARCH public void testEditSipSetttings() { m_helper.seedLine(1); clickLink("ManagePhones"); clickLinkWithText(SiteTestHelper.TEST_USER); clickLinkWithText("Registration"); Element passwordField = getDialog().getElement("setting:auth.password"); ...
sswierczek/Helix-Movie-Guide-Android
4b0478ba8f20af534c1b8fe02eae794a8b8cd0f9
app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt
kotlin
apache-2.0
Fix issue with blinking list on infinite scroll data reload
package com.androidmess.helix.discover.view import android.support.v7.widget.RecyclerView import android.view.View import android.view.ViewGroup import com.androidmess.helix.R import com.androidmess.helix.common.ui.recyclerview.RecyclerViewItemSizeCalculator import com.androidmess.helix.common.ui.view.inflate import c...
package com.androidmess.helix.discover.view import android.support.v7.widget.RecyclerView import android.view.View import android.view.ViewGroup import com.androidmess.helix.R import com.androidmess.helix.common.ui.recyclerview.RecyclerViewItemSizeCalculator import com.androidmess.helix.common.ui.view.inflate import c...
1
1
1
mixed
--- a/app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt +++ b/app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt @@ -29,3 +29,3 @@ data.addAll(movies) - notifyDataSetChanged() + notifyItemRangeInserted(data.size - 1, movies.size) }
--- a/app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt +++ b/app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt @@ ... @@ data.addAll(movies) - notifyDataSetChanged() + notifyItemRangeInserted(data.size - 1, movies.size) }
--- a/app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt +++ b/app/src/main/kotlin/com/androidmess/helix/discover/view/DiscoverAdapter.kt @@ -29,3 +29,3 @@ CON data.addAll(movies) DEL notifyDataSetChanged() ADD notifyItemRangeInserted(data.size - 1, movies.size) CON }...
<<<<<<< SEARCH fun addData(movies: List<DiscoverMovieViewModel>) { data.addAll(movies) notifyDataSetChanged() } ======= fun addData(movies: List<DiscoverMovieViewModel>) { data.addAll(movies) notifyItemRangeInserted(data.size - 1, movies.size) } >>>>>>> REPLACE
4minitz/4minitz
d995749a6fd4d44cb5fb92a15766c7eeef566f38
imports/collections/onlineusers_private.js
javascript
mit
Use `upsert` method of schema class
import { Meteor } from 'meteor/meteor'; import { OnlineUsersSchema } from './onlineusers.schema'; import moment from 'moment/moment'; if (Meteor.isServer) { Meteor.publish('onlineUsersForRoute', function (route) { return OnlineUsersSchema.find({activeRoute: route}); }); } const checkRouteParamAndAutho...
import { Meteor } from 'meteor/meteor'; import { OnlineUsersSchema } from './onlineusers.schema'; import moment from 'moment/moment'; if (Meteor.isServer) { Meteor.publish('onlineUsersForRoute', function (route) { return OnlineUsersSchema.find({activeRoute: route}); }); } const checkRouteParamAndAutho...
4
13
1
mixed
--- a/imports/collections/onlineusers_private.js +++ b/imports/collections/onlineusers_private.js @@ -22,15 +22,6 @@ - const doc = { - userId: userId, - activeRoute:route, - updatedAt: new Date() - }; - const selector = { userId: userId, activeRoute:route }; - ...
--- a/imports/collections/onlineusers_private.js +++ b/imports/collections/onlineusers_private.js @@ ... @@ - const doc = { - userId: userId, - activeRoute:route, - updatedAt: new Date() - }; - const selector = { userId: userId, activeRoute:route }; - const...
--- a/imports/collections/onlineusers_private.js +++ b/imports/collections/onlineusers_private.js @@ -22,15 +22,6 @@ CON DEL const doc = { DEL userId: userId, DEL activeRoute:route, DEL updatedAt: new Date() DEL }; DEL const selector = { userId: userId, activ...
<<<<<<< SEARCH checkRouteParamAndAuthorization(route, userId); const doc = { userId: userId, activeRoute:route, updatedAt: new Date() }; const selector = { userId: userId, activeRoute:route }; const existingDoc = OnlineUsersSchema.findOne(sele...
matthiasbeyer/imag
455d6e88ed49c62e100b0153474a18b39fa47b48
src/module/bm/header.rs
rust
lgpl-2.1
Use real array instead of text array to save tags
use storage::file::FileHeaderSpec as FHS; use storage::file::FileHeaderData as FHD; pub fn get_spec() -> FHS { FHS::Map { keys: vec![ url_key(), tags_key() ] } } fn url_key() -> FHS { FHS::Key { name: String::from("URL"), value_type: Box::new(FHS::Text) } } fn tags_key() -> FHS { FHS::Key { name: String:...
use storage::file::FileHeaderSpec as FHS; use storage::file::FileHeaderData as FHD; pub fn get_spec() -> FHS { FHS::Map { keys: vec![ url_key(), tags_key() ] } } fn url_key() -> FHS { FHS::Key { name: String::from("URL"), value_type: Box::new(FHS::Text) } } fn tags_key() -> FHS { FHS::Key { name: String:...
6
1
2
mixed
--- a/src/module/bm/header.rs +++ b/src/module/bm/header.rs @@ -29,3 +29,3 @@ name: String::from("TAGS"), - value: Box::new(FHD::Text(tags.connect(","))) + value: Box::new(build_tag_array(tags)) } @@ -35 +35,6 @@ +fn build_tag_array(tags: &Vec<String>) -> FH...
--- a/src/module/bm/header.rs +++ b/src/module/bm/header.rs @@ ... @@ name: String::from("TAGS"), - value: Box::new(FHD::Text(tags.connect(","))) + value: Box::new(build_tag_array(tags)) } @@ ... @@ +fn build_tag_array(tags: &Vec<String>) -> FHD { + let t...
--- a/src/module/bm/header.rs +++ b/src/module/bm/header.rs @@ -29,3 +29,3 @@ CON name: String::from("TAGS"), DEL value: Box::new(FHD::Text(tags.connect(","))) ADD value: Box::new(build_tag_array(tags)) CON } @@ -35 +35,6 @@ CON ADD fn build_tag_array(tags: &...
<<<<<<< SEARCH FHD::Key { name: String::from("TAGS"), value: Box::new(FHD::Text(tags.connect(","))) } ] } } ======= FHD::Key { name: String::from("TAGS"), value: Box::new(build_tag_array(tags)) ...
RubiginousChanticleer/rubiginouschanticleer
c8728e67698b49d3ead29d1d09824af5a218df79
server/sessions_users/sessions_users.js
javascript
mpl-2.0
Refactor stub into real query
var db = require( '../config/db' ); var helpers = require( '../config/helpers' ); var Sequelize = require( 'sequelize' ); var User = require( '../users/users' ); var Session = require( '../sessions/sessions' ); var Session_User = db.define( 'sessions_users', { user_id: { type: Sequelize.INTEGER, unique: 'sess...
var db = require( '../config/db' ); var helpers = require( '../config/helpers' ); var Sequelize = require( 'sequelize' ); var User = require( '../users/users' ); var Session = require( '../sessions/sessions' ); var Session_User = db.define( 'sessions_users', { user_id: { type: Sequelize.INTEGER, unique: 'sess...
4
11
1
mixed
--- a/server/sessions_users/sessions_users.js +++ b/server/sessions_users/sessions_users.js @@ -35,13 +35,6 @@ Session_User.countUsersInOneSession = function( sessionID ) { - /* STUB FOR TESTING, REMOVE WHEN THIS FUNCTION IS IMPLEMENTED */ - return { - then: function( resolve ) { - if( sessionID == 1 ) { - ...
--- a/server/sessions_users/sessions_users.js +++ b/server/sessions_users/sessions_users.js @@ ... @@ Session_User.countUsersInOneSession = function( sessionID ) { - /* STUB FOR TESTING, REMOVE WHEN THIS FUNCTION IS IMPLEMENTED */ - return { - then: function( resolve ) { - if( sessionID == 1 ) { - res...
--- a/server/sessions_users/sessions_users.js +++ b/server/sessions_users/sessions_users.js @@ -35,13 +35,6 @@ CON Session_User.countUsersInOneSession = function( sessionID ) { DEL /* STUB FOR TESTING, REMOVE WHEN THIS FUNCTION IS IMPLEMENTED */ DEL return { DEL then: function( resolve ) { DEL if( session...
<<<<<<< SEARCH Session_User.countUsersInOneSession = function( sessionID ) { /* STUB FOR TESTING, REMOVE WHEN THIS FUNCTION IS IMPLEMENTED */ return { then: function( resolve ) { if( sessionID == 1 ) { resolve( 2 ); } else { resolve( 0 ); } } } /* END STUB */ }; ====...
DanielMartinus/Stepper-Touch
5165c5fc8b06ed33cc28bf06de4bcfc5cfc87920
app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt
kotlin
apache-2.0
Add 100 items to the list
package nl.dionsegijn.steppertouchdemo.recyclerview import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager import com.xwray.groupie.GroupieAdapter import kotlinx.and...
package nl.dionsegijn.steppertouchdemo.recyclerview import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager import com.xwray.groupie.GroupieAdapter import kotlinx.and...
7
17
2
mixed
--- a/app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt +++ b/app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt @@ -10,2 +10,3 @@ import kotlinx.android.synthetic.main.fragment_recycler_view.recyclerView +import nl.dionsegijn.steppertouch.StepperT...
--- a/app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt +++ b/app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt @@ ... @@ import kotlinx.android.synthetic.main.fragment_recycler_view.recyclerView +import nl.dionsegijn.steppertouch.StepperTouch im...
--- a/app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt +++ b/app/src/main/java/nl/dionsegijn/steppertouchdemo/recyclerview/RecyclerViewFragment.kt @@ -10,2 +10,3 @@ CON import kotlinx.android.synthetic.main.fragment_recycler_view.recyclerView ADD import nl.dionsegijn.steppertouch.St...
<<<<<<< SEARCH import com.xwray.groupie.GroupieAdapter import kotlinx.android.synthetic.main.fragment_recycler_view.recyclerView import nl.dionsegijn.steppertouchdemo.R import nl.dionsegijn.steppertouchdemo.recyclerview.items.StepperTouchItem ======= import com.xwray.groupie.GroupieAdapter import kotlinx.android.synth...
pidah/st2contrib
d8b477083866a105947281ca34cb6e215417f44d
packs/salt/actions/lib/utils.py
python
apache-2.0
Make distinction between local and runner action payload templates. Added small description for sanitizing the NetAPI payload for logging.
import yaml action_meta = { "name": "", "parameters": { "action": { "type": "string", "immutable": True, "default": "" }, "kwargs": { "type": "object", "required": False } }, "runner_type": "run-python", "de...
# pylint: disable=line-too-long import yaml from .meta import actions runner_action_meta = { "name": "", "parameters": { "action": { "type": "string", "immutable": True, "default": "" }, "kwargs": { "type": "object", "required...
41
9
3
mixed
--- a/packs/salt/actions/lib/utils.py +++ b/packs/salt/actions/lib/utils.py @@ -1,4 +1,7 @@ +# pylint: disable=line-too-long + import yaml +from .meta import actions -action_meta = { +runner_action_meta = { "name": "", @@ -20,12 +23,37 @@ +local_action_meta = { + "name": "", + "parameters": { + "...
--- a/packs/salt/actions/lib/utils.py +++ b/packs/salt/actions/lib/utils.py @@ ... @@ +# pylint: disable=line-too-long + import yaml +from .meta import actions -action_meta = { +runner_action_meta = { "name": "", @@ ... @@ +local_action_meta = { + "name": "", + "parameters": { + "action": { + ...
--- a/packs/salt/actions/lib/utils.py +++ b/packs/salt/actions/lib/utils.py @@ -1,4 +1,7 @@ ADD # pylint: disable=line-too-long ADD CON import yaml ADD from .meta import actions CON DEL action_meta = { ADD runner_action_meta = { CON "name": "", @@ -20,12 +23,37 @@ CON ADD local_action_meta = { ADD "name": ""...
<<<<<<< SEARCH import yaml action_meta = { "name": "", "parameters": { ======= # pylint: disable=line-too-long import yaml from .meta import actions runner_action_meta = { "name": "", "parameters": { >>>>>>> REPLACE <<<<<<< SEARCH "entry_point": "runner.py"} def generate_action(module_type, ...
crshnburn/rtc-slack-bot
f30e75750bb80efb8b922c876b3ec6e9c2e8b433
app.js
javascript
apache-2.0
Use attachments for individual work items, all in the same reply.
/*eslint-env node*/ //------------------------------------------------------------------------------ // node.js starter application for Bluemix //------------------------------------------------------------------------------ // cfenv provides access to your Cloud Foundry environment // for more info, see: https://www...
/*eslint-env node*/ //------------------------------------------------------------------------------ // node.js starter application for Bluemix //------------------------------------------------------------------------------ // cfenv provides access to your Cloud Foundry environment // for more info, see: https://www...
13
1
1
mixed
--- a/app.js +++ b/app.js @@ -28,5 +28,17 @@ var matches = message.text.match(/(task|story|epic|defect) (\d*)/ig) + var attachments = []; for(var i=0; i < matches.length; i++){ var id = matches[i].split(" ")[1] - bot.reply(message, process.env.JAZZ_URI + "/resource/itemName/com.ibm.team.workitem.WorkItem...
--- a/app.js +++ b/app.js @@ ... @@ var matches = message.text.match(/(task|story|epic|defect) (\d*)/ig) + var attachments = []; for(var i=0; i < matches.length; i++){ var id = matches[i].split(" ")[1] - bot.reply(message, process.env.JAZZ_URI + "/resource/itemName/com.ibm.team.workitem.WorkItem/"+id) + ...
--- a/app.js +++ b/app.js @@ -28,5 +28,17 @@ CON var matches = message.text.match(/(task|story|epic|defect) (\d*)/ig) ADD var attachments = []; CON for(var i=0; i < matches.length; i++){ CON var id = matches[i].split(" ")[1] DEL bot.reply(message, process.env.JAZZ_URI + "/resource/itemName/com.ibm.team.wo...
<<<<<<< SEARCH controller.hears(['(task|story|epic|defect) (\d*)'],'ambient',function(bot, message){ var matches = message.text.match(/(task|story|epic|defect) (\d*)/ig) for(var i=0; i < matches.length; i++){ var id = matches[i].split(" ")[1] bot.reply(message, process.env.JAZZ_URI + "/resource/itemName/com...
ibinti/intellij-community
2b896b891010fca83736ec459c3642bf04115c33
plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java
java
apache-2.0
Remove unnecessary getting of read action.
/* * Copyright 2000-2009 JetBrains s.r.o. * * 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 agre...
/* * Copyright 2000-2009 JetBrains s.r.o. * * 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 agre...
2
10
2
mixed
--- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java @@ -17,4 +17,2 @@ -import com.intellij.openapi.application.AccessToken; -import com.intellij.openapi.application.Applicati...
--- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java @@ ... @@ -import com.intellij.openapi.application.AccessToken; -import com.intellij.openapi.application.ApplicationManage...
--- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenProblemFileHighlighter.java @@ -17,4 +17,2 @@ CON DEL import com.intellij.openapi.application.AccessToken; DEL import com.intellij.openapi.application....
<<<<<<< SEARCH package org.jetbrains.idea.maven.utils; import com.intellij.openapi.application.AccessToken; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Condition; ======= package org.jetbrains.idea.maven.utils; import com.i...
sussol/mobile
54e1031eb6009a06e4dfbac062b96aa73f5099fb
src/actions/Entities/LocationActions.js
javascript
mit
Add location action updates for saving and resetting
import { generateUUID } from 'react-native-database'; import { selectNewLocationId } from '../../selectors/Entities/location'; export const LOCATION_ACTIONS = { CREATE: 'LOCATION/create', UPDATE: 'LOCATION/update', SAVE_NEW: 'LOCATION/saveNew', }; const createDefaultLocation = () => ({ id: generateUUID(), d...
import { generateUUID } from 'react-native-database'; import { selectNewLocationId } from '../../selectors/Entities/location'; export const LOCATION_ACTIONS = { CREATE: 'LOCATION/create', UPDATE: 'LOCATION/update', SAVE_NEW: 'LOCATION/saveNew', SAVE_EDITING: 'LOCATION/saveEditing', RESET: 'LOCATION/reset', }...
14
1
4
mixed
--- a/src/actions/Entities/LocationActions.js +++ b/src/actions/Entities/LocationActions.js @@ -7,2 +7,4 @@ SAVE_NEW: 'LOCATION/saveNew', + SAVE_EDITING: 'LOCATION/saveEditing', + RESET: 'LOCATION/reset', }; @@ -17,3 +19,7 @@ type: LOCATION_ACTIONS.CREATE, - payload: createDefaultLocation(), + payload: { loc...
--- a/src/actions/Entities/LocationActions.js +++ b/src/actions/Entities/LocationActions.js @@ ... @@ SAVE_NEW: 'LOCATION/saveNew', + SAVE_EDITING: 'LOCATION/saveEditing', + RESET: 'LOCATION/reset', }; @@ ... @@ type: LOCATION_ACTIONS.CREATE, - payload: createDefaultLocation(), + payload: { location: createD...
--- a/src/actions/Entities/LocationActions.js +++ b/src/actions/Entities/LocationActions.js @@ -7,2 +7,4 @@ CON SAVE_NEW: 'LOCATION/saveNew', ADD SAVE_EDITING: 'LOCATION/saveEditing', ADD RESET: 'LOCATION/reset', CON }; @@ -17,3 +19,7 @@ CON type: LOCATION_ACTIONS.CREATE, DEL payload: createDefaultLocation(),...
<<<<<<< SEARCH UPDATE: 'LOCATION/update', SAVE_NEW: 'LOCATION/saveNew', }; ======= UPDATE: 'LOCATION/update', SAVE_NEW: 'LOCATION/saveNew', SAVE_EDITING: 'LOCATION/saveEditing', RESET: 'LOCATION/reset', }; >>>>>>> REPLACE <<<<<<< SEARCH const create = () => ({ type: LOCATION_ACTIONS.CREATE, payload...
InseeFr/Pogues-Back-Office
fd6fd3e24277010aec1064a542d7c43b3d3cdd65
src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java
java
mit
Use value declarations instead of env injection
package fr.insee.pogues.transforms; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.util.EntityUtils; import org.springframework.beans.factory.annotation.Autowired; import o...
package fr.insee.pogues.transforms; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.util.EntityUtils; import org.springframework.beans.factory.annotation.Autowired; import o...
2
10
2
mixed
--- a/src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java +++ b/src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java @@ -8,6 +8,5 @@ import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.env.Environment; +import org.springframework.beans.factory.annota...
--- a/src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java +++ b/src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java @@ ... @@ import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.env.Environment; +import org.springframework.beans.factory.annotation.V...
--- a/src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java +++ b/src/main/java/fr/insee/pogues/transforms/StromaeServiceImpl.java @@ -8,6 +8,5 @@ CON import org.springframework.beans.factory.annotation.Autowired; DEL import org.springframework.core.env.Environment; ADD import org.springframework.beans.facto...
<<<<<<< SEARCH import org.apache.http.util.EntityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import java.nio.charset.StandardCharsets; import java.util.Map; ...
ecmwf/cfgrib
68eb1bd58b84c1937f6f8d15bb9ea9f02a402e22
tests/cdscommon.py
python
apache-2.0
Drop impossible to get right code.
import hashlib import os import shutil import cdsapi SAMPLE_DATA_FOLDER = os.path.join(os.path.dirname(__file__), 'sample-data') EXTENSIONS = {'grib': '.grib', 'netcdf': '.nc'} def ensure_data(dataset, request, folder=SAMPLE_DATA_FOLDER, name='{uuid}.grib'): request_text = str(sorted(request.items())).encode('...
import hashlib import os import shutil import cdsapi SAMPLE_DATA_FOLDER = os.path.join(os.path.dirname(__file__), 'sample-data') EXTENSIONS = {'grib': '.grib', 'netcdf': '.nc'} def ensure_data(dataset, request, folder=SAMPLE_DATA_FOLDER, name='{uuid}.grib'): request_text = str(sorted(request.items())).encode('...
0
18
1
del_only
--- a/tests/cdscommon.py +++ b/tests/cdscommon.py @@ -27,19 +27 @@ return path - - -def message_count(dataset, request, count=1): - if dataset == 'reanalysis-era5-single-levels' \ - and request.get('product_type') == 'ensemble_members': - count = 20 - elif dataset == 'reanalysis-era5-pressu...
--- a/tests/cdscommon.py +++ b/tests/cdscommon.py @@ ... @@ return path - - -def message_count(dataset, request, count=1): - if dataset == 'reanalysis-era5-single-levels' \ - and request.get('product_type') == 'ensemble_members': - count = 20 - elif dataset == 'reanalysis-era5-pressure-leve...
--- a/tests/cdscommon.py +++ b/tests/cdscommon.py @@ -27,19 +27 @@ CON return path DEL DEL DEL def message_count(dataset, request, count=1): DEL if dataset == 'reanalysis-era5-single-levels' \ DEL and request.get('product_type') == 'ensemble_members': DEL count = 20 DEL elif dataset ==...
<<<<<<< SEARCH raise return path def message_count(dataset, request, count=1): if dataset == 'reanalysis-era5-single-levels' \ and request.get('product_type') == 'ensemble_members': count = 20 elif dataset == 'reanalysis-era5-pressure-levels' \ and request.get('...
dropbox/changes
dfd3bff4560d1711624b8508795eb3debbaafa40
changes/api/snapshotimage_details.py
python
apache-2.0
Mark snapshots as inactive if any are not valid
from __future__ import absolute_import from flask.ext.restful import reqparse from changes.api.base import APIView from changes.config import db from changes.models import SnapshotImage, SnapshotStatus class SnapshotImageDetailsAPIView(APIView): parser = reqparse.RequestParser() parser.add_argument('status'...
from __future__ import absolute_import from flask.ext.restful import reqparse from changes.api.base import APIView from changes.config import db from changes.models import SnapshotImage, SnapshotStatus class SnapshotImageDetailsAPIView(APIView): parser = reqparse.RequestParser() parser.add_argument('status'...
3
0
1
add_only
--- a/changes/api/snapshotimage_details.py +++ b/changes/api/snapshotimage_details.py @@ -42,2 +42,5 @@ db.session.add(snapshot) + elif snapshot.status == SnapshotStatus.active: + snapshot.status = SnapshotStatus.inactive + db.session.add(snapshot)
--- a/changes/api/snapshotimage_details.py +++ b/changes/api/snapshotimage_details.py @@ ... @@ db.session.add(snapshot) + elif snapshot.status == SnapshotStatus.active: + snapshot.status = SnapshotStatus.inactive + db.session.add(snapshot)
--- a/changes/api/snapshotimage_details.py +++ b/changes/api/snapshotimage_details.py @@ -42,2 +42,5 @@ CON db.session.add(snapshot) ADD elif snapshot.status == SnapshotStatus.active: ADD snapshot.status = SnapshotStatus.inactive ADD db.session.add(snapshot) CON
<<<<<<< SEARCH snapshot.status = SnapshotStatus.active db.session.add(snapshot) db.session.commit() ======= snapshot.status = SnapshotStatus.active db.session.add(snapshot) elif snapshot.status == SnapshotStatus.active: ...
jwittevrongel/playchaser
bdeafec96e4ffa90ba1662176433440907a7e699
app/lib/db/MigrationManager.js
javascript
mit
Add migration creation logic to MM.create()
"use strict"; var fs = require('fs'), path = require('path'); exports.up = function(migrationName) { }; exports.down = function(migrationName) { }; exports.create = function(migrationName) { var migrationTemplate = [ '"use strict"', '', 'exports.up = function(mongoose, next) {', ' next();', '...
"use strict"; var fs = require('fs'), path = require('path'); var baseDirectory = path.join(__dirname, '..', '..'); var relativeMigrationDirectory = path.join('db', 'migrations'); var absoluteMigrationDirectory = path.join(baseDirectory, relativeMigrationDirectory); function padNumeral(numeral) { return Arra...
44
17
2
mixed
--- a/app/lib/db/MigrationManager.js +++ b/app/lib/db/MigrationManager.js @@ -4,3 +4,15 @@ path = require('path'); - + +var baseDirectory = path.join(__dirname, '..', '..'); +var relativeMigrationDirectory = path.join('db', 'migrations'); +var absoluteMigrationDirectory = path.join(baseDirectory, relativeMigr...
--- a/app/lib/db/MigrationManager.js +++ b/app/lib/db/MigrationManager.js @@ ... @@ path = require('path'); - + +var baseDirectory = path.join(__dirname, '..', '..'); +var relativeMigrationDirectory = path.join('db', 'migrations'); +var absoluteMigrationDirectory = path.join(baseDirectory, relativeMigrationDi...
--- a/app/lib/db/MigrationManager.js +++ b/app/lib/db/MigrationManager.js @@ -4,3 +4,15 @@ CON path = require('path'); DEL ADD ADD var baseDirectory = path.join(__dirname, '..', '..'); ADD var relativeMigrationDirectory = path.join('db', 'migrations'); ADD var absoluteMigrationDirectory = path.join(baseDirec...
<<<<<<< SEARCH var fs = require('fs'), path = require('path'); exports.up = function(migrationName) { }; ======= var fs = require('fs'), path = require('path'); var baseDirectory = path.join(__dirname, '..', '..'); var relativeMigrationDirectory = path.join('db', 'migrations'); var absoluteMigrationDire...
cxpqwvtj/himawari
0bed60ce1edb898d9b9ccba12b656bfd39857df8
web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt
kotlin
mit
Change val variable to static.
package app.himawari.filter import org.slf4j.MDC import org.springframework.core.Ordered import org.springframework.core.annotation.Order import org.springframework.security.core.context.SecurityContextHolder import org.springframework.security.core.userdetails.UserDetails import org.springframework.stereotype.Compone...
package app.himawari.filter import org.slf4j.MDC import org.springframework.core.Ordered import org.springframework.core.annotation.Order import org.springframework.security.core.context.SecurityContextHolder import org.springframework.security.core.userdetails.UserDetails import org.springframework.stereotype.Compone...
4
1
1
mixed
--- a/web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt +++ b/web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt @@ -16,3 +16,6 @@ class UserMDCInsertingServletFilter : Filter { - private val USER_KEY = "username" + + companion object { + private const val USER...
--- a/web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt +++ b/web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt @@ ... @@ class UserMDCInsertingServletFilter : Filter { - private val USER_KEY = "username" + + companion object { + private const val USER_KEY = "...
--- a/web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt +++ b/web/src/main/kotlin/app/himawari/filter/UserMDCInsertingServletFilter.kt @@ -16,3 +16,6 @@ CON class UserMDCInsertingServletFilter : Filter { DEL private val USER_KEY = "username" ADD ADD companion object { ADD private...
<<<<<<< SEARCH @Order(Ordered.LOWEST_PRECEDENCE - 1) class UserMDCInsertingServletFilter : Filter { private val USER_KEY = "username" override fun init(filterConfig: FilterConfig?) { ======= @Order(Ordered.LOWEST_PRECEDENCE - 1) class UserMDCInsertingServletFilter : Filter { companion object { pr...
Kurtz1993/ngts-cli
1e94670c02239e46afdb45f49f371201d4b34754
lib/ngts-module.js
javascript
mit
Add an option to create just the module file
#!/usr/bin/env node const program = require("commander"); const _ = require("lodash"); const utils = require("./utils"); var dest = ""; program .usage("<module-name> [options]") .arguments("<module-name>") .action(function (moduleName) { cmdModuleName = moduleName; }) .option("-a, --ctrl-a...
#!/usr/bin/env node const program = require("commander"); const _ = require("lodash"); const utils = require("./utils"); var dest = ""; program .usage("<module-name> [options]") .arguments("<module-name>") .action(function (moduleName) { cmdModuleName = moduleName; }) .option("-a, --ctrl-a...
6
1
2
mixed
--- a/lib/ngts-module.js +++ b/lib/ngts-module.js @@ -14,2 +14,3 @@ .option("-a, --ctrl-alias <alias>", "Sets an alias for the controller. Defaults to vm.") + .option("-m, --module-only", "Creates only the module.ts file.") .parse(process.argv); @@ -37,3 +38,7 @@ -var tpls = utils.readTemplates("module")...
--- a/lib/ngts-module.js +++ b/lib/ngts-module.js @@ ... @@ .option("-a, --ctrl-alias <alias>", "Sets an alias for the controller. Defaults to vm.") + .option("-m, --module-only", "Creates only the module.ts file.") .parse(process.argv); @@ ... @@ -var tpls = utils.readTemplates("module"); +if (program.m...
--- a/lib/ngts-module.js +++ b/lib/ngts-module.js @@ -14,2 +14,3 @@ CON .option("-a, --ctrl-alias <alias>", "Sets an alias for the controller. Defaults to vm.") ADD .option("-m, --module-only", "Creates only the module.ts file.") CON .parse(process.argv); @@ -37,3 +38,7 @@ CON DEL var tpls = utils.readTemp...
<<<<<<< SEARCH }) .option("-a, --ctrl-alias <alias>", "Sets an alias for the controller. Defaults to vm.") .parse(process.argv); ======= }) .option("-a, --ctrl-alias <alias>", "Sets an alias for the controller. Defaults to vm.") .option("-m, --module-only", "Creates only the module.ts file.") ...
fanart-tv/fanarttv-discord-update-bot
e08e0072166bec2fa84c507dd6bcb111c1fbbf24
src/main/kotlin/tv/fanart/bot/FanartBot.kt
kotlin
mit
NOGH: Add translation config launch strategy
package tv.fanart.bot import kotlinx.coroutines.* import org.koin.core.KoinComponent import org.koin.core.inject import tv.fanart.config.ConfigRepo import java.lang.Runnable import java.util.* class FanartBot : KoinComponent { private val configurationClient by inject<ConfigRepo>() private val mainJob = Su...
package tv.fanart.bot import kotlinx.coroutines.* import org.koin.core.KoinComponent import org.koin.core.inject import tv.fanart.config.ConfigRepo import java.lang.Runnable import java.util.* class FanartBot : KoinComponent { private val configurationClient by inject<ConfigRepo>() private val mainJob = Su...
3
2
1
mixed
--- a/src/main/kotlin/tv/fanart/bot/FanartBot.kt +++ b/src/main/kotlin/tv/fanart/bot/FanartBot.kt @@ -30,4 +30,5 @@ - // TODO Spawn off translation bot - launch(mainContext) { + configurationClient.translationConfig?.let { + launch(mainContext) { + } }
--- a/src/main/kotlin/tv/fanart/bot/FanartBot.kt +++ b/src/main/kotlin/tv/fanart/bot/FanartBot.kt @@ ... @@ - // TODO Spawn off translation bot - launch(mainContext) { + configurationClient.translationConfig?.let { + launch(mainContext) { + } }
--- a/src/main/kotlin/tv/fanart/bot/FanartBot.kt +++ b/src/main/kotlin/tv/fanart/bot/FanartBot.kt @@ -30,4 +30,5 @@ CON DEL // TODO Spawn off translation bot DEL launch(mainContext) { ADD configurationClient.translationConfig?.let { ADD launch(mainContext) { ADD } CON ...
<<<<<<< SEARCH } // TODO Spawn off translation bot launch(mainContext) { } ======= } configurationClient.translationConfig?.let { launch(mainContext) { } } >>>>>>> REPLACE
gbouvignies/chemex
2965891b46e89e0d7222ec16a2327f2bdef86f52
chemex/util.py
python
bsd-3-clause
Update settings for reading config files Update the definition of comments, now only allowing the use of "#" for comments. Add a converter function to parse list of floats, such as: list_of_floats = [1.0, 2.0, 3.0]
"""The util module contains a variety of utility functions.""" import configparser import sys def read_cfg_file(filename): """Read and parse the experiment configuration file with configparser.""" config = configparser.ConfigParser(inline_comment_prefixes=("#", ";")) config.optionxform = str try: ...
"""The util module contains a variety of utility functions.""" import configparser import sys def listfloat(text): return [float(val) for val in text.strip("[]").split(",")] def read_cfg_file(filename=None): """Read and parse the experiment configuration file with configparser.""" config = configparser...
10
4
2
mixed
--- a/chemex/util.py +++ b/chemex/util.py @@ -5,6 +5,12 @@ -def read_cfg_file(filename): +def listfloat(text): + return [float(val) for val in text.strip("[]").split(",")] + + +def read_cfg_file(filename=None): """Read and parse the experiment configuration file with configparser.""" - config = configpar...
--- a/chemex/util.py +++ b/chemex/util.py @@ ... @@ -def read_cfg_file(filename): +def listfloat(text): + return [float(val) for val in text.strip("[]").split(",")] + + +def read_cfg_file(filename=None): """Read and parse the experiment configuration file with configparser.""" - config = configparser.Con...
--- a/chemex/util.py +++ b/chemex/util.py @@ -5,6 +5,12 @@ CON DEL def read_cfg_file(filename): ADD def listfloat(text): ADD return [float(val) for val in text.strip("[]").split(",")] ADD ADD ADD def read_cfg_file(filename=None): CON """Read and parse the experiment configuration file with configparser.""" C...
<<<<<<< SEARCH def read_cfg_file(filename): """Read and parse the experiment configuration file with configparser.""" config = configparser.ConfigParser(inline_comment_prefixes=("#", ";")) config.optionxform = str try: out = config.read(str(filename)) if not out and filename is not ...
atengler/kqueen-ui
f9ca473abf7aea3cc146badf2d45ae715f635aac
kqueen_ui/server.py
python
mit
Use correct parameter for HOST and PORT
from .config import current_config from flask import Flask from flask import redirect from flask import url_for from flask.ext.babel import Babel from kqueen_ui.blueprints.registration.views import registration from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging ...
from .config import current_config from flask import Flask from flask import redirect from flask import url_for from flask.ext.babel import Babel from kqueen_ui.blueprints.registration.views import registration from kqueen_ui.blueprints.ui.views import ui from werkzeug.contrib.cache import SimpleCache import logging ...
2
2
1
mixed
--- a/kqueen_ui/server.py +++ b/kqueen_ui/server.py @@ -45,4 +45,4 @@ app.run( - host=app.config.get('KQUEEN_UI_HOST'), - port=int(app.config.get('KQUEEN_UI_PORT')) + host=app.config.get('HOST'), + port=int(app.config.get('PORT')) )
--- a/kqueen_ui/server.py +++ b/kqueen_ui/server.py @@ ... @@ app.run( - host=app.config.get('KQUEEN_UI_HOST'), - port=int(app.config.get('KQUEEN_UI_PORT')) + host=app.config.get('HOST'), + port=int(app.config.get('PORT')) )
--- a/kqueen_ui/server.py +++ b/kqueen_ui/server.py @@ -45,4 +45,4 @@ CON app.run( DEL host=app.config.get('KQUEEN_UI_HOST'), DEL port=int(app.config.get('KQUEEN_UI_PORT')) ADD host=app.config.get('HOST'), ADD port=int(app.config.get('PORT')) CON )
<<<<<<< SEARCH logger.debug('kqueen_ui starting') app.run( host=app.config.get('KQUEEN_UI_HOST'), port=int(app.config.get('KQUEEN_UI_PORT')) ) ======= logger.debug('kqueen_ui starting') app.run( host=app.config.get('HOST'), port=int(app.config.get('PORT')) ) >>>...
EricCat/Node-File-Delete
e5da5488cd2300200ca94441602e638312224974
index.js
javascript
bsd-3-clause
Modify Async && Sync Delete
"use strict"; var fs = require('fs'); exports.deleteFileSync = function(filePath, timeInterval) { function iterator(filePath, dirs) { var stat = fs.stat(filePath); if(stat.isDirectory()) { dirs.unshift(filePath);//collection dirs inner(filePath, dirs); } else if(st...
"use strict"; var fs = require('fs'); exports.deleteFileSync = function(filePath, timeInterval, callback) { function iterator(filePath, dirs, callback) { fs.stat(filePath, function(err, stats){ if(err){ if (err.message === 'No such file or directory') { // ...
32
16
4
mixed
--- a/index.js +++ b/index.js @@ -5,11 +5,22 @@ -exports.deleteFileSync = function(filePath, timeInterval) { - function iterator(filePath, dirs) { - var stat = fs.stat(filePath); - if(stat.isDirectory()) { - dirs.unshift(filePath);//collection dirs - inner(filePath, dirs); - ...
--- a/index.js +++ b/index.js @@ ... @@ -exports.deleteFileSync = function(filePath, timeInterval) { - function iterator(filePath, dirs) { - var stat = fs.stat(filePath); - if(stat.isDirectory()) { - dirs.unshift(filePath);//collection dirs - inner(filePath, dirs); - } el...
--- a/index.js +++ b/index.js @@ -5,11 +5,22 @@ CON DEL exports.deleteFileSync = function(filePath, timeInterval) { DEL function iterator(filePath, dirs) { DEL var stat = fs.stat(filePath); DEL if(stat.isDirectory()) { DEL dirs.unshift(filePath);//collection dirs DEL inner(f...
<<<<<<< SEARCH var fs = require('fs'); exports.deleteFileSync = function(filePath, timeInterval) { function iterator(filePath, dirs) { var stat = fs.stat(filePath); if(stat.isDirectory()) { dirs.unshift(filePath);//collection dirs inner(filePath, dirs); } else if(sta...
llwanghong/jslint4java
91a03a93ca7575e79e17f52618f5705c66d5f144
src/net/happygiraffe/jslint/Main.java
java
bsd-2-clause
Print out a file not found message instead of blowing up.
package net.happygiraffe.jslint; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.List; /** * A command line interface to {@link JSLint}. * * @author dom * @version $Id$ */ public class Main { /** * The main e...
package net.happygiraffe.jslint; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.List; /** * A command line interface to {@link JSLint}. * * @author dom * @version $Id$ */ public c...
11
1
4
mixed
--- a/src/net/happygiraffe/jslint/Main.java +++ b/src/net/happygiraffe/jslint/Main.java @@ -4,2 +4,3 @@ import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; @@ -19,3 +20,4 @@ * - * @param args One or more JavaScript files. + * @param args + * ...
--- a/src/net/happygiraffe/jslint/Main.java +++ b/src/net/happygiraffe/jslint/Main.java @@ ... @@ import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; @@ ... @@ * - * @param args One or more JavaScript files. + * @param args + * One or m...
--- a/src/net/happygiraffe/jslint/Main.java +++ b/src/net/happygiraffe/jslint/Main.java @@ -4,2 +4,3 @@ CON import java.io.FileInputStream; ADD import java.io.FileNotFoundException; CON import java.io.IOException; @@ -19,3 +20,4 @@ CON * DEL * @param args One or more JavaScript files. ADD * @param args...
<<<<<<< SEARCH import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; ======= import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; >>>>>>>...
bink81/java-experiments
58515da9800f7b9815ad93d3f53ff9c6a23a221b
src/main/java/algorithms/trees/TreeHeightCalculator.java
java
mit
Document prerequisites for the algorithm
package algorithms.trees; public class TreeHeightCalculator { private final int parents[]; /** * @param parents * defines index of parent for each node. Value -1 determines a root node */ public TreeHeightCalculator(int parents[]) { this.parents = parents; } public int computeHeight() { TreeN...
package algorithms.trees; public class TreeHeightCalculator { private final int parents[]; /** * @param parents * defines index of parent for each node. Value -1 determines a root node */ public TreeHeightCalculator(int parents[]) { this.parents = parents; } /** * assumptions: there is exactl...
3
0
1
add_only
--- a/src/main/java/algorithms/trees/TreeHeightCalculator.java +++ b/src/main/java/algorithms/trees/TreeHeightCalculator.java @@ -13,2 +13,5 @@ + /** + * assumptions: there is exactly one root and the input represents a tree + */ public int computeHeight() {
--- a/src/main/java/algorithms/trees/TreeHeightCalculator.java +++ b/src/main/java/algorithms/trees/TreeHeightCalculator.java @@ ... @@ + /** + * assumptions: there is exactly one root and the input represents a tree + */ public int computeHeight() {
--- a/src/main/java/algorithms/trees/TreeHeightCalculator.java +++ b/src/main/java/algorithms/trees/TreeHeightCalculator.java @@ -13,2 +13,5 @@ CON ADD /** ADD * assumptions: there is exactly one root and the input represents a tree ADD */ CON public int computeHeight() {
<<<<<<< SEARCH } public int computeHeight() { TreeNode root = createTree(); ======= } /** * assumptions: there is exactly one root and the input represents a tree */ public int computeHeight() { TreeNode root = createTree(); >>>>>>> REPLACE
brejoc/django-intercoolerjs
3ca2203a977f6d25c780e7a6168a16c4f7dec732
setup.py
python
mit
Switch to proper markdown for long description
import os from codecs import open from setuptools import setup, find_packages repo_path = os.path.abspath(os.path.dirname(__file__)) try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (ImportError, OSError): long_description = open('README.md').read() with open(os.path.j...
import os from codecs import open from setuptools import setup, find_packages repo_path = os.path.abspath(os.path.dirname(__file__)) with open('README.md', encoding='utf-8') as f: long_description = f.read() with open(os.path.join(repo_path, 'requirements.txt')) as f: requirements = f.read().splitlines() s...
3
5
2
mixed
--- a/setup.py +++ b/setup.py @@ -7,7 +7,4 @@ -try: - import pypandoc - long_description = pypandoc.convert('README.md', 'rst') -except (ImportError, OSError): - long_description = open('README.md').read() +with open('README.md', encoding='utf-8') as f: + long_description = f.read() @@ -22,2 +19,3 @@ ...
--- a/setup.py +++ b/setup.py @@ ... @@ -try: - import pypandoc - long_description = pypandoc.convert('README.md', 'rst') -except (ImportError, OSError): - long_description = open('README.md').read() +with open('README.md', encoding='utf-8') as f: + long_description = f.read() @@ ... @@ long_descri...
--- a/setup.py +++ b/setup.py @@ -7,7 +7,4 @@ CON DEL try: DEL import pypandoc DEL long_description = pypandoc.convert('README.md', 'rst') DEL except (ImportError, OSError): DEL long_description = open('README.md').read() ADD with open('README.md', encoding='utf-8') as f: ADD long_description = f.read(...
<<<<<<< SEARCH repo_path = os.path.abspath(os.path.dirname(__file__)) try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (ImportError, OSError): long_description = open('README.md').read() with open(os.path.join(repo_path, 'requirements.txt')) as f: ======= repo_path = os...
mg4tv/mg4tv-web
91f3e6cdbd82cc5ca7927fd1dd0380d7fc5efef4
src/components/GroupMembersView.js
javascript
mit
Update format for group members view
import _ from 'lodash' import React from 'react' import {connect} from 'react-redux' import {compose, withHandlers, withProps, withState} from 'recompose' import GroupMembersList from './GroupMembersList' import {addMemberToGroup} from '../actions/groups' const mapStateToProps = ({groups}) => ({ groups }) const en...
import _ from 'lodash' import React from 'react' import {connect} from 'react-redux' import {compose, withHandlers, withProps, withState} from 'recompose' import GroupMembersList from './GroupMembersList' import {addMemberToGroup} from '../actions/groups' const mapStateToProps = ({groups}) => ({ groups }) const en...
13
7
4
mixed
--- a/src/components/GroupMembersView.js +++ b/src/components/GroupMembersView.js @@ -17,6 +17,6 @@ })), - withState('newMember', 'updateNewMember', ''), + withState('newGroupMember', 'updateNewGroupMember', ''), withHandlers({ - onNewMemberChange: props => event => { - props.updateNewMember(event.targe...
--- a/src/components/GroupMembersView.js +++ b/src/components/GroupMembersView.js @@ ... @@ })), - withState('newMember', 'updateNewMember', ''), + withState('newGroupMember', 'updateNewGroupMember', ''), withHandlers({ - onNewMemberChange: props => event => { - props.updateNewMember(event.target.value)...
--- a/src/components/GroupMembersView.js +++ b/src/components/GroupMembersView.js @@ -17,6 +17,6 @@ CON })), DEL withState('newMember', 'updateNewMember', ''), ADD withState('newGroupMember', 'updateNewGroupMember', ''), CON withHandlers({ DEL onNewMemberChange: props => event => { DEL props.updateNew...
<<<<<<< SEARCH groupId: match.params.groupId })), withState('newMember', 'updateNewMember', ''), withHandlers({ onNewMemberChange: props => event => { props.updateNewMember(event.target.value) }, onNewGroupMemberSubmit: props => event => { event.preventDefault() props.dispatch(ad...
BirkbeckCTP/janeway
1dc1be8c5f705ff97d6b83171327fa5d1c59a385
src/utils/management/commands/run_upgrade.py
python
agpl-3.0
Upgrade path is now not required, help text is output if no path supp.
from importlib import import_module from django.core.management.base import BaseCommand from django.utils import translation class Command(BaseCommand): """ Upgrades Janeway """ help = "Upgrades an install from one version to another." def add_arguments(self, parser): """Adds arguments ...
import os from importlib import import_module from django.core.management.base import BaseCommand from django.utils import translation from django.conf import settings def get_modules(): path = os.path.join(settings.BASE_DIR, 'utils', 'upgrade') root, dirs, files = next(os.walk(path)) return files clas...
26
10
3
mixed
--- a/src/utils/management/commands/run_upgrade.py +++ b/src/utils/management/commands/run_upgrade.py @@ -1 +1,2 @@ +import os from importlib import import_module @@ -4,2 +5,9 @@ from django.utils import translation +from django.conf import settings + + +def get_modules(): + path = os.path.join(settings.BASE_DIR, ...
--- a/src/utils/management/commands/run_upgrade.py +++ b/src/utils/management/commands/run_upgrade.py @@ ... @@ +import os from importlib import import_module @@ ... @@ from django.utils import translation +from django.conf import settings + + +def get_modules(): + path = os.path.join(settings.BASE_DIR, 'utils', '...
--- a/src/utils/management/commands/run_upgrade.py +++ b/src/utils/management/commands/run_upgrade.py @@ -1 +1,2 @@ ADD import os CON from importlib import import_module @@ -4,2 +5,9 @@ CON from django.utils import translation ADD from django.conf import settings ADD ADD ADD def get_modules(): ADD path = os.path....
<<<<<<< SEARCH from importlib import import_module from django.core.management.base import BaseCommand from django.utils import translation ======= import os from importlib import import_module from django.core.management.base import BaseCommand from django.utils import translation from django.conf import settings...
mauricionr/passport-twitter
93d576981fbac6c0f781b9826f2650c381493a13
lib/passport-twitter/strategy.js
javascript
mit
Support for denied Twitter authentication attempts.
/** * Module dependencies. */ var util = require('util') , OAuthStrategy = require("passport-oauth").OAuthStrategy; /** * `Strategy` constructor. * * @api public */ function Strategy(options, validate) { options = options || {}; options.requestTokenURL = options.requestTokenURL || 'https://twitter.com/oau...
/** * Module dependencies. */ var util = require('util') , OAuthStrategy = require("passport-oauth").OAuthStrategy; /** * `Strategy` constructor. * * @api public */ function Strategy(options, verify) { options = options || {}; options.requestTokenURL = options.requestTokenURL || 'https://twitter.com/oauth...
21
2
3
mixed
--- a/lib/passport-twitter/strategy.js +++ b/lib/passport-twitter/strategy.js @@ -12,3 +12,3 @@ */ -function Strategy(options, validate) { +function Strategy(options, verify) { options = options || {}; @@ -17,4 +17,5 @@ options.userAuthorizationURL = options.userAuthorizationURL || 'https://twitter.com/oauth/au...
--- a/lib/passport-twitter/strategy.js +++ b/lib/passport-twitter/strategy.js @@ ... @@ */ -function Strategy(options, validate) { +function Strategy(options, verify) { options = options || {}; @@ ... @@ options.userAuthorizationURL = options.userAuthorizationURL || 'https://twitter.com/oauth/authenticate'; + ...
--- a/lib/passport-twitter/strategy.js +++ b/lib/passport-twitter/strategy.js @@ -12,3 +12,3 @@ CON */ DEL function Strategy(options, validate) { ADD function Strategy(options, verify) { CON options = options || {}; @@ -17,4 +17,5 @@ CON options.userAuthorizationURL = options.userAuthorizationURL || 'https://twitt...
<<<<<<< SEARCH * @api public */ function Strategy(options, validate) { options = options || {}; options.requestTokenURL = options.requestTokenURL || 'https://twitter.com/oauth/request_token'; options.accessTokenURL = options.accessTokenURL || 'https://twitter.com/oauth/access_token'; options.userAuthorization...