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
|
---|---|---|---|---|---|
f8b2180fe9fa994270ba30e9fe6211c8514a0e28
|
diff --git a/formats/color-map.scss.js b/formats/color-map.scss.js
index <HASH>..<HASH> 100644
--- a/formats/color-map.scss.js
+++ b/formats/color-map.scss.js
@@ -22,7 +22,7 @@ class CustomMap {
${props
.filter((prop) => prop.name.includes(palette))
.map((prop) =>
- `${prop.comment ? `// ${prop.comment}` : ''}
+ `${prop.comment ? `/* ${prop.comment} */` : ''}
'${getShade(prop.name)}': ${prop.value}
`.trim(),
)
|
Allow multiline comments in color-map format
|
Shopify_polaris-tokens
|
train
|
js
|
af68230c912db677bde2cec1e82a9b4c0bc2b87a
|
diff --git a/src/main/java/com/codeborne/selenide/junit5/TextReportExtension.java b/src/main/java/com/codeborne/selenide/junit5/TextReportExtension.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/codeborne/selenide/junit5/TextReportExtension.java
+++ b/src/main/java/com/codeborne/selenide/junit5/TextReportExtension.java
@@ -32,7 +32,6 @@ public class TextReportExtension implements BeforeEachCallback, AfterEachCallbac
* Initialize text report extension with specified failed tests log strategy.
*
* @param onFailedTest parameter that indicate if need to log failed tests
- *
* @return current extension instance
*/
@Nonnull
@@ -45,7 +44,6 @@ public class TextReportExtension implements BeforeEachCallback, AfterEachCallbac
* Initialize text report extension with specified successful tests log strategy.
*
* @param onSucceededTest parameter that indicate if need to log successful tests
- *
* @return current extension instance
*/
@Nonnull
@@ -65,8 +63,10 @@ public class TextReportExtension implements BeforeEachCallback, AfterEachCallbac
public void afterEach(final ExtensionContext context) {
if (onFailedTest && context.getExecutionException().isPresent()) {
report.finish(context.getDisplayName());
- } else if (onSucceededTest) {
- report.finish(context.getDisplayName());
+ }
+ else if (onSucceededTest) {
+ String uniqueId = context.getUniqueId();
+ report.finish(uniqueId);
}
}
|
user better name for test: it gives a unique name for parameterized tests
|
selenide_selenide
|
train
|
java
|
65d549f31ce4cbc597e002074ab800511747b100
|
diff --git a/src/ui_components/jf_tree/tree_view_pane.js b/src/ui_components/jf_tree/tree_view_pane.js
index <HASH>..<HASH> 100644
--- a/src/ui_components/jf_tree/tree_view_pane.js
+++ b/src/ui_components/jf_tree/tree_view_pane.js
@@ -172,6 +172,7 @@ export class TreeViewPane {
_deleteItem(item) {
_.remove(this.$flatItems, fi => fi === item);
+ _.remove(item.parent.data.$childrenCache, node => node === item.data);
this._removeChildren(item);
}
|
jf-tree: When deleting a node, also remove it from its parent's children cache.
|
jfrog_jfrog-ui-essentials
|
train
|
js
|
87d00ae65061f51769db910539df73115c2104d6
|
diff --git a/includes/_loginFunctions.php b/includes/_loginFunctions.php
index <HASH>..<HASH> 100644
--- a/includes/_loginFunctions.php
+++ b/includes/_loginFunctions.php
@@ -72,7 +72,6 @@ function logoutUser()
unset($_SESSION['eduadmin-loginUser']);
unset($_SESSION['needsLogin']);
unset($_SESSION['checkEmail']);
-
die("<script>location.href = '" . $baseUrl . edu_getQueryString() . "';</script>");
}
|
1 file changed, 1 deletion(-)
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: includes/_loginFunctions.php
|
MultinetInteractive_EduAdmin-WordPress
|
train
|
php
|
feadd2de9243eafe1b9866cc3d961b1380485b0a
|
diff --git a/src/Ouzo/Goodies/Tests/Mock/Mock.php b/src/Ouzo/Goodies/Tests/Mock/Mock.php
index <HASH>..<HASH> 100644
--- a/src/Ouzo/Goodies/Tests/Mock/Mock.php
+++ b/src/Ouzo/Goodies/Tests/Mock/Mock.php
@@ -5,6 +5,7 @@
*/
namespace Ouzo\Tests\Mock;
+use InvalidArgumentException;
use Ouzo\Utilities\DynamicProxy;
class Mock
@@ -46,6 +47,10 @@ class Mock
public static function extractMock($mock)
{
+ if (is_null($mock)) {
+ throw new InvalidArgumentException("Instance of class Mock or SimpleMock expected, null given");
+ }
+
if ($mock instanceof SimpleMock) {
return $mock;
}
|
#<I> Added more verbose exception if null is passed to Mock::verify();
|
letsdrink_ouzo
|
train
|
php
|
1b788eddac33ff9dfa70670d9687a97feafd0475
|
diff --git a/lib/mongoid/relations/embedded/many.rb b/lib/mongoid/relations/embedded/many.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/relations/embedded/many.rb
+++ b/lib/mongoid/relations/embedded/many.rb
@@ -397,7 +397,7 @@ module Mongoid # :nodoc:
criteria = find(:all, conditions || {})
criteria.size.tap do
criteria.each do |doc|
- target.delete(doc)
+ target.delete_at(target.index(doc))
doc.send(method, :suppress => true)
end
reindex
|
Fixing performance of embeds many delete_all calls
|
mongodb_mongoid
|
train
|
rb
|
f970483743fe25c1b009ab93822481e789684476
|
diff --git a/lib/Thelia/Core/Event/TheliaEvents.php b/lib/Thelia/Core/Event/TheliaEvents.php
index <HASH>..<HASH> 100755
--- a/lib/Thelia/Core/Event/TheliaEvents.php
+++ b/lib/Thelia/Core/Event/TheliaEvents.php
@@ -107,7 +107,7 @@ final class TheliaEvents
/**
* sent just before customer removal
*/
- const BEFORE_DELETECUSTOMER = "action.before_updateCustomer";
+ const BEFORE_DELETECUSTOMER = "action.before_deleteCustomer";
/**
* sent just after customer removal
@@ -121,7 +121,7 @@ final class TheliaEvents
const ADDRESS_CREATE = "action.createAddress";
/**
- * sent for address creation
+ * sent for address modification
*/
const ADDRESS_UPDATE = "action.updateAddress";
@@ -135,7 +135,14 @@ final class TheliaEvents
*/
const ADDRESS_DEFAULT = "action.defaultAddress";
+ /**
+ * sent once the address creation form has been successfully validated, and before address insertion in the database.
+ */
const BEFORE_CREATEADDRESS = "action.before_createAddress";
+
+ /**
+ * Sent just after a successful insert of a new address in the database.
+ */
const AFTER_CREATEADDRESS = "action.after_createAddress";
const BEFORE_UPDATEADDRESS = "action.before_updateAddress";
|
add some phpdoc in TheliaEvents class
|
thelia_core
|
train
|
php
|
8304e5fb2e491a94206bee60fba02a97ef162a95
|
diff --git a/src/Model/HeurekaCategory/HeurekaCategoryFacade.php b/src/Model/HeurekaCategory/HeurekaCategoryFacade.php
index <HASH>..<HASH> 100644
--- a/src/Model/HeurekaCategory/HeurekaCategoryFacade.php
+++ b/src/Model/HeurekaCategory/HeurekaCategoryFacade.php
@@ -52,6 +52,7 @@ class HeurekaCategoryFacade
$this->em->persist($newHeurekaCategory);
} else {
$existingHeurekaCategory = $existingHeurekaCategories[$newHeurekaCategoryData->id];
+ $newHeurekaCategoryData->categories = $existingHeurekaCategory->getCategories()->toArray();
$existingHeurekaCategory->edit($newHeurekaCategoryData);
}
}
|
preserve relation to categories on Heureka categories save (#<I>)
|
shopsys_product-feed-heureka
|
train
|
php
|
d092890617c00c674d9bc13613dc9c8479adff6d
|
diff --git a/src/MessageContainer.js b/src/MessageContainer.js
index <HASH>..<HASH> 100644
--- a/src/MessageContainer.js
+++ b/src/MessageContainer.js
@@ -2,8 +2,7 @@ import React, {Component, PropTypes} from 'react';
import ReactNative, {
View,
- ListView,
- UIManager
+ ListView
} from 'react-native';
import InvertibleScrollView from 'react-native-invertible-scroll-view';
@@ -128,4 +127,4 @@ MessageContainer.defaultProps = {
renderMessage: null,
onLoadEarlier: () => {
},
-};
\ No newline at end of file
+};
|
Remove unneeded require of UIManager
|
FaridSafi_react-native-gifted-chat
|
train
|
js
|
fac5c06c23cac0314eb87936cc70718bb8108059
|
diff --git a/salt/version.py b/salt/version.py
index <HASH>..<HASH> 100644
--- a/salt/version.py
+++ b/salt/version.py
@@ -83,7 +83,7 @@ class SaltStackVersion(object):
'Hydrogen' : (2014, 1),
'Helium' : (2014, 7),
'Lithium' : (2015, 5),
- 'Beryllium' : (MAX_SIZE - 105, 0),
+ 'Beryllium' : (2015, 8),
'Boron' : (MAX_SIZE - 104, 0),
'Carbon' : (MAX_SIZE - 103, 0),
'Nitrogen' : (MAX_SIZE - 102, 0),
|
Add version number for Beryllium
|
saltstack_salt
|
train
|
py
|
daa637ae802b6031c034599c81a5a3fdcaac9904
|
diff --git a/splinter/driver/djangoclient.py b/splinter/driver/djangoclient.py
index <HASH>..<HASH> 100644
--- a/splinter/driver/djangoclient.py
+++ b/splinter/driver/djangoclient.py
@@ -218,7 +218,7 @@ class DjangoClient(DriverAPI):
return self.find_by_xpath('//*[@value="%s"]' % value, original_find="value", original_selector=value)
def find_by_text(self, text):
- return self.find_by_xpath('//*[text()="%s"]' % text, original_find="text", original_selector=text)
+ return self.find_by_xpath('//*[text()="%s"]' % text.replace('"', '\"'), original_find="text", original_selector=text)
def find_by_id(self, id_value):
return self.find_by_xpath(
|
Fix find_by_text to deal with "
|
cobrateam_splinter
|
train
|
py
|
b02a957f22dbc079765f95556f27c7701f10a5a0
|
diff --git a/lib/puppet/pops/loader/static_loader.rb b/lib/puppet/pops/loader/static_loader.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/pops/loader/static_loader.rb
+++ b/lib/puppet/pops/loader/static_loader.rb
@@ -20,8 +20,6 @@ class StaticLoader < Loader
Resources
Router
Schedule
- Selboolean
- Selmodule
Service
Stage
Tidy
diff --git a/spec/unit/pops/loaders/static_loader_spec.rb b/spec/unit/pops/loaders/static_loader_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/pops/loaders/static_loader_spec.rb
+++ b/spec/unit/pops/loaders/static_loader_spec.rb
@@ -40,8 +40,6 @@ describe 'the static loader' do
Resources
Router
Schedule
- Selboolean
- Selmodule
Service
Stage
Tidy
|
(maint) Remove selinux types
These should have been removed when selinux was originally extracted,
but was forgotten
|
puppetlabs_puppet
|
train
|
rb,rb
|
1c61b466602912179a82c553ec993600b6c04919
|
diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js
index <HASH>..<HASH> 100644
--- a/src/structures/VoiceChannel.js
+++ b/src/structures/VoiceChannel.js
@@ -72,7 +72,7 @@ class VoiceChannel extends GuildChannel {
* .catch(console.error);
*/
setBitrate(bitrate) {
- return this.rest.client.rest.methods.updateChannel(this, { bitrate });
+ return this.client.rest.methods.updateChannel(this, { bitrate });
}
/**
|
Fix setBitrate typo in VoiceChannel.js (#<I>)
Fixed simple typo that prevented setBitrate method from working.
|
discordjs_discord.js
|
train
|
js
|
ed01fd8dc98eebf5a5ddd842922554690d0e28b1
|
diff --git a/java/src/com/google/template/soy/plugin/java/restricted/JavaValueFactory.java b/java/src/com/google/template/soy/plugin/java/restricted/JavaValueFactory.java
index <HASH>..<HASH> 100644
--- a/java/src/com/google/template/soy/plugin/java/restricted/JavaValueFactory.java
+++ b/java/src/com/google/template/soy/plugin/java/restricted/JavaValueFactory.java
@@ -86,14 +86,16 @@ public abstract class JavaValueFactory {
if (params.length == 0) {
throw new IllegalArgumentException(
String.format(
- "No such public method: %s.%s (with no parameters)", clazz.getName(), methodName));
+ "No such public method: %s.%s (with no parameters)", clazz.getName(), methodName),
+ e);
} else {
throw new IllegalArgumentException(
String.format(
"No such public method: %s.%s(%s)",
clazz.getName(),
methodName,
- Arrays.stream(params).map(Class::getName).collect(Collectors.joining(","))));
+ Arrays.stream(params).map(Class::getName).collect(Collectors.joining(","))),
+ e);
}
} catch (SecurityException e) {
throw new IllegalArgumentException(e);
|
Fix 1 ErrorProneStyle finding:
* This catch block catches an exception and re-throws another, but swallows the caught exception rather than setting it as a cause. This can make debugging harder.
[]
-------------
Created by MOE: <URL>
|
google_closure-templates
|
train
|
java
|
89501e223776475c3e48d2014cff27b6b0d52bba
|
diff --git a/imagen/views.py b/imagen/views.py
index <HASH>..<HASH> 100644
--- a/imagen/views.py
+++ b/imagen/views.py
@@ -356,16 +356,14 @@ class Timeline(param.Parameterized):
"""
ndmap = NdMapping(dimension_labels=['Time'])
- with self.time as t:
+ with self(obj) as t:
t.until = until
if timestep is not None:
t.timestep = timestep
- obj.state_push()
t(offset)
- for time in self.time:
+ for time in t:
val = value_fn(obj)
ndmap[time] = val
- obj.state_pop()
return ndmap
|
Simplified ndmap method of Timeline to use own context manager
|
pyviz_imagen
|
train
|
py
|
35ebec1ab48a989e63eb51100130d5d57fdfda17
|
diff --git a/src/engine/GoalTree.js b/src/engine/GoalTree.js
index <HASH>..<HASH> 100644
--- a/src/engine/GoalTree.js
+++ b/src/engine/GoalTree.js
@@ -396,6 +396,29 @@ function GoalTree(goalClause) {
this.forEachCandidateActions = function forEachCandidateActions(program, builtInFunctorProvider, facts, possibleActions, callback) {
_root.forEachCandidateActions(program, builtInFunctorProvider, facts, possibleActions, callback);
};
+
+ this.toJSON = function toJSON() {
+ let processNode = function processNode(node) {
+ let children = [];
+ node.children.forEach((childNode) => {
+ let c = processNode(childNode);
+ children.push(c);
+ });
+ if (children.length === 0) {
+ return {
+ hasFailed: node.hasBranchFailed,
+ clause: '' + node.clause
+ };
+ }
+ return {
+ hasFailed: node.hasBranchFailed,
+ clause: ''+node.clause,
+ children: children
+ };
+ };
+
+ return JSON.stringify(processNode(_root));
+ };
}
module.exports = GoalTree;
|
add toJSON debugger for goal tree
|
lps-js_lps.js
|
train
|
js
|
cdad35fb2797c60b61689a539e420a1e3c4fa434
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -124,6 +124,12 @@ class Peer extends stream.Duplex {
this._onIceCandidate(event)
}
+ if (typeof this._pc.peerIdentity === 'object') {
+ this._pc.peerIdentity.catch(err => {
+ this.destroy(errCode(err, 'ERR_PC_PEER_IDENTITY'))
+ })
+ }
+
// Other spec events, unused by this implementation:
// - onconnectionstatechange
// - onicecandidateerror
|
Handle "RTCPeerConnection is gone" error on FF
Complete stacktrace:
Uncaught (in promise) DOMException: RTCPeerConnection is gone (did you enter Offline mode?) PeerConnection.jsm:<I>:<I>
_validateIdentity resource://gre/modules/media/PeerConnection.jsm:<I>
|
feross_simple-peer
|
train
|
js
|
56220b4e809e44c4d2574c4fc4c572a606ef05d2
|
diff --git a/src/directives/array.js b/src/directives/array.js
index <HASH>..<HASH> 100644
--- a/src/directives/array.js
+++ b/src/directives/array.js
@@ -33,6 +33,10 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
// It's the (first) array part of the key, '[]' that needs a number
// corresponding to an index of the form.
var once = scope.$watch(attrs.sfArray, function(form) {
+ if (!form) {
+ return;
+ }
+
// An array model always needs a key so we know what part of the model
// to look at. This makes us a bit incompatible with JSON Form, on the
@@ -42,7 +46,8 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
// We only modify the same array instance but someone might change the array from
// the outside so let's watch for that. We use an ordinary watch since the only case
// we're really interested in is if its a new instance.
- scope.$watch('model' + sfPath.normalize(form.key), function(value) {
+ var key = sfPath.normalize(form.key);
+ scope.$watch('model' + (key[0] !== '[' ? '.' : '') + key, function(value) {
list = scope.modelArray = value;
});
|
Angular <I> fix for arrays
A broken watch since it lacked a '.' in <I> when object path doesn't
use brackets.
|
json-schema-form_angular-schema-form
|
train
|
js
|
8cd3ab54b7a78e4a745f5d541ebd5cd94ef4abe0
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -31,8 +31,7 @@ module.exports = {
},
plugins: [
new MiniCssExtractPlugin({
- filename: '../css/[name].min.css',
- allChunks: true
+ filename: '../css/[name].min.css'
})
],
mode: 'production'
|
Removes deprecated webpack option
|
nails_module-blog
|
train
|
js
|
df440844f1cca4aae5e9e21cc18fe797249f64a0
|
diff --git a/salt/modules/grains.py b/salt/modules/grains.py
index <HASH>..<HASH> 100644
--- a/salt/modules/grains.py
+++ b/salt/modules/grains.py
@@ -138,7 +138,7 @@ def items(sanitize=False):
'''
if salt.utils.is_true(sanitize):
out = dict(__grains__)
- for key, func in list(_SANITIZERS.items()):
+ for key, func in _SANITIZERS.items():
if key in out:
out[key] = func(out[key])
return out
@@ -170,7 +170,7 @@ def item(*args, **kwargs):
except KeyError:
pass
if salt.utils.is_true(kwargs.get('sanitize')):
- for arg, func in list(_SANITIZERS.items()):
+ for arg, func in _SANITIZERS.items():
if arg in ret:
ret[arg] = func(ret[arg])
return ret
@@ -216,7 +216,7 @@ def setvals(grains, destructive=False):
return 'Unable to read existing grains file: {0}'.format(e)
if not isinstance(grains, dict):
grains = {}
- for key, val in list(new_grains.items()):
+ for key, val in new_grains.items():
if val is None and destructive is True:
if key in grains:
del grains[key]
|
List call not needed. Changing it back to what it was
|
saltstack_salt
|
train
|
py
|
7d1611fd6e1b1d3118726b9dee13d741d464e5f9
|
diff --git a/src/Fuel/Display/Presenter.php b/src/Fuel/Display/Presenter.php
index <HASH>..<HASH> 100644
--- a/src/Fuel/Display/Presenter.php
+++ b/src/Fuel/Display/Presenter.php
@@ -10,7 +10,7 @@
namespace Fuel\Display;
-abstract class Presenter extends DataContainer
+class Presenter extends DataContainer
{
/**
* @var \Fuel\Display\View $view
@@ -45,13 +45,6 @@ abstract class Presenter extends DataContainer
public function before() {}
/**
- * Default method that'll be run upon Presenter rendering
- *
- * @since 1.0.0
- */
- abstract public function view();
-
- /**
* Method to do general Presenter finishing up
*
* @since 1.0.0
|
removed the abstract view() method. It is not required
|
fuelphp_display
|
train
|
php
|
98bfadbb272606be7d7ab84916c55934a67e3d25
|
diff --git a/src/views/hdomain/index.php b/src/views/hdomain/index.php
index <HASH>..<HASH> 100644
--- a/src/views/hdomain/index.php
+++ b/src/views/hdomain/index.php
@@ -34,7 +34,7 @@ $this->params['breadcrumbs'][] = $this->title;
]) ?>
</div>
<?php if (Yii::getAlias('@certificate', false)) : ?>
- <?= Html::a(Yii::t('hipanel:certificate', 'Order certificate'), ['@certificate/order/index'], ['class' => 'btn btn-sm btn-success']) ?>
+ <?= Html::a(Yii::t('hipanel:certificate', 'Buy certificate'), ['@certificate/order/index'], ['class' => 'btn btn-sm btn-success']) ?>
<?php endif ?>
<?php $page->endContent() ?>
|
Changed `Buy certificate` button label
|
hiqdev_hipanel-module-hosting
|
train
|
php
|
6a898a973f6d0306028759e2e268cc15cf7c05e4
|
diff --git a/src/php/Qafoo/Analyzer/Handler/Checkstyle.php b/src/php/Qafoo/Analyzer/Handler/Checkstyle.php
index <HASH>..<HASH> 100644
--- a/src/php/Qafoo/Analyzer/Handler/Checkstyle.php
+++ b/src/php/Qafoo/Analyzer/Handler/Checkstyle.php
@@ -45,7 +45,7 @@ class Checkstyle extends Handler
$options[] = '--ignore=' . implode(',', $excludes);
}
- $this->shell->exec('vendor/bin/phpcs', array_merge($options, array($dir)));
+ $this->shell->exec('vendor/bin/phpcs', array_merge($options, array($dir)), array(0, 1));
return $tmpFile;
}
}
|
Checkstyle exits with 1 on violation
|
Qafoo_QualityAnalyzer
|
train
|
php
|
953497a7803a49078f9344061a25797eb2d5d40c
|
diff --git a/models/User.php b/models/User.php
index <HASH>..<HASH> 100644
--- a/models/User.php
+++ b/models/User.php
@@ -3,6 +3,8 @@
namespace auth\models;
use Yii;
+use yii\behaviors\BlameableBehavior;
+use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\db\Expression;
use yii\helpers\Security;
@@ -50,12 +52,14 @@ class User extends ActiveRecord implements IdentityInterface
{
return [
'timestamp' => [
- 'class' => 'yii\behaviors\AutoTimestamp',
+ 'class' => 'yii\behaviors\TimestampBehavior',
'attributes' => [
self::EVENT_BEFORE_INSERT => ['create_time', 'update_time'],
self::EVENT_BEFORE_DELETE => 'delete_time',
],
- 'timestamp' => new Expression('CURRENT_TIMESTAMP')
+ 'value' => function () {
+ return new Expression('CURRENT_TIMESTAMP');
+ }
],
];
}
|
Renamed `AutoTimestamp` to `TimestampBehavior`, and updated code accordingly.
|
robregonm_yii2-auth
|
train
|
php
|
c68fbea65eab014ca954ff2550183854be998c97
|
diff --git a/src/Medoo.php b/src/Medoo.php
index <HASH>..<HASH> 100644
--- a/src/Medoo.php
+++ b/src/Medoo.php
@@ -217,7 +217,7 @@ class Medoo
$options['database'] = $options['database'] ?? $options['database_name'];
if (!isset($options['socket'])) {
- $options['host'] = $options['host'] ?? $options['server'];
+ $options['host'] = $options['host'] ?? $options['server'] ?? false;
}
}
@@ -1773,7 +1773,6 @@ class Medoo
continue;
}
-
preg_match('/(?<column>(?![_\d])[\p{N}\p{L}\-_]+)(\[(?<operator>\+|\-|\*|\/)\])?/u', $key, $match);
if (isset($match['operator'])) {
@@ -1783,7 +1782,7 @@ class Medoo
} else {
$mapKey = $this->mapKey();
$fields[] = "{$column} = {$mapKey}";
-
+
switch ($type) {
case 'array':
|
[fix] Error having no host or server connection options.
|
catfan_Medoo
|
train
|
php
|
441f0232c86ecbf526689153219a560ad4ccbe07
|
diff --git a/packages/@vuepress/core/lib/node/App.js b/packages/@vuepress/core/lib/node/App.js
index <HASH>..<HASH> 100755
--- a/packages/@vuepress/core/lib/node/App.js
+++ b/packages/@vuepress/core/lib/node/App.js
@@ -348,7 +348,14 @@ module.exports = class App {
computed: new this.ClientComputedMixinConstructor(),
enhancers: this.pluginAPI.getOption('extendPageData').items
})
- this.pages.push(page)
+ const index = this.pages.findIndex(({ path }) => path === page.path)
+ if (index >= 0) {
+ // Override a page if corresponding path already exists
+ logger.warn(`Override existing page ${chalk.yellow(page.path)}.`)
+ this.pages.splice(index, 1, page)
+ } else {
+ this.pages.push(page)
+ }
}
/**
|
feat($core): prevent duplicate route (#<I>)
|
vuejs_vuepress
|
train
|
js
|
af66259e82cd806f19e179e740e97a05619cad0c
|
diff --git a/framework/widgets/Menu.php b/framework/widgets/Menu.php
index <HASH>..<HASH> 100644
--- a/framework/widgets/Menu.php
+++ b/framework/widgets/Menu.php
@@ -212,7 +212,11 @@ class Menu extends Widget
'{items}' => $this->renderItems($item['items']),
]);
}
- $lines[] = Html::tag($tag, $menu, $options);
+ if($tag){
+ $lines[] = Html::tag($tag, $menu, $options);
+ }else{
+ $lines[] = $menu;
+ }
}
return implode("\n", $lines);
|
Update Menu.php
The feature:
<URL>template
I provided a patch in which you can set the item-tag on false. When this is done,
the item tag is ignored and no LI is created, which is necessary for the list-group-linked.
|
yiisoft_yii-core
|
train
|
php
|
f8f9fa1742bbe5ca80de215548a6237f87fa8972
|
diff --git a/template/app/view/comments/List.js b/template/app/view/comments/List.js
index <HASH>..<HASH> 100644
--- a/template/app/view/comments/List.js
+++ b/template/app/view/comments/List.js
@@ -104,10 +104,6 @@ Ext.define('Docs.view.comments.List', {
},
initTabs: function() {
- if (Docs.Settings.get("comments").sortByScore) {
- this.down("tabpanel[cls=comments-tabpanel]").setActiveTab(1);
- }
-
this.down("tabpanel[cls=comments-tabpanel]").on("tabchange", function(panel, newTab) {
if (newTab.title === "Recent") {
this.fireEvent("sortOrderChange", "recent");
|
Eliminate last remaining permanent sortByScore setting.
|
senchalabs_jsduck
|
train
|
js
|
4a333625e5c3bcb78c28f8cbb5a1c188eaf7d33f
|
diff --git a/bin.js b/bin.js
index <HASH>..<HASH> 100755
--- a/bin.js
+++ b/bin.js
@@ -148,10 +148,10 @@ function downloadPrebuild () {
function getAbi (version, cb) {
version = version.replace('v', '')
fs.readFile(path.join(NODE_GYP, version, 'src/node_version.h'), 'utf-8', function (err, a) {
- if (err && err.code === 'ENOENT') retry()
+ if (err && err.code === 'ENOENT') return retry()
if (err) return cb(err)
fs.readFile(path.join(NODE_GYP, version, 'src/node.h'), 'utf-8', function (err, b) {
- if (err && err.code === 'ENOENT') retry()
+ if (err && err.code === 'ENOENT') return retry()
if (err) return cb(err)
var abi = parse(a) || parse(b)
if (!abi) return cb(new Error('Could not detect abi for ' + version))
|
should return when retrying abi detection
|
prebuild_prebuild
|
train
|
js
|
1c2ce6a338267de59cb24ff246abb20628669e24
|
diff --git a/lib/friendly_id/sluggable_class_methods.rb b/lib/friendly_id/sluggable_class_methods.rb
index <HASH>..<HASH> 100644
--- a/lib/friendly_id/sluggable_class_methods.rb
+++ b/lib/friendly_id/sluggable_class_methods.rb
@@ -46,9 +46,11 @@ module FriendlyId::SluggableClassMethods
if friendly_id_options[:scope]
if !scope
- e.message << "; expected scope but got none"
+ raise ActiveRecord::RecordNotFound.new("%s; expected scope but got none" % e.message)
+ # e.message << "; expected scope but got none"
else
- e.message << " and scope=#{scope}"
+ raise ActiveRecord::RecordNotFound.new("%s and scope=#{scope}" % e.message)
+ # e.message << " and scope=#{scope}"
end
end
|
Raise a new ActiveRecord::RecordNotFound rather than append to the error's message'; <I> freezes exception messages.
|
norman_friendly_id
|
train
|
rb
|
d1172cd65212266962f4b09c0f8b839f761e4446
|
diff --git a/src/org/opencms/jsp/parse/DivTag.java b/src/org/opencms/jsp/parse/DivTag.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/jsp/parse/DivTag.java
+++ b/src/org/opencms/jsp/parse/DivTag.java
@@ -1,7 +1,7 @@
/*
* File : $Source: /alkacon/cvs/opencms/src/org/opencms/jsp/parse/Attic/DivTag.java,v $
- * Date : $Date: 2006/09/19 14:27:53 $
- * Version: $Revision: 1.1 $
+ * Date : $Date: 2006/11/06 13:34:05 $
+ * Version: $Revision: 1.2 $
*
* This library is part of OpenCms -
* the Open Source Content Mananagement System
@@ -40,9 +40,9 @@ import org.htmlparser.tags.Div;
*
* @author Achim Westermann
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*
- * @since M 54
+ * @since 6.2.2
*
*/
public class DivTag extends TagNode {
|
* Removed customer specific @since tag
|
alkacon_opencms-core
|
train
|
java
|
cbc4520b4560c125a32156a3970ee651f46ab775
|
diff --git a/observable/observable.py b/observable/observable.py
index <HASH>..<HASH> 100644
--- a/observable/observable.py
+++ b/observable/observable.py
@@ -67,7 +67,7 @@ class Observable:
def trigger(self, event, *args, **kwargs):
"""trigger all functions from an event"""
if event not in self._events:
- raise Observable.EventNotFound(event)
+ return False
handled = False
for func in self._events[event]:
|
do not raise exception if no event was registered before triggering it
|
timofurrer_observable
|
train
|
py
|
86acc4290e2aecb894850a77e2361070a678c065
|
diff --git a/src/js/Inks/injectInk.js b/src/js/Inks/injectInk.js
index <HASH>..<HASH> 100644
--- a/src/js/Inks/injectInk.js
+++ b/src/js/Inks/injectInk.js
@@ -167,6 +167,9 @@ export default ComposedComponent => class Ink extends Component {
onMouseLeave={this.handleMouseLeave}
onKeyUp={this.handleKeyUp}
onBlur={this.handleBlur}
+ onTouchStart={this.handleTouchStart}
+ onTouchCancel={this.handleTouchEnd}
+ onTouchEnd={this.handleTouchEnd}
ink={ink}
>
{children}
|
Added missing touch events for injectInk
|
mlaursen_react-md
|
train
|
js
|
5e5ae7d17cc2ed8348648fd856b6a9adafb48c55
|
diff --git a/src/python/dxpy/bindings/dxgtable.py b/src/python/dxpy/bindings/dxgtable.py
index <HASH>..<HASH> 100644
--- a/src/python/dxpy/bindings/dxgtable.py
+++ b/src/python/dxpy/bindings/dxgtable.py
@@ -23,7 +23,7 @@ DEFAULT_TABLE_READ_ROW_BUFFER_SIZE = 40000
# stringifying, but the larger the row buffer, the more we could exceed the max byte size of the
# stringified buffer.
DEFAULT_TABLE_WRITE_ROW_BUFFER_SIZE = 10000
-DEFAULT_TABLE_WRITE_REQUEST_SIZE = 1024*1024*32 # bytes
+DEFAULT_TABLE_WRITE_REQUEST_SIZE = 1024*1024*96 # bytes
class DXGTable(DXDataObject):
'''Remote GenomicTable object handler
|
Raise outgoing row buffer size in DXGTable.
|
dnanexus_dx-toolkit
|
train
|
py
|
63e45f41741214b2ef2f063f4c27c78e29772644
|
diff --git a/dash/orgs/management/commands/orgtasks.py b/dash/orgs/management/commands/orgtasks.py
index <HASH>..<HASH> 100644
--- a/dash/orgs/management/commands/orgtasks.py
+++ b/dash/orgs/management/commands/orgtasks.py
@@ -26,9 +26,11 @@ class Command(BaseCommand):
action = options['action']
task_key = options['task']
- orgs = Org.objects.filter(is_active=True).order_by('pk')
+ orgs = Org.objects.order_by('pk')
if org_ids:
orgs = orgs.filter(pk__in=org_ids)
+ else:
+ orgs = orgs.filter(is_active=True)
if action in (self.ENABLE, self.DISABLE) and not task_key:
raise CommandError("Must provide a task key")
|
Allow orgtasks command to operate on inactive orgs
|
rapidpro_dash
|
train
|
py
|
4a99ea217e9b993b5843430c42388d20274b4874
|
diff --git a/tests/StreamServerNodeTest.php b/tests/StreamServerNodeTest.php
index <HASH>..<HASH> 100644
--- a/tests/StreamServerNodeTest.php
+++ b/tests/StreamServerNodeTest.php
@@ -52,4 +52,16 @@ class StreamServerNodeTest extends \PHPUnit_Framework_TestCase {
$this->assertSame($customName, $streamServerNode->getPeerName());
}
+ public function testConstructorFetchesLocalPeerNameIfNotSpecified()
+ {
+ $stream = $this->getSampleSocketStream();
+ $localName = stream_socket_get_name($stream, false);
+
+ $streamServerNode = $this->getMockForAbstractClass(self::CLASS_NAME,
+ array($stream, null, $this->loggerMock)
+ );
+
+ $this->assertSame($localName, $streamServerNode->getPeerName());
+ }
+
}
|
Added test checking if StreamServerNode uses local peername from socket if no custom name was specified.
|
kiler129_CherryHttp
|
train
|
php
|
297912a5abccecdc593984f3473e6c557c5e753e
|
diff --git a/cdm/src/main/java/ucar/nc2/thredds/DqcStationObsDataset.java b/cdm/src/main/java/ucar/nc2/thredds/DqcStationObsDataset.java
index <HASH>..<HASH> 100644
--- a/cdm/src/main/java/ucar/nc2/thredds/DqcStationObsDataset.java
+++ b/cdm/src/main/java/ucar/nc2/thredds/DqcStationObsDataset.java
@@ -284,7 +284,10 @@ public class DqcStationObsDataset extends ucar.nc2.dt.point.StationObsDatasetImp
private void show(String line) {
System.out.println(line);
- LinkedHashMap map = parser.parseReport(line);
+ if( ! parser.parseReport(line) )
+ return;
+
+ LinkedHashMap map = parser.getFields();
Iterator ii = map.keySet().iterator();
while (ii.hasNext()) {
Object key = ii.next();
@@ -377,4 +380,4 @@ public class DqcStationObsDataset extends ucar.nc2.dt.point.StationObsDatasetImp
}
-}
\ No newline at end of file
+}
|
changed for the new MetarParser api
|
Unidata_thredds
|
train
|
java
|
3d5ce0de774cd82101001316e76bf64690b01144
|
diff --git a/javautil/src/main/java/org/arp/javautil/datastore/DataStore.java b/javautil/src/main/java/org/arp/javautil/datastore/DataStore.java
index <HASH>..<HASH> 100644
--- a/javautil/src/main/java/org/arp/javautil/datastore/DataStore.java
+++ b/javautil/src/main/java/org/arp/javautil/datastore/DataStore.java
@@ -4,8 +4,8 @@ import java.util.Map;
/**
* Represents a data store, which can be either temporary or persistent. It can
- * be treated just like a {@link java.util.Map}, but defines one extra method,
- * <code>shutdown</code>.
+ * be treated just like a {@link java.util.Map}, but defines two extra methods,
+ * <code>shutdown</code>, which closes the store, and <code>isClosed</code>..
*
* @param <K>
* the key type to store
@@ -22,7 +22,7 @@ public interface DataStore<K, V> extends Map<K, V> {
void shutdown();
/**
- * Checks whether the store has already been shutdown
+ * Checks whether the store has already been shut down
*
* @return <code>true</code> if the store has been shutdown;
* <code>false</code> otherwise
|
changed the javadoc on isClosed to be closer to English
|
eurekaclinical_protempa
|
train
|
java
|
762ed9f1badf3c793dc06e8624e811ff7d026b8e
|
diff --git a/Renderer/RssRenderer.php b/Renderer/RssRenderer.php
index <HASH>..<HASH> 100755
--- a/Renderer/RssRenderer.php
+++ b/Renderer/RssRenderer.php
@@ -201,11 +201,11 @@ class RssRenderer implements RendererInterface
{
$authorData = $item->getFeedAuthor();
$author = '';
- if(isset($authorData['nickname'])) {
- $author .= $authorData['nickname'];
+ if(isset($authorData['name'])) {
+ $author .= $authorData['name'];
}
if (isset($authorData['email'])) {
- $author = empty($author) ? $authorData['email'] : ' ' . $authorData['email'];
+ $author .= empty($author) ? $authorData['email'] : ' ' . $authorData['email'];
}
if(!empty($author)) {
|
Fix a bug on the author name (who was nickname) in the RssRenderer.
|
Nekland_FeedBundle
|
train
|
php
|
8d54e3e822ca6b0d1a41f2561f53f0ff40c3838c
|
diff --git a/imagehash.py b/imagehash.py
index <HASH>..<HASH> 100644
--- a/imagehash.py
+++ b/imagehash.py
@@ -1,7 +1,11 @@
-import Image
+from PIL import Image
from bitarray import bitarray
+def _hamming_distance(string, other_string):
+ return sum(map(lambda x: 0 if x[0] == x[1] else 1, zip(string, other_string)))
+
+
class ImageHash(object):
def __init__(self, path, size=8):
self.image_path = path
@@ -20,3 +24,14 @@ class ImageHash(object):
ba = bitarray("".join(diff), endian='little')
return ba.tobytes().encode('hex')
+
+
+def distance(image_path, other_image_path):
+ image_hash = ImageHash(image_path).average_hash()
+ other_image_hash = ImageHash(other_image_path).average_hash()
+
+ return _hamming_distance(image_hash, other_image_hash)
+
+
+def is_look_alike(image_path, other_image_path, tolerance=6):
+ return distance(image_path, other_image_path) < tolerance
|
Creates distance and is_look_alike methods in imagehash.py
|
bunchesofdonald_photohash
|
train
|
py
|
3d6b104b9f2ea1706eae3c38c903aca1412fcc97
|
diff --git a/src/main.js b/src/main.js
index <HASH>..<HASH> 100644
--- a/src/main.js
+++ b/src/main.js
@@ -61,7 +61,6 @@ class Proto {
let Offset = Index + 2
for(var i = 1; i <= Count; ++i){
let Entry = Proto.DecodeEntry(Content, Offset)
- console.log(Entry.value)
ToReturn.push(Entry.value)
Offset = Entry.offset
}
@@ -69,11 +68,11 @@ class Proto {
} else if(Type === 36){ // 36 : $
return (Count === -1) ? {value: null, offset: Index + 2} : {value: Content.toString('utf8', Index + 2, Index + 2 + Count), offset: Index + Count + 4}
} else if(Type === 45){ // 45 : -
- throw new Error(Content.slice(1, Index))
+ throw new Error(Content.toString('utf8', startIndex + 1, Index))
} else if(Type === 43){ // 43 : +
- return {value: Content.slice(1, Index), offset: Index + 2}
+ return {value: Content.toString('utf8', startIndex + 1, Index), offset: Index + 2}
} else if(Type === 58){ // 58 : :
- return {value: Content.slice(1, Index), offset: Index + 2}
+ return {value: parseInt(Content.toString('utf8', startIndex + 1, Index)), offset: Index + 2}
} else throw new Error('Error Decoding Redis Response')
}
}
|
:racehorse: Share same buffer for all types
|
steelbrain_redis-proto
|
train
|
js
|
d8405bc343277b0b2ab84c50df8cdd0d1b32b267
|
diff --git a/perceval/_version.py b/perceval/_version.py
index <HASH>..<HASH> 100644
--- a/perceval/_version.py
+++ b/perceval/_version.py
@@ -1,2 +1,2 @@
# Versions compliant with PEP 440 https://www.python.org/dev/peps/pep-0440
-__version__ = "0.11.5"
+__version__ = "0.11.6"
|
Update version number to <I>
|
chaoss_grimoirelab-perceval
|
train
|
py
|
25135c369118558963b13b784acd2b2864a8a91c
|
diff --git a/web/web.go b/web/web.go
index <HASH>..<HASH> 100644
--- a/web/web.go
+++ b/web/web.go
@@ -377,7 +377,9 @@ func (h *Handler) consolesPath() string {
func tmplFuncs(consolesPath string, opts *Options) template_text.FuncMap {
return template_text.FuncMap{
- "since": time.Since,
+ "since": func(t time.Time) time.Duration {
+ return time.Since(t) / time.Millisecond * time.Millisecond
+ },
"consolesPath": func() string { return consolesPath },
"pathPrefix": func() string { return opts.ExternalURL.Path },
"stripLabels": func(lset model.LabelSet, labels ...model.LabelName) model.LabelSet {
|
web: round last scrape timestamp to milliseconds
|
prometheus_prometheus
|
train
|
go
|
fb5fb8a0dfc841ba16722887245c7c0ac15b4969
|
diff --git a/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js b/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js
+++ b/packages/bonde-admin/client/mobilizations/widgets/components/form-finish-message/index.js
@@ -132,7 +132,7 @@ export const FormFinishMessage = props => {
const raw = JSON.stringify(value.toJSON())
if (finishMessage.value !== raw) finishMessage.onChange(raw)
}}
- toolbarStyles={{ position: 'relative', marginBottom: 10, zIndex: 4 }}
+ toolbarStyles={{ position: 'relative', marginBottom: 10, zIndex: 5 }}
contentStyles={{ backgroundColor: '#fff', color: '#666', padding: 10 }}
/>
)}
|
fix(widgets): change index on finish custom message
|
nossas_bonde-client
|
train
|
js
|
85ea51b22e4e930128a2b89782c497a8ba3a2909
|
diff --git a/spec/controllers/kuhsaft/api/pages_controller_spec.rb b/spec/controllers/kuhsaft/api/pages_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/kuhsaft/api/pages_controller_spec.rb
+++ b/spec/controllers/kuhsaft/api/pages_controller_spec.rb
@@ -49,9 +49,9 @@ describe Kuhsaft::Api::PagesController do
end
end
- it 'contains the url' do
+ it 'contains the url with page ID' do
I18n.with_locale :de do
- expect(@page_hash['url']).to eq('/' + @page1.url)
+ expect(@page_hash['url']).to eq('/pages/' + @page1.id.to_s)
end
end
|
update spec to match new api controller behavior
|
brandleadership_kuhsaft
|
train
|
rb
|
a628094a5f82a337c57f873bcb522c2fc8a75652
|
diff --git a/lib/build-client/set-state.test.js b/lib/build-client/set-state.test.js
index <HASH>..<HASH> 100644
--- a/lib/build-client/set-state.test.js
+++ b/lib/build-client/set-state.test.js
@@ -40,6 +40,25 @@ module.exports = {
assert.equal(error.message, 'Failed to change state: UGH')
assert.equal(info.state, 'home')
+ },
+ invalidState: function () {
+ var info = {userId: 'X', locationId: 'Y', state: 'home'}
+ td.when(request.post('https://simplisafe.com/mobile/X/sid/Y/set-state', {
+ state: 'away',
+ mobile: 1,
+ no_persist: 0,
+ XDEBUG_SESSION_START: 'session_name'
+ })).thenCallback(null, 'something', {
+ result: 99
+ })
+
+ var error
+ subject('away', info, function (er) {
+ error = er
+ })
+
+ assert.equal(error.message, 'Invalid state: 99')
}
+
}
|
Test #<I> - Failing for unknown result types
|
searls_simplisafe
|
train
|
js
|
731a6ee45a9820a6b2d7b101dc0396ef04bd3214
|
diff --git a/themes/socialblue/src/Plugin/Preprocess/Node.php b/themes/socialblue/src/Plugin/Preprocess/Node.php
index <HASH>..<HASH> 100644
--- a/themes/socialblue/src/Plugin/Preprocess/Node.php
+++ b/themes/socialblue/src/Plugin/Preprocess/Node.php
@@ -74,7 +74,7 @@ class Node extends NodeBase {
elseif (
$variables['view_mode'] === 'full' &&
$node->bundle() === 'album' &&
- !views_get_view_result('album', 'embed_cover')
+ !views_get_view_result('album', 'embed_cover', $node->id())
) {
$variables['link'] = Url::fromRoute(
'entity.post.add_form',
|
Issue #<I> by chmez: Send a node identifier to function for getting the album cover for fixing the issue which shows not the empty album as empty on the album page
|
goalgorilla_open_social
|
train
|
php
|
f19ff8cbcca9416f34f62298f460592c9eafa8b2
|
diff --git a/Neos.Flow/Classes/Core/Bootstrap.php b/Neos.Flow/Classes/Core/Bootstrap.php
index <HASH>..<HASH> 100644
--- a/Neos.Flow/Classes/Core/Bootstrap.php
+++ b/Neos.Flow/Classes/Core/Bootstrap.php
@@ -540,7 +540,7 @@ class Bootstrap
define('FLOW_PATH_TEMPORARY', $temporaryDirectoryPath);
}
- define('FLOW_VERSION_BRANCH', 'master');
+ define('FLOW_VERSION_BRANCH', '8.0');
define('FLOW_APPLICATION_CONTEXT', (string)$this->context);
}
|
TASK: Set FLOW_VERSION_BRANCH to <I>
|
neos_flow-development-collection
|
train
|
php
|
4163e57c1f431c85ca96190af0901ef15e4d0fe4
|
diff --git a/stripe/src/main/java/com/stripe/android/model/Card.java b/stripe/src/main/java/com/stripe/android/model/Card.java
index <HASH>..<HASH> 100644
--- a/stripe/src/main/java/com/stripe/android/model/Card.java
+++ b/stripe/src/main/java/com/stripe/android/model/Card.java
@@ -92,7 +92,7 @@ public class Card extends StripeJsonModel implements StripePaymentSource {
"223", "224", "225", "226", "227", "228", "229",
"23", "24", "25", "26",
"270", "271", "2720",
- "50", "51", "52", "53", "54", "55"
+ "50", "51", "52", "53", "54", "55", "67"
};
public static final int MAX_LENGTH_STANDARD = 16;
|
add <I> as mastercard (Maestro) (#<I>)
|
stripe_stripe-android
|
train
|
java
|
8305808bee5894215a3a548b1e117f4ceffefcac
|
diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Events.js
+++ b/lib/OpenLayers/Events.js
@@ -1,7 +1,7 @@
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
* text of the license. */
-
+
/**
* @class
*/
@@ -159,7 +159,7 @@ OpenLayers.Events.prototype = {
// execute all callbacks registered for specified type
var listeners = this.listeners[type];
- if (listeners != null) {
+ if ((listeners != null) && (listeners.length > 0)) {
for (var i = 0; i < listeners.length; i++) {
var callback = listeners[i];
var continueChain;
|
only prevent event from falling through if there are actually listeners registered. this fixes #<I>
git-svn-id: <URL>
|
openlayers_openlayers
|
train
|
js
|
e0182b308f1918984385be36cbd166b9d51563a7
|
diff --git a/src/Renderer.php b/src/Renderer.php
index <HASH>..<HASH> 100644
--- a/src/Renderer.php
+++ b/src/Renderer.php
@@ -9,6 +9,7 @@ use LSS\Array2XML;
class Renderer
{
+ protected $defaultContentType = 'application/json';
protected $htmlPrefix;
protected $htmlPostfix;
@@ -140,9 +141,34 @@ class Renderer
}
}
- return 'text/html';
+ return $this->getDefaultContentType();
}
+
+ /**
+ * Getter for defaultContentType
+ *
+ * @return string
+ */
+ public function getDefaultContentType()
+ {
+ return $this->defaultContentType;
+ }
+
+ /**
+ * Setter for defaultContentType
+ *
+ * @param string $defaultContentType Value to set
+ * @return self
+ */
+ public function setDefaultContentType($defaultContentType)
+ {
+ $this->defaultContentType = $defaultContentType;
+ return $this;
+ }
+
+
+
/**
* Getter for htmlPrefix
*
|
Support changing the default content type and default to JSON
|
akrabat_rka-content-type-renderer
|
train
|
php
|
36bfde39ff982bd513939eb0f89a81ac68127dd5
|
diff --git a/python-xbrl/parser.py b/python-xbrl/parser.py
index <HASH>..<HASH> 100644
--- a/python-xbrl/parser.py
+++ b/python-xbrl/parser.py
@@ -50,7 +50,7 @@ class XBRLParser(object):
# Store the headers
xbrl_file = XBRLPreprocessedFile(file_handle)
xbrl = soup_maker(xbrl_file.fh)
- if xbrl.find('xbrl') is None:
+ if xbrl.find('xbrl') is None and xbrl.find(name=re.compile("(xbrli:)")) is None:
raise XBRLParserException('The xbrl file is empty!')
return xbrl
@@ -302,6 +302,8 @@ class XBRLParser(object):
return elements_total
+#class 10document()
+
#Preprocessing to fix broken XML
# TODO - Run tests to see if other XML processing errors can occur
class XBRLPreprocessedFile(XBRLFile):
|
we can also parse xbrli documents
|
greedo_python-xbrl
|
train
|
py
|
9596ceebd4a340647e54ff0dc084db33a6044978
|
diff --git a/filestack/src/main/java/com/filestack/android/FsActivity.java b/filestack/src/main/java/com/filestack/android/FsActivity.java
index <HASH>..<HASH> 100644
--- a/filestack/src/main/java/com/filestack/android/FsActivity.java
+++ b/filestack/src/main/java/com/filestack/android/FsActivity.java
@@ -93,6 +93,7 @@ public class FsActivity extends AppCompatActivity implements
// Create app bar
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
+ getSupportActionBar().setTitle(R.string.picker_title);
// Create nav drawer
drawer = findViewById(R.id.drawer_layout);
@@ -263,6 +264,9 @@ public class FsActivity extends AppCompatActivity implements
Util.getSelectionSaver().clear();
}
+ SourceInfo sourceInfo = Util.getSourceInfo(source);
+ getSupportActionBar().setSubtitle(sourceInfo.getTextId());
+
selectedSource = source;
nav.setCheckedItem(id);
|
Include source name as a subtitle in action bar
|
filestack_filestack-android
|
train
|
java
|
3b3bb70fa0e307f50e5947976496ad87d414931d
|
diff --git a/nodeconductor/iaas/views.py b/nodeconductor/iaas/views.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/iaas/views.py
+++ b/nodeconductor/iaas/views.py
@@ -687,6 +687,14 @@ class TemplateLicenseViewSet(viewsets.ModelViewSet):
d[output_name] = d[db_name]
del d[db_name]
+ # XXX: hack for portal only. (Provide project group data if aggregation was done by project)
+ if 'project' in aggregate_parameters and 'project_group' not in aggregate_parameters:
+ for item in queryset:
+ print queryset
+ project = Project.objects.get(uuid=item['project_uuid'])
+ if project.project_group is not None:
+ item['project_group_uuid'] = project.project_group.uuid.hex
+ item['project_group_name'] = project.project_group.name
return Response(queryset)
|
Show project group uuid with project licenses
- nc-<I>
|
opennode_waldur-core
|
train
|
py
|
73c259158d34207f6004c8f66ff714874d395891
|
diff --git a/handler.go b/handler.go
index <HASH>..<HASH> 100644
--- a/handler.go
+++ b/handler.go
@@ -39,14 +39,14 @@ type LoggingWriter struct {
}
/*
-WrapLoggingWriter wraps http.HandlerFunc to use the ApacheLog logger
+WrapLoggingWriter wraps http.Handler to use the ApacheLog logger
*/
-func WrapLoggingWriter(h http.HandlerFunc, logger *ApacheLog) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
+func WrapLoggingWriter(h http.Handler, logger *ApacheLog) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
lw := NewLoggingWriter(w, r, logger)
defer lw.EmitLog()
- h(lw, r)
- }
+ h.ServeHTTP(lw, r)
+ })
}
func NewLoggingWriter(w http.ResponseWriter, r *http.Request, logger *ApacheLog) *LoggingWriter {
|
Use a broader type, http.Handler
When I wrote this I was a go newbie. Forgive me father, for I have
sinned
|
lestrrat-go_apache-logformat
|
train
|
go
|
6aaf2445ab4ecb04d77680028cd4104d88373f91
|
diff --git a/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go b/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go
index <HASH>..<HASH> 100644
--- a/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go
+++ b/vsphere/internal/virtualdevice/virtual_machine_disk_subresource.go
@@ -219,6 +219,7 @@ func DiskSubresourceSchema() map[string]*schema.Schema {
"storage_policy_id": {
Type: schema.TypeString,
Optional: true,
+ Computed: true,
Description: "The ID of the storage policy to assign to the virtual disk in VM.",
},
"controller_type": {
diff --git a/vsphere/virtual_machine_config_structure.go b/vsphere/virtual_machine_config_structure.go
index <HASH>..<HASH> 100644
--- a/vsphere/virtual_machine_config_structure.go
+++ b/vsphere/virtual_machine_config_structure.go
@@ -323,6 +323,7 @@ func schemaVirtualMachineConfigSpec() map[string]*schema.Schema {
"storage_policy_id": {
Type: schema.TypeString,
Optional: true,
+ Computed: true,
Description: "The ID of the storage policy to assign to the virtual machine home directory.",
},
"hardware_version": {
|
Make storage_policy_id computed. (#<I>)
|
terraform-providers_terraform-provider-vsphere
|
train
|
go,go
|
a73cf5fa9d506b799da4d025a2eb5a3d421fdeca
|
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
@@ -929,9 +929,7 @@ Undocumented.prototype.createConnection = function( keyringConnectionId, siteId,
Undocumented.prototype.publicizePost = function( siteId, postId, message, skippedConnections, fn ) {
const body = { skipped_connections: [] };
- if ( message ) {
- body.message = message;
- }
+ body.message = message;
if ( skippedConnections && skippedConnections.length > 0 ) {
body.skipped_connections = skippedConnections;
|
Allow empty message to be posted for publicize posts
|
Automattic_wp-calypso
|
train
|
js
|
8f28784c7d0d8baeb9a8d2a30ca7e8469e09012a
|
diff --git a/handler/oauth2/flow_resource_owner_test.go b/handler/oauth2/flow_resource_owner_test.go
index <HASH>..<HASH> 100644
--- a/handler/oauth2/flow_resource_owner_test.go
+++ b/handler/oauth2/flow_resource_owner_test.go
@@ -88,7 +88,7 @@ func TestResourceOwnerFlow_HandleTokenEndpointRequest(t *testing.T) {
description: "should fail because invalid grant_type specified",
setup: func() {
areq.GrantTypes = fosite.Arguments{"password"}
- areq.Client = &fosite.DefaultClient{GrantTypes: fosite.Arguments{"authoriation_code"}, Scopes: []string{"foo-scope"}}
+ areq.Client = &fosite.DefaultClient{GrantTypes: fosite.Arguments{"authorization_code"}, Scopes: []string{"foo-scope"}}
},
expectErr: fosite.ErrUnauthorizedClient,
},
|
chore: fix typo of authorization_code in test (#<I>)
|
ory_fosite
|
train
|
go
|
ce22036dab6debb932ed81e65e47f918eaca3e67
|
diff --git a/fitsio/fitslib.py b/fitsio/fitslib.py
index <HASH>..<HASH> 100644
--- a/fitsio/fitslib.py
+++ b/fitsio/fitslib.py
@@ -1372,6 +1372,7 @@ class FITSHDU:
if not isobj[i]:
nonobj_colnums.append(colnums_all[i])
if isrec:
+ # this still leaves possibility of f-order sub-arrays..
colref=array_to_native(data_list[i],inplace=False)
else:
colref=array_to_native_c(data_list[i],inplace=False)
@@ -2915,6 +2916,10 @@ def extract_filename(filename):
def tdim2shape(tdim, is_string=False):
shape=None
+ if tdim is None:
+ print 'TDIM malformed, assuming 1-d array'
+ return None
+
if len(tdim) > 1 or tdim[0] > 1:
if is_string:
shape = list( reversed(tdim[1:]) )
|
added check for None tdim, caused by malformed tdim in header
|
esheldon_fitsio
|
train
|
py
|
47aa633cdd051f884079faa881b61657f19316f7
|
diff --git a/desktop/renderer/index.js b/desktop/renderer/index.js
index <HASH>..<HASH> 100644
--- a/desktop/renderer/index.js
+++ b/desktop/renderer/index.js
@@ -60,7 +60,8 @@ class Keybase extends Component {
ipcMain.on('dispatchAction', (event, action) => {
// we MUST clone this else we'll run into issues with redux. See https://github.com/rackt/redux/issues/830
// This is because we get a remote proxy object, instead of a normal object
- setImmediate(() => store.dispatch(_.cloneDeep(action)))
+ // Using _.cloneDeep() creates a non-plain object
+ setImmediate(() => store.dispatch(_.merge({}, action)))
})
ipcMain.on('subscribeStore', event => {
|
using merge and not clone deep to fix action isPlainObject issues
|
keybase_client
|
train
|
js
|
5b7f7c8a1a35d18d2f4c6138094f830d1b0293d3
|
diff --git a/lib/browser/api/menu.js b/lib/browser/api/menu.js
index <HASH>..<HASH> 100644
--- a/lib/browser/api/menu.js
+++ b/lib/browser/api/menu.js
@@ -86,6 +86,8 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
}
this.popupAt(newWindow, newX, newY, newPosition)
+
+ return { browserWindow: newWindow, x: newX, y: newY, position: newPosition }
}
Menu.prototype.closePopup = function (window) {
|
:wrench: Menu returns its properties now
|
electron_electron
|
train
|
js
|
78e4f66f324fd2c8f032dee29b7f5e405650142a
|
diff --git a/lib/fleximage/model.rb b/lib/fleximage/model.rb
index <HASH>..<HASH> 100644
--- a/lib/fleximage/model.rb
+++ b/lib/fleximage/model.rb
@@ -281,13 +281,11 @@ module Fleximage
# Return true if this record has an image.
def has_image?
- instance_image = @uploaded_image || @output_image
-
- if instance_image
- instance_image
- else
- self.class.db_store? ? image_file_data : File.exists?(file_path)
- end
+ @uploaded_image || @output_image || has_saved_image?
+ end
+
+ def has_saved_image?
+ self.class.db_store? ? !!image_file_data : File.exists?(file_path)
end
# Call from a .flexi view template. This enables the rendering of operators
|
refactored has_image?
|
Squeegy_fleximage
|
train
|
rb
|
f33e13a036e5e0538dba01dcd92c890548a64208
|
diff --git a/storage/engine.go b/storage/engine.go
index <HASH>..<HASH> 100644
--- a/storage/engine.go
+++ b/storage/engine.go
@@ -374,3 +374,13 @@ func (e *Engine) ApplyFnToSeriesIDSet(fn func(*tsdb.SeriesIDSet)) {
}
fn(e.index.SeriesIDSet())
}
+
+// MeasurementCardinalityStats returns cardinality stats for all measurements.
+func (e *Engine) MeasurementCardinalityStats() tsi1.MeasurementCardinalityStats {
+ return e.index.MeasurementCardinalityStats()
+}
+
+// MeasurementStats returns the current measurement stats for the engine.
+func (e *Engine) MeasurementStats() (tsm1.MeasurementStats, error) {
+ return e.engine.MeasurementStats()
+}
|
storage: Add MeasurementCardinalityStats and MeasurementStats to Engine
|
influxdata_influxdb
|
train
|
go
|
9dcab15cc1c74dbd52fb0aa3c76b97dc7b3b5b83
|
diff --git a/system/Validation/CreditCardRules.php b/system/Validation/CreditCardRules.php
index <HASH>..<HASH> 100644
--- a/system/Validation/CreditCardRules.php
+++ b/system/Validation/CreditCardRules.php
@@ -153,7 +153,8 @@ class CreditCardRules
{
if (mb_strpos($ccNumber, $prefix) === 0)
{
- $validPrefix = true;
+ $validPrefix = true;
+ break;
}
}
|
apply break; on loop prefixes card on ccNumber has its prefix
|
codeigniter4_CodeIgniter4
|
train
|
php
|
a1b06933aff80763ec62a288d5178a4321be1baa
|
diff --git a/api/server/profiler.go b/api/server/profiler.go
index <HASH>..<HASH> 100644
--- a/api/server/profiler.go
+++ b/api/server/profiler.go
@@ -19,10 +19,15 @@ func profilerSetup(mainRouter *mux.Router) {
r.HandleFunc("/pprof/profile", pprof.Profile)
r.HandleFunc("/pprof/symbol", pprof.Symbol)
r.HandleFunc("/pprof/trace", pprof.Trace)
- r.HandleFunc("/pprof/block", pprof.Handler("block").ServeHTTP)
- r.HandleFunc("/pprof/heap", pprof.Handler("heap").ServeHTTP)
- r.HandleFunc("/pprof/goroutine", pprof.Handler("goroutine").ServeHTTP)
- r.HandleFunc("/pprof/threadcreate", pprof.Handler("threadcreate").ServeHTTP)
+ r.HandleFunc("/pprof/{name}", handlePprof)
+}
+
+func handlePprof(w http.ResponseWriter, r *http.Request) {
+ var name string
+ if vars := mux.Vars(r); vars != nil {
+ name = vars["name"]
+ }
+ pprof.Handler(name).ServeHTTP(w, r)
}
// Replicated from expvar.go as not public.
|
Use generic handler for pprof profile lookups
This more (in spirit) mimics the handler usage in net/http/pprof.
It also makes sure that any new profiles that are added are
automatically supported (e.g. `mutex` profiles in go<I>).
|
moby_moby
|
train
|
go
|
db74f41995c09a770375c8ab06213b70e777471d
|
diff --git a/src/entities/solid.js b/src/entities/solid.js
index <HASH>..<HASH> 100644
--- a/src/entities/solid.js
+++ b/src/entities/solid.js
@@ -5,15 +5,15 @@ export default function EntityParser() {}
EntityParser.ForEntityName = 'SOLID';
-EntityParser.prototype.parseEntity = function(scanner, currentGroup) {
+EntityParser.prototype.parseEntity = function(scanner, curr) {
var entity;
- entity = { type: currentGroup.value };
+ entity = { type: curr.value };
entity.points = [];
- currentGroup = scanner.next();
- while(currentGroup !== 'EOF') {
- if(currentGroup.code === 0) break;
+ curr = scanner.next();
+ while(curr !== 'EOF') {
+ if(curr.code === 0) break;
- switch(currentGroup.code) {
+ switch(curr.code) {
case 10:
entity.points[0] = helpers.parsePoint(scanner);
break;
@@ -30,10 +30,10 @@ EntityParser.prototype.parseEntity = function(scanner, currentGroup) {
entity.extrusionDirection = helpers.parsePoint(scanner);
break;
default: // check common entity attributes
- helpers.checkCommonEntityProperties(entity, currentGroup);
+ helpers.checkCommonEntityProperties(entity, curr);
break;
}
- currentGroup = scanner.next();
+ curr = scanner.next();
}
return entity;
|
Minor refactor to be consistent with similar code
|
gdsestimating_dxf-parser
|
train
|
js
|
9b378b39239aac93a20bc6182f7de65ea14882ff
|
diff --git a/spec/maxima/command_spec.rb b/spec/maxima/command_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/maxima/command_spec.rb
+++ b/spec/maxima/command_spec.rb
@@ -8,6 +8,23 @@ module Maxima
expect { command }.to_not raise_error
end
+ describe "#options_commands" do
+ it "should begin with no options" do
+ expect(Command.new().options_commands).to eq([])
+ end
+
+ it "should contain all valid options converted into the correct string format" do
+ expect(Command.new().options_commands).to eq([])
+ expect(Command.new().with_options(float: true).options_commands).to eq(["float: true"])
+ expect(Command.new().with_options(float: false).options_commands).to eq(["float: false"])
+
+ expect(Command.new().with_options(use_fast_arrays: true).options_commands).to eq(["use_fast_arrays: true"])
+ expect(Command.new().with_options(real_only: true).options_commands).to eq(["realonly: true"])
+
+ expect(Command.new().with_options(float: true, use_fast_arrays: true, real_only: false).options_commands).to eq(["float: true", "use_fast_arrays: true", "realonly: false"])
+ end
+ end
+
describe "#output_variables" do
it "should work with a single assignment" do
command.let(:a, 4.0)
|
Added tests to ensure Command#options_commands is working as expected
|
Danieth_rb_maxima
|
train
|
rb
|
a17e2fe3d133ec92c4d312d8f5fa0fc3a3a24abb
|
diff --git a/scapy.py b/scapy.py
index <HASH>..<HASH> 100755
--- a/scapy.py
+++ b/scapy.py
@@ -21,6 +21,9 @@
#
# $Log: scapy.py,v $
+# Revision 1.0.5.13 2006/11/27 09:19:47 pbi
+# - fixed bug in Ether_Dot3_Dispatcher() (P. Lalet)
+#
# Revision 1.0.5.12 2006/11/20 13:36:28 pbi
# - fixed bug in IncrementalValue()
#
@@ -1766,7 +1769,7 @@
from __future__ import generators
-RCSID="$Id: scapy.py,v 1.0.5.12 2006/11/20 13:36:28 pbi Exp $"
+RCSID="$Id: scapy.py,v 1.0.5.13 2006/11/27 09:19:47 pbi Exp $"
VERSION = RCSID.split()[2]+"beta"
@@ -8774,7 +8777,7 @@ def fragment(pkt, fragsize=1480):
###################
def Ether_Dot3_Dispatcher(pkt=None, **kargs):
- if pkt is str and len(pkt) >= 14 and struct.unpack("!H", pkt[12:14])[0] < 1500:
+ if type(pkt) is str and len(pkt) >= 14 and struct.unpack("!H", pkt[12:14])[0] < 1500:
return Dot3(pkt, **kargs)
return Ether(pkt, **kargs)
|
- fixed bug in Ether_Dot3_Dispatcher() (P. Lalet)
|
secdev_scapy
|
train
|
py
|
f51997fdac2a7aa9ae10f2f2bac4e756c79a2614
|
diff --git a/libkbfs/md_util.go b/libkbfs/md_util.go
index <HASH>..<HASH> 100644
--- a/libkbfs/md_util.go
+++ b/libkbfs/md_util.go
@@ -277,6 +277,9 @@ func getUnmergedMDUpdates(ctx context.Context, config Config, id tlf.ID,
err error) {
if bid == NullBranchID {
// We're not really unmerged, so there's nothing to do.
+ // TODO: require the caller to avoid making this call if the
+ // bid isn't set (and change the mdserver behavior in that
+ // case as well).
return startRev, nil, nil
}
|
md_util: add TODO about null branch id in getUnmergedRange
Suggested by akalin-keybase.
Issue: #<I>
|
keybase_client
|
train
|
go
|
aa445b24edc94b68306ca3f04f0e64caaf031379
|
diff --git a/glue/ligolw/ligolw.py b/glue/ligolw/ligolw.py
index <HASH>..<HASH> 100644
--- a/glue/ligolw/ligolw.py
+++ b/glue/ligolw/ligolw.py
@@ -126,12 +126,24 @@ class Element(object):
def removeChild(self, child):
"""
Remove a child from this element. The child element is
- returned, and it's parentNode element is reset.
+ returned, and it's parentNode element is reset. If the
+ child will not be used any more, you should call its
+ unlink() method to promote garbage collection.
"""
self.childNodes.remove(child)
child.parentNode = None
return child
+ def unlink(self):
+ """
+ Break internal references within the document tree rooted
+ on this element to promote garbage collected.
+ """
+ self.parentNode = None
+ for child in self.childNodes:
+ child.unlink()
+ self.childNodes = []
+
def replaceChild(self, newchild, oldchild):
"""
Replace an existing node with a new node. It must be the
|
Add unlink() method to Element class.
|
gwastro_pycbc-glue
|
train
|
py
|
99861193b154dd8af7e23a863f4c23c25705f867
|
diff --git a/Core/Curl.php b/Core/Curl.php
index <HASH>..<HASH> 100644
--- a/Core/Curl.php
+++ b/Core/Curl.php
@@ -448,6 +448,10 @@ class Curl
$string = iconv($this->getConnectionCharset(), $charset, $string);
}
+ if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
+ $string = stripslashes($string);
+ }
+
return $string;
}
|
Revert removed get_magic_quotes_gpc
Add condition to check if method exists
|
OXID-eSales_paypal
|
train
|
php
|
aa2cc907ea6c858c8dac85196d9f7e4fefe85471
|
diff --git a/packages/babel-types/src/definitions/jsx.js b/packages/babel-types/src/definitions/jsx.js
index <HASH>..<HASH> 100644
--- a/packages/babel-types/src/definitions/jsx.js
+++ b/packages/babel-types/src/definitions/jsx.js
@@ -41,7 +41,7 @@ defineType("JSXElement", {
children: {
validate: chain(
assertValueType("array"),
- assertEach(assertNodeType("StringLiteral", "JSXExpressionContainer", "JSXElement"))
+ assertEach(assertNodeType("StringLiteral", "JSXText", "JSXExpressionContainer", "JSXElement"))
)
}
}
|
validate: allow JSXText node in JSXElement children property (fixes T<I>)
|
babel_babel
|
train
|
js
|
95f2bdf3c12c45218b54e8ba62b345ad5db3b6f7
|
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
@@ -18,7 +18,7 @@
*/
// version of docker images
-const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v4.0.6';
+const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v4.1.1';
const DOCKER_JAVA_JRE = 'openjdk:8-jre-alpine';
const DOCKER_MYSQL = 'mysql:5.7.20';
const DOCKER_MARIADB = 'mariadb:10.3.7';
|
Update to JHipster Registry <I>
|
jhipster_generator-jhipster
|
train
|
js
|
930d02a4ff8a53f35096486b4e264743c9aae9bb
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,9 +13,9 @@ copyright = '2014-2018, Marco Agner'
author = 'Marco Agner'
# The short X.Y version
-version = '2.0.0'
+version = '2.0.1'
# The full version, including alpha/beta/rc tags
-release = 'v2.0.0'
+release = 'v2.0.1'
# -- General configuration ---------------------------------------------------
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -37,11 +37,12 @@ class PyTest(TestCommand):
setup(
name='Flask-QRcode',
- version='2.0.0',
+ version='2.0.1',
license='GPLv3',
description='A concise Flask extension to render QR codes on Jinja2 ' \
'templates using python-qrcode',
long_description=open('README.md').read(),
+ long_description_content_type='text/markdown',
author='Marco Agner',
author_email='[email protected]',
url='https://github.com/marcoagner/Flask-QRcode',
|
sets markdown content on setup.py now that pypi supports it and bumps
minor to trigger pypi update
|
marcoagner_Flask-QRcode
|
train
|
py,py
|
114a740925d285148da06b70a83ed03faf63740b
|
diff --git a/lib/generamba/version.rb b/lib/generamba/version.rb
index <HASH>..<HASH> 100644
--- a/lib/generamba/version.rb
+++ b/lib/generamba/version.rb
@@ -1,3 +1,3 @@
module Generamba
- VERSION = '0.7.5'
+ VERSION = '0.7.6'
end
|
Increased version number to <I>
|
strongself_Generamba
|
train
|
rb
|
c74d15d5fe2491046aa1d291c11420c2300a6ddc
|
diff --git a/spec/spec.js b/spec/spec.js
index <HASH>..<HASH> 100644
--- a/spec/spec.js
+++ b/spec/spec.js
@@ -164,6 +164,31 @@ describe('EpicEditor.exportFile', function(){
contents = editor.exportFile('poop');
expect(contents).to(beUndefined);
});
+
+ it('check that export file can open non-currently open files', function(){
+ editor.importFile('exportFileTest', 'hello world');
+ expect(editor.exportFile('exportFileTest')).to(be,'hello world');
+ });
+});
+
+describe('EpicEditor.rename', function(){
+ var testEl = _createTestElement()
+ , editor = new EpicEditor({ basePath: '/epiceditor/', container: testEl }).load();
+
+ editor.importFile('foo', 'testing...');
+
+ it('check to see if the foo file exists before trying to rename', function(){
+ expect(editor.exportFile('foo')).to(be,'testing...');
+ });
+
+ it('check that renaming a file actually renames the file', function(){
+ editor.rename('foo','bar');
+ expect(editor.exportFile('bar')).to(be,'testing...');
+ });
+
+ it('check that foo no longer exists', function(){
+ expect(editor.exportFile('foo')).to(beUndefined);
+ });
});
/*
|
Added another test for exportFile and added a new set of tests to check EpicEditor.rename. All are passing.
|
OscarGodson_EpicEditor
|
train
|
js
|
1719ee324812dc0f0ac3465a15da3988a4d74fe3
|
diff --git a/javascript/WidgetAreaEditor.js b/javascript/WidgetAreaEditor.js
index <HASH>..<HASH> 100644
--- a/javascript/WidgetAreaEditor.js
+++ b/javascript/WidgetAreaEditor.js
@@ -20,9 +20,23 @@
$(this).find('.usedWidgets').sortable({
opacity: 0.6,
handle: '.handle',
- update: function(e, ui) {parentRef.updateWidgets(e, ui)},
+ update: function (e, ui) {
+ parentRef.updateWidgets(e, ui)
+ },
placeholder: 'ui-state-highlight',
- forcePlaceholderSize: true
+ forcePlaceholderSize: true,
+ start: function (e, ui) {
+ htmleditors = $(e.srcElement).closest('.Widget').find('textarea.htmleditor');
+ $.each(htmleditors, function (k, i) {
+ tinyMCE.execCommand('mceRemoveControl', false, $(i).attr('id'));
+ })
+ },
+ stop: function (e, ui) {
+ htmleditors = $(e.srcElement).closest('.Widget').find('textarea.htmleditor');
+ $.each(htmleditors, function (k, i) {
+ tinyMCE.execCommand('mceAddControl', true, $(i).attr('id'));
+ })
+ }
});
// Figure out maxid, this is used when creating new widgets
|
#<I> - FIX: disconnect tinyMCE while dragging
By disconnecting the tinyMCE it won't trigger a recreate after drag and dropping, so you won't wind up with multiple htmleditors.
|
silverstripe_silverstripe-widgets
|
train
|
js
|
b9020834ad51cd414678c8b3101c92907b539f2e
|
diff --git a/packages/ember-htmlbars/lib/morphs/attr-morph.js b/packages/ember-htmlbars/lib/morphs/attr-morph.js
index <HASH>..<HASH> 100644
--- a/packages/ember-htmlbars/lib/morphs/attr-morph.js
+++ b/packages/ember-htmlbars/lib/morphs/attr-morph.js
@@ -12,6 +12,8 @@ export var styleWarning = '' +
function EmberAttrMorph(element, attrName, domHelper, namespace) {
HTMLBarsAttrMorph.call(this, element, attrName, domHelper, namespace);
+
+ this.streamUnsubscribers = null;
}
var proto = EmberAttrMorph.prototype = o_create(HTMLBarsAttrMorph.prototype);
|
Fix a case where AttrMorph was being extended
|
emberjs_ember.js
|
train
|
js
|
b4efa580e146a14b48d153e463861fea09a89a5a
|
diff --git a/app-webpack/lib/dev-server-ssr.js b/app-webpack/lib/dev-server-ssr.js
index <HASH>..<HASH> 100644
--- a/app-webpack/lib/dev-server-ssr.js
+++ b/app-webpack/lib/dev-server-ssr.js
@@ -238,11 +238,6 @@ module.exports = class DevServer {
setupMiddlewares: (middlewares, opts) => {
const { app } = opts
- // obsolete hot updates & js maps should be discarded immediately
- app.get(/(\.hot-update\.json|\.js\.map)$/, (_, res) => {
- res.status(404).send('404')
- })
-
if (cfg.build.ignorePublicFolder !== true) {
app.use(resolveUrlPath('/'), serveStatic('.', { maxAge: 0 }))
}
|
fix(app-webpack): issue with HMR for SSR (#<I>)
fixes #<I>
|
quasarframework_quasar
|
train
|
js
|
6ef33edb3ab79f79db67e04b4cb51ccbc0d0198e
|
diff --git a/src/extensibility/ExtensionManagerDialog.js b/src/extensibility/ExtensionManagerDialog.js
index <HASH>..<HASH> 100644
--- a/src/extensibility/ExtensionManagerDialog.js
+++ b/src/extensibility/ExtensionManagerDialog.js
@@ -459,11 +459,11 @@ define(function (require, exports, module) {
});
// Filter the views when the user types in the search field.
- var searchTimeOut = 0;
+ var searchTimeoutID;
$dlg.on("input", ".search", function (e) {
- clearTimeout(searchTimeOut);
+ clearTimeout(searchTimeoutID);
var query = $(this).val();
- searchTimeOut = setTimeout(function () {
+ searchTimeoutID = setTimeout(function () {
views[_activeTabIndex].filter(query);
$modalDlg.scrollTop(0);
}, 200);
|
Changed name of variable searchTimeOut to searchTimeoutID
|
adobe_brackets
|
train
|
js
|
dc497a951e00e4d36c30b02057e652cb4326ddf8
|
diff --git a/tests/unit/test__surface_helpers.py b/tests/unit/test__surface_helpers.py
index <HASH>..<HASH> 100644
--- a/tests/unit/test__surface_helpers.py
+++ b/tests/unit/test__surface_helpers.py
@@ -29,6 +29,7 @@ UNIT_TRIANGLE = np.asfortranarray([
[0.0, 1.0],
])
FLOAT64 = np.float64 # pylint: disable=no-member
+SPACING = np.spacing # pylint: disable=no-member
# pylint: disable=invalid-name,no-member
slow = pytest.mark.skipif(
pytest.config.getoption('--ignore-slow') and not HAS_SURFACE_SPEEDUP,
@@ -119,7 +120,8 @@ class Test_two_by_two_det(unittest.TestCase):
np_det = np.linalg.det(mat)
self.assertNotEqual(actual_det, np_det)
- self.assertLess(abs(actual_det - np_det), 1e-16)
+ local_eps = abs(SPACING(actual_det))
+ self.assertAlmostEqual(actual_det, np_det, delta=local_eps)
class Test_quadratic_jacobian_polynomial(utils.NumPyTestCase):
|
Dropping usage of `1e-<I>` in a unit test.
|
dhermes_bezier
|
train
|
py
|
b2fae4d03a9296c469bd1f215511ac43fd79cd0a
|
diff --git a/server/sonar-web/src/main/js/drilldown/app.js b/server/sonar-web/src/main/js/drilldown/app.js
index <HASH>..<HASH> 100644
--- a/server/sonar-web/src/main/js/drilldown/app.js
+++ b/server/sonar-web/src/main/js/drilldown/app.js
@@ -16,6 +16,8 @@ requirejs([
App.addInitializer(function () {
$('.js-drilldown-link').on('click', function (e) {
e.preventDefault();
+ $(e.currentTarget).closest('table').find('.selected').removeClass('selected');
+ $(e.currentTarget).closest('tr').addClass('selected');
var uuid = $(e.currentTarget).data('uuid'),
viewer = new SourceViewer();
App.viewerRegion.show(viewer);
|
highlight current selected file on the drilldown page
|
SonarSource_sonarqube
|
train
|
js
|
0d1e8cf9378cfe03dce261e609490e8a4221d2a6
|
diff --git a/src/DoctrineAnnotations.php b/src/DoctrineAnnotations.php
index <HASH>..<HASH> 100644
--- a/src/DoctrineAnnotations.php
+++ b/src/DoctrineAnnotations.php
@@ -1,6 +1,6 @@
<?php
-require __DIR__ . '/Di/Inject.php';
-require __DIR__ . '/Di/Named.php';
-require __DIR__ . '/Di/PostConstruct.php';
-require __DIR__ . '/Di/Qualifier.php';
+require_once __DIR__ . '/Di/Inject.php';
+require_once __DIR__ . '/Di/Named.php';
+require_once __DIR__ . '/Di/PostConstruct.php';
+require_once __DIR__ . '/Di/Qualifier.php';
|
load annotation once
it is possibly load annotation twice in cache.
|
ray-di_Ray.Di
|
train
|
php
|
4cd3ea596e2ef0c834e206938af6963bbd08130d
|
diff --git a/pyt/__main__.py b/pyt/__main__.py
index <HASH>..<HASH> 100644
--- a/pyt/__main__.py
+++ b/pyt/__main__.py
@@ -142,6 +142,9 @@ def parse_args(args):
'(only JSON-formatted files are accepted)',
type=str,
default=False)
+ parser.add_argument('-in', '--ignore-nosec',
+ help='Ignoring nosec commands',
+ action='store_true')
save_parser = subparsers.add_parser('save', help='Save menu.')
save_parser.set_defaults(which='save')
@@ -307,6 +310,17 @@ def main(command_line_args=sys.argv[1:]):
args.trigger_word_file
)
)
+
+ if args.ignore_nosec:
+ nosec_lines = set()
+ else:
+ file = open(path, "r")
+ lines = file.readlines()
+ nosec_lines = set(
+ lineno for
+ (lineno, line) in enumerate(lines, start=1)
+ if '#nosec' in line or '# nosec' in line)
+
if args.baseline:
vulnerabilities = get_vulnerabilities_not_in_baseline(vulnerabilities, args.baseline)
|
nosec_lines for #<I>'s issue
Added args and nosec_lines
|
python-security_pyt
|
train
|
py
|
4b70cae1a9907d0a3b5403371da96a0f36959ba0
|
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
@@ -1543,7 +1543,7 @@ define("orion/textview/textView", ['orion/textview/textModel', 'orion/textview/k
* Prevent clicks outside of the view from taking focus
* away the view.
*/
- var topNode = this._clientDiv;
+ var topNode = this._overlayDiv || this._clientDiv;
var temp = e.target ? e.target : e.srcElement;
while (temp) {
if (topNode === temp) {
|
stop events for topNode (overlayDiv)
|
eclipse_orion.client
|
train
|
js
|
3094299b7e5442dbf7985bd44dbcb7b342cd440c
|
diff --git a/src/HandlerExecutionCommandBus.php b/src/HandlerExecutionCommandBus.php
index <HASH>..<HASH> 100644
--- a/src/HandlerExecutionCommandBus.php
+++ b/src/HandlerExecutionCommandBus.php
@@ -46,7 +46,10 @@ class HandlerExecutionCommandBus implements CommandBus
// is_callable is used here instead of method_exists, as method_exists
// will fail when given a handler that relies on __call.
if (!is_callable([$handler, $methodName])) {
- throw CanNotInvokeHandlerException::forCommand($command, "Method '{$methodName}' does not exist on handler");
+ throw CanNotInvokeHandlerException::forCommand(
+ $command,
+ "Method '{$methodName}' does not exist on handler"
+ );
}
return $handler->{$methodName}($command);
|
Yet. Another. PSR. Fix.
|
thephpleague_tactician
|
train
|
php
|
1f4d7d7bdd31c7708679051b715d7c6b9d5065e0
|
diff --git a/datatableview/columns.py b/datatableview/columns.py
index <HASH>..<HASH> 100644
--- a/datatableview/columns.py
+++ b/datatableview/columns.py
@@ -288,19 +288,20 @@ class Column(six.with_metaclass(ColumnMetaclass)):
# We avoid making changes that the Django ORM can already do for us
multi_terms = None
- if lookup_type == "in":
- in_bits = re.split(r',\s*', term)
- if len(in_bits) > 1:
- multi_terms = in_bits
- else:
- term = None
+ if isinstance(lookup_type, six.text_type):
+ if lookup_type == "in":
+ in_bits = re.split(r',\s*', term)
+ if len(in_bits) > 1:
+ multi_terms = in_bits
+ else:
+ term = None
- if lookup_type == "range":
- range_bits = re.split(r'\s*-\s*', term)
- if len(range_bits) == 2:
- multi_terms = range_bits
- else:
- term = None
+ if lookup_type == "range":
+ range_bits = re.split(r'\s*-\s*', term)
+ if len(range_bits) == 2:
+ multi_terms = range_bits
+ else:
+ term = None
if multi_terms:
return filter(None, (self.prep_search_value(multi_term, lookup_type) for multi_term in multi_terms))
|
Fix booleans in searches
Removed assumption in Column base class that ``term`` is a string type,
since subclasses might have cleaned the term in their own way. Closes
#<I> and #<I>.
|
pivotal-energy-solutions_django-datatable-view
|
train
|
py
|
a381b24277b47a133c5245ca27d45ebd7576f1f9
|
diff --git a/Document/Index/ArticleIndexer.php b/Document/Index/ArticleIndexer.php
index <HASH>..<HASH> 100644
--- a/Document/Index/ArticleIndexer.php
+++ b/Document/Index/ArticleIndexer.php
@@ -198,7 +198,7 @@ class ArticleIndexer implements IndexerInterface
$article->setChanged($document->getChanged());
$article->setCreated($document->getCreated());
$article->setAuthored($document->getAuthored());
- if ($document->getAuthor() && $author = $this->contactRepository->findById($document->getAuthor())) {
+ if ($document->getAuthor() && $author = $this->contactRepository->find($document->getAuthor())) {
$article->setAuthorFullName($author->getFullName());
$article->setAuthorId($author->getId());
}
|
find user with find function of repository (#<I>)
|
sulu_SuluArticleBundle
|
train
|
php
|
4aded8e3c7bd5f39bb02632367936c5f4019a7e1
|
diff --git a/lib/redmine_web_server.js b/lib/redmine_web_server.js
index <HASH>..<HASH> 100644
--- a/lib/redmine_web_server.js
+++ b/lib/redmine_web_server.js
@@ -783,7 +783,7 @@ RedmineWebServer.prototype.load_all_tickets = function(options, callback) {
} else {
var async = require("async");
assert(_.isArray(self._issues_light));
- async.map( self._issues_light , function(issue,inner_callback){
+ async.mapLimit(self._issues_light , 2, function(issue,inner_callback){
self.refreshTicketInfo(issue.id,function(err,data) {
//xx console.log(" reloading ticket done".yellow,issue.id);
|
avoid too many request at once on the redmine server to prevent failure
|
erossignon_redmine-api
|
train
|
js
|
c09294036ac1806d7dadb56fb7dffb78a5285b7e
|
diff --git a/src/main/java/water/api/GLM.java b/src/main/java/water/api/GLM.java
index <HASH>..<HASH> 100644
--- a/src/main/java/water/api/GLM.java
+++ b/src/main/java/water/api/GLM.java
@@ -208,9 +208,9 @@ public class GLM extends Request {
LSMSolver lsm = null;
switch(_lsmSolver.value()){
case AUTO:
- lsm = data.expandedSz() < 1000?
- new ADMMSolver(_lambda.value(),_alpha.value()):
- new GeneralizedGradientSolver(_lambda.value(),_alpha.value());
+ lsm = //data.expandedSz() < 1000?
+ new ADMMSolver(_lambda.value(),_alpha.value());//:
+ //new GeneralizedGradientSolver(_lambda.value(),_alpha.value());
break;
case ADMM:
lsm = new ADMMSolver(_lambda.value(),_alpha.value());
|
changed default choice of lsm solver for datasets with > <I> cols to be admm (I briefly changed this to be gg as it usually performs better, but it fails on some simple datasets (titanic).)
|
h2oai_h2o-2
|
train
|
java
|
5827344a004971a0b25fa24e50ccce35d01d3c11
|
diff --git a/lxd/project/permissions.go b/lxd/project/permissions.go
index <HASH>..<HASH> 100644
--- a/lxd/project/permissions.go
+++ b/lxd/project/permissions.go
@@ -816,15 +816,12 @@ func isContainerLowLevelOptionForbidden(key string) bool {
// Return true if a low-level VM option is forbidden.
func isVMLowLevelOptionForbidden(key string) bool {
- if shared.StringInSlice(key, []string{
+ return shared.StringInSlice(key, []string{
"boot.host_shutdown_timeout",
"limits.memory.hugepages",
"raw.idmap",
"raw.qemu",
- }) {
- return true
- }
- return false
+ })
}
// AllowInstanceUpdate returns an error if any project-specific limit or
|
lxd/project: Fixes gosimple lint errors.
|
lxc_lxd
|
train
|
go
|
162f25eae1ba96ccba2d3fad542d6d1d2a480096
|
diff --git a/directives/directions.js b/directives/directions.js
index <HASH>..<HASH> 100644
--- a/directives/directions.js
+++ b/directives/directions.js
@@ -107,6 +107,11 @@
var events = parser.getEvents(scope, filtered);
var attrsToObserve = parser.getAttrsToObserve(orgAttrs);
+ var attrsToObserve = [];
+ if (!filtered.noWatcher) {
+ attrsToObserve = parser.getAttrsToObserve(orgAttrs);
+ }
+
var renderer = getDirectionsRenderer(options, events);
mapController.addObject('directionsRenderers', renderer);
|
direction's noWatcher not respected
|
allenhwkim_angularjs-google-maps
|
train
|
js
|
99e5e1ae5cb1257facc04c7873db74e4b809888a
|
diff --git a/tests/JsonReverseTest.php b/tests/JsonReverseTest.php
index <HASH>..<HASH> 100644
--- a/tests/JsonReverseTest.php
+++ b/tests/JsonReverseTest.php
@@ -65,8 +65,12 @@ class JsonReverseTest extends TestCase
/**
* @group json-conversion-test
*/
+/**
+ * @TODO resolve issues which cause this test to fail
+ *
public function testStats()
{
$this->checkReverseConversion('stats');
}
+ */
}
|
Comment out failing test - issues require changes to json to csv conversion
|
ozdemirburak_json-csv
|
train
|
php
|
934865ebc329ccaad8cd6653cd2dcede1342b537
|
diff --git a/spyder/plugins/completion/kite/utils/install.py b/spyder/plugins/completion/kite/utils/install.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/completion/kite/utils/install.py
+++ b/spyder/plugins/completion/kite/utils/install.py
@@ -165,7 +165,11 @@ class KiteInstallationThread(QThread):
self._execute_mac_installation(installer_path)
else:
self._execute_linux_installation(installer_path)
- os.remove(installer_path)
+ try:
+ os.remove(installer_path)
+ except Exception:
+ # Handle errors while removing installer file
+ pass
self._change_installation_status(status=self.FINISHED)
def run(self):
|
Kite Completion: Add try when removing installer
|
spyder-ide_spyder
|
train
|
py
|
8a213452cc998b11cc6e320c7bf2d304185c000e
|
diff --git a/dev/com.ibm.ws.concurrent.mp_fat/test-applications/MPConcurrentApp/src/concurrent/mp/fat/web/MPConcurrentTestServlet.java b/dev/com.ibm.ws.concurrent.mp_fat/test-applications/MPConcurrentApp/src/concurrent/mp/fat/web/MPConcurrentTestServlet.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.concurrent.mp_fat/test-applications/MPConcurrentApp/src/concurrent/mp/fat/web/MPConcurrentTestServlet.java
+++ b/dev/com.ibm.ws.concurrent.mp_fat/test-applications/MPConcurrentApp/src/concurrent/mp/fat/web/MPConcurrentTestServlet.java
@@ -3380,7 +3380,7 @@ public class MPConcurrentTestServlet extends FATServlet {
CompletableFuture<Void> cf = noContextExecutor
.runAsync(action)
- .thenRun(() -> {
+ .thenRunAsync(() -> {
try {
Object result = InitialContext.doLookup("java:comp/env/executorRef");
fail("noContextExecutor should be used as default asynchronous execution facility, and therefore, " +
|
Issue #<I> fix intermittent issue in test: action can run inline where context already on thread
|
OpenLiberty_open-liberty
|
train
|
java
|
41e525e1cbff323f5d23509042a4ec8ae0297be0
|
diff --git a/test/ldap_test.rb b/test/ldap_test.rb
index <HASH>..<HASH> 100644
--- a/test/ldap_test.rb
+++ b/test/ldap_test.rb
@@ -37,6 +37,6 @@ class GitHubLdapTest < GitHub::Ldap::Test
include GitHubLdapTestCases
end
-class GitHubLdapUnauthenticatedTest < GitHub::Ldap::Test
+class GitHubLdapUnauthenticatedTest < GitHub::Ldap::UnauthenticatedTest
include GitHubLdapTestCases
end
|
Run the basic ldap tests authenticated and unauthenticated.
|
github_github-ldap
|
train
|
rb
|
e5bd43f95f330edab9a08dcb59df9d51e3d2bca4
|
diff --git a/src/sap.m/src/sap/m/UploadCollection.js b/src/sap.m/src/sap/m/UploadCollection.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/UploadCollection.js
+++ b/src/sap.m/src/sap/m/UploadCollection.js
@@ -882,6 +882,9 @@ sap.ui.define(['jquery.sap.global', './MessageBox', './MessageToast', './library
var that = this;
this._oFileUploader.removeAllHeaderParameters();
this._oFileUploader.removeAllParameters();
+
+ this.fireChange(oEvent);
+
var aHeaderParametersAfter = this.getAggregation("headerParameters");
var aParametersAfter = this.getAggregation("parameters");
var aUploadedFiles = this._getUploadedFilesFromUploaderEvent(oEvent);
|
[FIX] sap.m.UploadCollection change event
Change event triggered at selection of a file.
Change-Id: I<I>f5f<I>f<I>e0ac3ef6edaa<I>a<I>
|
SAP_openui5
|
train
|
js
|
0fe411fbb41671577fbc167891c4076b75b998ce
|
diff --git a/optlang/interface.py b/optlang/interface.py
index <HASH>..<HASH> 100644
--- a/optlang/interface.py
+++ b/optlang/interface.py
@@ -709,7 +709,7 @@ class Model(object):
constraint_id = constraint.name
if sloppy is False:
for var in constraint.variables:
- if var.name not in self.variables:
+ if var.problem is not self:
self._add_variable(var)
try:
self._variables_to_constraints_mapping[var.name].add(constraint_id)
|
Check if variable is already in model by variable.problem is not self instead of doing a lookup in model.variables
|
biosustain_optlang
|
train
|
py
|
448a55953c0fba1a33bc8fa59b14540ba345fcfa
|
diff --git a/lib/MarathonEventBusClient.js b/lib/MarathonEventBusClient.js
index <HASH>..<HASH> 100644
--- a/lib/MarathonEventBusClient.js
+++ b/lib/MarathonEventBusClient.js
@@ -108,10 +108,9 @@ MarathonEventBusClient.prototype.subscribe = function () {
url = self.options.marathonProtocol + "://" + self.options.marathonHost + ":" + self.options.marathonPort+self.options.marathonUri;
// Allow unauthorized HTTPS requests
- let eventSourceInitDict = {
- self.options.marathonHeaders,
- rejectUnauthorized: false
- };
+ let eventSourceInitDict = self.options.marathonHeaders;
+
+ eventSourceInitDict.rejectUnauthorized = false;
// Create EventSource for Marathon /v2/events endpoint
self.es = new EventSource(url, eventSourceInitDict);
|
eventSourceInitDict as the marathonHeaders object to customize the request
|
tobilg_marathon-event-bus-client
|
train
|
js
|
bfdf7b632375577e268b2364f0d426f13018f320
|
diff --git a/config.js b/config.js
index <HASH>..<HASH> 100644
--- a/config.js
+++ b/config.js
@@ -3,6 +3,7 @@ module.exports = {
dbname : 'geonames',
host : '127.0.0.1',
port : 27017,
+ collection : 'postal_codes',
// Uncomment auth section below if your mongo db requires authentication:
// auth : {
// name : '',
|
added collection name as a configuration param
|
cbumgard_node-mongo-postal
|
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.