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 |
|---|---|---|---|---|---|
e9e805f36f767ace53791e88830042fcf69b7513 | diff --git a/src/Illuminate/Support/Facades/Blade.php b/src/Illuminate/Support/Facades/Blade.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Facades/Blade.php
+++ b/src/Illuminate/Support/Facades/Blade.php
@@ -17,7 +17,7 @@ namespace Illuminate\Support\Facades;
* @method static void compile(string|null $path = null)
* @method static void component(string $class, string|null $alias = null, string $prefix = '')
* @method static void components(array $components, string $prefix = '')
- * @method static void anonymousComponentNamespace(string $directory, string $prefix)
+ * @method static void anonymousComponentNamespace(string $directory, string $prefix = null)
* @method static void componentNamespace(string $prefix, string $directory = null)
* @method static void directive(string $name, callable $handler)
* @method static void extend(callable $compiler) | Update Blade.php (#<I>) | laravel_framework | train | php |
f93aef5e86c83cac8bc990d8adf9d84136744a52 | diff --git a/lib/json_schemer/schema/base.rb b/lib/json_schemer/schema/base.rb
index <HASH>..<HASH> 100644
--- a/lib/json_schemer/schema/base.rb
+++ b/lib/json_schemer/schema/base.rb
@@ -93,6 +93,8 @@ module JSONSchemer
validate_custom_format(instance, formats.fetch(format), &block)
end
+ data = instance.data
+
if keywords
keywords.each do |keyword, callable|
if schema.key?(keyword)
@@ -106,8 +108,6 @@ module JSONSchemer
end
end
- data = instance.data
-
yield error(instance, 'enum') if enum && !enum.include?(data)
yield error(instance, 'const') if schema.key?('const') && schema['const'] != data | Fix keywords option
`data` was referenced before it was assigned. Need some tests... | davishmcclurg_json_schemer | train | rb |
7c1a19ec9b8491a3ad45bb01b9c9ae9fb225b1ea | diff --git a/Kwc/Shop/Products/Detail/AddToCartGenerator.php b/Kwc/Shop/Products/Detail/AddToCartGenerator.php
index <HASH>..<HASH> 100644
--- a/Kwc/Shop/Products/Detail/AddToCartGenerator.php
+++ b/Kwc/Shop/Products/Detail/AddToCartGenerator.php
@@ -6,12 +6,11 @@ class Kwc_Shop_Products_Detail_AddToCartGenerator extends Kwf_Component_Generato
if ($key != $this->getGeneratorKey()) {
throw new Kwf_Exception("invalid key '$key'");
}
- $generators = Kwc_Abstract::getSetting($this->getClass(), 'generators');
- if (count($generators['addToCart']['component']) <= 1) {
- return $generators['addToCart']['component']['product'];
+ if (count($this->_settings['component']) <= 1) {
+ return $this->_settings['component']['product'];
}
if ($parentData) {
- foreach ($generators['addToCart']['component'] as $component => $class) {
+ foreach ($this->_settings['component'] as $component => $class) {
if ($component == $parentData->row->component) {
return $class;
} | access own child components, don't get them from class settings with fixed generator key | koala-framework_koala-framework | train | php |
7374891d0a9b455ff7d20e84efd0e6b1e3705c11 | diff --git a/examples/merge_config.py b/examples/merge_config.py
index <HASH>..<HASH> 100644
--- a/examples/merge_config.py
+++ b/examples/merge_config.py
@@ -37,7 +37,7 @@
# # Ops... assigned twice
# # CONFIG_FOO is not set
#
-# Ops... this symbol doesn't exist
+# # Ops... this symbol doesn't exist
# CONFIG_OPS=y
#
# CONFIG_BAZ="baz string"
@@ -85,12 +85,9 @@ kconf.write_config(sys.argv[2])
# Print warnings for symbols whose actual value doesn't match the assigned
# value
-def name_and_loc_str(sym):
- """
- Helper for printing the symbol name along with the location(s) in the
- Kconfig files where the symbol is defined
- """
- # If the symbol has no menu nodes, it is undefined
+def name_and_loc(sym):
+ # Helper for printing symbol names and Kconfig file location(s) in warnings
+
if not sym.nodes:
return sym.name + " (undefined)"
@@ -112,4 +109,4 @@ for sym in kconf.defined_syms:
if user_value != sym.str_value:
print('warning: {} was assigned the value "{}" but got the '
'value "{}" -- check dependencies'
- .format(name_and_loc_str(sym), user_value, sym.str_value))
+ .format(name_and_loc(sym), user_value, sym.str_value)) | merge_config.py: Clean up name_and_loc_str()
- Rename to name_and_loc(), to be consistent with the kconfiglib.py
version
- Use a comment instead of a docstring. Shorten the description a bit
too.
- Piggyback a missing # in conf3 in the module docstring. Typo. | ulfalizer_Kconfiglib | train | py |
23f725dd3c2ab030b248b10539b7a2b50c1ea363 | diff --git a/src/org/parosproxy/paros/model/SiteMap.java b/src/org/parosproxy/paros/model/SiteMap.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/model/SiteMap.java
+++ b/src/org/parosproxy/paros/model/SiteMap.java
@@ -33,6 +33,7 @@
// ZAP: 2014/01/06 Issue 965: Support 'single page' apps and 'non standard' parameter separators
// ZAP: 2014/01/16 Issue 979: Sites and Alerts trees can get corrupted
// ZAP: 2014/03/23 Issue 997: Session.open complains about improper use of addPath
+// ZAP: 2014/04/10 Initialise the root SiteNode with a reference to SiteMap
package org.parosproxy.paros.model;
@@ -73,9 +74,11 @@ public class SiteMap extends DefaultTreeModel {
private static Logger log = Logger.getLogger(SiteMap.class);
public static SiteMap createTree(Model model) {
- SiteNode root = new SiteNode(null, -1, Constant.messages.getString("tab.sites"));
+ SiteMap siteMap = new SiteMap(null, model);
+ SiteNode root = new SiteNode(siteMap, -1, Constant.messages.getString("tab.sites"));
+ siteMap.setRoot(root);
hrefMap = new HashMap<>();
- return new SiteMap(root, model);
+ return siteMap;
}
public SiteMap(SiteNode root, Model model) { | Changed SiteMap to initialise the root node with a reference to SiteMap itself so the root node can notify SiteMap of changes (through SiteNode#nodeChangedEventHandler()). | zaproxy_zaproxy | train | java |
8460500b6356b0aea15dc8bab2252f26b8904c10 | diff --git a/lib/app.js b/lib/app.js
index <HASH>..<HASH> 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -45,7 +45,13 @@ function App(config) {
}
});
- // this.meteorApp.stdout.pipe(process.stdout);
+ this.meteorApp.stdout.on('data', function(data) {
+ data = data.toString();
+ if(data.match(/error/i)) {
+ console.log(data);
+ }
+ });
+
this.meteorApp.stderr.on('data', function(data) {
console.log(data.toString());
}); | print stdout with error information to the console | arunoda_laika | train | js |
dacda031fb228bf6fb1b7aa8de33afa4e1704562 | diff --git a/src/python/test/test_dxclient.py b/src/python/test/test_dxclient.py
index <HASH>..<HASH> 100755
--- a/src/python/test/test_dxclient.py
+++ b/src/python/test/test_dxclient.py
@@ -1794,7 +1794,7 @@ dxpy.run()
# download tar.gz file
gen_file_tar("test-file", "test.tar.gz", proj_id)
buf = run("dx cat test.tar.gz | tar zvxf -")
- self.assertEqual(buf.strip(), 'test-file')
+ self.assertTrue(os.path.exists('test-file'))
def test_dx_download_resume_and_checksum(self):
def assert_md5_checksum(filename, hasher): | DEVEX-<I> Change assert to fix the OSX test | dnanexus_dx-toolkit | train | py |
9b55de65d9efe4794204720b78a4b57e4d32fbc7 | diff --git a/Request/ParamFetcher.php b/Request/ParamFetcher.php
index <HASH>..<HASH> 100644
--- a/Request/ParamFetcher.php
+++ b/Request/ParamFetcher.php
@@ -161,7 +161,7 @@ class ParamFetcher implements ParamFetcherInterface
if ('' !== $config->requirements
&& ($param !== $default || null === $default)
- && !preg_match('#^'.$config->requirements.'$#xs', $param)
+ && !preg_match('#^'.$config->requirements.'$#xsu', $param)
) {
if ($strict) {
$paramType = $config instanceof QueryParam ? 'Query' : 'Request'; | Update ParamFetcher to handle UTF8 requirements
Added the 'u' modifier to the regex in cleanParamWithRequirements() so that parameters with UTF8 content will work with the regex.
Fixes #<I> | FriendsOfSymfony_FOSRestBundle | train | php |
07e6f6a78485bb52fd9879dbcf0bedfbe5d8dfdc | diff --git a/src/shared/js/ch.Expandable.js b/src/shared/js/ch.Expandable.js
index <HASH>..<HASH> 100644
--- a/src/shared/js/ch.Expandable.js
+++ b/src/shared/js/ch.Expandable.js
@@ -10,7 +10,7 @@
options = {
'content': options
};
- }2
+ }
return options;
}; | # <I> Expandable: Delete number '2' from line <I>. | mercadolibre_chico | train | js |
d239bc9ed1eb7014c174f5fbed754f0f02d6e1b9 | diff --git a/gff3/gff3.py b/gff3/gff3.py
index <HASH>..<HASH> 100644
--- a/gff3/gff3.py
+++ b/gff3/gff3.py
@@ -47,7 +47,7 @@ CODON_TABLE = dict(zip(CODONS, AMINO_ACIDS))
def translate(seq):
seq = seq.lower().replace('\n', '').replace(' ', '')
peptide = ''
- for i in xrange(0, len(seq), 3):
+ for i in range(0, len(seq), 3):
codon = seq[i: i+3]
amino_acid = CODON_TABLE.get(codon, '!')
if amino_acid != '!': # end of seq | remove xrange to make it compatible to Python 3 | hotdogee_gff3-py | train | py |
56676f70bde856d9e900a07f6b77870be5ed4e81 | diff --git a/src/screenfull.js b/src/screenfull.js
index <HASH>..<HASH> 100644
--- a/src/screenfull.js
+++ b/src/screenfull.js
@@ -6,8 +6,7 @@
var fn = (function () {
var val;
- var valLength;
-
+
var fnMap = [
[
'requestFullscreen',
@@ -62,7 +61,7 @@
for (; i < l; i++) {
val = fnMap[i];
if (val && val[1] in document) {
- for (i = 0, valLength = val.length; i < valLength; i++) {
+ for (i = 0; i < val.length; i++) {
ret[fnMap[0][i]] = val[i];
}
return ret; | Minor code tweak (#<I>) | sindresorhus_screenfull.js | train | js |
de7cbb2821922ee83819c9c7f7e541916c9486d2 | diff --git a/lib/ruby-lint/definitions/core/kernel.rb b/lib/ruby-lint/definitions/core/kernel.rb
index <HASH>..<HASH> 100644
--- a/lib/ruby-lint/definitions/core/kernel.rb
+++ b/lib/ruby-lint/definitions/core/kernel.rb
@@ -492,4 +492,13 @@ RubyLint.global_scope.define_constant('Kernel') do |klass|
klass.define_instance_method('untrust')
klass.define_instance_method('untrusted?')
-end
\ No newline at end of file
+end
+
+# Methods defined in Kernel (both class and instance methods) are globally
+# available regardless of whether the code is evaluated in a class or instance
+# context.
+RubyLint.global_scope.copy(
+ RubyLint.global_constant('Kernel'),
+ :method,
+ :instance_method
+) | Properly include Kernel into the global scope.
This code was removed by accident when the definitions for Kernel were
re-generated. | YorickPeterse_ruby-lint | train | rb |
5c4a4f54c2cb1e5aa9539612b3eb9452ad40242d | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -73,6 +73,7 @@ setup(
"ukpostcodeparser>=1.1.1",
"mock",
"pytest>=3.8.0,<3.9",
+ "more-itertools<6.0.0",
],
extras_require={
':python_version=="2.7"': [ | Pin more-itertools to a version compatible with py<I> (#<I>) | joke2k_faker | train | py |
3a0321ae24de1c111440c515dbb64c945e3c4cdb | diff --git a/azurerm/helpers/validate/api_management.go b/azurerm/helpers/validate/api_management.go
index <HASH>..<HASH> 100644
--- a/azurerm/helpers/validate/api_management.go
+++ b/azurerm/helpers/validate/api_management.go
@@ -71,7 +71,7 @@ func ApiManagementApiName(v interface{}, k string) (ws []string, es []error) {
func ApiManagementApiPath(v interface{}, k string) (ws []string, es []error) {
value := v.(string)
- if matched := regexp.MustCompile(`^(?:|[\w][\w-/.]{0,398}[\w-])$`).Match([]byte(value)); !matched {
+ if matched := regexp.MustCompile(`^(?:|[\w.][\w-/.]{0,398}[\w-])$`).Match([]byte(value)); !matched {
es = append(es, fmt.Errorf("%q may only be up to 400 characters in length, not start or end with `/` and only contain valid url characters", k))
}
return ws, es | Update path validation for api management api
Adding support for paths that start with the character '.'
This is important for path implementations such as ".well-known" in universal links | terraform-providers_terraform-provider-azurerm | train | go |
b4484d21c74c504d62601764279c7eff9ee33ca0 | diff --git a/src/FOM/UserBundle/Form/Type/ACLType.php b/src/FOM/UserBundle/Form/Type/ACLType.php
index <HASH>..<HASH> 100644
--- a/src/FOM/UserBundle/Form/Type/ACLType.php
+++ b/src/FOM/UserBundle/Form/Type/ACLType.php
@@ -133,13 +133,13 @@ class ACLType extends AbstractType
$permissions = is_string($options['permissions']) ? $this->getStandardPermissions($options['permissions']) : $options['permissions'];
$aceOptions = array(
- 'type' => 'FOM\UserBundle\Form\Type\ACEType',
+ 'entry_type' => 'FOM\UserBundle\Form\Type\ACEType',
'label' => 'Permissions',
'allow_add' => true,
'allow_delete' => true,
'auto_initialize' => false,
'prototype' => true,
- 'options' => array(
+ 'entry_options' => array(
'available_permissions' => $permissions,
),
'mapped' => false, | Resolve deprecated CollectionType option usage | mapbender_fom | train | php |
49b3c46b5bcf89c7552af85c733526fc1ca60879 | diff --git a/test/integration/rails/dummy/config/application.rb b/test/integration/rails/dummy/config/application.rb
index <HASH>..<HASH> 100644
--- a/test/integration/rails/dummy/config/application.rb
+++ b/test/integration/rails/dummy/config/application.rb
@@ -1,12 +1,12 @@
require File.expand_path('../boot', __FILE__)
-require "active_model/railtie"
-require "active_record/railtie"
-require "action_controller/railtie"
-require "action_view/railtie"
-require "action_mailer/railtie"
+require 'active_model/railtie'
+require 'active_record/railtie'
+require 'action_controller/railtie'
+require 'action_view/railtie'
+require 'action_mailer/railtie'
-require "slim/rails"
+require 'slim'
module Dummy
class Application < Rails::Application | use slim instead of slim/rails | slim-template_slim | train | rb |
964972035ce0df8484aac54774da6f9e4b846504 | diff --git a/src/Chrisguitarguy/Annotation/Tokens.php b/src/Chrisguitarguy/Annotation/Tokens.php
index <HASH>..<HASH> 100644
--- a/src/Chrisguitarguy/Annotation/Tokens.php
+++ b/src/Chrisguitarguy/Annotation/Tokens.php
@@ -43,8 +43,10 @@ final class Tokens
const T_WHITESPACE = 'T_WHITESPACE';
const T_EOF = 'T_EOF';
+ // @codeCoverageIgnoreStart
private function __construct()
{
// noop
}
+ // @codeCoverageIgnoreEnd
} | ignore Tokens::__construct on code coverage reports | chrisguitarguy_Annotation | train | php |
11c3aef6ae0a3149feb532965fe3cf4a4dc874eb | diff --git a/packages/veritone-react-common/src/helpers/withMuiThemeProvider.js b/packages/veritone-react-common/src/helpers/withMuiThemeProvider.js
index <HASH>..<HASH> 100644
--- a/packages/veritone-react-common/src/helpers/withMuiThemeProvider.js
+++ b/packages/veritone-react-common/src/helpers/withMuiThemeProvider.js
@@ -1,5 +1,6 @@
import React from 'react';
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
+import blue from 'material-ui/colors/blue';
export default function withMuiThemeProvider(Component) {
return class WrappedComponent extends React.Component {
@@ -7,7 +8,17 @@ export default function withMuiThemeProvider(Component) {
render() {
return (
- <MuiThemeProvider theme={createMuiTheme()}>
+ <MuiThemeProvider theme={createMuiTheme({
+ palette: {
+ primary: blue
+ },
+ typography: {
+ button: {
+ fontWeight: 400
+ }
+ }
+
+ })}>
<Component {...this.props} />
</MuiThemeProvider>
); | fix theme colors, bring in button override from vda | veritone_veritone-sdk | train | js |
29f4759cb9a03f1fc2c224106fa2be6de5588f77 | diff --git a/build/fn.js b/build/fn.js
index <HASH>..<HASH> 100644
--- a/build/fn.js
+++ b/build/fn.js
@@ -60,7 +60,7 @@ fn.concat = function () {
var args = fn.toArray(arguments);
var first = args[ 0 ];
- if (!fn.is(first, 'array') && !fn.is(first, 'string')) {
+ if (!fn.is('array', first) && !fn.is('string', first)) {
first = args.length > 0 ? [ first ] : [ ];
}
return first.concat.apply(first, args.slice(1));
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -51,7 +51,7 @@ fn.concat = function () {
var args = fn.toArray(arguments);
var first = args[ 0 ];
- if (!fn.is(first, 'array') && !fn.is(first, 'string')) {
+ if (!fn.is('array', first) && !fn.is('string', first)) {
first = args.length > 0 ? [ first ] : [ ];
}
return first.concat.apply(first, args.slice(1)); | The order of arguments has changed for 'is' | CrowdHailer_fn.js | train | js,js |
1d7497bd9be760548128583b99af8f1ef97301cf | diff --git a/tests/CollectionExtendedTest.php b/tests/CollectionExtendedTest.php
index <HASH>..<HASH> 100644
--- a/tests/CollectionExtendedTest.php
+++ b/tests/CollectionExtendedTest.php
@@ -607,8 +607,11 @@ class CollectionExtendedTest extends
$exampleDocument = Document::createFromArray(array('someNewAttribute' => 'someNewValue'));
- $resultingDocument = $collectionHandler->byExample($collection->getId(), $exampleDocument);
-
+ $cursor = $collectionHandler->byExample($collection->getId(), $exampleDocument);
+ $this->assertTrue(
+ $cursor->getCount() == 1,
+ 'should return 1.'
+ );
$exampleDocument = Document::createFromArray(array('someOtherAttribute' => 'someOtherValue'));
$result = $collectionHandler->removeByExample(
@@ -776,6 +779,11 @@ class CollectionExtendedTest extends
}
$this->assertTrue(
+ $cursor->getCount() == 2,
+ 'should return 2.'
+ );
+
+ $this->assertTrue(
($resultingDocument[0]->getKey() == 'test1' && $resultingDocument[0]->firstName == 'Joe'),
'Document returned did not contain expected data.'
); | Extended test with getCount() for byExample() | arangodb_arangodb-php | train | php |
1941cfca63e0874c8bd71a24f27a80a66532a9f1 | diff --git a/config.js b/config.js
index <HASH>..<HASH> 100644
--- a/config.js
+++ b/config.js
@@ -14,7 +14,10 @@ config.items =
, invalidRequestMessage:
{ def: "Invalid request. Make sure you are respecting the sprite maker api (https://github.com/vigour-io/vigour-img/blob/master/README.md#user-content-api) and that the requested data exists." }
, port:
- { def: 8000 }
+ { def: 8000
+ , cli: "-p, --port <nb>"
+ , desc: "Port on which the server should listen"
+ }
, maxWidth:
{ def: 10000 }
, maxHeight: | Add command-line option to change port | vigour-io_shutter | train | js |
37f7b8c2f1fe42ccc798792fee27c26452abdb08 | diff --git a/src/bin/nca-release.js b/src/bin/nca-release.js
index <HASH>..<HASH> 100644
--- a/src/bin/nca-release.js
+++ b/src/bin/nca-release.js
@@ -28,7 +28,8 @@ export default function run() {
console.log(chalk.green(`The tag "${version}" was successfully released.`))
}
else {
- console.log(chalk.red(SHOW_HOW_TO_RELEASE_IN_CIRCLE_CI))
+ const { CIRCLE_PROJECT_USERNAME, CIRCLE_PROJECT_REPONAME } = process.env
+ console.log(chalk.red(SHOW_HOW_TO_RELEASE_IN_CIRCLE_CI(CIRCLE_PROJECT_USERNAME, CIRCLE_PROJECT_REPONAME)))
process.exit(0)
}
@@ -38,7 +39,7 @@ export default function run() {
executor.publishNpm(NPM_EMAIL, NPM_AUTH)
}
else {
- const {CIRCLE_PROJECT_USERNAME, CIRCLE_PROJECT_REPONAME } = process.env
+ const { CIRCLE_PROJECT_USERNAME, CIRCLE_PROJECT_REPONAME } = process.env
console.log(SHOW_HOW_TO_NPM_PUBLISH(CIRCLE_PROJECT_USERNAME, CIRCLE_PROJECT_REPONAME))
}
} | show how to release in circleci when release fails | CureApp_node-circleci-autorelease | train | js |
172571639cd27f41ba8e4358157e01821b76f98f | diff --git a/phpsec/phpsec.crypt.php b/phpsec/phpsec.crypt.php
index <HASH>..<HASH> 100644
--- a/phpsec/phpsec.crypt.php
+++ b/phpsec/phpsec.crypt.php
@@ -140,12 +140,12 @@ class phpsecCrypt {
*/
public static function pbkdf2($p, $s, $c, $dkLen, $a = 'sha256') {
$hLen = strlen(hash($a, null, true)); /* Hash length. */
- $l = ceil($dkLen / $hLen); /* Length in blocks of derived key. */
- $dk = ''; /* Derived key. */
+ $l = ceil($dkLen / $hLen); /* Length in blocks of derived key. */
+ $dk = ''; /* Derived key. */
/* Step 1. Check dkLen. */
- if($dkLen > (2^32-1)*$hLen) {
- phpsec::error('derived key too long');
+ if($dkLen > (2^32-1) * $hLen) {
+ phpsec::error('Derived key too long');
return false;
} | Fixed typo in error message in phpsecCrypt::pbkdf2(), and also made
some coding style improvements. | phpsec_phpSec | train | php |
a9dca920cdb423015d5824abb931b05a14632859 | diff --git a/simulator/src/main/java/com/hazelcast/simulator/protocol/registry/ComponentRegistry.java b/simulator/src/main/java/com/hazelcast/simulator/protocol/registry/ComponentRegistry.java
index <HASH>..<HASH> 100644
--- a/simulator/src/main/java/com/hazelcast/simulator/protocol/registry/ComponentRegistry.java
+++ b/simulator/src/main/java/com/hazelcast/simulator/protocol/registry/ComponentRegistry.java
@@ -251,6 +251,12 @@ public class ComponentRegistry {
+ " [" + worker.getSettings().getVersionSpec() + "]");
}
}
+
+ List<TestData> tests = new ArrayList<TestData>(this.tests.values());
+ LOGGER.info(format(" Tests %s", tests.size()));
+ for (TestData testData : tests) {
+ LOGGER.info(" " + testData.getAddress() + " " + testData.getTestCase().getId());
+ }
}
public WorkerData getFirstWorker() { | Added tests to cluster layout: fix #<I> | hazelcast_hazelcast-simulator | train | java |
96013181941c53ff805686d1f898e1ebb643c5e5 | diff --git a/src/Datachore.php b/src/Datachore.php
index <HASH>..<HASH> 100644
--- a/src/Datachore.php
+++ b/src/Datachore.php
@@ -504,10 +504,10 @@ class Datachore
break;
}
}
+
+ $this->_where($property, $chain, $operator, $value);
+ return $this;
}
-
- $this->_where($property, $chain, $operator, $value);
- return $this;
}
throw new \Exception("No such method: {$func}"); | FIX: move call to _where in _call to avoid an undefined property variable error. | pwhelan_datachore | train | php |
0354c7e13e0b6976879fcfbd3fb9f83f6c13a272 | diff --git a/tests/spec/fs.stat.spec.js b/tests/spec/fs.stat.spec.js
index <HASH>..<HASH> 100644
--- a/tests/spec/fs.stat.spec.js
+++ b/tests/spec/fs.stat.spec.js
@@ -91,4 +91,33 @@ describe('fs.stat', function() {
});
});
});
+
+ it('(promise) should be a function', function() {
+ var fs = util.fs();
+ expect(fs.promises.stat).to.be.a('function');
+ });
+
+ it('should return a promise', function() {
+ var fs = util.fs();
+ expect(fs.promises.stat()).to.be.a('Promise');
+ });
+
+ it('(promise) should return a stat object if file exists', function() {
+ var fs = util.fs();
+
+ return fs.promises
+ .stat('/')
+ .then(result => {
+ expect(result).to.exist;
+
+ expect(result.node).to.be.a('string');
+ expect(result.dev).to.equal(fs.name);
+ expect(result.size).to.be.a('number');
+ expect(result.nlinks).to.be.a('number');
+ expect(result.atime).to.be.a('number');
+ expect(result.mtime).to.be.a('number');
+ expect(result.ctime).to.be.a('number');
+ expect(result.type).to.equal('DIRECTORY');
+ });
+ });
}); | Fix #<I>: added proimse support for fs.stat (#<I>)
* added promise support to fs.stat
* restored package lock
* fixed lint issues
* made tests more promise freindly
* removed .catch statement from promise and fixed style issues
* removed .catch statement from promise and fixed style issues | filerjs_filer | train | js |
273deeec186a556e74730704ff9ed269f0b87da3 | diff --git a/lib/chef_zero/cookbook_data.rb b/lib/chef_zero/cookbook_data.rb
index <HASH>..<HASH> 100644
--- a/lib/chef_zero/cookbook_data.rb
+++ b/lib/chef_zero/cookbook_data.rb
@@ -36,7 +36,7 @@ module ChefZero
file = filename(directory, 'metadata.rb') || "(#{name}/metadata.rb)"
metadata.instance_eval(read_file(directory, 'metadata.rb'), file)
rescue
- ChefZero::Log.error("Error loading cookbook #{name}: #{$!}\n#{$!.backtrace}")
+ ChefZero::Log.error("Error loading cookbook #{name}: #{$!}\n #{$!.backtrace.join("\n ")}")
end
elsif has_child(directory, 'metadata.json')
metadata.from_json(read_file(directory, 'metadata.json'))
@@ -68,8 +68,8 @@ module ChefZero
def initialize(cookbook)
self.name(cookbook.name)
self.recipes(cookbook.fully_qualified_recipe_names)
- %w(dependencies supports recommendations suggestions conflicting providing replacing recipes).each do |cookbook_arg|
- self[cookbook_arg.to_sym] = Hashie::Mash.new
+ %w(attributes grouping dependencies supports recommendations suggestions conflicting providing replacing recipes).each do |hash_arg|
+ self[hash_arg.to_sym] = Hashie::Mash.new
end
end | Support attribute() and grouping() in cookbook metadata | chef_chef-zero | train | rb |
b3eb17162e451b602575ec8e5927d9adbd72f0d8 | diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js
index <HASH>..<HASH> 100644
--- a/src/layer/tile/TileLayer.js
+++ b/src/layer/tile/TileLayer.js
@@ -12,8 +12,8 @@
Z.TileLayer = Z.Layer.extend(/** @lends maptalks.TileLayer.prototype */{
options: {
- 'errorTileUrl' : 'images/system/transparent.png',
- 'urlTemplate' : 'images/system/transparent.png',
+ 'errorTileUrl' : '#',
+ 'urlTemplate' : '#',
'subdomains' : null,
'gradualLoading' : true,
@@ -22,7 +22,7 @@ Z.TileLayer = Z.Layer.extend(/** @lends maptalks.TileLayer.prototype */{
'renderWhenPanning' : false,
//移图时地图的更新间隔, 默认为0即实时更新, -1表示不更新.如果效率较慢则可改为适当的值
- 'renderSpanWhenPanning' : 0,
+ 'renderSpanWhenPanning' : (function(){return Z.Browser.mobile?-1:0;})(),
'crossOrigin' : null, | change TileLayer's renderSpanWhenPanning to -1 on mobile devices. | maptalks_maptalks.js | train | js |
16b6ac9b059023d2e83b42f2ae8355690549dc45 | diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/aws/models/storage/file.rb
+++ b/lib/fog/aws/models/storage/file.rb
@@ -1,6 +1,5 @@
require 'fog/core/model'
require 'fog/aws/models/storage/versions'
-require 'digest/md5'
module Fog
module Storage | Whoops, don't need to require digest/md5 | fog_fog | train | rb |
36b95b116ac7520ced018f3e2e1ce430a8c94b84 | diff --git a/spec/httparty/request_spec.rb b/spec/httparty/request_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/httparty/request_spec.rb
+++ b/spec/httparty/request_spec.rb
@@ -86,7 +86,7 @@ describe HTTParty::Request do
end
it "should use digest auth when configured" do
- FakeWeb.register_uri(:head, "http://api.foo.com/v1",
+ FakeWeb.register_uri(:get, "http://api.foo.com/v1",
:www_authenticate => 'Digest realm="Log Viewer", qop="auth", nonce="2CA0EC6B0E126C4800E56BA0C0003D3C", opaque="5ccc069c403ebaf9f0171e9517f40e41", stale=false')
@request.options[:digest_auth] = {:username => 'foobar', :password => 'secret'} | Update test to use correct method instead of always using HEAD | jnunemaker_httparty | train | rb |
184e5e1104ccc3edf2870f562cdefd1148393743 | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,7 +20,7 @@ function Rela(opts){
opts = {};
this.clients = opts.dummies || [];
- this.server = opts.server || new Server(handler.bind(this));
+ this.server = opts.server || new Server(handler);
}
// Add EventEmitter functionality to all Rela instances. | Change back to no bind, changed to arrow function. | scrapjs_rela | train | js |
1e15e55689085d506cdd1d0cc86d34dc8d156080 | diff --git a/linkcheck/checker/urlbase.py b/linkcheck/checker/urlbase.py
index <HASH>..<HASH> 100644
--- a/linkcheck/checker/urlbase.py
+++ b/linkcheck/checker/urlbase.py
@@ -920,7 +920,7 @@ class UrlBase (object):
try:
app = winutil.get_word_app()
try:
- doc = winutil.open_word(app, filename)
+ doc = winutil.open_wordfile(app, filename)
try:
for link in doc.Hyperlinks:
url_data = get_url_from(link.Address,
diff --git a/linkcheck/winutil.py b/linkcheck/winutil.py
index <HASH>..<HASH> 100644
--- a/linkcheck/winutil.py
+++ b/linkcheck/winutil.py
@@ -65,6 +65,9 @@ def get_word_app ():
"""Return open Word.Application handle, or None on error."""
if not has_word():
return None
+ # Since this function is called from different threads, initialize
+ # the COM layer.
+ pythoncom.CoInitialize()
import win32com.client
app = win32com.client.gencache.EnsureDispatch("Word.Application")
app.Visible = False | Fix errors in Word file parsing. | wummel_linkchecker | train | py,py |
1738d50c17763eca2655ac5cda087a89c04b9fc4 | diff --git a/mmcv/cnn/builder.py b/mmcv/cnn/builder.py
index <HASH>..<HASH> 100644
--- a/mmcv/cnn/builder.py
+++ b/mmcv/cnn/builder.py
@@ -1,5 +1,4 @@
-import torch.nn as nn
-
+from ..runner import Sequential
from ..utils import Registry, build_from_cfg
@@ -22,7 +21,7 @@ def build_model_from_cfg(cfg, registry, default_args=None):
modules = [
build_from_cfg(cfg_, registry, default_args) for cfg_ in cfg
]
- return nn.Sequential(*modules)
+ return Sequential(*modules)
else:
return build_from_cfg(cfg, registry, default_args) | Use Sequential rather than nn.Sequential in build_model_from_cfg. (#<I>) | open-mmlab_mmcv | train | py |
d978c83cd1848fe8e19c04f9f4c7af96ce4842ed | diff --git a/plan/column_pruning.go b/plan/column_pruning.go
index <HASH>..<HASH> 100644
--- a/plan/column_pruning.go
+++ b/plan/column_pruning.go
@@ -165,10 +165,6 @@ func (ds *DataSource) PruneColumns(parentUsedCols []*expression.Column) {
}
// PruneColumns implements LogicalPlan interface.
-func (p *LogicalTableDual) PruneColumns(_ []*expression.Column) {
-}
-
-// PruneColumns implements LogicalPlan interface.
func (p *LogicalExists) PruneColumns(parentUsedCols []*expression.Column) {
p.children[0].PruneColumns(nil)
} | plan: remove unneeded lines of code (#<I>) | pingcap_tidb | train | go |
f4360dbc4055ad17397d8344f4050871beec8896 | diff --git a/src/Container/AbstractProjectionManagerFactory.php b/src/Container/AbstractProjectionManagerFactory.php
index <HASH>..<HASH> 100644
--- a/src/Container/AbstractProjectionManagerFactory.php
+++ b/src/Container/AbstractProjectionManagerFactory.php
@@ -87,7 +87,7 @@ abstract class AbstractProjectionManagerFactory implements
public function mandatoryOptions(): iterable
{
- return ['event_store', 'connection'];
+ return ['connection'];
}
public function defaultOptions(): iterable | event_store is not mandatory (because of defaults) | prooph_pdo-event-store | train | php |
15e34d1f07d0c687d040af22dbc66f3978715217 | diff --git a/src/effects.js b/src/effects.js
index <HASH>..<HASH> 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -363,9 +363,17 @@ jQuery.fx.prototype = {
t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = jQuery.support.requestAnimationFrame ?
- !window[jQuery.support.requestAnimationFrame](fx.tick):
- setInterval(fx.tick, fx.interval);
+ if ( jQuery.support.requestAnimationFrame ) {
+ timerId = true;
+ (function raf() {
+ if (timerId) {
+ window[jQuery.support.requestAnimationFrame](raf);
+ }
+ fx.tick();
+ })();
+ } else {
+ timerId = setInterval(fx.tick, fx.interval);
+ }
}
},
@@ -470,8 +478,6 @@ jQuery.extend( jQuery.fx, {
if ( !timers.length ) {
jQuery.fx.stop();
- } else if ( jQuery.support.requestAnimationFrame && timerId) {
- window[jQuery.support.requestAnimationFrame](jQuery.fx.tick);
}
}, | reduce impact of requestAnimationFrame on incompatible browsers by minimizing number of lookups | jquery_jquery | train | js |
b30444489ec6933ef27113c88087583d7960f002 | diff --git a/src/Resource/Source.php b/src/Resource/Source.php
index <HASH>..<HASH> 100644
--- a/src/Resource/Source.php
+++ b/src/Resource/Source.php
@@ -13,4 +13,94 @@ use Nails\Common\Resource;
class Source extends Resource
{
+ /**
+ * The ID of the source
+ *
+ * @var int
+ */
+ public $id;
+
+ /**
+ * The source's customer ID
+ *
+ * @var int
+ */
+ public $customer_id;
+
+ /**
+ * Which driver is responsible for the source
+ *
+ * @var string
+ */
+ public $driver;
+
+ /**
+ * Any data required by the driver
+ *
+ * @var string
+ */
+ public $data;
+
+ /**
+ * The source's label
+ *
+ * @var string
+ */
+ public $label;
+
+ /**
+ * The source's brand
+ *
+ * @var string
+ */
+ public $brand;
+
+ /**
+ * The source's last four digits
+ *
+ * @var string
+ */
+ public $last_four;
+
+ /**
+ * The source's expiry date
+ *
+ * @var string
+ */
+ public $expiry;
+
+ /**
+ * Whether the source is the default for the customer or not
+ *
+ * @var bool
+ */
+ public $is_default;
+
+ /**
+ * The source's creation date
+ *
+ * @var string
+ */
+ public $created;
+
+ /**
+ * The source's creator's ID
+ *
+ * @var string
+ */
+ public $created_by;
+
+ /**
+ * The source's modification date
+ *
+ * @var string
+ */
+ public $modified;
+
+ /**
+ * The source's modifier's ID
+ *
+ * @var string
+ */
+ public $modified_by;
} | Adds field information to the Source Resource | nails_module-invoice | train | php |
655f683c10e1aba824d68cd9808b8209b88830cd | diff --git a/src/Category.php b/src/Category.php
index <HASH>..<HASH> 100644
--- a/src/Category.php
+++ b/src/Category.php
@@ -78,7 +78,8 @@ class Category implements SerializableInterface, JsonLdSerializableInterface
}
/**
- * {@inheritdoc}
+ * @param array $data
+ * @return Category
*/
public static function deserialize(array $data)
{
diff --git a/src/Label/Events/Created.php b/src/Label/Events/Created.php
index <HASH>..<HASH> 100644
--- a/src/Label/Events/Created.php
+++ b/src/Label/Events/Created.php
@@ -58,7 +58,8 @@ class Created extends AbstractEvent
}
/**
- * @inheritdoc
+ * @param array $data
+ * @return Created
*/
public static function deserialize(array $data)
{
diff --git a/src/Organizer/Events/AddressTranslated.php b/src/Organizer/Events/AddressTranslated.php
index <HASH>..<HASH> 100644
--- a/src/Organizer/Events/AddressTranslated.php
+++ b/src/Organizer/Events/AddressTranslated.php
@@ -45,8 +45,7 @@ final class AddressTranslated extends AddressUpdated
}
/**
- * @param array $data
- * @return static
+ * @return AddressTranslated
*/
public static function deserialize(array $data): AddressUpdated
{ | Document return types where it's impossible to set one because of bad inheritance behaviour | cultuurnet_udb3-php | train | php,php,php |
eef1885fadd806721f5c4f11136ba1efdff60336 | diff --git a/src/io/bt.js b/src/io/bt.js
index <HASH>..<HASH> 100644
--- a/src/io/bt.js
+++ b/src/io/bt.js
@@ -19,7 +19,7 @@ class BT extends JSONRPCWebSocket {
this._ws = ws;
this._ws.onopen = this.requestPeripheral.bind(this); // only call request peripheral after socket opens
- this._ws.onerror = this._sendDisconnectError.bind(this, 'ws onerror');
+ this._ws.onerror = this._sendRequestError.bind(this, 'ws onerror');
this._ws.onclose = this._sendDisconnectError.bind(this, 'ws onclose');
this._availablePeripherals = {}; | On websocket error, use sendRequestError instead of disconnect (#<I>) | LLK_scratch-vm | train | js |
2f54a110acca680d4fcd78b45573e532a91eb61a | diff --git a/pytodoist/test/api.py b/pytodoist/test/api.py
index <HASH>..<HASH> 100644
--- a/pytodoist/test/api.py
+++ b/pytodoist/test/api.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
"""This module contains unit tests for the pytodoist.api module."""
+from __future__ import print_function
import sys
import unittest
from pytodoist.api import TodoistAPI
@@ -165,7 +166,7 @@ class TodoistAPITest(unittest.TestCase):
response = self.t.archive_project(self.user.token, project['id'])
self.assertEqual(response.status_code, 200)
archived_ids = response.json()
- print archived_ids
+ print(archived_ids)
self.assertEqual(len(archived_ids), 1)
def test_get_archived_projects(self):
@@ -173,7 +174,7 @@ class TodoistAPITest(unittest.TestCase):
self.t.archive_project(self.user.token, project['id'])
response = self.t.archive_project(self.user.token, project['id'])
archived_projects = response.json()
- print response.json()
+ print(response.json())
self.assertEqual(len(archived_projects), 1)
def test_unarchive_project(self): | make api test run under Python 3 | Garee_pytodoist | train | py |
4f7b2760aefea06d4860af6ee2b0d52b2e93b78b | diff --git a/src/Illuminate/Foundation/Testing/TestResponse.php b/src/Illuminate/Foundation/Testing/TestResponse.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/Testing/TestResponse.php
+++ b/src/Illuminate/Foundation/Testing/TestResponse.php
@@ -73,7 +73,7 @@ class TestResponse
{
PHPUnit::assertTrue(
$this->isOk(),
- 'Response status code [' . $this->getStatusCode() . '] does match expected 200 status code.'
+ 'Response status code ['.$this->getStatusCode().'] does match expected 200 status code.'
);
return $this; | Apply fixes from StyleCI (#<I>) | laravel_framework | train | php |
c3312a5171367dfd0c6df9d56f8b26c8e9277df5 | diff --git a/src/Tweech/Chat/Chat.php b/src/Tweech/Chat/Chat.php
index <HASH>..<HASH> 100644
--- a/src/Tweech/Chat/Chat.php
+++ b/src/Tweech/Chat/Chat.php
@@ -59,7 +59,7 @@ class Chat
$this->client->listen('tick.second', function(){
$this->secondsElapsed++;
- if ($this->secondsElapsed >= 1) {
+ if ($this->secondsElapsed >= 2) {
$this->messagesPerSecond = $this->messagesReceived / $this->secondsElapsed;
}
}); | Wait 2 seconds before calculating mps | raideer_tweech-framework | train | php |
8627b3a40630726eeb17a09b09252a796a8c4282 | diff --git a/cloudsmith_cli/cli/validators.py b/cloudsmith_cli/cli/validators.py
index <HASH>..<HASH> 100644
--- a/cloudsmith_cli/cli/validators.py
+++ b/cloudsmith_cli/cli/validators.py
@@ -145,7 +145,8 @@ def validate_optional_tokens(ctx, param, value):
for token in value.split(","):
if not token.isalnum() or len(token) != 12:
raise click.BadParameter(
- "Tokens must contain one or more valid entitlement token identifiers as a comma seperated string.",
+ "Tokens must contain one or more valid entitlement token "
+ "identifiers as a comma seperated string.",
param=param,
)
@@ -162,7 +163,8 @@ def validate_optional_timestamp(ctx, param, value):
)
except ValueError:
raise click.BadParameter(
- f"{param.name} must be a valid utc timestamp formatted as `%Y-%m-%dT%H:%M:%SZ` e.g. `2020-12-31T00:00:00Z`",
+ "{} must be a valid utc timestamp formatted as `%Y-%m-%dT%H:%M:%SZ` "
+ "e.g. `2020-12-31T00:00:00Z`".format(param.name),
param=param,
) | Removed Python3-only f-strings | cloudsmith-io_cloudsmith-cli | train | py |
e53872e4a781788fa007b3517e29a4c1fb1fc157 | diff --git a/cmd/util/deps/deps.go b/cmd/util/deps/deps.go
index <HASH>..<HASH> 100644
--- a/cmd/util/deps/deps.go
+++ b/cmd/util/deps/deps.go
@@ -66,7 +66,7 @@ func LoadDeps(pkgs ...Pkg) (*Deps, error) {
}
// get all dependencies for applications defined above
- dependencies := set.New()
+ dependencies := set.New(set.ThreadSafe)
for _, pkg := range packages {
for _, imp := range pkg.Deps {
dependencies.Add(imp) | fix set usage in deps.go | koding_kite | train | go |
4c605ba403c6f7a4f9b5e61fe7bbd85da8196964 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -78,10 +78,10 @@ setup(
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Testing",
], | Add Python <I> support, remove Python <I> support
As of #<I>, Python <I> is supported, so reflect that in the Trove
classifiers.
As of <I>-<I>-<I>, Python <I> is end-of-life and no longer receives
updates of any kind (including security fixes), so remove it from the
list of supported versions. | spulec_moto | train | py |
bf87924cf4bb84a22e46d2c08cbbd81c7c420a70 | diff --git a/test/environments.js b/test/environments.js
index <HASH>..<HASH> 100644
--- a/test/environments.js
+++ b/test/environments.js
@@ -63,10 +63,6 @@ class ReplicaSetEnvironment extends EnvironmentBase {
genReplsetConfig(31004, { arbiter: true })
];
- this.manager = new ReplSetManager('mongod', this.nodes, {
- replSet: 'rs'
- });
-
// Do we have 3.2+
const version = discoverResult.version.join('.');
if (semver.satisfies(version, '>=3.2.0')) {
@@ -75,6 +71,10 @@ class ReplicaSetEnvironment extends EnvironmentBase {
return x;
});
}
+
+ this.manager = new ReplSetManager('mongod', this.nodes, {
+ replSet: 'rs'
+ });
}
} | test: add `enableMajorityReadConcern` before starting nodes | mongodb_node-mongodb-native | train | js |
eaf0ebb09768133cb1a1a4436b2d5b84504c8fa9 | diff --git a/src/Application.php b/src/Application.php
index <HASH>..<HASH> 100644
--- a/src/Application.php
+++ b/src/Application.php
@@ -9,7 +9,6 @@ use Limber\Exceptions\NotFoundHttpException;
use Limber\Middleware\CallableMiddleware;
use Limber\Middleware\PrepareHttpResponse;
use Limber\Middleware\RequestHandler;
-use Limber\Router\Route;
use Limber\Router\Router;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
@@ -18,7 +17,6 @@ use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use ReflectionClass;
use ReflectionFunction;
-use ReflectionMethod;
use ReflectionObject;
use ReflectionParameter;
use Throwable; | Removing unused import statements. | nimbly_Limber | train | php |
4ae6349f355014899bb30c9d84abf9fc906f85b7 | diff --git a/core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java b/core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java
+++ b/core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java
@@ -67,7 +67,14 @@ public class MnemonicCode {
/** Initialise from the included word list. Won't work on Android. */
public MnemonicCode() throws IOException {
- this(MnemonicCode.class.getResourceAsStream("mnemonic/wordlist/english.txt"), BIP39_ENGLISH_SHA256);
+ this(openDefaultWords(), BIP39_ENGLISH_SHA256);
+ }
+
+ private static InputStream openDefaultWords() throws IOException {
+ InputStream stream = MnemonicCode.class.getResourceAsStream("mnemonic/wordlist/english.txt");
+ if (stream == null)
+ throw new IOException(); // Handle Dalvik vs ART divergence.
+ return stream;
}
/** | Fix for Android ART vs Dalvik difference. | bitcoinj_bitcoinj | train | java |
b77792464a951bd75e4405c0ec6476bd7a41f70c | diff --git a/grimoire_elk/elastic_items.py b/grimoire_elk/elastic_items.py
index <HASH>..<HASH> 100644
--- a/grimoire_elk/elastic_items.py
+++ b/grimoire_elk/elastic_items.py
@@ -81,6 +81,11 @@ class ElasticItems():
from .utils import get_connector_name
return get_connector_name(type(self))
+ def get_connector_backend_name(self):
+ """ Find the name for the current connector """
+ from .utils import get_connector_backend_name
+ return get_connector_backend_name(type(self))
+
# Items generator
def fetch(self, _filter=None):
""" Fetch the items from raw or enriched index. An optional _filter
@@ -137,6 +142,14 @@ class ElasticItems():
filters = self.get_repository_filter_raw(term=True)
filters = json.dumps(filters)
+ # Filter also using the backend_name to let a raw index with items
+ # from different backends (arthur common raw index)
+ filters += '''
+ , {"term":
+ { "backend_name":"%s" }
+ }
+ ''' % (self.get_connector_backend_name())
+
if self.filter_raw:
filters += '''
, {"term": | [ocean] Filter always the raw items using the backend_name field to support
that in a raw index there are items from different data sources (arthur). | chaoss_grimoirelab-elk | train | py |
3cc5267a84826f7e796939fbb9dadc539b920679 | diff --git a/cluster_analyticsquery.go b/cluster_analyticsquery.go
index <HASH>..<HASH> 100644
--- a/cluster_analyticsquery.go
+++ b/cluster_analyticsquery.go
@@ -425,7 +425,7 @@ func (c *Cluster) doAnalyticsQuery(tracectx opentracing.SpanContext, b *Bucket,
return nil, err
}
- if !retryBehavior.CanRetry(retries) {
+ if retryBehavior == nil || !retryBehavior.CanRetry(retries) {
break
}
diff --git a/cluster_searchquery.go b/cluster_searchquery.go
index <HASH>..<HASH> 100644
--- a/cluster_searchquery.go
+++ b/cluster_searchquery.go
@@ -260,7 +260,7 @@ func (c *Cluster) doSearchQuery(tracectx opentracing.SpanContext, b *Bucket, q *
return nil, err
}
- if !retryBehavior.CanRetry(retries) {
+ if retryBehavior == nil || !retryBehavior.CanRetry(retries) {
break
} | Check that retrybehavior is not nil before using.
Motivation
----------
It's possible for a user to provide a retrybehavior for search or
analytics so we should check that they aren't nil before use.
Changes
-------
Added nil checks before use in search and analytics query execution.
Change-Id: I8c<I>b9bf<I>fded<I>b<I>d<I>b8f
Reviewed-on: <URL> | couchbase_gocb | train | go,go |
1116161fe60ab729165db3e4620a2fa9127e4ddd | diff --git a/src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java b/src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java
index <HASH>..<HASH> 100644
--- a/src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java
+++ b/src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java
@@ -139,7 +139,7 @@ HasClickHandlers, HasDoubleClickHandlers, HasMouseOverHandlers, I_CmsTruncable {
if (CmsStringUtil.isEmptyOrWhitespaceOnly(value)) {
m_valueLabel.setHTML(CmsDomUtil.Entity.nbsp.html());
} else {
- m_valueLabel.setHTML(value);
+ m_valueLabel.setText(value);
}
m_valueLabel.addStyleName(style.itemAdditionalValue());
if (additionalStyle != null) { | Changed additional info lines in resource info boxes to escape HTML. | alkacon_opencms-core | train | java |
219ab2c1df4382e359220bd08635809b45142fa8 | diff --git a/twitter_bot/since_id/redis_provider.py b/twitter_bot/since_id/redis_provider.py
index <HASH>..<HASH> 100644
--- a/twitter_bot/since_id/redis_provider.py
+++ b/twitter_bot/since_id/redis_provider.py
@@ -6,11 +6,11 @@ from twitter_bot.since_id.base_provider import BaseSinceIdProvider
class RedisSinceIdProvider(BaseSinceIdProvider):
- def __init__(self, redis_url=None):
+ def __init__(self, redis_url=''):
super(RedisSinceIdProvider, self).__init__()
if not redis_url:
- redis_url = os.environ.get('REDIS_URL')
+ redis_url = os.environ.get('REDIS_URL', '')
self.redis = Redis.from_url(redis_url)
def get(self): | Default redis_url to empty string, not None | jessamynsmith_twitterbot | train | py |
4551780479a7f23d0292e187604ae57a3de07a5a | diff --git a/uproot/_connect/to_pandas.py b/uproot/_connect/to_pandas.py
index <HASH>..<HASH> 100644
--- a/uproot/_connect/to_pandas.py
+++ b/uproot/_connect/to_pandas.py
@@ -137,7 +137,7 @@ def futures2df(futures, outputtype, entrystart, entrystop, flatten, flatname, aw
index = array.index
else:
if starts is not array.starts and not awkward.numpy.array_equal(starts, array.starts):
- raise ValueError("cannot use flatten=True on branches with different jagged structure; explicitly select compatible branches (and pandas.merge if you want to combine different jagged structure)")
+ raise ValueError("cannot use flatten=True on branches with different jagged structure, such as electrons and muons (different, variable number of each per event); either explicitly select compatible branches, such as [\"MET_*\", \"Muon_*\"] (scalar and variable per event is okay), or set flatten=False")
array = array.content
needbroadcasts.append(False) | try to improve error message for common TTree.pandas.df() failure | scikit-hep_uproot | train | py |
a829db9c2af6323adab371be930ac213b388f6c3 | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,9 +1,14 @@
-require "coveralls"
-Coveralls.wear!
-
require "bundler"
Bundler.setup(:default, :development)
+require "simplecov"
+require "coveralls"
+
+SimpleCov.formatter = Coveralls::SimpleCov::Formatter
+SimpleCov.start do
+ add_filter "spec"
+end
+
require "savon"
require "rspec" | tell coverall to ignore spec support files | savonrb_savon | train | rb |
2c29290ad7d85f7224db1b9eb2fa25b5c2ff0f12 | diff --git a/src/Services/Database.php b/src/Services/Database.php
index <HASH>..<HASH> 100644
--- a/src/Services/Database.php
+++ b/src/Services/Database.php
@@ -19,7 +19,7 @@ class Database extends BaseService {
/**
* @var array
*/
- protected $configurations;
+ protected $configurations = [];
/**
* @var \Doctrine\DBAL\Connection[]
@@ -48,7 +48,10 @@ class Database extends BaseService {
* @return self
*/
public function readConfigurations() {
- $this->setConfigurations(require(service('path')->getConfigurationsPath() . '/database.php'));
+ $configurationFile = service('path')->getConfigurationsPath() . '/database.php';
+ if (file_exists($configurationFile)) {
+ $this->setConfigurations(require($configurationFile));
+ }
return $this;
} | Fix database service for reading configuration file when it is not exist | php-rise_rise | train | php |
d22682469efd5140ec010f9f0c5990ee7013e4db | diff --git a/source/Parser.php b/source/Parser.php
index <HASH>..<HASH> 100755
--- a/source/Parser.php
+++ b/source/Parser.php
@@ -15,7 +15,7 @@ define(
class Parser
{
- private $macro = [];
+ private $macros = [];
private $compilers = [];
public function addMacro($macro) | Fix typeo in Parser
discovered by @phpstan
Fixes #<I> | preprocess_pre-plugin | train | php |
ab9036f3bd3091d12b1860ab4a53d95ece1f7201 | diff --git a/flask_oidc/__init__.py b/flask_oidc/__init__.py
index <HASH>..<HASH> 100644
--- a/flask_oidc/__init__.py
+++ b/flask_oidc/__init__.py
@@ -254,11 +254,15 @@ class OpenIDConnect(object):
def _get_cookie_id_token(self):
try:
- id_token_cookie = request.cookies[current_app.config[
- 'OIDC_ID_TOKEN_COOKIE_NAME']]
+ id_token_cookie = request.cookies.get(current_app.config[
+ 'OIDC_ID_TOKEN_COOKIE_NAME'])
+ if not id_token_cookie:
+ # Do not error if we were unable to get the cookie.
+ # The user can debug this themselves.
+ return None
return self.cookie_serializer.loads(id_token_cookie)
- except (KeyError, SignatureExpired):
- logger.debug("Missing or invalid ID token cookie", exc_info=True)
+ except SignatureExpired:
+ logger.debug("Invalid ID token cookie", exc_info=True)
return None
def set_cookie_id_token(self, id_token): | Do not complain if the user has no cookie | puiterwijk_flask-oidc | train | py |
f03c5b5d1717f2ebec64032d269316dc74476056 | diff --git a/lib/audited/auditor.rb b/lib/audited/auditor.rb
index <HASH>..<HASH> 100644
--- a/lib/audited/auditor.rb
+++ b/lib/audited/auditor.rb
@@ -175,12 +175,13 @@ module Audited
private
def audited_changes
+ all_changes = respond_to?(:attributes_in_database) ? attributes_in_database : changed_attributes
collection =
if audited_options[:only]
audited_columns = self.class.audited_columns.map(&:name)
- changed_attributes.slice(*audited_columns)
+ all_changes.slice(*audited_columns)
else
- changed_attributes.except(*non_audited_columns)
+ all_changes.except(*non_audited_columns)
end
collection.inject({}) do |changes, (attr, old_value)| | Use updated AR::Dirty API to find changed attributes | collectiveidea_audited | train | rb |
1296a06706c033b66180b438bd46b92862fc0e2c | diff --git a/packages/teraslice/lib/storage/assets.js b/packages/teraslice/lib/storage/assets.js
index <HASH>..<HASH> 100644
--- a/packages/teraslice/lib/storage/assets.js
+++ b/packages/teraslice/lib/storage/assets.js
@@ -234,7 +234,7 @@ module.exports = async function assetsStore(context) {
logger.info(`autoloading asset ${asset}...`);
const assetPath = path.join(autoloadDir, asset);
try {
- const result = await save(await fse.readFile(assetPath), true);
+ const result = await save(await fse.readFile(assetPath), false);
if (result.created) {
logger.debug(`autoloaded asset ${asset}`);
} else { | Don't block in the asset save now | terascope_teraslice | train | js |
fe7bc1bcccde50349e23bcec1039597c4ac3220e | diff --git a/lib/engine.go b/lib/engine.go
index <HASH>..<HASH> 100644
--- a/lib/engine.go
+++ b/lib/engine.go
@@ -72,6 +72,7 @@ loop:
e.Status.Running = false
e.Status.VUs = 0
e.Status.Pooled = 0
+ e.reportInternalStats()
return nil
} | [fix] Stopped tests should report 0/0 VUs | loadimpact_k6 | train | go |
98bb5335df77b8d185d1b92918bf251558687d1f | diff --git a/tests/integration/modules/config.py b/tests/integration/modules/config.py
index <HASH>..<HASH> 100644
--- a/tests/integration/modules/config.py
+++ b/tests/integration/modules/config.py
@@ -32,7 +32,7 @@ class ConfigTest(integration.ModuleCase):
# interpereter is breaking it for remote calls
self.assertEqual(self.run_function('config.manage_mode', ['775']), '775')
self.assertEqual(self.run_function('config.manage_mode', ['1775']), '1775')
- self.assertEqual(self.run_function('config.manage_mode', ['0775']), '775')
+ #self.assertEqual(self.run_function('config.manage_mode', ['0775']), '775')
def test_option(self):
''' | Disable failing config.manage_mode test, we will need to clean this | saltstack_salt | train | py |
e8e066b48688e20269568e62173d7f91a3f64b7a | diff --git a/ezp/Persistence/Content/Type/Interfaces/Handler.php b/ezp/Persistence/Content/Type/Interfaces/Handler.php
index <HASH>..<HASH> 100644
--- a/ezp/Persistence/Content/Type/Interfaces/Handler.php
+++ b/ezp/Persistence/Content/Type/Interfaces/Handler.php
@@ -84,12 +84,22 @@ interface Handler
public function copy( $userId, $contentTypeId );
/**
- * @param int $groupId
- * @param int $contentTypeId
+ * Unlink a content type group from a content type
+ *
+ * @param mixed $groupId
+ * @param mixed $contentTypeId
*/
public function unlink( $groupId, $contentTypeId );
/**
+ * Link a content type group with a content type
+ *
+ * @param mixed $groupId
+ * @param mixed $contentTypeId
+ */
+ public function link( $groupId, $contentTypeId );
+
+ /**
* @param int $contentTypeId
* @param int $groupId
*/ | Added link method
Added a link method to make it possible to associate groups with content
types. | ezsystems_ezpublish-kernel | train | php |
a369a07f0deb420bcabe41fce77d21377801c64d | diff --git a/lib/combine_pdf/renderer.rb b/lib/combine_pdf/renderer.rb
index <HASH>..<HASH> 100644
--- a/lib/combine_pdf/renderer.rb
+++ b/lib/combine_pdf/renderer.rb
@@ -107,7 +107,7 @@ module CombinePDF
end
end
# remove extra page references.
- object[:Contents].delete(is_reference_only: true, referenced_object: { indirect_reference_id: 0, raw_stream_content: '' }) if object[:Type] == :Page && object[:Contents]
+ object[:Contents].delete(is_reference_only: true, referenced_object: { indirect_reference_id: 0, raw_stream_content: '' }) if object[:Type] == :Page && object[:Contents].is_a?(Array)
# correct stream length, if the object is a stream.
object[:Length] = object[:raw_stream_content].bytesize if object[:raw_stream_content] | object[:Contents] needs to be an Array
This line is used to remove "empty" edits to PDF pages. This means that pages were expected to have data added to them but where eventually left alone (or the data added was another PDF page instead of a text object). | boazsegev_combine_pdf | train | rb |
da3d7eda16fe2d28813ce8bd29115a3ee7aaee81 | diff --git a/src/PhpPact/Standalone/Runner/ProcessRunner.php b/src/PhpPact/Standalone/Runner/ProcessRunner.php
index <HASH>..<HASH> 100644
--- a/src/PhpPact/Standalone/Runner/ProcessRunner.php
+++ b/src/PhpPact/Standalone/Runner/ProcessRunner.php
@@ -193,27 +193,17 @@ class ProcessRunner
*/
public function stop(): bool
{
- if (!$this->process->isRunning()) {
- return true;
- }
$pid = $this->process->getPid();
print "\nStopping Process Id: {$pid}\n";
if ('\\' === \DIRECTORY_SEPARATOR) {
- \exec(\sprintf('taskkill /F /T /PID %d /fi "STATUS eq RUNNING" 2>&1', $pid), $output, $exitCode);
- if ($exitCode) {
- throw new ProcessException(\sprintf('Unable to kill the process (%s).', \implode(' ', $output)));
- }
+ \exec(\sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode);
}
$this->process->kill();
- if ($this->process->isRunning()) {
- throw new ProcessException(\sprintf('Error while killing process "%s".', $pid));
- }
-
return true;
} | fix: simplify ProcessRunner::stop() to work on windows systems | pact-foundation_pact-php | train | php |
3663c7e8470fd025636e1d97c8d010c082a12e2a | diff --git a/filterpy/__init__.py b/filterpy/__init__.py
index <HASH>..<HASH> 100644
--- a/filterpy/__init__.py
+++ b/filterpy/__init__.py
@@ -14,4 +14,4 @@ This is licensed under an MIT license. See the readme.MD file
for more information.
"""
-__version__ = "1.2.0"
+__version__ = "1.2.1"
diff --git a/filterpy/common/kinematic.py b/filterpy/common/kinematic.py
index <HASH>..<HASH> 100644
--- a/filterpy/common/kinematic.py
+++ b/filterpy/common/kinematic.py
@@ -18,7 +18,7 @@ for more information.
import math
import numpy as np
import scipy as sp
-from kalman import KalmanFilter
+from filterpy.kalman import KalmanFilter
def kinematic_state_transition(order, dt): | Fixed import error
For some reason I was trying to do an absolute import
for kalman. | rlabbe_filterpy | train | py,py |
4f73fe370c5c43895ebac890720356fbdb68d6e6 | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -15,6 +15,10 @@ class User
def send_create_notification; end
end
+class ActionView::TestCase::TestController
+ include Rails.application.routes.url_helpers
+end
+
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | Allow stand-alone running of view specs | publify_publify | train | rb |
47a3bb217387843d2e26a4743929f7b5b3f2a7dd | diff --git a/bokeh/core/compat/bokeh_renderer.py b/bokeh/core/compat/bokeh_renderer.py
index <HASH>..<HASH> 100644
--- a/bokeh/core/compat/bokeh_renderer.py
+++ b/bokeh/core/compat/bokeh_renderer.py
@@ -402,7 +402,8 @@ class BokehRenderer(Renderer):
widths = get_props_cycled(col, col.get_linewidth())
multiline.line_color = source.add(colors)
multiline.line_width = source.add(widths)
- multiline.line_alpha = col.get_alpha()
+ if col.get_alpha() is not None:
+ multiline.line_alpha = col.get_alpha()
offset = col.get_linestyle()[0][0]
if not col.get_linestyle()[0][1]:
on_off = []
@@ -421,8 +422,9 @@ class BokehRenderer(Renderer):
patches.line_color = source.add(edge_colors)
widths = get_props_cycled(col, col.get_linewidth())
patches.line_width = source.add(widths)
- patches.line_alpha = col.get_alpha()
- patches.fill_alpha = col.get_alpha()
+ if col.get_alpha() is not None:
+ patches.line_alpha = col.get_alpha()
+ patches.fill_alpha = col.get_alpha()
offset = col.get_linestyle()[0][0]
if not col.get_linestyle()[0][1]:
on_off = [] | don't set colors and alphas to None explicity! (use default instead) | bokeh_bokeh | train | py |
1472e09ef5d798b4f165e560891bcc2b79ee5659 | diff --git a/falafel/mappers/multinode.py b/falafel/mappers/multinode.py
index <HASH>..<HASH> 100644
--- a/falafel/mappers/multinode.py
+++ b/falafel/mappers/multinode.py
@@ -8,7 +8,12 @@ def _metadata(context, product_filter=None):
md = marshalling.unmarshal("\n".join(context.content))
product = md["product"]
if "links" in md:
+ # Parent metadata.json won't have "links" as a top level key
product += "Child"
+ elif "systems" not in md:
+ # This case is for single-node systems that have a
+ # metadata.json
+ return
return globals()[product](md)
except:
pass | Ensure multinode mappers don't fire on single-node metadata.json | RedHatInsights_insights-core | train | py |
8731f03bf14c5ad43c253579db441dd56df40f4f | diff --git a/lib/ticket_evolution/version.rb b/lib/ticket_evolution/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ticket_evolution/version.rb
+++ b/lib/ticket_evolution/version.rb
@@ -1,3 +1,3 @@
module TicketEvolution
- VERSION = '0.7.12'
+ VERSION = '0.7.13'
end | Bump minor version for ShippingSettings endpoint addition | ticketevolution_ticketevolution-ruby | train | rb |
feac2c60a674c3245e79b9e596983aba6ea4ae21 | diff --git a/test/test_platform.rb b/test/test_platform.rb
index <HASH>..<HASH> 100644
--- a/test/test_platform.rb
+++ b/test/test_platform.rb
@@ -43,14 +43,14 @@ class TestPlatform < Test::Unit::TestCase
end
def test_copy_command_windows
- Boom::Platform.stubs(:windows?).returns(true)
- Boom::Platform.stubs(:darwin?).returns(false)
+ Boom::Platform.stubs(:darwin?).returns(true)
+ Boom::Platform.stubs(:windows?).returns(false)
assert_equal Boom::Platform.copy_command, 'clip'
end
- def test_copy_command_darwin
- Boom::Platform.stubs(:darwin?).returns(false)
+ def test_copy_command_linux
Boom::Platform.stubs(:darwin?).returns(false)
+ Boom::Platform.stubs(:windows?).returns(false)
assert_equal Boom::Platform.copy_command, 'xclip -selection clipboard'
end | fixed error in test_platform.rb | holman_boom | train | rb |
2e9d96bb980a818ea597503805fc9fe402e9902d | diff --git a/src/Pagination/Paginator.php b/src/Pagination/Paginator.php
index <HASH>..<HASH> 100644
--- a/src/Pagination/Paginator.php
+++ b/src/Pagination/Paginator.php
@@ -128,6 +128,7 @@ class Paginator extends AbstractSettablePaginator
protected function getPagesCount()
{
$query = $this->getQueryBuilder()->getQuery();
+ $query->useResultCache($this->useCache, $this->cacheLifetime);
$hasGroupBy = 0 < count($this->getQueryBuilder()->getDQLPart('groupBy')); | Use ResultCache for count too | facile-it_paginator-bundle | train | php |
55494cc836dd2ba64efb29c429e5aa123b640cca | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -50,4 +50,4 @@ setup(name = 'logdissect', version = str(__version__),
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 2",
- "Topic :: System :: System Administration"])
+ "Topic :: System :: System Administrations"]) | Update classifiers in setup.py | dogoncouch_logdissect | train | py |
d9e80627a42deb516a4f75ddc41b745a73a2548a | diff --git a/store.go b/store.go
index <HASH>..<HASH> 100644
--- a/store.go
+++ b/store.go
@@ -98,7 +98,9 @@ func (c *controller) getNetworkFromStore(nid string) (*network, error) {
}
n.epCnt = ec
- n.scope = store.Scope()
+ if n.scope == "" {
+ n.scope = store.Scope()
+ }
return n, nil
}
@@ -132,7 +134,9 @@ func (c *controller) getNetworksForScope(scope string) ([]*network, error) {
}
n.epCnt = ec
- n.scope = scope
+ if n.scope == "" {
+ n.scope = scope
+ }
nl = append(nl, n)
}
@@ -171,7 +175,9 @@ func (c *controller) getNetworksFromStore() ([]*network, error) {
ec.n = n
n.epCnt = ec
}
- n.scope = store.Scope()
+ if n.scope == "" {
+ n.scope = store.Scope()
+ }
n.Unlock()
nl = append(nl, n)
} | Do not reset network scope during store read
- Unless it is needed | docker_libnetwork | train | go |
09ed6593658af6302ef2ae2cee28949c5eaf89f7 | diff --git a/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java b/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java
index <HASH>..<HASH> 100644
--- a/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java
+++ b/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java
@@ -185,7 +185,7 @@ public class CassandraMetadata
private List<SchemaTableName> listTables(ConnectorSession session, SchemaTablePrefix prefix)
{
- if (prefix.getSchemaName() == null || prefix.getTableName() == null) {
+ if (prefix.getTableName() == null) {
return listTables(session, prefix.getSchemaName());
}
return ImmutableList.of(new SchemaTableName(prefix.getSchemaName(), prefix.getTableName())); | Simplify condition
`SchemaTablePrefix.schemaName` being null implies its `tableName` to be
null as well. | prestodb_presto | train | java |
9e840a1b9bc051baef16473c66a0084fc87cf091 | diff --git a/lib/Elastica/Client.php b/lib/Elastica/Client.php
index <HASH>..<HASH> 100644
--- a/lib/Elastica/Client.php
+++ b/lib/Elastica/Client.php
@@ -674,7 +674,7 @@ class Client
* @param array $query OPTIONAL Query params
* @param string $contentType Content-Type sent with this request
*
- * @throws Exception\ConnectionException|\Exception
+ * @throws Exception\ConnectionException|Exception\ClientException
*
* @return Response Response object
*/ | Improve PHPDoc annotation (#<I>)
Change generic \Exception to more specific one. | ruflin_Elastica | train | php |
48120cee7c14a87c9954fabca3277342338222b5 | diff --git a/lib/webpacker/compiler.rb b/lib/webpacker/compiler.rb
index <HASH>..<HASH> 100644
--- a/lib/webpacker/compiler.rb
+++ b/lib/webpacker/compiler.rb
@@ -18,9 +18,8 @@ class Webpacker::Compiler
def compile
if stale?
- record_compilation_digest
run_webpack.tap do |success|
- remove_compilation_digest if !success
+ record_compilation_digest if success
end
else
true
@@ -54,11 +53,6 @@ class Webpacker::Compiler
compilation_digest_path.write(watched_files_digest)
end
- def remove_compilation_digest
- compilation_digest_path.delete if compilation_digest_path.exist?
- rescue Errno::ENOENT, Errno::ENOTDIR
- end
-
def run_webpack
logger.info "Compiling…" | Only record compilation digest if webpack runs successfully. (#<I>)
This fixes an issue where current request gets an stale pack,
because previous request wrote the compilation digest before
webpack ends up running. | rails_webpacker | train | rb |
76bb33781fb7a512587d4bdd1a671e4f79b7d712 | diff --git a/integration/v3_watch_test.go b/integration/v3_watch_test.go
index <HASH>..<HASH> 100644
--- a/integration/v3_watch_test.go
+++ b/integration/v3_watch_test.go
@@ -1128,9 +1128,13 @@ func TestV3WatchWithFilter(t *testing.T) {
}
func TestV3WatchWithPrevKV(t *testing.T) {
+ defer testutil.AfterTest(t)
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
defer clus.Terminate(t)
+ wctx, wcancel := context.WithCancel(context.Background())
+ defer wcancel()
+
tests := []struct {
key string
end string
@@ -1150,7 +1154,7 @@ func TestV3WatchWithPrevKV(t *testing.T) {
t.Fatal(err)
}
- ws, werr := toGRPC(clus.RandClient()).Watch.Watch(context.TODO())
+ ws, werr := toGRPC(clus.RandClient()).Watch.Watch(wctx)
if werr != nil {
t.Fatal(werr)
} | integration: cancel Watch when TestV3WatchWithPrevKV exits
Missing ctx cancel was causing goroutine leaks for the proxy tests. | etcd-io_etcd | train | go |
2e65951b9df9935906dd993ed1d207aa446d0e11 | diff --git a/src/Net/HTTP/Request.php b/src/Net/HTTP/Request.php
index <HASH>..<HASH> 100644
--- a/src/Net/HTTP/Request.php
+++ b/src/Net/HTTP/Request.php
@@ -123,7 +123,7 @@ class Net_HTTP_Request extends ADT_List_Dictionary
}*/
$this->setMethod( strtoupper( getEnv( 'REQUEST_METHOD' ) ) ); // store HTTP method
- $this->body = file_get_contents( "php://input" ); // store raw post or file data
+ $this->body = file_get_contents( "php://input" ); // store raw POST, PUT or FILE data
}
public function fromString( $request )
@@ -251,13 +251,15 @@ class Net_HTTP_Request extends ADT_List_Dictionary
{
# remark( 'R:remove: '.$key );
parent::remove( $key );
- $this->body = http_build_query( $this->getAll(), NULL, '&' );
+// if( $this->method === "POST" )
+// $this->body = http_build_query( $this->getAll(), NULL, '&' );
}
public function set( $key, $value )
{
parent::set( $key, $value );
- $this->body = http_build_query( $this->getAll(), NULL, '&' );
+// if( $this->method === "POST" )
+// $this->body = http_build_query( $this->getAll(), NULL, '&' );
}
public function setAjax( $value = 'X-Requested-With' ) | Disable update of body while setting or removing parameters. | CeusMedia_Common | train | php |
f1f901c3ea2bb4a642136da36721b539ce435b91 | diff --git a/admin/index.php b/admin/index.php
index <HASH>..<HASH> 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -71,7 +71,7 @@
$db->debug=false;
if (set_field("config", "value", "$version", "name", "version")) {
notify($strdatabasesuccess);
- print_continue("$CFG->wwwroot");
+ print_continue("index.php");
die;
} else {
notify("Upgrade failed! (Could not update version in config table)"); | After upgrading version, stay on admin page rather than going to home
page, just in case there is more to do. | moodle_moodle | train | php |
c77e149243f8aab9d11853bef57c3ced089e25be | diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go
index <HASH>..<HASH> 100644
--- a/cmd/tiller/tiller.go
+++ b/cmd/tiller/tiller.go
@@ -68,10 +68,10 @@ var rootCommand = &cobra.Command{
}
func main() {
- pf := rootCommand.PersistentFlags()
- pf.StringVarP(&grpcAddr, "listen", "l", ":44134", "address:port to listen on")
- pf.StringVar(&store, "storage", storageConfigMap, "storage driver to use. One of 'configmap' or 'memory'")
- pf.BoolVar(&enableTracing, "trace", false, "enable rpc tracing")
+ p := rootCommand.PersistentFlags()
+ p.StringVarP(&grpcAddr, "listen", "l", ":44134", "address:port to listen on")
+ p.StringVar(&store, "storage", storageConfigMap, "storage driver to use. One of 'configmap' or 'memory'")
+ p.BoolVar(&enableTracing, "trace", false, "enable rpc tracing")
rootCommand.Execute()
} | change var naming to match helm | helm_helm | train | go |
c24f9652ae518c61c0333ffa78395256c1ba9ae2 | diff --git a/sdk/python/sawtooth_sdk/consensus/zmq_service.py b/sdk/python/sawtooth_sdk/consensus/zmq_service.py
index <HASH>..<HASH> 100644
--- a/sdk/python/sawtooth_sdk/consensus/zmq_service.py
+++ b/sdk/python/sawtooth_sdk/consensus/zmq_service.py
@@ -80,7 +80,7 @@ class ZmqService(Service):
# -- Block Creation --
- def initialize_block(self, previous_id):
+ def initialize_block(self, previous_id=None):
request = (
consensus_pb2.ConsensusInitializeBlockRequest(
previous_id=previous_id) | Give Python CSDK initialize_block default None arg
This is specified by the interface. | hyperledger_sawtooth-core | train | py |
c3433a5d7b24f6eb530ab347c4e5d983e544b3c8 | diff --git a/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageToolSupport.java b/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageToolSupport.java
index <HASH>..<HASH> 100644
--- a/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageToolSupport.java
+++ b/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageToolSupport.java
@@ -811,7 +811,9 @@ class LanguageToolSupport {
private void removeHighlights() {
for (Highlighter.Highlight hl : textComponent.getHighlighter().getHighlights()) {
- textComponent.getHighlighter().removeHighlight(hl);
+ if (hl.getPainter() instanceof HighlightPainter) {
+ textComponent.getHighlighter().removeHighlight(hl);
+ }
}
} | fix drawing problems: selected text could sometimes disappear (e.g. when selecting text after start up, but before the first errors were marked) | languagetool-org_languagetool | train | java |
9d2cf8879dcb1d1183d3cead641e7658a72c1b01 | diff --git a/src/Event/Http/HttpRequestEvent.php b/src/Event/Http/HttpRequestEvent.php
index <HASH>..<HASH> 100644
--- a/src/Event/Http/HttpRequestEvent.php
+++ b/src/Event/Http/HttpRequestEvent.php
@@ -38,7 +38,7 @@ final class HttpRequestEvent implements LambdaEvent
throw new InvalidLambdaEvent('API Gateway or ALB', $event);
}
- $this->payloadVersion = (float) $event['version'];
+ $this->payloadVersion = (float) ($event['version'] ?? '1.0');
$this->event = $event;
$this->queryString = $this->rebuildQueryString();
$this->headers = $this->extractHeaders(); | Default HTTP request event version to <I> | mnapoli_bref | train | php |
e6bb0294ce788912d6ee885685aaf8113beaa25f | diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index <HASH>..<HASH> 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -300,8 +300,8 @@ module ChefZero
#
def stop(wait = 5)
if @running
- @server.shutdown
- @thread.join(wait)
+ @server.shutdown if @server
+ @thread.join(wait) if @thread
end
rescue Timeout::Error
if @thread | Handle exceptional conditions where stops are being called all over | chef_chef-zero | train | rb |
6b190addbb11af4a3d624d3f9619974680f634ea | diff --git a/lib/fuel-soap.js b/lib/fuel-soap.js
index <HASH>..<HASH> 100644
--- a/lib/fuel-soap.js
+++ b/lib/fuel-soap.js
@@ -283,11 +283,11 @@ FuelSoap.prototype.makeRequest = function (action, req, callback) {
requestOptions.headers = this.defaultHeaders;
requestOptions.headers.SOAPAction = action;
- this.AuthClient.on('error', function (err) {
+ this.AuthClient.once('error', function (err) {
console.log(err);
});
- this.AuthClient.on('response', function (body) {
+ this.AuthClient.once('response', function (body) {
var env = self.buildEnvelope(req, body.accessToken);
console.log(env); | Changed AuthClient binding from .on to .once. | salesforce-marketingcloud_FuelSDK-Node-SOAP | train | js |
a239ac562bff9559eb371d71fe671ee68c3bb89d | diff --git a/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/AbstractNodeData.php b/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/AbstractNodeData.php
index <HASH>..<HASH> 100644
--- a/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/AbstractNodeData.php
+++ b/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/AbstractNodeData.php
@@ -268,6 +268,8 @@ abstract class AbstractNodeData {
$nodeData = $this->nodeDataRepository->findOneByIdentifier($value, $this->getWorkspace());
if ($nodeData instanceof NodeData) {
$value = $nodeData;
+ } else {
+ $value = NULL;
}
break;
} | [TASK] Add safe guard in getProperty() for non-existing node reference
This adds a safe guard to Node::getProperty() which returns NULL if
the node the property is referring to does not exist (anymore).
Change-Id: I1a3e9c<I>f<I>ce8d<I>bed8bbce<I>efc<I>
Reviewed-on: <URL> | neos_neos-development-collection | train | php |
0d1a23e7fc7b1e812a60c9c4aa16258e7dc82cb4 | diff --git a/tests/Monolog/Handler/SyslogUdpHandlerTest.php b/tests/Monolog/Handler/SyslogUdpHandlerTest.php
index <HASH>..<HASH> 100644
--- a/tests/Monolog/Handler/SyslogUdpHandlerTest.php
+++ b/tests/Monolog/Handler/SyslogUdpHandlerTest.php
@@ -2,6 +2,9 @@
namespace Monolog\Handler;
+/**
+ * @requires extension sockets
+ */
class SyslogUdpHandlerTest extends \PHPUnit_Framework_TestCase
{
/**
diff --git a/tests/Monolog/Handler/UdpSocketTest.php b/tests/Monolog/Handler/UdpSocketTest.php
index <HASH>..<HASH> 100644
--- a/tests/Monolog/Handler/UdpSocketTest.php
+++ b/tests/Monolog/Handler/UdpSocketTest.php
@@ -4,6 +4,9 @@ namespace Monolog\Handler;
use Monolog\TestCase;
+/**
+ * @requires extension sockets
+ */
class UdpSocketTest extends TestCase
{
public function testWeDoNotSplitShortMessages() | avoid test suites failed with Fatal error when sockets extension is not available | Seldaek_monolog | train | php,php |
d4b15580d7a45e2fb71f32632538be20589b0699 | diff --git a/raiden/transfer/node.py b/raiden/transfer/node.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/node.py
+++ b/raiden/transfer/node.py
@@ -867,8 +867,6 @@ def is_transaction_successful(chain_state, transaction, state_change):
isinstance(state_change, ContractReceiveSecretReveal) and
isinstance(transaction, ContractSendSecretReveal) and
state_change.transaction_from == our_address and
- state_change.secret_registry_address == transaction.secret_registry_address and
- state_change.secrethash == transaction.secrethash and
state_change.secret == transaction.secret
)
if is_our_secret_reveal: | bugfix: ContractSendSecretReveal doesnt have the registry address
[ci integration] | raiden-network_raiden | train | py |
4e3e182516587f7bf1017b7f22aabfb6d2d6ddea | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,14 @@
import os
import sys
+from pip.req import parse_requirements
+
+# parse_requirements() returns generator of pip.req.InstallRequirement objects
+install_reqs = parse_requirements('requirements.txt')
+
+# reqs is a list of requirement
+# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
+reqs = [str(ir.req) for ir in install_reqs]
try:
from setuptools import setup
@@ -29,8 +37,7 @@ setup(
],
package_dir={'leicaexperiment': 'leicaexperiment'},
include_package_data=True,
- install_requires=[
- ],
+ install_requires=reqs,
license='MIT',
zip_safe=False,
keywords='leicaexperiment', | install requires from requirements.txt | arve0_leicaexperiment | train | py |
f6d0f04411ff4177fb8b504e2339c30f114f1e01 | diff --git a/py/test/selenium/webdriver/common/api_examples.py b/py/test/selenium/webdriver/common/api_examples.py
index <HASH>..<HASH> 100644
--- a/py/test/selenium/webdriver/common/api_examples.py
+++ b/py/test/selenium/webdriver/common/api_examples.py
@@ -177,9 +177,6 @@ class ApiExampleTest (unittest.TestCase):
self._loadPage(page)
elem = self.driver.find_element_by_id("id1")
attr = elem.get_attribute("href")
- # IE returns full URL
- if self.driver.name == "internet explorer":
- attr = attr[-1]
self.assertEquals("http://localhost:%d/xhtmlTest.html#" % self.webserver.port, attr)
def testGetImplicitAttribute(self): | DavidBurns updating test to desired behavior for getattribute of href
r<I> | SeleniumHQ_selenium | train | py |
9a4a0ba56b2c41f057ef56b08229f4721c0dff91 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ with open('README.md', 'r') as f:
long_description = f.read()
setup(name='carpi-obddaemon',
- version='0.3.0',
+ version='0.3.1',
description='OBD II Daemon (developed for CarPi)',
long_description=long_description,
url='https://github.com/rGunti/CarPi-OBDDaemon',
@@ -23,7 +23,10 @@ setup(name='carpi-obddaemon',
author='Raphael "rGunti" Guntersweiler',
author_email='raphael@rgunti.ch',
license='MIT',
- packages=['obddaemon'],
+ packages=[
+ 'obddaemon',
+ 'obddaemon.custom'
+ ],
install_requires=[
'obd',
'wheel' | Fixed a packaging issue, created a <I> patch | rGunti_CarPi-OBDDaemon | train | py |
5d52cd7c9a27a1cb765f1ca358f5392aa1d4c4ec | diff --git a/api/src/opentrons/data_storage/database_migration.py b/api/src/opentrons/data_storage/database_migration.py
index <HASH>..<HASH> 100755
--- a/api/src/opentrons/data_storage/database_migration.py
+++ b/api/src/opentrons/data_storage/database_migration.py
@@ -116,8 +116,18 @@ def _do_schema_changes():
db_version = database.get_version()
if db_version == 0:
log.info("doing database schema migration")
- execute_schema_change(conn, create_table_ContainerWells)
- execute_schema_change(conn, create_table_Containers)
+ try:
+ execute_schema_change(conn, create_table_ContainerWells)
+ except sqlite3.OperationalError:
+ log.warning(
+ "Creation of container wells failed, robot may have been "
+ "interrupted during last boot")
+ try:
+ execute_schema_change(conn, create_table_Containers)
+ except sqlite3.OperationalError:
+ log.warning(
+ "Creation of containers failed, robot may have been "
+ "interrupted during last boot")
database.set_version(1)
return conn | fix(api): apiv1: handle partial db schema changes (#<I>)
If the labware database has been partially migrated - one or both of the schema
changes creating tables have occurred, but the sqlite user version has not yet
been set - then the next time the robot boots, it will try to recreate the
tables and die from an unhandled exception. This commit handles these exceptions
and moves to the next migration. | Opentrons_opentrons | train | py |
3bf9457a127d01bb1c37a119d2ed735df10c0793 | diff --git a/spec/jekyll-timeago_spec.rb b/spec/jekyll-timeago_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/jekyll-timeago_spec.rb
+++ b/spec/jekyll-timeago_spec.rb
@@ -18,6 +18,7 @@ describe Jekyll::Timeago do
end
it 'process successfully the site using filters and tags' do
+ allow(Date).to receive(:today) { Date.new(2016, 1, 1) }
expect { site.process }.to_not raise_error
lines = [ | fix tests by mocking Date.today | markets_jekyll-timeago | train | rb |
fe7bbdc6382aeca71544e41c06b212ce1153aa44 | diff --git a/generators/fix-entity/index.js b/generators/fix-entity/index.js
index <HASH>..<HASH> 100644
--- a/generators/fix-entity/index.js
+++ b/generators/fix-entity/index.js
@@ -87,7 +87,7 @@ module.exports = generator.extend({
}
// Add/Change/Keep tableNameDBH
- {
+ const replaceTableName = () => {
const pattern = `"entityTableName": "${this.entityTableName}"`;
const key = 'tableNameDBH';
const oldValue = this.tableNameDBH;
@@ -103,7 +103,8 @@ module.exports = generator.extend({
// We search either for our value or jhipster value, so it works even if user didn't accept JHipster overwrite after a regeneration
jhipsterFunc.replaceContent(files.ORM, `@Table\\(name = "(${this.entityTableName}|${oldValue})`, `@Table(name = "${newValue}`, true);
jhipsterFunc.replaceContent(files.liquibase, `\\<createTable tableName="(${this.entityTableName}|${oldValue})`, `<createTable tableName="${newValue}`);
- }
+ };
+ replaceTableName();
// Add/Change/Keep columnNameDBH for each field
this.columnsInput.forEach((columnItem) => { | assign a block to a function and call it | bastienmichaux_generator-jhipster-db-helper | train | js |
5bcc7745dfd03547ddf2a97b1eda782816c4f47d | diff --git a/tests/testpatch.py b/tests/testpatch.py
index <HASH>..<HASH> 100644
--- a/tests/testpatch.py
+++ b/tests/testpatch.py
@@ -726,8 +726,8 @@ class PatchTest(unittest2.TestCase):
patcher = patch('%s.something' % __name__)
self.assertIs(something, original)
mock = patcher.start()
- self.assertIsNot(mock, original)
try:
+ self.assertIsNot(mock, original)
self.assertIs(something, mock)
finally:
patcher.stop()
@@ -746,8 +746,8 @@ class PatchTest(unittest2.TestCase):
patcher = patch.object(PTModule, 'something', 'foo')
self.assertIs(something, original)
replaced = patcher.start()
- self.assertEqual(replaced, 'foo')
try:
+ self.assertEqual(replaced, 'foo')
self.assertIs(something, replaced)
finally:
patcher.stop()
@@ -761,9 +761,10 @@ class PatchTest(unittest2.TestCase):
self.assertEqual(d, original)
patcher.start()
- self.assertEqual(d, {'spam': 'eggs'})
-
- patcher.stop()
+ try:
+ self.assertEqual(d, {'spam': 'eggs'})
+ finally:
+ patcher.stop()
self.assertEqual(d, original) | Some test fixes to always clean up patches | testing-cabal_mock | train | py |
5e021c793a9b8f3a85ecf61b14512c14d63029ba | diff --git a/lib/bson/array.rb b/lib/bson/array.rb
index <HASH>..<HASH> 100644
--- a/lib/bson/array.rb
+++ b/lib/bson/array.rb
@@ -73,11 +73,11 @@ module BSON
# @example Convert the array to a normalized value.
# array.to_bson_normalized_value
#
- # @return [ Array ] The normazlied array.
+ # @return [ Array ] The normalized array.
#
# @since 3.0.0
def to_bson_normalized_value
- map!{ |value| value.to_bson_normalized_value }
+ map { |value| value.to_bson_normalized_value }
end
module ClassMethods
diff --git a/spec/bson/array_spec.rb b/spec/bson/array_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/bson/array_spec.rb
+++ b/spec/bson/array_spec.rb
@@ -29,6 +29,19 @@ describe Array do
it_behaves_like "a deserializable bson element"
end
+ describe "#to_bson_normalized_value" do
+
+ let(:klass) { Class.new(Hash) }
+ let(:obj) {[ Foo.new ]}
+
+ before(:each) { stub_const "Foo", klass }
+
+ it "does not mutate the receiver" do
+ obj.to_bson_normalized_value
+ expect(obj.first.class).to eq(Foo)
+ end
+ end
+
describe "#to_bson_object_id" do
context "when the array has 12 elements" do | RUBY-<I> Array#to_bson_normalized_value shouldn't mutate the receiver
Ref. <URL> | mongodb_bson-ruby | train | rb,rb |
ce10d320c42a3b081856f9255f382cfb9820c5a7 | diff --git a/spacy/language.py b/spacy/language.py
index <HASH>..<HASH> 100644
--- a/spacy/language.py
+++ b/spacy/language.py
@@ -239,7 +239,7 @@ class Language(object):
if not hasattr(component, '__call__'):
msg = ("Not a valid pipeline component. Expected callable, but "
"got {}. ".format(repr(component)))
- if component in self.factories.keys():
+ if component in self.factories:
msg += ("If you meant to add a built-in component, use "
"create_pipe: nlp.add_pipe(nlp.create_pipe('{}'))"
.format(component)) | Fix component check in self.factories (see #<I>) | explosion_spaCy | train | py |
c186fba2414649bc6cae7a64231e73b4f4879bda | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -35,6 +35,7 @@ setup(
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
'Topic :: Utilities',
],
) | Mark Python <I> support in setup.py | zsiciarz_django-pgallery | train | py |
a2bd510ccc4d7f4324a22bae1e2ccf1579500806 | diff --git a/Route.php b/Route.php
index <HASH>..<HASH> 100755
--- a/Route.php
+++ b/Route.php
@@ -263,7 +263,9 @@ class Route
continue;
}
- $mapValue = (is_array($mapValue) && isset($mapValue["to"])) ? $mapValue["to"] : "";
+ if (is_array($mapValue)) {
+ $mapValue = isset($mapValue["to"]) ? $mapValue["to"] : "";
+ }
if (! empty($mapValue)) {
foreach ($parameters as $key => $value) { | Little fix for when mapping was defined only with transform action | phpalchemy_phpalchemy | train | php |
5d8559495a4aac15a0af978cbd89496ee6106b60 | diff --git a/lib/utils/write.js b/lib/utils/write.js
index <HASH>..<HASH> 100644
--- a/lib/utils/write.js
+++ b/lib/utils/write.js
@@ -13,7 +13,9 @@ const co = Promise.coroutine;
* @param {String} data The data to write.
*/
module.exports = co(function * (file, data) {
- file = p.normalize(file);
- yield mkdirp(p.dirname(file));
- yield write(file, data);
+ try {
+ file = p.normalize(file);
+ yield mkdirp(p.dirname(file));
+ yield write(file, data);
+ } catch (_) {}
});
diff --git a/test/utils.js b/test/utils.js
index <HASH>..<HASH> 100644
--- a/test/utils.js
+++ b/test/utils.js
@@ -66,6 +66,10 @@ test('utils.write', co(function * (t) {
const done = yield $.write(file, demo);
t.equal(done, undefined, 'returns nothing');
+ yield $.write(nest, demo);
+ const nada = yield $.read(nest);
+ t.equal(nada, null, 'does not attempt to write to directory');
+
const seek = yield $.find(file);
t.true(seek && seek.length, 'creates the file, including sub-dirs'); | wrap $.write in try/catch; prevent ESDIR error | lukeed_taskr | train | js,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.