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
29ba8604292d0617b12d0d5d0ba444adc715fc88
diff --git a/source/application/models/oxuser.php b/source/application/models/oxuser.php index <HASH>..<HASH> 100644 --- a/source/application/models/oxuser.php +++ b/source/application/models/oxuser.php @@ -843,7 +843,7 @@ class oxUser extends oxBase } $this->oxuser__oxshopid = new oxField($sShopID, oxField::T_RAW); - if (!($blOK = $this->save())) { + if (($blOK = $this->save())) { // dropping/cleaning old delivery address/payment info $oDb->execute("delete from oxaddress where oxaddress.oxuserid = " . $oDb->quote($this->oxuser__oxid->value) . " "); $oDb->execute("update oxuserpayments set oxuserpayments.oxuserid = " . $oDb->quote($this->oxuser__oxusername->value) . " where oxuserpayments.oxuserid = " . $oDb->quote($this->oxuser__oxid->value) . " ");
Use correct error translations in user creation EXCEPTION_USER_USERCREATIONFAILED was changed to ERROR_MESSAGE_USER_USERCREATIONFAILED, therefore usages had to be updated. Also removed not used translations. closes #<I>
OXID-eSales_oxideshop_ce
train
php
732e48eb62fee4a4726e52766ceaccfa2dd05d9d
diff --git a/src/Embedder/AttachmentEmbedder.php b/src/Embedder/AttachmentEmbedder.php index <HASH>..<HASH> 100644 --- a/src/Embedder/AttachmentEmbedder.php +++ b/src/Embedder/AttachmentEmbedder.php @@ -2,17 +2,17 @@ namespace Eduardokum\LaravelMailAutoEmbed\Embedder; -use Eduardokum\LaravelMailAutoEmbed\Models\EmbeddableEntity; -use Swift_EmbeddedFile; use Swift_Image; use Swift_Message; +use Swift_EmbeddedFile; +use Eduardokum\LaravelMailAutoEmbed\Models\EmbeddableEntity; class AttachmentEmbedder extends Embedder { /** * @var Swift_Message */ - private $message; + protected $message; /** * AttachmentEmbedder constructor. @@ -57,7 +57,7 @@ class AttachmentEmbedder extends Embedder * @param Swift_EmbeddedFile $attachment * @return string */ - private function embed(Swift_EmbeddedFile $attachment) + protected function embed(Swift_EmbeddedFile $attachment) { return $this->message->embed($attachment); }
Change to protected instead private It's should be like this. No need to make function private.
eduardokum_laravel-mail-auto-embed
train
php
324d1b281a8df20a26b92f42bf7fda0cca892116
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -22,13 +22,13 @@ install_requires = [ setup( name='figgypy', - version='1.1.7', + version='1.2.dev', description='Simple configuration tool. Get config from yaml, json, or xml.', long_description=readme, author='Herkermer Sherwood', author_email='theherk@gmail.com', url='https://github.com/theherk/figgypy', - download_url='https://github.com/theherk/figgypy/archive/1.1.7.zip', + download_url='https://github.com/theherk/figgypy/archive/1.2.dev.zip', packages=find_packages(), platforms=['all'], license='MIT',
Update setup.py to develop version
theherk_figgypy
train
py
e98aac4327fc6244047598f42a37053ebf528149
diff --git a/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java b/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java index <HASH>..<HASH> 100644 --- a/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationContextLoader.java @@ -212,7 +212,7 @@ public class SpringApplicationContextLoader extends AbstractContextLoader { public void processContextConfiguration( ContextConfigurationAttributes configAttributes) { super.processContextConfiguration(configAttributes); - if (!configAttributes.hasLocations() && !configAttributes.hasClasses()) { + if (!configAttributes.hasResources()) { Class<?>[] defaultConfigClasses = detectDefaultConfigurationClasses(configAttributes .getDeclaringClass()); configAttributes.setClasses(defaultConfigClasses);
Polish d<I>bc<I> Closes gh-<I>
spring-projects_spring-boot
train
java
35232956fabeaa8b42798a983965047a1710a754
diff --git a/src/saml2/entity.py b/src/saml2/entity.py index <HASH>..<HASH> 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -867,16 +867,16 @@ class Entity(HTTPBase): if "asynchop" not in kwargs: if binding in [BINDING_SOAP, BINDING_PAOS]: - asynchop = False + kwargs["asynchop"] = False else: - asynchop = True + kwargs["asynchop"] = True if xmlstr: if "return_addrs" not in kwargs: if binding in [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST]: try: # expected return address - return_addrs = self.config.endpoint( + kwargs["return_addrs"] = self.config.endpoint( service, binding=binding) except Exception: logger.info("Not supposed to handle this!")
Fixed proposed by Erick Tryzelaar
IdentityPython_pysaml2
train
py
451e4a0c4e14932dea9e5afac8da7c50a3835b18
diff --git a/jenkins/check_projects.py b/jenkins/check_projects.py index <HASH>..<HASH> 100644 --- a/jenkins/check_projects.py +++ b/jenkins/check_projects.py @@ -84,9 +84,8 @@ def CheckProjects(needed, fix=False): for role, needs in sorted(needed.items()): print >>sys.stderr, ' %s: %s' % (role, ','.join(Sane(n) for n in needs)) - mutate = fix == '--fix' threads = [ - threading.Thread(target=Check, args=(p, needed, mutate)) + threading.Thread(target=Check, args=(p, needed, fix)) for p in sorted(projects) ]
fix is a bool, not a string
kubernetes_test-infra
train
py
19b2759d8879bb97bd3af27f3c7ef729c3f01c41
diff --git a/Resources/public/angularjs/Editor/EditorApp.js b/Resources/public/angularjs/Editor/EditorApp.js index <HASH>..<HASH> 100644 --- a/Resources/public/angularjs/Editor/EditorApp.js +++ b/Resources/public/angularjs/Editor/EditorApp.js @@ -6,7 +6,6 @@ var EditorApp = angular.module('EditorApp', [ 'ngSanitize', 'ui.bootstrap', 'ui.pageslide', - /*'ui.sortable', */ 'ui.tinymce', 'ui.translation', 'ui.resourcePicker',
[PathBundle] Drag and Drop path scenario steps
claroline_Distribution
train
js
298949cf3124fa25d6054955ef69deb8b7b1692b
diff --git a/lib/cisco_node_utils/portchannel_global.rb b/lib/cisco_node_utils/portchannel_global.rb index <HASH>..<HASH> 100644 --- a/lib/cisco_node_utils/portchannel_global.rb +++ b/lib/cisco_node_utils/portchannel_global.rb @@ -39,6 +39,10 @@ module Cisco # PROPERTIES # ######################################################## + def load_balance_type + config_get('portchannel_global', 'load_balance_type') + end + def hash_distribution config_get('portchannel_global', 'hash_distribution') end
Adding a new method to get lb type
cisco_cisco-network-node-utils
train
rb
07bf24a3b47c6b4e18b3a19471930682c7c74a83
diff --git a/lib/watchaggregator/aggregator.go b/lib/watchaggregator/aggregator.go index <HASH>..<HASH> 100644 --- a/lib/watchaggregator/aggregator.go +++ b/lib/watchaggregator/aggregator.go @@ -98,6 +98,9 @@ func (dir *eventDir) eventType() fs.EventType { } type aggregator struct { + // folderID never changes and is accessed in CommitConfiguration, which + // asynchronously updates folderCfg -> can't use folderCfg.ID (racy) + folderID string folderCfg config.FolderConfiguration folderCfgUpdate chan config.FolderConfiguration // Time after which an event is scheduled for scanning when no modifications occur. @@ -112,6 +115,7 @@ type aggregator struct { func newAggregator(folderCfg config.FolderConfiguration, ctx context.Context) *aggregator { a := &aggregator{ + folderID: folderCfg.ID, folderCfgUpdate: make(chan config.FolderConfiguration), notifyTimerNeedsReset: false, notifyTimerResetChan: make(chan time.Duration), @@ -390,7 +394,7 @@ func (a *aggregator) VerifyConfiguration(from, to config.Configuration) error { func (a *aggregator) CommitConfiguration(from, to config.Configuration) bool { for _, folderCfg := range to.Folders { - if folderCfg.ID == a.folderCfg.ID { + if folderCfg.ID == a.folderID { select { case a.folderCfgUpdate <- folderCfg: case <-a.ctx.Done():
lib/watchaggregator: Prevent race on config update (#<I>)
syncthing_syncthing
train
go
b99ba2dbf3dace6ac87531a77ca91dbabda177e1
diff --git a/bundles/org.eclipse.orion.client.ui/web/browse/builder/browse.js b/bundles/org.eclipse.orion.client.ui/web/browse/builder/browse.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.ui/web/browse/builder/browse.js +++ b/bundles/org.eclipse.orion.client.ui/web/browse/builder/browse.js @@ -117,7 +117,7 @@ define('browse/builder/browse', ['orion/widgets/browse/fileBrowser', 'orion/serv selectorNumber: selectorNumber, rootName: params.rootName, widgetSource: _browser_script_source ? {repo: params.repo, base: params.base, js: _browser_script_source , css: _browser_script_source.replace(/built-browser.*.js/, "built-browser.css")} : null, - maxEditorLines: params.snippetShareOptions && params.snippetShareOptions.maxL ? params.snippetShareOptions.maxL : 300, + maxEditorLines: params.snippetShareOptions && params.snippetShareOptions.maxL ? params.snippetShareOptions.maxL : 45, init: true }); var pluginRegistry = new mPluginRegistry.PluginRegistry(serviceRegistry, {
R/O file widget: reduce the number of visible lines in the editor for better scroll UX.
eclipse_orion.client
train
js
8ca330e88571a2c329385a6225aca368d7700bbb
diff --git a/Swat/SwatString.php b/Swat/SwatString.php index <HASH>..<HASH> 100644 --- a/Swat/SwatString.php +++ b/Swat/SwatString.php @@ -1056,7 +1056,7 @@ class SwatString extends SwatObject } else { if ($significant_digits !== null) { // round to number of significant digits - $integer_digits = ceil(log10($value)); + $integer_digits = floor(log10($value)) + 1; $fractional_digits = max($significant_digits - $integer_digits, 0);
Count integer digits properly. svn commit r<I>
silverorange_swat
train
php
c5f6760c6804b5f0dfbec1ddd2953b3c58db58ce
diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java b/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java index <HASH>..<HASH> 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java @@ -351,7 +351,7 @@ public class ChunkedWriteHandler void fail(Throwable cause) { ReferenceCountUtil.release(msg); if (promise != null) { - promise.setFailure(cause); + promise.tryFailure(cause); } }
[#<I>] Fix IllegalStateException which was produced during failing ChunkedWrite after the channel was closed
netty_netty
train
java
b465d024ec340ed92dbc53907d3ee4ebffd0422b
diff --git a/src/Addressable.php b/src/Addressable.php index <HASH>..<HASH> 100644 --- a/src/Addressable.php +++ b/src/Addressable.php @@ -82,9 +82,7 @@ class Addressable extends DataExtension public function updateFrontEndFields(FieldList $fields) { - if (!$fields->dataFieldByName("Address")) { - $fields->merge($this->getAddressFields()); - } + $fields->merge($this->getAddressFields()); } public function populateDefaults()
Removed a check as merge simply overrides keys
symbiote_silverstripe-addressable
train
php
d303e62474467af24790453d08e9001d90621529
diff --git a/htmresearch/frameworks/layers/l2_l4_inference.py b/htmresearch/frameworks/layers/l2_l4_inference.py index <HASH>..<HASH> 100644 --- a/htmresearch/frameworks/layers/l2_l4_inference.py +++ b/htmresearch/frameworks/layers/l2_l4_inference.py @@ -141,7 +141,7 @@ class L4L2Experiment(object): longDistanceConnections = 0, maxConnectionDistance = 1, columnPositions = None, - decayFunction = lambda x: 1./(x**2), + decayFunction = lambda x: 1./x, L4Overrides=None, numLearningPoints=3, seed=42,
RES-<I> Upload experiment details to domino
numenta_htmresearch
train
py
dbe0056af1e71210ce72f0f8e878f142647a7947
diff --git a/lib/tripod/resource.rb b/lib/tripod/resource.rb index <HASH>..<HASH> 100644 --- a/lib/tripod/resource.rb +++ b/lib/tripod/resource.rb @@ -53,7 +53,7 @@ module Tripod::Resource # performs equality checking on the uris def ==(other) self.class == other.class && - uri.to_s == other.to_s + uri.to_s == other.uri.to_s end # performs equality checking on the class diff --git a/lib/tripod/version.rb b/lib/tripod/version.rb index <HASH>..<HASH> 100644 --- a/lib/tripod/version.rb +++ b/lib/tripod/version.rb @@ -1,3 +1,3 @@ module Tripod - VERSION = "0.7.25" + VERSION = "0.7.26" end
fix to the last fix (resource equality)
Swirrl_tripod
train
rb,rb
d40a26bc5b87c2dd3d147b9e073cce2189183c96
diff --git a/foolbox/attacks/lbfgs.py b/foolbox/attacks/lbfgs.py index <HASH>..<HASH> 100644 --- a/foolbox/attacks/lbfgs.py +++ b/foolbox/attacks/lbfgs.py @@ -140,7 +140,7 @@ class LBFGSAttack(Attack): def crossentropy(x): logits, gradient, _ = a.predictions_and_gradient( - x.reshape(shape), target_class) + x.reshape(shape), target_class, strict=False) gradient = gradient.reshape(-1) ce = utils.crossentropy(logits=logits, label=target_class) return ce, gradient
Removed strict bound checks in LBFGS
bethgelab_foolbox
train
py
b0cb12ac93508de1af5fb0126403dab147f7bcce
diff --git a/backup/restorelib.php b/backup/restorelib.php index <HASH>..<HASH> 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -4696,7 +4696,7 @@ break; } } - if ($this->level == 6 && $this->tree[5]!="ROLE_ASSIGNMENTS" && $this->tree[5]!="ROLE_OVERRIDES") { + if ($this->level == 6 && $this->tree[5]!="ROLES_ASSIGNMENTS" && $this->tree[5]!="ROLES_OVERRIDES") { switch ($tagName) { case "ROLE": //We've finalized a role, get it @@ -4711,7 +4711,7 @@ } } - if ($this->level == 7 && $this->tree[5]!="ROLE_ASSIGNMENTS" && $this->tree[5]!="ROLE_OVERRIDES") { + if ($this->level == 7) { switch ($tagName) { case "TYPE": $this->info->temprole->type = $this->getContents(); @@ -6743,4 +6743,4 @@ fclose($restorelog); } } -?> \ No newline at end of file +?>
merged, apply nick's patch for MDL-<I>, typo in restorelib.php
moodle_moodle
train
php
520a93c7ee0b6af77ed47351f8a5ce252483f0bd
diff --git a/src/main/java/org/minimalj/frontend/impl/json/JsonPasswordField.java b/src/main/java/org/minimalj/frontend/impl/json/JsonPasswordField.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/minimalj/frontend/impl/json/JsonPasswordField.java +++ b/src/main/java/org/minimalj/frontend/impl/json/JsonPasswordField.java @@ -7,13 +7,13 @@ import org.minimalj.frontend.Frontend.InputComponentListener; import org.minimalj.frontend.Frontend.PasswordField; public class JsonPasswordField extends JsonInputComponent<char[]> implements PasswordField { - private static final String MAX_LENGTH = "maxLength"; private InputComponentListener changeListener; public JsonPasswordField(int maxLength, InputComponentListener changeListener) { - super("PasswordField", changeListener); - put(MAX_LENGTH, maxLength); + super("TextField", changeListener); + put(JsonTextField.INPUT_TYPE, "password"); + put(JsonTextField.MAX_LENGTH, maxLength); this.changeListener = changeListener; }
JsonPasswordField: no need for special field type
BrunoEberhard_minimal-j
train
java
722ab2ebbed0fd519338c8254ba29e511d3b6456
diff --git a/api/server/sdk/volume_migrate.go b/api/server/sdk/volume_migrate.go index <HASH>..<HASH> 100644 --- a/api/server/sdk/volume_migrate.go +++ b/api/server/sdk/volume_migrate.go @@ -43,14 +43,14 @@ func (s *VolumeServer) Start( labels := make(map[string]string, 0) labels["group"] = volumeGroup.GetGroupId() if !s.haveOwnership(ctx, labels) { - return nil, status.Error(codes.InvalidArgument, "Volume Operation not Permitted.") + return nil, status.Error(codes.PermissionDenied, "Volume Operation not Permitted.") } //migrate volume groups return s.volumeGroupMigrate(ctx, req, volumeGroup) } else if allVolumes := req.GetAllVolumes(); allVolumes != nil { // migrate all volumes if !s.haveOwnership(ctx, nil) { - return nil, status.Error(codes.InvalidArgument, "Volume Operation not Permitted.") + return nil, status.Error(codes.PermissionDenied, "Volume Operation not Permitted.") } return s.allVolumesMigrate(ctx, req, allVolumes) }
Change returned error to PermissionDenied
libopenstorage_openstorage
train
go
325e87b31f05543bbb4a902c41dac80b926c56e0
diff --git a/jquery.smoothState.js b/jquery.smoothState.js index <HASH>..<HASH> 100644 --- a/jquery.smoothState.js +++ b/jquery.smoothState.js @@ -282,8 +282,8 @@ /** Forces browser to redraw elements */ redraw: function ($element) { - $element.height(0); - setTimeout(function(){$element.height("auto");}, 0); + $element.height(); + //setTimeout(function(){$element.height("100%");}, 0); } }, // eo utility
More lightweight redrawing. I could not find any szenario in which this solution isn't sufficient. But I and many others (see issues) run into problem with the old solution, which requires two full repaints.
miguel-perez_smoothState.js
train
js
1bdabe5e4dd39eebb21732537b0896d0eb384865
diff --git a/backend/commands/case.go b/backend/commands/case.go index <HASH>..<HASH> 100644 --- a/backend/commands/case.go +++ b/backend/commands/case.go @@ -95,7 +95,6 @@ func (c *LowerCaseCommand) Run(v *View, e *Edit) error { for i := 0; i < sel.Len(); i++ { r := sel.Get(i) if r.Size() != 0 { - t := v.Buffer().Substr(r) v.Replace(e, r, strings.ToLower(t)) }
Remove extra whitespace Pedantic style commit to remove extra whitespace for consistency.
limetext_backend
train
go
869e05764e7aad158280487e04f87ddd8d8ed63a
diff --git a/src/grid/ClientRepresentations.php b/src/grid/ClientRepresentations.php index <HASH>..<HASH> 100644 --- a/src/grid/ClientRepresentations.php +++ b/src/grid/ClientRepresentations.php @@ -28,11 +28,11 @@ class ClientRepresentations extends RepresentationCollection 'login', 'name_language', 'description', + $user->can('bill.read') ? 'balance' : null, + $user->can('bill.read') ? 'credit' : null, $user->can('client.read') ? 'seller_id' : null, $user->can('client.read') ? 'type' : null, 'state', - $user->can('bill.read') ? 'balance' : null, - $user->can('bill.read') ? 'credit' : null, ]), ], 'servers' => [
Move Client `credit` column from right edge of the screen, cause a visual bug with Control Sidebar
hiqdev_hipanel-module-client
train
php
4fd8b2c70935f4514c6ee883f81be5596d7e7a34
diff --git a/src/Query.php b/src/Query.php index <HASH>..<HASH> 100644 --- a/src/Query.php +++ b/src/Query.php @@ -175,11 +175,12 @@ class Query extends Sql implements QueryInterface /** * @param int $id + * @param string $column * @return string */ - public function delete( $id=null ) + public function delete( $id=null, $column=null ) { - $this->setId($id); + $this->setId($id, $column); $this->setBuilderByType(); $sql = $this->builder->toDelete( $this ); $this->reset(); diff --git a/src/QueryInterface.php b/src/QueryInterface.php index <HASH>..<HASH> 100644 --- a/src/QueryInterface.php +++ b/src/QueryInterface.php @@ -58,9 +58,10 @@ interface QueryInterface * builds delete statement. * * @param int $id + * @param string $column * @return string */ - public function delete( $id=null ); + public function delete( $id=null, $column=null ); /** * builds update statement.
add $column in delete method.
asaokamei_ScoreSql
train
php,php
2aaaf237ad97d2351f5776a2c8acf55df7385cff
diff --git a/homely/_utils.py b/homely/_utils.py index <HASH>..<HASH> 100644 --- a/homely/_utils.py +++ b/homely/_utils.py @@ -326,7 +326,7 @@ class RepoListConfig(JsonConfig): """ # note that the paths in self.jsondata were already _homepath2real()'d # in the class' __init__() - resolved = _homepath2real(path) + resolved = _homepath2real(path.rstrip('/')) for row in self.jsondata: if resolved == os.path.realpath(row["localpath"]): return self._infofromdict(row)
Fix bug where you couldn't run 'homely update ~/dotfiles/'
phodge_homely
train
py
fc389ca4a276ebe5fafd64ac1eb81f8457fb090c
diff --git a/test/integration/test.visual_recognition.js b/test/integration/test.visual_recognition.js index <HASH>..<HASH> 100644 --- a/test/integration/test.visual_recognition.js +++ b/test/integration/test.visual_recognition.js @@ -175,11 +175,9 @@ describe('visual_recognition_integration', function() { }); }); - // todo: enable after our test key is allowed to have multiple classifiers (Should be done by early November 2016) - // this works right now when only testing against one version of node.js, but travis tests run against 3+ versions - // simultaneously, so the second and third ones to run all fail + // todo: add more tests, consider splitting things between a permanent and a temporary classifier - describe.skip("custom classifiers", function() { + describe("custom classifiers", function() { var classifier_id; this.retries(0); @@ -237,7 +235,6 @@ describe('visual_recognition_integration', function() { }); // custom classifiers - // todo: enable after our test key is allowed to have multiple collections (Should be done by early November 2016) // todo: consider creating a permanent collection to run most of these against so that a failure in creation will only kill the creation/deletion tests describe("collections", function() { this.retries(0);
enabling skipped VR tests now that our key has been upgraded
watson-developer-cloud_node-sdk
train
js
fc333653da62c93f87a8599895bda2b5f8d9548d
diff --git a/lib/draught/point.rb b/lib/draught/point.rb index <HASH>..<HASH> 100644 --- a/lib/draught/point.rb +++ b/lib/draught/point.rb @@ -27,7 +27,7 @@ module Draught end def translation_to(point) - Vector.new(point.x - x, point.y - y) + Vector.translation_between(self, point) end def to_matrix diff --git a/spec/draught/point_spec.rb b/spec/draught/point_spec.rb index <HASH>..<HASH> 100644 --- a/spec/draught/point_spec.rb +++ b/spec/draught/point_spec.rb @@ -38,7 +38,7 @@ module Draught end describe "manipulations in space" do - specify "a Point can be translated using a second Point to produce a new Point" do + specify "a Point can be translated using a Vector to produce a new Point" do translation = Vector.new(1,2) expect(subject.translate(translation)).to eq(Point.new(2,4)) @@ -50,7 +50,7 @@ module Draught specify "a Point can be transformed by a lambda-like object which takes the point and returns a new one" do transformer = ->(point) { - point.translate(Vector.new(1,1)) + Point.new(point.x + 1, point.y + 1) } expect(subject.transform(transformer)).to eq(Point.new(2,3))
Point spec readability tweak & clean use of Vector Tweak Point specs to clean spec title after moving to Vectors for translation. Use Vector.translation_between in #translate_to now it exists.
fidothe_draught
train
rb,rb
e2f17031abe0142d440a9d670e3d4cdd25bd0036
diff --git a/resources/lang/ja-JP/cachet.php b/resources/lang/ja-JP/cachet.php index <HASH>..<HASH> 100644 --- a/resources/lang/ja-JP/cachet.php +++ b/resources/lang/ja-JP/cachet.php @@ -34,7 +34,7 @@ return [ 'stickied' => '固定している障害情報', 'scheduled' => '計画メンテナンス', 'scheduled_at' => ', 予定日時 :timestamp', - 'posted' => '掲載日時 :timestamp', + 'posted' => 'Posted :timestamp by :username', 'posted_at' => '掲載日時 :timestamp', 'status' => [ 1 => '調査中',
New translations cachet.php (Japanese)
CachetHQ_Cachet
train
php
673bfeeb5134ae30c087295d01b468ea4ccc83a3
diff --git a/lib/stove/cookbook.rb b/lib/stove/cookbook.rb index <HASH>..<HASH> 100644 --- a/lib/stove/cookbook.rb +++ b/lib/stove/cookbook.rb @@ -108,7 +108,7 @@ module Stove git "add metadata.rb" git "add CHANGELOG.md" - git "commit -m 'Version bump to #{tag_version}'" + git "commit -m \"Version bump to #{tag_version}\"" git "push #{options[:remote]} #{options[:branch]}" if options[:github] @@ -145,7 +145,7 @@ module Stove if options[:git] Dir.chdir(path) do git "add metadata.rb" - git "commit -m 'Version bump to #{tag_version}'" + git "commit -m \"Version bump to #{tag_version}\"" git "push #{options[:remote]} #{options[:branch]}" end end
Fix single quotes on windows (#6)
tas50_stove
train
rb
508ff40032efaf103fa11ad17b6f745d7f060182
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -71,8 +71,6 @@ export { default as TimeRangePicker } from './components/time-range-picker'; export { default as Text } from './components/typography/text'; -export { default as HorizontalConstraint } from './components/constraints/horizontal'; - export { default as withMouseDownState } from './hocs/with-mouse-down-state'; export { default as withMouseOverState } from './hocs/with-mouse-over-state';
fix: remove HorizontalConstraint export (#<I>) It is already avialable as Constraints.Horizontal. BREAKING CHANGE: HorizontalConstraint export is no longer available.
commercetools_ui-kit
train
js
95cba30f953e8e93d6ae7080d7c5fe3e0158556c
diff --git a/cdm/src/main/java/ucar/nc2/iosp/hdf5/H5header.java b/cdm/src/main/java/ucar/nc2/iosp/hdf5/H5header.java index <HASH>..<HASH> 100644 --- a/cdm/src/main/java/ucar/nc2/iosp/hdf5/H5header.java +++ b/cdm/src/main/java/ucar/nc2/iosp/hdf5/H5header.java @@ -3646,7 +3646,7 @@ public class H5header { data = new int[nValues]; for (int i = 0; i < nValues; i++) data[i] = raf.readInt(); - if ((nValues & 1) != 0) // check if odd + if ((version == 1) && (nValues & 1) != 0) // check if odd raf.skipBytes(4); if (debug1 && (debugOut != null)) debugOut.println(this);
fix issue #<I>. should be trivial to retrofit to <I>
Unidata_thredds
train
java
13233b5874313b80f056391b2862c3bb4f6cc2d7
diff --git a/lib/srgs/elements/rule_ref.rb b/lib/srgs/elements/rule_ref.rb index <HASH>..<HASH> 100644 --- a/lib/srgs/elements/rule_ref.rb +++ b/lib/srgs/elements/rule_ref.rb @@ -4,7 +4,7 @@ module Srgs attr_accessor :uri, :special def initialize(rule, special=nil) - @uri = "##{rule}" unless rule.nil? or rule.empty? + @uri = rule unless rule.nil? or rule.empty? @special =special end diff --git a/lib/srgs/grammar_builder.rb b/lib/srgs/grammar_builder.rb index <HASH>..<HASH> 100644 --- a/lib/srgs/grammar_builder.rb +++ b/lib/srgs/grammar_builder.rb @@ -41,6 +41,8 @@ module Srgs tag(element, xml) when String text(element, xml) + when OneOf + one_of(element, xml) else raise "Can't add #{element.class} to item." end diff --git a/lib/srgs/version.rb b/lib/srgs/version.rb index <HASH>..<HASH> 100644 --- a/lib/srgs/version.rb +++ b/lib/srgs/version.rb @@ -1,3 +1,3 @@ module Srgs - VERSION = "1.1.0" + VERSION = "1.1.1" end
item can contain one of. uri doesn't assume local fixes #1
kristenmills_srgs
train
rb,rb,rb
578772c58fe51665e703691626a16e2224790099
diff --git a/addon/utils/load-polyfills.js b/addon/utils/load-polyfills.js index <HASH>..<HASH> 100644 --- a/addon/utils/load-polyfills.js +++ b/addon/utils/load-polyfills.js @@ -1,5 +1,7 @@ export async function loadPolyfills() { - await Promise.all([intlLocale(), intlPluralRules(), intlRelativeTimeFormat()]); + await intlLocale(); + await intlPluralRules(); + await intlRelativeTimeFormat(); } async function intlLocale() {
Load polyfills in order Both the PluralRules and RelativeTime polyfills require the intlLocale to be already loading. This mostly worked, but sporadic network delays could cause them to process out of order and break. Load them sequentially for the best experience.
ilios_common
train
js
05168c95fc3e9f1e9c61591678d1bf54074c6114
diff --git a/doc/source/conf.py b/doc/source/conf.py index <HASH>..<HASH> 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -84,7 +84,7 @@ extensions = [ 'sphinx.ext.autosummary', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', - 'sphinx.ext.pngmath', + 'sphinx.ext.imgmath', 'numpydoc' ]
MAINT: replace deprecated pngmath extension by imgmath
odlgroup_odl
train
py
ffca455788d251529994e9268a67a9822ed6d05b
diff --git a/lib/Doctrine/ORM/Version.php b/lib/Doctrine/ORM/Version.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ORM/Version.php +++ b/lib/Doctrine/ORM/Version.php @@ -36,7 +36,7 @@ class Version /** * Current Doctrine Version */ - const VERSION = '2.1.0RC3'; + const VERSION = '2.1.0RC4-DEV'; /** * Compares a Doctrine version with the current one.
Bump Dev Version to <I>RC4-DEV
doctrine_orm
train
php
261a5f9b382db09f4f8ad2b0e4184064a7090bd6
diff --git a/src/resources/js/directives.js b/src/resources/js/directives.js index <HASH>..<HASH> 100644 --- a/src/resources/js/directives.js +++ b/src/resources/js/directives.js @@ -398,6 +398,10 @@ } $scope.toggleSelection = function (value) { + if ($scope.model == undefined) { + $scope.model = []; + } + for (var i in $scope.model) { if ($scope.model[i]["value"] == value.value) { $scope.model.splice(i, 1); @@ -882,6 +886,9 @@ }; $scope.add = function() { + if ($scope.model == undefined) { + $scope.model = []; + } $scope.model.push({ value : '' }); $scope.setFocus(); };
fixed bugs in re validation of angular directives on click.
luyadev_luya-module-admin
train
js
b5b1e753e3e15d6874a735de87b5f37bbb462268
diff --git a/PiResults/LastSearchesCommand.php b/PiResults/LastSearchesCommand.php index <HASH>..<HASH> 100644 --- a/PiResults/LastSearchesCommand.php +++ b/PiResults/LastSearchesCommand.php @@ -69,8 +69,13 @@ class Tx_Solr_PiResults_LastSearchesCommand implements Tx_Solr_PluginCommand { return NULL; } + $lastSearches = $this->getLastSearches(); + if(empty($lastSearches)) { + return NULL; + } + $marker = array( - 'loop_lastsearches|lastsearch' => $this->getLastSearches() + 'loop_lastsearches|lastsearch' => $lastSearches ); return $marker;
[TASK] Hide LastSearches facet if no history is present Change-Id: I4f<I>e5a<I>f3f1a<I>df2b<I>abdd<I>fbe<I>
TYPO3-Solr_ext-solr
train
php
bd655e2858164d77239906b8045973899f5ccb0f
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -295,8 +295,8 @@ window.onload = function() { // Looks like calling the function immediately returns // bignumber.js:1177 Uncaught BigNumber Error: new BigNumber() not a base 16 number: - setTimeout(getAccounts, 0) - setTimeout(getDetail, 0) + setTimeout(getAccounts, 100) + setTimeout(getDetail, 100) eventEmitter.emit('network', network_obj); }) }
Increase timeout to fix problem not showing accounts on Mist
wearekickback_contracts
train
js
6b959ec9a1ee77a4a4f735f18189e4ebfe718693
diff --git a/src/utils/utils.js b/src/utils/utils.js index <HASH>..<HASH> 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -2,12 +2,12 @@ export function search(node, selector) { const result = []; - let tagsArray; - - if (typeof selector === 'string') { - tagsArray = selector.replace(/\./g, ' ').trim().split(' '); + if (typeof selector !== 'string') { + throw new Error('selector must be a string'); } + const tagsArray = selector.replace(/\./g, ' ').trim().split(' '); + const searchIterator = function (node) { if (typeof selector === 'string') {
throw if selector is not a string
sghall_subunit
train
js
6492f871ca9d37e5008744c0f246132e2f73b8b3
diff --git a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTestWithCustomConcurrencyStrategy.java b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTestWithCustomConcurrencyStrategy.java index <HASH>..<HASH> 100644 --- a/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTestWithCustomConcurrencyStrategy.java +++ b/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTestWithCustomConcurrencyStrategy.java @@ -63,7 +63,7 @@ public class HystrixCommandTestWithCustomConcurrencyStrategy { try { HystrixCommand<Boolean> cmd2 = new TestCommand(true, true); assertTrue(cmd2.execute()); //command execution throws with missing context - //fail("command should fail and throw (no fallback)"); + fail("command should fail and throw (no fallback)"); } catch (IllegalStateException ise) { //expected ise.printStackTrace(); @@ -71,7 +71,7 @@ public class HystrixCommandTestWithCustomConcurrencyStrategy { try { printRequestLog(); - //fail("static access to HystrixRequestLog should fail and throw"); + fail("static access to HystrixRequestLog should fail and throw"); } catch (IllegalStateException ise) { //expected ise.printStackTrace();
Accidentally commented out some failure assertions
Netflix_Hystrix
train
java
a6d4315f8bdde3d728c852abc196b1d8ab163ebd
diff --git a/src/main/java/se/cgbystrom/netty/http/websocket/WebSocketClientHandler.java b/src/main/java/se/cgbystrom/netty/http/websocket/WebSocketClientHandler.java index <HASH>..<HASH> 100644 --- a/src/main/java/se/cgbystrom/netty/http/websocket/WebSocketClientHandler.java +++ b/src/main/java/se/cgbystrom/netty/http/websocket/WebSocketClientHandler.java @@ -62,7 +62,7 @@ public class WebSocketClientHandler extends SimpleChannelUpstreamHandler impleme } @Override - public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { + public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { callback.onDisconnect(this); handshakeCompleted = false; }
Changed to dispatch onDisconnect() callback on channelClosed instead of channelDisconnect. Was causing erroneous behavior when doing tight disconnects/connects.
cgbystrom_netty-tools
train
java
ad809f7c1469991ee859e9febfcddb3e6d4910f4
diff --git a/lib/helpers-dom.js b/lib/helpers-dom.js index <HASH>..<HASH> 100644 --- a/lib/helpers-dom.js +++ b/lib/helpers-dom.js @@ -8,10 +8,10 @@ var DOUBLE_NEWLINE_NORMALIZE = /([\n]*)\n\n([\n]*)/g; var BLOCK_ELEMENTS = {}; [ - 'address', 'article', 'aside', 'audio', 'blockqoute', 'canvas', 'dd', 'div', + 'address', 'article', 'aside', 'blockqoute', 'canvas', 'dd', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', - 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'noscript', 'ol', 'output', 'p', - 'pre', 'section', 'table', 'tfoot', 'ul', 'video', + 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'ol', 'output', 'p', + 'pre', 'section', 'table', 'tfoot', 'ul', // Not real block-level elements but treating them at such makes sence 'li' ].forEach(function (tagname) {
[fix] issue where no-text elements would yield text
AndreasMadsen_article
train
js
80275f37ab8dff9cfae9b63f3bd8dfae67972094
diff --git a/heron/common/src/java/com/twitter/heron/common/utils/logging/ErrorReportLoggingHandler.java b/heron/common/src/java/com/twitter/heron/common/utils/logging/ErrorReportLoggingHandler.java index <HASH>..<HASH> 100644 --- a/heron/common/src/java/com/twitter/heron/common/utils/logging/ErrorReportLoggingHandler.java +++ b/heron/common/src/java/com/twitter/heron/common/utils/logging/ErrorReportLoggingHandler.java @@ -104,7 +104,15 @@ public class ErrorReportLoggingHandler extends Handler { exceptionDataBuilder.setCount(exceptionDataBuilder.getCount() + 1); exceptionDataBuilder.setLasttime(new Date().toString()); exceptionDataBuilder.setStacktrace(trace); - exceptionDataBuilder.setLogging(record.getMessage()); + + // Can cause NPE and crash HI + //exceptionDataBuilder.setLogging(record.getMessage()); + + if (record.getMessage() == null) { + exceptionDataBuilder.setLogging(""); + } else { + exceptionDataBuilder.setLogging(record.getMessage()); + } } } }
Fix NPE when logging exceptions that have no message using SLF4J (#<I>) * Move uploader init above PackingPlan creation to fix NPE in case of bad PackingPlan * Untested (but probably working) fix for NPE crash * Set to empty string
apache_incubator-heron
train
java
60acfa5d8d454a7c968640a307772902d211f043
diff --git a/git/repo/base.py b/git/repo/base.py index <HASH>..<HASH> 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -702,7 +702,7 @@ class Repo(object): Doing so using the "git check-ignore" method. :param paths: List of paths to check whether they are ignored or not - :return: sublist of those paths which are ignored + :return: subset of those paths which are ignored """ try: proc = self.git.check_ignore(*paths)
rename sublist to subset
gitpython-developers_GitPython
train
py
e1476131e2441c1ab03a67aaac6eb2527b3a7cc8
diff --git a/library/CM/Page/Abstract.js b/library/CM/Page/Abstract.js index <HASH>..<HASH> 100644 --- a/library/CM/Page/Abstract.js +++ b/library/CM/Page/Abstract.js @@ -23,7 +23,6 @@ var CM_Page_Abstract = CM_Component_Abstract.extend({ var location = window.location; var params = queryString.parse(location.search); var state = _.pick(params, _.intersection(_.keys(params), this.getStateParams())); - this.setState(state); this.routeToState(state, location.pathname + location.search); } },
dont call setState() in ready(), call by routeToState() already
cargomedia_cm
train
js
6b5483fd374f05152ae397c54879aa00027d51b7
diff --git a/test/src/SolubleTest/Japha/Bridge/Driver/DriverContextTest.php b/test/src/SolubleTest/Japha/Bridge/Driver/DriverContextTest.php index <HASH>..<HASH> 100644 --- a/test/src/SolubleTest/Japha/Bridge/Driver/DriverContextTest.php +++ b/test/src/SolubleTest/Japha/Bridge/Driver/DriverContextTest.php @@ -119,7 +119,12 @@ class DriverContextTest extends \PHPUnit_Framework_TestCase 'php.java.servlet.RemoteServletResponse' ]); - // @todo future work on session (already committed) + if ($this->driver->getClassName($context) == 'io.soluble.pjb.servlet.HttpContext') { + $httpServletRequestFromAttribute = $context->getAttribute('io.soluble.pjb.servlet.HttpServletRequest'); + $this->assertEquals('io.soluble.pjb.servlet.RemoteHttpServletRequest', $this->driver->getClassName($httpServletRequestFromAttribute)); + } + + // @todo future work on session (issue with session already committed, need more tests) //var_dump($context->getAttribute('name')); } }
Prep <I>, more tests for context
belgattitude_soluble-japha
train
php
8b24a0fcbd1e9835fefe52a114b68c3e5be932e7
diff --git a/code/Debug/controllers/IndexController.php b/code/Debug/controllers/IndexController.php index <HASH>..<HASH> 100644 --- a/code/Debug/controllers/IndexController.php +++ b/code/Debug/controllers/IndexController.php @@ -1,7 +1,5 @@ <?php -// TODO: Test all the refactorings - class Magneto_Debug_IndexController extends Mage_Core_Controller_Front_Action { /**
Refactorings were tested, remove todo
madalinoprea_magneto-debug
train
php
8e7871ce6d258ddf46e182c4eafa1ca5967b3c35
diff --git a/pysd/py_backend/external.py b/pysd/py_backend/external.py index <HASH>..<HASH> 100644 --- a/pysd/py_backend/external.py +++ b/pysd/py_backend/external.py @@ -620,8 +620,6 @@ class ExtData(External): self.roots = [root] self.coordss = [coords] self.dims = dims - - # This value should be unique self.interp = interp def add(self, file_name, tab, time_row_or_col, cell, @@ -635,6 +633,14 @@ class ExtData(External): self.cells.append(cell) self.roots.append(root) self.coordss.append(coords) + + try: + assert interp == self.interp + except AssertionError: + raise ValueError(self.py_name + "\n" + "Error matching interpolation method with " + + "previously defined one") + try: assert dims == self.dims except AssertionError:
Check interpolation method in ExtData.add Check the consistency in the definition of the interpolation method.
JamesPHoughton_pysd
train
py
08150cbdc6af43eabf4ec0a8ac9ae4d71d8f3d31
diff --git a/framework/src/play-test/src/test/java/play/test/WithApplicationTest.java b/framework/src/play-test/src/test/java/play/test/WithApplicationTest.java index <HASH>..<HASH> 100644 --- a/framework/src/play-test/src/test/java/play/test/WithApplicationTest.java +++ b/framework/src/play-test/src/test/java/play/test/WithApplicationTest.java @@ -22,6 +22,6 @@ public class WithApplicationTest extends WithApplication { public void withApplicationShouldCleanUpApplication() { stopPlay(); assertNull(app); - assertTrue(play.api.Play.privateMaybeApplication().isEmpty()); + assertTrue(play.api.Play.maybeApplication().isEmpty()); } }
Change privateMaybeApplication to maybeApplication
playframework_playframework
train
java
c9898dd6bdd1820c1a7264525e1b38c49e03fe1b
diff --git a/src/Users.php b/src/Users.php index <HASH>..<HASH> 100644 --- a/src/Users.php +++ b/src/Users.php @@ -382,12 +382,8 @@ class Users */ public function getCurrentUser() { - if (!$this->app['session']->isStarted()) { - return []; - } - - if (is_null($this->currentuser) && $currentuser = $this->app['session']->get('user')) { - $this->currentuser = $currentuser; + if (is_null($this->currentuser)) { + $this->currentuser = $this->app['session']->isStarted() ? $this->app['session']->get('user') : false; } return $this->currentuser;
Users::getCurrentUser() should return a null for no user
bolt_bolt
train
php
fbbb4fe765e7a2770943fdb98b340d8d3703f446
diff --git a/packages/theme-data/src/index.js b/packages/theme-data/src/index.js index <HASH>..<HASH> 100644 --- a/packages/theme-data/src/index.js +++ b/packages/theme-data/src/index.js @@ -1,7 +1,2 @@ -export { default as basics } from "./basics"; export { default as extendTheme } from "./utils/extendTheme"; export { default as resolveTheme } from "./utils/resolveTheme"; - -export { default as webLightTheme } from "./themes/webLightTheme"; -export { default as lightGrayTheme } from "./themes/lightGrayTheme"; -export { default as darkBlueTheme } from "./themes/darkBlueTheme";
BREAKING: Remove deprecated exports
Autodesk_hig
train
js
c4247b097b7c380bc0103252d6e07d618d3e79f4
diff --git a/fast/symbolic.py b/fast/symbolic.py index <HASH>..<HASH> 100755 --- a/fast/symbolic.py +++ b/fast/symbolic.py @@ -1014,8 +1014,14 @@ def part_symbolic(z, s): re(rho21) """ - if s == 1: return re(z) - else: return im(z) + if s == 1: + return re(z) + elif s == -1: + return im(z) + elif s == 0: + return z + else: + raise ValueError def define_rho_vector(rho, Ne):
Added s=0 to part_symbolic.
oscarlazoarjona_fast
train
py
072c600c7a49c41e8a66aa53f2094f285c2e9e9c
diff --git a/Renderer.js b/Renderer.js index <HASH>..<HASH> 100644 --- a/Renderer.js +++ b/Renderer.js @@ -671,10 +671,7 @@ Renderer.prototype.draw = function () { this.drawDebug() } - var numCommands = cmdQueue.flush() - if (State.profile) { - console.log('Renderer numCommands', numCommands) - } + cmdQueue.flush() } Renderer.prototype.drawDebug = function () {
Renderer stop printing command count logs
pex-gl_pex-renderer
train
js
e1f31a27487f86fc98640dfb8877f2fa70316d2f
diff --git a/src/Saxulum/ClassFinder/ClassFinder.php b/src/Saxulum/ClassFinder/ClassFinder.php index <HASH>..<HASH> 100644 --- a/src/Saxulum/ClassFinder/ClassFinder.php +++ b/src/Saxulum/ClassFinder/ClassFinder.php @@ -14,7 +14,7 @@ class ClassFinder for ($i = 0; $i < $tokenCount; $i++) { - if (is_array($tokens[$i]) && in_array($tokens[$i][0], array(T_NAMESPACE, T_CLASS)) && $tokens[$i-1][0] === T_WHITESPACE) { + if (is_array($tokens[$i]) && in_array($tokens[$i][0], array(T_NAMESPACE, T_CLASS)) && $tokens[$i-1][0] !== T_DOUBLE_COLON) { $type = $tokens[$i][0]; $i++; $namespace = ''; if ($type === T_NAMESPACE) { $namespaceStack = array();
yet another try to fix ::class
saxulum_saxulum-classfinder
train
php
1f8ac597f82785f73e9083e04a9f985547d302d8
diff --git a/src/AudioPlayer.js b/src/AudioPlayer.js index <HASH>..<HASH> 100644 --- a/src/AudioPlayer.js +++ b/src/AudioPlayer.js @@ -270,18 +270,19 @@ class AudioPlayer extends Component { allowBackShuffle: this.props.allowBackShuffle }); - if (!this.state.shuffle) { - const prevSources = getTrackSources( - prevProps.playlist, - prevState.activeTrackIndex - ); - const newSources = getTrackSources( - this.props.playlist, - this.state.activeTrackIndex - ); - if (prevSources[0].src !== newSources[0].src) { - // cancel playback and re-scan current sources - this.audio.load(); + const prevSources = getTrackSources( + prevProps.playlist, + prevState.activeTrackIndex + ); + const newSources = getTrackSources( + this.props.playlist, + this.state.activeTrackIndex + ); + if (prevSources[0].src !== newSources[0].src) { + // cancel playback and re-scan current sources + this.audio.load(); + + if (!this.state.shuffle) { // after toggling off shuffle, we defer clearing the shuffle // history until we actually change tracks - if the user quickly // toggles shuffle off then back on again, we don't want to have
Song skip works again in shuffle mode.
benwiley4000_cassette
train
js
22dd704be9f1381464e21011d421fe74a64632bd
diff --git a/textract/parsers/tesseract.py b/textract/parsers/tesseract.py index <HASH>..<HASH> 100644 --- a/textract/parsers/tesseract.py +++ b/textract/parsers/tesseract.py @@ -6,7 +6,7 @@ def extract(filename, **kwargs): # Tesseract can't output to console directly so you must first create # a dummy file to write to, read, and then delete stdout, stderr = run( - 'tesseract %(filename)s tmpout && cat tmpout.txt && rm -f tmpout.txt' + 'tesseract - - <%(filename)s' % locals() ) return stdout
apparently tesseract <I> supports stdout!
deanmalmgren_textract
train
py
934e8840e07ad2b89d3c4a2ca128ba9dd39f64f6
diff --git a/lib/GoCardless/Request.php b/lib/GoCardless/Request.php index <HASH>..<HASH> 100644 --- a/lib/GoCardless/Request.php +++ b/lib/GoCardless/Request.php @@ -71,7 +71,7 @@ class GoCardless_Request { // Set application specific user agent suffix if found if (isset($params['ua_tag'])) { - $curl_options[CURLOPT_USERAGENT] .= '-' . $params['ua_tag']; + $curl_options[CURLOPT_USERAGENT] .= ' ' . $params['ua_tag']; unset($params['ua_tag']); }
Tweaked user agent suffix syntax
gocardless_gocardless-legacy-php
train
php
d2f89df8a6d5844de11e12783c2cb23df06be79a
diff --git a/tinymce/views.py b/tinymce/views.py index <HASH>..<HASH> 100644 --- a/tinymce/views.py +++ b/tinymce/views.py @@ -102,4 +102,6 @@ def filebrowser(request): content = jsmin(render_to_string('tinymce/filebrowser.js', context={'fb_url': fb_url}, request=request)) - return HttpResponse(content, content_type='application/javascript') + response = HttpResponse(content, content_type='application/javascript') + response['Cache-Control'] = 'no-store' + return response
Add Cache-Control: no-store header to filebrowser response
romanvm_django-tinymce4-lite
train
py
e1cdf3c5561a56376689e325fa0caff8c10c8f9e
diff --git a/app/Library/Utilities/PitonBuild.php b/app/Library/Utilities/PitonBuild.php index <HASH>..<HASH> 100644 --- a/app/Library/Utilities/PitonBuild.php +++ b/app/Library/Utilities/PitonBuild.php @@ -87,7 +87,7 @@ class PitonBuild $pdo = new PDO($dsn, $dbConfig['username'], $dbConfig['password'], $dbConfig['options']); // Insert engine version as key to avoid running install again - $updateEngineSetting = 'update `setting` set `setting_value` = ?, `updated_date` = ? where `category` = \'piton\' and `setting_key` = \'engine\';'; + $updateEngineSetting = 'update `data_store` set `setting_value` = ?, `updated_date` = ? where `category` = \'piton\' and `setting_key` = \'engine\';'; $settingValue[] = $engineVersion; $settingValue[] = date('Y-m-d H:i:s');
Corrected reference to table `data_store` in PitonBuild.
PitonCMS_Engine
train
php
b31c664cc4fc3e6c542bdb41f642104b3ea21424
diff --git a/config/application.rb b/config/application.rb index <HASH>..<HASH> 100644 --- a/config/application.rb +++ b/config/application.rb @@ -40,5 +40,9 @@ module FluentdUi # config.time_zone = require Rails.root.join("lib", "fluentd-ui") + + if ENV["FLUENTD_UI_LOG_PATH"].present? + config.logger = ActiveSupport::Logger.new(ENV["FLUENTD_UI_LOG_PATH"]) + end end end
Write to specified file path for logging by ENV['FLUENTD_UI_LOG_PATH']
fluent_fluentd-ui
train
rb
5b01ecea0020e2796ded2387a32081004f569545
diff --git a/elasticpy.py b/elasticpy.py index <HASH>..<HASH> 100644 --- a/elasticpy.py +++ b/elasticpy.py @@ -11,7 +11,7 @@ Apache License 2.0 See COPYING for more information. ''' __author__ = 'Luke Campbell' -__version__ = '0.7' +__version__ = '0.8' import json diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from distutils.extension import Extension setup( name='elasticpy', - version='0.7', + version='0.8', description='Python Wrapper for elasticsearch', author='Luke Campbell', author_email='LCampbell@ASAScience.com',
Luke: bumps version to <I>
ooici_elasticpy
train
py,py
0a3a95d65788fdb9af7ba25cb27bc1c941813db0
diff --git a/src/Setup/Documentations/App.php b/src/Setup/Documentations/App.php index <HASH>..<HASH> 100644 --- a/src/Setup/Documentations/App.php +++ b/src/Setup/Documentations/App.php @@ -16,7 +16,7 @@ class App 'setup' => "\t| Default encodage when you using HTML::charset", ]; // - return $doc[$index]."\n\t|\n\t**/"; + return "\n".$doc[$index]."\n\t|\n\t**/"; } protected static function appTitles($index)
fixing bug of the setup docs of return line
vinala_kernel
train
php
988840d8ce3ccb1657afe94776496d9c4cfd6d4b
diff --git a/data/Model.php b/data/Model.php index <HASH>..<HASH> 100644 --- a/data/Model.php +++ b/data/Model.php @@ -569,7 +569,7 @@ class Model extends \lithium\core\StaticObject { * Posts::find('all'); // returns all records * Posts::find('count'); // returns a count of all records * - * // The first ten records that have 'author' set to 'Lithium' + * // The first ten records that have 'author' set to 'Bob' * Posts::find('all', array( * 'conditions' => array('author' => "Bob"), 'limit' => 10 * ));
fix example within Model::find() docblock
UnionOfRAD_lithium
train
php
4efad0edf21af802f4ba629cddbe6bf093889704
diff --git a/src/PatternLab/Config.php b/src/PatternLab/Config.php index <HASH>..<HASH> 100644 --- a/src/PatternLab/Config.php +++ b/src/PatternLab/Config.php @@ -241,6 +241,7 @@ class Config { self::setExposedOption("ishMaximum"); self::setExposedOption("ishMinimum"); self::setExposedOption("patternExtension"); + self::setExposedOption("outputFileSuffixes"); self::setExposedOption("plugins"); }
adding support to push outputSuffixes
pattern-lab_patternlab-php-core
train
php
20b492bb134b80cfcfdd7f1c0b83999db7116ec9
diff --git a/query/influxql/compiler.go b/query/influxql/compiler.go index <HASH>..<HASH> 100644 --- a/query/influxql/compiler.go +++ b/query/influxql/compiler.go @@ -61,12 +61,8 @@ func (c *Compiler) Compile(ctx context.Context) (flux.Program, error) { if err != nil { return nil, err } - - astCompiler := lang.ASTCompiler{ - AST: astPkg, - Now: now, - } - return astCompiler.Compile(ctx) + compileOptions := lang.WithLogPlanOpts(c.logicalPlannerOptions...) + return lang.CompileAST(astPkg, now, compileOptions), nil } func (c *Compiler) CompilerType() flux.CompilerType {
refactor(influxql): compile with planner options (#<I>)
influxdata_influxdb
train
go
2f4661fefa76b19dfe9d4b3e35bea8ca04a0249b
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,7 @@ module.exports = function(nodejsOpts, cliOpts){ // watcher path: process.cwd(), - debounce: 30, + debounce: 0, sleepAfter: 1000, match: /.*/, ignore: []
Default debounce to 0
epeli_yalr
train
js
b24207bf323f4a9f22aa7650004c85454b5b6686
diff --git a/pfp/interp.py b/pfp/interp.py index <HASH>..<HASH> 100644 --- a/pfp/interp.py +++ b/pfp/interp.py @@ -2362,8 +2362,11 @@ class PfpInterp(object): names = copy.copy(names) names.pop() names += resolved_names - - res = switch[names[-1]] + + if len(names) >= 2 and names[-1] == names[-2] and names[-1] == "long": + res = "Int64" + else: + res = switch[names[-1]] if names[-1] in ["char", "short", "int", "long"] and "unsigned" in names[:-1]: res = "U" + res
Fix the problem of 'QWORD/long long/unsigned long long' identification error.
d0c-s4vage_pfp
train
py
ba2c866da237cfb05a3984db1c4db58960176de0
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ function Db (db) { } Db.prototype.store = function (pkg, cb) { - var id = pkg.name + '@' + pkg.version + var id = escape(pkg.name) + '@' + pkg.version var batch = batchDependencies(pkg.dependencies, '!index!dep', id) .concat(batchDependencies(pkg.devDependencies, '!index!dev', id)) @@ -28,6 +28,7 @@ function batchDependencies (deps, keyprefix, id) { var batch = [] Object.keys(deps).forEach(function (name) { + name = escape(name) var key = keyprefix + '!' + name + '!' + id // example: !index!dep!request!zulip@0.1.0 var range = deps[name] try { @@ -80,6 +81,7 @@ Db.prototype.query = function (name, range, opts, cb) { opts = {} } + name = escape(name) range = semver.Range(range) var keyprefix = opts.devDependencies ? '!index!dev!' : '!index!dep!'
Escape package names so they don't contain the key separator E.g. npm packages can contain ! Thanks to Brendan Eich for this fabulous escape function that he added in the first version of JavaScript :)
watson_dependency-db
train
js
8c432daceaa73b30d0a5d26761b878cf9c8ec043
diff --git a/src/Components/CreateDefinition.php b/src/Components/CreateDefinition.php index <HASH>..<HASH> 100644 --- a/src/Components/CreateDefinition.php +++ b/src/Components/CreateDefinition.php @@ -226,7 +226,7 @@ class CreateDefinition extends Component $parser->error( __('A symbol name was expected! ' . 'A reserved keyword can not be used ' - . 'as a field name without backquotes.' + . 'as a column name without backquotes.' ), $token );
In SQL we should use 'column' and not 'field'
phpmyadmin_sql-parser
train
php
82a25426bf4df1ba495a1659ebd240e62874d0c5
diff --git a/smartcard/test/framework/testcase_Card.py b/smartcard/test/framework/testcase_Card.py index <HASH>..<HASH> 100755 --- a/smartcard/test/framework/testcase_Card.py +++ b/smartcard/test/framework/testcase_Card.py @@ -52,6 +52,16 @@ from smartcard.System import readers class testcase_Card(unittest.TestCase): """Test case for smartcard.Card.""" + def testcase_CardDictionary(self): + """Create a dictionnary with Card keys""" + mydict = {} + for reader in readers(): + card = Card(reader, expectedATRinReader[str(reader)]) + mydict[card] = reader + + for card in mydict.keys(): + self.assert_(str(card.reader) in expectedReaders) + def testcase_Card_FromReaders(self): """Create a Card from Readers and test that the response to SELECT DF_TELECOM has two bytes."""
Added test case for hashable Card
LudovicRousseau_pyscard
train
py
8b51990642fe63d1fdd773cbe4ed34d3d7fa1919
diff --git a/outbound/queue.js b/outbound/queue.js index <HASH>..<HASH> 100644 --- a/outbound/queue.js +++ b/outbound/queue.js @@ -57,7 +57,7 @@ exports.list_queue = function (cb) { exports._stat_file = function (file, cb) { queue_count++; - cb(); + setImmediate(cb); }; exports.stat_queue = function (cb) { @@ -194,7 +194,7 @@ exports.load_queue_files = function (pid, cb_name, files, callback) { logger.logdebug("[outbound] File needs processing later: " + (next_process - self.cur_time) + "ms"); temp_fail_queue.add(next_process - self.cur_time, function () { load_queue.push(file);}); } - cb(); + async.setImmediate(cb); } else { self[cb_name](file, cb);
Don't blow the stack on qstat (#<I>) * Don't blow the stack on qstat * Should fix another call stack blowing issue
haraka_Haraka
train
js
c07ee34a9832073875d1644bd133fcf0cff7899b
diff --git a/tests/WidgetTest/DbTest.php b/tests/WidgetTest/DbTest.php index <HASH>..<HASH> 100644 --- a/tests/WidgetTest/DbTest.php +++ b/tests/WidgetTest/DbTest.php @@ -288,9 +288,13 @@ class DbTest extends TestCase $user = $query->find(); $this->assertEquals("SELECT * FROM users u ORDER BY id ASC", $query->getSQL()); - $this->assertEquals("1", $user->id); + $this->assertEquals('1', $user->id); // addOrder + $query = $this->db('users')->orderBy('id', 'ASC')->addOrderBy('group_id', 'ASC'); + $user = $query->find(); + $this->assertEquals("SELECT * FROM users u ORDER BY id ASC, group_id ASC", $query->getSQL()); + $this->assertEquals('1', $user->id); } } \ No newline at end of file
added test for addOrderby method, ref #<I>
twinh_wei
train
php
c4b4ab5bef30d1c6299effa226f45db3a8963bcd
diff --git a/lib/svtplay_dl/service/tv4play.py b/lib/svtplay_dl/service/tv4play.py index <HASH>..<HASH> 100644 --- a/lib/svtplay_dl/service/tv4play.py +++ b/lib/svtplay_dl/service/tv4play.py @@ -165,10 +165,24 @@ class Tv4play(Service, OpenGraphThumbMixin): show = quote_plus(show) return show + def _seasoninfo(self, data): + if "season" in data and data["season"]: + season = "{:02d}".format(data["season"]) + episode = "{:02d}".format(data["episode"]) + if int(season) == 0 and int(episode) == 0: + return None + return "s%se%s" % (season, episode) + else: + return None + def _autoname(self, vid): jsondata = self._get_show_info() for i in jsondata["results"]: if vid == i["id"]: + season = self._seasoninfo(i) + if season: + index = len(i["program"]["name"]) + return i["title"][:index] + ".%s%s" % (season, i["title"][index:]) return i["title"] return self._get_clip_info(vid)
tv4play: Add season and episode info in the filename
spaam_svtplay-dl
train
py
c129970b63ccdfbcedca9565d3796f36931362c1
diff --git a/source/application/layouts/index.js b/source/application/layouts/index.js index <HASH>..<HASH> 100644 --- a/source/application/layouts/index.js +++ b/source/application/layouts/index.js @@ -50,13 +50,17 @@ function layout(props) { } function isAbsolute(reference) { - return !isRelative(reference); + return !isRelative(reference) && !hasUri(reference); } function isReference(reference) { - return 'id' in reference; + return 'id' in reference || 'uri' in reference; } function isRelative(reference) { - return (reference.id || '').charAt(0) === '.'; + return (reference.id || '').charAt(0) === '.' || hasUri(reference); +} + +function hasUri(reference) { + return 'uri' in reference; }
fix: make sure .uri references are injected
patternplate-archive_patternplate-server
train
js
720ed9096fbe62955a075041a1c43e62cba10471
diff --git a/gulp/tasks/build-scss.js b/gulp/tasks/build-scss.js index <HASH>..<HASH> 100644 --- a/gulp/tasks/build-scss.js +++ b/gulp/tasks/build-scss.js @@ -24,6 +24,16 @@ exports.task = function() { var streams = []; var baseVars = fs.readFileSync('src/core/style/variables.scss', 'utf8').toString(); gutil.log("Building css files..."); + + // create SCSS file for distribution + streams.push( + gulp.src(paths) + .pipe(util.filterNonCodeFiles()) + .pipe(filter(['**', '!**/*-theme.scss'])) + .pipe(concat('angular-material.scss')) + .pipe(gulp.dest(dest)) + ); + streams.push( gulp.src(paths) .pipe(util.filterNonCodeFiles())
feature(build): add concatenated SCSS file for distribution Closes #<I>.
angular_material
train
js
d3a5eaa4c01d66e590282001d18869fdc9534263
diff --git a/test/e2e/kubelet_perf.go b/test/e2e/kubelet_perf.go index <HASH>..<HASH> 100644 --- a/test/e2e/kubelet_perf.go +++ b/test/e2e/kubelet_perf.go @@ -256,7 +256,7 @@ var _ = framework.KubeDescribe("Kubelet [Serial] [Slow]", func() { }, podsPerNode: 100, memLimits: framework.ResourceUsagePerContainer{ - stats.SystemContainerKubelet: &framework.ContainerResourceUsage{MemoryRSSInBytes: 100 * 1024 * 1024}, + stats.SystemContainerKubelet: &framework.ContainerResourceUsage{MemoryRSSInBytes: 120 * 1024 * 1024}, stats.SystemContainerRuntime: &framework.ContainerResourceUsage{MemoryRSSInBytes: 300 * 1024 * 1024}, }, },
e2e: bump the memory limit for kubelet The test is mainly for monitoring and tracking resource leaks. Bump the limit to account for variations in different settings.
kubernetes_kubernetes
train
go
44b49265f90986b14ca5d83dffa5c9037ada2989
diff --git a/webapp.js b/webapp.js index <HASH>..<HASH> 100644 --- a/webapp.js +++ b/webapp.js @@ -283,6 +283,8 @@ function registerEvents(emitter) { events: new EventEmitter(), } + context.events.setMaxListeners(256) + Step( function() { var next = this
make ctx.events EventEmitter setMaxListeners to <I>. Perfectly fine to have a lot of listeners.
Strider-CD_strider-simple-runner
train
js
4439d270e5d034c34a17abdffb1c127a605f0a77
diff --git a/runner.go b/runner.go index <HASH>..<HASH> 100644 --- a/runner.go +++ b/runner.go @@ -32,6 +32,15 @@ func init() { } func Expectify(suite interface{}, t *testing.T) { + var name string + defer func() { + if err := recover(); err != nil { + os.Stdout = stdout + color.Printf("@R 💣 %-75s\n", name) + panic(err) + } + }() + tp := reflect.TypeOf(suite) sv := reflect.ValueOf(suite) count := tp.NumMethod() @@ -42,7 +51,7 @@ func Expectify(suite interface{}, t *testing.T) { announced := false for i := 0; i < count; i++ { method := tp.Method(i) - name := method.Name + name = method.Name if pattern.MatchString(name) == false || method.Type.NumIn() != 1 { continue }
more helpful output if tested code panics
karlseguin_expect
train
go
41ec53360213f67552c332e9c269a2f655a00786
diff --git a/tests/spec/app-handlers-spec.js b/tests/spec/app-handlers-spec.js index <HASH>..<HASH> 100644 --- a/tests/spec/app-handlers-spec.js +++ b/tests/spec/app-handlers-spec.js @@ -2267,7 +2267,7 @@ describe('F2.AppHandlers - error handling - appScriptLoadFailed',function() { var appManifest = function() { return { - scripts:['http://docs.openf2.org/demos/apps/JavaScript/HelloWorld/doesNotExist.js'], + scripts:['http://www.openf2.org/foobar.js'], styles:[], inlineScripts:[], apps:[
updated <I> url as the github-hosted page seems to not make the test fail
OpenF2_F2
train
js
3a873aa123dc52b260c5699047499e6dd75ea5da
diff --git a/client/cli/ok.py b/client/cli/ok.py index <HASH>..<HASH> 100644 --- a/client/cli/ok.py +++ b/client/cli/ok.py @@ -12,6 +12,7 @@ import client import logging import os import sys +import struct LOGGING_FORMAT = '%(levelname)s | %(filename)s:%(lineno)d | %(message)s' logging.basicConfig(format=LOGGING_FORMAT) @@ -92,6 +93,12 @@ def parse_input(command_input=None): def main(): """Run all relevant aspects of ok.py.""" + + #Checking user's Python bit version + bit_v = (8 * struct.calcsize("P")) + if (bit_v == 32): + print("32 bit Python is not supported. Please install the 64 bit version.") + log.debug("32 bit Python is detected.") args = parse_input() log.setLevel(logging.DEBUG if args.debug else logging.ERROR)
Added warning for <I>bit Python
okpy_ok-client
train
py
859ac3d715494c5d7fa62c383026f826d936a9c9
diff --git a/bin/start-mc.js b/bin/start-mc.js index <HASH>..<HASH> 100755 --- a/bin/start-mc.js +++ b/bin/start-mc.js @@ -7,7 +7,7 @@ const mri = require('mri'); const shell = require('shelljs'); const fetch = require('node-fetch'); const env = require('@commercetools-frontend/mc-html-template/env'); -const replaceHtmlPlaceholders = require('@commercetools-frontend/mc-html-template/replace-html-placeholders'); +const replaceHtmlPlaceholders = require('@commercetools-frontend/mc-html-template/utils/replace-html-placeholders'); if (process.env.NODE_ENV !== 'production') throw new Error(
refactor(html-template): group files into folders
commercetools_merchant-center-application-kit
train
js
64d7a63db030d03dd90e724e17583e193c9bc47e
diff --git a/src/ToastrServiceProvider.php b/src/ToastrServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/ToastrServiceProvider.php +++ b/src/ToastrServiceProvider.php @@ -66,12 +66,13 @@ class ToastrServiceProvider extends ServiceProvider Blade::directive('jquery', function ($arguments) { $version = $arguments; if (strpos($arguments, ',')) { - list($version, $src) = explode(',', $arguments); + [$version, $src] = explode(',', $arguments); } - + if (isset($src)) { return "<?php echo jquery($version, $src); ?>"; } + return "<?php echo jquery($version); ?>"; }); }
Updated jquery blade directive to accept $src Updated jquery blade directive to accept $src as a parameter
yoeunes_toastr
train
php
1074f9209ea9aa2576791cb61f801839a71e97ff
diff --git a/tests/DiCompilerTest.php b/tests/DiCompilerTest.php index <HASH>..<HASH> 100644 --- a/tests/DiCompilerTest.php +++ b/tests/DiCompilerTest.php @@ -89,6 +89,7 @@ class DiCompilerTest extends \PHPUnit_Framework_TestCase { $compiler = new DiCompiler(new FakeCarModule, $_ENV['TMP_DIR']); $compiler->dumpGraph(); - $this->assertFileExists($_ENV['TMP_DIR'] . '/graph/Ray_Compiler_FakeCarInterface-.html'); + $any = Name::ANY; + $this->assertFileExists($_ENV['TMP_DIR'] . '/graph/Ray_Compiler_FakeCarInterface-' . $any . '.html'); } } diff --git a/tests/Fake/FakeLoggerPointProvider.php b/tests/Fake/FakeLoggerPointProvider.php index <HASH>..<HASH> 100644 --- a/tests/Fake/FakeLoggerPointProvider.php +++ b/tests/Fake/FakeLoggerPointProvider.php @@ -2,7 +2,6 @@ namespace Ray\Compiler; -use Ray\Di\InjectionPoint; use Ray\Di\InjectionPointInterface; use Ray\Di\ProviderInterface;
package portability use Name::ANY
ray-di_Ray.Compiler
train
php,php
366e484b4d89d102a2d08cde760db29550d03f0b
diff --git a/i18n.class.php b/i18n.class.php index <HASH>..<HASH> 100644 --- a/i18n.class.php +++ b/i18n.class.php @@ -254,7 +254,7 @@ class i18n { $userLangs = array_unique($userLangs); foreach ($userLangs as $key => $value) { - $userLangs[$key] = preg_replace('/[^a-zA-Z0-9]/', '', $value); // only allow a-z, A-Z and 0-9 + $userLangs[$key] = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // only allow a-z, A-Z and 0-9 } return $userLangs;
Also allow '_' and '-' for language codes Closes #6
Philipp15b_php-i18n
train
php
14e4c9cc443d98dd31402e4d0789c379aa8cc5bb
diff --git a/tuf/signed/sign.go b/tuf/signed/sign.go index <HASH>..<HASH> 100644 --- a/tuf/signed/sign.go +++ b/tuf/signed/sign.go @@ -87,7 +87,8 @@ func Sign(service CryptoService, s *data.Signed, signingKeys []data.PublicKey, }) } - for _, sig := range s.Signatures { + for i := range s.Signatures { + sig := s.Signatures[i] if _, ok := signingKeyIDs[sig.KeyID]; ok { // key is in the set of key IDs for which a signature has been created continue
linting: fix Implicit memory aliasing in RangeStmt
theupdateframework_notary
train
go
0260652342d2e0a148f1328055cda857e413afb8
diff --git a/MAVProxy/tools/MAVExplorer.py b/MAVProxy/tools/MAVExplorer.py index <HASH>..<HASH> 100755 --- a/MAVProxy/tools/MAVExplorer.py +++ b/MAVProxy/tools/MAVExplorer.py @@ -101,6 +101,10 @@ def cmd_graph(args): def cmd_test(args): process_stdin('graph VFR_HUD.groundspeed VFR_HUD.airspeed') +def cmd_set(args): + '''control MAVExporer options''' + mestate.settings.command(args) + def process_stdin(line): '''handle commands from user''' if line is None: @@ -157,6 +161,7 @@ def main_loop(): command_map = { 'graph' : (cmd_graph, 'display a graph'), + 'set' : (cmd_set, 'control settings'), 'test' : (cmd_test, 'display a graph') }
MAVExplorer: added set command
ArduPilot_MAVProxy
train
py
013f7177de80d8c697f4f0b99b8a8f17593b561a
diff --git a/stomp/transport.py b/stomp/transport.py index <HASH>..<HASH> 100644 --- a/stomp/transport.py +++ b/stomp/transport.py @@ -61,7 +61,7 @@ class BaseTransport(stomp.listener.Publisher): # # Used to parse the STOMP "content-length" header lines, # - __content_length_re = re.compile('^content-length[:]\\s*(?P<value>[0-9]+)', re.MULTILINE) + __content_length_re = re.compile(b'^content-length[:]\\s*(?P<value>[0-9]+)', re.MULTILINE) def __init__(self, wait_on_receipt, auto_decode=True): self.__recvbuf = b'' @@ -372,7 +372,7 @@ class BaseTransport(stomp.listener.Publisher): frame = self.__recvbuf[0:pos] preamble_end = frame.find(b'\n\n') if preamble_end >= 0: - content_length_match = BaseTransport.__content_length_re.search(decode(frame[0:preamble_end])) + content_length_match = BaseTransport.__content_length_re.search(frame[0:preamble_end]) if content_length_match: content_length = int(content_length_match.group('value')) content_offset = preamble_end + 2
Avoid decoding header chunk when looking for content-length
jasonrbriggs_stomp.py
train
py
56dae89a1750e61dc688233a950210b55030b2ba
diff --git a/DependencyInjection/MopArangoDbExtension.php b/DependencyInjection/MopArangoDbExtension.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/MopArangoDbExtension.php +++ b/DependencyInjection/MopArangoDbExtension.php @@ -48,7 +48,10 @@ class MopArangoDbExtension extends Extension } - $container->setAlias('mop_arangodb.default_connection', 'mop_arangodb.connections.'.$config['default_connection']); + if ($config['default_connection']) { + $container->setAlias('mop_arangodb.default_connection', 'mop_arangodb.connections.'.$config['default_connection']); + } + if (isset($config['fos'])) { $container->setParameter('mop_arangodb.fos.collection', $config['fos']['collection']); $container->setAlias('mop_arangodb.fos.connection', 'mop_arangodb.connections.'.$config['fos']['connection']);
checkse iff hass configurazion
m0ppers_MopArangoDbBundle
train
php
4efdba1d14faf62970662415b27bc063c32a157a
diff --git a/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php b/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php index <HASH>..<HASH> 100644 --- a/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php +++ b/src/site/components/com_base/templates/helpers/ui/_ui_privacy.php @@ -7,7 +7,7 @@ <?php else : ?> <input type="hidden" name="privacy_name[]" value="<?= $name ?>" /> <?php endif; ?> - <select class="autosubmit input-large" name="<?= $name ?>"> + <select class="input-large <?= ($auto_submit) ? 'autosubmit' : '' ?>" name="<?= $name ?>"> <?= @html('options', $options, $selected)?> </select> <?php if ($auto_submit) : ?>
Fixed a bug which prevented switching off auto_submit
anahitasocial_anahita
train
php
1e27f200b3bb1a348c9f3534362cc8681e7a62ee
diff --git a/salt/modules/network.py b/salt/modules/network.py index <HASH>..<HASH> 100644 --- a/salt/modules/network.py +++ b/salt/modules/network.py @@ -747,7 +747,7 @@ def get_route(iface=None,dest=None): if iface is not None and dest is None: output = __salt__['cmd.run']('ip route show dev {0}'.format(iface)).splitlines() # - else + else: output = __salt__['cmd.run']('ip route show').splitlines() for line in output: route = {} @@ -757,6 +757,9 @@ def get_route(iface=None,dest=None): route['dest'] = '0.0.0.0' elif dest_re is not None: route['dest'] = dest_re.group() + gw_re = re.match('.*via ([a-z0-9\.-]*) ', line) + if gw_re is not None: + route['gateway'] = gw_re.group(1) iface_re = re.match('.*dev ([a-z0-9-]*) ', line) if iface_re is not None: route['iface'] = iface_re.group(1)
now actually including the gateway in the routes returned
saltstack_salt
train
py
80d360b19d5593441a44ebd42b7e36a4b3bd82d1
diff --git a/src/php/HAB/Pica/Record/Record.php b/src/php/HAB/Pica/Record/Record.php index <HASH>..<HASH> 100644 --- a/src/php/HAB/Pica/Record/Record.php +++ b/src/php/HAB/Pica/Record/Record.php @@ -88,6 +88,13 @@ abstract class Record { protected $_fields = array(); /** + * The containing parent record, if any. + * + * @var \HAB\Pica\Record + */ + protected $_parent; + + /** * Constructor. * * @param array $fields Initial set of fields
New variable: Containing parent record * php/HAB/Pica/Record/Record.php ($_parent): New variable. Containing parent record.
dmj_PicaRecord
train
php
02502e1bc9776bfd326ac52f59470c3f437500ee
diff --git a/spec/watcher_spec.rb b/spec/watcher_spec.rb index <HASH>..<HASH> 100644 --- a/spec/watcher_spec.rb +++ b/spec/watcher_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "spec_helper" describe(Jekyll::Watcher) do
fix: unfreeze to make tests pass
jekyll_jekyll-watch
train
rb
169348bcda9a2dd31fe43ad1e83fc81641d5fc3f
diff --git a/mod/assignment/type/online/assignment.class.php b/mod/assignment/type/online/assignment.class.php index <HASH>..<HASH> 100644 --- a/mod/assignment/type/online/assignment.class.php +++ b/mod/assignment/type/online/assignment.class.php @@ -79,7 +79,7 @@ class assignment_online extends assignment_base { if ($editmode) { $this->view_header(get_string('editmysubmission', 'assignment')); } else { - $this->view_header(get_string('viewsubmissions', 'assignment')); + $this->view_header(); } $this->view_intro();
mod-assignment MDL-<I> Fixed up incorrect string in online assignment header
moodle_moodle
train
php
a05167465b7c47ef20b4df9d87a6b6ce4a20bd65
diff --git a/Model/Menu/Node/Image/Node.php b/Model/Menu/Node/Image/Node.php index <HASH>..<HASH> 100644 --- a/Model/Menu/Node/Image/Node.php +++ b/Model/Menu/Node/Image/Node.php @@ -43,7 +43,7 @@ class Node try { $node = $this->nodeRepository->getById($nodeId); } catch (NoSuchEntityException $exception) { - // Normally, this error should never be happen. + // Normally, this error should never happen. // But if it somehow does happen, then there is possibly an issue on JS side that should be fixed. $this->logger->critical($exception); return; @@ -53,7 +53,7 @@ class Node $node->setImage($image); $this->nodeRepository->save($node); } catch (CouldNotSaveException $exception) { - // Normally, this error should never be happen. + // Normally, this error should never happen. // But if it somehow does happen, then there is possibly an issue on server-side that should be fixed. $this->logger->critical($exception); }
[<I>] Update some comments in image node model updateNodeImage method
SnowdogApps_magento2-menu
train
php
b3ad3ed58d239309c5a2aaff88896a021fbf1858
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,13 +8,9 @@ def getfile(filename): setup( name='autocommand', version='2.0.1', - py_modules=[ - 'autocommand', - 'autocommand.automain', - 'autocommand.autoasync', - 'autocommand.autoparse', - 'autocommand.autocommand', - 'autocommand.errors'], + packages=[ + 'autocommand' + ], package_dir={'': 'src'}, platforms='any', license='LGPLv3',
Updated setup.py to use 'packages'
Lucretiel_autocommand
train
py
e8eacd4de866354d0f92224a6897809727a18bd6
diff --git a/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java b/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java index <HASH>..<HASH> 100644 --- a/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java +++ b/zookeeper/src/test/java/org/togglz/zookeeper/ZookeeperStateRepositoryTest.java @@ -149,7 +149,7 @@ public class ZookeeperStateRepositoryTest { } }).start(); latch.await(2, TimeUnit.SECONDS); - Thread.sleep(25); + Thread.sleep(500); loadedFeatureState = stateRepository.getFeatureState(TestFeature.FEATURE); assertThat(reflectionEquals(externallySetState, loadedFeatureState), is(true));
Increased sleep duration to work around failing tests.. (#<I>)
togglz_togglz
train
java
535ea24eea34b4c1cc2029a672b22a074fc4db05
diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index <HASH>..<HASH> 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -1023,7 +1023,7 @@ class ShellCase(AdaptedConfigurationTestCaseMixIn, ShellTestCase): ''' Execute salt-ssh ''' - arg_str = '-i --priv {0} --roster-file {1} localhost {2} --out=json'.format(os.path.join(TMP_CONF_DIR, 'key_test'), os.path.join(TMP_CONF_DIR, 'roster'), arg_str) + arg_str = '-c {0} -i --priv {1} --roster-file {2} localhost {3} --out=json'.format(self.get_config_dir(), os.path.join(TMP_CONF_DIR, 'key_test'), os.path.join(TMP_CONF_DIR, 'roster'), arg_str) return self.run_script('salt-ssh', arg_str, with_retcode=with_retcode, catch_stderr=catch_stderr, raw=True) def run_run(self, arg_str, with_retcode=False, catch_stderr=False):
Now we don't need root anymore
saltstack_salt
train
py
5b967ba6ac5dece6f61e234d3db9c9b1bc221d17
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -38,7 +38,7 @@ class Configuration implements ConfigurationInterface ->cannotBeEmpty() ->beforeNormalization() ->ifString() - ->then(function ($v) { return array(['form_name' => $v, 'field_name' => 'recaptcha']); }) + ->then(function ($v) { return array(['form_name' => $v]); }) ->end() ->prototype('array') ->children() @@ -49,8 +49,6 @@ class Configuration implements ConfigurationInterface ->end() ->scalarNode('field_name') ->info('The field name that will hold the reCAPTCHA.') - ->isRequired() - ->cannotBeEmpty() ->defaultValue('recaptcha') ->treatNullLike('recaptcha') ->end()
Fix configuration - don't require field_name since it has a default value
nietonfir_GoogleRecaptchaBundle
train
php
b6e751e5647c18c7e28dce06adcc452cfc594b39
diff --git a/src/EventListener/Imagick.php b/src/EventListener/Imagick.php index <HASH>..<HASH> 100644 --- a/src/EventListener/Imagick.php +++ b/src/EventListener/Imagick.php @@ -97,7 +97,7 @@ class Imagick implements ListenerInterface, ImagickAware { } // Inject the image blob - $this->imagick->readImageBlob($image->getBlob()); + $event->getLoaderManager()->load($image->getMimeType(), $image->getBlob()); // If we have specified a size hint, check if we have a different input size // than the original and set the ratio as an argument for any other listeners
Use LoaderManager for Imagick eventlistener as well
imbo_imbo
train
php
6be9f1ee21eaa451591fb0d5603ae14ed25e9f40
diff --git a/appstream/component.py b/appstream/component.py index <HASH>..<HASH> 100644 --- a/appstream/component.py +++ b/appstream/component.py @@ -81,6 +81,13 @@ class Release(object): self.size_installed = 0 self.size_download = 0 + def get_checksum_by_target(self, target): + """ returns a checksum of a specific kind """ + for csum in self.checksums: + if csum.target == target: + return csum + return None + def add_checksum(self, csum): """ Add a checksum to a release object """ self.checksums.append(csum)
Add Release.get_checksum_by_target()
hughsie_python-appstream
train
py
08b2275129eafd741bb49a746e4562498d30b0bc
diff --git a/pkg/kubectl/apply.go b/pkg/kubectl/apply.go index <HASH>..<HASH> 100644 --- a/pkg/kubectl/apply.go +++ b/pkg/kubectl/apply.go @@ -163,16 +163,25 @@ func GetModifiedConfiguration(info *resource.Info, annotate bool) ([]byte, error return modified, nil } +// If the last applied configuration annotation is already present, then // UpdateApplyAnnotation gets the modified configuration of the object, // without embedding it again, and then sets it on the object as the annotation. +// Otherwise, it does nothing. func UpdateApplyAnnotation(info *resource.Info) error { - modified, err := GetModifiedConfiguration(info, false) + original, err := GetOriginalConfiguration(info) if err != nil { return err } - if err := SetOriginalConfiguration(info, modified); err != nil { - return err + if len(original) > 0 { + modified, err := GetModifiedConfiguration(info, false) + if err != nil { + return err + } + + if err := SetOriginalConfiguration(info, modified); err != nil { + return err + } } return nil
Update annotation only if apply already called.
kubernetes_kubernetes
train
go