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
|
---|---|---|---|---|---|
f0d2af15fee541ad40184f6eca226eec01522467 | diff --git a/src/main/java/kr/motd/maven/os/DetectMojo.java b/src/main/java/kr/motd/maven/os/DetectMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/kr/motd/maven/os/DetectMojo.java
+++ b/src/main/java/kr/motd/maven/os/DetectMojo.java
@@ -51,7 +51,7 @@ import org.apache.maven.project.MavenProject;
* available. An entry will always be made for os.detected.release.like.${os.detected.release}. </li>
* </ul>
*/
-@Mojo(name = "detect", defaultPhase = LifecyclePhase.VALIDATE)
+@Mojo(name = "detect", defaultPhase = LifecyclePhase.VALIDATE, threadSafe = true)
public class DetectMojo extends AbstractMojo {
static final String CLASSIFIER_WITH_LIKES_PROPERTY = "os.detection.classifierWithLikes"; | Fix for #<I> Mark DetectMojo goal with thread safety info (#<I>) | trustin_os-maven-plugin | train | java |
651f1b66654c91f7ef5cf6b228a2c74353f2a0d6 | diff --git a/gwpy/plot/tests/test_plot.py b/gwpy/plot/tests/test_plot.py
index <HASH>..<HASH> 100644
--- a/gwpy/plot/tests/test_plot.py
+++ b/gwpy/plot/tests/test_plot.py
@@ -47,7 +47,7 @@ class TestPlot(FigureTestBase):
def test_init_empty(self):
plot = self.FIGURE_CLASS(geometry=(2, 2))
assert len(plot.axes) == 4
- assert plot.axes[-1].get_geometry() == (2, 2, 4)
+ assert plot.axes[-1].get_subplotspec().get_geometry() == (2, 2, 3, 3)
def test_init_with_data(self):
# list
@@ -79,7 +79,7 @@ class TestPlot(FigureTestBase):
plot = self.FIGURE_CLASS(a, b, separate=True, sharex=True, sharey=True)
assert len(plot.axes) == 2
for i, ax in enumerate(plot.axes):
- assert ax.get_geometry() == (2, 1, i+1)
+ assert ax.get_subplotspec().get_geometry() == (2, 1, i, i)
assert len(ax.lines) == 1
assert plot.axes[1]._sharex is plot.axes[0]
plot.close() | gwpy.plot: update use of get_geometry
addresses deprecationwarning from matplotlib | gwpy_gwpy | train | py |
2013e433b0d9b127ae1199921e8f4ebdc5155da7 | diff --git a/lib/middleware/content/populateAll.js b/lib/middleware/content/populateAll.js
index <HASH>..<HASH> 100644
--- a/lib/middleware/content/populateAll.js
+++ b/lib/middleware/content/populateAll.js
@@ -41,7 +41,9 @@ function getReferences(fields, promises, next, kontx) {
getObjectReferences(fields, value, key, promises, next, kontx);
});
- tryToSendResponse(promises, next);
+ process.nextTick(function() {
+ tryToSendResponse(promises, next);
+ });
}
function getObjectReferences(fields, value, key, promises, next, kontx) { | fixing queryAll tests for node <I> | grasshopper-cms_grasshopper-core-nodejs | train | js |
2991de5c0ca6742d0d2988bd7377ff80c481e073 | diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Console/Application.php
+++ b/src/Illuminate/Console/Application.php
@@ -16,6 +16,7 @@ use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Application as SymfonyApplication;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
+use Symfony\Component\Console\Exception\CommandNotFoundException;
use Illuminate\Contracts\Console\Application as ApplicationContract;
class Application extends SymfonyApplication implements ApplicationContract
@@ -172,6 +173,10 @@ class Application extends SymfonyApplication implements ApplicationContract
$command = $this->laravel->make($command)->getName();
}
+ if (! $this->has($command)) {
+ throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $command));
+ }
+
array_unshift($parameters, $command);
$this->lastOutput = $outputBuffer ?: new BufferedOutput; | [<I>] Throws an exception if the command doesn't exist (#<I>) | laravel_framework | train | php |
3c8cdd135a4e56c8a33d53b786bfe4c9793427e5 | diff --git a/spec/database_spec.rb b/spec/database_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/database_spec.rb
+++ b/spec/database_spec.rb
@@ -2,19 +2,4 @@ require 'spec_helper'
require 'ronin/database'
describe Database do
- it "should auto_upgrade the Author model" do
- Author.should be_auto_upgraded
- end
-
- it "should auto_upgrade the License model" do
- License.should be_auto_upgraded
- end
-
- it "should auto_upgrade the Arch model" do
- Arch.should be_auto_upgraded
- end
-
- it "should auto_upgrade the OS model" do
- OS.should be_auto_upgraded
- end
end
diff --git a/spec/platform/platform_spec.rb b/spec/platform/platform_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/platform/platform_spec.rb
+++ b/spec/platform/platform_spec.rb
@@ -3,18 +3,6 @@ require 'platform/spec_helper'
require 'ronin/platform/platform'
describe Platform do
- it "should auto_upgrade the Platform::Maintainer model" do
- Platform::Maintainer.should be_auto_upgraded
- end
-
- it "should auto_upgrade the Platform::CachedFile model" do
- Platform::CachedFile.should be_auto_upgraded
- end
-
- it "should auto_upgrade the Platform::Overlay model" do
- Platform::Overlay.should be_auto_upgraded
- end
-
it "should be able to load custom overlay caches" do
Platform.overlays.should_not be_empty
end | Removed old specs that tested if Ronin models were being auto_upgraded. | ronin-ruby_ronin | train | rb,rb |
8c9f17c3144613e33f157f0bd461f084717aeb2b | diff --git a/lib/api.js b/lib/api.js
index <HASH>..<HASH> 100644
--- a/lib/api.js
+++ b/lib/api.js
@@ -66,15 +66,6 @@ exports.delegate = function(fixedargs, fixedmeta) {
// For example, data for individual web requests.
delegate.context = Object.assign({},self.context)
-
- delegate.client = function client() {
- return self.client.apply(this, arguments)
- }
-
- delegate.listen = function listen() {
- return self.listen.apply(this, arguments)
- }
-
return delegate
} | removed spurious delegate methods client and listen | senecajs_seneca | train | js |
597ba89679702e54ae408eb5c3b4baed34dc1580 | diff --git a/app/helpers/foreman_chef/chef_proxy_form.rb b/app/helpers/foreman_chef/chef_proxy_form.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/foreman_chef/chef_proxy_form.rb
+++ b/app/helpers/foreman_chef/chef_proxy_form.rb
@@ -49,7 +49,7 @@ module ForemanChef
end
def chef_run_list_differs?(host)
- host.persisted? && host.run_list_differs?
+ host.persisted? && host.chef_proxy_id.present? && host.run_list_differs?
end
end
end | Fixes #<I> - display warning only for hosts with chef proxy | theforeman_foreman_chef | train | rb |
069f978db34ee1d767e1e08118b4d67b9b11a490 | diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -10743,7 +10743,7 @@ const devices = [
// BTicino (Legrand brand)
{
zigbeeModel: [' Light switch with neutral\u0000\u0000\u0000\u0000\u0000'],
- model: 'K4003C',
+ model: 'K4003C/L4003C/N4003C/NT4003C',
vendor: 'BTicino',
description: 'Light switch with neutral',
supports: 'on/off, led color', | Add BTicino switches (#<I>)
I added three variant of the existing BTicino/Legrand switch.
These belongs to the more common Livinglight serie:
- <URL> | Koenkk_zigbee-shepherd-converters | train | js |
02b199f2b642f3f1aaabf2d1287f8115b9e369d7 | diff --git a/test/connection.js b/test/connection.js
index <HASH>..<HASH> 100644
--- a/test/connection.js
+++ b/test/connection.js
@@ -113,14 +113,14 @@ describe('index', function(){
it('should create an SObject of type Account', function(){
var acc = nforce.createSObject('Account');
- acc.should.be.a('object');
+ acc.should.have.type('object');
acc.should.have.property('attributes');
acc.attributes.type.should.equal('Account');
});
it('should create an SObject of type Test_Object__c', function(){
var obj = nforce.createSObject('Test_Object__c');
- obj.should.be.a('object');
+ obj.should.have.type('object');
obj.should.have.property('attributes');
obj.attributes.type.should.equal('Test_Object__c');
});
@@ -130,7 +130,7 @@ describe('index', function(){
Name: 'Test Me',
Custom_Field__c: 'Blah'
});
- obj.should.be.a('object');
+ obj.should.have.type('object');
obj.should.have.property('attributes');
obj.attributes.type.should.equal('Test_Object__c');
obj.should.have.property('Name'); | fixing should.js api deprecation issues | kevinohara80_nforce | train | js |
3a25cf895014f39d748746ae93490f1dddcbbc29 | diff --git a/test/utils/object/delete.js b/test/utils/object/delete.js
index <HASH>..<HASH> 100644
--- a/test/utils/object/delete.js
+++ b/test/utils/object/delete.js
@@ -28,6 +28,10 @@ describe("utils.object.delete", () => {
"output": ["universe"]
},
{
+ "input": [["world", "universe"], 0],
+ "output": ["universe"]
+ },
+ {
"input": [{"hello": ["world", "universe"]}, "hello.0"],
"output": {"hello": ["universe"]}
}, | Adding test for passing number into utils.object.delete | dynamoosejs_dynamoose | train | js |
e2c9e8bca624af60c14c70d0ae6dab8fe1e158f3 | diff --git a/porespy/networks/_getnet.py b/porespy/networks/_getnet.py
index <HASH>..<HASH> 100644
--- a/porespy/networks/_getnet.py
+++ b/porespy/networks/_getnet.py
@@ -182,7 +182,7 @@ def regions_to_network(regions, phases=None, voxel_size=1, accuracy='standard'):
net = {}
# Define all the fundamental stuff
net['throat.conns'] = np.array(t_conns)
- net['pore.coords'] = np.array(p_coords)
+ net['pore.coords'] = np.array(p_coords)*voxel_size
net['pore.all'] = np.ones_like(net['pore.coords'][:, 0], dtype=bool)
net['throat.all'] = np.ones_like(net['throat.conns'][:, 0], dtype=bool)
net['pore.region_label'] = np.array(p_label) | Normalized pore.coords by voxel_size in regions_to_network | PMEAL_porespy | train | py |
765e4e031e155897a6968ea2f744be8088b989d9 | diff --git a/src/Engine/Twig.php b/src/Engine/Twig.php
index <HASH>..<HASH> 100644
--- a/src/Engine/Twig.php
+++ b/src/Engine/Twig.php
@@ -106,7 +106,10 @@ class Twig extends CompilerEngine
if ($templateFile && file_exists($templateFile)) {
$file = $templateFile;
} elseif ($templateFile) {
- $file = $this->loader->findTemplate($templateFile);
+ try {
+ $file = $this->loader->findTemplate($templateFile);
+ } catch (Twig_Error_Loader $exception) {
+ }
}
if (isset($file) && $file) { | Catch errors in Twig Engine
The new loader doesn't return false, but throws an exception. | rcrowe_TwigBridge | train | php |
f84ad8abc092e0deda864fc7cf3275316198e94f | diff --git a/aeron-client/src/main/java/uk/co/real_logic/aeron/Connection.java b/aeron-client/src/main/java/uk/co/real_logic/aeron/Connection.java
index <HASH>..<HASH> 100644
--- a/aeron-client/src/main/java/uk/co/real_logic/aeron/Connection.java
+++ b/aeron-client/src/main/java/uk/co/real_logic/aeron/Connection.java
@@ -84,14 +84,9 @@ class Connection
{
final int nextIndex = nextPartitionIndex(activeIndex);
logReader = logReaders[nextIndex];
- if (logReader.status() != CLEAN)
- {
- return 0;
- }
-
- ++activeTermId;
- this.activeIndex = nextIndex;
logReader.seek(0);
+ ++activeTermId;
+ activeIndex = nextIndex;
}
final int messagesRead = logReader.read(dataHandler, fragmentCountLimit); | [Java] Remove unnecessary check for term status on roll of connection. | real-logic_aeron | train | java |
b092f9d4169f73c06a9868e5b29586d09ffe2d1d | diff --git a/includes/modules/api_v1/books/class-pb-booksapi.php b/includes/modules/api_v1/books/class-pb-booksapi.php
index <HASH>..<HASH> 100644
--- a/includes/modules/api_v1/books/class-pb-booksapi.php
+++ b/includes/modules/api_v1/books/class-pb-booksapi.php
@@ -531,6 +531,7 @@ class BooksApi extends Api {
'post_link' => get_permalink( $book['part'][$i]['ID'] ),
'chapters' => $chapters,
);
+ unset( $chapters );
}
// back-matter | unset variable to accurately represent which chapters belong to which parts | pressbooks_pressbooks | train | php |
376b74c1f849ca1a028f838fbc10859edad12272 | diff --git a/pyfolio/tears.py b/pyfolio/tears.py
index <HASH>..<HASH> 100644
--- a/pyfolio/tears.py
+++ b/pyfolio/tears.py
@@ -737,7 +737,7 @@ def create_bayesian_tear_sheet(returns, benchmark_rets=None,
"plotting stochastic volatility model", previous_time)
total_time = time() - start_time
- print("\nTotal runtime was {:.2f} seconds.").format(total_time)
+ print("\nTotal runtime was {:.2f} seconds.".format(total_time))
gs.tight_layout(fig) | BUG Print() statement had wrong parantheses. | quantopian_pyfolio | train | py |
4fc845b7eb82344dfeac11060305c92d9def2617 | diff --git a/structs.go b/structs.go
index <HASH>..<HASH> 100644
--- a/structs.go
+++ b/structs.go
@@ -16,8 +16,26 @@ type Message struct {
ChannelId int `json:"channel_id,string"`
}
-type Attachment struct {
+type Attachment struct { //TODO figure this out
}
-type Embed struct {
+type Embed struct { // TODO figure this out
+}
+
+type VoiceRegion struct {
+ Id string `json:"id"`
+ Name string `json:"name"`
+ SampleHostname string `json:"sample_hostname"`
+ SamplePort int `json:"sample_port"`
+}
+
+type VoiceIce struct {
+ Ttl int `json:"ttl,string"`
+ Servers []IceServer `json:"servers"`
+}
+
+type IceServer struct {
+ Url string `json:"url"`
+ Username string `json:"username"`
+ Credential string `json:"credential"`
} | Added structs for voice regions and ice | bwmarrin_discordgo | train | go |
47eb6613b5ed8a8a8415289156b56017d0986428 | diff --git a/rllib/evaluation/postprocessing.py b/rllib/evaluation/postprocessing.py
index <HASH>..<HASH> 100644
--- a/rllib/evaluation/postprocessing.py
+++ b/rllib/evaluation/postprocessing.py
@@ -57,13 +57,13 @@ def compute_advantages(rollout: SampleBatch,
rollout[Postprocessing.ADVANTAGES] = discount(delta_t, gamma * lambda_)
rollout[Postprocessing.VALUE_TARGETS] = (
rollout[Postprocessing.ADVANTAGES] +
- rollout[SampleBatch.VF_PREDS]).copy().astype(np.float32)
+ rollout[SampleBatch.VF_PREDS]).astype(np.float32)
else:
rewards_plus_v = np.concatenate(
[rollout[SampleBatch.REWARDS],
np.array([last_r])])
discounted_returns = discount(rewards_plus_v,
- gamma)[:-1].copy().astype(np.float32)
+ gamma)[:-1].astype(np.float32)
if use_critic:
rollout[Postprocessing.
@@ -76,7 +76,7 @@ def compute_advantages(rollout: SampleBatch,
rollout[Postprocessing.ADVANTAGES])
rollout[Postprocessing.ADVANTAGES] = rollout[
- Postprocessing.ADVANTAGES].copy().astype(np.float32)
+ Postprocessing.ADVANTAGES].astype(np.float32)
assert all(val.shape[0] == rollout_size for key, val in rollout.items()), \
"Rollout stacked incorrectly!" | [RLlib] Remove unnecessary copies in `compute_advantages`. (#<I>) | ray-project_ray | train | py |
1a33ce67fc40e4ffc94d94b7b82137af89459362 | diff --git a/app/code/local/Edge/Base/Helper/Image.php b/app/code/local/Edge/Base/Helper/Image.php
index <HASH>..<HASH> 100644
--- a/app/code/local/Edge/Base/Helper/Image.php
+++ b/app/code/local/Edge/Base/Helper/Image.php
@@ -2,7 +2,7 @@
class Edge_Base_Helper_Image extends Mage_Core_Helper_Abstract
{
- protected $_scheduleModify;
+ protected $_scheduleModify = false;
protected $_width = null;
protected $_height = null;
@@ -30,11 +30,14 @@ class Edge_Base_Helper_Image extends Mage_Core_Helper_Abstract
}
if ($this->_scheduleModify) {
- return $this->_getModifiedImage($file);
+ $imageUrl = $this->_getModifiedImage($file);
+ } else {
+ $imageUrl = Mage::getBaseUrl('media') . $file;
}
- $mediaUrl = Mage::getBaseUrl('media');
- $imageUrl = $mediaUrl . $file;
+ // Remove the helper from registry
+ // Ensures non singleton
+ Mage::unregister('_helper/edge/image');
return $imageUrl;
} | Image helper no longer singleton | outeredge_magento-base-module | train | php |
7fdcfde35f492cdd18920c4a444269a7bda1a4be | diff --git a/lib/acts_as_tenant/sidekiq.rb b/lib/acts_as_tenant/sidekiq.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_tenant/sidekiq.rb
+++ b/lib/acts_as_tenant/sidekiq.rb
@@ -38,6 +38,10 @@ Sidekiq.configure_server do |config|
chain.add ActsAsTenant::Sidekiq::Client
end
config.server_middleware do |chain|
- chain.insert_before Sidekiq::Middleware::Server::RetryJobs, ActsAsTenant::Sidekiq::Server
+ if defined?(Sidekiq::Middleware::Server::RetryJobs)
+ chain.insert_before Sidekiq::Middleware::Server::RetryJobs, ActsAsTenant::Sidekiq::Server
+ else
+ chain.add ActsAsTenant::Sidekiq::Server
+ end
end
end | Changed Sidekiq Middleware Insert
Sidekiq removed all middleware in <I>. This checks to see if middleware is available or not then inserts ActsAsTenant middleware. Closes #<I> | ErwinM_acts_as_tenant | train | rb |
bb3b75cb9fa45c353f05382a9bf82d181f5872bc | diff --git a/luar.go b/luar.go
index <HASH>..<HASH> 100644
--- a/luar.go
+++ b/luar.go
@@ -538,9 +538,6 @@ func copyTableToMap(L *lua.State, idx int, v reflect.Value, visited map[uintptr]
L.Pop(1)
continue
}
- if val.Interface() == Null {
- val = reflect.Zero(te)
- }
v.SetMapIndex(key, val)
L.Pop(1)
}
@@ -591,9 +588,6 @@ func copyTableToSlice(L *lua.State, idx int, v reflect.Value, visited map[uintpt
L.Pop(1)
continue
}
- if val.Interface() == Null {
- val = reflect.Zero(te)
- }
v.Index(i - 1).Set(val)
L.Pop(1)
} | Remove useless Null comparisons in CopyTable*
The Null value is already set to the zero value of the type by LuaToGo. | stevedonovan_luar | train | go |
ee340903a17ba0f0ef10396b7050d48c7415b76c | diff --git a/py/h2o.py b/py/h2o.py
index <HASH>..<HASH> 100644
--- a/py/h2o.py
+++ b/py/h2o.py
@@ -1756,6 +1756,8 @@ class H2O(object):
'source': data_key,
# this is ignore??
'cols': None,
+ 'ignored_cols': None,
+ 'validation': None,
'response': None,
'activation': None,
'hidden': None, | still fails. does NeuralNet.json exist? | h2oai_h2o-2 | train | py |
73d6d77a5ac2fabba1037e231d6a5c458485b881 | diff --git a/tests/tpot_tests.py b/tests/tpot_tests.py
index <HASH>..<HASH> 100644
--- a/tests/tpot_tests.py
+++ b/tests/tpot_tests.py
@@ -321,6 +321,19 @@ def test_conf_dict_3():
assert tpot_obj.config_dict == tested_config_dict
+def test_read_config_file():
+ """Assert that _read_config_file rasie FileNotFoundError with a wrong path."""
+ tpot_obj = TPOTRegressor()
+ # typo for "tests/test_config.py"
+ assert_raises(FileNotFoundError, tpot_obj._read_config_file, "tests/test_confg.py")
+
+
+def test_read_config_file_2():
+ """Assert that _read_config_file rasie AttributeError with a wrong dictionary name."""
+ tpot_obj = TPOTRegressor()
+ assert_raises(AttributeError, tpot_obj._read_config_file, "tpot/config/classifier_light.py")
+
+
def test_random_ind():
"""Assert that the TPOTClassifier can generate the same pipeline with same random seed."""
tpot_obj = TPOTClassifier(random_state=43) | 2 more tests for base.py | EpistasisLab_tpot | train | py |
23cd694045441c2d17f9dee1c2438195ccb105e5 | diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -135,12 +135,6 @@ func (r *Redis) DebugObject(key string) (string, error) {
return rp.StatusValue()
}
-/*
-DEBUG SEGFAULT
-DEBUG SEGFAULT performs an invalid memory access that crashes Redis.
-It is used to simulate bugs during the development.
-*/
-
// Delete all the keys of all the existing databases,
// not just the currently selected one.
// This command never fails. | debug segfault: will never be implemented | xuyu_goredis | train | go |
764e1a3981a1476e159b3e8cbf8975f0e433281b | diff --git a/jet/static/jet/js/src/features/compact-inline.js b/jet/static/jet/js/src/features/compact-inline.js
index <HASH>..<HASH> 100644
--- a/jet/static/jet/js/src/features/compact-inline.js
+++ b/jet/static/jet/js/src/features/compact-inline.js
@@ -56,9 +56,12 @@ CompactInline.prototype = {
},
updateTotalForms: function($inline) {
var $totalFormsInput = $inline.find('[name="' + this.prefix + '-TOTAL_FORMS"]');
+ var $maxFormsInput = $inline.find('[name="' + this.prefix + '-MAX_NUM_FORMS"]');
var totalForms = parseInt($inline.find('.inline-related').length);
+ var maxForms = $maxFormsInput.val() ? parseInt($maxFormsInput.val()) : Infinity;
$totalFormsInput.val(totalForms);
+ $inline.find('.add-row').toggle(maxForms >= totalForms);
},
addNavigationItem: function($inline, $inlineItem) {
var $empty = $inline.find('.inline-navigation-item.empty'); | Respect inline max forms for compactinline | geex-arts_django-jet | train | js |
f3669b2a2340bef58b25c10e7e17284ea5162ff8 | diff --git a/gcs/gcscaching/integration_test.go b/gcs/gcscaching/integration_test.go
index <HASH>..<HASH> 100644
--- a/gcs/gcscaching/integration_test.go
+++ b/gcs/gcscaching/integration_test.go
@@ -184,6 +184,26 @@ func (t *IntegrationTest) UpdateUpdatesCache() {
ExpectNe(nil, o)
}
+func (t *IntegrationTest) CreateInvalidatesNegativeCache() {
+ AssertFalse(true, "TODO")
+}
+
+func (t *IntegrationTest) StatAddsToNegativeCache() {
+ AssertFalse(true, "TODO")
+}
+
+func (t *IntegrationTest) ListInvalidatesNegativeCache() {
+ AssertFalse(true, "TODO")
+}
+
+func (t *IntegrationTest) UpdateInvalidatesNegativeCache() {
+ AssertFalse(true, "TODO")
+}
+
+func (t *IntegrationTest) DeleteAddsToNegativeCache() {
+ AssertFalse(true, "TODO")
+}
+
func (t *IntegrationTest) Expiration() {
const name = "taco"
var err error | Added negative cache integration test names. | jacobsa_gcloud | train | go |
eff2f41bc68adcea902fe08b4b2fe3cb1967f760 | diff --git a/src/Convert/Converters/Cwebp.php b/src/Convert/Converters/Cwebp.php
index <HASH>..<HASH> 100644
--- a/src/Convert/Converters/Cwebp.php
+++ b/src/Convert/Converters/Cwebp.php
@@ -37,8 +37,8 @@ class Cwebp extends AbstractExecConverter
// System paths to look for cwebp binary
private static $cwebpDefaultPaths = [
- //'/usr/bin/cwebp',
- //'/usr/local/bin/cwebp',
+ '/usr/bin/cwebp',
+ '/usr/local/bin/cwebp',
'/usr/gnu/bin/cwebp',
'/usr/syno/bin/cwebp'
]; | whoops, removed some outcommenting that was only done for test purposes | rosell-dk_webp-convert | train | php |
37fb408b6b72ea3fbfabfd9e8b8705ba290da827 | diff --git a/test/test_point.py b/test/test_point.py
index <HASH>..<HASH> 100644
--- a/test/test_point.py
+++ b/test/test_point.py
@@ -97,6 +97,11 @@ class PointTestCase(unittest.TestCase):
self.assertTrue(point is not point_copy)
self.assertEqual(tuple(point), tuple(point_copy))
+ def test_point_from_generator(self):
+ point = Point(i + 10 for i in range(3))
+ self.assertEqual((10, 11, 12), tuple(point))
+ self.assertEqual((10, 11, 12), tuple(point))
+
def test_point_degrees_are_normalized(self):
point = Point(95, 185, 375)
self.assertEqual((-85, -175, 375), tuple(point)) | Point: add test for init from generator | geopy_geopy | train | py |
2852daed09faddd38d5c0d97db4995b15b8d46bb | diff --git a/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java b/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java
index <HASH>..<HASH> 100644
--- a/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java
+++ b/presto-cassandra/src/main/java/com/facebook/presto/cassandra/CassandraMetadata.java
@@ -296,7 +296,7 @@ public class CassandraMetadata
String columnMetadata = extraColumnMetadataCodec.toJson(columnExtra.build());
queryBuilder.append("WITH comment='").append(CassandraSession.PRESTO_COMMENT_METADATA).append(" ").append(columnMetadata).append("'");
- // We need create Cassandra table before commit because record need to be written to the table .
+ // We need to create the Cassandra table before commit because the record needs to be written to the table.
cassandraSession.execute(queryBuilder.toString());
return new CassandraOutputTableHandle(
connectorId, | Fix grammar in Cassandra comment | prestodb_presto | train | java |
25f4bdef788fefd3900b73733c7e9921eb6c127f | diff --git a/database/factories/PageFactory.php b/database/factories/PageFactory.php
index <HASH>..<HASH> 100644
--- a/database/factories/PageFactory.php
+++ b/database/factories/PageFactory.php
@@ -1,6 +1,5 @@
<?php
-namespace Database\Factories;
-use Illuminate\Database\Eloquent\Factories\Factory;
+
use Illuminate\Support\Str;
use Faker\Generator as Faker;
use AvoRed\Framework\Database\Models\Page; | Update PageFactory.php | avored_framework | train | php |
87780ac6ccdb23b9473ad6a3078d1d1f2a5b7d94 | diff --git a/lib/openapi3.js b/lib/openapi3.js
index <HASH>..<HASH> 100644
--- a/lib/openapi3.js
+++ b/lib/openapi3.js
@@ -84,7 +84,9 @@ function fakeProdCons(data) {
for (var r in data.operation.responses) {
var response = data.operation.responses[r];
for (var prod in response.content) {
- data.produces.push(prod);
+ if (! data.produces.includes(prod)) {
+ data.produces.push(prod);
+ }
}
}
let op = data.method.operation; | Only list unique operation produces media types (#<I>)
When iterating over all responses, only add a media type if it
is not already in the operation.produces | Mermade_widdershins | train | js |
4e488ab58ce92afc13728795f60e7a613dbb9839 | diff --git a/resources/lang/zh-TW/cachet.php b/resources/lang/zh-TW/cachet.php
index <HASH>..<HASH> 100644
--- a/resources/lang/zh-TW/cachet.php
+++ b/resources/lang/zh-TW/cachet.php
@@ -92,6 +92,7 @@ return [
'email' => [
'subscribe' => 'Subscribe to email updates.',
'subscribed' => 'You\'ve been subscribed to email notifications, please check your email to confirm your subscription.',
+ 'updated-subscribe' => 'You\'ve succesfully updated your subscriptions.',
'verified' => 'Your email subscription has been confirmed. Thank you!',
'manage' => 'Manage your subscription',
'unsubscribe' => 'Unsubscribe from email updates.', | New translations cachet.php (Chinese Traditional) | CachetHQ_Cachet | train | php |
2b8622260c5e3b4db7ad7034570a4e5cd3be1cff | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@ install_requires = [
'django-permission==0.8.2',
'django-uuidfield==0.5.0',
'django-polymorphic==0.6',
- 'djangorestframework>=3.1.0,<3.2.0',
+ 'djangorestframework>=3.1.0,<3.1.2',
'djangosaml2==0.12.0.dev0',
'elasticsearch>=1.0.0,<2.0.0',
'jira>=0.47', | Fix DRF version to a lower one
- NC-<I>
- A different handling of object-level permissions in <I> seems to be
causing failing tests. | opennode_waldur-core | train | py |
115ccba4aa1124927f57b850308ab5a76157ab75 | diff --git a/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java b/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java
+++ b/core/src/main/java/hudson/tools/DownloadFromUrlInstaller.java
@@ -180,4 +180,16 @@ public abstract class DownloadFromUrlInstaller extends ToolInstaller {
*/
public String url;
}
+
+ /**
+ * Convenient abstract class to implement a NodeSpecificInstallable based on an existing Installable
+ */
+ public abstract class NodeSpecificInstallable extends Installable implements NodeSpecific<NodeSpecificInstallable> {
+
+ public NodeSpecificInstallable(Installable inst) {
+ this.id = inst.id;
+ this.name = inst.name;
+ this.url = inst.url;
+ }
+ }
} | convenient decorator class to make Installable NodeSpecific | jenkinsci_jenkins | train | java |
cc049bc0e99551de1206685a696793f57e7527fb | diff --git a/resources/lang/he-IL/setup.php b/resources/lang/he-IL/setup.php
index <HASH>..<HASH> 100644
--- a/resources/lang/he-IL/setup.php
+++ b/resources/lang/he-IL/setup.php
@@ -10,14 +10,14 @@
*/
return [
- 'setup' => 'ืืืืจืืช',
- 'title' => 'ืืชืงื ืช Cachet',
- 'service_details' => 'ืคืจืื ืฉืจืืช',
+ 'setup' => 'Setup',
+ 'title' => 'Install Cachet',
+ 'service_details' => 'Service Details',
'env_setup' => 'Environment Setup',
- 'status_page_setup' => 'ืืืืจืช ืขืืื ืืฆื',
+ 'status_page_setup' => 'Status Page Setup',
'show_support' => 'Show support for Cachet?',
- 'admin_account' => 'ืืฉืืื ืื ืื ืืืขืจืืช',
- 'complete_setup' => 'ืืชืงื ื ืืกืชืืืื',
- 'completed' => 'Cachet ืืืืืจ ืืืฆืืื!',
+ 'admin_account' => 'Administrator Account',
+ 'complete_setup' => 'Complete Setup',
+ 'completed' => 'Cachet has been configured successfully!',
'finish_setup' => 'Go to dashboard',
]; | New translations setup.php (Hebrew) | CachetHQ_Cachet | train | php |
d3e41b10bd04c9c6c6ab3bec97eea839a455872f | diff --git a/lib/jboss-cloud/rpm-utils.rb b/lib/jboss-cloud/rpm-utils.rb
index <HASH>..<HASH> 100644
--- a/lib/jboss-cloud/rpm-utils.rb
+++ b/lib/jboss-cloud/rpm-utils.rb
@@ -40,12 +40,20 @@ module JBossCloud
define
end
- def define
- desc "Sign all RPMs."
- task 'rpm:all:sign' => [ 'rpm:all' ] do
+ def define
+ task 'rpm:all:sign:srpms' => [ 'rpm:all' ] do
+ puts "Signing SRPMs..."
+ execute_command "rpm --resign #{@config.dir_top}/#{APPLIANCE_DEFAULTS['os_name']}/#{APPLIANCE_DEFAULTS['os_version']}/SRPMS/*.rpm"
+ end
+
+ task 'rpm:all:sign:rpms' => [ 'rpm:all' ] do
+ puts "Signing RPMs..."
execute_command "rpm --resign #{@config.dir_top}/#{@config.os_path}/RPMS/*/*.rpm"
end
+ desc "Sign all packages."
+ task 'rpm:all:sign' => [ 'rpm:all:sign:rpms', 'rpm:all:sign:srpms' ]
+
task 'rpm:all:upload' => [ 'rpm:all' ] do
if (@connect_data.nil?)
puts "Please specify connection information in '#{@connect_data_file}' file, aborting." | added signing of SRPMs packages | boxgrinder_boxgrinder-build | train | rb |
1983dcb3892cfbf4f852c0a8c66d2c6d319bdb47 | diff --git a/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/api/ScopeHelper.java b/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/api/ScopeHelper.java
index <HASH>..<HASH> 100644
--- a/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/api/ScopeHelper.java
+++ b/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/api/ScopeHelper.java
@@ -6,9 +6,6 @@ import org.slf4j.Logger;
/**
* Provides common functionality for working with scopes.
- *
- * @deprecated Please use {@link com.buschmais.jqassistant.core.splittingsupport.impl.ScopeHelper}
- * instead.
*/
public class ScopeHelper { | removed deprecation from ScopeHelper.java | buschmais_jqa-core-framework | train | java |
44845b7b72b9c77b1b98613cb9fad10f0d126500 | diff --git a/www/auth/login-feide.php b/www/auth/login-feide.php
index <HASH>..<HASH> 100644
--- a/www/auth/login-feide.php
+++ b/www/auth/login-feide.php
@@ -170,7 +170,7 @@ if (isset($_REQUEST['username'])) {
$orgattr = array_keys($orgattributes);
foreach($orgattr as $value){
- $orgattributename = ('edupersonorg:' . $value);
+ $orgattributename = ('eduPersonOrgDN:' . $value);
//SimpleSAML_Logger::debug('AUTH - ldap-feide: Orgattributename: '. $orgattributename);
$attributes[$orgattributename] = $orgattributes[$value];
//SimpleSAML_Logger::debug('AUTH - ldap-feide: Attribute added: '. $attributes[$orgattributename]); | Small change related to Feide and attribute names. | simplesamlphp_saml2 | train | php |
ef31016da989e255f8e18166279aafc33a6df0a8 | diff --git a/tooling/circle-cli/index.js b/tooling/circle-cli/index.js
index <HASH>..<HASH> 100755
--- a/tooling/circle-cli/index.js
+++ b/tooling/circle-cli/index.js
@@ -31,5 +31,8 @@ const commands = requireDir(`./commands`);
Object.keys(commands).forEach((cmd) => yargs.command(commands[cmd]));
-yargs
- .help();
+// Aparently, referencing .argv is critically important to make yargs work.
+// eslint-disable-next-line no-unused-vars
+const argv = yargs
+ .help()
+ .argv; | fix(tooling): use yargs correctly | webex_spark-js-sdk | train | js |
ba7919bdb39ced620e2093e5f682fdb6d0b961f8 | diff --git a/lib/braid/config.rb b/lib/braid/config.rb
index <HASH>..<HASH> 100644
--- a/lib/braid/config.rb
+++ b/lib/braid/config.rb
@@ -71,7 +71,11 @@ module Braid
private
def write_mirror(mirror)
@db[mirror.path] = clean_attributes(mirror.attributes)
- File.open(@config_file, "wb") { |f| f.write JSON.pretty_generate(@db) }
+ new_db = {}
+ @db.keys.sort.each do |key|
+ new_db[key] = @db[key]
+ end
+ File.open(@config_file, "wb") { |f| f.write JSON.pretty_generate(new_db) }
end
def clean_attributes(hash) | Sort the hash before emitting it | cristibalan_braid | train | rb |
f4f056b21f9fbf5f0936ad2d83bf5ffd6aa2d8d2 | diff --git a/jaeger_client/config.py b/jaeger_client/config.py
index <HASH>..<HASH> 100644
--- a/jaeger_client/config.py
+++ b/jaeger_client/config.py
@@ -289,7 +289,6 @@ class Config(object):
tracer = self.create_tracer(
reporter=reporter,
sampler=sampler,
- tags=self.tags,
)
self._initialize_global_tracer(tracer=tracer)
@@ -304,6 +303,7 @@ class Config(object):
trace_id_header=self.trace_id_header,
baggage_header_prefix=self.baggage_header_prefix,
debug_id_header=self.debug_id_header,
+ tags=self.tags,
)
def _initialize_global_tracer(self, tracer): | Fix bug when creating tracer with tags. (#<I>) | jaegertracing_jaeger-client-python | train | py |
f7c8d90d1af87f5d9f6c8f14503b5125c3667629 | diff --git a/pkg/services/rendering/phantomjs.go b/pkg/services/rendering/phantomjs.go
index <HASH>..<HASH> 100644
--- a/pkg/services/rendering/phantomjs.go
+++ b/pkg/services/rendering/phantomjs.go
@@ -42,7 +42,8 @@ func (rs *RenderingService) renderViaPhantomJS(ctx context.Context, opts Opts) (
cmdArgs := []string{
"--ignore-ssl-errors=true",
- "--web-security=false",
+ "--web-security=true",
+ "--local-url-access=false",
phantomDebugArg,
scriptPath,
fmt.Sprintf("url=%v", url), | phantomjs: set web-security to true | grafana_grafana | train | go |
a8301bdad848dca857d721a88c77491478778a91 | diff --git a/code/libraries/joomlatools/library/template/helper/behavior.php b/code/libraries/joomlatools/library/template/helper/behavior.php
index <HASH>..<HASH> 100644
--- a/code/libraries/joomlatools/library/template/helper/behavior.php
+++ b/code/libraries/joomlatools/library/template/helper/behavior.php
@@ -245,6 +245,30 @@ class KTemplateHelperBehavior extends KTemplateHelperAbstract
static::setLoaded('modal');
}
+ if(!static::isLoaded('modal-select2-fix'))
+ {
+ $html .= "<script>
+
+ // WORKAROUND FOR ISSUE: #873
+
+ kQuery(function($)
+ {
+ $.magnificPopup.instance._onFocusIn = function(e)
+ {
+ // Do nothing if target element is select2 input
+ if( $(e.target).hasClass('select2-search__field') ) {
+ return true;
+ }
+
+ // Else call parent method
+ $.magnificPopup.proto._onFocusIn.call(this,e);
+ };
+ });
+ </script>";
+
+ static::setLoaded('modal-select2-fix');
+ }
+
$options = (string)$config->options;
$signature = md5('modal-'.$config->selector.$config->options_callback.$options); | #<I> Apply modal fix for solving focus issue on select2 inputs | joomlatools_joomlatools-framework | train | php |
5ecaee22f77c49eefdfcd2139980980c4cbc9bfc | diff --git a/src/Http/Middleware/CsrfProtectionMiddleware.php b/src/Http/Middleware/CsrfProtectionMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Http/Middleware/CsrfProtectionMiddleware.php
+++ b/src/Http/Middleware/CsrfProtectionMiddleware.php
@@ -155,9 +155,9 @@ class CsrfProtectionMiddleware
* Add a CSRF token to the response cookies.
*
* @param string $token The token to add.
- * @param \Psr\Http\Message\ServerRequestInterface $request The to get cookie path data from
- * @param \Cake\Http\Response $response The response to augment
- * @return \Cake\Http\Response Modified response
+ * @param \Psr\Http\Message\ServerRequestInterface $request The request to validate against.
+ * @param \Psr\Http\Message\ResponseInterface $response The response.
+ * @return @param \Psr\Http\Message\ResponseInterface $response Modified response.
*/
protected function _addTokenCookie($token, ServerRequestInterface $request, ResponseInterface $response)
{ | Updating a doc block in CsrfProtectionMiddleware | cakephp_cakephp | train | php |
3c3593558ec970c743ddaee9abf22071f6e6929b | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ setup(name='ruuvitag_sensor',
],
keywords='RuuviTag BLE',
install_requires=[
- 'rx',
+ 'rx<3',
'futures;python_version<"3.3"',
'ptyprocess;platform_system=="Linux"'
], | Pin rx to version <3 (#<I>) | ttu_ruuvitag-sensor | train | py |
bd9f983771d0c91e12733712f6323e6b5dae053a | diff --git a/cmd/plugins.go b/cmd/plugins.go
index <HASH>..<HASH> 100644
--- a/cmd/plugins.go
+++ b/cmd/plugins.go
@@ -70,6 +70,7 @@ func init() {
// flag is persistent (can be loaded on all children commands)
RootCommand.PersistentFlags().StringVarP(&pluginDir, "plugin-dir", "", "", `set directory path to load built-in and plugin shared object files from`)
+ RootCommand.PersistentFlags().MarkDeprecated("plugin-dir", "Shared objects are deprecated. See https://www.openpolicyagent.org/docs/latest/extensions/.")
// Runs before *all* children commands
RootCommand.PersistentPreRunE = func(cmd *cobra.Command, args []string) error { | cmd: Mark the --plugin-dir flag as deprecated
We no longer want to support Go shared object files. We will provide
better documentation for how to build OPA from source and customize at
compile-time. | open-policy-agent_opa | train | go |
b5d8c21c85ad27b7b1761b17e39e1ec58a446092 | diff --git a/tests/unit/modules/win_dns_client_test.py b/tests/unit/modules/win_dns_client_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/modules/win_dns_client_test.py
+++ b/tests/unit/modules/win_dns_client_test.py
@@ -64,29 +64,6 @@ class Mockwmi(object):
self.ipenabled = IPEnabled
return [Mockwmi()]
-
-class Mockwinapi(object):
- '''
- Mock winapi class
- '''
- def __init__(self):
- pass
-
- class winapi(object):
- '''
- Mock winapi class
- '''
- def __init__(self):
- pass
-
- @staticmethod
- def Com():
- '''
- Mock Com method
- '''
- pass
-
-win_dns_client.salt.utils = Mockwinapi
win_dns_client.wmi = Mockwmi | Remove Mockwinapi mocking class from win_dns_client_test
The tests run on the same process, the Mockwinapi class is squashing
salt.utils and causing problems in the test suite.
Refs #<I> | saltstack_salt | train | py |
3b5bbdf37714430595a1680d1e97eacf1fa13092 | diff --git a/src/Aws/S3/Model/MultipartUpload/UploadBuilder.php b/src/Aws/S3/Model/MultipartUpload/UploadBuilder.php
index <HASH>..<HASH> 100644
--- a/src/Aws/S3/Model/MultipartUpload/UploadBuilder.php
+++ b/src/Aws/S3/Model/MultipartUpload/UploadBuilder.php
@@ -85,7 +85,7 @@ class UploadBuilder extends AbstractUploadBuilder
/**
* Set the minimum acceptable part size
*
- * @param int $minSize Minimum acceptable part size
+ * @param int $minSize Minimum acceptable part size in bytes
*
* @return self
*/ | Update src/Aws/S3/Model/MultipartUpload/UploadBuilder.php
indicate the unit of measure for the min part size. | aws_aws-sdk-php | train | php |
ed0688099357d6d400f5bc2345e75fa17196b413 | diff --git a/lib/Ntentan.php b/lib/Ntentan.php
index <HASH>..<HASH> 100644
--- a/lib/Ntentan.php
+++ b/lib/Ntentan.php
@@ -273,7 +273,7 @@ class Ntentan
honam\template_engines\TemplateEngine::appendPath('views');
honam\template_engines\TemplateEngine::appendPath('views/default');
- honam\helpers\Helper::setBaseUrl("/{$app['prefix']}");
+ honam\helpers\Helper::setBaseUrl(Ntentan::getUrl(''));
Ntentan::$config = $app; | Leveraged ntentan for helper url configuration | ntentan_ntentan | train | php |
8b8753ad8593f08cbb721d4dea7817cefb546dd5 | diff --git a/builder/code/phreeze.backbone/scripts/app.js b/builder/code/phreeze.backbone/scripts/app.js
index <HASH>..<HASH> 100644
--- a/builder/code/phreeze.backbone/scripts/app.js
+++ b/builder/code/phreeze.backbone/scripts/app.js
@@ -28,8 +28,13 @@ var app = {
+ '<span>'+ this.escapeHtml(message) +'</span>'
+ '</div>';
- $('#' + containerId).append(html);
- $('#'+containerId).parent().scrollTop(); // TODO: this doesn't scroll to the top of the modal window
+ // scroll the alert message into view
+ var container = $('#' + containerId);
+ container.append(html);
+ container.parent().animate({
+ scrollTop: container.offset().top - container.parent().offset().top + container.parent().scrollTop() - 10 // (10 is for top padding)
+ });
+
$('#'+id).slideDown('fast');
if (timeout > 0) { | fixed issue with edit form alert not scrolling properly into view | jasonhinkle_phreeze | train | js |
63451aab50cd6ac74e74da6ca9aa1bfd972262e0 | diff --git a/modules/cms/classes/MediaLibrary.php b/modules/cms/classes/MediaLibrary.php
index <HASH>..<HASH> 100644
--- a/modules/cms/classes/MediaLibrary.php
+++ b/modules/cms/classes/MediaLibrary.php
@@ -385,8 +385,8 @@ class MediaLibrary
return $path;
}
- $regexDirectorySeparator = preg_quote(DIRECTORY_SEPARATOR, '/');
- $regexDot = preg_quote('.', '/');
+ $regexDirectorySeparator = preg_quote('/', '#');
+ $regexDot = preg_quote('.', '#');
$regex = [
// Checks for parent or current directory reference at beginning of path
'(^'.$regexDot.'+?'.$regexDirectorySeparator.')',
@@ -401,7 +401,7 @@ class MediaLibrary
/*
* Combine everything to one regex
*/
- $regex = '/'.implode('|', $regex).'/';
+ $regex = '#'.implode('|', $regex).'#';
if (preg_match($regex, $path) !== 0 || strpos($path, '//') !== false) {
throw new ApplicationException(Lang::get('cms::lang.media.invalid_path', compact('path')));
} | Fixes validatePath for Windows
(DIRECTORY_SEPARATOR is normalized in code above) | octobercms_october | train | php |
1425fe772ff6ac1e45b21f8400e19f04cad1e094 | diff --git a/lib/barbeque/execution_poller.rb b/lib/barbeque/execution_poller.rb
index <HASH>..<HASH> 100644
--- a/lib/barbeque/execution_poller.rb
+++ b/lib/barbeque/execution_poller.rb
@@ -1,8 +1,15 @@
module Barbeque
class ExecutionPoller
+ def initialize
+ @stop_requested = false
+ end
+
def run
Barbeque::JobExecution.running.find_in_batches do |job_executions|
job_executions.shuffle.each do |job_execution|
+ if @stop_requested
+ return
+ end
job_execution.with_lock do
if job_execution.running?
poll(job_execution)
@@ -14,6 +21,7 @@ module Barbeque
end
def stop
+ @stop_requested = true
end
private
diff --git a/lib/barbeque/retry_poller.rb b/lib/barbeque/retry_poller.rb
index <HASH>..<HASH> 100644
--- a/lib/barbeque/retry_poller.rb
+++ b/lib/barbeque/retry_poller.rb
@@ -1,8 +1,15 @@
module Barbeque
class RetryPoller
+ def initialize
+ @stop_requested = false
+ end
+
def run
Barbeque::JobRetry.running.find_in_batches do |job_retries|
job_retries.shuffle.each do |job_retry|
+ if @stop_requested
+ return
+ end
job_retry.with_lock do
if job_retry.running?
poll(job_retry)
@@ -14,6 +21,7 @@ module Barbeque
end
def stop
+ @stop_requested = true
end
private | Stop polling after receiving signal as soon as possible | cookpad_barbeque | train | rb,rb |
f27650b449ecebc45f241f066814b64b1b04e55c | diff --git a/scripts/distribution/pypi_create.py b/scripts/distribution/pypi_create.py
index <HASH>..<HASH> 100755
--- a/scripts/distribution/pypi_create.py
+++ b/scripts/distribution/pypi_create.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Copyright (c) 2018 SubDownloader Developers - See COPYING - GPLv3
from pathlib import Path
import subprocess
diff --git a/scripts/distribution/translation_generator.py b/scripts/distribution/translation_generator.py
index <HASH>..<HASH> 100755
--- a/scripts/distribution/translation_generator.py
+++ b/scripts/distribution/translation_generator.py
@@ -1,15 +1,13 @@
#!/usr/bin/env python3
-# Copyright (c) 2017 Entertainer Developers - See COPYING - GPLv2
+# -*- coding: utf-8 -*-
+# Copyright (c) 2018 SubDownloader Developers - See COPYING - GPLv3
"""Generate translations related files, pot/po/mo"""
import argparse
import collections
import logging
import os
-try:
- from pathlib import Path
-except ImportError:
- from pathlib2 import Path
+from pathlib import Path
import shutil
from subprocess import check_call | scripts: fix headers of scripts | subdownloader_subdownloader | train | py,py |
42d3a547236580a6f8f284627fab5e0006162b37 | diff --git a/selenium/webdriver/test.js b/selenium/webdriver/test.js
index <HASH>..<HASH> 100644
--- a/selenium/webdriver/test.js
+++ b/selenium/webdriver/test.js
@@ -30,7 +30,8 @@ driver.get(target);
driver.findElement(By.id('gsf-query')).sendKeys('neurogenesis');
var ul = driver.findElement(By.className('ui-autocomplete'));
ul.getText().then(function(text){
- return text.search('GO:0022008') !== -1;
+ //return text.search('GO:0022008') !== -1;
+ return text.search('GO:00208') !== -1;
});
// Done. | test that I can actually make it fail | geneontology_amigo | train | js |
aee9de326309e4359d99daf5bb642185312391a3 | diff --git a/vmware/vm/delete.go b/vmware/vm/delete.go
index <HASH>..<HASH> 100644
--- a/vmware/vm/delete.go
+++ b/vmware/vm/delete.go
@@ -14,7 +14,7 @@ func (action *Delete) Run() error {
logger.Printf("vm is running, stopping")
e = vm.Stop()
if e != nil {
- return e
+ logger.Printf("ERROR=%q", e)
}
}
return vm.Delete() | do not abort on delete when stopping returns error
There is a problem detecting the `real` state of an instance | dynport_dgtk | train | go |
d73a99560c6ed39e69616a768f742e8fe3fc4777 | diff --git a/BaseImage.php b/BaseImage.php
index <HASH>..<HASH> 100644
--- a/BaseImage.php
+++ b/BaseImage.php
@@ -278,17 +278,17 @@ class BaseImage
*/
public static function resize($image, $width, $height, $keepAspectRatio = true, $allowUpscaling = false)
{
- $img = self::ensureImageInterfaceInstance($image);
+ $img = self::ensureImageInterfaceInstance($image)->copy();
/** @var BoxInterface $sourceBox */
$sourceBox = $img->getSize();
$destinationBox = static::getBox($sourceBox, $width, $height, $keepAspectRatio);
if ($allowUpscaling === false && self::isUpscaling($sourceBox, $destinationBox)) {
- return $img->copy();
+ return $img;
}
- return $img->copy()->resize($destinationBox);
+ return $img->resize($destinationBox);
}
/** | Let's work on the copy of source image | yiisoft_yii2-imagine | train | php |
1c2a3417ed40e0707630225d7421cf122e93408e | diff --git a/pushy/src/main/java/com/turo/pushy/apns/TlsAuthenticationMockApnsServerHandler.java b/pushy/src/main/java/com/turo/pushy/apns/TlsAuthenticationMockApnsServerHandler.java
index <HASH>..<HASH> 100644
--- a/pushy/src/main/java/com/turo/pushy/apns/TlsAuthenticationMockApnsServerHandler.java
+++ b/pushy/src/main/java/com/turo/pushy/apns/TlsAuthenticationMockApnsServerHandler.java
@@ -71,6 +71,8 @@ class TlsAuthenticationMockApnsServerHandler extends AbstractMockApnsServerHandl
@Override
protected void verifyHeaders(final Http2Headers headers) throws RejectedNotificationException {
+ super.verifyHeaders(headers);
+
final String topic;
{
final CharSequence topicSequence = headers.get(APNS_TOPIC_HEADER); | Added a missing call to super.verifyHeaders. | relayrides_pushy | train | java |
93f52e41fd55a3be8912c11f89587c510bc82804 | diff --git a/src/LiveControl/EloquentDataTable/DataTable.php b/src/LiveControl/EloquentDataTable/DataTable.php
index <HASH>..<HASH> 100644
--- a/src/LiveControl/EloquentDataTable/DataTable.php
+++ b/src/LiveControl/EloquentDataTable/DataTable.php
@@ -96,19 +96,19 @@ class DataTable
*/
public function make()
{
- $this->total = $this->count();
-
$this->rawColumns = $this->getRawColumns($this->columns);
$this->columnNames = $this->getColumnNames();
+ $this->addSelect();
+
+ $this->total = $this->count();
+
if (static::$versionTransformer === null) {
static::$versionTransformer = new Version110Transformer();
}
-
- $this->addSelect();
$this->addFilters();
- $this->filtered = $this->count($this->builder);
+ $this->filtered = $this->count();
$this->addOrderBy();
$this->addLimits(); | We need to have something selected before we can count. | LiveControl_EloquentDataTable | train | php |
18155a42b0cb091db29753f1ba1d7a9a6b86fb25 | diff --git a/openquake/baselib/performance.py b/openquake/baselib/performance.py
index <HASH>..<HASH> 100644
--- a/openquake/baselib/performance.py
+++ b/openquake/baselib/performance.py
@@ -188,8 +188,7 @@ class Monitor(object):
pdata = Hdf5Dataset.create(h5, 'performance_data', perf_dt)
pdata.extend(data)
h5.close()
- else: # print on stddout
- print(data[0])
+ # else print(data[0]) on stdout
return data | Small change to Monitor.flush | gem_oq-engine | train | py |
900bf2ec3065fe1ef5c7478332bac0eaab9e03fd | diff --git a/functions/menus.php b/functions/menus.php
index <HASH>..<HASH> 100644
--- a/functions/menus.php
+++ b/functions/menus.php
@@ -9,12 +9,6 @@
*/
/**
- * Add theme support for menus.
- * @since 0.8
- */
-add_theme_support( 'menus' );
-
-/**
* Register menus.
* @since 0.8
*/
diff --git a/functions/widgets.php b/functions/widgets.php
index <HASH>..<HASH> 100644
--- a/functions/widgets.php
+++ b/functions/widgets.php
@@ -9,12 +9,6 @@
*/
/**
- * Add theme support for widgets.
- * @since 0.8
- */
-add_theme_support( 'widgets' );
-
-/**
* Register widget areas
* @since 0.7
*/ | No need to add theme support for menus and widgets. These are added internally by WordPress when specific menu or widget functions are called.
git-svn-id: <URL> | justintadlock_hybrid-core | train | php,php |
82d6b404903bebabb8ae3df2453001d0fb086e6b | diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index <HASH>..<HASH> 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -170,7 +170,7 @@ class TestEasyInstallTest:
sdist_zip.close()
return str(sdist)
- @pytest.mark.xfail(os.environ.get('LANG') == 'C',
+ @pytest.mark.xfail(setuptools.tests.is_ascii,
reason="https://github.com/pypa/setuptools/issues/706")
def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch):
""" | Use the logic already vetted for determining ascii context. | pypa_setuptools | train | py |
37366b0015b857803e03cc279579d87c61d41e8c | diff --git a/lib/route_translator.rb b/lib/route_translator.rb
index <HASH>..<HASH> 100644
--- a/lib/route_translator.rb
+++ b/lib/route_translator.rb
@@ -51,7 +51,7 @@ module RouteTranslator
yield @config if block
- resolve_host_locale_config_conflicts unless @config.host_locales.empty?
+ resolve_host_locale_config_conflicts if @config.host_locales.present?
@config
end | Improve configuration
Checks for presence instead of not absence | enriclluelles_route_translator | train | rb |
99031834ff6365715d388df0067db80ca0f8c007 | diff --git a/lib/browser/api/menu.js b/lib/browser/api/menu.js
index <HASH>..<HASH> 100644
--- a/lib/browser/api/menu.js
+++ b/lib/browser/api/menu.js
@@ -56,8 +56,7 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
}
// menu.popup({})
- if (window && typeof window === 'object' && window.constructor &&
- window.constructor.name !== 'BrowserWindow') {
+ if (typeof window === 'object' && window.constructor !== BrowserWindow) {
opts = window
// menu.popup(window, {})
} else if (x && typeof x === 'object') { | :wrench: Cleanup | electron_electron | train | js |
7c86af621e7b8eb86e2d894550f4b4f6d68fd627 | diff --git a/question/export.php b/question/export.php
index <HASH>..<HASH> 100644
--- a/question/export.php
+++ b/question/export.php
@@ -73,7 +73,7 @@ if ($from_form = $export_form->get_data()) {
echo get_string('yourfileshoulddownload', 'question', $export_url->out());
echo $OUTPUT->box_end();
- $PAGE->requires->js_function_call('document.location.replace', array($export_url->out()), false, 1);
+ $PAGE->requires->js_function_call('document.location.replace', array($export_url->out(false)), false, 1);
echo $OUTPUT->continue_button(new moodle_url('edit.php', $thispageurl->params()));
echo $OUTPUT->footer(); | MDL-<I> question export: make it work with slasharguments off.
Thanks to Brian King for working out the problem and how to fix it. I am
just committing his patch. | moodle_moodle | train | php |
4fabab7fc3eeeda6e14c63e589252fbf5e844835 | diff --git a/src/main/java/water/api/RequestArguments.java b/src/main/java/water/api/RequestArguments.java
index <HASH>..<HASH> 100644
--- a/src/main/java/water/api/RequestArguments.java
+++ b/src/main/java/water/api/RequestArguments.java
@@ -1396,12 +1396,12 @@ public class RequestArguments extends RequestStatics {
else if (input.equals("false")) b= false;
else throw new IllegalArgumentException(input+" is not valid boolean value. Only 1 and 0 are allowed.");
Vec vec = _fcv.value();
- if( !vec.isInt() && b ) throw new IllegalArgumentException("Only Regression on float responses");
- if( vec.isEnum() && !b ) throw new IllegalArgumentException("Only Classification on catagorical responses");
+ if( !vec.isInt() && b ) throw new IllegalArgumentException("Float response allows only regression!");
+ if( vec.isEnum() && !b ) throw new IllegalArgumentException("Categorical response allows only classification!");
return b;
}
@Override protected Boolean defaultValue() {
- return !_fcv.value().isInt(); // Float columns only regress
+ return _fcv.value().isInt(); // Allows only float columns for regression
}
} | Minor patch of ClassifyBool control.
Default value of control was switched. | h2oai_h2o-2 | train | java |
0e8d4fe3131b24add36fcd8b9b1be27a85726910 | diff --git a/core/class.rb b/core/class.rb
index <HASH>..<HASH> 100644
--- a/core/class.rb
+++ b/core/class.rb
@@ -8,7 +8,11 @@ class Class
#{sup.inherited `klass`};
- return block !== nil ? block.call(klass, null) : klass;
+ if (block !== nil) {
+ block.call(klass, null);
+ }
+
+ return klass;
}
end | Fix bug in Class.new when taking a block | opal_opal | train | rb |
994fe53669df10cf73550cd851a71866590c1b14 | diff --git a/cmd/xl-v1-healing.go b/cmd/xl-v1-healing.go
index <HASH>..<HASH> 100644
--- a/cmd/xl-v1-healing.go
+++ b/cmd/xl-v1-healing.go
@@ -300,7 +300,7 @@ func listAllBuckets(storageDisks []StorageAPI) (buckets map[string]VolInfo,
if errors.IsErrIgnored(err, bucketMetadataOpIgnoredErrs...) {
continue
}
- break
+ return nil, nil, err
}
for _, volInfo := range volsInfo {
// StorageAPI can send volume names which are
@@ -316,7 +316,7 @@ func listAllBuckets(storageDisks []StorageAPI) (buckets map[string]VolInfo,
buckets[volInfo.Name] = volInfo
}
}
- return buckets, bucketsOcc, err
+ return buckets, bucketsOcc, nil
}
// ListBucketsHeal - Find all buckets that need to be healed | Avoid shadowing ignored errors listAllBuckets() (#<I>)
It can happen such that one of the disks that was down would
return 'errDiskNotFound' but the err is preserved due to
loop shadowing which leads to issues when healing the bucket. | minio_minio | train | go |
6225c854d869db28adc7c74f0b18e0dfdefebff6 | diff --git a/server/sonar-web/src/main/js/widgets/issue-filter/widget.js b/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
index <HASH>..<HASH> 100644
--- a/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
+++ b/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
@@ -302,7 +302,8 @@ export default Marionette.ItemView.extend({
options = _.extend({}, this.query, {
ps: 1,
facets: this.options.distributionAxis,
- facetMode: facetMode
+ facetMode: facetMode,
+ additionalFields: '_all'
});
if (this.options.componentUuid != null) {
_.extend(options, { componentUuids: this.options.componentUuid }); | SONAR-<I> Rule names are not displayed correctly in then issue filter widget | SonarSource_sonarqube | train | js |
178b4d26839b9c5d23a97331a59347ca4305fc27 | diff --git a/code/dataobjects/EventRegistration.php b/code/dataobjects/EventRegistration.php
index <HASH>..<HASH> 100644
--- a/code/dataobjects/EventRegistration.php
+++ b/code/dataobjects/EventRegistration.php
@@ -72,6 +72,13 @@ class EventRegistration extends DataObject {
}
/**
+ * @see EventRegistration::EventTitle()
+ */
+ public function getTitle() {
+ return $this->EventTitle();
+ }
+
+ /**
* @return string
*/
public function EventTitle() { | MINOR: Added a getTitle() method to EventRegistration. | registripe_registripe-core | train | php |
5c71a4e76897844ab6aeabb581549d981d9768c9 | diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -448,7 +448,7 @@ module ActionView
# Returns a select tag with options for each of the minutes 0 through 59 with the current minute selected.
# Also can return a select tag with options by <tt>minute_step</tt> from 0 through 59 with the 00 minute
- # selected. The <tt>minute</tt> can also be substituted for a minute number.
+ # selected. The <tt>date</tt> can also be substituted for a minute number.
# Override the field name using the <tt>:field_name</tt> option, 'minute' by default.
#
# ==== Examples
@@ -473,7 +473,7 @@ module ActionView
end
# Returns a select tag with options for each of the hours 0 through 23 with the current hour selected.
- # The <tt>hour</tt> can also be substituted for a hour number.
+ # The <tt>date</tt> can also be substituted for a hour number.
# Override the field name using the <tt>:field_name</tt> option, 'hour' by default.
#
# ==== Examples | wording between select_second, select_minute and
select_hour should be consistent and correct | rails_rails | train | rb |
658c43ab9865e88ee26d8078a51405103d2367f6 | diff --git a/lib/jsduck/util/parallel.rb b/lib/jsduck/util/parallel.rb
index <HASH>..<HASH> 100644
--- a/lib/jsduck/util/parallel.rb
+++ b/lib/jsduck/util/parallel.rb
@@ -1,4 +1,3 @@
-require 'rubygems'
require 'parallel'
module JsDuck
diff --git a/spec/smoke_spec.rb b/spec/smoke_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/smoke_spec.rb
+++ b/spec/smoke_spec.rb
@@ -2,7 +2,9 @@
describe "smoke test running jsduck --version" do
it "does not crash" do
- `./bin/jsduck --version`
+ # Explicitly include rubygems, otherwise TravisCI will fail to
+ # load the parallel and possibly other gems in Ruby 1.8
+ `ruby -e 'require "rubygems"' ./bin/jsduck --version`
$?.exitstatus.should == 0
end | Require rubygems inside the smoke test instead.
Drop the statement from JSDuck code itself. | senchalabs_jsduck | train | rb,rb |
346c74915883929386b19e610f126b7f1d061b3b | diff --git a/app/gosqs/gosqs.go b/app/gosqs/gosqs.go
index <HASH>..<HASH> 100644
--- a/app/gosqs/gosqs.go
+++ b/app/gosqs/gosqs.go
@@ -597,7 +597,7 @@ func DeleteMessageBatch(w http.ResponseWriter, req *http.Request) {
notFoundEntries := make([]app.BatchResultErrorEntry, 0)
for _, deleteEntry := range deleteEntries {
- if deleteEntry.Deleted == false {
+ if deleteEntry.Deleted {
notFoundEntries = append(notFoundEntries, app.BatchResultErrorEntry{
Code: "1",
Id: deleteEntry.Id, | Fix delete check of DeleteMessageBatch | p4tin_goaws | train | go |
c58086671d3cb02e9cd3b6107c27a062cbc830c7 | diff --git a/schema_salad/__init__.py b/schema_salad/__init__.py
index <HASH>..<HASH> 100644
--- a/schema_salad/__init__.py
+++ b/schema_salad/__init__.py
@@ -30,3 +30,7 @@ if six.PY3:
from past import autotranslate # type: ignore
autotranslate(['avro', 'avro.schema'])
+ import avro
+ import avro.schema
+ from past.translation import remove_hooks # type: ignore
+ remove_hooks() | Remove Py2Fixer hook after autotranslating to python 3 (#<I>)
* Remove Py2Fixer hook after autotranslating to python 3 | common-workflow-language_schema_salad | train | py |
2e80d148f80fafb6cff708ecb01b6317473fcae8 | diff --git a/src/Composer/Autoload/ClassLoader.php b/src/Composer/Autoload/ClassLoader.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Autoload/ClassLoader.php
+++ b/src/Composer/Autoload/ClassLoader.php
@@ -92,10 +92,10 @@ class ClassLoader
}
/**
- * Registers a set of PSR-4 directories for a given namespace, either
- * appending or prepending to the ones previously set for this namespace.
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The namespace, with trailing '\\'.
+ * @param string $prefix The prefix.
* @param array|string $paths The location(s) of the classes
* @param bool $prepend Prepend the location(s)
*/
@@ -137,7 +137,8 @@ class ClassLoader
}
/**
- * Registers a set of classes, merging with any others previously set.
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The namespace, with trailing '\\'.
* @param array|string $paths The location(s) of the classes
@@ -182,7 +183,8 @@ class ClassLoader
}
/**
- * Registers a set of classes, replacing any others previously set.
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
*
* @param string $prefix The classes prefix
* @param array|string $paths The location(s) of the classes | PSR-4 loader: Fix comments: PSR-0 related methods should have comments refering to PSR-0 and prefixes. PSR-4 related methods should have comments refering to PSR-4 and namespaces. | mothership-ec_composer | train | php |
9f3b388865a36bb2eb996a42f0f0461501db6690 | diff --git a/test/integration/big_values.py b/test/integration/big_values.py
index <HASH>..<HASH> 100755
--- a/test/integration/big_values.py
+++ b/test/integration/big_values.py
@@ -89,4 +89,4 @@ def test(opts, port):
if __name__ == "__main__":
op = make_option_parser()
opts = op.parse(sys.argv)
- auto_server_test_main(test, opts, timeout = 60)
+ auto_server_test_main(test, opts, timeout = 240) | Increasing the big_values timeout to account for mock cache slowdown | rethinkdb_rethinkdb | train | py |
7a20b680708f88271c9c3cb86028943ae48ea0a8 | diff --git a/go/pfconfigdriver/fetch.go b/go/pfconfigdriver/fetch.go
index <HASH>..<HASH> 100644
--- a/go/pfconfigdriver/fetch.go
+++ b/go/pfconfigdriver/fetch.go
@@ -257,6 +257,17 @@ func FetchDecodeSocketCache(ctx context.Context, o PfconfigObject) (bool, error)
return true, err
}
+// Fetch the keys of a resource
+func FetchKeys(ctx context.Context, name string) ([]string , error) {
+ keys := PfconfigKeys{PfconfigNS : name}
+ err := FetchDecodeSocket(ctx, &keys)
+ if err != nil {
+ return nil, err
+ }
+
+ return keys.Keys, nil
+}
+
// Fetch and decode a namespace from pfconfig given a pfconfig compatible struct
// This will fetch the json representation from pfconfig and decode it into o
// o must be a pointer to the struct as this should be used by reference | Add a helper function to get the keys from a resource | inverse-inc_packetfence | train | go |
92aa4535f8498843102e99ebfdc68f83cb99255f | diff --git a/views/js/qtiCreator/plugins/menu/preview.js b/views/js/qtiCreator/plugins/menu/preview.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCreator/plugins/menu/preview.js
+++ b/views/js/qtiCreator/plugins/menu/preview.js
@@ -79,6 +79,17 @@ define([
self.enable();
}
});
+
+ this.getAreaBroker()
+ .getItemPanelArea()
+ .on('dropped.gridEdit.insertable', function() {
+ this.enable();
+ }.bind(this))
+ .on('item.deleted', function() {
+ if (this.getHost().getItem().bdy.bdy === "") {
+ this.disable();
+ }
+ }.bind(this));
},
/**
diff --git a/views/js/qtiCreator/widgets/states/Deleting.js b/views/js/qtiCreator/widgets/states/Deleting.js
index <HASH>..<HASH> 100755
--- a/views/js/qtiCreator/widgets/states/Deleting.js
+++ b/views/js/qtiCreator/widgets/states/Deleting.js
@@ -233,6 +233,7 @@ define([
this.item.body(contentHelper.getContent(this.$item));
}
+ this.$item.trigger('item.deleted');
};
return DeletingState; | Toggle button on adding/removing interaction | oat-sa_extension-tao-itemqti | train | js,js |
3d8b0e5228445b5e63db794620a66e1c1ce5d6f0 | diff --git a/builder/osc/common/omi_config.go b/builder/osc/common/omi_config.go
index <HASH>..<HASH> 100644
--- a/builder/osc/common/omi_config.go
+++ b/builder/osc/common/omi_config.go
@@ -136,7 +136,7 @@ func (c *OMIConfig) prepareRegions(accessConfig *AccessConfig) (errs []error) {
if (accessConfig != nil) && (region == accessConfig.RawRegion) {
// make sure we don't try to copy to the region we originally
// create the OMI in.
- log.Printf("Cannot copy OMI to AWS session region '%s', deleting it from `omi_regions`.", region)
+ log.Printf("Cannot copy OMI to OUTSCALE session region '%s', deleting it from `omi_regions`.", region)
continue
}
regions = append(regions, region)
@@ -147,7 +147,6 @@ func (c *OMIConfig) prepareRegions(accessConfig *AccessConfig) (errs []error) {
return errs
}
-// See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html
func validateKmsKey(kmsKey string) (valid bool) {
kmsKeyIdPattern := `[a-f0-9-]+$`
aliasPattern := `alias/[a-zA-Z0-9:/_-]+$` | fix: change logs in omi config | hashicorp_packer | train | go |
4a5164ba537b56b9f3156e458c0c242ddab6cfd3 | diff --git a/install.php b/install.php
index <HASH>..<HASH> 100644
--- a/install.php
+++ b/install.php
@@ -794,7 +794,7 @@ function form_table($nextstage, $formaction, $databases) {
<td colspan="2">
<?php
error_reporting(0); // Hide errors
- $dbconnected = $DB->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'], false, $INSTALL['prefix']);
+ $dbconnected = $DB->connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'], false, $INSTALL['prefix']);
error_reporting(38911); // Show errors
if ($dbconnected) {
/// Execute environment check, printing results | MDL-<I> added some overlook conversions - thanks to Eloy's script ;-) | moodle_moodle | train | php |
95ba06afa554601bc2c81d6f6d551b209f7528fd | diff --git a/web/concrete/core/controllers/blocks/form_minisurvey.php b/web/concrete/core/controllers/blocks/form_minisurvey.php
index <HASH>..<HASH> 100644
--- a/web/concrete/core/controllers/blocks/form_minisurvey.php
+++ b/web/concrete/core/controllers/blocks/form_minisurvey.php
@@ -163,7 +163,7 @@ class Concrete5_Controller_Block_FormMinisurvey {
$requiredSymbol=($questionRow['required'])?' <span class="required">*</span>':'';
echo '<tr>
<td valign="top" class="question"><label for="Question'.intval($questionRow['msqID']).'">'.$questionRow['question'].''.$requiredSymbol.'</label></td>
- <td valign="top">'.$this->loadInputType($questionRow,showEdit).'</td>
+ <td valign="top">'.$this->loadInputType($questionRow, $showEdit).'</td>
</tr>';
//}
}
@@ -336,4 +336,4 @@ class Concrete5_Controller_Block_FormMinisurvey {
$vals=array( intval($qsID) );
$rs=$db->query('DELETE FROM btFormQuestions WHERE bID=0 AND questionSetId=?',$vals);
}
-}
\ No newline at end of file
+} | Added missing dollar sign
Money is important! ;)
Former-commit-id: 7e<I>d2b5ec5e<I>f<I>fd<I>ac3df<I>ec<I> | concrete5_concrete5 | train | php |
7b8939ce5bdd6c3ae3d30151670d9d40723b4905 | diff --git a/geomdl/BSpline.py b/geomdl/BSpline.py
index <HASH>..<HASH> 100644
--- a/geomdl/BSpline.py
+++ b/geomdl/BSpline.py
@@ -964,7 +964,7 @@ class Curve(Abstract.Curve):
new_ctrlpts.append(temp)
# Convert to (x+1)-D curve, where x = self.dimension
- ret_val = Curve()
+ ret_val = self.__class__()
ret_val.degree = self.degree
ret_val.ctrlpts = new_ctrlpts
ret_val.knotvector = self.knotvector | Fixed a compatibility issue with subclasses | orbingol_NURBS-Python | train | py |
c30eaa387f98e099c281c650f6095d26baf03fca | diff --git a/viewer.js b/viewer.js
index <HASH>..<HASH> 100644
--- a/viewer.js
+++ b/viewer.js
@@ -6,7 +6,7 @@
function ImageViewer(canvasId, imageUrl, options){
self = this;
- var options = (typeof options === 'object') ? options : {};
+ options = (typeof options === 'object') ? options : {};
// canvas
this.canvas = document.getElementById(canvasId); | lint error: variable doesn't need to be redefined | pfirpfel_image-viewer | train | js |
ad00e2057c13d550d372c10d5e2ab9af269abb72 | diff --git a/Entity/Node.php b/Entity/Node.php
index <HASH>..<HASH> 100644
--- a/Entity/Node.php
+++ b/Entity/Node.php
@@ -223,7 +223,7 @@ class Node implements NodeInterface
public function __toString()
{
- return $this->getName();
+ return (string)$this->getName();
}
/** | Node::toString always returns a string now | Mandarin-Medien_MMCmfNodeBundle | train | php |
5fb3b1f8e67799ab834bdb3f9be09c5a3a48f423 | diff --git a/lib/manager.js b/lib/manager.js
index <HASH>..<HASH> 100644
--- a/lib/manager.js
+++ b/lib/manager.js
@@ -118,7 +118,7 @@ Manager.prototype.eth_getTransactionByHash = function(tx_hash, callback) {
}
Manager.prototype.eth_getTransactionCount = function(address, block_number, callback) {
- callback(null, this.blockchain.getTransactionCount(address, callback));
+ this.blockchain.getTransactionCount(address, callback);
}
Manager.prototype.eth_sendTransaction = function(tx_data, callback) { | Fix nasty bug where getTransactionCount's callback was being called twice. | trufflesuite_ganache-core | train | js |
25b03a1ba46f1ed16df64cf931ac04a7afa8ac69 | diff --git a/bolt-modules/boltlib/spec/functions/run_task_spec.rb b/bolt-modules/boltlib/spec/functions/run_task_spec.rb
index <HASH>..<HASH> 100644
--- a/bolt-modules/boltlib/spec/functions/run_task_spec.rb
+++ b/bolt-modules/boltlib/spec/functions/run_task_spec.rb
@@ -298,7 +298,7 @@ describe 'run_task' do
)
end
- it "errors when a specified parameter value is not Data" do
+ it "errors when a specified parameter value is not RichData" do
task_params.merge!(
'mandatory_string' => 'str',
'mandatory_integer' => 10,
@@ -307,7 +307,7 @@ describe 'run_task' do
)
is_expected.to run.with_params(task_name, hostname, task_params).and_raise_error(
- Puppet::ParseError, /Task parameters is not of type Data/
+ Puppet::ParseError, /Task parameters is not of type RichData/
)
end
end | (BOLT-<I>) Trying to fix run_task tests | puppetlabs_bolt | train | rb |
4a81631ecf042178c1b9888927a9709fc6574989 | diff --git a/lib/haml/filters.rb b/lib/haml/filters.rb
index <HASH>..<HASH> 100644
--- a/lib/haml/filters.rb
+++ b/lib/haml/filters.rb
@@ -349,6 +349,7 @@ END
# Only works if [RDiscount](https://github.com/rtomayko/rdiscount),
# [RPeg-Markdown](https://github.com/rtomayko/rpeg-markdown),
# [Maruku](http://maruku.rubyforge.org),
+ # [Kramdown](https://github.com/gettalong/kramdown),
# or [BlueCloth](http://www.deveiate.org/projects/BlueCloth) are installed.
module Markdown
include Base | Add missing reference to Kramdown. | haml_haml | train | rb |
5c83506afccacc4fabea1c71cb0d4ffe38d2321c | diff --git a/src/assets/js/properties/url.js b/src/assets/js/properties/url.js
index <HASH>..<HASH> 100644
--- a/src/assets/js/properties/url.js
+++ b/src/assets/js/properties/url.js
@@ -21,7 +21,7 @@ class Url {
add(e) {
e.preventDefault();
- const $this = $(this);
+ const $this = $(e.currentTarget);
Utils.wpMediaEditor().on('insert', (attachment) => {
$this.prev().val(attachment.url);
@@ -32,7 +32,7 @@ class Url {
* Bind elements with functions.
*/
binds() {
- $(document).on('click', '.papi-url-media-button', this.add);
+ $(document).on('click', '.papi-url-media-button', this.add.bind(this));
}
} | Use `bind` and `e.currentTarget` for url property | wp-papi_papi | train | js |
27837a467039f4acc66105c53e2a4f51aac6a041 | diff --git a/spec/bracket_spec.rb b/spec/bracket_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/bracket_spec.rb
+++ b/spec/bracket_spec.rb
@@ -15,7 +15,7 @@ describe BracketTree::Bracket::Base do
bracket.matches.should be_a Array
bracket.matches.map(&:class).should == [BracketTree::Match, BracketTree::Match, BracketTree::Match]
end
-
+
it 'should create an empty if matches are not passed' do
bracket.matches.should be_a Array
bracket.matches.should == []
@@ -196,4 +196,14 @@ describe BracketTree::Bracket::Base do
end
end
end
+
+ describe 'single elimination bracket' do
+ let(:klass) {BracketTree::Bracket::SingleElimination }
+
+ it 'builds brackets with expected depth' do
+ [[64, 7], [128,8]].each do |size, depth|
+ klass.by_size(size).depth.should == {:left => depth, :right => depth, :total => 7}
+ end
+ end
+ end
end | expose issue with single elimination brackets depth | agoragames_bracket_tree | train | rb |
164afe1fb5773aee625febe49c0082f91f6559b7 | diff --git a/src/behavior.js b/src/behavior.js
index <HASH>..<HASH> 100644
--- a/src/behavior.js
+++ b/src/behavior.js
@@ -119,7 +119,7 @@ var behavior = (function() {
return;
if(container.childNodes.length > 0)
- cursor.moveAtEnd(parser.latestChild(container));
+ cursor.moveAtTextEnd(container);
else
cursor.moveAtBeginning(container);
cursor.setSelection();
@@ -153,7 +153,7 @@ var behavior = (function() {
case 'before':
previous = block.previous(element);
if (previous) {
- cursor.moveAtEnd(previous);
+ cursor.moveAtTextEnd(previous);
cursor.setSelection();
}
break;
diff --git a/src/cursor.js b/src/cursor.js
index <HASH>..<HASH> 100644
--- a/src/cursor.js
+++ b/src/cursor.js
@@ -147,6 +147,10 @@ var Cursor = (function() {
if (this.isSelection) return new Cursor(this.host, this.range);
},
+ moveAtTextEnd: function(element) {
+ return this.moveAtEnd(parser.latestChild(element));
+ },
+
setHost: function(element) {
this.host = parser.getHost(element);
if (!this.host) { | Helper method in cursor to move at text end | livingdocsIO_editable.js | train | js,js |
2dabd7f54eba532ed6f3152ddf4a2b9780044336 | diff --git a/src/Console/Commands/SeedCommand.php b/src/Console/Commands/SeedCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/Commands/SeedCommand.php
+++ b/src/Console/Commands/SeedCommand.php
@@ -67,7 +67,7 @@ class SeedCommand extends Command
'username' => 'Admin',
'given_name' => 'Admin',
'family_name' => 'User',
- 'email' => '[email protected]',
+ 'email' => '[email protected]',
];
return tap(app('cortex.auth.admin')->firstOrNew($admin)->fill([
@@ -91,7 +91,7 @@ class SeedCommand extends Command
$guardian = [
'is_active' => true,
'username' => 'Guardian',
- 'email' => '[email protected]',
+ 'email' => '[email protected]',
];
return tap(app('cortex.auth.guardian')->firstOrNew($guardian)->fill([ | Update seeder data to fix email validation rule issues | rinvex_cortex-auth | train | php |
1d44f13c07bc0f036b0840fed7d263283b56f71e | diff --git a/dist/jquery.cropit.js b/dist/jquery.cropit.js
index <HASH>..<HASH> 100644
--- a/dist/jquery.cropit.js
+++ b/dist/jquery.cropit.js
@@ -1020,7 +1020,7 @@ return /******/ (function(modules) { // webpackBootstrap
'default': 'fill'
}, {
name: 'maxZoom',
- type: 'string',
+ type: 'number',
description: 'Determines how big the image can be zoomed. E.g. if set to 1.5, the image can be zoomed to 150% of its original size.',
'default': 1
}, {
diff --git a/src/options.js b/src/options.js
index <HASH>..<HASH> 100644
--- a/src/options.js
+++ b/src/options.js
@@ -81,7 +81,7 @@ const options = {
},
{
name: 'maxZoom',
- type: 'string',
+ type: 'number',
description: 'Determines how big the image can be zoomed. E.g. if set to 1.5, the image can be zoomed to 150% of its original size.',
default: 1,
}, | Corrected maxZoom option type | scottcheng_cropit | train | js,js |
9a51e76f3bf5c9e126039ab83d0538d94a1a6c31 | diff --git a/presto-orc/src/main/java/com/facebook/presto/orc/stream/BooleanStream.java b/presto-orc/src/main/java/com/facebook/presto/orc/stream/BooleanStream.java
index <HASH>..<HASH> 100644
--- a/presto-orc/src/main/java/com/facebook/presto/orc/stream/BooleanStream.java
+++ b/presto-orc/src/main/java/com/facebook/presto/orc/stream/BooleanStream.java
@@ -61,6 +61,7 @@ public class BooleanStream
throws IOException
{
if (bitsInData >= items) {
+ data <<= items;
bitsInData -= items;
}
else {
@@ -69,9 +70,11 @@ public class BooleanStream
byteStream.skip(items >>> 3);
items = items & 0b111;
- readByte();
- data <<= items;
- bitsInData -= items;
+ if (items != 0) {
+ readByte();
+ data <<= items;
+ bitsInData -= items;
+ }
}
} | Fix BooleanStream skip bugs
Adjust data byte when skipping bits
Fix skip to end of stream | prestodb_presto | train | java |
b9e9eea295026b50d96bd71912a1855ff82745fe | diff --git a/toot/ui/app.py b/toot/ui/app.py
index <HASH>..<HASH> 100644
--- a/toot/ui/app.py
+++ b/toot/ui/app.py
@@ -739,11 +739,12 @@ class TimelineApp:
def full_redraw(self):
"""Perform a full redraw of the UI."""
+ self.left.draw_statuses(self.statuses, self.selected)
+ self.right.draw(self.get_selected_status())
+
self.header.draw(self.user)
self.draw_footer_status()
- self.left.draw_statuses(self.statuses, self.selected)
- self.right.draw(self.get_selected_status())
def redraw_after_selection_change(self, old_index, new_index):
old_status = self.statuses[old_index] | Redaw footer and header after panels
Fix left panel overlaping the footer on full_redraws | ihabunek_toot | train | py |
5f2f485a98a34e95c4e7cc38509fce398da50c03 | diff --git a/zero.js b/zero.js
index <HASH>..<HASH> 100644
--- a/zero.js
+++ b/zero.js
@@ -16,7 +16,7 @@ module.exports = ZeroClientProvider
function ZeroClientProvider(opts){
opts = opts || {}
- const engine = new ProviderEngine()
+ const engine = new ProviderEngine(opts.engineParams)
// static
const staticSubprovider = new DefaultFixture(opts.static) | zero - pass in engine params eg pollingInterval | MetaMask_web3-provider-engine | train | js |
e5312996d4a2a8f2a0395057d9eaff12e9d15aa7 | diff --git a/api/routes.go b/api/routes.go
index <HASH>..<HASH> 100644
--- a/api/routes.go
+++ b/api/routes.go
@@ -29,6 +29,8 @@ func (s *Server) RegisterRoutes() {
r.Get("/cluster", s.getClusterStatus)
r.Combo("/getdata", bind(models.GetData{})).Get(s.getData).Post(s.getData)
+ // equivalent to /render but used by graphite-metrictank so we can keep the stats separate
+ r.Combo("/get", withOrg, bind(models.GraphiteRender{})).Get(s.renderMetrics).Post(s.renderMetrics)
r.Combo("/index/find", bind(models.IndexFind{})).Get(s.indexFind).Post(s.indexFind)
r.Combo("/index/list", bind(models.IndexList{})).Get(s.indexList).Post(s.indexList) | provide alternative render path for graphite-metrictank
so that we can keep separate stats on the two uses cases
(calls from users and calls from graphite-api) | grafana_metrictank | train | go |
26343f3d605aff1dd5f5ebaf5165dd3ad6b9828d | diff --git a/src/js/me-shim.js b/src/js/me-shim.js
index <HASH>..<HASH> 100644
--- a/src/js/me-shim.js
+++ b/src/js/me-shim.js
@@ -256,7 +256,15 @@ mejs.HtmlMediaElementShim = {
ext = url.substring(url.lastIndexOf('.') + 1);
return ((isVideo) ? 'video' : 'audio') + '/' + ext;
} else {
- return type;
+ // only return the mime part of the type in case the attribute contains the codec
+ // see http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element
+ // `video/mp4; codecs="avc1.42E01E, mp4a.40.2"` becomes `video/mp4`
+
+ if (type && ~type.indexOf(';')) {
+ return type.substr(0, type.indexOf(';'));
+ } else {
+ return type;
+ }
}
}, | fix failure to fallthrough to flash when source types included codecs:
`<source src="pr6.mp4" type='video/mp4; codecs="avc<I>E<I>E, mp4a<I>"'>` | mediaelement_mediaelement | train | js |
c05f8df618badfd923e13ea2c8d2866268a23ac3 | diff --git a/lib/util.js b/lib/util.js
index <HASH>..<HASH> 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -30,6 +30,7 @@ util.getUrl = function(id, endpoint) {
* @return {Promise}
*/
util.request = function(options) {
+ options.json = true;
return rp(options)
.catch(RequestError, StatusCodeError, function(e){
switch(e.statusCode){
@@ -83,7 +84,7 @@ util.get = function(options) {
},
headers: {
'smartcar-unit': apiOptions.imperial ? 'imperial' : 'metric',
- },
+ }
})
.then(function(response) {
var key = options.key;
@@ -121,7 +122,7 @@ util.action = function(options) {
auth: {
bearer: options.token,
},
- json: data,
+ body: data,
headers: {
'smartcar-unit': apiOptions.imperial ? 'imperial' : 'metric',
}, | lib/util: more body/json funny business | smartcar_node-sdk | train | js |
8355e958ea487e0f9831191f74e6a8c1255c229a | diff --git a/TsIntuition.php b/TsIntuition.php
index <HASH>..<HASH> 100644
--- a/TsIntuition.php
+++ b/TsIntuition.php
@@ -626,7 +626,7 @@ class TsIntuition {
if ( $domain === false )
$domain = $this->getDomain();
- $from = $messageBlob[$domain];
+ $from = $this->messageBlob[$domain];
}
$return = array(); | Follow up r<I>. But still, things don't seem to be right...
git-svn-id: <URL> | Krinkle_intuition | train | php |
f4ad1d4fad775be139359adbcb123de2b3895d69 | diff --git a/pyqode/cobol/widgets/code_edit.py b/pyqode/cobol/widgets/code_edit.py
index <HASH>..<HASH> 100644
--- a/pyqode/cobol/widgets/code_edit.py
+++ b/pyqode/cobol/widgets/code_edit.py
@@ -1,6 +1,7 @@
"""
This module contains the cobol code edit widget.
"""
+import mimetypes
import os
import sys
from pyqode.cobol.backend import server
@@ -16,6 +17,9 @@ class CobolCodeEdit(api.CodeEdit):
"""
CodeEdit specialized for cobol source code editing.
"""
+ mimetypes = ['text/x-cobol']
+ extensions = [".COB", ".CBL", ".PCO", ".CPY"]
+
@property
def free_format(self):
return self._free_format
@@ -123,3 +127,7 @@ class CobolCodeEdit(api.CodeEdit):
self.search_panel = self.panels.append(
panels.SearchAndReplacePanel(), api.Panel.Position.BOTTOM
)
+
+for ext in CobolCodeEdit.extensions:
+ mimetypes.add_type(CobolCodeEdit.mimetypes[0], ext)
+ mimetypes.add_type(CobolCodeEdit.mimetypes[0], ext.lower()) | Add mimetypes property to cobol code edit and add all cobol extensions
to the cobol mimetypes (which is missing quite a few one) | pyQode_pyqode.cobol | train | py |
685f4cf230c03b5d1a29b4c020bf7bc20ee19d88 | diff --git a/src/Payum/Core/Security/AbstractGenericTokenFactory.php b/src/Payum/Core/Security/AbstractGenericTokenFactory.php
index <HASH>..<HASH> 100644
--- a/src/Payum/Core/Security/AbstractGenericTokenFactory.php
+++ b/src/Payum/Core/Security/AbstractGenericTokenFactory.php
@@ -66,7 +66,15 @@ abstract class AbstractGenericTokenFactory implements GenericTokenFactoryInterfa
$token->setTargetUrl($this->generateUrl($targetPath, $targetParameters));
}
- if ($afterPath) {
+ if ($afterPath && 0 === strpos($afterPath, 'http')) {
+ if (false !== strpos($afterPath, '?')) {
+ $afterPath .= '&'.http_build_query($afterParameters);
+ } else {
+ $afterPath .= '?'.http_build_query($afterParameters);
+ }
+
+ $token->setAfterUrl($afterPath);
+ } elseif ($afterPath) {
$token->setAfterUrl($this->generateUrl($afterPath, $afterParameters));
} | [security] GenericTokenFactory did not handle afterPath correctly, when it is url. | Payum_Payum | train | php |
912f76c3ef79965cba4e55c7f9e4b69435b8caf6 | diff --git a/bosh_cli/lib/cli/commands/task.rb b/bosh_cli/lib/cli/commands/task.rb
index <HASH>..<HASH> 100644
--- a/bosh_cli/lib/cli/commands/task.rb
+++ b/bosh_cli/lib/cli/commands/task.rb
@@ -118,9 +118,9 @@ module Bosh::Cli::Command
def show_tasks_table(tasks)
return if tasks.empty?
tasks_table = table do |t|
- t.headings = "#", "State", "Timestamp", "Description", "Result"
+ t.headings = "#", "State", "Timestamp", "User", "Description", "Result"
tasks.map do |task|
- t << [task["id"], task["state"], Time.at(task["timestamp"]).utc,
+ t << [task["id"], task["state"], Time.at(task["timestamp"]).utc, task["user"],
task["description"].to_s, task["result"].to_s.truncate(80)]
end
end | [cli] Show user column in tasks [Fixes #<I>] | cloudfoundry_bosh | train | rb |
Subsets and Splits