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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CartoDB/camshaft | 159781448d15bdd249c5d672830df7eb833e1af1 | lib/node/nodes/source.js | javascript | bsd-3-clause | Clarify why columns must modify node id
| 'use strict';
var Node = require('../node');
var TYPE = 'source';
var PARAMS = {
query: Node.PARAM.STRING()
};
var Source = Node.create(TYPE, PARAMS, {
beforeCreate: function(node) {
// Last updated time in source node means data changed so it has to modify node.id
node.setAttributeToModifyId... | 'use strict';
var Node = require('../node');
var TYPE = 'source';
var PARAMS = {
query: Node.PARAM.STRING()
};
var Source = Node.create(TYPE, PARAMS, {
beforeCreate: function(node) {
// Last updated time in source node means data changed so it has to modify node.id
node.setAttributeToModifyId... | 3 | 3 | 1 | mixed | --- a/lib/node/nodes/source.js
+++ b/lib/node/nodes/source.js
@@ -26,5 +26,5 @@
this.columns = columns;
- // Makes columns affecting Node.id().
- // When a `select * from table` might end in a different set of columns
- // we want to have a different node.
+ // Columns have to modify Node.id().
+ //... | --- a/lib/node/nodes/source.js
+++ b/lib/node/nodes/source.js
@@ ... @@
this.columns = columns;
- // Makes columns affecting Node.id().
- // When a `select * from table` might end in a different set of columns
- // we want to have a different node.
+ // Columns have to modify Node.id().
+ // When a ... | --- a/lib/node/nodes/source.js
+++ b/lib/node/nodes/source.js
@@ -26,5 +26,5 @@
CON this.columns = columns;
DEL // Makes columns affecting Node.id().
DEL // When a `select * from table` might end in a different set of columns
DEL // we want to have a different node.
ADD // Columns have to modify Nod... | <<<<<<< SEARCH
Source.prototype.setColumnsNames = function(columns) {
this.columns = columns;
// Makes columns affecting Node.id().
// When a `select * from table` might end in a different set of columns
// we want to have a different node.
this.setAttributeToModifyId('columns');
};
=======
Source.... |
garydonovan/google-maps-services-python | 3de90ff1f33d05d30e295279e7ad4cdd0e6bbc9b | setup.py | python | apache-2.0 | Change from planning to in beta
| import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info <= (2, 4):
error = 'Requires Python Version 2.5 or above... exiting.'
print >> sys.stderr, error
sys.exit(1)
requirements = [
'requests',
]
setup(name='googlemaps',
version='2... | import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info <= (2, 4):
error = 'Requires Python Version 2.5 or above... exiting.'
print >> sys.stderr, error
sys.exit(1)
requirements = [
'requests',
]
setup(name='googlemaps',
version='2... | 1 | 1 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -29,3 +29,3 @@
install_requires=requirements,
- classifiers=['Development Status :: 1 - Planning',
+ classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Developers', | --- a/setup.py
+++ b/setup.py
@@ ... @@
install_requires=requirements,
- classifiers=['Development Status :: 1 - Planning',
+ classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Developers',
| --- a/setup.py
+++ b/setup.py
@@ -29,3 +29,3 @@
CON install_requires=requirements,
DEL classifiers=['Development Status :: 1 - Planning',
ADD classifiers=['Development Status :: 4 - Beta',
CON 'Intended Audience :: Developers',
| <<<<<<< SEARCH
setup_requires=requirements,
install_requires=requirements,
classifiers=['Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
=======
setup_requires=requirements,
... |
Waboodoo/HTTP-Shortcuts | 5184e2b97f6d948a7ca56225b202cb51e9e81a89 | HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt | kotlin | mit | Use same user agent for webviews as for HTTP requests
| package ch.rmy.android.http_shortcuts.activities.response
import android.content.Context
import android.util.AttributeSet
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import ch.rmy.android.http_shortcuts.extensions.consume
import ch.rmy.android.http_shortcuts.exte... | package ch.rmy.android.http_shortcuts.activities.response
import android.content.Context
import android.util.AttributeSet
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import ch.rmy.android.http_shortcuts.extensions.consume
import ch.rmy.android.http_shortcuts.exte... | 2 | 0 | 2 | add_only | --- a/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt
+++ b/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt
@@ -10,2 +10,3 @@
import ch.rmy.android.http_shortcuts.extensions.openURL
+import ch.rmy.android.http... | --- a/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt
+++ b/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt
@@ ... @@
import ch.rmy.android.http_shortcuts.extensions.openURL
+import ch.rmy.android.http_shortcu... | --- a/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt
+++ b/HTTPShortcuts/app/src/main/kotlin/ch/rmy/android/http_shortcuts/activities/response/ResponseWebView.kt
@@ -10,2 +10,3 @@
CON import ch.rmy.android.http_shortcuts.extensions.openURL
ADD import ch.rmy.androi... | <<<<<<< SEARCH
import ch.rmy.android.http_shortcuts.extensions.mapIf
import ch.rmy.android.http_shortcuts.extensions.openURL
class ResponseWebView @JvmOverloads constructor(
=======
import ch.rmy.android.http_shortcuts.extensions.mapIf
import ch.rmy.android.http_shortcuts.extensions.openURL
import ch.rmy.android.http... |
peerigon/dynamic-config | 47058708f45d5f22df203d6b8be8909192636e40 | lib/index.js | javascript | mit | Refactor dynamic config using smaller function that can be intercepted by alamid-plugin
| "use strict";
var path = require("path"),
argv = require('minimist')(process.argv.slice(2));
function readDynamicConfig(basePath, fileName) {
var env = process.env.env || argv.env || argv.ENV || readDynamicConfig.options.defaultEnv,
filePath = path.join(basePath, env, fileName),
config;
i... | "use strict";
var use = require("alamid-plugin/use.js");
var path = require("path"),
argv = require("minimist")(process.argv.slice(2));
function dynamicConfig(basePath, fileName) {
var env = dynamicConfig.getEnv(),
filePath = dynamicConfig.getFilePath(basePath, env, fileName),
config;
i... | 29 | 8 | 3 | mixed | --- a/lib/index.js
+++ b/lib/index.js
@@ -2,13 +2,32 @@
+var use = require("alamid-plugin/use.js");
+
var path = require("path"),
- argv = require('minimist')(process.argv.slice(2));
+ argv = require("minimist")(process.argv.slice(2));
-function readDynamicConfig(basePath, fileName) {
- var env = process.... | --- a/lib/index.js
+++ b/lib/index.js
@@ ... @@
+var use = require("alamid-plugin/use.js");
+
var path = require("path"),
- argv = require('minimist')(process.argv.slice(2));
+ argv = require("minimist")(process.argv.slice(2));
-function readDynamicConfig(basePath, fileName) {
- var env = process.env.env ... | --- a/lib/index.js
+++ b/lib/index.js
@@ -2,13 +2,32 @@
CON
ADD var use = require("alamid-plugin/use.js");
ADD
CON var path = require("path"),
DEL argv = require('minimist')(process.argv.slice(2));
ADD argv = require("minimist")(process.argv.slice(2));
CON
DEL function readDynamicConfig(basePath, fileName) {... | <<<<<<< SEARCH
"use strict";
var path = require("path"),
argv = require('minimist')(process.argv.slice(2));
function readDynamicConfig(basePath, fileName) {
var env = process.env.env || argv.env || argv.ENV || readDynamicConfig.options.defaultEnv,
filePath = path.join(basePath, env, fileName),
... |
NCIP/psc | 280ff5069386ab7dd6b105eb5658bdbd69809c66 | src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java | java | bsd-3-clause | Add TODO about using an enum instead of an unconstrained string
| package edu.northwestern.bioinformatics.studycalendar.domain;
import javax.persistence.Entity;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Transient;
/**
* @author Nataliya Shurupova
*/
@Entity
@DiscriminatorValue(value="2")
public class DayOfTheWeek extends Holiday {
private String ... | package edu.northwestern.bioinformatics.studycalendar.domain;
import javax.persistence.Entity;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Transient;
/**
* @author Nataliya Shurupova
*/
@Entity
@DiscriminatorValue(value="2")
public class DayOfTheWeek extends Holiday {
// TODO: This o... | 1 | 0 | 1 | add_only | --- a/src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java
+++ b/src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java
@@ -14,2 +14,3 @@
public class DayOfTheWeek extends Holiday {
+ // TODO: This ought to be the java.util.Calendar constant for the day,... | --- a/src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java
+++ b/src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java
@@ ... @@
public class DayOfTheWeek extends Holiday {
+ // TODO: This ought to be the java.util.Calendar constant for the day, or a cu... | --- a/src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java
+++ b/src/main/java/edu/northwestern/bioinformatics/studycalendar/domain/DayOfTheWeek.java
@@ -14,2 +14,3 @@
CON public class DayOfTheWeek extends Holiday {
ADD // TODO: This ought to be the java.util.Calendar constant for th... | <<<<<<< SEARCH
@DiscriminatorValue(value="2")
public class DayOfTheWeek extends Holiday {
private String dayOfTheWeek;
=======
@DiscriminatorValue(value="2")
public class DayOfTheWeek extends Holiday {
// TODO: This ought to be the java.util.Calendar constant for the day, or a custom enum
private String d... |
hansihe/Rustler | 362b291574e42e6698b0a354736fda29e50cf4eb | src/wrapper/term.rs | rust | apache-2.0 | Fix unlikely-to-hit logic bug in Debug support.
| use std::fmt;
use std::os::raw::c_char;
use super::nif_interface::{ NIF_TERM };
pub fn fmt<'a>(term: NIF_TERM, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
const SIZE: usize = 1024;
let mut bytes: Vec<u8> = Vec::with_capacity(SIZE);
let mut n = 0;
for _ in 0 .. 10 {
let i = unsafe {
... | use std::fmt;
use std::os::raw::c_char;
use super::nif_interface::{ NIF_TERM };
pub fn fmt<'a>(term: NIF_TERM, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
const SIZE: usize = 1024;
let mut bytes: Vec<u8> = Vec::with_capacity(SIZE);
let mut n = 0;
for _ in 0 .. 10 {
let i = unsafe {
... | 4 | 0 | 1 | add_only | --- a/src/wrapper/term.rs
+++ b/src/wrapper/term.rs
@@ -30,2 +30,6 @@
bytes.reserve_exact(2 * n + 1);
+
+ // Ensure that the `set_len` call below does not expose
+ // uninitialized bytes if we give up after 10 attempts.
+ n = 0;
} else { | --- a/src/wrapper/term.rs
+++ b/src/wrapper/term.rs
@@ ... @@
bytes.reserve_exact(2 * n + 1);
+
+ // Ensure that the `set_len` call below does not expose
+ // uninitialized bytes if we give up after 10 attempts.
+ n = 0;
} else {
| --- a/src/wrapper/term.rs
+++ b/src/wrapper/term.rs
@@ -30,2 +30,6 @@
CON bytes.reserve_exact(2 * n + 1);
ADD
ADD // Ensure that the `set_len` call below does not expose
ADD // uninitialized bytes if we give up after 10 attempts.
ADD n = 0;
CON } else {
| <<<<<<< SEARCH
// avoid going around the loop again, double the estimate.
bytes.reserve_exact(2 * n + 1);
} else {
break;
=======
// avoid going around the loop again, double the estimate.
bytes.reserve_exact(2 * n + 1);
// Ensure that th... |
athy/fape | b3888e27b899b540b95a16757647d9eee446b82c | src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java | java | bsd-2-clause | Add tie breaker for plan comparators.
First choose the one with shortest makespan.
If it still a tie, use the id of the state to make sure the output is deterministic.
| package fape.core.planning.search.strategies.plans;
import fape.core.planning.states.State;
import java.util.LinkedList;
import java.util.List;
/**
* Used to use a sequence of PartialPlanComparator as one.
*
* The basic algorithm for comparing two partial plans is to apply the comparators in sequence until it res... | package fape.core.planning.search.strategies.plans;
import fape.core.planning.states.State;
import java.util.LinkedList;
import java.util.List;
/**
* Used to use a sequence of PartialPlanComparator as one.
*
* The basic algorithm for comparing two partial plans is to apply the comparators in sequence until it res... | 8 | 2 | 1 | mixed | --- a/src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java
+++ b/src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java
@@ -38,4 +38,10 @@
}
- // no resolver could rank those flaws.
- return 0;
+
+ // tie breaker: makespan
+ int di... | --- a/src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java
+++ b/src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java
@@ ... @@
}
- // no resolver could rank those flaws.
- return 0;
+
+ // tie breaker: makespan
+ int diffMakespa... | --- a/src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java
+++ b/src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java
@@ -38,4 +38,10 @@
CON }
DEL // no resolver could rank those flaws.
DEL return 0;
ADD
ADD // tie breaker: makespan
... | <<<<<<< SEARCH
}
}
// no resolver could rank those flaws.
return 0;
}
}
=======
}
}
// tie breaker: makespan
int diffMakespan = state.getEarliestStartTime(state.pb.end()) - state2.getEarliestStartTime(state2.pb.end());
if(diffMakespan... |
axelrindle/SimpleCoins | fcced317586bf23cab4226f796da28b531e8684a | src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt | kotlin | mit | Use reloadAll() to reload all config files
| package de.axelrindle.simplecoins.command
import de.axelrindle.pocketknife.PocketCommand
import de.axelrindle.simplecoins.CoinManager
import de.axelrindle.simplecoins.SimpleCoins
import org.bukkit.command.Command
import org.bukkit.command.CommandSender
internal class ReloadCommand : PocketCommand() {
override fu... | package de.axelrindle.simplecoins.command
import de.axelrindle.pocketknife.PocketCommand
import de.axelrindle.simplecoins.CoinManager
import de.axelrindle.simplecoins.SimpleCoins
import org.bukkit.command.Command
import org.bukkit.command.CommandSender
internal class ReloadCommand : PocketCommand() {
override fu... | 3 | 4 | 1 | mixed | --- a/src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt
+++ b/src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt
@@ -34,7 +34,6 @@
// reload the config files and re-init the CoinManager
- SimpleCoins.instance!!.pocketConfig.apply {
- reload("config... | --- a/src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt
+++ b/src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt
@@ ... @@
// reload the config files and re-init the CoinManager
- SimpleCoins.instance!!.pocketConfig.apply {
- reload("config")
- ... | --- a/src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt
+++ b/src/main/kotlin/de/axelrindle/simplecoins/command/ReloadCommand.kt
@@ -34,7 +34,6 @@
CON // reload the config files and re-init the CoinManager
DEL SimpleCoins.instance!!.pocketConfig.apply {
DEL reloa... | <<<<<<< SEARCH
// reload the config files and re-init the CoinManager
SimpleCoins.instance!!.pocketConfig.apply {
reload("config")
reload("database")
}
CoinManager.init(SimpleCoins.instance!!.pocketConfig)
sender.sendMessage("... |
blackbeam/mysql_async | 129fa2e0c5a8d0d5117b64741034afd8a42c163a | src/conn/futures/prep_exec.rs | rust | apache-2.0 | Use steps! for PrepExec future
| use conn::Conn;
use conn::futures::query_result::BinQueryResult;
use conn::futures::Prepare;
use conn::stmt::futures::Execute;
use conn::stmt::Stmt;
use errors::*;
use lib_futures::Async;
use lib_futures::Async::Ready;
use lib_futures::Future;
use lib_futures::Poll;
use value::Params;
enum Step {
Prepare(Prepare)... | use conn::Conn;
use conn::futures::query_result::BinQueryResult;
use conn::futures::Prepare;
use conn::stmt::futures::Execute;
use errors::*;
use lib_futures::Async;
use lib_futures::Async::Ready;
use lib_futures::Future;
use lib_futures::Poll;
use std::mem;
use value::Params;
steps! {
PrepExec {
Prepare(... | 9 | 21 | 6 | mixed | --- a/src/conn/futures/prep_exec.rs
+++ b/src/conn/futures/prep_exec.rs
@@ -4,3 +4,2 @@
use conn::stmt::futures::Execute;
-use conn::stmt::Stmt;
use errors::*;
@@ -10,2 +9,3 @@
use lib_futures::Poll;
+use std::mem;
use value::Params;
@@ -13,10 +13,7 @@
-enum Step {
- Prepare(Prepare),
- Execute(Execute),
-}... | --- a/src/conn/futures/prep_exec.rs
+++ b/src/conn/futures/prep_exec.rs
@@ ... @@
use conn::stmt::futures::Execute;
-use conn::stmt::Stmt;
use errors::*;
@@ ... @@
use lib_futures::Poll;
+use std::mem;
use value::Params;
@@ ... @@
-enum Step {
- Prepare(Prepare),
- Execute(Execute),
-}
-
-enum Out {
- Pr... | --- a/src/conn/futures/prep_exec.rs
+++ b/src/conn/futures/prep_exec.rs
@@ -4,3 +4,2 @@
CON use conn::stmt::futures::Execute;
DEL use conn::stmt::Stmt;
CON use errors::*;
@@ -10,2 +9,3 @@
CON use lib_futures::Poll;
ADD use std::mem;
CON use value::Params;
@@ -13,10 +13,7 @@
CON
DEL enum Step {
DEL Prepare(Prepare)... | <<<<<<< SEARCH
use conn::futures::Prepare;
use conn::stmt::futures::Execute;
use conn::stmt::Stmt;
use errors::*;
use lib_futures::Async;
use lib_futures::Async::Ready;
use lib_futures::Future;
use lib_futures::Poll;
use value::Params;
enum Step {
Prepare(Prepare),
Execute(Execute),
}
enum Out {
Prepare(... |
zsiciarz/variablestars.net | 1f98e497136ce3d9da7e63a6dc7c3f67fedf50b5 | observations/views.py | python | mit | Save the observation if the form was valid.
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.views.generic.edit import FormView
from braces.views import LoginRequiredMixin
from .forms import O... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.views.generic.edit import FormView
from braces.views import LoginRequiredMixin
from .forms import O... | 6 | 0 | 1 | add_only | --- a/observations/views.py
+++ b/observations/views.py
@@ -21,2 +21,8 @@
+ def form_valid(self, form):
+ observation = form.save(commit=False)
+ observation.observer = self.request.observer
+ observation.save()
+ return super(AddObservationView, self).form_valid(form)
+
| --- a/observations/views.py
+++ b/observations/views.py
@@ ... @@
+ def form_valid(self, form):
+ observation = form.save(commit=False)
+ observation.observer = self.request.observer
+ observation.save()
+ return super(AddObservationView, self).form_valid(form)
+
| --- a/observations/views.py
+++ b/observations/views.py
@@ -21,2 +21,8 @@
CON
ADD def form_valid(self, form):
ADD observation = form.save(commit=False)
ADD observation.observer = self.request.observer
ADD observation.save()
ADD return super(AddObservationView, self).form_valid(form)... | <<<<<<< SEARCH
success_url = reverse_lazy('observations:add_observation')
class UploadObservationsView(LoginRequiredMixin, FormView):
=======
success_url = reverse_lazy('observations:add_observation')
def form_valid(self, form):
observation = form.save(commit=False)
observation.observer ... |
Mause/autobit | 6fd7f3cb01f621d2ea79e15188f8000c7b6fa361 | tools/add_feed.py | python | mit | Remove code specific to my system
| import os
from urllib.parse import urlencode, quote
from autobit import Client
def add_rarbg_feed(client, name, directory, filter_kwargs):
url = 'http://localhost:5555/{}?{}'.format(
quote(name),
urlencode(filter_kwargs)
)
return client.add_feed(name, url, directory)
def main():
cl... | import os
from autobit import Client
def main():
client = Client('http://localhost:8081/gui/', auth=('admin', '20133'))
client.get_torrents()
name = input('name> ')
directory = input('directory> ')
os.makedirs(directory, exist_ok=True)
client.add_feed(
name,
input('url> '),... | 6 | 23 | 3 | mixed | --- a/tools/add_feed.py
+++ b/tools/add_feed.py
@@ -1,3 +1,2 @@
import os
-from urllib.parse import urlencode, quote
@@ -6,13 +5,5 @@
-def add_rarbg_feed(client, name, directory, filter_kwargs):
- url = 'http://localhost:5555/{}?{}'.format(
- quote(name),
- urlencode(filter_kwargs)
- )
-
- r... | --- a/tools/add_feed.py
+++ b/tools/add_feed.py
@@ ... @@
import os
-from urllib.parse import urlencode, quote
@@ ... @@
-def add_rarbg_feed(client, name, directory, filter_kwargs):
- url = 'http://localhost:5555/{}?{}'.format(
- quote(name),
- urlencode(filter_kwargs)
- )
-
- return client.... | --- a/tools/add_feed.py
+++ b/tools/add_feed.py
@@ -1,3 +1,2 @@
CON import os
DEL from urllib.parse import urlencode, quote
CON
@@ -6,13 +5,5 @@
CON
DEL def add_rarbg_feed(client, name, directory, filter_kwargs):
DEL url = 'http://localhost:5555/{}?{}'.format(
DEL quote(name),
DEL urlencode(filter... | <<<<<<< SEARCH
import os
from urllib.parse import urlencode, quote
from autobit import Client
def add_rarbg_feed(client, name, directory, filter_kwargs):
url = 'http://localhost:5555/{}?{}'.format(
quote(name),
urlencode(filter_kwargs)
)
return client.add_feed(name, url, directory)
def... |
mateusmedeiros/rust_of_life | ea586633392a5755147578b0f8e0221865c7bb99 | src/main.rs | rust | mit | Add the piston tutorials initial code as a base
| fn main() {
println!("Hello, world!");
}
| extern crate piston;
extern crate graphics;
extern crate glutin_window;
extern crate opengl_graphics;
use piston::window::WindowSettings;
use piston::event_loop::*;
use piston::input::*;
use glutin_window::GlutinWindow as Window;
use opengl_graphics::{ GlGraphics, OpenGL };
pub struct App {
gl: GlGraphics, // Ope... | 76 | 1 | 1 | mixed | --- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,78 @@
+extern crate piston;
+extern crate graphics;
+extern crate glutin_window;
+extern crate opengl_graphics;
+
+use piston::window::WindowSettings;
+use piston::event_loop::*;
+use piston::input::*;
+use glutin_window::GlutinWindow as Window;
+use opengl_graphics::{ GlG... | --- a/src/main.rs
+++ b/src/main.rs
@@ ... @@
+extern crate piston;
+extern crate graphics;
+extern crate glutin_window;
+extern crate opengl_graphics;
+
+use piston::window::WindowSettings;
+use piston::event_loop::*;
+use piston::input::*;
+use glutin_window::GlutinWindow as Window;
+use opengl_graphics::{ GlGraphics... | --- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,78 @@
ADD extern crate piston;
ADD extern crate graphics;
ADD extern crate glutin_window;
ADD extern crate opengl_graphics;
ADD
ADD use piston::window::WindowSettings;
ADD use piston::event_loop::*;
ADD use piston::input::*;
ADD use glutin_window::GlutinWindow as Window;
... | <<<<<<< SEARCH
fn main() {
println!("Hello, world!");
}
=======
extern crate piston;
extern crate graphics;
extern crate glutin_window;
extern crate opengl_graphics;
use piston::window::WindowSettings;
use piston::event_loop::*;
use piston::input::*;
use glutin_window::GlutinWindow as Window;
use opengl_graphics:... |
cloudtools/troposphere | b5006a2820051e00c9fe4f5efe43e90129c12b4d | troposphere/cloudtrail.py | python | bsd-2-clause | Update Cloudtrail per 2021-09-10 changes
| from . import AWSObject, AWSProperty, Tags
from .validators import boolean
class DataResource(AWSProperty):
props = {
"Type": (str, True),
"Values": ([str], False),
}
class EventSelector(AWSProperty):
props = {
"DataResources": ([DataResource], False),
"IncludeManagementE... | from . import AWSObject, AWSProperty, Tags
from .validators import boolean
class DataResource(AWSProperty):
props = {
"Type": (str, True),
"Values": ([str], False),
}
class EventSelector(AWSProperty):
props = {
"DataResources": ([DataResource], False),
"ExcludeManagementE... | 9 | 0 | 2 | add_only | --- a/troposphere/cloudtrail.py
+++ b/troposphere/cloudtrail.py
@@ -14,4 +14,11 @@
"DataResources": ([DataResource], False),
+ "ExcludeManagementEventSources": ([str], False),
"IncludeManagementEvents": (boolean, False),
"ReadWriteType": (str, False),
+ }
+
+
+class InsightSelector(... | --- a/troposphere/cloudtrail.py
+++ b/troposphere/cloudtrail.py
@@ ... @@
"DataResources": ([DataResource], False),
+ "ExcludeManagementEventSources": ([str], False),
"IncludeManagementEvents": (boolean, False),
"ReadWriteType": (str, False),
+ }
+
+
+class InsightSelector(AWSProper... | --- a/troposphere/cloudtrail.py
+++ b/troposphere/cloudtrail.py
@@ -14,4 +14,11 @@
CON "DataResources": ([DataResource], False),
ADD "ExcludeManagementEventSources": ([str], False),
CON "IncludeManagementEvents": (boolean, False),
CON "ReadWriteType": (str, False),
ADD }
ADD
ADD
AD... | <<<<<<< SEARCH
props = {
"DataResources": ([DataResource], False),
"IncludeManagementEvents": (boolean, False),
"ReadWriteType": (str, False),
}
=======
props = {
"DataResources": ([DataResource], False),
"ExcludeManagementEventSources": ([str], False),
"Inc... |
datamade/semabot | 60e92f0a085bf7f4cb9f326085e3d4aba11f3594 | bot.py | python | mit | Add actual things that do real stuff
| from flask import Flask
from flow import Flow
from config import ORG_ID, CHANNEL_ID
flow = Flow('botbotbot')
app = Flask(__name__)
@app.route('/')
def index():
flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot')
return 'foo'
if __name__ == "__main__":
app.run()
| import json
import requests
from flask import Flask, request
from flow import Flow
from config import ORG_ID, CHANNEL_ID
flow = Flow('botbotbot')
app = Flask(__name__)
@app.route('/')
def index():
flow.send_message(ORG_ID, CHANNEL_ID, 'botbotbot')
return 'foo'
@app.route('/deployments/', methods=['POST'... | 28 | 2 | 2 | mixed | --- a/bot.py
+++ b/bot.py
@@ -1,2 +1,6 @@
-from flask import Flask
+import json
+
+import requests
+
+from flask import Flask, request
from flow import Flow
@@ -15,3 +19,25 @@
+@app.route('/deployments/', methods=['POST'])
+def failures():
+
+ data = json.loads(request.data.decode('utf-8'))
+ message_type = da... | --- a/bot.py
+++ b/bot.py
@@ ... @@
-from flask import Flask
+import json
+
+import requests
+
+from flask import Flask, request
from flow import Flow
@@ ... @@
+@app.route('/deployments/', methods=['POST'])
+def failures():
+
+ data = json.loads(request.data.decode('utf-8'))
+ message_type = data['Type']
+
+ ... | --- a/bot.py
+++ b/bot.py
@@ -1,2 +1,6 @@
DEL from flask import Flask
ADD import json
ADD
ADD import requests
ADD
ADD from flask import Flask, request
CON from flow import Flow
@@ -15,3 +19,25 @@
CON
ADD @app.route('/deployments/', methods=['POST'])
ADD def failures():
ADD
ADD data = json.loads(request.data.dec... | <<<<<<< SEARCH
from flask import Flask
from flow import Flow
=======
import json
import requests
from flask import Flask, request
from flow import Flow
>>>>>>> REPLACE
<<<<<<< SEARCH
if __name__ == "__main__":
app.run()
=======
@app.route('/deployments/', methods=['POST'])
def failures():
data = js... |
adamjc/rust_calc | c2c8e4325dec929af86222e30715f67fdcbf0478 | src/main.rs | rust | mit | Change how we do operators
| use std::env;
fn multiply (a: f32, b: f32) -> f32 {
return a * b;
}
fn add (a: f32, b: f32) -> f32 {
return a + b;
}
fn divide (a: f32, b: f32) -> f32 {
return a / b;
}
fn subtract (a: f32, b: f32) -> f32 {
return a - b;
}
fn exponent (a: f32, b: f32) -> f32 {
return a.powf(b);
}
fn main () {
... | use std::env;
use std::collections::HashMap;
struct Operator {
precedence: i32,
func: Box<Fn(f32, f32) -> f32>
}
fn main () {
let args: Vec<_> = env::args().collect();
let tokens: Vec<&str> = args[1].split(" ").collect();
let mut output: Vec<i32> = vec![];
let mut operator: Vec<_> = vec![];
... | 31 | 18 | 2 | mixed | --- a/src/main.rs
+++ b/src/main.rs
@@ -1,21 +1,7 @@
use std::env;
+use std::collections::HashMap;
-fn multiply (a: f32, b: f32) -> f32 {
- return a * b;
-}
-
-fn add (a: f32, b: f32) -> f32 {
- return a + b;
-}
-
-fn divide (a: f32, b: f32) -> f32 {
- return a / b;
-}
-
-fn subtract (a: f32, b: f32) -> f32... | --- a/src/main.rs
+++ b/src/main.rs
@@ ... @@
use std::env;
+use std::collections::HashMap;
-fn multiply (a: f32, b: f32) -> f32 {
- return a * b;
-}
-
-fn add (a: f32, b: f32) -> f32 {
- return a + b;
-}
-
-fn divide (a: f32, b: f32) -> f32 {
- return a / b;
-}
-
-fn subtract (a: f32, b: f32) -> f32 {
- ... | --- a/src/main.rs
+++ b/src/main.rs
@@ -1,21 +1,7 @@
CON use std::env;
ADD use std::collections::HashMap;
CON
DEL fn multiply (a: f32, b: f32) -> f32 {
DEL return a * b;
DEL }
DEL
DEL fn add (a: f32, b: f32) -> f32 {
DEL return a + b;
DEL }
DEL
DEL fn divide (a: f32, b: f32) -> f32 {
DEL return a / b;
DE... | <<<<<<< SEARCH
use std::env;
fn multiply (a: f32, b: f32) -> f32 {
return a * b;
}
fn add (a: f32, b: f32) -> f32 {
return a + b;
}
fn divide (a: f32, b: f32) -> f32 {
return a / b;
}
fn subtract (a: f32, b: f32) -> f32 {
return a - b;
}
fn exponent (a: f32, b: f32) -> f32 {
return a.powf(b);
}... |
philippsied/smartcard-course | 0ba953e8f3f78e89d573f322334dfaf345c8bdec | OffCardAPP/src/main/java/clientAPI/ClientFactory.java | java | mit | Rename method for getting PersonalData instance | package clientAPI;
import clientAPI.impl.BonusCreditStoreConnector;
import clientAPI.impl.CryptoStoreConnector;
import clientAPI.impl.PersonalDataConnector;
import clientAPI.impl.TicketManagerConnector;
import clientAPI.impl.WalletConnector;
import javax.smartcardio.Card;
public class ClientFactory {
... | package clientAPI;
import clientAPI.impl.BonusCreditStoreConnector;
import clientAPI.impl.CryptoStoreConnector;
import clientAPI.impl.PersonalDataConnector;
import clientAPI.impl.TicketManagerConnector;
import clientAPI.impl.WalletConnector;
import javax.smartcardio.Card;
public class ClientFactory {
... | 1 | 1 | 1 | mixed | --- a/OffCardAPP/src/main/java/clientAPI/ClientFactory.java
+++ b/OffCardAPP/src/main/java/clientAPI/ClientFactory.java
@@ -42,3 +42,3 @@
*/
- public static PersonalData getCustomerData(Card card) {
+ public static PersonalData getPersonalData(Card card) {
return new PersonalDataConnector(card); | --- a/OffCardAPP/src/main/java/clientAPI/ClientFactory.java
+++ b/OffCardAPP/src/main/java/clientAPI/ClientFactory.java
@@ ... @@
*/
- public static PersonalData getCustomerData(Card card) {
+ public static PersonalData getPersonalData(Card card) {
return new PersonalDataConnector(card);
| --- a/OffCardAPP/src/main/java/clientAPI/ClientFactory.java
+++ b/OffCardAPP/src/main/java/clientAPI/ClientFactory.java
@@ -42,3 +42,3 @@
CON */
DEL public static PersonalData getCustomerData(Card card) {
ADD public static PersonalData getPersonalData(Card card) {
CON return new PersonalDataConnector(card);
| <<<<<<< SEARCH
* @return
*/
public static PersonalData getCustomerData(Card card) {
return new PersonalDataConnector(card);
}
=======
* @return
*/
public static PersonalData getPersonalData(Card card) {
return new PersonalDataConnector(card);
}
>>>>>>> REPLACE
|
cazacugmihai/codebrag | ebdd89802aed62c234093bb196da091d2f7d8b4d | codebrag-ui/app/scripts/invitations/invitationService.js | javascript | agpl-3.0 | Change email validator regexp. Previous one was too dummy :)
| angular.module('codebrag.invitations')
.service('invitationService', function($http, $q) {
this.loadRegisteredUsers = function() {
return $http.get('rest/users/all').then(function(response) {
return response.data.registeredUsers;
});
};
this.loadInv... | angular.module('codebrag.invitations')
.service('invitationService', function($http, $q) {
this.loadRegisteredUsers = function() {
return $http.get('rest/users/all').then(function(response) {
return response.data.registeredUsers;
});
};
this.loadInv... | 3 | 2 | 1 | mixed | --- a/codebrag-ui/app/scripts/invitations/invitationService.js
+++ b/codebrag-ui/app/scripts/invitations/invitationService.js
@@ -32,7 +32,8 @@
return $http.post('rest/invitation', invitationRequestPayload, {unique: true, requestId: 'invitation'});
- }
+ };
this.validateEmails = fu... | --- a/codebrag-ui/app/scripts/invitations/invitationService.js
+++ b/codebrag-ui/app/scripts/invitations/invitationService.js
@@ ... @@
return $http.post('rest/invitation', invitationRequestPayload, {unique: true, requestId: 'invitation'});
- }
+ };
this.validateEmails = function(e... | --- a/codebrag-ui/app/scripts/invitations/invitationService.js
+++ b/codebrag-ui/app/scripts/invitations/invitationService.js
@@ -32,7 +32,8 @@
CON return $http.post('rest/invitation', invitationRequestPayload, {unique: true, requestId: 'invitation'});
DEL }
ADD };
CON
CON this.vali... | <<<<<<< SEARCH
};
return $http.post('rest/invitation', invitationRequestPayload, {unique: true, requestId: 'invitation'});
}
this.validateEmails = function(emailsString) {
var foundInvalid = emailsString.split(/[\s;,]+/).some(function (email) {
return... |
ufocoder/redux-universal-boilerplate | bcada25f33f4c8595b54c2af03ea84142535b62b | src/common/containers/Layout/Header.js | javascript | mit | Add link to 404 example page
| import React, {Component, PropTypes} from 'react';
import {IndexLink, Link} from 'react-router';
import {connect} from 'react-redux';
@connect(
state => ({
loggedIn: state.auth.loggedIn
})
)
export default class Header extends Component {
static propTypes = {
loggedIn: PropTypes.bool
}
render() {
... | import React, {Component, PropTypes} from 'react';
import {IndexLink, Link} from 'react-router';
import {connect} from 'react-redux';
@connect(
state => ({
loggedIn: state.auth.loggedIn
})
)
export default class Header extends Component {
static propTypes = {
loggedIn: PropTypes.bool
}
render() {
... | 4 | 0 | 1 | add_only | --- a/src/common/containers/Layout/Header.js
+++ b/src/common/containers/Layout/Header.js
@@ -23,2 +23,6 @@
title: 'About'
+ },
+ {
+ to: '/404',
+ title: 'Non-exists page'
} | --- a/src/common/containers/Layout/Header.js
+++ b/src/common/containers/Layout/Header.js
@@ ... @@
title: 'About'
+ },
+ {
+ to: '/404',
+ title: 'Non-exists page'
}
| --- a/src/common/containers/Layout/Header.js
+++ b/src/common/containers/Layout/Header.js
@@ -23,2 +23,6 @@
CON title: 'About'
ADD },
ADD {
ADD to: '/404',
ADD title: 'Non-exists page'
CON }
| <<<<<<< SEARCH
to: '/about',
title: 'About'
}
];
=======
to: '/about',
title: 'About'
},
{
to: '/404',
title: 'Non-exists page'
}
];
>>>>>>> REPLACE
|
liujed/polyglot-eclipse | 1df3b8ae40c3bf878ea687b39734398dcda10296 | src/polyglot/frontend/VisitorPass.java | java | lgpl-2.1 | Call NodeVisitor.begin() before visiting ast.
| package jltools.frontend;
import jltools.ast.*;
import jltools.util.*;
/** A pass which runs a visitor. */
public class VisitorPass extends AbstractPass
{
Job job;
NodeVisitor v;
public VisitorPass(Job job) {
this(job, null);
}
public VisitorPass(Job job, NodeVisitor v) {
this.job = job;
this... | package jltools.frontend;
import jltools.ast.*;
import jltools.util.*;
/** A pass which runs a visitor. */
public class VisitorPass extends AbstractPass
{
Job job;
NodeVisitor v;
public VisitorPass(Job job) {
this(job, null);
}
public VisitorPass(Job job, NodeVisitor v) {
this.job = job;
this... | 13 | 9 | 1 | mixed | --- a/src/polyglot/frontend/VisitorPass.java
+++ b/src/polyglot/frontend/VisitorPass.java
@@ -35,15 +35,19 @@
- ErrorQueue q = job.compiler().errorQueue();
- int nErrsBefore = q.errorCount();
+ if (v.begin()) {
+ ErrorQueue q = job.compiler().errorQueue();
+ int nErrsBefore ... | --- a/src/polyglot/frontend/VisitorPass.java
+++ b/src/polyglot/frontend/VisitorPass.java
@@ ... @@
- ErrorQueue q = job.compiler().errorQueue();
- int nErrsBefore = q.errorCount();
+ if (v.begin()) {
+ ErrorQueue q = job.compiler().errorQueue();
+ int nErrsBefore = q.errorC... | --- a/src/polyglot/frontend/VisitorPass.java
+++ b/src/polyglot/frontend/VisitorPass.java
@@ -35,15 +35,19 @@
CON
DEL ErrorQueue q = job.compiler().errorQueue();
DEL int nErrsBefore = q.errorCount();
ADD if (v.begin()) {
ADD ErrorQueue q = job.compiler().errorQueue();
ADD ... | <<<<<<< SEARCH
}
ErrorQueue q = job.compiler().errorQueue();
int nErrsBefore = q.errorCount();
ast = ast.visit(v);
v.finish();
int nErrsAfter = q.errorCount();
job.ast(ast);
return (nErrsBefore == nErrsAfter);
// because, if they're equal, no new errors occured,
... |
klingtnet/rosc | b5d64dab892eeeecbdcf667ab8c797d5d3c4fdc7 | src/osc_types.rs | rust | apache-2.0 | Define `OscMessage` and `OscBundle` structs
| use errors;
// see OSC Type Tag String: http://opensoundcontrol.org/spec-1_0
// padding: zero bytes (n*4)
pub enum OscType {
OscInt(i32),
OscFloat(f32),
OscString(String),
OscBlob(Vec<u8>),
OscTime(u32, u32),
// nonstandard argument types
// ignore them if not implemented
OscLong(i64),
... | use errors;
// see OSC Type Tag String: http://opensoundcontrol.org/spec-1_0
// padding: zero bytes (n*4)
pub enum OscType {
OscInt(i32),
OscFloat(f32),
OscString(String),
OscBlob(Vec<u8>),
OscTime(u32, u32),
// nonstandard argument types
// ignore them if not implemented
OscLong(i64),
... | 9 | 2 | 1 | mixed | --- a/src/osc_types.rs
+++ b/src/osc_types.rs
@@ -38,4 +38,11 @@
-pub struct OscMessage;
-pub struct OscBundle;
+pub struct OscMessage {
+ pub addr: String,
+ pub args: Option<Vec<OscType>>,
+}
+
+pub struct OscBundle {
+ pub timetag: OscType,
+ pub content: Vec<OscPacket>,
+}
| --- a/src/osc_types.rs
+++ b/src/osc_types.rs
@@ ... @@
-pub struct OscMessage;
-pub struct OscBundle;
+pub struct OscMessage {
+ pub addr: String,
+ pub args: Option<Vec<OscType>>,
+}
+
+pub struct OscBundle {
+ pub timetag: OscType,
+ pub content: Vec<OscPacket>,
+}
| --- a/src/osc_types.rs
+++ b/src/osc_types.rs
@@ -38,4 +38,11 @@
CON
DEL pub struct OscMessage;
DEL pub struct OscBundle;
ADD pub struct OscMessage {
ADD pub addr: String,
ADD pub args: Option<Vec<OscType>>,
ADD }
ADD
ADD pub struct OscBundle {
ADD pub timetag: OscType,
ADD pub content: Vec<OscPacket>... | <<<<<<< SEARCH
}
pub struct OscMessage;
pub struct OscBundle;
pub type OscResult<T> = Result<T, errors::OscError>;
=======
}
pub struct OscMessage {
pub addr: String,
pub args: Option<Vec<OscType>>,
}
pub struct OscBundle {
pub timetag: OscType,
pub content: Vec<OscPacket>,
}
pub type OscResult<T> ... |
elifarley/kotlin-misc-lib | 6216431462d726a96e1c9ab9ac9d591beb695d0d | src/com/github/elifarley/kotlin/DateTimeKit.kt | kotlin | mit | Use ZoneId; Check for java.sql.Date instance | import java.time.Instant
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.time.temporal.TemporalAccessor
import java.util.*
/**
* Created by elifarley on 31/08/16.
*/
object DateTimeKit {
@... | import java.time.Instant
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.time.temporal.TemporalAccessor
import java.util.*
/**
* Created by elifarley on 31/08/16.
*/
object DateTimeKit {
@... | 5 | 2 | 1 | mixed | --- a/src/com/github/elifarley/kotlin/DateTimeKit.kt
+++ b/src/com/github/elifarley/kotlin/DateTimeKit.kt
@@ -25,6 +25,9 @@
@JvmOverloads
- fun Instant.toLocalDateTime(zoneOffset: ZoneOffset = ZoneOffset.UTC) = LocalDateTime.ofInstant(this, zoneOffset)!!
+ fun Instant.toLocalDateTime(zoneId: ZoneId = ZoneOff... | --- a/src/com/github/elifarley/kotlin/DateTimeKit.kt
+++ b/src/com/github/elifarley/kotlin/DateTimeKit.kt
@@ ... @@
@JvmOverloads
- fun Instant.toLocalDateTime(zoneOffset: ZoneOffset = ZoneOffset.UTC) = LocalDateTime.ofInstant(this, zoneOffset)!!
+ fun Instant.toLocalDateTime(zoneId: ZoneId = ZoneOffset.UTC)... | --- a/src/com/github/elifarley/kotlin/DateTimeKit.kt
+++ b/src/com/github/elifarley/kotlin/DateTimeKit.kt
@@ -25,6 +25,9 @@
CON @JvmOverloads
DEL fun Instant.toLocalDateTime(zoneOffset: ZoneOffset = ZoneOffset.UTC) = LocalDateTime.ofInstant(this, zoneOffset)!!
ADD fun Instant.toLocalDateTime(zoneId: ZoneId ... | <<<<<<< SEARCH
@JvmOverloads
fun Instant.toLocalDateTime(zoneOffset: ZoneOffset = ZoneOffset.UTC) = LocalDateTime.ofInstant(this, zoneOffset)!!
@JvmOverloads
fun Date.toLocalDateTime(zoneOffset: ZoneOffset = ZoneOffset.UTC) = this.toInstant().toLocalDateTime(zoneOffset)
fun Instant.toGregorianCal... |
emmerge/rockup | 0312a04fc38bf6f174764cb606693e3cb948f4c5 | commands/rock-prepare.js | javascript | mit | Prepare CLI: Wait for all hosts, Capture output
Allow all hosts to finish preparation. Capture output, track on erros, accept limit to single host.
| // RockUp
// Commands-Prepare -- Prepare the server-side to accept deployments
var Spinner = require('clui').Spinner;
var Config = require('../lib/Config');
var RockUtil = require('./util');
module.exports = PrepareCommand;
function PrepareCommand (program) {
program
.command("prepare <environment>")
.alia... | // RockUp
// Commands-Prepare -- Prepare the server-side to accept deployments
var Config = require('../lib/Config');
var reduceAsync = require('../lib/Async').reduce;
var inspect = require('util').inspect;
//var _ = require('underscore');
module.exports = PrepareCommand;
function PrepareCommand (program) {
progr... | 44 | 11 | 2 | mixed | --- a/commands/rock-prepare.js
+++ b/commands/rock-prepare.js
@@ -3,5 +3,7 @@
-var Spinner = require('clui').Spinner;
var Config = require('../lib/Config');
-var RockUtil = require('./util');
+var reduceAsync = require('../lib/Async').reduce;
+
+var inspect = require('util').inspect;
+//var _ = require('underscore')... | --- a/commands/rock-prepare.js
+++ b/commands/rock-prepare.js
@@ ... @@
-var Spinner = require('clui').Spinner;
var Config = require('../lib/Config');
-var RockUtil = require('./util');
+var reduceAsync = require('../lib/Async').reduce;
+
+var inspect = require('util').inspect;
+//var _ = require('underscore');
@@... | --- a/commands/rock-prepare.js
+++ b/commands/rock-prepare.js
@@ -3,5 +3,7 @@
CON
DEL var Spinner = require('clui').Spinner;
CON var Config = require('../lib/Config');
DEL var RockUtil = require('./util');
ADD var reduceAsync = require('../lib/Async').reduce;
ADD
ADD var inspect = require('util').inspect;
ADD //var _... | <<<<<<< SEARCH
// Commands-Prepare -- Prepare the server-side to accept deployments
var Spinner = require('clui').Spinner;
var Config = require('../lib/Config');
var RockUtil = require('./util');
module.exports = PrepareCommand;
=======
// Commands-Prepare -- Prepare the server-side to accept deployments
var Config... |
statsbiblioteket/newspaper-statistics | 6d882e38aa7ef5a16dd46ff9d3c275c2ddda63a6 | src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java | java | apache-2.0 | Update to newest snapshot, including a few changes stemming from this.
| package dk.statsbiblioteket.medieplatform.newspaper.statistics;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import dk.statsbiblioteket.medieplatform.autonomous.Batch;
import dk.statsbiblioteket.medieplatform.autonomous.ResultCollector;
import dk.statsbiblioteket.medieplatform.autonomo... | package dk.statsbiblioteket.medieplatform.newspaper.statistics;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import dk.statsbiblioteket.medieplatform.autonomous.Batch;
import dk.statsbiblioteket.medieplatform.autonomous.ResultCollector;
import dk.statsbiblioteket.medieplatform.autonomo... | 2 | 2 | 1 | mixed | --- a/src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java
+++ b/src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java
@@ -35,4 +35,4 @@
{ new StatisticGenerator(batch, properties) });
- EventRunner ... | --- a/src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java
+++ b/src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java
@@ ... @@
{ new StatisticGenerator(batch, properties) });
- EventRunner eventRun... | --- a/src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java
+++ b/src/main/java/dk/statsbiblioteket/medieplatform/newspaper/statistics/StatisticsRunnableComponent.java
@@ -35,4 +35,4 @@
CON { new StatisticGenerator(batch, properties) });
DEL EventR... | <<<<<<< SEARCH
List<TreeEventHandler> statisticGenerator = Arrays.asList(new TreeEventHandler[]
{ new StatisticGenerator(batch, properties) });
EventRunner eventRunner = new EventRunner(createIterator(batch));
eventRunner.runEvents(statisticGenerator, resultCollector);
lo... |
brainwane/zulip | 3a9568b4d4de969b1e2031e8d2d3cdd7bd56824f | zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py | python | apache-2.0 | migrations: Fix zulipinternal migration corner case.
It's theoretically possible to have configured a Zulip server where
the system bots live in the same realm as normal users (and may have
in fact been the default in early Zulip releases? Unclear.). We
should handle these without the migration intended to clean up ... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
def rename_zulip_realm_to_zulipinternal(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> Non... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
def rename_zulip_realm_to_zulipinternal(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> Non... | 4 | 0 | 1 | add_only | --- a/zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
+++ b/zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
@@ -19,2 +19,6 @@
if Realm.objects.filter(string_id="zulipinternal").exists():
+ return
+ if not Realm.objects.filter(string_id="zulip").exists():
+ # If the user... | --- a/zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
+++ b/zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
@@ ... @@
if Realm.objects.filter(string_id="zulipinternal").exists():
+ return
+ if not Realm.objects.filter(string_id="zulip").exists():
+ # If the user renamed... | --- a/zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
+++ b/zerver/migrations/0237_rename_zulip_realm_to_zulipinternal.py
@@ -19,2 +19,6 @@
CON if Realm.objects.filter(string_id="zulipinternal").exists():
ADD return
ADD if not Realm.objects.filter(string_id="zulip").exists():
ADD #... | <<<<<<< SEARCH
if Realm.objects.filter(string_id="zulipinternal").exists():
return
=======
if Realm.objects.filter(string_id="zulipinternal").exists():
return
if not Realm.objects.filter(string_id="zulip").exists():
# If the user renamed the `zulip` system bot realm (or deleted
... |
MaxWhere/electron | dc1056891723ea4ca63730114384bb2bb1502f1e | lib/renderer/extensions/storage.js | javascript | mit | Handle the three get cases
|
const getStorage = () => {
const data = window.localStorage.getItem('__chrome.storage.sync__')
if (data != null) {
return JSON.parse(data)
} else {
return {}
}
}
const setStorage = (storage) => {
const json = JSON.stringify(storage)
window.localStorage.setItem('__chrome.storage.sync__', json)
}
... |
const getStorage = () => {
const data = window.localStorage.getItem('__chrome.storage.sync__')
if (data != null) {
return JSON.parse(data)
} else {
return {}
}
}
const setStorage = (storage) => {
const json = JSON.stringify(storage)
window.localStorage.setItem('__chrome.storage.sync__', json)
}
... | 17 | 16 | 1 | mixed | --- a/lib/renderer/extensions/storage.js
+++ b/lib/renderer/extensions/storage.js
@@ -19,22 +19,23 @@
const storage = getStorage()
+ if (keys == null) return storage
- if (keys === {} || keys === []) return {}
- if (keys === null) return storage
-
- if (typeof keys === 'string') keys = [key... | --- a/lib/renderer/extensions/storage.js
+++ b/lib/renderer/extensions/storage.js
@@ ... @@
const storage = getStorage()
+ if (keys == null) return storage
- if (keys === {} || keys === []) return {}
- if (keys === null) return storage
-
- if (typeof keys === 'string') keys = [keys]
+ ... | --- a/lib/renderer/extensions/storage.js
+++ b/lib/renderer/extensions/storage.js
@@ -19,22 +19,23 @@
CON const storage = getStorage()
ADD if (keys == null) return storage
CON
DEL if (keys === {} || keys === []) return {}
DEL if (keys === null) return storage
DEL
DEL if (typeof keys === ... | <<<<<<< SEARCH
get (keys, callback) {
const storage = getStorage()
if (keys === {} || keys === []) return {}
if (keys === null) return storage
if (typeof keys === 'string') keys = [keys]
let items = {}
// ['foo'] or ['foo', 'bar'] or [{foo: 'bar'}]
keys.forEach(function ... |
graydon/rust | 5e983d7b3f03e9243d905e0579f32be00170c9af | src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs | rust | apache-2.0 | Add a test for syntax like: ..t.s
| // run-pass
// Test that functional record update/struct update syntax works inside
// a closure when the feature `capture_disjoint_fields` is enabled.
#![feature(capture_disjoint_fields)]
//~^ WARNING: the feature `capture_disjoint_fields` is incomplete
//~| NOTE: `#[warn(incomplete_features)]` on by default
//~| NO... | // run-pass
// Test that functional record update/struct update syntax works inside
// a closure when the feature `capture_disjoint_fields` is enabled.
#![feature(capture_disjoint_fields)]
//~^ WARNING: the feature `capture_disjoint_fields` is incomplete
//~| NOTE: `#[warn(incomplete_features)]` on by default
//~| NO... | 17 | 1 | 4 | mixed | --- a/src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
+++ b/src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
@@ -10,2 +10,3 @@
+#[derive(Clone)]
struct S {
@@ -15,2 +16,7 @@
+struct T {
+ a: String,
+ s: S,
+}
+
fn main() {
@@ -18,3 +24,8 @@
let b = String::new();
+ ... | --- a/src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
+++ b/src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
@@ ... @@
+#[derive(Clone)]
struct S {
@@ ... @@
+struct T {
+ a: String,
+ s: S,
+}
+
fn main() {
@@ ... @@
let b = String::new();
+ let c = String::new();... | --- a/src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
+++ b/src/test/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
@@ -10,2 +10,3 @@
CON
ADD #[derive(Clone)]
CON struct S {
@@ -15,2 +16,7 @@
CON
ADD struct T {
ADD a: String,
ADD s: S,
ADD }
ADD
CON fn main() {
@@ -18,3 +24,8 @@
C... | <<<<<<< SEARCH
//~| NOTE: see issue #53488 <https://github.com/rust-lang/rust/issues/53488>
struct S {
a: String,
b: String,
}
fn main() {
let a = String::new();
let b = String::new();
let s = S {a, b};
let c = || {
let s2 = S {
a: format!("New a"),
..s
... |
handstandsam/ShoppingApp | 547358e198e0a9e820aa5d5ee0c6792d796c04f5 | shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt | kotlin | apache-2.0 | Make it more clear how we are sending updates to the channel.
| package com.handstandsam.shoppingapp.cart
import com.handstandsam.shoppingapp.models.ItemWithQuantity
import kotlinx.coroutines.channels.ConflatedBroadcastChannel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow
/**
* In memory implementation of our [ShoppingCartDao]
*/
class InMemoryShoppi... | package com.handstandsam.shoppingapp.cart
import com.handstandsam.shoppingapp.models.ItemWithQuantity
import kotlinx.coroutines.channels.ConflatedBroadcastChannel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.asFlow
/**
* In memory implementation of our [ShoppingCartDao]
*/
class InMemoryShoppi... | 6 | 8 | 4 | mixed | --- a/shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt
+++ b/shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt
@@ -22,3 +22,3 @@
itemsInCart[itemWithQuantity.item.label] = itemWithQuantity
- sendUpdateChannel()
+ chann... | --- a/shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt
+++ b/shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt
@@ ... @@
itemsInCart[itemWithQuantity.item.label] = itemWithQuantity
- sendUpdateChannel()
+ channel.send(... | --- a/shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt
+++ b/shopping-cart/src/main/java/com/handstandsam/shoppingapp/cart/InMemoryShoppingCartDao.kt
@@ -22,3 +22,3 @@
CON itemsInCart[itemWithQuantity.item.label] = itemWithQuantity
DEL sendUpdateChannel()
ADD ... | <<<<<<< SEARCH
override suspend fun upsert(itemWithQuantity: ItemWithQuantity) {
itemsInCart[itemWithQuantity.item.label] = itemWithQuantity
sendUpdateChannel()
}
override suspend fun remove(itemWithQuantity: ItemWithQuantity) {
itemsInCart.remove(itemWithQuantity.item.label)
... |
virajs/selenium-1 | 03075139596781aeeab98f4f1ea17644d10220f5 | selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java | java | apache-2.0 | SimonStewart: Make the selenium-backed webdriver emulate the normal webdriver's xpath mode
git-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@10674 07704840-8298-11de-bf8c-fd130f914ac9
| /*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... | /*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... | 5 | 0 | 1 | add_only | --- a/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
+++ b/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
@@ -29,2 +29,7 @@
selenium.start();
+
+ // Emulate behaviour of webdriver
+ selenium.useXpathLibrary("javascript-xpath");
+ selenium.allow... | --- a/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
+++ b/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
@@ ... @@
selenium.start();
+
+ // Emulate behaviour of webdriver
+ selenium.useXpathLibrary("javascript-xpath");
+ selenium.allowNativeXp... | --- a/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
+++ b/selenium/src/java/org/openqa/selenium/internal/selenesedriver/NewSession.java
@@ -29,2 +29,7 @@
CON selenium.start();
ADD
ADD // Emulate behaviour of webdriver
ADD selenium.useXpathLibrary("javascript-xpath");
ADD ... | <<<<<<< SEARCH
public Map<String, Object> apply(Selenium selenium, Map<String, ?> args) {
selenium.start();
Capabilities capabilities = (Capabilities) args.get("desiredCapabilities");
Map<String, Object> seenCapabilities = new HashMap<String, Object>();
=======
public Map<String, Object> apply(Sele... |
TAOTheCrab/CrabBot | 9cb406e18cedf8995c31a1760968a1ee86423c5f | setup.py | python | mit | Tweak the package name, add a note
| #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | #!/usr/bin/env python3
from setuptools import setup, find_packages
# We want to restrict newer versions while we deal with upstream breaking changes.
discordpy_version = '==0.10.0'
# TODO read README(.rst? .md looks bad on pypi) for long_description.
# Could use pandoc, but the end user shouldn't need to do thi... | 3 | 1 | 2 | mixed | --- a/setup.py
+++ b/setup.py
@@ -13,3 +13,3 @@
# More permanent entries
- name='CrabBot',
+ name='crabbot',
author='TAOTheCrab',
@@ -38,2 +38,4 @@
}
+
+ # scripts=['__main__.py']
) | --- a/setup.py
+++ b/setup.py
@@ ... @@
# More permanent entries
- name='CrabBot',
+ name='crabbot',
author='TAOTheCrab',
@@ ... @@
}
+
+ # scripts=['__main__.py']
)
| --- a/setup.py
+++ b/setup.py
@@ -13,3 +13,3 @@
CON # More permanent entries
DEL name='CrabBot',
ADD name='crabbot',
CON author='TAOTheCrab',
@@ -38,2 +38,4 @@
CON }
ADD
ADD # scripts=['__main__.py']
CON )
| <<<<<<< SEARCH
setup(
# More permanent entries
name='CrabBot',
author='TAOTheCrab',
url='https://github.com/TAOTheCrab/CrabBot',
=======
setup(
# More permanent entries
name='crabbot',
author='TAOTheCrab',
url='https://github.com/TAOTheCrab/CrabBot',
>>>>>>> REPLACE
<<<<<<< SEARCH
... |
zalando/nakadi | c3cdff70a8ecf349b0655fda59a765fd9bd1e172 | core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java | java | mit | Revert "Trying direct printing instead of logs"
This reverts commit 92953b6f541fc94e7f4b93d5d8ac1faa8d240ca9.
| package org.zalando.nakadi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Closeable;
import java.util.HashSet;
import java.util.Set;
public class ShutdownHooks {
private static final Set<Runnable> HOOKS = new HashSet<>();
private static final Logger LOG = LoggerFactory.getLogger(Sh... | package org.zalando.nakadi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Closeable;
import java.util.HashSet;
import java.util.Set;
public class ShutdownHooks {
private static final Set<Runnable> HOOKS = new HashSet<>();
private static final Logger LOG = LoggerFactory.getLogger(Sh... | 2 | 2 | 2 | mixed | --- a/core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java
+++ b/core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java
@@ -19,3 +19,3 @@
private static void onNodeShutdown() {
- System.out.println("Processing shutdown hooks");
+ LOG.info("Processing shutdown hooks");
... | --- a/core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java
+++ b/core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java
@@ ... @@
private static void onNodeShutdown() {
- System.out.println("Processing shutdown hooks");
+ LOG.info("Processing shutdown hooks");
boolean... | --- a/core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java
+++ b/core-services/src/main/java/org/zalando/nakadi/ShutdownHooks.java
@@ -19,3 +19,3 @@
CON private static void onNodeShutdown() {
DEL System.out.println("Processing shutdown hooks");
ADD LOG.info("Processing shutdown hooks");... | <<<<<<< SEARCH
private static void onNodeShutdown() {
System.out.println("Processing shutdown hooks");
boolean haveHooks = true;
while (haveHooks) {
=======
private static void onNodeShutdown() {
LOG.info("Processing shutdown hooks");
boolean haveHooks = true;
... |
robinverduijn/gradle | aa7e53822a3815ccb655b1c12dabedc7b2302578 | provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt | kotlin | apache-2.0 | Add newly added configurations to test case expectation
| package org.gradle.kotlin.dsl.accessors
import org.gradle.kotlin.dsl.fixtures.AbstractIntegrationTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
class GenerateProjectSchemaTest : AbstractIntegrationTest() {
@Test
fun `writes multi-project sche... | package org.gradle.kotlin.dsl.accessors
import org.gradle.kotlin.dsl.fixtures.AbstractIntegrationTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
class GenerateProjectSchemaTest : AbstractIntegrationTest() {
@Test
fun `writes multi-project sche... | 2 | 0 | 1 | add_only | --- a/provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt
+++ b/provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt
@@ -34,4 +34,6 @@
configurations = listOf(
+ "annotationProcessor",
... | --- a/provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt
+++ b/provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt
@@ ... @@
configurations = listOf(
+ "annotationProcessor",
... | --- a/provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt
+++ b/provider/src/test/kotlin/org/gradle/kotlin/dsl/accessors/GenerateProjectSchemaTest.kt
@@ -34,4 +34,6 @@
CON configurations = listOf(
ADD "annotationProcessor",
CON ... | <<<<<<< SEARCH
"java" to "org.gradle.api.plugins.JavaPluginConvention"),
configurations = listOf(
"apiElements", "archives", "compile", "compileClasspath", "compileOnly", "default",
"implementation", "runtime", "... |
sourrust/flac | 1c8e33fbb051c4ab70e421164f03f557788f5741 | examples/metadata.rs | rust | bsd-3-clause | Fix typo for picture subcommand
| extern crate docopt;
extern crate flac;
extern crate rustc_serialize;
#[macro_use]
mod commands;
use std::env;
use commands::{streaminfo, comments, seektable, picture};
use docopt::Docopt;
const USAGE: &'static str = "
Usage: metadata <command> [<args>...]
metadata [options]
Options:
-h, --help Show this... | extern crate docopt;
extern crate flac;
extern crate rustc_serialize;
#[macro_use]
mod commands;
use std::env;
use commands::{streaminfo, comments, seektable, picture};
use docopt::Docopt;
const USAGE: &'static str = "
Usage: metadata <command> [<args>...]
metadata [options]
Options:
-h, --help Show this... | 1 | 1 | 1 | mixed | --- a/examples/metadata.rs
+++ b/examples/metadata.rs
@@ -23,3 +23,3 @@
seektable Display seek table.
- picture Export picutes.
+ picture Export pictures.
"; | --- a/examples/metadata.rs
+++ b/examples/metadata.rs
@@ ... @@
seektable Display seek table.
- picture Export picutes.
+ picture Export pictures.
";
| --- a/examples/metadata.rs
+++ b/examples/metadata.rs
@@ -23,3 +23,3 @@
CON seektable Display seek table.
DEL picture Export picutes.
ADD picture Export pictures.
CON ";
| <<<<<<< SEARCH
comments Display or export comment tags.
seektable Display seek table.
picture Export picutes.
";
=======
comments Display or export comment tags.
seektable Display seek table.
picture Export pictures.
";
>>>>>>> REPLACE
|
KotlinNLP/SimpleDNN | b93fa5bac8557476a03f6d53f042bac1db909ebc | src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt | kotlin | mpl-2.0 | Add shape and size attributes
| /* Copyright 2016-present The KotlinNLP Authors. All Rights Reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/.
* ------------------------------------------... | /* Copyright 2016-present The KotlinNLP Authors. All Rights Reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/.
* ------------------------------------------... | 6 | 1 | 2 | mixed | --- a/src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt
+++ b/src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt
@@ -12,3 +12,3 @@
*/
-class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>) : Iterable<Indices> {
+class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>,... | --- a/src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt
+++ b/src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt
@@ ... @@
*/
-class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>) : Iterable<Indices> {
+class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>, val sha... | --- a/src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt
+++ b/src/kotlin/com/kotlinnlp/simplednn/simplemath/ndarray/NDArrayMask.kt
@@ -12,3 +12,3 @@
CON */
DEL class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>) : Iterable<Indices> {
ADD class NDArrayMask(val dim1: Array<Int>, val dim2: Ar... | <<<<<<< SEARCH
*
*/
class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>) : Iterable<Indices> {
init {
require(dim1.size == dim2.size)
}
/**
=======
*
*/
class NDArrayMask(val dim1: Array<Int>, val dim2: Array<Int>, val shape: Shape) : Iterable<Indices> {
init {
require(dim1.size == dim2... |
squanchy-dev/squanchy-android | 5e29239f9c775d2bbda771c4a9f4688d2bc7028d | app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt | kotlin | apache-2.0 | Change scrolling to next event logic
If we're less than 60% through the current item, scroll to the current item. Otherwise, scroll to the next item.
| package net.squanchy.schedule.domain.view
import net.squanchy.support.system.CurrentTime
import org.joda.time.DateTimeZone
private const val NOT_FOUND_INDEX = -1
private const val FIRST_PAGE_INDEX = 0
data class Schedule(val pages: List<SchedulePage>, val timezone: DateTimeZone) {
val isEmpty: Boolean
g... | package net.squanchy.schedule.domain.view
import net.squanchy.support.system.CurrentTime
import org.joda.time.DateTimeZone
private const val NOT_FOUND_INDEX = -1
private const val FIRST_PAGE_INDEX = 0
private const val CURRENT_SLOT_THRESHOLD = .6f
data class Schedule(val pages: List<SchedulePage>, val timezone: Dat... | 13 | 3 | 3 | mixed | --- a/app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt
+++ b/app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt
@@ -7,2 +7,4 @@
private const val FIRST_PAGE_INDEX = 0
+
+private const val CURRENT_SLOT_THRESHOLD = .6f
@@ -32,4 +34,3 @@
fun findNextEventForPage(page: SchedulePage, curr... | --- a/app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt
+++ b/app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt
@@ ... @@
private const val FIRST_PAGE_INDEX = 0
+
+private const val CURRENT_SLOT_THRESHOLD = .6f
@@ ... @@
fun findNextEventForPage(page: SchedulePage, currentTime: Curre... | --- a/app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt
+++ b/app/src/main/java/net/squanchy/schedule/domain/view/Schedule.kt
@@ -7,2 +7,4 @@
CON private const val FIRST_PAGE_INDEX = 0
ADD
ADD private const val CURRENT_SLOT_THRESHOLD = .6f
CON
@@ -32,4 +34,3 @@
CON fun findNextEventForPage(page: Sch... | <<<<<<< SEARCH
private const val NOT_FOUND_INDEX = -1
private const val FIRST_PAGE_INDEX = 0
data class Schedule(val pages: List<SchedulePage>, val timezone: DateTimeZone) {
=======
private const val NOT_FOUND_INDEX = -1
private const val FIRST_PAGE_INDEX = 0
private const val CURRENT_SLOT_THRESHOLD = .6f
data clas... |
ampl/amplpy | 48394c55599968c456f1f58c0fcdf58e1750f293 | amplpy/tests/TestBase.py | python | bsd-3-clause | Add workaround for tests on MSYS2 and MINGW
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division
from builtins import map, range, object, zip, sorted
from .context import amplpy
import unittest
import tempfile
import shutil
import os
class TestBase(unittest.TestCase):
def setUp(self):
self.... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division
from builtins import map, range, object, zip, sorted
from .context import amplpy
import unittest
import tempfile
import shutil
import os
# For MSYS2, MINGW, etc., run with:
# $ REAL_ROOT=`cygpath -w /` pyth... | 17 | 3 | 2 | mixed | --- a/amplpy/tests/TestBase.py
+++ b/amplpy/tests/TestBase.py
@@ -12,2 +12,7 @@
+# For MSYS2, MINGW, etc., run with:
+# $ REAL_ROOT=`cygpath -w /` python -m amplpy.tests
+REAL_ROOT = os.environ.get('REAL_ROOT', None)
+
+
class TestBase(unittest.TestCase):
@@ -17,10 +22,19 @@
+ def _tmpfile(self, filename):
+ ... | --- a/amplpy/tests/TestBase.py
+++ b/amplpy/tests/TestBase.py
@@ ... @@
+# For MSYS2, MINGW, etc., run with:
+# $ REAL_ROOT=`cygpath -w /` python -m amplpy.tests
+REAL_ROOT = os.environ.get('REAL_ROOT', None)
+
+
class TestBase(unittest.TestCase):
@@ ... @@
+ def _tmpfile(self, filename):
+ return os.pat... | --- a/amplpy/tests/TestBase.py
+++ b/amplpy/tests/TestBase.py
@@ -12,2 +12,7 @@
CON
ADD # For MSYS2, MINGW, etc., run with:
ADD # $ REAL_ROOT=`cygpath -w /` python -m amplpy.tests
ADD REAL_ROOT = os.environ.get('REAL_ROOT', None)
ADD
ADD
CON class TestBase(unittest.TestCase):
@@ -17,10 +22,19 @@
CON
ADD def _tm... | <<<<<<< SEARCH
class TestBase(unittest.TestCase):
def setUp(self):
self.ampl = amplpy.AMPL()
self.dirpath = tempfile.mkdtemp()
def str2file(self, filename, content):
fullpath = self.tmpfile(filename)
with open(fullpath, 'w') as f:
print(content, file=f)
ret... |
achanda/crates.io | fadf6b94caec4c9fc1afd4cc7767afdb1105668c | src/dist.rs | rust | apache-2.0 | Revert "Assume html if no Accept header is presented"
This reverts commit c9e1c375841ddc4a21d7792ecabbe4b7c7cc0a46.
| use std::error::Error;
use conduit::{Request, Response, Handler};
use conduit_static::Static;
use conduit_middleware::AroundMiddleware;
use util::RequestProxy;
pub struct Middleware {
handler: Option<Box<Handler>>,
dist: Static,
}
impl Middleware {
pub fn new() -> Middleware {
Middleware {
... | use std::error::Error;
use conduit::{Request, Response, Handler};
use conduit_static::Static;
use conduit_middleware::AroundMiddleware;
use util::RequestProxy;
pub struct Middleware {
handler: Option<Box<Handler>>,
dist: Static,
}
impl Middleware {
pub fn new() -> Middleware {
Middleware {
... | 1 | 1 | 1 | mixed | --- a/src/dist.rs
+++ b/src/dist.rs
@@ -41,3 +41,3 @@
accept.iter().any(|s| s.contains("html"))
- }).unwrap_or(true); // If no Accept header is specified, serve up html.
+ }).unwrap_or(false);
if wants_html { | --- a/src/dist.rs
+++ b/src/dist.rs
@@ ... @@
accept.iter().any(|s| s.contains("html"))
- }).unwrap_or(true); // If no Accept header is specified, serve up html.
+ }).unwrap_or(false);
if wants_html {
| --- a/src/dist.rs
+++ b/src/dist.rs
@@ -41,3 +41,3 @@
CON accept.iter().any(|s| s.contains("html"))
DEL }).unwrap_or(true); // If no Accept header is specified, serve up html.
ADD }).unwrap_or(false);
CON if wants_html {
| <<<<<<< SEARCH
let wants_html = req.headers().find("Accept").map(|accept| {
accept.iter().any(|s| s.contains("html"))
}).unwrap_or(true); // If no Accept header is specified, serve up html.
if wants_html {
self.dist.call(&mut RequestProxy {
=======
let wants_html... |
suutari-ai/django-enumfields | 5c3900e12216164712c9e7fe7ea064e70fae8d1b | enumfields/enums.py | python | mit | Fix 'Labels' class in Python 3.
In Python 3, the attrs dict will already be an _EnumDict, which has a
separate list of member names (in Python 2, it is still a plain dict at this
point).
| import inspect
from django.utils.encoding import force_bytes, python_2_unicode_compatible
from enum import Enum as BaseEnum, EnumMeta as BaseEnumMeta
import six
class EnumMeta(BaseEnumMeta):
def __new__(cls, name, bases, attrs):
Labels = attrs.get('Labels')
if Labels is not None and inspect.iscla... | import inspect
from django.utils.encoding import force_bytes, python_2_unicode_compatible
from enum import Enum as BaseEnum, EnumMeta as BaseEnumMeta
import six
class EnumMeta(BaseEnumMeta):
def __new__(cls, name, bases, attrs):
Labels = attrs.get('Labels')
if Labels is not None and inspect.iscla... | 2 | 0 | 1 | add_only | --- a/enumfields/enums.py
+++ b/enumfields/enums.py
@@ -12,2 +12,4 @@
del attrs['Labels']
+ if hasattr(attrs, '_member_names'):
+ attrs._member_names.remove('Labels')
| --- a/enumfields/enums.py
+++ b/enumfields/enums.py
@@ ... @@
del attrs['Labels']
+ if hasattr(attrs, '_member_names'):
+ attrs._member_names.remove('Labels')
| --- a/enumfields/enums.py
+++ b/enumfields/enums.py
@@ -12,2 +12,4 @@
CON del attrs['Labels']
ADD if hasattr(attrs, '_member_names'):
ADD attrs._member_names.remove('Labels')
CON
| <<<<<<< SEARCH
if Labels is not None and inspect.isclass(Labels):
del attrs['Labels']
obj = BaseEnumMeta.__new__(cls, name, bases, attrs)
=======
if Labels is not None and inspect.isclass(Labels):
del attrs['Labels']
if hasattr(attrs, '_member_names'):
... |
millerdev/django-nose | e01697c5d5e5e45a0dd20870c71bb17399991ca1 | setup.py | python | bsd-3-clause | Comment out entrypoint because it blows up django-nose in connection with tox. Ouch.
| import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='django-nose',
version='0.2',
description='Django test runner that uses nose.',
long_description=open(os.path.join(ROOT, 'README.rst')).read(),
author='Jeff Balogh',
author_email... | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='django-nose',
version='0.2',
description='Django test runner that uses nose.',
long_description=open(os.path.join(ROOT, 'README.rst')).read(),
author='Jeff Balogh',
author_email... | 10 | 4 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -19,6 +19,12 @@
tests_require=['Django', 'south'],
- entry_points="""
- [nose.plugins.0.10]
- fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
- """,
+ # This blows up tox runs that install django-nose into a virtualenv,
+ # because... | --- a/setup.py
+++ b/setup.py
@@ ... @@
tests_require=['Django', 'south'],
- entry_points="""
- [nose.plugins.0.10]
- fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
- """,
+ # This blows up tox runs that install django-nose into a virtualenv,
+ # because it cause... | --- a/setup.py
+++ b/setup.py
@@ -19,6 +19,12 @@
CON tests_require=['Django', 'south'],
DEL entry_points="""
DEL [nose.plugins.0.10]
DEL fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
DEL """,
ADD # This blows up tox runs that install django-nose into a virtuale... | <<<<<<< SEARCH
install_requires=['nose'],
tests_require=['Django', 'south'],
entry_points="""
[nose.plugins.0.10]
fixture_bundler = django_nose.fixture_bundling:FixtureBundlingPlugin
""",
classifiers=[
'Development Status :: 4 - Beta',
=======
install_requires=['nose... |
Musician101/ServerSaturday | cd7e4b63ebbb2c14d27d9bcdeb3d6388dff58522 | serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java | java | mit | Fix an issue with updating builds.
| package com.campmongoose.serversaturday.common.submission;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public abstract class AbstractSubmitter<B extends... | package com.campmongoose.serversaturday.common.submission;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public abstract class AbstractSubmitter<B extends... | 6 | 0 | 1 | add_only | --- a/serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java
+++ b/serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java
@@ -54,2 +54,8 @@
+ public void renameBuild(String newName, B build) {
+ build... | --- a/serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java
+++ b/serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java
@@ ... @@
+ public void renameBuild(String newName, B build) {
+ builds.remove... | --- a/serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java
+++ b/serversaturday-common/src/main/java/com/campmongoose/serversaturday/common/submission/AbstractSubmitter.java
@@ -54,2 +54,8 @@
CON
ADD public void renameBuild(String newName, B build) {
ADD ... | <<<<<<< SEARCH
}
public abstract void save(@Nonnull File file);
}
=======
}
public void renameBuild(String newName, B build) {
builds.remove(build.getName());
build.setName(newName);
builds.put(newName, build);
}
public abstract void save(@Nonnull File file);
}
>>>>>... |
ericvaladas/formwood | 68dd29d7c91eb2d01cfb0518adb7091a7fa8d3d2 | src/js/forms/components/field.js | javascript | mit | Add case for select-multiple inputs | import React from 'react';
import classNames from 'classnames';
export default function(WrappedComponent) {
const Field = React.createClass({
getInitialState() {
return {
value: "",
message: "",
valid: true
};
},
componentDidMount() {
this.validators = this.val... | import React from 'react';
export default function(WrappedComponent) {
const Field = React.createClass({
getInitialState() {
return {
value: "",
message: "",
valid: true
};
},
componentDidMount() {
this.validators = this.validators || [];
let validators =... | 7 | 1 | 2 | mixed | --- a/src/js/forms/components/field.js
+++ b/src/js/forms/components/field.js
@@ -1,3 +1,2 @@
import React from 'react';
-import classNames from 'classnames';
@@ -39,2 +38,9 @@
this.setState({value: event.target.checked}, resolve); break;
+ case "select-multiple":
+ this.setState({
+... | --- a/src/js/forms/components/field.js
+++ b/src/js/forms/components/field.js
@@ ... @@
import React from 'react';
-import classNames from 'classnames';
@@ ... @@
this.setState({value: event.target.checked}, resolve); break;
+ case "select-multiple":
+ this.setState({
+ ... | --- a/src/js/forms/components/field.js
+++ b/src/js/forms/components/field.js
@@ -1,3 +1,2 @@
CON import React from 'react';
DEL import classNames from 'classnames';
CON
@@ -39,2 +38,9 @@
CON this.setState({value: event.target.checked}, resolve); break;
ADD case "select-multiple":
ADD ... | <<<<<<< SEARCH
import React from 'react';
import classNames from 'classnames';
=======
import React from 'react';
>>>>>>> REPLACE
<<<<<<< SEARCH
case "checkbox":
this.setState({value: event.target.checked}, resolve); break;
default:
this.setState({value: event.target.v... |
gradle/gradle | 514533f6bc7f062b30f54fe80e3ec10b699a1486 | subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts | kotlin | apache-2.0 | Fix broken Kotlin sample test.
| // tag::apply[]
// tag::publish[]
plugins {
`kotlin-dsl`
// end::apply[]
`maven-publish`
// tag::apply[]
}
// end::apply[]
group = "com.myorg.conventions"
version = "1.0"
publishing {
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url = uri(... | // tag::apply[]
// tag::publish[]
plugins {
`kotlin-dsl`
// end::apply[]
`maven-publish`
// tag::apply[]
}
// end::apply[]
group = "com.myorg.conventions"
version = "1.0"
publishing {
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url = uri(... | 1 | 1 | 1 | mixed | --- a/subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts
+++ b/subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts
@@ -30,3 +30,3 @@
suites {
- tes... | --- a/subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts
+++ b/subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts
@@ ... @@
suites {
- test {
+ ... | --- a/subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts
+++ b/subprojects/docs/src/samples/incubating/build-organization/publishing-convention-plugins/kotlin/convention-plugins/build.gradle.kts
@@ -30,3 +30,3 @@
CON suites {
DEL ... | <<<<<<< SEARCH
testing {
suites {
test {
useJUnit()
}
=======
testing {
suites {
val test by getting(JvmTestSuite::class) {
useJUnit()
}
>>>>>>> REPLACE
|
dubrowgn/tcalc | 2f8d78dc78e2bd0eee456541d4e57e3f7bd23c6b | src/main.rs | rust | mit | Add support for passing equations via args
$ tcalc 1+1
2
| use std::env;
use std::io;
use std::io::Write;
#[macro_use]
mod macros;
mod buffered_iterator;
mod ast;
mod scanning;
mod parsing;
mod running;
use ast::*;
fn main() {
for arg in env::args() {
println!("{}", arg);
}
loop {
let mut line = String::new();
print!("> ");
io::stdout().flush().expect("Could n... | use std::env;
use std::io;
use std::io::Write;
#[macro_use]
mod macros;
mod buffered_iterator;
mod ast;
mod scanning;
mod parsing;
mod running;
use ast::*;
fn parse_args() {
for arg in env::args().skip(1) {
match parsing::parse(&arg) {
Some(Ast::Expression(expr)) => {
match expr.run() {
Ok(v) => prin... | 22 | 4 | 2 | mixed | --- a/src/main.rs
+++ b/src/main.rs
@@ -15,7 +15,17 @@
-fn main() {
- for arg in env::args() {
- println!("{}", arg);
- }
+fn parse_args() {
+ for arg in env::args().skip(1) {
+ match parsing::parse(&arg) {
+ Some(Ast::Expression(expr)) => {
+ match expr.run() {
+ Ok(v) => println!("{}", v),
+ Err(msg)... | --- a/src/main.rs
+++ b/src/main.rs
@@ ... @@
-fn main() {
- for arg in env::args() {
- println!("{}", arg);
- }
+fn parse_args() {
+ for arg in env::args().skip(1) {
+ match parsing::parse(&arg) {
+ Some(Ast::Expression(expr)) => {
+ match expr.run() {
+ Ok(v) => println!("{}", v),
+ Err(msg) => print... | --- a/src/main.rs
+++ b/src/main.rs
@@ -15,7 +15,17 @@
CON
DEL fn main() {
DEL for arg in env::args() {
DEL println!("{}", arg);
DEL }
ADD fn parse_args() {
ADD for arg in env::args().skip(1) {
ADD match parsing::parse(&arg) {
ADD Some(Ast::Expression(expr)) => {
ADD match expr.run() {
ADD Ok(v) => ... | <<<<<<< SEARCH
use ast::*;
fn main() {
for arg in env::args() {
println!("{}", arg);
}
loop {
let mut line = String::new();
=======
use ast::*;
fn parse_args() {
for arg in env::args().skip(1) {
match parsing::parse(&arg) {
Some(Ast::Expression(expr)) => {
match expr.run() {
Ok(v) => println!(... |
SpineEventEngine/core-java | 3a2efe8677580387b26bead8907370d4c44c6c89 | core/src/main/java/io/spine/core/ResponseMixin.java | java | apache-2.0 | Add shortcut method for obtaining the error
| /*
* Copyright 2020, TeamDev. All rights reserved.
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR... | /*
* Copyright 2020, TeamDev. All rights reserved.
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR... | 10 | 0 | 2 | add_only | --- a/core/src/main/java/io/spine/core/ResponseMixin.java
+++ b/core/src/main/java/io/spine/core/ResponseMixin.java
@@ -22,2 +22,4 @@
+import io.spine.base.Error;
+
/**
@@ -40,2 +42,10 @@
}
+
+ /**
+ * Obtains the error associated with the response or default instance is the response is not
+ * an er... | --- a/core/src/main/java/io/spine/core/ResponseMixin.java
+++ b/core/src/main/java/io/spine/core/ResponseMixin.java
@@ ... @@
+import io.spine.base.Error;
+
/**
@@ ... @@
}
+
+ /**
+ * Obtains the error associated with the response or default instance is the response is not
+ * an error.
+ */
+ ... | --- a/core/src/main/java/io/spine/core/ResponseMixin.java
+++ b/core/src/main/java/io/spine/core/ResponseMixin.java
@@ -22,2 +22,4 @@
CON
ADD import io.spine.base.Error;
ADD
CON /**
@@ -40,2 +42,10 @@
CON }
ADD
ADD /**
ADD * Obtains the error associated with the response or default instance is the respo... | <<<<<<< SEARCH
package io.spine.core;
/**
* Mixin interface for the {@link Response} objects.
=======
package io.spine.core;
import io.spine.base.Error;
/**
* Mixin interface for the {@link Response} objects.
>>>>>>> REPLACE
<<<<<<< SEARCH
return getStatus().getStatusCase() == Status.StatusCase.ERROR;
... |
rorasa/RPiClockArray | ea1c62ae3f13d47ee820eae31a2e284e3d66b6ab | libPiLite.py | python | mit | Add setGrid and resetGrid functions
| #!/usr/bin/env python
def createBlankGrid(row,column):
blankgrid = [[0 for x in range(column)] for y in range(row)]
return blankgrid
def getHeight(grid):
return len(grid)
def getWidth(grid):
return len(grid[0])
def printGrid(grid):
numRow = len(grid)
for i in range(0,numRow):
ro... | #!/usr/bin/env python
def createBlankGrid(row,column):
blankgrid = [[0 for x in range(column)] for y in range(row)]
return blankgrid
def getHeight(grid):
return len(grid)
def getWidth(grid):
return len(grid[0])
def printGrid(grid):
numRow = len(grid)
for i in range(0,numRow):
ro... | 10 | 1 | 1 | mixed | --- a/libPiLite.py
+++ b/libPiLite.py
@@ -30,2 +30,11 @@
return gridstr
-
+
+def setGrid(grid, setlist, rowoffset, coloffset):
+ for entry in setlist:
+ grid[entry[0]+rowoffset][entry[1]+coloffset] = 1
+ return grid
+
+def resetGrid(grid, setlist, rowoffset, coloffset):
+ for entry in s... | --- a/libPiLite.py
+++ b/libPiLite.py
@@ ... @@
return gridstr
-
+
+def setGrid(grid, setlist, rowoffset, coloffset):
+ for entry in setlist:
+ grid[entry[0]+rowoffset][entry[1]+coloffset] = 1
+ return grid
+
+def resetGrid(grid, setlist, rowoffset, coloffset):
+ for entry in setlist:
+... | --- a/libPiLite.py
+++ b/libPiLite.py
@@ -30,2 +30,11 @@
CON return gridstr
DEL
ADD
ADD def setGrid(grid, setlist, rowoffset, coloffset):
ADD for entry in setlist:
ADD grid[entry[0]+rowoffset][entry[1]+coloffset] = 1
ADD return grid
ADD
ADD def resetGrid(grid, setlist, rowoffset, colo... | <<<<<<< SEARCH
gridstr += str(grid[i][j])
return gridstr
=======
gridstr += str(grid[i][j])
return gridstr
def setGrid(grid, setlist, rowoffset, coloffset):
for entry in setlist:
grid[entry[0]+rowoffset][entry[1]+coloffset] = 1
return grid
def resetGrid(gr... |
BAJ-/robot-breakout | 7a150953a835e22a22a0aaf332b1673d5a61c3cf | js/RobotCore.js | javascript | mit | Fix call to incorrect function name
| /*
* Game core for Robots Order BreakOut Trepidation!
*
* @canvas = reference to an HTML5 canvas element.
*/
'use strict';
import Actors from 'Actors.js';
import Collision from 'Collision.js';
export default class {
constructor(canvas) {
// Player settings.
this._score = 0;
this._lives = 3;
// ... | /*
* Game core for Robots Order BreakOut Trepidation!
*
* @canvas = reference to an HTML5 canvas element.
*/
'use strict';
import Actors from 'Actors.js';
import Collision from 'Collision.js';
export default class {
constructor(canvas) {
// Player settings.
this._score = 0;
this._lives = 3;
// ... | 3 | 3 | 3 | mixed | --- a/js/RobotCore.js
+++ b/js/RobotCore.js
@@ -33,3 +33,3 @@
_drawScene() {
- this.clearScene();
+ this._clearScene();
// TODO: Draw scene.
@@ -37,3 +37,3 @@
if (this._running) {
- requestAnimationFrame(()=> this.drawScene());
+ requestAnimationFrame(()=> this._drawScene());
}
@@ -42,... | --- a/js/RobotCore.js
+++ b/js/RobotCore.js
@@ ... @@
_drawScene() {
- this.clearScene();
+ this._clearScene();
// TODO: Draw scene.
@@ ... @@
if (this._running) {
- requestAnimationFrame(()=> this.drawScene());
+ requestAnimationFrame(()=> this._drawScene());
}
@@ ... @@
_startGame... | --- a/js/RobotCore.js
+++ b/js/RobotCore.js
@@ -33,3 +33,3 @@
CON _drawScene() {
DEL this.clearScene();
ADD this._clearScene();
CON // TODO: Draw scene.
@@ -37,3 +37,3 @@
CON if (this._running) {
DEL requestAnimationFrame(()=> this.drawScene());
ADD requestAnimationFrame(()=> this._drawSce... | <<<<<<< SEARCH
_drawScene() {
this.clearScene();
// TODO: Draw scene.
if (this._running) {
requestAnimationFrame(()=> this.drawScene());
}
}
_startGameLoop() {
requestAnimationFrame(()=> this.drawScene());
}
=======
_drawScene() {
this._clearScene();
// TODO: Draw scene... |
fredyw/leetcode | 2769a6b4faf0d9663297bcb2c2cc2ce2982bda65 | src/main/java/leetcode/Problem63.java | java | mit | Update problem 63 (too slow)
| package leetcode;
/**
* https://leetcode.com/problems/unique-paths-ii/
*/
public class Problem63 {
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
// TODO: implement this
return 0;
}
public static void main(String[] args) {
Problem63 prob = new Problem63();
... | package leetcode;
/**
* https://leetcode.com/problems/unique-paths-ii/
*/
public class Problem63 {
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
if (obstacleGrid.length == 0) {
return 0;
}
return findPaths(obstacleGrid, obstacleGrid.length-1, obstacleGrid[0].leng... | 23 | 3 | 2 | mixed | --- a/src/main/java/leetcode/Problem63.java
+++ b/src/main/java/leetcode/Problem63.java
@@ -7,4 +7,22 @@
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
- // TODO: implement this
- return 0;
+ if (obstacleGrid.length == 0) {
+ return 0;
+ }
+ return findPat... | --- a/src/main/java/leetcode/Problem63.java
+++ b/src/main/java/leetcode/Problem63.java
@@ ... @@
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
- // TODO: implement this
- return 0;
+ if (obstacleGrid.length == 0) {
+ return 0;
+ }
+ return findPaths(obst... | --- a/src/main/java/leetcode/Problem63.java
+++ b/src/main/java/leetcode/Problem63.java
@@ -7,4 +7,22 @@
CON public int uniquePathsWithObstacles(int[][] obstacleGrid) {
DEL // TODO: implement this
DEL return 0;
ADD if (obstacleGrid.length == 0) {
ADD return 0;
ADD }
ADD ... | <<<<<<< SEARCH
public class Problem63 {
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
// TODO: implement this
return 0;
}
=======
public class Problem63 {
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
if (obstacleGrid.length == 0) {
retur... |
l1048576/fbx_direct | 3d0fc3decc6e46be75870bbfd6b56393d6db016c | src/error.rs | rust | apache-2.0 | Implement conversion from `byteorder::Error` to `ErrorKind`
| use std::io;
use std::string;
pub type Result<T> = ::std::result::Result<T, Error>;
#[derive(Debug)]
pub struct Error {
pos: u64,
kind: ErrorKind,
}
impl Error {
pub fn new<K: Into<ErrorKind>>(pos: u64, kind: K) -> Self {
Error {
pos: pos,
kind: kind.into(),
}
... | extern crate byteorder;
use std::io;
use std::string;
pub type Result<T> = ::std::result::Result<T, Error>;
#[derive(Debug)]
pub struct Error {
pos: u64,
kind: ErrorKind,
}
impl Error {
pub fn new<K: Into<ErrorKind>>(pos: u64, kind: K) -> Self {
Error {
pos: pos,
kind: ki... | 11 | 0 | 2 | add_only | --- a/src/error.rs
+++ b/src/error.rs
@@ -1 +1,3 @@
+extern crate byteorder;
+
use std::io;
@@ -40 +42,10 @@
}
+
+impl From<byteorder::Error> for ErrorKind {
+ fn from(err: byteorder::Error) -> ErrorKind {
+ match err {
+ byteorder::Error::UnexpectedEOF => ErrorKind::UnexpectedEof,
+ b... | --- a/src/error.rs
+++ b/src/error.rs
@@ ... @@
+extern crate byteorder;
+
use std::io;
@@ ... @@
}
+
+impl From<byteorder::Error> for ErrorKind {
+ fn from(err: byteorder::Error) -> ErrorKind {
+ match err {
+ byteorder::Error::UnexpectedEOF => ErrorKind::UnexpectedEof,
+ byteorder::E... | --- a/src/error.rs
+++ b/src/error.rs
@@ -1 +1,3 @@
ADD extern crate byteorder;
ADD
CON use std::io;
@@ -40 +42,10 @@
CON }
ADD
ADD impl From<byteorder::Error> for ErrorKind {
ADD fn from(err: byteorder::Error) -> ErrorKind {
ADD match err {
ADD byteorder::Error::UnexpectedEOF => ErrorKind::Un... | <<<<<<< SEARCH
use std::io;
use std::string;
=======
extern crate byteorder;
use std::io;
use std::string;
>>>>>>> REPLACE
<<<<<<< SEARCH
}
}
=======
}
}
impl From<byteorder::Error> for ErrorKind {
fn from(err: byteorder::Error) -> ErrorKind {
match err {
byteorder::Error::Unexpect... |
yinhe402/spring-security | acf4b91a893b4d13e95304d541f3a50aae67efda | web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java | java | apache-2.0 | SEC-1674: Test to check that absolute URLs work in SimpleUrlLogoutSuccessHandler. | package org.springframework.security.web.authentication.logout;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.... | package org.springframework.security.web.authentication.logout;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.... | 11 | 0 | 1 | add_only | --- a/web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java
+++ b/web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java
@@ -28,2 +28,13 @@
}
+
+ @Test
+ public void absoluteUrlIsSupported() t... | --- a/web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java
+++ b/web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java
@@ ... @@
}
+
+ @Test
+ public void absoluteUrlIsSupported() throws Exc... | --- a/web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java
+++ b/web/src/test/java/org/springframework/security/web/authentication/logout/SimpleUrlLogoutSuccessHandlerTests.java
@@ -28,2 +28,13 @@
CON }
ADD
ADD @Test
ADD public void absoluteUrlIsS... | <<<<<<< SEARCH
assertNull(response.getForwardedUrl());
}
}
=======
assertNull(response.getForwardedUrl());
}
@Test
public void absoluteUrlIsSupported() throws Exception {
SimpleUrlLogoutSuccessHandler lsh = new SimpleUrlLogoutSuccessHandler();
lsh.setDefaultTargetUrl("h... |
EsotericSoftware/kryo | a4501b27f8f53033968d89f955f589603416c51d | src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java | java | bsd-3-clause | Remove the not needed import | package com.esotericsoftware.kryo.pool;
import java.lang.ref.SoftReference;
import java.util.Queue;
import com.esotericsoftware.kryo.Kryo;
/**
* A simple {@link Queue} based {@link KryoPool} implementation, should be built
* using the KryoPool.Builder.
*
* @author Martin Grotzke
*/
class KryoPoolQueueImpl imple... | package com.esotericsoftware.kryo.pool;
import java.util.Queue;
import com.esotericsoftware.kryo.Kryo;
/**
* A simple {@link Queue} based {@link KryoPool} implementation, should be built
* using the KryoPool.Builder.
*
* @author Martin Grotzke
*/
class KryoPoolQueueImpl implements KryoPool {
private final Que... | 0 | 1 | 1 | del_only | --- a/src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java
+++ b/src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java
@@ -2,3 +2,2 @@
-import java.lang.ref.SoftReference;
import java.util.Queue; | --- a/src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java
+++ b/src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java
@@ ... @@
-import java.lang.ref.SoftReference;
import java.util.Queue;
| --- a/src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java
+++ b/src/com/esotericsoftware/kryo/pool/KryoPoolQueueImpl.java
@@ -2,3 +2,2 @@
CON
DEL import java.lang.ref.SoftReference;
CON import java.util.Queue;
| <<<<<<< SEARCH
package com.esotericsoftware.kryo.pool;
import java.lang.ref.SoftReference;
import java.util.Queue;
=======
package com.esotericsoftware.kryo.pool;
import java.util.Queue;
>>>>>>> REPLACE
<<<<<<< SEARCH
}
}
=======
}
}
>>>>>>> REPLACE
|
aidancully/rust | c34c77c764491460449a6bef06b2149c3ab82f2d | src/test/debuginfo/function-arguments-naked.rs | rust | apache-2.0 | Apply `extern "C"` calling convention
Co-authored-by: Amanieu d'Antras <92db609b8007e8ad5e633f1530d9df21d90665f4@gmail.com> | // min-lldb-version: 310
// We have to ignore android because of this issue:
// https://github.com/rust-lang/rust/issues/74847
// ignore-android
//
// We need to use inline assembly, so just use one platform
// only-x86_64
// compile-flags:-g
// === GDB TESTS =========================================================... | // min-lldb-version: 310
// We have to ignore android because of this issue:
// https://github.com/rust-lang/rust/issues/74847
// ignore-android
//
// We need to use inline assembly, so just use one platform
// only-x86_64
// compile-flags:-g
// === GDB TESTS =========================================================... | 1 | 1 | 1 | mixed | --- a/src/test/debuginfo/function-arguments-naked.rs
+++ b/src/test/debuginfo/function-arguments-naked.rs
@@ -39,3 +39,3 @@
#[naked]
-fn naked(x: usize, y: usize) {
+extern "C" fn naked(x: usize, y: usize) {
unsafe { asm!("ret"); } // #break | --- a/src/test/debuginfo/function-arguments-naked.rs
+++ b/src/test/debuginfo/function-arguments-naked.rs
@@ ... @@
#[naked]
-fn naked(x: usize, y: usize) {
+extern "C" fn naked(x: usize, y: usize) {
unsafe { asm!("ret"); } // #break
| --- a/src/test/debuginfo/function-arguments-naked.rs
+++ b/src/test/debuginfo/function-arguments-naked.rs
@@ -39,3 +39,3 @@
CON #[naked]
DEL fn naked(x: usize, y: usize) {
ADD extern "C" fn naked(x: usize, y: usize) {
CON unsafe { asm!("ret"); } // #break
| <<<<<<< SEARCH
#[naked]
fn naked(x: usize, y: usize) {
unsafe { asm!("ret"); } // #break
}
=======
#[naked]
extern "C" fn naked(x: usize, y: usize) {
unsafe { asm!("ret"); } // #break
}
>>>>>>> REPLACE
|
JetBrains/kotlin-native | c80e6be6582fdf5f5cf013cf4374348755858bdb | runtime/src/main/kotlin/kotlin/test/Assertions.kt | kotlin | apache-2.0 | Introduce 'fail' method to throw AssertionError with cause
#KT-37804
(cherry picked from commit 0449df5f64b1c2f639786d1865979662331f56d6)
| /*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
/**
* A number of common helper methods for writing unit tests.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package kotlin.test
import kotlin.refle... | /*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
/**
* A number of common helper methods for writing unit tests.
*/
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package kotlin.test
import kotlin.refle... | 6 | 0 | 1 | add_only | --- a/runtime/src/main/kotlin/kotlin/test/Assertions.kt
+++ b/runtime/src/main/kotlin/kotlin/test/Assertions.kt
@@ -40,2 +40,8 @@
+/** Platform-specific construction of AssertionError with cause */
+@Suppress("NOTHING_TO_INLINE")
+internal actual inline fun AssertionErrorWithCause(message: String?, cause: Throwable?)... | --- a/runtime/src/main/kotlin/kotlin/test/Assertions.kt
+++ b/runtime/src/main/kotlin/kotlin/test/Assertions.kt
@@ ... @@
+/** Platform-specific construction of AssertionError with cause */
+@Suppress("NOTHING_TO_INLINE")
+internal actual inline fun AssertionErrorWithCause(message: String?, cause: Throwable?): Assert... | --- a/runtime/src/main/kotlin/kotlin/test/Assertions.kt
+++ b/runtime/src/main/kotlin/kotlin/test/Assertions.kt
@@ -40,2 +40,8 @@
CON
ADD /** Platform-specific construction of AssertionError with cause */
ADD @Suppress("NOTHING_TO_INLINE")
ADD internal actual inline fun AssertionErrorWithCause(message: String?, cause:... | <<<<<<< SEARCH
}
internal actual fun lookupAsserter(): Asserter = DefaultAsserter
=======
}
/** Platform-specific construction of AssertionError with cause */
@Suppress("NOTHING_TO_INLINE")
internal actual inline fun AssertionErrorWithCause(message: String?, cause: Throwable?): AssertionError =
AssertionError... |
gamechanger/dusty | c90fd7d026cdeeff7d073c1d15ff550cc937f961 | dusty/daemon.py | python | mit | Set up a Unix socket we can use for input
| import sys
import logging
from .preflight import preflight_check
from .notifier import notify
def configure_logging():
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.captureWarnings(True)
def main():
notify('Dusty initializing...')
configure_logging()
preflight_check()
if __n... | import os
import sys
import logging
import socket
from .preflight import preflight_check
from .notifier import notify
SOCKET_PATH = '/var/run/dusty/dusty.sock'
def _configure_logging():
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.captureWarnings(True)
def _clean_up_existing_socket():
... | 34 | 2 | 3 | mixed | --- a/dusty/daemon.py
+++ b/dusty/daemon.py
@@ -1,3 +1,5 @@
+import os
import sys
import logging
+import socket
@@ -6,3 +8,5 @@
-def configure_logging():
+SOCKET_PATH = '/var/run/dusty/dusty.sock'
+
+def _configure_logging():
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
@@ -10,6 +14,34 @@
+de... | --- a/dusty/daemon.py
+++ b/dusty/daemon.py
@@ ... @@
+import os
import sys
import logging
+import socket
@@ ... @@
-def configure_logging():
+SOCKET_PATH = '/var/run/dusty/dusty.sock'
+
+def _configure_logging():
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
@@ ... @@
+def _clean_up_existing_... | --- a/dusty/daemon.py
+++ b/dusty/daemon.py
@@ -1,3 +1,5 @@
ADD import os
CON import sys
CON import logging
ADD import socket
CON
@@ -6,3 +8,5 @@
CON
DEL def configure_logging():
ADD SOCKET_PATH = '/var/run/dusty/dusty.sock'
ADD
ADD def _configure_logging():
CON logging.basicConfig(stream=sys.stdout, level=loggi... | <<<<<<< SEARCH
import sys
import logging
from .preflight import preflight_check
from .notifier import notify
def configure_logging():
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.captureWarnings(True)
def main():
notify('Dusty initializing...')
configure_logging()
preflight_... |
dtolnay/thiserror | 6957309724e3f4030fb41d400a6932ed9a5dad0a | src/aserror.rs | rust | apache-2.0 | Add Sealed supertrait to private AsDynError trait
| use std::error::Error;
use std::panic::UnwindSafe;
pub trait AsDynError<'a> {
fn as_dyn_error(&self) -> &(dyn Error + 'a);
}
impl<'a, T: Error + 'a> AsDynError<'a> for T {
#[inline]
fn as_dyn_error(&self) -> &(dyn Error + 'a) {
self
}
}
impl<'a> AsDynError<'a> for dyn Error + 'a {
#[inlin... | use self::private::Sealed;
use std::error::Error;
use std::panic::UnwindSafe;
pub trait AsDynError<'a>: Sealed {
fn as_dyn_error(&self) -> &(dyn Error + 'a);
}
impl<'a, T: Error + 'a> AsDynError<'a> for T {
#[inline]
fn as_dyn_error(&self) -> &(dyn Error + 'a) {
self
}
}
impl<'a> AsDynError<'... | 13 | 1 | 3 | mixed | --- a/src/aserror.rs
+++ b/src/aserror.rs
@@ -1 +1,2 @@
+use self::private::Sealed;
use std::error::Error;
@@ -3,3 +4,3 @@
-pub trait AsDynError<'a> {
+pub trait AsDynError<'a>: Sealed {
fn as_dyn_error(&self) -> &(dyn Error + 'a);
@@ -41 +42,12 @@
}
+
+mod private {
+ use super::*;
+
+ pub trait Sealed ... | --- a/src/aserror.rs
+++ b/src/aserror.rs
@@ ... @@
+use self::private::Sealed;
use std::error::Error;
@@ ... @@
-pub trait AsDynError<'a> {
+pub trait AsDynError<'a>: Sealed {
fn as_dyn_error(&self) -> &(dyn Error + 'a);
@@ ... @@
}
+
+mod private {
+ use super::*;
+
+ pub trait Sealed {}
+ impl<'a, ... | --- a/src/aserror.rs
+++ b/src/aserror.rs
@@ -1 +1,2 @@
ADD use self::private::Sealed;
CON use std::error::Error;
@@ -3,3 +4,3 @@
CON
DEL pub trait AsDynError<'a> {
ADD pub trait AsDynError<'a>: Sealed {
CON fn as_dyn_error(&self) -> &(dyn Error + 'a);
@@ -41 +42,12 @@
CON }
ADD
ADD mod private {
ADD use supe... | <<<<<<< SEARCH
use std::error::Error;
use std::panic::UnwindSafe;
pub trait AsDynError<'a> {
fn as_dyn_error(&self) -> &(dyn Error + 'a);
}
=======
use self::private::Sealed;
use std::error::Error;
use std::panic::UnwindSafe;
pub trait AsDynError<'a>: Sealed {
fn as_dyn_error(&self) -> &(dyn Error + 'a);
}
... |
vimeo/vimeo-networking-java | 0a8190aa2845190ec67806abbf24be59efff8529 | auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt | kotlin | mit | Add google login method to service
| package com.vimeo.networking2.requests
import com.vimeo.networking2.VimeoAccount
import com.vimeo.networking2.adapters.VimeoCall
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.Header
import retrofit2.http.POST
/**
* All the authentication endpoints.
*/
interface AuthService {... | package com.vimeo.networking2.requests
import com.vimeo.networking2.VimeoAccount
import com.vimeo.networking2.adapters.VimeoCall
import retrofit2.Call
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.Header
import retrofit2.http.POST
/**
* All the authentication endpoints.
*/
i... | 17 | 2 | 3 | mixed | --- a/auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt
+++ b/auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt
@@ -4,2 +4,3 @@
import com.vimeo.networking2.adapters.VimeoCall
+import retrofit2.Call
import retrofit2.http.Field
@@ -18,4 +19,4 @@
*
- * @param authHeader It is cre... | --- a/auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt
+++ b/auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt
@@ ... @@
import com.vimeo.networking2.adapters.VimeoCall
+import retrofit2.Call
import retrofit2.http.Field
@@ ... @@
*
- * @param authHeader It is created from the ... | --- a/auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt
+++ b/auth/src/main/java/com/vimeo/networking2/requests/AuthService.kt
@@ -4,2 +4,3 @@
CON import com.vimeo.networking2.adapters.VimeoCall
ADD import retrofit2.Call
CON import retrofit2.http.Field
@@ -18,4 +19,4 @@
CON *
DEL * @param authH... | <<<<<<< SEARCH
import com.vimeo.networking2.VimeoAccount
import com.vimeo.networking2.adapters.VimeoCall
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
=======
import com.vimeo.networking2.VimeoAccount
import com.vimeo.networking2.adapters.VimeoCall
import retrofit2.Call
import retrofit2.http.Field
i... |
allotria/intellij-community | 6dc9388b6067c88f01717c1cf10d16b7579e30ad | plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt | kotlin | apache-2.0 | [stats-collector] Allow to configure position changes showing not only in the internal mode
GitOrigin-RevId: af7923b333eaafb28b8a06b2a82113f7986444a4 | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.completion.settings
import com.intellij.application.options.CodeCompletionOptionsCustomSection
import com.intellij.completion.StatsCollectorBundle
import com... | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.completion.settings
import com.intellij.application.options.CodeCompletionOptionsCustomSection
import com.intellij.completion.StatsCollectorBundle
import com... | 5 | 7 | 1 | mixed | --- a/plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt
+++ b/plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt
@@ -28,9 +28,7 @@
}
- if (ApplicationManager.getApplication().isInternal) {
- val registry = Registry.get("comp... | --- a/plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt
+++ b/plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt
@@ ... @@
}
- if (ApplicationManager.getApplication().isInternal) {
- val registry = Registry.get("completion.s... | --- a/plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt
+++ b/plugins/stats-collector/src/com/intellij/completion/settings/MLRankingConfigurable.kt
@@ -28,9 +28,7 @@
CON }
DEL if (ApplicationManager.getApplication().isInternal) {
DEL val registry = Registry.... | <<<<<<< SEARCH
}
}
if (ApplicationManager.getApplication().isInternal) {
val registry = Registry.get("completion.stats.show.ml.ranking.diff")
row {
checkBox(StatsCollectorBundle.message("ml.completion.show.diff"),
{ registry.asBoolean() },
... |
SteveChalker/kotlin-koans | 6ff2baac5e1a8246c3e8f29130c89297468a2a62 | src/v_builders/_39_HtmlBuilders.kt | kotlin | mit | Improve `getCellColor` naming of arguments
* `index` is actually `row`
* `row` is actually `column`
| package v_builders
import util.TODO
import util.doc39
import v_builders.data.getProducts
import v_builders.htmlLibrary.*
fun getTitleColor() = "#b9c9fe"
fun getCellColor(index: Int, row: Int) = if ((index + row) %2 == 0) "#dce4ff" else "#eff2ff"
fun todoTask39(): Nothing = TODO(
"""
Task 39.
1) F... | package v_builders
import util.TODO
import util.doc39
import v_builders.data.getProducts
import v_builders.htmlLibrary.*
fun getTitleColor() = "#b9c9fe"
fun getCellColor(row: Int, column: Int) = if ((row + column) %2 == 0) "#dce4ff" else "#eff2ff"
fun todoTask39(): Nothing = TODO(
"""
Task 39.
1)... | 1 | 1 | 1 | mixed | --- a/src/v_builders/_39_HtmlBuilders.kt
+++ b/src/v_builders/_39_HtmlBuilders.kt
@@ -8,3 +8,3 @@
fun getTitleColor() = "#b9c9fe"
-fun getCellColor(index: Int, row: Int) = if ((index + row) %2 == 0) "#dce4ff" else "#eff2ff"
+fun getCellColor(row: Int, column: Int) = if ((row + column) %2 == 0) "#dce4ff" else "#eff2ff"... | --- a/src/v_builders/_39_HtmlBuilders.kt
+++ b/src/v_builders/_39_HtmlBuilders.kt
@@ ... @@
fun getTitleColor() = "#b9c9fe"
-fun getCellColor(index: Int, row: Int) = if ((index + row) %2 == 0) "#dce4ff" else "#eff2ff"
+fun getCellColor(row: Int, column: Int) = if ((row + column) %2 == 0) "#dce4ff" else "#eff2ff"
| --- a/src/v_builders/_39_HtmlBuilders.kt
+++ b/src/v_builders/_39_HtmlBuilders.kt
@@ -8,3 +8,3 @@
CON fun getTitleColor() = "#b9c9fe"
DEL fun getCellColor(index: Int, row: Int) = if ((index + row) %2 == 0) "#dce4ff" else "#eff2ff"
ADD fun getCellColor(row: Int, column: Int) = if ((row + column) %2 == 0) "#dce4ff" else ... | <<<<<<< SEARCH
fun getTitleColor() = "#b9c9fe"
fun getCellColor(index: Int, row: Int) = if ((index + row) %2 == 0) "#dce4ff" else "#eff2ff"
fun todoTask39(): Nothing = TODO(
=======
fun getTitleColor() = "#b9c9fe"
fun getCellColor(row: Int, column: Int) = if ((row + column) %2 == 0) "#dce4ff" else "#eff2ff"
fun to... |
aakloxu/rust-by-example-cn | d2b8e36f0cf1ad52e093fd36b7346eef40c78bc7 | examples/custom_types/structs/structs.rs | rust | apache-2.0 | Switch from f64 to f32
| // 单元结构体
struct Nil;
// 元组结构体
struct Pair(i32, f64);
// 带有两个字段的结构体
struct Point {
x: f64,
y: f64,
}
// 结构体可以作为另一个结构体的字段
#[allow(dead_code)]
struct Rectangle {
p1: Point,
p2: Point,
}
fn main() {
// 实例化结构体 `Point`
let point: Point = Point { x: 0.3, y: 0.4 };
// 访问 point 的字段
println!(... | // 单元结构体
struct Nil;
// 元组结构体
struct Pair(i32, f32);
// 带有两个字段的结构体
struct Point {
x: f32,
y: f32,
}
// 结构体可以作为另一个结构体的字段
#[allow(dead_code)]
struct Rectangle {
p1: Point,
p2: Point,
}
fn main() {
// 实例化结构体 `Point`
let point: Point = Point { x: 0.3, y: 0.4 };
// 访问 point 的字段
println!(... | 3 | 3 | 2 | mixed | --- a/examples/custom_types/structs/structs.rs
+++ b/examples/custom_types/structs/structs.rs
@@ -4,3 +4,3 @@
// 元组结构体
-struct Pair(i32, f64);
+struct Pair(i32, f32);
@@ -8,4 +8,4 @@
struct Point {
- x: f64,
- y: f64,
+ x: f32,
+ y: f32,
} | --- a/examples/custom_types/structs/structs.rs
+++ b/examples/custom_types/structs/structs.rs
@@ ... @@
// 元组结构体
-struct Pair(i32, f64);
+struct Pair(i32, f32);
@@ ... @@
struct Point {
- x: f64,
- y: f64,
+ x: f32,
+ y: f32,
}
| --- a/examples/custom_types/structs/structs.rs
+++ b/examples/custom_types/structs/structs.rs
@@ -4,3 +4,3 @@
CON // 元组结构体
DEL struct Pair(i32, f64);
ADD struct Pair(i32, f32);
CON
@@ -8,4 +8,4 @@
CON struct Point {
DEL x: f64,
DEL y: f64,
ADD x: f32,
ADD y: f32,
CON }
| <<<<<<< SEARCH
// 元组结构体
struct Pair(i32, f64);
// 带有两个字段的结构体
struct Point {
x: f64,
y: f64,
}
=======
// 元组结构体
struct Pair(i32, f32);
// 带有两个字段的结构体
struct Point {
x: f32,
y: f32,
}
>>>>>>> REPLACE
|
dominicrodger/pywebfaction | a3df62c7da4aa29ab9977a0307e0634fd43e37e8 | pywebfaction/exceptions.py | python | bsd-3-clause | Make code immune to bad fault messages
| import ast
EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions."
EXCEPTION_TYPE_SUFFIX = "'>"
def _parse_exc_type(exc_type):
# This is horribly hacky, but there's not a particularly elegant
# way to go from the exception type to a string representing that
# exception.
if not exc_type.startswi... | import ast
EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions."
EXCEPTION_TYPE_SUFFIX = "'>"
def _parse_exc_type(exc_type):
# This is horribly hacky, but there's not a particularly elegant
# way to go from the exception type to a string representing that
# exception.
if not exc_type.startswi... | 9 | 5 | 1 | mixed | --- a/pywebfaction/exceptions.py
+++ b/pywebfaction/exceptions.py
@@ -35,6 +35,10 @@
class WebFactionFault(Exception):
- def __init__(self, underlying_fault):
- self.underlying_fault = underlying_fault
- exc_type, exc_message = underlying_fault.faultString.split(':', 1)
- self.exception_type = ... | --- a/pywebfaction/exceptions.py
+++ b/pywebfaction/exceptions.py
@@ ... @@
class WebFactionFault(Exception):
- def __init__(self, underlying_fault):
- self.underlying_fault = underlying_fault
- exc_type, exc_message = underlying_fault.faultString.split(':', 1)
- self.exception_type = _parse_ex... | --- a/pywebfaction/exceptions.py
+++ b/pywebfaction/exceptions.py
@@ -35,6 +35,10 @@
CON class WebFactionFault(Exception):
DEL def __init__(self, underlying_fault):
DEL self.underlying_fault = underlying_fault
DEL exc_type, exc_message = underlying_fault.faultString.split(':', 1)
DEL self.ex... | <<<<<<< SEARCH
class WebFactionFault(Exception):
def __init__(self, underlying_fault):
self.underlying_fault = underlying_fault
exc_type, exc_message = underlying_fault.faultString.split(':', 1)
self.exception_type = _parse_exc_type(exc_type)
self.exception_message = _parse_exc_mess... |
philou/concurrency-kata | a079a955dfe3e0c1d098c24da85008353aa6417e | src/main/java/net/bourgau/philippe/concurrency/kata/Client.java | java | mit | Clean exit from the command line client
- 'bye' keyword exits the client
| package net.bourgau.philippe.concurrency.kata;
import java.util.Scanner;
public class Client implements Broadcast {
private final ChatRoom chatRoom;
private final String name;
private final Output out;
public Client(String name, ChatRoom chatRoom, Output out) {
this.chatRoom = chatRoom;
... | package net.bourgau.philippe.concurrency.kata;
import java.util.Scanner;
public class Client implements Broadcast {
private final ChatRoom chatRoom;
private final String name;
private final Output out;
public Client(String name, ChatRoom chatRoom, Output out) {
this.chatRoom = chatRoom;
... | 12 | 4 | 1 | mixed | --- a/src/main/java/net/bourgau/philippe/concurrency/kata/Client.java
+++ b/src/main/java/net/bourgau/philippe/concurrency/kata/Client.java
@@ -55,7 +55,15 @@
- client.enter();
+ try {
+ client.enter();
- Scanner scanner = new Scanner(System.in);
- while (scanner.hasNextLine()... | --- a/src/main/java/net/bourgau/philippe/concurrency/kata/Client.java
+++ b/src/main/java/net/bourgau/philippe/concurrency/kata/Client.java
@@ ... @@
- client.enter();
+ try {
+ client.enter();
- Scanner scanner = new Scanner(System.in);
- while (scanner.hasNextLine()) {
- ... | --- a/src/main/java/net/bourgau/philippe/concurrency/kata/Client.java
+++ b/src/main/java/net/bourgau/philippe/concurrency/kata/Client.java
@@ -55,7 +55,15 @@
CON
DEL client.enter();
ADD try {
ADD client.enter();
CON
DEL Scanner scanner = new Scanner(System.in);
DEL while (... | <<<<<<< SEARCH
});
client.enter();
Scanner scanner = new Scanner(System.in);
while (scanner.hasNextLine()) {
client.broadcast(scanner.nextLine());
}
}
=======
});
try {
client.enter();
Scanner scanner = new Scanner(Syst... |
sosedoff/reeder | 71ae65de4b3e2e71cc6fb0e3fd3285d51d599a07 | app/assets/js/helpers.js | javascript | mit | Handle links with leading double slashes
| function matchAll(str, regex) {
var matches = [];
while (result = regex.exec(str)) {
matches.push(result[1]);
}
return matches;
}
angular.module('reeder.helpers', []).
filter('postDateFormatter', function() {
return function(unformatted_date) {
var date = new Date(unformatted_date);
retur... | function matchAll(str, regex) {
var matches = [];
while (result = regex.exec(str)) {
matches.push(result[1]);
}
return matches;
}
angular.module('reeder.helpers', []).
filter('postDateFormatter', function() {
return function(unformatted_date) {
var date = new Date(unformatted_date);
retur... | 6 | 3 | 1 | mixed | --- a/app/assets/js/helpers.js
+++ b/app/assets/js/helpers.js
@@ -29,5 +29,8 @@
- if (url[0] == '/') new_url += url;
- else new_url += '/' + url;
- content = content.replace(url, new_url);
+ if (url.substring(0, 2) != '//') {
+ if (url[0] == '/') new_url += url... | --- a/app/assets/js/helpers.js
+++ b/app/assets/js/helpers.js
@@ ... @@
- if (url[0] == '/') new_url += url;
- else new_url += '/' + url;
- content = content.replace(url, new_url);
+ if (url.substring(0, 2) != '//') {
+ if (url[0] == '/') new_url += url;
+ ... | --- a/app/assets/js/helpers.js
+++ b/app/assets/js/helpers.js
@@ -29,5 +29,8 @@
CON
DEL if (url[0] == '/') new_url += url;
DEL else new_url += '/' + url;
DEL content = content.replace(url, new_url);
ADD if (url.substring(0, 2) != '//') {
ADD if (url[0] == '... | <<<<<<< SEARCH
var new_url = post.feed.site_url;
if (url[0] == '/') new_url += url;
else new_url += '/' + url;
content = content.replace(url, new_url);
}
}
=======
var new_url = post.feed.site_url;
if (url.substring(0, 2) != '/... |
mikegehard/user-management-evolution-kotlin | 5e72bf8392bc4844ba5abcd49eb63c55d19d4657 | applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt | kotlin | mit | Use constructor injection so you can make instance variables vals
| package com.example.billing.reocurringPayments
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.actuate.metrics.CounterService
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springf... | package com.example.billing.reocurringPayments
import com.example.payments.Gateway
import org.springframework.boot.actuate.metrics.CounterService
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springframework.http.ResponseEnti... | 13 | 7 | 3 | mixed | --- a/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
+++ b/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
@@ -2,3 +2,3 @@
-import org.springframework.beans.factory.annotation.Autowired
+import com.example.payments.Gateway
import or... | --- a/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
+++ b/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
@@ ... @@
-import org.springframework.beans.factory.annotation.Autowired
+import com.example.payments.Gateway
import org.spri... | --- a/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
+++ b/applications/billing/src/main/kotlin/com/example/billing/reocurringPayments/Controller.kt
@@ -2,3 +2,3 @@
CON
DEL import org.springframework.beans.factory.annotation.Autowired
ADD import com.example.payments.Gateway
C... | <<<<<<< SEARCH
package com.example.billing.reocurringPayments
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.actuate.metrics.CounterService
import org.springframework.http.HttpHeaders
=======
package com.example.billing.reocurringPayments
import com.example.payments.Gat... |
Vectorious/geom-rs | 5ecacf200f4eaaad68e5fddd497596049c978f53 | src/point.rs | rust | mit | Remove Point struct; Add Point trait
| use rect::Rect;
use std::ops::{Add, Sub};
pub const ZERO: Point = Point { x: 0, y: 0 };
pub const UP: Point = Point { x: 0, y: -1 };
pub const DOWN: Point = Point { x: 0, y: 1 };
pub const LEFT: Point = Point { x: -1, y: 0 };
pub const RIGHT: Point = Point { x: 1, y: 0 };
/// A simple two-dimensional Point... | use rect::Rect;
use std::ops::{Add, Sub};
trait Point<T> {
fn new(x: T, y: T) -> Point<T>;
fn x() -> T;
fn y() -> T;
}
| 4 | 56 | 1 | mixed | --- a/src/point.rs
+++ b/src/point.rs
@@ -3,58 +3,6 @@
-pub const ZERO: Point = Point { x: 0, y: 0 };
-pub const UP: Point = Point { x: 0, y: -1 };
-pub const DOWN: Point = Point { x: 0, y: 1 };
-pub const LEFT: Point = Point { x: -1, y: 0 };
-pub const RIGHT: Point = Point { x: 1, y: 0 };
-
-
-/// A simple two-dimen... | --- a/src/point.rs
+++ b/src/point.rs
@@ ... @@
-pub const ZERO: Point = Point { x: 0, y: 0 };
-pub const UP: Point = Point { x: 0, y: -1 };
-pub const DOWN: Point = Point { x: 0, y: 1 };
-pub const LEFT: Point = Point { x: -1, y: 0 };
-pub const RIGHT: Point = Point { x: 1, y: 0 };
-
-
-/// A simple two-dimensional ... | --- a/src/point.rs
+++ b/src/point.rs
@@ -3,58 +3,6 @@
CON
DEL pub const ZERO: Point = Point { x: 0, y: 0 };
DEL pub const UP: Point = Point { x: 0, y: -1 };
DEL pub const DOWN: Point = Point { x: 0, y: 1 };
DEL pub const LEFT: Point = Point { x: -1, y: 0 };
DEL pub const RIGHT: Point = Point { x: 1, y: 0 };
DEL
DEL ... | <<<<<<< SEARCH
use std::ops::{Add, Sub};
pub const ZERO: Point = Point { x: 0, y: 0 };
pub const UP: Point = Point { x: 0, y: -1 };
pub const DOWN: Point = Point { x: 0, y: 1 };
pub const LEFT: Point = Point { x: -1, y: 0 };
pub const RIGHT: Point = Point { x: 1, y: 0 };
/// A simple two-dimensional Point s... |
hzsweers/CatchUp | 46dd3a2d6a206be7d76d950f9bf0438fdd57bfc3 | app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt | kotlin | apache-2.0 | Fix missing okhttp builder in release variant
| /*
* Copyright (C) 2019. Zac Sweers
*
* 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... | /*
* Copyright (C) 2019. Zac Sweers
*
* 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... | 3 | 0 | 2 | add_only | --- a/app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt
+++ b/app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt
@@ -23,2 +23,3 @@
import io.sweers.catchup.data.DataModule
+import io.sweers.catchup.data.InstanceBasedOkHttpLibraryGlideModule
import io.sweers.catchup.ui.activity.Act... | --- a/app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt
+++ b/app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt
@@ ... @@
import io.sweers.catchup.data.DataModule
+import io.sweers.catchup.data.InstanceBasedOkHttpLibraryGlideModule
import io.sweers.catchup.ui.activity.ActivityBin... | --- a/app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt
+++ b/app/src/release/kotlin/io/sweers/catchup/app/ApplicationComponent.kt
@@ -23,2 +23,3 @@
CON import io.sweers.catchup.data.DataModule
ADD import io.sweers.catchup.data.InstanceBasedOkHttpLibraryGlideModule
CON import io.sweers.catchup.ui.act... | <<<<<<< SEARCH
import dagger.android.support.AndroidSupportInjectionModule
import io.sweers.catchup.data.DataModule
import io.sweers.catchup.ui.activity.ActivityBindingModule
import javax.inject.Singleton
=======
import dagger.android.support.AndroidSupportInjectionModule
import io.sweers.catchup.data.DataModule
impor... |
influxdb/influxdb | b3e712daae55ede6e176ec3b115406790a3bf0ff | ui/src/shared/components/FancyScrollbar.js | javascript | mit | Add autoHide prop to pass down
| import React, {Component, PropTypes} from 'react'
import {Scrollbars} from 'react-custom-scrollbars'
class FancyScrollbox extends Component {
constructor(props) {
super(props)
}
render() {
const {children, className} = this.props
return (
<Scrollbars
className={`fancy-scroll--containe... | import React, {Component, PropTypes} from 'react'
import classnames from 'classnames'
import {Scrollbars} from 'react-custom-scrollbars'
class FancyScrollbox extends Component {
constructor(props) {
super(props)
}
static defaultProps = {
autoHide: true,
}
render() {
const {autoHide, children, c... | 11 | 5 | 5 | mixed | --- a/ui/src/shared/components/FancyScrollbar.js
+++ b/ui/src/shared/components/FancyScrollbar.js
@@ -1,2 +1,3 @@
import React, {Component, PropTypes} from 'react'
+import classnames from 'classnames'
import {Scrollbars} from 'react-custom-scrollbars'
@@ -8,4 +9,8 @@
+ static defaultProps = {
+ autoHide: true,
... | --- a/ui/src/shared/components/FancyScrollbar.js
+++ b/ui/src/shared/components/FancyScrollbar.js
@@ ... @@
import React, {Component, PropTypes} from 'react'
+import classnames from 'classnames'
import {Scrollbars} from 'react-custom-scrollbars'
@@ ... @@
+ static defaultProps = {
+ autoHide: true,
+ }
+
re... | --- a/ui/src/shared/components/FancyScrollbar.js
+++ b/ui/src/shared/components/FancyScrollbar.js
@@ -1,2 +1,3 @@
CON import React, {Component, PropTypes} from 'react'
ADD import classnames from 'classnames'
CON import {Scrollbars} from 'react-custom-scrollbars'
@@ -8,4 +9,8 @@
CON
ADD static defaultProps = {
ADD ... | <<<<<<< SEARCH
import React, {Component, PropTypes} from 'react'
import {Scrollbars} from 'react-custom-scrollbars'
=======
import React, {Component, PropTypes} from 'react'
import classnames from 'classnames'
import {Scrollbars} from 'react-custom-scrollbars'
>>>>>>> REPLACE
<<<<<<< SEARCH
}
render() {
c... |
jbmusso/zer | 3bbf44c804f66ff5d09d09629f3fdd3ea2643b6a | src/chain.js | javascript | mit | Clean up old STRATEGY object
| import _ from 'lodash';
class ChainStart {
constructor(name) {
this.name = name;
this.type = 'CHAIN_START';
}
}
class Step {
constructor(name) {
this.name = name;
this.type = 'STEP';
}
}
class Arguments {
constructor(params = []) {
this.params = params;
this.type = 'ARGUMENTS'
}
... | import _ from 'lodash';
class ChainStart {
constructor(name) {
this.name = name;
this.type = 'CHAIN_START';
}
}
class Step {
constructor(name) {
this.name = name;
this.type = 'STEP';
}
}
class Arguments {
constructor(params = []) {
this.params = params;
this.type = 'ARGUMENTS'
}
... | 1 | 14 | 2 | mixed | --- a/src/chain.js
+++ b/src/chain.js
@@ -49,2 +49,3 @@
+// TODO: missing name argument here?
export function createChain() {
@@ -52,15 +53 @@
}
-
-export const STRATEGY = {
- init(name) {
- return createChain(name);
- },
-
- addStep(chain, name) {
- chain.addStep(name)
- },
-
- addArguments(chain, ...ar... | --- a/src/chain.js
+++ b/src/chain.js
@@ ... @@
+// TODO: missing name argument here?
export function createChain() {
@@ ... @@
}
-
-export const STRATEGY = {
- init(name) {
- return createChain(name);
- },
-
- addStep(chain, name) {
- chain.addStep(name)
- },
-
- addArguments(chain, ...args) {
- chai... | --- a/src/chain.js
+++ b/src/chain.js
@@ -49,2 +49,3 @@
CON
ADD // TODO: missing name argument here?
CON export function createChain() {
@@ -52,15 +53 @@
CON }
DEL
DEL export const STRATEGY = {
DEL init(name) {
DEL return createChain(name);
DEL },
DEL
DEL addStep(chain, name) {
DEL chain.addStep(name)
... | <<<<<<< SEARCH
}
export function createChain() {
return new Chain();
}
export const STRATEGY = {
init(name) {
return createChain(name);
},
addStep(chain, name) {
chain.addStep(name)
},
addArguments(chain, ...args) {
chain.addArguments(...args)
}
}
=======
}
// TODO: missing name argument... |
miguelcobain/ember-css-transitions | 795765887dfc29fbe7a6f88ae44afcec8fa8d21e | tests/dummy/config/environment.js | javascript | mit | Use hash based location type for now to support IE9 / ember bug
| /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contr... | /* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
locationType: 'hash',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contr... | 1 | 1 | 1 | mixed | --- a/tests/dummy/config/environment.js
+++ b/tests/dummy/config/environment.js
@@ -7,3 +7,3 @@
baseURL: '/',
- locationType: 'auto',
+ locationType: 'hash',
EmberENV: { | --- a/tests/dummy/config/environment.js
+++ b/tests/dummy/config/environment.js
@@ ... @@
baseURL: '/',
- locationType: 'auto',
+ locationType: 'hash',
EmberENV: {
| --- a/tests/dummy/config/environment.js
+++ b/tests/dummy/config/environment.js
@@ -7,3 +7,3 @@
CON baseURL: '/',
DEL locationType: 'auto',
ADD locationType: 'hash',
CON EmberENV: {
| <<<<<<< SEARCH
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
=======
environment: environment,
baseURL: '/',
locationType: 'hash',
EmberENV: {
FEATURES: {
>>>>>>> REPLACE
|
NUBIC/psc-mirror | 8a0672676c6bf5978e18962a71485a9082457c1b | test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java | java | bsd-3-clause | Extend CoreTestCase for access to assertPositve/Negative, others
git-svn-id: 4b387fe5ada7764508e2ca96c335714e4c1692c6@136 0d517254-b314-0410-acde-c619094fa49f
| package edu.northwestern.bioinformatics.studycalendar.testing;
import junit.framework.TestCase;
import java.lang.reflect.Method;
import java.util.Set;
import java.util.HashSet;
import org.easymock.classextension.EasyMock;
/**
* @author Rhett Sutphin
*/
public abstract class StudyCalendarTestCase extends TestCase ... | package edu.northwestern.bioinformatics.studycalendar.testing;
import edu.nwu.bioinformatics.commons.testing.CoreTestCase;
import junit.framework.TestCase;
import java.lang.reflect.Method;
import java.util.Set;
import java.util.HashSet;
import org.easymock.classextension.EasyMock;
/**
* @author Rhett Sutphin
*/
... | 3 | 1 | 2 | mixed | --- a/test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
+++ b/test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
@@ -1,2 +1,4 @@
package edu.northwestern.bioinformatics.studycalendar.testing;
+
+import edu.nwu.bioinformatics.commons.testi... | --- a/test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
+++ b/test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
@@ ... @@
package edu.northwestern.bioinformatics.studycalendar.testing;
+
+import edu.nwu.bioinformatics.commons.testing.Cor... | --- a/test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
+++ b/test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
@@ -1,2 +1,4 @@
CON package edu.northwestern.bioinformatics.studycalendar.testing;
ADD
ADD import edu.nwu.bioinformatics.comm... | <<<<<<< SEARCH
package edu.northwestern.bioinformatics.studycalendar.testing;
import junit.framework.TestCase;
=======
package edu.northwestern.bioinformatics.studycalendar.testing;
import edu.nwu.bioinformatics.commons.testing.CoreTestCase;
import junit.framework.TestCase;
>>>>>>> REPLACE
<<<<<<< SEARCH
* @auth... |
juanriaza/django-rest-framework-msgpack | 62cee7d5a625bb3515eddaddbe940239a41ba31c | rest_framework_msgpack/parsers.py | python | bsd-3-clause | Use six.text_type for python3 compat | import decimal
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func = getattr(self, 'decode_%s' % obj['__clas... | import decimal
import msgpack
from dateutil.parser import parse
from django.utils.six import text_type
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func =... | 3 | 1 | 2 | mixed | --- a/rest_framework_msgpack/parsers.py
+++ b/rest_framework_msgpack/parsers.py
@@ -3,2 +3,4 @@
from dateutil.parser import parse
+from django.utils.six import text_type
+
@@ -43,2 +45,2 @@
except Exception as exc:
- raise ParseError('MessagePack parse error - %s' % unicode(exc))
+ rai... | --- a/rest_framework_msgpack/parsers.py
+++ b/rest_framework_msgpack/parsers.py
@@ ... @@
from dateutil.parser import parse
+from django.utils.six import text_type
+
@@ ... @@
except Exception as exc:
- raise ParseError('MessagePack parse error - %s' % unicode(exc))
+ raise ParseError(... | --- a/rest_framework_msgpack/parsers.py
+++ b/rest_framework_msgpack/parsers.py
@@ -3,2 +3,4 @@
CON from dateutil.parser import parse
ADD from django.utils.six import text_type
ADD
CON
@@ -43,2 +45,2 @@
CON except Exception as exc:
DEL raise ParseError('MessagePack parse error - %s' % unicode(exc)... | <<<<<<< SEARCH
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
=======
import msgpack
from dateutil.parser import parse
from django.utils.six import text_type
from rest_framework.parsers import BaseParser
>>>>>>> REPLACE
<<<<<<< SEARCH
... |
alphagov/backdrop-transactions-explorer-collector | 2efe1364a1e37f06dc26f1a3a122c544437d914e | collector/classes/service.py | python | mit | Add log message if data we can't parse appears
If the datum isn't numeric and doesn't match the 'no data' pattern,
something has gone horribly wrong.
| # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | 1 | 0 | 1 | add_only | --- a/collector/classes/service.py
+++ b/collector/classes/service.py
@@ -42,2 +42,3 @@
# that to Backdrop as a null data point
+ print "Data from the spreadsheet doesn't look numeric: <{0}> (from {1})".format(datum, self.identifier())
return None | --- a/collector/classes/service.py
+++ b/collector/classes/service.py
@@ ... @@
# that to Backdrop as a null data point
+ print "Data from the spreadsheet doesn't look numeric: <{0}> (from {1})".format(datum, self.identifier())
return None
| --- a/collector/classes/service.py
+++ b/collector/classes/service.py
@@ -42,2 +42,3 @@
CON # that to Backdrop as a null data point
ADD print "Data from the spreadsheet doesn't look numeric: <{0}> (from {1})".format(datum, self.identifier())
CON return None
| <<<<<<< SEARCH
# If the value we get from the spreadsheet is not numeric, send
# that to Backdrop as a null data point
return None
else:
=======
# If the value we get from the spreadsheet is not numeric, send
# that to Backdrop as a null data point
... |
kamatama41/embulk-test-helpers | ba5d5a08d3cb7a2e34487761b7e4d2a06441903d | src/main/kotlin/org/embulk/test/Recorder.kt | kotlin | mit | Use hamcrest's assertThat instead of Junit 4's one
| package org.embulk.test
import org.embulk.spi.Column
import org.embulk.spi.PageReader
import org.embulk.spi.Schema
import org.embulk.spi.util.Pages
import org.hamcrest.Matchers.`is`
import org.junit.Assert.assertThat
/**
* Repository of [Record]
*/
internal class Recorder {
private val records = mutableListOf<... | package org.embulk.test
import org.embulk.spi.Column
import org.embulk.spi.PageReader
import org.embulk.spi.Schema
import org.embulk.spi.util.Pages
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.`is`
/**
* Repository of [Record]
*/
internal class Recorder {
private val records = mutab... | 1 | 2 | 1 | mixed | --- a/src/main/kotlin/org/embulk/test/Recorder.kt
+++ b/src/main/kotlin/org/embulk/test/Recorder.kt
@@ -6,5 +6,4 @@
import org.embulk.spi.util.Pages
-
+import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.`is`
-import org.junit.Assert.assertThat
| --- a/src/main/kotlin/org/embulk/test/Recorder.kt
+++ b/src/main/kotlin/org/embulk/test/Recorder.kt
@@ ... @@
import org.embulk.spi.util.Pages
-
+import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.`is`
-import org.junit.Assert.assertThat
| --- a/src/main/kotlin/org/embulk/test/Recorder.kt
+++ b/src/main/kotlin/org/embulk/test/Recorder.kt
@@ -6,5 +6,4 @@
CON import org.embulk.spi.util.Pages
DEL
ADD import org.hamcrest.MatcherAssert.assertThat
CON import org.hamcrest.Matchers.`is`
DEL import org.junit.Assert.assertThat
CON
| <<<<<<< SEARCH
import org.embulk.spi.Schema
import org.embulk.spi.util.Pages
import org.hamcrest.Matchers.`is`
import org.junit.Assert.assertThat
/**
=======
import org.embulk.spi.Schema
import org.embulk.spi.util.Pages
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.`is`
/**
>>>>>>> REPL... |
seattletimes/newsapp-template | 932999494a4e543c3b7969375194bd1840a7f4b0 | root/tasks/connect.js | javascript | mit | Add a filter for case sensitivity
@audreycarlsen Let me know if you see this screw anything up for you. It
should be relatively stable, but you never know.
| /*
Sets up a connect server to work from the /build folder. May also set up a
livereload server at some point.
*/
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.config.merge({
connect: {
dev: {
options: {
livereload: true,
base: "./... | /*
Sets up a connect server to work from the /build folder. May also set up a
livereload server at some point.
*/
var fs = require("fs");
var path = require("path");
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.config.merge({
connect: {
dev: {
optio... | 23 | 1 | 2 | mixed | --- a/root/tasks/connect.js
+++ b/root/tasks/connect.js
@@ -6,2 +6,5 @@
*/
+
+var fs = require("fs");
+var path = require("path");
@@ -16,3 +19,22 @@
livereload: true,
- base: "./build"
+ base: "./build",
+ //middleware to protect against case-insensitive file systems
+ ... | --- a/root/tasks/connect.js
+++ b/root/tasks/connect.js
@@ ... @@
*/
+
+var fs = require("fs");
+var path = require("path");
@@ ... @@
livereload: true,
- base: "./build"
+ base: "./build",
+ //middleware to protect against case-insensitive file systems
+ middleware: fu... | --- a/root/tasks/connect.js
+++ b/root/tasks/connect.js
@@ -6,2 +6,5 @@
CON */
ADD
ADD var fs = require("fs");
ADD var path = require("path");
CON
@@ -16,3 +19,22 @@
CON livereload: true,
DEL base: "./build"
ADD base: "./build",
ADD //middleware to protect against case-insensit... | <<<<<<< SEARCH
*/
module.exports = function(grunt) {
=======
*/
var fs = require("fs");
var path = require("path");
module.exports = function(grunt) {
>>>>>>> REPLACE
<<<<<<< SEARCH
options: {
livereload: true,
base: "./build"
}
}
=======
options: {
l... |
Smile-SA/npmjs-enterprise | fbeaecf0604209e1e2f0eaa722faf83ac53fa7fe | app.js | javascript | apache-2.0 | Add trace logs for response duration
| 'use strict';
var http = require('http');
var config = require('./lib/configLoader');
var urlUtils = require('./lib/urlUtils');
var api = require('./lib/api');
var logger = config.logger;
process.on('uncaughtException', function(err) {
logger.error('Uncaught exception: %s', JSON.stringify(err, null, 4));
});
api... | 'use strict';
var http = require('http');
var config = require('./lib/configLoader');
var urlUtils = require('./lib/urlUtils');
var api = require('./lib/api');
var logger = config.logger;
process.on('uncaughtException', function(err) {
logger.error('Uncaught exception: %s', JSON.stringify(err, null, 4));
});
api... | 6 | 0 | 2 | add_only | --- a/app.js
+++ b/app.js
@@ -18,2 +18,4 @@
try {
+ var startDate = Date.now();
+
var isGet = req.method === 'GET';
@@ -30,2 +32,6 @@
}
+
+ resp.on('finish', function() {
+ logger.trace('%s: response in %sms', req.url, Date.now() - startDate);
+ });
} catch (error) { | --- a/app.js
+++ b/app.js
@@ ... @@
try {
+ var startDate = Date.now();
+
var isGet = req.method === 'GET';
@@ ... @@
}
+
+ resp.on('finish', function() {
+ logger.trace('%s: response in %sms', req.url, Date.now() - startDate);
+ });
} catch (error) {
| --- a/app.js
+++ b/app.js
@@ -18,2 +18,4 @@
CON try {
ADD var startDate = Date.now();
ADD
CON var isGet = req.method === 'GET';
@@ -30,2 +32,6 @@
CON }
ADD
ADD resp.on('finish', function() {
ADD logger.trace('%s: response in %sms', req.url, Date.now() - startDate);
ADD });
CON } catch (e... | <<<<<<< SEARCH
http.createServer(function(req, resp) {
try {
var isGet = req.method === 'GET';
=======
http.createServer(function(req, resp) {
try {
var startDate = Date.now();
var isGet = req.method === 'GET';
>>>>>>> REPLACE
<<<<<<< SEARCH
api.proxyToCentralRepository(req, resp);
}
}... |
Kiskae/DiscordKt | b2413ef564d5b9e8abd5fa75930778830b128b06 | api/src/main/kotlin/net/serverpeon/discord/model/Region.kt | kotlin | mit | Add current regions as a static resource
| package net.serverpeon.discord.model
/**
* Represents one of the regions in which a [Guild] may be hosted.
*/
interface Region {
/**
* Alphanumeric (with dashes) id representing this region.
*/
val id: String
/**
* Approximate continent on which this region exists.
*/
val contine... | package net.serverpeon.discord.model
/**
* Represents one of the regions in which a [Guild] may be hosted.
*/
interface Region {
/**
* Alphanumeric (with dashes) id representing this region.
*/
val id: String
/**
* Approximate continent on which this region exists.
*/
val contine... | 17 | 0 | 1 | add_only | --- a/api/src/main/kotlin/net/serverpeon/discord/model/Region.kt
+++ b/api/src/main/kotlin/net/serverpeon/discord/model/Region.kt
@@ -25,2 +25,19 @@
}
+
+ /**
+ * Known regions, might change at some point in the future.
+ *
+ * Use [ClientModel.getAvailableServerRegions] to get an up-to-date list.
+... | --- a/api/src/main/kotlin/net/serverpeon/discord/model/Region.kt
+++ b/api/src/main/kotlin/net/serverpeon/discord/model/Region.kt
@@ ... @@
}
+
+ /**
+ * Known regions, might change at some point in the future.
+ *
+ * Use [ClientModel.getAvailableServerRegions] to get an up-to-date list.
+ */
+... | --- a/api/src/main/kotlin/net/serverpeon/discord/model/Region.kt
+++ b/api/src/main/kotlin/net/serverpeon/discord/model/Region.kt
@@ -25,2 +25,19 @@
CON }
ADD
ADD /**
ADD * Known regions, might change at some point in the future.
ADD *
ADD * Use [ClientModel.getAvailableServerRegions] to get an ... | <<<<<<< SEARCH
UNKNOWN
}
}
=======
UNKNOWN
}
/**
* Known regions, might change at some point in the future.
*
* Use [ClientModel.getAvailableServerRegions] to get an up-to-date list.
*/
enum class KnownRegions(override val id: String, override val continent: Continen... |
Kotlin/dokka | 31d6374cc7101d7dea24defcd1c03e909420ccb6 | plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt | kotlin | apache-2.0 | Fix junit imports in tests
| package locationProvider
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.base.resolvers.local.DefaultLocationProvider
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
import org.junit.Assert.assertNotEquals
import org.junit.Test
class DefaultLocationProviderTest: AbstractC... | package locationProvider
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.base.resolvers.local.DefaultLocationProvider
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
import org.junit.jupiter.api.Assertions.assertNotEquals
import org.junit.jupiter.api.Test
class DefaultLoc... | 2 | 2 | 1 | mixed | --- a/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt
+++ b/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt
@@ -5,4 +5,4 @@
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
-import org.junit.Assert.assertNotEquals
-import org.junit.Test
+import or... | --- a/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt
+++ b/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt
@@ ... @@
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
-import org.junit.Assert.assertNotEquals
-import org.junit.Test
+import org.juni... | --- a/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt
+++ b/plugins/base/src/test/kotlin/locationProvider/DefaultLocationProviderTest.kt
@@ -5,4 +5,4 @@
CON import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
DEL import org.junit.Assert.assertNotEquals
DEL import org.junit.Test
A... | <<<<<<< SEARCH
import org.jetbrains.dokka.base.resolvers.local.DefaultLocationProvider
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
import org.junit.Assert.assertNotEquals
import org.junit.Test
class DefaultLocationProviderTest: AbstractCoreTest() {
=======
import org.jetbrains.dokka.base.resolvers.... |
rustoscript/french-press | 2d99255b87e36ad057cc94011f1e34ee3f107f59 | src/js_types/js_type.rs | rust | mit | Create new enum of all standard JS types
| use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;
pub trait JsTrait {}
pub struct JsT {
uid: Uuid,
t: Box<JsTrait>,
}
impl JsT {
pub fn new(t: Box<JsTrait>) -> JsT {
JsT {
uid: Uuid::new_v4(),
t: t,
}
}
}
impl PartialEq for JsT {
fn eq... | use std::string::String;
use js_types::js_obj::JsObjStruct;
use js_types::js_str::JsStrStruct;
use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;
pub struct JsT {
pub uuid: Uuid,
pub t: JsType,
}
impl JsT {
pub fn new(t: JsType) -> JsT {
JsT {
uuid: Uuid::new_v4(),
... | 21 | 9 | 7 | mixed | --- a/src/js_types/js_type.rs
+++ b/src/js_types/js_type.rs
@@ -1 +1,4 @@
+use std::string::String;
+use js_types::js_obj::JsObjStruct;
+use js_types::js_str::JsStrStruct;
use std::cmp::Ordering;
@@ -4,7 +7,5 @@
-pub trait JsTrait {}
-
pub struct JsT {
- uid: Uuid,
- t: Box<JsTrait>,
+ pub uuid: Uuid,
+ ... | --- a/src/js_types/js_type.rs
+++ b/src/js_types/js_type.rs
@@ ... @@
+use std::string::String;
+use js_types::js_obj::JsObjStruct;
+use js_types::js_str::JsStrStruct;
use std::cmp::Ordering;
@@ ... @@
-pub trait JsTrait {}
-
pub struct JsT {
- uid: Uuid,
- t: Box<JsTrait>,
+ pub uuid: Uuid,
+ pub t: Js... | --- a/src/js_types/js_type.rs
+++ b/src/js_types/js_type.rs
@@ -1 +1,4 @@
ADD use std::string::String;
ADD use js_types::js_obj::JsObjStruct;
ADD use js_types::js_str::JsStrStruct;
CON use std::cmp::Ordering;
@@ -4,7 +7,5 @@
CON
DEL pub trait JsTrait {}
DEL
CON pub struct JsT {
DEL uid: Uuid,
DEL t: Box<JsTra... | <<<<<<< SEARCH
use std::cmp::Ordering;
use std::hash::{Hash, Hasher};
use uuid::Uuid;
pub trait JsTrait {}
pub struct JsT {
uid: Uuid,
t: Box<JsTrait>,
}
impl JsT {
pub fn new(t: Box<JsTrait>) -> JsT {
JsT {
uid: Uuid::new_v4(),
t: t,
}
=======
use std::string::St... |
charlieegan3/graph_match | e6a8f2ce3a6ce3f46b59422f5c942a21d90bd56e | src/edge.rs | rust | mit | Add basic total equality matcher for Edge
Fuzzy matcher to come later, which will be more useful.
| use std::collections::HashMap;
use node;
pub type Index = usize;
pub struct Edge {
pub identifier: String,
pub target: node::Index,
pub attributes: Option<HashMap<String, String>>,
pub next_outgoing_edge: Option<Index>,
}
| use std::collections::HashMap;
use node;
pub type Index = usize;
pub struct Edge {
pub identifier: String,
pub target: node::Index,
pub attributes: Option<HashMap<String, String>>,
pub next_outgoing_edge: Option<Index>,
}
impl Edge {
pub fn equal(&self, edge: Edge) -> bool {
self.identifi... | 41 | 0 | 1 | add_only | --- a/src/edge.rs
+++ b/src/edge.rs
@@ -11 +11,42 @@
}
+
+impl Edge {
+ pub fn equal(&self, edge: Edge) -> bool {
+ self.identifier == edge.identifier &&
+ self.attributes == edge.attributes
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use std::collections::HashMap;
+ use super::*;
+ #[test]
... | --- a/src/edge.rs
+++ b/src/edge.rs
@@ ... @@
}
+
+impl Edge {
+ pub fn equal(&self, edge: Edge) -> bool {
+ self.identifier == edge.identifier &&
+ self.attributes == edge.attributes
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use std::collections::HashMap;
+ use super::*;
+ #[test]
+ fn... | --- a/src/edge.rs
+++ b/src/edge.rs
@@ -11 +11,42 @@
CON }
ADD
ADD impl Edge {
ADD pub fn equal(&self, edge: Edge) -> bool {
ADD self.identifier == edge.identifier &&
ADD self.attributes == edge.attributes
ADD }
ADD }
ADD
ADD #[cfg(test)]
ADD mod tests {
ADD use std::collections::HashM... | <<<<<<< SEARCH
pub next_outgoing_edge: Option<Index>,
}
=======
pub next_outgoing_edge: Option<Index>,
}
impl Edge {
pub fn equal(&self, edge: Edge) -> bool {
self.identifier == edge.identifier &&
self.attributes == edge.attributes
}
}
#[cfg(test)]
mod tests {
use std::collect... |
electerious/Ackee | a65e20f4dc92e9230341fbd65c3bcbdf837881ec | src/database/records.js | javascript | mit | Remove unused fields during anonymization instead of storing null
| 'use strict'
const Record = require('../schemas/Record')
const runUpdate = require('../utils/runUpdate')
const add = async (data) => {
return Record.create(data)
}
const update = async (id) => {
return runUpdate(Record, id)
}
const anonymize = async (clientId, ignoreId) => {
return Record.updateMany({
$an... | 'use strict'
const Record = require('../schemas/Record')
const runUpdate = require('../utils/runUpdate')
const add = async (data) => {
return Record.create(data)
}
const update = async (id) => {
return runUpdate(Record, id)
}
const anonymize = async (clientId, ignoreId) => {
return Record.updateMany({
$an... | 13 | 13 | 1 | mixed | --- a/src/database/records.js
+++ b/src/database/records.js
@@ -29,15 +29,15 @@
}, {
- clientId: null,
- siteLanguage: null,
- screenWidth: null,
- screenHeight: null,
- screenColorDepth: null,
- deviceName: null,
- deviceManufacturer: null,
- osName: null,
- osVersion: null,
- browserName: null,
- browser... | --- a/src/database/records.js
+++ b/src/database/records.js
@@ ... @@
}, {
- clientId: null,
- siteLanguage: null,
- screenWidth: null,
- screenHeight: null,
- screenColorDepth: null,
- deviceName: null,
- deviceManufacturer: null,
- osName: null,
- osVersion: null,
- browserName: null,
- browserVersion: n... | --- a/src/database/records.js
+++ b/src/database/records.js
@@ -29,15 +29,15 @@
CON }, {
DEL clientId: null,
DEL siteLanguage: null,
DEL screenWidth: null,
DEL screenHeight: null,
DEL screenColorDepth: null,
DEL deviceName: null,
DEL deviceManufacturer: null,
DEL osName: null,
DEL osVersion: null,
DE... | <<<<<<< SEARCH
]
}, {
clientId: null,
siteLanguage: null,
screenWidth: null,
screenHeight: null,
screenColorDepth: null,
deviceName: null,
deviceManufacturer: null,
osName: null,
osVersion: null,
browserName: null,
browserVersion: null,
browserWidth: null,
browserHeight: null
})
=======
... |
moschlar/SAUCE | 34e17142f565cfc27c15522212c4240944cb4001 | sauce/lib/helpers.py | python | agpl-3.0 | Replace my own helper functions with webhelper ones
| # -*- coding: utf-8 -*-
"""WebHelpers used in SAUCE.
@author: moschlar
"""
from tg import url as tgurl
from webhelpers import date, feedgenerator, html, number, misc, text
import re, textwrap
#log = logging.getLogger(__name__)
# shortcut for links
link_to = html.tags.link_to
def link(label, url='', **attrs):
... | # -*- coding: utf-8 -*-
"""WebHelpers used in SAUCE.
@author: moschlar
"""
from datetime import datetime
from tg import url as tgurl
#from webhelpers import date, feedgenerator, html, number, misc, text
import webhelpers as w
from webhelpers.html.tags import link_to
from webhelpers.text import truncate
from webhel... | 12 | 33 | 4 | mixed | --- a/sauce/lib/helpers.py
+++ b/sauce/lib/helpers.py
@@ -6,6 +6,14 @@
+from datetime import datetime
+
from tg import url as tgurl
-from webhelpers import date, feedgenerator, html, number, misc, text
+#from webhelpers import date, feedgenerator, html, number, misc, text
-import re, textwrap
+import webhelpers as... | --- a/sauce/lib/helpers.py
+++ b/sauce/lib/helpers.py
@@ ... @@
+from datetime import datetime
+
from tg import url as tgurl
-from webhelpers import date, feedgenerator, html, number, misc, text
+#from webhelpers import date, feedgenerator, html, number, misc, text
-import re, textwrap
+import webhelpers as w
+
+f... | --- a/sauce/lib/helpers.py
+++ b/sauce/lib/helpers.py
@@ -6,6 +6,14 @@
CON
ADD from datetime import datetime
ADD
CON from tg import url as tgurl
DEL from webhelpers import date, feedgenerator, html, number, misc, text
ADD #from webhelpers import date, feedgenerator, html, number, misc, text
CON
DEL import re, textwr... | <<<<<<< SEARCH
"""
from tg import url as tgurl
from webhelpers import date, feedgenerator, html, number, misc, text
import re, textwrap
#log = logging.getLogger(__name__)
# shortcut for links
link_to = html.tags.link_to
def link(label, url='', **attrs):
return link_to(label, tgurl(url), **attrs)
def strftimed... |
hackclub/api | a89048f681406a4c3f3507118b73eee129d8e8b3 | frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js | javascript | mit | Fix workshop loading spinner not showing properly
| import React, { Component } from 'react'
import Radium from 'radium'
import Helmet from 'react-helmet'
import Axios from 'axios'
import { NavBar, LoadingSpinner } from '../../components'
import { NotFound } from '../../containers'
const baseUrl = 'https://api.hackclub.com/v1/workshops/'
class WorkshopWrapper extends ... | import React, { Component } from 'react'
import Radium from 'radium'
import Helmet from 'react-helmet'
import Axios from 'axios'
import { NavBar, LoadingSpinner } from '../../components'
import { NotFound } from '../../containers'
const baseUrl = 'https://api.hackclub.com/v1/workshops/'
class WorkshopWrapper extends ... | 5 | 4 | 3 | mixed | --- a/frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js
+++ b/frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js
@@ -15,3 +15,4 @@
this.setState({
- workshopContent: resp.data,
+ notFound: false,
+ workshopContent: resp.data
})
@@ -28,5 +29,5 ... | --- a/frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js
+++ b/frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js
@@ ... @@
this.setState({
- workshopContent: resp.data,
+ notFound: false,
+ workshopContent: resp.data
})
@@ ... @@
return {... | --- a/frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js
+++ b/frontend/src/containers/WorkshopWrapper/WorkshopWrapper.js
@@ -15,3 +15,4 @@
CON this.setState({
DEL workshopContent: resp.data,
ADD notFound: false,
ADD workshopContent: resp.data
CON })
... | <<<<<<< SEARCH
.then(resp => {
this.setState({
workshopContent: resp.data,
})
})
=======
.then(resp => {
this.setState({
notFound: false,
workshopContent: resp.data
})
})
>>>>>>> REPLACE
<<<<<<< SEA... |
edaubert/jongo | cc117347141410dbf569d6b8b3be6eec379301f6 | src/main/java/org/jongo/bson/RelaxedLazyDBObject.java | java | apache-2.0 | Remove the use of a protected deprecated field
| /*
* Copyright (C) 2011 Benoit GUEROUT <bguerout at gmail dot com> and Yves AMSELLEM <amsellem dot yves at gmail dot com>
*
* 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:/... | /*
* Copyright (C) 2011 Benoit GUEROUT <bguerout at gmail dot com> and Yves AMSELLEM <amsellem dot yves at gmail dot com>
*
* 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:/... | 1 | 1 | 1 | mixed | --- a/src/main/java/org/jongo/bson/RelaxedLazyDBObject.java
+++ b/src/main/java/org/jongo/bson/RelaxedLazyDBObject.java
@@ -29,3 +29,3 @@
public byte[] toByteArray() {
- return _input.array();
+ return getBytes();
} | --- a/src/main/java/org/jongo/bson/RelaxedLazyDBObject.java
+++ b/src/main/java/org/jongo/bson/RelaxedLazyDBObject.java
@@ ... @@
public byte[] toByteArray() {
- return _input.array();
+ return getBytes();
}
| --- a/src/main/java/org/jongo/bson/RelaxedLazyDBObject.java
+++ b/src/main/java/org/jongo/bson/RelaxedLazyDBObject.java
@@ -29,3 +29,3 @@
CON public byte[] toByteArray() {
DEL return _input.array();
ADD return getBytes();
CON }
| <<<<<<< SEARCH
public byte[] toByteArray() {
return _input.array();
}
=======
public byte[] toByteArray() {
return getBytes();
}
>>>>>>> REPLACE
|
hoangpham95/react-native | 2dc559d1fbab7434d61df62936be11434d6f7f91 | babel-preset/lib/resolvePlugins.js | javascript | bsd-3-clause | Add possibility to add custom plugin prefix
Summary: The problem with a fixed prefix is that babel 7 uses a scoped packages and every (standard) plugin is now part of that scope so the prefix is no longer `babel-plugin-` but instead `babel/plugin-`. There are more changes. This one will at least fix most of them.
Rev... | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
/**
* Manually resolve all default Babel plugins.
* `babel.transform` will attempt to resolve all base plugins relative ... | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
/**
* Manually resolve all default Babel plugins.
* `babel.transform` will attempt to resolve all base plu... | 10 | 4 | 5 | mixed | --- a/babel-preset/lib/resolvePlugins.js
+++ b/babel-preset/lib/resolvePlugins.js
@@ -5,2 +5,4 @@
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
@@ -14,4 +16,4 @@
*/
-function resolvePlugins(plugins) {
- return plugins.map(resolvePlugin);
+function resolvePlugins(plugins, prefix) {
... | --- a/babel-preset/lib/resolvePlugins.js
+++ b/babel-preset/lib/resolvePlugins.js
@@ ... @@
* LICENSE file in the root directory of this source tree.
+ *
+ * @format
*/
@@ ... @@
*/
-function resolvePlugins(plugins) {
- return plugins.map(resolvePlugin);
+function resolvePlugins(plugins, prefix) {
+ return plug... | --- a/babel-preset/lib/resolvePlugins.js
+++ b/babel-preset/lib/resolvePlugins.js
@@ -5,2 +5,4 @@
CON * LICENSE file in the root directory of this source tree.
ADD *
ADD * @format
CON */
@@ -14,4 +16,4 @@
CON */
DEL function resolvePlugins(plugins) {
DEL return plugins.map(resolvePlugin);
ADD function resolvePlu... | <<<<<<< SEARCH
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
=======
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use str... |
esofthead/mycollab | ffd9dd315370e2a084a902f050dfa9061a43ded9 | mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt | kotlin | agpl-3.0 | Update the correct reset password servlet
| /**
* Copyright © MyCollab
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is di... | /**
* Copyright © MyCollab
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is di... | 2 | 2 | 1 | mixed | --- a/mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt
+++ b/mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt
@@ -39,4 +39,4 @@
- @Bean("resetPasswordServlet")
- fun resetPasswordPage() = ServletRegistratio... | --- a/mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt
+++ b/mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt
@@ ... @@
- @Bean("resetPasswordServlet")
- fun resetPasswordPage() = ServletRegistrationBean(Re... | --- a/mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt
+++ b/mycollab-servlet/src/main/java/com/mycollab/module/billing/servlet/BillingSpringServletRegistrator.kt
@@ -39,4 +39,4 @@
CON
DEL @Bean("resetPasswordServlet")
DEL fun resetPasswordPage() = ServletRe... | <<<<<<< SEARCH
fun resetPasswordServlet() = ServletRegistrationBean(ResetPasswordHandler(), "/user/recoverypassword/action/*")
@Bean("resetPasswordServlet")
fun resetPasswordPage() = ServletRegistrationBean(ResetPasswordHandler(), "/user/recoverypassword/*")
}
=======
fun resetPasswordServlet() = Serv... |
corbt/react-native-keep-awake | 94e543fae61f6380360279383010da0f5ac806a3 | android/src/main/java/com/corbt/keepawake/KCKeepAwake.java | java | mit | Check is activity is null
| // Adapted from
// https://github.com/gijoehosaphat/react-native-keep-screen-on
package com.corbt.keepawake;
import android.app.Activity;
import android.view.WindowManager;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react... | // Adapted from
// https://github.com/gijoehosaphat/react-native-keep-screen-on
package com.corbt.keepawake;
import android.app.Activity;
import android.view.WindowManager;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react... | 18 | 12 | 2 | mixed | --- a/android/src/main/java/com/corbt/keepawake/KCKeepAwake.java
+++ b/android/src/main/java/com/corbt/keepawake/KCKeepAwake.java
@@ -26,8 +26,11 @@
final Activity activity = getCurrentActivity();
- activity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- ... | --- a/android/src/main/java/com/corbt/keepawake/KCKeepAwake.java
+++ b/android/src/main/java/com/corbt/keepawake/KCKeepAwake.java
@@ ... @@
final Activity activity = getCurrentActivity();
- activity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- a... | --- a/android/src/main/java/com/corbt/keepawake/KCKeepAwake.java
+++ b/android/src/main/java/com/corbt/keepawake/KCKeepAwake.java
@@ -26,8 +26,11 @@
CON final Activity activity = getCurrentActivity();
DEL activity.runOnUiThread(new Runnable() {
DEL @Override
DEL public void run()... | <<<<<<< SEARCH
public void activate() {
final Activity activity = getCurrentActivity();
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
}... |
Haehnchen/idea-php-laravel-plugin | ad38b2042a6b9035162ee029be6d46e6132bd8e2 | src/main/java/de/espend/idea/laravel/LaravelSettings.java | java | mit | Remove removed id property from storage annotation
| package de.espend.idea.laravel;
import com.intellij.openapi.components.*;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import de.espend.idea.laravel.view.dict.TemplatePath;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.Nullable;
import ja... | package de.espend.idea.laravel;
import com.intellij.openapi.components.*;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import de.espend.idea.laravel.view.dict.TemplatePath;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.Nullable;
import ja... | 2 | 2 | 1 | mixed | --- a/src/main/java/de/espend/idea/laravel/LaravelSettings.java
+++ b/src/main/java/de/espend/idea/laravel/LaravelSettings.java
@@ -18,4 +18,4 @@
storages = {
- @Storage(id = "default", file = StoragePathMacros.PROJECT_FILE),
- @Storage(id = "dir", file = StoragePathMacros.PROJECT_CONFIG_DIR + "/lara... | --- a/src/main/java/de/espend/idea/laravel/LaravelSettings.java
+++ b/src/main/java/de/espend/idea/laravel/LaravelSettings.java
@@ ... @@
storages = {
- @Storage(id = "default", file = StoragePathMacros.PROJECT_FILE),
- @Storage(id = "dir", file = StoragePathMacros.PROJECT_CONFIG_DIR + "/laravel-plug... | --- a/src/main/java/de/espend/idea/laravel/LaravelSettings.java
+++ b/src/main/java/de/espend/idea/laravel/LaravelSettings.java
@@ -18,4 +18,4 @@
CON storages = {
DEL @Storage(id = "default", file = StoragePathMacros.PROJECT_FILE),
DEL @Storage(id = "dir", file = StoragePathMacros.PROJECT_CONFIG_DIR... | <<<<<<< SEARCH
name = "LaravelPluginSettings",
storages = {
@Storage(id = "default", file = StoragePathMacros.PROJECT_FILE),
@Storage(id = "dir", file = StoragePathMacros.PROJECT_CONFIG_DIR + "/laravel-plugin.xml", scheme = StorageScheme.DIRECTORY_BASED)
}
)
=======
name = "LaravelPlugi... |
jillix/captcha | 2a6d98dd0f760c658f85c1895c6897459e163d34 | server/operations.js | javascript | mit | Set the number in sessions and correclty compare the values
| // Dependencies
var CaptchaPng = require("captchapng");
// Sessions
var sessions = {};
// Captcha configuration
var serverConfig = {
width: 100,
height: 30
};
// Get configuration
M.emit("captcha.getConfig", function (c) {
serverConfig = c;
});
// Verify captcha
M.on("captcha.verify", function (link, an... | // Dependencies
var CaptchaPng = require("captchapng");
// Sessions
var sessions = {};
// Captcha configuration
var serverConfig = {
width: 100,
height: 30
};
// Get configuration
M.emit("captcha.getConfig", function (c) {
serverConfig = c;
});
// Verify captcha
M.on("captcha.verify", function (link, an... | 3 | 4 | 2 | mixed | --- a/server/operations.js
+++ b/server/operations.js
@@ -20,3 +20,3 @@
var sid = link.session && link.session._sid;
- callback(answer === sessions[sid]);
+ callback(answer.toString() === sessions[sid].toString());
});
@@ -38,5 +38,4 @@
var number = parseInt(Math.random() * 9000 + 1000);
- if (!link... | --- a/server/operations.js
+++ b/server/operations.js
@@ ... @@
var sid = link.session && link.session._sid;
- callback(answer === sessions[sid]);
+ callback(answer.toString() === sessions[sid].toString());
});
@@ ... @@
var number = parseInt(Math.random() * 9000 + 1000);
- if (!link.session || !lin... | --- a/server/operations.js
+++ b/server/operations.js
@@ -20,3 +20,3 @@
CON var sid = link.session && link.session._sid;
DEL callback(answer === sessions[sid]);
ADD callback(answer.toString() === sessions[sid].toString());
CON });
@@ -38,5 +38,4 @@
CON var number = parseInt(Math.random() * 9000 + 1000);... | <<<<<<< SEARCH
M.on("captcha.verify", function (link, answer, callback) {
var sid = link.session && link.session._sid;
callback(answer === sessions[sid]);
});
=======
M.on("captcha.verify", function (link, answer, callback) {
var sid = link.session && link.session._sid;
callback(answer.toString() === ... |
z-------------/cumulonimbus | de50ca7233167afbbdf0c6d01fab90b2d771e4f4 | test/ui.js | javascript | apache-2.0 | Make the tab nav test actually test something
| const { expect } = require("chai")
const path = require("path")
const Application = require("spectron").Application
describe("ui", function () {
this.timeout(10000)
console.log(require("electron"), __dirname, path.join(__dirname, "..", "main.js"))
beforeEach(function () {
this.app = new Application({
... | const { expect } = require("chai")
const path = require("path")
const Application = require("spectron").Application
describe("ui", function() {
this.timeout(10000)
console.log(require("electron"), __dirname, path.join(__dirname, "..", "main.js"))
beforeEach(function() {
this.app = new Application({
... | 20 | 14 | 5 | mixed | --- a/test/ui.js
+++ b/test/ui.js
@@ -5,3 +5,3 @@
-describe("ui", function () {
+describe("ui", function() {
this.timeout(10000)
@@ -10,3 +10,3 @@
- beforeEach(function () {
+ beforeEach(function() {
this.app = new Application({
@@ -18,3 +18,3 @@
- afterEach(function () {
+ afterEach(function() {
... | --- a/test/ui.js
+++ b/test/ui.js
@@ ... @@
-describe("ui", function () {
+describe("ui", function() {
this.timeout(10000)
@@ ... @@
- beforeEach(function () {
+ beforeEach(function() {
this.app = new Application({
@@ ... @@
- afterEach(function () {
+ afterEach(function() {
if (this.app && this.... | --- a/test/ui.js
+++ b/test/ui.js
@@ -5,3 +5,3 @@
CON
DEL describe("ui", function () {
ADD describe("ui", function() {
CON this.timeout(10000)
@@ -10,3 +10,3 @@
CON
DEL beforeEach(function () {
ADD beforeEach(function() {
CON this.app = new Application({
@@ -18,3 +18,3 @@
CON
DEL afterEach(function () {
... | <<<<<<< SEARCH
const Application = require("spectron").Application
describe("ui", function () {
this.timeout(10000)
console.log(require("electron"), __dirname, path.join(__dirname, "..", "main.js"))
beforeEach(function () {
this.app = new Application({
path: require("electron"),
=======
const Applic... |
Rostifar/WordsWithBytes | 1a24c2518d1b3865da8cc5ec1de7db3feb4bb57f | src/handlers/ScrabbleGameHandler.java | java | mit | Join existing game using a game code is now working. Next...fix socket issues.
| package handlers;
import org.atmosphere.config.service.AtmosphereHandlerService;
import org.atmosphere.cpr.AtmosphereHandler;
import org.atmosphere.cpr.AtmosphereRequest;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.AtmosphereResourceEvent;
import java.io.IOException;
/**
* Created by ros... | package handlers;
import org.atmosphere.config.service.AtmosphereHandlerService;
import org.atmosphere.cpr.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import java.io.IOException;
/**
* Created by rostifar on 6/14/16.
*/
@AtmosphereHandlerService
public class ScrabbleGameHandle... | 12 | 5 | 2 | mixed | --- a/src/handlers/ScrabbleGameHandler.java
+++ b/src/handlers/ScrabbleGameHandler.java
@@ -3,7 +3,6 @@
import org.atmosphere.config.service.AtmosphereHandlerService;
-import org.atmosphere.cpr.AtmosphereHandler;
-import org.atmosphere.cpr.AtmosphereRequest;
-import org.atmosphere.cpr.AtmosphereResource;
-import org.a... | --- a/src/handlers/ScrabbleGameHandler.java
+++ b/src/handlers/ScrabbleGameHandler.java
@@ ... @@
import org.atmosphere.config.service.AtmosphereHandlerService;
-import org.atmosphere.cpr.AtmosphereHandler;
-import org.atmosphere.cpr.AtmosphereRequest;
-import org.atmosphere.cpr.AtmosphereResource;
-import org.atmosph... | --- a/src/handlers/ScrabbleGameHandler.java
+++ b/src/handlers/ScrabbleGameHandler.java
@@ -3,7 +3,6 @@
CON import org.atmosphere.config.service.AtmosphereHandlerService;
DEL import org.atmosphere.cpr.AtmosphereHandler;
DEL import org.atmosphere.cpr.AtmosphereRequest;
DEL import org.atmosphere.cpr.AtmosphereResource;
D... | <<<<<<< SEARCH
import org.atmosphere.config.service.AtmosphereHandlerService;
import org.atmosphere.cpr.AtmosphereHandler;
import org.atmosphere.cpr.AtmosphereRequest;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.AtmosphereResourceEvent;
import java.io.IOException;
=======
import org.atm... |
r24y/github-issues | 976297be81149e588c8620bfb7d3db043ce4d453 | src/gh-issues-view.js | javascript | mit | Use Atom's new Dock feature
| /** @babel */
import React from 'react';
import ReactDOM from 'react-dom';
import IssuesList from './components/issues-list';
export default class GhIssuesView {
constructor(serializedState) {
// Create root element
this.element = document.createElement('div');
this.element.classList.add('quick-issues')... | /** @babel */
import React from 'react';
import ReactDOM from 'react-dom';
import IssuesList from './components/issues-list';
export default class GhIssuesView {
constructor(serializedState) {
// Create root element
this.element = document.createElement('div');
this.element.classList.add('quick-issues')... | 3 | 0 | 1 | add_only | --- a/src/gh-issues-view.js
+++ b/src/gh-issues-view.js
@@ -34,2 +34,5 @@
+ getDefaultLocation() {
+ return 'right';
+ }
} | --- a/src/gh-issues-view.js
+++ b/src/gh-issues-view.js
@@ ... @@
+ getDefaultLocation() {
+ return 'right';
+ }
}
| --- a/src/gh-issues-view.js
+++ b/src/gh-issues-view.js
@@ -34,2 +34,5 @@
CON
ADD getDefaultLocation() {
ADD return 'right';
ADD }
CON }
| <<<<<<< SEARCH
}
}
=======
}
getDefaultLocation() {
return 'right';
}
}
>>>>>>> REPLACE
|
t-miyamae/teuthology | 7153c2be456084dfdd7cc346d62a6eb0fcaa2a31 | teuthology/config.py | python | mit | Add doc noting Inktank's lockserver URL
Since I just removed it from lockstatus.py.
| import os
import yaml
import logging
CONF_FILE = os.path.join(os.environ['HOME'], '.teuthology.yaml')
log = logging.getLogger(__name__)
class _Config(object):
"""
This class is intended to unify teuthology's many configuration files and
objects. Currently it serves as a convenient interface to
~/.te... | import os
import yaml
import logging
CONF_FILE = os.path.join(os.environ['HOME'], '.teuthology.yaml')
log = logging.getLogger(__name__)
class _Config(object):
"""
This class is intended to unify teuthology's many configuration files and
objects. Currently it serves as a convenient interface to
~/.te... | 5 | 0 | 1 | add_only | --- a/teuthology/config.py
+++ b/teuthology/config.py
@@ -27,2 +27,7 @@
def lock_server(self):
+ """
+ The URL to your lock server. For example, Inktank uses:
+
+ http://teuthology.front.sepia.ceph.com/locker/lock
+ """
return self.__conf.get('lock_server') | --- a/teuthology/config.py
+++ b/teuthology/config.py
@@ ... @@
def lock_server(self):
+ """
+ The URL to your lock server. For example, Inktank uses:
+
+ http://teuthology.front.sepia.ceph.com/locker/lock
+ """
return self.__conf.get('lock_server')
| --- a/teuthology/config.py
+++ b/teuthology/config.py
@@ -27,2 +27,7 @@
CON def lock_server(self):
ADD """
ADD The URL to your lock server. For example, Inktank uses:
ADD
ADD http://teuthology.front.sepia.ceph.com/locker/lock
ADD """
CON return self.__conf.get('lock_serv... | <<<<<<< SEARCH
@property
def lock_server(self):
return self.__conf.get('lock_server')
=======
@property
def lock_server(self):
"""
The URL to your lock server. For example, Inktank uses:
http://teuthology.front.sepia.ceph.com/locker/lock
"""
return ... |
StefMa/AndroidArtifacts | 0462563238c213151db47c367ff91860207aea79 | src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt | kotlin | apache-2.0 | Move creating of in afterEvalutaion listener
| package guru.stefma.androidartifacts
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.publish.maven.MavenPublication
class JavaArtifactsPlugin : Plugin<Project> {
override fun apply(project: Project) {
val extension = project.createJavaArtifactsExtension()
project.... | package guru.stefma.androidartifacts
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.publish.maven.MavenPublication
class JavaArtifactsPlugin : Plugin<Project> {
override fun apply(project: Project) {
val extension = project.createJavaArtifactsExtension()
project.... | 5 | 1 | 1 | mixed | --- a/src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt
+++ b/src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt
@@ -15,3 +15,7 @@
publicationTasks.publicationNames += publicationName
- createPublication(extension, project, publicationName, publicationTasks)
+ /... | --- a/src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt
+++ b/src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt
@@ ... @@
publicationTasks.publicationNames += publicationName
- createPublication(extension, project, publicationName, publicationTasks)
+ // TODO: ... | --- a/src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt
+++ b/src/main/kotlin/guru/stefma/androidartifacts/JavaArtifactsPlugin.kt
@@ -15,3 +15,7 @@
CON publicationTasks.publicationNames += publicationName
DEL createPublication(extension, project, publicationName, publicationTasks)
ADD ... | <<<<<<< SEARCH
project.tasks.createJavaArtifactsTask(publicationName)
publicationTasks.publicationNames += publicationName
createPublication(extension, project, publicationName, publicationTasks)
}
=======
project.tasks.createJavaArtifactsTask(publicationName)
publicationTa... |
onepercentclub/onepercentclub-site | 8460b1249d1140234798b8b7e482b13cde173a1e | bluebottle/settings/jenkins.py | python | bsd-3-clause | Disable django.contrib.sites tests in Jenkins.
| # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | 5 | 0 | 1 | add_only | --- a/bluebottle/settings/jenkins.py
+++ b/bluebottle/settings/jenkins.py
@@ -27,2 +27,7 @@
+# This app fails with a strange error:
+# DatabaseError: no such table: django_comments
+# Not sure what's going on so it's disabled for now.
+PROJECT_APPS.remove('django.contrib.sites')
+
# https://github.com/django-extensi... | --- a/bluebottle/settings/jenkins.py
+++ b/bluebottle/settings/jenkins.py
@@ ... @@
+# This app fails with a strange error:
+# DatabaseError: no such table: django_comments
+# Not sure what's going on so it's disabled for now.
+PROJECT_APPS.remove('django.contrib.sites')
+
# https://github.com/django-extensions/djan... | --- a/bluebottle/settings/jenkins.py
+++ b/bluebottle/settings/jenkins.py
@@ -27,2 +27,7 @@
CON
ADD # This app fails with a strange error:
ADD # DatabaseError: no such table: django_comments
ADD # Not sure what's going on so it's disabled for now.
ADD PROJECT_APPS.remove('django.contrib.sites')
ADD
CON # https://gith... | <<<<<<< SEARCH
PROJECT_APPS.remove('django.contrib.auth')
# https://github.com/django-extensions/django-extensions/issues/154
PROJECT_APPS.remove('django_extensions')
=======
PROJECT_APPS.remove('django.contrib.auth')
# This app fails with a strange error:
# DatabaseError: no such table: django_comments
# Not sure w... |
gradle/gradle | 6311d15971bf01c1b9351fb0b48bc54ed94209a7 | .teamcity/settings.kts | kotlin | apache-2.0 | Upgrade TeamCity DSL version to 2022.04
| import common.VersionedSettingsBranch
import jetbrains.buildServer.configs.kotlin.v2019_2.project
import jetbrains.buildServer.configs.kotlin.v2019_2.version
import projects.GradleBuildToolRootProject
version = "2021.2"
/*
Master (buildTypeId: Gradle_Master)
|----- Check (buildTypeId: Gradle_Master_Check)
| ... | import common.VersionedSettingsBranch
import jetbrains.buildServer.configs.kotlin.v2019_2.project
import jetbrains.buildServer.configs.kotlin.v2019_2.version
import projects.GradleBuildToolRootProject
version = "2022.04"
/*
Master (buildTypeId: Gradle_Master)
|----- Check (buildTypeId: Gradle_Master_Check)
| ... | 1 | 1 | 1 | mixed | --- a/.teamcity/settings.kts
+++ b/.teamcity/settings.kts
@@ -5,3 +5,3 @@
-version = "2021.2"
+version = "2022.04"
| --- a/.teamcity/settings.kts
+++ b/.teamcity/settings.kts
@@ ... @@
-version = "2021.2"
+version = "2022.04"
| --- a/.teamcity/settings.kts
+++ b/.teamcity/settings.kts
@@ -5,3 +5,3 @@
CON
DEL version = "2021.2"
ADD version = "2022.04"
CON
| <<<<<<< SEARCH
import projects.GradleBuildToolRootProject
version = "2021.2"
/*
=======
import projects.GradleBuildToolRootProject
version = "2022.04"
/*
>>>>>>> REPLACE
|
seanrivera/rust | 431cb9a3454fe19fe6987aebb3b3655dc9eca8ad | src/test/run-pass/anon-obj-overriding.rs | rust | apache-2.0 | Test method overriding a little more.
| //xfail-stage0
use std;
fn main() {
obj a() {
fn foo() -> int {
ret 2;
}
fn bar() -> int {
ret self.foo();
}
}
auto my_a = a();
// An anonymous object that overloads the 'foo' method.
auto my_b = obj() {
fn foo() -> int {
... | //xfail-stage0
use std;
fn main() {
obj a() {
fn foo() -> int {
ret 2;
}
fn bar() -> int {
ret self.foo();
}
}
auto my_a = a();
// An anonymous object that overloads the 'foo' method.
auto my_b = obj() {
fn foo() -> int {
... | 17 | 0 | 1 | add_only | --- a/src/test/run-pass/anon-obj-overriding.rs
+++ b/src/test/run-pass/anon-obj-overriding.rs
@@ -28,2 +28,19 @@
assert (my_b.bar() == 3);
+
+ auto my_c = obj() {
+ fn baz(int x, int y) -> int {
+ ret x + y + self.foo();
+ }
+ with my_b
+ };
+
+ auto my_d = obj() {
+ ... | --- a/src/test/run-pass/anon-obj-overriding.rs
+++ b/src/test/run-pass/anon-obj-overriding.rs
@@ ... @@
assert (my_b.bar() == 3);
+
+ auto my_c = obj() {
+ fn baz(int x, int y) -> int {
+ ret x + y + self.foo();
+ }
+ with my_b
+ };
+
+ auto my_d = obj() {
+ fn baz(i... | --- a/src/test/run-pass/anon-obj-overriding.rs
+++ b/src/test/run-pass/anon-obj-overriding.rs
@@ -28,2 +28,19 @@
CON assert (my_b.bar() == 3);
ADD
ADD auto my_c = obj() {
ADD fn baz(int x, int y) -> int {
ADD ret x + y + self.foo();
ADD }
ADD with my_b
ADD };
ADD
ADD ... | <<<<<<< SEARCH
assert (my_b.foo() == 3);
assert (my_b.bar() == 3);
}
=======
assert (my_b.foo() == 3);
assert (my_b.bar() == 3);
auto my_c = obj() {
fn baz(int x, int y) -> int {
ret x + y + self.foo();
}
with my_b
};
auto my_d = obj() {
fn baz(... |
bluss/arrayvec | 9fc6737e1bb5048b26bf3478753cb1483017fa50 | src/maybe_uninit_copy.rs | rust | apache-2.0 | FIX: Use repr(C) MaybeUninitCopy after discussion with RalfJung
We have a recommendation from the unsafe-wg (no rule yet), that
repr(C) for unions should work this way, so that we can cast from the
union type to one of its fields.
|
use array::Array;
#[derive(Copy, Clone)]
pub union MaybeUninitCopy<T>
where T: Copy
{
empty: (),
value: T,
}
impl<T> MaybeUninitCopy<T>
where T: Copy
{
/// Create a new MaybeUninit with uninitialized interior
pub unsafe fn uninitialized() -> Self {
Self { empty: () }
}
/// Cr... |
use array::Array;
#[derive(Copy, Clone)]
#[repr(C)] // for cast from self ptr to value
pub union MaybeUninitCopy<T>
where T: Copy
{
empty: (),
value: T,
}
impl<T> MaybeUninitCopy<T>
where T: Copy
{
/// Create a new MaybeUninit with uninitialized interior
pub unsafe fn uninitialized() -> Self ... | 1 | 0 | 1 | add_only | --- a/src/maybe_uninit_copy.rs
+++ b/src/maybe_uninit_copy.rs
@@ -4,2 +4,3 @@
#[derive(Copy, Clone)]
+#[repr(C)] // for cast from self ptr to value
pub union MaybeUninitCopy<T> | --- a/src/maybe_uninit_copy.rs
+++ b/src/maybe_uninit_copy.rs
@@ ... @@
#[derive(Copy, Clone)]
+#[repr(C)] // for cast from self ptr to value
pub union MaybeUninitCopy<T>
| --- a/src/maybe_uninit_copy.rs
+++ b/src/maybe_uninit_copy.rs
@@ -4,2 +4,3 @@
CON #[derive(Copy, Clone)]
ADD #[repr(C)] // for cast from self ptr to value
CON pub union MaybeUninitCopy<T>
| <<<<<<< SEARCH
#[derive(Copy, Clone)]
pub union MaybeUninitCopy<T>
where T: Copy
=======
#[derive(Copy, Clone)]
#[repr(C)] // for cast from self ptr to value
pub union MaybeUninitCopy<T>
where T: Copy
>>>>>>> REPLACE
|
CesiumGS/cesium | a43aec98b677ea480df5e9c4cde344e4a8146ee8 | Source/Core/getAbsoluteUri.js | javascript | apache-2.0 | Deal with document in node
| define([
'../ThirdParty/Uri',
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
Uri,
defaultValue,
defined,
DeveloperError) {
'use strict';
/**
* Given a relative Uri and a base Uri, returns the absolute Uri of the relative U... | /*globals process, require*/
define([
'../ThirdParty/Uri',
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
Uri,
defaultValue,
defined,
DeveloperError) {
'use strict';
/**
* Given a relative Uri and a base Uri, returns the a... | 9 | 3 | 2 | mixed | --- a/Source/Core/getAbsoluteUri.js
+++ b/Source/Core/getAbsoluteUri.js
@@ -1 +1,2 @@
+/*globals process, require*/
define([
@@ -24,5 +25,10 @@
*/
- function getAbsoluteUri(relative, base) {
- return getAbsoluteUri._implementation(relative, base, document);
- }
+ function getAbsoluteUri(relative... | --- a/Source/Core/getAbsoluteUri.js
+++ b/Source/Core/getAbsoluteUri.js
@@ ... @@
+/*globals process, require*/
define([
@@ ... @@
*/
- function getAbsoluteUri(relative, base) {
- return getAbsoluteUri._implementation(relative, base, document);
- }
+ function getAbsoluteUri(relative, base) {
+ ... | --- a/Source/Core/getAbsoluteUri.js
+++ b/Source/Core/getAbsoluteUri.js
@@ -1 +1,2 @@
ADD /*globals process, require*/
CON define([
@@ -24,5 +25,10 @@
CON */
DEL function getAbsoluteUri(relative, base) {
DEL return getAbsoluteUri._implementation(relative, base, document);
DEL }
ADD function ge... | <<<<<<< SEARCH
define([
'../ThirdParty/Uri',
=======
/*globals process, require*/
define([
'../ThirdParty/Uri',
>>>>>>> REPLACE
<<<<<<< SEARCH
* var absoluteUri = Cesium.getAbsoluteUri('awesome.png', 'https://test.com');
*/
function getAbsoluteUri(relative, base) {
return getAbs... |
nxnfufunezn/redox | 2db84f95994e329cd591b78db88d1ca2d51177f8 | filesystem/apps/example/main.rs | rust | mit | WIP: Implement tests for syscalls in example scheme
| use std::fs::File;
use std::io::{Read, Write};
use system::scheme::{Packet, Scheme};
extern crate system;
struct ExampleScheme;
impl Scheme for ExampleScheme {
}
fn main() {
//In order to handle example:, we create :example
let mut scheme = File::create(":example").unwrap();
loop {
let mut packet ... | use std::fs::File;
use std::io::{Read, Write};
use system::error::{Error, Result, ENOENT, EBADF};
use system::scheme::{Packet, Scheme};
extern crate system;
struct ExampleScheme;
impl Scheme for ExampleScheme {
fn open(&mut self, path: &str, flags: usize, mode: usize) -> Result {
println!("open {:X} = {... | 55 | 5 | 3 | mixed | --- a/filesystem/apps/example/main.rs
+++ b/filesystem/apps/example/main.rs
@@ -3,2 +3,3 @@
+use system::error::{Error, Result, ENOENT, EBADF};
use system::scheme::{Packet, Scheme};
@@ -10,3 +11,50 @@
impl Scheme for ExampleScheme {
+ fn open(&mut self, path: &str, flags: usize, mode: usize) -> Result {
+ ... | --- a/filesystem/apps/example/main.rs
+++ b/filesystem/apps/example/main.rs
@@ ... @@
+use system::error::{Error, Result, ENOENT, EBADF};
use system::scheme::{Packet, Scheme};
@@ ... @@
impl Scheme for ExampleScheme {
+ fn open(&mut self, path: &str, flags: usize, mode: usize) -> Result {
+ println!("open... | --- a/filesystem/apps/example/main.rs
+++ b/filesystem/apps/example/main.rs
@@ -3,2 +3,3 @@
CON
ADD use system::error::{Error, Result, ENOENT, EBADF};
CON use system::scheme::{Packet, Scheme};
@@ -10,3 +11,50 @@
CON impl Scheme for ExampleScheme {
ADD fn open(&mut self, path: &str, flags: usize, mode: usize) -> Re... | <<<<<<< SEARCH
use std::io::{Read, Write};
use system::scheme::{Packet, Scheme};
=======
use std::io::{Read, Write};
use system::error::{Error, Result, ENOENT, EBADF};
use system::scheme::{Packet, Scheme};
>>>>>>> REPLACE
<<<<<<< SEARCH
impl Scheme for ExampleScheme {
}
fn main() {
//In order to handle exa... |
GaretJax/sphinx-autobuild | 723d7410b48fd4fc42ed9afe470ba3b37381599a | noxfile.py | python | mit | Add docs-live to perform demo-runs
| """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | 6 | 0 | 1 | add_only | --- a/noxfile.py
+++ b/noxfile.py
@@ -41 +41,7 @@
session.run("sphinx-build", "-b", "html", "docs/", "build/docs")
+
+
+@nox.session(name="docs-live")
+def docs_live(session):
+ _install_this_editable(session, extras=["docs"])
+ session.run("sphinx-autobuild", "-b", "html", "docs/", "build/docs") | --- a/noxfile.py
+++ b/noxfile.py
@@ ... @@
session.run("sphinx-build", "-b", "html", "docs/", "build/docs")
+
+
+@nox.session(name="docs-live")
+def docs_live(session):
+ _install_this_editable(session, extras=["docs"])
+ session.run("sphinx-autobuild", "-b", "html", "docs/", "build/docs")
| --- a/noxfile.py
+++ b/noxfile.py
@@ -41 +41,7 @@
CON session.run("sphinx-build", "-b", "html", "docs/", "build/docs")
ADD
ADD
ADD @nox.session(name="docs-live")
ADD def docs_live(session):
ADD _install_this_editable(session, extras=["docs"])
ADD session.run("sphinx-autobuild", "-b", "html", "docs/", "bui... | <<<<<<< SEARCH
_install_this_editable(session, extras=["docs"])
session.run("sphinx-build", "-b", "html", "docs/", "build/docs")
=======
_install_this_editable(session, extras=["docs"])
session.run("sphinx-build", "-b", "html", "docs/", "build/docs")
@nox.session(name="docs-live")
def docs_live(sessi... |
facebook/flipper | 3829ac7d0302a1e7dcb354a15ce016fe7298157b | android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt | kotlin | mit | Enable Sections and Litho plugins
Summary: Per title
Reviewed By: jknoxville
Differential Revision: D15166432
fbshipit-source-id: ec2a53ef2af920e4c9f8a8742b2b8fbff01320fe
| /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE file
* in the root directory of this source tree.
*/
package com.facebook.flipper.sample.tutorial
import android.app.Application
import com.facebook.drawee.backends.pipeline.Fresco
im... | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE file
* in the root directory of this source tree.
*/
package com.facebook.flipper.sample.tutorial
import android.app.Application
import com.facebook.drawee.backends.pipeline.Fresco
im... | 8 | 0 | 2 | add_only | --- a/android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt
+++ b/android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt
@@ -16,2 +16,5 @@
import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors
+import com.facebook.litho.config.Compone... | --- a/android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt
+++ b/android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt
@@ ... @@
import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors
+import com.facebook.litho.config.ComponentsConfi... | --- a/android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt
+++ b/android/tutorial/src/main/java/com/facebook/flipper/sample/tutorial/TutorialApplication.kt
@@ -16,2 +16,5 @@
CON import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors
ADD import com.facebook.litho.config.C... | <<<<<<< SEARCH
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin
import com.facebook.flipper.plugins.litho.LithoFlipperDescriptors
import com.facebook.soloader.SoLoader
=======
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin
import com.facebook.flipper.plugins.litho.LithoFlippe... |
wikimedia/apps-android-wikipedia | 78624fea15357cfa45c420af0f5c1120da67effa | app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt | kotlin | apache-2.0 | Handle MW error message and change pageId from Long to Int
| package org.wikipedia.commons
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
import org.wikipedia.dataclient.Service
import org.wikipedia.dataclient.ServiceFactory
import org.wikipedia.dataclient.WikiSite
import java.util.*
object ImageTagsProvider {
fun getImageTagsObservable(pageId: Lo... | package org.wikipedia.commons
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
import org.wikipedia.dataclient.Service
import org.wikipedia.dataclient.ServiceFactory
import org.wikipedia.dataclient.WikiSite
import org.wikipedia.dataclient.wikidata.Claims
import org.wikipedia.dataclient.wikidata... | 6 | 2 | 3 | mixed | --- a/app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt
+++ b/app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt
@@ -7,2 +7,5 @@
import org.wikipedia.dataclient.WikiSite
+import org.wikipedia.dataclient.wikidata.Claims
+import org.wikipedia.dataclient.wikidata.Entities
+import org.wikipedia.util.l... | --- a/app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt
+++ b/app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt
@@ ... @@
import org.wikipedia.dataclient.WikiSite
+import org.wikipedia.dataclient.wikidata.Claims
+import org.wikipedia.dataclient.wikidata.Entities
+import org.wikipedia.util.log.L
... | --- a/app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt
+++ b/app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt
@@ -7,2 +7,5 @@
CON import org.wikipedia.dataclient.WikiSite
ADD import org.wikipedia.dataclient.wikidata.Claims
ADD import org.wikipedia.dataclient.wikidata.Entities
ADD import org.wiki... | <<<<<<< SEARCH
import org.wikipedia.dataclient.ServiceFactory
import org.wikipedia.dataclient.WikiSite
import java.util.*
object ImageTagsProvider {
fun getImageTagsObservable(pageId: Long, langCode: String): Observable<Map<String, List<String>>> {
return ServiceFactory.get(WikiSite(Service.COMMONS_URL)).g... |
apache/ddlutils | 53e1461ab8b11651cf76801c938063b7e0f801d3 | src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java | java | apache-2.0 | Add call identity to hsqldb.
git-svn-id: b9063b25153de5216c397e252c209c32bc9c47ff@330902 13f79535-47bb-0310-9956-ffa450edef68
| package org.apache.ddlutils.platform;
/*
* Copyright 1999-2005 The Apache Software Foundation.
*
* 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/license... | package org.apache.ddlutils.platform;
/*
* Copyright 1999-2005 The Apache Software Foundation.
*
* 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/license... | 10 | 0 | 1 | add_only | --- a/src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java
+++ b/src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java
@@ -52,2 +52,12 @@
}
+
+ /**
+ * @see org.apache.ddlutils.platform.SqlBuilder#getSelectLastInsertId(org.apache.ddlutils.model.Table)
+ */
+ public String getSelectLastInsertId... | --- a/src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java
+++ b/src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java
@@ ... @@
}
+
+ /**
+ * @see org.apache.ddlutils.platform.SqlBuilder#getSelectLastInsertId(org.apache.ddlutils.model.Table)
+ */
+ public String getSelectLastInsertId(Table ta... | --- a/src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java
+++ b/src/java/org/apache/ddlutils/platform/HsqlDbBuilder.java
@@ -52,2 +52,12 @@
CON }
ADD
ADD /**
ADD * @see org.apache.ddlutils.platform.SqlBuilder#getSelectLastInsertId(org.apache.ddlutils.model.Table)
ADD */
ADD public String get... | <<<<<<< SEARCH
printEndOfStatement();
}
}
=======
printEndOfStatement();
}
/**
* @see org.apache.ddlutils.platform.SqlBuilder#getSelectLastInsertId(org.apache.ddlutils.model.Table)
*/
public String getSelectLastInsertId(Table table)
{
return "CALL IDENTITY()";
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.