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
|
|---|---|---|---|---|---|
26d3ba698e41beb260c54d9f6491f435295af692
|
diff --git a/framework/i18n/I18N.php b/framework/i18n/I18N.php
index <HASH>..<HASH> 100644
--- a/framework/i18n/I18N.php
+++ b/framework/i18n/I18N.php
@@ -31,18 +31,18 @@ class I18N extends Component
* category patterns, and the array values are the corresponding [[MessageSource]] objects or the configurations
* for creating the [[MessageSource]] objects.
*
- * The message category patterns can contain the wildcard '*' at the end to match multiple categories with the same prefix.
- * For example, 'app/*' matches both 'app/cat1' and 'app/cat2'.
+ * The message category patterns can contain the wildcard `*` at the end to match multiple categories with the same prefix.
+ * For example, `app/*` matches both `app/cat1` and `app/cat2`.
*
- * The '*' category pattern will match all categories that do not match any other category patterns.
+ * The `*` category pattern will match all categories that do not match any other category patterns.
*
* This property may be modified on the fly by extensions who want to have their own message sources
* registered under their own namespaces.
*
- * The category "yii" and "app" are always defined. The former refers to the messages used in the Yii core
+ * The category `yii` and `app` are always defined. The former refers to the messages used in the Yii core
* framework code, while the latter refers to the default message category for custom application code.
* By default, both of these categories use [[PhpMessageSource]] and the corresponding message files are
- * stored under "@yii/messages" and "@app/messages", respectively.
+ * stored under `@yii/messages` and `@app/messages`, respectively.
*
* You may override the configuration of both categories.
*/
|
Cosmetic changes in DocBlocks (#<I>) [skip ci]
|
yiisoft_yii-core
|
train
|
php
|
a75f0f241be48cb90ac6178662f3de54cf5b1ce9
|
diff --git a/tensorflow_probability/python/experimental/distribute/sharded.py b/tensorflow_probability/python/experimental/distribute/sharded.py
index <HASH>..<HASH> 100644
--- a/tensorflow_probability/python/experimental/distribute/sharded.py
+++ b/tensorflow_probability/python/experimental/distribute/sharded.py
@@ -126,6 +126,12 @@ class Sharded(distribution_lib.Distribution):
return []
return self.distribution._parameter_control_dependencies(is_init=is_init) # pylint: disable=protected-access
+ def _default_event_space_bijector(self, *args, **kwargs):
+ # TODO(b/175084455): This should likely be wrapped in a `tfb.Sharded`-like
+ # construct.
+ return self.distribution.experimental_default_event_space_bijector(
+ *args, **kwargs)
+
_composite_tensor_nonshape_params = ('distribution',)
|
Plumb-through the default event bijector in tfp_dist.Sharded.
PiperOrigin-RevId: <I>
|
tensorflow_probability
|
train
|
py
|
d247d390874396c97079926c960347b8813f5ff5
|
diff --git a/MRS/analysis.py b/MRS/analysis.py
index <HASH>..<HASH> 100644
--- a/MRS/analysis.py
+++ b/MRS/analysis.py
@@ -135,7 +135,7 @@ def coil_combine(data, w_idx=[1,2,3], coil_dim=2, sampling_rate=5000.):
bounds = [(None,None),
(0,None),
(0,None),
- (-np.pi/2, np.pi/2), # Keeping it positive!
+ (-np.pi, np.pi), # Keeping it positive!
(None,None),
(None, None)]
|
Not good to enforce positivity for the coil-combination.
That kinda makes sense, actually.
|
cni_MRS
|
train
|
py
|
5b17a198d97b6bbc361e6c8305ce01bd2c7abef0
|
diff --git a/Slim/Http/Util.php b/Slim/Http/Util.php
index <HASH>..<HASH> 100644
--- a/Slim/Http/Util.php
+++ b/Slim/Http/Util.php
@@ -174,6 +174,32 @@ class Util
}
/**
+ * Serialize Response cookies into raw HTTP header
+ * @param \Slim\Http\Headers $headers The Response headers
+ * @param \Slim\Http\Cookies $cookies The Response cookies
+ * @param array $config The Slim app settings
+ */
+ public static function serializeCookies(\Slim\Http\Headers &$headers, \Slim\Http\Cookies $cookies, array $config)
+ {
+ if ($config['cookies.encrypt']) {
+ foreach ($cookies as $name => $settings) {
+ $settings['value'] = static::encodeSecureCookie(
+ $settings['value'],
+ $settings['expires'],
+ $config['cookies.secret_key'],
+ $config['cookies.cipher'],
+ $config['cookies.cipher_mode']
+ );
+ static::setCookieHeader($headers, $name, $settings);
+ }
+ } else {
+ foreach ($cookies as $name => $settings) {
+ static::setCookieHeader($headers, $name, $settings);
+ }
+ }
+ }
+
+ /**
* Encode secure cookie value
*
* This method will create the secure value of an HTTP cookie. The
|
Add method to Slim\Http\Util to serialize cookies into headers
|
slimphp_Slim
|
train
|
php
|
be13d566608475ed138f90cdddb153894cbe47a2
|
diff --git a/spotify/sync/sync.py b/spotify/sync/sync.py
index <HASH>..<HASH> 100644
--- a/spotify/sync/sync.py
+++ b/spotify/sync/sync.py
@@ -20,7 +20,7 @@ class SyncExecution(threading.Thread):
self.running = True
self.in_queue.put(coro)
- while True:
+ while self.running:
if self.out_queue.full():
self.running = False
value = self.out_queue.get()
@@ -30,6 +30,7 @@ class SyncExecution(threading.Thread):
def run(self):
asyncio.set_event_loop(self._loop)
+
while True:
coro = self.in_queue.get()
try:
|
run_coro execution loop depends on sync execution state
|
mental32_spotify.py
|
train
|
py
|
6bde6dc22713bac43ed7a02c3939bfd257718fc0
|
diff --git a/lib/namespace.rb b/lib/namespace.rb
index <HASH>..<HASH> 100644
--- a/lib/namespace.rb
+++ b/lib/namespace.rb
@@ -64,6 +64,14 @@ module Atomy
nil
end
+ def top_down(&blk)
+ yield @name
+ @using.each do |u|
+ Atomy::Namespace.get(u).top_down(&blk)
+ end
+ nil
+ end
+
def self.define_target
Thread.current[:atomy_define_in] ||
get && get.name.to_s
|
add Namespace#top_down, which recursively yields the names of the namespaces it
uses (depth-first)
|
vito_atomy
|
train
|
rb
|
f2f3891ef2014dfa5ae81988fdcd0e7dfe645b1b
|
diff --git a/lib/knapsack_pro/tracker.rb b/lib/knapsack_pro/tracker.rb
index <HASH>..<HASH> 100644
--- a/lib/knapsack_pro/tracker.rb
+++ b/lib/knapsack_pro/tracker.rb
@@ -90,11 +90,7 @@ module KnapsackPro
end
def now_without_mock_time
- if defined?(Timecop)
- Time.now_without_mock_time
- else
- Time.raw_now
- end
+ Process.clock_gettime(Process::CLOCK_MONOTONIC)
end
end
end
|
Use Process.clock_gettime to measure track execution time
|
KnapsackPro_knapsack_pro-ruby
|
train
|
rb
|
f6f8af3899fa6d7ec6ee09e1796d16150b53b507
|
diff --git a/Loader/ComboLoader.php b/Loader/ComboLoader.php
index <HASH>..<HASH> 100644
--- a/Loader/ComboLoader.php
+++ b/Loader/ComboLoader.php
@@ -221,7 +221,7 @@ class ComboLoader implements Loader
private function sanitizeFilenames(array $files, $version)
{
$filesWithoutVersion = array_map(function ($file) use ($version) {
- if (preg_match('/\?' . $version . '$/', $file)) {
+ if (preg_match('/\?' . preg_quote($version, '/') . '$/', $file)) {
return substr($file, 0, -(strlen($version) + 1));
}
|
EZEE-<I>: Supplement for #<I> (#<I>)
|
ezsystems_PlatformUIBundle
|
train
|
php
|
7d4a39e08814458721d89836abc8b309a55bd148
|
diff --git a/pyqode/cobol/widgets/code_edit.py b/pyqode/cobol/widgets/code_edit.py
index <HASH>..<HASH> 100644
--- a/pyqode/cobol/widgets/code_edit.py
+++ b/pyqode/cobol/widgets/code_edit.py
@@ -5,7 +5,7 @@ import mimetypes
import os
import sys
from pyqode.core import api, panels, modes
-from pyqode.core.backend import NotConnected
+from pyqode.core.backend import NotRunning
from pyqode.core.managers import FileManager
from pyqode.core.qt import QtCore, QtGui
from pyqode.cobol import modes as cobmodes
@@ -37,7 +37,7 @@ class CobolCodeEdit(api.CodeEdit):
from pyqode.cobol.backend.workers import set_free_format
try:
self.backend.send_request(set_free_format, self.free_format)
- except NotConnected:
+ except NotRunning:
QtCore.QTimer.singleShot(100, self._update_backend_format)
@free_format.setter
|
Use NotRunning instead of NotConnected
|
pyQode_pyqode.cobol
|
train
|
py
|
1e0d47b5440718ad069b88e4fea87caf5e6a5b69
|
diff --git a/JSAT/test/jsat/math/optimization/BFGSTest.java b/JSAT/test/jsat/math/optimization/BFGSTest.java
index <HASH>..<HASH> 100644
--- a/JSAT/test/jsat/math/optimization/BFGSTest.java
+++ b/JSAT/test/jsat/math/optimization/BFGSTest.java
@@ -52,7 +52,7 @@ public class BFGSTest
Random rand = new Random();
Vec x0 = new DenseVector(20);
for(int i = 0; i < x0.length(); i++)
- x0.set(i, rand.nextDouble());
+ x0.set(i, rand.nextDouble()+0.5);//make sure we get to the right local optima
RosenbrockFunction f = new RosenbrockFunction();
FunctionVec fp = f.getDerivative();
|
Make same change as already in LBFGS test so that initial guess should lead us to the global minimum instead of the local one
|
EdwardRaff_JSAT
|
train
|
java
|
72ae0e00fc5cbedb0fb516fd47571a5409b1508e
|
diff --git a/jquery.peity.js b/jquery.peity.js
index <HASH>..<HASH> 100644
--- a/jquery.peity.js
+++ b/jquery.peity.js
@@ -78,7 +78,7 @@
return this.$svg
.empty()
- .data('peity', this)
+ .data('_peity', this)
.attr({
height: height,
width: width
|
Fix reference to the Peity chart object from its <svg>.
|
benpickles_peity
|
train
|
js
|
586545e86281c4eb01acd269faf88c7b935f4cec
|
diff --git a/src/de/mrapp/android/validation/AbstractValidateableView.java b/src/de/mrapp/android/validation/AbstractValidateableView.java
index <HASH>..<HASH> 100644
--- a/src/de/mrapp/android/validation/AbstractValidateableView.java
+++ b/src/de/mrapp/android/validation/AbstractValidateableView.java
@@ -733,6 +733,11 @@ public abstract class AbstractValidateableView<ViewType extends View, ValueType>
removeAllValidators(Arrays.asList(validators));
}
+ @Override
+ public final void removeAllValidators() {
+ validators.clear();
+ }
+
/**
* Returns the helper text, which is shown, when no validation error is
* currently shown.
diff --git a/src/de/mrapp/android/validation/Validateable.java b/src/de/mrapp/android/validation/Validateable.java
index <HASH>..<HASH> 100644
--- a/src/de/mrapp/android/validation/Validateable.java
+++ b/src/de/mrapp/android/validation/Validateable.java
@@ -109,6 +109,11 @@ public interface Validateable<Type> {
void removeAllValidators(Validator<Type>... validators);
/**
+ * Removes all validators.
+ */
+ void removeAllValidators();
+
+ /**
* Validates the current value of the view.
*
* @return True, if the current value is valid, false otherwise
|
Added a method, which allows to remove all validators from a view.
|
michael-rapp_AndroidMaterialValidation
|
train
|
java,java
|
af89c58696580ee26ffbd99ab9a3747fba937e35
|
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -18,7 +18,7 @@ module ActionView
attr_reader :source, :identifier, :handler, :virtual_path, :formats
- def self.finalizer_for(method_name)
+ Finalizer = proc do |method_name|
proc do
ActionView::CompiledTemplates.module_eval do
remove_possible_method method_name
@@ -77,7 +77,6 @@ module ActionView
private
def compile(locals, view)
method_name = build_method_name(locals)
-
return method_name if view.respond_to?(method_name)
locals_code = locals.keys.map! { |key| "#{key} = local_assigns[:#{key}];" }.join
@@ -106,7 +105,8 @@ module ActionView
begin
ActionView::CompiledTemplates.module_eval(source, identifier, line)
- ObjectSpace.define_finalizer(self, self.class.finalizer_for(method_name))
+ ObjectSpace.define_finalizer(self, Finalizer[method_name])
+
method_name
rescue Exception => e # errors from template code
if logger = (view && view.logger)
|
Use a constant proc to generate ActionView::Template finalizers. For some strange reason, finalizers created via ActionView::Template.finalizer_for cause Template instances to leak on MRI.
|
rails_rails
|
train
|
rb
|
ef5b9067b546a4423248bb68a43535130b8cf42b
|
diff --git a/pyfolio/utils.py b/pyfolio/utils.py
index <HASH>..<HASH> 100644
--- a/pyfolio/utils.py
+++ b/pyfolio/utils.py
@@ -224,7 +224,7 @@ def load_portfolio_risk_factors(filepath_prefix=None, start=None, end=None):
filepath = filepath_prefix
# Is cache recent enough?
- if pd.to_datetime(getmtime(filepath), unit='s') >= end:
+ if pd.to_datetime(getmtime(filepath), unit='s', utc=True) >= end:
five_factors = pd.read_hdf(filepath, 'df')
else:
five_factors = get_fama_french()
|
BUG Make dt comparison tz aware.
|
quantopian_pyfolio
|
train
|
py
|
c245397ee7a31a9b2078db5254cd6c6f13b8fe96
|
diff --git a/resources/lang/id-ID/cachet.php b/resources/lang/id-ID/cachet.php
index <HASH>..<HASH> 100644
--- a/resources/lang/id-ID/cachet.php
+++ b/resources/lang/id-ID/cachet.php
@@ -33,6 +33,7 @@ return [
'scheduled' => 'Jadwal Pemeliharaan',
'scheduled_at' => ', dijadwalkan pada :timestamp',
'posted' => 'Dikirim: timestamp',
+ 'posted_at' => 'Posted at :timestamp',
'status' => [
1 => 'Investigasi',
2 => 'Teridentifikasi',
|
New translations cachet.php (Indonesian)
|
CachetHQ_Cachet
|
train
|
php
|
80479fd54f7f20249c79ab66fef7ba0061c994c9
|
diff --git a/tests/test_buku.py b/tests/test_buku.py
index <HASH>..<HASH> 100644
--- a/tests/test_buku.py
+++ b/tests/test_buku.py
@@ -3,6 +3,7 @@ from itertools import product
from unittest import mock
from urllib.parse import urlparse
import json
+import logging
import os
import signal
import sys
@@ -726,7 +727,7 @@ def test_copy_to_clipboard(platform, params):
params, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
m_popen_retval.communicate.assert_called_once_with(content)
else:
- m_popen.assert_not_called()
+ logging.info('popen is called {} on unrecognized platform'.format(m_popen.call_count))
@pytest.mark.parametrize('export_type, exp_res', [
|
chg: dev: only inform about popen for now
|
jarun_Buku
|
train
|
py
|
68bf5e2fb8df41fb21ca5560b5a4e8773db82ec0
|
diff --git a/src/System.php b/src/System.php
index <HASH>..<HASH> 100644
--- a/src/System.php
+++ b/src/System.php
@@ -107,7 +107,7 @@ class System
require_once('include/utils/layout_utils.php');
$GLOBALS['mod_strings'] = return_module_language($currentLanguage, 'Administration');
$repair = new \RepairAndClear();
- $repair->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), $executeSql, true);
+ $repair->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), $executeSql, true, '');
ob_end_flush();
//remove the js language files
@@ -116,12 +116,6 @@ class System
} else {
\LanguageManager::removeJSLanguageFiles();
}
- //remove language cache files
- if (!method_exists('LanguageManager', 'clearLanguageCache')) {
- $this->getLogger()->warning('No clearLanguageCache method (sugar too old?). Check that it\'s clean.');
- } else {
- \LanguageManager::clearLanguageCache();
- }
$this->tearDown();
|
Removed useless call in quick repair + solved the bug with the api cache not cleared
|
inetprocess_libsugarcrm
|
train
|
php
|
823aa223efbac6ad4d31ea33402892267bb77cb4
|
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/helpers/cache_helper.rb
+++ b/actionpack/lib/action_view/helpers/cache_helper.rb
@@ -51,7 +51,9 @@ module ActionView
# This dance is needed because Builder can't use capture
pos = output_buffer.length
yield
- fragment = output_buffer.slice!(pos..-1)
+ safe_output_buffer = output_buffer.to_str
+ fragment = safe_output_buffer.slice!(pos..-1)
+ self.output_buffer = ActionView::OutputBuffer.new(safe_output_buffer)
controller.write_fragment(name, fragment, options)
end
end
|
Fragment caching needs to operate on the pure output, not the
safebuffer.
|
rails_rails
|
train
|
rb
|
a15e2423001b4ee96a4a4c603d07986a3005fa29
|
diff --git a/src/main/java/com/coveros/selenified/Selenified.java b/src/main/java/com/coveros/selenified/Selenified.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/coveros/selenified/Selenified.java
+++ b/src/main/java/com/coveros/selenified/Selenified.java
@@ -566,11 +566,7 @@ public class Selenified {
*/
private static List<Browser> getBrowserInput() throws InvalidBrowserException {
List<Browser> browsers = new ArrayList<>();
- // null input check
- if (System.getProperty(BROWSER) == null) {
- return browsers;
- }
- String[] browserInput = System.getProperty(BROWSER).split(",");
+ String[] browserInput = Property.getBrowser().split(",");
for (String singleBrowserInput : browserInput) {
browsers.add(new Browser(singleBrowserInput));
}
|
Fixing issue with Selenified properties
|
Coveros_selenified
|
train
|
java
|
514c0e89f6a1fc326582deb1a6af48d65f81f8b5
|
diff --git a/lib/typhoid/queued_request.rb b/lib/typhoid/queued_request.rb
index <HASH>..<HASH> 100644
--- a/lib/typhoid/queued_request.rb
+++ b/lib/typhoid/queued_request.rb
@@ -8,11 +8,11 @@ module Typhoid
self.request = Request.new(req.request_uri, req.options)
self.klass = req.klass
self.target = target
- hydra.queue(self.request)
+ hydra.queue(request)
end
def on_complete
- self.request.on_complete do
+ request.on_complete do
yield self if block_given?
end
end
@@ -22,11 +22,7 @@ module Typhoid
end
def response
- self.request.response
- end
-
- def klass
- @klass
+ request.response
end
end
end
|
don't use self unless necessary
|
sportngin_typhoid
|
train
|
rb
|
27357a9691edef8e852b92aae46340e328c97284
|
diff --git a/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java b/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java
index <HASH>..<HASH> 100644
--- a/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java
+++ b/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java
@@ -110,7 +110,8 @@ public class PaxtoolsMain {
public static void toGSEA(String[] argv) throws IOException
{
Model model = io.convertFromOWL(new FileInputStream(argv[1]));
- (new GSEAConverter(argv[3], new Boolean(argv[4]))).writeToGSEA(model, new FileOutputStream(argv[2]));
+ Boolean specCheckEnabled = (argv.length>4) ? new Boolean(argv[4]) : Boolean.FALSE;
+ (new GSEAConverter(argv[3], specCheckEnabled)).writeToGSEA(model, new FileOutputStream(argv[2]));
}
public static void getNeighbors(String[] argv) throws IOException
|
Fix: the lats optional parameter in the toGSEA command was in fact a must have.
|
BioPAX_Paxtools
|
train
|
java
|
f4f7eca7ca34b3017684817d6d1b50dab87a7c34
|
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
index <HASH>..<HASH> 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
@@ -1318,4 +1318,19 @@ public abstract class XMPPConnection {
public FromMode getFromMode() {
return this.fromMode;
}
+
+ @Override
+ protected void finalize() throws Throwable {
+ try {
+ // It's usually not a good idea to rely on finalize. But this is the easiest way to
+ // avoid the "Smack Listener Processor" leaking. The thread(s) of the executor have a
+ // reference to their ExecutorService which prevents the ExecutorService from being
+ // gc'ed. It is possible that the XMPPConnection instance is gc'ed while the
+ // listenerExecutor ExecutorService call not be gc'ed until it got shut down.
+ listenerExecutor.shutdownNow();
+ }
+ finally {
+ super.finalize();
+ }
+ }
}
|
Shutdown listenerExecutor to prevent the Thread from leaking
listenerExecutor needs to get shutdown once it is no longer required.
SMACK-<I>
|
igniterealtime_Smack
|
train
|
java
|
cba0383c15b3124e7b2393142c85b68da1250c78
|
diff --git a/src/widgets/SidebarMenu.php b/src/widgets/SidebarMenu.php
index <HASH>..<HASH> 100644
--- a/src/widgets/SidebarMenu.php
+++ b/src/widgets/SidebarMenu.php
@@ -19,7 +19,7 @@ class SidebarMenu extends \hiqdev\yii2\menus\widgets\Menu
/**
* {@inheritdoc}
*/
- public $linkTemplate = '<a href="{url}">{icon} <span>{label}</span> {arrow}</a>';
+ public $linkTemplate = '<a href="{url}" {linkOptions}>{icon} <span>{label}</span> {arrow}</a>';
/**
* {@inheritdoc}
|
added link options attribute to sidebar menu (#9)
* added link options attribute to sidebar menu
* minor
|
hiqdev_yii2-theme-adminlte
|
train
|
php
|
d0b48fd6fbbe141f9872c5c1686a27b8e84c75c8
|
diff --git a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java
index <HASH>..<HASH> 100644
--- a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java
+++ b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java
@@ -4,7 +4,7 @@ public final class GitChangelogApiConstants {
public static final String ZERO_COMMIT = "0000000000000000000000000000000000000000";
public static final String REF_MASTER = "master";
- public static final boolean DEFAULT_REMOVE_ISSUE = true;
+ public static final boolean DEFAULT_REMOVE_ISSUE = false;
public static final String DEFAULT_TIMEZONE = "UTC";
public static final String DEFAULT_DATEFORMAT = "yyyy-MM-dd HH:mm:ss";
public static final String DEFAULT_IGNORE_COMMITS_REGEXP = "";
|
fix: not removing issue from message by default
|
tomasbjerre_git-changelog-lib
|
train
|
java
|
c64eeb039f5c28a95d9cfbfadc78979804d21bcf
|
diff --git a/lib/ArangoDBClient/ConnectionOptions.php b/lib/ArangoDBClient/ConnectionOptions.php
index <HASH>..<HASH> 100644
--- a/lib/ArangoDBClient/ConnectionOptions.php
+++ b/lib/ArangoDBClient/ConnectionOptions.php
@@ -375,6 +375,7 @@ class ConnectionOptions implements \ArrayAccess
if (isset($this->_values[self::OPTION_HOST]) && !isset($this->_values[self::OPTION_ENDPOINT])) {
// upgrade host/port to an endpoint
$this->_values[self::OPTION_ENDPOINT] = 'tcp://' . $this->_values[self::OPTION_HOST] . ':' . $this->_values[self::OPTION_PORT];
+ unset($this->_values[self::OPTION_HOST]);
}
}
|
Fixed issue when multiple calls to validate method triggers "must not specify both host and endpoint" exception
|
arangodb_arangodb-php
|
train
|
php
|
7a1e1e964ddb400fc28358650dc90efa743e2b15
|
diff --git a/src/server/worker/master.go b/src/server/worker/master.go
index <HASH>..<HASH> 100644
--- a/src/server/worker/master.go
+++ b/src/server/worker/master.go
@@ -868,12 +868,17 @@ func (a *APIServer) receiveSpout(ctx context.Context, logger *taggedLogger) (ret
retErr = err
}
}()
+ hasFile := false
for {
fileHeader, err := outTar.Next()
if err == io.EOF {
fmt.Println("tar EOF")
+ if !hasFile {
+ continue
+ }
break
}
+ hasFile = true
fmt.Println("next file is", fileHeader.Name)
fmt.Println("file size is", fileHeader.Size)
|
don't make empty commits when spouting
|
pachyderm_pachyderm
|
train
|
go
|
4c3e7a77a41e8f476d71f471ea1893eb430b335c
|
diff --git a/cheetah_lint/flake.py b/cheetah_lint/flake.py
index <HASH>..<HASH> 100644
--- a/cheetah_lint/flake.py
+++ b/cheetah_lint/flake.py
@@ -323,10 +323,18 @@ def check_indentation(cheetah_by_line_no):
return tuple(errors)
+def check_empty(cheetah_by_line_no):
+ if not ''.join(cheetah_by_line_no).strip():
+ return ((1, 'T005 File is empty'),)
+ else:
+ return ()
+
+
LINE_CHECKS = (
check_implements,
check_extends_cheetah_template,
check_indentation,
+ check_empty,
)
diff --git a/tests/flake_test.py b/tests/flake_test.py
index <HASH>..<HASH> 100644
--- a/tests/flake_test.py
+++ b/tests/flake_test.py
@@ -215,7 +215,7 @@ def test_find_bounds_above_and_below(py_line):
def test_get_flakes_trivial():
- assert get_flakes('') == ()
+ assert get_flakes('') == ((1, 'T005 File is empty'),)
def test_with_extends():
|
Make the trivial template an error. Resolves Yelp/yelp_cheetah#<I>
|
asottile_cheetah_lint
|
train
|
py,py
|
9a77742f365a3db99ced39fa68231f25467362ba
|
diff --git a/test/parser_test.rb b/test/parser_test.rb
index <HASH>..<HASH> 100644
--- a/test/parser_test.rb
+++ b/test/parser_test.rb
@@ -85,6 +85,15 @@ module Haml
end
end
+ test "case with indented whens should allow else" do
+ begin
+ parse "- foo = 1\n-case foo\n -when 1\n A\n -else\n B"
+ assert true
+ rescue SyntaxError
+ flunk 'case with indented whens should allow else'
+ end
+ end
+
private
def parse(haml, options = nil)
|
Add test for case with indented when clauses
Case statements where the subsequent when clauses are indented and
which have a trailing else cause a Haml::SyntaxError.
Add test to expose this.
|
haml_haml
|
train
|
rb
|
e70c0f066308360ba0a0984e3157db0873311309
|
diff --git a/spec/simple_matchers.rb b/spec/simple_matchers.rb
index <HASH>..<HASH> 100644
--- a/spec/simple_matchers.rb
+++ b/spec/simple_matchers.rb
@@ -26,3 +26,19 @@ def include_hash(hash)
given.merge(hash) == given
end
end
+
+def memory_usage
+ GC.start # Garbage collect
+ `ps -o rss= -p #{$$}`.strip.to_i
+end
+
+def leak_memory
+ simple_matcher("leak memory") do |given|
+ memory_before = memory_usage
+ given.call
+ memory_after = memory_usage
+ result = memory_after > memory_before
+ puts "#{memory_after} > #{memory_before}" if result
+ result
+ end
+end
|
Added simple matcher (currently unused) for observing memory leaks
|
markevans_dragonfly
|
train
|
rb
|
d590ef275cbb0e611e6f2dd0c8f2e8db04ed887f
|
diff --git a/src/Symfony/Component/Workflow/Tests/RegistryTest.php b/src/Symfony/Component/Workflow/Tests/RegistryTest.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Workflow/Tests/RegistryTest.php
+++ b/src/Symfony/Component/Workflow/Tests/RegistryTest.php
@@ -35,7 +35,13 @@ class RegistryTest extends TestCase
*/
public function testAddIsDeprecated()
{
- $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class));
+ $registry = new Registry();
+
+ $registry->add($w = new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class));
+
+ $workflow = $registry->get(new Subject1());
+ $this->assertInstanceOf(Workflow::class, $workflow);
+ $this->assertSame('workflow1', $workflow->getName());
}
public function testGetWithSuccess()
|
[Workflow] Avoid risky tests
|
symfony_symfony
|
train
|
php
|
aebce79a0596ded2f7e751d2b30add82d9533708
|
diff --git a/json2html/jsonconv.py b/json2html/jsonconv.py
index <HASH>..<HASH> 100644
--- a/json2html/jsonconv.py
+++ b/json2html/jsonconv.py
@@ -118,7 +118,7 @@ class JSON:
for k,v in ordered_json.iteritems():
convertedOutput = convertedOutput + '<tr>'
- convertedOutput = convertedOutput + '<th>'+ str(k) +'</th>'
+ convertedOutput = convertedOutput + '<th>'+ markup(k) +'</th>'
if (v == None):
v = unicode("")
|
fix of issue #<I>
prevents UnicodeEncodeError when a json-key contains non-ascii characters
|
softvar_json2html
|
train
|
py
|
5620e3bee50e0eb040baf161a300400ba90395b3
|
diff --git a/src/libs/Cron.php b/src/libs/Cron.php
index <HASH>..<HASH> 100644
--- a/src/libs/Cron.php
+++ b/src/libs/Cron.php
@@ -73,7 +73,10 @@ class Cron
ob_start();
- $controllerObj = new $controller( $app );
+ $controllerObj = new $controller;
+
+ if (method_exists($controllerObj, 'injectApp'))
+ $controllerObj->injectApp($this->app);
if( !method_exists( $controllerObj, 'cron' ) )
echo "$controller\-\>cron($command) does not exist\n";
|
use new way to inject app into controllers
|
infusephp_cron
|
train
|
php
|
2a1578665f7932fce470636a076714c949fbc9d0
|
diff --git a/lib/harvest/time_entry.rb b/lib/harvest/time_entry.rb
index <HASH>..<HASH> 100644
--- a/lib/harvest/time_entry.rb
+++ b/lib/harvest/time_entry.rb
@@ -17,6 +17,7 @@ module Harvest
element :created_at, Time
element :updated_at, Time
element :user_id, Integer
+ element :of_user, Integer
element :closed, Boolean, :tag => 'is-closed'
element :billed, Boolean, :tag => 'is-billed'
element :of_user, Integer
|
Added of_user element to time_entry and added it to the to_xml function
|
zmoazeni_harvested
|
train
|
rb
|
59793835cd50b85e1cbc9ee7aa5f4f23b7805fdb
|
diff --git a/src/Window.js b/src/Window.js
index <HASH>..<HASH> 100644
--- a/src/Window.js
+++ b/src/Window.js
@@ -1438,5 +1438,6 @@ global.onexit = () => {
}
AudioContext.Destroy();
+ nativeWindow.destroyThreadPool();
};
// global.setImmediate = undefined; // need this for the TLS implementation
|
Call native window destroy thread pool on exit
|
exokitxr_exokit
|
train
|
js
|
587f0e88e4307ca2d5f3d2bea5a524a015fac686
|
diff --git a/share/examples/plugins/templates/hooks.py b/share/examples/plugins/templates/hooks.py
index <HASH>..<HASH> 100755
--- a/share/examples/plugins/templates/hooks.py
+++ b/share/examples/plugins/templates/hooks.py
@@ -43,10 +43,10 @@ def post_init(setup_config):
# Example 2: initiate observer execution status
core_template_observer.ExecutionStatusObserver()
- import gtkmvc3_template_observer
- # Example 3: gtkmvc3 generale modification observer
+ import gtkmvc_template_observer
+ # Example 3: gtkmvc3 general modification observer
# initiate observer of root_state model-object which already implements a power full recursive notification pattern
- gtkmvc3_template_observer.RootStateModificationObserver()
+ gtkmvc_template_observer.RootStateModificationObserver()
# Example 4: gtkmvc3 meta signal observer
- gtkmvc3_template_observer.MetaSignalModificationObserver()
+ gtkmvc_template_observer.MetaSignalModificationObserver()
|
fix(plugin template): fix imports
those were accidently introduced by a automatic find-replace for gtkmvc
|
DLR-RM_RAFCON
|
train
|
py
|
dbbd25953eb4fcd2dc3dd26929652fdfd7bc4de1
|
diff --git a/src/main/java/hex/deeplearning/DeepLearning.java b/src/main/java/hex/deeplearning/DeepLearning.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hex/deeplearning/DeepLearning.java
+++ b/src/main/java/hex/deeplearning/DeepLearning.java
@@ -248,6 +248,7 @@ public class DeepLearning extends Job.ValidatedJob {
"variable_importances",
"force_load_balance",
"replicate_training_data",
+ "shuffle_training_data",
"single_node_mode",
};
|
Allow change in whether to shuffle training data after checkpoint restart.
|
h2oai_h2o-2
|
train
|
java
|
2f9a1f1d9962c23ab4d99e57c9ca9a095bee785b
|
diff --git a/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php b/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php
index <HASH>..<HASH> 100644
--- a/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php
+++ b/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php
@@ -44,7 +44,7 @@ class PersistenceCacheCollector extends DataCollector
/**
* Returns call count.
*
- * @deprecaterd since 7.5, use getStats().
+ * @deprecated since 7.5, use getStats().
*
* @return int
*/
|
fixed annotation typo y the persistence cache collector file (#<I>)
|
ezsystems_ezpublish-kernel
|
train
|
php
|
4b9e548dbfd061a86bce0856fb3d5d5259fa7a84
|
diff --git a/alchemyjsonschema/dictify.py b/alchemyjsonschema/dictify.py
index <HASH>..<HASH> 100644
--- a/alchemyjsonschema/dictify.py
+++ b/alchemyjsonschema/dictify.py
@@ -125,12 +125,12 @@ def normalize(ob, schema, convert=normalize_of, getter=dict.get, registry=normal
convert = partial(convert, registry=registry)
return dictify_properties(ob, schema["properties"], convert=convert, getter=getter)
+
def prepare(ob, schema, convert=prepare_of, getter=dict.get, registry=prepare_dict):
convert = partial(convert, registry=registry)
return dictify_properties(ob, schema["properties"], convert=convert, getter=getter)
-
def dictify_properties(ob, properties, convert, getter, marker=marker):
if ob is None:
return None
@@ -216,10 +216,10 @@ def _objectify(params, name, schema, modellookup):
if params is None:
return [] if type_ == "array" else None # xxx
- if name not in params:
- return None
- elif type_ == "array":
+ if type_ == "array":
return [_objectify_subobject(e, name, schema["items"], modellookup) for e in params.get(name, [])]
+ elif name not in params:
+ return None
elif type_ is None: # object
sub_params = params.get(name)
if sub_params is None:
|
fix bug on relatipnship list like property
|
podhmo_alchemyjsonschema
|
train
|
py
|
a8988357c1382207bf15a95e9b6c9a0a3963a8f2
|
diff --git a/spec/unit/type/file/mode_spec.rb b/spec/unit/type/file/mode_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/type/file/mode_spec.rb
+++ b/spec/unit/type/file/mode_spec.rb
@@ -192,4 +192,29 @@ describe Puppet::Type.type(:file).attrclass(:mode) do
(stat.mode & 0777).to_s(8).should == "644"
end
end
+
+ describe '#sync with a symbolic mode of +X for a file' do
+ let(:resource_sym) { Puppet::Type.type(:file).new :path => path, :mode => 'g+wX' }
+ let(:mode_sym) { resource_sym.property(:mode) }
+
+ before { FileUtils.touch(path) }
+
+ it 'does not change executable bit if no executable bit is set' do
+ Puppet::FileSystem.chmod(0644, path)
+
+ mode_sym.sync
+
+ stat = Puppet::FileSystem.stat(path)
+ (stat.mode & 0777).to_s(8).should == '664'
+ end
+
+ it 'does change executable bit if an executable bit is set' do
+ Puppet::FileSystem.chmod(0744, path)
+
+ mode_sym.sync
+
+ stat = Puppet::FileSystem.stat(path)
+ (stat.mode & 0777).to_s(8).should == '774'
+ end
+ end
end
|
(PUP-<I>) Add example to test for +X mode changes in file types.
Adding an example to test applying mode +X to files. For files, a mode
change of +X changes the requested executable bit only if there is
already an executable bit set in the permissions.
|
puppetlabs_puppet
|
train
|
rb
|
4e730d7b99d9a82e200b2a960c8a9bcb5cb92cda
|
diff --git a/src/Rememberable.php b/src/Rememberable.php
index <HASH>..<HASH> 100644
--- a/src/Rememberable.php
+++ b/src/Rememberable.php
@@ -11,7 +11,11 @@ trait Rememberable
protected static function bootRememberable()
{
if (static::rememberable()) {
- static::saving(function (Model $model) {
+ static::saved(function (Model $model) {
+ $model->flush(get_class($model).':'.$model->getKey());
+ });
+
+ static::deleted(function (Model $model) {
$model->flush(get_class($model).':'.$model->getKey());
});
}
|
Make rememberable cache flushes trigger on deletes too
|
ameliaikeda_rememberable
|
train
|
php
|
17def91ea3700801af767dffac5aad68a92875df
|
diff --git a/test/spec/ol/color.test.js b/test/spec/ol/color.test.js
index <HASH>..<HASH> 100644
--- a/test/spec/ol/color.test.js
+++ b/test/spec/ol/color.test.js
@@ -120,10 +120,6 @@ describe('ol.color', function() {
[0, 0, 255, 0.4711]);
});
- it.skip('caches parsed values', function() {
- // TODO is this untestable with named exports?
- });
-
it('throws an error on invalid colors', function() {
var invalidColors = ['tuesday', '#12345', '#1234567', 'rgb(255.0,0,0)'];
var i, ii;
|
Remove unneeded and already skipped test
|
openlayers_openlayers
|
train
|
js
|
afa7ee12155af25816aa94e74699ce94d920110f
|
diff --git a/twitter_ads/campaign.py b/twitter_ads/campaign.py
index <HASH>..<HASH> 100644
--- a/twitter_ads/campaign.py
+++ b/twitter_ads/campaign.py
@@ -177,6 +177,7 @@ resource_property(LineItem, 'bid_unit')
resource_property(LineItem, 'automatically_select_bid', transform=TRANSFORM.BOOL)
resource_property(LineItem, 'bid_amount_local_micro')
resource_property(LineItem, 'total_budget_amount_local_micro')
+resource_property(LineItem, 'bid_type')
class Tweet(object):
|
Add bid_type property to LineItem (#<I>)
|
twitterdev_twitter-python-ads-sdk
|
train
|
py
|
ed9459c38e620f9e748ff37c93a197e645ab1bd2
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -1,7 +1,7 @@
var nthCheck = require("./"),
assert = require("assert");
-var invalid = ["-", "asdf", "2n+-0", "2+0", "- 1n", "-1 n"];
+var invalid = ["-", "- 1n", "-1 n", "2+0", "2n+-0", "an+b", "asdf", "b", "expr", "odd|even|x"];
function parseInvalid(){
invalid.forEach(function(formula){
|
reordered, added invalid tests
|
fb55_nth-check
|
train
|
js
|
9d98793ccc9b4ce2341051851aa29c9df4d65917
|
diff --git a/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php b/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php
+++ b/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php
@@ -59,5 +59,3 @@ class Version20130911165500 extends AbstractMigration {
}
}
-
-?>
\ No newline at end of file
|
[TASK] CGL Cleanup
This change is purely cosmetic and fixes CGL issues.
Change-Id: I<I>dac<I>cd<I>f9cd1c<I>e<I>a<I>e<I>d2fc0c
Releases: master, <I>
Reviewed-on: <URL>
|
neos_neos-development-collection
|
train
|
php
|
61d6824da0d33971167b76ce03a5afc121bc1a95
|
diff --git a/cdpybio/bedtools.py b/cdpybio/bedtools.py
index <HASH>..<HASH> 100644
--- a/cdpybio/bedtools.py
+++ b/cdpybio/bedtools.py
@@ -1,3 +1,4 @@
+import copy
import pandas as pd
import pybedtools as pbt
@@ -46,6 +47,7 @@ def beds_to_boolean(beds, ref=None, beds_sorted=False, ref_sorted=False,
that overlaps each interval in the reference bed file.
"""
+ beds = copy.deepcopy(beds)
fns = []
for i,v in enumerate(beds):
if type(v) == str:
@@ -101,6 +103,7 @@ def combine(beds, beds_sorted=False, postmerge=True):
New sorted BedTool with intervals from all input beds.
"""
+ beds = copy.deepcopy(beds)
for i,v in enumerate(beds):
if type(v) == str:
beds[i] = pbt.BedTool(v)
|
Update
Make deepcopy of input bed file list to avoid changing values.
|
cdeboever3_cdpybio
|
train
|
py
|
4f3460bf30b962cf2118509a3e99e953787684a0
|
diff --git a/pelix/http/basic.py b/pelix/http/basic.py
index <HASH>..<HASH> 100644
--- a/pelix/http/basic.py
+++ b/pelix/http/basic.py
@@ -636,7 +636,7 @@ class HttpService(object):
self._logger = logging.getLogger(self._logger_name)
if self._logger_level is None:
- self._logger_level = logging.root.level
+ self._logger.level = logging.INFO
else:
self._logger.level = int(self._logger_level)
|
The default level of HTTP logging is now INFO
INFO level allows to print component records and errors, but hides the requests records
|
tcalmant_ipopo
|
train
|
py
|
033c29a26caaead53790995d826afd52ad804f4c
|
diff --git a/builtin/logical/database/path_config_connection.go b/builtin/logical/database/path_config_connection.go
index <HASH>..<HASH> 100644
--- a/builtin/logical/database/path_config_connection.go
+++ b/builtin/logical/database/path_config_connection.go
@@ -8,6 +8,7 @@ import (
"strings"
"github.com/fatih/structs"
+ "github.com/hashicorp/errwrap"
uuid "github.com/hashicorp/go-uuid"
"github.com/hashicorp/vault/sdk/database/dbplugin"
"github.com/hashicorp/vault/sdk/framework"
@@ -217,7 +218,7 @@ func (b *databaseBackend) connectionDeleteHandler() framework.OperationFunc {
err := req.Storage.Delete(ctx, fmt.Sprintf("config/%s", name))
if err != nil {
- return nil, errors.New("failed to delete connection configuration")
+ return nil, errwrap.Wrapf("failed to delete connection configuration: {{err}}", err)
}
if err := b.ClearConnection(name); err != nil {
|
Fix issue deleting DB connections on Secondaries (#<I>)
|
hashicorp_vault
|
train
|
go
|
b9cf258dd138aa673e8d25f9d7bac32b64f7bf5f
|
diff --git a/lib/actions/DashDeploy.js b/lib/actions/DashDeploy.js
index <HASH>..<HASH> 100644
--- a/lib/actions/DashDeploy.js
+++ b/lib/actions/DashDeploy.js
@@ -113,7 +113,6 @@ module.exports = function(SPlugin, serverlessPath) {
// Flow
return BbPromise.try(function() {
- SCli.asciiGreeting();
})
.bind(_this)
.then(_this._validateAndPrepare)
@@ -239,6 +238,9 @@ module.exports = function(SPlugin, serverlessPath) {
}
}
+ // Show ASCII
+ SCli.asciiGreeting();
+
// Show select input
return _this.cliPromptSelect(_this.componentName + '/' + _this.moduleName + ' - Select the functions and endpoints you wish to deploy', choices, true, 'Deploy')
.then(function(items) {
|
DashDeploy: don't show ASCII if not in correct folder
|
serverless_serverless
|
train
|
js
|
f124e6420788c4e724f05f899b7eebd4e86afe2b
|
diff --git a/phy/io/mock/artificial.py b/phy/io/mock/artificial.py
index <HASH>..<HASH> 100644
--- a/phy/io/mock/artificial.py
+++ b/phy/io/mock/artificial.py
@@ -48,6 +48,10 @@ def artificial_spike_times(n_spikes, max_isi=50):
return np.cumsum(nr.randint(low=0, high=max_isi, size=n_spikes))
+def artificial_correlograms(n_clusters, n_samples):
+ return nr.uniform(size=(n_clusters, n_clusters, n_samples))
+
+
#------------------------------------------------------------------------------
# Artificial Model
#------------------------------------------------------------------------------
|
Added artificial correlograms.
|
kwikteam_phy
|
train
|
py
|
96087d8bbfa9bc3c72483f00a7a26adda7ec4c8f
|
diff --git a/visidata/threads.py b/visidata/threads.py
index <HASH>..<HASH> 100644
--- a/visidata/threads.py
+++ b/visidata/threads.py
@@ -380,6 +380,7 @@ def codestr(code):
return code.co_name
ThreadsSheet.addCommand('^C', 'cancel-thread', 'cancelThread(cursorRow)', 'abort thread at current row')
+ThreadsSheet.addCommand(None, 'add-row', 'fail("cannot add new rows on Threads Sheet")', 'invalid command')
ProfileSheet.addCommand('z^S', 'save-profile', 'source.dump_stats(input("save profile to: ", value=name+".prof"))', 'save profile')
|
[threads] disable add-row on ThreadsSheet #<I>
|
saulpw_visidata
|
train
|
py
|
1b9d06231700023aefb70cc9bb95438e23cd75f1
|
diff --git a/pyemu/utils/helpers.py b/pyemu/utils/helpers.py
index <HASH>..<HASH> 100644
--- a/pyemu/utils/helpers.py
+++ b/pyemu/utils/helpers.py
@@ -64,7 +64,7 @@ def start_slaves(slave_dir,exe_rel_path,pst_rel_path,num_slaves=None,slave_root=
new_slave_dir = os.path.join(slave_root,"slave_{0}".format(i))
if os.path.exists(new_slave_dir):
try:
- shutil.rmtree(new_slave_dir, onerror=del_rw)
+ shutil.rmtree(new_slave_dir)#, onerror=del_rw)
except Exception as e:
raise Exception("unable to remove existing slave dir:" + \
"{0}\n{1}".format(new_slave_dir,str(e)))
|
bug fix in start_slaves
|
jtwhite79_pyemu
|
train
|
py
|
31600752f4a865c6eef979375a41197344de6e0b
|
diff --git a/app/helpers/menu.rb b/app/helpers/menu.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/menu.rb
+++ b/app/helpers/menu.rb
@@ -22,8 +22,8 @@ module Menu
end
end
def render_menu(level)
- @menu_items ||=create_menu
- render_navigation(:items=>@menu_items, :expand_all=>true, :level => level)
+ @menu_items ||= create_menu
+ render_navigation(:items=>Support.deep_copy(@menu_items), :expand_all=>true, :level => level)
end
def create_menu
diff --git a/app/models/support.rb b/app/models/support.rb
index <HASH>..<HASH> 100644
--- a/app/models/support.rb
+++ b/app/models/support.rb
@@ -14,4 +14,10 @@ module Support
def Support.deep_copy object
Marshal::load(Marshal.dump(object))
end
+
+ def Support.time
+ a = Time.now
+ yield
+ Time.now - a
+ end
end
|
Added code to fix a menu highlighting issue
|
Katello_katello
|
train
|
rb,rb
|
f8cb326e1c52fffb17e543e0400d796092076efe
|
diff --git a/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java b/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java
index <HASH>..<HASH> 100644
--- a/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java
+++ b/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java
@@ -33,7 +33,7 @@ public class LoggingAspect {
@AfterThrowing(pointcut = "loggingPointcut()", throwing = "e")
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
if (env.acceptsProfiles(Constants.SPRING_PROFILE_DEVELOPMENT)) {
- log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(),
+ log.error("Exception in {}.{}() with cause = {} and exception {}", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), e.getCause(), e);
} else {
log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(),
|
Correct logging aspect number of params in msg
Correct logging aspect number of params in msg
|
jhipster_generator-jhipster
|
train
|
java
|
3d8db488d44029c6442dd0db471e942007a2f4ec
|
diff --git a/forms/FieldList.php b/forms/FieldList.php
index <HASH>..<HASH> 100644
--- a/forms/FieldList.php
+++ b/forms/FieldList.php
@@ -550,7 +550,12 @@ class FieldList extends ArrayList {
public function makeFieldReadonly($field) {
$fieldName = ($field instanceof FormField) ? $field->getName() : $field;
$srcField = $this->dataFieldByName($fieldName);
- $this->replaceField($fieldName, $srcField->performReadonlyTransformation());
+ if($srcField) {
+ $this->replaceField($fieldName, $srcField->performReadonlyTransformation());
+ }
+ else {
+ user_error("Trying to make field '$fieldName' readonly, but it does not exist in the list",E_USER_WARNING);
+ }
}
/**
|
Have a clear error message
Because it's really annoying not knowing which field causes the error
|
silverstripe_silverstripe-framework
|
train
|
php
|
c91001a24c97c5085e202ab788532aef082672b6
|
diff --git a/core-bundle/src/Resources/contao/classes/Versions.php b/core-bundle/src/Resources/contao/classes/Versions.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/classes/Versions.php
+++ b/core-bundle/src/Resources/contao/classes/Versions.php
@@ -630,7 +630,7 @@ class Versions extends \Controller
// Add the "even" and "odd" classes
foreach ($arrVersions as $k=>$v)
{
- $arrVersions[$k]['class'] = (++$intCount%2 == 0) ? 'even' : 'odd';
+ $arrVersions[$k]['class'] = (++$intCount % 2 == 0) ? 'even' : 'odd';
try
{
@@ -646,6 +646,13 @@ class Versions extends \Controller
--$intCount;
unset($arrVersions[$k]);
}
+
+ // Skip deleted files (see #8480)
+ if ($v['fromTable'] == 'tl_files' && $arrVersions[$k]['deleted'])
+ {
+ --$intCount;
+ unset($arrVersions[$k]);
+ }
}
$objTemplate->versions = $arrVersions;
|
[Core] Do not show version entries of deleted files (see #<I>).
|
contao_contao
|
train
|
php
|
f15653bd7cc28dacc1ed1969931b606043ed5765
|
diff --git a/integration/v7/isolated/curl_command_test.go b/integration/v7/isolated/curl_command_test.go
index <HASH>..<HASH> 100644
--- a/integration/v7/isolated/curl_command_test.go
+++ b/integration/v7/isolated/curl_command_test.go
@@ -473,7 +473,13 @@ var _ = Describe("curl command", func() {
Expect(session).Should(Say("X-Bar: bar"))
Expect(session).Should(Say("X-Foo: foo"))
- Expect(session).Should(Say(jsonBody))
+ contents := string(session.Out.Contents())
+ outputContents := contents[strings.Index(contents, "X-Foo: foo"):]
+ jsonStartsAt := strings.Index(outputContents, "{")
+ jsonEndsAt := strings.Index(outputContents[jsonStartsAt:], "}")
+
+ actualJSON := outputContents[jsonStartsAt : jsonStartsAt+jsonEndsAt+1]
+ Expect(actualJSON).To(MatchJSON(jsonBody))
Expect(session).Should(Say("RESPONSE:"))
|
curl json output changes requires more complex output validation
This change corrisponds to the same change done in
<I>a<I>ba<I>e2bbe<I>d<I>c<I>cefa<I>abaaf.
|
cloudfoundry_cli
|
train
|
go
|
4c67e7f63aa10943f150e83fb2ff70768ede77ca
|
diff --git a/source/rafcon/statemachine/library_manager.py b/source/rafcon/statemachine/library_manager.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/statemachine/library_manager.py
+++ b/source/rafcon/statemachine/library_manager.py
@@ -85,6 +85,8 @@ class LibraryManager(Observable):
@staticmethod
def _clean_path(path):
+ path = path.replace('"', '')
+ path = path.replace("'", '')
# Replace ~ with /home/user
path = os.path.expanduser(path)
# Replace environment variables
|
Allow library paths to be wrapped in quotations marks
|
DLR-RM_RAFCON
|
train
|
py
|
9aba49479b435dea44998fb5a4b7e99bc0a5967e
|
diff --git a/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java b/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java
index <HASH>..<HASH> 100644
--- a/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java
+++ b/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java
@@ -51,11 +51,13 @@ public class InStreamOptionsTest {
@Test
public void modifiedConfTest() {
+ TachyonConf originalConf = ClientContext.getConf();
TachyonConf conf = new TachyonConf();
conf.set(Constants.USER_FILE_READ_TYPE_DEFAULT, ReadType.NO_CACHE.toString());
Whitebox.setInternalState(ClientContext.class, "sTachyonConf", conf);
InStreamOptions options = InStreamOptions.defaults();
Assert.assertEquals(ReadType.NO_CACHE.getTachyonStorageType(), options.getTachyonStorageType());
+ Whitebox.setInternalState(ClientContext.class, "sTachyonConf", originalConf);
}
}
|
restore conf in instream test.
|
Alluxio_alluxio
|
train
|
java
|
3ee43318ea601bb086f0bdc57230dea7761fa99e
|
diff --git a/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py b/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py
index <HASH>..<HASH> 100644
--- a/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py
+++ b/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py
@@ -32,7 +32,7 @@ class GoDistribution(object):
register('--supportdir', advanced=True, default='bin/go',
help='Find the go 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='1.5.2',
+ register('--version', advanced=True, default='1.5.3',
help='Go distribution version. Used as part of the path to lookup the distribution '
'with --binary-util-baseurls and --pants-bootstrapdir')
|
Bump the default Go distribution to <I>.
This picks up a security related fix.
Release announcement here:
<URL>
|
pantsbuild_pants
|
train
|
py
|
6182ab2d7d5da97acf87a30d5e415230d82232fe
|
diff --git a/commands/topics_info.js b/commands/topics_info.js
index <HASH>..<HASH> 100644
--- a/commands/topics_info.js
+++ b/commands/topics_info.js
@@ -38,7 +38,7 @@ function topicInfo (topic) {
},
{
name: 'Replication Factor',
- values: [`${topic.replication_factor} (recommend > 1)`]
+ values: [`${topic.replication_factor}`]
}
]
diff --git a/test/commands/topics_info_test.js b/test/commands/topics_info_test.js
index <HASH>..<HASH> 100644
--- a/test/commands/topics_info_test.js
+++ b/test/commands/topics_info_test.js
@@ -62,7 +62,7 @@ describe('kafka:topics:info', () => {
Producers: 0 messages/second (0 bytes/second) total
Consumers: 0 bytes/second total
Partitions: 3 partitions
-Replication Factor: 3 (recommend > 1)
+Replication Factor: 3
Compaction: Compaction is disabled for topic-1
Retention: 24 hours
`))
|
remove replication factor recommendation (#<I>)
|
heroku_heroku-kafka-jsplugin
|
train
|
js,js
|
13bfb994c33391a948f617f0a6ae390569ca68f1
|
diff --git a/nion/swift/model/DocumentModel.py b/nion/swift/model/DocumentModel.py
index <HASH>..<HASH> 100644
--- a/nion/swift/model/DocumentModel.py
+++ b/nion/swift/model/DocumentModel.py
@@ -1095,6 +1095,10 @@ class DocumentModel(Observable.Observable, ReferenceCounting.ReferenceCounted, P
def close(self):
# stop computations
with self.__computation_queue_lock:
+ for computation_queue_item in self.__computation_queue:
+ if computation_queue_item.finish_event:
+ computation_queue_item.finish_event.set()
+ computation_queue_item.finish_event = None
self.__computation_queue.clear()
# close hardware source related stuff
|
Fix deadlock when closing computation queue at exit.
|
nion-software_nionswift
|
train
|
py
|
cc0f37c5b6b729f96050eb8e385f52bcde34524f
|
diff --git a/owslib/iso.py b/owslib/iso.py
index <HASH>..<HASH> 100644
--- a/owslib/iso.py
+++ b/owslib/iso.py
@@ -541,7 +541,7 @@ class SV_ServiceIdentification(object):
self.version = None
self.fees = None
self.bbox = None
- self.couplingtype
+ self.couplingtype = None
self.operations = []
self.operateson = []
else:
@@ -661,7 +661,7 @@ class EX_Polygon(object):
class EX_GeographicBoundingPolygon(object):
def __init__(self, md=None):
if md is None:
- self.is_extent
+ self.is_extent = None
self.polygons = []
else:
val = md.find(util.nspath_eval('gmd:extentTypeCode', namespaces))
|
Added missing initializations (thanks Matej Krejci)
|
geopython_OWSLib
|
train
|
py
|
6f261598a86e9f68b5f420ff8f3dcbb63eaafb97
|
diff --git a/src/Plugin.php b/src/Plugin.php
index <HASH>..<HASH> 100644
--- a/src/Plugin.php
+++ b/src/Plugin.php
@@ -72,6 +72,11 @@ class Plugin extends AbstractPlugin
$requestId = uniqid();
$this->logger->debug('[' . $requestId . ']Found url: ' . $url);
+ if (count($parsedUrl) == 1 && isset($parsedUrl['path'])) {
+ $url = 'http://' . $parsedUrl['path'] . '/';
+ $this->logger->debug('[' . $requestId . ']Corrected url: ' . $url);
+ }
+
if ($this->emitUrlEvents($requestId, $url, $event, $queue)) {
$this->logger->debug('[' . $requestId . ']Emitting: http.request');
$logger = $this->logger;
|
Corrected URL when only a hostname is found
|
phergie_phergie-irc-plugin-react-url
|
train
|
php
|
da3107fc5ea89b12d28aaf523026667a9d0900d7
|
diff --git a/src/Handler.php b/src/Handler.php
index <HASH>..<HASH> 100644
--- a/src/Handler.php
+++ b/src/Handler.php
@@ -7,6 +7,6 @@ interface Handler
public function read($id);
public function write($id, $data);
public function destroy($id);
- public function gc();
+ public function gc($maxlifetime);
}
|
for compatibility with phps built-in interface
|
monolyth-php_cesession
|
train
|
php
|
3ddc35a880d79b5fe11196faaadca5d3006e8df9
|
diff --git a/lib/queue/worker.js b/lib/queue/worker.js
index <HASH>..<HASH> 100644
--- a/lib/queue/worker.js
+++ b/lib/queue/worker.js
@@ -175,6 +175,8 @@ Worker.prototype.getJob = function(fn){
// BLPOP indicates we have a new inactive job to process
client.blpop('q:' + self.type + ':jobs', 0, function(err) {
+ // Set job to a temp value so shutdown() knows to wait
+ self.job = true;
self.zpop('q:jobs:' + self.type + ':inactive', function(err, id){
if (err) return fn(err);
if (!id) return fn();
@@ -196,9 +198,6 @@ Worker.prototype.shutdown = function(fn, timeout) {
if (!this.running) return fn();
this.running = false;
- // Close redis connection (if zpopping, break it)
- this.client.end();
-
// As soon as we're free, signal that we're done
if (!this.job) return fn();
|
Fix race condition with blpop/zpop flow & shutdown
|
Automattic_kue
|
train
|
js
|
13856ca9c4df44774964a254a703f707598b5f66
|
diff --git a/python/setup.py b/python/setup.py
index <HASH>..<HASH> 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -35,7 +35,7 @@ if platform == 'darwin':
setup(
name = 'cm_api',
- version = '10.0.0', # Compatible with API v10 (CM 5.4)
+ version = '11.0.0', # Compatible with API v11 (CM 5.5)
packages = find_packages('src', exclude=['cm_api_tests']),
package_dir = {'cm_api': 'src/cm_api',
'cm_shell': 'src/cm_shell'},
diff --git a/python/src/cm_api/api_client.py b/python/src/cm_api/api_client.py
index <HASH>..<HASH> 100644
--- a/python/src/cm_api/api_client.py
+++ b/python/src/cm_api/api_client.py
@@ -30,7 +30,7 @@ __docformat__ = "epytext"
LOG = logging.getLogger(__name__)
API_AUTH_REALM = "Cloudera Manager"
-API_CURRENT_VERSION = 10
+API_CURRENT_VERSION = 11
class ApiException(RestException):
"""
|
Bump API version to <I> for CM <I>
|
cloudera_cm_api
|
train
|
py,py
|
b44615b01362c71593c15f44d93886d233d6e9a6
|
diff --git a/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java b/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java
index <HASH>..<HASH> 100644
--- a/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java
+++ b/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java
@@ -37,8 +37,8 @@ import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.io.serializer.WritableSerialization;
/**
- * A job that imports data from Cloud Storage bucket with SequenceFile format into Cloud Bigtable. This job
- * can be run directly or as a Dataflow template.
+ * A job that imports data from Cloud Storage bucket with HBase SequenceFile format into Cloud Bigtable.
+ * This job can be run directly or as a Dataflow template.
*
* <p>Execute the following command to run the job directly:
*
|
Mention "HBase" SequenceFile in ImportJob (#<I>)
|
googleapis_cloud-bigtable-client
|
train
|
java
|
43715375140086f795003f9361774cd0cc63b528
|
diff --git a/taggit_selectize/widgets.py b/taggit_selectize/widgets.py
index <HASH>..<HASH> 100644
--- a/taggit_selectize/widgets.py
+++ b/taggit_selectize/widgets.py
@@ -12,7 +12,7 @@ except ImportError:
class TagSelectize(forms.TextInput):
- def render(self, name, value, attrs=None):
+ def render(self, name, value, attrs=None, renderer=None):
if value is not None and not isinstance(value, six.string_types):
value = edit_string_for_tags([o.tag for o in value.select_related("tag")])
html = super(TagSelectize, self).render(name, value, attrs)
|
Add support for Django <I>
Django <I> removed support for Widget.render() methods without the renderer
argument.
|
chhantyal_taggit-selectize
|
train
|
py
|
15d68b33bfee95a448c4da37dbe876baa8fcb5b6
|
diff --git a/lib/version.go b/lib/version.go
index <HASH>..<HASH> 100644
--- a/lib/version.go
+++ b/lib/version.go
@@ -16,5 +16,5 @@ package docker2aci
import "github.com/appc/spec/schema"
-var Version = "0.12.2+git"
+var Version = "0.12.3"
var AppcVersion = schema.AppContainerVersion
|
version: bump to <I>
|
appc_docker2aci
|
train
|
go
|
4d9b52e5b87a1b6069bc0af758be227848c52351
|
diff --git a/lib/flapjack/gateways/pagerduty.rb b/lib/flapjack/gateways/pagerduty.rb
index <HASH>..<HASH> 100644
--- a/lib/flapjack/gateways/pagerduty.rb
+++ b/lib/flapjack/gateways/pagerduty.rb
@@ -216,7 +216,7 @@ module Flapjack
http = EM::HttpRequest.new(url).get(options)
begin
response = Oj.load(http.response)
- rescue Exception
+ rescue Oj::Error
@logger.error("failed to parse json from a post to #{url} ... response headers and body follows...")
return nil
end
|
be more specific with json parsing rescue
|
flapjack_flapjack
|
train
|
rb
|
bffbcbdee506776923196f19d9cce348625e7daf
|
diff --git a/src/org/zaproxy/zap/view/ScanPanel2.java b/src/org/zaproxy/zap/view/ScanPanel2.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/view/ScanPanel2.java
+++ b/src/org/zaproxy/zap/view/ScanPanel2.java
@@ -545,6 +545,8 @@ public abstract class ScanPanel2<GS extends GenericScanner2, SC extends ScanCont
progressModel.removeAllElements();
progressSelect.addItem(selectScanEntry);
progressSelect.setSelectedIndex(0);
+
+ clearScansButton.setEnabled(false);
}
public void sessionScopeChanged(Session session) {
|
Disable 'clean completed scans' button when resetting the scanner panel
Change the method ScanPanel2.reset() to disable clearScansButton,
otherwise it would be kept enabled even if there were no scans present
in the panel (for example, after creating a new session).
|
zaproxy_zaproxy
|
train
|
java
|
06975eb911411c3d036a910dd38c7b63c6ebc2a7
|
diff --git a/src/main/docs/resources/js/multi-language-sample.js b/src/main/docs/resources/js/multi-language-sample.js
index <HASH>..<HASH> 100644
--- a/src/main/docs/resources/js/multi-language-sample.js
+++ b/src/main/docs/resources/js/multi-language-sample.js
@@ -171,7 +171,23 @@ function createCopyToClipboardElement() {
return copyToClipboardDiv;
}
+function postProcessCodeCallouts() {
+ var calloutClass = "conum";
+ var matches = document.querySelectorAll("b."+calloutClass);
+ if (matches != null) {
+ matches.forEach(function(item) {
+ var number = item.textContent.replace("(", "").replace(")", "");
+ var i = document.createElement('i');
+ i.setAttribute("class","conum");
+ i.setAttribute("data-value", number);
+ item.parentNode.insertBefore(i, item);
+ item.removeAttribute("class");
+ });
+ }
+}
+
document.addEventListener("DOMContentLoaded", function(event) {
addCopyToClipboardButtons();
postProcessCodeBlocks();
+ postProcessCodeCallouts();
});
\ No newline at end of file
|
Fix code callouts not being highlighted
|
micronaut-projects_micronaut-core
|
train
|
js
|
4cdca20ee7af0f4610115d8f19475b7bfb3d34d4
|
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
@@ -118,7 +118,7 @@ module Ronin
# @since 0.4.0
#
def Installation.each_file_in(directory,&block)
- directory = File.join(File.expand_path(directory),'')
+ directory = File.join(directory,'')
Installation.each_file do |file,gem|
if file[0..directory.length] == directory
|
Don't expand the directory path given to Installation.each_file_in.
|
ronin-ruby_ronin
|
train
|
rb
|
b465d0781f6c63ec039f9c10cd6097a095dd21d3
|
diff --git a/test/test_capture_output.py b/test/test_capture_output.py
index <HASH>..<HASH> 100644
--- a/test/test_capture_output.py
+++ b/test/test_capture_output.py
@@ -1,13 +1,25 @@
+import pytest
+
from noodles import run_process, schedule, serial
+try:
+ import msgpack # noqa
+ has_msgpack = True
+except ImportError:
+ has_msgpack = False
@schedule
def writes_to_stdout():
print("Hello Noodles!")
return 42
-
+@pytest.mark.skipif(not has_msgpack, reason="msgpack needed.")
def test_capture_output():
a = writes_to_stdout()
result = run_process(a, n_processes=1, registry=serial.base, use_msgpack=True)
assert result == 42
+
+def test_capture_output_nomsgpack():
+ a = writes_to_stdout()
+ result = run_process(a, n_processes=1, registry=serial.base, use_msgpack=False)
+ assert result == 42
|
add skiptest when msgpack not installed and test without it
|
NLeSC_noodles
|
train
|
py
|
1a3a1f58c2ca0d775459cf2ae5ef438c785a0d2a
|
diff --git a/anharmonic/phonon3/__init__.py b/anharmonic/phonon3/__init__.py
index <HASH>..<HASH> 100644
--- a/anharmonic/phonon3/__init__.py
+++ b/anharmonic/phonon3/__init__.py
@@ -787,22 +787,3 @@ class Phono3pyJointDos:
temperatures=self._temperatures,
filename=self._filename,
is_nosym=self._is_nosym)
-
-def get_gruneisen_parameters(fc2,
- fc3,
- supercell,
- primitive,
- nac_params=None,
- nac_q_direction=None,
- ion_clamped=False,
- factor=None,
- symprec=1e-5):
- return Gruneisen(fc2,
- fc3,
- supercell,
- primitive,
- nac_params=nac_params,
- nac_q_direction=nac_q_direction,
- ion_clamped=ion_clamped,
- factor=factor,
- symprec=symprec)
|
get_gruneisen_parameters is moved to newly created gruneisen.py.
|
atztogo_phonopy
|
train
|
py
|
38b3455a6872741e5a68c71d98d8e60af2d9567c
|
diff --git a/troposphere/imagebuilder.py b/troposphere/imagebuilder.py
index <HASH>..<HASH> 100644
--- a/troposphere/imagebuilder.py
+++ b/troposphere/imagebuilder.py
@@ -144,3 +144,15 @@ class Component(AWSObject):
'Uri': (basestring, False),
'Version': (basestring, True),
}
+
+
+class Image(AWSObject):
+ resource_type = "AWS::ImageBuilder::Image"
+
+ props = {
+ 'DistributionConfigurationArn': (basestring, False),
+ 'ImageRecipeArn': (basestring, True),
+ 'ImageTestsConfiguration': (ImageTestsConfiguration, True),
+ 'InfrastructureConfigurationArn': (basestring, True),
+ 'Tags': (json_checker, False),
+ }
|
Adding AWS::ImageBuilder::Image object, per May 7, <I> update
|
cloudtools_troposphere
|
train
|
py
|
602de65e07c64143f768567430b050be6c41a151
|
diff --git a/src/Matcher.php b/src/Matcher.php
index <HASH>..<HASH> 100644
--- a/src/Matcher.php
+++ b/src/Matcher.php
@@ -7,7 +7,7 @@ class Matcher
private static $rules = [
"/^(true|false)$/i" => '_parseBooleanConstant',
"/^(['\"])(?:(?!\\1).)*\\1$/" => '_parseStringConstant',
- "/^[a-zA-Z+]$/" => '_parseIdentifier',
+ "/^[a-zA-Z]+$/" => '_parseIdentifier',
"/^_$/" => '_parseWildcard',
"/^\\[.*\\]$/" => '_parseArray',
];
diff --git a/tests/PHPFunctional/PatternMatching/Matcher.php b/tests/PHPFunctional/PatternMatching/Matcher.php
index <HASH>..<HASH> 100644
--- a/tests/PHPFunctional/PatternMatching/Matcher.php
+++ b/tests/PHPFunctional/PatternMatching/Matcher.php
@@ -72,6 +72,7 @@ class Matcher extends atoum
$function = function($a) { return $a; };
$this->variable(M::match($value, ['a' => $function]))->isEqualTo($value);
+ $this->variable(M::match($value, ['longIdentifier' => $function]))->isEqualTo($value);
}
public function identifierDataProvider()
|
fix: identifiers can be more than one char long
|
functional-php_pattern-matching
|
train
|
php,php
|
5664fb3ba22fac8863ff5913550ddf9fab78bb38
|
diff --git a/src/utils/reducer-store.js b/src/utils/reducer-store.js
index <HASH>..<HASH> 100644
--- a/src/utils/reducer-store.js
+++ b/src/utils/reducer-store.js
@@ -27,11 +27,13 @@ class ReducerStore {
* name lookup. If no name is found then it takes `sum` as the default reducer.
* @return {ReducerStore} Returns instance of the singleton store in page.
*/
- defaultReducer (reducer) {
- if (!reducer) {
+ defaultReducer (...params) {
+ if (!params.length) {
return this.store.get('defReducer');
}
+ let reducer = params[0];
+
if (typeof reducer === 'function') {
this.store.set('defReducer', reducer);
} else {
|
Check params length in defaultReducer function to identify getter and setter behaviour
|
chartshq_datamodel
|
train
|
js
|
09ef450dcdb87ac587d56efaafe0674efa448460
|
diff --git a/lib/active_admin/application.rb b/lib/active_admin/application.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/application.rb
+++ b/lib/active_admin/application.rb
@@ -131,7 +131,6 @@ module ActiveAdmin
# to allow for changes without having to restart the server.
def unload!
namespaces.values.each{|namespace| namespace.unload! }
- #self.namespaces = {}
@@loaded = false
end
diff --git a/lib/active_admin/comments.rb b/lib/active_admin/comments.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/comments.rb
+++ b/lib/active_admin/comments.rb
@@ -18,9 +18,8 @@ ActiveAdmin::Resource.send :include, ActiveAdmin::Comments::ResourceHelper
ActiveAdmin.application.view_factory.show_page.send :include, ActiveAdmin::Comments::ShowPageHelper
# Generate a Comment resource when namespaces are registered
-ActiveAdmin::Event.subscribe ActiveAdmin::Application::LoadEvent,
- ActiveAdmin::Namespace::RegisterEvent do |_|
- ActiveAdmin.application.namespaces.values.each do |namespace|
+ActiveAdmin::Event.subscribe ActiveAdmin::Application::LoadEvent do |app|
+ app.namespaces.values.each do |namespace|
if namespace.comments?
namespace.register ActiveAdmin::Comment, :as => 'Comment' do
actions :index, :show, :create
|
Reload the comments when the application reloads
|
activeadmin_activeadmin
|
train
|
rb,rb
|
aa5d19a36d562c9c17a970b35df760ba27d71977
|
diff --git a/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java b/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java
+++ b/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java
@@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequestWrapper;
import com.ibm.websphere.ras.Tr;
import com.ibm.websphere.ras.TraceComponent;
import com.ibm.websphere.ras.annotation.Trivial;
+import com.ibm.ws.ffdc.annotation.FFDCIgnore;
import com.ibm.ws.security.common.TraceConstants;
import com.ibm.ws.webcontainer.internalRuntimeExport.srt.IPrivateRequestAttributes;
|
Update WebUtils to resolve conflict
|
OpenLiberty_open-liberty
|
train
|
java
|
d1b0fe97c93cf93856c4005eb262729255fabd7a
|
diff --git a/source/OrderProcessor.php b/source/OrderProcessor.php
index <HASH>..<HASH> 100644
--- a/source/OrderProcessor.php
+++ b/source/OrderProcessor.php
@@ -112,14 +112,17 @@ class OrderProcessor
* @param array $workflowConfig Payment workflow config
* @param OrderInterface $order Order for processing
* @param array $callbackData Paynet callback data (optional)
- *
- * @return Response Current workflow query response
*/
public function executeWorkflow( $workflowName,
array $workflowConfig,
OrderInterface $order,
array $callbackData = array())
{
+ if ($order->getState() == OrderInterface::STATE_END)
+ {
+ return;
+ }
+
try
{
$response = $this->getWorkflow($workflowName, $workflowConfig)
@@ -146,8 +149,6 @@ class OrderProcessor
$this->fireEvent(self::EVENT_REDIRECT_RECEIVED, $order, $response);
break;
}
-
- return $response;
}
/**
|
ExecuteWorkflow now returns void but check the status of order to avoid exception throwing if order is ended.
|
payneteasy_php-library-payneteasy-api
|
train
|
php
|
082b5a8753927fdafa127fa9c7b9b9c12b43a64a
|
diff --git a/lib/Doctrine/ODM/PHPCR/UnitOfWork.php b/lib/Doctrine/ODM/PHPCR/UnitOfWork.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ODM/PHPCR/UnitOfWork.php
+++ b/lib/Doctrine/ODM/PHPCR/UnitOfWork.php
@@ -1957,6 +1957,7 @@ class UnitOfWork
empty($this->scheduledMoves)) {
$this->invokeGlobalEvent(Event::onFlush, new ManagerEventArgs($this->dm));
$this->invokeGlobalEvent(Event::postFlush, new ManagerEventArgs($this->dm));
+ $this->changesetComputed = array();
// @deprecated This is to maintain BC with the old behavior, where users may call
// flush instead of PHPCR\SessionInterface#save
|
Fixed early exit changeset computation
- For updates to be taken into account (e.g. after binding translations)
the changeset needs to be reset when exiting the commit function when
there is nothing to do.
- Otherwise after calling flush, the changeset is still computed and the
next flush that is called envokes "computeChangeset" but as there are
still changesets from the previous flush, it doesn't bother
recalulating them.
- Before the "early exit" code flush would always reset the changeset.
|
doctrine_phpcr-odm
|
train
|
php
|
ecf9a7b5a3462addc30286806dcb57934e1236b4
|
diff --git a/lib/recaptcha.rb b/lib/recaptcha.rb
index <HASH>..<HASH> 100644
--- a/lib/recaptcha.rb
+++ b/lib/recaptcha.rb
@@ -33,7 +33,7 @@ module Ambethia
:height => options[:iframe_height] ||= 300,
:width => options[:iframe_width] ||= 500,
:frameborder => 0) {}; xhtml.br
- xhtml.textarea(:name => "recaptcha_challenge_field", :rows => 3, :cols => 40) {}
+ xhtml.textarea(nil, :name => "recaptcha_challenge_field", :rows => 3, :cols => 40)
xhtml.input :name => "recaptcha_response_field",
:type => "hidden", :value => "manual_challenge"
end
|
Fixed a usability bug for users without javascript. Since the indent option was set, and the block form of the textarea method was used, and textareas treat anything between <textarea> and </textarea> as something that goes inside the textarea, it was adding two spaces inside the textarea. If you didn't notice those, which I didn't the first time I used it, then you'll get an invalid CAPTCHa response.
|
ambethia_recaptcha
|
train
|
rb
|
5cb32f8241e57614a89fb5ab06afeb43a824c62f
|
diff --git a/views/js/layout/actions.js b/views/js/layout/actions.js
index <HASH>..<HASH> 100644
--- a/views/js/layout/actions.js
+++ b/views/js/layout/actions.js
@@ -311,6 +311,14 @@ define([
action = _.find(actions, {name : actionName});
}
return action;
+ },
+
+ /**
+ * Returns the current ResourceContext so can be used outside
+ * the context of common actions executions
+ */
+ getResourceContext: function() {
+ return resourceContext;
}
});
|
chore(action-manager): add method to get resourceContext
|
oat-sa_tao-core
|
train
|
js
|
4104ddddb59d19c3fea8d25689d66cae6c99b8ee
|
diff --git a/openquake/hazardlib/geo/surface/multi.py b/openquake/hazardlib/geo/surface/multi.py
index <HASH>..<HASH> 100755
--- a/openquake/hazardlib/geo/surface/multi.py
+++ b/openquake/hazardlib/geo/surface/multi.py
@@ -27,9 +27,9 @@ from openquake.hazardlib.geo.surface.base import (BaseSurface,
downsample_trace)
from openquake.hazardlib.geo.mesh import Mesh
from openquake.hazardlib.geo import utils
-from openquake.hazardlib.geo.surface import (PlanarSurface,
- SimpleFaultSurface,
- ComplexFaultSurface)
+from openquake.hazardlib.geo.surface import (
+ PlanarSurface, SimpleFaultSurface, ComplexFaultSurface)
+from openquake.hazardlib.geo.surface.gridded import GriddedSurface
class MultiSurface(BaseSurface):
@@ -131,7 +131,9 @@ class MultiSurface(BaseSurface):
"""
edges = []
for surface in self.surfaces:
- if isinstance(surface, PlanarSurface):
+ if isinstance(surface, GriddedSurface):
+ return edges.append(surface.mesh)
+ elif isinstance(surface, PlanarSurface):
# Top edge determined from two end points
edge = []
for pnt in [surface.top_left, surface.top_right]:
|
Fixed management of GriddedSurface in MultiSurface
|
gem_oq-engine
|
train
|
py
|
2488d293e553391bfc2666bada10d5a6a26ea1ec
|
diff --git a/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java b/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java
index <HASH>..<HASH> 100644
--- a/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java
+++ b/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java
@@ -78,10 +78,18 @@ public class RPCHelper {
}
}
+ public static <RETURN> Future<RETURN> callRemoteMethod(final Class<? extends RETURN> returnClass, final RSBRemoteService remote) throws CouldNotPerformException {
+ return (Future<RETURN>) callRemoteMethod(remote);
+ }
+
public static <RETURN> Future<RETURN> callRemoteMethod(final Object argument, final Class<? extends RETURN> returnClass, final RSBRemoteService remote) throws CouldNotPerformException {
return (Future<RETURN>) callRemoteMethod(argument, remote);
}
+ public static Future callRemoteMethod(final RSBRemoteService remote) throws CouldNotPerformException {
+ return callRemoteMethod(null, remote);
+ }
+
public static Future callRemoteMethod(final Object argument, final RSBRemoteService remote) throws CouldNotPerformException {
try {
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
Fix read only interface for all registries.
|
openbase_jul
|
train
|
java
|
0ea96b4394a8a5a1da2556197186a450c9ba6314
|
diff --git a/src/Illuminate/Support/Testing/Fakes/BusFake.php b/src/Illuminate/Support/Testing/Fakes/BusFake.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Support/Testing/Fakes/BusFake.php
+++ b/src/Illuminate/Support/Testing/Fakes/BusFake.php
@@ -200,6 +200,8 @@ class BusFake implements QueueingDispatcher
if ($command instanceof Closure) {
[$command, $callback] = [$this->firstClosureParameterType($command), $command];
+ } elseif (! is_string($command)) {
+ $command = get_class($command);
}
PHPUnit::assertTrue(
|
accept a command in object form in Bus::assertChained (#<I>)
|
laravel_framework
|
train
|
php
|
e19ecb190361cf56073d0894e54717ea613cdc94
|
diff --git a/family.php b/family.php
index <HASH>..<HASH> 100644
--- a/family.php
+++ b/family.php
@@ -85,7 +85,7 @@ if ($controller->record && $controller->record->canShow()) {
<table id="family-table" align="center" width="95%">
<tr valign="top">
- <td valign="top" style="width: <?php echo $pbwidth + 30; ?>px;"><!--//List of children//-->
+ <td valign="top" style="width: <?php echo Theme::theme()->parameter('chart-box-x') + 30; ?>px;"><!--//List of children//-->
<?php print_family_children($controller->record); ?>
</td>
<td> <!--//parents pedigree chart and Family Details//-->
|
Fix <I> - undefined variable in family.php
|
fisharebest_webtrees
|
train
|
php
|
2689c1713eaf95b8184df94d911969767efc9e76
|
diff --git a/channel.js b/channel.js
index <HASH>..<HASH> 100644
--- a/channel.js
+++ b/channel.js
@@ -122,7 +122,8 @@ function TChannel(options) {
this.emitConnectionMetrics =
typeof this.options.emitConnectionMetrics === 'boolean' ?
this.options.emitConnectionMetrics : false;
- this.choosePeerWithHeap = this.options.choosePeerWithHeap || false;
+ this.choosePeerWithHeap = typeof this.options.choosePeerWithHeap === 'boolean' ?
+ this.options.choosePeerWithHeap : true;
this.setObservePeerScoreEvents(this.options.observePeerScoreEvents);
|
channel: default choose peer with heap to true
|
uber_tchannel-node
|
train
|
js
|
9155dd5b747cd659a41e0fe760148ee71f89a4e4
|
diff --git a/player/player.js b/player/player.js
index <HASH>..<HASH> 100644
--- a/player/player.js
+++ b/player/player.js
@@ -68,9 +68,11 @@ $(function()
{
var input = $('#input').val();
var delim = $('#delimiter').val();
+ var header = $('#header').prop('checked');
var results = Papa.unparse(input, {
- delimiter: delim
+ delimiter: delim,
+ header: header,
});
console.log("Unparse complete!");
|
Add header to config in unparse in player.js.
|
mholt_PapaParse
|
train
|
js
|
a58534101922d01dc63f90c86094b38bbc80e33a
|
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index <HASH>..<HASH> 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -202,7 +202,7 @@ def info_available(*names, **kwargs):
names = sorted(list(set(names)))
# Refresh db before extracting the latest package
- if kwargs.pop('refresh', True):
+ if kwargs.get('refresh', True):
refresh_db()
pkg_info = []
|
do not change kwargs in refresh while checking a value
|
saltstack_salt
|
train
|
py
|
94b3e79acf8a670fedd3dae6c85d677903b845cc
|
diff --git a/src/Thinktomorrow/Locale/Locale.php b/src/Thinktomorrow/Locale/Locale.php
index <HASH>..<HASH> 100644
--- a/src/Thinktomorrow/Locale/Locale.php
+++ b/src/Thinktomorrow/Locale/Locale.php
@@ -44,6 +44,12 @@ class Locale
return app()->getLocale();
}
+ /**
+ * Retrieve the url slug for current or passed locale.
+ *
+ * @param null $locale
+ * @return null|string
+ */
public function getSlug($locale = null)
{
$locale = $this->validateLocale($locale) ? $locale : $this->get();
@@ -53,9 +59,17 @@ class Locale
return $locale;
}
- public function isHidden()
+ /**
+ * Check if current or passed locale is set as hidden
+ *
+ * @param null $locale
+ * @return bool
+ */
+ public function isHidden($locale = null)
{
- return ($this->hidden_locale == $this->get());
+ $locale = $this->validateLocale($locale) ? $locale : $this->get();
+
+ return ($this->hidden_locale == $locale);
}
/**
|
Allow to check if locale other than current is hidden
|
thinktomorrow_locale
|
train
|
php
|
d377bcf6d3607ad39eb0e669f0e7d9333575822d
|
diff --git a/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java b/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
+++ b/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
@@ -49,6 +49,7 @@ public class JedisSentinelTest {
assertEquals("6379", masterHostAndPort.get(1));
List<Map<String, String>> slaves = j.sentinelSlaves(masterName);
+ assertEquals(1, slaves.size());
assertEquals("6379", slaves.get(0).get("master-port"));
List<? extends Object> isMasterDownByAddr = j
|
Fail if the Sentinel does not return the slave.
|
xetorthio_jedis
|
train
|
java
|
ddaba16a46ee71a0ab2813eb9efaf3fc14902d27
|
diff --git a/src/Token/AccessToken.php b/src/Token/AccessToken.php
index <HASH>..<HASH> 100644
--- a/src/Token/AccessToken.php
+++ b/src/Token/AccessToken.php
@@ -186,7 +186,7 @@ class AccessToken implements JsonSerializable
}
if ($this->expires) {
- $parameters['expires_in'] = $this->expires - time();
+ $parameters['expires'] = $this->expires;
}
return $parameters;
diff --git a/test/src/Token/AccessTokenTest.php b/test/src/Token/AccessTokenTest.php
index <HASH>..<HASH> 100644
--- a/test/src/Token/AccessTokenTest.php
+++ b/test/src/Token/AccessTokenTest.php
@@ -106,7 +106,7 @@ class AccessTokenTest extends \PHPUnit_Framework_TestCase
$options = [
'access_token' => 'mock_access_token',
'refresh_token' => 'mock_refresh_token',
- 'expires_in' => 100,
+ 'expires' => time(),
];
$token = $this->getAccessToken($options);
|
Use expires to serialize access tokens
Resolves: #<I>
See also: #<I>
|
thephpleague_oauth2-client
|
train
|
php,php
|
fce2d6ddd10d894bae58e2c307dcb1740135bc96
|
diff --git a/cmd/common-main.go b/cmd/common-main.go
index <HASH>..<HASH> 100644
--- a/cmd/common-main.go
+++ b/cmd/common-main.go
@@ -235,7 +235,7 @@ func handleCommonEnvVars() {
// In place update is true by default if the MINIO_UPDATE is not set
// or is not set to 'off', if MINIO_UPDATE is set to 'off' then
// in-place update is off.
- globalInplaceUpdateDisabled = strings.EqualFold(env.Get(config.EnvUpdate, "off"), "off")
+ globalInplaceUpdateDisabled = strings.EqualFold(env.Get(config.EnvUpdate, "on"), "off")
// Get WORM environment variable.
if worm := env.Get(config.EnvWorm, "off"); worm != "" {
|
Remote update should be on by default (#<I>)
Fixes a regression introduced in PR #<I>
|
minio_minio
|
train
|
go
|
9537bc134de5c55925439f0b593420d1d4f290e8
|
diff --git a/dockerclient/container.go b/dockerclient/container.go
index <HASH>..<HASH> 100644
--- a/dockerclient/container.go
+++ b/dockerclient/container.go
@@ -78,6 +78,12 @@ func (dh *DockerHost) CreateContainer(options *docker.ContainerConfig, name stri
}
}
+ imgDetails, err := dh.ImageDetails(imageId)
+ if err != nil {
+ return "", err
+ }
+ options.Env = append(options.Env, "DOCKER_IMAGE="+imgDetails.Id)
+
container := &docker.Container{}
u := dh.url() + "/containers/create"
|
added docker image info to container environment
|
dynport_dgtk
|
train
|
go
|
8cfca36c17eccd45a84dc3dd14dc519b4fa5da4a
|
diff --git a/jenkins/release.rb b/jenkins/release.rb
index <HASH>..<HASH> 100755
--- a/jenkins/release.rb
+++ b/jenkins/release.rb
@@ -285,11 +285,19 @@ class ShipIt
{:timeout => 1200, :live_stream => STDOUT}
end
+ def progress
+ if STDOUT.tty?
+ "--progress"
+ else
+ "--no-progress"
+ end
+ end
+
def upload_package(local_path, s3_path)
s3_cmd = ["s3cmd",
"-c #{options[:package_s3_config_file]}",
"put",
- "--progress",
+ progress,
"--acl-public",
local_path,
"s3://#{options[:bucket]}#{s3_path}"].join(" ")
|
only show progress if stdout is a tty
It's nice to see progess via the mixlib-shellout live stream when
running release.rb by hand, but it's a big hassle when looking at the
jenkins logs. Test if STDOUT is a tty to turn progress on or off.
|
chef_chef
|
train
|
rb
|
7d40332ca8b83af682ca00ee6b49f9a96ae4cdfc
|
diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go
index <HASH>..<HASH> 100644
--- a/pkg/kubelet/rkt/rkt.go
+++ b/pkg/kubelet/rkt/rkt.go
@@ -62,9 +62,9 @@ const (
RktType = "rkt"
DefaultRktAPIServiceEndpoint = "localhost:15441"
- minimumAppcVersion = "0.7.4"
- minimumRktBinVersion = "1.2.1"
- recommendedRktBinVersion = "1.2.1"
+ minimumAppcVersion = "0.8.1"
+ minimumRktBinVersion = "1.6.0"
+ recommendedRktBinVersion = "1.6.0"
minimumRktApiVersion = "1.0.0-alpha"
minimumSystemdVersion = "219"
|
Update rkt container runtime min versions
|
kubernetes_kubernetes
|
train
|
go
|
787ed54d509bc6fe5ec3cfd85538b0de8ba57700
|
diff --git a/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java b/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java
index <HASH>..<HASH> 100644
--- a/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java
+++ b/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java
@@ -62,19 +62,6 @@ public class ExceptionReporter {
writeText(text, file);
}
- private static File createTmpFile() {
- //we need to write to a temp file before and then rename the file so that the worker will not see
- //a partially written failure.
- final File tmpFile;
- try {
- tmpFile = File.createTempFile("worker", "exception");
- } catch (IOException e) {
- log.severe("Failed to create temp file", e);
- return null;
- }
- return tmpFile;
- }
-
private ExceptionReporter() {
}
}
|
Removed unused method in ExceptionReporter
|
hazelcast_hazelcast-simulator
|
train
|
java
|
d80ae13513a413f7d2a611612e8cb5a48d2134b7
|
diff --git a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js
index <HASH>..<HASH> 100644
--- a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js
+++ b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js
@@ -68,7 +68,18 @@ describe('RowSelectionWrapper', () => {
expect(wrapper.props().onAllRowsSelect).toBeDefined();
});
- describe('when selectRow.selected is defiend', () => {
+ describe('componentWillReceiveProps', () => {
+ const nextSelected = [0];
+ const nextProps = { store: { selected: nextSelected } };
+
+ it('should update state.selectedRowKeys with next selected rows', () => {
+ wrapper.instance().componentWillReceiveProps(nextProps);
+
+ expect(wrapper.state('selectedRowKeys')).toEqual(nextSelected);
+ });
+ });
+
+ describe('when selectRow.selected is defined', () => {
beforeEach(() => {
selectRow.mode = 'checkbox';
selectRow.selected = [1, 3];
|
[test] test for RowSelectionWrapper#componentWillReceiveProps
|
react-bootstrap-table_react-bootstrap-table2
|
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.