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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stdlib-js/www | 49a8a954c050c5e9efd7eae6830ddbc14d67248f | tools/scripts/ts_docs_path.js | javascript | apache-2.0 | Update path to include version
| /**
* @license Apache-2.0
*
* Copyright (c) 2019 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | /**
* @license Apache-2.0
*
* Copyright (c) 2019 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 2 | 1 | 2 | mixed | --- a/tools/scripts/ts_docs_path.js
+++ b/tools/scripts/ts_docs_path.js
@@ -24,2 +24,3 @@
var root = require( './root.js' );
+var version = require( './stdlib_version.js' );
@@ -35,3 +36,3 @@
function path() {
- return join( root(), 'public', 'docs', 'ts', 'modules' );
+ return join( root(), 'public', 'docs', 'ts',... | --- a/tools/scripts/ts_docs_path.js
+++ b/tools/scripts/ts_docs_path.js
@@ ... @@
var root = require( './root.js' );
+var version = require( './stdlib_version.js' );
@@ ... @@
function path() {
- return join( root(), 'public', 'docs', 'ts', 'modules' );
+ return join( root(), 'public', 'docs', 'ts', version(), 'mod... | --- a/tools/scripts/ts_docs_path.js
+++ b/tools/scripts/ts_docs_path.js
@@ -24,2 +24,3 @@
CON var root = require( './root.js' );
ADD var version = require( './stdlib_version.js' );
CON
@@ -35,3 +36,3 @@
CON function path() {
DEL return join( root(), 'public', 'docs', 'ts', 'modules' );
ADD return join( root(), 'publ... | <<<<<<< SEARCH
var join = require( 'path' ).join;
var root = require( './root.js' );
=======
var join = require( 'path' ).join;
var root = require( './root.js' );
var version = require( './stdlib_version.js' );
>>>>>>> REPLACE
<<<<<<< SEARCH
*/
function path() {
return join( root(), 'public', 'docs', 'ts', 'mod... |
maitaoriana/openacademy-project | e7f1c49216a7b609dbe8ea283cdf689cfa575f85 | openacademy/model/openacademy_course.py | python | apache-2.0 | [REF] openacademy: Modify copy method into inherit
| from openerp import models, fields, api
'''
This module create model of Course
'''
class Course(models.Model):
'''
This class create model of Course
'''
_name = 'openacademy.course' # Model odoo name
name = fields.Char(string='Title', required=True)
description = fields.Text(string='Descrip... | from openerp import api, models, fields, api
'''
This module create model of Course
'''
class Course(models.Model):
'''
This class create model of Course
'''
_name = 'openacademy.course' # Model odoo name
name = fields.Char(string='Title', required=True)
description = fields.Text(string='De... | 15 | 1 | 2 | mixed | --- a/openacademy/model/openacademy_course.py
+++ b/openacademy/model/openacademy_course.py
@@ -1,2 +1,2 @@
-from openerp import models, fields, api
+from openerp import api, models, fields, api
@@ -32 +32,15 @@
]
+
+ @api.multi
+ def copy(self, default=None):
+ default = dict(default or {})
+
+ ... | --- a/openacademy/model/openacademy_course.py
+++ b/openacademy/model/openacademy_course.py
@@ ... @@
-from openerp import models, fields, api
+from openerp import api, models, fields, api
@@ ... @@
]
+
+ @api.multi
+ def copy(self, default=None):
+ default = dict(default or {})
+
+ copied_co... | --- a/openacademy/model/openacademy_course.py
+++ b/openacademy/model/openacademy_course.py
@@ -1,2 +1,2 @@
DEL from openerp import models, fields, api
ADD from openerp import api, models, fields, api
CON
@@ -32 +32,15 @@
CON ]
ADD
ADD @api.multi
ADD def copy(self, default=None):
ADD default = dic... | <<<<<<< SEARCH
from openerp import models, fields, api
'''
=======
from openerp import api, models, fields, api
'''
>>>>>>> REPLACE
<<<<<<< SEARCH
"The course title must be unique"),
]
=======
"The course title must be unique"),
]
@api.multi
def copy(self, default=None):
... |
jenkinsci/startup-trigger-plugin-plugin | 876ce161aa78a16adb3e5409d8531c8cb396b001 | src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java | java | mit | Enable to specify a string for the trigger label as a substring of the node label.
For example a node label with "WinXP Acceptance London" and 'Restricted node Label = London'
| package org.jvnet.hudson.plugins.triggers.startup;
import hudson.model.Node;
import java.io.Serializable;
/**
* @author Gregory Boissinot
*/
public class HudsonStartupService implements Serializable {
public boolean has2Schedule(HudsonStartupTrigger startupTrigger, Node jobNode) {
if (startupTrigger ... | package org.jvnet.hudson.plugins.triggers.startup;
import hudson.model.Node;
import java.io.Serializable;
/**
* @author Gregory Boissinot
*/
public class HudsonStartupService implements Serializable {
public boolean has2Schedule(HudsonStartupTrigger startupTrigger, Node jobNode) {
if (startupTrigger ... | 10 | 1 | 1 | mixed | --- a/src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java
+++ b/src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java
@@ -41,3 +41,12 @@
- return triggerLabel.equalsIgnoreCase(jobNode.getLabelString()); //Match node label
+ String labelString = ... | --- a/src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java
+++ b/src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java
@@ ... @@
- return triggerLabel.equalsIgnoreCase(jobNode.getLabelString()); //Match node label
+ String labelString = jobNode.g... | --- a/src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java
+++ b/src/main/java/org/jvnet/hudson/plugins/triggers/startup/HudsonStartupService.java
@@ -41,3 +41,12 @@
CON
DEL return triggerLabel.equalsIgnoreCase(jobNode.getLabelString()); //Match node label
ADD String label... | <<<<<<< SEARCH
}
return triggerLabel.equalsIgnoreCase(jobNode.getLabelString()); //Match node label
}
=======
}
String labelString = jobNode.getLabelString();
if (labelString == null) {
return false;
}
if (triggerLabel.equalsIgnoreCase(labelS... |
blindpirate/gradle | 5314e08bc9ad0b09950643c097d06a659bb5c125 | subprojects/workers/build.gradle.kts | kotlin | apache-2.0 | Clarify description of workers project | plugins {
id("gradlebuild.distribution.api-java")
}
description = "Infrastructure for running worker processes"
dependencies {
implementation(project(":base-services"))
implementation(project(":messaging"))
implementation(project(":logging"))
implementation(project(":process-services"))
implem... | plugins {
id("gradlebuild.distribution.api-java")
}
description = "Infrastructure for starting and managing worker processes"
dependencies {
implementation(project(":base-services"))
implementation(project(":messaging"))
implementation(project(":logging"))
implementation(project(":process-services... | 1 | 1 | 1 | mixed | --- a/subprojects/workers/build.gradle.kts
+++ b/subprojects/workers/build.gradle.kts
@@ -4,3 +4,3 @@
-description = "Infrastructure for running worker processes"
+description = "Infrastructure for starting and managing worker processes"
| --- a/subprojects/workers/build.gradle.kts
+++ b/subprojects/workers/build.gradle.kts
@@ ... @@
-description = "Infrastructure for running worker processes"
+description = "Infrastructure for starting and managing worker processes"
| --- a/subprojects/workers/build.gradle.kts
+++ b/subprojects/workers/build.gradle.kts
@@ -4,3 +4,3 @@
CON
DEL description = "Infrastructure for running worker processes"
ADD description = "Infrastructure for starting and managing worker processes"
CON
| <<<<<<< SEARCH
}
description = "Infrastructure for running worker processes"
dependencies {
=======
}
description = "Infrastructure for starting and managing worker processes"
dependencies {
>>>>>>> REPLACE
|
bem-archive/bem-tools | d023e2bd5f88016866f34fd25738c65c822ae45d | lib/techs/v2/css-preprocessor.js | javascript | mit | Add comment about borschik usage
| 'use strict';
var BORSCHIK_CSS_TECH = require('borschik/lib/techs/css'),
Q = require('q');
exports.API_VER = 2;
exports.techMixin = {
getBuildResultChunk : function(relPath) {
return '@import url(' + relPath + ');\n';
},
getBuildSuffixesMap: function() {
return {
css: ['... | 'use strict';
var BORSCHIK_CSS_TECH = require('borschik/lib/techs/css'),
Q = require('q');
exports.API_VER = 2;
exports.techMixin = {
getBuildResultChunk : function(relPath) {
return '@import url(' + relPath + ');\n';
},
getBuildSuffixesMap: function() {
return {
css: ['... | 1 | 0 | 1 | add_only | --- a/lib/techs/v2/css-preprocessor.js
+++ b/lib/techs/v2/css-preprocessor.js
@@ -40,2 +40,3 @@
.then(function(res) {
+ // use borschik here to preserve correct link to the images
var tech = new BORSCHIK_CSS_TECH.Tech({ | --- a/lib/techs/v2/css-preprocessor.js
+++ b/lib/techs/v2/css-preprocessor.js
@@ ... @@
.then(function(res) {
+ // use borschik here to preserve correct link to the images
var tech = new BORSCHIK_CSS_TECH.Tech({
| --- a/lib/techs/v2/css-preprocessor.js
+++ b/lib/techs/v2/css-preprocessor.js
@@ -40,2 +40,3 @@
CON .then(function(res) {
ADD // use borschik here to preserve correct link to the images
CON var tech = new BORSCHIK_CSS_TECH.Tech({
| <<<<<<< SEARCH
return this.__base.apply(this, arguments)
.then(function(res) {
var tech = new BORSCHIK_CSS_TECH.Tech({
comments : true,
=======
return this.__base.apply(this, arguments)
.then(function(res) {
// use borschik... |
yunity/foodsaving-backend | a15d2956cfd48e0d46d5d4cf567af05641b4c8e6 | yunity/api/utils.py | python | agpl-3.0 | Implement JSON request validation decorator
with @NerdyProjects
| from django.http import JsonResponse
class ApiBase(object):
@classmethod
def success(cls, data, status=200):
"""
:type data: dict
:type status: int
:rtype JsonResponse
"""
return JsonResponse(data, status=status)
@classmethod
def error(cls, error, stat... | from functools import wraps
from json import loads as load_json
from django.http import JsonResponse
class ApiBase(object):
@classmethod
def validation_failure(cls, message, status=400):
"""
:type message: str
:type status: int
:rtype JsonResponse
"""
return J... | 35 | 0 | 3 | add_only | --- a/yunity/api/utils.py
+++ b/yunity/api/utils.py
@@ -1 +1,4 @@
+from functools import wraps
+from json import loads as load_json
+
from django.http import JsonResponse
@@ -4,2 +7,12 @@
class ApiBase(object):
+ @classmethod
+ def validation_failure(cls, message, status=400):
+ """
+ :type messag... | --- a/yunity/api/utils.py
+++ b/yunity/api/utils.py
@@ ... @@
+from functools import wraps
+from json import loads as load_json
+
from django.http import JsonResponse
@@ ... @@
class ApiBase(object):
+ @classmethod
+ def validation_failure(cls, message, status=400):
+ """
+ :type message: str
+ ... | --- a/yunity/api/utils.py
+++ b/yunity/api/utils.py
@@ -1 +1,4 @@
ADD from functools import wraps
ADD from json import loads as load_json
ADD
CON from django.http import JsonResponse
@@ -4,2 +7,12 @@
CON class ApiBase(object):
ADD @classmethod
ADD def validation_failure(cls, message, status=400):
ADD "... | <<<<<<< SEARCH
from django.http import JsonResponse
class ApiBase(object):
@classmethod
def success(cls, data, status=200):
=======
from functools import wraps
from json import loads as load_json
from django.http import JsonResponse
class ApiBase(object):
@classmethod
def validation_failure(cls, m... |
ZeroPage/i_have_no_apps | 10d170fa4b12345c2450bb3d83f92c2abc0eab3c | app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java | java | mit | Add Helper singleton class for querying/adding notification to db.
| package org.zeropage.apps.zeropage.database.notification;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import org.zeropage.apps.zeropage.notification.Notification;
import java.util.ArrayList;
import java.util.List... | package org.zeropage.apps.zeropage.database.notification;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import org.zeropage.apps.zeropage.notification.Notification;
import java.util.ArrayList;
import java.util.List... | 6 | 2 | 1 | mixed | --- a/app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java
+++ b/app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java
@@ -16,4 +16,8 @@
- public NotificationHistory getInstance(Context context) {
- sInstance = new Notifi
+ publ... | --- a/app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java
+++ b/app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java
@@ ... @@
- public NotificationHistory getInstance(Context context) {
- sInstance = new Notifi
+ public synch... | --- a/app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java
+++ b/app/src/main/java/org/zeropage/apps/zeropage/database/notification/NotificationHistory.java
@@ -16,4 +16,8 @@
CON
DEL public NotificationHistory getInstance(Context context) {
DEL sInstance = new Notifi
... | <<<<<<< SEARCH
private SQLiteDatabase mDatabase;
public NotificationHistory getInstance(Context context) {
sInstance = new Notifi
}
=======
private SQLiteDatabase mDatabase;
public synchronized static NotificationHistory getInstance(Context context) {
if (sInstance == null) {
... |
m039/beacon-keeper | 3617ea84c0920554ce4debdf0278e52b116df542 | library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java | java | apache-2.0 | Add hack to stop service
| /** EstimotoServiceUtil.java ---
*
* Copyright (C) 2014 Dmitry Mozgin
*
* Author: Dmitry Mozgin <m0391n@gmail.com>
*
*
*/
package com.m039.estimoto.util;
import android.content.Context;
import android.content.Intent;
import com.m039.estimoto.service.EstimotoService;
/**
*
*
* Created: 03/22/14
*
* @auth... | /** EstimotoServiceUtil.java ---
*
* Copyright (C) 2014 Dmitry Mozgin
*
* Author: Dmitry Mozgin <m0391n@gmail.com>
*
*
*/
package com.m039.estimoto.util;
import android.content.Context;
import android.content.Intent;
import com.m039.estimoto.service.EstimotoService;
/**
*
*
* Created: 03/22/14
*
* @auth... | 1 | 0 | 1 | add_only | --- a/library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java
+++ b/library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java
@@ -37,2 +37,3 @@
ctx.startService(intent);
+ ctx.stopService(intent); // hack
} | --- a/library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java
+++ b/library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java
@@ ... @@
ctx.startService(intent);
+ ctx.stopService(intent); // hack
}
| --- a/library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java
+++ b/library/src/main/java/com/m039/estimoto/util/EstimotoServiceUtil.java
@@ -37,2 +37,3 @@
CON ctx.startService(intent);
ADD ctx.stopService(intent); // hack
CON }
| <<<<<<< SEARCH
intent.putExtra(EstimotoService.EXTRA_TURN_OFF, true);
ctx.startService(intent);
}
=======
intent.putExtra(EstimotoService.EXTRA_TURN_OFF, true);
ctx.startService(intent);
ctx.stopService(intent); // hack
}
>>>>>>> REPLACE
|
AcornUI/Acorn | a5684668d9bba46bb442aaaa06594c4f8267e0f1 | tools/acornui-texture-packer/build.gradle.kts | kotlin | apache-2.0 | Add lwjgl backend dependency for texture-packer
| plugins {
kotlin("multiplatform")
`maven-publish`
}
val KOTLIN_LANGUAGE_VERSION: String by extra
val KOTLIN_JVM_TARGET: String by extra
kotlin {
js {
compilations.named("test") {
runtimeDependencyFiles
}
compilations.all {
kotlinOptions {
modu... | plugins {
kotlin("multiplatform")
`maven-publish`
}
val KOTLIN_LANGUAGE_VERSION: String by extra
val KOTLIN_JVM_TARGET: String by extra
kotlin {
js {
compilations.named("test") {
runtimeDependencyFiles
}
compilations.all {
kotlinOptions {
modu... | 1 | 0 | 1 | add_only | --- a/tools/acornui-texture-packer/build.gradle.kts
+++ b/tools/acornui-texture-packer/build.gradle.kts
@@ -44,2 +44,3 @@
implementation(project(":acornui-utils"))
+ implementation(project(":backends:acornui-lwjgl-backend"))
} | --- a/tools/acornui-texture-packer/build.gradle.kts
+++ b/tools/acornui-texture-packer/build.gradle.kts
@@ ... @@
implementation(project(":acornui-utils"))
+ implementation(project(":backends:acornui-lwjgl-backend"))
}
| --- a/tools/acornui-texture-packer/build.gradle.kts
+++ b/tools/acornui-texture-packer/build.gradle.kts
@@ -44,2 +44,3 @@
CON implementation(project(":acornui-utils"))
ADD implementation(project(":backends:acornui-lwjgl-backend"))
CON }
| <<<<<<< SEARCH
implementation(project(":acornui-core"))
implementation(project(":acornui-utils"))
}
}
=======
implementation(project(":acornui-core"))
implementation(project(":acornui-utils"))
implementation(project(":b... |
bjwbell/servo | ab0d62002516562829151ec207c1c5bb9a7d6d6d | src/components/main/css/select.rs | rust | mpl-2.0 | Remove the 'border-width: 0' hack.
This was to work-around a netsurfcss quirk.
| /* 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/. */
use extra::url::Url;
use style::Stylesheet;
use style::Stylist;
use style::selector_matching::UserAgentOrigin;
pu... | /* 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/. */
use style::Stylesheet;
use style::Stylist;
use style::selector_matching::UserAgentOrigin;
pub fn new_stylist() ->... | 2 | 30 | 2 | mixed | --- a/src/components/main/css/select.rs
+++ b/src/components/main/css/select.rs
@@ -4,3 +4,2 @@
-use extra::url::Url;
use style::Stylesheet;
@@ -11,32 +10,5 @@
let mut stylist = Stylist::new();
- stylist.add_stylesheet(html4_default_style(), UserAgentOrigin);
- stylist.add_stylesheet(servo_default_style()... | --- a/src/components/main/css/select.rs
+++ b/src/components/main/css/select.rs
@@ ... @@
-use extra::url::Url;
use style::Stylesheet;
@@ ... @@
let mut stylist = Stylist::new();
- stylist.add_stylesheet(html4_default_style(), UserAgentOrigin);
- stylist.add_stylesheet(servo_default_style(), UserAgentOrig... | --- a/src/components/main/css/select.rs
+++ b/src/components/main/css/select.rs
@@ -4,3 +4,2 @@
CON
DEL use extra::url::Url;
CON use style::Stylesheet;
@@ -11,32 +10,5 @@
CON let mut stylist = Stylist::new();
DEL stylist.add_stylesheet(html4_default_style(), UserAgentOrigin);
DEL stylist.add_stylesheet(ser... | <<<<<<< SEARCH
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use extra::url::Url;
use style::Stylesheet;
use style::Stylist;
=======
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use style::Stylesheet;
use style::Stylist;
>>>>>>> REPLACE
<<<<<<< SEARCH
pub fn new_stylist() -> Styl... |
vase4kin/TeamCityApp | 2a81e9b207fa83fa57228e930e0e618b698e97b9 | app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java | java | apache-2.0 | Increase build types cache life for one day
| /*
* Copyright 2016 Andrey Tolpeev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | /*
* Copyright 2016 Andrey Tolpeev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | 1 | 2 | 1 | mixed | --- a/app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java
+++ b/app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java
@@ -33,4 +33,3 @@
- // TODO: Increase cache to 24 hours? Good idea, huh?
- @LifeCache(duration = 1, timeUnit = TimeUnit.HOURS)
+ @LifeCac... | --- a/app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java
+++ b/app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java
@@ ... @@
- // TODO: Increase cache to 24 hours? Good idea, huh?
- @LifeCache(duration = 1, timeUnit = TimeUnit.HOURS)
+ @LifeCache(durat... | --- a/app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java
+++ b/app/src/main/java/com/github/vase4kin/teamcityapp/api/cache/CacheProviders.java
@@ -33,4 +33,3 @@
CON
DEL // TODO: Increase cache to 24 hours? Good idea, huh?
DEL @LifeCache(duration = 1, timeUnit = TimeUnit.HOURS)
ADD ... | <<<<<<< SEARCH
public interface CacheProviders {
// TODO: Increase cache to 24 hours? Good idea, huh?
@LifeCache(duration = 1, timeUnit = TimeUnit.HOURS)
Observable<NavigationNode> listBuildTypes(Observable<NavigationNode> navigationNodeObservable, DynamicKey dynamicKey, EvictDynamicKey evictDynamicKey);
... |
knaik94/RewritingCore | af8407ce2744682301e275d6f0e7bb18a2fdd0d0 | FizzBuzzTester.java | java | mit | Fix error off by one error related to constructor with stopPoint, added output
| public class FizzBuzzTester{
public static void main(String[] args){
FizzBuzzer firstFizz = new FizzBuzzer(20);
System.out.println(firstFizz);
}
}
class FizzBuzzer{
public int fizz;
public int buzz;
public int stopPoint;
public FizzBuzzer(){
fizz = 3;
buzz = 5;
stopPoint = 30;
};
public FizzBuzze... | public class FizzBuzzTester{
public static void main(String[] args){
FizzBuzzer firstFizz = new FizzBuzzer(20);
System.out.println(firstFizz);
//output: 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz 16 17 fizz 19 buzz
}
}
class FizzBuzzer{
public int fizz;
public int buzz;
public int stopPoint;... | 3 | 2 | 2 | mixed | --- a/FizzBuzzTester.java
+++ b/FizzBuzzTester.java
@@ -3,3 +3,4 @@
FizzBuzzer firstFizz = new FizzBuzzer(20);
- System.out.println(firstFizz);
+ System.out.println(firstFizz);
+ //output: 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz 16 17 fizz 19 buzz
}
@@ -20,3 +21,3 @@
this();
- stopPoint =... | --- a/FizzBuzzTester.java
+++ b/FizzBuzzTester.java
@@ ... @@
FizzBuzzer firstFizz = new FizzBuzzer(20);
- System.out.println(firstFizz);
+ System.out.println(firstFizz);
+ //output: 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz 16 17 fizz 19 buzz
}
@@ ... @@
this();
- stopPoint = stop;
+ stop... | --- a/FizzBuzzTester.java
+++ b/FizzBuzzTester.java
@@ -3,3 +3,4 @@
CON FizzBuzzer firstFizz = new FizzBuzzer(20);
DEL System.out.println(firstFizz);
ADD System.out.println(firstFizz);
ADD //output: 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz 16 17 fizz 19 buzz
CON }
@@ -20,3 +21,3 @@
CON this... | <<<<<<< SEARCH
public static void main(String[] args){
FizzBuzzer firstFizz = new FizzBuzzer(20);
System.out.println(firstFizz);
}
}
=======
public static void main(String[] args){
FizzBuzzer firstFizz = new FizzBuzzer(20);
System.out.println(firstFizz);
//output: 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fi... |
Deisss/python-sockjsroom | fe5ddba257885aa166bd71696a6eeefad153e66a | setup.py | python | mit | Switch to OSI license for Pypi
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sockjsroom
# Setup library
setup(
# Pypi name
name = "sockjsroom",
# Release version
version = sockjsroom.__version__,
# Associated package
packages = find_packages(),
# Author
author... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sockjsroom
# Setup library
setup(
# Pypi name
name = "sockjsroom",
# Release version
version = sockjsroom.__version__,
# Associated package
packages = find_packages(),
# Author
author... | 1 | 1 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -36,3 +36,3 @@
"Development Status :: 1 - Planning",
- "License :: MIT Licence",
+ "License :: OSI Approved :: MIT License",
"Natural Language :: English", | --- a/setup.py
+++ b/setup.py
@@ ... @@
"Development Status :: 1 - Planning",
- "License :: MIT Licence",
+ "License :: OSI Approved :: MIT License",
"Natural Language :: English",
| --- a/setup.py
+++ b/setup.py
@@ -36,3 +36,3 @@
CON "Development Status :: 1 - Planning",
DEL "License :: MIT Licence",
ADD "License :: OSI Approved :: MIT License",
CON "Natural Language :: English",
| <<<<<<< SEARCH
"Programming Language :: Python",
"Development Status :: 1 - Planning",
"License :: MIT Licence",
"Natural Language :: English",
"Operating System :: OS Independent",
=======
"Programming Language :: Python",
"Development Status :: 1 - Planning",
... |
geekygirlsarah/adventofcode2016 | 5c620a504327696b9cfe3ffc423ae7ae6e915e78 | dec02/dec02part1.py | python | mit | Add 12/2 part 1 solution
| # Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
| # Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = 0
with open(inputFile) as f:
while True:
line = f.readline(-1)
if not line:
# print "End of file"
break
# print (... | 46 | 0 | 1 | add_only | --- a/dec02/dec02part1.py
+++ b/dec02/dec02part1.py
@@ -4 +4,47 @@
+inputFile = "input.txt"
+
+# Tracking vars
+finalCode = ""
+lastNumber = 5 # start here
+tempNumber = 0
+
+with open(inputFile) as f:
+ while True:
+ line = f.readline(-1)
+ if not line:
+ # print "End of file"
+ ... | --- a/dec02/dec02part1.py
+++ b/dec02/dec02part1.py
@@ ... @@
+inputFile = "input.txt"
+
+# Tracking vars
+finalCode = ""
+lastNumber = 5 # start here
+tempNumber = 0
+
+with open(inputFile) as f:
+ while True:
+ line = f.readline(-1)
+ if not line:
+ # print "End of file"
+ ... | --- a/dec02/dec02part1.py
+++ b/dec02/dec02part1.py
@@ -4 +4,47 @@
CON
ADD inputFile = "input.txt"
ADD
ADD # Tracking vars
ADD finalCode = ""
ADD lastNumber = 5 # start here
ADD tempNumber = 0
ADD
ADD with open(inputFile) as f:
ADD while True:
ADD line = f.readline(-1)
ADD if not line:
ADD ... | <<<<<<< SEARCH
# @geekygirlsarah
=======
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = 0
with open(inputFile) as f:
while True:
line = f.readline(-1)
if not line:
# print "End of file"
break
... |
cketti/MateLightAndroid | c86c1f98e39139970f83ebd9f97ef49e3452ad99 | matelight/src/main/java/de/cketti/matelight/MateLight.java | java | apache-2.0 | Change host name to ml.jaseg.net
| package de.cketti.matelight;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
public class MateLight {
private static final String HOST = "matelight.cbrp3... | package de.cketti.matelight;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
public class MateLight {
private static final String HOST = "ml.jaseg.net";
... | 1 | 1 | 1 | mixed | --- a/matelight/src/main/java/de/cketti/matelight/MateLight.java
+++ b/matelight/src/main/java/de/cketti/matelight/MateLight.java
@@ -11,3 +11,3 @@
public class MateLight {
- private static final String HOST = "matelight.cbrp3.c-base.org";
+ private static final String HOST = "ml.jaseg.net";
private static ... | --- a/matelight/src/main/java/de/cketti/matelight/MateLight.java
+++ b/matelight/src/main/java/de/cketti/matelight/MateLight.java
@@ ... @@
public class MateLight {
- private static final String HOST = "matelight.cbrp3.c-base.org";
+ private static final String HOST = "ml.jaseg.net";
private static final in... | --- a/matelight/src/main/java/de/cketti/matelight/MateLight.java
+++ b/matelight/src/main/java/de/cketti/matelight/MateLight.java
@@ -11,3 +11,3 @@
CON public class MateLight {
DEL private static final String HOST = "matelight.cbrp3.c-base.org";
ADD private static final String HOST = "ml.jaseg.net";
CON pri... | <<<<<<< SEARCH
public class MateLight {
private static final String HOST = "matelight.cbrp3.c-base.org";
private static final int PORT = 1337;
private static final String SUCCESS = "KTHXBYE!";
=======
public class MateLight {
private static final String HOST = "ml.jaseg.net";
private static final... |
Omenia/robotframework-whitelibrary | 00e4663940ed1d22e768b3de3d1c645c8649aecc | src/WhiteLibrary/keywords/items/textbox.py | python | apache-2.0 | Change to better argument name
| from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes text to a textbox... | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input_value):
"""
Writes text to a t... | 3 | 3 | 2 | mixed | --- a/src/WhiteLibrary/keywords/items/textbox.py
+++ b/src/WhiteLibrary/keywords/items/textbox.py
@@ -7,3 +7,3 @@
@keyword
- def input_text_to_textbox(self, locator, input):
+ def input_text_to_textbox(self, locator, input_value):
"""
@@ -13,6 +13,6 @@
- ``input`` is the text to write.
+ ... | --- a/src/WhiteLibrary/keywords/items/textbox.py
+++ b/src/WhiteLibrary/keywords/items/textbox.py
@@ ... @@
@keyword
- def input_text_to_textbox(self, locator, input):
+ def input_text_to_textbox(self, locator, input_value):
"""
@@ ... @@
- ``input`` is the text to write.
+ ``input_v... | --- a/src/WhiteLibrary/keywords/items/textbox.py
+++ b/src/WhiteLibrary/keywords/items/textbox.py
@@ -7,3 +7,3 @@
CON @keyword
DEL def input_text_to_textbox(self, locator, input):
ADD def input_text_to_textbox(self, locator, input_value):
CON """
@@ -13,6 +13,6 @@
CON
DEL ``input`` is the t... | <<<<<<< SEARCH
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input):
"""
Writes text to a textbox.
``locator`` is the locator of the text box.
``input`` is the text to write.
"""
textBox = self.state._get_typed_item_b... |
facundovictor/non-blocking-socket-samples | 9a698d1428fbe0744c9dba3532b778569dbe1dd4 | server.py | python | mit | Add docstrings and author reference
| import socket
import sys
class SimpleServer(object):
"""Simple server using the socket library"""
def __init__(self, blocking=False, connection_oriented=True):
"""
The constructor initializes socket specifying the blocking status and
if it must be a connection oriented socket.
... | """
A Simple Server class that allows to configure a socket in a very simple way.
It is for studying purposes only.
"""
import socket
import sys
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "facundovt@gmail.com"
class SimpleServer(object):
"""Simple server using the socket library"""
def ... | 13 | 1 | 2 | mixed | --- a/server.py
+++ b/server.py
@@ -1,3 +1,13 @@
+"""
+A Simple Server class that allows to configure a socket in a very simple way.
+It is for studying purposes only.
+"""
+
import socket
import sys
+
+
+__author__ = "Facundo Victor"
+__license__ = "MIT"
+__email__ = "facundovt@gmail.com"
@@ -33,2 +43,4 @@
... | --- a/server.py
+++ b/server.py
@@ ... @@
+"""
+A Simple Server class that allows to configure a socket in a very simple way.
+It is for studying purposes only.
+"""
+
import socket
import sys
+
+
+__author__ = "Facundo Victor"
+__license__ = "MIT"
+__email__ = "facundovt@gmail.com"
@@ ... @@
"""
- ... | --- a/server.py
+++ b/server.py
@@ -1,3 +1,13 @@
ADD """
ADD A Simple Server class that allows to configure a socket in a very simple way.
ADD It is for studying purposes only.
ADD """
ADD
CON import socket
CON import sys
ADD
ADD
ADD __author__ = "Facundo Victor"
ADD __license__ = "MIT"
ADD __email__ = "facundovt@gm... | <<<<<<< SEARCH
import socket
import sys
=======
"""
A Simple Server class that allows to configure a socket in a very simple way.
It is for studying purposes only.
"""
import socket
import sys
__author__ = "Facundo Victor"
__license__ = "MIT"
__email__ = "facundovt@gmail.com"
>>>>>>> REPLACE
<<<<<<< SEARCH
... |
nolimits4web/Swiper | b26650e10cef116b87f6ee37f2797d39a4292387 | src/components/core/update/updateSize.js | javascript | mit | Fix NaN sizes in SSR
| import { extend } from '../../../utils/utils';
export default function updateSize() {
const swiper = this;
let width;
let height;
const $el = swiper.$el;
if (typeof swiper.params.width !== 'undefined') {
width = swiper.params.width;
} else {
width = $el[0].clientWidth;
}
if (typeof swiper.param... | import { extend } from '../../../utils/utils';
export default function updateSize() {
const swiper = this;
let width;
let height;
const $el = swiper.$el;
if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {
width = swiper.params.width;
} else {
width = $el[0].clientWidt... | 5 | 2 | 3 | mixed | --- a/src/components/core/update/updateSize.js
+++ b/src/components/core/update/updateSize.js
@@ -7,3 +7,3 @@
const $el = swiper.$el;
- if (typeof swiper.params.width !== 'undefined') {
+ if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {
width = swiper.params.width;
@@ -12,3 +1... | --- a/src/components/core/update/updateSize.js
+++ b/src/components/core/update/updateSize.js
@@ ... @@
const $el = swiper.$el;
- if (typeof swiper.params.width !== 'undefined') {
+ if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {
width = swiper.params.width;
@@ ... @@
}
- ... | --- a/src/components/core/update/updateSize.js
+++ b/src/components/core/update/updateSize.js
@@ -7,3 +7,3 @@
CON const $el = swiper.$el;
DEL if (typeof swiper.params.width !== 'undefined') {
ADD if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {
CON width = swiper.params.width;... | <<<<<<< SEARCH
let height;
const $el = swiper.$el;
if (typeof swiper.params.width !== 'undefined') {
width = swiper.params.width;
} else {
width = $el[0].clientWidth;
}
if (typeof swiper.params.height !== 'undefined') {
height = swiper.params.height;
} else {
=======
let height;
const $el... |
dtolnay/syn | c144538e0541f49f4378662cc56ece161126dec3 | tests/test_expr.rs | rust | apache-2.0 | Add snapshot test for group with trailer expr
| #[macro_use]
mod macros;
use std::str::FromStr;
use proc_macro2::{Delimiter, Group, TokenStream, TokenTree};
use quote::quote;
use std::iter::FromIterator;
use syn::{Expr, ExprRange};
#[test]
fn test_expr_parse() {
let code = "..100u32";
let tt = TokenStream::from_str(code).unwrap();
let expr: Expr = syn... | #[macro_use]
mod macros;
use std::str::FromStr;
use proc_macro2::{Delimiter, Group, TokenStream, TokenTree};
use quote::quote;
use std::iter::FromIterator;
use syn::{Expr, ExprRange};
#[test]
fn test_expr_parse() {
let code = "..100u32";
let tt = TokenStream::from_str(code).unwrap();
let expr: Expr = syn... | 16 | 1 | 1 | mixed | --- a/tests/test_expr.rs
+++ b/tests/test_expr.rs
@@ -48,3 +48,18 @@
- syn::parse2::<Expr>(tokens).unwrap();
+ snapshot!(tokens as Expr, @r###"
+ Expr::Call {
+ func: Expr::Group {
+ expr: Expr::Path {
+ path: Path {
+ segments: [
+ P... | --- a/tests/test_expr.rs
+++ b/tests/test_expr.rs
@@ ... @@
- syn::parse2::<Expr>(tokens).unwrap();
+ snapshot!(tokens as Expr, @r###"
+ Expr::Call {
+ func: Expr::Group {
+ expr: Expr::Path {
+ path: Path {
+ segments: [
+ PathSegmen... | --- a/tests/test_expr.rs
+++ b/tests/test_expr.rs
@@ -48,3 +48,18 @@
CON
DEL syn::parse2::<Expr>(tokens).unwrap();
ADD snapshot!(tokens as Expr, @r###"
ADD Expr::Call {
ADD func: Expr::Group {
ADD expr: Expr::Path {
ADD path: Path {
ADD segments: [
AD... | <<<<<<< SEARCH
]);
syn::parse2::<Expr>(tokens).unwrap();
}
=======
]);
snapshot!(tokens as Expr, @r###"
Expr::Call {
func: Expr::Group {
expr: Expr::Path {
path: Path {
segments: [
PathSegment {
... |
sgrif/diesel | 0e12f13e7cc5dc56fa30a55bc5380ee5f025b61d | src/result.rs | rust | apache-2.0 | Implement `Error` for our errors
What a concept! (Specifically looking at the usage crates.io would need
made it clear I had forgotten to do this)
| use std::result;
use std::convert::From;
use std::ffi::NulError;
#[derive(Debug, PartialEq)]
pub enum Error {
InvalidCString(NulError),
DatabaseError(String),
}
#[derive(Debug)]
pub enum ConnectionError {
InvalidCString(NulError),
BadConnection(String),
}
pub type Result<T> = result::Result<T, Error>... | use std::result;
use std::convert::From;
use std::error::Error as StdError;
use std::fmt::{self, Display, Write};
use std::ffi::NulError;
#[derive(Debug, PartialEq)]
pub enum Error {
InvalidCString(NulError),
DatabaseError(String),
}
#[derive(Debug)]
pub enum ConnectionError {
InvalidCString(NulError),
... | 38 | 0 | 2 | add_only | --- a/src/result.rs
+++ b/src/result.rs
@@ -2,2 +2,4 @@
use std::convert::From;
+use std::error::Error as StdError;
+use std::fmt::{self, Display, Write};
use std::ffi::NulError;
@@ -30 +32,37 @@
}
+
+impl Display for Error {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ ... | --- a/src/result.rs
+++ b/src/result.rs
@@ ... @@
use std::convert::From;
+use std::error::Error as StdError;
+use std::fmt::{self, Display, Write};
use std::ffi::NulError;
@@ ... @@
}
+
+impl Display for Error {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ &Error::I... | --- a/src/result.rs
+++ b/src/result.rs
@@ -2,2 +2,4 @@
CON use std::convert::From;
ADD use std::error::Error as StdError;
ADD use std::fmt::{self, Display, Write};
CON use std::ffi::NulError;
@@ -30 +32,37 @@
CON }
ADD
ADD impl Display for Error {
ADD fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
ADD ... | <<<<<<< SEARCH
use std::result;
use std::convert::From;
use std::ffi::NulError;
=======
use std::result;
use std::convert::From;
use std::error::Error as StdError;
use std::fmt::{self, Display, Write};
use std::ffi::NulError;
>>>>>>> REPLACE
<<<<<<< SEARCH
}
}
=======
}
}
impl Display for Error {
fn ... |
KevinFrans3/piston | 43b133f292b9500df1962fb649ea24fdef4e02ad | src/asset_store.rs | rust | mit | Make `AssetStore` return Err when empty
Closes https://github.com/PistonDevelopers/piston/issues/432
|
//! Storing sounds, textures, animations etc.
// Extern crates.
use std::os::self_exe_path;
/// A place to store sounds, textures, animations etc.
///
/// The idea is to have one object which the app can use
/// to load assets for the game with a simple interface.
pub struct AssetStore {
// The folder to load as... |
//! Storing sounds, textures, animations etc.
// Extern crates.
use std::os::self_exe_path;
/// A place to store sounds, textures, animations etc.
///
/// The idea is to have one object which the app can use
/// to load assets for the game with a simple interface.
pub struct AssetStore {
// The folder to load as... | 9 | 2 | 2 | mixed | --- a/src/asset_store.rs
+++ b/src/asset_store.rs
@@ -32,3 +32,8 @@
pub fn path(&self, file: &str) -> Result<Path, String> {
- let folder = self.assets_folder.as_ref().unwrap();
+ let folder = match self.assets_folder.as_ref() {
+ Some(folder) => folder,
+ None => return Err(
+ ... | --- a/src/asset_store.rs
+++ b/src/asset_store.rs
@@ ... @@
pub fn path(&self, file: &str) -> Result<Path, String> {
- let folder = self.assets_folder.as_ref().unwrap();
+ let folder = match self.assets_folder.as_ref() {
+ Some(folder) => folder,
+ None => return Err(
+ ... | --- a/src/asset_store.rs
+++ b/src/asset_store.rs
@@ -32,3 +32,8 @@
CON pub fn path(&self, file: &str) -> Result<Path, String> {
DEL let folder = self.assets_folder.as_ref().unwrap();
ADD let folder = match self.assets_folder.as_ref() {
ADD Some(folder) => folder,
ADD None =>... | <<<<<<< SEARCH
/// Returns the path of an asset file.
pub fn path(&self, file: &str) -> Result<Path, String> {
let folder = self.assets_folder.as_ref().unwrap();
let exe_path = self_exe_path();
let exe_path = match exe_path {
Some(path) => path,
None => return Err... |
agrav/freesif | c464887817334cd1dbc3c4587f185ec7ea598fda | setup.py | python | mit | Enable versioning using Git tags, rendering of README in markdown syntax and limit depenencies by version.
| # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open # To use a consistent encoding
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.txt'), encoding='utf-8') as f:
long_descri... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):... | 25 | 17 | 2 | mixed | --- a/setup.py
+++ b/setup.py
@@ -2,17 +2,32 @@
from setuptools import setup, find_packages
-from codecs import open # To use a consistent encoding
-from os import path
+import os
-here = path.abspath(path.dirname(__file__))
-# Get the long description from the relevant file
-with open(path.join(here, 'README.txt... | --- a/setup.py
+++ b/setup.py
@@ ... @@
from setuptools import setup, find_packages
-from codecs import open # To use a consistent encoding
-from os import path
+import os
-here = path.abspath(path.dirname(__file__))
-# Get the long description from the relevant file
-with open(path.join(here, 'README.txt'), enco... | --- a/setup.py
+++ b/setup.py
@@ -2,17 +2,32 @@
CON from setuptools import setup, find_packages
DEL from codecs import open # To use a consistent encoding
DEL from os import path
ADD import os
CON
DEL here = path.abspath(path.dirname(__file__))
CON
DEL # Get the long description from the relevant file
DEL with open(... | <<<<<<< SEARCH
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open # To use a consistent encoding
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.txt'), encoding='utf-8') as f:
... |
openstack/nova | 98c2c311ad1a0797205da58ce4d3b7d9b4c66c57 | nova/policies/pause_server.py | python | apache-2.0 | Introduce scope_types in pause server policy
oslo.policy introduced the scope_type feature which can
control the access level at system-level and project-level.
- https://docs.openstack.org/oslo.policy/latest/user/usage.html#setting-scope
- http://specs.openstack.org/openstack/keystone-specs/specs/keystone/queens/sy... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 12 | 10 | 3 | mixed | --- a/nova/policies/pause_server.py
+++ b/nova/policies/pause_server.py
@@ -25,6 +25,6 @@
policy.DocumentedRuleDefault(
- POLICY_ROOT % 'pause',
- base.RULE_ADMIN_OR_OWNER,
- "Pause a server",
- [
+ name=POLICY_ROOT % 'pause',
+ check_str=base.RULE_ADMIN_OR_OWNER,
+ ... | --- a/nova/policies/pause_server.py
+++ b/nova/policies/pause_server.py
@@ ... @@
policy.DocumentedRuleDefault(
- POLICY_ROOT % 'pause',
- base.RULE_ADMIN_OR_OWNER,
- "Pause a server",
- [
+ name=POLICY_ROOT % 'pause',
+ check_str=base.RULE_ADMIN_OR_OWNER,
+ descrip... | --- a/nova/policies/pause_server.py
+++ b/nova/policies/pause_server.py
@@ -25,6 +25,6 @@
CON policy.DocumentedRuleDefault(
DEL POLICY_ROOT % 'pause',
DEL base.RULE_ADMIN_OR_OWNER,
DEL "Pause a server",
DEL [
ADD name=POLICY_ROOT % 'pause',
ADD check_str=base.RULE_ADM... | <<<<<<< SEARCH
pause_server_policies = [
policy.DocumentedRuleDefault(
POLICY_ROOT % 'pause',
base.RULE_ADMIN_OR_OWNER,
"Pause a server",
[
{
'path': '/servers/{server_id}/action (pause)',
'method': 'POST'
}
]
),
... |
nham/gymnosporangium | 7f388d551a37a12e329dadf3f692905f6038f0e3 | src/traversal.rs | rust | mit | Change bfs to not traverse all the connected components.
| use {HashSet};
use std::collections::{HashMap, RingBuf, Deque};
use graph::{Graph, NodeIndex, Digraph};
/// Do a breadth-first search of the graph, returning the resulting breadth-
/// first forest.
fn bfs_forest<T, G: Graph<T>>(g: &G, start: NodeIndex) -> Digraph<NodeIndex> {
let mut forest = Digraph::new();
... | use {HashSet};
use std::collections::{HashMap, RingBuf, Deque};
use graph::{Graph, NodeIndex, Digraph};
/// Do a breadth-first search of the graph, returning the resulting breadth-
/// first tree (a tree on the connected component containing the stard node)
fn bfs_tree<T, G: Graph<T>>(g: &G, start: NodeIndex) -> Digra... | 8 | 22 | 3 | mixed | --- a/src/traversal.rs
+++ b/src/traversal.rs
@@ -5,17 +5,12 @@
/// Do a breadth-first search of the graph, returning the resulting breadth-
-/// first forest.
-fn bfs_forest<T, G: Graph<T>>(g: &G, start: NodeIndex) -> Digraph<NodeIndex> {
- let mut forest = Digraph::new();
+/// first tree (a tree on the connected ... | --- a/src/traversal.rs
+++ b/src/traversal.rs
@@ ... @@
/// Do a breadth-first search of the graph, returning the resulting breadth-
-/// first forest.
-fn bfs_forest<T, G: Graph<T>>(g: &G, start: NodeIndex) -> Digraph<NodeIndex> {
- let mut forest = Digraph::new();
+/// first tree (a tree on the connected componen... | --- a/src/traversal.rs
+++ b/src/traversal.rs
@@ -5,17 +5,12 @@
CON /// Do a breadth-first search of the graph, returning the resulting breadth-
DEL /// first forest.
DEL fn bfs_forest<T, G: Graph<T>>(g: &G, start: NodeIndex) -> Digraph<NodeIndex> {
DEL let mut forest = Digraph::new();
ADD /// first tree (a tree on... | <<<<<<< SEARCH
/// Do a breadth-first search of the graph, returning the resulting breadth-
/// first forest.
fn bfs_forest<T, G: Graph<T>>(g: &G, start: NodeIndex) -> Digraph<NodeIndex> {
let mut forest = Digraph::new();
if g.num_nodes() == 0 {
return forest;
}
let mut unvisited = HashSet::n... |
Freeyourgadget/Gadgetbridge | 89bf63d54085e4fe86a861079b0f33b0c7b4d86d | app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java | java | agpl-3.0 | Implement hashCode() when you implement equals()!
| package nodomain.freeyourgadget.gadgetbridge.model;
/**
* Created by steffen on 07.06.16.
*/
public class MusicStateSpec {
public static final int STATE_PLAYING = 0;
public static final int STATE_PAUSED = 1;
public static final int STATE_STOPPED = 2;
public static final int STATE_UNKNOWN = 3;
p... | package nodomain.freeyourgadget.gadgetbridge.model;
/**
* Created by steffen on 07.06.16.
*/
public class MusicStateSpec {
public static final int STATE_PLAYING = 0;
public static final int STATE_PAUSED = 1;
public static final int STATE_STOPPED = 2;
public static final int STATE_UNKNOWN = 3;
p... | 11 | 0 | 1 | add_only | --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java
@@ -45,2 +45,13 @@
}
+
+ @Override
+ public int hashCode() {
+ int result = (int) state;
+// ignore the position -- it is taken ... | --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java
@@ ... @@
}
+
+ @Override
+ public int hashCode() {
+ int result = (int) state;
+// ignore the position -- it is taken into acco... | --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/MusicStateSpec.java
@@ -45,2 +45,13 @@
CON }
ADD
ADD @Override
ADD public int hashCode() {
ADD int result = (int) state;
ADD // ignore the positi... | <<<<<<< SEARCH
this.repeat == stateSpec.repeat;
}
}
=======
this.repeat == stateSpec.repeat;
}
@Override
public int hashCode() {
int result = (int) state;
// ignore the position -- it is taken into account in equals()
// result = 31 * result + position;
... |
blindpirate/gradle | 65401d90fa02c6a5cc6a7ae53eaa58cdb028c77c | src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt | kotlin | apache-2.0 | Improve pop culture reference in test case
| package org.gradle.script.lang.kotlin.support
import org.gradle.script.lang.kotlin.TestWithTempFiles
import org.gradle.script.lang.kotlin.loggerFor
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import java.io.File
import java.net.URLClassLoader
class K... | package org.gradle.script.lang.kotlin.support
import org.gradle.script.lang.kotlin.TestWithTempFiles
import org.gradle.script.lang.kotlin.loggerFor
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
import java.io.File
import java.net.URLClassLoader
class K... | 2 | 2 | 2 | mixed | --- a/src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt
+++ b/src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt
@@ -21,3 +21,3 @@
writeText("""
- package adams
+ package hhgttg
@@ -35,3 +35,3 @@
classLoaderFor(... | --- a/src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt
+++ b/src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt
@@ ... @@
writeText("""
- package adams
+ package hhgttg
@@ ... @@
classLoaderFor(outputJar)
- ... | --- a/src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt
+++ b/src/test/kotlin/org/gradle/script/lang/kotlin/support/KotlinCompilerTest.kt
@@ -21,3 +21,3 @@
CON writeText("""
DEL package adams
ADD package hhgttg
CON
@@ -35,3 +35,3 @@
CON ... | <<<<<<< SEARCH
val sourceFile = newFile("DeepThought.kt").apply {
writeText("""
package adams
class DeepThought {
=======
val sourceFile = newFile("DeepThought.kt").apply {
writeText("""
package hhgttg
class DeepT... |
mattgreen/watchexec | 0b5120430cd73059d40145602383cf2a39012030 | src/lib.rs | rust | apache-2.0 | Revise clippy lints to avoid breakage
| //! Watchexec: the library
//!
//! This is the library version of the CLI tool [watchexec]. The tool is
//! implemented with this library, but the purpose of the watchexec project is
//! to deliver the CLI tool, instead of focusing on the library interface first
//! and foremost. **For this reason, semver guarantees do... | //! Watchexec: the library
//!
//! This is the library version of the CLI tool [watchexec]. The tool is
//! implemented with this library, but the purpose of the watchexec project is
//! to deliver the CLI tool, instead of focusing on the library interface first
//! and foremost. **For this reason, semver guarantees do... | 6 | 12 | 1 | mixed | --- a/src/lib.rs
+++ b/src/lib.rs
@@ -11,15 +11,9 @@
-#![forbid(
- clippy::pedantic,
- clippy::nursery,
- deprecated,
- intra_doc_link_resolution_failure,
+#![forbid(deprecated)]
+#![warn(
+ clippy::all,
+ clippy::missing_const_for_fn,
clippy::option_unwrap_used,
- clippy::result_unwrap_used... | --- a/src/lib.rs
+++ b/src/lib.rs
@@ ... @@
-#![forbid(
- clippy::pedantic,
- clippy::nursery,
- deprecated,
- intra_doc_link_resolution_failure,
+#![forbid(deprecated)]
+#![warn(
+ clippy::all,
+ clippy::missing_const_for_fn,
clippy::option_unwrap_used,
- clippy::result_unwrap_used
-)]
-#![... | --- a/src/lib.rs
+++ b/src/lib.rs
@@ -11,15 +11,9 @@
CON
DEL #![forbid(
DEL clippy::pedantic,
DEL clippy::nursery,
DEL deprecated,
DEL intra_doc_link_resolution_failure,
ADD #![forbid(deprecated)]
ADD #![warn(
ADD clippy::all,
ADD clippy::missing_const_for_fn,
CON clippy::option_unwrap_used... | <<<<<<< SEARCH
//! [watchexec]: https://github.com/watchexec/watchexec
#![forbid(
clippy::pedantic,
clippy::nursery,
deprecated,
intra_doc_link_resolution_failure,
clippy::option_unwrap_used,
clippy::result_unwrap_used
)]
#![deny(unsafe_code, clippy::missing_const_for_fn, clippy::redundant_clon... |
defuz/rust | ee06ed2bfd233b57c5989696bb723bddf6569622 | src/libcore/rt/work_queue.rs | rust | apache-2.0 | core::rt: Put a lock on the work queue
| // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or ... | // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or ... | 22 | 13 | 5 | mixed | --- a/src/libcore/rt/work_queue.rs
+++ b/src/libcore/rt/work_queue.rs
@@ -13,11 +13,15 @@
use vec::OwnedVector;
+use unstable::sync::{Exclusive, exclusive};
+use cell::Cell;
+use kinds::Owned;
pub struct WorkQueue<T> {
- priv queue: ~[T]
+ // XXX: Another mystery bug fixed by boxing this lock
+ priv queue:... | --- a/src/libcore/rt/work_queue.rs
+++ b/src/libcore/rt/work_queue.rs
@@ ... @@
use vec::OwnedVector;
+use unstable::sync::{Exclusive, exclusive};
+use cell::Cell;
+use kinds::Owned;
pub struct WorkQueue<T> {
- priv queue: ~[T]
+ // XXX: Another mystery bug fixed by boxing this lock
+ priv queue: ~Exclusiv... | --- a/src/libcore/rt/work_queue.rs
+++ b/src/libcore/rt/work_queue.rs
@@ -13,11 +13,15 @@
CON use vec::OwnedVector;
ADD use unstable::sync::{Exclusive, exclusive};
ADD use cell::Cell;
ADD use kinds::Owned;
CON
CON pub struct WorkQueue<T> {
DEL priv queue: ~[T]
ADD // XXX: Another mystery bug fixed by boxing th... | <<<<<<< SEARCH
use option::*;
use vec::OwnedVector;
pub struct WorkQueue<T> {
priv queue: ~[T]
}
pub impl<T> WorkQueue<T> {
fn new() -> WorkQueue<T> {
WorkQueue {
queue: ~[]
}
}
fn push(&mut self, value: T) {
self.queue.unshift(value)
}
fn pop(&mut self) -... |
saltstack/salt | baacda228682a50acc5a4528d43f5d3a88c7c6ec | salt/client/netapi.py | python | apache-2.0 | Make sure to not leave hanging children processes if the parent is killed
| # encoding: utf-8
'''
The main entry point for salt-api
'''
# Import python libs
import logging
import multiprocessing
# Import salt-api libs
import salt.loader
logger = logging.getLogger(__name__)
class NetapiClient(object):
'''
Start each netapi module that is configured to run
'''
def __init__(se... | # encoding: utf-8
'''
The main entry point for salt-api
'''
# Import python libs
import logging
import multiprocessing
import signal
# Import salt-api libs
import salt.loader
logger = logging.getLogger(__name__)
class NetapiClient(object):
'''
Start each netapi module that is configured to run
'''
d... | 16 | 1 | 3 | mixed | --- a/salt/client/netapi.py
+++ b/salt/client/netapi.py
@@ -7,2 +7,3 @@
import multiprocessing
+import signal
@@ -20,2 +21,3 @@
self.opts = opts
+ self.processes = []
@@ -29,2 +31,15 @@
logger.info("Starting '{0}' api module".format(fun))
- multiprocessing.Process(ta... | --- a/salt/client/netapi.py
+++ b/salt/client/netapi.py
@@ ... @@
import multiprocessing
+import signal
@@ ... @@
self.opts = opts
+ self.processes = []
@@ ... @@
logger.info("Starting '{0}' api module".format(fun))
- multiprocessing.Process(target=netapi[fun]).start... | --- a/salt/client/netapi.py
+++ b/salt/client/netapi.py
@@ -7,2 +7,3 @@
CON import multiprocessing
ADD import signal
CON
@@ -20,2 +21,3 @@
CON self.opts = opts
ADD self.processes = []
CON
@@ -29,2 +31,15 @@
CON logger.info("Starting '{0}' api module".format(fun))
DEL mu... | <<<<<<< SEARCH
import logging
import multiprocessing
# Import salt-api libs
=======
import logging
import multiprocessing
import signal
# Import salt-api libs
>>>>>>> REPLACE
<<<<<<< SEARCH
def __init__(self, opts):
self.opts = opts
def run(self):
=======
def __init__(self, opts):
sel... |
lm-tools/sectors | f9365594e415e9485dc6a4435cb14b3eaf8b9c58 | situational/settings/heroku.py | python | bsd-3-clause | Remove RedisCloud URL form Heroku
| import os
from .base import *
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Sym Roe', 'lmtools@talusdesign.co.uk'),
)
MANAGERS = ADMINS
ALLOWED_HOSTS = ['.herokuapp.com']
INTERNAL_IPS = ()
# Redirect any non-HTTP request to HTTPS
SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROT... | import os
from .base import *
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Sym Roe', 'lmtools@talusdesign.co.uk'),
)
MANAGERS = ADMINS
ALLOWED_HOSTS = ['.herokuapp.com']
INTERNAL_IPS = ()
# Redirect any non-HTTP request to HTTPS
SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROT... | 0 | 2 | 1 | del_only | --- a/situational/settings/heroku.py
+++ b/situational/settings/heroku.py
@@ -33,4 +33,2 @@
-REDIS_URL = os.environ['REDISCLOUD_URL']
-
EMAIL_HOST = os.environ['MAILGUN_SMTP_SERVER'] | --- a/situational/settings/heroku.py
+++ b/situational/settings/heroku.py
@@ ... @@
-REDIS_URL = os.environ['REDISCLOUD_URL']
-
EMAIL_HOST = os.environ['MAILGUN_SMTP_SERVER']
| --- a/situational/settings/heroku.py
+++ b/situational/settings/heroku.py
@@ -33,4 +33,2 @@
CON
DEL REDIS_URL = os.environ['REDISCLOUD_URL']
DEL
CON EMAIL_HOST = os.environ['MAILGUN_SMTP_SERVER']
| <<<<<<< SEARCH
DATABASES['default']['ENGINE'] = 'django_postgrespool'
REDIS_URL = os.environ['REDISCLOUD_URL']
EMAIL_HOST = os.environ['MAILGUN_SMTP_SERVER']
EMAIL_HOST_USER = os.environ['MAILGUN_SMTP_LOGIN']
=======
DATABASES['default']['ENGINE'] = 'django_postgrespool'
EMAIL_HOST = os.environ['MAILGUN_SMTP_SERVER... |
bcb/jsonrpcclient | eb2827a94e477c64eeb67076288007326c34a2f9 | setup.py | python | mit | Add aiohttpClient plus example usage
Closes #20
| """setup.py"""
from codecs import open as codecs_open
from setuptools import setup
with codecs_open('README.rst', 'r', 'utf-8') as f:
__README = f.read()
with codecs_open('HISTORY.rst', 'r', 'utf-8') as f:
__HISTORY = f.read()
setup(
name='jsonrpcclient',
version='2.2.4',
description='Send JSON-R... | """setup.py"""
from codecs import open as codecs_open
from setuptools import setup
with codecs_open('README.rst', 'r', 'utf-8') as f:
__README = f.read()
with codecs_open('HISTORY.rst', 'r', 'utf-8') as f:
__HISTORY = f.read()
setup(
name='jsonrpcclient',
version='2.2.4',
description='Send JSON-R... | 3 | 1 | 2 | mixed | --- a/setup.py
+++ b/setup.py
@@ -24,5 +24,5 @@
extras_require={
+ 'aiohttp': ['aiohttp'],
'requests': ['requests'],
'requests_security': ['requests[security]'],
- 'zmq': ['pyzmq'],
'tornado': ['tornado'],
@@ -30,2 +30,4 @@
'testfixtures', 'mock']
+ 'web... | --- a/setup.py
+++ b/setup.py
@@ ... @@
extras_require={
+ 'aiohttp': ['aiohttp'],
'requests': ['requests'],
'requests_security': ['requests[security]'],
- 'zmq': ['pyzmq'],
'tornado': ['tornado'],
@@ ... @@
'testfixtures', 'mock']
+ 'websockets': ['webs... | --- a/setup.py
+++ b/setup.py
@@ -24,5 +24,5 @@
CON extras_require={
ADD 'aiohttp': ['aiohttp'],
CON 'requests': ['requests'],
CON 'requests_security': ['requests[security]'],
DEL 'zmq': ['pyzmq'],
CON 'tornado': ['tornado'],
@@ -30,2 +30,4 @@
CON 'testfixtures', ... | <<<<<<< SEARCH
install_requires=['future', 'jsonschema'],
extras_require={
'requests': ['requests'],
'requests_security': ['requests[security]'],
'zmq': ['pyzmq'],
'tornado': ['tornado'],
'unittest': ['requests', 'pyzmq', 'tornado', 'responses', \
'testfixture... |
jimmycuadra/rust-etcd | ffbc9b9a22f0c202223a68a5f6f5453b970610da | build.rs | rust | mit | Fix compilation error due to syntex mismatched types
Error:
build.rs:27:37: 27:50 error: mismatched types:
expected `&mut syntex::Registry`,
found `&mut inner::syntex::Registry`
(expected struct `syntex::Registry`,
found struct `inner::syntex::Registry`) [E0308]
build.rs:27 serde_codegen::register(&mut reg... | #[cfg(not(feature = "serde_macros"))]
mod inner {
extern crate serde_codegen;
extern crate syntex;
use std::env;
use std::path::Path;
const MODULES: &'static[&'static str] = &[
"error",
"keys",
"stats",
"version",
];
pub fn main() {
let out_dir = en... | #[cfg(not(feature = "serde_macros"))]
mod inner {
extern crate serde_codegen;
use std::env;
use std::path::Path;
const MODULES: &'static[&'static str] = &[
"error",
"keys",
"stats",
"version",
];
pub fn main() {
let out_dir = env::var_os("OUT_DIR").unwr... | 1 | 5 | 2 | mixed | --- a/build.rs
+++ b/build.rs
@@ -3,3 +3,2 @@
extern crate serde_codegen;
- extern crate syntex;
@@ -24,6 +23,3 @@
- let mut registry = syntex::Registry::new();
-
- serde_codegen::register(&mut registry);
- registry.expand("", &src_path, &dst_path).unwrap();
+ ser... | --- a/build.rs
+++ b/build.rs
@@ ... @@
extern crate serde_codegen;
- extern crate syntex;
@@ ... @@
- let mut registry = syntex::Registry::new();
-
- serde_codegen::register(&mut registry);
- registry.expand("", &src_path, &dst_path).unwrap();
+ serde_codegen::ex... | --- a/build.rs
+++ b/build.rs
@@ -3,3 +3,2 @@
CON extern crate serde_codegen;
DEL extern crate syntex;
CON
@@ -24,6 +23,3 @@
CON
DEL let mut registry = syntex::Registry::new();
DEL
DEL serde_codegen::register(&mut registry);
DEL registry.expand("", &src_path, &dst_path).un... | <<<<<<< SEARCH
mod inner {
extern crate serde_codegen;
extern crate syntex;
use std::env;
=======
mod inner {
extern crate serde_codegen;
use std::env;
>>>>>>> REPLACE
<<<<<<< SEARCH
let dst_path = Path::new(&out_dir).join(&dst);
let mut registry = syntex::Registry::new... |
tf/pageflow | 5d153d46e9b72d80fed1a7c3c04a86ade6546ef9 | entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js | javascript | mit | Allow disabling video or dash via browser feature flag
Used for debugging.
REDMINE-18067
| export function sources(videoFile, quality = 'auto') {
if (quality === 'auto') {
let result = [
{
type: 'application/x-mpegURL',
src: videoFile.urls['hls-playlist']
},
{
type: 'video/mp4',
src: videoFile.urls.high
}
];
if (videoFile.urls['dash-playl... | import {browser} from 'pageflow/frontend';
browser.feature('dash', () => true);
browser.feature('video', () => true);
browser.feature('highdef', () => true);
export function sources(videoFile, quality = 'auto') {
if (typeof window !== 'undefined') {
if (!browser.has('video')) {
return [];
}
if (!... | 30 | 0 | 1 | add_only | --- a/entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js
+++ b/entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js
@@ -1,2 +1,32 @@
+import {browser} from 'pageflow/frontend';
+
+browser.feature('dash', () => true);
+browser.feature('video', () => true);
+browser.feature('highdef', () => true... | --- a/entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js
+++ b/entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js
@@ ... @@
+import {browser} from 'pageflow/frontend';
+
+browser.feature('dash', () => true);
+browser.feature('video', () => true);
+browser.feature('highdef', () => true);
+
e... | --- a/entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js
+++ b/entry_types/scrolled/package/src/frontend/VideoPlayer/sources.js
@@ -1,2 +1,32 @@
ADD import {browser} from 'pageflow/frontend';
ADD
ADD browser.feature('dash', () => true);
ADD browser.feature('video', () => true);
ADD browser.feature('highd... | <<<<<<< SEARCH
export function sources(videoFile, quality = 'auto') {
if (quality === 'auto') {
let result = [
=======
import {browser} from 'pageflow/frontend';
browser.feature('dash', () => true);
browser.feature('video', () => true);
browser.feature('highdef', () => true);
export function sources(videoFile,... |
StepicOrg/stepik-android | 428638304b2da579c8a87191917372153aebbe19 | app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt | kotlin | apache-2.0 | Fix background in feedback activity
| package org.stepic.droid.ui.activities
import android.os.Bundle
import android.view.MenuItem
import androidx.fragment.app.Fragment
import org.stepic.droid.R
import org.stepic.droid.base.SingleFragmentActivity
import org.stepic.droid.ui.fragments.FeedbackFragment
import org.stepic.droid.ui.util.initCenteredToolbar
cla... | package org.stepic.droid.ui.activities
import android.os.Bundle
import android.view.MenuItem
import androidx.fragment.app.Fragment
import org.stepic.droid.R
import org.stepic.droid.base.SingleFragmentActivity
import org.stepic.droid.ui.fragments.FeedbackFragment
import org.stepic.droid.ui.util.initCenteredToolbar
cla... | 0 | 1 | 1 | del_only | --- a/app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt
+++ b/app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt
@@ -19,3 +19,2 @@
super.onCreate(savedInstanceState)
- window.setBackgroundDrawable(null)
setUpToolbar() | --- a/app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt
+++ b/app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt
@@ ... @@
super.onCreate(savedInstanceState)
- window.setBackgroundDrawable(null)
setUpToolbar()
| --- a/app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt
+++ b/app/src/main/java/org/stepic/droid/ui/activities/FeedbackActivity.kt
@@ -19,3 +19,2 @@
CON super.onCreate(savedInstanceState)
DEL window.setBackgroundDrawable(null)
CON setUpToolbar()
| <<<<<<< SEARCH
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
window.setBackgroundDrawable(null)
setUpToolbar()
}
=======
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setUpToolbar()
... |
giuseppecuccu/jsvq | 2b0a0a058232acc74cc6ad2db359fc84590900ca | svq.java | java | mit | Save buffered image as bmp
| // Get JAFFE database from http://www.kasrl.org/jaffe_info.html
// Extract pics in folder named "jaffe"
// package image_test;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
... | // Get JAFFE database from http://www.kasrl.org/jaffe_info.html
// Extract pics in folder named "jaffe"
// package image_test;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
... | 7 | 0 | 1 | add_only | --- a/svq.java
+++ b/svq.java
@@ -42,2 +42,9 @@
+ // save result
+ try {
+ ImageIO.write(output, "BMP", new File("test.bmp"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
System.out.println("Done!"); | --- a/svq.java
+++ b/svq.java
@@ ... @@
+ // save result
+ try {
+ ImageIO.write(output, "BMP", new File("test.bmp"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
System.out.println("Done!");
| --- a/svq.java
+++ b/svq.java
@@ -42,2 +42,9 @@
CON
ADD // save result
ADD try {
ADD ImageIO.write(output, "BMP", new File("test.bmp"));
ADD } catch (IOException e) {
ADD throw new RuntimeException(e);
ADD }
ADD
CON System.out.println("Done!");
| <<<<<<< SEARCH
}
System.out.println("Done!");
}
=======
}
// save result
try {
ImageIO.write(output, "BMP", new File("test.bmp"));
} catch (IOException e) {
throw new RuntimeException(e);
}
System.out.println("Done!");
}... |
matthiask/towel | 019b4ed21eddaa176c9445f40f91dc0becad7b4a | towel/mt/forms.py | python | bsd-3-clause | towel.mt: Stop evaluating querysets when processing form fields
| """
Forms
=====
These three form subclasses will automatically add limitation by tenant
to all form fields with a ``queryset`` attribute.
.. warning::
If you customized the dropdown using ``choices`` you have to limit the
choices by the current tenant yourself.
"""
from django import forms
from towel impor... | """
Forms
=====
These three form subclasses will automatically add limitation by tenant
to all form fields with a ``queryset`` attribute.
.. warning::
If you customized the dropdown using ``choices`` you have to limit the
choices by the current tenant yourself.
"""
from django import forms
from towel impor... | 1 | 1 | 1 | mixed | --- a/towel/mt/forms.py
+++ b/towel/mt/forms.py
@@ -21,3 +21,3 @@
for field in form.fields.values():
- if getattr(field, 'queryset', None):
+ if hasattr(field, 'queryset'):
model = field.queryset.model | --- a/towel/mt/forms.py
+++ b/towel/mt/forms.py
@@ ... @@
for field in form.fields.values():
- if getattr(field, 'queryset', None):
+ if hasattr(field, 'queryset'):
model = field.queryset.model
| --- a/towel/mt/forms.py
+++ b/towel/mt/forms.py
@@ -21,3 +21,3 @@
CON for field in form.fields.values():
DEL if getattr(field, 'queryset', None):
ADD if hasattr(field, 'queryset'):
CON model = field.queryset.model
| <<<<<<< SEARCH
def _process_fields(form, request):
for field in form.fields.values():
if getattr(field, 'queryset', None):
model = field.queryset.model
=======
def _process_fields(form, request):
for field in form.fields.values():
if hasattr(field, 'queryset'):
model = ... |
NordicSemiconductor/Android-nRF-Toolbox | d8f4906afb5ffd35d38ca0a9c2160295dc96e9fb | profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt | kotlin | bsd-3-clause | Change alarm sound for medium and high levels
| package no.nordicsemi.android.prx.repository
import android.content.Context
import android.media.RingtoneManager
import android.os.Build
import dagger.hilt.android.qualifiers.ApplicationContext
import no.nordicsemi.android.prx.data.AlarmLevel
import javax.inject.Inject
internal class AlarmHandler @Inject constructor(... | package no.nordicsemi.android.prx.repository
import android.content.Context
import android.media.RingtoneManager
import android.os.Build
import dagger.hilt.android.qualifiers.ApplicationContext
import no.nordicsemi.android.prx.data.AlarmLevel
import javax.inject.Inject
internal class AlarmHandler @Inject constructor(... | 18 | 12 | 2 | mixed | --- a/profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt
+++ b/profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt
@@ -14,14 +14,21 @@
- private val ringtone = RingtoneManager.getRingtone(context, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE))
+... | --- a/profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt
+++ b/profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt
@@ ... @@
- private val ringtone = RingtoneManager.getRingtone(context, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE))
+ privat... | --- a/profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt
+++ b/profile_prx/src/main/java/no/nordicsemi/android/prx/repository/AlarmHandler.kt
@@ -14,14 +14,21 @@
CON
DEL private val ringtone = RingtoneManager.getRingtone(context, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTO... | <<<<<<< SEARCH
) {
private val ringtone = RingtoneManager.getRingtone(context, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE))
fun playAlarm(alarmLevel: AlarmLevel) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
ringtone.volume = when (alarmLevel) {
A... |
kotlinx/kotlinx.html | 546089b6192f1e1805c335d53d45a9b55c3af2bf | js/src/test/kotlin/trees.kt | kotlin | apache-2.0 | Add test for event handling
| package html4k.tests
import html4k.dom.append
import html4k.js.div
import html4k.p
import org.w3c.dom.asList
import kotlin.browser.document
import kotlin.test.assertEquals
import kotlin.test.assertTrue
import org.junit.Test as test
class DomTreeImplTest {
test fun simpleTree() {
val node = document.body!!... | package html4k.tests
import html4k.dom.append
import html4k.js.div
import html4k.js.onClickFunction
import html4k.p
import org.w3c.dom.events.Event
import org.w3c.dom.HTMLDivElement
import org.w3c.dom.HTMLElement
import org.w3c.dom.asList
import kotlin.dom.asList
import kotlin.browser.document
import kotlin.test.asser... | 41 | 0 | 2 | add_only | --- a/js/src/test/kotlin/trees.kt
+++ b/js/src/test/kotlin/trees.kt
@@ -4,6 +4,12 @@
import html4k.js.div
+import html4k.js.onClickFunction
import html4k.p
+import org.w3c.dom.events.Event
+import org.w3c.dom.HTMLDivElement
+import org.w3c.dom.HTMLElement
import org.w3c.dom.asList
+import kotlin.dom.asList
import k... | --- a/js/src/test/kotlin/trees.kt
+++ b/js/src/test/kotlin/trees.kt
@@ ... @@
import html4k.js.div
+import html4k.js.onClickFunction
import html4k.p
+import org.w3c.dom.events.Event
+import org.w3c.dom.HTMLDivElement
+import org.w3c.dom.HTMLElement
import org.w3c.dom.asList
+import kotlin.dom.asList
import kotlin.b... | --- a/js/src/test/kotlin/trees.kt
+++ b/js/src/test/kotlin/trees.kt
@@ -4,6 +4,12 @@
CON import html4k.js.div
ADD import html4k.js.onClickFunction
CON import html4k.p
ADD import org.w3c.dom.events.Event
ADD import org.w3c.dom.HTMLDivElement
ADD import org.w3c.dom.HTMLElement
CON import org.w3c.dom.asList
ADD import kot... | <<<<<<< SEARCH
import html4k.dom.append
import html4k.js.div
import html4k.p
import org.w3c.dom.asList
import kotlin.browser.document
import kotlin.test.assertEquals
import kotlin.test.assertTrue
import org.junit.Test as test
=======
import html4k.dom.append
import html4k.js.div
import html4k.js.onClickFunction
import... |
GNOME/librsvg | b799710f51363e89291ba81e925c1c217036e1c1 | tests/src/legacy_sizing.rs | rust | lgpl-2.1 | Test for no intrinsic size at all
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/595>
| use cairo;
use librsvg::{rsvg_convert_only::LegacySize, CairoRenderer};
use crate::utils::load_svg;
#[test]
fn just_viewbox_uses_viewbox_size() {
let svg = load_svg(
br#"<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/>
"#,
)
.unwrap();
... | use cairo;
use librsvg::{rsvg_convert_only::LegacySize, CairoRenderer};
use crate::utils::load_svg;
#[test]
fn just_viewbox_uses_viewbox_size() {
let svg = load_svg(
br#"<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/>
"#,
)
.unwrap();
... | 28 | 0 | 1 | add_only | --- a/tests/src/legacy_sizing.rs
+++ b/tests/src/legacy_sizing.rs
@@ -31 +31,29 @@
}
+
+#[test]
+fn no_intrinsic_size_uses_element_geometries() {
+ let svg = load_svg(
+ br#"<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="10" y="20" width="30" height="40" fill="bl... | --- a/tests/src/legacy_sizing.rs
+++ b/tests/src/legacy_sizing.rs
@@ ... @@
}
+
+#[test]
+fn no_intrinsic_size_uses_element_geometries() {
+ let svg = load_svg(
+ br#"<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="10" y="20" width="30" height="40" fill="black"/>
... | --- a/tests/src/legacy_sizing.rs
+++ b/tests/src/legacy_sizing.rs
@@ -31 +31,29 @@
CON }
ADD
ADD #[test]
ADD fn no_intrinsic_size_uses_element_geometries() {
ADD let svg = load_svg(
ADD br#"<?xml version="1.0" encoding="UTF-8"?>
ADD <svg xmlns="http://www.w3.org/2000/svg">
ADD <rect x="10" y="20" width="... | <<<<<<< SEARCH
);
}
=======
);
}
#[test]
fn no_intrinsic_size_uses_element_geometries() {
let svg = load_svg(
br#"<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="20" width="30" height="40" fill="black"/>
</svg>
"#,
)
.unwrap();
ass... |
ArkeologeN/node-obligatory | 01c0ecc8e41dcd5e73a114fb02c8eb11d1817334 | index.js | javascript | mit | Replace native w/ _.isObject function. | var klass = require('klass')
, _ = require('lodash')
, obligator = klass({
initialize: function() {
this._params = {};
this._collection = {};
}
})
.methods({
setCollection: function(collection) {
if ( !collection )
... | var klass = require('klass')
, _ = require('lodash')
, obligator = klass({
initialize: function() {
this._params = {};
this._collection = {};
}
})
.methods({
setCollection: function(collection) {
if ( !collection )
... | 1 | 1 | 1 | mixed | --- a/index.js
+++ b/index.js
@@ -18,3 +18,3 @@
for(i in parameters){
- if(typeof(this[parameters[i]]) != "object"){
+ if(!_.isObject(this[parameters[i]])){
this._params[parameters[i]] = this[parameters[i]]; | --- a/index.js
+++ b/index.js
@@ ... @@
for(i in parameters){
- if(typeof(this[parameters[i]]) != "object"){
+ if(!_.isObject(this[parameters[i]])){
this._params[parameters[i]] = this[parameters[i]];
| --- a/index.js
+++ b/index.js
@@ -18,3 +18,3 @@
CON for(i in parameters){
DEL if(typeof(this[parameters[i]]) != "object"){
ADD if(!_.isObject(this[parameters[i]])){
CON this._params[parameters[i]] = this[parameters[i]];
| <<<<<<< SEARCH
for(i in parameters){
if(typeof(this[parameters[i]]) != "object"){
this._params[parameters[i]] = this[parameters[i]];
delete this[parameters[i]];
=======
for(i in parameters){
if(!_.isObject(this[parameters... |
bloodybear/yona | ecd4c0f97afc45f07a381d9d161269435fe02a80 | app/models/UserAction.java | java | apache-2.0 | Add missed serial version UID
| package models;
import models.enumeration.ResourceType;
import play.db.ebean.Model;
import javax.persistence.*;
import java.util.List;
@MappedSuperclass
abstract public class UserAction extends Model {
@Id
public Long id;
@ManyToOne
public User user;
@Enumerated(EnumType.STRING)
public mode... | package models;
import models.enumeration.ResourceType;
import play.db.ebean.Model;
import javax.persistence.*;
import java.util.List;
@MappedSuperclass
abstract public class UserAction extends Model {
private static final long serialVersionUID = 7150871138735757127L;
@Id
public Long id;
@ManyToOne
... | 1 | 0 | 1 | add_only | --- a/app/models/UserAction.java
+++ b/app/models/UserAction.java
@@ -10,2 +10,3 @@
abstract public class UserAction extends Model {
+ private static final long serialVersionUID = 7150871138735757127L;
@Id | --- a/app/models/UserAction.java
+++ b/app/models/UserAction.java
@@ ... @@
abstract public class UserAction extends Model {
+ private static final long serialVersionUID = 7150871138735757127L;
@Id
| --- a/app/models/UserAction.java
+++ b/app/models/UserAction.java
@@ -10,2 +10,3 @@
CON abstract public class UserAction extends Model {
ADD private static final long serialVersionUID = 7150871138735757127L;
CON @Id
| <<<<<<< SEARCH
@MappedSuperclass
abstract public class UserAction extends Model {
@Id
public Long id;
=======
@MappedSuperclass
abstract public class UserAction extends Model {
private static final long serialVersionUID = 7150871138735757127L;
@Id
public Long id;
>>>>>>> REPLACE
|
evestera/json_sample | e8bc8eb14f51d110ed842f4e308654b84ba8c484 | json_typegen_cli/src/main.rs | rust | apache-2.0 | CLI: Reimplement support for non-macro input
| extern crate json_typegen_shared;
extern crate clap;
use json_typegen_shared::codegen_from_macro;
use clap::{Arg, App};
fn main() {
let matches = App::new("JSON code generation CLI")
.version("0.1.0")
.about("Generate Rust types from JSON samples")
... | extern crate json_typegen_shared;
extern crate clap;
use json_typegen_shared::{codegen, codegen_from_macro, Options, infer_source_type};
use clap::{Arg, App};
use std::io::{self, Read, Write};
use std::fs::OpenOptions;
fn main() {
let matches = App::new("JSON code generation CLI")
.version("0.1.0")
... | 55 | 10 | 2 | mixed | --- a/json_typegen_cli/src/main.rs
+++ b/json_typegen_cli/src/main.rs
@@ -3,4 +3,6 @@
-use json_typegen_shared::codegen_from_macro;
+use json_typegen_shared::{codegen, codegen_from_macro, Options, infer_source_type};
use clap::{Arg, App};
+use std::io::{self, Read, Write};
+use std::fs::OpenOptions;
@@ -8,13 +10,5... | --- a/json_typegen_cli/src/main.rs
+++ b/json_typegen_cli/src/main.rs
@@ ... @@
-use json_typegen_shared::codegen_from_macro;
+use json_typegen_shared::{codegen, codegen_from_macro, Options, infer_source_type};
use clap::{Arg, App};
+use std::io::{self, Read, Write};
+use std::fs::OpenOptions;
@@ ... @@
let m... | --- a/json_typegen_cli/src/main.rs
+++ b/json_typegen_cli/src/main.rs
@@ -3,4 +3,6 @@
CON
DEL use json_typegen_shared::codegen_from_macro;
ADD use json_typegen_shared::{codegen, codegen_from_macro, Options, infer_source_type};
CON use clap::{Arg, App};
ADD use std::io::{self, Read, Write};
ADD use std::fs::OpenOptions... | <<<<<<< SEARCH
extern crate clap;
use json_typegen_shared::codegen_from_macro;
use clap::{Arg, App};
fn main() {
let matches = App::new("JSON code generation CLI")
.version("0.1.0")
.about("Generate Rust types from JSON samples")
.arg(Arg::with_nam... |
ecomfe/rebas | 3d22a51134963c3f188edeacb937d2a6f17a29e5 | lib/env.js | javascript | mit | Fix process.nextTick, try to save context
| /**
* @file env
* @author treelite(c.xinle@gmail.com)
*/
/**
* 修复全局的异步函数
* 使之能在异步回调中恢复请求请求上下文
*
* @inner
* @param {Object} app server
*/
function fixGlobalMethods(app) {
var methods = ['setTimeout', 'setInterval', 'setImmediate'];
methods.forEach(function (name) {
var method = global[name];
... | /**
* @file env
* @author treelite(c.xinle@gmail.com)
*/
/**
* 修复异步函数
* 使之能在异步回调中恢复请求请求上下文
*
* @inner
* @param {Object} app server
*/
function fixAsyncMethods(app) {
/**
* 包裹异步函数
*
* @param {Object} obj 模块
* @param {string} name 方法名
*/
function wrap(obj, name) {
var m... | 20 | 8 | 4 | mixed | --- a/lib/env.js
+++ b/lib/env.js
@@ -6,3 +6,3 @@
/**
- * 修复全局的异步函数
+ * 修复异步函数
* 使之能在异步回调中恢复请求请求上下文
@@ -12,8 +12,13 @@
*/
-function fixGlobalMethods(app) {
- var methods = ['setTimeout', 'setInterval', 'setImmediate'];
+function fixAsyncMethods(app) {
- methods.forEach(function (name) {
- var method... | --- a/lib/env.js
+++ b/lib/env.js
@@ ... @@
/**
- * 修复全局的异步函数
+ * 修复异步函数
* 使之能在异步回调中恢复请求请求上下文
@@ ... @@
*/
-function fixGlobalMethods(app) {
- var methods = ['setTimeout', 'setInterval', 'setImmediate'];
+function fixAsyncMethods(app) {
- methods.forEach(function (name) {
- var method = global[name]... | --- a/lib/env.js
+++ b/lib/env.js
@@ -6,3 +6,3 @@
CON /**
DEL * 修复全局的异步函数
ADD * 修复异步函数
CON * 使之能在异步回调中恢复请求请求上下文
@@ -12,8 +12,13 @@
CON */
DEL function fixGlobalMethods(app) {
DEL var methods = ['setTimeout', 'setInterval', 'setImmediate'];
ADD function fixAsyncMethods(app) {
CON
DEL methods.forEach(functio... | <<<<<<< SEARCH
/**
* 修复全局的异步函数
* 使之能在异步回调中恢复请求请求上下文
*
* @inner
* @param {Object} app server
*/
function fixGlobalMethods(app) {
var methods = ['setTimeout', 'setInterval', 'setImmediate'];
methods.forEach(function (name) {
var method = global[name];
global[name] = function (callback) {
... |
j00bar/django-widgy | 7f7fd4e7547af3a6d7e3cd4da025c2b0ab24508b | widgy/contrib/widgy_mezzanine/migrations/0001_initial.py | python | apache-2.0 | Remove dependency for ReviewedVersionTracker in migrations
The base widgy migrations had references to ReviewedVersionTracker,
which is not part of the base widgy install. This commit changes the
dependency to VersionTracker instead, which is part of the base widgy
install.
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import widgy.db.fields
import django.db.models.deletion
import widgy.contrib.widgy_mezzanine.models
class Migration(migrations.Migration):
dependencies = [
('pages', '__first__'),
('review_qu... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import widgy.db.fields
import django.db.models.deletion
import widgy.contrib.widgy_mezzanine.models
class Migration(migrations.Migration):
dependencies = [
('pages', '__first__'),
('widgy', '... | 2 | 2 | 2 | mixed | --- a/widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
+++ b/widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
@@ -13,3 +13,3 @@
('pages', '__first__'),
- ('review_queue', '0001_initial'),
+ ('widgy', '0001_initial'),
]
@@ -21,3 +21,3 @@
('page_ptr', models.On... | --- a/widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
+++ b/widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
@@ ... @@
('pages', '__first__'),
- ('review_queue', '0001_initial'),
+ ('widgy', '0001_initial'),
]
@@ ... @@
('page_ptr', models.OneToOneField(pare... | --- a/widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
+++ b/widgy/contrib/widgy_mezzanine/migrations/0001_initial.py
@@ -13,3 +13,3 @@
CON ('pages', '__first__'),
DEL ('review_queue', '0001_initial'),
ADD ('widgy', '0001_initial'),
CON ]
@@ -21,3 +21,3 @@
CON ('page_... | <<<<<<< SEARCH
dependencies = [
('pages', '__first__'),
('review_queue', '0001_initial'),
]
=======
dependencies = [
('pages', '__first__'),
('widgy', '0001_initial'),
]
>>>>>>> REPLACE
<<<<<<< SEARCH
fields=[
('page_ptr', models.OneToOneF... |
bebeeteam/summernote | 06a3d3880fec2c12e1e0a322ef4b98446e0f37e4 | src/js/bs3/module/ImagePopover.js | javascript | mit | Remove image on backspace key event
| define([
'summernote/base/core/func',
'summernote/base/core/list',
'summernote/base/core/dom'
], function (func, list, dom) {
var ImagePopover = function (context) {
var ui = $.summernote.ui;
var options = context.options;
this.shouldInitialize = function () {
return !list.isEmpty(options.po... | define([
'summernote/base/core/func',
'summernote/base/core/list',
'summernote/base/core/dom',
'summernote/base/core/key'
], function (func, list, dom, key) {
var ImagePopover = function (context) {
var self = this;
var ui = $.summernote.ui;
var options = context.options;
this.shouldInitiali... | 25 | 2 | 5 | mixed | --- a/src/js/bs3/module/ImagePopover.js
+++ b/src/js/bs3/module/ImagePopover.js
@@ -3,5 +3,7 @@
'summernote/base/core/list',
- 'summernote/base/core/dom'
-], function (func, list, dom) {
+ 'summernote/base/core/dom',
+ 'summernote/base/core/key'
+], function (func, list, dom, key) {
var ImagePopover = function... | --- a/src/js/bs3/module/ImagePopover.js
+++ b/src/js/bs3/module/ImagePopover.js
@@ ... @@
'summernote/base/core/list',
- 'summernote/base/core/dom'
-], function (func, list, dom) {
+ 'summernote/base/core/dom',
+ 'summernote/base/core/key'
+], function (func, list, dom, key) {
var ImagePopover = function (cont... | --- a/src/js/bs3/module/ImagePopover.js
+++ b/src/js/bs3/module/ImagePopover.js
@@ -3,5 +3,7 @@
CON 'summernote/base/core/list',
DEL 'summernote/base/core/dom'
DEL ], function (func, list, dom) {
ADD 'summernote/base/core/dom',
ADD 'summernote/base/core/key'
ADD ], function (func, list, dom, key) {
CON var Im... | <<<<<<< SEARCH
'summernote/base/core/func',
'summernote/base/core/list',
'summernote/base/core/dom'
], function (func, list, dom) {
var ImagePopover = function (context) {
var ui = $.summernote.ui;
=======
'summernote/base/core/func',
'summernote/base/core/list',
'summernote/base/core/dom',
'summe... |
mglukhikh/intellij-community | 46da9197955776fcf9d7542417f8ceb54cbf6392 | platform/platform-impl/src/com/intellij/ui/NotificationActions.kt | kotlin | apache-2.0 | Rename one of NotificationAction classes to avoid confusion with another
| /*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | /*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | 3 | 7 | 3 | mixed | --- a/platform/platform-impl/src/com/intellij/ui/NotificationActions.kt
+++ b/platform/platform-impl/src/com/intellij/ui/NotificationActions.kt
@@ -21,7 +21,3 @@
-/**
- * @author Alexander Lobas
- */
-
-abstract class NotificationAction : AnAction() {
+abstract class CloseNotificationAction : AnAction() {
override... | --- a/platform/platform-impl/src/com/intellij/ui/NotificationActions.kt
+++ b/platform/platform-impl/src/com/intellij/ui/NotificationActions.kt
@@ ... @@
-/**
- * @author Alexander Lobas
- */
-
-abstract class NotificationAction : AnAction() {
+abstract class CloseNotificationAction : AnAction() {
override fun upd... | --- a/platform/platform-impl/src/com/intellij/ui/NotificationActions.kt
+++ b/platform/platform-impl/src/com/intellij/ui/NotificationActions.kt
@@ -21,7 +21,3 @@
CON
DEL /**
DEL * @author Alexander Lobas
DEL */
DEL
DEL abstract class NotificationAction : AnAction() {
ADD abstract class CloseNotificationAction : AnA... | <<<<<<< SEARCH
import com.intellij.openapi.wm.IdeFrame
/**
* @author Alexander Lobas
*/
abstract class NotificationAction : AnAction() {
override fun update(e: AnActionEvent) {
val layout = getBalloonLayout(e)
=======
import com.intellij.openapi.wm.IdeFrame
abstract class CloseNotificationAction : AnAction(... |
andschwa/rust-genetic-algorithm | 1e9dc2c02a8aa21195d1e487ec389fc7a7f5a5f9 | src/main.rs | rust | agpl-3.0 | Implement tournament selection to obtain some convergence
| extern crate rand;
use rand::thread_rng;
use rand::distributions::Range;
use individual::Individual;
mod individual;
fn main() {
let mut rng = thread_rng();
let range = Range::new(-512.03_f64, 511.97); // range for Schwefel problem
// initialize population
let mut population: Vec<_> = (0..128).map(|... | extern crate rand;
use rand::{Rng, thread_rng};
use rand::distributions::Range;
use individual::Individual;
mod individual;
fn select<'a, R: Rng>(population: &'a Vec<Individual>, rng: &mut R)
-> &'a Individual {
let population: Vec<_> = (0..4).map(|_| rng.choose(population)).collect();
... | 15 | 5 | 4 | mixed | --- a/src/main.rs
+++ b/src/main.rs
@@ -2,3 +2,3 @@
-use rand::thread_rng;
+use rand::{Rng, thread_rng};
use rand::distributions::Range;
@@ -7,2 +7,11 @@
mod individual;
+
+fn select<'a, R: Rng>(population: &'a Vec<Individual>, rng: &mut R)
+ -> &'a Individual {
+ let population: Vec<_> = (0... | --- a/src/main.rs
+++ b/src/main.rs
@@ ... @@
-use rand::thread_rng;
+use rand::{Rng, thread_rng};
use rand::distributions::Range;
@@ ... @@
mod individual;
+
+fn select<'a, R: Rng>(population: &'a Vec<Individual>, rng: &mut R)
+ -> &'a Individual {
+ let population: Vec<_> = (0..4).map(|_| ... | --- a/src/main.rs
+++ b/src/main.rs
@@ -2,3 +2,3 @@
CON
DEL use rand::thread_rng;
ADD use rand::{Rng, thread_rng};
CON use rand::distributions::Range;
@@ -7,2 +7,11 @@
CON mod individual;
ADD
ADD fn select<'a, R: Rng>(population: &'a Vec<Individual>, rng: &mut R)
ADD -> &'a Individual {
ADD ... | <<<<<<< SEARCH
extern crate rand;
use rand::thread_rng;
use rand::distributions::Range;
use individual::Individual;
mod individual;
fn main() {
=======
extern crate rand;
use rand::{Rng, thread_rng};
use rand::distributions::Range;
use individual::Individual;
mod individual;
fn select<'a, R: Rng>(population: &'a... |
nimbis/django-selenium-testcase | 4076fb322814848d802d1f925d163e90b3d629a9 | selenium_testcase/testcases/forms.py | python | bsd-3-clause | Split get_input from set_input in FormTestMixin.
In order to reduce side-effects, this commit moves the @wait_for to
a get_input method and set_input operates immediately.
| # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from selenium.webdriver.common.by import By
from .utils import wait_for
class FormTestMixin:
# default search element
form_search_list = (
(By.ID, '{}',),
(By.NAME, '{}',),
(By.XPATH, '//form[@action="{}"]',),
(... | 11 | 6 | 2 | mixed | --- a/selenium_testcase/testcases/forms.py
+++ b/selenium_testcase/testcases/forms.py
@@ -17,3 +17,3 @@
(By.XPATH, '//form[@name="{}"]',),
- (By.XPATH, '//form/*',),
+ (By.XPATH, '//form',),
)
@@ -32,7 +32,12 @@
@wait_for
+ def get_input(self, field, **kwargs):
+ """ Return ma... | --- a/selenium_testcase/testcases/forms.py
+++ b/selenium_testcase/testcases/forms.py
@@ ... @@
(By.XPATH, '//form[@name="{}"]',),
- (By.XPATH, '//form/*',),
+ (By.XPATH, '//form',),
)
@@ ... @@
@wait_for
+ def get_input(self, field, **kwargs):
+ """ Return matching input fiel... | --- a/selenium_testcase/testcases/forms.py
+++ b/selenium_testcase/testcases/forms.py
@@ -17,3 +17,3 @@
CON (By.XPATH, '//form[@name="{}"]',),
DEL (By.XPATH, '//form/*',),
ADD (By.XPATH, '//form',),
CON )
@@ -32,7 +32,12 @@
CON @wait_for
ADD def get_input(self, field, **kwargs):
ADD ... | <<<<<<< SEARCH
(By.XPATH, '//form[@action="{}"]',),
(By.XPATH, '//form[@name="{}"]',),
(By.XPATH, '//form/*',),
)
=======
(By.XPATH, '//form[@action="{}"]',),
(By.XPATH, '//form[@name="{}"]',),
(By.XPATH, '//form',),
)
>>>>>>> REPLACE
<<<<<<< SEARCH
@wai... |
damianavila/nikola | 6926ddbb9cdbf05808339412cee5106e581f66cb | tests/import_wordpress_and_build_workflow.py | python | mit | Use the more or less new options for importing
| # -*- coding: utf-8 -*-
"""
Script to test the import workflow.
It will remove an existing Nikola installation and then install from the
package directory.
After that it will do create a new site with the import_wordpress
command and use that newly created site to make a build.
"""
from __future__ import unicode_liter... | # -*- coding: utf-8 -*-
"""
Script to test the import workflow.
It will remove an existing Nikola installation and then install from the
package directory.
After that it will do create a new site with the import_wordpress
command and use that newly created site to make a build.
"""
from __future__ import unicode_liter... | 2 | 1 | 1 | mixed | --- a/tests/import_wordpress_and_build_workflow.py
+++ b/tests/import_wordpress_and_build_workflow.py
@@ -33,3 +33,4 @@
os.system(
- 'nikola import_wordpress -f %s -o %s' % (import_file, import_directory))
+ 'nikola import_wordpress -o {folder} {file}'.format(file=import_file,
+ ... | --- a/tests/import_wordpress_and_build_workflow.py
+++ b/tests/import_wordpress_and_build_workflow.py
@@ ... @@
os.system(
- 'nikola import_wordpress -f %s -o %s' % (import_file, import_directory))
+ 'nikola import_wordpress -o {folder} {file}'.format(file=import_file,
+ ... | --- a/tests/import_wordpress_and_build_workflow.py
+++ b/tests/import_wordpress_and_build_workflow.py
@@ -33,3 +33,4 @@
CON os.system(
DEL 'nikola import_wordpress -f %s -o %s' % (import_file, import_directory))
ADD 'nikola import_wordpress -o {folder} {file}'.format(file=import_file,
ADD ... | <<<<<<< SEARCH
import_file = os.path.join(test_directory, 'wordpress_export_example.xml')
os.system(
'nikola import_wordpress -f %s -o %s' % (import_file, import_directory))
assert os.path.exists(
=======
import_file = os.path.join(test_directory, 'wordpress_export_example.xml')
os.system(... |
micbou/JediHTTP | 78d61ad0897b0a3f3f46c6df285f1a0907a0a910 | jedihttp/handlers.py | python | apache-2.0 | Add more info for completions
| import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | 4 | 1 | 1 | mixed | --- a/jedihttp/handlers.py
+++ b/jedihttp/handlers.py
@@ -30,3 +30,6 @@
'description': completion.description,
- 'docstring': completion.docstring()
+ 'docstring': completion.docstring(),
+ 'module_path': completion.module_path,
+ 'line': completion.line,
+ ... | --- a/jedihttp/handlers.py
+++ b/jedihttp/handlers.py
@@ ... @@
'description': completion.description,
- 'docstring': completion.docstring()
+ 'docstring': completion.docstring(),
+ 'module_path': completion.module_path,
+ 'line': completion.line,
+ 'co... | --- a/jedihttp/handlers.py
+++ b/jedihttp/handlers.py
@@ -30,3 +30,6 @@
CON 'description': completion.description,
DEL 'docstring': completion.docstring()
ADD 'docstring': completion.docstring(),
ADD 'module_path': completion.module_path,
ADD 'line': completi... | <<<<<<< SEARCH
'name': completion.name,
'description': completion.description,
'docstring': completion.docstring()
} for completion in script.completions() ]
} )
=======
'name': completion.name,
'description': completion.description,
... |
RitwikGupta/picoCTF-shell-manager | a05a05f24c29dcf039e02b55c18c476dc69757df | shell_manager/problem_repo.py | python | mit | Update repo entrypoint and remote_update stub.
| """
Problem repository management for the shell manager.
"""
import spur, gzip
from shutil import copy2
from os.path import join
def local_update(repo_path, deb_paths=[]):
"""
Updates a local deb repository by copying debs and running scanpackages.
Args:
repo_path: the path to the local reposito... | """
Problem repository management for the shell manager.
"""
import spur, gzip
from shutil import copy2
from os.path import join
def update_repo(args):
"""
Main entrypoint for repo update operations.
"""
if args.repo_type == "local":
local_update(args.repository, args.package_paths)
else... | 21 | 0 | 1 | add_only | --- a/shell_manager/problem_repo.py
+++ b/shell_manager/problem_repo.py
@@ -8,2 +8,23 @@
from os.path import join
+
+def update_repo(args):
+ """
+ Main entrypoint for repo update operations.
+ """
+
+ if args.repo_type == "local":
+ local_update(args.repository, args.package_paths)
+ else:
+ ... | --- a/shell_manager/problem_repo.py
+++ b/shell_manager/problem_repo.py
@@ ... @@
from os.path import join
+
+def update_repo(args):
+ """
+ Main entrypoint for repo update operations.
+ """
+
+ if args.repo_type == "local":
+ local_update(args.repository, args.package_paths)
+ else:
+ rem... | --- a/shell_manager/problem_repo.py
+++ b/shell_manager/problem_repo.py
@@ -8,2 +8,23 @@
CON from os.path import join
ADD
ADD def update_repo(args):
ADD """
ADD Main entrypoint for repo update operations.
ADD """
ADD
ADD if args.repo_type == "local":
ADD local_update(args.repository, args.pack... | <<<<<<< SEARCH
from shutil import copy2
from os.path import join
def local_update(repo_path, deb_paths=[]):
=======
from shutil import copy2
from os.path import join
def update_repo(args):
"""
Main entrypoint for repo update operations.
"""
if args.repo_type == "local":
local_update(args.rep... |
asomers/mockall | c15bd76f70be575cb4922be6d7b10348d9123ec3 | mockall_examples/src/lib.rs | rust | apache-2.0 | Add a use of mock! in mockall_examples
| // vim: tw=80
//#![deny(missing_docs)]
//! Examples of mock objects and their generated methods.
//!
//! This crate only exists to document the autogenerated methods of the
//! [`Mockall`](https://docs.rs/mockall/latest/mockall)
//! crate. You should never depend on this crate.
//
#[cfg(doc)]
use mockall::*;
/// A ... | // vim: tw=80
#![deny(missing_docs)]
//! Examples of mock objects and their generated methods.
//!
//! This crate only exists to document the autogenerated methods of the
//! [`Mockall`](https://docs.rs/mockall/latest/mockall)
//! crate. You should never depend on this crate.
//
#[cfg(doc)]
use mockall::*;
/// A ba... | 23 | 1 | 2 | mixed | --- a/mockall_examples/src/lib.rs
+++ b/mockall_examples/src/lib.rs
@@ -1,3 +1,3 @@
// vim: tw=80
-//#![deny(missing_docs)]
+#![deny(missing_docs)]
@@ -35,2 +35,24 @@
+/// A trait implemented by a Struct we want to mock
+pub trait Bah {
+ /// Some trait method
+ fn bah(&self);
+}
+
+#[cfg(doc)]
+mock! {
+ ... | --- a/mockall_examples/src/lib.rs
+++ b/mockall_examples/src/lib.rs
@@ ... @@
// vim: tw=80
-//#![deny(missing_docs)]
+#![deny(missing_docs)]
@@ ... @@
+/// A trait implemented by a Struct we want to mock
+pub trait Bah {
+ /// Some trait method
+ fn bah(&self);
+}
+
+#[cfg(doc)]
+mock! {
+ /// structs ca... | --- a/mockall_examples/src/lib.rs
+++ b/mockall_examples/src/lib.rs
@@ -1,3 +1,3 @@
CON // vim: tw=80
DEL //#![deny(missing_docs)]
ADD #![deny(missing_docs)]
CON
@@ -35,2 +35,24 @@
CON
ADD /// A trait implemented by a Struct we want to mock
ADD pub trait Bah {
ADD /// Some trait method
ADD fn bah(&self);
ADD ... | <<<<<<< SEARCH
// vim: tw=80
//#![deny(missing_docs)]
//! Examples of mock objects and their generated methods.
=======
// vim: tw=80
#![deny(missing_docs)]
//! Examples of mock objects and their generated methods.
>>>>>>> REPLACE
<<<<<<< SEARCH
}
#[cfg(doc)]
#[automock(mod mock_ffi;)]
=======
}
/// A trait imp... |
facebook/fbthrift | 31d7b90e30de5f90891e4a845f6704e4c13748df | thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs | rust | apache-2.0 | Update autocargo component on FBS:master
Summary:
Automated component version update
Bump Schedule: https://www.internalfb.com/intern/msdk/bump/?schedule_fbid=342556550408072
Package: https://www.internalfb.com/intern/msdk/package/125803836415945/
Oncall Team: rust_foundation
NOTE: This build is expected to expire at ... | // @generated by autocargo
use std::env;
use std::fs;
use std::path::Path;
use thrift_compiler::Config;
#[rustfmt::skip]
fn main() {
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env not provided");
let out_dir: &Path = out_dir.as_ref();
fs::write(
out_dir.join("cratemap"),
"test_th... | // @generated by autocargo
use std::env;
use std::fs;
use std::path::Path;
use thrift_compiler::Config;
#[rustfmt::skip]
fn main() {
// Rerun if this gets rewritten.
println!("cargo:rerun-if-changed=thrift_build.rs");
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env not provided");
let out_di... | 3 | 0 | 1 | add_only | --- a/thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
+++ b/thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
@@ -9,2 +9,5 @@
fn main() {
+ // Rerun if this gets rewritten.
+ println!("cargo:rerun-if-changed=thrift_build.rs");
+
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env no... | --- a/thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
+++ b/thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
@@ ... @@
fn main() {
+ // Rerun if this gets rewritten.
+ println!("cargo:rerun-if-changed=thrift_build.rs");
+
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env not prov... | --- a/thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
+++ b/thrift/lib/rust/src/dep_tests/cargo_thrift/thrift_build.rs
@@ -9,2 +9,5 @@
CON fn main() {
ADD // Rerun if this gets rewritten.
ADD println!("cargo:rerun-if-changed=thrift_build.rs");
ADD
CON let out_dir = env::var_os("OUT_DIR").expect(... | <<<<<<< SEARCH
#[rustfmt::skip]
fn main() {
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env not provided");
let out_dir: &Path = out_dir.as_ref();
=======
#[rustfmt::skip]
fn main() {
// Rerun if this gets rewritten.
println!("cargo:rerun-if-changed=thrift_build.rs");
let out_dir = env::v... |
otovo/python-netsgiro | 43a8a83014c2d77b37615f28e695fa861350d0bf | setup.py | python | apache-2.0 | Add attrs and typing to deps
| import re
from setuptools import find_packages, setup
with open('netsgiro/__init__.py') as fh:
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
with open('README.rst') as fh:
long_description = fh.read()
setup(
name='netsgiro',
version=metadata['version'],
description='File ... | import re
from setuptools import find_packages, setup
with open('netsgiro/__init__.py') as fh:
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
with open('README.rst') as fh:
long_description = fh.read()
setup(
name='netsgiro',
version=metadata['version'],
description='File ... | 2 | 0 | 1 | add_only | --- a/setup.py
+++ b/setup.py
@@ -33,2 +33,4 @@
install_requires=[
+ 'attrs',
+ 'typing', # Needed for Python 3.4
], | --- a/setup.py
+++ b/setup.py
@@ ... @@
install_requires=[
+ 'attrs',
+ 'typing', # Needed for Python 3.4
],
| --- a/setup.py
+++ b/setup.py
@@ -33,2 +33,4 @@
CON install_requires=[
ADD 'attrs',
ADD 'typing', # Needed for Python 3.4
CON ],
| <<<<<<< SEARCH
packages=find_packages(exclude=['tests', 'tests.*']),
install_requires=[
],
extras_require={
=======
packages=find_packages(exclude=['tests', 'tests.*']),
install_requires=[
'attrs',
'typing', # Needed for Python 3.4
],
extras_require={
>>>>>>> REPLACE
|
AleksanderMielczarek/Napkin | 5cd4f1e2df23137d7eb9bf42e94a981d17f82678 | napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java | java | apache-2.0 | Allow to retrieve component from View
| package com.github.aleksandermielczarek.napkin;
import android.content.Context;
import android.support.v4.app.Fragment;
/**
* Created by Aleksander Mielczarek on 14.05.2016.
*/
public class Napkin {
private Napkin() {
}
public static <T> T provideComponent(Object object) {
ComponentProvider<T... | package com.github.aleksandermielczarek.napkin;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.view.View;
/**
* Created by Aleksander Mielczarek on 14.05.2016.
*/
public class Napkin {
private Napkin() {
}
@SuppressWarnings("unchecked")
public static <T> T ... | 13 | 2 | 4 | mixed | --- a/napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
+++ b/napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
@@ -4,2 +4,3 @@
import android.support.v4.app.Fragment;
+import android.view.View;
@@ -14,2 +15,3 @@
+ @SuppressWarnings("unchecked")
public static <T>... | --- a/napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
+++ b/napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
@@ ... @@
import android.support.v4.app.Fragment;
+import android.view.View;
@@ ... @@
+ @SuppressWarnings("unchecked")
public static <T> T provideComp... | --- a/napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
+++ b/napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
@@ -4,2 +4,3 @@
CON import android.support.v4.app.Fragment;
ADD import android.view.View;
CON
@@ -14,2 +15,3 @@
CON
ADD @SuppressWarnings("unchecked")
CON ... | <<<<<<< SEARCH
import android.content.Context;
import android.support.v4.app.Fragment;
/**
=======
import android.content.Context;
import android.support.v4.app.Fragment;
import android.view.View;
/**
>>>>>>> REPLACE
<<<<<<< SEARCH
}
public static <T> T provideComponent(Object object) {
ComponentP... |
adamcharnock/django-su | 9c037ed3ebe7353b419562311bbc1f07875ab358 | django_su/forms.py | python | mit | Update UserSuForm to enhance compatibility with custom user models.
In custom user models, we cannot rely on there being a 'username'
field. Instead, we should use whichever field has been specified as
the username field.
| # -*- coding: utf-8 -*-
from django import forms
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from . import get_user_model
class UserSuForm(forms.Form):
user = forms.ModelChoiceField(
label=_('Users'), queryset=get_user_model()._default_manager.order_by(
... | # -*- coding: utf-8 -*-
from django import forms
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from . import get_user_model
class UserSuForm(forms.Form):
username_field = get_user_model().USERNAME_FIELD
user = forms.ModelChoiceField(
label=_('Users'), que... | 3 | 1 | 1 | mixed | --- a/django_su/forms.py
+++ b/django_su/forms.py
@@ -11,5 +11,7 @@
+ username_field = get_user_model().USERNAME_FIELD
+
user = forms.ModelChoiceField(
label=_('Users'), queryset=get_user_model()._default_manager.order_by(
- 'username'), required=True) # pylint: disable=W0212
+ ... | --- a/django_su/forms.py
+++ b/django_su/forms.py
@@ ... @@
+ username_field = get_user_model().USERNAME_FIELD
+
user = forms.ModelChoiceField(
label=_('Users'), queryset=get_user_model()._default_manager.order_by(
- 'username'), required=True) # pylint: disable=W0212
+ usernam... | --- a/django_su/forms.py
+++ b/django_su/forms.py
@@ -11,5 +11,7 @@
CON
ADD username_field = get_user_model().USERNAME_FIELD
ADD
CON user = forms.ModelChoiceField(
CON label=_('Users'), queryset=get_user_model()._default_manager.order_by(
DEL 'username'), required=True) # pylint: disable=... | <<<<<<< SEARCH
class UserSuForm(forms.Form):
user = forms.ModelChoiceField(
label=_('Users'), queryset=get_user_model()._default_manager.order_by(
'username'), required=True) # pylint: disable=W0212
use_ajax_select = False
=======
class UserSuForm(forms.Form):
username_field = get_u... |
AugustinLF/react-training | 473d6d6e29d56f8ac54832240479558b2114ea1b | src/corrections/mainPracticeCorrection/components/dataFetcher.js | javascript | mit | Replace useState by useReducer in DataFetcher
| import * as React from 'react';
import PropTypes from 'prop-types';
const DataFetcher = ({children, getData, parameters}) => {
const [isLoading, setIsLoading] = React.useState(true);
const [data, setData] = React.useState(null);
const fetchData = parameters => {
if (parameters === null) return;
... | import * as React from 'react';
import PropTypes from 'prop-types';
const DataFetcher = ({children, getData, parameters}) => {
const [state, dispatch] = React.useReducer(
(state, action) => {
switch (action.type) {
case 'FETCH_DATA':
return {
... | 28 | 6 | 3 | mixed | --- a/src/corrections/mainPracticeCorrection/components/dataFetcher.js
+++ b/src/corrections/mainPracticeCorrection/components/dataFetcher.js
@@ -4,4 +4,24 @@
const DataFetcher = ({children, getData, parameters}) => {
- const [isLoading, setIsLoading] = React.useState(true);
- const [data, setData] = React.useSt... | --- a/src/corrections/mainPracticeCorrection/components/dataFetcher.js
+++ b/src/corrections/mainPracticeCorrection/components/dataFetcher.js
@@ ... @@
const DataFetcher = ({children, getData, parameters}) => {
- const [isLoading, setIsLoading] = React.useState(true);
- const [data, setData] = React.useState(nul... | --- a/src/corrections/mainPracticeCorrection/components/dataFetcher.js
+++ b/src/corrections/mainPracticeCorrection/components/dataFetcher.js
@@ -4,4 +4,24 @@
CON const DataFetcher = ({children, getData, parameters}) => {
DEL const [isLoading, setIsLoading] = React.useState(true);
DEL const [data, setData] = Re... | <<<<<<< SEARCH
const DataFetcher = ({children, getData, parameters}) => {
const [isLoading, setIsLoading] = React.useState(true);
const [data, setData] = React.useState(null);
const fetchData = parameters => {
if (parameters === null) return;
setIsLoading(true);
getData(parameters)... |
toomasr/sgf4j-gui | cc8a30b5422fbc9d0db438ef9bc497686577bdc8 | src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java | java | apache-2.0 | Use new icons in the tree
| package com.toomasr.sgf4j.filetree;
import java.io.File;
import javafx.scene.control.TreeCell;
public class FileFormatCell extends TreeCell<File> {
public FileFormatCell() {
super();
}
protected void updateItem(File item, boolean empty) {
super.updateItem(item, empty);
if (empty || item == null) {... | package com.toomasr.sgf4j.filetree;
import java.io.File;
import com.toomasr.sgf4j.metasystem.MetaSystem;
import com.toomasr.sgf4j.metasystem.ProblemStatus;
import javafx.scene.control.TreeCell;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
public class FileFormatCell extends TreeCell<File> {... | 37 | 7 | 3 | mixed | --- a/src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java
+++ b/src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java
@@ -4,5 +4,14 @@
+import com.toomasr.sgf4j.metasystem.MetaSystem;
+import com.toomasr.sgf4j.metasystem.ProblemStatus;
+
import javafx.scene.control.TreeCell;
+import javafx.scene.imag... | --- a/src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java
+++ b/src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java
@@ ... @@
+import com.toomasr.sgf4j.metasystem.MetaSystem;
+import com.toomasr.sgf4j.metasystem.ProblemStatus;
+
import javafx.scene.control.TreeCell;
+import javafx.scene.image.Image... | --- a/src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java
+++ b/src/main/java/com/toomasr/sgf4j/filetree/FileFormatCell.java
@@ -4,5 +4,14 @@
CON
ADD import com.toomasr.sgf4j.metasystem.MetaSystem;
ADD import com.toomasr.sgf4j.metasystem.ProblemStatus;
ADD
CON import javafx.scene.control.TreeCell;
ADD import... | <<<<<<< SEARCH
import java.io.File;
import javafx.scene.control.TreeCell;
public class FileFormatCell extends TreeCell<File> {
public FileFormatCell() {
super();
}
protected void updateItem(File item, boolean empty) {
super.updateItem(item, empty);
if (empty || item == null) {
setText(null);
... |
gradle/gradle | fde3eca847096c8255d0a582fa662285c9ef231b | subprojects/files/files.gradle.kts | kotlin | apache-2.0 | Remove redundant declaration of testFixturesImplementation
| /*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | /*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 0 | 2 | 1 | del_only | --- a/subprojects/files/files.gradle.kts
+++ b/subprojects/files/files.gradle.kts
@@ -38,4 +38,2 @@
testImplementation(project(":internalTesting"))
-
- val testFixturesImplementation by configurations
testFixturesImplementation(project(":internalTesting")) | --- a/subprojects/files/files.gradle.kts
+++ b/subprojects/files/files.gradle.kts
@@ ... @@
testImplementation(project(":internalTesting"))
-
- val testFixturesImplementation by configurations
testFixturesImplementation(project(":internalTesting"))
| --- a/subprojects/files/files.gradle.kts
+++ b/subprojects/files/files.gradle.kts
@@ -38,4 +38,2 @@
CON testImplementation(project(":internalTesting"))
DEL
DEL val testFixturesImplementation by configurations
CON testFixturesImplementation(project(":internalTesting"))
| <<<<<<< SEARCH
testImplementation(project(":internalTesting"))
val testFixturesImplementation by configurations
testFixturesImplementation(project(":internalTesting"))
}
=======
testImplementation(project(":internalTesting"))
testFixturesImplementation(project(":internalTesting"))
}
>>>>>>> REP... |
opengeogroep/safetymaps-server | 40815bdf4e41cc035fe8eb915ef2fa2126b25935 | src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java | java | agpl-3.0 | Add returnTo param to normal login request
| package nl.opengeogroep.safetymaps.server.stripes;
import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.StreamingResolution;
import net.sourceforge.stripes.action.UrlBinding;
/... | package nl.opengeogroep.safetymaps.server.stripes;
import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.StreamingResolution;
import net.sourceforge.stripes.action.UrlBinding;
/... | 7 | 1 | 1 | mixed | --- a/src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java
+++ b/src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java
@@ -27,5 +27,11 @@
public Resolution redirect() {
+ String returnTo = request.getParameter("returnTo");
+
+ if (returnTo == null || ret... | --- a/src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java
+++ b/src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java
@@ ... @@
public Resolution redirect() {
+ String returnTo = request.getParameter("returnTo");
+
+ if (returnTo == null || returnTo.len... | --- a/src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java
+++ b/src/main/java/nl/opengeogroep/safetymaps/server/stripes/LoginActionBean.java
@@ -27,5 +27,11 @@
CON public Resolution redirect() {
ADD String returnTo = request.getParameter("returnTo");
ADD
ADD if (returnTo ==... | <<<<<<< SEARCH
public Resolution redirect() {
return new StreamingResolution("text/html",
"<html><head>" +
"<meta http-equiv=\"refresh\" content=\"0;url=" + context.getRequest().getContextPath() + "/viewer/\">" +
"</head></html>"
);
=======
public Resol... |
SICU-Stress-Measurement-System/frontend-java | a5414380529705ae19e5332fa9fd32ede3290910 | src/main/java/edu/cwru/sicu_sms/Main.java | java | apache-2.0 | Revise flow of 'start' method
| /* *\
** SICU Stress Measurement System **
** Project P04 | C380 Team A **
** EBME 380: Biomedical Engineering Design Experience **
** ... | /* *\
** SICU Stress Measurement System **
** Project P04 | C380 Team A **
** EBME 380: Biomedical Engineering Design Experience **
** ... | 6 | 7 | 2 | mixed | --- a/src/main/java/edu/cwru/sicu_sms/Main.java
+++ b/src/main/java/edu/cwru/sicu_sms/Main.java
@@ -12,3 +12,2 @@
import javafx.fxml.FXMLLoader;
-import javafx.scene.Parent;
import javafx.scene.Scene;
@@ -28,9 +27,9 @@
public void start(Stage primaryStage) throws Exception {
- Parent root = FXMLLoader.loa... | --- a/src/main/java/edu/cwru/sicu_sms/Main.java
+++ b/src/main/java/edu/cwru/sicu_sms/Main.java
@@ ... @@
import javafx.fxml.FXMLLoader;
-import javafx.scene.Parent;
import javafx.scene.Scene;
@@ ... @@
public void start(Stage primaryStage) throws Exception {
- Parent root = FXMLLoader.load(
- ... | --- a/src/main/java/edu/cwru/sicu_sms/Main.java
+++ b/src/main/java/edu/cwru/sicu_sms/Main.java
@@ -12,3 +12,2 @@
CON import javafx.fxml.FXMLLoader;
DEL import javafx.scene.Parent;
CON import javafx.scene.Scene;
@@ -28,9 +27,9 @@
CON public void start(Stage primaryStage) throws Exception {
DEL Parent root =... | <<<<<<< SEARCH
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
=======
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
>>>>>>>... |
burtonageo/pascal_string | 12fb91bafee024b3775c11eaa39cf348c4d7db11 | src/utf8/mod.rs | rust | mit | Add some tests for utf8 string
| #![allow(missing_docs, unused_variables)]
mod pascal_str;
mod pascal_string;
pub use self::pascal_str::{Chars, Bytes, Lines, PascalStr};
pub use self::pascal_string::PascalString;
#[cfg(test)]
mod tests {
}
| #![allow(missing_docs, unused_variables)]
mod pascal_str;
mod pascal_string;
pub use self::pascal_str::{Chars, Bytes, Lines, PascalStr};
pub use self::pascal_string::PascalString;
#[cfg(test)]
mod tests {
use super::*;
use std::borrow::Cow;
use std::ffi::{CStr, CString};
use std::iter::IntoIterator;
... | 33 | 0 | 1 | add_only | --- a/src/utf8/mod.rs
+++ b/src/utf8/mod.rs
@@ -10,2 +10,35 @@
mod tests {
+ use super::*;
+ use std::borrow::Cow;
+ use std::ffi::{CStr, CString};
+ use std::iter::IntoIterator;
+
+ /*
+ #[test]
+ fn test_string_creation() {
+ let test = "Hello, my world!".to_owned();
+ let test_pas... | --- a/src/utf8/mod.rs
+++ b/src/utf8/mod.rs
@@ ... @@
mod tests {
+ use super::*;
+ use std::borrow::Cow;
+ use std::ffi::{CStr, CString};
+ use std::iter::IntoIterator;
+
+ /*
+ #[test]
+ fn test_string_creation() {
+ let test = "Hello, my world!".to_owned();
+ let test_pascal = Pas... | --- a/src/utf8/mod.rs
+++ b/src/utf8/mod.rs
@@ -10,2 +10,35 @@
CON mod tests {
ADD use super::*;
ADD use std::borrow::Cow;
ADD use std::ffi::{CStr, CString};
ADD use std::iter::IntoIterator;
ADD
ADD /*
ADD #[test]
ADD fn test_string_creation() {
ADD let test = "Hello, my world!".to_... | <<<<<<< SEARCH
#[cfg(test)]
mod tests {
}
=======
#[cfg(test)]
mod tests {
use super::*;
use std::borrow::Cow;
use std::ffi::{CStr, CString};
use std::iter::IntoIterator;
/*
#[test]
fn test_string_creation() {
let test = "Hello, my world!".to_owned();
let test_pascal = Pasc... |
netroby/gerrit | 9e8343c1350d8cfd1e1b46ff327d55958fd2eafa | gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java | java | apache-2.0 | Fix @see to external class in api to allow compilation with Java 8
The recently added GarbageCollectorListener came with a @see to a JGit
class. While Java 7 did not error out on that, Java 8 does:
[...]/events/GarbageCollectorListener.java:34: error: reference not found
* @see org.eclipse.jgit.api.GarbageColl... | // Copyright (C) 2014 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | // Copyright (C) 2014 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 1 | 1 | mixed | --- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java
@@ -33,3 +33,3 @@
*
- * @see org.eclipse.jgit.api.GarbageCollectCommand#call()
+ * @see <a h... | --- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java
@@ ... @@
*
- * @see org.eclipse.jgit.api.GarbageCollectCommand#call()
+ * @see <a href="htt... | --- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/events/GarbageCollectorListener.java
@@ -33,3 +33,3 @@
CON *
DEL * @see org.eclipse.jgit.api.GarbageCollectCommand#call()
ADD * ... | <<<<<<< SEARCH
* JGit
*
* @see org.eclipse.jgit.api.GarbageCollectCommand#call()
*/
Properties getStatistics();
=======
* JGit
*
* @see <a href="http://download.eclipse.org/jgit/site/3.7.0.201502260915-r/apidocs/org/eclipse/jgit/api/GarbageCollectCommand.html#call%28%29">GarbageC... |
celery/cell | a24c657ca84e553a39e23d201d605d84d828c322 | examples/hello.py | python | bsd-3-clause | Use the Server class (an Actor derived class)
| from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who... | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who
... | 3 | 27 | 2 | mixed | --- a/examples/hello.py
+++ b/examples/hello.py
@@ -13,3 +13,2 @@
class state:
-
def greet(self, who='world'):
@@ -17,33 +16,10 @@
greeting = GreetingActor(connection)
+
-class Printer(Actor):
- default_routing_key = 'Printer'
-
- class state:
- def echo(self, msg = 'test'):
... | --- a/examples/hello.py
+++ b/examples/hello.py
@@ ... @@
class state:
-
def greet(self, who='world'):
@@ ... @@
greeting = GreetingActor(connection)
+
-class Printer(Actor):
- default_routing_key = 'Printer'
-
- class state:
- def echo(self, msg = 'test'):
- print... | --- a/examples/hello.py
+++ b/examples/hello.py
@@ -13,3 +13,2 @@
CON class state:
DEL
CON def greet(self, who='world'):
@@ -17,33 +16,10 @@
CON greeting = GreetingActor(connection)
ADD
CON
CON
DEL class Printer(Actor):
DEL default_routing_key = 'Printer'
DEL
DEL class state:
DEL ... | <<<<<<< SEARCH
class state:
def greet(self, who='world'):
return 'Hello %s' % who
greeting = GreetingActor(connection)
class Printer(Actor):
default_routing_key = 'Printer'
class state:
def echo(self, msg = 'test'):
print 'I am a printer:',msg
... |
mayfield/ecmcli | 9d58310b2106e3ed5fc140a8479e003a4a647e82 | setup.py | python | mit | Fix shellish requirement bump rev to 2.3.1
| #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | 2 | 2 | 2 | mixed | --- a/setup.py
+++ b/setup.py
@@ -18,3 +18,3 @@
name='ecmcli',
- version='2.3.0',
+ version='2.3.1',
description='Command Line Interface for Cradlepoint ECM',
@@ -28,3 +28,3 @@
'syndicate==1.2.0',
- 'shellish>=0.5.9',
+ 'shellish>=0.6.0',
'humanize' | --- a/setup.py
+++ b/setup.py
@@ ... @@
name='ecmcli',
- version='2.3.0',
+ version='2.3.1',
description='Command Line Interface for Cradlepoint ECM',
@@ ... @@
'syndicate==1.2.0',
- 'shellish>=0.5.9',
+ 'shellish>=0.6.0',
'humanize'
| --- a/setup.py
+++ b/setup.py
@@ -18,3 +18,3 @@
CON name='ecmcli',
DEL version='2.3.0',
ADD version='2.3.1',
CON description='Command Line Interface for Cradlepoint ECM',
@@ -28,3 +28,3 @@
CON 'syndicate==1.2.0',
DEL 'shellish>=0.5.9',
ADD 'shellish>=0.6.0',
CON 'humanize... | <<<<<<< SEARCH
setup(
name='ecmcli',
version='2.3.0',
description='Command Line Interface for Cradlepoint ECM',
author='Justin Mayfield',
=======
setup(
name='ecmcli',
version='2.3.1',
description='Command Line Interface for Cradlepoint ECM',
author='Justin Mayfield',
>>>>>>> REPLACE
... |
dariost/dazzle | df317912a09681742964f66bd6b92b505f0a2207 | src/chasher.rs | rust | mpl-2.0 | Make the player id at most 31 bit
| /*
* 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 2017 - Dario Ostuni <dario.ostuni@gmail.com>
*
*/
use common::PlayerInfo;
use std::default::Defa... | /*
* 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 2017 - Dario Ostuni <dario.ostuni@gmail.com>
*
*/
use common::PlayerInfo;
use std::default::Defa... | 1 | 1 | 1 | mixed | --- a/src/chasher.rs
+++ b/src/chasher.rs
@@ -41,3 +41,3 @@
{
- self.internal.finish() >> 32
+ self.internal.finish() >> 33
} | --- a/src/chasher.rs
+++ b/src/chasher.rs
@@ ... @@
{
- self.internal.finish() >> 32
+ self.internal.finish() >> 33
}
| --- a/src/chasher.rs
+++ b/src/chasher.rs
@@ -41,3 +41,3 @@
CON {
DEL self.internal.finish() >> 32
ADD self.internal.finish() >> 33
CON }
| <<<<<<< SEARCH
pub fn finalize(self) -> u64
{
self.internal.finish() >> 32
}
}
=======
pub fn finalize(self) -> u64
{
self.internal.finish() >> 33
}
}
>>>>>>> REPLACE
|
AyaNakazawa/business_card_bank | 64d64599eada4d1831f31cf22b3cb6293736106a | js/myapp/login.js | javascript | mit | Add some template selectorin LoginModel
|
// ----------------------------------------------------------------
// Login Class
class LoginModel extends SwitchModel {
constructor({
name,
lsKeyView,
triggerSelector,
switchSelector
} = {}) {
super({
name: name,
lsKeyView: lsKeyView,
triggerSelector: triggerSelector,
... |
// ----------------------------------------------------------------
// Login Class
class LoginModel extends SwitchModel {
constructor({
name,
lsKeyView,
triggerSelector,
switchSelector
} = {}) {
super({
name: name,
lsKeyView: lsKeyView,
triggerSelector: triggerSelector,
... | 7 | 0 | 1 | add_only | --- a/js/myapp/login.js
+++ b/js/myapp/login.js
@@ -17,2 +17,9 @@
});
+
+ this.LOGIN_AREA_SELECTOR = '#login-area';
+ this.$LOGIN_AREA_SELECTOR = $(this.LOGIN_AREA_SELECTOR);
+ this.TEMPLATE_LOGINED_SELECTOR = '#logined-template';
+ this.$TEMPLATE_LOGINED_SELECTOR = $(this.TEMPLATE_LOGINED_SELECTOR... | --- a/js/myapp/login.js
+++ b/js/myapp/login.js
@@ ... @@
});
+
+ this.LOGIN_AREA_SELECTOR = '#login-area';
+ this.$LOGIN_AREA_SELECTOR = $(this.LOGIN_AREA_SELECTOR);
+ this.TEMPLATE_LOGINED_SELECTOR = '#logined-template';
+ this.$TEMPLATE_LOGINED_SELECTOR = $(this.TEMPLATE_LOGINED_SELECTOR);
+ ... | --- a/js/myapp/login.js
+++ b/js/myapp/login.js
@@ -17,2 +17,9 @@
CON });
ADD
ADD this.LOGIN_AREA_SELECTOR = '#login-area';
ADD this.$LOGIN_AREA_SELECTOR = $(this.LOGIN_AREA_SELECTOR);
ADD this.TEMPLATE_LOGINED_SELECTOR = '#logined-template';
ADD this.$TEMPLATE_LOGINED_SELECTOR = $(this.TEMPLAT... | <<<<<<< SEARCH
switchSelector: switchSelector
});
}
}
=======
switchSelector: switchSelector
});
this.LOGIN_AREA_SELECTOR = '#login-area';
this.$LOGIN_AREA_SELECTOR = $(this.LOGIN_AREA_SELECTOR);
this.TEMPLATE_LOGINED_SELECTOR = '#logined-template';
this.$TEMPLATE_LOGINED_SEL... |
AlexandreCollet/mewpipe_webapp | 83f970f78d1678608ae450caf65466f9c21b745e | app/app.config.js | javascript | mit | Move register on /user/ url
| angular.module('mewpipe')
.config(function(toastrConfig,$resourceProvider,$authProvider,$httpProvider,Config){
/**
* Toastr
*/
angular.extend(toastrConfig, {
positionClass : 'toast-bottom-right',
closeButton : true,
});
/**
* Resource Provider
*... | angular.module('mewpipe')
.config(function(toastrConfig,$resourceProvider,$authProvider,$httpProvider,Config){
/**
* Toastr
*/
angular.extend(toastrConfig, {
positionClass : 'toast-bottom-right',
closeButton : true,
});
/**
* Resource Provider
*... | 3 | 1 | 2 | mixed | --- a/app/app.config.js
+++ b/app/app.config.js
@@ -29,2 +29,4 @@
+ $authProvider.loginOnSignup = false;
+
$authProvider.baseUrl = Config.server.url + ':' + Config.server.port + '/api';
@@ -32,3 +34,3 @@
$authProvider.loginUrl = '/login/';
- $authProvider.signupUrl = '/register/';
+ ... | --- a/app/app.config.js
+++ b/app/app.config.js
@@ ... @@
+ $authProvider.loginOnSignup = false;
+
$authProvider.baseUrl = Config.server.url + ':' + Config.server.port + '/api';
@@ ... @@
$authProvider.loginUrl = '/login/';
- $authProvider.signupUrl = '/register/';
+ $authProvider.si... | --- a/app/app.config.js
+++ b/app/app.config.js
@@ -29,2 +29,4 @@
CON
ADD $authProvider.loginOnSignup = false;
ADD
CON $authProvider.baseUrl = Config.server.url + ':' + Config.server.port + '/api';
@@ -32,3 +34,3 @@
CON $authProvider.loginUrl = '/login/';
DEL $authProvider.signupUrl = ... | <<<<<<< SEARCH
*/
$authProvider.baseUrl = Config.server.url + ':' + Config.server.port + '/api';
$authProvider.loginUrl = '/login/';
$authProvider.signupUrl = '/register/';
$authProvider.loginRoute = '/login';
$authProvider.signupRoute = '/register';
=======
*/
... |
futabooo/conference-app-2017 | 1749fe077f151e6d2923f56a0797e1ba5c7efe68 | app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt | kotlin | apache-2.0 | Add succeed and fail tests
| package io.github.droidkaigi.confsched2017.util
import org.junit.Assert.fail
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import java.lang.reflect.InvocationTargetException
@RunWith(RobolectricTestRunner::class)
class AssetsUtilTest {
@Test
@Throws(Excepti... | package io.github.droidkaigi.confsched2017.util
import com.google.firebase.FirebaseApp
import com.taroid.knit.should
import org.junit.Assert.fail
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import java.lang.reflect.Invocat... | 24 | 0 | 3 | add_only | --- a/app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt
+++ b/app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt
@@ -2,2 +2,4 @@
+import com.google.firebase.FirebaseApp
+import com.taroid.knit.should
import org.junit.Assert.fail
@@ -6,2 +8,3 @@
import org.robolectr... | --- a/app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt
+++ b/app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt
@@ ... @@
+import com.google.firebase.FirebaseApp
+import com.taroid.knit.should
import org.junit.Assert.fail
@@ ... @@
import org.robolectric.Robolectr... | --- a/app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt
+++ b/app/src/test/java/io/github/droidkaigi/confsched2017/util/AssetsUtilTest.kt
@@ -2,2 +2,4 @@
CON
ADD import com.google.firebase.FirebaseApp
ADD import com.taroid.knit.should
CON import org.junit.Assert.fail
@@ -6,2 +8,3 @@
CON impor... | <<<<<<< SEARCH
package io.github.droidkaigi.confsched2017.util
import org.junit.Assert.fail
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import java.lang.reflect.InvocationTargetException
=======
package io.github.droidkaigi.confsched2017.util
import com.google.... |
cloudtools/troposphere | ef72be28dc83ff2c73335c6eb13135cab8affe53 | troposphere/sso.py | python | bsd-2-clause | Update SSO per 2020-12-18 changes
| # Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 18.6.0
from . import AWSObject
from troposphere import Tags
class Assignment(AWSObject):
resource_type = "AW... | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 25.0.0
from . import AWSObject
from . import AWSProperty
from troposphere import Tags
class Assignment(AWSObject... | 33 | 3 | 5 | mixed | --- a/troposphere/sso.py
+++ b/troposphere/sso.py
@@ -1,2 +1,2 @@
-# Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
+# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
@@ -6,3 +6,3 @@
# *** Do not modify - this file is autogenerated ***
-# Resource specification version: 18.6.0
+# Resourc... | --- a/troposphere/sso.py
+++ b/troposphere/sso.py
@@ ... @@
-# Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
+# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
@@ ... @@
# *** Do not modify - this file is autogenerated ***
-# Resource specification version: 18.6.0
+# Resource specificat... | --- a/troposphere/sso.py
+++ b/troposphere/sso.py
@@ -1,2 +1,2 @@
DEL # Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
ADD # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
CON # All rights reserved.
@@ -6,3 +6,3 @@
CON # *** Do not modify - this file is autogenerated ***
DEL # Resource specification version: 18... | <<<<<<< SEARCH
# Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 18.6.0
from . import AWSObject
from troposphere import Tags
=======
# Copyright (c) 2012-2021, Ma... |
rajatchhajed/myrrix-recommender | e642ed4da2bb168608ff8602abbfa95bbed83c5e | client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java | java | apache-2.0 | Add a few more changes to be consistent with GenericRecommendedItem, like toString() | /*
* Copyright Myrrix Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... | /*
* Copyright Myrrix Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... | 35 | 1 | 3 | mixed | --- a/client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java
+++ b/client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java
@@ -18,3 +18,13 @@
-public final class GenericTranslatedRecommendedItem implements TranslatedRecommendedItem {
+import java.io.Serializable;
+
+impo... | --- a/client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java
+++ b/client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java
@@ ... @@
-public final class GenericTranslatedRecommendedItem implements TranslatedRecommendedItem {
+import java.io.Serializable;
+
+import com.go... | --- a/client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java
+++ b/client/src/net/myrrix/client/translating/GenericTranslatedRecommendedItem.java
@@ -18,3 +18,13 @@
CON
DEL public final class GenericTranslatedRecommendedItem implements TranslatedRecommendedItem {
ADD import java.io.Serializable... | <<<<<<< SEARCH
package net.myrrix.client.translating;
public final class GenericTranslatedRecommendedItem implements TranslatedRecommendedItem {
private final String itemID;
private final float value;
public GenericTranslatedRecommendedItem(String itemID, float value) {
this.itemID = itemID;
this.value... |
pushpad/pushpad-java | b2ef13d010d9bc3f50c6c2f2c580433814fbb702 | src/xyz/pushpad/Pushpad.java | java | mit | Use hex-encoding for HMAC-SHA1 signature
As described in the documentation ( https://pushpad.xyz/docs/identifying_users ), the signature should be hex-encoded. Base64-encoded signatures get rejected. | package xyz.pushpad;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.Mac;
import java.security.SignatureException;
import java.security.NoSuchAlgorithmException;
import java.security.InvalidKeyException;
import java.util.Base64;
public class Pushpad {
public String authToken;
public String projectId;
... | package xyz.pushpad;
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.Mac;
import java.security.SignatureException;
import java.security.NoSuchAlgorithmException;
import java.security.InvalidKeyException;
import javax.xml.bind.DatatypeConverter;
public class Pushpad {
public String authToken;
public St... | 2 | 2 | 2 | mixed | --- a/src/xyz/pushpad/Pushpad.java
+++ b/src/xyz/pushpad/Pushpad.java
@@ -7,3 +7,3 @@
import java.security.InvalidKeyException;
-import java.util.Base64;
+import javax.xml.bind.DatatypeConverter;
@@ -25,3 +25,3 @@
byte[] rawHmac = mac.doFinal(data.getBytes());
- encoded = Base64.getEncoder().withoutPaddi... | --- a/src/xyz/pushpad/Pushpad.java
+++ b/src/xyz/pushpad/Pushpad.java
@@ ... @@
import java.security.InvalidKeyException;
-import java.util.Base64;
+import javax.xml.bind.DatatypeConverter;
@@ ... @@
byte[] rawHmac = mac.doFinal(data.getBytes());
- encoded = Base64.getEncoder().withoutPadding().encodeToS... | --- a/src/xyz/pushpad/Pushpad.java
+++ b/src/xyz/pushpad/Pushpad.java
@@ -7,3 +7,3 @@
CON import java.security.InvalidKeyException;
DEL import java.util.Base64;
ADD import javax.xml.bind.DatatypeConverter;
CON
@@ -25,3 +25,3 @@
CON byte[] rawHmac = mac.doFinal(data.getBytes());
DEL encoded = Base64.getEnco... | <<<<<<< SEARCH
import java.security.NoSuchAlgorithmException;
import java.security.InvalidKeyException;
import java.util.Base64;
public class Pushpad {
=======
import java.security.NoSuchAlgorithmException;
import java.security.InvalidKeyException;
import javax.xml.bind.DatatypeConverter;
public class Pushpad {
>>>... |
sejalkhatri/WikiEduDashboard | 7df79d0ea629e8610e3b2ba7b74acdc06305f805 | test/testHelper.js | javascript | mit | Work around gulp error during i18n asset rebuilding
The test file requires built assets, so linting fails with an unresolved require while the i18n assets are being built.
| const jsdom = require('jsdom');
global.document = jsdom.jsdom("<!doctype html><html><body><div data-current_user='{ \"admin\": false, \"id\": null }' id='react_root'></div></body></html>", {
url: 'http://localhost',
skipWindowCheck: true
});
global.window = document.defaultView;
global.navigator = global.window.na... | const jsdom = require('jsdom');
global.document = jsdom.jsdom("<!doctype html><html><body><div data-current_user='{ \"admin\": false, \"id\": null }' id='react_root'></div></body></html>", {
url: 'http://localhost',
skipWindowCheck: true
});
global.window = document.defaultView;
global.navigator = global.window.na... | 2 | 2 | 2 | mixed | --- a/test/testHelper.js
+++ b/test/testHelper.js
@@ -18,3 +18,3 @@
const momentRecur = require('moment-recur');
-const I18n = require('../public/assets/javascripts/i18n.js');
+const I18n = require('../public/assets/javascripts/i18n.js'); // eslint-disable-line import/no-unresolved
const chai = require('chai');
@@ -3... | --- a/test/testHelper.js
+++ b/test/testHelper.js
@@ ... @@
const momentRecur = require('moment-recur');
-const I18n = require('../public/assets/javascripts/i18n.js');
+const I18n = require('../public/assets/javascripts/i18n.js'); // eslint-disable-line import/no-unresolved
const chai = require('chai');
@@ ... @@
-... | --- a/test/testHelper.js
+++ b/test/testHelper.js
@@ -18,3 +18,3 @@
CON const momentRecur = require('moment-recur');
DEL const I18n = require('../public/assets/javascripts/i18n.js');
ADD const I18n = require('../public/assets/javascripts/i18n.js'); // eslint-disable-line import/no-unresolved
CON const chai = require('c... | <<<<<<< SEARCH
const moment = require('moment');
const momentRecur = require('moment-recur');
const I18n = require('../public/assets/javascripts/i18n.js');
const chai = require('chai');
const sinonChai = require('sinon-chai');
=======
const moment = require('moment');
const momentRecur = require('moment-recur');
const... |
singularities/circular-works | 10b77c9d4cb4520152d52e1a006ffc19a5c8783e | frontend/app/components/admin-form-modal.js | javascript | agpl-3.0 | Add note on error handling
| import Ember from 'ember';
export default Ember.Component.extend({
openConfirmRemove: false,
actions: {
cancel () {
this.cleanErrors();
this.get('organization').rollbackAttributes();
},
save () {
let organization = this.get('organization');
organization.save().then((... | import Ember from 'ember';
export default Ember.Component.extend({
openConfirmRemove: false,
actions: {
cancel () {
this.cleanErrors();
this.get('organization').rollbackAttributes();
},
save () {
let organization = this.get('organization');
organization.save().then((... | 8 | 0 | 1 | add_only | --- a/frontend/app/components/admin-form-modal.js
+++ b/frontend/app/components/admin-form-modal.js
@@ -22,2 +22,10 @@
}).catch((error) => {
+ /* TODO
+ * Better handling of errors
+ * Currently it is dealing with
+ * AdapterError.errors // => ["You need to sign in...."]
+ ... | --- a/frontend/app/components/admin-form-modal.js
+++ b/frontend/app/components/admin-form-modal.js
@@ ... @@
}).catch((error) => {
+ /* TODO
+ * Better handling of errors
+ * Currently it is dealing with
+ * AdapterError.errors // => ["You need to sign in...."]
+ * but als... | --- a/frontend/app/components/admin-form-modal.js
+++ b/frontend/app/components/admin-form-modal.js
@@ -22,2 +22,10 @@
CON }).catch((error) => {
ADD /* TODO
ADD * Better handling of errors
ADD * Currently it is dealing with
ADD * AdapterError.errors // => ["You need to sign in..... | <<<<<<< SEARCH
this.set('open', false);
}).catch((error) => {
this.set('organizationErrors', organization.get('errors'));
this.set('requestErrors', error.errors);
=======
this.set('open', false);
}).catch((error) => {
/* TODO
* Better handling of errors
... |
square/leakcanary | ac63aa174bd29217ac3f683281db9977b8dbba3b | leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt | kotlin | apache-2.0 | Migrate TestUtil to use the newer API
| package leakcanary
import leakcanary.InstrumentationLeakDetector.Result.AnalysisPerformed
import leakcanary.InstrumentationLeakDetector.Result.NoAnalysis
import shark.HeapAnalysisSuccess
object TestUtils {
fun assertLeak(expectedLeakClass: Class<*>) {
val leakDetector = InstrumentationLeakDetector()
val he... | package leakcanary
import shark.HeapAnalysis
import shark.HeapAnalysisSuccess
object TestUtils {
fun assertLeak(expectedLeakClass: Class<*>) {
var heapAnalysisOrNull: HeapAnalysis? = null
AndroidDetectLeaksAssert { heapAnalysis ->
heapAnalysisOrNull = heapAnalysis
}.assertNoLeaks("")
if (heap... | 10 | 7 | 2 | mixed | --- a/leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt
+++ b/leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt
@@ -2,4 +2,3 @@
-import leakcanary.InstrumentationLeakDetector.Result.AnalysisPerformed
-import leakcanary.InstrumentationLeakDetector.Result.NoAn... | --- a/leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt
+++ b/leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt
@@ ... @@
-import leakcanary.InstrumentationLeakDetector.Result.AnalysisPerformed
-import leakcanary.InstrumentationLeakDetector.Result.NoAnalysis... | --- a/leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt
+++ b/leakcanary-android-instrumentation/src/androidTest/java/leakcanary/TestUtils.kt
@@ -2,4 +2,3 @@
CON
DEL import leakcanary.InstrumentationLeakDetector.Result.AnalysisPerformed
DEL import leakcanary.InstrumentationLeakDetector.Re... | <<<<<<< SEARCH
package leakcanary
import leakcanary.InstrumentationLeakDetector.Result.AnalysisPerformed
import leakcanary.InstrumentationLeakDetector.Result.NoAnalysis
import shark.HeapAnalysisSuccess
object TestUtils {
fun assertLeak(expectedLeakClass: Class<*>) {
val leakDetector = InstrumentationLeakDetecto... |
PressLabs/gitfs | 4dd86439d4c8393ac9c3bb6b958a1c8cb45b243a | gitfs/views/history_index.py | python | apache-2.0 | Add mandatory methods to HistoryIndexView (refactor when working)
| from .view import View
class HistoryIndexView(View):
pass
| from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'''
Returns a dictionary with keys identical to the stat C structure of
s... | 36 | 1 | 2 | mixed | --- a/gitfs/views/history_index.py
+++ b/gitfs/views/history_index.py
@@ -1,2 +1,8 @@
from .view import View
+
+from errno import ENOENT
+from stat import S_IFDIR
+
+from gitfs import FuseMethodNotImplemented, FuseOSError
+from log import log
@@ -4,2 +10,31 @@
class HistoryIndexView(View):
- pass
+
+ def get... | --- a/gitfs/views/history_index.py
+++ b/gitfs/views/history_index.py
@@ ... @@
from .view import View
+
+from errno import ENOENT
+from stat import S_IFDIR
+
+from gitfs import FuseMethodNotImplemented, FuseOSError
+from log import log
@@ ... @@
class HistoryIndexView(View):
- pass
+
+ def getattr(self, pat... | --- a/gitfs/views/history_index.py
+++ b/gitfs/views/history_index.py
@@ -1,2 +1,8 @@
CON from .view import View
ADD
ADD from errno import ENOENT
ADD from stat import S_IFDIR
ADD
ADD from gitfs import FuseMethodNotImplemented, FuseOSError
ADD from log import log
CON
@@ -4,2 +10,31 @@
CON class HistoryIndexView(View... | <<<<<<< SEARCH
from .view import View
class HistoryIndexView(View):
pass
=======
from .view import View
from errno import ENOENT
from stat import S_IFDIR
from gitfs import FuseMethodNotImplemented, FuseOSError
from log import log
class HistoryIndexView(View):
def getattr(self, path, fh=None):
'... |
GeotrekCE/Geotrek-admin | 34db760c5b763ad2df02398d58ea417b47b785e7 | geotrek/zoning/views.py | python | bsd-2-clause | Change cache land, use settings mapentity
| from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | 2 | 1 | 1 | mixed | --- a/geotrek/zoning/views.py
+++ b/geotrek/zoning/views.py
@@ -14,3 +14,4 @@
- @method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS, cache="fat"))
+ @method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS,
+ cache=settings.MAPENTITY_CONFIG['GEOJSON_LAYERS_CACH... | --- a/geotrek/zoning/views.py
+++ b/geotrek/zoning/views.py
@@ ... @@
- @method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS, cache="fat"))
+ @method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS,
+ cache=settings.MAPENTITY_CONFIG['GEOJSON_LAYERS_CACHE_BACKEN... | --- a/geotrek/zoning/views.py
+++ b/geotrek/zoning/views.py
@@ -14,3 +14,4 @@
CON
DEL @method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS, cache="fat"))
ADD @method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS,
ADD cache=settings.MAPENTITY_CONFIG['GEOJSON... | <<<<<<< SEARCH
simplify = settings.LAYER_SIMPLIFY_LAND
@method_decorator(cache_page(settings.CACHE_TIMEOUT_LAND_LAYERS, cache="fat"))
def dispatch(self, request, *args, **kwargs):
return super(LandLayerMixin, self).dispatch(request, *args, **kwargs)
=======
simplify = settings.LAYER_SIMPLIFY_L... |
patriziosotgiu/sc5-styleguide | ab51d92adb61958580c00b219c96e50bed8b20c0 | demo-gulpfile.js | javascript | mit | Fix typo in demo gulp file
| var gulp = require('gulp'),
styleguide = require('./lib/styleguide'),
source = 'lib/app/**/*.scss',
ouputPath = 'demo-output';
gulp.task('styleguide', ['static'], function() {
return gulp.src(source)
.pipe(styleguide({
title: 'SC5 Styleguide',
server: true,
rootPath: ouputPath,
... | var gulp = require('gulp'),
styleguide = require('./lib/styleguide'),
source = 'lib/app/**/*.scss',
outputPath = 'demo-output';
gulp.task('styleguide', ['static'], function() {
return gulp.src(source)
.pipe(styleguide({
title: 'SC5 Styleguide',
server: true,
rootPath: outputPath,
... | 4 | 4 | 4 | mixed | --- a/demo-gulpfile.js
+++ b/demo-gulpfile.js
@@ -3,3 +3,3 @@
source = 'lib/app/**/*.scss',
- ouputPath = 'demo-output';
+ outputPath = 'demo-output';
@@ -10,3 +10,3 @@
server: true,
- rootPath: ouputPath,
+ rootPath: outputPath,
overviewPath: 'README.md',
@@ -30,3 +30,3 @@
... | --- a/demo-gulpfile.js
+++ b/demo-gulpfile.js
@@ ... @@
source = 'lib/app/**/*.scss',
- ouputPath = 'demo-output';
+ outputPath = 'demo-output';
@@ ... @@
server: true,
- rootPath: ouputPath,
+ rootPath: outputPath,
overviewPath: 'README.md',
@@ ... @@
}))
- .pipe(gulp.d... | --- a/demo-gulpfile.js
+++ b/demo-gulpfile.js
@@ -3,3 +3,3 @@
CON source = 'lib/app/**/*.scss',
DEL ouputPath = 'demo-output';
ADD outputPath = 'demo-output';
CON
@@ -10,3 +10,3 @@
CON server: true,
DEL rootPath: ouputPath,
ADD rootPath: outputPath,
CON overviewPath: 'README.md',
... | <<<<<<< SEARCH
styleguide = require('./lib/styleguide'),
source = 'lib/app/**/*.scss',
ouputPath = 'demo-output';
gulp.task('styleguide', ['static'], function() {
=======
styleguide = require('./lib/styleguide'),
source = 'lib/app/**/*.scss',
outputPath = 'demo-output';
gulp.task('styleguide', ['static']... |
nuimk/nmk | 2f7f8ebcab920c8455826c48bd19701bfb8bcbd1 | nmk/src/nmk/platform.rs | rust | mit | Use Path to check file existence
| use once_cell::sync::Lazy;
#[allow(dead_code)]
#[derive(PartialEq, Clone)]
pub enum PlatformType {
Unknown,
OSX,
Linux,
Arch,
Alpine,
}
pub fn is_alpine() -> bool {
*PLATFORM == PlatformType::Alpine
}
pub fn is_arch() -> bool {
*PLATFORM == PlatformType::Arch
}
pub fn is_mac() -> bool {
... | use once_cell::sync::Lazy;
#[allow(dead_code)]
#[derive(PartialEq, Clone, Copy)]
pub enum PlatformType {
Unknown,
OSX,
Linux,
Arch,
Alpine,
}
pub fn is_alpine() -> bool {
*PLATFORM == PlatformType::Alpine
}
pub fn is_arch() -> bool {
*PLATFORM == PlatformType::Arch
}
pub fn is_mac() -> b... | 4 | 4 | 2 | mixed | --- a/nmk/src/nmk/platform.rs
+++ b/nmk/src/nmk/platform.rs
@@ -3,3 +3,3 @@
#[allow(dead_code)]
-#[derive(PartialEq, Clone)]
+#[derive(PartialEq, Clone, Copy)]
pub enum PlatformType {
@@ -33,6 +33,6 @@
fn what_platform() -> PlatformType {
- use std::path::PathBuf;
- if PathBuf::from("/etc/alpine-release").exis... | --- a/nmk/src/nmk/platform.rs
+++ b/nmk/src/nmk/platform.rs
@@ ... @@
#[allow(dead_code)]
-#[derive(PartialEq, Clone)]
+#[derive(PartialEq, Clone, Copy)]
pub enum PlatformType {
@@ ... @@
fn what_platform() -> PlatformType {
- use std::path::PathBuf;
- if PathBuf::from("/etc/alpine-release").exists() {
+ le... | --- a/nmk/src/nmk/platform.rs
+++ b/nmk/src/nmk/platform.rs
@@ -3,3 +3,3 @@
CON #[allow(dead_code)]
DEL #[derive(PartialEq, Clone)]
ADD #[derive(PartialEq, Clone, Copy)]
CON pub enum PlatformType {
@@ -33,6 +33,6 @@
CON fn what_platform() -> PlatformType {
DEL use std::path::PathBuf;
DEL if PathBuf::from("/etc/... | <<<<<<< SEARCH
#[allow(dead_code)]
#[derive(PartialEq, Clone)]
pub enum PlatformType {
Unknown,
=======
#[allow(dead_code)]
#[derive(PartialEq, Clone, Copy)]
pub enum PlatformType {
Unknown,
>>>>>>> REPLACE
<<<<<<< SEARCH
#[cfg(target_os = "linux")]
fn what_platform() -> PlatformType {
use std::path::P... |
fifth-postulate/finding-the-planets | b7e3aa877aac0a237c41c24614a7789a5f5efebc | rust-showcase/src/bin/brightness.rs | rust | mit | Remove background noise from signal
| extern crate simple_csv;
use std::fs::File;
use std::io::BufReader;
use std::str::FromStr;
use simple_csv::{SimpleCsvWriter, SimpleCsvReader};
fn main(){
let f = File::open("../long-cadence.csv").unwrap();
let buf = BufReader::new(f);
let reader = SimpleCsvReader::new(buf);
let o = File::create("aver... | extern crate simple_csv;
use std::fs::File;
use std::io::BufReader;
use std::str::FromStr;
use simple_csv::{SimpleCsvWriter, SimpleCsvReader};
fn main(){
let f = File::open("../long-cadence.csv").unwrap();
let buf = BufReader::new(f);
let reader = SimpleCsvReader::new(buf);
let o = File::create("aver... | 9 | 6 | 2 | mixed | --- a/rust-showcase/src/bin/brightness.rs
+++ b/rust-showcase/src/bin/brightness.rs
@@ -17,13 +17,11 @@
let row = r.unwrap();
- let (time, brightness) = sum(row);
+ let (time, brightness, filtered) = sum(row);
writer.write(
- &vec!(time.to_string(), brightness.to_string())
+... | --- a/rust-showcase/src/bin/brightness.rs
+++ b/rust-showcase/src/bin/brightness.rs
@@ ... @@
let row = r.unwrap();
- let (time, brightness) = sum(row);
+ let (time, brightness, filtered) = sum(row);
writer.write(
- &vec!(time.to_string(), brightness.to_string())
+ ... | --- a/rust-showcase/src/bin/brightness.rs
+++ b/rust-showcase/src/bin/brightness.rs
@@ -17,13 +17,11 @@
CON let row = r.unwrap();
DEL let (time, brightness) = sum(row);
ADD let (time, brightness, filtered) = sum(row);
CON
CON writer.write(
DEL &vec!(time.to_string(), brightn... | <<<<<<< SEARCH
for (_, r) in reader.enumerate() {
let row = r.unwrap();
let (time, brightness) = sum(row);
writer.write(
&vec!(time.to_string(), brightness.to_string())
).unwrap();
}
}
fn sum(row: Vec<String>) -> (f64, f64) {
let mut iter = row.iter();
let... |
stufisher/ispyb-php | 6ac3041e342f15a38def80b0c0f967313a14a02c | templates/js/pages/protein_view.js | javascript | apache-2.0 | Make sequence editor text area
| $(function() {
var dt = {sPaginationType: 'full_numbers',
bProcessing: true,
bServerSide: true,
sAjaxSource: '/sample/ajax/pid/'+pid+'/',
bAutoWidth:false ,
aaSorting: [[ 0, 'desc' ]],
//fnDrawCallback: _map_callbacks(),
fnServerData:... | $(function() {
var dt = {sPaginationType: 'full_numbers',
bProcessing: true,
bServerSide: true,
sAjaxSource: '/sample/ajax/pid/'+pid+'/',
bAutoWidth:false ,
aaSorting: [[ 0, 'desc' ]],
//fnDrawCallback: _map_callbacks(),
fnServerData:... | 4 | 3 | 1 | mixed | --- a/templates/js/pages/protein_view.js
+++ b/templates/js/pages/protein_view.js
@@ -41,7 +41,8 @@
$('.seq').editable('/sample/ajax/updatep/pid/'+pid+'/ty/seq/', {
- type: 'text',
- height: '100%',
- width: '50%',
+ type: 'textarea',
+ rows: 5,
+ width: '100%',
submit: 'Ok',
style: 'disp... | --- a/templates/js/pages/protein_view.js
+++ b/templates/js/pages/protein_view.js
@@ ... @@
$('.seq').editable('/sample/ajax/updatep/pid/'+pid+'/ty/seq/', {
- type: 'text',
- height: '100%',
- width: '50%',
+ type: 'textarea',
+ rows: 5,
+ width: '100%',
submit: 'Ok',
style: 'display: inl... | --- a/templates/js/pages/protein_view.js
+++ b/templates/js/pages/protein_view.js
@@ -41,7 +41,8 @@
CON $('.seq').editable('/sample/ajax/updatep/pid/'+pid+'/ty/seq/', {
DEL type: 'text',
DEL height: '100%',
DEL width: '50%',
ADD type: 'textarea',
ADD rows: 5,
ADD width: '100%',
CON submit:... | <<<<<<< SEARCH
$('.seq').editable('/sample/ajax/updatep/pid/'+pid+'/ty/seq/', {
type: 'text',
height: '100%',
width: '50%',
submit: 'Ok',
style: 'display: inline',
}).addClass('editable');
})
=======
$('.seq').editable('/sample/ajax/updatep/pid/'+pid+'/ty/seq/', {
type: 'textarea',
... |
rtfd/readthedocs.org | 29c437e15f7793886c80b71ca6764184caff2597 | readthedocs/oauth/management/commands/load_project_remote_repo_relation.py | python | mit | Check if the remote_repo was updated or not and log error
| import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | import json
from django.core.management.base import BaseCommand
from readthedocs.oauth.models import RemoteRepository
class Command(BaseCommand):
help = "Load Project and RemoteRepository Relationship from JSON file"
def add_arguments(self, parser):
# File path of the json file containing relations... | 11 | 1 | 1 | mixed | --- a/readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
+++ b/readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
@@ -38,5 +38,15 @@
try:
- RemoteRepository.objects.filter(
+ update_count = RemoteRepository.objects.filter(
... | --- a/readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
+++ b/readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
@@ ... @@
try:
- RemoteRepository.objects.filter(
+ update_count = RemoteRepository.objects.filter(
... | --- a/readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
+++ b/readthedocs/oauth/management/commands/load_project_remote_repo_relation.py
@@ -38,5 +38,15 @@
CON try:
DEL RemoteRepository.objects.filter(
ADD update_count = RemoteRepository.objects.filte... | <<<<<<< SEARCH
for item in data:
try:
RemoteRepository.objects.filter(
remote_id=item['remote_id']
).update(project_id=item['project_id'])
except Exception as e:
=======
for item in data:
try:
updat... |
wordpress-mobile/AztecEditor-Android | 19b00891816feccf9166dd958e63b65bb98444e6 | aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt | kotlin | mpl-2.0 | Add documentation to the comment handler plugin
| package org.wordpress.aztec.plugins
import android.annotation.SuppressLint
import android.content.Context
import android.text.Editable
import android.text.Spanned
import android.text.style.CharacterStyle
import org.wordpress.aztec.plugins.IAztecPlugin
@SuppressLint("NewApi")
interface ICommentHandler : IAztecPlugin {... | package org.wordpress.aztec.plugins
import android.annotation.SuppressLint
import android.content.Context
import android.text.Editable
import android.text.Spanned
import android.text.style.CharacterStyle
import org.wordpress.aztec.plugins.IAztecPlugin
/**
* An interface for HTML comment processing plugins.
*/
@Supp... | 52 | 9 | 2 | mixed | --- a/aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt
+++ b/aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt
@@ -9,5 +9,39 @@
+/**
+ * An interface for HTML comment processing plugins.
+ */
@SuppressLint("NewApi")
interface ICommentHandler : IAztecPlugin {
+ /**
+ * D... | --- a/aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt
+++ b/aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt
@@ ... @@
+/**
+ * An interface for HTML comment processing plugins.
+ */
@SuppressLint("NewApi")
interface ICommentHandler : IAztecPlugin {
+ /**
+ * Determin... | --- a/aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt
+++ b/aztec/src/main/kotlin/org/wordpress/aztec/plugins/ICommentHandler.kt
@@ -9,5 +9,39 @@
CON
ADD /**
ADD * An interface for HTML comment processing plugins.
ADD */
CON @SuppressLint("NewApi")
CON interface ICommentHandler : IAztecPlugin {
... | <<<<<<< SEARCH
import org.wordpress.aztec.plugins.IAztecPlugin
@SuppressLint("NewApi")
interface ICommentHandler : IAztecPlugin {
fun canHandle(span: CharacterStyle): Boolean {
return true
}
fun shouldParseContent(): Boolean {
return true
}
fun handleCommentHtml(text: String, out... |
jguerinet/MyMartlet | 7317493493429f8f8ee893a320766bdcf3ad2217 | parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt | kotlin | apache-2.0 | Use NoSuchElementException to capture missing char element
| /*
* Copyright 2014-2019 Julien Guerinet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | /*
* Copyright 2014-2019 Julien Guerinet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 1 | 1 | 1 | mixed | --- a/parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt
+++ b/parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt
@@ -39,3 +39,3 @@
DayUtils.dayToChar(it)
- } catch (e: Exception) {
+ } catch (e: NoSuchElementException) {
fail("Co... | --- a/parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt
+++ b/parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt
@@ ... @@
DayUtils.dayToChar(it)
- } catch (e: Exception) {
+ } catch (e: NoSuchElementException) {
fail("Could not ... | --- a/parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt
+++ b/parser/src/test/kotlin/com/guerinet/mymartlet/parser/GeneralTest.kt
@@ -39,3 +39,3 @@
CON DayUtils.dayToChar(it)
DEL } catch (e: Exception) {
ADD } catch (e: NoSuchElementException) {
CON ... | <<<<<<< SEARCH
try {
DayUtils.dayToChar(it)
} catch (e: Exception) {
fail("Could not get associated char for ${it.name}")
}
=======
try {
DayUtils.dayToChar(it)
} catch (e: NoSuchElementException) {
... |
alexstyl/Memento-Namedays | a27cab3feef72a46521e4521b3c2d5666312e731 | android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt | kotlin | mit | Move const to companion object
| package com.alexstyl.specialdates.upcoming
import com.alexstyl.specialdates.date.Date
import com.alexstyl.specialdates.date.TimePeriod
import com.alexstyl.specialdates.permissions.ContactPermissionRequest
import io.reactivex.Scheduler
import io.reactivex.disposables.Disposable
import io.reactivex.subjects.PublishSubje... | package com.alexstyl.specialdates.upcoming
import com.alexstyl.specialdates.date.Date
import com.alexstyl.specialdates.date.TimePeriod
import com.alexstyl.specialdates.permissions.ContactPermissionRequest
import io.reactivex.Scheduler
import io.reactivex.disposables.Disposable
import io.reactivex.subjects.PublishSubje... | 5 | 1 | 1 | mixed | --- a/android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt
+++ b/android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt
@@ -15,3 +15,7 @@
- private val TRIGGER = 1
+
+ companion object {
+ private const val TRIGGER = 1
+ }
+
... | --- a/android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt
+++ b/android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt
@@ ... @@
- private val TRIGGER = 1
+
+ companion object {
+ private const val TRIGGER = 1
+ }
+
privat... | --- a/android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt
+++ b/android_mobile/src/main/java/com/alexstyl/specialdates/upcoming/UpcomingEventsPresenter.kt
@@ -15,3 +15,7 @@
CON
DEL private val TRIGGER = 1
ADD
ADD companion object {
ADD private const val TRIGGER =... | <<<<<<< SEARCH
private val resultScheduler: Scheduler) {
private val TRIGGER = 1
private val subject = PublishSubject.create<Int>()
private var disposable: Disposable? = null
=======
private val resultScheduler: Scheduler) {
... |
diesel-rs/diesel | a19f7126b5452a9185da747b960225863b94f733 | yaqb/src/query_builder/update_statement/changeset.rs | rust | apache-2.0 | Implement `Changeset` for `Vec<T>` and `Box<T>`
A valid use case has arisen in #26 that is impossible to work around at
the moment. We're going to eventually add a standard API to handle this,
so this implementation has no tests. It will get tested through that
API, once we've figured out what the API will look like. ... | use query_builder::{QueryBuilder, BuildQueryResult};
use query_source::QuerySource;
pub trait AsChangeset {
type Changeset: Changeset;
fn as_changeset(self) -> Self::Changeset;
}
pub trait Changeset {
type Target: QuerySource;
fn to_sql(&self, out: &mut QueryBuilder) -> BuildQueryResult;
}
impl<T> ... | use query_builder::{QueryBuilder, BuildQueryResult};
use query_source::QuerySource;
pub trait AsChangeset {
type Changeset: Changeset;
fn as_changeset(self) -> Self::Changeset;
}
pub trait Changeset {
type Target: QuerySource;
fn to_sql(&self, out: &mut QueryBuilder) -> BuildQueryResult;
}
impl<T> ... | 22 | 0 | 1 | add_only | --- a/yaqb/src/query_builder/update_statement/changeset.rs
+++ b/yaqb/src/query_builder/update_statement/changeset.rs
@@ -24 +24,23 @@
}
+
+impl<T: Changeset> Changeset for Vec<T> {
+ type Target = T::Target;
+
+ fn to_sql(&self, out: &mut QueryBuilder) -> BuildQueryResult {
+ for (i, changeset) in self.i... | --- a/yaqb/src/query_builder/update_statement/changeset.rs
+++ b/yaqb/src/query_builder/update_statement/changeset.rs
@@ ... @@
}
+
+impl<T: Changeset> Changeset for Vec<T> {
+ type Target = T::Target;
+
+ fn to_sql(&self, out: &mut QueryBuilder) -> BuildQueryResult {
+ for (i, changeset) in self.iter().e... | --- a/yaqb/src/query_builder/update_statement/changeset.rs
+++ b/yaqb/src/query_builder/update_statement/changeset.rs
@@ -24 +24,23 @@
CON }
ADD
ADD impl<T: Changeset> Changeset for Vec<T> {
ADD type Target = T::Target;
ADD
ADD fn to_sql(&self, out: &mut QueryBuilder) -> BuildQueryResult {
ADD for (i,... | <<<<<<< SEARCH
}
}
=======
}
}
impl<T: Changeset> Changeset for Vec<T> {
type Target = T::Target;
fn to_sql(&self, out: &mut QueryBuilder) -> BuildQueryResult {
for (i, changeset) in self.iter().enumerate() {
if i != 0 {
out.push_sql(", ");
}
... |
kokarn/KokBot | c48c444a0c6cf22fcafc12310881c9851f05cfcc | Urlchecker.botplug.js | javascript | mit | Add user agent so we don't get bounced by sites requiring it (e.g. SoundCloud)
| 'use strict';
var request = require( 'request' ),
cheerio = require( 'cheerio' ),
urlChecker = {
bot : false,
setup : function( bot ){
var _this = this,
channel;
_this.bot = bot;
for( channel in _this.bot.opt.channels ){
if( _t... | 'use strict';
var request = require( 'request' ),
cheerio = require( 'cheerio' ),
urlChecker = {
bot : false,
setup : function( bot ){
var _this = this,
channel;
_this.bot = bot;
for( channel in _this.bot.opt.channels ){
if( _t... | 8 | 2 | 2 | mixed | --- a/Urlchecker.botplug.js
+++ b/Urlchecker.botplug.js
@@ -19,3 +19,8 @@
var url,
- urlRegex = /(https?:\/\/[^\s]+)/g;
+ urlRegex = /(https?:\/\/[^\s]+)/g,
+ options = {
+ headers: {
+ 'User-Agent': 'request'
+ ... | --- a/Urlchecker.botplug.js
+++ b/Urlchecker.botplug.js
@@ ... @@
var url,
- urlRegex = /(https?:\/\/[^\s]+)/g;
+ urlRegex = /(https?:\/\/[^\s]+)/g,
+ options = {
+ headers: {
+ 'User-Agent': 'request'
+ ... | --- a/Urlchecker.botplug.js
+++ b/Urlchecker.botplug.js
@@ -19,3 +19,8 @@
CON var url,
DEL urlRegex = /(https?:\/\/[^\s]+)/g;
ADD urlRegex = /(https?:\/\/[^\s]+)/g,
ADD options = {
ADD headers: {
ADD 'User-Agent': 'r... | <<<<<<< SEARCH
handleMessage : function( from, text, message ){
var url,
urlRegex = /(https?:\/\/[^\s]+)/g;
url = text.match( urlRegex );
if( url !== null ){
request( url[ 0 ], function( error, response, html ){
var $ = ch... |
chrisbanes/tivi | 1a5abf19878cf8430d932ff1c581f0f2184a594c | app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt | kotlin | apache-2.0 | Fix Toolbar tinting animation on release build
| /*
* Copyright 2018 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 required by applicable law or agreed to... | /*
* Copyright 2018 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 required by applicable law or agreed to... | 13 | 8 | 2 | mixed | --- a/app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt
+++ b/app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt
@@ -19,2 +19,3 @@
import android.content.Context
+import android.support.annotation.Keep
import android.support.v7.widget.Toolbar
@@ -29,13 +30,17 @@
) : Toolbar(context, attrs, defStyleAttr) {
-... | --- a/app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt
+++ b/app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt
@@ ... @@
import android.content.Context
+import android.support.annotation.Keep
import android.support.v7.widget.Toolbar
@@ ... @@
) : Toolbar(context, attrs, defStyleAttr) {
-
+ @get:Keep
+ ... | --- a/app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt
+++ b/app/src/main/java/app/tivi/ui/widget/TintingToolbar.kt
@@ -19,2 +19,3 @@
CON import android.content.Context
ADD import android.support.annotation.Keep
CON import android.support.v7.widget.Toolbar
@@ -29,13 +30,17 @@
CON ) : Toolbar(context, attrs, defSt... | <<<<<<< SEARCH
import android.content.Context
import android.support.v7.widget.Toolbar
import android.util.AttributeSet
=======
import android.content.Context
import android.support.annotation.Keep
import android.support.v7.widget.Toolbar
import android.util.AttributeSet
>>>>>>> REPLACE
<<<<<<< SEARCH
defStyle... |
hfiguiere/exempi-rs | 4f7f4b8023325efeb76ac3172c349fc47d7cf84b | src/xmpstring.rs | rust | bsd-2-clause | Implement Eq trait for XmpString
|
use ::c;
use std::str;
use std::ffi::{CStr};
pub struct XmpString {
ptr: *mut c::XmpString
}
impl XmpString {
pub fn new() -> XmpString {
XmpString { ptr: unsafe { c::xmp_string_new() } }
}
pub fn is_null(&self) -> bool {
self.ptr.is_null()
}
pub fn as_ptr(&self) -> *const c... |
use ::c;
use std::str;
use std::ffi::{CStr};
pub struct XmpString {
ptr: *mut c::XmpString
}
impl XmpString {
pub fn new() -> XmpString {
XmpString { ptr: unsafe { c::xmp_string_new() } }
}
pub fn is_null(&self) -> bool {
self.ptr.is_null()
}
pub fn as_ptr(&self) -> *const c... | 9 | 0 | 1 | add_only | --- a/src/xmpstring.rs
+++ b/src/xmpstring.rs
@@ -43 +43,10 @@
}
+
+impl Eq for XmpString {
+
+}
+impl PartialEq for XmpString {
+ fn eq(&self, other: &XmpString) -> bool {
+ self.to_str() == other.to_str()
+ }
+} | --- a/src/xmpstring.rs
+++ b/src/xmpstring.rs
@@ ... @@
}
+
+impl Eq for XmpString {
+
+}
+impl PartialEq for XmpString {
+ fn eq(&self, other: &XmpString) -> bool {
+ self.to_str() == other.to_str()
+ }
+}
| --- a/src/xmpstring.rs
+++ b/src/xmpstring.rs
@@ -43 +43,10 @@
CON }
ADD
ADD impl Eq for XmpString {
ADD
ADD }
ADD impl PartialEq for XmpString {
ADD fn eq(&self, other: &XmpString) -> bool {
ADD self.to_str() == other.to_str()
ADD }
ADD }
| <<<<<<< SEARCH
}
}
=======
}
}
impl Eq for XmpString {
}
impl PartialEq for XmpString {
fn eq(&self, other: &XmpString) -> bool {
self.to_str() == other.to_str()
}
}
>>>>>>> REPLACE
|
saltstack/salt | 107b97e952d731f8c55c9ca3208ecd2a41512b8d | tests/integration/modules/sysmod.py | python | apache-2.0 | Add test to verify loader modules
| import integration
class SysModuleTest(integration.ModuleCase):
'''
Validate the sys module
'''
def test_list_functions(self):
'''
sys.list_functions
'''
funcs = self.run_function('sys.list_functions')
self.assertTrue('hosts.list_hosts' in funcs)
self.as... | import integration
class SysModuleTest(integration.ModuleCase):
'''
Validate the sys module
'''
def test_list_functions(self):
'''
sys.list_functions
'''
funcs = self.run_function('sys.list_functions')
self.assertTrue('hosts.list_hosts' in funcs)
self.as... | 19 | 0 | 1 | add_only | --- a/tests/integration/modules/sysmod.py
+++ b/tests/integration/modules/sysmod.py
@@ -23,2 +23,21 @@
+ def test_valid_docs(self):
+ '''
+ Make sure no functions are exposed that don't have valid docstrings
+ '''
+ docs = self.run_function('sys.doc')
+ bad = set()
+ for f... | --- a/tests/integration/modules/sysmod.py
+++ b/tests/integration/modules/sysmod.py
@@ ... @@
+ def test_valid_docs(self):
+ '''
+ Make sure no functions are exposed that don't have valid docstrings
+ '''
+ docs = self.run_function('sys.doc')
+ bad = set()
+ for fun in doc... | --- a/tests/integration/modules/sysmod.py
+++ b/tests/integration/modules/sysmod.py
@@ -23,2 +23,21 @@
CON
ADD def test_valid_docs(self):
ADD '''
ADD Make sure no functions are exposed that don't have valid docstrings
ADD '''
ADD docs = self.run_function('sys.doc')
ADD bad =... | <<<<<<< SEARCH
self.assertTrue('pkg' in mods)
if __name__ == '__main__':
=======
self.assertTrue('pkg' in mods)
def test_valid_docs(self):
'''
Make sure no functions are exposed that don't have valid docstrings
'''
docs = self.run_function('sys.doc')
bad =... |
jaywink/diaspora-hub | 164a80ce3bcffad0e233426830c712cddd2f750b | thefederation/apps.py | python | agpl-3.0 | Increase timeout of clean_duplicate_nodes job
| import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | import datetime
import sys
import django_rq
from django.apps import AppConfig
class TheFederationConfig(AppConfig):
name = "thefederation"
verbose_name = "The Federation"
def ready(self):
# Only register tasks if RQ Scheduler process
if "rqscheduler" not in sys.argv:
return
... | 1 | 0 | 1 | add_only | --- a/thefederation/apps.py
+++ b/thefederation/apps.py
@@ -41,2 +41,3 @@
queue_name='medium',
+ timeout=3600,
) | --- a/thefederation/apps.py
+++ b/thefederation/apps.py
@@ ... @@
queue_name='medium',
+ timeout=3600,
)
| --- a/thefederation/apps.py
+++ b/thefederation/apps.py
@@ -41,2 +41,3 @@
CON queue_name='medium',
ADD timeout=3600,
CON )
| <<<<<<< SEARCH
func=clean_duplicate_nodes,
queue_name='medium',
)
scheduler.schedule(
=======
func=clean_duplicate_nodes,
queue_name='medium',
timeout=3600,
)
scheduler.schedule(
>>>>>>> REPLACE
|
gasman/Willow | f37f972c3ded0671beed16c9e0c6ee2a5e764f5f | setup.py | python | bsd-3-clause | Exclude tests package from distribution
| #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | 1 | 1 | 1 | mixed | --- a/setup.py
+++ b/setup.py
@@ -27,3 +27,3 @@
url='',
- packages=find_packages(),
+ packages=find_packages(exclude=['tests']),
include_package_data=True, | --- a/setup.py
+++ b/setup.py
@@ ... @@
url='',
- packages=find_packages(),
+ packages=find_packages(exclude=['tests']),
include_package_data=True,
| --- a/setup.py
+++ b/setup.py
@@ -27,3 +27,3 @@
CON url='',
DEL packages=find_packages(),
ADD packages=find_packages(exclude=['tests']),
CON include_package_data=True,
| <<<<<<< SEARCH
author_email='karlhobley10@gmail.com',
url='',
packages=find_packages(),
include_package_data=True,
license='BSD',
=======
author_email='karlhobley10@gmail.com',
url='',
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='BSD',
>>>>>>> ... |
bobbo/rustfm-scrobble | 31399e2090180de7b58d12d59123d0935bbf28cc | src/dto.rs | rust | mit | Use a custom deserializer to deserialize 'corrected' field of now playing response fields to bool
| #[derive(Deserialize, Debug)]
pub struct AuthResponse {
pub session: SessionResponse
}
#[derive(Deserialize, Debug, Clone)]
pub struct SessionResponse {
pub key: String,
pub subscriber: i64,
pub name: String
}
#[derive(Deserialize, Debug)]
pub struct NowPlayingResponseWrapper {
pub nowplaying: Now... | use serde;
use serde_json as json;
#[derive(Deserialize, Debug)]
pub struct AuthResponse {
pub session: SessionResponse
}
#[derive(Deserialize, Debug, Clone)]
pub struct SessionResponse {
pub key: String,
pub subscriber: i64,
pub name: String
}
#[derive(Deserialize, Debug)]
pub struct NowPlayingRespo... | 20 | 1 | 3 | mixed | --- a/src/dto.rs
+++ b/src/dto.rs
@@ -1 +1,4 @@
+use serde;
+use serde_json as json;
+
#[derive(Deserialize, Debug)]
@@ -28,3 +31,4 @@
pub struct CorrectableString {
- pub corrected: String,
+ #[serde(deserialize_with="CorrectableString::deserialize_corrected_field")]
+ pub corrected: bool,
#[serde(rena... | --- a/src/dto.rs
+++ b/src/dto.rs
@@ ... @@
+use serde;
+use serde_json as json;
+
#[derive(Deserialize, Debug)]
@@ ... @@
pub struct CorrectableString {
- pub corrected: String,
+ #[serde(deserialize_with="CorrectableString::deserialize_corrected_field")]
+ pub corrected: bool,
#[serde(rename="#text")]... | --- a/src/dto.rs
+++ b/src/dto.rs
@@ -1 +1,4 @@
ADD use serde;
ADD use serde_json as json;
ADD
CON #[derive(Deserialize, Debug)]
@@ -28,3 +31,4 @@
CON pub struct CorrectableString {
DEL pub corrected: String,
ADD #[serde(deserialize_with="CorrectableString::deserialize_corrected_field")]
ADD pub corrected:... | <<<<<<< SEARCH
#[derive(Deserialize, Debug)]
pub struct AuthResponse {
=======
use serde;
use serde_json as json;
#[derive(Deserialize, Debug)]
pub struct AuthResponse {
>>>>>>> REPLACE
<<<<<<< SEARCH
#[derive(Deserialize, Debug)]
pub struct CorrectableString {
pub corrected: String,
#[serde(rename="#text")... |
ArchimedesPi/shellshocker | 5b5975c70327defba016b000616a84db53141ea3 | shellshocker_server/static/js/shocker.js | javascript | mit | Stop spinner when done :fistpump:
| // When the document is ready
$(document).ready(function() {
// Grab the Handlebars template from a <script> tag
alertTemplateText = $('#alertTemplateText').html();
// Compile the Handlebars template
alertTemplate = Handlebars.compile(alertTemplateText);
exploits = _.flatten(
_.map(urlsToCheck, function ... | // When the document is ready
$(document).ready(function() {
// Grab the Handlebars template from a <script> tag
alertTemplateText = $('#alertTemplateText').html();
// Compile the Handlebars template
alertTemplate = Handlebars.compile(alertTemplateText);
exploits = _.flatten(
_.map(urlsToCheck, function ... | 24 | 17 | 1 | mixed | --- a/shellshocker_server/static/js/shocker.js
+++ b/shellshocker_server/static/js/shocker.js
@@ -15,20 +15,27 @@
- console.log(exploits);
+ //console.log(exploits);
- exploits.reduce(function (sequence, exploit) {
- return sequence.then(function () {
- console.log(exploit);
- return post(exploitabl... | --- a/shellshocker_server/static/js/shocker.js
+++ b/shellshocker_server/static/js/shocker.js
@@ ... @@
- console.log(exploits);
+ //console.log(exploits);
- exploits.reduce(function (sequence, exploit) {
- return sequence.then(function () {
- console.log(exploit);
- return post(exploitableCheckURL,... | --- a/shellshocker_server/static/js/shocker.js
+++ b/shellshocker_server/static/js/shocker.js
@@ -15,20 +15,27 @@
CON
DEL console.log(exploits);
ADD //console.log(exploits);
CON
DEL exploits.reduce(function (sequence, exploit) {
DEL return sequence.then(function () {
DEL console.log(exploit);
DEL ... | <<<<<<< SEARCH
true);
console.log(exploits);
exploits.reduce(function (sequence, exploit) {
return sequence.then(function () {
console.log(exploit);
return post(exploitableCheckURL, {websiteUrl: exploit.url, header: exploit.header});
}).then(function(result) {
console.log(result);
... |
Audiveris/audiveris | 02538756680805e08950e46ddf44c667853f622a | src/main/omr/sheet/PixelPoint.java | java | agpl-3.0 | Use of a more specific constructor, to avoid too easy conversions
| //-----------------------------------------------------------------------//
// //
// P i x e l P o i n t //
// //
// Copyright (C... | //-----------------------------------------------------------------------//
// //
// P i x e l P o i n t //
// //
// Copyright (C... | 3 | 2 | 1 | mixed | --- a/src/main/omr/sheet/PixelPoint.java
+++ b/src/main/omr/sheet/PixelPoint.java
@@ -38,5 +38,6 @@
//------------//
- public PixelPoint (Point point)
+ public PixelPoint (int x,
+ int y)
{
- super(point);
+ super(x, y);
} | --- a/src/main/omr/sheet/PixelPoint.java
+++ b/src/main/omr/sheet/PixelPoint.java
@@ ... @@
//------------//
- public PixelPoint (Point point)
+ public PixelPoint (int x,
+ int y)
{
- super(point);
+ super(x, y);
}
| --- a/src/main/omr/sheet/PixelPoint.java
+++ b/src/main/omr/sheet/PixelPoint.java
@@ -38,5 +38,6 @@
CON //------------//
DEL public PixelPoint (Point point)
ADD public PixelPoint (int x,
ADD int y)
CON {
DEL super(point);
ADD super(x, y);
CON }
| <<<<<<< SEARCH
// PixelPoint //
//------------//
public PixelPoint (Point point)
{
super(point);
}
}
=======
// PixelPoint //
//------------//
public PixelPoint (int x,
int y)
{
super(x, y);
}
}
>>>>>>> REPLACE
|
HPI-Hackathon/find-my-car | 4632a726ac1f7fc4b2eaed5059a094eb606593cc | javascripts/service/car_ads_service.js | javascript | mit | Add params for location based search
| define(["underscore", "jquery"], function(_, $) {
return function (averageCartype) {
var public = {};
var private = {};
private.createObject = function (averageCartype) {
var queryObject = {
c: [],
sc: null,
p: null,
ecol: []
};
for (var carclass in ave... | define(["underscore", "jquery", "app"], function(_, $, app) {
return function (averageCartype) {
var public = {};
var private = {};
private.createObject = function (averageCartype) {
var queryObject = {
c: [],
ecol: [],
sc: null,
p: null,
ll: null
};
... | 10 | 2 | 5 | mixed | --- a/javascripts/service/car_ads_service.js
+++ b/javascripts/service/car_ads_service.js
@@ -1,2 +1,2 @@
-define(["underscore", "jquery"], function(_, $) {
+define(["underscore", "jquery", "app"], function(_, $, app) {
return function (averageCartype) {
@@ -9,7 +9,9 @@
c: [],
+ ecol: [],
sc... | --- a/javascripts/service/car_ads_service.js
+++ b/javascripts/service/car_ads_service.js
@@ ... @@
-define(["underscore", "jquery"], function(_, $) {
+define(["underscore", "jquery", "app"], function(_, $, app) {
return function (averageCartype) {
@@ ... @@
c: [],
+ ecol: [],
sc: null,
... | --- a/javascripts/service/car_ads_service.js
+++ b/javascripts/service/car_ads_service.js
@@ -1,2 +1,2 @@
DEL define(["underscore", "jquery"], function(_, $) {
ADD define(["underscore", "jquery", "app"], function(_, $, app) {
CON return function (averageCartype) {
@@ -9,7 +9,9 @@
CON c: [],
ADD ecol: ... | <<<<<<< SEARCH
define(["underscore", "jquery"], function(_, $) {
return function (averageCartype) {
=======
define(["underscore", "jquery", "app"], function(_, $, app) {
return function (averageCartype) {
>>>>>>> REPLACE
<<<<<<< SEARCH
var queryObject = {
c: [],
sc: null,
p: null,... |
indigo-dc/orchestrator | 8af3fb06a577701885945577071c1470190a44d9 | src/main/java/it/reply/orchestrator/Application.java | java | apache-2.0 | Remove unused code left from JBMP -> Flowable migration | /*
* Copyright © 2015-2018 Santer Reply S.p.A.
*
* 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 la... | /*
* Copyright © 2015-2018 Santer Reply S.p.A.
*
* 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 la... | 1 | 11 | 2 | mixed | --- a/src/main/java/it/reply/orchestrator/Application.java
+++ b/src/main/java/it/reply/orchestrator/Application.java
@@ -18,4 +18,2 @@
-import bitronix.tm.jndi.BitronixInitialContextFactory;
-
import java.util.TimeZone;
@@ -29,13 +27,5 @@
- public static final Class<Application> applicationClass = Application.cl... | --- a/src/main/java/it/reply/orchestrator/Application.java
+++ b/src/main/java/it/reply/orchestrator/Application.java
@@ ... @@
-import bitronix.tm.jndi.BitronixInitialContextFactory;
-
import java.util.TimeZone;
@@ ... @@
- public static final Class<Application> applicationClass = Application.class;
-
- static ... | --- a/src/main/java/it/reply/orchestrator/Application.java
+++ b/src/main/java/it/reply/orchestrator/Application.java
@@ -18,4 +18,2 @@
CON
DEL import bitronix.tm.jndi.BitronixInitialContextFactory;
DEL
CON import java.util.TimeZone;
@@ -29,13 +27,5 @@
CON
DEL public static final Class<Application> applicationClas... | <<<<<<< SEARCH
package it.reply.orchestrator;
import bitronix.tm.jndi.BitronixInitialContextFactory;
import java.util.TimeZone;
=======
package it.reply.orchestrator;
import java.util.TimeZone;
>>>>>>> REPLACE
<<<<<<< SEARCH
public class Application {
public static final Class<Application> applicationClass =... |
metidia/waterline | 0b15a5e070ddf0ab4f2a1cbda473facbe6b0dc69 | test/unit/model/association.setters.js | javascript | mit | Add unit tests on .add() and .remove() | var assert = require('assert'),
manyToManyFixture = require('../../support/fixtures/model/context.manyToMany.fixture'),
Model = require('../../../lib/waterline/model');
describe('instance methods', function() {
describe('association setters', function() {
////////////////////////////////////////////////... | var assert = require('assert'),
manyToManyFixture = require('../../support/fixtures/model/context.manyToMany.fixture'),
Model = require('../../../lib/waterline/model');
describe('instance methods', function() {
describe('association setters', function() {
////////////////////////////////////////////////... | 14 | 0 | 2 | add_only | --- a/test/unit/model/association.setters.js
+++ b/test/unit/model/association.setters.js
@@ -29,2 +29,10 @@
+ it('should allow new associations to be added using the add function and an array', function() {
+ var person = new model({ name: 'foobar' });
+
+ person.bars.add( [ 1, 2, 3 ] );
+ assert(p... | --- a/test/unit/model/association.setters.js
+++ b/test/unit/model/association.setters.js
@@ ... @@
+ it('should allow new associations to be added using the add function and an array', function() {
+ var person = new model({ name: 'foobar' });
+
+ person.bars.add( [ 1, 2, 3 ] );
+ assert(person.ass... | --- a/test/unit/model/association.setters.js
+++ b/test/unit/model/association.setters.js
@@ -29,2 +29,10 @@
CON
ADD it('should allow new associations to be added using the add function and an array', function() {
ADD var person = new model({ name: 'foobar' });
ADD
ADD person.bars.add( [ 1, 2, 3 ] );
... | <<<<<<< SEARCH
});
it('should allow new associations to be removed using the remove function', function() {
var person = new model({ name: 'foobar' });
=======
});
it('should allow new associations to be added using the add function and an array', function() {
var person = new model({ nam... |
ktorio/ktor | cecfee0ac22db51534bc7cbeb75097c731cba7f9 | ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt | kotlin | apache-2.0 | Use routing as a feature
| package org.jetbrains.ktor.components
import org.jetbrains.ktor.application.*
import org.jetbrains.ktor.routing.*
import kotlin.system.*
public open class ComponentApplication(config: ApplicationConfig) : Application(config) {
val container = StorageComponentContainer("Application")
val routing = Routing()
... | package org.jetbrains.ktor.components
import org.jetbrains.ktor.application.*
import org.jetbrains.ktor.features.*
import org.jetbrains.ktor.routing.*
import kotlin.system.*
public open class ComponentApplication(config: ApplicationConfig) : Application(config) {
val container = StorageComponentContainer("Applica... | 2 | 3 | 3 | mixed | --- a/ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt
+++ b/ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt
@@ -3,2 +3,3 @@
import org.jetbrains.ktor.application.*
+import org.jetbrains.ktor.features.*
import org.jetbrains.ktor.routing.*
... | --- a/ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt
+++ b/ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt
@@ ... @@
import org.jetbrains.ktor.application.*
+import org.jetbrains.ktor.features.*
import org.jetbrains.ktor.routing.*
@@ ...... | --- a/ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt
+++ b/ktor-features/ktor-components/src/org/jetbrains/ktor/components/ComponentApplication.kt
@@ -3,2 +3,3 @@
CON import org.jetbrains.ktor.application.*
ADD import org.jetbrains.ktor.features.*
CON import org.jetbrains.ktor.r... | <<<<<<< SEARCH
import org.jetbrains.ktor.application.*
import org.jetbrains.ktor.routing.*
import kotlin.system.*
public open class ComponentApplication(config: ApplicationConfig) : Application(config) {
val container = StorageComponentContainer("Application")
val routing = Routing()
val log = config.log.... |
nickgonzales/hyper | 00e46d7cdaf0e9ac17f1129521e9c780db1e00fe | examples/client.rs | rust | mit | chore(examples): Stop using deprecated std::os::args in example
As per this compiler warning
"warning: use of deprecated item: use std::env::args() instead, #[warn(deprecated)] on by default"
| #![feature(os, io)]
extern crate hyper;
use std::os;
use std::old_io::stdout;
use std::old_io::util::copy;
use hyper::Client;
fn main() {
let args = os::args();
match args.len() {
2 => (),
_ => {
println!("Usage: client <url>");
return;
}
};
let url = ... | #![feature(env, os, io)]
extern crate hyper;
use std::env;
use std::old_io::stdout;
use std::old_io::util::copy;
use hyper::Client;
fn main() {
let url = match env::args().nth(1) {
Some(url) => url,
None => {
println!("Usage: client <url>");
return;
}
};
l... | 12 | 7 | 3 | mixed | --- a/examples/client.rs
+++ b/examples/client.rs
@@ -1,5 +1,5 @@
-#![feature(os, io)]
+#![feature(env, os, io)]
extern crate hyper;
-use std::os;
+use std::env;
use std::old_io::stdout;
@@ -10,6 +10,5 @@
fn main() {
- let args = os::args();
- match args.len() {
- 2 => (),
- _ => {
+ let url... | --- a/examples/client.rs
+++ b/examples/client.rs
@@ ... @@
-#![feature(os, io)]
+#![feature(env, os, io)]
extern crate hyper;
-use std::os;
+use std::env;
use std::old_io::stdout;
@@ ... @@
fn main() {
- let args = os::args();
- match args.len() {
- 2 => (),
- _ => {
+ let url = match env::... | --- a/examples/client.rs
+++ b/examples/client.rs
@@ -1,5 +1,5 @@
DEL #![feature(os, io)]
ADD #![feature(env, os, io)]
CON extern crate hyper;
CON
DEL use std::os;
ADD use std::env;
CON use std::old_io::stdout;
@@ -10,6 +10,5 @@
CON fn main() {
DEL let args = os::args();
DEL match args.len() {
DEL 2 =>... | <<<<<<< SEARCH
#![feature(os, io)]
extern crate hyper;
use std::os;
use std::old_io::stdout;
use std::old_io::util::copy;
=======
#![feature(env, os, io)]
extern crate hyper;
use std::env;
use std::old_io::stdout;
use std::old_io::util::copy;
>>>>>>> REPLACE
<<<<<<< SEARCH
fn main() {
let args = os::args();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.