diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -36,11 +36,11 @@ return [
'name' => 'taoQtiItem',
'label' => 'QTI item model',
'license' => 'GPL-2.0',
- 'version' => '23.8.0',
+ 'version' => '23.9.0',
'author' => 'Open Assessment Technologies',
'requires' => [
'taoItems' => '>=10.1.0',
- 'tao' => '>=41.5.0',
+ 'tao' => '>=41.6.0',
'generis' => '>=12.5.0',
],
'models' => [
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index <HASH>..<HASH> 100644
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -434,6 +434,6 @@ class Updater extends \common_ext_ExtensionUpdater
$this->setVersion('21.0.0');
}
- $this->skip('21.0.0', '23.8.0');
+ $this->skip('21.0.0', '23.9.0');
}
}
|
Merge branch 'develop' into fix/UDI-<I>/have-access-to-children-under-restricted-class
# Conflicts:
# manifest.php
# scripts/update/Updater.php
|
diff --git a/rllib/policy/torch_policy.py b/rllib/policy/torch_policy.py
index <HASH>..<HASH> 100644
--- a/rllib/policy/torch_policy.py
+++ b/rllib/policy/torch_policy.py
@@ -480,7 +480,8 @@ class TorchPolicy(Policy):
state = super().get_state()
state["_optimizer_variables"] = []
for i, o in enumerate(self._optimizers):
- state["_optimizer_variables"].append(o.state_dict())
+ optim_state_dict = convert_to_non_torch_type(o.state_dict())
+ state["_optimizer_variables"].append(optim_state_dict)
return state
@override(Policy)
@@ -492,7 +493,9 @@ class TorchPolicy(Policy):
if optimizer_vars:
assert len(optimizer_vars) == len(self._optimizers)
for o, s in zip(self._optimizers, optimizer_vars):
- o.load_state_dict(s)
+ optim_state_dict = convert_to_torch_tensor(
+ s, device=self.device)
+ o.load_state_dict(optim_state_dict)
# Then the Policy's (NN) weights.
super().set_state(state)
|
[rllib] Fix for Torch checkpoint taken on GPU fails to deserialize on CPU (#<I>) (#<I>)
|
diff --git a/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java b/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java
+++ b/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java
@@ -20,7 +20,7 @@ import com.hazelcast.nio.Address;
/**
* A {@link RetryableHazelcastException} that indicates that an operation was send by a machine which isn't member
- * in the cluster when the request is operation.
+ * in the cluster when the operation is executed.
*/
public class CallerNotMemberException extends RetryableHazelcastException {
|
Minor javadoc improvement in CallerNotMemberException
|
diff --git a/test/js/tests/unit-tests.js b/test/js/tests/unit-tests.js
index <HASH>..<HASH> 100644
--- a/test/js/tests/unit-tests.js
+++ b/test/js/tests/unit-tests.js
@@ -133,11 +133,13 @@ $(function() {
test('variance',function(){
equals(jStat.variance([3,4,5,6,7]),2,'variance([3,4,5,6,7])');
+ equals(jStat.variance([1,2,3,4,5,6], 1),3.5,'variance([1,2,3,4,5,6], 1)');
});
test('stdev',function(){
- equals(jStat.stdev([3,4,5]),1,'stdev([3,4,5])');
- equals(jStat.stdev([-3,-4,-5]),1,'stdev([-3,-4,-5])');
+ equals(jStat.stdev([3,4,5], 1),1,'stdev([3,4,5], 1)');
+ equals(jStat.stdev([-3,-4,-5], 1),1,'stdev([-3,-4,-5], 1)');
+ equals(jStat.stdev([1,2,3]), 0.816496580927726, 'stdev([1,2,3])');
});
test('meandev',function(){
|
update qunit for stdev and variance
|
diff --git a/platforms/ios.js b/platforms/ios.js
index <HASH>..<HASH> 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -106,7 +106,7 @@ exports.installPlugin = function (config, plugin, callback) {
// write out plist
plistObj[0].Plugins[plistEle.attrib['key']] = plistEle.attrib['string'];
- fs.writeFile(plistPath, plist.stringify(plistObj), end);
+ fs.writeFile(plistPath, plist.stringify(plistObj[0]), end);
// write out xcodeproj file
fs.writeFile(pbxPath, xcodeproj.writeSync(), end);
diff --git a/test/ios-install.js b/test/ios-install.js
index <HASH>..<HASH> 100644
--- a/test/ios-install.js
+++ b/test/ios-install.js
@@ -102,7 +102,7 @@ exports['should edit PhoneGap.plist'] = function (test) {
var plistPath = config.projectPath + '/SampleApp/PhoneGap.plist';
plist.parseFile(plistPath, function (err, obj) {
- test.equal(obj[0].Plugins['com.phonegap.plugins.childbrowser'],
+ test.equal(obj.Plugins['com.phonegap.plugins.childbrowser'],
'ChildBrowserCommand');
test.done();
|
[ios] fixing plist writing
|
diff --git a/pymatgen/io/vasp/sets.py b/pymatgen/io/vasp/sets.py
index <HASH>..<HASH> 100644
--- a/pymatgen/io/vasp/sets.py
+++ b/pymatgen/io/vasp/sets.py
@@ -1265,12 +1265,13 @@ class MVLSlabSet(MPRelaxSet):
self.auto_dipole = auto_dipole
self.get_locpot = get_locpot
self.kwargs = kwargs
+ self.set_mix = set_mix
slab_incar = {"EDIFF": 1e-4, "EDIFFG": -0.02, "ENCUT": 400,
"ISMEAR": 0, "SIGMA": 0.05, "ISIF": 3}
if not self.bulk:
slab_incar["ISIF"] = 2
- if set_mix:
+ if self.set_mix:
slab_incar["AMIN"] = 0.01
slab_incar["AMIX"] = 0.2
slab_incar["BMIX"] = 0.001
|
forgot new attribute for MVLSlabSet
|
diff --git a/Thru/ActiveRecord/Search.php b/Thru/ActiveRecord/Search.php
index <HASH>..<HASH> 100644
--- a/Thru/ActiveRecord/Search.php
+++ b/Thru/ActiveRecord/Search.php
@@ -28,6 +28,7 @@ class Search
public function condition(SearchCondition $condition){
$this->conditions[] = $condition;
+ return $this;
}
public function limit($limit, $offset = 0)
diff --git a/tests/Search/SearchRecordsTest.php b/tests/Search/SearchRecordsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Search/SearchRecordsTest.php
+++ b/tests/Search/SearchRecordsTest.php
@@ -100,4 +100,12 @@ class SearchRecordsTest extends PHPUnit_Framework_TestCase {
->execOne();
$this->assertTrue($random_result instanceof TestModelSortable);
}
+
+ public function testSearchDirectCondition(){
+ $condition = new \Thru\ActiveRecord\SearchCondition("text_field", "dog", "LIKE");
+ $result = TestModelSortable::search()->condition($condition)->execOne();
+
+ $this->assertTrue($result instanceof TestModelSortable);
+ $this->assertEquals("Dog", $result->text_field);
+ }
}
|
Pushing it to <I>%\!
|
diff --git a/src/HtmlServiceProvider.php b/src/HtmlServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/HtmlServiceProvider.php
+++ b/src/HtmlServiceProvider.php
@@ -44,7 +44,7 @@ class HtmlServiceProvider extends ServiceProvider
*/
protected function registerHtmlBuilder()
{
- $this->app->bind('html', function($app) {
+ $this->app->singleton('html', function($app) {
return new HtmlBuilder($app['url']);
});
}
@@ -54,7 +54,7 @@ class HtmlServiceProvider extends ServiceProvider
*/
protected function registerFormBuilder()
{
- $this->app->bind('form', function($app) {
+ $this->app->singleton('form', function($app) {
/**
* @var Builders\HtmlBuilder $html
* @var \Illuminate\Routing\UrlGenerator $url
@@ -64,9 +64,11 @@ class HtmlServiceProvider extends ServiceProvider
$url = $app['url'];
$session = $app['session.store'];
- return (new FormBuilder(
- $html, $url, $session->getToken()
- ))->setSessionStore($session);
+ $form = new FormBuilder($html, $url, $session->getToken());
+
+ $form->setSessionStore($session);
+
+ return $form;
});
}
|
Updating bind method to singleton + Refactoring
|
diff --git a/core/candleManager.js b/core/candleManager.js
index <HASH>..<HASH> 100644
--- a/core/candleManager.js
+++ b/core/candleManager.js
@@ -101,7 +101,7 @@ var Manager = function() {
throw 'Gekko is unable to save historical data, do I have sufficient rights?';
this.on('processed', function() {
- log.info('Processed trades, sleeping for', this.fetch.next.m.fromNow(true) + '...');
+ log.debug('Processed trades, sleeping for', this.fetch.next.m.fromNow(true) + '...');
})
// .on('full history build', this.emitRealtime)
};
|
put verbose logging under debug
|
diff --git a/functions/functions-twig.php b/functions/functions-twig.php
index <HASH>..<HASH> 100644
--- a/functions/functions-twig.php
+++ b/functions/functions-twig.php
@@ -3,7 +3,7 @@
class TimberTwig {
function __construct(){
- add_action('get_twig', array($this, 'add_twig_filters'));
+ add_action('twig_apply_filters', array(&$this, 'add_twig_filters'));
}
function add_twig_filters($twig){
@@ -325,8 +325,6 @@
return $return;
}
-
-
function render_twig_string($string, $data = array()){
$loader = new Twig_Loader_String();
$twig = new Twig_Environment($loader);
diff --git a/objects/timber-loader.php b/objects/timber-loader.php
index <HASH>..<HASH> 100644
--- a/objects/timber-loader.php
+++ b/objects/timber-loader.php
@@ -123,7 +123,7 @@ class TimberLoader {
}
$twig = new Twig_Environment($loader, $params);
$twig->addExtension(new Twig_Extension_Debug());
- $twig = apply_filters('get_twig', $twig);
+ $twig = apply_filters('twig_apply_filters', $twig);
return $twig;
}
|
renamed action to add twig filters
|
diff --git a/src/Console/CommandRunner.php b/src/Console/CommandRunner.php
index <HASH>..<HASH> 100644
--- a/src/Console/CommandRunner.php
+++ b/src/Console/CommandRunner.php
@@ -372,7 +372,9 @@ class CommandRunner implements EventDispatcherInterface
{
$builder = Router::createRouteBuilder('/');
- $this->app->routes($builder);
+ if ($this->app instanceof HttpApplicationInterface) {
+ $this->app->routes($builder);
+ }
if ($this->app instanceof PluginApplicationInterface) {
$this->app->pluginRoutes($builder);
}
|
Add check before calling methods that may not exist.
|
diff --git a/app/models/unidom/visitor/authenticating.rb b/app/models/unidom/visitor/authenticating.rb
index <HASH>..<HASH> 100644
--- a/app/models/unidom/visitor/authenticating.rb
+++ b/app/models/unidom/visitor/authenticating.rb
@@ -19,6 +19,9 @@ class Unidom::Visitor::Authenticating < Unidom::Visitor::ApplicationRecord
scope :visitor_type_is, ->(visitor_type) { where visitor_type: visitor_type }
scope :credential_type_is, ->(credential_type) { where credential_type: credential_type }
+ ##
+ # 将访问者 visitor 和信任状 credential 关联起来。关联时间是 opened_at ,缺省是当前时间。如:
+ # Unidom::Visitor::Authenticating.authenticate! user, with: password
def self.authenticate!(visitor, with: nil, opened_at: Time.now)
credential_is(with).visitor_is(visitor).valid_at.alive.first_or_create! opened_at: opened_at
end
|
1, Improve the Authenticating model for the document.
|
diff --git a/lib/Cake/Model/Datasource/Database/Query.php b/lib/Cake/Model/Datasource/Database/Query.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Model/Datasource/Database/Query.php
+++ b/lib/Cake/Model/Datasource/Database/Query.php
@@ -466,13 +466,15 @@ class Query implements Expression, IteratorAggregate {
$expression->traverse($visitor);
};
- $this->build($binder);
+ $query = $this->_transformQuery();
+ $query->build($binder->bindTo($query));
}
/**
* Returns a query object as returned by the connection object as a result of
* transforming this query instance to conform to any dialect specifics
*
+ * @todo if the query is not dirty, we could locally cache the result of this function
* @return void
**/
protected function _transformQuery() {
|
Transforming the query before binding params too
|
diff --git a/src/Gitonomy/Git/Parser/DiffParser.php b/src/Gitonomy/Git/Parser/DiffParser.php
index <HASH>..<HASH> 100644
--- a/src/Gitonomy/Git/Parser/DiffParser.php
+++ b/src/Gitonomy/Git/Parser/DiffParser.php
@@ -64,9 +64,9 @@ class DiffParser extends ParserBase
// 4. File informations
$isBinary = false;
if ($this->expects('index ')) {
- $oldIndex = $this->consumeHash();
+ $oldIndex = $this->consumeShortHash();
$this->consume('..');
- $newIndex = $this->consumeHash();
+ $newIndex = $this->consumeShortHash();
if ($this->expects(' ')) {
$vars = $this->consumeRegexp('/\d{6}/');
$newMode = $oldMode = $vars[0];
|
Be compatible with bitbucket by allowing short hashes
|
diff --git a/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java b/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java
index <HASH>..<HASH> 100644
--- a/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java
+++ b/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java
@@ -45,13 +45,16 @@ public class TextInputFormat extends DelimitedInputFormat {
protected final StringValue theString = new StringValue();
- protected CharsetDecoder decoder;
- protected ByteBuffer byteWrapper;
+ // all fields below here are set in configure / open, so we do not serialze them
- protected boolean ascii;
+ protected transient CharsetDecoder decoder;
- protected int pos;
+ protected transient ByteBuffer byteWrapper;
+
+ protected transient int pos;
+
+ protected transient boolean ascii;
// --------------------------------------------------------------------------------------------
|
Correctly marked text input format members as transient
|
diff --git a/src/Editor.js b/src/Editor.js
index <HASH>..<HASH> 100644
--- a/src/Editor.js
+++ b/src/Editor.js
@@ -360,16 +360,6 @@ define(function (require, exports, module) {
return this._codeMirror.totalHeight(includePadding);
};
-
- /**
- * Gets the total number of displayed lines for the document (not the viewport).
- * This function accounts for extra lines due to word wrapping if wordWrapping is enabled.
- * @returns {!number} height in lines
- */
- Editor.prototype.heightInLines = function () {
- return this._codeMirror.heightInLines();
- };
-
/**
* Gets the scroller element from the editor.
* @returns {!HTMLDivElement} scroller
|
removed heightInLines function from Editor.js
|
diff --git a/js/reveal.js b/js/reveal.js
index <HASH>..<HASH> 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -447,7 +447,8 @@
*/
function checkCapabilities() {
- isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA );
+ isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
+ ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS
isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
var testElement = document.createElement( 'div' );
|
fix viewport overflow in iPadOS safari
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -220,7 +220,7 @@ var CONFIG = {
},
dart: {
src: ['LICENSE'],
- exclude: ['rtts_assert/'],
+ exclude: ['rtts_assert'],
pipes: {}
}
},
|
fix(build): Don't include rtts in the dart build.
The module name actually does not include a trailing slash, so the
folder would show up and be included in the dart pubbuild.
|
diff --git a/jaeger_client/config.py b/jaeger_client/config.py
index <HASH>..<HASH> 100644
--- a/jaeger_client/config.py
+++ b/jaeger_client/config.py
@@ -116,6 +116,7 @@ class Config(object):
'tags',
'enabled',
'reporter_batch_size',
+ 'reporter_queue_size',
'propagation',
'max_tag_value_length',
'reporter_flush_interval',
diff --git a/tests/test_config.py b/tests/test_config.py
index <HASH>..<HASH> 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -131,6 +131,10 @@ class ConfigTests(unittest.TestCase):
with self.assertRaises(Exception):
_ = Config({"unexpected":"value"}, validate=True)
+ def test_reporter_queue_size_valid(self):
+ config = Config({"reporter_queue_size": 100}, service_name='x', validate=True)
+ assert config.reporter_queue_size == 100
+
def test_missing_service_name(self):
with self.assertRaises(ValueError):
_ = Config({})
|
Mark reporter_queue_size Config option as valid (#<I>)
If you add reporter_queue_size as an option in a jaeger_client.Config,
it currently raises an error, even if it's a valid option if
validate=True.
|
diff --git a/symbols/argument.py b/symbols/argument.py
index <HASH>..<HASH> 100644
--- a/symbols/argument.py
+++ b/symbols/argument.py
@@ -25,7 +25,7 @@ class SymbolARGUMENT(Symbol):
'''
Symbol.__init__(self, value)
self.lineno = lineno
- self.set_byref(byref if byref is not None else OPTIONS.byref.value, lineno)
+ self.byref = byref if byref is not None else OPTIONS.byref.value
@property
def value(self):
@@ -45,17 +45,17 @@ class SymbolARGUMENT(Symbol):
@property
def byref(self):
- if isinstance(self.value, SymbolVAR):
- return self.value.byref
- return False # By Value if not a Variable
+ return self._byref
- def set_byref(self, value, lineno):
- if isinstance(self.value, SymbolVAR):
- self.value.byref = value
- else:
- if value:
- # Argument can't be passed by ref because it's not an lvalue (an identifier)
- raise AttributeError
+ @byref.setter
+ def byref(self, value):
+ if value:
+ assert isinstance(self.value, SymbolVAR)
+ self._byref = value
+
+ @property
+ def mangled(self):
+ return self.value.mangled
@property
def size(self):
|
Argument MUST have it?s own byref attribute, and also
it?s setter must check it?s not an rvalue.
|
diff --git a/OpenPNM/Network/tools.py b/OpenPNM/Network/tools.py
index <HASH>..<HASH> 100644
--- a/OpenPNM/Network/tools.py
+++ b/OpenPNM/Network/tools.py
@@ -794,6 +794,9 @@ def find_surface_pores(network, markers=None, label='surface'):
This function does not check whether the given markers actually lie outside
the domain, allowing the labeling of *internal* sufaces.
+ If this method fails to mark some surface pores, consider sending more
+ markers on each face.
+
Examples
--------
>>> import OpenPNM as op
|
Added more explanation to find_surface_pores to help when not all pores are identified
|
diff --git a/spec/pins_v3_spec.rb b/spec/pins_v3_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/pins_v3_spec.rb
+++ b/spec/pins_v3_spec.rb
@@ -791,6 +791,8 @@ describe "Origen Pin API v3" do
$dut.package = :p2
$dut.other_pins(:other).size.should == 3
$dut.other_pin_groups.size.should == 1
+ $dut.has_other_pin?(:other1).should == true
+ $dut.has_other_pin?(:other5).should == false
end
end
|
Ready to push and get a pull request set.
|
diff --git a/lib/smart_proxy_dynflow/version.rb b/lib/smart_proxy_dynflow/version.rb
index <HASH>..<HASH> 100644
--- a/lib/smart_proxy_dynflow/version.rb
+++ b/lib/smart_proxy_dynflow/version.rb
@@ -1,5 +1,5 @@
module Proxy
class Dynflow
- VERSION = '0.1.6'
+ VERSION = '0.1.7'
end
end
|
Update smart_proxy_dynflow to <I>
|
diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go
index <HASH>..<HASH> 100644
--- a/eth/catalyst/api.go
+++ b/eth/catalyst/api.go
@@ -417,7 +417,17 @@ func (api *ConsensusAPI) delayPayloadImport(block *types.Block) (beacon.PayloadS
// payload as non-integratable on top of the existing sync. We'll just
// have to rely on the beacon client to forcefully update the head with
// a forkchoice update request.
- log.Warn("Ignoring payload with missing parent", "number", block.NumberU64(), "hash", block.Hash(), "parent", block.ParentHash())
+ if api.eth.SyncMode() == downloader.FullSync {
+ // In full sync mode, failure to import a well-formed block can only mean
+ // that the parent state is missing and the syncer rejected extending the
+ // current cycle with the new payload.
+ log.Warn("Ignoring payload with missing parent", "number", block.NumberU64(), "hash", block.Hash(), "parent", block.ParentHash())
+ } else {
+ // In non-full sync mode (i.e. snap sync) all payloads are rejected until
+ // snap sync terminates as snap sync relies on direct database injections
+ // and cannot afford concurrent out-if-band modifications via imports.
+ log.Warn("Ignoring payload while snap syncing", "number", block.NumberU64(), "hash", block.Hash())
+ }
return beacon.PayloadStatusV1{Status: beacon.ACCEPTED}, nil
}
|
eth/catalyst: fix NewPayload warn log when dropping due to snap sync
|
diff --git a/tests/ssh_tests.py b/tests/ssh_tests.py
index <HASH>..<HASH> 100644
--- a/tests/ssh_tests.py
+++ b/tests/ssh_tests.py
@@ -1,4 +1,4 @@
-from nose.tools import istest, assert_raises, assert_in
+from nose.tools import istest, assert_raises
import spur
import spur.ssh
@@ -43,7 +43,7 @@ def connection_error_contains_traceback_for_original_error():
# Expected error
assert False
except spur.ssh.ConnectionError as error:
- assert_in("Traceback (most recent call last):", error.original_traceback)
+ assert "Traceback (most recent call last):" in error.original_traceback
@istest
|
Remove usage of assert_in for py<I> compatibility
|
diff --git a/lib/navigationlib.php b/lib/navigationlib.php
index <HASH>..<HASH> 100644
--- a/lib/navigationlib.php
+++ b/lib/navigationlib.php
@@ -672,6 +672,20 @@ class navigation_node implements renderable {
$this->parent->make_inactive();
}
}
+
+ /**
+ * Hides the node and any children it has.
+ *
+ * @since 2.5
+ */
+ public function hide() {
+ $this->display = false;
+ if ($this->has_children()) {
+ foreach ($this->children as $child) {
+ $child->hide();
+ }
+ }
+ }
}
/**
@@ -2492,18 +2506,18 @@ class global_navigation extends navigation_node {
public function set_expansion_limit($type) {
global $SITE;
$nodes = $this->find_all_of_type($type);
- foreach ($nodes as &$node) {
+ foreach ($nodes as $node) {
// We need to generate the full site node
if ($type == self::TYPE_COURSE && $node->key == $SITE->id) {
continue;
}
- foreach ($node->children as &$child) {
+ foreach ($node->children as $child) {
// We still want to show course reports and participants containers
// or there will be navigation missing.
if ($type == self::TYPE_COURSE && $child->type === self::TYPE_CONTAINER) {
continue;
}
- $child->display = false;
+ $child->hide();
}
}
return true;
|
MDL-<I> navigation: fixed expansion limit issue hiding nodes
|
diff --git a/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php b/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php
+++ b/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php
@@ -62,7 +62,7 @@ class ObjectManagerPersister implements PersisterInterface
// Check if the ID is explicitly set by the user. To avoid the ID to be overridden by the ID generator
// registered, we disable it for that specific object.
if ($metadata instanceof ORMClassMetadataInfo) {
- if ($metadata->usesIdGenerator() && false === empty($metadata->getIdentifierValues($object))) {
+ if ($metadata->usesIdGenerator() && 0 !== count($metadata->getIdentifierValues($object)) && !$metadata->idGenerator instanceof IdGenerator) {
$metadata = $this->configureIdGenerator($metadata);
}
} else if ($metadata instanceof ODMClassMetadataInfo) {
|
Prevent IdGenerator from decorating itself (#<I>)
|
diff --git a/aikif/bias.py b/aikif/bias.py
index <HASH>..<HASH> 100644
--- a/aikif/bias.py
+++ b/aikif/bias.py
@@ -57,7 +57,7 @@ class Bias(object):
get_bias_rating() = returns the bias rating 0=bullshit -> 1=fact
"""
- #@debug
+ @debug
def __init__(self, metadata):
"""
passes all data on command line leave as empty string for blank
|
bias.py includes debug decorator to track issues
|
diff --git a/js/jquery.iframe-transport.js b/js/jquery.iframe-transport.js
index <HASH>..<HASH> 100644
--- a/js/jquery.iframe-transport.js
+++ b/js/jquery.iframe-transport.js
@@ -1,5 +1,5 @@
/*
- * jQuery Iframe Transport Plugin 1.8.1
+ * jQuery Iframe Transport Plugin 1.8.2
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
@@ -142,6 +142,8 @@
.prop('enctype', 'multipart/form-data')
// enctype must be set as encoding for IE:
.prop('encoding', 'multipart/form-data');
+ // Remove the HTML5 form attribute from the input(s):
+ options.fileInput.removeAttr('form');
}
form.submit();
// Insert the file input fields at their original location
@@ -149,7 +151,10 @@
if (fileInputClones && fileInputClones.length) {
options.fileInput.each(function (index, input) {
var clone = $(fileInputClones[index]);
- $(input).prop('name', clone.prop('name'));
+ // Restore the original name and form properties:
+ $(input)
+ .prop('name', clone.prop('name'))
+ .attr('form', clone.attr('form'));
clone.replaceWith(input);
});
}
|
Handle file inputs with form attribute. Fixes #<I>
Thanks @denper for the bug report and fix suggestion.
|
diff --git a/example.py b/example.py
index <HASH>..<HASH> 100644
--- a/example.py
+++ b/example.py
@@ -115,7 +115,7 @@ def get_glob(glob_path):
>>> # Get the expected file names in the platform's native style
>>> file_names == (['/test/file1.txt', '/test/file2.txt'] # UNIX-like
... or
- ... [r'c:\test\file1.txt', r'c:\test\file2.txt']) # Windows
+ ... [r'\test\file1.txt', r'\test\file2.txt']) # Windows
True
'''
return glob.glob(glob_path)
|
Remove "c:" from Windows paths in doctest.
|
diff --git a/src/segments/profile.py b/src/segments/profile.py
index <HASH>..<HASH> 100644
--- a/src/segments/profile.py
+++ b/src/segments/profile.py
@@ -2,6 +2,7 @@ import logging
from collections import Counter, OrderedDict
import unicodedata
from pathlib import Path
+import warnings
from csvw import TableGroup, Column
from clldutils.path import readlines
@@ -109,10 +110,13 @@ class Profile(object):
raise ValueError('profile description must contain exactly one table')
metadata = tg.common_props
metadata.update(fname=Path(fname), form=form)
- return cls(
- *[{k: None if (k != cls.GRAPHEME_COL and v == cls.NULL) else v for k, v in d.items()}
- for d in tg.tables[0].iterdicts(fname=opfname)],
- **metadata)
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ res = cls(
+ *[{k: None if (k != cls.GRAPHEME_COL and v == cls.NULL) else v for k, v in d.items()}
+ for d in tg.tables[0].iterdicts(fname=opfname)],
+ **metadata)
+ return res
@classmethod
def from_text(cls, text, mapping='mapping'):
|
ignore warnings from csvw about unspecified columns - the spec allows arbitrary additional columns
|
diff --git a/geomdl/visualization/VisVTK.py b/geomdl/visualization/VisVTK.py
index <HASH>..<HASH> 100644
--- a/geomdl/visualization/VisVTK.py
+++ b/geomdl/visualization/VisVTK.py
@@ -53,6 +53,10 @@ class VisConfig(vis.VisConfigAbstract):
* ``s`` and ``w``: switch between solid and wireframe modes
* ``b``: change background color
* ``arrow keys``: pan the model
+ * ``d``: print debug information (of picked object, point, etc.)
+
+ Please refer to `vtkInteractorStyle <https://vtk.org/doc/nightly/html/classvtkInteractorStyle.html>`_ class
+ reference for more details.
:param obj: render window interactor
:type obj: vtkRenderWindowInteractor
@@ -86,7 +90,13 @@ class VisConfig(vis.VisConfigAbstract):
actor = picker.GetActor() # vtkActor
if actor is not None:
actor.GetProperty().SetColor(random(), random(), random())
- # print(picker.GetSelectionPoint())
+ if key == 'd':
+ picker = obj.GetPicker() # vtkPropPicker
+ actor = picker.GetActor() # vtkActor
+ if actor is not None:
+ print("Name:", actor.GetMapper().GetArrayName())
+ print("Index:", actor.GetMapper().GetArrayId())
+ print("Selected point:", picker.GetSelectionPoint()[0:2])
# Update render window
render_window.Render()
|
Assign keypress event to "d" for debugging
|
diff --git a/tests/unique_test.py b/tests/unique_test.py
index <HASH>..<HASH> 100644
--- a/tests/unique_test.py
+++ b/tests/unique_test.py
@@ -37,3 +37,10 @@ def test_unique_nan():
mask = np.isnan(values)
assert values[~mask].tolist() == df.x.values[~mask].tolist()
# assert indices.tolist() == [0, 1, 2, 0, 3, 0]
+
+def test_unique_missing():
+ # Create test databn
+ x = np.array([None, 'A', 'B', -1, 0, 2, '', '', None, None, None, np.nan, np.nan, np.nan, np.nan,])
+ df = vaex.from_arrays(x=x)
+ uniques = df.x.unique(dropnan=True).tolist()
+ assert set(uniques) == set(['', 'A', 'B', -1, 0, 2, None])
|
Unit-test for unique in case of dtype object and n/a values (#<I>)
* Unit-test for unique in case of object type and missing values (np.nan, None)
* make first element None so it is dtype=object
* fix: include None, skip nan, since comparison of nan is always false
|
diff --git a/mithril.js b/mithril.js
index <HASH>..<HASH> 100644
--- a/mithril.js
+++ b/mithril.js
@@ -1017,6 +1017,8 @@ var m = (function app(window, undefined) {
var currentTarget = e.currentTarget || e.srcElement;
var args = m.route.mode === "pathname" && currentTarget.search ? parseQueryString(currentTarget.search.slice(1)) : {};
while (currentTarget && currentTarget.nodeName.toUpperCase() !== "A") currentTarget = currentTarget.parentNode;
+ // clear pendingRequests because we want an immediate route change
+ pendingRequests = 0;
m.route(currentTarget[m.route.mode].slice(modes[m.route.mode].length), args);
}
function setScroll() {
|
clear pendingRequests count on routeUnobtrusive(e)
|
diff --git a/src/frontend/org/voltdb/RestoreAgent.java b/src/frontend/org/voltdb/RestoreAgent.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/RestoreAgent.java
+++ b/src/frontend/org/voltdb/RestoreAgent.java
@@ -830,7 +830,7 @@ SnapshotCompletionInterest {
*/
private Long deserializeRestoreInformation(List<String> children,
Map<Long, Set<SnapshotInfo>> snapshotFragments) {
- byte recover = m_action != START_ACTION.CREATE ? (byte) 1 : 0;
+ byte recover = (byte) m_action.ordinal();
Long clStartTxnId = null;
ByteBuffer buf;
for (String node : children) {
@@ -927,7 +927,7 @@ SnapshotCompletionInterest {
buf.putLong(min);
}
// 1 means recover, 0 means to create new DB
- buf.put(m_action != START_ACTION.CREATE ? (byte) 1 : 0);
+ buf.put((byte) m_action.ordinal());
buf.putInt(snapshots.size());
for (SnapshotInfo snapshot : snapshots) {
|
Serialize the ordinal value or the start action so that if we add something
later, they will be checked as well.
|
diff --git a/kerncraft/machinemodel.py b/kerncraft/machinemodel.py
index <HASH>..<HASH> 100755
--- a/kerncraft/machinemodel.py
+++ b/kerncraft/machinemodel.py
@@ -129,9 +129,9 @@ class MachineModel(object):
if 'cache per group' not in c:
continue
cache_dict[c['level']] = deepcopy(c['cache per group'])
- # Scale size of shared caches according to cores
+ # Scale size of last cache according to cores (typically shared within NUMA domain)
if c['cores per group'] > 1:
- cache_dict[c['level']]['sets'] //= cores
+ cache_dict[c['level']]['sets'] //= min(cores, self['cores per NUMA domain'])
cs, caches, mem = cachesim.CacheSimulator.from_dict(cache_dict)
|
fixed out of numa domain scaling of last level cache size
|
diff --git a/pixelgl/interface.go b/pixelgl/interface.go
index <HASH>..<HASH> 100644
--- a/pixelgl/interface.go
+++ b/pixelgl/interface.go
@@ -70,4 +70,4 @@ func (noOpDoer) Do(sub func(ctx Context)) {
}
// NoOpDoer is a Doer that just passes an empty context to the caller of Do.
-var NoOpDoer = noOpDoer{}
+var NoOpDoer Doer = noOpDoer{}
|
change NoOpDoer type just to Doer
|
diff --git a/djstripe/admin.py b/djstripe/admin.py
index <HASH>..<HASH> 100644
--- a/djstripe/admin.py
+++ b/djstripe/admin.py
@@ -837,7 +837,14 @@ class WebhookEndpointAdmin(admin.ModelAdmin):
ret.setdefault("base_url", base_url)
return ret
- def delete_model(self, request, obj):
- obj._api_delete()
+ def delete_model(self, request, obj: models.WebhookEndpoint):
+ try:
+ obj._api_delete()
+ except InvalidRequestError as e:
+ if e.user_message.startswith("No such webhook endpoint: "):
+ # Webhook was already deleted in Stripe
+ pass
+ else:
+ raise
return super().delete_model(request, obj)
|
Handle webhook endpoints already having been deleted upstream
|
diff --git a/app/controllers/renalware/exit_site_infections_controller.rb b/app/controllers/renalware/exit_site_infections_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/renalware/exit_site_infections_controller.rb
+++ b/app/controllers/renalware/exit_site_infections_controller.rb
@@ -23,8 +23,8 @@ module Renalware
def update
if @exit_site_infection.update(exit_site_infection_params)
- redirect_to patient_pd_summary_path(@patient),
- notice: "You have successfully updated an exit site infection."
+ redirect_to patient_exit_site_infection_path(@patient, @exit_site_infection),
+ :notice => "You have successfully updated an exit site infection."
else
render :edit
end
diff --git a/spec/controllers/renalware/exit_site_infections_controller_spec.rb b/spec/controllers/renalware/exit_site_infections_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/renalware/exit_site_infections_controller_spec.rb
+++ b/spec/controllers/renalware/exit_site_infections_controller_spec.rb
@@ -66,7 +66,7 @@ module Renalware
exit_site_infection: {
diagnosis_date: "25/06/#{Date.current.year}"
}
- expect(response).to redirect_to(pd_info_patient_path(@patient))
+ expect(response).to redirect_to(patient_exit_site_infection_path(@patient, subject))
end
end
|
Fixing rebase - adjusted update redirect for exit site infections controller
|
diff --git a/src/argumentsToList.js b/src/argumentsToList.js
index <HASH>..<HASH> 100644
--- a/src/argumentsToList.js
+++ b/src/argumentsToList.js
@@ -8,7 +8,7 @@ import { unapply, identity } from 'ramda';
*
* @example
*
- * R.compose(R.sum, argumentsToList)(1, 2, 3) // 6
+ * R.compose(R.sum, R_.argumentsToList)(1, 2, 3) // 6
*
* @sig (a, b, c, ...) → ([a, b, c, ...])
*/
|
Added missing R_ in the docs
|
diff --git a/bounce/bounce.go b/bounce/bounce.go
index <HASH>..<HASH> 100644
--- a/bounce/bounce.go
+++ b/bounce/bounce.go
@@ -138,8 +138,8 @@ again:
count++
}
if count > 1 {
- go handleMouse(m, mc, mcc, rasterMaker)
- mc = nil
+// go handleMouse(m, mc, mcc, rasterMaker)
+// mc = nil
}else if m.Buttons != 0 {
go handleMouse(m, mc, mcc, lineMaker)
mc = nil
|
removed rasterMaker call for the time being
|
diff --git a/baron/grammator_operators.py b/baron/grammator_operators.py
index <HASH>..<HASH> 100644
--- a/baron/grammator_operators.py
+++ b/baron/grammator_operators.py
@@ -137,13 +137,14 @@ def include_operators(pg):
@pg.production("power : atom DOUBLE_STAR factor")
@pg.production("power : atom DOUBLE_STAR power")
def binary_operator_node((first, operator, second)):
- return binary_operator(
- operator.value,
- first,
- second,
- first_space=operator.before_space,
- second_space=operator.after_space
- )
+ return {
+ "type": "binary_operator",
+ "value": operator.value,
+ "first": first,
+ "second": second,
+ "first_space": operator.before_space,
+ "second_space": operator.after_space
+ }
@pg.production("factor : PLUS factor")
|
[mod] continue refactoring
|
diff --git a/salt/modules/vault.py b/salt/modules/vault.py
index <HASH>..<HASH> 100644
--- a/salt/modules/vault.py
+++ b/salt/modules/vault.py
@@ -31,6 +31,19 @@ Functions to interact with Hashicorp Vault.
Currently only token auth is supported. The token must be able to create
tokens with the policies that should be assigned to minions. Required.
+ You can still use the token via a OS environment variable via this
+ config example:
+
+ .. code-block: yaml
+
+ vault:
+ url: https://vault.service.domain:8200
+ auth:
+ method: token
+ token: sdb://osenv/VAULT_TOKEN
+ osenv:
+ driver: env
+
policies
Policies that are assigned to minions when requesting a token. These can
either be static, eg saltstack/minions, or templated, eg
|
Add example how to setup vault token via environment variable.
|
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js
index <HASH>..<HASH> 100644
--- a/docs/assets/js/src/application.js
+++ b/docs/assets/js/src/application.js
@@ -28,6 +28,11 @@
$('.tooltip-test').tooltip()
$('.popover-test').popover()
+ // Disable empty links in docs examples
+ $('.bd-example [href=#]').click(function (e) {
+ e.preventDefault()
+ })
+
// Config ZeroClipboard
ZeroClipboard.config({
moviePath: '/assets/flash/ZeroClipboard.swf',
|
restore docs kill links js
|
diff --git a/Generator/PHPMethod.php b/Generator/PHPMethod.php
index <HASH>..<HASH> 100644
--- a/Generator/PHPMethod.php
+++ b/Generator/PHPMethod.php
@@ -4,6 +4,10 @@ namespace DrupalCodeBuilder\Generator;
/**
* Generator class for class methods.
+ *
+ * @deprecated
+ *
+ * TODO: replace this with PHPFunction throughout.
*/
class PHPMethod extends PHPFunction {
|
Changed PHPMethod generator to deprecated.
|
diff --git a/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java b/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java
index <HASH>..<HASH> 100644
--- a/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java
+++ b/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java
@@ -78,8 +78,8 @@ public final class TimeSpanConverter implements Serializable {
} else if ("es".equals(language)) {
formats[NOW] = new MessageFormat("Ahora");
formats[N_SECONDS_AGO] = new MessageFormat("hace {0} segundos");
- formats[A_MINUTE_AGO] = new MessageFormat("hace 1 munito");
- formats[N_MINUTES_AGO] = new MessageFormat("hace {0} munitos");
+ formats[A_MINUTE_AGO] = new MessageFormat("hace 1 minuto");
+ formats[N_MINUTES_AGO] = new MessageFormat("hace {0} minutos");
formats[AN_HOUR_AGO] = new MessageFormat("hace 1 hora");
formats[N_HOURS_AGO] = new MessageFormat("hace {0} horas");
dateMonth = new SimpleDateFormat("d MMM", locale);
|
Fix to the translation for the word minute
|
diff --git a/tests/integration/components/sl-date-time-test.js b/tests/integration/components/sl-date-time-test.js
index <HASH>..<HASH> 100644
--- a/tests/integration/components/sl-date-time-test.js
+++ b/tests/integration/components/sl-date-time-test.js
@@ -131,9 +131,9 @@ test( 'Relative values applied correctly', function( assert ) {
test( 'Date values applied correctly', function( assert ) {
- const pastDate = window.moment().subtract( 3, 'months' ).toISOString();
+ const pastDateISO = window.moment().subtract( 3, 'months' ).toISOString();
- this.set( 'value', pastDate );
+ this.set( 'value', pastDateISO );
this.render( hbs`
{{sl-date-time
@@ -144,11 +144,12 @@ test( 'Date values applied correctly', function( assert ) {
` );
const pastRendered = this.$( '>:first-child' ).text().trim();
+ const pastDate = window.moment().subtract( 3, 'months' );
assert.strictEqual(
- /^\d{4}[-]\d{2}[-]\d{2}$/.test( pastRendered ),
- true,
- 'Default date string matches default ISO date pattern'
+ pastRendered,
+ pastDate.format( 'YYYY-MM-DD' ),
+ 'Default date string matches default date pattern'
);
const datetimeAttr = this.$( '>:first-child' ).attr( 'datetime' );
|
changed 3 months ago relative date from code review
|
diff --git a/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java b/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java
index <HASH>..<HASH> 100644
--- a/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java
+++ b/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java
@@ -43,6 +43,12 @@ public enum LaunchingMessageKind {
@Format("Error launching %s. Is the program annotated with @QuartzExecution?")
ELAUNCH0001,
+ /**
+ * An Error occurred
+ */
+ @Format("An Error occurred when running the Program %s!")
+ ELAUNCH0002,
+
/*
* Information messages for TcpIp
*/
@@ -156,7 +162,7 @@ public enum LaunchingMessageKind {
/**
* Program %s with jobId %s is terminated!
*/
- @Format("Program %s with jobId %s is terminated!")
+ @Format("Program %s with jobId %s is terminated with status %s!")
IQUARTZ0003,
/*
|
Add a entry in logs if an Exception is thrown in a Procedure.
|
diff --git a/simple8b/encoding.go b/simple8b/encoding.go
index <HASH>..<HASH> 100644
--- a/simple8b/encoding.go
+++ b/simple8b/encoding.go
@@ -30,7 +30,7 @@ const MaxValue = (1 << 60) - 1
// Encoder converts a stream of unsigned 64bit integers to a compressed byte slice.
type Encoder interface {
// Write writes a uint64 to the stream.
- Write(v uint64)
+ Write(v uint64) error
// Bytes returns the compressed uint64 as a byte slice.
Bytes() ([]byte, error)
@@ -60,13 +60,16 @@ func NewEncoder() Encoder {
}
}
-func (e *encoder) Write(v uint64) {
+func (e *encoder) Write(v uint64) error {
if e.i >= len(e.buf) {
- e.flush()
+ if err := e.flush(); err != nil {
+ return err
+ }
}
e.buf[e.i] = v
e.i += 1
+ return nil
}
func (e *encoder) flush() error {
|
Return an error from simple8b.Write
If the value is too large, an error could be returned.
|
diff --git a/listener/listener.go b/listener/listener.go
index <HASH>..<HASH> 100644
--- a/listener/listener.go
+++ b/listener/listener.go
@@ -71,7 +71,6 @@ func (l *SQSListener) waitForMessages(qURL *string) {
o, err := l.sqsClient.ReceiveMessage(&sqs.ReceiveMessageInput{
MaxNumberOfMessages: aws.Int64(1),
QueueUrl: qURL,
- VisibilityTimeout: aws.Int64(10),
})
if err != nil || len(o.Messages) < 1 {
time.Sleep(l.pollInterval)
|
Remove default visibility timeout from SQS Listener
Test Plan: ran sqs_test.go with some debug logging
Reviewers: gareth
Reviewed By: gareth
Subscribers: mperrone, rhu, jackgao, maasted
Differential Revision: <URL>
|
diff --git a/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java b/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
index <HASH>..<HASH> 100644
--- a/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
+++ b/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
@@ -508,6 +508,8 @@ public class RaftServiceManager implements AutoCloseable {
scheduleCompaction();
}
}, threadContext);
+ } else {
+ scheduleCompaction();
}
}
|
Ensure log compaction is rescheduled for no-op compactions.
|
diff --git a/file_system.go b/file_system.go
index <HASH>..<HASH> 100644
--- a/file_system.go
+++ b/file_system.go
@@ -406,6 +406,9 @@ type ChildInodeEntry struct {
// lookup request.
//
// Leave at the zero value to disable caching.
+ //
+ // Beware: this value is ignored on OS X, where entry caching is disabled by
+ // default. See notes on MountConfig.EnableVnodeCaching for more.
EntryExpiration time.Time
}
|
Added a note on the EntryExpiration field.
|
diff --git a/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java b/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java
index <HASH>..<HASH> 100644
--- a/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java
+++ b/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java
@@ -74,7 +74,7 @@ public class AuthAndEncryptProtocolTest {
}
@WithRunningServer(COORDINATOR_NODE)
- @Test
+ @Test(group = "unstable", description = "ISPN-4164")
public void testFriendlyNodeCanJoin() throws Exception {
try {
controller.start(JOINING_NODE_FRIEND);
@@ -105,7 +105,7 @@ public class AuthAndEncryptProtocolTest {
}
@WithRunningServer(COORDINATOR_NODE_NO_ENCRYPT)
- @Test
+ @Test(group = "unstable", description = "ISPN-4164")
public void testAlienNodeCannotJoin() throws Exception {
try {
controller.start(JOINING_NODE_ALIEN);
@@ -115,4 +115,4 @@ public class AuthAndEncryptProtocolTest {
controller.stop(JOINING_NODE_ALIEN);
}
}
-}
\ No newline at end of file
+}
|
ISPN-<I> AuthAndEncryptProtocolTest fails
Temporarily disable the test.
|
diff --git a/packages/util/browser.js b/packages/util/browser.js
index <HASH>..<HASH> 100644
--- a/packages/util/browser.js
+++ b/packages/util/browser.js
@@ -36,7 +36,7 @@ if (jsio.__env.name == 'browser') {
if(!params) { params = 'div'; }
if(typeof params == 'string') { return doc.createElement(params); }
- var el = doc.createElement(params.tag || 'div');
+ var el = doc.createElement(params.tag || params.tagName || 'div');
if(params.style) { $.style(el, params.style); }
if(params.src) { el.src = params.src; }
if(params.attrs) {
|
browser should accept tag or tagName since tagName is standard
|
diff --git a/src/ProcessManager.php b/src/ProcessManager.php
index <HASH>..<HASH> 100644
--- a/src/ProcessManager.php
+++ b/src/ProcessManager.php
@@ -875,7 +875,15 @@ class ProcessManager
continue;
}
- if ($knownMTime !== filemtime($filePath) && $this->filesLastMd5[$filePath] !== md5_file($filePath, true)) {
+ $actualFileTime = filemtime($filePath);
+ $actualFileHash = md5_file($filePath);
+
+ if ($knownMTime !== $actualFileTime && $this->filesLastMd5[$filePath] !== $actualFileHash) {
+
+ // update tracked entry metadata
+ $this->filesLastMd5[$filePath] = $actualFileHash;
+ $this->filesLastMTime[$filePath] = $actualFileTime;
+
$this->output->writeln(
sprintf("<info>[%s] File %s has changed.</info>", date('d/M/Y:H:i:s O'), $filePath)
);
@@ -1030,7 +1038,7 @@ class ProcessManager
$onSlaveClosed($slave);
}
}
-
+
if ($this->reloadTimeoutTimer !== null) {
$this->reloadTimeoutTimer->cancel();
}
|
Fix infinite reload after tracked file changed (#<I>)
|
diff --git a/spacy/training/loggers.py b/spacy/training/loggers.py
index <HASH>..<HASH> 100644
--- a/spacy/training/loggers.py
+++ b/spacy/training/loggers.py
@@ -72,7 +72,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []):
for field in remove_config_values:
del config_dot[field]
config = util.dot_to_dict(config_dot)
- wandb.init(project=project_name, config=config)
+ wandb.init(project=project_name, config=config, reinit=True)
console_log_step, console_finalize = console(nlp)
def log_step(info: Dict[str, Any]):
@@ -88,7 +88,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []):
def finalize():
console_finalize()
- pass
+ wandb.join()
return log_step, finalize
|
fix wandb logger when calling multiple times from same script
|
diff --git a/scipy_data_fitting/plot.py b/scipy_data_fitting/plot.py
index <HASH>..<HASH> 100644
--- a/scipy_data_fitting/plot.py
+++ b/scipy_data_fitting/plot.py
@@ -41,7 +41,7 @@ class Plot:
Must contain the keys `data` and `fit`.
- Options are passed as keyword arguments to [``][1] for the corresponding plot
+ Options are passed as keyword arguments to [`matplotlib.pyplot.plot`][1] for the corresponding plot
Default:
@@ -50,6 +50,8 @@ class Plot:
'data': {'marker': '.', 'linestyle': 'None'},
'fit': {},
}
+
+ [1]: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.plot
"""
if not hasattr(self, '_options'):
self._options = {
|
Added a missing external reference to docstring.
|
diff --git a/src/managers/GuildMemberManager.js b/src/managers/GuildMemberManager.js
index <HASH>..<HASH> 100644
--- a/src/managers/GuildMemberManager.js
+++ b/src/managers/GuildMemberManager.js
@@ -268,7 +268,7 @@ class GuildMemberManager extends CachedManager {
let endpoint = this.client.api.guilds(this.guild.id);
if (id === this.client.user.id) {
- const keys = Object.keys(_data);
+ const keys = Object.keys(data);
if (keys.length === 1 && keys[0] === 'nick') endpoint = endpoint.members('@me');
else endpoint = endpoint.members(id);
} else {
|
fix(GuildMemberManager): nick endpoint (#<I>)
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -152,7 +152,7 @@ getServerString = () => {
if (err) {
throw err;
}
- const fileContent = fs.readFileSync('/bundle.js').toString('ascii');
+ const fileContent = fs.readFileSync('/bundle.js').toString('utf-8');
// Using eval because we can't require from `memory-fs`
data = requireFromString(fileContent);
sync = false;
|
In webpack config, now toString transform bundle to utf-8 instead of ascii (used in build for production)
|
diff --git a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
+++ b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
@@ -401,13 +401,8 @@ export default class CommonBabelGenerator extends Generator {
} else {
packageUtils.removeDependencies(pkg, ['@types/node']);
packageUtils.removeDevDependencies(pkg, ['@types/node']);
- if (pkg.engines && useBabel) {
- delete pkg.engines.node;
- if (Object.keys(pkg.engines).length === 0) delete pkg.engines;
- } else {
- // Supported LTS versions of node, that supports ESM modules.
- pkg.engines.node = '^14.13.1 || >=16.0.0';
- }
+ // Supported LTS versions of node, that supports ESM modules.
+ pkg.engines.node = '^14.13.1 || >=16.0.0';
}
/* browserslist */
|
fix(pob): always add engines
|
diff --git a/tests/test_widgets.py b/tests/test_widgets.py
index <HASH>..<HASH> 100644
--- a/tests/test_widgets.py
+++ b/tests/test_widgets.py
@@ -130,7 +130,7 @@ class TestWidgetManagerInActivity(TestBetamax):
partInstanceId=str(self.frame.id)
),
writable_models=self.frame_model.properties,
- reable_models=[]
+ readable_models=[]
)
def test_attachment_widget_with_associations_using_widget_manager(self):
|
widgets: tests for the propertygrid and attachmentwidget
|
diff --git a/src/projects/index.js b/src/projects/index.js
index <HASH>..<HASH> 100644
--- a/src/projects/index.js
+++ b/src/projects/index.js
@@ -117,7 +117,7 @@ module.exports.getConfig = packs(async argv => {
return config;
});
-async function resolveDeployConfig(config) {
+function resolveDeployConfig(config) {
config.deploy = config.deploy || DEFAULTS.deploy;
Object.keys(config.deploy)
|
resolveDeployConfig doesn't need to be async
|
diff --git a/index.php b/index.php
index <HASH>..<HASH> 100644
--- a/index.php
+++ b/index.php
@@ -1,3 +1,3 @@
<?php
-header('Location: /demos/index.php');
+header('Location: ./demos/index.php');
|
make this work even if ATK is not in your root folder
|
diff --git a/src/Meting.php b/src/Meting.php
index <HASH>..<HASH> 100644
--- a/src/Meting.php
+++ b/src/Meting.php
@@ -496,7 +496,7 @@ class Meting
case 'netease':
$api = array(
'method' => 'POST',
- 'url' => 'http://music.163.com/api/v3/playlist/detail',
+ 'url' => 'http://music.163.com/api/v6/playlist/detail',
'body' => array(
's' => '0',
'id' => $id,
|
<I>, fixed netease playlist api
|
diff --git a/lib/less/index.js b/lib/less/index.js
index <HASH>..<HASH> 100644
--- a/lib/less/index.js
+++ b/lib/less/index.js
@@ -41,7 +41,8 @@ var less = {
var error = [];
var stylize = options.color ? require('./lessc_helper').stylize : function (str) { return str };
- if (ctx.stack) { return stylize(ctx.stack, 'red') }
+ // only output a stack if it isn't a less error
+ if (ctx.stack && !ctx.type) { return stylize(ctx.stack, 'red') }
if (!ctx.hasOwnProperty('index')) {
return ctx.stack || ctx.message;
|
Only output stack if it is not a less error
|
diff --git a/Model/Service/TransactionHandlerService.php b/Model/Service/TransactionHandlerService.php
index <HASH>..<HASH> 100755
--- a/Model/Service/TransactionHandlerService.php
+++ b/Model/Service/TransactionHandlerService.php
@@ -293,9 +293,6 @@ class TransactionHandlerService
$this->transaction
);
- // Set the total paid
- $this->order->setTotalPaid($this->order->getGrandTotal());
-
// Add order comment
$this->addOrderComment('The captured amount is %1.');
} else {
|
Removed an unneeded order total setter in the capture webhook handler
|
diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java
index <HASH>..<HASH> 100644
--- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java
+++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java
@@ -59,7 +59,7 @@ public class ModuleClassLoaderProvider extends ClassLoaderProvider {
@Override
public ClassLoader getServerJAXRPCIntegrationClassLoader() {
- throw new UnsupportedOperationException("JAXRPC not supported"); //TODO!!
+ throw new UnsupportedOperationException();
}
public static void register() {
|
[AS7-<I>] minor change on ModuleClassLoaderProvider, JAXRPC related method will later be dropped.
|
diff --git a/ObjJAcornCompiler.js b/ObjJAcornCompiler.js
index <HASH>..<HASH> 100644
--- a/ObjJAcornCompiler.js
+++ b/ObjJAcornCompiler.js
@@ -2985,7 +2985,7 @@ ClassDeclarationStatement: function(node, st, c, format) {
// Check if ivar is already declared in this class or its super classes.
checkIfIvarIsAlreadyDeclaredAndInSuperClass(classDef, checkIfIvarIsAlreadyDeclaredAndInSuperClass);
- var isTypeDefined = !ivarTypeIsClass || typeof global[ivarType] !== "undefined" || typeof window[ivarType] !== "undefined"
+ var isTypeDefined = !ivarTypeIsClass || typeof global[ivarType] !== "undefined" || (typeof window !== "undefined" && typeof window[ivarType] !== "undefined")
|| compiler.getClassDef(ivarType) || compiler.getTypeDef(ivarType) || ivarType == classDef.name;
if (!isTypeDefined && compiler.options.warnings.includes(warningUnknownIvarType))
|
Fixed: Don't crash if "window" variable is don't defined
|
diff --git a/lib/lolapi.js b/lib/lolapi.js
index <HASH>..<HASH> 100644
--- a/lib/lolapi.js
+++ b/lib/lolapi.js
@@ -630,11 +630,9 @@
// TODO: add getProfileIcons
/** @deprecated will stop workin on 2017-06-24 if not migrated to v3 */
- League.Static.getRealm = function(regionOrFunction, callback) { // TODO: migrate to v3
- var realmUrl = '/v1.2/realm?', // TODO: replace with definition of urls on top of file
- regionAndFunc = util.getCallbackAndRegion(regionOrFunction, region, callback),
- url = util.craftStaticUrl(endpoint + staticUrl, regionAndFunc.region, realmUrl, authKey);
- return util.makeRequest(url, 'Error getting realm: ', null, regionAndFunc.callback);
+ League.Static.getRealm = function(platformId = platformIdDefault, callback = undefined) {
+ const url = util.craftUrlV3(apiUrl.staticData.realms(platformId), authKey);
+ return util.makeRequest(url, 'Error getting realm: ', null, callback);
};
League.Static.getRuneList = function({version, runeListData, locale} = {}, platformId = platformIdDefault, callback = undefined) {
|
refactor (v3 methods) migrate Static.getRealm
|
diff --git a/app.js b/app.js
index <HASH>..<HASH> 100755
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
// Config
// Load required files
-var sys = require('sys'),
+var util = require('util'),
path = require('path'),
fs = require('fs'),
util = require('util'),
|
[fix] Changed require('util') to require('util') for compatibility with node <I>
|
diff --git a/simplepie.class.php b/simplepie.class.php
index <HASH>..<HASH> 100644
--- a/simplepie.class.php
+++ b/simplepie.class.php
@@ -1764,15 +1764,7 @@ class SimplePie
$this->multifeed_objects = array();
foreach ($this->multifeed_url as $url)
{
- if (SIMPLEPIE_PHP5)
- {
- // This keyword needs to defy coding standards for PHP4 compatibility
- $this->multifeed_objects[$i] = clone($this);
- }
- else
- {
- $this->multifeed_objects[$i] = $this;
- }
+ $this->multifeed_objects[$i] = clone $this;
$this->multifeed_objects[$i]->set_feed_url($url);
$success |= $this->multifeed_objects[$i]->init();
$i++;
@@ -8522,11 +8514,7 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
if (is_a($data, 'SimplePie'))
{
- if (SIMPLEPIE_PHP5)
- {
- // This keyword needs to defy coding standards for PHP4 compatibility
- $data = clone($data);
- }
+ $data = clone $data;
$prepared = $this->prepare_simplepie_object_for_cache($data);
|
Replace clone() with clone as per PHP 5 coding standards
|
diff --git a/lib/unexpectedMessy.js b/lib/unexpectedMessy.js
index <HASH>..<HASH> 100644
--- a/lib/unexpectedMessy.js
+++ b/lib/unexpectedMessy.js
@@ -88,13 +88,13 @@ function bufferCanBeInterpretedAsUtf8(buffer) {
}
function expectMessageToSatisfy(expect, subject, value) {
+ subject.upgradeOrDowngradeBodyToMatchSpec(value);
try {
if (typeof value === 'string') {
value = new messy.Message(value);
}
expect(subject.headers, 'to [exhaustively] satisfy', value.headers || {});
- subject.upgradeOrDowngradeBodyToMatchSpec(value);
if ('body' in value) {
if (isRegExp(value.body)) {
expect(subject.body, 'to satisfy', value.body);
|
upgrade/downgrade the body before doing anything else so the diff will come out correctly in case of a header mismatch.
|
diff --git a/conn_linux_integration_test.go b/conn_linux_integration_test.go
index <HASH>..<HASH> 100644
--- a/conn_linux_integration_test.go
+++ b/conn_linux_integration_test.go
@@ -3,7 +3,6 @@
package netlink_test
import (
- "errors"
"fmt"
"net"
"os"
@@ -1055,7 +1054,8 @@ func rtnlReceive(t *testing.T, c *netlink.Conn, do func()) string {
func setStrictCheck(t *testing.T, c *netlink.Conn) {
if err := c.SetOption(netlink.GetStrictCheck, true); err != nil {
- if errors.Is(err, unix.ENOPROTOOPT) {
+ // TODO(mdlayher): use errors.Is when we drop support for Go 1.12.
+ if err.(*netlink.OpError).Err == unix.ENOPROTOOPT {
t.Skipf("skipping, netlink strict checking is not supported on this kernel")
}
|
netlink: avoid errors.Is for netlink strict checking test
|
diff --git a/cumulusci/robotframework/utils.py b/cumulusci/robotframework/utils.py
index <HASH>..<HASH> 100644
--- a/cumulusci/robotframework/utils.py
+++ b/cumulusci/robotframework/utils.py
@@ -208,7 +208,7 @@ class PerfJSONConverter:
def perfJSON2Dict(self, include_raw=False):
rc = {
- f"{metric['metrics']}-{metricType}": metric[metricType]
+ metric["metrics"] + "-" + metricType: metric[metricType]
for metricType in ("totalTime", "totalCalls")
for metric in self.data["summary"]
}
|
Python 2 compatibility because it was easy.
|
diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go
index <HASH>..<HASH> 100644
--- a/cmd/lncli/commands.go
+++ b/cmd/lncli/commands.go
@@ -15,6 +15,7 @@ import (
"strings"
"sync"
"syscall"
+ "time"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
@@ -3532,7 +3533,7 @@ var forwardingHistoryCommand = cli.Command{
payment circuits (HTLCs) over a particular time range (--start_time and
--end_time). The start and end times are meant to be expressed in
seconds since the Unix epoch. If --start_time isn't provided,
- then the Unix epoch (01-01-1970) is used. If --end_time isn't provided,
+ then 24 hours ago is used. If --end_time isn't provided,
then the current time is used.
The max number of events returned is 50k. The default number is 100,
@@ -3586,6 +3587,9 @@ func forwardingHistory(ctx *cli.Context) error {
return fmt.Errorf("unable to decode start_time %v", err)
}
args = args.Tail()
+ default:
+ now := time.Now()
+ startTime = uint64(now.Add(-time.Hour * 24).Unix())
}
switch {
|
lncli: start_time defaults to <I> hours ago
Here we set start_time to <I> hours prior
if it's not provided on the CLI. The
effect of this is when you don't provide
a start_time:
CLI: -<I>h
RPC: Unix Epoch
|
diff --git a/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java b/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java
index <HASH>..<HASH> 100644
--- a/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java
+++ b/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java
@@ -172,7 +172,7 @@ public class HttpTest extends SlimFixtureWithMap {
String filePath = getFilePathFromWikiUrl(fileName);
File file = new File(filePath);
if (!file.exists()) {
- throw new StopTestException(false, "File " + fileName + " not found. Resolved to: " + file.getAbsolutePath());
+ throw new StopTestException(false, "File " + filePath + " not found.");
}
try {
|
Improve error message: getFilePathFromWikiUrl already checked whether file existed. The location returned does not specify where it looked exactly
|
diff --git a/comment/lib.php b/comment/lib.php
index <HASH>..<HASH> 100644
--- a/comment/lib.php
+++ b/comment/lib.php
@@ -636,7 +636,7 @@ class comment {
* }
* @return boolean
*/
- public function delete_comments($param) {
+ public static function delete_comments($param) {
global $DB;
$param = (array)$param;
if (empty($param['contextid'])) {
diff --git a/question/category_class.php b/question/category_class.php
index <HASH>..<HASH> 100644
--- a/question/category_class.php
+++ b/question/category_class.php
@@ -428,7 +428,7 @@ class question_category_object {
}
// Update the category record.
- $cat = null;
+ $cat = new stdClass();
$cat->id = $updateid;
$cat->name = $newname;
$cat->info = $newinfo;
|
MDL-<I> more E_STRCT fixes
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,16 +2,6 @@ from distutils.command.build import build as DistutilsBuild
from setuptools import setup, Extension
import subprocess
-class FakeNumpy(object):
- def get_include(self):
- raise Exception('Tried to compile doom-py, but numpy is not installed. HINT: Please install numpy separately before attempting this -- `pip install numpy` should do it.')
-
-try:
- import numpy
-except Exception as e:
- print('Failed to load numpy: {}. Numpy must be already installed to normally set up doom-py. Trying to actually build doom-py will result in an error.'.format(e))
- numpy = FakeNumpy()
-
# For building Doom
class BuildDoom(DistutilsBuild):
def run(self):
|
Remove FakeNumpy
Only neeed in pachi-py where numpy is needed at build time
|
diff --git a/includes/class-parse-this-base.php b/includes/class-parse-this-base.php
index <HASH>..<HASH> 100644
--- a/includes/class-parse-this-base.php
+++ b/includes/class-parse-this-base.php
@@ -39,6 +39,10 @@ class Parse_This_Base {
return $return->format( DATE_W3C );
}
+ public static function validate_email( $email ) {
+ return filter_var( $email, FILTER_VALIDATE_EMAIL );
+ }
+
/**
*
*/
diff --git a/includes/class-parse-this-rss.php b/includes/class-parse-this-rss.php
index <HASH>..<HASH> 100644
--- a/includes/class-parse-this-rss.php
+++ b/includes/class-parse-this-rss.php
@@ -63,12 +63,6 @@ class Parse_This_RSS extends Parse_This_Base {
}
}
- public static function validate_email( $email ) {
- $regexp = '/([a-z0-9_\.\-])+(\@|\[at\])+(([a-z0-9\-])+\.)+([a-z0-9]{2,4})+/i';
- preg_match( $regexp, $email, $match );
- return is_array( $match ) ? array_shift( $match ) : '';
- }
-
/*
* Takes a SimplePie_Author object and Turns it into a JF2 Author property
* @param SimplePie_Author $author
|
Move validate email to base class and refresh.
|
diff --git a/src/iterable-functions.php b/src/iterable-functions.php
index <HASH>..<HASH> 100644
--- a/src/iterable-functions.php
+++ b/src/iterable-functions.php
@@ -84,17 +84,16 @@ function iterable_filter(iterable $iterable, ?callable $filter = null): iterable
/**
* Reduces an iterable.
*
- * @param iterable<mixed> $iterable
- * @param callable(mixed, mixed):mixed $reduce
+ * @param iterable<TValue> $iterable
+ * @param callable(TResult|null, TValue):TResult $reduce
+ * @param TResult|null $initial
*
- * @return mixed
+ * @return TResult|null
*
- * @psalm-template TValue
+ * @template TValue
* @template TResult
- * @psalm-param iterable<TValue> $iterable
- * @psalm-param callable(TResult|null, TValue):TResult $reduce
- * @psalm-param TResult|null $initial
- * @psalm-return TResult|null
+ * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*/
function iterable_reduce(iterable $iterable, callable $reduce, $initial = null)
{
|
Chore: Add types to iterable_reduce() (#<I>)
|
diff --git a/raft.go b/raft.go
index <HASH>..<HASH> 100644
--- a/raft.go
+++ b/raft.go
@@ -725,12 +725,13 @@ func (r *Raft) leaderLoop() {
}
// Group commit, gather all the ready commits
ready := []*logFuture{newLog}
+ GROUP_COMMIT_LOOP:
for i := 0; i < r.conf.MaxAppendEntries; i++ {
select {
case newLog := <-r.applyCh:
ready = append(ready, newLog)
default:
- break
+ break GROUP_COMMIT_LOOP
}
}
|
Break out of group commit early.
This is a very minor optimisation to not waste a few cycles re-checking the applyCh for new logs up to <I> times when none are present.
|
diff --git a/lib/rack/heartbeat.rb b/lib/rack/heartbeat.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/heartbeat.rb
+++ b/lib/rack/heartbeat.rb
@@ -16,5 +16,5 @@ module Rack
end
end
-require 'heartbeat/railtie' if defined?(Rails)
+require File.expand_path('../heartbeat/railtie', __FILE__) if defined?(Rails)
diff --git a/lib/rack/heartbeat/railtie.rb b/lib/rack/heartbeat/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/heartbeat/railtie.rb
+++ b/lib/rack/heartbeat/railtie.rb
@@ -1,4 +1,4 @@
-module Rack::Heartbeat
+module Rack
class HeartBeatRailtie < Rails::Railtie
initializer "heartbeat.initializer" do |app|
|
oh, and fix path / naming issues
|
diff --git a/lib/irc.js b/lib/irc.js
index <HASH>..<HASH> 100644
--- a/lib/irc.js
+++ b/lib/irc.js
@@ -551,10 +551,18 @@ function Client(server, nick, opt) {
case "PING":
self.send("PONG", message.args[0]);
break;
+ case "QUIT":
+ if ( self.opt.debug )
+ sys.log("QUIT: " + message.prefix + " " + message.args.join(" "));
+ break;
case "NOTICE":
if ( self.opt.debug )
sys.log("NOTICE: " + message.args.join(" "));
break;
+ case "MODE":
+ if ( self.opt.debug )
+ sys.log("MODE:" + message.args[0] + " sets mode: " + message.args[1]);
+ break;
case "rpl_motdstart":
self.motd = message.args[1] + "\n";
break;
|
Added QUIT and MODE to handled messages
|
diff --git a/test/cases/EmptyDisallow.php b/test/cases/EmptyDisallow.php
index <HASH>..<HASH> 100644
--- a/test/cases/EmptyDisallow.php
+++ b/test/cases/EmptyDisallow.php
@@ -7,8 +7,6 @@ class EmptyDisallowTest extends \PHPUnit_Framework_TestCase
* @covers RobotsTxtParser::isAllowed
* @covers RobotsTxtParser::isDisallowed
* @covers RobotsTxtParser::checkRule
- * @expectedException \DomainException
- * @expectedExceptionMessage Unable to check rules
* @param string $robotsTxtContent
*/
public function testEmptyDisallow($robotsTxtContent)
|
Removed even more non-sense code
This test was never intended to throw any exception, still it expects one.
Please don't mess up the code !!!
|
diff --git a/spyder/plugins/ipythonconsole/plugin.py b/spyder/plugins/ipythonconsole/plugin.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/ipythonconsole/plugin.py
+++ b/spyder/plugins/ipythonconsole/plugin.py
@@ -773,8 +773,7 @@ class IPythonConsole(SpyderPluginWidget):
# Add the action to the 'Consoles' menu on the main window
main_consoles_menu = self.main.consoles_menu_actions
main_consoles_menu.insert(0, create_client_action)
- main_consoles_menu += [create_pylab_action, create_sympy_action,
- create_cython_action, connect_to_kernel_action,
+ main_consoles_menu += [special_console_menu, connect_to_kernel_action,
MENU_SEPARATOR,
self.interrupt_action, restart_action,
reset_action]
|
Add special console menu to main consoles menu
|
diff --git a/packages/react-atlas-core/src/radioGroup/RadioGroup.js b/packages/react-atlas-core/src/radioGroup/RadioGroup.js
index <HASH>..<HASH> 100644
--- a/packages/react-atlas-core/src/radioGroup/RadioGroup.js
+++ b/packages/react-atlas-core/src/radioGroup/RadioGroup.js
@@ -4,7 +4,7 @@ import cx from 'classNames';
const RadioGroup = ({ className, children, name, ...props }) => {
return (
- <div {...props} styleName={className}>
+ <div {...props} className={className}>
{React.Children.map(children, child => {
if (child.type === Radio) {
return <Radio {...child.props} name={name}/>;
|
changed styleName to className in radioGroup
|
diff --git a/nion/swift/ScriptsDialog.py b/nion/swift/ScriptsDialog.py
index <HASH>..<HASH> 100644
--- a/nion/swift/ScriptsDialog.py
+++ b/nion/swift/ScriptsDialog.py
@@ -146,6 +146,13 @@ class RunScriptDialog(Dialog.ActionDialog):
list_widget.items = items
self.ui.set_persistent_object("interactive_scripts_0", items)
+ def remove_clicked() -> None:
+ indexes = list(list_widget.selected_items)
+ for index in sorted(indexes, reverse=True):
+ del items[index]
+ list_widget.items = items
+ self.ui.set_persistent_object("interactive_scripts_0", items)
+
def run_clicked() -> None:
indexes = list_widget.selected_items
if len(indexes) == 1:
@@ -159,6 +166,7 @@ class RunScriptDialog(Dialog.ActionDialog):
add_button_widget.on_clicked = add_clicked
remove_button_widget = ui.create_push_button_widget(_("Remove"))
+ remove_button_widget.on_clicked = remove_clicked
run_button_widget = ui.create_push_button_widget(_("Run"))
run_button_widget.on_clicked = run_clicked
|
Connect the 'remove' button in Scripts dialog.
|
diff --git a/tests/Whoops/Exception/InspectorTest.php b/tests/Whoops/Exception/InspectorTest.php
index <HASH>..<HASH> 100644
--- a/tests/Whoops/Exception/InspectorTest.php
+++ b/tests/Whoops/Exception/InspectorTest.php
@@ -45,6 +45,19 @@ class InspectorTest extends TestCase
}
/**
+ * @covers Whoops\Exception\Inspector::getFrames
+ */
+ public function testDoesNotFailOnPHP7ErrorObject()
+ {
+ if (class_exists('Error')) {
+ $inner = new \Error('inner');
+ $outer = $this->getException('outer', 0, $inner);
+ $inspector = $this->getInspectorInstance($outer);
+ $frames = $inspector->getFrames();
+ $this->assertSame($outer->getLine(), $frames[0]->getLine());
+ }
+ }
+ /**
* @covers Whoops\Exception\Inspector::getExceptionName
*/
public function testReturnsCorrectExceptionName()
|
Add unit test, fails on PHP7 if Inspector::getTrace() requires Exception instead of also allowing Error
|
diff --git a/eppy/tests/test_report_tables/test_report_tables.py b/eppy/tests/test_report_tables/test_report_tables.py
index <HASH>..<HASH> 100644
--- a/eppy/tests/test_report_tables/test_report_tables.py
+++ b/eppy/tests/test_report_tables/test_report_tables.py
@@ -21,9 +21,9 @@ def _report_tables(linesTable):
#print(reportNm[indx], reportHeader[2], 'Report')
reportDict[reportHeader[j]] = linesTable[i][1]
else:
- #print(reportNm[indx], reportHeader[2], 'Table')
+ print(reportNm[indx], reportHeader[2], 'Table')
indx = indx+1
- return reportDict.keys()
+ return reportDict.keys()
# def select_table(report_name, table_name, html_doc):
# """Uses the output of report_tables function to produce a
|
Minor adjustments to get the test running, and provide some meaningful output
|
diff --git a/pg.js b/pg.js
index <HASH>..<HASH> 100644
--- a/pg.js
+++ b/pg.js
@@ -435,11 +435,15 @@ SqlBuilder.column = function(name, schema) {
switch (cast) {
case 'integer':
case 'int':
- case 'byte':
case 'smallint':
case 'number':
cast = '::int';
break;
+ case 'byte':
+ case 'binary':
+ case 'bytea':
+ cast = '::bytea';
+ break;
case 'float':
case 'real':
case 'double':
@@ -451,6 +455,13 @@ SqlBuilder.column = function(name, schema) {
case 'bool':
cast = '::boolean';
break;
+ case 'text':
+ case 'varchar':
+ case 'character':
+ case 'char':
+ case 'string':
+ cast = '::text';
+ break;
}
}
|
Added more types for casting in Postgres
Separated out binary casting from integer (binary is stored as "bytea" which contains alpha characters).
Added in string casting to "text".
|
diff --git a/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java b/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java
index <HASH>..<HASH> 100644
--- a/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java
+++ b/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java
@@ -102,6 +102,24 @@ public final class Resolution
/**
* Get scaled resolution.
*
+ * @param factor The scale factor (strictly superior to 0).
+ * @return The scaled resolution.
+ * @throws LionEngineException If invalid arguments.
+ */
+ public Resolution getScaled(double factor)
+ {
+ Check.superiorStrict(factor, 0);
+
+ final double ratio = width / (double) height;
+ final double h = Math.ceil(height * factor);
+ final double w = Math.ceil(h * ratio);
+
+ return new Resolution((int) w, (int) h, rate);
+ }
+
+ /**
+ * Get scaled resolution.
+ *
* @param factorX The horizontal scale factor (strictly superior to 0).
* @param factorY The vertical scale factor (strictly superior to 0).
* @return The scaled resolution.
|
#<I>: Resolution getScaled function added.
|
diff --git a/mpop/projectable.py b/mpop/projectable.py
index <HASH>..<HASH> 100644
--- a/mpop/projectable.py
+++ b/mpop/projectable.py
@@ -178,4 +178,4 @@ class Projectable(Dataset):
else:
res.append("not loaded")
- return ", ".join(res)
+ return res[0] + ", ".join(res[1:])
|
Fix projectables str to look better.
|
diff --git a/BehatAliceLoader.php b/BehatAliceLoader.php
index <HASH>..<HASH> 100644
--- a/BehatAliceLoader.php
+++ b/BehatAliceLoader.php
@@ -35,16 +35,17 @@ class BehatAliceLoader extends Yaml
public function loadTableNode($entity, TableNode $data) {
$hash = [];
- $key = null;
+ $key_col = null;
foreach ($data->getRow(0) as $col => $header) {
if ($col === 0 || $header[0] === '@') {
- $key = $header;
+ $key_col = $header;
}
}
// Parse any inline YAML inside a cell
foreach ($data->getHash() as $row) {
+ $key = $row[$key_col];
foreach ($row as $j => $cell) {
if ($j[0] === '@') continue;
|
Slight logic bug in last fix.
|
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java
index <HASH>..<HASH> 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java
@@ -261,6 +261,8 @@ public abstract class IQ extends Stanza {
}
protected final void initializeAsResultFor(IQ request) {
+ assert this != request;
+
if (!(request.getType() == Type.get || request.getType() == Type.set)) {
throw new IllegalArgumentException(
"IQ must be of type 'set' or 'get'. Original IQ: " + request.toXML());
|
Add assert to IQ.initializeAsResultFor(IQ)
This method is not meant to be used to be invoked with the identity.
|
diff --git a/public/js/jsbin.js b/public/js/jsbin.js
index <HASH>..<HASH> 100644
--- a/public/js/jsbin.js
+++ b/public/js/jsbin.js
@@ -96,6 +96,13 @@ function dedupe(array) {
function exposeSettings() {
'use strict';
+ function mockEditor (editor, methods) {
+ return methods.reduce(function (mockEditor, method) {
+ mockEditor[method] = editor[method].bind(editor);
+ return mockEditor;
+ }, {});
+ }
+
function mockPanels() {
var results = {};
var panels = jsbin.panels.panels;
|
mockEditor function, to ease future method additions
|
diff --git a/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java b/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
index <HASH>..<HASH> 100644
--- a/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
+++ b/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
@@ -152,7 +152,7 @@ public final class ParserUtils {
continue; // skip bad char
}
- if (currentChar != delimiter && currentChar != qualifier) {
+ if ((currentChar != delimiter || insideQualifier) && currentChar != qualifier) {
previousChar = currentChar;
newBlock[sizeSelected++] = currentChar;
// endBlock = i + 1;
|
Fixing regression with delimiter inside qualifier.
|
diff --git a/phy/cluster/manual/view_models.py b/phy/cluster/manual/view_models.py
index <HASH>..<HASH> 100644
--- a/phy/cluster/manual/view_models.py
+++ b/phy/cluster/manual/view_models.py
@@ -624,6 +624,8 @@ class TraceViewModel(VispyViewModel):
@interval.setter
def interval(self, value):
+ if self.model.traces is None:
+ return
if not isinstance(value, tuple) or len(value) != 2:
raise ValueError("The interval should be a (start, end) tuple.")
# Restrict the interval to the boundaries of the traces.
|
Fixed bug in GUI with unavailable traces.
|
diff --git a/gns3server/modules/dynamips/hypervisor.py b/gns3server/modules/dynamips/hypervisor.py
index <HASH>..<HASH> 100644
--- a/gns3server/modules/dynamips/hypervisor.py
+++ b/gns3server/modules/dynamips/hypervisor.py
@@ -21,7 +21,6 @@ Represents a Dynamips hypervisor and starts/stops the associated Dynamips proces
import os
import subprocess
-import tempfile
import asyncio
from gns3server.utils.asyncio import wait_for_process_termination
@@ -120,10 +119,9 @@ class Hypervisor(DynamipsHypervisor):
self._command = self._build_command()
try:
log.info("Starting Dynamips: {}".format(self._command))
-
- with tempfile.NamedTemporaryFile(delete=False) as fd:
- self._stdout_file = fd.name
- log.info("Dynamips process logging to {}".format(fd.name))
+ self._stdout_file = os.path.join(self.working_dir, "dynamips_i{}_stdout.txt".format(self._id))
+ log.info("Dynamips process logging to {}".format(self._stdout_file))
+ with open(self._stdout_file, "w", encoding="utf-8") as fd:
self._process = yield from asyncio.create_subprocess_exec(*self._command,
stdout=fd,
stderr=subprocess.STDOUT,
|
Keep Dynamips stdout log file in the project directory.
|
diff --git a/gbdxtools/images/dem_image.py b/gbdxtools/images/dem_image.py
index <HASH>..<HASH> 100644
--- a/gbdxtools/images/dem_image.py
+++ b/gbdxtools/images/dem_image.py
@@ -23,7 +23,7 @@ class DemImage(IpeImage):
print(e)
print("Specified product not implemented: {}".format(options["product"]))
raise
- self = self.aoi(**kwargs)
+ self = self.aoi(bbox=bbox)
self.idaho_id = idaho_id
self._products = standard_products
if self.ipe.metadata['image']['minX'] == -1:
|
passing bbox in demimage creation which is important
|
diff --git a/django_mobile_tests/tests.py b/django_mobile_tests/tests.py
index <HASH>..<HASH> 100644
--- a/django_mobile_tests/tests.py
+++ b/django_mobile_tests/tests.py
@@ -173,6 +173,12 @@ class RealAgentNameTests(BaseTestCase):
def test_ipad(self):
self.assertFullFlavour(u'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10')
+ def test_iphone(self):
+ self.assertMobileFlavour(u'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3')
+
+ def test_motorola_xoom(self):
+ self.assertFullFlavour(u'Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13')
+
def test_opera_mobile_on_android(self):
'''
Regression test of issue #9
|
Tests for iPhone and Motorola Xoom.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.