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 |
|---|---|---|---|---|---|
806f359ed8495befeadd9700308845ad4834d8de | diff --git a/src/sugars/html.php b/src/sugars/html.php
index <HASH>..<HASH> 100644
--- a/src/sugars/html.php
+++ b/src/sugars/html.php
@@ -208,7 +208,7 @@ function html_compress(?string $in): string
$in = trim($match[2]);
// Line comments (protect "http://" etc).
- $in = preg_replace('~(^|[^\'":])//(.*?)[\r\n]$~sm', '', $in);
+ $in = preg_replace('~(^|[^\'":])//(?:([^\r\n]+)|(.*?)[\r\n])$~sm', '', $in);
// Doc comments.
preg_match_all('~[^\'"]/\*+(?:.*)\*/\s*~smU', $in, $matches); | sugars/html: re-fix html_compress() [line-comment issue]. | froq_froq-util | train | php |
8ab0857dad4c37eb5d0f00cbc5905ae3ced30601 | diff --git a/umbra/browser.py b/umbra/browser.py
index <HASH>..<HASH> 100644
--- a/umbra/browser.py
+++ b/umbra/browser.py
@@ -89,7 +89,11 @@ class Browser:
def stop(self):
self._chrome_instance.stop()
- self._work_dir.cleanup()
+ try:
+ self._work_dir.cleanup()
+ except:
+ self.logger.error("exception deleting %s", self._work_dir,
+ exc_info=True)
def abort_browse_page(self):
self._abort_browse_page = True | catch and log exception deleting temporary work directory | internetarchive_brozzler | train | py |
9b3ce831150c798db8c8207d7102f27b148958f4 | diff --git a/cc_core/agent/blue/__main__.py b/cc_core/agent/blue/__main__.py
index <HASH>..<HASH> 100644
--- a/cc_core/agent/blue/__main__.py
+++ b/cc_core/agent/blue/__main__.py
@@ -117,8 +117,8 @@ def run(args):
# execute command
execution_result = execute(command, work_dir=outdir)
- result['process'] = execution_result.to_dict()
if not execution_result.successful():
+ result['process'] = execution_result.to_dict()
raise ExecutionError('Execution of command "{}" failed with the following message:\n{}'
.format(' '.join(command), execution_result.get_std_err())) | process stdout/stderr are now only written to result, if process fails | curious-containers_cc-core | train | py |
e0dfb57e31199566987cd1e635e967f984e022ee | diff --git a/hazelcast-client/src/test/java/com/hazelcast/client/ClientTimeoutTest.java b/hazelcast-client/src/test/java/com/hazelcast/client/ClientTimeoutTest.java
index <HASH>..<HASH> 100644
--- a/hazelcast-client/src/test/java/com/hazelcast/client/ClientTimeoutTest.java
+++ b/hazelcast-client/src/test/java/com/hazelcast/client/ClientTimeoutTest.java
@@ -6,6 +6,8 @@ import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IList;
import com.hazelcast.test.HazelcastSerialClassRunner;
import com.hazelcast.test.annotation.QuickTest;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
@@ -14,6 +16,13 @@ import org.junit.runner.RunWith;
@Category(QuickTest.class)
public class ClientTimeoutTest {
+ @After
+ @Before
+ public void destroy() {
+ HazelcastClient.shutdownAll();
+ Hazelcast.shutdownAll();
+ }
+
@Test(timeout = 20000, expected = IllegalStateException.class)
public void testTimeoutToOutsideNetwork() throws Exception {
ClientConfig clientConfig = new ClientConfig(); | close instances in before after test. Attempt to fix #<I> | hazelcast_hazelcast | train | java |
9c1e8e6764c1de195db6467057e0d148608e411d | diff --git a/test/chisel.py b/test/chisel.py
index <HASH>..<HASH> 100644
--- a/test/chisel.py
+++ b/test/chisel.py
@@ -28,6 +28,7 @@ from acme import messages
from acme import standalone
logger = logging.getLogger()
+logging.basicConfig()
logger.setLevel(int(os.getenv('LOGLEVEL', 20)))
DIRECTORY = os.getenv('DIRECTORY', 'http://localhost:4000/directory') | Call logging.basicConfig() in chisel. (#<I>)
Without this, chisel would fail to log even with LOGLEVEL set to 0. | letsencrypt_boulder | train | py |
14e1099bb0477a06f1b31ba6345b087ef97f2f4a | diff --git a/Godeps/_workspace/src/github.com/emicklei/go-restful/swagger/swagger.go b/Godeps/_workspace/src/github.com/emicklei/go-restful/swagger/swagger.go
index <HASH>..<HASH> 100644
--- a/Godeps/_workspace/src/github.com/emicklei/go-restful/swagger/swagger.go
+++ b/Godeps/_workspace/src/github.com/emicklei/go-restful/swagger/swagger.go
@@ -118,6 +118,7 @@ type ApiDeclaration struct {
ApiVersion string `json:"apiVersion"`
BasePath string `json:"basePath"`
ResourcePath string `json:"resourcePath"` // must start with /
+ Info Info `json:"info"`
Apis []Api `json:"apis,omitempty"`
Models ModelList `json:"models,omitempty"`
Produces []string `json:"produces,omitempty"` | UPSTREAM: Add "Info" to go-restful ApiDecl
Conflicts:
Godeps/_workspace/src/github.com/emicklei/go-restful/swagger/swagger.go | openshift_origin | train | go |
2b81de57f072246b8c6ea2f214a9ecae3dc73d5b | diff --git a/plaso/multi_processing/process_info.py b/plaso/multi_processing/process_info.py
index <HASH>..<HASH> 100644
--- a/plaso/multi_processing/process_info.py
+++ b/plaso/multi_processing/process_info.py
@@ -62,11 +62,17 @@ class ProcessInfo(object):
lib, data, dirty, percent.
"""
try:
- external_information = self._process.get_ext_memory_info()
+ if self._psutil_pre_v2:
+ external_information = self._process.get_ext_memory_info()
+ else:
+ external_information = self._process.memory_info_ex()
except psutil.NoSuchProcess:
return
- percent = self._process.get_memory_percent()
+ if self._psutil_pre_v2:
+ percent = self._process.get_memory_percent()
+ else:
+ percent = self._process.memory_percent()
# Psutil will return different memory information depending on what is
# available in that platform. | Pull request: <I>: Added psutil version 2 and later compatibility checks #<I> | log2timeline_plaso | train | py |
e259def31556ad47c37bb463063a5324508c58e3 | diff --git a/lib/rules/no-single-element-style-arrays.js b/lib/rules/no-single-element-style-arrays.js
index <HASH>..<HASH> 100644
--- a/lib/rules/no-single-element-style-arrays.js
+++ b/lib/rules/no-single-element-style-arrays.js
@@ -37,6 +37,7 @@ module.exports = {
return {
JSXAttribute(node) {
if (node.name.name !== 'style') return;
+ if (!node.value.expression) return;
if (node.value.expression.type !== 'ArrayExpression') return;
if (node.value.expression.elements.length === 1) {
reportNode(node); | Fix issue when style prop is not an expression | Intellicode_eslint-plugin-react-native | train | js |
3b1d891d6d5fcae62f049830bbca39775a8b5ca5 | diff --git a/lib/tetra/packages/package.rb b/lib/tetra/packages/package.rb
index <HASH>..<HASH> 100644
--- a/lib/tetra/packages/package.rb
+++ b/lib/tetra/packages/package.rb
@@ -21,7 +21,7 @@ module Tetra
def initialize(project, pom_path = nil, filter = nil)
@project = project
@kit = Tetra::KitPackage.new(project)
- @pom = pom_path.nil? ? nil : Tetra::Pom.new(pom_path)
+ @pom = Tetra::Pom.new(pom_path)
@filter = filter
end
diff --git a/lib/tetra/pom.rb b/lib/tetra/pom.rb
index <HASH>..<HASH> 100644
--- a/lib/tetra/pom.rb
+++ b/lib/tetra/pom.rb
@@ -4,7 +4,11 @@ module Tetra
# encapsulates a pom.xml file
class Pom
def initialize(filename)
- @doc = Nokogiri::XML(open(filename).read)
+ @doc = Nokogiri::XML(
+ if File.file?(filename)
+ open(filename).read
+ end
+ )
@doc.remove_namespaces!
end | Let generate commands work even in absence of a pom file | moio_tetra | train | rb,rb |
759c06b621f7277fd21a3b766cb004222e5ab579 | diff --git a/lib/media.js b/lib/media.js
index <HASH>..<HASH> 100644
--- a/lib/media.js
+++ b/lib/media.js
@@ -16,6 +16,11 @@ var trackType = {
'2': 'text',
}
+var ffi = require('ffi')
+var libc = ffi.Library(null, {
+ 'free': ['void', [ 'pointer' ]],
+});
+
var Media = module.exports = function (parent, reinit, opts) {
var self = this;
var released = false;
@@ -99,8 +104,8 @@ var Media = module.exports = function (parent, reinit, opts) {
results.push(tmp);
}
- //TODO XXX FIXME
- //info.free();
+ libc.free(info);
+ info = undefined;
return results;
}, | free the vlc allocated data | tjfontaine_node-vlc | train | js |
7ebe6243189e78d072476a72bbb9242807bb3563 | diff --git a/mbuild/formats/hoomd_simulation.py b/mbuild/formats/hoomd_simulation.py
index <HASH>..<HASH> 100644
--- a/mbuild/formats/hoomd_simulation.py
+++ b/mbuild/formats/hoomd_simulation.py
@@ -144,9 +144,13 @@ def _init_hoomd_lj(structure, nl, r_cut=1.2, mixing_rule='lorentz',
def _init_hoomd_qq(structure, nl, Nx=1, Ny=1, Nz=1, order=4, r_cut=1.2):
""" Charge interactions """
charged = hoomd.group.charged()
- qq = hoomd.md.charge.pppm(charged, nl)
- qq.set_params(Nx, Ny, Nz, order, r_cut)
- return qq
+ if len(charged) == 0:
+ print("No charged groups found, ignoring electrostatics")
+ return None
+ else:
+ qq = hoomd.md.charge.pppm(charged, nl)
+ qq.set_params(Nx, Ny, Nz, order, r_cut)
+ return qq
def _init_hoomd_14_pairs(structure, nl, r_cut=1.2, ref_distance=1.0, ref_energy=1.0): | Don't initialize electrostatics if no charged group | mosdef-hub_mbuild | train | py |
0b5e16ad77aebdde05dbffef78265755c779bb8b | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ setup(name='tgext.admin',
zip_safe=True,
install_requires=[
'setuptools',
- 'tgext.crud>=0.4',
+ 'tgext.crud>=0.5.1',
# -*- Extra requirements: -*-
],
entry_points=""" | Make it work with new tg Jinja quickstart | TurboGears_tgext.admin | train | py |
15e45c79d44d52a8ec4944e9435c1338d666550e | diff --git a/Connector/Translation/TranslationHelper.php b/Connector/Translation/TranslationHelper.php
index <HASH>..<HASH> 100644
--- a/Connector/Translation/TranslationHelper.php
+++ b/Connector/Translation/TranslationHelper.php
@@ -2,6 +2,7 @@
namespace PlentyConnector\Connector\Translation;
+use DeepCopy\DeepCopy;
use PlentyConnector\Connector\TransferObject\TranslateableInterface;
use PlentyConnector\Connector\ValueObject\Translation\Translation;
@@ -37,7 +38,8 @@ class TranslationHelper implements TranslationHelperInterface
*/
public function translate($languageIdentifier, TranslateableInterface $object)
{
- $object = clone $object;
+ $deepCopy = new DeepCopy();
+ $object = $deepCopy->copy($object);
/**
* @var Translation[] $translations | added deepcopy to the TranslationHelper | plentymarkets_plentymarkets-shopware-connector | train | php |
a6532b7881fafea97c08a1c2d32fce31dc434f96 | diff --git a/src/crypto/SecretStorage.js b/src/crypto/SecretStorage.js
index <HASH>..<HASH> 100644
--- a/src/crypto/SecretStorage.js
+++ b/src/crypto/SecretStorage.js
@@ -527,7 +527,7 @@ export class SecretStorage extends EventEmitter {
device_trust: this._baseApis.checkDeviceTrust(sender, deviceId),
});
if (secret) {
- logger.info(`Preparing ${content.name} secret for ${deviceId}`)
+ logger.info(`Preparing ${content.name} secret for ${deviceId}`);
const payload = {
type: "m.secret.send",
content: {
@@ -564,10 +564,10 @@ export class SecretStorage extends EventEmitter {
},
};
- logger.info(`Sending ${content.name} secret for ${deviceId}`)
+ logger.info(`Sending ${content.name} secret for ${deviceId}`);
this._baseApis.sendToDevice("m.room.encrypted", contentMap);
} else {
- logger.info(`Request denied for ${content.name} secret for ${deviceId}`)
+ logger.info(`Request denied for ${content.name} secret for ${deviceId}`);
}
}
} | Fix logging lints | matrix-org_matrix-js-sdk | train | js |
08f3db7f3b94954461eddc322e666810bbe6ef3e | diff --git a/server/src/main/resources/UIAutomation.js b/server/src/main/resources/UIAutomation.js
index <HASH>..<HASH> 100755
--- a/server/src/main/resources/UIAutomation.js
+++ b/server/src/main/resources/UIAutomation.js
@@ -87,8 +87,6 @@ var UIAutomation = {
res.ref = value.reference();
res.type = value.type();
res.length = value.length;
- log("array : "+ JSON.stringify(value));
- log("[3] : "+ value[3].name());
} else if (value && value.type) {
res.ref = value.reference();
res.type = value.type(); | removing hardcoded debug logs.. | ios-driver_ios-driver | train | js |
1a5162f2d71efde4d154d1abd46b14df462b35df | diff --git a/src/Pdf.php b/src/Pdf.php
index <HASH>..<HASH> 100644
--- a/src/Pdf.php
+++ b/src/Pdf.php
@@ -214,7 +214,7 @@ class Pdf
$this->imagick->setColorspace($this->colorspace);
}
- if ($this->colorspace !== null) {
+ if ($this->compressionQuality !== null) {
$this->imagick->setCompressionQuality($this->compressionQuality);
} | small bug fix in Pdf.php (#<I>) | spatie_pdf-to-image | train | php |
f6200cd83c2bdd8fe3525453782116ad45e94a02 | diff --git a/src/SegmentServiceProvider.php b/src/SegmentServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/SegmentServiceProvider.php
+++ b/src/SegmentServiceProvider.php
@@ -17,8 +17,9 @@ class SegmentServiceProvider extends ServiceProvider
$this->package('cachethq/segment', 'cachethq/segment', __DIR__);
$writeKey = $this->app->config->get('cachethq/segment::write_key');
- if ($writeKey) {
- Segment::init($this->app->config->get('cachethq/segment::write_key'));
+ $enabled = $this->app->config->get('cachethq/segment::enabled');
+ if ($writeKey && $enabled) {
+ Segment::init($writeKey);
}
}
diff --git a/src/config/config.php b/src/config/config.php
index <HASH>..<HASH> 100644
--- a/src/config/config.php
+++ b/src/config/config.php
@@ -2,6 +2,11 @@
return [
/*
+ * Whether to enable Segment or not.
+ */
+ 'enabled' => true,
+
+ /*
* The key which enables you to write to the Segment.com API.
*/
'write_key' => '', | Allow enabling and disabling of Segment. Closes #4 | GrahamDeprecated_Laravel-Segment | train | php,php |
45844add34c79cc30c05458c021679ab8f77d4fe | diff --git a/plugins/socket/index.js b/plugins/socket/index.js
index <HASH>..<HASH> 100644
--- a/plugins/socket/index.js
+++ b/plugins/socket/index.js
@@ -15,11 +15,18 @@ module.exports = {
ctx.io = socketIO(ctx.server);
ctx.io.on('connect', socket => {
for (name in listeners) {
- listeners[name].forEach(cb => {
- socket.on(name, data => {
- cb(extend({}, ctx, { path: name, socket: socket, data: data }));
+ if (name !== 'connect') {
+ listeners[name].forEach(cb => {
+ socket.on(name, data => {
+ cb(extend({}, ctx, { path: name, socket: socket, data: data }));
+ });
});
- });
+ }
+ }
+ if (listeners['connect']) {
+ listeners['connect'].forEach(cb => {
+ cb(extend({}, ctx, { socket: socket }));
+ })
}
});
} | the callback function of router.socket('connect', callback) will be called when a new socket connection connected. by this, you kan listen a connect event | franciscop_server | train | js |
793506349d9b65d4c42f310d72e0f8b36acfedff | diff --git a/test/fog/xml/connection_test.rb b/test/fog/xml/connection_test.rb
index <HASH>..<HASH> 100644
--- a/test/fog/xml/connection_test.rb
+++ b/test/fog/xml/connection_test.rb
@@ -2,7 +2,7 @@ require "minitest/autorun"
require "fog"
# Note this is going to be part of fog-xml eventually
-class TestFogXMLConnection < MiniTest::Unit::TestCase
+class TestFogXMLConnection < Minitest::Test
def setup
@connection = Fog::XML::Connection.new("http://localhost")
end | [core] Fix deprecated Mintest base
Used an old example, should have subclassed Minitest::Test | fog_fog | train | rb |
360010b11065a1e1e0401726b2b20e33dfec3393 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ def read(fname):
setup(
name = "cmsplugin-filer",
- version = "0.0.6a2",
+ version = "0.0.6a8",
url = 'http://github.com/stefanfoulis/cmsplugin-filer',
license = 'BSD',
description = "django-cms plugins for django-filer", | fixed version bump to <I>a8 (it's ojii's fault!) | divio_cmsplugin-filer | train | py |
b2e490bcec62a147e551e4a83b8bfde2bbb79d64 | diff --git a/html/js/portal-ng.js b/html/js/portal-ng.js
index <HASH>..<HASH> 100644
--- a/html/js/portal-ng.js
+++ b/html/js/portal-ng.js
@@ -282,8 +282,8 @@ function loadStructure() {
processLayoutResponseJSON
).fail(
function( jqxhr, textStatus, error ) {
- var err = textStatus + ", " + error;
- console.log( "Request Failed: " + err );
+ console.log( 'Request for "'+pPage+'" failed: ' + textStatus + ", " + error );
+ window.location.href = 'index.html';
}
).always(
function() { | if page not exists: redirect to main page | ma-ha_rest-web-ui | train | js |
b372fdd54bab2ad6639756958978660b12095c3c | diff --git a/test/git/test_git.py b/test/git/test_git.py
index <HASH>..<HASH> 100644
--- a/test/git/test_git.py
+++ b/test/git/test_git.py
@@ -45,13 +45,6 @@ class TestGit(TestCase):
self.git.hash_object(istream=fh, stdin=True))
fh.close()
- def test_it_handles_large_input(self):
- if sys.platform == 'win32':
- output = self.git.execute(["type", "C:\WINDOWS\system32\cmd.exe"])
- else:
- output = self.git.execute(["cat", "/bin/bash"])
- assert_true(len(output) > 4096) # at least 4k
-
@patch_object(Git, 'execute')
def test_it_ignores_false_kwargs(self, git):
# this_should_not_be_ignored=False implies it *should* be ignored | removed large-input test as it is totally dependent on the subprocess implementation in the end whether pipeing large input works. In general , input and output pipes are used, the shell is bypassed, hence there is no reason for a problem unless we are on a very rare platform. And if so, we can't do anything about it so why should there be a possibly failing test ? Problem is that the test would fail on windows in case it is not installed on c:\windows | gitpython-developers_GitPython | train | py |
f5acc16e9a9c820225015f714d4c24beb03a1f0c | diff --git a/salt/state.py b/salt/state.py
index <HASH>..<HASH> 100644
--- a/salt/state.py
+++ b/salt/state.py
@@ -690,7 +690,7 @@ class State(object):
# order for the newly installed package to be importable.
reload(site)
self.load_modules()
- if not self.opts.get('local', False):
+ if not self.opts.get('local', False) and self.opts.get('multiprocessing', True):
self.functions['saltutil.refresh_modules']()
def check_refresh(self, data, ret): | Do not send reload modules event to minion loop when multithreaded. | saltstack_salt | train | py |
a6fec757c8a17f3a5b92fb766b0f2eeb3b1a208a | diff --git a/store.go b/store.go
index <HASH>..<HASH> 100644
--- a/store.go
+++ b/store.go
@@ -2479,6 +2479,10 @@ func (s *store) Mount(id, mountLabel string) (string, error) {
if err != nil {
return "", err
}
+
+ s.graphLock.Lock()
+ defer s.graphLock.Unlock()
+
rlstore.Lock()
defer rlstore.Unlock()
if modified, err := rlstore.Modified(); modified || err != nil {
@@ -2486,6 +2490,18 @@ func (s *store) Mount(id, mountLabel string) (string, error) {
return "", err
}
}
+
+ /* We need to make sure the home mount is present when the Mount is done. */
+ if s.graphLock.TouchedSince(s.lastLoaded) {
+ s.graphDriver = nil
+ s.layerStore = nil
+ s.graphDriver, err = s.getGraphDriver()
+ if err != nil {
+ return "", err
+ }
+ s.lastLoaded = time.Now()
+ }
+
if rlstore.Exists(id) {
options := drivers.MountOpts{
MountLabel: mountLabel, | store: keep graph lock during Mount
This solves a race condition where a mountpoint is created without the
home mount being present.
The cause is that another process could be calling the graph driver
cleanup as part of store.Shutdown() causing the unmount of the
driver home directory.
The unmount could happen between the time the rlstore is retrieved and
the actual mount, causing the driver mount to be done without a home
mount below it.
A third process then would re-create again the home mount, shadowing
the previous mount.
Closes: <URL> | containers_storage | train | go |
0d07e459a0aedfff486e18440fc687b1a2c78ebe | diff --git a/src/org/openscience/cdk/layout/HydrogenPlacer.java b/src/org/openscience/cdk/layout/HydrogenPlacer.java
index <HASH>..<HASH> 100644
--- a/src/org/openscience/cdk/layout/HydrogenPlacer.java
+++ b/src/org/openscience/cdk/layout/HydrogenPlacer.java
@@ -120,7 +120,7 @@ public class HydrogenPlacer {
atomVector.addElement(unplacedAtoms.getAtomAt(f));
}
- addAngle = Math.PI * 2 / unplacedAtoms.getAtomCount() - 1;
+ addAngle = Math.PI * 2 / (unplacedAtoms.getAtomCount() + placedAtoms.getAtomCount());
/* IMPORTANT: At this point we need a calculation of the
start angle.
Not done yet.
@@ -134,9 +134,7 @@ public class HydrogenPlacer {
startAngle = GeometryTools.getAngle(xDiff, yDiff); //- (Math.PI / 2.0);
//System.out.println("startAngle = " + startAngle);
logger.debug("startAngle = " + startAngle);
- startAngle += addAngle;
-
- atomPlacer.populatePolygonCorners(atomVector, new Point2d(atom.getPoint2D()), startAngle, addAngle, bondLength);
+ atomPlacer.populatePolygonCorners(atomVector, new Point2d(atom.getPoint2D()), startAngle, addAngle, bondLength);
} | Fixed a bug in calculating the angle portion occupied by each hydrogen.
Hydrogen-Additions for aminomethane and any other molecule should be much
better now.
git-svn-id: <URL> | cdk_cdk | train | java |
92bde107a31e4041506e06367477ccd46038f5a5 | diff --git a/test/test_http_client.js b/test/test_http_client.js
index <HASH>..<HASH> 100644
--- a/test/test_http_client.js
+++ b/test/test_http_client.js
@@ -192,11 +192,9 @@ async function testGetDeviceList(klass) {
const page0 = await _httpClient.getDeviceList(klass);
- // weird values for page are the same as ignored
+ // negative values for page are the same as ignored
const pageMinusOne = await _httpClient.getDeviceList(klass, -1);
assert.deepStrictEqual(pageMinusOne, page0);
- const pageInvalid = await _httpClient.getDeviceList(klass, 'invalid');
- assert.deepStrictEqual(pageInvalid, page0);
for (let i = 0; ; i++) {
const page = await _httpClient.getDeviceList(klass, i, 10); | Update tests
The Thingpedia API doesn't allow invalid values of page any more | stanford-oval_thingpedia-api | train | js |
3a3b8bcb80739e7f674b8aa09ef8e0f5e31c4b59 | diff --git a/.ci/localhost_ansible_tests.py b/.ci/localhost_ansible_tests.py
index <HASH>..<HASH> 100755
--- a/.ci/localhost_ansible_tests.py
+++ b/.ci/localhost_ansible_tests.py
@@ -23,7 +23,7 @@ with ci_lib.Fold('job_setup'):
# Don't set -U as that will upgrade Paramiko to a non-2.6 compatible version.
# run("pip install -q virtualenv ansible==%s", ci_lib.ANSIBLE_VERSION)
# ansible v2.10 isn't out yet so we're installing from github for now
- run('pip install -q virtualenv {}'.format(ci_lib.ANSIBLE_VERSION)
+ run('pip install -q virtualenv {}'.format(ci_lib.ANSIBLE_VERSION))
os.chmod(KEY_PATH, int('0600', 8))
if not ci_lib.exists_in_path('sshpass'): | oops, forgot a ) | dw_mitogen | train | py |
61c3b70b86f564536516ff7f0fc7e3ba5523e743 | diff --git a/src/commands/views/aw/classfile.php b/src/commands/views/aw/classfile.php
index <HASH>..<HASH> 100644
--- a/src/commands/views/aw/classfile.php
+++ b/src/commands/views/aw/classfile.php
@@ -23,7 +23,7 @@ use luya\admin\ngrest\base\ActiveWindow;
class <?= $className; ?> extends ActiveWindow
{
/**
- * @var string The name of the module where the ActiveWindow is located in order to finde the view path.
+ * @var string The name of the module where the ActiveWindow is located in order to find the view path.
*/
public $module = '@<?= $moduleId; ?>';
@@ -58,4 +58,4 @@ class <?= $className; ?> extends ActiveWindow
'model' => $this->model,
]);
}
-}
\ No newline at end of file
+} | Typo (#<I>) | luyadev_luya-module-admin | train | php |
cef1ded5712dea0256e8fe4d2c9ffaf48c891651 | diff --git a/lib/deps/errors.js b/lib/deps/errors.js
index <HASH>..<HASH> 100644
--- a/lib/deps/errors.js
+++ b/lib/deps/errors.js
@@ -1,14 +1,16 @@
"use strict";
+var inherits = require('inherits');
+inherits(PouchError, Error);
+
function PouchError(opts) {
+ Error.call(opts.reason);
this.status = opts.status;
this.name = opts.error;
this.message = opts.reason;
this.error = true;
}
-PouchError.prototype__proto__ = Error.prototype;
-
PouchError.prototype.toString = function () {
return JSON.stringify({
status: this.status, | (#<I>) - Fix typo in error constructor | pouchdb_pouchdb | train | js |
c7474d7e671c309d5c2fc27e8fe7bd2a4dab87ec | diff --git a/lib/custom/src/MShop/Service/Provider/Payment/Mpay24.php b/lib/custom/src/MShop/Service/Provider/Payment/Mpay24.php
index <HASH>..<HASH> 100644
--- a/lib/custom/src/MShop/Service/Provider/Payment/Mpay24.php
+++ b/lib/custom/src/MShop/Service/Provider/Payment/Mpay24.php
@@ -30,7 +30,7 @@ class Mpay24
*/
public function repay( \Aimeos\MShop\Order\Item\Iface $order )
{
- $base = $this->getOrderBase( $order->getBaseId() );
+ $base = $this->getOrderBase( $order->getBaseId(), \Aimeos\MShop\Order\Item\Base\Base::PARTS_ADDRESS );
if( ( $cfg = $this->getCustomerData( $base->getCustomerId(), 'repay' ) ) === null )
{ | Loads address of order so details can be passed to mpay<I> | aimeoscom_ai-payments | train | php |
ca15696497ca3100392dfcb6a97705ec4fa9680f | diff --git a/progress-bar.js b/progress-bar.js
index <HASH>..<HASH> 100644
--- a/progress-bar.js
+++ b/progress-bar.js
@@ -41,6 +41,13 @@ var ProgressBar = module.exports = function (options, cursor) {
this.lastCompleted = 0
this.spun = 0
this.last = new Date(0)
+
+ var self = this
+ this._handleSizeChange = function () {
+ if (!self.showing) return
+ self.hide()
+ self.show()
+ }
}
ProgressBar.prototype = {}
@@ -70,6 +77,14 @@ ProgressBar.prototype.setTemplate = function(template) {
this.template = template
}
+ProgressBar.prototype._enableResizeEvents = function() {
+ process.stdout.on('resize', this._handleSizeChange)
+}
+
+ProgressBar.prototype._disableResizeEvents = function() {
+ process.stdout.removeListener('resize', this._handleSizeChange)
+}
+
ProgressBar.prototype.disable = function() {
this.hide()
this.disabled = true | Handle basic resize events
This at least allows for growing the viewport. Shrinking the viewport
causes cruft, that that's inevitable w/o switching to full screen mode
and managing the terminal ourselves, but _that_ sacrifices scrollback. | npm_gauge | train | js |
22533a8c2001c678211d09d964c5a6eb961d370a | diff --git a/src/WindowBase.js b/src/WindowBase.js
index <HASH>..<HASH> 100644
--- a/src/WindowBase.js
+++ b/src/WindowBase.js
@@ -69,6 +69,7 @@ const _normalizeUrl = src => {
return src;
}
};
+const SYNC_REQUEST_BUFFER_SIZE = 5 * 1024 * 1024; // TODO: we can make this unlimited with a streaming buffer + atomics loop
function getScript(url) {
let match;
if (match = url.match(/^data:.+?(;base64)?,(.*)$/)) {
@@ -80,7 +81,7 @@ function getScript(url) {
} else if (match = url.match(/^file:\/\/(.*)$/)) {
return fs.readFileSync(match[1], 'utf8');
} else {
- const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT*3 + 5 * 1024 * 1024);
+ const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT*3 + SYNC_REQUEST_BUFFER_SIZE);
const int32Array = new Int32Array(sab);
const worker = new Worker(path.join(__dirname, 'request.js'), {
workerData: { | Clean up sync requests buffer limit in WindowBase.js | exokitxr_exokit | train | js |
53ab13fe08db54c07853758e39b6acbd2e4cf845 | diff --git a/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php b/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php
+++ b/Tests/Unit/ViewHelpers/StaticGoogleMapsViewHelperTest.php
@@ -70,7 +70,7 @@ class StaticGoogleMapsViewHelperTest extends BaseTestCase
],
'addresses' => $addresses1
],
- 'http://maps.googleapis.com/maps/api/staticmap?&key=abcdefgh&size=300x400&zoom=13&markers=1.1,1.2'
+ 'https://maps.googleapis.com/maps/api/staticmap?&key=abcdefgh&size=300x400&zoom=13&markers=1.1,1.2'
],
'2 addresses' => [
[
@@ -80,7 +80,7 @@ class StaticGoogleMapsViewHelperTest extends BaseTestCase
],
'addresses' => $addresses2
],
- 'http://maps.googleapis.com/maps/api/staticmap?&key=abcdefgh&size=300x400&markers=1.1,1.2&markers=2.1,2.2'
+ 'https://maps.googleapis.com/maps/api/staticmap?&key=abcdefgh&size=300x400&markers=1.1,1.2&markers=2.1,2.2'
]
];
} | [BUGFIX] Update test to use https | FriendsOfTYPO3_tt_address | train | php |
5f147f7c1aded0230de651be648899e6b55e3b3f | diff --git a/src/server/pachyderm_test.go b/src/server/pachyderm_test.go
index <HASH>..<HASH> 100644
--- a/src/server/pachyderm_test.go
+++ b/src/server/pachyderm_test.go
@@ -7882,6 +7882,14 @@ ALTER TABLE ONLY public.company
w, err := c.PutFileSplitWriter(dataRepo, "master", "data", pfs.Delimiter_SQL, 0, 0, false)
require.NoError(t, err)
fullPGDump := pgDumpHeader + strings.Join(rows, "") + pgDumpFooter
+
+ // Test Invalid pgdumps
+ _, err = w.Write([]byte(pgDumpHeader + strings.Join(rows, "")))
+ require.YesError(t, err)
+ _, err = w.Write([]byte(strings.Join(rows, "") + pgDumpFooter))
+ require.YesError(t, err)
+
+ // Test Valid pgdump
_, err = w.Write([]byte(fullPGDump))
require.NoError(t, err)
require.NoError(t, w.Close()) | Add failing tests for invalid pgdumps | pachyderm_pachyderm | train | go |
a2b3a174b4fd70a16c89441f2a26577602dfbe42 | diff --git a/core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java b/core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/index/OIndexMVRBTreeAbstract.java
@@ -918,8 +918,8 @@ public abstract class OIndexMVRBTreeAbstract<T> extends OSharedResourceAdaptiveE
try {
map.commitChanges(true);
- map.unload();
- Orient.instance().getMemoryWatchDog().removeListener(watchDog);
+ // TODO: GO IN DEEP WHY THE UNLOAD CAUSE LOOSE OF INDEX ENTRIES!
+ // map.unload();
} finally {
releaseExclusiveLock(); | Fixed critical bug on indexes: after db close/shutdown index entries could be lost. This is a patch but we go in deep toget the unload() working to save memory on db closing. | orientechnologies_orientdb | train | java |
5878914bf8f14e243c828501a154b7d48c3c1d82 | diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -29,7 +29,7 @@ return array(
'label' => 'QTI test model',
'description' => 'TAO QTI test implementation',
'license' => 'GPL-2.0',
- 'version' => '18.8.0',
+ 'version' => '18.9.0',
'author' => 'Open Assessment Technologies',
'requires' => array(
'taoTests' => '>=6.9.0',
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index <HASH>..<HASH> 100644
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -1755,6 +1755,6 @@ class Updater extends \common_ext_ExtensionUpdater {
$this->setVersion('18.6.0');
}
- $this->skip('18.6.0', '18.8.0');
+ $this->skip('18.6.0', '18.9.0');
}
} | Bump to version <I> | oat-sa_extension-tao-testqti | train | php,php |
1db86b80644fd43336e1048d107cc5b8efdd9935 | diff --git a/packages/drawer/src/react/index.js b/packages/drawer/src/react/index.js
index <HASH>..<HASH> 100644
--- a/packages/drawer/src/react/index.js
+++ b/packages/drawer/src/react/index.js
@@ -129,7 +129,7 @@ class Drawer extends React.Component {
<div>
<DrawerBase isOpen={isOpen} onClick={this.handleClick}>
<DrawerPanelContent themeName={themeName}>
- <Div marginTop={-1} padding={`0 ${core.layout.spacingMedium}`}>
+ <Div padding={`0 ${core.layout.spacingMedium}`}>
{this.props.base}
</Div>
</DrawerPanelContent> | refactor(drawer): don't overlap drawer base row border
first rows now have no border top | pluralsight_design-system | train | js |
7183fc81d2fd1b21d7a4dbde3e64e50208feb458 | diff --git a/integration/client/client_test.go b/integration/client/client_test.go
index <HASH>..<HASH> 100644
--- a/integration/client/client_test.go
+++ b/integration/client/client_test.go
@@ -449,6 +449,13 @@ func TestImagePullSchema1(t *testing.T) {
}
func TestImagePullWithConcurrencyLimit(t *testing.T) {
+ if os.Getenv("CIRRUS_CI") != "" {
+ // This test tends to fail under Cirrus CI + Vagrant due to "connection reset by peer" from
+ // pkg-containers.githubusercontent.com.
+ // Does GitHub throttle requests from Cirrus CI more compared to GitHub Actions?
+ t.Skip("unstable under Cirrus CI")
+ }
+
client, err := newClient(t, address)
if err != nil {
t.Fatal(err) | Skip TestImagePullWithConcurrencyLimit on Cirrus CI
This test tends to fail under Cirrus CI + Vagrant. Skipping for now
since running the test on GitHub Actions would be suffice. | containerd_containerd | train | go |
49502a441263c547a23b6da10e36aa17c5c6ae59 | diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -16,22 +16,16 @@ var configFiles = [
"./test/**/*.js",
];
-function handleError (error) {
- throw error;
-}
-
gulp.task("jscs", function () {
return gulp.src(files.concat(configFiles))
- .pipe(jscs("./.jscs.json"))
- .on("error", handleError);
+ .pipe(jscs("./.jscs.json"));
});
gulp.task("jshint", function () {
return gulp.src(files.concat(configFiles))
.pipe(jshint())
.pipe(jshint.reporter("default"))
- .pipe(jshint.reporter("fail"))
- .on("error", handleError);
+ .pipe(jshint.reporter("fail"));
});
gulp.task("mocha", function (callback) { | Removed manual error handling.
Apparently this is no longer needed with the current versions of the
tools. | jussi-kalliokoski_react-no-jsx | train | js |
e72185e1b0299221448650760b91c74ff1bec3e7 | diff --git a/lib/twitter/client.rb b/lib/twitter/client.rb
index <HASH>..<HASH> 100644
--- a/lib/twitter/client.rb
+++ b/lib/twitter/client.rb
@@ -7,7 +7,7 @@ require 'twitter/version'
module Twitter
class Client
include Twitter::Utils
- attr_accessor :access_token, :access_token_secret, :consumer_key, :consumer_secret
+ attr_accessor :access_token, :access_token_secret, :consumer_key, :consumer_secret, :user_agent, :proxy
deprecate_alias :oauth_token, :access_token
deprecate_alias :oauth_token=, :access_token=
deprecate_alias :oauth_token_secret, :access_token_secret | add the ability to set user_agent and proxy | sferik_twitter | train | rb |
1a59d02308cee67ebbbf2b849b95ef6775a38673 | diff --git a/lib/conceptql/nodifier.rb b/lib/conceptql/nodifier.rb
index <HASH>..<HASH> 100644
--- a/lib/conceptql/nodifier.rb
+++ b/lib/conceptql/nodifier.rb
@@ -20,6 +20,10 @@ module ConceptQL
end
def create(scope, operator, *values)
+ operator = operator.to_sym
+ if operators[operator].nil?
+ raise "Can't find operator for '#{operator}' in #{operators.keys.sort}"
+ end
operator = operators[operator].new(*values)
operator.scope = scope
operator | Better error when Nodifier can't find an operator | outcomesinsights_conceptql | train | rb |
13a420aea74bfa4c651d8eb47c888fd114de4cbc | diff --git a/python_modules/dagster/dagster/cli/api.py b/python_modules/dagster/dagster/cli/api.py
index <HASH>..<HASH> 100644
--- a/python_modules/dagster/dagster/cli/api.py
+++ b/python_modules/dagster/dagster/cli/api.py
@@ -633,4 +633,7 @@ def grpc_health_check_command(port=None, socket=None, host="localhost", use_ssl=
client = DagsterGrpcClient(port=port, socket=socket, host=host, use_ssl=use_ssl)
status = client.health_check_query()
if status != "SERVING":
+ click.echo(f"Unable to connect to gRPC server: {status}")
sys.exit(1)
+ else:
+ click.echo("gRPC connection successful") | Add log message to grpc health check (#<I>)
Used for k8s readiness probes and for debugging. This makes it easier to debug with | dagster-io_dagster | train | py |
5e4378be994221adf4f0cc11e2dff6fdb70db2c2 | diff --git a/lib/nominet-epp.rb b/lib/nominet-epp.rb
index <HASH>..<HASH> 100644
--- a/lib/nominet-epp.rb
+++ b/lib/nominet-epp.rb
@@ -79,7 +79,9 @@ module NominetEPP
# @return [Hash] Nominet Schema Locations by prefix
def schemaLocations
- { }
+ @schemaLocations ||= begin
+ service_schemas.merge(extension_schemas)
+ end
end
include Helpers
@@ -194,5 +196,19 @@ module NominetEPP
ns
end
end
+ def service_schemas
+ service_namespaces.inject({}) do |schema, ns|
+ name, urn = ns
+ schema[name] = "#{urn} #{urn.split(':').last}.xsd"
+ schema
+ end
+ end
+ def extension_schemas
+ extension_namespaces.inject({}) do |schema, ns|
+ name, uri = ns
+ schema[name] = "#{uri} #{uri.split('/').last}.xsd"
+ schema
+ end
+ end
end
end | Re-add #schemaLocations hash.
This is derived from the SERVICE_URNS and SERVICE_EXTENSION_URNS arrays. | m247_nominet-epp | train | rb |
8a5457d37f6aa8b7d20ab299dbe70132a5efb4a3 | diff --git a/tensorflow_datasets/text/imdb.py b/tensorflow_datasets/text/imdb.py
index <HASH>..<HASH> 100644
--- a/tensorflow_datasets/text/imdb.py
+++ b/tensorflow_datasets/text/imdb.py
@@ -58,9 +58,9 @@ class IMDBReviewsConfig(tfds.core.BuilderConfig):
**kwargs: keyword arguments forwarded to super.
"""
super(IMDBReviewsConfig, self).__init__(
- version=tfds.core.Version(
- "1.0.0",
- "New split API (https://tensorflow.org/datasets/splits)"),
+ version=tfds.core.Version("1.0.0"),
+ release_notes=
+ "New split API (https://tensorflow.org/datasets/splits)",
**kwargs)
self.text_encoder_config = (
text_encoder_config or tfds.deprecated.text.TextEncoderConfig()) | Add release notes for imdb dataset | tensorflow_datasets | train | py |
cac70fa76a1389874f196e7fce80c70d5477d866 | diff --git a/gandi/commands/vm.py b/gandi/commands/vm.py
index <HASH>..<HASH> 100644
--- a/gandi/commands/vm.py
+++ b/gandi/commands/vm.py
@@ -29,3 +29,36 @@ def info(gandi, id):
result = gandi.call('vm.info', (id, ))
from pprint import pprint
pprint(result)
+
+
+@cli.command()
+@click.argument('id', type=click.INT)
+@pass_gandi
+def stop(gandi, id):
+ """stop a virtual machine"""
+
+ result = gandi.call('vm.stop', (id, ))
+ from pprint import pprint
+ pprint(result)
+
+
+@cli.command()
+@click.argument('id', type=click.INT)
+@pass_gandi
+def start(gandi, id):
+ """start a virtual machine"""
+
+ result = gandi.call('vm.start', (id, ))
+ from pprint import pprint
+ pprint(result)
+
+
+@cli.command()
+@click.argument('id', type=click.INT)
+@pass_gandi
+def reboot(gandi, id):
+ """reboot a virtual machine"""
+
+ result = gandi.call('vm.reboot', (id, ))
+ from pprint import pprint
+ pprint(result) | Add start, stop, reboot commands for a vm | Gandi_gandi.cli | train | py |
6f9028010fa95ef364a35d8fc46eb62235a5ac3b | diff --git a/eventsourcing/postgres.py b/eventsourcing/postgres.py
index <HASH>..<HASH> 100644
--- a/eventsourcing/postgres.py
+++ b/eventsourcing/postgres.py
@@ -344,7 +344,7 @@ class Factory(InfrastructureFactory):
)
def aggregate_recorder(self, purpose: str = "events") -> AggregateRecorder:
- prefix = self.application_name or "stored"
+ prefix = self.application_name.lower() or "stored"
events_table_name = prefix + "_" + purpose
recorder = PostgresAggregateRecorder(
datastore=self.datastore, events_table_name=events_table_name
@@ -354,7 +354,7 @@ class Factory(InfrastructureFactory):
return recorder
def application_recorder(self) -> ApplicationRecorder:
- prefix = self.application_name or "stored"
+ prefix = self.application_name.lower() or "stored"
events_table_name = prefix + "_events"
recorder = PostgresApplicationRecorder(
datastore=self.datastore, events_table_name=events_table_name
@@ -364,9 +364,9 @@ class Factory(InfrastructureFactory):
return recorder
def process_recorder(self) -> ProcessRecorder:
- prefix = self.application_name or "stored"
+ prefix = self.application_name.lower() or "stored"
events_table_name = prefix + "_events"
- prefix = self.application_name or "notification"
+ prefix = self.application_name.lower() or "notification"
tracking_table_name = prefix + "_tracking"
recorder = PostgresProcessRecorder(
datastore=self.datastore, | Changed postgres.py to lower() the case of application names used in
table names. PostgreSQL does this anyway, but it improves error msgs. | johnbywater_eventsourcing | train | py |
015cc602439b3ae55873ec09c212d34d72c490be | diff --git a/testsuite/shared/src/main/java/org/jboss/as/test/integration/domain/management/util/DomainLifecycleUtil.java b/testsuite/shared/src/main/java/org/jboss/as/test/integration/domain/management/util/DomainLifecycleUtil.java
index <HASH>..<HASH> 100644
--- a/testsuite/shared/src/main/java/org/jboss/as/test/integration/domain/management/util/DomainLifecycleUtil.java
+++ b/testsuite/shared/src/main/java/org/jboss/as/test/integration/domain/management/util/DomainLifecycleUtil.java
@@ -148,6 +148,11 @@ public class DomainLifecycleUtil {
.addProcessControllerJavaOptions(javaOpts);
}
+ final String jbossArgs = System.getProperty("jboss.domain.server.args");
+ if (jbossArgs != null) {
+ commandBuilder.addServerArguments(jbossArgs.split("\\s+"));
+ }
+
// Set the Java Home for the servers
if (configuration.getJavaHome() != null) {
commandBuilder.setServerJavaHome(configuration.getJavaHome()); | [WFCORE-<I>] Add a property to pass server arguments to a test domain server. | wildfly_wildfly-core | train | java |
906c13d4f09d78285194bfea7c569b3c67772cfb | diff --git a/discord/threads.py b/discord/threads.py
index <HASH>..<HASH> 100644
--- a/discord/threads.py
+++ b/discord/threads.py
@@ -166,6 +166,8 @@ class Thread(Messageable, Hashable):
self._type = try_enum(ChannelType, data['type'])
self.last_message_id = _get_as_snowflake(data, 'last_message_id')
self.slowmode_delay = data.get('rate_limit_per_user', 0)
+ self.message_count = data['message_count']
+ self.member_count = data['member_count']
self._unroll_metadata(data['thread_metadata'])
try: | Set Thread.member/message_count | Rapptz_discord.py | train | py |
7db6e649c173cea3619c0bbefeda0254ca32d569 | diff --git a/lib/nodes/literal.js b/lib/nodes/literal.js
index <HASH>..<HASH> 100644
--- a/lib/nodes/literal.js
+++ b/lib/nodes/literal.js
@@ -12,9 +12,9 @@ var base_text_attrs = {
};
function Literal(paper, structure) {
- TextBox.call(this, paper, '"' + structure.content + '"',
+ TextBox.call(this, paper, '“' + structure.content + '”',
base_text_attrs, base_rect_attrs);
}
Literal.prototype = Object.create(TextBox.prototype);
-Literal.prototype.constructor = Literal;
\ No newline at end of file
+Literal.prototype.constructor = Literal; | Use curly quotation marks for literal boxes (#1)
Marginally easier to read than """""" (now it's “""""”). | ForbesLindesay_regexplained | train | js |
8bdb5b6ca9932ef896c19b8e2f222d874ccffbbf | diff --git a/lib/pseudohiki/version.rb b/lib/pseudohiki/version.rb
index <HASH>..<HASH> 100644
--- a/lib/pseudohiki/version.rb
+++ b/lib/pseudohiki/version.rb
@@ -1,3 +1,3 @@
module PseudoHiki
- VERSION = "0.0.0.2"
+ VERSION = "0.0.1"
end | update the version number to <I>:
merged changes (mainly made until version <I>.develop, except for experimental features) from develop branch | nico-hn_PseudoHikiParser | train | rb |
493e33aa9d081cb97f3cbee269ccb4b6b28a6102 | diff --git a/cobra/io/mat.py b/cobra/io/mat.py
index <HASH>..<HASH> 100644
--- a/cobra/io/mat.py
+++ b/cobra/io/mat.py
@@ -65,7 +65,10 @@ def load_matlab_model(infile_path, variable_name=None):
<= set(m.dtype.names):
continue
model = Model()
- model.id = m["description"][0, 0][0]
+ if "description" in m:
+ model.id = m["description"][0, 0][0]
+ else:
+ model.id = possible_name
model.description = model.id
for i, name in enumerate(m["mets"][0, 0]):
new_metabolite = Metabolite() | small bug in load_matlab_model
model should still load if "description" field is not present" | opencobra_cobrapy | train | py |
185557c38da435b00db2ad4a0b9c258e9bb1fa3f | diff --git a/pysoundcard.py b/pysoundcard.py
index <HASH>..<HASH> 100644
--- a/pysoundcard.py
+++ b/pysoundcard.py
@@ -400,7 +400,7 @@ class Stream(object):
_npsizeof[self.input_format] *
num_frames)
input_data = \
- np.fromstring(ffi.buffer(input_ptr, num_bytes),
+ np.frombuffer(ffi.buffer(input_ptr, num_bytes),
dtype=self.input_format,
count=num_frames*self.input_channels)
input_data = np.reshape(input_data,
@@ -583,7 +583,7 @@ class Stream(object):
if raw:
return data
else:
- data = np.fromstring(ffi.buffer(data), dtype=self.input_format,
+ data = np.frombuffer(ffi.buffer(data), dtype=self.input_format,
count=num_frames*self.input_channels)
return np.reshape(data, (num_frames, self.input_channels)) | switched implementation to use numpy.frombuffer instead of numpy.fromstring
because it is faster and more correct | bastibe_PySoundCard | train | py |
1c95761a223bc25cc04e4ceb0190ffbfa57a7c13 | diff --git a/utils.py b/utils.py
index <HASH>..<HASH> 100644
--- a/utils.py
+++ b/utils.py
@@ -15,11 +15,23 @@ class DeployDockerBasesCommand(distutils.cmd.Command):
pass
def run(self):
+ import requests
+ import arca
from arca import DockerBackend
backend = DockerBackend()
backend.check_docker_access()
+ response = requests.get(
+ "https://hub.docker.com/v2/repositories/mikicz/arca/tags/",
+ params={"page_size": 1000}
+ )
+ response = response.json()
+
+ if arca.__version__ in [x["name"] for x in response["results"]]:
+ print("This version was already pushed into the registry.")
+ return
+
base_arca_name, base_arca_tag = backend.get_arca_base(False)
print(f"Built image {base_arca_name}:{base_arca_tag}") | Only pushing docker base images to registry when version changes | mikicz_arca | train | py |
2f31e94a68a8a1c14b2707cd933e9616fd006366 | diff --git a/steam/__init__.py b/steam/__init__.py
index <HASH>..<HASH> 100644
--- a/steam/__init__.py
+++ b/steam/__init__.py
@@ -16,6 +16,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
-__version__ = "3.0"
+__version__ = "3.1"
from base import * | Version <I> - First use of new versioning system | Lagg_steamodd | train | py |
274f184eca9d39bff9ce5f9cf21eef7d7e614b8e | diff --git a/openquake/calculators/risk/general.py b/openquake/calculators/risk/general.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/risk/general.py
+++ b/openquake/calculators/risk/general.py
@@ -123,8 +123,7 @@ class BaseRiskCalculator(base.CalculatorNext):
with logs.tracing('store risk model'):
self.set_risk_models()
- allowed_imts = (self.hc.intensity_measure_types or
- self.hc.intensity_measure_types_and_levels.keys())
+ allowed_imts = self.hc.allowed_imts()
if not self.imt in allowed_imts:
raise RuntimeError(
diff --git a/openquake/db/models.py b/openquake/db/models.py
index <HASH>..<HASH> 100644
--- a/openquake/db/models.py
+++ b/openquake/db/models.py
@@ -863,6 +863,14 @@ class HazardCalculation(djm.Model):
# there's no geometry defined
return None
+ def allowed_imts(self):
+ """
+ Returns intensity mesure types or
+ intensity mesure types with levels.
+ """
+
+ return (self.intensity_measure_types or
+ self.intensity_measure_types_and_levels.keys())
class RiskCalculation(djm.Model):
''' | extracted method and added to HazardCalculation | gem_oq-engine | train | py,py |
6b6aacb4435e7bab34a9acd872f566fc2f8581fd | diff --git a/lib/heroku/command.rb b/lib/heroku/command.rb
index <HASH>..<HASH> 100644
--- a/lib/heroku/command.rb
+++ b/lib/heroku/command.rb
@@ -56,8 +56,6 @@ module Heroku
end
def extract_error(response)
- return "Not found" if response.code.to_i == 404
-
msg = parse_error_xml(response.body) rescue ''
msg = 'Internal server error' if msg.empty?
msg | this will not be called with a <I> (RestClient throws a ResourceNotFound in this case | heroku_legacy-cli | train | rb |
46023892f4b47196bd75bff4566edc8cb776b0a8 | diff --git a/pelix/misc/log.py b/pelix/misc/log.py
index <HASH>..<HASH> 100644
--- a/pelix/misc/log.py
+++ b/pelix/misc/log.py
@@ -333,7 +333,8 @@ class LogServiceFactory(logging.Handler):
bundle = self._bundle_from_module(record.module)
# Convert to a LogEntry
- entry = LogEntry(record.levelno, record.message, None, bundle, None)
+ entry = LogEntry(
+ record.levelno, record.getMessage(), None, bundle, None)
self._reader._store_entry(entry)
def get_service(self, bundle, registration): | LogService: use record.getMessage() instead of record.message
This seems to work on a larger panel of Python versions | tcalmant_ipopo | train | py |
103b8569cf055298ac360dfee8cf28444090d701 | diff --git a/gutenberg/metainfo.py b/gutenberg/metainfo.py
index <HASH>..<HASH> 100644
--- a/gutenberg/metainfo.py
+++ b/gutenberg/metainfo.py
@@ -5,6 +5,24 @@ import re
import requests
+def etextno(lines):
+ """Retrieves the id for an etext.
+
+ Args:
+ lines (iter): the lines of the etext to search
+
+ Returns:
+ str: the id of the etext or None if no such id was found
+
+ """
+ etext_re = re.compile(r'e(text|book) #(?p<etextno>\d+)', re.I)
+ for line in lines:
+ match = etext_re.search(line)
+ if match is not None:
+ return match.group('etextno')
+ return None
+
+
def raw_metainfo():
"""Retrieves the raw Project Gutenberg index via HTTP. | Etext-uid generation method | c-w_gutenberg | train | py |
7e9022c7cb31512f4aca7575de55c417d0116f17 | diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/confirmations_controller.rb
+++ b/app/controllers/confirmations_controller.rb
@@ -6,6 +6,7 @@ module Milia
class ConfirmationsController < Devise::ConfirmationsController
skip_before_action :authenticate_tenant!
+ before_action :set_confirmable, :only => [ :update, :show ]
# PUT /resource/confirmation
@@ -43,7 +44,7 @@ module Milia
log_action( "devise pass-thru" )
super # this will redirect
else
- log_action( "show password set form" )
+ log_action( "password set form" )
prep_do_show() # prep for the form
end
# else fall thru to show template which is form to set a password
@@ -52,6 +53,12 @@ module Milia
protected
+ def set_confirmable()
+ original_token = params[:confirmation_token]
+ confirmation_token = Devise.token_generator.digest(User, :confirmation_token, original_token)
+ @confirmable = User.find_or_initialize_with_error_by(:confirmation_token, confirmation_token)
+ end
+
def user_params()
params.require(:user).permit(:password, :password_confirmation, :confirmation_token)
end | confirmations ctlr rewrite - 2 | jekuno_milia | train | rb |
cfe407aac85dc0051b908ff66fe26c11b5ea10e2 | diff --git a/src/info/timeline.js b/src/info/timeline.js
index <HASH>..<HASH> 100644
--- a/src/info/timeline.js
+++ b/src/info/timeline.js
@@ -42,8 +42,8 @@ d3plus.info.timeline = function(vars) {
min_val = d3plus.utils.closest(year_ticks,d3.time.year.floor(extent0[0]))
}
- var min_index = years.indexOf(min_val.getFullYear()),
- max_index = years.indexOf(max_val.getFullYear())
+ var min_index = year_ticks.indexOf(min_val),
+ max_index = year_ticks.indexOf(max_val)
if (max_index-min_index >= min_required) {
var extent = [min_val,max_val] | fixed timeline issue where last year is inselectable | alexandersimoes_d3plus | train | js |
0b96f0a2a437cebf03c0861b0709067711556670 | diff --git a/pyvodb/tables.py b/pyvodb/tables.py
index <HASH>..<HASH> 100644
--- a/pyvodb/tables.py
+++ b/pyvodb/tables.py
@@ -238,7 +238,8 @@ class Series(TableBase):
start += relativedelta.relativedelta(months=+1)
start = start.replace(day=1)
else:
- raise ValueError('Unknown recurrence scheme: ' + scheme)
+ # Otherwise, start on the next day.
+ start += relativedelta.relativedelta(days=+1)
result = rrule.rrulestr(self.recurrence_rule, dtstart=start)
if n is not None:
result = itertools.islice(result, n) | Handle next occurences of weekly events | pyvec_pyvodb | train | py |
bf8b7f850e2496076db3245e009396aa02958bfc | diff --git a/lib/authlogic/controller_adapters/rails_adapter.rb b/lib/authlogic/controller_adapters/rails_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/authlogic/controller_adapters/rails_adapter.rb
+++ b/lib/authlogic/controller_adapters/rails_adapter.rb
@@ -12,7 +12,7 @@ module Authlogic
end
def cookie_domain
- @cookie_domain_key ||= (Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 3) ? :domain : :session_domain
+ @cookie_domain_key ||= Rails::VERSION::STRING >= '2.3' ? :domain : :session_domain
ActionController::Base.session_options[@cookie_domain_key]
end
@@ -35,4 +35,4 @@ module Authlogic
end
end
-ActionController::Base.send(:include, Authlogic::ControllerAdapters::RailsAdapter::RailsImplementation)
\ No newline at end of file
+ActionController::Base.send(:include, Authlogic::ControllerAdapters::RailsAdapter::RailsImplementation) | Fix Rails version check.
Previous check would fail with Rails >= <I> | binarylogic_authlogic | train | rb |
d570ce2d3c72f6be7ae928858ec242759882bac2 | diff --git a/base.php b/base.php
index <HASH>..<HASH> 100644
--- a/base.php
+++ b/base.php
@@ -627,8 +627,7 @@ class Base extends Prefab {
* @param $str string
**/
function encode($str) {
- return @htmlentities($str,
- ENT_COMPAT|(defined('ENT_HTML5')?ENT_HTML5:0),
+ return @htmlentities($str,$this->hive['BITMASK'],
$this->hive['ENCODING'],FALSE)?:$this->scrub($str);
}
@@ -638,8 +637,7 @@ class Base extends Prefab {
* @param $str string
**/
function decode($str) {
- return html_entity_decode($str,
- ENT_COMPAT|(defined('ENT_HTML5')?ENT_HTML5:0),
+ return html_entity_decode($str,$this->hive['BITMASK'],
$this->hive['ENCODING']);
}
@@ -1669,6 +1667,7 @@ class Base extends Prefab {
'ALIASES'=>array(),
'AUTOLOAD'=>'./',
'BASE'=>$base,
+ 'BITMASK'=>ENT_COMPAT,
'BODY'=>NULL,
'CACHE'=>FALSE,
'CASELESS'=>TRUE, | New: BITMASK variable to allow ENT_COMPAT override | bcosca_fatfree-core | train | php |
c5a240537b9d806b1ef8abbcae0d0e95ca040722 | diff --git a/src/widgets/ClientSellerLink.php b/src/widgets/ClientSellerLink.php
index <HASH>..<HASH> 100644
--- a/src/widgets/ClientSellerLink.php
+++ b/src/widgets/ClientSellerLink.php
@@ -32,8 +32,10 @@ class ClientSellerLink extends \yii\base\widget
if ($this->model->getClient() === 'anonym') {
$result = Html::tag('b', 'anonym');
- } else {
+ } elseif ($this->getClientId() == Yii::$app->user->id || Yii::$app->user->can('support')) {
$result = Html::a($this->getClient(), ['@client/view', 'id' => $this->getClientId()]);
+ } else {
+ $result = $this->getClient();
}
if (Yii::$app->user->can('support') && $this->getSeller() !== false) { | ClientSellerLink - updated to show link to client detais only for self client id, when user is client | hiqdev_hipanel-core | train | php |
b3e0c813483a84a48a52070c9d372b2d72f074cf | diff --git a/jupyter-widgets-htmlmanager/test/webpack.conf.js b/jupyter-widgets-htmlmanager/test/webpack.conf.js
index <HASH>..<HASH> 100644
--- a/jupyter-widgets-htmlmanager/test/webpack.conf.js
+++ b/jupyter-widgets-htmlmanager/test/webpack.conf.js
@@ -1,4 +1,5 @@
var path = require('path');
+var postcss = require('postcss');
module.exports = {
entry: './test/build/index.js',
@@ -17,10 +18,22 @@ module.exports = {
{ test: /\.json$/, loader: 'json-loader' },
],
},
- postcss: function () {
+ postcss: () => {
return [
- require('postcss-import'),
- require('postcss-cssnext')
+ postcss.plugin('delete-tilde', () => {
+ return function (css) {
+ css.walkAtRules('import', (rule) => {
+ rule.params = rule.params.replace('~', '');
+ });
+ };
+ }),
+ postcss.plugin('prepend', () => {
+ return (css) => {
+ css.prepend(`@import '@jupyter-widgets/controls/css/labvariables.css';`)
+ }
+ }),
+ require('postcss-import')(),
+ require('postcss-cssnext')()
];
}
} | Put in workarounds for the webpack for the html manager test suite. | jupyter-widgets_ipywidgets | train | js |
d115b0867895ba59b9dcb827dd22c773b69e189f | diff --git a/lib/icon/module.js b/lib/icon/module.js
index <HASH>..<HASH> 100755
--- a/lib/icon/module.js
+++ b/lib/icon/module.js
@@ -62,11 +62,11 @@ async function run (pwa, _emitAssets) {
// Verify purpose
if (options.purpose) {
- const purpose = Array.isArray(options.purpose) ? options.purpose : [options.purpose]
- const len = purpose.length
+ if (!Array.isArray(options.purpose)) {
+ options.purpose = [options.purpose]
+ }
const validPurpose = ['badge', 'maskable', 'any']
- options.purpose = purpose.filter(item => validPurpose.includes(item))
- if (len !== options.purpose.length) {
+ if (options.purpose.find(p => !validPurpose.includes(p))) {
// eslint-disable-next-line no-console
console.warn('[pwa] [icon] Some invalid items removed from `options.purpose`. Valid values: ' + validPurpose)
} | refactor: simplify purpose validation logic | nuxt-community_pwa-module | train | js |
611a406c4d22622b72b2406d97d64795b5d30f8a | diff --git a/src/main/java/com/turn/ttorrent/common/Peer.java b/src/main/java/com/turn/ttorrent/common/Peer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/turn/ttorrent/common/Peer.java
+++ b/src/main/java/com/turn/ttorrent/common/Peer.java
@@ -234,7 +234,6 @@ public class Peer {
return "Peer{" +
"address=" + address +
", hostId='" + hostId + '\'' +
- ", peerId=" + peerId +
", hexPeerId='" + hexPeerId + '\'' +
", hexInfoHash='" + hexInfoHash + '\'' +
'}'; | removed output of peerid bytebuffer in tostring method | mpetazzoni_ttorrent | train | java |
69b830387b71406d132992a773061d62105addc3 | diff --git a/php/Exchange.php b/php/Exchange.php
index <HASH>..<HASH> 100644
--- a/php/Exchange.php
+++ b/php/Exchange.php
@@ -2351,18 +2351,14 @@ class Exchange {
public function oath () {
if ($this->twofa) {
- try {
- return $this->totp ($this->twofa);
- } catch (\Exception $e) {
- echo $e;
- }
+ return $this->totp ($this->twofa);
} else {
- echo 'you must set $this->twofa in order for oath to work';
+ throw new ExchangeError ($this->id . ' requires a non-empty value in $this->twofa property');
}
}
public static function totp ($key) {
- $otp = TOTP::create(Base32::encode($key));
- return $otp->now();
+ $otp = TOTP::create (Base32::encode ($key));
+ return $otp->now ();
}
} | Exchange.php oath() simplified | ccxt_ccxt | train | php |
de9ffd455e1a107937c4b6bc2d545c26b63c4980 | diff --git a/src/main/java/de/btobastian/javacord/entities/Server.java b/src/main/java/de/btobastian/javacord/entities/Server.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/btobastian/javacord/entities/Server.java
+++ b/src/main/java/de/btobastian/javacord/entities/Server.java
@@ -990,6 +990,17 @@ public interface Server extends DiscordEntity {
}
/**
+ * Checks if the given user can view the audit log of the server.
+ *
+ * @param user The user to check.
+ * @return Whether the given user view the audit log or not.
+ */
+ default boolean canViewAuditLog(User user) {
+ return hasPermissions(user, PermissionType.ADMINISTRATOR) ||
+ hasPermissions(user, PermissionType.VIEW_AUDIT_LOG);
+ }
+
+ /**
* Adds a listener, which listens to message creates in this server.
*
* @param listener The listener to add. | Added Server#canViewAuditLog(User) | Javacord_Javacord | train | java |
809de7a052c7da8818accb4edbee39d9c8946a7f | diff --git a/network/proxy/mucp/mucp.go b/network/proxy/mucp/mucp.go
index <HASH>..<HASH> 100644
--- a/network/proxy/mucp/mucp.go
+++ b/network/proxy/mucp/mucp.go
@@ -166,6 +166,7 @@ func (p *Proxy) watchRoutes() {
p.Lock()
if err := p.manageRouteCache(event.Route, fmt.Sprintf("%s", event.Type)); err != nil {
// TODO: should we bail here?
+ p.Unlock()
continue
}
p.Unlock() | Mutex Unlock when we fail to store route in cache. | micro_go-micro | train | go |
8013fd50da112b39df9bcb9672dce47bb3423350 | diff --git a/src/ocrmypdf/_pipeline.py b/src/ocrmypdf/_pipeline.py
index <HASH>..<HASH> 100644
--- a/src/ocrmypdf/_pipeline.py
+++ b/src/ocrmypdf/_pipeline.py
@@ -349,8 +349,8 @@ def rasterize_preview(
context):
pageinfo = get_pageinfo(input_file, context)
options = context.get_options()
- canvas_dpi = get_canvas_square_dpi(pageinfo, options) / 2
- page_dpi = get_page_square_dpi(pageinfo, options) / 2
+ canvas_dpi = get_canvas_square_dpi(pageinfo, options)
+ page_dpi = get_page_square_dpi(pageinfo, options)
ghostscript.rasterize_pdf(
input_file, output_file, xres=canvas_dpi, yres=canvas_dpi, | Draw preview image at full resolution
As reported in #<I> and confirmed by the test file in #<I>, downsampling
the preview adversely affects quality of image rotation especially for
small font sizes and marginal scans.
Full size gets rotation accuracy. This makes rotation a little inefficient
since it rasterizes twice - to be addressed later. | jbarlow83_OCRmyPDF | train | py |
f9b53d424e55bca4c7efe6220d36acafaee613cd | diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js
index <HASH>..<HASH> 100644
--- a/js/bootstrap-collapse.js
+++ b/js/bootstrap-collapse.js
@@ -71,7 +71,7 @@
this.$element
.removeClass('collapse')
- [dimension](size || '')
+ [dimension](size || 'auto')
[0].offsetWidth
this.$element.addClass('collapse') | Fixes issue with Opera flickering on the collapse plugin when reset is called without specifying the size
<URL> | twbs_bootstrap | train | js |
d00b8cc56dcfb58df3fefbecfc0bc2596b7f20ac | diff --git a/web/src/main/java/uk/ac/ebi/atlas/experimentimport/ExperimentMetadataCRUD.java b/web/src/main/java/uk/ac/ebi/atlas/experimentimport/ExperimentMetadataCRUD.java
index <HASH>..<HASH> 100644
--- a/web/src/main/java/uk/ac/ebi/atlas/experimentimport/ExperimentMetadataCRUD.java
+++ b/web/src/main/java/uk/ac/ebi/atlas/experimentimport/ExperimentMetadataCRUD.java
@@ -165,14 +165,12 @@ public class ExperimentMetadataCRUD {
public void makeExperimentPrivate(String experimentAccession) throws IOException {
experimentDAO.updateExperiment(experimentAccession, true);
analyticsIndexerManager.deleteFromAnalyticsIndex(experimentAccession);
- ExperimentDTO experimentDTO = experimentDAO.findExperiment(experimentAccession, false);
- experimentTrader.removeExperimentFromCache(experimentAccession, experimentDTO.getExperimentType());
+ updateExperimentDesign(experimentAccession);
}
public void makeExperimentPublic(String experimentAccession) throws IOException {
experimentDAO.updateExperiment(experimentAccession, false);
- ExperimentDTO experimentDTO = experimentDAO.findExperiment(experimentAccession, false);
- updateExperimentDesign(experimentDTO);
+ updateExperimentDesign(experimentAccession);
}
public void updateExperimentDesign(String experimentAccession) { | Successive calls to UPDATE_PRIVATE or UPDATE_PUBLIC don’t fail (by the way, why are the experiment designs updated when just changing the private setting of an experiment?) | ebi-gene-expression-group_atlas | train | java |
d9eeaf26391af4edb5b308cefa6853f13b85444a | diff --git a/Lib/glyphsLib/builder/filters.py b/Lib/glyphsLib/builder/filters.py
index <HASH>..<HASH> 100644
--- a/Lib/glyphsLib/builder/filters.py
+++ b/Lib/glyphsLib/builder/filters.py
@@ -88,4 +88,7 @@ def write_glyphs_filter(result):
for key, arg in result["kwargs"].items():
if key.lower() in ("include", "exclude"):
elements.append(key + ":" + reverse_cast_to_number_or_bool(arg))
+ for key, arg in result.items():
+ if key.lower() in ("include", "exclude"):
+ elements.append(key + ":" + ",".join(arg))
return ";".join(elements) | write_glyphs_filter: handle free-standing in/exclude arguments | googlefonts_glyphsLib | train | py |
754f16ab80494457e55c718e6734d7a8752f20d0 | diff --git a/lib/text/ui_text_displayer.js b/lib/text/ui_text_displayer.js
index <HASH>..<HASH> 100644
--- a/lib/text/ui_text_displayer.js
+++ b/lib/text/ui_text_displayer.js
@@ -370,8 +370,6 @@ shaka.text.UITextDisplayer = class {
captionsStyle.cssFloat = 'left';
} else if (cue.positionAlign == Cue.positionAlign.RIGHT) {
captionsStyle.cssFloat = 'right';
- } else {
- captionsStyle.margin = 'auto';
}
captionsStyle.textAlign = cue.textAlign; | Fix subtitles in the center of the video
The margin: auto style centers the element both horizontally and
vertically. We don't want vertical centering, and we already get
horizontal centering when appropriate through other styles. So
removing margin: auto is the best fix.
Closes #<I>
Change-Id: Icff<I>e<I>b<I>b<I>d<I>ebb<I>fbcf<I> | google_shaka-player | train | js |
c03d666fe9815346085ffc8083f5f20735586d93 | diff --git a/_config.php b/_config.php
index <HASH>..<HASH> 100644
--- a/_config.php
+++ b/_config.php
@@ -1,4 +1,4 @@
<?php
-Object::add_extension('SiteTree', 'VersionFeed');
-Object::add_extension('ContentController', 'VersionFeed_Controller');
\ No newline at end of file
+Object::add_extension('Page', 'VersionFeed');
+Object::add_extension('ContentController', 'VersionFeed_Controller'); | BUG Make it play well with subsites.
Due to a hack in subsites/_config.php, the new database field is never
added. This is the easiest way around.
The issue is better described here:
<URL> | silverstripe_silverstripe-versionfeed | train | php |
9fb1de9b99de97860972a6e2f357c1fe726894af | diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -54,7 +54,19 @@ module.exports = function(grunt) {
},
jshint: {
- all: ['jquery.squirrel.js']
+ all: ['jquery.squirrel.js'],
+ options: {
+ curly: true,
+ eqeqeq: true,
+ eqnull: true,
+ notypeof: true,
+ undef: true,
+ browser: true,
+ globals: {
+ jQuery: true,
+ '$': true
+ }
+ }
}
}); | Added strict options to JSHint | jpederson_Squirrel.js | train | js |
423f8dafc632c31f0c3b6ec9f22d152afe3dc5dd | diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php
+++ b/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php
@@ -110,7 +110,7 @@ EOT
$rs = $stmt->execute();
if ($rs) {
- $printer->writeln('OK!');
+ $output->writeln('OK!' . PHP_EOL);
} else {
$error = $stmt->errorInfo(); | [DBAL-<I>] Fix unknown variable problem. | doctrine_dbal | train | php |
1d75e2e7ae64d7985b0c6241e4bc4e0a9284ab9a | diff --git a/spec/addressable/uri_spec.rb b/spec/addressable/uri_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/addressable/uri_spec.rb
+++ b/spec/addressable/uri_spec.rb
@@ -3954,15 +3954,15 @@ describe Addressable::URI, "when given a Windows root directory" do
end
end
-describe Addressable::URI, "when given the path '/home/user/'" do
+describe Addressable::URI, "when given the path '/one/two/'" do
before do
- @path = '/home/user/'
+ @path = '/one/two/'
end
it "should convert to " +
- "\'file:///home/user/\'" do
+ "\'file:///one/two/\'" do
@uri = Addressable::URI.convert_path(@path)
- @uri.to_str.should == "file:///home/user/"
+ @uri.to_str.should == "file:///one/two/"
end
it "should have an origin of 'file://'" do | Switching to use less common path. Causes test lag if /home is an NFS mount. | sporkmonger_addressable | train | rb |
418211a81e880307cdf685bbd9843fc3021e5350 | diff --git a/lib/heroku/helpers/heroku_postgresql.rb b/lib/heroku/helpers/heroku_postgresql.rb
index <HASH>..<HASH> 100644
--- a/lib/heroku/helpers/heroku_postgresql.rb
+++ b/lib/heroku/helpers/heroku_postgresql.rb
@@ -108,7 +108,8 @@ module Heroku::Helpers::HerokuPostgresql
}
@hpg_databases = Hash[ pairs ]
- if find_database_url_real_attachment
+ # TODO: don't bother doing this if DATABASE_URL is already present in hash!
+ if !@hpg_databases.key?('DATABASE_URL') && find_database_url_real_attachment
@hpg_databases['DATABASE_URL'] = find_database_url_real_attachment
end | Don't resolve DATABASE_URL if already resolved
DATABASE_URL is sometimes provided by a real attachment now. | heroku_legacy-cli | train | rb |
cdf2a565644ab07963eb9ef8118be6cca533b902 | diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py
index <HASH>..<HASH> 100644
--- a/tests/integration/__init__.py
+++ b/tests/integration/__init__.py
@@ -704,7 +704,7 @@ class TestDaemon(object):
self._exit_ssh()
# Shutdown the multiprocessing logging queue listener
salt_log_setup.shutdown_multiprocessing_logging()
- salt_log_setup.shutdown_multiprocessing_logging_listener()
+ salt_log_setup.shutdown_multiprocessing_logging_listener(daemonizing=True)
def pre_setup_minions(self):
''' | Fix issue where test suite could hang on shutdown
This is most common in the develop branch but could occur here as well. | saltstack_salt | train | py |
43c5e2481dd08602d6c942910810cd2a619ba3df | diff --git a/src/server/pps/server/s3g_sidecar.go b/src/server/pps/server/s3g_sidecar.go
index <HASH>..<HASH> 100644
--- a/src/server/pps/server/s3g_sidecar.go
+++ b/src/server/pps/server/s3g_sidecar.go
@@ -96,7 +96,7 @@ func (a *apiServer) ServeSidecarS3G() {
a.ServeSidecarS3G()
}
if !ppsutil.ContainsS3Inputs(s.pipelineInfo.Input) && !s.pipelineInfo.S3Out {
- return nil // break early (nothing to serve via S3 gateway)
+ return // break early (nothing to serve via S3 gateway)
}
// begin creating k8s services and s3 gateway instances for each job | Fix bug in s3g_sidecar.go | pachyderm_pachyderm | train | go |
2f147435ef1ef50c6ef69aa9df0247c66426a3af | diff --git a/src/project/ProjectManager.js b/src/project/ProjectManager.js
index <HASH>..<HASH> 100644
--- a/src/project/ProjectManager.js
+++ b/src/project/ProjectManager.js
@@ -1546,10 +1546,13 @@ define(function (require, exports, module) {
// Initialize variables and listeners that depend on the HTML DOM
AppInit.htmlReady(function () {
$projectTreeContainer = $("#project-files-container");
-
+
$("#open-files-container").on("contentChanged", function () {
_redraw(false); // redraw jstree when working set size changes
});
+
+ $(".main-view").click(forceFinishRename);
+ $("#sidebar").on("panelResizeStart", forceFinishRename);
});
// Init PreferenceStorage
@@ -1568,7 +1571,8 @@ define(function (require, exports, module) {
CommandManager.register(Strings.CMD_OPEN_FOLDER, Commands.FILE_OPEN_FOLDER, openProject);
CommandManager.register(Strings.CMD_PROJECT_SETTINGS, Commands.FILE_PROJECT_SETTINGS, _projectSettings);
CommandManager.register(Strings.CMD_FILE_REFRESH, Commands.FILE_REFRESH, refreshFileTree);
-
+ CommandManager.register(Strings.CMD_BEFORE_MENUPOPUP, Commands.APP_BEFORE_MENUPOPUP, forceFinishRename);
+
// Define public API
exports.getProjectRoot = getProjectRoot;
exports.getBaseUrl = getBaseUrl; | Add listeners for mouse click, side bar resize, and menu popup | adobe_brackets | train | js |
048ff520f6504be7c5e4fa676aeead87092fcbbf | diff --git a/src/google/lastresortwebkitfontwatchrunner.js b/src/google/lastresortwebkitfontwatchrunner.js
index <HASH>..<HASH> 100644
--- a/src/google/lastresortwebkitfontwatchrunner.js
+++ b/src/google/lastresortwebkitfontwatchrunner.js
@@ -92,7 +92,7 @@ goog.scope(function () {
(!this.webKitLastResortFontWidths_[widthA] &&
!this.webKitLastResortFontWidths_[widthB])) {
this.finish_(this.activeCallback_);
- } else if (goog.now() - this.started_ >= 5000) {
+ } else if (this.hasTimedOut_()) {
// In order to handle the fact that a font could be the same size as the
// default browser font on a webkit browser, mark the font as active | Change google/lastresortwebkitfontwatchrunner to also use the fontwatchrunner.hasTimedOut method so it also uses the configurable timeout. | typekit_webfontloader | train | js |
cdd45409009c403f45247a1e165730e677c3c91a | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -52,10 +52,9 @@ module.exports = function plugin(options) {
'no namespaces are set in DEBUG environment');
console.log(' metalsmith-debug: ' +
'set DEBUG=metalsmith:* for all namespaces');
- return;
}
- if (options.log) {
+ if (options.log.length) {
debugLog('"%s"', options.log);
} | chain should work even without namespaces | mahnunchik_metalsmith-debug | train | js |
5546ae16e60f02c7188fa20e4aa8ec14c94b0afe | diff --git a/test/renderer/reducers/document_spec.js b/test/renderer/reducers/document_spec.js
index <HASH>..<HASH> 100644
--- a/test/renderer/reducers/document_spec.js
+++ b/test/renderer/reducers/document_spec.js
@@ -130,6 +130,7 @@ describe('toggleStickyCell', () => {
const originalState = {
document: {
notebook: dummyCommutable,
+ stickyCells: new Map(),
}
}; | stickyCells should be passed into toggleStickyCell test | nteract_nteract | train | js |
379d4538c20ad3eca2b9d75b37dca9e4e79e4d9e | diff --git a/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocbookBuilder.java b/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocbookBuilder.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocbookBuilder.java
+++ b/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocbookBuilder.java
@@ -3707,7 +3707,7 @@ public class DocbookBuilder implements ShutdownAbleApp {
if (languageFileFile != null && languageFileFile.getFileData() != null) {
// Determine the file path
final String filePath;
- if (fileEntity.getFilePath() != null) {
+ if (!isNullOrEmpty(fileEntity.getFilePath())) {
if (fileEntity.getFilePath().endsWith("/") || fileEntity.getFilePath().endsWith("\\")) {
filePath = fileEntity.getFilePath();
} else { | Fixed a bug that was causing additional files to be added to the wrong directory. | pressgang-ccms_PressGangCCMSBuilder | train | java |
5e8504b121a8372a8534b1440c23c3fd157eb351 | diff --git a/lib/plugins/load-plugin.js b/lib/plugins/load-plugin.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/load-plugin.js
+++ b/lib/plugins/load-plugin.js
@@ -33,6 +33,7 @@ var framesCallbacks = [];
var MAX_LENGTH = 100;
var MAX_BUF_LEN = 1024 * 200;
var TIMEOUT = 600;
+var SERVER_TIMEOUT = 1000 * 60 * 60;
var REQ_INTERVAL = 30;
var pluginOpts, storage;
var pluginKeyMap = {};
@@ -1065,7 +1066,7 @@ module.exports = function(options, callback) {
startTunnelResWrite(tunnelResWrite, options);
tunnelResWritePort = _port;
}
- server.timeout = 0;
+ server.timeout = SERVER_TIMEOUT;
server.on('request', function(req, res) {
switch(getHookName(req)) {
case PLUGIN_HOOKS.UI: | refactor: set the plugin server.timeout = 1h | avwo_whistle | train | js |
2bc98fccd48f6385d5df5131ed6ff9dbff13fe3c | diff --git a/vendor/refinerycms/pages/app/models/page.rb b/vendor/refinerycms/pages/app/models/page.rb
index <HASH>..<HASH> 100644
--- a/vendor/refinerycms/pages/app/models/page.rb
+++ b/vendor/refinerycms/pages/app/models/page.rb
@@ -218,7 +218,7 @@ class Page < ActiveRecord::Base
if (super_value = super).blank?
# self.parts is already eager loaded so we can now just grab the first element matching the title we specified.
part = self.parts.detect do |part|
- part.title and #protecting against the problem that occurs when have nil title
+ part.title.present? and #protecting against the problem that occurs when have nil title
part.title == part_title.to_s or
part.title.downcase.gsub(" ", "_") == part_title.to_s.downcase.gsub(" ", "_")
end | Guess we should use .present? to check for blank titles too | refinery_refinerycms | train | rb |
122716f09b30716d428394c692c3446904fb6ae4 | diff --git a/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java b/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java
index <HASH>..<HASH> 100644
--- a/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java
+++ b/dap4/d4tests/src/test/java/dap4/test/TestServletConstraints.java
@@ -6,6 +6,7 @@ import dap4.dap4shared.ChunkInputStream;
import dap4.dap4shared.RequestMode;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import java.io.ByteArrayInputStream;
@@ -299,6 +300,7 @@ public class TestServletConstraints extends DapTestCommon
//////////////////////////////////////////////////
// Junit test methods
@Test
+ @Ignore
public void testServletConstraints()
throws Exception
{ | Ignore TestServletContstraints
* This test is failing, but works on another branch that will soon be merged in. So ignore it for now. | Unidata_thredds | train | java |
20dcec3ab9bd1720a001308506b6129296fed51e | diff --git a/lib/ace.ext.custom-text-attributes.js b/lib/ace.ext.custom-text-attributes.js
index <HASH>..<HASH> 100644
--- a/lib/ace.ext.custom-text-attributes.js
+++ b/lib/ace.ext.custom-text-attributes.js
@@ -65,7 +65,7 @@ ace.define('ace/mode/attributedtext', function(require, exports, module) {
return attr.onClick(evt, ed, attr);
} else if (typeof attr.onClick === "string") {
var cmd = ed.session.$attributedtext.keyhandler.commands[attr.onClick];
- cmd.exec(ed);
+ cmd.exec(ed, {attr: attr, evt: evt});
} else { /*...*/ }
}; | pass attributes in attributed mode click handler | rksm_ace.improved | train | js |
76b8abcd8e6f3f35bec25604ea39b98507a28a1b | diff --git a/pkg/madmin/heal-commands.go b/pkg/madmin/heal-commands.go
index <HASH>..<HASH> 100644
--- a/pkg/madmin/heal-commands.go
+++ b/pkg/madmin/heal-commands.go
@@ -182,7 +182,7 @@ func mkHealQueryVal(bucket, prefix, marker, delimiter, maxKeyStr string) url.Val
}
// listObjectsHeal - issues heal list API request for a batch of maxKeys objects to be healed.
-func (adm *AdminClient) listObjectsHeal(bucket, prefix, delimiter, marker string, maxKeys int) (listBucketHealResult, error) {
+func (adm *AdminClient) listObjectsHeal(bucket, prefix, marker, delimiter string, maxKeys int) (listBucketHealResult, error) {
// Construct query params.
maxKeyStr := fmt.Sprintf("%d", maxKeys)
queryVal := mkHealQueryVal(bucket, prefix, marker, delimiter, maxKeyStr) | madmin: Fix args order in listObjectsHeal() (#<I>)
The order of marker and delimiter and in listObjectsHeal() internal function
are switched. That will give wrong result in case of a non recursive objects
heal list. | minio_minio | train | go |
cd79abb4ae3f074b31924a2e72c16c0b352e756c | diff --git a/tests/test_protobuf.py b/tests/test_protobuf.py
index <HASH>..<HASH> 100644
--- a/tests/test_protobuf.py
+++ b/tests/test_protobuf.py
@@ -4,10 +4,16 @@ import os
import pytest
sys.path = [os.path.join(os.path.dirname(__file__), "..")] + sys.path
-from physt.io.protobuf import write, write_many, read, read_many
-from physt.examples import normal_h1, normal_h2
+try:
+ from physt.io.protobuf import write, write_many, read, read_many
+ # PROTOBUF_TEST_ENABLED = os.environ.get("PROTOBUF_TEST_ENABLED", False)
+ PROTOBUF_TEST_ENABLED = True
+except:
+ PROTOBUF_TEST_ENABLED = False
+
+@pytest.mark.skipif(not PROTOBUF_TEST_ENABLED, reason="Skipping protobuf tests because of an error")
class TestProtobuf(object):
# End-to-end test
def test_h1(self): | Tests: don't fail if it is not possible to import protobuf | janpipek_physt | train | py |
37568bdd3f8cc3514eb9d0bf0eae3302686bc13d | diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/parser/lexer.rb
+++ b/lib/puppet/parser/lexer.rb
@@ -483,7 +483,7 @@ class Puppet::Parser::Lexer
yield [final_token.name, token_value]
if @previous_token
- namestack(value) if @previous_token.name == :CLASS
+ namestack(value) if @previous_token.name == :CLASS and value != '{'
if @previous_token.name == :DEFINE
if indefine?
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/parser/lexer_spec.rb
+++ b/spec/unit/parser/lexer_spec.rb
@@ -619,6 +619,12 @@ describe "Puppet::Parser::Lexer in the old tests" do
@lexer.namespace.should == "base::sub"
end
+ it "should not put class instantiation on the namespace" do
+ @lexer.string = "class base { class sub { class { mode"
+ @lexer.fullscan
+ @lexer.namespace.should == "base::sub"
+ end
+
it "should correctly handle fully qualified names" do
@lexer.string = "class base { class sub::more {"
@lexer.fullscan | [#<I>] class { shouldn't get stored on the namespace stack
The new syntax for instantiating parameterized classes was confusing the
lexer's notion of namespaces.
This is a simple fix to prevent that syntax from polluting the
namespaces. | puppetlabs_puppet | train | rb,rb |
4cdf6e32e86969e86e504991a0fed507c24660ad | diff --git a/src/Security/ConnectPassport.php b/src/Security/ConnectPassport.php
index <HASH>..<HASH> 100644
--- a/src/Security/ConnectPassport.php
+++ b/src/Security/ConnectPassport.php
@@ -14,13 +14,12 @@ namespace SymfonyCorp\Connect\Security;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\PassportTrait;
-use Symfony\Component\Security\Http\Authenticator\Passport\UserPassportInterface;
use SymfonyCorp\Connect\Api\Entity\User;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
-class ConnectPassport extends Passport implements UserPassportInterface
+class ConnectPassport extends Passport
{
use PassportTrait; | Don't implement a deprecated interface | symfonycorp_connect | train | php |
f9ace932c016f9aeea3e8e72e3e0033dcad2cae6 | diff --git a/tsdb/engine/tsm1/tombstone.go b/tsdb/engine/tsm1/tombstone.go
index <HASH>..<HASH> 100644
--- a/tsdb/engine/tsm1/tombstone.go
+++ b/tsdb/engine/tsm1/tombstone.go
@@ -217,20 +217,22 @@ func (t *Tombstoner) readTombstoneV2(f *os.File) ([]Tombstone, error) {
if _, err := f.Seek(4, os.SEEK_SET); err != nil {
return nil, err
}
+ n := int64(4)
fi, err := f.Stat()
if err != nil {
return nil, err
}
+ size := fi.Size()
tombstones := []Tombstone{}
var (
- n, min, max int64
- key string
+ min, max int64
+ key string
)
b := make([]byte, 4096)
for {
- if n >= fi.Size() {
+ if n >= size {
return tombstones, nil
}
@@ -243,7 +245,6 @@ func (t *Tombstoner) readTombstoneV2(f *os.File) ([]Tombstone, error) {
if keyLen > len(b) {
b = make([]byte, keyLen)
}
- n += 4
if _, err := f.Read(b[:keyLen]); err != nil {
return nil, err | Fix V2 tombstone reading file position
Each iteration of the loop was incrementing the position by 4 incorrectly.
The position should start at four since the header is 4 bytes. This
caused tombstones at the end of the file to not be read because the counter
was out of sync with the actual file position which cause the loop to exit early.
Probably better to refactor this to check for io.EOF instead of using the counter. | influxdata_influxdb | train | go |
b75c2de15f3457cfd44aa220526d77bd7647e82e | diff --git a/playhouse/tests/test_query_results.py b/playhouse/tests/test_query_results.py
index <HASH>..<HASH> 100644
--- a/playhouse/tests/test_query_results.py
+++ b/playhouse/tests/test_query_results.py
@@ -1103,6 +1103,19 @@ class TestPrefetch(BaseTestPrefetch):
('u4', 'b6'),
])
+ def test_prefetch_group_by(self):
+ users = (User
+ .select(User, fn.Max(fn.Length(Blog.content)).alias('max_content_len'))
+ .join(Blog, JOIN_LEFT_OUTER)
+ .group_by(User)
+ .order_by(User.id))
+ blogs = Blog.select()
+ comments = Comment.select()
+ with self.assertQueryCount(3):
+ result = prefetch(users, blogs, comments)
+ self.assertEqual(len(result), 4)
+
+
def test_prefetch_self_join(self):
self._build_category_tree()
Child = Category.alias() | added test for covering case with complex query in prefetch(which was broken cause of `clean_prefetch_query` side effects) | coleifer_peewee | train | py |
2907510b6ea0399513de6babb1149ccf4733c754 | diff --git a/lib/modules/ipfs/embarkjs.js b/lib/modules/ipfs/embarkjs.js
index <HASH>..<HASH> 100644
--- a/lib/modules/ipfs/embarkjs.js
+++ b/lib/modules/ipfs/embarkjs.js
@@ -37,7 +37,7 @@ __embarkIPFS.saveText = function(text) {
var connectionError = new Error('No IPFS connection. Please ensure to call Embark.Storage.setProvider()');
reject(connectionError);
}
- self.ipfsConnection.add((new self.ipfsConnection.Buffer(text)), function(err, result) {
+ self.ipfsConnection.add(self.ipfsConnection.Buffer.from(text), function(err, result) {
if (err) {
reject(err);
} else {
@@ -58,10 +58,11 @@ __embarkIPFS.get = function(hash) {
var connectionError = new Error('No IPFS connection. Please ensure to call Embark.Storage.setProvider()');
reject(connectionError);
}
- self.ipfsConnection.object.get(hash).then(function(node) {
- resolve(node.data.toString());
- }).catch(function(err) {
- reject(err);
+ self.ipfsConnection.get(hash, function (err, files) {
+ if (err) {
+ return reject(err);
+ }
+ resolve(files[0].content.toString());
});
}); | fix arrows in ipfs get by using ipfsConnection.get | embark-framework_embark | train | js |
6a621ee6503ba19501387539accd9dcec7910bec | diff --git a/Lib/pyhsm/base.py b/Lib/pyhsm/base.py
index <HASH>..<HASH> 100644
--- a/Lib/pyhsm/base.py
+++ b/Lib/pyhsm/base.py
@@ -43,6 +43,7 @@ __all__ = [
import cmd
import stick
import util
+import time
import defines
import exception
@@ -62,7 +63,8 @@ class YHSM():
self.debug = debug
self.stick = stick.YHSM_Stick(device, debug = self.debug, timeout = timeout)
#cmd.reset(self.stick)
- self.reset()
+ if not self.reset():
+ raise exception.YHSM_Error("Initialization of YubiHSM failed")
return None
def __repr__(self):
@@ -75,9 +77,14 @@ class YHSM():
def reset(self):
""" Perform stream resynchronization. Return True if successful. """
cmd.reset(self.stick)
+ # Short sleep necessary with firmware 0.9.2. Will be removed.
+ time.sleep(0.005)
# Now verify we are in sync
data = 'ekoeko'
- return self.echo(data) == data
+ echo = self.echo(data)
+ # XXX analyze 'echo' to see if we are in config mode, and produce a
+ # nice exception if we are.
+ return data == echo
#
# Basic commands | Work around small delay on YSM_NULL in firmware <I>. | Yubico_python-pyhsm | train | py |
f92cccb1e8e054251ed90a9a4d5f4db81951b923 | diff --git a/modules/assignStyle.js b/modules/assignStyle.js
index <HASH>..<HASH> 100644
--- a/modules/assignStyle.js
+++ b/modules/assignStyle.js
@@ -14,7 +14,7 @@ export default function assignStyle(
const value = style[property]
const baseValue = base[property]
- if (baseValue) {
+ if (baseValue && value) {
if (Array.isArray(baseValue)) {
base[property] = filterUniqueArray(baseValue.concat(value))
continue | check weather both values exist before merging | rofrischmann_css-in-js-utils | train | js |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.