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 |
|---|---|---|---|---|---|
6ea4e7612b77eec000a1ee832bdb39545a015a60 | diff --git a/demos/chat/chat.js b/demos/chat/chat.js
index <HASH>..<HASH> 100644
--- a/demos/chat/chat.js
+++ b/demos/chat/chat.js
@@ -1,7 +1,7 @@
// TODO refactor this code into a UI and non-UI part.
var CHANNEL = "#orbited"
-var IRC_SERVER = 'localhost'
+var IRC_SERVER = 'irc.freenode.net'
var IRC_PORT = 6667
var orig_domain = document.domain; | make the chat work on the orbited website | gameclosure_js.io | train | js |
18da9ef6eec3738a1a6fbb9dbed20bfbdfa32bf0 | diff --git a/salt/modules/status.py b/salt/modules/status.py
index <HASH>..<HASH> 100644
--- a/salt/modules/status.py
+++ b/salt/modules/status.py
@@ -11,7 +11,7 @@ import fnmatch
# Import salt libs
import salt.utils
-from salt.utils.network import remote_port_tcp
+from salt.utils.network import remote_port_tcp as _remote_port_tcp
import salt.utils.event
import salt.config
@@ -547,12 +547,20 @@ def version():
def master():
'''
- Fire an event if the minion gets disconnected from its master
- This function is meant to be run via a scheduled job from the minion
+ .. versionadded:: Helium
+
+ Fire an event if the minion gets disconnected from its master. This
+ function is meant to be run via a scheduled job from the minion
+
+ CLI Example:
+
+ .. code-block:: bash
+
+ salt '*' status.master
'''
ip = __salt__['config.option']('master')
port = int(__salt__['config.option']('publish_port'))
- ips = remote_port_tcp(port)
+ ips = _remote_port_tcp(port)
if ip not in ips:
event = salt.utils.event.get_event('minion', opts=__opts__, listen=False) | Fix failing tests for missing docstrings
Also change an imported function to a private function so that it is
not exposed in __salt__. | saltstack_salt | train | py |
b43a73f9b40d10635a4ec4409694c95ca1b5a348 | diff --git a/src/geo/data-providers/geojson/geojson-data-provider.js b/src/geo/data-providers/geojson/geojson-data-provider.js
index <HASH>..<HASH> 100644
--- a/src/geo/data-providers/geojson/geojson-data-provider.js
+++ b/src/geo/data-providers/geojson/geojson-data-provider.js
@@ -87,7 +87,7 @@ GeoJSONDataProvider.prototype.generateDataForDataview = function (dataview, feat
GeoJSONDataProvider.prototype.applyFilter = function (columnName, filter) {
if (filter instanceof CategoryFilter) {
if (filter.isEmpty()) {
- this._vectorLayerView.applyFilter(this._layerIndex, 'reject', { column: columnName, values: 'all' });
+ this._vectorLayerView.applyFilter(this._layerIndex, 'accept', { column: columnName, values: 'all' });
} else if (filter.get('rejectAll')) {
this._vectorLayerView.applyFilter(this._layerIndex, 'reject', { column: columnName, values: 'all' });
} else if (filter.acceptedCategories.size()) { | Empty filter means all category must be accepted | CartoDB_carto.js | train | js |
c085312c9c5145b95033d5b062a3b4022d8fce33 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ setup(
url='https://github.com/alexandershov/mess',
keywords=['utilities', 'iterators'],
classifiers=[
- 'Programming Language :: Python :: 2.7'
+ 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4'
],
) | Add missing comma
Classifiers were concatenated. | alexandershov_mess | train | py |
284ec1d4282e3ff726157cfa1bd90f19dcf2a8f5 | diff --git a/pkg/api/index.go b/pkg/api/index.go
index <HASH>..<HASH> 100644
--- a/pkg/api/index.go
+++ b/pkg/api/index.go
@@ -41,7 +41,7 @@ func (hs *HTTPServer) getProfileNode(c *models.ReqContext) *dtos.NavLink {
}
children = append(children, &dtos.NavLink{
- Text: "Notification history", Id: "profile/notifications", Url: hs.Cfg.AppSubURL + "profile/notifications", Icon: "bell",
+ Text: "Notification history", Id: "profile/notifications", Url: hs.Cfg.AppSubURL + "/profile/notifications", Icon: "bell",
})
if setting.AddChangePasswordLink() { | Profile: Fix nav tree link to notifications (#<I>) | grafana_grafana | train | go |
38870f6d32d956bfa2bc4727039b0cbcde814062 | diff --git a/lib/util/pig-hint.js b/lib/util/pig-hint.js
index <HASH>..<HASH> 100644
--- a/lib/util/pig-hint.js
+++ b/lib/util/pig-hint.js
@@ -29,7 +29,7 @@
if (!context) var context = [];
context.push(tprop);
- completionList = getCompletions(token, context);
+ var completionList = getCompletions(token, context);
completionList = completionList.sort();
//prevent autocomplete for last word, instead show dropdown with one word
if(completionList.length == 1) { | Add missing 'var' declaration. | codemirror_CodeMirror | train | js |
700970475c01f60490f6d05e7a94275ede704c37 | diff --git a/lib/puppet/transaction/resource_harness.rb b/lib/puppet/transaction/resource_harness.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/transaction/resource_harness.rb
+++ b/lib/puppet/transaction/resource_harness.rb
@@ -74,7 +74,7 @@ class Puppet::Transaction::ResourceHarness
resource[param] = value
audited << param
else
- resource.notice "Storing newly-audited value #{current[param]} for #{param}"
+ resource.info "Storing newly-audited value #{current[param]} for #{param}"
cache(resource, param, current[param])
end
end
diff --git a/spec/unit/transaction/resource_harness_spec.rb b/spec/unit/transaction/resource_harness_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/transaction/resource_harness_spec.rb
+++ b/spec/unit/transaction/resource_harness_spec.rb
@@ -50,7 +50,7 @@ describe Puppet::Transaction::ResourceHarness do
end
it "should cache and log the current value if no cached values are present" do
- @resource.expects(:notice)
+ @resource.expects(:info)
@harness.copy_audited_parameters(@resource, {:mode => "755"}).should == []
@harness.cached(@resource, :mode).should == "755" | Fix for #<I> "Storing newly-audited value" messages
They're semantically info, not notifications, and now are handled as such. | puppetlabs_puppet | train | rb,rb |
dcfa4c02e4966fb8e9c2fd4061b1798c7a9ffbdc | diff --git a/lib/ProMotion/repl/repl.rb b/lib/ProMotion/repl/repl.rb
index <HASH>..<HASH> 100644
--- a/lib/ProMotion/repl/repl.rb
+++ b/lib/ProMotion/repl/repl.rb
@@ -6,7 +6,7 @@ if RUBYMOTION_ENV == "development"
if opts == false || opts.to_s.downcase == "off"
"Live reloading of PM screens is now off."
else
- @screen_timer = pm_live_watch("#{pm_app_root_path}/app/screens/**/*.rb", opts) do |reloaded_file, new_code|
+ @screen_timer = pm_live_watch("app/screens/**/*.rb", opts) do |reloaded_file, new_code|
screen_names = pm_parse_screen_names(new_code)
puts "Reloaded #{screen_names.join(", ")} #{screen}." if opts[:debug]
vcs = pm_all_view_controllers(UIApplication.sharedApplication.delegate.window.rootViewController)
@@ -25,7 +25,7 @@ if RUBYMOTION_ENV == "development"
def pm_live_watch(path_query, opts={}, &callback)
# Get list of screen files
puts path_query if opts[:debug]
- live_file_paths = Dir.glob(path_query)
+ live_file_paths = Dir.glob("#{pm_app_root_path}/#{path_query}")
puts live_file_paths if opts[:debug]
live_files = live_file_paths.inject({}) do |out, live_file_path_file| | Move root path into pm_live_watch | infinitered_ProMotion | train | rb |
c213fbc0b1510f66b1fb352bf464aac57382674d | diff --git a/ykman/cli/info.py b/ykman/cli/info.py
index <HASH>..<HASH> 100644
--- a/ykman/cli/info.py
+++ b/ykman/cli/info.py
@@ -51,12 +51,13 @@ def info(ctx):
click.echo('Device capabilities:')
for c in CAPABILITY:
- if c & dev.capabilities:
- if c & dev.enabled:
- status = 'Enabled'
+ if c != CAPABILITY.NFC: # For now, don't expose NFC Capability
+ if c & dev.capabilities:
+ if c & dev.enabled:
+ status = 'Enabled'
+ else:
+ status = 'Disabled'
else:
- status = 'Disabled'
- else:
- status = 'Not available'
+ status = 'Not available'
- click.echo(' {0.name}:\t{1}'.format(c, status))
+ click.echo(' {0.name}:\t{1}'.format(c, status)) | Don't expose NFC capability in CLI | Yubico_yubikey-manager | train | py |
208115268994e718a622ec86034f27aa528e82b3 | diff --git a/lib/formatter/response.js b/lib/formatter/response.js
index <HASH>..<HASH> 100644
--- a/lib/formatter/response.js
+++ b/lib/formatter/response.js
@@ -37,31 +37,6 @@ function Result(data, errCode, errMsg) {
this.isFailure = function () {
return !this.isSuccess();
};
-
- // Format data to hash
- this.toHash = function () {
- const s = {};
- if (this.success) {
- s.success = true;
- s.data = this.data;
- } else {
- s.success = false;
- if ( this.data instanceof Object && Object.keys( this.data ).length > 0 ) {
- //Error with data case.
- s.data = this.data;
- }
- s.err = this.err;
- }
-
- return s;
- };
-
- // Render final error or success response
- this.renderResponse = function (res, status) {
- status = status || 200;
- logger.requestCompleteLog(status);
- return res.status(status).json(this.toHash());
- };
}
/** | Removed unnecessary file from response helper | OpenSTFoundation_openst-platform | train | js |
4ab51e921585e3875674bd656c292c2de2a6dac1 | diff --git a/alot/widgets/globals.py b/alot/widgets/globals.py
index <HASH>..<HASH> 100644
--- a/alot/widgets/globals.py
+++ b/alot/widgets/globals.py
@@ -111,9 +111,6 @@ class CompleteEdit(urwid.Edit):
self.set_edit_text(ctext)
self.set_edit_pos(cpos)
else:
- self.edit_pos += 1
- if self.edit_pos >= len(self.edit_text):
- self.edit_text += ' '
self.completions = None
elif key in ['up', 'down']:
if self.history: | tune CompleteEdit:
don't insert spaces in case the completions set is unary
(no results found) | pazz_alot | train | py |
4697304a4c2b2fee22fb496c6ea15e7206852ebc | diff --git a/user/edit.php b/user/edit.php
index <HASH>..<HASH> 100644
--- a/user/edit.php
+++ b/user/edit.php
@@ -100,6 +100,10 @@
//create form
$userform = new user_edit_form();
+ if (empty($user->country)) {
+ // MDL-16308 - we must unset the value here so $CFG->country can be used as default one
+ unset($user->country);
+ }
$userform->set_data($user);
$email_changed = false; | MDL-<I> Use default country instead of empty one when some external auth source (LDAP, POP3 etc) is used. Merged from <I> | moodle_moodle | train | php |
36af2d8da6e4e2fd7755eac0b5bcacb9b108163a | diff --git a/zish/core.py b/zish/core.py
index <HASH>..<HASH> 100644
--- a/zish/core.py
+++ b/zish/core.py
@@ -18,10 +18,13 @@ class ZishException(Exception):
class ZishLocationException(ZishException):
- def __init__(self, line, character, message):
+ def __init__(self, line, character, description):
super().__init__(
"Problem at line " + str(line) + " and character " +
- str(character) + ": " + message)
+ str(character) + ": " + description)
+ self.description = description
+ self.line = line
+ self.character = character
# Single character tokens | Line and character numbers unavailable in errors
Now they're available as the properties 'line' and 'character' on
ZishLocationException. The description of the exception is available as
the property 'description'. | tlocke_zish_python | train | py |
8c768577fd37d8e1e9482f2a73370b51ced15534 | diff --git a/src/handleActions.js b/src/handleActions.js
index <HASH>..<HASH> 100644
--- a/src/handleActions.js
+++ b/src/handleActions.js
@@ -8,7 +8,7 @@ import { flattenReducerMap } from './flattenUtils';
export default function handleActions(handlers, defaultState, { namespace } = {}) {
invariant(
isPlainObject(handlers),
- 'Expected handlers to be an plain object.'
+ 'Expected handlers to be a plain object.'
);
const flattenedReducerMap = flattenReducerMap(handlers, namespace);
const reducers = ownKeys(flattenedReducerMap).map(type => | Correct the typo in src/handleActions.js (#<I>) | redux-utilities_redux-actions | train | js |
68ca53c513c1c59e5579dbd303254bce6faef5ac | diff --git a/synapse/tests/test_lib_lmdbslab.py b/synapse/tests/test_lib_lmdbslab.py
index <HASH>..<HASH> 100644
--- a/synapse/tests/test_lib_lmdbslab.py
+++ b/synapse/tests/test_lib_lmdbslab.py
@@ -251,7 +251,7 @@ class LmdbSlabTest(s_t_utils.SynTest):
info0 = guidstor.gen('aaaa')
info0.set('hehe', 20)
- # now imagine we've thrown away info0 and are loading again...
-
+ async with await s_lmdbslab.Slab.anit(path) as slab:
+ guidstor = s_lmdbslab.GuidStor(slab, 'guids')
info1 = guidstor.gen('aaaa')
self.eq(20, info1.get('hehe')) | Actually ensure that GuidStor persists | vertexproject_synapse | train | py |
a851344d0bf3bda5580c0b60ce939cabc15a7d27 | diff --git a/src/connect.php b/src/connect.php
index <HASH>..<HASH> 100755
--- a/src/connect.php
+++ b/src/connect.php
@@ -336,9 +336,9 @@ function customMail ($target, $subject, $msg)
$mail->Subject = $subject;
$mail->Body = $msg;
- var_dump ($mail);
-
- $mail->Send ();
+ if(!$mail->send()) {
+ throw new \Exception("Mail could not be send: " . $mail->ErrorInfo);
+ }
}
/* | FIxing phpmailer? I hope? | CatLabInteractive_dolumar-engine | train | php |
2c49086d709832beae0b5706ba4ecde14c5adbe1 | diff --git a/lib/deep_cover/auto_run.rb b/lib/deep_cover/auto_run.rb
index <HASH>..<HASH> 100644
--- a/lib/deep_cover/auto_run.rb
+++ b/lib/deep_cover/auto_run.rb
@@ -30,19 +30,16 @@ module DeepCover
def after_tests
use_at_exit = true
if defined?(Minitest)
- puts "Registering with Minitest"
use_at_exit = false
Minitest.after_run { yield }
end
if defined?(Rspec)
use_at_exit = false
- puts "Registering with Rspec"
RSpec.configure do |config|
config.after(:suite) { yield }
end
end
if use_at_exit
- puts "Using at_exit"
at_exit { yield }
end
end | Don't output anything from auto_run.
Some tests might fail just because of that | deep-cover_deep-cover | train | rb |
c068eabc8d394afd4e4e5f6ab9f5e1a5c29ec827 | diff --git a/graylog2-server/src/main/java/org/graylog2/inputs/syslog/SyslogProcessor.java b/graylog2-server/src/main/java/org/graylog2/inputs/syslog/SyslogProcessor.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog2/inputs/syslog/SyslogProcessor.java
+++ b/graylog2-server/src/main/java/org/graylog2/inputs/syslog/SyslogProcessor.java
@@ -120,7 +120,10 @@ public class SyslogProcessor {
* |° loooooooooooooooooooooooooooooooool
* °L| L|
* () ()
- *
+ *
+ *
+ * http://open.spotify.com/track/2ZtQKBB8wDTtPPqDZhy7xZ
+ *
*/
SyslogServerEventIF e; | annotate roflcopter with a proper spotify link | Graylog2_graylog2-server | train | java |
0e4a6184ee642269369b530a9820bef4bcd16123 | diff --git a/dallinger/mturk.py b/dallinger/mturk.py
index <HASH>..<HASH> 100644
--- a/dallinger/mturk.py
+++ b/dallinger/mturk.py
@@ -259,6 +259,10 @@ class MTurkService(object):
template = u"https://mturk-requester.{}.amazonaws.com"
return template.format(self.region_name)
+ def account_balance(self):
+ response = self.mturk.get_account_balance()
+ return float(response["AvailableBalance"])
+
def check_credentials(self):
"""Verifies key/secret/host combination by making a balance inquiry"""
try:
diff --git a/tests/test_mturk.py b/tests/test_mturk.py
index <HASH>..<HASH> 100644
--- a/tests/test_mturk.py
+++ b/tests/test_mturk.py
@@ -470,6 +470,10 @@ class TestMTurkService(object):
time.sleep(1)
return True
+ def test_account_balance(self, mturk):
+ balance = mturk.account_balance()
+ assert balance == 10000.0
+
def test_check_credentials_good_credentials(self, mturk):
is_authenticated = mturk.check_credentials()
assert is_authenticated | Implementation of account_balance() for MTurkService | Dallinger_Dallinger | train | py,py |
7a5d3e8be8599b9765c517129473f2ff35abf847 | diff --git a/src/HostBox/Api/PayU/PayU.php b/src/HostBox/Api/PayU/PayU.php
index <HASH>..<HASH> 100644
--- a/src/HostBox/Api/PayU/PayU.php
+++ b/src/HostBox/Api/PayU/PayU.php
@@ -27,6 +27,14 @@ class PayU {
* @param IRequest $request
* @return string
*/
+ public function getRequestUrl(IRequest $request) {
+ return $this->connection->getUrl($request);
+ }
+
+ /**
+ * @param IRequest $request
+ * @return string
+ */
public function rawRequest(IRequest $request) {
return $this->connection->request($request);
} | Add getRequestUrl (required for form action) | HostBox_api-PayU | train | php |
cd76a50736b73536c6aeadef6df111b50c5ce008 | diff --git a/lib/voice/VoiceConnection.js b/lib/voice/VoiceConnection.js
index <HASH>..<HASH> 100644
--- a/lib/voice/VoiceConnection.js
+++ b/lib/voice/VoiceConnection.js
@@ -312,12 +312,14 @@ class VoiceConnection extends EventEmitter {
break;
}
case VoiceOPCodes.DISCONNECT: {
- // opusscript requires manual cleanup
- if(this.opus[packet.d.user_id] && this.opus[packet.d.user_id].delete) {
- this.opus[packet.d.user_id].delete();
- }
+ if(this.opus) {
+ // opusscript requires manual cleanup
+ if(this.opus[packet.d.user_id] && this.opus[packet.d.user_id].delete) {
+ this.opus[packet.d.user_id].delete();
+ }
- delete this.opus[packet.d.user_id];
+ delete this.opus[packet.d.user_id];
+ }
/**
* Fired when a user disconnects from the voice server | Fix crash when handling voice user disconnect (#<I>) | abalabahaha_eris | train | js |
aa7dbbd8eb8d635e34ff418dab448193e4c7d010 | diff --git a/ipmag.py b/ipmag.py
index <HASH>..<HASH> 100755
--- a/ipmag.py
+++ b/ipmag.py
@@ -32,6 +32,21 @@ def igrf(input_list):
return Dir
+def fisher_mean(dec,inc):
+ """
+ Calculates the Fisher mean and associated parameters from a list of
+ declination values and a separate list of inclination values (which are
+ in order such that they are paired with one another)
+
+ Arguments
+ ----------
+ dec : list with declination values
+ inc : list with inclination values
+ """
+ di_block = make_di_block(dec,inc)
+ return pmag.fisher_mean(di_block)
+
+
def fishrot(k=20,n=100,Dec=0,Inc=90):
"""
Generates Fisher distributed unit vectors from a specified distribution | add ipmag fisher_mean function that accepts list of dec and list of inc instead of di_block | PmagPy_PmagPy | train | py |
b3ab693c7a3992494b28eba26078886ffe49f276 | diff --git a/src/SearchParameters/index.js b/src/SearchParameters/index.js
index <HASH>..<HASH> 100644
--- a/src/SearchParameters/index.js
+++ b/src/SearchParameters/index.js
@@ -52,7 +52,7 @@ var RefinementList = require('./RefinementList');
* for the properties of a new SearchParameters
* @see SearchParameters.make
* @example <caption>SearchParameters of the first query in
- * <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption>
+ * <a href="http://demos.algolia.com/instant-search-demo/">the instant search demo</a></caption>
{
"query": "",
"disjunctiveFacets": [ | docs(SearchParameters): fix broken link | algolia_algoliasearch-helper-js | train | js |
ffd7f33996c3ac73a34b0f6b5f579916f18493f5 | diff --git a/pylint_django/transforms/transforms/django_core_handlers_wsgi.py b/pylint_django/transforms/transforms/django_core_handlers_wsgi.py
index <HASH>..<HASH> 100644
--- a/pylint_django/transforms/transforms/django_core_handlers_wsgi.py
+++ b/pylint_django/transforms/transforms/django_core_handlers_wsgi.py
@@ -3,3 +3,4 @@ from django.core.handlers.wsgi import WSGIRequest as WSGIRequestOriginal
class WSGIRequest(WSGIRequestOriginal):
status_code = None
+ content = '' | Add content field to WSGIRequest proxy | PyCQA_pylint-django | train | py |
3a95e55786974223e2eb51c0681bc3457057cbeb | diff --git a/packages/grpc-native-core/src/client_interceptors.js b/packages/grpc-native-core/src/client_interceptors.js
index <HASH>..<HASH> 100644
--- a/packages/grpc-native-core/src/client_interceptors.js
+++ b/packages/grpc-native-core/src/client_interceptors.js
@@ -51,7 +51,7 @@
* `halfClose(next)`
* * To continue, call next().
*
- * `cancel(message, next)`
+ * `cancel(next)`
* * To continue, call next().
*
* A listener is a POJO with one or more of the following methods:
@@ -109,7 +109,7 @@
* halfClose: function(next) {
* next();
* },
- * cancel: function(message, next) {
+ * cancel: function(next) {
* next();
* }
* }); | message parameter was removed from cancel requester description | grpc_grpc-node | train | js |
8d21b1850c444626e5703da99960cd5bdce3f7bb | diff --git a/examples/push_pull.py b/examples/push_pull.py
index <HASH>..<HASH> 100755
--- a/examples/push_pull.py
+++ b/examples/push_pull.py
@@ -3,7 +3,7 @@
"""
Example txzmq client.
- examples/push_pull.py --method=bind --endpoint=ipc:///tmp/sock
+ examples/push_pull.py --method=connect --endpoint=ipc:///tmp/sock
--mode=push
examples/push_pull.py --method=bind --endpoint=ipc:///tmp/sock | Changed arguments to the example run commands so that push would actually work :) | smira_txZMQ | train | py |
a48cc84a4f70b0775ddf55e2ed054926d7fc9dd1 | diff --git a/nanoplot/version.py b/nanoplot/version.py
index <HASH>..<HASH> 100644
--- a/nanoplot/version.py
+++ b/nanoplot/version.py
@@ -1 +1 @@
-__version__ = "1.29.2"
+__version__ = "1.29.3"
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ setup(
'matplotlib>=3.1.3',
'nanoget>=1.9.0',
'nanomath>=0.23.1',
- "pauvre==0.1.86",
+ "pauvre==0.2.0",
'plotly>=4.1.0',
],
package_data={'NanoPlot': []}, | changing minimal version of pauvre to <I>
reported in <URL> | wdecoster_NanoPlot | train | py,py |
c7a129b0c076929c7fd52e62c51391d8e9c9db90 | diff --git a/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java b/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java
index <HASH>..<HASH> 100644
--- a/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java
+++ b/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java
@@ -72,7 +72,13 @@ public class GoogleWebView implements IRhoWebView {
// @Override
// public void run() {
Logger.I(TAG, "Web settings is applying now >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
-
+ try{
+ WebSettings webSettings = mWebView.getSettings();
+ webSettings.setStandardFontFamily(RhoConf.getString("fontFamily"));
+ }
+ catch(Exception excp){
+
+ }
double z = getConfig().getDouble(WebViewConfig.PAGE_ZOOM);
mWebView.setInitialScale((int)(z * 100));
mWebView.setVerticalScrollBarEnabled(true); | Code fix for SR id: EMBPD<I> (SPR <I>)
Adding a fontfamily attribute to read from Config.xml file. Whatever font family is specified in Config.xml file, same will be reflected in EB webview. | rhomobile_rhodes | train | java |
6ab271318487f151049335e55c8404bbd29cdecb | diff --git a/util/server.js b/util/server.js
index <HASH>..<HASH> 100644
--- a/util/server.js
+++ b/util/server.js
@@ -140,7 +140,7 @@ server.serveTestSuite = function(expressApp, globPattern, options) {
}
// NOTE: adding this file first as this will launch
// our customized version of tape for the browser.
- b.add(path.join(cwd, 'test', 'app.js'));
+ b.add(path.join(__dirname, '..', 'test', 'app.js'));
b.add(testfiles.map(function(file) {
return path.join(cwd, file);
})) | Use correct path when serving test suite. | substance_substance | train | js |
55687d67e732b67e455039b2c46ede6e28d4a481 | diff --git a/salt/modules/file.py b/salt/modules/file.py
index <HASH>..<HASH> 100644
--- a/salt/modules/file.py
+++ b/salt/modules/file.py
@@ -4063,8 +4063,8 @@ def check_file_meta(
tmp = salt.utils.mkstemp(text=True)
if salt.utils.is_windows():
contents = os.linesep.join(contents.splitlines())
- with salt.utils.fopen(tmp, 'wb') as tmp_:
- tmp_.write(salt.utils.to_bytes(str(contents)))
+ with salt.utils.fopen(tmp, 'w') as tmp_:
+ tmp_.write(str(contents))
# Compare the static contents with the named file
with salt.utils.fopen(tmp, 'r') as src:
slines = src.readlines() | Change file.check_file_meta write mode to "w"
In order to be consistent with how `file.manage_file` writes a file,
we make `file.check_file_meta` also write the file as "w" instead of "wb".
This is necessary so that diff functionality correctly identifies
identical files when the source file is multi-line. | saltstack_salt | train | py |
59c1c6b404358acd5cb122bcae89418a128da0bf | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ required = [
setup(
name="Farnsworth",
- version="1.2.1",
+ version="2.0.0",
author="Karandeep Nagra",
url="https://github.com/knagra/farnsworth",
author_email="karandeepsnagra@gmail.com", | Bumped the version for when we eventually release dev | knagra_farnsworth | train | py |
b5149552207adceb3fa077968e13c8c872f7acd8 | diff --git a/lxd/storage/drivers/utils.go b/lxd/storage/drivers/utils.go
index <HASH>..<HASH> 100644
--- a/lxd/storage/drivers/utils.go
+++ b/lxd/storage/drivers/utils.go
@@ -681,13 +681,13 @@ func copyDevice(inputPath string, outputPath string) error {
}
// Check for Direct I/O support.
- from, err := os.OpenFile(inputPath, unix.O_DIRECT, 0)
+ from, err := os.OpenFile(inputPath, unix.O_DIRECT|unix.O_RDONLY, 0)
if err == nil {
cmd = append(cmd, "iflag=direct")
from.Close()
}
- to, err := os.OpenFile(outputPath, unix.O_DIRECT, 0)
+ to, err := os.OpenFile(outputPath, unix.O_DIRECT|unix.O_RDONLY, 0)
if err == nil {
cmd = append(cmd, "oflag=direct")
to.Close() | lxd/storage/drivers/utils: Update copyDevice to open files in read only mode | lxc_lxd | train | go |
8c58950639fcb4a738e6c7330a4e1f75ae1d6092 | diff --git a/pkg/resource/properties.go b/pkg/resource/properties.go
index <HASH>..<HASH> 100644
--- a/pkg/resource/properties.go
+++ b/pkg/resource/properties.go
@@ -360,7 +360,11 @@ func NewPropertyValue(v interface{}) PropertyValue {
return NewPropertyArray(arr)
case reflect.Ptr:
// If a pointer, recurse and return the underlying value.
- return NewPropertyValue(rv.Elem().Interface())
+ if rv.IsNil() {
+ return NewPropertyNull()
+ } else {
+ return NewPropertyValue(rv.Elem().Interface())
+ }
case reflect.Struct:
obj := NewPropertyMap(rv.Interface())
return NewPropertyObject(obj) | Tolerate nils in output property marshaling | pulumi_pulumi | train | go |
69684b4ff0a2767baa845a00cf3e833e3667598e | diff --git a/launcher/src/main/java/io/snappydata/tools/QuickLauncher.java b/launcher/src/main/java/io/snappydata/tools/QuickLauncher.java
index <HASH>..<HASH> 100644
--- a/launcher/src/main/java/io/snappydata/tools/QuickLauncher.java
+++ b/launcher/src/main/java/io/snappydata/tools/QuickLauncher.java
@@ -124,6 +124,15 @@ class QuickLauncher extends LauncherBase {
// add java path to command-line first
commandLine.add(System.getProperty("java.home") + "/bin/java");
commandLine.add("-server");
+ // https://github.com/airlift/jvmkill is added to libgemfirexd.so
+ // adding agentpath helps kill jvm in case of OOM. kill -9 is not
+ // used as it fails in certain cases
+ String arch = System.getProperty("os.arch");
+ if(arch.contains("64") || arch.contains("s390x")){
+ commandLine.add("-agentpath:" + snappyHome + "/jars/libgemfirexd64.so");
+ }else{
+ commandLine.add("-agentpath:" + snappyHome + "/jars/libgemfirexd.so");
+ }
// get the startup options and command-line arguments (JVM arguments etc)
HashMap<String, Object> options = getStartOptions(args, snappyHome, commandLine, env); | adding commandline arg to kill on OOM (#<I>)
* adding commandline arg to kill on OOM
* checking if system is <I> bit to apply right libgemfirexd<<I>/<I>>.so | SnappyDataInc_snappydata | train | java |
9c0cdd31dfdc224dc424bcbebbe9a2d69cbc19bd | diff --git a/lib/scarlet/slideshow.rb b/lib/scarlet/slideshow.rb
index <HASH>..<HASH> 100644
--- a/lib/scarlet/slideshow.rb
+++ b/lib/scarlet/slideshow.rb
@@ -32,7 +32,7 @@ module Scarlet
enumerable.lines.each do |line|
if line.include? "!SLIDE"
slides << Scarlet::Slide.new
- slides.last.classes = line.delete("!SLIDE").strip
+ slides.last.classes = line.gsub("!SLIDE", "").strip
else
next if slides.empty?
slides.last.text << line
@@ -41,4 +41,4 @@ module Scarlet
return slides
end
end
-end
\ No newline at end of file
+end | Use gsub instead of delete so that any overlapping characters with the string 'SLIDES' don't get deleted as well | jcxplorer_scarlet | train | rb |
45e24d3ba519fc037d02aceabc26b4b49c725ced | diff --git a/data/handleDB.php b/data/handleDB.php
index <HASH>..<HASH> 100644
--- a/data/handleDB.php
+++ b/data/handleDB.php
@@ -910,5 +910,5 @@ class DbHandleApplication extends Application
}
}
-$application = new DbHandleApplication('Database handler for CompatInfo', '1.21.0');
+$application = new DbHandleApplication('Database handler for CompatInfo', '1.22.0');
$application->run(); | Bump new version <I> | llaville_php-compatinfo-db | train | php |
680917933b6ed270bea9673ff5c3238531239d21 | diff --git a/lib/codesake/dawn/version.rb b/lib/codesake/dawn/version.rb
index <HASH>..<HASH> 100644
--- a/lib/codesake/dawn/version.rb
+++ b/lib/codesake/dawn/version.rb
@@ -1,5 +1,5 @@
module Codesake
module Dawn
- VERSION = "0.70"
+ VERSION = "0.72"
end
end | Version: <I>
Some bug fixing | thesp0nge_dawnscanner | train | rb |
c89ad4ad8a251fa898d8bfebf1e7ab1c2f16eae2 | diff --git a/app/models/repository.rb b/app/models/repository.rb
index <HASH>..<HASH> 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -304,7 +304,9 @@ class Repository < ActiveRecord::Base
def assert_deletable
if self.environment.library? && self.content_view.default?
- if self.custom? && self.deletable?
+ if self.environment.organization.being_deleted?
+ return true
+ elsif self.custom? && self.deletable?
return true
elsif !self.custom? && self.redhat_deletable?
return true | <I> - Fixed a repo delete issue
Prior to this commit there was logic that said something along the lines
of 'Do not delete a RH repo unless its disabled'. Due to this when an org
was getting deleted, if there were any 'enabled' redhat repos in the org
there would be dangling repositories with nil references.
This commit adds an additional clause that says, "Allow deletion of the
redhat repo if org is getting deleted". | Katello_katello | train | rb |
c05a608c57a2e6dcfeb6d53c6d0f58d80d4c8172 | diff --git a/test/Organizer/OrganizerLDProjectorTest.php b/test/Organizer/OrganizerLDProjectorTest.php
index <HASH>..<HASH> 100644
--- a/test/Organizer/OrganizerLDProjectorTest.php
+++ b/test/Organizer/OrganizerLDProjectorTest.php
@@ -162,7 +162,7 @@ class OrganizerLDProjectorTest extends \PHPUnit_Framework_TestCase
1,
new Metadata(),
$placeCreated,
- DateTime::fromString($created)
+ BroadwayDateTime::fromString($created)
)
);
} | III-<I> Fixed organizer ld projector unit test . | cultuurnet_udb3-php | train | php |
fe861936ab18ce826a03394acf1b0945bf4e619a | diff --git a/gobblin-data-management/src/test/java/org/apache/gobblin/data/management/retention/CleanableMysqlDatasetStoreDatasetTest.java b/gobblin-data-management/src/test/java/org/apache/gobblin/data/management/retention/CleanableMysqlDatasetStoreDatasetTest.java
index <HASH>..<HASH> 100644
--- a/gobblin-data-management/src/test/java/org/apache/gobblin/data/management/retention/CleanableMysqlDatasetStoreDatasetTest.java
+++ b/gobblin-data-management/src/test/java/org/apache/gobblin/data/management/retention/CleanableMysqlDatasetStoreDatasetTest.java
@@ -112,7 +112,7 @@ public class CleanableMysqlDatasetStoreDatasetTest {
* Test cleanup of the job state store
* @throws IOException
*/
- @Test
+ @Test(enabled = false)
public void testCleanJobStateStore() throws IOException {
JobState jobState = new JobState(TEST_JOB_NAME1, getJobId(TEST_JOB_ID, 1));
jobState.setId(getJobId(TEST_JOB_ID, 1));
@@ -176,7 +176,7 @@ public class CleanableMysqlDatasetStoreDatasetTest {
*
* @throws IOException
*/
- @Test
+ @Test(enabled = false)
public void testCleanDatasetStateStore() throws IOException {
JobState.DatasetState datasetState = new JobState.DatasetState(TEST_JOB_NAME1, getJobId(TEST_JOB_ID, 1)); | Disable CleanableMysqlDatasetStoreDatasetTest unit tests, already dropped from Continuous Ingetration. (#<I>)
* Disable CleanableMysqlDatasetStoreDatasetTest unit tests, already dropped from Continuous Ingetration. | apache_incubator-gobblin | train | java |
d733713af30648aff3a5bb90dc31ca25e09b7158 | diff --git a/contrib/externs/angular-material.js b/contrib/externs/angular-material.js
index <HASH>..<HASH> 100644
--- a/contrib/externs/angular-material.js
+++ b/contrib/externs/angular-material.js
@@ -863,7 +863,7 @@ md.$panel.prototype.create = function(opt_config) {};
/**
* @param {!md.$panel.config=} opt_config
- * @return {!md.$panel.MdPanelRef}
+ * @return {!angular.$q.Promise<!md.$panel.MdPanelRef>}
*/
md.$panel.prototype.open = function(opt_config) {}; | In the md-panel directive the "open" function now returns a "mdPanelRef" wrapped in a promise. Updating externs to reflect that.
-------------
Created by MOE: <URL> | google_closure-compiler | train | js |
c41680e480d4cc36fcec942141fd13a0e554c82a | diff --git a/consumer.go b/consumer.go
index <HASH>..<HASH> 100644
--- a/consumer.go
+++ b/consumer.go
@@ -106,7 +106,7 @@ func (c *Consumer) Messages() <-chan *sarama.ConsumerMessage { return c.messages
// Partitions returns the read channels for individual partitions of this broker.
//
-// This will channel will only return if Config.Group.Mode option is set to
+// This channel will only return if Config.Group.Mode option is set to
// ConsumerModePartitions.
//
// The Partitions() channel must be listened to for the life of this consumer; | Fix typo in godoc (#<I>)
This patch fixes small typo in godoc. | bsm_sarama-cluster | train | go |
3603d791aa567fcb1bc09e858a830c94eb92298d | diff --git a/doc/scripts/header.js b/doc/scripts/header.js
index <HASH>..<HASH> 100644
--- a/doc/scripts/header.js
+++ b/doc/scripts/header.js
@@ -17,7 +17,7 @@ domReady(() => {
header.insertBefore(projectname, header.firstChild);
const testlink = document.querySelector('header > a[data-ice="testLink"]');
- testlink.href = 'https://coveralls.io/github/failure-abstraction/error';
+ testlink.href = 'https://app.codecov.io/gh/failure-abstraction/error';
testlink.target = '_BLANK';
const searchBox = document.querySelector('.search-box'); | :robot: docs: Use codecov as test link.
These changes were automatically generated by a transform whose code can be found at:
- <URL> | aureooms_js-error | train | js |
0db39c27585d52fc19084a8090face5249e2bb4c | diff --git a/src/main/java/org/jsoup/helper/HttpConnection.java b/src/main/java/org/jsoup/helper/HttpConnection.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jsoup/helper/HttpConnection.java
+++ b/src/main/java/org/jsoup/helper/HttpConnection.java
@@ -662,6 +662,7 @@ public class HttpConnection implements Connection {
if (status != HTTP_TEMP_REDIR) {
req.method(Method.GET); // always redirect with a get. any data param from original req are dropped.
req.data().clear();
+ req.requestBody(null);
}
String location = res.header(LOCATION); | Fix #<I>
Set request body to null when doing a redirect | jhy_jsoup | train | java |
f840d0fffc9b35d969eacaafb319c81ff0c7193e | diff --git a/ospd/misc.py b/ospd/misc.py
index <HASH>..<HASH> 100644
--- a/ospd/misc.py
+++ b/ospd/misc.py
@@ -295,7 +295,7 @@ class ScanCollection(object):
t_prog = sum(host_progresses.values()) / total_hosts
except ZeroDivisionError:
LOGGER.error(
- "Zero division error in ", get_target_progress.__name__
+ "Zero division error in %s", self.get_target_progress.__name__
)
raise
return t_prog | Fix error log
Add formatting placeholder and use correct reference to the method. | greenbone_ospd | train | py |
c14e564c675373ba3a971097a1d7e5f6ff64eeb0 | diff --git a/trafaret/__init__.py b/trafaret/__init__.py
index <HASH>..<HASH> 100644
--- a/trafaret/__init__.py
+++ b/trafaret/__init__.py
@@ -33,7 +33,8 @@ Look at doctests for usage examples
__all__ = ("DataError", "Trafaret", "Any", "Int", "String",
"List", "Dict", "Or", "Null", "Float", "Enum", "Callable",
- "Call", "Forward", "Bool", "Type", "Mapping", "guard", "Key")
+ "Call", "Forward", "Bool", "Type", "Mapping", "guard", "Key",
+ "Tuple", "Atom", "Email", "URL")
ENTRY_POINT = 'trafaret' | missing trafarets added to __all__ | Deepwalker_trafaret | train | py |
03872652a832fd39c34eaa453e93911336f53185 | diff --git a/skyfield/tests/test_planetarylib.py b/skyfield/tests/test_planetarylib.py
index <HASH>..<HASH> 100644
--- a/skyfield/tests/test_planetarylib.py
+++ b/skyfield/tests/test_planetarylib.py
@@ -24,8 +24,8 @@ def test_frame_rotation_matrices():
[ 0.0016578894811168, -0.3730107540024127, 0.9278255379116378],
]
r = frame.rotation_at(ts.tdb_jd(tdb))
- delta = r - spiceypy_matrix
- assert (delta < 2e-16).all() # nearly float64 precision
+ delta = abs(r - spiceypy_matrix)
+ assert (delta < 6e-17).all() # nearly float64 precision
# Second, a moment when the angle W is more than 2500 radians.
@@ -36,8 +36,7 @@ def test_frame_rotation_matrices():
[-0.0223084753202375, -0.4115854446818337, 0.9110981032001678],
]
r = frame.rotation_at(ts.tdb_jd(tdb))
- delta = r - spiceypy_matrix
- print(delta)
+ delta = abs(r - spiceypy_matrix)
assert (delta < 2e-13).all() # a few digits are lost in large W radians
def test_rotating_vector_into_frame(): | Tighten a test tolerance, thanks to jplephem <I> | skyfielders_python-skyfield | train | py |
3e15260b62f0eddf477a3fc493bc0081bc12e808 | diff --git a/csg/__init__.py b/csg/__init__.py
index <HASH>..<HASH> 100644
--- a/csg/__init__.py
+++ b/csg/__init__.py
@@ -1 +1 @@
-__version__ = 0.2
+__version__ = 0.2.2 | also updating __version__ | timknip_pycsg | train | py |
d49e3e7dd7906336a45a0bda231085189b5c24eb | diff --git a/astrobase/lcmath.py b/astrobase/lcmath.py
index <HASH>..<HASH> 100644
--- a/astrobase/lcmath.py
+++ b/astrobase/lcmath.py
@@ -1342,6 +1342,11 @@ def phase_bin_magseries_with_errs(phases, mags, errs,
The minimum number of elements required per bin to include it in the
output.
+ weights : np.array or None
+ Optional weight vector to be applied during binning. If if is passed,
+ `np.average` is used to bin, rather than `np.median`. A good choice
+ would be to pass weights=1/errs**2, to weight by the inverse variance.
+
Returns
------- | add weights kwarg to docstring | waqasbhatti_astrobase | train | py |
32e132e89eac854adaba8196ef32db324ac4e45e | diff --git a/coursera/coursera_dl.py b/coursera/coursera_dl.py
index <HASH>..<HASH> 100755
--- a/coursera/coursera_dl.py
+++ b/coursera/coursera_dl.py
@@ -276,11 +276,11 @@ def get_config_paths(config_name, user_specified_path=None):
env_dirs = []
for v in env_vars:
- dir = ''.join(map(getenv_or_empty, v))
- if not dir:
+ directory = ''.join(map(getenv_or_empty, v))
+ if not directory:
logging.debug('Environment var(s) %s not defined, skipping', v)
else:
- env_dirs.append(dir)
+ env_dirs.append(directory)
additional_dirs = ["C:", ""]
@@ -288,8 +288,8 @@ def get_config_paths(config_name, user_specified_path=None):
leading_chars = [".", "_"]
- res = [''.join([dir, os.sep, lc, config_name])
- for dir in all_dirs
+ res = [''.join([directory, os.sep, lc, config_name])
+ for directory in all_dirs
for lc in leading_chars]
return res
@@ -460,6 +460,7 @@ def transform_preview_url(a):
else:
return None
+
def get_video(url):
"""
Parses a Coursera video page | Rename variables to not redefine Python builtins. | coursera-dl_coursera-dl | train | py |
3ce90f15998f3d46c975f9eae069da83f36e4b5b | diff --git a/php/Exchange.php b/php/Exchange.php
index <HASH>..<HASH> 100644
--- a/php/Exchange.php
+++ b/php/Exchange.php
@@ -531,11 +531,11 @@ class Exchange {
}
public static function urlencode ($string) {
- return http_build_query ($string);
+ return http_build_query ($string,"","&");
}
public static function rawencode ($string) {
- return urldecode (http_build_query ($string));
+ return urldecode (http_build_query ($string,"","&"));
}
public static function encode_uri_component ($string) { | http_build_query third parameter is based on a php.ini setting that could be changed by the user
The third parameter of http_build_query, if omitted, defaults to a setting in php.ini which can be changed by user's code.
So it should not be relied upon, but instead it should be explicitly set to "&" as many exchanges DO NOT accept & or other separators. | ccxt_ccxt | train | php |
440556882032da7279b51654e349b56eb9e9f2d6 | diff --git a/packages/react-server-cli/src/compileClient.js b/packages/react-server-cli/src/compileClient.js
index <HASH>..<HASH> 100755
--- a/packages/react-server-cli/src/compileClient.js
+++ b/packages/react-server-cli/src/compileClient.js
@@ -129,7 +129,7 @@ function statsToManifest(stats) {
if (/\.css$/.test(chunk.files[i])) {
// the CSS file is probably last file in the array, unless there have been hot updates for the JS
// which show up in the array prior to the CSS file.
- cssChunksByName[chunk.name] = chunk.files[chunk.files.length - 1];
+ cssChunksByName[chunk.name] = chunk.files[i];
break;
}
} | Minor fix to use the for loop logic instead of .length - 1. | redfin_react-server | train | js |
182d215de5eb67be9519d0bedd54b8b188cc0c94 | diff --git a/test/Reporters/opendiffReporterTests.js b/test/Reporters/opendiffReporterTests.js
index <HASH>..<HASH> 100644
--- a/test/Reporters/opendiffReporterTests.js
+++ b/test/Reporters/opendiffReporterTests.js
@@ -19,6 +19,12 @@ describe('Reporter', function () {
assert.ok(command.toLowerCase().indexOf("opendiff") >= 0);
assert.deepEqual(args, [receivedFile, approvedFile]);
+
+
+ return {
+ stdout: { on: function () {} },
+ stderr: { on: function () {} }
+ };
});
}); | fix test on mac for opendiff | approvals_Approvals.NodeJS | train | js |
60ef1243b43dcd885f2fac9d5dd95107da43ed83 | diff --git a/server/viewEngine.js b/server/viewEngine.js
index <HASH>..<HASH> 100644
--- a/server/viewEngine.js
+++ b/server/viewEngine.js
@@ -86,7 +86,7 @@ ViewEngine.prototype.getBootstrappedData = function getBootstrappedData(locals,
var tempObject = {};
tempObject[key] = value;
- _.extend(bootstrappedData, scope.getBootstrappedData(tempObject, app));
+ _.defaults(bootstrappedData, scope.getBootstrappedData(tempObject, app));
}
})
} | changed the higher level properties to be more important | rendrjs_rendr | train | js |
47f1b04b4c9f92bf499d90466da293582ca1b05f | diff --git a/lib/qx/tool/cli/commands/Clean.js b/lib/qx/tool/cli/commands/Clean.js
index <HASH>..<HASH> 100644
--- a/lib/qx/tool/cli/commands/Clean.js
+++ b/lib/qx/tool/cli/commands/Clean.js
@@ -79,7 +79,9 @@ qx.Class.define("qx.tool.cli.commands.Clean", {
for( let cacheFile of ["db.json","resource-db.json"]){
let dbPath = path.join( process.cwd(), cacheFile );
if( verbose ) console.info(`Removing ${cacheFile}...`);
- await fs.unlinkAsync(dbPath);
+ if (await fs.existsAsync(dbPath)) {
+ await fs.unlinkAsync(dbPath);
+ }
}
}
} | Suppress warnings in 'qx clean' if files to be deleted don't exist | qooxdoo_qooxdoo-compiler | train | js |
8dbaae6012c8aa71c811eb42e7a7ac32a36e2080 | diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/cgi_process.rb
+++ b/actionpack/lib/action_controller/cgi_process.rb
@@ -89,18 +89,28 @@ module ActionController #:nodoc:
def session
return @session unless @session.nil?
+
begin
@session = (@session_options == false ? {} : CGI::Session.new(@cgi, session_options_with_string_keys))
@session["__valid_session"]
return @session
rescue ArgumentError => e
- @session.delete if @session
- raise(
- ActionController::SessionRestoreError,
- "Session contained objects where the class definition wasn't available. " +
- "Remember to require classes for all objects kept in the session. " +
- "The session has been deleted. (Original exception: #{e.message} [#{e.class}])"
- )
+ if e.message =~ %r{undefined class/module (\w+)}
+ begin
+ Module.const_missing($1)
+ rescue LoadError, NameError => e
+ raise(
+ ActionController::SessionRestoreError,
+ "Session contained objects where the class definition wasn't available. " +
+ "Remember to require classes for all objects kept in the session. " +
+ "(Original exception: #{e.message} [#{e.class}])"
+ )
+ end
+
+ retry
+ else
+ raise
+ end
end
end | Fixed that a SessionRestoreError was thrown if a model object was placed in the session that wasn't available to all controllers
git-svn-id: <URL> | rails_rails | train | rb |
9d0518363789757c55a314f6e5e3b1e704c85441 | diff --git a/config/routes.rb b/config/routes.rb
index <HASH>..<HASH> 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,5 +1,7 @@
Ecm::Tags::Engine.routes.draw do
- resources :tag_searchs, only: [:new, :create]
+ resources :tag_searchs, only: [:new, :create] do
+ get '/', on: :collection, to: "tag_searchs#create"
+ end
root to: 'tag_searchs#new'
end | Added get route to search#create | robotex82_ecm_tags | train | rb |
9e4baeca552017c74ad0acbae5be9911d740e6b9 | diff --git a/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java b/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java
+++ b/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java
@@ -640,6 +640,7 @@ public abstract class AbstractEnglishSpellerRule extends MorfologikSpellerRule {
s.put("continuesly", Arrays.asList("continuously"));
s.put("humain", Arrays.asList("humane", "human"));
s.put("protene", Arrays.asList("protein"));
+ s.put("throught", Arrays.asList("thought", "through", "throat"));
return s;
} | [en] spellings for "throught" | languagetool-org_languagetool | train | java |
0f3f71c38c2db67ce538ad20ae0acf0a1268d026 | diff --git a/test/specs/dom_components/model/Symbols.js b/test/specs/dom_components/model/Symbols.js
index <HASH>..<HASH> 100644
--- a/test/specs/dom_components/model/Symbols.js
+++ b/test/specs/dom_components/model/Symbols.js
@@ -270,5 +270,18 @@ describe('Symbols', () => {
const innerSymb = allInst.map(i => getInnerComp(i, 1));
expect(clonedSymb.__getSymbols()).toEqual(innerSymb);
});
+
+ test('Cloning a component in a symbol, reflects changes to all instances', () => {
+ const clonedSymb = duplicate(getInnerComp(symbol));
+ const cloned = getInnerComp(comp, 1);
+ const newLen = symbol.components().length;
+ // As above
+ expect(newLen).toBe(compInitChild + 1);
+ expect(cloned.__getSymbol()).toBe(clonedSymb);
+ all.forEach(cmp => expect(cmp.components().length).toBe(newLen));
+ allInst.forEach(cmp => expect(getInnSymbol(cmp, 1)).toBe(clonedSymb));
+ const innerSymb = allInst.map(i => getInnerComp(i, 1));
+ expect(clonedSymb.__getSymbols()).toEqual(innerSymb);
+ });
});
}); | Add test for cloning components inside the main symbol | artf_grapesjs | train | js |
47bd71eee80c8db844468886620e06e76d7f900a | diff --git a/webpack.config.node.js b/webpack.config.node.js
index <HASH>..<HASH> 100644
--- a/webpack.config.node.js
+++ b/webpack.config.node.js
@@ -83,11 +83,6 @@ const webpackConfig = {
module: {
rules: [
{
- test: /extensions[/\\]index/,
- exclude: path.join( __dirname, 'node_modules' ),
- loader: path.join( __dirname, 'server', 'bundler', 'extensions-loader' ),
- },
- {
include: path.join( __dirname, 'client/sections.js' ),
use: {
loader: path.join( __dirname, 'server', 'bundler', 'sections-loader' ), | Remove extensions loader from server config (#<I>)
In #<I> we removed the extensions loader from Calypso. We didn't
remove the configuration for it from the `webpack.config.node.js` file.
It probably didn't break becuase `extensions/index` wasn't being loaded
on the server and so the rule didn't match and the loader wasn't
requested.
This patch removes the reference that should have disappered in that PR. | Automattic_wp-calypso | train | js |
9ed0b711eb0ac58be3d51ae9408bb7f79e48601c | diff --git a/plugins/UsersManager/javascripts/usersSettings.js b/plugins/UsersManager/javascripts/usersSettings.js
index <HASH>..<HASH> 100644
--- a/plugins/UsersManager/javascripts/usersSettings.js
+++ b/plugins/UsersManager/javascripts/usersSettings.js
@@ -24,7 +24,7 @@ function sendUserSettingsAJAX() {
var defaultReport = $('input[name=defaultReport]:checked').val();
if (defaultReport == 1) {
- defaultReport = $('#userSettingsTable').find('.custom_select_main_link').attr('siteid');
+ defaultReport = $('#userSettingsTable').find('.custom_select_main_link').attr('data-siteid');
}
var postParams = {};
postParams.alias = alias; | Fix User settings save regression: 'defaultReport was not set in query'. | matomo-org_matomo | train | js |
1309ea63e9f9de56679f7c07027b487f92259a4d | diff --git a/lib/geocoder/lookups/esri.rb b/lib/geocoder/lookups/esri.rb
index <HASH>..<HASH> 100644
--- a/lib/geocoder/lookups/esri.rb
+++ b/lib/geocoder/lookups/esri.rb
@@ -48,14 +48,17 @@ module Geocoder::Lookup
end
def token
- if configuration[:token] && configuration[:token].active? # if we have a token, use it
- configuration[:token].to_s
- elsif configuration.api_key # generate a new token if we have credentials
- token_instance = Geocoder::EsriToken.generate_token(*configuration.api_key)
- Geocoder.configure(:esri => Geocoder.config[:esri].merge({:token => token_instance}))
- token_instance.to_s
- end
+ fetch_and_save_token! if !valid_token_configured? and configuration.api_key
+ configuration[:token].to_s unless configuration[:token].nil?
+ end
+
+ def valid_token_configured?
+ !configuration[:token].nil? and configuration[:token].active?
end
+ def fetch_and_save_token!
+ token_instance = Geocoder::EsriToken.generate_token(*configuration.api_key)
+ Geocoder.configure(:esri => {:token => token_instance})
+ end
end
end | Refactor ESRI lookup's `token` method.
This should improve readability and make testing easier as it separates
the various tasks into separate methods. | alexreisner_geocoder | train | rb |
2d279045540b1ac5e57c309d552e0921e33fdda6 | diff --git a/src/neuron/dom/event.js b/src/neuron/dom/event.js
index <HASH>..<HASH> 100644
--- a/src/neuron/dom/event.js
+++ b/src/neuron/dom/event.js
@@ -306,6 +306,10 @@ DOM.Events = Events;
/**
change log:
+ 2011-09-12 Kael:
+ TODO:
+ - A.
+
2011-09-10 Kael:
- basic functionalities
diff --git a/src/neuron/dom/manipulate.js b/src/neuron/dom/manipulate.js
index <HASH>..<HASH> 100644
--- a/src/neuron/dom/manipulate.js
+++ b/src/neuron/dom/manipulate.js
@@ -374,6 +374,18 @@ METHODS.text = {
};
+// TODO
+// .val() methods
+METHODS.val = {
+ SET: function(value){
+ //
+ },
+
+ GET: function(){
+ }
+};
+
+
DOM.extend({
addClass: addClass,
@@ -461,6 +473,11 @@ DOM._overload = overloadDOMGetterSetter;
/**
change log:
+ 2011-09-12 Kael:
+ TODO:
+ A. review .inject and .grab. whether should only deal with the first element of all matches
+ B. deal with more elements of tables, such as caption, colgroup, etc
+
2011-09-08 Kael:
- improve stability of function overloadDOMGetterSetter
- add method hooks, DOM.methods | dom: add comments; actually nothing | kaelzhang_neuron.js | train | js,js |
fe31f070c5ce854c640b299e90f058d4dc4a5836 | diff --git a/src/Silex/Console/Command/Cron/RunCommand.php b/src/Silex/Console/Command/Cron/RunCommand.php
index <HASH>..<HASH> 100644
--- a/src/Silex/Console/Command/Cron/RunCommand.php
+++ b/src/Silex/Console/Command/Cron/RunCommand.php
@@ -313,6 +313,15 @@ class Task
}
$this->nextTimestamp = $next;
- $callback($this);
+
+ try {
+ $callback($this);
+ } catch (\Exception $ex) {
+ $this->output->writeln(sprintf('<error>%s in %s:%s</error>', $ex->getMessage(), $ex->getFile(), $ex->getLine()));
+
+ if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
+ $this->output->writeln(sprintf('<error>%s</error>', $ex->getTraceAsString()));
+ }
+ }
}
} | Add exception handling to cron command execution | lokhman_silex-console | train | php |
31730ca0f563bb4f21d165dd1d133e645c476b0e | diff --git a/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java b/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java
+++ b/src/main/java/com/lazerycode/jmeter/mojo/ConfigureJMeterMojo.java
@@ -132,7 +132,7 @@ public class ConfigureJMeterMojo extends AbstractJMeterMojo {
* <false>
* <downloadJMeterDependencies>
*/
- @Parameter(defaultValue = "false")
+ @Parameter(defaultValue = "true")
protected boolean downloadJMeterDependencies;
/** | ConfigureJMeterMojo: download jmeter dependencies to Support upcoming
JMeter <I>
This comments #<I> | jmeter-maven-plugin_jmeter-maven-plugin | train | java |
c50780930e1f30dec3c0a5356a5b18d0dc67e4b9 | diff --git a/hugolib/site.go b/hugolib/site.go
index <HASH>..<HASH> 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -269,6 +269,7 @@ func (s *Site) Process() (err error) {
return
}
s.prepTemplates()
+ s.Tmpl.PrintErrors()
s.timerStep("initialize & template prep")
if err = s.CreatePages(); err != nil {
return
diff --git a/tpl/template.go b/tpl/template.go
index <HASH>..<HASH> 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -50,6 +50,7 @@ type Template interface {
AddTemplate(name, tpl string) error
AddInternalTemplate(prefix, name, tpl string) error
AddInternalShortcode(name, tpl string) error
+ PrintErrors()
}
type templateErr struct {
@@ -1253,6 +1254,12 @@ func (t *GoHtmlTemplate) LoadTemplates(absPath string) {
t.loadTemplates(absPath, "")
}
+func (t *GoHtmlTemplate) PrintErrors() {
+ for _, e := range t.errors {
+ jww.ERROR.Println(e.err)
+ }
+}
+
func init() {
funcMap = template.FuncMap{
"urlize": helpers.Urlize, | Print template parsing errors to aid troubleshooting
Added a new Template.PrintErrors() function call,
used in hugolib/site.go#Process() so it does not clutter
up `go test -v ./...` results.
Special | gohugoio_hugo | train | go,go |
d3a4897bd62301213a3d5a18759b3dd25cc5fe7d | diff --git a/bin/putasset.js b/bin/putasset.js
index <HASH>..<HASH> 100755
--- a/bin/putasset.js
+++ b/bin/putasset.js
@@ -68,7 +68,7 @@ function main() {
if (!error)
putasset(token, {
repo,
- owner,
+ owner: user,
tag,
filename,
}, log); | fix(putasset) owner -> owner: user | coderaiser_node-putasset | train | js |
f195bb8bab0691e62b4edc180028813ae9e60cfb | diff --git a/lib/writeexcel/workbook.rb b/lib/writeexcel/workbook.rb
index <HASH>..<HASH> 100644
--- a/lib/writeexcel/workbook.rb
+++ b/lib/writeexcel/workbook.rb
@@ -11,7 +11,6 @@
# original written in Perl by John McNamara
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
#
-require 'digest/md5'
require 'nkf'
require 'writeexcel/biffwriter'
require 'writeexcel/worksheet' | * delete unneccessary require file. | cxn03651_writeexcel | train | rb |
fa7d87de8d04da8af6b0e85c464115d52e8da7c6 | diff --git a/src/java/org/apache/cassandra/db/RangeSliceCommand.java b/src/java/org/apache/cassandra/db/RangeSliceCommand.java
index <HASH>..<HASH> 100644
--- a/src/java/org/apache/cassandra/db/RangeSliceCommand.java
+++ b/src/java/org/apache/cassandra/db/RangeSliceCommand.java
@@ -172,7 +172,7 @@ class RangeSliceCommandSerializer implements IVersionedSerializer<RangeSliceComm
ByteBufferUtil.write(sc, out);
}
- IDiskAtomFilter.Serializer.instance.serialize(sliceCommand.predicate, out, version);
+ IDiskAtomFilter.Serializer.instance.serialize(filter, out, version);
if (sliceCommand.row_filter == null)
{ | Fix RangeSliceCommand serialization for SCs for <I> nodes | Stratio_stratio-cassandra | train | java |
1a1daca621233b4588c079e35851d0e542282124 | diff --git a/runtime_test.go b/runtime_test.go
index <HASH>..<HASH> 100644
--- a/runtime_test.go
+++ b/runtime_test.go
@@ -321,7 +321,7 @@ func TestGet(t *testing.T) {
}
-func findAvailalblePort(runtime *Runtime, port int) (*Container, error) {
+func findAvailablePort(runtime *Runtime, port int) (*Container, error) {
strPort := strconv.Itoa(port)
container, err := NewBuilder(runtime).Create(&Config{
Image: GetTestImage(runtime).ID,
@@ -355,7 +355,7 @@ func TestAllocatePortLocalhost(t *testing.T) {
port += 1
log.Println("Trying port", port)
t.Log("Trying port", port)
- container, err = findAvailalblePort(runtime, port)
+ container, err = findAvailablePort(runtime, port)
if container != nil {
break
} | Fix a typo in runtime_test.go: Availalble -> Available | moby_moby | train | go |
bd7d2fd01089556ed59952c160cf15eea1010fef | diff --git a/lib/atomo/patterns/head_tail.rb b/lib/atomo/patterns/head_tail.rb
index <HASH>..<HASH> 100644
--- a/lib/atomo/patterns/head_tail.rb
+++ b/lib/atomo/patterns/head_tail.rb
@@ -22,7 +22,6 @@ module Atomo::Patterns
matched = g.new_label
g.dup
- g.dup
g.send :empty?, 0
g.git mismatch | correct HeadTail#matches? | vito_atomy | train | rb |
9b23333f0ecb2065bb052b5dee510813d2de6dff | diff --git a/astrobase/lcproc.py b/astrobase/lcproc.py
index <HASH>..<HASH> 100644
--- a/astrobase/lcproc.py
+++ b/astrobase/lcproc.py
@@ -214,7 +214,7 @@ def makelclist(basedir,
try:
thiscolval = dict_get(lcdict, getkey)
except:
- thiscolval = None
+ thiscolval = np.nan
thisline.append(thiscolval) | lcproc: more fixes | waqasbhatti_astrobase | train | py |
5b6ebfeb39c081fa0718d4287dff4c441dfd1272 | diff --git a/tinycontent/models.py b/tinycontent/models.py
index <HASH>..<HASH> 100644
--- a/tinycontent/models.py
+++ b/tinycontent/models.py
@@ -1,11 +1,13 @@
from django.db import models
+from django.utils.encoding import python_2_unicode_compatible
+@python_2_unicode_compatible
class TinyContent(models.Model):
name = models.CharField(max_length=100, unique=True)
content = models.TextField()
- def __unicode__(self):
+ def __str__(self):
return self.name
class Meta:
diff --git a/tinycontent/tests.py b/tinycontent/tests.py
index <HASH>..<HASH> 100644
--- a/tinycontent/tests.py
+++ b/tinycontent/tests.py
@@ -32,9 +32,9 @@ class TinyContentTestCase(unittest.TestCase):
TinyContent.objects.get_or_create(name='html',
content='<strong>&</strong>')
- def test_unicode(self):
+ def test_str(self):
self.assertEqual("foobar",
- unicode(TinyContent.objects.get(name='foobar')))
+ str(TinyContent.objects.get(name='foobar')))
def test_non_existent(self):
self.assertEqual("", | Hopefully make tinycontent work with Python 3
Tests still don't run with Python 3 - waiting on a fix to
django-setuptest:
<URL> | dominicrodger_django-tinycontent | train | py,py |
597f49dda884023d17fd78a0f28ebfc37c359fb2 | diff --git a/test/unit/plugins/synced_folders/rsync/helper_test.rb b/test/unit/plugins/synced_folders/rsync/helper_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/plugins/synced_folders/rsync/helper_test.rb
+++ b/test/unit/plugins/synced_folders/rsync/helper_test.rb
@@ -218,7 +218,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
let(:result) { Vagrant::Util::Subprocess::Result.new(0, "", "") }
let(:ssh_info) {{
- :private_key_path => [],
+ :private_key_path => ['/path/to/key'],
:keys_only => true,
:paranoid => false,
}}
@@ -239,6 +239,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
expect(args[9]).to include('IdentitiesOnly')
expect(args[9]).to include('StrictHostKeyChecking')
expect(args[9]).to include('UserKnownHostsFile')
+ expect(args[9]).to include("-i '/path/to/key'")
}
subject.rsync_single(machine, ssh_info, opts) | Add failing rsync test checking for private key option inclusion | hashicorp_vagrant | train | rb |
148d5c1c0ade0406c157332e5317020823efcfbe | diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -91,13 +91,17 @@ function configureCodeCoverage (config) {
function configureLocalBrowsers (config) {
var isMac = /^darwin/.test(process.platform),
isWindows = /^win/.test(process.platform),
- isLinux = !(isMac || isWindows);
+ isLinux = !(isMac || isWindows),
+ isCI = process.env.CI;
- if (isMac) {
+ if (isCI) {
+ config.browsers = ['ChromeHeadless'];
+ }
+ else if (isMac) {
config.browsers = ['Firefox', 'Chrome', 'Safari'];
}
else if (isLinux) {
- config.browsers = ['Firefox', 'ChromeHeadless'];
+ config.browsers = ['Firefox', 'Chrome'];
}
else if (isWindows) {
config.browsers = ['Firefox', 'Chrome', 'Safari', 'IE']; | Removed headless Firefox from the CI tests, since it keeps dropping its connection to Karma, causing the build to fail | APIDevTools_swagger-parser | train | js |
3e6404891a446fd8c269f3910c36358587e83ace | diff --git a/doc/conf.py b/doc/conf.py
index <HASH>..<HASH> 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -90,6 +90,12 @@ try:
except ImportError:
version = 'unknown'
+# readthedocs modifies the repository which messes up the version.
+if on_rtd:
+ import re
+ version = version.rstrip('.dirty')
+ version = re.sub('\+0\..+', '', version)
+ version
# The full version, including alpha/beta/rc tags.
release = version | DOC: Fix version on RTD | has2k1_plydata | train | py |
4ea30faea88d8ee8d8f4731412b696557a84d09d | diff --git a/src/solidity/stateDecoder.js b/src/solidity/stateDecoder.js
index <HASH>..<HASH> 100644
--- a/src/solidity/stateDecoder.js
+++ b/src/solidity/stateDecoder.js
@@ -40,14 +40,14 @@ function extractStateVariables (contractName, sourcesList) {
/**
* return the state of the given @a contractName as a json object
*
- * @param {Map} storageContent - contract storage
+ * @param {Object} storageResolver - resolve storage queries
* @param {astList} astList - AST nodes of all the sources
* @param {String} contractName - contract for which state var should be resolved
* @return {Map} - return the state of the contract
*/
-function solidityState (storageContent, astList, contractName) {
+async function solidityState (storageResolver, astList, contractName) {
var stateVars = extractStateVariables(contractName, astList)
- return decodeState(stateVars, storageContent)
+ return await decodeState(stateVars, storageResolver)
}
module.exports = { | make solidityState async + change param type | ethereum_remix | train | js |
5a2a36977ea5e3f9764098af4d860c667446e376 | diff --git a/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java b/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java
+++ b/src/test/java/net/openhft/chronicle/network/internal/lookuptable/FileBasedHostnamePortLookupTableTest.java
@@ -1,5 +1,6 @@
package net.openhft.chronicle.network.internal.lookuptable;
+import net.openhft.chronicle.core.Jvm;
import net.openhft.chronicle.core.io.Closeable;
import net.openhft.chronicle.core.io.IOTools;
import org.junit.After;
@@ -86,8 +87,9 @@ public class FileBasedHostnamePortLookupTableTest {
public void doShouldWorkConcurrently() {
int seq = doShouldWorkConcurrently(false);
int para = doShouldWorkConcurrently(true);
- System.out.println(seq + " " + para);
- assertTrue(seq > para);
+ assertTrue(seq > 0);
+ assertTrue(para > 0);
+ Jvm.startup().on(FileBasedHostnamePortLookupTable.class, "Sequential added: " + seq + ", parallel added: " + para);
}
public int doShouldWorkConcurrently(boolean parallel) { | Sometimes parallel is faster than sequential sometimes not (due to lock contention). Just assert they both added some entries. | OpenHFT_Chronicle-Network | train | java |
afea5043fb11a90f0567d8068d27e1f609e3c81f | diff --git a/agent/lib/kontena/agent.rb b/agent/lib/kontena/agent.rb
index <HASH>..<HASH> 100644
--- a/agent/lib/kontena/agent.rb
+++ b/agent/lib/kontena/agent.rb
@@ -35,11 +35,11 @@ module Kontena
def start(node_info)
return if self.started?
@started = true
+ @node_info_worker.start!
@weave_adapter.start(node_info).value
@etcd_launcher.start(node_info).value
@weave_attacher.start!
- @node_info_worker.start!
@container_info_worker.start!
@log_worker.start!
@event_worker.start! | send node info to master asap | kontena_kontena | train | rb |
73f306bc4accac3650f6567709c58b0dc79aca3f | diff --git a/snapshot/lib/snapshot/runner.rb b/snapshot/lib/snapshot/runner.rb
index <HASH>..<HASH> 100644
--- a/snapshot/lib/snapshot/runner.rb
+++ b/snapshot/lib/snapshot/runner.rb
@@ -18,6 +18,10 @@ module Snapshot
sleep 3 # to be sure the user sees this, as compiling clears the screen
end
+ if Helper.xcode_at_least?("9")
+ UI.user_error!("snapshot currently doesn't work with Xcode 9, we're working on implementing the new screenshots API to offer the best experience 🚀\nYou can change the Xcode version to use using `sudo xcode-select -s /Applications/Xcode...app`")
+ end
+
Snapshot.config[:output_directory] = File.expand_path(Snapshot.config[:output_directory])
verify_helper_is_current | Show message that Xcode 9 isn't support in snapshot ye (#<I>) | fastlane_fastlane | train | rb |
604e75d34b3571a2eac703894c7ff0ac367d4487 | diff --git a/lib/quando/parser.rb b/lib/quando/parser.rb
index <HASH>..<HASH> 100644
--- a/lib/quando/parser.rb
+++ b/lib/quando/parser.rb
@@ -58,7 +58,7 @@ module Quando
month = @date_parts[:month]
- if config.month_num.match(month)
+ month_num = if config.month_num.match(month)
month.to_i
else
month_index = Quando::Config::MONTHS.find_index do |month_name|
@@ -68,6 +68,8 @@ module Quando
month_index + 1 if month_index
end
+
+ month_num if (1..12).include?(month_num)
end
# @return [Integer, nil]
@@ -76,6 +78,7 @@ module Quando
return unless found?(:day)
day = @date_parts[:day].to_i
+
day if (1..31).include?(day)
end | Add check month is within <I> range | kinkou_quando | train | rb |
c2c587ebb1a73340cdb8a3bf3ffb0f1daf4ca51c | diff --git a/lib/jitsu.js b/lib/jitsu.js
index <HASH>..<HASH> 100644
--- a/lib/jitsu.js
+++ b/lib/jitsu.js
@@ -360,7 +360,8 @@ jitsu.showError = function (command, err, shallow, skip) {
if (err.code === 'ECONNRESET'){
jitsu.log.info(
'jitsu\'s client request timed out before the server ' +
- 'could respond'
+ 'could respond. Please increase your client timeout' +
+ '(Ex. `jitsu config set timeout 100000`)'
);
jitsu.log.help(
'This error may be due to network connection problems' | [doc] added example command for clientside timeouts | nodejitsu_jitsu | train | js |
4e7cb95be2f222c10244eed903e97579f3d240a2 | diff --git a/src/mattermostdriver/endpoints/users.py b/src/mattermostdriver/endpoints/users.py
index <HASH>..<HASH> 100644
--- a/src/mattermostdriver/endpoints/users.py
+++ b/src/mattermostdriver/endpoints/users.py
@@ -174,3 +174,15 @@ class Users(Base):
self.endpoint + '/login/switch',
options
)
+
+ def disable_personal_access_token(self, options=None):
+ return self.client.post(
+ self.endpoint + '/tokens/disable',
+ options
+ )
+
+ def enable_personal_access_token(self, options=None):
+ return self.client.post(
+ self.endpoint + '/tokens/enable',
+ options
+ ) | Add endpoints for enabling/disabling personal access tokens | Vaelor_python-mattermost-driver | train | py |
b5ee51702c2e640874c24311b9de0b60dd5ec395 | diff --git a/lib/toto.rb b/lib/toto.rb
index <HASH>..<HASH> 100644
--- a/lib/toto.rb
+++ b/lib/toto.rb
@@ -18,6 +18,14 @@ module Toto
:articles => "articles"
}
+ def self.env
+ ENV['RACK_ENV'] || 'production'
+ end
+
+ def self.env= env
+ ENV['RACK_ENV'] = env
+ end
+
module Template
def to_html page, &blk
path = (page == :layout ? Paths[:templates] : Paths[:pages])
@@ -290,8 +298,13 @@ module Toto
@response['Content-Length'] = response[:body].length.to_s
@response['Content-Type'] = Rack::Mime.mime_type(".#{response[:type]}")
- # Cache for one day
- @response['Cache-Control'] = "public, max-age=#{@config[:cache]}"
+ # Set http cache headers
+ @response['Cache-Control'] = if Toto.env == 'production'
+ "public, max-age=#{@config[:cache]}"
+ else
+ "no-cache, must-revalidate"
+ end
+
@response['Etag'] = Digest::SHA1.hexdigest(response[:body])
@response.status = response[:status] | Toto.env to check RACK_ENV setting; only cache when we're in produciton | cloudhead_toto | train | rb |
568208ffa8746d6bbd125a23a9c3d04c0a2ae7a3 | diff --git a/effects/loop.go b/effects/loop.go
index <HASH>..<HASH> 100644
--- a/effects/loop.go
+++ b/effects/loop.go
@@ -3,6 +3,8 @@ package effects
import "github.com/faiface/beep"
// Loop takes a StreamSeeker and plays it count times. If count is negative, s is looped infinitely.
+//
+// The returned Streamer propagates s's errors.
func Loop(count int, s beep.StreamSeeker) beep.Streamer {
return &loop{
s: s, | effects: mention errors propagation in Loop doc | faiface_beep | train | go |
2fb9f20578ea05fe963e64203a734f0af1c9a228 | diff --git a/spyderlib/plugins/externalconsole.py b/spyderlib/plugins/externalconsole.py
index <HASH>..<HASH> 100644
--- a/spyderlib/plugins/externalconsole.py
+++ b/spyderlib/plugins/externalconsole.py
@@ -280,7 +280,7 @@ class ExternalConsole(PluginWidget):
filename = QFileDialog.getOpenFileName(self,
self.tr("Run Python script"), os.getcwdu(),
self.tr("Python scripts")+" (*.py ; *.pyw)")
- self.emit(SIGNAL('redirect_stdio(bool)'), False)
+ self.emit(SIGNAL('redirect_stdio(bool)'), True)
if filename:
self.start(unicode(filename), None, False, False, False) | External console/bugfix: std I/O were not redirected when using the "Run Python script" feature | spyder-ide_spyder | train | py |
a27cf7f1d0015d2de840b3069ea34b61e59b81ff | diff --git a/test/api/parseTransaction.js b/test/api/parseTransaction.js
index <HASH>..<HASH> 100644
--- a/test/api/parseTransaction.js
+++ b/test/api/parseTransaction.js
@@ -123,7 +123,7 @@ describe('ParseOfflineRequests', function () {
describe('#transactionOutputAfter', function () {
- var LSK = new lisk.api();
+ var LSK = lisk.api();
it('should calculate crypto for accounts/open instead of using the API', function () {
var transformAnswer = { | getting rid of remaining lisk api constructor in the test | OnzCoin_onz-js | train | js |
9357d2d2c98d916eabae0368d93636d6b3ef0dae | diff --git a/lib/agent/actions/alert/darwin/flash.py b/lib/agent/actions/alert/darwin/flash.py
index <HASH>..<HASH> 100755
--- a/lib/agent/actions/alert/darwin/flash.py
+++ b/lib/agent/actions/alert/darwin/flash.py
@@ -130,7 +130,7 @@ class AlertView(NSView):
img_width = rep.pixelsWide()
img_height = rep.pixelsHigh()
- top = (self.bounds().size.height - img_height) - 25 # offset from top
+ top = (self.bounds().size.height - img_height) - 20 # offset from top
right_offset = (self.bounds().size.width - 600) / 2
right = self.bounds().size.width - right_offset - img_width
@@ -217,7 +217,7 @@ class AlertView(NSView):
width = 600
height = 30
- top = self.bounds().size.height - 55
+ top = self.bounds().size.height - 50
self.add_label(title, default_font, 24, self.getLeftOffset(width) + 3, top, width, height)
# width + 10 is to add padding | Top margins in OSX alerts. | prey_prey-node-client | train | py |
a20150c458c45456e40ef73d91f0fa1561b85a1e | diff --git a/util/tls/tls.go b/util/tls/tls.go
index <HASH>..<HASH> 100644
--- a/util/tls/tls.go
+++ b/util/tls/tls.go
@@ -122,8 +122,9 @@ func GenerateX509KeyPairTLSConfig(tlsMinVersion uint16) (*tls.Config, error) {
}
return &tls.Config{
- Certificates: []tls.Certificate{*cer},
- MinVersion: uint16(tlsMinVersion),
+ Certificates: []tls.Certificate{*cer},
+ MinVersion: uint16(tlsMinVersion),
+ InsecureSkipVerify: true,
}, nil
} | fix: insecureSkipVerify needed. Fixes #<I> (#<I>) | argoproj_argo | train | go |
1ce165d6c41105d7104b884f17c4d90b4df89fb5 | diff --git a/actions/SaSItems.class.php b/actions/SaSItems.class.php
index <HASH>..<HASH> 100644
--- a/actions/SaSItems.class.php
+++ b/actions/SaSItems.class.php
@@ -55,8 +55,10 @@ class SaSItems extends Items {
* @return void
*/
public function sasEditInstance(){
- $clazz = $this->getCurrentClass();
- $instance = $this->getCurrentInstance();
+ //$clazz = $this->getCurrentClass();
+ //$instance = $this->getCurrentInstance();
+ $clazz = new core_kernel_classes_Class('http://tao.localdomain/middleware/taotrans_v2.rdf#i1275389549011797000');
+ $instance = new core_kernel_classes_Resource('http://tao.localdomain/middleware/taotrans_v2.rdf#i1275389749010048200');
$myForm = tao_helpers_form_GenerisFormFactory::instanceEditor($clazz, $instance);
if($myForm->isSubmited()){ | * implement parallels workflow : update tokens, current activities, process variables and some services
git-svn-id: <URL> | oat-sa_extension-tao-item | train | php |
009a24c124f75955246fef9e3dbc6fc5b3fdc89f | diff --git a/examples/elevator.rb b/examples/elevator.rb
index <HASH>..<HASH> 100644
--- a/examples/elevator.rb
+++ b/examples/elevator.rb
@@ -131,8 +131,8 @@ class Tracker
@led_update = Time.now
@done = false
@dist_ave = MovingAverage.new(50)
- @x_ave = MovingAverage.new(20)
- @y_ave = MovingAverage.new(20)
+ @x_ave = MovingAverage.new(3)
+ @y_ave = MovingAverage.new(3)
end
def done | Reduce amount of smoothing on data.
To get a quicker response. | jimweirich_argus | train | rb |
bbd69b9741206365e92333353b6e48c9c644aea0 | diff --git a/start.php b/start.php
index <HASH>..<HASH> 100644
--- a/start.php
+++ b/start.php
@@ -15,7 +15,7 @@ function init() {
elgg_register_class('Events\API\Calendar', __DIR__ . '/classes/Events/API/Calendar.php');
elgg_register_class('Events\API\Event', __DIR__ . '/classes/Events/API/Event.php');
- elgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\events_permissions');
+ elgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\event_permissions');
elgg_register_plugin_hook_handler('permissions_check', 'object', __NAMESPACE__ . '\\calendar_permissions');
elgg_register_entity_url_handler('object', 'calendar', __NAMESPACE__ . '\\calendar_url');
@@ -35,4 +35,4 @@ function calendar_url($calendar) {
function event_url($event) {
return 'calendar/events/view/' . $event->guid;
-}
\ No newline at end of file
+} | Fixed typo
Changed hookname events_permission to event_permission | arckinteractive_events_api | train | php |
145945cab8045d789a7369eb2e473984b210d5ac | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -146,6 +146,7 @@ module.exports.createServer = function createServer(connectFunctions, updateAcco
job.serviceData = token.data;
job.cache = server.userCache;
+ // We use task instead of data
delete job.data;
delete job.task._anyfetchToken;
delete job.task._anyfetchApiUrl; | Add a comment to explain delete job.data | AnyFetch_anyfetch-provider.js | train | js |
abb160e1aaa1225c377941dd31e2e67a7578f0f5 | diff --git a/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php b/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php
index <HASH>..<HASH> 100644
--- a/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php
+++ b/system/modules/generalDriver/DcGeneral/Data/DefaultCollection.php
@@ -55,10 +55,8 @@ class DefaultCollection implements CollectionInterface
{
return $this->arrCollection[$intIndex];
}
- else
- {
- return null;
- }
+
+ return null;
}
/**
@@ -112,10 +110,8 @@ class DefaultCollection implements CollectionInterface
{
return array_pop($this->arrCollection);
}
- else
- {
- return null;
- }
+
+ return null;
}
/**
@@ -146,10 +142,8 @@ class DefaultCollection implements CollectionInterface
{
return array_shift($this->arrCollection);
}
- else
- {
- return null;
- }
+
+ return null;
}
/** | Code style in DefaultCollection. | contao-community-alliance_dc-general | train | php |
ef84c8a0cdc074d4be0d9cd335ee65c42ec5e8d2 | diff --git a/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java b/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
+++ b/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
@@ -691,7 +691,6 @@ public class ConfigXmlGenerator {
final Source xmlInput = new StreamSource(new StringReader(input));
xmlOutput = new StreamResult(new StringWriter());
TransformerFactory transformerFactory = TransformerFactory.newInstance();
- transformerFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
/* Older versions of Xalan still use this method of setting indent values.
* Attempt to make this work but don't completely fail if it's a problem.
*/ | removed setfeature due to it is not supported in sax | hazelcast_hazelcast | train | java |
b8647186785cd2340e7ae9508c9ad6ac87a2ce2a | diff --git a/pyzcasp/potassco/utilities.py b/pyzcasp/potassco/utilities.py
index <HASH>..<HASH> 100644
--- a/pyzcasp/potassco/utilities.py
+++ b/pyzcasp/potassco/utilities.py
@@ -188,7 +188,7 @@ class Clingo(Clasp3):
for answer in self.answers():
ts = component.getMultiAdapter((answer, parser), asp.ITermSet)
if termset_filter:
- ts = asp.TermSet(filter(termset_filter, ts))
+ ts = asp.TermSet(filter(termset_filter, ts), ts.score)
if adapter:
answers.append(adapter(ts)) | missing score in clingo when using a filter | svidela_pyzcasp | train | py |
0ffeb0f1b1728a3bdccb99c99c5e145f700d1da6 | diff --git a/src/Leevel/Database/Ddd/Select.php b/src/Leevel/Database/Ddd/Select.php
index <HASH>..<HASH> 100644
--- a/src/Leevel/Database/Ddd/Select.php
+++ b/src/Leevel/Database/Ddd/Select.php
@@ -262,7 +262,7 @@ class Select
public function softRestore(): int
{
$this->entity->handleEvent(IEntity::BEFORE_SOFT_RESTORE_EVENT);
- $this->entity->__set($this->deleteAtColumn(), null);
+ $this->entity->__set($this->deleteAtColumn(), 0);
$num = $this->entity->update()->flush();
$this->entity->handleEvent(IEntity::AFTER_SOFT_RESTORE_EVENT); | tests(database): fix SQLSTATE[<I>]: Integrity constraint violation: <I> Column 'delete_at' cannot be null | hunzhiwange_framework | train | php |
640ae60de5d52ffd0c081ed00eae440cc7b69d82 | diff --git a/src/Select.js b/src/Select.js
index <HASH>..<HASH> 100644
--- a/src/Select.js
+++ b/src/Select.js
@@ -553,6 +553,7 @@ var Select = React.createClass({
var filterOption = function(op) {
if (this.props.multi && exclude.indexOf(op.value) > -1) return false;
if (this.props.filterOption) return this.props.filterOption.call(this, op, filterValue);
+ if (filterValue && op.disabled) return false;
var valueTest = String(op.value), labelTest = String(op.label);
if (this.props.ignoreCase) {
valueTest = valueTest.toLowerCase();
@@ -595,7 +596,9 @@ var Select = React.createClass({
focusAdjacentOption: function(dir) {
this._focusedOptionReveal = true;
- var ops = this.state.filteredOptions;
+ var ops = this.state.filteredOptions.filter(function(op) {
+ return !op.disabled;
+ });
if (!this.state.isOpen) {
this.setState({ | Disabled options should not be selectable
Conflicts:
src/Select.js | HubSpot_react-select-plus | train | js |
9afd8359bb199217910c90892db19a51515407c3 | diff --git a/src/AttributeBag.php b/src/AttributeBag.php
index <HASH>..<HASH> 100644
--- a/src/AttributeBag.php
+++ b/src/AttributeBag.php
@@ -64,7 +64,8 @@ class AttributeBag implements \Countable
{
if ($this->restricted) {
if (!in_array($offset, array_keys($this->attributes))) {
- return $this;
+ $message = sprintf('%s it not an allowed attribute on this object. The only allowed attributes are %s', $offset, implode(',', array_keys($this->attributes)));
+ throw new \InvalidArgumentException($message);
}
} | Throw an exception on disallowed attribute values instead of silently returning . | Crell_HtmlModel | train | php |
b0df9be5aa65278760e146ac0293a0f9288d01a5 | diff --git a/src/urh/util/ProjectManager.py b/src/urh/util/ProjectManager.py
index <HASH>..<HASH> 100644
--- a/src/urh/util/ProjectManager.py
+++ b/src/urh/util/ProjectManager.py
@@ -77,7 +77,8 @@ class ProjectManager(QObject):
return result
def set_project_folder(self, path, ask_for_new_project=True, close_all=True):
- if close_all:
+ if self.project_file is not None or close_all:
+ # Close existing project (if any) or existing files if requested
self.main_controller.close_all()
FileOperator.RECENT_PATH = path
self.project_path = path
diff --git a/tests/test_project_manager.py b/tests/test_project_manager.py
index <HASH>..<HASH> 100644
--- a/tests/test_project_manager.py
+++ b/tests/test_project_manager.py
@@ -54,6 +54,7 @@ class TestProjectManager(QtTestCase):
self.gframe.modulators.clear()
self.assertEqual(len(self.gframe.modulators), 0)
+ self.form.project_manager.project_file = None # prevent saving of the zero modulators
self.form.project_manager.set_project_folder(self.form.project_manager.project_path, close_all=False)
self.assertEqual(len(self.gframe.modulators), 2) | improve new project behaviour when a project is currently loaded | jopohl_urh | train | py,py |
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.