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
|
---|---|---|---|---|---|
00ffdeedef4a4b02d82f284c425bf1ebc5c25724
|
diff --git a/opal/browser/storage.rb b/opal/browser/storage.rb
index <HASH>..<HASH> 100644
--- a/opal/browser/storage.rb
+++ b/opal/browser/storage.rb
@@ -117,19 +117,21 @@ class Storage
def commit(&block)
autosave = @autosave
@autosave = false
+ result = nil
reload
begin
- block.call.tap {
- save
- @autosave = autosave
- }
+ result = block.call
+ save
rescue
reload
-
raise
+ ensure
+ @autosave = autosave
end
+
+ result
end
def to_h
|
storage: fix some minor issues with #commit
|
opal_opal-browser
|
train
|
rb
|
7d8bec487b34b50ffa8114ad6e38b3d4164b7722
|
diff --git a/src/Uploader/S3Uploader.php b/src/Uploader/S3Uploader.php
index <HASH>..<HASH> 100644
--- a/src/Uploader/S3Uploader.php
+++ b/src/Uploader/S3Uploader.php
@@ -39,7 +39,7 @@ class S3Uploader extends AbstractUploader
'Bucket' => $this->s3bucket,
'Key' => $this->path . '/' . $s3FileName,
'ContentType' => $contentType,
- 'ACL' => 'private',
+ 'ACL' => 'bucket-owner-full-control',
'ServerSideEncryption' => 'AES256',
'Body' => $content,
]);
|
s3 uploader - allow owner account full control
|
keboola_api-error-control
|
train
|
php
|
9995bc7b8d7d560419278e5111ce3af0451ed521
|
diff --git a/src/test/java/org/aeonbits/owner/serializable/TestSerialization.java b/src/test/java/org/aeonbits/owner/serializable/TestSerialization.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/aeonbits/owner/serializable/TestSerialization.java
+++ b/src/test/java/org/aeonbits/owner/serializable/TestSerialization.java
@@ -68,8 +68,6 @@ public class TestSerialization implements TestConstants {
MyConfig deserialized = deserialize(target);
assertEquals(cfg, deserialized);
- System.out.println(cfg);
- System.out.println(deserialized);
}
private MyConfig deserialize(File target) throws IOException, ClassNotFoundException {
|
removed System.out.println() from tests
|
lviggiano_owner
|
train
|
java
|
0ffeeda6f3416e951eddcc4c18cc7f5e5fccdec3
|
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index <HASH>..<HASH> 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -1456,6 +1456,30 @@ class DataFrame(NDFrame):
labels=[ilabels, clabels])
return Series(self.values.ravel(), index=index)
+ def delevel(self):
+ """
+ For DataFrame with multi-level index, return new DataFrame with labeling
+ information in the columns under names 'level_0', 'level_1', etc.
+
+ Note: experimental, subject ot API change
+
+ Returns
+ -------
+ deleveled : DataFrame
+ """
+ if not isinstance(self.index, MultiIndex):
+ raise Exception('this DataFrame does not have a multi-level index')
+
+ new_obj = self.copy()
+
+ zipped = zip(self.index.levels, self.index.labels)
+ for i, (lev, lab) in reversed(list(enumerate(zipped))):
+ new_obj.insert(0, 'label_%d' % i, np.asarray(lev).take(lab))
+
+ new_obj.index = np.arange(len(new_obj))
+
+ return new_obj
+
#----------------------------------------------------------------------
# Time series-related
|
ENH: added delevel method, not certain about name
|
pandas-dev_pandas
|
train
|
py
|
58805c11d1ce986a682552f164266bdb56c4d8b4
|
diff --git a/src/sap.m/src/sap/m/Tokenizer.js b/src/sap.m/src/sap/m/Tokenizer.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/Tokenizer.js
+++ b/src/sap.m/src/sap/m/Tokenizer.js
@@ -969,7 +969,8 @@ sap.ui.define(['jquery.sap.global', './library', 'sap/ui/core/Control', 'sap/ui/
type : Tokenizer.TokenChangeType.TokensChanged
});
- if (this.getParent() && this.getParent() instanceof sap.m.MultiInput) {
+ if (this.getParent() && this.getParent() instanceof sap.m.MultiInput && !this.getParent()._bUseDialog) {
+ // not set focus to MultiInput in phone mode
var $oParent = this.getParent().$();
$oParent.find("input").focus();
}
|
[FIX] sap.m.Tokenizer: not set focus back after token deletion in phone
mode
Change-Id: I5f<I>dc<I>bae2dd3c<I>f<I>d0c<I>dd2ba
|
SAP_openui5
|
train
|
js
|
641a694f5a03d988e92bd6e994487be423a64e0b
|
diff --git a/environment/src/main/java/jetbrains/exodus/log/Log.java b/environment/src/main/java/jetbrains/exodus/log/Log.java
index <HASH>..<HASH> 100644
--- a/environment/src/main/java/jetbrains/exodus/log/Log.java
+++ b/environment/src/main/java/jetbrains/exodus/log/Log.java
@@ -155,7 +155,6 @@ public final class Log implements Closeable {
} catch (ExodusException e) { // if an exception is thrown then last loggable wasn't read correctly
logging.error("Exception on Log recovery. Approved high address = " + approvedHighAddress, e);
}
- cache.clearRecentHits();
setHighAddress(approvedHighAddress);
}
flush(true);
|
got rid of the "recent hits" layer of LogCache
|
JetBrains_xodus
|
train
|
java
|
c6b3a2dde30166da09cfdbb055738e2cdb2cd484
|
diff --git a/blockstore/blockstored.py b/blockstore/blockstored.py
index <HASH>..<HASH> 100644
--- a/blockstore/blockstored.py
+++ b/blockstore/blockstored.py
@@ -415,6 +415,10 @@ def blockstore_name_preorder( name, privatekey, register_addr, tx_only=False, su
if blockchain_client_inst is None:
return {"error": "Failed to connect to blockchain UTXO provider"}
+ broadcaster_client_inst = get_tx_broadcaster()
+ if broadcaster_client_inst is None:
+ return {"error": "Failed to connect to blockchain transaction broadcaster"}
+
db = get_state_engine()
if consensus_hash is None:
@@ -452,7 +456,7 @@ def blockstore_name_preorder( name, privatekey, register_addr, tx_only=False, su
resp = {}
try:
resp = preorder_name(str(name), privatekey, str(register_addr), str(consensus_hash), blockchain_client_inst, \
- name_fee, testset=blockstore_opts['testset'], subsidy_public_key=public_key, tx_only=tx_only )
+ name_fee, blockchain_broadcaster=broadcaster_client_inst, testset=blockstore_opts['testset'], subsidy_public_key=public_key, tx_only=tx_only )
except:
return json_traceback()
|
Use the config-designated transaction broadcaster on name preorder.
|
blockstack_blockstack-core
|
train
|
py
|
c84bdc4664272eb9ca164abb03e9acae1ee6917e
|
diff --git a/test/SockBotTest.js b/test/SockBotTest.js
index <HASH>..<HASH> 100644
--- a/test/SockBotTest.js
+++ b/test/SockBotTest.js
@@ -766,7 +766,7 @@ describe('SockBot', () => {
test(spy);
messages.pollMessages.called.should.be.true;
});
- it('should schedule next message poll for three sedonds from now', () => {
+ it('should schedule next message poll for now', () => {
SockBot.internals.running = undefined;
config.core.pollMessages = true;
browser.login.yields(null, {});
@@ -775,10 +775,7 @@ describe('SockBot', () => {
spy = sinon.spy();
messages.pollMessages.yields(null);
test(spy);
- sandbox.clock.tick(2999);
- spy.called.should.be.false;
- sandbox.clock.tick(1);
- spy.called.should.be.true;
+ spy.called.should.equal(true);
});
});
describe('notifications', () => {
|
update test for change to messagebus polling
|
SockDrawer_SockBot
|
train
|
js
|
b91412c691cedb8cb604dbd52a2dde991091bc4f
|
diff --git a/pyroSAR/spatial/auxil.py b/pyroSAR/spatial/auxil.py
index <HASH>..<HASH> 100644
--- a/pyroSAR/spatial/auxil.py
+++ b/pyroSAR/spatial/auxil.py
@@ -127,7 +127,7 @@ def gdalwarp(src, dst, options):
out = None
-def gdalbuildvrt(src, dst, options):
+def gdalbuildvrt(src, dst, options=None):
"""
a simple wrapper for gdal.BuildVRT
@@ -145,6 +145,7 @@ def gdalbuildvrt(src, dst, options):
-------
"""
+ options = {} if options is None else options
out = gdal.BuildVRT(dst, src, options=gdal.BuildVRTOptions(**options))
out = None
|
gdalbuildvrt: added None as default for parameter options
|
johntruckenbrodt_spatialist
|
train
|
py
|
82facd42eea1c1e29ccfc096a500b47effb9c472
|
diff --git a/master/buildbot/reporters/bitbucket.py b/master/buildbot/reporters/bitbucket.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/reporters/bitbucket.py
+++ b/master/buildbot/reporters/bitbucket.py
@@ -80,8 +80,8 @@ class BitbucketStatusPush(ReporterBase):
def _create_default_generators(self):
return [
BuildStartEndStatusGenerator(
- start_formatter=MessageFormatter(subject=""),
- end_formatter=MessageFormatter(subject="")
+ start_formatter=MessageFormatter(subject="", template=''),
+ end_formatter=MessageFormatter(subject="", template='')
)
]
|
reporters: Set the template in default formatters of bitbucket status
Neither body nor subject are used later, so be explicit to make code
clearer.
|
buildbot_buildbot
|
train
|
py
|
1b060c52604f0e608fbb567b5165e02dbfabd330
|
diff --git a/lib/benchmark/bigo_job.rb b/lib/benchmark/bigo_job.rb
index <HASH>..<HASH> 100644
--- a/lib/benchmark/bigo_job.rb
+++ b/lib/benchmark/bigo_job.rb
@@ -86,7 +86,7 @@ module Benchmark
def sizes
(1..@increments).collect do |idx|
- @incrementor.call(idx)
+ @incrementor.call(idx).to_i
end
end
|
Incrementer should always return an integer
|
davy_benchmark-bigo
|
train
|
rb
|
5c9bcc5e401083697e414cec69f8eaafe5758c88
|
diff --git a/src/network/connection.spec.js b/src/network/connection.spec.js
index <HASH>..<HASH> 100644
--- a/src/network/connection.spec.js
+++ b/src/network/connection.spec.js
@@ -30,10 +30,8 @@ describe('Network > Connection', () => {
test('rejects the Promise in case of errors', async () => {
connection.host = invalidHost
- await expect(connection.connect()).rejects.toHaveProperty(
- 'message',
- 'Connection error: getaddrinfo ENOTFOUND kafkajs.test kafkajs.test:9092'
- )
+ const messagePattern = /Connection error: getaddrinfo ENOTFOUND kafkajs.test/
+ await expect(connection.connect()).rejects.toThrow(messagePattern)
expect(connection.connected).toEqual(false)
})
})
|
Fix the connection error test to work with NodeJS <I>.x
NodeJS <I>.x removed the (useless) 'host:port' part of the connection errors with
<URL>
|
tulios_kafkajs
|
train
|
js
|
71e8961b454e3cd170859d55ccd6aaa7a7bc2117
|
diff --git a/tests/helpers/async/assert-tooltip-properties.js b/tests/helpers/async/assert-tooltip-properties.js
index <HASH>..<HASH> 100644
--- a/tests/helpers/async/assert-tooltip-properties.js
+++ b/tests/helpers/async/assert-tooltip-properties.js
@@ -36,6 +36,8 @@ export default Ember.Test.registerAsyncHelper('assertTooltipProperties',
mouseOver(name);
} else if (expectedEvent === 'manual') {
click(selectorFor(name) + ' + input[type="checkbox"]');
+ } else if (expectedEvent === 'focus') {
+ triggerEvent(selectorFor(name), 'focus');
}
andThen(function() {
|
Add support for focus event in tooltip test helper
|
sir-dunxalot_ember-tooltips
|
train
|
js
|
1a2b918f2e89a52327f6d80c3cd58342b8c00e2c
|
diff --git a/lib/gclitest/testKeyboard.js b/lib/gclitest/testKeyboard.js
index <HASH>..<HASH> 100644
--- a/lib/gclitest/testKeyboard.js
+++ b/lib/gclitest/testKeyboard.js
@@ -343,15 +343,21 @@ exports.testIncrSelection = function() {
helpers.audit([
{
setup: 'tselarr <DOWN>',
- check: { hint: '2' }
+ check: { hints: '2' },
+ exec: {}
},
+ /*
+ // Bug 829516: GCLI up/down navigation over selection is sometimes bizarre
{
setup: 'tselarr <DOWN><DOWN>',
- check: { hint: '3' }
+ check: { hints: '3' },
+ exec: {}
},
+ */
{
setup: 'tselarr <DOWN><DOWN><DOWN>',
- check: { hint: '1' }
+ check: { hints: '1' },
+ exec: {}
}
]);
};
@@ -360,7 +366,7 @@ exports.testDecrSelection = function() {
helpers.audit([
{
setup: 'tselarr <UP>',
- check: { hint: '3' }
+ check: { hints: '3' }
}
]);
};
|
asynctypes-<I>: Comment out failing test
Some tests were not being run correctly due to a s/hint/hints/ bug
which caused us to raise bug <I>.
|
joewalker_gcli
|
train
|
js
|
55b2bafb2909eba36d96513acca168815e52a63c
|
diff --git a/mqemitter-mongodb.js b/mqemitter-mongodb.js
index <HASH>..<HASH> 100644
--- a/mqemitter-mongodb.js
+++ b/mqemitter-mongodb.js
@@ -27,14 +27,19 @@ function MQEmitterMongoDB (opts) {
this._db = null
- MongoClient.connect(url, function (err, db) {
- if (err) {
- that.status.emit('error', err)
- return
- }
- that._db = db
+ if (opts.db) {
+ that._db = opts.db
waitStartup()
- })
+ } else {
+ MongoClient.connect(url, function (err, db) {
+ if (err) {
+ return that.status.emit('error', err)
+ }
+
+ that._db = db
+ waitStartup()
+ })
+ }
this._started = false
this.status = new EE()
@@ -176,7 +181,6 @@ MQEmitterMongoDB.prototype.close = function (cb) {
if (that._opts.db) {
cb()
} else {
- // force close
that._db.close(cb)
that._db.unref()
}
|
Support reusing a connection.
|
mcollina_mqemitter-mongodb
|
train
|
js
|
98d8a48f53aaf4717440dd2a00c7ace26ea07137
|
diff --git a/lib/FSi/Component/DataGrid/Extension/Core/ActionExtension.php b/lib/FSi/Component/DataGrid/Extension/Core/ActionExtension.php
index <HASH>..<HASH> 100644
--- a/lib/FSi/Component/DataGrid/Extension/Core/ActionExtension.php
+++ b/lib/FSi/Component/DataGrid/Extension/Core/ActionExtension.php
@@ -13,7 +13,7 @@ namespace FSi\Component\DataGrid\Extension\Core;
use FSi\Component\DataGrid\DataGridAbstractExtension;
-class CoreExtension extends DataGridAbstractExtension
+class ActionExtension extends DataGridAbstractExtension
{
/**
* {@inheritdoc}
|
Fixed Core/ActionExtension class name
|
fsi-open_datagrid
|
train
|
php
|
3f16db18d0188c9fc7df1bbc70a29515ba98491d
|
diff --git a/src/Check/DB.php b/src/Check/DB.php
index <HASH>..<HASH> 100644
--- a/src/Check/DB.php
+++ b/src/Check/DB.php
@@ -47,10 +47,10 @@ class DB extends BaseCheck
$options['host'],
$options['port'] ?? ($this->dialect == 'mysql' ? '3306' : '5432')
);
-
- $this->user = $options['user'];
- $this->password = $options['password'];
}
+
+ $this->user = $options['user'];
+ $this->password = $options['password'];
}
}
|
fix user and password config for db check
|
ackly_x-php-health
|
train
|
php
|
2997533844ec8a7952eab304515e6181e83356ab
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,11 +3,12 @@
import os
import sys
+from io import open
from setuptools import setup
-def read_file(fname):
- with open(os.path.join(os.path.dirname(__file__), fname)) as r:
+def read_file(fname, encoding='utf-8'):
+ with open(os.path.join(os.path.dirname(__file__), fname), encoding=encoding) as r:
return r.read()
|
Explicitly state 'UTF-8' encoding in setup when reading files
|
rm-hull_luma.core
|
train
|
py
|
b3d4aeb0747a0e8bc2b5f1a0a23700627345e1f1
|
diff --git a/TVMaze/TVMaze.php b/TVMaze/TVMaze.php
index <HASH>..<HASH> 100644
--- a/TVMaze/TVMaze.php
+++ b/TVMaze/TVMaze.php
@@ -52,6 +52,26 @@ class TVMaze {
}
/**
+ * Takes in a show name with optional modifiers (akas)
+ * Outputs array of the MOST related show for that given name
+ *
+ * @param $show_name
+ *
+ * @return array
+ */
+ function singleSearchAkas($show_name)
+ {
+ $TVShow = false;
+ $url = self::APIURL . "/singlesearch/shows?q=" . rawurlencode($show_name) . '&embed=akas';
+ $shows = $this->getFile($url);
+
+ if (is_array($shows)) {
+ $TVShow = new TVShow($shows);
+ }
+ return array($TVShow);
+ }
+
+ /**
* Allows show lookup by using TVRage or TheTVDB ID
* site is the string of the website (either 'tvrage' or 'thetvdb') and the id is the id of the show on that respective site
*
@@ -192,7 +212,7 @@ class TVMaze {
return $allEpisodes;
}
-
+
/**
* Returns a single episodes information by its show ID, season and episode numbers
*
|
Add singleSearchAkas function to search for shows with akas embedded.
|
JPinkney_TVMaze-PHP-API-Wrapper
|
train
|
php
|
e836a7942f7e156b8ca00884a31356bf1598f851
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java b/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/impl/dmn/configuration/DmnEngineConfigurationBuilder.java
@@ -111,7 +111,7 @@ public class DmnEngineConfigurationBuilder {
protected List<DmnDecisionTableEvaluationListener> createCustomPostDecisionTableEvaluationListeners() {
ensureNotNull("dmnHistoryEventProducer", dmnHistoryEventProducer);
- ensureNotNull("historyLevel", historyLevel);
+ // note that the history level may be null - see CAM-5165
HistoryDecisionTableListener historyDecisionTableListener = new HistoryDecisionTableListener(dmnHistoryEventProducer, historyLevel);
|
fix(engine): fix failed tests when history level is auto
related to #<I>,CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
238a7c0b4ad353fc6f5547dc5dfaf825ba414273
|
diff --git a/src/org/parosproxy/paros/extension/filter/ExtensionFilter.java b/src/org/parosproxy/paros/extension/filter/ExtensionFilter.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/extension/filter/ExtensionFilter.java
+++ b/src/org/parosproxy/paros/extension/filter/ExtensionFilter.java
@@ -34,6 +34,7 @@
// ZAP: 2013/11/16 Issue 902 - Change all ExtensionAdaptor#hook(ExtensionHook) overriding methods
// to call the base implementation
// ZAP: 2014/01/28 Issue 207: Support keyboard shortcuts
+// ZAP: 2014/11/26 Fixed an issue in the implementation of searchFilterIndex.
package org.parosproxy.paros.extension.filter;
@@ -295,7 +296,7 @@ public class ExtensionFilter extends ExtensionAdaptor implements ProxyListener,
// http://en.wikipedia.org/wiki/Binary_search_algorithm#Recursive
if (max <= min) {
// set is empty, so return value showing not found
- return max + 1;
+ return -1;
}
// calculate midpoint to cut set in half
|
Changed the method ExtensionFilter.searchFilterIndex to return the expected index (-1) when the insertion index is at the end of the list, it was leading to an ArrayIndexOutOfBoundsException when the list was empty when loading the filters.
|
zaproxy_zaproxy
|
train
|
java
|
93dc46a95d67a6a0625a2c3d20e72fb6701153c4
|
diff --git a/dynesty/bounding.py b/dynesty/bounding.py
index <HASH>..<HASH> 100644
--- a/dynesty/bounding.py
+++ b/dynesty/bounding.py
@@ -53,6 +53,7 @@ except ImportError: # pragma: no cover
HAVE_KMEANS = False
# Alias for computing more robust/stable shrunk covariance estimates.
+DIMWARN, SPARSEWARN = False, False
try:
# Use the Oracle Approximating Shrinkage shrunk estimator.
# This is optimal for independent Normally-distributed data.
@@ -1219,14 +1220,16 @@ def bounding_ellipsoid(points, pointvol=0.):
cov = covariance(points)
if not HAVE_OAS:
- if npoints <= 2 * ndim:
+ if not SPARSEWARN and npoints <= 2 * ndim:
warnings.warn("Volume is sparsely sampled. MLE covariance "
"estimates and associated ellipsoid decompositions "
"might be unstable.")
- if ndim >= 50:
+ SPARSEWARN = True
+ if not DIMWARN and ndim >= 50:
warnings.warn("Dimensionality is large. MLE covariance "
"estimates and associated ellipsoid decompositions "
"might be unstable.")
+ DIMWARN = True
# When ndim = 1, `np.cov` returns a 0-d array. Make it a 1x1 2-d array.
if ndim == 1:
|
warnings quickfix
Added global variables to try and avoid sparse sampling and/or dimensional warnings from triggering more than once.
|
joshspeagle_dynesty
|
train
|
py
|
6a3978ad31cbd9d59ec3f77b88e6a38b011c07fd
|
diff --git a/scripts/import-external.py b/scripts/import-external.py
index <HASH>..<HASH> 100755
--- a/scripts/import-external.py
+++ b/scripts/import-external.py
@@ -1125,7 +1125,10 @@ if doucbspectra:
elif d == 4:
filename = td.contents[0].strip()
name = filename.split('-')[0]
- name = name[:2].upper() + name[2:]
+ if name[:2].upper() == 'SN':
+ name = name[:2].upper() + name[2:]
+ if len(name) == 7:
+ name = name[:6] + name[6].upper()
elif d == 5:
epoch = td.contents[0].strip()
year = epoch[:4]
|
should be getting case correct on iau sn from ucb spectra.
|
astrocatalogs_astrocats
|
train
|
py
|
1efdc00471be50b54da6067536445217d10a3196
|
diff --git a/lib/core/logger.js b/lib/core/logger.js
index <HASH>..<HASH> 100644
--- a/lib/core/logger.js
+++ b/lib/core/logger.js
@@ -24,7 +24,7 @@ Logger.prototype.error = function () {
return;
}
this.events.emit("log", "error", ...arguments);
- this.logFunction(...Array.from(arguments).map(t => t.red));
+ this.logFunction(...Array.from(arguments).map(t => t ? t.red : t));
this.writeToFile("[error]: ", ...arguments);
};
@@ -33,7 +33,7 @@ Logger.prototype.warn = function () {
return;
}
this.events.emit("log", "warning", ...arguments);
- this.logFunction(...Array.from(arguments).map(t => t.yellow));
+ this.logFunction(...Array.from(arguments).map(t => t ? t.yellow : t));
this.writeToFile("[warning]: ", ...arguments);
};
@@ -42,7 +42,7 @@ Logger.prototype.info = function () {
return;
}
this.events.emit("log", "info", ...arguments);
- this.logFunction(...Array.from(arguments).map(t => t.green));
+ this.logFunction(...Array.from(arguments).map(t => t ? t.green : t));
this.writeToFile("[info]: ", ...arguments);
};
|
fix console log for undefined params
|
embark-framework_embark
|
train
|
js
|
99176731550b057c3dae70481b5442987a52216e
|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -475,12 +475,13 @@ transports.longpoll = function(req, res) {
res.setHeader("content-type", "text/" +
// If it's JSONP, `jsonp` param is `true`.
(params.jsonp === "true" ? "javascript" : "plain") + "; charset=utf-8");
- // Resets the response, flags, timers as new exchange is supplied.
+ // Sets the response.
response = res;
- completed = written = false;
- clearTimeout(closeTimer);
// If the request is to `poll` after handshake.
if (req.params.when === "poll") {
+ // Resets flags, timers as new exchange is supplied.
+ completed = written = false;
+ clearTimeout(closeTimer);
// If aborted is `true` here, it means the user tried to abort the
// connection but it couldn't be done because the current response
// was already completed for other reason. So ends the new exchange.
|
Reset variables when it's required
|
vibe-project_vibe-protocol
|
train
|
js
|
adaeaffcf5edcb60b575732ec1c39c5798a4e75c
|
diff --git a/src/main/java/com/jayway/maven/plugins/android/phase05compile/NdkBuildMojo.java b/src/main/java/com/jayway/maven/plugins/android/phase05compile/NdkBuildMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/jayway/maven/plugins/android/phase05compile/NdkBuildMojo.java
+++ b/src/main/java/com/jayway/maven/plugins/android/phase05compile/NdkBuildMojo.java
@@ -73,7 +73,7 @@ public class NdkBuildMojo extends AbstractAndroidMojo {
*
* @parameter expression="${android.ndk.ndk-build-directory}" default="${basedir}";
*/
- private String ndkBuildDirectory = "";
+ private String ndkBuildDirectory;
/**
* <p>Parameter designed to pick up <code>-Dandroid.ndk.path</code> in case there is no pom with an
|
Fixed typo in ndk build directory config
|
simpligility_android-maven-plugin
|
train
|
java
|
79cb12454b73b61d4b81851ebd22330a443cca86
|
diff --git a/src/brackets.js b/src/brackets.js
index <HASH>..<HASH> 100644
--- a/src/brackets.js
+++ b/src/brackets.js
@@ -172,12 +172,6 @@ define(function(require, exports, module) {
$("#menu-debug-wordwrap").click(function() {
editor.setOption("lineWrapping", !(editor.getOption("lineWrapping")));
});
- $("#menu-debug-find").click(function() {
- CommandManager.execute(Commands.DEBUG_FIND);
- });
- $("#menu-debug-findnext").click(function() {
- CommandManager.execute(Commands.DEBUG_FINDNEXT);
- });
}
function initCommandHandlers() {
|
Oops, forgot to remove the handlers as well.
|
adobe_brackets
|
train
|
js
|
87c6fa379c917c9182732b4629ad6456750e2cd7
|
diff --git a/src/bots/actions.js b/src/bots/actions.js
index <HASH>..<HASH> 100644
--- a/src/bots/actions.js
+++ b/src/bots/actions.js
@@ -3,12 +3,12 @@ var template = require('./helpers/template.js');
var timeoutDuration = 10000;
var actions = {
- assert: require('./actions/assert.js').bind(casper),
- capture: require('./actions/capture.js').bind(casper),
- dom: require('./actions/dom.js').bind(casper),
- get: require('./actions/get.js').bind(casper),
- request: require('./actions/request.js').bind(casper),
- wait: require('./actions/wait.js').bind(casper)
+ assert: require('./actions/assert.js'),
+ capture: require('./actions/capture.js'),
+ dom: require('./actions/dom.js'),
+ get: require('./actions/get.js'),
+ request: require('./actions/request.js'),
+ wait: require('./actions/wait.js')
};
var config = function (casper, cwd) {
|
fix(actions): remove binding casper since casper is global
|
damonjs_damon
|
train
|
js
|
61743660492f31fe660da31b131d8f0461eccdd7
|
diff --git a/src/cf/manifest/manifest.go b/src/cf/manifest/manifest.go
index <HASH>..<HASH> 100644
--- a/src/cf/manifest/manifest.go
+++ b/src/cf/manifest/manifest.go
@@ -59,7 +59,7 @@ func (m Manifest) getAppMaps(data generic.Map) (apps []generic.Map, errs []error
for _, appData := range appMaps {
if !generic.IsMappable(appData) {
- errs = append(errs, errors.New("Expected application to be a dictionary"))
+ errs = append(errs, errors.New(fmt.Sprintf("Expected application to be a list of key/value pairs\nError occurred in manifest near:\n'%s'", appData)))
continue
}
|
prove the error message when manifest application isn't a list of key/value pairs
[Finishes #<I>]
|
cloudfoundry_cli
|
train
|
go
|
6aaed0a9c3ad8cd102fdf098dc1e626b64a12547
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -43,7 +43,7 @@ async function exec(
reject(new Error(data.stderr.join('').trim()))
} else {
const stdout = data.stdout.join('').trim()
- if (exitCode !== 0 && stdout.length === 0) {
+ if (exitCode !== 0) {
reject(new Error(`Process exited with non-zero code: ${exitCode}`))
} else {
resolve(stdout)
|
:bug: Check for exitCode only for stdout streams
|
steelbrain_exec
|
train
|
js
|
a4fc870c3f5554e003ffbdf40e73e03f253b962d
|
diff --git a/Sluggable/SluggableEntityManager.php b/Sluggable/SluggableEntityManager.php
index <HASH>..<HASH> 100644
--- a/Sluggable/SluggableEntityManager.php
+++ b/Sluggable/SluggableEntityManager.php
@@ -133,7 +133,6 @@ class SluggableEntityManager implements SluggableManagerInterface
if ($newSlug === $oldSlug) {
continue;
}
-
foreach ($this->slugHandlers as $slugHandler) {
$slugHandler->handle($newSlug, $slugSuffix, $em);
}
|
Fix sluggable entity manager class CS.
|
DarvinStudio_darvin-utils
|
train
|
php
|
baff8c8426587f98688afa1ab5df4f3d4afae2b8
|
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
index <HASH>..<HASH> 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
@@ -83,6 +83,8 @@ class SnapshotSource < ActiveRecord::Base
private
def self.split_newlines(input)
- input.split(/\r?\n|\r/)
+ # Don't limit number of returned fields and don't suppress trailing empty fields by setting second parameter to negative value.
+ # See http://jira.codehaus.org/browse/SONAR-2282
+ input.split(/\r?\n|\r/, -1)
end
end
|
SONAR-<I> Show last lines of source code, even if they are blank
|
SonarSource_sonarqube
|
train
|
rb
|
ffb47e151f50cf1ce0618e339b8e4a592d96845d
|
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
+++ b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
@@ -612,13 +612,24 @@ public class AboutJenkins extends Component {
int builds = 0;
// protected access: File buildDir = j.getBuildDir();
File buildDir = Jenkins.getInstance().getBuildDirFor(j);
+ boolean newFormat = new File(buildDir, "legacyIds").isFile(); // JENKINS-24380
File[] buildDirs = buildDir.listFiles();
if (buildDirs != null) {
for (File d : buildDirs) {
- if (mayBeDate(d.getName())) {
+ String name = d.getName();
+ if (newFormat) {
+ try {
+ Integer.parseInt(name);
+ if (d.isDirectory()) {
+ builds++;
+ }
+ } catch (NumberFormatException x) {
+ // something else
+ }
+ } else /* legacy format */if (mayBeDate(name)) {
// check for real
try {
- BUILD_FORMAT.parse(d.getName());
+ BUILD_FORMAT.parse(name);
if (d.isDirectory()) {
builds++;
}
|
[JENKINS-<I>] Updated to handle proposed new build directory format.
|
jenkinsci_support-core-plugin
|
train
|
java
|
4774a3504bb27a0a02773caa125a5d3ba7bb5d7c
|
diff --git a/remote-api.js b/remote-api.js
index <HASH>..<HASH> 100644
--- a/remote-api.js
+++ b/remote-api.js
@@ -31,13 +31,18 @@ function noop (err) {
}
}
+const promiseTypes = [
+ 'sync',
+ 'async'
+]
+
module.exports = function (obj, manifest, _remoteCall, bootstrap) {
obj = obj || {}
function remoteCall(type, name, args) {
var cb = isFunction (args[args.length - 1])
? args.pop()
- : type.endsWith('sync')
+ : promiseTypes.includes(type)
? null
: noop
var value
|
Change to disambiguate promise-supported types
|
ssbc_muxrpc
|
train
|
js
|
2ac5d5a5ec8b84bfead433160c827a68cb5cdb8b
|
diff --git a/src/ComposerScripts.php b/src/ComposerScripts.php
index <HASH>..<HASH> 100644
--- a/src/ComposerScripts.php
+++ b/src/ComposerScripts.php
@@ -10,6 +10,7 @@ use Composer\Script\Event;
use Composer\Script\ScriptEvents;
//https://github.com/laravel/framework/blob/9f313ce9bb5ad49a06ae78d33fbdd1c92a0e21f6/src/Illuminate/Foundation/ComposerScripts.php#L53
+//https://github.com/appzcoder/laravel-package-discovery/blob/master/src/ComposerScripts.php
class ComposerScripts implements EventSubscriberInterface, PluginInterface
{
|
Update ComposerScripts.php
|
ncou_Chiron-PackageDiscovery
|
train
|
php
|
def5167f8f99e4530940420f7a34c30224aa661d
|
diff --git a/packages/patternlab/styleguide/source/assets/js/modules/imageFill.js b/packages/patternlab/styleguide/source/assets/js/modules/imageFill.js
index <HASH>..<HASH> 100644
--- a/packages/patternlab/styleguide/source/assets/js/modules/imageFill.js
+++ b/packages/patternlab/styleguide/source/assets/js/modules/imageFill.js
@@ -21,6 +21,12 @@ export default (function (window, document, $, undefined) {
// Make the image the full width of the wrapper.
$thisMedia.css("width", wrapperWidth);
+ let iframe = $thisMedia.find('iframe');
+ if (iframe.length) {
+ setTimeout( function() {
+ iframe[0].contentWindow.postMessage('update', '*');
+ }, 300);
+ }
}
});
|
DP-<I> - response heigh issue with x-large (#<I>)
|
massgov_mayflower
|
train
|
js
|
81e367dc8f62da78baf8769876fedda4b2d9acf7
|
diff --git a/test/perf-tests.js b/test/perf-tests.js
index <HASH>..<HASH> 100644
--- a/test/perf-tests.js
+++ b/test/perf-tests.js
@@ -13,7 +13,7 @@ function staticServerPerfHtmlUrl (file) {
const FIXTURES = [
{
- threshold: 1700,
+ threshold: 1900,
name: 'stripe'
},
{
@@ -25,7 +25,7 @@ const FIXTURES = [
name: 'dn'
},
{
- threshold: 3800,
+ threshold: 4600,
name: 'guardian'
},
{
|
tests: bump thresholds for performance test execution times
|
pocketjoso_penthouse
|
train
|
js
|
9a94f81b99f0ead98d307ec8866d902d0c96453a
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -171,7 +171,7 @@ else:
'numpy >= 1.11.3',
'numexpr >= 2.6.1',
'python-casacore >= 2.1.2',
- "{} >= 1.2.0".format(tensorflow_package),
+ "{} >= 1.2.1".format(tensorflow_package),
]
from install.tensorflow_ops_ext import (BuildCommand,
|
Upgrade to tensorflow <I> (#<I>)
|
ska-sa_montblanc
|
train
|
py
|
fe90616071ac0253d8637d42212ca7cfced0c391
|
diff --git a/src/saml2/client.py b/src/saml2/client.py
index <HASH>..<HASH> 100644
--- a/src/saml2/client.py
+++ b/src/saml2/client.py
@@ -309,7 +309,11 @@ class Saml2Client(object):
return self.config.single_sign_on_services(eids.keys()[0])[0]
def service_url(self, binding=BINDING_HTTP_POST):
- return self.config.endpoint("assertion_consumer_service", binding)
+ _res = self.config.endpoint("assertion_consumer_service", binding)
+ if _res:
+ return _res[0]
+ else:
+ return None
def _my_name(self):
return self.config.name
|
made endpoint() return a list of endpoints instead of just one
|
IdentityPython_pysaml2
|
train
|
py
|
b4d1f348d81b54226542d0f83dca6fe08c07c7db
|
diff --git a/vdf/__init__.py b/vdf/__init__.py
index <HASH>..<HASH> 100755
--- a/vdf/__init__.py
+++ b/vdf/__init__.py
@@ -8,7 +8,7 @@ from __future__ import print_function
#
# use at your own risk
-__version__ = "1.1"
+__version__ = "1.2"
import re
import sys
|
bumped to <I> just for pipy
|
ValvePython_vdf
|
train
|
py
|
53846a15de94faf3e9f5b9ad00ad54730bf1190e
|
diff --git a/src/app/services/influxdb/influxdbDatasource.js b/src/app/services/influxdb/influxdbDatasource.js
index <HASH>..<HASH> 100644
--- a/src/app/services/influxdb/influxdbDatasource.js
+++ b/src/app/services/influxdb/influxdbDatasource.js
@@ -23,8 +23,7 @@ function (angular, _, kbn) {
};
}
- InfluxDatasource.prototype.query = function(options) {
-
+ InfluxDatasource.prototype.query = function(filterSrv, options) {
var promises = _.map(options.targets, function(target) {
var query;
|
fixed issue with influxdb datasource introduced in recent filterSrv refactoring
|
grafana_grafana
|
train
|
js
|
437a98b821a31d4495e96c2a21921ad87a7d18d5
|
diff --git a/driver/src/test/unit/org/mongodb/Fixture.java b/driver/src/test/unit/org/mongodb/Fixture.java
index <HASH>..<HASH> 100644
--- a/driver/src/test/unit/org/mongodb/Fixture.java
+++ b/driver/src/test/unit/org/mongodb/Fixture.java
@@ -70,7 +70,7 @@ public final class Fixture {
}
public static boolean serverVersionAtLeast(final List<Integer> versionArray) {
- return getCluster().getDescription().getPrimaries().get(0).getVersion().compareTo(new ServerVersion(versionArray)) >= 0;
+ return getCluster().getDescription().getAny().get(0).getVersion().compareTo(new ServerVersion(versionArray)) >= 0;
}
static class ShutdownHook extends Thread {
|
Fixing serverVersionAtLeast to consider any server, not just a primary.
|
mongodb_mongo-java-driver
|
train
|
java
|
a73d224a46b608f557d23dba1435f4d6d396eb91
|
diff --git a/src/createServer.js b/src/createServer.js
index <HASH>..<HASH> 100644
--- a/src/createServer.js
+++ b/src/createServer.js
@@ -35,6 +35,7 @@ function createIndex(mountNode) {
'<html>',
' <head>',
' <title>kotatsu</title>',
+ ' <meta charset="utf-8" />',
' <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">',
' </head>',
' <body>',
|
utf8 encoding by default to add unicode support ?
|
Yomguithereal_kotatsu
|
train
|
js
|
3bc0a250d72fa703acca41e1a6d4d27277151777
|
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index <HASH>..<HASH> 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -1,7 +1,7 @@
'use strict';
// version of docker images
-const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v2.5.4';
+const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v2.5.5';
const DOCKER_JAVA_JRE = 'openjdk:8-jre-alpine';
const DOCKER_MYSQL = 'mysql:5.7.13'; // mysql.5.7.14+ doesn't work well with zoned date time, see https://github.com/jhipster/generator-jhipster/pull/4038
const DOCKER_MARIADB = 'mariadb:10.1.17';
|
Update to JHipster Registry <I>
|
jhipster_generator-jhipster
|
train
|
js
|
d2072cb912fbc641e05b53b94252e9e50ea8413b
|
diff --git a/blockstack_client/config.py b/blockstack_client/config.py
index <HASH>..<HASH> 100644
--- a/blockstack_client/config.py
+++ b/blockstack_client/config.py
@@ -520,12 +520,21 @@ def write_config_file(opts, config_file):
Raise on error
"""
+ # these can sometimes be left over from older clients' calls to configure().
if 'blockstack-client' in opts:
- assert 'path' not in opts['blockstack-client']
- assert 'dir' not in opts['blockstack-client']
+ if 'path' in opts['blockstack-client']:
+ del opts['blockstack-client']['path']
- assert 'path' not in opts
- assert 'dir' not in opts
+ if 'dir' in opts['blockstack-client']:
+ del opts['blockstack-client']['dir']
+
+
+ # these can sometimes be left over from older clients' calls to configure().
+ if 'path' in opts:
+ del opts['path']
+
+ if 'dir' in opts:
+ del opts['dir']
parser = SafeConfigParser()
|
erase 'path' and 'dir'; don't bail on assert
|
blockstack_blockstack-core
|
train
|
py
|
67646c18c031403b64d1c83c3010172205b6c89e
|
diff --git a/lib/puppet/type/file/mode.rb b/lib/puppet/type/file/mode.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/type/file/mode.rb
+++ b/lib/puppet/type/file/mode.rb
@@ -60,6 +60,10 @@ module Puppet
EOT
validate do |value|
+ if !value.is_a?(String)
+ Puppet.deprecation_warning("Non-string values for the file mode property are deprecated. It must be a string, " \
+ "either a symbolic mode like 'o+w,a+r' or an octal representation like '0644' or '755'.")
+ end
unless value.nil? or valid_symbolic_mode?(value)
raise Puppet::Error, "The file mode specification is invalid: #{value.inspect}"
end
|
(PUP-<I>) Add deprecation warning for non-string mode property values
The 'future' (4.x) parser treats literal numbers as actual numbers instead of
strings as the 3.x parser did. This makes file resources that use unquoted
mode values behave strangely (see PUP-<I>) so we are deprecating non-String
values for mode.
So this change adds a deprecation warning for non-String values of mode
when running with --parser future.
|
puppetlabs_puppet
|
train
|
rb
|
07939e19ba732fddcbc26b5daf0ca1b808454795
|
diff --git a/src/com/google/javascript/jscomp/CheckSuspiciousCode.java b/src/com/google/javascript/jscomp/CheckSuspiciousCode.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/CheckSuspiciousCode.java
+++ b/src/com/google/javascript/jscomp/CheckSuspiciousCode.java
@@ -43,7 +43,7 @@ final class CheckSuspiciousCode extends AbstractPostOrderCallback {
static final DiagnosticType SUSPICIOUS_COMPARISON_WITH_NAN =
DiagnosticType.warning(
"JSC_SUSPICIOUS_NAN",
- "Comparison again NaN is always false. Did you mean isNaN()?");
+ "Comparison against NaN is always false. Did you mean isNaN()?");
static final DiagnosticType SUSPICIOUS_IN_OPERATOR =
DiagnosticType.warning(
|
Use correct word in complier warning.
-------------
Created by MOE: <URL>
|
google_closure-compiler
|
train
|
java
|
aa555e1fe1c29705766f03f2e3b69a95b09d634e
|
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java
index <HASH>..<HASH> 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java
@@ -166,7 +166,6 @@ public class RuleIndex {
QueryBuilder qb = buildQuery(query);
Map<String, QueryBuilder> filters = buildFilters(query);
- setSorting(query, esSearch);
BoolQueryBuilder fb = boolQuery();
for (QueryBuilder filterBuilder : filters.values()) {
|
SONAR-<I> remove (anyways ignored) sorting for RuleIndex.searchAll
because it is a "scan" query, that ignores sorting
|
SonarSource_sonarqube
|
train
|
java
|
e560dc02fe26bb777319afe58b1cd577f38b245b
|
diff --git a/classes/Boom/Model/Page/Version.php b/classes/Boom/Model/Page/Version.php
index <HASH>..<HASH> 100644
--- a/classes/Boom/Model/Page/Version.php
+++ b/classes/Boom/Model/Page/Version.php
@@ -121,10 +121,13 @@ class Boom_Model_Page_Version extends ORM
foreach ($chunks as $chunk)
{
- $chunk
+ try
+ {
+ $chunk
->copy()
->set('page_vid', $this->id)
->create();
+ } catch (ORM_Validation_Exception $e) {}
}
}
|
Wrap chunk copy on page version save in try-catch
|
boomcms_boom-core
|
train
|
php
|
747af104839f6fc45b85f479dbac96d0f9629e7c
|
diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Installer.php
+++ b/src/Composer/Installer.php
@@ -574,7 +574,7 @@ class Installer
if ($reason instanceof Rule) {
switch ($reason->getReason()) {
case Rule::RULE_JOB_INSTALL:
- $this->io->writeError(' REASON: Required by root: '.$reason->getPrettyString($pool));
+ $this->io->writeError(' REASON: Required by the root package: '.$reason->getPrettyString($pool));
$this->io->writeError('');
break;
case Rule::RULE_PACKAGE_REQUIRES:
|
Clarify required by root message, refs #<I>
|
composer_composer
|
train
|
php
|
b2221b14d5c58c030bad98666aaf0ee06016ff78
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -22,8 +22,8 @@ source_encoding = 'utf-8-sig'
master_doc = 'index'
project = u'Theanets'
copyright = u'2015, Leif Johnson'
-version = '0.5'
-release = '0.5.3'
+version = '0.6'
+release = '0.6.0pre'
exclude_patterns = ['_build']
templates_path = ['_templates']
pygments_style = 'tango'
|
Bump doc version to pre-release.
|
lmjohns3_theanets
|
train
|
py
|
b2e69944cc1d4f440f801f7691072338432ded85
|
diff --git a/system-test/env.js b/system-test/env.js
index <HASH>..<HASH> 100644
--- a/system-test/env.js
+++ b/system-test/env.js
@@ -16,15 +16,25 @@
'use strict';
-if (!process.env.GCLOUD_TESTS_PROJECT_ID && !process.env.GCLOUD_TESTS_KEY) {
- var error = [
+var googleCloudConfig = {};
+
+if (!process.env.GCLOUD_TESTS_CREDENTIALS &&
+ !process.env.GCLOUD_TESTS_PROJECT_ID &&
+ !process.env.GCLOUD_TESTS_KEY) {
+ throw new Error([
'To run the system tests, you need to set some environment variables.',
'Please check the Contributing guide for instructions.'
- ].join('\n');
- throw error;
+ ].join('\n'));
+}
+
+var credentials = process.env.GCLOUD_TESTS_CREDENTIALS;
+
+if (credentials) {
+ googleCloudConfig.credentials = JSON.parse(credentials);
+ googleCloudConfig.projectId = credentials.project_id;
+} else {
+ googleCloudConfig.projectId = process.env.GCLOUD_TESTS_PROJECT_ID;
+ googleCloudConfig.keyFilename = process.env.GCLOUD_TESTS_KEY;
}
-module.exports = {
- keyFilename: process.env.GCLOUD_TESTS_KEY,
- projectId: process.env.GCLOUD_TESTS_PROJECT_ID
-};
+module.exports = googleCloudConfig;
|
add system test running capabilities (#<I>)
|
googleapis_nodejs-bigquery
|
train
|
js
|
72c5c627983901abb0fd43a0c710387e70397019
|
diff --git a/lib/deppack.js b/lib/deppack.js
index <HASH>..<HASH> 100644
--- a/lib/deppack.js
+++ b/lib/deppack.js
@@ -59,7 +59,9 @@ const globalBrowserMappings = filePath => {
return Object.keys(brMap).filter(not(isRelative)).reduce((newBrMap, key) => {
const val = brMap[key];
- newBrMap[key] = generateModuleName(relativeToRoot(filePath, val));
+ if (val) {
+ newBrMap[key] = generateModuleName(relativeToRoot(filePath, val));
+ }
return newBrMap;
}, {});
};
|
Fix for global browser mappings with false
|
brunch_brunch
|
train
|
js
|
f21a66b588c604ae676d14d51966450739b678c5
|
diff --git a/lib/cucumber_analytics/version.rb b/lib/cucumber_analytics/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber_analytics/version.rb
+++ b/lib/cucumber_analytics/version.rb
@@ -1,3 +1,3 @@
module CucumberAnalytics
- VERSION = '1.4.1'
+ VERSION = '1.4.2'
end
|
Version bump
Gem version bumped for <I> release.
|
enkessler_cucumber_analytics
|
train
|
rb
|
fd596b358f52b343e4a77d2381f21164e9ace215
|
diff --git a/pages/spec/factories/pages.rb b/pages/spec/factories/pages.rb
index <HASH>..<HASH> 100644
--- a/pages/spec/factories/pages.rb
+++ b/pages/spec/factories/pages.rb
@@ -4,7 +4,7 @@ FactoryBot.define do
factory :page_with_page_part do
after(:create) do |page|
- page.parts << FactoryBot.create(:page_part)
+ page.parts << FactoryBot.build(:page_part)
end
end
end
|
Bugfix factory page_with_page_part since Rails <I>
Now use build instead of create because `belongs_to` association is now required by default since Rails <I>.
|
refinery_refinerycms
|
train
|
rb
|
adcf6d32feed659028172c8c1a7201e4a671f405
|
diff --git a/lib/looksee.rb b/lib/looksee.rb
index <HASH>..<HASH> 100644
--- a/lib/looksee.rb
+++ b/lib/looksee.rb
@@ -391,14 +391,11 @@ module Looksee
end
class Colors
+ #
+ # Show the meaning of each color.
+ #
def inspect
- "Looksee colors:\n" +
- Looksee.styles[:module] % " module" +
- Looksee.styles[:public] % " public" +
- Looksee.styles[:protected] % " protected" +
- Looksee.styles[:private] % " private" +
- Looksee.styles[:undefined] % " undefined" +
- Looksee.styles[:overridden] % " overridden"
+ "Looksee colors:\n " + Looksee.styles.map {|style,value| value % "#{style.to_s}"}.join(" ")
end
end
end
|
Change how the colors method works so it's more maintainable
|
oggy_looksee
|
train
|
rb
|
c6ed18d6fd7994478c0cd49ae57081297c207d0d
|
diff --git a/preset/common/whitespace.php b/preset/common/whitespace.php
index <HASH>..<HASH> 100644
--- a/preset/common/whitespace.php
+++ b/preset/common/whitespace.php
@@ -15,7 +15,7 @@ return function (Symfony\Component\DependencyInjection\Loader\Configurator\Conta
$services->set(PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer::class);
// Binary operators should be surrounded by at least one space.
- $services->set(PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer::class);
+ //$services->set(PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer::class);
// Unary operators should be placed adjacent to their operands.
$services->set(PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer::class);
|
BinaryOperatorSpacesFixer temporary disabled due conflicts with union types
|
nette_coding-standard
|
train
|
php
|
2202b6103293f44554b96955e7f1d360baae4b6b
|
diff --git a/kv/service.go b/kv/service.go
index <HASH>..<HASH> 100644
--- a/kv/service.go
+++ b/kv/service.go
@@ -7,6 +7,7 @@ import (
"go.uber.org/zap"
"github.com/influxdata/influxdb"
+ "github.com/influxdata/influxdb/kit/check"
"github.com/influxdata/influxdb/rand"
"github.com/influxdata/influxdb/snowflake"
)
@@ -135,3 +136,13 @@ func (s *Service) Initialize(ctx context.Context) error {
func (s *Service) WithStore(store Store) {
s.kv = store
}
+
+// Check calls the check function on the kv store if it implements the
+// check interface, otherwise returns pass
+func (s *Service) Check(ctx context.Context) check.Response {
+ if check, ok := s.kv.(check.Checker); ok {
+ return check.Check(ctx)
+ }
+
+ return check.Pass()
+}
|
feat(tasks): add health check to kv service (#<I>)
|
influxdata_influxdb
|
train
|
go
|
0541ac7d962fb90d2939c0b27938b3278b2e543d
|
diff --git a/config_resolver/core.py b/config_resolver/core.py
index <HASH>..<HASH> 100644
--- a/config_resolver/core.py
+++ b/config_resolver/core.py
@@ -22,7 +22,7 @@ from warnings import warn
from .exc import NoVersionError
from .util import PrefixFilter
-__version__ = '4.2.4'
+__version__ = '4.2.5'
if sys.hexversion < 0x030000F0:
|
Version bumped to <I>
|
exhuma_config_resolver
|
train
|
py
|
0ebcbaff1b6adf426facda0160fa0cfdb455cad9
|
diff --git a/lib/heroku/analytics.rb b/lib/heroku/analytics.rb
index <HASH>..<HASH> 100644
--- a/lib/heroku/analytics.rb
+++ b/lib/heroku/analytics.rb
@@ -18,7 +18,7 @@ class Heroku::Analytics
user: user,
commands: commands,
}
- Excon.post('https://heroku-cli-analytics.herokuapp.com/record', body: JSON.dump(payload))
+ Excon.post('https://cli-analytics.heroku.com/record', body: JSON.dump(payload))
File.truncate(path, 0)
end
rescue
|
set analytics host to heroku.com url
|
heroku_legacy-cli
|
train
|
rb
|
19d2729ef482720835112a530b0b9624d4b71242
|
diff --git a/core-bundle/src/Resources/contao/models/PageModel.php b/core-bundle/src/Resources/contao/models/PageModel.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/models/PageModel.php
+++ b/core-bundle/src/Resources/contao/models/PageModel.php
@@ -614,7 +614,10 @@ class PageModel extends \Model
$this->datimFormat = $GLOBALS['TL_CONFIG']['datimFormat'];
}
+ // Prevent saving (see #6506 and #7199)
+ $this->preventSaving();
$this->blnDetailsLoaded = true;
+
return $this;
}
|
[Core] Always prevent saving if `PageModel::loadDetails()` is executed (see #<I>)
|
contao_contao
|
train
|
php
|
6bc861a1f6948393ab93c00f54b432ffdc04e8bf
|
diff --git a/py3status/modules/scratchpad.py b/py3status/modules/scratchpad.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/scratchpad.py
+++ b/py3status/modules/scratchpad.py
@@ -94,7 +94,13 @@ class I3ipc(Ipc):
i3.main()
def update(self, i3, event=None):
- leaves = i3.get_tree().scratchpad().leaves()
+ scratchpad = i3.get_tree().scratchpad()
+ if not scratchpad:
+ return
+
+ # Workaround for I3ipc 2.2.1 not finding leaves() in sway. Fixing: #2038
+ leaves = getattr(scratchpad, "floating_nodes", [])
+
temporary = {
"ipc": self.parent.ipc,
"scratchpad": len(leaves),
|
scratchpad module: workaround for i3ipc <I> not finding leaves() in sway (#<I>)
|
ultrabug_py3status
|
train
|
py
|
c98881e7de83c12c900f68142f90d62d0afe4506
|
diff --git a/conftest.py b/conftest.py
index <HASH>..<HASH> 100644
--- a/conftest.py
+++ b/conftest.py
@@ -7,4 +7,5 @@ Configuration for tests with pytest
from hypothesis import settings, HealthCheck
# profile for CI runs on GitHub machines, which may be slow from time to time so we disable the "too slow" HealthCheck
-settings.register_profile('ci', suppress_health_check=(HealthCheck.too_slow, ))
+# and set the timeout deadline very high (60 sec.)
+settings.register_profile('ci', suppress_health_check=(HealthCheck.too_slow, ), deadline=60000)
|
increase hypothesis timeout deadline for CI runs
|
WZBSocialScienceCenter_tmtoolkit
|
train
|
py
|
ad220ec40d778f4000c3ad88729004131c637b63
|
diff --git a/src/touch.js b/src/touch.js
index <HASH>..<HASH> 100644
--- a/src/touch.js
+++ b/src/touch.js
@@ -26,12 +26,9 @@
touch = {};
}, 250);
}
- };
+ }
- d.ontouchcancel = function(e) {
- touchTimeout = null;
- touch = {};
- };
+ d.ontouchcancel = function(){ touch={} };
['swipe', 'doubleTap', 'tap'].forEach(function(m){
$.fn[m] = function(callback){ return this.bind(m, callback) }
|
reset touch when touchcancel is fired (mostly because of alerts)
|
madrobby_zepto
|
train
|
js
|
a21566f05536b99e4f3970ee63b54ac571869a90
|
diff --git a/src/BoomCMS/Installer/Installer.php b/src/BoomCMS/Installer/Installer.php
index <HASH>..<HASH> 100644
--- a/src/BoomCMS/Installer/Installer.php
+++ b/src/BoomCMS/Installer/Installer.php
@@ -21,12 +21,12 @@ class Installer
public function databaseNeedsInstall()
{
try {
- $dbname = DB::connection()->getDatabaseName();
+ DB::connection()->reconnect();
} catch (\PDOException $e) {
return true;
}
- return $dbname ? false : true;
+ return false;
}
/**
|
Fixed testing DB connection for laravel <I>
|
boomcms_boom-installer
|
train
|
php
|
e13e9c8b33babde87a274ee068c507b83ca9141e
|
diff --git a/go/dhcp/config.go b/go/dhcp/config.go
index <HASH>..<HASH> 100644
--- a/go/dhcp/config.go
+++ b/go/dhcp/config.go
@@ -273,8 +273,12 @@ func (d *Interfaces) readConfig() {
hwcache := cache.New(time.Duration(seconds)*time.Second, 10*time.Second)
hwcache.OnEvicted(func(nic string, pool interface{}) {
- log.LoggerWContext(ctx).Info(nic + " " + dhcp.IPAdd(DHCPScope.start, pool.(int)).String() + " Added back in the pool " + DHCPScope.role + " on index " + strconv.Itoa(pool.(int)))
- DHCPScope.available.Add(uint32(pool.(int)))
+ go func() {
+ // Always wait 10 minutes before releasing the IP again
+ time.Sleep(10 * time.Minute)
+ log.LoggerWContext(ctx).Info(nic + " " + dhcp.IPAdd(DHCPScope.start, pool.(int)).String() + " Added back in the pool " + DHCPScope.role + " on index " + strconv.Itoa(pool.(int)))
+ DHCPScope.available.Add(uint32(pool.(int)))
+ }()
})
DHCPScope.hwcache = hwcache
|
forgot a DHCP fix in duplicated code
|
inverse-inc_packetfence
|
train
|
go
|
966f947cae8cdd4cfbbb2e7474ff51e23717885c
|
diff --git a/rest-provider/src/main/java/org/jboss/pressgang/ccms/provider/RESTTranslatedContentSpecProvider.java b/rest-provider/src/main/java/org/jboss/pressgang/ccms/provider/RESTTranslatedContentSpecProvider.java
index <HASH>..<HASH> 100644
--- a/rest-provider/src/main/java/org/jboss/pressgang/ccms/provider/RESTTranslatedContentSpecProvider.java
+++ b/rest-provider/src/main/java/org/jboss/pressgang/ccms/provider/RESTTranslatedContentSpecProvider.java
@@ -166,7 +166,8 @@ public class RESTTranslatedContentSpecProvider extends RESTDataProvider implemen
public CollectionWrapper<TranslatedContentSpecWrapper> getTranslatedContentSpecsWithQuery(String query) {
if (query == null || query.isEmpty()) return null;
- return getWrapperFactory().createCollection(getTranslatedContentSpecsWithQuery(query), RESTTranslatedContentSpecV1.class, false);
+ return getWrapperFactory().createCollection(getRESTTranslatedContentSpecsWithQuery(query), RESTTranslatedContentSpecV1.class,
+ false);
}
@Override
|
Fixed a bug where a method was calling itself and therefore throwing a stack overflow error.
|
pressgang-ccms_PressGangCCMSDatasourceProviders
|
train
|
java
|
274970d347ff64c07b83cdfd89f8324de9c052a7
|
diff --git a/src/main/java/com/datasift/client/pylon/PylonSampleInteraction.java b/src/main/java/com/datasift/client/pylon/PylonSampleInteraction.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/datasift/client/pylon/PylonSampleInteraction.java
+++ b/src/main/java/com/datasift/client/pylon/PylonSampleInteraction.java
@@ -13,7 +13,7 @@ public class PylonSampleInteraction {
@JsonProperty
protected String language;
@JsonProperty("topic_ids")
- protected List<Integer> topicIDs = new ArrayList<>();
+ protected List<Long> topicIDs = new ArrayList<>();
public PylonSampleInteraction() { }
@@ -23,5 +23,5 @@ public class PylonSampleInteraction {
public String getLanguage() { return this.language; }
- public List<Integer> getTopicIDs() { return this.topicIDs; }
+ public List<Long> getTopicIDs() { return this.topicIDs; }
}
|
issue-<I> change topic ID from int to long
|
datasift_datasift-java
|
train
|
java
|
b32f6439a4a8c45b5de38042f5d2df56ad1067af
|
diff --git a/lib/sinja/helpers/sequel.rb b/lib/sinja/helpers/sequel.rb
index <HASH>..<HASH> 100644
--- a/lib/sinja/helpers/sequel.rb
+++ b/lib/sinja/helpers/sequel.rb
@@ -4,7 +4,6 @@ require 'forwardable'
module Sinja
module Helpers
module Sequel
- include ::Sequel::Inflections
extend Forwardable
def self.config(c)
|
Remove superfluous statement from Sequel helpers
|
mwpastore_sinja
|
train
|
rb
|
99b3ff848c9ead59dde8339a157636ef9a5dd09f
|
diff --git a/code/administrator/components/com_files/views/files/tmpl/uploader.php b/code/administrator/components/com_files/views/files/tmpl/uploader.php
index <HASH>..<HASH> 100644
--- a/code/administrator/components/com_files/views/files/tmpl/uploader.php
+++ b/code/administrator/components/com_files/views/files/tmpl/uploader.php
@@ -263,6 +263,8 @@ window.addEvent('domready', function() {
row.element.getElement('.files-node').addClass('loaded').removeClass('loading');
}
});
+ /* This is for the thumb margins to recalculate */
+ window.fireEvent('resize');
}
}
Files.app.fireEvent('uploadFile', [row]);
|
Fixing issue where newly uploaded thumbs didn't respect the thumb size slider
|
joomlatools_joomlatools-framework
|
train
|
php
|
48f9ef58920e19614617d90538371840254a82af
|
diff --git a/config/cors.php b/config/cors.php
index <HASH>..<HASH> 100644
--- a/config/cors.php
+++ b/config/cors.php
@@ -1,20 +1,22 @@
<?php
return [
+
/*
- |--------------------------------------------------------------------------
- | Laravel CORS
- |--------------------------------------------------------------------------
- |
- | allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
- | to accept any value.
- |
- */
+ |--------------------------------------------------------------------------
+ | Laravel CORS
+ |--------------------------------------------------------------------------
+ |
+ | allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
+ | to accept any value.
+ |
+ */
+
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 0,
-];
+];
|
Make the config file compliant with other Laravel's config files (#<I>)
|
barryvdh_laravel-cors
|
train
|
php
|
d63e0ac2372f0befd6b861a5e317de78d8f54f79
|
diff --git a/Entity/Parameter.php b/Entity/Parameter.php
index <HASH>..<HASH> 100644
--- a/Entity/Parameter.php
+++ b/Entity/Parameter.php
@@ -21,7 +21,7 @@ class Parameter extends BaseParameter
protected $name;
/**
- * @ORM\Column(type="string")
+ * @ORM\Column(type="string", nullable=true)
* @Assert\MaxLength(groups={"Entity"}, limit=255)
*/
protected $value;
|
Added nullable=true on Parameter::$value property as it does not have an Assert\NotBlank and we want to allow null values.
|
opensky_OpenSkyRuntimeConfigBundle
|
train
|
php
|
83dfa975fc644f3c0ecc13a63311a9f5cb6b0c87
|
diff --git a/zipline/lib/adjusted_array.py b/zipline/lib/adjusted_array.py
index <HASH>..<HASH> 100644
--- a/zipline/lib/adjusted_array.py
+++ b/zipline/lib/adjusted_array.py
@@ -290,7 +290,7 @@ class AdjustedArray(object):
data = self._data
if copy:
- data = data.copy()
+ data = data.copy(order='F')
else:
self._invalidated = True
|
ENH: ndarray.copy() always sets the contig to 'C'
|
quantopian_zipline
|
train
|
py
|
b12cd1276d3faafd8a35e6d27e15bd1f354198ee
|
diff --git a/planet/scripts/__init__.py b/planet/scripts/__init__.py
index <HASH>..<HASH> 100644
--- a/planet/scripts/__init__.py
+++ b/planet/scripts/__init__.py
@@ -87,6 +87,20 @@ def cli(verbose, api_key, base_url, workers):
client._workers = workers
[email protected]('help')
[email protected]("command", default="")
[email protected]_context
+def help(context, command):
+ if command:
+ cmd = cli.commands.get(command, None)
+ if cmd:
+ click.echo(cmd.get_help())
+ else:
+ raise click.ClickException('no command: %s' % command)
+ else:
+ click.echo(cli.get_help(context))
+
+
@cli.command('list-scene-types')
def list_scene_types():
'''List all scene types.'''
|
add help command, acts likes --help
|
planetlabs_planet-client-python
|
train
|
py
|
ae0db0f929a98ee2dc20f7a8f1790d6b4d88023b
|
diff --git a/lib/spreewald/web_steps.rb b/lib/spreewald/web_steps.rb
index <HASH>..<HASH> 100644
--- a/lib/spreewald/web_steps.rb
+++ b/lib/spreewald/web_steps.rb
@@ -612,7 +612,7 @@ end
# More details [here](https://makandracards.com/makandra/12139-waiting-for-page-loads-and-ajax-requests-to-finish-with-capybara).
When /^I wait for the page to load$/ do
if [:selenium, :webkit, :poltergeist].include?(Capybara.current_driver)
- wait_until { page.evaluate_script('$.active') == 0 }
+ wait_until { page.evaluate_script("typeof jQuery === 'undefined' || $.active == 0") } # immediately return when no jQuery is loaded
end
page.has_content? ''
end
diff --git a/lib/spreewald_support/version.rb b/lib/spreewald_support/version.rb
index <HASH>..<HASH> 100644
--- a/lib/spreewald_support/version.rb
+++ b/lib/spreewald_support/version.rb
@@ -1,3 +1,3 @@
module Spreewald
- VERSION = '0.8.4'
+ VERSION = '0.8.5'
end
|
step "I wait for the page to load" now does nothing if no jQuery is loaded
|
makandra_spreewald
|
train
|
rb,rb
|
f56b987b0a9ce8c04c902c21cbf7b473875fece2
|
diff --git a/lib/god/process.rb b/lib/god/process.rb
index <HASH>..<HASH> 100644
--- a/lib/god/process.rb
+++ b/lib/god/process.rb
@@ -240,7 +240,7 @@ module God
r.close
pid = self.spawn(command)
puts pid.to_s # send pid back to forker
- exit!(true)
+ exit!(0)
end
::Process.waitpid(opid, 0)
|
changed exit code to be compatible with ruby <I> and <I>
|
mojombo_god
|
train
|
rb
|
4a77560646b50d48270d59e7078d301e6eee5f84
|
diff --git a/salt/cloud/__init__.py b/salt/cloud/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/__init__.py
+++ b/salt/cloud/__init__.py
@@ -234,7 +234,7 @@ class CloudClient(object):
if a.get('provider', '')]
if providers:
_providers = opts.get('providers', {})
- for provider in list(_providers):
+ for provider in list(_providers).copy():
if provider not in providers:
_providers.pop(provider)
return opts
|
Don't try to modify dict while looping through it
|
saltstack_salt
|
train
|
py
|
b4c59f51ad069f1f3fe43f5e62933e9e816c47c9
|
diff --git a/core/eolearn/core/eodata.py b/core/eolearn/core/eodata.py
index <HASH>..<HASH> 100644
--- a/core/eolearn/core/eodata.py
+++ b/core/eolearn/core/eodata.py
@@ -378,7 +378,7 @@ class EOPatch:
"""
if isinstance(value, np.ndarray):
return '{}, shape={}, dtype={}'.format(type(value), value.shape, value.dtype)
- if isinstance(value, (list, tuple, dict)) and len(value) > 10: # <- rethink this
+ if isinstance(value, (list, tuple, dict)):
return '{}, length={}'.format(type(value), len(value))
return repr(value)
|
minor change in __repr__ of EOPatch
|
sentinel-hub_eo-learn
|
train
|
py
|
4c8e4670320497959647c10cdd5dea2ff9940709
|
diff --git a/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java b/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java
index <HASH>..<HASH> 100755
--- a/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java
+++ b/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java
@@ -338,7 +338,8 @@ public class OrientEdge extends OrientElement implements Edge {
*/
@Override
public void remove() {
- checkClass();
+ if (!isLightweight())
+ checkClass();
graph.setCurrentGraphInThreadLocal();
graph.autoStartTransaction();
|
Don't call checkClass for lightweight edges
Don't call checkClass for lightweight edges in remove().
|
orientechnologies_orientdb
|
train
|
java
|
970bf325ce695b032e29d342ec177a2f024e708d
|
diff --git a/salt/grains/opts.py b/salt/grains/opts.py
index <HASH>..<HASH> 100644
--- a/salt/grains/opts.py
+++ b/salt/grains/opts.py
@@ -9,6 +9,7 @@ def opts():
'''
Return the minion configuration settings
'''
- if __opts__.get('grain_opts', False) or __pillar__.get('grain_opts', False):
+ if __opts__.get('grain_opts', False) or \
+ (isinstance(__pillar__, dict) and __pillar__.get('grain_opts', False)):
return __opts__
return {}
|
`__pillar__` can be a boolean, don't assume it's a `dict`.
Fixes #<I>
|
saltstack_salt
|
train
|
py
|
d0efa75ce0b2e9b194fddfb833d6f852190cd3cb
|
diff --git a/packages/material-ui/src/styles/createGenerateClassName.js b/packages/material-ui/src/styles/createGenerateClassName.js
index <HASH>..<HASH> 100644
--- a/packages/material-ui/src/styles/createGenerateClassName.js
+++ b/packages/material-ui/src/styles/createGenerateClassName.js
@@ -10,7 +10,7 @@ const escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
function safePrefix(classNamePrefix) {
const prefix = String(classNamePrefix);
- warning(prefix.length < 100, `Material-UI: the class name prefix is too long: ${prefix}.`);
+ warning(prefix.length < 256, `Material-UI: the class name prefix is too long: ${prefix}.`);
// Sanitize the string as will be used to prefix the generated class name.
return prefix.replace(escapeRegex, '-');
}
|
[styles] Increase the class name lenght limit before raising (#<I>)
|
mui-org_material-ui
|
train
|
js
|
ea44b0026ec98266f178f1ff6d6dfc584110060d
|
diff --git a/tests/ContentReviewReportTest.php b/tests/ContentReviewReportTest.php
index <HASH>..<HASH> 100644
--- a/tests/ContentReviewReportTest.php
+++ b/tests/ContentReviewReportTest.php
@@ -18,20 +18,21 @@ class ContentReviewReportTest extends FunctionalTest {
'ReviewDateBefore' => '12/12/2010'
), 'NextReviewDate ASC', false);
- $this->assertEquals($results->column('Title'), array(
+ $this->assertEquals(array(
'Contact Us',
+ 'Contact Us Child',
'Staff',
'About Us',
'Home'
- ));
+ ), $results->column('Title'));
SS_Datetime::set_mock_now('2010-02-13 00:00:00');
$results = $report->sourceRecords(array(
), 'NextReviewDate ASC', false);
- $this->assertEquals($results->column('Title'), array(
+ $this->assertEquals(array(
'About Us',
'Home'
- ));
+ ), $results->column('Title'));
SS_Datetime::clear_mock_now();
}
|
Fixed the ContentReviewReportTest for real this time, wrong order in assertEquals
|
silverstripe_silverstripe-contentreview
|
train
|
php
|
8d35d5f1741fde98d1c1cb45cdffed8b52759d16
|
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index <HASH>..<HASH> 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -363,9 +363,13 @@ class ProcessedReport
list($newReport, $columns, $rowsMetadata, $totals) = $this->handleTableReport($idSite, $dataTable, $reportMetadata, $showRawMetrics, $formatMetrics);
- foreach ($columns as &$name) {
- $name = ucfirst($name);
- }
+ if (function_exists('mb_substr')) {
+ foreach ($columns as &$name) {
+ if (substr($name, 0, 1) === mb_substr($name, 0, 1)) {
+ $name = ucfirst($name);
+ }
+ }
+ }
$website = new Site($idSite);
$period = Period\Factory::build($period, $date);
|
Update ProcessedReport.php to avoid break asian language string. (#<I>)
Email reports: prevent errors when report is generated in some asian language in some cases
|
matomo-org_matomo
|
train
|
php
|
b7e6601a7219a79c3c3d4c65fa871a3248d3ad57
|
diff --git a/js/okcoinusd.js b/js/okcoinusd.js
index <HASH>..<HASH> 100644
--- a/js/okcoinusd.js
+++ b/js/okcoinusd.js
@@ -78,6 +78,7 @@ module.exports = class okcoinusd extends Exchange {
'cancel_order',
'cancel_otc_order',
'cancel_withdraw',
+ 'funds_transfer',
'future_batch_trade',
'future_cancel',
'future_devolve',
@@ -102,6 +103,7 @@ module.exports = class okcoinusd extends Exchange {
'trade',
'trade_history',
'trade_otc_order',
+ 'wallet_info',
'withdraw',
'withdraw_info',
'unrepayments_info',
|
added new endpoints to ok* family fix #<I>
|
ccxt_ccxt
|
train
|
js
|
38d465ad2ec61730479b321986864488d9f80176
|
diff --git a/poco/drivers/std/__init__.py b/poco/drivers/std/__init__.py
index <HASH>..<HASH> 100644
--- a/poco/drivers/std/__init__.py
+++ b/poco/drivers/std/__init__.py
@@ -79,8 +79,9 @@ class StdPoco(Poco):
ip = 'localhost'
port = local_port
elif device_platform() == 'IOS':
- ip = device.get_ip_address()
- port = port
+ # ip = device.get_ip_address()
+ # use iproxy first
+ ip = 'localhost'
else:
import socket
ip = socket.gethostbyname(socket.gethostname())
|
use localhost for unity on ios
|
AirtestProject_Poco
|
train
|
py
|
bb9f022f1e5b8621f22633d92e07f786e3735e47
|
diff --git a/src/components/com_application/dispatcher.php b/src/components/com_application/dispatcher.php
index <HASH>..<HASH> 100644
--- a/src/components/com_application/dispatcher.php
+++ b/src/components/com_application/dispatcher.php
@@ -60,6 +60,8 @@ class ComApplicationDispatcher extends LibApplicationDispatcher
if (! $location && $isHtml && !$isAjax) {
+ dispatch_plugin('system.onBeforeRender', array( $context ));
+
$config = array(
'request' => $context->request,
'response' => $context->response,
|
added onBeforeRender event hook
|
anahitasocial_anahita
|
train
|
php
|
e81a5f630b1fa3b869673d093edf8ead1e090b0b
|
diff --git a/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js b/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
+++ b/packages/pob/lib/generators/core/yarn/CoreYarnGenerator.js
@@ -70,6 +70,8 @@ export default class CoreYarnGenerator extends Generator {
this.spawnCommandSync('yarn', ['set', 'version', 'latest']);
if (this.options.yarnNodeLinker === 'pnp') {
this.spawnCommandSync('yarn', ['dlx', '@yarnpkg/sdks', 'vscode']);
+ } else {
+ this.fs.delete('.yarn/sdks');
}
this.spawnCommandSync('yarn', ['prettier', '--write', '.vscode']);
this.spawnCommandSync('yarn', ['install']);
|
fix(pob): delete .yarn/sdks when pnp is disabled
|
christophehurpeau_pob-lerna
|
train
|
js
|
7da3449d09c43760204072b40943ab8f2c82e78e
|
diff --git a/framework/db/QueryBuilder.php b/framework/db/QueryBuilder.php
index <HASH>..<HASH> 100644
--- a/framework/db/QueryBuilder.php
+++ b/framework/db/QueryBuilder.php
@@ -748,9 +748,14 @@ class QueryBuilder extends \yii\base\Object
*/
$reducer = function($left, $right)
{
- $all = $right->params['all'];
- list($right, $params) = $this->build($right);
- return $left . ' UNION ' . ($all ? 'ALL ' : ' ') . $right . ' )';
+ if(is_array($left))
+ $left = $left['query'];
+ $all = false;
+ if(is_array($right)) {
+ $all = $right['all'];
+ $right = $right['query'];
+ }
+ return $left . ' UNION ' . ($all ? 'ALL ' : '') . '( ' . $right . ' )';
};
foreach ($unions as $i => $union) {
@@ -758,6 +763,7 @@ class QueryBuilder extends \yii\base\Object
// save the original parameters so that we can restore them later to prevent from modifying the query object
$originalParams = $union->params;
$union->addParams($params);
+ list ($unions[$i]['query'], $params) = $this->build($query);
$union->params = $originalParams;
}
}
|
Update QueryBuilder.php
Change buildUnion method to be ready to accept parameters in <code>['all' => $all, 'query' => $query]</code> format for division to "UNION" and "UNION ALL" constructions.
|
yiisoft_yii2
|
train
|
php
|
a887778dce5bff7d6fcd2f469bf026b6cd9298f6
|
diff --git a/src/Anonym/Bootstrap/Bootstrap.php b/src/Anonym/Bootstrap/Bootstrap.php
index <HASH>..<HASH> 100644
--- a/src/Anonym/Bootstrap/Bootstrap.php
+++ b/src/Anonym/Bootstrap/Bootstrap.php
@@ -56,4 +56,11 @@ class Bootstrap extends Container
$this->resolveBootstraps();
}
+ /**
+ * resolve the constructor classes
+ */
+ private function resolveBootstraps()
+ {
+
+ }
}
\ No newline at end of file
|
added resolveBootstrap()
|
AnonymPHP_Anonym-Library
|
train
|
php
|
45c24e380e7142b07c1da7f99dce14dd1aee76ef
|
diff --git a/hamster/applet.py b/hamster/applet.py
index <HASH>..<HASH> 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -102,14 +102,14 @@ class HamsterApplet(object):
"""UI functions"""
def refresh_hamster(self):
- """refresh hamster every x secs - load toady, check last activity etc."""
+ """refresh hamster every x secs - load today, check last activity etc."""
today = datetime.date.today()
if today != self.today:
self.load_today()
if self.last_activity:
# update end time
storage.touch_fact(self.last_activity)
- return False
+ return True
def update_label(self):
if self.last_activity:
|
omg, this terribly looks like sabotage - returning false on update stops timer
svn path=/trunk/; revision=<I>
|
projecthamster_hamster
|
train
|
py
|
1a2e63b136e5e6cb42f212b76b61763512588125
|
diff --git a/spec/unit/workstation_config_loader_spec.rb b/spec/unit/workstation_config_loader_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/workstation_config_loader_spec.rb
+++ b/spec/unit/workstation_config_loader_spec.rb
@@ -241,7 +241,7 @@ describe Chef::WorkstationConfigLoader do
t.path
end
- after { File.unlink(explicit_config_location) }
+ after { File.unlink(explicit_config_location) if File.exists?(explicit_config_location) }
context "and is valid" do
|
Fix test failure happening only on Jenkins <I>: don't call File.unlink if the file isn't there.
|
chef_chef
|
train
|
rb
|
ea0c5f01a3b793309740f7e8290a4e7925f84755
|
diff --git a/openquake/engine/tools/make_html_report.py b/openquake/engine/tools/make_html_report.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/tools/make_html_report.py
+++ b/openquake/engine/tools/make_html_report.py
@@ -186,10 +186,9 @@ def make_report(isodate='today'):
txt = view_fullreport('fullreport', ds)
report = html_parts(txt)
except Exception as exc:
- raise
report = dict(
html_title='Could not generate report: %s' % cgi.escape(
- unicode(exc), quote=True),
+ exc, quote=True),
fragment='')
page = report['html_title']
|
Removed a debugging raise
|
gem_oq-engine
|
train
|
py
|
c15e5a3b163adf71ccd33e8abc19e82e6cd4cebe
|
diff --git a/import_order/sort.py b/import_order/sort.py
index <HASH>..<HASH> 100644
--- a/import_order/sort.py
+++ b/import_order/sort.py
@@ -27,16 +27,12 @@ def canonical_sort_key(original_name, lineno, col_offset, relative,
site = True
stdlib = False
else:
- try:
- site = getattr(
- __import__(first_name.replace('~', '_')),
- '__file__',
- ''
- ).startswith(tuple(list_site_packages_paths()))
- stdlib = not site
- except ImportError:
- print(original_name)
- print(first_name)
+ site = getattr(
+ __import__(first_name.replace('~', '_')),
+ '__file__',
+ ''
+ ).startswith(tuple(list_site_packages_paths()))
+ stdlib = not site
return ( # FIXME: refactor it to use namedtuple
# 1. Order: __future__, standard libraries, site-packages, local
(0 if future else (1 if stdlib else (2 if site else 3))),
|
Raise ImportError when library dosen't exists
- close #1
|
spoqa_import-order
|
train
|
py
|
0a096aa2cdcde58cc75d9c99ad1f11f7c19e3ed5
|
diff --git a/src/js/components/FormLabel.js b/src/js/components/FormLabel.js
index <HASH>..<HASH> 100644
--- a/src/js/components/FormLabel.js
+++ b/src/js/components/FormLabel.js
@@ -15,7 +15,7 @@ export default class FormLabel extends Component {
}
return (
- <label className={classes.join(' ')} htmlFor={this.props.for}>
+ <label className={classes.join(' ')} htmlFor={this.props.labelFor}>
{this.props.children}
</label>
);
@@ -24,5 +24,5 @@ export default class FormLabel extends Component {
FormLabel.propTypes = {
uppercase: PropTypes.bool,
- for: PropTypes.string
+ labelFor: PropTypes.string
};
|
Changed "for" prop name to "labelFor" for clarity
|
grommet_grommet
|
train
|
js
|
55360b39100f9bd740f4f7b793af52366018f744
|
diff --git a/cas-server-core/src/main/java/org/jasig/cas/services/web/support/RegisteredServiceValidator.java b/cas-server-core/src/main/java/org/jasig/cas/services/web/support/RegisteredServiceValidator.java
index <HASH>..<HASH> 100644
--- a/cas-server-core/src/main/java/org/jasig/cas/services/web/support/RegisteredServiceValidator.java
+++ b/cas-server-core/src/main/java/org/jasig/cas/services/web/support/RegisteredServiceValidator.java
@@ -6,7 +6,6 @@
package org.jasig.cas.services.web.support;
import org.jasig.cas.services.RegisteredService;
-import org.jasig.cas.services.RegisteredServiceImpl;
import org.jasig.cas.services.ServicesManager;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
@@ -36,12 +35,12 @@ public final class RegisteredServiceValidator implements Validator {
private int maxDescriptionLength = DEFAULT_MAX_DESCRIPTION_LENGTH;
/**
- * Supports the RegisteredServiceImpl.
+ * Supports RegisteredService objects.
*
* @see org.springframework.validation.Validator#supports(java.lang.Class)
*/
public boolean supports(final Class clazz) {
- return RegisteredServiceImpl.class.equals(clazz);
+ return RegisteredService.class.isAssignableFrom(clazz);
}
public void validate(final Object o, final Errors errors) {
|
Update the supports method to support any implementation
|
apereo_cas
|
train
|
java
|
d175da54674ddca564d5101eefca4cdcf6aa05f8
|
diff --git a/php-sql-parser.php b/php-sql-parser.php
index <HASH>..<HASH> 100644
--- a/php-sql-parser.php
+++ b/php-sql-parser.php
@@ -711,7 +711,7 @@ if (!defined('HAVE_PHP_SQL_PARSER')) {
case 'EVENT':
# issue 71
- if ($prev_category != 'FROM') {
+ if ($prev_category == 'DROP' || $prev_category == 'ALTER' || $prev_category == 'CREATE') {
$token_category = $upper;
}
break;
|
CHG: handling of the EVENT keyword, it produces now only a section after DROP, ALTER or CREATE. In all other sections it is recognized as colref or alias. The previous version handles the event keyword only within FROM sections correctly.
git-svn-id: <URL>
|
greenlion_PHP-SQL-Parser
|
train
|
php
|
e06327f10f742aca9fa266828901187dacca5c5e
|
diff --git a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java
index <HASH>..<HASH> 100644
--- a/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java
+++ b/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java
@@ -242,7 +242,7 @@ public abstract class BaseDetectFiducialSquare<T extends ImageGray<T>> {
// see if it returns the same undistorted image each time
double best=Double.MAX_VALUE;
for (int j = 0; j < 4; j++) {
- double found = p.get(0).normSq();
+ double found = p.get(j).normSq();
if( found < best ) {
best = found;
interpolationHack.set(p);
|
- fixed "interpolate hack" it was only selecting the first corner!
|
lessthanoptimal_BoofCV
|
train
|
java
|
72224fce6af6de57134e463e9b3520849cd67a5d
|
diff --git a/test/PngCrush.js b/test/PngCrush.js
index <HASH>..<HASH> 100644
--- a/test/PngCrush.js
+++ b/test/PngCrush.js
@@ -15,9 +15,9 @@ describe('PngCrush', () => {
'when piped through',
new PngCrush(['-rem', 'alla']),
'to yield output satisfying',
- resultPngBuffer => {
+ expect.it(resultPngBuffer => {
expect(resultPngBuffer.length, 'to be within', 0, 3711);
- }
+ })
));
it('should not emit data events while paused', done => {
|
Wrap to satisfy function in expect.it
|
papandreou_node-pngcrush
|
train
|
js
|
acdf56cf84092ddc0cd09823d61395c6c06fc777
|
diff --git a/packages/xod-js/src/types.js b/packages/xod-js/src/types.js
index <HASH>..<HASH> 100644
--- a/packages/xod-js/src/types.js
+++ b/packages/xod-js/src/types.js
@@ -1,5 +1,8 @@
import HMDef from 'hm-def';
import { env } from 'xod-project';
-export const def = HMDef.create({ checkTypes: true, env });
+export const def = HMDef.create({
+ checkTypes: process.env.NODE_ENV !== 'production',
+ env,
+});
export default def;
|
tweak(xod-js): enable typechecking only in development builds
|
xodio_xod
|
train
|
js
|
8edfdd9a267d30f667348f4806b330bb9b038b5b
|
diff --git a/app/assets/javascripts/renalware/behaviours.js b/app/assets/javascripts/renalware/behaviours.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/renalware/behaviours.js
+++ b/app/assets/javascripts/renalware/behaviours.js
@@ -7,4 +7,9 @@ $(document).ready(function() {
e.preventDefault();
$(this).closest('form').submit();
});
+
+ $("[data-behaviour='submit_on_change']").on('change', function(e) {
+ e.preventDefault();
+ $(this).closest('form').submit();
+ });
});
|
Add auto submit on change js behaviour
For submitting forms via ajax when eg dropdown changes
|
airslie_renalware-core
|
train
|
js
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.