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
|
|---|---|---|---|---|---|
d107a4dbeac95317b89a544cbc4c56d92c479a00
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -5,15 +5,13 @@
from setuptools import setup, find_packages
-with open('README.md') as readme_file:
+with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
-requirements = [
- "RPi.GPIO"
-]
+requirements = []
setup_requirements = []
|
changed the Readme back to .rst
|
mpibpc-mroose_hx711
|
train
|
py
|
0a5ba7faa40a604fffce135c09e20cf2042cb288
|
diff --git a/spyderlib/utils/external/path.py b/spyderlib/utils/external/path.py
index <HASH>..<HASH> 100644
--- a/spyderlib/utils/external/path.py
+++ b/spyderlib/utils/external/path.py
@@ -62,7 +62,6 @@ _base = str
_getcwd = os.getcwd
try:
if os.path.supports_unicode_filenames:
- import locale
_base = unicode
_getcwd = os.getcwdu
except AttributeError:
|
External path library: Remove unneeded import which was causing a crash after last update
|
spyder-ide_spyder
|
train
|
py
|
5f9c67b9498c9cf488dde28738845609152ce8d3
|
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
@@ -38,9 +38,11 @@ def delete_generated_files test_case, example=nil
Dir.chdir(dir) do
[
"#{test_case}.c", "#{test_case}.so", "Makefile",
- "extconf.rb" , "#{test_case}.o"
+ "extconf.rb" , "#{test_case}.o", "#{test_case}.bundle",
+ "#{test_case}.dll"
+
].each do |f|
- FileUtils.rm f
+ FileUtils.rm(f) if File.exist?(f)
end
end
end
|
allow support for .bundle files and .dll files teardown in specs
|
SciRuby_rubex
|
train
|
rb
|
3c52b872d7e3e004ff0e8c6b2e5db82fbc939517
|
diff --git a/spec/actv/asset_spec.rb b/spec/actv/asset_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/actv/asset_spec.rb
+++ b/spec/actv/asset_spec.rb
@@ -1,5 +1,4 @@
require 'spec_helper'
-require 'pry'
describe ACTV::Asset do
|
Removes pry from asset spec
|
activenetwork_actv
|
train
|
rb
|
75463d389db446725c1420a19f2cf6a5486c70b3
|
diff --git a/spec/functional/chef/source/git_spec.rb b/spec/functional/chef/source/git_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/functional/chef/source/git_spec.rb
+++ b/spec/functional/chef/source/git_spec.rb
@@ -263,11 +263,11 @@ module Librarian
end
context "if the path option is right" do
- let(:repo_path) { tmp_path.join('repo/resolve') }
+ let(:repo_path) { tmp_path.join("repo/resolve") }
before do
repo_path.rmtree if repo_path.exist?
repo_path.mkpath
- repo_path.join('cookbooks').mkpath
+ repo_path.join("cookbooks").mkpath
cheffile = Helpers.strip_heredoc(<<-CHEFFILE)
#!/usr/bin/env ruby
cookbook "sample",
|
Use double-quoted string literals by convention.
|
applicationsonline_librarian
|
train
|
rb
|
c8cb3dfb5ee686381cf11caa610f2c955c03a677
|
diff --git a/tests/test_bot_get.py b/tests/test_bot_get.py
index <HASH>..<HASH> 100644
--- a/tests/test_bot_get.py
+++ b/tests/test_bot_get.py
@@ -16,7 +16,8 @@ from .test_bot import TestBot
from .test_variables import (TEST_CAPTION_ITEM, TEST_COMMENT_ITEM,
TEST_PHOTO_ITEM, TEST_SEARCH_USERNAME_ITEM,
TEST_USER_ITEM, TEST_USERNAME_INFO_ITEM,
- TEST_TIMELINE_PHOTO_ITEM, TEST_USER_TAG_ITEM)
+ TEST_TIMELINE_PHOTO_ITEM, TEST_USER_TAG_ITEM,
+ TEST_MEDIA_LIKER)
class TestBotGet(TestBot):
|
Added TEST_MEDIA_LIKER
|
instagrambot_instabot
|
train
|
py
|
d2b67a7b823d7c703c607f68bb15982d53e2dca5
|
diff --git a/lib/twitter4j4r/client.rb b/lib/twitter4j4r/client.rb
index <HASH>..<HASH> 100644
--- a/lib/twitter4j4r/client.rb
+++ b/lib/twitter4j4r/client.rb
@@ -1,5 +1,3 @@
-require 'jruby/core_ext'
-
require 'jar/twitter4j-core-2.2.6.jar'
require 'jar/twitter4j-stream-2.2.6.jar'
require 'jar/twitter4j-async-2.2.6.jar'
@@ -33,7 +31,6 @@ module Twitter4j4r
end
def start(search_terms)
- Listener.become_java!
@stream.addListener(Listener.new(self, @status_block, @exception_block, @limitation_block))
@stream.filter(Java::Twitter4j::FilterQuery.new(0, nil, search_terms.to_java(:string)))
end
diff --git a/lib/twitter4j4r/listener.rb b/lib/twitter4j4r/listener.rb
index <HASH>..<HASH> 100644
--- a/lib/twitter4j4r/listener.rb
+++ b/lib/twitter4j4r/listener.rb
@@ -1,4 +1,5 @@
require 'jar/twitter4j-stream-2.2.6.jar'
+require 'jruby/core_ext'
module Twitter4j4r
class Listener
@@ -29,3 +30,5 @@ module Twitter4j4r
end
end
end
+
+Twitter4j4r::Listener.become_java!
|
Move the become_java! call to listener.rb
|
tobias_twitter4j4r
|
train
|
rb,rb
|
76bdde5854de8b3a00f6cf0f6d6b26fd2ae94500
|
diff --git a/src/suggestions.js b/src/suggestions.js
index <HASH>..<HASH> 100644
--- a/src/suggestions.js
+++ b/src/suggestions.js
@@ -19,7 +19,7 @@ function makeSuggestion(queryName, element, content, {variant, name}) {
let warning = ''
const queryOptions = {}
const queryArgs = [
- queryName === 'Role' || queryName === 'TestId'
+ ['Role', 'TestId'].includes(queryName)
? content
: getRegExpMatcher(content),
]
|
chore: Update suggestions.js (#<I>)
|
testing-library_dom-testing-library
|
train
|
js
|
720e45c047dbcf169f2b29696b65a7d4c557f8f3
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -81,7 +81,6 @@ describe("phantom html to pdf", function () {
fs.unlinkSync(filePath);
} catch (e) {
}
- ;
}
}
};
|
Adding empty endline to test file
|
pofider_phantom-html-to-pdf
|
train
|
js
|
64428495195b5ee605d3c65cf6e557e2ff96169a
|
diff --git a/src/you_get/processor/ffmpeg.py b/src/you_get/processor/ffmpeg.py
index <HASH>..<HASH> 100644
--- a/src/you_get/processor/ffmpeg.py
+++ b/src/you_get/processor/ffmpeg.py
@@ -18,11 +18,7 @@ def get_usable_ffmpeg(cmd):
except:
return None
-get_usable_ffmpeg_result = get_usable_ffmpeg('ffmpeg') or get_usable_ffmpeg('avconv')
-if get_usable_ffmpeg_result:
- FFMPEG, FFMPEG_VERSION = get_usable_ffmpeg_result
-else:
- FFMPEG, FFMPEG_VERSION = None, None
+FFMPEG, FFMPEG_VERSION = get_usable_ffmpeg('ffmpeg') or get_usable_ffmpeg('avconv') or (None, None)
def has_ffmpeg_installed():
return FFMPEG is not None
|
set FFMPEG and FFMPEG_VERSION gracefully
|
soimort_you-get
|
train
|
py
|
5f38d4f0869ef04b155c2b454da40346b91af273
|
diff --git a/examples/s3/presignedpostpolicy.go b/examples/s3/presignedpostpolicy.go
index <HASH>..<HASH> 100644
--- a/examples/s3/presignedpostpolicy.go
+++ b/examples/s3/presignedpostpolicy.go
@@ -51,5 +51,4 @@ func main() {
fmt.Printf("-F %s=%s ", k, v)
}
fmt.Printf("-F file=@/etc/passwd ")
- fmt.Printf(config.Endpoint + "/mybucket\n")
}
|
Update presignedpostpolicy.go
|
minio_minio-go
|
train
|
go
|
a7fa1143ac68a431b56169d957735748fdc41210
|
diff --git a/public/suite.js b/public/suite.js
index <HASH>..<HASH> 100644
--- a/public/suite.js
+++ b/public/suite.js
@@ -120,6 +120,7 @@
out.sourceURL = err.sourceURL
out.message = err.message
out.assertion = err.assertion
+ out.elapsed = err.elapsed
} else {
out = {pass:true}
}
@@ -132,7 +133,7 @@
message: err_name
, sourceURL: script
, lineNumber: line
- , assertion: is_assert
+ , assertion: is_assert
})
test.emit('end')
}
@@ -251,19 +252,23 @@
function suite(name, fn) {
var test_suite = new TestSuite(name)
, name = 'test-module-'+(+new Date())
+ , now = +new Date()
, timeout
__c__.attach(test_suite)
window.onerror = function(err_name, script, line) {
// errors at this point are probably syntax errors.
- console.log(err_name, script, line)
+
+ err_name.elapsed = +new Date() - now
+
test_suite.push_update(test_suite.urls.error)
- test_suite.add_result({name:name}, 'error', {
+ test_suite.add_result({name:name}, 'error', typeof err_name === 'string' ? {
message: err_name
, sourceURL: script
, line: line
- })
+ , elapsed: +new Date() - now
+ } : err_name)
test_suite.finish()
}
|
making require.js-based errors a little bit more parse-able
|
urbanairship_drive.js
|
train
|
js
|
26a2283d591bcadb985b2932b989a91c2d4a84b5
|
diff --git a/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py b/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py
index <HASH>..<HASH> 100644
--- a/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py
+++ b/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py
@@ -128,7 +128,7 @@ class LinkedCloneArtifactHandler(object):
folder = self.pv_service.get_folder(self.si, path)
if not folder:
self.logger.info('Could not find folder: {0}'.format(path))
- result = 'Could not find folder {0}'.format(path)
+ result = SUCCESS
else:
self.logger.info('Found folder: {0}'.format(path))
result = self.folder_manager.delete_folder(folder, self.logger)
|
dont fail delete saved if folder not found
|
QualiSystems_vCenterShell
|
train
|
py
|
a0ade1ef53cc410582ff1eedc7a0dcf4a94b5edb
|
diff --git a/Controller/Toolkit.php b/Controller/Toolkit.php
index <HASH>..<HASH> 100644
--- a/Controller/Toolkit.php
+++ b/Controller/Toolkit.php
@@ -256,7 +256,8 @@ class sb_Controller_Toolkit extends sb_Controller{
$protocol = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http';
- $str = "var sbBase = '".$protocol."://".Gateway::$http_host."/surebert/load/';\n";
+
+ $str = "if(!sbBase){var sbBase = '".$protocol."://".Gateway::$http_host."/surebert/load/';}\n";
$surebert = array_merge($surebert, $this->request->args);
$str .= $this->concat_files($surebert, $version);
|
only defines sbBase if not defined already
|
surebert_surebert-framework
|
train
|
php
|
455c36654fdaa53a4425fc550014a2365c0951de
|
diff --git a/lib/datalib.php b/lib/datalib.php
index <HASH>..<HASH> 100644
--- a/lib/datalib.php
+++ b/lib/datalib.php
@@ -771,13 +771,6 @@ function get_records_sql($sql) {
foreach ($records as $key => $record) {
$objects[$key] = (object) $record;
}
- // log performance info
- if ($rs->RecordCount() > 100
- && !empty($CFG->perfdebug)
- && function_exists('memory_get_usage')) {
- error_log("get_records_sql() in $_SERVER[REQUEST_URI]. Fetched $rs->RecordCount() records. Memory allocated: "
- . memory_get_usage());
- }
return $objects;
} else {
return false;
|
Backed out unrelated block from last commit
|
moodle_moodle
|
train
|
php
|
c4bd6932eb41ccfcf6b7163015cecc13b48ec1b7
|
diff --git a/nexl-client/public/util-functions/nexl-ui.js b/nexl-client/public/util-functions/nexl-ui.js
index <HASH>..<HASH> 100644
--- a/nexl-client/public/util-functions/nexl-ui.js
+++ b/nexl-client/public/util-functions/nexl-ui.js
@@ -82,7 +82,7 @@ var module = (function (module) {
function putDataIntoOutputArea(data) {
if (!isString(data)) {
- data = JSON.stringify(data);
+ data = JSON.stringify(data, null, 4);
}
if (isArray(data)) {
|
- output become formatted in nexl-client;
|
liamray_nexl-engine
|
train
|
js
|
b72cc2a5ee07a9d027bca379264d9c0595507d1f
|
diff --git a/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java b/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java
index <HASH>..<HASH> 100644
--- a/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java
+++ b/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java
@@ -597,10 +597,7 @@ public final class InvoicePaymentControlPluginApi implements PaymentControlPlugi
}
private Invoice getAndSanitizeInvoice(final UUID invoiceId, final InternalCallContext context) throws InvoiceApiException {
- final Invoice invoicePriorRebalancing = invoiceApi.getInvoiceById(invoiceId, context);
- invoiceApi.consumeExistingCBAOnAccountWithUnpaidInvoices(invoicePriorRebalancing.getAccountId(), context);
final Invoice invoice = invoiceApi.getInvoiceById(invoiceId, context);
-
if (checkForIncompleteInvoicePaymentAndRepair(invoice, context)) {
// Fetch new repaired 'invoice'
return invoiceApi.getInvoiceById(invoiceId, context);
|
payment: Optimize priorCall to avoid unnecessary logic and limit # invoice queries. See #<I>
|
killbill_killbill
|
train
|
java
|
6c5ac236c5f7e813573461a3896ebfdd0e5f99e7
|
diff --git a/libs/verysimple/Phreeze/CriteriaFilter.php b/libs/verysimple/Phreeze/CriteriaFilter.php
index <HASH>..<HASH> 100644
--- a/libs/verysimple/Phreeze/CriteriaFilter.php
+++ b/libs/verysimple/Phreeze/CriteriaFilter.php
@@ -51,7 +51,7 @@ class CriteriaFilter
foreach ($propertyNames as $propName)
{
$dbfield = $criteria->GetFieldFromProp($propName);
- $where .= $orDelim . $dbfield ." like '". $criteria->Escape($this->Value) . "'";
+ $where .= $orDelim . $criteria->Escape($dbfield) ." like '". $criteria->Escape($this->Value) . "'";
$orDelim = ' or ';
}
$where .= ') ';
|
criteria filter now sql escapes column/property names
|
jasonhinkle_phreeze
|
train
|
php
|
dee437229e4a036bc8b519bc8288c2456b64a0fa
|
diff --git a/lib/commands/touch.js b/lib/commands/touch.js
index <HASH>..<HASH> 100644
--- a/lib/commands/touch.js
+++ b/lib/commands/touch.js
@@ -27,7 +27,7 @@ commands.performActions = async function (actions) {
}
} : {}));
this.log.debug(`Preprocessed actions: ${JSON.stringify(preprocessedActions, null, ' ')}`);
- return await this.uiautomator2.jwproxy.command('/actions', 'POST', {actions});
+ return await this.uiautomator2.jwproxy.command('/actions', 'POST', {actions: preprocessedActions});
};
Object.assign(extensions, commands);
|
fix: wrong parameter in performActions (#<I>)
ActionChains in selenium have a PointerInput whose kind(pointerType) is
"mouse".
We should change this to "touch" for android devices to work properly.
(I confired "mouse" doesn't work and "touch" works.)
There is code for converting "mouse" to "touch" ("preprocessedActions")
But wrong old variable was used.
|
appium_appium-uiautomator2-driver
|
train
|
js
|
47ec7969fb58fa8a12cff301e481ae21c9d5b5e1
|
diff --git a/pyramid_multiauth/__init__.py b/pyramid_multiauth/__init__.py
index <HASH>..<HASH> 100644
--- a/pyramid_multiauth/__init__.py
+++ b/pyramid_multiauth/__init__.py
@@ -261,9 +261,19 @@ def policy_factory_from_module(config, module):
# Find the most recent IAuthenticationPolicy action, and grab
# out the registering function so we can call it ourselves.
for action in reversed(config.action_state.actions):
- if action[0] is not IAuthenticationPolicy:
+ # Extract the discriminator and callable. This is complicated by
+ # Pyramid 1.3 changing action from a tuple to a dict.
+ try:
+ discriminator = action["discriminator"]
+ callable = action["callable"]
+ except TypeError: # pragma: nocover
+ discriminator = action[0] # pragma: nocover
+ callable = action[1] # pragma: nocover
+ # If it's not setting the authn policy, keep looking.
+ if discriminator is not IAuthenticationPolicy:
continue
- def grab_policy(register=action[1]): # NOQA
+ # Otherwise, wrap it up so we can extract the registered object.
+ def grab_policy(register=callable): # NOQA
old_policy = config.registry.queryUtility(IAuthenticationPolicy)
register()
new_policy = config.registry.queryUtility(IAuthenticationPolicy)
|
Compatability with Pyramid <I>.
Pyramid <I> changes the API of the internal ActionState object, which
pyramid_multiauth uses for deep introspection. This patch tries the
<I> API first and falls back to the previous API if that fails.
|
mozilla-services_pyramid_multiauth
|
train
|
py
|
84bc8f1e26ceaac58029292161881eb614e36ff4
|
diff --git a/lib/actions/field-trip.js b/lib/actions/field-trip.js
index <HASH>..<HASH> 100644
--- a/lib/actions/field-trip.js
+++ b/lib/actions/field-trip.js
@@ -234,7 +234,7 @@ export function addFieldTripNote(request, note, intl) {
}
/**
- * Updates a particular field/set of fields of a given field trip request.
+ * Invokes OTP Datatstore to update a field trip request or its related notes or itineraries.
*/
function updateFieldTripRequest(
request,
|
refactor(actions/field-trip): Tweak comment.
|
opentripplanner_otp-react-redux
|
train
|
js
|
ef48c4925652b1ab8a56b7af2b72b21a202b6259
|
diff --git a/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java b/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java
+++ b/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java
@@ -10,9 +10,13 @@ import static net.fortuna.ical4j.validate.ValidationRule.ValidationType.OneOrLes
* Created by fortuna on 13/09/15.
*/
public class DefaultCalendarValidatorFactory implements CalendarValidatorFactory {
+
+ private static final ValidationRule REQUIRED_PROPERTIES_RULE = new ValidationRule(One, PRODID, VERSION);
+ private static final ValidationRule OPTIONAL_PROPERTIES_RULE = new ValidationRule(OneOrLess, CALSCALE, METHOD);
+
@Override
public Validator<Calendar> newInstance() {
- return new CalendarValidatorImpl(new ValidationRule(One, PRODID, VERSION),
- new ValidationRule(OneOrLess, CALSCALE, METHOD));
+ return new CalendarValidatorImpl(REQUIRED_PROPERTIES_RULE,
+ OPTIONAL_PROPERTIES_RULE);
}
}
|
Extract constant rules in DefaultCalendarValidatorFactory
Reduces memory footprint & garbage collection.
gh-<I>
|
ical4j_ical4j
|
train
|
java
|
5b98b736c62c9056ebcce836c968ac73c43e231a
|
diff --git a/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb b/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb
index <HASH>..<HASH> 100644
--- a/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb
+++ b/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb
@@ -31,7 +31,11 @@ module Elasticsearch
Actions.send(m, self, options)
end
- output.compact.join("\n")
+ unless output.compact.empty?
+ output.compact.join("\n")
+ else
+ self.respond_to?(:awesome_inspect) ? self.awesome_inspect : self.inspect
+ end
end
end
|
[EXT] Added, that ANSI extension uses the `awesome_print` gem for "unknown" handlers
|
elastic_elasticsearch-ruby
|
train
|
rb
|
37fa0e7531fbd240131d498f43436aafd4393149
|
diff --git a/distutils/tests/test_msvccompiler.py b/distutils/tests/test_msvccompiler.py
index <HASH>..<HASH> 100644
--- a/distutils/tests/test_msvccompiler.py
+++ b/distutils/tests/test_msvccompiler.py
@@ -110,6 +110,26 @@ class TestSpawn(unittest.TestCase):
thread.join()
assert all(threads)
+ def test_concurrent_safe_fallback(self):
+ """
+ If CCompiler.spawn has been monkey-patched without support
+ for an env, it should still execute.
+ """
+ import distutils._msvccompiler as _msvccompiler
+ from distutils import ccompiler
+ compiler = _msvccompiler.MSVCCompiler()
+ compiler._paths = "expected"
+
+ def CCompiler_spawn(self, cmd):
+ "A spawn without an env argument."
+ assert os.environ["PATH"] == "expected"
+
+ with unittest.mock.patch.object(
+ ccompiler.CCompiler, 'spawn', CCompiler_spawn):
+ compiler.spawn(["n/a"])
+
+ assert os.environ.get("PATH") != "expected"
+
def test_suite():
return unittest.makeSuite(msvccompilerTestCase)
|
Add test capturing failed expectation. Ref pypa/distutils#<I>.
|
pypa_setuptools
|
train
|
py
|
81d6287ac876ab2e1fff99add5f80675014eba2f
|
diff --git a/patreon/schemas/goal_spec.py b/patreon/schemas/goal_spec.py
index <HASH>..<HASH> 100644
--- a/patreon/schemas/goal_spec.py
+++ b/patreon/schemas/goal_spec.py
@@ -26,9 +26,7 @@ def test_schema_attributes_are_properly_formatted(attributes):
def test_schema_relationships_are_properly_formatted(relationships):
- for relationship_name in relationships:
- value = getattr(goal.Relationships, relationship_name, None)
- assert value is not None and value is relationship_name
+ assert len(relationships) is 0
def test_schema_has_expected_default_attributes():
@@ -40,4 +38,4 @@ def test_schema_has_expected_default_attributes():
def test_schema_has_expected_default_relationships():
- assert goal.default_relationships == []
+ assert len(goal.default_relationships) is 0
|
Modify goal spec to check for empty list since that's what we have.
|
Patreon_patreon-python
|
train
|
py
|
bf18ae937632398f46fe943c3964b38bd3ba900a
|
diff --git a/lib/stripe/util.rb b/lib/stripe/util.rb
index <HASH>..<HASH> 100644
--- a/lib/stripe/util.rb
+++ b/lib/stripe/util.rb
@@ -124,7 +124,7 @@ module Stripe
when NilClass
{}
when String
- {api_key: opts}
+ {:api_key => opts}
when Hash
opts.clone
else
|
Fix use of <I>-style hashes
|
stripe_stripe-ruby
|
train
|
rb
|
5c755ca13a59fa504a374989c5994e6c60a2c086
|
diff --git a/models/classes/class.TestsService.php b/models/classes/class.TestsService.php
index <HASH>..<HASH> 100644
--- a/models/classes/class.TestsService.php
+++ b/models/classes/class.TestsService.php
@@ -91,7 +91,7 @@ class taoTests_models_classes_TestsService
* @author Joel Bout, <joel@taotesting.com>
* @return core_kernel_classes_Class
*/
- public function getRootclass()
+ public function getRootClass()
{
return $this->getClass(TaoOntology::CLASS_URI_TEST);
}
|
TAO-<I> - The GetRootclass renamed to GetRootClass
|
oat-sa_extension-tao-test
|
train
|
php
|
37ee0c623e392895086377d862d9476096a5c6ce
|
diff --git a/src/frontend/org/voltdb/export/ExportGeneration.java b/src/frontend/org/voltdb/export/ExportGeneration.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/export/ExportGeneration.java
+++ b/src/frontend/org/voltdb/export/ExportGeneration.java
@@ -115,6 +115,7 @@ public class ExportGeneration implements Generation {
@Override
public void run() {
final HostMessenger messenger = ExportManager.instance().getHostMessenger();
+ // We need this null check for tests which TestExportGeneration without messenger.
if (messenger != null) {
for (Map.Entry<Integer, String> entry : m_partitionLeaderZKName.entrySet()) {
messenger.getZK().delete(
@@ -746,6 +747,7 @@ public class ExportGeneration implements Generation {
private void cleanup(final HostMessenger messenger) {
shutdown = true;
+ //We need messenger NULL guard for tests.
if (m_mbox != null && messenger != null) {
for (Integer partition : m_dataSourcesByPartition.keySet()) {
final String partitionDN = m_mailboxesZKPath + "/" + partition;
|
ENG-<I>-<I>: Add comments
|
VoltDB_voltdb
|
train
|
java
|
370899e1fc9335624ba9858196caa904fed8a41e
|
diff --git a/jsoncmd.go b/jsoncmd.go
index <HASH>..<HASH> 100644
--- a/jsoncmd.go
+++ b/jsoncmd.go
@@ -5960,7 +5960,7 @@ func (cmd *SignMessageCmd) UnmarshalJSON(b []byte) error {
// RawTxInput models the data needed for a raw tx input.
type RawTxInput struct {
Txid string `json:"txid"`
- Vout int `json:"vout"`
+ Vout uint32 `json:"vout"`
ScriptPubKey string `json:"scriptPubKey"`
RedeemScript string `json:"redeemScript"`
}
|
Change RawTxInput.Vout to uint<I> as well.
This was missed by the previous commit.
|
btcsuite_btcd
|
train
|
go
|
ec7d6349d53ed68853eb1f7713fc6906201fcee4
|
diff --git a/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java b/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java
index <HASH>..<HASH> 100644
--- a/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java
+++ b/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java
@@ -31,19 +31,19 @@ public class QueryImpl<E extends Entity> implements Query<E>
private Repository<E> repository;
- public static Query<Entity> query()
+ public static <T extends Entity> Query<T> query()
{
return new QueryImpl<>();
}
- public static Query<Entity> EQ(String attributeName, Object value)
+ public static <T extends Entity> Query<T> EQ(String attributeName, Object value)
{
- return query().eq(attributeName, value);
+ return QueryImpl.<T>query().eq(attributeName, value);
}
- public static Query<Entity> IN(String attributeName, Iterable<?> values)
+ public static <T extends Entity> Query<T> IN(String attributeName, Iterable<?> values)
{
- return query().in(attributeName, values);
+ return QueryImpl.<T>query().in(attributeName, values);
}
public QueryImpl()
|
[REFACTOR] Make QueryImpl EQ, IN and query methods generic.
|
molgenis_molgenis
|
train
|
java
|
6a5145a04f1c7f671620c0146a2ce0241afee60c
|
diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py
index <HASH>..<HASH> 100644
--- a/pkg_resources/extern/__init__.py
+++ b/pkg_resources/extern/__init__.py
@@ -29,7 +29,10 @@ class VendorImporter:
for prefix in self.search_path:
try:
__import__(prefix + target)
- mod = sys.modules[fullname] = sys.modules.pop(prefix + target)
+ mod = sys.modules[prefix + target]
+ sys.modules[fullname] = mod
+ if sys.version_info > (3, 3):
+ del sys.modules[prefix + target]
return mod
except ImportError:
pass
|
Based on experimentation, the canonical module name needs to be in sys.modules on Python prior to <I>, but must be omitted on Python <I> and later.
--HG--
branch : feature/issue-<I>
|
pypa_setuptools
|
train
|
py
|
39dd55752f952460478cfdd80b4cb221144c5680
|
diff --git a/source/org/jasig/portal/security/md5passwd.java b/source/org/jasig/portal/security/md5passwd.java
index <HASH>..<HASH> 100644
--- a/source/org/jasig/portal/security/md5passwd.java
+++ b/source/org/jasig/portal/security/md5passwd.java
@@ -4,7 +4,7 @@
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *u
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
@@ -73,6 +73,12 @@ public class md5passwd {
String spass;
int cnt = 0;
+ // Make sure user is specified correctly
+ if (user == null || user.trim().length() <= 0) {
+ System.out.println("You did not specify a valid user name. Please try again.");
+ System.exit(0);
+ }
+
// Check to see if the user exists
conn = rdbm.getConnection();
@@ -95,6 +101,7 @@ public class md5passwd {
r.nextBytes(rnd);
md.update(rnd);
System.out.print("Enter Password for " + user + ": ");
+ System.out.flush(); // Needed for prompt to appear when running from Ant.
BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
spass = d.readLine();
hash = md.digest(spass.getBytes());
|
Made some minor adjustments so that md5passwd can be run from Ant.
git-svn-id: <URL>
|
Jasig_uPortal
|
train
|
java
|
70b0386274cccee29ce814bfd0943e0b03c48d67
|
diff --git a/lib/beaker-vagrant/version.rb b/lib/beaker-vagrant/version.rb
index <HASH>..<HASH> 100644
--- a/lib/beaker-vagrant/version.rb
+++ b/lib/beaker-vagrant/version.rb
@@ -1,3 +1,3 @@
module BeakerVagrant
- VERSION = '0.6.4'
+ VERSION = '0.6.5'
end
|
(GEM) update beaker-vagrant version to <I>
|
puppetlabs_beaker-vagrant
|
train
|
rb
|
81d190aab4c94b9e01bbdc8af223cd0750d0ef58
|
diff --git a/app/controllers/effective/regions_controller.rb b/app/controllers/effective/regions_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/effective/regions_controller.rb
+++ b/app/controllers/effective/regions_controller.rb
@@ -4,6 +4,8 @@ module Effective
layout false
before_filter :authenticate_user! if defined?(Devise)
+ skip_log_page_views :quiet => true, :only => [:snippet, :snippets, :templates] if defined?(EffectiveLogging)
+
skip_before_filter :verify_authenticity_token, :only => [:update]
def edit
diff --git a/lib/effective_regions/version.rb b/lib/effective_regions/version.rb
index <HASH>..<HASH> 100644
--- a/lib/effective_regions/version.rb
+++ b/lib/effective_regions/version.rb
@@ -1,3 +1,3 @@
module EffectiveRegions
- VERSION = "0.3.12"
+ VERSION = "0.3.13"
end
|
skip_log_page_views if EffectiveLogging is installed. Version <I>
|
code-and-effect_effective_regions
|
train
|
rb,rb
|
aaf412259a358238e25af7c4053983719945f064
|
diff --git a/packages/lingui-react/src/I18nProvider.js b/packages/lingui-react/src/I18nProvider.js
index <HASH>..<HASH> 100644
--- a/packages/lingui-react/src/I18nProvider.js
+++ b/packages/lingui-react/src/I18nProvider.js
@@ -28,9 +28,13 @@ class I18nManager {
development?: Object,
i18n?: I18n
}) {
- this.i18n = i18n || new I18n(language, messages, languageData)
+ this.i18n = i18n || new I18n()
if (development) this.i18n.development(development)
+
+ if (messages) this.i18n.load(messages)
+ if (languageData) this.i18n.loadLanguageData(languageData)
+ this.i18n.activate(language)
}
subscribe = (callback: Function) => {
diff --git a/packages/lingui-react/src/dev/index.js b/packages/lingui-react/src/dev/index.js
index <HASH>..<HASH> 100644
--- a/packages/lingui-react/src/dev/index.js
+++ b/packages/lingui-react/src/dev/index.js
@@ -1,4 +1,3 @@
// Most React projects will import everything from lingui-react module.
// Reexport dev from lingui-i18n to make it easier.
export { default } from 'lingui-i18n/dev'
-
|
fix: Load messages after dev data are setup
|
lingui_js-lingui
|
train
|
js,js
|
b92f1e13d0d9a02203b9bbd6c62d09cced7eb138
|
diff --git a/raiden/transfer/mediated_transfer/initiator.py b/raiden/transfer/mediated_transfer/initiator.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/mediated_transfer/initiator.py
+++ b/raiden/transfer/mediated_transfer/initiator.py
@@ -273,7 +273,7 @@ def send_lockedtransfer(
# amount, as a guarantee to the mediator that the fee will be claimable
# on-chain.
total_amount = PaymentWithFeeAmount(
- transfer_description.amount + route_states[0].estimated_fee # FIXME
+ transfer_description.amount + route_state.estimated_fee
)
lockedtransfer_event = channel.send_lockedtransfer(
|
Fix fee calculation in `send_lockedtransfer`
|
raiden-network_raiden
|
train
|
py
|
6f671bb7871b1cb40db9b7eef2a8595d11825e07
|
diff --git a/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb b/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
+++ b/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb
@@ -5,7 +5,11 @@ module Katello
def prepare_host
if params['uuid']
- @host = Katello::Host::SubscriptionFacet.find_by(uuid: params['uuid']).host
+ @host = Katello::Host::SubscriptionFacet.find_by(uuid: params['uuid'])&.host
+ if @host.nil?
+ msg = N_("Host was not found by the subscription UUID: '%s', this can happen if the host is registered already, but not to this Foreman") % params['uuid']
+ fail ActiveRecord::RecordNotFound, msg
+ end
@host.assign_attributes(host_params('host'))
@host.save!
else
|
Fixes #<I> - Global Registration fails when host not found (#<I>)
Fix for case, when the host is already registered by
subscription-manager, but does not exists in Foreman.
|
Katello_katello
|
train
|
rb
|
c1e60a0abdb4fd6d5e2fa6874b0bc3354d397439
|
diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Installer/LibraryInstaller.php
+++ b/src/Composer/Installer/LibraryInstaller.php
@@ -268,7 +268,7 @@ class LibraryInstaller implements InstallerInterface
}
// attempt removing the bin dir in case it is left empty
- if ($this->filesystem->isDirEmpty($this->binDir)) {
+ if ((is_dir($this->binDir)) && ($this->filesystem->isDirEmpty($this->binDir))) {
@rmdir($this->binDir);
}
}
|
Ensure the bin directory exists before checking empty
Line <I> has similar logic so avoided doing the check withiin `isDirEmpty()`
|
composer_composer
|
train
|
php
|
302e6218bb4641be34b2327e094b080cf5f58ca7
|
diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php
+++ b/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php
@@ -94,7 +94,7 @@ class MergeSharedEntitiesTest extends OrmFunctionalTestCase
/**
* @group DDC-2704
*/
- public function testMergeInheritedTransientProperties()
+ public function testMergeInheritedTransientPrivateProperties()
{
$admin1 = new MSEAdmin();
$admin2 = new MSEAdmin();
|
DDC-<I> - renaming test case for clarity
|
doctrine_orm
|
train
|
php
|
39bbe14a8d5a4c183cb52539f8c748d97f50480b
|
diff --git a/lib/array_logic/version.rb b/lib/array_logic/version.rb
index <HASH>..<HASH> 100644
--- a/lib/array_logic/version.rb
+++ b/lib/array_logic/version.rb
@@ -1,3 +1,3 @@
module ArrayLogic
- VERSION = "0.0.6"
+ VERSION = "0.1.0"
end
|
Moved to beta version <I>
|
reggieb_array_logic
|
train
|
rb
|
de9a871e2caa7aad84214c9144624e7044dc1780
|
diff --git a/src/geo/leaflet/leaflet.js b/src/geo/leaflet/leaflet.js
index <HASH>..<HASH> 100644
--- a/src/geo/leaflet/leaflet.js
+++ b/src/geo/leaflet/leaflet.js
@@ -271,7 +271,14 @@
},
invalidateSize: function() {
- this.map_leaflet.invalidateSize({ pan: false});
+ // there is a race condition in leaflet. If size is invalidated
+ // and at the same time the center is set the final center is displaced
+ // so set pan to false so the map is not moved and then force the map
+ // to be at the place it should be
+ this.map_leaflet.invalidateSize({ pan: false })//, animate: false });
+ this.map_leaflet.setView(this.map.get("center"), this.map.get("zoom") || 0, {
+ animate: false
+ });
}
}, {
|
fixed problem resizing leaflet layers CDB-<I>
|
CartoDB_carto.js
|
train
|
js
|
667c0832d9a8744917eed9c8bd3374b717a95a85
|
diff --git a/lxd/events/events.go b/lxd/events/events.go
index <HASH>..<HASH> 100644
--- a/lxd/events/events.go
+++ b/lxd/events/events.go
@@ -46,13 +46,13 @@ func (s *Server) AddListener(projectName string, allProjects bool, connection *w
listenerCommon: listenerCommon{
Conn: connection,
messageTypes: messageTypes,
- location: location,
localOnly: localOnly,
ctx: ctx,
ctxCancel: ctxCancel,
id: uuid.New(),
},
+ location: location,
allProjects: allProjects,
projectName: projectName,
}
@@ -178,6 +178,7 @@ func (s *Server) broadcast(event api.Event, isForward bool) error {
type Listener struct {
listenerCommon
+ location string
allProjects bool
projectName string
}
|
lxd/events/events: Server
|
lxc_lxd
|
train
|
go
|
e7dda52d3147ba9155a6957fb8c98fa263f9e0b1
|
diff --git a/canvas_renderer.js b/canvas_renderer.js
index <HASH>..<HASH> 100644
--- a/canvas_renderer.js
+++ b/canvas_renderer.js
@@ -12,6 +12,9 @@ CanvasRenderer.prototype.init = function CanvasRendererInit ()
this.selection_info.setAttribute('class', 'label');
this.selection_info.style.display = 'none';
+ this.tile_min = Point(0, 0);
+ this.tile_max = Point(this.tile_scale, -this.tile_scale);
+
this.initMapHandlers();
};
@@ -272,7 +275,7 @@ CanvasRenderer.prototype.renderTile = function renderTile (tile, context)
var layer = renderer.layers[t];
tile.layers[layer.name].features.forEach(function(feature) {
// Scale mercator coords to tile pixels
- feature.geometry.pixels = this.scaleGeometryToPixels(feature.geometry, tile.min, tile.max);
+ feature.geometry.pixels = this.scaleGeometryToPixels(feature.geometry, renderer.tile_min, renderer.tile_max);
// Draw visible geometry
if (layer.visible != false) {
|
fix canvas renderer to work with locally scaled (0-<I>) tiles
|
tangrams_tangram
|
train
|
js
|
e9027202c5fcd2b140584ab08b9c151ed12449d6
|
diff --git a/sigar_windows.go b/sigar_windows.go
index <HASH>..<HASH> 100644
--- a/sigar_windows.go
+++ b/sigar_windows.go
@@ -181,7 +181,7 @@ func (fs *FileSystemUsage) Get(path string) error {
return fmt.Errorf("FileSystemUsage (%s): %s", path, err)
}
- m := uint64(SectorsPerCluster * BytesPerSector)
+ m := uint64(SectorsPerCluster * BytesPerSector / 1024)
fs.Total = uint64(TotalNumberOfClusters) * m
fs.Free = uint64(NumberOfFreeClusters) * m
fs.Avail = fs.Free
|
windows should return disk stats in KB not bytes
- matches linux behavior
[#<I>]
|
cloudfoundry_gosigar
|
train
|
go
|
8e7ba9367d5be8061b3947639238ec784432546a
|
diff --git a/lavalink/__init__.py b/lavalink/__init__.py
index <HASH>..<HASH> 100644
--- a/lavalink/__init__.py
+++ b/lavalink/__init__.py
@@ -11,4 +11,4 @@ from .enums import NodeState, PlayerState, TrackEndReason, LavalinkEvents
from .rest_api import Track
from . import utils
-__version__ = "0.7.0"
+__version__ = "0.7.1"
diff --git a/lavalink/node.py b/lavalink/node.py
index <HASH>..<HASH> 100644
--- a/lavalink/node.py
+++ b/lavalink/node.py
@@ -323,7 +323,8 @@ class Node:
else:
self.event_handler(op, event, data)
elif op == LavalinkIncomingOp.PLAYER_UPDATE:
- state = PlayerState(**data.get("state"))
+ state = data.get("state", {})
+ state = PlayerState(position=state.get("position", 0), time=state.get("time", 0))
self.event_handler(op, state, data)
elif op == LavalinkIncomingOp.STATS:
stats = Stats(
|
Fix a `TypeError` on incomplete state dict (#<I>)
|
Cog-Creators_Red-Lavalink
|
train
|
py,py
|
e59298e0e4ea686525bc59a9d3bfe8a75f4e2bf2
|
diff --git a/benchmarks/index.js b/benchmarks/index.js
index <HASH>..<HASH> 100644
--- a/benchmarks/index.js
+++ b/benchmarks/index.js
@@ -234,7 +234,7 @@ function startRelay(type) {
'--benchRelayPort', String(self.ports.relayServerPort),
'--traceRelayPort', String(self.ports.relayTraceServerPort),
'--type', type,
- '--instances', String(self.instanceCount),
+ '--instances', type === 'trace-relay' ? '1' : String(self.instanceCount),
self.opts.trace ? '--trace' : '--no-trace',
self.opts.debug ? '--debug' : '--no-debug'
]);
|
multi_bench: do not set multiple instances for trace server
|
uber_tchannel-node
|
train
|
js
|
08315d0078e8c1b39876aa92d09a4e0821ff361a
|
diff --git a/functional/mock_tests.js b/functional/mock_tests.js
index <HASH>..<HASH> 100644
--- a/functional/mock_tests.js
+++ b/functional/mock_tests.js
@@ -6,6 +6,7 @@ var co = require('co'),
exports['Should correctly perform a simple server connection using mock'] = {
metadata: {
requires: {
+ generators: true,
topology: "single"
}
},
@@ -66,6 +67,7 @@ exports['Should correctly perform a simple server connection using mock'] = {
exports['Should correctly connect to a replicaset where the primary hangs causing monitoring thread to hang'] = {
metadata: {
requires: {
+ generators: true,
topology: "single"
}
},
|
Added test support to handle generators test exclusion when runtime does not support them
|
mongodb_node-mongodb-native
|
train
|
js
|
e5d791ef6f03070a8bd67ab3c75397ad74ec23ac
|
diff --git a/config.go b/config.go
index <HASH>..<HASH> 100644
--- a/config.go
+++ b/config.go
@@ -56,7 +56,7 @@ func (b *ggrBrowsers) find(browser, version string, platform string, excludedHos
platform = b.DefaultPlatform
}
for _, v := range b.Versions {
- if strings.HasPrefix(v.Number, version) && strings.HasPrefix(v.Platform, platform) {
+ if strings.HasPrefix(v.Number, version) && (v.Platform == "" || strings.HasPrefix(v.Platform, platform)) {
version = v.Number
next:
for _, r := range v.Regions {
diff --git a/config_test.go b/config_test.go
index <HASH>..<HASH> 100644
--- a/config_test.go
+++ b/config_test.go
@@ -99,7 +99,7 @@ func TestFindDefaultVersion(t *testing.T) {
}
func TestFindVersion(t *testing.T) {
- hosts, version, _ := browsersWithMultipleVersions.find("browser", "1.0", "", newSet(), newSet())
+ hosts, version, _ := browsersWithMultipleVersions.find("browser", "1.0", "LINUX", newSet(), newSet())
AssertThat(t, version, EqualTo{"1.0"})
AssertThat(t, len(hosts), EqualTo{1})
AssertThat(t, hosts[0].Name, EqualTo{"browser-1.0"})
|
Fixed issue with not matched version if XML platform is empty
|
aerokube_ggr
|
train
|
go,go
|
f175a18ff5d7be00a4bde4ac667388c73edea121
|
diff --git a/module/__init__.py b/module/__init__.py
index <HASH>..<HASH> 100644
--- a/module/__init__.py
+++ b/module/__init__.py
@@ -489,8 +489,8 @@ class Connection(object):
buf = Unpacker(e)
return event(buf)
- @ensure_connected
def send_request(self, flags, xcb_parts, xcb_req):
+ self.invalid()
return C.xcb_send_request(self._conn, flags, xcb_parts, xcb_req)
# More backwards compatibility
|
Don't use the decorator to wrap send_request
|
tych0_xcffib
|
train
|
py
|
a911372575792bd471ad9c0dfa458ee611bea14f
|
diff --git a/packages/core/types/index.js b/packages/core/types/index.js
index <HASH>..<HASH> 100644
--- a/packages/core/types/index.js
+++ b/packages/core/types/index.js
@@ -1600,11 +1600,11 @@ export type Optimizer<ConfigType> = {|
*/
export type Compressor = {|
compress({|
- stream: stream$Readable,
+ stream: Readable,
options: PluginOptions,
logger: PluginLogger,
|}): Async<{|
- stream: stream$Readable,
+ stream: Readable,
type?: string,
|}>,
|};
|
Use imported Readable flow type instead of global (#<I>)
|
parcel-bundler_parcel
|
train
|
js
|
0a98dfd0a6989841d03ea514d91fdbbf5623176b
|
diff --git a/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java b/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java
index <HASH>..<HASH> 100644
--- a/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java
+++ b/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java
@@ -43,8 +43,6 @@ public final class LocalTachyonMaster {
// TODO should this be moved to TachyonURI? Prob after UFS supports it
private final String mTachyonHome;
- private final String mDataDir;
- private final String mLogDir;
private final String mHostname;
private final UnderFileSystemCluster mUnderFSCluster;
@@ -68,12 +66,6 @@ public final class LocalTachyonMaster {
throws IOException {
mTachyonHome = tachyonHome;
- mDataDir = path(mTachyonHome, "data");
- mLogDir = path(mTachyonHome, "logs");
-
- UnderFileSystemUtils.mkdirIfNotExists(mDataDir, tachyonConf);
- UnderFileSystemUtils.mkdirIfNotExists(mLogDir, tachyonConf);
-
mHostname = NetworkAddressUtils.getConnectHost(ServiceType.MASTER_RPC, tachyonConf);
// To start the UFS either for integration or unit test. If it targets the unit test, UFS is
|
Remove unused variables in LocalTachyonMaster
|
Alluxio_alluxio
|
train
|
java
|
8119c8f1ccb49d8143946dde0f6e6cf41a804985
|
diff --git a/lib/modules/core/index.js b/lib/modules/core/index.js
index <HASH>..<HASH> 100644
--- a/lib/modules/core/index.js
+++ b/lib/modules/core/index.js
@@ -61,6 +61,10 @@ Archiver.prototype._normalizeSource = function(source) {
return source;
};
+Archiver.prototype._onModuleError = function(err) {
+ this.emit('error', err);
+};
+
Archiver.prototype._onQueueEnd = function() {
if (typeof this._module.finalize === 'function') {
this._module.finalize();
@@ -93,6 +97,7 @@ Archiver.prototype._onQueueError = function(err) {
};
Archiver.prototype._pipeModuleOutput = function() {
+ this._module.on('error', this._onModuleError.bind(this));
this._module.pipe(this);
this._moduleOutputPiped = true;
|
core: catch module errors and bubble them up the chain.
|
archiverjs_node-archiver
|
train
|
js
|
afea9bc0903df1cdfc439f7347f8ddf5fbcfb767
|
diff --git a/inputrules.js b/inputrules.js
index <HASH>..<HASH> 100644
--- a/inputrules.js
+++ b/inputrules.js
@@ -94,13 +94,13 @@ class InputRules {
function getContext(doc, pos) {
let parent = doc.path(pos.path)
- let isPlain = parent.type.plainText
+ let isCode = parent.type.isCode
let textBefore = ""
for (let offset = 0, i = 0; offset < pos.offset;) {
let child = parent.child(i++), size = child.offset
textBefore += offset + size > pos.offset ? child.text.slice(0, pos.offset - offset) : child.text
if (offset + size >= pos.offset) {
- if (child.styles.some(st => st.type.name == "code")) // FIXME generalize?
+ if (child.styles.some(st => st.type.isCode))
isPlain = true
break
}
|
Don't test for code style by name when deciding whether to apply input rules
|
ProseMirror_prosemirror-inputrules
|
train
|
js
|
7e0aa0566fee335d20100e2044d99ad88ae9332c
|
diff --git a/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java b/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java
+++ b/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java
@@ -75,7 +75,7 @@ public abstract class AbstractSyncAsyncMessageBus<T, P extends ISyncAsyncPublica
}
}
});
- dispatcher.setName("Message dispatcher");
+ dispatcher.setName("MsgDispatcher-"+i);
dispatchers.add(dispatcher);
dispatcher.start();
}
|
uniquely name each msg bus dispatcher thread
|
bennidi_mbassador
|
train
|
java
|
de1d4c83380ebcfec0be0943384867902498036d
|
diff --git a/termbox_inputfield.go b/termbox_inputfield.go
index <HASH>..<HASH> 100644
--- a/termbox_inputfield.go
+++ b/termbox_inputfield.go
@@ -141,7 +141,7 @@ func (i *InputField) HandleEvent(event termbox.Event) bool {
}
} else if event.Key == termbox.KeyCtrlU {
// Ctrl+U Clears the Input (before the cursor)
- i.value = i.value[i.cursor:]
+ i.value = i.value[i.cursor+len(i.value):]
} else {
// Get the rune to add to our value. Space and Tab are special cases where
// we can't use the event's rune directly
|
Fix Ctrl+U Behavior (Delete line before cursor)
|
br0xen_termbox-util
|
train
|
go
|
c9155689b1216948a79a6af2cb38ff0f58f3eeb3
|
diff --git a/spec/controller/catch_all_spec.rb b/spec/controller/catch_all_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controller/catch_all_spec.rb
+++ b/spec/controller/catch_all_spec.rb
@@ -94,6 +94,23 @@ describe "Stealth::Controller::CatchAll" do
expect($redis.get(controller.current_session.session_key)).to eq('vader->my_action')
end
+ it "should release the session lock after the maximum number of catch_all levels have been reached" do
+ allow(controller).to receive(:fetch_error_level).and_return(1, 2, 3, 4)
+ session = Stealth::Session.new(id: controller.current_session_id)
+ session.set_session(new_flow: 'vader', new_state: 'my_action')
+ expect(controller).to receive(:release_lock!)
+ controller.run_catch_all
+ controller.run_catch_all
+ controller.run_catch_all
+ controller.run_catch_all
+ end
+
+ it "should release the session lock if the bot does not have a CatchAll flow" do
+ FlowMap.flow_spec[:catch_all] = nil
+ expect(controller).to receive(:release_lock!)
+ controller.run_catch_all
+ end
+
it "should NOT run the catch_all if do_nothing is called" do
controller.current_session.set_session(new_flow: 'vader', new_state: 'my_action3')
controller.action(action: :my_action3)
|
Release the locks after running the catch_all
|
hellostealth_stealth
|
train
|
rb
|
a0c567112f3802694e28489b84c30951fd054217
|
diff --git a/benchexec/tools/symbiotic3.py b/benchexec/tools/symbiotic3.py
index <HASH>..<HASH> 100644
--- a/benchexec/tools/symbiotic3.py
+++ b/benchexec/tools/symbiotic3.py
@@ -82,13 +82,13 @@ class Tool(benchexec.tools.template.BaseTool):
return result.RESULT_TRUE_PROP
elif line == 'UNKNOWN':
return result.RESULT_UNKNOWN
- elif line == 'FALSE':
- return result.RESULT_FALSE_REACH
- elif line == 'FALSE (valid-deref)':
+ elif line.startswith('FALSE (valid-deref)'):
return result.RESULT_FALSE_DEREF
- elif line == 'FALSE (valid-free)':
+ elif line.startswith('FALSE (valid-free)'):
return result.RESULT_FALSE_FREE
- elif line == 'FALSE (valid-memtrack)':
+ elif line.startswith('FALSE (valid-memtrack)'):
return result.RESULT_FALSE_MEMTRACK
+ elif line.startswith('FALSE'):
+ return result.RESULT_FALSE_REACH
return result.RESULT_ERROR
|
symbiotic3.py: fix parsing of result
we can have some more info after the result
(which acts like a garbagge in this case),
so check only for the beginning of the string
|
sosy-lab_benchexec
|
train
|
py
|
b0de0d3f432ecb8c78f88507296b84aa448d683d
|
diff --git a/py/nupic/support/configuration_base.py b/py/nupic/support/configuration_base.py
index <HASH>..<HASH> 100644
--- a/py/nupic/support/configuration_base.py
+++ b/py/nupic/support/configuration_base.py
@@ -389,11 +389,13 @@ class Configuration(object):
configVar = os.environ['NTA_CONF_DIR']
# Return as a list of paths
configPaths = configVar.split(':')
- elif os.path.exists(os.path.join(
- nupic.rootDir, 'conf', 'site', 'default')):
- configPaths = [os.path.join(nupic.rootDir, 'conf', 'site', 'default')]
- else:
+ elif (
+ not os.path.exists(os.path.join(
+ nupic.rootDir, 'conf', 'site', 'default')) and
+ os.path.exists(os.path.join(nupic.rootDir, 'conf', 'default'))):
configPaths = [os.path.join(nupic.rootDir, 'conf', 'default')]
+ else:
+ configPaths = [os.path.join(nupic.rootDir, 'conf', 'site', 'default')]
return configPaths
|
Rearrange configuration defaults to match unit tests.
|
numenta_nupic
|
train
|
py
|
774a8c00063b0038e2530506e00b2df2f7d587e2
|
diff --git a/src/stratum/stratum-messages.js b/src/stratum/stratum-messages.js
index <HASH>..<HASH> 100644
--- a/src/stratum/stratum-messages.js
+++ b/src/stratum/stratum-messages.js
@@ -248,3 +248,22 @@ export function broadcastTx (
onFail
}
}
+
+export function fetchEstimateFee (
+ blocksToBeIncludedIn: string,
+ onDone: (fee: number) => void,
+ onFail: OnFailHandler
+): StratumTask {
+ const method = 'blockchain.estimatefee'
+ return {
+ method,
+ params: [blocksToBeIncludedIn],
+ onDone (reply: any) {
+ if (reply === null || reply === undefined) {
+ throw new Error(`blockchain.estimatefee error. reply ${reply}`)
+ }
+ onDone(parseInt(reply))
+ },
+ onFail
+ }
+}
|
added fetchEstimateFee to get fallback fees
|
EdgeApp_edge-currency-bitcoin
|
train
|
js
|
de7af99696cb67fcd44c4bbb9af7098ea2f4c113
|
diff --git a/pybib/formatters.py b/pybib/formatters.py
index <HASH>..<HASH> 100644
--- a/pybib/formatters.py
+++ b/pybib/formatters.py
@@ -34,7 +34,10 @@ def get_common_parts(r):
"""Gets citation parts which are common to all types of citation"""
def format_title(title):
- return title[0]
+ try:
+ return title[0]
+ except IndexError:
+ return "No Title"
def format_author_list(authors):
author_list = []
|
Ensure that title absence is handled gracefully
|
jgilchrist_pybib
|
train
|
py
|
48810d0c3336ffffcb33611dbfb84142a0289bd7
|
diff --git a/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php b/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php
index <HASH>..<HASH> 100644
--- a/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php
+++ b/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php
@@ -2,7 +2,7 @@
namespace Steam\Command\WebApiUtil;
-class GetSupportedAPIListTest extends \PHPUnit_Framework_TestCase
+class GetSupportedApiListTest extends \PHPUnit_Framework_TestCase
{
/**
* @var GetSupportedAPIList
@@ -11,7 +11,7 @@ class GetSupportedAPIListTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
- $this->instance = new GetSupportedAPIList();
+ $this->instance = new GetSupportedApiList();
}
public function testValues()
|
Updated class name in test as it was causing fatal error due to case sensitivity
|
DaMitchell_steam-api-php
|
train
|
php
|
441632a7618bbca13b64c3d70f252f3b340a730b
|
diff --git a/lib/art-decomp/fsm.rb b/lib/art-decomp/fsm.rb
index <HASH>..<HASH> 100644
--- a/lib/art-decomp/fsm.rb
+++ b/lib/art-decomp/fsm.rb
@@ -41,12 +41,11 @@ module ArtDecomp class FSM
end
def to_kiss
- ins = @inputs.transpose
- outs = @outputs.transpose
st = @state.map { |e| e == DontCare ? '*' : e }
nxt = @next_state.map { |e| e == DontCare ? '*' : e }
- lines = (0...@state.size).map { |i| [ins[i].join, st[i], nxt[i], outs[i].join].join ' ' }
- KISS.new(lines).formatted
+ div = Array.new @state.size, ' '
+ cols = @inputs + [div, st, div, nxt, div] + @outputs
+ KISS.new(cols.transpose.map(&:join)).formatted
end
def x_encoding i, rows
|
refactor FSM#to_kiss
|
chastell_art-decomp
|
train
|
rb
|
e0639bda05770518b1f001f9db31a57b87df9dd2
|
diff --git a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java
+++ b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java
@@ -171,7 +171,8 @@ public class XbaseScopeProvider extends XtypeScopeProvider {
}
public IEObjectDescription getSingleElement(EObject object) {
- throw new UnsupportedOperationException();
+ Iterable<IEObjectDescription> elements = getElements(object);
+ return (isEmpty(elements)) ? null : elements.iterator().next();
}
public IEObjectDescription getSingleElement(QualifiedName name) {
|
[xbase] Extended constructor call scope
|
eclipse_xtext-extras
|
train
|
java
|
54d64105c0fec604140b581fd0b0fb3f7ac54b50
|
diff --git a/kafka/client.py b/kafka/client.py
index <HASH>..<HASH> 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -404,7 +404,7 @@ class SimpleClient(object):
return [responses[tp] for tp in original_ordering]
def __repr__(self):
- return '<KafkaClient client_id=%s>' % (self.client_id)
+ return '<SimpleClient client_id=%s>' % (self.client_id)
def _raise_on_response_error(self, resp):
|
Update string representation of SimpleClient
|
dpkp_kafka-python
|
train
|
py
|
7f35abcada0643eefb6065e4bc5d3ff3adf8df39
|
diff --git a/src/preloadjs/LoadQueue.js b/src/preloadjs/LoadQueue.js
index <HASH>..<HASH> 100644
--- a/src/preloadjs/LoadQueue.js
+++ b/src/preloadjs/LoadQueue.js
@@ -790,6 +790,13 @@ this.createjs = this.createjs || {};
* object will contain that value as a property.
*/
+ /**
+ * Although it extends {{#crossLink "AbstractLoader"}}{{/crossLink}}, the `initialize` event is never fired from
+ * a LoadQueue instance.
+ * @event initialize
+ * @private
+ */
+
// public methods
/**
* Register a custom loaders class. New loaders are given precedence over loaders added earlier and default loaders.
|
Documentation: Updated LoadQueue.initialize event to show it is not dispatched (thanks @marvin)
|
CreateJS_PreloadJS
|
train
|
js
|
1cf41a6d2435ec4874b877632abab1a912d40b57
|
diff --git a/src/base/base_object.js b/src/base/base_object.js
index <HASH>..<HASH> 100644
--- a/src/base/base_object.js
+++ b/src/base/base_object.js
@@ -2,21 +2,22 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-var _ = require('underscore');
-var extend = require('./utils').extend;
-var Events = require('./events');
+var _ = require('underscore')
+var extend = require('./utils').extend
+var Events = require('./events')
-var pluginOptions = ['container'];
+var pluginOptions = ['container']
-var BaseObject = function(options) {
- options || (options = {});
- _.extend(this, _.pick(options, pluginOptions));
- this.initialize.apply(this, arguments);
-};
+class BaseObject extends Events {
+ constructor(options) {
+ options || (options = {})
+ _.extend(this, _.pick(options, pluginOptions))
+ if (this.initialize) {
+ this.initialize.apply(this, arguments)
+ }
+ }
+}
-_.extend(BaseObject.prototype, Events);
-
-BaseObject.extend = extend;
-
-module.exports = BaseObject;
+BaseObject.extend = extend
+module.exports = BaseObject
|
base object: change to es6 syntax
|
clappr_clappr
|
train
|
js
|
33d53cf9e522236d1490e99f183c4734981804f5
|
diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -463,7 +463,7 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error {
err = errors.New("received unexpected bitfield")
break
}
- c.PeerPieces = msg.Bitfield[:len(t.NumPieces())]
+ c.PeerPieces = msg.Bitfield[:t.NumPieces()]
for index, has := range c.PeerPieces {
if has {
me.peerGotPiece(t, c, index)
|
Trivial fix for one of the last commits
|
anacrolix_torrent
|
train
|
go
|
4177eec48f628d2f20d161f0429501c3338760b9
|
diff --git a/lib/rest-core/client.rb b/lib/rest-core/client.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-core/client.rb
+++ b/lib/rest-core/client.rb
@@ -60,8 +60,8 @@ module RestCore::Client
end
def inspect
- "#<struct #{self.class.name} #{attributes.map{ |k, v|
- "#{k}=#{v.inspect}" }.join(', ')}>"
+ fields = attributes.map{ |k, v| "#{k}=#{v.inspect}" }.join(', ')
+ "#<struct #{self.class.name}#{if fields.empty? then '' else fields end}>"
end
def lighten! o={}
|
client.rb: fix inspect if there's no fields at all
|
godfat_rest-core
|
train
|
rb
|
33890b19f13c119ad30a39652f8ca303856272cd
|
diff --git a/csp.py b/csp.py
index <HASH>..<HASH> 100644
--- a/csp.py
+++ b/csp.py
@@ -106,8 +106,8 @@ class CSP(search.Problem):
var = find_if(lambda v: v not in assignment, self.vars)
result = []
for val in self.domains[var]:
- if self.nconflicts(self, var, val, assignment) == 0:
- a = assignment.copy; a[var] = val
+ if self.nconflicts(var, val, assignment) == 0:
+ a = assignment.copy(); a[var] = val
result.append(((var, val), a))
return result
|
Fixed a bug pylint pointed out in unused code. Still untested.
|
hobson_aima
|
train
|
py
|
098e4daac56d0e0969a7550a4f50080281f2e4f4
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -62,6 +62,15 @@ class PublicationServer {
}
/**
+ * Broadcast a message to all connected clients.
+ *
+ * @param {Object} msg The message to send to all connected clients.
+ */
+ broadcast(msg) {
+ this._primus.write(msg);
+ }
+
+ /**
* Gracefully shutdowns the publication server.
*
* @param {Number} timeout The amount of time we'll give the WebSocket server
|
Add ability to broadcast messages to all clients
|
mixmaxhq_publication-server
|
train
|
js
|
24fc2fadadb1be4bae7724c297c3b07f8d6dabd5
|
diff --git a/src/Utility/Rsync.php b/src/Utility/Rsync.php
index <HASH>..<HASH> 100644
--- a/src/Utility/Rsync.php
+++ b/src/Utility/Rsync.php
@@ -32,6 +32,7 @@ class Rsync
* Start rsync process.
*
* @param string|string[] $source
+ * @phpstan-param array{flags?: string, options?: array, timeout?: int|null, progress_bar?: bool, display_stats?: bool} $config
* @throws RunException
*/
public function call(Host $host, $source, string $destination, array $config = []): void
diff --git a/src/functions.php b/src/functions.php
index <HASH>..<HASH> 100644
--- a/src/functions.php
+++ b/src/functions.php
@@ -538,6 +538,7 @@ function invoke(string $taskName): void
*
* @param string|string[] $source
* @param array $config
+ * @phpstan-param array{flags?: string, options?: array, timeout?: int|null, progress_bar?: bool, display_stats?: bool} $config
*
* @throws RunException
*/
|
upload(): add more precise phpdocs (#<I>)
* upload(): add more precise phpdocs
* Update Rsync.php
* Update Rsync.php
* Update functions.php
|
deployphp_deployer
|
train
|
php,php
|
0d0a7e72e6d5fbbfc3a44da676e830379d16f6a4
|
diff --git a/examples/webhooks.php b/examples/webhooks.php
index <HASH>..<HASH> 100644
--- a/examples/webhooks.php
+++ b/examples/webhooks.php
@@ -1,5 +1,13 @@
<?php
+// You can use this script with the webhook testing tool in the developer tab.
+// At the moment, the best way to learn about the different webhooks is to
+// change the options in the webhook tester and read the annotations that pop
+// up.
+
+// Webhook documentation:
+// https://sandbox.gocardless.com/docs/web_hooks_guide
+
// Include library
include_once '../lib/GoCardless.php';
|
Added intro and docs link to webhook example
|
gocardless_gocardless-legacy-php
|
train
|
php
|
d333ba53c306fbb72562bfc450587559333b4339
|
diff --git a/tests/OSS/Tests/BucketLiveChannelTest.php b/tests/OSS/Tests/BucketLiveChannelTest.php
index <HASH>..<HASH> 100644
--- a/tests/OSS/Tests/BucketLiveChannelTest.php
+++ b/tests/OSS/Tests/BucketLiveChannelTest.php
@@ -20,6 +20,7 @@ class BucketLiveChannelTest extends \PHPUnit_Framework_TestCase
$this->client = Common::getOssClient();
$this->bucketName = 'php-sdk-test-bucket-name-' . strval(rand(0, 10));
$this->client->createBucket($this->bucketName);
+ sleep(15);
}
public function tearDown()
|
add sleep to fix bucket not exsit
|
aliyun_aliyun-oss-php-sdk
|
train
|
php
|
b2f80c4aec321d1b2b842ec00f7cbb7f0c048170
|
diff --git a/lib/ahoy_email.rb b/lib/ahoy_email.rb
index <HASH>..<HASH> 100644
--- a/lib/ahoy_email.rb
+++ b/lib/ahoy_email.rb
@@ -75,5 +75,5 @@ end
ActiveSupport.on_load(:action_mailer) do
include AhoyEmail::Mailer
register_observer AhoyEmail::Observer
- Mail::Message.attr_accessor :ahoy_data, :ahoy_message
+ Mail::Message.send(:attr_accessor, :ahoy_data, :ahoy_message)
end
|
Fixed error with attr_accessor being private in earlier versions of Ruby - fixes #<I>
|
ankane_ahoy_email
|
train
|
rb
|
2607c5e46c52bcc3fc44786a8d94aa7667e4bd60
|
diff --git a/spec/theatre/invocation_spec.rb b/spec/theatre/invocation_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/theatre/invocation_spec.rb
+++ b/spec/theatre/invocation_spec.rb
@@ -56,6 +56,7 @@ describe "Using Invocations that've been ran through the Theatre" do
end
it "should have a status of :error if an exception was raised and set the #error property" do
+ pending
errorful_callback = lambda { raise ArgumentError, "this error is intentional" } # Simulate logic error
invocation = Theatre::Invocation.new("/namespace/whatever", errorful_callback)
invocation.queued
@@ -103,6 +104,7 @@ describe "Using Invocations that've been ran through the Theatre" do
end
it "should set the #finished_time property when a failure was encountered" do
+ pending
block = lambda { raise LocalJumpError }
invocation = Theatre::Invocation.new('/foo/bar', block)
invocation.queued
diff --git a/spec/theatre/theatre_class_spec.rb b/spec/theatre/theatre_class_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/theatre/theatre_class_spec.rb
+++ b/spec/theatre/theatre_class_spec.rb
@@ -117,6 +117,7 @@ describe "Theatre::Theatre" do
end
it "should run the callback of the Invocation it receives from the master_queue" do
+ pending
has_executed = false
thrower = lambda { has_executed = true }
namespace = "/foo/bar"
|
Set theatre tests pending where they were failing pre-cleanup
|
adhearsion_adhearsion
|
train
|
rb,rb
|
6ad16db9d5d9b3d6e04de854b6e8d93098dad1d9
|
diff --git a/languagetool-core/src/main/java/org/languagetool/rules/patterns/PasswordAuthenticator.java b/languagetool-core/src/main/java/org/languagetool/rules/patterns/PasswordAuthenticator.java
index <HASH>..<HASH> 100644
--- a/languagetool-core/src/main/java/org/languagetool/rules/patterns/PasswordAuthenticator.java
+++ b/languagetool-core/src/main/java/org/languagetool/rules/patterns/PasswordAuthenticator.java
@@ -32,6 +32,9 @@ public class PasswordAuthenticator extends Authenticator {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
+ if (getRequestingURL() == null) {
+ return null;
+ }
String userInfo = getRequestingURL().getUserInfo();
if (StringTools.isEmpty(userInfo)) {
return null;
|
avoid NPE which can occur under some (unclear) conditions
|
languagetool-org_languagetool
|
train
|
java
|
ee30378adf53d5c43b16c12c7a7ae82985303bd4
|
diff --git a/Person.php b/Person.php
index <HASH>..<HASH> 100644
--- a/Person.php
+++ b/Person.php
@@ -9,20 +9,24 @@ use Vundi\Potato\Exceptions\IDShouldBeNumber;
class Person extends Model
{
protected static $entity_table = 'Person';
- protected static $entity_class = 'Person';
}
- $dotenv = new Dotenv\Dotenv(__DIR__);
- $dotenv->load();
-
try {
//var_dump(Person::findAll());
- $person = Person::find(36);
- $person->FName = "Kisooo";
+
+ $person = Person::find(29);
+ $person->FName = "Koech";
$person->update();
- echo "success";
+ /*$person = new Person();
+ $person->FName = "Mahad";
+ $person->gshdh = "Kimeu";
+ $person->Age = 33;
+ $person->save();*/
+
+
+ //Person::remove('gshd');
} catch (NonExistentID $e) {
echo $e->getMessage();
} catch (IDShouldBeNumber $e) {
|
(Fix) Remove the dotenv initializer from the child class.Moved to Database class
|
vickris_potatoORM
|
train
|
php
|
89a71d5c499514afcc21425e1c07bd93e9d62273
|
diff --git a/fmn/rules/__init__.py b/fmn/rules/__init__.py
index <HASH>..<HASH> 100644
--- a/fmn/rules/__init__.py
+++ b/fmn/rules/__init__.py
@@ -1,3 +1,4 @@
+from fmn.rules.anitya import *
from fmn.rules.ansible import *
from fmn.rules.askbot import *
from fmn.rules.bodhi import *
|
Import the anitya rules at the module level
|
fedora-infra_fmn.rules
|
train
|
py
|
084adeed55c823e4a7ad938c8aeb8109c46820ad
|
diff --git a/src/Guzzle/Http/Client.php b/src/Guzzle/Http/Client.php
index <HASH>..<HASH> 100644
--- a/src/Guzzle/Http/Client.php
+++ b/src/Guzzle/Http/Client.php
@@ -222,7 +222,7 @@ class Client extends AbstractHasDispatcher implements ClientInterface
if (!is_array($uri)) {
$templateVars = null;
} else {
- if (count($uri) != 2 || !is_array($uri[1])) {
+ if (count($uri) != 2 || !isset($uri[1]) || !is_array($uri[1])) {
throw new InvalidArgumentException(
'You must provide a URI template followed by an array of template variables '
. 'when using an array for a URI template'
|
Fix error in Client::createRequest
|
guzzle_guzzle3
|
train
|
php
|
a534923d90daa3e861bb036712f43ab55656cbe9
|
diff --git a/tests/Tests.php b/tests/Tests.php
index <HASH>..<HASH> 100644
--- a/tests/Tests.php
+++ b/tests/Tests.php
@@ -634,4 +634,13 @@ abstract class Tests extends TestBase
$test->get('/barcodes?transform=1');
$test->expect('{"barcodes":[{"id":1,"product_id":1,"hex":"00ff01","bin":"AP8B"}]}');
}
+
+ public function testEditPostWithApostrophe()
+ {
+ $test = new Api($this);
+ $test->put('/posts/1', '[{"id":1,"user_id":1,"category_id":1,"content":"blog start\'d"}]');
+ $test->expect('1');
+ $test->get('/posts/1');
+ $test->expect('{"id":1,"user_id":1,"category_id":1,"content":"blog start\'d"}');
+ }
}
|
Add test case for Escaped JSON Issue #<I>
|
mevdschee_php-crud-api
|
train
|
php
|
a9c76d572bc8207f65df169152a24770d56595c4
|
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js
index <HASH>..<HASH> 100755
--- a/src/jquery.gridster.js
+++ b/src/jquery.gridster.js
@@ -31,6 +31,7 @@
autogrow_cols: false,
autogenerate_stylesheet: true,
avoid_overlapped_widgets: true,
+ auto_init: true,
serialize_params: function($w, wgd) {
return {
col: wgd.col,
@@ -89,6 +90,8 @@
* @param {Boolean} [options.avoid_overlapped_widgets] Avoid that widgets loaded
* from the DOM can be overlapped. It is helpful if the positions were
* bad stored in the database or if there was any conflict.
+ * @param {Boolean} [options.auto_init] Automatically call gridster init
+ * method or not when the plugin is instantiated.
* @param {Function} [options.serialize_params] Return the data you want
* for each widget in the serialization. Two arguments are passed:
* `$w`: the jQuery wrapped HTMLElement, and `wgd`: the grid
@@ -141,7 +144,7 @@
this.generated_stylesheets = [];
this.$style_tags = $([]);
- this.init();
+ this.options.auto_init && this.init();
}
Gridster.generated_stylesheets = [];
|
feature(gridster): added `auto_init` config option, default to true
Useful when using `positionschanged` event, fired before gridster
instance is cached.
|
ducksboard_gridster.js
|
train
|
js
|
33ecb79d11c93581f17cc89793cf237b3e0d5c5d
|
diff --git a/projections.py b/projections.py
index <HASH>..<HASH> 100644
--- a/projections.py
+++ b/projections.py
@@ -219,6 +219,14 @@ class Projections():
self.year = str(self.dateArr[0])
self.month = str(self.dateArr[1] + 1)
self.day = str(self.dateArr[2])
+ if self.addIncomeRadio.get_active() == True:
+ self.selected = "income"
+ elif self.addExpenseRadio.get_active() == True:
+ self.selected = "expense"
+ self.data.add_projection_data(self.transactionTitleEntry.get_text(),
+ self.transactionAmountEntry.get_text(), self.transactionDescriptionEntry.get_text(),
+ self.selected, self.addCategoryComboBoxText.get_active(), self.year, self.month, self.day,
+ self.frequencyComboBoxText.get_active(), 1)
else:
self.add_view_mode(True)
|
Worked on exporting data to database.
|
mthxx_Budget
|
train
|
py
|
a5a3b49ff83e608ead7c1dc8a8a13e0e3a999080
|
diff --git a/res/template/GeneratedPuliFactory.tpl.php b/res/template/GeneratedPuliFactory.tpl.php
index <HASH>..<HASH> 100644
--- a/res/template/GeneratedPuliFactory.tpl.php
+++ b/res/template/GeneratedPuliFactory.tpl.php
@@ -23,7 +23,7 @@ use <?php echo $import ?>;
*
* Otherwise any modifications will be overwritten!
*/
-class <?php echo $shortClassName."\n" ?> implements PuliFactory
+class <?php echo $shortClassName ?> implements PuliFactory
{
/**
* Creates the resource repository.
|
Removed superfluous linebreak from GeneratedPuliFactory
|
puli_manager
|
train
|
php
|
935b661ce92b045348b5b9dec6a6330ebc8b910e
|
diff --git a/src/Listeners/CascadeDeleteListener.php b/src/Listeners/CascadeDeleteListener.php
index <HASH>..<HASH> 100755
--- a/src/Listeners/CascadeDeleteListener.php
+++ b/src/Listeners/CascadeDeleteListener.php
@@ -9,8 +9,8 @@ class CascadeDeleteListener
/**
* Handel the event for eloquent delete.
*
- * @param $event
- * @param $model
+ * @param $event
+ * @param $model
*
* @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter("event"))
diff --git a/src/Listeners/CascadeRestoreListener.php b/src/Listeners/CascadeRestoreListener.php
index <HASH>..<HASH> 100755
--- a/src/Listeners/CascadeRestoreListener.php
+++ b/src/Listeners/CascadeRestoreListener.php
@@ -9,8 +9,8 @@ class CascadeRestoreListener
/**
* Handel the event for eloquent restore.
*
- * @param $event
- * @param $model
+ * @param $event
+ * @param $model
*
* @return void
* @SuppressWarnings(PHPMD.UnusedFormalParameter("event"))
|
Apply fixes from StyleCI (#<I>)
|
Askedio_laravel-soft-cascade
|
train
|
php,php
|
7387353dde52dcdff0061b0a3cb154b0623876db
|
diff --git a/src/js/pannellum.js b/src/js/pannellum.js
index <HASH>..<HASH> 100644
--- a/src/js/pannellum.js
+++ b/src/js/pannellum.js
@@ -187,7 +187,7 @@ controls.orientation.className = 'pnlm-orientation-button pnlm-sprite pnlm-contr
if (window.DeviceOrientationEvent) {
window.addEventListener('deviceorientation', function(e) {
window.removeEventListener('deviceorientation', this);
- if (e)
+ if (e && e.alpha !== null && e.beta !== null && e.gamma !== null)
controls.container.appendChild(controls.orientation);
});
}
|
Don't show device orientation button on desktop Chrome.
|
mpetroff_pannellum
|
train
|
js
|
2f80f028ee69714059ce9680817b933993956785
|
diff --git a/lib/cache.js b/lib/cache.js
index <HASH>..<HASH> 100644
--- a/lib/cache.js
+++ b/lib/cache.js
@@ -385,10 +385,10 @@ function setRoute(options) {
CTZN.cache.routes[options.route] = {
route: options.route,
contentType: options.contentType,
- view: {
- identity: options.view.identity,
- gzip: options.view.gzip,
- deflate: options.view.deflate
+ render: {
+ identity: options.render.identity,
+ gzip: options.render.gzip,
+ deflate: options.render.deflate
},
timer: timer,
context: options.context,
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -1910,7 +1910,7 @@ function cacheResponse(params, context, view, zippedView, deflatedView, contentT
cache.setRoute({
route: params.route.pathname,
contentType: contentType,
- view: {
+ render: {
identity: view,
gzip: zippedView,
deflate: deflatedView
|
Renamed route cache contents to 'render' for consistency
|
jaysylvester_citizen
|
train
|
js,js
|
768b4ea24de0080a29e5467cda0142f5de62c660
|
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index <HASH>..<HASH> 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -414,7 +414,7 @@ class StringConversionsTest < ActiveSupport::TestCase
end
def test_partial_string_to_time
- with_env_tz "Europe/Moscow" do
+ with_env_tz "Europe/Moscow" do # use timezone which does not observe DST.
now = Time.now
assert_equal Time.local(now.year, now.month, now.day, 23, 50), "23:50".to_time
assert_equal Time.utc(now.year, now.month, now.day, 23, 50), "23:50".to_time(:utc)
|
tests, add note about the usage of a specific timezone. Closes #<I>.
|
rails_rails
|
train
|
rb
|
2ae1d7d75153f5dae3d3cc24ae0de84d7070021c
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -63,7 +63,7 @@ export default class Api {
else {
if( !(ep instanceof Object) )
ep = { name: ep };
- const { name, options = {} } = ep;
+ const {name, options={}} = ep;
// Make the endpoint.
this.makeEndpoint( name, path + '/', match[1], options );
@@ -81,7 +81,7 @@ export default class Api {
}
makeCrudEndpoints( key, path ) {
- let ep = [ key, key + 's' ];
+ let ep = [key.slice( 0, -1 ), key];
const joiner = ((path[path.length - 1] == '/') ? '' : '/');
const basePath = path + joiner + ep[1];
const baseName = capitalize( ep[0] );
@@ -126,7 +126,7 @@ export default class Api {
request( endpoint, options = {} ) {
const { method = endpoint.method, path = endpoint.path,
args = {}, type = endpoint.type, data,
- include = [] } = options;
+ include = (endpoint.include || []) } = options;
let queryString = [];
// Process the body. This can end up being a FormData object
|
* Use default include options.
* By default use plurals.
|
uptick_js-tinyapi
|
train
|
js
|
c3c76b3180df23a6e66b77484b4d5ab7932b15aa
|
diff --git a/lib/ruby_gems_gems_gem_simple.rb b/lib/ruby_gems_gems_gem_simple.rb
index <HASH>..<HASH> 100644
--- a/lib/ruby_gems_gems_gem_simple.rb
+++ b/lib/ruby_gems_gems_gem_simple.rb
@@ -13,10 +13,17 @@ class RubyGemsGems_GemSimple < GemSimple
if from_git?
return nil
end
- gem_uri = "#{@gems_url}/#{@name}-#{@version}.gem"
- Utils::log_debug "download and md5 for #{@name} from #{gem_uri}"
+ gem_uri = URI.parse("#{@gems_url}/#{@name}-#{@version}.gem")
+ uri_debug = gem_uri.clone
+ uri_debug.password = "********" if uri_debug.password
+ Utils::log_debug "download and md5 for #{@name} from #{uri_debug}"
begin
- source = open(gem_uri)
+ if gem_uri.user && gem_uri.password
+ source = open(gem_uri.scheme + "://" + gem_uri.host + "/" + gem_uri.path,
+ :http_basic_authentication=>[gem_uri.user, gem_uri.password])
+ else
+ source = open(gem_uri)
+ end
@md5 = Digest::MD5.hexdigest(source.read)
return @md5
rescue
|
add support for username and password in the url
|
jordimassaguerpla_gems-status
|
train
|
rb
|
80dbb042cf3936e48f6edb160ac2f62b86483281
|
diff --git a/tests/Parts/Channel/ChannelTest.php b/tests/Parts/Channel/ChannelTest.php
index <HASH>..<HASH> 100644
--- a/tests/Parts/Channel/ChannelTest.php
+++ b/tests/Parts/Channel/ChannelTest.php
@@ -266,7 +266,7 @@ final class ChannelTest extends DiscordTestCase
/**
* @covers \Discord\Parts\Channel\Channel::allowVoice
*/
- public function testVoiceChannelDoesNotAllowText()
+ public function testVoiceChannelAllowVoice()
{
/**
* @var Channel
@@ -275,7 +275,6 @@ final class ChannelTest extends DiscordTestCase
return $channel->type == Channel::TYPE_VOICE;
})->first();
- $this->assertFalse($vc->allowText());
$this->assertTrue($vc->allowVoice());
}
}
|
test: remove allowText assertion on voice channel
|
teamreflex_DiscordPHP
|
train
|
php
|
171e9745424b3e3f482c72fd4fb98ac1f966faac
|
diff --git a/library/Garp/Cache/Store/Versioned.php b/library/Garp/Cache/Store/Versioned.php
index <HASH>..<HASH> 100755
--- a/library/Garp/Cache/Store/Versioned.php
+++ b/library/Garp/Cache/Store/Versioned.php
@@ -57,8 +57,7 @@ class Garp_Cache_Store_Versioned {
public function read($key) {
$cache = Zend_Registry::get('CacheFrontend');
// fetch results from cache
- if ($cache->test($key)) {
- $results = $cache->load($key);
+ if (($results = $cache->load($key)) !== false) {
if (!is_array($results)) {
return -1;
}
|
Prevent unnecessary call to backend cache
|
grrr-amsterdam_garp3
|
train
|
php
|
af9c60180df39b97ad6074e7a919d996223fe06d
|
diff --git a/pkg/oauth/server/osinserver/tokengen.go b/pkg/oauth/server/osinserver/tokengen.go
index <HASH>..<HASH> 100644
--- a/pkg/oauth/server/osinserver/tokengen.go
+++ b/pkg/oauth/server/osinserver/tokengen.go
@@ -2,7 +2,6 @@ package osinserver
import (
"encoding/base64"
- "io"
"strings"
"crypto/rand"
@@ -12,9 +11,9 @@ import (
func randomBytes(len int) []byte {
b := make([]byte, len)
- if _, err := io.ReadFull(rand.Reader, b); err != nil {
- // rand.Reader should never fail
- panic(err.Error())
+ if _, err := rand.Read(b); err != nil {
+ // rand.Read should never fail
+ panic(err)
}
return b
}
|
Simplify reading of random bytes
No need to use io.ReadFull, no need to convert error to string.
|
openshift_origin
|
train
|
go
|
d08d59d5120abbb060388f344facae1ff8860ec5
|
diff --git a/webwhatsapi/__init__.py b/webwhatsapi/__init__.py
index <HASH>..<HASH> 100755
--- a/webwhatsapi/__init__.py
+++ b/webwhatsapi/__init__.py
@@ -234,12 +234,16 @@ class WhatsAPIDriver(object):
EC.visibility_of_element_located((By.CSS_SELECTOR, self._SELECTORS['mainPage']))
)
- def get_qr(self):
+ def get_qr(self, filename=None):
"""Get pairing QR code from client"""
if "Click to reload QR code" in self.driver.page_source:
self.reload_qr()
qr = self.driver.find_element_by_css_selector(self._SELECTORS['qrCode'])
- fd, fn_png = tempfile.mkstemp(prefix=self.username, suffix='.png')
+ if filename is None:
+ fd, fn_png = tempfile.mkstemp(prefix=self.username, suffix='.png')
+ else:
+ fd = os.open(filename, os.O_RDWR|os.CREAT)
+ fn_png = os.path.abspath(filename)
self.logger.debug("QRcode image saved at %s" % fn_png)
qr.screenshot(fn_png)
os.close(fd)
|
Added custom filename option for get_qr
|
mukulhase_WebWhatsapp-Wrapper
|
train
|
py
|
ad55bf207d96abe23fcdb5cc7156d06b1984cf10
|
diff --git a/src/Prettus/Repository/Eloquent/BaseRepository.php b/src/Prettus/Repository/Eloquent/BaseRepository.php
index <HASH>..<HASH> 100644
--- a/src/Prettus/Repository/Eloquent/BaseRepository.php
+++ b/src/Prettus/Repository/Eloquent/BaseRepository.php
@@ -670,10 +670,13 @@ abstract class BaseRepository implements RepositoryInterface, RepositoryCriteria
// we should pass data that has been casts by the model
// to make sure data type are same because validator may need to use
// this data to compare with data that fetch from database.
+ $model = $this->model->newInstance();
+ $model->setRawAttributes([]);
+ $model->setAppends([]);
if ($this->versionCompare($this->app->version(), "5.2.*", ">")) {
- $attributes = $this->model->newInstance()->forceFill($attributes)->makeVisible($this->model->getHidden())->toArray();
+ $attributes = $model->forceFill($attributes)->makeVisible($this->model->getHidden())->toArray();
} else {
- $model = $this->model->newInstance()->forceFill($attributes);
+ $model->forceFill($attributes);
$model->makeVisible($this->model->getHidden());
$attributes = $model->toArray();
}
|
BUGFIX: If an array $attributes exists in the model, its data is written to the table when the repository is updated (#<I>)
Details in test:
<URL>
|
andersao_l5-repository
|
train
|
php
|
70ed53045e50c3970a02f0a531e78eba1058b208
|
diff --git a/api/log_test.go b/api/log_test.go
index <HASH>..<HASH> 100644
--- a/api/log_test.go
+++ b/api/log_test.go
@@ -52,7 +52,7 @@ func (s *LogSuite) TearDownSuite(c *gocheck.C) {
func (s *LogSuite) TestLogRemoveAll(c *gocheck.C) {
a := app.App{Name: "words"}
- request, err := http.NewRequest("DELETE", "/log", nil)
+ request, err := http.NewRequest("DELETE", "/logs", nil)
c.Assert(err, gocheck.IsNil)
recorder := httptest.NewRecorder()
err = s.conn.Apps().Insert(a)
@@ -83,7 +83,7 @@ func (s *LogSuite) TestLogRemoveByApp(c *gocheck.C) {
defer s.conn.Apps().Remove(bson.M{"name": a2.Name})
err = a2.Log("last log msg2", "tsuru")
c.Assert(err, gocheck.IsNil)
- url := fmt.Sprintf("/log/%s?:app=%s", a.Name, a.Name)
+ url := fmt.Sprintf("/logs/%s?:app=%s", a.Name, a.Name)
request, err := http.NewRequest("DELETE", url, nil)
c.Assert(err, gocheck.IsNil)
recorder := httptest.NewRecorder()
|
api: fixed url for log in tests.
|
tsuru_tsuru
|
train
|
go
|
5f52dc66a31f08bc2ee8393f2e9d2fedc52359a9
|
diff --git a/openquake/commands/engine.py b/openquake/commands/engine.py
index <HASH>..<HASH> 100644
--- a/openquake/commands/engine.py
+++ b/openquake/commands/engine.py
@@ -76,13 +76,6 @@ def run_job(job_ini, log_level='info', log_file=None, exports='',
return job_id
-def run_tile(job_ini, sites_slice):
- """
- Used in tiling calculations
- """
- return run_job(job_ini, sites_slice=(sites_slice.start, sites_slice.stop))
-
-
def del_calculation(job_id, confirmed=False):
"""
Delete a calculation and all associated outputs.
|
Removed unused code [skip CI]
|
gem_oq-engine
|
train
|
py
|
027cef57e15c1c86506af2d5b3f9ab182fe57e97
|
diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb
index <HASH>..<HASH> 100644
--- a/test/test_trace_output.rb
+++ b/test/test_trace_output.rb
@@ -41,13 +41,17 @@ class TestTraceOutput < Rake::TestCase # :nodoc:
end
def test_trace_issues_single_io_for_args_multiple_strings_and_alternate_sep
+ verbose, $VERBOSE = $VERBOSE, nil
old_sep = $\
$\ = "\r"
+ $VERBOSE = verbose
spy = PrintSpy.new
trace_on(spy, "HI\r", "LO")
assert_equal "HI\rLO\r", spy.result
assert_equal 1, spy.calls
ensure
+ $VERBOSE = nil
$\ = old_sep
+ $VERBOSE = verbose
end
end
|
Suppress deprecation warning for $\ since ruby <I>
|
ruby_rake
|
train
|
rb
|
d803b303886d569cff16bf975567b3d909e6a780
|
diff --git a/cake/tests/cases/console/libs/tasks/model.test.php b/cake/tests/cases/console/libs/tasks/model.test.php
index <HASH>..<HASH> 100644
--- a/cake/tests/cases/console/libs/tasks/model.test.php
+++ b/cake/tests/cases/console/libs/tasks/model.test.php
@@ -647,8 +647,9 @@ array(
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
STRINGEND;
-
- $this->assertPattern('/' . preg_quote($expected, '/') . '/', $result);
+debug($expected);
+debug($result);
+ $this->assertPattern('/' . preg_quote(str_replace("\r\n", "\n", $expected), '/') . '/', $result);
}
/**
|
Fix Model validation bake tests for Windows.
|
cakephp_cakephp
|
train
|
php
|
1f31b5dfc3077f7a4170f234ed1a57986e1b9e79
|
diff --git a/services/transaction/get_receipt.js b/services/transaction/get_receipt.js
index <HASH>..<HASH> 100644
--- a/services/transaction/get_receipt.js
+++ b/services/transaction/get_receipt.js
@@ -29,6 +29,7 @@ const GetReceiptKlass = function(params) {
params = params || {};
oThis.transactionHash = params.transaction_hash;
oThis.chain = params.chain;
+ oThis.addressToNameMap = params.address_to_name_map || {};
};
GetReceiptKlass.prototype = {
@@ -58,7 +59,7 @@ GetReceiptKlass.prototype = {
if (!txReceipt) {
return Promise.resolve(responseHelper.successWithData({}));
} else {
- const web3EventsDecoderResponse = web3EventsDecoder.perform(txReceipt, {});
+ const web3EventsDecoderResponse = web3EventsDecoder.perform(txReceipt, oThis.addressToNameMap);
return Promise.resolve(web3EventsDecoderResponse);
}
|
name to map handle in receipt service.
|
OpenSTFoundation_openst-platform
|
train
|
js
|
b9398c30b64dd5db193207c3aaad81d4dbb29015
|
diff --git a/setting.go b/setting.go
index <HASH>..<HASH> 100644
--- a/setting.go
+++ b/setting.go
@@ -28,8 +28,8 @@ type QorWidgetSettingInterface interface {
// QorWidgetSetting default qor widget setting struct
type QorWidgetSetting struct {
Name string `gorm:"primary_key"`
- WidgetType string `gorm:"primary_key"`
- Scope string `gorm:"primary_key;default:'default'"`
+ WidgetType string `gorm:"primary_key;size:128"`
+ Scope string `gorm:"primary_key;size:128;default:'default'"`
GroupName string
ActivatedAt *time.Time
Template string
|
Set max length for widget type, scope
|
qor_widget
|
train
|
go
|
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.