diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/threadedcomments/forms.py b/threadedcomments/forms.py
index <HASH>..<HASH> 100644
--- a/threadedcomments/forms.py
+++ b/threadedcomments/forms.py
@@ -2,6 +2,7 @@ from django import forms
from django.contrib.comments.forms import CommentForm
from django.conf import settings
from django.utils.hashcompat import sha_constructor
+from django.utils.translation import ugettext_lazy as _
from threadedcomments.models import ThreadedComment
@@ -10,7 +11,7 @@ class ThreadedCommentForm(CommentForm):
def __init__(self, target_object, parent=None, data=None, initial=None):
self.base_fields.insert(
- self.base_fields.keyOrder.index('comment'), 'title',
+ self.base_fields.keyOrder.index('comment'), _('title'),
forms.CharField(
required=False,
max_length=getattr(settings, 'COMMENTS_TITLE_MAX_LENGTH', 255)
|
title field label doesn't get translated Fixes #<I>
Thanks sq9mev
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,5 +23,8 @@ setup(
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Localization',
],
- long_description=readme
+ long_description=readme,
+ install_requires=[
+ 'numpy',
+ ],
)
|
setup.py - add install_requires
`numpy` is a hard requirement and thus should be listed
|
diff --git a/daiquiri/formatter.py b/daiquiri/formatter.py
index <HASH>..<HASH> 100644
--- a/daiquiri/formatter.py
+++ b/daiquiri/formatter.py
@@ -18,7 +18,7 @@ except ImportError:
DEFAULT_FORMAT = (
- "%(asctime)s [%(process)d] %(color)s%(levelname)s "
+ "%(asctime)s [%(process)d] %(color)s%(levelname)-8.8s "
"%(name)s: %(message)s%(color_stop)s"
)
diff --git a/daiquiri/tests/test_daiquiri.py b/daiquiri/tests/test_daiquiri.py
index <HASH>..<HASH> 100644
--- a/daiquiri/tests/test_daiquiri.py
+++ b/daiquiri/tests/test_daiquiri.py
@@ -47,7 +47,7 @@ class TestDaiquiri(testtools.TestCase):
))
warnings.warn("omg!")
line = stream.getvalue()
- self.assertIn("WARNING py.warnings: ", line)
+ self.assertIn("WARNING py.warnings: ", line)
self.assertIn("daiquiri/tests/test_daiquiri.py:48: "
"UserWarning: omg!\n warnings.warn(\"omg!\")\n",
line)
|
Indent levelname by default
This change indents levelname for a nicer output.
|
diff --git a/tests/Collection/ShuffleTest.php b/tests/Collection/ShuffleTest.php
index <HASH>..<HASH> 100644
--- a/tests/Collection/ShuffleTest.php
+++ b/tests/Collection/ShuffleTest.php
@@ -16,7 +16,8 @@ class ShuffleTest extends TestCase
{
public function testShuffle()
{
- $this->assertNotSame([1, 2, 3, 4], shuffle([1, 2, 3, 4]));
- $this->assertSame([], \array_diff([1, 2, 3, 4], shuffle([1, 2, 3, 4])));
+ $arr = range(1, 10);
+ $this->assertNotSame($arr, shuffle($arr));
+ $this->assertSame([], \array_diff($arr, shuffle($arr)));
}
}
\ No newline at end of file
|
Use larger array for _\shuffle tests
|
diff --git a/lib/Cake/View/Helper/TimeHelper.php b/lib/Cake/View/Helper/TimeHelper.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/View/Helper/TimeHelper.php
+++ b/lib/Cake/View/Helper/TimeHelper.php
@@ -763,7 +763,7 @@ class TimeHelper extends AppHelper {
* @param int $date Timestamp to format.
* @return string formatted string with correct encoding.
*/
- function _strftime($format, $date) {
+ protected function _strftime($format, $date) {
$format = strftime($format, $date);
$encoding = Configure::read('App.encoding');
|
Add protected to method picked from <I>
|
diff --git a/src/validators/required-if.js b/src/validators/required-if.js
index <HASH>..<HASH> 100644
--- a/src/validators/required-if.js
+++ b/src/validators/required-if.js
@@ -43,4 +43,4 @@ const validate = (val, ruleObj, propertyName, inputObj) => {
const message = required.message;
-export default {validate, message};
+export default {validate, message, And, Or};
|
Export `And` `Or`
|
diff --git a/tests/TestCase/Database/QueryTest.php b/tests/TestCase/Database/QueryTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Database/QueryTest.php
+++ b/tests/TestCase/Database/QueryTest.php
@@ -872,8 +872,10 @@ class QueryTest extends TestCase {
$field->add('SELECT min(id) FROM comments');
return $exp
->gt($field, 100, 'integer');
- })
- ->execute();
+ });
+
+ debug($result->sql());
+ $rsult = $result->execute();
$this->assertCount(0, $result);
}
|
Figuring out what SQL is offending SQL Server
|
diff --git a/spec/lib/models/work-item-spec.js b/spec/lib/models/work-item-spec.js
index <HASH>..<HASH> 100644
--- a/spec/lib/models/work-item-spec.js
+++ b/spec/lib/models/work-item-spec.js
@@ -167,9 +167,9 @@ describe('Workitem Model', function () {
it('should create ipmi pollers and then find them with findPollers', function () {
var nodeId = '47bd8fb80abc5a6b5e7b10df';
return workitems.createIpmiPollers(nodeId).then(function (items) {
- items = _.sortBy(items, 'node');
+ items = _.sortBy(items, 'id');
return workitems.findPollers().then(function (pollers) {
- pollers = _.sortBy(pollers, 'node');
+ pollers = _.sortBy(pollers, 'id');
expect(pollers).to.have.length(3);
pollers.forEach(function (poller, index) {
expect(poller.id).to.equal(items[index].id);
|
Fixing broken work item model unit test
|
diff --git a/src/leipzig.js b/src/leipzig.js
index <HASH>..<HASH> 100644
--- a/src/leipzig.js
+++ b/src/leipzig.js
@@ -34,6 +34,11 @@ var Leipzig = function(elements, opts) {
skip: opts.class.skip || 'gloss__line--skip'
};
+ // remove horizontal spacing between gloss words
+ this.spacing = (typeof opts.spacing !== 'undefined')
+ ? opts.spacing
+ : true;
+
// automatically mark the first line as 'original'
this.firstLineOrig = (typeof opts.firstLineOrig !== 'undefined')
? opts.firstLineOrig
@@ -102,6 +107,10 @@ Leipzig.prototype.format = function(groups, wrapper) {
groups.forEach(function(group) {
var glossWordClasses = [_this.class.word];
+ if (!_this.spacing) {
+ glossWordClasses.push(_this.class.noSpace);
+ }
+
glossWordClasses = glossWordClasses.join(' ');
output.push('<div class="' + glossWordClasses + '">');
|
Add option for controlling spacing between aligned words
|
diff --git a/AdvancedHTMLParser/Tags.py b/AdvancedHTMLParser/Tags.py
index <HASH>..<HASH> 100644
--- a/AdvancedHTMLParser/Tags.py
+++ b/AdvancedHTMLParser/Tags.py
@@ -1876,6 +1876,29 @@ class AdvancedTag(object):
return None
+ def getParentElementCustomFilter(self, filterFunc):
+ '''
+ getParentElementCustomFilter - Runs through parent on up to document root, returning the
+
+ first tag which filterFunc(tag) returns True.
+
+ @param filterFunc <function/lambda> - A function or lambda expression that should return "True" if the passed node matches criteria.
+
+ @return <AdvancedTag/None> - First match, or None
+
+
+ @see getFirstElementCustomFilter for matches against children
+ '''
+ parentNode = self.parentNode
+ while parentNode:
+
+ if filterFunc(parentNode) is True:
+ return parentNode
+
+ parentNode = parentNode.parentNode
+
+ return None
+
def getPeersByAttr(self, attrName, attrValue):
'''
getPeersByAttr - Gets peers (elements on same level) which match an attribute/value combination.
|
Implement AdvancedTag.getParentElementCustomFunction which takes a lambda and reutrns the first parent of given node which matches (returns True)
|
diff --git a/parfait-core/src/main/java/io/pcp/parfait/timing/ThreadValue.java b/parfait-core/src/main/java/io/pcp/parfait/timing/ThreadValue.java
index <HASH>..<HASH> 100644
--- a/parfait-core/src/main/java/io/pcp/parfait/timing/ThreadValue.java
+++ b/parfait-core/src/main/java/io/pcp/parfait/timing/ThreadValue.java
@@ -49,7 +49,7 @@ public interface ThreadValue<T> {
public static class WeakReferenceThreadMap<T> implements ThreadValue<T> {
- protected final LoadingCache<Thread, T> loadingCache = CacheBuilder.newBuilder().build(new CacheLoader<Thread, T>() {
+ protected final LoadingCache<Thread, T> loadingCache = CacheBuilder.newBuilder().weakKeys().build(new CacheLoader<Thread, T>() {
@Override
public T load(Thread thread) throws Exception {
return initialValue();
|
Fix non-weak reference regression introduced with Guava upgrade
In 0c<I>c<I>ed<I>c<I>d4ee<I>eab<I>b<I>b<I>d5, this map was migrated to
LoadingCache. The weakKeys() builder method accidentally got dropped and
the defaults are to hold strong references. This commit re-introduces the
weakKeys() builder method for the LoadingCache.
|
diff --git a/src/java/com/threerings/cast/bundle/BundledComponentRepository.java b/src/java/com/threerings/cast/bundle/BundledComponentRepository.java
index <HASH>..<HASH> 100644
--- a/src/java/com/threerings/cast/bundle/BundledComponentRepository.java
+++ b/src/java/com/threerings/cast/bundle/BundledComponentRepository.java
@@ -345,18 +345,16 @@ public class BundledComponentRepository
_setcache.put(dpath, aset);
}
- // if this is a shadow image, no need to freak out as they are
- // optional
- if (StandardActions.SHADOW_TYPE.equals(type)) {
- return null;
- }
-
// if that failed too, we're hosed
if (aset == null) {
- Log.warning("Unable to locate tileset for action '" +
- imgpath + "' " + component + ".");
- if (_wipeOnFailure) {
- _bundle.wipeBundle(false);
+ // if this is a shadow image, no need to freak out as they
+ // are optional
+ if (!StandardActions.SHADOW_TYPE.equals(type)) {
+ Log.warning("Unable to locate tileset for action '" +
+ imgpath + "' " + component + ".");
+ if (_wipeOnFailure) {
+ _bundle.wipeBundle(false);
+ }
}
return null;
}
|
Just fail to freak out, don't fail to load shadows at all.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
|
diff --git a/viewer.js b/viewer.js
index <HASH>..<HASH> 100644
--- a/viewer.js
+++ b/viewer.js
@@ -95,12 +95,12 @@
, drawAnnotationPointButton = new Button('\uf040', 'Draw new annotation point (close with shift-click)')
, moveAnnotationButton = new Button('\uf047', 'Move annotation point')
, deleteAnnotationPointButton = new Button('\uf00d', 'Delete annotation point')
- , deleteAnnotationButton = new Button('\uf1f8', 'Delete annotation')
- , annotationButtons = [ addNewAnnotationButton,
- deleteAnnotationButton,
+ , deleteAnnotationButton = new Button('\uf1f8', 'Delete active annotation')
+ , annotationButtons = [ deleteAnnotationButton,
deleteAnnotationPointButton,
moveAnnotationButton,
- drawAnnotationPointButton]
+ drawAnnotationPointButton,
+ addNewAnnotationButton]
// contains all active buttons
, buttons = defaultButtons.slice()
@@ -868,7 +868,7 @@
}
activePolygon = self.solution;
} else if(annotationsEditable){
- console.log("should have active polygon");
+ console.log("No active polygon. Click on a polygon to edit it!");
return;
} else {
console.log("invalid POLYGON_DRAW state");
|
changed tooltips and warnings, rearranged some buttons
|
diff --git a/gwpy/data/series.py b/gwpy/data/series.py
index <HASH>..<HASH> 100644
--- a/gwpy/data/series.py
+++ b/gwpy/data/series.py
@@ -124,7 +124,9 @@ class Series(Array):
try:
return self._index
except AttributeError:
- if self.logx:
+ if not self.size:
+ self.index = numpy.ndarray(0)
+ elif self.logx:
logdx = (numpy.log10(self.x0.value + self.dx.value) -
numpy.log10(self.x0.value))
logx1 = numpy.log10(self.x0.value) + self.shape[-1] * logdx
|
Series.index: fix bug with empty series
|
diff --git a/tests/lax_test.py b/tests/lax_test.py
index <HASH>..<HASH> 100644
--- a/tests/lax_test.py
+++ b/tests/lax_test.py
@@ -2245,6 +2245,25 @@ class LaxTest(jtu.JaxTestCase):
(x,), (1.,)))(1.)
self.assertLen(jaxpr.jaxpr.eqns, 2)
+ def test_named_call(self):
+
+ def named_call(f, name):
+ def named_f(*args):
+ f_ = jax.linear_util.wrap_init(lambda: (f(*args),))
+ out, = lax.named_call_p.bind(f_, name=name)
+ return out
+ return named_f
+
+ def square(x):
+ return x ** 2
+
+ @jax.jit
+ def f(x):
+ return named_call(square, 'name_for_testing')(x)
+
+ c = jax.xla_computation(f)(2)
+ self.assertIn('name_for_testing', c.as_hlo_text())
+
class LazyConstantTest(jtu.JaxTestCase):
def _Check(self, make_const, expected):
|
Add named_call test
Add named_call test in lax test.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -19,6 +19,7 @@ module.exports.createReceiver = function( params ) {
var transConfig = params.transports;
var receiver = new this.Receiver( {
+ authorize: params.authorize,
baseDir: params.baseDir
} );
|
Add authorize to createReceiver() convenience method
|
diff --git a/install/lang/ko_utf8/installer.php b/install/lang/ko_utf8/installer.php
index <HASH>..<HASH> 100644
--- a/install/lang/ko_utf8/installer.php
+++ b/install/lang/ko_utf8/installer.php
@@ -332,8 +332,8 @@ $string['unicoderecommended'] = '모든 자료를 유니코드(UTF-8)로 저장
$string['unicoderequired'] = '모든 자료가 유니코드(UTF-8)로 저장되야 합니다. 새 설정은 기본 문자코드가 유니코드로 저장되어 있다고 가정하고 작동이 됩니다. 만일 업그레이드 중이라면 반드시 UTF-8 변환과정을 수행하여야만 합니다.(관리화면 참조)';
$string['upgradingactivitymodule'] = '활동 모듈 갱신';
$string['upgradingbackupdb'] = '백업 데이터베이스 갱신';
-$string['upgradingblocksdb'] = '블록 데이터베이스 갱신';
-$string['upgradingblocksplugin'] = '블록 플러그인 갱신';
+$string['upgradingblocksdb'] = '블럭 데이터베이스 갱신';
+$string['upgradingblocksplugin'] = '블럭 플러그인 갱신';
$string['upgradingcompleted'] = '갱신 완료 /n';
$string['upgradingcourseformatplugin'] = '강좌 포맷 플러그인 갱신';
$string['upgradingenrolplugin'] = '출석 플러그인 갱신';
|
Automatic installer.php lang files by installer_builder (<I>)
|
diff --git a/components/rack/rack-int/src/main/java/org/torquebox/rack/deployers/AppRackYamlParsingDeployer.java b/components/rack/rack-int/src/main/java/org/torquebox/rack/deployers/AppRackYamlParsingDeployer.java
index <HASH>..<HASH> 100644
--- a/components/rack/rack-int/src/main/java/org/torquebox/rack/deployers/AppRackYamlParsingDeployer.java
+++ b/components/rack/rack-int/src/main/java/org/torquebox/rack/deployers/AppRackYamlParsingDeployer.java
@@ -108,7 +108,6 @@ public class AppRackYamlParsingDeployer extends AbstractVFSParsingDeployer<RackA
List<ClassPathEntry> classPaths = AbstractRubyStructureDeployer.getClassPathEntries( rackRoot.getChild( "lib" ), rackRoot );
classPaths.addAll( AbstractRubyStructureDeployer.getClassPathEntries( rackRoot.getChild( "vendor/jars" ), rackRoot ) );
- // TODO: Add classpath entry for java libraries
ContextInfo context = StructureMetaDataFactory.createContextInfo("", metaDataPaths, classPaths);
result.addContext(context);
return result;
|
Remove the TODO as it's now TODONE.
|
diff --git a/classes/Kohana/Model/Store/Purchase.php b/classes/Kohana/Model/Store/Purchase.php
index <HASH>..<HASH> 100644
--- a/classes/Kohana/Model/Store/Purchase.php
+++ b/classes/Kohana/Model/Store/Purchase.php
@@ -73,7 +73,7 @@ class Kohana_Model_Store_Purchase extends Jam_Model implements Purchasable {
{
if (($index = $this->search_same_item($new_item)) !== NULL)
{
- $this->items[$index]->quantity += $new_item->quantity;
+ $this->items[$index]->quantity = $this->items[$index]->quantity + 1;
}
else
{
|
fix weird __set/__get bug with +=
|
diff --git a/modules/page/html/render/message.js b/modules/page/html/render/message.js
index <HASH>..<HASH> 100644
--- a/modules/page/html/render/message.js
+++ b/modules/page/html/render/message.js
@@ -118,14 +118,24 @@ function showContext (element) {
// ensure context is visible
scrollParent.scrollTop = Math.max(0, scrollParent.scrollTop - 100)
}
+
+ // HACK: sometimes the body gets affected!? Why no just hack it!!!
+ if (document.body.scrollTop > 0) {
+ document.body.scrollTop = 0
+ }
}
function getScrollParent (element) {
while (element.parentNode) {
- if (element.parentNode.scrollTop > 10) {
+ if (element.parentNode.scrollTop > 10 && isScroller(element.parentNode)) {
return element.parentNode
} else {
element = element.parentNode
}
}
}
+
+function isScroller (element) {
+ var value = window.getComputedStyle(element)['overflow-y']
+ return (value === 'auto' || value === 'scroll')
+}
|
trying to stop body from scrolling sometimes on anchor link
|
diff --git a/ctrl/game.js b/ctrl/game.js
index <HASH>..<HASH> 100644
--- a/ctrl/game.js
+++ b/ctrl/game.js
@@ -13,7 +13,7 @@ module.exports = (sbot, myIdent) => {
const gameSSBDao = GameSSBDao(sbot);
const gameChallenger = GameChallenger(sbot, myIdent);
- function getMyIdent() {PlayerUtils
+ function getMyIdent() {
return myIdent;
}
diff --git a/ui/game/gameView.js b/ui/game/gameView.js
index <HASH>..<HASH> 100644
--- a/ui/game/gameView.js
+++ b/ui/game/gameView.js
@@ -3,6 +3,8 @@ var Chessground = require('chessground').Chessground;
module.exports = (gameCtrl) => {
+ const myIdent = gameCtrl.getMyIdent();
+
function renderBoard(gameId) {
var vDom = m('div', {
class: 'cg-board-wrap ssb-chess-board-large'
@@ -12,8 +14,10 @@ module.exports = (gameCtrl) => {
var chessGround = Chessground(vDom.dom, {});
gameCtrl.getSituation(gameId).then(situation => {
+
chessGround.set({
- fen: situation.fen
+ fen: situation.fen,
+ orientation: situation.players[myIdent].colour
});
})
});
|
Flip board orientation if the player is playing as black.
|
diff --git a/carrot/messaging.py b/carrot/messaging.py
index <HASH>..<HASH> 100644
--- a/carrot/messaging.py
+++ b/carrot/messaging.py
@@ -165,7 +165,8 @@ class Consumer(object):
self.channel.basic_consume(queue=self.queue, no_ack=True,
callback=self._receive_callback,
consumer_tag=self.__class__.__name__)
- yield self.channel.wait()
+ while True:
+ self.channel.wait()
def iterqueue(self, limit=None):
"""Iterator that yields all pending messages, at most limit
|
Revert to the old version of Consumer.wait() Thanks Alexander Solovyov!
|
diff --git a/stagpy/stagyydata.py b/stagpy/stagyydata.py
index <HASH>..<HASH> 100644
--- a/stagpy/stagyydata.py
+++ b/stagpy/stagyydata.py
@@ -748,7 +748,7 @@ class StagyyData:
rproffile = self.filename('rprof.h5')
self._stagdat['rprof'] = stagyyparsers.rprof_h5(
rproffile, list(phyvars.RPROF.keys()))
- if self._stagdat['rprof'] is not None:
+ if self._stagdat['rprof'][0] is not None:
return self._stagdat['rprof']
rproffile = self.filename('rprof.dat')
if self.hdf5 and not rproffile.is_file():
|
Fix fallback to ASCII if rprof.h5 doesn't exist
|
diff --git a/eZ/Publish/Core/FieldType/XmlText/Schema.php b/eZ/Publish/Core/FieldType/XmlText/Schema.php
index <HASH>..<HASH> 100644
--- a/eZ/Publish/Core/FieldType/XmlText/Schema.php
+++ b/eZ/Publish/Core/FieldType/XmlText/Schema.php
@@ -238,12 +238,17 @@ class Schema
/**
* Determines if the tag is inline
*
- * @param \DOMNode|\DOMElement $element
+ * @param \DOMNode|\DOMElement|string $element
*
* @return bool
*/
- public function isInline( DOMNode $element )
+ public function isInline( $element )
{
+ if ( is_string( $element ) )
+ {
+ return $this->schema[$element]['isInline'];
+ }
+
// Use specific custom tag setting if set
if ( $element->nodeName === 'custom' && $element instanceof DOMElement )
{
|
Fixed: isInline() not working with string while still used
|
diff --git a/lib/zuul.js b/lib/zuul.js
index <HASH>..<HASH> 100644
--- a/lib/zuul.js
+++ b/lib/zuul.js
@@ -88,7 +88,7 @@ Zuul.prototype.run = function(done) {
var phantom = PhantomBrowser(config);
self.emit('browser', phantom);
phantom.once('done', function(results) {
- done(results.failed === 0);
+ done(results.failed === 0 && results.passed > 0);
});
return phantom.start();
}
|
phantomjs run fails if nothing passes
|
diff --git a/lib/jamf/api/connection/token.rb b/lib/jamf/api/connection/token.rb
index <HASH>..<HASH> 100644
--- a/lib/jamf/api/connection/token.rb
+++ b/lib/jamf/api/connection/token.rb
@@ -73,7 +73,6 @@ module Jamf
else
raise ArgumentError, 'Must provide either pw: or token_string:'
end
-
end # init
# Initialize from password
@@ -103,8 +102,9 @@ module Jamf
@auth_token = str
@user = resp.body.dig :account, :username
+
# use this token to get a fresh one with a known expiration
- keep_alive
+ refresh
end # init_from_token_string
# @return [String]
@@ -162,7 +162,7 @@ module Jamf
end
# Use this token to get a fresh one
- def keep_alive
+ def refresh
raise 'Token has expired' if expired?
keep_alive_token_resp = token_connection(KEEP_ALIVE_RSRC, token: @auth_token).post
@@ -173,7 +173,7 @@ module Jamf
# parse_token_from_response keep_alive_rsrc.post('')
expires
end
- alias refresh keep_alive
+ alias keep_alive refresh
# Make this token invalid
def invalidate
|
in Token, use 'refresh' as the main method name, and keep_alive as an alias
|
diff --git a/safe/postprocessors/minimum_needs_postprocessor.py b/safe/postprocessors/minimum_needs_postprocessor.py
index <HASH>..<HASH> 100644
--- a/safe/postprocessors/minimum_needs_postprocessor.py
+++ b/safe/postprocessors/minimum_needs_postprocessor.py
@@ -58,7 +58,10 @@ class MinimumNeedsPostprocessor(AbstractPostprocessor):
if self.impact_total is not None or self.minimum_needs is not None:
self._raise_error('clear needs to be called before setup')
- self.impact_total = int(round(params['impact_total']))
+ try:
+ self.impact_total = int(round(params['impact_total']))
+ except ValueError:
+ self.impact_total = self.NO_DATA_TEXT
self.minimum_needs = params['function_params']['minimum needs']
def process(self):
|
gracefully recover from #<I>
|
diff --git a/go-ari-library.go b/go-ari-library.go
index <HASH>..<HASH> 100644
--- a/go-ari-library.go
+++ b/go-ari-library.go
@@ -12,11 +12,11 @@ type NV_Event struct {
ARI_Event string
}
-func Init(in chan string, out chan *NV_Event) {
- go func(in chan string, out chan *NV_Event) {
+func Init(in chan []byte, out chan *NV_Event) {
+ go func(in chan []byte, out chan *NV_Event) {
for instring := range in {
var e *NV_Event
- json.Unmarshal([]byte(instring), e)
+ json.Unmarshal(instring, e)
out <- e
}
}(in, out)
|
Inbound channel needs to be []byte not string
|
diff --git a/library/ZfRest/Controller/Auth.php b/library/ZfRest/Controller/Auth.php
index <HASH>..<HASH> 100644
--- a/library/ZfRest/Controller/Auth.php
+++ b/library/ZfRest/Controller/Auth.php
@@ -11,7 +11,7 @@
namespace ZfRest\Controller;
-use ZfRest\Model\View\User;
+use ZfRest\Model\User;
/**
* {@inheritdoc}
@@ -39,7 +39,12 @@ trait Auth
final public function getCurrentUser()
{
if ($this->hasAuth() && null === self::$user) {
- self::$user = User::loadWithPermissions(self::$auth, $this->getContext());
+ $user = User::loadWithPermissions(self::$auth, $this->getContext());
+
+ if ($user) {
+ self::$user = $user->toArray();
+ self::$user['permissions'] = $user->permissions;
+ }
}
return self::$user;
|
Missed the toArray() call
|
diff --git a/src/Pixie/QueryBuilder/QueryBuilderHandler.php b/src/Pixie/QueryBuilder/QueryBuilderHandler.php
index <HASH>..<HASH> 100644
--- a/src/Pixie/QueryBuilder/QueryBuilderHandler.php
+++ b/src/Pixie/QueryBuilder/QueryBuilderHandler.php
@@ -450,7 +450,7 @@ class QueryBuilderHandler
*/
public function orWhereIn($key, array $values)
{
- return $this->where($key, 'IN', $values, 'OR');
+ return $this->_where($key, 'IN', $values, 'OR');
}
/**
@@ -461,7 +461,7 @@ class QueryBuilderHandler
*/
public function orWhereNotIn($key, array $values)
{
- return $this->where($key, 'NOT IN', $values, 'OR');
+ return $this->_where($key, 'NOT IN', $values, 'OR');
}
/**
|
Bug fix, correct _where method for orWhereIn and orWhereNotIn calls
|
diff --git a/airflow/cli/cli_parser.py b/airflow/cli/cli_parser.py
index <HASH>..<HASH> 100644
--- a/airflow/cli/cli_parser.py
+++ b/airflow/cli/cli_parser.py
@@ -178,7 +178,7 @@ ARG_OUTPUT = Arg(
"-o",
"--output",
),
- help=("Output format. Allowed values: json, yaml, table (default: table)"),
+ help="Output format. Allowed values: json, yaml, table (default: table)",
metavar="(table, json, yaml)",
choices=("table", "json", "yaml"),
default="table",
|
Remove unneeded parentheses from Python file (#<I>)
|
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -100,7 +100,7 @@ module ActionView
# number_to_currency(1234567890.506, :precision => 3) # => $1,234,567,890.506
# number_to_currency(1234567890.506, :locale => :fr) # => 1 234 567 890,506 €
#
- # number_to_currency(1234567890.50, :negative_format => "(%u%n)")
+ # number_to_currency(-1234567890.50, :negative_format => "(%u%n)")
# # => ($1,234,567,890.51)
# number_to_currency(1234567890.50, :unit => "£", :separator => ",", :delimiter => "")
# # => £1234567890,50
|
Negative format example should use a negative number
|
diff --git a/interfaces/Stringable.php b/interfaces/Stringable.php
index <HASH>..<HASH> 100644
--- a/interfaces/Stringable.php
+++ b/interfaces/Stringable.php
@@ -28,7 +28,7 @@ interface Stringable
*
* @return string
*/
- public function toString();
+ public function toString() : string;
/**
* {@see self::toString()}
|
[Core] Stringable: hint the return type for toString() while leaving the magic __toString() as-is to avoid conflicts
|
diff --git a/lib/emittance/dispatcher/registration_collection_proxy.rb b/lib/emittance/dispatcher/registration_collection_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/emittance/dispatcher/registration_collection_proxy.rb
+++ b/lib/emittance/dispatcher/registration_collection_proxy.rb
@@ -6,6 +6,8 @@ module Emittance
# A collection proxy for registrations. Can include multiple key/value pairs.
#
class RegistrationCollectionProxy
+ include Enumerable
+
# @param lookup_term the term initially used to lookup the registrations
# @param mappings [Hash] the mappings of identifiers to their respective registrations
def initialize(lookup_term, mappings)
@@ -13,12 +15,13 @@ module Emittance
@mappings = mappings
end
- # @param args args passed to +Array#each+
- # @param blk block passed to +Array#each+
# @return [RegistrationCollectionProxy] self
- def each(*args, &blk)
- arrays.flatten.each(*args, &blk)
- self
+ def each
+ return enum_for(:each) unless block_given?
+
+ arrays.flatten.each do |registration|
+ yield registration
+ end
end
# @return [Boolean] true if there are no registrations at all, false otherwise
|
include enumerable in RegistrationCollectionProxy
|
diff --git a/source/core/oxsysrequirements.php b/source/core/oxsysrequirements.php
index <HASH>..<HASH> 100644
--- a/source/core/oxsysrequirements.php
+++ b/source/core/oxsysrequirements.php
@@ -16,7 +16,7 @@
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
- * @copyright (C) OXID eSales AG 2003-2014
+ * @copyright (C) OXID eSales AG 2003-2015
* @version OXID eShop CE
*/
@@ -603,9 +603,9 @@ class oxSysRequirements
/**
* Checks PHP version.
- * < PHP 5.2.0 - red.
- * PHP 5.2.0-5.2.9 - yellow.
- * PHP 5.2.10 or higher - green.
+ * < PHP 5.3.0 - red.
+ * PHP 5.3.0-5.3.24 - yellow.
+ * PHP 5.3.25 or higher - green.
*
* @return integer
*/
|
ESDEV-<I> Fix system php version requirements check method description
|
diff --git a/lib/upgrade/upgrade_supported.go b/lib/upgrade/upgrade_supported.go
index <HASH>..<HASH> 100644
--- a/lib/upgrade/upgrade_supported.go
+++ b/lib/upgrade/upgrade_supported.go
@@ -223,8 +223,8 @@ func readRelease(archiveName, dir, url string) (string, error) {
}
defer resp.Body.Close()
- switch runtime.GOOS {
- case "windows":
+ switch path.Ext(archiveName) {
+ case ".zip":
return readZip(archiveName, dir, io.LimitReader(resp.Body, maxArchiveSize))
default:
return readTarGz(archiveName, dir, io.LimitReader(resp.Body, maxArchiveSize))
|
lib/upgrade: Let Mac load .zip archives (#<I>)
There is no need to do this switch based on the current OS, instead do
it based on what the archive actually appears to be.
(Tested; works.)
|
diff --git a/lib/datasets/seaborn-data.rb b/lib/datasets/seaborn-data.rb
index <HASH>..<HASH> 100644
--- a/lib/datasets/seaborn-data.rb
+++ b/lib/datasets/seaborn-data.rb
@@ -38,15 +38,15 @@ module Datasets
@metadata.name = "seaborn: #{name}"
@metadata.url = URL_FORMAT % {name: name}
- @data_path = cache_dir_path + (name + ".csv")
@name = name
end
def each(&block)
return to_enum(__method__) unless block_given?
- download(@data_path, @metadata.url)
- CSV.open(@data_path, headers: :first_row, converters: :all) do |csv|
+ data_path = cache_dir_path + "#{@name}.csv"
+ download(data_path, @metadata.url)
+ CSV.open(data_path, headers: :first_row, converters: :all) do |csv|
csv.each do |row|
record = prepare_record(row)
yield record
|
seaborn: reduce needless instance variable
|
diff --git a/openquake/hazardlib/site.py b/openquake/hazardlib/site.py
index <HASH>..<HASH> 100644
--- a/openquake/hazardlib/site.py
+++ b/openquake/hazardlib/site.py
@@ -215,10 +215,8 @@ class SiteCollection(object):
num_values = data.shape[1]
result = numpy.empty((total_sites, num_values))
result.fill(placeholder)
- #for i in xrange(num_values):
- # result[:, i].put(self.indices, data[:, i])
- for i, idx in enumerate(self.indices):
- result[idx] = data[i]
+ for i in xrange(num_values):
+ result[:, i].put(self.indices, data[:, i])
return result
def filter(self, mask):
|
site:
Restore the original numpy-based SiteCollection `expand` algorithm.
While slower than a plain Python implementation with small datasets,
the advantage of numpy really shows through with larger datasets.
I've been meaning to reverse this change for a while, since I found
in profiling run that this change was indeed not faster.
|
diff --git a/forms/gridfield/GridFieldPrintButton.php b/forms/gridfield/GridFieldPrintButton.php
index <HASH>..<HASH> 100644
--- a/forms/gridfield/GridFieldPrintButton.php
+++ b/forms/gridfield/GridFieldPrintButton.php
@@ -91,9 +91,14 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
* Export core.
*/
public function generatePrintData($gridField) {
- $printColumns = ($this->printColumns)
- ? $this->printColumns
- : singleton($gridField->getModelClass())->summaryFields();
+ if($this->printColumns) {
+ $printColumns = $this->printColumns;
+ } else if($dataCols = $gridField->getConfig()->getComponentByType('GridFieldDataColumns')) {
+ $printColumns = $dataCols->getDisplayFields($gridField);
+ } else {
+ $printColumns = singleton($gridField->getModelClass())->summaryFields();
+ }
+
$header = null;
if($this->printHasHeader){
$header = new ArrayList();
|
Respect displayFields in GridFieldPrintButton
Provides more coherent and expected default behaviour
|
diff --git a/helper.go b/helper.go
index <HASH>..<HASH> 100644
--- a/helper.go
+++ b/helper.go
@@ -105,3 +105,35 @@ func GetAllValues(req *http.Request) map[string]string {
vars.RUnlock()
return values
}
+
+// This function returns the route of given Request
+func (m *Mux) GetRequestRoute(req *http.Request) string {
+ cleanURL(&req.URL.Path)
+ for _, r := range m.Routes[req.Method] {
+ if r.Atts != 0 {
+ if r.Atts&SUB != 0 {
+ if len(req.URL.Path) >= r.Size {
+ if req.URL.Path[:r.Size] == r.Path {
+ return r.Path
+ }
+ }
+ }
+ if r.Match(req) {
+ return r.Path
+ }
+ }
+ if req.URL.Path == r.Path {
+ return r.Path
+ }
+ }
+
+ for _, s := range m.Routes[static] {
+ if len(req.URL.Path) >= s.Size {
+ if req.URL.Path[:s.Size] == s.Path {
+ return s.Path
+ }
+ }
+ }
+
+ return "NonFound"
+}
|
added GetRequestRoute function to get Route of given Request
|
diff --git a/lib/Doctrine/DBAL/Logging/SQLLogger.php b/lib/Doctrine/DBAL/Logging/SQLLogger.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Logging/SQLLogger.php
+++ b/lib/Doctrine/DBAL/Logging/SQLLogger.php
@@ -40,7 +40,7 @@ interface SQLLogger
*
* @param string $sql The SQL to be executed.
* @param array $params The SQL parameters.
- * @param float $executionMS The microtime difference it took to execute this query.
+ * @param array $types The SQL parameter types.
* @return void
*/
public function startQuery($sql, array $params = null, array $types = null);
|
[DDC-<I>] Fixed wrong docblock.
|
diff --git a/lib/rollbar.rb b/lib/rollbar.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar.rb
+++ b/lib/rollbar.rb
@@ -128,6 +128,9 @@ module Rollbar
return 'ignored' if ignored?(exception)
+ exception_level = filtered_level(exception)
+ level = exception_level if exception_level
+
begin
report(level, message, exception, extra)
rescue Exception => e
@@ -191,6 +194,8 @@ module Rollbar
end
def filtered_level(exception)
+ return unless exception
+
filter = configuration.exception_level_filters[exception.class.name]
if filter.respond_to?(:call)
filter.call(exception)
diff --git a/spec/rollbar_spec.rb b/spec/rollbar_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rollbar_spec.rb
+++ b/spec/rollbar_spec.rb
@@ -725,6 +725,15 @@ describe Rollbar do
Rollbar.error(exception)
end
+ it 'sends the correct filtered level' do
+ Rollbar.configure do |config|
+ config.exception_level_filters = { 'NameError' => 'warning' }
+ end
+
+ Rollbar.error(exception)
+ expect(Rollbar.last_report[:level]).to be_eql('warning')
+ end
+
it "should work with an IO object as rack.errors" do
logger_mock.should_receive(:info).with('[Rollbar] Success')
|
Fix filtered levels.
After new interface changes we lost this feature :-/. This PRs re-enables it.
BTW, ignore exceptions should be still working before this PR.
|
diff --git a/common/addressing.go b/common/addressing.go
index <HASH>..<HASH> 100644
--- a/common/addressing.go
+++ b/common/addressing.go
@@ -16,17 +16,9 @@ func ValidEndpointAddress(addr net.IP) bool {
// Not supported yet
return false
case net.IPv6len:
- // TODO: check if it's possible to have this verification from the const
- // values that we have.
- // node id may not be 0
- if addr[10] == 0 && addr[11] == 0 && addr[12] == 0 && addr[13] == 0 {
- return false
- }
-
- // endpoint id may not be 0
- if addr[14] == 0 && addr[15] == 0 {
- return false
- }
+ // If addr with NodeIPv6Mask is equal to addr means that have zeros from
+ // 112 to 128.
+ return !addr.Mask(NodeIPv6Mask).Equal(addr)
}
return true
@@ -48,7 +40,7 @@ func ValidNodeAddress(addr net.IP) bool {
return false
}
- // node address must contain 0 suffix
+ // lxc address must contain 0 suffix
if addr[14] != 0 || addr[15] != 0 {
return false
}
|
Decreased complexity on endpoint address validation
|
diff --git a/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java b/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java
+++ b/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java
@@ -496,7 +496,16 @@ public class SwipeBackLayout extends FrameLayout {
}
mIsScrollOverValid = true;
}
- return ret;
+ boolean directionCheck = false;
+ if (mEdgeFlag == EDGE_LEFT || mEdgeFlag == EDGE_RIGHT) {
+ directionCheck = !mDragHelper.checkTouchSlop(ViewDragHelper.DIRECTION_VERTICAL, i);
+ } else if (mEdgeFlag == EDGE_BOTTOM) {
+ directionCheck = !mDragHelper
+ .checkTouchSlop(ViewDragHelper.DIRECTION_HORIZONTAL, i);
+ } else if (mEdgeFlag == EDGE_ALL) {
+ directionCheck = true;
+ }
+ return ret & directionCheck;
}
@Override
|
modify view capturing process to avoid wrong operation
|
diff --git a/pkg/minikube/constants/constants_gendocs.go b/pkg/minikube/constants/constants_gendocs.go
index <HASH>..<HASH> 100644
--- a/pkg/minikube/constants/constants_gendocs.go
+++ b/pkg/minikube/constants/constants_gendocs.go
@@ -18,6 +18,10 @@ limitations under the License.
package constants
+import (
+ "k8s.io/client-go/util/homedir"
+)
+
var SupportedVMDrivers = [...]string{
"virtualbox",
"vmwarefusion",
@@ -25,3 +29,5 @@ var SupportedVMDrivers = [...]string{
"xhyve",
"hyperv",
}
+
+var DefaultMountDir = homedir.HomeDir()
|
Fix gendocs, function DefaultMountDir was missing
|
diff --git a/fusesoc/provider/github.py b/fusesoc/provider/github.py
index <HASH>..<HASH> 100644
--- a/fusesoc/provider/github.py
+++ b/fusesoc/provider/github.py
@@ -7,10 +7,11 @@ import tarfile
if sys.version_info[0] >= 3:
import urllib.request as urllib
+ from urllib.error import URLError
else:
import urllib
+ from urllib2 import URLError
-from urllib.error import URLError
class GitHub(object):
def __init__(self, core_name, config, core_root, cache_root):
|
github.py: Fix import of URLError for python 2
URLError lives in another lib in python 2.
Problem found and fixed by Bruno Morais
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,7 @@ classifiers = ['Development Status :: 4 - Beta',
install_reqs = [
'funcsigs>=0.4',
+ 'ipython>=4.0.0',
'matplotlib>=1.4.0',
'mock>=1.1.2',
'numpy>=1.9.1',
|
BLD: Adds IPython to setup.py
|
diff --git a/raiden/accounts.py b/raiden/accounts.py
index <HASH>..<HASH> 100644
--- a/raiden/accounts.py
+++ b/raiden/accounts.py
@@ -4,6 +4,7 @@ import json
import os
import sys
from binascii import hexlify, unhexlify
+from json import JSONDecodeError
from ethereum.tools import keys
from ethereum.slogging import get_logger
@@ -66,7 +67,13 @@ class AccountManager:
with open(fullpath) as data_file:
data = json.load(data_file)
self.accounts[str(data['address']).lower()] = str(fullpath)
- except (KeyError, OSError, IOError, json.decoder.JSONDecodeError) as ex:
+ except (
+ IOError,
+ JSONDecodeError,
+ KeyError,
+ OSError,
+ UnicodeDecodeError
+ ) as ex:
# Invalid file - skip
if f.startswith('UTC--'):
# Should be a valid account file - warn user
|
Don't choke on binary files in keystore path
Catch UnicodeDecodeError in AccountManager which may be caused by non-JSON binary files.
|
diff --git a/header.go b/header.go
index <HASH>..<HASH> 100644
--- a/header.go
+++ b/header.go
@@ -103,6 +103,7 @@ func (h *header) Marshal(p []byte) (n int) {
}
p = p[2+len(ext.Bytes):]
}
+ *_type = 0
if len(p) != 0 {
panic("header length changed")
}
|
Terminate extension chains when marshalling header
This is important if the buffer is being reused, and isn't necessarily zeroed.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -7,6 +7,13 @@ var util = require('util')
var debug = require('debug')('array-index')
/**
+ * JavaScript Array "length" is bound to an unsigned 32-bit int.
+ * See: http://stackoverflow.com/a/6155063/376773
+ */
+
+var MAX_LENGTH = Math.pow(2, 32)
+
+/**
* Module exports.
*/
@@ -127,7 +134,12 @@ function setLength (v) {
*/
function ensureLength (_length) {
- var length = _length | 0
+ var length
+ if (_length > MAX_LENGTH) {
+ length = MAX_LENGTH
+ } else {
+ length = _length | 0
+ }
var cur = ArrayIndex.prototype.__length__ | 0
var num = length - cur
if (num > 0) {
|
ensure that the "length" property has the same maximum as regular Arrays
|
diff --git a/test/unit/preferences.js b/test/unit/preferences.js
index <HASH>..<HASH> 100644
--- a/test/unit/preferences.js
+++ b/test/unit/preferences.js
@@ -56,6 +56,34 @@ exports['Preferences.read'] = {
done();
},
+ readEmptyFile: function(test) {
+ test.expect(1);
+
+ var defaultValue = 'value';
+ this.readFile = this.sandbox.stub(fs, 'readFile', (file, handler) => {
+ handler(null, '');
+ });
+
+ Preferences.read('key', defaultValue).then(result => {
+ test.equal(result, defaultValue);
+ test.done();
+ });
+ },
+
+ readError: function(test) {
+ test.expect(1);
+
+ var defaultValue = 'value';
+ this.readFile = this.sandbox.stub(fs, 'readFile', (file, handler) => {
+ handler(new Error('this should not matter'));
+ });
+
+ Preferences.read('key', defaultValue).then(result => {
+ test.equal(result, defaultValue);
+ test.done();
+ });
+ },
+
readWithDefaults: function(test) {
test.expect(1);
|
t2 crash-reporter: more preferences.json tests
|
diff --git a/malcolm/modules/pva/controllers/pvaservercomms.py b/malcolm/modules/pva/controllers/pvaservercomms.py
index <HASH>..<HASH> 100644
--- a/malcolm/modules/pva/controllers/pvaservercomms.py
+++ b/malcolm/modules/pva/controllers/pvaservercomms.py
@@ -119,6 +119,8 @@ class PvaImplementation(Loggable):
self._controller = controller
self._field = field
self._request = pv_request
+ self.log.debug(
+ "Mri %r field %r got request %s", mri, field, pv_request.toDict())
def _dict_to_path_value(self, pv_request):
value = pv_request.toDict()
|
Add logging message for every pva request
|
diff --git a/pkg/oc/cli/cmd/idle.go b/pkg/oc/cli/cmd/idle.go
index <HASH>..<HASH> 100644
--- a/pkg/oc/cli/cmd/idle.go
+++ b/pkg/oc/cli/cmd/idle.go
@@ -514,7 +514,7 @@ func (o *IdleOptions) RunIdle(f *clientcmd.Factory) error {
return err
}
- externalKubeExtensionClient := kextensionsclient.New(kclient.Core().RESTClient())
+ externalKubeExtensionClient := kextensionsclient.New(kclient.Extensions().RESTClient())
delegScaleGetter := appsmanualclient.NewDelegatingScaleNamespacer(appsV1Client, externalKubeExtensionClient)
scaleAnnotater := utilunidling.NewScaleAnnotater(delegScaleGetter, appClient.Apps(), kclient.Core(), func(currentReplicas int32, annotations map[string]string) {
annotations[unidlingapi.IdledAtAnnotation] = nowTime.UTC().Format(time.RFC3339)
|
oc idle: actually use the right type of client
Passing a Core internal client's RESTClient to a versioned extensions
client constructor creates an Frankensteinian monstrosity that pretends
to be an extensions client but uses core URLs. Instead, pass an internal
extensions client to the constructor, which results in a well-formed client.
|
diff --git a/src/Resources/contao/pattern/PatternPageTree.php b/src/Resources/contao/pattern/PatternPageTree.php
index <HASH>..<HASH> 100644
--- a/src/Resources/contao/pattern/PatternPageTree.php
+++ b/src/Resources/contao/pattern/PatternPageTree.php
@@ -124,11 +124,14 @@ class PatternPageTree extends Pattern
$arrPages = array_values(array_filter($arrPages));
- $this->writeToTemplate($arrPages);
+ $this->writeToTemplate($arrPages->fetchAll());
}
else
{
- $this->writeToTemplate(\PageModel::findById($this->Value->singlePage));
+ if (($objPage = \PageModel::findById($this->Value->singlePage)) !== null)
+ {
+ $this->writeToTemplate($objPage->row());
+ }
}
}
}
|
Return arrData instead of the model
|
diff --git a/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java b/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java
index <HASH>..<HASH> 100644
--- a/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java
+++ b/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java
@@ -39,7 +39,7 @@ public class NumberUtils {
// P-values less than 10E-10 are shown as '< 10^-10'
private static final Double MIN_REPORTED_VALUE = 1E-10d;
private static final String TEN = "10";
- private static final String MULTIPLY_HTML_CODE = " × ";
+ private static final String MULTIPLY_HTML_CODE = " \u00D7 ";
private static final String E_PATTERN = "#.##E0";
private static final String E = "E";
private static final String SUP_PRE = "<span style=\"vertical-align: super;\">";
|
now using unicode character for multiplier sign in NumberFormat
|
diff --git a/peek_plugin_base/__init__.py b/peek_plugin_base/__init__.py
index <HASH>..<HASH> 100644
--- a/peek_plugin_base/__init__.py
+++ b/peek_plugin_base/__init__.py
@@ -1,4 +1,4 @@
__project__ = 'Synerty Peek'
__copyright__ = '2016, Synerty'
__author__ = 'Synerty'
-__version__ = '0.4.2'
\ No newline at end of file
+__version__ = '0.5.0'
\ No newline at end of file
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from setuptools import find_packages
pip_package_name = "peek-plugin-base"
py_package_name = "peek_plugin_base"
-package_version = '0.4.2'
+package_version = '0.5.0'
egg_info = "%s.egg-info" % pip_package_name
if os.path.isdir(egg_info):
|
Updated to version <I>
|
diff --git a/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java
index <HASH>..<HASH> 100644
--- a/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java
+++ b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java
@@ -31,7 +31,8 @@ import org.modeshape.jcr.api.query.qom.QueryObjectModelConstants;
/**
*
*/
-public class JcrArithmeticOperand extends ArithmeticOperand implements org.modeshape.jcr.api.query.qom.ArithmeticOperand {
+public class JcrArithmeticOperand extends ArithmeticOperand
+ implements org.modeshape.jcr.api.query.qom.ArithmeticOperand, JcrDynamicOperand {
private static final long serialVersionUID = 1L;
|
MODE-<I> Added another fix for the JcrArithmeticOperand to implement JcrDynamicOperand. I visually inspected all of the JCR QOM implementations in ModeShape (org.modeshape.jcr.query.qom), and I belive the inheritance hierarchy is correct.
git-svn-id: <URL>
|
diff --git a/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java b/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java
index <HASH>..<HASH> 100644
--- a/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java
+++ b/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java
@@ -83,7 +83,8 @@ public class MemoryMetaManager extends AbstractCanalLifeCycle implements CanalMe
}
public synchronized List<ClientIdentity> listAllSubscribeInfo(String destination) throws CanalMetaManagerException {
- return destinations.get(destination);
+ // fixed issue #657, fixed ConcurrentModificationException
+ return Lists.newArrayList(destinations.get(destination));
}
public Position getCursor(ClientIdentity clientIdentity) throws CanalMetaManagerException {
|
fixed issue #<I>, fixed ConcurrentModificationException
|
diff --git a/symfit/core/fit.py b/symfit/core/fit.py
index <HASH>..<HASH> 100644
--- a/symfit/core/fit.py
+++ b/symfit/core/fit.py
@@ -8,8 +8,7 @@ import sympy
from sympy.core.relational import Relational
import numpy as np
from scipy.optimize import minimize
-from scipy.integrate import ode, odeint
-from scipy.interpolate import interp1d
+from scipy.integrate import odeint
from symfit.core.argument import Parameter, Variable
from symfit.core.support import seperate_symbols, keywordonly, sympy_to_py, cache, key2str, deprecated
|
Deleted some unused imports.
|
diff --git a/limpyd/model.py b/limpyd/model.py
index <HASH>..<HASH> 100644
--- a/limpyd/model.py
+++ b/limpyd/model.py
@@ -373,12 +373,13 @@ class RedisModel(RedisProxyCommand):
raise e
else:
# Clear the cache for each cacheable field
- for field_name, value in kwargs.items():
- field = field = getattr(self, field_name)
- if not field.cacheable or not field.has_cache():
- continue
- field_cache = field.get_cache()
- field_cache.clear()
+ if self.cacheable:
+ for field_name, value in kwargs.items():
+ field = field = getattr(self, field_name)
+ if not field.cacheable or not field.has_cache():
+ continue
+ field_cache = field.get_cache()
+ field_cache.clear()
return result
except Exception, e:
|
Optimize hmset to not clear cache if not cacheable
Instead of testing each field for cacheability in all cases, we do it
only if the object is cacheable.
|
diff --git a/ui/src/admin/containers/AdminChronografPage.js b/ui/src/admin/containers/AdminChronografPage.js
index <HASH>..<HASH> 100644
--- a/ui/src/admin/containers/AdminChronografPage.js
+++ b/ui/src/admin/containers/AdminChronografPage.js
@@ -79,20 +79,10 @@ class AdminChronografPage extends Component {
}
}
- handleBatchDeleteUsers = () => {
- console.log('Delete Users')
- }
-
- handleBatchRemoveOrgFromUsers = arg => {
- console.log(arg)
- }
-
- handleBatchAddOrgToUsers = arg => {
- console.log(arg)
- }
- handleBatchChangeUsersRole = arg => {
- console.log(arg)
- }
+ handleBatchDeleteUsers = () => {}
+ handleBatchRemoveOrgFromUsers = () => {}
+ handleBatchAddOrgToUsers = () => {}
+ handleBatchChangeUsersRole = () => {}
handleUpdateUserRole = () => (user, currentRole, newRole) => {
console.log(user, currentRole, newRole)
|
Clear console logs on batch actions for now
|
diff --git a/hotdoc/core/database.py b/hotdoc/core/database.py
index <HASH>..<HASH> 100644
--- a/hotdoc/core/database.py
+++ b/hotdoc/core/database.py
@@ -189,6 +189,9 @@ class Database:
with open(os.path.join(self.__private_folder, 'all_comments.json'), 'w', encoding='utf8') as f:
f.write(json.dumps(resolved_comments, default=serialize, indent=2))
+ with open(os.path.join(self.__private_folder, 'symbol_index.json'), 'w', encoding='utf8') as f:
+ f.write(json.dumps(list(self.__symbols.keys()), default=serialize, indent=2))
+
def __get_aliases(self, name):
return self.__aliases[name]
|
database: Dump symbol index in a file
|
diff --git a/includes/class-plugin.php b/includes/class-plugin.php
index <HASH>..<HASH> 100644
--- a/includes/class-plugin.php
+++ b/includes/class-plugin.php
@@ -930,7 +930,8 @@ class Plugin {
return;
}
- $bytes = strlen( serialize( $wp_object_cache->cache ) );
+ // TODO: find a better method to determine cache size as using `serialize` is discouraged.
+ $bytes = strlen( serialize( $wp_object_cache->cache ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
$debug = sprintf(
// translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client.
|
ignored warning & added todo for `serialize` function
|
diff --git a/lib/adminlib.php b/lib/adminlib.php
index <HASH>..<HASH> 100644
--- a/lib/adminlib.php
+++ b/lib/adminlib.php
@@ -6569,6 +6569,12 @@ class admin_setting_enablemobileservice extends admin_setting_configcheckbox {
*/
public function get_setting() {
global $CFG;
+
+ //for install cli script, $CFG->defaultuserroleid is not set so return 0
+ if (empty($CFG->defaultuserroleid)) {
+ return 0;
+ }
+
$webservicesystem = $CFG->enablewebservices;
require_once($CFG->dirroot . '/webservice/lib.php');
$webservicemanager = new webservice();
@@ -6588,6 +6594,12 @@ class admin_setting_enablemobileservice extends admin_setting_configcheckbox {
*/
public function write_setting($data) {
global $DB, $CFG;
+
+ //for install cli script, $CFG->defaultuserroleid is not set so do nothing
+ if (empty($CFG->defaultuserroleid)) {
+ return '';
+ }
+
$servicename = MOODLE_OFFICIAL_MOBILE_SERVICE;
require_once($CFG->dirroot . '/webservice/lib.php');
|
MDL-<I> remove Undefined property: stdClass:: during installation with cli script
|
diff --git a/cocaine/tools/interactive/__init__.py b/cocaine/tools/interactive/__init__.py
index <HASH>..<HASH> 100644
--- a/cocaine/tools/interactive/__init__.py
+++ b/cocaine/tools/interactive/__init__.py
@@ -55,7 +55,7 @@ class BaseEditor(object):
with printer('Editing "%s"', self.name):
with tempfile.NamedTemporaryFile(delete=False) as fh:
name = fh.name
- fh.write(json.dumps(content))
+ fh.write(json.dumps(content, indent=4))
ec = None
|
[Editor] Dumps json with `indent`
|
diff --git a/eqcorrscan/utils/Sfile_util.py b/eqcorrscan/utils/Sfile_util.py
index <HASH>..<HASH> 100644
--- a/eqcorrscan/utils/Sfile_util.py
+++ b/eqcorrscan/utils/Sfile_util.py
@@ -276,7 +276,8 @@ def readpicks(sfilename):
del headerend
for line in f:
if 'headerend' in locals():
- if len(line.rstrip('\n').rstrip('\r'))==80 and (line[79]==' ' or line[79]=='4'):
+ if len(line.rstrip('\n').rstrip('\r')) in [80,79] and \
+ (line[79]==' ' or line[79]=='4' or line [79]=='\n'):
pickline+=[line]
elif line[79]=='7':
header=line
|
Failed to read in seisan'd sfiles
Seisan removes trailling space on pick lines sometimes, now accomodated'
Former-commit-id: <I>c<I>d<I>a<I>e<I>e<I>b5a<I>e<I>b
|
diff --git a/tests/tacl_test_case.py b/tests/tacl_test_case.py
index <HASH>..<HASH> 100644
--- a/tests/tacl_test_case.py
+++ b/tests/tacl_test_case.py
@@ -17,7 +17,7 @@ class TaclTestCase (unittest.TestCase):
for common_file in dircmp.common_files:
actual_path = os.path.join(dircmp.left, common_file)
expected_path = os.path.join(dircmp.right, common_file)
- if os.path.splitext(common_file)[0] == '.csv':
+ if os.path.splitext(common_file)[1] == '.csv':
self._compare_results_files(actual_path, expected_path)
else:
self._compare_non_results_files(actual_path, expected_path)
|
Corrected problem in test comparison of files.
|
diff --git a/katcp/core.py b/katcp/core.py
index <HASH>..<HASH> 100644
--- a/katcp/core.py
+++ b/katcp/core.py
@@ -181,7 +181,7 @@ class Message(object):
args = "(" + ", ".join(escaped_args) + ")"
else:
args = ""
- return "<Message %(tp)s %(name)s %(args)s>" % locals()
+ return "<Message %s %s %s>" % (tp, name, args)
def __eq__(self, other):
if not isinstance(other, Message):
|
Avoid use of locals() in call in repr as being somewhat unexpected and fragile. :)
git-svn-id: <URL>
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -64,10 +64,10 @@ author = u'Kytos Project'
# built documents.
#
# The short X.Y version.
-version = u'2017.1'
+version = u'2017.2'
show_version = False
# The full version, including alpha/beta/rc tags.
-release = u'2017.1rc1'
+release = u'2017.2b1.dev0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/pyof/__init__.py b/pyof/__init__.py
index <HASH>..<HASH> 100644
--- a/pyof/__init__.py
+++ b/pyof/__init__.py
@@ -3,4 +3,4 @@
This package is a library that parses and creates OpenFlow Messages.
It contains all implemented versions of OpenFlow protocol
"""
-__version__ = '2017.1rc1'
+__version__ = '2017.2b1.dev0'
|
Updating version to <I>b1.dev0
|
diff --git a/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java b/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
index <HASH>..<HASH> 100644
--- a/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
+++ b/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
@@ -2419,6 +2419,7 @@ public class LocalExecutionPlanner
private static Function<Page, Page> enforceLayoutProcessor(List<Symbol> expectedLayout, Map<Symbol, Integer> inputLayout)
{
int[] channels = expectedLayout.stream()
+ .peek(symbol -> checkArgument(inputLayout.containsKey(symbol), "channel not found for symbol: %s", symbol))
.mapToInt(inputLayout::get)
.toArray();
|
Refactor enforceLayoutProcessor
Throw a message with a more specific text about what channel is missing.
This helps a lot when debugging an optimizer change.
|
diff --git a/lib/prepare-params.js b/lib/prepare-params.js
index <HASH>..<HASH> 100644
--- a/lib/prepare-params.js
+++ b/lib/prepare-params.js
@@ -32,7 +32,15 @@ module.exports = function(event, context) {
break;
case 'query':
// TODO cast qstring params
- params[param.name] = event.request.querystring[param.name];
+ if (param.type === 'object') {
+ try {
+ params[param.name] = JSON.parse(event.request.querystring[param.name]);
+ } catch {
+ params[param.name] = 'error' // let the validator err
+ }
+ } else {
+ params[param.name] = event.request.querystring[param.name];
+ }
break;
case 'path':
params[param.name] = event.request.path[param.name];
|
support json "object" type in query
|
diff --git a/builder/pod-build.go b/builder/pod-build.go
index <HASH>..<HASH> 100644
--- a/builder/pod-build.go
+++ b/builder/pod-build.go
@@ -18,11 +18,18 @@ func (p *Pod) Build() {
os.RemoveAll(p.target)
os.MkdirAll(p.target, 0777)
+ p.preparePodVersion()
apps := p.processAci()
p.writePodManifest(apps)
}
+func (p *Pod) preparePodVersion() {
+ if p.manifest.Name.Version() == "" {
+ p.manifest.Name = *spec.NewACFullName(p.manifest.Name.Name() + ":" + utils.GenerateVersion())
+ }
+}
+
func (p *Pod) processAci() []schema.RuntimeApp {
apps := []schema.RuntimeApp{}
for _, e := range p.manifest.Pod.Apps {
|
set generated version of pod if not set
|
diff --git a/core/sawtooth/validator_config.py b/core/sawtooth/validator_config.py
index <HASH>..<HASH> 100644
--- a/core/sawtooth/validator_config.py
+++ b/core/sawtooth/validator_config.py
@@ -295,7 +295,7 @@ class ValidatorDefaultConfig(sawtooth.config.Config):
# topological configuration
self['TopologyAlgorithm'] = 'RandomWalk'
- self['InitialConnectivity'] = 1
+ self['InitialConnectivity'] = 0
self['TargetConnectivity'] = 3
self['MaximumConnectivity'] = 15
self['MinimumConnectivity'] = 1
|
Set InitialConnectivity to 0 by default
This allows starting up a single validator. After this change,
production/test networks with more than one validator should set
InitialConnectivity to a value greater than 0.
|
diff --git a/p2p/host/peerstore/test/keybook_suite.go b/p2p/host/peerstore/test/keybook_suite.go
index <HASH>..<HASH> 100644
--- a/p2p/host/peerstore/test/keybook_suite.go
+++ b/p2p/host/peerstore/test/keybook_suite.go
@@ -4,6 +4,7 @@ import (
"sort"
"testing"
+ ic "github.com/libp2p/go-libp2p-crypto"
peer "github.com/libp2p/go-libp2p-peer"
pt "github.com/libp2p/go-libp2p-peer/test"
@@ -144,7 +145,7 @@ func testInlinedPubKeyAddedOnRetrieve(kb pstore.KeyBook) func(t *testing.T) {
}
// Key small enough for inlining.
- _, pub, err := pt.RandTestKeyPair(32)
+ _, pub, err := ic.GenerateKeyPair(ic.Ed25519, 256)
if err != nil {
t.Error(err)
}
|
fix the inline key test
RandTestKeyPair uses RSA keys but we now forbid any RSA key under <I> bits.
|
diff --git a/dvc/version.py b/dvc/version.py
index <HASH>..<HASH> 100644
--- a/dvc/version.py
+++ b/dvc/version.py
@@ -6,7 +6,7 @@
import os
import subprocess
-_BASE_VERSION = "2.0.0a3"
+_BASE_VERSION = "2.0.0a4"
def _generate_version(base_version):
|
dvc: bump to <I>a4
|
diff --git a/commands/command_logs.go b/commands/command_logs.go
index <HASH>..<HASH> 100644
--- a/commands/command_logs.go
+++ b/commands/command_logs.go
@@ -96,15 +96,17 @@ func sortedLogs() []string {
return []string{}
}
- names := make([]string, 0, len(fileinfos))
+ names := make([]string, len(fileinfos))
+ fileCount := 0
for index, info := range fileinfos {
if info.IsDir() {
continue
}
+ fileCount += 1
names[index] = info.Name()
}
- return names
+ return names[0:fileCount]
}
func init() {
|
can't modify the names array if its len is 0
|
diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java b/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
@@ -33,8 +33,8 @@ import java.util.List;
public class TryCatchStatement extends Statement {
private static final String IS_RESOURCE = "_IS_RESOURCE";
private Statement tryStatement;
- private List<ExpressionStatement> resourceStatements = new ArrayList<>();
- private List<CatchStatement> catchStatements = new ArrayList<>();
+ private final List<ExpressionStatement> resourceStatements = new ArrayList<>(4);
+ private final List<CatchStatement> catchStatements = new ArrayList<>(4);
private Statement finallyStatement;
|
Trivial tweak: set the initial capacity of statement lists
|
diff --git a/lib/chef_zero/endpoints/principal_endpoint.rb b/lib/chef_zero/endpoints/principal_endpoint.rb
index <HASH>..<HASH> 100644
--- a/lib/chef_zero/endpoints/principal_endpoint.rb
+++ b/lib/chef_zero/endpoints/principal_endpoint.rb
@@ -11,15 +11,25 @@ module ChefZero
json = get_data(request, request.rest_path[0..1] + [ 'users', name ], :nil)
if json
type = 'user'
+ org_member = true
else
json = get_data(request, request.rest_path[0..1] + [ 'clients', name ], :nil)
- type = 'client'
+ if json
+ type = 'client'
+ org_member = true
+ else
+ json = get_data(request, [ 'users', name ], :nil)
+ type = 'user'
+ org_member = false
+ end
end
if json
json_response(200, {
'name' => name,
'type' => type,
- 'public_key' => JSON.parse(json)['public_key'] || PUBLIC_KEY
+ 'public_key' => JSON.parse(json)['public_key'] || PUBLIC_KEY,
+ 'authz_id' => '0'*32,
+ 'org_member' => org_member
})
else
error(404, 'Principal not found')
|
Report authz id and whether principal is a member of the org
|
diff --git a/src/integration/engine_test.go b/src/integration/engine_test.go
index <HASH>..<HASH> 100644
--- a/src/integration/engine_test.go
+++ b/src/integration/engine_test.go
@@ -1272,13 +1272,7 @@ func (self *EngineSuite) TestDerivativeQueryWithOnePoint(c *C) {
}
]`)
- self.runQuery("select derivative(column_one) from foo", c, `[
- {
- "points": [],
- "name": "foo",
- "fields": ["derivative"]
- }
- ]`)
+ self.runQuery("select derivative(column_one) from foo", c, `[]`)
}
func (self *EngineSuite) TestDistinctQuery(c *C) {
|
series with no points don't return anything
|
diff --git a/emannotationschemas/models.py b/emannotationschemas/models.py
index <HASH>..<HASH> 100644
--- a/emannotationschemas/models.py
+++ b/emannotationschemas/models.py
@@ -17,6 +17,7 @@ from typing import Sequence
import logging
Base = declarative_base()
+FlatBase = declarative_base()
field_column_map = {
# SegmentationField: Numeric,
@@ -392,7 +393,7 @@ def make_flat_model_from_schema(table_name: str,
table_metadata=None,
with_crud_columns=False,
)
- FlatAnnotationModel = type(table_name, (Base,), annotation_dict)
+ FlatAnnotationModel = type(table_name, (FlatBase,), annotation_dict)
annotation_models.set_model(table_name,
FlatAnnotationModel, flat=True)
|
use seperate declarative base for flat models
|
diff --git a/Kwf_js/Utils/DoubleTapToGo.js b/Kwf_js/Utils/DoubleTapToGo.js
index <HASH>..<HASH> 100644
--- a/Kwf_js/Utils/DoubleTapToGo.js
+++ b/Kwf_js/Utils/DoubleTapToGo.js
@@ -63,7 +63,13 @@ Kwf.namespace('Kwf.Utils');
if ($(element).hasClass('kwfDoubleTapHandler')) return;
$(element).addClass('kwfDoubleTapHandler');
- $(element).on('touchstart', function(e) {
+ $(element).on('touchend', function(e) {
+
+ if (touchMoved) {
+ touchMoved = false;
+ return;
+ }
+
e.stopPropagation();
var currentTarget = $(e.currentTarget);
|
DoubleTapToGo check for touchmove on touchend
|
diff --git a/lib/storey/gen_dump_command.rb b/lib/storey/gen_dump_command.rb
index <HASH>..<HASH> 100644
--- a/lib/storey/gen_dump_command.rb
+++ b/lib/storey/gen_dump_command.rb
@@ -43,8 +43,8 @@ module Storey
command_parts += [
Utils.command_line_switches_from(switches),
schemas_switches,
- database,
]
+ command_parts << database if database_url.blank?
command_parts.compact.join(' ')
end
diff --git a/spec/storey/gen_dump_command_spec.rb b/spec/storey/gen_dump_command_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/storey/gen_dump_command_spec.rb
+++ b/spec/storey/gen_dump_command_spec.rb
@@ -31,6 +31,21 @@ module Storey
end
end
+ context "connection string is passed in" do
+ let(:options) do
+ {
+ structure_only: true,
+ file: 'myfile.sql',
+ database_url: "postgres://user:pass@ip.com:5432/db",
+ database: "testdb",
+ }
+ end
+
+ it "ignores the `database` value" do
+ expect(command).to_not match /testdb/
+ end
+ end
+
context "connection string is set in Storey" do
before do
Storey.configuration.database_url = "postgres://user:pass@ip.com:5432/db"
|
GenDumpCommand does not insert database if connection string is given
|
diff --git a/packages/material-ui/src/Container/Container.js b/packages/material-ui/src/Container/Container.js
index <HASH>..<HASH> 100644
--- a/packages/material-ui/src/Container/Container.js
+++ b/packages/material-ui/src/Container/Container.js
@@ -78,11 +78,12 @@ const ContainerRoot = experimentalStyled(
maxWidth: Math.max(theme.breakpoints.values.xs, 444),
},
}),
- ...(styleProps.maxWidth !== 'xs' && {
- [theme.breakpoints.up(styleProps.maxWidth)]: {
- maxWidth: `${theme.breakpoints.values[styleProps.maxWidth]}${theme.breakpoints.unit}`,
- },
- }),
+ ...(styleProps.maxWidth &&
+ styleProps.maxWidth !== 'xs' && {
+ [theme.breakpoints.up(styleProps.maxWidth)]: {
+ maxWidth: `${theme.breakpoints.values[styleProps.maxWidth]}${theme.breakpoints.unit}`,
+ },
+ }),
}),
);
|
[Container] Fix maxWidth="false" resulting in incorrect css (#<I>)
|
diff --git a/contrib/externs/angular-1.6.js b/contrib/externs/angular-1.6.js
index <HASH>..<HASH> 100644
--- a/contrib/externs/angular-1.6.js
+++ b/contrib/externs/angular-1.6.js
@@ -1638,7 +1638,7 @@ angular.$http.prototype.get = function(url, opt_config) {};
angular.$http.prototype.head = function(url, opt_config) {};
/**
- * @param {string} url
+ * @param {string|!Object} url
* @param {angular.$http.Config=} opt_config
* @return {!angular.$http.HttpPromise}
*/
|
Update Angular <I> externs to accept !Object in JSONP call, for trusted types
Follows <URL>
|
diff --git a/test/holygrail.spec.js b/test/holygrail.spec.js
index <HASH>..<HASH> 100644
--- a/test/holygrail.spec.js
+++ b/test/holygrail.spec.js
@@ -74,6 +74,9 @@ describe('Holy Grail Layout', function() {
// for IE8
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+ // refresh the scrollview boundingClientRect, for Opera 12
+ dom.scrollview = dom.$scrollview.getBoundingClientRect();
+
expect(dom.bottomContent.top).toBeLessThan(dom.scrollview.top + dom.scrollview.height + scrollTop);
// clean-up after yourself
|
Refresh the scrollview boundingclientrect before scrolling it, to fix the scroll test spec in opera <I>.
|
diff --git a/src/adafruit_blinka/microcontroller/bcm283x/pin.py b/src/adafruit_blinka/microcontroller/bcm283x/pin.py
index <HASH>..<HASH> 100644
--- a/src/adafruit_blinka/microcontroller/bcm283x/pin.py
+++ b/src/adafruit_blinka/microcontroller/bcm283x/pin.py
@@ -142,6 +142,10 @@ spiPorts = (
(0, SCLK, MOSI, MISO),
(1, SCLK_1, MOSI_1, MISO_1),
(2, SCLK_2, MOSI_2, MISO_2),
+ (3, D3, D2, D1), #SPI3 on Pi4/CM4
+ (4, D7, D6, D5), #SPI4 on Pi4/CM4
+ (5, D15, D14, D13), #SPI5 on Pi4/CM4
+
)
# ordered as uartId, txId, rxId
|
Add additional SPI ports for BCM<I>
Currently the additional SPI ports on the Pi4 or CM4 are not usable in Blinka without doing this change manually.
SPI6 uses the same pins as the default SPI1 pins.
|
diff --git a/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java b/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java
index <HASH>..<HASH> 100644
--- a/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java
+++ b/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java
@@ -16,6 +16,8 @@
package org.kie.runtime;
+import org.kie.event.KnowledgeRuntimeEventManager;
+
/**
* StatelessKnowledgeSession provides a convenience API, wrapping StatefulKnowledgeSession. It avoids the need to
@@ -115,7 +117,7 @@ package org.kie.runtime;
*/
public interface StatelessKnowledgeSession
extends
- StatelessKieSession {
+ StatelessKieSession, KnowledgeRuntimeEventManager {
}
|
Fixing class cast exception when using loggers, due to inconsistency in the interface hierarchy
|
diff --git a/ratelimit/ratelimit_test.go b/ratelimit/ratelimit_test.go
index <HASH>..<HASH> 100644
--- a/ratelimit/ratelimit_test.go
+++ b/ratelimit/ratelimit_test.go
@@ -26,8 +26,8 @@ func TestUnaryServerInterceptor_RateLimitPass(t *testing.T) {
info := &grpc.UnaryServerInfo{
FullMethod: "FakeMethod",
}
- req, err := interceptor(nil, nil, info, handler)
- assert.Nil(t, req)
+ resp, err := interceptor(nil, nil, info, handler)
+ assert.Nil(t, resp)
assert.EqualError(t, err, errMsgFake)
}
@@ -45,8 +45,8 @@ func TestUnaryServerInterceptor_RateLimitFail(t *testing.T) {
info := &grpc.UnaryServerInfo{
FullMethod: "FakeMethod",
}
- req, err := interceptor(nil, nil, info, handler)
- assert.Nil(t, req)
+ resp, err := interceptor(nil, nil, info, handler)
+ assert.Nil(t, resp)
assert.EqualError(t, err, "rpc error: code = ResourceExhausted desc = FakeMethod is rejected by grpc_ratelimit middleware, please retry later.")
}
|
change the name of UnaryServerInterceptor's return (#<I>)
|
diff --git a/src/iframeResizer.js b/src/iframeResizer.js
index <HASH>..<HASH> 100644
--- a/src/iframeResizer.js
+++ b/src/iframeResizer.js
@@ -129,7 +129,7 @@
}
function isMessageForUs(){
- return msgId === '' + msg.substr(0,msgIdLen); //''+Protects against non-string msg
+ return msgId === ('' + msg).substr(0,msgIdLen); //''+Protects against non-string msg
}
function forwardMsgFromIFrame(){
|
Preventing error wehen message is an object
This method throwed "TypeError: Object #<Object> has no method 'substr'" when the message was an object.
|
diff --git a/pefile.py b/pefile.py
index <HASH>..<HASH> 100644
--- a/pefile.py
+++ b/pefile.py
@@ -2750,7 +2750,7 @@ class PE:
# The number of imports parsed in this file
self.__total_import_symbols = 0
- fast_load = fast_load or globals()["fast_load"]
+ fast_load = fast_load if fast_load is not None else globals()["fast_load"]
try:
self.__parse__(name, data, fast_load)
except:
|
Fix handling of pefile.PE(fast_load=False)
The fast_load argument value in pefile.PE() constructor
needs to be explicitly checked for being None. The existing
truthy/falsy check means that fast_load=False always falls
back to the global value (which, when set to True, causes a
fast load even though user explicitly requested a full load).
|
diff --git a/securimage_play.php b/securimage_play.php
index <HASH>..<HASH> 100644
--- a/securimage_play.php
+++ b/securimage_play.php
@@ -52,7 +52,7 @@ $img = new Securimage();
//$img->audio_use_noise = true;
//$img->degrade_audio = false;
//$img->sox_binary_path = 'sox';
-//$img->lame_binary_path = '/usr/bin/lame'; // for mp3 audio support
+//Securimage::$lame_binary_path = '/usr/bin/lame'; // for mp3 audio support
// To use an alternate language, uncomment the following and download the files from phpcaptcha.org
// $img->audio_path = $img->securimage_path . '/audio/es/';
|
Update $lame_binary_path usage to static
|
diff --git a/nipap-www/nipapwww/public/controllers.js b/nipap-www/nipapwww/public/controllers.js
index <HASH>..<HASH> 100644
--- a/nipap-www/nipapwww/public/controllers.js
+++ b/nipap-www/nipapwww/public/controllers.js
@@ -1046,7 +1046,7 @@ nipapAppControllers.controller('PoolEditController', function ($scope, $routePar
// Mangle avps
query_data.avps = {};
- $scope.prefix.avps.forEach(function(avp) {
+ $scope.pool.avps.forEach(function(avp) {
query_data.avps[avp.attribute] = avp.value;
});
query_data.avps = JSON.stringify(query_data.avps);
|
www: Fix edit pool page
Fix bug in add pool page which prohibited changes from being saved.
Fixes #<I>
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -29,9 +29,10 @@ wch.unwatch = async function(root) {
return quest.json(req, {root}).then(success)
}
+wch.connect = sock.connect
+
// Plugin events
wch.on = function(evt, fn) {
- sock.connect()
return events.on(evt, fn)
}
@@ -53,7 +54,6 @@ wch.stream = function(root, opts) {
return stream
async function watch() {
- await sock.connect()
// Rewatch on server restart.
rewatcher = events.on('connect', () => {
|
force user to call `wch.connect`
|
diff --git a/dist.py b/dist.py
index <HASH>..<HASH> 100644
--- a/dist.py
+++ b/dist.py
@@ -183,9 +183,9 @@ class Distribution:
commands (currently, this only happens if user asks for
help)."""
- # late import because of mutual dependence between these classes
+ # late import because of mutual dependence between these modules
from distutils.cmd import Command
-
+ from distutils.core import usage
# We have to parse the command line a bit at a time -- global
# options, then the first command, then its options, and so on --
|
Add missing import of 'usage' string.
|
diff --git a/src/widgets/PopUpManager.js b/src/widgets/PopUpManager.js
index <HASH>..<HASH> 100644
--- a/src/widgets/PopUpManager.js
+++ b/src/widgets/PopUpManager.js
@@ -119,7 +119,14 @@ define(function (require, exports, module) {
keyEvent.stopImmediatePropagation();
_removePopUp($popUp, true);
- EditorManager.focusEditor();
+
+ // TODO: right now Menus and Context Menus do not take focus away from
+ // the editor. We need to have a focus manager to correctly manage focus
+ // between editors and other UI elements.
+ // For now we don't set focus here and assume individual popups
+ // adjust focus if necessary
+ // See story in Trello card #404
+ //EditorManager.focusEditor();
}
break;
|
fixes <I> by not setting focus when popup is closed
|
diff --git a/tracing/plugin/otlp.go b/tracing/plugin/otlp.go
index <HASH>..<HASH> 100644
--- a/tracing/plugin/otlp.go
+++ b/tracing/plugin/otlp.go
@@ -33,6 +33,7 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
+ "go.opentelemetry.io/otel/sdk/trace"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
)
@@ -49,7 +50,11 @@ func init() {
if cfg.Endpoint == "" {
return nil, fmt.Errorf("no OpenTelemetry endpoint: %w", plugin.ErrSkipPlugin)
}
- return newExporter(ic.Context, cfg)
+ exp, err := newExporter(ic.Context, cfg)
+ if err != nil {
+ return nil, err
+ }
+ return trace.NewBatchSpanProcessor(exp), nil
},
})
plugin.Register(&plugin.Registration{
|
tracing: fix panic on startup when configured
When support for http/protobuf was added, the OTLP tracing processor
plugin was mistakenly changed to return a raw OTLP exporter instance.
Consequently, the type-assertion to a trace.SpanProcessor inside the
tracing pluigin would panic if the processor plugin was configured.
Modify the OTLP plugin to return a BatchSpanProcessor derived from the
exporter once more.
|
diff --git a/lib/shhh/app/commands/command.rb b/lib/shhh/app/commands/command.rb
index <HASH>..<HASH> 100644
--- a/lib/shhh/app/commands/command.rb
+++ b/lib/shhh/app/commands/command.rb
@@ -60,6 +60,10 @@ module Shhh
raise Shhh::Errors::AbstractMethodCalled.new(:run)
end
+ def to_s
+ "#{self.class.short_name.to_s.bold.yellow}, with options: #{cli.args.argv.join(' ').gsub(/--/, '').bold.green}"
+ end
+
end
end
end
|
Add nice #to_s to all commands
|
diff --git a/plugin/forward/health.go b/plugin/forward/health.go
index <HASH>..<HASH> 100644
--- a/plugin/forward/health.go
+++ b/plugin/forward/health.go
@@ -25,7 +25,6 @@ func (p *Proxy) Check() error {
func (p *Proxy) send() error {
hcping := new(dns.Msg)
hcping.SetQuestion(".", dns.TypeNS)
- hcping.RecursionDesired = false
m, _, err := p.client.Exchange(hcping, p.addr)
// If we got a header, we're alright, basically only care about I/O errors 'n stuff
|
plugin/forward: set the RD bit in the hc (#<I>)
My routers acts funny when it sees it non RD query; make this HC as
boring as possible
|
diff --git a/safe/utilities/analysis.py b/safe/utilities/analysis.py
index <HASH>..<HASH> 100644
--- a/safe/utilities/analysis.py
+++ b/safe/utilities/analysis.py
@@ -70,7 +70,7 @@ from safe.common.signals import (
ANALYSIS_DONE_SIGNAL)
from safe_extras.pydispatch import dispatcher
from safe.common.exceptions import BoundingBoxError, NoValidLayerError
-
+from safe.utilities.resources import resource_url
PROGRESS_UPDATE_STYLE = styles.PROGRESS_UPDATE_STYLE
INFO_STYLE = styles.INFO_STYLE
@@ -78,7 +78,10 @@ WARNING_STYLE = styles.WARNING_STYLE
KEYWORD_STYLE = styles.KEYWORD_STYLE
SUGGESTION_STYLE = styles.SUGGESTION_STYLE
SMALL_ICON_STYLE = styles.SMALL_ICON_STYLE
-LOGO_ELEMENT = styles.logo_element()
+LOGO_ELEMENT = m.Image(
+ resource_url(styles.logo_element()),
+ 'InaSAFE Logo')
+
LOGGER = logging.getLogger('InaSAFE')
|
[BACKPORT] Fix #<I> - logo does not display in dock during processing.
|
diff --git a/spec/unit/resource_controller/data_access_spec.rb b/spec/unit/resource_controller/data_access_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/resource_controller/data_access_spec.rb
+++ b/spec/unit/resource_controller/data_access_spec.rb
@@ -20,6 +20,22 @@ describe ActiveAdmin::ResourceController::DataAccess do
expect(chain).to receive(:ransack).with(params[:q]).once.and_return(Post.ransack)
controller.send :apply_filtering, chain
end
+
+ context "params includes empty values" do
+ let(:params) do
+ { q: {id_eq: 1, position_eq: ""} }
+ end
+ it "should return relation without empty filters" do
+ expect(Post).to receive(:ransack).with(params[:q]).once.and_wrap_original do |original, *args|
+ chain = original.call(*args)
+ expect(chain.conditions.size).to eq(1)
+ chain
+ end
+ controller.send :apply_filtering, Post
+ end
+ end
+
+
end
describe "sorting" do
|
added test to check blank params are not included while filtering
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.