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
d469e493b665977070f8fa5333dd71e8cb55a080
diff --git a/runner.go b/runner.go index <HASH>..<HASH> 100644 --- a/runner.go +++ b/runner.go @@ -132,13 +132,13 @@ func (r *Runner) Start(errCh chan<- error) { log.Printf("[INFO] (runner) received finish") return } - } - // If we got this far, that means we got new data or one of the timers fired, - // so attempt to re-render. - if err := r.Run(); err != nil { - errCh <- err - return + // If we got this far, that means we got new data or one of the timers fired, + // so attempt to re-render. + if err := r.Run(); err != nil { + errCh <- err + return + } } }
That block should be inside the loop... Indentation is hard
hashicorp_consul-template
train
go
c380eb1257ec57732259dff13b378322c2816a28
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -361,7 +361,7 @@ func trimHeader(size int, data []byte) []byte { data = data[size:] // Remove optional leading whitespace - if data[0] == 32 { + if len(data) > 0 && data[0] == 32 { data = data[1:] } // Remove trailing new line diff --git a/client_test.go b/client_test.go index <HASH>..<HASH> 100644 --- a/client_test.go +++ b/client_test.go @@ -333,3 +333,28 @@ func TestClientLargeData(t *testing.T) { require.Nil(t, err) require.Equal(t, data, d) } + +func TestTrimHeader(t *testing.T) { + tests := []struct { + input []byte + want []byte + }{ + { + input: []byte("data: real data"), + want: []byte("real data"), + }, + { + input: []byte("data:real data"), + want: []byte("real data"), + }, + { + input: []byte("data:"), + want: []byte(""), + }, + } + + for _, tc := range tests { + got := trimHeader(len(headerData), tc.input) + require.Equal(t, tc.want, got) + } +}
fix empty data line (#<I>)
r3labs_sse
train
go,go
4a69cb2235fb1801e0e46277c6b1400f2565060b
diff --git a/calculate_rmsd.py b/calculate_rmsd.py index <HASH>..<HASH> 100755 --- a/calculate_rmsd.py +++ b/calculate_rmsd.py @@ -130,7 +130,6 @@ def get_coordinates(filename): # Use the number of atoms to not read beyond the end of a file for line in f: - lines_read += 1 if lines_read == n_atoms: break @@ -143,6 +142,8 @@ def get_coordinates(filename): else: exit("Reading the .xyz file failed in line {0}. Please check the format.".format(lines_read +2)) + lines_read += 1 + f.close() V = numpy.array(V) return V
fixed skipped last line in coordinates
charnley_rmsd
train
py
fe4ed5255cd5d4e94555bee63532eb5f9251eb90
diff --git a/core/block_svg.js b/core/block_svg.js index <HASH>..<HASH> 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -310,12 +310,8 @@ Blockly.BlockSvg.prototype.setParent = function(newParent) { // If we are losing a parent, we want to move our DOM element to the // root of the workspace. else if (oldParent) { - // Avoid moving a block up the DOM if it's currently selected/dragging, - // so as to avoid taking things off the drag surface. - if (Blockly.selected != this) { - this.workspace.getCanvas().appendChild(svgRoot); - this.translate(oldXY.x, oldXY.y); - } + this.workspace.getCanvas().appendChild(svgRoot); + this.translate(oldXY.x, oldXY.y); } };
Don't check for the selected block in setParent
LLK_scratch-blocks
train
js
c68ef75247d37bb72a0d109ebd766d5a00d73475
diff --git a/iradix.go b/iradix.go index <HASH>..<HASH> 100644 --- a/iradix.go +++ b/iradix.go @@ -176,7 +176,7 @@ func (t *Txn) insert(n *Node, k, search []byte, v interface{}) (*Node, interface // Handle key exhaustion if len(search) == 0 { var oldVal interface{} - var didUpdate bool + didUpdate := false if n.isLeaf() { oldVal = n.leaf.val didUpdate = true
Tweaks didUpdate initialization.
hashicorp_go-immutable-radix
train
go
8ab8fee86c18a0106fd0fc98f7c9027b0585509b
diff --git a/lib/generators/beta_invite/templates/beta_invite.rb b/lib/generators/beta_invite/templates/beta_invite.rb index <HASH>..<HASH> 100644 --- a/lib/generators/beta_invite/templates/beta_invite.rb +++ b/lib/generators/beta_invite/templates/beta_invite.rb @@ -1,3 +1,7 @@ +# +# Setup your BetaInvite engine in easy steps using this config initializer +# + BetaInviteSetup.setup do |config| # Setting this to true would send an email to the admins saying that a # particular user with a particular email address has requested for an invite @@ -11,4 +15,8 @@ BetaInviteSetup.setup do |config| # Configure your mail configuration in the environments file and enter the from email # to send emails config.from_email = 'from@email.com' + + # Send thank you emails to the user who has requested for an invite + # False by default + config.send_thank_you_email = false end \ No newline at end of file
adding thankyou email boolean to initializer
ktkaushik_beta_invite
train
rb
d68b29ed90e800f0179664826358ef68566b21a2
diff --git a/lib/pj_object.rb b/lib/pj_object.rb index <HASH>..<HASH> 100644 --- a/lib/pj_object.rb +++ b/lib/pj_object.rb @@ -1,8 +1,6 @@ # encoding: UTF-8 module Proj class PjObject - attr_reader :context - def self.finalize(pointer) proc do Api.proj_destroy(pointer)
:context should no longer by an attr_reader.
cfis_proj4rb
train
rb
2fadc223c01510c965b1cdcaf6c3ed21164d9bac
diff --git a/core/src/main/java/org/commonjava/indy/core/change/StoreEnablementManager.java b/core/src/main/java/org/commonjava/indy/core/change/StoreEnablementManager.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/commonjava/indy/core/change/StoreEnablementManager.java +++ b/core/src/main/java/org/commonjava/indy/core/change/StoreEnablementManager.java @@ -77,19 +77,7 @@ public class StoreEnablementManager for ( ArtifactStore store : event ) { - if ( event.isDisabling() ) - { - try - { - setReEnablementTimeout( store.getKey() ); - } - catch ( IndySchedulerException e ) - { - Logger logger = LoggerFactory.getLogger( getClass() ); - logger.error( String.format( "Failed to schedule re-enablement of %s.", store.getKey() ), e ); - } - } - else + if ( ! event.isDisabling() ) { try {
[NOS-<I>] Remove automatic store re-enablement when disabling manually When a store is unavailale and requests end by timeouts an IndyStoreErrorEvent is fired, so in case of ArtifactStoreEnablementEvent it is always a manual action triggered by a client and hence it does not make sense to schedule an automatic re-enablement.
Commonjava_indy
train
java
4504c27b769e3cc3ac8b1140aaa938a42e0b5a4c
diff --git a/simpleclient_graphite_bridge/src/main/java/io/prometheus/client/bridge/Graphite.java b/simpleclient_graphite_bridge/src/main/java/io/prometheus/client/bridge/Graphite.java index <HASH>..<HASH> 100644 --- a/simpleclient_graphite_bridge/src/main/java/io/prometheus/client/bridge/Graphite.java +++ b/simpleclient_graphite_bridge/src/main/java/io/prometheus/client/bridge/Graphite.java @@ -26,11 +26,10 @@ import java.util.regex.Matcher; * Thread thread = g.start(CollectorRegistry.defaultRegistry, 60); * // Stop pushing. * thread.interrupt(); - * thread.joi(); + * thread.join(); * } * </pre> * <p> - * See <a href="https://github.com/prometheus/pushgateway">https://github.com/prometheus/pushgateway</a> */ public class Graphite { private static final Logger logger = Logger.getLogger(Graphite.class.getName());
Improve docs for graphite bridge.
prometheus_client_java
train
java
c3c0fabf8fc32738b75134c1556b47dd0242e839
diff --git a/ipvs/constants.go b/ipvs/constants.go index <HASH>..<HASH> 100644 --- a/ipvs/constants.go +++ b/ipvs/constants.go @@ -144,6 +144,17 @@ const ( // a statically assigned hash table by their source IP // addresses. SourceHashing = "sh" + + // WeightedRoundRobin assigns jobs to real servers proportionally + // to there real servers' weight. Servers with higher weights + // receive new jobs first and get more jobs than servers + // with lower weights. Servers with equal weights get + // an equal distribution of new jobs + WeightedRoundRobin = "wrr" + + // WeightedLeastConnection assigns more jobs to servers + // with fewer jobs and relative to the real servers' weight + WeightedLeastConnection = "wlc" ) const (
weighted scheduling methods constants for ipvs
docker_libnetwork
train
go
cc08fcbb513224aafe6c04143a150d1019c032ef
diff --git a/setup_py2exe.py b/setup_py2exe.py index <HASH>..<HASH> 100644 --- a/setup_py2exe.py +++ b/setup_py2exe.py @@ -11,14 +11,13 @@ from setup import SSLYZE_SETUP data_files = [("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))] # Trust Stores -plugin_data_path = 'plugins\\data\\trust_stores' plugin_data_files = [] -for file in os.listdir(plugin_data_path): - file = os.path.join(plugin_data_path, file) +for file in os.listdir('plugins\\data\\trust_stores'): + file = os.path.join('plugins\\data\\trust_stores', file) if os.path.isfile(file): # skip directories plugin_data_files.append( file) -data_files.append((plugin_data_path, plugin_data_files)) +data_files.append(('data\\trust_stores', plugin_data_files)) sslyze_setup_py2exe = SSLYZE_SETUP.copy()
Fix trust stores paths for py2exe builds
nabla-c0d3_sslyze
train
py
1021349a5061713eea5bf6baee214c13db6aa9ec
diff --git a/classes/Tasks.php b/classes/Tasks.php index <HASH>..<HASH> 100644 --- a/classes/Tasks.php +++ b/classes/Tasks.php @@ -245,11 +245,11 @@ class Tasks } $this->delete($taskID, $listID); } - if (time() - $currentTime > $maxExecutionTime) { - break; + if (time() - $currentTime >= $maxExecutionTime) { + return false; } } - return false; + return true; }; $startTime = time(); for ($i = 0; $i < 10000; $i++) {
Better handling of corrupted data.
bearframework_tasks-addon
train
php
cec8a1d2616feb035e13a7c547d36886234f283b
diff --git a/lib/dataflow/nodes/compute_node.rb b/lib/dataflow/nodes/compute_node.rb index <HASH>..<HASH> 100644 --- a/lib/dataflow/nodes/compute_node.rb +++ b/lib/dataflow/nodes/compute_node.rb @@ -311,6 +311,7 @@ module Dataflow end def process_parallel(node:) + return if node.blank? record_count = node.count return if record_count == 0
Do not crash if process_parallel is called without dependencies.
Phybbit_dataflow-rb
train
rb
3af16952ee3cbadcddceeb4d6b83235852ef3119
diff --git a/lib/elastomer/client.rb b/lib/elastomer/client.rb index <HASH>..<HASH> 100644 --- a/lib/elastomer/client.rb +++ b/lib/elastomer/client.rb @@ -162,6 +162,9 @@ module Elastomer body = extract_body params path = expand_path path, params + # prevent excon from changing the encoding + body.freeze + instrument(path, body, params) do begin response =
Freeze the body to prevent excon from changing its encoding
github_elastomer-client
train
rb
353b1ee084f071da8b89d2a2724dc56d5dbc2277
diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -1102,6 +1102,10 @@ type ManagedFieldsEntry struct { // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' // +optional Time *Time `json:"time,omitempty" protobuf:"bytes,4,opt,name=time"` + + // Fields is tombstoned to show why 5 is a reserved protobuf tag. + //Fields *Fields `json:"fields,omitempty" protobuf:"bytes,5,opt,name=fields,casttype=Fields"` + // FieldsType is the discriminator for the different fields format and version. // There is currently only one possible value: "FieldsV1" FieldsType string `json:"fieldsType,omitempty" protobuf:"bytes,6,opt,name=fieldsType"`
Tombstone the former Fields field by commenting the old entry
kubernetes_kubernetes
train
go
0ae256983d1de5e21eb190cad8690034d708dd2f
diff --git a/src/main/java/gwt/material/design/client/data/AbstractDataView.java b/src/main/java/gwt/material/design/client/data/AbstractDataView.java index <HASH>..<HASH> 100644 --- a/src/main/java/gwt/material/design/client/data/AbstractDataView.java +++ b/src/main/java/gwt/material/design/client/data/AbstractDataView.java @@ -370,11 +370,9 @@ public abstract class AbstractDataView<T> implements DataView<T> { } else if(component instanceof CategoryComponent) { CategoryComponent categoryComponent = (CategoryComponent)component; row = bindCategoryEvents(renderer.drawCategory(categoryComponent)); - row.addAttachHandler(event -> { - if(categoryComponent.isOpenByDefault()) { - openCategory(categoryComponent); - } - }, true); + if(categoryComponent.isOpenByDefault()) { + row.addAttachHandler(event -> openCategory(categoryComponent), true); + } } else { row = renderer.drawCustom(component); }
Check the category component default open property before attaching an event.
GwtMaterialDesign_gwt-material-table
train
java
48424c2b4ca8a195ecafe9e0ab6deeded5af87cb
diff --git a/RoboFile.php b/RoboFile.php index <HASH>..<HASH> 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -23,11 +23,23 @@ class RoboFile extends \Robo\Tasks { } /** + * Compiles all assets. + */ + public function makeAll() { + + $this->makeCss(); + $this->makeJs(); + } + + /** * Compiles plugin's css file from less. */ public function makeCss() { - $this->taskExec( 'lessc css/laps.less css/laps.css' )->run(); + $this->taskExec( 'lessc css/laps.less css/laps.css --source-map=css/laps.css.map' )->run(); + + $this->taskMinify( 'css/laps.css' ) + ->run(); } /** @@ -41,5 +53,8 @@ class RoboFile extends \Robo\Tasks { ] ) ->to( 'js/laps.js' ) ->run(); + + $this->taskMinify( 'js/laps.js' ) + ->run(); } } \ No newline at end of file
Updated RoboFile for less sourcemap and minified assets.
Rarst_laps
train
php
131b9f66685eeb72aad70d8b1fb766f3895ddece
diff --git a/grunt/configs/buildGhPages.js b/grunt/configs/buildGhPages.js index <HASH>..<HASH> 100644 --- a/grunt/configs/buildGhPages.js +++ b/grunt/configs/buildGhPages.js @@ -2,11 +2,10 @@ module.exports = function (grunt) { 'use strict'; grunt.config('buildGhPages', { - ghPages : {}, website : { options: { build_branch: "gh-pages", - dist: "docs/_site", + dist: "./docs/_site", pull: true } }
Trying to get website build to work.
grasshopper-cms_grasshopper-core-nodejs
train
js
1882983190f7d2fb5326f3f59063f505d4b3294f
diff --git a/lib/capybara/webkit/node.rb b/lib/capybara/webkit/node.rb index <HASH>..<HASH> 100644 --- a/lib/capybara/webkit/node.rb +++ b/lib/capybara/webkit/node.rb @@ -54,6 +54,8 @@ module Capybara::Webkit " " when :enter "\r" + when :backspace + "\b" when String key.to_s else diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index <HASH>..<HASH> 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -1258,6 +1258,16 @@ describe Capybara::Webkit::Driver do textarea.value.should eq "newvalue" end + context "#send_keys" do + it "should support :backspace" do + input = driver.find_xpath("//input").first + input.set("dog") + input.value.should eq "dog" + input.send_keys(*[:backspace]) + input.value.should eq "do" + end + end + let(:monkey_option) { driver.find_xpath("//option[@id='select-option-monkey']").first } let(:capybara_option) { driver.find_xpath("//option[@id='select-option-capybara']").first } let(:animal_select) { driver.find_xpath("//select[@name='animal']").first }
Add :backspace to send_keys
thoughtbot_capybara-webkit
train
rb,rb
a68b7801b5cc078e3a6105af08693a22a3dc7d64
diff --git a/Controller/TrackingController.php b/Controller/TrackingController.php index <HASH>..<HASH> 100755 --- a/Controller/TrackingController.php +++ b/Controller/TrackingController.php @@ -13,6 +13,7 @@ namespace CampaignChain\CoreBundle\Controller; use CampaignChain\CoreBundle\Entity\ReportCTA; use CampaignChain\CoreBundle\EntityService\CTAService; use CampaignChain\CoreBundle\Util\ParserUtil; +use GK\JavascriptPacker; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -29,7 +30,7 @@ class TrackingController extends Controller 'CampaignChainCoreBundle:Tracking:tracking.js.twig',$optionalParams ); - $packer = new Packer($trackingJs); + $packer = new JavascriptPacker($trackingJs); $trackingJs = $packer->pack(); $response = new Response($trackingJs);
CampaignChain/campaignchain#<I> Move installer and tracking.js to web/ folder with composer plugin
CampaignChain_core
train
php
878c841f27ab86cd0ee947592570330955e51304
diff --git a/thumbor/result_storages/file_storage.py b/thumbor/result_storages/file_storage.py index <HASH>..<HASH> 100644 --- a/thumbor/result_storages/file_storage.py +++ b/thumbor/result_storages/file_storage.py @@ -52,7 +52,7 @@ class Storage(BaseStorage): file_abspath = self.normalize_path(path) if not self.validate_path(file_abspath): logger.warn("[RESULT_STORAGE] unable to read from outside root path: %s" % file_abspath) - return None + callback(None) logger.debug("[RESULT_STORAGE] getting from %s" % file_abspath) if not exists(file_abspath) or isdir(file_abspath) or self.is_expired(file_abspath):
Storage#get should always call the callback
thumbor_thumbor
train
py
7c98aa82187810d1fc651f3d1adca74e0c383e1c
diff --git a/lib/swag_dev/project/sham/yardopts.rb b/lib/swag_dev/project/sham/yardopts.rb index <HASH>..<HASH> 100644 --- a/lib/swag_dev/project/sham/yardopts.rb +++ b/lib/swag_dev/project/sham/yardopts.rb @@ -5,15 +5,15 @@ require 'pathname' require 'shellwords' SwagDev::Project::Sham.define(:yardopts) do |c| - yardopts_file = Pathname.new(Dir.pwd).join('.yardopts') + conf_file = Pathname.new(Dir.pwd).join('.yardopts') options_reader = lambda do |file| file.file? ? Shellwords.split(file.read) : [] end c.attributes do { - file: yardopts_file, - options: options_reader.call(yardopts_file) + conf_file: conf_file, + options: options_reader.call(conf_file) } end end
yardopts (sham) minor changes
SwagDevOps_kamaze-project
train
rb
f5006c036a03ee6a6ae7c909fa9f6669ebb489cc
diff --git a/lib/Pico.php b/lib/Pico.php index <HASH>..<HASH> 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1220,7 +1220,7 @@ class Pico $this->config['base_url'] = $protocol . "://" . $_SERVER['HTTP_HOST'] - . dirname($_SERVER['SCRIPT_NAME']) . '/'; + . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/'; return $this->getConfig('base_url'); }
Prevent double slashes in base_url when installed to document root Fixes #<I>
picocms_Pico
train
php
08cf53bc2dbb7d2b3741a7e30d27a118881d26d7
diff --git a/lib/build.js b/lib/build.js index <HASH>..<HASH> 100644 --- a/lib/build.js +++ b/lib/build.js @@ -92,7 +92,9 @@ function walk_obj(next, next_child) { var tag_type, i, prop; var name = type(next); - if (Array.isArray(next)) { + if ('Undefined' == name) { + return; + } else if (Array.isArray(next)) { next_child = next_child.ele('array'); for (i = 0; i < next.length; i++) { walk_obj(next[i], next_child); diff --git a/test/build.js b/test/build.js index <HASH>..<HASH> 100644 --- a/test/build.js +++ b/test/build.js @@ -128,6 +128,19 @@ describe('plist', function () { */})); }); + it('should omit undefined values', function () { + var xml = build({ a: undefined }); + assert.strictEqual(xml, multiline(function () {/* +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>a</key> + </dict> +</plist> +*/})); + }); + }); });
Stop walking immediately if a value is undefined
TooTallNate_plist.js
train
js,js
eec495cffb9d66e3628b2c2fab132b8c471fd437
diff --git a/python/thunder/rdds/fileio/readers.py b/python/thunder/rdds/fileio/readers.py index <HASH>..<HASH> 100644 --- a/python/thunder/rdds/fileio/readers.py +++ b/python/thunder/rdds/fileio/readers.py @@ -384,7 +384,7 @@ class BotoS3FileReader(_BotoS3Client): keyname = "" keyname += filename - return _BotoS3Client.retrieveKeys(bucket, keyname) + return _BotoS3Client.retrieveKeys(bucket, keyname, prefix=parse[2], postfix=parse[3]) def list(self, datapath, filename=None): """List s3 objects specified by datapath.
add wildcard handling to BotoS3FileReader
thunder-project_thunder
train
py
8978d544a8a039d728ea5ba7fe3c250f62bafcae
diff --git a/app/templates/src/main/java/package/service/_MailService.java b/app/templates/src/main/java/package/service/_MailService.java index <HASH>..<HASH> 100644 --- a/app/templates/src/main/java/package/service/_MailService.java +++ b/app/templates/src/main/java/package/service/_MailService.java @@ -49,7 +49,7 @@ public class MailService { @PostConstruct public void init() { - this.from = env.getProperty("spring.mail.from"); + this.from = env.getProperty("mail.from"); } @Async
Corrected “From address must not be null” exception while registering Fix #<I>
jhipster_generator-jhipster
train
java
6ef5ed531aaf446b37bf10aab004fea06c614c60
diff --git a/lib/lessWatchCompilerUtils.js b/lib/lessWatchCompilerUtils.js index <HASH>..<HASH> 100644 --- a/lib/lessWatchCompilerUtils.js +++ b/lib/lessWatchCompilerUtils.js @@ -130,7 +130,7 @@ define(function ( require ) { filterFiles: function(f){ var filename = path.basename(f); var extension = path.extname(f), - allowedExtensions = lessWatchCompilerUtilsModule.config.defaultAllowedExtensions || defaultAllowedExtensions; + allowedExtensions = lessWatchCompilerUtilsModule.config.allowedExtensions || defaultAllowedExtensions; if (filename.substr(0,1) == '_' || filename.substr(0,1) == '.' || filename == '' ||
Fix failed tests: default extensions were not being picked up
jonycheung_deadsimple-less-watch-compiler
train
js
8763838a4ae6967f42c22ae52c9aeea5d6f0ab2f
diff --git a/thunder/series/series.py b/thunder/series/series.py index <HASH>..<HASH> 100755 --- a/thunder/series/series.py +++ b/thunder/series/series.py @@ -955,7 +955,7 @@ class Series(Data): if n == 0: b = zeros((s.shape[0],)) else: - y /= norm(y) + y /= n b = dot(s, y) return b
No need to recompute the norm of y
thunder-project_thunder
train
py
9b9d737ffb367890231b8dda1d29b1b3db8f2cb4
diff --git a/tools.rb b/tools.rb index <HASH>..<HASH> 100644 --- a/tools.rb +++ b/tools.rb @@ -1,15 +1,4 @@ -# some artifact related methods, and a shortcut for running a javaclass with rmi-props - - -def javarmi(clazzname, policy, project) - Java::Commands.java(clazzname, :classpath => [project._('target/classes/'),project._('target/resources/'),project.compile.dependencies], - :java_args => [ - "-Djava.rmi.server.codebase=file:" + project._('target/classes/') + '/', - '-Djava.rmi.server.hostname=localhost', - '-Djava.security.policy=' + project._(policy)] - ) -end - +# some artifact related methods def create_pom(art) artifact art do |a|
remove unused rmi-stuff from tools
magro_memcached-session-manager
train
rb
c870726f4469a0addb44ce2fd3f91faa70a284e4
diff --git a/lib/reda/containers/sEIT.py b/lib/reda/containers/sEIT.py index <HASH>..<HASH> 100644 --- a/lib/reda/containers/sEIT.py +++ b/lib/reda/containers/sEIT.py @@ -578,7 +578,8 @@ class sEIT(LoggingClass, importers): primary_dim : None|str ??? filename : None|str - Prefix for filename + Prefix for filename. Do not add a file ending here, as additional + string will be appended here. **kwargs : dict ??? @@ -591,7 +592,7 @@ class sEIT(LoggingClass, importers): if filename is not None: for key, item in figs.items(): item.savefig( - filename + '_{}.jpg'.format(key.replace('_', '-')), dpi=300 + filename + '_{}.jpg'.format(key).replace('_', '-'), dpi=300 ) return dict_dimension, figs
[sEIT] fix bug in which plotting histograms was broken if the timestep contains actually datetime objects, and not only strings
geophysics-ubonn_reda
train
py
48e59e203a8d1c1de2a0c8d0732d2fb831a9fa8a
diff --git a/shared/fs/row/row.js b/shared/fs/row/row.js index <HASH>..<HASH> 100644 --- a/shared/fs/row/row.js +++ b/shared/fs/row/row.js @@ -90,12 +90,17 @@ export const Row = (props: RowProps) => ( className="fs-path-item-hover-icon" /> )} - <Icon - type="iconfont-ellipsis" - style={rowActionIconStyle} - onClick={props.onAction} - className="fs-path-item-hover-icon" - /> + {// TODO: when we have share-to-app, we'll want to re-enable this on + // mobile, but filter out share/download in the popup menu. + // Currently it doesn't make sense to popup an empty menu. + (!isMobile || props.type !== 'folder') && ( + <Icon + type="iconfont-ellipsis" + style={rowActionIconStyle} + onClick={props.onAction} + className="fs-path-item-hover-icon" + /> + )} </Box> </HoverBox> </Box>
disable folder sharing/downloading on mobile (#<I>) * disable folder sharing/downloading on mobile * fix typo (suggested by jzila)
keybase_client
train
js
a06f0d0b25bd35c1a0662abedf171e468272605d
diff --git a/molgenis-core-ui/src/main/resources/js/thememanager.js b/molgenis-core-ui/src/main/resources/js/thememanager.js index <HASH>..<HASH> 100644 --- a/molgenis-core-ui/src/main/resources/js/thememanager.js +++ b/molgenis-core-ui/src/main/resources/js/thememanager.js @@ -49,6 +49,9 @@ requirejs(["vue.min"], function(Vue) { selectedTheme: function(newVal) { this.themeUrl = `${themeRepository}/mg-${newVal}-4.css` this.themeUrlLegacy = `${themeRepository}/mg-${newVal}-3.css` + // Changing the theme from the theme-manager will always use + // the current Bootstrap 4 url. + document.querySelector('#bootstrap-theme').setAttribute('href', this.themeUrl) } } })
feat: add theme preview when changing public theme
molgenis_molgenis
train
js
48af739893f573e86c865aa1c7ee4be4d789200e
diff --git a/pkg/kubelet/dockershim/docker_image.go b/pkg/kubelet/dockershim/docker_image.go index <HASH>..<HASH> 100644 --- a/pkg/kubelet/dockershim/docker_image.go +++ b/pkg/kubelet/dockershim/docker_image.go @@ -76,7 +76,11 @@ func (ds *dockerService) ImageStatus(_ context.Context, r *runtimeapi.ImageStatu return nil, err } - return &runtimeapi.ImageStatusResponse{Image: imageStatus}, nil + res := runtimeapi.ImageStatusResponse{Image: imageStatus} + if r.GetVerbose() { + res.Info = imageInspect.Config.Labels + } + return &res, nil } // PullImage pulls an image with authentication config.
dockershim: Return Labels as Info in ImageStatus. c6ddc<I>e<I>f<I>f<I>d<I>cf<I>c<I>d6cd<I> added an Info field to ImageStatusResponse when Verbose is true. This makes the image's Labels available in that field, rather than unconditionally returning an empty map.
kubernetes_kubernetes
train
go
bac9c37a66da1e8c2e76f4ecab4c90615b68c488
diff --git a/public/javascripts/activation_key.js b/public/javascripts/activation_key.js index <HASH>..<HASH> 100644 --- a/public/javascripts/activation_key.js +++ b/public/javascripts/activation_key.js @@ -37,10 +37,8 @@ $(document).ready(function() { $(this).ajaxSubmit({ success: function(data) { button.removeAttr('disabled'); - notices.checkNotices(); }, error: function(e) { button.removeAttr('disabled'); - notices.checkNotices(); }}); });
Activation Keys - removing checkNotices from update_subscriptions The notices are delivered in the form of headers on the response to the request. As a result, we do not need checkNotices which will send another request to the server for them.
Katello_katello
train
js
15335a2f8973c1aadc4a3300adb537ab142d758b
diff --git a/b3j0f/task/test/condition.py b/b3j0f/task/test/condition.py index <HASH>..<HASH> 100644 --- a/b3j0f/task/test/condition.py +++ b/b3j0f/task/test/condition.py @@ -269,7 +269,10 @@ class SwitchTest(TestCase): for i, value in enumerate(ids) ] # initialize count by indexes - self.count_by_indexes.update({i: 0 for i in range(len(ids))}) + dico = {} + for i in range(len(ids)): + dico[i] = 0 + self.count_by_indexes.update(dico) return result
:update: attempt to fix support for python<I>
b3j0f_task
train
py
261ba31288eae4db777f1ac3c5944fa369665bc8
diff --git a/dcard/utils.py b/dcard/utils.py index <HASH>..<HASH> 100644 --- a/dcard/utils.py +++ b/dcard/utils.py @@ -4,6 +4,7 @@ import os import logging import itertools from multiprocessing.dummy import Pool +from six.moves import http_client as httplib import requests from requests.adapters import HTTPAdapter @@ -31,9 +32,14 @@ class Client: response = self.req_session.get(url, **kwargs) data = response.json() if isinstance(data, dict) and data.get('error'): - logger.error('when get {}, error {}'.format(url, data)) - return {} + raise ServerResponsedError return data + except ServerResponsedError: + logger.error('when get {}, error {}'.format(url, data)) + return {} + except httplib.IncompleteRead as e: + logger.error('when get {}, error {}; partial: {}'.format(url, e, e.partial)) + return {} # or should we return `e.partial` ? except RetryError as e: logger.error('when get {}, error {}'.format(url, e)) @@ -55,4 +61,8 @@ class Client: for i in range(0, len(elements), chunck_size): yield elements[i:i+chunck_size] + +class ServerResponsedError(Exception): + pass + client = Client()
patch for possible err in response from httpclient
leVirve_dcard-spider
train
py
40e052068799910142bb63fa052b7ba7adb4b07c
diff --git a/lib/element/html_element_extensions.js b/lib/element/html_element_extensions.js index <HASH>..<HASH> 100644 --- a/lib/element/html_element_extensions.js +++ b/lib/element/html_element_extensions.js @@ -551,7 +551,7 @@ Blast.definePrototype(Element, 'queryParents', function queryParents(query) { return null; } - return Blast.Collection.Element.prototype.queryUp.call(this.parentElement, query); + return ProtoEl.queryUp.call(this.parentElement, query); }); /**
Fix queryParents not working on the server
skerit_hawkejs
train
js
af44add67c3740f2e822217f0a21707cce6ad79a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -45,12 +45,15 @@ setup( cmdclass=get_cmdclass(), tests_require=tests_requires, test_suite="nose.collector", + requires_python=">=2.7,<3", classifiers=[ + 'Development Status :: 4 - Beta', "Environment :: Console", "Intended Audience :: End Users/Desktop", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License (GPL)", + 'Operating System :: MacOS :: MacOS X', "Operating System :: POSIX", "Programming Language :: Python", ],
Some more classifiers and 'requires_python' in setup.py
saschpe_rapport
train
py
06f4c7e535fe83e3688cca505cc5979f8e32a786
diff --git a/src/FullscreenContextProvider.js b/src/FullscreenContextProvider.js index <HASH>..<HASH> 100644 --- a/src/FullscreenContextProvider.js +++ b/src/FullscreenContextProvider.js @@ -45,12 +45,12 @@ class FullscreenContextProvider extends PureComponent { } requestExitFullscreen () { - if (this.fullscreenElement.requestExitFullscreen) { - this.fullscreenElement.requestExitFullscreen(); - } else if (this.fullscreenElement.webkitRequestExitFullscreen) { - this.fullscreenElement.webkitRequestExitFullscreen(); - } else if (this.fullscreenElement.mozRequestExitFullscreen) { - this.fullscreenElement.mozRequestExitFullscreen(); + if (document.requestExitFullscreen) { + document.requestExitFullscreen(); + } else if (document.webkitRequestExitFullscreen) { + document.webkitRequestExitFullscreen(); + } else if (document.mozRequestExitFullscreen) { + document.mozRequestExitFullscreen(); } }
Fix exit fullscreen in Fullscreen Context.
benwiley4000_cassette
train
js
921be2d73faea0823e402683374b77f70a8b832b
diff --git a/services/managers/phpbb3_manager.py b/services/managers/phpbb3_manager.py index <HASH>..<HASH> 100755 --- a/services/managers/phpbb3_manager.py +++ b/services/managers/phpbb3_manager.py @@ -67,6 +67,7 @@ class Phpbb3Manager: @staticmethod def __santatize_username(username): sanatized = username.replace(" ", "_") + sanatized = username.replace("'", "_") return sanatized.lower() @staticmethod
sanitize single apostrophes
allianceauth_allianceauth
train
py
9a96bef4c7fd19a7aa730c92a3768070218d77c4
diff --git a/server/filestore.go b/server/filestore.go index <HASH>..<HASH> 100644 --- a/server/filestore.go +++ b/server/filestore.go @@ -4728,8 +4728,6 @@ func (mb *msgBlock) readPerSubjectInfo() error { return mb.generatePerSubjectInfo() } - fss := make(map[string]*SimpleState) - bi := hdrLen readU64 := func() uint64 { if bi < 0 { @@ -4744,8 +4742,11 @@ func (mb *msgBlock) readPerSubjectInfo() error { return num } + numEntries := readU64() + fss := make(map[string]*SimpleState, numEntries) + mb.mu.Lock() - for i, numEntries := uint64(0), readU64(); i < numEntries; i++ { + for i := uint64(0); i < numEntries; i++ { lsubj := readU64() // Make a copy or use a configured subject (to avoid mem allocation) subj := mb.subjString(buf[bi : bi+int(lsubj)])
Small improvement with fss processing
nats-io_gnatsd
train
go
e62501c7af50ac743b131458608e891ea281f214
diff --git a/hazelcast/src/main/java/com/hazelcast/instance/DefaultNodeContext.java b/hazelcast/src/main/java/com/hazelcast/instance/DefaultNodeContext.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/main/java/com/hazelcast/instance/DefaultNodeContext.java +++ b/hazelcast/src/main/java/com/hazelcast/instance/DefaultNodeContext.java @@ -21,6 +21,7 @@ import com.hazelcast.config.Config; import com.hazelcast.config.ConfigurationException; import com.hazelcast.config.MemberAddressProviderConfig; import com.hazelcast.internal.networking.ChannelErrorHandler; +import com.hazelcast.internal.networking.ChannelInitializer; import com.hazelcast.internal.networking.EventLoopGroup; import com.hazelcast.internal.networking.nio.NioEventLoopGroup; import com.hazelcast.logging.ILogger; @@ -145,7 +146,7 @@ public class DefaultNodeContext implements NodeContext { private EventLoopGroup createEventLoopGroup(Node node, NodeIOService ioService) { LoggingServiceImpl loggingService = node.loggingService; - MemberChannelInitializer initializer + ChannelInitializer initializer = new MemberChannelInitializer(loggingService.getLogger(MemberChannelInitializer.class), ioService); ChannelErrorHandler errorHandler
DefaultNodeContext super minor cleanup (#<I>)
hazelcast_hazelcast
train
java
727fee1e1261396f07439ac4adf54773de0aee45
diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index <HASH>..<HASH> 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -3293,7 +3293,7 @@ public class ServerHttpSecurity { * @author Ankur Pathak */ public HeaderSpec writer(ServerHttpHeadersWriter serverHttpHeadersWriter) { - Assert.notNull(serverHttpHeadersWriter, () -> "serverHttpHeadersWriter cannot be null"); + Assert.notNull(serverHttpHeadersWriter, "serverHttpHeadersWriter cannot be null"); this.writers.add(serverHttpHeadersWriter); return this; }
Polish HeaderWriterSpec Assert.notNull(Object,Supplier) is for when then message passed in requires concatenation and avoids doing extra work. Since this does not require concatenation, we can use Assert.notNull(Object,String) Issue gh-<I>
spring-projects_spring-security
train
java
78f5461c0a336f65178c8c0d8f4b9e3de870859f
diff --git a/src/main/java/org/owasp/html/HtmlStreamRenderer.java b/src/main/java/org/owasp/html/HtmlStreamRenderer.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/owasp/html/HtmlStreamRenderer.java +++ b/src/main/java/org/owasp/html/HtmlStreamRenderer.java @@ -364,6 +364,7 @@ public class HtmlStreamRenderer implements HtmlStreamEventReceiver { if (i == 0 || i + 1 == n) { return false; } break; case '-': + case '_': if (i == 0 || i + 1 == n) { return false; } break; default:
Allow underscore in attribute and element names (#<I>)
OWASP_java-html-sanitizer
train
java
d7358deab036b9e217a6b3c618423aed57ca6a27
diff --git a/lib/solargraph/source.rb b/lib/solargraph/source.rb index <HASH>..<HASH> 100644 --- a/lib/solargraph/source.rb +++ b/lib/solargraph/source.rb @@ -100,21 +100,6 @@ module Solargraph # } # end - # def qualify(signature, fqns) - # return signature if signature.nil? or signature.empty? - # base, rest = signature.split('.', 2) - # parts = fqns.split('::') - # until parts.empty? - # here = parts.join('::') - # parts.pop - # name = "#{here}::#{base}" - # next if namespace_pins(name).empty? - # base = name - # break - # end - # base + (rest.nil? ? '' : ".#{rest}") - # end - # @param fqns [String] The namespace (nil for all) # @return [Array<Solargraph::Pin::Namespace>] def namespace_pins fqns = nil diff --git a/lib/solargraph/source/fragment.rb b/lib/solargraph/source/fragment.rb index <HASH>..<HASH> 100644 --- a/lib/solargraph/source/fragment.rb +++ b/lib/solargraph/source/fragment.rb @@ -277,7 +277,6 @@ module Solargraph var = local_variable_pins(base).first end end - base = @source.qualify(base, namespace) base + (rest.nil? ? '' : ".#{rest}") end
Deprecated Source#qualify.
castwide_solargraph
train
rb,rb
28b5b578a8479c1e5753cb100617c34acb6f56e0
diff --git a/src/animate.js b/src/animate.js index <HASH>..<HASH> 100644 --- a/src/animate.js +++ b/src/animate.js @@ -145,7 +145,9 @@ export function transition($el, properties, duration = 400, delay = 0, easing = // ----------------------------------------------------------------------------- // Element CSS Animations Effects -const cssMatrix = /matrix\([0-9.\s]+,[0-9.\s]+,[0-9.\s]+,[0-9.\s]+,([0-9.\s]+),([0-9.\s]+)\)/; +// When applying the 'pop' effect, we want to respect all existing transform +// except scale. To do that, we have to expand the matrix() notation. +const cssMatrix = /matrix\([0-9.\-\s]+,[0-9.\-\s]+,[0-9.\-\s]+,[0-9.\-\s]+,([0-9.\-\s]+),([0-9.\-\s]+)\)/; export function enter($el, effect = 'fade', duration = 500, _delay = 0) { if (!isReady) { $el.show(); return; }
Fix bug in 'pop' animation transformations
mathigon_boost.js
train
js
96cf69a0a625bbb907e82bc5aae6a9ae1f3c009e
diff --git a/icontrol/session.py b/icontrol/session.py index <HASH>..<HASH> 100644 --- a/icontrol/session.py +++ b/icontrol/session.py @@ -223,7 +223,12 @@ class iControlRESTSession(object): XXXX """ - def __init__(self, username, password, timeout=30, loglevel=logging.DEBUG): + def __init__(self, username, password, **kwargs): + timeout = kwargs.pop('timeout', 30) + loglevel = kwargs.pop('loglevel', logging.DEBUG) + if kwargs: + raise TypeError('Unexpected **kwargs: %r' % kwargs) + # Compose with a Session obj self.session = requests.Session()
User Item <I> to make ICRS robust to incorrect parameters.
F5Networks_f5-icontrol-rest-python
train
py
39863207f8edd513420d779d13d83374029d83ed
diff --git a/bcbio/structural/purecn.py b/bcbio/structural/purecn.py index <HASH>..<HASH> 100644 --- a/bcbio/structural/purecn.py +++ b/bcbio/structural/purecn.py @@ -36,8 +36,8 @@ def run(items): purecn_out["variantcaller"] = "purecn" if "loh" in purecn_out: from bcbio.structural import titancna - purecn_out["vcf"] = titancna.to_vcf(out["loh"], "PureCN", _get_header, _loh_to_vcf, paired.tumor_data, - sep=",") + purecn_out["vcf"] = titancna.to_vcf(purecn_out["loh"], "PureCN", _get_header, _loh_to_vcf, + paired.tumor_data, sep=",") if "sv" not in paired.tumor_data: paired.tumor_data["sv"] = [] paired.tumor_data["sv"].append(purecn_out)
PureCN: correctly pass input file for VCF creation
bcbio_bcbio-nextgen
train
py
3b6c68a02814ef3018dafb9411552c6bdd8c4936
diff --git a/src/Adapter.php b/src/Adapter.php index <HASH>..<HASH> 100644 --- a/src/Adapter.php +++ b/src/Adapter.php @@ -219,7 +219,11 @@ abstract class Adapter extends PDO new Where($where), new Options($options) ); - return $query->execute(); + $res = $query->execute(); + if (!$res->valid()) { + throw new SelectException("$query"); + } + return $res; } /**
this needs to work slightly differently for exceptions to get thrown correctly
quibble-dbal_dabble
train
php
8d704d9f584dd49bf0594abf68fc625b64b6b969
diff --git a/jwt/claims.go b/jwt/claims.go index <HASH>..<HASH> 100644 --- a/jwt/claims.go +++ b/jwt/claims.go @@ -116,14 +116,14 @@ func (c Claims) Audience() (interface{}, bool) { switch t := c.Get("aud").(type) { case string, []string: return t, true - case []interface{}: + case interface{}, []interface{}: return stringify(t) default: return nil, false } } -func stringify(a []interface{}) ([]string, bool) { +func stringify(a ...interface{}) ([]string, bool) { s := make([]string, len(a)) for i := range a { str, ok := a[i].(string)
jwt: claims.go - added case for interface{}
SermoDigital_jose
train
go
5f5819c5acf56a63e31fc067b9716416fb8ca224
diff --git a/codemach/__init__.py b/codemach/__init__.py index <HASH>..<HASH> 100644 --- a/codemach/__init__.py +++ b/codemach/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.4b1' +__version__ = '0.4b2' from .assembler import * from .machine import *
PKGTOOL change version from <I>b1 to <I>b2
chuck1_codemach
train
py
0de649aeb532c8994aea97af5e710ce0aed1cdd6
diff --git a/operation.go b/operation.go index <HASH>..<HASH> 100644 --- a/operation.go +++ b/operation.go @@ -24,6 +24,9 @@ func (w *wrapWriter) Write(b []byte) (int, error) { buf.Clean() n, err := w.target.Write(b) w.r.buf.Refresh() + if w.r.IsSearchMode() { + w.r.SearchRefresh(-1) + } return n, err }
fix searchmode disappear in wrapWriter.Write
chzyer_readline
train
go
584423abae23f781bdb034b11115a166a0533dc3
diff --git a/app/ui/components/codemirror/code-editor.js b/app/ui/components/codemirror/code-editor.js index <HASH>..<HASH> 100644 --- a/app/ui/components/codemirror/code-editor.js +++ b/app/ui/components/codemirror/code-editor.js @@ -459,9 +459,7 @@ class CodeEditor extends PureComponent { const text = change.text .join('') // join all changed lines into one .replace(/\n/g, ' '); // Convert all whitespace to spaces - const from = {ch: change.from.ch, line: 0}; - const to = {ch: from.ch + text.length, line: 0}; - change.update(from, to, [text]); + change.update(change.from, change.to, [text]); } }
Fixed pasting in single line editor (#<I>)
getinsomnia_insomnia
train
js
c6187ee473b2bc81c0303659d7c0ce232f37d620
diff --git a/lib/para/markup/resources_table.rb b/lib/para/markup/resources_table.rb index <HASH>..<HASH> 100644 --- a/lib/para/markup/resources_table.rb +++ b/lib/para/markup/resources_table.rb @@ -72,9 +72,15 @@ module Para cells.join("\n").html_safe end - def header_for(field_name) + def header_for(field_name, sort: field_name) content_tag(:th) do - model.human_attribute_name(field_name) + if sort != field_name + view.sort_link(search, *sort) + elsif searchable?(field_name) + view.sort_link(search, field_name) + else + model.human_attribute_name(field_name) + end end end @@ -140,6 +146,16 @@ module Para content_tag(:i, '', class: 'fa fa-trash') end end + + private + + def search + @search ||= view.instance_variable_get(:@q) + end + + def searchable?(field_name) + model.columns_hash.keys.include?(field_name.to_s) + end end end end
add configurable sort links to table headers with ransack
para-cms_para
train
rb
ab05f801867649d646186cf8a90fa7692a060bb9
diff --git a/lib/fluid.js b/lib/fluid.js index <HASH>..<HASH> 100644 --- a/lib/fluid.js +++ b/lib/fluid.js @@ -3,8 +3,7 @@ var async = require("async"); module.exports = function(initialContext) { /* Builder State */ var taskGroups = []; - var hasMultipleTaskGroups = null; - var executionContext = null; + var executionContext = []; var errorDetailForNextTask = null; var nameForNextTask = null; var isDebug = false; @@ -38,10 +37,7 @@ module.exports = function(initialContext) { var callback = arguments.length == 2 ? arguments[1] : arguments[0]; isDebug = options && options.debug ? options.debug : false; debug("Executing "+ taskGroups.length + " task group(s)") - - hasMultipleTaskGroups = taskGroups.length > 1; - executionContext = []; - + async.forEachSeries(taskGroups, function(taskGroup, next) { debug("Executing "+ taskGroup.tasks.length +" async task(s) in : "+ taskGroup.modeType); @@ -53,7 +49,6 @@ module.exports = function(initialContext) { },function(err) { var returnValue = executionContext; taskGroups = []; - hasMultipleTaskGroups = null; executionContext = null; callback(err ? err : null, returnValue); });
Merged execution context Merged execution context into one array shared between all groups
peteclark82_node-fluid
train
js
e008822f94575a54c17cf5717b75b023dd7db243
diff --git a/dsari/config.py b/dsari/config.py index <HASH>..<HASH> 100644 --- a/dsari/config.py +++ b/dsari/config.py @@ -111,7 +111,7 @@ class Config(): valid_values = { 'data_dir': (str,), 'template_dir': (str,), - 'report_html_gz': (str,), + 'report_html_gz': (bool,), 'shutdown_kill_runs': (bool,), 'shutdown_kill_grace': (int, float), 'environment': (dict,),
Fix report_html_gz as bool
rfinnie_dsari
train
py
e7d651785c5f96bf5409e6e28888d7d6471e70e9
diff --git a/operations.js b/operations.js index <HASH>..<HASH> 100644 --- a/operations.js +++ b/operations.js @@ -224,7 +224,7 @@ function _checkTimeout(ops, direction) { if (direction === 'out') { var now = self.timers.now(); if (self.lastTimeoutTime && - now > self.lastTimeoutTime + CONN_STALE_PERIOD + now > self.lastTimeoutTime + self.connectionStalePeriod ) { var err = errors.ConnectionStaleTimeoutError({ lastTimeoutTime: self.lastTimeoutTime
operation: use connectionStalePeriod field
uber_tchannel-node
train
js
a6bb273eed8123ca48bd5914f5666611f19cf827
diff --git a/modules/activiti-cdi/src/main/java/org/activiti/cdi/CdiActivitiInterceptor.java b/modules/activiti-cdi/src/main/java/org/activiti/cdi/CdiActivitiInterceptor.java index <HASH>..<HASH> 100644 --- a/modules/activiti-cdi/src/main/java/org/activiti/cdi/CdiActivitiInterceptor.java +++ b/modules/activiti-cdi/src/main/java/org/activiti/cdi/CdiActivitiInterceptor.java @@ -58,7 +58,7 @@ public class CdiActivitiInterceptor extends CommandInterceptor { if (associationManager.getProcessInstanceId() != null) { ExecutionEntity processInstance = Context .getCommandContext() - .getRuntimeSession() + .getExecutionManager() .findExecutionById(associationManager.getProcessInstanceId()); if (processInstance != null && !processInstance.isEnded()) { CachingBeanStore beanStore = associationManager.getBeanStore();
adjusted CdiActivitiInterceptor to latest refactoring from Tom
Activiti_Activiti
train
java
988aa40661aa12c7b5584023156d9edd675bbec8
diff --git a/translator/src/main/java/com/google/devtools/j2objc/Options.java b/translator/src/main/java/com/google/devtools/j2objc/Options.java index <HASH>..<HASH> 100644 --- a/translator/src/main/java/com/google/devtools/j2objc/Options.java +++ b/translator/src/main/java/com/google/devtools/j2objc/Options.java @@ -72,7 +72,8 @@ public class Options { private static boolean docCommentsEnabled = false; private static boolean finalMethodsAsFunctions = true; private static boolean removeClassMethods = false; - private static boolean hidePrivateMembers = true; + // TODO(tball): set true again when native code accessing private Java methods is fixed. + private static boolean hidePrivateMembers = false; private static int batchTranslateMaximum = 0; private static File proGuardUsageFile = null;
Temporarily change hide-private-methods to false, so projects can fix native code that accesses private Java methods directly.
google_j2objc
train
java
16794ddc8ca46a6fb88e2f69e8844cd9e14d93dc
diff --git a/sirmordred/_version.py b/sirmordred/_version.py index <HASH>..<HASH> 100644 --- a/sirmordred/_version.py +++ b/sirmordred/_version.py @@ -1,2 +1,2 @@ # Versions compliant with PEP 440 https://www.python.org/dev/peps/pep-0440 -__version__ = "0.1.44" +__version__ = "0.1.45"
[release] Update version number to <I>
chaoss_grimoirelab-sirmordred
train
py
865f4107d8d3aa917c8a62b32fb774a0da3f4f66
diff --git a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js index <HASH>..<HASH> 100644 --- a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js +++ b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js @@ -94,13 +94,13 @@ var handlers = { } }, uninstall:function(obj, plugin, project, options) { - var podsJSON = require(path.join(project.projectDir, 'pods.json')); var src = obj.src; if (!obj.custom) { //CB-9825 cocoapod integration for plugins var keepFrameworks = keep_these_frameworks; if (keepFrameworks.indexOf(src) < 0) { if (obj.type === 'podspec') { + var podsJSON = require(path.join(project.projectDir, 'pods.json')); if(podsJSON[src]) { if(podsJSON[src].count > 1) { podsJSON[src].count = podsJSON[src].count - 1;
CB-<I> - Cocoapod integration of plugins - fix for node-windows <I> and <I> unit-test failures
apache_cordova-ios
train
js
7e74ada6effa6d429401e2f363a79594a123f269
diff --git a/externs/es3.js b/externs/es3.js index <HASH>..<HASH> 100644 --- a/externs/es3.js +++ b/externs/es3.js @@ -28,7 +28,21 @@ // These built-ins are still needed for compilation. /** + * @interface + * @template KEY1, VALUE1 + */ +function IObject() {} + +/** + * @interface + * @extends {IObject<number, VALUE2>} + * @template VALUE2 + */ +function IArrayLike() {} + +/** * @constructor + * @implements {IArrayLike<?>} * @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments */ function Arguments() {} @@ -171,18 +185,7 @@ function parseInt(num, base) {} */ function eval(code) {} -/** - * @interface - * @template KEY1, VALUE1 - */ -function IObject() {} -/** - * @interface - * @extends {IObject<number, VALUE2>} - * @template VALUE2 - */ -function IArrayLike() {} /** * @constructor
Declare Arguments as IArrayLike ------------- Created by MOE: <URL>
google_closure-compiler
train
js
12b17e96bed8aec8639f9641445828727a78906b
diff --git a/django_su/backends.py b/django_su/backends.py index <HASH>..<HASH> 100644 --- a/django_su/backends.py +++ b/django_su/backends.py @@ -9,8 +9,9 @@ except ImportError: class SuBackend(object): + supports_inactive_user = True - def authenticate(self, su=False, user_id=None, **credentials): + def authenticate(self, su=False, user_id=None, **kwargs): if not su: return None
Fixes "DeprecationWarning: Authentication backends without a `supports_inactive_user` attribute are deprecated"
adamcharnock_django-su
train
py
57a88d3fd5c2d50dbcdc302d9e22235647ce0135
diff --git a/src/tsd/RpcManager.java b/src/tsd/RpcManager.java index <HASH>..<HASH> 100644 --- a/src/tsd/RpcManager.java +++ b/src/tsd/RpcManager.java @@ -260,9 +260,12 @@ public final class RpcManager { if (mode.equals("rw") || mode.equals("wo")) { final PutDataPointRpc put = new PutDataPointRpc(tsdb.getConfig()); + final RollupDataPointRpc rollups = new RollupDataPointRpc(tsdb.getConfig()); telnet.put("put", put); + telnet.put("rollup", rollups); if (enableApi) { http.put("api/put", put); + http.put("api/rollup", rollups); } }
Add the RollupDataPointRpc to the RPC manager in read/write mode.
OpenTSDB_opentsdb
train
java
320f65ea4d493b23ea517eb7c1a1ca5b24d1f263
diff --git a/vmo/analysis/analysis.py b/vmo/analysis/analysis.py index <HASH>..<HASH> 100644 --- a/vmo/analysis/analysis.py +++ b/vmo/analysis/analysis.py @@ -136,7 +136,7 @@ def graph_adjacency_lists(oracle): Edges are stored with multiplicity. """ length = oracle.n_states - graph = [(oracle.trn[i]+oracle.rsfx[i]) for i in range(length)] + graph = [oracle.trn[i] for i in range(length)] for i in range(length): sfx_trans = oracle.sfx[i] if sfx_trans is not None: @@ -152,7 +152,7 @@ def graph_adjacency_matrix(oracle): """ length = oracle.n_states graph = [[0 for i in range(length)] for j in range(length)] - for ls in [oracle.rsfx, oracle.trn]: + for ls in [oracle.trn]: for i, js in enumerate(ls): for j in js: graph[i][j] += 1
Removed reverse suffix transitions from oracle to adjacency (list/matrix) conversion
wangsix_vmo
train
py
bf59c66e9e5b198101d3d265b8854e8a361a1be8
diff --git a/lib/opal/parser.rb b/lib/opal/parser.rb index <HASH>..<HASH> 100644 --- a/lib/opal/parser.rb +++ b/lib/opal/parser.rb @@ -636,7 +636,7 @@ module Opal when :cvar f("($opal.cvars[#{part[1].to_s.inspect}] != null ? 'class variable' : nil)", sexp) when :colon2 - [f('( (', sexp), process_colon2(part[1..-1], level), f(") != null ? 'constant' : nil)", sexp)] + [f('(function(){try { return ((', sexp), process_colon2(part[1..-1], level), f(") != null ? 'constant' : nil); } catch(e) { console.log(e); return nil; }; })()" , sexp)] when :colon3 f("($opal.Object._scope.#{sexp[0][1]} == null ? nil : 'constant')", sexp) when :ivar
Second attempt at defined? :colon2
opal_opal
train
rb
04a452f9ebfe699851df31f48c5fc4907f8423f3
diff --git a/app/components/lf-overlay.js b/app/components/lf-overlay.js index <HASH>..<HASH> 100644 --- a/app/components/lf-overlay.js +++ b/app/components/lf-overlay.js @@ -1,13 +1,26 @@ import Ember from "ember"; +var COUNTER = '__lf-modal-open-counter'; + export default Ember.Component.extend({ tagName: 'span', classNames: ['lf-overlay'], + didInsertElement: function() { - Ember.$('body').addClass('lf-modal-open'); + var body = Ember.$('body'); + var counter = body.data(COUNTER) || 0; + body.addClass('lf-modal-open'); + body.data(COUNTER, counter+1); }, + willDestroy: function() { - Ember.$('body').removeClass('lf-modal-open'); + var body = Ember.$('body'); + var counter = body.data(COUNTER) || 0; + body.data(COUNTER, counter-1); + if (counter < 2) { + body.removeClass('lf-modal-open'); + } }, + click: function() { this.sendAction('clickAway'); }
avoid racing the lf-overlay body class
ember-animation_liquid-fire
train
js
acb6c388e152f095f5ee815f97bcc0ca553af765
diff --git a/integration-tests/apps/rails/2.3.8/messaging/app/models/test_consumer.rb b/integration-tests/apps/rails/2.3.8/messaging/app/models/test_consumer.rb index <HASH>..<HASH> 100644 --- a/integration-tests/apps/rails/2.3.8/messaging/app/models/test_consumer.rb +++ b/integration-tests/apps/rails/2.3.8/messaging/app/models/test_consumer.rb @@ -1,3 +1,5 @@ +require 'torquebox/messaging/message_processor' + class TestConsumer < TorqueBox::Messaging::MessageProcessor def on_message(body)
Adding this require(), while wrong, helps my tests fail slightly differently.
torquebox_torquebox
train
rb
687e42acefaf95b4275f5e81a6cad779a598de32
diff --git a/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php index <HASH>..<HASH> 100644 --- a/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php +++ b/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php @@ -16,7 +16,7 @@ namespace TYPO3\TestingFramework\Fluid\Unit\ViewHelpers; use Prophecy\Prophecy\ObjectProphecy; use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext; -use TYPO3\CMS\Extbase\Mvc\Web\Request; +use TYPO3\CMS\Extbase\Mvc\Request; use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext; use TYPO3\TestingFramework\Core\Unit\UnitTestCase; use TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider;
[BUGFIX] Use Mvc Request instead of WebRequest in Fluid tests
TYPO3_testing-framework
train
php
af8674a2a8016336863e1db71edf9d20cfac0d44
diff --git a/nanoplotter/nanoplotter.py b/nanoplotter/nanoplotter.py index <HASH>..<HASH> 100644 --- a/nanoplotter/nanoplotter.py +++ b/nanoplotter/nanoplotter.py @@ -155,7 +155,7 @@ def scatter(x, y, names, path, color, figformat, plots, stat=None, log=False, mi plt.close("all") -def check_valid_time(df, timescol, days=5): +def check_valid_time_and_sort(df, timescol, days=5): ''' Check if the data contains reads created within the same 96-hours timeframe if not, return false and warn the user that time plots are invalid and not created @@ -179,7 +179,7 @@ def time_plots(df, path, color, figformat): Plotting function Making plots of time vs read length, time vs quality and cumulative yield ''' - dfs = check_valid_time(df, "start_time") + dfs = check_valid_time_and_sort(df, "start_time") logging.info("Nanoplotter: Creating timeplots using {} reads.".format(len(dfs))) dfs["cumyield_gb"] = dfs["lengths"].cumsum() / 10**9 dfs_sparse = dfs.sample(min(2000, len(df.index)))
renamed function to check_valid_time_and_sort
wdecoster_nanoplotter
train
py
5f69f04909843f8743b0a5b59dbed1abe56dc8b3
diff --git a/cmd/gateway-main.go b/cmd/gateway-main.go index <HASH>..<HASH> 100644 --- a/cmd/gateway-main.go +++ b/cmd/gateway-main.go @@ -217,12 +217,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) { logger.FatalIf(err, "Unable to initialize gateway backend") } - if gw.Name() != "nas" { - // Initialize policy sys for all gateways. NAS gateway already - // initializes policy sys internally, avoid double initialization. - // Additionally also don't block the initialization of gateway. - go globalPolicySys.Init(newObject) - } + go globalPolicySys.Init(newObject) // Once endpoints are finalized, initialize the new object api. globalObjLayerMutex.Lock()
nas gateway: fix regression in global bucket policy initialization (#<I>) Fixes #<I> globalPolicySys used to be initialized in fs/xl layer. The referenced commit moved this logic to server/gateway initialization,but a check to avoid double initialization prevented globalPolicySys to be loaded from disk for NAS. fixes regression from commit be<I>f<I>b<I>ef3bfd<I>a<I>f<I>ebfe
minio_minio
train
go
36d1f55125ee58ffcb2e204bedb3424682675a19
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -82,8 +82,9 @@ Plugin.getAssetChunk = function (stringOrArray, compilerOptions) { .replace('[file]', '') .replace('[query]', '') .replace('[hash]', '') - .replace('.', ''); - var mapRegex = new RegExp(mapSegment); + .replace('.', '\\.') + .replace(/\//, '\\/.*'); + var mapRegex = new RegExp(mapSegment + '$'); function isSourceMap(value) { return mapRegex.test(value);
better getAssetChunk can't find the right filename when sourceMapFilename contains directory(eg: ‘maps/[file].map’) or the entry's name contains 'map'.
ztoben_assets-webpack-plugin
train
js
e56f2e33b00a28f8324b52d2ceb5f96b21018fd9
diff --git a/src/wa_kat/data_model.py b/src/wa_kat/data_model.py index <HASH>..<HASH> 100755 --- a/src/wa_kat/data_model.py +++ b/src/wa_kat/data_model.py @@ -5,7 +5,6 @@ # # Imports ===================================================================== from collections import namedtuple -from collections import OrderedDict from kwargs_obj import KwargsObj @@ -62,11 +61,11 @@ class Model(KwargsObj): ) def get_mapping(self): - return OrderedDict( - (key, val) + return { + key: val for key, val in self.__dict__.iteritems() if val - ) + } def __repr__(self): params = ", ".join(
Removed unused ordered dict from Model.
WebarchivCZ_WA-KAT
train
py
7f94df73354234b296c6ef51fb193f38143d5b54
diff --git a/lib/ruboto/util/emulator.rb b/lib/ruboto/util/emulator.rb index <HASH>..<HASH> 100644 --- a/lib/ruboto/util/emulator.rb +++ b/lib/ruboto/util/emulator.rb @@ -7,7 +7,7 @@ module Ruboto API_LEVEL_TO_VERSION = { 10 => '2.3.3', 11 => '3.0', 12 => '3.1', 13 => '3.2', 14 => '4.0', - 15 => '4.0.3', 16 => '4.1.2', 17 => '4.2.2', + 15 => '4.0.3', 16 => '4.1.2', 17 => '4.2.2', 18 => '4.3', } def sdk_level_name(sdk_level)
* Support starting of Android <I> emulator.
ruboto_ruboto
train
rb
a83339edf68cfcc42a7c2b08d310b0fd412cb2b3
diff --git a/tests/TestHelpers/MockPhpStream.php b/tests/TestHelpers/MockPhpStream.php index <HASH>..<HASH> 100644 --- a/tests/TestHelpers/MockPhpStream.php +++ b/tests/TestHelpers/MockPhpStream.php @@ -7,9 +7,12 @@ class MockPhpStream protected $index = 0; protected $length = null; - protected $data = ''; - - public $context; + /** + * @var $data Data written to the stream. This needs to be static as + * there are multiple instances of MockPhpStream being used in PHP + * to deal with the stream wrapper. + */ + protected static $data = ''; public function stream_open($path, $mode, $options, &$opened_path) { @@ -24,10 +27,10 @@ class MockPhpStream public function stream_read($count) { if(is_null($this->length) === true){ - $this->length = strlen($this->data); + $this->length = strlen(self::$data); } $length = min($count, $this->length - $this->index); - $data = substr($this->data, $this->index); + $data = substr(self::$data, $this->index); $this->index = $this->index + $length; return $data; } @@ -39,8 +42,8 @@ class MockPhpStream public function stream_write($data) { - $this->data .= $data; - $this->length = strlen($data); + self::$data .= $data; + $this->length = strlen(self::$data); return $this->length; } }
github-<I>: share data across instances of MockPhpStream as multiple instances are being used between file_put_contents and file_get_contents
rollbar_rollbar-php
train
php
6383d13edd6cbd638b30dea6842b6fc480113b5e
diff --git a/benchbuild/project.py b/benchbuild/project.py index <HASH>..<HASH> 100644 --- a/benchbuild/project.py +++ b/benchbuild/project.py @@ -59,17 +59,18 @@ class ProjectRegistry(type): ) -> tp.Any: """Register a project in the registry.""" cls = super(ProjectRegistry, mcs).__new__(mcs, name, bases, attrs) + name = attrs["NAME"] if "NAME" in attrs else cls.NAME + domain = attrs["DOMAIN"] if "DOMAIN" in attrs else cls.DOMAIN + group = attrs["GROUP"] if "GROUP" in attrs else cls.GROUP - defined_attrs = all( - attr in attrs and attrs[attr] is not None - for attr in ['NAME', 'DOMAIN', 'GROUP'] - ) + defined_attrs = all(bool(attr) for attr in [name, domain, group]) if bases and defined_attrs: - key = f'{attrs["NAME"]}/{attrs["GROUP"]}' - key_dash = f'{attrs["NAME"]}-{attrs["GROUP"]}' + key = f'{name}/{group}' + key_dash = f'{name}-{group}' ProjectRegistry.projects[key] = cls ProjectRegistry.projects[key_dash] = cls + return cls
fix(project): project registration for groups This fixes project registration for grouped projects. As soon as some class attributes were defined on the group level of the type hierarchy, we wouldn't register any child of this group class. We fix this by preferring the attributes of the subclass and take the attributes of the superclass, if we can't find any.
PolyJIT_benchbuild
train
py
8fa0f44445a0ae1965f9fc82f6de81d149ec3ae3
diff --git a/webapps/ui/cockpit/client/scripts/directives/stateCircle.js b/webapps/ui/cockpit/client/scripts/directives/stateCircle.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/client/scripts/directives/stateCircle.js +++ b/webapps/ui/cockpit/client/scripts/directives/stateCircle.js @@ -27,6 +27,10 @@ module.exports = function() { updateStateCircle(); }); + scope.$watch(attrs.running, function() { + updateStateCircle(); + }); + function updateStateCircle() { var incidents = scope.$eval(attrs.incidents); var running = scope.$eval(attrs.running);
chore(cockpit): watch running attr of state circle related to CAM-<I>
camunda_camunda-bpm-platform
train
js
4347754ac202e482c9d11b5ae93bed0c95a15bf5
diff --git a/packages/swagger2openapi/index.js b/packages/swagger2openapi/index.js index <HASH>..<HASH> 100644 --- a/packages/swagger2openapi/index.js +++ b/packages/swagger2openapi/index.js @@ -1058,6 +1058,7 @@ function convertObj(swagger, options, callback) { .catch(function (err) { reject(err); }); + return; } if ((!swagger.swagger) || (swagger.swagger != "2.0")) {
converter; don't fall thru from openapi3 input
Mermade_oas-kit
train
js
6553e205f1449230d289116a28e1693c9d03eadf
diff --git a/lib/firehose/rack/consumer.rb b/lib/firehose/rack/consumer.rb index <HASH>..<HASH> 100644 --- a/lib/firehose/rack/consumer.rb +++ b/lib/firehose/rack/consumer.rb @@ -78,6 +78,9 @@ module Firehose end subs + rescue JSON::ParserError + Firehose.logger.warn "Consumer.post_subscriptions: JSON::ParserError for request body: #{body.inspect}" + [] end # Let the client configure the consumer on initialization.
Add handling for JSON parser errors Poll Everywhere has been seeing large numbers of `JSON::ParserError`s in spikes, and our error tracker has been unhelpful in identifying the source.
firehoseio_firehose
train
rb
22944a308d08266ab82c59c8688938606e4c9088
diff --git a/packages/jsio.js b/packages/jsio.js index <HASH>..<HASH> 100644 --- a/packages/jsio.js +++ b/packages/jsio.js @@ -822,5 +822,10 @@ return jsio; } - jsio = init(null, {}); + var J= init(null, {}); + if (J.__env.global.module.exports) { + exports.jsio = J; + } else { + jsio = J; + } })();
if we're in node, return jsio from require Also don't add jsio to the global namespace
gameclosure_js.io
train
js
7d35affd1a8a38fd4b98fbbf3d3b0a7e5a84fd6d
diff --git a/tests/lib/rules/no-spaced-func.js b/tests/lib/rules/no-spaced-func.js index <HASH>..<HASH> 100644 --- a/tests/lib/rules/no-spaced-func.js +++ b/tests/lib/rules/no-spaced-func.js @@ -254,6 +254,20 @@ vows.describe(RULE_ID).addBatch({ assert.equal(messages.length, 0); } + }, + + "when evaluating 'var f = new Foo'": { + + topic: "var f = new Foo", + + "should not report a violation": function(topic) { + var config = { rules: {} }; + config.rules[RULE_ID] = 1; + + var messages = eslint.verify(topic, config); + + assert.equal(messages.length, 0); + } } }).export(module);
Add test coverage for new Foo constructor usage
eslint_eslint
train
js
b10d6b300f66005639e1c98a3784181e1daa1f6c
diff --git a/lib/blog.js b/lib/blog.js index <HASH>..<HASH> 100644 --- a/lib/blog.js +++ b/lib/blog.js @@ -241,12 +241,12 @@ module.exports = function (pServer) { pResponse.redirect('/#/blogs'); }); - pServer.get('/tags/:tag', function (pRequest, pResponse) { - pResponse.redirect('/#//tags/' + pRequest.params.tag); + pServer.get('/blogs/tags/:tag', function (pRequest, pResponse) { + pResponse.redirect('/#/blogs/tags/' + pRequest.params.tag); }); - pServer.get('/query/:query', function (pRequest, pResponse) { - pResponse.redirect('/#/query/' + pRequest.params.query); + pServer.get('/blogs/query/:query', function (pRequest, pResponse) { + pResponse.redirect('/#/blogs/query/' + pRequest.params.query); }); pServer.get('/blogs/posts/:year/:month/:date/:slug', function (pRequest, pResponse) {
cron job commit @ Wed Jul <I> <I> <I>:<I>:<I> GMT<I> (India Standard Time)
sumeetdas_Meow
train
js
bd6fc6baa784dffde1efa286144dbf6b0a883bf9
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb index <HASH>..<HASH> 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb @@ -31,7 +31,7 @@ module WidgetPropertiesHelper check_box_tag definition.key(), "true", val=='true' elsif definition.type.name()==WidgetProperty::TYPE_METRIC - select_tag definition.key(), options_grouped_by_domain(Metric.all.select{|m| m.display?}, val, :include_empty => true) + select_tag definition.key(), options_grouped_by_domain(Metric.all.select{|m| m.display?}.sort_by{|m| m.short_name}, val, :include_empty => true) elsif definition.type.name()==WidgetProperty::TYPE_STRING text_field_tag definition.key(), val, :size => 10
SONAR-<I> Metrics are not sorted in the configuration panel of widgets
SonarSource_sonarqube
train
rb
bf2e2e5166981ace34da4dc99d7be41dc6500d71
diff --git a/lib/terraforming/resource/network_acl.rb b/lib/terraforming/resource/network_acl.rb index <HASH>..<HASH> 100644 --- a/lib/terraforming/resource/network_acl.rb +++ b/lib/terraforming/resource/network_acl.rb @@ -60,7 +60,7 @@ module Terraforming::Resource end def network_acls - @client.describe_network_acls(filters: [{ name: "default", values: ["false"] }]).network_acls + @client.describe_network_acls.network_acls end def to_port_of(entry)
Remove describe_network_acls filter
dtan4_terraforming
train
rb
353bbad47aa329682dbba6d41e2b14f65ba5cb9b
diff --git a/version.php b/version.php index <HASH>..<HASH> 100644 --- a/version.php +++ b/version.php @@ -6,9 +6,9 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2006032800; // YYYYMMDD = date + $version = 2006032900; // YYYYMMDD = date // XY = increments within a single day - $release = '1.6 development'; // Human-friendly version name + $release = '1.6 Beta 1'; // Human-friendly version name ?>
Let's call it this, tomorrow. :-)
moodle_moodle
train
php
c5612008b43248b85e3392d288da14058d972da0
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -15,10 +15,17 @@ module.exports = function (options) { s.set('filename', file.path); s.set('paths', paths.concat([path.dirname(file.path)])); - // Load Nib if available - try { - s.use(require('nib')()); - } catch (e) {} + //trying to load extensions from array passed by user + if (options.use && options.use.length > 0){ + s.use(function(stylus){ + for (var i = 0, l = options.use.length; i < l; i++){ + try{ + stylus.use(require(options.use[i])()); + } + catch(e){} + } + }); + } s.render(function(err, css){ if (err) return cb(err); diff --git a/test/main.js b/test/main.js index <HASH>..<HASH> 100644 --- a/test/main.js +++ b/test/main.js @@ -31,7 +31,7 @@ describe('gulpstylus', function(){ }); it ('should uitlize nib when possible', function(done){ - var stream = stylus(); + var stream = stylus({use: ['nib']}); var fakeFile = new gutil.File({ base: 'test/fixtures', cwd: 'test/',
introduce use array to options. remove nib by default
stevelacy_gulp-stylus
train
js,js
469ab3a72f9c8feecdefa6b4b13b58b89086b1ed
diff --git a/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js b/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js index <HASH>..<HASH> 100644 --- a/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js +++ b/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js @@ -8,7 +8,7 @@ class ModelessOverlay extends React.Component { constructor(props) { super(props); this.state = { isIn: false }; - this.inTimer = new Timer(null, 150); + this.inTimer = new Timer(this.updateForTransitions, 150); } componentWillUnmount() { @@ -30,7 +30,8 @@ class ModelessOverlay extends React.Component { ); if (isIn !== show) { - this.inTimer.startTimer(() => this.updateForTransitions(), show ? 0 : 150); + this.inTimer.clearTimer(); + this.inTimer.startTimer(); } const dialogClasses = classNames('modal-dialog', {
fix(ModelessOverlay): Fix for animation on open in Firefox browser (#<I>) Use a <I>ms delay to update show & in classes for both open and close fixes #<I>
patternfly_patternfly-react
train
js
e15e02bf98f964e837893a13aff4f04c59ce0d5c
diff --git a/lib/pagelib.php b/lib/pagelib.php index <HASH>..<HASH> 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -104,7 +104,7 @@ function page_map_class($type, $classname = NULL) { } } - if (!class_exists($mappings[$type])) { + if (empty($classname) && !class_exists($mappings[$type])) { if ($CFG->debug > 7) { error('Page class mapping for id "'.$type.'" exists but class "'.$mappings[$type].'" is not defined'); }
Merging from STABLE: Fix for bug <I>: Certain obscure cases of using PHP accelerators (probably has to do with OS and PHP version as well, but it's not certain) caused an error to be displayed when importing data from "local pagelib" files with "debug" turned on. The error was bogus, but error() stopped the page from being displayed. Thanks to James P. Dugal the from University of Louisiana at Lafayette for identifying and helping to solve the problem!
moodle_moodle
train
php
5808404f9b8dbe919f158934acd5d6d37f7f5084
diff --git a/src/Drupal/Driver/Exception/BootstrapException.php b/src/Drupal/Driver/Exception/BootstrapException.php index <HASH>..<HASH> 100644 --- a/src/Drupal/Driver/Exception/BootstrapException.php +++ b/src/Drupal/Driver/Exception/BootstrapException.php @@ -1,19 +1,29 @@ <?php +/** + * @file + * Contains \Drupal\Driver\Exception\BootstrapException. + */ + namespace Drupal\Driver\Exception; /** * Bootstrap exception. */ class BootstrapException extends Exception { + /** * Initializes exception. * * @param string $message + * The exception message. * @param int $code - * @param \Exception|null $previous + * Optional exception code. Defaults to 0. + * @param \Exception $previous + * Optional previous exception that was thrown. */ - public function __construct($message, $code = 0, \Exception $previous = null) { - parent::__construct($message, null, $code, $previous); + public function __construct($message, $code = 0, \Exception $previous = NULL) { + parent::__construct($message, NULL, $code, $previous); } + }
Fix code sniffer warnings in BootstrapException.
jhedstrom_DrupalDriver
train
php
a7512c4276a553d8acc533881b4e1752720e0a84
diff --git a/python/sparknlp/__init__.py b/python/sparknlp/__init__.py index <HASH>..<HASH> 100644 --- a/python/sparknlp/__init__.py +++ b/python/sparknlp/__init__.py @@ -36,7 +36,10 @@ def start(include_ocr=False): .config("spark.serializer", "org.apache.spark.serializer.KryoSerializer") if include_ocr: - builder.config("spark.jars.packages", "JohnSnowLabs:spark-nlp:2.0.4,com.johnsnowlabs.nlp:spark-nlp-ocr_2.11:2.0.4") + builder \ + .config("spark.jars.packages", "JohnSnowLabs:spark-nlp:2.0.4,com.johnsnowlabs.nlp:spark-nlp-ocr_2.11:2.0.4,javax.media.jai:com.springsource.javax.media.jai.core:1.1.3") \ + .config("spark.jars.repositories", "http://repo.spring.io/plugins-release") + else: builder.config("spark.jars.packages", "JohnSnowLabs:spark-nlp:2.0.4") \
Included ocr dependency coordinates in sparknlp quickstart
JohnSnowLabs_spark-nlp
train
py
4e01f6ef562d9e0fd49f14e962121a1349c88d06
diff --git a/lib/versions.js b/lib/versions.js index <HASH>..<HASH> 100644 --- a/lib/versions.js +++ b/lib/versions.js @@ -11,6 +11,10 @@ class ChromedriverVersion { this.defaultVersion = pkg.config.defaultVersion; this.versionMap = [ { + chromedriverVersion: '2.45', + webviewVersions: [70, 72] + }, + { chromedriverVersion: '2.36', webviewVersions: [63, 70] }, {
fear: update version map (#<I>)
macacajs_macaca-chromedriver
train
js
bfc01758d38acf20933b6efca55c2e3d75d76467
diff --git a/src/Illuminate/Cache/MemcachedConnector.php b/src/Illuminate/Cache/MemcachedConnector.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Cache/MemcachedConnector.php +++ b/src/Illuminate/Cache/MemcachedConnector.php @@ -27,9 +27,9 @@ class MemcachedConnector { ); } - if ($memcached->getVersion() === false) + if (in_array('255.255.255', $memcached->getVersion())) { - throw new RuntimeException("Could not establish Memcached connection."); + throw new RuntimeException("Could not establish connection to one or more Memcached servers."); } return $memcached;
Incorrect Memcached connection failure detection Memcached::getVersion() returns a list of servers and their versions. On connection failure it does not return boolean false, it returns the failed server version as "<I>". See: <URL>
laravel_framework
train
php
e33b7a330cf2bfa984d4d0ccb9b86455cb85dd2b
diff --git a/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js b/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js +++ b/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js @@ -616,8 +616,7 @@ export default class Meetings extends WebexPlugin { }) .then((options = {}) => { // Normalize the destination. - const targetDest = options.wasHydraPerson ? options.destination : destination; - + const targetDest = options.destination || destination; // check for the conversation URL then sip Url let meeting = null;
fix(plugin-meetings): use fetch info for destination
webex_spark-js-sdk
train
js
58af879b2671e8a320781484d98a2b5bb7683c7a
diff --git a/examples/multizone_shimmer.py b/examples/multizone_shimmer.py index <HASH>..<HASH> 100644 --- a/examples/multizone_shimmer.py +++ b/examples/multizone_shimmer.py @@ -30,12 +30,7 @@ def main(): if strip != None: print("Selecting " + strip.get_label()) - #%h, s, v, k = l.get_color_zones() - all_zones = [] - for i in range(4): - zones = strip.get_color_zones(0+(i*8),7+(i*8)) - all_zones += zones - #print(all_zones) + all_zones = strip.get_color_zones() original_zones = deepcopy(all_zones) zone_buff = all_zones @@ -46,7 +41,7 @@ def main(): for i in range(12): z = -1 while z in ignore: - z = randrange(0,31) + z = randrange(0,len(zone_buff)) ignore.append(z) h, s, v, k = zone_buff[z] zone_buff[z] = h, s, 2000, k @@ -56,7 +51,7 @@ def main(): for i in range(12): z = -1 while z in ignore: - z = randrange(0,31) + z = randrange(0,len(zone_buff)) ignore.append(z) h, s, v, k = zone_buff[z] zone_buff[z] = h, s, 65535, k
Updated to accommodate new MultiZone get_color_zones behavior
mclarkk_lifxlan
train
py
b155dcd2dfd94ca63788335c95a74cdf403853d9
diff --git a/lib/agent/triggers/network/index.js b/lib/agent/triggers/network/index.js index <HASH>..<HASH> 100644 --- a/lib/agent/triggers/network/index.js +++ b/lib/agent/triggers/network/index.js @@ -9,6 +9,7 @@ var emitter, var get_current = function(list){ list.forEach(function(field){ providers.get(field, function(err, data){ + // console.log(field + ' -> ' + data); current[field] = data; }) }) @@ -19,8 +20,7 @@ var check_if_changed = function(field, event) { checking[field] = true; providers.get(field, function(err, data){ - // console.log(field + ' result: ' + data); - + // console.log(field + ' -> ' + data); if (current[field] != data) emitter.emit(event, data); @@ -35,8 +35,10 @@ exports.start = function(opts, cb){ if (err) return cb(err); network.on('state_changed', function(info){ - check_if_changed('active_access_point_name', 'ssid_changed'); - check_if_changed('private_ip', 'private_ip_changed'); + setTimeout(function(){ + check_if_changed('active_access_point_name', 'ssid_changed'); + check_if_changed('private_ip', 'private_ip_changed'); + }, 100); // wait a sec so IP gets assigned }); emitter = new Emitter();
Wait a few milisecs before checking connection status on network change event.
prey_prey-node-client
train
js
fed191caacf8f886c26809b92a279327d7266003
diff --git a/lib/httplog/adapters/http.rb b/lib/httplog/adapters/http.rb index <HASH>..<HASH> 100644 --- a/lib/httplog/adapters/http.rb +++ b/lib/httplog/adapters/http.rb @@ -14,7 +14,10 @@ if defined?(::HTTP::Client) && defined?(::HTTP::Connection) if log_enabled HttpLog.log_request(req.verb, req.uri) HttpLog.log_headers(req.headers.to_h) - HttpLog.log_data(req.body) #if req.verb == :post + body = req.body + body = body.source if body.respond_to?(:source) + HttpLog.log_data(body.to_s) + body.rewind if body.respond_to?(:rewind) end bm = Benchmark.realtime do
fix for httprb/http version 4
trusche_httplog
train
rb
d675c28d8a8b4bc39142c24165579d75ac654ff8
diff --git a/concrete/dispatcher.php b/concrete/dispatcher.php index <HASH>..<HASH> 100644 --- a/concrete/dispatcher.php +++ b/concrete/dispatcher.php @@ -14,6 +14,15 @@ require __DIR__ . '/bootstrap/configure.php'; /* * ---------------------------------------------------------------------------- + * Make sure you cannot call dispatcher.php directly. + * ---------------------------------------------------------------------------- + */ +if (basename($_SERVER['PHP_SELF']) === DISPATCHER_FILENAME_CORE) { + die('Access Denied.'); +} + +/* + * ---------------------------------------------------------------------------- * Include all autoloaders. * ---------------------------------------------------------------------------- */
Fix errors on navigating directly to dispatcher.php (#<I>)
concrete5_concrete5
train
php
ac3d2a37646e8550904b2294969046be0f38c275
diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index <HASH>..<HASH> 100644 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -34,18 +34,6 @@ class HtmlBuilder extends BaseHtmlBuilder } /** - * {@inheritdoc} - */ - public function entities($value, bool $encoding = false): string - { - if ($value instanceof Htmlable) { - return $value->toHtml(); - } - - return parent::entities($value, $encoding); - } - - /** * Create a new HTML expression instance are used to inject HTML. * * @param string $value
Doesn't need to override entities().
orchestral_html
train
php
1d22029ed89376a4a3773368bcbdd3ed78c6fc3b
diff --git a/lib/active_remote/version.rb b/lib/active_remote/version.rb index <HASH>..<HASH> 100644 --- a/lib/active_remote/version.rb +++ b/lib/active_remote/version.rb @@ -1,3 +1,3 @@ module ActiveRemote - VERSION = "1.5.0" + VERSION = "1.5.1" end
Bumping version to <I>.
liveh2o_active_remote
train
rb
628caff98fe19a63b2c965efb4be34b58ab2733a
diff --git a/stanza/models/classifier.py b/stanza/models/classifier.py index <HASH>..<HASH> 100644 --- a/stanza/models/classifier.py +++ b/stanza/models/classifier.py @@ -153,6 +153,7 @@ def read_dataset(dataset, wordvec_type): lines.extend(new_lines) lines = [x.strip() for x in lines] lines = [x.split(maxsplit=1) for x in lines if x] + lines = [x for x in lines if len(x) > 1] # TODO: maybe do this processing later, once the model is built. # then move the processing into the model so we can use # overloading to potentially make future model types
Some datasets wind up with blank lines if you remove too much junk
stanfordnlp_stanza
train
py