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
|
---|---|---|---|---|---|
5eca86b4d9f4a38cf894d5ebd2165d494c67741d
|
diff --git a/lib/spatial_features/has_spatial_features.rb b/lib/spatial_features/has_spatial_features.rb
index <HASH>..<HASH> 100644
--- a/lib/spatial_features/has_spatial_features.rb
+++ b/lib/spatial_features/has_spatial_features.rb
@@ -69,7 +69,7 @@ module SpatialFeatures
if all == unscoped
Feature.where(:spatial_model_type => self)
else
- Feature.where(:spatial_model_type => self, :spatial_model_id => all)
+ Feature.where(:spatial_model_type => self, :spatial_model_id => all.unscope(:select))
end
end
|
Fix getting features of a scope with a custom select
If a scope have a custom select, it would override the activerecord’s default of only selecting the id when nesting scopes in a where clause. This commit ensures there is no custom select clause.
|
culturecode_spatial_features
|
train
|
rb
|
d25a3e9f266fcdbf8b124d4643f744e37854f88f
|
diff --git a/checkmgr/broker.go b/checkmgr/broker.go
index <HASH>..<HASH> 100644
--- a/checkmgr/broker.go
+++ b/checkmgr/broker.go
@@ -59,6 +59,11 @@ func (cm *CheckManager) getBrokerCN(broker *apiclient.Broker, submissionURL apic
cn := ""
for _, detail := range broker.Details {
+ // broker must be active
+ if detail.Status != statusActive {
+ continue
+ }
+
// certs are generated against the CN (in theory)
// 1. find the right broker instance with matching IP or external hostname
// 2. set the tls.Config.ServerName to whatever that instance's CN is currently
|
fix: for enterprise brokers, when getting cn verify status is active
|
circonus-labs_circonus-gometrics
|
train
|
go
|
89bd7f477aa3ec7bd8ae71ae2b0caf0c9131e3c7
|
diff --git a/templates/js/sass.js b/templates/js/sass.js
index <HASH>..<HASH> 100644
--- a/templates/js/sass.js
+++ b/templates/js/sass.js
@@ -86,12 +86,24 @@ var sassService = (function ($) {
module.loadSass = function () {
getSassData(function ( data ) {
- var sassContent = $($('#sass-page').html());
+ var sassContent = $($('#sass-page').html()),
+ errorMessage = 'Sass variables has not been scraped yet or markers were not found in file!';
$('.main').append(sassContent);
- parseColors(data[0].colors);
- parseFonts(data[0].typography);
+ if ( data[0].colors ) {
+ parseColors(data[0].colors);
+ } else {
+ $('.js-color-box').html(errorMessage);
+ }
+
+ if ( data[0].typography ) {
+ parseFonts(data[0].typography);
+ } else {
+ $('.js-font-tpl').html(errorMessage);
+ $('.js-font-example').html(errorMessage);
+ }
+
});
};
|
Errors if no results in sassdata are found.
|
devbridge_Styleguide
|
train
|
js
|
828941b273e1c6393bec6723ae2cc394c0536db4
|
diff --git a/internal/resolver/resolver.go b/internal/resolver/resolver.go
index <HASH>..<HASH> 100644
--- a/internal/resolver/resolver.go
+++ b/internal/resolver/resolver.go
@@ -143,8 +143,8 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
}
// Retrieve list of tags for repository
- tags, err := r.registryClient.Tags(d.Repository)
- if err != nil {
+ ref := fmt.Sprintf("%s/%s", strings.TrimPrefix(d.Repository, fmt.Sprintf("%s://", registry.OCIScheme)), d.Name)
+ tags, err := r.registryClient.Tags(ref) if err != nil {
return nil, errors.Wrapf(err, "could not retrieve list of tags for repository %s", d.Repository)
}
|
Readded resolver OCI logic
|
helm_helm
|
train
|
go
|
29c63545ce6fffd8289c55c39d81c4fde993533d
|
diff --git a/providers/dns/gcloud/googlecloud.go b/providers/dns/gcloud/googlecloud.go
index <HASH>..<HASH> 100644
--- a/providers/dns/gcloud/googlecloud.go
+++ b/providers/dns/gcloud/googlecloud.go
@@ -311,7 +311,7 @@ func (d *DNSProvider) getHostedZone(domain string) (string, error) {
}
for _, z := range zones.ManagedZones {
- if z.Visibility == "public" {
+ if z.Visibility == "public" || z.Visibility == "" {
return z.Name, nil
}
}
|
gcloud: fix zone visibility. (#<I>)
|
go-acme_lego
|
train
|
go
|
052a42401aa90436222a6457f93ba0635e4aad0c
|
diff --git a/supply/lib/supply/uploader.rb b/supply/lib/supply/uploader.rb
index <HASH>..<HASH> 100644
--- a/supply/lib/supply/uploader.rb
+++ b/supply/lib/supply/uploader.rb
@@ -155,10 +155,11 @@ module Supply
def update_track(apk_version_codes)
UI.message("Updating track '#{Supply.config[:track]}'...")
+ check_superseded_tracks(apk_version_codes) if Supply.config[:check_superseded_tracks]
+
if Supply.config[:track].eql? "rollout"
client.update_track(Supply.config[:track], Supply.config[:rollout], apk_version_codes)
else
- check_superseded_tracks(apk_version_codes) if Supply.config[:check_superseded_tracks]
client.update_track(Supply.config[:track], 1.0, apk_version_codes)
end
end
@@ -171,7 +172,7 @@ module Supply
max_apk_version_code = apk_version_codes.max
max_tracks_version_code = nil
- tracks = ["production", "beta", "alpha"]
+ tracks = ["production", "rollout", "beta", "alpha"]
config_track_index = tracks.index(Supply.config[:track])
tracks.each_index do |track_index|
|
Check superseded tracks for rollout in supply (already works for production, beta and alpha). (#<I>)
|
fastlane_fastlane
|
train
|
rb
|
0d866c138fe2580c03875f7c21b926e5f64aa188
|
diff --git a/lineage/__init__.py b/lineage/__init__.py
index <HASH>..<HASH> 100644
--- a/lineage/__init__.py
+++ b/lineage/__init__.py
@@ -497,7 +497,7 @@ class Lineage(object):
shared_genes_dfs.append(temp)
if len(shared_genes_dfs) > 0:
- shared_genes = pd.concat(shared_genes_dfs)
+ shared_genes = pd.concat(shared_genes_dfs, sort=True)
if type == 'one':
chroms = 'one_chrom'
@@ -558,7 +558,7 @@ class Lineage(object):
temp = pd.DataFrame(df.loc[(df['chrom'] == chrom)]['pos'].values, columns=['pos'])
# merge genetic map for this chrom
- temp = temp.append(genetic_map[chrom], ignore_index=True)
+ temp = temp.append(genetic_map[chrom], ignore_index=True, sort=True)
# sort based on pos
temp = temp.sort_values('pos')
|
Update for compatibility with future `pandas` versions
|
apriha_lineage
|
train
|
py
|
368f2ef219a26a5cd072744cbc1bd1800a151a89
|
diff --git a/lib/keen-event.js b/lib/keen-event.js
index <HASH>..<HASH> 100644
--- a/lib/keen-event.js
+++ b/lib/keen-event.js
@@ -13,9 +13,9 @@ var KeenEventModule = (function (options, eventEmitter) {
{
name: "keen:ip_to_geo",
input: {
- "ip": "intention.ipAddress"
+ "ip": "identity.ipAddress"
},
- output: "intention.ipGeography"
+ output: "identity.ipGeography"
},
{
name: "keen:ua_parser",
|
Funnily this should work but doesn't seem to.
|
sebinsua_express-keenio
|
train
|
js
|
e586e0ecc03215b6286eb1e1ae7e7a5010aa60a6
|
diff --git a/packages/from-jsdoc/lib/check-types.js b/packages/from-jsdoc/lib/check-types.js
index <HASH>..<HASH> 100644
--- a/packages/from-jsdoc/lib/check-types.js
+++ b/packages/from-jsdoc/lib/check-types.js
@@ -11,6 +11,7 @@ const BASIC_TYPES = [
'null',
'symbol',
'undefined',
+ 'void',
].concat(types);
const GLOB = global;
diff --git a/packages/from-jsdoc/test/check-types.spec.js b/packages/from-jsdoc/test/check-types.spec.js
index <HASH>..<HASH> 100644
--- a/packages/from-jsdoc/test/check-types.spec.js
+++ b/packages/from-jsdoc/test/check-types.spec.js
@@ -104,6 +104,7 @@ describe('check-types', () => {
'null',
'symbol',
'undefined',
+ 'void',
// custom types
'mine',
// template
|
feat(from-jsdoc: add void as known type
|
miralemd_scriptappy
|
train
|
js,js
|
137b70e5ee89a03089b746a6533a301dac04fb56
|
diff --git a/lib/History.js b/lib/History.js
index <HASH>..<HASH> 100644
--- a/lib/History.js
+++ b/lib/History.js
@@ -60,7 +60,7 @@ History.prototype.latest = function(cb) {
History.prototype.storeSnapshot = function(snapshot, cb) {
// Only Master Document may set ids
- if(!snapshot.id) {
+ if(!snapshot.edit.id) {
snapshot.id = ++this.idCounter
snapshot.edit.id = snapshot.id
}
|
Fix store snapshot
would store under wrong id
|
gulf_gulf
|
train
|
js
|
ade060d5c91a5e9b4c8c082adc5035ab2aeae2ff
|
diff --git a/lib/contracts/request.rb b/lib/contracts/request.rb
index <HASH>..<HASH> 100644
--- a/lib/contracts/request.rb
+++ b/lib/contracts/request.rb
@@ -40,7 +40,7 @@ module Contracts
def execute
response = HTTParty.send(method, @host + path, {
- httparty_params_key => params,
+ httparty_params_key => normalized_params,
:headers => headers
})
ResponseAdapter.new(response)
@@ -50,5 +50,9 @@ module Contracts
def httparty_params_key
method == :get ? :query : :body
end
+
+ def normalized_params
+ method == :get ? params : params.to_json
+ end
end
end
diff --git a/spec/contracts/request_spec.rb b/spec/contracts/request_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/contracts/request_spec.rb
+++ b/spec/contracts/request_spec.rb
@@ -41,7 +41,7 @@ module Contracts
it 'should make a POST request and return the response' do
HTTParty.should_receive(:post).
- with(host + path, {:body => params, :headers => headers}).
+ with(host + path, {:body => params.to_json, :headers => headers}).
and_return(response)
ResponseAdapter.should_receive(:new).with(response).and_return(adapted_response)
request.execute.should == adapted_response
|
for POST requests, the ruby hash params should be converted to json string in order to compose an application/json body
|
thoughtworks_pacto
|
train
|
rb,rb
|
b4bc1d9f98d6396ca5389180810c27ee02bdb7ea
|
diff --git a/src/utils/sample_utils.py b/src/utils/sample_utils.py
index <HASH>..<HASH> 100644
--- a/src/utils/sample_utils.py
+++ b/src/utils/sample_utils.py
@@ -55,6 +55,12 @@ def predictive_probability(M_c, X_L, X_D, Y, Q):
# row numbers, so this function will ensure the same constraint, pending
# a formalization of the semantic meaning of predictive_probability of
# arbitrary patterns of cells.
+
+ # Permitting queries involving multiple hypothetical rows would
+ # amount to demanding computation of the full Crosscat posterior.
+ # That makes it reasonable to retain a restriction to at most one
+ # hypothetical row, forcing the user to fall back to insertion and
+ # analysis for more complex inquiries.
queries = dict()
for (row, col, val) in Q:
if row != Q[0][0]:
|
Clarify a reason for the restricted query interface.
|
probcomp_crosscat
|
train
|
py
|
903e5e1295afb350693ec6b3e096d3aa24ac993b
|
diff --git a/code/javascript/core/scripts/selenium-browserbot.js b/code/javascript/core/scripts/selenium-browserbot.js
index <HASH>..<HASH> 100644
--- a/code/javascript/core/scripts/selenium-browserbot.js
+++ b/code/javascript/core/scripts/selenium-browserbot.js
@@ -217,7 +217,7 @@ BrowserBot.prototype.callOnWindowPageTransition = function(loadFunction, windowO
if (windowObject && !windowObject.closed) {
LOG.debug("Starting pollForLoad: " + windowObject.document.location);
this.pollingForLoad = true;
- this.pollForLoad(loadFunction, windowObject, windowObject.document.location, windowObject.document.location.href);
+ this.pollForLoad(loadFunction, windowObject, windowObject.location, windowObject.location.href);
}
};
@@ -244,7 +244,7 @@ BrowserBot.prototype.pollForLoad = function(loadFunction, windowObject, original
LOG.debug("pollForLoad original: " + originalHref);
try {
- var currentLocation = windowObject.document.location;
+ var currentLocation = windowObject.location;
var currentHref = currentLocation.href
var sameLoc = (originalLocation === currentLocation);
|
God only knows why, but HTAs can get Permission Denied when checking window.document.location.href in a pop-up window, so we're checking window.location.href instead.
r<I>
|
SeleniumHQ_selenium
|
train
|
js
|
4bc6f501b20c2fa949173243c57a9eb88f1f28ac
|
diff --git a/lib/bigcommerce/api.rb b/lib/bigcommerce/api.rb
index <HASH>..<HASH> 100644
--- a/lib/bigcommerce/api.rb
+++ b/lib/bigcommerce/api.rb
@@ -113,7 +113,7 @@ module Bigcommerce
@connection.get("/options/#{id}",{})
end
- def create_options(options={})
+ def create_option(options={})
@connection.post("/options", options)
end
@@ -145,11 +145,11 @@ module Bigcommerce
@connection.get("/optionsets/#{id}", {})
end
- def create_optionsets(options={})
+ def create_optionset(options={})
@connection.post("/optionsets", options)
end
- def update_optionset(id,options={})
+ def update_optionset(id, options={})
@connection.put("/optionsets/#{id}", options)
end
@@ -161,12 +161,12 @@ module Bigcommerce
@connection.get("/optionsets/options/#{id}", {})
end
- def create_optionsets_options(options={})
- @connection.post("/optionsets/options", options)
+ def create_optionset_option(id, options={})
+ @connection.post("/optionsets/#{id}/options", options)
end
- def update_optionsets_option(id,options={})
- @connection.put("/optionsets/options/#{id}", options)
+ def update_optionset_option(optionset_id, option_id, options={})
+ @connection.put("/optionsets/#{optionset_id}/options/#{option_id}", options)
end
def get_orders(options={})
|
Normalize optionset and options methods
Fixes issues with POST /optionsets/{id}/options and normalizes several
related method names.
|
bigcommerce_bigcommerce-api-ruby
|
train
|
rb
|
360afab5e29c00da6eb420c1ac02fcec31537a2a
|
diff --git a/src/test-support.js b/src/test-support.js
index <HASH>..<HASH> 100644
--- a/src/test-support.js
+++ b/src/test-support.js
@@ -28,9 +28,8 @@ function jscodeshiftTest(options) {
.sync('**/*.input.*', {
cwd: details.fixtureDir,
absolute: true,
- transform: entry =>
- entry.slice(entry.indexOf('__testfixtures__') + '__testfixtures__'.length + 1),
})
+ .map(entry => entry.slice(entry.indexOf('__testfixtures__') + '__testfixtures__'.length + 1))
.forEach(filename => {
let extension = path.extname(filename);
let testName = filename.replace(`.input${extension}`, '');
|
globby removed support for `transform`, use `map` instead
|
rwjblue_codemod-cli
|
train
|
js
|
114a275dc67316007bc6c9f88f9d0196650155b1
|
diff --git a/src/Data/RepositoryManager.php b/src/Data/RepositoryManager.php
index <HASH>..<HASH> 100644
--- a/src/Data/RepositoryManager.php
+++ b/src/Data/RepositoryManager.php
@@ -351,12 +351,17 @@ class RepositoryManager implements RepositoryManagerInterface {
public function getRefererId($referer)
{
if ($referer)
- {
+ {
$url = parse_url($referer);
$parts = explode(".", $url['host']);
- $domain_id = $this->getDomainId($parts[count($parts)-2] . "." . $parts[count($parts)-1]);
+ $domain = array_pop($parts);
+ if(sizeof($parts) > 0){
+ $domain = array_pop($parts) . "." . $domain;
+ }
+
+ $domain_id = $this->getDomainId($domain);
return $this->refererRepository->findOrCreate(
array(
|
Fixed the domain creation code for domains without an extension. For local development for example.
|
antonioribeiro_tracker
|
train
|
php
|
30ed0214562eb187789de524345f46bc7a5bbd10
|
diff --git a/saucelabs-browsers.js b/saucelabs-browsers.js
index <HASH>..<HASH> 100644
--- a/saucelabs-browsers.js
+++ b/saucelabs-browsers.js
@@ -4,12 +4,6 @@
module.exports = {
// Chrome
- sauce_linux_chrome_beta: {
- base: 'SauceLabs',
- browserName: 'chrome',
- platform: 'linux',
- version: 'beta'
- },
sauce_linux_chrome_47: {
base: 'SauceLabs',
browserName: 'chrome',
|
Remove chrome beta from sauce labs browser list, it failed everytime
|
kimmobrunfeldt_progressbar.js
|
train
|
js
|
4a6e91918d4a533035aa015d228833376bb25bfb
|
diff --git a/spec/performance/attributes_spec.rb b/spec/performance/attributes_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/performance/attributes_spec.rb
+++ b/spec/performance/attributes_spec.rb
@@ -14,7 +14,7 @@ describe Mobility::Attributes do
end
expect {
klass.include(described_class.new(backend: :null))
- }.to allocate_under(150).objects
+ }.to allocate_under(170).objects
}
end
|
Bump attributes object allocation limit in spec
|
shioyama_mobility
|
train
|
rb
|
66ec55c9ec38b10878f51a37871f465a0b8bd30b
|
diff --git a/btcpy/structs/transaction.py b/btcpy/structs/transaction.py
index <HASH>..<HASH> 100644
--- a/btcpy/structs/transaction.py
+++ b/btcpy/structs/transaction.py
@@ -762,7 +762,7 @@ class SegWitTransaction(BaseTransaction, Immutable):
@classmethod
def from_json(cls, tx_json):
tx = super().from_json(tx_json)
- if any(txin.witness is None for txin in tx.ins):
+ if all(txin.witness is None for txin in tx.ins):
raise TypeError('Trying to load segwit transaction from non-segwit transaction json')
return tx
@@ -1027,7 +1027,7 @@ class TransactionFactory(object):
@classmethod
def from_json(cls, tx_json, mutable=False):
- segwit = all('txinwitness' in txin for txin in tx_json['vin'])
+ segwit = any('txinwitness' in txin for txin in tx_json['vin'])
if segwit:
return cls._get_class(segwit=True, mutable=mutable).from_json(tx_json)
else:
|
fix from_json for segwit transactions
|
chainside_btcpy
|
train
|
py
|
03bed83cc99f442a47aff029577c47c8134b1f3e
|
diff --git a/api/python/setup.py b/api/python/setup.py
index <HASH>..<HASH> 100644
--- a/api/python/setup.py
+++ b/api/python/setup.py
@@ -4,7 +4,7 @@ import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
-VERSION = "3.0.8"
+VERSION = "3.1.0"
def readme():
readme_short = """
|
Update to version <I> (#<I>)
|
quiltdata_quilt
|
train
|
py
|
dfd2255217506ea46444c656c706c42632647d9b
|
diff --git a/src/ViewModels/GeoJsonDataSourceViewModel.js b/src/ViewModels/GeoJsonDataSourceViewModel.js
index <HASH>..<HASH> 100644
--- a/src/ViewModels/GeoJsonDataSourceViewModel.js
+++ b/src/ViewModels/GeoJsonDataSourceViewModel.js
@@ -411,7 +411,7 @@ function reprojectToGeographic(geoJson) {
code = undefined;
}
- if (code !== 'EPSG:4326' && code === 'EPSG:4283') {
+ if (code !== 'EPSG:4326' && code !== 'EPSG:4283') {
filterValue(
geoJson,
'coordinates',
|
Fix typo causing GeoJSON to be projected incorrectly.
|
TerriaJS_terriajs
|
train
|
js
|
6e515ada22b02c088c2633575e62dec13035d4ae
|
diff --git a/app/models/kalibro_configuration.rb b/app/models/kalibro_configuration.rb
index <HASH>..<HASH> 100644
--- a/app/models/kalibro_configuration.rb
+++ b/app/models/kalibro_configuration.rb
@@ -14,7 +14,7 @@ class KalibroConfiguration < KalibroClient::Entities::Configurations::KalibroCon
end
def self.public
- self.public_or_owned_by_user(nil)
+ self.public_or_owned_by_user
end
def attributes
diff --git a/app/models/reading_group.rb b/app/models/reading_group.rb
index <HASH>..<HASH> 100644
--- a/app/models/reading_group.rb
+++ b/app/models/reading_group.rb
@@ -14,7 +14,7 @@ class ReadingGroup < KalibroClient::Entities::Configurations::ReadingGroup
end
def self.public
- self.public_or_owned_by_user(nil)
+ self.public_or_owned_by_user
end
def attributes
|
Use default user of nil for finding visible reading groups/configurations
|
mezuro_prezento
|
train
|
rb,rb
|
77c91cc08513be47798c6866f0fa718bc41e7a69
|
diff --git a/lib/rollbar/configuration.rb b/lib/rollbar/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar/configuration.rb
+++ b/lib/rollbar/configuration.rb
@@ -261,7 +261,10 @@ module Rollbar
found = Gem::Specification.each.select { |spec| name === spec.name }
puts "[Rollbar] No gems found matching #{name.inspect}" if found.empty?
found
- end.flatten.uniq.map(&:gem_dir)
+ end
+ @project_gem_paths.flatten!
+ @project_gem_paths.uniq!
+ @project_gem_paths.map!(&:gem_dir)
end
def before_process=(*handler)
diff --git a/lib/rollbar/item/backtrace.rb b/lib/rollbar/item/backtrace.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar/item/backtrace.rb
+++ b/lib/rollbar/item/backtrace.rb
@@ -74,10 +74,11 @@ module Rollbar
end
def map_frames(current_exception)
- exception_backtrace(current_exception).map do |frame|
+ frames = exception_backtrace(current_exception).map do |frame|
Rollbar::Item::Frame.new(self, frame,
:configuration => configuration).to_h
- end.reverse
+ end
+ frames.reverse!
end
# Returns the backtrace to be sent to our API. There are 3 options:
|
fix: avoid temporary array copies caused by chaining
|
rollbar_rollbar-gem
|
train
|
rb,rb
|
99280b03e9ba24f086c9c9bb03e7c7168b65c304
|
diff --git a/tests/test_game.py b/tests/test_game.py
index <HASH>..<HASH> 100644
--- a/tests/test_game.py
+++ b/tests/test_game.py
@@ -48,6 +48,18 @@ class TestGame(unittest.TestCase):
self.assertRaises(domino.NoSuchDominoException,
domino.game._domino_hand, d5, hands)
+ def test_remaining_points(self):
+ h1 = []
+
+ self.assertEqual(domino.game._remaining_points(h1), [])
+
+ d1 = domino.Domino(0, 1)
+ d2 = domino.Domino(1, 3)
+ d3 = domino.Domino(3, 6)
+ h2 = [domino.Hand([]), domino.Hand([d1]), domino.Hand([d2, d3])]
+
+ self.assertEqual(domino.game._remaining_points(h2), [0, 1, 13])
+
def test_init(self):
g1 = domino.Game()
|
adding a test for remaining_points
|
abw333_dominoes
|
train
|
py
|
88d4143b9dbd2c2276aaee93c22ca66ff10b994f
|
diff --git a/multilingual_tags/models.py b/multilingual_tags/models.py
index <HASH>..<HASH> 100644
--- a/multilingual_tags/models.py
+++ b/multilingual_tags/models.py
@@ -55,3 +55,6 @@ class TaggedItem(models.Model):
def __unicode__(self):
return '{0}: #{1}'.format(self.object, self.tag)
+
+ class Meta:
+ unique_together = ('content_type', 'object_id', 'tag')
|
Made Tag and the tagged object be unique together.
|
bitlabstudio_django-multilingual-tags
|
train
|
py
|
f4d7f6e0f547aae5f92f739214115dffb296926b
|
diff --git a/lib/ransack/nodes/bindable.rb b/lib/ransack/nodes/bindable.rb
index <HASH>..<HASH> 100644
--- a/lib/ransack/nodes/bindable.rb
+++ b/lib/ransack/nodes/bindable.rb
@@ -5,9 +5,7 @@ module Ransack
attr_accessor :parent, :attr_name
def attr
- @attr ||= ransacker ?
- ransacker.attr_from(self) :
- context.table_for(parent)[attr_name]
+ @attr ||= get_arel_attribute
end
alias :arel_attribute :attr
@@ -27,6 +25,16 @@ module Ransack
@parent = @attr_name = @attr = @klass = nil
end
+ private
+
+ def get_arel_attribute
+ if ransacker
+ ransacker.attr_from(self)
+ else
+ context.table_for(parent)[attr_name]
+ end
+ end
+
end
end
-end
\ No newline at end of file
+end
|
Extract multi-line ternary out to private method
|
activerecord-hackery_ransack
|
train
|
rb
|
3ddcc9c3f251493748cbc046cf2a319b9d9f214d
|
diff --git a/src/main/java/com/cedarsoftware/util/UniqueIdGenerator.java b/src/main/java/com/cedarsoftware/util/UniqueIdGenerator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cedarsoftware/util/UniqueIdGenerator.java
+++ b/src/main/java/com/cedarsoftware/util/UniqueIdGenerator.java
@@ -37,7 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*/
public class UniqueIdGenerator
{
- private static long count = 0;
+ private static int count = 0;
private static final int lastIp;
private static final Map<Long, Long> lastId = new LinkedHashMap<Long, Long>()
{
|
used int instead of long for count
|
jdereg_java-util
|
train
|
java
|
9a24d2d27f9f2c7c04f4d4d9da0586a6e1e486f8
|
diff --git a/src/Sculpin/Core/Source/AbstractSource.php b/src/Sculpin/Core/Source/AbstractSource.php
index <HASH>..<HASH> 100644
--- a/src/Sculpin/Core/Source/AbstractSource.php
+++ b/src/Sculpin/Core/Source/AbstractSource.php
@@ -161,7 +161,7 @@ abstract class AbstractSource implements SourceInterface
/**
* {@inheritdoc}
*/
- public function content(): string
+ public function content(): ?string
{
return $this->content;
}
@@ -189,7 +189,7 @@ abstract class AbstractSource implements SourceInterface
/**
* {@inheritdoc}
*/
- public function setFormattedContent($formattedContent = null): void
+ public function setFormattedContent(?$formattedContent = null): void
{
$this->formattedContent = $formattedContent;
}
|
Add typing support for Core: fix return value of content method
|
sculpin_sculpin
|
train
|
php
|
d9170b7fcd7588e9643d9c3ed7fdc0433258429d
|
diff --git a/raft/src/main/java/net/kuujo/copycat/raft/state/RaftContext.java b/raft/src/main/java/net/kuujo/copycat/raft/state/RaftContext.java
index <HASH>..<HASH> 100644
--- a/raft/src/main/java/net/kuujo/copycat/raft/state/RaftContext.java
+++ b/raft/src/main/java/net/kuujo/copycat/raft/state/RaftContext.java
@@ -578,10 +578,11 @@ public class RaftContext implements Managed<RaftContext> {
throw new IllegalStateException("protocol not open");
CompletableFuture<R> future = new CompletableFuture<>();
- QueryRequest request = QueryRequest.builder()
- .withQuery(query)
- .build();
context.execute(() -> {
+ QueryRequest request = QueryRequest.builder()
+ .withSession(getSession())
+ .withQuery(query)
+ .build();
state.query(request).whenComplete((response, error) -> {
if (error == null) {
if (response.status() == Response.Status.OK) {
|
Ensure query requests are properly populated with the current session ID.
|
atomix_atomix
|
train
|
java
|
77bfebf6c3d939226c465012a69ead32d936be47
|
diff --git a/openquake/utils/version.py b/openquake/utils/version.py
index <HASH>..<HASH> 100644
--- a/openquake/utils/version.py
+++ b/openquake/utils/version.py
@@ -51,7 +51,7 @@ def info(version_data):
return error
data.append(str(datum if datum > 0 else 0))
- result = "OpenQuake version [nhlib-based] %s" % ".".join(data[:3])
+ result = "OpenQuake version %s" % ".".join(data[:3])
seconds_since_epoch = version_data[-1]
|
[nhlib-based] specification removed from version string
|
gem_oq-engine
|
train
|
py
|
d82aaf617c8ec868446d8bd334d1e3dbc1475244
|
diff --git a/rpc/http.go b/rpc/http.go
index <HASH>..<HASH> 100644
--- a/rpc/http.go
+++ b/rpc/http.go
@@ -9,6 +9,7 @@ import (
"net/http"
"github.com/ethereum/go-ethereum/logger"
+ "github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/xeth"
"github.com/rs/cors"
)
@@ -110,7 +111,7 @@ func RpcResponse(api *EthereumApi, request *RpcRequest) *interface{} {
response = &RpcErrorResponse{Jsonrpc: jsonrpcver, Id: request.Id, Error: jsonerr}
}
- rpclogger.DebugDetailf("Generated response: %T %s", response, response)
+ glog.V(logger.Detail).Infof("Generated response: %T %s", response, response)
return &response
}
@@ -121,7 +122,7 @@ func send(writer io.Writer, v interface{}) (n int, err error) {
rpclogger.Fatalln("Error marshalling JSON", err)
return 0, err
}
- rpclogger.DebugDetailf("Sending payload: %s", payload)
+ glog.V(logger.Detail).Infof("Sending payload: %s", payload)
return writer.Write(payload)
}
|
rpc: changed logging to use glog
|
ethereum_go-ethereum
|
train
|
go
|
f5f6838b25ccd897e69a27fa4d4d2040080d50a0
|
diff --git a/elastic.js b/elastic.js
index <HASH>..<HASH> 100644
--- a/elastic.js
+++ b/elastic.js
@@ -157,8 +157,8 @@ angular.module('monospaced.elastic', [])
ta.style.overflowY = overflow || 'hidden';
if (taHeight !== mirrorHeight) {
+ scope.$emit('elastic:resize', $ta, taHeight, mirrorHeight);
ta.style.height = mirrorHeight + 'px';
- scope.$emit('elastic:resize', $ta);
}
// small delay to prevent an infinite loop
|
Emits resize event before changing the elements height
|
monospaced_angular-elastic
|
train
|
js
|
7096ce49529f430180c393e2b4030b0fad2ccdf1
|
diff --git a/openquake/engine/engine.py b/openquake/engine/engine.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/engine.py
+++ b/openquake/engine/engine.py
@@ -36,6 +36,10 @@ from openquake.engine.supervising import supervisor
from openquake.engine.utils import monitor, get_calculator_class
from openquake.engine.writer import CacheInserter
+from openquake import hazardlib
+from openquake import risklib
+from openquake import nrmllib
+
INPUT_TYPES = dict(models.Input.INPUT_TYPE_CHOICES)
UNABLE_TO_DEL_HC_FMT = 'Unable to delete hazard calculation: %s'
@@ -59,7 +63,14 @@ def prepare_job(user_name="openquake", log_level='progress'):
# See if the current user exists
# If not, create a record for them
owner = prepare_user(user_name)
- job = models.OqJob(owner=owner, log_level=log_level)
+ job = models.OqJob(
+ owner=owner,
+ log_level=log_level,
+ oq_version=openquake.engine.__version__,
+ nrml_version=nrmllib.__version__,
+ hazardlib_version=hazardlib.__version__,
+ risklib_version=risklib.__version__,
+ )
job.save()
return job
|
engine:
Record all software versions in oq_job when the job is initialized.
Former-commit-id: f<I>e9ce<I>eebd6a<I>b5fd2f<I>fc<I>
|
gem_oq-engine
|
train
|
py
|
ad5a5b4e359680c8714c16d696df6d487490b0f0
|
diff --git a/pagedown/models.py b/pagedown/models.py
index <HASH>..<HASH> 100644
--- a/pagedown/models.py
+++ b/pagedown/models.py
@@ -1,4 +1,2 @@
from django.db import models
-class PagedownField(models.TextField):
- pass
\ No newline at end of file
|
Removed uneccessary models field
|
timmyomahony_django-pagedown
|
train
|
py
|
ecad20635d68272b2507631804d0fa44ba4fec82
|
diff --git a/Classes/Emogrifier.php b/Classes/Emogrifier.php
index <HASH>..<HASH> 100644
--- a/Classes/Emogrifier.php
+++ b/Classes/Emogrifier.php
@@ -1300,11 +1300,12 @@ class Emogrifier
$trimmedLowercaseSelector = trim($lowercasePaddedSelector);
$xPathKey = md5($trimmedLowercaseSelector);
if (!isset($this->caches[self::CACHE_KEY_XPATH][$xPathKey])) {
- $roughXpath = '//' . preg_replace(
- array_keys($this->xPathRules),
- $this->xPathRules,
- $trimmedLowercaseSelector
- );
+ $roughXpath = '//' .
+ preg_replace(
+ array_keys($this->xPathRules),
+ $this->xPathRules,
+ $trimmedLowercaseSelector
+ );
$xPathWithIdAttributeMatchers = preg_replace_callback(
self::ID_ATTRIBUTE_MATCHER,
[$this, 'matchIdAttributes'],
|
[CLEANUP] Minor code reformat (#<I>)
This makes sure the code is not changed by a reformat with PhpStorm.
|
MyIntervals_emogrifier
|
train
|
php
|
b23da1700a89d5300fdffb5994760d49d4cff222
|
diff --git a/presto-main/src/main/java/com/facebook/presto/server/ResourceUtil.java b/presto-main/src/main/java/com/facebook/presto/server/ResourceUtil.java
index <HASH>..<HASH> 100644
--- a/presto-main/src/main/java/com/facebook/presto/server/ResourceUtil.java
+++ b/presto-main/src/main/java/com/facebook/presto/server/ResourceUtil.java
@@ -92,7 +92,11 @@ final class ResourceUtil
accessControl.checkCanSetUser(principal, user);
}
catch (AccessDeniedException e) {
- throw new WebApplicationException(e.getMessage(), Status.FORBIDDEN);
+ throw new WebApplicationException(
+ e,
+ Response.status(Status.FORBIDDEN)
+ .entity("Access denied: " + e.getMessage())
+ .build());
}
Identity identity = new Identity(user, Optional.ofNullable(principal));
|
Include message in <I> response from coordinator
Jax-rs' WebApplicationException produces a canned response
that doesn't include the provided message unless the Response
object is passed explicitly during construction.
This change provides a more user-friendly message in the HTTP
response body in case of an "access denied" error.
|
prestodb_presto
|
train
|
java
|
b654e8bfe18f27ad6613ac340bbec31d20c6af74
|
diff --git a/app.js b/app.js
index <HASH>..<HASH> 100755
--- a/app.js
+++ b/app.js
@@ -29,7 +29,7 @@ var argv = rc('peerflix', {}, optimist
.alias('n', 'no-quit').describe('n', 'do not quit peerflix on vlc exit')
.alias('a', 'all').describe('a', 'select all files in the torrent')
.alias('r', 'remove').describe('r', 'remove files on exit')
- .alias('i', 'ipadress').describe('i', 'add ip:port')
+ .alias('i', 'peer').describe('i', 'add peer by ip:port')
.describe('version', 'prints current version')
.argv);
@@ -87,9 +87,9 @@ var ontorrent = function(torrent) {
return !wire.peerChoking;
};
- if(argv.ip) {
- engine.connect(argv.ipadress);
- }
+ [].concat(argv.peer || []).forEach(function(peer) {
+ engine.connect(peer);
+ })
engine.server.on('listening', function() {
var href = 'http://'+address()+':'+engine.server.address().port+'/';
|
change --ipaddress to --peer and support multiple
|
mafintosh_peerflix
|
train
|
js
|
fcfcce8b87f9be4a9b68585772ca799d692964d2
|
diff --git a/angr/blade.py b/angr/blade.py
index <HASH>..<HASH> 100644
--- a/angr/blade.py
+++ b/angr/blade.py
@@ -90,7 +90,7 @@ class Blade(object):
regs = set()
# Retrieve the target: are we slicing from a register(IRStmt.Put), or a temp(IRStmt.WrTmp)?
- stmts = self._get_run(self._dst_run).irsb.statements()
+ stmts = self._get_run(self._dst_run).irsb.statements
dst_stmt = stmts[self._dst_stmt_idx]
if type(dst_stmt) is pyvex.IRStmt.Put:
@@ -130,7 +130,7 @@ class Blade(object):
temps = set()
regs = regs.copy()
- stmts = self._get_run(run).irsb.statements()
+ stmts = self._get_run(run).irsb.statements
# Initialize the temps set with whatever in the `next` attribute of this irsb
next_expr = self._get_run(run).irsb.next
|
Adapt Blade to the latest pyvex.
|
angr_angr
|
train
|
py
|
904ac8d1468bc777433a4849cf42df0e3c728e32
|
diff --git a/styles/colors.js b/styles/colors.js
index <HASH>..<HASH> 100644
--- a/styles/colors.js
+++ b/styles/colors.js
@@ -1,13 +1,7 @@
import { isObject } from '@shopgate/pwa-common/helpers/validation';
import { colors as customColors } from '../config/app';
-let overrides = {};
-
-if (isObject(customColors)) {
- overrides = {
- ...customColors,
- };
-}
+const overrides = isObject(customColors) ? { ...customColors } : {};
export default {
background: '#f8f8f8',
|
CON-<I>: Simplified the value check for custom colors
|
shopgate_pwa
|
train
|
js
|
30a4208375ba5ff81abfb87d0f0734e306c92c70
|
diff --git a/src/com/jfoenix/controls/JFXSnackbar.java b/src/com/jfoenix/controls/JFXSnackbar.java
index <HASH>..<HASH> 100644
--- a/src/com/jfoenix/controls/JFXSnackbar.java
+++ b/src/com/jfoenix/controls/JFXSnackbar.java
@@ -122,6 +122,9 @@ public class JFXSnackbar extends StackPane {
//popup.requestLayout();
popup.setVisible(false);
+ // register the container before resizing it
+ registerSnackbarContainer(snackbarContainer);
+
sizeListener = (o, oldVal, newVal) ->{refreshPopup();};
// resize the popup if its layout has been changed
popup.layoutBoundsProperty().addListener((o,oldVal,newVal)-> refreshPopup());
@@ -131,7 +134,6 @@ public class JFXSnackbar extends StackPane {
//This control actually orchestrates the popup logic and is never visibly displayed.
this.setVisible(false);
this.setManaged(false);
- registerSnackbarContainer(snackbarContainer);
}
|
Should solve NullPointerException in JFXSnackbar constructor
Trying to refresh the container before registering it caused a NullPointerException.
This little modification should solve it.
|
jfoenixadmin_JFoenix
|
train
|
java
|
0bb1a5385459f674a3eb924120a7c5923535775f
|
diff --git a/tests/Unit/Core/DbTest.php b/tests/Unit/Core/DbTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/Core/DbTest.php
+++ b/tests/Unit/Core/DbTest.php
@@ -100,19 +100,6 @@ class DbTest extends UnitTestCase
}
}
- /**
- * Testing escaping string
- * Todo Remove when deprecated in 5.3
- */
- public function testEscapeString()
- {
- $sString = "\x00 \n \r ' \, \" \x1a";
-
- $database = Database::getInstance();
-
- $this->assertEquals('\0 \n \r \\\' \\\, \" \Z', $database->escapeString($sString));
- }
-
public function testGetInstanceReturnsInstanceOfDatabase()
{
$database = Database::getInstance();
|
ESDEV-<I> Remove test for removed method Database::escapeString() from DbTest.php
(cherry picked from commit b<I>d9ca)
|
OXID-eSales_oxideshop_ce
|
train
|
php
|
9fee4e1cedf5bb4cd457f85691a10c72b0bef523
|
diff --git a/s4/__init__.py b/s4/__init__.py
index <HASH>..<HASH> 100644
--- a/s4/__init__.py
+++ b/s4/__init__.py
@@ -1 +1 @@
-VERSION = '0.2.0'
+VERSION = '0.2.1'
|
Bump to version <I>
|
MichaelAquilina_S4
|
train
|
py
|
3f19c0ac05216b162e22a7f11571833735b96ec1
|
diff --git a/src/Tasks/MigrateContentToElement.php b/src/Tasks/MigrateContentToElement.php
index <HASH>..<HASH> 100644
--- a/src/Tasks/MigrateContentToElement.php
+++ b/src/Tasks/MigrateContentToElement.php
@@ -7,6 +7,7 @@ use DNADesign\Elemental\Extensions\ElementalPageExtension;
use DNADesign\Elemental\Models\BaseElement;
use DNADesign\Elemental\Models\ElementalArea;
use DNADesign\Elemental\Models\ElementContent;
+use Exception;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\BuildTask;
@@ -86,7 +87,15 @@ class MigrateContentToElement extends BuildTask
// Write the page if we're clearing content or if the area doesn't exist - we write to trigger a
// relationship update
if ($clearContent || !$area->exists()) {
- $page->write();
+ try {
+ $page->write();
+ } catch (Exception $e) {
+ echo sprintf(
+ 'Could not clear content on page %s: %s',
+ $page->ID,
+ $e->getMessage()
+ );
+ }
if (!$area->exists()) {
$area = $this->getAreaRelationFromPage($page);
|
FIX Ensuring write operations when clearing content is captured in a try...catch
|
dnadesign_silverstripe-elemental
|
train
|
php
|
7509ba906796a49995345d72dc2effaa8a178f11
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -71,6 +71,16 @@ def main():
print('Done.')
elif len(argv) >= 2 and argv[1] == 'pypi':
+ # (Re)generate the code to make sure we don't push without it
+ gen_tl()
+
+ # Try importing the telethon module to assert it has no errors
+ try:
+ import telethon
+ except:
+ print('Packaging for PyPi aborted, importing the module failed.')
+ return
+
# Need python3.5 or higher, but Telethon is supposed to support 3.x
# Place it here since noone should be running ./setup.py pypi anyway
from subprocess import run
|
Assert that module was generated correctly on setup.py pypi
|
LonamiWebs_Telethon
|
train
|
py
|
bd65fc23556e016989de1502bf61c1f1592a56f3
|
diff --git a/sass/base/components/navigation/js/main-nav.js b/sass/base/components/navigation/js/main-nav.js
index <HASH>..<HASH> 100644
--- a/sass/base/components/navigation/js/main-nav.js
+++ b/sass/base/components/navigation/js/main-nav.js
@@ -159,6 +159,6 @@
// to the sticky nav once it's being scrolled down the page
$thisHeader.toggleClass('scrolling', $(window).scrollTop() > 0);
});
- }
+ });
}
})(jQuery);
|
Corrected syntax erorr
|
comicrelief_pattern-lab
|
train
|
js
|
5eece7ff733906db10efa141eafafca8627e86b2
|
diff --git a/pykechain/client.py b/pykechain/client.py
index <HASH>..<HASH> 100644
--- a/pykechain/client.py
+++ b/pykechain/client.py
@@ -1488,6 +1488,7 @@ class Client(object):
self,
parts: List[Dict],
asynchronous: Optional[bool] = False,
+ retrieve_instances: Optional[bool] = True,
**kwargs
) -> PartSet:
"""
@@ -1514,8 +1515,10 @@ class Client(object):
:type parts: list
:param asynchronous: If true, immediately returns without activities (default = False)
:type asynchronous: bool
+ :param retrieve_instances: If true, will retrieve the created Part Instances in a PartSet
+ :type retrieve_instances: bool
:param kwargs:
- :return: list of Part instances
+ :return: list of Part instances or list of part UUIDs
:rtype list
"""
check_list_of_dicts(
@@ -1553,8 +1556,10 @@ class Client(object):
raise APIError("Could not create Parts. ({})".format(response.status_code), response=response)
part_ids = response.json()['results'][0]['parts_created']
- parts = self.parts(id__in=",".join(part_ids))
- return PartSet(parts=parts)
+ if retrieve_instances:
+ parts = self.parts(id__in=",".join(part_ids), batch=50)
+ return PartSet(parts=parts)
+ return part_ids
def create_property(
self,
|
KE-<I> added a retrieve instances option on create_bulk_parts
|
KE-works_pykechain
|
train
|
py
|
e33d2ac17c16b9ad10982712cb83f38bc68cc895
|
diff --git a/cache/contenthash/filehash.go b/cache/contenthash/filehash.go
index <HASH>..<HASH> 100644
--- a/cache/contenthash/filehash.go
+++ b/cache/contenthash/filehash.go
@@ -29,6 +29,10 @@ func NewFileHash(path string, fi os.FileInfo) (hash.Hash, error) {
Linkname: link,
}
+ if fi.Mode()&os.ModeSymlink != 0 {
+ stat.Mode = stat.Mode | 0777
+ }
+
if err := setUnixOpt(path, fi, stat); err != nil {
return nil, err
}
|
contenthash: normalize symlink mode
Mode is not implemented in platform compatible way
so normalize when calculating the checksum.
|
moby_buildkit
|
train
|
go
|
7910eee4872b64876652511afe9bd3cedc6d1287
|
diff --git a/client/src/main/java/com/netflix/conductor/client/task/WorkflowTaskCoordinator.java b/client/src/main/java/com/netflix/conductor/client/task/WorkflowTaskCoordinator.java
index <HASH>..<HASH> 100644
--- a/client/src/main/java/com/netflix/conductor/client/task/WorkflowTaskCoordinator.java
+++ b/client/src/main/java/com/netflix/conductor/client/task/WorkflowTaskCoordinator.java
@@ -273,7 +273,7 @@ public class WorkflowTaskCoordinator {
});
}
- public synchronized void shutdown() throws InterruptedException {
+ public void shutdown() throws InterruptedException {
this.scheduledExecutorService.shutdown();
this.executorService.shutdown();
|
removed unnecessary syncronization in shutdown()
|
Netflix_conductor
|
train
|
java
|
5a92ec64d588d87d08b6f6c9e95c770ef0f7476c
|
diff --git a/lib/hamlbars/version.rb b/lib/hamlbars/version.rb
index <HASH>..<HASH> 100644
--- a/lib/hamlbars/version.rb
+++ b/lib/hamlbars/version.rb
@@ -1,3 +1,3 @@
module Hamlbars
- VERSION = '2012.1.10'
+ VERSION = '2012.1.13'
end
|
Friday the <I>th seems like an auspicious day to release it into the wild.
|
jamesotron_hamlbars
|
train
|
rb
|
4f669b37478fd20fcc4224ff9e873228a950bc3a
|
diff --git a/addon/adapters/odata.js b/addon/adapters/odata.js
index <HASH>..<HASH> 100644
--- a/addon/adapters/odata.js
+++ b/addon/adapters/odata.js
@@ -321,7 +321,7 @@ export default DS.RESTAdapter.extend({
}
return this._callAjax(
- { url: resultUrl, method: 'GET', xhrFields: args.fields ? {} : args.fields },
+ { url: resultUrl, method: 'GET', xhrFields: args.fields ? args.fields : {} },
args.store, args.modelName, args.successCallback, args.failCallback, args.alwaysCallback);
},
@@ -383,7 +383,7 @@ export default DS.RESTAdapter.extend({
method: 'POST',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
- xhrFields: args.fields ? {} : args.fields
+ xhrFields: args.fields ? args.fields : {}
}, args.store, args.modelName, args.successCallback, args.failCallback, args.alwaysCallback);
},
|
Fix xhrFields loss in callFunction and callAction methods
|
Flexberry_ember-flexberry-data
|
train
|
js
|
809dcdde4614ca6358523373548866f52dd25f64
|
diff --git a/lib/ApiCLI.php b/lib/ApiCLI.php
index <HASH>..<HASH> 100644
--- a/lib/ApiCLI.php
+++ b/lib/ApiCLI.php
@@ -421,7 +421,7 @@ class ApiCLI extends AbstractView
return $this->version_cache;
}
/** Verifies version. Should be used by addons. For speed improvement, redefine this into empty function */
- function requires($addon='atk',$v,$return_only=false){
+ function requires($addon='atk',$v,$location = null){
$cv=$this->getVersion($addon);
if(version_compare($cv,$v)<0){
if($addon=='atk'){
@@ -432,6 +432,7 @@ class ApiCLI extends AbstractView
}
$e->addMoreInfo('required',$v)
->addMoreInfo('you have',$cv);
+ if($location)$e->addMoreInfo('download_location',$location);
throw $e;
}
@@ -448,8 +449,8 @@ class ApiCLI extends AbstractView
return true;
}
/** @obsolete use @requires */
- function versionRequirement($v,$return_only=false){
- return $this->requires('atk',$v,$return_only);
+ function versionRequirement($v,$location = null){
+ return $this->requires('atk',$v,$location);
}
// }}}
|
added support for specifying location of requested add-ons.
|
atk4_atk4
|
train
|
php
|
c4bb2bd0eeb4b91dfbfc4fcfd57a2cad5ba799e8
|
diff --git a/lib/graphlib.php b/lib/graphlib.php
index <HASH>..<HASH> 100644
--- a/lib/graphlib.php
+++ b/lib/graphlib.php
@@ -1110,6 +1110,7 @@ function find_range($data, $min, $max, $resolution) {
if ($max < 0) $factor = - pow(10, (floor(log10(abs($max))) + $resolution) );
else $factor = pow(10, (floor(log10(abs($max))) - $resolution) );
}
+ $factor = round($factor * 1000.0) / 1000.0; // To avoid some wierd rounding errors (Moodle)
$max = $factor * @ceil($max / $factor);
$min = $factor * @floor($min / $factor);
|
Added "$factor = round($factor * <I>) / <I>;"
to function find_range ... it fixes some strange rounding
errors that were happening with Moodle surveys.
|
moodle_moodle
|
train
|
php
|
c995215e436e2780ca4c52031029fd1a6f14a2c8
|
diff --git a/lib/app.rb b/lib/app.rb
index <HASH>..<HASH> 100644
--- a/lib/app.rb
+++ b/lib/app.rb
@@ -51,8 +51,7 @@ module ErnieBrodeur
App = Application.new
# This will load a helper, if it exists.
- begin
- require "helpers/#{App.name}"
- rescue LoadError
- end
+
+ f = "#{$:.last}/helpers/#{App.name}.rb"
+ require f if File.exist? f
end
|
Fixed app so it will break on errors in the helpers file by properly checking for file existances.
|
erniebrodeur_bini
|
train
|
rb
|
2e98febfebf9f842bc0c972cb4b61573364fb92b
|
diff --git a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java
+++ b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java
@@ -353,7 +353,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
replaceIfPresent);
}
- private enum LockType {READ_LOCK, WRITE_LOCK}
+ enum LockType {READ_LOCK, WRITE_LOCK}
@Override
public V get(Object key) {
|
HCOLL-<I> fixed bug around lock type
|
OpenHFT_Chronicle-Map
|
train
|
java
|
6e86ab4a9f9f6bc125b38a33bc188274b7edee73
|
diff --git a/libargos/qt/misc.py b/libargos/qt/misc.py
index <HASH>..<HASH> 100644
--- a/libargos/qt/misc.py
+++ b/libargos/qt/misc.py
@@ -49,11 +49,11 @@ def containsSettingsGroup(groupName, settings=None):
try:
return _containsPath(tail, settings)
finally:
- settings.beginGroup(head)
+ settings.endGroup()
# Body starts here
path = os.path.split(groupName)
logger.debug("Looking for path: {}".format(path))
-
+ settings = QtCore.QSettings() if settings is None else settings
return _containsPath(path, settings)
|
Fix: endGroup wasn't called
|
titusjan_argos
|
train
|
py
|
b7ea39564f6181209f7f6d055d727314630a8f40
|
diff --git a/spacy/about.py b/spacy/about.py
index <HASH>..<HASH> 100644
--- a/spacy/about.py
+++ b/spacy/about.py
@@ -4,7 +4,7 @@
# fmt: off
__title__ = "spacy-nightly"
-__version__ = "2.1.0a7.dev1"
+__version__ = "2.1.0a7.dev2"
__summary__ = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"
__uri__ = "https://spacy.io"
__author__ = "Explosion AI"
|
Set version to <I>a7.dev2
|
explosion_spaCy
|
train
|
py
|
b3903bb26af20d7937af84ad02233c8e88844baf
|
diff --git a/lib/multiauth/rails.rb b/lib/multiauth/rails.rb
index <HASH>..<HASH> 100644
--- a/lib/multiauth/rails.rb
+++ b/lib/multiauth/rails.rb
@@ -4,15 +4,13 @@ ActionController::Base.append_view_path File.expand_path("../../../app/views", _
module Multiauth
class Engine < ::Rails::Engine
initializer "multiauth" do |app|
- ApplicationController.send(:include, Multiauth::Helpers)
-
config_file = Rails.root+"config/auth_providers.yml"
providers = YAML::load(ERB.new(File.read(config_file)).result)
if providers[Rails.env].nil?
raise ArgumentError, "cannot find section for #{Rails.env} environment in #{config_file}"
end
- Multiauth.providers = providers[Rails.env]}
+ Multiauth.providers = providers[Rails.env]
require 'omniauth/openid'
require 'openid/store/filesystem'
@@ -28,5 +26,9 @@ module Multiauth
end
end
end
+
+ config.to_prepare do
+ ApplicationController.send(:include, Multiauth::Helpers)
+ end
end
end
|
make it work in dev env
|
dcu_multiauth
|
train
|
rb
|
ce15501733c1ffd749707d266ce6a2cf333ea65e
|
diff --git a/httpclient/http.go b/httpclient/http.go
index <HASH>..<HASH> 100644
--- a/httpclient/http.go
+++ b/httpclient/http.go
@@ -59,7 +59,7 @@ var (
// time to wait in seconds for a server's response headers after fully
// writing the request (including its body, if any). This
// time does not include the time to read the response body.
- ResponseHeaderTimeout = 20 * time.Second
+ ResponseHeaderTimeout = 300 * time.Second
// HiddenHeaders lists headers that should not be logged unless DumpFormat is Verbose.
HiddenHeaders = map[string]bool{"Authorization": true, "Cookie": true}
|
IV-<I> increase timout to 5 minutes
|
rightscale_rsc
|
train
|
go
|
2f56231351447585d4b119154cc21a8f3a172b9c
|
diff --git a/src/main/java/com/semanticcms/core/canonical/Canonical.java b/src/main/java/com/semanticcms/core/canonical/Canonical.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/semanticcms/core/canonical/Canonical.java
+++ b/src/main/java/com/semanticcms/core/canonical/Canonical.java
@@ -23,7 +23,7 @@
package com.semanticcms.core.canonical;
import com.aoindustries.html.Document;
-import com.aoindustries.html.Link;
+import com.aoindustries.html.LINK;
import com.aoindustries.net.URIEncoder;
import com.semanticcms.core.model.Page;
import com.semanticcms.core.servlet.Component;
@@ -76,7 +76,7 @@ public class Canonical implements Component {
&& position == ComponentPosition.HEAD_END
) {
document
- .link(Link.Rel.CANONICAL)
+ .link(LINK.Rel.CANONICAL)
.href(
// Write US-ASCII always per https://tools.ietf.org/html/rfc6596#section-3
URIEncoder.encodeURI(
|
Significantly refactored naming and reduced use of inner classes/interfaces
|
aoindustries_semanticcms-core-canonical
|
train
|
java
|
62dd056ac4184d960ef3d332f02dc4f9b684b06e
|
diff --git a/lib/helpers/checkTypes.js b/lib/helpers/checkTypes.js
index <HASH>..<HASH> 100644
--- a/lib/helpers/checkTypes.js
+++ b/lib/helpers/checkTypes.js
@@ -18,9 +18,9 @@ import { toStringTag } from './toStringTag';
* isArray(0); // true
* isArray(document.querySelectorAll('*')); // false
*/
-export const isArray = Array.isArray || function isArray(value) {
+export function isArray(value) {
return toStringTag(value) === 'Array';
-};
+}
/**
* @function isArrayLike
|
helpers: checkTypes: make isArray own function.
|
dwaynejs_dwayne
|
train
|
js
|
532137c2c819bd151f6f551564ce255e71b56d01
|
diff --git a/lib/resource/Challenge.js b/lib/resource/Challenge.js
index <HASH>..<HASH> 100644
--- a/lib/resource/Challenge.js
+++ b/lib/resource/Challenge.js
@@ -31,13 +31,16 @@ function Challenge() {
utils.inherits(Challenge, InstanceResource);
/**
-* Retrieves the {@link Factor} instance ({@link SmsFactor} or {@link GoogleAuthenticatorFactor})
-* that this challenge is linked to.
-*
-* @param {Function} callback
-* The function to call when the operation is complete. Will be called with the
-* parameters (err, {@link SmsFactor}) or (err, {@link GoogleAuthenticatorFactor}),
-* depending on the type of the returned resource.
+ * Retrieves the factor instance ({@link SmsFactor} or {@link GoogleAuthenticatorFactor})
+ * that this challenge is linked to.
+ *
+ * @param {ExpansionOptions} [expansionOptions]
+ * For retrieving linked resources of the factor during this request.
+ *
+ * @param {Function} callback
+ * The function to call when the operation is complete. Will be called with the
+ * parameters (err, {@link SmsFactor}) or (err, {@link GoogleAuthenticatorFactor}),
+ * depending on the type of the returned resource.
*/
Challenge.prototype.getFactor = function getFactor(/* [options], cb */) {
var args = utils.resolveArgs(arguments, ['options', 'callback'], true);
|
Add documentation of expansionOptions
There are more places that need this.
|
stormpath_stormpath-sdk-node
|
train
|
js
|
0458b0327a626a7b95d4d206e4fa2fe37605dac5
|
diff --git a/lib/fuci/git.rb b/lib/fuci/git.rb
index <HASH>..<HASH> 100644
--- a/lib/fuci/git.rb
+++ b/lib/fuci/git.rb
@@ -34,9 +34,12 @@ module Fuci
def pull_number_from branch_name
remote_sha = remote_sha_from branch_name
- pull_number = with_popen pull_number_from_sha_command(remote_sha)
- pull_number.empty? ? raise(NoPullError) : pull_number
+ begin
+ with_popen pull_number_from_sha_command(remote_sha)
+ rescue NoResponseError
+ raise NoPullError
+ end
end
private
diff --git a/spec/lib/fuci/git_spec.rb b/spec/lib/fuci/git_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/fuci/git_spec.rb
+++ b/spec/lib/fuci/git_spec.rb
@@ -90,7 +90,7 @@ describe Fuci::Git do
end
describe 'when there is no pull number' do
- before { @with_popen.returns '' }
+ before { @with_popen.raises Fuci::Git::NoResponseError }
it 'raises a NoPullError' do
expect { @test_class.pull_number_from(@branch_name) }.
|
Rescue NoResponseError with NoPullError
|
davejachimiak_fuci
|
train
|
rb,rb
|
653aa12076d79eec3ed0ac5181fa1bf374fa0af6
|
diff --git a/js/__loader.js b/js/__loader.js
index <HASH>..<HASH> 100644
--- a/js/__loader.js
+++ b/js/__loader.js
@@ -290,18 +290,32 @@
const stream = loader.require('stream');
class StdoutStream extends stream.Writable {
_write(chunk, encoding, callback) {
- runtime.stdio.defaultStdio.write(String(chunk));
+ __SYSCALL.log(String(chunk));
callback();
}
}
class StderrStream extends stream.Writable {
_write(chunk, encoding, callback) {
+ __SYSCALL.log(String(chunk));
+ callback();
+ }
+ }
+ class TermoutStream extends stream.Writable {
+ _write(chunk, encoding, callback) {
+ runtime.stdio.defaultStdio.write(String(chunk));
+ callback();
+ }
+ }
+ class TermerrStream extends stream.Writable {
+ _write(chunk, encoding, callback) {
runtime.stdio.defaultStdio.writeError(String(chunk));
callback();
}
}
process.stdout = new StdoutStream();
process.stderr = new StderrStream();
+ process.runtimeout = new TermoutStream();
+ process.runtimeerr = new TermerrStream();
loader.require('console');
Object.assign(global, loader.require('__errors__'));
loader.require('/');
|
Make process.stdout and process.stderr output to the QEMU console, add process.termout and process.termerr
|
runtimejs_runtime
|
train
|
js
|
892b74b9c19dcbdcba72a661b3611204c6d7c3d9
|
diff --git a/tools/test-generator/src/test/java/com/consol/citrus/generate/javadsl/JavaDslTestGeneratorTest.java b/tools/test-generator/src/test/java/com/consol/citrus/generate/javadsl/JavaDslTestGeneratorTest.java
index <HASH>..<HASH> 100644
--- a/tools/test-generator/src/test/java/com/consol/citrus/generate/javadsl/JavaDslTestGeneratorTest.java
+++ b/tools/test-generator/src/test/java/com/consol/citrus/generate/javadsl/JavaDslTestGeneratorTest.java
@@ -1,5 +1,6 @@
package com.consol.citrus.generate.javadsl;
+import com.consol.citrus.Citrus;
import com.consol.citrus.exceptions.CitrusRuntimeException;
import com.consol.citrus.generate.UnitFramework;
import com.consol.citrus.util.FileUtils;
|
(#<I>) Added missing import that was lost while cherry picking
|
citrusframework_citrus
|
train
|
java
|
d4967a59cd73d40783c82a8d6dc1be7f29db1618
|
diff --git a/test/suites/CSSJanusTest.php b/test/suites/CSSJanusTest.php
index <HASH>..<HASH> 100644
--- a/test/suites/CSSJanusTest.php
+++ b/test/suites/CSSJanusTest.php
@@ -21,6 +21,7 @@ class CSSJanusTest extends PHPUnit_Framework_TestCase {
$input = $case[0];
$noop = !isset($case[1]);
$output = $noop ? $input : $case[1];
+ $roundtrip = isset($test['roundtrip']) ? $test['roundtrip'] : !$noop;
$cases[] = array(
$input,
@@ -29,7 +30,7 @@ class CSSJanusTest extends PHPUnit_Framework_TestCase {
$name,
);
- if (!$noop) {
+ if ($roundtrip) {
// Round trip
$cases[] = array(
$output,
@@ -58,7 +59,7 @@ class CSSJanusTest extends PHPUnit_Framework_TestCase {
protected static function getSpec() {
static $json;
if ($json == null) {
- $version = '1.2.0';
+ $version = '1.2.1';
$dir = dirname(__DIR__);
$file = "$dir/data-v$version.json";
if (!is_readable($file)) {
|
test: Update to upstream <I>
|
cssjanus_php-cssjanus
|
train
|
php
|
0dc8a171b45a2ce0bb18502f81451d18b2af4a4a
|
diff --git a/structr-modules/structr-payment-module/src/test/java/org/structr/test/PaymentTest.java b/structr-modules/structr-payment-module/src/test/java/org/structr/test/PaymentTest.java
index <HASH>..<HASH> 100644
--- a/structr-modules/structr-payment-module/src/test/java/org/structr/test/PaymentTest.java
+++ b/structr-modules/structr-payment-module/src/test/java/org/structr/test/PaymentTest.java
@@ -117,7 +117,7 @@ public class PaymentTest extends StructrUiTest {
.header("X-Password", "admin")
.body("{ providerName: 'test', token: 'error', successUrl: 'success', payerId: 'errorPayer' }")
.expect()
- .statusCode(400)
+ .statusCode(422)
.when()
.post("/PaymentNode/" + uuid + "/confirmCheckout");
|
Fixes failing PaymentTest.
|
structr_structr
|
train
|
java
|
0b12899708d5204252f3dc4c093b71e214ae3204
|
diff --git a/modules/casper.js b/modules/casper.js
index <HASH>..<HASH> 100644
--- a/modules/casper.js
+++ b/modules/casper.js
@@ -1078,7 +1078,7 @@ Casper.prototype.waitFor = function waitFor(testFx, then, onTimeout, timeout) {
var condition = false;
var interval = setInterval(function(self, testFx, timeout, onTimeout) {
if ((new Date().getTime() - start < timeout) && !condition) {
- condition = testFx(self);
+ condition = testFx.call(self, self);
} else {
self.waitDone();
if (!condition) {
|
fixed Casper.waitFor() was not caling testFx using the correct context
|
casperjs_casperjs
|
train
|
js
|
ef67e3c9126ba641863c2c3637dbbe65d6e146bb
|
diff --git a/hamper/plugins/karma.py b/hamper/plugins/karma.py
index <HASH>..<HASH> 100644
--- a/hamper/plugins/karma.py
+++ b/hamper/plugins/karma.py
@@ -110,7 +110,7 @@ class Karma(ChatCommandPlugin):
Return the top or bottom 5
"""
- regex = r'^karma --(top|bottom)$'
+ regex = r'^(score|karma) --(top|bottom)$'
LIST_MAX = 5
@@ -133,7 +133,7 @@ class Karma(ChatCommandPlugin):
"""
# !karma <username>
- regex = r'^karma ([^-].+)$'
+ regex = r'^(score|karma) ([^-].+)$'
def command(self, bot, comm, groups):
# Play nice when the user isn't in the db
|
karma: per request !karma or !score works
|
hamperbot_hamper
|
train
|
py
|
088a298a96fdfb3abc1ce8a820c1eb79ff09ba50
|
diff --git a/lib/object.js b/lib/object.js
index <HASH>..<HASH> 100644
--- a/lib/object.js
+++ b/lib/object.js
@@ -84,7 +84,6 @@ exports.addProperties = function(original, extension)
{
Object.defineProperty(original, key, {
value: extension[key],
- enumerable: false,
});
}
};
|
Removed enumerable attribute which should not be needed.
|
alexfernandez_prototypes
|
train
|
js
|
5189fd3e50e82697699bcd138e2116ced10eb5df
|
diff --git a/src/busio.py b/src/busio.py
index <HASH>..<HASH> 100755
--- a/src/busio.py
+++ b/src/busio.py
@@ -7,7 +7,10 @@ See `CircuitPython:busio` in CircuitPython for more details.
* Author(s): cefn
"""
-import threading
+try:
+ import threading
+except ImportError:
+ threading = None
import adafruit_platformdetect.constants.boards as ap_board
import adafruit_platformdetect.constants.chips as ap_chip
@@ -69,8 +72,8 @@ class I2C(Lockable):
(scl, sda), i2cPorts
)
)
-
- self._lock = threading.RLock()
+ if threading is not None:
+ self._lock = threading.RLock()
def deinit(self):
"""Deinitialization"""
@@ -80,11 +83,13 @@ class I2C(Lockable):
pass
def __enter__(self):
- self._lock.acquire()
+ if threading is not None:
+ self._lock.acquire()
return self
def __exit__(self, exc_type, exc_value, traceback):
- self._lock.release()
+ if threading is not None:
+ self._lock.release()
self.deinit()
def scan(self):
|
Fix threading issue that stopped Blinka from working on MicroPython
|
adafruit_Adafruit_Blinka
|
train
|
py
|
35ecc75532f487e019df5132b09d98a29ae395df
|
diff --git a/lib/c2s/stream.js b/lib/c2s/stream.js
index <HASH>..<HASH> 100644
--- a/lib/c2s/stream.js
+++ b/lib/c2s/stream.js
@@ -257,6 +257,7 @@ C2SStream.prototype.onRegistration = function(stanza) {
.c('instructions').t(instructions).up()
.c('username').up()
.c('password')
+ proceed()
} else if (stanza.attrs.type === 'set') {
var jid = new JID(register.getChildText('username'),
this.server.options.domain)
@@ -285,9 +286,13 @@ C2SStream.prototype.onRegistration = function(stanza) {
})
.t(error.message)
}
+ proceed()
})
}
- self.send(reply)
+
+ function proceed() {
+ self.send(reply)
+ }
}
C2SStream.prototype.onBind = function(stanza) {
|
Fixing issue #<I>. `C2SStream` now properly supports asynchronous callbacks when dealing with registration failures.
Issue: <URL>
|
xmppjs_xmpp.js
|
train
|
js
|
ccb0af39dc3b677e13fca06ff55771e379b3a8e5
|
diff --git a/src/DICIT/Injectors/MethodInjector.php b/src/DICIT/Injectors/MethodInjector.php
index <HASH>..<HASH> 100644
--- a/src/DICIT/Injectors/MethodInjector.php
+++ b/src/DICIT/Injectors/MethodInjector.php
@@ -16,10 +16,19 @@ class MethodInjector implements Injector
}
foreach($callConfig as $methodName => $parameters) {
+ if (false !== strpos($methodName, '[')) {
+ if (preg_match('`^([^\[]*)\[[0-9]*\]$`i', $methodName, $matches)) {
+ $methodToCall = $matches[1];
+ }
+ }
+ else {
+ $methodToCall = $methodName;
+ }
+
$convertedParameters = $container->resolveMany($parameters);
- call_user_func_array(array($service, $methodName), $convertedParameters);
+ call_user_func_array(array($service, $methodToCall), $convertedParameters);
}
return true;
}
-}
+}
\ No newline at end of file
|
added the possibility to call multiple times a same method
|
oliviermadre_dic-it
|
train
|
php
|
b7781d0dca1c8a0c669fd38866b20348b35ef4e3
|
diff --git a/neon-server/src/main/javascript/query/query.js b/neon-server/src/main/javascript/query/query.js
index <HASH>..<HASH> 100644
--- a/neon-server/src/main/javascript/query/query.js
+++ b/neon-server/src/main/javascript/query/query.js
@@ -748,7 +748,8 @@ neon.query.saveState = function(id, stateObject, successCallback, errorCallback)
{
data: { clientId: id, state: strObject},
success: successCallback,
- error: errorCallback
+ error: errorCallback,
+ global: false
}
);
};
diff --git a/neon-server/src/main/javascript/util/ajaxUtils.js b/neon-server/src/main/javascript/util/ajaxUtils.js
index <HASH>..<HASH> 100644
--- a/neon-server/src/main/javascript/util/ajaxUtils.js
+++ b/neon-server/src/main/javascript/util/ajaxUtils.js
@@ -123,6 +123,7 @@ neon.util.AjaxUtils.doAjaxRequest = function (type, url, opts) {
params.dataType = opts.responseType;
params.success = opts.success;
params.error = opts.error;
+ params.global = opts.global;
// set a default error behavior is none is specified
if (!params.error) {
params.error = function (xhr, status, error) {
|
Allow saving the state to happen asynchronously.
|
NextCenturyCorporation_neon
|
train
|
js,js
|
ee9dba2e355432f3cf23eef5e3c99f96687681bb
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -7,7 +7,7 @@ module.exports = postcss.plugin('postcss-local-constants', function (opts) {
var sets = opts && opts.defaults || {};
var globalNode;
- var regex = /((?:[A-z]+))( )(from)(\s+)(~)((?:[A-z]+))/g;
+ var regex = /((?:[\w]+))( )(from)(\s+)(~)((?:[A-z]+))/g;
var getConstants = function(name, path, directory) {
var res = resolve.sync(JSON.parse(path), { basedir: nodepath.dirname(directory) });
|
Allow numbers in variable names
For colors such as "primary1" etc.
|
macropodhq_postcss-constants
|
train
|
js
|
d84470516dca45c3392dfec21917efaad44aa320
|
diff --git a/pyocd/target/family/target_lpc5500.py b/pyocd/target/family/target_lpc5500.py
index <HASH>..<HASH> 100644
--- a/pyocd/target/family/target_lpc5500.py
+++ b/pyocd/target/family/target_lpc5500.py
@@ -55,7 +55,7 @@ class LPC5500Family(CoreSightTarget):
seq.wrap_task('discovery',
lambda seq: seq
.wrap_task('find_components', self._modify_ap1) \
- .replace_task('create_cores', self.create_lpc55s69_cores) \
+ .replace_task('create_cores', self.create_lpc55xx_cores) \
.insert_before('create_components',
('enable_traceclk', self._enable_traceclk),
)
@@ -77,6 +77,11 @@ class LPC5500Family(CoreSightTarget):
self.aps[1].hnonsec = 1
def create_lpc55xx_cores(self):
+ # Make sure AP#0 was detected.
+ if 0 not in self.aps:
+ LOG.error("AP#0 was not found, unable to create core 0")
+ return
+
# Create core 0 with a custom class.
core0 = CortexM_LPC5500(self.session, self.aps[0], self.memory_map, 0)
core0.default_reset_type = self.ResetType.SW_SYSRESETREQ
|
LPC<I>xx: Fix regression caused by naming error.
|
mbedmicro_pyOCD
|
train
|
py
|
13a3c3c06a8955c2187e201c7342a231462fef02
|
diff --git a/Test/Unit/ComponentAPI8Test.php b/Test/Unit/ComponentAPI8Test.php
index <HASH>..<HASH> 100644
--- a/Test/Unit/ComponentAPI8Test.php
+++ b/Test/Unit/ComponentAPI8Test.php
@@ -2,10 +2,12 @@
namespace DrupalCodeBuilder\Test\Unit;
+use DrupalCodeBuilder\Test\Unit\Parsing\PHPTester;
+
/**
* Tests the API documentation file component.
*/
-class ComponentAPI8Test extends TestBaseComponentGeneration {
+class ComponentAPI8Test extends TestBase {
/**
* The Drupal core major version to set up for this test.
@@ -42,10 +44,9 @@ class ComponentAPI8Test extends TestBaseComponentGeneration {
$this->assertArrayHasKey("$module_name.api.php", $files, "The files list has an api.php file.");
$api_file = $files["$module_name.api.php"];
- $this->assertWellFormedPHP($api_file);
- $this->assertDrupalCodingStandards($api_file);
- $this->assertNoTrailingWhitespace($api_file);
- $this->assertFileHeader($api_file);
+
+ $php_tester = new PHPTester($api_file);
+ $php_tester->assertDrupalCodingStandards();
// TODO: expand the docblock assertion for these.
$this->assertContains("Hooks provided by the Test Module module.", $api_file, 'The API file contains the correct docblock header.');
|
Changed API test to use PHP helper.
|
drupal-code-builder_drupal-code-builder
|
train
|
php
|
85cb5300889d17e779b2a300cf2ff4c9b8574f87
|
diff --git a/neutronclient/shell.py b/neutronclient/shell.py
index <HASH>..<HASH> 100644
--- a/neutronclient/shell.py
+++ b/neutronclient/shell.py
@@ -686,6 +686,7 @@ class NeutronShell(app.App):
formatter = logging.Formatter(self.DEBUG_MESSAGE_FORMAT)
else:
formatter = logging.Formatter(self.CONSOLE_MESSAGE_FORMAT)
+ logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)
console.setFormatter(formatter)
root_logger.addHandler(console)
return
|
Silences the output in CLI for connection info
This change try to reduce the useless urllib3 connection info in
CLI by set the log level of urllib3.connectionpool.
Change-Id: I9d<I>d<I>ae<I>dd<I>a<I>e<I>d<I>ffe<I>
Closes-Bug: #<I>
|
rackerlabs_rackspace-python-neutronclient
|
train
|
py
|
778ffaf1f9d7aedb6f316d5879ed7f627461e891
|
diff --git a/pkg/sysregistriesv2/system_registries_v2.go b/pkg/sysregistriesv2/system_registries_v2.go
index <HASH>..<HASH> 100644
--- a/pkg/sysregistriesv2/system_registries_v2.go
+++ b/pkg/sysregistriesv2/system_registries_v2.go
@@ -46,12 +46,10 @@ func (e *Endpoint) RewriteReference(ref reference.Named, prefix string) (referen
newNamedRef := strings.Replace(refString, prefix, e.Location, 1)
newParsedRef, err := reference.ParseNamed(newNamedRef)
- if newParsedRef != nil {
- logrus.Debugf("reference rewritten from '%v' to '%v'", refString, newParsedRef.String())
- }
if err != nil {
return nil, errors.Wrapf(err, "error rewriting reference")
}
+ logrus.Debugf("reference rewritten from '%v' to '%v'", refString, newParsedRef.String())
return newParsedRef, nil
}
|
Only log the result of reference rewriting if the result is valid
... which is not, strictly speaking, guaranteed if reference.ParseNamed
returns an error; and in that case we want to log the error and not really
the result, if any, anyway. Also, don't bother checking whether the result
is not nil on success, it must be: the caller isn't ready to handle nil,
and there is no good way anyway; returning a real error value is the
resposibility of reference.ParseNamed.
|
containers_image
|
train
|
go
|
9da897f493dad317b8cd605ab666f389d7a797c4
|
diff --git a/lib/nucleon/action/node/spawn.rb b/lib/nucleon/action/node/spawn.rb
index <HASH>..<HASH> 100644
--- a/lib/nucleon/action/node/spawn.rb
+++ b/lib/nucleon/action/node/spawn.rb
@@ -34,8 +34,8 @@ class Spawn < CORL.plugin_class(:nucleon, :cloud_action)
keypair_config
- config.defaults(CORL.action_config(:bootstrap))
- config.defaults(CORL.action_config(:seed))
+ config.defaults(CORL.action_config(:node_bootstrap))
+ config.defaults(CORL.action_config(:node_seed))
end
end
|
Fixing included bootstrap and seed action providers in the spawn action provider.
|
coralnexus_corl
|
train
|
rb
|
246f5fd5cfe201d687086f5f3560345c92da0640
|
diff --git a/src/Application.php b/src/Application.php
index <HASH>..<HASH> 100644
--- a/src/Application.php
+++ b/src/Application.php
@@ -49,6 +49,7 @@ class Application implements HttpKernelInterface, TerminableInterface, \ArrayAcc
public function __construct()
{
$this->setContainer(new Container);
+ $this->container->singleton('app', $this);
$this->container->add('debug', false);
$this->router = new RouteCollection($this->container);
$this->eventEmitter = new EventEmitter;
|
Added app to container, fixes #<I>
|
HawkBitPhp_hawkbit
|
train
|
php
|
d3d6471341977be521f41ed44c433a31d765fe2d
|
diff --git a/src/main/java/nl/garvelink/iban/IBAN.java b/src/main/java/nl/garvelink/iban/IBAN.java
index <HASH>..<HASH> 100644
--- a/src/main/java/nl/garvelink/iban/IBAN.java
+++ b/src/main/java/nl/garvelink/iban/IBAN.java
@@ -21,7 +21,7 @@ import java.util.Comparator;
/**
* An immutable value object representing an International Bank Account Number. Instances of this class have a valid
- * base97 doCalculateChecksum and a valid length for their country code. Any country-specific validation is not currently performed.
+ * base97 checksum and a valid length for their country code. Any country-specific validation is not currently performed.
* @author Barend Garvelink ([email protected]) https://github.com/barend
*/
public final class IBAN {
|
JavaDoc fix: something got caught in a refactor/rename that shouldn't have.
|
barend_java-iban
|
train
|
java
|
af41c7f9b4bf38404b3ff22448601c3aea30e1e9
|
diff --git a/lib/datawrassler.rb b/lib/datawrassler.rb
index <HASH>..<HASH> 100644
--- a/lib/datawrassler.rb
+++ b/lib/datawrassler.rb
@@ -32,14 +32,7 @@ class KdnuggetsRoundup::DataWrassler
tags = doc.css('div.tag-data a')
tags = tags.collect{|tag| tag.text}
summary = doc.css('p.excerpt').text
- author = doc.css('div.author-link b a').text
- if !author #=> author selectors are not consistent for all articles
- author = doc.css('div p b a').text
- if !author
- author = doc.css('div#post- p b').text
- end
- end
- binding.pry
+ author = doc.css('#post- b').text.match(/\S*\s\S*[[:punct:]]/)[0].gsub(/[0-9[[:punct:]]]/, '')
article = doc.css('div#post- p')
counter = 0
excerpt = []
|
Added regex to author scraper
|
Jirles_kdnuggets-roundup
|
train
|
rb
|
0ba9d4f4505d42cb0d3be588de114aff084d4de1
|
diff --git a/build.js b/build.js
index <HASH>..<HASH> 100644
--- a/build.js
+++ b/build.js
@@ -80,6 +80,9 @@ exports.run = function(params, options, callback) {
'mojito-util': {
fullpath: libpath.join(__dirname, '../../app/autoload/util.common.js')
},
+ 'mojito-perf': {
+ fullpath: libpath.join(__dirname, '../../app/autoload/perf.server.js')
+ },
'mojito-resource-store': {
fullpath: libpath.join(__dirname, '../../store.server.js')
}
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -703,6 +703,9 @@ runTests = function(opts) {
'mojito-util': {
fullpath: pathlib.join(targetMojitoPath, 'lib/app/autoload/util.common.js')
},
+ 'mojito-perf': {
+ fullpath: libpath.join(__dirname, 'lib/app/autoload/perf.server.js')
+ },
'mojito-resource-store': {
fullpath: pathlib.join(targetMojitoPath, 'lib/store.server.js')
}
|
the store also now needs mojito-perf
|
YahooArchive_mojito-cli-test
|
train
|
js,js
|
98b5fea6f15f56006aa6fdbc5045d30091dd523b
|
diff --git a/rapidoid-web/src/main/java/org/rapidoid/goodies/Goodies.java b/rapidoid-web/src/main/java/org/rapidoid/goodies/Goodies.java
index <HASH>..<HASH> 100644
--- a/rapidoid-web/src/main/java/org/rapidoid/goodies/Goodies.java
+++ b/rapidoid-web/src/main/java/org/rapidoid/goodies/Goodies.java
@@ -192,13 +192,15 @@ public class Goodies extends RapidoidThing {
auth(setup);
- if (Conf.USERS.isEmpty() && Env.dev()) {
- String pass = generatedAdminPassword();
-
+ if (Env.dev()) {
Config admin = Conf.USERS.sub("admin");
- admin.set("password", pass);
- Msc.logSection("ADMIN CREDENTIALS: username = " + AnsiColor.bold("admin") + ", password = " + AnsiColor.bold(pass));
+ if (!admin.has("password") && !admin.has("hash")) {
+ String pass = generatedAdminPassword();
+ admin.set("password", pass);
+
+ Msc.logSection("ADMIN CREDENTIALS: username = " + AnsiColor.bold("admin") + ", password = " + AnsiColor.bold(pass));
+ }
}
}
|
Fixed the admin password bootstrap in DEV mode.
|
rapidoid_rapidoid
|
train
|
java
|
a307081a641b074bbeda5a222a29fc7aa717f499
|
diff --git a/lib/DAV/server.js b/lib/DAV/server.js
index <HASH>..<HASH> 100644
--- a/lib/DAV/server.js
+++ b/lib/DAV/server.js
@@ -57,15 +57,15 @@ function Server(options) {
else if (options && typeof options.node == "object" && options.node.hasFeature(jsDAV.__INODE__)) {
this.tree = new jsDAV_ObjectTree(options.node, options);
}
- else if (options && typeof options.node == "string" && options.node.indexOf("/") > -1) {
- this.tree = new jsDAV_Tree_Filesystem(options.node, options);
- }
else if (options && typeof options.type == "string") {
if (options.type == "sftp") {
var jsDAV_Tree_Sftp = require("./tree/sftp").jsDAV_Tree_Sftp;
this.tree = new jsDAV_Tree_Sftp(options);
}
}
+ else if (options && typeof options.node == "string" && options.node.indexOf("/") > -1) {
+ this.tree = new jsDAV_Tree_Filesystem(options.node, options);
+ }
else if (!options) {
var root = new jsDAV_SimpleDirectory("root");
this.tree = new jsDAV_ObjectTree(root, options);
|
* fixed checking if project is ftp project
|
mikedeboer_jsDAV
|
train
|
js
|
99d174176afb9538ba921c3c47a3c049da8efc16
|
diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
@@ -34,6 +34,10 @@ class ServerRunCommand extends ContainerAwareCommand
return false;
}
+ if (!class_exists('Symfony\Component\Process\Process')) {
+ return false;
+ }
+
return parent::isEnabled();
}
|
disable server:run cmd without Process component
|
symfony_symfony
|
train
|
php
|
a947ea9db06b3b81ce058627284937c8dbb01e2b
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -73,7 +73,16 @@ author = u'Jonathan Karr'
# built documents.
#
# The short X.Y version.
-from unitth._version import __version__ as version
+import re
+filename = os.path.join(os.path.dirname(__file__), "..", "unitth", "_version.py")
+if os.path.isfile(filename):
+ verstrline = open(filename, "rt").read()
+ VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
+ mo = re.search(VSRE, verstrline, re.M)
+ if mo:
+ version = mo.group(1)
+ else:
+ version = None
# The full version, including alpha/beta/rc tags.
release = version
|
fixing sphinx config for Read the Docs
|
KarrLab_unitth
|
train
|
py
|
eeaf29b7009028d8ba9fa761d2ad6f46529628cc
|
diff --git a/src/Ontraport.php b/src/Ontraport.php
index <HASH>..<HASH> 100644
--- a/src/Ontraport.php
+++ b/src/Ontraport.php
@@ -95,6 +95,11 @@ class Ontraport
return $client->httpRequest($requestParams, $url, $method, $requiredParams, $options);
}
+ /**
+ * @brief gets the last HTTP status code received by the HTTP Client
+ *
+ * @return int
+ */
public function getLastStatusCode()
{
return $this->getHttpClient()->getLastStatusCode();
|
Missed a function doctag the first time.
|
Ontraport_SDK-PHP
|
train
|
php
|
2dae6f137ce0dff29faa30ba9d9ed32aacaee7e6
|
diff --git a/entity-cache.js b/entity-cache.js
index <HASH>..<HASH> 100644
--- a/entity-cache.js
+++ b/entity-cache.js
@@ -263,7 +263,15 @@ function entity_cache(options) {
++stats.net_miss
self.log.debug('miss', 'net', key)
- return reply()
+ return load_prior.call(self, msg, function(err, ent) {
+ if (err || !ent) {
+ // Error or not found
+ return reply(err)
+ }
+ return writeData(self, ent, version, function(err) {
+ return reply(err || ent)
+ })
+ })
})
})
}
diff --git a/test/entity-cache.test.js b/test/entity-cache.test.js
index <HASH>..<HASH> 100755
--- a/test/entity-cache.test.js
+++ b/test/entity-cache.test.js
@@ -695,14 +695,15 @@ describe('load()', function() {
seneca.make(type).load$(saved1.id, function(err, loaded) {
expect(err).to.not.exist()
- expect(loaded).to.be.null()
+ expect(loaded.a).to.equal(entry.a)
+ expect(loaded.id).to.equal(saved1.id)
seneca.act({ plugin: 'entity-cache', get: 'stats' }, function(
err,
stats
) {
expect(stats).to.contain({
- set: 2,
+ set: 3,
get: 1,
vinc: 0,
vadd: 2,
|
cache not found if key found
should rehydrate cache
|
rjrodger_seneca-vcache
|
train
|
js,js
|
2375c87a162f6191b9046f90af21f70aa53af602
|
diff --git a/src/angular-opbeat.js b/src/angular-opbeat.js
index <HASH>..<HASH> 100644
--- a/src/angular-opbeat.js
+++ b/src/angular-opbeat.js
@@ -1,7 +1,7 @@
var Opbeat = require('./opbeat')
var wrap = function (fn, before, after) {
- return function () {
+ return function opbeatInstrumentationWrapper () {
var args = Array.prototype.slice.call(arguments)
before.apply(this, args)
|
Give instrumentation wrapping method a name, so give better traces
|
opbeat_opbeat-react
|
train
|
js
|
de47366b9b29fba4d8b6d0d6384a06ceb035534d
|
diff --git a/eng/tox/install_depend_packages.py b/eng/tox/install_depend_packages.py
index <HASH>..<HASH> 100644
--- a/eng/tox/install_depend_packages.py
+++ b/eng/tox/install_depend_packages.py
@@ -33,7 +33,8 @@ MINIMUM_VERSION_SUPPORTED_OVERRIDE = {
'six': '1.9',
'typing-extensions': '3.6.5',
'opentelemetry-api': '1.3.0',
- 'cryptography': '3.3'
+ 'cryptography': '3.3',
+ 'azure-core': '1.11.0',
}
def install_dependent_packages(setup_py_file_path, dependency_type, temp_dir):
|
bump azure core min dep (#<I>)
|
Azure_azure-sdk-for-python
|
train
|
py
|
74994a014c455226d7fe9a8ac089d2c806a88c38
|
diff --git a/template/js/ClassTree.js b/template/js/ClassTree.js
index <HASH>..<HASH> 100644
--- a/template/js/ClassTree.js
+++ b/template/js/ClassTree.js
@@ -9,6 +9,7 @@ Ext.define('Docs.ClassTree', {
renderTo: 'treePanel',
folderSort: true,
useArrows: true,
+ rootVisible: false,
height: Ext.core.Element.getViewportHeight() - 170,
border: false,
|
Hide 'Api Documentation' root folder in class tree
|
senchalabs_jsduck
|
train
|
js
|
b4084c44e2de1497f6eac501f7a8600911aacf82
|
diff --git a/src/Sylius/Bundle/ThemeBundle/Templating/TemplateNameParser.php b/src/Sylius/Bundle/ThemeBundle/Templating/TemplateNameParser.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/ThemeBundle/Templating/TemplateNameParser.php
+++ b/src/Sylius/Bundle/ThemeBundle/Templating/TemplateNameParser.php
@@ -77,7 +77,7 @@ final class TemplateNameParser implements TemplateNameParserInterface
private function getBundleOrPluginName(string $name): string
{
- if (preg_match('/^.+Plugin$/', $name)) {
+ if (substr($name, -6) === 'Plugin') {
return $name;
}
|
Replace regexp with plain string operation
|
Sylius_Sylius
|
train
|
php
|
f46ffc2aefebefd5a601569674e09029029c3f37
|
diff --git a/src/org/jgroups/protocols/raft/LevelDBLog.java b/src/org/jgroups/protocols/raft/LevelDBLog.java
index <HASH>..<HASH> 100644
--- a/src/org/jgroups/protocols/raft/LevelDBLog.java
+++ b/src/org/jgroups/protocols/raft/LevelDBLog.java
@@ -394,7 +394,7 @@ public class LevelDBLog implements Log {
}
LogEntry lastAppendedEntry = getLogEntry(lastAppended);
- assert (lastAppendedEntry==null || lastAppendedEntry.term == currentTerm);
+ assert (lastAppendedEntry==null || lastAppendedEntry.term <= currentTerm);
}
|
fix validation in LevelDBLog#checkForConsistency
Scenario:
1) Cluster starts up, and one or more entries are appended via method
#append. This causes currentTerm and lastAppendedEntry.term to be equal
2) Cluster stops
3) Cluster starts up again, and during leader-election, a new term is
negotiated and stored ( without appending any entries afterwards)
4) Cluster stops
5) Cluster starts up, and #checkForConsistency throws an AssertionError
because currentTerm != lastAppendedEntry.term
|
belaban_jgroups-raft
|
train
|
java
|
2c46dd5b4e6cde92135f52888741a0a82fee06e3
|
diff --git a/course/teacher.php b/course/teacher.php
index <HASH>..<HASH> 100644
--- a/course/teacher.php
+++ b/course/teacher.php
@@ -7,7 +7,7 @@
$id = required_param('id',PARAM_INT); // course id
$add = optional_param('add', '', PARAM_INT);
- $remove = optional_param('remove', '', PARAM_ALPHA);
+ $remove = optional_param('remove', '', PARAM_INT);
$search = optional_param('search', '', PARAM_CLEAN); // search string
require_login();
@@ -102,7 +102,7 @@
}
/// Remove a teacher if one is specified.
-
+
if (!empty($remove) and confirm_sesskey()) {
if (! remove_teacher($remove, $course->id)) {
error("Could not remove that teacher from this course!");
|
wrong type for remove, should be an int, it is an id
|
moodle_moodle
|
train
|
php
|
cd6d9f288e454906e6aa59b11c8023dcde3df523
|
diff --git a/src/widget.js b/src/widget.js
index <HASH>..<HASH> 100644
--- a/src/widget.js
+++ b/src/widget.js
@@ -168,8 +168,8 @@
}
- this.setUserAdress = function(addr){
- widget.userAdress = addr;
+ this.setUserAddress = function(addr){
+ widget.userAddress = addr;
}
};
@@ -221,11 +221,11 @@
event.preventDefault();
this._emit('connect', gTl(this.div, 'form').userAddress.value);
},
- sync : function() {
+ sync : function(event) {
event.preventDefault();
this._emit('sync');
},
- disconnect : function() {
+ disconnect : function(event) {
event.preventDefault();
this._emit('disconnect');
},
|
missing params in widget event handlers
|
remotestorage_remotestorage.js
|
train
|
js
|
39f941c771d723ace1fb9cfe167ad6389a934fff
|
diff --git a/core/cruncher.go b/core/cruncher.go
index <HASH>..<HASH> 100644
--- a/core/cruncher.go
+++ b/core/cruncher.go
@@ -8,6 +8,9 @@ import (
type Cruncher struct {
}
-func (cruncher *Cruncher) Run() {
+func (cruncher *Cruncher) Run(port int) {
+
spew.Dump("Cruncher.Run")
+ spew.Dump(port)
+
}
diff --git a/core/service.go b/core/service.go
index <HASH>..<HASH> 100644
--- a/core/service.go
+++ b/core/service.go
@@ -15,6 +15,7 @@ import (
//"flag"
//"encoding/gob"
//"io"
+ "pilosa/config"
)
type Stats struct {
@@ -308,7 +309,7 @@ func (service *Service) Run() {
//go service.HandleInbox()
//go service.ServeHTTP()
go service.MetaWatcher()
- go service.Cruncher.Run()
+ go service.Cruncher.Run(config.GetInt("port_tcp"))
sigterm, sighup := service.GetSignals()
for {
|
push port from config file into Cruncher.Run()
|
pilosa_pilosa
|
train
|
go,go
|
f7ad993f756a2e875be4aaa495e4ff2c97dd94be
|
diff --git a/common/vr/common/repo.py b/common/vr/common/repo.py
index <HASH>..<HASH> 100644
--- a/common/vr/common/repo.py
+++ b/common/vr/common/repo.py
@@ -118,7 +118,11 @@ class Repo(object):
elif self.vcs_type == 'git':
# NOTE: We don't need the url for git b/c the pull
# didn't prompt for a password.
- self.run('git pull origin master --tags')
+ # NOTE: Use `git fetch` instead `git pull` to avoid a
+ # merge. Use `--tags` to fetch all available
+ # tags.
+ self.run('git fetch --tags')
+ self.run('git fetch')
self.run('git checkout %s' % rev)
@property
|
Use `git fetch` rather than `git pull` to avoid a merge.
All VR wants is to checkout the code coresponding to a certain revision,
not merge master on top of the currently checked-out revision.
|
yougov_vr.common
|
train
|
py
|
0b5f5c0de01ab6fcb7f426d62ec3b201b6083ef8
|
diff --git a/auth/ldap/lib.php b/auth/ldap/lib.php
index <HASH>..<HASH> 100644
--- a/auth/ldap/lib.php
+++ b/auth/ldap/lib.php
@@ -1246,7 +1246,8 @@ function auth_ldap_isgroupmember ($username='', $groupdns='') {
}
//echo "Checking group $group for member $username\n";
$search = @ldap_read($ldapconnection, $group, '('.$CFG->ldap_memberattribute.'='.$username.')', array($CFG->ldap_memberattribute));
- if (ldap_count_entries($ldapconnection, $search)) {$info = auth_ldap_get_entries($ldapconnection, $search);
+
+ if (!empty($search) AND ldap_count_entries($ldapconnection, $search)) {$info = auth_ldap_get_entries($ldapconnection, $search);
if (count($info) > 0 ) {
// user is member of group
|
Some old fix, that wasn't checked in
|
moodle_moodle
|
train
|
php
|
6840cf696560bd6119295422a2a70d97e6284261
|
diff --git a/web/concrete/blocks/image_slider/controller.php b/web/concrete/blocks/image_slider/controller.php
index <HASH>..<HASH> 100644
--- a/web/concrete/blocks/image_slider/controller.php
+++ b/web/concrete/blocks/image_slider/controller.php
@@ -158,6 +158,10 @@ class Controller extends BlockController
public function save($args)
{
+ $args += array(
+ 'timeout' => 4000,
+ 'speed' => 500,
+ );
$args['timeout'] = intval($args['timeout']);
$args['speed'] = intval($args['speed']);
$args['noAnimate'] = isset($args['noAnimate']) ? 1 : 0;
|
Avoid accessing undefined array indexes during installation
Former-commit-id: <I>be<I>dc<I>fa<I>f<I>cd<I>e7f<I>a<I>e4a
Former-commit-id: aaf5f3d<I>dea<I>a5c<I>d2d<I>b<I>da3d2
|
concrete5_concrete5
|
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.