diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/astrobase/lcproc.py b/astrobase/lcproc.py
index <HASH>..<HASH> 100644
--- a/astrobase/lcproc.py
+++ b/astrobase/lcproc.py
@@ -214,7 +214,7 @@ def makelclist(basedir,
try:
thiscolval = dict_get(lcdict, getkey)
except:
- thiscolval = None
+ thiscolval = np.nan
thisline.append(thiscolval) | lcproc: more fixes |
diff --git a/tinycontent/models.py b/tinycontent/models.py
index <HASH>..<HASH> 100644
--- a/tinycontent/models.py
+++ b/tinycontent/models.py
@@ -1,11 +1,13 @@
from django.db import models
+from django.utils.encoding import python_2_unicode_compatible
+@python_2_unicode_compatible
class TinyContent(models.Model):
name = models.CharField(max_length=100, unique=True)
content = models.TextField()
- def __unicode__(self):
+ def __str__(self):
return self.name
class Meta:
diff --git a/tinycontent/tests.py b/tinycontent/tests.py
index <HASH>..<HASH> 100644
--- a/tinycontent/tests.py
+++ b/tinycontent/tests.py
@@ -32,9 +32,9 @@ class TinyContentTestCase(unittest.TestCase):
TinyContent.objects.get_or_create(name='html',
content='<strong>&</strong>')
- def test_unicode(self):
+ def test_str(self):
self.assertEqual("foobar",
- unicode(TinyContent.objects.get(name='foobar')))
+ str(TinyContent.objects.get(name='foobar')))
def test_non_existent(self):
self.assertEqual("", | Hopefully make tinycontent work with Python 3
Tests still don't run with Python 3 - waiting on a fix to
django-setuptest:
<URL> |
diff --git a/test/unit/plugins/synced_folders/rsync/helper_test.rb b/test/unit/plugins/synced_folders/rsync/helper_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/plugins/synced_folders/rsync/helper_test.rb
+++ b/test/unit/plugins/synced_folders/rsync/helper_test.rb
@@ -218,7 +218,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
let(:result) { Vagrant::Util::Subprocess::Result.new(0, "", "") }
let(:ssh_info) {{
- :private_key_path => [],
+ :private_key_path => ['/path/to/key'],
:keys_only => true,
:paranoid => false,
}}
@@ -239,6 +239,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
expect(args[9]).to include('IdentitiesOnly')
expect(args[9]).to include('StrictHostKeyChecking')
expect(args[9]).to include('UserKnownHostsFile')
+ expect(args[9]).to include("-i '/path/to/key'")
}
subject.rsync_single(machine, ssh_info, opts) | Add failing rsync test checking for private key option inclusion |
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -91,13 +91,17 @@ function configureCodeCoverage (config) {
function configureLocalBrowsers (config) {
var isMac = /^darwin/.test(process.platform),
isWindows = /^win/.test(process.platform),
- isLinux = !(isMac || isWindows);
+ isLinux = !(isMac || isWindows),
+ isCI = process.env.CI;
- if (isMac) {
+ if (isCI) {
+ config.browsers = ['ChromeHeadless'];
+ }
+ else if (isMac) {
config.browsers = ['Firefox', 'Chrome', 'Safari'];
}
else if (isLinux) {
- config.browsers = ['Firefox', 'ChromeHeadless'];
+ config.browsers = ['Firefox', 'Chrome'];
}
else if (isWindows) {
config.browsers = ['Firefox', 'Chrome', 'Safari', 'IE']; | Removed headless Firefox from the CI tests, since it keeps dropping its connection to Karma, causing the build to fail |
diff --git a/doc/conf.py b/doc/conf.py
index <HASH>..<HASH> 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -90,6 +90,12 @@ try:
except ImportError:
version = 'unknown'
+# readthedocs modifies the repository which messes up the version.
+if on_rtd:
+ import re
+ version = version.rstrip('.dirty')
+ version = re.sub('\+0\..+', '', version)
+ version
# The full version, including alpha/beta/rc tags.
release = version | DOC: Fix version on RTD |
diff --git a/src/solidity/stateDecoder.js b/src/solidity/stateDecoder.js
index <HASH>..<HASH> 100644
--- a/src/solidity/stateDecoder.js
+++ b/src/solidity/stateDecoder.js
@@ -40,14 +40,14 @@ function extractStateVariables (contractName, sourcesList) {
/**
* return the state of the given @a contractName as a json object
*
- * @param {Map} storageContent - contract storage
+ * @param {Object} storageResolver - resolve storage queries
* @param {astList} astList - AST nodes of all the sources
* @param {String} contractName - contract for which state var should be resolved
* @return {Map} - return the state of the contract
*/
-function solidityState (storageContent, astList, contractName) {
+async function solidityState (storageResolver, astList, contractName) {
var stateVars = extractStateVariables(contractName, astList)
- return decodeState(stateVars, storageContent)
+ return await decodeState(stateVars, storageResolver)
}
module.exports = { | make solidityState async + change param type |
diff --git a/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java b/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java
+++ b/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java
@@ -1,5 +1,6 @@
package net.openhft.chronicle.network.internal.lookuptable;
+import net.openhft.chronicle.core.Jvm;
import net.openhft.chronicle.core.io.Closeable;
import net.openhft.chronicle.core.io.IOTools;
import org.junit.After;
@@ -86,8 +87,9 @@ public class FileBasedHostnamePortLookupTableTest {
public void doShouldWorkConcurrently() {
int seq = doShouldWorkConcurrently(false);
int para = doShouldWorkConcurrently(true);
- System.out.println(seq + " " + para);
- assertTrue(seq > para);
+ assertTrue(seq > 0);
+ assertTrue(para > 0);
+ Jvm.startup().on(FileBasedHostnamePortLookupTable.class, "Sequential added: " + seq + ", parallel added: " + para);
}
public int doShouldWorkConcurrently(boolean parallel) { | Sometimes parallel is faster than sequential sometimes not (due to lock contention). Just assert they both added some entries. |
diff --git a/agent/lib/kontena/agent.rb b/agent/lib/kontena/agent.rb
index <HASH>..<HASH> 100644
--- a/agent/lib/kontena/agent.rb
+++ b/agent/lib/kontena/agent.rb
@@ -35,11 +35,11 @@ module Kontena
def start(node_info)
return if self.started?
@started = true
+ @node_info_worker.start!
@weave_adapter.start(node_info).value
@etcd_launcher.start(node_info).value
@weave_attacher.start!
- @node_info_worker.start!
@container_info_worker.start!
@log_worker.start!
@event_worker.start! | send node info to master asap |
diff --git a/snapshot/lib/snapshot/runner.rb b/snapshot/lib/snapshot/runner.rb
index <HASH>..<HASH> 100644
--- a/snapshot/lib/snapshot/runner.rb
+++ b/snapshot/lib/snapshot/runner.rb
@@ -18,6 +18,10 @@ module Snapshot
sleep 3 # to be sure the user sees this, as compiling clears the screen
end
+ if Helper.xcode_at_least?("9")
+ UI.user_error!("snapshot currently doesn't work with Xcode 9, we're working on implementing the new screenshots API to offer the best experience 🚀\nYou can change the Xcode version to use using `sudo xcode-select -s /Applications/Xcode...app`")
+ end
+
Snapshot.config[:output_directory] = File.expand_path(Snapshot.config[:output_directory])
verify_helper_is_current | Show message that Xcode 9 isn't support in snapshot ye (#<I>) |
diff --git a/lib/quando/parser.rb b/lib/quando/parser.rb
index <HASH>..<HASH> 100644
--- a/lib/quando/parser.rb
+++ b/lib/quando/parser.rb
@@ -58,7 +58,7 @@ module Quando
month = @date_parts[:month]
- if config.month_num.match(month)
+ month_num = if config.month_num.match(month)
month.to_i
else
month_index = Quando::Config::MONTHS.find_index do |month_name|
@@ -68,6 +68,8 @@ module Quando
month_index + 1 if month_index
end
+
+ month_num if (1..12).include?(month_num)
end
# @return [Integer, nil]
@@ -76,6 +78,7 @@ module Quando
return unless found?(:day)
day = @date_parts[:day].to_i
+
day if (1..31).include?(day)
end | Add check month is within <I> range |
diff --git a/lib/jitsu.js b/lib/jitsu.js
index <HASH>..<HASH> 100644
--- a/lib/jitsu.js
+++ b/lib/jitsu.js
@@ -360,7 +360,8 @@ jitsu.showError = function (command, err, shallow, skip) {
if (err.code === 'ECONNRESET'){
jitsu.log.info(
'jitsu\'s client request timed out before the server ' +
- 'could respond'
+ 'could respond. Please increase your client timeout' +
+ '(Ex. `jitsu config set timeout 100000`)'
);
jitsu.log.help(
'This error may be due to network connection problems' | [doc] added example command for clientside timeouts |
diff --git a/src/mattermostdriver/endpoints/users.py b/src/mattermostdriver/endpoints/users.py
index <HASH>..<HASH> 100644
--- a/src/mattermostdriver/endpoints/users.py
+++ b/src/mattermostdriver/endpoints/users.py
@@ -174,3 +174,15 @@ class Users(Base):
self.endpoint + '/login/switch',
options
)
+
+ def disable_personal_access_token(self, options=None):
+ return self.client.post(
+ self.endpoint + '/tokens/disable',
+ options
+ )
+
+ def enable_personal_access_token(self, options=None):
+ return self.client.post(
+ self.endpoint + '/tokens/enable',
+ options
+ ) | Add endpoints for enabling/disabling personal access tokens |
diff --git a/lib/toto.rb b/lib/toto.rb
index <HASH>..<HASH> 100644
--- a/lib/toto.rb
+++ b/lib/toto.rb
@@ -18,6 +18,14 @@ module Toto
:articles => "articles"
}
+ def self.env
+ ENV['RACK_ENV'] || 'production'
+ end
+
+ def self.env= env
+ ENV['RACK_ENV'] = env
+ end
+
module Template
def to_html page, &blk
path = (page == :layout ? Paths[:templates] : Paths[:pages])
@@ -290,8 +298,13 @@ module Toto
@response['Content-Length'] = response[:body].length.to_s
@response['Content-Type'] = Rack::Mime.mime_type(".#{response[:type]}")
- # Cache for one day
- @response['Cache-Control'] = "public, max-age=#{@config[:cache]}"
+ # Set http cache headers
+ @response['Cache-Control'] = if Toto.env == 'production'
+ "public, max-age=#{@config[:cache]}"
+ else
+ "no-cache, must-revalidate"
+ end
+
@response['Etag'] = Digest::SHA1.hexdigest(response[:body])
@response.status = response[:status] | Toto.env to check RACK_ENV setting; only cache when we're in produciton |
diff --git a/effects/loop.go b/effects/loop.go
index <HASH>..<HASH> 100644
--- a/effects/loop.go
+++ b/effects/loop.go
@@ -3,6 +3,8 @@ package effects
import "github.com/faiface/beep"
// Loop takes a StreamSeeker and plays it count times. If count is negative, s is looped infinitely.
+//
+// The returned Streamer propagates s's errors.
func Loop(count int, s beep.StreamSeeker) beep.Streamer {
return &loop{
s: s, | effects: mention errors propagation in Loop doc |
diff --git a/spyderlib/plugins/externalconsole.py b/spyderlib/plugins/externalconsole.py
index <HASH>..<HASH> 100644
--- a/spyderlib/plugins/externalconsole.py
+++ b/spyderlib/plugins/externalconsole.py
@@ -280,7 +280,7 @@ class ExternalConsole(PluginWidget):
filename = QFileDialog.getOpenFileName(self,
self.tr("Run Python script"), os.getcwdu(),
self.tr("Python scripts")+" (*.py ; *.pyw)")
- self.emit(SIGNAL('redirect_stdio(bool)'), False)
+ self.emit(SIGNAL('redirect_stdio(bool)'), True)
if filename:
self.start(unicode(filename), None, False, False, False) | External console/bugfix: std I/O were not redirected when using the "Run Python script" feature |
diff --git a/test/api/parseTransaction.js b/test/api/parseTransaction.js
index <HASH>..<HASH> 100644
--- a/test/api/parseTransaction.js
+++ b/test/api/parseTransaction.js
@@ -123,7 +123,7 @@ describe('ParseOfflineRequests', function () {
describe('#transactionOutputAfter', function () {
- var LSK = new lisk.api();
+ var LSK = lisk.api();
it('should calculate crypto for accounts/open instead of using the API', function () {
var transformAnswer = { | getting rid of remaining lisk api constructor in the test |
diff --git a/lib/agent/actions/alert/darwin/flash.py b/lib/agent/actions/alert/darwin/flash.py
index <HASH>..<HASH> 100755
--- a/lib/agent/actions/alert/darwin/flash.py
+++ b/lib/agent/actions/alert/darwin/flash.py
@@ -130,7 +130,7 @@ class AlertView(NSView):
img_width = rep.pixelsWide()
img_height = rep.pixelsHigh()
- top = (self.bounds().size.height - img_height) - 25 # offset from top
+ top = (self.bounds().size.height - img_height) - 20 # offset from top
right_offset = (self.bounds().size.width - 600) / 2
right = self.bounds().size.width - right_offset - img_width
@@ -217,7 +217,7 @@ class AlertView(NSView):
width = 600
height = 30
- top = self.bounds().size.height - 55
+ top = self.bounds().size.height - 50
self.add_label(title, default_font, 24, self.getLeftOffset(width) + 3, top, width, height)
# width + 10 is to add padding | Top margins in OSX alerts. |
diff --git a/util/tls/tls.go b/util/tls/tls.go
index <HASH>..<HASH> 100644
--- a/util/tls/tls.go
+++ b/util/tls/tls.go
@@ -122,8 +122,9 @@ func GenerateX509KeyPairTLSConfig(tlsMinVersion uint16) (*tls.Config, error) {
}
return &tls.Config{
- Certificates: []tls.Certificate{*cer},
- MinVersion: uint16(tlsMinVersion),
+ Certificates: []tls.Certificate{*cer},
+ MinVersion: uint16(tlsMinVersion),
+ InsecureSkipVerify: true,
}, nil
} | fix: insecureSkipVerify needed. Fixes #<I> (#<I>) |
diff --git a/actions/SaSItems.class.php b/actions/SaSItems.class.php
index <HASH>..<HASH> 100644
--- a/actions/SaSItems.class.php
+++ b/actions/SaSItems.class.php
@@ -55,8 +55,10 @@ class SaSItems extends Items {
* @return void
*/
public function sasEditInstance(){
- $clazz = $this->getCurrentClass();
- $instance = $this->getCurrentInstance();
+ //$clazz = $this->getCurrentClass();
+ //$instance = $this->getCurrentInstance();
+ $clazz = new core_kernel_classes_Class('http://tao.localdomain/middleware/taotrans_v2.rdf#i1275389549011797000');
+ $instance = new core_kernel_classes_Resource('http://tao.localdomain/middleware/taotrans_v2.rdf#i1275389749010048200');
$myForm = tao_helpers_form_GenerisFormFactory::instanceEditor($clazz, $instance);
if($myForm->isSubmited()){ | * implement parallels workflow : update tokens, current activities, process variables and some services
git-svn-id: <URL> |
diff --git a/examples/elevator.rb b/examples/elevator.rb
index <HASH>..<HASH> 100644
--- a/examples/elevator.rb
+++ b/examples/elevator.rb
@@ -131,8 +131,8 @@ class Tracker
@led_update = Time.now
@done = false
@dist_ave = MovingAverage.new(50)
- @x_ave = MovingAverage.new(20)
- @y_ave = MovingAverage.new(20)
+ @x_ave = MovingAverage.new(3)
+ @y_ave = MovingAverage.new(3)
end
def done | Reduce amount of smoothing on data.
To get a quicker response. |
diff --git a/start.php b/start.php
index <HASH>..<HASH> 100644
--- a/start.php
+++ b/start.php
@@ -15,7 +15,7 @@ function init() {
elgg_register_class('Events\API\Calendar', __DIR__ . '/classes/Events/API/Calendar.php');
elgg_register_class('Events\API\Event', __DIR__ . '/classes/Events/API/Event.php');
- elgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\events_permissions');
+ elgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\event_permissions');
elgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\calendar_permissions');
elgg_register_entity_url_handler('object', 'calendar', __NAMESPACE__ . '\\calendar_url');
@@ -35,4 +35,4 @@ function calendar_url($calendar) {
function event_url($event) {
return 'calendar/events/view/' . $event->guid;
-}
\ No newline at end of file
+} | Fixed typo
Changed hookname events_permission to event_permission |
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -146,6 +146,7 @@ module.exports.createServer = function createServer(connectFunctions, updateAcco
job.serviceData = token.data;
job.cache = server.userCache;
+ // We use task instead of data
delete job.data;
delete job.task._anyfetchToken;
delete job.task._anyfetchApiUrl; | Add a comment to explain delete job.data |
diff --git a/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php b/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php
index <HASH>..<HASH> 100644
--- a/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php
+++ b/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php
@@ -55,10 +55,8 @@ class DefaultCollection implements CollectionInterface
{
return $this->arrCollection[$intIndex];
}
- else
- {
- return null;
- }
+
+ return null;
}
/**
@@ -112,10 +110,8 @@ class DefaultCollection implements CollectionInterface
{
return array_pop($this->arrCollection);
}
- else
- {
- return null;
- }
+
+ return null;
}
/**
@@ -146,10 +142,8 @@ class DefaultCollection implements CollectionInterface
{
return array_shift($this->arrCollection);
}
- else
- {
- return null;
- }
+
+ return null;
}
/** | Code style in DefaultCollection. |
diff --git a/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java b/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
+++ b/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
@@ -691,7 +691,6 @@ public class ConfigXmlGenerator {
final Source xmlInput = new StreamSource(new StringReader(input));
xmlOutput = new StreamResult(new StringWriter());
TransformerFactory transformerFactory = TransformerFactory.newInstance();
- transformerFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
/* Older versions of Xalan still use this method of setting indent values.
* Attempt to make this work but don't completely fail if it's a problem.
*/ | removed setfeature due to it is not supported in sax |
diff --git a/pyzcasp/potassco/utilities.py b/pyzcasp/potassco/utilities.py
index <HASH>..<HASH> 100644
--- a/pyzcasp/potassco/utilities.py
+++ b/pyzcasp/potassco/utilities.py
@@ -188,7 +188,7 @@ class Clingo(Clasp3):
for answer in self.answers():
ts = component.getMultiAdapter((answer, parser), asp.ITermSet)
if termset_filter:
- ts = asp.TermSet(filter(termset_filter, ts))
+ ts = asp.TermSet(filter(termset_filter, ts), ts.score)
if adapter:
answers.append(adapter(ts)) | missing score in clingo when using a filter |
diff --git a/src/Leevel/Database/Ddd/Select.php b/src/Leevel/Database/Ddd/Select.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Database/Ddd/Select.php
+++ b/src/Leevel/Database/Ddd/Select.php
@@ -262,7 +262,7 @@ class Select
public function softRestore(): int
{
$this->entity->handleEvent(IEntity::BEFORE_SOFT_RESTORE_EVENT);
- $this->entity->__set($this->deleteAtColumn(), null);
+ $this->entity->__set($this->deleteAtColumn(), 0);
$num = $this->entity->update()->flush();
$this->entity->handleEvent(IEntity::AFTER_SOFT_RESTORE_EVENT); | tests(database): fix SQLSTATE[<I>]: Integrity constraint violation: <I> Column 'delete_at' cannot be null |
diff --git a/src/Select.js b/src/Select.js
index <HASH>..<HASH> 100644
--- a/src/Select.js
+++ b/src/Select.js
@@ -553,6 +553,7 @@ var Select = React.createClass({
var filterOption = function(op) {
if (this.props.multi && exclude.indexOf(op.value) > -1) return false;
if (this.props.filterOption) return this.props.filterOption.call(this, op, filterValue);
+ if (filterValue && op.disabled) return false;
var valueTest = String(op.value), labelTest = String(op.label);
if (this.props.ignoreCase) {
valueTest = valueTest.toLowerCase();
@@ -595,7 +596,9 @@ var Select = React.createClass({
focusAdjacentOption: function(dir) {
this._focusedOptionReveal = true;
- var ops = this.state.filteredOptions;
+ var ops = this.state.filteredOptions.filter(function(op) {
+ return !op.disabled;
+ });
if (!this.state.isOpen) {
this.setState({ | Disabled options should not be selectable
Conflicts:
src/Select.js |
diff --git a/src/AttributeBag.php b/src/AttributeBag.php
index <HASH>..<HASH> 100644
--- a/src/AttributeBag.php
+++ b/src/AttributeBag.php
@@ -64,7 +64,8 @@ class AttributeBag implements \Countable
{
if ($this->restricted) {
if (!in_array($offset, array_keys($this->attributes))) {
- return $this;
+ $message = sprintf('%s it not an allowed attribute on this object. The only allowed attributes are %s', $offset, implode(',', array_keys($this->attributes)));
+ throw new \InvalidArgumentException($message);
}
} | Throw an exception on disallowed attribute values instead of silently returning . |
diff --git a/src/urh/util/ProjectManager.py b/src/urh/util/ProjectManager.py
index <HASH>..<HASH> 100644
--- a/src/urh/util/ProjectManager.py
+++ b/src/urh/util/ProjectManager.py
@@ -77,7 +77,8 @@ class ProjectManager(QObject):
return result
def set_project_folder(self, path, ask_for_new_project=True, close_all=True):
- if close_all:
+ if self.project_file is not None or close_all:
+ # Close existing project (if any) or existing files if requested
self.main_controller.close_all()
FileOperator.RECENT_PATH = path
self.project_path = path
diff --git a/tests/test_project_manager.py b/tests/test_project_manager.py
index <HASH>..<HASH> 100644
--- a/tests/test_project_manager.py
+++ b/tests/test_project_manager.py
@@ -54,6 +54,7 @@ class TestProjectManager(QtTestCase):
self.gframe.modulators.clear()
self.assertEqual(len(self.gframe.modulators), 0)
+ self.form.project_manager.project_file = None # prevent saving of the zero modulators
self.form.project_manager.set_project_folder(self.form.project_manager.project_path, close_all=False)
self.assertEqual(len(self.gframe.modulators), 2) | improve new project behaviour when a project is currently loaded |
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -333,7 +333,7 @@ epub_copyright = copyright
# The format is a list of tuples containing the path and title.
#epub_pre_files = []
-# HTML files shat should be inserted after the pages created by sphinx.
+# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_post_files = [] | docs: Fix simple typo, shat -> that
There is a small typo in docs/conf.py.
Should read `that` rather than `shat`. |
diff --git a/packages/teraslice/lib/cluster/services/cluster/backends/native/messaging.js b/packages/teraslice/lib/cluster/services/cluster/backends/native/messaging.js
index <HASH>..<HASH> 100644
--- a/packages/teraslice/lib/cluster/services/cluster/backends/native/messaging.js
+++ b/packages/teraslice/lib/cluster/services/cluster/backends/native/messaging.js
@@ -257,7 +257,7 @@ module.exports = function messaging(context, logger) {
io = require('socket.io-client')(hostURL, {
forceNew: true,
path: '/native-clustering',
- // transports: ['websocket'],
+ perMessageDeflate: false,
query,
});
_registerFns(io);
@@ -278,6 +278,9 @@ module.exports = function messaging(context, logger) {
// cluster_master
io = require('socket.io')(server, {
path: '/native-clustering',
+ pingTimeout: configTimeout,
+ pingInterval: configTimeout + networkLatencyBuffer,
+ perMessageDeflate: false,
serveClient: false,
});
_attachRoomsSocketIO(); | Use the same logic for the socket.io server in messaging |
diff --git a/packages/@vue/cli-service/lib/Service.js b/packages/@vue/cli-service/lib/Service.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/Service.js
+++ b/packages/@vue/cli-service/lib/Service.js
@@ -29,7 +29,7 @@ module.exports = class Service {
// for testing.
this.plugins = this.resolvePlugins(plugins, useBuiltIn)
// resolve the default mode to use for each command
- // this is provided by plugins as module.exports.defaulModes
+ // this is provided by plugins as module.exports.defaultModes
// so we can get the information without actually applying the plugin.
this.modes = this.plugins.reduce((modes, { apply: { defaultModes }}) => {
return Object.assign(modes, defaultModes)
@@ -146,7 +146,7 @@ module.exports = class Service {
// resolve mode
// prioritize inline --mode
// fallback to resolved default modes from plugins
- const mode = args.mode || this.modes[name]
+ const mode = name === 'build' && args.watch ? 'development' : args.mode || this.modes[name]
// load env variables, load user config, apply plugins
this.init(mode) | fix(build): default to development mode in build --watch (#<I>) |
diff --git a/ui/components/signup/index.js b/ui/components/signup/index.js
index <HASH>..<HASH> 100644
--- a/ui/components/signup/index.js
+++ b/ui/components/signup/index.js
@@ -5,10 +5,12 @@ exports.create = function (model, dom) {
if (!form) return console.error('must specifiy form element (i.e. <form x-as="form">...</form>');
$(function () {
- $(form).ajaxForm({
- method: 'post',
- url: model.get('url') || '/signup',
- xhrFields: {withCredentials: true}
- });
+ $(form).ajaxForm();
});
+};
+
+exports.provider = function (e, el) {
+ e.preventDefault();
+ if (!el.href) return console.error('must specify a provider url (i.e. <a href="/signin/provider">...</a>');
+ $.popupWindow(el.href);
};
\ No newline at end of file | remove unused script and added provider export |
diff --git a/executor/show.go b/executor/show.go
index <HASH>..<HASH> 100644
--- a/executor/show.go
+++ b/executor/show.go
@@ -190,11 +190,6 @@ func (e *ShowExec) fetchShowProcessList() error {
pl := sm.ShowProcessList()
for _, pi := range pl {
- var t uint64
- if len(pi.Info) != 0 {
- t = uint64(time.Since(pi.Time) / time.Second)
- }
-
var info string
if e.Full {
info = pi.Info
@@ -208,7 +203,7 @@ func (e *ShowExec) fetchShowProcessList() error {
pi.Host,
pi.DB,
pi.Command,
- t,
+ uint64(time.Since(pi.Time) / time.Second),
fmt.Sprintf("%d", pi.State),
info,
pi.Mem, | fix show processlist (#<I>) |
diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/file.rb
+++ b/lib/chef/resource/file.rb
@@ -58,7 +58,7 @@ class Chef
property :atomic_update, [ true, false ], desired_state: false, default: Chef::Config[:file_atomic_update]
property :force_unlink, [ true, false ], desired_state: false, default: false
property :manage_symlink_source, [ true, false ], desired_state: false
- property :verifications, Array, default: lazy { Array.new }
+ property :verifications, Array, default: lazy { [] }
def verify(command=nil, opts={}, &block)
if ! (command.nil? || [String, Symbol].include?(command.class)) | can be less verbose about creating Arrays |
diff --git a/middleware/middleware.js b/middleware/middleware.js
index <HASH>..<HASH> 100644
--- a/middleware/middleware.js
+++ b/middleware/middleware.js
@@ -74,9 +74,6 @@ export default ({ dispatch, getState }) => next => action => {
const sendRequest = ({ shouldRenewToken } = {}) => {
const headers = {
Authorization: selectToken(state),
- // NOTE: passing headers is currently only necessary for the pim-indexer
- // this should be cleaned up, so the endpoint of an http call is determined by the url
- // and not the headers
...(action.payload.headers || {}),
...(shouldRenewToken ? { 'X-Force-Token': 'true' } : {}),
}; | refactor(ppl/pim-search): Change more names to reflect backend change |
diff --git a/Controller/SecurityController.php b/Controller/SecurityController.php
index <HASH>..<HASH> 100644
--- a/Controller/SecurityController.php
+++ b/Controller/SecurityController.php
@@ -106,7 +106,7 @@ class SecurityController extends AbstractController
;
return $widget
- ? new AjaxResponse('', true, $successMessage, [], $url)
+ ? new AjaxResponse(null, true, $successMessage, [], $url)
: $this->redirect($url);
}
@@ -140,7 +140,7 @@ class SecurityController extends AbstractController
$url = $this->generateUrl($this->container->getParameter('darvin_user.already_logged_in_redirect_route'));
return $widget
- ? new AjaxResponse('', true, $successMessage, [], $url)
+ ? new AjaxResponse(null, true, $successMessage, [], $url)
: $this->redirect($url);
} | Pass null instead of empty string in place of HTML to AJAX response constructor. |
diff --git a/vagrant/cookbook/recipes/default.rb b/vagrant/cookbook/recipes/default.rb
index <HASH>..<HASH> 100644
--- a/vagrant/cookbook/recipes/default.rb
+++ b/vagrant/cookbook/recipes/default.rb
@@ -34,6 +34,7 @@ libapache2-mod-php5
git
php5-cli
php5-curl
+php5-gd
php5-sqlite
php5-mysql
php5-intl | added missing php5-gd lib to default recipe |
diff --git a/src/Bkwld/Croppa/Helpers.php b/src/Bkwld/Croppa/Helpers.php
index <HASH>..<HASH> 100644
--- a/src/Bkwld/Croppa/Helpers.php
+++ b/src/Bkwld/Croppa/Helpers.php
@@ -35,7 +35,9 @@ class Helpers {
* @see Bkwld\Croppa\Storage::deleteSrc()
*/
public function delete($url) {
- return $this->storage->deleteSrc($this->url->relativePath($url));
+ $path = $this->url->relativePath($url);
+ $this->storage->deleteSrc($path);
+ $this->storage->deleteCrops($path);
}
/**
@@ -46,7 +48,7 @@ class Helpers {
* @see Bkwld\Croppa\Storage::deleteCrops()
*/
public function reset($url) {
- return $this->storage->deleteCrops($this->url->relativePath($url));
+ $this->storage->deleteCrops($this->url->relativePath($url));
}
/** | Croppa::delete() was intended to delete the src and crops
Closes #<I> |
diff --git a/Branch-SDK/src/main/java/io/branch/referral/Branch.java b/Branch-SDK/src/main/java/io/branch/referral/Branch.java
index <HASH>..<HASH> 100644
--- a/Branch-SDK/src/main/java/io/branch/referral/Branch.java
+++ b/Branch-SDK/src/main/java/io/branch/referral/Branch.java
@@ -2302,7 +2302,16 @@ public class Branch implements BranchViewHandler.IBranchViewEvents, SystemObserv
}
networkCount_ = 0;
- processNextQueueItem();
+ // In rare cases where this method is called directly (eg. when network calls time out),
+ // starting the next queue item can lead to stack over flow. Ensuring that this is
+ // queued back to the main thread mitigates this.
+ Handler handler = new Handler(Looper.getMainLooper());
+ handler.post(new Runnable() {
+ @Override
+ public void run() {
+ processNextQueueItem();
+ }
+ });
}
private void onRequestSuccess(ServerResponse serverResponse) { | Return to the main thread to kick off the next queue item (#<I>)
In rare cases where this method is called directly (eg. when network calls time out), starting the next queue item can lead to stack over flow. Ensuring that this is queued back to the main thread mitigates this. |
diff --git a/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosTaskBuilder.java b/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosTaskBuilder.java
index <HASH>..<HASH> 100644
--- a/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosTaskBuilder.java
+++ b/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosTaskBuilder.java
@@ -449,7 +449,7 @@ class SingularityMesosTaskBuilder {
commandBldr.setShell(false);
}
- List<SingularityMesosArtifact> combinedArtifacts = task.getDeploy().getUris().or(Collections.<SingularityMesosArtifact> emptyList());
+ List<SingularityMesosArtifact> combinedArtifacts = task.getDeploy().getUris().or(Collections.emptyList());
combinedArtifacts.addAll(task.getPendingTask().getExtraArtifacts());
for (SingularityMesosArtifact artifact : combinedArtifacts) { | Explicit type not required here. |
diff --git a/src/Service/AuthenticationVerificationResult.php b/src/Service/AuthenticationVerificationResult.php
index <HASH>..<HASH> 100644
--- a/src/Service/AuthenticationVerificationResult.php
+++ b/src/Service/AuthenticationVerificationResult.php
@@ -24,7 +24,7 @@ use Surfnet\StepupU2fBundle\Exception\InvalidArgumentException;
use Surfnet\StepupU2fBundle\Exception\LogicException;
/**
- * @SuppressWarnings(PHPMD.TooManyMethods)
+ * @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
final class AuthenticationVerificationResult
{
diff --git a/src/Service/RegistrationVerificationResult.php b/src/Service/RegistrationVerificationResult.php
index <HASH>..<HASH> 100644
--- a/src/Service/RegistrationVerificationResult.php
+++ b/src/Service/RegistrationVerificationResult.php
@@ -24,7 +24,7 @@ use Surfnet\StepupU2fBundle\Exception\InvalidArgumentException;
use Surfnet\StepupU2fBundle\Exception\LogicException;
/**
- * @SuppressWarnings(PHPMD.TooManyMethods)
+ * @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
final class RegistrationVerificationResult
{ | Update PHPMD Suppression
The suppression was changed from TooManyMethods to TooManyPublicMethods. |
diff --git a/lib/process_runner/runner.js b/lib/process_runner/runner.js
index <HASH>..<HASH> 100644
--- a/lib/process_runner/runner.js
+++ b/lib/process_runner/runner.js
@@ -219,15 +219,25 @@ ProcessRunner.prototype.findDependencies = function(testPaths, callback) {
};
/**
+ *
+ * @param {?Array} names Names of the dependencies to run. Defaults to all the
+ * dependencies specified in the config file.
* @param {Function} callback Callback called when all the processes have
* started.
*/
-ProcessRunner.prototype.start = function(callback) {
- var key, value, ops = {}, name, dependencies, func;
+ProcessRunner.prototype.start = function(names, callback) {
+ var i, len, name, value, ops = {}, dependencies, func;
+
+ if (typeof names === 'function') {
+ callback = names;
+ names = Object.keys(this._config);
+ }
+
+ for (i = 0, len = names.length; i < len; i++) {
+ name = names[i];
- for (key in this._config) {
- if (this._config.hasOwnProperty(key)) {
- value = this._config[key];
+ if (this._config.hasOwnProperty(name)) {
+ value = this._config[name];
name = value.name;
dependencies = value.depends; | Allow user to pass names of the dependencies to run to the start method. |
diff --git a/functions.php b/functions.php
index <HASH>..<HASH> 100644
--- a/functions.php
+++ b/functions.php
@@ -8,8 +8,23 @@
* @since Timber 0.1
*/
+/**
+ * If you are installing Timber as a Composer dependency in your theme, you'll need this block
+ * to load your dependencies and initialize Timber. If you are using Timber via the WordPress.org
+ * plug-in, you can safely delete this block.
+ */
+$composer_autoload = __DIR__ . '/vendor/autoload.php';
+if ( file_exists($composer_autoload) ) {
+ require_once( $composer_autoload );
+ $timber = new Timber\Timber();
+}
+/**
+ * This ensures that Timber is loaded and available as a PHP class.
+ * If not, it gives an error message to help direct developers on where to activate
+ */
if ( ! class_exists( 'Timber' ) ) {
+
add_action( 'admin_notices', function() {
echo '<div class="error"><p>Timber not activated. Make sure you activate the plugin in <a href="' . esc_url( admin_url( 'plugins.php#timber' ) ) . '">' . esc_url( admin_url( 'plugins.php' ) ) . '</a></p></div>';
}); | Include pattern for loading Timber via Composer |
diff --git a/src/ol/renderer/canvas/tilelayer.js b/src/ol/renderer/canvas/tilelayer.js
index <HASH>..<HASH> 100644
--- a/src/ol/renderer/canvas/tilelayer.js
+++ b/src/ol/renderer/canvas/tilelayer.js
@@ -227,9 +227,7 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layer
canvas.width = width;
canvas.height = height;
} else {
- if (this.renderedExtent_ && !ol.extent.equals(imageExtent, this.renderedExtent_)) {
- context.clearRect(0, 0, width, height);
- }
+ context.clearRect(0, 0, width, height);
oversampling = this.oversampling_;
}
} | Vector tile rendering requires canvas to be cleared |
diff --git a/lib/Record.php b/lib/Record.php
index <HASH>..<HASH> 100644
--- a/lib/Record.php
+++ b/lib/Record.php
@@ -637,6 +637,16 @@ class Record extends Base implements \ArrayAccess, \IteratorAggregate, \Countabl
}
/**
+ * Returns whether the data is loaded
+ *
+ * @return bool
+ */
+ public function isLoaded()
+ {
+ return $this->loaded;
+ }
+
+ /**
* Sets the primary key field
*
* @param string $primaryKey | added isLoaded method for record clas |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -14,7 +14,7 @@ function SweetjsFilter(inputTree, options) {
SweetjsFilter.prototype = Object.create(Filter.prototype);
SweetjsFilter.prototype.constructor = SweetjsFilter;
-SweetjsFilter.prototype.extensions = ['js'];
+SweetjsFilter.prototype.extensions = ['js', 'sjs'];
SweetjsFilter.prototype.targetExtension = 'js';
SweetjsFilter.prototype.processString = function (str) { | Added .sjs extension in use by the community |
diff --git a/spectra.js b/spectra.js
index <HASH>..<HASH> 100644
--- a/spectra.js
+++ b/spectra.js
@@ -425,6 +425,10 @@
Spectra.fn.prototype.rgbNumber = function() {
return (this.red() << 16) | (this.green() << 8) | (this.blue());
};
+
+ // Use hex string function for toString operations
+ // to allow direct assignment to css properties
+ Spectra.fn.prototype.toString = Spectra.fn.prototype.hex;
/**
* API Functions | Use hex string for toString()
Use hex string function for spectra object's toString() method. This allows for direct assignment to css properties. |
diff --git a/src/com/backendless/servercode/RunnerContext.java b/src/com/backendless/servercode/RunnerContext.java
index <HASH>..<HASH> 100644
--- a/src/com/backendless/servercode/RunnerContext.java
+++ b/src/com/backendless/servercode/RunnerContext.java
@@ -103,6 +103,16 @@ public class RunnerContext extends AbstractContext
this.eventContext = eventContext;
}
+ public Map<String, String> getHttpHeaders()
+ {
+ return httpHeaders;
+ }
+
+ public void setHttpHeaders( Map<String, String> httpHeaders )
+ {
+ this.httpHeaders = httpHeaders;
+ }
+
@Override
public String toString()
{
@@ -110,6 +120,7 @@ public class RunnerContext extends AbstractContext
sb.append( "missingProperties=" ).append( missingProperties );
sb.append( ", prematureResult=" ).append( prematureResult );
sb.append( ", eventContext=" ).append( eventContext );
+ sb.append( ", httpHeaders=" ).append( httpHeaders );
sb.append( ", " ).append(super.toString());
sb.append( "}" );
return sb.toString(); | BKNDLSS-<I> - added httpHeaders to RunnerContext |
diff --git a/hazelcast/src/main/java/com/hazelcast/nio/tcp/TcpIpConnectionManager.java b/hazelcast/src/main/java/com/hazelcast/nio/tcp/TcpIpConnectionManager.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/nio/tcp/TcpIpConnectionManager.java
+++ b/hazelcast/src/main/java/com/hazelcast/nio/tcp/TcpIpConnectionManager.java
@@ -72,7 +72,7 @@ public class TcpIpConnectionManager implements ConnectionManager, PacketHandler
// TODO Introducing this to allow disabling the spoofing checks on-demand
// if there is a use-case that gets affected by the change. If there are no reports of misbehaviour we can remove than in
// next release.
- private static final boolean SPOOFING_CHECKS = parseBoolean(getProperty("hazelcast.nio.tcp.spoofing.checks", "true"));
+ private static final boolean SPOOFING_CHECKS = parseBoolean(getProperty("hazelcast.nio.tcp.spoofing.checks", "false"));
final LoggingService loggingService; | Disable spoofing checks by default (#<I>) |
diff --git a/packages/@keynote/cli/bin/keynote.js b/packages/@keynote/cli/bin/keynote.js
index <HASH>..<HASH> 100755
--- a/packages/@keynote/cli/bin/keynote.js
+++ b/packages/@keynote/cli/bin/keynote.js
@@ -24,7 +24,7 @@ program
.option('-p, --theme <theme>', 'use specified theme (default: @keynote/theme-default)')
.option('--debug', 'build in development mode for debugging')
.action((file = 'keynote.vue', { debug, dest, theme }) => {
- const outDir = dest ? path.resolve(dest) : null
+ const outDir = dest ? require('path').resolve(dest) : null
wrapCommand(require('./build'))({ file, debug, outDir, theme })
}) | fix: Add missing import for path package |
diff --git a/pysat/utils/_core.py b/pysat/utils/_core.py
index <HASH>..<HASH> 100644
--- a/pysat/utils/_core.py
+++ b/pysat/utils/_core.py
@@ -681,6 +681,9 @@ def display_available_instruments(inst_loc=None, show_inst_mod=None,
if show_platform_name is None and inst_loc is None:
show_platform_name = True
+ plat_keys = sorted([platform for platform in inst_info.keys()])
+ else:
+ plat_keys = inst_info.keys()
if show_inst_mod is None and inst_loc is not None:
show_inst_mod = True
@@ -696,7 +699,7 @@ def display_available_instruments(inst_loc=None, show_inst_mod=None,
header = "{:s} [Tag Inst_ID] Description".format(header)
print(header)
print("-" * len(header))
- for platform in inst_info.keys():
+ for platform in plat_keys:
for name in inst_info[platform].keys():
mod_str = ""
for inst_id in inst_info[platform][name]['inst_ids_tags'].keys(): | STY: added platform sorting
Added sorting by platform if the platform is being displayed. |
diff --git a/librosa/core/constantq.py b/librosa/core/constantq.py
index <HASH>..<HASH> 100644
--- a/librosa/core/constantq.py
+++ b/librosa/core/constantq.py
@@ -556,7 +556,7 @@ def __trim_stack(cqt_resp, n_bins):
'''Helper function to trim and stack a collection of CQT responses'''
# cleanup any framing errors at the boundaries
- max_col = min([x.shape[1] for x in cqt_resp])
+ max_col = min(x.shape[1] for x in cqt_resp)
cqt_resp = np.vstack([x[:, :max_col] for x in cqt_resp][::-1]) | Use generator expression instead of making a list |
diff --git a/lib/eye/process/monitor.rb b/lib/eye/process/monitor.rb
index <HASH>..<HASH> 100644
--- a/lib/eye/process/monitor.rb
+++ b/lib/eye/process/monitor.rb
@@ -11,7 +11,7 @@ private
:no_pid_file
elsif process_pid_running?(newpid)
self.pid = newpid
- info "load_external_pid_file: process <#{self.pid}> from pid_file found and already running"
+ info "load_external_pid_file: process <#{self.pid}> from pid_file found and already running (#{Eye::SystemResources.args(self.pid)})"
:ok
else
@last_loaded_pid = newpid
diff --git a/lib/eye/system_resources.rb b/lib/eye/system_resources.rb
index <HASH>..<HASH> 100644
--- a/lib/eye/system_resources.rb
+++ b/lib/eye/system_resources.rb
@@ -57,6 +57,10 @@ class Eye::SystemResources
end
end
+ def args(pid)
+ Eye::Sigar.proc_args(pid).join(' ').strip rescue '-'
+ end
+
def resources(pid)
{ :memory => memory(pid),
:cpu => cpu(pid), | logging process args when load from pid_file |
diff --git a/outline.js b/outline.js
index <HASH>..<HASH> 100644
--- a/outline.js
+++ b/outline.js
@@ -42,6 +42,8 @@ OutlinePlugin.prototype.disable = function() {
};
var scratch0 = vec3.create();
+var epsilon = 0.001;
+var scratch1 = [1+epsilon, 1+epsilon, 1+epsilon];
OutlinePlugin.prototype.tick = function() {
var hit = this.game.raycastVoxels();
@@ -57,6 +59,7 @@ OutlinePlugin.prototype.tick = function() {
scratch0[1] = hit.voxel[1];
scratch0[2] = hit.voxel[0];
mat4.translate(this.modelMatrix, this.modelMatrix, scratch0);
+ mat4.scale(this.modelMatrix, this.modelMatrix, scratch1);
};
OutlinePlugin.prototype.render = function() { | Expand outline by a small offset to prevent z-fighting |
diff --git a/Service/TranslationManager.php b/Service/TranslationManager.php
index <HASH>..<HASH> 100644
--- a/Service/TranslationManager.php
+++ b/Service/TranslationManager.php
@@ -16,6 +16,7 @@ use ONGR\ElasticsearchDSL\Aggregation\Bucketing\TermsAggregation;
use ONGR\ElasticsearchDSL\Query\MatchAllQuery;
use ONGR\ElasticsearchDSL\Query\TermsQuery;
use ONGR\ElasticsearchBundle\Service\Repository;
+use ONGR\FilterManagerBundle\Twig\PagerExtension;
use ONGR\TranslationsBundle\Document\Message;
use ONGR\TranslationsBundle\Document\Translation;
use ONGR\TranslationsBundle\Event\Events;
@@ -119,16 +120,17 @@ class TranslationManager
unset($content['messages']);
}
- try {
- foreach ($content as $key => $value) {
- $document->{'set'.ucfirst($key)}($value);
+ foreach ($content as $key => $value) {
+ $method = 'set' . ucfirst($key);
+
+ if (!method_exists($document, $method)) {
+ throw new \LogicException('Illegal variable provided for translation');
}
- $document->setUpdatedAt(new \DateTime());
- } catch (\Error $e) {
- throw new \LogicException('Illegal variable provided for translation');
+ $document->$method($value);
}
+ $document->setUpdatedAt(new \DateTime());
$this->repository->getManager()->persist($document);
$this->repository->getManager()->commit();
} | changed try-catch to if in TranslationManage::update |
diff --git a/fireplace/cards/karazhan/collectible.py b/fireplace/cards/karazhan/collectible.py
index <HASH>..<HASH> 100644
--- a/fireplace/cards/karazhan/collectible.py
+++ b/fireplace/cards/karazhan/collectible.py
@@ -37,9 +37,9 @@ class KAR_033:
powered_up = HOLDING_DRAGON, Find(ENEMY_MINIONS + (ATK <= 3))
play = HOLDING_DRAGON & Destroy(TARGET)
-# class KAR_035:
-# "Priest of the Feast"
-
+class KAR_035:
+ "Priest of the Feast"
+ events = OWN_SPELL_PLAY.on(Heal(FRIENDLY_HERO, 3))
# class KAR_036:
# "Arcane Anomaly"
diff --git a/tests/test_karazhan.py b/tests/test_karazhan.py
index <HASH>..<HASH> 100644
--- a/tests/test_karazhan.py
+++ b/tests/test_karazhan.py
@@ -78,3 +78,11 @@ def test_book_wyrm():
assert len(game.player2.field) == 1
game.end_turn()
+def test_priest_of_the_feast():
+ game = prepare_game()
+ priest = game.player1.give("KAR_035")
+ game.player1.give(DAMAGE_5).play(target=game.player1.hero)
+ assert game.player1.hero.health == 25
+ priest.play()
+ game.player1.give(THE_COIN).play()
+ assert game.player1.hero.health == 28
\ No newline at end of file | Implement "Priest of the Feast" with test
KAR_<I> |
diff --git a/src/attributes.js b/src/attributes.js
index <HASH>..<HASH> 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -617,6 +617,11 @@ function getNumElementsFromAttributes(gl, attribs) {
*
* @param {WebGLRenderingContext} gl A WebGLRenderingContext
* @param {module:twgl.Arrays} arrays Your data
+ * @param {module:twgl.BufferInfo} [srcBufferInfo] An existing
+ * buffer info to start from. WebGLBuffers etc specified
+ * in the srcBufferInfo will be used in a new BufferInfo
+ * with any arrays specfied overriding the ones in
+ * srcBufferInfo.
* @return {module:twgl.BufferInfo} A BufferInfo
* @memberOf module:twgl/attributes
*/ | update docs for createBufferInfoFromArrays |
diff --git a/src/webui/src/components/Footer/index.js b/src/webui/src/components/Footer/index.js
index <HASH>..<HASH> 100644
--- a/src/webui/src/components/Footer/index.js
+++ b/src/webui/src/components/Footer/index.js
@@ -49,7 +49,10 @@ export default class Footer extends React.Component {
<div className={classes.right}>
Powered by
- <img className={classes.logo} src={logo} alt="Verdaccio" title="Verdaccio"/>
+ { /* Can't switch to HTTPS due it hosted on GitHub Pages */ }
+ <a href="http://www.verdaccio.org/">
+ <img className={classes.logo} src={logo} alt="Verdaccio" title="Verdaccio"/>
+ </a>
/
{__APP_VERSION__}
</div> | refactor: add links to verdaccio official website |
diff --git a/html/pfappserver/root/static/admin/config/items.js b/html/pfappserver/root/static/admin/config/items.js
index <HASH>..<HASH> 100644
--- a/html/pfappserver/root/static/admin/config/items.js
+++ b/html/pfappserver/root/static/admin/config/items.js
@@ -55,7 +55,9 @@ var ItemView = function(options) {
// Display the switch in a modal
var read = $.proxy(this.readItem, this);
- options.parent.on('click', id + ' .item [href$="/read"], ' + id + ' [href$="/clone"], .createItem', read);
+ options.parent.on('click', id + ' .item [href$="/read"]', read);
+ options.parent.on('click', id + ' [href$="/clone"]', read);
+ options.parent.on('click', '.createItem', read);
// Save the modifications from the modal
var update = $.proxy(this.updateItem, this); | Split up the click selector for the read action |
diff --git a/packages/colony-js-client/src/lib/EthersWrappedWallet/index.js b/packages/colony-js-client/src/lib/EthersWrappedWallet/index.js
index <HASH>..<HASH> 100644
--- a/packages/colony-js-client/src/lib/EthersWrappedWallet/index.js
+++ b/packages/colony-js-client/src/lib/EthersWrappedWallet/index.js
@@ -40,6 +40,14 @@ export default class EthersWrappedWallet {
return this.wallet.signMessage(payload);
}
+ async getNonce(): Promise<number | void> {
+ // MetaMask logs a warning if the nonce is already set, so only set the
+ // nonce for other wallet types.
+ return this.wallet.subtype === 'metamask'
+ ? undefined
+ : this.getTransactionCount();
+ }
+
/**
* Given a partial transaction request, sets the remaining required fields,
* signs the transaction with the Purser wallet and sends it using the
@@ -58,7 +66,7 @@ export default class EthersWrappedWallet {
.mul(new BigNumber('12'))
.div(new BigNumber('10')),
gasPrice: gasPrice ? new BigNumber(gasPrice) : await this.getGasPrice(),
- nonce: nonce || (await this.getTransactionCount()),
+ nonce: nonce || (await this.getNonce()),
to,
value,
}; | Don't set MM nonce
* Do not set the nonce for MetaMask wallets (`EthersWrappedWallet`) |
diff --git a/sem/runner.py b/sem/runner.py
index <HASH>..<HASH> 100644
--- a/sem/runner.py
+++ b/sem/runner.py
@@ -153,9 +153,17 @@ class SimulationRunner(object):
end = time.time() # Time execution
if execution.returncode > 0:
- print('Simulation exited with an error.'
- '\nStderr: %s\nStdout: %s' % (execution.stderr,
- execution.stdout))
+ complete_command = [self.script]
+ complete_command.extend(command[1:])
+ complete_command = "./waf --run \"%s\"" % ' '.join(complete_command)
+
+ raise Exception(('Simulation exited with an error.\n'
+ 'Params: %s\n'
+ '\nStderr: %s\n'
+ 'Stdout: %s\n'
+ 'Use the following command to reproduce:\n%s'
+ % (parameter, execution.stderr,
+ execution.stdout, complete_command)))
current_result['time'] = end-start | Provide the user with a command to replicate crashing simulations |
diff --git a/src/web/header.php b/src/web/header.php
index <HASH>..<HASH> 100644
--- a/src/web/header.php
+++ b/src/web/header.php
@@ -46,7 +46,7 @@ function <?php echo $iname; ?>loadMessagesXHROHandler() {
for (var i = 0; i < oXMLData.length; i++) {
sHTML += "<div class=\"messageblock\">\r\n";
sHTML += " <div class=\"header\">\r\n";
- sHTML += " <div class=\"date_time\">" + oXMLData[i].getElementsByTagName("date_time")[0].childNodes[0].data + "</div>\r\n";
+ sHTML += " <div class=\"datetime\">" + oXMLData[i].getElementsByTagName("date_time")[0].childNodes[0].data + "</div>\r\n";
sHTML += " <div class=\"username\"><span class=\"name\">" + oXMLData[i].getElementsByTagName("sendername")[0].childNodes[0].data +
"</span> <span class=\"said\">said...</span></div>\r\n";
sHTML += " </div>\r\n"; | Consistent class name for datetimes |
diff --git a/tests/PhpCodeExtractorTest.php b/tests/PhpCodeExtractorTest.php
index <HASH>..<HASH> 100644
--- a/tests/PhpCodeExtractorTest.php
+++ b/tests/PhpCodeExtractorTest.php
@@ -17,6 +17,8 @@ class PhpCodeExtractorTest extends PHPUnit_Framework_TestCase
$this->assertInstanceOf('Gettext\\Translation', $translations->find(null, 'text 7 (with parenthesis)'));
$this->assertInstanceOf('Gettext\\Translation', $translations->find(null, 'text 8 "with escaped double quotes"'));
$this->assertInstanceOf('Gettext\\Translation', $translations->find(null, 'text 9 \'with single quotes\''));
+
+ $this->assertCount(12, $translations);
}
public function testMultiline()
diff --git a/tests/files/phpcode.php b/tests/files/phpcode.php
index <HASH>..<HASH> 100644
--- a/tests/files/phpcode.php
+++ b/tests/files/phpcode.php
@@ -45,3 +45,5 @@
</div>
</div>
</div>");
+?>
+<p><?php __(''); ?></p>
\ No newline at end of file | added a simple test for #<I> |
diff --git a/ui/ui.js b/ui/ui.js
index <HASH>..<HASH> 100644
--- a/ui/ui.js
+++ b/ui/ui.js
@@ -238,9 +238,12 @@ shaka.ui.Overlay.createUI_ = function(container, video, config) {
const player = new shaka.Player(video);
const ui = new shaka.ui.Overlay(player, container, video, config);
- // If the browser's native controls are disabled, use UI TextDisplayer.
+ // If the browser's native controls are disabled, use UI TextDisplayer. Right
+ // now because the factory must be a constructor and () => {} can't be a
+ // constructor.
if (!video.controls) {
- player.configure('textDisplayFactory',
+ player.configure(
+ 'textDisplayFactory',
function() { return new shaka.ui.TextDisplayer(video, container); });
} | Correct Factory-Constructor Syntax
Right now because the text displayer factory must be a constructor
and () => {} can't be a constructor, we need to change function-syntax
used in ui/ui.js.
Change-Id: Ib<I>b<I>c5a<I>a<I>ed<I>b1bee<I>dad |
diff --git a/squad/core/notification.py b/squad/core/notification.py
index <HASH>..<HASH> 100644
--- a/squad/core/notification.py
+++ b/squad/core/notification.py
@@ -109,5 +109,6 @@ def __send_notification__(project, notification):
emails = [r.email for r in recipients]
message = EmailMultiAlternatives(subject, text_message, sender, emails)
- message.attach_alternative(html_message, "text/html")
+ if project.html_mail:
+ message.attach_alternative(html_message, "text/html")
message.send()
diff --git a/test/core/test_notification.py b/test/core/test_notification.py
index <HASH>..<HASH> 100644
--- a/test/core/test_notification.py
+++ b/test/core/test_notification.py
@@ -149,3 +149,13 @@ class TestSendNotification(TestCase):
send_notification(self.project)
self.assertEqual(2, len(mail.outbox))
+
+ def test_send_plain_text_only(self):
+ self.project.subscriptions.create(email='foo@example.com')
+ self.project.html_mail = False
+ self.project.save()
+ ProjectStatus.create_or_update(self.build2)
+
+ send_notification(self.project)
+ msg = mail.outbox[0]
+ self.assertEqual(0, len(msg.alternatives)) | core/notification: send plain text-only emails |
diff --git a/src/redux/urlQueryReducer.js b/src/redux/urlQueryReducer.js
index <HASH>..<HASH> 100644
--- a/src/redux/urlQueryReducer.js
+++ b/src/redux/urlQueryReducer.js
@@ -9,6 +9,9 @@ import UrlUpdateTypes from '../UrlUpdateTypes';
/**
* Reducer that handles actions that modify the URL query parameters.
* In this case, the actions replace a single query parameter at a time.
+ *
+ * NOTE: This is *NOT* a Redux reducer. It does not map from (state, action) -> state.
+ * Instead it "reduces" actions into URL query parameter state. NOT redux state.
*/
export default function urlQueryReducer(action, location) {
const updateType = action && action.meta && action.meta.updateType; | Clarify urlQueryReducer is not a redux reducer |
diff --git a/tests/test_components.py b/tests/test_components.py
index <HASH>..<HASH> 100644
--- a/tests/test_components.py
+++ b/tests/test_components.py
@@ -154,9 +154,6 @@ class ComponentTestCase(TestCase):
sorted_out = date_sorted_sources(*sources)
- import time
- time.sleep(.25)
-
prev = None
sort_count = 0
for msg in sorted_out: | dropped an extraneous sleep in the test |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -98,9 +98,21 @@ function LineCounter(contents) {
eolIndex = contents.length - 1;
}
}
-
return currentLine;
}
+
+ /**
+ * Returns the location (line-nr and column-nr) of a char index
+ * within the string.
+ * @returns {{column: number, line: number}
+ */
+ this.locate = function(charIndex) {
+ var line = this.countUpTo(charIndex);
+ return {
+ column: charIndex - startOfLineIndex,
+ line: line
+ }
+ }
}
module.exports = LineCounter; | "locate"-function to return line and column-number of a char-index |
diff --git a/core/src/main/java/com/datastax/oss/driver/internal/core/DefaultCluster.java b/core/src/main/java/com/datastax/oss/driver/internal/core/DefaultCluster.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/datastax/oss/driver/internal/core/DefaultCluster.java
+++ b/core/src/main/java/com/datastax/oss/driver/internal/core/DefaultCluster.java
@@ -229,8 +229,7 @@ public class DefaultCluster implements Cluster {
connectFuture.complete(session);
}
},
- adminExecutor)
- .exceptionally(UncaughtExceptions::log);
+ adminExecutor);
}
} | Remove spurious warning when session creation fails
The error is already handled in whenCompleteAsync, no need to warn. |
diff --git a/lib/restclient/payload.rb b/lib/restclient/payload.rb
index <HASH>..<HASH> 100644
--- a/lib/restclient/payload.rb
+++ b/lib/restclient/payload.rb
@@ -9,7 +9,7 @@ module RestClient
def generate(params)
if params.is_a?(String)
Base.new(params)
- elsif params and params.is_a?(Hash)
+ elsif params.is_a?(Hash)
if params.delete(:multipart) == true || has_file?(params)
Multipart.new(params)
else | removed a redudndant nil-check in payload.rb |
diff --git a/nodeconductor/structure/models.py b/nodeconductor/structure/models.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/structure/models.py
+++ b/nodeconductor/structure/models.py
@@ -129,7 +129,6 @@ class Customer(core_models.UuidMixin,
target_models=lambda: Resource.get_private_cloud_models(),
path_to_scope='project.customer',
)
-
nc_service_project_link_count = quotas_fields.CounterQuotaField(
target_models=lambda: ServiceProjectLink.get_all_models(),
path_to_scope='project.customer',
@@ -332,6 +331,10 @@ class Project(core_models.DescribableMixin,
target_models=lambda: Resource.get_vm_models(),
path_to_scope='project',
)
+ nc_private_cloud_count = quotas_fields.CounterQuotaField(
+ target_models=lambda: Resource.get_private_cloud_models(),
+ path_to_scope='project',
+ )
nc_service_project_link_count = quotas_fields.CounterQuotaField(
target_models=lambda: ServiceProjectLink.get_all_models(),
path_to_scope='project', | Add private cloud quotas on project level too.
- SAAS-<I> |
diff --git a/src/main/QafooLabs/Refactoring/Adapters/Symfony/OutputPatchCommand.php b/src/main/QafooLabs/Refactoring/Adapters/Symfony/OutputPatchCommand.php
index <HASH>..<HASH> 100644
--- a/src/main/QafooLabs/Refactoring/Adapters/Symfony/OutputPatchCommand.php
+++ b/src/main/QafooLabs/Refactoring/Adapters/Symfony/OutputPatchCommand.php
@@ -37,6 +37,10 @@ class OutputPatchCommand implements ApplyPatchCommand
*/
public function apply($patch)
{
+ if (empty($patch)) {
+ return;
+ }
+
$this->output->writeln($patch);
}
} | Prevent empty patches to render as line breaks. |
diff --git a/src/lib/baseClient.js b/src/lib/baseClient.js
index <HASH>..<HASH> 100644
--- a/src/lib/baseClient.js
+++ b/src/lib/baseClient.js
@@ -114,7 +114,7 @@ define([
newValue: value,
path: absPath
};
- return store.setNodeData(absPath, value, true, undefined, mimeType);
+ return sync.set(absPath, { data: value, mimeType: mimeType });
}).then(function() {
fireModuleEvent('change', moduleName, changeEvent);
if(moduleName !== 'root') {
diff --git a/src/lib/sync.js b/src/lib/sync.js
index <HASH>..<HASH> 100644
--- a/src/lib/sync.js
+++ b/src/lib/sync.js
@@ -767,7 +767,13 @@ define([
}
},
- set: function(path) {},
+ set: function(path, node) {
+ if(caching.cachePath(path)) {
+ return store.setNodeData(path, node.data, true, undefined, node.mimeType);
+ } else {
+ return remoteAdapter.set(path, node);
+ }
+ },
remove: function(path) {
if(caching.cachePath(path)) { | BaseClient~set calls sync.set instead of talking to store directly now. That way caching are evaluated in a central place. (previously storing directly to remote was broken) |
diff --git a/restapi.go b/restapi.go
index <HASH>..<HASH> 100644
--- a/restapi.go
+++ b/restapi.go
@@ -844,13 +844,13 @@ func (s *Session) GuildMemberEdit(guildID, userID string, roles []string) (err e
// GuildMemberMove moves a guild member from one voice channel to another/none
// guildID : The ID of a Guild.
// userID : The ID of a User.
-// channelID : The ID of a channel to move user to, or null?
+// channelID : The ID of a channel to move user to or nil to remove from voice channel
// NOTE : I am not entirely set on the name of this function and it may change
// prior to the final 1.0.0 release of Discordgo
-func (s *Session) GuildMemberMove(guildID, userID, channelID string) (err error) {
+func (s *Session) GuildMemberMove(guildID string, userID string, channelID *string) (err error) {
data := struct {
- ChannelID string `json:"channel_id"`
+ ChannelID *string `json:"channel_id"`
}{channelID}
_, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) | Update GuildMemberMove to support removing from all voice channels (#<I>) |
diff --git a/console/apps/install.php b/console/apps/install.php
index <HASH>..<HASH> 100644
--- a/console/apps/install.php
+++ b/console/apps/install.php
@@ -267,8 +267,15 @@ class CORE_NAILS_Install extends CORE_NAILS_App
);
$vars[] = array(
+ 'key' => 'APP_DEFAULT_TIMEZONE',
+ 'label' => 'App Timezone',
+ 'value' => date_default_timezone_get(),
+ 'options' => array()
+ );
+
+ $vars[] = array(
'key' => 'APP_PRIVATE_KEY',
- 'label' => 'App\'s Private Key',
+ 'label' => 'App Private Key',
'value' => md5(rand(0,1000) . microtime(true)),
'options' => array()
); | Added APP_DEFAULT_TIMEZONE to installer |
diff --git a/FormBuilder.php b/FormBuilder.php
index <HASH>..<HASH> 100644
--- a/FormBuilder.php
+++ b/FormBuilder.php
@@ -189,7 +189,7 @@ class FormBuilder {
*/
public function input($type, $name, $value = null, $options = array())
{
- $options['name'] = $name;
+ if ( ! isset($options['name'])) $options['name'] = $name;
// We will get the appropriate value for the given field. We will look for the
// value in the session for the value in the old input data then we'll look | Don't override names if they have been explicitly set. |
diff --git a/batman/transitmodel.py b/batman/transitmodel.py
index <HASH>..<HASH> 100644
--- a/batman/transitmodel.py
+++ b/batman/transitmodel.py
@@ -133,7 +133,7 @@ class TransitModel(object):
if nthreads > multiprocessing.cpu_count(): raise Exception("Maximum number of threads is "+'{0:d}'.format(multiprocessing.cpu_count()))
elif nthreads <= 1: raise Exception("Number of threads must be between 2 and {0:d}".format(multiprocessing.cpu_count()))
else: raise Exception("OpenMP not enabled: do not set the nthreads parameter")
- self.ds = _rsky._rsky(self.t_supersample, params.t0, params.per, params.a, params.inc*pi/180., params.ecc, params.w*pi/180., self.transittype, self.nthreads)
+ self.ds = _rsky._rsky(self.t_supersample, params.t0, params.per, params.a, params.inc*pi/180., params.ecc, params.w*pi/180., self.transittype, self.nthreads)
def calc_err(self, plot = False):
""" | correct tab/spacing inconsistency |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -34,8 +34,9 @@ setup(name='amibaker',
],
},
install_requires=[
- "awsclpy",
- "fabric",
- "jinja2",
+ "awsclpy==0.2.2",
+ "Fabric==1.10.2",
+ "Jinja2==2.7.3",
+ "PyYAML==3.11",
],
zip_safe=False) | Fixed and improve setup.py dependencies |
diff --git a/spec/javascripts/jax/model_spec.js b/spec/javascripts/jax/model_spec.js
index <HASH>..<HASH> 100644
--- a/spec/javascripts/jax/model_spec.js
+++ b/spec/javascripts/jax/model_spec.js
@@ -17,6 +17,11 @@ describe("Jax.Model", function() {
expect(model.find("name").fired).toBeTrue();
});
+
+ it("should raise an error when searching for a missing ID", function() {
+ model.addResources({"one": { } });
+ expect(function() { model.find("two") }).toThrow(new Error("Resource 'two' not found!"));
+ });
it("should assign attribute values", function() {
model.addResources({
@@ -29,7 +34,7 @@ describe("Jax.Model", function() {
});
it("should instantiate a model without default attributes", function() {
- expect(function() { new model(); }).not.toThrow(Error);
+ expect(function() { new model(); }).not.toThrow();
});
}); | An extra (passing) test for Jax.Model |
diff --git a/netdiff/info.py b/netdiff/info.py
index <HASH>..<HASH> 100644
--- a/netdiff/info.py
+++ b/netdiff/info.py
@@ -1,4 +1,4 @@
-VERSION = (0, 2, 0, 'final')
+VERSION = (0, 3, 0, 'alpha')
__version__ = VERSION | Updated VERSION to <I> alpha |
diff --git a/lib/built_in_data.rb b/lib/built_in_data.rb
index <HASH>..<HASH> 100644
--- a/lib/built_in_data.rb
+++ b/lib/built_in_data.rb
@@ -41,8 +41,12 @@ module BuiltInData
end
def load_yaml_data
- # allow a standard key to be used for doing defaults in YAML
- YAML.load(read_and_erb_process_yaml_file).except('DEFAULTS')
+ # allow a standard key to be used for defaults in YAML files
+ YAML.safe_load(
+ read_and_erb_process_yaml_file,
+ permitted_classes: [Date],
+ aliases: true
+ ).except('DEFAULTS')
end
def read_and_erb_process_yaml_file | change yaml load to safe_load |
diff --git a/lib/chef/knife/cookbook_readme_from.rb b/lib/chef/knife/cookbook_readme_from.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/knife/cookbook_readme_from.rb
+++ b/lib/chef/knife/cookbook_readme_from.rb
@@ -1,12 +1,12 @@
require 'chef/knife'
-require 'knife_cookbook_readme/readme_model'
+require 'pathname'
module KnifeCookbookReadme
class CookbookReadmeFrom < Chef::Knife
deps do
require 'chef/cookbook/metadata'
require 'erubis'
- require 'pathname'
+ require 'knife_cookbook_readme/readme_model'
end
banner 'knife cookbook readme from FILE (options)' | Make use of knife's lazy loader |
diff --git a/sdk/src/main/java/com/wonderpush/sdk/remoteconfig/RemoteConfig.java b/sdk/src/main/java/com/wonderpush/sdk/remoteconfig/RemoteConfig.java
index <HASH>..<HASH> 100644
--- a/sdk/src/main/java/com/wonderpush/sdk/remoteconfig/RemoteConfig.java
+++ b/sdk/src/main/java/com/wonderpush/sdk/remoteconfig/RemoteConfig.java
@@ -68,7 +68,7 @@ public class RemoteConfig {
JSONObject data = json.optJSONObject("data");
String version = json.getString("version");
Long maxAge = json.optLong("maxAge", json.optLong("cacheTtl", 0));
- Long minAge = json.optLong("minAge", 0);
+ Long minAge = json.optLong("minAge", json.optLong("cacheMinAge", 0));
Long fetchTime = json.optLong("fetchDate", DateHelper.now().getTime());
return RemoteConfig.with(data == null ? new JSONObject() : data, version, new Date(fetchTime), maxAge, minAge);
} catch (JSONException e) { | support for alt syntax "cacheMinAge" |
diff --git a/peewee.py b/peewee.py
index <HASH>..<HASH> 100644
--- a/peewee.py
+++ b/peewee.py
@@ -528,6 +528,10 @@ class PostgresqlDatabase(Database):
AND relname=%s""", (sequence,))
return bool(res.fetchone()[0])
+ def set_search_path(self, *search_path):
+ path_params = ','.join(['%s'] * len(search_path))
+ self.execute('SET search_path TO %s' % path_params, search_path)
+
class MySQLDatabase(Database):
def __init__(self, database, **connect_kwargs):
@@ -2729,4 +2733,4 @@ class Model(object):
obj = self.select(fields).get(**{self._meta.pk_name: self.get_pk()})
for field_name in fields:
- setattr(self, field_name, getattr(obj, field_name))
\ No newline at end of file
+ setattr(self, field_name, getattr(obj, field_name)) | Adding a method for setting the schema search path when using psql |
diff --git a/gremlin-core/src/main/java/com/tinkerpop/gremlin/util/iterator/IteratorUtils.java b/gremlin-core/src/main/java/com/tinkerpop/gremlin/util/iterator/IteratorUtils.java
index <HASH>..<HASH> 100644
--- a/gremlin-core/src/main/java/com/tinkerpop/gremlin/util/iterator/IteratorUtils.java
+++ b/gremlin-core/src/main/java/com/tinkerpop/gremlin/util/iterator/IteratorUtils.java
@@ -64,11 +64,7 @@ public class IteratorUtils {
}
public static <S> List<S> list(final Iterator<S> iterator) {
- final List<S> list = new ArrayList<>();
- while (iterator.hasNext()) {
- list.add(iterator.next());
- }
- return list;
+ return fill(iterator, new ArrayList<S>());
}
/////////////// | Refactor list() method in IteratorUtils to use fill() |
diff --git a/classes/fields/pick.php b/classes/fields/pick.php
index <HASH>..<HASH> 100644
--- a/classes/fields/pick.php
+++ b/classes/fields/pick.php
@@ -221,10 +221,12 @@ class PodsField_Pick extends PodsField {
'groupby' => pods_var( 'pick_groupby', $options, null, null, true )
) );
- foreach ( $results as $result ) {
- $result = get_object_vars( $result );
+ if ( !empty( $data->table ) ) {
+ foreach ( $results as $result ) {
+ $result = get_object_vars( $result );
- $options[ 'data' ][ $result[ $data->field_id ] ] = $result[ $data->field_index ];
+ $options[ 'data' ][ $result[ $data->field_id ] ] = $result[ $data->field_index ];
+ }
}
} | Quick patch to avoid errors if table is empty |
diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Feature/Vector.js
+++ b/lib/OpenLayers/Feature/Vector.js
@@ -322,8 +322,6 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
* - strokeLinecap: "round", [butt | round | square]
* - strokeDashstyle: "solid", [dot | dash | dashdot | longdash | longdashdot | solid]
* - pointRadius: 6,
- * - hoverPointRadius: 1,
- * - hoverPointUnit: "%",
* - pointerEvents: "visiblePainted"
* - cursor: ""
* | These too, right? Unimplemented property docs (see r<I>).
git-svn-id: <URL> |
diff --git a/org.jgrapes.portal/src/org/jgrapes/portal/PortalLocalBackedKVStore.java b/org.jgrapes.portal/src/org/jgrapes/portal/PortalLocalBackedKVStore.java
index <HASH>..<HASH> 100644
--- a/org.jgrapes.portal/src/org/jgrapes/portal/PortalLocalBackedKVStore.java
+++ b/org.jgrapes.portal/src/org/jgrapes/portal/PortalLocalBackedKVStore.java
@@ -78,7 +78,7 @@ public class PortalLocalBackedKVStore extends Component {
channel.setAssociated(PortalLocalBackedKVStore.class, event);
String keyStart = portalPrefix
+ PortalLocalBackedKVStore.class.getName() + "/";
- fire(new JsonOutput("retrieveLocalData", keyStart), channel);
+ channel.respond(new JsonOutput("retrieveLocalData", keyStart));
}
@Handler
@@ -126,8 +126,8 @@ public class PortalLocalBackedKVStore extends Component {
data.remove(action.key());
}
}
- fire(new JsonOutput("storeLocalData",
- new Object[] { actions.toArray() }), channel);
+ channel.respond(new JsonOutput("storeLocalData",
+ new Object[] { actions.toArray() }));
}
@Handler | Use proper queue for JsonOutput events. |
diff --git a/worldengine/draw.py b/worldengine/draw.py
index <HASH>..<HASH> 100644
--- a/worldengine/draw.py
+++ b/worldengine/draw.py
@@ -801,6 +801,6 @@ def draw_scatter_plot_on_file(world, filename):
def draw_satellite_on_file(world, filename):
- img = ImagePixelSetter(world.width, world.height, filename)
+ img = PNGWriter(world.width, world.height, filename)
draw_satellite(world, img)
img.complete() | Updated satellite-drawing routine to use the new PNGWriter-class. |
diff --git a/src/Contracts/Client.php b/src/Contracts/Client.php
index <HASH>..<HASH> 100644
--- a/src/Contracts/Client.php
+++ b/src/Contracts/Client.php
@@ -8,15 +8,6 @@ use Psr\Http\Message\ResponseInterface;
interface Client
{
/**
- * Use custom API Endpoint.
- *
- * @param string $endpoint
- *
- * @return $this
- */
- public function useCustomApiEndpoint(string $endpoint);
-
- /**
* Get API endpoint URL.
*
* @return string | Remove useCustomApiEndpoint from contract. |
diff --git a/lib/draw/Renderer.js b/lib/draw/Renderer.js
index <HASH>..<HASH> 100644
--- a/lib/draw/Renderer.js
+++ b/lib/draw/Renderer.js
@@ -64,6 +64,8 @@ Renderer.prototype.drawCell = function drawCell(gfx, data) {
} else if(!!data.content.tagName) {
gfx.childNodes[0].appendChild(data.content);
}
+ } else {
+ gfx.childNodes[0].textContent = '';
}
this._eventBus.fire('cell.render', { | fix(renderer): update empty cells
related to CAM-<I>, CAM-<I> |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,7 @@
# -*- encoding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
+import codecs
import re
from setuptools import setup
@@ -11,16 +12,17 @@ def get_version(filename):
"""
Return package version as listed in `__version__` in `filename`.
"""
- init_py = open(filename).read()
+ with codecs.open(filename, 'r', 'utf-8') as fp:
+ init_py = fp.read()
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
version = get_version('flake8_tidy_imports.py')
-with open('README.rst') as readme_file:
+with codecs.open('README.rst', 'r', 'utf-8') as readme_file:
readme = readme_file.read()
-with open('HISTORY.rst') as history_file:
+with codecs.open('HISTORY.rst', 'r', 'utf-8') as history_file:
history = history_file.read()
setup( | setup.py - use codecs.open and context manager |
diff --git a/imdb.class.php b/imdb.class.php
index <HASH>..<HASH> 100644
--- a/imdb.class.php
+++ b/imdb.class.php
@@ -10,7 +10,7 @@
* @author Fabian Beiner (mail [AT] fabian-beiner [DOT] de)
* @license MIT License
*
-* @version 4.4.1 (September 28th, 2010)
+* @version 4.4.2 (September 30th, 2010)
*
*/ | Forgot to change version number... :) |
diff --git a/src/collection/index.js b/src/collection/index.js
index <HASH>..<HASH> 100644
--- a/src/collection/index.js
+++ b/src/collection/index.js
@@ -7,24 +7,17 @@ var Element = require('./element');
// factory for generating edge ids when no id is specified for a new element
var idFactory = {
- prefix: {
- nodes: 'n',
- edges: 'e'
- },
- id: {
- nodes: 0,
- edges: 0
- },
+ prefix: 'ele',
+ id: 0,
generate: function(cy, element, tryThisId){
var json = is.element( element ) ? element._private : element;
- var group = json.group;
- var id = tryThisId != null ? tryThisId : this.prefix[group] + this.id[group];
+ var id = tryThisId != null ? tryThisId : this.prefix + this.id;
if( cy.getElementById(id).empty() ){
- this.id[group]++; // we've used the current id, so move it up
+ this.id++; // we've used the current id, so move it up
} else { // otherwise keep trying successive unused ids
while( !cy.getElementById(id).empty() ){
- id = this.prefix[group] + ( ++this.id[group] );
+ id = this.prefix + ( ++this.id );
}
} | fixes autogenerated ids with inferred group |
diff --git a/lib/resque/worker.rb b/lib/resque/worker.rb
index <HASH>..<HASH> 100644
--- a/lib/resque/worker.rb
+++ b/lib/resque/worker.rb
@@ -181,7 +181,7 @@ module Resque
def reserve
queues.each do |queue|
log! "Checking #{queue}"
- if job = Resque::Job.reserve(queue)
+ if job = Resque.reserve(queue)
log! "Found job on #{queue}"
return job
end | Make worker use global Resque.reserve method to allow for a single point of override. |
diff --git a/openid/fetchers.py b/openid/fetchers.py
index <HASH>..<HASH> 100644
--- a/openid/fetchers.py
+++ b/openid/fetchers.py
@@ -6,12 +6,12 @@ This module contains the HTTP fetcher interface and several implementations.
__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse',
'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError',
'HTTPError']
-
try:
- import urllib2
-except:
# Python 3
import urllib.request as urllib2
+except ImportError:
+ import urllib2
+
import time
import cStringIO
import sys | Reverse order of import checks -- should keep 2to3 from messing things up |
diff --git a/lib/sinatra/main.rb b/lib/sinatra/main.rb
index <HASH>..<HASH> 100644
--- a/lib/sinatra/main.rb
+++ b/lib/sinatra/main.rb
@@ -17,7 +17,7 @@ module Sinatra
op.on('-e env') { |val| set :environment, val.to_sym }
op.on('-s server') { |val| set :server, val }
op.on('-p port') { |val| set :port, val.to_i }
- op.on('-b addr') { |val| set :bind, val }
+ op.on('-o addr') { |val| set :bind, val }
}.parse!(ARGV.dup)
end
end | use -o over -b to set bind address
to match rackup behavior |
diff --git a/code/libraries/koowa/components/com_activities/controller/behavior/loggable.php b/code/libraries/koowa/components/com_activities/controller/behavior/loggable.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/components/com_activities/controller/behavior/loggable.php
+++ b/code/libraries/koowa/components/com_activities/controller/behavior/loggable.php
@@ -92,8 +92,7 @@ class ComActivitiesControllerBehaviorLoggable extends KControllerBehaviorAbstrac
$config = new KObjectConfig(array(
'row' => $row,
'status' => $status,
- 'context' => $command,
- 'event' => $name));
+ 'command' => $command));
try {
$this->getObject($this->_controller)->add($this->_getActivityData($config));
@@ -119,11 +118,11 @@ class ComActivitiesControllerBehaviorLoggable extends KControllerBehaviorAbstrac
*/
protected function _getActivityData(KObjectConfig $config)
{
- $context = $config->context;
- $identifier = $this->getActivityIdentifier($context);
+ $command = $config->command;
+ $identifier = $this->getActivityIdentifier($command);
$data = array(
- 'action' => $context->action,
+ 'action' => $command->action,
'application' => $identifier->domain,
'type' => $identifier->type,
'package' => $identifier->package, | Synced with FW changes.
Replaced context with command. |
diff --git a/php-typography/class-php-typography.php b/php-typography/class-php-typography.php
index <HASH>..<HASH> 100644
--- a/php-typography/class-php-typography.php
+++ b/php-typography/class-php-typography.php
@@ -2185,7 +2185,7 @@ class PHP_Typography {
if ( ! empty( $func ) && ! empty( $func['substr'] ) ) {
return preg_replace( $this->regex['controlCharacters'], '', $func['substr']( $previous_textnode->data, - 1 ) );
}
- } // @codeCoverageIgnore.
+ } // @codeCoverageIgnore
return '';
}
@@ -2206,7 +2206,7 @@ class PHP_Typography {
if ( ! empty( $func ) && ! empty( $func['substr'] ) ) {
return preg_replace( $this->regex['controlCharacters'], '', $func['substr']( $next_textnode->data, 0, 1 ) );
}
- } // @codeCoverageIgnore.
+ } // @codeCoverageIgnore
return '';
} | Code coverage pragma fix |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.