hash
stringlengths 40
40
| diff
stringlengths 131
26.7k
| message
stringlengths 7
694
| project
stringlengths 5
67
| split
stringclasses 1
value | diff_languages
stringlengths 2
24
|
---|---|---|---|---|---|
d84fdca108bd57240e0830cef1b58c82a58beee0 | diff --git a/psamm/lpsolver/lp.py b/psamm/lpsolver/lp.py
index <HASH>..<HASH> 100644
--- a/psamm/lpsolver/lp.py
+++ b/psamm/lpsolver/lp.py
@@ -555,6 +555,7 @@ class Constraint(object):
class VariableNamespace(object):
def __init__(self, problem, **kwargs):
+ self._name = kwargs.pop('name', None)
self._problem = problem
self._define_kwargs = kwargs
@@ -583,8 +584,8 @@ class VariableNamespace(object):
return self._problem.result.get_value((self, name))
def __repr__(self):
- return '<{} of {} ({})>'.format(
- self.__class__.__name__, repr(self._problem), id(self))
+ name = repr(self._name) if self._name is not None else 'Unnamed'
+ return str('<{}: {}>').format(self.__class__.__name__, name)
@add_metaclass(abc.ABCMeta) | lp: Assign name to variable namespace
This improves debugging by allowing the namespace representation
to show the name. | zhanglab_psamm | train | py |
664f7213070ccb0ff8ddc97f1c504e0d89906c35 | diff --git a/lib/apiary/command/preview.rb b/lib/apiary/command/preview.rb
index <HASH>..<HASH> 100644
--- a/lib/apiary/command/preview.rb
+++ b/lib/apiary/command/preview.rb
@@ -3,6 +3,7 @@ require 'rest_client'
require 'rack'
require 'ostruct'
require 'json'
+require 'tmpdir'
require "apiary/common"
@@ -74,7 +75,8 @@ module Apiary
def preview_path(path)
basename = File.basename(@options.path)
- "/tmp/#{basename}-preview.html"
+ temp = Dir.tempdir()
+ "#{temp}/#{basename}-preview.html"
end
def query_apiary(host, path) | Fixing hardcoded tmp path
Temp path is hardcoded so it won't work on windows, this should now work across platforms | apiaryio_apiary-client | train | rb |
fb76a093b35b23a00ed87a723b284179cd22bdb6 | diff --git a/openpyscad/base.py b/openpyscad/base.py
index <HASH>..<HASH> 100644
--- a/openpyscad/base.py
+++ b/openpyscad/base.py
@@ -63,7 +63,6 @@ class MetaObject(type):
return type.__new__(mcs, name, bases, attr)
-#class _BaseObject(ModifierMixin, object, metaclass=MetaObject):
class _BaseObject(with_metaclass(MetaObject, ModifierMixin, object)):
#__metaclass__ = MetaObject | suppression of the extra metaclass line (was only useful for python 3) | taxpon_openpyscad | train | py |
7769b30dc45d165d0f7f600ae0ae9eae9d6420a0 | diff --git a/integration/networking/ip_test.go b/integration/networking/ip_test.go
index <HASH>..<HASH> 100644
--- a/integration/networking/ip_test.go
+++ b/integration/networking/ip_test.go
@@ -94,4 +94,26 @@ var _ = Describe("IP settings", func() {
})
})
+ Describe("the internet", func() {
+ It("is reachable from inside the container", func() {
+ stdout := gbytes.NewBuffer()
+ stderr := gbytes.NewBuffer()
+
+ process, err := container.Run(api.ProcessSpec{
+ Path: "/bin/ping",
+ Args: []string{"-c", "2", "8.8.8.8"},
+ }, api.ProcessIO{
+ Stdout: stdout,
+ Stderr: stderr,
+ })
+ Ω(err).ShouldNot(HaveOccurred())
+
+ rc, err := process.Wait()
+ Ω(err).ShouldNot(HaveOccurred())
+ Ω(rc).Should(Equal(0))
+
+ Ω(stdout.Contents()).Should(ContainSubstring("0% packet loss"))
+ })
+ })
+
}) | Test internet connectivity
[#<I>] | cloudfoundry-attic_garden-linux | train | go |
ae717e617566a08dd94e12b66f94739b5cb538e1 | diff --git a/helper/hashcode/hashcode.go b/helper/hashcode/hashcode.go
index <HASH>..<HASH> 100644
--- a/helper/hashcode/hashcode.go
+++ b/helper/hashcode/hashcode.go
@@ -9,7 +9,7 @@ import (
// String hashes a string to a unique hashcode.
//
// crc32 returns a uint32, but for our use we need
-// and non negative integer. Here we cast to an integer
+// a non negative integer. Here we cast to an integer
// and invert it if the result is negative.
func String(s string) int {
v := int(crc32.ChecksumIEEE([]byte(s))) | Update hashcode.go
Updating the comment `we need and non negative integer` to `we need a non negative integer` | hashicorp_terraform | train | go |
d592159cc5c815fb0c44bed69474cc77bb1bd840 | diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py
index <HASH>..<HASH> 100644
--- a/searx/engines/startpage.py
+++ b/searx/engines/startpage.py
@@ -16,7 +16,7 @@ from lxml import html
from babel import Locale
from babel.localedata import locale_identifiers
-from searx import network
+from searx.network import get
from searx.utils import extract_text, eval_xpath, match_language
from searx.exceptions import (
SearxEngineResponseException,
@@ -84,7 +84,7 @@ def get_sc_code(headers):
if time() > (sc_code_ts + 3000):
logger.debug("query new sc time-stamp ...")
- resp = network.get(base_url, headers=headers)
+ resp = get(base_url, headers=headers)
raise_captcha(resp)
dom = html.fromstring(resp.text) | [fix] startpage: workaround to use the startpage network
workaround for the issue #<I> | asciimoo_searx | train | py |
a3d1907b01980de034995c73e5d0c24edf4cedcd | diff --git a/src/JPush/PushPayload.php b/src/JPush/PushPayload.php
index <HASH>..<HASH> 100644
--- a/src/JPush/PushPayload.php
+++ b/src/JPush/PushPayload.php
@@ -49,6 +49,7 @@ class PushPayload {
public function setCid($cid) {
$this->cid = trim($cid);
+ return $this;
}
public function setPlatform($platform) {
diff --git a/src/JPush/version.php b/src/JPush/version.php
index <HASH>..<HASH> 100644
--- a/src/JPush/version.php
+++ b/src/JPush/version.php
@@ -1,4 +1,4 @@
<?php
namespace JPush;
- const VERSION = '3.5.21';
+ const VERSION = '3.5.22'; | add missing `return $this` in method setCid() | jpush_jpush-api-php-client | train | php,php |
71e327494eb9fe1fc05fb80cf87bad324f319194 | diff --git a/mmcv/runner/epoch_based_runner.py b/mmcv/runner/epoch_based_runner.py
index <HASH>..<HASH> 100644
--- a/mmcv/runner/epoch_based_runner.py
+++ b/mmcv/runner/epoch_based_runner.py
@@ -118,7 +118,7 @@ class EpochBasedRunner(BaseRunner):
for _ in range(epochs):
if mode == 'train' and self.epoch >= max_epochs:
- return
+ break
epoch_runner(data_loaders[i], **kwargs)
time.sleep(1) # wait for some hooks like loggers to finish
diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py
index <HASH>..<HASH> 100644
--- a/mmcv/runner/iter_based_runner.py
+++ b/mmcv/runner/iter_based_runner.py
@@ -115,7 +115,7 @@ class IterBasedRunner(BaseRunner):
iter_runner = getattr(self, mode)
for _ in range(iters):
if mode == 'train' and self.iter >= max_iters:
- return
+ break
iter_runner(iter_loaders[i], **kwargs)
time.sleep(1) # wait for some hooks like loggers to finish | [Bug]: return directly from running function (#<I>)
* fix bug of return directly from run function
* fix epoch based runner
* remove debug print | open-mmlab_mmcv | train | py,py |
a9666065a2ddcb7b0396d6aa16c3fba05a7204c0 | diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index <HASH>..<HASH> 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -43,26 +43,6 @@ module Puppet
end
end
- # FIXARB: Check this... I think it is exactly the same as the Ensure classes.
- def change_to_s(currentvalue, newvalue)
- begin
- if currentvalue == :absent
- return "created"
- elsif newvalue == :absent
- return "removed"
- else
- return "%s changed '%s' to '%s'" %
- [self.name, self.is_to_s(currentvalue), self.should_to_s(newvalue)]
- end
- rescue Puppet::Error, Puppet::DevError
- raise
- rescue => detail
- raise Puppet::DevError,
- "Could not convert change %s to string: %s" %
- [self.name, detail]
- end
- end
-
def retrieve
if provider.exists?
return :present
@@ -186,8 +166,7 @@ module Puppet
group should not be listed. Multiple groups should be
specified as an array."
- # FIXARB: Whoa... That should method requires is?
- def should_to_s(newvalue = @should)
+ def should_to_s(newvalue)
self.should
end | Removed override of change_to_s since it is the same as the overridden method in EnsureProperty.
git-svn-id: <URL> | puppetlabs_puppet | train | rb |
93d5ac9a311282517a03b47ca9b54be7847aef0f | diff --git a/src/scales/scale.time.js b/src/scales/scale.time.js
index <HASH>..<HASH> 100644
--- a/src/scales/scale.time.js
+++ b/src/scales/scale.time.js
@@ -1,4 +1,3 @@
-/* global window: false */
'use strict';
var adapter = require('../core/core.adapters')._date; | Remove unused eslint directive (#<I>) | chartjs_Chart.js | train | js |
32abed29d48060883b1370ac558ef5addc56b0dc | diff --git a/lib/packets/handshake_response.js b/lib/packets/handshake_response.js
index <HASH>..<HASH> 100644
--- a/lib/packets/handshake_response.js
+++ b/lib/packets/handshake_response.js
@@ -132,7 +132,7 @@ HandshakeResponse.prototype.toPacket = function ()
}
// dry run: calculate resulting packet length
var p = this.serializeResponse(Packet.MockBuffer());
- return this.serializeResponse(Buffer.allocUnsafe(p.offset));
+ return this.serializeResponse(Buffer.alloc(p.offset));
};
module.exports = HandshakeResponse; | `packet.skip(<I>);` means <I> unsafe bytes leak over wire
you may discard if not that important :) | sidorares_node-mysql2 | train | js |
609620a39c79dc410943e5fcce0425f6ef32cd3e | diff --git a/docs/exts/docs_build/fetch_inventories.py b/docs/exts/docs_build/fetch_inventories.py
index <HASH>..<HASH> 100644
--- a/docs/exts/docs_build/fetch_inventories.py
+++ b/docs/exts/docs_build/fetch_inventories.py
@@ -92,13 +92,14 @@ def fetch_inventories():
f'{CACHE_DIR}/{pkg_name}/objects.inv',
)
)
- to_download.append(
- (
- "apache-airflow",
- S3_DOC_URL_VERSIONED.format(package_name='apache-airflow'),
- f'{CACHE_DIR}/apache-airflow/objects.inv',
+ for pkg_name in ['apache-airflow', 'helm-chart']:
+ to_download.append(
+ (
+ pkg_name,
+ S3_DOC_URL_VERSIONED.format(package_name=pkg_name),
+ f'{CACHE_DIR}/{pkg_name}/objects.inv',
+ )
)
- )
for pkg_name in ['apache-airflow-providers', 'docker-stack']:
to_download.append(
( | Fetch Helm Chart inventory from remote cache (#<I>) | apache_airflow | train | py |
3830142a8340dd23a87379efb9465a97b2dda905 | diff --git a/Exception/FormValidationException.php b/Exception/FormValidationException.php
index <HASH>..<HASH> 100644
--- a/Exception/FormValidationException.php
+++ b/Exception/FormValidationException.php
@@ -82,10 +82,7 @@ class FormValidationException extends \Exception
{
$errors = [];
foreach ($form->all() as $child) {
- if (empty($child)) {
- continue;
- }
- if (!$child->isValid()) {
+ if (!empty($child) && !$child->isValid()) {
foreach ($this->getErrorMessages($child) as $error) {
$errors[] = $error;
} | - Doing two comparisons at once | mediamonks_symfony-rest-api-bundle | train | php |
1c0d8ce093323e1e459d2fefd9ca1dacfb7c42b1 | diff --git a/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py
index <HASH>..<HASH> 100644
--- a/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py
+++ b/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py
@@ -88,10 +88,9 @@ class SetInstanceDetailsAction(workflows.Action):
flavor = forms.ChoiceField(label=_("Flavor"),
help_text=_("Size of image to launch."))
- count = forms.IntegerField(label=_("Instance Count"),
+ count = forms.IntegerField(label=_("Number of Instances"),
min_value=1,
- initial=1,
- help_text=_("Number of instances to launch."))
+ initial=1)
source_type = forms.ChoiceField(label=_("Instance Boot Source"),
help_text=_("Choose Your Boot Source " | Simplify "Instance Count" verbiage
When launching an instance, having the field "Instance Count" with the
help message of "Number of instances to launch" does not seem very
useful from a users perspective. Simply naming the field "Number of
Instances" clarifies the purpose of this field and removes the need for
any help message.
Change-Id: If0b0e<I>bf4d1ba<I>fd<I>c<I>eaf<I>eb | openstack_horizon | train | py |
d84d12572b018e880edb050efda8c0def4ca6b15 | diff --git a/classes/Boom/Controller.php b/classes/Boom/Controller.php
index <HASH>..<HASH> 100755
--- a/classes/Boom/Controller.php
+++ b/classes/Boom/Controller.php
@@ -38,6 +38,12 @@ class Controller extends \Controller
/**
*
+ * @var Boom\Environment\Environment
+ */
+ public $environment;
+
+ /**
+ *
* @var Boom
*/
public $boom;
@@ -63,6 +69,7 @@ class Controller extends \Controller
public function before()
{
$this->boom = Boom::instance();
+ $this->environment = $this->boom->getEnvironment();
$this->session = Session::instance();
$this->auth = new Auth(Config::get('auth'), $this->session); | Added environment property to Boom\Controller | boomcms_boom-core | train | php |
8357fbb93fc2250ea7b162f7f84bf2c2fb4b2d61 | diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -38,7 +38,13 @@ class Configuration implements ConfigurationInterface
->arrayNode('directories')
->info('List of directories relative to the kernel root directory containing classes.')
->prototype('scalar')->end()
- ->defaultValue(['../src/*Bundle/{Action,Command,Controller,EventSubscriber,Twig}'])
+ ->defaultValue([
+ '../src/*Bundle/Action',
+ '../src/*Bundle/Command',
+ '../src/*Bundle/Controller',
+ '../src/*Bundle/EventSubscriber',
+ '../src/*Bundle/Twig',
+ ])
->end()
->arrayNode('tags')
->info('List of tags to add when implementing the corresponding class.') | Bugfix for non GLOB_BRACE exist platforms (#<I>) | dunglas_DunglasActionBundle | train | php |
3dcba681e1cf00146adc3722e84e570efd1472b6 | diff --git a/src/adafruit_blinka/board/beaglebone_pocketbeagle.py b/src/adafruit_blinka/board/beaglebone_pocketbeagle.py
index <HASH>..<HASH> 100644
--- a/src/adafruit_blinka/board/beaglebone_pocketbeagle.py
+++ b/src/adafruit_blinka/board/beaglebone_pocketbeagle.py
@@ -98,6 +98,10 @@ LED_USR3 = pin.USR3
# P2_9 (I2C1_SCL => SCL_1) clock signal
SDA_1 = pin.P2_11
SCL_1 = pin.P2_9
+# for Example compatibility
+SDA = SDA_1
+SCL = SCL_1
+
# I2C2 pins
# P1_26 (I2C2_SDA => SDA_2) data signal | [board pocketbeagle] add SDA & SCL aliases | adafruit_Adafruit_Blinka | train | py |
2cdf4451bf27fa9b025d76e95901ee00adb5a58e | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index <HASH>..<HASH> 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 0.1.3
+current_version = 0.1.4
files = setup.py bioinfo/__init__.py
commit = True
tag = False
diff --git a/bioinfo/__init__.py b/bioinfo/__init__.py
index <HASH>..<HASH> 100644
--- a/bioinfo/__init__.py
+++ b/bioinfo/__init__.py
@@ -24,7 +24,7 @@ from bioinfo import bam_coverage as bam_coverage_mod
from bioinfo.bam_coverage import bam_coverage
-__version__ = "0.1.3"
+__version__ = "0.1.4"
__author__ = "Luiz Irber"
__license__ = "BSD License"
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ def read(fname):
setup(
name='bioinfo',
- version="0.1.3",
+ version="0.1.4",
description='Bioinformatics scripts',
long_description=read("README.rst"),
author='Luiz Irber', | New version: <I>
* bam_coverage has an additional argument, minlen, allowing to discard
alignments smaller than a percentage of the read length.
* Better testing.
* Support for Python <I>+ (still need dependencies upstream PR to be
merged). | luizirber_bioinfo | train | cfg,py,py |
3fa12df9f04bf6e8402edd80983175e8eb9f8499 | diff --git a/wsapi.go b/wsapi.go
index <HASH>..<HASH> 100644
--- a/wsapi.go
+++ b/wsapi.go
@@ -79,7 +79,7 @@ func (s *Session) Open() error {
header.Add("accept-encoding", "zlib")
s.wsConn, _, err = websocket.DefaultDialer.Dial(s.gateway, header)
if err != nil {
- s.log(LogWarning, "error connecting to gateway %s, %s", s.gateway, err)
+ s.log(LogError, "error connecting to gateway %s, %s", s.gateway, err)
s.gateway = "" // clear cached gateway
s.wsConn = nil // Just to be safe.
return err | Change log level for websocket connection failure from warning to error | bwmarrin_discordgo | train | go |
baa486b076bd1724ea6c06333b716ac3b43f4faf | diff --git a/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java b/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java
index <HASH>..<HASH> 100644
--- a/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java
+++ b/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java
@@ -693,12 +693,6 @@ public class JavaCodeGen extends CodeGenBase
javaFileName = generatedModule.getName();
}
-
- if (JavaCodeGenUtil.isQuote(generatedModule.getIrNode(), getJavaSettings()))
- {
- javaFileName += JavaQuoteValueCreator.JAVA_QUOTE_NAME_SUFFIX;
- }
-
javaFileName += IJavaConstants.JAVA_FILE_EXTENSION;
emitCode(moduleOutputDir, javaFileName, generatedModule.getContent()); | Java CG: fix file name of quote classes | overturetool_overture | train | java |
23988700932ddfdcb384fb46a795943b1749ed36 | diff --git a/lib/rgitflow/tasks/release/finish.rb b/lib/rgitflow/tasks/release/finish.rb
index <HASH>..<HASH> 100644
--- a/lib/rgitflow/tasks/release/finish.rb
+++ b/lib/rgitflow/tasks/release/finish.rb
@@ -22,6 +22,11 @@ module RGitFlow
abort
end
+ msg = %Q(merging #{branch} into #{RGitFlow::Config.options[:develop]})
+
+ @git.branch(RGitFlow::Config.options[:develop]).checkout
+ @git.merge branch, msg
+
msg = %Q(merging #{branch} into #{RGitFlow::Config.options[:master]})
@git.branch(RGitFlow::Config.options[:master]).checkout | release:finish now merges into develop too | Nunnery_rgitflow | train | rb |
dea31b5c7dbf636164d89a7189a1fdc5dbc506e7 | diff --git a/conn.go b/conn.go
index <HASH>..<HASH> 100644
--- a/conn.go
+++ b/conn.go
@@ -518,6 +518,10 @@ func (c *Conn) clientHandshake() error {
ch := &clientHelloBody{
cipherSuites: c.config.CipherSuites,
}
+ _, err := prng.Read(ch.random[:])
+ if err != nil {
+ return err
+ }
for _, ext := range []extensionBody{&sni, &ks, &sg, &sa, &dv} {
err := ch.extensions.Add(ext)
if err != nil {
@@ -808,6 +812,10 @@ func (c *Conn) serverHandshake() error {
sh := &serverHelloBody{
cipherSuite: chosenSuite,
}
+ _, err = prng.Read(sh.random[:])
+ if err != nil {
+ return err
+ }
if sendKeyShare {
sh.extensions.Add(serverKeyShare)
} | Actually put random bytes in ClientHello/ServerHello.Random | bifurcation_mint | train | go |
d91398cfb5c1fe74694345301596a738b811ffcd | diff --git a/core/Singleton.php b/core/Singleton.php
index <HASH>..<HASH> 100644
--- a/core/Singleton.php
+++ b/core/Singleton.php
@@ -7,8 +7,8 @@ trait Singleton
public static function instance()
{
static $instance;
- if (!isset($instance)) {
- $class = get_called_class();
+ $class = get_called_class();
+ if (!isset($instance) || get_class($instance) != $class) {
$instance = new $class;
}
return $instance; | only return $instance if it is actually the exact same class (todo: store in an array, would be even better) | monolyth-php_frontal | train | php |
67ada8ee1152ba369f973fa5604665f05a1fa8ac | diff --git a/lib/nominet-epp/client.rb b/lib/nominet-epp/client.rb
index <HASH>..<HASH> 100644
--- a/lib/nominet-epp/client.rb
+++ b/lib/nominet-epp/client.rb
@@ -254,7 +254,7 @@ module NominetEPP
:crDate => res.creation_date }
end
else
- @error_info = { :name => res.message, :reason => resp.error_reason }
+ @error_info = { :name => res.message, :reason => res.error_reason }
return false
end
end | Fix typo in OldAPI shim | m247_nominet-epp | train | rb |
192a9b06c0546bbc23b9babce258ec0d56cc951c | diff --git a/gptools/utils.py b/gptools/utils.py
index <HASH>..<HASH> 100644
--- a/gptools/utils.py
+++ b/gptools/utils.py
@@ -20,7 +20,7 @@
from __future__ import division
-from .gaussian_process import *
+from .gaussian_process import GaussianProcess
from .error_handling import GPArgumentError
import multiprocessing | Try to fix small namespace bug in utils. | markchil_gptools | train | py |
9f9cc4870d821f8d85008c2e78a299ad06c1c427 | diff --git a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+++ b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
@@ -447,7 +447,7 @@ class MySqlPlatform extends AbstractPlatform
if (isset($options['uniqueConstraints']) && ! empty($options['uniqueConstraints'])) {
foreach ($options['uniqueConstraints'] as $index => $definition) {
- $queryFields .= ', ' . $this->getUniqueIndexDeclarationSql($index, $definition);
+ $queryFields .= ', ' . $this->getUniqueConstraintDeclarationSql($index, $definition);
}
} | [<I>][DDC-<I>] Enhanced unique constraints to support names. Fixed general issues on XML and YAML exporters. Fixed issues on XML, YAML, Doctrine 1.X and Annotation drivers. | doctrine_annotations | train | php |
33fa3f84d6b21b2bdeb28e3f08623673cb1c3200 | diff --git a/src/data-tier.js b/src/data-tier.js
index <HASH>..<HASH> 100644
--- a/src/data-tier.js
+++ b/src/data-tier.js
@@ -316,8 +316,9 @@
});
}
RulesSet.prototype = new RulesSet();
- RulesSet.prototype.add('tieText', 'textContent');
RulesSet.prototype.add('tieValue', 'value');
+ RulesSet.prototype.add('tieText', 'textContent');
+ RulesSet.prototype.add('tiePlaceholder', 'placeholder');
RulesSet.prototype.add('tieTooltip', 'title');
RulesSet.prototype.add('tieImage', 'scr');
@@ -353,11 +354,11 @@
if (change.addedNodes.length) {
for (i = 0, l = change.addedNodes.length; i < l; i++) {
if (change.addedNodes[i].nodeName === 'IFRAME') {
- collectViews(change.addedNodes[i].contentDocument);
initDomObserver(change.addedNodes[i].contentDocument);
+ collectViews(change.addedNodes[i].contentDocument);
change.addedNodes[i].addEventListener('load', function () {
+ initDomObserver(this.contentDocument); // TODO: check if you need this function, probably once set it will be working regardless reload
collectViews(this.contentDocument);
- initDomObserver(this.contentDocument);
});
} else {
collectViews(change.addedNodes[i]); | added OOTB tie for placeholders and remark to check tomorrow | gullerya_data-tier | train | js |
d7b859e1f389d4c40f11d417002f6e0fe6ca09e4 | diff --git a/changelog.md b/changelog.md
index <HASH>..<HASH> 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,7 @@
+# 1.0.7 (under development)
+
+- Provide compatibility with Foliant 1.0.7.
+
# 1.0.6
- Apply `flatten` after all preprocessors, not before them. This fixes incompatibility with foliantcontrib.includes 1.0.5.
diff --git a/foliant/backends/pandoc.py b/foliant/backends/pandoc.py
index <HASH>..<HASH> 100644
--- a/foliant/backends/pandoc.py
+++ b/foliant/backends/pandoc.py
@@ -149,7 +149,7 @@ class Backend(BaseBackend):
self.logger.debug(f'Backend inited: {self.__dict__}')
def make(self, target: str) -> str:
- with spinner(f'Making {target} with Pandoc', self.logger, self.quiet):
+ with spinner(f'Making {target} with Pandoc', self.logger, self.debug):
try:
if target == 'pdf':
command = self._get_pdf_command()
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ setup(
license='MIT',
platforms='any',
install_requires=[
- 'foliant>=1.0.5',
+ 'foliant>=1.0.7',
'foliantcontrib.flatten>=1.0.2'
],
classifiers=[ | Provide compatibility with Foliant <I>. | foliant-docs_foliantcontrib.pandoc | train | md,py,py |
8e32737be44fb9ea900db59cdbdc67a0017c7cbd | diff --git a/slugid.js b/slugid.js
index <HASH>..<HASH> 100644
--- a/slugid.js
+++ b/slugid.js
@@ -52,7 +52,7 @@ exports.v4 = function() {
do {
var bytes = uuid.v4(null, new Buffer(16));
var base64 = bytes.toString('base64');
- } while (/^\+/.test(base64)); // disallow leading '-' ('+' => '-' below)
+ } while (base64[0] == '+'); // disallow leading '-' ('+' => '-' below)
var slug = base64
.replace(/\+/g, '-') // Replace + with - (see RFC 4648, sec. 5)
.replace(/\//g, '_') // Replace / with _ (see RFC 4648, sec. 5) | don't match first character with regex, use explicit base<I>[0] | taskcluster_slugid | train | js |
dc39438551f3cefa3d0d3851a5c4921c874c6f9e | diff --git a/node-tests/unit/tasks/setup-webview-test.js b/node-tests/unit/tasks/setup-webview-test.js
index <HASH>..<HASH> 100644
--- a/node-tests/unit/tasks/setup-webview-test.js
+++ b/node-tests/unit/tasks/setup-webview-test.js
@@ -77,4 +77,23 @@ describe('Setup Webview Task', function() {
setupTask.run();
td.verify(rawDouble('add', 'cordova-plugin-wkwebview-engine', isAnything));
});
+
+ describe('invalid platform/webview combinations', function() {
+ it('warns ios users if crosswalk=true', function() {
+ setupTask.crosswalk = true;
+ let warnDouble = td.replace(setupTask, 'warnPlatform');
+
+ setupTask.run();
+ td.verify(warnDouble('ios', 'crosswalk=true'));
+ });
+
+ it('warns android users if uiwebview=true', function() {
+ setupTask.platform = 'android';
+ setupTask.uiwebview = true;
+ let warnDouble = td.replace(setupTask, 'warnPlatform');
+
+ setupTask.run();
+ td.verify(warnDouble('android', 'uiwebview=true'));
+ });
+ });
}); | test(webviews): assert warning for wrong platform/view combinations | isleofcode_ember-cordova | train | js |
0102bd47d83ebc3f1c09c5f0a5c36dbea33c60b2 | diff --git a/tests/suites/test-pd.js b/tests/suites/test-pd.js
index <HASH>..<HASH> 100644
--- a/tests/suites/test-pd.js
+++ b/tests/suites/test-pd.js
@@ -1,11 +1,10 @@
exports.setup = function(Tests){
-var os = require('os'),
- path = require('path'),
+var path = require('path'),
pd = require('../../lib/station/modules/pd').Wrapper;
function getPdPath(){
- if (os.platform() == 'darwin'){
+ if (process.platform == 'darwin'){
return '/Applications/Pd-0.43-2.app/Contents/Resources/bin/pd';
} else {
return 'pd';
@@ -13,8 +12,7 @@ function getPdPath(){
}
var dir = path.dirname(path.relative(process.cwd(), process.argv[1]));
-//console.log(process.cwd(), process.argv[1]);
-console.log();
+
Tests.describe('Pd wrapper', function(it){ | use process.platform to determine pd location | thisconnect_port | train | js |
2a3a63857c1f6dd403d17908bea6faa0bf0bbb4d | diff --git a/modules/system/classes/CombineAssets.php b/modules/system/classes/CombineAssets.php
index <HASH>..<HASH> 100644
--- a/modules/system/classes/CombineAssets.php
+++ b/modules/system/classes/CombineAssets.php
@@ -175,7 +175,7 @@ class CombineAssets
$combiner = $this->prepareCombiner($cacheInfo['files']);
$contents = $combiner->dump();
- $mime = ($cacheInfo['extension'] == 'css') ? 'text/css' : 'text/javascript';
+ $mime = ($cacheInfo['extension'] == 'css') ? 'text/css' : 'application/javascript';
header_remove();
$response = Response::make($contents); | text/javascript is obsolete. Fixes #<I> | octobercms_october | train | php |
98290647b2b069657494d75005285a2894f57e25 | diff --git a/client/cmd_signup.go b/client/cmd_signup.go
index <HASH>..<HASH> 100644
--- a/client/cmd_signup.go
+++ b/client/cmd_signup.go
@@ -307,9 +307,11 @@ func (s *CmdSignupState) MakePrompter() {
func (v *CmdSignupState) GetUsage() libkb.Usage {
return libkb.Usage{
- Config: true,
- API: true,
- Terminal: true,
+ Config: true,
+ GpgKeyring: false,
+ KbKeyring: true,
+ API: true,
+ Terminal: true,
}
} | fixed cmd signup usage to include kbkeyring, which fixes signup in standalone mode | keybase_client | train | go |
6895873b1db87e07221a4b428cff42989d85b972 | diff --git a/elki-clustering/src/main/java/elki/clustering/kmeans/XMeans.java b/elki-clustering/src/main/java/elki/clustering/kmeans/XMeans.java
index <HASH>..<HASH> 100644
--- a/elki-clustering/src/main/java/elki/clustering/kmeans/XMeans.java
+++ b/elki-clustering/src/main/java/elki/clustering/kmeans/XMeans.java
@@ -46,6 +46,7 @@ import elki.distance.NumberVectorDistance;
import elki.distance.minkowski.SquaredEuclideanDistance;
import elki.logging.Logging;
import elki.logging.progress.MutableProgress;
+import elki.logging.statistics.LongStatistic;
import elki.logging.statistics.StringStatistic;
import elki.math.MathUtil;
import elki.result.Metadata;
@@ -207,6 +208,7 @@ public class XMeans<V extends NumberVector, M extends MeanModel> extends Abstrac
prog.setTotal(k);
prog.setProcessed(k, LOG);
}
+ LOG.statistics(new LongStatistic(KEY + ".num-clusters", clusters.size()));
Clustering<M> result = new Clustering<>(clusters);
Metadata.of(result).setLongName("X-Means Clustering");
return result; | Log the number of clusters in xmeans. | elki-project_elki | train | java |
c726328859ab9ac632dd51c1bb02b30236f7fffc | diff --git a/lib/negasonic/time.rb b/lib/negasonic/time.rb
index <HASH>..<HASH> 100644
--- a/lib/negasonic/time.rb
+++ b/lib/negasonic/time.rb
@@ -2,6 +2,9 @@ module Negasonic
module Time
CYCLE_DURATION = 1200
NOTATION = 'i'
+ # HACK: theres some delay each time the next cycle is played, causing the first note
+ # to be missed by tone js
+ ERROR_MARGIN = 15
@just_started = true
class << self
@@ -12,7 +15,7 @@ module Negasonic
block.call
else
Tone::Transport.schedule_once(
- `((Tone.Transport.nextCycleNumber) * #{CYCLE_DURATION}) + #{NOTATION}`,
+ `((Tone.Transport.nextCycleNumber) * #{CYCLE_DURATION}) - #{ERROR_MARGIN} + #{NOTATION}`,
&block
)
end | fix for first sequence note not being played | merongivian_negasonic | train | rb |
ca83085d68286866f6aa8c98b90445d345b8d7fd | diff --git a/jmock/src/java/test/jmock/constraint/IsEqualTest.java b/jmock/src/java/test/jmock/constraint/IsEqualTest.java
index <HASH>..<HASH> 100644
--- a/jmock/src/java/test/jmock/constraint/IsEqualTest.java
+++ b/jmock/src/java/test/jmock/constraint/IsEqualTest.java
@@ -73,7 +73,7 @@ public class IsEqualTest extends TestCase {
assertTrue("Should not equal a different array", !c.eval(i3));
assertTrue("Should not equal a different sized array", !c.eval(i4));
assertTrue("Should not equal a different sized subarray", !c.eval(i5));
- }
+ }
public void testReturnsAnObviousDescriptionIfCreatedWithANestedConstraint() {
assertEquals("Should get an obvious toString to reflect nesting if viewed in a debugger",
@@ -93,5 +93,5 @@ public class IsEqualTest extends TestCase {
assertEquals("Should print toString even if argument is null",
" = null", new IsEqual(null).toString());
}
-
}
+ | Cleaned up IsEqual implementation
IsEqual can now compare arrays of primitive types
IsEqual can now compare arrays of arrays | jmock-developers_jmock-library | train | java |
c14bdca9a6caa9f4009af1de3c2342fb558ffe97 | diff --git a/src/Gzero/Core/Handler/Content/Content.php b/src/Gzero/Core/Handler/Content/Content.php
index <HASH>..<HASH> 100644
--- a/src/Gzero/Core/Handler/Content/Content.php
+++ b/src/Gzero/Core/Handler/Content/Content.php
@@ -142,8 +142,8 @@ class Content implements ContentTypeHandler {
$titles = $this->contentRepo->getTitlesTranslationFromUrl($contentUrl, $lang->code);
$titlesAndUrls = $this->contentRepo->matchTitlesWithUrls($titles, $contentUrl, $lang->code);
- foreach ($titlesAndUrls as $key) {
- $breadcrumbs->push($titlesAndUrls[$key]['title'], $titlesAndUrls[$key]['url']);
+ foreach ($titlesAndUrls as $item) {
+ $breadcrumbs->push($item['title'], $item['url']);
}
}
); | Fix. (#<I>) | GrupaZero_cms | train | php |
69b6c12dd67ed4bf1a6c62f33c34ad8279d86cbd | diff --git a/qiniustorage/backends.py b/qiniustorage/backends.py
index <HASH>..<HASH> 100644
--- a/qiniustorage/backends.py
+++ b/qiniustorage/backends.py
@@ -208,7 +208,7 @@ class QiniuMediaStorage(QiniuStorage):
location = settings.MEDIA_ROOT
-class QiniuStaticStorage(QiniuMediaStorage):
+class QiniuStaticStorage(QiniuStorage):
location = settings.STATIC_ROOT or "static" | QiniuStaticStorage should inherit from QiniuStorage directly | glasslion_django-qiniu-storage | train | py |
1a14db46bec3935c07278346173e602a29bd96a0 | diff --git a/PJV.js b/PJV.js
index <HASH>..<HASH> 100644
--- a/PJV.js
+++ b/PJV.js
@@ -30,7 +30,7 @@
"files": {"type": "array"},
"main": {"type": "string"},
"bin": {"types": ["string", "object"]},
- "man": {"type": "object"},
+ "man": {"types": ["string", "array"]},
"directories": {"type": "object"},
"repository": {"types": ["string", "object"], warning: true, validate: PJV.validateUrlTypes, or: "repositories"},
"scripts": {"type": "object"}, | Fix type of man field to accept string or array
See npm spec for details, man can be either a string path to man file, or an
array of strings for several man files, similar to bin | gorillamania_package.json-validator | train | js |
c1298c42563affdcab54b5ab494eae1781f75989 | diff --git a/src/style_manager/index.js b/src/style_manager/index.js
index <HASH>..<HASH> 100644
--- a/src/style_manager/index.js
+++ b/src/style_manager/index.js
@@ -74,17 +74,21 @@ module.exports = () => {
var ppfx = c.pStylePrefix;
if (ppfx) c.stylePrefix = ppfx + c.stylePrefix;
-
properties = new Properties();
- sectors = new Sectors(c.sectors, c);
+ sectors = new Sectors([], c);
SectView = new SectorsView({
collection: sectors,
target: c.em,
config: c
});
+
return this;
},
+ onLoad() {
+ sectors.add(c.sectors);
+ },
+
postRender() {
const elTo = this.getConfig().appendTo; | Load sectors in onLoad in Style Manager | artf_grapesjs | train | js |
945c4253f890b0048a31da7c4a8a7c06625457c7 | diff --git a/quad/value.go b/quad/value.go
index <HASH>..<HASH> 100644
--- a/quad/value.go
+++ b/quad/value.go
@@ -95,10 +95,24 @@ func AsValue(v interface{}) (out Value, ok bool) {
out = String(v)
case int:
out = Int(v)
- case int64:
+ case int8:
+ out = Int(v)
+ case int16:
out = Int(v)
case int32:
out = Int(v)
+ case int64:
+ out = Int(v)
+ case uint:
+ out = Int(v)
+ case uint8:
+ out = Int(v)
+ case uint16:
+ out = Int(v)
+ case uint32:
+ out = Int(v)
+ case uint64:
+ out = Int(v)
case float64:
out = Float(v)
case float32: | Added unsigned integer types (#<I>)
* Added unsigned integer types
* Uint needs more work. We use Int for now. It will break large uint<I> values, but the fix on the client side will be just uint<I>(v.Native().(int<I>)). | cayleygraph_cayley | train | go |
356b8a56f9519c189007ab915ad1dd95b647cd01 | diff --git a/src/test/java/com/tomgibara/bits/BitStoreTest.java b/src/test/java/com/tomgibara/bits/BitStoreTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/tomgibara/bits/BitStoreTest.java
+++ b/src/test/java/com/tomgibara/bits/BitStoreTest.java
@@ -435,6 +435,21 @@ public abstract class BitStoreTest extends TestCase {
}
}
+ public void testPositionsRemove() {
+ if (!isValidSize(5)) return;
+ BitStore store = newStore(Bits.asStore("10101"));
+ Positions ps = store.ones().positions();
+ assertTrue(ps.hasNext());
+ assertEquals(0, ps.nextPosition());
+ assertTrue(ps.hasNext());
+ assertEquals(2, ps.nextPosition());
+ assertTrue(ps.hasNext());
+ assertEquals(4, ps.nextPosition());
+ ps.remove();
+ assertFalse(ps.hasNext());
+ assertEquals(Bits.asStore("00101"), store);
+ }
+
public void testPositionIterator() {
testPositionIterator(true);
testPositionIterator(false); | Adds an additional test of position iteration. | tomgibara_bits | train | java |
737a13b1de7e1de85a463e21e6023613df3cb011 | diff --git a/fuzzycount.py b/fuzzycount.py
index <HASH>..<HASH> 100644
--- a/fuzzycount.py
+++ b/fuzzycount.py
@@ -9,7 +9,7 @@ from model_utils.managers import PassThroughManager
class FuzzyCountQuerySet(QuerySet):
def count(self):
- is_postgresql = "postgresql" in settings.DATABASES[self.db]["ENGINE"]
+ is_postgresql = settings.DATABASES[self.db]["ENGINE"].endswith(("postgis", "postgresql"))
is_filtered = self.query.where or self.query.having
if not is_postgresql or is_filtered:
return super(FuzzyCountQuerySet, self).count() | PostGIS backend is a Postgres backend, so it should be supported as well | stephenmcd_django-postgres-fuzzycount | train | py |
0bf38b7bf61777223aa8f500f3cf39ffaff1e626 | diff --git a/modules/social_features/social_core/src/Plugin/Field/FieldFormatter/FileAndImageTableFormatter.php b/modules/social_features/social_core/src/Plugin/Field/FieldFormatter/FileAndImageTableFormatter.php
index <HASH>..<HASH> 100644
--- a/modules/social_features/social_core/src/Plugin/Field/FieldFormatter/FileAndImageTableFormatter.php
+++ b/modules/social_features/social_core/src/Plugin/Field/FieldFormatter/FileAndImageTableFormatter.php
@@ -35,6 +35,7 @@ class FileAndImageTableFormatter extends ImageFormatter {
$elements[$delta] = [
'#theme' => 'file_link',
'#file' => $file,
+ '#description' => $item->get('description')->getValue(),
'#cache' => [
'tags' => $file->getCacheTags(),
], | Add description before preprocessing for files | goalgorilla_open_social | train | php |
2febf26bd10edd0cb882a087b4f61bfb3c1830ea | diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -7421,6 +7421,13 @@ const devices = [
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
+ zigbeeModel: ['IM-Z3.0-RGBCCT'],
+ model: '07008L',
+ vendor: 'Immax',
+ description: 'Neo SMART LED strip RGB + CCT, color, dimmable, Zigbee 3.0',
+ extend: generic.light_onoff_brightness_colortemp_colorxy,
+ },
+ {
zigbeeModel: ['Keyfob-ZB3.0'],
model: '07046L',
vendor: 'Immax', | Support for Immax <I>L Led Strip (#<I>)
* Update devices.js
Added Convertor for Immax <I>L Led strip
* Update devices.js
* Update devices.js | Koenkk_zigbee-shepherd-converters | train | js |
b857f3db7053d1bf5ae46d9db644367d7eb17085 | diff --git a/vlan_test.go b/vlan_test.go
index <HASH>..<HASH> 100644
--- a/vlan_test.go
+++ b/vlan_test.go
@@ -125,3 +125,42 @@ func TestVLANUnmarshalBinary(t *testing.T) {
}
}
}
+
+// Benchmarks for VLAN.MarshalBinary
+
+func BenchmarkVLANMarshalBinary(b *testing.B) {
+ v := &VLAN{
+ Priority: PriorityBackground,
+ ID: 10,
+ }
+
+ b.ResetTimer()
+ b.ReportAllocs()
+ for i := 0; i < b.N; i++ {
+ if _, err := v.MarshalBinary(); err != nil {
+ b.Fatal(err)
+ }
+ }
+}
+
+// Benchmarks for VLAN.UnmarshalBinary
+
+func BenchmarkVLANUnmarshalBinary(b *testing.B) {
+ v := &VLAN{
+ Priority: PriorityBestEffort,
+ ID: 20,
+ }
+
+ vb, err := v.MarshalBinary()
+ if err != nil {
+ b.Fatal(err)
+ }
+
+ b.ResetTimer()
+ b.ReportAllocs()
+ for i := 0; i < b.N; i++ {
+ if err := v.UnmarshalBinary(vb); err != nil {
+ b.Fatal(err)
+ }
+ }
+} | vlan_test: add benchmarks for VLAN.{M,Unm}arshalBinary | mdlayher_ethernet | train | go |
22f220e35aab5fb121f98aa9a52b5053a785d86f | diff --git a/config/global.ini.php b/config/global.ini.php
index <HASH>..<HASH> 100644
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -6,6 +6,7 @@
; edit config/config.ini.php and add the following:
; [General]
; action_title_category_delimiter = "-"
+; segment_editor_required_access = "admin"
;--------
; WARNING - YOU SHOULD NOT EDIT THIS FILE DIRECTLY - Edit config.ini.php instead. | PIWIK-<I> changed segmentEditor so it has configurable access level | matomo-org_matomo | train | php |
8cb56d009d40287f12b9d1eac31194c69077b067 | diff --git a/src/components/props/watchExpressions.js b/src/components/props/watchExpressions.js
index <HASH>..<HASH> 100644
--- a/src/components/props/watchExpressions.js
+++ b/src/components/props/watchExpressions.js
@@ -50,6 +50,7 @@ function notify (setter, inQuirkMode) {
* @param options.depth 'reference'|'value'|'collection'
* @param options.quirk 'reference'|'value'|'collection'
* @param scope Object
+ * @param type String 'props'|'attrs'
*/
export default function watchExpressions (dataExprsMap, reactiveData, options, scope, type) {
let expressions | docs(watchExpressions): add new param type | ngVue_ngVue | train | js |
9aa69c94fa0847e3de80823eb6e2302c20713b6f | diff --git a/persephone/corpus.py b/persephone/corpus.py
index <HASH>..<HASH> 100644
--- a/persephone/corpus.py
+++ b/persephone/corpus.py
@@ -64,6 +64,9 @@ class Corpus:
self.train_prefixes = utils.sort_by_size(
self.feat_dir, self.train_prefixes, feat_type)
+ # Ensure no overlap between training and test sets
+ self.ensure_no_set_overlap()
+
self.untranscribed_prefixes = self.get_untranscribed_prefixes()
def get_wav_dir(self):
@@ -347,3 +350,16 @@ class ReadyCorpus(Corpus):
raise
phonemes = phonemes.union(line_phonemes)
return phonemes
+
+ def ensure_no_set_overlap(self):
+ """ Ensures no test set data has creeped into the training set."""
+
+ train = set(self.get_train_fns()[0])
+ valid = set(self.get_valid_fns()[0])
+ test = set(self.get_test_fns()[0])
+ assert train - valid == train
+ assert train - test == train
+ assert valid - train == valid
+ assert valid - test == valid
+ assert test - train == test
+ assert test - valid == test | Adding simple check for corpus subset overlap. | persephone-tools_persephone | train | py |
bba50ccce5416482c9fb6b5a410eabe9b7d6d07a | diff --git a/examples/server.js b/examples/server.js
index <HASH>..<HASH> 100644
--- a/examples/server.js
+++ b/examples/server.js
@@ -24,4 +24,24 @@ new compressor.minify({
}
});
+// Using YUI Compressor
+new compressor.minify({
+ type: 'yui',
+ fileIn: './public/css/base.css',
+ fileOut: './public/css/base-min-yui.css',
+ callback: function(err){
+ console.log(err);
+ }
+});
+
+// Using UglifyJS
+new compressor.minify({
+ type: 'uglifyjs',
+ fileIn: './public/css/base.css',
+ fileOut: './public/css/base-min-uglifyjs.css',
+ callback: function(err){
+ console.log(err);
+ }
+});
+
console.log('Server running at http://127.0.0.1:1337/');
\ No newline at end of file | Yui and UglifyJS examples | srod_node-minify | train | js |
6d621252f6440f9a20632beb853846d3d258f8ac | diff --git a/src/com/jfoenix/skins/JFXToggleButtonSkin.java b/src/com/jfoenix/skins/JFXToggleButtonSkin.java
index <HASH>..<HASH> 100644
--- a/src/com/jfoenix/skins/JFXToggleButtonSkin.java
+++ b/src/com/jfoenix/skins/JFXToggleButtonSkin.java
@@ -112,7 +112,7 @@ public class JFXToggleButtonSkin extends ToggleButtonSkin {
circles.setTranslateX((line.getLayoutBounds().getWidth()/2) - circleRadius);
line.setStroke(((JFXToggleButton) getSkinnable()).getToggleLineColor());
circle.setFill(((JFXToggleButton) getSkinnable()).getToggleColor());
- transition.play();
+ transition.playFrom(Duration.millis(100));
}
} | prevent animating initial selection of JFXToggleButton | jfoenixadmin_JFoenix | train | java |
e2e54f2a171666d60cada23d074f2cb41287b025 | diff --git a/stp_core/loop/looper.py b/stp_core/loop/looper.py
index <HASH>..<HASH> 100644
--- a/stp_core/loop/looper.py
+++ b/stp_core/loop/looper.py
@@ -145,8 +145,7 @@ class Looper:
:return: the sum of the number of events executed successfully
"""
# TODO: looks like limit is always None???
- # limit = None
- limit = 100
+ limit = None
s = 0
for n in self.prodables:
s += await n.prod(limit) | Limit queue processing (#<I>)
* Test of queue processing limits | hyperledger_indy-plenum | train | py |
1529d99bc989f195344b7d661fac1ab81451a373 | diff --git a/src/Parser.php b/src/Parser.php
index <HASH>..<HASH> 100644
--- a/src/Parser.php
+++ b/src/Parser.php
@@ -84,7 +84,7 @@ abstract class Parser {
return $this;
}
- final function withErrorLevel($errorLevel)
+ final function withErrorLevel($errorLevel) : self
{
$this->errorLevel = (bool) $errorLevel;
foreach ($this->stack as $substack) { | add forgotten return type decl on Parser::withErrorLevel method | marcioAlmada_yay | train | php |
bef768814769f91c7e337aa69979eb5748a0c09c | diff --git a/app/controllers/socializer/application_controller.rb b/app/controllers/socializer/application_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/socializer/application_controller.rb
+++ b/app/controllers/socializer/application_controller.rb
@@ -2,7 +2,8 @@ module Socializer
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
- protect_from_forgery with: :exception
+ # FIXME: Not sure why protect_from_forgery is no longer working
+ # protect_from_forgery with: :exception
helper_method :current_user
helper_method :signed_in? | having issues with protect_from_forgery. comment out for now | socializer_socializer | train | rb |
7b4c0ea5b22c8d04af896d2bf853a1a7cdaeb670 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -124,8 +124,8 @@ def get_version_info():
vinfo = _version_helper.generate_git_version_info()
except:
vinfo = vdummy()
- vinfo.version = '1.16.dev10'
- vinfo.release = 'False'
+ vinfo.version = '1.16.10'
+ vinfo.release = 'True'
with open('pycbc/version.py', 'w') as f:
f.write("# coding: utf-8\n") | prepare for release (#<I>) | gwastro_pycbc | train | py |
6d580037e3975a49f246ea11986e265cb2de163e | diff --git a/salt/states/pkg.py b/salt/states/pkg.py
index <HASH>..<HASH> 100644
--- a/salt/states/pkg.py
+++ b/salt/states/pkg.py
@@ -666,7 +666,7 @@ def installed(
hold_ret = __salt__['pkg.unhold'](
name=name, pkgs=pkgs, sources=sources
)
- except SaltInvocationError as exc:
+ except (CommandExecutionError, SaltInvocationError) as exc:
return {'name': name,
'changes': {},
'result': False,
@@ -793,7 +793,7 @@ def installed(
hold_ret = __salt__['pkg.unhold'](
name=name, pkgs=pkgs, sources=sources
)
- except SaltInvocationError as exc:
+ except (CommandExecutionError, SaltInvocationError) as exc:
comment.append(exc.message)
return {'name': name,
'changes': changes, | Add CommandExecutionError to exception handling
aptpkg's set_selections (called by hold/unhold) could potentially raise
this exception, so catch it as well. | saltstack_salt | train | py |
97e5cdf19ba297f24c08ec899058765e66e7e208 | diff --git a/src/main/java/org/mapdb/DBMaker.java b/src/main/java/org/mapdb/DBMaker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/mapdb/DBMaker.java
+++ b/src/main/java/org/mapdb/DBMaker.java
@@ -37,7 +37,7 @@ import java.util.logging.Logger;
* <pre>
* DB db = DBMaker
* .memoryDB() //static method
- * .transactinsDisable() //configuration option
+ * .transactionDisable() //configuration option
* .make() //opens db
* </pre>
* | Corrected a typo in comment | jankotek_mapdb | train | java |
f498d792ff3c340b6fd9cde894f3b7e31b4256e8 | diff --git a/pkg/proxy/router/router.go b/pkg/proxy/router/router.go
index <HASH>..<HASH> 100644
--- a/pkg/proxy/router/router.go
+++ b/pkg/proxy/router/router.go
@@ -573,7 +573,7 @@ func NewServer(addr string, debugVarAddr string, conf *Conf) *Server {
startAt: time.Now(),
addr: addr,
concurrentLimiter: utils.NewTokenLimiter(100),
- moper: NewMultiOperator("localhost:" + strings.Split(addr, ":")[1]),
+ moper: NewMultiOperator(addr),
pools: cachepool.NewCachePool(),
} | using config listening address for multi operation | CodisLabs_codis | train | go |
6985c4083f92f2a9930dc47c052f561752a64cba | diff --git a/Neos.Cache/Classes/Backend/MemcachedBackend.php b/Neos.Cache/Classes/Backend/MemcachedBackend.php
index <HASH>..<HASH> 100644
--- a/Neos.Cache/Classes/Backend/MemcachedBackend.php
+++ b/Neos.Cache/Classes/Backend/MemcachedBackend.php
@@ -121,10 +121,10 @@ class MemcachedBackend extends IndependentAbstractBackend implements TaggableBac
if (strpos($server, 'tcp://') === 0) {
$port = $defaultPort;
$server = substr($server, 6);
+ }
- if (strpos($server, ':') !== false) {
- list($host, $port) = explode(':', $server, 2);
- }
+ if (strpos($server, ':') !== false) {
+ [$host, $port] = explode(':', $server, 2);
}
$this->memcache->addServer($host, $port); | BUGFIX: Correctly split memcached server without tcp protocol | neos_flow-development-collection | train | php |
ab7ab5b3f7fb9985b11ad8af20738ac3466426b8 | diff --git a/select2.js b/select2.js
index <HASH>..<HASH> 100644
--- a/select2.js
+++ b/select2.js
@@ -1543,10 +1543,11 @@
return;
}
- if (e.which == KEY.DELETE) {
+ if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
if (this.opts.allowClear) {
this.clear();
}
+ killEvent(e);
return;
} | allow clearing on backspace as well as delete. fixes #<I> | select2_select2 | train | js |
41b9348bf0d30744e43aeebfb05f1f1898ec8df4 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,6 +3,11 @@ import os, sys
from setuptools import setup
from setuptools import find_packages
+# Make the open function accept encodings in python < 3.x
+if sys.version_info[0] < 3:
+ import codecs
+ open = codecs.open # pylint: disable=redefined-builtin
+
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw | Make open function compatible in python <= 3.x | arteria_django-compat | train | py |
bdf4e1081f863b6e296654f25253c3cab98e9b6c | diff --git a/lib/turbograft/version.rb b/lib/turbograft/version.rb
index <HASH>..<HASH> 100644
--- a/lib/turbograft/version.rb
+++ b/lib/turbograft/version.rb
@@ -1,3 +1,3 @@
module TurboGraft
- VERSION = '0.4.1'
+ VERSION = '0.4.2'
end | Version bump to <I> (#<I>) | Shopify_turbograft | train | rb |
fdfe1d4884434fac26b18ae8cc8f8bb8694844a1 | diff --git a/pymrio/tools/ioparser.py b/pymrio/tools/ioparser.py
index <HASH>..<HASH> 100644
--- a/pymrio/tools/ioparser.py
+++ b/pymrio/tools/ioparser.py
@@ -654,7 +654,7 @@ def parse_exiobase2(path, charact=True, popvector='exio2'):
if popvector is 'exio2':
logging.debug('Read population vector')
io.population = pd.read_csv(os.path.join(PYMRIO_PATH['exio20'],
- './misc/population.txt'),
+ 'misc', 'population.txt'),
index_col=0, sep='\t').astype(float)
else:
io.population = popvector | [Issue<I>] fixed OS-specific hard-coded relative path in parse_exiobase2() for population.txt (#<I>) | konstantinstadler_pymrio | train | py |
8e65a0993b19b5de53604d16ce6cdc9cc568d74c | diff --git a/example/app.js b/example/app.js
index <HASH>..<HASH> 100644
--- a/example/app.js
+++ b/example/app.js
@@ -15,8 +15,7 @@ app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
// setup the Nilas API
-require('coffee-script/register');
-global.Nilas = require('../nilas').config({
+global.Nilas = require('nilas').config({
appId: '<app id here>',
appSecret: '<app secret here>'
}); | Updating sample app to use node module | nylas_nylas-nodejs | train | js |
0171e26e48794cf8727ce610f542740bcf10848a | diff --git a/aiosqlite/core.py b/aiosqlite/core.py
index <HASH>..<HASH> 100644
--- a/aiosqlite/core.py
+++ b/aiosqlite/core.py
@@ -96,7 +96,7 @@ class Connection(Thread):
try:
LOG.debug("executing %s", function)
result = function()
- LOG.debug("returning %s", result)
+ LOG.debug("operation %s completed", function)
def set_result(fut, result):
if not fut.done(): | Fix #<I>: stop logging result objects because they can be BIG | jreese_aiosqlite | train | py |
9860c7d8db3a53a951a922058db3f2580c1cafd9 | diff --git a/angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py b/angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py
+++ b/angr/analyses/cfg/indirect_jump_resolvers/default_resolvers.py
@@ -41,7 +41,7 @@ def default_indirect_jump_resolvers(obj, project):
resolvers = [ ]
for k, lst in arch_specific.items():
if isinstance(obj, k):
- resolvers = lst
+ resolvers = list(lst)
break
resolvers += DEFAULT_RESOLVERS['ALL'] | CFGFast: Do not duplicate indirect jump resolvers. (#<I>) | angr_angr | train | py |
6c5b696d260fcdc3d7a49e9a6d3d91cf5edc6a63 | diff --git a/unpy2exe.py b/unpy2exe.py
index <HASH>..<HASH> 100644
--- a/unpy2exe.py
+++ b/unpy2exe.py
@@ -15,7 +15,7 @@ IGNORE = [
def __timestamp():
"""Generate timestamp data for pyc header."""
today = time.time()
- ret = struct.pack('L', int(today))
+ ret = struct.pack('=L', int(today))
return ret
def __build_magic(magic): | Fixed issue with timestamp pack in <I> bits platform | matiasb_unpy2exe | train | py |
9e74ed84d20f564d550fd9b267571c2798318d2e | diff --git a/flannel/main.go b/flannel/main.go
index <HASH>..<HASH> 100644
--- a/flannel/main.go
+++ b/flannel/main.go
@@ -110,9 +110,10 @@ func notifyWebhook(sn *backend.SubnetDef) error {
net := sn.Net
net.IP += 1
data := struct {
+ JobID string `json:"job_id"`
Subnet string `json:"subnet"`
MTU int `json:"mtu"`
- }{net.String(), sn.MTU}
+ }{os.Getenv("FLYNN_JOB_ID"), net.String(), sn.MTU}
payload, _ := json.Marshal(data)
res, err := http.Post(opts.notifyURL, "application/json", bytes.NewReader(payload))
if err != nil {
diff --git a/host/types/types.go b/host/types/types.go
index <HASH>..<HASH> 100644
--- a/host/types/types.go
+++ b/host/types/types.go
@@ -265,6 +265,7 @@ const (
)
type NetworkConfig struct {
+ JobID string `json:"job_id"`
Subnet string `json:"subnet"`
MTU int `json:"mtu"`
Resolvers []string `json:"resolvers"` | flannel/host: Communicate flannel job ID on network notification. | flynn_flynn | train | go,go |
34b9daf6f09e5de63acae0b6feaed2f0917eaaa3 | diff --git a/packages/node_modules/@webex/plugin-meetings/src/constants.js b/packages/node_modules/@webex/plugin-meetings/src/constants.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-meetings/src/constants.js
+++ b/packages/node_modules/@webex/plugin-meetings/src/constants.js
@@ -187,7 +187,7 @@ export const ICE_FAIL_TIMEOUT = 3000;
export const RETRY_TIMEOUT = 3000;
export const ROAP_SEQ_PRE = -1;
-export const PC_BAIL_TIMEOUT = 20000;
+export const PC_BAIL_TIMEOUT = 8000;
// ******************** REGEX **********************
// Please alphabetize | fix(plugin-meetings): decrease the timer for meeting connect failure | webex_spark-js-sdk | train | js |
00920c5d88669e7383fefc18a3575becc111ce6b | diff --git a/lib/pgslice.rb b/lib/pgslice.rb
index <HASH>..<HASH> 100644
--- a/lib/pgslice.rb
+++ b/lib/pgslice.rb
@@ -530,7 +530,10 @@ INSERT INTO #{dest_table} (#{fields})
def column_cast(table, column)
data_type = execute("SELECT data_type FROM information_schema.columns WHERE table_schema = $1 AND table_name = $2 AND column_name = $3", [schema, table, column])[0]["data_type"]
- data_type == "timestamp with time zone" ? "timestamptz" : "date"
+
+ # data_type == "timestamp with time zone" ? "timestamptz" : "date"
+ # use date until we can figure out backwards compatibility
+ "date"
end
def sql_date(time, cast) | Use date until we can figure out backwards compatibility | ankane_pgslice | train | rb |
49b090ecb38c8a6f26f6f0e6cd2417ae46b35ed7 | diff --git a/src/CheckerCollection.php b/src/CheckerCollection.php
index <HASH>..<HASH> 100644
--- a/src/CheckerCollection.php
+++ b/src/CheckerCollection.php
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Itineris\Preflight;
-final class CheckerCollection
+class CheckerCollection
{
/**
* Holds checker instances. | CheckerCollection: Do not `final` | ItinerisLtd_preflight-command | train | php |
15c0cf8958a587ee4708aaeb9f68701e2ac56738 | diff --git a/lib/ohai/dsl/plugin.rb b/lib/ohai/dsl/plugin.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/dsl/plugin.rb
+++ b/lib/ohai/dsl/plugin.rb
@@ -18,7 +18,6 @@
# limitations under the License.
#
-# @todo: move os to mixin
require 'ohai/mixin/os'
require 'ohai/mixin/command'
require 'ohai/mixin/seconds_to_human' | remove @todo that was done | chef_ohai | train | rb |
819c1b53703938de5b06f0031d30ed984ea28d22 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -116,7 +116,7 @@ def handle_ext_modules_win_32_conda_forge_ipopt():
IPOPT_INCLUDE_DIRS = [os.path.join(conda_prefix, "Library", "include",
"coin-or"), np.get_include()]
- IPOPT_LIBS = ["libipopt"]
+ IPOPT_LIBS = ["ipopt-3"]
IPOPT_LIB_DIRS = [os.path.join(conda_prefix, "Library", "lib")]
EXT_MODULES = [Extension("ipopt_wrapper",
["cyipopt/cython/ipopt_wrapper.pyx"], | Changes conda-forge windows lib name to ipopt-3
It was decided upstream to be consistent with the official IPOPT windows
binaries. See:
- <URL> | matthias-k_cyipopt | train | py |
6a25376deb09e5ce8ebf6eae4cdf9487e3128aa2 | diff --git a/src/plugin.js b/src/plugin.js
index <HASH>..<HASH> 100644
--- a/src/plugin.js
+++ b/src/plugin.js
@@ -18,6 +18,8 @@ var EventEmitter = require('events').EventEmitter;
* @property {{}} config
* @property {UIFacade} ui
*
+ * @property {{modes: number[], game: string[]}} game
+ *
*/
module.exports.default = class extends EventEmitter {
@@ -42,6 +44,15 @@ module.exports.default = class extends EventEmitter {
* @type {{}}
*/
this.models = {};
+
+ /**
+ * Game Requirements.
+ * @type {{modes: number[], game: string[]}}
+ */
+ this.game = {
+ modes: [],
+ game: ['trackmania', 'shootmania']
+ }
}
/** | Adding game requirements variable (this.game) | ManiaJS_plugins | train | js |
510ea763577a6181197cf0599fb33ae77f597071 | diff --git a/lxd/project/permissions.go b/lxd/project/permissions.go
index <HASH>..<HASH> 100644
--- a/lxd/project/permissions.go
+++ b/lxd/project/permissions.go
@@ -545,7 +545,14 @@ func checkRestrictions(project *db.Project, instances []db.Instance, profiles []
if device["pool"] == "" {
return fmt.Errorf("Attaching disks not backed by a pool is forbidden")
}
+ case "allow":
+ var allowed bool
+ allowed, _ = CheckRestrictedDevicesDiskPaths(project.Config, device["source"])
+ if !allowed {
+ return fmt.Errorf("Disk source path %q not allowed", device["source"])
+ }
}
+
return nil
}
} | lxd/project/permissions: Check for valid disk source path in checkRestrictions using CheckRestrictedDevicesDiskPaths | lxc_lxd | train | go |
60bca20f30d36259ef5eff65bc84d0dcb61267f7 | diff --git a/src/helpers.php b/src/helpers.php
index <HASH>..<HASH> 100644
--- a/src/helpers.php
+++ b/src/helpers.php
@@ -32,12 +32,10 @@ if (! \function_exists('checkPermissions')) {
{
$directoryIterator = new \RecursiveDirectoryIterator($directory);
- foreach(new \RecursiveIteratorIterator($directoryIterator) as $file) {
-
- if($file->isFile() && !$file->isWritable()){
+ foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
+ if ($file->isFile() && ! $file->isWritable()) {
return false;
}
-
}
return true; | Apply fixes from StyleCI (#<I>) | codedge_laravel-selfupdater | train | php |
3ac3a29e818827b6ce8c4d01b1866a4bd1756a91 | diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb
index <HASH>..<HASH> 100644
--- a/lib/sinatra/base.rb
+++ b/lib/sinatra/base.rb
@@ -634,7 +634,7 @@ module Sinatra
path, line = settings.caller_locations.first
template.new(path, line.to_i, options, &body)
else
- raise ArgumentError
+ raise ArgumentError, "Sorry, don't know how to render #{data.inspect}."
end
end
end | better error message if passing nil (or something else) to a render method | sinatra_sinatra | train | rb |
d5080a425d09744856181768ab53c6bf1abc0d3d | diff --git a/Kwc/List/ChildPages/Teaser/Model.php b/Kwc/List/ChildPages/Teaser/Model.php
index <HASH>..<HASH> 100644
--- a/Kwc/List/ChildPages/Teaser/Model.php
+++ b/Kwc/List/ChildPages/Teaser/Model.php
@@ -75,6 +75,9 @@ class Kwc_List_ChildPages_Teaser_Model extends Kwf_Model_Abstract
$childPagesComponentSelect[Kwf_Component_Select::IGNORE_VISIBLE] = true;
}
$childPagesComponentSelect['pageGenerator'] = false; //already selected by accessing model direclty
+
+/*
+Temporarily disabled for too deep stack nesting level (crashes php 5.2) and performance reasons
foreach ($startPage->getChildPages($childPagesComponentSelect) as $childPage) {
if (is_numeric($childPage->dbId)) {
throw new Kwf_Exception("this must not happen, pages must be queried by accessing model directly");
@@ -86,7 +89,7 @@ class Kwc_List_ChildPages_Teaser_Model extends Kwf_Model_Abstract
'name' => $childPage->name
);
}
-
+*/
foreach ($childPages as $childPage) {
$id = $childPage['id']; | temp workaround for php <I> crash
with that list child pages only will show pages from pages model, not from any other generator.
in pratice this will not be a loss in <I>% of cases, still a better solution should be found | koala-framework_koala-framework | train | php |
18f7c39b49eb08c8afe0c9eedd29d7ab59242f97 | diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -700,9 +700,8 @@ module ActiveRecord
# inverse detection only works on #has_many, #has_one, and
# #belongs_to associations.
#
- # Extra options on the associations, as defined in the
- # <tt>AssociationReflection::INVALID_AUTOMATIC_INVERSE_OPTIONS</tt>
- # constant, or a custom scope, will also prevent the association's inverse
+ # <tt>:foreign_key</tt> and <tt>:through</tt> options on the associations,
+ # or a custom scope, will also prevent the association's inverse
# from being found automatically.
#
# The automatic guessing of the inverse association uses a heuristic based | Do not refer internal constant in the doc [ci skip] | rails_rails | train | rb |
f7c827e496b4cf703d933e2ecfe651aee53ada64 | diff --git a/src/components/Tabs/index.js b/src/components/Tabs/index.js
index <HASH>..<HASH> 100644
--- a/src/components/Tabs/index.js
+++ b/src/components/Tabs/index.js
@@ -2,6 +2,7 @@
import React, { type Node } from 'react';
import noop from 'lodash.noop';
+import PropTypes from 'prop-types';
import EventListener from 'react-event-listener';
import getNotDeclaredProps from 'react-get-not-declared-props';
@@ -26,6 +27,15 @@ export const Context = React.createContext({
});
export default class Tabs extends React.PureComponent<Props, State> {
+ static propTypes = {
+ tab: PropTypes.string.isRequired,
+ children: PropTypes.node.isRequired,
+ tabStyle: PropTypes.oneOf(['text', 'text-and-icons', 'icons']),
+ className: PropTypes.string,
+ onChange: PropTypes.func,
+ color: PropTypes.oneOf(['primary', 'accent']),
+ };
+
static defaultProps = {
tabStyle: 'text',
className: '', | Added propTypes to Tabs | HenriBeck_materialize-react | train | js |
ec5b416e9e5b29a058f135c2c14a56968934e623 | diff --git a/hangups/__init__.py b/hangups/__init__.py
index <HASH>..<HASH> 100644
--- a/hangups/__init__.py
+++ b/hangups/__init__.py
@@ -1,9 +1,4 @@
from .version import __version__
-# TODO just import *?
-from .hangouts_pb2 import (
- TYPING_TYPE_STARTED, TYPING_TYPE_PAUSED, TYPING_TYPE_STOPPED,
- MEMBERSHIP_CHANGE_TYPE_LEAVE, MEMBERSHIP_CHANGE_TYPE_JOIN
-)
from .client import Client
from .user import UserList, build_user_list
from .conversation import ConversationList
@@ -12,3 +7,9 @@ from .exceptions import HangupsError, NetworkError
from .conversation_event import (ChatMessageSegment, ConversationEvent,
ChatMessageEvent, RenameEvent,
MembershipChangeEvent)
+# Only import enum values and messages from the proto file that are necessary
+# for third-party code to use hangups.
+from .hangouts_pb2 import (
+ TYPING_TYPE_STARTED, TYPING_TYPE_PAUSED, TYPING_TYPE_STOPPED,
+ MEMBERSHIP_CHANGE_TYPE_LEAVE, MEMBERSHIP_CHANGE_TYPE_JOIN
+) | Add comment about proto file imports in __init__ | tdryer_hangups | train | py |
c87f3983131a42a5a28a6cb5a33ed5875d62dd2b | diff --git a/database/factories/PropertyFactory.php b/database/factories/PropertyFactory.php
index <HASH>..<HASH> 100644
--- a/database/factories/PropertyFactory.php
+++ b/database/factories/PropertyFactory.php
@@ -1,5 +1,5 @@
<?php
-namespace AvoRed\Database\Factories;
+namespace AvoRed\Framework\Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use Faker\Generator as Faker; | Update PropertyFactory.php | avored_framework | train | php |
597520ae201513a51901c8e50f3815aff737d3d5 | diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py
index <HASH>..<HASH> 100755
--- a/ec2/spark_ec2.py
+++ b/ec2/spark_ec2.py
@@ -361,6 +361,7 @@ def setup_cluster(conn, master_nodes, slave_nodes, zoo_nodes, opts, deploy_ssh_k
print "Copying SSH key %s to master..." % opts.identity_file
ssh(master, opts, 'mkdir -p ~/.ssh')
scp(master, opts, opts.identity_file, '~/.ssh/id_rsa')
+ ssh(master, opts, 'chmod 600 ~/.ssh/id_rsa')
print "Running setup on master..."
if opts.cluster_type == "mesos":
setup_mesos_cluster(master, opts) | Make sure the SSH key we copy to EC2 has permissions <I>.
SPARK-<I> #resolve | apache_spark | train | py |
853f85478bd993510e2f3a7fcd4248ada2be9252 | diff --git a/src/Callbacks/OnErrorCallback.php b/src/Callbacks/OnErrorCallback.php
index <HASH>..<HASH> 100644
--- a/src/Callbacks/OnErrorCallback.php
+++ b/src/Callbacks/OnErrorCallback.php
@@ -9,9 +9,9 @@ class OnErrorCallback extends \Nette\Object
/**
* @param \Nette\Application\Application $application
- * @param \Exception $e
+ * @param \Exception|\Throwable $e
*/
- public function __invoke(Application $application, \Exception $e)
+ public function __invoke(Application $application, $e)
{
if ($e instanceof \Nette\Application\BadRequestException) { // skip 4xx errors
return; | TypeError support in OnErrorCallback | Vrtak-CZ_NewRelic-Nette | train | php |
9892dac904fa153e54d7fb9530e8a73b8cefa171 | diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js
index <HASH>..<HASH> 100644
--- a/src/sprites/rendered-target.js
+++ b/src/sprites/rendered-target.js
@@ -1003,7 +1003,12 @@ class RenderedTarget extends Target {
variables: this.variables,
lists: this.lists,
costumes: costumes,
- sounds: this.getSounds()
+ sounds: this.getSounds(),
+ tempo: this.tempo,
+ volume: this.volume,
+ videoTransparency: this.videoTransparency,
+ videoState: this.videoState
+
};
} | Custom state (e.g. tempo, volume, video related state) should show up in a target that has been 'flattened' via JSON.stringify. | LLK_scratch-vm | train | js |
826d1e6153adf63119c785319ada0dfc7be864c1 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ cross-project testing tool for Python.
Platforms: Linux, Win32, OSX
-Interpreters: Python versions 2.4 through to 3.2, Jython 2.5.1 and PyPy-1.5
+Interpreters: Python versions 2.4 through to 3.2, Jython 2.5.1 and PyPy-1.6/1.7
Bugs and issues: http://bitbucket.org/hpk42/pytest/issues/
@@ -70,4 +70,4 @@ def make_entry_points():
return {'console_scripts': l}
if __name__ == '__main__':
- main()
\ No newline at end of file
+ main() | fix docstring for setup.py | vmalloc_dessert | train | py |
c35e71c862897abd8e3f9a306e7c65149acf0fe4 | diff --git a/spec/Happyr/DoctrineSpecification/EntitySpecificationRepositorySpec.php b/spec/Happyr/DoctrineSpecification/EntitySpecificationRepositorySpec.php
index <HASH>..<HASH> 100644
--- a/spec/Happyr/DoctrineSpecification/EntitySpecificationRepositorySpec.php
+++ b/spec/Happyr/DoctrineSpecification/EntitySpecificationRepositorySpec.php
@@ -40,8 +40,9 @@ class EntitySpecificationRepositorySpec extends ObjectBehavior
$qb->getQuery()->willReturn($query);
$specification->modifyQuery($query)->shouldBeCalled();
+ $query->getHydrationMode()->willReturn(AbstractQuery::HYDRATE_OBJECT);
$result = array();
- $query->getResult()->willReturn($result);
+ $query->getResult(AbstractQuery::HYDRATE_OBJECT)->willReturn($result);
$this->match($specification)->shouldReturn($result);
} | Update EntitySpecificationRepositorySpec with hydration mode change. | Happyr_Doctrine-Specification | train | php |
1f1bdd6f47c70045f682dea39e24fe18fc99a271 | diff --git a/sketch-specifics.js b/sketch-specifics.js
index <HASH>..<HASH> 100644
--- a/sketch-specifics.js
+++ b/sketch-specifics.js
@@ -19,7 +19,7 @@ module.exports.cwd = function cwd() {
}
module.exports.resourcePath = function resourcePath(resourceName) {
- if (typeof __command === 'undefined' || __command.pluginBundle()) {
+ if (typeof __command === 'undefined' || !__command.pluginBundle()) {
return undefined
}
var resource = __command.pluginBundle().urlForResourceNamed(resourceName) | Return undefined in resource bundle if pluginBundle doesn't exist | skpm_path | train | js |
e190daebb0af9ce3b315f99c639ae20524f5c144 | diff --git a/packages/neos-ui/src/manifest.js b/packages/neos-ui/src/manifest.js
index <HASH>..<HASH> 100644
--- a/packages/neos-ui/src/manifest.js
+++ b/packages/neos-ui/src/manifest.js
@@ -12,9 +12,9 @@ import {
findNodeInGuestFrame,
findAllOccurrencesOfNodeInGuestFrame,
createEmptyContentCollectionPlaceholderIfMissing,
- findAllChildNodes,
- initializeContentDomNode
+ findAllChildNodes
} from '@neos-project/neos-ui-guest-frame/src/dom';
+import initializeContentDomNode from '@neos-project/neos-ui-guest-frame/src/initializeContentDomNode';
import style from '@neos-project/neos-ui-guest-frame/src/style.css'; | BUGFIX: fix import again | neos_neos-ui | train | js |
4ad5170b0bf6b3249fade9804f100710b7b19b86 | diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js
index <HASH>..<HASH> 100644
--- a/config/webpack.config.dev.js
+++ b/config/webpack.config.dev.js
@@ -20,6 +20,7 @@ module.exports = {
devtool: 'eval',
entry: [
require.resolve('webpack-dev-server/client') + '?http://localhost:3000',
+ require.resolve('webpack/hot/dev-server'),
'./src/index.js'
],
output: {
@@ -79,6 +80,8 @@ module.exports = {
inject: true,
template: path.resolve(__dirname, relative, 'index.html'),
}),
- new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' })
+ new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' }),
+ // Note: only CSS is currently hot reloaded
+ new webpack.HotModuleReplacementPlugin()
]
};
diff --git a/scripts/start.js b/scripts/start.js
index <HASH>..<HASH> 100644
--- a/scripts/start.js
+++ b/scripts/start.js
@@ -29,6 +29,7 @@ if (process.argv[2] === '--smoke-test') {
new WebpackDevServer(webpack(config, handleCompile), {
publicPath: config.output.publicPath,
historyApiFallback: true,
+ hot: true, // Note: only CSS is currently hot reloaded
stats: {
hash: false,
version: false, | Enable hot reloading for CSS (#<I>) | vcarl_create-react-app | train | js,js |
9549353a9afe591a5fc1f7d28669055a85d85c17 | diff --git a/libusb1.py b/libusb1.py
index <HASH>..<HASH> 100644
--- a/libusb1.py
+++ b/libusb1.py
@@ -510,6 +510,16 @@ libusb_exit.restype = None
libusb_set_debug = libusb.libusb_set_debug
libusb_set_debug.argtypes = [libusb_context_p, c_int]
libusb_set_debug.restype = None
+try:
+ #char *libusb_strerror(enum libusb_error errcode);
+ libusb_strerror = libusb.libusb_strerror
+except AttributeError:
+ # Place holder
+ def libusb_strerror(errcode):
+ return None
+else:
+ libusb_strerror.argtypes = [c_int]
+ libusb_strerror.restype = c_char_p
#ssize_t libusb_get_device_list(libusb_context *ctx,
# libusb_device ***list); | Add support for (yet unreleased) libusb_strerror. | vpelletier_python-libusb1 | train | py |
93e12c97a5ea5d8f4667260cbf6a781aff1f0ca1 | diff --git a/lib/fluent/plugin/out_elasticsearch.rb b/lib/fluent/plugin/out_elasticsearch.rb
index <HASH>..<HASH> 100644
--- a/lib/fluent/plugin/out_elasticsearch.rb
+++ b/lib/fluent/plugin/out_elasticsearch.rb
@@ -504,7 +504,6 @@ EOC
tag = chunk.metadata.tag
extracted_values = expand_placeholders(chunk.metadata)
- @last_seen_major_version = detect_es_major_version rescue @default_elasticsearch_version
chunk.msgpack_each do |time, record|
next unless record.is_a? Hash | Remove needless Elasticsearch version detection | uken_fluent-plugin-elasticsearch | train | rb |
10c63a610ef2a8d5501e0f6c611cbc091a3f98e3 | diff --git a/demos/tilemap/tilemap.go b/demos/tilemap/tilemap.go
index <HASH>..<HASH> 100644
--- a/demos/tilemap/tilemap.go
+++ b/demos/tilemap/tilemap.go
@@ -47,7 +47,7 @@ func (game *GameWorld) Setup(u engo.Updater) {
// Create render and space components for each of the tiles in all layers
tileComponents := make([]*Tile, 0)
- for _, tileLayer := range levelData.TileLayers {
+ for idx, tileLayer := range levelData.TileLayers {
for _, tileElement := range tileLayer.Tiles {
if tileElement.Image != nil {
@@ -56,6 +56,7 @@ func (game *GameWorld) Setup(u engo.Updater) {
Drawable: tileElement,
Scale: engo.Point{1, 1},
}
+ tile.RenderComponent.SetZIndex(float32(idx))
tile.SpaceComponent = common.SpaceComponent{
Position: tileElement.Point,
Width: 0, | added z-index for tilelayers in tilemap demo | EngoEngine_engo | train | go |
2be383b94619595a2b4886e35f599757eab6c878 | diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -209,9 +209,9 @@ class FinderTest < ActiveRecord::TestCase
end
def test_model_class_responds_to_first_bang
- assert_equal topics(:first), Topic.order(:id).first!
+ assert Topic.first!
+ Topic.delete_all
assert_raises ActiveRecord::RecordNotFound do
- Topic.delete_all
Topic.first!
end
end | test against AR class rather than the relation (thanks Andrew White!) | rails_rails | train | rb |
6d149cfa433b760bf925d61a5a68be3c5a2eeade | diff --git a/structr-rest/src/main/java/org/structr/rest/resource/TypedIdResource.java b/structr-rest/src/main/java/org/structr/rest/resource/TypedIdResource.java
index <HASH>..<HASH> 100644
--- a/structr-rest/src/main/java/org/structr/rest/resource/TypedIdResource.java
+++ b/structr-rest/src/main/java/org/structr/rest/resource/TypedIdResource.java
@@ -124,7 +124,7 @@ public class TypedIdResource extends FilterableResource {
String type = SchemaHelper.normalizeEntityName(typeResource.getRawType());
- if (SearchCommand.getAllSubtypesAsStringSet(entity.getType()).contains(type)) {
+ if (SearchCommand.getAllSubtypesAsStringSet(entity.getClass().getSimpleName()).contains(type)) {
//if (parentClass.isAssignableFrom(entityClass)) {
return entity;
} | Fixed bug in TypedIdResource again. | structr_structr | train | java |
c7e12abcf56a90645277c9726462f3aefbcfcd5e | diff --git a/webapps/ui/common/scripts/module/services/is-file-upload-supported.js b/webapps/ui/common/scripts/module/services/is-file-upload-supported.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/common/scripts/module/services/is-file-upload-supported.js
+++ b/webapps/ui/common/scripts/module/services/is-file-upload-supported.js
@@ -1,6 +1,6 @@
module.exports = ['$window', function($window) {
return function() {
- const {FileReader} = $window;
+ var FileReader = $window.FileReader;
return typeof FileReader === 'function' && typeof FileReader.prototype.readAsText === 'function';
}; | chore: use es5 ;) in isFileUploadSupported service
related to CAM-<I> | camunda_camunda-bpm-platform | train | js |
06366e7fc2c7bde22ce040a4a9537e5e4a069936 | diff --git a/pyfirmata/pyfirmata.py b/pyfirmata/pyfirmata.py
index <HASH>..<HASH> 100755
--- a/pyfirmata/pyfirmata.py
+++ b/pyfirmata/pyfirmata.py
@@ -266,6 +266,11 @@ class Board(object):
def exit(self):
""" Call this to exit cleanly. """
+ # First detach all servo's, otherwise it somehow doesn't want to close...
+ # FIXME
+ for pin in self.digital:
+ if pin.mode == SERVO:
+ pin.mode = OUTPUT
if hasattr(self, 'sp'):
self.sp.close() | detach servo's on exit()
--HG--
branch : servo | tino_pyFirmata | train | py |
3ee0c4d614eca632a8a38b07301394ab0f7a8d4f | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -70,13 +70,38 @@ class ServerlessPythonRequirements {
this.serverless = serverless;
this.options = options;
+ this.commands = {
+ 'requirements': {
+ commands: {
+ 'clean': {
+ usage: 'Remove .requirements and requirements.py',
+ lifecycleEvents: [
+ 'clean',
+ ],
+ },
+ },
+ commands: {
+ 'install': {
+ usage: 'install requirements manually',
+ lifecycleEvents: [
+ 'install',
+ ],
+ },
+ },
+ },
+ };
+
this.hooks = {
'before:deploy:createDeploymentArtifacts': () => BbPromise.bind(this)
.then(this.packVendorHelper)
.then(this.packRequirements),
- 'after:deploy:createDeploymentArtifacts': () => BbPromise.bind(this)
- .then(this.cleanup),
+ 'requirements:install:install': () => BbPromise.bind(this)
+ .then(this.packVendorHelper)
+ .then(this.packRequirements),
+
+ 'requirements:clean:clean': () => BbPromise.bind(this)
+ .then(this.cleanup)
};
}
} | Don't automatically delete requirements & add manual commands | UnitedIncome_serverless-python-requirements | train | js |
e00bad1f5a8a28080fe333fd59e7961eb146f626 | diff --git a/local_config.py b/local_config.py
index <HASH>..<HASH> 100644
--- a/local_config.py
+++ b/local_config.py
@@ -93,8 +93,9 @@ CFG_EXTERNAL_AUTH_USING_SSO = False
CFG_EXTERNAL_AUTH_LOGOUT_SSO = None
CFG_EXTERNAL_AUTHENTICATION = {
"Local": None,
- #"Robot": ExternalAuthRobot(enforce_external_nicknames=True, use_zlib=False),
- #"ZRobot": ExternalAuthRobot(enforce_external_nicknames=True, use_zlib=True)
+ # "Robot": ExternalAuthRobot(enforce_external_nicknames=True, use_zlib=False),
+ # "ZRobot": ExternalAuthRobot(enforce_external_nicknames=True, use_zlib=True)
+ # CFG_EXTERNAL_AUTH_USING_SSO : ea_sso.ExternalAuthSSO(enforce_external_nicknames=True),
}
# from invenio.legacy.external_authentication.robot import ExternalAuthRobot | Merge branch 'master' into next
* master:
OAIRepository: fix for hidden OAI tags
WebAccess: automatically fetch SSO nicknames
WebComment: more prominent subscription link
BibConvert: lxml support for local document()
plotextractor: recid parsing fix
BibKnowledge: searchtype parameter in KB export
BibFormat: removal of obsolete BFX engine
BibMerge: adds CFG_SITE_RECORD as script data
BibUpload: faster recjson deletion after updates | inveniosoftware_invenio-access | train | py |
3349405db5c657d49bbde6bdbb7235f5fcfc022f | diff --git a/lib/familia/redisobject.rb b/lib/familia/redisobject.rb
index <HASH>..<HASH> 100644
--- a/lib/familia/redisobject.rb
+++ b/lib/familia/redisobject.rb
@@ -280,6 +280,14 @@ module Familia
range.each_with_index &blk
end
+ def collect &blk
+ range.collect &blk
+ end
+
+ def select &blk
+ range.select &blk
+ end
+
def at idx
from_redis redis.lindex(rediskey, idx)
end
@@ -353,6 +361,14 @@ module Familia
members.each_with_index &blk
end
+ def collect &blk
+ members.collect &blk
+ end
+
+ def select &blk
+ members.select &blk
+ end
+
def member? v
redis.sismember rediskey, to_redis(v)
end
@@ -467,6 +483,14 @@ module Familia
members.each_with_index &blk
end
+ def collect &blk
+ members.collect &blk
+ end
+
+ def select &blk
+ members.select &blk
+ end
+
def range sidx, eidx, opts={}
opts[:with_scores] = true if opts[:withscores]
redis.zrange(rediskey, sidx, eidx, opts).collect do |v| | Added collect/select to Set, SortedSet, List | delano_familia | train | rb |
Subsets and Splits