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 |
|---|---|---|---|---|---|
7ffc234e645454fe17d4cc3ad8e4a35e54e1f294 | diff --git a/lib/base.js b/lib/base.js
index <HASH>..<HASH> 100644
--- a/lib/base.js
+++ b/lib/base.js
@@ -251,6 +251,7 @@ class Base extends MiniPass {
if (ev === 'end') {
const ret = super.emit(ev, data)
this.ondone()
+ this.hook.emitDestroy()
this.hookDomain.destroy()
return ret
} else | Base: destroy hook resource on end event
Fix #<I> | tapjs_node-tap | train | js |
3116dd776b77e489c8530e3872f43cb4fb71aed4 | diff --git a/lib/influxdb/client.rb b/lib/influxdb/client.rb
index <HASH>..<HASH> 100644
--- a/lib/influxdb/client.rb
+++ b/lib/influxdb/client.rb
@@ -245,6 +245,8 @@ module InfluxDB
delay = [@max_delay, delay * 2].min
retry
end
+ ensure
+ http.finish if http.started?
end
end | Close the http connection when we're done with it. | influxdata_influxdb-ruby | train | rb |
49a7dfa3f0cb17f9c6b1f21490575b281fb9fafb | diff --git a/lib/rules/no-static-typos.js b/lib/rules/no-static-typos.js
index <HASH>..<HASH> 100644
--- a/lib/rules/no-static-typos.js
+++ b/lib/rules/no-static-typos.js
@@ -48,7 +48,10 @@ module.exports = {
MemberExpression: function(node) {
const relatedComponent = utils.getRelatedComponent(node);
- if (relatedComponent && utils.isES6Component(relatedComponent.node)) {
+ if (
+ relatedComponent &&
+ (utils.isES6Component(relatedComponent.node) || utils.isReturningJSX(relatedComponent.node))
+ ) {
var propertyName = node.property.name;
reportErrorIfCasingTypo(node, propertyName);
} | Properly detect ES6 components and Stateless functional components | ytanruengsri_eslint-plugin-react-ssr | train | js |
3486848253d20fba49ad4759bce149355f34411e | diff --git a/fermipy/jobs/defaults.py b/fermipy/jobs/defaults.py
index <HASH>..<HASH> 100644
--- a/fermipy/jobs/defaults.py
+++ b/fermipy/jobs/defaults.py
@@ -22,6 +22,7 @@ common = {
'nsims': (-1, 'Number of simulations to run.', int),
'dry_run': (False, 'Print commands but do not run them.', bool),
'make_plots': (False, 'Make plots', bool),
+ 'non_null_src': (False, 'Zero out test source', bool),
}
sims = { | Updated target_analysis to allow for keeping source in model for SED fitting | fermiPy_fermipy | train | py |
d0dd04db7289b36ebeacd88502f6a978a3452904 | diff --git a/lib/moneta.rb b/lib/moneta.rb
index <HASH>..<HASH> 100644
--- a/lib/moneta.rb
+++ b/lib/moneta.rb
@@ -32,8 +32,8 @@ module Moneta
end
def store(key, value, options = {})
- super(key, value)
update_options(key, options)
+ super(key, value)
end
private | Return value from Moneta::Expires#store rather than timestamp | moneta-rb_moneta | train | rb |
cd332616dc58688fa4c718249e66d2f7306ac63b | diff --git a/examples/keyboard_and_mouse_controls/targets.py b/examples/keyboard_and_mouse_controls/targets.py
index <HASH>..<HASH> 100644
--- a/examples/keyboard_and_mouse_controls/targets.py
+++ b/examples/keyboard_and_mouse_controls/targets.py
@@ -57,7 +57,7 @@ class Bullet(MoverMixin, ppb.Sprite):
scene = update.scene
- if self.position.y > scene.main_camera.frame_top:
+ if self.position.y > scene.main_camera.top:
scene.remove(self)
else:
for target in scene.get(tag='target'): | Updates keyboard_and_mouse_controls.targets to new Camera interface. | ppb_pursuedpybear | train | py |
057550c0e9bbc5a343a327441a791428eb166a5c | diff --git a/tasks/sails_tasks.js b/tasks/sails_tasks.js
index <HASH>..<HASH> 100644
--- a/tasks/sails_tasks.js
+++ b/tasks/sails_tasks.js
@@ -37,7 +37,7 @@ module.exports = function(grunt) {
};
liftSails({
- port: 1337,
+ port: process.env.REDOXLOCAL_GRUNT_PORT || 1337,
environment: grunt.option('env') || process.env.NODE_ENV,
tasks: true
}, function (err, sails) { | Grunt port for RedoxLocal added... | 100health_grunt-sails-tasks | train | js |
9dd53c2629a7a69c818215dd4c7a080ad07dea5b | diff --git a/nose/test_orbit.py b/nose/test_orbit.py
index <HASH>..<HASH> 100644
--- a/nose/test_orbit.py
+++ b/nose/test_orbit.py
@@ -1328,6 +1328,7 @@ def test_analytic_zmax():
tol['FlattenedPowerPotential']= -8. #these are more difficult
tol['testMWPotential']= -6. #these are more difficult
tol['KuzminDiskPotential']=-4 #these are more difficult
+ tol['SCFPotential']= -8. #these are more difficult
for p in pots:
#Setup instance of potential
if p in list(tol.keys()): ttol= tol[p]
@@ -1356,6 +1357,7 @@ def test_analytic_zmax():
o.integrate(times,tp,method=integrator)
tzmax= o.zmax()
tzmax_analytic= o.zmax(analytic=True)
+ print(p,(tzmax-tzmax_analytic)**2.)
#print p, integrator, tzmax, tzmax_analytic, (tzmax-tzmax_analytic)**2.
assert (tzmax-tzmax_analytic)**2. < 10.**ttol, \
"Analytically computed zmax does not agree by %g with numerical estimate for potential %s and integrator %s" %(numpy.fabs(tzmax-tzmax_analytic),p,integrator) | Lowered the tolerance for SCFPotential in test_analytic_zmax | jobovy_galpy | train | py |
d49737b04b026be113b9a05f0218ada19c145943 | diff --git a/eZ/Publish/Core/FieldType/MapLocation/Value.php b/eZ/Publish/Core/FieldType/MapLocation/Value.php
index <HASH>..<HASH> 100644
--- a/eZ/Publish/Core/FieldType/MapLocation/Value.php
+++ b/eZ/Publish/Core/FieldType/MapLocation/Value.php
@@ -57,6 +57,9 @@ class Value extends BaseValue
*/
public function __toString()
{
+ if ( is_array( $this->address ) )
+ return implode( ", ", $this->address );
+
return (string)$this->address;
}
} | Fixed: notices with weird data used for unit testing purposes
Array to string conversion happened with values used to test
acceptValue() behavior with incorrect input. | ezsystems_ezpublish-kernel | train | php |
678e2b5d7f307efa9a0be62c9013f00f74a29a9e | diff --git a/java/calcite/src/main/java/com/mapd/calcite/parser/MapDParser.java b/java/calcite/src/main/java/com/mapd/calcite/parser/MapDParser.java
index <HASH>..<HASH> 100644
--- a/java/calcite/src/main/java/com/mapd/calcite/parser/MapDParser.java
+++ b/java/calcite/src/main/java/com/mapd/calcite/parser/MapDParser.java
@@ -289,10 +289,6 @@ public final class MapDParser {
return tempOpTab;
}
- protected SqlNode parseStmt(String sql) throws SqlParseException {
- return getSqlParser(sql).parseStmt();
- }
-
protected SqlParser getSqlParser(String sql) {
return SqlParser.create(sql,
SqlParser.configBuilder() | Remove unused method in MapDParser | omnisci_mapd-core | train | java |
1f565a5623443afacad2a9fad35c5af324a9defc | diff --git a/www/webapp_local_server.js b/www/webapp_local_server.js
index <HASH>..<HASH> 100644
--- a/www/webapp_local_server.js
+++ b/www/webapp_local_server.js
@@ -31,7 +31,7 @@ module.exports = {
switchToPendingVersion: function(callback, errorCallback) {
cordova.exec(
callback,
- (error) => {
+ function(error) {
console.error(error);
if (typeof errorCallback === "function") {
errorCallback(error); | FIX - Replace fat-arrow (ES6) function with regular (ES5) function for backwards compatibility on Android <I>.x devices (#<I>) | meteor_cordova-plugin-meteor-webapp | train | js |
1c7cd8eb58cc9b10b56565991681b03be6a7c8f2 | diff --git a/fedmsg_meta_fedora_infrastructure/fasshim.py b/fedmsg_meta_fedora_infrastructure/fasshim.py
index <HASH>..<HASH> 100644
--- a/fedmsg_meta_fedora_infrastructure/fasshim.py
+++ b/fedmsg_meta_fedora_infrastructure/fasshim.py
@@ -123,7 +123,7 @@ def make_fas_cache(**config):
socket.setdefaulttimeout(600)
try:
log.info("Downloading FAS cache for %s*" % key)
- request = fasclient.send_request(
+ response = fasclient.send_request(
'/user/list',
req_params={'search': '%s*' % key},
auth=True)
@@ -134,7 +134,7 @@ def make_fas_cache(**config):
socket.setdefaulttimeout(timeout)
log.info("Caching necessary user data for %s*" % key)
- for user in request['people']:
+ for user in response['people']:
nick = user['ircnick']
if nick:
_fas_cache[nick] = user['username']
@@ -143,7 +143,7 @@ def make_fas_cache(**config):
if email:
_fas_cache[email] = user['username']
- del request
+ del response
del fasclient
del fedora.client.fas2 | This is really a response, not a request. | fedora-infra_fedmsg_meta_fedora_infrastructure | train | py |
34a15a1ad712cbfdeec8b3fe6bad3e58df41a651 | diff --git a/lib/modules/apostrophe-module/index.js b/lib/modules/apostrophe-module/index.js
index <HASH>..<HASH> 100644
--- a/lib/modules/apostrophe-module/index.js
+++ b/lib/modules/apostrophe-module/index.js
@@ -488,7 +488,7 @@ module.exports = {
} else {
// Load the definition; supply `extend` if it is not set
try {
- definition = require(path);
+ definition = _.clone(require(path));
} catch (e) {
// We need to stop the show in any case, but first print
// a more helpful syntax error message if we can | clone the required definition in defineRelatedType to prevent yet more crosstalk between instances of apos | apostrophecms_apostrophe | train | js |
189bacfd176b5be05ab52d4aecc68c3e1d4bddd0 | diff --git a/client/lib/wpcom-undocumented/lib/undocumented.js b/client/lib/wpcom-undocumented/lib/undocumented.js
index <HASH>..<HASH> 100644
--- a/client/lib/wpcom-undocumented/lib/undocumented.js
+++ b/client/lib/wpcom-undocumented/lib/undocumented.js
@@ -194,7 +194,7 @@ Undocumented.prototype.jetpackValidateSSONonce = function( siteId, ssoNonce, fn
};
Undocumented.prototype.jetpackAuthorizeSSONonce = function( siteId, ssoNonce, fn ) {
- debug( '/jetpack-blogs/:site_id:/sso-validate query' );
+ debug( '/jetpack-blogs/:site_id:/sso-authorize query' );
const endpointUrl = '/jetpack-blogs/' + siteId + '/sso-authorize';
const params = { sso_nonce: ssoNonce };
return this.wpcom.req.post( { path: endpointUrl }, params, fn ); | Jetpack SSO: Correct debug statement in WPCOM undocumented | Automattic_wp-calypso | train | js |
67887b074adcdd1c43caf39c4ba6be128cd9b977 | diff --git a/update.js b/update.js
index <HASH>..<HASH> 100644
--- a/update.js
+++ b/update.js
@@ -39,7 +39,7 @@ exports.padUpdate = function (hook_name, _pad) {
};
exports.notifyBegin = function(padId){
- console.debug("Getting pad email stuff for "+padId);
+ console.warn("Getting pad email stuff for "+padId);
db.get("emailSubscription:" + padId, function(err, recipients){ // get everyone we need to email
if(recipients){
async.forEach(Object.keys(recipients), function(recipient, cb){
@@ -121,6 +121,8 @@ exports.sendUpdates = function(padId){
// Is the user editing the pad?
exports.isUserEditingPad = function(padId, user, cb){
+ console.warn("padId is",padId);
+ /*
API.padUsers(padId, function(callback, padUsers){ // get the current users editing the pad
var userIsEditing = false;
console.debug("Current Pad Users:"+padUsers);
@@ -140,6 +142,8 @@ exports.isUserEditingPad = function(padId, user, cb){
cb(null, userIsEditing);
});
});
+ */
+ cb(null, false);
};
// Creates an interval process to check to send Updates based on checkFrequency and it returns an ID | commented out check if user is editing due to broken | JohnMcLear_ep_email_notifications | train | js |
fd3db219db8622912e02f5f38415771dc1bf3c7d | diff --git a/scout/utils/matchmaker.py b/scout/utils/matchmaker.py
index <HASH>..<HASH> 100644
--- a/scout/utils/matchmaker.py
+++ b/scout/utils/matchmaker.py
@@ -42,9 +42,12 @@ def matchmaker_request(url, token, method, content_type=None, accept=None, data=
)
json_response = resp.json()
LOG.info('MME server response was:{}'.format(json_response))
- if isinstance(json_response, dict):
- json_response['status_code'] = resp.status_code
+ if isinstance(json_response, str):
+ json_response = {
+ 'message' : json_response,
+ }
+ json_response['status_code'] = resp.status_code
except Exception as err:
LOG.info('An error occurred while sending HTTP request to server ({})'.format(err))
json_response = { | fixed server resilts for unauthorized response | Clinical-Genomics_scout | train | py |
780b5c9ba9807932c6d87308c0b5f15e2e4abcef | diff --git a/lib/opal/source_map.rb b/lib/opal/source_map.rb
index <HASH>..<HASH> 100644
--- a/lib/opal/source_map.rb
+++ b/lib/opal/source_map.rb
@@ -19,7 +19,7 @@ module Opal
mappings = @fragments.map do |fragment|
mapping = nil
- source_line = fragment.line
+ source_line = (fragment.line && fragment.line > 0) ? fragment.line : 1
source_column = fragment.column
source_code = fragment.code | source map line number 0 is illegal and fails webpack source map verification, source map line numbers count from 1 | opal_opal | train | rb |
fb4565183808d9cadccc721aaa6e6c872869bf55 | diff --git a/src/main/java/com/conveyal/gtfs/validator/SpeedTripValidator.java b/src/main/java/com/conveyal/gtfs/validator/SpeedTripValidator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/conveyal/gtfs/validator/SpeedTripValidator.java
+++ b/src/main/java/com/conveyal/gtfs/validator/SpeedTripValidator.java
@@ -61,7 +61,7 @@ public class SpeedTripValidator extends TripValidator {
registerError(currStopTime, DEPARTURE_BEFORE_ARRIVAL);
}
// Detect if travel times are rounded off to minutes.
- boolean bothTravelTimesRounded = areTravelTimesRounded(prevStopTime);
+ boolean bothTravelTimesRounded = areTravelTimesRounded(prevStopTime) && areTravelTimesRounded(currStopTime);
double travelTimeSeconds = currStopTime.arrival_time - prevStopTime.departure_time;
// If travel times are rounded and travel time is zero, determine the maximum and minimum possible speed
// by adding/removing one minute of slack. | fix(validate): fix rounded travel times check | conveyal_gtfs-lib | train | java |
41b477217da0f256a1573c14827309ba4a5d74a7 | diff --git a/grade/report/grader/preferences_form.php b/grade/report/grader/preferences_form.php
index <HASH>..<HASH> 100644
--- a/grade/report/grader/preferences_form.php
+++ b/grade/report/grader/preferences_form.php
@@ -96,7 +96,7 @@ class grader_report_preferences_form extends moodleform {
$full_pref = 'grade_report_' . $pref;
- $pref_value = get_user_preferences($full_pref, $CFG->$full_pref);
+ $pref_value = get_user_preferences($full_pref);
$options = null;
if (is_array($type)) { | MDL-<I> Removed the loading of the $CFG versions of the preferences when the user versions are set to default. This means that a value set to default always stays at default unless it is changed manually. | moodle_moodle | train | php |
ac5ac7de346338c62577cd2c8616fd9ef62b4cd6 | diff --git a/gexpect.go b/gexpect.go
index <HASH>..<HASH> 100644
--- a/gexpect.go
+++ b/gexpect.go
@@ -227,7 +227,7 @@ func (expect *ExpectSubprocess) expectTimeoutRegexFind(regex string, timeout tim
}()
go func() {
time.Sleep(timeout)
- err = fmt.Errorf("ExpectRegex timed out after %v finding '%v'.", timeout, regex)
+ err = fmt.Errorf("ExpectRegex timed out after %v finding '%v'.\nOutput:\n%s", timeout, regex, expect.Collect())
t <- true
}()
<-t
@@ -289,7 +289,7 @@ func (expect *ExpectSubprocess) ExpectTimeout(searchString string, timeout time.
select {
case e = <-result:
case <-time.After(timeout):
- e = fmt.Errorf("Expect timed out after %v waiting for '%v'.", timeout, searchString)
+ e = fmt.Errorf("Expect timed out after %v waiting for '%v'.\nOutput:\n%s", timeout, searchString, expect.Collect())
}
return e
} | include output in the error when a timeout occurs | ThomasRooney_gexpect | train | go |
798c5c429facd8c48ae6105496c4de1f2f7434b8 | diff --git a/src/gridstack.js b/src/gridstack.js
index <HASH>..<HASH> 100644
--- a/src/gridstack.js
+++ b/src/gridstack.js
@@ -678,10 +678,12 @@
self.grid.end_update();
- var nested_grid = o.find('.grid-stack');
- if (nested_grid.length && event.type == 'resizestop') {
- nested_grid.data('gridstack').on_resize_handler();
- nested_grid.find('.grid-stack-item').trigger('resizestop');
+ var nested_grids = o.find('.grid-stack');
+ if (nested_grids.length && event.type == 'resizestop') {
+ nested_grids.each(function(index, el) {
+ $(el).data('gridstack').on_resize_handler();
+ });
+ o.find('.grid-stack-item').trigger('resizestop');
}
}; | broadcast resizestop to nested grids "all the way down" | gridstack_gridstack.js | train | js |
9c08bb22c87f7950164dd859b9713365302a82be | diff --git a/grimoire/elk/enrich.py b/grimoire/elk/enrich.py
index <HASH>..<HASH> 100644
--- a/grimoire/elk/enrich.py
+++ b/grimoire/elk/enrich.py
@@ -82,6 +82,8 @@ def metadata(func):
class Enrich(object):
+ sh_db = None
+
def __init__(self, db_sortinghat=None, db_projects_map=None, json_projects_map=None,
db_user='', db_password='', db_host='', insecure=True):
self.sortinghat = False
@@ -91,7 +93,8 @@ class Enrich(object):
raise RuntimeError("Sorting hat configured but libraries not available.")
if db_sortinghat:
# self.sh_db = Database("root", "", db_sortinghat, "mariadb")
- self.sh_db = Database(db_user, db_password, db_sortinghat, db_host)
+ if not Enrich.sh_db:
+ Enrich.sh_db = Database(db_user, db_password, db_sortinghat, db_host)
self.sortinghat = True
self.prjs_map = None # mapping beetween repositories and projects | Share SH database between all enrich instances to avoid issues with too many connections open in MySQL | chaoss_grimoirelab-elk | train | py |
9d0acfc1e94c0f03145cdaac150b4896846c8ae1 | diff --git a/src/main/java/com/github/maven_nar/cpptasks/CCTask.java b/src/main/java/com/github/maven_nar/cpptasks/CCTask.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/maven_nar/cpptasks/CCTask.java
+++ b/src/main/java/com/github/maven_nar/cpptasks/CCTask.java
@@ -994,7 +994,11 @@ public class CCTask extends Task {
if (compileException == null && exception instanceof BuildException) {
compileException = (BuildException) exception;
} else {
- log(cores[j].getName() + " " + exception + " ", Project.MSG_ERR);
+ log(cores[j].getName() + " " + exception + " ", Project.MSG_ERR);
+ final StackTraceElement[] stackTrace = exception.getStackTrace();
+ for (final StackTraceElement element : stackTrace) {
+ log(element.toString(),Project.MSG_DEBUG);
+ }
}
if (!this.relentless) {
cores[j] = null; | Add stack trace for generic exception in build threads | maven-nar_nar-maven-plugin | train | java |
b8b49655fb8fe2790cf4b00113168f78dfbfec33 | diff --git a/lib/rvm/capistrano/base.rb b/lib/rvm/capistrano/base.rb
index <HASH>..<HASH> 100644
--- a/lib/rvm/capistrano/base.rb
+++ b/lib/rvm/capistrano/base.rb
@@ -10,6 +10,9 @@ rvm_with_capistrano do
case ruby
when "release_path"
shell = "rvm_path=#{rvm_path} #{shell} --path '#{release_path}'"
+ when "latest_release"
+ latest_release_path = exists?(:deploy_timestamped) ? release_path : current_path
+ shell = "rvm_path=#{rvm_path} #{shell} --path '#{latest_release_path}'"
when "local"
ruby = (ENV['GEM_HOME'] || "").gsub(/.*\//, "")
raise "Failed to get ruby version from GEM_HOME. Please make sure rvm is loaded!" if ruby.empty? | Support release_path or current_path (if in standalone mode)
Since there is no release_path unless you're deploying, fall back to
current_path. | rvm_rvm-capistrano | train | rb |
86255af38c9ee457d64645e6f3efdbf51a0763af | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -31,7 +31,9 @@ function cli() {
{
stdio: 'inherit'
}
- );
+ ).on('close', function(code) {
+ process.exit(code);
+ });
}
module.exports = { | pass grunt exit code to main process | Jimdo_grunt-angular-toolbox | train | js |
94ea4199b76fcd2b0d705c77982fcd124464efc6 | diff --git a/app/src/Bolt/BaseExtension.php b/app/src/Bolt/BaseExtension.php
index <HASH>..<HASH> 100644
--- a/app/src/Bolt/BaseExtension.php
+++ b/app/src/Bolt/BaseExtension.php
@@ -106,12 +106,9 @@ abstract class BaseExtension extends \Twig_Extension implements BaseExtensionInt
$this->config = $this->getDefaultConfig();
foreach ($this->getConfigFiles() as $filename) {
- echo "$filename<br>";
$this->loadConfigFile($filename);
}
$this->configLoaded = true;
- var_dump($this->config);
- die();
return $this->config;
} | Oops, left some debug code in :x | bolt_bolt | train | php |
454e90ceb02c76c7339f41567c88769720ada1af | diff --git a/cas-server-core/src/test/java/org/jasig/cas/MockExpireUpdateTicketLogoutManager.java b/cas-server-core/src/test/java/org/jasig/cas/MockExpireUpdateTicketLogoutManager.java
index <HASH>..<HASH> 100644
--- a/cas-server-core/src/test/java/org/jasig/cas/MockExpireUpdateTicketLogoutManager.java
+++ b/cas-server-core/src/test/java/org/jasig/cas/MockExpireUpdateTicketLogoutManager.java
@@ -47,6 +47,6 @@ public final class MockExpireUpdateTicketLogoutManager implements LogoutManager
@Override
public String createFrontChannelLogoutMessage(final LogoutRequest logoutRequest) {
- throw new IllegalArgumentException("Not implemented");
+ throw new UnsupportedOperationException("Not implemented");
}
}
diff --git a/cas-server-core/src/test/java/org/jasig/cas/MockOnlyOneTicketRegistry.java b/cas-server-core/src/test/java/org/jasig/cas/MockOnlyOneTicketRegistry.java
index <HASH>..<HASH> 100644
--- a/cas-server-core/src/test/java/org/jasig/cas/MockOnlyOneTicketRegistry.java
+++ b/cas-server-core/src/test/java/org/jasig/cas/MockOnlyOneTicketRegistry.java
@@ -65,6 +65,6 @@ public final class MockOnlyOneTicketRegistry implements TicketRegistry {
@Override
public Collection<Ticket> getTickets() {
- throw new IllegalArgumentException("Not implemented");
+ throw new UnsupportedOperationException("Not implemented");
}
} | CAS-<I>: Logout fails as an error happens when tickets are marked as expired
Updates after Misagh's code review | apereo_cas | train | java,java |
1fe9f16bad4b94164de021e5cfbd110d02e6db8c | diff --git a/modules/ngMeteor-collections.js b/modules/ngMeteor-collections.js
index <HASH>..<HASH> 100644
--- a/modules/ngMeteor-collections.js
+++ b/modules/ngMeteor-collections.js
@@ -29,6 +29,10 @@ ngMeteorCollections.factory('$collection', ['$q', 'HashKeyCopier',
if (auto) { // Deep watches the model and performs autobind.
scope.$watch(model, function (newItems, oldItems) {
+ if (angular.equals(newItems, oldItems)) {
+ return;
+ }
+
// Remove items that don't exist in the collection anymore.
angular.forEach(oldItems, function (oldItem) {
var index = newItems.map(function (item) { | Return during autobind if new/old items are the same | Urigo_angular-meteor | train | js |
9ab8e54b88d18e67fe1f769d5bb9fe1e1e9a9c32 | diff --git a/Observer/CustomerSaveAfterDataObject/A/SaveNew.php b/Observer/CustomerSaveAfterDataObject/A/SaveNew.php
index <HASH>..<HASH> 100644
--- a/Observer/CustomerSaveAfterDataObject/A/SaveNew.php
+++ b/Observer/CustomerSaveAfterDataObject/A/SaveNew.php
@@ -97,6 +97,7 @@ class SaveNew
*/
private function getParentId()
{
+ $result = null;
$posted = $this->appRequest->getPostValue();
if (isset($posted['customer'][ABlock::TMPL_FLDGRP][ABlock::TMPL_FIELD_PARENT_MLM_ID])) {
$mlmId = $posted['customer'][ABlock::TMPL_FLDGRP][ABlock::TMPL_FIELD_PARENT_MLM_ID];
@@ -104,8 +105,6 @@ class SaveNew
if ($found) {
$result = $found->getCustomerRef();
}
- } else {
- $result = null;
}
return $result;
}
@@ -147,4 +146,4 @@ class SaveNew
$data->setDateChanged($dateChanged);
$this->daoChangeGroup->create($data);
}
-}
\ No newline at end of file
+} | SAN-<I> Error on MLM ID setup | praxigento_mobi_mod_downline | train | php |
186c46d5cc4ef8e50a01f3e7a0b0fdb90fd732ac | diff --git a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ViewFetcher.java b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ViewFetcher.java
index <HASH>..<HASH> 100644
--- a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ViewFetcher.java
+++ b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ViewFetcher.java
@@ -390,7 +390,7 @@ class ViewFetcher {
}
if(index < 1){
for(T view : views){
- if(view.getDrawingTime() > drawingTime){
+ if(view.getDrawingTime() > drawingTime && view.getHeight() > 0){
drawingTime = view.getDrawingTime();
viewToReturn = view;
} | Bugfix in ViewFetcher which solves issue <I> | RobotiumTech_robotium | train | java |
b148362d285ebd62520308e264061ee86efad6d5 | diff --git a/externs/w3c_dom1.js b/externs/w3c_dom1.js
index <HASH>..<HASH> 100644
--- a/externs/w3c_dom1.js
+++ b/externs/w3c_dom1.js
@@ -384,12 +384,10 @@ Document.prototype.createCDATASection = function(data) {};
Document.prototype.createDocumentFragment = function() {};
/**
- * Create a DOM element. Surprisingly, this has side-effects on IE
- * (creating and element with a custom tag boots up a sub-system that
- * handles custom tags).
* @param {string} tagName
* @return {!Element}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createElement
+ * @nosideeffects
*/
Document.prototype.createElement = function(tagName) {}; | Mark document.createElement as having no side effects.
Relies on changes in ae4e<I>a<I>d<I>bfad<I>d<I>af7b<I> to preserve HTML5 SHIM code. | google_closure-compiler | train | js |
37ca1ae502e456adc211c9ee10d2238bc2f13e36 | diff --git a/lib/skype/platforms/linux.rb b/lib/skype/platforms/linux.rb
index <HASH>..<HASH> 100644
--- a/lib/skype/platforms/linux.rb
+++ b/lib/skype/platforms/linux.rb
@@ -17,7 +17,7 @@ module Skype
end
end
- def self.exec(command, :response_filter => true)
+ def self.exec(command, opts={:response_filter => true})
res = (@@connection||=Connection.new).invoke command
res = filter_response res if opts[:response_filter]
res | bugfix linux exec response filter #<I> | shokai_skype-ruby | train | rb |
b534cd37b833400f9c9c82505c7eeeb480443ea9 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,5 @@
"""tmuxp lives at <https://github.com/tmux-python/tmuxp>."""
import sys
-from collections import OrderedDict
from setuptools import setup
from setuptools.command.test import test as TestCommand
@@ -41,13 +40,11 @@ setup(
name=about['__title__'],
version=about['__version__'],
url=about['__github__'],
- project_urls=OrderedDict(
- (
- ('Documentation', about['__docs__']),
- ('Code', about['__github__']),
- ('Issue tracker', about['__tracker__']),
- )
- ),
+ project_urls={
+ 'Documentation': about['__docs__'],
+ 'Code': about['__github__'],
+ 'Issue tracker': about['__tracker__'],
+ },
download_url=about['__pypi__'],
license=about['__license__'],
author=about['__author__'], | Remove OrderedDict from setup.py
So we don't have to mess with collections.abc changing in python
versions | tmux-python_tmuxp | train | py |
1607d74a8de0704b82627364645a99b699d40cc0 | diff --git a/workflow/executor/pns/pns.go b/workflow/executor/pns/pns.go
index <HASH>..<HASH> 100644
--- a/workflow/executor/pns/pns.go
+++ b/workflow/executor/pns/pns.go
@@ -224,6 +224,7 @@ func (p *PNSExecutor) GetOutputStream(containerID string, combinedOutput bool) (
}
opts := v1.PodLogOptions{
Container: common.MainContainerName,
+ Follow: true,
}
return p.clientset.CoreV1().Pods(p.namespace).GetLogs(p.podName, &opts).Stream()
} | PNS executor intermitently failed to capture entire log of script templates (#<I>) | argoproj_argo | train | go |
3f74fdc4010cd628130189e3ac9f2e5b2507038c | diff --git a/django_core/db/models/mixins/urls.py b/django_core/db/models/mixins/urls.py
index <HASH>..<HASH> 100644
--- a/django_core/db/models/mixins/urls.py
+++ b/django_core/db/models/mixins/urls.py
@@ -27,7 +27,7 @@ class AbstractUrlLinkModelMixin(models.Model):
**attrs):
"""Gets the html link for the object."""
if text is None:
- text = getattr(self, self.get_link_text_field(), self.id)
+ text = self.get_link_text()
return build_link(href=self.get_absolute_url(),
text=text,
@@ -62,3 +62,7 @@ class AbstractUrlLinkModelMixin(models.Model):
def get_link_text_field(self):
"""This returns the field name to use for the absolute url."""
return 'id'
+
+ def get_link_text(self):
+ """Gets the text for the absolute url link."""
+ return getattr(self, self.get_link_text_field(), self.id) | Added method to get link text so it can be overridden. | InfoAgeTech_django-core | train | py |
6a31c99f167ca6f2701be1762cac364b531f7fa0 | diff --git a/tests/integration/test.attachments.js b/tests/integration/test.attachments.js
index <HASH>..<HASH> 100644
--- a/tests/integration/test.attachments.js
+++ b/tests/integration/test.attachments.js
@@ -1621,6 +1621,17 @@ adapters.forEach(function (adapter) {
});
});
+ it('putAttachment in new doc with base64', function () {
+ var db = new PouchDB(dbs.name, {auto_compaction: false});
+
+ return db.putAttachment('foo', 'att', 'Zm9v', 'text/plain').then(function () {
+ return db.get('foo', {attachments: true});
+ }).then(function (doc) {
+ doc._attachments['att'].content_type.should.match(/^text\/plain/);
+ doc._attachments['att'].data.should.equal('Zm9v');
+ });
+ });
+
it('#2818 - save same attachment in different revs', function () {
var db = new PouchDB(dbs.name, {auto_compaction: false}); | (#<I>) - add putAttachment() test
Based on a SO question, I was worried
that we didn't support the case where `putAttachment()`
is creating a new document with a base<I> string.
But it seems to work. | pouchdb_pouchdb | train | js |
79a42273078218a8b15b53b85a1a550c640fcb95 | diff --git a/src/Client.php b/src/Client.php
index <HASH>..<HASH> 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -71,7 +71,7 @@ class Client extends EventEmitter
protected function setConnectionHandlers()
{
- $this->connection->on('data', function ($chunk) {
+ $this->connection->on('data', function($chunk) {
$parsed = $this->parser->parseRawResponse($chunk);
$this->resolveRequests($parsed);
});
@@ -80,7 +80,7 @@ class Client extends EventEmitter
$this->rejectPendingRequestsWith(new ConnectionClosedException());
});
- $this->connection->on('close', function () {
+ $this->connection->on('close', function() {
if (!$this->isEnding) {
$this->emit('error', [new ConnectionClosedException()]);
}
@@ -96,7 +96,7 @@ class Client extends EventEmitter
{
$request = new Request($name);
- if($this->isEnding) {
+ if ($this->isEnding) {
$request->reject(new ConnectionClosedException());
} else {
try {
@@ -173,7 +173,7 @@ class Client extends EventEmitter
*/
protected function rejectPendingRequestsWith(Exception $exception)
{
- while($this->hasPendingRequests()) {
+ while ($this->hasPendingRequests()) {
$request = array_shift($this->requests);
/* @var $request Request */
$request->reject($exception); | Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL> | seregazhuk_php-react-memcached | train | php |
fe4537aa2d5dca6ffb0322291b6455c3508fb9de | diff --git a/lib/android.js b/lib/android.js
index <HASH>..<HASH> 100644
--- a/lib/android.js
+++ b/lib/android.js
@@ -10,7 +10,7 @@ const JAVA_HOME = JAVA.JAVA_HOME;
var env = process.env;
var isWindows = _.platform.isWindows;
-var MAX_SDK_VERSION = 23;
+var MAX_SDK_VERSION = 24;
var MIN_SDK_VERSION = 16;
exports.check_JAVA_VERSION = function *() { | Change max sdk version to <I> | macacajs_macaca-doctor | train | js |
a4edc069ffde64ad693177271f6781beba1e9b0a | diff --git a/lib/Insteon/index.js b/lib/Insteon/index.js
index <HASH>..<HASH> 100644
--- a/lib/Insteon/index.js
+++ b/lib/Insteon/index.js
@@ -70,7 +70,7 @@ Insteon.prototype.connect = function(host, port, connectListener) {
this.write = function(raw) {
return this.socket.write(raw, 'hex');
};
- this.close = this.socket.end;
+ this.close = this.socket.end.bind(this.socket);
this.socket.connect(this.port, this.host, connectListener);
}; | Bind socket end() rather than directly assign. Fixes situation where socket doesn't release. | automategreen_home-controller | train | js |
7682a04c7b4e3fb803b3e1074bc1fd8310959cae | diff --git a/plexapi/photo.py b/plexapi/photo.py
index <HASH>..<HASH> 100644
--- a/plexapi/photo.py
+++ b/plexapi/photo.py
@@ -70,13 +70,6 @@ class Photoalbum(PlexPartialObject):
return photo
raise NotFound('Unable to find photo: %s' % title)
- def reload(self):
- """ Reload the data for this object from self.key. """
- self._initpath = self.key
- data = self._server.query(self.key)
- self._loadData(data)
- return self
-
@utils.registerPlexObject
class Photo(PlexPartialObject): | remove reload since it interited. | pkkid_python-plexapi | train | py |
abf7785706fd2b1a8fedbf4a8ec39778756ce596 | diff --git a/libs/PclZip/pclzip.lib.php b/libs/PclZip/pclzip.lib.php
index <HASH>..<HASH> 100644
--- a/libs/PclZip/pclzip.lib.php
+++ b/libs/PclZip/pclzip.lib.php
@@ -1717,7 +1717,7 @@ class PclZip
$v_function_name = $p_options_list[$i + 1];
// ----- Check that the value is a valid existing function
- if ((is_string($v_function_name) && !function_exists($v_function_name)) || !is_callable($v_function_name)) {
+ if ((is_string($v_function_name) && !function_exists($v_function_name)) && !is_callable($v_function_name)) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '" . $v_function_name . "()' is not an existing function for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); | we need to use an AND not OR | matomo-org_component-decompress | train | php |
6fe8ef4d77fbab75e0ec00e8a177782a65b400f4 | diff --git a/AWSScout2/utils_iam.py b/AWSScout2/utils_iam.py
index <HASH>..<HASH> 100644
--- a/AWSScout2/utils_iam.py
+++ b/AWSScout2/utils_iam.py
@@ -53,7 +53,13 @@ def get_permissions(policy_document, permissions, keyword, name, policy_name):
manage_dictionary(permissions, 'Action', {})
manage_dictionary(permissions, 'NotAction', {})
document = json.loads(urllib.unquote(policy_document).decode('utf-8'))
- for statement in document['Statement']:
+ if type(document['Statement']) != list:
+ parse_statement(policy_document, permissions, keyword, name, policy_name, document['Statement'])
+ else:
+ for statement in document['Statement']:
+ parse_statement(policy_document, permissions, keyword, name, policy_name, statement)
+
+def parse_statement(policy_document, permissions, keyword, name, policy_name, statement):
effect = str(statement['Effect'])
action_string = 'Action' if 'Action' in statement else 'NotAction'
resource_string = 'Resource' if 'Resource' in statement else 'NotResource' | Bugfix - handle non-list policy statements | nccgroup_Scout2 | train | py |
43aa30c3aa4b77c0b627368f4e68eb20aecfdff5 | diff --git a/src/viz/helpers/errorCheck.js b/src/viz/helpers/errorCheck.js
index <HASH>..<HASH> 100644
--- a/src/viz/helpers/errorCheck.js
+++ b/src/viz/helpers/errorCheck.js
@@ -24,7 +24,7 @@ module.exports = function(vars) {
var missing = []
reqs.forEach(function(r){
if (typeof r === "string") {
- if (!vars[r].value) missing.push("\""+r+"\"")
+ if (!vars[r].value || !vars[r].value.length) missing.push("\""+r+"\"")
}
else if (typeof r === "function") {
var reqReturn = r(vars) | fails gracefully when focus is required but not defined (#<I>) | alexandersimoes_d3plus | train | js |
194ded76b760081526b67f53e25520b552829a60 | diff --git a/lib/flor/unit/caller_jruby.rb b/lib/flor/unit/caller_jruby.rb
index <HASH>..<HASH> 100644
--- a/lib/flor/unit/caller_jruby.rb
+++ b/lib/flor/unit/caller_jruby.rb
@@ -41,7 +41,7 @@ module Flor
henv.each { |k, v| builder.environment.put(k, v) }
process = builder.start
- pid = process.pid
+ pid = process.respond_to?(:pid) ? process.pid : nil
o = process.outputStream.to_io
i = process.inputStream.to_io
@@ -61,10 +61,12 @@ module Flor
rescue => err
- Process.detach(pid) \
- if pid
- (Process.kill(9, pid) rescue nil) \
- unless Flor.no?(conf['on_error_kill'])
+ if pid
+ Process.detach(pid)
+ (Process.kill(9, pid) rescue nil) unless Flor.no?(conf['on_error_kill'])
+ else
+ process.destroy rescue nil
+ end
raise err if err.is_a?(SpawnError)
raise WrappedSpawnError.new(conf, { to: to, t0: t0, pid: pid }, err)
@@ -72,7 +74,6 @@ module Flor
ensure
[ i, o, f ].each { |x| x.close rescue nil }
-
end
module CmdParser include Raabro | Tighten JRuby caller against older JVMs | floraison_flor | train | rb |
3d888c1e107a93ebd30b351c07d8c0bf4578144b | diff --git a/tests/integration/Routing/InputHandlerIntegrationTest.php b/tests/integration/Routing/InputHandlerIntegrationTest.php
index <HASH>..<HASH> 100644
--- a/tests/integration/Routing/InputHandlerIntegrationTest.php
+++ b/tests/integration/Routing/InputHandlerIntegrationTest.php
@@ -240,12 +240,20 @@ class InputHandlerIntegrationTest extends \Ems\IntegrationTest
$routes->get('my-account', function (Input $input) {
return 'my-account was called';
})->middleware('require-token');
+
+ $routes->get('home', function (Input $input) {
+ return 'home was called';
+ });
});
$response = $handler($this->input('my-account'));
$this->assertEquals('I dont care about the next middlewares', $response->payload());
+ $response = $handler($this->input('home'));
+
+ $this->assertEquals('home was called', $response->payload());
+
}
/**
* @param Container|null $container | Small explicit test for route without middleware | mtils_php-ems | train | php |
6c695ddf2970697273606905112c1133a5f139ec | diff --git a/brottsplatskartan/__init__.py b/brottsplatskartan/__init__.py
index <HASH>..<HASH> 100644
--- a/brottsplatskartan/__init__.py
+++ b/brottsplatskartan/__init__.py
@@ -57,7 +57,7 @@ class BrottsplatsKartan: # pylint: disable=too-few-public-methods
rate_limited = requests_response.headers.get('x-ratelimit-reset')
if rate_limited:
print("You have been rate limited until " + time.strftime(
- '%Y-%m-%d %H:%M:%S%z', time.localtime(rate_limited)))
+ '%Y-%m-%d %H:%M:%S%z', time.localtime(int(rate_limited))))
return True
return False | Transform x-ratelimit-reset from str to int.
Trying to run time.localtime on a str gives TypeError:
TypeError: an integer is required (got type str) | chrillux_brottsplatskartan | train | py |
3264d1fb47c89afa3af4248ab8a5501e145581a3 | diff --git a/src/Form.php b/src/Form.php
index <HASH>..<HASH> 100644
--- a/src/Form.php
+++ b/src/Form.php
@@ -138,6 +138,13 @@ class Form implements Renderable
public static $availableFields = [];
/**
+ * Form field alias.
+ *
+ * @var array
+ */
+ public static $fieldAlias = [];
+
+ /**
* Ignored saving fields.
*
* @var array
@@ -1368,6 +1375,19 @@ class Form implements Renderable
}
/**
+ * Set form field alias.
+ *
+ * @param string $field
+ * @param string $alias
+ *
+ * @return void
+ */
+ public static function alias($field, $alias)
+ {
+ static::$fieldAlias[$alias] = $field;
+ }
+
+ /**
* Remove registered field.
*
* @param array|string $abstract
@@ -1386,6 +1406,11 @@ class Form implements Renderable
*/
public static function findFieldClass($method)
{
+ // If alias exists.
+ if (isset(static::$fieldAlias[$method])) {
+ $method = static::$fieldAlias[$method];
+ }
+
$class = array_get(static::$availableFields, $method);
if (class_exists($class)) { | [feat]Support form field alias | z-song_laravel-admin | train | php |
6d42fc353a4d006e937a65d6262bd0f5bd4b6f7c | diff --git a/api/src/opentrons/util/calibration_functions.py b/api/src/opentrons/util/calibration_functions.py
index <HASH>..<HASH> 100644
--- a/api/src/opentrons/util/calibration_functions.py
+++ b/api/src/opentrons/util/calibration_functions.py
@@ -35,8 +35,8 @@ def probe_instrument(instrument, robot, tip_length=None) -> Point:
robot.poses = instrument._move(robot.poses, z=safe_height)
for hs in hot_spots:
- x0 = tp.center[0] + hs.x_start_offs
- y0 = tp.center[1] + hs.y_start_offs
+ x0 = center[0] + hs.x_start_offs
+ y0 = center[1] + hs.y_start_offs
z0 = hs.z_start_abs
log.info("Moving to {}".format((x0, y0, z0))) | fix(api): fix tip probing not fully self-centering (#<I>)
fix #<I> | Opentrons_opentrons | train | py |
ea5d22f53252180d3b07e28802714dde0561290b | diff --git a/pymatgen/analysis/tests/test_wulff.py b/pymatgen/analysis/tests/test_wulff.py
index <HASH>..<HASH> 100644
--- a/pymatgen/analysis/tests/test_wulff.py
+++ b/pymatgen/analysis/tests/test_wulff.py
@@ -75,6 +75,13 @@ class WulffShapeTest(PymatgenTest):
self.wulff_Nb.get_plot()
self.wulff_Ir.get_plot()
+ @unittest.skipIf("DISPLAY" not in os.environ, "Need display")
+ def test_get_plotly(self):
+ # Basic test, not really a unittest.
+ self.wulff_Ti.get_plotly()
+ self.wulff_Nb.get_plotly()
+ self.wulff_Ir.get_plotly()
+
def symm_check(self, ucell, wulff_vertices):
"""
# Checks if the point group of the Wulff shape matches | pseudo test for get_plotly, need display | materialsproject_pymatgen | train | py |
52ed77413514535a3e2bc9b2d293511f364cf433 | diff --git a/template/helper/listbox.php b/template/helper/listbox.php
index <HASH>..<HASH> 100644
--- a/template/helper/listbox.php
+++ b/template/helper/listbox.php
@@ -40,7 +40,7 @@ class ComTagsTemplateHelperListbox extends KTemplateHelperListbox
))->append(array(
'model' => $this->getObject('com:tags.model.tags', array('table' => $config->component.'_tags')),
'options' => array(
- 'tokenSeparators' => ($config->autocreate) ? array(',', ' ') : null,
+ 'tokenSeparators' => ($config->autocreate) ? array(',', ' ') : array(),
'tags' => $config->autocreate,
),
)); | issue #3 Sync with Kodekit Platform | joomlatools_joomlatools-framework | train | php |
8a64dd78cdee4cdf079153c83b94687d453e4e50 | diff --git a/lib/bixby_common/command_spec.rb b/lib/bixby_common/command_spec.rb
index <HASH>..<HASH> 100644
--- a/lib/bixby_common/command_spec.rb
+++ b/lib/bixby_common/command_spec.rb
@@ -68,7 +68,7 @@ class CommandSpec
end
def command_file
- File.join(self.bundle_dir, "bin", @command)
+ path("bin", @command)
end
def command_exists?
@@ -88,7 +88,7 @@ class CommandSpec
end
def digest_file
- File.join(self.bundle_dir, "digest")
+ path("digest")
end
def load_digest
@@ -99,6 +99,23 @@ class CommandSpec
nil
end
+ def load_manifest
+ begin
+ return MultiJson.load(path("manifest.json"))
+ rescue => ex
+ end
+ nil
+ end
+
+ # Create and return an absolute pathname pointing to the given file
+ #
+ # @param [String] *relative
+ #
+ # @return [String]
+ def path(*relative)
+ File.join(self.bundle_dir, *relative)
+ end
+
def update_digest
path = self.bundle_dir | helper for reading manifest file; simpler path handling | chetan_bixby-common | train | rb |
68a4f08a529e044583fe5ab61574906e60608dca | diff --git a/src/geo/map.js b/src/geo/map.js
index <HASH>..<HASH> 100644
--- a/src/geo/map.js
+++ b/src/geo/map.js
@@ -21,7 +21,7 @@ var Map = Model.extend({
provider: 'leaflet'
},
- RELOAD_DEBOUNCE_TIME: 100,
+ RELOAD_DEBOUNCE_TIME: 10,
initialize: function (attrs, options) {
options = options || {}; | Decreased RELOAD_DEBOUNCE_TIME to <I>ms | CartoDB_carto.js | train | js |
cedbd8eb8d217035aba6d689cdcde2aaf83f7d7e | diff --git a/Slim/Router.php b/Slim/Router.php
index <HASH>..<HASH> 100644
--- a/Slim/Router.php
+++ b/Slim/Router.php
@@ -118,8 +118,9 @@ class Router extends RouteCollector implements RouterInterface
// Prepend parent group pattern(s)
if ($this->routeGroups) {
- if (strlen($pattern) === 1 && strpos($pattern, '/') === 0) {
- $pattern = ltrim($pattern, '/');
+ // If any route in the group only has / we remove it
+ if ($pattern === '/') {
+ $pattern = '';
}
$pattern = $this->processGroups() . $pattern;
} | Updated as per comment from @akrabat | slimphp_Slim | train | php |
6f2a129c111a99095a0ec214a31054755cb08ab1 | diff --git a/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb b/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb
index <HASH>..<HASH> 100644
--- a/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb
+++ b/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb
@@ -41,3 +41,6 @@ agents.each { |agent|
fail_test "Site.pp not detect at Master?" unless
stdout.include? 'ticket_5477_notify'
}
+
+step "Clean-up site.pp"
+on master, "rm /etc/puppet/manifests/site.pp" | add clean-up step to test for ticket_<I> to prevent site.pp from leaking to other tests | puppetlabs_puppet | train | rb |
a614b97d5c78aad6620aba5a3436315918b9e273 | diff --git a/src/js/index.js b/src/js/index.js
index <HASH>..<HASH> 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -99,6 +99,7 @@ export default class bulmaCarousel extends EventEmitter {
if (!this.currentItem.node) {
this.currentItem.node = this.items[0];
this.currentItem.node.classList.add('is-active');
+ this.currentItem.node.style.opacity = 1;
this.currentItem.pos = 0;
}
this.forceHiddenNavigation = this.items.length <= 1;
@@ -298,7 +299,7 @@ export default class bulmaCarousel extends EventEmitter {
this.nextControl = this.element.querySelector('.carousel-nav-right');
if (this.items.length <= 1 || this.forceHiddenNavigation) {
- if (this.container) {
+ if (this.container && !this.element.classList.contains('carousel-animate-fade')) {
this.container.style.left = '0';
}
if (this.previousControl) { | Fixes 'OneImageIssue' when fade animation is selected. | Wikiki_bulma-carousel | train | js |
f10950a0174d4327f4a23b3bddb62ee2dfcae328 | diff --git a/src/Provider/ApiServiceProvider.php b/src/Provider/ApiServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Provider/ApiServiceProvider.php
+++ b/src/Provider/ApiServiceProvider.php
@@ -23,12 +23,12 @@ abstract class ApiServiceProvider extends ServiceProvider
*/
public function boot()
{
- Http\Response::setFormatters($this->prepareConfigValues($this->app['config']['api.formats']));
+ $config = $this->app['config']['api'];
+
+ Http\Response::setFormatters($this->prepareConfigValues($config['formats']));
Http\Response::setTransformer($this->app['api.transformer']);
Http\Response::setEventDispatcher($this->app['events']);
- $config = $this->app['config']['api'];
-
Http\Request::setAcceptParser(
new Http\Parser\Accept($config['standardsTree'], $config['subtype'], $config['version'], $config['defaultFormat'])
);
@@ -346,8 +346,8 @@ abstract class ApiServiceProvider extends ServiceProvider
{
if (is_string($instance)) {
return $this->app->make($instance);
- } else {
- return $instance;
}
+
+ return $instance;
}
} | Tidy up the service provider a bit. Need to look at tidying it up more. | laravie_api | train | php |
cc80cd25a8ba8de05120d6f7dff49803d2a6f36e | diff --git a/ca/config.go b/ca/config.go
index <HASH>..<HASH> 100644
--- a/ca/config.go
+++ b/ca/config.go
@@ -212,6 +212,7 @@ func LoadOrCreateManagerSecurityConfig(ctx context.Context, baseCertDir, caHash,
if err = ioutil.WriteFile(paths.RootCA.Cert, rootCA.Cert, 0644); err != nil {
return nil, err
}
+ log.Infof("Waiting for cluster membership to be approved to proceed with further action")
log.Debugf("downloaded remote CA certificate from: %s", managerAddr)
} | Adding INFO message while waiting for cert approval | docker_swarmkit | train | go |
679bb84d7014672f96e88a052499f2a14e7997a3 | diff --git a/rest_client/__init__.py b/rest_client/__init__.py
index <HASH>..<HASH> 100644
--- a/rest_client/__init__.py
+++ b/rest_client/__init__.py
@@ -11,7 +11,7 @@ except ImportError:
IS_PYPY = False
author_info = ("Dmitry Orlov", "me@mosquito.su")
-version_info = (0, 2, 3)
+version_info = (0, 2, 4)
__version__ = ".".join(map(str, version_info))
__author__ = "{0} <{1}>".format(*author_info)
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ requires = [
]
-if sys.version_info >= (3,):
+if sys.version_info < (3,):
requires.append('futures') | [fix] requires for py2 | mosquito_rest-client | train | py,py |
3b8449cc624247750643d08e766b2043c5713dec | diff --git a/lib/beetle/version.rb b/lib/beetle/version.rb
index <HASH>..<HASH> 100644
--- a/lib/beetle/version.rb
+++ b/lib/beetle/version.rb
@@ -1,3 +1,3 @@
module Beetle
- VERSION = "3.5.4"
+ VERSION = "3.5.5"
end | bumped gem version to <I> | xing_beetle | train | rb |
280d297eed31dc7656cbaa1744e39b93637523cc | diff --git a/tests/CRUDlexTests/ServiceProviderTest.php b/tests/CRUDlexTests/ServiceProviderTest.php
index <HASH>..<HASH> 100644
--- a/tests/CRUDlexTests/ServiceProviderTest.php
+++ b/tests/CRUDlexTests/ServiceProviderTest.php
@@ -284,7 +284,8 @@ class ServiceProviderTest extends \PHPUnit_Framework_TestCase {
'isOpenOnSundays' => [],
'author' => [],
'title' => [],
- 'library' => []
+ 'library' => [],
+ 'libraryBook' => []
], '', '', [], $serviceProvider
));
$entityDefinitionFactoryMock = $entityDefinitionFactoryHandle->get(); | fixed a test within ServiceProviderTest | philiplb_CRUDlex | train | php |
4d24e7c72a104e5b174c349c011aef02fbac462f | diff --git a/src/commands/run.js b/src/commands/run.js
index <HASH>..<HASH> 100644
--- a/src/commands/run.js
+++ b/src/commands/run.js
@@ -220,7 +220,7 @@ exports.handler = function ({
title: 'Open DAO',
task: (ctx, task) => new TaskList([
{
- title: 'Download wrapper',
+ title: 'Download client',
skip: () => !!clientPath,
task: (ctx, task) => {
clientVersion = clientVersion || DEFAULT_CLIENT_VERSION
@@ -229,7 +229,7 @@ exports.handler = function ({
// Make sure we haven't already downloaded the wrapper
if (fs.existsSync(path.resolve(CLIENT_PATH))) {
- task.skip('Wrapper already downloaded')
+ task.skip('Client already downloaded')
ctx.wrapperAvailable = true
return
}
@@ -244,7 +244,7 @@ exports.handler = function ({
}
},
{
- title: 'Install wrapper dependencies',
+ title: 'Install client dependencies',
task: async (ctx, task) => installDeps(ctx.wrapperPath, task),
enabled: (ctx) => !ctx.wrapperAvailable && !clientPath
},
@@ -268,7 +268,7 @@ exports.handler = function ({
}
},
{
- title: 'Open wrapper',
+ title: 'Open client',
task: (ctx, task) => {
// Check until the wrapper is served
const checkWrapperReady = () => { | 'wrapper' -> 'client' in logs (#<I>) | aragon_aragon-cli | train | js |
b264e3a1eefb3462b33f580e6d8eab30b05a627e | diff --git a/code/extensions/AssetAdminSyncFilesExtension.php b/code/extensions/AssetAdminSyncFilesExtension.php
index <HASH>..<HASH> 100644
--- a/code/extensions/AssetAdminSyncFilesExtension.php
+++ b/code/extensions/AssetAdminSyncFilesExtension.php
@@ -6,9 +6,13 @@
class AssetAdminSyncFilesExtension extends Extension {
- public function updateEditForm($form) {
+ private static $enable_sync_files_button = false;
- $form->Fields()->removeByName('SyncButton');
+ public function updateEditForm($form) {
+ $enable = Config::inst()->get('AssetAdmin', 'enable_sync_files_button');
+ if (!$enable){
+ $form->Fields()->removeByName('SyncButton');
+ }
}
} | feat(AssetAdminSyncFilesExtension): change the removal of this to be overridable via config | symbiote_silverstripe-seed | train | php |
ac57f36451bec13774cbf527a044d8127ebe7c09 | diff --git a/scanpy/tests/test_plotting.py b/scanpy/tests/test_plotting.py
index <HASH>..<HASH> 100644
--- a/scanpy/tests/test_plotting.py
+++ b/scanpy/tests/test_plotting.py
@@ -50,7 +50,7 @@ def test_dotplot():
os.remove(outfile.name)
-def test_dotplot():
+def test_dotplot_numeric_column():
adata = sc.datasets.krumsiek11()
outfile = NamedTemporaryFile(suffix='.png', prefix='scanpy_test_dotplot2_', delete=False)
adata.obs['Gata2'] = adata.X[:, 0] | renamed method with duplicated name | theislab_scanpy | train | py |
4078c52680288121b337dbd9dd7a161b8a06cae5 | diff --git a/builtwith.py b/builtwith.py
index <HASH>..<HASH> 100644
--- a/builtwith.py
+++ b/builtwith.py
@@ -31,6 +31,9 @@ class UrlTechnologiesSet(object):
self._technologies_by_name[technologies_dict['Name']] = technologies_dict
+ def __iter__(self):
+ return iter(self._technologies_by_name.values())
+
def get_technology_info(self, technology_name):
return self._technologies_by_name.get(technology_name, None)
@@ -49,6 +52,9 @@ class BuiltWithDomainInfo(object):
self._technologies_by_url[
url_key] = UrlTechnologiesSet(path_entry['Technologies'])
+ def __iter__(self):
+ return iter(self._technologies_by_url.values())
+
@staticmethod
def __get_url_key(domain, subdomain, path):
return domain, subdomain, path | Add iterator support to URLs list and the tech list for a given URL | claymation_python-builtwith | train | py |
14cbeea6f035b05f65ce8ea233e090ed619566bc | diff --git a/pysat/instruments/dmsp_ivm.py b/pysat/instruments/dmsp_ivm.py
index <HASH>..<HASH> 100644
--- a/pysat/instruments/dmsp_ivm.py
+++ b/pysat/instruments/dmsp_ivm.py
@@ -155,7 +155,7 @@ def download(date_array, tag='', sat_id='', data_path=None, user=None,
The affiliation field is set to pysat to enable tracking of pysat downloads.
"""
- mad_meth.download(date_array, inst_code=str(madrigal_inst_code),
+ mad_meth.download(date_array, inst_code=str(madrigal_inst_tag),
kindat=str(madrigal_tag[sat_id][tag]),
data_path=data_path, user=user, password=password) | Update dmsp_ivm.py
Updated variable name for madrigal download method | rstoneback_pysat | train | py |
1f7db5b0e9e6342099b2901ba30ec4f7d230277f | diff --git a/lib/did_you_mean/finders/name_error_finders/similar_name_finder.rb b/lib/did_you_mean/finders/name_error_finders/similar_name_finder.rb
index <HASH>..<HASH> 100644
--- a/lib/did_you_mean/finders/name_error_finders/similar_name_finder.rb
+++ b/lib/did_you_mean/finders/name_error_finders/similar_name_finder.rb
@@ -4,7 +4,7 @@ module DidYouMean
attr_reader :name, :method_names, :lvar_names, :ivar_names, :cvar_names
def initialize(exception)
- @name = exception.name
+ @name = exception.name.to_s.tr(AT, EMPTY)
@lvar_names = exception.frame_binding.eval("local_variables").map(&:to_s)
@method_names = exception.frame_binding.eval("methods + private_methods").map do |name|
MethodName.new(name.to_s) | Remove "@@" from class variable names that comes from NameError#name | yuki24_did_you_mean | train | rb |
04170fec346dede91ddbf25261dba99ec07f52ff | diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -251,9 +251,6 @@ func (s *serviceSet) Services() []*Service {
}
func (s *serviceSet) Addrs() []string {
- s.l.Lock()
- defer s.l.Unlock()
-
list := make([]string, 0, len(s.services))
for _, service := range s.Services() {
list = append(list, service.Addr)
diff --git a/client_test.go b/client_test.go
index <HASH>..<HASH> 100644
--- a/client_test.go
+++ b/client_test.go
@@ -261,7 +261,7 @@ func TestBasicRegisterAndServiceSet(t *testing.T) {
assert(err, t)
waitUpdates(t, set, true, 2)()
- if len(set.Services()) < 2 {
+ if len(set.Services()) < 2 || len(set.Addrs()) < 2 {
t.Fatal("Registered services not online")
}
@@ -269,7 +269,7 @@ func TestBasicRegisterAndServiceSet(t *testing.T) {
assert(client.Unregister(serviceName, ":2222"), t)
wait()
- if len(set.Services()) != 1 {
+ if len(set.Services()) != 1 || len(set.Addrs()) != 1 {
t.Fatal("Only 1 registered service should be left")
}
if set.Services()[0].Attrs["foo"] != "bar" { | discoverd/client: Fix dumb Addrs deadlock added in fa<I>b2ec3 | flynn_flynn | train | go,go |
2f61aa1005584bd1f9755a9bb0e5a2de1a33ce3c | diff --git a/geomdl/BSpline.py b/geomdl/BSpline.py
index <HASH>..<HASH> 100644
--- a/geomdl/BSpline.py
+++ b/geomdl/BSpline.py
@@ -1084,10 +1084,21 @@ class Surface(object):
self._reset_ctrlpts()
self._reset_surface()
- # Assume that user inputs everything correctly, there is no easy way to check this setter
+ # Assume that the user has prepared the lists correctly
self._control_points_size_u = len(value)
self._control_points_size_v = len(value[0])
- self._control_points2D = value
+
+ # Make sure that all numbers are float type
+ ctrlpts2d = [[None for _ in range(0, self._control_points_size_v)]
+ for _ in range(0, self._control_points_size_u)]
+ for u in range(0, self._control_points_size_u):
+ for v in range(0, self._control_points_size_v):
+ ctrlpts2d[u][v] = [float(coord) for coord in value[u][v]]
+
+ # Set 2D control points
+ self._control_points2D = ctrlpts2d
+
+ # Set 1D control points
for u in self._control_points2D:
for v in u:
self._control_points.append(v) | Updated ctrlpts2d setter stability | orbingol_NURBS-Python | train | py |
5c5e10d0b759c83d7e8f6963a8f5dc01b0d3a82a | diff --git a/lib/deployml/rake/tasks.rb b/lib/deployml/rake/tasks.rb
index <HASH>..<HASH> 100644
--- a/lib/deployml/rake/tasks.rb
+++ b/lib/deployml/rake/tasks.rb
@@ -30,6 +30,15 @@ namespace :deploy do
puts "Project uploaded."
end
+ desc 'Configures the server for the project'
+ task :config => :project do
+ puts "Configuring project at #{@project.dest_uri} ..."
+
+ @project.config!
+
+ puts "Project configured."
+ end
+
desc 'Deploys the project'
task :push => :project do
puts "Deploying project to #{@project.dest_uri} ..." | Added the deploy:config task. | postmodern_deployml | train | rb |
80e89673082cd32dfb5937a4364c646792bef61c | diff --git a/code/model/VirtualPage.php b/code/model/VirtualPage.php
index <HASH>..<HASH> 100644
--- a/code/model/VirtualPage.php
+++ b/code/model/VirtualPage.php
@@ -528,8 +528,8 @@ class VirtualPage_Controller extends Page_Controller {
* We can't load the content without an ID or record to copy it from.
*/
public function init(){
- if(isset($this->record) && $this->record->ID){
- if($this->record->VersionID != $this->failover->CopyContentFrom()->Version){
+ if(isset($this->record) && $this->record['ID']){
+ if($this->record['VersionID'] != $this->failover->CopyContentFrom()->Version){
$this->reloadContent();
$this->VersionID = $this->failover->CopyContentFrom()->VersionID;
} | FIX: Fix VirtualPage::init() content-modification check.
This check had never worked but PHP 5 silently ignored it and PHP 7
raised it as an error. | silverstripe_silverstripe-cms | train | php |
815a8d2ae199d4a13955e3b8b3867871bec2eb68 | diff --git a/Classes/Core/Acceptance/Support/Helper/ModalDialog.php b/Classes/Core/Acceptance/Support/Helper/ModalDialog.php
index <HASH>..<HASH> 100644
--- a/Classes/Core/Acceptance/Support/Helper/ModalDialog.php
+++ b/Classes/Core/Acceptance/Support/Helper/ModalDialog.php
@@ -33,14 +33,14 @@ class ModalDialog
*
* @var string
*/
- public static $openedModalSelector = '.t3-modal.in';
+ public static $openedModalSelector = '.modal.in';
/**
* Selector for the container in the modal where the buttons are located
*
* @var string
*/
- public static $openedModalButtonContainerSelector = '.t3-modal.in .modal-footer';
+ public static $openedModalButtonContainerSelector = '.modal.in .modal-footer';
/**
* @var AcceptanceTester | [TASK] Re-Add master changes: modal dialogs | TYPO3_testing-framework | train | php |
f551e45cba23bb945fe644e00cae41ad4533992b | diff --git a/tests/TestCase.php b/tests/TestCase.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -1,5 +1,11 @@
<?php
+use Illuminate\Contracts\Console\Kernel as KernelContract;
+
abstract class TestCase extends \Orchestra\Testbench\TestCase
{
+ protected function resolveApplicationConsoleKernel($app)
+ {
+ $app->singleton(KernelContract::class, Kernel::class);
+ }
} | ICM: Console kernel overloaded. | dmitry-ivanov_laravel-console-mutex | train | php |
cf985d1a4e7da2ba52f968aceee650bbdda6287e | diff --git a/actionpack/lib/action_dispatch/middleware/request_id.rb b/actionpack/lib/action_dispatch/middleware/request_id.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/middleware/request_id.rb
+++ b/actionpack/lib/action_dispatch/middleware/request_id.rb
@@ -20,14 +20,16 @@ module ActionDispatch
def call(env)
req = ActionDispatch::Request.new env
- req.request_id = external_request_id(req) || internal_request_id
+ req.request_id = make_request_id(req.x_request_id)
@app.call(env).tap { |_status, headers, _body| headers[X_REQUEST_ID] = req.request_id }
end
private
- def external_request_id(req)
- if request_id = req.x_request_id.presence
+ def make_request_id(request_id)
+ if request_id.presence
request_id.gsub(/[^\w\-]/, "".freeze).first(255)
+ else
+ internal_request_id
end
end | add a branch to eliminate multiple nil checks
if we add an else conditional to the `presence` check, we can eliminate
the second `||` branch in the caller | rails_rails | train | rb |
189f9dc4bd475cf32d18e41b5737c2217e405ec6 | diff --git a/vsphere/datadog_checks/vsphere/legacy/vsphere_legacy.py b/vsphere/datadog_checks/vsphere/legacy/vsphere_legacy.py
index <HASH>..<HASH> 100644
--- a/vsphere/datadog_checks/vsphere/legacy/vsphere_legacy.py
+++ b/vsphere/datadog_checks/vsphere/legacy/vsphere_legacy.py
@@ -1006,6 +1006,8 @@ class VSphereLegacyCheck(AgentCheck):
if self.exception_printed > 0:
self.log.error("One thread in the pool crashed, check the logs")
- except Exception:
- self.terminate_pool()
+ except Exception as e:
+ self.log.error("An exception occured while collecting vSphere metrics: %s", e)
+ if self.pool:
+ self.terminate_pool()
raise | Improve logging of the legacy implementation (#<I>) | DataDog_integrations-core | train | py |
0d875c2709e4da668d5707e1619be7ea75cccb98 | diff --git a/legit/cli.py b/legit/cli.py
index <HASH>..<HASH> 100644
--- a/legit/cli.py
+++ b/legit/cli.py
@@ -409,7 +409,7 @@ def cmd_install(args):
for alias in aliases:
cmd = '!legit ' + alias
os.system('git config --global --replace-all alias.{0} "{1}"'.format(alias, cmd))
- print columns(['', 1], [colored.yellow('git ' + alias), 14], [cmd, None])
+ print columns(['', 1], [colored.yellow('git ' + alias), 20], [cmd, None])
sys.exit() | Fix #<I> (color at aliases installation)
Apparently the install command string exceeds the max length of the formatter (in windows at least). | kennethreitz_legit | train | py |
ccbb6a9eeb869ac5df2b4c9fc8810284b5c11bcd | diff --git a/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/model/Voice.java b/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/model/Voice.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/model/Voice.java
+++ b/src/main/java/com/ibm/watson/developer_cloud/text_to_speech/v1/model/Voice.java
@@ -25,7 +25,7 @@ import com.google.gson.GsonBuilder;
public class Voice {
/** The Constant ES_ENRIQUE. */
- public static final Voice ES_ENRIQUE = new Voice("VoiceEsEsEnrique", "male", "es-ES");
+ public static final Voice ES_ENRIQUE = new Voice("es-ES_EnriqueVoice", "male", "es-ES");
/** The Constant ES_LAURA. */
public static final Voice ES_LAURA = new Voice("es-ES_LauraVoice", "female", "es-US"); | update voice to match latest changes on the api | watson-developer-cloud_java-sdk | train | java |
ef3e7dcd527bea9b14709121bc9f968c2669a401 | diff --git a/opt/comments-server-side/app.js b/opt/comments-server-side/app.js
index <HASH>..<HASH> 100644
--- a/opt/comments-server-side/app.js
+++ b/opt/comments-server-side/app.js
@@ -203,9 +203,11 @@ app.get('/auth/:sdk/:version/comments_recent', util.getCommentReads, function(re
// Count all comments, store count to last comment
Comment.count(filter).run(function(err, count) {
var last = comments[comments.length-1];
- last.total_rows = count;
- last.offset = offset;
- last.limit = limit;
+ if (last) {
+ last.total_rows = count;
+ last.offset = offset;
+ last.limit = limit;
+ }
res.json(comments);
});
}); | Fix comments server crash when no comments.
Loading the recent comments page caused a crash when there were no
comments. | senchalabs_jsduck | train | js |
004ac6ab1f91f2ee5b4c0399d8e8deb9d254f417 | diff --git a/main/core/API/Serializer/Workspace/WorkspaceSerializer.php b/main/core/API/Serializer/Workspace/WorkspaceSerializer.php
index <HASH>..<HASH> 100644
--- a/main/core/API/Serializer/Workspace/WorkspaceSerializer.php
+++ b/main/core/API/Serializer/Workspace/WorkspaceSerializer.php
@@ -351,7 +351,7 @@ class WorkspaceSerializer
private function getRegistration(Workspace $workspace, array $options)
{
if ($workspace->getDefaultRole()) {
- if (!in_array(Options::REFRESH_UUID, $options)) {
+ if (in_array(Options::REFRESH_UUID, $options)) {
$defaultRole = [
'translationKey' => $workspace->getDefaultRole()->getTranslationKey(),
'type' => $workspace->getDefaultRole()->getType(), | Agenda event fix. (#<I>) | claroline_Distribution | train | php |
6e7c6759ad1f510430aaf210258d6fb88b03ecc1 | diff --git a/scripts/experiments/run_ace2.py b/scripts/experiments/run_ace2.py
index <HASH>..<HASH> 100755
--- a/scripts/experiments/run_ace2.py
+++ b/scripts/experiments/run_ace2.py
@@ -308,8 +308,9 @@ class SrlExpParamsRunner(ExpParamsRunner):
for evl in [eval_pm13, eval_types13]:
for trainMaxNumSentences in [2000, 4000, 8000, 16000, 35990]:
setup.update(trainMaxNumSentences=trainMaxNumSentences)
- setup.update(work_mem_megs=5000 + 10000. * (trainMaxNumSentences / 35990))
- setup.update(threads=int(1. + 15. * trainMaxNumSentences / 35990))
+ setup.update(work_mem_megs=5000 + 10000. * (trainMaxNumSentences / 35990.))
+ setup.update(threads=int(2. + 5. * (trainMaxNumSentences / 35990.)))
+ print "se=%d mm=%f th=%d" % (trainMaxNumSentences, setup.get("work_mem_megs"), setup.get("threads"))
for hyperparam in hyperparams:
experiment = defaults + setup + evl + dev + test + embed + feats + hyperparam
root.add_dependent(experiment) | Fixing threads / mem | mgormley_pacaya | train | py |
9638565f046b3a65329db8b67328c2e932fe4433 | diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -3576,6 +3576,21 @@ const devices = [
ota: ota.zigbeeOTA,
},
{
+ zigbeeModel: ['LOM006'],
+ model: '9290024426',
+ vendor: 'Philips',
+ description: 'Hue smart plug - CH',
+ extend: generic.switch,
+ toZigbee: [tz.on_off].concat(tzHuePowerOnBehavior),
+ meta: {configureKey: 1},
+ configure: async (device, coordinatorEndpoint) => {
+ const endpoint = device.getEndpoint(11);
+ await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
+ await configureReporting.onOff(endpoint);
+ },
+ ota: ota.zigbeeOTA,
+ },
+ {
zigbeeModel: ['LLC014'],
model: '7099860PH',
vendor: 'Philips', | Support <I> (#<I>)
* Update devices.js
Add support swiss hue smart plug LOM<I>
* Update devices.js | Koenkk_zigbee-shepherd-converters | train | js |
d98914cc2254351ed58c3e61cf1e21f10e403190 | diff --git a/lib/mini_magick/image.rb b/lib/mini_magick/image.rb
index <HASH>..<HASH> 100644
--- a/lib/mini_magick/image.rb
+++ b/lib/mini_magick/image.rb
@@ -280,7 +280,7 @@ module MiniMagick
# @return [IOStream, Boolean] If you pass in a file location [String] then you get a success boolean. If its a stream, you get it back.
# Writes the temporary image that we are using for processing to the output path
def write(output_to)
- if output_to.kind_of?(String) || !output_to.respond_to?(:write)
+ if output_to.kind_of?(String) || output_to.kind_of?(Pathname) || !output_to.respond_to?(:write)
FileUtils.copy_file path, output_to
run_command "identify", MiniMagick::Utilities.windows? ? path_for_windows_quote_space(output_to.to_s) : output_to.to_s # Verify that we have a good image
else # stream | Consider Pathname object as String, rather than stream when MiniMagick::Image#write | minimagick_minimagick | train | rb |
a6944dde32bfec714a85f89e2885d4f074c70591 | diff --git a/lib/access_control_config.py b/lib/access_control_config.py
index <HASH>..<HASH> 100644
--- a/lib/access_control_config.py
+++ b/lib/access_control_config.py
@@ -163,6 +163,7 @@ DEF_ACTIONS = (
('attachcommentfile', 'attach files to comments', 'collection', 'no'),
('cfgbibexport', 'configure BibExport', '', 'no'),
('runbibexport', 'run BibExport', '', 'no'),
+ ('fulltext', 'administrate Fulltext', '', 'no')
)
# Default authorizations | New hidden flag for bibdocmoreinfo.
Added in bibdocmoreinfo (and bibdocfile in general) a new flag to hide
specific version/format of a fulltext file. | inveniosoftware_invenio-access | train | py |
63d96df04f7b9d1616b7f02293049bba1b6029fe | diff --git a/abaaso.js b/abaaso.js
index <HASH>..<HASH> 100644
--- a/abaaso.js
+++ b/abaaso.js
@@ -1035,7 +1035,7 @@ var abaaso = function(){
p[0] += pos[0];
p[1] += pos[1];
- o.style.position = "absolute";
+ (o.style.position != "absolute") ? o.style.position = "absolute" : void(0);
o.style.left = p[0] + "px";
o.style.top = p[1] + "px"; | Small change to fx.move() so the position is not set multiple times from other methods | avoidwork_abaaso | train | js |
5e4f3780ed8ae7f147b3180e785a9191a1cca786 | diff --git a/discord/guild.py b/discord/guild.py
index <HASH>..<HASH> 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -138,6 +138,7 @@ class Guild(Hashable):
- ``MORE_EMOJI``: Guild is allowed to have more than 50 custom emoji.
- ``DISCOVERABLE``: Guild shows up in Server Discovery.
- ``FEATURABLE``: Guild is able to be featured in Server Discovery.
+ - ``COMMUNITY``: Guild is a community server.
- ``COMMERCE``: Guild can sell things using store channels.
- ``PUBLIC``: Guild is a public guild.
- ``NEWS``: Guild can create news channels. | Add COMMUNITY to Guild.features | Rapptz_discord.py | train | py |
85f0c71d82558aca1455a6df8a51c3f32a18878e | diff --git a/ghost/admin/views/login.js b/ghost/admin/views/login.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/views/login.js
+++ b/ghost/admin/views/login.js
@@ -94,7 +94,8 @@
var name = this.$('.name').val(),
email = this.$('.email').val(),
password = this.$('.password').val(),
- validationErrors = [];
+ validationErrors = [],
+ self = this;
if (!validator.isLength(name, 1)) {
validationErrors.push("Please enter a name.");
@@ -131,7 +132,7 @@
window.location.href = msg.redirect;
},
error: function (xhr) {
- this.submitted = "no";
+ self.submitted = "no";
Ghost.notifications.clearEverything();
Ghost.notifications.addItem({
type: 'error', | Fix scoping issue on signup
closes #<I> | TryGhost_Ghost | train | js |
ed491595d82035f8b3ec940fdbd6d4b1871238bb | diff --git a/lib/cucumber/cli/options.rb b/lib/cucumber/cli/options.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber/cli/options.rb
+++ b/lib/cucumber/cli/options.rb
@@ -161,6 +161,9 @@ module Cucumber
"several times, and this represents logical AND. Example: --tags @foo,~@bar --tags @zap.",
"This represents the boolean expression (@foo || !@bar) && @zap.",
"\n",
+ "Beware that if you want to use several negative tags to exclude several tags",
+ "you have to use logical AND: --tags ~@fixme --tags @buggy.",
+ "\n",
"Positive tags can be given a threshold to limit the number of occurrences.",
"Example: --tags @qa:3 will fail if there are more than 3 occurrences of the @qa tag.",
"This can be practical if you are practicing Kanban or CONWIP.") do |v| | Add a little boolean arithmetic <I>. | cucumber_cucumber-ruby | train | rb |
5bea0c81112f8a0f79ac2b2f540abb37d5ce4c64 | diff --git a/src/Discovery/BindingState.php b/src/Discovery/BindingState.php
index <HASH>..<HASH> 100644
--- a/src/Discovery/BindingState.php
+++ b/src/Discovery/BindingState.php
@@ -88,22 +88,26 @@ final class BindingState
$typeName = $bindingDescriptor->getTypeName();
if (!$typeStore->isDefined($typeName)) {
- return BindingState::HELD_BACK;
+ return self::HELD_BACK;
}
if ($typeStore->isDuplicate($typeName)) {
- return BindingState::IGNORED;
+ return self::IGNORED;
}
- if (!$package instanceof RootPackage && $installInfo->hasDisabledBindingUuid($uuid)) {
- return BindingState::DISABLED;
+ if ($package instanceof RootPackage) {
+ return self::ENABLED;
}
- if (!$package instanceof RootPackage && !$installInfo->hasEnabledBindingUuid($uuid)) {
- return BindingState::UNDECIDED;
+ if ($installInfo->hasDisabledBindingUuid($uuid)) {
+ return self::DISABLED;
}
- return BindingState::ENABLED;
+ if ($installInfo->hasEnabledBindingUuid($uuid)) {
+ return self::ENABLED;
+ }
+
+ return self::UNDECIDED;
}
/** | Simplified decision logic in BindingState | puli_manager | train | php |
d365aa39065da5b9c3ee38cb3e91aa98e603c9fe | diff --git a/go/chat/inboxsource.go b/go/chat/inboxsource.go
index <HASH>..<HASH> 100644
--- a/go/chat/inboxsource.go
+++ b/go/chat/inboxsource.go
@@ -764,7 +764,7 @@ func (s *HybridInboxSource) ApplyLocalChatState(ctx context.Context, infos []key
outbox := storage.NewOutbox(s.G(), s.uid)
obrs, oerr := outbox.PullAllConversations(ctx, true /*includeErrors */, false /*remove*/)
if oerr != nil {
- s.Debug(ctx, "ApplyLocalChatState: failed to get outbox: %v", err)
+ s.Debug(ctx, "ApplyLocalChatState: failed to get outbox: %v", oerr)
}
// convID -> unreadCount | fix error logging (#<I>) | keybase_client | train | go |
ae478939655c2e01cd59c14aef6454c5a3a72e4a | diff --git a/src/Illuminate/Support/Facades/Schema.php b/src/Illuminate/Support/Facades/Schema.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Facades/Schema.php
+++ b/src/Illuminate/Support/Facades/Schema.php
@@ -9,6 +9,9 @@ namespace Illuminate\Support\Facades;
* @method static \Illuminate\Database\Schema\Builder table(string $table, \Closure $callback)
* @method static \Illuminate\Database\Schema\Builder rename(string $from, string $to)
* @method static void defaultStringLength(int $length)
+ * @method static bool hasTable(string $table)
+ * @method static bool hasColumn(string $table, string $column)
+ * @method static bool hasColumns(string $table, array $columns)
* @method static \Illuminate\Database\Schema\Builder disableForeignKeyConstraints()
* @method static \Illuminate\Database\Schema\Builder enableForeignKeyConstraints()
* @method static void registerCustomDoctrineType(string $class, string $name, string $type) | Add boolean methods to Schema facade | laravel_framework | train | php |
4e435f9749616b733322d7931a4d3a1971e1a97c | diff --git a/src/Utility/Filter/FilterLength.php b/src/Utility/Filter/FilterLength.php
index <HASH>..<HASH> 100644
--- a/src/Utility/Filter/FilterLength.php
+++ b/src/Utility/Filter/FilterLength.php
@@ -62,8 +62,8 @@ class FilterLength extends AbstractFilter
'Argument 2 must be of type int or null. Value is of type ' . gettype($maxLength));
}
- $this->minCharge = $minCharge;
- $this->maxCharge = $maxCharge;
+ $this->minLength = $minLength;
+ $this->maxLength = $maxLength;
}
/** | Fixed incorrect variable names in FilterLength | PGB-LIV_php-ms | train | php |
a1ad55420556d480dd483a0a40980ced3898c457 | diff --git a/src/main/java/com/hubspot/jinjava/lib/tag/IncludeTag.java b/src/main/java/com/hubspot/jinjava/lib/tag/IncludeTag.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/hubspot/jinjava/lib/tag/IncludeTag.java
+++ b/src/main/java/com/hubspot/jinjava/lib/tag/IncludeTag.java
@@ -106,7 +106,7 @@ public class IncludeTag implements Tag {
.getCurrentPathStack()
.push(templateFile, interpreter.getLineNumber(), interpreter.getPosition());
- return interpreter.render(node);
+ return interpreter.render(node, false);
} catch (IOException e) {
throw new InterpretException(
e.getMessage(), | Do not process extended roots when render included templates | HubSpot_jinjava | train | java |
e256fc0afcb747ac3155a2cff5de861067fc2416 | diff --git a/Tests/Auth/OpenID/StoreTest.php b/Tests/Auth/OpenID/StoreTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Auth/OpenID/StoreTest.php
+++ b/Tests/Auth/OpenID/StoreTest.php
@@ -21,6 +21,9 @@ $_Auth_OpenID_db_test_host = 'dbtest';
function _Auth_OpenID_getTmpDbName()
{
+ $hostname = php_uname('n');
+ $hostname = str_replace('.', '_', $hostname);
+
return sprintf("%s_%d_%s_openid_test",
php_uname('n'),
getmypid(), | [project @ Fixed database name generator to replace dots with underscores in hostname] | openid_php-openid | train | php |
37672483de190ba8066cfb9d574e0aadb27dcede | diff --git a/tchannel/testing/vcr/cassette.py b/tchannel/testing/vcr/cassette.py
index <HASH>..<HASH> 100644
--- a/tchannel/testing/vcr/cassette.py
+++ b/tchannel/testing/vcr/cassette.py
@@ -30,6 +30,7 @@ from .exceptions import UnsupportedVersionError
from .record_modes import RecordMode
from . import proxy
+from thriftrw.wire.ttype import TType
__all__ = ['Cassette']
@@ -38,9 +39,6 @@ __all__ = ['Cassette']
VERSION = 1
-from thriftrw.wire.ttype import TType
-
-
def primitive_struct(obj):
data = {}
for field in obj.type_spec.fields:
@@ -52,6 +50,10 @@ def primitive_struct(obj):
def primitive_list(obj):
+ # I think this is because our objects aren't hydrating with the correct
+ # subtypes.
+ if obj and isinstance(obj[0], (str, dict)):
+ return obj
return [primitive(v, v.type_spec.ttype_code) for v in obj] | fix a missing type_spec bug | uber_tchannel-python | train | py |
1bf6495ae079b39c3a73c25b4e484365a0aca4cd | diff --git a/view/SSViewer.php b/view/SSViewer.php
index <HASH>..<HASH> 100644
--- a/view/SSViewer.php
+++ b/view/SSViewer.php
@@ -449,7 +449,7 @@ class SSViewer_DataPresenter extends SSViewer_Scope {
if ($val = $this->getInjectedValue($property, $params)) {
$hasInjected = true;
$obj = $val['obj'];
- $res = ($obj->hasMethod('forTemplate')) ? $obj->forTemplate() : '';
+ $res = $obj->forTemplate();
}
} | MINOR Partially reverted 4d4f9e<I>d9 as we don't need to check
forTemplate() exists | silverstripe_silverstripe-framework | train | php |
bfc34b4ad0649773af9e75ae4ecc67a4cd888896 | diff --git a/pkg/proxy/dialer.go b/pkg/proxy/dialer.go
index <HASH>..<HASH> 100644
--- a/pkg/proxy/dialer.go
+++ b/pkg/proxy/dialer.go
@@ -22,13 +22,17 @@ import (
"time"
)
+// ProxyKeepAlivePeriod is the time used for sending periodic keepalives on
+// proxy connections. Cross-reference with datapath PROXY_DEFAULT_LIFETIME.
+const ProxyKeepAlivePeriod = time.Duration(5) * time.Minute
+
func setKeepAlive(c net.Conn) error {
if tcp, ok := c.(*net.TCPConn); ok {
if err := tcp.SetKeepAlive(true); err != nil {
return fmt.Errorf("unable to enable keepalive: %s", err)
}
- if err := tcp.SetKeepAlivePeriod(time.Duration(5) * time.Minute); err != nil {
+ if err := tcp.SetKeepAlivePeriod(ProxyKeepAlivePeriod); err != nil {
return fmt.Errorf("unable to set keepalive period: %s", err)
}
} | proxy: Add comment to reference proxy entry timer
Refactor the TCP keep-alive setting to a variable and add a comment to
reference it against the datapath. This value should always be strictly
less than the PROXY_DEFAULT_LIFETIME. | cilium_cilium | train | go |
4ec4f25c7dd6f0143b0b37f161caa9282e2df89b | diff --git a/doc/index.php b/doc/index.php
index <HASH>..<HASH> 100644
--- a/doc/index.php
+++ b/doc/index.php
@@ -41,7 +41,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php print_string("documentation")?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=<?php print_string("thischarset") ?>" />
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php echo current_charset(); ?>" />
</head>
<frameset rows="70,*"> | Now doc index uses current_charset()
TODO: Modif. to document_file() to support both <I> lang packs and
having them stored in moodledata!!!
Merged from MOODLE_<I>_UTF8. Abandoning the branch. | moodle_moodle | train | php |
7bb4efe84e3cba9f40b330584a99907b5b28cdbb | diff --git a/src/Stage.js b/src/Stage.js
index <HASH>..<HASH> 100644
--- a/src/Stage.js
+++ b/src/Stage.js
@@ -4,14 +4,13 @@
import o from 'riot-observable'
-const
- rAF = window.requestAnimationFrame ||
+const rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame ||
- function (cb) { setTimeout(cb, 1000 / 60) },
- RESIZE_DELAY = 20
+ function (cb) { setTimeout(cb, 1000 / 60) }
+const RESIZE_DELAY = 20
export default class Stage {
constructor() { | updated: small fix to the source code | GianlucaGuarini_parallax | train | js |
988febb7f4720261867ac2fd54f064691d99ae00 | diff --git a/test/test_client_stack.rb b/test/test_client_stack.rb
index <HASH>..<HASH> 100644
--- a/test/test_client_stack.rb
+++ b/test/test_client_stack.rb
@@ -223,7 +223,7 @@ describe "A client DiameterStack with an established connection to 'bob'" do
promised_maa.state.must_equal :fulfilled
end
- it 'times out a request after 0.1 seconds' do
+ it 'times out an unanswered request' do
avps = [AVP.create('Destination-Host', 'bob')]
mar = Message.new(command_code: 304, app_id: 0, avps: avps)
@@ -232,11 +232,8 @@ describe "A client DiameterStack with an established connection to 'bob'" do
.returns(nil)
promised_maa = @s.send_request(mar)
- promised_maa.state.must_equal :pending
- sleep(0.2)
-
- promised_maa.state.must_equal :fulfilled
+ promised_maa.wait
promised_maa.value.must_equal :timeout
end | Rework the timeout UT to stabilise the Travis builds | rkday_ruby-diameter | train | rb |
dbb4ced30e391a8415cedd8a0a7446a461c68e86 | diff --git a/addon/components/sl-radio-group.js b/addon/components/sl-radio-group.js
index <HASH>..<HASH> 100755
--- a/addon/components/sl-radio-group.js
+++ b/addon/components/sl-radio-group.js
@@ -133,6 +133,6 @@ export default Ember.Component.extend( InputBased, TooltipEnabled, {
* @returns {void}
*/
unregisterEvents: function() {
- $('input[name=' + this.get( 'name' ) + ']:radio').off();
+ this.$('input[name=' + this.get( 'name' ) + ']:radio').off();
}.on( 'willClearRender' )
}); | Use instantiated jQuery binding for jshint fix | softlayer_sl-ember-components | train | js |
6729776e25c271dfd7d38d105c951538d02ee8a2 | diff --git a/server/usage.go b/server/usage.go
index <HASH>..<HASH> 100644
--- a/server/usage.go
+++ b/server/usage.go
@@ -26,8 +26,9 @@ Options:
-vv Enabled very verbose logging.
Cluster Configuration Options:
- -peers=<peers> Comma-separated list of peers (ip + port) in the cluster.
- -peers-file=<path> Path to a file containing the peer list.
+ -peers-file=<path> Path to a file containing the peer list.
+ -peers=<host:port>,<host:port> Comma-separated list of peers. The members
+ should match the peer's '-peer-addr' flag.
Client Communication Options:
-addr=<host:port> The public host:port used for client communication. | fix(server/usage): fixup the usage based on feedback
People were getting confused by the lack of explanation on which port to
use. Fix this.
/cc @polvi | etcd-io_etcd | train | go |
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.