diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/www/src/components/ComponentApi.js b/www/src/components/ComponentApi.js
index <HASH>..<HASH> 100644
--- a/www/src/components/ComponentApi.js
+++ b/www/src/components/ComponentApi.js
@@ -37,6 +37,7 @@ function ComponentApi({ heading, metadata, exportedBy }) {
<ImportApi name={importName} />
{/* use composes here */}
+ {/* eslint-disable-next-line react/no-danger */}
{descHtml && <div dangerouslySetInnerHTML={{ __html: descHtml }} />}
<PropTable metadata={metadata} />
</> | fix: added eslint pragma for ignoring dangerouslySetInnerHTML |
diff --git a/sample.js b/sample.js
index <HASH>..<HASH> 100644
--- a/sample.js
+++ b/sample.js
@@ -445,6 +445,8 @@ function generateWorkbook() {
var wb = generateWorkbook();
wb.write('Excel1.xlsx');
+console.log('Excel1.xlsx written');
+
wb.write('Excel.xlsx', function (err, stats) {
console.log('Excel.xlsx written and has the following stats');
console.log(stats); | small update to sample.js file |
diff --git a/lib/cucumber/salad/widgets/form.rb b/lib/cucumber/salad/widgets/form.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber/salad/widgets/form.rb
+++ b/lib/cucumber/salad/widgets/form.rb
@@ -40,21 +40,6 @@ module Cucumber
end
end
- def initialize(settings = {})
- s = settings.dup
- data = s.delete(:data) || {}
-
- super s
-
- fill_all data
-
- if block_given?
- yield self
-
- submit
- end
- end
-
def fill_all(attrs)
attrs.each do |k, v|
send "#{k}=", v | [form] Delete custom initialization.
The behavior can be replicated using other instance methods. |
diff --git a/Siel/Acumulus/Shop/InvoiceManager.php b/Siel/Acumulus/Shop/InvoiceManager.php
index <HASH>..<HASH> 100644
--- a/Siel/Acumulus/Shop/InvoiceManager.php
+++ b/Siel/Acumulus/Shop/InvoiceManager.php
@@ -401,12 +401,11 @@ abstract class InvoiceManager
*
* After sending the invoice:
* - A successful result gets saved to the acumulus entries table.
- * - A mail with the results may be sent.
* - The invoice sent event gets triggered
+ * - A mail with the results may be sent.
*
* @param \Siel\Acumulus\Invoice\Source $invoiceSource
* @param array $invoice
- * param array $localMessages
* @param \Siel\Acumulus\Invoice\Result $result
*
* @return \Siel\Acumulus\Invoice\Result
@@ -433,12 +432,12 @@ abstract class InvoiceManager
}
}
- // Send a mail if there are messages.
- $this->mailInvoiceAddResult($result, $invoiceSource);
-
// Trigger the InvoiceSent event.
$this->triggerInvoiceSent($invoice, $invoiceSource, $result);
+ // Send a mail if there are messages.
+ $this->mailInvoiceAddResult($result, $invoiceSource);
+
return $result;
} | Trigger event InvoiceSent placed before sending mail |
diff --git a/src/babel/build-external-helpers.js b/src/babel/build-external-helpers.js
index <HASH>..<HASH> 100644
--- a/src/babel/build-external-helpers.js
+++ b/src/babel/build-external-helpers.js
@@ -13,21 +13,15 @@ export default function (whitelist) {
buildHelpers(body, namespace, whitelist);
- var globalHelpersDeclar = t.variableDeclaration("var", [
- t.variableDeclarator(
- namespace,
- t.objectExpression({})
- )
- ]);
var container = util.template("umd-commonjs-strict", {
AMD_ARGUMENTS: t.arrayExpression([t.literal("exports")]),
COMMON_ARGUMENTS: t.identifier("exports"),
- BROWSER_ARGUMENTS: t.identifier("root"),
- UMD_ROOT: namespace,
+ BROWSER_ARGUMENTS: t.assignmentExpression("=", t.memberExpression(t.identifier("root"), namespace), t.objectExpression({})),
+ UMD_ROOT: t.identifier("this"),
FACTORY_PARAMETERS: t.identifier("global"),
FACTORY_BODY: body
});
- var tree = t.program([globalHelpersDeclar, container]);
+ var tree = t.program([container]);
return generator(tree).code;
}; | change to normal UMD (fixes bug with leaking variable in AMD mode) |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -33,6 +33,9 @@ function Depsify(entries, opts) {
;[].concat(opts.transform).filter(Boolean).forEach(function (p) {
this.transform(p)
}, this)
+ ;[].concat(opts.processor).filter(Boolean).forEach(function (p) {
+ this.processor(p)
+ }, this)
;[].concat(opts.entries).filter(Boolean).forEach(function (file) {
this.add(file, { basedir: opts.basedir })
}, this)
@@ -77,7 +80,7 @@ Depsify.prototype._createPipeline = function (opts) {
}
Depsify.prototype._createDeps = function(opts) {
- opts = mix.fill({ transform: [] }, opts)
+ opts = mix.fill({ transform: [], processor: [] }, opts)
return MDeps(opts)
} | Apply processor in Depsify rather than css-module-deps |
diff --git a/protoc-gen-go/generator/generator.go b/protoc-gen-go/generator/generator.go
index <HASH>..<HASH> 100644
--- a/protoc-gen-go/generator/generator.go
+++ b/protoc-gen-go/generator/generator.go
@@ -1417,11 +1417,7 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor
name = name[i+1:]
}
}
- if name == CamelCase(fieldName) {
- name = ""
- } else {
- name = ",name=" + name
- }
+ name = ",name=" + name
if message.proto3() {
// We only need the extra tag for []byte fields;
// no need to add noise for the others. | Unconditionally generate the name= part of the protobuf struct field tag.
This is generated <I>% of the time anyway (since the standard style is to
name fields in snake_case, which gets turned into Go's CamelCase), but if
a .proto has a oneof field with a CamelCase name then some downstream code
can get confused. |
diff --git a/lib/ha-websocket.js b/lib/ha-websocket.js
index <HASH>..<HASH> 100644
--- a/lib/ha-websocket.js
+++ b/lib/ha-websocket.js
@@ -285,6 +285,15 @@ class HaWebsocket extends EventEmitter {
this.states[emitEvent.entity_id] = emitEvent.event.new_state;
}
+ // If old_state is null the state_changed was fired due to reloading of yaml files only send to events:all node
+ if (
+ emitEvent.event_type === 'state_changed' &&
+ emitEvent.event.old_state !== null
+ ) {
+ this.emit('ha_events:all', emitEvent);
+ return;
+ }
+
// Emit on the event type channel
if (emitEvent.event_type) {
this.emit(`ha_events:${msg.event_type}`, emitEvent); | fix: ignore state_changed event if old_state is null
* reloading of yaml files now triggers state_changed events
* only emit these events to the events:all node
Fixes #<I> |
diff --git a/plenum/test/consensus/order_service/test_sim_ordering_node_txn.py b/plenum/test/consensus/order_service/test_sim_ordering_node_txn.py
index <HASH>..<HASH> 100644
--- a/plenum/test/consensus/order_service/test_sim_ordering_node_txn.py
+++ b/plenum/test/consensus/order_service/test_sim_ordering_node_txn.py
@@ -119,6 +119,10 @@ def node_req_demote(random, sim_pool):
# "params" equal to seed
@pytest.fixture(params=Random().sample(range(1000000), 100))
def random(request):
+ seed = request.param
+ # TODO: Remove after we fix INDY-2237 and INDY-2148
+ if seed in {752248, 659043, 550513}:
+ return DefaultSimRandom(0)
return DefaultSimRandom(request.param) | add some seeds into a blacklist until INDY-<I> and INDY-<I> are fixed |
diff --git a/test/com/google/javascript/jscomp/DataFlowAnalysisTest.java b/test/com/google/javascript/jscomp/DataFlowAnalysisTest.java
index <HASH>..<HASH> 100644
--- a/test/com/google/javascript/jscomp/DataFlowAnalysisTest.java
+++ b/test/com/google/javascript/jscomp/DataFlowAnalysisTest.java
@@ -747,8 +747,7 @@ public final class DataFlowAnalysisTest extends TestCase {
// Compute liveness of variables
LiveVariablesAnalysis analysis =
- new LiveVariablesAnalysis(
- cfg, scope, childScope, compiler, (Es6SyntacticScopeCreator) scopeCreator);
+ new LiveVariablesAnalysis(cfg, scope, childScope, compiler, scopeCreator);
analysis.analyze();
return analysis.getEscapedLocals();
} | FIXUP: Remove an unnecessary cast
-------------
Created by MOE: <URL> |
diff --git a/eve_elastic/elastic.py b/eve_elastic/elastic.py
index <HASH>..<HASH> 100644
--- a/eve_elastic/elastic.py
+++ b/eve_elastic/elastic.py
@@ -291,8 +291,8 @@ class Elastic(DataLayer):
ids = []
kwargs.update(self._es_args(resource))
for doc in doc_or_docs:
- doc.update(self.es.index(body=doc, id=doc.get('_id'), **kwargs))
- ids.append(doc['_id'])
+ res = self.es.index(body=doc, id=doc.get('_id'), **kwargs)
+ ids.append(res.get('_id', doc.get('_id')))
get_indices(self.es).refresh(self.index)
return ids | fix(insert): don't extend document on insert
it should avoid adding elastic internal data to docs like _version, _index, _type |
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java b/flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
index <HASH>..<HASH> 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
@@ -31,8 +31,6 @@ import org.apache.zookeeper.data.Stat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nullable;
-
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
@@ -328,7 +326,6 @@ public class ZooKeeperStateHandleStore<T extends Serializable> {
* @return True if the state handle could be released
* @throws Exception If the ZooKeeper operation or discarding the state handle fails
*/
- @Nullable
public boolean releaseAndTryRemove(String pathInZooKeeper) throws Exception {
checkNotNull(pathInZooKeeper, "Path in ZooKeeper"); | [hotfix][chck] Remove Nullable annotation from method with primitive return type
ZooKeeperStateHandleStore#releaseAndTryRemove returns a primitive boolean and, thus,
does not need a @Nullable annotation. |
diff --git a/werkzeug/templates.py b/werkzeug/templates.py
index <HASH>..<HASH> 100644
--- a/werkzeug/templates.py
+++ b/werkzeug/templates.py
@@ -233,16 +233,20 @@ class Parser(object):
elif name == 'if':
add(self.parse_if(args))
else:
- self.fail('unknown directive %S' % name)
+ self.fail('unknown directive %s' % name)
if needle:
self.fail('unexpected end of template')
return ast.Stmt(result, lineno=start_lineno)
def parse_loop(self, args, type):
rv = self.parse_python('%s %s: pass' % (type, args), 'exec').nodes[0]
- tag, value, rv.body = self.parse(('end' + type,))
+ tag, value, rv.body = self.parse(('end' + type, 'else'))
if value:
- self.fail('unexpected data after end' + type)
+ self.fail('unexpected data after ' + tag)
+ if tag == 'else':
+ tag, value, rv.else_ = self.parse(('end' + type,))
+ if value:
+ self.fail('unexpected data after else')
return rv
def parse_if(self, args): | added support for for-else / while-else
--HG--
branch : trunk |
diff --git a/test/test.py b/test/test.py
index <HASH>..<HASH> 100644
--- a/test/test.py
+++ b/test/test.py
@@ -16,16 +16,18 @@ from ase.units import GPa
import elastic
from elastic.parcalc import ParCalculate, ClusterVasp
-
+from elastic import BMEOS
def banner(msg):
print()
print(60*'=')
- print(msg)
+ print(min(0,(60-len(msg))//2-1)*' ',msg)
print(60*'=')
def secban(msg):
- print('\n',msg,'\n',60*'-')
+ print()
+ print(min(0,(60-len(msg))//2-1)*' ',msg)
+ print(60*'-')
banner('Structure optimization on MgO')
@@ -135,7 +137,7 @@ for cryst in crystals[:] :
print(cryst.get_vecang_cell())
print(cryst.bravais, cryst.sg_type, cryst.sg_name, cryst.sg_nr)
- view(cryst)
+ #view(cryst)
# Switch to cell shape+IDOF optimizer
calc.set(isif=4) | Typos/cosmetics and import BMEOS in tests. |
diff --git a/imageio/imageio-tiff/src/main/java/com/twelvemonkeys/imageio/plugins/tiff/YCbCrUpsamplerStream.java b/imageio/imageio-tiff/src/main/java/com/twelvemonkeys/imageio/plugins/tiff/YCbCrUpsamplerStream.java
index <HASH>..<HASH> 100644
--- a/imageio/imageio-tiff/src/main/java/com/twelvemonkeys/imageio/plugins/tiff/YCbCrUpsamplerStream.java
+++ b/imageio/imageio-tiff/src/main/java/com/twelvemonkeys/imageio/plugins/tiff/YCbCrUpsamplerStream.java
@@ -226,7 +226,7 @@ final class YCbCrUpsamplerStream extends FilterInputStream {
double lumaBlue = coefficients[2];
rgb[offset ] = clamp((int) Math.round(cr * (2 - 2 * lumaRed) + y));
- rgb[offset + 2] = clamp((int) Math.round(cb * (2 - 2 * lumaBlue) + y) - 128);
+ rgb[offset + 2] = clamp((int) Math.round(cb * (2 - 2 * lumaBlue) + y));
rgb[offset + 1] = clamp((int) Math.round((y - lumaRed * (rgb[offset] & 0xff) - lumaBlue * (rgb[offset + 2] & 0xff)) / lumaGreen));
} | TMI-TIFF: Minor bug introduced by testing.. |
diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php
+++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC6303Test.php
@@ -28,6 +28,7 @@ class DDC6303Test extends \Doctrine\Tests\OrmFunctionalTestCase
$contractA->originalData = $contractAData;
$contractB = new DDC6303ContractB();
+ //contractA and contractB have an inheritance from Contract, but one has a string originalData and the second has an array
$contractBData = ['accepted', 'authorized'];
$contractB->originalData = $contractBData;
@@ -61,7 +62,6 @@ class DDC6303Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
$contractStringEmptyData = '';
$contractStringZeroData = 0;
-
$contractArrayEmptyData = [];
$contractStringEmpty = new DDC6303ContractA();
@@ -151,4 +151,4 @@ class DDC6303ContractB extends DDC6303Contract
* @var array
*/
public $originalData;
-}
\ No newline at end of file
+} | clarified what's the problem in a comment |
diff --git a/src/Monolog/Handler/MandrillHandler.php b/src/Monolog/Handler/MandrillHandler.php
index <HASH>..<HASH> 100644
--- a/src/Monolog/Handler/MandrillHandler.php
+++ b/src/Monolog/Handler/MandrillHandler.php
@@ -24,7 +24,7 @@ class MandrillHandler extends MailHandler
protected $message;
/**
- * @oaram string $apiKey A valid Mandrill API key
+ * @param string $apiKey A valid Mandrill API key
* @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
* @param integer $level The minimum logging level at which this handler will be triggered
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not | Fixed a docblock typo in Mandrill handler |
diff --git a/src/com/zwitserloot/cmdreader/CmdReader.java b/src/com/zwitserloot/cmdreader/CmdReader.java
index <HASH>..<HASH> 100644
--- a/src/com/zwitserloot/cmdreader/CmdReader.java
+++ b/src/com/zwitserloot/cmdreader/CmdReader.java
@@ -308,9 +308,13 @@ public class CmdReader<T> {
sb.setLength(0);
if (p.equals("")) continue;
out.add(p);
+ continue;
}
+ sb.append(c);
}
+ if (sb.length() > 0) out.add(sb.toString());
+
return make(out.toArray(new String[out.size()]));
} | Bugfix; the make(String) version wasn't working at all, though I hadn't noticed until now because I always used make(String[]). |
diff --git a/lib/editor/tinymce/module.js b/lib/editor/tinymce/module.js
index <HASH>..<HASH> 100644
--- a/lib/editor/tinymce/module.js
+++ b/lib/editor/tinymce/module.js
@@ -80,20 +80,11 @@ M.editor_tinymce.onblur_event = function(ed) {
//have loaded contents and submitting form should not throw error.
ed.save();
- //Attach blur event for tinymce to call onchange validation function of textarea.
+ //Attach blur event for tinymce to save contents to textarea
var doc = s.content_editable ? ed.getBody() : (tinymce.isGecko ? ed.getDoc() : ed.getWin());
tinymce.dom.Event.add(doc, 'blur', function() {
//save contents to textarea before calling validation script.
ed.save();
- var element = document.getElementById(ed.id);
- element.onchange(element);
- });
-
- //Add an extra event to make sure after window is blurred because of user clicking
- //out of tinymce or any popup occured, then error should be cleaned on focusing back.
- tinymce.dom.Event.add(doc, 'focus', function() {
- var element = document.getElementById(ed.id);
- qf_errorHandler(element, '');
});
};
}; | MDL-<I> Forms Library: Removed onBlur validation. Now the validation will occur on form submit only |
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -30,6 +30,9 @@ module.exports = function(grunt) {
// Configuration to be run (and then tested).
responsive_images: {
+ options: {
+ engine: 'im'
+ },
default_options: {
options: {
}, | Changed tests to use ImageMagick as Travis-CI does not have GraphicsMagick installed |
diff --git a/container/utils/visibility.py b/container/utils/visibility.py
index <HASH>..<HASH> 100644
--- a/container/utils/visibility.py
+++ b/container/utils/visibility.py
@@ -91,7 +91,6 @@ def alternate_dev_formatter():
def with_memoized_loggers(logger, call_name, event_dict):
if logger.getEffectiveLevel() > logging.DEBUG:
return info_formatter(logger, call_name, event_dict)
- return standard(logger, call_name, event_dict)
return debugging(logger, call_name, event_dict)
return with_memoized_loggers | Remove useless statement (#<I>)
Thanks to pyflakes |
diff --git a/src/util/Util.js b/src/util/Util.js
index <HASH>..<HASH> 100644
--- a/src/util/Util.js
+++ b/src/util/Util.js
@@ -483,11 +483,11 @@ class Util extends null {
* @returns {Collection}
*/
static discordSort(collection) {
+ const isGuildChannel = collection.first() instanceof GuildChannel;
return collection.sorted(
- (a, b) =>
- a.rawPosition - b.rawPosition ||
- parseInt(b.id.slice(0, -10)) - parseInt(a.id.slice(0, -10)) ||
- parseInt(b.id.slice(10)) - parseInt(a.id.slice(10)),
+ isGuildChannel
+ ? (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(a.id) - BigInt(b.id))
+ : (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(b.id) - BigInt(a.id)),
);
}
@@ -616,3 +616,6 @@ class Util extends null {
}
module.exports = Util;
+
+// Fixes Circular
+const GuildChannel = require('../structures/GuildChannel'); | fix(Util): fix sorting for GuildChannels (#<I>) |
diff --git a/internal/goofys_test.go b/internal/goofys_test.go
index <HASH>..<HASH> 100644
--- a/internal/goofys_test.go
+++ b/internal/goofys_test.go
@@ -3998,3 +3998,28 @@ func (s *GoofysTest) TestIssue474(t *C) {
t.Assert(err, IsNil)
s.assertEntries(t, dir2, []string{"c"})
}
+
+func (s *GoofysTest) TestReadExternalChangesFuse(t *C) {
+ s.fs.flags.StatCacheTTL = 1 * time.Second
+
+ mountPoint := "/tmp/mnt" + s.fs.bucket
+
+ s.mount(t, mountPoint)
+ defer s.umount(t, mountPoint)
+
+ buf, err := ioutil.ReadFile(mountPoint + "/file1")
+ t.Assert(err, IsNil)
+ t.Assert(string(buf), Equals, "file1")
+
+ _, err = s.cloud.PutBlob(&PutBlobInput{
+ Key: "file1",
+ Body: bytes.NewReader([]byte("newfile")),
+ })
+ t.Assert(err, IsNil)
+
+ time.Sleep(1 * time.Second)
+
+ buf, err = ioutil.ReadFile(mountPoint + "/file1")
+ t.Assert(err, IsNil)
+ t.Assert(string(buf), Equals, "newfile")
+} | add a test for external changes after data is in page cache |
diff --git a/src/views/layouts/blank.php b/src/views/layouts/blank.php
index <HASH>..<HASH> 100644
--- a/src/views/layouts/blank.php
+++ b/src/views/layouts/blank.php
@@ -9,6 +9,7 @@
<?= Decoy::title() ?>
<meta name="viewport" content="width=device-width"/>
<meta name="csrf" content="<?=Session::getToken()?>"/>
+ <link rel="stylesheet" href="<?=HTML::grunt('/css/admin/vendor.css')?>"/>
<link rel="stylesheet" href="<?=HTML::grunt('/css/admin/style.css')?>"/>
<script src="/packages/bkwld/decoy/ckeditor/ckeditor.js"></script>
<script src="/packages/bkwld/decoy/ckfinder/ckfinder.js"></script> | Adding the new vendor.css to the login page |
diff --git a/internal/atlas/image.go b/internal/atlas/image.go
index <HASH>..<HASH> 100644
--- a/internal/atlas/image.go
+++ b/internal/atlas/image.go
@@ -576,6 +576,10 @@ func (i *Image) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte
backendsM.Lock()
defer backendsM.Unlock()
+ // In the tests, BeginFrame might not be called often and then images might not be disposed (#2292).
+ // To prevent memory leaks, resolve the deferred functions here.
+ resolveDeferred()
+
if i.backend == nil || i.backend.restorable == nil {
for i := range pixels {
pixels[i] = 0
diff --git a/internal/graphicsdriver/directx/graphics_windows.go b/internal/graphicsdriver/directx/graphics_windows.go
index <HASH>..<HASH> 100644
--- a/internal/graphicsdriver/directx/graphics_windows.go
+++ b/internal/graphicsdriver/directx/graphics_windows.go
@@ -778,6 +778,7 @@ func (g *Graphics) End(present bool) error {
if err := g.waitForCommandQueue(); err != nil {
return err
}
+ g.releaseResources(g.frameIndex)
g.releaseVerticesAndIndices(g.frameIndex)
} | internal/atlas: dispose images at ReadPixels
Without resolveDeferred() at ReadPixels, many images are never disposed
in tests.
Updates #<I> |
diff --git a/src/Network/Request.php b/src/Network/Request.php
index <HASH>..<HASH> 100644
--- a/src/Network/Request.php
+++ b/src/Network/Request.php
@@ -577,8 +577,10 @@ class Request implements ArrayAccess
{
if (strpos($name, 'is') === 0) {
$type = strtolower(substr($name, 2));
-
- return $this->is($type);
+
+ array_unshift($params, $type);
+
+ return call_user_func_array([$this, 'is'], $params);
}
throw new BadMethodCallException(sprintf('Method %s does not exist', $name));
} | fixed bug on `__call()` method |
diff --git a/tests/test_CK.py b/tests/test_CK.py
index <HASH>..<HASH> 100644
--- a/tests/test_CK.py
+++ b/tests/test_CK.py
@@ -19,5 +19,6 @@ class TestUtil(unittest.TestCase):
def test_CKR(self):
self.assertEqual(PyKCS11.CKR_VENDOR_DEFINED, 0x80000000)
+
if __name__ == '__main__':
unittest.main() | Fix pycodestyle errors
test_CK.py:<I>:1: E<I> expected 2 blank lines after class or function definition, found 1 |
diff --git a/userena/contrib/umessages/fields.py b/userena/contrib/umessages/fields.py
index <HASH>..<HASH> 100644
--- a/userena/contrib/umessages/fields.py
+++ b/userena/contrib/umessages/fields.py
@@ -12,7 +12,7 @@ class CommaSeparatedUserInput(widgets.Input):
value = ''
elif isinstance(value, (list, tuple)):
value = (', '.join([user.username for user in value]))
- return super().render(name, value, attrs, renderer)
+ return super(CommaSeparatedUserInput, self).render(name, value, attrs, renderer)
class CommaSeparatedUserField(forms.Field):
""" | Blank super is not allowed in Python <I>
Still supported by Django <I> |
diff --git a/about_time/about_time.py b/about_time/about_time.py
index <HASH>..<HASH> 100644
--- a/about_time/about_time.py
+++ b/about_time/about_time.py
@@ -106,3 +106,33 @@ class HandleResult(Handle):
@property
def result(self):
return self.__result
+
+
+class HandleStats(Handle):
+ def __init__(self, timings, count):
+ super().__init__(timings)
+ self.__count = count
+
+ @property
+ def count(self):
+ return self.__count
+
+ @property
+ def throughput(self):
+ return self.count / self.duration
+
+ @property
+ def throughput_human(self):
+ value = self.throughput
+ spec = (
+ (1. / 60, 60 * 60, 60, '/h'),
+ (1., 60, 60, '/m'),
+ )
+ for top, mult, size, unit in spec:
+ if value < top:
+ result = round(value * mult, ndigits=2)
+ if result < size:
+ return '{}{}'.format(result, unit)
+
+ result = round(value, ndigits=2)
+ return '{}{}'.format(result, '/s') | feat(*) new counter and throughput class |
diff --git a/lib/user_stream/version.rb b/lib/user_stream/version.rb
index <HASH>..<HASH> 100644
--- a/lib/user_stream/version.rb
+++ b/lib/user_stream/version.rb
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
module UserStream
- VERSION = "0.1.2"
+ VERSION = "1.0.0"
end | Version bump to <I>. |
diff --git a/channel.go b/channel.go
index <HASH>..<HASH> 100644
--- a/channel.go
+++ b/channel.go
@@ -569,9 +569,9 @@ acknowledgments from the consumers. This option is ignored when consumers are
started with noAck.
When global is true, these Qos settings apply to all existing and future
-consumers on all channels on the same connection. When false, the Qos
-settings will apply to all existing
-and future consumers on this channel.
+consumers on all channels on the same connection. When false, the Qos settings
+will apply to all existing and future consumers on this channel. RabbitMQ does
+not implement the global flag.
To get round-robin behavior between consumers consuming from the same queue on
different connections, set the prefetch count to 1, and the next available | Document that RabbitMQ does not support basic.qos#global
Closes #<I> |
diff --git a/src/widgets/koolphp/Table.tpl.php b/src/widgets/koolphp/Table.tpl.php
index <HASH>..<HASH> 100644
--- a/src/widgets/koolphp/Table.tpl.php
+++ b/src/widgets/koolphp/Table.tpl.php
@@ -78,7 +78,7 @@
<?php
$footerValue = "";
$method = strtolower(Utility::get($meta["columns"][$cKey], "footer"));
- if( in_array($method, array("sum","avg","min","max","mode")) ) {
+ if( in_array($method, array("count","sum","avg","min","max","mode")) ) {
$footerValue = Table::formatValue($this->dataStore->$method($cKey), $meta["columns"][$cKey]);
}
$footerText = Utility::get($meta["columns"][$cKey],"footerText"); | The footer doesn't show the "count" of a column in view of table widget. |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -22,19 +22,21 @@ module.exports = function(knex, options) {
var queries = [];
var watchQuery = function(query) {
- var start = process.hrtime();
- query.on('end', function() {
- var diff = process.hrtime(start);
- var ms = diff[0] * 1e3 + diff[1] * 1e-6;
- query.duration = ms.toFixed(3);
- queries.push(query);
- });
+ query._startTime = process.hrtime();
+ };
+
+ var recordQuery = function(query) {
+ var diff = process.hrtime(query._startTime);
+ var ms = diff[0] * 1e3 + diff[1] * 1e-6;
+ query.duration = ms.toFixed(3);
+ queries.push(query);
};
var logQuery = colored(function() {
res.removeListener('finish', logQuery);
res.removeListener('close', logQuery);
knex.client.removeListener('query', watchQuery);
+ knex.client.removeListener('end', recordQuery);
queries.forEach(function(query) {
var color = chalk.gray;
@@ -47,6 +49,7 @@ module.exports = function(knex, options) {
});
knex.client.on('query', watchQuery);
+ knex.client.on('end', recordQuery);
res.on('finish', logQuery);
res.on('close', logQuery); | More changes related to what could be incorporated into Knex. |
diff --git a/spec/ajax/helpers_spec.rb b/spec/ajax/helpers_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/ajax/helpers_spec.rb
+++ b/spec/ajax/helpers_spec.rb
@@ -18,6 +18,7 @@ context 'Ajax::UrlHelpers' do
it "should handle special characters" do
Ajax.hashed_url_from_traditional('/beyoncé').should == '/#/beyonc%C3%A9'
+ Ajax.hashed_url_from_traditional('/red hot').should == '/#/red%20hot'
end
DOMAINS.each do |domain|
@@ -35,6 +36,7 @@ context 'Ajax::UrlHelpers' do
it "should handle special characters" do
Ajax.hashed_url_from_fragment('/#/beyoncé').should == '/#/beyonc%C3%A9'
+ Ajax.hashed_url_from_fragment('/#/red hot').should == '/#/red%20hot'
end
it "should handle no fragment" do
@@ -102,6 +104,7 @@ context 'Ajax::UrlHelpers' do
it "should handle no fragment" do
Ajax.traditional_url_from_fragment('/Beyonce#/beyoncé').should == '/beyonc%C3%A9'
+ Ajax.traditional_url_from_fragment('/#/red hot').should == '/red%20hot'
end
it "should handle special characters" do | =added more tests to check for spaces |
diff --git a/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js b/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js
index <HASH>..<HASH> 100644
--- a/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js
+++ b/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js
@@ -68,11 +68,8 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/core/format/DateFormat', 'sap/ui/mod
this.bLengthFinal = true;
this.bDataAvailable = true;
} else {
- // call getLength when metadata is already loaded or don't do anything
- // if the the metadata gets loaded it will call a refresh on all bindings
- if (this.oModel.getServiceMetadata()) {
- this.resetData();
- }
+ //initial reset
+ this.resetData();
}
}, | [FIX] v2.ODataListBinding: initial reset error
- as metadata is loaded async, the initial reset does not happen,
so some internal properties are not initialized correctly.
Change-Id: I<I>a2c<I>c<I>bb6aee<I>b<I>e<I>a1bd8affd0b0 |
diff --git a/lib/global/base.rb b/lib/global/base.rb
index <HASH>..<HASH> 100644
--- a/lib/global/base.rb
+++ b/lib/global/base.rb
@@ -11,7 +11,7 @@ module Global
extend self
- attr_writer :environment, :config_directory, :namespace, :except, :only
+ attr_writer :environment, :config_directory, :namespace, :except, :only, :whitelist_classes
def configure
yield self
@@ -46,6 +46,10 @@ module Global
@only ||= []
end
+ def whitelist_classes
+ @whitelist_classes ||= []
+ end
+
def generate_js(options = {})
current_namespace = options[:namespace] || namespace
@@ -83,7 +87,8 @@ module Global
def load_yml_file(file)
YAML.safe_load(
ERB.new(IO.read(file)).result,
- [Date, Time, DateTime, Symbol], [], true
+ [Date, Time, DateTime, Symbol].concat(whitelist_classes),
+ [], true
)
end | Added whitelist_classes functionality in order to be able to whitelist your own classes |
diff --git a/test/basic.js b/test/basic.js
index <HASH>..<HASH> 100644
--- a/test/basic.js
+++ b/test/basic.js
@@ -420,6 +420,19 @@ function createDisableSymlinkDereferencingTest (opts) {
}
}
+test('camelCase de-kebab-cases known parameters', (t) => {
+ let opts = {
+ 'abc-def': true,
+ 'electron-version': '1.6.0'
+ }
+ common.camelCase(opts, false)
+ t.equal('1.6.0', opts.electronVersion, 'camelCased known property exists')
+ t.equal(undefined, opts['electron-version'], 'kebab-cased known property does not exist')
+ t.equal(undefined, opts.abcDef, 'camelCased unknown property does not exist')
+ t.equal(true, opts['abc-def'], 'kebab-cased unknown property exists')
+ t.end()
+})
+
test('validateListFromOptions does not take non-Array/String values', (t) => {
t.notOk(targets.validateListFromOptions({digits: 64}, {'64': true, '65': true}, 'digits') instanceof Array,
'should not be an Array') | Add test for the camelCase function |
diff --git a/src/Matrix.php b/src/Matrix.php
index <HASH>..<HASH> 100644
--- a/src/Matrix.php
+++ b/src/Matrix.php
@@ -287,11 +287,6 @@ class Matrix implements ArrayAccess
throw new MatrixException('Determinants can only be called on square matrices: ' . print_r($this->internal, true));
}
- // Base case for a 1 by 1 matrix
- if ($this->getRowCount() === 1) {
- return $this->get(0, 0);
- }
-
return $this->getLUDecomp()->determinant();
} | Get rid of optimization for an edge case that will almost never happen. |
diff --git a/src/Vimeo/Vimeo.php b/src/Vimeo/Vimeo.php
index <HASH>..<HASH> 100644
--- a/src/Vimeo/Vimeo.php
+++ b/src/Vimeo/Vimeo.php
@@ -393,6 +393,7 @@ class Vimeo
$curl_opts[CURLOPT_HTTPHEADER][] = 'Content-Range: bytes ' . $server_at . '-' . $size . '/' . $size;
fseek($file, $server_at); // Put the FP at the point where the server is.
+ $this->_request($url, $curl_opts); //Send what we can.
$progress_check = $this->_request($url, $curl_opts_check_progress); // Check on what the server has.
// Figure out how much is on the server.
@@ -402,11 +403,12 @@ class Vimeo
// Complete the upload on the server.
$completion = $this->request($ticket['body']['complete_uri'], array(), 'DELETE');
-
+
// Validate that we got back 201 Created
$status = (int) $completion['status'];
if ($status != 201) {
- throw new VimeoUploadException('Error completing the upload.');
+ $error = !empty($completion['body']['error']) ? '[' . $completion['body']['error'] . ']' : '';
+ throw new VimeoUploadException('Error completing the upload.'. $error);
}
// Furnish the location for the new clip in the API via the Location header. | Reinstate upload request. Append error message to VimeoUploadException. |
diff --git a/lib/fleetctl/command.rb b/lib/fleetctl/command.rb
index <HASH>..<HASH> 100644
--- a/lib/fleetctl/command.rb
+++ b/lib/fleetctl/command.rb
@@ -27,7 +27,7 @@ module Fleet
def prefix
# TODO: figure out a better way to avoid auth issues
- "eval `ssh-agent -s`; ssh-add >/dev/null 2>&1;"
+ "eval `ssh-agent -s` >/dev/null 2>&1; ssh-add >/dev/null 2>&1;"
end
def global_options
diff --git a/lib/fleetctl/version.rb b/lib/fleetctl/version.rb
index <HASH>..<HASH> 100644
--- a/lib/fleetctl/version.rb
+++ b/lib/fleetctl/version.rb
@@ -1,3 +1,3 @@
module Fleetctl
- VERSION = "0.0.2"
+ VERSION = "0.0.3"
end | piped stdout and stderr of running ssh-agent to /dev/null |
diff --git a/umis/umis.py b/umis/umis.py
index <HASH>..<HASH> 100644
--- a/umis/umis.py
+++ b/umis/umis.py
@@ -125,9 +125,11 @@ def transformer(chunk, read1_regex, read2_regex, paired):
@click.option('--minevidence', required=False, default=1.0, type=float)
@click.option('--cb_histogram', default=None)
@click.option('--cb_cutoff', default=0)
+@click.option('--cb_cutoff', default=0)
+@click.option('--no_scale_evidence', default=False, is_flag=True)
# @profile
def tagcount(sam, out, genemap, output_evidence_table, positional, minevidence,
- cb_histogram, cb_cutoff):
+ cb_histogram, cb_cutoff, no_scale_evidence):
''' Count up evidence for tagged molecules
'''
from pysam import AlignmentFile
@@ -191,7 +193,10 @@ def tagcount(sam, out, genemap, output_evidence_table, positional, minevidence,
e_tuple = tuple_template.format(CB, target_name, aln.pos, MB)
# Scale evidence by number of hits
- evidence[e_tuple] += weigh_evidence(aln.tags)
+ if no_scale_evidence:
+ evidence[e_tuple] += 1.0
+ else:
+ evidence[e_tuple] += weigh_evidence(aln.tags)
kept += 1
tally_time = time.time() - start_tally | Add option to turn off scaling of evidence with number of hits. |
diff --git a/kconfiglib.py b/kconfiglib.py
index <HASH>..<HASH> 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -6343,11 +6343,11 @@ _REL_TO_STR = {
GREATER_EQUAL: ">=",
}
-_INIT_SRCTREE_NOTE = """
+_INIT_SRCTREE_NOTE = """\
NOTE: Starting with Kconfiglib 10.0.0, the Kconfig filename passed to
Kconfig.__init__() is looked up relative to $srctree (which is set to '{}')
instead of relative to the working directory. Previously, $srctree only applied
to files being source'd within Kconfig files. This change makes running scripts
out-of-tree work seamlessly, with no special coding required. Sorry for the
backwards compatibility break!
-"""[1:]
+""" | Simplify _INIT_SRCTREE_NOTE definition |
diff --git a/schedula/utils/base.py b/schedula/utils/base.py
index <HASH>..<HASH> 100644
--- a/schedula/utils/base.py
+++ b/schedula/utils/base.py
@@ -70,7 +70,7 @@ class Base(object):
format=NONE, engine=NONE, encoding=NONE, graph_attr=NONE,
node_attr=NONE, edge_attr=NONE, body=NONE, node_styles=NONE,
node_data=NONE, node_function=NONE, edge_data=NONE, max_lines=NONE,
- max_width=NONE, directory=None, sites=None):
+ max_width=NONE, directory=None, sites=None, index=False):
"""
Plots the Dispatcher with a graph in the DOT language with Graphviz.
@@ -211,9 +211,9 @@ class Base(object):
if view:
directory = directory or tempfile.mkdtemp()
if sites is None:
- sitemap.render(directory=directory, view=True)
+ sitemap.render(directory=directory, view=True, index=index)
else:
- sites.add(sitemap.site(root_path=directory, view=True))
+ sites.add(sitemap.site(directory, view=True, index=index))
return sitemap
def get_node(self, *node_ids, node_attr=NONE): | feat(base): Add index option to plot. |
diff --git a/client/request.go b/client/request.go
index <HASH>..<HASH> 100644
--- a/client/request.go
+++ b/client/request.go
@@ -50,15 +50,6 @@ func (cli *Client) postRaw(ctx context.Context, path string, query url.Values, b
return cli.sendRequest(ctx, "POST", path, query, body, headers)
}
-// put sends an http request to the docker API using the method PUT.
-func (cli *Client) put(ctx context.Context, path string, query url.Values, obj interface{}, headers map[string][]string) (serverResponse, error) {
- body, headers, err := encodeBody(obj, headers)
- if err != nil {
- return serverResponse{}, err
- }
- return cli.sendRequest(ctx, "PUT", path, query, body, headers)
-}
-
// putRaw sends an http request to the docker API using the method PUT.
func (cli *Client) putRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers map[string][]string) (serverResponse, error) {
return cli.sendRequest(ctx, "PUT", path, query, body, headers) | client: remove put()
Apparently it is not used anywhere |
diff --git a/actionpack/lib/action_dispatch/middleware/debug_view.rb b/actionpack/lib/action_dispatch/middleware/debug_view.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_view.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_view.rb
@@ -58,11 +58,9 @@ module ActionDispatch
end
def params_valid?
- begin
- @request.parameters
- rescue ActionController::BadRequest
- false
- end
+ @request.parameters
+ rescue ActionController::BadRequest
+ false
end
end
end | Auto-correct `Style/RedundantBegin` offence
This offenced code is introduced from forward ported #<I>, since looks
like 6-0-stable branch isn't checked by CodeClimate. |
diff --git a/domain.go b/domain.go
index <HASH>..<HASH> 100644
--- a/domain.go
+++ b/domain.go
@@ -16,7 +16,6 @@ func UpdateRoutes(newRoutes []Route) {
// if im given a page for the route
// do not populate the proxies.
dom.Page = []byte(route.Page)
- continue
}
for _, url := range route.URLs {
prox := &Proxy{URL: url} | remove a typo that caused the system to ignore anything that had a
page in it |
diff --git a/src/EventsClient.js b/src/EventsClient.js
index <HASH>..<HASH> 100644
--- a/src/EventsClient.js
+++ b/src/EventsClient.js
@@ -4,7 +4,7 @@ import debug from './debug';
export default class EventsClient {
SEND_INTERVAL = 5;
QUEUE_SIZE = 10000;
- clientVersion = 'NodeJsClient/0.6.5';
+ clientVersion = 'NodeJsClient/0.6.6';
queue = [];
overLimit = false;
@@ -50,7 +50,6 @@ export default class EventsClient {
}
sendQueue() {
- console.log('Sent ' + this.queue.length );
if(this.queue.length === 0) return;
let sendQueue = this.queue;
this.queue = [];
diff --git a/src/PollingClient.js b/src/PollingClient.js
index <HASH>..<HASH> 100644
--- a/src/PollingClient.js
+++ b/src/PollingClient.js
@@ -4,7 +4,7 @@ import debug from './debug';
export default class PollingClient{
DEFAULT_TIMEOUT = 5 * 1000;
DEFAULT_INTERVAL = 10 * 1000;
- clientVersion = 'NodeJsClient/0.6.5';
+ clientVersion = 'NodeJsClient/0.6.6';
constructor(url, config, callback){
this.url = url; | <I>
Removed Verbose Log |
diff --git a/tests/utils/itutils.go b/tests/utils/itutils.go
index <HASH>..<HASH> 100644
--- a/tests/utils/itutils.go
+++ b/tests/utils/itutils.go
@@ -90,7 +90,7 @@ func doCurl(url string) ([]byte, error) {
defer response.Body.Close()
body, err := ioutil.ReadAll(response.Body)
- if !strings.Contains(string(body), "Powered by Deis") {
+ if !strings.Contains(string(body), "Powered by") {
return nil, fmt.Errorf("App not started (%d)\nBody: (%s)", response.StatusCode, string(body))
} | fix(tests): check for immovable response
"Deis" in "Powered by Deis" is configured by an environment variable
called $POWERED_BY. We should not be checking for Deis, as it can be
defined as something else. |
diff --git a/src/main/java/org/organicdesign/fp/collections/RrbTree.java b/src/main/java/org/organicdesign/fp/collections/RrbTree.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/organicdesign/fp/collections/RrbTree.java
+++ b/src/main/java/org/organicdesign/fp/collections/RrbTree.java
@@ -973,7 +973,7 @@ involves changing more nodes than maybe necessary.
private static final int HALF_STRICT_NODE_LENGTH = STRICT_NODE_LENGTH >> 1;
- // (MIN_NODE_LENGTH + MAX_NODE_LENGTH) / 2 should equal STRICT_NODE_LENGTH so that they have the
+ // (MIN_NODE_LENGTH + MAX_NODE_LENGTH) / 2 should equal STRICT_NODE_LENGTH so that they have roughly the
// same average node size to make the index interpolation easier.
private static final int MIN_NODE_LENGTH = (STRICT_NODE_LENGTH+1) * 2 / 3;
// Always check if less-than this. Never if less-than-or-equal. Cormen adds a -1 here and tests | Fixed comment for issue #<I> |
diff --git a/packages/dna-core/src/lib/proxy.js b/packages/dna-core/src/lib/proxy.js
index <HASH>..<HASH> 100644
--- a/packages/dna-core/src/lib/proxy.js
+++ b/packages/dna-core/src/lib/proxy.js
@@ -50,13 +50,11 @@ function proxyProto(proto, proxy) {
}
export function proxy(Component) {
- if (!(Component.prototype instanceof HTMLElement)) {
- Component.prototype = Object.create(
- Component.prototype,
- reduce(DOM_PROXY, (prototype, proxy) =>
- proxyProto(prototype, proxy), {}
- )
- );
- }
+ Component.prototype = Object.create(
+ Component.prototype,
+ reduce(DOM_PROXY, (prototype, proxy) =>
+ proxyProto(prototype, proxy), {}
+ )
+ );
return Component;
} | refactor: remove prototype control in proxy method |
diff --git a/Geometry/point.py b/Geometry/point.py
index <HASH>..<HASH> 100644
--- a/Geometry/point.py
+++ b/Geometry/point.py
@@ -190,13 +190,13 @@ class Point(object):
origin = cls(origin)
- t = 2.0 * math.pi * random.random()
+ t = (2.0 * math.pi) * random.random()
r = random.random() * random.random()
if r > 1:
r = 2 - r
- x = int(radius * r * math.cos(t) + origin.x)
- y = int(radius * r * math.sin(t) + origin.y)
+ x = int(((radius * r) * math.cos(t)) + origin.x)
+ y = int(((radius * r) * math.sin(t)) + origin.y)
return cls(x,y) | randomLocation sometimes misses the mark for origins != (0,0) |
diff --git a/resource/meta.go b/resource/meta.go
index <HASH>..<HASH> 100644
--- a/resource/meta.go
+++ b/resource/meta.go
@@ -370,10 +370,9 @@ func setupSetter(meta *Meta, fieldName string, record interface{}) {
foreignVersionField := indirectValue.FieldByName(foreignVersionName)
oldPrimaryKeys := utils.ToArray(foreignKeyField.Interface())
- // If field struct has version
- // ManagerID convert to ManagerVersionName. and get field value of it.
- // then construct ID+VersionName and compare with primarykey
- if fieldHasVersion && len(oldPrimaryKeys) != 0 {
+ // If field struct has version and it defined XXVersionName foreignKey field
+ // then construct ID+VersionName and compare with composite primarykey
+ if fieldHasVersion && len(oldPrimaryKeys) != 0 && foreignVersionField.IsValid() {
oldPrimaryKeys[0] = GenCompositePrimaryKey(oldPrimaryKeys[0], foreignVersionField.String())
} | Check foreignVersionField presence before construct composite old primaryKey. So it can work properly for other types of multiple foreign keys. |
diff --git a/lib/bolt/apply_result.rb b/lib/bolt/apply_result.rb
index <HASH>..<HASH> 100644
--- a/lib/bolt/apply_result.rb
+++ b/lib/bolt/apply_result.rb
@@ -57,7 +57,7 @@ module Bolt
msg = "Report result contains an '_output' key. Catalog application may have printed extraneous output to stdout: #{result['_output']}"
# rubocop:enable Layout/LineLength
else
- msg = "Report did not contain all expected keys missing: #{missing_keys.join(' ,')}"
+ msg = "Report did not contain all expected keys missing: #{missing_keys.join(', ')}"
end
{ 'msg' => msg, | (maint) Fix formatting for missing keys in apply report
This commit updates the missing keys error for an ApplyResult to format the list of missing keys with the correct separator.
!no-release-note |
diff --git a/nl/reminders.php b/nl/reminders.php
index <HASH>..<HASH> 100644
--- a/nl/reminders.php
+++ b/nl/reminders.php
@@ -21,6 +21,6 @@ return array(
"sent" => "Wachtwoord herinnering verzonden!",
- "reset" => "Password has been reset!",
+ "reset" => "Wachtwoord is veranderd!",
); | Update reminders.php
Added missing translation |
diff --git a/lib/fake_web/registry.rb b/lib/fake_web/registry.rb
index <HASH>..<HASH> 100644
--- a/lib/fake_web/registry.rb
+++ b/lib/fake_web/registry.rb
@@ -17,7 +17,7 @@ module FakeWeb
def register_uri(method, uri, options)
case uri
- when String
+ when URI, String
uri_map[normalize_uri(uri)][method] = [*[options]].flatten.collect do |option|
FakeWeb::Responder.new(method, uri, option, option[:times])
end | Fix that registration should still support URIs (caught by tests added in a<I>f<I>e<I>df<I>b3ebf9a<I>ca<I>af<I>f<I>) |
diff --git a/code/UserDefinedForm.php b/code/UserDefinedForm.php
index <HASH>..<HASH> 100755
--- a/code/UserDefinedForm.php
+++ b/code/UserDefinedForm.php
@@ -407,7 +407,7 @@ class UserDefinedForm_Controller extends Page_Controller {
// set the values passed by the url to the field
$request = $this->getRequest();
- $value = $request->getVar($field->name);
+ $value = Convert::raw2att($request->getVar($field->name));
if(isset($value)) $field->value = $value;
$fields->push($field); | MINOR - Added escaping for values passed by url params |
diff --git a/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java b/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
+++ b/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
@@ -302,6 +302,7 @@ final class S3ProxyHandler extends AbstractHandler {
"Conflict");
return;
}
+ response.setStatus(HttpServletResponse.SC_NO_CONTENT);
}
private void handleBlobList(HttpServletRequest request, | Emit HTTP <I> on successful bucket delete
Found with Ceph s3-tests. References #5. |
diff --git a/tests/acceptance/seller/ServerCest.php b/tests/acceptance/seller/ServerCest.php
index <HASH>..<HASH> 100644
--- a/tests/acceptance/seller/ServerCest.php
+++ b/tests/acceptance/seller/ServerCest.php
@@ -38,18 +38,12 @@ class ServerCest
Input::asAdvancedSearch($I, 'Name'),
Input::asAdvancedSearch($I, 'Internal note'),
Input::asAdvancedSearch($I, 'Order'),
- Input::asAdvancedSearch($I, 'DC'),
Input::asAdvancedSearch($I, 'IP'),
Select2::asAdvancedSearch($I, 'Client'),
Select2::asAdvancedSearch($I, 'Reseller'),
Input::asAdvancedSearch($I, 'HW summary'),
Select2::asAdvancedSearch($I, 'Type'),
Select2::asAdvancedSearch($I, 'Status'),
- Input::asAdvancedSearch($I, 'Switch'),
- Input::asAdvancedSearch($I, 'KVM'),
- Input::asAdvancedSearch($I, 'APC'),
- Input::asAdvancedSearch($I, 'Rack'),
- Input::asAdvancedSearch($I, 'MAC'),
Input::asAdvancedSearch($I, 'Tariff'),
Dropdown::asAdvancedSearch($I, 'Is wizzarded'),
]); | Updated seller/ServerCest according to the current access control |
diff --git a/src/UuidBinaryOrderedTimeType.php b/src/UuidBinaryOrderedTimeType.php
index <HASH>..<HASH> 100644
--- a/src/UuidBinaryOrderedTimeType.php
+++ b/src/UuidBinaryOrderedTimeType.php
@@ -22,7 +22,7 @@ class UuidBinaryOrderedTimeType extends Type
* @var string
*/
const NAME = 'uuid_binary_ordered_time';
-
+
/**
* @var string
*/
@@ -133,7 +133,7 @@ class UuidBinaryOrderedTimeType extends Type
*
* @return null|UuidFactory
*/
- private function getUuidFactory()
+ protected function getUuidFactory()
{
if (null === $this->factory) {
$this->factory = new UuidFactory();
@@ -142,7 +142,7 @@ class UuidBinaryOrderedTimeType extends Type
return $this->factory;
}
- private function getCodec()
+ protected function getCodec()
{
if (null === $this->codec) {
$this->codec = new OrderedTimeCodec( | getUuidFactory and getCodec as protected methods |
diff --git a/lib/arjdbc/mssql/limit_helpers.rb b/lib/arjdbc/mssql/limit_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/arjdbc/mssql/limit_helpers.rb
+++ b/lib/arjdbc/mssql/limit_helpers.rb
@@ -12,6 +12,14 @@ module ::ArJdbc
end
end
+ def get_primary_key(sql)
+ if sql =~ /.*\.(.*)/i
+ $1
+ else
+ 'id'
+ end
+ end
+
module SqlServer2000ReplaceLimitOffset
module_function
def replace_limit_offset!(sql, limit, offset, order)
@@ -31,7 +39,7 @@ module ::ArJdbc
rest = rest_of_query[/FROM/i=~ rest_of_query.. -1]
#need the table name for avoiding amiguity
table_name = LimitHelpers.get_table_name(sql)
- primary_key = order[/(\w*id\w*)/i] || "id"
+ primary_key = LimitHelpers.get_primary_key(order)
#I am not sure this will cover all bases. but all the tests pass
if order[/ORDER/].nil?
new_order = "ORDER BY #{order}, #{table_name}.#{primary_key}" if order.index("#{table_name}.#{primary_key}").nil? | add get primary key helper
get non-standard primary keys
get failing test to pass |
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -33,5 +33,9 @@ RSpec.configure do |config|
end
ActiveRecordObject.reset
DatamapperObject.reset
+
+ XapianDb.setup do |config|
+ config.adapter :generic
+ end
end
end | set generic adapter as default for specs |
diff --git a/astrobase/checkplotlist.py b/astrobase/checkplotlist.py
index <HASH>..<HASH> 100644
--- a/astrobase/checkplotlist.py
+++ b/astrobase/checkplotlist.py
@@ -102,6 +102,9 @@ def main(args=None):
sys.exit(2)
checkplotbasedir = args[2]
+
+ print('arglen = %s' % len(args))
+
if len(args) == 4:
fileglob = args[3]
else: | added file glob option to checkplotlist |
diff --git a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
+++ b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
@@ -595,13 +595,13 @@ public class DownloadLaunchRunnable implements Runnable, ProcessCallback {
}
private void realDownloadWithMultiConnectionFromResume(final int connectionCount,
- final List<ConnectionModel> connectionModelList)
+ List<ConnectionModel> modelList)
throws InterruptedException {
- if (connectionCount <= 1 || connectionModelList.size() != connectionCount) {
+ if (connectionCount <= 1 || modelList.size() != connectionCount) {
throw new IllegalArgumentException();
}
- fetchWithMultipleConnection(connectionModelList, model.getTotal());
+ fetchWithMultipleConnection(modelList, model.getTotal());
}
private void realDownloadWithMultiConnectionFromBeginning(final long totalLength, | chore: fix stylecheck failed on download-launch-runnable |
diff --git a/compiler/quilt/tools/command.py b/compiler/quilt/tools/command.py
index <HASH>..<HASH> 100644
--- a/compiler/quilt/tools/command.py
+++ b/compiler/quilt/tools/command.py
@@ -1330,7 +1330,11 @@ def load(pkginfo, hash=None):
"""
functional interface to "from quilt.data.USER import PKG"
"""
- return _load(pkginfo, hash)[0]
+ node, pkgroot, info = _load(pkginfo, hash)
+ for subnode_name in info.subpath:
+ node = node[subnode_name]
+
+ return node
def export(package, output_path='.', force=False, symlinks=False):
"""Export package file data. | Allow subpath loads by using `PackageInfo.subpath` to traverse the tree (#<I>) |
diff --git a/lib/middleware.js b/lib/middleware.js
index <HASH>..<HASH> 100644
--- a/lib/middleware.js
+++ b/lib/middleware.js
@@ -40,7 +40,9 @@ var middleware = function (logging){
yield next;
}
catch (e) {
- logging.error({"message": e});
+ if (!e.status || e.status.toString().match(/^5\d\d$/)) {
+ logging.error({"message": e});
+ }
throw e;
}
logging.perform({ | now if error.status is set and errror.status is not 5xx, do not print the error log since it is a simple NOT FOUND error |
diff --git a/lib/fog/hp/models/network/network.rb b/lib/fog/hp/models/network/network.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/hp/models/network/network.rb
+++ b/lib/fog/hp/models/network/network.rb
@@ -21,6 +21,10 @@ module Fog
true
end
+ def ready?
+ self.status == 'ACTIVE'
+ end
+
def save
identity ? update : create
end | [hp|network] Add a ready? method to the network model. |
diff --git a/Parsedown.php b/Parsedown.php
index <HASH>..<HASH> 100755
--- a/Parsedown.php
+++ b/Parsedown.php
@@ -432,7 +432,7 @@ class Parsedown
}
}
- # li
+ # li
if ($deindented_line[0] <= '9' and $deindented_line >= '0' and preg_match('/^([ ]*)\d+[.][ ](.*)/', $line, $matches))
{
@@ -483,7 +483,7 @@ class Parsedown
$elements []= $element;
- array_shift($elements);
+ unset($elements[0]);
#
# ~
@@ -491,7 +491,7 @@ class Parsedown
$markup = '';
- foreach ($elements as $index => $element)
+ foreach ($elements as $element)
{
switch ($element['type'])
{
@@ -501,7 +501,7 @@ class Parsedown
$text = preg_replace('/[ ]{2}\n/', '<br />'."\n", $text);
- if ($context === 'li' and $index === 0)
+ if ($context === 'li' and $markup === '')
{
if (isset($element['interrupted']))
{ | array_shift » unset to simplify code base and improve performance |
diff --git a/src/sortable.js b/src/sortable.js
index <HASH>..<HASH> 100644
--- a/src/sortable.js
+++ b/src/sortable.js
@@ -324,7 +324,7 @@ angular.module('ui.sortable', [])
// the value will be overwritten with the old value
if(!ui.item.sortable.received) {
ui.item.sortable.dropindex = getItemIndex(ui.item);
- var droptarget = ui.item.closest('[ui-sortable]');
+ var droptarget = ui.item.closest('[ui-sortable], [data-ui-sortable], [x-ui-sortable]');
ui.item.sortable.droptarget = droptarget;
ui.item.sortable.droptargetList = ui.item.parent(); | fix(sortable): restore support for data-ui-sortable declaration |
diff --git a/serenata_toolbox/chamber_of_deputies/reimbursements_cleaner.py b/serenata_toolbox/chamber_of_deputies/reimbursements_cleaner.py
index <HASH>..<HASH> 100644
--- a/serenata_toolbox/chamber_of_deputies/reimbursements_cleaner.py
+++ b/serenata_toolbox/chamber_of_deputies/reimbursements_cleaner.py
@@ -130,8 +130,8 @@ class ReimbursementsCleaner:
def aggregate_multiple_payments(self):
self.data = pd.concat([
self._house_payments(),
- self._non_house_payments(),
- ])
+ self._non_house_payments()
+ ], sort=False)
def save(self):
file_path = os.path.join(self.path, f'reimbursements-{self.year}.csv') | Add sort argument to Pandas concat
Following a warning regarding new behavior:
In a future version of pandas pandas.concat() will no longer sort the non-concatenation axis when it is not already aligned. |
diff --git a/tests/jenkins.py b/tests/jenkins.py
index <HASH>..<HASH> 100644
--- a/tests/jenkins.py
+++ b/tests/jenkins.py
@@ -44,7 +44,7 @@ def run(platform, provider, commit, clean):
htag = hashlib.md5(str(random.randint(1, 100000000))).hexdigest()[:6]
vm_name = 'ZZZ-{0}-{1}'.format(platform, htag)
cmd = ('salt-cloud -l debug --script-args "-D -n git {0}" '
- '--start-action "-t 1800 state.sls testrun '
+ '--start-action "state.sls testrun '
'pillar=\'{{git_commit: {0}}}\' --no-color" -p {1}_{2} {3}'.format(
commit, provider, platform, vm_name)
) | `salt-call` does not support `timeout` |
diff --git a/lib/pkgcloud/azure/compute/client/index.js b/lib/pkgcloud/azure/compute/client/index.js
index <HASH>..<HASH> 100644
--- a/lib/pkgcloud/azure/compute/client/index.js
+++ b/lib/pkgcloud/azure/compute/client/index.js
@@ -37,8 +37,12 @@ var Client = exports.Client = function (options) {
// The https agent is used by request for authenticating TLS/SSL https calls
if (this.protocol === 'https://') {
- this.before.push(function(req, options) {
- req.agent = new https.Agent({host: this.serversUrl, key: options.key, cert: options.cert});
+ this.before.push(function (req) {
+ req.agent = new https.Agent({
+ host: this.serversUrl,
+ key: options.key,
+ cert: options.cert
+ });
});
}
}; | [fix] Use `options` passed to constructor, not `before` |
diff --git a/features/redshift/step_definitions/redshift.js b/features/redshift/step_definitions/redshift.js
index <HASH>..<HASH> 100644
--- a/features/redshift/step_definitions/redshift.js
+++ b/features/redshift/step_definitions/redshift.js
@@ -26,14 +26,13 @@ module.exports = function() {
});
this.Given(/^I describe Redshift cluster security groups$/, function(callback) {
- this.request(null, 'describeClusterSecurityGroups', {}, callback);
+ var params = {ClusterSecurityGroupName: this.clusterGroupName};
+ this.request(null, 'describeClusterSecurityGroups', params, callback);
});
this.Then(/^the Redshift cluster security group should be in the list$/, function(callback) {
- var groupName = this.clusterGroupName;
- this.assert.contains(this.data.ClusterSecurityGroups, function(item) {
- return item.ClusterSecurityGroupName === groupName;
- });
+ var item = this.data.ClusterSecurityGroups[0];
+ this.assert.equal(item.ClusterSecurityGroupName, this.clusterGroupName);
callback();
}); | Update Redshift test to only describe one cluster security group |
diff --git a/tests/record_test.py b/tests/record_test.py
index <HASH>..<HASH> 100644
--- a/tests/record_test.py
+++ b/tests/record_test.py
@@ -271,8 +271,8 @@ def test_nested_create_serialize():
node = Node(applications=[Application(name=u'myapp', image=u'myimage'),
Application(name=u'b', image=u'c')])
- node2 = Node.create({'applications': [{'name': u'myapp', 'image': u'myimage'},
- {'name': u'b', 'image': u'c'}]})
+ node2 = Node.create({u'applications': [{u'name': u'myapp', u'image': u'myimage'},
+ {u'name': u'b', u'image': u'c'}]})
assert node == node2 | Fix test failing due to Py <I> unicode incompatibility |
diff --git a/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java b/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java
index <HASH>..<HASH> 100644
--- a/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java
+++ b/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java
@@ -188,7 +188,7 @@ public abstract class AbstractTable<T> {
}
private void initializeIndexes() throws SQLException {
- for (Index index : indexes) {
+ for (Index<T> index : indexes) {
index.initialize();
}
}
@@ -221,7 +221,7 @@ public abstract class AbstractTable<T> {
insertStatement.close();
selectMaxIdStatement.close();
clearStatement.close();
- for (Index index : indexes) {
+ for (Index<T> index : indexes) {
index.closeStatements();
}
}
@@ -509,9 +509,7 @@ public abstract class AbstractTable<T> {
while (true) {
for (Map.Entry<String, PropertyInterface> entry : columns.entrySet()) {
String columnFieldPath = entry.getValue().getFieldPath();
- System.out.println("Try: " + columnFieldPath);
if (columnFieldPath.equals(fieldPath)) {
- System.out.println("Found!");
return entry;
}
} | AbstractTable: removed some debug code |
diff --git a/salt/states/locale.py b/salt/states/locale.py
index <HASH>..<HASH> 100644
--- a/salt/states/locale.py
+++ b/salt/states/locale.py
@@ -6,7 +6,7 @@ The locale can be managed for the system:
.. code-block:: yaml
- us:
+ en_US.UTF-8:
locale.system
''' | Change example to actually use a valid locale |
diff --git a/lib/spork/run_strategy.rb b/lib/spork/run_strategy.rb
index <HASH>..<HASH> 100644
--- a/lib/spork/run_strategy.rb
+++ b/lib/spork/run_strategy.rb
@@ -28,7 +28,11 @@ class Spork::RunStrategy
protected
def self.factory(test_framework)
- Spork::RunStrategy::Forking.new(test_framework)
+ if Spork::RunStrategy::Forking.available?
+ Spork::RunStrategy::Forking.new(test_framework)
+ else
+ Spork::RunStrategy::Magazine.new(test_framework)
+ end
end
def self.inherited(subclass) | Use magazine strategy if forking not available.
TODO: add check for JRuby. It will NOT work with magazine. |
diff --git a/forms/gridfield/GridField.php b/forms/gridfield/GridField.php
index <HASH>..<HASH> 100644
--- a/forms/gridfield/GridField.php
+++ b/forms/gridfield/GridField.php
@@ -840,7 +840,8 @@ class GridField_FormAction extends FormAction {
'args' => $this->args,
);
- $id = substr(md5(serialize($state)), 0, 8);
+ // Ensure $id doesn't contain only numeric characters
+ $id = 'gf_'.substr(md5(serialize($state)), 0, 8);
Session::set($id, $state);
$actionData['StateID'] = $id; | BUG Fix gridfield generating invalid session keys |
diff --git a/test_utilities/src/d1_test/instance_generator/access_policy.py b/test_utilities/src/d1_test/instance_generator/access_policy.py
index <HASH>..<HASH> 100644
--- a/test_utilities/src/d1_test/instance_generator/access_policy.py
+++ b/test_utilities/src/d1_test/instance_generator/access_policy.py
@@ -91,11 +91,15 @@ def random_subject_list_with_permission_labels(
return subjects
-def random_subject_list(min_len=1, max_len=10, group_chance=0.1):
+def random_subject_list(min_len=1, max_len=10, fixed_len=None, symbolic_chance=0.1, group_chance=0.1):
+ """Return a list of random subjects.
+ Subjects are regular, on the form ``subj_xx``, group subjects on form
+ ``subj_xx_group`` or one of the ``public``, ``verifiedUser`` or
+ ``authenticatedUser`` symbolic subjects.
+ """
return [
- 'subj_{}{}'.format(
- d1_test.instance_generator.random_data.random_lower_ascii(),
- '_group' if random.random() <= group_chance else '',
+ d1_test.instance_generator.random_data.random_regular_or_symbolic_subj(
+ min_len, max_len, fixed_len, symbolic_chance, group_chance
)
for _ in range(random.randint(min_len, max_len))
] | Randomly include symbolic subjects when generating test subject strings |
diff --git a/django_cms_tools/filer_tools/management/commands/replace_broken.py b/django_cms_tools/filer_tools/management/commands/replace_broken.py
index <HASH>..<HASH> 100644
--- a/django_cms_tools/filer_tools/management/commands/replace_broken.py
+++ b/django_cms_tools/filer_tools/management/commands/replace_broken.py
@@ -32,10 +32,11 @@ class Command(BaseCommand):
def handle(self, *args, **options):
self.verbosity = int(options.get('verbosity'))
- # e.g.: Parler models needs activated translations:
- language_code = settings.LANGUAGE_CODE
- self.stdout.write("activate %r translations." % language_code)
- translation.activate(language_code)
+ if settings.USE_I18N:
+ # e.g.: Parler models needs activated translations:
+ language_code = settings.LANGUAGE_CODE
+ self.stdout.write("activate %r translations." % language_code)
+ translation.activate(language_code)
self.stdout.write("settings.FILER_IMAGE_MODEL: %r" % settings.FILER_IMAGE_MODEL) | activate translations only if USE_I<I>N is True |
diff --git a/src/js/components/Tabs/Tabs.js b/src/js/components/Tabs/Tabs.js
index <HASH>..<HASH> 100644
--- a/src/js/components/Tabs/Tabs.js
+++ b/src/js/components/Tabs/Tabs.js
@@ -20,6 +20,7 @@ const Tabs = forwardRef(
flex,
justify = 'center',
messages = { tabContents: 'Tab Contents' },
+ responsive = true,
...rest
},
ref,
@@ -82,6 +83,7 @@ const Tabs = forwardRef(
as={Box}
role="tablist"
flex={flex}
+ responsive={responsive}
{...rest}
background={theme.tabs.background}
> | Fixed Tabs to be more responsive (#<I>)
* changed styledtabs to box
* added responsive to tabs
* updated yarn lock
* updated snapshot
* organized imports |
diff --git a/hawtio-embedded/src/main/java/io/hawt/embedded/Main.java b/hawtio-embedded/src/main/java/io/hawt/embedded/Main.java
index <HASH>..<HASH> 100644
--- a/hawtio-embedded/src/main/java/io/hawt/embedded/Main.java
+++ b/hawtio-embedded/src/main/java/io/hawt/embedded/Main.java
@@ -90,7 +90,7 @@ public class Main {
webapp.setExtraClasspath(options.getExtraClassPath());
// lets set a temporary directory so jetty doesn't bork if some process zaps /tmp/*
- String homeDir = System.getProperty("user.home", ".") + "/.hawtio";
+ String homeDir = System.getProperty("user.home", ".") + System.getProperty("hawtio.dirname", "/.hawtio");
String tempDirPath = homeDir + "/tmp";
File tempDir = new File(tempDirPath);
tempDir.mkdirs(); | #<I> - made hawtio home dirname configurable via sys prop |
diff --git a/src/GitHub_Updater/Base.php b/src/GitHub_Updater/Base.php
index <HASH>..<HASH> 100644
--- a/src/GitHub_Updater/Base.php
+++ b/src/GitHub_Updater/Base.php
@@ -596,12 +596,16 @@ class Base {
$wp_filesystem->move( $source, $new_source );
if ( 'github-updater' === $slug ) {
- $this->delete_all_transients();
+ add_action( 'upgrader_process_complete', array( &$this, 'upgrader_process_complete'), 15 );
}
-
+
return trailingslashit( $new_source );
}
+ public function upgrader_process_complete() {
+ $this->delete_all_transients();
+ }
+
/**
* Delete $source when updating from GitLab Release Asset.
* | delete transients in upgrader_process_complete
for GHU updates |
diff --git a/src/petl/test/test_util.py b/src/petl/test/test_util.py
index <HASH>..<HASH> 100644
--- a/src/petl/test/test_util.py
+++ b/src/petl/test/test_util.py
@@ -21,7 +21,10 @@ def test_header():
actual = header(table)
expect = ('foo', 'bar')
eq_(expect, actual)
-
+ table = (['foo', 'bar'], ['a', 1], ['b', 2])
+ actual = header(table)
+ eq_(expect, actual)
+
def test_fieldnames():
table = (('foo', 'bar'), ('a', 1), ('b', 2))
diff --git a/src/petl/util.py b/src/petl/util.py
index <HASH>..<HASH> 100644
--- a/src/petl/util.py
+++ b/src/petl/util.py
@@ -65,7 +65,7 @@ def header(table):
"""
it = iter(table)
- return it.next()
+ return tuple(it.next())
def fieldnames(table): | closes #<I> by ensuring header() always returns a tuple |
diff --git a/pandocxnos/core.py b/pandocxnos/core.py
index <HASH>..<HASH> 100644
--- a/pandocxnos/core.py
+++ b/pandocxnos/core.py
@@ -1122,10 +1122,10 @@ def insert_secnos_factory(f):
if key == name:
# Only insert if attributes are attached. Images always have
- # attributes for pandoc >= 1.16.
+ # attributes for pandoc >= 1.16. Same for Spans.
assert len(value) <= n+1
if (name == 'Image' and len(value) == 3) or name == 'Div' or \
- len(value) == n+1:
+ name == 'Span' or len(value) == n+1:
# Make sure value[0] represents attributes
assert isinstance(value[0][0], STRTYPES)
assert isinstance(value[0][1], list)
@@ -1152,11 +1152,11 @@ def delete_secnos_factory(f):
"""Deletes section numbers from elements attributes."""
# Only delete if attributes are attached. Images always have
- # attributes for pandoc >= 1.16.
+ # attributes for pandoc >= 1.16. Same for Spans.
if key == name:
assert len(value) <= n+1
if (name == 'Image' and len(value) == 3) or name == 'Div' or \
- len(value) == n+1:
+ name == 'Span' or len(value) == n+1:
# Make sure value[0] represents attributes
assert isinstance(value[0][0], STRTYPES) | support insertion and deletion of secnos for Span elements
required for pandoc-theoremnos |
diff --git a/lib/rfd.rb b/lib/rfd.rb
index <HASH>..<HASH> 100644
--- a/lib/rfd.rb
+++ b/lib/rfd.rb
@@ -38,7 +38,7 @@ module Rfd
end
def D
- File.delete current_item.path
+ FileUtils.rm_rf current_item.path
ls
end | D should be able to rm directories as well |
diff --git a/datasette/utils.py b/datasette/utils.py
index <HASH>..<HASH> 100644
--- a/datasette/utils.py
+++ b/datasette/utils.py
@@ -244,7 +244,7 @@ def temporary_heroku_directory(files, name, metadata, extra_options, branch, tem
if metadata_content:
open('metadata.json', 'w').write(json.dumps(metadata_content, indent=2))
- open('runtime.txt', 'w').write('python-3.6.2')
+ open('runtime.txt', 'w').write('python-3.6.3')
if branch:
install_from = 'https://github.com/simonw/datasette/archive/{branch}.zip'.format( | Deploy to Heroku with Python <I>
Heroku deploys are currently showing the following warning:
The latest version of Python 3 is python-<I> (you are using python-<I>, which is unsupported).
We recommend upgrading by specifying the latest version (python-<I>). |
diff --git a/code/model/ShopMember.php b/code/model/ShopMember.php
index <HASH>..<HASH> 100644
--- a/code/model/ShopMember.php
+++ b/code/model/ShopMember.php
@@ -56,7 +56,7 @@ class ShopMember extends DataObjectDecorator {
}
$existingmember = self::get_by_identifier($data[Member::get_unique_identifier_field()]);
if($existingmember && $existingmember->exists()){
- if(Member::currentUserID() != $existingUniqueMember->ID) {
+ if(Member::currentUserID() != $existingmember->ID) {
return false;
}
} | BUG: fixed typo in ShopMember create_or_merge function |
diff --git a/datadotworld/datadotworld.py b/datadotworld/datadotworld.py
index <HASH>..<HASH> 100644
--- a/datadotworld/datadotworld.py
+++ b/datadotworld/datadotworld.py
@@ -22,7 +22,7 @@ from __future__ import absolute_import
import shutil
from datetime import datetime
from os import path
-from warnings import warn
+from warnings import warn, filterwarnings
import numbers
import requests
@@ -186,6 +186,8 @@ class DataDotWorld(object):
move_cache_dir_to_backup_dir(backup_dir, cache_dir)
descriptor_file = self.api_client.download_datapackage(dataset_key, cache_dir)
else:
+ filterwarnings('always',
+ message='You are using an outdated copy')
warn('You are using an outdated copy of {}. '
'If you wish to use the latest version, call this '
'function with the argument ' | Add filter to always show warnings of invalidated dataset (#<I>)
* Add warning filter to always show warnings of invalidated dataset
* Always show warning entry that matches message |
diff --git a/src/draw/steps.js b/src/draw/steps.js
index <HASH>..<HASH> 100644
--- a/src/draw/steps.js
+++ b/src/draw/steps.js
@@ -279,12 +279,13 @@ d3plus.draw.steps = function(vars) {
}
return vars.color.key && vars.color.type == "number" &&
- vars.data.value && vars.color.key != vars.id.key &&
- (vars.color.changed || vars.data.changed || vars.depth.changed ||
- (vars.time.fixed.value &&
- (vars.time.solo.changed || vars.time.mute.changed)
- )
- )
+ vars.id.nesting.indexOf(vars.color.key) < 0 &&
+ vars.data.value && vars.color.key != vars.id.key &&
+ (vars.color.changed || vars.data.changed || vars.depth.changed ||
+ (vars.time.fixed.value &&
+ (vars.time.solo.changed || vars.time.mute.changed)
+ )
+ )
},
"function": d3plus.data.color, | fixed bug where coloring by an integer ID would result in a color scale rather than boxes |
diff --git a/helpers/tools.php b/helpers/tools.php
index <HASH>..<HASH> 100644
--- a/helpers/tools.php
+++ b/helpers/tools.php
@@ -100,6 +100,36 @@ if (!function_exists('returnBytes')) {
// --------------------------------------------------------------------------
+if (!function_exists('maxUploadSize')) {
+
+ /**
+ * Returns the configured maximum upload size for this system by inspecting
+ * upload_max_filesize and post_max_size, if available.
+ * @param boolean $bFormat Whether to format the string using formatBytes
+ * @return integer|string
+ */
+ function maxUploadSize($bFormat = true)
+ {
+ if (function_exists('ini_get')) {
+
+ $aMaxSizes = array(
+ returnBytes(ini_get('upload_max_filesize')),
+ returnBytes(ini_get('post_max_size'))
+ );
+
+ $iMaxSize = min($aMaxSizes);
+
+ return $bFormat ? formatBytes($iMaxSize) : $iMaxSize;
+
+ } else {
+
+ return null;
+ }
+ }
+}
+
+// --------------------------------------------------------------------------
+
if (!function_exists('stringToBoolean')) {
/** | Added helper for working out the maximum upload size available to the system |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
import sys
-from setuptools import setup
+from setuptools import setup, find_packages
from distutils.extension import Extension
import numpy
import versioneer
@@ -30,20 +30,8 @@ setup(
],
},
install_requires=requires + more_requires,
- packages=[
- 'scanpy',
- 'scanpy.tools',
- 'scanpy.compat',
- 'scanpy.examples',
- 'scanpy.preprocess',
- 'scanpy.classes',
- 'scanpy.sim_models',
- 'scanpy.cython',
- ],
+ packages=find_packages(exclude=['scripts', 'scripts.*']),
include_dirs=[numpy.get_include()],
- # cmdclass={
- # 'build_ext': build_ext,
- # },
cmdclass=versioneer.get_cmdclass({'build_ext': build_ext}),
ext_modules=[
Extension("scanpy.cython.utils_cy", | use find_packages to avoid errors
(such as the preprocess → preprocessing rename) |
diff --git a/src/Arvici/Heart/Http/Response.php b/src/Arvici/Heart/Http/Response.php
index <HASH>..<HASH> 100644
--- a/src/Arvici/Heart/Http/Response.php
+++ b/src/Arvici/Heart/Http/Response.php
@@ -187,6 +187,7 @@ class Response
*/
public function json($object, $pretty = false)
{
+ $this->header('Content-Type', 'application/json');
return $this->body(json_encode($object, $pretty ? JSON_PRETTY_PRINT : 0));
}
diff --git a/tests/app/App/Config/Template.php b/tests/app/App/Config/Template.php
index <HASH>..<HASH> 100644
--- a/tests/app/App/Config/Template.php
+++ b/tests/app/App/Config/Template.php
@@ -51,6 +51,11 @@ Configuration::define('template', function() {
View::bodyPlaceholder(),
View::body('testContent'),
View::template('testFooter')
+ ],
+ 'test-basicrender' => [
+ View::template('testHeader'),
+ View::bodyPlaceholder(),
+ View::template('testFooter')
]
],
]; | Small fix in response json encoder. |
diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/associations/preloader.rb
+++ b/activerecord/lib/active_record/associations/preloader.rb
@@ -112,10 +112,10 @@ module ActiveRecord
end
def preload_hash(association)
- association.each do |parent, child|
- Preloader.new(records, parent, preload_scope).run
+ association.flat_map { |parent, child|
+ preload_one parent
Preloader.new(records.map { |record| record.send(parent) }.flatten, child).run
- end
+ }
end
# Not all records have the same class, so group then preload group on the reflection | lhs preload is always a single preload, so just preload one |
diff --git a/scope/__init__.py b/scope/__init__.py
index <HASH>..<HASH> 100644
--- a/scope/__init__.py
+++ b/scope/__init__.py
@@ -3,7 +3,7 @@
""" Spectral Comparison and Parameter Evaluation """
__author__ = "Andy Casey <arc@ast.cam.ac.uk>"
-__version__ = "0.08"
+__version__ = "0.081"
__all__ = ["config", "Model", "specutils", "Spectrum", "utils"]
diff --git a/scope/analysis.py b/scope/analysis.py
index <HASH>..<HASH> 100644
--- a/scope/analysis.py
+++ b/scope/analysis.py
@@ -444,7 +444,7 @@ def solve(observed_spectra, model, initial_guess=None):
# Blobs contain all the sampled parameters and likelihoods
sampled = np.array(sampler.blobs).reshape((-1, len(model.dimensions) + 1))
- sampled = sampled[-int(model.configuration["solver"]["walkers"] * model.configuration["solver"]["sample"]):]
+ sampled = sampled[-int(model.configuration["solver"]["walkers"] * model.configuration["solver"]["sample"] * 0.5):]
sampled_theta, sampled_log_likelihood = sampled[:, :-1], sampled[:, -1]
# Get the maximum estimate | assume first half of sampling post-burn in is junk |
diff --git a/python/mxnet/contrib/amp/lists/symbol.py b/python/mxnet/contrib/amp/lists/symbol.py
index <HASH>..<HASH> 100644
--- a/python/mxnet/contrib/amp/lists/symbol.py
+++ b/python/mxnet/contrib/amp/lists/symbol.py
@@ -340,7 +340,6 @@ FP16_FP32_FUNCS = [
'take',
'tanh',
'tile',
- 'topk',
'transpose',
'trunc',
'uniform',
@@ -463,6 +462,7 @@ FP32_FUNCS = [
'_sparse_norm',
'_sparse_rsqrt',
'argsort',
+ 'topk',
# Neural network
'SoftmaxOutput', | [AMP] Move topk from FP<I>_FP<I>_FUNCS to FP<I>_FUNCS (#<I>) |
diff --git a/lib/rakuten_web_service/books/genre.rb b/lib/rakuten_web_service/books/genre.rb
index <HASH>..<HASH> 100644
--- a/lib/rakuten_web_service/books/genre.rb
+++ b/lib/rakuten_web_service/books/genre.rb
@@ -47,6 +47,10 @@ module RakutenWebService
repository[id] = genre
end
+ def children
+ return @params['children']
+ end
+
private
def self.repository
@repository ||= {}
diff --git a/spec/rakuten_web_service/books/genre_spec.rb b/spec/rakuten_web_service/books/genre_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rakuten_web_service/books/genre_spec.rb
+++ b/spec/rakuten_web_service/books/genre_spec.rb
@@ -84,4 +84,17 @@ describe RWS::Books::Genre do
RWS::Books::Genre.root
end
end
+
+ describe '#children' do
+ before do
+ @genre = RWS::Books::Genre.search(:booksGenreId => genre_id).first
+ end
+
+ specify 'are Books::Genre objects' do
+ expect(@genre.children).to be_all { |child| child.is_a? RWS::Books::Genre }
+ expect(@genre.children).to be_all do |child|
+ expected_json['children'].is_any? { |c| c['booksGenreId'] == child['booksGenreId'] }
+ end
+ end
+ end
end | RWS::Books::Genre#children returns Genre objects under the genre |
diff --git a/lib/protocol/SFTP.js b/lib/protocol/SFTP.js
index <HASH>..<HASH> 100644
--- a/lib/protocol/SFTP.js
+++ b/lib/protocol/SFTP.js
@@ -2259,7 +2259,7 @@ function readAttrs(biOpt) {
function sendOrBuffer(sftp, payload) {
const ret = tryWritePayload(sftp, payload);
if (ret !== undefined) {
- sftp._buffer.push(payload);
+ sftp._buffer.push(ret);
return false;
}
return true; | SFTP: fix incorrect outgoing data buffering |
diff --git a/src/views/hub/options.php b/src/views/hub/options.php
index <HASH>..<HASH> 100644
--- a/src/views/hub/options.php
+++ b/src/views/hub/options.php
@@ -6,6 +6,7 @@
use hipanel\helpers\Url;
+use hipanel\modules\server\widgets\combo\ServerCombo;
use hipanel\widgets\PasswordInput;
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Html;
@@ -34,8 +35,10 @@ $this->params['breadcrumbs'][] = $this->title;
</div>
<div class="col-md-4">
<?= $form->field($model, 'ports_num') ?>
- <?= $form->field($model, 'traf_server_id') ?>
- <?= $form->field($model, 'vlan_server_id') ?>
+ <?= $form->field($model, 'traf_server_id')->widget(ServerCombo::class, [
+ 'pluginOptions' => [],
+ ]) ?>
+ <?= $form->field($model, 'vlan_server_id')->widget(ServerCombo::class) ?>
<?= $form->field($model, 'community') ?>
</div>
<div class="col-md-4"> | Added ServerCombo to optison form in Hub |
diff --git a/js/bitfinex.js b/js/bitfinex.js
index <HASH>..<HASH> 100644
--- a/js/bitfinex.js
+++ b/js/bitfinex.js
@@ -503,10 +503,14 @@ module.exports = class bitfinex extends Exchange {
}
let query = this.omit (params, this.extractParams (path));
let url = this.urls['api'] + request;
- if (api == 'public') {
- if (Object.keys (query).length)
- url += '?' + this.urlencode (query);
- } else {
+ if ((api == 'public') || (path == 'orders/hist')) {
+ if (Object.keys (query).length) {
+ let suffix = '?' + this.urlencode (query);
+ url += suffix;
+ request += suffix;
+ }
+ }
+ if (api == 'private') {
let nonce = this.nonce ();
query = this.extend ({
'nonce': nonce.toString (), | fixed bitfinex fetch_closed_order limit |
diff --git a/sprd/view/svg/ConfigurationViewerClass.js b/sprd/view/svg/ConfigurationViewerClass.js
index <HASH>..<HASH> 100644
--- a/sprd/view/svg/ConfigurationViewerClass.js
+++ b/sprd/view/svg/ConfigurationViewerClass.js
@@ -353,7 +353,7 @@ define(['js/svg/SvgElement', 'sprd/entity/TextConfiguration', 'sprd/entity/Desig
}.on(["productViewer", "change:selectedConfiguration"]),
isScalable: function() {
- return this.isSelectedConfiguration() && this.get("configuration.printType.isScalable()");
+ return this.isSelectedConfiguration() && this.get("configuration.isScalable()");
}.on(["productViewer", "change:selectedConfiguration"])
}); | use isScalable from Configuration to determinate scaleibilty on configuration |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.