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
4a11b4e70dd388b444c1e8fe0d1a7e4860df6700
diff --git a/addon/mixins/in-viewport.js b/addon/mixins/in-viewport.js index <HASH>..<HASH> 100644 --- a/addon/mixins/in-viewport.js +++ b/addon/mixins/in-viewport.js @@ -107,7 +107,7 @@ export default Mixin.create({ this.intersectionObserver = new IntersectionObserver(bind(this, this._onIntersection), options); this.intersectionObserver.observe(element); } else { - const height = scrollableArea ? scrollableArea.offsetHeight : window.innerHeight; + const height = scrollableArea ? scrollableArea.offsetHeight + scrollableArea.getBoundingClientRect().top: window.innerHeight; const width = scrollableArea ? scrollableArea.offsetWidth : window.innerWidth; const boundingClientRect = element.getBoundingClientRect();
update rafLogic for scrollable area (#<I>)
DockYard_ember-in-viewport
train
js
7b2e165c837334ecbae8c160803a5ea3ad2dcee4
diff --git a/lib/mongo/monitoring/command_log_subscriber.rb b/lib/mongo/monitoring/command_log_subscriber.rb index <HASH>..<HASH> 100644 --- a/lib/mongo/monitoring/command_log_subscriber.rb +++ b/lib/mongo/monitoring/command_log_subscriber.rb @@ -53,7 +53,9 @@ module Mongo # # @since 2.1.0 def started(event) - log_debug("#{prefix(event)} | STARTED | #{format_command(event.command)}") + if logger.debug? + log_debug("#{prefix(event)} | STARTED | #{format_command(event.command)}") + end end # Handle the command succeeded event. @@ -65,7 +67,9 @@ module Mongo # # @since 2.1.0 def succeeded(event) - log_debug("#{prefix(event)} | SUCCEEDED | #{event.duration}s") + if logger.debug? + log_debug("#{prefix(event)} | SUCCEEDED | #{event.duration}s") + end end # Handle the command failed event. @@ -77,7 +81,9 @@ module Mongo # # @since 2.1.0 def failed(event) - log_debug("#{prefix(event)} | FAILED | #{event.message} | #{event.duration}s") + if logger.debug? + log_debug("#{prefix(event)} | FAILED | #{event.message} | #{event.duration}s") + end end private
RUBY-<I>: Improve performance on log subscriber
mongodb_mongo-ruby-driver
train
rb
23aa65f8a0d986e7c3958c42006f2fec1c0be306
diff --git a/lib/stack_tracy/sinatra.rb b/lib/stack_tracy/sinatra.rb index <HASH>..<HASH> 100644 --- a/lib/stack_tracy/sinatra.rb +++ b/lib/stack_tracy/sinatra.rb @@ -10,10 +10,9 @@ module StackTracy def call(env) request = ::Sinatra::Request.new env - if request.path.match /^\/tracy-?(.*)?/ - return open($1) + if request.path.match /^\/tracy(-.*)?/ + return open($1.to_s.gsub(/^-/, "")) end - if @before_filter.nil? || !!@before_filter.call(request.path, request.params) result = nil stack_tracy @arg || Dir::tmpdir, @options do @@ -28,7 +27,17 @@ module StackTracy private def open(match) - StackTracy.open match.to_s.empty? ? nil : match, (match.to_s.empty? && @arg.to_s != "dump" && !StackTracy.stack_trace.empty?) + if match.empty? + if StackTracy.stack_trace.empty? + StackTracy.open + else + StackTracy.dump do |file| + StackTracy.open file, true + end + end + else + StackTracy.open match + end [200, {"Content-Type" => "text/html;charset=utf-8", "Content-Length" => Rack::Utils.bytesize("").to_s}, ""] end
Improved StackTracy::Sinatra middleware a bit regarding the `/tracy` route
archan937_stack_tracy
train
rb
16719dbce51e8b01720d722fa0b9ffb7765b58d9
diff --git a/ui/src/components/layout/QDrawer.js b/ui/src/components/layout/QDrawer.js index <HASH>..<HASH> 100644 --- a/ui/src/components/layout/QDrawer.js +++ b/ui/src/components/layout/QDrawer.js @@ -88,7 +88,7 @@ export default Vue.extend({ belowBreakpoint, showing: this.showIfAbove === true && belowBreakpoint === false ? true - : this.value + : this.value === true } }, @@ -537,12 +537,8 @@ export default Vue.extend({ this.$emit('mini-state', this.isMini) const fn = () => { - if (this.showing === true) { - this.__show(false, true) - } - else { - this.__hide(false, true) - } + const action = this.showing === true ? 'show' : 'hide' + this[`__${action}`](false, true) } if (this.layout.width !== 0) {
fix(QDrawer): backdrop not initialized correctly due to faulty "showing" value #<I>
quasarframework_quasar
train
js
6dfc92688d0309c9a07e64ce8d376c4bb49de23a
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -81,9 +81,12 @@ module.exports = klass.extend({ } } }, + promise : function(fn){ + return promise.create(fn) + }, load : function(){ var req = this - return promise.create(function(resolve, reject){ + return req.promise(function(resolve, reject){ var xhr = new XMLHttpRequest() var callback = createCallback(resolve, reject) var url = resolveURL(req.url, req.queryString) @@ -112,5 +115,6 @@ module.exports = klass.extend({ post : createShorthand("POST"), del : createShorthand("DELETE"), put : createShorthand("PUT"), - patch : createShorthand("PATCH") + options : createShorthand("OPTIONS"), + head : createShorthand("HEAD") })
custom promises & http methods shorthands
bloodyowl_request
train
js
4f1ab7a437bf425c78f084af698c7565560e1ac3
diff --git a/packages/react-atlas-core/src/checkbox/Checkbox.js b/packages/react-atlas-core/src/checkbox/Checkbox.js index <HASH>..<HASH> 100644 --- a/packages/react-atlas-core/src/checkbox/Checkbox.js +++ b/packages/react-atlas-core/src/checkbox/Checkbox.js @@ -23,7 +23,10 @@ class Checkbox extends React.PureComponent { /* Check if onClick has been passed, if so call it. */ if (this.props.onClick) { - this.props.onClick(event); + /* Pass the event object, and a data object to the click handler. + The data object contains a boolean for whether the checkbox was + clicked or not, plus all the props passed to the object. */ + this.props.onClick(event, {"checked": this.state.checked, "props": this.state.checked}); } };
Pass event and data object to onClick handler.
DigitalRiver_react-atlas
train
js
c1b8e8a0474c44f60ed8e08b3be8dc7f293ce7b8
diff --git a/MySQLdb/connections.py b/MySQLdb/connections.py index <HASH>..<HASH> 100644 --- a/MySQLdb/connections.py +++ b/MySQLdb/connections.py @@ -140,7 +140,9 @@ class Connection(_mysql.connection): integer, non-zero enables LOAD LOCAL INFILE; zero disables autocommit + If False (default), autocommit is disabled. If True, autocommit is enabled. + If None, autocommit isn't set and server default is used. There are a number of undocumented, non-standard methods. See the documentation for the MySQL C API for some hints on what they do. @@ -227,9 +229,11 @@ class Connection(_mysql.connection): self.encoders[types.StringType] = string_literal self.encoders[types.UnicodeType] = unicode_literal self._transactional = self.server_capabilities & CLIENT.TRANSACTIONS - if self._transactional and not kwargs2.pop('autocommit', False): + if self._transactional: # PEP-249 requires autocommit to be initially off - self.autocommit(False) + autocommit = kwargs2.pop('autocommit', False) + if autocommit is not None: + self.autocommit(bool(True)) self.messages = [] def cursor(self, cursorclass=None):
autocommit=None means using server default.
PyMySQL_mysqlclient-python
train
py
80545be2115360fb009ed2ede55616322491942c
diff --git a/lib/dataset.js b/lib/dataset.js index <HASH>..<HASH> 100644 --- a/lib/dataset.js +++ b/lib/dataset.js @@ -695,10 +695,8 @@ TextS3File.prototype.iterate = function (task, p, pipeline, done) { task.log('stream s3', this.bucket, this.path); if (this.options.parquet || this.path.slice(-8) === '.parquet') return parquetStream(rs, this.path, task, pipeline, done); - if (this.path.slice(-3) === '.gz') rs = rs.pipe(task.lib.zlib.createGunzip({chunkSize: 65536})); - iterateStream(rs, task, pipeline, done); }; @@ -948,7 +946,8 @@ TextLocal.prototype.iterate = function (task, p, pipeline, done) { return parquetIterate(path, pipeline, done); var rs = task.lib.fs.createReadStream(path); if (path.slice(-3) === '.gz') - rs.pipe(task.lib.zlib.createGunzip({chunkSize: 65536})); + rs = rs.pipe(task.lib.zlib.createGunzip({chunkSize: 65536})); + iterateStream(rs, task, pipeline, done); };
textFile: Fix handling of gzipped files in local filesystem The returned stream was operating on the compressed data instead ofs uncompressed.
skale-me_skale
train
js
f7a57135ec328063eb4d2d5c4a035994a85ad290
diff --git a/modules/piperename.py b/modules/piperename.py index <HASH>..<HASH> 100644 --- a/modules/piperename.py +++ b/modules/piperename.py @@ -27,8 +27,11 @@ def pipe_rename(context, _INPUT, conf, **kwargs): for item in _INPUT: for rule in rules: - item[rule[2]] = item[rule[1]] + #Map names with dot notation onto nested dictionaries, e.g. 'a.content' -> ['a']['content'] + #todo: optimise by pre-calculating splits + # and if this logic is stable, wrap in util functions and use everywhere items are accessed + reduce(lambda i,k:i.get(k), [item] + rule[2].split('.')[:-1])[rule[2].split('.')[-1]] = reduce(lambda i,k:i.get(k), [item] + rule[1].split('.')) if rule[0] == 'rename': - del item[rule[1]] + del reduce(lambda i,k:i.get(k), [item] + rule[1].split('.')[:-1])[rule[1].split('.')[-1]] yield item
Allow dot notation to map to nested dictionaries
ggaughan_pipe2py
train
py
cc47bcd77df77d47461ac7173a97900846d1a040
diff --git a/heater.go b/heater.go index <HASH>..<HASH> 100644 --- a/heater.go +++ b/heater.go @@ -162,6 +162,9 @@ func (h *Heater) getTarget(val *Value) { } func (h *Heater) readTemperature(msg *Message) { + if msg.Name != "temperature" { + return + } temp, ok := msg.Value.ToFloat() if ok { h.currentTemp = temp
fixed heater bug it was reading any update to use as its temperature
cswank_gogadgets
train
go
0d7ad258c90d7f17ea1f36e0d40d5c47546ea48e
diff --git a/lib/mongoid/components.rb b/lib/mongoid/components.rb index <HASH>..<HASH> 100644 --- a/lib/mongoid/components.rb +++ b/lib/mongoid/components.rb @@ -84,7 +84,7 @@ module Mongoid #:nodoc def prohibited_methods @prohibited_methods ||= MODULES.inject([]) do |methods, mod| methods.tap do |mets| - mets << mod.instance_methods + mets << mod.instance_methods.map{ |m| m.to_sym } end end.flatten end diff --git a/spec/unit/mongoid/components_spec.rb b/spec/unit/mongoid/components_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/mongoid/components_spec.rb +++ b/spec/unit/mongoid/components_spec.rb @@ -15,7 +15,7 @@ describe Mongoid::Components do mod.instance_methods.each do |method| it "includes #{method}" do - methods.should include(method) + methods.should include(method.to_sym) end end end
Checking field collisions should work on <I>.x
mongodb_mongoid
train
rb,rb
b237a41af40d8e2d3f7f47603d7196bcbbbb890b
diff --git a/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java b/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java index <HASH>..<HASH> 100644 --- a/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java +++ b/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java @@ -37,6 +37,7 @@ import hudson.tasks.LogRotatorTest.TestsFail; import static hudson.tasks.LogRotatorTest.build; import java.io.File; import java.io.IOException; +import java.net.HttpURLConnection; import java.nio.charset.Charset; import java.util.Arrays; import java.util.Collections; @@ -230,6 +231,7 @@ public class ArtifactArchiverTest { assertFalse(kids[0].isDirectory()); assertFalse(kids[0].isFile()); assertFalse(kids[0].exists()); + j.createWebClient().assertFails(b.getUrl() + "artifact/hack", HttpURLConnection.HTTP_NOT_FOUND); } private void runNewBuildAndStartUnitlIsCreated(AbstractProject project) throws InterruptedException{
Also checking DirectoryBrowserSupport behavior, as in DirectoryBrowserSupportTest.
jenkinsci_jenkins
train
java
5738903e59ec59c47c5cdd2546f182041a6b006c
diff --git a/src/access.js b/src/access.js index <HASH>..<HASH> 100644 --- a/src/access.js +++ b/src/access.js @@ -89,18 +89,28 @@ } }; + Object.defineProperty(RemoteStorage.prototype, 'access', { + get: function() { + var access = new RemoteStorage.Access(); + Object.defineProperty(RemoteStorage.prototype, 'access', { + value: access + }); + return access; + }, + configurable: true + }); + RemoteStorage.prototype.claimAccess = function(scopes) { + if(typeof(scopes) === 'object') { + for(var key in scopes) { + this.access.claim(key, scopes[key]); + } + } else { + this.access.claim(arguments[0], arguments[1]); + } + }; + RemoteStorage.Access._rs_init = function() { haveLocalStorage = 'localStorage' in global; - Object.defineProperty(RemoteStorage.prototype, 'access', { - get: function() { - var access = new RemoteStorage.Access(); - Object.defineProperty(RemoteStorage.prototype, 'access', { - value: access - }); - return access; - }, - configurable: true - }); return promising().fulfill(); };
have remoteStorage.claimAccess and remoteStorage.access always defined
remotestorage_remotestorage.js
train
js
4f93fc4f4417dc4beff4728f3bcd127c715f88bf
diff --git a/spec/generators/rails/mobility/install_generator_spec.rb b/spec/generators/rails/mobility/install_generator_spec.rb index <HASH>..<HASH> 100644 --- a/spec/generators/rails/mobility/install_generator_spec.rb +++ b/spec/generators/rails/mobility/install_generator_spec.rb @@ -1,8 +1,6 @@ require "spec_helper" describe Mobility::InstallGenerator, type: :generator, orm: :active_record do - break unless Mobility::Loaded::Rails - require "generator_spec/test_case" include GeneratorSpec::TestCase
Remove unnecessary break in install generator spec
shioyama_mobility
train
rb
ba5f613f44bb65236808ea6685d4829a1e2ca17b
diff --git a/example/keyboard/main.go b/example/keyboard/main.go index <HASH>..<HASH> 100644 --- a/example/keyboard/main.go +++ b/example/keyboard/main.go @@ -30,13 +30,14 @@ const ( // TODO: Add Key.String() by stringer var keyNames = map[ebiten.Key]string{ - ebiten.KeyComma: "','", - ebiten.KeyDelete: "Delete", - ebiten.KeyEnter: "Enter", - ebiten.KeyEscape: "Escape", - ebiten.KeyPeriod: "'.'", - ebiten.KeySpace: "Space", - ebiten.KeyTab: "Tab", + ebiten.KeyBackspace: "Backspace", + ebiten.KeyComma: "','", + ebiten.KeyDelete: "Delete", + ebiten.KeyEnter: "Enter", + ebiten.KeyEscape: "Escape", + ebiten.KeyPeriod: "'.'", + ebiten.KeySpace: "Space", + ebiten.KeyTab: "Tab", // Arrows ebiten.KeyDown: "Down",
Bug fix: Add 'backspace' to example/keyboard
hajimehoshi_ebiten
train
go
f354c622ca05289d9190d3718fd0da3aa4e18f27
diff --git a/core/block_validator.go b/core/block_validator.go index <HASH>..<HASH> 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -89,7 +89,7 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD if rbloom != header.Bloom { return fmt.Errorf("invalid bloom (remote: %x local: %x)", header.Bloom, rbloom) } - // Tre receipt Trie's root (R = (Tr [[H1, R1], ... [Hn, R1]])) + // Tre receipt Trie's root (R = (Tr [[H1, R1], ... [Hn, Rn]])) receiptSha := types.DeriveSha(receipts, new(trie.Trie)) if receiptSha != header.ReceiptHash { return fmt.Errorf("invalid receipt root hash (remote: %x local: %x)", header.ReceiptHash, receiptSha)
core: fix a typo in comment (#<I>)
ethereum_go-ethereum
train
go
1fd3706e5614daf6510197c2eb15b2311f7b7d9a
diff --git a/openstack_dashboard/utils/settings.py b/openstack_dashboard/utils/settings.py index <HASH>..<HASH> 100644 --- a/openstack_dashboard/utils/settings.py +++ b/openstack_dashboard/utils/settings.py @@ -117,7 +117,7 @@ def update_dashboards(modules, horizon_config, installed_apps): horizon_config['panel_customization'] = panel_customization horizon_config['dashboards'] = tuple(dashboards) - horizon_config['exceptions'].update(exceptions) + horizon_config.setdefault('exceptions', {}).update(exceptions) horizon_config.update(update_horizon_config) horizon_config.setdefault('angular_modules', []).extend(angular_modules) horizon_config.setdefault('js_files', []).extend(js_files)
Permit 'exceptions' to be omitted from HORIZON_CONFIG Without this change, if HORIZON_CONFIG is defined in local_settings.py and does not have an 'exceptions' entry, then horizon throws and exception and fails to start. Change-Id: I<I>f<I>d1c<I>ac<I>bdcc<I>d5acb2a0b<I> Closes-Bug: #<I>
openstack_horizon
train
py
8c2a81ce49f30291c3c2e5eef857a114fadbb400
diff --git a/hypermap/aggregator/models.py b/hypermap/aggregator/models.py index <HASH>..<HASH> 100644 --- a/hypermap/aggregator/models.py +++ b/hypermap/aggregator/models.py @@ -244,7 +244,7 @@ class Layer(Resource): elif self.service.type == 'WM': # we use the geoserver virtual layer getcapabilities for this purpose url = 'http://worldmap.harvard.edu/geoserver/geonode/%s/wms?' % self.name - ows = WebMapService(url) + ows = WebMapService(url, username=settings.WM_USERNAME, password=settings.WM_USERNAME_PASSWORD) op_getmap = ows.getOperationByName('GetMap') image_format = 'image/png' if image_format not in op_getmap.formatOptions: diff --git a/hypermap/settings/default.py b/hypermap/settings/default.py index <HASH>..<HASH> 100644 --- a/hypermap/settings/default.py +++ b/hypermap/settings/default.py @@ -176,3 +176,13 @@ SKIP_CELERY_TASK = False # taggit TAGGIT_CASE_INSENSITIVE = True + +# WorldMap Service credentials (override this in local_settings or _ubuntu in production) +WM_USERNAME = 'wmuser' +WM_USERNAME_PASSWORD = 'secret' + +# Load more settings from a file called local_settings.py if it exists +try: + from local_settings import * # noqa +except ImportError: + pass
Now doing getmap with username and password in WM layer, this way we get valid checks and thumbnails for private layers
cga-harvard_Hypermap-Registry
train
py,py
20b22d841d8cffd6592fb1302302f22caf398404
diff --git a/QUANTAXIS/QAARP/QARisk.py b/QUANTAXIS/QAARP/QARisk.py index <HASH>..<HASH> 100755 --- a/QUANTAXIS/QAARP/QARisk.py +++ b/QUANTAXIS/QAARP/QARisk.py @@ -48,13 +48,15 @@ class QA_Risk(): self.fetch = {MARKET_TYPE.STOCK_CN: QA_fetch_stock_day_adv, MARKET_TYPE.INDEX_CN: QA_fetch_index_day_adv} - @lru_cache() + @property + @lru_cache() def market_data(self): return QA_fetch_stock_day_adv(self.account.code, self.account.start_date, self.account.end_date) - @lru_cache() + @property + @lru_cache() def assets(self): '惰性计算 日市值' return ((self.market_data.to_qfq().pivot('close') * self.account.daily_hold).sum(axis=1) + self.account.daily_cash.set_index('date').cash).fillna(method='pad')
#fix bug for @lru_cache()
QUANTAXIS_QUANTAXIS
train
py
4fb0bb656521e3648192311d2c4fb34a35a19085
diff --git a/src/Aspect/ContractCheckerAspect.php b/src/Aspect/ContractCheckerAspect.php index <HASH>..<HASH> 100644 --- a/src/Aspect/ContractCheckerAspect.php +++ b/src/Aspect/ContractCheckerAspect.php @@ -34,7 +34,6 @@ class ContractCheckerAspect implements Aspect /** * Default constructor * - * @todo Remove injection of reader * @param Reader $reader Annotation reader */ public function __construct(Reader $reader) @@ -122,7 +121,6 @@ class ContractCheckerAspect implements Aspect $result = $invocation->proceed(); $args['__result'] = $result; - // TODO: Do not use reader directly and pack annotation information into reflection foreach ($this->reader->getClassAnnotations($class) as $annotation) { if (!$annotation instanceof Contract\Invariant) { continue;
Clean todos from the source code
php-deal_framework
train
php
8214b531de9e4816e00dabd12837bc39fbae7ffd
diff --git a/server/webapp/WEB-INF/rails/spec/webpack/views/agents/agents_widget_spec.js b/server/webapp/WEB-INF/rails/spec/webpack/views/agents/agents_widget_spec.js index <HASH>..<HASH> 100644 --- a/server/webapp/WEB-INF/rails/spec/webpack/views/agents/agents_widget_spec.js +++ b/server/webapp/WEB-INF/rails/spec/webpack/views/agents/agents_widget_spec.js @@ -238,6 +238,8 @@ describe("Agents Widget", () => { }); it('should show message after deleting the agents', () => { + route(true); + jasmine.Ajax.withMock(() => { clickAllAgents(); allowBulkUpdate('DELETE');
Attempt to fix flaky Agents Spec
gocd_gocd
train
js
d719e47c187108cbc9493317e3f7138bd035b249
diff --git a/lib/simple_form/components/hints.rb b/lib/simple_form/components/hints.rb index <HASH>..<HASH> 100644 --- a/lib/simple_form/components/hints.rb +++ b/lib/simple_form/components/hints.rb @@ -3,12 +3,16 @@ module SimpleForm # Needs to be enabled in order to do automatic lookups. module Hints def hint - if options[:hint] == true + @hint ||= if options[:hint] == true translate(:hints) else options[:hint] end end + + def has_hint? + hint.present? + end end end end diff --git a/lib/simple_form/wrappers/root.rb b/lib/simple_form/wrappers/root.rb index <HASH>..<HASH> 100644 --- a/lib/simple_form/wrappers/root.rb +++ b/lib/simple_form/wrappers/root.rb @@ -26,7 +26,7 @@ module SimpleForm css = options[:wrapper_class] ? Array.wrap(options[:wrapper_class]) : @defaults[:class] css += input.html_classes css << (options[:wrapper_error_class] || @defaults[:error_class]) if input.has_errors? - css << (options[:wrapper_hint_class] || @defaults[:hint_class]) if input.hint + css << (options[:wrapper_hint_class] || @defaults[:hint_class]) if input.has_hint? css end end
Use similar api for hints and errors, and cache hint to avoid double lookup
plataformatec_simple_form
train
rb,rb
c00c76356060ec2ba049f57d39c7ab3399de95e8
diff --git a/lib/s3repo/base.rb b/lib/s3repo/base.rb index <HASH>..<HASH> 100644 --- a/lib/s3repo/base.rb +++ b/lib/s3repo/base.rb @@ -10,7 +10,7 @@ module S3Repo def bucket @bucket ||= @options[:bucket] || ENV['S3_BUCKET'] - fail('No bucket given') unless bucket + fail('No bucket given') unless @bucket end def client
such loop, very recurse
amylum_s3repo
train
rb
438c20888846f882e154c4058c77478ee2fee4dd
diff --git a/openquake/hazardlib/gsim/base.py b/openquake/hazardlib/gsim/base.py index <HASH>..<HASH> 100644 --- a/openquake/hazardlib/gsim/base.py +++ b/openquake/hazardlib/gsim/base.py @@ -250,7 +250,8 @@ class ContextMaker(object): :param truncnorm: an instance of scipy.stats.truncnorm :param epsilons: the epsilon bins :param monitor: a Monitor instance - :returns: an AccumDict + :returns: + an AccumDict with keys (poe, imt, rlzi) and mags, dists, lons, lats """ acc = AccumDict(accum=[]) ctx_mon = monitor('disagg_contexts', measuremem=False)
Improved docstring [skip CI]
gem_oq-engine
train
py
6ea0344efd807ab9a3829945ea9760c65223ba72
diff --git a/cmd/torrent-metainfo-pprint/main.go b/cmd/torrent-metainfo-pprint/main.go index <HASH>..<HASH> 100644 --- a/cmd/torrent-metainfo-pprint/main.go +++ b/cmd/torrent-metainfo-pprint/main.go @@ -47,6 +47,9 @@ func processReader(r io.Reader) error { "AnnounceList": metainfo.AnnounceList, "UrlList": metainfo.UrlList, } + if len(metainfo.Nodes) > 0 { + d["Nodes"] = metainfo.Nodes + } if flags.Files { d["Files"] = info.UpvertedFiles() }
torrent-metainfo-pprint: include the 'nodes' field into the output when non-empty
anacrolix_torrent
train
go
35b0bb9b264612f062ec115bea9b11f6388e8c43
diff --git a/zipline/utils/factory.py b/zipline/utils/factory.py index <HASH>..<HASH> 100644 --- a/zipline/utils/factory.py +++ b/zipline/utils/factory.py @@ -43,12 +43,6 @@ def data_path(): return data_path -def logger_path(): - import zipline - log_path = dirname(abspath(zipline.__file__)) - return os.join(log_path, 'logging.cfg') - - def load_market_data(): fp_bm = open(join(data_path(), "benchmark.msgpack"), "rb") bm_list = msgpack.loads(fp_bm.read())
Removes unused log_path method.
quantopian_zipline
train
py
9245999b5b955a4b3d450702961cb97679a4c409
diff --git a/Minimal-J/src/main/java/org/minimalj/backend/db/AbstractTable.java b/Minimal-J/src/main/java/org/minimalj/backend/db/AbstractTable.java index <HASH>..<HASH> 100644 --- a/Minimal-J/src/main/java/org/minimalj/backend/db/AbstractTable.java +++ b/Minimal-J/src/main/java/org/minimalj/backend/db/AbstractTable.java @@ -367,7 +367,7 @@ public abstract class AbstractTable<T> { try (ResultSet resultSet = preparedStatement.executeQuery()) { while (resultSet.next() && result.size() < maxResults) { T object = readResultSetRow(resultSet, null); - if (this instanceof Table) { + if (this instanceof Table && !(this instanceof CodeTable)) { long id = IdUtils.getId(object); ((Table<T>) this).loadRelations(object, id); }
AbstractTable: no relations for Codes
BrunoEberhard_minimal-j
train
java
465512c515b726035024847649503475aaac034c
diff --git a/src/main/java/edu/jhu/prim/vector/LongDoubleDenseVector.java b/src/main/java/edu/jhu/prim/vector/LongDoubleDenseVector.java index <HASH>..<HASH> 100644 --- a/src/main/java/edu/jhu/prim/vector/LongDoubleDenseVector.java +++ b/src/main/java/edu/jhu/prim/vector/LongDoubleDenseVector.java @@ -112,9 +112,7 @@ public class LongDoubleDenseVector implements LongDoubleVector { @Override public double dot(LongDoubleVector y) { - if (y instanceof LongDoubleSortedVector || y instanceof LongDoubleHashVector) { - return y.dot(this); - } else if (y instanceof LongDoubleDenseVector){ + if (y instanceof LongDoubleDenseVector){ LongDoubleDenseVector other = (LongDoubleDenseVector) y; int max = Math.min(idxAfterLast, other.idxAfterLast); double dot = 0; @@ -123,11 +121,7 @@ public class LongDoubleDenseVector implements LongDoubleVector { } return dot; } else { - double dot = 0; - for (int i=0; i<idxAfterLast; i++) { - dot += elements[i] * y.get(i); - } - return dot; + return y.dot(this); } }
Switching dense vectors to call their sparse vector's implementation of dot.
mgormley_prim
train
java
6379514e6ab4aa800210f0f411e8de495134e7ff
diff --git a/tests/digitalocean/models/compute/servers_tests.rb b/tests/digitalocean/models/compute/servers_tests.rb index <HASH>..<HASH> 100644 --- a/tests/digitalocean/models/compute/servers_tests.rb +++ b/tests/digitalocean/models/compute/servers_tests.rb @@ -8,6 +8,9 @@ Shindo.tests('Fog::Compute[:digitalocean] | servers collection', ['digitalocean' public_key_path = File.join(File.dirname(__FILE__), '../../fixtures/id_rsa.pub') private_key_path = File.join(File.dirname(__FILE__), '../../fixtures/id_rsa') + # Collection tests are consistently timing out on Travis wasting people's time and resources + pending if Fog.mocking? + collection_tests(service.servers, options, true) do @instance.wait_for { ready? } end
[DigitalOcean] Skip consistently timing out tests The server tests in digital ocean have been frequently timing out. * <URL>
fog_fog
train
rb
245313551bb4360045132c2162bd2e5f6452b2da
diff --git a/pyzmp/node.py b/pyzmp/node.py index <HASH>..<HASH> 100644 --- a/pyzmp/node.py +++ b/pyzmp/node.py @@ -426,13 +426,15 @@ class Node(object): # Starting the clock start = time.time() - # signalling startup only the first time - self.started.set() - first_loop = True # loop listening to connection while not self.exit.is_set(): + # signalling startup only the first time, just after having check for exit request. + # We need to guarantee at least ONE call to update. + if first_loop: + self.started.set() + # blocking. messages are received ASAP. timeout only determine update/shutdown speed. socks = dict(poller.poll(timeout=100)) if svc_socket in socks and socks[svc_socket] == zmq.POLLIN: diff --git a/pyzmp/tests/test_node.py b/pyzmp/tests/test_node.py index <HASH>..<HASH> 100644 --- a/pyzmp/tests/test_node.py +++ b/pyzmp/tests/test_node.py @@ -140,6 +140,8 @@ def test_node_creation_args(): assert n1.is_alive() assert svc_url + # starting and shutdown should at least guarantee ONE call of update function. + exitcode = n1.shutdown() assert exitcode == 0 assert not n1.is_alive()
signaling node start after checking for exit request, to guarantee at least one call to update.
pyros-dev_pyzmp
train
py,py
cdc5b71bb299fa0213a5cfdc7a1117870764b8a9
diff --git a/src/resources/views/corporation/starbase/status-tab.blade.php b/src/resources/views/corporation/starbase/status-tab.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/corporation/starbase/status-tab.blade.php +++ b/src/resources/views/corporation/starbase/status-tab.blade.php @@ -230,10 +230,10 @@ }} @else {{ - round(($starbase->fuelBays->where('type_id', 16275)->first()->quantity / $starbase->baseStrontiumUsage)) + round(optional($starbase->fuelBays->where('type_id', 16275))->first()->quantity ?? 0 / $starbase->baseStrontiumUsage) }} hours at {{ - carbon('now')->addHours($starbase->fuelBays->where('type_id', 16275)->first()->quantity / $starbase->baseStrontiumUsage) + carbon('now')->addHours(optional($starbase->fuelBays->where('type_id', 16275))->first()->quantity ?? 0 / $starbase->baseStrontiumUsage) }} @endif @endif
Fix for offline POS (#<I>)
eveseat_web
train
php
ff9e0333ec281aa29dfee23b03c42af93bdd0c87
diff --git a/contribs/gmf/apps/desktop_alt/js/controller.js b/contribs/gmf/apps/desktop_alt/js/controller.js index <HASH>..<HASH> 100644 --- a/contribs/gmf/apps/desktop_alt/js/controller.js +++ b/contribs/gmf/apps/desktop_alt/js/controller.js @@ -99,6 +99,12 @@ app.AlternativeDesktopController = function($scope, $injector) { this.gridMergeTabs = { 'merged_osm_times': ['110', '126', '147'] }; + + // mark 'merged_osm_times' as translatable + /** @type {angularGettext.Catalog} */ + var gettextCatalog = $injector.get('gettextCatalog'); + gettextCatalog.getString('merged_osm_times'); + }; ol.inherits(app.AlternativeDesktopController, gmf.AbstractDesktopController);
Mark merged layer label as translatable
camptocamp_ngeo
train
js
c6cb3cd46e8588108b9325027db20a49990c0e27
diff --git a/lib/cli.js b/lib/cli.js index <HASH>..<HASH> 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -80,7 +80,6 @@ module.exports = function (options) { var slap = new Slap(opts); Promise.all(opts._.map(function (path, i) { - slap.fileBrowser.refresh(path, _.noop); return slap.open(path.toString(), !i); })).done(); diff --git a/lib/ui/Slap.js b/lib/ui/Slap.js index <HASH>..<HASH> 100644 --- a/lib/ui/Slap.js +++ b/lib/ui/Slap.js @@ -11,6 +11,8 @@ var util = require('slap-util'); var BaseWidget = require('base-widget'); var Editor = require('editor-widget'); +var fs = require('fs'); + function Slap (opts) { var self = this; @@ -52,6 +54,10 @@ Slap.prototype.open = Promise.method(function (filePath, current) { var pane = self.paneForPath(filePath); pane = pane || new Pane({parent: self}); + if (fs.lstatSync(filePath).isDirectory()) { // check if filePath is a directory + self.fileBrowser.refresh(filePath, _.noop); // open the directory on the sidebar + return; + } return pane.editor.open(filePath) .then(function () { if (current) pane.setCurrent();
fix(slap): fix bug when given 'path/to/dir', slap opens the given directory instead of throwing an error EISDIR.
slap-editor_slap
train
js,js
0befd0d32e4246763105092fc8ae91e7428c26fe
diff --git a/lib/makewcs.py b/lib/makewcs.py index <HASH>..<HASH> 100644 --- a/lib/makewcs.py +++ b/lib/makewcs.py @@ -80,7 +80,7 @@ PARITY = {'WFC':[[1.0,0.0],[0.0,-1.0]],'HRC':[[-1.0,0.0],[0.0,1.0]], NUM_PER_EXTN = {'ACS':3,'WFPC2':1,'STIS':3,'NICMOS':5, 'WFC3':3} -__version__ = '1.1.6 (19 May 2010)' +__version__ = '1.1.7 (6 Jul 2010)' def run(input,quiet=yes,restore=no,prepend='O', tddcorr=True): print "+ MAKEWCS Version %s" % __version__ @@ -265,7 +265,8 @@ def _update(image,idctab,nimsets,apply_tdd=False, elif instrument == 'WFC3': filter1 = readKeyword(hdr,'FILTER') filter2 = None - #filter2 = readKeyword(hdr,'FILTER2') + # use value of 'BINAXIS' keyword to set binning value for WFC3 data + binned = readKeyword(hdr,'BINAXIS1') else: filter1 = readKeyword(hdr,'FILTER1') filter2 = readKeyword(hdr,'FILTER2')
Updates to 'pydrizzle' and 'pytools' to correct the problem seen in processing binned WFC3 images, where the chips are over <I> pixels apart instead of just <I> (for binaxis=3). The SIP coefficients may still not be quite correct for binned data, though, but these fixes correctly mosaic binned WFC3/UVIS images. WJH git-svn-id: <URL>
spacetelescope_stsci.tools
train
py
cf1a00e8b20312613303a83ec2e54682f1004cb4
diff --git a/lib/deliver/deliver_process.rb b/lib/deliver/deliver_process.rb index <HASH>..<HASH> 100644 --- a/lib/deliver/deliver_process.rb +++ b/lib/deliver/deliver_process.rb @@ -142,6 +142,11 @@ module Deliver def set_screenshots screens_path = @deploy_information[Deliverer::ValKey::SCREENSHOTS_PATH] + + if (ENV["DELIVER_SCREENSHOTS_PATH"] || '').length > 0 + Helper.log.warn "Overwriting screenshots path from config (#{screens_path}) with (#{ENV["DELIVER_SCREENSHOTS_PATH"]})".yellow + screens_path = ENV["DELIVER_SCREENSHOTS_PATH"] + end if screens_path if File.exists?('./Snapfile')
Added overwriting of screenshots path using environment for fastlane
fastlane_fastlane
train
rb
ee1691f79968c8dea6275bcb47d39c71b1aff82c
diff --git a/src/Composer/Downloader/FileDownloader.php b/src/Composer/Downloader/FileDownloader.php index <HASH>..<HASH> 100644 --- a/src/Composer/Downloader/FileDownloader.php +++ b/src/Composer/Downloader/FileDownloader.php @@ -106,8 +106,8 @@ class FileDownloader implements DownloaderInterface $this->io->write(' Loading from cache'); } } catch (TransportException $e) { - if (404 === $e->getCode() && 'github.com' === $hostname) { - $message = "\n".'Could not fetch '.$processedUrl.', enter your GitHub credentials to access private repos'; + if (in_array($e->getCode(), array(404, 403)) && 'github.com' === $hostname && !$this->io->hasAuthentication($hostname)) { + $message = "\n".'Could not fetch '.$processedUrl.', enter your GitHub credentials '.($e->getCode === 404 ? 'to access private repos' : 'to go over the API rate limit'); $gitHubUtil = new GitHub($this->io, $this->config, null, $this->rfs); if (!$gitHubUtil->authorizeOAuth($hostname) && (!$this->io->isInteractive() || !$gitHubUtil->authorizeOAuthInteractively($hostname, $message))
Also try authenticating on github for <I> responses
mothership-ec_composer
train
php
e71e79e7789d35658984eeef3aee4cb37ebd1d3a
diff --git a/test/util/compareDirectories.js b/test/util/compareDirectories.js index <HASH>..<HASH> 100644 --- a/test/util/compareDirectories.js +++ b/test/util/compareDirectories.js @@ -47,6 +47,9 @@ module.exports = function(dirA, dirB, cb) { filename = inBoth[i]; typeA = metadataA[filename].type; typeB = metadataB[filename].type; + // skip if both are directories + if('directory' === typeA && 'directory' === typeB) + continue; // something is wrong if one entry is a file and the other is a directory // (do a XOR with the ternary operator) if('directory' === typeA ? 'directory' !== typeB : 'directory' === typeB) {
fix tests (for real) sorry, only tested on win, but linux handles things differently
electron_asar
train
js
3e948d20fda87ebcae6b549a82d5329098c4bf02
diff --git a/lib/Loader.php b/lib/Loader.php index <HASH>..<HASH> 100644 --- a/lib/Loader.php +++ b/lib/Loader.php @@ -107,7 +107,7 @@ abstract class Loader implements LoaderInterface } /** - * @param $input + * @param string $input * @return array|string */ protected function convertInputToSerializedJson($input) @@ -231,6 +231,8 @@ abstract class Loader implements LoaderInterface /** * @param string $payload + * @param string $input + * @param string $signature */ protected function createJWS($input, $protected_header, $unprotected_header, $payload, $signature) {
Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on <URL>
Spomky-Labs_jose
train
php
9ac7d04564dccb63443292b78adc4fa014fe4df0
diff --git a/zsl/resource/model_resource.py b/zsl/resource/model_resource.py index <HASH>..<HASH> 100644 --- a/zsl/resource/model_resource.py +++ b/zsl/resource/model_resource.py @@ -94,6 +94,7 @@ class ResourceQueryContext(object): self._data = data # test if params is a list + # TODO: replace this with a better is_list test try: len(params) self._params = params
Add todo comment to questionable code
AtteqCom_zsl
train
py
9607106ab5a4deb946c2ba41e7965dfe4ae8b131
diff --git a/library/src/com/WazaBe/HoloEverywhere/widget/NumberPicker.java b/library/src/com/WazaBe/HoloEverywhere/widget/NumberPicker.java index <HASH>..<HASH> 100644 --- a/library/src/com/WazaBe/HoloEverywhere/widget/NumberPicker.java +++ b/library/src/com/WazaBe/HoloEverywhere/widget/NumberPicker.java @@ -414,7 +414,7 @@ public class NumberPicker extends LinearLayout { mInputText.selectAll(); } else { mInputText.setSelection(0, 0); - validateInputTextView(v); + validateInputTextView(mInputText); } } }); @@ -1359,8 +1359,8 @@ public class NumberPicker extends LinearLayout { return false; } - private void validateInputTextView(View v) { - String str = String.valueOf(((TextView) v).getText()); + private void validateInputTextView(NumberPickerEditText v) { + String str = String.valueOf(v.getText()); if (TextUtils.isEmpty(str)) { updateInputTextView(); } else {
Fix crashing with using NumberPicker
Prototik_HoloEverywhere
train
java
32f0b1a020db1b3c056f356af79357eff2be80bd
diff --git a/Kwf/Rest/Controller/Model.php b/Kwf/Rest/Controller/Model.php index <HASH>..<HASH> 100644 --- a/Kwf/Rest/Controller/Model.php +++ b/Kwf/Rest/Controller/Model.php @@ -190,6 +190,8 @@ class Kwf_Rest_Controller_Model extends Zend_Rest_Controller $this->_fillRowInsert($row, $data); $this->_beforeInsert($row); $row->save(); + $this->_afterSave($row, $data); + $this->_afterInsert($row, $data); $this->view->data = $this->_loadDataFromRow($row); } @@ -226,6 +228,8 @@ class Kwf_Rest_Controller_Model extends Zend_Rest_Controller $this->_fillRow($row, $data); $this->_beforeUpdate($row); $row->save(); + $this->_afterSave($row, $data); + $this->_afterUpdate($row, $data); $this->view->data = $this->_loadDataFromRow($row); } @@ -250,4 +254,16 @@ class Kwf_Rest_Controller_Model extends Zend_Rest_Controller protected function _beforeDelete(Kwf_Model_Row_Interface $row) { } + + protected function _afterUpdate(Kwf_Model_Row_Interface $row, $data) + { + } + + protected function _afterInsert(Kwf_Model_Row_Interface $row, $data) + { + } + + protected function _afterSave(Kwf_Model_Row_Interface $row, $data) + { + } }
Rest API: add afterUpdate/Insert/Save methods that can be overridden to implement custom logic
koala-framework_koala-framework
train
php
9302863ddeb5608cff2c4222cef8c8196f918b4f
diff --git a/maven-plugin/src/main/java/io/codearte/accurest/maven/GenerateTestsMojo.java b/maven-plugin/src/main/java/io/codearte/accurest/maven/GenerateTestsMojo.java index <HASH>..<HASH> 100644 --- a/maven-plugin/src/main/java/io/codearte/accurest/maven/GenerateTestsMojo.java +++ b/maven-plugin/src/main/java/io/codearte/accurest/maven/GenerateTestsMojo.java @@ -47,6 +47,9 @@ public class GenerateTestsMojo extends AbstractMojo { @Parameter private String ruleClassForTests; + @Parameter + private String nameSuffixForTests; + public void execute() throws MojoExecutionException, MojoFailureException { getLog().info("Generating server tests source code for Accurest contract verification"); @@ -58,6 +61,7 @@ public class GenerateTestsMojo extends AbstractMojo { config.setBasePackageForTests(basePackageForTests); config.setBaseClassForTests(baseClassForTests); config.setRuleClassForTests(ruleClassForTests); + config.setNameSuffixForTests(nameSuffixForTests); getLog().info(format("Using %s as test source directory", config.getGeneratedTestSourcesDir())); getLog().info(format("Using %s as base class for test classes", config.getBaseClassForTests()));
added nameSuffixForTests
spring-cloud_spring-cloud-contract
train
java
7f0d02b124065bc6f9cd298a5aec4370e675cb42
diff --git a/mixbox/namespaces.py b/mixbox/namespaces.py index <HASH>..<HASH> 100644 --- a/mixbox/namespaces.py +++ b/mixbox/namespaces.py @@ -9,10 +9,20 @@ import copy from mixbox.vendor import six -# A convenience class which represents simplified XML namespace info, consisting -# of exactly one namespace URI, and an optional prefix and schema location URI. -# This is handy for building up big tables of namespace data. -Namespace = collections.namedtuple("Namespace", "name prefix schema_location") +_NamespaceTuple = collections.namedtuple("Namespace", + "name prefix schema_location") + + +class Namespace(_NamespaceTuple): + """A convenience class which represents simplified XML namespace info, + consisting of exactly one namespace URI, and an optional prefix and schema + location URI. This is handy for building up big tables of namespace data. + """ + def __new__(cls, name, prefix, schema_location=None): + """This essentially enables parameter defaulting behavior on a + namedtuple. Here, schema location need not be given when creating a + Namespace, and it will default to None.""" + return super(Namespace, cls).__new__(cls, name, prefix, schema_location) class DuplicatePrefixError(Exception):
Redefined namespaces.Namespace to be a subclass of namedtuple, with a custom __new__ to allow the schema_location field to be defaulted (to None).
CybOXProject_mixbox
train
py
491a101761da206d8149ee1f58b223ec8d7bb01e
diff --git a/nani.py b/nani.py index <HASH>..<HASH> 100644 --- a/nani.py +++ b/nani.py @@ -527,7 +527,7 @@ class _IndirectCompositeArrayViewMixin(object): return self._data.__len__() def __contains__(self, item): - return self._data.__contains__(self, item) + return item in self._data _MIXIN_ATTRIBUTES[_IndirectCompositeArrayViewMixin] = (
Fix a call to the wrong 'contains' implementation
christophercrouzet_nani
train
py
fb86b3ad7bbb1ac5e1af448564637e78dfa8c2e0
diff --git a/pyvera/__init__.py b/pyvera/__init__.py index <HASH>..<HASH> 100755 --- a/pyvera/__init__.py +++ b/pyvera/__init__.py @@ -637,7 +637,10 @@ class VeraDimmer(VeraSwitch): ci = None sup = self.get_complex_value('SupportedColors') if sup is not None: - ci = [sup.split(',').index(c) for c in colors] + try: + ci = [sup.split(',').index(c) for c in colors] + except (TypeError, ValueError, IndexError): + pass return ci def get_color(self, refresh=False): @@ -652,8 +655,11 @@ class VeraDimmer(VeraSwitch): ci = self.get_color_index(['R', 'G', 'B'], refresh) cur = self.get_complex_value('CurrentColor') if ci is not None and cur is not None: - val = [cur.split(',')[c] for c in ci] - rgb = [int(v.split('=')[1]) for v in val] + try: + val = [cur.split(',')[c] for c in ci] + rgb = [int(v.split('=')[1]) for v in val] + except (TypeError, ValueError, IndexError): + pass return rgb def set_color(self, rgb):
Catch errors when trying to parse RGB colors
pavoni_pyvera
train
py
5745c886bed1c36e4255a81da5b1cef6c7c11d0b
diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/config.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/config.py index <HASH>..<HASH> 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/config.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/config.py @@ -1,6 +1,8 @@ # (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) +import difflib + import click import yaml @@ -123,6 +125,12 @@ def config(ctx, check, sync, verbose): else: files_failed[example_file_path] = True message = f'File `{example_file}` is not in sync, run "ddev validate config -s"' + if file_exists(example_file_path): + example_file = read_file(example_file_path) + for diff_line in difflib.context_diff( + example_file.splitlines(), contents.splitlines(), "current", "expected" + ): + message += f'\n{diff_line}' check_display_queue.append( lambda example_file=example_file, **kwargs: echo_failure(message, **kwargs) )
Print the diff when the example file isn't in sync with the spec (#<I>)
DataDog_integrations-core
train
py
8d98337ffef80a45375258f722d7493bf0eff167
diff --git a/linkcheck/configuration/__init__.py b/linkcheck/configuration/__init__.py index <HASH>..<HASH> 100644 --- a/linkcheck/configuration/__init__.py +++ b/linkcheck/configuration/__init__.py @@ -168,10 +168,14 @@ class Configuration (dict): logging.config.fileConfig(filename) if handler is None: handler = ansicolor.ColoredStreamHandler(strm=sys.stderr) - handler.setFormatter(logging.Formatter("%(levelname)s %(message)s")) logging.getLogger(LOG_ROOT).addHandler(handler) self.set_debug(debug) self.status_logger = status_logger + if self['threads'] > 0: + format = "%(levelname)s %(threadName)s %(message)s" + else: + format = "%(levelname)s %(message)s" + handler.setFormatter(logging.Formatter(format)) def set_debug (self, debug): """Set debugging levels for configured loggers. The argument
Add thread name to log output when threads are enabled.
wummel_linkchecker
train
py
f2dc2fc670d0e057f224361be24e24bd44bc7918
diff --git a/tests/test_fread_small.py b/tests/test_fread_small.py index <HASH>..<HASH> 100644 --- a/tests/test_fread_small.py +++ b/tests/test_fread_small.py @@ -54,3 +54,11 @@ def test_empty_strings(seed, repl): assert d1.topython() == src +def test_select_some_columns(): + # * Last field of last line contains separator + # * The file doesn't end with \n + # * Only subset of columns is requested + f = dt.fread(text='A,B,C\n1,2,"a,b"', columns={'A', 'B'}) + assert f.internal.check() + assert f.names == ("A", "B") + assert f.topython() == [[1], [2]]
Add a test for fread (#<I>)
h2oai_datatable
train
py
f80748ec313abe96d995fb73be297fa3e42914f3
diff --git a/packages/razzle-dev-utils/makeLoaderFinder.js b/packages/razzle-dev-utils/makeLoaderFinder.js index <HASH>..<HASH> 100644 --- a/packages/razzle-dev-utils/makeLoaderFinder.js +++ b/packages/razzle-dev-utils/makeLoaderFinder.js @@ -6,7 +6,7 @@ const makeLoaderFinder = loaderName => rule => { // Checks if there's a loader string in rule.loader matching loaderRegex. const inLoaderString = - typeof rule.loader === 'string' && rule.loader.match(loaderRegex); + typeof rule.loader === 'string' && (rule.loader.match(loaderRegex) || rule.loader === loaderName); // Checks if there is an object inside rule.use with loader matching loaderRegex, OR // Checks another condition, if rule is not an object, but pure string (ex: "style-loader", etc) @@ -15,8 +15,8 @@ const makeLoaderFinder = loaderName => rule => { rule.use.find( loader => (typeof loader.loader === 'string' && - loader.loader.match(loaderRegex)) || - (typeof loader === 'string' && loader.match(loaderRegex)) + (loader.loader.match(loaderRegex)) || rule.loader === loaderName) || + (typeof loader === 'string' && (loader.match(loaderRegex) || loader === loaderName)) ); return inUseArray || inLoaderString;
fix: allow getting string only loaders
jaredpalmer_razzle
train
js
3f520c03a4ae1fa4105d861ea50cb78bfe26b7ae
diff --git a/client-hc/src/test/java/com/graphhopper/api/GraphHopperMatrixIT.java b/client-hc/src/test/java/com/graphhopper/api/GraphHopperMatrixIT.java index <HASH>..<HASH> 100644 --- a/client-hc/src/test/java/com/graphhopper/api/GraphHopperMatrixIT.java +++ b/client-hc/src/test/java/com/graphhopper/api/GraphHopperMatrixIT.java @@ -59,7 +59,7 @@ public class GraphHopperMatrixIT { req.addOutArray("distances"); res = ghMatrix.route(req); - assertEquals(9970, res.getDistance(1, 2), 100); + assertEquals(9828, res.getDistance(1, 2), 100); assertEquals(1940, res.getWeight(1, 2), 20); }
Fix expected distance value in GraphHopperMatrixIT (once again)
graphhopper_graphhopper
train
java
d06298fcfdeee5b3939513443226f240b32857f2
diff --git a/lib/reference/keywordSets.js b/lib/reference/keywordSets.js index <HASH>..<HASH> 100644 --- a/lib/reference/keywordSets.js +++ b/lib/reference/keywordSets.js @@ -562,6 +562,8 @@ keywordSets.mediaFeatureNames = uniteSets( "grid", "height", "hover", + "inverted-colors", + "light-level", "max-aspect-ratio", "max-color", "max-color-index", @@ -581,6 +583,8 @@ keywordSets.mediaFeatureNames = uniteSets( "overflow-block", "overflow-inline", "pointer", + "prefers-reduced-motion", + "prefers-reduced-transparency", "resolution", "scan", "scripting",
Fix level 5 media queries in media-feature-name-no-unknown (#<I>)
stylelint_stylelint
train
js
0aed4a55cde4c83f3a49267fd5577681f79f344f
diff --git a/mod/workshop/view.php b/mod/workshop/view.php index <HASH>..<HASH> 100644 --- a/mod/workshop/view.php +++ b/mod/workshop/view.php @@ -391,6 +391,17 @@ case workshop::PHASE_CLOSED: print_collapsible_region_end(); } } + if (has_capability('mod/workshop:submit', $PAGE->context)) { + print_collapsible_region_start('', 'workshop-viewlet-ownsubmission', get_string('yoursubmission', 'workshop')); + echo $output->box_start('generalbox ownsubmission'); + if ($submission = $workshop->get_submission_by_author($USER->id)) { + echo $output->submission_summary($submission, true); + } else { + echo $output->container(get_string('noyoursubmission', 'workshop')); + } + echo $output->box_end(); + print_collapsible_region_end(); + } if (has_capability('mod/workshop:viewpublishedsubmissions', $workshop->context)) { if ($submissions = $workshop->get_published_submissions()) { print_collapsible_region_start('', 'workshop-viewlet-publicsubmissions', get_string('publishedsubmissions', 'workshop'));
Workshop: access to the own submission when the activity is closed
moodle_moodle
train
php
2f8513a0a469c54d1102ee513a198ecc7c07f604
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -37,6 +37,7 @@ module.exports = function(grunt) { options: { exclude: 'test_venv', with_xunit: true, + verbose: false, xunit_file: 'nosetests.xml', }, src: 'test/fixtures', diff --git a/tasks/nose.js b/tasks/nose.js index <HASH>..<HASH> 100644 --- a/tasks/nose.js +++ b/tasks/nose.js @@ -77,7 +77,8 @@ module.exports = function(grunt) { }); for (var prop in options){ - if (!options.hasOwnProperty(prop)){ + // If it's a flag that's set to false, skip + if (!options.hasOwnProperty(prop) || options[prop] === false){ continue; } @@ -87,8 +88,6 @@ module.exports = function(grunt) { } // If the property is not a flag, add the desired option value - // We count the option as a flag if the property === true - // Note: Specifying false as a value will not exclude the flag, omit the option entirely to do so if (options[prop] !== true){ // If the option value is a file path, make sure it's relative the the process cwd, since
Make sure we don't fail on flags set to false. Closes #1.
thusoy_grunt-nose
train
js,js
0acfb1f5553d1475bfc8f6078bc7b0e7bb2bec7c
diff --git a/tests/parser/ast_utils/test_ast_dict.py b/tests/parser/ast_utils/test_ast_dict.py index <HASH>..<HASH> 100644 --- a/tests/parser/ast_utils/test_ast_dict.py +++ b/tests/parser/ast_utils/test_ast_dict.py @@ -69,9 +69,7 @@ a: int128 "lineno": 2, "node_id": 2, "src": "1:1:0", - "type": "int128", }, - "type": "int128", "value": None, } diff --git a/vyper/compiler/output.py b/vyper/compiler/output.py index <HASH>..<HASH> 100644 --- a/vyper/compiler/output.py +++ b/vyper/compiler/output.py @@ -18,7 +18,7 @@ from vyper.warnings import ContractSizeLimitWarning def build_ast_dict(compiler_data: CompilerData) -> dict: ast_dict = { "contract_name": compiler_data.contract_name, - "ast": ast_to_dict(compiler_data.vyper_module_unfolded), + "ast": ast_to_dict(compiler_data.vyper_module), } return ast_dict
fix: AST output (#<I>) rollback changes to `-f ast` introduced in 3cbdf<I>bfd until `vyper_module_folded` is stable
ethereum_vyper
train
py,py
1dd3aa4bc78ff4cb9dd7ef19d078e9a1e56a243a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -27,9 +27,9 @@ setup( zip_safe=True, install_requires=[ 'setuptools', - 'six>=1.4', + 'six >= 1.4', 'lxml', - 'genshi', + 'genshi >= 0.7', 'pyjon.utils > 0.6', ], entry_points="""
Added requirement for Genshi >= <I>
faide_py3o.template
train
py
11e271535161b3a6b225d74390694236f6a7d9d9
diff --git a/js/src/responsive-nav.jquery.js b/js/src/responsive-nav.jquery.js index <HASH>..<HASH> 100755 --- a/js/src/responsive-nav.jquery.js +++ b/js/src/responsive-nav.jquery.js @@ -32,18 +32,28 @@ module.exports = (function($){ $wrapper = $( options.wrapperSelector ), $menuButton = $( options.menuButtonSelector ); - var closeNav = function() { - if( options.navType === 'dropdown' ){ - $this.slideUp(); - } - else{ - $wrapper.removeClass( options.menuOpenClass ); - } + function _closeNav() { $menuButton.removeClass( options.menuButtonActiveClass ); - menuOpen = false; + } + + function _closeDropdownNav() { + $this.slideUp(); + _closeNav(); + } + + function _closeOffCanvasNav() { + $wrapper.removeClass( options.menuOpenClass ); + _closeNav(); + } + + var closeNavStrategies = { + dropdown: _closeDropdownNav, + offCanvas: _closeOffCanvasNav, }; + var closeNav = closeNavStrategies[options.navType] || _closeOffCanvasNav; + var bodyClickFn = function(evt) { //if not nav container or a decendant of nav container if( !$this.is(evt.target) && $this.has(evt.target).length === 0 ) {
refactor: introduce closeNavStrategies abstraction
sitecrafting_groot
train
js
85c2994e70428f4957858d0c934496e40f3bbc09
diff --git a/lib/Github/HttpClient/HttpClient.php b/lib/Github/HttpClient/HttpClient.php index <HASH>..<HASH> 100644 --- a/lib/Github/HttpClient/HttpClient.php +++ b/lib/Github/HttpClient/HttpClient.php @@ -168,7 +168,7 @@ class HttpClient implements HttpClientInterface $request = $this->createRequest($httpMethod, $path); $request->addHeaders($headers); if (count($parameters) > 0) { - $request->setContent(json_encode($parameters)); + $request->setContent(json_encode($parameters, JSON_FORCE_OBJECT)); } $hasListeners = 0 < count($this->listeners);
Force object-form when encoding json for sending as POST body
KnpLabs_php-github-api
train
php
405eadf7a2901e05e0972fa47b6db3883b7e29bd
diff --git a/test/cacheable-request.js b/test/cacheable-request.js index <HASH>..<HASH> 100644 --- a/test/cacheable-request.js +++ b/test/cacheable-request.js @@ -66,6 +66,22 @@ test.cb('cacheableRequest emits response event for network responses', t => { }); }); +test.cb('cacheableRequest emits response event for cached responses', t => { + const cache = new Map(); + const opts = Object.assign(url.parse(s.url), { cache }); + cacheableRequest(request, opts, () => { + // This needs to happen in next tick so cache entry has time to be stored + setImmediate(() => { + cacheableRequest(request, opts) + .on('request', req => req.end()) + .on('response', response => { + t.true(response.fromCache); + t.end(); + }); + }); + }).on('request', req => req.end()); +}); + test.after('cleanup', async () => { await s.close(); });
Test cacheableRequest emits response event for cached responses
lukechilds_cacheable-request
train
js
4b7e5636105b74fcbf6292f2d83a0989f9cc014e
diff --git a/tests/junit/org/jgroups/tests/ReconciliationTest.java b/tests/junit/org/jgroups/tests/ReconciliationTest.java index <HASH>..<HASH> 100644 --- a/tests/junit/org/jgroups/tests/ReconciliationTest.java +++ b/tests/junit/org/jgroups/tests/ReconciliationTest.java @@ -19,7 +19,7 @@ import java.util.Map; * configured to use FLUSH * * @author Bela Ban - * @version $Id: ReconciliationTest.java,v 1.15 2008/06/09 12:54:13 belaban Exp $ + * @version $Id: ReconciliationTest.java,v 1.16 2008/06/25 19:58:23 vlada Exp $ */ @Test(groups=Global.FLUSH,sequential=true) public class ReconciliationTest extends ChannelTestBase { @@ -58,7 +58,7 @@ public class ReconciliationTest extends ChannelTestBase { log.info("Joining D, this will trigger FLUSH and a subsequent view change to {A,B,C,D}"); JChannel newChannel; try { - newChannel=createChannel(); + newChannel=createChannel(channels.get(0)); newChannel.connect("x"); channels.add(newChannel); }
fix hanging flush-udp test
belaban_JGroups
train
java
0db8197486a8d9cd2d4a5589776fa671efdefaf9
diff --git a/src/headful.js b/src/headful.js index <HASH>..<HASH> 100644 --- a/src/headful.js +++ b/src/headful.js @@ -47,6 +47,9 @@ headful.props = propertySetters; * Tests whether the given `props` object contains a property with the name of `propNameOrFunction`. */ function noProp(props, propNameOrFunction) { + if (!props) { + throw new Error('Headful: You must pass all declared props when you use headful.props.x() calls.'); + } const propName = typeof propNameOrFunction === 'function' ? propNameOrFunction.name : propNameOrFunction; return !props.hasOwnProperty(propName); }
Throw error when noProp() is being called without props argument
troxler_headful
train
js
6895b223a9c302abe12441556084fed83bffac6e
diff --git a/SingularityService/src/main/java/com/hubspot/singularity/scheduler/SingularityScheduler.java b/SingularityService/src/main/java/com/hubspot/singularity/scheduler/SingularityScheduler.java index <HASH>..<HASH> 100644 --- a/SingularityService/src/main/java/com/hubspot/singularity/scheduler/SingularityScheduler.java +++ b/SingularityService/src/main/java/com/hubspot/singularity/scheduler/SingularityScheduler.java @@ -226,6 +226,7 @@ public class SingularityScheduler { if (!isRequestActive(maybeRequest)) { LOG.debug("Pending request {} was obsolete (request {})", pendingRequest, SingularityRequestWithState.getRequestState(maybeRequest)); obsoleteRequests++; + requestManager.deletePendingRequest(pendingRequest); continue; } @@ -234,6 +235,7 @@ public class SingularityScheduler { if (!shouldScheduleTasks(maybeRequest.get().getRequest(), pendingRequest, maybePendingDeploy, maybeRequestDeployState)) { LOG.debug("Pending request {} was obsolete (request {})", pendingRequest, SingularityRequestWithState.getRequestState(maybeRequest)); obsoleteRequests++; + requestManager.deletePendingRequest(pendingRequest); continue; }
make sure to remove obsolete pending requests
HubSpot_Singularity
train
java
8ea67520ec130d1775499e08360cd8df1200519e
diff --git a/xchange-yobit/src/main/java/org/knowm/xchange/yobit/YoBitAdapters.java b/xchange-yobit/src/main/java/org/knowm/xchange/yobit/YoBitAdapters.java index <HASH>..<HASH> 100644 --- a/xchange-yobit/src/main/java/org/knowm/xchange/yobit/YoBitAdapters.java +++ b/xchange-yobit/src/main/java/org/knowm/xchange/yobit/YoBitAdapters.java @@ -107,7 +107,7 @@ public class YoBitAdapters { BigDecimal ask = ticker.getSell(); BigDecimal high = ticker.getHigh(); BigDecimal low = ticker.getLow(); - BigDecimal volume = ticker.getVol(); + BigDecimal volume = ticker.getVolCur(); Date timestamp = new Date(ticker.getUpdated() * 1000L); return new Ticker.Builder().currencyPair(currencyPair).last(last).bid(bid).ask(ask).high(high).low(low)
[#hotfix] Yobit volume should be in the base currency
knowm_XChange
train
java
4f7ad8a6e5723ffcf94a2d6021823ca5b9b96ce4
diff --git a/logger/drain/drain.go b/logger/drain/drain.go index <HASH>..<HASH> 100644 --- a/logger/drain/drain.go +++ b/logger/drain/drain.go @@ -26,7 +26,7 @@ func SendToDrain(m string, drain string) error { func sendToSyslogDrain(m string, drain string) error { conn, err := net.Dial("udp", drain) if err != nil { - log.Fatal(err) + log.Print(err) } defer conn.Close() fmt.Fprintf(conn, m)
fix(logger): reduce severity of log failure Sending a log to an external server should not kill the logger on an error. For example, if the host is down or unavailable, the logger should just log that the error message has been lost, but carry on.
deis_deis
train
go
20568c319937208dd2a05e0d8211a8af7c2f3430
diff --git a/structr-ui/src/main/java/org/structr/web/importer/Importer.java b/structr-ui/src/main/java/org/structr/web/importer/Importer.java index <HASH>..<HASH> 100644 --- a/structr-ui/src/main/java/org/structr/web/importer/Importer.java +++ b/structr-ui/src/main/java/org/structr/web/importer/Importer.java @@ -306,7 +306,8 @@ public class Importer { return createChildNodes(body, null, page); } - return null; + // fallback, no head no body => document is parent + return createChildNodes(parsedDocument, null, page); } public DOMNode createChildNodes(final DOMNode parent, final Page page) throws FrameworkException {
Fixes import of shared components when using the non-cleaning XML parser instead of the HTML parser for deployment imports.
structr_structr
train
java
6e6ae7dd96cda4756eb3f48d118ba8142da49262
diff --git a/Octo/System/Store/SearchIndexStore.php b/Octo/System/Store/SearchIndexStore.php index <HASH>..<HASH> 100644 --- a/Octo/System/Store/SearchIndexStore.php +++ b/Octo/System/Store/SearchIndexStore.php @@ -40,7 +40,9 @@ class SearchIndexStore extends Octo\Store foreach ($res as $item) { $store = StoreFactory::get($item['model']); - $rtn[] = $store->getByPrimaryKey($item['content_id']); + if($store) { + $rtn[] = $store->getByPrimaryKey($item['content_id']); + } } }
Prevented search attempting to load stores that have been removed
Block8_Octo
train
php
ceaf684801ae0bfafb1ef75bba5cdddfbdb6c4f5
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java index <HASH>..<HASH> 100644 --- a/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java +++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java @@ -243,17 +243,17 @@ public class StructureImpl implements Structure, Serializable { /** {@inheritDoc} */ @Override - public Chain findChain(String chainId, int modelnr) throws StructureException { + public Chain findChain(String asymId, int modelnr) throws StructureException { List<Chain> chains = getChains(modelnr); // iterate over all chains. for (Chain c : chains) { - if (c.getName().equals(chainId)) { + if (c.getName().equals(asymId)) { return c; } } - throw new StructureException("Could not find chain \"" + chainId + "\" for PDB id " + pdb_id); + throw new StructureException("Could not find chain by asymId \"" + asymId + "\" for PDB id " + pdb_id); }
renaming variable name to be more clear
biojava_biojava
train
java
2300b357319ccf3c27029ef90da7eb7f9ff792ba
diff --git a/checkpoints.go b/checkpoints.go index <HASH>..<HASH> 100644 --- a/checkpoints.go +++ b/checkpoints.go @@ -57,6 +57,7 @@ var checkpointDataMainNet = checkpointData{ {216116, newShaHashFromStr("00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e")}, {225430, newShaHashFromStr("00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932")}, {250000, newShaHashFromStr("000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214")}, + {267300, newShaHashFromStr("000000000000000a83fbd660e918f218bf37edd92b748ad940483c7c116179ac")}, }, checkpointsByHeight: nil, // Automatically generated in init. }
Add checkpoint at block height <I>.
btcsuite_btcd
train
go
5111fd52f2eade90f52c26d7b7b87b7882ac26c5
diff --git a/server/src/main/java/io/druid/initialization/Log4jShutterDownerModule.java b/server/src/main/java/io/druid/initialization/Log4jShutterDownerModule.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/io/druid/initialization/Log4jShutterDownerModule.java +++ b/server/src/main/java/io/druid/initialization/Log4jShutterDownerModule.java @@ -45,8 +45,15 @@ public class Log4jShutterDownerModule implements Module // This makes the shutdown run pretty darn near last. try { + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + if(loader == null) { + loader = getClass().getClassLoader(); + } // Reflection to try and allow non Log4j2 stuff to run. This acts as a gateway to stop errors in the next few lines - final Class<?> logManagerClazz = Class.forName("org.apache.logging.log4j.LogManager"); + // In log4j api + final Class<?> logManagerClazz = Class.forName("org.apache.logging.log4j.LogManager", false, loader); + // In log4j core + final Class<?> callbackRegistryClazz = Class.forName("org.apache.logging.log4j.core.util.ShutdownCallbackRegistry", false, loader); final LoggerContextFactory contextFactory = LogManager.getFactory(); if (!(contextFactory instanceof Log4jContextFactory)) {
Add check for log4j-core in Log4jShutterDownerModule
apache_incubator-druid
train
java
c6f965795b5846d2152814a08e63e348409bf640
diff --git a/spatialist/__init__.py b/spatialist/__init__.py index <HASH>..<HASH> 100644 --- a/spatialist/__init__.py +++ b/spatialist/__init__.py @@ -9,4 +9,9 @@ from .vector import Vector, bbox, centerdist, intersect from .raster import Raster, stack, rasterize from .sqlite_util import sqlite_setup, sqlite3 -__version__ = '0.2.9' +from pkg_resources import get_distribution, DistributionNotFound +try: + __version__ = get_distribution(__name__).version +except DistributionNotFound: + # package is not installed + pass
[__init__] read version via pkg_resources
johntruckenbrodt_spatialist
train
py
ebd1779a6fb2d58fa64088682d2cb956512f14f6
diff --git a/mopidy_spotify/translator.py b/mopidy_spotify/translator.py index <HASH>..<HASH> 100644 --- a/mopidy_spotify/translator.py +++ b/mopidy_spotify/translator.py @@ -32,6 +32,9 @@ def to_playlist(sp_playlist, folders=None, username=None): return name = sp_playlist.name + if name is None: + name = 'Starred' + # TODO Reverse order of tracks in starred playlists? if folders is not None: name = '/'.join(folders + [name]) if username is not None and sp_playlist.owner.canonical_name != username: diff --git a/tests/test_translator.py b/tests/test_translator.py index <HASH>..<HASH> 100644 --- a/tests/test_translator.py +++ b/tests/test_translator.py @@ -63,6 +63,14 @@ def test_to_playlist(sp_track_mock, sp_playlist_mock): assert playlist.last_modified is None +def test_to_playlist_adds_name_for_starred_playlists(sp_playlist_mock): + sp_playlist_mock.name = None + + playlist = translator.to_playlist(sp_playlist_mock) + + assert playlist.name == 'Starred' + + def test_to_playlist_filters_out_none_tracks(sp_track_mock, sp_playlist_mock): sp_track_mock.is_loaded = False playlist = translator.to_playlist(sp_playlist_mock)
Give a name to starred playlists
mopidy_mopidy-spotify
train
py,py
ab00a69ee0d5c556af118d9cf76b5b9a0db25e6d
diff --git a/telemetry/telemetry/page/page_test_results.py b/telemetry/telemetry/page/page_test_results.py index <HASH>..<HASH> 100644 --- a/telemetry/telemetry/page/page_test_results.py +++ b/telemetry/telemetry/page/page_test_results.py @@ -9,6 +9,7 @@ class PageTestResults(unittest.TestResult): def __init__(self): super(PageTestResults, self).__init__() self.successes = [] + self.skipped = [] def addError(self, test, err): if isinstance(test, unittest.TestCase): @@ -23,7 +24,10 @@ class PageTestResults(unittest.TestResult): self.failures.append((test, ''.join(traceback.format_exception(*err)))) def addSuccess(self, test): - self.successes += test + self.successes.append(test) + + def addSkip(self, test, reason): # Python 2.7 has this in unittest.TestResult + self.skipped.append((test, reason)) def AddError(self, page, err): self.addError(page.url, err)
[telemetry] Add skipped and addSkip() to PageTestResults, for Python < <I>. Fixing bots after <URL>. successes is only used by record_wpr, so that mistake had no effect on the bots. TBR=<EMAIL> BUG=None. TEST=None. Review URL: <URL>
catapult-project_catapult
train
py
428728b480dba27275998b6945f2ac6225352d17
diff --git a/simuvex/storage/paged_memory.py b/simuvex/storage/paged_memory.py index <HASH>..<HASH> 100644 --- a/simuvex/storage/paged_memory.py +++ b/simuvex/storage/paged_memory.py @@ -117,7 +117,7 @@ class Page(object): self._storage[end] = last_mo else: # we need to find all the gaps, and fill them in - next_addr = start if floor_value is None else floor_value.last_addr + 1 + next_addr = start if floor_value is None or not floor_value.includes(start) else floor_value.last_addr + 1 while next_addr < end: try: next_mo = self._storage.ceiling_item(next_addr)[1]
only fill in holes when it makes sense
angr_angr
train
py
066a02848588caaaae7fe431c051c07567d5c230
diff --git a/graylog2-web-interface/src/views/stores/SearchStore.js b/graylog2-web-interface/src/views/stores/SearchStore.js index <HASH>..<HASH> 100644 --- a/graylog2-web-interface/src/views/stores/SearchStore.js +++ b/graylog2-web-interface/src/views/stores/SearchStore.js @@ -111,7 +111,7 @@ export const SearchStore = singletonStore( }, execute(executionState: SearchExecutionState): Promise<SearchExecutionResult> { - if (this.executePromise) { + if (this.executePromise && this.executePromise.cancel) { this.executePromise.cancel(); } if (this.search) {
Actually check if we can cancel the promise before.
Graylog2_graylog2-server
train
js
11bdb683d5720484475881f68009fca7441929c5
diff --git a/contribs/gmf/src/directives/filterselector.js b/contribs/gmf/src/directives/filterselector.js index <HASH>..<HASH> 100644 --- a/contribs/gmf/src/directives/filterselector.js +++ b/contribs/gmf/src/directives/filterselector.js @@ -1,4 +1,3 @@ -goog.provide('gmf.FilterselectorController'); goog.provide('gmf.filterselectorComponent'); goog.require('gmf'); @@ -14,6 +13,7 @@ gmf.FilterselectorController = class { * @param {gmfx.User} gmfUser User. * @param {ngeo.DataSources} ngeoDataSources Ngeo collection of data sources * objects. + * @private * @ngInject * @ngdoc controller * @ngname GmfFilterselectorController
Filter - Remove filterselector controller's goog.require
camptocamp_ngeo
train
js
66a287b06da53fa2479c5fe26bd75cf532817861
diff --git a/core/src/main/java/io/undertow/Undertow.java b/core/src/main/java/io/undertow/Undertow.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/undertow/Undertow.java +++ b/core/src/main/java/io/undertow/Undertow.java @@ -263,7 +263,12 @@ public final class Undertow { * Only shutdown the worker if it was created during start() */ if (internalWorker && worker != null) { - worker.shutdownNow(); + worker.shutdown(); + try { + worker.awaitTermination(); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } worker = null; } xnio = null;
UNDERTOW-<I> Undertow does not shut down immediately on calling .stop()
undertow-io_undertow
train
java
0fcecad1450a0e2526e9fc32b452a63bc5b414b2
diff --git a/data/node.js b/data/node.js index <HASH>..<HASH> 100644 --- a/data/node.js +++ b/data/node.js @@ -24,6 +24,8 @@ function Node( properties ) { this.properties = _.extend({}, this.getDefaultProperties(), properties); this.properties.type = this.constructor.static.name; this.properties.id = this.properties.id || uuid(this.properties.type); + + this.didInitialize(); } Node.Prototype = function() { @@ -38,6 +40,8 @@ Node.Prototype = function() { id: 'string' }; + this.didInitialize = function() {}; + /** * Serialize to JSON. *
Added a didInitialize hook for Nodes.
substance_substance
train
js
34ee258687facf71c638de016de70822660eb939
diff --git a/SwatDB/SwatDBDataObject.php b/SwatDB/SwatDBDataObject.php index <HASH>..<HASH> 100644 --- a/SwatDB/SwatDBDataObject.php +++ b/SwatDB/SwatDBDataObject.php @@ -53,6 +53,7 @@ class SwatDBDataObject extends SwatObject implements Serializable protected $id_field = null; // }}} + // {{{ public function __construct() /** @@ -611,7 +612,7 @@ class SwatDBDataObject extends SwatObject implements Serializable // }}} - // serializing + // serialization // {{{ public function serialize() public function serialize() @@ -655,19 +656,19 @@ class SwatDBDataObject extends SwatObject implements Serializable } // }}} - // {{{ protected function getSerializableSubDataObjects() + // {{{ public function __wakeup() - protected function getSerializableSubDataObjects() + public function __wakeup() { - return array(); + // here for subclasses } // }}} - // {{{ public function __wakeup() + // {{{ protected function getSerializableSubDataObjects() - public function __wakeup() + protected function getSerializableSubDataObjects() { - // here for subclasses + return array(); } // }}}
- serializing/serialization - public before protected svn commit r<I>
silverorange_swat
train
php
ba152bc4b98a4478dc5064017b884bad618ed0f5
diff --git a/src/FacebookServiceProvider.php b/src/FacebookServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/FacebookServiceProvider.php +++ b/src/FacebookServiceProvider.php @@ -43,7 +43,7 @@ class FacebookServiceProvider extends ServiceProvider { $source = realpath(__DIR__.'/../config/facebook.php'); - if (class_exists('Illuminate\Foundation\Application', false)) { + if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) { $this->publishes([$source => config_path('facebook.php')]); } elseif (class_exists('Laravel\Lumen\Application', false)) { $app->configure('facebook');
Added extra check before registering publish command
vinkla_laravel-facebook
train
php
d8d009d9eca12d9efa6a701e154cab8c462106ff
diff --git a/test/test.load.js b/test/test.load.js index <HASH>..<HASH> 100644 --- a/test/test.load.js +++ b/test/test.load.js @@ -37,7 +37,7 @@ describe(".load([callback])", function () { // blow away the stack trace. Hack for Mocha: // https://github.com/visionmedia/mocha/issues/502 - beforeEach(function(done){ + beforeEach(function (done) { setTimeout(done, 0); }); @@ -113,7 +113,7 @@ describe(".load([callback])", function () { expect(previewer.body.scrollTop).to.be.greaterThan(0); previewer.body.scrollTop = 0; - anchor.href = window.location.hostname+'#test'; + anchor.href = window.location.hostname + '#test'; // Again, this is for IE anchor.hostname = originalHostname anchor.click();
trivial - fixing linting errors in loading test
OscarGodson_EpicEditor
train
js
6e9ca2a53d44a84ddff12c55afa8e8aca7cdc490
diff --git a/lib/appsignal/cli/install.rb b/lib/appsignal/cli/install.rb index <HASH>..<HASH> 100644 --- a/lib/appsignal/cli/install.rb +++ b/lib/appsignal/cli/install.rb @@ -85,7 +85,7 @@ module Appsignal puts 'Installing for Sinatra' config[:name] = required_input(' Enter application name: ') puts - configure(config, ['production', 'staging'], true) + configure(config, ['development', 'production', 'staging'], true) puts "Finish Sinatra configuration" puts " Sinatra requires some manual configuration." @@ -107,7 +107,7 @@ module Appsignal config[:name] = required_input(' Enter application name: ') puts - configure(config, ['production', 'staging'], true) + configure(config, ['development', 'production', 'staging'], true) puts "Finish Padrino installation" puts " Padrino requires some manual configuration." @@ -127,7 +127,7 @@ module Appsignal config[:name] = required_input(' Enter application name: ') puts - configure(config, ['production', 'staging'], true) + configure(config, ['development', 'production', 'staging'], true) puts "Manual Grape configuration needed" puts " See the installation instructions here:"
Add development to environments for yml file This makes this onboarding easier for people testing their first requests in development mode. It also follows the Rails defaults.
appsignal_appsignal-ruby
train
rb
4cd6347d29bc0f57f75a828a1668e98326f1f52b
diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py index <HASH>..<HASH> 100644 --- a/spyder/app/tests/test_mainwindow.py +++ b/spyder/app/tests/test_mainwindow.py @@ -212,7 +212,7 @@ def test_run_cython_code(main_window, qtbot): @flaky(max_runs=3) -@pytest.mark.skipif(os.name == 'nt' or PYQT_WHEEL, +@pytest.mark.skipif(True, #os.name == 'nt' or PYQT_WHEEL, reason="It times out sometimes on Windows and using PyQt wheels") def test_open_notebooks_from_project_explorer(main_window, qtbot): """Test that notebooks are open from the Project explorer."""
Testing: Skip test_open_notebooks_from_project_explorer because it's timing out
spyder-ide_spyder
train
py
9459dc05d927ac11a76497861132b9c2db923ddd
diff --git a/dist/zect.js b/dist/zect.js index <HASH>..<HASH> 100644 --- a/dist/zect.js +++ b/dist/zect.js @@ -1,5 +1,5 @@ /** -* Zect v1.0.4 +* Zect v1.0.5 * (c) 2015 guankaishe * Released under the MIT License. */ diff --git a/dist/zect.min.js b/dist/zect.min.js index <HASH>..<HASH> 100644 --- a/dist/zect.min.js +++ b/dist/zect.min.js @@ -1,5 +1,5 @@ /** -* Zect v1.0.4 +* Zect v1.0.5 * (c) 2015 guankaishe * Released under the MIT License. */ diff --git a/package.json b/package.json index <HASH>..<HASH> 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zect", - "version": "1.0.4", + "version": "1.0.5", "description": "A lightweight Web components and MVVM framework.", "main": "index.js", "scripts": {
version is corrected to <I>
switer_Zect
train
js,js,json
e54802c335c4c81cdb0891fe4d275fc81550a3c4
diff --git a/src/core/Engine.js b/src/core/Engine.js index <HASH>..<HASH> 100644 --- a/src/core/Engine.js +++ b/src/core/Engine.js @@ -286,6 +286,9 @@ var Engine = {}; * @param {vector} gravity */ var _bodiesApplyGravity = function(bodies, gravity) { + if (gravity.x === 0 && gravity.y === 0) { + return; + } for (var i = 0; i < bodies.length; i++) { var body = bodies[i];
don't calculate gravity force if there is no actual gravity
liabru_matter-js
train
js
667e4eaf7a0976e0a904533c21c2b98897a1890c
diff --git a/allaccess/models.py b/allaccess/models.py index <HASH>..<HASH> 100644 --- a/allaccess/models.py +++ b/allaccess/models.py @@ -22,10 +22,10 @@ class Provider(models.Model): "Configuration for OAuth provider." name = models.CharField(max_length=50, unique=True) - request_token_url = models.URLField(blank=True) - authorization_url = models.URLField() - access_token_url = models.URLField() - profile_url = models.URLField() + request_token_url = models.CharField(blank=True, max_length=255) + authorization_url = models.CharField(max_length=255) + access_token_url = models.CharField(max_length=255) + profile_url = models.CharField(max_length=255) consumer_key = EncryptedField(blank=True, null=True, default=None) consumer_secret = EncryptedField(blank=True, null=True, default=None)
Changed Provider model to accept Microsoft Live urls
mlavin_django-all-access
train
py
967700105470c4a413ee00068301a0be05c02cbe
diff --git a/visidata/path.py b/visidata/path.py index <HASH>..<HASH> 100644 --- a/visidata/path.py +++ b/visidata/path.py @@ -20,6 +20,8 @@ def vstat(path, force=False): def filesize(path): if hasattr(path, 'filesize') and path.filesize is not None: return path.filesize + if path.is_url(): + return 0 st = path.stat() # vstat(path) return st and st.st_size
[path-] filesize of url is 0
saulpw_visidata
train
py
df0a2ef24d7d0179bdb253af7ea2395b123bd036
diff --git a/voltdb/tests/conftest.py b/voltdb/tests/conftest.py index <HASH>..<HASH> 100644 --- a/voltdb/tests/conftest.py +++ b/voltdb/tests/conftest.py @@ -46,7 +46,7 @@ def dd_environment(instance): else: e2e_metadata = {} - with docker_run(compose_file, conditions=conditions, env_vars=env_vars, mount_logs=True): + with docker_run(compose_file, conditions=conditions, env_vars=env_vars, mount_logs=True, attempts=2): yield instance, e2e_metadata
Add attempts to voltdb environment (#<I>)
DataDog_integrations-core
train
py
2f2cbe691ce4af8c1d1676c1c49fd4703c6965d9
diff --git a/lib/Teepee.js b/lib/Teepee.js index <HASH>..<HASH> 100644 --- a/lib/Teepee.js +++ b/lib/Teepee.js @@ -485,12 +485,11 @@ Teepee.prototype.request = function (options, cb) { currentRequest.end(body); } - var requestTimeoutId; if (typeof timeout === 'number') { currentRequest.setTimeout(timeout); - requestTimeoutId = setTimeout(function () { + currentRequest.on('timeout', function () { handleRequestError(new socketErrors.ETIMEDOUT()); - }, timeout); + }); } function retryUponError(err) { @@ -502,9 +501,6 @@ Teepee.prototype.request = function (options, cb) { } function handleRequestError(err) { - if (requestTimeoutId) { - clearTimeout(requestTimeoutId); - } currentRequest = null; if (eventEmitter.done) { return; @@ -520,10 +516,6 @@ Teepee.prototype.request = function (options, cb) { } currentRequest.on('error', handleRequestError).on('response', function (response) { - if (requestTimeoutId) { - clearTimeout(requestTimeoutId); - } - currentResponse = response; var hasEnded = false, responseError;
Timeout handling: Rely exclusively on the request object emitting a 'timeout' event, and don't use window.setTimeout.
One-com_teepee
train
js
5ea85620adb6dd4fb3390f3f479292fb4feea285
diff --git a/google-cloud-storage/samples/storage_create_bucket_turbo_replication.rb b/google-cloud-storage/samples/storage_create_bucket_turbo_replication.rb index <HASH>..<HASH> 100644 --- a/google-cloud-storage/samples/storage_create_bucket_turbo_replication.rb +++ b/google-cloud-storage/samples/storage_create_bucket_turbo_replication.rb @@ -21,10 +21,11 @@ def create_bucket_turbo_replication bucket_name: storage = Google::Cloud::Storage.new bucket = storage.create_bucket bucket_name, - location: "ASIA", + location: "ASIA1", rpo: "ASYNC_TURBO" - puts "Created bucket #{bucket.name} in #{bucket.location} with turbo replication set to #{bucket.rpo}." + puts "Created bucket #{bucket.name} in #{bucket.location} with " + + "the recovery point objective (RPO) set to #{bucket.rpo}." end # [END storage_create_bucket_turbo_replication]
sample(google-cloud-storage): Update storage_create_bucket_turbo_replication.rb (#<I>)
googleapis_google-cloud-ruby
train
rb
5621be3a18d108185637d2e5e94d52cd19e4adee
diff --git a/source/application/controllers/admin/vendor_main.php b/source/application/controllers/admin/vendor_main.php index <HASH>..<HASH> 100644 --- a/source/application/controllers/admin/vendor_main.php +++ b/source/application/controllers/admin/vendor_main.php @@ -139,9 +139,9 @@ class Vendor_Main extends oxAdminDetails $oVendor = oxNew("oxvendor"); - if ($soxId != "-1") + if ($soxId != "-1") { $oVendor->loadInLang($this->_iEditLang, $soxId); - else { + } else { $aParams['oxvendor__oxid'] = null; }
Fix checkstyle warnings of "Type NotAllowed" - Inline control structures are not allowed
OXID-eSales_oxideshop_ce
train
php
b88a683e19ffc83667050648ba8218337d3146d4
diff --git a/src/js/components/forms/inputs/SimpleInput.js b/src/js/components/forms/inputs/SimpleInput.js index <HASH>..<HASH> 100644 --- a/src/js/components/forms/inputs/SimpleInput.js +++ b/src/js/components/forms/inputs/SimpleInput.js @@ -266,19 +266,13 @@ class SimpleInput extends InputBase { } case displayTypes.react: return React.createElement(propDesc.$component, { - storeName: this.props.storeName, - storeDesc: this.props.storeDesc, + ...this.props, disabled, onChange: this.handleValueChange, onBlur: this.handleBlur, onFocus: this.handleFocus, value, - item, - performAction: this.props.performAction, propDesc, - user, - baseItem, - combinedBaseItem, }); case displayTypes.autocomplete: return (
SimpleInput redirect props from react displayType
getblank_blank-web-app
train
js
feac6eb118f13870c873f05d29132051fd7064bc
diff --git a/test/playback.spec.js b/test/playback.spec.js index <HASH>..<HASH> 100644 --- a/test/playback.spec.js +++ b/test/playback.spec.js @@ -88,6 +88,10 @@ describe('Sono playback', function() { }); }); + // Firefox 35 and less has a bug where audio param ramping does not change the readable value in the param itself + // Fading still audibly affects the sound, but the value is untouched + if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { return; } + describe('fade master', function() { beforeEach(function(done) { setTimeout(function() {
exclude firefox from fade tests for now
Stinkstudios_sono
train
js
179e7d02a23ed426f746d88477bb3d35766b17d3
diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/HiveClient.java b/presto-hive/src/main/java/com/facebook/presto/hive/HiveClient.java index <HASH>..<HASH> 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/HiveClient.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/HiveClient.java @@ -281,6 +281,9 @@ public class HiveClient { try { Table table = metastore.getTable(tableName.getSchemaName(), tableName.getTableName()); + if (table.getTableType().equals(TableType.VIRTUAL_VIEW.name())) { + throw new TableNotFoundException(tableName); + } List<ColumnMetadata> columns = ImmutableList.copyOf(transform(getColumnHandles(table, false), columnMetadataGetter())); return new ConnectorTableMetadata(tableName, columns, table.getOwner()); }
Fix listing columns from Presto views in Hive
prestodb_presto
train
java
b9a7dbfd1b2e361e1d77a1d015b99dbb7832ef9a
diff --git a/lib/active_scaffold/helpers/action_link_helpers.rb b/lib/active_scaffold/helpers/action_link_helpers.rb index <HASH>..<HASH> 100644 --- a/lib/active_scaffold/helpers/action_link_helpers.rb +++ b/lib/active_scaffold/helpers/action_link_helpers.rb @@ -124,7 +124,7 @@ module ActiveScaffold link.crud_type = :read end - unless column_link_authorized?(link, link.column, record, associated) + unless column_link_authorized?(link, link.column, record, associated)[0] link.action = nil # if action is edit and is not authorized, fallback to show if it's enabled if link.crud_type == :update && actions.include?(:show)
fix checking permission of singular association columns, column_link_authorized? return array of authorized and reason
activescaffold_active_scaffold
train
rb
13b6530e82a7cd941283851e7012102b2adbd02b
diff --git a/packages/babel-plugin-minify-dead-code-elimination/src/index.js b/packages/babel-plugin-minify-dead-code-elimination/src/index.js index <HASH>..<HASH> 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/src/index.js +++ b/packages/babel-plugin-minify-dead-code-elimination/src/index.js @@ -699,6 +699,9 @@ module.exports = ({ types: t, traverse }) => { keepFnArgs = false, } = {} } = {}) { + traverse.clearCache(); + path.scope.crawl(); + // We need to run this plugin in isolation. path.traverse(main, { functionToBindings: new Map(),
Fix dce - recompute path & scope before pass
babel_minify
train
js
62847115457dfd5a70f9d02211396ea583ef58d0
diff --git a/src/OpenTok/Util/Validators.php b/src/OpenTok/Util/Validators.php index <HASH>..<HASH> 100644 --- a/src/OpenTok/Util/Validators.php +++ b/src/OpenTok/Util/Validators.php @@ -146,7 +146,7 @@ class Validators } public static function validateArchiveData($archiveData) { - if (!self::$schemaUri) { self::$schemaUri = realpath(__DIR__.'/archive-schema.json'); } + if (!self::$schemaUri) { self::$schemaUri = __DIR__.'/archive-schema.json'; } $document = new Document(); // have to do a encode+decode so that json objects decoded as arrays from Guzzle // are re-encoded as objects instead @@ -162,7 +162,7 @@ class Validators } public static function validateArchiveListData($archiveListData) { - if (!self::$schemaUri) { self::$schemaUri = realpath(__DIR__.'/archive-schema.json'); } + if (!self::$schemaUri) { self::$schemaUri = __DIR__.'/archive-schema.json'; } $document = new Document(); // have to do a encode+decode so that json objects decoded as arrays from Guzzle // are re-encoded as objects instead
Proposed fix for issue #<I>
opentok_OpenTok-PHP-SDK
train
php
032e98a8d3f3e4ac0995af4000217ec89b260327
diff --git a/twstock/__init__.py b/twstock/__init__.py index <HASH>..<HASH> 100644 --- a/twstock/__init__.py +++ b/twstock/__init__.py @@ -11,4 +11,4 @@ from twstock.codes import twse, tpex, codes from twstock.stock import Stock -__version__ = '0.1.2-dev' +__version__ = '0.1.3-dev'
Bump up the version to <I>-dev
mlouielu_twstock
train
py
8822aeb6e8ad8bba5d235efdcf44cf9eeba23ac8
diff --git a/core/src/test/java/io/cucumber/core/runner/TestHelper.java b/core/src/test/java/io/cucumber/core/runner/TestHelper.java index <HASH>..<HASH> 100644 --- a/core/src/test/java/io/cucumber/core/runner/TestHelper.java +++ b/core/src/test/java/io/cucumber/core/runner/TestHelper.java @@ -77,6 +77,7 @@ public class TestHelper { private TestHelper() { } + @Deprecated public static Builder builder() { return new Builder(); }
[Core] Deprecate TestHelper The `TestHelper` is an overly complex way to run tests. Building a runtime and stubbing the step definitions provides a much simpler and more reliable way to test Cucumbers execution. See the `JUnitFormatterTest` for implementation examples.
cucumber_cucumber-jvm
train
java
e4397dea05b8ca218886051cd7f6188cd692e1ac
diff --git a/src/core/services/theming/theming.js b/src/core/services/theming/theming.js index <HASH>..<HASH> 100644 --- a/src/core/services/theming/theming.js +++ b/src/core/services/theming/theming.js @@ -45,7 +45,7 @@ var LIGHT_FOREGROUND = { name: 'light', '1': 'rgba(255,255,255,1.0)', '2': 'rgba(255,255,255,0.7)', - '3': 'rgba(255,255,255,0.3)', + '3': 'rgba(255,255,255,0.35)', '4': 'rgba(255,255,255,0.12)' };
style(): raise opacity of foreground-3 by 5%
angular_material
train
js
464f83ca41118a673196b8a00b8231670102c5d0
diff --git a/lib/util/fileHelpers.js b/lib/util/fileHelpers.js index <HASH>..<HASH> 100644 --- a/lib/util/fileHelpers.js +++ b/lib/util/fileHelpers.js @@ -21,6 +21,11 @@ module.exports = { path.sep, filePath); return JSON.parse(fs.readFileSync(fullPathToFile)); }, + getFileAsString: function(filePath) { + var fullPathToFile = (filePath.charAt(0) === path.sep) ? filePath : path.join(process.cwd(), + path.sep, filePath); + return fs.readFileSync(fullPathToFile,'utf-8'); + }, getFileAsArray: function(filePath) { var fullPathToFile = (filePath.charAt(0) === path.sep) ? filePath : path.join(process.cwd(),
read plain text to String #<I>
sitespeedio_sitespeed.io
train
js
32276a790fefbfeedd21f3a44d67922b44ebc14e
diff --git a/src/javascript/ZeroClipboard/position.js b/src/javascript/ZeroClipboard/position.js index <HASH>..<HASH> 100644 --- a/src/javascript/ZeroClipboard/position.js +++ b/src/javascript/ZeroClipboard/position.js @@ -9,7 +9,7 @@ ZeroClipboard.getDOMObjectPosition = function (obj) { }; // float just above object, or default zIndex if dom element isn't set - if (object.style.zIndex) { + if (obj.style.zIndex) { info.zIndex = parseInt(element.style.zIndex, 10); }
Typo, this should be obj
zeroclipboard_zeroclipboard
train
js