hash
stringlengths 40
40
| diff
stringlengths 131
26.7k
| message
stringlengths 7
694
| project
stringlengths 5
67
| split
stringclasses 1
value | diff_languages
stringlengths 2
24
|
---|---|---|---|---|---|
6a2a26ecc5427e5a97eb05f9b8844238a9a08084 | diff --git a/PyFunceble.py b/PyFunceble.py
index <HASH>..<HASH> 100755
--- a/PyFunceble.py
+++ b/PyFunceble.py
@@ -170,6 +170,9 @@ class PyFunceble(object):
else:
self.reset_counters()
AutoContinue().backup()
+ ExecutionTime('stop')
+ Percentage().log()
+
AutoSave(True)
CONFIGURATION['http_code'] = ''
@@ -3701,7 +3704,7 @@ if __name__ == '__main__':
'-v',
'--version',
action='version',
- version='%(prog)s 0.53.1-beta'
+ version='%(prog)s 0.53.2-beta'
)
ARGS = PARSER.parse_args() | Reintroduction of the percentage log at the end of file testing. | funilrys_PyFunceble | train | py |
4509c75b5db7d60745248fbaac727541a1d526f8 | diff --git a/Classes/TYPO3/Imagine/Aspect/PaletteInterfaceAspect.php b/Classes/TYPO3/Imagine/Aspect/PaletteInterfaceAspect.php
index <HASH>..<HASH> 100644
--- a/Classes/TYPO3/Imagine/Aspect/PaletteInterfaceAspect.php
+++ b/Classes/TYPO3/Imagine/Aspect/PaletteInterfaceAspect.php
@@ -31,7 +31,7 @@ class PaletteInterfaceAspect {
protected $packageManager;
/**
- * @Flow\Inject(setting="profile")
+ * @Flow\InjectConfiguration("profile")
* @var array
*/
protected $profiles = array(); | [TASK] Removed deprecated use of Inject for settings
This removes the use of the Inject annotation for settings and instead
uses the new InjectConfiguration annotation instead.
Change-Id: I<I>ec6c0a<I>e8f2a1ab1a<I>abf<I>fca
Related: FLOW-<I>
Releases: master | neos_imagine | train | php |
5b4b185ae1b8ce813170aa1e2e803589b370c669 | diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -45,7 +45,7 @@ After creating a spec for your root filesystem, you can execute a container
in your shell by running:
# cd /mycontainer
- # runv start start [ -b bundle ] <container-id>
+ # runv run [ -b bundle ] <container-id>
If not specified, the default value for the 'bundle' is the current directory.
'Bundle' is the directory where '` + specConfig + `' must be located.` | main.go: Replace start with run
start subcommand does not have "-b" flag. And it reads `state.json`, not `config.json`. It seems to be a mistake. | hyperhq_runv | train | go |
3c459266d257518229da041b7c1e01cdadeb30bd | diff --git a/examples/full/bundle.config.js b/examples/full/bundle.config.js
index <HASH>..<HASH> 100644
--- a/examples/full/bundle.config.js
+++ b/examples/full/bundle.config.js
@@ -88,9 +88,9 @@ module.exports = {
'gulp-uglify': {mangle: false},
'gulp-concat': {stat: {mode: 0666}},
'gulp-sourcemaps': {
- init: {debug: true},
- write: {addComment: false},
- destPath: 'maps/article', // overrides default 'maps'
+ init: {debug: true}, // default is {loadMaps: true}
+ write: {addComment: false}, // default is {}
+ destPath: 'maps/article', // default is 'maps'
scripts: {
init: {loadMaps: false},
write: {addComment: true} // overrides {addComment: false} | add some 'helpful' comments | dowjones_gulp-bundle-assets | train | js |
225a140055115350977f910dcd57e830f720bf8b | diff --git a/builder/virtualbox/common/driver_mock.go b/builder/virtualbox/common/driver_mock.go
index <HASH>..<HASH> 100644
--- a/builder/virtualbox/common/driver_mock.go
+++ b/builder/virtualbox/common/driver_mock.go
@@ -46,16 +46,16 @@ type DriverMock struct {
VersionResult string
VersionErr error
- LoadSnapshotsCalled []string
- LoadSnapshotsResult *VBoxSnapshot
- CreateSnapshotCalled []string
- CreateSnapshotError error
- HasSnapshotsCalled []string
- HasSnapshotsResult bool
+ LoadSnapshotsCalled []string
+ LoadSnapshotsResult *VBoxSnapshot
+ CreateSnapshotCalled []string
+ CreateSnapshotError error
+ HasSnapshotsCalled []string
+ HasSnapshotsResult bool
GetCurrentSnapshotCalled []string
GetCurrentSnapshotResult *VBoxSnapshot
- SetSnapshotCalled []*VBoxSnapshot
- DeleteSnapshotCalled []*VBoxSnapshot
+ SetSnapshotCalled []*VBoxSnapshot
+ DeleteSnapshotCalled []*VBoxSnapshot
}
func (d *DriverMock) CreateSATAController(vm string, controller string, portcount int) error { | Applied correct source format (got fmt) to builder\virtualbox\common\driver_mock.go | hashicorp_packer | train | go |
df987f278ee5bb059af890f9ee58b52579f0d42d | diff --git a/proteusisc/drivers/digilentdriver.py b/proteusisc/drivers/digilentdriver.py
index <HASH>..<HASH> 100644
--- a/proteusisc/drivers/digilentdriver.py
+++ b/proteusisc/drivers/digilentdriver.py
@@ -176,8 +176,7 @@ class DigilentAdeptController(CableDriver):
"""
t = time()
- code, res = self.bulkCommand(b'\x03\x02%c\x00'%(0x80|cmd),\
- 10 if return_tdo else 6)
+ code, res = self.bulkCommand(b'\x03\x02%c\x00'%(0x80|cmd), 10)
print("GET STATS TIME", time()-t)
if len(res) == 4:
count = struct.unpack('<I', res)[0]
@@ -187,7 +186,6 @@ class DigilentAdeptController(CableDriver):
# print("WRITTEN", count)
return count
elif len(res) == 8:
- assert len(res)==8,"WTF it is %s"%len(res)
written, read = struct.unpack('<II', res)
#print("WRITTEN", written)
#print("READ", read) | Fixed oerflow of usb data in digilent driver on some boards. | diamondman_proteusisc | train | py |
45cf412bbafdf00c1cacd424a7a90aa1cf424c1b | diff --git a/install.py b/install.py
index <HASH>..<HASH> 100644
--- a/install.py
+++ b/install.py
@@ -1544,7 +1544,7 @@ class Python(object):
def _get_pip_list_json_obj(self):
cmd = '{0} list --format json'.format(self._get_pip_cmd())
- json_str = Cmd.sh_e_out(cmd)
+ json_str = Cmd.sh_e_out(cmd).split('\n')[0]
json_obj = json.loads(json_str)
return json_obj | Discard extra lines when parsing pip JSON output
pip tends to append notices about new pip version being available
to the end of its standard output, e.g.:
{valid JSON string}
[notice] A new release of pip available: <I> -> <I>
[notice] To update, run: pip install --upgrade pip
Ignore those. | junaruga_rpm-py-installer | train | py |
b8f507775a451609d403559fdb5159e4519cb77b | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,10 @@
from setuptools import setup, find_packages
+
+from os.path import join, dirname
+import sys
+sys.path.insert(0, join(dirname(__file__), 'src'))
from cache.version import __version__
+sys.path.pop(0)
setup(
name="cache", | add some hackery to fix the install file | jneen_python-cache | train | py |
d16a65c1120c3658fdadbb345aabfa6ea92c065f | diff --git a/aws/resource_aws_route_test.go b/aws/resource_aws_route_test.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_route_test.go
+++ b/aws/resource_aws_route_test.go
@@ -408,7 +408,6 @@ func TestAccAWSRoute_IPv4_To_Instance(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
- ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSRouteDestroy,
Steps: []resource.TestStep{ | r/aws_route: Refactor acceptance tests in preparation for future fixes/enhancements. | terraform-providers_terraform-provider-aws | train | go |
a81d9bb530687c26636809cb86ea6828c00b8519 | diff --git a/db/sql.php b/db/sql.php
index <HASH>..<HASH> 100644
--- a/db/sql.php
+++ b/db/sql.php
@@ -25,6 +25,11 @@ namespace DB;
//! PDO wrapper
class SQL {
+ //@{ Error messages
+ const
+ E_PKey='Table %s does not have a primary key';
+ //@}
+
protected
//! UUID
$uuid,
@@ -337,6 +342,7 @@ class SQL {
}
return $rows;
}
+ user_error(sprintf(self::E_PKey,$table),E_USER_ERROR);
return FALSE;
}
diff --git a/db/sql/mapper.php b/db/sql/mapper.php
index <HASH>..<HASH> 100644
--- a/db/sql/mapper.php
+++ b/db/sql/mapper.php
@@ -25,11 +25,6 @@ namespace DB\SQL;
//! SQL data mapper
class Mapper extends \DB\Cursor {
- //@{ Error messages
- const
- E_Adhoc='Unable to process ad hoc field %s';
- //@}
-
protected
//! PDO wrapper
$db, | Emit error when table does not contain a primary key | bcosca_fatfree-core | train | php,php |
c227f048639fd2d111d1a986717e8e96703d94a5 | diff --git a/samples/TabBarSample.js b/samples/TabBarSample.js
index <HASH>..<HASH> 100644
--- a/samples/TabBarSample.js
+++ b/samples/TabBarSample.js
@@ -47,7 +47,7 @@ enyo.kind(
name: "DynamicTabBar",
fit: true,
components: [
- {name:"bar",kind: "onyx.TabBar"},
+ {name:"bar",kind: "onyx.TabBar", maxMenuHeight: 200},
{
style: "border: 2px solid grey; ",
components: [
diff --git a/samples/TabPanelSample.js b/samples/TabPanelSample.js
index <HASH>..<HASH> 100644
--- a/samples/TabPanelSample.js
+++ b/samples/TabPanelSample.js
@@ -49,7 +49,8 @@ enyo.kind({
},
{
kind:"DynamicTabPanel",
- name: 'dynamicTP'
+ name: 'dynamicTP',
+ maxMenuHeight: 200
},
{
kind: 'onyx.Button', | ENYO-<I>: limit the height of the menu on the samples | enyojs_onyx | train | js,js |
eca83000ac8502e05ce3ab5c8760fa6ca702c0b2 | diff --git a/bitshares/blockchainobject.py b/bitshares/blockchainobject.py
index <HASH>..<HASH> 100644
--- a/bitshares/blockchainobject.py
+++ b/bitshares/blockchainobject.py
@@ -31,6 +31,11 @@ class BlockchainObject(dict):
elif isinstance(data, dict):
self.identifier = data.get("id")
super().__init__(data)
+ elif isinstance(data, int):
+ # This is only for block number bascially
+ self.identifier = data
+ if not lazy and not self.cached:
+ self.refresh()
else:
self.identifier = data
parts = self.identifier.split(".") | [blockchainobject] treat integer arguments differently (e.g. for block numbers in Block()) | bitshares_python-bitshares | train | py |
a2fb649190ddd5e8339b184e36913a494f44144b | diff --git a/plugins/settag.js b/plugins/settag.js
index <HASH>..<HASH> 100644
--- a/plugins/settag.js
+++ b/plugins/settag.js
@@ -106,8 +106,8 @@ description: Set execution
@param {Noodles.Context}
@param {function=}
*/
-Set.prototype.execute = function(Template,Context,Callback){
- this.key.set(Template,Context,this.value,Callback);
+Set.prototype.execute = function(Template,Context){
+ this.key.set(Template,Context,this.value);
return '';
}; | removed support for callbacks from set tag. It should never need it. | nathanjsweet_Noodles | train | js |
f45346e5b470b52e2f8dbceaaca474f6f604cbb3 | diff --git a/core/phantomas.js b/core/phantomas.js
index <HASH>..<HASH> 100644
--- a/core/phantomas.js
+++ b/core/phantomas.js
@@ -72,7 +72,7 @@ var phantomas = function(params) {
// --cookie='bar=foo;domain=url'
// for multiple cookies, please use config.json `cookies`.
- if (params.cookie) {
+ if (typeof params.cookie === 'string') {
// Parse cookie. at minimum, need a key=value pair, and a domain.
// Domain attr, if unavailble, is created from `params.url` during | Add type check to params.cookie
Confirms that params.cookie is indeed a string so that invoking
.split() later doesn't cause errors. | macbre_phantomas | train | js |
92b0df4e79d75b3b3d0aa1d8677b1d9e1576be14 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -70,6 +70,7 @@ setup(
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Embedded Systems",
], | Add Python <I> to classifiers in setup.py. | mbedmicro_pyOCD | train | py |
ad60d77d1142f35c48060442b62f312bbbb9e764 | diff --git a/ai/models.py b/ai/models.py
index <HASH>..<HASH> 100644
--- a/ai/models.py
+++ b/ai/models.py
@@ -105,6 +105,8 @@ class SearchNodeCostOrdered(SearchNode):
class SearchNodeValueOrdered(SearchNode):
def __lt__(self, other):
+ # value must work inverted, because heapq sorts 1-9
+ # and we need 9-1 sorting
return -self.problem.value(self.state) < -self.problem.value(other.state) | Added explanation about - in value comparisson | simpleai-team_simpleai | train | py |
324c7155fd593a9645826e8f94101340f4e7cc77 | diff --git a/utils/config.js b/utils/config.js
index <HASH>..<HASH> 100644
--- a/utils/config.js
+++ b/utils/config.js
@@ -45,7 +45,8 @@ module.exports = {
domains: config.domains,
cookieDomain: (securityConfig.cookie ? securityConfig.cookie.domain : 'test.dev.gethuman.com'),
authDomain: authConfig.domain,
- authClientId: authConfig.clientId
+ authClientId: authConfig.clientId,
+ realtime: config.realtime
});
return config; | Adding realtime config to mobile | gethuman_pancakes-recipe | train | js |
937b599aae0d7e7bf5f5fef93ed342f03dbb55a2 | diff --git a/lib/mongodb.js b/lib/mongodb.js
index <HASH>..<HASH> 100644
--- a/lib/mongodb.js
+++ b/lib/mongodb.js
@@ -13,11 +13,20 @@ module.exports = function(self) {
function indexSlug(callback) {
self.pages.ensureIndex({ slug: 1 }, { safe: true, unique: true }, callback);
}
+ function indexSortTitle(callback) {
+ self.pages.ensureIndex({ sortTitle: 1 }, { safe: true }, callback);
+ }
+ // TODO: we clearly need separate collections per content type as sooner or
+ // later conflict over how to index properties of the same name is going
+ // to cause a problem
+ function indexStartDate(callback) {
+ self.pages.ensureIndex({ startDate: 1 }, { safe: true }, callback);
+ }
function indexTags(callback) {
self.pages.ensureIndex({ tags: 1 }, { safe: true }, callback);
}
self.pages = collection;
- async.series([indexSlug, indexTags], callback);
+ async.series([indexSlug, indexSortTitle, indexStartDate, indexTags], callback);
// ... more index functions
});
} | * Index startDate and sortTitle so A2 doesn't fall over with large databases | apostrophecms_apostrophe | train | js |
68a4a3a485c4f2466466a92f3ccb80b4ada10744 | diff --git a/test/Models/CatalogMemberSpec.js b/test/Models/CatalogMemberSpec.js
index <HASH>..<HASH> 100644
--- a/test/Models/CatalogMemberSpec.js
+++ b/test/Models/CatalogMemberSpec.js
@@ -105,5 +105,5 @@ describe('CatalogMember', function () {
expect(member.info[1].content).toBe('Another value');
}).then(done).otherwise(done.fail);
});
- })
+ });
}); | Fix eslint warning. | TerriaJS_terriajs | train | js |
eb8fcff9210b714280cff6981b0e0ba906ddf283 | diff --git a/src/data/Data.js b/src/data/Data.js
index <HASH>..<HASH> 100644
--- a/src/data/Data.js
+++ b/src/data/Data.js
@@ -44,7 +44,6 @@
* </dl>
*/
Data = function(name, definitions, options) {
- // TODO: Consider prefixing private variables and functions with '$$' instead (check Angular recommendation).
// The fully qualified name of the module and class.
this._class = name;
// This is list of members in order.
@@ -198,6 +197,16 @@
/**
* @ngdoc method
+ * @name getModuleAndClass
+ * @methodOf coa.data.class:Data
+ * @return {String} Fully qualified name of the module and class.
+ */
+ Data.prototype.getModuleAndClass = function() {
+ return this._class;
+ };
+
+ /**
+ * @ngdoc method
* @name getMembers
* @methodOf coa.data.class:Data
* @return {Array} A list of member type defintions.
diff --git a/src/data/Type.js b/src/data/Type.js
index <HASH>..<HASH> 100644
--- a/src/data/Type.js
+++ b/src/data/Type.js
@@ -323,7 +323,7 @@
required: true,
op: function(option, value) {
if (value instanceof Data) {
- return option === value._class;
+ return option === value.getModuleAndClass();
}
return value === null;
}, | Don't access private method from other class. | wigy_chronicles_of_angular | train | js,js |
1aaee5f3ea6e776b001cef0f54b2a9478e30b16d | diff --git a/lib/betfair/version.rb b/lib/betfair/version.rb
index <HASH>..<HASH> 100644
--- a/lib/betfair/version.rb
+++ b/lib/betfair/version.rb
@@ -1,3 +1,3 @@
module Betfair
- VERSION = "0.1.0"
+ VERSION = "0.2.0"
end | Bumped to version <I> | mikecmpbll_betfair | train | rb |
84d73793520f32fdd533ef0d0fe87f67edce056c | diff --git a/packages/lager/src/lib/lager.js b/packages/lager/src/lib/lager.js
index <HASH>..<HASH> 100644
--- a/packages/lager/src/lib/lager.js
+++ b/packages/lager/src/lib/lager.js
@@ -56,7 +56,7 @@ class Lager extends Pebo {
// Overide Pebo.fire() to log calls
this.fire = function() {
const nbListeners = this.events[arguments[0]] ? this.eventslength : 0;
- this.log.debug('Event ' + arguments[0] + ' has been fired for ' + nbListeners + ' listeners');
+ this.log.trace('Event ' + arguments[0] + ' has been fired for ' + nbListeners + ' listeners');
return originalFire.apply(this, arguments);
}.bind(this);
} | Change event log level from debug to trace | myrmex-org_myrmex | train | js |
f21522c4092c9ccf5a8c83e56f2c5c4ae3ddc1c8 | diff --git a/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java b/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java
index <HASH>..<HASH> 100644
--- a/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java
+++ b/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java
@@ -22,7 +22,8 @@ import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.events.RCTEventEmitter;
-import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -129,7 +130,8 @@ class FastImageViewManager extends SimpleViewManager<ImageViewWithUrl> implement
if (viewsForKey != null && !viewsForKey.contains(view)) {
viewsForKey.add(view);
} else if (viewsForKey == null) {
- VIEWS_FOR_URLS.put(key, Collections.singletonList(view));
+ List<ImageViewWithUrl> newViewsForKeys = new ArrayList<ImageViewWithUrl>(Arrays.asList(view));
+ VIEWS_FOR_URLS.put(key, newViewsForKeys);
}
ThemedReactContext context = (ThemedReactContext) view.getContext(); | Fix adding more views as listeners for a URL.
You cannot add items to a Collections.singleTonList... | DylanVann_react-native-fast-image | train | java |
223cb942f84e81516c989c84802cd72a4bde5e18 | diff --git a/tests/test_apps/exportbenchmark/src/exportbenchmark/SocketExporter.java b/tests/test_apps/exportbenchmark/src/exportbenchmark/SocketExporter.java
index <HASH>..<HASH> 100644
--- a/tests/test_apps/exportbenchmark/src/exportbenchmark/SocketExporter.java
+++ b/tests/test_apps/exportbenchmark/src/exportbenchmark/SocketExporter.java
@@ -35,6 +35,7 @@
package exportbenchmark;
import java.io.IOException;
+import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.DatagramChannel;
@@ -68,7 +69,11 @@ public class SocketExporter extends ExportClientBase {
port = Integer.parseInt(config.getProperty("socket.port", "5001"));
statsDuration = Integer.parseInt(config.getProperty("stats.duration", "5"));
- address = new InetSocketAddress(host, port);
+ if (host == "localhost") {
+ address = new InetSocketAddress(InetAddress.getLocalHost(), port);
+ } else {
+ address = new InetSocketAddress(host, port);
+ }
channel = DatagramChannel.open();
} | Changed how exporter retrieves localhost address to be more reliable | VoltDB_voltdb | train | java |
668c6c58a1066b75566e069fe66fc915e7b16780 | diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -48,7 +48,7 @@ copyright = u'2013, Aaron Gallagher'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-version = release = vcversioner.find_version().version
+version = release = vcversioner.find_version(version_file=None).version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. | Also don't write out excess version.txt files. | habnabit_vcversioner | train | py |
8599e6eb35d197b5bffb2944a09c55480b829c0f | diff --git a/aws/config.go b/aws/config.go
index <HASH>..<HASH> 100644
--- a/aws/config.go
+++ b/aws/config.go
@@ -145,7 +145,7 @@ type Config struct {
// NewConfig returns a new Config pointer that can be chained with builder methods to
// set multiple configuration values inline without using pointers.
//
-// svc := s3.New(aws.NewConfig().WithRegion("us-west-2").WithMaxRetries(10))
+// sess := session.New(aws.NewConfig().WithRegion("us-west-2").WithMaxRetries(10))
//
func NewConfig() *Config {
return &Config{} | Updated sample in config.go (#<I>) | aws_aws-sdk-go | train | go |
df11ec25a70ebf09fe45791b6da752bd338b366c | diff --git a/lib/twat/actions.rb b/lib/twat/actions.rb
index <HASH>..<HASH> 100644
--- a/lib/twat/actions.rb
+++ b/lib/twat/actions.rb
@@ -148,7 +148,7 @@ module Twat
end
def deentitize(text)
- {"<" => "<", ">" => ">", "&" => "&" }.each do |k,v|
+ {"<" => "<", ">" => ">", "&" => "&", """ => '"' }.each do |k,v|
text.gsub!(k, v)
end
text | Add more entities to replace
I'm sure I tested these and they worked :/ | richo_twat | train | rb |
3ff7c793afb5e25e04e4d4b4129ccdb811b95c63 | diff --git a/packages/selenium-ide/src/neo/IO/filesystem.js b/packages/selenium-ide/src/neo/IO/filesystem.js
index <HASH>..<HASH> 100644
--- a/packages/selenium-ide/src/neo/IO/filesystem.js
+++ b/packages/selenium-ide/src/neo/IO/filesystem.js
@@ -140,17 +140,19 @@ export function loadProject(project, file) {
});
} else if (type === FileTypes.TestCase) {
const { test, baseUrl } = migrateTestCase(contents);
- if (project.url && project.url !== baseUrl) {
+ if (!project.urls.includes(baseUrl)) {
ModalState.showAlert({
title: "Migrate test case",
description: `The test case you're trying to migrate has a different base URL (${baseUrl}) than the project's one. \nIn order to migrate the test case URLs will be made absolute.`,
confirmLabel: "Migrate",
cancelLabel: "Discard"
- }, (choseDownload) => {
- if (choseDownload) {
+ }, (choseMigration) => {
+ if (choseMigration) {
project.addTestCase(TestCase.fromJS(migrateUrls(test, baseUrl)));
}
});
+ } else {
+ project.addTestCase(TestCase.fromJS(test, baseUrl));
}
}
} catch (error) { | fixed an issue where testcases wouldnt migrate if baseUrl was empty | SeleniumHQ_selenium-ide | train | js |
f8b7a5ae01fedf09a423ef5f56a45eba8d10460a | diff --git a/sporco/admm/ccmod.py b/sporco/admm/ccmod.py
index <HASH>..<HASH> 100644
--- a/sporco/admm/ccmod.py
+++ b/sporco/admm/ccmod.py
@@ -5,7 +5,7 @@
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
-"""ADMM algorithm for the CCMOD problem"""
+"""ADMM algorithms for the Convolutional Constrained MOD problem"""
from __future__ import division
from __future__ import absolute_import
@@ -536,6 +536,7 @@ class ConvCnstrMOD(admm.ADMMEqual):
xfshp[dimN-1] = xfshp[dimN-1]//2 + 1
self.Xf = sl.pyfftw_empty_aligned(xfshp,
dtype=sl.complex_dtype(self.dtype))
+ self.Xf[:] = 0.0
if Z is not None:
self.setcoef(Z) | Bug fix: uninitialized Xf could be used as CG initial solution | bwohlberg_sporco | train | py |
6978493c8603140f5746e7e2ba675136c96125b6 | diff --git a/test-basic/suggest.js b/test-basic/suggest.js
index <HASH>..<HASH> 100644
--- a/test-basic/suggest.js
+++ b/test-basic/suggest.js
@@ -59,6 +59,7 @@ describe('suggest', function() {
.catch(done);
});
it('should handle default criteria', function(done) {
+ this.timeout(3000);
db.documents.suggest(
'aSuggest',
q.where( | Extend timeout for suggest test
Often fails due to timeout, extend from default <I> ms to <I> ms. | marklogic_node-client-api | train | js |
6a214ca3861cead82377a512c8464743acf79298 | diff --git a/lib/split/helper.rb b/lib/split/helper.rb
index <HASH>..<HASH> 100644
--- a/lib/split/helper.rb
+++ b/lib/split/helper.rb
@@ -1,6 +1,6 @@
module Split
module Helper
- def ab_test(experiment_name, *alternatives, &block)
+ def ab_test(experiment_name, *alternatives)
experiment = Split::Experiment.find_or_create(experiment_name, *alternatives)
if experiment.winner
ret = experiment.winner.name
@@ -21,8 +21,17 @@ module Split
end
end
- ret = yield(ret) if block_given?
- ret
+ if block_given?
+ if defined?(capture) # a block in a rails view
+ block = Proc.new { yield(ret) }
+ concat(capture(ret, &block))
+ false
+ else
+ yield(ret)
+ end
+ else
+ ret
+ end
end
def finished(experiment_name) | ab_test can now be passed a block in a rails view as well, closes #4 | splitrb_split | train | rb |
5e18e515c973b98ca58d20ae6b79c47bade25329 | diff --git a/src/basis/dom/event.js b/src/basis/dom/event.js
index <HASH>..<HASH> 100644
--- a/src/basis/dom/event.js
+++ b/src/basis/dom/event.js
@@ -98,7 +98,11 @@
init: function(event){
event = wrap(event);
- basis.object.extend(basis.object.complete(this, event), {
+ for (var name in event)
+ if (event.hasOwnProperty(name) && name in this == false)
+ this[name] = event[name];
+
+ basis.object.extend(this, {
event_: event,
sender: sender(event), | copy to dom event wrapper own event properties only | basisjs_basisjs | train | js |
1f527b867b9e485dfb21fe996861f78527cabb63 | diff --git a/protocol.go b/protocol.go
index <HASH>..<HASH> 100644
--- a/protocol.go
+++ b/protocol.go
@@ -39,9 +39,9 @@ var (
// The evented system of golem needs several steps to process incoming data:
// 1. Unpack
// 2. Unmarshal
-// For emitting data the process is reversed:
-// 1. Marshal
-// 2. Pack
+// For emitting data the process is reversed, but merged in a single function,
+// because evaluation the desired unmarshaled type is not necessary:
+// 1. MarshalAndPack
// The GetReadMode and GetWriteMode functions define what kind of Operation-Code
// the sockets will receive.
type Protocol interface { | Documentation for protocol interface update because of recent changes to methods. | trevex_golem | train | go |
3f8c91f1d1d2ab1252bf746077cdcf4de1a8b39b | diff --git a/salt/modules/win_useradd.py b/salt/modules/win_useradd.py
index <HASH>..<HASH> 100644
--- a/salt/modules/win_useradd.py
+++ b/salt/modules/win_useradd.py
@@ -316,7 +316,7 @@ def list_users():
for i in users:
add = 0
login = str(i['name'])
- info_dict=win32net.NetUserGetInfo('localhost', login, 3)
+ info_dict = win32net.NetUserGetInfo('localhost', login, 3)
j = j + 1
user_list.append(login)
return user_list | user proper spaces around '=' | saltstack_salt | train | py |
8dd14effba59e4816750d0009e644da1e44b073a | diff --git a/contrib/barcode/barcode.go b/contrib/barcode/barcode.go
index <HASH>..<HASH> 100644
--- a/contrib/barcode/barcode.go
+++ b/contrib/barcode/barcode.go
@@ -135,8 +135,8 @@ func RegisterDataMatrix(pdf barcodePdf, code string) string {
// RegisterPdf417 registers a barcode of type Pdf417 to the PDF, but not
// to the page. Use Barcode() with the return value to put the barcode on the
// page.
-func RegisterPdf417(pdf barcodePdf, code string) string {
- bcode := pdf417.Encode(code)
+func RegisterPdf417(pdf barcodePdf, code string, columns int, securityLevel int) string {
+ bcode := pdf417.Encode(code, columns, securityLevel)
return registerBarcode(pdf, bcode, nil)
} | Pass columns and security level to Encode method | jung-kurt_gofpdf | train | go |
e8b8daca486946870b73799d3333c12716945853 | diff --git a/doradus-server/src/main/java/com/dell/doradus/logservice/store/ChunkWriter.java b/doradus-server/src/main/java/com/dell/doradus/logservice/store/ChunkWriter.java
index <HASH>..<HASH> 100644
--- a/doradus-server/src/main/java/com/dell/doradus/logservice/store/ChunkWriter.java
+++ b/doradus-server/src/main/java/com/dell/doradus/logservice/store/ChunkWriter.java
@@ -4,6 +4,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
+import com.dell.doradus.common.FieldDefinition;
import com.dell.doradus.common.Utils;
import com.dell.doradus.olap.collections.MemoryStream;
import com.dell.doradus.olap.io.BSTR;
@@ -43,6 +44,7 @@ public class ChunkWriter {
public FieldBuilder getFieldBulider(BSTR field) {
FieldBuilder fb = m_fields.get(field);
if(fb == null) {
+ Utils.require(FieldDefinition.isValidFieldName(field.toString()), "Field " + field + " is not valid");
field = new BSTR(field);
fb = new FieldBuilder(field, getSize());
m_fields.put(field, fb); | don't allow illegal field names in logging service | QSFT_Doradus | train | java |
df92322d90ff4813fc5f655fe0e56e891835c61b | diff --git a/bin.js b/bin.js
index <HASH>..<HASH> 100755
--- a/bin.js
+++ b/bin.js
@@ -16,7 +16,7 @@
'use strict';
-const cli = require('./dist/cli');
+const cli = require('./lib/cli');
cli({
stdout: process.stdout, | fix(cli): Fix showstopper bug in bin.js
Forgot to change this from dist/cli to lib/cli after removing Babel. | markcornick_passwoid | train | js |
7a16c2b5ba084506fe3c3d5eb71b04cf7d118163 | diff --git a/lib/Spark/Core/Command/QueueWorker.php b/lib/Spark/Core/Command/QueueWorker.php
index <HASH>..<HASH> 100644
--- a/lib/Spark/Core/Command/QueueWorker.php
+++ b/lib/Spark/Core/Command/QueueWorker.php
@@ -17,7 +17,7 @@ use Monolog\Handler\StreamHandler;
use Kue\Worker;
use Kue\Queue;
-class QueueWorker extends \Kue\Command\Worker
+class QueueWorker extends \Kue\Command\WorkCommand
{
protected $silexApplication;
@@ -30,7 +30,7 @@ class QueueWorker extends \Kue\Command\Worker
{
parent::configure();
- $this->setName('queue:worker');
+ $this->setName('queue:work');
}
protected function execute(InputInterface $input, OutputInterface $output) | Rename command queue:worker -> queue:work | sparkframework_spark | train | php |
b27a7d25bb0d411085e5f229e1207de6b9045e57 | diff --git a/fontbakery-check-ttf.py b/fontbakery-check-ttf.py
index <HASH>..<HASH> 100755
--- a/fontbakery-check-ttf.py
+++ b/fontbakery-check-ttf.py
@@ -2286,12 +2286,12 @@ def main():
# ----------------------------------------------------
fb.new_check("Glyph names are all valid?")
- known_good_names = ['.notdef', '.null']
bad_names = []
# https://github.com/googlefonts/fontbakery/issues/938
# we should extend this list according to the opentype spec
for _, glyphName in enumerate(font.getGlyphOrder()):
- if glyphName in known_good_names:
+ if glyphName == '.notdef':
+ # This is an explicit exception in the glyph naming rules
continue
if not re.match(r'(?![.0-9])[a-zA-Z_][a-zA-Z_0-9]{,30}', glyphName):
bad_names.append(glyphName) | remove .null from list of known good glyph names
fixes issue #<I> | googlefonts_fontbakery | train | py |
7c73b28e6d332a14d3fce4ada754e54d01ed539d | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -442,6 +442,7 @@ setup(
maintainer='Oleg Hoefling',
maintainer_email='[email protected]',
url='https://github.com/mehcode/python-xmlsec',
+ project_urls={'Documentation': 'https://xmlsec.readthedocs.io', 'Source': 'https://github.com/mehcode/python-xmlsec',},
license='MIT',
keywords=['xmlsec'],
classifiers=[ | add source and documentation urls to package metadata | mehcode_python-xmlsec | train | py |
bc7ddbc75986b6c2633c977240e2cb19c4452033 | diff --git a/src/Types/PollAnswer.php b/src/Types/PollAnswer.php
index <HASH>..<HASH> 100644
--- a/src/Types/PollAnswer.php
+++ b/src/Types/PollAnswer.php
@@ -108,7 +108,7 @@ class PollAnswer extends BaseType
/**
* @param int[] $optionIds
*/
- public function setOptionIds( $optionIds)
+ public function setOptionIds($optionIds)
{
$this->optionIds = $optionIds;
} | Added support of `poll_answer` and `poll` attributes in Update class - code styling | TelegramBot_Api | train | php |
b51b2e0d83ced75daf9be06b6656f343448df6ee | diff --git a/connection.go b/connection.go
index <HASH>..<HASH> 100644
--- a/connection.go
+++ b/connection.go
@@ -256,7 +256,7 @@ func (c *Connection) ConnectionState() tls.ConnectionState {
/*
NotifyClose registers a listener for close events either initiated by an error
-accompaning a connection.close method or by a normal shutdown.
+accompanying a connection.close method or by a normal shutdown.
On normal shutdowns, the chan will be closed. | Fix typo in connection.go
accompaning > accompanying | streadway_amqp | train | go |
71ce629243470083f8ef911e173b6d07ba102e64 | diff --git a/src/UuidType.php b/src/UuidType.php
index <HASH>..<HASH> 100644
--- a/src/UuidType.php
+++ b/src/UuidType.php
@@ -80,6 +80,10 @@ class UuidType extends Type
if (empty($value)) {
return null;
}
+
+ if ($value instanceof UuidInterface) {
+ reutn $value->toString();
+ }
if ($value instanceof Uuid || Uuid::isValid($value)) {
return (string) $value; | Code against the interface declared in the phpdoc | ramsey_uuid-doctrine | train | php |
223d58527b053d606b8980766c0aedd749c58663 | diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnectionConfiguration.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnectionConfiguration.java
index <HASH>..<HASH> 100644
--- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnectionConfiguration.java
+++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnectionConfiguration.java
@@ -26,7 +26,7 @@ import org.jivesoftware.smack.ConnectionConfiguration;
* </p>
* <pre>
* {@code
- * XMPPTCPConnectionConfiguration conf = XMPPConnectionConfiguration.builder()
+ * XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()
* .setXmppDomain("example.org").setUsernameAndPassword("user", "password")
* .setCompressionEnabled(false).build();
* XMPPTCPConnection connection = new XMPPTCPConnection(conf); | Use correct class name in docs
XMPPConnectionConfiguration/XMPPTCPConnectionConfiguration | igniterealtime_Smack | train | java |
4386cd4145c15f03c61911d1c24c698d00db25b1 | diff --git a/airflow/contrib/example_dags/example_qubole_operator.py b/airflow/contrib/example_dags/example_qubole_operator.py
index <HASH>..<HASH> 100644
--- a/airflow/contrib/example_dags/example_qubole_operator.py
+++ b/airflow/contrib/example_dags/example_qubole_operator.py
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import airflow
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator, BranchPythonOperator
@@ -24,7 +25,7 @@ import random
default_args = {
'owner': 'airflow',
'depends_on_past': False,
- 'start_date': airflow.utils.dates.days_ago(2)
+ 'start_date': airflow.utils.dates.days_ago(2),
'email': ['[email protected]'],
'email_on_failure': False,
'email_on_retry': False | [AIRFLOW-<I>] Fix typo in example_qubole_operator
Closes #<I> from rupesh<I>/AIRFLOW-<I> | apache_airflow | train | py |
6b8356372f4169e15ed023264b18dbe294154ae3 | diff --git a/src/dryads/middleware/scserver.js b/src/dryads/middleware/scserver.js
index <HASH>..<HASH> 100644
--- a/src/dryads/middleware/scserver.js
+++ b/src/dryads/middleware/scserver.js
@@ -93,8 +93,8 @@ export default function scserver(command, context) {
const schedFn = (time, packets) => context.scserver.send.bundle(time, packets);
context.oscSched = new OSCSched(schedFn);
}
-
- context.oscSched.schedLoop(command.scserver.schedLoop, context.epoch);
+ // schedLoop is a function that returns the actual schedLoop function
+ context.oscSched.schedLoop(command.scserver.schedLoop(context), context.epoch);
}
// Preparation commands that get an OSC callback from the server. | fix(scserver middleware): schedLoop is a function maker, not the loop function | crucialfelix_supercolliderjs | train | js |
b8e4c19a22f9fef1a5c5f467b1fb232c0bf3708a | diff --git a/nMemcached.js b/nMemcached.js
index <HASH>..<HASH> 100644
--- a/nMemcached.js
+++ b/nMemcached.js
@@ -300,7 +300,7 @@ Client.config = {
// Add to queue as multiple get key key key key key returns multiple values
if( !multi ){
- queue.push( response[ key ] = dataSet);
+ queue.push( dataSet);
} else {
multi[ key ] = dataSet;
queue.push( multi ); | Patched the value parsing, i killed it when i fixed the multi get. | 3rd-Eden_memcached | train | js |
b90f4635c069f9d66d943189aa4f5d60592364a6 | diff --git a/app/controllers/postgresql_lo_streamer/lo_controller.rb b/app/controllers/postgresql_lo_streamer/lo_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/postgresql_lo_streamer/lo_controller.rb
+++ b/app/controllers/postgresql_lo_streamer/lo_controller.rb
@@ -4,10 +4,17 @@ module PostgresqlLoStreamer
class LoController < ActionController::Base
def stream
send_file_headers! configuration.options
+
+ object_identifier = params[:id].to_i
+ if !object_exists?(object_identifier)
+ self.status = 404
+ render :nothing => true and return
+ end
+
self.status = 200
self.response_body = Enumerator.new do |y|
connection.transaction do
- lo = connection.lo_open(params[:id].to_i, ::PG::INV_READ)
+ lo = connection.lo_open(object_identifier, ::PG::INV_READ)
while data = connection.lo_read(lo, 4096) do
y << data
end
@@ -16,6 +23,18 @@ module PostgresqlLoStreamer
end
end
+ def object_exists?(identifier)
+ begin
+ connection.lo_open(identifier, ::PG::INV_READ)
+ rescue PG::Error => e
+ if e.to_s.include? "does not exist"
+ return false
+ end
+ end
+
+ return true
+ end
+
def connection
@con ||= ActiveRecord::Base.connection.raw_connection
end | Set status code to <I> if object does not exist | diogob_postgresql_lo_streamer | train | rb |
26053a32c2e86974ceee5ae79f11ea979921eb2f | diff --git a/kubespawner/spawner.py b/kubespawner/spawner.py
index <HASH>..<HASH> 100644
--- a/kubespawner/spawner.py
+++ b/kubespawner/spawner.py
@@ -1853,7 +1853,7 @@ class KubeSpawner(Spawner):
self.log.info('Killed pod %s, will try starting singleuser pod again', self.pod_name)
except ReadTimeoutError:
if i < (retry_times - 1):
- self.log.warn(f'create_namespaced_pod read timeout on attempt {i+1} of {retry_times}')
+ self.log.warn(f'create_namespaced_pod for {self.user.name} timeout on attempt {i+1} of {retry_times}')
else:
raise
else: | Log whose create_namespaced_pod timed out | jupyterhub_kubespawner | train | py |
fd1b3111bf98a41b19457d5ab86e1d2a7517e140 | diff --git a/lib/grom/helpers.rb b/lib/grom/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/grom/helpers.rb
+++ b/lib/grom/helpers.rb
@@ -56,7 +56,7 @@ module Grom
end
def json_ld(data)
- [data] unless data.is_a?(Array)
+ data = [data] unless data.is_a?(Array)
json_ld = {}
json_ld["@context"] = data.first.context
json_ld["@graph"] = data.map do |object| | refactored json-ld to take a single object | ukparliament_grom | train | rb |
8dea0697aa3089de31f96c02d734d9ed05d3dac9 | diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index <HASH>..<HASH> 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
import os
import sys
import string
+import platform
from pkg_resources.extern.six.moves import map
@@ -763,6 +764,9 @@ class TestNamespaces:
pkg_resources._namespace_packages = saved_ns_pkgs
sys.path = saved_sys_path
+ issue591 = pytest.mark.xfail(platform.system()=='Windows', reason="#591")
+
+ @issue591
def test_two_levels_deep(self, symlinked_tmpdir):
"""
Test nested namespace packages
@@ -796,6 +800,7 @@ class TestNamespaces:
]
assert pkg1.pkg2.__path__ == expected
+ @issue591
def test_path_order(self, symlinked_tmpdir):
"""
Test that if multiple versions of the same namespace package subpackage | Mark failing tests as xfail until they can be resolved. Ref #<I>. | pypa_setuptools | train | py |
f7bdbaadc6a4a3db155c20954256940ceb2cfa83 | diff --git a/src/Command/BaseMaker.php b/src/Command/BaseMaker.php
index <HASH>..<HASH> 100644
--- a/src/Command/BaseMaker.php
+++ b/src/Command/BaseMaker.php
@@ -322,8 +322,8 @@ class BaseMaker extends Base
}
// Look for the generator token
- $this->fServicesHandle = fopen(static::SERVICE_PATH, "r+");;
- $bFound = false;
+ $this->fServicesHandle = fopen(static::SERVICE_PATH, 'r+');;
+ $bFound = false;
if ($this->fServicesHandle) {
$iLocation = 0;
while (($sLine = fgets($this->fServicesHandle)) !== false) {
@@ -338,12 +338,11 @@ class BaseMaker extends Base
if (!$bFound) {
fclose($this->fServicesHandle);
throw new ConsoleException(
- 'Services file does not contain the generator token (i.e // GENERATOR[' . $sToken . '])',
+ 'Services file does not contain the generator token (i.e // GENERATOR[' . $sToken . ']) ' .
'This token is required so that the tool can safely insert new definitions'
);
}
} else {
- fclose($this->fServicesHandle);
throw new ConsoleException(
'Failed to open the services file for reading and writing: ' . static::SERVICE_PATH
); | chore: Resolving exception throw and removing redundant call to fclose() | nails_module-console | train | php |
d379310f1178bb954e122d7d57dcea21ea32055d | diff --git a/spec/neo4j-server/e2e/cypher_session_spec.rb b/spec/neo4j-server/e2e/cypher_session_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/neo4j-server/e2e/cypher_session_spec.rb
+++ b/spec/neo4j-server/e2e/cypher_session_spec.rb
@@ -34,7 +34,7 @@ module Neo4j
it 'adds host and port to the connection object' do
connection = Neo4j::Session.current.connection
- expect(connection.port).to eq 7474
+ expect(connection.port).to eq ENV['NEO4J_URL'].split(':').last.to_i
expect(connection.host).to eq 'localhost'
end
end | Fixing tests when setting a different NEO4J_URL | neo4jrb_neo4j-core | train | rb |
386e957ff1d52e782581754a6b3486ef658d9c1d | diff --git a/bundle/DependencyInjection/EzSystemsEzPlatformSolrSearchEngineExtension.php b/bundle/DependencyInjection/EzSystemsEzPlatformSolrSearchEngineExtension.php
index <HASH>..<HASH> 100644
--- a/bundle/DependencyInjection/EzSystemsEzPlatformSolrSearchEngineExtension.php
+++ b/bundle/DependencyInjection/EzSystemsEzPlatformSolrSearchEngineExtension.php
@@ -59,7 +59,7 @@ class EzSystemsEzPlatformSolrSearchEngineExtension extends Extension
*
* @var string
*/
- const ENDPOINT_CLASS = 'eZ\\Publish\\Core\\Search\\Solr\\Gateway\\Endpoint';
+ const ENDPOINT_CLASS = 'EzSystems\\EzPlatformSolrSearchEngine\\Gateway\\Endpoint';
/**
* Endpoint service tag. | EZP-<I>: fixed: updated endpoint class constant | ezsystems_ezplatform-solr-search-engine | train | php |
9c353a7942a6c72776e769b9d30cc9a0ba1c4042 | diff --git a/iamine/core.py b/iamine/core.py
index <HASH>..<HASH> 100644
--- a/iamine/core.py
+++ b/iamine/core.py
@@ -36,12 +36,12 @@ class Miner(object):
self.hosts = hosts
self.config = config
self.debug = debug
- self.cookies = config.get('cookies')
+ self.cookies = config.get('cookies', {})
# Set User-agent.
uname = os.uname()
- _locale = locale.getlocale()[0][:2]
- lang = _locale[0][:2] if _locale else ''
+ _locale = locale.getlocale()[0]
+ lang = _locale[:2] if _locale else ''
py_version = '{0}.{1}.{2}'.format(*sys.version_info)
user = urllib.parse.unquote(config.get('cookies', {}).get('logged-in-user', ''))
ua = 'ia-mine/{0} ({1} {2}; N; {3}; {4}) Python/{5}'.format( | Fixed empty cookies/locale bugs. | jjjake_iamine | train | py |
ef59acb7a8fae6382c45311afa3ef5965834bbf1 | diff --git a/salt/output/nested.py b/salt/output/nested.py
index <HASH>..<HASH> 100644
--- a/salt/output/nested.py
+++ b/salt/output/nested.py
@@ -4,6 +4,7 @@ Recursively display nested data, this is the default outputter.
'''
# Import python libs
from numbers import Number
+import re
# Import salt libs
import salt.utils
@@ -37,7 +38,7 @@ class NestDisplay(object):
ret,
self.colors['ENDC'])
elif isinstance(ret, string_types):
- lines = ret.split('\n')
+ lines = re.split(r'\r?\n', ret)
for line in lines:
out += '{0}{1}{2}{3}{4}\n'.format(
' ' * indent, | BUG: Outputter "nested" swallows lines ending with \r\n | saltstack_salt | train | py |
1730be699cb5526f013345a2fae8b511758d2db8 | diff --git a/src/components/datatable/ScrollableView.js b/src/components/datatable/ScrollableView.js
index <HASH>..<HASH> 100644
--- a/src/components/datatable/ScrollableView.js
+++ b/src/components/datatable/ScrollableView.js
@@ -192,7 +192,7 @@ export class ScrollableView extends Component {
if(this.props.columns && this.props.columns.length) {
return (
<colgroup className="p-datatable-scrollable-colgroup">
- {this.props.columns.map((col, i) => <col key={col.props.field + '_' + i} style={col.props.headerStyle || col.props.style}/>)}
+ {this.props.columns.map((col, i) => <col key={col.props.field + '_' + i} style={col.props.headerStyle || col.props.style} className={col.props.headerClassName || col.props.className}/>)}
</colgroup>
);
} | Fixed #<I> - The className property of Column is not set to <col> element | primefaces_primereact | train | js |
e4a0789374469868bcf402574d637f701f45fe02 | diff --git a/pbj-schema-stores.php b/pbj-schema-stores.php
index <HASH>..<HASH> 100644
--- a/pbj-schema-stores.php
+++ b/pbj-schema-stores.php
@@ -7,11 +7,11 @@
* Registers all directories from all required packages which are of
* of the type "pbj-schema-store".
*
- * This file has been auto-generated by the Pbj Compiler on 2016-03-08 15:35:49 PST.
+ * This file has been auto-generated by the Pbj Compiler on 2016-03-09 17:38:17 CET.
*/
$vendorDir = realpath(__DIR__.'/vendor');
\Gdbots\Pbjc\SchemaStore::addDirs([
- __DIR__.'/schemas/',
+ __DIR__.'/schemas/'
]); | Updated pbj-schema-stores.php | gdbots_schemas | train | php |
8ddc9f3b383e54af735ee58c20a854e7308b534a | diff --git a/lib/dynamic_registrar/registrar.rb b/lib/dynamic_registrar/registrar.rb
index <HASH>..<HASH> 100644
--- a/lib/dynamic_registrar/registrar.rb
+++ b/lib/dynamic_registrar/registrar.rb
@@ -14,7 +14,11 @@ module DynamicRegistrar
attr_reader :default_registration_namespace
# The collection of callbacks currently registered within the Registrar
- attr_reader :registered_callbacks
+ def registered_callbacks
+ @@registration_guard.synchronize do
+ @registered_callbacks
+ end
+ end
# Create a new DynamicRegistrar::Registrar
# @param [ Symbol ] default_registration_namespace The default namespace in which to register callbacks. Should not be set to nil. | we need to ensure that we're not reading registered_callbacks structure while that structure is being modified | 3Crowd_dynamic_registrar | train | rb |
b0ac32ec398ea83f99f1a5c5c0c9d370f939c5d9 | diff --git a/ml-agents/mlagents/trainers/ppo/trainer.py b/ml-agents/mlagents/trainers/ppo/trainer.py
index <HASH>..<HASH> 100644
--- a/ml-agents/mlagents/trainers/ppo/trainer.py
+++ b/ml-agents/mlagents/trainers/ppo/trainer.py
@@ -254,7 +254,7 @@ class PPOTrainer(RLTrainer):
behavior_spec,
self.trainer_settings,
condition_sigma_on_obs=False, # Faster training for PPO
- separate_critic=behavior_spec.action_spec.is_continuous(),
+ separate_critic=True, # Match network architecture with TF
)
return policy | Cherry-pick separate critic only for PPO (#<I>) (#<I>) | Unity-Technologies_ml-agents | train | py |
7c571383dc906679faa9dc1570d1dff66f0cd02c | diff --git a/ipyrad/core/params.py b/ipyrad/core/params.py
index <HASH>..<HASH> 100644
--- a/ipyrad/core/params.py
+++ b/ipyrad/core/params.py
@@ -417,6 +417,15 @@ class Params(object):
# returns string values as a tuple ("", "") or ("",)
value = tuplecheck(value, str)
+ # Fix a weird bug which only shows up in step 7 during edge trim
+ # The call to tuplecheck returns different values if you have one
+ # overhang sequence and you do or don't include a comma after it.
+ # This makes it so that whether you have a comma after the sequence
+ # the values are the same. This is super hax, but I didn't want to
+ # monkey with the tuplecheck code because it's used all over the place.
+ if len(value) == 1:
+ value = (value[0], '')
+
# expand GBS for user if they set only one cutter
if (self.datatype == "GBS") & (len(value) == 1):
value = (value[0], value[0]) | Fix a nasty stupid bug setting the overhang sequence | dereneaton_ipyrad | train | py |
aea59ad5c11e6d38acd4378125670e572f789d82 | diff --git a/test/test.jml.js b/test/test.jml.js
index <HASH>..<HASH> 100644
--- a/test/test.jml.js
+++ b/test/test.jml.js
@@ -68,6 +68,24 @@ describe('Jamilih - jml', function () {
}),
'<label xmlns="http://www.w3.org/1999/xhtml"></label>'
);
+ xmlTesting.matchesXMLString(
+ jml('div', {
+ className: 'aClass'
+ }),
+ '<div xmlns="http://www.w3.org/1999/xhtml" class="aClass"></div>'
+ );
+ xmlTesting.matchesXMLString(
+ jml('div', {
+ class: 'aClass'
+ }),
+ '<div xmlns="http://www.w3.org/1999/xhtml" class="aClass"></div>'
+ );
+ xmlTesting.matchesXMLString(
+ jml('div', {
+ class: null
+ }),
+ '<div xmlns="http://www.w3.org/1999/xhtml"></div>'
+ );
let input = jml('input', {
checked: true
}); | - Testing (coverage): nullish className | brettz9_jamilih | train | js |
457092315d5a608d1ceaad140c6f48f33db6b7c6 | diff --git a/test/player.spec.js b/test/player.spec.js
index <HASH>..<HASH> 100644
--- a/test/player.spec.js
+++ b/test/player.spec.js
@@ -54,6 +54,7 @@ describe('YouTubePlayer', () => {
assert.equal(vm.videoId, 'videoId')
assert.equal(vm.playerWidth, '640')
assert.equal(vm.playerHeight, '360')
+ assert.equal(vm.host, 'https://www.youtube.com')
})
})
@@ -66,11 +67,12 @@ describe('YouTubePlayer', () => {
start: 30,
autoplay: 1
}
+ const host = 'https://www.youtube-nocookie.com'
const vm = new Vue({
mixins: [YouTubePlayer],
propsData: {
- videoId, playerHeight, playerWidth, playerVars
+ videoId, playerHeight, playerWidth, playerVars, host
}
})
vm.$mount()
@@ -79,6 +81,7 @@ describe('YouTubePlayer', () => {
assert.equal(vm.playerWidth, playerWidth)
assert.equal(vm.playerHeight, playerHeight)
assert.deepEqual(vm.playerVars, playerVars)
+ assert.equal(vm.host, host)
})
})
}) | added karma tests for host key | kaorun343_vue-youtube-embed | train | js |
361e474876a36bd26b9c90f2d5121004e233a2b7 | diff --git a/knxip/core.py b/knxip/core.py
index <HASH>..<HASH> 100644
--- a/knxip/core.py
+++ b/knxip/core.py
@@ -24,6 +24,10 @@ def parse_group_address(addr):
This allows to convert x/x/x and x/x address syntax to a numeric
KNX group address
"""
+
+ if addr is None:
+ raise KNXException("No address given")
+
res = None
if re.match('[0-9]+$', addr): | Raise an exception if no address is given | open-homeautomation_pknx | train | py |
d7fafc6f08135ac07223a789c2bcf790b2abad2c | diff --git a/lib/generators/pbw/scaffold_generator.rb b/lib/generators/pbw/scaffold_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/pbw/scaffold_generator.rb
+++ b/lib/generators/pbw/scaffold_generator.rb
@@ -19,8 +19,8 @@ module Pbw
def create_resources
generate "model", "#{class_name} #{attributes.map{|attr| "#{attr.name}:#{attr.type}"}.join(' ')}"
- generate "controller", "#{plural_name} index"
template "index.erb", "app/views/#{plural_name}/index.html.erb"
+ generate "controller", "#{plural_name} index --skip"
gsub_file "app/models/#{file_name}.rb", "class #{class_name}", "class #{class_name} < Pbw::Area"
gsub_file "app/models/#{file_name}.rb", "include Mongoid::Document", ""
end | Avoid overwrite issue of index when generating | monkeyx_pbw | train | rb |
3ba4ccf7d1a9c26c9786963c4c29f1b5c6c61dc7 | diff --git a/tools/lint.js b/tools/lint.js
index <HASH>..<HASH> 100644
--- a/tools/lint.js
+++ b/tools/lint.js
@@ -45,7 +45,7 @@ var BUILTINS = {
'HTMLCollection': true, 'NodeList': true, 'alert': true, 'console': true,
'Node':true, 'Symbol':true, 'NamedNodeMap':true, '_$rapyd$_eslice': true,
'Number':true, 'Boolean':true, 'encodeURIComponent':true, 'setTimeout': true,
- 'setInterval': true, 'setImmediate': true,
+ 'setInterval': true, 'setImmediate': true, 'clearTimeout': true
};
Object.keys(RapydScript.NATIVE_CLASSES).forEach(function (name) { BUILTINS[name] = true; }); | Linter: Add clearTimeout as global | kovidgoyal_rapydscript-ng | train | js |
90edc05523aa408e75e5a23443aa2eeb4f2e7df1 | diff --git a/azure-toolkit-libs/azure-toolkit-redis-lib/src/main/java/com/microsoft/azure/toolkit/redis/PricingTier.java b/azure-toolkit-libs/azure-toolkit-redis-lib/src/main/java/com/microsoft/azure/toolkit/redis/PricingTier.java
index <HASH>..<HASH> 100644
--- a/azure-toolkit-libs/azure-toolkit-redis-lib/src/main/java/com/microsoft/azure/toolkit/redis/PricingTier.java
+++ b/azure-toolkit-libs/azure-toolkit-redis-lib/src/main/java/com/microsoft/azure/toolkit/redis/PricingTier.java
@@ -63,7 +63,7 @@ public class PricingTier {
}
public int getSize() {
- return Integer.getInteger(this.capacity.substring(1));
+ return Integer.parseInt(this.capacity.substring(1));
}
private static final List<PricingTier> values = new ImmutableList.Builder<PricingTier>().add( | Fix a bug of Integer.getInteger doesn't parse the integer | Microsoft_azure-maven-plugins | train | java |
f5acc64060d2599ad6e984527c02b1ae28692822 | diff --git a/Behat/Context/Page/Page.php b/Behat/Context/Page/Page.php
index <HASH>..<HASH> 100644
--- a/Behat/Context/Page/Page.php
+++ b/Behat/Context/Page/Page.php
@@ -13,10 +13,4 @@ use SensioLabs\Behat\PageObjectExtension\PageObject\Page as BasePage;
class Page extends BasePage
{
- public function isOpen()
- {
- $this->verifyPage();
-
- return true;
- }
-}
\ No newline at end of file
+} | Removed isOpen() method implemented already in BehatPageObjectExtension | fsi-open_admin-bundle | train | php |
4412c5fa82793ae362041c04fc185fa2d66644fc | diff --git a/lib/whois/record/parser/whois.dns.hr.rb b/lib/whois/record/parser/whois.dns.hr.rb
index <HASH>..<HASH> 100644
--- a/lib/whois/record/parser/whois.dns.hr.rb
+++ b/lib/whois/record/parser/whois.dns.hr.rb
@@ -67,7 +67,7 @@ module Whois
property_supported :registrant_contacts do
node("descr") do |array|
- fuffa, zip, city = array[2].match(/([\d\s]+) (.+)/).to_a
+ _, zip, city = array[2].match(/([\d\s]+) (.+)/).to_a
Record::Contact.new(
:type => Whois::Record::Contact::TYPE_REGISTRANT,
:id => nil, | Fix warning: assigned but unused variable - fuffa | weppos_whois | train | rb |
23eb7b5fcba1cc5fba0efd56daeb200a6a352a51 | diff --git a/tasks/helpers/publish-helper.js b/tasks/helpers/publish-helper.js
index <HASH>..<HASH> 100644
--- a/tasks/helpers/publish-helper.js
+++ b/tasks/helpers/publish-helper.js
@@ -58,7 +58,7 @@ export function publishPackages() {
if (packageInfo && packageInfo.name) {
await npmPublish([packageInfo.dir]);
- const owners = ['mattroyal', 'gpleiss', 'stubbornella', 'ctaymor', 'atomanyih', 'kennyw1019', 'd-reinhold'];
+ const owners = ['stubbornella', 'ctaymor', 'atomanyih', 'kennyw1019', 'd-reinhold', 'cthompson'];
for (const owner of owners) {
await npmOwner(['add', owner, packageInfo.name]);
} | chore(gulp): update npm owners in publish packages | pivotal-cf_pivotal-ui | train | js |
9b95f6e01fa678670e92d2cace3ac6b8a81865fd | diff --git a/etrago/cluster/disaggregation.py b/etrago/cluster/disaggregation.py
index <HASH>..<HASH> 100644
--- a/etrago/cluster/disaggregation.py
+++ b/etrago/cluster/disaggregation.py
@@ -237,8 +237,8 @@ class Disaggregation:
print('---')
fs = (mc("sum"), mc("sum"))
for bt, ts in (
- ('generators', {'p': fs}),
- ('storage_units', {'p': fs, 'state_of_charge': fs})):
+ ('generators', {'p': fs, 'q': fs}),
+ ('storage_units', {'p': fs, 'state_of_charge': fs, 'q': fs})):
print("Attribute sums, {}, clustered - disaggregated:" .format(bt))
cnb = getattr(self.clustered_network, bt)
onb = getattr(self.original_network, bt) | Add 'q' values to disaggregation sanity checks | openego_eTraGo | train | py |
dcc99c20aae310f41b15bf164e52b3c06c688e1b | diff --git a/libraries/botbuilder-applicationinsights/setup.py b/libraries/botbuilder-applicationinsights/setup.py
index <HASH>..<HASH> 100644
--- a/libraries/botbuilder-applicationinsights/setup.py
+++ b/libraries/botbuilder-applicationinsights/setup.py
@@ -46,6 +46,7 @@ setup(
packages=[
"botbuilder.applicationinsights",
"botbuilder.applicationinsights.django",
+ "botbuilder.applicationinsights.flask",
],
install_requires=REQUIRES + TESTS_REQUIRES,
tests_require=TESTS_REQUIRES, | Add missing flask package (#<I>) | Microsoft_botbuilder-python | train | py |
f652cbd0ed21b1157e2c56d0ddfd53ffd90cb98f | diff --git a/gossip/privdata/coordinator.go b/gossip/privdata/coordinator.go
index <HASH>..<HASH> 100644
--- a/gossip/privdata/coordinator.go
+++ b/gossip/privdata/coordinator.go
@@ -677,9 +677,14 @@ func (bi *transactionInspector) inspectTransaction(seqInBlock uint64, chdr *comm
}
policy := bi.accessPolicyForCollection(chdr, ns.NameSpace, hashedCollection.CollectionName)
if policy == nil {
+ logger.Errorf("Failed to retrieve collection config for channel [%s], chaincode [%s], collection name [%s] for txID [%s]. Skipping.",
+ chdr.ChannelId, ns.NameSpace, hashedCollection.CollectionName, chdr.TxId)
continue
}
if !bi.isEligible(policy, ns.NameSpace, hashedCollection.CollectionName) {
+ logger.Debugf("Peer is not eligible for collection, channel [%s], chaincode [%s], "+
+ "collection name [%s], txID [%s] the policy is [%#v]. Skipping.",
+ chdr.ChannelId, ns.NameSpace, hashedCollection.CollectionName, chdr.TxId, policy)
continue
}
key := rwSetKey{ | [FAB-<I>] add logs for pvt data commit path
Add log messages to assist in troubleshouting and debuging of
private data commit and distribution.
Change-Id: I<I>d<I>a<I>a<I>fdb<I>e<I>f5e6ebd5 | hyperledger_fabric | train | go |
636b9aaa33e0a123a96879fec76c029db858b92f | diff --git a/biojava3-structure/src/main/java/org/biojava/bio/structure/quaternary/io/PDBBioUnitDataProvider.java b/biojava3-structure/src/main/java/org/biojava/bio/structure/quaternary/io/PDBBioUnitDataProvider.java
index <HASH>..<HASH> 100644
--- a/biojava3-structure/src/main/java/org/biojava/bio/structure/quaternary/io/PDBBioUnitDataProvider.java
+++ b/biojava3-structure/src/main/java/org/biojava/bio/structure/quaternary/io/PDBBioUnitDataProvider.java
@@ -30,8 +30,10 @@ public class PDBBioUnitDataProvider implements BioUnitDataProvider{
FileParsingParameters params = null;
- if ( cache != null)
- params = cache.getFileParsingParams();
+ if ( cache == null)
+ cache = new AtomCache();
+
+ params = cache.getFileParsingParams();
if ( params == null)
params = new FileParsingParameters(); | making sure cache can't be null | biojava_biojava | train | java |
fae03dc073aa83231847334b8d49aa7496b714bb | diff --git a/lib/scoped/index.js b/lib/scoped/index.js
index <HASH>..<HASH> 100644
--- a/lib/scoped/index.js
+++ b/lib/scoped/index.js
@@ -3,6 +3,10 @@ module.exports = scoped
var EventEmitter = require('events').EventEmitter
function scoped (state, api, type) {
+ if (typeof type === 'undefined') {
+ throw new TypeError('type must be set for scoped stores')
+ }
+
var emitter = new EventEmitter()
var scopedApi = { | fix: throw TypeError for store() without passing type
Calling store().add(...) without a type throws a TypeError: type must be set for scoped stores. | hoodiehq_hoodie-store-client | train | js |
c47d43c4ad3a1a3ff16e179fc733a9397ac8ebd4 | diff --git a/src/Baum/Move.php b/src/Baum/Move.php
index <HASH>..<HASH> 100644
--- a/src/Baum/Move.php
+++ b/src/Baum/Move.php
@@ -133,7 +133,7 @@ class Move {
*
* @return int
*/
- protected function updateStructure() {
+ public function updateStructure() {
list($a, $b, $c, $d) = $this->boundaries();
$connection = $this->node->getConnection(); | Make 'updateStructure' method public as we cannot call protected methods from closure scope. | etrepat_baum | train | php |
3440fa577f38b3010f702cf076f066fb84ce5a08 | diff --git a/concrete/src/Page/PageList.php b/concrete/src/Page/PageList.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Page/PageList.php
+++ b/concrete/src/Page/PageList.php
@@ -593,8 +593,7 @@ class PageList extends DatabaseItemList implements PagerProviderInterface, Pagin
$this->query->innerJoin('av', 'atSelectedTopics', 'atst', 'av.avID = atst.avID');
$this->query->andWhere('atst.treeNodeID = :TopicNodeID');
$this->query->setParameter('TopicNodeID', $treeNodeID);
- $this->query->select('distinct p.cID');
- $this->query->addSelect('p.cDisplayOrder');
+ $this->selectDistinct();
}
public function filterByBlockType(BlockType $bt)
@@ -699,6 +698,15 @@ class PageList extends DatabaseItemList implements PagerProviderInterface, Pagin
}
}
+ protected function selectDistinct()
+ {
+ $selects = $this->query->getQueryPart('select');
+ if ($selects[0] === 'p.cID') {
+ $selects[0] = 'distinct p.cID';
+ $this->query->select($selects);
+ }
+ }
+
/**
* @deprecated
*/ | Don't reset the selected fields in filterByTopic | concrete5_concrete5 | train | php |
30cc430803f067f8ef77178017109f968def3079 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -190,7 +190,7 @@ module.exports = function (browserify, options) {
return callback();
}).catch(function (err) {
self.push('console.error("' + err + '");');
- browserify.emit('error', err);
+ self.emit('error', err);
return callback();
});
}; | Fix bug where browserify didn't emit error | css-modules_css-modulesify | train | js |
45ca2a1f7962b55ecbe052c59b441f77e4895221 | diff --git a/audio/audio.go b/audio/audio.go
index <HASH>..<HASH> 100644
--- a/audio/audio.go
+++ b/audio/audio.go
@@ -402,7 +402,6 @@ func (p *Player) readToBuffer(length int) (int, error) {
if p.readingCh == nil {
p.readingCh = make(chan readingResult)
go func() {
- defer close(p.readingCh)
b := make([]uint8, length)
p.srcM.Lock()
n, err := p.src.Read(b)
@@ -422,19 +421,22 @@ func (p *Player) readToBuffer(length int) (int, error) {
case pos := <-p.seekCh:
p.buf = []uint8{}
p.pos = pos
- return 0, nil
case r := <-p.readingCh:
+ close(p.readingCh)
+ p.readingCh = nil
if r.err != nil {
return 0, r.err
}
if len(r.data) > 0 {
p.buf = append(p.buf, r.data...)
}
- p.readingCh = nil
- return len(p.buf), nil
case <-time.After(15 * time.Millisecond):
- return length, nil
+ if l := length - len(p.buf); l > 0 {
+ empty := make([]uint8, l)
+ p.buf = append(p.buf, empty...)
+ }
}
+ return len(p.buf), nil
}
func (p *Player) bufferToInt16(lengthInBytes int) []int16 { | audio: Bug fix: possible overflow and closing nil channel | hajimehoshi_ebiten | train | go |
eca87a247c9f91032bb9bbcb669092db97986240 | diff --git a/framework/src/play/src/main/java/play/mvc/Http.java b/framework/src/play/src/main/java/play/mvc/Http.java
index <HASH>..<HASH> 100644
--- a/framework/src/play/src/main/java/play/mvc/Http.java
+++ b/framework/src/play/src/main/java/play/mvc/Http.java
@@ -114,12 +114,16 @@ public class Http {
if (lang != null) {
return lang;
} else {
+ List<Lang> candidateLangs = new ArrayList<Lang>();
Cookie cookieLang = request.cookie(Play.langCookieName());
if (cookieLang != null) {
Lang lang = Lang.forCode(cookieLang.value());
- if (lang != null) return lang;
+ if (lang != null) {
+ candidateLangs.add(lang);
+ };
}
- return Lang.preferred(request().acceptLanguages());
+ candidateLangs.addAll(request().acceptLanguages());
+ return Lang.preferred(candidateLangs);
}
} | When PLAY_LANG is set; treat it as first accepted lang.
Instead of blindly taking the PLAY_LANG value into lang(),
we treat it as the most prioritary language for the user.
This way a user cannot set a language that is undefined for
the application. | playframework_playframework | train | java |
cd050b624ada521201073b094dfc98415ca00560 | diff --git a/modules/prebidServerBidAdapter.js b/modules/prebidServerBidAdapter.js
index <HASH>..<HASH> 100644
--- a/modules/prebidServerBidAdapter.js
+++ b/modules/prebidServerBidAdapter.js
@@ -490,6 +490,7 @@ const OPEN_RTB_PROTOCOL = {
if (utils.deepAccess(bid, 'ext.prebid.type') === VIDEO) {
bidObject.mediaType = VIDEO;
if (bid.adm) { bidObject.vastXml = bid.adm; }
+ if (bid.nurl) { bidObject.vastUrl = bid.nurl; }
} else { // banner
if (bid.adm && bid.nurl) {
bidObject.ad = bid.adm; | vastUrl is set based on nurl for video. (#<I>) | prebid_Prebid.js | train | js |
361fe949d4188e699cf9b524aaaa8477a932e396 | diff --git a/src/TooltipFactory.js b/src/TooltipFactory.js
index <HASH>..<HASH> 100644
--- a/src/TooltipFactory.js
+++ b/src/TooltipFactory.js
@@ -360,7 +360,9 @@ var addAssociation = function(tooltip) {
var addMutation = function(tooltip) {
var mutRow = tooltip.table.append('tr');
mutRow.append('td').text('Variant');
- var text = (tooltip.data.wildType === '-' ? tooltip.sequence.charAt(+tooltip.data.begin): tooltip.data.wildType)
+ var text = (tooltip.data.wildType === '-'
+ ? tooltip.sequence.substring(+tooltip.data.begin, +tooltip.data.end+1)
+ : tooltip.data.wildType)
+ ' > ' +
(tooltip.data.alternativeSequence === '-' ? 'del' : tooltip.data.alternativeSequence);
mutRow.append('td').text(text); | Fix bug on deletion variants tooltip. | ebi-uniprot_ProtVista | train | js |
c5073c9b4e1d308c7f51511d86f40819275a7ba2 | diff --git a/components/ekb/persistence-persist-edb/src/test/java/org/openengsb/core/ekb/persistence/persist/edb/PersistInterfaceServiceTest.java b/components/ekb/persistence-persist-edb/src/test/java/org/openengsb/core/ekb/persistence/persist/edb/PersistInterfaceServiceTest.java
index <HASH>..<HASH> 100644
--- a/components/ekb/persistence-persist-edb/src/test/java/org/openengsb/core/ekb/persistence/persist/edb/PersistInterfaceServiceTest.java
+++ b/components/ekb/persistence-persist-edb/src/test/java/org/openengsb/core/ekb/persistence/persist/edb/PersistInterfaceServiceTest.java
@@ -39,7 +39,7 @@ public class PersistInterfaceServiceTest {
service.setEdbService(edbService);
service.setEdbConverter(new EDBConverter(edbService));
- service.setEngineeringObjectEnhancer(enhancer);
+ service.setEnhancer(enhancer);
}
@Test | [OPENENGSB-<I>] fixed compilation error | openengsb_openengsb | train | java |
5aa4df86ef92e738113973a898938f24b6c5c612 | diff --git a/src/cookies-eu-banner.js b/src/cookies-eu-banner.js
index <HASH>..<HASH> 100644
--- a/src/cookies-eu-banner.js
+++ b/src/cookies-eu-banner.js
@@ -170,7 +170,7 @@
*/
removeBanner: function (wait) {
var banner = document.getElementById('cookies-eu-banner');
- banner.classList.add('before-remove');
+ banner.classList.add('cookies-eu-banner--before-remove');
setTimeout (function() {
if (banner && banner.parentNode) {
banner.parentNode.removeChild(banner); | feat: Update to BEM modifier-class
Updating new class before DOM-removal to `cookies-eu-banner--before-remove` | Alex-D_Cookies-EU-banner | train | js |
a798ae99973745d26237dc85e7384a0d4a010e57 | diff --git a/lib/friendly-errors/transformers/missing-loader.js b/lib/friendly-errors/transformers/missing-loader.js
index <HASH>..<HASH> 100644
--- a/lib/friendly-errors/transformers/missing-loader.js
+++ b/lib/friendly-errors/transformers/missing-loader.js
@@ -16,7 +16,7 @@ function isMissingLoaderError(e) {
return false;
}
- if (!e.message.includes('You may need an appropriate loader')) {
+ if (!/You may need an (appropriate|additional) loader/.test(e.message)) {
return false;
} | Fix "Missing loader" detection in Webpack <I>+ | symfony_webpack-encore | train | js |
8047afc8a798be3640a6640862185777e5bcde7e | diff --git a/src/Resources/public/js/FpJsFormValidator.js b/src/Resources/public/js/FpJsFormValidator.js
index <HASH>..<HASH> 100755
--- a/src/Resources/public/js/FpJsFormValidator.js
+++ b/src/Resources/public/js/FpJsFormValidator.js
@@ -1051,5 +1051,4 @@ var FpJsFormValidator = new function () {
window.FpJsBaseConstraint = FpJsBaseConstraint;
window.FpJsFormValidator = FpJsFormValidator;
-
-import './jquery.fpjsformvalidator';
+window.FpJsFormElement = FpJsFormElement; | set FpJsFormElement as global, removed auto jquery init | formapro_JsFormValidatorBundle | train | js |
abc052065765c6636aebf116389927b9ba9e5f3d | diff --git a/core-bundle/contao/drivers/DC_File.php b/core-bundle/contao/drivers/DC_File.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/drivers/DC_File.php
+++ b/core-bundle/contao/drivers/DC_File.php
@@ -471,7 +471,7 @@ class DC_File extends \DataContainer implements \editable
}
// Save the value if there was no error
- if ((strlen($varValue) || !$arrData['eval']['doNotSaveEmpty']) && $strCurrent !== $varValue)
+ if ((strlen($varValue) || !$arrData['eval']['doNotSaveEmpty']) && $strCurrent != $varValue)
{
$strKey = sprintf("\$GLOBALS['TL_CONFIG']['%s']", $this->strField);
$this->Config->update($strKey, $varValue); | [Core] Do not strictly compare values when determining whether to save or not in `DC_File` (see #<I>) | contao_contao | train | php |
9dbdc392d50bda1ee7c222247cde25f27733b53c | diff --git a/lib/fog/digitalocean/requests/compute/get_server_details.rb b/lib/fog/digitalocean/requests/compute/get_server_details.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/digitalocean/requests/compute/get_server_details.rb
+++ b/lib/fog/digitalocean/requests/compute/get_server_details.rb
@@ -16,7 +16,17 @@ module Fog
class Mock
def get_server_details(server_id)
- Fog::Mock.not_implemented
+ response = Excon::Response.new
+ response.status = 200
+
+ server = self.data[:servers].find { |s| s['id'] == server_id }
+
+ response.body = {
+ "status" => "OK",
+ "droplet" => self.data[:servers].find { |s| s['id'] == server_id }
+ }
+
+ response
end
end | [digitalocean|compute] added get_server_details mock code | fog_fog | train | rb |
8c7905f7694ccd799141d5e677a9e2ccb60b8f24 | diff --git a/pyjfuzz/core/pjf_mutators.py b/pyjfuzz/core/pjf_mutators.py
index <HASH>..<HASH> 100644
--- a/pyjfuzz/core/pjf_mutators.py
+++ b/pyjfuzz/core/pjf_mutators.py
@@ -142,7 +142,7 @@ class PJFMutators(object):
Perform the fuzzing
"""
buf = list(obj)
- FuzzFactor = (float(len(buf))*float(random.randint(1, 100))) / 100.0
+ FuzzFactor = random.randrange(1, len(buf))
numwrites=random.randrange(math.ceil((float(len(buf)) / FuzzFactor)))+1
for j in range(numwrites):
self.random_action(buf) | Fixed division by 0 with fuzzfactor | mseclab_PyJFuzz | train | py |
b622eaf97486ee66b2e8ed88c73244e598e502e1 | diff --git a/lib/did_you_mean/spell_checkers/method_name_checker.rb b/lib/did_you_mean/spell_checkers/method_name_checker.rb
index <HASH>..<HASH> 100644
--- a/lib/did_you_mean/spell_checkers/method_name_checker.rb
+++ b/lib/did_you_mean/spell_checkers/method_name_checker.rb
@@ -12,7 +12,7 @@ module DidYouMean
@receiver = exception.receiver
@binding = exception.frame_binding
@location = exception.backtrace_locations.first
- @ivar_names = VariableNameChecker.new(exception).ivar_names
+ @ivar_names = @binding.receiver.instance_variables
end
def candidates | The MethodNameChecker class shouldn't depend on the VariableNameChecker class | yuki24_did_you_mean | train | rb |
1483601f2e787203a39fddc51067890ff9bd6430 | diff --git a/controller/src/main/java/org/jboss/as/controller/operations/validation/OperationValidator.java b/controller/src/main/java/org/jboss/as/controller/operations/validation/OperationValidator.java
index <HASH>..<HASH> 100644
--- a/controller/src/main/java/org/jboss/as/controller/operations/validation/OperationValidator.java
+++ b/controller/src/main/java/org/jboss/as/controller/operations/validation/OperationValidator.java
@@ -247,13 +247,10 @@ public class OperationValidator {
}
private void checkRange(final ModelNode operation, final ModelNode description, final String paramName, final ModelType modelType, final ModelNode describedProperty, final ModelNode value) {
- if (!value.isDefined()) {
+ if (!value.isDefined() || value.getType() == ModelType.EXPRESSION) {
return;
}
if (describedProperty.hasDefined(MIN)) {
- if (value.getType() == ModelType.EXPRESSION) {
- return;
- }
switch (modelType) {
case BIG_DECIMAL: {
final BigDecimal min; | Exclude EXPRESSION nodes from all range validation in subsystem test, not just 'min' | wildfly_wildfly | train | java |
006c40089f6298710c513b33155876a400ad000e | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -299,6 +299,6 @@ setup(
'update': UpdateCommand},
ext_modules=[Extension(
name='yara',
- extra_compile_args = ['-std=c99'],
+ language='c++11',
include_dirs=['yara/libyara/include', 'yara/libyara/', '.'],
sources=['yara-python.c'])]) | Try compiling yara-python with C++ compiler. | VirusTotal_yara-python | train | py |
44ff2b205da7d189322ad6034f9a0386955bded5 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -253,15 +253,17 @@ var EventEmitter = function (options) {
_.extend(EventEmitter.prototype, {
parseRoute: function (route) {
if (_.isString(route)) {
- return route.split(this.delimiter);
- }
- else {
- return route;
+ route = route.split(this.delimiter);
}
+ return route;
}
, on: function (route, cb) {
route = this.parseRoute(route);
- this.emit(['newListener'], {
+ if (route.length === 1
+ && route[0] === 'newListener') {
+ route = ['newListener', '**'];
+ }
+ this.emit(['newListener'].concat(route), {
event: route
, listener: cb
});
@@ -272,7 +274,7 @@ _.extend(EventEmitter.prototype, {
route = this.parseRoute(route);
if (route[0] === 'newListener') {
if (_this._eventTree.hash.newListener) {
- return execTree(_this._eventTree.hash.newListener, msg);
+ return execCallbacks(route, _this._eventTree, msg);
}
}
else { | Pass specific subroute newListener tests. | plediii_HevEmitter | train | js |
c1936c656f3792bb6bd5e3083a54c5502cce73ec | diff --git a/greenhouse/compat.py b/greenhouse/compat.py
index <HASH>..<HASH> 100644
--- a/greenhouse/compat.py
+++ b/greenhouse/compat.py
@@ -21,11 +21,3 @@ def _find_main():
glet = glet.parent
return glet
main_greenlet = _find_main()
-
-# for whatever reason, os.mknod isn't working on FreeBSD 8 (at least)
-if sys.platform.lower().startswith("freebsd"):
- def mkfile(path):
- os.system("touch " + path)
-else:
- def mkfile(path):
- os.mknod(path, 0644) | never did get rid of that stupid thing, just the uses of it | teepark_greenhouse | train | py |
ab8deae516f3bdf9e5cb646782f5b0529805d555 | diff --git a/lib/less/functions/types.js b/lib/less/functions/types.js
index <HASH>..<HASH> 100644
--- a/lib/less/functions/types.js
+++ b/lib/less/functions/types.js
@@ -11,6 +11,9 @@ var isa = function (n, Type) {
return (n instanceof Type) ? Keyword.True : Keyword.False;
},
isunit = function (n, unit) {
+ if (unit === undefined) {
+ throw { type: "Argument", message: "missing the required second argument to isunit." };
+ }
return (n instanceof Dimension) && n.unit.is(unit.value !== undefined ? unit.value : unit) ? Keyword.True : Keyword.False;
};
functionRegistry.addMultiple({ | Handle the missing second argument to isunit() with an appropriate error message. | less_less.js | train | js |
34e963a757cb5b8c5f21d0c34f1ca055a0e0ad5f | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,7 @@ class optional_build_ext(build_ext):
setup_kwargs = dict(
name = 'wrapt',
- version = '1.1.3',
+ version = '1.1.4',
description = 'Module for decorators, wrappers and monkey patching.',
author = 'Graham Dumpleton',
author_email = '[email protected]', | Increment version to <I> in setup.py. | ionelmc_python-lazy-object-proxy | train | py |
f7a1b294e32a63a3bc457302004a3dbdf8404386 | diff --git a/tools/update-dependency-version.js b/tools/update-dependency-version.js
index <HASH>..<HASH> 100644
--- a/tools/update-dependency-version.js
+++ b/tools/update-dependency-version.js
@@ -39,14 +39,18 @@ glob(`${SERVER_FOLDER}/**/package.json`, null, (err, files) => {
}
});
});
- git.status()
- .then((status) => {
- if (status.modified.length){
- const fileArray = status.modified.filter(element => element.includes('package.json'));
- const addArray = fileArray.map(element => `./${element}`)
- git.add(addArray);
- git.commit('corrected packages version!');
- } else console.log('no change');
+ git.add('.')
+ .then(() => {
+ git.status()
+ .then((status) => {
+ if (status.modified.length){
+ const fileArray = status.modified.filter(element => element.includes('package.json'));
+ const addArray = fileArray.map(element => `./${element}`)
+ git.add(addArray);
+ git.commit('corrected packages version!');
+ } else console.log('no change');
+ })
+ .catch(err => console.error(err));
})
.catch(err => console.error(err));
}) | make sure to add before checking git status | cdmbase_fullstack-pro | train | js |
b551b980a1de8ef3a3a4aa6d93de25ed1b4238d9 | diff --git a/email/controllers/View.php b/email/controllers/View.php
index <HASH>..<HASH> 100644
--- a/email/controllers/View.php
+++ b/email/controllers/View.php
@@ -73,7 +73,9 @@ class View extends Base
/** @var Asset $oAsset */
$oAsset = Factory::service('Asset');
- $oAsset->load('debugger.min.css', Constants::MODULE_SLUG);
+ $oAsset
+ ->clear()
+ ->load('debugger.min.css', Constants::MODULE_SLUG);
Factory::service('View')
->setData([ | Clear Assets for ViewOnly email | nails_module-email | train | php |
b48b196910af22089c1f34ce5d0ad30147558293 | diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -265,6 +265,7 @@ module Rails
if respond_to?(:active_record)
active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false
active_record.allow_deprecated_singular_associations_name = false
+ active_record.sqlite3_adapter_strict_strings_by_default = true
end
if respond_to?(:action_dispatch)
@@ -285,10 +286,6 @@ module Rails
if respond_to?(:action_controller)
action_controller.allow_deprecated_parameters_hash_equality = false
end
-
- if respond_to?(:active_record)
- active_record.sqlite3_adapter_strict_strings_by_default = true
- end
else
raise "Unknown version #{target_version.to_s.inspect}"
end | Consolidate active_record <I> default loading
There appears to be no reason for these configs to be separate, and it makes
sense to group by framework. | rails_rails | train | rb |
5c763053a903d83e9e69df1f7ec59e0c386a3188 | diff --git a/pgi/util.py b/pgi/util.py
index <HASH>..<HASH> 100644
--- a/pgi/util.py
+++ b/pgi/util.py
@@ -220,7 +220,7 @@ def encode(string):
return string
-KWD_RE = re.compile("^(%s)$" % "|".join(keyword.kwlist))
+KWD_RE = re.compile("^(%s)$" % "|".join(keyword.kwlist + ["print", "exec"]))
def escape_identifier(text, reg=KWD_RE): | Escape Python 2 only keywords with Python 3 as well, so we expose the same API | pygobject_pgi | train | py |
Subsets and Splits