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
aae44f9cff255cc2181d46cc6b705266abc56228
diff --git a/lib/ice_cube/occurrence.rb b/lib/ice_cube/occurrence.rb index <HASH>..<HASH> 100644 --- a/lib/ice_cube/occurrence.rb +++ b/lib/ice_cube/occurrence.rb @@ -44,10 +44,6 @@ module IceCube @start_time <=> other end - def each(&block) - to_range.each(&block) - end - def is_a?(klass) klass == ::Time || super end
Range can't iterate over Time, so don't offer it
seejohnrun_ice_cube
train
rb
da0fb1ad96c511ba1366e0748719d8d5f1a3b5f2
diff --git a/lib/devise_invitable.rb b/lib/devise_invitable.rb index <HASH>..<HASH> 100644 --- a/lib/devise_invitable.rb +++ b/lib/devise_invitable.rb @@ -18,3 +18,5 @@ require 'devise_invitable/mailer' require 'devise_invitable/routes' require 'devise_invitable/schema' require 'devise_invitable/rails' +require 'devise_invitable/controllers/helpers' +require 'devise_invitable/rails/controllers/url_helpers' \ No newline at end of file
require url helpers and helpers
scambra_devise_invitable
train
rb
3eff9d378cb656369b356fdf5078d3d2c59b19ca
diff --git a/lib/opFns.js b/lib/opFns.js index <HASH>..<HASH> 100644 --- a/lib/opFns.js +++ b/lib/opFns.js @@ -894,3 +894,14 @@ function makeCall (runState, callOptions, localOpts, cb) { } } } + +function calcCallLimit (runState, gas) { + if (!runState.enableHomesteadReprice) { + return gas + } + + // div should round down + const max = runState.gasLimit.sub(runState.gasLimit.div(64)) + + return BN.min(gas, max) +}
Implement EIP<I>b (all but <I>th rule)
ethereumjs_ethereumjs-vm
train
js
de73220ce5337564e9bb109d51a255730770a221
diff --git a/moco-core/src/test/java/com/github/dreamhead/moco/MocoFileRootTest.java b/moco-core/src/test/java/com/github/dreamhead/moco/MocoFileRootTest.java index <HASH>..<HASH> 100644 --- a/moco-core/src/test/java/com/github/dreamhead/moco/MocoFileRootTest.java +++ b/moco-core/src/test/java/com/github/dreamhead/moco/MocoFileRootTest.java @@ -8,7 +8,12 @@ import org.junit.Test; import java.io.IOException; -import static com.github.dreamhead.moco.Moco.*; +import static com.github.dreamhead.moco.Moco.file; +import static com.github.dreamhead.moco.Moco.fileRoot; +import static com.github.dreamhead.moco.Moco.header; +import static com.github.dreamhead.moco.Moco.httpServer; +import static com.github.dreamhead.moco.Moco.log; +import static com.github.dreamhead.moco.Moco.template; import static com.github.dreamhead.moco.MocoMount.to; import static com.github.dreamhead.moco.helper.RemoteTestUtils.port; import static com.github.dreamhead.moco.helper.RemoteTestUtils.remoteUrl;
fixed import style in moco file root test
dreamhead_moco
train
java
9fa7d9aba48378b89f9721a80934a30df04ac6ce
diff --git a/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java b/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java index <HASH>..<HASH> 100644 --- a/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java +++ b/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java @@ -92,6 +92,7 @@ final class CameraConfigurationManager { String focusMode = null; if (prefs.getBoolean(PreferencesActivity.KEY_AUTO_FOCUS, true)) { focusMode = findSettableValue(parameters.getSupportedFocusModes(), + "continuous-picture", // Camera.Paramters.FOCUS_MODE_CONTINUOUS_PICTURE in 4.0+ Camera.Parameters.FOCUS_MODE_AUTO); } // Maybe selected auto-focus but not available, so fall through here:
Let camera use continuous-picture focus mode if available. API-wise it's <I>% legal, which means there's only a <I>% chance it will break a bunch of ICS devices git-svn-id: <URL>
zxing_zxing
train
java
be124ad6b17489db3038e47d51a44818ae5f94a7
diff --git a/lib/modules/migration/lib/manager.migration.js b/lib/modules/migration/lib/manager.migration.js index <HASH>..<HASH> 100644 --- a/lib/modules/migration/lib/manager.migration.js +++ b/lib/modules/migration/lib/manager.migration.js @@ -108,7 +108,7 @@ module.exports = function(self,deps){ function one(name){ var df = Q.defer(); m.app.models[mdl].sync(function(err){ //TODO - if(err) df.reject(); + if(err) df.reject(err); if(dbg) console.log("Model "+mdl+" synced."); df.resolve(); });
reject in orm sync one model
Kreees_muon
train
js
67264e533e72072b9f86953d769a90f37a3f0841
diff --git a/tests/test_gist.py b/tests/test_gist.py index <HASH>..<HASH> 100755 --- a/tests/test_gist.py +++ b/tests/test_gist.py @@ -393,5 +393,3 @@ class TestGistGPG(unittest.TestCase): self.assertEqual(text, plain) -if __name__ == "__main__": - unittest.main()
tests: remove unused entry-point
jdowner_gist
train
py
322c5ac8af430946735bf2b734bbc4a76072e585
diff --git a/nosedjango/nosedjango.py b/nosedjango/nosedjango.py index <HASH>..<HASH> 100644 --- a/nosedjango/nosedjango.py +++ b/nosedjango/nosedjango.py @@ -86,7 +86,8 @@ class NoseDjango(Plugin): ) parser.add_option('--django-sqlite', help='Use in-memory sqlite for the tests', - metavar='use_sqlite', + dest='use_sqlite', action="store_true", + default=False ) super(NoseDjango, self).options(parser, env) @@ -99,9 +100,7 @@ class NoseDjango(Plugin): else: self.settings_module = 'settings' - self._use_sqlite = False - if options.django_sqlite: - self._use_sqlite = True + self._use_sqlite = options.use_sqlite super(NoseDjango, self).configure(options, conf)
Fixed arg parsing for --django-sqlite option so that it doesn't just eat the next argument
nosedjango_nosedjango
train
py
5d55136ed16ce6db557105397e9d999a754faed2
diff --git a/analysis/api.py b/analysis/api.py index <HASH>..<HASH> 100644 --- a/analysis/api.py +++ b/analysis/api.py @@ -1421,8 +1421,9 @@ def coarsegrain(P, n): ################################################################################ def _showSparseConversionWarning(): - warnings.warn('Converting input to dense, since sensitivity is ' - 'currently only impled for dense types.', UserWarning) + msg = ("Converting input to dense, since this method is\n" + "currently only implemented for dense arrays") + warnings.warn(msg, UserWarning) def eigenvalue_sensitivity(T, k): r"""Sensitivity matrix of a specified eigenvalue.
[msm/analysis] Modified docstring in conversion warning. The old docstring was suggesting that a sensitivy method was called, but this warning is also issued for pcca
markovmodel_msmtools
train
py
da20a38fae8462e6fd1eeac3457c27276092aed4
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -337,11 +337,18 @@ jQuery.trumbowyg = { pasteHandlers: [], imgDblClickHandler: function () { - var $img = $(this); + var $img = $(this), + src = $img.attr('src'), + base64 = '(Base64)'; + + if (src.indexOf('data:image') === 0) { + src = base64; + } + t.openModalInsert(t.lang.insertImage, { url: { label: 'URL', - value: $img.attr('src'), + value: src, required: true }, alt: { @@ -349,10 +356,15 @@ jQuery.trumbowyg = { value: $img.attr('alt') } }, function (v) { - return $img.attr({ - src: v.url, + if (v.src !== base64) { + $img.attr({ + src: v.src + }); + } + $img.attr({ alt: v.alt }); + return true; }); return false; },
fix: avoid crash on base<I> image edit on double click
Alex-D_Trumbowyg
train
js
444abfdda678fd3ea3164943d3bd7e5631308032
diff --git a/allauth_extras/admin.py b/allauth_extras/admin.py index <HASH>..<HASH> 100644 --- a/allauth_extras/admin.py +++ b/allauth_extras/admin.py @@ -45,7 +45,7 @@ class BaseUserChangeForm(DjangoBaseUserChangeForm): return self.initial.get("password") def save(self, commit=True): - if self.instance.id is not None: + if self.instance.id is None: self.instance.set_unusable_password() return super().save(commit=False)
fixed password getting reset everytime a user was saved, oops
damoti_django-allauth-extras
train
py
7c91357dd47080e43f36bce6c8d94a7c94bff8fe
diff --git a/core/server/master/src/test/java/alluxio/master/meta/AlluxioMasterRestServiceHandlerTest.java b/core/server/master/src/test/java/alluxio/master/meta/AlluxioMasterRestServiceHandlerTest.java index <HASH>..<HASH> 100644 --- a/core/server/master/src/test/java/alluxio/master/meta/AlluxioMasterRestServiceHandlerTest.java +++ b/core/server/master/src/test/java/alluxio/master/meta/AlluxioMasterRestServiceHandlerTest.java @@ -198,12 +198,7 @@ public final class AlluxioMasterRestServiceHandlerTest { final int FILES_PINNED_TEST_VALUE = 100; String filesPinnedProperty = MetricsSystem.getMetricName(MasterMetrics.FILES_PINNED); - Gauge<Integer> filesPinnedGauge = new Gauge<Integer>() { - @Override - public Integer getValue() { - return FILES_PINNED_TEST_VALUE; - } - }; + Gauge<Integer> filesPinnedGauge = () -> FILES_PINNED_TEST_VALUE; MetricSet mockMetricsSet = mock(MetricSet.class); Map<String, Metric> map = new HashMap<>(); map.put(filesPinnedProperty, filesPinnedGauge);
Java 8 Improvement: replace anonymous type with lambda in alluxio.master.meta.AlluxioMasterRestServiceHandlerTest (#<I>)
Alluxio_alluxio
train
java
1bbf3ec9323ea5599f14ba3a198032cf8204304f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ import tween from './tweener' let deviceScreen = Dimensions.get('window') const DOUBLE_TAP_INTERVAL = 500 -const TAP_DURATION = 100 +const TAP_DURATION = 250 const propsWhomRequireUpdate = ['closedDrawerOffset', 'openDrawerOffset', 'type', 'styles'] export default class Drawer extends Component {
more generous <I>ms tap threshold
root-two_react-native-drawer
train
js
e07fb0a481625d5b51c82d641e1f0a697913afc5
diff --git a/src/Controller/HybridAuthController.php b/src/Controller/HybridAuthController.php index <HASH>..<HASH> 100644 --- a/src/Controller/HybridAuthController.php +++ b/src/Controller/HybridAuthController.php @@ -51,6 +51,6 @@ class HybridAuthController extends AppController $this->Auth->setUser($user); return $this->redirect($this->Auth->redirectUrl()); } - return $this->redirect($this->Auth->loginAction); + return $this->redirect($this->Auth->config('loginAction')); } }
"loginAction" is no longer a property in 3.x Fixes #<I>
ADmad_CakePHP-HybridAuth
train
php
c6637172f0b2130867d77001d10468b70a0eb09a
diff --git a/core-bundle/src/Resources/contao/pages/PageLogout.php b/core-bundle/src/Resources/contao/pages/PageLogout.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/pages/PageLogout.php +++ b/core-bundle/src/Resources/contao/pages/PageLogout.php @@ -11,7 +11,6 @@ namespace Contao; use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Response; /** @@ -27,7 +26,7 @@ class PageLogout extends \Frontend * * @param PageModel $objPage * - * @return Response + * @return RedirectResponse */ public function getResponse($objPage) {
[Core] Correct the return value of the PageLogout class.
contao_contao
train
php
654dcf7bb321849a76cf6d5ef05310e9cf63e961
diff --git a/Python/ibmcloudsql/SQLQuery.py b/Python/ibmcloudsql/SQLQuery.py index <HASH>..<HASH> 100644 --- a/Python/ibmcloudsql/SQLQuery.py +++ b/Python/ibmcloudsql/SQLQuery.py @@ -1230,6 +1230,7 @@ class SQLQuery(COSClient, SQLMagic, HiveMetastore): if ( job_id in self.jobs_tracking and self.jobs_tracking[job_id].get("status") != "running" + and self.jobs_tracking[job_id].get("status") != "queued" ): result = self.jobs_tracking[job_id] else:
Fixing incorrect job information for queued jobs If a job has the status "queued" during the "get_job" call, it is added to "self.jobs_tracking" with the status "queued". If you now call "get_job" again, no new job details are retrieved via the REST API, but only the old job details are returned. This is not a problem for completed and failed jobs, but it is for queued jobs. Therefore, it must be additionally checked that the job status is not "queued".
IBM-Cloud_sql-query-clients
train
py
87d9c0d8c321b01d3ac2e7b21d3b9b6d1cdf34ca
diff --git a/Manager/InstallationManager.php b/Manager/InstallationManager.php index <HASH>..<HASH> 100644 --- a/Manager/InstallationManager.php +++ b/Manager/InstallationManager.php @@ -49,6 +49,8 @@ class InstallationManager $this->recorder->addBundles(array(get_class($bundle))); $this->kernel->switchToTmpEnvironment(); $this->container = $this->kernel->getContainer(); + // tmp fix + $this->container->setParameter('stof_doctrine_extensions.uploadable.validate_writable_directory', true); // bundle mapping is only accessible in the new container instance $this->fixtureLoader = $this->container->get('claroline.installation.fixture_loader');
[InstallationBundle] Tmp fix
claroline_Distribution
train
php
5aacbdd72f175a34a970a3ff1175759a57039422
diff --git a/angr/analyses/ddg.py b/angr/analyses/ddg.py index <HASH>..<HASH> 100644 --- a/angr/analyses/ddg.py +++ b/angr/analyses/ddg.py @@ -665,10 +665,16 @@ class DDG(Analysis): worklist = [] worklist_set = set() - # initial nodes are those nodes in CFG that has no in-degrees - for n in self._cfg.graph.nodes_iter(): - if self._cfg.graph.in_degree(n) == 0: - # Put it into the worklist + # Initialize the worklist + if self._start is None: + # initial nodes are those nodes in CFG that has no in-degrees + for n in self._cfg.graph.nodes_iter(): + if self._cfg.graph.in_degree(n) == 0: + # Put it into the worklist + job = DDGJob(n, 0) + self._worklist_append(job, worklist, worklist_set) + else: + for n in self._cfg.get_all_nodes(self._start): job = DDGJob(n, 0) self._worklist_append(job, worklist, worklist_set)
DDG: Support the start parameter.
angr_angr
train
py
e2a70f0a786f8e9ecf1d8b70f6cfb498a1af5ab4
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100755 --- a/devices.js +++ b/devices.js @@ -5451,6 +5451,24 @@ const devices = [ fromZigbee: [fz.closuresWindowCovering_report_pos_and_tilt, fz.ignore_closuresWindowCovering_change], toZigbee: [tz.cover_control, tz.cover_gotopercentage], }, + + // Lingan + { + zigbeeModel: ['SA-003-Zigbee'], + model: 'DZ4743-00B', + vendor: 'Lingan', + description: 'Zigbee OnOff controller', + supports: 'on/off', + fromZigbee: [fz.state_change, fz.state], + toZigbee: [tz.on_off], + configure: (ieeeAddr, shepherd, coordinator, callback) => { + const device = shepherd.find(ieeeAddr, 1); + const actions = [ + (cb) => device.bind('genOnOff', coordinator, cb), + ]; + execute(device, actions, callback); + }, + }, ]; module.exports = devices.map((device) =>
add support SA-<I>-Zigbee (#<I>) * add support SA-<I>-Zigbee * Update devices.js
Koenkk_zigbee-shepherd-converters
train
js
a4c056ce9e691c402ced21d02118b50b2fddb64c
diff --git a/src/main/org/codehaus/groovy/transform/AnnotationCollectorTransform.java b/src/main/org/codehaus/groovy/transform/AnnotationCollectorTransform.java index <HASH>..<HASH> 100644 --- a/src/main/org/codehaus/groovy/transform/AnnotationCollectorTransform.java +++ b/src/main/org/codehaus/groovy/transform/AnnotationCollectorTransform.java @@ -115,13 +115,17 @@ public class AnnotationCollectorTransform { AnnotationConstantExpression ace = (AnnotationConstantExpression) e; return serialize((AnnotationNode) ace.getValue()); } else if (e instanceof ListExpression) { + boolean annotationConstant = false; ListExpression le = (ListExpression) e; List<Expression> list = le.getExpressions(); List<Expression> newList = new ArrayList<Expression>(list.size()); for (Expression exp: list) { + annotationConstant = annotationConstant || exp instanceof AnnotationConstantExpression; newList.add(serialize(exp)); } - return new ArrayExpression(ClassHelper.OBJECT_TYPE, newList); + ClassNode type = ClassHelper.OBJECT_TYPE; + if (annotationConstant) type = type.makeArray(); + return new ArrayExpression(type, newList); } return e; }
fix serialization/deserialization once again
apache_groovy
train
java
2e70b2430f1c0de4268b605c002b2e3c18c6883a
diff --git a/models/User.php b/models/User.php index <HASH>..<HASH> 100644 --- a/models/User.php +++ b/models/User.php @@ -16,8 +16,8 @@ class User extends UserBase * Validation rules */ public $rules = [ - 'username' => 'required|between:2,64|unique:users', 'email' => 'required|between:3,64|email|unique:users', + 'username' => 'required|between:2,64|unique:users', 'password' => 'required:create|between:4,64|confirmed', 'password_confirmation' => 'required_with:password|between:4,64' ];
Runs email validation at first, because we need email when username is empty (to substitute it).
rainlab_user-plugin
train
php
84b2b9aa77d1f21725fd42290aa7ba9f5001e5d3
diff --git a/mod/forum/lib.php b/mod/forum/lib.php index <HASH>..<HASH> 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -6954,7 +6954,7 @@ function forum_discussion_update_last_post($discussionid) { * @return array */ function forum_get_view_actions() { - return array('view discussion','search','forum','forums','subscribers'); + return array('view discussion', 'search', 'forum', 'forums', 'subscribers', 'view forum'); } /**
MDL-<I> forum: Added missing item to forum_get_view_actions
moodle_moodle
train
php
3c51a6789586d02ab47f09d562fc9d6821510891
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 @@ -668,12 +668,13 @@ def get_source_sum(file_name='', if hsum_len not in HASHES_REVMAP: _invalid_source_hash_format() elif hsum_len != HASHES[ret['hash_type']]: - msg = ( + raise CommandExecutionError( 'Invalid length ({0}) for hash type \'{1}\'. Either ' 'remove the hash type and simply use \'{2}\' as the ' 'source_hash, or change the hash type to \'{3}\''.format( hsum_len, ret['hash_type'], + ret['hsum'], HASHES_REVMAP[hsum_len], ) )
Raise exception, and also fix error with call to str.format()
saltstack_salt
train
py
3181364fdbb0ea3573e4953f14e137f47a5c77db
diff --git a/Kwc/Directories/List/ViewAjax/Component.js b/Kwc/Directories/List/ViewAjax/Component.js index <HASH>..<HASH> 100644 --- a/Kwc/Directories/List/ViewAjax/Component.js +++ b/Kwc/Directories/List/ViewAjax/Component.js @@ -94,7 +94,7 @@ Kwc.Directories.List.ViewAjax = Ext.extend(Ext.Panel, { records.push(new this.view.store.recordType({ id: id, content: el.dom.innerHTML - })); + }, id)); } el.remove(); }, this);
fix AjaxView if ids are around <I> for manually created records also use id like records loaded by ajax
koala-framework_koala-framework
train
js
804e990c6703661056943132a31ef3c821fb9c32
diff --git a/modules/wyil/src/wyil/builders/VcBranch.java b/modules/wyil/src/wyil/builders/VcBranch.java index <HASH>..<HASH> 100644 --- a/modules/wyil/src/wyil/builders/VcBranch.java +++ b/modules/wyil/src/wyil/builders/VcBranch.java @@ -651,8 +651,7 @@ public class VcBranch { for (int i = 0; i != newEnvironment.length; ++i) { if (toPatch.get(i)) { // This register needs to be patched - Expr.Variable var = new Expr.Variable(prefixes[i] + "_" - + pc); // FIXME: pc + Expr.Variable var = new Expr.Variable(prefixes[i] + "_" + subscripts[i]); for (int j = 0; j != branches.length; ++j) { branches[j].assume(new Expr.Binary(Expr.Binary.Op.EQ, var, branches[j].read(i)));
WyIL: Minor fix for that fix.
Whiley_WhileyCompiler
train
java
c0bf8806fe93b299ce0aeaed077bcaa36ef083fd
diff --git a/js/huobipro.js b/js/huobipro.js index <HASH>..<HASH> 100644 --- a/js/huobipro.js +++ b/js/huobipro.js @@ -215,6 +215,7 @@ module.exports = class huobipro extends Exchange { 'api-signature-not-valid': AuthenticationError, // {"status":"error","err-code":"api-signature-not-valid","err-msg":"Signature not valid: Incorrect Access key [Access key错误]","data":null} 'base-record-invalid': OrderNotFound, // https://github.com/ccxt/ccxt/issues/5750 'base-symbol-trade-disabled': BadSymbol, // {"status":"error","err-code":"base-symbol-trade-disabled","err-msg":"Trading is disabled for this symbol","data":null} + 'base-symbol-error': BadSymbol, // {"status":"error","err-code":"base-symbol-error","err-msg":"The symbol is invalid","data":null} 'system-maintenance': OnMaintenance, // {"status": "error", "err-code": "system-maintenance", "err-msg": "System is in maintenance!", "data": null} // err-msg 'invalid symbol': BadSymbol, // {"ts":1568813334794,"status":"error","err-code":"invalid-parameter","err-msg":"invalid symbol"}
Handle huobi base-symbol-error as BadSymbol
ccxt_ccxt
train
js
350520dc83d865ced1e12fa07c746b10411aba59
diff --git a/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/EngineWorkflowExecutor.java b/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/EngineWorkflowExecutor.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/EngineWorkflowExecutor.java +++ b/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/EngineWorkflowExecutor.java @@ -233,7 +233,7 @@ public class EngineWorkflowExecutor extends BaseWorkflowExecutor { }, () -> { // System.err.println("produce next shared data " + sharedContext); - return new WFSharedContext(sharedContext); + return sharedContext; } );
EngineWorkflowExecutor: produce shared data uses same object
rundeck_rundeck
train
java
5a7fcb612e7149f7b89a548e8f2265c15824b8e8
diff --git a/spock-core/src/main/java/org/spockframework/compiler/AstUtil.java b/spock-core/src/main/java/org/spockframework/compiler/AstUtil.java index <HASH>..<HASH> 100755 --- a/spock-core/src/main/java/org/spockframework/compiler/AstUtil.java +++ b/spock-core/src/main/java/org/spockframework/compiler/AstUtil.java @@ -353,10 +353,11 @@ public abstract class AstUtil { public static boolean isJointCompiled(ClassNode clazz) { return clazz.getModule().getUnit().getConfig().getJointCompilationOptions() != null; } - + public static MethodCallExpression createDirectMethodCall(Expression target, MethodNode method, Expression arguments) { MethodCallExpression result = new MethodCallExpression(target, method.getName(), arguments); result.setMethodTarget(method); + result.setImplicitThis(false); // see http://groovy.329449.n5.nabble.com/Problem-with-latest-2-0-beta-3-snapshot-and-Spock-td5496353.html return result; }
set MethodCallExpression.setImplicitThis to false for direct method calls
spockframework_spock
train
java
786f9c87c9add27902b8249fe9589d22df4e0bbc
diff --git a/gns3server/schemas/docker.py b/gns3server/schemas/docker.py index <HASH>..<HASH> 100644 --- a/gns3server/schemas/docker.py +++ b/gns3server/schemas/docker.py @@ -82,8 +82,14 @@ DOCKER_CREATE_SCHEMA = { "description": "Docker environment variables", "type": ["string", "null"], "minLength": 0, + }, + "container_id": { + "description": "Docker container ID Read only", + "type": "string", + "minLength": 12, + "maxLength": 64, + "pattern": "^[a-f0-9]+$" } - }, "additionalProperties": False, "required": ["name", "image"]
Fix a crash when reloading a project with Docker
GNS3_gns3-server
train
py
d46c5241fcf8a0667d8e23c42fe1cc5627fc9775
diff --git a/doc/gendocs/fnToDoc.js b/doc/gendocs/fnToDoc.js index <HASH>..<HASH> 100644 --- a/doc/gendocs/fnToDoc.js +++ b/doc/gendocs/fnToDoc.js @@ -69,7 +69,7 @@ module.exports = (code, codeModule) => { const beginReturn = comment.match(expressions.returnTitle) if (beginReturn) { - output += '<p style="display: inline">Returns:</p>\n\n' + output += '<p style="display: inline">Return:</p>\n\n' substate = 'return' return
Simplify api doc titles
axelpale_nudged
train
js
0de6b447e5ee065e6bd768efd78bc292d99d01a3
diff --git a/packages/table/src/table-header.js b/packages/table/src/table-header.js index <HASH>..<HASH> 100644 --- a/packages/table/src/table-header.js +++ b/packages/table/src/table-header.js @@ -369,9 +369,15 @@ export default { const bodyStyle = document.body.style; if (rect.width > 12 && rect.right - event.pageX < 8) { bodyStyle.cursor = 'col-resize'; + if (hasClass(target, 'is-sortable')) { + target.style.cursor = 'col-resize'; + } this.draggingColumn = column; } else if (!this.dragging) { bodyStyle.cursor = ''; + if (hasClass(target, 'is-sortable')) { + target.style.cursor = 'pointer'; + } this.draggingColumn = null; } }
Table: Add `important` rule to `col-resize` cursor (#<I>) * Table: Add `important` rule to `col-resize` cursor * Table: Add `important` rule to `col-resize` cursor * Update table-header.js
ElemeFE_element
train
js
2dbc98393aeb1db69857419650e35acba4801eef
diff --git a/scripts/experiments/scrape_expout.py b/scripts/experiments/scrape_expout.py index <HASH>..<HASH> 100644 --- a/scripts/experiments/scrape_expout.py +++ b/scripts/experiments/scrape_expout.py @@ -109,7 +109,7 @@ class DPScraper(Scraper): scraper.scrape_exp_dirs(exp_dirs) # Run bnb-time-estimate.R estimate_file = os.path.join(exp_dir, "bnb-time-estimate.out") - cmd = 'bash -c "Rscript %s/scripts/plot/bnb-time-estimate.R %s > %s"' % (self.root_dir, status_file, estimate_file) + cmd = 'bash -c "Rscript %s/scripts/plot/bnb-time-estimate.R %s &> %s"' % (self.root_dir, status_file, estimate_file) print "Running:", cmd subprocess.check_call(shlex.split(cmd)) # Get the estimated time to complete a full run of branch and bound.
Printing stderr to R output file as well git-svn-id: svn+ssh://external.hltcoe.jhu.edu/home/hltcoe/mgormley/public/repos/dep_parse_filtered/trunk@<I> <I>f-cb4b-<I>-8b<I>-c<I>bcb<I>
mgormley_pacaya
train
py
1909c24b5096c9781d45b8abce3e38a4eb1746b8
diff --git a/bdata/bdata.py b/bdata/bdata.py index <HASH>..<HASH> 100644 --- a/bdata/bdata.py +++ b/bdata/bdata.py @@ -380,6 +380,10 @@ class bdata(mdata): "ILE2A1:HH:RDCU" :"hh_current", "ILE2A1:HH:RDCUR" :"hh_current", "ILE2A1:HH3:RDCUR" :"hh_current", + + "TRILIS177:METER:LAMBDA1" :"las_lambda", + "TRILIS177:METER:WAVENUM1" :"las_wavenum", + "":"" }
Added laser lambda, wavenum, to dkeys
dfujim_bdata
train
py
7db99a1091489122153a9ad549414235ef5df23f
diff --git a/doc/conf.py b/doc/conf.py index <HASH>..<HASH> 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -127,7 +127,7 @@ html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +#html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format.
doc/conf.py: no static files here
markokr_rarfile
train
py
b5709fc520378e0f05f799caf76a682907e5a5f0
diff --git a/src/Handler.php b/src/Handler.php index <HASH>..<HASH> 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -29,6 +29,18 @@ class Handler protected $previousExceptionHandler; /** + * A bit of reserved memory to ensure we are able to increase the memory + * limit on an OOM. + * + * We can't reserve all of the memory that we need to send OOM reports + * because this would have a big overhead on every request, instead of just + * on shutdown in requests with errors. + * + * @var string|null + */ + private $reservedMemory = null; + + /** * Whether the shutdown handler will run. * * This is used to disable the shutdown handler in order to avoid double @@ -136,6 +148,7 @@ class Handler */ public function registerShutdownHandler() { + $this->reservedMemory = str_repeat(' ', 1024 * 32); register_shutdown_function([$this, 'shutdownHandler']); } @@ -267,6 +280,8 @@ class Handler */ public function shutdownHandler() { + $this->reservedMemory = null; + // If we're disabled, do nothing. This avoids reporting twice if the // exception handler is forcing the native PHP handler to run if (!self::$enableShutdownHandler) {
Reserve a bit of memory for handling OOMs We only grab a small amount as we don't want to reserve 5 MiB for every single request
bugsnag_bugsnag-php
train
php
7243f1ce24df5b3576a035b403eb9058e9826d78
diff --git a/skyscanner/__init__.py b/skyscanner/__init__.py index <HASH>..<HASH> 100755 --- a/skyscanner/__init__.py +++ b/skyscanner/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- __author__ = 'Ardy Dedase' __email__ = '[email protected]' -__version__ = '0.1.0' +__version__ = '1.1.1' from .skyscanner import Flights, FlightsCache, Hotels, CarHire \ No newline at end of file
:zap: Update version number
Skyscanner_skyscanner-python-sdk
train
py
3acbb5f41b3d4712724de8d77077b4058de275fe
diff --git a/src/main/java/gwt/material/design/client/data/BaseRenderer.java b/src/main/java/gwt/material/design/client/data/BaseRenderer.java index <HASH>..<HASH> 100644 --- a/src/main/java/gwt/material/design/client/data/BaseRenderer.java +++ b/src/main/java/gwt/material/design/client/data/BaseRenderer.java @@ -131,7 +131,12 @@ public class BaseRenderer<T> implements Renderer<T> { for(int c = 0; c < colSize; c++) { int colIndex = c + colOffset; Context context = new Context(rowComponent.getIndex(), colIndex, valueKey); - drawColumn(row, context, data, columns.get(c), colIndex, dataView.isHeaderVisible(colIndex)); + Column<T, ?> column = columns.get(c); + TableData td = drawColumn(row, context, data, column, colIndex, dataView.isHeaderVisible(colIndex)); + FrozenProperties frozenProps = column.getFrozenProperties(); + if(frozenProps != null) { + drawColumnFreeze(td, rowComponent, headers.get(colIndex), column, frozenProps.getSide()); + } } rowComponent.setRedraw(false); }
Fixed a merge issue with frozen column.
GwtMaterialDesign_gwt-material-table
train
java
167169d6fe650c1edc7940ec41859b6e7047d0ab
diff --git a/dynamic_scraper/spiders/django_spider.py b/dynamic_scraper/spiders/django_spider.py index <HASH>..<HASH> 100644 --- a/dynamic_scraper/spiders/django_spider.py +++ b/dynamic_scraper/spiders/django_spider.py @@ -341,7 +341,12 @@ class DjangoSpider(DjangoBaseSpider): item = loader.load_item() if name in item: self.tmp_non_db_results[item_num][scraper_elem.scraped_obj_attr.name] = item[name] - msg = '{page: <4} {name: <20}'.format(name=name, page=from_page) + rpt = self.scraper.requestpagetype_set.filter(page_type=from_page)[0] + rpt_str = rpt.get_content_type_display() + if rpt.render_javascript: + rpt_str += '-JS' + rpt_str += '|' + rpt.method + msg = '{page: <4} {rpt_str: <13} {name: <20} {num} '.format(num=str(item_num), name=name, rpt_str=rpt_str, page=from_page) c_values = loader.get_collected_values(name) if len(c_values) > 0: msg += "'" + smart_text(c_values[0]) + "'"
Added comprehensive attribute context info to log output
holgerd77_django-dynamic-scraper
train
py
6df14c2d6f19e34dc594228c75701639a5ec8be0
diff --git a/src/main/java/com/couchbase/lite/replicator/Replication.java b/src/main/java/com/couchbase/lite/replicator/Replication.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/couchbase/lite/replicator/Replication.java +++ b/src/main/java/com/couchbase/lite/replicator/Replication.java @@ -751,7 +751,7 @@ public class Replication * replication's CBLAuthenticator. Also removes session cookies from the cookie store. */ @InterfaceAudience.Public - public boolean removeStoredCredentials() { + public boolean clearAuthenticationStores() { if (getAuthenticator() != null) { if (!(getAuthenticator() instanceof Authorizer) || !((Authorizer) getAuthenticator()).removeStoredCredentials())
Fixed #<I> - Rename removeStoredCredentials to clearAuthenticationStores
couchbase_couchbase-lite-java-core
train
java
f10bffce70e6721d6e9876dde93c1bbeae5b3a6a
diff --git a/source/rafcon/gui/runtime_config.py b/source/rafcon/gui/runtime_config.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/runtime_config.py +++ b/source/rafcon/gui/runtime_config.py @@ -72,6 +72,9 @@ class RuntimeConfig(ObservableConfig): def update_recently_opened_state_machines_with(self, state_machine_m): """ Update recently opened list with file system path of handed state machine model + The inserts handed state machine file system path into the recent opened state machines or moves it to be the + first element in the list. Call of this method also does a cleanup from not existing paths. + :param rafcon.gui.models.state_machine.StateMachineModel state_machine_m: State machine model to check :return: """ @@ -84,6 +87,7 @@ class RuntimeConfig(ObservableConfig): del recently_opened_state_machines[recently_opened_state_machines.index(sm.file_system_path)] recently_opened_state_machines.insert(0, sm.file_system_path) self.set_config_value('recently_opened_state_machines', recently_opened_state_machines) + self.clean_recently_opended_state_machines() def extend_recently_opened_by_current_open_state_machines(self): """ Update list with all in the state machine manager opened state machines """
runtime config: do clenup of recent opened paths after every update, again - better user feedback and the cost is nothing at the moment
DLR-RM_RAFCON
train
py
1c8c58a03a5bc35327e4243baa95c61bc6b79a2d
diff --git a/lib/ecs_deployer/version.rb b/lib/ecs_deployer/version.rb index <HASH>..<HASH> 100644 --- a/lib/ecs_deployer/version.rb +++ b/lib/ecs_deployer/version.rb @@ -1,3 +1,3 @@ module EcsDeployer - VERSION = '2.1.0.rc1'.freeze + VERSION = '2.1.0.rc2'.freeze end
[#<I>] Update version
naomichi-y_ecs_deployer
train
rb
692be9f9fd1236dac8a7e446216655fb72fda3df
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -19,24 +19,21 @@ https://github.com/genialis/resolwe-runtime-utils https://github.com/genialis/resolwe """ -from setuptools import setup, find_packages +import os.path +import setuptools -# Use codecs' open for a consistent encoding -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) +base_dir = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file -with open(path.join(here, 'README.rst'), encoding='utf-8') as f: - long_description = f.read() +with open(os.path.join(base_dir, 'README.rst')) as fh: + long_description = fh.read() # Get package metadata from '__about__.py' file about = {} -with open(path.join(here, '__about__.py'), encoding='utf-8') as f: - exec(f.read(), about) +with open(os.path.join(base_dir, '__about__.py')) as fh: + exec(fh.read(), about) -setup( +setuptools.setup( name=about['__name__'], use_scm_version=True, description=about['__summary__'],
Overhaul and modernize setup.py
genialis_resolwe-runtime-utils
train
py
33528bf6c38c057d19571ead73b1f1fc02733f32
diff --git a/cumulusci/core/exceptions.py b/cumulusci/core/exceptions.py index <HASH>..<HASH> 100644 --- a/cumulusci/core/exceptions.py +++ b/cumulusci/core/exceptions.py @@ -70,9 +70,9 @@ class DependencyResolutionError(CumulusCIException): class ConfigError(CumulusCIException): """ Raised when a configuration enounters an error """ - def __init__(self, message, **kwargs): + def __init__(self, message=None, **kwargs): super(ConfigError, self).__init__(message) - self.config_name = kwargs.get('config_name',"") + self.config_name = kwargs.get("config_name", "") class ConfigMergeError(ConfigError):
exception should not break tests, cdc
SFDO-Tooling_CumulusCI
train
py
810b7f841a587b125363f124db4c0b96b74e3f31
diff --git a/lib/chars/string_enumerator.rb b/lib/chars/string_enumerator.rb index <HASH>..<HASH> 100644 --- a/lib/chars/string_enumerator.rb +++ b/lib/chars/string_enumerator.rb @@ -3,6 +3,8 @@ module Chars # Enumerates through every possible string belonging to a character set and # of a given length. # + # @api private + # # @since 0.3.0 # class StringEnumerator
Mark Chars::StringEnumerator as @api private.
postmodern_chars
train
rb
eaa85e1ef41ced9bd553c74d9541ad8bad32c14b
diff --git a/packages/cozy-konnector-libs/src/helpers/cozy-client-js-stub.js b/packages/cozy-konnector-libs/src/helpers/cozy-client-js-stub.js index <HASH>..<HASH> 100644 --- a/packages/cozy-konnector-libs/src/helpers/cozy-client-js-stub.js +++ b/packages/cozy-konnector-libs/src/helpers/cozy-client-js-stub.js @@ -26,8 +26,22 @@ if (fs.existsSync(KONNECTOR_DEV_CONFIG_PATH)) { DUMP_PATH ) } -// Truncate dump file -fs.writeFileSync(DUMP_PATH, '[]', 'utf8') + +const ensureImportedDataExists = () => { + // Truncate dump file + const initialContent = '[]' + const write = () => fs.writeFileSync(DUMP_PATH, initialContent, 'utf8'); + try { + const content = fs.readFileSync(DUMP_PATH).toString() + if (content !== initialContent) { + write() + } + } catch (e) { + write() + } +} + +ensureImportedDataExists() function loadImportedDataJSON() { let docStore = []
🐝 fix: do not truncate rewrite if content is already there. prevents jest watch from infinite restart
konnectors_libs
train
js
33f8cdc00ee11d2d81d9b4f10ba24b99f38a76a4
diff --git a/mordred.py b/mordred.py index <HASH>..<HASH> 100755 --- a/mordred.py +++ b/mordred.py @@ -62,7 +62,8 @@ logger = logging.getLogger(__name__) class Task(): """ Basic class shared by all tasks """ - ES_INDEX_FIELDS = ['enriched_index', 'raw_index'] + # filter-raw is used to filter the raw index to do partial enrichment + ES_INDEX_FIELDS = ['enriched_index', 'raw_index', 'filter-raw'] def __init__(self, conf): self.conf = conf @@ -627,6 +628,9 @@ class TaskEnrich(Task): github_token = None if 'github' in self.conf and 'backend_token' in self.conf['github']: github_token = self.conf['github']['backend_token'] + filter_raw = None + if 'filter-raw' in cfg[self.backend_name]: + filter_raw = cfg[self.backend_name]['filter-raw'] only_studies = False only_identities=False for r in self.repos: @@ -651,7 +655,10 @@ class TaskEnrich(Task): cfg['sh_password'], cfg['sh_host'], None, #args.refresh_projects, - None) #args.refresh_identities) + None, #args.refresh_identities, + author_id=None, + author_uuid=None, + filter_raw=filter_raw) except KeyError as e: logger.exception(e)
[filter-raw] Add filter-raw support to mordred so it can done particial enrichment from filtered raw items
chaoss_grimoirelab-sirmordred
train
py
f7782935dde2254681dd334a0a6f31efed72f70f
diff --git a/test/cursor_test.js b/test/cursor_test.js index <HASH>..<HASH> 100644 --- a/test/cursor_test.js +++ b/test/cursor_test.js @@ -945,10 +945,31 @@ var tests = testCase({ }); }); }); - }, + }, + + shouldHandleThrowingNextObjectCallback : function(test) { + client.createCollection('test_throwing_in_nextObject_callback', function(err, collection) { + collection.insert({'x':1}, {safe:true}, function(err, doc) { + test.equal(err, null); + collection.find(function(err, cursor) { + test.equal(err, null); + + var times = 0; + cursor.nextObject(function(err, doc) { + ++times; + test.equal(times, 1); + if (times > 1) return test.done(); + //test.equal(err, null); + //test.equal(1, doc.x); + throw new Error("KaBoom!"); + }); + }); + }); + }); + } }) // Stupid freaking workaround due to there being no way to run setup once for each suite var numberOfTestsRun = Object.keys(tests).length; // Assign out tests -module.exports = tests; \ No newline at end of file +module.exports = tests;
failing test; throwing within cursor.nextObject()
mongodb_node-mongodb-native
train
js
0690e9b94b4dbf86960b72e29560b8a8d481d638
diff --git a/src/Client/SimpleHttpClient.php b/src/Client/SimpleHttpClient.php index <HASH>..<HASH> 100644 --- a/src/Client/SimpleHttpClient.php +++ b/src/Client/SimpleHttpClient.php @@ -45,18 +45,19 @@ class SimpleHttpClient implements HttpClientInterface ]); - $response = curl_exec($curl); - $error = curl_error($curl); - $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); + $response = curl_exec($curl); + $error = curl_error($curl); + $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); + $curlErrorNumber = curl_errno($curl); - if (!curl_errno($curl)) { + curl_close($curl); + + if ($curlErrorNumber == 0) { return (new SimpleResponse(new StringLiteral($response), new IntegerNumber($code), $url)) ->setHeaders($url->getParams()->toArray()); } - curl_close($curl); - - throw new \Exception($error, 500); + throw new \Exception('Curl error: '. $error, 500); } /**
Modified a condition which checks for number of curl errors
g4code_gateway
train
php
2f48a49cf8d4b712f1c7830a073e258de04a7f81
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ install_requires = [ tests_require = [ 'pytest', + 'pytest-cov', 'flake8', ]
Add pytest-cov to test requirements
getsentry_responses
train
py
2ccb32cfe9928d1b8994bfb424ca16fc0df3dce5
diff --git a/test/monaco/esm-check/esm-check.js b/test/monaco/esm-check/esm-check.js index <HASH>..<HASH> 100644 --- a/test/monaco/esm-check/esm-check.js +++ b/test/monaco/esm-check/esm-check.js @@ -8,7 +8,7 @@ const fs = require('fs'); const path = require('path'); const util = require('../../../build/lib/util'); -const playwright = require('playwright'); +const playwright = require('@playwright/test'); const yaserver = require('yaserver'); const http = require('http');
Use `@playwright/test` instead of `playwright`
Microsoft_vscode
train
js
96c4ea8cf2208343ceab9fbb167f9e7a30f9b948
diff --git a/index.js b/index.js index <HASH>..<HASH> 100755 --- a/index.js +++ b/index.js @@ -71,6 +71,7 @@ function copyFiles(args, config, callback) { next(); }); })) + .on('error', callback) .pipe(through(function (pathName, _, next) { fs.stat(pathName, function (err, pathStat) { if (err) { @@ -108,6 +109,7 @@ function copyFiles(args, config, callback) { }) }); })) + .on('error', callback) .pipe(through(function (pathName, _, next) { var outName = path.join(outDir, dealWith(pathName, opts)); fs.createReadStream(pathName)
fix(stream): proper error handling (#<I>) if mkdirp raises an error, e.g trying to create a folder inside a read-only target, the error does not get propagated properly to the consumer and the client app dies without any chance to catch it. Added it for the first glob pipe as well, although not sure how this might be possible to fail (tried by throwing error manually from within code)
calvinmetcalf_copyfiles
train
js
333b8c58e14fdb73eaafec38d8bb54d9ae6843d7
diff --git a/src/factories/createAudioElementWithLoopEvent.js b/src/factories/createAudioElementWithLoopEvent.js index <HASH>..<HASH> 100644 --- a/src/factories/createAudioElementWithLoopEvent.js +++ b/src/factories/createAudioElementWithLoopEvent.js @@ -1,8 +1,13 @@ -const loopchange = new Event('loopchange'); +let loopchange; function createAudioElementWithLoopEvent () { const audio = document.createElement('audio'); new MutationObserver(() => { + // we shouldn't initialize loopchange at the module + // level since our code could be run inside of Node + // for server rendering (which won't require use of + // this module but may still import it). + loopchange = loopchange || new Event('loopchange'); audio.dispatchEvent(loopchange); }).observe(audio, { attributeFilter: ['loop']
Loopchange event not initialized on server side.
benwiley4000_cassette
train
js
fcffe91d4932eccdff518cb71c049eb7a2b8d60e
diff --git a/lib/queue_classic/durable_array.rb b/lib/queue_classic/durable_array.rb index <HASH>..<HASH> 100644 --- a/lib/queue_classic/durable_array.rb +++ b/lib/queue_classic/durable_array.rb @@ -8,6 +8,15 @@ module QC @details = args["details"] @locked_at = args["locked_at"] end + + def klass + Kernel.const_get(details["job"].split(".").first) + end + + def method + details["job"].split(".").last + end + end class DurableArray
added methods to job to get the class and method from job details
QueueClassic_queue_classic
train
rb
68e73366d96135008b7719ad47ef28a977018615
diff --git a/Doctrine/AbstractElasticaToModelTransformer.php b/Doctrine/AbstractElasticaToModelTransformer.php index <HASH>..<HASH> 100644 --- a/Doctrine/AbstractElasticaToModelTransformer.php +++ b/Doctrine/AbstractElasticaToModelTransformer.php @@ -5,6 +5,7 @@ namespace FOQ\ElasticaBundle\Doctrine; use FOQ\ElasticaBundle\HybridResult; use FOQ\ElasticaBundle\Transformer\ElasticaToModelTransformerInterface; use Elastica_Document; +use RuntimeException; /** * Maps Elastica documents with Doctrine objects @@ -89,6 +90,9 @@ abstract class AbstractElasticaToModelTransformer implements ElasticaToModelTran public function hybridTransform(array $elasticaObjects) { $objects = $this->transform($elasticaObjects); + if (count($objects) < count($elasticaObjects)) { + throw new RuntimeException('Cannot transform all Elastica results into objects.'); + }; $result = array(); for ($i = 0; $i < count($elasticaObjects); $i++) {
Throw a more meaningful error when the number of items retrieved by Doctrine is less than the number of items from ElasticSearch.
FriendsOfSymfony_FOSElasticaBundle
train
php
82e9bfd1d77a97b721ffca59786f8e04160336ca
diff --git a/js/luno.js b/js/luno.js index <HASH>..<HASH> 100644 --- a/js/luno.js +++ b/js/luno.js @@ -13,7 +13,7 @@ module.exports = class luno extends Exchange { 'id': 'luno', 'name': 'luno', 'countries': [ 'GB', 'SG', 'ZA' ], - 'rateLimit': 10000, + 'rateLimit': 1000, 'version': '1', 'has': { 'CORS': false,
Luno rate limit change Rate limits for market data have been increased to 1 per second. Market data may be cached for up to 1 second. <I>-<I>-<I>
ccxt_ccxt
train
js
be61a75bbc003ded10f5cc7b1ca315bc30d4a43a
diff --git a/src/FelixOnline/Core/Comment.php b/src/FelixOnline/Core/Comment.php index <HASH>..<HASH> 100644 --- a/src/FelixOnline/Core/Comment.php +++ b/src/FelixOnline/Core/Comment.php @@ -519,7 +519,7 @@ class Comment extends BaseDB $app = App::getInstance(); $authors = $this->getArticle()->getAuthors(); - if (in_array($this->getUser(), $authors)) { // if author of comment is one of the authors + if (!$this->getExternal() && in_array($this->getUser(), $authors)) { // if author of comment is one of the authors $key = array_search($this->getUser(), $authors); unset($authors[$key]); }
Fixed bug when sending emails to article authors about an external comment
FelixOnline_BaseApp
train
php
87dcd47417cb611d6f0c1f38faaf24477863c1ea
diff --git a/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java b/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java index <HASH>..<HASH> 100644 --- a/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java @@ -49,7 +49,8 @@ public final class SimpleTimeLimiter implements TimeLimiter { private final ExecutorService executor; - private SimpleTimeLimiter(ExecutorService executor) { + private + SimpleTimeLimiter(ExecutorService executor) { this.executor = checkNotNull(executor); } diff --git a/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java b/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java index <HASH>..<HASH> 100644 --- a/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java +++ b/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java @@ -49,7 +49,8 @@ public final class SimpleTimeLimiter implements TimeLimiter { private final ExecutorService executor; - private SimpleTimeLimiter(ExecutorService executor) { + private + SimpleTimeLimiter(ExecutorService executor) { this.executor = checkNotNull(executor); }
Automated g4 rollback of changelist <I>. *** Reason for rollback *** Missed Guice reflective calls. *** Original change description *** Remove public constructors from SimpleTimeLimiter. This change was already made for public Guava and is now done for [] users as well. *** ------------- Created by MOE: <URL>
google_guava
train
java,java
2d8d4f728b77a4e98ebf75c4adbba669c19e81e1
diff --git a/base/src/main/java/com/thoughtworks/go/util/SystemEnvironment.java b/base/src/main/java/com/thoughtworks/go/util/SystemEnvironment.java index <HASH>..<HASH> 100644 --- a/base/src/main/java/com/thoughtworks/go/util/SystemEnvironment.java +++ b/base/src/main/java/com/thoughtworks/go/util/SystemEnvironment.java @@ -1033,4 +1033,10 @@ public class SystemEnvironment implements Serializable, ConfigDirProvider { return "Y".equalsIgnoreCase(propertyValueFromSystem) || "true".equalsIgnoreCase(propertyValueFromSystem); } } + + @Deprecated // retained for BC + public File agentkeystore() { + return new File(configDir(), "agentkeystore"); + } + }
Bring back a removed method because BC uses it.
gocd_gocd
train
java
982a7052d8e657306a71c2feff3bc01f532900db
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -21,4 +21,4 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -module.exports = require('./lib/Requestify'); \ No newline at end of file +module.exports = require('./lib/requestify'); \ No newline at end of file
(feature) refactored file names and added initial logger adapter support
ranm8_requestify
train
js
a758c3504eacfa76d2c1632533cf9a40b5d1f859
diff --git a/packages/selenium-ide/src/content/locatorBuilders.js b/packages/selenium-ide/src/content/locatorBuilders.js index <HASH>..<HASH> 100644 --- a/packages/selenium-ide/src/content/locatorBuilders.js +++ b/packages/selenium-ide/src/content/locatorBuilders.js @@ -297,6 +297,10 @@ LocatorBuilders.add("name", function(e) { return null; }); +LocatorBuilders.add("css:finder", function(e) { + return "css=" + finder(e); +}); + LocatorBuilders.add("css", function(e) { let current = e; let sub_path = this.getCSSSubPath(e); @@ -307,10 +311,6 @@ LocatorBuilders.add("css", function(e) { return "css=" + sub_path; }); -LocatorBuilders.add("css:finder", function(e) { - return "css=" + finder(e); -}); - LocatorBuilders.add("xpath:link", function(e) { if (e.nodeName == "A") { let text = e.textContent;
Swapped priority order of css locator builders so the new one takes lead
SeleniumHQ_selenium-ide
train
js
c84a0cbfe8ed61875fbf3678e60e1fa32c14fd95
diff --git a/src/platformSpecific.ios.js b/src/platformSpecific.ios.js index <HASH>..<HASH> 100644 --- a/src/platformSpecific.ios.js +++ b/src/platformSpecific.ios.js @@ -28,6 +28,8 @@ function startTabBasedApp(params) { componentRight={params.drawer.right ? params.drawer.right.screen : undefined} passPropsRight={{navigatorID: navigatorID}} disableOpenGesture={params.drawer.disableOpenGesture} + type={params.drawer.type ? params.drawer.type : undefined} + animationType={params.drawer.animationType ? params.drawer.animationType : undefined} > {this.renderBody()} </DrawerControllerIOS>
bugfix: add support for drawer animation types
wix_react-native-navigation
train
js
3772e80bbec38cec25a5b9e69089c4c892e4109c
diff --git a/gui.py b/gui.py index <HASH>..<HASH> 100644 --- a/gui.py +++ b/gui.py @@ -730,6 +730,9 @@ class Input(Widget): self.attributes['value'] = str(defaultValue) self.attributes['type'] = _type + def set_value(self,value): + self.attributes['value'] = str(value) + def value(self): """returns the new text value.""" return self.attributes['value']
Implemented set_value as suggested in issue#<I>.
dddomodossola_remi
train
py
804360f9e1ea94577c6c65d73b0555fd76e60093
diff --git a/course/publish/metadata.php b/course/publish/metadata.php index <HASH>..<HASH> 100644 --- a/course/publish/metadata.php +++ b/course/publish/metadata.php @@ -170,15 +170,18 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, // send backup if ($share) { foreach ($courseids as $courseid) { + $params = array(); $params['filetype'] = BACKUP_FILE_TYPE; $params['courseid'] = $courseid; $params['file'] = $backupfile; + $params['token'] = $registeredhub->token; $curl->post($huburl."/local/hub/webservice/upload.php", $params); } } - //TODO: Delete the backup from user_tohub + //Delete the backup from user_tohub + $backupfile->delete(); //redirect to the index publis page
course publication MDL-<I> fix warning bug during backup upload + send right ws token to the hub
moodle_moodle
train
php
e3b4917f13a665e590d8d62352e6ca94dee16c29
diff --git a/library/Rediska/Connection.php b/library/Rediska/Connection.php index <HASH>..<HASH> 100644 --- a/library/Rediska/Connection.php +++ b/library/Rediska/Connection.php @@ -236,15 +236,14 @@ class Rediska_Connection extends Rediska_Options } $reply = @fgets($this->_socket); + + if ($reply === false || $reply === '') { + $metaData = stream_get_meta_data($this->_socket); + if ($metaData['timed_out']) { + throw new Rediska_Connection_TimeoutException("Connection read timed out."); + } - $info = stream_get_meta_data($this->_socket); - if ($info['timed_out']) { - throw new Rediska_Connection_TimeoutException("Connection read timed out."); - } - - if ($reply === false) { - - if ($this->_options['blockingMode'] || (!$this->_options['blockingMode'] && $info['eof'])) { + if ($this->_options['blockingMode'] && !$metaData['eof']) { $this->disconnect(); throw new Rediska_Connection_Exception("Can't read from socket."); }
Fix #<I> can't read from socket
shumkov_rediska
train
php
d122cc56910a36898244f8d9b60bba723dedc751
diff --git a/hmtk/seismicity/occurrence/aki_maximum_likelihood.py b/hmtk/seismicity/occurrence/aki_maximum_likelihood.py index <HASH>..<HASH> 100644 --- a/hmtk/seismicity/occurrence/aki_maximum_likelihood.py +++ b/hmtk/seismicity/occurrence/aki_maximum_likelihood.py @@ -34,4 +34,4 @@ def aki_max_likelihood(mval, number_obs, dmag=0.1, m_c=0.0): # Calculate sigma b from Bender estimator sigma_b = np.sum(number_obs * ((mval - m_ave) ** 2.0)) / (neq * (neq - 1)) sigma_b = np.log(10.) * (bval ** 2.0) * np.sqrt(sigma_b) - return bval, sigma_b \ No newline at end of file + return bval, sigma_b
Bender's method for max likelihood calculation of bGR
gem_oq-engine
train
py
7900d46b05a7465aaafc93920d1025b2892bf873
diff --git a/EntityService/NewsItem.php b/EntityService/NewsItem.php index <HASH>..<HASH> 100755 --- a/EntityService/NewsItem.php +++ b/EntityService/NewsItem.php @@ -41,10 +41,16 @@ class NewsItem implements OperationServiceInterface $this->em = $em; } + public function getContent(Operation $operation) + { + return $this->getNewsItemByOperation($operation->getId()); + } + /** * @param $id * @return \CampaignChain\Operation\LinkedInBundle\Entity\NewsItem * @throws \Exception + * @deprecated Use getContent(Operation $operation) instead. */ public function getNewsItemByOperation($id) {
CampaignChain/campaignchain#<I> Deal with identical content in campaigns
CampaignChain_operation-linkedin
train
php
21461d8b869e7f353780eeb9142fdc61cd3dab94
diff --git a/baron/render.py b/baron/render.py index <HASH>..<HASH> 100644 --- a/baron/render.py +++ b/baron/render.py @@ -68,6 +68,23 @@ def render_node(node): node_types = set(['node', 'list', 'key', 'formatting', 'constant', 'bool']) +def node_keys(node): + return [key for (_, key, _) in nodes_rendering_order[node['type']]] + + +def child_by_key(node, key): + if isinstance(node, list): + return node[key] + + if key in node: + return node[key] + + if key in node_keys(node): + return key + + raise AttributeError("Cannot access key \"%s\" in node \"%s\"" % (key, node)) + + nodes_rendering_order = { "int": [("key", "value", True)], "name": [("key", "value", True)],
[mod] add helper functions to handle constants
PyCQA_baron
train
py
d3d54d979a05ff8fa10f5e1776b59ef781847c09
diff --git a/openquake/risklib/scientific.py b/openquake/risklib/scientific.py index <HASH>..<HASH> 100644 --- a/openquake/risklib/scientific.py +++ b/openquake/risklib/scientific.py @@ -1034,7 +1034,8 @@ class CurveBuilder(object): for cb in self.cbs: losses[cb.loss_type] = [asset.value(cb.loss_type) * cb.ratios for asset in assets] - losses[cb.loss_type + '_ins'] = losses[cb.loss_type] + if self.insured_losses: + losses[cb.loss_type + '_ins'] = losses[cb.loss_type] all_poes = self.build_all_poes(aids, loss_ratios, rlzs) loss_maps = self._build_maps(losses, all_poes) if len(rlzs) > 1:
Small simplification [skip CI] Former-commit-id: e6ca7eff3afe2bfbd<I>b<I>dedfc<I>c6dc4e0
gem_oq-engine
train
py
b40bb381dce703444c80526ec2604ff2821be23b
diff --git a/engine-dependencies.js b/engine-dependencies.js index <HASH>..<HASH> 100644 --- a/engine-dependencies.js +++ b/engine-dependencies.js @@ -1,6 +1,7 @@ var semver = require("semver"); var spawn = require("child_process").spawn; var findupNodeModules = require("findup-node-modules"); +var path = require("path"); module.exports = engineDependencies; @@ -25,6 +26,10 @@ function engineDependencies(options, moduleName, callback){ if(moduleName) { // If we are inside a node_modules folder then do not install them. installDevDependencies = !findupNodeModules(moduleName); + // We might be in the root folder for the project, check that + if(!installDevDependencies) { + installDevDependencies = path.dirname(process.cwd()) === moduleName; + } } // Get the package.json engineDependencies
Another condition where we want to install devDependencies
bitovi_engine-dependencies
train
js
073b3ac1df7d21b5d842f090ecec5303b772b8a8
diff --git a/src/Marketing/Services/MarketingService.php b/src/Marketing/Services/MarketingService.php index <HASH>..<HASH> 100644 --- a/src/Marketing/Services/MarketingService.php +++ b/src/Marketing/Services/MarketingService.php @@ -488,14 +488,14 @@ class MarketingService extends \DTS\eBaySDK\Marketing\Services\MarketingBaseServ ] ], 'CreateReportTask' => [ - 'method' => 'GET', + 'method' => 'POST', 'resource' => 'ad_report_task', 'responseClass' => '\DTS\eBaySDK\Marketing\Types\CreateReportTasktRestResponse', 'params' => [ ] ], 'DeleteSpecificReportTask' => [ - 'method' => 'GET', + 'method' => 'DELETE', 'resource' => 'ad_report_task/{report_task_id}', 'responseClass' => '\DTS\eBaySDK\Marketing\Types\DeleteSpecificReportTaskRestResponse', 'params' => [
fix: use correct http method for new marketing operations
davidtsadler_ebay-sdk-php
train
php
bff75358c0f1aa42828baf6dddf97ed112f2237a
diff --git a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php +++ b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php @@ -31,7 +31,7 @@ use Webmozart\Assert\Assert; class Kernel extends HttpKernel { - public const VERSION = '1.8.9-DEV'; + public const VERSION = '1.8.9'; public const VERSION_ID = '10809'; @@ -41,7 +41,7 @@ class Kernel extends HttpKernel public const RELEASE_VERSION = '9'; - public const EXTRA_VERSION = 'DEV'; + public const EXTRA_VERSION = ''; public function __construct(string $environment, bool $debug) {
Change application's version to <I>
Sylius_Sylius
train
php
9916133a6547a12fb53675cec36cba711f0ac6ec
diff --git a/src/FieldType/DBFocusPoint.php b/src/FieldType/DBFocusPoint.php index <HASH>..<HASH> 100644 --- a/src/FieldType/DBFocusPoint.php +++ b/src/FieldType/DBFocusPoint.php @@ -76,8 +76,11 @@ class DBFocusPoint extends DBComposite if ($width) { return intval($width); } - if ($this->record) { - return intval(is_array($this->record) ? $this->record["Width"] : $this->record->getWidth()); + if (is_object($this->record)) { + return intval($this->record->getWidth()); + } + if (is_array($this->record) && isset($this->record['Width'])) { + return intval($this->record['Width']); } return 0; @@ -94,9 +97,13 @@ class DBFocusPoint extends DBComposite if ($height) { return intval($height); } - if ($this->record) { - return intval(is_array($this->record) ? $this->record["Height"] : $this->record->getHeight()); + if (is_object($this->record)) { + return intval($this->record->getHeight()); + } + if (is_array($this->record) && isset($this->record['Height'])) { + return intval($this->record['Height']); } + return 0; }
Patch Call to a member function getHeight() on array From <URL>
jonom_silverstripe-focuspoint
train
php
eb01292926b922b9c65fd09dd6b900730f9e31ac
diff --git a/src/js/dom.js b/src/js/dom.js index <HASH>..<HASH> 100644 --- a/src/js/dom.js +++ b/src/js/dom.js @@ -84,7 +84,7 @@ export default class Dom { } /** - * Do something hen a specific dom element renders + * Do something when a specific dom element renders * @param {Object} node * @param {Function} cb */
fix one char typo * change hen to when
kevinchappell_formBuilder
train
js
cdb8185225e7f81f609e9af6379b35d378a4bf6f
diff --git a/src/main/java/org/elasticsearch/hadoop/rest/BufferedRestClient.java b/src/main/java/org/elasticsearch/hadoop/rest/BufferedRestClient.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/elasticsearch/hadoop/rest/BufferedRestClient.java +++ b/src/main/java/org/elasticsearch/hadoop/rest/BufferedRestClient.java @@ -119,13 +119,6 @@ public class BufferedRestClient implements Closeable { Assert.isTrue(size > 0, "no data given"); throw new UnsupportedOperationException(); - // if (scratchPad == null) { - // // minor optimization to avoid allocating data when used by Hive (which already has its own scratchPad) - // scratchPad = new BytesArray(0); - // } - // lazyInitWriting(); - // scratchPad.bytes(data, size); - // doWriteToIndex(null); } private void doWriteToIndex(Object object) throws IOException {
remove unused code (yay!) relates to #<I>
elastic_elasticsearch-hadoop
train
java
9ca62004368932450c29d2e277adc5bbf5df6446
diff --git a/lib/assets/Image.js b/lib/assets/Image.js index <HASH>..<HASH> 100644 --- a/lib/assets/Image.js +++ b/lib/assets/Image.js @@ -48,7 +48,7 @@ _.extend(Image.prototype, { }); } else { var tmpPngFileName = tmpFilePrefix + '.png', - convertProcess = child_process.spawn('convert', [tmpFileName, tmpPngFileName]); + convertProcess = child_process.spawn('gm', ['convert', tmpFileName, tmpPngFileName]); convertProcess.on('exit', function () { makeImage(tmpPngFileName, function (err, image) { fs.unlink(tmpFileName, function () {
Use GraphicsMagick instead of ImageMagick when converting GIFs to PNGs in order to get them on a canvas. Avoids an issue with GIF transparency being replaced by the original color that was marked as transparent (or maybe I just didn't care enough to read the man page).
assetgraph_assetgraph
train
js
fb92d7a04a2779e4bd336c75c4b769980d4f0264
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.12'; - const VERSION_ID = 20712; + const VERSION = '2.7.13-DEV'; + const VERSION_ID = 20713; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 12; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 13; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019';
bumped Symfony version to <I>
symfony_symfony
train
php
c6a25fbb8fd518ebd1aa373fd6417bf68bff0805
diff --git a/views/js/controller/runner/runner.js b/views/js/controller/runner/runner.js index <HASH>..<HASH> 100644 --- a/views/js/controller/runner/runner.js +++ b/views/js/controller/runner/runner.js @@ -81,6 +81,7 @@ define([ // test has been closed/suspended => redirect to the index page after message acknowledge this.trigger('alert', err.message, function() { self.trigger('endsession', 'teststate', err.code); + self.destroy(); }); // prevent other messages/warnings
TestRunner: restore the test detroy when teststate event occurs
oat-sa_extension-tao-testqti
train
js
ed20f8f4f4a87c4db1dd57d8f52a4518d7e87361
diff --git a/converters/toZigbee.js b/converters/toZigbee.js index <HASH>..<HASH> 100644 --- a/converters/toZigbee.js +++ b/converters/toZigbee.js @@ -406,10 +406,11 @@ const converters = { cmd: 'write', cmdType: 'foundation', zclData: [{ - attrId: attrId, + attrId: zclId.attr(cid, attrId).value, dataType: zclId.attrType(cid, attrId).value, attrData: Math.round(value * 10), }], + cfg: cfg.default, }; } else if (type === 'get') { return {
Update toZigbee.js (#<I>) Bugfix: Eurotronic zigbee thermostat support: localTemperatureCalibration was not written correctly to the device.
Koenkk_zigbee-shepherd-converters
train
js
6780c0448d1d2b5bd7e926058649a17ef8ec76ae
diff --git a/publish/publish.go b/publish/publish.go index <HASH>..<HASH> 100644 --- a/publish/publish.go +++ b/publish/publish.go @@ -1,6 +1,7 @@ package publish import ( + "fmt" "net/http" "github.com/jinzhu/gorm" @@ -45,8 +46,9 @@ func RegisterL10nForPublish(Publish *publish.Publish, Admin *admin.Admin) { if context.Request != nil && context.Request.URL.Query().Get("locale") == "" { publishableLocales := getPublishableLocales(context.Request, context.CurrentUser) return searchHandler(db, context).Set("l10n:mode", "unscoped").Scopes(func(db *gorm.DB) *gorm.DB { - if l10n.IsLocalizable(db.NewScope(db.Value)) { - return db.Where("language_code IN (?)", publishableLocales) + scope := db.NewScope(db.Value) + if l10n.IsLocalizable(scope) { + return db.Where(fmt.Sprintf("%v.language_code IN (?)", scope.QuotedTableName()), publishableLocales) } return db })
Add quoted table name for publish with l<I>n scope
qor_l10n
train
go
5fa94672b3eae83e50d956c13b2e1eee92ecb7f1
diff --git a/token.go b/token.go index <HASH>..<HASH> 100644 --- a/token.go +++ b/token.go @@ -34,11 +34,15 @@ type Token interface { Wait() bool WaitTimeout(time.Duration) bool Error() error +} + +type TokenErrorSetter interface { setError(error) } type tokenCompletor interface { Token + TokenErrorSetter flowComplete() }
slight adjust to make Token interface mockable
eclipse_paho.mqtt.golang
train
go
fc6ff99267f9f1a661bf5c3554371d6b68c7f725
diff --git a/grimoire/elk/enrich.py b/grimoire/elk/enrich.py index <HASH>..<HASH> 100644 --- a/grimoire/elk/enrich.py +++ b/grimoire/elk/enrich.py @@ -141,7 +141,9 @@ class Enrich(object): def get_grimoire_fields(self, creation_date, item_name): """ Return common grimoire fields for all data sources """ - grimoire_date = parser.parse(creation_date).isoformat() + grimoire_date = None + if creation_date is not None: + grimoire_date = parser.parse(creation_date).isoformat() name = "is_"+self.get_connector_name()+"_"+item_name return {
[enrich] Make more robust adding the grimoire standard fields.
chaoss_grimoirelab-elk
train
py
be6d8d86862aa3f7f7771fb59bbd0e7422850f53
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def find_longdesc(): setup( cmdclass={'install': install}, name='selenium', - version="2.0-dev", + version="2.0-dev-$Revision$", description='Python bindings for Selenium', long_description=find_longdesc(), url='http://code.google.com/p/selenium/',
Adding revision to version r<I>
SeleniumHQ_selenium
train
py
858b70372504812133097e4677a0407a13723c0e
diff --git a/lib/modules/apostrophe-doc-type-manager/lib/api.js b/lib/modules/apostrophe-doc-type-manager/lib/api.js index <HASH>..<HASH> 100644 --- a/lib/modules/apostrophe-doc-type-manager/lib/api.js +++ b/lib/modules/apostrophe-doc-type-manager/lib/api.js @@ -13,7 +13,7 @@ module.exports = function(self, options) { self.trashPrefixFields = self.trashPrefixFields.concat(fields); }; - // After moving document to the trash, prefix any fields that have + // prefix any fields that have // unique indexes so that other pieces are allowed to reuse // those usernames, email addresses, etc. @@ -32,7 +32,6 @@ module.exports = function(self, options) { // So methods called later, or extending this method, see the change in piece doc[name] = $set[name]; }); - $set.trash = true; return self.apos.docs.db.update({ _id: doc._id }, { $set: $set }, callback); };
Remove trash flag from doc-type-manager dedupe function
apostrophecms_apostrophe
train
js
835be775a2b575b325e0f8584eff3e2d55488a9b
diff --git a/lib/cli/file.js b/lib/cli/file.js index <HASH>..<HASH> 100644 --- a/lib/cli/file.js +++ b/lib/cli/file.js @@ -8,7 +8,17 @@ const utils = require('./utils') const CONFIG_FILE = './coderunner.json' module.exports = function getOptionsFromConfigurationFile(file) { - return utils.mergeObjects(readFile(file), require('./defaults.json')) + const options = readFile(file) + + if (typeof options.workers === 'number') { + const concurrentWorkers = options.workers + + options.workers = { + concurrent: concurrentWorkers + } + } + + return utils.mergeObjects(options, require('./defaults.json')) } function readFile(file) {
- add backward compatibility for specifying a count of concurrent workers
Backendless_JS-Code-Runner
train
js
165c35433712de0c4dc406aa6aa1e5f171b42847
diff --git a/MB_API.php b/MB_API.php index <HASH>..<HASH> 100644 --- a/MB_API.php +++ b/MB_API.php @@ -167,6 +167,23 @@ class MB_API { return $array; } + public function FunctionDataXml() { + $passed = func_get_args(); + $request = empty($passed[0]) ? null : $passed[0]; + $returnObject = empty($passed[1]) ? null : $passed[1]; + $debugErrors = empty($passed[2]) ? null : $passed[2]; + $data = $this->callMindbodyService('DataService', 'FunctionDataXml', $request); + $xmlString = $this->getXMLResponse(); + $sxe = new SimpleXMLElement($xmlString); + $sxe->registerXPathNamespace("mindbody", "http://clients.mindbodyonline.com/api/0_5"); + $res = $sxe->xpath("//mindbody:FunctionDataXmlResponse"); + if($returnObject) { + return $res[0]; + } else { + return $this->replace_empty_arrays_with_nulls(json_decode(json_encode($res[0]),1)); + } + } + /* ** overrides SelectDataXml method to remove some invalid XML element names **
add method to correctly process FunctionDataXml results
devincrossman_mindbody-php-api
train
php
01be91c745c4563913e560ff27b7991aa411b149
diff --git a/queryx.go b/queryx.go index <HASH>..<HASH> 100644 --- a/queryx.go +++ b/queryx.go @@ -265,6 +265,10 @@ func (q *Queryx) GetRelease(dest interface{}) error { // the previous values will be stored in dest object. // See: https://docs.scylladb.com/using-scylla/lwt/ for more details. func (q *Queryx) GetCAS(dest interface{}) (applied bool, err error) { + if q.err != nil { + return false, q.err + } + iter := q.Iter() if err := iter.Get(dest); err != nil { return false, err
GetCAS: check if the query has a build error before trying to execute it
scylladb_gocqlx
train
go
4bdb72542afcb1c46b7155255cb923211eee1574
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index <HASH>..<HASH> 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -53,6 +53,7 @@ require_once TEST_LIBRARY_PATH."bootstrap/bootstrap_base.php"; switch($sTestType) { case 'acceptance': case 'selenium': + case 'javascript': include_once TEST_LIBRARY_PATH."bootstrap/bootstrap_selenium.php"; break; default:
Use bootstrap selenium for javascript tests too.
OXID-eSales_oxideshop_ce
train
php
9b81ca84257fa8ea634af9d8d5ae5e8c7b9a6bc2
diff --git a/src/zoid/buttons/util.js b/src/zoid/buttons/util.js index <HASH>..<HASH> 100644 --- a/src/zoid/buttons/util.js +++ b/src/zoid/buttons/util.js @@ -44,7 +44,7 @@ export function createVenmoExperiment() : Experiment | void { } if (isAndroid() && isChrome()) { - return createExperiment('enable_venmo_android', 0); + return createExperiment('enable_venmo_android', 5); } }
Update Venmo ramp to 5% (#<I>) * update ramp to 5% * oops just Android to 5%
paypal_paypal-checkout-components
train
js
541d3dbcdda931057caaa9645e15b4350cc06f6b
diff --git a/validator/setup.py b/validator/setup.py index <HASH>..<HASH> 100644 --- a/validator/setup.py +++ b/validator/setup.py @@ -84,18 +84,18 @@ else: if os.name == 'nt': conf_dir = "C:\\Program Files (x86)\\Intel\\sawtooth\\conf" - log_dir = "C:\\Program Files (x86)\\Intel\\sawtooth\\logs" data_dir = "C:\\Program Files (x86)\\Intel\\sawtooth\\data" + log_dir = "C:\\Program Files (x86)\\Intel\\sawtooth\\logs" else: conf_dir = "/etc/sawtooth" - log_dir = "/var/log/sawtooth" data_dir = "/var/lib/sawtooth" + log_dir = "/var/log/sawtooth" data_files = [ - (conf_dir, ['etc/path.toml.example']), + (conf_dir, ['etc/path.toml.example', 'etc/log_config.toml.example']), (os.path.join(conf_dir, "keys"), []), + (data_dir, []), (log_dir, []), - (data_dir, []) ] if os.path.exists("/etc/default"):
Add logging example to validator install
hyperledger_sawtooth-core
train
py
b9e7955dd2c2f22c47296bf82130560078c529e2
diff --git a/src/CoandaCMS/Coanda/Coanda.php b/src/CoandaCMS/Coanda/Coanda.php index <HASH>..<HASH> 100644 --- a/src/CoandaCMS/Coanda/Coanda.php +++ b/src/CoandaCMS/Coanda/Coanda.php @@ -100,7 +100,7 @@ class Coanda { return $this->attribute_types[$type_identifier]; } - throw new AttributeTypeNotFound; + throw new AttributeTypeNotFound('Attribute type: ' . $type_identifier . ' could not be found.'); } /**
Added a useful exception message when the attribute type is not found.
CoandaCMS_coanda-core
train
php
101cbbd564b06d3564188dd7316d686ee0a214a8
diff --git a/resources/views/formfields/relationship/belongsTo.blade.php b/resources/views/formfields/relationship/belongsTo.blade.php index <HASH>..<HASH> 100644 --- a/resources/views/formfields/relationship/belongsTo.blade.php +++ b/resources/views/formfields/relationship/belongsTo.blade.php @@ -15,8 +15,12 @@ @php $model = app($options->model); $query = $model::all(); - $details = json_decode($options->details); - $relationshipOptions = isset($details->options) ? $details->options : []; + $relationshipOptions = []; + + if (isset($options->details)) { + $details = json_decode($options->details); + $relationshipOptions = isset($details->options) ? $details->options : []; + } @endphp @foreach($relationshipOptions as $key => $value)
Update belongsTo.blade.php
laraveladminpanel_admin
train
php
da1b6c4a0160f259334ab08c05535a23a4182c5e
diff --git a/lib/haml.rb b/lib/haml.rb index <HASH>..<HASH> 100644 --- a/lib/haml.rb +++ b/lib/haml.rb @@ -20,4 +20,4 @@ end require 'haml/util' require 'haml/engine' -require 'haml/railtie' if defined?(Rails) +require 'haml/railtie' if defined?(Rails::Railtie)
Check for Rails::Railtie specifically
haml_haml
train
rb
7d6e69e2f9c1efd76616af0f58d0d7313a338c47
diff --git a/searx/engines/wikipedia.py b/searx/engines/wikipedia.py index <HASH>..<HASH> 100644 --- a/searx/engines/wikipedia.py +++ b/searx/engines/wikipedia.py @@ -56,6 +56,17 @@ def request(query, params): def response(resp): if resp.status_code == 404: return [] + + if resp.status_code == 400: + try: + api_result = loads(resp.text) + except: + pass + else: + if api_result['type'] == 'https://mediawiki.org/wiki/HyperSwitch/errors/bad_request' \ + and api_result['detail'] == 'title-invalid-characters': + return [] + raise_for_httperror(resp) results = []
[upd] wikipedia engine: return an empty result on query with illegal characters on some queries (like an IT error message), wikipedia returns an HTTP error <I>. this commit returns an empty result instead of showing an error to the user.
asciimoo_searx
train
py
99a98a64108684f9d6b1fe37c355e0cf55c7e07a
diff --git a/src/mui/list/List.js b/src/mui/list/List.js index <HASH>..<HASH> 100644 --- a/src/mui/list/List.js +++ b/src/mui/list/List.js @@ -165,7 +165,9 @@ function mapStateToProps(state, props) { const resourceState = state.admin[props.resource]; const query = props.location.query; if (query.filter && typeof query.filter === 'string') { - query.filter = JSON.parse(query.filter); + // if the List has no filter component, the filter is always "{}" + // avoid deserialization and keep identity by using a constant + query.filter = props.filter ? JSON.parse(query.filter) : resourceState.list.params.filter; } return {
Fix page refresh bug The filter equality test in componentWillReceiveProps() failed when there was no filter attribute passed to the List component because then the filter value was taken from the URL instead of the filter form. In that case, the filter value is always "{}", but deserializing it leads to a new object every time, forcing a setFilter() which resets the page.
marmelab_react-admin
train
js
97b4ec5e20388b71c4351041ecbd9c7d65fd5bcb
diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index <HASH>..<HASH> 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -135,7 +135,7 @@ function lesson_unseen_question_jump($lesson, $user, $pageid) { $pageid = $lessonpages[$pageid]->prevpageid; } - $pagesinbranch = $this->get_sub_pages_of($pageid, array(LESSON_PAGE_BRANCHTABLE, LESSON_PAGE_ENDOFBRANCH)); + $pagesinbranch = $lesson->get_sub_pages_of($pageid, array(LESSON_PAGE_BRANCHTABLE, LESSON_PAGE_ENDOFBRANCH)); // this foreach loop stores all the pages that are within the branch table but are not in the $seenpages array $unseen = array(); @@ -246,7 +246,7 @@ function lesson_random_question_jump($lesson, $pageid) { } // get the pages within the branch - $pagesinbranch = $this->get_sub_pages_of($pageid, array(LESSON_PAGE_BRANCHTABLE, LESSON_PAGE_ENDOFBRANCH)); + $pagesinbranch = $lesson->get_sub_pages_of($pageid, array(LESSON_PAGE_BRANCHTABLE, LESSON_PAGE_ENDOFBRANCH)); if(count($pagesinbranch) == 0) { // there are no pages inside the branch, so return the next page
mod lesson MDL-<I> Fixed use of $this outside object scope
moodle_moodle
train
php
6b06246cf17f3b743c95389009eff9a7bffcc211
diff --git a/src/salicml/metrics/finance/proponent_projects.py b/src/salicml/metrics/finance/proponent_projects.py index <HASH>..<HASH> 100644 --- a/src/salicml/metrics/finance/proponent_projects.py +++ b/src/salicml/metrics/finance/proponent_projects.py @@ -19,7 +19,7 @@ def proponent_projects(pronac, data): proponent_analyzed_projects = {} submitted_projects = {} if cpf_cnpj: - submitted_projects = get_proponent_submitted_projects(cpf_cnpj) + submitted_projects = get_proponent_submitted_projects(cpf_cnpj, pronac) analyzed_projects = get_proponent_analyzed_projects(cpf_cnpj) try: @@ -105,14 +105,16 @@ def analyzed_projects_dict(): return df.to_dict(orient='index') -def get_proponent_submitted_projects(cpf_cnpj): +def get_proponent_submitted_projects(cpf_cnpj, pronac): """ Returns all submitted projects of the proponent with the given CPF/CNPJ. """ all_projects = submitted_projects_dict() try: - return all_projects[str(cpf_cnpj)] + proponent_projects = all_projects[str(cpf_cnpj)] + proponent_projects['pronac_list'].remove(pronac) + return proponent_projects except KeyError: return {}
Remove project pronac from proponent_projects list
lappis-unb_salic-ml
train
py
4ff8c62e5e2e62e81e993fa1df626e62e385d28c
diff --git a/dygraph-utils.js b/dygraph-utils.js index <HASH>..<HASH> 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -301,7 +301,10 @@ Dygraph.findPosX = function(obj) { if(obj.offsetParent) { var copyObj = obj; while(1) { - var borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0"; + var borderLeft = "0"; + if (window.getComputedStyle) { + borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0"; + } curleft += parseInt(borderLeft, 10) ; curleft += copyObj.offsetLeft; if(!copyObj.offsetParent) { @@ -334,7 +337,10 @@ Dygraph.findPosY = function(obj) { if(obj.offsetParent) { var copyObj = obj; while(1) { - var borderTop = window.getComputedStyle(copyObj, null).borderTop || "0"; + var borderTop = "0"; + if (window.getComputedStyle) { + borderTop = window.getComputedStyle(copyObj, null).borderTop || "0"; + } curtop += parseInt(borderTop, 10) ; curtop += copyObj.offsetTop; if(!copyObj.offsetParent) {
guard window.getComputedStyle call for IE8
danvk_dygraphs
train
js
00e0a783f2ef994b390fbb0f09056895c5b3fb45
diff --git a/invenio_records/models.py b/invenio_records/models.py index <HASH>..<HASH> 100644 --- a/invenio_records/models.py +++ b/invenio_records/models.py @@ -141,11 +141,16 @@ class RecordMetadata(db.Model): nullable=False, autoincrement=True ) + version_id = db.Column(db.Integer, nullable=False) json = db.Column(db.JSON, nullable=False) record = db.relationship(Record, backref='record_json') + __mapper_args__ = { + "version_id_col": version_id + } + __all__ = ( 'Record',
models: version counter for concurrent updates * NEW Concurrency control for record update using transactions and version counter on metadata table.
inveniosoftware_invenio-records
train
py
bde1daf110d76f74a5f2842da0954499b9f6b2d4
diff --git a/lib/core/util/logger.rb b/lib/core/util/logger.rb index <HASH>..<HASH> 100644 --- a/lib/core/util/logger.rb +++ b/lib/core/util/logger.rb @@ -116,32 +116,42 @@ class Logger # Log statements def debug(message) - @logger.debug(message) + unless Util::Console.quiet + @logger.debug(message) + end end #--- def info(message) - @logger.info(message) + unless Util::Console.quiet + @logger.info(message) + end end #--- def warn(message) - @logger.warn(message) + unless Util::Console.quiet + @logger.warn(message) + end end #--- def error(message) - @logger.error(message) + unless Util::Console.quiet + @logger.error(message) + end end #--- def hook(message) - @logger.hook(message) - end + unless Util::Console.quiet + @logger.hook(message) + end + end end end end
Allowing the console quiet flag to silence the logger output in the logger utility class.
coralnexus_nucleon
train
rb
3813674ac2240a84e941cc2a965621c97c31c1cf
diff --git a/src/Parser/Block/CodeBlockParser.php b/src/Parser/Block/CodeBlockParser.php index <HASH>..<HASH> 100644 --- a/src/Parser/Block/CodeBlockParser.php +++ b/src/Parser/Block/CodeBlockParser.php @@ -24,7 +24,6 @@ class CodeBlockParser extends AbstractBlockParser { $content->handle( '{ - ^ (?: # Ensure blank line before (or beginning of subject) \A\s*\n?| \n\s*\n
Remove anchor from start of code block regex.
fluxbb_commonmark
train
php