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 |
|---|---|---|---|---|---|
5281643757c308012b6e9df1f23b438154038ce6 | diff --git a/test/robotto.test.js b/test/robotto.test.js
index <HASH>..<HASH> 100644
--- a/test/robotto.test.js
+++ b/test/robotto.test.js
@@ -1,4 +1,3 @@
-// jscs:disable maximumLineLength
'use strict';
const assert = require('chai').assert; | No need to ignore max-len on test file | trachelas_robotto | train | js |
04e571bea36feaae88f6910d2b919485d84ba22b | diff --git a/contrib/externs/angular.js b/contrib/externs/angular.js
index <HASH>..<HASH> 100644
--- a/contrib/externs/angular.js
+++ b/contrib/externs/angular.js
@@ -40,7 +40,7 @@ angular.bind = function(self, fn, args) {};
/**
* @param {Element} element
- * @param {Array<string|Function>=} opt_modules
+ * @param {Array.<string|Function>=} opt_modules
* @return {function()}
*/
angular.bootstrap = function(element, opt_modules) {}; | Fixup Array params entry to get angular externs file to compile.
R=dnadasi,mihaip
DELTA=1 (0 added, 0 deleted, 1 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL> | google_closure-compiler | train | js |
dbc2f7d92c4f82e7a07afc782bc6a5d6a412cdb8 | diff --git a/src/Gallery.js b/src/Gallery.js
index <HASH>..<HASH> 100644
--- a/src/Gallery.js
+++ b/src/Gallery.js
@@ -264,7 +264,8 @@ class Gallery extends Component {
className="ReactGridGallery"
ref={(c) => this._gallery = c}>
<iframe style={resizeIframeStyles}
- ref={(c) => c && c.contentWindow && c.contentWindow.addEventListener('resize', this.onResize) } />
+ ref={(c) => c && c.contentWindow
+ && c.contentWindow.addEventListener('resize', this.onResize) } />
{images}
<Lightbox
images={this.props.images} | merged #<I> fix preloadNextImage propagation to Lightbox | benhowell_react-grid-gallery | train | js |
50d79143485fcb14f6dbe0bf154bad1d5e057046 | diff --git a/db/schema_test.go b/db/schema_test.go
index <HASH>..<HASH> 100644
--- a/db/schema_test.go
+++ b/db/schema_test.go
@@ -76,7 +76,7 @@ var _ = Describe("Database Schema", func() {
var v int
Ω(r.Scan(&v)).Should(Succeed())
- Ω(v).Should(Equal(2))
+ Ω(v).Should(Equal(3))
})
It("creates the correct tables", func() {
diff --git a/db/schema_v3.go b/db/schema_v3.go
index <HASH>..<HASH> 100644
--- a/db/schema_v3.go
+++ b/db/schema_v3.go
@@ -43,5 +43,10 @@ func (s v3Schema) Deploy(db *DB) error {
return err
}
+ err = db.Exec(`UPDATE schema_info set version = 3`)
+ if err != nil {
+ return err
+ }
+
return nil
} | Actually update the schema version to v3 | starkandwayne_shield | train | go,go |
a75db9e0beda163ab1ea3b4098f396a56f3b8a62 | diff --git a/lib/key_tree.rb b/lib/key_tree.rb
index <HASH>..<HASH> 100644
--- a/lib/key_tree.rb
+++ b/lib/key_tree.rb
@@ -17,7 +17,7 @@ module KeyTree
when Hash
KeyTree::Tree[contents]
when Array
- KeyTree::Forest[contents]
+ KeyTree::Forest[*contents]
else
raise ArgumentError, "can't load #{contents.class} into a KeyTree"
end
diff --git a/lib/key_tree/forest.rb b/lib/key_tree/forest.rb
index <HASH>..<HASH> 100644
--- a/lib/key_tree/forest.rb
+++ b/lib/key_tree/forest.rb
@@ -5,7 +5,7 @@ module KeyTree
# A forest is a (possibly nested) collection of trees
#
class Forest < Array
- def self.[](contents = [])
+ def self.[](*contents)
contents.reduce(Forest.new) do |result, content|
result << KeyTree[content]
end.sort! | Fix forest initalization
KeyTree::Forest should form a forest of all its arguments, not require the first one to already be an array. | notCalle_ruby-keytree | train | rb,rb |
23356d4cb27d13745833f9150a283e7a8a2816e1 | diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index <HASH>..<HASH> 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -608,7 +608,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
latch3.countDown();
});
- latch3.await(1500, TimeUnit.MILLISECONDS);
+ assertTrue(latch3.await(1500, TimeUnit.MILLISECONDS));
// Check to see if the transaction is closed.
final CountDownLatch latch4 = new CountDownLatch(1); | TINKERPOP3-<I> Added an assert as suggested by @pluradj in the PR. | apache_tinkerpop | train | java |
b76abcd2431b8b97dd1383c80b85f423c3c11d29 | diff --git a/test/e2e_node/remote/utils.go b/test/e2e_node/remote/utils.go
index <HASH>..<HASH> 100644
--- a/test/e2e_node/remote/utils.go
+++ b/test/e2e_node/remote/utils.go
@@ -78,7 +78,7 @@ func setupCNI(host, workspace string) error {
// configureFirewall configures iptable firewall rules.
func configureFirewall(host string) error {
- klog.V(2).Infof("Configure iptables HEYHO firewall rules on %q", host)
+ klog.V(2).Infof("Configure iptables firewall rules on %q", host)
// Since the goal is to enable connectivity without taking into account current rule,
// we can just prepend the accept rules directly without any check | Remove the typo in the logs while configuring firewall for node e2e | kubernetes_kubernetes | train | go |
05e07096c0e2d505bca20e2a2837338522ca0ca3 | diff --git a/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java b/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java
+++ b/src/main/java/org/altbeacon/beacon/service/scanner/CycledLeScanner.java
@@ -208,7 +208,7 @@ public abstract class CycledLeScanner {
} else {
LogManager.d(TAG, "disabling scan");
mScanning = false;
-
+ mScanCyclerStarted = false;
stopScan();
mLastScanCycleEndTime = new Date().getTime();
} | Bug fix: stopping and starting monitoring disables scans | AltBeacon_android-beacon-library | train | java |
62570a5b8b4465fe2e2ae3c9f1a6713c780c18a2 | diff --git a/billy/core/default_settings.py b/billy/core/default_settings.py
index <HASH>..<HASH> 100644
--- a/billy/core/default_settings.py
+++ b/billy/core/default_settings.py
@@ -5,7 +5,7 @@ MONGO_PORT = 27017
MONGO_DATABASE = 'billy'
BOUNDARY_SERVICE_URL = 'http://localhost:8001/1.0/'
-BOUNDARY_SERVICE_SETS = 'sldl-14,sldu-14,nh-12'
+BOUNDARY_SERVICE_SETS = 'sldl-17,sldu-17,nh-12'
API_BASE_URL = 'http://127.0.0.1:8000/api/v1/' | Update to newly-deployed <I> Census boundary sets | openstates_billy | train | py |
baee677845be16e46a1dfb6847cc7d5bff512935 | diff --git a/telemetry/telemetry/page/page.py b/telemetry/telemetry/page/page.py
index <HASH>..<HASH> 100644
--- a/telemetry/telemetry/page/page.py
+++ b/telemetry/telemetry/page/page.py
@@ -6,8 +6,6 @@ import os
import re
import urlparse
-from telemetry import decorators
-
class Page(object):
def __init__(self, url, page_set, attributes=None, base_dir=None):
@@ -42,17 +40,6 @@ class Page(object):
raise AttributeError(
'%r object has no attribute %r' % (self.__class__, name))
- @decorators.Cache
- def GetSyntheticDelayCategories(self):
- if not hasattr(self, 'synthetic_delays'):
- return []
- result = []
- for delay, options in self.synthetic_delays.items():
- options = '%f;%s' % (options.get('target_duration', 0),
- options.get('mode', 'static'))
- result.append('DELAY(%s;%s)' % (delay, options))
- return result
-
def __lt__(self, other):
return self.url < other.url | Revert <I> "Convert smoothness to the new timeline based metr..."
Dependant CL was reverted (<URL>)
> Convert smoothness to the new timeline based metric API.
>
> This is a reland of <URL> | catapult-project_catapult | train | py |
7031bbb1ec0136e0a1ebc127045457d20e0c3aa6 | diff --git a/jwx.go b/jwx.go
index <HASH>..<HASH> 100644
--- a/jwx.go
+++ b/jwx.go
@@ -21,6 +21,3 @@
//
// You can find more high level documentation at Github (https://github.com/lestrrat-go/jwx)
package jwx
-
-// Version describes the version of this library.
-const Version = "0.0.1" | Remove Version constant -- we're not in CPAN anymore | lestrrat-go_jwx | train | go |
2481a2adda3c1fe5d60143c0151ba2a80e889746 | diff --git a/lib/GR/ServerEnv.php b/lib/GR/ServerEnv.php
index <HASH>..<HASH> 100644
--- a/lib/GR/ServerEnv.php
+++ b/lib/GR/ServerEnv.php
@@ -19,11 +19,11 @@ class ServerEnv {
while (($file_name = readdir($dir)) !== FALSE) {
$path = "$apache_site_enabled_dir_path/$file_name";
if (!is_file($path)) {
- continue;
+ continue;
}
$contents = file_get_contents($path);
$escaped_site_root = preg_quote($this->site_root, "/");
- $result = preg_match("/DocumentRoot\s*{$escaped_site_root}\s*$/m", $contents);
+ $result = preg_match("/DocumentRoot\s*{$escaped_site_root}\/?\s*$/m", $contents);
if ($result === 1) {
$this->vhost_config_path = $path;
return TRUE; | Fix regular expression to allow slash
Regular expression didn't allow a slash at the end of the document root. | giant-rabbit_php-util | train | php |
e89e262aab2819a02fd16031e189ab59ea3a98b8 | diff --git a/cmsplugin_cascade/bootstrap3/utils.py b/cmsplugin_cascade/bootstrap3/utils.py
index <HASH>..<HASH> 100644
--- a/cmsplugin_cascade/bootstrap3/utils.py
+++ b/cmsplugin_cascade/bootstrap3/utils.py
@@ -52,7 +52,7 @@ def get_image_tags(context, instance, options):
resize_options = options.get('resize-options', {})
crop = 'crop' in resize_options
upscale = 'upscale' in resize_options
- subject_location = 'subject_location' in resize_options
+ subject_location = instance.image.subject_location if 'subject_location' in resize_options else False
resolutions = (False, True) if 'high_resolution' in resize_options else (False,)
tags = {'sizes': [], 'srcsets': {}, 'is_responsive': is_responsive, 'extra_styles': {}}
if is_responsive:
@@ -130,7 +130,7 @@ def get_picture_elements(context, instance):
resize_options = instance.glossary.get('resize-options', {})
crop = 'crop' in resize_options
upscale = 'upscale' in resize_options
- subject_location = 'subject_location' in resize_options
+ subject_location = instance.image.subject_location if 'subject_location' in resize_options else False
max_width = 0
max_zoom = 0
elements = [] | Fixed: enabling subject_location does not work | jrief_djangocms-cascade | train | py |
88cf3551a2728602778b3ba25def8d509cc5ec91 | diff --git a/test/integration/smtpclient-test.js b/test/integration/smtpclient-test.js
index <HASH>..<HASH> 100644
--- a/test/integration/smtpclient-test.js
+++ b/test/integration/smtpclient-test.js
@@ -177,7 +177,7 @@ describe('smtpclient authentication tests', function() {
port: port,
enableAuthentication: true,
secureConnection: false,
- ignoreTLS: true,
+ ignoreTLS: false,
authMethods: ["PLAIN", "LOGIN", "XOAUTH2"]
}; | Require starttls to be always used with integration test server | emailjs_emailjs-smtp-client | train | js |
a468d6cebc2bdacf89b1b4a98fdc1d91ae52b010 | diff --git a/worldengine/generation.py b/worldengine/generation.py
index <HASH>..<HASH> 100644
--- a/worldengine/generation.py
+++ b/worldengine/generation.py
@@ -200,7 +200,7 @@ def generate_world(w, step):
# Prepare sufficient seeds for the different steps of the generation
rng = numpy.random.RandomState(w.seed) # create a fresh RNG in case the global RNG is compromised (i.e. has been queried an indefinite amount of times before generate_world() was called)
- sub_seeds = rng.randint(0, 4294967295, size=100) # sys.maxsize didn't quite work
+ sub_seeds = rng.randint(0, numpy.iinfo(numpy.int32).max, size=100) # choose lowest common denominator (32 bit Windows numpy cannot handle a larger value)
seed_dict = {
'PrecipitationSimulation': sub_seeds[ 0], # after 0.19.0 do not ever switch out the seeds here to maximize seed-compatibility
'ErosionSimulation': sub_seeds[ 1], | Changed maximum seed-value in generation.py. | Mindwerks_worldengine | train | py |
fabc52192dfe4865391e194bf083e3e22a8479eb | diff --git a/lib/specjour/manager.rb b/lib/specjour/manager.rb
index <HASH>..<HASH> 100644
--- a/lib/specjour/manager.rb
+++ b/lib/specjour/manager.rb
@@ -141,8 +141,10 @@ module Specjour
end
def load_app
- RSpec::Preloader.load(preload_spec) if preload_spec
- Cucumber::Preloader.load(preload_feature) if preload_feature
+ in_project do
+ RSpec::Preloader.load(preload_spec) if preload_spec
+ Cucumber::Preloader.load(preload_feature) if preload_feature
+ end
end
def execute_before_fork | Load the app that was rsync'd
We'd load the relative spec_helper file which doesn't correspond to
the app that was actually rsyncd over. | sandro_specjour | train | rb |
adb45884586fb0b1d421587f9256de741ad8d6b9 | diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -5,6 +5,7 @@ import (
"errors"
"net/http"
"os"
+ "fmt"
"github.com/rs/cors"
"github.com/zenazn/goji"
@@ -68,7 +69,7 @@ func main() {
//
err := players.StartEventProcessor()
if err != nil {
- println(err.Error)
+ fmt.Printf("%+v", err.Error)
println("Could not initialize event queue. Exiting")
os.Exit(1)
} | Try to get more output when failing queue connection. | ckpt_backend-services | train | go |
b5acfd9ee284a9a11f2552a9df9bceb675b06701 | diff --git a/test/functional/connection_tests.js b/test/functional/connection_tests.js
index <HASH>..<HASH> 100644
--- a/test/functional/connection_tests.js
+++ b/test/functional/connection_tests.js
@@ -49,7 +49,7 @@ exports['Should correctly connect to server using just events'] = {
* @ignore
*/
exports['Should correctly connect to server using big connection pool'] = {
- metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
+ metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }, ignore: { travis:true } },
// The actual test we wish to run
test: function(configuration, test) { | commented out a test for travis | mongodb_node-mongodb-native | train | js |
19ba36539b7be008f3f353a62597a73878f81419 | diff --git a/hotdoc/core/comment_block.py b/hotdoc/core/comment_block.py
index <HASH>..<HASH> 100644
--- a/hotdoc/core/comment_block.py
+++ b/hotdoc/core/comment_block.py
@@ -51,10 +51,10 @@ class Comment(object):
# This constructor is convenient
# pylint: disable=too-many-instance-attributes
# pylint: disable=too-many-arguments
- def __init__(self, name='', title='', params=None, filename='',
+ def __init__(self, name=u'', title=u'', params=None, filename=u'',
lineno=-1, endlineno=-1, annotations=None,
- description='', short_description='', tags=None,
- raw_comment='', topics=None):
+ description=u'', short_description='', tags=None,
+ raw_comment=u'', topics=None):
self.name = name
self.title = title
self.params = params or {} | core.comment: more unicode sanitization | hotdoc_hotdoc | train | py |
c6a190290aa8019c0fe865494c32db24902c6fb4 | diff --git a/spec/unit/data_mapper/relation/header/aliases_spec.rb b/spec/unit/data_mapper/relation/header/aliases_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/data_mapper/relation/header/aliases_spec.rb
+++ b/spec/unit/data_mapper/relation/header/aliases_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
-describe Relation::Header, '#each' do
- subject { object.aliases } #each { |field, aliased_field| yields[field] = aliased_field } }
+describe Relation::Header, '#aliases' do
+ subject { object.aliases }
before do
object.should be_instance_of(described_class) | Fix minor refactoring leftovers in specs | rom-rb_rom | train | rb |
aafc39b4a0ac39bc103295affb3482921b3811db | diff --git a/src/models/BrowserStyleSheet.js b/src/models/BrowserStyleSheet.js
index <HASH>..<HASH> 100644
--- a/src/models/BrowserStyleSheet.js
+++ b/src/models/BrowserStyleSheet.js
@@ -162,8 +162,9 @@ if (!DISABLE_SPEEDY) {
}
// workaround for an IE/Edge bug: https://twitter.com/probablyup/status/958138927981977600
- newEl.textContent = ' '
+ newEl.appendChild(document.createTextNode(''))
+ // $FlowFixMe
this.el.parentNode.replaceChild(newEl, this.el)
this.el = newEl
this.ready = true | use createTextNode instead of textContent
it's more compatible | styled-components_styled-components | train | js |
d599213f37871a7412ea149fb7d8ed60942c7416 | diff --git a/src/FluentHandler.php b/src/FluentHandler.php
index <HASH>..<HASH> 100644
--- a/src/FluentHandler.php
+++ b/src/FluentHandler.php
@@ -105,7 +105,7 @@ class FluentHandler extends AbstractProcessingHandler
* returns the context
* @return array
*/
- protected function getContext($context)
+ protected function getContext($context): array
{
if ($this->contextHasException($context)) {
return $this->getContextExceptionTrace($context);
@@ -113,7 +113,12 @@ class FluentHandler extends AbstractProcessingHandler
return $context;
}
- protected function contextHasException($context)
+ /**
+ * Identifies the content type of the given $context
+ * @param mixed $context
+ * @return bool
+ */
+ protected function contextHasException($context): bool
{
return (
is_array($context)
@@ -122,7 +127,12 @@ class FluentHandler extends AbstractProcessingHandler
);
}
- protected function getContextExceptionTrace($context)
+ /**
+ * Returns the entire exception trace as a string
+ * @param array $context
+ * @return string
+ */
+ protected function getContextExceptionTrace(array $context): string
{
return $context['exception']->getTraceAsString();
} | using php7 type hinting and added docblocks | ytake_Laravel-FluentLogger | train | php |
67d3017131411108bb56e525a3ac3c2790215fa3 | diff --git a/app/gosqs/gosqs_test.go b/app/gosqs/gosqs_test.go
index <HASH>..<HASH> 100644
--- a/app/gosqs/gosqs_test.go
+++ b/app/gosqs/gosqs_test.go
@@ -1061,7 +1061,8 @@ func TestReceiveMessage_CanceledByClient(t *testing.T) {
go func() {
defer wg.Done()
// receive message (that will be canceled)
- req, err := http.NewRequestWithContext(ctx, "POST", "/", nil)
+ req, err := http.NewRequest("POST", "/", nil)
+ req = req.WithContext(ctx)
if err != nil {
t.Fatal(err)
} | NewRequestWithContext is only for go <I>, reverted back to old way to support go <I> | p4tin_goaws | train | go |
71e775a329b2a585af9e48e2e15eb356037a8828 | diff --git a/src/Api/Traits/Searchable.php b/src/Api/Traits/Searchable.php
index <HASH>..<HASH> 100644
--- a/src/Api/Traits/Searchable.php
+++ b/src/Api/Traits/Searchable.php
@@ -13,6 +13,7 @@ use seregazhuk\PinterestBot\Api\SearchResponse;
*
* @property string $searchScope
* @property Request request
+ * @property Response $response
*/
trait Searchable
{ | fix: traits docBlocks issues | seregazhuk_php-pinterest-bot | train | php |
20cb0a95d56817721a2f887f53ba4f9e9e0a2493 | diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -352,16 +352,24 @@ func NewClientFromInfo(info ConnectInfo) (*Client, error) {
func (c *Client) Addresses() ([]string, error) {
addresses := make([]string, 0)
- serverStatus, err := c.ServerStatus()
- if err != nil {
- return nil, err
- }
-
if c.Transport == "unix" {
+ serverStatus, err := c.ServerStatus()
+ if err != nil {
+ return nil, err
+ }
+
addresses = serverStatus.Environment.Addresses
} else if c.Transport == "https" {
addresses = append(addresses, c.BaseURL[8:])
- addresses = append(addresses, serverStatus.Environment.Addresses...)
+
+ if !c.Remote.Public {
+ serverStatus, err := c.ServerStatus()
+ if err != nil {
+ return nil, err
+ }
+
+ addresses = append(addresses, serverStatus.Environment.Addresses...)
+ }
} else {
return nil, fmt.Errorf("unknown transport type: %s", c.Transport)
} | Don't grab addresses from public remotes | lxc_lxd | train | go |
13ec4e7ce1af1e0309e8b15b2982d1b162e57343 | diff --git a/ui/plugins/controller.js b/ui/plugins/controller.js
index <HASH>..<HASH> 100644
--- a/ui/plugins/controller.js
+++ b/ui/plugins/controller.js
@@ -96,7 +96,7 @@ treeherder.controller('PluginCtrl',
$scope.tabs = [
{
id: "tinderbox",
- title: "Tinderbox",
+ title: "Job Details",
content: "plugins/tinderbox/main.html"
},
{
@@ -106,12 +106,12 @@ treeherder.controller('PluginCtrl',
},
{
id: "open-bugs",
- title: "Open bugs",
+ title: "Open Bugs",
content: "plugins/open_bugs_suggestions/main.html"
},
{
id: "closed-bugs",
- title: "Closed bugs",
+ title: "Closed Bugs",
content: "plugins/closed_bugs_suggestions/main.html"
}
]; | change naming of the job detail tab | mozilla_treeherder | train | js |
0d58e6f01850039b990ae0f949b01094865b9bf2 | diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index <HASH>..<HASH> 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1016,4 +1016,35 @@ function unquote(str) {
if (str) return str.replace(/^"(.*)"$/, "$1");
}
+pbxProject.prototype.getFirstProject = function() {
+
+ // Get pbxProject container
+ var pbxProjectContainer = this.pbxProjectSection();
+
+ // Get first pbxProject UUID
+ var firstProjectUuid = Object.keys(pbxProjectContainer)[0];
+
+ // Get first pbxProject
+ var firstProject = pbxProjectContainer[firstProjectUuid];
+
+ return {
+ uuid: firstProjectUuid,
+ firstProject: firstProject
+ }
+}
+
+pbxProject.prototype.getFirstTarget = function() {
+
+ // Get first targets UUID
+ var firstTargetUuid = this.getFirstProject()['firstProject']['targets'][0].value;
+
+ // Get first pbxNativeTarget
+ var firstTarget = this.pbxNativeTargetSection()[firstTargetUuid];
+
+ return {
+ uuid: firstTargetUuid,
+ firstTarget: firstTarget
+ }
+}
+
module.exports = pbxProject; | Add helpers for finding root project + first target | apache_cordova-node-xcode | train | js |
47293ebe15d7c475d432b843fa9a37800701055f | diff --git a/src/css.js b/src/css.js
index <HASH>..<HASH> 100644
--- a/src/css.js
+++ b/src/css.js
@@ -203,11 +203,12 @@ if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.hidden = function(elem){
var width = elem.offsetWidth, height = elem.offsetHeight,
force = /^tr$/i.test( elem.nodeName ); // ticket #4512
- return ( width === 0 && height === 0 && !force ) ?
+
+ return width === 0 && height === 0 && !force ?
true :
- ( width !== 0 && height !== 0 && !force ) ?
+ width !== 0 && height !== 0 && !force ?
false :
- !!( jQuery.curCSS(elem, "display") === "none" );
+ jQuery.curCSS(elem, "display") === "none";
};
jQuery.expr.filters.visible = function(elem){ | Removing unnecessary parens from :hidden. | jquery_jquery | train | js |
011cddc7f62619b3e48d23859b8937d160979316 | diff --git a/src/phpbrowscap/Browscap.php b/src/phpbrowscap/Browscap.php
index <HASH>..<HASH> 100644
--- a/src/phpbrowscap/Browscap.php
+++ b/src/phpbrowscap/Browscap.php
@@ -121,7 +121,7 @@ class Browscap
*
* @var string
*/
- public $userAgent = 'Browser Capabilities Project - PHP Browscap/%v %m';
+ public $userAgent = 'http://browscap.org/ - PHP Browscap/%v %m';
/**
* Flag to enable only lowercase indexes in the result. | Tweaked our UA to distinguish GaretJax version | browscap_browscap-php | train | php |
1cad348e411632952f1baea0f89694e25833918e | diff --git a/py/selenium/webdriver/chrome/service.py b/py/selenium/webdriver/chrome/service.py
index <HASH>..<HASH> 100644
--- a/py/selenium/webdriver/chrome/service.py
+++ b/py/selenium/webdriver/chrome/service.py
@@ -32,11 +32,12 @@ class Service(object):
:Args:
- executable_path : Path to the ChromeDriver
- - port : Port the service is running on """
+ - port : Port the service is running on
+ - service_args : List of args to pass to the chromedriver service"""
self.port = port
self.path = executable_path
- self.service_args= service_args
+ self.service_args = service_args
if self.port == 0:
self.port = utils.free_port()
@@ -49,8 +50,10 @@ class Service(object):
or when it can't connect to the service
"""
try:
- self.process = subprocess.Popen([self.path, "--port=%d%s" % (self.port,
- ' '.join(self.service_args) if self.service_args else '')], stdout=PIPE, stderr=PIPE)
+ self.process = subprocess.Popen([
+ self.path,
+ "--port=%d" % self.port] +
+ self.service_args or [], stdout=PIPE, stderr=PIPE)
except:
raise WebDriverException(
"ChromeDriver executable needs to be available in the path. \ | DanielWagnerHall: Allow multiple service args to be passed to the chromedriver service
r<I> | SeleniumHQ_selenium | train | py |
98e778a5cc84be640014c6101c63de6b07d22845 | diff --git a/features/step_definitions/engine/clearance_steps.rb b/features/step_definitions/engine/clearance_steps.rb
index <HASH>..<HASH> 100644
--- a/features/step_definitions/engine/clearance_steps.rb
+++ b/features/step_definitions/engine/clearance_steps.rb
@@ -28,8 +28,8 @@ end
Given /^I sign in$/ do
email = FactoryGirl.generate(:email)
steps %{
- I have signed up with "#{email}"
- I sign in with "#{email}"
+ Given I have signed up with "#{email}"
+ And I sign in with "#{email}"
}
end | Fix Gherkin LexingError in step definition | thoughtbot_clearance | train | rb |
29d51d95ced9bb0ad589c19fd022356a39de7c98 | diff --git a/tests/testoptions.py b/tests/testoptions.py
index <HASH>..<HASH> 100644
--- a/tests/testoptions.py
+++ b/tests/testoptions.py
@@ -154,6 +154,27 @@ class TestOptionTree(ComparisonTestCase):
self.assertEqual(options.MyType.Child['group2'].options,
{'kw2':'value2', 'kw4':'value4'})
+ def test_optiontree_inheritance_flipped(self):
+ """
+ Tests for ordering problems manifested in issue #93
+ """
+ options = OptionTree(groups={'group1': Options(),
+ 'group2': Options()})
+
+ opts3 = Options(kw3='value3')
+ opts4 = Options(kw4='value4')
+ options.MyType.Child = {'group1':opts3, 'group2':opts4}
+
+ opts1 = Options(kw1='value1')
+ opts2 = Options(kw2='value2')
+ options.MyType = {'group1':opts1, 'group2':opts2}
+
+ self.assertEqual(options.MyType.Child['group1'].options,
+ {'kw1':'value1', 'kw3':'value3'})
+
+ self.assertEqual(options.MyType.Child['group2'].options,
+ {'kw2':'value2', 'kw4':'value4'})
+
class TestStoreInheritance(ComparisonTestCase):
""" | Added unit test to make sure ordering doesn't affect option output
This test is designed to prevent regression of the problem reported in
issue #<I> | pyviz_holoviews | train | py |
ea64ab9ad239156ada90d2155b7c64934e6c891f | diff --git a/src/sap.ui.core/src/sap/ui/core/Configuration.js b/src/sap.ui.core/src/sap/ui/core/Configuration.js
index <HASH>..<HASH> 100644
--- a/src/sap.ui.core/src/sap/ui/core/Configuration.js
+++ b/src/sap.ui.core/src/sap/ui/core/Configuration.js
@@ -710,8 +710,8 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/base/Object', './Locale', 'sap/ui/th
* Return whether the controller code is deactivated. During design mode the
*
* @returns {boolean} whether the activation of the controller code is suppressed or not
- * @since 1.27.0
- * @experimental Since 1.27.0
+ * @since 1.26.4
+ * @experimental Since 1.26.4
* @public
*/
getControllerCodeDeactivated : function() { | [FIX] Updates since attribute for feature: View controller code is now
not loaded anymore when desig time mode is on -> <I>
Change-Id: I5d<I>c<I>fdc<I>a<I>ffbb0cb1e3b | SAP_openui5 | train | js |
44be695cf40ac48e4184537065e3b6599e0d1d81 | diff --git a/src/Libraries/Blocks/Form.php b/src/Libraries/Blocks/Form.php
index <HASH>..<HASH> 100644
--- a/src/Libraries/Blocks/Form.php
+++ b/src/Libraries/Blocks/Form.php
@@ -172,7 +172,7 @@ class Form extends String_
}
/**
- * Save form settings
+ * Save form settings (Admin)
* @param array $postContent
* @return static
*/ | add admin not to admin submit function for clarity | Web-Feet_coasterframework | train | php |
a0b175dd950237dc0d92e6ffeb08e5f712bcf543 | diff --git a/invalid_test.go b/invalid_test.go
index <HASH>..<HASH> 100644
--- a/invalid_test.go
+++ b/invalid_test.go
@@ -102,7 +102,7 @@ func TestParseErr(t *testing.T) {
},
{
"foo()",
- `1:6: unexpected token EOF - wanted command`,
+ `1:6: "foo()" must be followed by a statement`,
},
{
"foo() {",
diff --git a/parse.go b/parse.go
index <HASH>..<HASH> 100644
--- a/parse.go
+++ b/parse.go
@@ -523,12 +523,6 @@ func (p *parser) gotCommand(stop []Token) bool {
return true
}
-func (p *parser) command(stop []Token) {
- if !p.gotCommand(stop) {
- p.errWantedStr("command")
- }
-}
-
func (p *parser) binaryExpr(op Token, left Node, stop []Token) {
b := BinaryExpr{Op: op}
p.push(&b.Y)
@@ -728,6 +722,8 @@ func (p *parser) funcDecl(stop []Token, name string, pos position) {
Name: Lit{Val: name},
}
p.push(&fun.Body)
- p.command(stop)
+ if !p.gotCommand(stop) {
+ p.curErr(`"foo()" must be followed by a statement`)
+ }
p.popAdd(fun)
} | Get rid of the last use of p.command() | mvdan_sh | train | go,go |
fa175404e1b577d2796e651c9d27be9442ae531f | diff --git a/src/effector/__tests__/domain.test.js b/src/effector/__tests__/domain.test.js
index <HASH>..<HASH> 100644
--- a/src/effector/__tests__/domain.test.js
+++ b/src/effector/__tests__/domain.test.js
@@ -208,4 +208,12 @@ describe('indirect child support', () => {
const store = restore(source, null)
expect(argumentHistory(fn)).toEqual([store])
})
+ it('support prepend', () => {
+ const fn = jest.fn()
+ const domain = createDomain()
+ domain.onCreateEvent(e => fn(e))
+ const source = domain.createEvent()
+ const prepended = source.prepend(() => {})
+ expect(argumentHistory(fn)).toEqual([source, prepended])
+ })
}) | add test for indirect domain child for prepend | zerobias_effector | train | js |
957fa998962164336d3caa609e647b3f9b7d1553 | diff --git a/src/Middleware/CrossOriginResourceSharing.php b/src/Middleware/CrossOriginResourceSharing.php
index <HASH>..<HASH> 100644
--- a/src/Middleware/CrossOriginResourceSharing.php
+++ b/src/Middleware/CrossOriginResourceSharing.php
@@ -2,6 +2,7 @@
namespace Simples\Http\Middleware;
+use Simples\Error\NotFoundExceptionInterface;
use Simples\Http\Kernel\App;
use Simples\Kernel\Middleware;
use Simples\Http\Contract\Middleware as Contract;
@@ -49,6 +50,8 @@ class CrossOriginResourceSharing extends Middleware implements Contract
* @param Delegate $delegate
*
* @return ResponseInterface
+ * @throws SimplesForbiddenError
+ * @throws NotFoundExceptionInterface
*/
public function process(ServerRequestInterface $request, Delegate $delegate): ResponseInterface
{ | [feature] Add some throws info in methods signatures | phpzm_http | train | php |
efcc50feead653a669d7a17bce436219b09b19b2 | diff --git a/client/fileuploader.js b/client/fileuploader.js
index <HASH>..<HASH> 100644
--- a/client/fileuploader.js
+++ b/client/fileuploader.js
@@ -859,7 +859,7 @@ qq.UploadHandlerAbstract = function(o){
this._options = {
action: '/upload.php',
// maximum number of concurrent uploads
- maxConnections: 0,
+ maxConnections: 999,
onProgress: function(id, fileName, loaded, total){},
onComplete: function(id, fileName, response){},
onCancel: function(id, fileName){}
@@ -896,7 +896,7 @@ qq.UploadHandlerAbstract.prototype = {
*/
cancelAll: function(){
for (var i=0; i<this._queue.length; i++){
- this._cancel(id);
+ this._cancel(this._queue[i]);
}
this._queue = [];
},
@@ -1214,13 +1214,13 @@ qq.extend(qq.UploadHandlerXhr.prototype, {
this._dequeue(id);
},
_cancel: function(id){
+ this._options.onCancel(id, this.getName(id));
+
this._files[id] = null;
if (this._xhrs[id]){
this._xhrs[id].abort();
this._xhrs[id] = null;
}
-
- this._options.onCancel(id, this.getName(id));
}
});
\ No newline at end of file | fixed a bug in cancelAll uploadHandler method | FineUploader_fine-uploader | train | js |
989671588d21aca9d5f5b4f1c3d5021e76294ee2 | diff --git a/lib/master.js b/lib/master.js
index <HASH>..<HASH> 100644
--- a/lib/master.js
+++ b/lib/master.js
@@ -232,10 +232,10 @@ Master.prototype.spawn = function(n){
Master.prototype.spawnWorker = function(){
var worker = new Worker(this).spawn();
- var id = this.children.push(worker);
- worker.id = id;
+ var len = this.children.push(worker);
+ worker.id = len - 1;
// TODO: refactor
- var json = JSON.stringify({ method: 'connect', args: id });
+ var json = JSON.stringify({ method: 'connect', args: worker.id });
worker.sock.write(json, 'ascii', this.fd);
return worker;
}; | Start worker.id at 0 | LearnBoost_cluster | train | js |
30253dc4db8e8101cb9766895b61da402fb7cb07 | diff --git a/lenstronomy/Workflow/psf_fitting.py b/lenstronomy/Workflow/psf_fitting.py
index <HASH>..<HASH> 100644
--- a/lenstronomy/Workflow/psf_fitting.py
+++ b/lenstronomy/Workflow/psf_fitting.py
@@ -347,7 +347,7 @@ class PsfFitting(object):
# take median absolute error for each pixel
error_map = np.median(error_map_list, axis=0)
error_map[kernel > 0] /= kernel[kernel > 0]**2
- error_map = np.nan_to_num(error_map, nan=0, posinf=0, neginf=0)
+ error_map = np.nan_to_num(error_map)
error_map[error_map > 1] = 1 # cap on error to be the same
return error_map | make PSF fitting compatible with older numpy versions | sibirrer_lenstronomy | train | py |
9ee7f02f79ed7e8c40b4b4b0776cae9c75d39716 | diff --git a/common/interfaces.go b/common/interfaces.go
index <HASH>..<HASH> 100644
--- a/common/interfaces.go
+++ b/common/interfaces.go
@@ -1,12 +1,20 @@
// interfaces.go is intended to provide a simple means of adding components to each system
+//
// Getters
+//
// These are added functions to each class to allow them to meet the interfaces we use with AddByInterface methods on each system
+//
// Faces
+//
// The interfaces that end in "Face" are all met by a specific component, which can be composed into an Entity
// The word Get is used because, otherwise it would collide with the name of the object, when stored anonymously in a parent entity
+//
// Ables
+//
// The interfaces that end in "able" are those required by a specific system, and if an an object meets this interface it can be added to that system
+//
// Note: *able* is used not *er* because they don't really do thing anything
+//
// Note: The names have not been contracted for consistency, the interface is *Collisionable* not *Collidable*
package common | common: add whitespace to package comments for better godoc | EngoEngine_engo | train | go |
1a4e757cf31299fab041d6026eebf65c6ac3a421 | diff --git a/tests/phpunit/integration/EventListener/ImageVariations/Database/DoctrineTest.php b/tests/phpunit/integration/EventListener/ImageVariations/Database/DoctrineTest.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/integration/EventListener/ImageVariations/Database/DoctrineTest.php
+++ b/tests/phpunit/integration/EventListener/ImageVariations/Database/DoctrineTest.php
@@ -74,7 +74,7 @@ class DoctrineTest extends DatabaseTests {
* Remove the database file
*/
public function tearDown() {
- unlink($this->dbPath);
+ @unlink($this->dbPath);
parent::tearDown();
}
} | Silence unlink failures as it borks on Windows and it's part of teardown | imbo_imbo | train | php |
10d387b32c138cdebc0dbf302283146b806ad965 | diff --git a/lib/jss/version.rb b/lib/jss/version.rb
index <HASH>..<HASH> 100644
--- a/lib/jss/version.rb
+++ b/lib/jss/version.rb
@@ -27,6 +27,6 @@
module JSS
### The version of the JSS ruby gem
- VERSION = '0.6.7'.freeze
+ VERSION = '0.6.6'.freeze
end # module | Premature bump to <I>. Coming in a few min. | PixarAnimationStudios_ruby-jss | train | rb |
6044ecece8079dfadbda127785d1b7f7064b52f3 | diff --git a/create-l10n-injector/create-l10n-injector.js b/create-l10n-injector/create-l10n-injector.js
index <HASH>..<HASH> 100644
--- a/create-l10n-injector/create-l10n-injector.js
+++ b/create-l10n-injector/create-l10n-injector.js
@@ -18,6 +18,7 @@ export default function createL10NInjector({
componentWillUnmount() {
this.isUnmounting = true;
}
+ // eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
if (mapPropsToLocale(this.props) !== mapPropsToLocale(nextProps)) {
this.loadCountries(nextProps); | refactor: disable eslint camcelcase for all unsafe lifeycle methods | commercetools_merchant-center-application-kit | train | js |
cd8637efc989aff7a1cfc4dd19ec70ebdd9253f6 | diff --git a/lib/config.js b/lib/config.js
index <HASH>..<HASH> 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -29,7 +29,7 @@ var fs = require("fs"),
var LOCAL_CONFIG_FILENAME = ".eslintrc",
PACKAGE_CONFIG_FILENAME = "package.json",
PACKAGE_CONFIG_FIELD_NAME = "eslintConfig",
- PERSONAL_CONFIG_PATH = path.join(userHome, LOCAL_CONFIG_FILENAME);
+ PERSONAL_CONFIG_PATH = userHome ? path.join(userHome, LOCAL_CONFIG_FILENAME) : null;
//------------------------------------------------------------------------------
// Private
@@ -112,7 +112,7 @@ function getPluginsConfig(pluginNames) {
function getPersonalConfig() {
var config = {};
- if (fs.existsSync(PERSONAL_CONFIG_PATH)) {
+ if (PERSONAL_CONFIG_PATH && fs.existsSync(PERSONAL_CONFIG_PATH)) {
debug("Using personal config");
config = loadConfig(PERSONAL_CONFIG_PATH);
} | Fix: Don't crash when $HOME isn't set (fixes #<I>) | eslint_eslint | train | js |
5a5b55e6d82d941f3be7bcecf0b2cd362892b4f6 | diff --git a/src/lib/CollectStore.js b/src/lib/CollectStore.js
index <HASH>..<HASH> 100644
--- a/src/lib/CollectStore.js
+++ b/src/lib/CollectStore.js
@@ -395,6 +395,7 @@ export default class CollectStore {
const { konnector, account } = connection
this.dispatch(updateConnectionRunningStatus(konnector, account, false))
this.updateConnector(konnector)
+ enqueue()
})
.catch(error => {
this.dispatch(updateConnectionRunningStatus(connection.konnector || konnector, connection.account || account, false))
@@ -448,7 +449,7 @@ export default class CollectStore {
.then(job => {
this.dispatch(updateConnectionRunningStatus(connector, account, false))
if (!enqueued) {
- clearTimeout(enqueueTimeout)
+ enqueue()
resolve(job)
}
}) | feat: also enqueue connection on success :sparkles: | cozy_cozy-home | train | js |
148cabb073b32123b798a1fc3e876ec997bd8688 | diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/colormap.rb
+++ b/lib/sup/colormap.rb
@@ -19,7 +19,7 @@ module Ncurses
24.times { |x| color! "g#{x}", (16+6*6*6) + x }
elsif Ncurses::NUM_COLORS == -1
## Terminal emulator doesn't appear to support colors
- raise ArgumentError, "sup must be run in a terminal with color support"
+ fail "sup must be run in a terminal with color support, please check your TERM variable."
end
end
@@ -195,7 +195,7 @@ class Colormap
end
## Set attachment sybmol to sane default for existing colorschemes
- if user_colors and user_colors.has_key? :to_me
+ if user_colors and user_colors.has_key? :to_me
user_colors[:with_attachment] = user_colors[:to_me] unless user_colors.has_key? :with_attachment
end | colormap: use fail, not raise ArgumentError | sup-heliotrope_sup | train | rb |
4064310d007dcdc989587022d3e1a480282990cc | diff --git a/lib/compass-rails/patches/sass_importer.rb b/lib/compass-rails/patches/sass_importer.rb
index <HASH>..<HASH> 100644
--- a/lib/compass-rails/patches/sass_importer.rb
+++ b/lib/compass-rails/patches/sass_importer.rb
@@ -37,7 +37,7 @@ klass.class_eval do
private
def sass_importer_artiy
- @sass_importer_artiy ||= self.class.parent::SassImporter.method(:initialize).arity
+ @sass_importer_artiy ||= self.class.parent::SassImporter.instance_method(:initialize).arity
end | Get the real arity of the initialize method for sass importer
instance_method is needed here when requiring the arity of a constructor | Compass_compass-rails | train | rb |
2de34e1e8dfbda87e1f87652f410df13bee57807 | diff --git a/solidity/test/helpers/BancorConverter.js b/solidity/test/helpers/BancorConverter.js
index <HASH>..<HASH> 100644
--- a/solidity/test/helpers/BancorConverter.js
+++ b/solidity/test/helpers/BancorConverter.js
@@ -15,11 +15,8 @@ module.exports.new = async function(type, tokenAddress, registryAddress, maxConv
bancorConverter.defaults({from: web3.eth.accounts[0], gas: block.gasLimit});
return await bancorConverter.new(tokenAddress, registryAddress, maxConversionFee, reserveTokenAddress, weight);
}
- let converter;
- if (type == 0)
- converter = await LiquidTokenConverter.new(tokenAddress, registryAddress, maxConversionFee);
- else if (type == 1)
- converter = await LiquidityPoolV1Converter.new(tokenAddress, registryAddress, maxConversionFee);
+ const converterType = [LiquidTokenConverter, LiquidityPoolV1Converter][type];
+ const converter = await converterType.new(tokenAddress, registryAddress, maxConversionFee);
if (reserveTokenAddress != utils.zeroAddress)
await converter.addReserve(reserveTokenAddress, weight);
return converter; | Minor coding improvement in `helpers/BancorConverter.js`. | bancorprotocol_contracts | train | js |
4abda126c4cca1dd66685cde7d74f246ca8678e0 | diff --git a/openquake/hazardlib/contexts.py b/openquake/hazardlib/contexts.py
index <HASH>..<HASH> 100644
--- a/openquake/hazardlib/contexts.py
+++ b/openquake/hazardlib/contexts.py
@@ -1129,6 +1129,8 @@ class ContextMaker(object):
src, srcfilter, multiplier) * G
if src.code == b'F' and N <= self.max_sites_disagg:
src.weight *= 20 # test ucerf
+ elif src.code == b'F':
+ src.weight += (src.esites / N) * 10
elif src.code == b'S':
src.weight += .9
elif src.code == b'C': | Increased weight of multifault sources [ci skip] | gem_oq-engine | train | py |
cf2d54d980e5fedcb568d2b854d92137bee8f1ab | diff --git a/src/console/AssetPackageController.php b/src/console/AssetPackageController.php
index <HASH>..<HASH> 100644
--- a/src/console/AssetPackageController.php
+++ b/src/console/AssetPackageController.php
@@ -44,7 +44,9 @@ class AssetPackageController extends \yii\console\Controller
public function actionTest()
{
- var_dump(Yii::getAlias('@web'));
+ $dir = Yii::getAlias('@storage');
+ $msg = file_exists($dir) ? 'exists' : 'DOES NOT EXIST';
+ echo "$dir - $msg\n";
}
} | fixed asset-packagist/test action to check storage dir existance | hiqdev_asset-packagist | train | php |
026dbf73a674ca99228a138b7d8e0fae8201ede9 | diff --git a/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb b/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb
+++ b/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb
@@ -7,7 +7,7 @@ module Katello
param :content_view_filter_id, :number, :desc => N_("filter identifier"), :required => true
param_group :search, Api::V2::ApiController
def index
- respond(collection: scoped_search(index_relation, :name, :asc, resource_class: ContentViewFilter.rule_class_for(@filter)))
+ respond(collection: scoped_search(index_relation, :id, :asc, resource_class: ContentViewFilter.rule_class_for(@filter)))
end
def index_relation | Fixes #<I> - set default CV filter rule sort_by to ID
without this searching CV filter rules results in the following error:
"the field (name) in the order statement is not valid field for search"
Erratum CV Filter rules do not have a name attribute. | Katello_katello | train | rb |
52151d4b9b6a01ee59e577c93620936c3c6e9cd5 | diff --git a/nipap-www/nipapwww/public/nipap.js b/nipap-www/nipapwww/public/nipap.js
index <HASH>..<HASH> 100644
--- a/nipap-www/nipapwww/public/nipap.js
+++ b/nipap-www/nipapwww/public/nipap.js
@@ -714,7 +714,7 @@ function showPrefixMenu(prefix_id) {
$.getJSON('/xhr/remove_prefix', { 'id': prefix_id }, prefixRemoved);
hidePopupMenu();
- dialog.dialog('close');
+ $(this).dialog('close');
} | Confirmation dialog now closed
The prefix remove confirmation dialog is now closed when the "Yes"
button is clicked.
Fixes #<I> | SpriteLink_NIPAP | train | js |
1eecf2646f97ddbb826604add45582ab050a5331 | diff --git a/library/CM/MongoDb/Client.php b/library/CM/MongoDb/Client.php
index <HASH>..<HASH> 100644
--- a/library/CM/MongoDb/Client.php
+++ b/library/CM/MongoDb/Client.php
@@ -167,9 +167,8 @@ class CM_MongoDb_Client extends CM_Class_Abstract {
$options = (array) $options;
if ($aggregation) {
array_push($aggregation, ['$limit' => 1]);
- $resultSet = new IteratorIterator($this->find($collection, $criteria, $projection, $aggregation, ['limit' => 1]));
- $resultSet->rewind();
- $result = $resultSet->current();
+ $resultSet = $this->find($collection, $criteria, $projection, $aggregation, ['limit' => 1]);
+ $result = \Functional\first($resultSet);
} else {
if ($projection) {
$options['projection'] = $projection;
@@ -452,6 +451,8 @@ class CM_MongoDb_Client extends CM_Class_Abstract {
}
}
+ function findAndModify() {}
+
/**
* @return MongoDB\Client
*/ | use functional/first() to access first element | cargomedia_cm | train | php |
7dd58079dedb4da79e64a88fc052e5b87fd5ba58 | diff --git a/climlab/__init__.py b/climlab/__init__.py
index <HASH>..<HASH> 100644
--- a/climlab/__init__.py
+++ b/climlab/__init__.py
@@ -7,7 +7,7 @@ Nevertheless also the underlying code of the ``climlab`` architecture
has been documented for a comprehensive understanding and traceability.
'''
-__version__ = '0.6.0.dev13'
+__version__ = '0.6.0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml
index <HASH>..<HASH> 100644
--- a/conda-recipe/meta.yaml
+++ b/conda-recipe/meta.yaml
@@ -1,5 +1,5 @@
{% set name = "climlab" %}
-{% set version = "0.6.0.dev13" %}
+{% set version = "0.6.0" %}
package:
name: {{ name|lower }}
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
import os, sys
import textwrap
-VERSION = '0.6.0.dev13'
+VERSION = '0.6.0'
# BEFORE importing setuptools, remove MANIFEST. Otherwise it may not be
# properly updated when the contents of directories change (true for distutils, | Increment version number to <I> | brian-rose_climlab | train | py,yaml,py |
2a3a4d1fa9fa04282af1bc74410a8c8eb3a296ee | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,9 +3,12 @@ from setuptools import setup
from pip.req import parse_requirements
from awsclpy.version import VERSION
-install_reqs = parse_requirements("./requirements.txt",
- session=pip.download.PipSession())
-reqs = [str(ir.req) for ir in install_reqs]
+try:
+ install_reqs = parse_requirements("./requirements.txt",
+ session=pip.download.PipSession())
+ reqs = [str(ir.req) for ir in install_reqs]
+except Exception as e:
+ reqs = []
setup(name='awsclpy',
version=VERSION, | Blocked exception raised by parse requirements path issue and tox | hamidnazari_awsclpy | train | py |
4821095cec76590293cb4877fc1c1762ed010aea | diff --git a/glooey/buttons.py b/glooey/buttons.py
index <HASH>..<HASH> 100644
--- a/glooey/buttons.py
+++ b/glooey/buttons.py
@@ -131,17 +131,21 @@ class Button(Clickable):
Down = Background
Off = Background
- custom_text = None
custom_label_layer = 3
custom_image_layer = 2
custom_background_layer = 1
custom_alignment = 'center'
+ # These attributes are redundant, strictly speaking, because they could
+ # also be set using inner classes. They're provided just for convenience.
+ custom_text = None
+ custom_image = None
+
def __init__(self, text=None, image=None):
super().__init__()
self._stack = Stack()
self._label = self.Label(text or self.custom_text)
- self._image = self.Image(image)
+ self._image = self.Image(image or self.custom_image)
self._backgrounds = {
'base': self.Base(),
'over': self.Over(), | Add the custom_image attribute to Button.
This attribute is redundant, but often convenient. | kxgames_glooey | train | py |
f388442b260e41d1dbe05dd6eeb5f30fb8800010 | diff --git a/lib/form/select.php b/lib/form/select.php
index <HASH>..<HASH> 100644
--- a/lib/form/select.php
+++ b/lib/form/select.php
@@ -42,5 +42,26 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{
function getHelpButton(){
return $this->_helpbutton;
}
+ /**
+ * Removes an OPTION from the SELECT
+ *
+ * @param string $value Value for the OPTION to remove
+ * @since 1.0
+ * @access public
+ * @return void
+ */
+ function removeOption($value)
+ {
+ $key=array_search($value, $this->_values);
+ if ($key!==FALSE || $key!==null) {
+ unset($this->_values[$key]);
+ }
+ foreach ($this->_options as $key=>$option){
+ if ($option['attr']['value']==$value){
+ unset($this->_options[$key]);
+ return;
+ }
+ }
+ } // end func removeOption
}
?>
\ No newline at end of file | added removeOption method to allow removing options from a select drop down | moodle_moodle | train | php |
813f2f1431eb08eddaf1b7d02ad2c6bdafea4297 | diff --git a/cmd/kops-controller/pkg/server/server.go b/cmd/kops-controller/pkg/server/server.go
index <HASH>..<HASH> 100644
--- a/cmd/kops-controller/pkg/server/server.go
+++ b/cmd/kops-controller/pkg/server/server.go
@@ -88,6 +88,7 @@ func (s *Server) Start() error {
return err
}
+ klog.Infof("kops-controller listening on %s", s.opt.Server.Listen)
return s.server.ListenAndServeTLS(s.opt.Server.ServerCertificatePath, s.opt.Server.ServerKeyPath)
} | kops-controller should log port it is listening on | kubernetes_kops | train | go |
0ebdb2c96b670c6c16f2eabff9c1aacc0fc92327 | diff --git a/aegea/rds.py b/aegea/rds.py
index <HASH>..<HASH> 100644
--- a/aegea/rds.py
+++ b/aegea/rds.py
@@ -65,7 +65,7 @@ parser.add_argument('name')
parser.add_argument('--engine')
parser.add_argument('--storage', type=int)
parser.add_argument('--storage-type')
-parser.add_argument('--master-username')
+parser.add_argument('--master-username', '--username')
parser.add_argument('--master-user-password', '--password', required=True)
parser.add_argument('--db-instance-class')
parser.add_argument('--tags', nargs="+", default=[]) | Add option alias for username in rds | kislyuk_aegea | train | py |
86d8bdea70129da3d83fd418ab33b2b39249e727 | diff --git a/src/input/input.js b/src/input/input.js
index <HASH>..<HASH> 100644
--- a/src/input/input.js
+++ b/src/input/input.js
@@ -168,7 +168,6 @@
if (me.sys.scale != 1.0) {
obj.mouse.pos.div(me.sys.scale);
}
- return obj.mouse.pos;
}; | Don't return stuff when not needed :) | melonjs_melonJS | train | js |
73987f0309bb0e93c41ef137c4044d910ddc7a14 | diff --git a/api/api.go b/api/api.go
index <HASH>..<HASH> 100644
--- a/api/api.go
+++ b/api/api.go
@@ -6,11 +6,13 @@ package api
import (
"bytes"
+ crand "crypto/rand"
"errors"
"fmt"
"io/ioutil"
"log"
"math"
+ "math/big"
"math/rand"
"net/http"
"net/url"
@@ -22,7 +24,12 @@ import (
)
func init() {
- rand.Seed(time.Now().Unix())
+ n, err := crand.Int(crand.Reader, big.NewInt(math.MaxInt64))
+ if err != nil {
+ rand.Seed(time.Now().UTC().UnixNano())
+ return
+ }
+ rand.Seed(n.Int64())
}
const ( | upd: better seeding, thanks @sean- | circonus-labs_circonus-gometrics | train | go |
d143f5ff3d2ed238538f37ed4edf28545eed7b97 | diff --git a/tests/test_svg.py b/tests/test_svg.py
index <HASH>..<HASH> 100644
--- a/tests/test_svg.py
+++ b/tests/test_svg.py
@@ -148,7 +148,7 @@ def test_scale_background():
qr.save(out, kind='svg', dark='green', light='yellow', scale=10)
root = _parse_xml(out)
g = _get_group(root)
- assert g
+ assert g is not None
assert 'scale(10)' == g.attrib.get('transform')
diff --git a/tests/test_svg_colorful.py b/tests/test_svg_colorful.py
index <HASH>..<HASH> 100644
--- a/tests/test_svg_colorful.py
+++ b/tests/test_svg_colorful.py
@@ -86,7 +86,7 @@ def test_scale():
assert 3 == len(paths)
assert all(p.attrib.get('transform') is None for p in paths)
group = _get_group(root)
- assert group
+ assert group is not None
assert 'scale(1.5)' == group.attrib.get('transform') | Explicit testing for None to suppress warnings | heuer_segno | train | py,py |
78b9b0a78dd04238d054ba8c6aa6f1050c869ad3 | diff --git a/src/cmsplugin_filer_image/cms_plugins.py b/src/cmsplugin_filer_image/cms_plugins.py
index <HASH>..<HASH> 100644
--- a/src/cmsplugin_filer_image/cms_plugins.py
+++ b/src/cmsplugin_filer_image/cms_plugins.py
@@ -43,6 +43,7 @@ class FilerImagePlugin(CMSPluginBase):
crop, upscale = False, False
subject_location = False
placeholder_width = context.get('width', None)
+ placeholder_height = context.get('height', None)
if instance.thumbnail_option:
# thumbnail option overrides everything else
if instance.thumbnail_option.width:
@@ -57,7 +58,9 @@ class FilerImagePlugin(CMSPluginBase):
width = int(placeholder_width)
elif instance.width:
width = instance.width
- if instance.height:
+ if instance.use_autoscale and placeholder_height:
+ height = int(placeholder_height)
+ elif instance.height:
height = instance.height
crop = instance.crop
upscale = instance.upscale | pick up height variable from context in image plugin | divio_cmsplugin-filer | train | py |
34ad009e886a0b1326ef22d526816f5e7524d3a5 | diff --git a/src/angular-gridster.js b/src/angular-gridster.js
index <HASH>..<HASH> 100644
--- a/src/angular-gridster.js
+++ b/src/angular-gridster.js
@@ -525,18 +525,18 @@ angular.module('gridster', [])
controller.setOptions(newOptions);
- if (typeof newOptions.draggable !== 'undefined' && newOptions.draggable.enabled) {
- $rootScope.$broadcast('draggable-changed');
- }
-
- if (typeof newOptions.resizable !== 'undefined' && newOptions.resizable.enabled) {
- $rootScope.$broadcast('resizable-changed');
- }
-
controller.redraw();
updateHeight();
}, true);
+ scope.$watch('config.draggable', function() {
+ $rootScope.$broadcast('draggable-changed');
+ }, true);
+
+ scope.$watch('config.resizable', function() {
+ $rootScope.$broadcast('resizable-changed');
+ }, true);
+
var updateHeight = function() {
controller.$element.css('height', (controller.options.gridHeight * controller.options.curRowHeight) + controller.options.margins[0] + 'px');
}; | fix draggable and resizeable config monitoring | ManifestWebDesign_angular-gridster | train | js |
f289fc88c479c7022a7df50c970dabcf372ef342 | diff --git a/gwpy/timeseries/io/core.py b/gwpy/timeseries/io/core.py
index <HASH>..<HASH> 100644
--- a/gwpy/timeseries/io/core.py
+++ b/gwpy/timeseries/io/core.py
@@ -61,25 +61,29 @@ def _join_factory(cls, gap, pad, start, end):
tsd = data.pop(0)
out.append(tsd, gap=gap, pad=pad)
del tsd
- for key in out:
- out[key] = _pad_series(
- out[key],
- pad,
- start,
- end,
- )
+ if gap == "pad":
+ for key in out:
+ out[key] = _pad_series(
+ out[key],
+ pad,
+ start,
+ end,
+ )
return out
else:
from .. import TimeSeriesBaseList
def _join(arrays):
list_ = TimeSeriesBaseList(*arrays)
- return _pad_series(
- list_.join(pad=pad, gap=gap),
- pad,
- start,
- end,
- )
+ joined = list_.join(pad=pad, gap=gap)
+ if gap == "pad":
+ return _pad_series(
+ joined,
+ pad,
+ start,
+ end,
+ )
+ return joined
return _join | gwpy.timeseries: only pad data if asked
otherwise we end up padding with nans by default, which is bad | gwpy_gwpy | train | py |
d3a20c0b7431c6598cc80711834c07b3478674c3 | diff --git a/structr-neo4j-bolt-driver/src/main/java/org/structr/bolt/wrapper/StatementResultWrapper.java b/structr-neo4j-bolt-driver/src/main/java/org/structr/bolt/wrapper/StatementResultWrapper.java
index <HASH>..<HASH> 100644
--- a/structr-neo4j-bolt-driver/src/main/java/org/structr/bolt/wrapper/StatementResultWrapper.java
+++ b/structr-neo4j-bolt-driver/src/main/java/org/structr/bolt/wrapper/StatementResultWrapper.java
@@ -25,7 +25,6 @@ import org.neo4j.driver.v1.Records;
import org.neo4j.driver.v1.StatementResult;
import org.neo4j.driver.v1.Value;
import org.neo4j.driver.v1.exceptions.TransientException;
-import org.neo4j.driver.v1.summary.ResultSummary;
import org.structr.api.NativeResult;
import org.structr.api.RetryException;
import org.structr.api.util.Iterables;
@@ -82,6 +81,7 @@ public class StatementResultWrapper<T> implements NativeResult<T> {
@Override
public void close() {
+ /*
if (result != null) {
final ResultSummary summary = result.consume();
@@ -93,5 +93,6 @@ public class StatementResultWrapper<T> implements NativeResult<T> {
RelationshipWrapper.clearCache();
}
}
+ */
}
} | Fixes possible deadlock when starting Structr, caused by StatmentResultWrapper trying
to clear the caches after modifying Cypher statements. | structr_structr | train | java |
9b3a958119e69b00fa98f80fce3f19f713bbfd72 | diff --git a/tests/test_coolname.py b/tests/test_coolname.py
index <HASH>..<HASH> 100644
--- a/tests/test_coolname.py
+++ b/tests/test_coolname.py
@@ -25,7 +25,7 @@ class TestCoolname(TestCase):
def test_combinations(self):
combinations_2 = 10**5
- combinations_3 = 10**7
+ combinations_3 = 10**8
combinations_4 = 10**10
self.assertGreater(coolname.get_combinations_count(), combinations_4)
self.assertGreater(coolname.get_combinations_count(2), combinations_2) | tests: combinations_3 = <I>**8 | alexanderlukanin13_coolname | train | py |
a93eabf26572151534b5aa2e4811174db9ead62c | diff --git a/settings.js b/settings.js
index <HASH>..<HASH> 100644
--- a/settings.js
+++ b/settings.js
@@ -74,12 +74,12 @@ var settings = {
},
updates: {
"2b04:d006": {
- SystemFirmwareOne: "system-part1-0.4.5-photon.bin",
- SystemFirmwareTwo: "system-part2-0.4.5-photon.bin"
+ SystemFirmwareOne: "system-part1-0.4.6-photon.bin",
+ SystemFirmwareTwo: "system-part2-0.4.6-photon.bin"
},
"2b04:d008": {
- SystemFirmwareOne: "system-part1-0.4.5-p1.bin",
- SystemFirmwareTwo: "system-part2-0.4.5-p1.bin"
+ SystemFirmwareOne: "system-part1-0.4.6-p1.bin",
+ SystemFirmwareTwo: "system-part2-0.4.6-p1.bin"
},
'2b04:d00a': {
SystemFirmwareOne: "system-part1-0.0.2-electron.bin", | Update binaries now at <I> | particle-iot_particle-cli | train | js |
37c42744ef34a4babd7ee6d899f4c6906a4ed1fb | diff --git a/insights/specs/insights_archive.py b/insights/specs/insights_archive.py
index <HASH>..<HASH> 100644
--- a/insights/specs/insights_archive.py
+++ b/insights/specs/insights_archive.py
@@ -144,6 +144,7 @@ class InsightsArchiveSpecs(Specs):
modinfo_i40e = simple_file("insights_commands/modinfo_i40e")
modinfo_igb = simple_file("insights_commands/modinfo_igb")
modinfo_ixgbe = simple_file("insights_commands/modinfo_ixgbe")
+ modinfo_veth = simple_file("insights_commands/modinfo_veth")
modinfo_vmxnet3 = simple_file("insights_commands/modinfo_vmxnet3")
multicast_querier = simple_file("insights_commands/find_.sys.devices.virtual.net._-name_multicast_querier_-print_-exec_cat")
multipath_conf_initramfs = simple_file("insights_commands/lsinitrd_-f_.etc.multipath.conf") | Added Missing specs (#<I>) | RedHatInsights_insights-core | train | py |
0f9b3384156c088205d02b63c5532ecc271c750c | diff --git a/quart/templating.py b/quart/templating.py
index <HASH>..<HASH> 100644
--- a/quart/templating.py
+++ b/quart/templating.py
@@ -64,6 +64,17 @@ class DispatchingJinjaLoader(BaseLoader):
if loader is not None:
yield loader
+ def list_templates(self) -> List[str]:
+ """Returns a list of all avilable templates in environment.
+
+ This considers the loaders on the :attr:`app` and blueprints.
+ """
+ result = set()
+ for loader in self._loaders():
+ for template in loader.list_templates():
+ result.add(str(template))
+ return list(result)
+
async def render_template(template_name_or_list: Union[str, List[str]], **context: Any) -> str:
"""Render the template with the context given. | Added list_templates method to DispatchingJinjaLoader | pgjones_quart | train | py |
d109c08a5d1c71168b1bb622e7c5d3b85e91e9fb | diff --git a/app/models/user.rb b/app/models/user.rb
index <HASH>..<HASH> 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -24,7 +24,7 @@ class User < ActiveRecord::Base
end
def identifiers_for_ping
- {github_id: github_id, name: name, email: email}
+ {github_id: github_id, name: name, email: email, github_login: login}
end
def logged_in?
diff --git a/test/models/users_test.rb b/test/models/users_test.rb
index <HASH>..<HASH> 100644
--- a/test/models/users_test.rb
+++ b/test/models/users_test.rb
@@ -43,7 +43,7 @@ class UsersTest < ActiveSupport::TestCase
test "#identifiers_for_ping returns a hash with the user's github_id, name and email" do
user = users(:bob)
- expected_ouput = { github_id: user.github_id, name: user.name, email: user.email }
+ expected_ouput = { github_id: user.github_id, name: user.name, email: user.email, github_login: user.login}
assert_equal expected_ouput, user.identifiers_for_ping
end | Add github login to #identifiers_for_ping | Shopify_shipit-engine | train | rb,rb |
528ab62f37fa83d4360e8ab2b2c425d6692ef533 | diff --git a/checkpoint.go b/checkpoint.go
index <HASH>..<HASH> 100644
--- a/checkpoint.go
+++ b/checkpoint.go
@@ -59,6 +59,12 @@ type CheckParams struct {
// permissions 0755.
CacheFile string
CacheDuration time.Duration
+
+ // Force, if true, will force the check even if CHECKPOINT_DISABLE
+ // is set. Within HashiCorp products, this is ONLY USED when the user
+ // specifically requests it. This is never automatically done without
+ // the user's consent.
+ Force bool
}
// CheckResponse is the response for a check request.
@@ -87,7 +93,7 @@ type CheckAlert struct {
// Check checks for alerts and new version information.
func Check(p *CheckParams) (*CheckResponse, error) {
- if disabled := os.Getenv("CHECKPOINT_DISABLE"); disabled != "" {
+ if disabled := os.Getenv("CHECKPOINT_DISABLE"); disabled != "" && !p.Force {
return &CheckResponse{}, nil
} | allow forcing, since we're using this for version checks in other things | hashicorp_go-checkpoint | train | go |
f6eb444841945dcfa8175687c883ff9e33680bf0 | diff --git a/src/providers/sh/commands/alias.js b/src/providers/sh/commands/alias.js
index <HASH>..<HASH> 100644
--- a/src/providers/sh/commands/alias.js
+++ b/src/providers/sh/commands/alias.js
@@ -693,7 +693,7 @@ async function getInferredTargets(output, opts): Promise<Array<string> | GetInfe
}
// Always resolve with an array
- return (Array.from(aliases): Array<string>)
+ return typeof aliases === 'string' ? [aliases] : aliases
}
async function getAppName(output, opts): Promise<string> { | Bugfix: return array of targets of one item when config alias is a string (#<I>) | zeit_now-cli | train | js |
fae8b14835a4eb952f46b5c43fdc37e772c5c87f | diff --git a/lib/staypuft/engine.rb b/lib/staypuft/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/staypuft/engine.rb
+++ b/lib/staypuft/engine.rb
@@ -1,6 +1,7 @@
module Staypuft
ENGINE_NAME = "staypuft"
class Engine < ::Rails::Engine
+ engine_name Staypuft::ENGINE_NAME
config.autoload_paths += Dir["#{config.root}/app/lib"]
@@ -48,6 +49,17 @@ module Staypuft
end
end
+ initializer 'staypuft.configure_assets', :group => :assets do
+ SETTINGS[:staypuft] = {
+ :assets => {
+ :precompile => [
+ 'staypuft/staypuft.js',
+ 'staypuft/staypuft.css'
+ ],
+ }
+ }
+ end
+
end
def table_name_prefix | Fix assets configuration and engine name
We need this in order to compile assets during packaging using foreman
assets precompile script. | theforeman_staypuft | train | rb |
b52e7f8f8de5c5be9345e5c7ec03d6846f4b6e87 | diff --git a/pyana/examples/gp_panel.py b/pyana/examples/gp_panel.py
index <HASH>..<HASH> 100644
--- a/pyana/examples/gp_panel.py
+++ b/pyana/examples/gp_panel.py
@@ -7,7 +7,14 @@ from ..ccsgp.utils import getOpts
from ..ccsgp.config import default_colors
def gp_panel(version):
- """example for a panel plot using QM12 data (see gp_xfac)"""
+ """example for a panel plot using QM12 data (see gp_xfac)
+
+ .. image:: ../ccsgp_get_started_data/examples/gp_panel/panelQM12.png
+ :width: 450 px
+
+ :param version: plot version / input subdir name
+ :type version: str
+ """
inDir, outDir = getWorkDirs()
inDir = os.path.join(inDir, version)
data = {} | include panelQM<I> plot | tschaume_ccsgp_get_started | train | py |
9ea5018cb9c2e370e7b6a0eb5b75ef466ff9cee0 | diff --git a/src/Illuminate/Support/Facades/Route.php b/src/Illuminate/Support/Facades/Route.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Facades/Route.php
+++ b/src/Illuminate/Support/Facades/Route.php
@@ -28,6 +28,7 @@ namespace Illuminate\Support\Facades;
* @method static \Illuminate\Routing\Route permanentRedirect(string $uri, string $destination)
* @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = [])
* @method static void bind(string $key, string|callable $binder)
+ * @method static void model(string $key, string $class, \Closure|null $callback = null)
* @method static \Illuminate\Routing\Route current()
* @method static string|null currentRouteName()
* @method static string|null currentRouteAction() | Update Route.php (#<I>)
Added missing Router method | laravel_framework | train | php |
ced98ee7454cdcaee692ca1cad4ef08c150f4fa0 | diff --git a/pywws/version.py b/pywws/version.py
index <HASH>..<HASH> 100644
--- a/pywws/version.py
+++ b/pywws/version.py
@@ -1,3 +1,3 @@
version = '13.09'
-release = '1070'
-commit = 'f8919fb'
+release = '1071'
+commit = '77323b7'
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -223,7 +223,6 @@ try:
builder = 'html'
cmdclass['build_sphinx'] = BuildDoc
command_options['build_sphinx'] = {
- 'all_files' : ('setup.py', '1'),
'source_dir' : ('setup.py', 'doc_src'),
'build_dir' : ('setup.py', 'doc/%s/%s' % (builder, lang)),
'builder' : ('setup.py', builder),
@@ -231,7 +230,6 @@ try:
# extract strings for translation
cmdclass['xgettext_doc'] = BuildDoc
command_options['xgettext_doc'] = {
- 'all_files' : ('setup.py', '1'),
'source_dir' : ('setup.py', 'doc_src'),
'build_dir' : ('setup.py', 'build'),
'builder' : ('setup.py', 'gettext'), | Drop 'all files' flag from Sphinx builds. | jim-easterbrook_pywws | train | py,py |
588bf8b84566b9c804bcb57a5a5aa14b61ae42dc | diff --git a/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java b/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java
index <HASH>..<HASH> 100755
--- a/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java
+++ b/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java
@@ -254,6 +254,7 @@ public class ODefaultAuditing
private File getConfigFile(String iDatabaseName) {
return new File(
security.getContext().getBasePath()
+ + "/"
+ iDatabaseName
+ File.separator
+ FILE_AUDITING_DB_CONFIG); | fixed path for auditing config file | orientechnologies_orientdb | train | java |
4ae8d065e0cb75d153eda2df134022109a43c902 | diff --git a/LiSE/LiSE/test.py b/LiSE/LiSE/test.py
index <HASH>..<HASH> 100644
--- a/LiSE/LiSE/test.py
+++ b/LiSE/LiSE/test.py
@@ -56,7 +56,7 @@ class SimTest(TestCase):
with self.engine.advancing:
sim.install(self.engine)
for i in range(72):
- self.engine.next_tick()
+ self.engine.next_turn()
self.engine.commit()
def tearDown(self): | next_tick -> next_turn | LogicalDash_LiSE | train | py |
324ba280167a4e64210d80aff2e5650183764afb | diff --git a/tensor2tensor/trax/models/transformer.py b/tensor2tensor/trax/models/transformer.py
index <HASH>..<HASH> 100644
--- a/tensor2tensor/trax/models/transformer.py
+++ b/tensor2tensor/trax/models/transformer.py
@@ -182,8 +182,9 @@ def TransformerDecoder(d_model=512,
a continuous tensor.
"""
return tl.Model( # vecs
- tl.PositionalEncoding(max_len=max_len),
tl.Dense(d_model), # vecs
+ tl.Dropout(rate=dropout, mode=mode),
+ tl.PositionalEncoding(max_len=max_len),
[DecoderBlock( # pylint: disable=g-complex-comprehension
d_model, d_ff, n_heads, d_attention_key, d_attention_value,
attention_type, dropout, mode) | Add a dense layer before positional encoding in TransformerDecoder
This way the dimensionality of the positional encoding does not depend on the input size, and also the model can learn how to combine the input vectors with the positional encoding. Also added dropout to make the model closer to TransformerLM.
PiperOrigin-RevId: <I> | tensorflow_tensor2tensor | train | py |
6d4def2e9fa52403e054b616f29464e8848b1618 | diff --git a/brewpi_service/__init__.py b/brewpi_service/__init__.py
index <HASH>..<HASH> 100644
--- a/brewpi_service/__init__.py
+++ b/brewpi_service/__init__.py
@@ -17,7 +17,7 @@ app.config.update({
plugins=['apispec.ext.marshmallow']
),
'APISPEC_SWAGGER_URL': '/specs/',
- 'APISPEC_SWAGGER_UI_URL': '/docs/',
+ 'APISPEC_SWAGGER_UI_URL': None,
"SECRET_KEY": 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT',
"SQLALCHEMY_DATABASE_URI": 'sqlite:///brewpi-service.db'
}) | don't include swagger ui | BrewBlox_brewblox-service | train | py |
63fe0696bde5d428ac225065d203e921d6008338 | diff --git a/tq/basic_upload.go b/tq/basic_upload.go
index <HASH>..<HASH> 100644
--- a/tq/basic_upload.go
+++ b/tq/basic_upload.go
@@ -161,7 +161,7 @@ func (a *adapterBase) setContentTypeFor(req *http.Request, r io.ReadSeeker) erro
}
contentType := http.DetectContentType(buffer[:n])
- if _, err := r.Seek(0, 0); err != nil {
+ if _, err := r.Seek(0, io.SeekStart); err != nil {
return errors.Wrap(err, "content type rewind")
} | tq: use named constant
Instead of using a hard-coded zero to indicate seeking from the start of
the file, use the io.SeekStart constant to make this easier to read and
more robust. | git-lfs_git-lfs | train | go |
218509241e54b49c62993b33ade42ebfec63f7e9 | diff --git a/lib/jsonapi/consumer/version.rb b/lib/jsonapi/consumer/version.rb
index <HASH>..<HASH> 100644
--- a/lib/jsonapi/consumer/version.rb
+++ b/lib/jsonapi/consumer/version.rb
@@ -1,5 +1,5 @@
module Jsonapi
module Consumer
- VERSION = "1.0.1"
+ VERSION = "2.0.0"
end
end | Increment major version due to API change | jsmestad_jsonapi-consumer | train | rb |
1fcb0650849f58d4d328bd995f81d99c5d5f57bc | diff --git a/fwdpy11/wright_fisher_ts.py b/fwdpy11/wright_fisher_ts.py
index <HASH>..<HASH> 100644
--- a/fwdpy11/wright_fisher_ts.py
+++ b/fwdpy11/wright_fisher_ts.py
@@ -63,6 +63,7 @@ def evolve(rng, pop, params, simplification_interval, recorder=None):
from fwdpy11._tsevolveutils import NoAncientSamples
recorder = NoAncientSamples()
+ from fwdpy11._tsevolveutils import SampleRecorder
WFSlocusPop_ts(rng, pop, simplification_interval, params.demography, params.mutrate_s,
params.recrate, mm, rm, params.gvalue,
recorder, params.pself, params.prune_selected == True) | Make SampleRecorder visible to simulation as Python object | molpopgen_fwdpy11 | train | py |
c1adf14c9c4c62de80f32d800fba4a1778847d31 | diff --git a/src/wyjc/io/ClassFileBuilder.java b/src/wyjc/io/ClassFileBuilder.java
index <HASH>..<HASH> 100755
--- a/src/wyjc/io/ClassFileBuilder.java
+++ b/src/wyjc/io/ClassFileBuilder.java
@@ -2186,7 +2186,6 @@ public class ClassFileBuilder {
bytecodes.add(new Bytecode.Load(slot,WHILEYRECORD));
}
-
/**
* The read conversion is necessary in situations where we're reading a
* value from a collection (e.g. WhileyList, WhileySet, etc) and then | Thinking about how to deal with the problematic coercion cases. | Whiley_WhileyCompiler | train | java |
4b27226dc2e7f1d29b7d268570d68169f1ec0bb2 | diff --git a/src/main/java/net/spy/memcached/protocol/binary/UnlockOperationImpl.java b/src/main/java/net/spy/memcached/protocol/binary/UnlockOperationImpl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/spy/memcached/protocol/binary/UnlockOperationImpl.java
+++ b/src/main/java/net/spy/memcached/protocol/binary/UnlockOperationImpl.java
@@ -47,6 +47,11 @@ class UnlockOperationImpl extends SingleKeyOperationImpl implements
}
@Override
+ protected void decodePayload(byte[] pl) {
+ getCallback().receivedStatus(STATUS_OK);
+ }
+
+ @Override
public String toString() {
return super.toString() + " Cas: " + cas;
} | Fixed failing Unlock test
Note this isn't a complete fix for handling unlock. Several
possible responses are ignored. That is tracked under SPY-<I>
for now.
Change-Id: I<I>b0e<I>c7fa<I>edcd<I>c<I>e<I>f<I>f4a4df<I>
Reviewed-on: <URL> | dustin_java-memcached-client | train | java |
606a307d146d8fcb8a2367dfb77e81b87370b5b6 | diff --git a/test/integration/multinode_test.go b/test/integration/multinode_test.go
index <HASH>..<HASH> 100644
--- a/test/integration/multinode_test.go
+++ b/test/integration/multinode_test.go
@@ -208,6 +208,15 @@ func validateStopMultiNodeCluster(ctx context.Context, t *testing.T, profile str
}
func validateRestartMultiNodeCluster(ctx context.Context, t *testing.T, profile string) {
+ if DockerDriver() {
+ rr, err := Run(t, exec.Command("docker", "version", "-f", "{{.Server.Version}}"))
+ if err != nil {
+ t.Fatalf("docker is broken: %v", err)
+ }
+ if strings.Contains(rr.Stdout.String(), "azure") {
+ t.Skip("kic containers are not supported on docker's azure")
+ }
+ }
// Restart a full cluster with minikube start
startArgs := append([]string{"start", "-p", profile}, StartArgs()...)
rr, err := Run(t, exec.CommandContext(ctx, Target(), startArgs...)) | skip restart test on github actions | kubernetes_minikube | train | go |
d56824f8b2365aabdc58f051850bad0446d77032 | diff --git a/lib/heroku/helpers.rb b/lib/heroku/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/heroku/helpers.rb
+++ b/lib/heroku/helpers.rb
@@ -232,7 +232,10 @@ module Heroku
ret = yield
Heroku::Helpers.error_with_failure = false
display((options[:success] || "done"), false)
- display(", #{@status}", false) if @status
+ if @status
+ display(", #{@status}", false)
+ @status = nil
+ end
display
ret
end | clear status after display in action
closes #<I> | heroku_legacy-cli | train | rb |
5ef1048b0b74d2508380801af7c8851f9c24230d | diff --git a/api/app/app.go b/api/app/app.go
index <HASH>..<HASH> 100644
--- a/api/app/app.go
+++ b/api/app/app.go
@@ -114,13 +114,17 @@ func (app *App) Destroy() error {
return nil
}
-func (app *App) hasTeam(team *auth.Team) bool {
- for _, t := range app.Teams {
+func (app *App) findTeam(team *auth.Team) int {
+ for i, t := range app.Teams {
if t.Name == team.Name {
- return true
+ return i
}
}
- return false
+ return -1
+}
+
+func (app *App) hasTeam(team *auth.Team) bool {
+ return app.findTeam(team) > -1
}
func (app *App) GrantAccess(team *auth.Team) error {
@@ -132,12 +136,7 @@ func (app *App) GrantAccess(team *auth.Team) error {
}
func (app *App) RevokeAccess(team *auth.Team) error {
- index := -1
- for i, t := range app.Teams {
- if t.Name == team.Name {
- index = i
- }
- }
+ index := app.findTeam(team)
if index < 0 {
return errors.New("This team does not have access to this app")
} | api/app: removing some code duplication | tsuru_tsuru | train | go |
5203d6583d2289f69e94cfab68b63da6a6314682 | diff --git a/library/CM/Dom/NodeList.php b/library/CM/Dom/NodeList.php
index <HASH>..<HASH> 100644
--- a/library/CM/Dom/NodeList.php
+++ b/library/CM/Dom/NodeList.php
@@ -33,7 +33,7 @@ class CM_Dom_NodeList implements Iterator, Countable, ArrayAccess {
} else {
$html = (string) $html;
- $html = preg_replace('#<script[^>]+type=([\'"])text/template\1[^>]*>.*?</script>#si', '', $html);
+ $html = $this->_stripJavascriptTemplate($html);
$this->_doc = new DOMDocument();
$html = '<?xml version="1.0" encoding="UTF-8"?>' . $html;
@@ -241,4 +241,13 @@ class CM_Dom_NodeList implements Iterator, Countable, ArrayAccess {
public function offsetUnset($offset) {
unset($this->_elementList[0]);
}
+
+ /**
+ * @param string $html
+ * @return string
+ */
+ private function _stripJavascriptTemplate($html) {
+ $html = preg_replace('#<script[^>]+type=([\'"])text/template\1[^>]*>.*?</script>#si', '', $html);
+ return $html;
+ }
} | refactor strip JS template to method | cargomedia_cm | train | php |
d246580bcf8afdf957d34ba1c9227ac6915a1a94 | diff --git a/src/Accordion/accordion.js b/src/Accordion/accordion.js
index <HASH>..<HASH> 100644
--- a/src/Accordion/accordion.js
+++ b/src/Accordion/accordion.js
@@ -124,11 +124,11 @@ class Accordion extends Component<AccordionProps, *> {
const { accordion } = this.accordionStore;
return (
- <div role={accordion ? 'tablist' : null} className={className}>
- <Provider accordionStore={this.accordionStore}>
- <div>{children}</div>
- </Provider>
- </div>
+ <Provider accordionStore={this.accordionStore}>
+ <div role={accordion ? 'tablist' : null} className={className}>
+ {children}
+ </div>
+ </Provider>
);
}
} | Put Provider outside div so that there doesn't have to be an erroneous intermediate div. | springload_react-accessible-accordion | train | js |
9b5d1024b7aa80f6dcca9807a5ad9fc02c6fe919 | diff --git a/vm/debug.luajs.js b/vm/debug.luajs.js
index <HASH>..<HASH> 100644
--- a/vm/debug.luajs.js
+++ b/vm/debug.luajs.js
@@ -232,13 +232,14 @@ luajs.debug._clearLineHighlight = function () {
var error = luajs.Error;
-
+
luajs.Error = function () {
luajs.debug.highlightLine (luajs.debug.lastLine, true);
- return error.apply (this, arguments);
+ error.apply (this, arguments);
};
-
+ luajs.Error.prototype = error.prototype;
+
})(); | Bugfix for luajs.Error extension issues in debug. | gamesys_moonshine | train | js |
7c603224cc94eebab81e23d0b74c08b1d77a90cb | diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py
index <HASH>..<HASH> 100644
--- a/salt/modules/cmdmod.py
+++ b/salt/modules/cmdmod.py
@@ -1219,7 +1219,7 @@ def exec_code(lang, code, cwd=None):
salt '*' cmd.exec_code ruby 'puts "cheese"'
'''
codefile = salt.utils.mkstemp()
- with salt.utils.fopen(codefile, 'w+') as fp_:
+ with salt.utils.fopen(codefile, 'w+t') as fp_:
fp_.write(code)
cmd = '{0} {1}'.format(lang, codefile)
diff --git a/salt/utils/args.py b/salt/utils/args.py
index <HASH>..<HASH> 100644
--- a/salt/utils/args.py
+++ b/salt/utils/args.py
@@ -35,7 +35,7 @@ def parse_input(args, condition=True):
_args = []
_kwargs = {}
for arg in args:
- if isinstance(arg, string_types) and r'\n' not in arg:
+ if isinstance(arg, string_types) and r'\n' not in arg and '\n' not in arg:
arg_name, arg_value = parse_kwarg(arg)
if arg_name:
_kwargs[arg_name] = yamlify_arg(arg_value) | More aggressive newline catch in args parsing | saltstack_salt | train | py,py |
d8a7ff28c1fd6fcd723ef771a3ef4bfffc7b4232 | diff --git a/gwpy/signal/filter_design.py b/gwpy/signal/filter_design.py
index <HASH>..<HASH> 100644
--- a/gwpy/signal/filter_design.py
+++ b/gwpy/signal/filter_design.py
@@ -23,6 +23,8 @@ from __future__ import division
import operator
from math import (pi, log10)
+from six.moves import reduce
+
from numpy import (atleast_1d, concatenate)
from scipy import signal | signal.filter_design: use six for reduce | gwpy_gwpy | train | py |
5abb67ad4d3b5037aa0d1cb2b6139c56434cc31a | diff --git a/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/macro/AbstractMacro.java b/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/macro/AbstractMacro.java
index <HASH>..<HASH> 100644
--- a/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/macro/AbstractMacro.java
+++ b/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/macro/AbstractMacro.java
@@ -20,10 +20,7 @@
package org.xwiki.rendering.macro;
import javax.inject.Inject;
-import javax.inject.Named;
-import org.apache.commons.lang3.StringUtils;
-import org.xwiki.component.annotation.Component;
import org.xwiki.component.descriptor.ComponentDescriptor;
import org.xwiki.component.phase.Initializable;
import org.xwiki.component.phase.InitializationException; | XCOMMONS-<I>: Ability for a component to get its descriptor metadata
* fix checkstyle | xwiki_xwiki-rendering | train | java |
a8f31fba4650fb19d935c8438070dd11b00c5f43 | diff --git a/rootpy/plotting/hist.py b/rootpy/plotting/hist.py
index <HASH>..<HASH> 100644
--- a/rootpy/plotting/hist.py
+++ b/rootpy/plotting/hist.py
@@ -85,10 +85,10 @@ class _HistBase(Plottable, Object):
width = ax.GetBinWidth(i)
return bi
- def bins(self, of=False):
+ def bins(self, overflow=False):
for i in xrange(self.GetSize()):
bproxy = BinProxy(self, i)
- if not of and bproxy.overflow:
+ if not overflow and bproxy.overflow:
continue
yield bproxy
@@ -291,17 +291,17 @@ class _HistBase(Plottable, Object):
index = index % self.nbins(axis)
return self.axis(axis).GetBinUpEdge(index + 1)
- def _edges(self, axis, index=None, of=False):
+ def _edges(self, axis, index=None, overflow=False):
nbins = self.nbins(axis)
if index is None:
def temp_generator():
- if of:
+ if overflow:
yield float("-inf")
for index in xrange(nbins):
yield self._edgesl(axis, index)
yield self._edgesh(axis, index)
- if of:
+ if overflow:
yield float("+inf")
return temp_generator()
index = index % (nbins + 1) | More explicit name for including overflow bins | rootpy_rootpy | train | py |
9accb2250389b6040d80682951f8084c4fa42d78 | diff --git a/definitions/npm/mongodb_v2.x.x/flow_v0.25.x-/mongodb_v2.x.x.js b/definitions/npm/mongodb_v2.x.x/flow_v0.25.x-/mongodb_v2.x.x.js
index <HASH>..<HASH> 100644
--- a/definitions/npm/mongodb_v2.x.x/flow_v0.25.x-/mongodb_v2.x.x.js
+++ b/definitions/npm/mongodb_v2.x.x/flow_v0.25.x-/mongodb_v2.x.x.js
@@ -1,7 +1,7 @@
declare class MongoDB$ObjectID {
/**
* Create a new ObjectID instance
- * @param {(string|number|ongoDB$ObjectID)} id Can be a 24 byte hex string, 12 byte binary string or a Number.
+ * @param {(string|number|MongoDB$ObjectID)} id Can be a 24 byte hex string, 12 byte binary string or a Number.
*/
constructor(id?: string | number | MongoDB$ObjectID): this; | Fixed typo (#<I>) | flow-typed_flow-typed | train | js |
8e3ebb85b31e6dc06fcb0dcdf612e8cebf892956 | diff --git a/news-bundle/contao/languages/de/tl_news.php b/news-bundle/contao/languages/de/tl_news.php
index <HASH>..<HASH> 100644
--- a/news-bundle/contao/languages/de/tl_news.php
+++ b/news-bundle/contao/languages/de/tl_news.php
@@ -33,7 +33,7 @@
* Fields
*/
$GLOBALS['TL_LANG']['tl_news']['headline'] = array('Titel', 'Bitte geben Sie den Nachrichten-Titel ein.');
-$GLOBALS['TL_LANG']['tl_news']['alias'] = array('Nachrichtenalias', 'Der Nachrichtenalias ist eine eindeutige Referenz, die anstelle der numerischen Artikel-Id aufgerufen werden kann.');
+$GLOBALS['TL_LANG']['tl_news']['alias'] = array('Nachrichtenalias', 'Der Nachrichtenalias ist eine eindeutige Referenz, die anstelle der numerischen Artikel-ID aufgerufen werden kann.');
$GLOBALS['TL_LANG']['tl_news']['author'] = array('Autor', 'Hier können Sie den Autor des Beitrags ändern.');
$GLOBALS['TL_LANG']['tl_news']['date'] = array('Datum', 'Bitte geben Sie das Datum gemäß des globalen Datumsformats ein.');
$GLOBALS['TL_LANG']['tl_news']['time'] = array('Uhrzeit', 'Bitte geben Sie die Uhrzeit gemäß des globalen Zeitformats ein.'); | [News] Fixed a few minor spelling issues (#<I>) | contao_contao | train | php |
6e6d699b05c2fe9447e26adaf26e154c8063a34d | diff --git a/src/Illuminate/Database/PostgresConnection.php b/src/Illuminate/Database/PostgresConnection.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Database/PostgresConnection.php
+++ b/src/Illuminate/Database/PostgresConnection.php
@@ -10,6 +10,7 @@ use Illuminate\Database\Query\Processors\PostgresProcessor;
use Illuminate\Database\Schema\Grammars\PostgresGrammar as SchemaGrammar;
use Illuminate\Database\Schema\PostgresBuilder;
use Illuminate\Database\Schema\PostgresSchemaState;
+use Illuminate\Filesystem\Filesystem;
use PDO;
class PostgresConnection extends Connection
@@ -77,7 +78,7 @@ class PostgresConnection extends Connection
/**
* Get the schema state for the connection.
*
- * @param \Illuminate\Database\Filesystem|null $files
+ * @param \Illuminate\Filesystem\Filesystem|null $files
* @param callable|null $processFactory
* @return \Illuminate\Database\Schema\PostgresSchemaState
*/ | Fix Filesystem type (#<I>) | laravel_framework | train | php |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.