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
|
---|---|---|---|---|---|
930a8f650be094e1ea244a1d1e764178522cb15b
|
diff --git a/spec/support/webhooks.rb b/spec/support/webhooks.rb
index <HASH>..<HASH> 100644
--- a/spec/support/webhooks.rb
+++ b/spec/support/webhooks.rb
@@ -1,9 +1,3 @@
-RSpec.configure do |config|
- config.before(:each) do
- $events = []
- end
-end
-
Thread.new do
# Not explicitly requiring Thin::Server occasionally results in
# Thin::Server.start not being defined.
@@ -31,4 +25,10 @@ end.tap do |thread|
at_exit { thread.exit }
end
-PusherFake.configuration.webhooks = ["http://127.0.0.1:8082"]
+RSpec.configure do |config|
+ config.before(:each) do
+ $events = []
+
+ PusherFake.configuration.webhooks = ["http://127.0.0.1:8082"]
+ end
+end
|
Ensure webhook URLs are always set to the fake server when testing.
|
tristandunn_pusher-fake
|
train
|
rb
|
73ed33ed967ec94c911aea967a0a2b414b2b2c71
|
diff --git a/website/sphinx/conf.py b/website/sphinx/conf.py
index <HASH>..<HASH> 100644
--- a/website/sphinx/conf.py
+++ b/website/sphinx/conf.py
@@ -50,6 +50,7 @@ coverage_ignore_functions = [
]
html_static_path = [os.path.abspath("../static")]
+html_theme = 'default'
html_style = "sphinx.css"
highlight_language = "none"
html_theme_options = dict(
|
sphinx: Set the html_theme variable explicitly.
This should let our custom css show on readthedocs.org.
|
tornadoweb_tornado
|
train
|
py
|
6bae234ef1c33c55e65bce9c3a4802f5d15ab7a4
|
diff --git a/docs/src/layouts/doc-layout/use-search.js b/docs/src/layouts/doc-layout/use-search.js
index <HASH>..<HASH> 100644
--- a/docs/src/layouts/doc-layout/use-search.js
+++ b/docs/src/layouts/doc-layout/use-search.js
@@ -45,7 +45,7 @@ export default function useSearch (scope, $q, $route) {
indexUid: 'quasar-v2',
inputSelector: '.doc-search input',
// layout: 'simple',
- debug: true,
+ debug: false,
meilisearchOptions: {
limit: 7
},
|
chore(docs): search - one further tweak
|
quasarframework_quasar
|
train
|
js
|
c8b66ad46f2d0a7e12590fa0a6d050a56f31bbe3
|
diff --git a/bonecp/src/main/java/com/jolbox/bonecp/ConnectionHandle.java b/bonecp/src/main/java/com/jolbox/bonecp/ConnectionHandle.java
index <HASH>..<HASH> 100755
--- a/bonecp/src/main/java/com/jolbox/bonecp/ConnectionHandle.java
+++ b/bonecp/src/main/java/com/jolbox/bonecp/ConnectionHandle.java
@@ -491,11 +491,23 @@ public class ConnectionHandle implements Connection,Serializable{
pool.getFinalizableRefs().remove(this.connection);
}
-
- ConnectionHandle handle = this.recreateConnectionHandle();
- this.pool.connectionStrategy.cleanupConnection(this, handle);
- this.pool.releaseConnection(handle);
-
+ ConnectionHandle handle = null;
+
+ //recreate can throw a SQLException in constructor on recreation
+ try {
+ handle = this.recreateConnectionHandle();
+ this.pool.connectionStrategy.cleanupConnection(this, handle);
+ this.pool.releaseConnection(handle);
+ } catch(SQLException e) {
+ //check if the connection was already closed by the recreation
+ if (!isClosed()) {
+ this.pool.connectionStrategy.cleanupConnection(this, handle);
+ this.pool.releaseConnection(this);
+ }
+ throw e;
+ }
+
+
if (this.doubleCloseCheck){
this.doubleCloseException = this.pool.captureStackTrace(CLOSED_TWICE_EXCEPTION_MESSAGE);
}
|
Fixed an issue with ConnetionHandle.close where the recreation of ConnectionHandle and a call to .setAutoCommit was throwing an exception and the connection proceeding the code was not being released.
|
wwadge_bonecp
|
train
|
java
|
24e89da90957fd8e9b06fb156d7e00fedc4bc962
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -81,7 +81,7 @@ todo_include_todos = False
# autodoc configuration
autodoc_default_options = {
- 'members': True,
+ 'members': None,
'member-order': 'bysource',
'special-members': '__init__'}
|
Try to fix RTD docs build
|
yatiml_yatiml
|
train
|
py
|
a0fe851f6a83626464475df804138d94f6e6a441
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,4 +12,5 @@ setup(name = "createsend",
url = "http://campaignmonitor.github.io/createsend-python/",
license = "MIT",
keywords = "createsend campaign monitor email",
- packages = ['createsend'])
+ packages = ['createsend'],
+ package_data = {'createsend': ['cacert.pem']})
|
Fixed setup.py so that cacert.pem is included when createsend package is installed.
|
campaignmonitor_createsend-python
|
train
|
py
|
4361b23420ac0d23a5abcd821252f07869f77a13
|
diff --git a/core/DataAccess/ArchiveSelector.php b/core/DataAccess/ArchiveSelector.php
index <HASH>..<HASH> 100644
--- a/core/DataAccess/ArchiveSelector.php
+++ b/core/DataAccess/ArchiveSelector.php
@@ -332,14 +332,18 @@ class ArchiveSelector
protected static function deleteArchiveIds(Date $date, $idArchivesToDelete)
{
- $query = "DELETE FROM %s WHERE idarchive IN (" . implode(',', $idArchivesToDelete) . ")";
-
- Db::query(sprintf($query, ArchiveTableCreator::getNumericTable($date)));
- try {
- Db::query(sprintf($query, ArchiveTableCreator::getBlobTable($date)));
- } catch (Exception $e) {
- // Individual blob tables could be missing
+ $batches = array_chunk($idArchivesToDelete, 1000);
+ foreach($batches as $idsToDelete) {
+ $query = "DELETE FROM %s WHERE idarchive IN (" . implode(',', $idsToDelete) . ")";
+
+ Db::query(sprintf($query, ArchiveTableCreator::getNumericTable($date)));
+ try {
+ Db::query(sprintf($query, ArchiveTableCreator::getBlobTable($date)));
+ } catch (Exception $e) {
+ // Individual blob tables could be missing
+ }
}
+
}
protected static function getTemporaryArchiveIdsOlderThan(Date $date, $purgeArchivesOlderThan)
|
fixes #<I> Delete archives by batch of <I> using array_chunk
|
matomo-org_matomo
|
train
|
php
|
1e3cf4865dbc547debdbe813de568cb598ecb12b
|
diff --git a/lib/xcov/model/base.rb b/lib/xcov/model/base.rb
index <HASH>..<HASH> 100644
--- a/lib/xcov/model/base.rb
+++ b/lib/xcov/model/base.rb
@@ -11,7 +11,7 @@ module Xcov
attr_accessor :id
def create_displayable_coverage
- return "" if @ignored
+ return "-" if @ignored
"%.0f%%" % [(@coverage*100)]
end
|
Use “-” for displayable coverage for ignored files, instead of an empty string
My intention here is primarily to improve Markdown output, so a similar change (transforming an empty string to “-”) could also be made in `markdown_value` in `source.rb`.
|
nakiostudio_xcov
|
train
|
rb
|
87dd85a220e0396da763609a52b80762c9811678
|
diff --git a/tests/integration/utils/testprogram.py b/tests/integration/utils/testprogram.py
index <HASH>..<HASH> 100644
--- a/tests/integration/utils/testprogram.py
+++ b/tests/integration/utils/testprogram.py
@@ -14,6 +14,7 @@ import logging
import os
import shutil
import signal
+import socket
import subprocess
import sys
import tempfile
@@ -590,8 +591,24 @@ class TestSaltProgram(six.with_metaclass(TestSaltProgramMeta, TestProgram)):
'log_dir',
'script_dir',
])
+
+ pub_port = 4505
+ ret_port = 4506
+ for port in [pub_port, ret_port]:
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ try:
+ connect = sock.bind(('localhost', port))
+ except:
+ # these ports are already in use, use different ones
+ pub_port = 4606
+ ret_port = 4607
+ break
+ sock.close()
+
config_base = {
'root_dir': '{test_dir}',
+ 'publish_port': pub_port,
+ 'ret_port': ret_port,
}
configs = {}
config_dir = os.path.join('etc', 'salt')
|
Use different pub and ret ports for testprogram integration tests
|
saltstack_salt
|
train
|
py
|
2341e2780d8a5a87f42422bd7ac819c0384a4b15
|
diff --git a/libkbfs/kbfs_ops.go b/libkbfs/kbfs_ops.go
index <HASH>..<HASH> 100644
--- a/libkbfs/kbfs_ops.go
+++ b/libkbfs/kbfs_ops.go
@@ -217,12 +217,23 @@ func (fs *KBFSOpsStandard) GetOrCreateRootNode(
return nil, EntryInfo{}, err
}
}
- // we might not be able to read the metadata if we aren't in the key group yet.
+ fb := FolderBranch{Tlf: md.ID, Branch: branch}
+
+ // we might not be able to read the metadata if we aren't in the
+ // key group yet.
if err := md.isReadableOrError(ctx, fs.config); err != nil {
+ fs.opsLock.Lock()
+ defer fs.opsLock.Unlock()
+ // If we already have an FBO for this ID, trigger a rekey
+ // prompt in the background, if possible.
+ if ops, ok := fs.ops[fb]; ok {
+ fs.log.CDebugf(ctx, "Triggering a paper prompt rekey on folder "+
+ "access due to unreadable MD for %s", h.GetCanonicalPath())
+ go ops.rekeyWithPrompt()
+ }
return nil, EntryInfo{}, err
}
- fb := FolderBranch{Tlf: md.ID, Branch: branch}
ops := fs.getOpsByHandle(ctx, h, fb)
var created bool
if branch == MasterBranch {
|
kbfs_ops: user access should spawn a rekey-with-prompt request
Instead of being stuck waiting for the <I>-minute-timeout.
Issue: KBFS-<I>
|
keybase_client
|
train
|
go
|
63aea6d116c6dbca4d6f0bd8533635368a8d25d0
|
diff --git a/pyzotero/zotero.py b/pyzotero/zotero.py
index <HASH>..<HASH> 100644
--- a/pyzotero/zotero.py
+++ b/pyzotero/zotero.py
@@ -326,7 +326,7 @@ class Zotero(object):
params['format'] = 'atom'
# TODO: rewrite format=atom, content=json request
- self.url_params = urlencode(params)
+ self.url_params = urlencode(params, doseq=True)
def _build_query(self, query_string, no_params=False):
"""
|
Multiple tags can be searched for by passing them in as a list
|
urschrei_pyzotero
|
train
|
py
|
17b32e0aa0f944d4a4e62ed8697859f8c3a7be6f
|
diff --git a/api_test.go b/api_test.go
index <HASH>..<HASH> 100644
--- a/api_test.go
+++ b/api_test.go
@@ -250,6 +250,10 @@ func TestManifestAPI(t *testing.T) {
t.Fatalf("should have received two invalid digest errors: %v", respErrs)
}
+ // TODO(stevvooe): Add a test case where we take a mostly valid registry,
+ // tamper with the content and ensure that we get a unverified manifest
+ // error.
+
// Push 2 random layers
expectedLayers := make(map[digest.Digest]io.ReadSeeker)
|
Add TODO about manifest tampering test
|
docker_distribution
|
train
|
go
|
189c8edc65f69115ee9cf21b88e159f2665d7329
|
diff --git a/src/base/DelegateInputLabelMixin.js b/src/base/DelegateInputLabelMixin.js
index <HASH>..<HASH> 100644
--- a/src/base/DelegateInputLabelMixin.js
+++ b/src/base/DelegateInputLabelMixin.js
@@ -91,6 +91,8 @@ export default function DelegateInputLabelMixin(Base) {
// those attributes from the outside (which should update state).
if (changed.ariaLabel && !this[state].removingAriaAttribute) {
if (this.getAttribute("aria-label")) {
+ const { ariaLabel } = this[state];
+ this.setAttribute("aria-label-delegated", ariaLabel);
this[setState]({ removingAriaAttribute: true });
this.removeAttribute("aria-label");
}
|
Leave aria-label-delegated attribute behind to aid dev/debugging.
|
elix_elix
|
train
|
js
|
eab6669bcef53e1b824dbb3c8b707fbfc5e7bb81
|
diff --git a/test/lib/tasks/taskRepository.js b/test/lib/tasks/taskRepository.js
index <HASH>..<HASH> 100644
--- a/test/lib/tasks/taskRepository.js
+++ b/test/lib/tasks/taskRepository.js
@@ -3,7 +3,7 @@ const test = require("ava");
const taskRepository = require("../../../lib/tasks/taskRepository");
-test("task retrieval", (t) => {
+test.serial("task retrieval", (t) => {
const taskPath = path.join(__dirname, "..", "..", "..", "lib", "tasks", "escapeNonAsciiCharacters");
taskRepository.addTask({
name: "myTask",
@@ -24,7 +24,7 @@ test("Unknown task retrieval", (t) => {
t.deepEqual(error.message, "taskRepository: Unknown Task not-existing", "Correct exception");
});
-test("Duplicate task", (t) => {
+test.serial("Duplicate task", (t) => {
const myTask = {};
taskRepository.addTask("myTask", myTask);
const error = t.throws(() => {
|
[INTERNAL] taskRepository tests: Make tests that might inflence each other serial
|
SAP_ui5-builder
|
train
|
js
|
c9d620d24df02ec5f4a5af4ac81171ad67aa437c
|
diff --git a/src/OIPPublisher.js b/src/OIPPublisher.js
index <HASH>..<HASH> 100644
--- a/src/OIPPublisher.js
+++ b/src/OIPPublisher.js
@@ -209,6 +209,11 @@ class OIPPublisher {
return builtHex
}
+ /**
+ * Builds the inputs and outputs to form a valid transaction hex
+ * @param {string} [floData=""] - defaults to an empty string
+ * @return {Promise<Object>} selected - Returns the selected inputs to use for the transaction hex
+ */
async buildInputsAndOutputs(floData = "") {
let utxo
try {
|
docs for buildInsAndOuts func
|
oipwg_oip-index
|
train
|
js
|
0224547f5299d91f1937b77e3c47aaf8cd1ce150
|
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
@@ -100,8 +100,8 @@ module ActiveRecord
statements = statements.map { |sql| transform_query(sql) }
combine_multi_statements(statements).each do |statement|
raw_execute(statement, name)
+ @connection.abandon_results!
end
- @connection.abandon_results!
end
def default_insert_value(column)
|
abandon_results! after every multi statement batch
|
rails_rails
|
train
|
rb
|
d32b97a23ce611a9b0778fe61e7fd41777c408aa
|
diff --git a/salt/beacons/network_info.py b/salt/beacons/network_info.py
index <HASH>..<HASH> 100644
--- a/salt/beacons/network_info.py
+++ b/salt/beacons/network_info.py
@@ -1,19 +1,10 @@
-# -*- coding: utf-8 -*-
"""
Beacon to monitor statistics from ethernet adapters
.. versionadded:: 2015.5.0
"""
-
-# Import Python libs
-from __future__ import absolute_import, unicode_literals
-
import logging
-from salt.ext.six.moves import map
-
-# Import third party libs
-# pylint: disable=import-error
try:
import salt.utils.psutil_compat as psutil
@@ -22,8 +13,6 @@ except ImportError:
HAS_PSUTIL = False
-# pylint: enable=import-error
-
log = logging.getLogger(__name__)
__virtualname__ = "network_info"
|
Drop Py2 and six on salt/beacons/network_info.py
|
saltstack_salt
|
train
|
py
|
4ea7f03bab0271fc73165b9c35cb6b44bb37615c
|
diff --git a/src/SALib/sample/morris/__init__.py b/src/SALib/sample/morris/__init__.py
index <HASH>..<HASH> 100644
--- a/src/SALib/sample/morris/__init__.py
+++ b/src/SALib/sample/morris/__init__.py
@@ -52,7 +52,7 @@ __all__ = ['sample']
def sample(problem, N, num_levels=4, optimal_trajectories=None,
- local_optimization=True):
+ local_optimization=True, seed=None):
"""Generate model inputs using the Method of Morris
Returns a NumPy matrix containing the model inputs required for Method of
@@ -87,6 +87,9 @@ def sample(problem, N, num_levels=4, optimal_trajectories=None,
of Morris. The resulting matrix has :math:`(G/D+1)*N/T` rows and
:math:`D` columns, where :math:`D` is the number of parameters.
"""
+ if seed:
+ np.random.seed(seed)
+
if not num_levels % 2 == 0:
warnings.warn("num_levels should be an even number, sample may be biased")
if problem.get('groups'):
|
Add missing seed option for morris sampling
|
SALib_SALib
|
train
|
py
|
caf6bf264715cc340bab0354cc6fc9c45712de0d
|
diff --git a/src/engine/passthrough_engine.go b/src/engine/passthrough_engine.go
index <HASH>..<HASH> 100644
--- a/src/engine/passthrough_engine.go
+++ b/src/engine/passthrough_engine.go
@@ -62,7 +62,7 @@ func (self *PassthroughEngine) YieldSeries(seriesIncoming *protocol.Series) bool
self.limiter.calculateLimitAndSlicePoints(seriesIncoming)
if len(seriesIncoming.Points) == 0 {
- log.Error("Not sent == 0")
+ log.Debug("Not sent == 0")
return false
}
|
Change log level on message of not sending points because there are 0 to yield to debug
|
influxdata_influxdb
|
train
|
go
|
c711a9f4beb95d58c18fd57f63b07516ce21227b
|
diff --git a/src/cli/cms/templates/handlebars/setVariable.js b/src/cli/cms/templates/handlebars/setVariable.js
index <HASH>..<HASH> 100644
--- a/src/cli/cms/templates/handlebars/setVariable.js
+++ b/src/cli/cms/templates/handlebars/setVariable.js
@@ -9,7 +9,7 @@ export default function setVariable(varName, varValue, options){
if (varValue === 'false') {
varValue = false
}
- if (varValue.indexOf('{') > -1) {
+ if (typeof varValue == 'string' && varValue.indexOf('{') > -1) {
varValue = JSON.parse(varValue)
}
|
fix: BC break on setVariable HBS Helper
|
abecms_abecms
|
train
|
js
|
03b41d582f71d175168e88dc5942217a1bb1a589
|
diff --git a/src/Spryker/Zed/ProductPackagingUnitDataImport/Business/ProductPackagingUnitDataImportBusinessFactory.php b/src/Spryker/Zed/ProductPackagingUnitDataImport/Business/ProductPackagingUnitDataImportBusinessFactory.php
index <HASH>..<HASH> 100644
--- a/src/Spryker/Zed/ProductPackagingUnitDataImport/Business/ProductPackagingUnitDataImportBusinessFactory.php
+++ b/src/Spryker/Zed/ProductPackagingUnitDataImport/Business/ProductPackagingUnitDataImportBusinessFactory.php
@@ -13,7 +13,7 @@ use Spryker\Zed\ProductPackagingUnitDataImport\Business\Model\ProductPackagingUn
/**
* @method \Spryker\Zed\ProductPackagingUnitDataImport\ProductPackagingUnitDataImportConfig getConfig()
- * @method \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerTransactionAware createTransactionAwareDataSetStepBroker()
+ * @method \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBrokerTransactionAware createTransactionAwareDataSetStepBroker($bulkSize = null)
* @method \Spryker\Zed\DataImport\Business\Model\DataImporter getCsvDataImporterFromConfig(\Generated\Shared\Transfer\DataImporterConfigurationTransfer $dataImporterConfigurationTransfer)
*/
class ProductPackagingUnitDataImportBusinessFactory extends DataImportBusinessFactory
|
TE-<I> Update psalm baselines, fix issues. (#<I>)
* TE-<I> Update psalm baselines, fix issues.
|
spryker_product-packaging-unit-data-import
|
train
|
php
|
24669876a1121aa9d07185b106dbcb63f6feb805
|
diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py
index <HASH>..<HASH> 100644
--- a/salt/modules/saltutil.py
+++ b/salt/modules/saltutil.py
@@ -17,7 +17,19 @@ import fnmatch
import time
import sys
import copy
-from urllib2 import URLError
+
+# Import 3rd-party libs
+# pylint: disable=import-error
+try:
+ import esky
+ from esky import EskyVersionError
+ HAS_ESKY = True
+except ImportError:
+ HAS_ESKY = False
+# pylint: disable=no-name-in-module
+from salt.ext.six import string_types
+from salt.ext.six.moves.urllib.error import URLError
+# pylint: enable=import-error,no-name-in-module
# Import salt libs
import salt
@@ -33,18 +45,9 @@ import salt.wheel
from salt.exceptions import (
SaltReqTimeoutError, SaltRenderError, CommandExecutionError
)
-from salt.ext.six import string_types
__proxyenabled__ = ['*']
-# Import third party libs
-try:
- import esky
- from esky import EskyVersionError
- HAS_ESKY = True
-except ImportError:
- HAS_ESKY = False
-
log = logging.getLogger(__name__)
|
Use `URLError` from six
|
saltstack_salt
|
train
|
py
|
6cdb2f024d4ac7c8ea0cd66b9d6a22d535d1702b
|
diff --git a/spec/lib/appsignal/extension_spec.rb b/spec/lib/appsignal/extension_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/appsignal/extension_spec.rb
+++ b/spec/lib/appsignal/extension_spec.rb
@@ -107,7 +107,7 @@ describe Appsignal::Extension do
end
it "should have a increment_counter method" do
- subject.increment_counter("key", 1, Appsignal::Extension.data_map_new)
+ subject.increment_counter("key", 1.0, Appsignal::Extension.data_map_new)
end
it "should have a add_distribution_value method" do
|
Fix increment_counter extension spec
Pass in float as it's the new data format for the extension. No need to
cast it in the extension as `Appsignal.increment_counter` does that
normally. Users won't call the extension directly.
|
appsignal_appsignal-ruby
|
train
|
rb
|
b1d4fafa18628cfaf4ed284d20888c95d58fb52a
|
diff --git a/django_markdown/urls.py b/django_markdown/urls.py
index <HASH>..<HASH> 100644
--- a/django_markdown/urls.py
+++ b/django_markdown/urls.py
@@ -1,9 +1,18 @@
""" Define preview URL. """
+from django import VERSION
from django.conf.urls import url
from .views import preview
-urlpatterns = [
- url('preview/$', preview, name='django_markdown_preview')
-]
+
+if VERSION >= (1, 8):
+ urlpatterns = [
+ url('preview/$', preview, name='django_markdown_preview')
+ ]
+else:
+ # django <= 1.7 compatibility
+ from django.conf.urls import patterns
+ urlpatterns = patterns(
+ '', url('preview/$', preview, name='django_markdown_preview')
+ )
|
fix urls.py
django.conf.urls.patterns will be depricated in django <I>
|
sv0_django-markdown-app
|
train
|
py
|
18f98464ff9ec7bf9dc64356e10144730721f112
|
diff --git a/guacamole-ext/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java b/guacamole-ext/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java
index <HASH>..<HASH> 100644
--- a/guacamole-ext/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java
+++ b/guacamole-ext/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java
@@ -47,7 +47,12 @@ import net.sourceforge.guacamole.GuacamoleServerException;
/**
* Simple utility class for reading properties from the guacamole.properties
- * file in the root of the classpath.
+ * file. The guacamole.properties file is preferably located in the servlet
+ * container's user's home directory, in a subdirectory called .guacamole, or
+ * in the directory set by the system property: guacamole.home.
+ *
+ * If none of those locations are possible, guacamole.properties will also
+ * be read from the root of the classpath.
*
* @author Michael Jumper
*/
|
Update docs to reflect new guacamole.properties location.
|
glyptodon_guacamole-client
|
train
|
java
|
f71ade67023795d289b700bc81341b0d83115161
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -33,7 +33,7 @@ import (
var flagIgnoreNoSec = flag.Bool("nosec", false, "Ignores #nosec comments when set")
// format output
-var flagFormat = flag.String("fmt", "text", "Set output format. Valid options are: json, csv, or text")
+var flagFormat = flag.String("fmt", "text", "Set output format. Valid options are: json, csv, html, or text")
// output file
var flagOutput = flag.String("out", "", "Set output file for results")
|
Update usage to indicate html is supported
|
securego_gosec
|
train
|
go
|
6f7508d73a081d724133f5841836a84c92a60148
|
diff --git a/shared/actions/platform-specific/index.desktop.js b/shared/actions/platform-specific/index.desktop.js
index <HASH>..<HASH> 100644
--- a/shared/actions/platform-specific/index.desktop.js
+++ b/shared/actions/platform-specific/index.desktop.js
@@ -252,7 +252,7 @@ const startOutOfDateCheckLoop = () =>
yield Saga.delay(3600 * 1000) // 1 hr
} catch (err) {
logger.warn('error getting update info: ', err)
- yield Saga.delay(60 * 1000) // 1 min
+ yield Saga.delay(3600 * 1000) // 1 hr
}
}
})
|
dont check this every minute (#<I>)
|
keybase_client
|
train
|
js
|
962fc0c845aac417862a61895fb1a5c054970f1f
|
diff --git a/lib/progne_tapera/enum_config.rb b/lib/progne_tapera/enum_config.rb
index <HASH>..<HASH> 100644
--- a/lib/progne_tapera/enum_config.rb
+++ b/lib/progne_tapera/enum_config.rb
@@ -8,14 +8,14 @@ module ProgneTapera::EnumConfig
module ClassMethods
- def enum(name = nil)
+ def enum(name = nil, localized_name = name)
name = enum_name(name).to_s
enumerations = Rails.configuration.enum[name]
raise ArgumentError.new "The enum.#{name} was not configured in the config/enum.yml file." if enumerations.blank?
enumerations.each do |key, value|
options = value.map { |k, v| [ k.to_sym, v ] }.to_h
code = options.delete :code
- options[:localized_name] = I18n.t "enum.#{name}.#{key}"
+ options[:localized_name] = I18n.t "enum.#{localized_name}.#{key}"
safe_add_item ProgneTapera::EnumItem.new(code, key, options)
end
end
|
1, Improve the Enum Config concern to support the customized enum i<I>n
name.
|
topbitdu_progne_tapera
|
train
|
rb
|
c113fc5a367ce3d099acc62a3879407a928302a0
|
diff --git a/example/example/api.py b/example/example/api.py
index <HASH>..<HASH> 100644
--- a/example/example/api.py
+++ b/example/example/api.py
@@ -8,7 +8,7 @@ from rest_framework.response import Response
from bananas.admin.api.schemas import schema, schema_serializer_method
from bananas.admin.api.schemas.decorators import tags
from bananas.admin.api.views import BananasAPI
-from bananas.compat import reverse
+from django.urls import reverse
from bananas.lazy import lazy_title
diff --git a/example/example/settings.py b/example/example/settings.py
index <HASH>..<HASH> 100644
--- a/example/example/settings.py
+++ b/example/example/settings.py
@@ -142,5 +142,5 @@ ADMIN = {
# CORS
# https://github.com/OttoYiu/django-cors-headers
-CORS_ORIGIN_WHITELIST = env.get_list("CORS_ORIGIN_WHITELIST", ["localhost:3000"])
+CORS_ORIGIN_WHITELIST = env.get_list("CORS_ORIGIN_WHITELIST", ["http://localhost:3000"])
CORS_ALLOW_CREDENTIALS = True
|
Update the example app to work with the latest version
|
5monkeys_django-bananas
|
train
|
py,py
|
ebae9a270436d29e4443d14998cb564901074ecf
|
diff --git a/lib/network_executive/scheduled_program.rb b/lib/network_executive/scheduled_program.rb
index <HASH>..<HASH> 100644
--- a/lib/network_executive/scheduled_program.rb
+++ b/lib/network_executive/scheduled_program.rb
@@ -6,8 +6,8 @@ module NetworkExecutive
@program, @occurrence, @remainder, @portion = *args
end
- def name
- program.name
+ def display_name
+ program.display_name
end
# Extends this scheduled program with another program of the same type.
diff --git a/spec/unit/scheduled_program_spec.rb b/spec/unit/scheduled_program_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/scheduled_program_spec.rb
+++ b/spec/unit/scheduled_program_spec.rb
@@ -7,10 +7,10 @@ describe NetworkExecutive::ScheduledProgram do
it { should respond_to(:remainder) }
it { should respond_to(:portion) }
- describe '#name' do
- let(:program) { double('program', name:'foo') }
+ describe '#display_name' do
+ let(:program) { double('program', display_name:'foo') }
- subject { described_class.new(program).name }
+ subject { described_class.new(program).display_name }
it { should == 'foo' }
end
|
Added more `display_name` support
|
dlindahl_network_executive
|
train
|
rb,rb
|
b12f816ea530ad52b7ab31cb2f64865513c0d001
|
diff --git a/tests/banner.js b/tests/banner.js
index <HASH>..<HASH> 100644
--- a/tests/banner.js
+++ b/tests/banner.js
@@ -83,7 +83,7 @@ describe( 'banner and comments support', () => {
banner: '/* hublabubla */'
}
};
- const rollupOptions = Object.assign( defaultRollupOptions, bannerOptions );
+ const rollupOptions = Object.assign( {}, defaultRollupOptions, bannerOptions );
const bundleOptions = Object.assign( {}, defaultBundleOptions, bannerOptions );
return createTransformTest( {
|
test(banner): make sure default options are immutable
|
Comandeer_rollup-plugin-babel-minify
|
train
|
js
|
e4efc3b7498a05992e9c40425877de9741dc4fc7
|
diff --git a/pyfolio/utils.py b/pyfolio/utils.py
index <HASH>..<HASH> 100644
--- a/pyfolio/utils.py
+++ b/pyfolio/utils.py
@@ -17,10 +17,10 @@ from __future__ import division
import warnings
-import empyrical
import numpy as np
import pandas as pd
from IPython.display import display
+from empyrical.utils import default_returns_func
from . import pos
from . import txn
@@ -161,7 +161,7 @@ def extract_rets_pos_txn_from_zipline(backtest):
# Settings dict to store functions/values that may
# need to be overridden depending on the users environment
SETTINGS = {
- 'returns_func': empyrical.utils.default_returns_func
+ 'returns_func': default_returns_func
}
|
direct import empyrical functions in utils
|
quantopian_pyfolio
|
train
|
py
|
0358c454766b7a1cbe1aa06b984a487633f675ba
|
diff --git a/contrib/node/src/python/pants/contrib/node/subsystems/node_distribution.py b/contrib/node/src/python/pants/contrib/node/subsystems/node_distribution.py
index <HASH>..<HASH> 100644
--- a/contrib/node/src/python/pants/contrib/node/subsystems/node_distribution.py
+++ b/contrib/node/src/python/pants/contrib/node/subsystems/node_distribution.py
@@ -33,7 +33,7 @@ class NodeDistribution(object):
register('--supportdir', advanced=True, default='bin/node',
help='Find the Node distributions under this dir. Used as part of the path to '
'lookup the distribution with --binary-util-baseurls and --pants-bootstrapdir')
- register('--version', advanced=True, default='0.12.7',
+ register('--version', advanced=True, default='4.0.0',
help='Node distribution version. Used as part of the path to lookup the '
'distribution with --binary-util-baseurls and --pants-bootstrapdir')
|
Upgrade to the re-merged Node.js/io.js as the default.
Testing Done:
Locally `./pants clean-all test contrib/node::`
CI went green here:
<URL>
|
pantsbuild_pants
|
train
|
py
|
51599695043f3e34b66e268d5bbdf84aa50a56f6
|
diff --git a/performance/benchmarks/bm_pickle.py b/performance/benchmarks/bm_pickle.py
index <HASH>..<HASH> 100644
--- a/performance/benchmarks/bm_pickle.py
+++ b/performance/benchmarks/bm_pickle.py
@@ -23,6 +23,7 @@ import six
from six.moves import xrange
if six.PY3:
long = int
+IS_PYPY = perf.python_implementation() == 'pypy'
__author__ = "[email protected] (Collin Winter)"
@@ -272,7 +273,7 @@ if __name__ == "__main__":
if options.pure_python:
name += "_pure_python"
- if not options.pure_python:
+ if not (options.pure_python or IS_PYPY):
# C accelerators are enabled by default on 3.x
if six.PY2:
import cPickle as pickle
|
COMPAT: PyPy does not have c-accelerators for pickle (#<I>)
COMPAT: PyPy does not have c-accelerators for pickle.
|
python_performance
|
train
|
py
|
635bce49e8d1d05e4e339399f30ad2d6ca81a769
|
diff --git a/src/Sk/SmartId/Api/Data/PropertyMapper.php b/src/Sk/SmartId/Api/Data/PropertyMapper.php
index <HASH>..<HASH> 100644
--- a/src/Sk/SmartId/Api/Data/PropertyMapper.php
+++ b/src/Sk/SmartId/Api/Data/PropertyMapper.php
@@ -69,7 +69,6 @@ abstract class PropertyMapper
/**
* @param string $key
* @param mixed $value
- * @throws Exception
* @return $this
*/
public function __set( $key, $value )
@@ -93,10 +92,6 @@ abstract class PropertyMapper
$this->{$resultingKey} = $value;
}
}
- else
- {
- throw new Exception( 'Undefined property (' . $key . ')!' );
- }
return $this;
}
|
DDS-<I> More properties available from newer PHP version
Removed _set method exception if property can not be mapped
|
SK-EID_smart-id-php-client
|
train
|
php
|
a3845fe4a5bcac0e6107be6f0d494b72c958c3c0
|
diff --git a/lib/resque/version.rb b/lib/resque/version.rb
index <HASH>..<HASH> 100644
--- a/lib/resque/version.rb
+++ b/lib/resque/version.rb
@@ -1,3 +1,3 @@
module Resque
- Version = VERSION = '1.23.1'
+ Version = VERSION = '1.24.1'
end
|
Bumping version to <I>
|
resque_resque
|
train
|
rb
|
5647713a3869e1f944481315e5a47496a9753e04
|
diff --git a/lib/cuke_modeler/version.rb b/lib/cuke_modeler/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cuke_modeler/version.rb
+++ b/lib/cuke_modeler/version.rb
@@ -1,4 +1,4 @@
module CukeModeler
# The gem version
- VERSION = '3.5.0'.freeze
+ VERSION = '3.6.0'.freeze
end
|
Bump gem version
Incremented the version to <I> in preparation for the upcoming
release.
|
enkessler_cuke_modeler
|
train
|
rb
|
e7c54525badeee77b3ae19b6a5bd234b4e4fc64f
|
diff --git a/bin/webpack-dev-server.js b/bin/webpack-dev-server.js
index <HASH>..<HASH> 100755
--- a/bin/webpack-dev-server.js
+++ b/bin/webpack-dev-server.js
@@ -67,6 +67,10 @@ if(!options.filename)
[].concat(wpOpt).forEach(function(wpOpt) {
wpOpt.output.path = "/";
});
+if(!options.watchOptions)
+ options.watchOptions = firstWpOpt.watchOptions;
+if(!options.watchDelay && !options.watchOptions) // TODO remove in next major version
+ options.watchDelay = firstWpOpt.watchDelay;
if(!options.hot)
options.hot = argv["hot"];
|
copy watchOptions from webpack options
|
webpack_webpack-dev-server
|
train
|
js
|
465ddd5bcd22c72cf064b079693de8c2a215c049
|
diff --git a/lib/websearch_webinterface.py b/lib/websearch_webinterface.py
index <HASH>..<HASH> 100644
--- a/lib/websearch_webinterface.py
+++ b/lib/websearch_webinterface.py
@@ -1060,7 +1060,7 @@ class WebInterfaceRecordPages(WebInterfaceDirectory):
record_status = record_exists(argd['recid'])
merged_recid = get_merged_recid(argd['recid'])
if record_status == -1 and merged_recid:
- url = CFG_SITE_URL + '/record/%s?ln=%s'
+ url = CFG_SITE_URL + '/' + CFG_SITE_RECORD + '/%s?ln=%s'
url %= (str(merged_recid), argd['ln'])
redirect_to_url(req, url)
|
WebSearch: merged records redirected with CFG_SITE_RECORD
* When a merged record is detected, use CFG_SITE_RECORD to
redirect to new record URL.
|
inveniosoftware_invenio-records
|
train
|
py
|
39f3ff526a1ef3f0f4c270db6230ff42b12b33be
|
diff --git a/tests/unit/modules/network_test.py b/tests/unit/modules/network_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/modules/network_test.py
+++ b/tests/unit/modules/network_test.py
@@ -5,6 +5,8 @@
# Import Python Libs
from __future__ import absolute_import
+import socket
+import os.path
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
@@ -24,8 +26,6 @@ ensure_in_syspath('../../')
import salt.utils
from salt.modules import network
from salt.exceptions import CommandExecutionError
-import socket
-import os.path
# Globals
network.__grains__ = {}
@@ -99,6 +99,7 @@ class NetworkTestCase(TestCase):
MagicMock(return_value='A')}):
self.assertEqual(network.dig('host'), 'A')
+ @patch('salt.utils.which', MagicMock(return_value=''))
def test_arp(self):
'''
Test for return the arp table from the minion
|
Patch decorators.which for network_test.test_arp
If salt.utils.which('arp') is None, we shouldn't fail this test.
This fixes the Arch and Fedora test failures on develop
|
saltstack_salt
|
train
|
py
|
3dfae3d289ce49e41bee23095d45ed52b0d9b1ea
|
diff --git a/lxd/storage/memorypipe/memory_pipe.go b/lxd/storage/memorypipe/memory_pipe.go
index <HASH>..<HASH> 100644
--- a/lxd/storage/memorypipe/memory_pipe.go
+++ b/lxd/storage/memorypipe/memory_pipe.go
@@ -31,12 +31,12 @@ func (p *pipe) Read(b []byte) (int, error) {
select {
case msg := <-p.ch:
if msg.err == io.EOF {
- return -1, msg.err
+ return 0, msg.err
}
n := copy(b, msg.data)
return n, msg.err
case <-p.ctx.Done():
- return -1, p.ctx.Err()
+ return 0, p.ctx.Err()
}
}
@@ -51,7 +51,7 @@ func (p *pipe) Write(b []byte) (int, error) {
case p.otherEnd.ch <- msg: // Sent msg to the other side's Read function.
return len(msg.data), msg.err
case <-p.ctx.Done():
- return -1, p.ctx.Err()
+ return 0, p.ctx.Err()
}
}
|
lxd/storage/memorypipe: Dont make ioutil.ReadAll panic on cancel
|
lxc_lxd
|
train
|
go
|
86f418fde8e8e94a5ec8e512b7230b92759f1fa9
|
diff --git a/test/configuration_test.rb b/test/configuration_test.rb
index <HASH>..<HASH> 100644
--- a/test/configuration_test.rb
+++ b/test/configuration_test.rb
@@ -83,5 +83,22 @@ class ConfigurationTest < Test::Unit::TestCase
v.longitude = -73.993371
assert_equal 136, v.bearing_from([50,-85]).round
end
+
+ def test_configuration_chain
+ v = Landmark.new(*landmark_params(:msg))
+ v.latitude = 0
+ v.longitude = 0
+
+ # method option > global configuration
+ Geocoder.configure.units = :km
+ assert_equal 69, v.distance_to([0,1], :mi).round
+
+ # per-model configuration > global configuration
+ Landmark.reverse_geocoded_by :latitude, :longitude, :method => :spherical, :units => :mi
+ assert_equal 69, v.distance_to([0,1]).round
+
+ # method option > per-model configuration
+ assert_equal 111, v.distance_to([0,1], :km).round
+ end
end
|
Tests to the configuration chain included.
|
alexreisner_geocoder
|
train
|
rb
|
ec9d5386940629d3bfeec7da08a6d60e280e6071
|
diff --git a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java
+++ b/src/main/java/com/google/cloud/tools/appengine/cloudsdk/CloudSdk.java
@@ -148,6 +148,12 @@ public class CloudSdk {
if (appCommandMetricsEnvironmentVersion != null) {
environment.put("CLOUDSDK_METRICS_ENVIRONMENT_VERSION", appCommandMetricsEnvironmentVersion);
}
+ // This is to ensure IDE credentials get correctly passed to the gcloud commands, in Windows.
+ // It's a temporary workaround until a fix is released.
+ // https://github.com/GoogleCloudPlatform/google-cloud-intellij/issues/985
+ if (System.getProperty("os.name").contains("Windows")) {
+ environment.put("CLOUDSDK_APP_NUM_FILE_UPLOAD_PROCESSES", "1");
+ }
logCommand(command);
processRunner.setEnvironment(environment);
processRunner.run(command.toArray(new String[command.size()]));
|
Add environment variable on Windows to set file upload processes to 1 (#<I>)
|
GoogleCloudPlatform_appengine-plugins-core
|
train
|
java
|
aab3587192fe21309ddfc9b698bacd41b09f6a19
|
diff --git a/src/main/java/com/cyrusinnovation/mockitogroovysupport/MethodInterceptorForGroovyFilter.java b/src/main/java/com/cyrusinnovation/mockitogroovysupport/MethodInterceptorForGroovyFilter.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cyrusinnovation/mockitogroovysupport/MethodInterceptorForGroovyFilter.java
+++ b/src/main/java/com/cyrusinnovation/mockitogroovysupport/MethodInterceptorForGroovyFilter.java
@@ -4,6 +4,7 @@ import groovy.lang.*;
import org.mockito.cglib.proxy.*;
import org.mockito.internal.*;
import org.mockito.internal.creation.*;
+import org.mockito.mock.*;
import java.lang.reflect.*;
@@ -11,7 +12,7 @@ public class MethodInterceptorForGroovyFilter extends MethodInterceptorFilter {
private ObjectMethodsGroovyGuru objectMethodsGuru = new ObjectMethodsGroovyGuru();
- public MethodInterceptorForGroovyFilter(InternalMockHandler handler, MockSettingsImpl mockSettings) {
+ public MethodInterceptorForGroovyFilter(InternalMockHandler handler, MockCreationSettings mockSettings) {
super(handler, mockSettings);
}
|
Declare a type more broadly, so that this will be usable in GroovyCglibMockMaker.
|
cyrusinnovation_mockito-groovy-support
|
train
|
java
|
e5a588bfb83f5b849e0dd1b4cdf89eef58ed4ad8
|
diff --git a/lib/riddle/controller.rb b/lib/riddle/controller.rb
index <HASH>..<HASH> 100644
--- a/lib/riddle/controller.rb
+++ b/lib/riddle/controller.rb
@@ -12,7 +12,7 @@ module Riddle
end
def sphinx_version
- `#{indexer} 2>&1`[/^Sphinx (\d+\.\d+(\.\d+|(?:-dev|(\-id64)?\-beta)))/, 1]
+ `#{indexer} 2>&1`[/Sphinx (\d+\.\d+(\.\d+|(?:-dev|(\-id64)?\-beta)))/, 1]
rescue
nil
end
|
get the sphinx version in coreseek.
|
pat_riddle
|
train
|
rb
|
8d63ac41166a28e22cd900050cf80d5cb4612b41
|
diff --git a/salt/netapi/rest_tornado/saltnado.py b/salt/netapi/rest_tornado/saltnado.py
index <HASH>..<HASH> 100644
--- a/salt/netapi/rest_tornado/saltnado.py
+++ b/salt/netapi/rest_tornado/saltnado.py
@@ -531,7 +531,6 @@ class SaltAuthHandler(BaseSaltAPIHandler):
'return': 'Please log in'}
self.write(self.serialize(ret))
- self.finish()
# TODO: make async? Underlying library isn't... and we ARE making disk calls :(
def post(self):
@@ -643,7 +642,6 @@ class SaltAuthHandler(BaseSaltAPIHandler):
}]}
self.write(self.serialize(ret))
- self.finish()
class SaltAPIHandler(BaseSaltAPIHandler, SaltClientsMixIn):
@@ -687,7 +685,6 @@ class SaltAPIHandler(BaseSaltAPIHandler, SaltClientsMixIn):
ret = {"clients": self.saltclients.keys(),
"return": "Welcome"}
self.write(self.serialize(ret))
- self.finish()
@tornado.web.asynchronous
def post(self):
@@ -1366,8 +1363,6 @@ class EventsSaltAPIHandler(SaltAPIHandler):
except TimeoutException:
break
- self.finish()
-
class WebhookSaltAPIHandler(SaltAPIHandler):
'''
|
Remove unecessary finish() calls
finish() only needs to be called after functions with @asynchronous decorators, coroutines don't count
|
saltstack_salt
|
train
|
py
|
9c628ae595f145d8110d88dae92145c9b9c00535
|
diff --git a/src/elements/table/Table.js b/src/elements/table/Table.js
index <HASH>..<HASH> 100644
--- a/src/elements/table/Table.js
+++ b/src/elements/table/Table.js
@@ -556,7 +556,7 @@ export class NovoTableElement {
for (let row of this.rows) {
row._selected = value;
}
- this.selected = value ? this.rows : 0;
+ this.selected = value ? this.rows : [];
this.showSelectAllMessage = false;
this.selectedPageCount = this.selectedPageCount > 0 ? this.selectedPageCount - 1 : 0;
this.emitSelected(this.selected);
|
fix(table): Fixing bug where the selected was set to 0 if you select/unselect the whole page
|
bullhorn_novo-elements
|
train
|
js
|
f9df39f5f7e828fb76de95a2546fd0bbee9a27a9
|
diff --git a/mithril.js b/mithril.js
index <HASH>..<HASH> 100644
--- a/mithril.js
+++ b/mithril.js
@@ -594,8 +594,10 @@ var m = (function app(window, undefined) {
};
var listener = m.route.mode === "hash" ? "onhashchange" : "onpopstate";
window[listener] = function() {
- if (currentRoute != normalizeRoute($location[m.route.mode])) {
- redirect($location[m.route.mode])
+ var path = $location[m.route.mode]
+ if (m.route.mode === "pathname") path += $location.search
+ if (currentRoute != normalizeRoute(path)) {
+ redirect(path)
}
};
computePostRedrawHook = setScroll;
@@ -638,7 +640,9 @@ var m = (function app(window, undefined) {
return routeParams[key]
};
m.route.mode = "search";
- function normalizeRoute(route) {return route.slice(modes[m.route.mode].length)}
+ function normalizeRoute(route) {
+ return route.slice(modes[m.route.mode].length)
+ }
function routeByValue(root, router, path) {
routeParams = {};
|
#<I> fix querystring detection in pathname mode
|
MithrilJS_mithril.js
|
train
|
js
|
53f9f81de767e74b2aef84dcc839683054000226
|
diff --git a/test/index.php b/test/index.php
index <HASH>..<HASH> 100755
--- a/test/index.php
+++ b/test/index.php
@@ -839,10 +839,8 @@ $content = ob_get_clean();
if( isset($_GET['file']) ){
echo '<script src="assets/lessjs-config.js"></script>';
- //echo '<script src="assets/less-1.4.2.js"></script>';
- //echo '<script src="assets/less-1.5.1.js"></script>';
- //echo '<script src="assets/less-1.6.1.js"></script>';
- echo '<script src="assets/less-1.6.3.js"></script>';
+ //echo '<script src="assets/less-1.6.3.js"></script>';
+ echo '<script src="assets/less-1.7.0.js"></script>';
}
?>
</head>
|
use less.js <I> in tests
|
oyejorge_less.php
|
train
|
php
|
f37da738d80362888c863fab01005db9f5534f90
|
diff --git a/js/cursor/cursorModel.js b/js/cursor/cursorModel.js
index <HASH>..<HASH> 100755
--- a/js/cursor/cursorModel.js
+++ b/js/cursor/cursorModel.js
@@ -166,11 +166,10 @@ var cursor = (function (cursor) {
// spin spinner
spinner = igv.getSpinner(sortTrackPanelPostFiltering.viewportDiv);
+ // TODO: This is wacky. Needs to be done to maintain sort direction
+ sortTrackPanelPostFiltering.track.sortDirection *= -1;
myself.sortRegions(sortTrackPanelPostFiltering.track.featureSource, sortTrackPanelPostFiltering.track.sortDirection, function (regions) {
-// sortTrackPanelPostFiltering.track.sortDirection *= -1;
- sortTrackPanelPostFiltering.track.sortDirection = 1;
-
sortTrackPanelPostFiltering.track.sortButton.className = "fa fa-signal";
sortTrackPanelPostFiltering.track.sortButton.style.color = "red";
|
Now maintaining track sort after main track swap or filter application
|
igvteam_igv.js
|
train
|
js
|
67e05b11f54b5c6d32b3e9308a0e13eb87491071
|
diff --git a/phono3py/cui/settings.py b/phono3py/cui/settings.py
index <HASH>..<HASH> 100644
--- a/phono3py/cui/settings.py
+++ b/phono3py/cui/settings.py
@@ -551,6 +551,10 @@ class Phono3pyConfParser(ConfParser):
fnames = confs[conf_key]
self.set_parameter(conf_key, fnames)
+ if conf_key == 'create_forces_fc3_file':
+ self.set_parameter(
+ 'create_forces_fc3_file', confs['create_forces_fc3_file'])
+
if conf_key == 'dim_fc2':
matrix = [ int(x) for x in confs['dim_fc2'].split() ]
if len(matrix) == 9:
|
--cf3-file didn't work. This was fixed.
|
atztogo_phono3py
|
train
|
py
|
79c605680e015c032ef129433f12e1851b14da83
|
diff --git a/tornado/test/websocket_test.py b/tornado/test/websocket_test.py
index <HASH>..<HASH> 100644
--- a/tornado/test/websocket_test.py
+++ b/tornado/test/websocket_test.py
@@ -111,6 +111,11 @@ class NonWebSocketHandler(RequestHandler):
self.write("ok")
+class RedirectHandler(RequestHandler):
+ def get(self):
+ self.redirect("/echo")
+
+
class CloseReasonHandler(TestWebSocketHandler):
def open(self):
self.on_close_called = False
@@ -221,6 +226,7 @@ class WebSocketTest(WebSocketBaseTestCase):
[
("/echo", EchoHandler, dict(close_future=self.close_future)),
("/non_ws", NonWebSocketHandler),
+ ("/redirect", RedirectHandler),
("/header", HeaderHandler, dict(close_future=self.close_future)),
(
"/header_echo",
@@ -366,6 +372,11 @@ class WebSocketTest(WebSocketBaseTestCase):
yield self.ws_connect("/non_ws")
@gen_test
+ def test_websocket_http_redirect(self):
+ with self.assertRaises(HTTPError):
+ yield self.ws_connect("/redirect")
+
+ @gen_test
def test_websocket_network_fail(self):
sock, port = bind_unused_port()
sock.close()
|
websocket_test: test websocket_connect redirect raises exception
instead of "uncaught exception" and then test timeout
|
tornadoweb_tornado
|
train
|
py
|
21d8270fad4e3a161e6fcdee9be781065d1973bc
|
diff --git a/classes/apis.php b/classes/apis.php
index <HASH>..<HASH> 100644
--- a/classes/apis.php
+++ b/classes/apis.php
@@ -295,7 +295,7 @@ class ShopgatePluginApi extends ShopgateObject implements ShopgatePluginApiInter
// check error count
if ($jobErrorcount > 0) {
- $message .= 'Errors happend in job: "'.$job['job_name'].'" ('.$jobErrorcount.' errors)\n';
+ $message .= "{$jobErrorcount} errors occured while executing cron job '{$job['job_name']}'\n";
$errorcount += $jobErrorcount;
}
} catch (Exception $e) {
|
Better error description when returning errors during the SPA 'cron' action.
|
shopgate_cart-integration-sdk
|
train
|
php
|
bbf074652da936a8e8e72c5cbbd65b783707458a
|
diff --git a/library/CM/Css/Cli.php b/library/CM/Css/Cli.php
index <HASH>..<HASH> 100644
--- a/library/CM/Css/Cli.php
+++ b/library/CM/Css/Cli.php
@@ -35,7 +35,7 @@ class CM_Css_Cli extends CM_Cli_Runnable_Abstract {
foreach (glob($dirBuild . 'icon-webfont.*') as $fontPath) {
$fontFile = new CM_File($fontPath);
- $fontFile->move(DIR_PUBLIC . 'static/font/' . $fontFile->getFileName());
+ $fontFile->rename(DIR_PUBLIC . 'static/font/' . $fontFile->getFileName());
}
CM_Util::rmDir($dirWork);
diff --git a/library/CM/File.php b/library/CM/File.php
index <HASH>..<HASH> 100644
--- a/library/CM/File.php
+++ b/library/CM/File.php
@@ -146,7 +146,7 @@ class CM_File extends CM_Class_Abstract {
/**
* @param string $path
*/
- public function move($path) {
+ public function rename($path) {
$path = (string) $path;
$this->_filesystem->rename($this->getPath(), $path);
$this->_path = $path;
|
Rename move() to rename()
|
cargomedia_cm
|
train
|
php,php
|
85a79a28c420b5a89763af6ac698180ab60a6194
|
diff --git a/src/main/resources/META-INF/resources/primefaces/core/core.dialog.js b/src/main/resources/META-INF/resources/primefaces/core/core.dialog.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/META-INF/resources/primefaces/core/core.dialog.js
+++ b/src/main/resources/META-INF/resources/primefaces/core/core.dialog.js
@@ -42,7 +42,16 @@ PrimeFaces.dialog.DialogHandler = {
sourceComponentId: cfg.sourceComponentId,
sourceWidget: cfg.sourceWidget,
onHide: function() {
- this.jq.remove();
+ var $dialogWidget = this;
+
+ this.destroyIntervalId = setInterval(function() {
+ if($frame.get(0).contentWindow.PrimeFaces.ajax.Queue.isEmpty()) {
+ $dialogWidget.content.children('iframe').attr('src','about:blank');
+ $dialogWidget.jq.remove();
+ clearInterval($dialogWidget.destroyIntervalId);
+ }
+ }, 10);
+
PF[dialogWidgetVar] = undefined;
},
modal: cfg.options.modal,
|
Attempt to fix dialog framework ajax issues with IE. Requires confirmation after testing by Sudheer.
|
primefaces_primefaces
|
train
|
js
|
6ad11e7c46a14b269f12d951aa1f3437f3ad7130
|
diff --git a/synapse/lib/kv.py b/synapse/lib/kv.py
index <HASH>..<HASH> 100644
--- a/synapse/lib/kv.py
+++ b/synapse/lib/kv.py
@@ -14,6 +14,9 @@ class KvDict:
Unlike the KvLook object, the KvDict keeps all items in the dictionary
in memory, so retrieval is fast; and only updates needs to be written
to the the underlying KvStor object.
+
+ Note: set() must be called to persist changes to mutable values like
+ dicts or lists
'''
def __init__(self, stor, iden):
self.stor = stor
|
added note to recommend explict value setting for KvDict
|
vertexproject_synapse
|
train
|
py
|
db9c87ee0387608065245e670e676116acd1739d
|
diff --git a/lib/pancake/stack/bootloader.rb b/lib/pancake/stack/bootloader.rb
index <HASH>..<HASH> 100644
--- a/lib/pancake/stack/bootloader.rb
+++ b/lib/pancake/stack/bootloader.rb
@@ -25,7 +25,7 @@ end
Pancake::Stack::BootLoader.add(:load_mounted_inits, :level => :init) do
def run!
# Mount any stacks this stack may have in it.
- stack_class.paths_for(:mounts).each{|f| require f}
+ stack_class.paths_for(:mounts).each{|f| require f.join}
end
end
|
join return of paths_for when you browse mounts app
|
hassox_pancake
|
train
|
rb
|
9c099f1337016f958fcccb157a46decca850945d
|
diff --git a/cmd/ursrv/main.go b/cmd/ursrv/main.go
index <HASH>..<HASH> 100644
--- a/cmd/ursrv/main.go
+++ b/cmd/ursrv/main.go
@@ -772,7 +772,7 @@ func ensureDir(dir string, mode int) {
}
}
-var vRe = regexp.MustCompile(`^(v\d+\.\d+\.\d+(?:-[a-z]\w+)?)[+\.-]`)
+var plusRe = regexp.MustCompile(`\+.*$`)
// transformVersion returns a version number formatted correctly, with all
// development versions aggregated into one.
@@ -783,9 +783,7 @@ func transformVersion(v string) string {
if !strings.HasPrefix(v, "v") {
v = "v" + v
}
- if m := vRe.FindStringSubmatch(v); len(m) > 0 {
- return m[1] + " (+dev)"
- }
+ v = plusRe.ReplaceAllString(v, " (+dev)")
return v
}
|
Don't mangle release candidate version numbers
|
syncthing_syncthing
|
train
|
go
|
e7faa571f74377b8eb63b34512f29a63d9b580b2
|
diff --git a/src/ElephantOnCouch/Couch.php b/src/ElephantOnCouch/Couch.php
index <HASH>..<HASH> 100755
--- a/src/ElephantOnCouch/Couch.php
+++ b/src/ElephantOnCouch/Couch.php
@@ -1445,7 +1445,7 @@ final class Couch {
$doc->setClass($class);
// Sets the document type.
- $type = strtolower(preg_replace('/(?:[\w]+$)/', "", $class));
+ $type = strtolower(preg_split('/(?:[\w]+$)/', $class)[1]);
$doc->setType($type);
$path = "/".$this->dbName."/".$doc->getPath().$doc->getId();
|
replace preg_replace() with preg_split() on saveDoc() method
|
dedalozzo_eoc-client
|
train
|
php
|
9c025ab6e9731dde56186b41ba5d4f216a48c831
|
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index <HASH>..<HASH> 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -376,7 +376,4 @@ module ActiveModel
end
end
-Dir[File.dirname(__FILE__) + "/validations/*.rb"].sort.each do |path|
- filename = File.basename(path)
- require "active_model/validations/#{filename}"
-end
+Dir[File.dirname(__FILE__) + "/validations/*.rb"].each { |file| require file }
diff --git a/activesupport/lib/active_support/core_ext.rb b/activesupport/lib/active_support/core_ext.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/core_ext.rb
+++ b/activesupport/lib/active_support/core_ext.rb
@@ -1,4 +1,4 @@
-Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].sort.each do |path|
+Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].each do |path|
next if File.basename(path, '.rb') == 'logger'
- require "active_support/core_ext/#{File.basename(path, '.rb')}"
+ require path
end
|
Tidying up some require : removing useless sort and homogenizing with the rest of the code the wat the includes are done
|
rails_rails
|
train
|
rb,rb
|
e3bf6b46632ea21f3c7f0c1ec5484c057f881db0
|
diff --git a/controller/src/main/java/org/jboss/as/controller/descriptions/DefaultOperationDescriptionProvider.java b/controller/src/main/java/org/jboss/as/controller/descriptions/DefaultOperationDescriptionProvider.java
index <HASH>..<HASH> 100644
--- a/controller/src/main/java/org/jboss/as/controller/descriptions/DefaultOperationDescriptionProvider.java
+++ b/controller/src/main/java/org/jboss/as/controller/descriptions/DefaultOperationDescriptionProvider.java
@@ -177,7 +177,7 @@ public class DefaultOperationDescriptionProvider implements DescriptionProvider
}
}
if (replyParameters != null && replyParameters.length > 0) {
- if (replyParameters.length == 1) {
+ if (replyParameters.length == 1 && replyType != ModelType.LIST) {
AttributeDefinition ad = replyParameters[0];
/*ModelNode param = ad.getNoTextDescription(true);
final String description = attributeDescriptionResolver.getOperationParameterDescription(operationName, ad.getName(), locale, attributeBundle);
|
[WFLY-<I>] Properly support describing operation reply types that are lists of complex objects
|
wildfly_wildfly-core
|
train
|
java
|
eee3172e41afeab7a53221a8f5a1de8b8a35e9c9
|
diff --git a/globus_cli/commands/whoami.py b/globus_cli/commands/whoami.py
index <HASH>..<HASH> 100644
--- a/globus_cli/commands/whoami.py
+++ b/globus_cli/commands/whoami.py
@@ -32,7 +32,7 @@ def whoami_command(linked_identities):
res = client.oauth2_userinfo()
except AuthAPIError:
click.echo(
- "Unable to get user information. Please try " "logging in again.", err=True
+ "Unable to get user information. Please try logging in again.", err=True
)
click.get_current_context().exit(1)
diff --git a/globus_cli/parsing/endpoint_plus_path.py b/globus_cli/parsing/endpoint_plus_path.py
index <HASH>..<HASH> 100644
--- a/globus_cli/parsing/endpoint_plus_path.py
+++ b/globus_cli/parsing/endpoint_plus_path.py
@@ -26,10 +26,7 @@ class EndpointPlusPath(click.ParamType):
@property
def metavar(self):
"""
- Metavar as a property, to satisfy the slight brokenness of
- click.Argument
- Tracked against Click as an issue:
- https://github.com/pallets/click/issues/674
+ Metavar as a property, so that we can make it different if `path_required`
"""
if self.path_required:
return "ENDPOINT_ID:PATH"
|
Minor cleanup to EP Plus Path metavar doc
And a small string formatting fix as well.
|
globus_globus-cli
|
train
|
py,py
|
abc60df33bf2b1735d1ac23961daf6d5cde14f53
|
diff --git a/app/src/shell/buildroot/update-epics.js b/app/src/shell/buildroot/update-epics.js
index <HASH>..<HASH> 100644
--- a/app/src/shell/buildroot/update-epics.js
+++ b/app/src/shell/buildroot/update-epics.js
@@ -25,6 +25,8 @@ import {
passRobotApiErrorAction,
} from '../../robot-api'
+import { actions as robotActions } from '../../robot'
+
import {
getBuildrootTargetVersion,
getBuildrootSession,
@@ -363,6 +365,12 @@ export const removeMigratedRobotsEpic: Epic = (_, state$) =>
})
)
+export const disconnectRpcOnStartEpic: Epic = action$ =>
+ action$.pipe(
+ ofType(BR_START_UPDATE),
+ switchMap<_, _, mixed>(() => of(robotActions.disconnect()))
+ )
+
export const buildrootUpdateEpic = combineEpics(
startUpdateEpic,
cancelSessionOnConflictEpic,
@@ -375,5 +383,6 @@ export const buildrootUpdateEpic = combineEpics(
restartAfterCommitEpic,
watchForOfflineAfterRestartEpic,
watchForOnlineAfterRestartEpic,
- removeMigratedRobotsEpic
+ removeMigratedRobotsEpic,
+ disconnectRpcOnStartEpic
)
|
refactor(app): Disconnect RPC session on update start (#<I>)
|
Opentrons_opentrons
|
train
|
js
|
cd1b80e12b70da3b6be38c55dc52bb5567e5237c
|
diff --git a/src/main/java/com/sd_editions/collatex/spike2/TranspositionDetection.java b/src/main/java/com/sd_editions/collatex/spike2/TranspositionDetection.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/sd_editions/collatex/spike2/TranspositionDetection.java
+++ b/src/main/java/com/sd_editions/collatex/spike2/TranspositionDetection.java
@@ -90,4 +90,17 @@ public class TranspositionDetection {
}
return modifications;
}
+
+ public static List<MatchSequence> getMatches(List<Tuple2<MatchSequence>> possibleMatches) {
+ List<Tuple2<MatchSequence>> filteredMatchSequences = Lists.newArrayList(Iterables.filter(possibleMatches, new Predicate<Tuple2<MatchSequence>>() {
+ public boolean apply(Tuple2<MatchSequence> tuple) {
+ return tuple.left.getFirstMatch().wordCode == tuple.right.getFirstMatch().wordCode;
+ }
+ }));
+ List<MatchSequence> realMatches = Lists.newArrayList();
+ for (Tuple2<MatchSequence> tuple2 : filteredMatchSequences) {
+ realMatches.add(tuple2.left);
+ }
+ return realMatches;
+ }
}
|
[RHD] Introduced a method that gives the real matches afther the MatchSequences are determined
|
interedition_collatex
|
train
|
java
|
4b3aef0a6fc005fb21e20c83d4133b6618079320
|
diff --git a/examples/searchcommands_template/bin/filter.py b/examples/searchcommands_template/bin/filter.py
index <HASH>..<HASH> 100644
--- a/examples/searchcommands_template/bin/filter.py
+++ b/examples/searchcommands_template/bin/filter.py
@@ -5,7 +5,7 @@ import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
from splunklib.searchcommands import \
- dispatch, StreamingCommand, Configuration, Option, validators
+ dispatch, EventingCommand, Configuration, Option, validators
@Configuration()
|
Update filter.py
Seems the import was wrong
|
splunk_splunk-sdk-python
|
train
|
py
|
f1956ef5edb16f214662ec3e2b542b219d9b97fd
|
diff --git a/lib/memory_profiler/reporter.rb b/lib/memory_profiler/reporter.rb
index <HASH>..<HASH> 100644
--- a/lib/memory_profiler/reporter.rb
+++ b/lib/memory_profiler/reporter.rb
@@ -48,8 +48,7 @@ module MemoryProfiler
retained = StatHash.new
ObjectSpace.each_object do |obj|
- retained_generation = ObjectSpace.allocation_generation(obj)
- next unless retained_generation && generation == retained_generation
+ next unless ObjectSpace.allocation_generation(obj) == generation
begin
found = allocated[obj.__id__]
retained[obj.__id__] = found if found
@@ -81,7 +80,7 @@ module MemoryProfiler
objs = []
ObjectSpace.each_object do |obj|
- next unless generation == ObjectSpace.allocation_generation(obj)
+ next unless ObjectSpace.allocation_generation(obj) == generation
begin
if !trace || trace.include?(obj.class)
objs << obj
|
faster non-traced object check
most objects will have nil allocation_generation and nil==Fixnum is <I>x faster than Fixnum==nil.
|
SamSaffron_memory_profiler
|
train
|
rb
|
8e5aa9119c58f70d135304e1d5d97e5598054d27
|
diff --git a/openquake/server/utils.py b/openquake/server/utils.py
index <HASH>..<HASH> 100644
--- a/openquake/server/utils.py
+++ b/openquake/server/utils.py
@@ -146,7 +146,7 @@ def array_of_strings_to_bytes(arr, key):
unchanged in the other cases.
"""
if arr is None:
- return []
+ return ()
if not isinstance(arr, numpy.ndarray) or arr.dtype != numpy.dtype('O'):
return arr
if arr.ndim == 1:
|
Return an empty typle instead of an empty list in case of None
|
gem_oq-engine
|
train
|
py
|
1587c3a04614c985de7ebc3d2249f3625a28dd94
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -17,4 +17,8 @@ end
VCR.configure do |c|
c.cassette_library_dir = 'spec/cassettes'
c.hook_into :webmock
+ c.preserve_exact_body_bytes do |http_message|
+ http_message.body.encoding.name == 'ASCII-8BIT' ||
+ !http_message.body.valid_encoding?
+ end
end
|
Updated VCR settings to fix tests
|
stewartmatheson_grizzly
|
train
|
rb
|
57ab94457d1bdcbde119cf7e27e883f5776a5ff1
|
diff --git a/fireplace/cards/league/collectible.py b/fireplace/cards/league/collectible.py
index <HASH>..<HASH> 100644
--- a/fireplace/cards/league/collectible.py
+++ b/fireplace/cards/league/collectible.py
@@ -103,7 +103,12 @@ LOE_061e = buff(+3, +3)
# Fossilized Devilsaur
class LOE_073:
- play = Find(FRIENDLY_MINIONS + BEAST) & Taunt(SELF)
+ powered_up = Find(FRIENDLY_MINIONS + BEAST)
+ play = powered_up & Taunt(SELF)
+
+
+# Fossilized (Unused)
+LOE_073e = buff(taunt=True)
# Summoning Stone
|
Add a powered_up to Fossilized Devilsaur
Also add its unused corresponding Fossilized buff
|
jleclanche_fireplace
|
train
|
py
|
2220a9adf7ba6bd274ab4ed6df2a468314490ec3
|
diff --git a/core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerExpVisitor.java b/core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerExpVisitor.java
index <HASH>..<HASH> 100644
--- a/core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerExpVisitor.java
+++ b/core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerExpVisitor.java
@@ -595,10 +595,12 @@ public class TypeCheckerExpVisitor extends
} else if (rn instanceof AIntNumericBasicType) {
node.setType(rn);
return rn;
- } else if (ln instanceof ANatNumericBasicType
- && rn instanceof ANatNumericBasicType) {
+ } else if (ln instanceof ANatNumericBasicType) {
node.setType(ln);
return ln;
+ } else if (rn instanceof ANatNumericBasicType) {
+ node.setType(rn);
+ return rn;
} else {
node.setType(AstFactory.newANatOneNumericBasicType(ln.getLocation()));
return node.getType();
|
Corrected type inference for nat/nat1 for TimesNumericBinaryExp
|
overturetool_overture
|
train
|
java
|
8f1dfaf034b4aa3446167bd4ab0f5e7e40d181c7
|
diff --git a/go/client/ui.go b/go/client/ui.go
index <HASH>..<HASH> 100644
--- a/go/client/ui.go
+++ b/go/client/ui.go
@@ -538,7 +538,7 @@ func (d DoctorUI) DisplaySecretWords(arg keybase_1.DisplaySecretWordsArg) error
d.parent.Printf("On your %q computer, a window should have appeared. Type this in it:\n\n", arg.XDevDescription)
d.parent.Printf("\t%s\n\n", arg.Secret)
d.parent.Printf("Alternatively, if you're using the terminal at %q, type this:\n\n", arg.XDevDescription)
- d.parent.Printf("\tkeybase sibkey add '%s'\n\n", arg.Secret)
+ d.parent.Printf("\tkeybase sibkey add \"%s\"\n\n", arg.Secret)
return nil
}
|
fixed quotes on sibkey add instructions
|
keybase_client
|
train
|
go
|
646c9f28d940ad64089d5de873af8bfe2ce4a6af
|
diff --git a/app/models/user.rb b/app/models/user.rb
index <HASH>..<HASH> 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -112,15 +112,15 @@ class User < ActiveRecord::Base
if !User.current.nil?
if u.id == User.current.id
u.errors.add(:base, _("Cannot delete currently logged user"))
- false
+ return false
end
end
unless u.can_be_deleted?
u.errors.add(:base, "cannot delete last admin user")
- false
+ return false
end
- true
+ return true
end
# destroy own role for user
|
PulpV2 - Fixes bug found in prevention of the deletion of last super user.
|
Katello_katello
|
train
|
rb
|
01ad787b2c54c01b14d07a5f00e973376e8d7980
|
diff --git a/src/Transaction/CreditCardTransaction.php b/src/Transaction/CreditCardTransaction.php
index <HASH>..<HASH> 100644
--- a/src/Transaction/CreditCardTransaction.php
+++ b/src/Transaction/CreditCardTransaction.php
@@ -140,10 +140,10 @@ class CreditCardTransaction extends Transaction implements Reservable
break;
case 'refund-capture':
case 'refund-purchase':
- case 'credit':
+ case $this::TYPE_CREDIT:
+ case $this::TYPE_PURCHASE:
$transactionType = 'void-' . $this->parentTransactionType;
break;
- case $this::TYPE_PURCHASE:
case $this::TYPE_REFERENCED_PURCHASE:
$transactionType = 'void-purchase';
break;
|
Use constant for transaction type in credit card transaction
|
wirecard_paymentSDK-php
|
train
|
php
|
c8d94f6f9240289d33aa9dfb178509d2ae6be6bb
|
diff --git a/lib/Handbrake.js b/lib/Handbrake.js
index <HASH>..<HASH> 100644
--- a/lib/Handbrake.js
+++ b/lib/Handbrake.js
@@ -50,7 +50,8 @@ class Handbrake extends EventEmitter {
cancel () {
if (this.handle) {
this.handle.on('close', (code, signal) => {
- if (/Signal 2 received, terminating/.test(this.output)) {
+ /* the first test is for mac/linux, second for windows */
+ if (/Signal 2 received, terminating/.test(this.output) || (code === null && signal === 'SIGINT')) {
this._emitCancelled()
}
})
@@ -100,7 +101,8 @@ class Handbrake extends EventEmitter {
handle.on('exit', (code, signal) => {
/* ignore a cancelled exit, which is handled by .cancel() */
- if (/Signal 2 received, terminating/.test(this.output)) {
+ /* the first test is for mac/linux, second for windows */
+ if (/Signal 2 received, terminating/.test(this.output) || (code === null && signal === 'SIGINT')) {
return
}
|
Added windows-specific logic for detecting ctrl+c or 'process cancelled'
|
75lb_handbrake-js
|
train
|
js
|
d074e09d3f713d43c40bf8ead7d17e073ae93eaa
|
diff --git a/config/types.go b/config/types.go
index <HASH>..<HASH> 100644
--- a/config/types.go
+++ b/config/types.go
@@ -201,6 +201,13 @@ func (c *ServiceConfigs) Add(name string, service *ServiceConfig) {
c.mu.Unlock()
}
+// Remove removes the config with the specified name
+func (c *ServiceConfigs) Remove(name string) {
+ c.mu.Lock()
+ delete(c.m, name)
+ c.mu.Unlock()
+}
+
// Len returns the len of the configs
func (c *ServiceConfigs) Len() int {
c.mu.RLock()
|
Add Remove command to ServiceConfigs
|
docker_libcompose
|
train
|
go
|
8527098c2fbcc7dbfbf74b81a96dfd09795f744e
|
diff --git a/lib/gruff/base.rb b/lib/gruff/base.rb
index <HASH>..<HASH> 100644
--- a/lib/gruff/base.rb
+++ b/lib/gruff/base.rb
@@ -595,9 +595,8 @@ module Gruff
Gruff::Renderer::Line.new(color: @marker_shadow_color).render(@graph_left, y + 1, @graph_right, y + 1)
end
- marker_label = BigDecimal(index.to_s) * BigDecimal(@increment.to_s) + BigDecimal(minimum_value.to_s)
-
unless @hide_line_numbers
+ marker_label = BigDecimal(index.to_s) * BigDecimal(@increment.to_s) + BigDecimal(minimum_value.to_s)
label = label(marker_label, @increment)
text_renderer = Gruff::Renderer::Text.new(label, font: @font, size: @marker_font_size, color: @font_color)
text_renderer.render(@graph_left - LABEL_MARGIN, 1.0, 0.0, y, Magick::EastGravity)
|
refactor: Calcurate the marker label value if needed
|
topfunky_gruff
|
train
|
rb
|
c45dca4a7251c5b6bb3b6c22d49474d7dcfbcd84
|
diff --git a/pyemma/coordinates/data/featurizer.py b/pyemma/coordinates/data/featurizer.py
index <HASH>..<HASH> 100644
--- a/pyemma/coordinates/data/featurizer.py
+++ b/pyemma/coordinates/data/featurizer.py
@@ -1,3 +1,4 @@
+
# This file is part of PyEMMA.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
|
[coor/featurizer] fix doctest divison by zero caused by missing blank line at start.
|
markovmodel_PyEMMA
|
train
|
py
|
b848f8b4b64d254b164a777172a97529d8352da8
|
diff --git a/plugins/LanguagesManager/Commands/FetchFromOTrance.php b/plugins/LanguagesManager/Commands/FetchFromOTrance.php
index <HASH>..<HASH> 100644
--- a/plugins/LanguagesManager/Commands/FetchFromOTrance.php
+++ b/plugins/LanguagesManager/Commands/FetchFromOTrance.php
@@ -129,6 +129,7 @@ class FetchFromOTrance extends ConsoleCommand
if (!$input->hasOption('keep-english')) {
@unlink(self::getDownloadPath() . DIRECTORY_SEPARATOR . 'en.php');
+ @unlink(self::getDownloadPath() . DIRECTORY_SEPARATOR . 'en.json');
}
@unlink(self::getDownloadPath() . DIRECTORY_SEPARATOR . 'language_pack.tar.gz');
|
remove en.json if present to prevent changes for english translation file
|
matomo-org_matomo
|
train
|
php
|
b85ec562c46dbfaf4a926780a1fa233a30e71fa5
|
diff --git a/tests/002-test-collectd.py b/tests/002-test-collectd.py
index <HASH>..<HASH> 100644
--- a/tests/002-test-collectd.py
+++ b/tests/002-test-collectd.py
@@ -15,6 +15,7 @@
# Copyright 2011 Cloudant, Inc.
import os
+import time
import struct
import tempfile
try:
@@ -44,11 +45,12 @@ def test_pkt_reader():
@t.udp_srv(bucky.collectd.CollectDServer)
def test_simple_counter_old(q, s):
s.send(next(pkts("collectd.pkts")))
- s = q.get()
+ time.sleep(.1)
+ s = q.get(True, .1)
while s:
print(s)
try:
- s = q.get(False)
+ s = q.get(True, .1)
except queue.Empty:
break
@@ -78,6 +80,7 @@ def authfile(data):
def send_get_data(q, s, datafile):
for pkt in pkts(datafile):
s.send(pkt)
+ time.sleep(.1)
while True:
try:
sample = q.get(True, .1)
|
Add sleep statements in tests
Without them, tests with python3 fail for me
|
trbs_bucky
|
train
|
py
|
f8d054b9875965c6506fc41e6e7f5128c7a6bb7a
|
diff --git a/test/client/array.js b/test/client/array.js
index <HASH>..<HASH> 100644
--- a/test/client/array.js
+++ b/test/client/array.js
@@ -42,6 +42,31 @@ describe('Planet Client API: Array', function(){
});
+ it('should `set` an element at the end of an array', function(done){
+
+ var socket = io.connect('//:8004', {
+ 'force new connection': true
+ });
+
+ socket.once('connect', function(){
+ socket.emit('set', '_add_array', ['a0', 'a1', 'a2']);
+ });
+
+ socket.once('set', function(){
+ socket.once('set', function(){
+ socket.emit('get', '_add_array', function(data){
+ expect(data).to.be.an('array');
+ expect(data[3]).to.be(null);
+ expect(data[4]).to.be('a4');
+ socket.disconnect();
+ done();
+ });
+ });
+ socket.emit('set', ['_add_array', 4], 'a4');
+ });
+
+ });
+
it('should `set` an element to an array', function(done){
|
test setting an element at the end of an array
|
thisconnect_planet
|
train
|
js
|
8db06f08126cecabf0e2e21dc3ddbf5116ab0853
|
diff --git a/lib/cinch/rules.rb b/lib/cinch/rules.rb
index <HASH>..<HASH> 100644
--- a/lib/cinch/rules.rb
+++ b/lib/cinch/rules.rb
@@ -21,14 +21,14 @@ module Cinch
options.keys.each do |key|
case key
when :nick
- return unless options[:nick] == message.nick
+ return unless validate(options[:nick], message.nick)
when :host
- return unless options[:host] == message.host
+ return unless validate(options[:host], message.host)
when :user
- return unless options[:user] == message.user
+ return unless validate(options[:user], message.user)
when :channel
if message.channel
- return unless options[:channel] == message.channel
+ return unless validate(options[:channel], message.channel)
end
end
end
@@ -38,6 +38,16 @@ module Cinch
end
end
+ # Validate rule attributes
+ def validate(option, attr)
+ if option.is_a?(Array)
+ return unless option.any?{|o| o == attr }
+ else
+ return unless options.to_s == attr
+ end
+ true
+ end
+
# The rule as a String
def to_s
rule
|
rule options now accepts an Array
|
cinchrb_cinch
|
train
|
rb
|
dfb8d65501d786fc941d9869887899690932d4e0
|
diff --git a/src/Configurator/Helpers/TemplateParser.php b/src/Configurator/Helpers/TemplateParser.php
index <HASH>..<HASH> 100644
--- a/src/Configurator/Helpers/TemplateParser.php
+++ b/src/Configurator/Helpers/TemplateParser.php
@@ -752,7 +752,15 @@ class TemplateParser
*/
protected static function appendElement(DOMElement $parentNode, $name, $value = '')
{
- $element = $parentNode->ownerDocument->createElement($name, $value);
+ if ($value === '')
+ {
+ $element = $parentNode->ownerDocument->createElement($name);
+ }
+ else
+ {
+ $element = $parentNode->ownerDocument->createElement($name, $value);
+ }
+
$parentNode->appendChild($element);
return $element;
|
TemplateParser: fixed a bug that occurs on Travis, related to empty text nodes
|
s9e_TextFormatter
|
train
|
php
|
cb92114377dd917d63bae971a8f8150e60f66ca3
|
diff --git a/salt/returners/couchbase_return.py b/salt/returners/couchbase_return.py
index <HASH>..<HASH> 100644
--- a/salt/returners/couchbase_return.py
+++ b/salt/returners/couchbase_return.py
@@ -210,9 +210,10 @@ def save_load(jid, clear_load):
save_minions(jid, minions)
-def save_minions(jid, minions):
+def save_minions(jid, minions, syndic_id=None): # pylint: disable=unused-argument
'''
- Save/update the minion list for a given jid
+ Save/update the minion list for a given jid. The syndic_id argument is
+ included for API compatibility only.
'''
cb_ = _get_connection()
@@ -223,7 +224,12 @@ def save_minions(jid, minions):
return False
# save the minions to a cache so we can see in the UI
- jid_doc.value['minions'] = minions
+ if 'minions' in jid_doc.value:
+ jid_doc.value['minions'] = sorted(
+ set(jid_doc.value['minions'] + minions)
+ )
+ else:
+ jid_doc.value['minions'] = minions
cb_.replace(str(jid), jid_doc.value, cas=jid_doc.cas, ttl=_get_ttl())
|
Add syndic_id param for API compatibility
Also fix successive updates
|
saltstack_salt
|
train
|
py
|
646f7513bdfd21fd78fedbf65c3133a1e6820656
|
diff --git a/app/models/effective/customer.rb b/app/models/effective/customer.rb
index <HASH>..<HASH> 100644
--- a/app/models/effective/customer.rb
+++ b/app/models/effective/customer.rb
@@ -40,10 +40,10 @@ module Effective
def update_card!(token)
if token.present? # Oh, so they want to use a new credit card...
- stripe_customer.card = token # This sets the default_card to the new card
+ stripe_customer.source = token # This sets the default_source to the new card
- if stripe_customer.save && stripe_customer.default_card.present?
- card = stripe_customer.cards.retrieve(stripe_customer.default_card)
+ if stripe_customer.save && stripe_customer.default_source.present?
+ card = stripe_customer.sources.retrieve(stripe_customer.default_source)
self.stripe_active_card = "**** **** **** #{card.last4} #{card.brand} #{card.exp_month}/#{card.exp_year}"
self.save!
|
updated default_card to default_source and cards to sources
|
code-and-effect_effective_orders
|
train
|
rb
|
eeee8241e4896bf08a108aa8eb880bdd12099469
|
diff --git a/libraries/Mustache.php b/libraries/Mustache.php
index <HASH>..<HASH> 100644
--- a/libraries/Mustache.php
+++ b/libraries/Mustache.php
@@ -17,9 +17,7 @@ class Mustache
public function __construct()
{
- require NAILS_PATH . 'libraries/_resources/Mustache/Autoloader.php';
Mustache_Autoloader::register();
-
$this->_mustachio = new Mustache_Engine;
}
|
Using composer autoloader instead of must ache autoloader
|
nails_common
|
train
|
php
|
12f0ffaa996aff3d430de7a9a0c05bcc9974e151
|
diff --git a/news-bundle/contao/classes/News.php b/news-bundle/contao/classes/News.php
index <HASH>..<HASH> 100644
--- a/news-bundle/contao/classes/News.php
+++ b/news-bundle/contao/classes/News.php
@@ -180,7 +180,7 @@ class News extends \Frontend
$strDescription = $objArticle->teaser;
}
- $strDescription = $this->replaceInsertTags($strDescription);
+ $strDescription = $this->replaceInsertTags($strDescription, false);
$objItem->description = $this->convertRelativeUrls($strDescription, $strLink);
// Add the article image as enclosure
@@ -218,7 +218,7 @@ class News extends \Frontend
}
// Create the file
- \File::putContent('share/' . $strFile . '.xml', $this->replaceInsertTags($objFeed->$strType()));
+ \File::putContent('share/' . $strFile . '.xml', $this->replaceInsertTags($objFeed->$strType(), false));
}
|
[News] Never cache insert tags if the output is not used on the website (see #<I>)
|
contao_contao
|
train
|
php
|
f5414ca9d4f7033d5a9088438e4015e97d188db0
|
diff --git a/web/index.php b/web/index.php
index <HASH>..<HASH> 100644
--- a/web/index.php
+++ b/web/index.php
@@ -56,10 +56,10 @@ class Application {
public function sendResponse($body, $status = 200) {
http_response_code($status);
header('Content-Length: ' . strlen($body));
- header('Content-Type: ' . ($status >= 400 ? 'text/plain' : 'application/x-httpd-php'));
+ header('Content-Type: text/plain');
echo $body;
}
}
// Start the application.
-(new Application())->run($_POST);
+(new Application())->run($_GET);
|
Improved compatibility with `superagent` module
|
cedx_gulp-php-minify
|
train
|
php
|
29f3617a23d4d297ae20e8664bddff477b698258
|
diff --git a/zebra/urls.py b/zebra/urls.py
index <HASH>..<HASH> 100644
--- a/zebra/urls.py
+++ b/zebra/urls.py
@@ -1,4 +1,4 @@
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
from zebra import views
|
Update urls.py
Update urls.py to Django <I>/<I>
|
GoodCloud_django-zebra
|
train
|
py
|
d7ca8ce82678414fc003e6a1cbff42cfe35d395d
|
diff --git a/niworkflows/interfaces/segmentation.py b/niworkflows/interfaces/segmentation.py
index <HASH>..<HASH> 100644
--- a/niworkflows/interfaces/segmentation.py
+++ b/niworkflows/interfaces/segmentation.py
@@ -112,6 +112,10 @@ class MELODICRPT(reporting.ReportCapableInterface, fsl.MELODIC):
def _generate_report(self):
from niworkflows.viz.utils import plot_melodic_components
+ mix = os.path.join(self._melodic_dir, "melodic_mix")
+ if not os.path.exists(mix):
+ open(self.inputs.out_report, 'w').close()
+ return
plot_melodic_components(melodic_dir=self._melodic_dir,
in_file=self.inputs.in_files[0],
tr=self.inputs.tr_sec,
|
FIX: Create empty report file on missing MELODIC mix
|
poldracklab_niworkflows
|
train
|
py
|
63418ec100f8c1b535611ec0f6191afe36459dec
|
diff --git a/tests/test_filters.py b/tests/test_filters.py
index <HASH>..<HASH> 100644
--- a/tests/test_filters.py
+++ b/tests/test_filters.py
@@ -29,3 +29,11 @@ class Filter(TestCase):
expected = [810, 830.0, 830.0, 804, 804]
np.testing.assert_almost_equal(rri_filt, expected, decimal=2)
+
+ def test_moving_median_order_5(self):
+ fake_rri = np.array([810, 830, 860, 790, 804, 801, 800])
+
+ rri_filt = moving_median(fake_rri, order=5)
+
+ expected = [810, 830, 810.0, 804.0, 801.0, 801, 800]
+ np.testing.assert_almost_equal(rri_filt, expected, decimal=2)
|
Test moving median filter for 5th order
|
rhenanbartels_hrv
|
train
|
py
|
ff76bf9ed87d138e3041c4355c70e1c950dbdb2a
|
diff --git a/pandas/core/series.py b/pandas/core/series.py
index <HASH>..<HASH> 100644
--- a/pandas/core/series.py
+++ b/pandas/core/series.py
@@ -1179,7 +1179,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
Returns
-------
- idxmax : Index of minimum of values
+ idxmax : Index of maximum of values
Notes
-----
|
TYPO: idxmax is maximum, not minimum
Confusing doc typo was momentarily confusing.
|
pandas-dev_pandas
|
train
|
py
|
49af592ccbd7f611f28858acd76aa82d11f6e621
|
diff --git a/lib/ronin/installation.rb b/lib/ronin/installation.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/installation.rb
+++ b/lib/ronin/installation.rb
@@ -155,7 +155,7 @@ module Ronin
else
# if we cannot find an installed ronin gem, search the $LOAD_PATH
# for ronin gemspecs and load those
- $LOAD_PATH.each do |lib_dir|
+ $LOAD_PATH.reverse_each do |lib_dir|
root_dir = File.expand_path(File.join(lib_dir,'..'))
gemspec_path = Dir[File.join(root_dir,'ronin*.gemspec')].first
@@ -164,6 +164,8 @@ module Ronin
@@ronin_gems[gem.name] = gem
@@ronin_gem_paths[gem.name] = root_dir
+
+ break if File.basename(gemspec_path) == 'ronin.gemspec'
end
end
end
|
Stop loading gemspecs once we've found ronin.gemspec.
* Any libraries loaded before 'ronin', are likely to be 'ronin-support'
or non-ronin libraries.
|
ronin-ruby_ronin
|
train
|
rb
|
aee4aec15e714d2a4ae7ccc5e1198339fa3dc078
|
diff --git a/lib/stack_master/template_compilers/sparkle_formation.rb b/lib/stack_master/template_compilers/sparkle_formation.rb
index <HASH>..<HASH> 100644
--- a/lib/stack_master/template_compilers/sparkle_formation.rb
+++ b/lib/stack_master/template_compilers/sparkle_formation.rb
@@ -1,6 +1,6 @@
-require_relative '../sparkle_formation/compile_time/parameters_validator'
-require_relative '../sparkle_formation/compile_time/definitions_validator'
-require_relative '../sparkle_formation/compile_time/state_builder'
+require 'stack_master/sparkle_formation/compile_time/parameters_validator'
+require 'stack_master/sparkle_formation/compile_time/definitions_validator'
+require 'stack_master/sparkle_formation/compile_time/state_builder'
module StackMaster::TemplateCompilers
class SparkleFormation
|
change require_relative to require
|
envato_stack_master
|
train
|
rb
|
b416288426da7de196a6d0d5ad0d4f9859f136c9
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -6,14 +6,14 @@ module.exports = function (pluginConfig, config, cb) {
if (env.WERCKER !== "true") {
return cb(new SRError(
- "ENOWERCKER: semantic-release didn’t run on wercker and therefore a new version won’t be published.",
+ "ENOWERCKER semantic-release didn’t run on wercker and therefore a new version won’t be published.",
"ENOWERCKER"
));
}
if (env.WERCKER_GIT_BRANCH !== options.branch) {
return cb(new SRError(
- "EBRANCHMISMATCH: This test run was triggered on the branch " + env.WERCKER_GIT_BRANCH +
+ "EBRANCHMISMATCH This test run was triggered on the branch " + env.WERCKER_GIT_BRANCH +
", while semantic-release is configured to only publish from " + options.branch + ".",
"EBRANCHMISMATCH"
));
@@ -22,7 +22,7 @@ module.exports = function (pluginConfig, config, cb) {
// WERCKER_RESULT is set only for after-steps
if (env.hasOwnProperty("WERCKER_RESULT") && env.WERCKER_RESULT !== "passed") {
return cb(new SRError(
- "EFAILED: This test run was not passed and therefore a new version won’t be published.",
+ "EFAILED This test run was not passed and therefore a new version won’t be published.",
"EFAILED"
));
}
|
fix: Remove redundant commas from error code
Redundant comma causes errors of semantic-release step failed to parse
error code from message.
|
io-monad_sr-condition-wercker
|
train
|
js
|
beb129f4a630c0e759cb5e8f7de37c211093ffde
|
diff --git a/condorpy/dag.py b/condorpy/dag.py
index <HASH>..<HASH> 100644
--- a/condorpy/dag.py
+++ b/condorpy/dag.py
@@ -42,6 +42,14 @@ class DAG(object):
return self._name
@property
+ def cluster_id(self):
+ """
+
+ :return:
+ """
+ return self._cluster_id
+
+ @property
def node_set(self):
"""
"""
@@ -81,7 +89,13 @@ class DAG(object):
print(err)
else:
raise Exception(err)
- print out
+ print(out)
+ try:
+ self._cluster_id = int(re.search('(?<=cluster |\*\* Proc )(\d*)', out).group(1))
+ except:
+ self._cluster_id = -1
+
+ return self.cluster_id
def complete_set(self):
|
added cluster id attribute to dag
|
tethysplatform_condorpy
|
train
|
py
|
663ddda8163f71c7af529ee82240d1ea8abff70a
|
diff --git a/spec/functional_spec_helpers.rb b/spec/functional_spec_helpers.rb
index <HASH>..<HASH> 100644
--- a/spec/functional_spec_helpers.rb
+++ b/spec/functional_spec_helpers.rb
@@ -22,11 +22,11 @@ module Etcd
pid = spawn_etcd_server(@@tmpdir+'/leader')
@@pids = Array(pid)
puts "Etcd leader process id :#{pid}"
- leader = '127.0.0.1:7001'
+ leader = '127.0.0.1:70001'
4.times do |n|
- client_port = 4002 + n
- server_port = 7002 + n
+ client_port = 40002 + n
+ server_port = 70002 + n
pid = spawn_etcd_server(@@tmpdir+client_port.to_s, client_port, server_port, leader)
@@pids << pid
end
@@ -40,7 +40,7 @@ module Etcd
FileUtils.remove_entry_secure @@tmpdir
end
- def self.spawn_etcd_server(dir, client_port=4001, server_port=7001, leader = nil)
+ def self.spawn_etcd_server(dir, client_port=40001, server_port=70001, leader = nil)
args = " -addr 127.0.0.1:#{client_port} -peer-addr 127.0.0.1:#{server_port} -data-dir #{dir} -name node_#{client_port}"
command = if leader.nil?
etcd_binary + args
|
bind etcd server to a higher port (travis fix)
|
ranjib_etcd-ruby
|
train
|
rb
|
1b2439aabe4f8eecc9fb5ab8153f7ef04768a976
|
diff --git a/commitlint.config.js b/commitlint.config.js
index <HASH>..<HASH> 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -8,7 +8,7 @@ module.exports = {
'footer-max-line-length': [2, 'always', 72],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'start-case'],
- 'scope-enum': [2, 'always', ['', 'Binary Installer', 'Variables']],
+ 'scope-enum': [2, 'always', ['', 'Binary Installer', 'Plugins', 'Variables']],
'subject-case': [2, 'always', 'sentence-case'],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
|
chore: Register 'Plugins' commit message scope
|
serverless_serverless
|
train
|
js
|
b36766dece35cc60acf2fc766aabac735bdfd445
|
diff --git a/src/main/java/me/corsin/javatools/exception/StackTraceUtils.java b/src/main/java/me/corsin/javatools/exception/StackTraceUtils.java
index <HASH>..<HASH> 100644
--- a/src/main/java/me/corsin/javatools/exception/StackTraceUtils.java
+++ b/src/main/java/me/corsin/javatools/exception/StackTraceUtils.java
@@ -14,4 +14,18 @@ public class StackTraceUtils {
return null;
}
}
+
+ public static String stackTraceToHTMLString(Throwable t) {
+ return stackTraceToHTMLString(t, " ", "<br>");
+ }
+
+ public static String stackTraceToHTMLString(Throwable t, String tab, String newLine) {
+ String text = stackTraceToString(t);
+ if (text == null) {
+ return null;
+ } else {
+ return text.replace("\n", newLine)
+ .replace("\t", tab);
+ }
+ }
}
|
Adding a method to get a stacktrace as an html string
|
rFlex_SCJavaTools
|
train
|
java
|
2c0bade9d2aa88e326b28d6461544e56b6241dad
|
diff --git a/lib/rdb/reader.rb b/lib/rdb/reader.rb
index <HASH>..<HASH> 100644
--- a/lib/rdb/reader.rb
+++ b/lib/rdb/reader.rb
@@ -29,7 +29,7 @@ module RDB
when Opcode::SELECTDB
callbacks.end_database(state.database) unless state.database.nil?
- state.database, = *read_length(rdb)
+ state.database = read_length(rdb).first
callbacks.start_database(state.database)
next
|
We do not really need the splat operator here...
|
nrk_redis-rdb
|
train
|
rb
|
92fef7fd8f88752959a2490ff5f8710406998c7d
|
diff --git a/templates/client/html/catalog/social-partial.php b/templates/client/html/catalog/social-partial.php
index <HASH>..<HASH> 100644
--- a/templates/client/html/catalog/social-partial.php
+++ b/templates/client/html/catalog/social-partial.php
@@ -134,7 +134,7 @@ $params = ['d_name' => $this->productItem->getName( 'url' ), 'd_prodid' => $this
<?php $mediaItem = $this->productItem->getRefItems( 'media', 'default', 'default' )->first() ?>
<a class="social-button social-button-<?= $enc->attr( $entry ) ?>" rel="noopener"
href="<?= $enc->attr( sprintf( $link,
- $enc->url( $this->link( 'client/html/catalog/detail/url', $params, [], ['absoluteUri' => true] ) ),
+ $enc->url( $this->link( 'client/html/catalog/detail/url', $params, ['absoluteUri' => true] ) ),
$this->productItem->getName(),
$mediaItem ? $this->content( $mediaItem->getPreview( true ), $mediaItem->getFileSystem() ) : ''
) ) ?>"
|
Fixed absolute URLs for social media links
|
aimeos_ai-client-html
|
train
|
php
|
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.