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 |
|---|---|---|---|---|---|
7842a8fff65528cb8b845586418a56258f94a9c4 | diff --git a/Dispatcher.php b/Dispatcher.php
index <HASH>..<HASH> 100644
--- a/Dispatcher.php
+++ b/Dispatcher.php
@@ -40,9 +40,12 @@ abstract class QM_Dispatcher {
public function output( QM_Collector $collector ) {
$filter = 'query_monitor_output_' . $this->id . '_' . $collector->id;
-
$output = apply_filters( $filter, null, $collector );
+ if ( false === $output ) {
+ return;
+ }
+
if ( !is_a( $output, 'QM_Output' ) ) {
$output = $this->get_outputter( $collector );
} | A dispatcher can return boolean `false` for a particular collector in order to not output it | johnbillion_query-monitor | train | php |
be4c88692ea48595ba1317c2517431b891b0b1f0 | diff --git a/erizo_controller/erizoController/roomController.js b/erizo_controller/erizoController/roomController.js
index <HASH>..<HASH> 100644
--- a/erizo_controller/erizoController/roomController.js
+++ b/erizo_controller/erizoController/roomController.js
@@ -23,14 +23,14 @@ exports.RoomController = function (spec) {
var amqper = spec.amqper;
- var KEELALIVE_INTERVAL = 5*1000;
+ var KEEPALIVE_INTERVAL = 5*1000;
var eventListeners = [];
var callbackFor = function(erizo_id, publisher_id) {
return function(ok) {
if (ok !== true) {
- dispatchEvent("unpublish", erizo_id);
+ dispatchEvent("unpublish", publisher_id);
amqper.callRpc("ErizoAgent", "deleteErizoJS", [erizo_id], {callback: function(){
delete erizos[publisher_id];
}});
@@ -45,7 +45,7 @@ exports.RoomController = function (spec) {
}
};
- var keepAliveLoop = setInterval(sendKeepAlive, KEELALIVE_INTERVAL);
+ var keepAliveLoop = setInterval(sendKeepAlive, KEEPALIVE_INTERVAL);
var createErizoJS = function(publisher_id, callback) {
amqper.callRpc("ErizoAgent", "createErizoJS", [publisher_id], {callback: function(erizo_id) { | Corrected keepalive variable name | lynckia_licode | train | js |
cc519adcfca5cdf447e482aec705b81694d62bdd | diff --git a/public/app/features/dashboard/shareSnapshotCtrl.js b/public/app/features/dashboard/shareSnapshotCtrl.js
index <HASH>..<HASH> 100644
--- a/public/app/features/dashboard/shareSnapshotCtrl.js
+++ b/public/app/features/dashboard/shareSnapshotCtrl.js
@@ -41,10 +41,13 @@ function (angular, _) {
$scope.createSnapshot = function(external) {
$scope.dashboard.snapshot = {
- timestamp: new Date(),
- originalUrl: $location.absUrl()
+ timestamp: new Date()
};
+ if (!external) {
+ $scope.dashboard.snapshot.originalUrl = $location.absUrl();
+ }
+
$scope.loading = true;
$scope.snapshot.external = external; | (snapshot) restrict saving original url for local snapshot | grafana_grafana | train | js |
5067d5232f5358456d4b8f17902d338174869a60 | diff --git a/lib/proxy.js b/lib/proxy.js
index <HASH>..<HASH> 100644
--- a/lib/proxy.js
+++ b/lib/proxy.js
@@ -69,7 +69,7 @@ module.exports.createProxy = function (host, ports, options, reqCallback) {
}
// Alter accept-encoding header to ensure plain-text response
- req.headers['accept-encoding'] = '*;q=1,gzip=0';
+ req.headers["accept-encoding"] = "*;q=1,gzip=0";
var tags = messages.scriptTags(host, ports[0], ports[1]); | Add gzip support for proxy + spec | BrowserSync_browser-sync | train | js |
cfb58f6cdc129976b2dc2d218ad025fcac7d1ed8 | diff --git a/tests/test_mongoalchemy_object.py b/tests/test_mongoalchemy_object.py
index <HASH>..<HASH> 100644
--- a/tests/test_mongoalchemy_object.py
+++ b/tests/test_mongoalchemy_object.py
@@ -95,6 +95,10 @@ class MongoAlchemyObjectTestCase(BaseTestCase):
def should_be_able_to_create_two_decoupled_mongoalchemy_instances(self):
app = Flask('new_test')
+ app.config['MONGOALCHEMY_DATABASE'] = 'my_database'
+ db1 = MongoAlchemy(app)
+ db2 = MongoAlchemy(app)
+ assert db1.Document is not db2.Document, "two document should be totally different"
def teardown(self):
del(self.app) | Added test reproducing issue #<I> | cobrateam_flask-mongoalchemy | train | py |
52241159703b6a4aa272da8eb44a8ea818d5ace8 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -24,7 +24,7 @@
var long_months = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December']
- var short_months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Nov', 'Dec']
+ var short_months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
var tokens = {
d: function (date) { | whoops! short_months doesn't have october!
unit tests ftw | nkcmr_phpdate | train | js |
a8043d1abc5747d880daf16f60c61b67cc32c154 | diff --git a/profiling/stats.py b/profiling/stats.py
index <HASH>..<HASH> 100644
--- a/profiling/stats.py
+++ b/profiling/stats.py
@@ -308,7 +308,6 @@ class RecordingStatistics(RecordingStatistic, Statistics):
self.wall_time = max(0, self.wall() - self._wall_time_started)
except AttributeError:
raise RuntimeError('Starting does not recorded.')
- self.own_count = 1
del self._cpu_time_started
del self._wall_time_started | RecordingStatistics doesn't increase own_count | what-studio_profiling | train | py |
97459947163a631e5aa1dd3635d3adc7e2fadde2 | diff --git a/menuconfig.py b/menuconfig.py
index <HASH>..<HASH> 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -1610,8 +1610,8 @@ def _update_menu():
# changed. Changing a value might change which items in the menu are
# visible.
#
- # Tries to preserve the location of the cursor when items disappear above
- # it.
+ # If possible, preserves the location of the cursor on the screen when
+ # items are added/removed above the selected item.
global _shown
global _sel_node_i | menuconfig: Make comment re. preserving cursor position more accurate
Items being added above the selected item would mess with the cursor
position too, if we didn't compensate. | ulfalizer_Kconfiglib | train | py |
7db14bb824a47816e0c14e8d6f747fed0b1af140 | diff --git a/lib/connection.js b/lib/connection.js
index <HASH>..<HASH> 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -63,8 +63,8 @@ Connection.prototype.open = function (callback) {
this.netClient.connect(this.options.port, this.options.host, function() {
self.removeListener('error', errorConnecting);
function startupCallback() {
- if (self.options.keySpace) {
- self.execute('USE ' + self.options.keySpace + ';', null, connectionReadyCallback);
+ if (self.options.keyspace) {
+ self.execute('USE ' + self.options.keyspace + ';', null, connectionReadyCallback);
}
else {
connectionReadyCallback(); | Changed from keyspace to all lower case to fix #3 | datastax_nodejs-driver | train | js |
c3e0fb27eda5e1e3b3d8dd10c0da23981c2a0985 | diff --git a/keyboard/_nixkeyboard.py b/keyboard/_nixkeyboard.py
index <HASH>..<HASH> 100644
--- a/keyboard/_nixkeyboard.py
+++ b/keyboard/_nixkeyboard.py
@@ -64,6 +64,7 @@ def build_tables():
to_name[(scan_code, modifiers)] = name
if is_keypad:
keypad_scan_codes.add(scan_code)
+ from_name['keypad ' + name] = (scan_code, ())
if name not in from_name or len(modifiers) < len(from_name[name][1]):
from_name[name] = (scan_code, modifiers)
@@ -136,12 +137,16 @@ def write_event(scan_code, is_down):
build_device()
device.write_event(EV_KEY, scan_code, int(is_down))
-def map_char(character):
+def map_char(name):
build_tables()
- try:
- return from_name[character]
- except KeyError:
- raise ValueError('Character {} is not mapped to any known key.'.format(repr(character)))
+ if name in from_name:
+ return from_name[name]
+
+ parts = name.split(' ', 1)
+ if (name.startswith('left ') or name.startswith('right ')) and parts[1] in from_name:
+ return from_name[parts[1]]
+ else:
+ raise ValueError('Name {} is not mapped to any known key.'.format(repr(name)))
def press(scan_code):
write_event(scan_code, True) | Allow sending of keypad events on nix | boppreh_keyboard | train | py |
8a556df77076390ccec003a0d51cc5ed1792fd73 | diff --git a/detect.go b/detect.go
index <HASH>..<HASH> 100644
--- a/detect.go
+++ b/detect.go
@@ -10,23 +10,26 @@ import (
)
// The Host type represents all the supported host types.
-type Host int
+type Host string
const (
// HostNull reprents a null host.
- HostNull Host = iota
+ HostNull Host = ""
// HostRPi represents the RaspberryPi.
- HostRPi
+ HostRPi = "Raspberry Pi"
// HostBBB represents the BeagleBone Black.
- HostBBB
+ HostBBB = "BeagleBone Black"
+
+ // HostGalileo represents the Intel Galileo board.
+ HostGalileo = "Intel Galileo"
// HostCubieTruck represents the Cubie Truck.
- HostCubieTruck
+ HostCubieTruck = "CubieTruck"
- // HostGalileo represents the Intel Galileo board.
- HostGalileo
+ // HostRadxa represents the Cubie Truck.
+ HostRadxa = "Radxa"
)
func execOutput(name string, arg ...string) (output string, err error) { | Host type is now a string | kidoman_embd | train | go |
3bbe6420e87a61e32fca28a0ba4cd9a3c1ed0a9e | diff --git a/flask_appbuilder/api/__init__.py b/flask_appbuilder/api/__init__.py
index <HASH>..<HASH> 100644
--- a/flask_appbuilder/api/__init__.py
+++ b/flask_appbuilder/api/__init__.py
@@ -517,7 +517,7 @@ class BaseApi(object):
"""
Sets initialized inner views
"""
- pass
+ pass # pragma: no cover
def get_method_permission(self, method_name: str) -> str:
"""
@@ -531,7 +531,7 @@ class BaseApi(object):
def set_response_key_mappings(self, response, func, rison_args, **kwargs):
if not hasattr(func, "_response_key_func_mappings"):
- return
+ return # pragma: no cover
_keys = rison_args.get("keys", None)
if not _keys:
for k, v in func._response_key_func_mappings.items():
@@ -1044,7 +1044,7 @@ class ModelRestApi(BaseModelApi):
elif kwargs.get("caller") == "show":
columns = self.show_columns
else:
- columns = self.label_columns
+ columns = self.label_columns # pragma: no cover
response[API_LABEL_COLUMNS_RES_KEY] = self._label_columns_json(columns)
def merge_list_label_columns(self, response, **kwargs): | [api] Exempt code coverage from unreachable code | dpgaspar_Flask-AppBuilder | train | py |
bcca4602de0bd949c1bcb7648681fd14b47046cc | diff --git a/src/sortable.js b/src/sortable.js
index <HASH>..<HASH> 100644
--- a/src/sortable.js
+++ b/src/sortable.js
@@ -5,8 +5,8 @@
*/
angular.module('ui.sortable', [])
.value('uiSortableConfig',{})
- .directive('uiSortable', [ 'uiSortableConfig',
- function(uiSortableConfig) {
+ .directive('uiSortable', [ 'uiSortableConfig', '$log',
+ function(uiSortableConfig, log) {
return {
require: '?ngModel',
link: function(scope, element, attrs, ngModel) {
@@ -85,9 +85,6 @@ angular.module('ui.sortable', [])
}
};
- }
-
-
scope.$watch(attrs.uiSortable, function(newVal, oldVal){
angular.forEach(newVal, function(value, key){
@@ -113,8 +110,11 @@ angular.module('ui.sortable', [])
// call apply after stop
opts.stop = combineCallbacks( opts.stop, apply );
- // Create sortable
+ } else {
+ log.info('ui.sortable: ngModel not provided!', element);
+ }
+ // Create sortable
element.sortable(opts);
}
}; | Moved inside 'if (ngModel){}' any code that calls combineCallbacks and added $log.info() message in case ngModel is falsy.
Possibly closes #<I> and #<I>. | angular-ui_ui-sortable | train | js |
fff22348235e4891de770af6d9e116dece802b6f | diff --git a/discord/abc.py b/discord/abc.py
index <HASH>..<HASH> 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -755,7 +755,7 @@ class GuildChannel:
Returns a list of all active instant invites from this channel.
- You must have :attr:`~Permissions.manage_guild` to get this information.
+ You must have :attr:`~Permissions.manage_channels` to get this information.
Raises
------- | Fix wrong documented permission for GuildChannel.invites()
I tested it just now, and manage_guild is not the permission you need to
fetch invites from a given channel. You need manage_channels.
Note that this isn't the same as Guild.invites(), which DOES use
manage_guild. | Rapptz_discord.py | train | py |
f6f84db25392d823c0ca4b6c3fcc34d5936f63b3 | diff --git a/pandas/io/tests/test_data.py b/pandas/io/tests/test_data.py
index <HASH>..<HASH> 100644
--- a/pandas/io/tests/test_data.py
+++ b/pandas/io/tests/test_data.py
@@ -445,7 +445,10 @@ class TestFred(tm.TestCase):
end = datetime(2013, 1, 27)
received = web.DataReader("GDP", "fred", start, end)['GDP'].tail(1)[0]
- self.assertEqual(int(received), 16535)
+
+ # < 7/30/14 16535 was returned
+ #self.assertEqual(int(received), 16535)
+ self.assertEqual(int(received), 16502)
self.assertRaises(Exception, web.DataReader, "NON EXISTENT SERIES",
'fred', start, end) | NETWORK: change failing FRED test | pandas-dev_pandas | train | py |
d316649247aa82dccfa4a601fb61a9ae6b9d5021 | diff --git a/src/Components.php b/src/Components.php
index <HASH>..<HASH> 100644
--- a/src/Components.php
+++ b/src/Components.php
@@ -219,6 +219,13 @@ final class Components
// --------------------------------------------------------------------------
+ /**
+ * Returns an instance of the app as a component
+ *
+ * @param bool $bUseCache Whether to use the cache or not
+ *
+ * @return Component
+ */
public static function getApp($bUseCache = true)
{
// If we have already fetched this data then don't get it again | chore: Added docbloc | nails_common | train | php |
5ed5dffd48f2b40c67af63564b2cf6749038c02c | diff --git a/src/MailhogClient.php b/src/MailhogClient.php
index <HASH>..<HASH> 100644
--- a/src/MailhogClient.php
+++ b/src/MailhogClient.php
@@ -30,7 +30,7 @@ class MailhogClient
{
$this->httpClient = $client;
$this->requestFactory = $requestFactory;
- $this->baseUri = $baseUri;
+ $this->baseUri = rtrim($baseUri, '/');
}
/** | Remove trailing slashes from base URL
In order to prevent double slashes in URL causing Mailhog to send
redirect responses breaking everything. | rpkamp_mailhog-client | train | php |
573dc6bd6b5c7c3c9ee08555b2226cca5e91978b | diff --git a/js/btcmarkets.js b/js/btcmarkets.js
index <HASH>..<HASH> 100644
--- a/js/btcmarkets.js
+++ b/js/btcmarkets.js
@@ -695,7 +695,7 @@ module.exports = class btcmarkets extends Exchange {
const status = this.parseOrderStatus (this.safeString (order, 'status'));
let cost = undefined;
if (price !== undefined) {
- if (amount !== undefined) {
+ if (filled !== undefined) {
cost = price * filled;
}
} | [btcmarkets] build cost calc | ccxt_ccxt | train | js |
6950a788c01da31cbd9e7236992afe80e2c7083f | diff --git a/src/Algebra.php b/src/Algebra.php
index <HASH>..<HASH> 100644
--- a/src/Algebra.php
+++ b/src/Algebra.php
@@ -332,11 +332,9 @@ class Algebra
return [$z₁, $z₂, $z₃];
}
- // One root is real, and two are are complex conjugates
- if ($D > 0) {
- $z₁ = $S + $T - $a₂ / 3;
+ // D > 0: One root is real, and two are are complex conjugates
+ $z₁ = $S + $T - $a₂ / 3;
- return [$z₁, \NAN, \NAN];
- }
+ return [$z₁, \NAN, \NAN];
}
} | Minor change to flow of cubic equation. | markrogoyski_math-php | train | php |
606cca28990e1df737d16d0e44c0a3789246cbae | diff --git a/src/Options/class-options-manager.php b/src/Options/class-options-manager.php
index <HASH>..<HASH> 100644
--- a/src/Options/class-options-manager.php
+++ b/src/Options/class-options-manager.php
@@ -231,7 +231,7 @@ class Options_Manager {
public function should_nag() {
// Option is stored as yes/no.
return filter_var(
- $this->store->get( 'should_nag' ),
+ $this->store->get( 'should_nag', true ),
FILTER_VALIDATE_BOOLEAN
);
} | Ensure default should nag value is set | ssnepenthe_soter | train | php |
6e76639992ae28f7e0fd1b94f43fb59a53060616 | diff --git a/spyder/widgets/explorer.py b/spyder/widgets/explorer.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/explorer.py
+++ b/spyder/widgets/explorer.py
@@ -437,9 +437,6 @@ class DirView(QTreeView):
actions.append(None)
if fnames and all([osp.isdir(_fn) for _fn in fnames]):
actions += self.create_folder_manage_actions(fnames)
- if actions:
- actions.append(None)
- actions += self.common_actions
return actions
def update_menu(self): | Remove global options from context menu
Remove the following items from the file explorer context menu:
* Edit filename filters...
* Show all files
* Show icons and text | spyder-ide_spyder | train | py |
782c293f587a5e11cea19224d58cdfb453a605a6 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -178,10 +178,10 @@ class NoisePeer extends stream.Duplex {
}
_destroy (err, callback) {
- this._handshake.destroy()
+ if (this._handshake.finished === false) this._handshake.destroy()
if (this._transport) {
- // if (this._transport.tx) this._transport.tx.destroy()
- // if (this._transport.rx) this._transport.rx.destroy()
+ if (this._transport.tx) this._transport.tx.destroy()
+ if (this._transport.rx) this._transport.rx.destroy()
}
callback(err)
} | Only destroy handshake if not finished | emilbayes_noise-peer | train | js |
0d7b2fdfb7b9e2c37fe7ede1ababab8f4dd4c442 | diff --git a/src/observatoryControl/gpsFix.py b/src/observatoryControl/gpsFix.py
index <HASH>..<HASH> 100755
--- a/src/observatoryControl/gpsFix.py
+++ b/src/observatoryControl/gpsFix.py
@@ -69,8 +69,8 @@ def fetchGPSfix():
'longitude': gpsp.longitude,
'altitude': gpsp.altitude
}
- if (time.time() > tstart + 30):
- return False # Give up after 30 seconds
+ if (time.time() > tstart + 90):
+ return False # Give up after 90 seconds
time.sleep(2) | Increased time out when waiting for GPS fix to <I> secs | camsci_meteor-pi | train | py |
6f161a7c77fe4dc123d7d99dbbf12713cba66f5d | diff --git a/salt/states/service.py b/salt/states/service.py
index <HASH>..<HASH> 100644
--- a/salt/states/service.py
+++ b/salt/states/service.py
@@ -404,7 +404,13 @@ def enabled(name, **kwargs):
name
The name of the init or rc script used to manage the service
'''
- return _enable(name, None, **kwargs)
+ ret = {'name': name,
+ 'changes': {},
+ 'result': True,
+ 'comment': ''}
+
+ ret.update(_enable(name, None, **kwargs))
+ return ret
def disabled(name, **kwargs):
@@ -417,7 +423,13 @@ def disabled(name, **kwargs):
name
The name of the init or rc script used to manage the service
'''
- return _disable(name, None, **kwargs)
+ ret = {'name': name,
+ 'changes': {},
+ 'result': True,
+ 'comment': ''}
+
+ ret.update(_disable(name, None, **kwargs))
+ return ret
def mod_watch(name, sfun=None, sig=None, reload=False, full_restart=False): | Re-add stateful return for service.enabled and service.disabled
Modifies `service.enabled` and `service.disabled` so they work properly
with the changes to the return value of `_enable()` and `_disable()`. | saltstack_salt | train | py |
9588d3f87285dd93e9bfb0b949d0b2d5e1b75bf1 | diff --git a/app/assets/javascripts/peoplefinder/wordlimit.js b/app/assets/javascripts/peoplefinder/wordlimit.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/peoplefinder/wordlimit.js
+++ b/app/assets/javascripts/peoplefinder/wordlimit.js
@@ -1,3 +1,4 @@
+/* global jQuery */
jQuery(function ($){
'use strict';
@@ -7,10 +8,10 @@ jQuery(function ($){
var $textarea = $(o);
var limit = $textarea.data('limit');
var $counterBox = $(
- '<p class="textarea-word-count form-hint">'
- + 'Maximum ' + limit + ' characters, including spaces. '
- + '<span class="chars-remaining">(' + limit + ' remaining)</span>'
- + '<p/>'
+ '<p class="textarea-word-count form-hint">' +
+ 'Maximum ' + limit + ' characters, including spaces. ' +
+ '<span class="chars-remaining">(' + limit + ' remaining)</span>' +
+ '<p/>'
);
var $counter = $counterBox.find('.chars-remaining');
@@ -20,7 +21,7 @@ jQuery(function ($){
var charsLeft = limit - $textarea.val().length;
if( charsLeft > 0 ){
- $counterBox.removeClass('error')
+ $counterBox.removeClass('error');
$counter.html( '(' + charsLeft + ' remaining)');
}else {
$counterBox.addClass('error'); | Conform to jshint settings | ministryofjustice_peoplefinder | train | js |
c531a3cc1e12118fb158366d9514e99573320440 | diff --git a/installer/install.js b/installer/install.js
index <HASH>..<HASH> 100644
--- a/installer/install.js
+++ b/installer/install.js
@@ -12,6 +12,10 @@ const platform = mapPlatform(process.env.NW_PLATFORM || process.platform);
const arch = mapArch(process.env.NW_ARCH || process.arch);
download(version, platform, arch)
+ .then(fixFilePermissions)
+ .then(function(path) {
+ console.log("Chromedriver binary available at '" + path + "'");
+ })
.catch(function(err) {
if (err.statusCode === 404) {
console.error("Chromedriver '" + version + ":" + platform + ":" + arch + "' doesn't exist")
@@ -63,3 +67,19 @@ function readVersion() {
return pkg.version;
}
+
+// borrowed from node-chromedriver
+function fixFilePermissions(path) {
+ // Check that the binary is user-executable
+ if (platform !== "win") {
+ const stat = fs.statSync(path);
+
+ // 64 == 0100 (no octal literal in strict mode)
+ if (!(stat.mode & 64)) { // eslint-disable-line no-bitwise
+ console.log("Making Chromedriver executable");
+ fs.chmodSync(path, "755");
+ }
+ }
+
+ return path;
+} | Update to fix file permissions on driver. | fleg_nw-chromedriver | train | js |
eadfdbdbde3d4d8363b69196bbe4dded956982c3 | diff --git a/docs/examples/models_recursive.py b/docs/examples/models_recursive.py
index <HASH>..<HASH> 100644
--- a/docs/examples/models_recursive.py
+++ b/docs/examples/models_recursive.py
@@ -1,10 +1,10 @@
-from typing import List
+from typing import List, Optional
from pydantic import BaseModel
class Foo(BaseModel):
count: int
- size: float = None
+ size: Optional[float] = None
class Bar(BaseModel): | Fix mypy error in models_recursive.py example. (#<I>) | samuelcolvin_pydantic | train | py |
4f6c61e67eb0b5db0d344efbb026eb759054c2bc | diff --git a/lib/discordrb/api.rb b/lib/discordrb/api.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/api.rb
+++ b/lib/discordrb/api.rb
@@ -180,6 +180,16 @@ module Discordrb::API
)
end
+ # Get a server's channels list
+ def channels(token, server_id)
+ request(
+ __method__,
+ :get,
+ "#{api_base}/guilds/#{server_id}/channels",
+ Authorization: token
+ )
+ end
+
# Login to the server
def login(email, password)
request( | Add support for server's channel endpoint
This change adds support for the channels endpoint for a server. The authorization token and server_id need to be supplied for this method. | meew0_discordrb | train | rb |
2d194de6d0267e3312407506723fdf033f31a2d2 | diff --git a/PHPCI/Plugin/Email.php b/PHPCI/Plugin/Email.php
index <HASH>..<HASH> 100644
--- a/PHPCI/Plugin/Email.php
+++ b/PHPCI/Plugin/Email.php
@@ -108,7 +108,7 @@ class Email implements \PHPCI\Plugin
if (is_array($ccList) && count($ccList)) {
foreach ($ccList as $address) {
- $message->addCc($address, $address);
+ $email->addCc($address, $address);
}
} | Fixed code in CC mails. | dancryer_PHPCI | train | php |
c93e1e21774be13a5c6585a42acef65db6892dd4 | diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/graph/traversal/step/map/MaxGlobalStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/graph/traversal/step/map/MaxGlobalStep.java
index <HASH>..<HASH> 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/graph/traversal/step/map/MaxGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/graph/traversal/step/map/MaxGlobalStep.java
@@ -37,7 +37,7 @@ public final class MaxGlobalStep<S extends Number> extends ReducingBarrierStep<S
public MaxGlobalStep(final Traversal.Admin traversal) {
super(traversal);
- this.setSeedSupplier(new ConstantSupplier<>((S) Double.valueOf(Double.MIN_VALUE)));
+ this.setSeedSupplier(new ConstantSupplier<>((S) Double.valueOf(-Double.MAX_VALUE)));
this.setBiFunction(MaxBiFunction.<S>instance());
} | replaced Double.MIN_VALUE with -Double.MAX_VALUE | apache_tinkerpop | train | java |
d77ba7469951bd06dc96f2d1591ff4a6027c0b7a | diff --git a/spec/dummy/config/routes.rb b/spec/dummy/config/routes.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/config/routes.rb
+++ b/spec/dummy/config/routes.rb
@@ -1,5 +1,5 @@
Rails.application.routes.draw do
+ mount NoCms::Admin::Pages::Engine => "/admin"
mount NoCms::Pages::Engine => "/"
- mount NoCms::Admin::Pages::Engine => "/admin/pages"
end | Solved a routing misconception
Mounting admin#pages in admin/pages would duplicate pages in the path | simplelogica_nocms-admin-pages | train | rb |
d97f6cd0d8f02f345d2e3f30c75c1d684d1616d7 | diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go
index <HASH>..<HASH> 100644
--- a/cmd/integration/integration.go
+++ b/cmd/integration/integration.go
@@ -19,7 +19,6 @@ limitations under the License.
package main
import (
- "encoding/json"
"io/ioutil"
"net"
"net/http"
@@ -238,7 +237,7 @@ func runReplicationControllerTest(c *client.Client) {
glog.Fatalf("Unexpected error: %#v", err)
}
var controller api.ReplicationController
- if err := json.Unmarshal(data, &controller); err != nil {
+ if err := api.Scheme.DecodeInto(data, &controller); err != nil {
glog.Fatalf("Unexpected error: %#v", err)
} | Integration test was not decoding using api.Scheme | kubernetes_kubernetes | train | go |
7cd247453f5ef8b628ef75796d2dac74221d81c8 | diff --git a/tests/test_tree.py b/tests/test_tree.py
index <HASH>..<HASH> 100644
--- a/tests/test_tree.py
+++ b/tests/test_tree.py
@@ -175,8 +175,11 @@ class BGTreeTestCase(unittest.TestCase):
def test_get_tree_consistent_multicolors_unrooted_no_wgd_correct(self):
# if `rooted` argument is set to `False`, then regardless of `tree.root` value outcome shall be the same
tree = NewickReader.from_string(data_string="(((v1, v2), v3),(v4, v5));")
- for root in [self.v1, self.v2, self.v3, self.v4, self.v5, "1", "2", "3", "4"]:
- tree.root = root
+ for root in [self.v1, self.v2, self.v3, self.v4, self.v5, "1", "2", "3", "4", None]:
+ if root is not None:
+ tree.root = root
+ else:
+ tree._BGTree__root = root
tree_consistent_multicolors = tree.get_tree_consistent_multicolors(rooted=False, account_for_wgd=False)
self.assertIsInstance(tree_consistent_multicolors, list)
self.assertEqual(len(tree_consistent_multicolors), 16) | updated the test suite to cover the case when root of the tree is `None`, but tree consistent colors are requested for a unrooted tree with no account for wgd, and so can be done with any root. | aganezov_bg | train | py |
5a974ce75ab481df6b07958ad3f958eb0d6c1f4f | diff --git a/middleman-cli/lib/middleman-cli/console.rb b/middleman-cli/lib/middleman-cli/console.rb
index <HASH>..<HASH> 100644
--- a/middleman-cli/lib/middleman-cli/console.rb
+++ b/middleman-cli/lib/middleman-cli/console.rb
@@ -1,7 +1,9 @@
# CLI Module
module Middleman::Cli
+ # Alias "c" to "console"
+ Base.map({ 'c' => 'console' })
- # A thor task for creating new projects
+ # The CLI Console class
class Console < Thor
include Thor::Actions | added an alias for `console` command
Almost every other command has an alias except `console`. Also the
comment above the class definition wrongly said `console` was a command
for creating new projects. Corrected appropriately | middleman_middleman | train | rb |
4eb09bd8317583f21aad9532efcbe13ab22278dc | diff --git a/vault/expiration.go b/vault/expiration.go
index <HASH>..<HASH> 100644
--- a/vault/expiration.go
+++ b/vault/expiration.go
@@ -307,7 +307,7 @@ func (m *ExpirationManager) Restore(errorFunc func()) (retErr error) {
switch {
case retErr == nil:
- case errwrap.Contains(retErr, context.Canceled.Error()):
+ case strings.Contains(retErr.Error(), context.Canceled.Error()):
// Don't run error func because we lost leadership
m.logger.Warn("context cancled while restoring leases, stopping lease loading")
retErr = nil | Use strings.Contains for error possibly coming from storage
They may not well errwrap
Fixes #<I> | hashicorp_vault | train | go |
bf8ea20f09c0ec55fc1d6873c47b839f2c893f4e | diff --git a/test/test_f90nml.py b/test/test_f90nml.py
index <HASH>..<HASH> 100644
--- a/test/test_f90nml.py
+++ b/test/test_f90nml.py
@@ -347,6 +347,7 @@ class Test(unittest.TestCase):
test_nml.indent = '\t'
self.assert_write(test_nml, 'types_indent_tab.nml')
+ self.assertRaises(ValueError, setattr, test_nml, 'indent', -4)
self.assertRaises(ValueError, setattr, test_nml, 'indent', 'xyz')
self.assertRaises(TypeError, setattr, test_nml, 'indent', [1, 2, 3])
@@ -357,6 +358,11 @@ class Test(unittest.TestCase):
self.assertRaises(TypeError, setattr, test_nml, 'end_comma', 'xyz')
+ def test_colwidth(self):
+ test_nml = f90nml.read('types.nml')
+ self.assertRaises(ValueError, setattr, test_nml, 'colwidth', -1)
+ self.assertRaises(TypeError, setattr, test_nml, 'colwidth', 'xyz')
+
if __name__ == '__main__':
if os.path.isfile('tmp.nml'): | Column width testing (not yet implemented; gg tdd) | marshallward_f90nml | train | py |
8535310a022291d209ebd5bf62a8735f71261b4b | diff --git a/lib/athena.js b/lib/athena.js
index <HASH>..<HASH> 100644
--- a/lib/athena.js
+++ b/lib/athena.js
@@ -58,7 +58,7 @@ async.map = function (/* hlog, */ arr, method, resultsHandler)
{
if (finished && Object.keys(waiting).length === 0 && typeof args.resultsHandler === 'function')
{
- args.resultsHandler(context.__hlog, results);
+ args.resultsHandler.call(context, context.__hlog, results);
args.resultsHandler = null; // prevent from being called multiple times
}
}
@@ -105,7 +105,7 @@ async.parallel = function (/* hlog, */ methods, resultsHandler)
{
if (finished && Object.keys(waiting).length === 0 && typeof args.resultsHandler === 'function')
{
- args.resultsHandler(context.__hlog, results);
+ args.resultsHandler.call(context, context.__hlog, results);
args.resultsHandler = null; // prevent from being called multiple times
}
} | Send this context for all result handlers. | bretcope_odyssey | train | js |
4fd7f2e4c0257b01bcc8750034cb44cc3dbceea6 | diff --git a/lib/nats/server/options.rb b/lib/nats/server/options.rb
index <HASH>..<HASH> 100644
--- a/lib/nats/server/options.rb
+++ b/lib/nats/server/options.rb
@@ -120,14 +120,11 @@ module NATSD
def open_syslog
return unless @options[:syslog]
- unless Syslog.opened?
- Syslog.open("#{@options[:syslog]}", Syslog::LOG_PID, Syslog::LOG_USER )
- end
+ Syslog.open("#{@options[:syslog]}", Syslog::LOG_PID, Syslog::LOG_USER ) unless Syslog.opened?
end
def close_syslog
- return unless @options[:syslog]
- Syslog.close
+ Syslog.close unless @options[:syslog]
end
def symbolize_users(users)
@@ -159,7 +156,7 @@ module NATSD
debug "DEBUG is on"
trace "TRACE is on"
- #Syslog
+ # Syslog
@syslog = @options[:syslog]
# Authorization | modified open_syslog and close_syslog method | nats-io_ruby-nats | train | rb |
f0ed9c12a85ab3ccea3170c49e77aede31fdbb96 | diff --git a/src/test/java/com/hubspot/dropwizard/guice/InjectedResourcesTest.java b/src/test/java/com/hubspot/dropwizard/guice/InjectedResourcesTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/hubspot/dropwizard/guice/InjectedResourcesTest.java
+++ b/src/test/java/com/hubspot/dropwizard/guice/InjectedResourcesTest.java
@@ -2,7 +2,12 @@ package com.hubspot.dropwizard.guice;
import com.hubspot.dropwizard.guice.objects.ExplicitDAO;
import com.hubspot.dropwizard.guice.objects.ExplicitResource;
+import com.squarespace.jersey2.guice.JerseyGuiceUtils;
+
import io.dropwizard.testing.junit.ResourceTestRule;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
@@ -14,6 +19,10 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class InjectedResourcesTest {
+ static {
+ JerseyGuiceUtils.reset();
+ }
+
@ClassRule
public static final ResourceTestRule resources = ResourceTestRule.builder()
.addResource(new ExplicitResource(new ExplicitDAO())) | Make sure this is set up before the test runs | HubSpot_dropwizard-guice | train | java |
10e50718c344b49f0551b3ad72dec674ffb81ea1 | diff --git a/pinax/documents/views.py b/pinax/documents/views.py
index <HASH>..<HASH> 100644
--- a/pinax/documents/views.py
+++ b/pinax/documents/views.py
@@ -159,7 +159,7 @@ def folder_share(request, pk):
if not folder.can_share(request.user):
raise Http404()
form_kwargs = {
- "colleagues": User.objects.filter(pk__in=[u.pk for u in Relationship.set_for_user(request.user)])
+ "colleagues": User.objects.all() # @@@ make this a hookset to be defined at site level
}
if request.method == "POST":
if "remove" in request.POST: | Share with all users for now
This is far from ideal. We need to make this a configurable thing that is a hookset with a default implementation so it can be defined at the site level before we consider this a stable release. | pinax_pinax-documents | train | py |
21c1693bb8f999af50348f16821658841af3d70c | diff --git a/gocloud/main.go b/gocloud/main.go
index <HASH>..<HASH> 100644
--- a/gocloud/main.go
+++ b/gocloud/main.go
@@ -35,7 +35,9 @@ func init() {
func main() {
if e := router.RunWithArgs(); e != nil {
- log.Println("ERROR: " + e.Error())
+ if e != cli.NoRouteError {
+ log.Println("ERROR: " + e.Error())
+ }
os.Exit(1)
}
} | do not print error message on route not found error | dynport_gocloud | train | go |
290866cb934ecddb377e2aef3873e8e930647802 | diff --git a/railties/lib/rails/commands/command.rb b/railties/lib/rails/commands/command.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/commands/command.rb
+++ b/railties/lib/rails/commands/command.rb
@@ -27,10 +27,6 @@ module Rails
@@command_options[command_name] = options_to_parse
end
- def self.command_name_for(task_name)
- task_name.gsub(':', '_').to_sym
- end
-
def self.set_banner(command_name, banner)
options_for(command_name) { |opts, _| opts.banner = banner }
end
@@ -61,6 +57,10 @@ module Rails
@@commands << command
end
+ def self.command_name_for(task_name)
+ task_name.gsub(':', '_').to_sym
+ end
+
def command_for(command_name)
klass = @@commands.find do |command|
command_instance_methods = command.public_instance_methods | Move `command_name_for` to private section.
Users shouldn't have to lookup the command name for a task. Put it in
the private section, so it doesn't show up in any generated documentation. | rails_rails | train | rb |
7a40d4efb67b7e51d7c190ebf4830dfa24760929 | diff --git a/src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java b/src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java
+++ b/src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java
@@ -39,18 +39,18 @@ public final class LiteBlockingWaitStrategy implements WaitStrategy
if ((availableSequence = cursorSequence.get()) < sequence)
{
lock.lock();
-
+
try
{
do
{
signalNeeded.set(true);
-
+
if ((availableSequence = cursorSequence.get()) >= sequence)
{
break;
}
-
+
barrier.checkAlert();
processorNotifyCondition.await();
} | Remove trailing whitespace from LiteBlockingWaitStrategy.
This was causing checkstyle to complain. | LMAX-Exchange_disruptor | train | java |
620480bff664c9958561ccaa1b1fa522dc4b89c6 | diff --git a/template/helper/Form.php b/template/helper/Form.php
index <HASH>..<HASH> 100644
--- a/template/helper/Form.php
+++ b/template/helper/Form.php
@@ -455,7 +455,11 @@ class Form extends \lithium\template\Helper {
if (is_array($name)) {
return $this->_fields($name, $options);
}
- list(, $options, $template) = $this->_defaults(__FUNCTION__, $name, $options);
+ $method = __FUNCTION__;
+ if($options['type'] && !empty($this->_config['field-' . $options['type']])) {
+ $method = 'field-' . $options['type'];
+ }
+ list(, $options, $template) = $this->_defaults($method, $name, $options);
$defaults = array(
'label' => null,
'type' => isset($options['list']) ? 'select' : 'text', | Bugfix for Form->config() field settings
Fixed an issue where if you wanted to set different defaults through
Form->config for different field types (field-checkbox, field-radio)
these settings would be ignored.
These settings are now recognised and if they are not set it defaults
back to just field for its settings as before. | UnionOfRAD_lithium | train | php |
4b3afc086ccf60fcd206aeb7d0855adac0dfb26c | diff --git a/lib/cork/board.rb b/lib/cork/board.rb
index <HASH>..<HASH> 100644
--- a/lib/cork/board.rb
+++ b/lib/cork/board.rb
@@ -1,3 +1,5 @@
+require 'colored'
+
module Cork
# Provides support for UI output. Cork provides support for nested
# sections of information and for a verbose mode.
diff --git a/spec/board_spec.rb b/spec/board_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/board_spec.rb
+++ b/spec/board_spec.rb
@@ -187,6 +187,19 @@ module Cork
end
end
+ describe '#notice' do
+ it 'outputs the given string when not silent' do
+ @board.notice('Hello World')
+ @output.string.should == ("\n[!] Hello World".green + "\n")
+ end
+
+ it 'outputs the given string without color codes when ansi is disabled' do
+ @board = Board.new(:out => @output, :ansi => false)
+ @board.notice('Hello World')
+ @output.string.should == "\n[!] Hello World\n"
+ end
+ end
+
# describe '#wrap_with_indent' do
# it 'wrap_string with a default indentation of zero' do
# UI.indentation_level = 0 | Added tests for the `notice` Board method | CocoaPods_Cork | train | rb,rb |
1a46b09920c990cf623d196e2907a03d604e53ff | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ setup(
long_description=readme + '\n\n' + history,
author='Beau Barker',
author_email='beauinmelbourne@gmail.com',
- url='http://jsonrpcserver.readthedocs.org/',
+ url='https://jsonrpcserver.readthedocs.org/',
packages=['jsonrpcserver'],
package_data={'jsonrpcserver': ['request-schema.json']},
include_package_data=True, | Replaced the http readthedocs link with https. | bcb_jsonrpcserver | train | py |
5e34084161e3a0dc9599dbe04e49de02af58b6d8 | diff --git a/redisson/src/main/java/org/redisson/codec/DefenceModule.java b/redisson/src/main/java/org/redisson/codec/DefenceModule.java
index <HASH>..<HASH> 100644
--- a/redisson/src/main/java/org/redisson/codec/DefenceModule.java
+++ b/redisson/src/main/java/org/redisson/codec/DefenceModule.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.deser.ValueInstantiator;
import com.fasterxml.jackson.databind.deser.ValueInstantiators.Base;
import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.dataformat.avro.PackageVersion;
/**
* Fix for https://github.com/FasterXML/jackson-databind/issues/1599
@@ -68,10 +67,6 @@ public class DefenceModule extends SimpleModule {
}
- public DefenceModule() {
- super(PackageVersion.VERSION);
- }
-
@Override
public void setupModule(SetupContext context) {
context.addValueInstantiators(new DefenceValueInstantiator()); | Fixed - reference to avro module has been removed. #<I> | redisson_redisson | train | java |
8fdccfb33c449cb544b88ffba79958c2e83f86f4 | diff --git a/base/src/main/java/uk/ac/ebi/atlas/model/experiment/baseline/BaselineExperimentConfiguration.java b/base/src/main/java/uk/ac/ebi/atlas/model/experiment/baseline/BaselineExperimentConfiguration.java
index <HASH>..<HASH> 100644
--- a/base/src/main/java/uk/ac/ebi/atlas/model/experiment/baseline/BaselineExperimentConfiguration.java
+++ b/base/src/main/java/uk/ac/ebi/atlas/model/experiment/baseline/BaselineExperimentConfiguration.java
@@ -51,7 +51,7 @@ public class BaselineExperimentConfiguration {
}
public List<String> getMenuFilterFactorTypes() {
- return xmlReader.getList("menuFilterFactorTypes");
+ return Arrays.asList(xmlReader.getString("menuFilterFactorTypes").split("\\W*,\\W*"));
}
public Map<String, String> getSpeciesMapping() { | Split menuFilterFactorTypes by commas | ebi-gene-expression-group_atlas | train | java |
54c2e816019945b577f1c10dbc4254f636a27d5e | diff --git a/source/rafcon/utils/plugins.py b/source/rafcon/utils/plugins.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/utils/plugins.py
+++ b/source/rafcon/utils/plugins.py
@@ -36,11 +36,15 @@ def load_plugins():
dir_name, plugin_name = os.path.split(plugin_path.rstrip('/'))
logger.info("Found plugin '{}' at {}".format(plugin_name, plugin_path))
sys.path.insert(0, dir_name)
- try:
- module = importlib.import_module(plugin_name)
- plugin_dict[plugin_name] = module
- except ImportError as e:
- logger.error("Could not import plugin '{}': {}".format(plugin_name, e))
+ if plugin_name in plugin_dict:
+ logger.error("Plugin '{}' already loaded".format(plugin_name))
+ else:
+ try:
+ module = importlib.import_module(plugin_name)
+ plugin_dict[plugin_name] = module
+ logger.info("Successfully loaded plugin '{}'".format(plugin_name))
+ except ImportError as e:
+ logger.error("Could not import plugin '{}': {}".format(plugin_name, e))
def run_hook(hook_name, *args, **kwargs): | Print error when loading plugin with the same name
It is currently not possible to load two plugins with the same folder
name, e.g. ~/rafcon_dds/plugin and ~/rafcon_verification/plugin at the
same time. | DLR-RM_RAFCON | train | py |
8c08b65ac5f3b3c58c91383aeb526555ed297d18 | diff --git a/stellar/command.py b/stellar/command.py
index <HASH>..<HASH> 100644
--- a/stellar/command.py
+++ b/stellar/command.py
@@ -195,6 +195,7 @@ def init():
print
else:
db_name = url.rsplit('/', 1)[-1]
+ url = url.rsplit('/', 1)[0] + '/'
name = click.prompt(
'Please enter your project name (used internally, eg. %s)' % db_name, | Fix incorrect configuration file after init
Url and stellar_url data in stellar.yaml configuration file
data should not include database name. | fastmonkeys_stellar | train | py |
dd4b9a021fd4877652a441dea1cc117d2534cf45 | diff --git a/app/models/wupee/notifier.rb b/app/models/wupee/notifier.rb
index <HASH>..<HASH> 100644
--- a/app/models/wupee/notifier.rb
+++ b/app/models/wupee/notifier.rb
@@ -47,7 +47,7 @@ module Wupee
notification.save!
subject_interpolations = interpolate_subject_vars(notification)
- send_email(notification, subject_interpolations) if notif_type_config.wants_notification?
+ send_email(notification, subject_interpolations) if notif_type_config.wants_email?
end
end | fix dummy bug... wrong method was called to know if receiver wants email or not | sleede_wupee | train | rb |
30cc67cd64defc7a398ae9f28a7908d6b8a6ba21 | diff --git a/core/google/cloud/connection.py b/core/google/cloud/connection.py
index <HASH>..<HASH> 100644
--- a/core/google/cloud/connection.py
+++ b/core/google/cloud/connection.py
@@ -28,7 +28,7 @@ API_BASE_URL = 'https://www.googleapis.com'
"""The base of the API call URL."""
DEFAULT_USER_AGENT = 'gcloud-python/{0}'.format(
- get_distribution('google-cloud').version)
+ get_distribution('google-cloud-core').version)
"""The user agent for google-cloud-python requests."""
diff --git a/unit_tests/test_connection.py b/unit_tests/test_connection.py
index <HASH>..<HASH> 100644
--- a/unit_tests/test_connection.py
+++ b/unit_tests/test_connection.py
@@ -70,7 +70,7 @@ class TestConnection(unittest.TestCase):
def test_user_agent_format(self):
from pkg_resources import get_distribution
expected_ua = 'gcloud-python/{0}'.format(
- get_distribution('google-cloud').version)
+ get_distribution('google-cloud-core').version)
conn = self._makeOne()
self.assertEqual(conn.USER_AGENT, expected_ua) | Changing user-agent to use the version from google-cloud-core.
See #<I> for larger discussion. | googleapis_google-cloud-python | train | py,py |
82102e656b10b12d7b93af2dfc9dd1de2a4ce708 | diff --git a/airflow/providers_manager.py b/airflow/providers_manager.py
index <HASH>..<HASH> 100644
--- a/airflow/providers_manager.py
+++ b/airflow/providers_manager.py
@@ -140,6 +140,16 @@ def _sanity_check(provider_package: str, class_name: str) -> bool:
return False
try:
import_string(class_name)
+ except ImportError as e:
+ # When there is an ImportError we turn it into debug warnings as this is
+ # an expected case when only some providers are installed
+ log.debug(
+ "Exception when importing '%s' from '%s' package: %s",
+ class_name,
+ provider_package,
+ e,
+ )
+ return False
except Exception as e:
log.warning(
"Exception when importing '%s' from '%s' package: %s",
@@ -642,16 +652,6 @@ class ProvidersManager(LoggingMixin):
field_behaviours = hook_class.get_ui_field_behaviour()
if field_behaviours:
self._add_customized_fields(package_name, hook_class, field_behaviours)
- except ImportError as e:
- # When there is an ImportError we turn it into debug warnings as this is
- # an expected case when only some providers are installed
- log.debug(
- "Exception when importing '%s' from '%s' package: %s",
- hook_class_name,
- package_name,
- e,
- )
- return None
except Exception as e:
log.warning(
"Exception when importing '%s' from '%s' package: %s", | Log provider import errors as debug warnings (#<I>) | apache_airflow | train | py |
89475b805d644e3b56e96cc1b88a5ce99d28eecd | diff --git a/backup/restorelib.php b/backup/restorelib.php
index <HASH>..<HASH> 100644
--- a/backup/restorelib.php
+++ b/backup/restorelib.php
@@ -6197,7 +6197,7 @@
foreach ($assignments as $assignment) {
$olduser = backup_getid($restore->backup_unique_code,"user",$assignment->userid);
- if ($olduser->info == "notincourse") { // it's possible that user is not in the course
+ if (!$olduser || $olduser->info == "notincourse") { // it's possible that user is not in the course
continue;
}
$assignment->userid = $olduser->new_id; // new userid here | Fixed notice when restoring a backup file that was created with Users: none. | moodle_moodle | train | php |
9bad9416f19040feeb1880b410e760dece4f921e | diff --git a/interfaces/associations/manyToMany/find.populate.where.js b/interfaces/associations/manyToMany/find.populate.where.js
index <HASH>..<HASH> 100644
--- a/interfaces/associations/manyToMany/find.populate.where.js
+++ b/interfaces/associations/manyToMany/find.populate.where.js
@@ -83,6 +83,26 @@ describe('Association Interface', function() {
});
});
+ it('should return only taxis with the given id', function(done) {
+ Associations.Driver.find({ name: 'manymany find where1' })
+ .populate('taxis', { id: 1 })
+ .exec(function(err, drivers) {
+ if (err) {
+ return done(err);
+ }
+
+ assert(_.isArray(drivers));
+ assert.equal(drivers.length, 1);
+ assert(_.isArray(drivers[0].taxis));
+ assert.equal(drivers[0].taxis.length, 1);
+ assert.equal(drivers[0].taxis[0].id, 1);
+
+ return done();
+ });
+ });
+
+
+
it('should add an empty array when no child records are returned from a populate', function(done) {
Associations.Driver.find({ name: 'manymany find where1' })
.populate('taxis', { medallion: { '<': 0 }}) | Add test to ensure that child criteria are disambiguated in many-to-many joins
refs <URL> | balderdashy_waterline-adapter-tests | train | js |
07eedacf13e1c8cb91bda212007e81d35923d823 | diff --git a/lib/mischacks.rb b/lib/mischacks.rb
index <HASH>..<HASH> 100644
--- a/lib/mischacks.rb
+++ b/lib/mischacks.rb
@@ -127,14 +127,12 @@ module MiscHacks
def self.try_n_times n=10
i = 0
begin
- ret = yield
+ yield
rescue
i += 1
retry if i < n
raise
end
-
- ret
end
end | Simplify try_n_times | ion1_mischacks | train | rb |
a5e58908aaa9e9514f655125a431fe0252f8516c | diff --git a/alerta/auth/basic.py b/alerta/auth/basic.py
index <HASH>..<HASH> 100644
--- a/alerta/auth/basic.py
+++ b/alerta/auth/basic.py
@@ -108,13 +108,11 @@ def forgot():
try:
email = request.json['email']
except KeyError:
- raise ApiError("must supply 'email'", 401)
+ raise ApiError("must supply 'email'", 400)
user = User.find_by_email(email)
if user:
- if not user.email_verified:
- raise ApiError('user email not verified', 401)
- elif not user.is_active:
+ if not user.is_active:
raise ApiError('user not active', 403)
send_password_reset(user) | Improve password reset flow (#<I>) | alerta_alerta | train | py |
b89fe63a074a6f33923915cdd6d75ce356f2b594 | diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -21,8 +21,8 @@ source_suffix = '.rst'
master_doc = 'index'
project = 'django-treebeard'
copyright = '2008-2013, Gustavo Picon'
-version = '2.0a1'
-release = '2.0a1'
+version = '2.0b1'
+release = '2.0b1'
exclude_trees = ['_build']
pygments_style = 'sphinx'
html_theme = 'default'
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ class pytest_test(test):
setup_args = dict(
name='django-treebeard',
- version='2.0a1',
+ version='2.0b1',
url='https://tabo.pe/projects/django-treebeard/',
author='Gustavo Picon',
author_email='tabo@tabo.pe',
diff --git a/treebeard/__init__.py b/treebeard/__init__.py
index <HASH>..<HASH> 100644
--- a/treebeard/__init__.py
+++ b/treebeard/__init__.py
@@ -1 +1 @@
-__version__ = '2.0a1'
+__version__ = '2.0b1' | preparing <I>b1 release | django-treebeard_django-treebeard | train | py,py,py |
b624c9cacecc6325dc52d3203528fbe870aeba16 | diff --git a/test/nexmo/applications_test.rb b/test/nexmo/applications_test.rb
index <HASH>..<HASH> 100644
--- a/test/nexmo/applications_test.rb
+++ b/test/nexmo/applications_test.rb
@@ -13,10 +13,6 @@ class NexmoApplicationsTest < Nexmo::Test
'https://api.nexmo.com/v1/applications/' + application_id
end
- def application_id
- 'xx-xx-xx-xx'
- end
-
def headers
{'Content-Type' => 'application/json'}
end
diff --git a/test/nexmo/test.rb b/test/nexmo/test.rb
index <HASH>..<HASH> 100644
--- a/test/nexmo/test.rb
+++ b/test/nexmo/test.rb
@@ -27,7 +27,7 @@ module Nexmo
end
def application_id
- 'nexmo-application-id'
+ 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
end
def private_key | Remove NexmoApplicationsTest#application_id method | Nexmo_nexmo-ruby | train | rb,rb |
ec4056bc4d0358170f0de463c1cdbf6c24e963fe | diff --git a/src/main/java/org/mariadb/jdbc/internal/common/packet/PacketOutputStream.java b/src/main/java/org/mariadb/jdbc/internal/common/packet/PacketOutputStream.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/mariadb/jdbc/internal/common/packet/PacketOutputStream.java
+++ b/src/main/java/org/mariadb/jdbc/internal/common/packet/PacketOutputStream.java
@@ -10,7 +10,7 @@ public class PacketOutputStream extends OutputStream{
private static final int MAX_PACKET_LENGTH = 0x00ffffff;
private static final int SEQNO_OFFSET = 3;
private static final int HEADER_LENGTH = 4;
- private static final int MAX_SEQNO = 0xff;
+ private static final int MAX_SEQNO = 0xffff;
OutputStream baseStream; | Fixed "MySQL Protocol limit reached" error (when sending data > 2GB) by setting
MAX_SEQNO to max integer value. | MariaDB_mariadb-connector-j | train | java |
59e56443c57e5165b908881566ee30902c36f71e | diff --git a/src/Extensions.php b/src/Extensions.php
index <HASH>..<HASH> 100644
--- a/src/Extensions.php
+++ b/src/Extensions.php
@@ -210,7 +210,7 @@ class Extensions
*/
public function checkLocalAutoloader($force = false)
{
- if (!$force && (!$this->app['filesystem']->has('extensions://local/') || $this->app['filesystem']->has('extensions://local/.built'))) {
+ if (!$force && (!$this->app['filesystem']->has('extensions://local/') || $this->app['filesystem']->has('app://cache/.local.autoload.built'))) {
return;
}
@@ -264,7 +264,7 @@ class Extensions
$boltJson['autoload']['psr-4'] = $boltPsr4;
$composerJsonFile->write($boltJson);
$this->app['extend.manager']->dumpautoload();
- $this->app['filesystem']->write('extensions://local/.built', time());
+ $this->app['filesystem']->write('app://cache/.local.autoload.built', time());
}
/** | Write the local extension autoload lock file out the the cache | bolt_bolt | train | php |
4f599325fa59197559c7ef08b6a926946a36047e | diff --git a/src/main/java/com/qiniu/util/Etag.java b/src/main/java/com/qiniu/util/Etag.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/qiniu/util/Etag.java
+++ b/src/main/java/com/qiniu/util/Etag.java
@@ -49,8 +49,19 @@ public final class Etag {
* @throws IOException 文件读取异常
*/
public static String file(File file) throws IOException {
- FileInputStream fi = new FileInputStream(file);
- return stream(fi, file.length());
+ FileInputStream fi = null;
+ try {
+ fi = new FileInputStream(file);
+ return stream(fi, file.length());
+ } finally {
+ if (fi != null) {
+ try {
+ fi.close();
+ } catch (Throwable t) {
+ }
+ }
+ }
+
}
/**
@@ -66,7 +77,7 @@ public final class Etag {
}
/**
- * 计算输入流的etag
+ * 计算输入流的etag,如果计算完毕不需要这个InputStream对象,请自行关闭流
*
* @param in 数据输入流
* @param len 数据流长度 | [ISSUE-<I>] close the input stream generated from the file object | qiniu_java-sdk | train | java |
e4b622af4f307d5486abb0c4230fae9e84fb7cc3 | diff --git a/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php b/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php
index <HASH>..<HASH> 100644
--- a/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php
+++ b/src/system/modules/metamodels/MetaModels/BackendIntegration/Boot.php
@@ -154,7 +154,7 @@ class Boot
public static function perform()
{
// Do not execute anything if we are on the index page because no User is logged in
- if (\Environment::get('script') == 'contao/index.php')
+ if (strpos(\Environment::getInstance()->script, 'contao/index.php') !== false)
{
return;
} | adjust Environment call to be compatible with contao <I> | MetaModels_core | train | php |
31ae4ab6396d5b9caf6fc12f08ef3f3ba1ec071d | diff --git a/python/sdss_access/sync/cli.py b/python/sdss_access/sync/cli.py
index <HASH>..<HASH> 100644
--- a/python/sdss_access/sync/cli.py
+++ b/python/sdss_access/sync/cli.py
@@ -92,9 +92,10 @@ class Cli(object):
running_files = n_tasks - finished_files
if self.verbose:
- print("SDSS_ACCESS> syncing... please wait for {0} rsync streams ({1} files) to"
- " complete [running for {2} seconds]".format(running_count, running_files,
- pause_count * pause))
+ tqdm.write("SDSS_ACCESS> syncing... please wait for {0} rsync streams ({1} "
+ "files) to complete [running for {2} seconds]".format(running_count,
+ running_files,
+ pause_count * pause))
# update the process polling
sleep(pause) | switching stdout to tqdm.write to fix verbose prints | sdss_sdss_access | train | py |
a65614f90e62b859fb44af3eb06b0ec4394156f1 | diff --git a/DoctrineMigrationsBundle.php b/DoctrineMigrationsBundle.php
index <HASH>..<HASH> 100644
--- a/DoctrineMigrationsBundle.php
+++ b/DoctrineMigrationsBundle.php
@@ -21,19 +21,4 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
*/
class DoctrineMigrationsBundle extends Bundle
{
- /**
- * {@inheritdoc}
- */
- public function getNamespace()
- {
- return __NAMESPACE__;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getPath()
- {
- return __DIR__;
- }
} | removed the need to define getNamespace() and getPath() in bundles | doctrine_DoctrineMigrationsBundle | train | php |
56446220ef6523c5bf979eb98b1d3fafe0c9df14 | diff --git a/plaso/parsers/santa.py b/plaso/parsers/santa.py
index <HASH>..<HASH> 100644
--- a/plaso/parsers/santa.py
+++ b/plaso/parsers/santa.py
@@ -72,7 +72,7 @@ class SantaProcessExitEventData(events.EventData):
action (str): action recorded by Santa.
pid (str): process identifier for the process.
pid_version (str): the process identifier version extracted from the Mach
- audit token. The version can sed to identify process identifier
+ audit token. The version can be used to identify process identifier
rollovers.
ppid (str): parent process identifier for the executed process.
uid (str): user identifier associated with the executed process.
@@ -101,7 +101,7 @@ class SantaFileSystemEventData(events.EventData):
file_new_path (str): new file path and name for RENAME events.
pid (str): process identifier for the process.
pid_version (str): the process identifier version extracted from the Mach
- audit token. The version can sed to identify process identifier
+ audit token. The version can be used to identify process identifier
rollovers.
ppid (str): parent process identifier for the executed process.
process (str): process name. | Corrected typo in Santa parser docstrings (#<I>) | log2timeline_plaso | train | py |
07f072ead9a27e11cb1c15b100f0ce2b9a41b0b1 | diff --git a/lib/kubeclient/common.rb b/lib/kubeclient/common.rb
index <HASH>..<HASH> 100644
--- a/lib/kubeclient/common.rb
+++ b/lib/kubeclient/common.rb
@@ -399,12 +399,7 @@ module Kubeclient
@entities[kind.to_s].resource_name
end
ns_prefix = build_namespace_prefix(namespace)
- # TODO: Change this once services supports the new scheme
- if entity_name_plural == 'pods'
- rest_client["#{ns_prefix}#{entity_name_plural}/#{name}:#{port}/proxy"].url
- else
- rest_client["proxy/#{ns_prefix}#{entity_name_plural}/#{name}:#{port}"].url
- end
+ rest_client["#{ns_prefix}#{entity_name_plural}/#{name}:#{port}/proxy"].url
end
def process_template(template) | Remove special handling for services when building th proxy URL | abonas_kubeclient | train | rb |
b862159483c4b8b7898062efef66449b2f159187 | diff --git a/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java b/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java
index <HASH>..<HASH> 100644
--- a/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java
+++ b/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java
@@ -366,6 +366,8 @@ public final class MediaDriver implements AutoCloseable
if ('/' == c || '\\' == c)
{
builder.setLength(lastCharIndex);
+ } else {
+ break;
}
} | [Java] Bug fix in reportExistingErrors | real-logic_aeron | train | java |
6e769749d23d0c44178f5a52c0e49bb1817b80dc | diff --git a/undertow/src/main/java/org/wildfly/extension/undertow/LocationService.java b/undertow/src/main/java/org/wildfly/extension/undertow/LocationService.java
index <HASH>..<HASH> 100644
--- a/undertow/src/main/java/org/wildfly/extension/undertow/LocationService.java
+++ b/undertow/src/main/java/org/wildfly/extension/undertow/LocationService.java
@@ -90,7 +90,7 @@ public class LocationService implements Service<LocationService>, FilterLocation
}
protected static HttpHandler configureHandlerChain(HttpHandler rootHandler, List<UndertowFilter> filters) {
- filters.sort((o1, o2) -> o1.getPriority() >= o2.getPriority() ? 1 : -1);
+ filters.sort((o1, o2) -> Integer.compare(o1.getPriority(), o2.getPriority()));
Collections.reverse(filters); //handler chain goes last first
HttpHandler handler = rootHandler;
for (UndertowFilter filter : filters) { | WFLY-<I> Fix the comparator implementation for sorting undertow filter-ref | wildfly_wildfly | train | java |
9a331b7d66c63a9e1b163c1fadbfdf94a7e798ea | diff --git a/bika/lims/browser/js/bika.lims.site.js b/bika/lims/browser/js/bika.lims.site.js
index <HASH>..<HASH> 100644
--- a/bika/lims/browser/js/bika.lims.site.js
+++ b/bika/lims/browser/js/bika.lims.site.js
@@ -383,16 +383,6 @@ function SiteView() {
stop_spinner();
window.bika.lims.log("Error at " + settings.url + ": " + thrownError);
});
-
- //Disable submit button once its form submitted to avoid saving twice.
- $('form').each(function() {
- $(this).submit(function(){
- $(this).find(':input[type=submit]').each(function() {
- $(this).prop('disabled', true);
- });
- });
- });
-
}
function portalAlert(html) { | Do not deactivate submit buttons, causes unexpected behavior | senaite_senaite.core | train | js |
35a5f95abf54c9e68492b3fd9c61089ff19e36d8 | diff --git a/cli/Valet/Nginx.php b/cli/Valet/Nginx.php
index <HASH>..<HASH> 100644
--- a/cli/Valet/Nginx.php
+++ b/cli/Valet/Nginx.php
@@ -118,7 +118,7 @@ class Nginx
$this->cli->run(
'sudo nginx -c '.static::NGINX_CONF.' -t',
function ($exitCode, $outputMessage) {
- throw new DomainException("Nginx cannot start, please check your nginx.conf [$exitCode: $outputMessage].");
+ throw new DomainException("Nginx cannot start; please check your nginx.conf [$exitCode: $outputMessage].");
}
);
} | Convert comma to semicolon | laravel_valet | train | php |
b3425b8411995138d24d61dee6dae3522a35e4be | diff --git a/backbone.js b/backbone.js
index <HASH>..<HASH> 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1369,10 +1369,9 @@
return Backbone.ajax(_.extend(params, options));
};
- // Set the default ajax method if $ is defined.
- if ($) Backbone.ajax = function () {
- return $.ajax.apply(Backbone, arguments);
- }
+ // If `$` is defined, set the default implementation of `Backbone.ajax` to
+ // proxy through.
+ if ($) Backbone.ajax = function(){ return $.ajax.apply($, arguments); };
// Wrap an optional error callback with a fallback error event.
Backbone.wrapError = function(onError, originalModel, options) { | Fixing Backbone.ajax implementation. | jashkenas_backbone | train | js |
f4e5966608de4755b17196986491ef2f79614a88 | diff --git a/plugins/Referrers/Columns/Keyword.php b/plugins/Referrers/Columns/Keyword.php
index <HASH>..<HASH> 100644
--- a/plugins/Referrers/Columns/Keyword.php
+++ b/plugins/Referrers/Columns/Keyword.php
@@ -44,7 +44,11 @@ class Keyword extends Base
$information = $this->getReferrerInformationFromRequest($request);
if (!empty($information['referer_keyword'])) {
- return substr($information['referer_keyword'], 0, 255);
+ if (function_exists('mb_substr')) {
+ return mb_substr($information['referer_keyword'], 0, 255, 'UTF-8');
+ } else {
+ return substr($information['referer_keyword'], 0, 255);
+ }
}
return $information['referer_keyword']; | Internal / external search strings will be reduced more than <I> "bytes" without boundary. | matomo-org_matomo | train | php |
7bd3521dbfab5f4b13efa7211cf40420726e0794 | diff --git a/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java b/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java
index <HASH>..<HASH> 100644
--- a/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java
+++ b/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java
@@ -391,6 +391,18 @@ public class DefaultClientConfigImpl extends AbstractDefaultClientConfigImpl {
return getDefaultPropName(propName.key());
}
+ public String getInstancePropName(String restClientName,
+ IClientConfigKey configKey) {
+ return getInstancePropName(restClientName, configKey.key());
+ }
+
+ public String getInstancePropName(String restClientName, String key) {
+ if (getNameSpace() == null) {
+ throw new NullPointerException("getNameSpace() may not be null");
+ }
+ return restClientName + "." + getNameSpace() + "." + key;
+ }
+
public DefaultClientConfigImpl withProperty(IClientConfigKey key, Object value) {
setProperty(key, value);
return this; | add back API that was accidentally deleted in refactor | Netflix_ribbon | train | java |
b43964d6061f4a31320906172f763dd3dd188f4d | diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/template/test_case_test.rb
+++ b/actionpack/test/template/test_case_test.rb
@@ -24,7 +24,7 @@ module ActionView
test_case.class_eval do
test "helpers defined on ActionView::TestCase are available" do
assert test_case.ancestors.include?(ASharedTestHelper)
- assert 'Holla!', from_shared_helper
+ assert_equal 'Holla!', from_shared_helper
end
end
end
@@ -41,7 +41,7 @@ module ActionView
helper AnotherTestHelper
test "additional helper classes can be specified as in a controller" do
assert test_case.ancestors.include?(AnotherTestHelper)
- assert 'Howdy!', from_another_helper
+ assert_equal 'Howdy!', from_another_helper
end
end
@@ -58,14 +58,14 @@ module ActionView
helper AnotherTestHelper
test "additional helper classes can be specified as in a controller" do
assert test_case.ancestors.include?(AnotherTestHelper)
- assert 'Howdy!', from_another_helper
+ assert_equal 'Howdy!', from_another_helper
test_case.helper_class.module_eval do
def render_from_helper
from_another_helper
end
end
- assert 'Howdy!', render(:partial => 'test/from_helper')
+ assert_equal 'Howdy!', render(:partial => 'test/from_helper')
end
end | Make some assertions in the ActionView::TestCase tests actually do something.
[#<I> state:resolved] | rails_rails | train | rb |
970e7f9314001313b52b0fe6ae1d172a897778e0 | diff --git a/ntfy/__init__.py b/ntfy/__init__.py
index <HASH>..<HASH> 100644
--- a/ntfy/__init__.py
+++ b/ntfy/__init__.py
@@ -7,13 +7,6 @@ try:
except:
__version__ = 'unknown'
-try:
- from dbus.exceptions import DBusException
-except ImportError:
-
- class DBusException(Exception):
- pass
-
def notify(message, title, config=None, **kwargs):
from .config import load_config
@@ -41,9 +34,6 @@ def notify(message, title, config=None, **kwargs):
module.notify(message=message, title=title, **backend_config)
except (SystemExit, KeyboardInterrupt):
raise
- except DBusException:
- logging.getLogger(__name__).warning(
- 'Failed to send notification using {}'.format(backend))
except Exception:
logging.getLogger(__name__).error(
'Failed to send notification using {}'.format(backend), | Don't give DBusExceptions special treament, would've avoided #<I> | dschep_ntfy | train | py |
f969c393e3ea565d0c8ed5c979d710cc1a905549 | diff --git a/src/Bugsnag/Error.php b/src/Bugsnag/Error.php
index <HASH>..<HASH> 100644
--- a/src/Bugsnag/Error.php
+++ b/src/Bugsnag/Error.php
@@ -225,7 +225,7 @@ class Bugsnag_Error
return $cleanArray;
} elseif (is_string($obj)) {
// UTF8-encode if not already encoded
- if (!mb_detect_encoding($obj, 'UTF-8', true)) {
+ if (function_exists('mb_detect_encoding') && !mb_detect_encoding($obj, 'UTF-8', true)) {
return utf8_encode($obj);
} else {
return $obj; | Only do encoding magic if mb_detect_encoding is available | bugsnag_bugsnag-php | train | php |
941ccdbde074c127bd6a284fb975f2063fb2756e | diff --git a/flake8_import_order/stdlib_list.py b/flake8_import_order/stdlib_list.py
index <HASH>..<HASH> 100644
--- a/flake8_import_order/stdlib_list.py
+++ b/flake8_import_order/stdlib_list.py
@@ -40,6 +40,7 @@ STDLIB_NAMES = set((
"__main__",
"_dummy_thread",
"_thread",
+ "_threading_local",
"abc",
"aepack",
"aetools", | Add _threading_local to the stdlib list | PyCQA_flake8-import-order | train | py |
becf0344d8bdfe0dea2c048e66a72b764b3ccb49 | diff --git a/lib/formtools/form.js b/lib/formtools/form.js
index <HASH>..<HASH> 100644
--- a/lib/formtools/form.js
+++ b/lib/formtools/form.js
@@ -106,12 +106,17 @@ var generateFormFromModel = exports.generateFormFromModel = function (m, r, form
linz.mongoose.models[m.schema.tree[fieldName].ref].find({}, function (err, docs) {
field.type = 'enum';
- choices = {};
+ choices = [];
docs.forEach(function (doc) {
- choices[doc._id.toString()] = doc.title || doc.label || doc.name || doc.toString();
+ choices.push({
+ value: doc._id.toString(),
+ label: doc.title || doc.label || doc.name || doc.toString()
+ });
});
+ field.list = choices;
+
callback(null);
}); | Ref property values now appear in the select lists. | linzjs_linz | train | js |
aeb1cab633c5e78e9a867c68c9a48933c2caac74 | diff --git a/open/exec_windows.go b/open/exec_windows.go
index <HASH>..<HASH> 100644
--- a/open/exec_windows.go
+++ b/open/exec_windows.go
@@ -20,7 +20,7 @@ func cleaninput(input string) string {
}
func open(input string) *exec.Cmd {
- return exec.Command(runDll32, cmd, cleaninput(input))
+ return exec.Command(runDll32, cmd, input)
}
func openWith(input string, appName string) *exec.Cmd { | Fixing #9 - not replacing ampersand in calls to rundll<I> | skratchdot_open-golang | train | go |
545db99cb432306d5a06c56bfe68c3a3d6380052 | diff --git a/src/main/java/technology/tabula/json/TableSerializer.java b/src/main/java/technology/tabula/json/TableSerializer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/technology/tabula/json/TableSerializer.java
+++ b/src/main/java/technology/tabula/json/TableSerializer.java
@@ -30,6 +30,8 @@ public final class TableSerializer implements JsonSerializer<Table> {
result.addProperty("left", src.getLeft());
result.addProperty("width", src.getWidth());
result.addProperty("height", src.getHeight());
+ result.addProperty("right", src.getRight());
+ result.addProperty("bottom", src.getBottom());
JsonArray data;
result.add("data", data = new JsonArray()); | Add right and bottom of area to JSON output | tabulapdf_tabula-java | train | java |
2f1bcc96f53e06bb3696ab7c74de48f98921ba4c | diff --git a/charmhelpers/contrib/hahelpers/cluster.py b/charmhelpers/contrib/hahelpers/cluster.py
index <HASH>..<HASH> 100644
--- a/charmhelpers/contrib/hahelpers/cluster.py
+++ b/charmhelpers/contrib/hahelpers/cluster.py
@@ -44,6 +44,7 @@ from charmhelpers.core.hookenv import (
ERROR,
WARNING,
unit_get,
+ is_leader as juju_is_leader
)
from charmhelpers.core.decorators import (
retry_on_exception,
@@ -66,12 +67,18 @@ def is_elected_leader(resource):
Returns True if the charm executing this is the elected cluster leader.
It relies on two mechanisms to determine leadership:
- 1. If the charm is part of a corosync cluster, call corosync to
+ 1. If juju is sufficiently new and leadership election is supported,
+ the is_leader command will be used.
+ 2. If the charm is part of a corosync cluster, call corosync to
determine leadership.
- 2. If the charm is not part of a corosync cluster, the leader is
+ 3. If the charm is not part of a corosync cluster, the leader is
determined as being "the alive unit with the lowest unit numer". In
other words, the oldest surviving unit.
"""
+ try:
+ return juju_is_leader()
+ except NotImplementedError:
+ pass
if is_clustered():
if not is_crm_leader(resource):
log('Deferring action to CRM leader.', level=INFO) | Try using juju leadership for leadership determination | juju_charm-helpers | train | py |
e9b0454a9df1d4a889a168b623abcfadbf3d6d47 | diff --git a/pkg/kubelet/runtime.go b/pkg/kubelet/runtime.go
index <HASH>..<HASH> 100644
--- a/pkg/kubelet/runtime.go
+++ b/pkg/kubelet/runtime.go
@@ -23,7 +23,7 @@ import (
)
type runtimeState struct {
- sync.Mutex
+ sync.RWMutex
lastBaseRuntimeSync time.Time
baseRuntimeSyncThreshold time.Duration
networkError error
@@ -57,8 +57,8 @@ func (s *runtimeState) setPodCIDR(cidr string) {
}
func (s *runtimeState) podCIDR() string {
- s.Lock()
- defer s.Unlock()
+ s.RLock()
+ defer s.RUnlock()
return s.cidr
}
@@ -69,8 +69,8 @@ func (s *runtimeState) setInitError(err error) {
}
func (s *runtimeState) errors() []string {
- s.Lock()
- defer s.Unlock()
+ s.RLock()
+ defer s.RUnlock()
var ret []string
if s.initError != nil {
ret = append(ret, s.initError.Error()) | optimize lock of runtimeState stuct | kubernetes_kubernetes | train | go |
023bf499221d65d661090e9f4559b64a724d1459 | diff --git a/edit_interface.php b/edit_interface.php
index <HASH>..<HASH> 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -317,7 +317,7 @@ case 'editraw':
// Notes are special - they may contain data on the first line
$gedrec=preg_replace('/^(0 @'.WT_REGEX_XREF.'@ NOTE) (.+)/', "$1\n1 CONC $2", $gedrec);
list($gedrec1, $gedrec2)=explode("\n", $gedrec, 2);
- echo '<textarea name="newgedrec1" rows="1" cols="80" readonly="yes">', $gedrec1, '</textarea><br />';
+ echo '<textarea name="newgedrec1" rows="1" cols="80" dir="ltr" readonly="yes">', $gedrec1, '</textarea><br />';
echo '<textarea name="newgedrec2" rows="20" cols="80" dir="ltr">', $gedrec2, "</textarea><br />";
if (WT_USER_IS_ADMIN) {
echo "<table class=\"facts_table\">"; | RTL: first line of record has wrong alignment in raw gedcom editing | fisharebest_webtrees | train | php |
cf5e9ae1334db75af53e8ef0874adfea31bce458 | diff --git a/src/Shader.js b/src/Shader.js
index <HASH>..<HASH> 100644
--- a/src/Shader.js
+++ b/src/Shader.js
@@ -62,10 +62,6 @@ class Shader {
const shader = this._shader = gl.createShader(glType);
gl.shaderSource(shader, this._code);
gl.compileShader(shader);
-
- if (process.env.NODE_ENV !== 'production' && !gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
- console.log(gl.getShaderInfoLog(shader));
- }
}
}
diff --git a/src/ShaderProgram.js b/src/ShaderProgram.js
index <HASH>..<HASH> 100644
--- a/src/ShaderProgram.js
+++ b/src/ShaderProgram.js
@@ -98,12 +98,6 @@ class ShaderProgram {
gl.linkProgram(this._webglProgram);
- if (process.env.NODE_ENV !== 'production' && !gl.getProgramParameter(this._webglProgram, gl.LINK_STATUS)) {
- console.error(gl.getProgramInfoLog(this._webglProgram));
- this._status = ShaderProgram.FAILED;
- return;
- }
-
this._status = ShaderProgram.READY;
for (const name in this.attributes) { | Remove shader get log methods (#<I>) | 2gis_2gl | train | js,js |
0b715a12124d8e4bab83c7fcf548393c8f94b70e | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -28,13 +28,15 @@ exports.attach = function (server) {
}
}
});
- var listener = io.listen(server, { log: false });
+ var sio = io.listen(server, { log: false });
var args = [].splice.call(arguments,1);
args.forEach(function (shell) {
- listener.of('/' + shell.namespace)
+ sio.of('/' + shell.namespace)
.on('connection', function (socket) {
socket.on('execute', function (cmdStr, context, options) {
console.log('%s: %s', shell.namespace, cmdStr);
+ if (!options) options = {};
+ options.socket = socket;
var result = shell.execute(cmdStr, context, options);
socket.emit('result', result);
}); | Added 'socket' property to options object before passing it to shotgun. This will allow shotgun command modules to access socket.io functionality if needed. | chevex-archived_shotgun-client | train | js |
332b2779e4c212a3c953fd1f2b42e9473cc669e0 | diff --git a/db/agents.go b/db/agents.go
index <HASH>..<HASH> 100644
--- a/db/agents.go
+++ b/db/agents.go
@@ -250,12 +250,20 @@ func (db *DB) UpdateAgent(agent *Agent) error {
func (db *DB) DeleteAgent(agent *Agent) error {
return db.exclusively(func() error {
- n, err := db.count(`SELECT uuid FROM jobs WHERE agent = ?`, agent.Address)
+ n, err := db.count(`SELECT uuid FROM targets WHERE agent = ?`, agent.Address)
if err != nil {
return fmt.Errorf("unable to determine if agent can be deleted: %s", err)
}
if n > 0 {
- return fmt.Errorf("agent is still referenced by configured data protection jobs")
+ return fmt.Errorf("agent is still referenced by configured data systems")
+ }
+
+ n, err = db.count(`SELECT uuid FROM stores WHERE agent = ?`, agent.Address)
+ if err != nil {
+ return fmt.Errorf("unable to determine if agent can be deleted: %s", err)
+ }
+ if n > 0 {
+ return fmt.Errorf("agent is still referenced by configured storage systems")
}
return db.exec(`DELETE FROM agents WHERE uuid = ?`, agent.UUID) | Fix Agent Deletion
- Agents cannot be deleted if they are referenced by a storage system
- Agents cannot be deleted if they are referenced by a target system
- Agents can be deleted otherwise
Fixes #<I> | starkandwayne_shield | train | go |
bc5f03187ba095344552152185a98a0a52214329 | diff --git a/Classes/ViewHelpers/ForViewHelper.php b/Classes/ViewHelpers/ForViewHelper.php
index <HASH>..<HASH> 100644
--- a/Classes/ViewHelpers/ForViewHelper.php
+++ b/Classes/ViewHelpers/ForViewHelper.php
@@ -73,7 +73,7 @@ class ForViewHelper extends \F3\Fluid\Core\ViewHelper\AbstractViewHelper {
$output = '';
if (is_object($each) && $each instanceof \SplObjectStorage) {
if ($key !== '') {
- return '!CANT USE KEY ON SPLOBJECTSTORAGE!';
+ return '';
}
$eachArray = array();
foreach ($each as $singleElement) {
@@ -81,7 +81,7 @@ class ForViewHelper extends \F3\Fluid\Core\ViewHelper\AbstractViewHelper {
}
$each = $eachArray;
} elseif (!is_array($each)) {
- return '!CANT ITERATE OVER EACH!';
+ return '';
}
if ($reverse === TRUE) { | [~BUGFIX] Fluid (ViewHelpers): Fixed a failing test of the For view helper introduced in the last commit.
Original-Commit-Hash: <I>c<I>d<I>a6c5c<I>d<I>e0e<I>ae<I>dd<I> | neos_fluid | train | php |
6e09f8678f713c858885f540d85f4466e934a689 | diff --git a/lyric.js b/lyric.js
index <HASH>..<HASH> 100755
--- a/lyric.js
+++ b/lyric.js
@@ -85,7 +85,22 @@ Processor = function() {
var processorName = mapped[0].processor
, processed = processor[processorName]();
-
+ if (argv.s) {
+ var script = 'tell application "iTunes" to set lyrics of current track to "' + processed + '"'
+ applescript.execString(script, function(err, rtn) {
+ if (err) {
+ console.log("===============");
+ console.log("SET LYRIC ERROR!");
+ console.log(err);
+ console.log("===============");
+ }
+ else {
+ console.log("===============");
+ console.log("SET LYRIC DONE!");
+ console.log("===============");
+ }
+ })
+ }
console.log(processed);
}
} | Add --set for set lyric for current song. | NAzT_node-lyric | train | js |
fa46970930e777c48ec6bb0c3f7c6c0aaa430deb | diff --git a/angr/cfg.py b/angr/cfg.py
index <HASH>..<HASH> 100644
--- a/angr/cfg.py
+++ b/angr/cfg.py
@@ -261,10 +261,14 @@ class CFG(CFGBase):
# Start execution!
simexit = self._project.exit_to(function_addr, state=symbolic_initial_state)
simrun = self._project.sim_run(simexit)
- exits = simrun.exits()
+ exits = simrun.flat_exits()
if exits:
- final_st = exits[-1].state
+ final_st = None
+ for ex in exits:
+ if ex.state.satisfiable():
+ final_st = ex.state
+ break
else:
final_st = None
diff --git a/tests/test_cfg.py b/tests/test_cfg.py
index <HASH>..<HASH> 100644
--- a/tests/test_cfg.py
+++ b/tests/test_cfg.py
@@ -108,6 +108,10 @@ def test_cfg_4():
import ipdb; ipdb.set_trace()
if __name__ == "__main__":
+ import sys
+
+ sys.setrecursionlimit(1000000)
+
logging.getLogger("simuvex.plugins.abstract_memory").setLevel(logging.DEBUG)
#logging.getLogger("simuvex.plugins.symbolic_memory").setLevel(logging.DEBUG)
logging.getLogger("angr.cfg").setLevel(logging.DEBUG) | fixed a bug in CFG that it may use unsatisfiable state to perform symbolic execution. | angr_angr | train | py,py |
d7c8f571a8fcc5d1471d215ad6d315569c25e775 | diff --git a/Controller/Wizard/EditorController.php b/Controller/Wizard/EditorController.php
index <HASH>..<HASH> 100644
--- a/Controller/Wizard/EditorController.php
+++ b/Controller/Wizard/EditorController.php
@@ -89,7 +89,6 @@ class EditorController
* name = "innova_path_editor_wizard",
* options = { "expose" = true }
* )
- * @Method("GET")
* @Template("InnovaPathBundle:Wizard:editor.html.twig")
*/
public function displayAction(Path $path)
diff --git a/Controller/Wizard/PlayerController.php b/Controller/Wizard/PlayerController.php
index <HASH>..<HASH> 100644
--- a/Controller/Wizard/PlayerController.php
+++ b/Controller/Wizard/PlayerController.php
@@ -59,7 +59,6 @@ class PlayerController
* defaults = { "stepId" = null },
* options = { "expose" = true }
* )
- * @Method("GET")
* @Template("InnovaPathBundle:Wizard:player.html.twig")
*/
public function displayAction(Path $path) | [PathBundle] do not restrict GET method to allow locale change in Path wizards | claroline_Distribution | train | php,php |
29cfb3c1ec9ee366157fefd958faaeb2b3cb2f09 | diff --git a/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php b/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php
index <HASH>..<HASH> 100644
--- a/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php
+++ b/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php
@@ -2,14 +2,15 @@
namespace LizardsAndPumpkins\Tax;
+use LizardsAndPumpkins\Product\Tax\TaxService;
use LizardsAndPumpkins\Product\Tax\TaxServiceLocator;
use LizardsAndPumpkins\Product\Tax\TaxServiceLocatorOptions;
class IntegrationTestTaxServiceLocator implements TaxServiceLocator
{
/**
- * @param \LizardsAndPumpkins\Product\Tax\TaxServiceLocatorOptions $options
- * @return \LizardsAndPumpkins\Product\Tax\TaxService
+ * @param TaxServiceLocatorOptions $options
+ * @return TaxService
*/
public function get(TaxServiceLocatorOptions $options)
{ | Issue #<I>: Import classes | lizards-and-pumpkins_catalog | train | php |
f9b871ff2785e994d66c4e325dffdaf8314b9cbb | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ try:
except ImportError:
requirements.append("elementtree")
-version = "0.9.5"
+version = "0.9.6"
f = open("README.rst")
try: | BUMP <I> mostly some fixes to the c extension to work around reloading issues that came up in SW production | mongodb_mongo-python-driver | train | py |
67838866c6c851adc8e39dbd20ff81a434cf6cc6 | diff --git a/core/src/main/java/hudson/util/RingBufferLogHandler.java b/core/src/main/java/hudson/util/RingBufferLogHandler.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/util/RingBufferLogHandler.java
+++ b/core/src/main/java/hudson/util/RingBufferLogHandler.java
@@ -51,7 +51,7 @@ public class RingBufferLogHandler extends Handler {
int len = records.length;
records[(start+size)%len]=record;
if(size==len) {
- start++;
+ start = (start+1)%len;
} else {
size++;
} | [FIXED JENKINS-<I>] RingBufferLogHandler has int that needs to be reset. | jenkinsci_jenkins | train | java |
80f95ceeddcb180bfe65d673f304c9decb19f484 | diff --git a/validator/sawtooth_validator/consensus/notifier.py b/validator/sawtooth_validator/consensus/notifier.py
index <HASH>..<HASH> 100644
--- a/validator/sawtooth_validator/consensus/notifier.py
+++ b/validator/sawtooth_validator/consensus/notifier.py
@@ -32,13 +32,13 @@ class _NotifierService:
self._consensus_registry = consensus_registry
def notify(self, message_type, message):
- if self._consensus_registry:
- message_bytes = bytes(message)
- futures = self._service.send_all(
+ active_engine = self._consensus_registry.get_active_engine_info()
+ if active_engine is not None:
+ self._service.send(
message_type,
- message_bytes)
- for future in futures:
- future.result()
+ bytes(message),
+ active_engine.connection_id
+ ).result()
class ErrorCode(IntEnum): | Only send updates to active engine in notifier
Updates the ConsensusNotifier to only send updates to the active
consensus engine. Previously, it sent notifications to all consensus
engines. | hyperledger_sawtooth-core | train | py |
34b229e99b219bc77e43c71372705c72a18dc6cc | diff --git a/resources/views/_template/master.blade.php b/resources/views/_template/master.blade.php
index <HASH>..<HASH> 100644
--- a/resources/views/_template/master.blade.php
+++ b/resources/views/_template/master.blade.php
@@ -10,6 +10,7 @@
{{ Html::script('https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js') }}
{{ Html::script('https://oss.maxcdn.com/respond/1.4.2/respond.min.js') }}
<![endif]-->
+ @yield('head')
</head>
<body class="fixed sidebar-mini skin-purple hold-transition">
<div class="wrapper">
@@ -42,6 +43,8 @@
@include('foundation::_template.sidebar-alt')
</div>
+ @yield('modals')
+
{{ Html::script('vendor/foundation/js/vendors.js') }}
{{ Html::script('vendor/foundation/js/app.js') }}
@yield('scripts') | Adding new sections: head & modals | ARCANESOFT_Foundation | train | php |
80975ccc5d1681ef8166457bb142ac90e7fc65ff | diff --git a/structr-ui/src/main/resources/structr/js/init.js b/structr-ui/src/main/resources/structr/js/init.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/init.js
+++ b/structr-ui/src/main/resources/structr/js/init.js
@@ -827,7 +827,7 @@ var Structr = {
var horizontalOffset = 98;
// needs to be calculated like this because the elements in the dialogHead (tabs) are floated and thus the .height() method returns 0
- var headerHeight = dialogText.position().top - dialogHead.position().top;
+ var headerHeight = (dialogText.position().top + dialogText.scrollParent().scrollTop()) - dialogHead.position().top;
$('#dialogBox .dialogTextWrapper').css({
width: (dw - 28) + 'px', | Bugfix: While calculating the dialog size, take into account that the content might be scrolled. Otherwise the resulting dialog size might be a lot bigger. | structr_structr | train | js |
d8c26c81659236ac61c08a252ce0b89df0b41917 | diff --git a/templates/bootstrap/ApiRenderer.php b/templates/bootstrap/ApiRenderer.php
index <HASH>..<HASH> 100644
--- a/templates/bootstrap/ApiRenderer.php
+++ b/templates/bootstrap/ApiRenderer.php
@@ -6,6 +6,7 @@
*/
namespace yii\apidoc\templates\bootstrap;
+
use yii\apidoc\models\Context;
use yii\console\Controller;
use Yii;
diff --git a/templates/bootstrap/GuideRenderer.php b/templates/bootstrap/GuideRenderer.php
index <HASH>..<HASH> 100644
--- a/templates/bootstrap/GuideRenderer.php
+++ b/templates/bootstrap/GuideRenderer.php
@@ -6,6 +6,7 @@
*/
namespace yii\apidoc\templates\bootstrap;
+
use Yii;
use yii\helpers\Html;
diff --git a/templates/bootstrap/RendererTrait.php b/templates/bootstrap/RendererTrait.php
index <HASH>..<HASH> 100644
--- a/templates/bootstrap/RendererTrait.php
+++ b/templates/bootstrap/RendererTrait.php
@@ -1,6 +1,8 @@
<?php
/**
- * @author Carsten Brandt <mail@cebe.cc>
+ * @link http://www.yiiframework.com/
+ * @copyright Copyright (c) 2008 Yii Software LLC
+ * @license http://www.yiiframework.com/license/
*/
namespace yii\apidoc\templates\bootstrap; | fixed file PHPdoc
issue #<I> | yiisoft_yii2-apidoc | train | php,php,php |
211d837d505a1bf59b302ade5453a0836929db9a | diff --git a/examples/logical_enclosures.py b/examples/logical_enclosures.py
index <HASH>..<HASH> 100644
--- a/examples/logical_enclosures.py
+++ b/examples/logical_enclosures.py
@@ -123,3 +123,27 @@ print("Get all logical enclosures")
logical_enclosures = oneview_client.logical_enclosures.get_all()
for enc in logical_enclosures:
print(' %s' % enc['name'])
+
+if oneview_client.api_version >= 300:
+
+ if logical_enclosures:
+
+ print("Update firmware for a logical enclosure with the logical-interconnect validation set as true.")
+
+ logical_enclosure = logical_enclosures[0]
+
+ logical_enclosure_updated = oneview_client.logical_enclosures.patch(
+ id_or_uri=logical_enclosure["uri"],
+ operation="replace",
+ path="/firmware",
+ value={
+ "firmwareBaselineUri": "/rest/firmware-drivers/SPPgen9snap6_2016_0405_87",
+ "firmwareUpdateOn": "EnclosureOnly",
+ "forceInstallFirmware": "true",
+ "validateIfLIFirmwareUpdateIsNonDisruptive": "true",
+ "logicalInterconnectUpdateMode": "Orchestrated",
+ "updateFirmwareOnUnmanagedInterconnect": "true"
+ }
+ )
+
+ pprint(logical_enclosure_updated) | Adds an example of how to use patch for Logical Enclosures | HewlettPackard_python-hpOneView | train | py |
9a4785404f7519ac64305ee5658e9aaebe169f51 | diff --git a/Service/Adapter/AmazonS3.php b/Service/Adapter/AmazonS3.php
index <HASH>..<HASH> 100644
--- a/Service/Adapter/AmazonS3.php
+++ b/Service/Adapter/AmazonS3.php
@@ -207,7 +207,11 @@ class AmazonS3 implements AdapterInterface{
$headers = $this->s3->get_object_headers($this->bucketName, $this->getPath($targetFile));
$header = $headers->header;
- $ctype = $header['content-type'];
+ if ($targetFile->getMimeType() != null) {
+ $ctype = $targetFile->getMimeType();
+ } else {
+ $ctype = $header['content-type'];
+ }
header('Cache-Control: public, max-age=0');
header('Expires: '.gmdate("D, d M Y H:i:s", time())." GMT"); | modify content-type returned by sendFileToBrowser | kitpages_KitpagesFileSystemBundle | train | php |
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.