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
|
---|---|---|---|---|---|
36906eed5859a74ab70ff98448055c0bb64c92df
|
diff --git a/src/EoC/Adapter/CurlAdapter.php b/src/EoC/Adapter/CurlAdapter.php
index <HASH>..<HASH> 100644
--- a/src/EoC/Adapter/CurlAdapter.php
+++ b/src/EoC/Adapter/CurlAdapter.php
@@ -59,6 +59,7 @@ class CurlAdapter extends AbstractAdapter {
/**
* @copydoc AbstractAdapter::send()
+ * @bug https://github.com/dedalozzo/eoc-client/issues/2
*/
public function send(Request $request, Hook\IChunkHook $chunkHook = NULL) {
$opts = [];
|
added the bug reference in the CurlAdapter
|
dedalozzo_eoc-client
|
train
|
php
|
7e423de911aee7ee3bf09543411f207f2778cf08
|
diff --git a/packages/babel-node/src/babel-node.js b/packages/babel-node/src/babel-node.js
index <HASH>..<HASH> 100755
--- a/packages/babel-node/src/babel-node.js
+++ b/packages/babel-node/src/babel-node.js
@@ -95,5 +95,9 @@ getV8Flags(function(err, v8Flags) {
}
});
});
+ process.on("SIGINT", () => {
+ proc.kill("SIGINT");
+ process.exit(1);
+ });
}
});
|
Restore passing SIGINT signals to spawned child processes (#<I>)
|
babel_babel
|
train
|
js
|
e4f006754dec49eb7b354705a28b986f2012d479
|
diff --git a/src/Http/RestClient.php b/src/Http/RestClient.php
index <HASH>..<HASH> 100644
--- a/src/Http/RestClient.php
+++ b/src/Http/RestClient.php
@@ -158,7 +158,7 @@ class RestClient
private function encodeEntity(Extractable $entity): string
{
- return json_encode($entity->extract());
+ return json_encode($entity->extract(), JSON_THROW_ON_ERROR);
}
/**
|
Issues encoding json now throw exceptions
|
helpscout_helpscout-api-php
|
train
|
php
|
ec91b27b1ca9dfe3d5ce7eac9d690394a6176f75
|
diff --git a/src/Panels/DatabasePanel.php b/src/Panels/DatabasePanel.php
index <HASH>..<HASH> 100644
--- a/src/Panels/DatabasePanel.php
+++ b/src/Panels/DatabasePanel.php
@@ -174,7 +174,7 @@ class DatabasePanel extends AbstractPanel
*/
public static function explain(PDO $pdo, $sql, $bindings = [])
{
- if (preg_match('#\s*\(?\s*SELECT\s#iA', $sql) == true) {
+ if (preg_match('#\s*\(?\s*SELECT\s#iA', $sql)) {
$statement = $pdo->prepare('EXPLAIN '.$sql);
$statement->execute($bindings);
|
preg_match_all will return int
|
recca0120_laravel-tracy
|
train
|
php
|
54a7190113a98b814bf796b5bc8053f6ac06e92c
|
diff --git a/webhook.go b/webhook.go
index <HASH>..<HASH> 100644
--- a/webhook.go
+++ b/webhook.go
@@ -295,7 +295,7 @@ func hookHandler(w http.ResponseWriter, r *http.Request) {
} else {
// Check if a success return code is configured for the hook
if matchedHook.SuccessHttpResponseCode != 0 {
- writeHttpResponseCode(w, rid, matchedHook.ID, matchedHook.HttpResponseCode)
+ writeHttpResponseCode(w, rid, matchedHook.ID, matchedHook.SuccessHttpResponseCode)
}
fmt.Fprintf(w, response)
}
|
Forgot a rename in previous refactoring.
|
adnanh_webhook
|
train
|
go
|
c0720e2eb7dc253aa2589e627e789996378d0215
|
diff --git a/test/runner_test.rb b/test/runner_test.rb
index <HASH>..<HASH> 100644
--- a/test/runner_test.rb
+++ b/test/runner_test.rb
@@ -70,11 +70,15 @@ STR
end
end
- it "call command with options correctly" do
+ it "handles command with default arguments correctly" do
+ my_command('medium').chomp.should == '[nil, {}]'
+ end
+
+ it "calls command with options correctly" do
my_command('medium 1 --spicy').chomp.should == '["1", {:spicy=>true}]'
end
- it "call optionless command correctly" do
+ it "calls optionless command correctly" do
my_command('small 1 2').chomp.should == '["1", "2"]'
end
|
test explicitly for command's file_parsed_args
|
cldwalker_boson
|
train
|
rb
|
302d7b9721e1f31a237dd63cb033f234f83e42f9
|
diff --git a/examples/server2.py b/examples/server2.py
index <HASH>..<HASH> 100644
--- a/examples/server2.py
+++ b/examples/server2.py
@@ -534,7 +534,7 @@ def main(host, port, data_path):
else:
server_url = 'http://%s:%s/openidserver' % (host, port)
store = FileOpenIDStore(data_path)
- oidserver = server.Server2(store)
+ oidserver = server.OpenIDServer2(store)
addr = (host, port)
httpserver = OpenIDHTTPServer(oidserver, addr, ServerHandler)
|
[project @ examples/server2: fix Server2 class name]
|
openid_python-openid
|
train
|
py
|
180c5962bee05f420a4c9fb3ef6a37fff98e4989
|
diff --git a/tests/test_bugs.py b/tests/test_bugs.py
index <HASH>..<HASH> 100644
--- a/tests/test_bugs.py
+++ b/tests/test_bugs.py
@@ -76,11 +76,11 @@ def test_we_cant_set_status_unless_there_is_a_bug_id():
def test_we_can_get_OS_set_from_default():
bug = Bug()
- assert bug.OS == "All"
+ assert bug.op_sys == "All"
def test_we_can_get_OS_we_set():
bug = Bug(op_sys="Linux")
- assert bug.OS == "Linux"
+ assert bug.op_sys == "Linux"
def test_we_can_get_Product_set_from_default():
bug = Bug()
|
Use op_sys field instead of dropped OS getter
|
AutomatedTester_Bugsy
|
train
|
py
|
0ce2f973c4b631f6c181d43191864d254fbf9a1d
|
diff --git a/structr-ui/src/main/resources/structr/js/pages.js b/structr-ui/src/main/resources/structr/js/pages.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/pages.js
+++ b/structr-ui/src/main/resources/structr/js/pages.js
@@ -372,7 +372,7 @@ var _Pages = {
e.stopPropagation();
var self = $(this);
var link = $.trim(self.parent().children('b.name_').attr('title'));
- var url = viewRootUrl + link + (LSWrapper.getItem(detailsObjectId + entity.id) ? '/' + LSWrapper.getItem(detailsObjectId + entity.id) : '');
+ var url = (entity.site && entity.site.hostname ? '//' + entity.site.hostname + (entity.site.port ? ':' + entity.site.port : '') + '/' : viewRootUrl) + link + (LSWrapper.getItem(detailsObjectId + entity.id) ? '/' + LSWrapper.getItem(detailsObjectId + entity.id) : '');
window.open(url);
});
|
Minor: Take site hostname (and optional port) into account when opening a preview page which is connected to a site.
|
structr_structr
|
train
|
js
|
aaaab74df30f115c092e5b3af49819660841171d
|
diff --git a/ella/core/models/publishable.py b/ella/core/models/publishable.py
index <HASH>..<HASH> 100644
--- a/ella/core/models/publishable.py
+++ b/ella/core/models/publishable.py
@@ -150,9 +150,14 @@ class Publishable(models.Model):
def save(self, **kwargs):
self.content_type = ContentType.objects.get_for_model(self)
send_signal = None
+ old_self = None
if self.pk:
- old_self = Publishable.objects.get(pk=self.pk)
+ try:
+ old_self = Publishable.objects.get(pk=self.pk)
+ except Publishable.DoesNotExist:
+ pass
+ if old_self:
old_path = old_self.get_absolute_url()
new_path = self.get_absolute_url()
|
sometmes you want to create Publishable with a given PK
|
ella_ella
|
train
|
py
|
4873133bd120107ff3219dda4c9c284e7907f513
|
diff --git a/dispatch/static/manager/webpack.config.js b/dispatch/static/manager/webpack.config.js
index <HASH>..<HASH> 100644
--- a/dispatch/static/manager/webpack.config.js
+++ b/dispatch/static/manager/webpack.config.js
@@ -9,6 +9,7 @@ module.exports = {
path: __dirname + '/dist/js',
filename: '[name]-' + version + '.js'
},
+ devtool: 'source-map',
module: {
loaders: [
{test: /\.jsx|.js$/, include: __dirname + '/src/js', loader: 'babel-loader'},
|
Enable source maps (yay!)
|
ubyssey_dispatch
|
train
|
js
|
74c19cbe07a2965ff21838f685a28e519d5ac7ac
|
diff --git a/core/lib/torquebox/version.rb b/core/lib/torquebox/version.rb
index <HASH>..<HASH> 100644
--- a/core/lib/torquebox/version.rb
+++ b/core/lib/torquebox/version.rb
@@ -17,7 +17,7 @@
module TorqueBox
VERSION = '4.0.0.alpha1.dev'
- WUNDERBOSS_VERSION = '1.x.incremental.76'
+ WUNDERBOSS_VERSION = '1.x.incremental.78'
#WUNDERBOSS_VERSION = '0.1.0-SNAPSHOT'
WILDFLY_VERSION = '8.1.0.Final'
end
|
Bump to wunderboss incr<I> to pick up the scheduling race condition fix
|
torquebox_torquebox
|
train
|
rb
|
7d5361a8fd2643043068619b7f62a1f39a420ff0
|
diff --git a/src/Cli.php b/src/Cli.php
index <HASH>..<HASH> 100755
--- a/src/Cli.php
+++ b/src/Cli.php
@@ -80,12 +80,14 @@ class Cli
*
* @return string
*/
- static public function readInput($prompt, array $validInputs = [], $default = '')
+ static public function readInput($prompt = '', array $validInputs = [], $default = '')
{
while (!isset($input) || (!empty($validInputs) && !in_array($input, $validInputs))) {
- echo $prompt;
+ if (!empty($prompt)) {
+ echo $prompt;
+ }
- $input = strtolower(trim(fgets(STDIN)));
+ $input = trim(fgets(STDIN));
if (empty($input) && !empty($default)) {
$input = $default;
|
Changed Cli::readInput to optionally accept prompt text and not lower the inputted data
|
mobly_simple-helpers
|
train
|
php
|
4652b54cac94d3cc706c6c8fbe3963a47e8282e4
|
diff --git a/src/main/com/mongodb/MongoOptions.java b/src/main/com/mongodb/MongoOptions.java
index <HASH>..<HASH> 100644
--- a/src/main/com/mongodb/MongoOptions.java
+++ b/src/main/com/mongodb/MongoOptions.java
@@ -111,8 +111,8 @@ public class MongoOptions {
public int threadsAllowedToBlockForConnectionMultiplier;
/**
- * The maximum wait time in ms that a thread may wait for a connection to become available.
- * Default is 120,000.
+ * The maximum wait time in milliseconds that a thread may wait for a connection to become available.
+ * Default is 120,000. A value of 0 means that it will not wait. A negative value means to wait indefinitely.
*/
public int maxWaitTime;
|
Improved specification for MongoOptions.maxWaitTime
|
mongodb_mongo-java-driver
|
train
|
java
|
0673f1160fb054ffbb8500bbf1df54cce61c269f
|
diff --git a/lib/sprockets/utils.rb b/lib/sprockets/utils.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/utils.rb
+++ b/lib/sprockets/utils.rb
@@ -8,15 +8,15 @@ module Sprockets
# encoding and we want to avoid syntax errors in other interpreters.
UTF8_BOM_PATTERN = Regexp.new("\\A\uFEFF".encode('utf-8'))
- def self.read_unicode(pathname, external_encoding = Encoding.default_external)
- Pathname.new(pathname).open("r:#{external_encoding}") do |f|
+ def self.read_unicode(filename, external_encoding = Encoding.default_external)
+ Pathname.new(filename).open("r:#{external_encoding}") do |f|
f.read.tap do |data|
# Eager validate the file's encoding. In most cases we
# expect it to be UTF-8 unless `default_external` is set to
# something else. An error is usually raised if the file is
# saved as UTF-16 when we expected UTF-8.
if !data.valid_encoding?
- raise EncodingError, "#{pathname} has a invalid " +
+ raise EncodingError, "#{filename} has a invalid " +
"#{data.encoding} byte sequence"
# If the file is UTF-8 and theres a BOM, strip it for safe concatenation.
|
Allow non-pathnames into read_unicode
|
rails_sprockets
|
train
|
rb
|
385608444940ee75b41ded99a781d2693db6467c
|
diff --git a/test/server/data_adapter/rest_adapter.test.js b/test/server/data_adapter/rest_adapter.test.js
index <HASH>..<HASH> 100644
--- a/test/server/data_adapter/rest_adapter.test.js
+++ b/test/server/data_adapter/rest_adapter.test.js
@@ -217,6 +217,16 @@ describe('RestAdapter', function() {
'http://example.com/v1/cats?q[]=1&q[]=3');
});
+ it('should not add an extra ? if the query is an empty object', function () {
+ restAdapter.options.default = {
+ host: 'example.com',
+ protocol: 'https',
+ query: {}
+ };
+
+ restAdapter.apiDefaults({body: {}}).should.have.property('url', 'https://example.com');
+ });
+
it('should use a custom user agent', function () {
var api = { headers: { 'User-Agent': 'custom user agent' }, body: {} };
|
test to make sure it doesn't add a ? if there is an empty object for the query parameter
|
rendrjs_rendr
|
train
|
js
|
0c415fc8c1576c12aecc2695bc2db1714f5f117e
|
diff --git a/app/controllers/api/zotero_controller.rb b/app/controllers/api/zotero_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/api/zotero_controller.rb
+++ b/app/controllers/api/zotero_controller.rb
@@ -34,7 +34,7 @@ module API
private
def authorize_user!
- authorize! :create, ::GenericWork
+ authorize! :create, Sufia.primary_work_type
rescue CanCan::AccessDenied
return redirect_to root_url, alert: 'You are not authorized to perform this operation'
end
|
Don't hardcode GenericWork into ZoteroController
|
samvera_hyrax
|
train
|
rb
|
2aa72604073d1f8190407c680bb2bbc65e79ee59
|
diff --git a/src/components/obj-model.js b/src/components/obj-model.js
index <HASH>..<HASH> 100644
--- a/src/components/obj-model.js
+++ b/src/components/obj-model.js
@@ -48,13 +48,14 @@ module.exports.Component = registerComponent('obj-model', {
var mtlLoader = this.mtlLoader;
var objLoader = this.objLoader;
var rendererSystem = this.el.sceneEl.systems.renderer;
+ var BASE_PATH = mtlUrl.substr(0, mtlUrl.lastIndexOf('/') + 1);
if (mtlUrl) {
// .OBJ with an .MTL.
if (el.hasAttribute('material')) {
warn('Material component properties are ignored when a .MTL is provided');
}
- mtlLoader.setTexturePath(mtlUrl.substr(0, mtlUrl.lastIndexOf('/') + 1));
+ mtlLoader.setResourcePath(BASE_PATH);
mtlLoader.load(mtlUrl, function (materials) {
materials.preload();
objLoader.setMaterials(materials);
|
Fixes #<I>: Replace .setTexturePath() call with .setResourcePath() (#<I>)
Also add meaningful variable name for basePath for improved readability.
|
aframevr_aframe
|
train
|
js
|
761ef83e8f6e7303118c73025535d9d28dc604bc
|
diff --git a/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java b/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java
+++ b/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java
@@ -38,7 +38,8 @@ public class AndroidNdk
+ "alternative, you may add the parameter to commandline: -Dandroid.ndk.path=... or set environment "
+ "variable " + NdkBuildMojo.ENV_ANDROID_NDK_HOME + ".";
- public static final String[] NDK_ARCHITECTURES = { "armeabi", "armeabi-v7a", "mips", "mips64", "x86", "x86_64" };
+ public static final String[] NDK_ARCHITECTURES = { "armeabi", "armeabi-v7a", "arm64-v8a", "mips", "mips64",
+ "x86", "x86_64" };
/**
* Arm toolchain implementations.
|
#<I>: arm<I>-v8a native lib missing from final apk - added missing ABI to list of architectures
|
simpligility_android-maven-plugin
|
train
|
java
|
2595a462020bc9519bb03a7ee6cada1e97e13ce0
|
diff --git a/src/org/opencms/security/CmsRole.java b/src/org/opencms/security/CmsRole.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/security/CmsRole.java
+++ b/src/org/opencms/security/CmsRole.java
@@ -1,7 +1,7 @@
/*
* File : $Source: /alkacon/cvs/opencms/src/org/opencms/security/CmsRole.java,v $
- * Date : $Date: 2007/08/31 13:23:02 $
- * Version: $Revision: 1.16 $
+ * Date : $Date: 2008/02/01 09:39:12 $
+ * Version: $Revision: 1.17 $
*
* This library is part of OpenCms -
* the Open Source Content Management System
@@ -73,7 +73,7 @@ import java.util.Set;
*
* @author Alexander Kandzior
*
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*
* @since 6.0.0
*/
@@ -336,7 +336,7 @@ public final class CmsRole {
}
if (!role.isOrganizationalUnitIndependent()) {
// the role name does not start with "/", but the given role fqn does
- if (roleName.endsWith(CmsOrganizationalUnit.SEPARATOR + role.getGroupName())) {
+ if (roleName.endsWith(CmsOrganizationalUnit.SEPARATOR + role.getRoleName())) {
return role.forOrgUnit(roleOu);
}
}
|
fixed bug with parsing role names
|
alkacon_opencms-core
|
train
|
java
|
e3b897dd9bdbacefcf4a74b63fc270c4e5b0cdb3
|
diff --git a/lib/av.js b/lib/av.js
index <HASH>..<HASH> 100644
--- a/lib/av.js
+++ b/lib/av.js
@@ -1603,7 +1603,7 @@
if (url.charAt(url.length - 1) !== "/") {
url += "/";
}
- url += "1/" + route;
+ url += "1.1/" + route;
if (className) {
url += "/" + className;
}
@@ -5800,7 +5800,7 @@
var json = object._getSaveJSON();
var method = "POST";
- var path = "/1/classes/" + object.className;
+ var path = "/1.1/classes/" + object.className;
if (object.id) {
path = path + "/" + object.id;
method = "PUT";
|
Upgrade rest api version to <I>
|
leancloud_javascript-sdk
|
train
|
js
|
78ea0095c6a071f27b13a9bdd8cd822fdc6f8899
|
diff --git a/core-bundle/contao/pages/PageRegular.php b/core-bundle/contao/pages/PageRegular.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/pages/PageRegular.php
+++ b/core-bundle/contao/pages/PageRegular.php
@@ -282,9 +282,6 @@ class PageRegular extends \Frontend
// Add the layout specific CSS
if ($strFramework != '')
{
- // Do not apply on mobile devices
- $strFramework = "\n@media (min-width:768px) {\n $strFramework\n}\n"; // FIXME: do not hard code this
-
if ($objPage->outputFormat == 'xhtml')
{
$this->Template->framework .= '<style type="text/css">' . "\n";
|
[Core] Do not wrap the CSS code of the layout builder, so it can be customized
|
contao_contao
|
train
|
php
|
e25aedfd730beb622e5cf0185674e6997fcc03ae
|
diff --git a/closure/goog/debug/logger.js b/closure/goog/debug/logger.js
index <HASH>..<HASH> 100644
--- a/closure/goog/debug/logger.js
+++ b/closure/goog/debug/logger.js
@@ -626,11 +626,25 @@ goog.debug.Logger.prototype.logRecord = function(logRecord) {
/**
+ * Logs the message to speed tracer, if it is available.
+ * {@see http://code.google.com/webtoolkit/speedtracer/logging-api.html}
+ * @param {string} msg The message to log.
+ * @private
+ */
+goog.debug.Logger.prototype.logToSpeedTracer_ = function(msg) {
+ if (goog.global['console'] && goog.global['console']['markTimeline']) {
+ goog.global['console']['markTimeline'](msg);
+ }
+};
+
+
+/**
* Log a LogRecord.
* @param {goog.debug.LogRecord} logRecord A log record to log.
* @private
*/
goog.debug.Logger.prototype.doLogRecord_ = function(logRecord) {
+ this.logToSpeedTracer_('log:' + logRecord.getMessage());
if (goog.debug.Logger.ENABLE_HIERARCHY) {
var target = this;
while (target) {
|
add logging to speedtracer
R=eae
DELTA=<I> (<I> added, 0 deleted, 0 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
google_closure-library
|
train
|
js
|
c4aa2e838410f159d4f0dc1111de8400fb961e5d
|
diff --git a/src/util/vdom.js b/src/util/vdom.js
index <HASH>..<HASH> 100644
--- a/src/util/vdom.js
+++ b/src/util/vdom.js
@@ -62,10 +62,11 @@ const createElement = function(type, val, props, meta, children) {
const createFunctionalComponent = function(props, children, functionalComponent) {
const options = functionalComponent.options;
const attrs = props.attrs;
- let data = options.data;
+ let data = {};
+ let getData = options.data;
- if(data === undefined) {
- data = {};
+ if(getData !== undefined) {
+ data = getData();
}
// Merge data with provided props
@@ -73,7 +74,7 @@ const createFunctionalComponent = function(props, children, functionalComponent)
if(propNames === undefined) {
data = attrs;
} else {
- for(var i = 0; i < propNames.length; i++) {
+ for(let i = 0; i < propNames.length; i++) {
const prop = propNames[i];
data[prop] = attrs[prop];
}
|
fix: require data to be a function for functional components
|
kbrsh_moon
|
train
|
js
|
a5b998846aa77d63843c5d3dfe05f91c655b9400
|
diff --git a/samples/DocumentManagement/Program.py b/samples/DocumentManagement/Program.py
index <HASH>..<HASH> 100644
--- a/samples/DocumentManagement/Program.py
+++ b/samples/DocumentManagement/Program.py
@@ -84,7 +84,7 @@ class DocumentManagement:
# NOTE: Use MaxItemCount on Options to control how many documents come back per trip to the server
# Important to handle throttles whenever you are doing operations such as this that might
# result in a 429 (throttled request)
- documentlist = list(client.ReadDocuments(collection_link), {'maxItemCount':10})
+ documentlist = list(client.ReadDocuments(collection_link, {'maxItemCount':10}))
print('Found {0} documents'.format(documentlist.__len__()))
@@ -181,4 +181,4 @@ if __name__ == '__main__':
run_sample()
except Exception as e:
- print("Top level Error: args:{0}, message:N/A".format(e.args))
\ No newline at end of file
+ print("Top level Error: args:{0}, message:N/A".format(e.args))
|
Fix the misplaced feed_options
|
Azure_azure-cosmos-python
|
train
|
py
|
3d21d455dca6e75a635ab5742c66c80ee175c3e7
|
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go
index <HASH>..<HASH> 100644
--- a/cmd/evm/runner.go
+++ b/cmd/evm/runner.go
@@ -206,6 +206,7 @@ func runCmd(ctx *cli.Context) error {
execTime := time.Since(tstart)
if ctx.GlobalBool(DumpFlag.Name) {
+ statedb.Commit(true)
statedb.IntermediateRoot(true)
fmt.Println(string(statedb.Dump()))
}
|
cmd/evm: commit statedb if dump is requested (#<I>)
Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty.
|
ethereum_go-ethereum
|
train
|
go
|
119cdca384b1f8154a7cce648549b704b1256aed
|
diff --git a/services/changes/models/CheckResponse.php b/services/changes/models/CheckResponse.php
index <HASH>..<HASH> 100644
--- a/services/changes/models/CheckResponse.php
+++ b/services/changes/models/CheckResponse.php
@@ -8,17 +8,17 @@ use directapi\components\Model;
class CheckResponse extends Model
{
/**
- * @var CheckResponseModified[]
+ * @var CheckResponseModified
*/
public $Modified;
/**
- * @var CheckResponseIds[]
+ * @var CheckResponseIds
*/
public $NotFound;
/**
- * @var CheckResponseIds[]
+ * @var CheckResponseIds
*/
public $Unprocessed;
|
Fix phpdoc, should be object, not array
|
sitkoru_yandex-direct-api
|
train
|
php
|
89f170c4c9fc9491e44f09755b5bcccf89e8eee5
|
diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb
index <HASH>..<HASH> 100644
--- a/lib/stripe/resources/payment_intent.rb
+++ b/lib/stripe/resources/payment_intent.rb
@@ -10,11 +10,21 @@ module Stripe
OBJECT_NAME = "payment_intent"
+ custom_method :apply_customer_balance, http_verb: :post
custom_method :cancel, http_verb: :post
custom_method :capture, http_verb: :post
custom_method :confirm, http_verb: :post
custom_method :verify_microdeposits, http_verb: :post
+ def apply_customer_balance(params = {}, opts = {})
+ request_stripe_object(
+ method: :post,
+ path: resource_url + "/apply_customer_balance",
+ params: params,
+ opts: opts
+ )
+ end
+
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
|
API Updates (#<I>)
* Codegen for openapi fc5a2b9
* Reformat code
|
stripe_stripe-ruby
|
train
|
rb
|
0ee71c1d18faf41336b227205a810153c2509333
|
diff --git a/tests/cartesian_coordinates/Cartesian/test_core.py b/tests/cartesian_coordinates/Cartesian/test_core.py
index <HASH>..<HASH> 100644
--- a/tests/cartesian_coordinates/Cartesian/test_core.py
+++ b/tests/cartesian_coordinates/Cartesian/test_core.py
@@ -255,7 +255,7 @@ def test_align_and_make_similar():
m2 = cartesians[-1]
rotation_matrix = cc.utilities.algebra_utilities.rotation_matrix
- m2_shuffled = rotation_matrix([1, 1, 1], 1.2) @ m2 + 8
+ m2_shuffled = m2.move(matrix=rotation_matrix([1, 1, 1], 1.2)) + 8
np.random.seed(77)
m2_shuffled.index = np.random.permutation(m2.index)
|
BUG: No @ operator in python<I>
|
mcocdawc_chemcoord
|
train
|
py
|
2e2a5e78a0985c5c0593b876a071fe6e505a27df
|
diff --git a/shap/maskers/_fixed_composite.py b/shap/maskers/_fixed_composite.py
index <HASH>..<HASH> 100644
--- a/shap/maskers/_fixed_composite.py
+++ b/shap/maskers/_fixed_composite.py
@@ -4,9 +4,23 @@ from ..utils import invariants, variants, shape, data_transform, clustering
class FixedComposite(Masker):
def __init__(self, masker):
+ """ Creates a Composite masker from an underlying masker and returns the original args along with the masked output.
+
+ Parameters
+ ----------
+ masker: object
+ An object of the shap.maskers.Masker base class (eg. Text/Image masker).
+
+ Returns
+ -------
+ list
+ A wrapped tuple consisting of the masked input using the underlying masker appended with the original args in a list.
+ """
self.masker = masker
def __call__(self, mask, *args):
+ """ Computes mask on the args using the masker data attribute and returns list having a wrapped tuple containing masked input with args.
+ """
masked_X = self.masker(mask, *args)
wrapped_args = []
for item in args:
|
Added docstrings for _fixed_composite.py
|
slundberg_shap
|
train
|
py
|
93e6d4b3790d0140e690583d8837d97ef819db27
|
diff --git a/danceschool/door/urls.py b/danceschool/door/urls.py
index <HASH>..<HASH> 100644
--- a/danceschool/door/urls.py
+++ b/danceschool/door/urls.py
@@ -4,7 +4,7 @@ from .views import DoorRegisterView
from .autocomplete_light_registry import DoorRegisterAutoComplete
urlpatterns = [
+ path('register/autocomplete/', DoorRegisterAutoComplete.as_view(), name='doorRegisterAutocomplete'),
path('register/<slug:slug>/<int:year>/<int:month>/<int:day>/', DoorRegisterView.as_view(), name='doorRegister'),
path('register/<slug:slug>/', DoorRegisterView.as_view(today=True), name='doorRegister'),
- path('register/autocomplete/', DoorRegisterAutoComplete.as_view(), name='doorRegisterAutocomplete'),
]
|
Fixed path inheritance issue that broke the customer autocomplete
|
django-danceschool_django-danceschool
|
train
|
py
|
16b23b008a08898ba5e9f6833c920aca6c2f3390
|
diff --git a/src/sap.m/src/sap/m/P13nFilterPanel.js b/src/sap.m/src/sap/m/P13nFilterPanel.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/P13nFilterPanel.js
+++ b/src/sap.m/src/sap/m/P13nFilterPanel.js
@@ -403,7 +403,7 @@ sap.ui.define([
if (!this._aIncludeOperations["default"]) {
this.setIncludeOperations([
- sap.m.P13nConditionOperation.Contains, sap.m.P13nConditionOperation.EQ, sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.StartsWith, sap.m.P13nConditionOperation.EndsWith, sap.m.P13nConditionOperation.LT, sap.m.P13nConditionOperation.LE, sap.m.P13nConditionOperation.GT, sap.m.P13nConditionOperation.GE
+ sap.m.P13nConditionOperation.EQ, sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.LT, sap.m.P13nConditionOperation.LE, sap.m.P13nConditionOperation.GT, sap.m.P13nConditionOperation.GE
]);
}
|
[INTERNAL] P<I>nFilterPanel.js: contains, start-, endswith operations
removed for default operations
Change-Id: I0ed6d8c3f<I>e<I>cc4b<I>acd<I>ffe<I>e3
|
SAP_openui5
|
train
|
js
|
3b93bec890fb32318b5433f604d42ef7de859f15
|
diff --git a/src/Lemonblast/Cbor4Php/Cbor.php b/src/Lemonblast/Cbor4Php/Cbor.php
index <HASH>..<HASH> 100644
--- a/src/Lemonblast/Cbor4Php/Cbor.php
+++ b/src/Lemonblast/Cbor4Php/Cbor.php
@@ -260,6 +260,8 @@ class Cbor {
*/
private static function encodeDouble($double)
{
+ // TODO: Encode with the smallest possible format
+
$major = MajorType::SIMPLE_AND_FLOAT;
// If the encode doubles in 64 bit flag is set
|
Added a TODO to encodeDouble, can remove the need for the flag
|
Lemonblast_Cbor4Php
|
train
|
php
|
9d4388bc5c2259ca3988bd77a2346edca2eb97dd
|
diff --git a/src/main/ruby/naether.rb b/src/main/ruby/naether.rb
index <HASH>..<HASH> 100644
--- a/src/main/ruby/naether.rb
+++ b/src/main/ruby/naether.rb
@@ -93,7 +93,7 @@ class Naether
end
# Get dependencies
- def dependencies
+ def dependencies()
if Naether.platform == 'java'
return @resolver.getDependenciesNotation().to_a
else
@@ -102,8 +102,8 @@ class Naether
end
# Resolve dependencies, finding related additional dependencies
- def resolve_dependencies
- @resolver.resolveDependencies();
+ def resolve_dependencies( download_artifacts = true )
+ @resolver.resolveDependencies( download_artifacts );
dependencies
end
end
\ No newline at end of file
|
add param to determine if artifacts should be downloaded
|
mguymon_naether
|
train
|
rb
|
aba82642000d048da6d5c48792ac4c7429725475
|
diff --git a/cmd/policies.go b/cmd/policies.go
index <HASH>..<HASH> 100644
--- a/cmd/policies.go
+++ b/cmd/policies.go
@@ -328,6 +328,11 @@ func viewPolicyCmd(ctx *cli.Context) error {
const policyTestFailed = "Could not test policy."
+var permissionString = map[bool]string{
+ true: "yes",
+ false: "no",
+}
+
func testPolicies(ctx *cli.Context) error {
cfg, err := config.LoadConfig()
if err != nil {
@@ -383,7 +388,7 @@ func testPolicies(ctx *cli.Context) error {
policies = filterPolicies(policies, predicate)
allowed := policiesAllowAccess(policies)
- fmt.Printf("User %s has access to %v %v: %v\n", *userName, action.String(), path, false)
+ fmt.Println(permissionString[allowed])
return nil
}
|
cmd: policies: test: Update the output message to match the specification
In his email Ian mentioned the command should output yes/no. This seems
a little terse to me but I'll stick to the spec, for now...
|
manifoldco_torus-cli
|
train
|
go
|
af4d6f7bfe16a16b78a9d00ff198673f83104856
|
diff --git a/src/http/write.js b/src/http/write.js
index <HASH>..<HASH> 100644
--- a/src/http/write.js
+++ b/src/http/write.js
@@ -30,23 +30,14 @@ const mfsWrite = {
const fileStream = await new Promise((resolve, reject) => {
const parser = multipart.reqParser(request.payload)
- let fileStream
parser.on('file', (_, stream) => {
- if (fileStream) {
- return reject(Boom.badRequest('Please only send one file'))
- }
-
- fileStream = stream
+ resolve(stream)
})
parser.on('error', (error) => {
reject(error)
})
-
- parser.on('end', () => {
- resolve(fileStream)
- })
})
await ipfs.files.write(arg, fileStream, {
|
fix: parser does not end until file data is consumed
License: MIT
|
ipfs_js-ipfs-mfs
|
train
|
js
|
b9afa23c20d87cf5178ae4caf0ff3c107e107c31
|
diff --git a/tormysql/pool.py b/tormysql/pool.py
index <HASH>..<HASH> 100644
--- a/tormysql/pool.py
+++ b/tormysql/pool.py
@@ -266,8 +266,7 @@ class ConnectionPool(object):
if self._closed:
raise ConnectionPoolClosedError("Connection pool closed.")
self._closed = True
- if not self._connections_count:
- return None
+
self._close_future = close_future = Future()
if self._used_connections:
@@ -293,6 +292,11 @@ class ConnectionPool(object):
connection = self._connections.popleft()
self._used_connections[id(connection)] = connection
connection.do_close()
+
+ if not self._connections_count:
+ close_future.set_result(None)
+ self._close_future = None
+
return close_future
def check_idle_connections(self):
|
fix pool close when all connection is closeed
|
snower_TorMySQL
|
train
|
py
|
70bc166ede9ebb4ec2d29e023f80657a092cc90c
|
diff --git a/bin/metrics-http-json-deep.rb b/bin/metrics-http-json-deep.rb
index <HASH>..<HASH> 100755
--- a/bin/metrics-http-json-deep.rb
+++ b/bin/metrics-http-json-deep.rb
@@ -85,7 +85,7 @@ class JsonDeepMetrics < Sensu::Plugin::Metric::CLI::Graphite
if value.is_a?(Hash)
deep_value(value, "#{scheme}.#{ekey}")
else
- output "#{scheme}.#{ekey}", value unless config[:numonly] && !value.is_a?(Integer)
+ output "#{scheme}.#{ekey}", value unless config[:numonly] && !value.is_a?(Numeric)
end
end
end
|
Update numonly filter to output all Numeric values
|
sensu-plugins_sensu-plugins-http
|
train
|
rb
|
3f5a3059e1d06f707f00882b250e4abdd5b9be73
|
diff --git a/mwtab/cli.py b/mwtab/cli.py
index <HASH>..<HASH> 100755
--- a/mwtab/cli.py
+++ b/mwtab/cli.py
@@ -103,7 +103,6 @@ def cli(cmdargs):
print(json.dumps(metabolites_dict, indent=4, cls=mwextract.SetEncoder))
elif cmdargs["metadata"]:
- print(cmdargs)
metadata = dict()
for mwtabfile in mwfile_generator:
extracted_values = mwextract.extract_metadata(mwtabfile, cmdargs)
|
Removes print statement used during debugging.
|
MoseleyBioinformaticsLab_mwtab
|
train
|
py
|
fae4135fa802fb3cc51006eac35ec8825d03e5b5
|
diff --git a/lib/ohai/plugins/linux/network.rb b/lib/ohai/plugins/linux/network.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/plugins/linux/network.rb
+++ b/lib/ohai/plugins/linux/network.rb
@@ -104,7 +104,8 @@ Ohai.plugin(:Network) do
route_entry = Mash.new(:destination => route_dest,
:family => family[:name])
%w{via scope metric proto src}.each do |k|
- route_entry[k] = $1 if route_ending =~ /\b#{k}\s+([^\s]+)\b/
+ # http://rubular.com/r/pwTNp65VFf
+ route_entry[k] = $1 if route_ending =~ /\b#{k}\s+([^\s]+)/
end
# a sanity check, especially for Linux-VServer, OpenVZ and LXC:
|
Fix the route support for IPV6 routes ending in ::
Removing the ending word boundary in the regex allows is to capture the
:: endings while still properly parsing other routes. I added a rubular
comment as well so we know what this regex is actually trying to
capture.
|
chef_ohai
|
train
|
rb
|
877b154df6f88f7da2b2f6cbddf65f0408d0ea97
|
diff --git a/openquake/engine/calculators/hazard/event_based/core.py b/openquake/engine/calculators/hazard/event_based/core.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/calculators/hazard/event_based/core.py
+++ b/openquake/engine/calculators/hazard/event_based/core.py
@@ -293,9 +293,10 @@ class GmfCalculator(object):
computer = gmf.GmfComputer(
rupture, r_sites, self.sorted_imts, self.sorted_gsims,
self.truncation_level, self.correl_model)
+ gnames = map(str, computer.gsims)
rupids, seeds = zip(*rupid_seed_pairs)
for rupid, gmfa in zip(rupids, computer.compute(seeds)):
- for gname in gmfa.dtype.fields:
+ for gname in gnames:
gmf_by_imt = gmfa[gname]
for imt in self.sorted_imts:
for site_id, gmv in zip(r_sites.sids, gmf_by_imt[imt]):
|
Fixed the event based calculator
Former-commit-id: <I>aea<I>de<I>fb9aa7e<I>d<I>c3b<I>de<I>
|
gem_oq-engine
|
train
|
py
|
ed051f21b5bcc5ef891c0df5ff054f1f19319dca
|
diff --git a/lib/gir_ffi/arg_helper.rb b/lib/gir_ffi/arg_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/gir_ffi/arg_helper.rb
+++ b/lib/gir_ffi/arg_helper.rb
@@ -219,6 +219,7 @@ module GirFFI
end
if FFI::Pointer === arg
+ return nil if arg.null?
begin
ObjectSpace._id2ref arg.address
rescue RangeError
diff --git a/test/gtk_test.rb b/test/gtk_test.rb
index <HASH>..<HASH> 100644
--- a/test/gtk_test.rb
+++ b/test/gtk_test.rb
@@ -27,6 +27,7 @@ class GtkTest < Test::Unit::TestCase
assert_instance_of Gtk::Button, o
end
end
+
context "its #connect_signals_full method" do
setup do
@builder.add_from_string @spec, @spec.length
@@ -39,6 +40,10 @@ class GtkTest < Test::Unit::TestCase
assert_equal b.to_ptr, @builder.to_ptr
assert_instance_of Gtk::Button, o
assert_equal "clicked", sn
+ assert_equal "on_button_clicked", hn
+ assert_equal nil, co
+ assert_equal :after, f
+ assert_equal nil, ud
end
end
end
|
If user data is null, pass nil to callback.
|
mvz_gir_ffi
|
train
|
rb,rb
|
e595fe7136148c334be78efbe03499db05ea4412
|
diff --git a/src/org/parosproxy/paros/network/HttpHeader.java b/src/org/parosproxy/paros/network/HttpHeader.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/network/HttpHeader.java
+++ b/src/org/parosproxy/paros/network/HttpHeader.java
@@ -57,7 +57,8 @@ abstract public class HttpHeader implements java.io.Serializable{
public static final String COOKIE = "Cookie";
public static final String SET_COOKIE = "Set-Cookie";
public static final String SET_COOKIE2 = "Set-Cookie2";
-
+ public static final String X_XSS_PROTECTION = "X-XSS-Protection";
+
public static final String HTTP09 = "HTTP/0.9";
public static final String HTTP10 = "HTTP/1.0";
public static final String HTTP11 = "HTTP/1.1";
|
Vitor:
- Added X-XSS-Protection on the static variables
|
zaproxy_zaproxy
|
train
|
java
|
fc557968d2e4c3d04643f2b7bf34f6a3bcbcfbaa
|
diff --git a/test/src/test/java/hudson/model/AsynchPeopleTest.java b/test/src/test/java/hudson/model/AsynchPeopleTest.java
index <HASH>..<HASH> 100644
--- a/test/src/test/java/hudson/model/AsynchPeopleTest.java
+++ b/test/src/test/java/hudson/model/AsynchPeopleTest.java
@@ -25,7 +25,7 @@
package hudson.model;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import static org.junit.Assert.*;
import org.junit.Rule;
@@ -53,7 +53,7 @@ public class AsynchPeopleTest {
}
assertEquals(0, wc.waitForBackgroundJavaScript(120000));
boolean found = false;
- for (HtmlElement table : page.getElementsByTagName("table")) {
+ for (DomElement table : page.getElementsByTagName("table")) {
if (table.getAttribute("class").contains("progress-bar")) {
found = true;
assertEquals("display: none;", table.getAttribute("style"));
|
AsynchPeopleTest compiling against HtmlUnit <I>
|
jenkinsci_jenkins
|
train
|
java
|
9fd1663746a2cba85da4f11a84b92b60e654e6b9
|
diff --git a/lib/friendly_id/base.rb b/lib/friendly_id/base.rb
index <HASH>..<HASH> 100644
--- a/lib/friendly_id/base.rb
+++ b/lib/friendly_id/base.rb
@@ -161,9 +161,9 @@ often better and easier to use {FriendlyId::Slugged slugs}.
#
# @yieldparam config The model class's {FriendlyId::Configuration friendly_id_config}.
def friendly_id(base = nil, options = {}, &block)
- yield @friendly_id_config if block_given?
- @friendly_id_config.use options.delete :use
- @friendly_id_config.send :set, base ? options.merge(:base => base) : options
+ yield friendly_id_config if block_given?
+ friendly_id_config.use options.delete :use
+ friendly_id_config.send :set, base ? options.merge(:base => base) : options
before_save {|rec| rec.instance_eval {@current_friendly_id = friendly_id}}
include Model
end
|
Ensure friendly_id_config is initialized in STI classes
|
norman_friendly_id
|
train
|
rb
|
007dd2e2cb6d0f13f392a128facfd6068fb396a5
|
diff --git a/graphics/base.py b/graphics/base.py
index <HASH>..<HASH> 100644
--- a/graphics/base.py
+++ b/graphics/base.py
@@ -40,7 +40,7 @@ def set_format(instance, default="pdf"):
allowed_format = ("emf", "eps", "pdf", "png", "ps", \
"raw", "rgba", "svg", "svgz")
- instance.add_option("--format", default=default,
+ instance.add_option("--format", default=default, choices=allowed_format,
help="Generate image of format, must be one of {0}".\
format("|".join(allowed_format)) + " [default: %default]")
|
missing choices option in graphics.base.set_format()
|
tanghaibao_jcvi
|
train
|
py
|
b4df047be1e431ec2f29372e5b17a316cfaaa128
|
diff --git a/liquibase-core/src/main/java/liquibase/executor/Executor.java b/liquibase-core/src/main/java/liquibase/executor/Executor.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/executor/Executor.java
+++ b/liquibase-core/src/main/java/liquibase/executor/Executor.java
@@ -14,7 +14,7 @@ import java.util.Map;
/**
* Interface for a class that is capable of executing statements/queries against a DBMS.
*/
-public interface Executor extends PrioritizedService {
+public interface Executor {
/**
*
* Return the name of the Executor
|
Remove PrioritizedService from Executor interface.
|
liquibase_liquibase
|
train
|
java
|
940d6be3d59d22063f84c6dec8f7dfb850e40d4c
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ with open(os.path.join(os.path.dirname(__file__), "README.md")) as f:
setup(
name="pyinstrument",
- packages=find_packages(),
+ packages=find_packages(include=("pyinstrument", "pyinstrument.*")),
version="4.0.3",
ext_modules=[
Extension(
|
Ensure test/ is not installed in site-packages
|
joerick_pyinstrument
|
train
|
py
|
34ad3dff864d567a6eded6c64e288822f27f2d11
|
diff --git a/openquake/parser/vulnerability.py b/openquake/parser/vulnerability.py
index <HASH>..<HASH> 100644
--- a/openquake/parser/vulnerability.py
+++ b/openquake/parser/vulnerability.py
@@ -115,7 +115,7 @@ class VulnerabilityModelFile(producer.FileProducer):
# TODO (ac): These two functions should be probably moved elsewhere
-def load_vulnerability_model(job_id, path):
+def load_vulnerability_model(job_id, path, retrofitted=False):
"""Load and store the vulnerability model defined in the
given NRML file in the underlying kvs system."""
@@ -129,15 +129,15 @@ def load_vulnerability_model(job_id, path):
vulnerability_model[vuln_curve["ID"]] = vuln_func.to_json()
- kvs.set_value_json_encoded(kvs.tokens.vuln_key(job_id),
+ kvs.set_value_json_encoded(kvs.tokens.vuln_key(job_id, retrofitted),
vulnerability_model)
-def load_vuln_model_from_kvs(job_id):
+def load_vuln_model_from_kvs(job_id, retrofitted=False):
"""Load the vulnerability model from kvs for the given job."""
vulnerability_model = kvs.get_value_json_decoded(
- kvs.tokens.vuln_key(job_id))
+ kvs.tokens.vuln_key(job_id, retrofitted))
vulnerability_curves = {}
|
parser/vulnerability: support for reading retrofitted models
Former-commit-id: <I>a<I>d7a0fff1e3e<I>e<I>a<I>cc2f8f<I>fe
|
gem_oq-engine
|
train
|
py
|
3b1b4bbd53836b6e7e50fd34f09b631f365c43a0
|
diff --git a/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java b/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java
index <HASH>..<HASH> 100644
--- a/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java
+++ b/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java
@@ -189,8 +189,7 @@ public class
case OVERDUE_CHANGE:
OverdueChangeInternalEvent realEventOC = (OverdueChangeInternalEvent) event;
- // TODO When Killbil supports more than overdue for bundle, this will break...
- objectType = ObjectType.BUNDLE;
+ objectType = ObjectType.ACCOUNT;
objectId = realEventOC.getOverdueObjectId();
eventBusType = ExtBusEventType.OVERDUE_CHANGE;
break;
|
Fix bug in external event for overdue
|
killbill_killbill
|
train
|
java
|
44c0a8458a75690e1829523de12acddb9d746b6c
|
diff --git a/dom/MemoryDOMElement.js b/dom/MemoryDOMElement.js
index <HASH>..<HASH> 100644
--- a/dom/MemoryDOMElement.js
+++ b/dom/MemoryDOMElement.js
@@ -579,10 +579,11 @@ export default class MemoryDOMElement extends DOMElement {
_propagateEvent (event) {
let listeners = this.eventListeners
if (listeners) {
- let listener = listeners.find((l) => {
- return l.eventName === event.type
+ listeners.forEach(l => {
+ if (l.eventName === event.type) {
+ l.handler(event)
+ }
})
- if (listener) listener.handler(event)
if (event.stopped) return
let p = this.parentNode
if (p) p._propagateEvent(event)
|
Let MemoryDOMEvent.emit() trigger all registered handlers on an element.
|
substance_substance
|
train
|
js
|
f82d13b4c9292259108c5aade7c59d2b880166b7
|
diff --git a/plugin.php b/plugin.php
index <HASH>..<HASH> 100644
--- a/plugin.php
+++ b/plugin.php
@@ -457,7 +457,11 @@ function json_handle_options_request( $response, $handler ) {
$response = new WP_JSON_Response();
$accept = array();
- $map = $handler::$method_map;
+
+ $handler_class = get_class( $handler );
+ $class_vars = get_class_vars( $handler_class );
+ $map = $class_vars['method_map'];
+
foreach ( $handler->get_routes() as $route => $endpoints ) {
$match = preg_match( '@^' . $route . '$@i', $handler->path, $args );
var_dump(array($route, $match));
|
Access method map in PHP <I>-compatible way
|
WP-API_WP-API
|
train
|
php
|
97f07fd4d9c217ba1fa3c2cc40e77024b8675a1d
|
diff --git a/beaver/worker.py b/beaver/worker.py
index <HASH>..<HASH> 100644
--- a/beaver/worker.py
+++ b/beaver/worker.py
@@ -9,7 +9,7 @@ from ssh_tunnel import BeaverSshTunnel
from transport import TransportException
from utils import eglob
-REOPEN_FILES = platform.platform() != 'Linux'
+REOPEN_FILES = 'linux' not in platform.platform().lower()
class Worker(object):
@@ -262,6 +262,9 @@ def run_worker(file_config, beaver_config, logger, ssh_tunnel=None):
logger.info("Logging using the {0} transport".format(beaver_config.get('transport')))
transport = create_transport(file_config, beaver_config)
+ if REOPEN_FILES:
+ logger.info("Detected non-linux platform. Files will be reopened for tailing")
+
try:
logger.info("Starting worker...")
l = Worker(file_config, beaver_config, transport.callback, logger, ssh_tunnel=ssh_tunnel)
|
Properly detect non-linux platforms
|
python-beaver_python-beaver
|
train
|
py
|
b12af8b06775f0c1590f9f2b5a40b4c456d86cd5
|
diff --git a/init.go b/init.go
index <HASH>..<HASH> 100644
--- a/init.go
+++ b/init.go
@@ -28,10 +28,9 @@ var (
func init() {
apid.RegisterPlugin(initPlugin)
- apid.RegisterPostPlugin(postinitPlugin)
}
-func postinitPlugin(services apid.Services) error {
+func postInitPlugins() {
log.Debug("start post plugin init")
/* call to Download Snapshot info */
@@ -43,8 +42,6 @@ func postinitPlugin(services apid.Services) error {
events.Listen(ApigeeSyncEventSelector, &handler{})
log.Debug("Done post plugin init")
- return nil
-
}
func initPlugin(services apid.Services) error {
@@ -55,6 +52,8 @@ func initPlugin(services apid.Services) error {
data = services.Data()
events = services.Events()
+ events.Listen(apid.PluginsInitializedEvent, postInitPlugins)
+
config.SetDefault(configPollInterval, 120)
db, err := data.DB()
|
Fix initialization to use apid events instead of a new plugin callback
|
apid_apidApigeeSync
|
train
|
go
|
f1828f8760b8ef64f58b2b50378d925cf9ccc188
|
diff --git a/staff/views.py b/staff/views.py
index <HASH>..<HASH> 100644
--- a/staff/views.py
+++ b/staff/views.py
@@ -6,6 +6,7 @@ from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.template.loader import render_to_string
from django.utils import simplejson
+from django.core.mail import EmailMessage
from staff.models import StaffMember
from staff.forms import ContactForm
@@ -54,8 +55,6 @@ def contact(request, slug, template_name='staffmembers/contact.html',
if request.method == 'POST':
form = ContactForm(request.POST)
if form.is_valid():
- from django.core.mail import send_mail
-
subject = render_to_string(
email_subject_template,
{'member': member}
@@ -69,8 +68,9 @@ def contact(request, slug, template_name='staffmembers/contact.html',
'message': form.cleaned_data['message']}
)
- send_mail(subject, message,
- settings.DEFAULT_FROM_EMAIL, [member.email])
+ EmailMessage(subject, message, settings.DEFAULT_FROM_EMAIL, [member.email],
+ headers = {'Reply-To': form.cleaned_data['email']}).send()
+
return HttpResponseRedirect(success_url)
else:
initial = {}
|
send email with proper Reply-To header
|
callowayproject_django-staff
|
train
|
py
|
7ebb1750e72a0627d972b8f1ff05df5d495a4556
|
diff --git a/interp/arith.go b/interp/arith.go
index <HASH>..<HASH> 100644
--- a/interp/arith.go
+++ b/interp/arith.go
@@ -59,15 +59,9 @@ func (r *Runner) arithm(expr syntax.ArithmExpr) int {
syntax.AndAssgn, syntax.OrAssgn, syntax.XorAssgn,
syntax.ShlAssgn, syntax.ShrAssgn:
return r.assgnArit(x)
- case syntax.Colon:
- // TODO: error
- case syntax.Quest:
+ case syntax.Quest: // Colon can't happen here
cond := r.arithm(x.X)
- b2, ok := x.Y.(*syntax.BinaryArithm)
- if !ok || b2.Op != syntax.Colon {
- // TODO: error
- return 0
- }
+ b2 := x.Y.(*syntax.BinaryArithm) // must have Op==Colon
if cond == 1 {
return r.arithm(b2.X)
}
|
interp: ternary operator structure is now strict
We rely on syntax enforcing this, so panicking and undefined behaviour
is fine if the contract is broken.
|
mvdan_sh
|
train
|
go
|
8c6820be6403aff807932063682b602b0807eb29
|
diff --git a/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java b/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
index <HASH>..<HASH> 100644
--- a/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
+++ b/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
@@ -484,7 +484,9 @@ class NioWorker implements Runnable {
} catch (AsynchronousCloseException e) {
// Doesn't need a user attention - ignore.
} catch (Throwable t) {
- buf.release();
+ if (buf != null) {
+ buf.release();
+ }
channel.currentWriteEvent = null;
channel.currentWriteBuffer = null;
buf = null;
|
Fix possible NPE which will be thrown if the Buffer was set to null and after that Exception was thrown. See #<I>
|
netty_netty
|
train
|
java
|
1acad256c9bcb1c7f1e45a72f1b46bc9e6f10043
|
diff --git a/hamper/plugins/whatwasthat.py b/hamper/plugins/whatwasthat.py
index <HASH>..<HASH> 100644
--- a/hamper/plugins/whatwasthat.py
+++ b/hamper/plugins/whatwasthat.py
@@ -9,7 +9,7 @@ class WhatWasThat(ChatCommandPlugin):
'''
name = 'whatwasthat'
- priority = 0
+ priority = 2
class WhatWasThat(Command):
regex = r'^what\s*was\s*that\??$'
|
Bump whatwasthat's priority.
|
hamperbot_hamper
|
train
|
py
|
ec1357c6dcf227ab65835e2ccb15438aaeef1a21
|
diff --git a/html.php b/html.php
index <HASH>..<HASH> 100644
--- a/html.php
+++ b/html.php
@@ -12,7 +12,7 @@ class html
static::$config = new \Lucid\Component\Container\Container();
} else {
if (is_object($config) === false || in_array('Lucid\\Component\\Container\\ContainerInterface', class_implements($config)) === false) {
- throw new \Exception('Factory contructor parameter $config must either be null, or implement Lucid\\$config\\Container\\ContainerInterface (https://github.com/Dev-Lucid/container). If null is passed, then an instance of Lucid\\Component\\Container\\Container will be instantiated instead.');
+ throw new \Exception('Html contructor parameter $config must either be null, or implement Lucid\\Component\\Container\\ContainerInterface (https://github.com/Dev-Lucid/container). If null is passed, then an instance of Lucid\\Component\\Container\\Container will be instantiated instead.');
}
# if a config object has been passed in, decorate it so that internally all indexes are prefixed with html:
|
fixing typo from copy/paste in init
|
dev-lucid_html
|
train
|
php
|
c052e89e561eb88a7a79de436e4f5196834677fb
|
diff --git a/api/models/index.js b/api/models/index.js
index <HASH>..<HASH> 100644
--- a/api/models/index.js
+++ b/api/models/index.js
@@ -1,8 +1,10 @@
-var customModels = module.exports = {
+var CustomModelPrototype = require('./CustomModel')
+
+module.exports = {
process: process
}
-var CustomModelPrototype = require('./CustomModel')
+var customModels = module.exports
function process(modelDescriptions) {
for (var modelName in modelDescriptions) {
|
Organize the imports, exports and state declarations as usual
|
marcuswestin_fin
|
train
|
js
|
5a757e722a9a2323cad5ea931db4cd874c2be19b
|
diff --git a/lib/postal/smtp_server/client.rb b/lib/postal/smtp_server/client.rb
index <HASH>..<HASH> 100644
--- a/lib/postal/smtp_server/client.rb
+++ b/lib/postal/smtp_server/client.rb
@@ -236,7 +236,14 @@ module Postal
@state = :mail_from_received
transaction_reset
- @mail_from = data.gsub(/MAIL FROM\s*:\s*/i, '').gsub(/.*</, '').gsub(/>.*/, '').strip
+ if data =~ /AUTH=/
+ # Discard AUTH= parameter and anything that follows.
+ # We don't need this parameter as we don't trust any client to set it
+ mail_from_line = data.sub(/ *AUTH=.*/, '')
+ else
+ mail_from_line = data
+ end
+ @mail_from = mail_from_line.gsub(/MAIL FROM\s*:\s*/i, '').gsub(/.*</, '').gsub(/>.*/, '').strip
'250 OK'
end
|
remove AUTH= paramater from "MAIL FROM" before processing
|
atech_postal
|
train
|
rb
|
654e77e74d8130b0b78e0a65f179ca843620640f
|
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
@@ -3078,9 +3078,12 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
// String cache
static $str;
- // As we should only have one element with the id of unread we keep track of whether this post is the first
- // unread post.
- static $firstunread = true;
+ // This is an extremely hacky way to ensure we only print the 'unread' anchor
+ // the first time we encounter an unread post on a page. Ideally this would
+ // be moved into the caller somehow, and be better testable. But at the time
+ // of dealing with this bug, this static workaround was the most surgical and
+ // it fits together with only printing th unread anchor id once on a given page.
+ static $firstunreadanchorprinted = false;
$modcontext = context_module::instance($cm->id);
@@ -3296,10 +3299,10 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
$forumpostclass = ' read';
} else {
$forumpostclass = ' unread';
- // If this is the first unread post then give it an anchor and id of unread.
- if ($firstunread) {
+ // If this is the first unread post printed then give it an anchor and id of unread.
+ if (!$firstunreadanchorprinted) {
$output .= html_writer::tag('a', '', array('id' => 'unread'));
- $firstunread = false;
+ $firstunreadanchorprinted = true;
}
}
} else {
|
MDL-<I> mod_forum: clarify static variable usage
After some time discussing with integrators, we decided that this
slightly yukky solution probably fits safely, so just making its usage
better explained and speciifc.
|
moodle_moodle
|
train
|
php
|
0776e4a703e75b38112c453c36a4014127858a37
|
diff --git a/lib/boot/module.js b/lib/boot/module.js
index <HASH>..<HASH> 100644
--- a/lib/boot/module.js
+++ b/lib/boot/module.js
@@ -40,5 +40,9 @@ function loadDefinitionsFromDir(dir, phases) {
if (fs.existsSync(modelsPath)) {
phases.push(require('./definitions')(modelsPath));
}
+ modelsPath = path.join(dir, 'common', 'models');
+ if (fs.existsSync(modelsPath)) {
+ phases.push(require('./definitions')(modelsPath));
+ }
}
\ No newline at end of file
|
support common/models path in boot module
|
uugolab_sycle
|
train
|
js
|
2fee4d9357587a186fe196251964f006acd8043a
|
diff --git a/src/tools/mountainchart/mountainchart-component.js b/src/tools/mountainchart/mountainchart-component.js
index <HASH>..<HASH> 100644
--- a/src/tools/mountainchart/mountainchart-component.js
+++ b/src/tools/mountainchart/mountainchart-component.js
@@ -476,6 +476,7 @@
return {
_mousemove: function (d, i) {
+ if (_this.model.time.dragging)return;
_this.model.entities.highlightEntity(d);
@@ -488,6 +489,8 @@
},
_mouseout: function (d, i) {
+ if (_this.model.time.dragging)return;
+
_this.tooltip.classed('vzb-hidden', true);
_this.model.entities.clearHighlighted();
},
|
Block hovering of mountains when dragging time slider
|
vizabi_vizabi
|
train
|
js
|
7c3e0689120f154a8934c3d1a023461b5f72ba4c
|
diff --git a/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java b/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java
index <HASH>..<HASH> 100644
--- a/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java
+++ b/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java
@@ -36,10 +36,10 @@ public class InstrumentedThreadFactory implements ThreadFactory
private class InstrumentedRunnable implements Runnable
{
- private final Runnable wrapee;
- InstrumentedRunnable(Runnable wrapee)
+ private final Runnable task;
+ InstrumentedRunnable(Runnable task)
{
- this.wrapee = wrapee;
+ this.task = task;
}
@Override
@@ -48,7 +48,7 @@ public class InstrumentedThreadFactory implements ThreadFactory
running.inc();
try
{
- wrapee.run();
+ task.run();
}
finally
{
|
'wrappee' sounds silly, renaming
|
dropwizard_metrics
|
train
|
java
|
857a6975d09e5ad751040c850e768934f4f5fd7b
|
diff --git a/.eslintrc.js b/.eslintrc.js
index <HASH>..<HASH> 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -31,7 +31,7 @@ module.exports = {
message: 'Invalid require of core/server from core/shared.'
},
{
- name: path.resolve(__dirname, 'core/server/**'),
+ name: path.resolve(__dirname, 'core/frontend/**'),
message: 'Invalid require of core/frontend from core/shared.'
}
]]
|
Fixed incorrect eslint rule config
|
TryGhost_Ghost
|
train
|
js
|
4c092f3f0c6b9cf16bcfb0368817ffce961b401a
|
diff --git a/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java b/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java
index <HASH>..<HASH> 100644
--- a/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java
+++ b/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java
@@ -43,7 +43,9 @@ public class DegreeDistributionMapReduce extends GraknMapReduce<Set<String>> {
if (selectedTypes.contains(Utility.getVertexType(vertex))) {
emitter.emit(vertex.value(DegreeVertexProgram.DEGREE),
Collections.singleton(vertex.id().toString()));
+ return;
}
+ emitter.emit(NullObject.instance(), Collections.emptySet());
}
@Override
|
Fix a bug causing StackOverflowError due to poor implementation of MapIterator of Tinkerpop (#<I>)
|
graknlabs_grakn
|
train
|
java
|
c1d50e6394eb4517f02c08b7ea40aa09b9288cf1
|
diff --git a/lib/reality/zapwhite.rb b/lib/reality/zapwhite.rb
index <HASH>..<HASH> 100644
--- a/lib/reality/zapwhite.rb
+++ b/lib/reality/zapwhite.rb
@@ -295,6 +295,11 @@ module Reality
attributes.text_rule('*.wat')
attributes.binary_rule('*.wasm')
+ # WebGL Shader files
+ attributes.text_rule('*.frag')
+ attributes.text_rule('*.vert')
+ attributes.text_rule('*.shader')
+
# Rust defaults
attributes.text_rule('*.rs')
|
Add WebGL shaders to files processed
|
realityforge_zapwhite
|
train
|
rb
|
d31310a405e62d2ea0df8871618275b676519087
|
diff --git a/lib/passes/index.js b/lib/passes/index.js
index <HASH>..<HASH> 100644
--- a/lib/passes/index.js
+++ b/lib/passes/index.js
@@ -1,11 +1,11 @@
(function(){
module.exports = {
- 'ClearMaskPass': './clear-mask',
- 'MaskPass': './mask',
- 'RenderPass': './render',
- 'ShaderPass': './shader',
- 'ShaderRenderPass': './shader-render'
+ 'ClearMaskPass': require('./clear-mask'),
+ 'MaskPass': require('./mask'),
+ 'RenderPass': require('./render'),
+ 'ShaderPass': require('./shader'),
+ 'ShaderRenderPass': require('./shader-render')
};
})();
\ No newline at end of file
|
Derrrrrrrp.
|
lumine-gl_lumine
|
train
|
js
|
a5c1b7bd1ac14f9a86f808fddbd9f7304ee621d9
|
diff --git a/src/Console/SupervisorCommand.php b/src/Console/SupervisorCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/SupervisorCommand.php
+++ b/src/Console/SupervisorCommand.php
@@ -23,7 +23,7 @@ class SupervisorCommand extends Command
{--max-processes=1 : The maximum number of total workers to start}
{--min-processes=1 : The minimum number of workers to assign per queue}
{--memory=128 : The memory limit in megabytes}
- {--nice=0 : The process niceness}
+ {--nice=0 : Increment to the process niceness}
{--paused : Start the supervisor in a paused state}
{--queue= : The names of the queues to work}
{--sleep=3 : Number of seconds to sleep when no job is available}
@@ -75,7 +75,7 @@ class SupervisorCommand extends Command
*/
protected function start($supervisor)
{
- if ($supervisor->options->nice > 0) {
+ if ($supervisor->options->nice) {
proc_nice($supervisor->options->nice);
}
diff --git a/src/SupervisorOptions.php b/src/SupervisorOptions.php
index <HASH>..<HASH> 100644
--- a/src/SupervisorOptions.php
+++ b/src/SupervisorOptions.php
@@ -49,7 +49,7 @@ class SupervisorOptions extends WorkerOptions
public $minProcesses = 1;
/**
- * The process niceness.
+ * Increment to the process niceness.
*
* @var int
*/
|
allow negative nice (for sudo user); better comments about the meaning of nice option
|
laravel_horizon
|
train
|
php,php
|
d7fb7ba52d05cde87ac54135337518b03ca23f44
|
diff --git a/salt/modules/philips_hue.py b/salt/modules/philips_hue.py
index <HASH>..<HASH> 100644
--- a/salt/modules/philips_hue.py
+++ b/salt/modules/philips_hue.py
@@ -29,20 +29,20 @@ def _proxy():
'''
Get proxy.
'''
- return __opts__.get('proxymodule')
+ return __proxy__
def __virtual__():
'''
Start the Philips HUE only for proxies.
'''
-
if not _proxy():
return False
def _mkf(cmd_name, doc):
def _cmd(*args, **kw):
- return _proxy()[_proxy().loaded_base_name + "." + cmd_name](*args, **kw)
+ proxyfn = 'philips_hue.'+cmd_name
+ return __proxy__[proxyfn](*args, **kw)
return _cmd
import salt.proxy.philips_hue as hue
|
Update philips Hue proxy to support __proxy__ variable.
|
saltstack_salt
|
train
|
py
|
ef1d788a3404a098f4b6114a40f511a04d67ca75
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -36,11 +36,11 @@ return [
'name' => 'taoQtiItem',
'label' => 'QTI item model',
'license' => 'GPL-2.0',
- 'version' => '23.8.0',
+ 'version' => '23.9.0',
'author' => 'Open Assessment Technologies',
'requires' => [
'taoItems' => '>=10.1.0',
- 'tao' => '>=41.5.0',
+ 'tao' => '>=41.6.0',
'generis' => '>=12.5.0',
],
'models' => [
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index <HASH>..<HASH> 100644
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -434,6 +434,6 @@ class Updater extends \common_ext_ExtensionUpdater
$this->setVersion('21.0.0');
}
- $this->skip('21.0.0', '23.8.0');
+ $this->skip('21.0.0', '23.9.0');
}
}
|
Merge branch 'develop' into fix/UDI-<I>/have-access-to-children-under-restricted-class
# Conflicts:
# manifest.php
# scripts/update/Updater.php
|
oat-sa_extension-tao-itemqti
|
train
|
php,php
|
2b26d2ca1b7ad4f400dec0d97feddcd2f0bf6026
|
diff --git a/rllib/policy/torch_policy.py b/rllib/policy/torch_policy.py
index <HASH>..<HASH> 100644
--- a/rllib/policy/torch_policy.py
+++ b/rllib/policy/torch_policy.py
@@ -480,7 +480,8 @@ class TorchPolicy(Policy):
state = super().get_state()
state["_optimizer_variables"] = []
for i, o in enumerate(self._optimizers):
- state["_optimizer_variables"].append(o.state_dict())
+ optim_state_dict = convert_to_non_torch_type(o.state_dict())
+ state["_optimizer_variables"].append(optim_state_dict)
return state
@override(Policy)
@@ -492,7 +493,9 @@ class TorchPolicy(Policy):
if optimizer_vars:
assert len(optimizer_vars) == len(self._optimizers)
for o, s in zip(self._optimizers, optimizer_vars):
- o.load_state_dict(s)
+ optim_state_dict = convert_to_torch_tensor(
+ s, device=self.device)
+ o.load_state_dict(optim_state_dict)
# Then the Policy's (NN) weights.
super().set_state(state)
|
[rllib] Fix for Torch checkpoint taken on GPU fails to deserialize on CPU (#<I>) (#<I>)
|
ray-project_ray
|
train
|
py
|
fe1c15419a4fff8797897e4443e9be19ba6cadad
|
diff --git a/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java b/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java
+++ b/hazelcast/src/main/java/com/hazelcast/spi/exception/CallerNotMemberException.java
@@ -20,7 +20,7 @@ import com.hazelcast.nio.Address;
/**
* A {@link RetryableHazelcastException} that indicates that an operation was send by a machine which isn't member
- * in the cluster when the request is operation.
+ * in the cluster when the operation is executed.
*/
public class CallerNotMemberException extends RetryableHazelcastException {
|
Minor javadoc improvement in CallerNotMemberException
|
hazelcast_hazelcast
|
train
|
java
|
331a921922248308c29f7ab908aab4dca4966aab
|
diff --git a/test/js/tests/unit-tests.js b/test/js/tests/unit-tests.js
index <HASH>..<HASH> 100644
--- a/test/js/tests/unit-tests.js
+++ b/test/js/tests/unit-tests.js
@@ -133,11 +133,13 @@ $(function() {
test('variance',function(){
equals(jStat.variance([3,4,5,6,7]),2,'variance([3,4,5,6,7])');
+ equals(jStat.variance([1,2,3,4,5,6], 1),3.5,'variance([1,2,3,4,5,6], 1)');
});
test('stdev',function(){
- equals(jStat.stdev([3,4,5]),1,'stdev([3,4,5])');
- equals(jStat.stdev([-3,-4,-5]),1,'stdev([-3,-4,-5])');
+ equals(jStat.stdev([3,4,5], 1),1,'stdev([3,4,5], 1)');
+ equals(jStat.stdev([-3,-4,-5], 1),1,'stdev([-3,-4,-5], 1)');
+ equals(jStat.stdev([1,2,3]), 0.816496580927726, 'stdev([1,2,3])');
});
test('meandev',function(){
|
update qunit for stdev and variance
|
jstat_jstat
|
train
|
js
|
eeb8b936dd7a1b9c479922ac2e7d8c3eeceae617
|
diff --git a/platforms/ios.js b/platforms/ios.js
index <HASH>..<HASH> 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -106,7 +106,7 @@ exports.installPlugin = function (config, plugin, callback) {
// write out plist
plistObj[0].Plugins[plistEle.attrib['key']] = plistEle.attrib['string'];
- fs.writeFile(plistPath, plist.stringify(plistObj), end);
+ fs.writeFile(plistPath, plist.stringify(plistObj[0]), end);
// write out xcodeproj file
fs.writeFile(pbxPath, xcodeproj.writeSync(), end);
diff --git a/test/ios-install.js b/test/ios-install.js
index <HASH>..<HASH> 100644
--- a/test/ios-install.js
+++ b/test/ios-install.js
@@ -102,7 +102,7 @@ exports['should edit PhoneGap.plist'] = function (test) {
var plistPath = config.projectPath + '/SampleApp/PhoneGap.plist';
plist.parseFile(plistPath, function (err, obj) {
- test.equal(obj[0].Plugins['com.phonegap.plugins.childbrowser'],
+ test.equal(obj.Plugins['com.phonegap.plugins.childbrowser'],
'ChildBrowserCommand');
test.done();
|
[ios] fixing plist writing
|
apache_cordova-plugman
|
train
|
js,js
|
f7b58d0298a3258d5f721e4bbfbbb3ba4a854bcb
|
diff --git a/pymatgen/io/vasp/sets.py b/pymatgen/io/vasp/sets.py
index <HASH>..<HASH> 100644
--- a/pymatgen/io/vasp/sets.py
+++ b/pymatgen/io/vasp/sets.py
@@ -1265,12 +1265,13 @@ class MVLSlabSet(MPRelaxSet):
self.auto_dipole = auto_dipole
self.get_locpot = get_locpot
self.kwargs = kwargs
+ self.set_mix = set_mix
slab_incar = {"EDIFF": 1e-4, "EDIFFG": -0.02, "ENCUT": 400,
"ISMEAR": 0, "SIGMA": 0.05, "ISIF": 3}
if not self.bulk:
slab_incar["ISIF"] = 2
- if set_mix:
+ if self.set_mix:
slab_incar["AMIN"] = 0.01
slab_incar["AMIX"] = 0.2
slab_incar["BMIX"] = 0.001
|
forgot new attribute for MVLSlabSet
|
materialsproject_pymatgen
|
train
|
py
|
1db32cd61f31d712d7eeb73575e5bbf510bf48bd
|
diff --git a/Thru/ActiveRecord/Search.php b/Thru/ActiveRecord/Search.php
index <HASH>..<HASH> 100644
--- a/Thru/ActiveRecord/Search.php
+++ b/Thru/ActiveRecord/Search.php
@@ -28,6 +28,7 @@ class Search
public function condition(SearchCondition $condition){
$this->conditions[] = $condition;
+ return $this;
}
public function limit($limit, $offset = 0)
diff --git a/tests/Search/SearchRecordsTest.php b/tests/Search/SearchRecordsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Search/SearchRecordsTest.php
+++ b/tests/Search/SearchRecordsTest.php
@@ -100,4 +100,12 @@ class SearchRecordsTest extends PHPUnit_Framework_TestCase {
->execOne();
$this->assertTrue($random_result instanceof TestModelSortable);
}
+
+ public function testSearchDirectCondition(){
+ $condition = new \Thru\ActiveRecord\SearchCondition("text_field", "dog", "LIKE");
+ $result = TestModelSortable::search()->condition($condition)->execOne();
+
+ $this->assertTrue($result instanceof TestModelSortable);
+ $this->assertEquals("Dog", $result->text_field);
+ }
}
|
Pushing it to <I>%\!
|
Thruio_ActiveRecord
|
train
|
php,php
|
1346f2aaec2e041cc393092547905008d9fd4ea7
|
diff --git a/src/HtmlServiceProvider.php b/src/HtmlServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/HtmlServiceProvider.php
+++ b/src/HtmlServiceProvider.php
@@ -44,7 +44,7 @@ class HtmlServiceProvider extends ServiceProvider
*/
protected function registerHtmlBuilder()
{
- $this->app->bind('html', function($app) {
+ $this->app->singleton('html', function($app) {
return new HtmlBuilder($app['url']);
});
}
@@ -54,7 +54,7 @@ class HtmlServiceProvider extends ServiceProvider
*/
protected function registerFormBuilder()
{
- $this->app->bind('form', function($app) {
+ $this->app->singleton('form', function($app) {
/**
* @var Builders\HtmlBuilder $html
* @var \Illuminate\Routing\UrlGenerator $url
@@ -64,9 +64,11 @@ class HtmlServiceProvider extends ServiceProvider
$url = $app['url'];
$session = $app['session.store'];
- return (new FormBuilder(
- $html, $url, $session->getToken()
- ))->setSessionStore($session);
+ $form = new FormBuilder($html, $url, $session->getToken());
+
+ $form->setSessionStore($session);
+
+ return $form;
});
}
|
Updating bind method to singleton + Refactoring
|
ARCANEDEV_LaravelHtml
|
train
|
php
|
657e8a547c7d4bd9e591626b970b906c46067478
|
diff --git a/core/candleManager.js b/core/candleManager.js
index <HASH>..<HASH> 100644
--- a/core/candleManager.js
+++ b/core/candleManager.js
@@ -101,7 +101,7 @@ var Manager = function() {
throw 'Gekko is unable to save historical data, do I have sufficient rights?';
this.on('processed', function() {
- log.info('Processed trades, sleeping for', this.fetch.next.m.fromNow(true) + '...');
+ log.debug('Processed trades, sleeping for', this.fetch.next.m.fromNow(true) + '...');
})
// .on('full history build', this.emitRealtime)
};
|
put verbose logging under debug
|
askmike_gekko
|
train
|
js
|
8e70abefe6425ae716b87a034bfd4ab044254a48
|
diff --git a/functions/functions-twig.php b/functions/functions-twig.php
index <HASH>..<HASH> 100644
--- a/functions/functions-twig.php
+++ b/functions/functions-twig.php
@@ -3,7 +3,7 @@
class TimberTwig {
function __construct(){
- add_action('get_twig', array($this, 'add_twig_filters'));
+ add_action('twig_apply_filters', array(&$this, 'add_twig_filters'));
}
function add_twig_filters($twig){
@@ -325,8 +325,6 @@
return $return;
}
-
-
function render_twig_string($string, $data = array()){
$loader = new Twig_Loader_String();
$twig = new Twig_Environment($loader);
diff --git a/objects/timber-loader.php b/objects/timber-loader.php
index <HASH>..<HASH> 100644
--- a/objects/timber-loader.php
+++ b/objects/timber-loader.php
@@ -123,7 +123,7 @@ class TimberLoader {
}
$twig = new Twig_Environment($loader, $params);
$twig->addExtension(new Twig_Extension_Debug());
- $twig = apply_filters('get_twig', $twig);
+ $twig = apply_filters('twig_apply_filters', $twig);
return $twig;
}
|
renamed action to add twig filters
|
timber_timber
|
train
|
php,php
|
1f6d066d7b7dff689e335c5e3659af3ea5b1d1e5
|
diff --git a/src/Console/CommandRunner.php b/src/Console/CommandRunner.php
index <HASH>..<HASH> 100644
--- a/src/Console/CommandRunner.php
+++ b/src/Console/CommandRunner.php
@@ -372,7 +372,9 @@ class CommandRunner implements EventDispatcherInterface
{
$builder = Router::createRouteBuilder('/');
- $this->app->routes($builder);
+ if ($this->app instanceof HttpApplicationInterface) {
+ $this->app->routes($builder);
+ }
if ($this->app instanceof PluginApplicationInterface) {
$this->app->pluginRoutes($builder);
}
|
Add check before calling methods that may not exist.
|
cakephp_cakephp
|
train
|
php
|
165131a452b03c94b0c8553f634cd0d258261a77
|
diff --git a/app/models/unidom/visitor/authenticating.rb b/app/models/unidom/visitor/authenticating.rb
index <HASH>..<HASH> 100644
--- a/app/models/unidom/visitor/authenticating.rb
+++ b/app/models/unidom/visitor/authenticating.rb
@@ -19,6 +19,9 @@ class Unidom::Visitor::Authenticating < Unidom::Visitor::ApplicationRecord
scope :visitor_type_is, ->(visitor_type) { where visitor_type: visitor_type }
scope :credential_type_is, ->(credential_type) { where credential_type: credential_type }
+ ##
+ # 将访问者 visitor 和信任状 credential 关联起来。关联时间是 opened_at ,缺省是当前时间。如:
+ # Unidom::Visitor::Authenticating.authenticate! user, with: password
def self.authenticate!(visitor, with: nil, opened_at: Time.now)
credential_is(with).visitor_is(visitor).valid_at.alive.first_or_create! opened_at: opened_at
end
|
1, Improve the Authenticating model for the document.
|
topbitdu_unidom-visitor
|
train
|
rb
|
bddef4868170c6315fd05bca0aa20c79472615f0
|
diff --git a/lib/Cake/Model/Datasource/Database/Query.php b/lib/Cake/Model/Datasource/Database/Query.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Model/Datasource/Database/Query.php
+++ b/lib/Cake/Model/Datasource/Database/Query.php
@@ -466,13 +466,15 @@ class Query implements Expression, IteratorAggregate {
$expression->traverse($visitor);
};
- $this->build($binder);
+ $query = $this->_transformQuery();
+ $query->build($binder->bindTo($query));
}
/**
* Returns a query object as returned by the connection object as a result of
* transforming this query instance to conform to any dialect specifics
*
+ * @todo if the query is not dirty, we could locally cache the result of this function
* @return void
**/
protected function _transformQuery() {
|
Transforming the query before binding params too
|
cakephp_cakephp
|
train
|
php
|
96259e4797a0fcc3f6e25f5074d3228e0747a3ec
|
diff --git a/src/Gitonomy/Git/Parser/DiffParser.php b/src/Gitonomy/Git/Parser/DiffParser.php
index <HASH>..<HASH> 100644
--- a/src/Gitonomy/Git/Parser/DiffParser.php
+++ b/src/Gitonomy/Git/Parser/DiffParser.php
@@ -64,9 +64,9 @@ class DiffParser extends ParserBase
// 4. File informations
$isBinary = false;
if ($this->expects('index ')) {
- $oldIndex = $this->consumeHash();
+ $oldIndex = $this->consumeShortHash();
$this->consume('..');
- $newIndex = $this->consumeHash();
+ $newIndex = $this->consumeShortHash();
if ($this->expects(' ')) {
$vars = $this->consumeRegexp('/\d{6}/');
$newMode = $oldMode = $vars[0];
|
Be compatible with bitbucket by allowing short hashes
|
gitonomy_gitlib
|
train
|
php
|
91b5a2b51a570f4e61edf301c04f18cc929accbb
|
diff --git a/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java b/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java
index <HASH>..<HASH> 100644
--- a/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java
+++ b/stratosphere-java/src/main/java/eu/stratosphere/api/java/record/io/TextInputFormat.java
@@ -45,13 +45,16 @@ public class TextInputFormat extends DelimitedInputFormat {
protected final StringValue theString = new StringValue();
- protected CharsetDecoder decoder;
- protected ByteBuffer byteWrapper;
+ // all fields below here are set in configure / open, so we do not serialze them
- protected boolean ascii;
+ protected transient CharsetDecoder decoder;
- protected int pos;
+ protected transient ByteBuffer byteWrapper;
+
+ protected transient int pos;
+
+ protected transient boolean ascii;
// --------------------------------------------------------------------------------------------
|
Correctly marked text input format members as transient
|
apache_flink
|
train
|
java
|
14793d3b0ea6d0ce2db3dfc9de5638ec0a814e04
|
diff --git a/src/Editor.js b/src/Editor.js
index <HASH>..<HASH> 100644
--- a/src/Editor.js
+++ b/src/Editor.js
@@ -360,16 +360,6 @@ define(function (require, exports, module) {
return this._codeMirror.totalHeight(includePadding);
};
-
- /**
- * Gets the total number of displayed lines for the document (not the viewport).
- * This function accounts for extra lines due to word wrapping if wordWrapping is enabled.
- * @returns {!number} height in lines
- */
- Editor.prototype.heightInLines = function () {
- return this._codeMirror.heightInLines();
- };
-
/**
* Gets the scroller element from the editor.
* @returns {!HTMLDivElement} scroller
|
removed heightInLines function from Editor.js
|
adobe_brackets
|
train
|
js
|
f9affb550ac49424c745eb8116c419f5d1ab3278
|
diff --git a/js/reveal.js b/js/reveal.js
index <HASH>..<HASH> 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -447,7 +447,8 @@
*/
function checkCapabilities() {
- isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA );
+ isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
+ ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS
isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
var testElement = document.createElement( 'div' );
|
fix viewport overflow in iPadOS safari
|
hakimel_reveal.js
|
train
|
js
|
cc7c7b332123b10eba471a4a7de49c5e5e999afb
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -220,7 +220,7 @@ var CONFIG = {
},
dart: {
src: ['LICENSE'],
- exclude: ['rtts_assert/'],
+ exclude: ['rtts_assert'],
pipes: {}
}
},
|
fix(build): Don't include rtts in the dart build.
The module name actually does not include a trailing slash, so the
folder would show up and be included in the dart pubbuild.
|
angular_angular
|
train
|
js
|
3d770a6ca81f3f45ae87c93789bf428a35872f25
|
diff --git a/jaeger_client/config.py b/jaeger_client/config.py
index <HASH>..<HASH> 100644
--- a/jaeger_client/config.py
+++ b/jaeger_client/config.py
@@ -116,6 +116,7 @@ class Config(object):
'tags',
'enabled',
'reporter_batch_size',
+ 'reporter_queue_size',
'propagation',
'max_tag_value_length',
'reporter_flush_interval',
diff --git a/tests/test_config.py b/tests/test_config.py
index <HASH>..<HASH> 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -131,6 +131,10 @@ class ConfigTests(unittest.TestCase):
with self.assertRaises(Exception):
_ = Config({"unexpected":"value"}, validate=True)
+ def test_reporter_queue_size_valid(self):
+ config = Config({"reporter_queue_size": 100}, service_name='x', validate=True)
+ assert config.reporter_queue_size == 100
+
def test_missing_service_name(self):
with self.assertRaises(ValueError):
_ = Config({})
|
Mark reporter_queue_size Config option as valid (#<I>)
If you add reporter_queue_size as an option in a jaeger_client.Config,
it currently raises an error, even if it's a valid option if
validate=True.
|
jaegertracing_jaeger-client-python
|
train
|
py,py
|
9efd3755471fa02669cd2a2adaa59da25c8af3b0
|
diff --git a/symbols/argument.py b/symbols/argument.py
index <HASH>..<HASH> 100644
--- a/symbols/argument.py
+++ b/symbols/argument.py
@@ -25,7 +25,7 @@ class SymbolARGUMENT(Symbol):
'''
Symbol.__init__(self, value)
self.lineno = lineno
- self.set_byref(byref if byref is not None else OPTIONS.byref.value, lineno)
+ self.byref = byref if byref is not None else OPTIONS.byref.value
@property
def value(self):
@@ -45,17 +45,17 @@ class SymbolARGUMENT(Symbol):
@property
def byref(self):
- if isinstance(self.value, SymbolVAR):
- return self.value.byref
- return False # By Value if not a Variable
+ return self._byref
- def set_byref(self, value, lineno):
- if isinstance(self.value, SymbolVAR):
- self.value.byref = value
- else:
- if value:
- # Argument can't be passed by ref because it's not an lvalue (an identifier)
- raise AttributeError
+ @byref.setter
+ def byref(self, value):
+ if value:
+ assert isinstance(self.value, SymbolVAR)
+ self._byref = value
+
+ @property
+ def mangled(self):
+ return self.value.mangled
@property
def size(self):
|
Argument MUST have it?s own byref attribute, and also
it?s setter must check it?s not an rvalue.
|
boriel_zxbasic
|
train
|
py
|
41cdcf50e20c01220a3649b335992c61abce9dc3
|
diff --git a/OpenPNM/Network/tools.py b/OpenPNM/Network/tools.py
index <HASH>..<HASH> 100644
--- a/OpenPNM/Network/tools.py
+++ b/OpenPNM/Network/tools.py
@@ -794,6 +794,9 @@ def find_surface_pores(network, markers=None, label='surface'):
This function does not check whether the given markers actually lie outside
the domain, allowing the labeling of *internal* sufaces.
+ If this method fails to mark some surface pores, consider sending more
+ markers on each face.
+
Examples
--------
>>> import OpenPNM as op
|
Added more explanation to find_surface_pores to help when not all pores are identified
|
PMEAL_OpenPNM
|
train
|
py
|
84367083b084f4770666f3f456a81434547e177e
|
diff --git a/spec/pins_v3_spec.rb b/spec/pins_v3_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/pins_v3_spec.rb
+++ b/spec/pins_v3_spec.rb
@@ -791,6 +791,8 @@ describe "Origen Pin API v3" do
$dut.package = :p2
$dut.other_pins(:other).size.should == 3
$dut.other_pin_groups.size.should == 1
+ $dut.has_other_pin?(:other1).should == true
+ $dut.has_other_pin?(:other5).should == false
end
end
|
Ready to push and get a pull request set.
|
Origen-SDK_origen
|
train
|
rb
|
7e021a12d4233002e89e2611eff4ef35b81033ad
|
diff --git a/lib/smart_proxy_dynflow/version.rb b/lib/smart_proxy_dynflow/version.rb
index <HASH>..<HASH> 100644
--- a/lib/smart_proxy_dynflow/version.rb
+++ b/lib/smart_proxy_dynflow/version.rb
@@ -1,5 +1,5 @@
module Proxy
class Dynflow
- VERSION = '0.1.6'
+ VERSION = '0.1.7'
end
end
|
Update smart_proxy_dynflow to <I>
|
theforeman_smart_proxy_dynflow
|
train
|
rb
|
ad7106dfc4c7affd5e64369c4ec266b51ceae224
|
diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go
index <HASH>..<HASH> 100644
--- a/eth/catalyst/api.go
+++ b/eth/catalyst/api.go
@@ -417,7 +417,17 @@ func (api *ConsensusAPI) delayPayloadImport(block *types.Block) (beacon.PayloadS
// payload as non-integratable on top of the existing sync. We'll just
// have to rely on the beacon client to forcefully update the head with
// a forkchoice update request.
- log.Warn("Ignoring payload with missing parent", "number", block.NumberU64(), "hash", block.Hash(), "parent", block.ParentHash())
+ if api.eth.SyncMode() == downloader.FullSync {
+ // In full sync mode, failure to import a well-formed block can only mean
+ // that the parent state is missing and the syncer rejected extending the
+ // current cycle with the new payload.
+ log.Warn("Ignoring payload with missing parent", "number", block.NumberU64(), "hash", block.Hash(), "parent", block.ParentHash())
+ } else {
+ // In non-full sync mode (i.e. snap sync) all payloads are rejected until
+ // snap sync terminates as snap sync relies on direct database injections
+ // and cannot afford concurrent out-if-band modifications via imports.
+ log.Warn("Ignoring payload while snap syncing", "number", block.NumberU64(), "hash", block.Hash())
+ }
return beacon.PayloadStatusV1{Status: beacon.ACCEPTED}, nil
}
|
eth/catalyst: fix NewPayload warn log when dropping due to snap sync
|
ethereum_go-ethereum
|
train
|
go
|
138c5561ca1a7ecb077b4821890e54010598fbe7
|
diff --git a/tests/ssh_tests.py b/tests/ssh_tests.py
index <HASH>..<HASH> 100644
--- a/tests/ssh_tests.py
+++ b/tests/ssh_tests.py
@@ -1,4 +1,4 @@
-from nose.tools import istest, assert_raises, assert_in
+from nose.tools import istest, assert_raises
import spur
import spur.ssh
@@ -43,7 +43,7 @@ def connection_error_contains_traceback_for_original_error():
# Expected error
assert False
except spur.ssh.ConnectionError as error:
- assert_in("Traceback (most recent call last):", error.original_traceback)
+ assert "Traceback (most recent call last):" in error.original_traceback
@istest
|
Remove usage of assert_in for py<I> compatibility
|
mwilliamson_spur.py
|
train
|
py
|
ba7b1ca565c8a59a54bddf7a89881bac2256cff1
|
diff --git a/lib/navigationlib.php b/lib/navigationlib.php
index <HASH>..<HASH> 100644
--- a/lib/navigationlib.php
+++ b/lib/navigationlib.php
@@ -672,6 +672,20 @@ class navigation_node implements renderable {
$this->parent->make_inactive();
}
}
+
+ /**
+ * Hides the node and any children it has.
+ *
+ * @since 2.5
+ */
+ public function hide() {
+ $this->display = false;
+ if ($this->has_children()) {
+ foreach ($this->children as $child) {
+ $child->hide();
+ }
+ }
+ }
}
/**
@@ -2492,18 +2506,18 @@ class global_navigation extends navigation_node {
public function set_expansion_limit($type) {
global $SITE;
$nodes = $this->find_all_of_type($type);
- foreach ($nodes as &$node) {
+ foreach ($nodes as $node) {
// We need to generate the full site node
if ($type == self::TYPE_COURSE && $node->key == $SITE->id) {
continue;
}
- foreach ($node->children as &$child) {
+ foreach ($node->children as $child) {
// We still want to show course reports and participants containers
// or there will be navigation missing.
if ($type == self::TYPE_COURSE && $child->type === self::TYPE_CONTAINER) {
continue;
}
- $child->display = false;
+ $child->hide();
}
}
return true;
|
MDL-<I> navigation: fixed expansion limit issue hiding nodes
|
moodle_moodle
|
train
|
php
|
c35eec1cadd58f39bf0e1f48c107a23a44d0feee
|
diff --git a/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php b/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php
+++ b/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php
@@ -62,7 +62,7 @@ class ObjectManagerPersister implements PersisterInterface
// Check if the ID is explicitly set by the user. To avoid the ID to be overridden by the ID generator
// registered, we disable it for that specific object.
if ($metadata instanceof ORMClassMetadataInfo) {
- if ($metadata->usesIdGenerator() && false === empty($metadata->getIdentifierValues($object))) {
+ if ($metadata->usesIdGenerator() && 0 !== count($metadata->getIdentifierValues($object)) && !$metadata->idGenerator instanceof IdGenerator) {
$metadata = $this->configureIdGenerator($metadata);
}
} else if ($metadata instanceof ODMClassMetadataInfo) {
|
Prevent IdGenerator from decorating itself (#<I>)
|
theofidry_AliceDataFixtures
|
train
|
php
|
a0cbcf0e4f1e80c1fadf28bb2000c780c8c5dca1
|
diff --git a/aikif/bias.py b/aikif/bias.py
index <HASH>..<HASH> 100644
--- a/aikif/bias.py
+++ b/aikif/bias.py
@@ -57,7 +57,7 @@ class Bias(object):
get_bias_rating() = returns the bias rating 0=bullshit -> 1=fact
"""
- #@debug
+ @debug
def __init__(self, metadata):
"""
passes all data on command line leave as empty string for blank
|
bias.py includes debug decorator to track issues
|
acutesoftware_AIKIF
|
train
|
py
|
a54d8a8f90c2fdeecedac73ded4b75cb320f0316
|
diff --git a/js/jquery.iframe-transport.js b/js/jquery.iframe-transport.js
index <HASH>..<HASH> 100644
--- a/js/jquery.iframe-transport.js
+++ b/js/jquery.iframe-transport.js
@@ -1,5 +1,5 @@
/*
- * jQuery Iframe Transport Plugin 1.8.1
+ * jQuery Iframe Transport Plugin 1.8.2
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
@@ -142,6 +142,8 @@
.prop('enctype', 'multipart/form-data')
// enctype must be set as encoding for IE:
.prop('encoding', 'multipart/form-data');
+ // Remove the HTML5 form attribute from the input(s):
+ options.fileInput.removeAttr('form');
}
form.submit();
// Insert the file input fields at their original location
@@ -149,7 +151,10 @@
if (fileInputClones && fileInputClones.length) {
options.fileInput.each(function (index, input) {
var clone = $(fileInputClones[index]);
- $(input).prop('name', clone.prop('name'));
+ // Restore the original name and form properties:
+ $(input)
+ .prop('name', clone.prop('name'))
+ .attr('form', clone.attr('form'));
clone.replaceWith(input);
});
}
|
Handle file inputs with form attribute. Fixes #<I>
Thanks @denper for the bug report and fix suggestion.
|
blueimp_jQuery-File-Upload
|
train
|
js
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.