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
|
---|---|---|---|---|---|
8e35d64890a5f1222b054ed86ad74f419b2769a8
|
diff --git a/src/js/AccessibilityUtils.js b/src/js/AccessibilityUtils.js
index <HASH>..<HASH> 100644
--- a/src/js/AccessibilityUtils.js
+++ b/src/js/AccessibilityUtils.js
@@ -279,7 +279,7 @@ axs.utils.isLargeFont = function(style) {
matches = fontSize.match(/(\d+)pt/);
if (matches) {
var fontSizePt = parseInt(matches[1], 10);
- if (bold && fontSizePt >= 14 || fontSizePt >= 14)
+ if (bold && fontSizePt >= 14 || fontSizePt >= 18)
return true;
return false;
}
|
Update AccessibilityUtils.js
Non-bold font needs to be <I>pt to be considered large.
<URL>
|
GoogleChrome_accessibility-developer-tools
|
train
|
js
|
9e38e00fcb9556dbc69d30d4b4239e9ac7945524
|
diff --git a/angr/analyses/decompiler/structurer.py b/angr/analyses/decompiler/structurer.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/decompiler/structurer.py
+++ b/angr/analyses/decompiler/structurer.py
@@ -577,6 +577,8 @@ class Structurer(Analysis):
# get the last node
the_block = block.nodes[-1]
return self._get_last_statement(the_block)
+ elif type(block) is ConditionalBreakNode:
+ return None
else:
raise NotImplementedError()
|
Structurer: _get_last_statement() should return None for ConditionalBreakNode.
|
angr_angr
|
train
|
py
|
751ef3621e18c6a2955887a72f4800b489ae1274
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -264,6 +264,7 @@ Array.prototype.pushIfAbsent = function(val) {
Array.prototype.concatIfAbsent = function(val) {
for (var i = 0; i < val.length; i += 1) {
+ if (val[i] == "Already closed") return ["Already closed"];
if (this.indexOf(val[i]) == -1) this.push(val[i]);
}
return this;
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -99,7 +99,7 @@ describe('#parse', function() {
it('should warn us if a ( is trailing', function() {
var result = parse('(a b) (');
- dEqual(result.warnings, ["Missing cmd", "Already closed"]);
+ dEqual(result.warnings, ["Already closed"]);
dEqual(result.tree, ['a', 'b']);
});
|
Force 'Already closed' to be the only warning
|
ClubExpressions_node-clubexpr
|
train
|
js,js
|
7324708378db3e13212696c8270672aa68572782
|
diff --git a/src/Patchwork/Controller/FrontController.php b/src/Patchwork/Controller/FrontController.php
index <HASH>..<HASH> 100644
--- a/src/Patchwork/Controller/FrontController.php
+++ b/src/Patchwork/Controller/FrontController.php
@@ -82,8 +82,6 @@ class FrontController implements ControllerProviderInterface
$js = file_get_contents($filename);
- $app['debug'] = false;
-
if (! $app['debug']) {
$response = Tools::staticResponse($filename, JSMin::minify($js));
} else {
|
oops, i did it again, i pushed it too far, boy that's too damn bad.
|
neemzy_patchwork-core
|
train
|
php
|
619f41d8447b29a1e9cff24671538704f9cb84ca
|
diff --git a/container.go b/container.go
index <HASH>..<HASH> 100644
--- a/container.go
+++ b/container.go
@@ -120,7 +120,7 @@ const (
// Supported resource types are Network and Request Types are Add/Remove
type ResourceModificationRequestResponse struct {
Resource ResourceType `json:"ResourceType"`
- Data string `json:"Settings"`
+ Data interface{} `json:"Settings"`
Request RequestType `json:"RequestType,omitempty"`
}
|
Change Data to interface in ResourceModificationRequestResponse
|
Microsoft_hcsshim
|
train
|
go
|
9a40c553da820c1d8e522f8409e13446ba75bd22
|
diff --git a/Swat/SwatFormField.php b/Swat/SwatFormField.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatFormField.php
+++ b/Swat/SwatFormField.php
@@ -70,6 +70,9 @@ class SwatFormField extends SwatContainer
*/
public function display()
{
+ if (!$this->visible)
+ return;
+
$first_child = $this->getChild(0);
if ($first_child === null)
|
Added visibility check
svn commit r<I>
|
silverorange_swat
|
train
|
php
|
cdc84e5f1d4ba11c9c18f3bb7a29eb3568efefd7
|
diff --git a/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php b/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php
index <HASH>..<HASH> 100644
--- a/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php
+++ b/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php
@@ -161,12 +161,12 @@ class AttributeData extends AbstractAttributeData implements DatasourceInterface
},
$relation['configurable_attributes']
);
-
- $parentData['configurable_attributes'] = array_unique(
- array_merge($configurableAttributesCodes, $parentData['configurable_attributes'])
+
+ $parentData['configurable_attributes'] = array_values(
+ array_unique(array_merge($configurableAttributesCodes, $parentData['configurable_attributes']))
);
}
- $parentData['children_attributes'] = array_unique($childrenAttributes);
+ $parentData['children_attributes'] = array_values(array_unique($childrenAttributes));
}
}
|
Fix #<I> : Indexing children attributes of bundle products.
|
Smile-SA_elasticsuite
|
train
|
php
|
0fef8ac2e2cb3d43e97c4be02b3b211ad50b7e5f
|
diff --git a/validator/tests/test_journal/block_tree_manager.py b/validator/tests/test_journal/block_tree_manager.py
index <HASH>..<HASH> 100644
--- a/validator/tests/test_journal/block_tree_manager.py
+++ b/validator/tests/test_journal/block_tree_manager.py
@@ -279,11 +279,8 @@ class BlockTreeManager(object):
def _get_block_id(self, block):
if block is None:
return None
- elif isinstance(block, Block) or\
- isinstance(block, BlockWrapper):
+ elif isinstance(block, (Block, BlockWrapper)):
return block.header_signature
- elif isinstance(block, basestring):
- return block
else:
return str(block)
|
basestring was removed from Python 3
This reformulation makes the test against basestring unnecessary (and avoids backslash line termination).
|
hyperledger_sawtooth-core
|
train
|
py
|
187417ca713201bb0478dc596f65a0aaef617885
|
diff --git a/classes/Boom/Page.php b/classes/Boom/Page.php
index <HASH>..<HASH> 100644
--- a/classes/Boom/Page.php
+++ b/classes/Boom/Page.php
@@ -71,14 +71,41 @@ class Page
return $this->_model->id;
}
+ /**
+ *
+ * @return \DateTimeImmutable
+ */
+ public function getVisibleFrom()
+ {
+ return new \DateTimeImmutable($this->_model->visible_from);
+ }
+
+ /**
+ *
+ * @return \DateTimeImmutable
+ */
+ public function getVisibleTo()
+ {
+ return new \DateTimeImmutable($this->_model->visible_to);
+ }
+
+ /**
+ *
+ * @return boolean
+ */
public function isVisible()
{
return $this->isVisibleAtTime(\Boom\Editor::instance()->getLiveTime());
}
+ /**
+ *
+ * @param int $unixTimestamp
+ * @return boolean
+ */
public function isVisibleAtTime($unixTimestamp)
{
- return ($this->_model->visible && $this->_model->visible_from <= $unixTimestamp && ($this->_model->visible_to >= $unixTimestamp || $this->_model->visible_to == 0));
+ return ($this->_model->visible && $this->getVisibleFrom()->getTimestamp() <= $unixTimestamp && ($this->getVisibleTo()->getTimestamp() >= $unixTimestamp || $this->getVisibleTo()->getTimestamp() == 0));
}
/**
|
Added \Boom\Page::getVisibleFrom() and \Boom\Page::getVisibleTo() methods which return DateTimeImmutable objects
|
boomcms_boom-core
|
train
|
php
|
a5ba0a0e7cc60d69ba0c8aac55d7f5ffee3b248f
|
diff --git a/src/Server.php b/src/Server.php
index <HASH>..<HASH> 100644
--- a/src/Server.php
+++ b/src/Server.php
@@ -75,4 +75,11 @@ class Server
? $_SERVER['QUERY_STRING']
: null;
}
+
+ public function httpLanguage()
+ {
+ return $this->exists('HTTP_ACCEPT_LANGUAGE')
+ ? $_SERVER['HTTP_ACCEPT_LANGUAGE']
+ : null;
+ }
}
\ No newline at end of file
|
Added method for getting HTTP_ACCEPT_LANGUAGE
|
g4code_predefined-variables
|
train
|
php
|
cc54f6be15d412b4fcb2a99d7bdf9244d756ce3e
|
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/transactions.rb
+++ b/activerecord/lib/active_record/transactions.rb
@@ -204,9 +204,8 @@ module ActiveRecord
#
# Note that "TRUNCATE" is also a MySQL DDL statement!
module ClassMethods
- # See ActiveRecord::Transactions::ClassMethods for detailed documentation.
+ # See the ConnectionAdapters::DatabaseStatements#transaction API docs.
def transaction(options = {}, &block)
- # See the ConnectionAdapters::DatabaseStatements#transaction API docs.
connection.transaction(options, &block)
end
|
fix doc about ActiveRecord::Transactions::ClassMethods#transaction [ci skip]
|
rails_rails
|
train
|
rb
|
0c8afcd0877895423dfdfbebf454813befc0a4ff
|
diff --git a/config/webpack.production.js b/config/webpack.production.js
index <HASH>..<HASH> 100644
--- a/config/webpack.production.js
+++ b/config/webpack.production.js
@@ -89,8 +89,12 @@ module.exports = {
exclude: /node_modules/,
use: [
MiniCssExtractPlugin.loader,
- 'css-loader',
- 'resolve-url-loader',
+ {
+ loader: 'css-loader',
+ options: {
+ url: false, // do not handle any url in scss/css
+ },
+ },
{
loader: 'postcss-loader',
options: {
@@ -129,7 +133,6 @@ module.exports = {
test: /\.min\.js$/i,
extractComments: false,
terserOptions: {
- sourceMap: true,
ecma: 8,
compress: {
warnings: false,
@@ -166,12 +169,20 @@ module.exports = {
from: 'plugin',
to: 'plugin',
},
+ {
+ from: 'src/font/summernote.*',
+ to: 'font/[base]',
+ },
],
}),
+ new webpack.SourceMapDevToolPlugin({
+ filename: '[file].map',
+ exclude: /\.min\./,
+ }),
new ZipPlugin({
filename: `summernote-${pkg.version}-dist.zip`,
}),
],
- devtool: 'source-map',
+ devtool: false,
};
|
Fix path and map problem on production build
|
summernote_summernote
|
train
|
js
|
ac95d255145007667979ea24e020469efde1e07e
|
diff --git a/lib/cf/version.rb b/lib/cf/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cf/version.rb
+++ b/lib/cf/version.rb
@@ -1,3 +1,3 @@
module CF
- VERSION = "4.0.0rc2".freeze
+ VERSION = "4.0.1.rc1".freeze
end
|
Bump to <I>.rc1
|
cloudfoundry-attic_cf
|
train
|
rb
|
37582002d3c63015c3063b23d3a996124c4f9a73
|
diff --git a/modules/wycs/src/wycs/testing/tests/ValidTests.java b/modules/wycs/src/wycs/testing/tests/ValidTests.java
index <HASH>..<HASH> 100644
--- a/modules/wycs/src/wycs/testing/tests/ValidTests.java
+++ b/modules/wycs/src/wycs/testing/tests/ValidTests.java
@@ -52,5 +52,6 @@ public class ValidTests extends TestHarness {
@Test public void Test_Valid_102() { verifyPassTest("test_102"); }
@Ignore("Known Issue") @Test public void Test_Valid_103() { verifyPassTest("test_103"); }
@Test public void Test_Valid_104() { verifyPassTest("test_104"); }
+ @Test public void Test_Valid_105() { verifyPassTest("test_105"); }
@Test public void Test_Valid_106() { verifyPassTest("test_106"); }
}
|
WYCS: working on an interesting case...
|
Whiley_WhileyCompiler
|
train
|
java
|
8fc5ccd8cd118216908a49d04a3ee56a2bcc905d
|
diff --git a/egoio/db_tables/model_draft.py b/egoio/db_tables/model_draft.py
index <HASH>..<HASH> 100644
--- a/egoio/db_tables/model_draft.py
+++ b/egoio/db_tables/model_draft.py
@@ -8011,7 +8011,7 @@ class EgoDemandPfLoadSingle(Base):
sign = Column(Float(53), server_default=text("'-1'::integer"))
e_annual = Column(Float(53))
- ego_grid_pf_hv_bu = relationship('EgoGridPfHvBu')
+ ego_grid_pf_hv_bu = relationship('EgoGridPfHvBus')
class EgoGridPfHvBusVMagSet(Base):
|
EgoGridPfHvBu to EgoGridPfHvBus
|
openego_ego.io
|
train
|
py
|
f31da75483e717718d2eb67613cb765965134751
|
diff --git a/lib/ui/src/core/shortcuts.js b/lib/ui/src/core/shortcuts.js
index <HASH>..<HASH> 100644
--- a/lib/ui/src/core/shortcuts.js
+++ b/lib/ui/src/core/shortcuts.js
@@ -101,11 +101,14 @@ export default function initShortcuts({ store }) {
if (!showNav) {
fullApi.toggleNav();
}
- const element = document.getElementById('storybook-explorer-searchfield');
- if (element) {
- element.focus();
- }
+ setTimeout(() => {
+ const element = document.getElementById('storybook-explorer-searchfield');
+
+ if (element) {
+ element.focus();
+ }
+ }, 0);
break;
}
|
Merge pull request #<I> from storybooks/fix/search-hotkey-keystroke
ADD a timeout around the `/` search hotkey, so it doesn't type into the input
|
storybooks_storybook
|
train
|
js
|
4a8554319f2457328330236dbce6c41a5f6c978f
|
diff --git a/mpv.py b/mpv.py
index <HASH>..<HASH> 100644
--- a/mpv.py
+++ b/mpv.py
@@ -537,6 +537,11 @@ def _mpv_client_api_version():
ver = backend.mpv_client_api_version()
return ver>>16, ver&0xFFFF
+MPV_VERSION = _mpv_client_api_version()
+if MPV_VERSION < (1, 108):
+ ver = '.'.join(str(num) for num in MPV_VERSION)
+ raise RuntimeError(f"python-mpv requires libmpv with an API version of 1.108 or higher (libmpv >= 0.33), but you have an older version ({ver}).")
+
backend.mpv_free.argtypes = [c_void_p]
_mpv_free = backend.mpv_free
|
Error for known-incompatible libmpv (closes #<I>)
|
jaseg_python-mpv
|
train
|
py
|
0beda7291237f829fd1622676006f81a45a1ccb4
|
diff --git a/src/components/Button/Button.react.js b/src/components/Button/Button.react.js
index <HASH>..<HASH> 100644
--- a/src/components/Button/Button.react.js
+++ b/src/components/Button/Button.react.js
@@ -23,7 +23,7 @@ type Props = {|
+href?: string,
+target?: string,
+isDropdownToggle?: boolean,
- +onClick?: (SyntheticMouseEvent<HTMLLinkElement>) => boolean,
+ +onClick?: (SyntheticMouseEvent<HTMLLinkElement>) => mixed,
|};
const Button = ({
|
Change Button onClick type to have mixed return so don't always have to specifically return something
|
tabler_tabler-react
|
train
|
js
|
23bad6ac523fdcdbb39e359fb034e3485f74f319
|
diff --git a/src/frame.js b/src/frame.js
index <HASH>..<HASH> 100644
--- a/src/frame.js
+++ b/src/frame.js
@@ -89,7 +89,8 @@ module.exports = (function () {
this.points.computeBoundingSphere();
var sphere = this.points.boundingSphere;
- var optimalDistance = sphere.radius * 1.5 / Math.tan(this.graph._fov / 2);
+ var optimalDistance = (
+ sphere.radius * 1.5 / Math.tan(this.graph._fov / 2));
this.camera.position.x = sphere.center.x + optimalDistance;
this.camera.position.y = sphere.center.y;
@@ -218,7 +219,8 @@ module.exports = (function () {
radiusPosition.unproject(self.camera);
var clickRadius = radiusPosition.distanceTo(mousePosition);
- var threshold = self.camera.far * clickRadius / self.camera.near;
+ var threshold = (
+ self.camera.far * clickRadius / self.camera.near);
raycaster.params.PointCloud.threshold = threshold;
|
Enforce line char limit a little
|
frewsxcv_graphosaurus
|
train
|
js
|
5b08eb632bb7b605196ca653e43afe43e1c38d93
|
diff --git a/src/NativeUI/Canvas/RemoteRenderer/index.js b/src/NativeUI/Canvas/RemoteRenderer/index.js
index <HASH>..<HASH> 100644
--- a/src/NativeUI/Canvas/RemoteRenderer/index.js
+++ b/src/NativeUI/Canvas/RemoteRenderer/index.js
@@ -36,11 +36,11 @@ export default class RemoteRenderer {
localTime: 0,
};
- this.renderOnIdle = () => {
+ this.renderOnIdle = (force = false) => {
if (this.__timeout === null) {
this.__timeout = setTimeout(() => {
- if (!this.render()) {
- this.renderOnIdle();
+ if (!this.render(force)) {
+ this.renderOnIdle(force);
}
}, 250);
}
@@ -49,8 +49,8 @@ export default class RemoteRenderer {
this.mouseListener = new VtkWebMouseListener(pvwClient);
this.mouseListener.setInteractionDoneCallback((interact) => {
this.quality = interact ? this.interactiveQuality : this.stillQuality;
- if (!this.render()) {
- this.renderOnIdle();
+ if (!this.render(!interact)) {
+ this.renderOnIdle(!interact);
}
});
}
|
fix(RemoteRenderer): Fix still render call to clear cache
|
Kitware_paraviewweb
|
train
|
js
|
9f3c592b772e8ba0d45e3353b2a0c7e640bff1bf
|
diff --git a/app/ui/components/editors/auth/o-auth-2.js b/app/ui/components/editors/auth/o-auth-2.js
index <HASH>..<HASH> 100644
--- a/app/ui/components/editors/auth/o-auth-2.js
+++ b/app/ui/components/editors/auth/o-auth-2.js
@@ -126,6 +126,7 @@ class OAuth2 extends PureComponent {
renderInputRow (label, property, onChange, handleAutocomplete = null) {
const {handleRender, handleGetRenderContext, request} = this.props;
const id = label.replace(/ /g, '-');
+ const type = !this.props.showPasswords && property === 'password' ? 'password' : 'text';
return (
<tr key={id}>
<td className="pad-right no-wrap valign-middle">
@@ -135,6 +136,7 @@ class OAuth2 extends PureComponent {
<div className="form-control form-control--underlined no-margin">
<OneLineEditor
id={id}
+ type={type}
onChange={onChange}
defaultValue={request.authentication[property] || ''}
render={handleRender}
|
OAuth password field should abide by password setting (#<I>)
|
getinsomnia_insomnia
|
train
|
js
|
8e5e717c334d1406b12ff050442dc193e351db8d
|
diff --git a/src/test/java/com/buschmais/jqassistant/plugin/maven3/test/rule/Maven3IT.java b/src/test/java/com/buschmais/jqassistant/plugin/maven3/test/rule/Maven3IT.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/buschmais/jqassistant/plugin/maven3/test/rule/Maven3IT.java
+++ b/src/test/java/com/buschmais/jqassistant/plugin/maven3/test/rule/Maven3IT.java
@@ -21,7 +21,7 @@ import com.buschmais.jqassistant.plugin.maven3.api.model.MavenProjectDirectoryDe
public class Maven3IT extends AbstractPluginIT {
@Test
- public void hierarchicalParentModuleRelation() throws AnalysisException {
+ public void hierarchicalParentModuleRelation() throws Exception {
store.beginTransaction();
MavenProjectDirectoryDescriptor parent = store.create(MavenProjectDirectoryDescriptor.class);
MavenProjectDirectoryDescriptor module1 = store.create(MavenProjectDirectoryDescriptor.class);
|
Added ConstraintBucket in addition to ConceptBucket.
|
buschmais_jqa-maven3-plugin
|
train
|
java
|
3eedbb74089e2af6a39feec54dfa3f541885f1d9
|
diff --git a/package.json b/package.json
index <HASH>..<HASH> 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-notice",
- "version": "0.6.6",
+ "version": "0.6.7",
"description": "An eslint rule that checks the top of files and --fix them too!",
"main": "index.js",
"directories": {
diff --git a/tests/lib/rules/fix-result-1.js b/tests/lib/rules/fix-result-1.js
index <HASH>..<HASH> 100644
--- a/tests/lib/rules/fix-result-1.js
+++ b/tests/lib/rules/fix-result-1.js
@@ -1,8 +1,8 @@
-
/**
* Copyright (c) 2018, Nick Deis
*/
+
function noStyle(){
return "I didn't read the style guide :(";
}
diff --git a/tests/lib/rules/fix-result-2.js b/tests/lib/rules/fix-result-2.js
index <HASH>..<HASH> 100644
--- a/tests/lib/rules/fix-result-2.js
+++ b/tests/lib/rules/fix-result-2.js
@@ -1,8 +1,8 @@
-
/**
* Copyright (c) 2018, Nick Deis
*/
+
/**
* Not exactly what I was looking for
*/
|
Updated unit tests in response to PR #7
|
nickdeis_eslint-plugin-notice
|
train
|
json,js,js
|
d14887ae17c156b70d94d492d6eec0664f911888
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -17,8 +17,6 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'gir_ffi-gtk3'
class Minitest::Test
- include RR::Adapters::TestUnit
-
def assert_nothing_raised
yield
assert true
|
Remove deprecated RR Adapter, silencing warning
|
mvz_gir_ffi-gtk
|
train
|
rb
|
0fadbfb4f89cec2d47c958994978448969d166d4
|
diff --git a/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java b/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java
index <HASH>..<HASH> 100644
--- a/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java
+++ b/invoice/src/main/java/org/killbill/billing/invoice/InvoiceDispatcher.java
@@ -315,8 +315,10 @@ public class InvoiceDispatcher {
lock = locker.lockWithNumberOfTries(LockerType.ACCNT_INV_PAY.toString(), accountId.toString(), invoiceConfig.getMaxGlobalLockRetries());
return processAccountWithLock(parkedAccount, accountId, targetDate, dryRunArguments, isRescheduled, context);
} catch (final LockFailedException e) {
- final boolean rescheduled = !isApiCall && invoiceOptimizer.rescheduleProcessAccount(accountId, context);
- if (!rescheduled) {
+ if (isApiCall) {
+ throw new InvoiceApiException(e, ErrorCode.UNEXPECTED_ERROR);
+ }
+ if (!invoiceOptimizer.rescheduleProcessAccount(accountId, context)) {
log.warn("Failed to process invoice for accountId='{}', targetDate='{}'", accountId.toString(), targetDate, e);
}
} finally {
|
invoice: Propogate lock exception when coming from api
|
killbill_killbill
|
train
|
java
|
82169f318dcc1824c4c19d220081f5ddb35dd3ea
|
diff --git a/commands/command_migrate_info.go b/commands/command_migrate_info.go
index <HASH>..<HASH> 100644
--- a/commands/command_migrate_info.go
+++ b/commands/command_migrate_info.go
@@ -41,7 +41,6 @@ var (
func migrateInfoCommand(cmd *cobra.Command, args []string) {
l := log.NewLogger(os.Stderr)
- defer l.Close()
db, err := getObjectDatabase()
if err != nil {
@@ -93,6 +92,7 @@ func migrateInfoCommand(cmd *cobra.Command, args []string) {
return b, nil
},
})
+ l.Close()
entries := EntriesBySize(MapToEntries(exts))
entries = removeEmptyEntries(entries)
|
close logger deliberately to flush remaining messages
|
git-lfs_git-lfs
|
train
|
go
|
cb2d61b2ecce1979c77d0be84ba18b8dab2118f2
|
diff --git a/src/instrumentTest/java/com/couchbase/lite/DatabaseTest.java b/src/instrumentTest/java/com/couchbase/lite/DatabaseTest.java
index <HASH>..<HASH> 100644
--- a/src/instrumentTest/java/com/couchbase/lite/DatabaseTest.java
+++ b/src/instrumentTest/java/com/couchbase/lite/DatabaseTest.java
@@ -1,5 +1,6 @@
package com.couchbase.lite;
+import com.couchbase.lite.internal.RevisionInternal;
import com.couchbase.lite.replicator.Replication;
import com.couchbase.lite.support.FileDirUtils;
@@ -153,7 +154,14 @@ public class DatabaseTest extends LiteTestCase {
assertEquals("baz", FileDirUtils.getDatabaseNameFromPath("foo/bar/baz.cblite"));
+ }
+ public void testEncodeDocumentJSON() throws Exception {
+ Map<String, Object> props = new HashMap<String, Object>();
+ props.put("_local_seq", "");
+ RevisionInternal revisionInternal = new RevisionInternal(props, database);
+ byte[] encoded = database.encodeDocumentJSON(revisionInternal);
+ assertNotNull(encoded);
}
|
Issue #<I> - test to reproduce the issue
<URL>
|
couchbase_couchbase-lite-android
|
train
|
java
|
a5696976694e88a350a364696350f2b52e3b7120
|
diff --git a/rest_framework_fine_permissions/management/commands/fine_permissions_load.py b/rest_framework_fine_permissions/management/commands/fine_permissions_load.py
index <HASH>..<HASH> 100644
--- a/rest_framework_fine_permissions/management/commands/fine_permissions_load.py
+++ b/rest_framework_fine_permissions/management/commands/fine_permissions_load.py
@@ -34,6 +34,17 @@ class Command(BaseCommand):
except ObjectDoesNotExist as e:
raise CommandError("This user doesn't exist in the database")
+ def add_permissions(user_field_permissions, content_type, name):
+
+ p = None
+ try:
+ p = FieldPermission.objects.get(content_type=content_type, name=name)
+ except ObjectDoesNotExist:
+ p = FieldPermission(content_type=content_type, name=name)
+ p.save()
+ finally:
+ user_field_permissions.permissions.add(p)
+
if len(args) !=1:
@@ -53,8 +64,9 @@ class Command(BaseCommand):
for f in fields_permissions:
content_type = ContentType.objects.get(app_label=f["app_label"], model=f["model"])
- p = FieldPermission.objects.get(content_type=content_type, name=f['name'])
- user_field_permissions.permissions.add(p)
+ add_permissions(user_field_permissions, content_type, f['name'])
+
+
except Exception as e:
raise CommandError(e)
|
create field permissions if doesnt exist in load command
|
unistra_django-rest-framework-fine-permissions
|
train
|
py
|
a2eefea46272e9c369e227af39cc80dfe35c1e9b
|
diff --git a/lib/Webforge/Setup/Installer/InstallTestSuitePart.php b/lib/Webforge/Setup/Installer/InstallTestSuitePart.php
index <HASH>..<HASH> 100644
--- a/lib/Webforge/Setup/Installer/InstallTestSuitePart.php
+++ b/lib/Webforge/Setup/Installer/InstallTestSuitePart.php
@@ -13,7 +13,7 @@ class InstallTestSuitePart extends ContainerAwarePart implements \Webforge\Frame
*/
protected $package;
- protected $testplateVersion = '>=1.3';
+ protected $testplateVersion = '1.*';
protected $installPHPUnitLocally = FALSE;
|
testplate-version: dunno how to pass this composer. change to 1.*
|
webforge-labs_webforge
|
train
|
php
|
64e3b36c33e73efbc70d3b95ddedf19e3166a696
|
diff --git a/Neos.Flow/Classes/Security/Context.php b/Neos.Flow/Classes/Security/Context.php
index <HASH>..<HASH> 100644
--- a/Neos.Flow/Classes/Security/Context.php
+++ b/Neos.Flow/Classes/Security/Context.php
@@ -884,8 +884,9 @@ class Context
*
* @param Account $account
* @param string $reason
+ * @return void
*/
- public function destroySessionsForAccount(Account $account, $reason = '')
+ public function destroySessionsForAccount(Account $account, string $reason = ''): void
{
$this->sessionManager->destroySessionsByTag($this->getSessionTagForAccount($account), $reason);
}
|
TASK: Add missing typeHints to destroySessionsForAccount
|
neos_flow-development-collection
|
train
|
php
|
3003744106dc9392571be8f4f73dc6ec9cf8dcf3
|
diff --git a/faq-bundle/src/Resources/contao/modules/ModuleFaq.php b/faq-bundle/src/Resources/contao/modules/ModuleFaq.php
index <HASH>..<HASH> 100644
--- a/faq-bundle/src/Resources/contao/modules/ModuleFaq.php
+++ b/faq-bundle/src/Resources/contao/modules/ModuleFaq.php
@@ -63,7 +63,7 @@ class ModuleFaq extends \Frontend
// Get the URL of the jumpTo page
if (!isset($arrProcessed[$objFaq->jumpTo]))
{
- $objParent = \PageModel::findByPk($objFaq->jumpTo);
+ $objParent = \PageModel::findWithDetails($objFaq->jumpTo);
// The target page does not exist
if ($objParent === null)
@@ -77,10 +77,19 @@ class ModuleFaq extends \Frontend
continue;
}
- // The target page is exempt from the sitemap (see #6418)
- if ($blnIsSitemap && $objParent->sitemap == 'map_never')
+ if ($blnIsSitemap)
{
- continue;
+ // The target page is protected (see #8416)
+ if ($objParent->protected)
+ {
+ continue;
+ }
+
+ // The target page is exempt from the sitemap (see #6418)
+ if ($objParent->sitemap == 'map_never')
+ {
+ continue;
+ }
}
// Generate the URL
|
[Faq] Check if a reader page is protected when generating a sitemap (see #<I>).
|
contao_contao
|
train
|
php
|
b76e085af4fe02429494e8180030ed2bbe28dca6
|
diff --git a/src/devtools/webpack/config/webpack.config.js b/src/devtools/webpack/config/webpack.config.js
index <HASH>..<HASH> 100644
--- a/src/devtools/webpack/config/webpack.config.js
+++ b/src/devtools/webpack/config/webpack.config.js
@@ -956,7 +956,9 @@ function createHtmlPlugin(
Object.assign(
{},
{
- inject: true,
+ inject:
+ currentProject.config.injectBundle !== false &&
+ String(process.env.INJECT_JS_BUNDLE) !== 'false',
filename,
template,
chunks: [
|
disable inject setting on html webpack plugin with an optional flag
|
skypager_skypager
|
train
|
js
|
f4a47864af6558bf2d7237c4eff1b5bd8bed5da0
|
diff --git a/test/functional/ft_46_launch_single.rb b/test/functional/ft_46_launch_single.rb
index <HASH>..<HASH> 100644
--- a/test/functional/ft_46_launch_single.rb
+++ b/test/functional/ft_46_launch_single.rb
@@ -34,13 +34,13 @@ class FtLaunchSingleTest < Test::Unit::TestCase
wfid,
@engine.storage.get('variables', 'singles')['h']['unique_process'].first)
- sleep 0.400
+ sleep 0.700
assert_not_nil @engine.process(wfid)
wfid1 = @engine.launch_single(pdef)
- sleep 0.400
+ sleep 0.700
assert_equal wfid, wfid1
assert_equal 1, @engine.processes.size
|
a bit more patient for ruote-couch
|
jmettraux_ruote
|
train
|
rb
|
ca31cc946de68bc7eb9a5b03601134a70e4b1564
|
diff --git a/explorer/app_settings.py b/explorer/app_settings.py
index <HASH>..<HASH> 100644
--- a/explorer/app_settings.py
+++ b/explorer/app_settings.py
@@ -28,7 +28,8 @@ EXPLORER_SQL_BLACKLIST = getattr(
'DELETE',
'CREATE TABLE',
'GRANT',
- 'OWNER TO'
+ 'OWNER TO',
+ 'SET'
)
)
|
Add SET to blacklisted keywords (#<I>)
|
groveco_django-sql-explorer
|
train
|
py
|
18b6390be606e6eac559489bb34e5dfc47a14168
|
diff --git a/baselines/deepq/build_graph.py b/baselines/deepq/build_graph.py
index <HASH>..<HASH> 100644
--- a/baselines/deepq/build_graph.py
+++ b/baselines/deepq/build_graph.py
@@ -33,7 +33,7 @@ The functions in this file can are used to create the following functions:
stochastic: bool
if set to False all the actions are always deterministic (default False)
update_eps_ph: float
- update epsilon a new value, if negative not update happens
+ update epsilon to a new value, if negative no update happens
(default: no update)
reset_ph: bool
reset the perturbed policy by sampling a new perturbation
|
Typo fix (#<I>)
|
openai_baselines
|
train
|
py
|
6d19a4a664914e908e75cfe90a0507cc9f53d1cd
|
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/ordered_hash.rb
+++ b/activesupport/lib/active_support/ordered_hash.rb
@@ -130,12 +130,10 @@ module ActiveSupport
end
def merge!(other_hash)
- other_hash.each do |k, v|
- if block_given? && key?(k)
- self[k] = yield k, self[k], v
- else
- self[k] = v
- end
+ if block_given?
+ other_hash.each { |k, v| self[k] = key?(k) ? yield(k, self[k], v) : v }
+ else
+ other_hash.each { |k, v| self[k] = v }
end
self
end
|
Change implementation to do it without asking each time for block_given?
|
rails_rails
|
train
|
rb
|
0c5667c484b99d822414aafc47b5ee1892518bea
|
diff --git a/salt/states/git.py b/salt/states/git.py
index <HASH>..<HASH> 100644
--- a/salt/states/git.py
+++ b/salt/states/git.py
@@ -86,14 +86,22 @@ def latest(name,
current_rev, new_rev)
else:
if os.path.isdir(target):
+ # git clone is required, but target exists -- however it is empty
+ if not os.listdir(target):
+ log.debug(
+ 'target {0} found, but not a git repository. Since empty,'
+ ' automatically deleting.'.format(target))
+ shutil.rmtree(target)
+ # git clone is required, target exists but force is turned on
+ elif force:
+ log.debug(
+ 'target {0} found, but not a git repository. Since force option'
+ ' is in use, deleting.'.format(target))
+ shutil.rmtree(target)
# git clone is required, but target exists and is non-empty
- if not force:
+ else:
return _fail(ret, 'Directory exists, is non-empty, and force '
'option not in use')
- log.debug(
- 'target {0} found, but not a git repository. force option'
- ' is in use, deleting {0}...'.format(target))
- shutil.rmtree(target)
else:
# git clone is required
log.debug(
|
Rework error messages. When cloning to existing but folder, automatically delete it.
|
saltstack_salt
|
train
|
py
|
ae8df0724a757af48be129e80e124662402d1c7f
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -109,7 +109,7 @@ setup(
author='Peter "fracpete" Reutemann',
author_email='pythonwekawrapper at gmail dot com',
install_requires=[
- "javabridge>=1.0.11",
+ "javabridge=1.0.11",
"numpy"
],
extras_require={
|
requires exact version of javabridge now (<I>)
|
fracpete_python-weka-wrapper
|
train
|
py
|
4023d8e480f2135d3829136ec2553fdd839ce9de
|
diff --git a/lib/review/pdfmaker.rb b/lib/review/pdfmaker.rb
index <HASH>..<HASH> 100644
--- a/lib/review/pdfmaker.rb
+++ b/lib/review/pdfmaker.rb
@@ -22,7 +22,7 @@ module ReVIEW
include FileUtils
include ReVIEW::LaTeXUtils
- def system(*args)
+ def system_or_raise(*args)
Kernel.system(*args) or raise("failed to run command: #{args.join(' ')}")
end
@@ -154,10 +154,10 @@ module ReVIEW
end
texcommand = config["texcommand"] || "platex"
3.times do
- system("#{texcommand} -kanji=#{kanji} book.tex")
+ system_or_raise("#{texcommand} -kanji=#{kanji} book.tex")
end
if File.exist?("book.dvi")
- system("dvipdfmx -d 5 book.dvi")
+ system_or_raise("dvipdfmx -d 5 book.dvi")
end
}
FileUtils.cp("#{@path}/book.pdf", "#{@basedir}/#{bookname}.pdf")
@@ -200,7 +200,7 @@ module ReVIEW
}
system("extractbb", *images)
unless system("extractbb", "-m", *images)
- system("ebb", *images)
+ system_or_raise("ebb", *images)
end
end
end
|
fix #<I>; allow to use original system() and customized system()
|
kmuto_review
|
train
|
rb
|
2c65d64f58da74d7fec8a46c293183f5cec8134f
|
diff --git a/motor/web.py b/motor/web.py
index <HASH>..<HASH> 100644
--- a/motor/web.py
+++ b/motor/web.py
@@ -38,7 +38,7 @@ import motor
class GridFSHandler(tornado.web.RequestHandler):
- """A handler that can serve content from `GridFS`_, very similar to
+ """A handler that can serve content from GridFS, very similar to
:class:`tornado.web.StaticFileHandler`.
.. code-block:: python
|
Remove some docstring markup that isn't working.
(cherry picked from commit 5e1c<I>)
|
mongodb_motor
|
train
|
py
|
60ad4e9ca34e12a29de76170a8b6ca746742a174
|
diff --git a/tasklib/backends.py b/tasklib/backends.py
index <HASH>..<HASH> 100644
--- a/tasklib/backends.py
+++ b/tasklib/backends.py
@@ -132,7 +132,10 @@ class TaskWarrior(Backend):
overrides.update(config_override or dict())
for item in overrides.items():
command_args.append('rc.{0}={1}'.format(*item))
- command_args.extend([x.decode('utf-8') for x in args])
+ command_args.extend([
+ x.decode('utf-8') if isinstance(x, six.binary_type)
+ else six.text_type(x) for x in args
+ ])
return command_args
def _get_version(self):
|
backend: Do not assume that all command arguments are (byte)strings
|
robgolding_tasklib
|
train
|
py
|
c29daf79b288ece725adced5f2c611a35d87a95e
|
diff --git a/shell/src/main/java/alluxio/shell/command/CommandUtils.java b/shell/src/main/java/alluxio/shell/command/CommandUtils.java
index <HASH>..<HASH> 100644
--- a/shell/src/main/java/alluxio/shell/command/CommandUtils.java
+++ b/shell/src/main/java/alluxio/shell/command/CommandUtils.java
@@ -12,7 +12,9 @@
package alluxio.shell.command;
import alluxio.AlluxioURI;
+import alluxio.Configuration;
import alluxio.Constants;
+import alluxio.PropertyKey;
import alluxio.client.file.FileSystem;
import alluxio.client.file.options.SetAttributeOptions;
import alluxio.exception.AlluxioException;
@@ -31,6 +33,9 @@ import javax.annotation.concurrent.ThreadSafe;
@ThreadSafe
public final class CommandUtils {
+ private static final DateFormat FORMATTER =
+ new SimpleDateFormat(Configuration.get(PropertyKey.USER_DATE_FORMAT_PATTERN));
+
private CommandUtils() {} // prevent instantiation
/**
@@ -59,8 +64,7 @@ public final class CommandUtils {
* @return formatted date String
*/
public static String convertMsToDate(long millis) {
- DateFormat formatter = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss:SSS");
- return formatter.format(new Date(millis));
+ return FORMATTER.format(new Date(millis));
}
/**
|
Use property in CommandUtils.
|
Alluxio_alluxio
|
train
|
java
|
9a2d4bc2ef2614eeb1fab5e65036dc101ad72c78
|
diff --git a/src/phar-stub.php b/src/phar-stub.php
index <HASH>..<HASH> 100644
--- a/src/phar-stub.php
+++ b/src/phar-stub.php
@@ -1,15 +1,11 @@
<?php
/**
- * HTML Compressor Stub.
+ * PHAR Stub.
*
- * @since 150421 Improving PHAR support.
- *
- * @author JasWSInc <https://github.com/jaswsinc>
- * @copyright WebSharks, Inc. <http://www.websharks-inc.com>
- * @license GNU General Public License, version 2
+ * @since 150424 Initial release.
*/
-namespace WebSharks\Core;
+namespace WebSharks\JsMinifier;
-\Phar::mapPhar('websharks-core.phar');
-require_once 'phar://websharks-core.phar/stub.php';
+\Phar::mapPhar('websharks-js-minifier.phar');
+require_once 'phar://websharks-js-minifier.phar/stub.php';
__HALT_COMPILER();
|
Adding phing build file.
|
wpsharks_js-minifier
|
train
|
php
|
d24a4ab56fe595bb1dd7b0af599e576440e0b68a
|
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -29,9 +29,9 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2022020800.00; // YYYYMMDD = weekly release date of this DEV branch.
+$version = 2022021100.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
-$release = '4.0dev+ (Build: 20220208)'; // Human-friendly version name
+$release = '4.0dev+ (Build: 20220211)'; // Human-friendly version name
$branch = '400'; // This version's branch.
$maturity = MATURITY_ALPHA; // This version's maturity level.
|
on-demand release <I>dev+
|
moodle_moodle
|
train
|
php
|
6b7514e107a36ef40c1fda00620f90568ea616d3
|
diff --git a/lib/node-progress.js b/lib/node-progress.js
index <HASH>..<HASH> 100644
--- a/lib/node-progress.js
+++ b/lib/node-progress.js
@@ -81,9 +81,7 @@ ProgressBar.prototype.tick = function(len, tokens){
// progress complete
if ((this.curr += len) >= this.total) {
this.complete = true;
- this.rl.clearLine();
- this.rl.resume();
- this.rl.close();
+ this.terminate();
return;
}
@@ -112,3 +110,14 @@ ProgressBar.prototype.tick = function(len, tokens){
this.rl.clearLine();
this.rl.write(str);
};
+
+/**
+ * Terminates a progress bar.
+ *
+ * @api public
+ */
+ProgressBar.prototype.terminate = function() {
+ this.rl.clearLine();
+ this.rl.resume();
+ this.rl.close();
+};
|
Added function to terminate progress bar operations
|
visionmedia_node-progress
|
train
|
js
|
c0d86895faddca3940498e6b87422b3c6601632a
|
diff --git a/vasppy/rdf.py b/vasppy/rdf.py
index <HASH>..<HASH> 100644
--- a/vasppy/rdf.py
+++ b/vasppy/rdf.py
@@ -33,7 +33,9 @@ class RadialDistributionFunction(object):
None
"""
- self_reference = (indices_j is None) or (indices_j == indices_i)
+ self_reference = (not indices_j) or (indices_j == indices_i)
+ if not indices_j:
+ indices_j = indices_i
self.nbins = nbins
self.range = (r_min, r_max)
self.intervals = np.linspace(r_min, r_max, nbins+1)
|
bugfix for single-species RDF calculation
Fixed indices_j not being assigned correctly in
RadialDistributionFunction is only indices_i was
provided.
|
bjmorgan_vasppy
|
train
|
py
|
441c6f449fe38096b43b982b1244de6821015a9b
|
diff --git a/atrcopy/ataridos.py b/atrcopy/ataridos.py
index <HASH>..<HASH> 100644
--- a/atrcopy/ataridos.py
+++ b/atrcopy/ataridos.py
@@ -249,7 +249,8 @@ class AtariDosDiskImage(DiskImageBase):
if self.header.image_size == 133120:
# enhanced density has 2nd VTOC
self.vtoc2 = 1024
- extra_free = self.get_sectors(self.vtoc2)[122:124].view(dtype='<u2')[0]
+ data, style = self.get_sectors(self.vtoc2)
+ extra_free = data[122:124].view(dtype='<u2')[0]
self.unused_sectors += extra_free
def get_directory(self):
@@ -314,7 +315,7 @@ class AtariDosDiskImage(DiskImageBase):
segments.append(segment)
if self.vtoc2 > 0:
start, count = self.get_contiguous_sectors(self.vtoc2, 1)
- segment = RawSectorsSegment(r[start:start+count], self.vtoc2, 1, count, self.header.sector_size, name="VTOC2")
+ segment = RawSectorsSegment(r[start:start+count], self.vtoc2, 1, count, 128, 3, self.header.sector_size, name="VTOC2")
segments.append(segment)
return segments
|
Fix for stale code in <I>k disk image support
|
robmcmullen_atrcopy
|
train
|
py
|
99842f1587401e116bdee0e851c93a14372177e1
|
diff --git a/Job/Job.php b/Job/Job.php
index <HASH>..<HASH> 100644
--- a/Job/Job.php
+++ b/Job/Job.php
@@ -35,7 +35,7 @@ abstract class Job implements JobInterface
abstract protected function run();
/**
- * @return string
+ * @return QueueName
*/
public function getJobName()
{
|
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL>
|
tavii_SQSJobQueue
|
train
|
php
|
04029663935bc8863a8d93cc83afb4bf29e535e1
|
diff --git a/examples/middleware/index.js b/examples/middleware/index.js
index <HASH>..<HASH> 100644
--- a/examples/middleware/index.js
+++ b/examples/middleware/index.js
@@ -1,20 +1,19 @@
var express = require('express'),
+ morgan = require('morgan'),
proxy = require('../../lib/proxy');
var app = express();
-app.configure(function() {
- app.use(express.favicon(false));
- app.use(express.logger('dev'));
- app.use(proxy.initialize({
- proxy: {
- 'forward': {
- '/channel': 'http://www.youtube.com'
- }
+app.use(morgan('dev'));
+app.use(proxy.initialize({
+ proxy: {
+ 'forward': {
+ '/channel': 'https://www.youtube.com'
}
- }));
- app.use(express.static(__dirname));
-});
+ }
+}));
+
+app.use(express.static(__dirname));
app.listen(5000);
console.log('listening on http://localhost:5000');
|
update middleware example to express 4.x
|
steve-jansen_json-proxy
|
train
|
js
|
75f6c4f6037df99d17e3079c1a49b9dd6dfeeca5
|
diff --git a/components/page/page.php b/components/page/page.php
index <HASH>..<HASH> 100644
--- a/components/page/page.php
+++ b/components/page/page.php
@@ -1,11 +1,31 @@
-<?
+<?php
+class Component_page extends Component
+{
+ public function init() {}
-class Component_page extends Component {
- function init() {
- }
-
- function controller_page($args) {
+ public function controller_page($args)
+ {
$vars["args"] = $args;
return $this->GetComponentResponse("./page.tpl", $vars);
}
+
+ public function component_sizelog($args)
+ {
+ $pandora = PandoraLog::singleton();
+ $session = SessionManager::singleton();
+
+ $size = array();
+ $size["timestamp"] = time();
+ $size["session_id"] = $session->flsid;
+ $size["fluid"] = $session->fluid;
+ $size["version"] = $this->root->version;
+ $size["width"] = $args["width"];
+ $size["height"] = $args["height"];
+ $size["result_view_id"] = $args["result_view_id"];
+
+ // add data
+ $pandora->addData("sizes", $size);
+ unset($size);
+ return '';
+ }
}
|
- Added page.sizelog controller. Doesn't seem to be called from any js yet.
|
jbaicoianu_elation
|
train
|
php
|
4600492d6006d89adb5a376541dda2a5e95e5881
|
diff --git a/src/Factories/WriterFactory.php b/src/Factories/WriterFactory.php
index <HASH>..<HASH> 100644
--- a/src/Factories/WriterFactory.php
+++ b/src/Factories/WriterFactory.php
@@ -2,6 +2,7 @@
namespace Maatwebsite\Excel\Factories;
+use Maatwebsite\Excel\Concerns\WithMultipleSheets;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Csv;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
@@ -27,7 +28,7 @@ class WriterFactory
{
$writer = IOFactory::createWriter($spreadsheet, $writerType);
- if ($export instanceof WithCharts) {
+ if (static::includesCharts($export)) {
$writer->setIncludeCharts(true);
}
@@ -55,4 +56,26 @@ class WriterFactory
return $writer;
}
+
+ /**
+ * @param $export
+ *
+ * @return bool
+ */
+ private static function includesCharts($export): bool
+ {
+ if ($export instanceof WithCharts) {
+ return true;
+ }
+
+ if ($export instanceof WithMultipleSheets) {
+ foreach ($export->sheets() as $sheet) {
+ if ($sheet instanceof WithCharts) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
}
|
Enable chart support for multi sheet exports
|
Maatwebsite_Laravel-Excel
|
train
|
php
|
2e6812c3d990f153d239b26f3e69668571f13520
|
diff --git a/django_summernote/views.py b/django_summernote/views.py
index <HASH>..<HASH> 100644
--- a/django_summernote/views.py
+++ b/django_summernote/views.py
@@ -11,6 +11,7 @@ def editor(request, id):
'id': id,
'toolbar': json.dumps(summernote_config['toolbar']),
'lang': summernote_config['lang'],
+ 'height': summernote_config['height'],
'url': {
'upload_attachment': reverse_lazy('django_summernote-upload_attachment'),
},
|
add height property of config to use at templates
|
summernote_django-summernote
|
train
|
py
|
a9f7646d964e97d6d2f18abee50f34adfcab38b7
|
diff --git a/CaptchaValidator.php b/CaptchaValidator.php
index <HASH>..<HASH> 100644
--- a/CaptchaValidator.php
+++ b/CaptchaValidator.php
@@ -41,7 +41,7 @@ class CaptchaValidator extends Validator
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function init()
{
@@ -52,7 +52,7 @@ class CaptchaValidator extends Validator
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
protected function validateValue($value)
{
@@ -82,7 +82,7 @@ class CaptchaValidator extends Validator
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function clientValidateAttribute($model, $attribute, $view)
{
@@ -93,7 +93,7 @@ class CaptchaValidator extends Validator
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getClientOptions($model, $attribute)
{
|
`@inheritdoc` notation changed
|
yiisoft_yii-captcha
|
train
|
php
|
0e87e1eb6c5cc5c0c3f8a39d5e652ab443a2129c
|
diff --git a/lib/utils/logger.js b/lib/utils/logger.js
index <HASH>..<HASH> 100644
--- a/lib/utils/logger.js
+++ b/lib/utils/logger.js
@@ -88,7 +88,7 @@ class LoggerConfiguration extends EventEmitter {
}
})
.catch(err => {
- console.log(`Unable to read logger configuration (will ignore), path=${path0}, error=${err.message}`);
+ log.warn(`Unable to read logger configuration (will ignore), path=${path0}, error=${err.message}`);
});
})
.then(configs => {
|
(saymon) logger-configurable: Improved logging.
|
untu_comedy
|
train
|
js
|
43b09bf96cb9e37e7a1921398bbbceee2b44f9a0
|
diff --git a/lib/short.js b/lib/short.js
index <HASH>..<HASH> 100644
--- a/lib/short.js
+++ b/lib/short.js
@@ -33,6 +33,12 @@ function hasher(URL) {
exports.connect = function (mongodb) {
mongoose.connect(mongodb);
+ mongoose.connection.on('open', function(){
+ console.log('mongodb connected');
+ });
+ mongoose.connection.on('error', function(error){
+ throw new Error(error);
+ })
};
/*!
@@ -43,7 +49,6 @@ exports.connect = function (mongodb) {
exports.gen = function (URL, callback) {
var hashedURL = hasher(URL);
-
var item = new ShortURL({
URL : URL,
hash : hashedURL
@@ -51,7 +56,7 @@ exports.gen = function (URL, callback) {
item.save(function (error, item) {
//Tries to save to mongodb, if it exists it retries
if (error && error.code === 11000) {
- console.log(hashedURL + " already exists! Retrying!");
+ console.log(hashedURL + ' already exists! Retrying!');
short.gen(URL, callback);
} else {
callback(null, item);
|
mongoose.connection.on(open|error)
|
edwardhotchkiss_short
|
train
|
js
|
019ef246e4828dc35fe8ae1661932c034b50d7b2
|
diff --git a/concrete/src/Routing/RouteActionFactory.php b/concrete/src/Routing/RouteActionFactory.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Routing/RouteActionFactory.php
+++ b/concrete/src/Routing/RouteActionFactory.php
@@ -25,7 +25,7 @@ class RouteActionFactory implements RouteActionFactoryInterface
$class = null;
$method = null;
if (is_string($action)) {
- list($class, $method) = explode('::', $action);
+ list($class, $method) = explode('::', $action . '::');
$method = $method ?: '__invoke';
} else {
$class = $action[0];
|
Avoid potential issue in RouteActionFactory::createAction()
|
concrete5_concrete5
|
train
|
php
|
b951f3a9334c4087b656b8576101948a50ab9c33
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@ setup(
author='Valentin Lab',
author_email='[email protected]',
url='http://github.com/vaab/colour',
- license='GPL License',
+ license='BSD License',
py_modules=['colour'],
data_files=['rgb.txt'],
namespace_packages=[],
|
fix: inconsistency in licence information (removed GPL mention). (fixes #8)
|
vaab_colour
|
train
|
py
|
7db81e09427708aa728e489c14490a04fc89b5cc
|
diff --git a/arctic/utils.py b/arctic/utils.py
index <HASH>..<HASH> 100755
--- a/arctic/utils.py
+++ b/arctic/utils.py
@@ -198,7 +198,7 @@ def get_field_class(qs, field_name):
Given a queryset and a field name, it will return the field's class
"""
try:
- qs.model._meta.get_field(field_name).__class__.__name__
+ return qs.model._meta.get_field(field_name).__class__.__name__
# while annotating, it's possible that field does not exists.
except FieldDoesNotExist:
return None
|
get_field_class does not return anything
|
sanoma_django-arctic
|
train
|
py
|
44b36aea473cdb0a53aa2cc885bd1b8d010388a3
|
diff --git a/rootpy/plotting/shapes.py b/rootpy/plotting/shapes.py
index <HASH>..<HASH> 100644
--- a/rootpy/plotting/shapes.py
+++ b/rootpy/plotting/shapes.py
@@ -6,10 +6,20 @@ from .core import Plottable
@snake_case_methods
+class Line(Plottable, QROOT.TLine):
+
+ def __init__(self, *args, **kwargs):
+
+ super(Line, self).__init__(*args)
+ self._post_init(**kwargs)
+
+
+@snake_case_methods
class Ellipse(Plottable, QROOT.TEllipse):
def __init__(self, *args, **kwargs):
- super(Ellipse, self).__init__(*args, **kwargs)
+ super(Ellipse, self).__init__(*args)
+ self._post_init(**kwargs)
#TODO: add more shapes here
|
add Line and use post_init
|
rootpy_rootpy
|
train
|
py
|
1c3cc138e495f8e7cf7c10ff314cc0c089954893
|
diff --git a/bokeh/session.py b/bokeh/session.py
index <HASH>..<HASH> 100644
--- a/bokeh/session.py
+++ b/bokeh/session.py
@@ -430,7 +430,12 @@ class PlotServerSession(BaseHTMLSession):
if self.root_url:
url = urlparse.urljoin(self.root_url, '/bokeh/userinfo/')
- self.userinfo = utils.get_json(self.http_session.get(url, verify=False))
+ try:
+ self.userinfo = utils.get_json(self.http_session.get(url, verify=False))
+ except requests.exceptions.ConnectionError:
+ print "Cannot connect to Bokeh server. (Not running?) To start the Bokeh server execute 'bokeh-server'"
+ import sys
+ sys.exit(1)
else:
logger.info('Not using a server, plots will only work in embedded mode')
self.userinfo = None
|
add better diagnostic message when Bokeh server cannot be reached
|
bokeh_bokeh
|
train
|
py
|
a37146b62928ed03ff3001333acdffe3b9011b30
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -10,7 +10,7 @@ function duplex (ws, opts) {
if(opts.binaryType)
ws.binaryType = opts.binaryType
else if(opts.binary)
- ws.binaryType = 'arraybuffer')
+ ws.binaryType = 'arraybuffer'
return {
source: exports.source(ws, opts && opts.onConnect),
sink: exports.sink(ws, opts),
|
oops, run the tests before publishing. you will find the systax errors
|
pull-stream_pull-ws
|
train
|
js
|
8362aef1d992f8a656471c7a8b7915d9f04aec8a
|
diff --git a/tests/unit/validatorDecorator.js b/tests/unit/validatorDecorator.js
index <HASH>..<HASH> 100644
--- a/tests/unit/validatorDecorator.js
+++ b/tests/unit/validatorDecorator.js
@@ -151,6 +151,16 @@ test('rules getter', () => {
expect(v1.rules).toBe(base.rules);
});
+test('pauses and resumes', () => {
+ const base = new Validator();
+ const v1 = new Decorator(base, { _uid: 0 });
+
+ v1.pause();
+ expect(v1._paused).toBe(true);
+ v1.resume();
+ expect(v1._paused).toBe(false);
+});
+
test('removes base instance when destroyed', () => {
const vm = { _uid: 0 };
const base = new Validator();
|
test: added pause() and resume() tests for the decorator
|
baianat_vee-validate
|
train
|
js
|
2424845fafc31a5f0c43d869727f0aec3038e3cb
|
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -5,9 +5,9 @@
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2003052900; // The current version is a date (YYYYMMDDXX)
+$version = 2003053000; // The current version is a date (YYYYMMDDXX)
-$release = "1.0.9"; // User-friendly version number
+$release = "1.1 development"; // User-friendly version number
?>
|
Let's move on, shall we? :-)
|
moodle_moodle
|
train
|
php
|
699b1792aacc8d008340be775fe94e8707dcac7b
|
diff --git a/lib/synonyms.js b/lib/synonyms.js
index <HASH>..<HASH> 100644
--- a/lib/synonyms.js
+++ b/lib/synonyms.js
@@ -27,7 +27,7 @@ module.exports = multiword({
// exactly the same. ===
equal: [
'equals', 'isEqual', 'is', 'strictEqual', 'strictEquals', 'strictIs',
- 'isStrict', 'isStrictly'
+ 'isStrict', 'isStrictly', 'identical'
],
// not equal. !==
|
(synonym) added 'identical' to same to create symmetry to 'equivalent' synonym on equal
|
tapjs_node-tap
|
train
|
js
|
cc5fcb9034bc66c748459424e7dc478b664b1132
|
diff --git a/install-stubs/Orchid/Layouts/Examples/RowExample.php b/install-stubs/Orchid/Layouts/Examples/RowExample.php
index <HASH>..<HASH> 100644
--- a/install-stubs/Orchid/Layouts/Examples/RowExample.php
+++ b/install-stubs/Orchid/Layouts/Examples/RowExample.php
@@ -4,6 +4,8 @@ namespace App\Orchid\Layouts\Examples;
use Orchid\Screen\Field;
use Orchid\Screen\Fields\Map;
+use Orchid\Screen\Fields\Matrix;
+use Orchid\Screen\Fields\Radio;
use Orchid\Screen\Fields\UTM;
use Orchid\Screen\Fields\Code;
use Orchid\Screen\Fields\Input;
@@ -169,6 +171,22 @@ class RowExample extends Rows
->fromModel(Role::class, 'name')
->title('Select one role'),
+ Radio::make('radio')
+ ->placeholder('Yes')
+ ->value(1)
+ ->title('Radio'),
+
+ Radio::make('radio')
+ ->placeholder('No')
+ ->value(0),
+
+ Matrix::make('matrix')
+ ->columns([
+ 'Attribute',
+ 'Value',
+ 'Units',
+ ]),
+
];
}
}
|
Added Radio and Matrix field for example
|
orchidsoftware_platform
|
train
|
php
|
e60ebf6c2667db34f28316493db3c75e5e87b0bf
|
diff --git a/mistletoe/core_tokens.py b/mistletoe/core_tokens.py
index <HASH>..<HASH> 100644
--- a/mistletoe/core_tokens.py
+++ b/mistletoe/core_tokens.py
@@ -23,12 +23,14 @@ def find_core_tokens(string):
c = string[i]
if c == '\\':
escaped = True
- elif (c == '*' or c == '_') and not escaped:
+ i += 1
+ continue
+ if (c == '*' or c == '_') and not escaped:
if not in_delimiter_run:
in_delimiter_run = True
start = i
elif in_delimiter_run:
- delimiters.append(Delimiter(start, i, string))
+ delimiters.append(Delimiter(start, i if not escaped else i-1, string))
in_delimiter_run = False
if not escaped:
if c == '[':
|
fixed: complications escaping emph delimiters
|
miyuchina_mistletoe
|
train
|
py
|
54bec7c318d818554081ff5b07254da5c6568d08
|
diff --git a/app/libraries/Setup/Menus.php b/app/libraries/Setup/Menus.php
index <HASH>..<HASH> 100644
--- a/app/libraries/Setup/Menus.php
+++ b/app/libraries/Setup/Menus.php
@@ -81,7 +81,7 @@ final class Menus extends Setup {
public function render_header_menu_toggle() {
$status = isset( $_GET['menu'] ) ? \sanitize_key( $_GET['menu'] ) : 'off';
- echo '<div class="menu-toggle screen-max-wide p">'
+ echo '<div class="menu-toggle screen-max-wide">'
. $this->skip_to( 'menu-screen-max-wide', \esc_html__( 'Skip to menu', 'jentil' ) )
. '<a class="js-mobile-menu-button hamburger" href="' . \esc_url( \add_query_arg( [
|
removed presentational .p class from menu toggle
|
GrottoPress_jentil
|
train
|
php
|
6f4f28451cfe4a2458e5cbee4746428a88085af7
|
diff --git a/go/bind/keybase.go b/go/bind/keybase.go
index <HASH>..<HASH> 100644
--- a/go/bind/keybase.go
+++ b/go/bind/keybase.go
@@ -367,6 +367,9 @@ func Reset() error {
if conn != nil {
conn.Close()
}
+ if !isInited() {
+ return nil
+ }
var err error
conn, err = kbCtx.LoopbackListener.Dial()
|
make sure we have been inited before reset (#<I>)
* make sure we have been inited before reset
* just dont hurt anyone
|
keybase_client
|
train
|
go
|
1b91de5798d10670da569aad2960b36d46aa0630
|
diff --git a/lib/chef/knife/list_essentials.rb b/lib/chef/knife/list_essentials.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/knife/list_essentials.rb
+++ b/lib/chef/knife/list_essentials.rb
@@ -50,8 +50,13 @@ class Chef
end
print_result_paths results
+ printed_something = results.length > 0
dir_results.each do |result, children|
- output ""
+ if printed_something
+ output ""
+ else
+ printed_something = true
+ end
output "#{format_path(result.path)}:"
print_results(children.map { |result| result.name }.sort, "")
end
@@ -97,7 +102,7 @@ class Chef
current_line = ''
results.each do |result|
if current_line.length > 0 && current_line.length + print_space > columns
- output current_line
+ output current_line.rstrip
current_line = ''
end
if current_line.length == 0
@@ -106,7 +111,7 @@ class Chef
current_line << result
current_line << (' ' * (print_space - result.length))
end
- output current_line if current_line.length > 0
+ output current_line.rstrip if current_line.length > 0
end
end
end
|
Strip trailing whitespace, get rid of leading empty line
|
jkeiser_knife-essentials
|
train
|
rb
|
1162e5cccee05674655328d20de63709ad43cffc
|
diff --git a/src/model/transactions/message.js b/src/model/transactions/message.js
index <HASH>..<HASH> 100644
--- a/src/model/transactions/message.js
+++ b/src/model/transactions/message.js
@@ -16,6 +16,12 @@ let prepare = function(common, tx) {
'type': 2,
'payload': CryptoHelpers.encode(common.privateKey, tx.recipientPublicKey, tx.message.toString())
};
+ } else if (tx.messageType === 2 && common.isHW) {
+ return {
+ 'type': 2,
+ 'payload': Convert.utf8ToHex(tx.message.toString()),
+ 'publicKey': tx.recipientPublicKey
+ };
} else if(tx.messageType === 0 && Helpers.isHexadecimal(tx.message.toString())) {
return {
'type': 1,
|
message: Allow encrypted messages with isHW
|
QuantumMechanics_NEM-sdk
|
train
|
js
|
35efa84117bc4b54ef3f8e870e6bd40f59a17c71
|
diff --git a/spaceship/lib/spaceship/version.rb b/spaceship/lib/spaceship/version.rb
index <HASH>..<HASH> 100644
--- a/spaceship/lib/spaceship/version.rb
+++ b/spaceship/lib/spaceship/version.rb
@@ -1,4 +1,4 @@
module Spaceship
- VERSION = "0.31.4".freeze
+ VERSION = "0.31.5".freeze
DESCRIPTION = "Ruby library to access the Apple Dev Center and iTunes Connect".freeze
end
|
[spaceship] Version bump (#<I>)
|
fastlane_fastlane
|
train
|
rb
|
4d39a253a6ad893632eb46c38309883ff134954f
|
diff --git a/Command/FlushTubeCommand.php b/Command/FlushTubeCommand.php
index <HASH>..<HASH> 100644
--- a/Command/FlushTubeCommand.php
+++ b/Command/FlushTubeCommand.php
@@ -53,7 +53,7 @@ class FlushTubeCommand extends ContainerAwareCommand
$pheanstalk->delete($job);
$numJobDelete++;
}
- } catch (Pheanstalk_Exception_PheanstalkException $ex) {
+ } catch (\Pheanstalk_Exception_ServerException $ex) {
}
@@ -63,7 +63,7 @@ class FlushTubeCommand extends ContainerAwareCommand
$pheanstalk->delete($job);
$numJobDelete++;
}
- } catch (Pheanstalk_Exception_PheanstalkException $ex) {
+ } catch (\Pheanstalk_Exception_ServerException $ex) {
}
@@ -73,7 +73,7 @@ class FlushTubeCommand extends ContainerAwareCommand
$pheanstalk->delete($job);
$numJobDelete++;
}
- } catch (Pheanstalk_Exception_PheanstalkException $ex) {
+ } catch (\Pheanstalk_Exception_ServerException $ex) {
}
|
Fixed FlushTube Command by catching the correct Exception
|
armetiz_LeezyPheanstalkBundle
|
train
|
php
|
624fbfd474ae3a2d1ceb29fe041f9045a8ccbcb3
|
diff --git a/Chart.js b/Chart.js
index <HASH>..<HASH> 100755
--- a/Chart.js
+++ b/Chart.js
@@ -8,7 +8,7 @@
*/
//Define the global Chart Variable as a class.
-var Chart = function(context){
+window.Chart = function(context){
var chart = this;
|
Explicit global definition
Some script bundlers such as Browserify compile a wrapper function over the modules. If var-statement is used to define the global it will be hidden inside it. Use window-global to define Chart global explicitly.
|
chartjs_Chart.js
|
train
|
js
|
6892ee2fab1e2a048aebfc560c43ba74d23e2136
|
diff --git a/cf_http.go b/cf_http.go
index <HASH>..<HASH> 100644
--- a/cf_http.go
+++ b/cf_http.go
@@ -1,6 +1,7 @@
package cf_http
import (
+ "net"
"net/http"
"time"
)
@@ -20,3 +21,13 @@ func NewClient() *http.Client {
Timeout: config.Timeout,
}
}
+
+func NewStreamingClient() *http.Client {
+ return &http.Client{
+ Transport: &http.Transport{
+ Dial: (&net.Dialer{
+ KeepAlive: 10 * time.Second,
+ }).Dial,
+ },
+ }
+}
|
add streaming http client
sets no timeout, but configures <I> second keepalive
[#<I>]
|
cloudfoundry_cfhttp
|
train
|
go
|
6a603d90d9173eaca44e4aee381036960dd0d78b
|
diff --git a/lib/cli.js b/lib/cli.js
index <HASH>..<HASH> 100755
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -68,10 +68,9 @@ function pre() {
function init() {
var env = require('yeoman-environment').createEnv();
- // alias any single namespace to `*:all` and `webapp` namespace specifically
- // to webapp:app.
+ // DEPRECATED
+ // TODO: remove in the future
env.alias(/^([^:]+)$/, '$1:all');
- env.alias(/^([^:]+)$/, '$1:app');
env.on('error', function (err) {
console.error('Error', process.argv.slice(2).join(' '), '\n');
|
remove env.alias for `app` as it's already defined in yeoman-environment
<URL>
|
yeoman_yo
|
train
|
js
|
78c94fcd493e41e35dffe76beea7e02b2064db9d
|
diff --git a/src/IncludeOperatorInterface.php b/src/IncludeOperatorInterface.php
index <HASH>..<HASH> 100644
--- a/src/IncludeOperatorInterface.php
+++ b/src/IncludeOperatorInterface.php
@@ -13,4 +13,4 @@ interface IncludeOperatorInterface
*/
public function getOperator();
-}
\ No newline at end of file
+}
diff --git a/src/Worker/KeeperInterface.php b/src/Worker/KeeperInterface.php
index <HASH>..<HASH> 100644
--- a/src/Worker/KeeperInterface.php
+++ b/src/Worker/KeeperInterface.php
@@ -4,8 +4,6 @@
namespace DeltaPhp\Operator\Worker;
-use DeltaPhp\Operator\Entity\EntityInterface;
-
interface KeeperInterface
{
public function get($id);
|
small fixes errors from check insight.sensiolabs.com
|
mrdatamapper_akademiano-entity-operator
|
train
|
php,php
|
9c497f73c9f6ea6f922b3a360d74783b2685edb8
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -10,7 +10,7 @@ module.exports = function precompile(obj) {
file.contents = new Buffer(handlebars.precompile(file.contents.toString('utf8')), settings);
file.defineModuleOptions = {
require: {
- Handlebars: 'handlebars'
+ Handlebars: 'handlebars/handlebars.runtime.js'
},
context: {
handlebars: 'Handlebars.template(<%= contents %>)'
|
use runtime of handlebars after compilation
|
justusromijn_gulp-precompile-handlebars
|
train
|
js
|
3bfb70db243d35b969eba9781dec619b7c52be98
|
diff --git a/commands.go b/commands.go
index <HASH>..<HASH> 100644
--- a/commands.go
+++ b/commands.go
@@ -975,6 +975,7 @@ func (srv *Server) CmdRun(stdin io.ReadCloser, stdout rcli.DockerConn, args ...s
}
Debugf("Waiting for attach to return\n")
<-attachErr
+ container.Wait()
// Expecting I/O pipe error, discarding
return nil
}
|
Wait for the container terminate at the end of CmdRun
Fixes the race condition between docker run and docker logs from #<I>.
|
moby_moby
|
train
|
go
|
94a65447a3ee6f97bccd21ce92dbd79acbc634e8
|
diff --git a/aeron-client/src/main/java/io/aeron/Aeron.java b/aeron-client/src/main/java/io/aeron/Aeron.java
index <HASH>..<HASH> 100644
--- a/aeron-client/src/main/java/io/aeron/Aeron.java
+++ b/aeron-client/src/main/java/io/aeron/Aeron.java
@@ -1526,7 +1526,8 @@ public class Aeron implements AutoCloseable
}
catch (final InterruptedException ex)
{
- LangUtil.rethrowUnchecked(ex);
+ Thread.currentThread().interrupt();
+ throw new AeronException("unexpected interrupt", ex);
}
}
}
diff --git a/aeron-client/src/main/java/io/aeron/ClientConductor.java b/aeron-client/src/main/java/io/aeron/ClientConductor.java
index <HASH>..<HASH> 100644
--- a/aeron-client/src/main/java/io/aeron/ClientConductor.java
+++ b/aeron-client/src/main/java/io/aeron/ClientConductor.java
@@ -1167,10 +1167,10 @@ class ClientConductor implements Agent
return;
}
- if (Thread.interrupted())
+ if (Thread.currentThread().isInterrupted())
{
isTerminating = true;
- LangUtil.rethrowUnchecked(new InterruptedException());
+ throw new AeronException("unexpected interrupt");
}
}
while (deadlineNs - nanoClock.nanoTime() > 0);
|
[Java] Throw an AeronException on interrupt Aeron client when awaiting an action given the InterruptedException is not declared and agents silently exit on interrupted exceptions.
|
real-logic_aeron
|
train
|
java,java
|
c2449970e12da9d48df3df6a538230d351f9cbb7
|
diff --git a/src/Sylius/Component/Resource/Model/TranslatableTrait.php b/src/Sylius/Component/Resource/Model/TranslatableTrait.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Component/Resource/Model/TranslatableTrait.php
+++ b/src/Sylius/Component/Resource/Model/TranslatableTrait.php
@@ -78,11 +78,17 @@ trait TranslatableTrait
return $translation;
}
- $fallbackTranslation = $this->translations->get($this->fallbackLocale);
- if (null !== $fallbackTranslation) {
- $this->translationsCache[$this->fallbackLocale] = $fallbackTranslation;
+ if ($locale !== $this->fallbackLocale) {
+ if (isset($this->translationsCache[$this->fallbackLocale])) {
+ return $this->translationsCache[$this->fallbackLocale];
+ }
- return $fallbackTranslation;
+ $fallbackTranslation = $this->translations->get($this->fallbackLocale);
+ if (null !== $fallbackTranslation) {
+ $this->translationsCache[$this->fallbackLocale] = $fallbackTranslation;
+
+ return $fallbackTranslation;
+ }
}
$translation = $this->createTranslation();
|
Prevent extra translation lookup if locale is same as fallback locale
|
Sylius_Sylius
|
train
|
php
|
cee2374849bda8d90cce479a4b9bec1615f815db
|
diff --git a/src/Handlers/MarkdownHandler.php b/src/Handlers/MarkdownHandler.php
index <HASH>..<HASH> 100644
--- a/src/Handlers/MarkdownHandler.php
+++ b/src/Handlers/MarkdownHandler.php
@@ -34,6 +34,10 @@ class MarkdownHandler
);
}
+ if (! $data->extends) {
+ return;
+ }
+
return [
new OutputFile(
$file->getRelativePath(),
|
Support collection items that don't use templates
|
tightenco_jigsaw
|
train
|
php
|
62c84a6096717a9c54eca726f54088db742560a7
|
diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/client/ssh/__init__.py
+++ b/salt/client/ssh/__init__.py
@@ -691,7 +691,8 @@ class Single(object):
debug = '1'
ssh_py_shim_args = []
for mod in self.mods:
- ssh_py_shim_args += ['--{0}'.format(mod), '{0}'.format(self.mods[mod])]
+ if self.mods[mod]:
+ ssh_py_shim_args += ['--{0}'.format(mod), '{0}'.format(self.mods[mod])]
ssh_py_shim_args += [
'--config', self.minion_config,
|
Check the validity of the entry before commiting the arg
|
saltstack_salt
|
train
|
py
|
6721d8e9642961a39c5cc73343c487cdf922bff0
|
diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb
index <HASH>..<HASH> 100644
--- a/plugins/communicators/ssh/communicator.rb
+++ b/plugins/communicators/ssh/communicator.rb
@@ -170,7 +170,12 @@ module VagrantPlugins
stdout = ""
stderr = ""
exit_status = connect do |connection|
- shell_execute(connection, command, opts[:sudo], opts[:shell]) do |type, data|
+ shell_opts = {
+ sudo: opts[:sudo],
+ shell: opts[:shell],
+ }
+
+ shell_execute(connection, command, **shell_opts) do |type, data|
if type == :stdout
stdout += data
elsif type == :stderr
@@ -390,7 +395,15 @@ module VagrantPlugins
end
# Executes the command on an SSH connection within a login shell.
- def shell_execute(connection, command, sudo=false, shell=nil)
+ def shell_execute(connection, command, **opts)
+ opts = {
+ sudo: false,
+ shell: nil
+ }.merge(opts)
+
+ sudo = opts[:sudo]
+ shell = opts[:shell]
+
@logger.info("Execute: #{command} (sudo=#{sudo.inspect})")
exit_status = nil
|
communicators/ssh: just use Ruby <I> features
|
hashicorp_vagrant
|
train
|
rb
|
86eb7ddd433158c16bb6362ee3b37c43385dba70
|
diff --git a/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/button/ButtonCheckSet.java b/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/button/ButtonCheckSet.java
index <HASH>..<HASH> 100644
--- a/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/button/ButtonCheckSet.java
+++ b/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/button/ButtonCheckSet.java
@@ -148,7 +148,7 @@ public class ButtonCheckSet<T extends Serializable> extends Panel implements IWi
*
* @param id
* Wicket identifiant
- * @param radios
+ * @param checks
* List of checks
*/
public ButtonCheckSet(String id, List< ? extends ButtonElement<T>> checks)
@@ -161,7 +161,7 @@ public class ButtonCheckSet<T extends Serializable> extends Panel implements IWi
*
* @param id
* Wicket identifiant
- * @param radios
+ * @param checks
* List of checks
* @param model
* Model of the default object
|
fixing small javadoc inconsistencies
svn path=/trunk/; revision=<I>
|
WiQuery_wiquery
|
train
|
java
|
96a4eb0c3da8d71f4f1b3529a29d2a78c720779f
|
diff --git a/lib/bugsnag/rails.rb b/lib/bugsnag/rails.rb
index <HASH>..<HASH> 100644
--- a/lib/bugsnag/rails.rb
+++ b/lib/bugsnag/rails.rb
@@ -15,8 +15,10 @@ module Bugsnag
ActionController::Base.send(:include, Bugsnag::Rails::ActionControllerRescue)
ActionController::Base.send(:include, Bugsnag::Rails::ControllerMethods)
end
- if defined?(ActiveRecord::Base)
- ActiveRecord::Base.send(:include, Bugsnag::Rails::ActiveRecordRescue)
+ if defined?(ActiveRecord::Base) && Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new("4.3")
+ unless ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks) && ActiveRecord::Base.raise_in_transactional_callbacks
+ ActiveRecord::Base.send(:include, Bugsnag::Rails::ActiveRecordRescue)
+ end
end
Bugsnag.configure do |config|
|
Dont log txn callback errors on <I>+
On Active Record <I>+ we start no swallowing the errors on
commit/rollback callbacks, so we dont need to handle them specially on
bugsnag.
Note: on <I> there is a option that needs to be +true+ for bring the new behaviour:
`ActiveRecord::Base.raise_in_transactional_callbacks`
see on Rails 5:
<URL>
|
bugsnag_bugsnag-ruby
|
train
|
rb
|
0ad7694c657a6d4c31fc93927682c13b0757c7b0
|
diff --git a/src/Bedrock/Http/Middleware/CallableMiddleware.php b/src/Bedrock/Http/Middleware/CallableMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Bedrock/Http/Middleware/CallableMiddleware.php
+++ b/src/Bedrock/Http/Middleware/CallableMiddleware.php
@@ -43,8 +43,13 @@ class CallableMiddleware implements MiddlewareInterface
{
$fn = $this->callable;
if (!$this->callable instanceof Closure) {
- $fn();
- return $handler->handle($request);
+ $return = call_user_func_array($fn, [$request, $handler]);
+ if (null === $return) {
+ return $handler->handle($request);
+ } else {
+ return $return;
+ }
+// $fn();
}
return $fn($request, $handler);
}
|
allow class with __invoke to be wrapped around CallableMiddleware
|
peakphp_framework
|
train
|
php
|
79c49d1cc0f0654eb7fa3a4aa0150d418987c249
|
diff --git a/lib/fog/openstack/requests/compute/create_image.rb b/lib/fog/openstack/requests/compute/create_image.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/openstack/requests/compute/create_image.rb
+++ b/lib/fog/openstack/requests/compute/create_image.rb
@@ -9,7 +9,7 @@ module Fog
'metadata' => metadata
}}
data = server_action(server_id, body)
- image_id = data.headers["Location"].scan(/.*\/(.*)/).flatten
+ image_id = data.headers["Location"].scan(/.*\/(.*)/).flatten[0]
get_image_details(image_id)
end
|
[openstack|compute] Fixed creating image of a server
|
fog_fog
|
train
|
rb
|
1372a584f62d1d94094bfe45d4c1e34d0d22278b
|
diff --git a/opal/browser/dom/element.rb b/opal/browser/dom/element.rb
index <HASH>..<HASH> 100644
--- a/opal/browser/dom/element.rb
+++ b/opal/browser/dom/element.rb
@@ -244,7 +244,11 @@ class Element < Node
end
elsif Browser.loaded? 'Sizzle'
def css(path)
- NodeSet.new(document, `Sizzle(#{path}, #@native)`)
+ begin
+ NodeSet.new(document, `Sizzle(path, #@native)`)
+ rescue
+ NodeSet.new(document)
+ end
end
else
def css(selector)
|
dom/element: catch errors coming up from Sizzle in #css
|
opal_opal-browser
|
train
|
rb
|
245a7f78719d1359c81261deb9ef5007d07c46d5
|
diff --git a/packages/env/index.js b/packages/env/index.js
index <HASH>..<HASH> 100644
--- a/packages/env/index.js
+++ b/packages/env/index.js
@@ -6,3 +6,4 @@ if (fs.existsSync(path.join(process.cwd(), '.env.example'))) {
} else if (fs.existsSync(path.join(process.cwd(), '.env'))) {
require('dotenv').config();
}
+process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
Set NODE_ENV to production if its undefined
|
Sharaal_dnode
|
train
|
js
|
515a66b4cdb2a3f7ab3b39094d695840400523c1
|
diff --git a/src/Model/PaperclipTrait.php b/src/Model/PaperclipTrait.php
index <HASH>..<HASH> 100644
--- a/src/Model/PaperclipTrait.php
+++ b/src/Model/PaperclipTrait.php
@@ -148,6 +148,22 @@ trait PaperclipTrait
}
/**
+ * Overridden to prevent attempts to persist attachment attributes directly.
+ *
+ * Reason this is required: Laravel 5.5 changed the getDirty() behavior.
+ *
+ * {@inheritdoc}
+ */
+ protected function originalIsEquivalent($key, $current)
+ {
+ if (array_key_exists($key, $this->attachedFiles)) {
+ return true;
+ }
+
+ return parent::originalIsEquivalent($key, $current);
+ }
+
+ /**
* Return the image paths for a given attachment.
*
* @param string $attachmentName
|
Added Laravel <I> fix for getDirty() change
|
czim_laravel-paperclip
|
train
|
php
|
dd43d903c5ab3e56584a661f7f43ee53a2184a84
|
diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/app/controllers/application_controller.rb
+++ b/spec/dummy/app/controllers/application_controller.rb
@@ -2,6 +2,4 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
-
- helper MyEngine::Engine.helpers
end
|
removed unneeded helper call in dummy app application controller
|
wearefine_fae
|
train
|
rb
|
51ea6f98e4616f2e361c9e80e1a54afa3130c72b
|
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -55,7 +55,7 @@ repo_name = u"dtool-cli"
# built documents.
#
# The short X.Y version.
-version = u"0.2.0"
+version = u"0.3.0"
# The full version, including alpha/beta/rc tags.
release = version
diff --git a/dtool_cli/__init__.py b/dtool_cli/__init__.py
index <HASH>..<HASH> 100644
--- a/dtool_cli/__init__.py
+++ b/dtool_cli/__init__.py
@@ -1,3 +1,3 @@
"""dtool_cli module."""
-__version__ = "0.2.0"
+__version__ = "0.3.0"
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
url = "https://github.com/jic-dtool/dtool-cli"
-version = "0.2.0"
+version = "0.3.0"
readme = open('README.rst').read()
setup(
|
Update version number to <I>
|
jic-dtool_dtool-cli
|
train
|
py,py,py
|
1fa39960c1cb406fc4741990db553948201e964d
|
diff --git a/packages/cli/src/lingui-compile.js b/packages/cli/src/lingui-compile.js
index <HASH>..<HASH> 100644
--- a/packages/cli/src/lingui-compile.js
+++ b/packages/cli/src/lingui-compile.js
@@ -41,7 +41,7 @@ function command(config, format, options) {
console.log("Compiling message catalogs…")
return locales.map(locale => {
- const [language] = locale.split("_")
+ const [language] = locale.split(/[_-]/)
if (!plurals[language]) {
console.log(
chalk.red(
|
fix: support locales with hyphens in cli compile (#<I>)
|
lingui_js-lingui
|
train
|
js
|
00ab67cb272a4288bedbbdeba0ec878bd2b3cbcc
|
diff --git a/lib/modules/apostrophe-utils/lib/api.js b/lib/modules/apostrophe-utils/lib/api.js
index <HASH>..<HASH> 100644
--- a/lib/modules/apostrophe-utils/lib/api.js
+++ b/lib/modules/apostrophe-utils/lib/api.js
@@ -341,15 +341,15 @@ module.exports = function(self, options) {
self.bless = function(req, options /* , arg2, arg3... */) {
var hash = self.hashBlessing(Array.prototype.slice.call(arguments, 1));
- req.session.aposSafeOptions = req.session.aposSafeOptions || {};
- req.session.aposSafeOptions[hash] = true;
+ req.session.aposBlessings = req.session.aposBlessings || {};
+ req.session.aposBlessings[hash] = true;
};
// See apos.utils.bless
self.isBlessed = function(req, options /* , arg2, arg3... */) {
var hash = self.hashBlessing(Array.prototype.slice.call(arguments, 1));
- return req.session.aposSafeOptions && _.has(req.session.aposSafeOptions, hash);
+ return req.session.aposBlessings && _.has(req.session.aposBlessings, hash);
};
self.hashBlessing = function(args) {
|
aposBlessings is a more consistent name for the property
|
apostrophecms_apostrophe
|
train
|
js
|
ccbcd6cd6a20abb9807abfd56f017ee6a0632a60
|
diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py
index <HASH>..<HASH> 100644
--- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py
+++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/production.py
@@ -70,8 +70,9 @@ INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS
# AWS cache settings, don't change unless you know what you're doing:
AWS_EXPIRY = 60 * 60 * 24 * 7
AWS_HEADERS = {
- 'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (
- AWS_EXPIRY, AWS_EXPIRY)
+ 'Cache-Control': str.encode(
+ 'max-age=%d, s-maxage=%d, must-revalidate' % (
+ AWS_EXPIREY, AWS_EXPIREY))
}
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
|
Fixed a bug with escaped spaces in Cache-Control.
see: <URL>
|
pydanny_cookiecutter-django
|
train
|
py
|
ff85c12f4ab42887a8710f1febaf19c5c43a962d
|
diff --git a/airflow/providers/amazon/aws/example_dags/example_s3.py b/airflow/providers/amazon/aws/example_dags/example_s3.py
index <HASH>..<HASH> 100644
--- a/airflow/providers/amazon/aws/example_dags/example_s3.py
+++ b/airflow/providers/amazon/aws/example_dags/example_s3.py
@@ -194,7 +194,8 @@ with DAG(
delete_tagging,
s3_create_object,
[s3_sensor_one_key, s3_sensor_two_keys, s3_sensor_key_function],
- [s3_copy_object, s3_sensor_keys_unchanged],
+ s3_copy_object,
+ s3_sensor_keys_unchanged,
s3_delete_objects,
delete_bucket,
)
|
Fix "Chain not supported for different length Iterable"
|
apache_airflow
|
train
|
py
|
3664f25bfa3d7f110a37da7230ff58b2ff37d4c8
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,11 @@ setup(
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
]
|
Updated setup.py's language classifier.
|
rq_django-rq
|
train
|
py
|
52515f4aef95ce6cfe17dc0632f372f0ce62d0ed
|
diff --git a/lib/poise/helpers/inversion.rb b/lib/poise/helpers/inversion.rb
index <HASH>..<HASH> 100644
--- a/lib/poise/helpers/inversion.rb
+++ b/lib/poise/helpers/inversion.rb
@@ -235,6 +235,7 @@ module Poise
def resolve_inversion_attribute(node)
# Default to using just the name of the cookbook.
attribute_names = inversion_attribute || default_inversion_attributes(node)
+ return {} if attribute_names.empty?
attribute_names.inject(node) do |memo, key|
memo[key] || begin
raise Poise::Error.new("Attribute #{key} not set when expanding inversion attribute for #{self.name}: #{memo}")
|
Allow passing `inversion_attribute []` to disable that feature.
|
poise_poise
|
train
|
rb
|
5f232ce0d9fad631b0d789bda9c67d6b60da9cd4
|
diff --git a/src/test/java/org/jdbdt/UserDAO.java b/src/test/java/org/jdbdt/UserDAO.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/jdbdt/UserDAO.java
+++ b/src/test/java/org/jdbdt/UserDAO.java
@@ -113,7 +113,7 @@ public class UserDAO {
CREATE("CREATE TABLE " + TABLE_NAME + " ("
+ "LOGIN VARCHAR(10) PRIMARY KEY NOT NULL,"
+ "NAME VARCHAR(40) NOT NULL, " + "PASSWORD VARCHAR(32) NOT NULL,"
- + "CREATED DATE NOT NULL)"),
+ + "CREATED DATE)"),
DELETE_ALL("DELETE FROM " + TABLE_NAME),
DELETE("DELETE FROM " + TABLE_NAME + " WHERE login = ?"),
INSERT("INSERT INTO " + TABLE_NAME
|
UserDAO: removed NOT NULL restriction for CREATED
|
JDBDT_jdbdt
|
train
|
java
|
9d10b45be5c922a62ad4fe21c95deb927fcddd22
|
diff --git a/src/GameQ/Protocols/Gamespy3.php b/src/GameQ/Protocols/Gamespy3.php
index <HASH>..<HASH> 100644
--- a/src/GameQ/Protocols/Gamespy3.php
+++ b/src/GameQ/Protocols/Gamespy3.php
@@ -190,7 +190,7 @@ class Gamespy3 extends Protocol
$sndvar = substr($snd, 0, strpos($snd, "\x00"));
// Check if fstvar is a substring of sndvar
// If so, remove it from the first string
- if (strpos($sndvar, $fstvar) !== false) {
+ if (!empty($fstvar) && strpos($sndvar, $fstvar) !== false) {
$packets[$i] = preg_replace("#(\\x00[^\\x00]+\\x00)$#", "\x00", $packets[$i]);
}
}
|
Fixed bug in PHP 7 for strpos needle being empty in Gamespy3 protocol.
|
Austinb_GameQ
|
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.