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 |
|---|---|---|---|---|---|
5fb8a92183b2c8934b960bd1222a8efe426317ba | diff --git a/src/ox_modules/module-web.js b/src/ox_modules/module-web.js
index <HASH>..<HASH> 100644
--- a/src/ox_modules/module-web.js
+++ b/src/ox_modules/module-web.js
@@ -381,15 +381,6 @@ export default class WebModule extends WebDriverModule {
return this._whenWebModuleDispose.promise;
}
- async switchAndCloseWindow(handle) {
- try {
- await this.driver.switchToWindow(handle);
- await this.driver.closeWindow();
- } catch (e) {
- // ignore switch and close window errors
- }
- }
-
async deleteSession() {
try {
if (this.driver && this.driver.deleteSession) {
@@ -405,18 +396,9 @@ export default class WebModule extends WebDriverModule {
this.disposeContinue(status);
} else {
try {
- const handles = await this.driver.getWindowHandles();
- if (
- handles &&
- Array.isArray(handles) &&
- handles.length > 0
- ) {
- for (const handle of handles) {
- await this.switchAndCloseWindow(handle);
- }
- }
+ await this.deleteSession();
} catch (e) {
- this.logger.warn('Failed to close browser window:', e);
+ this.logger.warn('Failed to close browser windows:', e);
}
this.disposeContinue();
} | CBS-<I> Failed monitors displayed in the results page do not display a screenshot of the failure (#<I>) | oxygenhq_oxygen | train | js |
e21bec7418431aff9457905d5951b29b1f46fcae | diff --git a/lib/govuk_tech_docs/api_reference/api_reference_extension.rb b/lib/govuk_tech_docs/api_reference/api_reference_extension.rb
index <HASH>..<HASH> 100644
--- a/lib/govuk_tech_docs/api_reference/api_reference_extension.rb
+++ b/lib/govuk_tech_docs/api_reference/api_reference_extension.rb
@@ -70,7 +70,7 @@ module GovukTechDocs
elsif type == 'default'
@render.path(text)
else
- @render.path.schema(text)
+ @render.schema(text)
end
else | Fix inserting schema objects with api_schema> | alphagov_tech-docs-gem | train | rb |
f8acc49608df3840c0ac4fbcc2df4b0845451e8f | diff --git a/code/controller/SiteConfigLeftAndMain.php b/code/controller/SiteConfigLeftAndMain.php
index <HASH>..<HASH> 100644
--- a/code/controller/SiteConfigLeftAndMain.php
+++ b/code/controller/SiteConfigLeftAndMain.php
@@ -122,7 +122,7 @@ class SiteConfigLeftAndMain extends LeftAndMain {
return new ArrayList(array(
new ArrayData(array(
'Title' => _t("{$this->class}.MENUTITLE", $defaultTitle),
- 'Link' => false
+ 'Link' => $this->Link()
))
));
} | Fixed breadcrumbs being broken when using GridField on 'SiteConfig' | silverstripe_silverstripe-siteconfig | train | php |
4bb3b455a392584473cca8a9e122a7faf561f130 | diff --git a/src/jsonselect.js b/src/jsonselect.js
index <HASH>..<HASH> 100644
--- a/src/jsonselect.js
+++ b/src/jsonselect.js
@@ -226,13 +226,9 @@
};
}
- exports.JSONSelect = {
- // expose private API for testing
- _lex: lex,
- _parse: parse,
- // public API
- match: function (sel, obj) { return compile(sel).match(obj) },
- forEach: function(sel, obj, fun) { return compile(sel).forEach(obj, fun) },
- compile: compile
- };
-})(typeof exports === "undefined" ? window : exports);
+ exports._lex = lex;
+ exports._parse = parse;
+ exports.match = function (sel, obj) { return compile(sel).match(obj) };
+ exports.forEach = function(sel, obj, fun) { return compile(sel).forEach(obj, fun) };
+ exports.compile = compile;
+})(typeof exports === "undefined" ? (window.JSONSelect = {}) : exports); | rework exports. in browser it's still window.JSONSelect.XXX. in node, it's now exports.match, rather than exports.JSONSeelct.match | lloyd_JSONSelect | train | js |
ecb519bffda423e8d53c42f9f6ea01cc0b234f00 | 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
@@ -7,6 +7,12 @@ Coveralls.wear!
RSpec.configure do |config|
config.expect_with(:rspec) { |c| c.syntax = :expect }
+ config.order = :random
+
+ config.before do
+ SimpleNavigation.config_files.clear
+ setup_adapter_for :rails
+ end
end
# FIXME: actualize to make it 4 by default
@@ -23,14 +29,14 @@ RAILS_ENV = 'test' unless defined?(RAILS_ENV)
require 'simple_navigation'
-def setup_adapter_for(framework)
- adapter = case framework
- when :rails
- context = double(:context, view_context: ActionView::Base.new)
- SimpleNavigation::Adapters::Rails.new(context)
- end
- SimpleNavigation.stub(adapter: adapter)
- adapter
+def setup_adapter_for(framework, context = double(:context))
+ if framework == :rails
+ context.stub(view_context: ActionView::Base.new)
+ end
+
+ SimpleNavigation.stub(framework: framework)
+ SimpleNavigation.load_adapter
+ SimpleNavigation.init_adapter_from(context)
end
def setup_renderer(renderer_class, options) | Ensuring tests are order independant | codeplant_simple-navigation | train | rb |
6548069c1ffb69d6bdb39a10621c5f6fdf0db373 | diff --git a/spec/karma/config/integration.js b/spec/karma/config/integration.js
index <HASH>..<HASH> 100644
--- a/spec/karma/config/integration.js
+++ b/spec/karma/config/integration.js
@@ -31,6 +31,6 @@ module.exports = function(config) {
browsers: ['Chrome', 'Firefox', 'Opera', 'Safari'],
captureTimeout: 60000,
- singleRun: false
+ singleRun: true
});
};
diff --git a/spec/karma/config/unit.js b/spec/karma/config/unit.js
index <HASH>..<HASH> 100644
--- a/spec/karma/config/unit.js
+++ b/spec/karma/config/unit.js
@@ -31,6 +31,6 @@ module.exports = function(config) {
browsers: ['Chrome', 'Firefox', 'Opera', 'Safari'],
captureTimeout: 60000,
- singleRun: false
+ singleRun: true
});
}; | Exit karma process by setting singleRun:true | pusher_pusher-js | train | js,js |
a7adfebe2ce15e032d55e5686bac04d90f0b871e | diff --git a/atlassian/jira.py b/atlassian/jira.py
index <HASH>..<HASH> 100644
--- a/atlassian/jira.py
+++ b/atlassian/jira.py
@@ -927,7 +927,7 @@ class Jira(AtlassianRestAPI):
transition_id = self.get_transition_id_to_status_name(issue_key, status_name)
return self.post(url, data={'transition': {'id': transition_id}})
- def set_issue_status_by_id(self, issue_key, transition_id):
+ def set_issue_status_by_transition_id(self, issue_key, transition_id):
"""
Setting status by transition_id
:param issue_key: str | Method name correction
Rename set_issue_status_by_id to set_issue_status_by_transition_id. | atlassian-api_atlassian-python-api | train | py |
c83df168b2b640c159a928830156c08b03821970 | diff --git a/distob/arrays.py b/distob/arrays.py
index <HASH>..<HASH> 100644
--- a/distob/arrays.py
+++ b/distob/arrays.py
@@ -299,7 +299,13 @@ class DistArray(object):
def __repr__(self):
classname = self.__class__.__name__
- ix = tuple(np.meshgrid(*(((0, 1, -2, -1),)*self.ndim), indexing='ij'))
+ selectors = []
+ for i in range(self.ndim):
+ if self.shape[i] > 3:
+ selectors.append((0, 1, -2, -1))
+ else:
+ selectors.append(tuple(range(self.shape[i])))
+ ix = tuple(np.meshgrid(*selectors, indexing='ij'))
corners = gather(self[ix])
def _repr_nd(corners, shape, indent):
"""Recursively generate abbreviated text representation of array""" | fix __repr__ for small DistArray | mattja_distob | train | py |
a2a1373288ec2e53b251472df6671ae7742510cb | diff --git a/lib/blog.js b/lib/blog.js
index <HASH>..<HASH> 100644
--- a/lib/blog.js
+++ b/lib/blog.js
@@ -234,7 +234,7 @@ Blog.prototype.select = function (options) {
limit = 0;
offset = 0;
}
- if (!query) {
+ if (!query && !options.random) {
if (limit && offset) {
posts = this.posts.slice(offset, offset + limit);
} else if (limit) { | Don't take the fast path when using the random option | sydneystockholm_blog.md | train | js |
01fef092764bd7f1da9a78cd010bba2e0b97bec4 | diff --git a/src/compatibility/timeout.js b/src/compatibility/timeout.js
index <HASH>..<HASH> 100644
--- a/src/compatibility/timeout.js
+++ b/src/compatibility/timeout.js
@@ -95,7 +95,7 @@ function _gpfHandleTimeout () {
* @gpf:sameas _gpfHandleTimeout
* @since 0.1.5
*/
-gpf.handleTimeout = _gpfEmptyFunc;
+gpf.handleTimeout = _gpfHandleTimeout;
_gpfCompatibilityInstallGlobal("setTimeout", _gpSetTimeoutPolyfill);
_gpfCompatibilityInstallGlobal("clearTimeout", _gpfClearTimeoutPolyfill); | Fix timeout (#<I>) | ArnaudBuchholz_gpf-js | train | js |
49a2fec71b9a085636aed65ea965d4938de1d3a5 | diff --git a/lib/sidetiq/version.rb b/lib/sidetiq/version.rb
index <HASH>..<HASH> 100644
--- a/lib/sidetiq/version.rb
+++ b/lib/sidetiq/version.rb
@@ -5,7 +5,7 @@ module Sidetiq
MAJOR = 0
# Public: Sidetiq minor version number.
- MINOR = 5
+ MINOR = 6
# Public: Sidetiq patch level.
PATCH = 0 | Bump to <I>. | endofunky_sidetiq | train | rb |
20b6a5eea227a3919c60e1593d212b1824853cdb | diff --git a/lib/scrolls.rb b/lib/scrolls.rb
index <HASH>..<HASH> 100644
--- a/lib/scrolls.rb
+++ b/lib/scrolls.rb
@@ -71,15 +71,15 @@ module Scrolls
# Public: Log an exception
#
- # data - A hash of key/values to log
# e - An exception to pass to the logger
+ # data - A hash of key/values to log
#
# Examples:
#
# begin
# raise Exception
# rescue Exception => e
- # Scrolls.log_exception({test: "test"}, e)
+ # Scrolls.log_exception(e, {test: "test"})
# end
# test=test at=exception class=Exception message=Exception exception_id=70321999017240
# ... | Correct inaccurate definition and documentation block for log_exception | asenchi_scrolls | train | rb |
a9b17361e8cd7c9f0e57873782ac14ccd2f6eb82 | diff --git a/fuseops/common_op.go b/fuseops/common_op.go
index <HASH>..<HASH> 100644
--- a/fuseops/common_op.go
+++ b/fuseops/common_op.go
@@ -180,7 +180,7 @@ func (o *commonOp) init(
// Set up a trace span for this op.
var reportForTrace reqtrace.ReportFunc
- o.ctx, reportForTrace = reqtrace.StartSpan(ctx, o.op.ShortDesc())
+ o.ctx, reportForTrace = reqtrace.StartSpan(o.ctx, o.op.ShortDesc())
// When the op is finished, report to both reqtrace and the connection.
prevFinish := o.finished | Fixed a context propagation bug. | jacobsa_fuse | train | go |
442e86b7dcde9a7e09fbf39cf728f064d19855b2 | diff --git a/test/Psy/Test/ShellTest.php b/test/Psy/Test/ShellTest.php
index <HASH>..<HASH> 100644
--- a/test/Psy/Test/ShellTest.php
+++ b/test/Psy/Test/ShellTest.php
@@ -90,7 +90,7 @@ class ShellTest extends \PHPUnit_Framework_TestCase
$config = $this->getConfig(array(
'tabCompletionMatchers' => array(
new ClassMethodsMatcher(),
- )
+ ),
));
$matchers = $config->getTabCompletionMatchers(); | cs fix so travis doesnt go :bomb: | bobthecow_psysh | train | php |
d9be7d98175292afefc715d1cec853e464382b97 | diff --git a/lib/rubocop/cop/style/symbol_proc.rb b/lib/rubocop/cop/style/symbol_proc.rb
index <HASH>..<HASH> 100644
--- a/lib/rubocop/cop/style/symbol_proc.rb
+++ b/lib/rubocop/cop/style/symbol_proc.rb
@@ -96,8 +96,7 @@ module RuboCop
end
def begin_pos_for_replacement(node)
- block_send_or_super, _block_args, _block_body = *node
- expr = block_send_or_super.source_range
+ expr = node.send_node.source_range
if (paren_pos = (expr.source =~ /\(\s*\)$/))
expr.begin_pos + paren_pos | Fix InternalAffairs/NodeDestructuring offenses in SymbolProc | rubocop-hq_rubocop | train | rb |
e41659e981d9cf2beb322f5a21c0f48c3d9e802f | diff --git a/tensorflow_datasets/core/dataset_builder.py b/tensorflow_datasets/core/dataset_builder.py
index <HASH>..<HASH> 100644
--- a/tensorflow_datasets/core/dataset_builder.py
+++ b/tensorflow_datasets/core/dataset_builder.py
@@ -248,13 +248,19 @@ class DatasetBuilder(object):
# Update the DatasetInfo metadata by computing statistics from the data.
if compute_stats:
- self.info.compute_dynamic_properties()
-
- # Set checksums for all files downloaded
- self.info.download_checksums = dl_manager.recorded_download_checksums
- # Set size of all files downloaded
- self.info.size_in_bytes = sum(
- [v for _, v in dl_manager.download_sizes.items()])
+ already_has_stats = bool(self.info.num_examples)
+ if already_has_stats:
+ tf.logging.info("Skipping computing stats because they are already "
+ "populated.")
+ else:
+ self.info.compute_dynamic_properties()
+
+ # Set checksums for all files downloaded
+ self.info.download_checksums = (
+ dl_manager.recorded_download_checksums)
+ # Set size of all files downloaded
+ self.info.size_in_bytes = sum(
+ [v for _, v in dl_manager.download_sizes.items()])
# Write DatasetInfo to disk, even if we haven't computed the statistics.
self.info.write_to_directory(self._data_dir) | Don't compute stats if they're already there
PiperOrigin-RevId: <I> | tensorflow_datasets | train | py |
4de14e24312aac7839156f22612374a9734b8b90 | diff --git a/go/httpdportalpreview/httpdportalpreview.go b/go/httpdportalpreview/httpdportalpreview.go
index <HASH>..<HASH> 100644
--- a/go/httpdportalpreview/httpdportalpreview.go
+++ b/go/httpdportalpreview/httpdportalpreview.go
@@ -148,7 +148,11 @@ func (p *Proxy) RewriteAnswer(r *http.Response, buff []byte) error {
buff = bytes.Replace(buff, []byte("\""+urlOrig+"\""), []byte("\""+v.String()+"\""), -1)
}
for _, v := range LINK {
- buff = bytes.Replace(buff, []byte("\""+v+"\""), []byte("\""+"/portal_preview"+v+"\""), -1)
+ if strings.HasPrefix(v, "/") {
+ buff = bytes.Replace(buff, []byte("\""+v+"\""), []byte("\""+"/portal_preview"+v+"\""), -1)
+ } else {
+ buff = bytes.Replace(buff, []byte("\""+v+"\""), []byte("\""+"/portal_preview/captive-portal"+v+"\""), -1)
+ }
}
boeuf := bytes.NewBufferString("")
boeuf.Write(buff) | Fixed href that wasn't rewrited correctly in the portal preview | inverse-inc_packetfence | train | go |
ce6dec2b1dce5492491bb6ee6a0bdcbe805588fb | diff --git a/plexapi/media.py b/plexapi/media.py
index <HASH>..<HASH> 100644
--- a/plexapi/media.py
+++ b/plexapi/media.py
@@ -384,6 +384,15 @@ class Optimized(PlexObject):
self.target = data.attrib.get('target')
self.targetTagID = data.attrib.get('targetTagID')
+ def remove(self):
+ """ Remove an Optimized item"""
+ key = '%s/%s' % (self._initpath, self.id)
+ self._server.query(key, method=self._server._session.delete)
+
+ def rename(self, title):
+ """ Rename an Optimized item"""
+ key = '%s/%s?Item[title]=%s' % (self._initpath, self.id, title)
+ self._server.query(key, method=self._server._session.put)
@utils.registerPlexObject
class Conversion(PlexObject): | Add remove and rename methods for Optimized items. | pkkid_python-plexapi | train | py |
052350545cd8435fbbac501888f3e7462c78d7d4 | diff --git a/tests/ProxyManagerTest/ProxyGenerator/LazyLoadingGhost/PropertyGenerator/InitializationTrackerTest.php b/tests/ProxyManagerTest/ProxyGenerator/LazyLoadingGhost/PropertyGenerator/InitializationTrackerTest.php
index <HASH>..<HASH> 100644
--- a/tests/ProxyManagerTest/ProxyGenerator/LazyLoadingGhost/PropertyGenerator/InitializationTrackerTest.php
+++ b/tests/ProxyManagerTest/ProxyGenerator/LazyLoadingGhost/PropertyGenerator/InitializationTrackerTest.php
@@ -42,4 +42,11 @@ class InitializationTrackerTest extends AbstractUniquePropertyNameTest
{
return new InitializationTracker();
}
+
+ public function testInitializationFlagIsFalseByDefault() : void
+ {
+ $property = $this->createProperty();
+
+ self::assertFalse($property->getDefaultValue()->getValue());
+ }
} | By default, the initialization flag should be `false` for lazy-loading proxies, as discovered by the mutation testing framework | Ocramius_ProxyManager | train | php |
9e8bc9109bd9c512d8626089d29bcd7119f25fc1 | diff --git a/currency.go b/currency.go
index <HASH>..<HASH> 100644
--- a/currency.go
+++ b/currency.go
@@ -2,7 +2,7 @@ package poloniex
type Currency struct {
Name string `json:"name"`
- MaxDailyWithdrawal float64 `json:"maxDailyWithdrawal,string"`
+ MaxDailyWithdrawal string `json:"maxDailyWithdrawal"`
TxFee float64 `json:"txFee,string"`
MinConf int `json:"minConf"`
Disabled int `json:"disabled"` | maxDailyWithdrawal now returns string "DEPRECATED" | jyap808_go-poloniex | train | go |
fe64f813caf1f392b4be4ed33537af7fb195d10a | diff --git a/jet/templatetags/jet_tags.py b/jet/templatetags/jet_tags.py
index <HASH>..<HASH> 100644
--- a/jet/templatetags/jet_tags.py
+++ b/jet/templatetags/jet_tags.py
@@ -194,14 +194,16 @@ def select2_lookups(field):
for initial_object in initial_objects]
)
- field.field.widget.widget = SelectMultiple(attrs, choices=choices)
+ field.field.widget.widget = SelectMultiple(attrs)
+ field.field.choices = choices
elif hasattr(field, 'field') and isinstance(field.field, ModelChoiceField):
if initial_value:
initial_object = model.objects.get(pk=initial_value)
attrs['data-object-id'] = initial_value
choices.append((initial_object.pk, get_model_instance_label(initial_object)))
- field.field.widget.widget = Select(attrs, choices=choices)
+ field.field.widget.widget = Select(attrs)
+ field.field.choices = choices
return field | Fix ajax fields choices being rendered in page | geex-arts_django-jet | train | py |
3bfded28794579571aa3437e22c73360adaa8cd0 | diff --git a/pyqode/python/backend/workers.py b/pyqode/python/backend/workers.py
index <HASH>..<HASH> 100644
--- a/pyqode/python/backend/workers.py
+++ b/pyqode/python/backend/workers.py
@@ -249,10 +249,7 @@ def run_pep8(request_data):
messages = []
# pylint: disable=unused-variable
for line_number, offset, code, text, doc in results:
- if not 'blank line contains whitespace' in text:
- # skip this warning because the editor will ensure not
- # whitespace are left when saving the text
- messages.append(('[PEP8] %s' % text, WARNING, line_number))
+ messages.append(('[PEP8] %s' % text, WARNING, line_number))
return True, messages | Enable blank lines warning since the hack that consisted to temporarily insert whitespaces has been removed | pyQode_pyqode.python | train | py |
00d8e1ba53a91ba4a8b19dc0d1307a52db3c5585 | diff --git a/lib/type/Help.js b/lib/type/Help.js
index <HASH>..<HASH> 100644
--- a/lib/type/Help.js
+++ b/lib/type/Help.js
@@ -70,7 +70,7 @@ Help.prototype.toString = function () {
}
desc += ' ' + expr + '\n';
if (res && !(res instanceof Help)) {
- desc += ' ' + string.format(res) + '\n';
+ desc += ' ' + string.format(res, {precision: 14}) + '\n';
}
}
desc += '\n'; | Using format precision=<I> in stringified output of Help | josdejong_mathjs | train | js |
42f85b1cad6fe5e27709215e8304ddd33d82899c | diff --git a/pysrt/srtitem.py b/pysrt/srtitem.py
index <HASH>..<HASH> 100644
--- a/pysrt/srtitem.py
+++ b/pysrt/srtitem.py
@@ -2,7 +2,6 @@
"""
SubRip's subtitle parser
"""
-import os
import re
from pysrt.srtexc import InvalidItem | clean: get rid of unused import statement | byroot_pysrt | train | py |
d5042dbdbce57ad1bf14ea59f0acf768dcad8582 | diff --git a/luigi/contrib/sge.py b/luigi/contrib/sge.py
index <HASH>..<HASH> 100755
--- a/luigi/contrib/sge.py
+++ b/luigi/contrib/sge.py
@@ -262,7 +262,7 @@ class SGEJobTask(luigi.Task):
# Now delete the temporaries, if they're there.
if self.tmp_dir and os.path.exists(self.tmp_dir):
logger.info('Removing temporary directory %s' % self.tmp_dir)
- shutil.rmtree(self.tmp_dir)
+ subprocess.call(["rm", "-rf", self.tmp_dir])
def _track_job(self):
while True: | Changed removing temporary scripts directory from shutil.rmtree() to a subprocess calling 'rm -rf'. | spotify_luigi | train | py |
2640a4de6cfc8b78e11f8a882ca1d422bf83c549 | diff --git a/lib/video/postprocessing/finetune/index.js b/lib/video/postprocessing/finetune/index.js
index <HASH>..<HASH> 100644
--- a/lib/video/postprocessing/finetune/index.js
+++ b/lib/video/postprocessing/finetune/index.js
@@ -33,7 +33,8 @@ module.exports = async function(
);
} else {
log.error(
- 'The video recording start is zero, either no orange is there in the video or VisualMetrics failed.'
+ 'The video recording start is zero, either no orange is there in the video or VisualMetrics failed: %j',
+ videoMetrics
);
tmpFile = videoPath;
} | log the video metrics if we get a failure | sitespeedio_browsertime | train | js |
0db705c5e2d640c768e1c3bda32d13ad95bc6dc5 | diff --git a/spec/cucumber/glue/proto_world_spec.rb b/spec/cucumber/glue/proto_world_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/cucumber/glue/proto_world_spec.rb
+++ b/spec/cucumber/glue/proto_world_spec.rb
@@ -87,7 +87,7 @@ OUTPUT
define_steps do
When('{word} {word} {word}') do |subject, verb, complement|
- log "subject: #{subject}", "verb: #{verb}", "complement: #{complement}"
+ log "subject: #{subject}", "verb: #{verb}", "complement: #{complement}", subject: subject, verb: verb, complement: complement
end
end
@@ -95,7 +95,8 @@ OUTPUT
expect(@out.string).to include [
' subject: monkey',
' verb: eats',
- ' complement: banana'
+ ' complement: banana',
+ ' {:subject=>"monkey", :verb=>"eats", :complement=>"banana"}'
].join("\n")
end
end | Also show kwargs usse with log in tests | cucumber_cucumber-ruby | train | rb |
d5f518e3529dd7afc2fcb41466e6f5a96b14a2e0 | diff --git a/package.php b/package.php
index <HASH>..<HASH> 100644
--- a/package.php
+++ b/package.php
@@ -4,7 +4,7 @@
require_once 'PEAR/PackageFileManager2.php';
-$version = '1.4.128';
+$version = '1.4.129';
$notes = <<<EOT
No release notes for you!
EOT; | prepare for release of <I>
svn commit r<I> | silverorange_swat | train | php |
316fc7ecfc10d06603f1358c1f4c1020ec36dd2a | diff --git a/params/version.go b/params/version.go
index <HASH>..<HASH> 100644
--- a/params/version.go
+++ b/params/version.go
@@ -21,10 +21,10 @@ import (
)
const (
- VersionMajor = 1 // Major version component of the current release
- VersionMinor = 8 // Minor version component of the current release
- VersionPatch = 14 // Patch version component of the current release
- VersionMeta = "unstable" // Version metadata to append to the version string
+ VersionMajor = 1 // Major version component of the current release
+ VersionMinor = 8 // Minor version component of the current release
+ VersionPatch = 14 // Patch version component of the current release
+ VersionMeta = "stable" // Version metadata to append to the version string
)
// Version holds the textual version string.
diff --git a/swarm/version/version.go b/swarm/version/version.go
index <HASH>..<HASH> 100644
--- a/swarm/version/version.go
+++ b/swarm/version/version.go
@@ -21,10 +21,10 @@ import (
)
const (
- VersionMajor = 0 // Major version component of the current release
- VersionMinor = 3 // Minor version component of the current release
- VersionPatch = 2 // Patch version component of the current release
- VersionMeta = "unstable" // Version metadata to append to the version string
+ VersionMajor = 0 // Major version component of the current release
+ VersionMinor = 3 // Minor version component of the current release
+ VersionPatch = 2 // Patch version component of the current release
+ VersionMeta = "stable" // Version metadata to append to the version string
)
// Version holds the textual version string. | params, swarm: release Geth <I> and Swarm <I> | ethereum_go-ethereum | train | go,go |
b82fbf394f2f207217f857062334e222a3eb184f | diff --git a/lib/messageformat.dev.js b/lib/messageformat.dev.js
index <HASH>..<HASH> 100644
--- a/lib/messageformat.dev.js
+++ b/lib/messageformat.dev.js
@@ -266,7 +266,7 @@
exports.MessageFormat = MessageFormat;
}
else if (typeof define === 'function' && define.amd) {
- define(function() {
+ define(['make-plural'], function() {
return MessageFormat;
});
}
diff --git a/messageformat.js b/messageformat.js
index <HASH>..<HASH> 100644
--- a/messageformat.js
+++ b/messageformat.js
@@ -1657,7 +1657,7 @@
exports.MessageFormat = MessageFormat;
}
else if (typeof define === 'function' && define.amd) {
- define(function() {
+ define(['make-plural'], function() {
return MessageFormat;
});
} | added make-plural as dependency when loading via AMD | messageformat_messageformat | train | js,js |
f3cfb0f19095a89bd9c4a4774a2c8109fd8fd9e5 | diff --git a/example/settings.py b/example/settings.py
index <HASH>..<HASH> 100644
--- a/example/settings.py
+++ b/example/settings.py
@@ -90,9 +90,6 @@ SECRET_KEY = 'gugj0$ix$z=!=5@_ey6e5k5!g(m+zq46agcpgn2a7=j+-e0u4t'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
- # 'django.template.loaders.filesystem.load_template_source',
- # 'django.template.loaders.app_directories.load_template_source',
- # 'django.template.loaders.eggs.load_template_source',
)
TEMPLATE_CONTEXT_PROCESSORS = ( | removed stuff that is really really deprecated. | specialunderwear_django-easymode | train | py |
bfca7266415c3a83e710d7f846231cc61d5fad9d | diff --git a/src/Webfactory/Slimdump/Database/Dumper.php b/src/Webfactory/Slimdump/Database/Dumper.php
index <HASH>..<HASH> 100644
--- a/src/Webfactory/Slimdump/Database/Dumper.php
+++ b/src/Webfactory/Slimdump/Database/Dumper.php
@@ -183,6 +183,7 @@ class Dumper
/** @var PDOConnection $wrappedConnection */
$wrappedConnection = $db->getWrappedConnection();
$wrappedConnection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
+ $actualRows = 0;
foreach ($db->query($s) as $row) {
$b = $this->rowLengthEstimate($row);
@@ -222,6 +223,8 @@ class Dumper
if (null !== $progress) {
$progress->advance();
}
+
+ ++$actualRows;
}
if (null !== $progress) {
@@ -232,6 +235,10 @@ class Dumper
}
}
+ if ($actualRows !== $numRows) {
+ $this->output->getErrorOutput()->writeln(sprintf('<error>Expected %d rows, actually processed %d – verify results!</error>', $numRows, $actualRows));
+ }
+
$wrappedConnection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
if ($bufferSize) { | Print a warning when the number of rows dumped does not match the expected count (#<I>) | webfactory_slimdump | train | php |
ae18522ef2dfcc3688253501d131dee85ccbadb2 | diff --git a/cassandra/protocol.py b/cassandra/protocol.py
index <HASH>..<HASH> 100644
--- a/cassandra/protocol.py
+++ b/cassandra/protocol.py
@@ -30,7 +30,7 @@ from cassandra import (Unavailable, WriteTimeout, ReadTimeout,
UserAggregateDescriptor, SchemaTargetType)
from cassandra.marshal import (int32_pack, int32_unpack, uint16_pack, uint16_unpack,
int8_pack, int8_unpack, uint64_pack, header_pack,
- v3_header_pack)
+ v3_header_pack, uint32_pack)
from cassandra.cqltypes import (AsciiType, BytesType, BooleanType,
CounterColumnType, DateType, DecimalType,
DoubleType, FloatType, Int32Type, | Send a flags field (value 0) in PREPARE messages in v5.
* Write flags as a <I>-bit unsigned int, not int.
* Forgot to import the uint<I>_pack function from the marshal package. | datastax_python-driver | train | py |
311b720ae671ade94b4993fad1fa329c18e683f8 | diff --git a/wasp_launcher/apps/kits/health.py b/wasp_launcher/apps/kits/health.py
index <HASH>..<HASH> 100644
--- a/wasp_launcher/apps/kits/health.py
+++ b/wasp_launcher/apps/kits/health.py
@@ -62,7 +62,7 @@ class WHealthCommandKit(WCommandKit):
@classmethod
def description(cls):
- return 'general or launcher-wide commands'
+ return 'shows launcher and application "health" information'
@classmethod
def commands(cls): | wasp_launcher/apps/kits/health.py: help information updated | a1ezzz_wasp-launcher | train | py |
b3641abac0ce24a1644953120d743f1ada500d92 | diff --git a/build/Gruntfile.js b/build/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/build/Gruntfile.js
+++ b/build/Gruntfile.js
@@ -3,7 +3,7 @@ module.exports = function (grunt) {
pkg: grunt.file.readJSON('package.json'),
jasmine: {
pivotal: {
- src: ['../src/hilary.js', '../src/hilary.amd.js', '../src/hilary.loader.js'], //'../src/**/*.js',
+ src: ['../release/hilaryWithAMDAndLoader.min.js'], //'../src/**/*.js',
options: {
specs: '../test/specs/*Fixture.js'
} | runs tests on minified js | losandes_hilaryjs | train | js |
580424cb9130bc522faefcd59a715860e45d3dd5 | diff --git a/router/helpers.go b/router/helpers.go
index <HASH>..<HASH> 100644
--- a/router/helpers.go
+++ b/router/helpers.go
@@ -6,8 +6,8 @@ func BadRequest(req *http.Request, message string) error {
return NewRequestError(req, http.StatusNotFound, message)
}
-func NotAuthenticated(req *http.Request) error {
- return NewRequestError(req, http.StatusNotFound, "not authenticated")
+func NotFound(req *http.Request, message string) error {
+ return NewRequestError(req, http.StatusNotFound, message)
}
func Forbidden(req *http.Request) error { | router: Fix not found helper. | octavore_nagax | train | go |
bf83beae24ca93ad5f44a8ba4eac6e2b05a667b0 | diff --git a/djangoratings/__init__.py b/djangoratings/__init__.py
index <HASH>..<HASH> 100644
--- a/djangoratings/__init__.py
+++ b/djangoratings/__init__.py
@@ -48,7 +48,7 @@ class RatingManager(object):
content_type = self.get_content_type(),
object_id = self.instance.id,
user = None,
- ip_addresss = ip_address,
+ ip_address = ip_address,
defaults = defaults,
)
else: | Fixed issue #2: typo in ip_address | dcramer_django-ratings | train | py |
f9f69237d0b50f3c5a3eace3c1fe909ed0059150 | diff --git a/ssoadmin/client.go b/ssoadmin/client.go
index <HASH>..<HASH> 100644
--- a/ssoadmin/client.go
+++ b/ssoadmin/client.go
@@ -65,7 +65,7 @@ func NewClient(ctx context.Context, c *vim25.Client) (*Client, error) {
filter := <ypes.LookupServiceRegistrationFilter{
ServiceType: <ypes.LookupServiceRegistrationServiceType{
Product: "com.vmware.cis",
- Type: "sso:admin",
+ Type: "cs.identity",
},
EndpointType: <ypes.LookupServiceRegistrationEndpointType{
Protocol: "vmomi", | Move to cs.identity service type for sso admin endpoint
The "sso:admin" service type is obsolete, update to "cs.identity". | vmware_govmomi | train | go |
f7e12870831419d703189509c6b5428fe12acd22 | diff --git a/lib/connection.js b/lib/connection.js
index <HASH>..<HASH> 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -99,7 +99,7 @@ Connection.prototype.reconnect = function () {
}
debug && debug("Connection lost, reconnecting...");
// Terminate socket activity
- this.socket.end();
+ if (this.socket) this.socket.end();
this.connect();
}; | this.socket.end() needs guard against undefined
When calling reconnect() the first time, this.socket is not defined. The code I found that broke on this was using <URL> to avoid having separate paths for connect() and reconnect().
This behavior seems to have changed in d<I>b<I>b7e4e<I>a1ba<I>d1f8a4d1caeed | postwait_node-amqp | train | js |
675815a68be2a33fd8911e0d2b895ba09a167f46 | diff --git a/lib/driver/index.js b/lib/driver/index.js
index <HASH>..<HASH> 100644
--- a/lib/driver/index.js
+++ b/lib/driver/index.js
@@ -6,7 +6,8 @@ internals.mod.type = require('../data_type');
internals.mod.Class = require('../class');
var Shadow = require('./shadow');
var log = internals.mod.log;
-var tunnel = require('tunnel-ssh');
+var tunnel = require('tunnel-ssh'),
+ Promise = require('bluebird');
var ShadowProto = { | add missing dependency to drivers index.js | db-migrate_node-db-migrate | train | js |
a55e5131ad9c92aa7a041c1ab49eab323ceed5dd | diff --git a/src/HTML/Cms/CmsTableHelper.php b/src/HTML/Cms/CmsTableHelper.php
index <HASH>..<HASH> 100755
--- a/src/HTML/Cms/CmsTableHelper.php
+++ b/src/HTML/Cms/CmsTableHelper.php
@@ -12,6 +12,7 @@ use TMCms\HTML\Cms\Column\ColumnEdit;
use TMCms\HTML\Cms\Column\ColumnGallery;
use TMCms\HTML\Cms\Column\ColumnImg;
use TMCms\HTML\Cms\Column\ColumnOrder;
+use TMCms\HTML\Cms\Column\ColumnTree;
use TMCms\HTML\Cms\Column\ColumnView;
use TMCms\HTML\Cms\Filter\Select;
use TMCms\HTML\Cms\Filter\Text;
@@ -121,6 +122,19 @@ class CmsTableHelper {
break;
+ case 'tree':
+
+ $table->disablePager();
+
+ $column = new ColumnTree('id');
+ $column
+ ->setShowKey($column_key)
+ ->allowHtml()
+ ->enableAjax()
+ ->setWidth('1%');
+
+ break;
+
case 'accept':
$column = new ColumnAccept($column_key);
break; | Table helper can have new column type for tree mesting | devp-eu_tmcms-core | train | php |
1d1f481d90b1094dfdd9afddad8c7b454f9dae1b | diff --git a/demo/simple_server.rb b/demo/simple_server.rb
index <HASH>..<HASH> 100755
--- a/demo/simple_server.rb
+++ b/demo/simple_server.rb
@@ -4,6 +4,7 @@ require 'json'
require 'time'
require './lib/udp_rest'
+req_count = 0
port = (ARGV.last || 7890).to_i
puts "listening on 0.0.0.0:#{port}..." | bugfix: req count stopped working | reednj_udp_rest | train | rb |
d1a79c37400433d3e15ed6d30b5b0b238936a6d4 | diff --git a/utils.js b/utils.js
index <HASH>..<HASH> 100644
--- a/utils.js
+++ b/utils.js
@@ -42,7 +42,6 @@ function sumOrNaN (range) {
var BLANK_OUTPUT = outputBytes({})
function finalize (inputs, outputs, feeRate) {
- if (!isFinite(feeRate)) return {}
var bytesAccum = transactionBytes(inputs, outputs)
var feeAfterExtraOutput = feeRate * (bytesAccum + BLANK_OUTPUT)
var remainderAfterExtraOutput = sumOrNaN(inputs) - (sumOrNaN(outputs) + feeAfterExtraOutput) | utils: finalize never called with non-finite feeRate due to prior error-checking | bitcoinjs_coinselect | train | js |
8037a27b62238f80a6d0ba7da20d383d795adfa3 | diff --git a/declcache.go b/declcache.go
index <HASH>..<HASH> 100644
--- a/declcache.go
+++ b/declcache.go
@@ -260,17 +260,6 @@ func find_global_file(imp string, context build.Context) (string, bool) {
return "unsafe", true
}
- p, err := context.Import(imp, "", build.AllowBinary|build.FindOnly)
- if err == nil {
- if g_config.Autobuild {
- autobuild(p)
- }
- if file_exists(p.PkgObj) {
- log_found_package_maybe(imp, p.PkgObj)
- return p.PkgObj, true
- }
- }
-
pkgfile := fmt.Sprintf("%s.a", imp)
// if lib-path is defined, use it
@@ -291,6 +280,17 @@ func find_global_file(imp string, context build.Context) (string, bool) {
}
}
+ p, err := context.Import(imp, "", build.AllowBinary|build.FindOnly)
+ if err == nil {
+ if g_config.Autobuild {
+ autobuild(p)
+ }
+ if file_exists(p.PkgObj) {
+ log_found_package_maybe(imp, p.PkgObj)
+ return p.PkgObj, true
+ }
+ }
+
if *g_debug {
log.Printf("Import path %q was not resolved\n", imp)
log.Println("Gocode's build context is:") | Prioritize lib-path over canonical imports.
Fixes #<I>. | nsf_gocode | train | go |
174c240b5883483726f883760287c00abf4ca5c4 | diff --git a/tests/test_datasets.py b/tests/test_datasets.py
index <HASH>..<HASH> 100644
--- a/tests/test_datasets.py
+++ b/tests/test_datasets.py
@@ -36,7 +36,6 @@ def test_BaseDataset(mocker, repos):
assert ds.sources
assert not ds.concepts # no concepts stored
assert ds.languages
- assert ds.stats
def test_Dataset(dataset, capsys): | and ds.stats should have its own test | lexibank_pylexibank | train | py |
959bae10c4323368a7269f421d00089733aeb637 | diff --git a/src/DB/SQL.php b/src/DB/SQL.php
index <HASH>..<HASH> 100755
--- a/src/DB/SQL.php
+++ b/src/DB/SQL.php
@@ -86,7 +86,7 @@ class SQL
}
// Set query start time if debug is enabled or if we analyze queries
- if (MODE === 'site' && (Settings::get('debug_panel') || Settings::get('analyze_db_queries'))) {
+ if (Settings::get('debug_panel') || Settings::get('analyze_db_queries')) {
$ts = microtime(1);
} | Enable query analyzer in admin panel | devp-eu_tmcms-core | train | php |
3b178b2f078497dd88c137110e87aafe45ad2b16 | diff --git a/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedOverlayWithFocus.java b/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedOverlayWithFocus.java
index <HASH>..<HASH> 100644
--- a/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedOverlayWithFocus.java
+++ b/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedOverlayWithFocus.java
@@ -283,7 +283,12 @@ public class ItemizedOverlayWithFocus<Item extends OverlayItem> extends Itemized
final float charwidth = widths[i];
- if (curLineWidth + charwidth > DESCRIPTION_MAXWIDTH) {
+ if (itemDescription.charAt(i) == '\n') {
+ sb.append(itemDescription.subSequence(lastStop, i));
+ lastStop = i;
+ maxWidth = Math.max(maxWidth, curLineWidth);
+ curLineWidth = 0;
+ } else if (curLineWidth + charwidth > DESCRIPTION_MAXWIDTH) {
if (lastStop == lastwhitespace) {
i--;
} else { | Fix #<I>: ItemizedOverlayWithFocus label too long when having newline (#<I>) | osmdroid_osmdroid | train | java |
79d5e393569a246ff725a1ee47d2a374906f8cad | diff --git a/Eloquent/Relations/Relation.php b/Eloquent/Relations/Relation.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Relations/Relation.php
+++ b/Eloquent/Relations/Relation.php
@@ -223,7 +223,7 @@ abstract class Relation
/**
* Get a relationship join table hash.
*
- * @param bool $incrementJoinCount
+ * @param bool $incrementJoinCount
* @return string
*/
public function getRelationCountHash($incrementJoinCount = true) | [8.x] Formatting some docblocks | illuminate_database | train | php |
b0c5ba7b6f8aa01e8e566a51e436cab934b3b812 | diff --git a/code/forms/KapostGridFieldDetailForm_ItemRequest.php b/code/forms/KapostGridFieldDetailForm_ItemRequest.php
index <HASH>..<HASH> 100644
--- a/code/forms/KapostGridFieldDetailForm_ItemRequest.php
+++ b/code/forms/KapostGridFieldDetailForm_ItemRequest.php
@@ -135,7 +135,7 @@ class KapostGridFieldDetailForm_ItemRequest extends GridFieldDetailForm_ItemRequ
->setForm($form)
->setDescription(_t('KapostAdmin.NEW_URL_SEGMENT', '_The new URL Segment will be or will be close to "{newsegment}"', array(
'newsegment'=>$obj->generateURLSegment($recordTitle)
- ))), 'kapostConvertTypeWrap');
+ ))), 'ReplacePageID');
}
}
} | Fixed issue where the url segment change checkbox would not show up when
replacing a page | webbuilders-group_silverstripe-kapost-bridge | train | php |
df0a2f4642bc85b76f5f7525fe46016231ca007a | diff --git a/core/testing/framework/src/main/java/org/overture/core/tests/PathsProvider.java b/core/testing/framework/src/main/java/org/overture/core/tests/PathsProvider.java
index <HASH>..<HASH> 100644
--- a/core/testing/framework/src/main/java/org/overture/core/tests/PathsProvider.java
+++ b/core/testing/framework/src/main/java/org/overture/core/tests/PathsProvider.java
@@ -40,7 +40,7 @@ public class PathsProvider
{
/** The Constant RESULT_EXTENSION. */
- public final static String RESULT_EXTENSION = ".RESULT";
+ public final static String RESULT_EXTENSION = ".result";
/** Path to the results folder for external test inputs */
private final static String RESULTS_EXTERNAL = "src/test/resources/external"; | Change result extensions constant.
[Issue: ] | overturetool_overture | train | java |
53348bc25bb3ab28354d41f5d3deb7269b2a9dde | diff --git a/tasks/slack_api.js b/tasks/slack_api.js
index <HASH>..<HASH> 100644
--- a/tasks/slack_api.js
+++ b/tasks/slack_api.js
@@ -96,6 +96,7 @@ module.exports = function(grunt) {
}
var stringified = querystring.stringify(data);
+ console.log(stringified);
request.post( options.endpoint )
.type('form')
@@ -105,6 +106,7 @@ module.exports = function(grunt) {
grunt.log.error( 'Error with slack api: ', res.text );
return done(false);
}
+ console.log( res.text );
grunt.log.writeln( "Finished communicating with slack." );
done();
}) | allow for a different token per custom target (allows for bots) | nerrad_grunt-slack-api | train | js |
94871e9fd2ea71a6ca06655bec6b3644eaf5ff7b | diff --git a/modularodm/StoredObject.py b/modularodm/StoredObject.py
index <HASH>..<HASH> 100644
--- a/modularodm/StoredObject.py
+++ b/modularodm/StoredObject.py
@@ -412,6 +412,12 @@ class StoredObject(object):
return self._backrefs[item]
raise AttributeError(item + ' not found')
+ def __setattr__(self, key, value):
+
+ if key not in self._fields and not key.startswith('_'):
+ warnings.warn('Setting an attribute that is neither a field nor a protected value.')
+ super(StoredObject, self).__setattr__(key, value)
+
# Querying ######
@classmethod | warn on storedobject __setattr__ if key not in fields and not special | cos-archives_modular-odm | train | py |
6786eeff611bdee4b5e5d9ae5c0a5d2caf8cc466 | diff --git a/client/community/action-creators/async-invite.js b/client/community/action-creators/async-invite.js
index <HASH>..<HASH> 100644
--- a/client/community/action-creators/async-invite.js
+++ b/client/community/action-creators/async-invite.js
@@ -4,11 +4,17 @@ import * as t from '~client/community/action-types'
import * as AwaitActions from '~client/components/await/redux/action-creators'
import { genericRequestError, communityInviteSuccess } from '~client/utils/notifications'
+const COMMUNITY_USER_ROLES = {
+ owner: 1,
+ admin: 2,
+ participant: 3
+}
+
export default (communityId, invitation) => (dispatch, getState, { api, intl }) => {
const { auth: { credentials } } = getState()
const endpoint = `/communities/${communityId}/invitation`
- const body = { invitation }
+ const body = { invitation: { ...invitation, role: COMMUNITY_USER_ROLES.admin } }
const options = { headers: credentials }
dispatch(AwaitActions.setLoading(true)) | fix(community): set user role on invitation request fix #<I> | nossas_bonde-client | train | js |
420cf85a0e7181d7dfe68d59255a6f7a93d3ccd2 | diff --git a/lib/celluloid.rb b/lib/celluloid.rb
index <HASH>..<HASH> 100644
--- a/lib/celluloid.rb
+++ b/lib/celluloid.rb
@@ -8,7 +8,7 @@ module Celluloid
extend self # expose all instance methods as singleton methods
# How long actors have to terminate
- SHUTDOWN_TIMEOUT = 120
+ SHUTDOWN_TIMEOUT = 10
# Warning message added to Celluloid objects accessed outside their actors
BARE_OBJECT_WARNING_MESSAGE = "WARNING: BARE CELLULOID OBJECT "
@@ -86,6 +86,8 @@ module Celluloid
Logger.debug "Shutdown completed cleanly"
end
+ rescue Timeout::Error => ex
+ Logger.error("Couldn't cleanly terminate all actors in #{SHUTDOWN_TIMEOUT} seconds!")
end
end | Lower shutdown timeout to <I> seconds and print warning
Many people have complained about being unable to terminate Celluloid
programs with ^C and so forth when Celluloid is not able to cleanly
shut down all actors.
Celluloid has a built-in failsafe for this, but it does not kick in
until after <I> seconds! Lowering this failsafe time should make it
easier for people who are having trouble shutting down Celluloid-based
programs at the risk that there are reasonable circumstances under which
<I> seconds isn't enough. | celluloid_celluloid | train | rb |
72e14b7c50c824d9d11c7edec6b963425ec32953 | diff --git a/lib/dragonfly.rb b/lib/dragonfly.rb
index <HASH>..<HASH> 100644
--- a/lib/dragonfly.rb
+++ b/lib/dragonfly.rb
@@ -43,5 +43,12 @@ module Dragonfly
App[*args]
end
+ # Register saved configurations so we can do e.g.
+ # Dragonfly[:my_app].configure_with(:image_magick)
+ App.register_configuration(:imagemagick){ ImageMagick::Config }
+ App.register_configuration(:image_magick){ ImageMagick::Config }
+ App.register_configuration(:rails){ Config::Rails }
+ App.register_configuration(:heroku){ Config::Heroku }
+
end
end | Re-added standard saved configurations :imagemagick, :heroku and :rails | markevans_dragonfly | train | rb |
d448944b3eab23888788318b4edc57ca5db79438 | diff --git a/core/chaincode/shim/handler.go b/core/chaincode/shim/handler.go
index <HASH>..<HASH> 100644
--- a/core/chaincode/shim/handler.go
+++ b/core/chaincode/shim/handler.go
@@ -133,21 +133,13 @@ func (h *Handler) handleResponse(msg *pb.ChaincodeMessage) error {
// returned. An error will be returned msg cwas not successfully send to the
// peer.
func (h *Handler) sendReceive(msg *pb.ChaincodeMessage, responseChan <-chan pb.ChaincodeMessage) (pb.ChaincodeMessage, error) {
- errc := make(chan error, 1)
- h.serialSendAsync(msg, errc)
-
- for {
- select {
- case err := <-errc:
- if err != nil {
- return pb.ChaincodeMessage{}, err
- }
- // Do not return; a nil means send was successful
-
- case outmsg := <-responseChan:
- return outmsg, nil
- }
+ err := h.serialSend(msg)
+ if err != nil {
+ return pb.ChaincodeMessage{}, err
}
+
+ outmsg := <-responseChan
+ return outmsg, nil
}
// NewChaincodeHandler returns a new instance of the shim side handler. | [FAB-<I>] sendReceive is synchronous
The implementation would send a message in a go routine and wait for the
send to complete concurrent with the wait for a response. That pattern
is unnecessary though, as the response will never come if the message
was not sent successfully.
Simplify by moving to serialSend and handling the error before moving on
to wait for the response.
Change-Id: I<I>c<I>ac8c<I>bcfb<I>dbfdb3b3aa9 | hyperledger_fabric | train | go |
2267befe27ce9eb1d6e50a037f6161fa4a6f9eae | diff --git a/python/ray/serve/backend_state.py b/python/ray/serve/backend_state.py
index <HASH>..<HASH> 100644
--- a/python/ray/serve/backend_state.py
+++ b/python/ray/serve/backend_state.py
@@ -91,7 +91,7 @@ class ActorReplicaWrapper:
self._placement_group_name, self._backend_tag))
self._placement_group = ray.util.placement_group(
[self._actor_resources],
- lifetime="detached",
+ lifetime="detached" if self._detached else None,
name=self._placement_group_name)
try: | [serve] Fix bug where placement group was always detached even in non-detached instances (#<I>) | ray-project_ray | train | py |
c054a818a1d6fee61cebc48b4286bb40d0553f4c | diff --git a/modules/caddyhttp/fileserver/matcher_test.go b/modules/caddyhttp/fileserver/matcher_test.go
index <HASH>..<HASH> 100644
--- a/modules/caddyhttp/fileserver/matcher_test.go
+++ b/modules/caddyhttp/fileserver/matcher_test.go
@@ -72,11 +72,6 @@ func TestPHPFileMatcher(t *testing.T) {
matched: true,
},
{
- path: "/foo.php.PHP/index.php",
- expectedPath: "/foo.php.PHP/index.php",
- matched: true,
- },
- {
// See https://github.com/caddyserver/caddy/issues/3623
path: "/%E2%C3",
expectedPath: "/%E2%C3",
@@ -115,3 +110,12 @@ func TestPHPFileMatcher(t *testing.T) {
}
}
}
+
+func TestFirstSplit(t *testing.T) {
+ m := MatchFile{SplitPath: []string{".php"}}
+ actual := m.firstSplit("index.PHP/somewhere")
+ expected := "index.PHP"
+ if actual != expected {
+ t.Errorf("Expected %s but got %s", expected, actual)
+ }
+} | fileserver: Fix newly-introduced failing test on Linux (#<I>)
* fileserver: First attempt to fix failing test on Linux
I think I updated the wrong test case before
* Make new test function
I guess what we really are trying to test is the case insensitivity of
firstSplit. So a new test function is better for that. | mholt_caddy | train | go |
0950b0fcadcbc5fb394c6a8d2aac6231faef9ec9 | diff --git a/AbstractApplication.php b/AbstractApplication.php
index <HASH>..<HASH> 100644
--- a/AbstractApplication.php
+++ b/AbstractApplication.php
@@ -143,7 +143,8 @@ abstract class AbstractApplication implements LoggerAwareInterface
/**
* Custom initialisation method.
*
- * Called at the end of the Base::__construct method. This is for developers to inject initialisation code for their application classes.
+ * Called at the end of the AbstractApplication::__construct method.
+ * This is for developers to inject initialisation code for their application classes.
*
* @return void
* | Cleanup based on phpdoc output and file review | joomla-framework_application | train | php |
5f0f0a75b380392b6e15acfcf46b30853dd2fb7b | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from setuptools import setup
+from setuptools import setup, find_packages
version = '0.1'
@@ -14,7 +14,7 @@ setup(name='ramp',
author_email='kvh@science.io',
url='http://github.com/kvh/ramp',
license='BSD',
- packages=['ramp'],
+ packages=find_packages(exclude=["*.tests"]),
zip_safe=False,
install_requires=[
'numpy', | Include subdirectories when building the package. | kvh_ramp | train | py |
5fc7e72d341217640e3270e94591344f3ecf8e63 | diff --git a/lib/Map/Legend.js b/lib/Map/Legend.js
index <HASH>..<HASH> 100644
--- a/lib/Map/Legend.js
+++ b/lib/Map/Legend.js
@@ -140,6 +140,7 @@ defineProperties(Legend.prototype, {
function initSvg(legend) {
legend._svgns = 'http://www.w3.org/2000/svg';
legend._svg = document.createElementNS(legend._svgns, 'svg');
+ legend._svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
legend._svg.setAttribute('version', "1.1");
legend._svg.setAttribute('width', legend.width);
legend._svg.setAttribute('class', 'generated-legend now-viewing-legend-image-background');
@@ -273,7 +274,8 @@ function drawItemBoxes(legend, barGroup) {
if (defined(item.imageUrl)) {
barGroup.appendChild(svgElement(legend, 'image', {
- 'href': item.imageUrl,
+ 'xlink:href': item.imageUrl, // Firefox only likes this one.
+ 'href': item.imageUrl, // Internet Explorer only likes this one.
x: 0,
y: itemTop,
width: Math.min(item.imageWidth, legend.itemWidth + 4), // let them overlap slightly | Fix SVG images on IE and Firefox. | TerriaJS_terriajs | train | js |
27d66d011e1a61c6d939eb613f54ea49fb539088 | diff --git a/melodist/util/util.py b/melodist/util/util.py
index <HASH>..<HASH> 100644
--- a/melodist/util/util.py
+++ b/melodist/util/util.py
@@ -368,6 +368,9 @@ def daily_from_hourly(df):
def calculate_mean_daily_course_by_month(data_hourly, normalize=False):
+ data_hourly = data_hourly.copy()
+ data_hourly.index.name = None
+
df = data_hourly.groupby([data_hourly.index.month, data_hourly.index.hour]).mean()
df = df.reset_index().pivot('level_1', 'level_0')
df.columns = df.columns.droplevel() # remove MultiIndex | calculate_mean_daily_course_by_month: make sure index has no name | kristianfoerster_melodist | train | py |
be50a61d34fff943cc55627c598fde8c9e0cee99 | diff --git a/src/Core/Application/ContainerLoader.php b/src/Core/Application/ContainerLoader.php
index <HASH>..<HASH> 100644
--- a/src/Core/Application/ContainerLoader.php
+++ b/src/Core/Application/ContainerLoader.php
@@ -29,7 +29,7 @@ final class ContainerLoader
/** @var Tool $tool */
foreach ($application->getRegisteredTools() as $tool) {
- $tool->boot($containerBuilder);
+ $tool->build($containerBuilder);
}
$containerBuilder->compile();
diff --git a/src/Core/Tool/Tool.php b/src/Core/Tool/Tool.php
index <HASH>..<HASH> 100644
--- a/src/Core/Tool/Tool.php
+++ b/src/Core/Tool/Tool.php
@@ -32,7 +32,7 @@ abstract class Tool
/**
* @param ContainerBuilder $containerBuilder
*/
- public function boot(ContainerBuilder $containerBuilder)
+ public function build(ContainerBuilder $containerBuilder)
{
$resourcePath = $this->determineResourcePath(); | Rename Tool::boot() to Tool::build()
It is actually used while building a container, and never during application boot. | ibuildingsnl_qa-tools | train | php,php |
cbdb996caa6741c6de9703ed5ce4e489a7ca2d98 | diff --git a/lib/siba/version.rb b/lib/siba/version.rb
index <HASH>..<HASH> 100644
--- a/lib/siba/version.rb
+++ b/lib/siba/version.rb
@@ -1,5 +1,5 @@
# encoding: UTF-8
module Siba
- VERSION = "0.5.0"
+ VERSION = "0.5.1"
end
diff --git a/scaffolds/destination.rb b/scaffolds/destination.rb
index <HASH>..<HASH> 100644
--- a/scaffolds/destination.rb
+++ b/scaffolds/destination.rb
@@ -15,6 +15,18 @@ module Siba::C6y
def backup(path_to_backup_file)
## examples.rb ##
end
+
+ # Shows the list of backup files stored currently at destination
+ # with names starting with 'backup_name'
+ #
+ # Returns an array of two-element arrays:
+ # [backup_file_name, modification_time]
+ def get_backups_list(backup_name)
+ end
+
+ # Restoring: put backup file from destination into dir
+ def restore(backup_name, dir)
+ end
end
end
end | Added get_backup_list and restore to destination scaffold class | evgenyneu_siba | train | rb,rb |
d6b49f3f0acb5910fd37ec44e13fc2711e8bc7f3 | diff --git a/spec/patch/xcodeproj_spec.rb b/spec/patch/xcodeproj_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/patch/xcodeproj_spec.rb
+++ b/spec/patch/xcodeproj_spec.rb
@@ -9,5 +9,11 @@ module Xcodeproj
expect(project.root_object).to_not be(nil)
end
+
+ it "should return archive version as last known" do
+ project = Xcodeproj::Project.new(".", true)
+
+ expect(project.archive_version).to eq(Constants::LAST_KNOWN_ARCHIVE_VERSION.to_s)
+ end
end
end | Monkey patching tested and passing. | igor-makarov_xcake | train | rb |
4fa563ba24b7dbaa29613092e8b8a5a32c90bd5f | diff --git a/src/ChipInput.js b/src/ChipInput.js
index <HASH>..<HASH> 100644
--- a/src/ChipInput.js
+++ b/src/ChipInput.js
@@ -230,7 +230,7 @@ class ChipInput extends React.Component {
}
handleKeyDown = (event) => {
- if (event.keyCode === 13) { // enter
+ if (event.keyCode === this.props.newChipKeyCode) { // default 13/enter
this.handleAddChip(event.target.value)
} else if (event.keyCode === 8 || event.keyCode === 46) {
if (event.target.value === '') {
@@ -517,11 +517,13 @@ ChipInput.propTypes = {
onUpdateInput: PropTypes.func,
openOnFocus: PropTypes.bool,
chipRenderer: PropTypes.func,
+ newChipKeyCode: PropTypes.number,
clearOnBlur: PropTypes.bool
}
ChipInput.defaultProps = {
filter: AutoComplete.caseInsensitiveFilter,
+ newChipKeyCode: 13,
clearOnBlur: true
} | feat: add newChipKeyCode prop to ChipInput component
The newChipKeyCode prop (default <I>) is compared against the event
keyCode in the onKeyDownHandler, if they match then a new chip is
rendered. | TeamWertarbyte_material-ui-chip-input | train | js |
9ef74f9481459a56fce8d59c4ecc87de860e60a0 | diff --git a/src/ContentBundle/Form/Type/ContentType.php b/src/ContentBundle/Form/Type/ContentType.php
index <HASH>..<HASH> 100644
--- a/src/ContentBundle/Form/Type/ContentType.php
+++ b/src/ContentBundle/Form/Type/ContentType.php
@@ -86,8 +86,10 @@ class ContentType extends AbstractType
->add('publishAt', DateTimePickerType::class, [
'label' => 'label.publish_at',
'attr' => [
- 'help_text' => 'help.publish_at',
- ]
+ 'help_text' => 'help.publish_at',
+ 'class' => 'datetimepicker',
+ ],
+ 'required' => false
])
->add('parent', ContentParentType::class, [
'class' => $this->contentClass, | Set correct class on DateTimePickerType (#<I>) | Opifer_Cms | train | php |
06984808fa2e47e6797bf13f6b76c35a718dba00 | diff --git a/data_source_aws_s3_bucket_object.go b/data_source_aws_s3_bucket_object.go
index <HASH>..<HASH> 100644
--- a/data_source_aws_s3_bucket_object.go
+++ b/data_source_aws_s3_bucket_object.go
@@ -132,7 +132,7 @@ func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) e
log.Printf("[DEBUG] Reading S3 object: %s", input)
out, err := conn.HeadObject(&input)
if err != nil {
- return fmt.Errorf("Failed getting S3 object: %s", err)
+ return fmt.Errorf("Failed getting S3 object: %s Bucket: %q Object: %q", err, bucket, key)
}
if out.DeleteMarker != nil && *out.DeleteMarker == true {
return fmt.Errorf("Requested S3 object %q%s has been deleted", | provider/aws: more details on which s3 bucket had an error (#<I>)
* provider/aws: more details on which s3 bucket had an error
* provider/aws: s3 bucket data source adjust error output | terraform-providers_terraform-provider-aws | train | go |
d74ecdf86a3687cf2e9c85fdee449e4b96a7a77e | diff --git a/build.assets/tooling/cmd/check/main_test.go b/build.assets/tooling/cmd/check/main_test.go
index <HASH>..<HASH> 100644
--- a/build.assets/tooling/cmd/check/main_test.go
+++ b/build.assets/tooling/cmd/check/main_test.go
@@ -91,6 +91,15 @@ func TestCheckLatest(t *testing.T) {
wantErr: true,
},
{
+ desc: "fail-lexicographic",
+ tag: "v8.0.9",
+ releases: []string{
+ "v8.0.8",
+ "v8.0.10",
+ },
+ wantErr: true,
+ },
+ {
desc: "pass-new-releases",
tag: "v8.0.1",
releases: []string{ | Add an lexicographic test case
We are failing to sort properly when "9" is compared to "<I>". | gravitational_teleport | train | go |
bd20d6208824a36172cd01e161e9c0ed5ff58122 | diff --git a/scripts/build.js b/scripts/build.js
index <HASH>..<HASH> 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -1,5 +1,5 @@
const ncc = require("../src/index.js");
-const { statSync, writeFileSync, readFileSync } = require("fs");
+const { statSync, writeFileSync, readFileSync, unlinkSync } = require("fs");
const { promisify } = require("util");
const { relative } = require("path");
const copy = promisify(require("copy"));
@@ -7,6 +7,10 @@ const glob = promisify(require("glob"));
const bytes = require("bytes");
async function main() {
+ for (const file of await glob(__dirname + "/../dist/**/*.@(js|cache|ts)")) {
+ unlinkSync(file);
+ }
+
const { code: cli, assets: cliAssets } = await ncc(
__dirname + "/../src/cli",
{ | ensure build folder is cleared properly on each run (#<I>) | zeit_ncc | train | js |
d3b6ca95eeda468d634f4b445f719e7f1a1d8e49 | diff --git a/src/Speech/SpeechClient.php b/src/Speech/SpeechClient.php
index <HASH>..<HASH> 100644
--- a/src/Speech/SpeechClient.php
+++ b/src/Speech/SpeechClient.php
@@ -192,9 +192,6 @@ class SpeechClient
* `wordTimeOffsets` are returned with the top alternative. If
* `false` or omitted, no `wordTimeOffsets` are returned.
* **Defaults to** `false`.
- * **Whitelist Warning:** At the time of publication, this argument
- * is subject to a feature whitelist and may not be available in
- * your project.
* }
* @return array Result[]
* @throws \InvalidArgumentException
@@ -324,9 +321,6 @@ class SpeechClient
* `wordTimeOffsets` are returned with the top alternative. If
* `false` or omitted, no `wordTimeOffsets` are returned.
* **Defaults to** `false`.
- * **Whitelist Warning:** At the time of publication, this argument
- * is subject to a feature whitelist and may not be available in
- * your project.
* }
* @return Operation
* @throws \InvalidArgumentException | Remove whitelist comments from Speech wordTimeOffset feature (#<I>) | googleapis_google-cloud-php | train | php |
290a4cfddffd48c255b603b9e6869a5e7a30e4a0 | diff --git a/lib/deploy.rb b/lib/deploy.rb
index <HASH>..<HASH> 100644
--- a/lib/deploy.rb
+++ b/lib/deploy.rb
@@ -93,7 +93,11 @@ module Deploy
def set_aws_region!
# Set up AWS params, i.e. region.
- ::Aws.config.update(region: settings['aws_region'])
+ region = ENV['AWS_REGION'] || settings['aws_region']
+ if ENV['AWS_REGION'].empty?
+ log "Warning: ENV['AWS_REGION'] is not set, falling back to YML config."
+ end
+ ::Aws.config.update(region: region)
end
def configuration | Use AWS region from ENV var if possible and warn user if we can't | sealink_deploy_aws | train | rb |
cdb81fab3e9697404666c98fdaf087f616d8113f | diff --git a/packages/ember/tests/routing/basic_test.js b/packages/ember/tests/routing/basic_test.js
index <HASH>..<HASH> 100644
--- a/packages/ember/tests/routing/basic_test.js
+++ b/packages/ember/tests/routing/basic_test.js
@@ -1875,7 +1875,7 @@ test("Router accounts for rootURL on page load when using history location", fun
test("HistoryLocation has the correct rootURL on initState and webkit doesn't fire popstate on page load", function() {
expect(2);
- var rootURL = window.location.pathname + 'app',
+ var rootURL = window.location.pathname,
history,
HistoryTestLocation; | Fix HistoryLocation test for static site testing. | emberjs_ember.js | train | js |
279a835779baa4835fc56005d96bd009faca398b | diff --git a/app/controllers/file.js b/app/controllers/file.js
index <HASH>..<HASH> 100644
--- a/app/controllers/file.js
+++ b/app/controllers/file.js
@@ -53,6 +53,7 @@ FileController.prototype.downloadFile = function(opts) {
request.get(options)
.on("response", (res) => {
+ this.hasDownloadError = false;
if (res.statusCode == 200) {
this.writeFile(res);
this.emit("downloading"); | set hasDownloadError to false on response | Rise-Vision_rise-cache-v2 | train | js |
615b07f68b68d96ba4a89c58f2c611b698b2c672 | diff --git a/code/controllers/ExternalContentAdmin.php b/code/controllers/ExternalContentAdmin.php
index <HASH>..<HASH> 100644
--- a/code/controllers/ExternalContentAdmin.php
+++ b/code/controllers/ExternalContentAdmin.php
@@ -488,7 +488,7 @@ class ExternalContentAdmin extends LeftAndMain implements CurrentPageIdentifier,
}
public function SiteTreeAsUL() {
- $html = $this->getSiteTreeFor($this->stat('tree_class'), null, 'Children', 'NumChildren');
+ $html = $this->getSiteTreeFor($this->stat('tree_class'), null, null, 'NumChildren');
$this->extend('updateSiteTreeAsUL', $html);
return $html;
}
@@ -501,7 +501,7 @@ class ExternalContentAdmin extends LeftAndMain implements CurrentPageIdentifier,
$html = $this->getSiteTreeFor(
'ExternalContentItem',
$request->getVar('ID'),
- 'Children',
+ null,
'NumChildren',
null,
$request->getVar('minNodeCount') | Fixed the external page sub contents, which were not being displayed correctly. | nyeholt_silverstripe-external-content | train | php |
a50865b9f4c51f9947937854ac3272bebc8d7254 | diff --git a/clc-java-sdk/sdk/src/main/java/com/centurylink/cloud/sdk/servers/services/ServerService.java b/clc-java-sdk/sdk/src/main/java/com/centurylink/cloud/sdk/servers/services/ServerService.java
index <HASH>..<HASH> 100644
--- a/clc-java-sdk/sdk/src/main/java/com/centurylink/cloud/sdk/servers/services/ServerService.java
+++ b/clc-java-sdk/sdk/src/main/java/com/centurylink/cloud/sdk/servers/services/ServerService.java
@@ -349,7 +349,7 @@ public class ServerService {
public OperationFuture<Link> removePublicIp(String serverId, String publicIp) {
return baseServerResponse(
- client.removePublicIp(serverId, publicIp)
+ client.removePublicIp(serverId, publicIp)
);
}
@@ -367,11 +367,10 @@ public class ServerService {
}
private OperationFuture<Link> baseServerResponse(Link response) {
- return
- new OperationFuture<>(
- response,
- response.getId(),
- queueClient
- );
+ return new OperationFuture<>(
+ response,
+ response.getId(),
+ queueClient
+ );
}
}
\ No newline at end of file | <I> Implement possibilities to restore server from archived image | CenturyLinkCloud_clc-java-sdk | train | java |
f29598d9078957477f7b153ae9a0c0094fd1536e | diff --git a/lib/browser/chrome-extension.js b/lib/browser/chrome-extension.js
index <HASH>..<HASH> 100644
--- a/lib/browser/chrome-extension.js
+++ b/lib/browser/chrome-extension.js
@@ -7,7 +7,7 @@ const url = require('url')
var hostPathMap = {}
var hostPathMapNextKey = 0
-var getHostForPath = function (path) {
+var generateHostForPath = function (path) {
var key
key = 'extension-' + (++hostPathMapNextKey)
hostPathMap[key] = path
@@ -30,7 +30,7 @@ var getExtensionInfoFromPath = function (srcDirectory) {
page = url.format({
protocol: 'chrome-extension',
slashes: true,
- hostname: getHostForPath(srcDirectory),
+ hostname: generateHostForPath(srcDirectory),
pathname: manifest.devtools_page
})
extensionInfoMap[manifest.name] = { | getHostForPath => generateHostForPath
The original name implies no side effect, but is is not true. | electron_electron | train | js |
fd1cdcbfacbf0e7785d3ff64dbce51f818fa62e7 | diff --git a/src/components/mediator.js b/src/components/mediator.js
index <HASH>..<HASH> 100644
--- a/src/components/mediator.js
+++ b/src/components/mediator.js
@@ -6,4 +6,6 @@
* The mediator is a singleton for handling global events.
*/
-module.exports = require('../base/events');
+var Events = require('../base/events')
+
+module.exports = new Events()
diff --git a/src/main.js b/src/main.js
index <HASH>..<HASH> 100644
--- a/src/main.js
+++ b/src/main.js
@@ -5,6 +5,7 @@
var BaseObject = require('./base/base_object')
var CoreFactory = require('./components/core_factory')
var Loader = require('./components/loader')
+var Mediator = require('./components/mediator')
class Player extends BaseObject {
@@ -31,8 +32,8 @@ class Player extends BaseObject {
}
-global.DEBUG = true
+global.DEBUG = false
-window.WP3 = { Player: Player }
+window.WP3 = { Player: Player, Mediator: Mediator }
module.exports = window.WP3 | mediator: add mediator singleton to player namespace | clappr_clappr | train | js,js |
df01c27e29cbe723e1f4c110fe40a3ff61899af4 | diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/OWOWCache.java b/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/OWOWCache.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/OWOWCache.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/OWOWCache.java
@@ -1757,8 +1757,9 @@ public class OWOWCache extends OAbstractWriteCache implements OWriteCache, OCach
if (minLsn.compareTo(new OLogSequenceNumber(-1, -1)) > 0)
writeAheadLog.cutTill(minLsn);
- } catch (IOException ioe) {
- OLogManager.instance().error(this, "Error during fuzzy checkpoint", ioe);
+ } catch (IOException | RuntimeException e) {
+ OLogManager.instance().error(this, "Error during fuzzy checkpoint", e);
+ fireBackgroundDataFlushExceptionEvent(e);
}
OLogManager.instance().debug(this, "End fuzzy checkpoint"); | Exceptions are rethrown in PeriodicalFuzzyCheckpoint | orientechnologies_orientdb | train | java |
ec471bb4f56b5dff4676e97877670df7f82353ed | diff --git a/tensorflow_hub/keras_layer.py b/tensorflow_hub/keras_layer.py
index <HASH>..<HASH> 100644
--- a/tensorflow_hub/keras_layer.py
+++ b/tensorflow_hub/keras_layer.py
@@ -22,11 +22,15 @@ import tensorflow as tf
from tensorflow_hub import module_v2
-# pylint: disable=g-direct-tensorflow-import
+# pylint: disable=g-direct-tensorflow-import,g-import-not-at-top
from tensorflow.python.framework import smart_cond
-from tensorflow.python.training.tracking import data_structures
from tensorflow.python.util import tf_inspect
-# pylint: enable=g-direct-tensorflow-import
+
+try:
+ from tensorflow.python.trackable import data_structures
+except ImportError:
+ from tensorflow.python.training.tracking import data_structures
+# pylint: enable=g-direct-tensorflow-import,g-import-not-at-top
class KerasLayer(tf.keras.layers.Layer): | Fix TensorFlow checkpoint and trackable imports.
PiperOrigin-RevId: <I> | tensorflow_hub | train | py |
e648e1bde5d9a90572bb0866bbfa0ec71e65009a | diff --git a/javascript/example/DRACOLoader.js b/javascript/example/DRACOLoader.js
index <HASH>..<HASH> 100644
--- a/javascript/example/DRACOLoader.js
+++ b/javascript/example/DRACOLoader.js
@@ -76,7 +76,8 @@ THREE.DRACOLoader.prototype = {
console.log('Loaded a point cloud.');
}
} else {
- console.error('THREE.DRACOLoader: Unknown geometry type.');
+ const errorMsg = 'THREE.DRACOLoader: Unknown geometry type.'
+ console.error(errorMsg);
throw new Error(errorMsg);
}
return scope.convertDracoGeometryTo3JS(wrapper, geometryType, buffer,
@@ -124,7 +125,8 @@ THREE.DRACOLoader.prototype = {
const posAttId = wrapper.GetAttributeId(dracoGeometry,
dracoDecoder.POSITION);
if (posAttId == -1) {
- console.error('THREE.DRACOLoader: No position attribute found.');
+ const errorMsg = 'THREE.DRACOLoader: No position attribute found.';
+ console.error(errorMsg);
dracoDecoder.destroy(wrapper);
dracoDecoder.destroy(dracoGeometry);
throw new Error(errorMsg); | Make sure errorMsg is defined (#<I>) | google_draco | train | js |
534ef46cd5806ac77e7ae1f3b99b1dddea794b05 | diff --git a/lib/search_engine.py b/lib/search_engine.py
index <HASH>..<HASH> 100644
--- a/lib/search_engine.py
+++ b/lib/search_engine.py
@@ -67,6 +67,7 @@ from invenio.websearchadminlib import get_detailed_page_tabs
from invenio.intbitset import intbitset as HitSet
from invenio.webinterface_handler import wash_urlargd
from invenio.urlutils import make_canonical_urlargd
+from invenio.dbquery import DatabaseError
import invenio.template
webstyle_templates = invenio.template.load('webstyle') | Added missing import statement about DatabaseError. | inveniosoftware_invenio-records | train | py |
e090a1332f2a396505b379690c4ae703bd8d21ce | diff --git a/src/Message/AIMAbstractRequest.php b/src/Message/AIMAbstractRequest.php
index <HASH>..<HASH> 100644
--- a/src/Message/AIMAbstractRequest.php
+++ b/src/Message/AIMAbstractRequest.php
@@ -166,9 +166,7 @@ abstract class AIMAbstractRequest extends AbstractRequest
*/
public function getOpaqueDataDescriptor()
{
- return $this->getParameter('opaqueDataDescriptor')
- ? $this->getParameter('opaqueDataDescriptor')
- : $this->httpRequest->request->get('opaqueDataDescriptor');
+ return $this->getParameter('opaqueDataDescriptor');
}
/**
@@ -177,9 +175,7 @@ abstract class AIMAbstractRequest extends AbstractRequest
*/
public function getOpaqueDataValue()
{
- return $this->getParameter('opaqueDataValue')
- ? $this->getParameter('opaqueDataValue')
- : $this->httpRequest->request->get('opaqueDataValue');
+ return $this->getParameter('opaqueDataValue');
}
/** | Do not take opaque data from $_GET | thephpleague_omnipay-authorizenet | train | php |
c8032c086b7a5057a6daa9a0648317cae5d4f413 | diff --git a/tests/rules/test_line_length.py b/tests/rules/test_line_length.py
index <HASH>..<HASH> 100644
--- a/tests/rules/test_line_length.py
+++ b/tests/rules/test_line_length.py
@@ -14,6 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import sys
+try:
+ assert sys.version_info >= (2, 7)
+ import unittest
+except AssertionError:
+ import unittest2 as unittest
+
from tests.common import RuleTestCase
@@ -155,3 +162,16 @@ class LineLengthTestCase(RuleTestCase):
'content: |\n'
' {% this line is' + 99 * ' really' + ' long %}\n',
conf, problem=(3, 81))
+
+ @unittest.skipIf(sys.version_info < (3, 0), 'Python 2 not supported')
+ def test_unicode(self):
+ conf = 'line-length: {max: 53}'
+ self.check('---\n'
+ '# This is a test to check if “line-length” works nice\n'
+ 'with: “unicode characters” that span accross bytes! ↺\n',
+ conf)
+ conf = 'line-length: {max: 52}'
+ self.check('---\n'
+ '# This is a test to check if “line-length” works nice\n'
+ 'with: “unicode characters” that span accross bytes! ↺\n',
+ conf, problem1=(2, 53), problem2=(3, 53)) | line-length: Add tests for lines containing unicode characters
Some unicode characters span accross multiple bytes. Python 3 is OK with
that, but Python 2 reports an incorrect number of characters.
Related to <URL> | adrienverge_yamllint | train | py |
1a42c3bf607fdb51c6ed3fb2b8550c9b584223f2 | diff --git a/internal/service/cloud9/resource_aws_cloud9_environment_ec2.go b/internal/service/cloud9/resource_aws_cloud9_environment_ec2.go
index <HASH>..<HASH> 100644
--- a/internal/service/cloud9/resource_aws_cloud9_environment_ec2.go
+++ b/internal/service/cloud9/resource_aws_cloud9_environment_ec2.go
@@ -14,6 +14,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/conns"
tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
"github.com/hashicorp/terraform-provider-aws/internal/verify"
+ tfiam "github.com/hashicorp/terraform-provider-aws/internal/service/iam"
)
func ResourceEnvironmentEC2() *schema.Resource {
@@ -100,7 +101,7 @@ func resourceEnvironmentEC2Create(d *schema.ResourceData, meta interface{}) erro
}
var out *cloud9.CreateEnvironmentEC2Output
- err := resource.Retry(iamwaiter.PropagationTimeout, func() *resource.RetryError {
+ err := resource.Retry(tfiam.PropagationTimeout, func() *resource.RetryError {
var err error
out, err = conn.CreateEnvironmentEC2(params)
if err != nil { | cloud9: Export/un-export after move | terraform-providers_terraform-provider-aws | train | go |
29c6d7fdb0c0a68f2b96a448006c289bfc6f27fd | diff --git a/photutils/aperture/mask.py b/photutils/aperture/mask.py
index <HASH>..<HASH> 100644
--- a/photutils/aperture/mask.py
+++ b/photutils/aperture/mask.py
@@ -48,6 +48,33 @@ class ApertureMask:
"""
return self.data.shape
+ def get_overlap_slices(self, shape):
+ """
+ Get slices for the overlapping part of the aperture mask and a
+ 2D array.
+
+ Parameters
+ ----------
+ shape : 2-tuple of int
+ The shape of the 2D array.
+
+ Returns
+ -------
+ slices_large : tuple of slices or `None`
+ A tuple of slice objects for each axis of the large array,
+ such that ``large_array[slices_large]`` extracts the region
+ of the large array that overlaps with the small array.
+ `None` is returned if there is no overlap of the bounding
+ box with the given image shape.
+ slices_small : tuple of slices or `None`
+ A tuple of slice objects for each axis of the aperture mask
+ array such that ``small_array[slices_small]`` extracts the
+ region that is inside the large array. `None` is returned if
+ there is no overlap of the bounding box with the given image
+ shape.
+ """
+ return self.bbox.get_overlap_slices(shape)
+
def to_image(self, shape):
"""
Return an image of the mask in a 2D array of the given shape, | Add get_overlap_slices to ApertureMask | astropy_photutils | train | py |
8f28ad477f2de539c071a430394a55734537b8cc | diff --git a/api/opentrons/drivers/smoothie_drivers/driver_3_0.py b/api/opentrons/drivers/smoothie_drivers/driver_3_0.py
index <HASH>..<HASH> 100755
--- a/api/opentrons/drivers/smoothie_drivers/driver_3_0.py
+++ b/api/opentrons/drivers/smoothie_drivers/driver_3_0.py
@@ -65,7 +65,7 @@ GCODES = {'HOME': 'G28.2',
'DWELL': 'G4',
'CURRENT_POSITION': 'M114.2',
'LIMIT_SWITCH_STATUS': 'M119',
- 'PROBE': 'G38.2',
+ 'PROBE': 'G38.2 F420', # 420 mm/min (7 mm/sec) to avoid resonance
'ABSOLUTE_COORDS': 'G90',
'RELATIVE_COORDS': 'G91',
'RESET_FROM_ERROR': 'M999', | perf(api): Slightly increase probing speed, avoid resonance and pipette shaking (#<I>) | Opentrons_opentrons | train | py |
40636637deaddb335ad5bfac3ea1c2e8e3c2657f | diff --git a/src/FormUrlEncodedSerializer.php b/src/FormUrlEncodedSerializer.php
index <HASH>..<HASH> 100644
--- a/src/FormUrlEncodedSerializer.php
+++ b/src/FormUrlEncodedSerializer.php
@@ -15,7 +15,7 @@ namespace Aphiria\Serialization;
/**
* Defines the form URL-encoded serializer
*/
-final class FormUrlEncodedSerializer extends Serializer
+class FormUrlEncodedSerializer extends Serializer
{
/**
* @inheritdoc
diff --git a/src/JsonSerializer.php b/src/JsonSerializer.php
index <HASH>..<HASH> 100644
--- a/src/JsonSerializer.php
+++ b/src/JsonSerializer.php
@@ -17,7 +17,7 @@ use JsonException;
/**
* Defines a JSON serializer
*/
-final class JsonSerializer extends Serializer
+class JsonSerializer extends Serializer
{
/**
* @inheritdoc | Added full test coverage for Net library | aphiria_serialization | train | php,php |
bab19cd71819db5a93bfa5fcc3850514ef6e4913 | diff --git a/lib/build-manifest-writer.js b/lib/build-manifest-writer.js
index <HASH>..<HASH> 100644
--- a/lib/build-manifest-writer.js
+++ b/lib/build-manifest-writer.js
@@ -28,6 +28,6 @@ function updateManifest(results, manifest, { baseURI }) {
}
function writeManifest(results, manifest, manifestConfig) {
- return createFile(manifestConfig.file, JSON.stringify(manifest)).
+ return createFile(manifestConfig.file, `${JSON.stringify(manifest)}\n`).
then(_ => results);
} | Write a newline at the end of the manifest | faucet-pipeline_faucet-pipeline-sass | train | js |
b2c5f91c29fb7d0a044c78da1c7414fb95f65345 | diff --git a/lib/traject/solr_json_writer.rb b/lib/traject/solr_json_writer.rb
index <HASH>..<HASH> 100644
--- a/lib/traject/solr_json_writer.rb
+++ b/lib/traject/solr_json_writer.rb
@@ -240,7 +240,7 @@ class Traject::SolrJsonWriter
if @max_skipped and skipped_record_count > @max_skipped
# re-raising in rescue means the last encountered error will be available as #cause
# on raised exception, a feature in ruby 2.1+.
- raise MaxSkippedRecordsExceeded.new("#{self.class.name}: Exceeded maximum number of skipped records (#{@max_skipped}): aborting")
+ raise MaxSkippedRecordsExceeded.new("#{self.class.name}: Exceeded maximum number of skipped records (#{@max_skipped}): aborting: #{exception.message}")
end
end
end | Add last-exception message to MaxSkippedExceeded message
Tries to make #<I> less painful. | traject_traject | train | rb |
47281f7ede2276f4644759909f2a962ce8cad162 | diff --git a/course/lib.php b/course/lib.php
index <HASH>..<HASH> 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -3210,7 +3210,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
);
// Include course dragdrop
- if ($course->id != $SITE->id) {
+ if (course_format_uses_sections($course->format)) {
$PAGE->requires->yui_module('moodle-course-dragdrop', 'M.course.init_section_dragdrop',
array(array(
'courseid' => $course->id,
@@ -3248,8 +3248,8 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
'emptydragdropregion'
), 'moodle');
- // Include format-specific strings
- if ($course->id != $SITE->id) {
+ // Include section-specific strings for formats which support sections.
+ if (course_format_uses_sections($course->format)) {
$PAGE->requires->strings_for_js(array(
'showfromothers',
'hidefromothers', | MDL-<I> JavaScript: Correct checks for section support to use helper function | moodle_moodle | train | php |
610ef886624029d0c4254e7a3a2c853ec3f9f7c4 | diff --git a/container/lxc/lxc.go b/container/lxc/lxc.go
index <HASH>..<HASH> 100644
--- a/container/lxc/lxc.go
+++ b/container/lxc/lxc.go
@@ -303,7 +303,7 @@ func (manager *containerManager) CreateContainer(
if derr := lxcContainer.Destroy(); derr != nil {
// if an error is reported there is probably a leftover
// container that the user should clean up manually
- return nil, nil, errors.Annotate(err, "container failed to start and failed to destroy: use \"sudo lxc-destroy "+lxcContainer.Name()+"\" to destroy the leftover container")
+ return nil, nil, errors.Annotate(err, "container failed to start and failed to destroy: manual cleanup of containers needed")
}
return nil, nil, errors.Wrap(err, instance.NewRetryableCreationError("container failed to start and was destroyed: "+lxcContainer.Name()))
} | Changed the error message in case we fail to destroy the container that did not start. | juju_juju | train | go |
08648f557a548fafe3382b28e87d8a0c13513e4b | diff --git a/examples/v3/payment-methods/update-payment-methods.php b/examples/v3/payment-methods/update-payment-methods.php
index <HASH>..<HASH> 100644
--- a/examples/v3/payment-methods/update-payment-methods.php
+++ b/examples/v3/payment-methods/update-payment-methods.php
@@ -11,9 +11,9 @@ $connnect = (new Connect('4e49de80-1670-4606-84f8-2f1d33a38670'))->detectMode();
$parameter = array(
'collection_id' => 'bbrgyvvo',
'payment_methods' => array(
- ['code' => 'fpx'],
- ['code' => 'billplz'],
- ['code' => 'boost'],
+ ['payment_methods[][code]' => 'fpx'],
+ ['payment_methods[][code]' => 'billplz'],
+ ['payment_methods[][code]' => 'boost'],
)
); | Update update-payment-methods.php | Billplz_Billplz-API-Class | train | php |
06c1cdc440882b6b3b0cc43a252b0297c76f1634 | diff --git a/simpleyapsy/file_locator.py b/simpleyapsy/file_locator.py
index <HASH>..<HASH> 100644
--- a/simpleyapsy/file_locator.py
+++ b/simpleyapsy/file_locator.py
@@ -96,4 +96,5 @@ class FileLocator(object):
# alias out to meet <80 character line pep req
abspath = os.path.abspath
self.plugin_directories = [abspath(x) for x in self.plugin_directories]
- self.plugin_directories = set(self.plugin_directories)
+ # casting to set removes dups, casting back to list for type
+ self.plugin_directories = list(set(self.plugin_directories)) | leaving plugin dirs as list, not set | benhoff_pluginmanager | train | py |
6e7da83802d2a023c6b8ff6881861ee6701b7b1e | diff --git a/badger/util.go b/badger/util.go
index <HASH>..<HASH> 100644
--- a/badger/util.go
+++ b/badger/util.go
@@ -21,6 +21,7 @@ import (
"io/ioutil"
"math/rand"
"sync/atomic"
+ "time"
"github.com/dgraph-io/badger/table"
"github.com/dgraph-io/badger/y"
@@ -150,3 +151,7 @@ func mod65535(a uint32) uint32 {
func newCASCounter() uint16 {
return uint16(1 + mod65535(rand.Uint32()))
}
+
+func init() {
+ rand.Seed(time.Now().UnixNano())
+} | Seed rand, so that it generates new CAS counters every run. | dgraph-io_badger | train | go |
dba5f3f74d340b79077ad335fff48015c61c69af | diff --git a/Project/src/Controller/HomeController.php b/Project/src/Controller/HomeController.php
index <HASH>..<HASH> 100644
--- a/Project/src/Controller/HomeController.php
+++ b/Project/src/Controller/HomeController.php
@@ -1,27 +1,26 @@
<?php
-// *************************** \\
-// ***** HOME CONTROLLER ***** \\
-// *************************** \\
-
namespace App\Controller;
+use Twig\Error\LoaderError;
+use Twig\Error\RuntimeError;
+use Twig\Error\SyntaxError;
use Pam\Controller\Controller;
-
-/** *****************************\
-* All control actions to the home
-*/
+/**
+ * Class HomeController
+ * @package App\Controller
+ */
class HomeController extends Controller
{
-
- /** ******************\
- * Render the main view
- * @return mixed => the rendering of the view home
- */
- public function IndexAction()
+ /**
+ * @return string
+ * @throws LoaderError
+ * @throws RuntimeError
+ * @throws SyntaxError
+ */
+ public function IndexAction()
{
- // Returns the rendering of the view home
return $this->render('home.twig');
}
} | Remove useless comments & add @throws / use to project HomeController | philippebeck_pam | train | php |
31521389ab5661475882ca17be70d0b59a2b4e7a | diff --git a/umap/tests/test_umap_on_iris.py b/umap/tests/test_umap_on_iris.py
index <HASH>..<HASH> 100644
--- a/umap/tests/test_umap_on_iris.py
+++ b/umap/tests/test_umap_on_iris.py
@@ -96,8 +96,8 @@ def test_umap_transform_on_iris_modified_dtype(iris, iris_selection):
trust = trustworthiness(new_data, embedding, 10)
assert_greater_equal(
trust,
- 0.89,
- "Insufficiently trustworthy transform for" "iris dataset: {}".format(trust),
+ 0.87,
+ "Insufficiently trustworthy transform for iris dataset: {}".format(trust),
) | Lessen trustworthiness UMAP on Iris - failing on some platforms | lmcinnes_umap | train | py |
986530969f0a2ad8b4cc9a02e79678162b22c77b | diff --git a/js/core/TooltipManager.js b/js/core/TooltipManager.js
index <HASH>..<HASH> 100644
--- a/js/core/TooltipManager.js
+++ b/js/core/TooltipManager.js
@@ -6,6 +6,9 @@ define(["js/core/Component", "js/html/HtmlElement"], function (Component, HtmlEl
position: "absolute",
manager: null
},
+
+ $classAttributes: ["manager"],
+
hide: function () {
this.$.manager && this.$.manager.hideTooltip(this);
} | added manager to classAttributes | rappid_rAppid.js | train | js |
c6661ce29e15c417810bca94a41f6df6feae8ad2 | diff --git a/lib/rest-graph.rb b/lib/rest-graph.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-graph.rb
+++ b/lib/rest-graph.rb
@@ -10,7 +10,7 @@ class RestGraph
self.server = o[:server] || 'https://graph.facebook.com/'
self.accept = o[:accept] || 'text/javascript'
self.lang = o[:lang] || 'en-us'
- self.auto_decode = o[:auto_decode] || true
+ self.auto_decode = o.key?(:auto_decode) ? o[:auto_decode] : true
if auto_decode
begin | rest-graph.rb: fix respecting auto_decode option | godfat_rest-core | train | rb |
7e6b4cfa8d73da691bb49c18ae58f0f7eaaa54fe | diff --git a/src/CognosRequest.js b/src/CognosRequest.js
index <HASH>..<HASH> 100644
--- a/src/CognosRequest.js
+++ b/src/CognosRequest.js
@@ -340,9 +340,7 @@ class CognosRequest {
result = response;
} else {
try {
- result = response.replace(/=\\'/g, "='");
- result = result.replace(/\\']/g, "']");
- result = JSON.parse(result);
+ result = response.data;
} catch (err) {
me.log('No valid JSON returned from delete request. ' + path);
result = response; | fix: Made http delete request return better information | CognosExt_jcognos | train | js |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.