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 |
|---|---|---|---|---|---|
ddf26361b08ab094b5c7a59968f6d7b179c0d9e1 | diff --git a/src/core/hub.js b/src/core/hub.js
index <HASH>..<HASH> 100755
--- a/src/core/hub.js
+++ b/src/core/hub.js
@@ -1,5 +1,6 @@
import net from 'net';
import logger from 'winston';
+import {Config} from './config';
import {Socket} from './socket';
import {Profile} from './profile';
import {Balancer} from './balancer';
@@ -22,7 +23,10 @@ export class Hub {
_isClosed = false;
- constructor() {
+ constructor(config) {
+ if (config) {
+ Config.init(config);
+ }
this._hub = net.createServer();
this._hub.on('close', this.onClose.bind(this));
this._hub.on('connection', this.onConnect.bind(this)); | chore(hub): allow pass config directly to contructor | blinksocks_blinksocks | train | js |
803b51120784711a42d6ae3d3c8ba15de874e30c | diff --git a/app/Functions/FunctionsPrintLists.php b/app/Functions/FunctionsPrintLists.php
index <HASH>..<HASH> 100644
--- a/app/Functions/FunctionsPrintLists.php
+++ b/app/Functions/FunctionsPrintLists.php
@@ -1216,9 +1216,6 @@ class FunctionsPrintLists {
// Media object name(s)
$html .= '<td data-sort="' . Html::escape($media_object->getSortName()) . '">';
$html .= '<a href="' . $media_object->getHtmlUrl() . '" class="list_item name2">' . $name . '</a>';
- if (Auth::isEditor($media_object->getTree())) {
- $html .= '<br><a href="' . $media_object->getHtmlUrl() . '">' . basename($media_object->getFilename()) . '</a>';
- }
$html .= '</td>';
// Count of linked individuals | Fix - media objects no longer have a filename. (They have many) | fisharebest_webtrees | train | php |
0be34d903a5432ab87a6883adc8cba53b797bc52 | diff --git a/spec/unix_spec.rb b/spec/unix_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unix_spec.rb
+++ b/spec/unix_spec.rb
@@ -12,7 +12,7 @@ if ChildProcess.unix? && !ChildProcess.jruby? && !ChildProcess.posix_spawn?
process.stub!(:fork).and_return('fakepid')
process.stub!(:send_term)
process.stub!(:poll_for_exit).and_raise(ChildProcess::TimeoutError)
- process.stub!(:send_kill).and_raise(Errno::ECHILD)
+ process.stub!(:send_kill).and_raise(Errno::ECHILD.new)
process.start
lambda { process.stop }.should_not raise_error
@@ -26,7 +26,7 @@ if ChildProcess.unix? && !ChildProcess.jruby? && !ChildProcess.posix_spawn?
process.stub!(:fork).and_return('fakepid')
process.stub!(:send_term)
process.stub!(:poll_for_exit).and_raise(ChildProcess::TimeoutError)
- process.stub!(:send_kill).and_raise(Errno::ESRCH)
+ process.stub!(:send_kill).and_raise(Errno::ESRCH.new)
process.start
lambda { process.stop }.should_not raise_error | Fix spec for rbx | enkessler_childprocess | train | rb |
f2553f81dcb204733ea62cbdc8ce9ae3a0766bf6 | diff --git a/tango.py b/tango.py
index <HASH>..<HASH> 100644
--- a/tango.py
+++ b/tango.py
@@ -26,8 +26,10 @@ class tango:
return formattedTimeline
def getTrendingTopics(self):
+ # Returns an array of dictionary items containing the current trends
trendingTopicsURL = "http://search.twitter.com/trends.json"
trendingTopics = simplejson.load(urllib.urlopen(trendingTopicsURL))
- pass # for now, coming soon
-
-
+ trendingTopicsArray = []
+ for topic in trendingTopics['trends']:
+ trendingTopicsArray.append({"name" : topic['name'], "url" : topic['url']})
+ return trendingTopicsArray | Implemented a trending topics search function. Returns an array of dictionary items to loop through - fairly snazzy. | ryanmcgrath_twython | train | py |
27470d3406bc0adde3da79ca34ebf9bc512514b6 | diff --git a/sql/core/src/test/java/org/apache/spark/sql/api/java/JavaApplySchemaSuite.java b/sql/core/src/test/java/org/apache/spark/sql/api/java/JavaApplySchemaSuite.java
index <HASH>..<HASH> 100644
--- a/sql/core/src/test/java/org/apache/spark/sql/api/java/JavaApplySchemaSuite.java
+++ b/sql/core/src/test/java/org/apache/spark/sql/api/java/JavaApplySchemaSuite.java
@@ -156,7 +156,7 @@ public class JavaApplySchemaSuite implements Serializable {
JavaSchemaRDD schemaRDD2 = javaSqlCtx.jsonRDD(jsonRDD, expectedSchema);
StructType actualSchema2 = schemaRDD2.schema();
Assert.assertEquals(expectedSchema, actualSchema2);
- schemaRDD1.registerTempTable("jsonTable2");
+ schemaRDD2.registerTempTable("jsonTable2");
List<Row> actual2 = javaSqlCtx.sql("select * from jsonTable2").collect();
Assert.assertEquals(expectedResult, actual2);
} | [SQL] Correct a variable name in JavaApplySchemaSuite.applySchemaToJSON
`schemaRDD2` is not tested because `schemaRDD1` is registered again. | apache_spark | train | java |
0524920d88f2619f0f89933722f4e28b607380ba | diff --git a/lib/tty/cli.rb b/lib/tty/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/tty/cli.rb
+++ b/lib/tty/cli.rb
@@ -73,6 +73,9 @@ EOS
method_option :force, type: :boolean, aliases: '-f',
desc: 'Overwrite existing command'
method_option :help, aliases: '-h', desc: 'Display usage information'
+ method_option :test, type: :string, aliases: '-t',
+ desc: 'Generate a test setup',
+ banner: 'rspec', enum: %w(rspec minitest)
def add(*names)
if options[:help]
invoke :help, ['add'] | Add ability to set testing framework for add command | piotrmurach_tty | train | rb |
fafd10021ab3f7562fd3bc26b13f10817de97ae7 | diff --git a/hexify.py b/hexify.py
index <HASH>..<HASH> 100755
--- a/hexify.py
+++ b/hexify.py
@@ -4,10 +4,9 @@ import sys
import os
_HELP_TEXT = """
-Creates hexified versions of micropython scripts.
-Intended for saving files to the local filesystem, _NOT_ the microbit.
-Does not autodetect a microbit.
-Accepts multiple imput scripts and optionally one output directory.
+A simple utility script intended for creating hexified versions of MicroPython
+scripts on the local filesystem _NOT_ the microbit. Does not autodetect a
+microbit. Accepts multiple input scripts and optionally one output directory.
"""
def main(argv=None): | Help text edit
Attempted to better word the help text. | ntoll_uflash | train | py |
9fedecdf5560a1551fe73906ebcdb6117908797d | diff --git a/dvc/remote/s3.py b/dvc/remote/s3.py
index <HASH>..<HASH> 100644
--- a/dvc/remote/s3.py
+++ b/dvc/remote/s3.py
@@ -108,11 +108,13 @@ class RemoteS3(RemoteBase):
Logger.debug('Removing s3://{}/{}'.format(path_info['bucket'],
path_info['key']))
+ obj = self.s3.Object(path_info['bucket'], path_info['key'])
try:
- obj = self.s3.Object(path_info['bucket'], path_info['key']).get()
- obj.delete()
+ obj.get()
except Exception:
- pass
+ return
+
+ obj.delete()
def md5s_to_path_infos(self, md5s):
return [{'scheme': self.scheme, | remote: s3: properly delete key | iterative_dvc | train | py |
4083a77112bc0b31905ecc644f9fd1348c5faa92 | diff --git a/examples/decision_tree.py b/examples/decision_tree.py
index <HASH>..<HASH> 100644
--- a/examples/decision_tree.py
+++ b/examples/decision_tree.py
@@ -72,20 +72,7 @@ class DecisionNode(Node):
return node.name, node.ev
-# def make_file_system_tree(root_folder, _parent=None):
-# """This function makes a tree from folders and files.
-# """
-# root_node = Node(os.path.basename(root_folder), _parent)
-# root_node.path = root_folder
-# for item in os.listdir(root_folder):
-# item_path = os.path.join(root_folder, item)
-# if os.path.isfile(item_path):
-# file_node = Node(os.path.basename(item), root_node)
-# file_node.path = item_path
-# elif os.path.isdir(item_path):
-# #folder_path = os.path.join(root_folder, item)
-# make_file_system_tree(item_path, _parent=root_node)
-# return root_node
+ | dummy commit to rebuild docs | qwilka_vn-tree | train | py |
6d550b6e8d1bcf9b6a470b4b24ef5a9a135bbb22 | diff --git a/lib/disney/index.js b/lib/disney/index.js
index <HASH>..<HASH> 100644
--- a/lib/disney/index.js
+++ b/lib/disney/index.js
@@ -58,6 +58,10 @@ class DisneyPark extends Park {
channel: `${this[s_ResortCode]}.facilitystatus.1_0`,
});
+ /* eslint-disable no-console */
+ FacilityStatusChannels[this[s_ResortCode]].on("error", console.error);
+ /* eslint-enable no-console */
+
// sync facility status channel
FacilityStatusChannels[this[s_ResortCode]].Start();
} | [~] Output facility status errors to the error output | cubehouse_themeparks | train | js |
ef4ae18b155149d3aa89f293c9a2afbff5141e92 | diff --git a/core/networkserver/networkserver.go b/core/networkserver/networkserver.go
index <HASH>..<HASH> 100644
--- a/core/networkserver/networkserver.go
+++ b/core/networkserver/networkserver.go
@@ -76,7 +76,10 @@ func (n *networkServer) HandlePrepareActivation(activation *pb_broker.Deduplicat
// Build lorawan metadata if not present
if lorawan := activation.ActivationMetadata.GetLorawan(); lorawan == nil {
activation.ActivationMetadata.Protocol = &pb_protocol.ActivationMetadata_Lorawan{
- Lorawan: &pb_lorawan.ActivationMetadata{},
+ Lorawan: &pb_lorawan.ActivationMetadata{
+ DevEui: activation.DevEui,
+ AppEui: activation.AppEui,
+ },
}
}
// Generate random DevAddr | Add DevEUI and AppEUI to ActivationMetadata | TheThingsNetwork_ttn | train | go |
5817a951c7d8085b9c6ac388c796a242a8fdacd5 | diff --git a/payment_paypal/tests/controllers_test.py b/payment_paypal/tests/controllers_test.py
index <HASH>..<HASH> 100644
--- a/payment_paypal/tests/controllers_test.py
+++ b/payment_paypal/tests/controllers_test.py
@@ -32,6 +32,8 @@ from indico_payment_paypal.plugin import PaypalPaymentPlugin
def test_ipn_verify_business(business, expected, dummy_event):
rh = RHPaypalIPN()
rh.event = dummy_event
+ rh.registration = MagicMock()
+ rh.registration.registration_form.event = dummy_event
PaypalPaymentPlugin.event_settings.set(dummy_event, 'business', 'test')
request.form = {'business': business}
with PaypalPaymentPlugin.instance.plugin_context(): | Payment/PayPal: Fix tests | indico_indico-plugins | train | py |
ea8267b35776951c481a96d2e9db94bcf675cbeb | diff --git a/php/utils.php b/php/utils.php
index <HASH>..<HASH> 100644
--- a/php/utils.php
+++ b/php/utils.php
@@ -30,7 +30,9 @@ function extract_from_phar( $path ) {
register_shutdown_function(
function() use ( $tmp_path ) {
- unlink( $tmp_path );
+ if ( file_exists( $tmp_path ) ) {
+ unlink( $tmp_path );
+ }
}
); | Only attempt to remove when the file exists | wp-cli_wp-cli | train | php |
71b7a68c6d1a25d8965b0822aff88475c9bee0db | diff --git a/cmd/ssh-proxy/main.go b/cmd/ssh-proxy/main.go
index <HASH>..<HASH> 100644
--- a/cmd/ssh-proxy/main.go
+++ b/cmd/ssh-proxy/main.go
@@ -192,7 +192,7 @@ func configureProxy(logger lager.Logger) (*ssh.ServerConfig, error) {
if *enableCFAuth {
if *ccAPIURL == "" {
err := errors.New("ccAPIURL is required for Cloud Foundry authentication")
- logger.Fatal("uaa-url-required", err)
+ logger.Fatal("api-url-required", err)
}
_, err = url.Parse(*ccAPIURL) | improve fatal log messages around CF authentication | cloudfoundry_diego-ssh | train | go |
122578c491241fce03caec2b3df7a14f2b6b305b | diff --git a/snakebite/client.py b/snakebite/client.py
index <HASH>..<HASH> 100644
--- a/snakebite/client.py
+++ b/snakebite/client.py
@@ -753,7 +753,7 @@ class Client(object):
# Source is a file
elif self._is_file(node):
temporary_target = "%s._COPYING_" % target
- f = open(temporary_target, 'w')
+ f = open(temporary_target, 'wb')
try:
for load in self._read_file(path, node, tail_only=False, check_crc=check_crc):
f.write(load) | Changing the 'open' command to open a temporary file as binary. The lack of this parameter causes a bug when using copyToLocal to copy a file from a Linux HDFS cluster to a Windows client box. The file that ends up on Windows isn't byte-identical to the starting file on Linux, due to some end-of-line conversion issue. | spotify_snakebite | train | py |
0ffd5c7e84aa7507d647ce7a1c0d10f37d4a38ca | diff --git a/shared/constants/chat2/message.js b/shared/constants/chat2/message.js
index <HASH>..<HASH> 100644
--- a/shared/constants/chat2/message.js
+++ b/shared/constants/chat2/message.js
@@ -402,6 +402,7 @@ const outboxUIMessagetoMessage = (
errorReason,
ordinal: Types.numberToOrdinal(o.ordinal),
outboxID: Types.stringToOutboxID(o.outboxID),
+ submitState: 'pending',
text: new HiddenString(o.body),
timestamp: o.ctime,
}) | set submitState on loading pending (#<I>) | keybase_client | train | js |
1a36a7d86ffa32b10f13d641951177c897dc06aa | diff --git a/src/Common/Model/Base.php b/src/Common/Model/Base.php
index <HASH>..<HASH> 100644
--- a/src/Common/Model/Base.php
+++ b/src/Common/Model/Base.php
@@ -633,6 +633,12 @@ abstract class Base
*/
public function getAll($iPage = null, $iPerPage = null, $aData = [], $bIncludeDeleted = false)
{
+ // If the first value is an array then treat as if called with getAll(null, null, $aData);
+ if (is_array($iPage)) {
+ $aData = $iPage;
+ $iPage = null;
+ }
+
$oResults = $this->getAllRawQuery($iPage, $iPerPage, $aData, $bIncludeDeleted);
$aResults = $oResults->result();
$iNumResults = count($aResults); | Adding support for passing the `$aData` array as the first parameter to `getAll` | nails_common | train | php |
85b7bf7562c92ba9e38a2e44801ca0e68ee7cf51 | diff --git a/Library/Installation/Updater/Updater040800.php b/Library/Installation/Updater/Updater040800.php
index <HASH>..<HASH> 100644
--- a/Library/Installation/Updater/Updater040800.php
+++ b/Library/Installation/Updater/Updater040800.php
@@ -173,16 +173,16 @@ class Updater040800 extends Updater
$workspaces = $wsRepo->findAll();
$i = 0;
- foreach ($worspaces as $workspace) {
+ foreach ($workspaces as $workspace) {
$workspace->setMaxUsers(10000);
$em->persist($workspace);
if ($i % 200 === 0) {
- $i = 0;
$em->flush();
}
$i++;
}
+ $em->flush();
}
} | [CoreBundle] Fix mismatched var names in Updater<I> | claroline_Distribution | train | php |
c8777bc04956d3f37a23927fa2d0b3b034442414 | diff --git a/src/main/java/org/cp/elements/beans/model/Property.java b/src/main/java/org/cp/elements/beans/model/Property.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/cp/elements/beans/model/Property.java
+++ b/src/main/java/org/cp/elements/beans/model/Property.java
@@ -592,6 +592,7 @@ public class Property implements Comparable<Property>, Nameable<String> {
*
* @return a boolean value indicating whether this {@link Property} can be read.
* @see #getReadMethod()
+ * @see #isWritable()
*/
public boolean isReadable() {
return getReadMethod() != null;
@@ -636,6 +637,7 @@ public class Property implements Comparable<Property>, Nameable<String> {
* annotation.
*
* @return a boolean value indicating whether this {@link Property} is transient.
+ * @see #isSerializable()
*/
public boolean isTransient() {
@@ -649,6 +651,7 @@ public class Property implements Comparable<Property>, Nameable<String> {
*
* @return a boolean value indicating whether this {@link Property} can be written.
* @see #getWriteMethod()
+ * @see #isReadable()
*/
public boolean isWritable() {
return getWriteMethod() != null; | Edit Javadoc in the Property class. | codeprimate-software_cp-elements | train | java |
ed2c39ffaaf02962a0611ce5d5b4ad010acb93bd | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -753,11 +753,11 @@ utils.normalize = function(s, key) {
}
}
- if (key.name === 'p' && key.ctrl) {
+ if (key.name === 'p' && key.ctrl && !key.shift && !key.meta) {
key.name = 'up';
}
- if (key.name === 'n' && key.ctrl) {
+ if (key.name === 'n' && key.ctrl && !key.shift && !key.meta) {
key.name = 'down';
} | ensure shift and meta are not pressed | enquirer_readline-utils | train | js |
41d8f5a2fead90a08b280c1728cc354d16f08475 | diff --git a/internal/jobobject/jobobject_test.go b/internal/jobobject/jobobject_test.go
index <HASH>..<HASH> 100644
--- a/internal/jobobject/jobobject_test.go
+++ b/internal/jobobject/jobobject_test.go
@@ -70,7 +70,6 @@ func TestJobStats(t *testing.T) {
ctx = context.Background()
options = &Options{
Name: "test",
- Silo: true,
EnableIOTracking: true,
}
)
@@ -110,7 +109,6 @@ func TestIOTracking(t *testing.T) {
ctx = context.Background()
options = &Options{
Name: "test",
- Silo: true,
}
)
job, err := Create(ctx, options) | Remove uneccessary use of silos in jobobject tests (#<I>)
Two tests added recently by yours truly don't need to be running as
silos. Remove the silo field set to true. Was running into this when
trying to backport a fix to a branch that doesn't have the silo work. | Microsoft_hcsshim | train | go |
56816ed08a416cec5772494a03922be3d282a7a9 | diff --git a/nbt/nbt.py b/nbt/nbt.py
index <HASH>..<HASH> 100644
--- a/nbt/nbt.py
+++ b/nbt/nbt.py
@@ -90,9 +90,8 @@ class TAG_Double(_TAG_Numeric):
class TAG_Byte_Array(TAG):
id = TAG_BYTE_ARRAY
- def __init__(self, buffer=None):
+ def __init__(self, name=None, value=None, buffer=None):
super(TAG_Byte_Array, self).__init__()
- self.value = ''
if buffer:
self._parse_buffer(buffer) | Make TAG_Byte_Array instantiate like everything else. | twoolie_NBT | train | py |
ca2b7fa1f4a42fb70eb37c87c10ba7b5a6df9da6 | diff --git a/src/views/view-registry.js b/src/views/view-registry.js
index <HASH>..<HASH> 100644
--- a/src/views/view-registry.js
+++ b/src/views/view-registry.js
@@ -9,6 +9,7 @@ const VIEW_REGISTRY = {
piechart: JuttleViz.Piechart,
scatterchart: JuttleViz.Scatterchart,
less: JuttleViz.Less,
+ markdown: JuttleViz.Markdown,
events: JuttleViz.Events,
file: JuttleViz.File,
timechartvizjs: JuttleViz.TimechartVizJs | view-registry: add markdown view | juttle_juttle-client-library | train | js |
ff39e9afcf11a218aed5d60f1961d1a5659cec73 | diff --git a/spec/integration/resource_spec.rb b/spec/integration/resource_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/resource_spec.rb
+++ b/spec/integration/resource_spec.rb
@@ -133,7 +133,7 @@ if ADAPTER
class Geek < Male
property :awkward, Boolean, :default => true
end
-
+
Geek.auto_migrate!(ADAPTER)
repository(ADAPTER) do
@@ -146,6 +146,26 @@ if ADAPTER
Maniac.create!(:name => 'William')
Psycho.create!(:name => 'Norman')
end
+
+ class Flanimal
+ include DataMapper::Resource
+ property :id, Integer, :serial => true
+ property :type, Discriminator
+ property :name, String
+
+ end
+
+ class Sprog < Flanimal; end
+
+ Flanimal.auto_migrate!(ADAPTER)
+
+ end
+
+ it "should test bug ticket #302" do
+ repository(ADAPTER) do
+ Sprog.create(:name => 'Marty')
+ Sprog.first(:name => 'Marty').should_not be_nil
+ end
end
it "should select appropriate types" do | added spec for ticket #<I>, passing | datamapper_dm-core | train | rb |
cfd1e6fbdc8afd699b9af75f7b321366f581b6f3 | diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py
index <HASH>..<HASH> 100644
--- a/atlassian/rest_client.py
+++ b/atlassian/rest_client.py
@@ -125,6 +125,7 @@ class AtlassianRestAPI(object):
verify=self.verify_ssl,
files=files
)
+ response.encoding = 'utf-8'
if self.advanced_mode:
self.response = response
return response | Set response encoding to utf-8
For every request the requests module guesses the correct encoding, which takes time.
Therefore this commit sets the encoding to uft-8. Also see <URL> | atlassian-api_atlassian-python-api | train | py |
7b2d657333e28e0daf7a76afbdc57b60bbc85a25 | diff --git a/lib/test/examiner.js b/lib/test/examiner.js
index <HASH>..<HASH> 100644
--- a/lib/test/examiner.js
+++ b/lib/test/examiner.js
@@ -407,7 +407,7 @@ Test.prototype.run = function(options) {
this.status = stati.fail;
this.failures.push({ message: '' + ex });
console.error(ex);
- if (ex.stack) {
+ if (options.isNode && ex.stack) {
console.error(ex.stack);
}
} | Bug <I> (extratests): Only report stack traces where needed
- i.e. Node. The web is cooler about this | joewalker_gcli | train | js |
1312c43a109c89cc166e3573cc3f079adf37369d | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,6 +1,5 @@
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
-require 'rspec'
require 'active_support'
require 'action_view'
require 'smart_titles' | Rspec is required automatically by bundler | semaperepelitsa_smart_titles | train | rb |
e089726efe044a4c63ca811b29ab39fb5a59d1cc | diff --git a/lib/ey-deploy/configuration.rb b/lib/ey-deploy/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/ey-deploy/configuration.rb
+++ b/lib/ey-deploy/configuration.rb
@@ -1,5 +1,6 @@
require 'json'
require 'thor'
+require 'etc'
module EY
class Deploy::Configuration
@@ -73,7 +74,7 @@ module EY
end
def user
- node['users'].first['username'] || 'nobody'
+ Etc.getlogin
end
alias :group :user | Get the username from the system, rather than the node
Change-Id: I6ff<I>cde<I>fc<I>dfc8bb3afdbaa<I>a6f4d<I>c | engineyard_engineyard-serverside | train | rb |
696e5efbd5c09e379e6d55716296027a39a4a2b6 | diff --git a/pkg/dockerregistry/client.go b/pkg/dockerregistry/client.go
index <HASH>..<HASH> 100644
--- a/pkg/dockerregistry/client.go
+++ b/pkg/dockerregistry/client.go
@@ -184,17 +184,17 @@ func unmarshalDockerImage(body []byte) (*docker.Image, error) {
return nil, err
}
- image := &docker.Image{}
- image.ID = imagePre012.ID
- image.Parent = imagePre012.Parent
- image.Comment = imagePre012.Comment
- image.Created = imagePre012.Created
- image.Container = imagePre012.Container
- image.ContainerConfig = imagePre012.ContainerConfig
- image.DockerVersion = imagePre012.DockerVersion
- image.Author = imagePre012.Author
- image.Config = imagePre012.Config
- image.Architecture = imagePre012.Architecture
- image.Size = imagePre012.Size
- return image, nil
+ return &docker.Image{
+ ID: imagePre012.ID,
+ Parent: imagePre012.Parent,
+ Comment: imagePre012.Comment,
+ Created: imagePre012.Created,
+ Container: imagePre012.Container,
+ ContainerConfig: imagePre012.ContainerConfig,
+ DockerVersion: imagePre012.DockerVersion,
+ Author: imagePre012.Author,
+ Config: imagePre012.Config,
+ Architecture: imagePre012.Architecture,
+ Size: imagePre012.Size,
+ }, nil
} | Initialize image by using struct literal | openshift_origin | train | go |
a20c57303945f58ccb1693d30650adbb8fa13f3f | diff --git a/src/app/rocket/spec/ei/EiEngine.php b/src/app/rocket/spec/ei/EiEngine.php
index <HASH>..<HASH> 100644
--- a/src/app/rocket/spec/ei/EiEngine.php
+++ b/src/app/rocket/spec/ei/EiEngine.php
@@ -61,6 +61,10 @@ class EiEngine {
private $genericEiDefinition;
private $scalarEiDefinition;
+ /**
+ * @param EiType $eiType
+ * @param EiMask $eiMask
+ */
public function __construct(EiType $eiType, EiMask $eiMask = null) {
$this->eiType = $eiType;
$this->eiMask = $eiMask;
@@ -69,6 +73,9 @@ class EiEngine {
$this->eiModificatorCollection = new EiModificatorCollection($this);
}
+ /**
+ *
+ */
public function clear() {
$this->guiDefinition = null;
$this->draftDefinition = null; | Http 2 server push support added | n2n_rocket | train | php |
a44e3471fc93b19ea97c3b008b91294ed4bcd4fc | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ setup(name='DPark',
author='Davies Liu',
author_email='davies.liu@gmail.com',
license= 'BSD License',
- packages=['dpark', 'dpark.moosefs'],
+ packages=['dpark', 'dpark.moosefs', 'dpark.pymesos'],
include_package_data=True,
zip_safe=False,
install_requires=[ | update setup.py to include dpark.pymesos | douban_dpark | train | py |
093291ff6972c1da5220eeb64a55b2177e36a6b1 | diff --git a/lib/actv/event.rb b/lib/actv/event.rb
index <HASH>..<HASH> 100644
--- a/lib/actv/event.rb
+++ b/lib/actv/event.rb
@@ -115,7 +115,7 @@ module ACTV
if image.blank?
if (self.logoUrlAdr && self.logoUrlAdr != defaultImage && self.logoUrlAdr =~ URI::regexp)
- self.logoUrlAdr
+ image = self.logoUrlAdr
end
end
image | applied the logoUrlAdr as a secondary image should the imageUrlAdr not exists | activenetwork_actv | train | rb |
f0fd14e028ac276ea03088895d7c4e70048b43df | diff --git a/src/Block.js b/src/Block.js
index <HASH>..<HASH> 100644
--- a/src/Block.js
+++ b/src/Block.js
@@ -19,6 +19,7 @@ import {
rootBlocks, rootMixins
} from './constants';
import { initApp } from './initApp';
+import { Mixin } from './Mixin';
/**
* @typedef {Error} EvaluationError | Fix Mixin name resolving. | dwaynejs_dwayne | train | js |
835389b8185a3bee2af9ecf502dd66ceb36bda99 | diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/report/overview/report.php
+++ b/mod/quiz/report/overview/report.php
@@ -6,7 +6,7 @@ class quiz_report extends quiz_default_report {
function display($quiz, $cm, $course) { /// This function just displays the report
- global $CFG;
+ global $CFG, $QUIZ_GRADE_METHOD;
if (!$grades = quiz_get_grade_records($quiz)) {
return;
@@ -14,7 +14,7 @@ class quiz_report extends quiz_default_report {
$strname = get_string("name");
$strattempts = get_string("attempts", "quiz");
- $strbestgrade = get_string("bestgrade", "quiz");
+ $strbestgrade = $QUIZ_GRADE_METHOD[$quiz->grademethod];
$table->head = array(" ", $strname, $strattempts, "$strbestgrade /$quiz->grade");
$table->align = array("center", "left", "left", "center"); | Name of final grade column makes more sense now | moodle_moodle | train | php |
4eed068c868038a36185d248559d2aee2db3faed | diff --git a/lib/extensions.js b/lib/extensions.js
index <HASH>..<HASH> 100644
--- a/lib/extensions.js
+++ b/lib/extensions.js
@@ -17,7 +17,9 @@ Chai.Assertion.addMethod("class", function(classNames){
classList.contains(name),
"expected classList '" + subject.className + "' to include #{exp}",
"expected classList '" + subject.className + "' not to include #{exp}",
- name
+ subject.className,
+ name,
+ false
);
}
}); | Avoid printing "HTMLSpanElement" in failed class-matches | Alhadis_Atom-Mocha | train | js |
0d363f72d6926d74dba56f645e15867d3209ffcb | diff --git a/moskito-webui/src/main/java/net/anotheria/moskito/webui/dashboards/api/DashboardAPIImpl.java b/moskito-webui/src/main/java/net/anotheria/moskito/webui/dashboards/api/DashboardAPIImpl.java
index <HASH>..<HASH> 100644
--- a/moskito-webui/src/main/java/net/anotheria/moskito/webui/dashboards/api/DashboardAPIImpl.java
+++ b/moskito-webui/src/main/java/net/anotheria/moskito/webui/dashboards/api/DashboardAPIImpl.java
@@ -258,7 +258,6 @@ public class DashboardAPIImpl extends AbstractMoskitoAPIImpl implements Dashboar
ChartConfig newChartConfig = new ChartConfig();
newChartConfig.setAccumulators(accNames);
- newChartConfig.setCaption(" ");
new_cc_array[new_cc_array.length-1] = newChartConfig;
config.setCharts(new_cc_array);
@@ -388,7 +387,7 @@ public class DashboardAPIImpl extends AbstractMoskitoAPIImpl implements Dashboar
if (cc.getCaption()!=null){
bean.setCaption(cc.getCaption());
} else{
- bean.setCaption(cc.buildCaption());
+ bean.setCaption(StringUtils.trimString(cc.buildCaption(),"", 50));
}
LinkedList<String> chartIds = new LinkedList<String>(); | MSK-<I> Accumulators for dashboards. Caption | anotheria_moskito | train | java |
d88f6e6789525f00202940f414bd93ad00433b46 | diff --git a/spec/ffi/id3tag_spec.rb b/spec/ffi/id3tag_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/ffi/id3tag_spec.rb
+++ b/spec/ffi/id3tag_spec.rb
@@ -85,16 +85,15 @@ module LAME
LAME.id3tag_set_genre(@flags_pointer, pointer_from_string("Rock")).should eql 0
end
- # fixed set of allowed fields (see id3tag.c)
+ # There is a fixed set of allowed fields (see id3tag.c)
+ # LAME 3.99.4 fixed some bugs in setting field values, this could crash for certain tags.
it "sets the fieldvalue" do
- # NOTE: LAME 3.99.4 fixed some bugs in setting field values.
LAME.id3tag_set_fieldvalue(@flags_pointer, pointer_from_string("TIT2=foofoo")).should eql 0
end
- it "sets the fieldvalue (utf16)" do
- pending "UTF-16 is a low priority for now.."
- LAME.id3tag_set_fieldvalue_utf16(@flags_pointer, "LINK=foofoo".encode("UTF-16")).should eql 0
- end
+ # it "sets the fieldvalue (utf16)" do
+ # LAME.id3tag_set_fieldvalue_utf16(@flags_pointer, "LINK=foofoo".encode("UTF-16")).should eql 0
+ # end
it "sets album art" do
buffer_size = 1024 | Remove pending UTF-<I> test. | rdvdijk_lame | train | rb |
c46e497fccebb5305dab747ed623e4ae75a221c2 | diff --git a/quark/backend.py b/quark/backend.py
index <HASH>..<HASH> 100644
--- a/quark/backend.py
+++ b/quark/backend.py
@@ -46,7 +46,8 @@ class Backend(object):
self.dist = du
def visit_Dependency(self, dep):
- self.dependencies["%s:%s.%s-%s" % (dep.lang, dep.group, dep.artifact, dep.version)] = dep
+ if dep.file.depth == 0:
+ self.dependencies["%s:%s.%s-%s" % (dep.lang, dep.group, dep.artifact, dep.version)] = dep
def visit_Use(self, use):
name, ver = namever(use.target) | Don't emit your dependencies' dependencies as your own | datawire_quark | train | py |
3bdf193df88997bbf9e57ec35660cf16d8877ead | diff --git a/src/language/CSSUtils.js b/src/language/CSSUtils.js
index <HASH>..<HASH> 100644
--- a/src/language/CSSUtils.js
+++ b/src/language/CSSUtils.js
@@ -357,8 +357,9 @@ define(function (require, exports, module) {
}
if (_isInPropName(ctx)) {
- if (ctx.token.string.length > 0 &&
- (ctx.token.string === "{" || !ctx.token.string.match(/\S/))) {
+ if (ctx.token.className === "property" || ctx.token.className === "property error" || ctx.token.className === "tag") {
+ propName = ctx.token.string;
+ } else {
var testPos = {ch: ctx.pos.ch + 1, line: ctx.pos.line},
testToken = editor._codeMirror.getTokenAt(testPos);
@@ -366,8 +367,6 @@ define(function (require, exports, module) {
propName = testToken.string;
offset = 0;
}
- } else if (ctx.token.className === "property" || ctx.token.className === "property error" || ctx.token.className === "tag") {
- propName = ctx.token.string;
}
// If we're in property name context but not in an existing property name, | Always check the next token for the property name after the current cursor position. | adobe_brackets | train | js |
212aca021cb645f58b2e8f872596481a91f4b033 | diff --git a/Branch-SDK/src/io/branch/referral/Branch.java b/Branch-SDK/src/io/branch/referral/Branch.java
index <HASH>..<HASH> 100644
--- a/Branch-SDK/src/io/branch/referral/Branch.java
+++ b/Branch-SDK/src/io/branch/referral/Branch.java
@@ -3015,16 +3015,20 @@ public class Branch {
} catch (Exception ignore) {
}
}
- //Publish success to listeners
- thisReq_.onRequestSucceeded(serverResponse, branchReferral_);
+ requestQueue_.dequeue();
+
//If this request changes a session update the session-id to queued requests.
if (thisReq_.isSessionInitRequest()) {
updateAllRequestsInQueue();
initState_ = SESSION_STATE.INITIALISED;
+ //Publish success to listeners
+ thisReq_.onRequestSucceeded(serverResponse, branchReferral_);
checkForAutoDeepLinkConfiguration();
+ }else {
+ //Publish success to listeners
+ thisReq_.onRequestSucceeded(serverResponse, branchReferral_);
}
- requestQueue_.dequeue();
}
networkCount_ = 0;
if (hasNetwork_ && initState_ != SESSION_STATE.UNINITIALISED) { | Fixing issue of calling init finished before setting init state
Init sate is set before calling resultant callbacks to notify Async
result | BranchMetrics_android-branch-deep-linking | train | java |
bea15a4d93fa60c20612c06d441777e1f70d8a87 | diff --git a/mockserver_test.go b/mockserver_test.go
index <HASH>..<HASH> 100644
--- a/mockserver_test.go
+++ b/mockserver_test.go
@@ -40,7 +40,6 @@ var (
)
// newLockListener creates a new listener on the local IP.
-// If listen fails it panics
func newLocalListener() (net.Listener, error) {
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil { | Removed out of date comment in mock servers
Removed out of date comment about panic from newLocalListener. | multiplay_go-ts3 | train | go |
78162b5d8e8904b96dc09c9887cffada79bc711d | diff --git a/modules/events.js b/modules/events.js
index <HASH>..<HASH> 100644
--- a/modules/events.js
+++ b/modules/events.js
@@ -129,7 +129,7 @@ EventEmitter.prototype.addListener = function addListener(type, listener) {
} else if (isArray(this._events[type])) {
// If we've already got an array, just append.
- this._events[type].push(listener);
+ this._events[type]['fail' === type ? 'unshift' : 'push'](listener);
// Check for listener leak
if (!this._events[type].warned) {
@@ -151,7 +151,7 @@ EventEmitter.prototype.addListener = function addListener(type, listener) {
}
} else {
// Adding the second element, need to change to array.
- this._events[type] = [this._events[type], listener];
+ this._events[type] = 'fail' === type ? [listener, this._events[type]] : [this._events[type], listener];
}
return this; | Refs #<I> -- ACTUALLY fixes the issue :-) by special-casing 'fail' events for prepending | casperjs_casperjs | train | js |
a061b1e2d8f6117b0524e44de7b6bc391245864e | diff --git a/integration/build/build_test.go b/integration/build/build_test.go
index <HASH>..<HASH> 100644
--- a/integration/build/build_test.go
+++ b/integration/build/build_test.go
@@ -175,7 +175,7 @@ func TestBuildMultiStageParentConfig(t *testing.T) {
// Test cases in #36996
func TestBuildLabelWithTargets(t *testing.T) {
- skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.37"), "test added after 1.37")
+ skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.38"), "test added after 1.38")
bldName := "build-a"
testLabels := map[string]string{
"foo": "bar", | Adjust API version to match correct release
This fix was not yet included in Docker <I>, so
API version <I> was not the right selector (Docker
<I>, <I> and <I> all support API <I>).
We should change these checks for engine versions,
or use a different method to skip tests when running
against older engines. | moby_moby | train | go |
753760a517cc584e0290343a974afaa2f383a0a0 | diff --git a/userprofiles/contrib/emailverification/views.py b/userprofiles/contrib/emailverification/views.py
index <HASH>..<HASH> 100644
--- a/userprofiles/contrib/emailverification/views.py
+++ b/userprofiles/contrib/emailverification/views.py
@@ -36,6 +36,7 @@ email_change_requested = EmailChangeRequestedView.as_view()
class EmailChangeApproveView(LoginRequiredMixin, RedirectView):
+ permanent = False
def get_redirect_url(self, token, code):
try:
verification = EmailVerification.objects.get(token=token, code=code, | Changed emailchangeapproveview to non permanent redirect. | stephrdev_django-userprofiles | train | py |
614af204f5312962f665f635a4d6ad8992f861b9 | diff --git a/PHPCI/Helper/BaseCommandExecutor.php b/PHPCI/Helper/BaseCommandExecutor.php
index <HASH>..<HASH> 100644
--- a/PHPCI/Helper/BaseCommandExecutor.php
+++ b/PHPCI/Helper/BaseCommandExecutor.php
@@ -98,4 +98,4 @@ abstract class BaseCommandExecutor implements CommandExecutor
* @return null|string
*/
abstract public function findBinary($binary);
-}
\ No newline at end of file
+} | Add missing newline to end of BaseCommandExecutor. | dancryer_PHPCI | train | php |
902318df4c87fbf711fc5afe9df04ee9ffe10bca | diff --git a/bcloud/Downloader.py b/bcloud/Downloader.py
index <HASH>..<HASH> 100644
--- a/bcloud/Downloader.py
+++ b/bcloud/Downloader.py
@@ -16,7 +16,7 @@ from bcloud.const import State
from bcloud.net import ForbiddenHandler
from bcloud import pcs
-CHUNK_SIZE = 16384 # 16K
+CHUNK_SIZE = 131072 # 128K
RETRIES = 5 # 下载数据出错时重试的次数
TIMEOUT = 20
THRESHOLD_TO_FLUSH = 100 # 磁盘写入数据次数超过这个值时, 就进行一次同步. | Set downloading chunk size to <I>k | XuShaohua_bcloud | train | py |
c4aba150b68ced8a9fd300bd26436491cad438d6 | diff --git a/sprd/entity/Address.js b/sprd/entity/Address.js
index <HASH>..<HASH> 100644
--- a/sprd/entity/Address.js
+++ b/sprd/entity/Address.js
@@ -72,8 +72,22 @@ define(["js/data/Entity", "sprd/entity/ShippingState", "sprd/entity/ShippingCoun
delete data.state;
}
+ if (this.get('type') === ADDRESS_TYPES.PACKSTATION) {
+ data.street = "Packstation " + data.street;
+ }
+
return data;
},
+
+ parse: function (data) {
+ if (data.type === ADDRESS_TYPES.PACKSTATION) {
+
+ }
+ return this.callBase();
+ },
+ isPackStation: function () {
+ return this.$.type == ADDRESS_TYPES.PACKSTATION;
+ }.onChange('type')
});
Address.ADDRESS_TYPES = ADDRESS_TYPES; | added isPackStation as well as parsing and composing of PackStation address | spreadshirt_rAppid.js-sprd | train | js |
f343dcbb428d89deed7df01a5676c5f42ce7c463 | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -31,7 +31,10 @@ module.exports = (rootDir, config, { watch, fingerprint, compact }) => {
return;
}
- let plugin = load(plugins[type]);
+ let plugin = plugins[type];
+ if(!plugin.call) {
+ plugin = load(plugin);
+ }
plugin(pluginConfig, assetManager, { watcher, browsers, compact });
});
}; | added support for function plugins
as suggested by @mkhl, it's sometimes useful to define ad-hoc plugins
within a project's faucet configuration (e.g. while developing a new
plugin) | faucet-pipeline_faucet-pipeline-core | train | js |
d01aa8c10a0e9e0fe204bbd2dcaf23089123461a | diff --git a/packages/eslint-plugin-swissquote/src/typescript-best-practices.js b/packages/eslint-plugin-swissquote/src/typescript-best-practices.js
index <HASH>..<HASH> 100644
--- a/packages/eslint-plugin-swissquote/src/typescript-best-practices.js
+++ b/packages/eslint-plugin-swissquote/src/typescript-best-practices.js
@@ -33,7 +33,7 @@ module.exports = {
// Overrides of TypeScript recommended
"@swissquote/swissquote/@typescript-eslint/explicit-function-return-type": "off",
"@swissquote/swissquote/@typescript-eslint/explicit-member-accessibility": "off",
-
+ "@swissquote/swissquote/@typescript-eslint/no-empty-function": "warn",
}
}; | set no-empty-function as warn in typescript | swissquote_crafty | train | js |
5f423fdfd240ac5039438f9b25914ef9a40ab431 | diff --git a/src/Controller/InstallerController.php b/src/Controller/InstallerController.php
index <HASH>..<HASH> 100755
--- a/src/Controller/InstallerController.php
+++ b/src/Controller/InstallerController.php
@@ -1024,7 +1024,7 @@ class InstallerController extends AbstractActionController
$container['framework_name'] = $frameworkName;
//Include MelisPlatformFrameworks module
- $mpFwModule = ['MelisPlatformFrameworks' => 'melisplatform/melis-platform-frameworks:dev-develop'];
+ $mpFwModule = ['MelisPlatformFrameworks' => 'melisplatform/melis-platform-frameworks:"dev-develop as 3.1"'];
array_push($container['install_modules'], 'MelisPlatformFrameworks');
$container['download_modules'] = array_merge($container['download_modules'], $mpFwModule);
$container['install_platform_frameworks'] = $mpFwModule; | Added temporarily an alias on develop branch | melisplatform_melis-installer | train | php |
670098b70055f43678152969bb7b3969cfe3eced | diff --git a/pycm/pycm_param.py b/pycm/pycm_param.py
index <HASH>..<HASH> 100644
--- a/pycm/pycm_param.py
+++ b/pycm/pycm_param.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""Parameters and constants."""
-VERSION = "1.9"
+VERSION = "2.0"
OVERVIEW = ''' | fix : version tag in pycm_param fixed | sepandhaghighi_pycm | train | py |
74a4213e1d4876a0330673cae92694b53601f83d | diff --git a/lib/android/manifest.rb b/lib/android/manifest.rb
index <HASH>..<HASH> 100644
--- a/lib/android/manifest.rb
+++ b/lib/android/manifest.rb
@@ -38,6 +38,7 @@ module Android
@intent_filters = []
unless elem.elements['intent-filter'].nil?
elem.elements['intent-filter'].each do |e|
+ next unless e.instance_of? REXML::Element
@intent_filters << IntentFilter.parse(e)
end
end
diff --git a/spec/manifest_spec.rb b/spec/manifest_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/manifest_spec.rb
+++ b/spec/manifest_spec.rb
@@ -122,6 +122,23 @@ describe Android::Manifest do
context "with no components" do
it { should be_empty }
end
+ context 'with text element in intent-filter element. (issue #3)' do
+ before do
+ app = REXML::Element.new('application')
+ activity = REXML::Element.new('activity')
+ intent_filter = REXML::Element.new('intent-filter')
+ text = REXML::Text.new('sample')
+
+ intent_filter << text
+ activity << intent_filter
+ app << activity
+ dummy_xml.root << app
+ end
+ it "should have components" do
+ subject.should have(1).items
+ end
+ it { expect { subject }.to_not raise_error }
+ end
end
end | fixed #3. check object class before creating IntentFilter object. | SecureBrain_ruby_apk | train | rb,rb |
fbb7f658ab225678a5655566479acfd5ebb24453 | diff --git a/discourse.js b/discourse.js
index <HASH>..<HASH> 100644
--- a/discourse.js
+++ b/discourse.js
@@ -321,11 +321,14 @@ function handleResponse(callback) {
}
if (resp.statusCode === 429) {
var msg = 'E429: Too Many Requests';
- if (resp.method) {
- msg += ', Method: ' + resp.method;
- }
- if (resp.url) {
- msg += ', URL: ' + resp.url;
+ if (resp.request) {
+ var request = resp.request;
+ if (request.method) {
+ msg += ', Method: ' + request.method;
+ }
+ if (request.url) {
+ msg += ', URL: ' + request.url;
+ }
}
exports.warn(msg);
delayUntil = new Date().getTime() + 2 * 60 * 1000; | Fixed E<I> messages
method and url are now fetched from the right object | SockDrawer_SockBot | train | js |
43e58c5a356427f19a83d5235e1e4636bbff2f33 | diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -22,6 +22,7 @@ gulp.task('build', function () {
.pipe(header(banner, {pkg: pkg}))
.pipe(rename('blooming-menu.min.js'))
.pipe(gulp.dest('build'))
+ .pipe(gulp.dest('example/js'))
})
gulp.task('deploy:ghpages', function () { | Copy builded file to example/js/ on build | caiogondim_blooming-menu.js | train | js |
ee37b23e70ecee85820d51ea5f4534c2a48b31eb | diff --git a/etk/etk.py b/etk/etk.py
index <HASH>..<HASH> 100644
--- a/etk/etk.py
+++ b/etk/etk.py
@@ -1,7 +1,7 @@
import platform
import tempfile
from typing import List, Dict
-import spacy, copy, json, os, jsonpath_ng, importlib, logging, sys
+import spacy, copy, json, os, jsonpath_ng.ext, importlib, logging, sys
from etk.tokenizer import Tokenizer
from etk.document import Document
from etk.etk_exceptions import InvalidJsonPathError
@@ -33,7 +33,7 @@ class ETK(object):
)
self.logger = logging.getLogger('ETK')
- self.parser = jsonpath_ng.parse
+ self.parser = jsonpath_ng.ext.parse
self.default_nlp = spacy.load('en_core_web_sm')
self.default_tokenizer = Tokenizer(copy.deepcopy(self.default_nlp))
self.parsed = dict()
@@ -297,4 +297,3 @@ class ETK(object):
self.logger.critical(message)
elif level == "exception":
self.logger.exception(message)
-
\ No newline at end of file | Use jsonpath_ng extension instead of jsonpath_ng | usc-isi-i2_etk | train | py |
f5f59bb24b9ea7a4e0ab35d04da81a7656018bb3 | diff --git a/lib/core/proxy.js b/lib/core/proxy.js
index <HASH>..<HASH> 100644
--- a/lib/core/proxy.js
+++ b/lib/core/proxy.js
@@ -70,7 +70,7 @@ exports.serve = function(ipc, host, port, ws){
});
proxy.on('error', function (e) {
- console.error(__("Error forwarding requests to blockchain/simulator"), e);
+ console.error(__("Error forwarding requests to blockchain/simulator"), e.message);
});
proxy.on('proxyRes', (proxyRes) => { | Proxy error message "Error forwarding requests to blockchain/simulator [Object(object)]" was showing in console. Have replace [Object(object)] with `error.message` | embark-framework_embark | train | js |
94c7c7909c667db9452e92f4fd09503e7494eeba | diff --git a/sacred/observers/mongo.py b/sacred/observers/mongo.py
index <HASH>..<HASH> 100644
--- a/sacred/observers/mongo.py
+++ b/sacred/observers/mongo.py
@@ -53,14 +53,15 @@ class MongoObserver(RunObserver):
VERSION = 'MongoObserver-0.7.0'
@staticmethod
- def create(url='localhost', db_name='sacred', collection='runs',
+ def create(url=None, db_name='sacred', collection='runs',
overwrite=None, priority=DEFAULT_MONGO_PRIORITY,
- client=None,**kwargs):
+ client=None, **kwargs):
import pymongo
import gridfs
if client is not None:
assert isinstance(client, pymongo.MongoClient)
+ assert url is None, 'Cannot pass both a client and an url.'
else:
client = pymongo.MongoClient(url, **kwargs)
database = client[db_name] | added a sanity check to prevent passing both client and url to MongoObserver.
see #<I> | IDSIA_sacred | train | py |
2793bd2cdd6fc208aba6405d77a81cda1291bea4 | diff --git a/ecabc/abc.py b/ecabc/abc.py
index <HASH>..<HASH> 100644
--- a/ecabc/abc.py
+++ b/ecabc/abc.py
@@ -34,7 +34,7 @@ class ABC:
if self.saving:
try:
self.settings.importSettings()
- except ValueError:
+ except FileNotFoundError:
self.output.print("Creating new settings file")
self.settings.saveSettings()
self.fitnessFunction = fitnessFunction
diff --git a/ecabc/settings.py b/ecabc/settings.py
index <HASH>..<HASH> 100644
--- a/ecabc/settings.py
+++ b/ecabc/settings.py
@@ -47,7 +47,7 @@ class Settings:
def importSettings(self):
self._filename = self._filename
if not os.path.isfile(self._filename):
- raise ValueError('could not open setting file')
+ raise FileNotFoundError('could not open setting file')
else:
with open(self._filename, 'r') as jsonFile:
data = json.load(jsonFile) | changed ValueError -> FileNotFoundError | ECRL_ecabc | train | py,py |
971e6dcba9c86f048875fe8aca7bf632c03a6a41 | diff --git a/src/Traits/ApplicationInitiatorTrait.php b/src/Traits/ApplicationInitiatorTrait.php
index <HASH>..<HASH> 100644
--- a/src/Traits/ApplicationInitiatorTrait.php
+++ b/src/Traits/ApplicationInitiatorTrait.php
@@ -61,4 +61,17 @@ trait ApplicationInitiatorTrait {
}
return false;
}
+
+ /**
+ * Define environment setup.
+ *
+ * @param \Illuminate\Foundation\Application $app
+ *
+ * @return void
+ *
+ * @see \Orchestra\Testbench\Traits\ApplicationTrait
+ */
+ protected function getEnvironmentSetUp($app){
+ // Define your environment setup.
+ }
}
\ No newline at end of file | getEnvironmentSetUp() implemented in trait | aedart_testing-laravel | train | php |
2bdc704ad14f4cd664b9e62f47e82925b54d0e76 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -12,7 +12,7 @@ exports.transpile = function() {
try {
var src = ts2dart.translateFile(file.path);
file.contents = new Buffer(src);
- file.path = file.path.replace(/.ts$/, '.dart');
+ file.path = file.path.replace(/.[tj]s$/, '.dart');
done(null, file);
} catch (e) {
hadErrors = true; | Support .js extensions, too. | dart-archive_gulp-ts2dart | train | js |
fa607f43ac06b51f08bca122f96a989b39c2f257 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -527,7 +527,7 @@ else:
def run_tests(self):
import pytest
- sys.exit(pytest.main(["--pyargs", "tests"]))
+ sys.exit(pytest.main([]))
distutils_cmdclass["test"] = TestCommand | make 'setup.py test' collect tests outside the project's 'tests' folder | ovnicraft_suds2 | train | py |
fb0ccc6b7a3d3f299d719f2309cd9996f8b7c40b | diff --git a/landsat/landsat.py b/landsat/landsat.py
index <HASH>..<HASH> 100755
--- a/landsat/landsat.py
+++ b/landsat/landsat.py
@@ -362,11 +362,16 @@ def main(args):
d = Downloader(download_dir=args.dest)
try:
bands = convert_to_integer_list(args.bands)
- if args.pansharpen:
- bands.append(8)
- if args.ndvi or args.ndvigrey:
- bands = [4, 5]
+ if args.process:
+ if args.pansharpen:
+ bands.append(8)
+
+ if args.ndvi or args.ndvigrey:
+ bands = [4, 5]
+
+ if not args.bands:
+ bands = [4, 3, 2]
downloaded = d.download(args.scenes, bands) | apply pansharpen and ndvi only if -p is used | developmentseed_landsat-util | train | py |
b3fcbe7e4f96676af5a95c191a1cc480725d7bce | diff --git a/discord_test.go b/discord_test.go
index <HASH>..<HASH> 100644
--- a/discord_test.go
+++ b/discord_test.go
@@ -189,6 +189,7 @@ func TestNewUserPassToken(t *testing.T) {
}
}
+/*
func TestOpenClose(t *testing.T) {
if envToken == "" {
t.Skip("Skipping TestClose, DG_TOKEN not set")
@@ -199,6 +200,7 @@ func TestOpenClose(t *testing.T) {
t.Fatalf("TestClose, New(envToken) returned error: %+v", err)
}
+ d.Debug = true
if err = d.Open(); err != nil {
t.Fatalf("TestClose, d.Open failed: %+v", err)
}
@@ -224,6 +226,7 @@ func TestOpenClose(t *testing.T) {
t.Fatalf("TestClose, d.Close failed: %+v", err)
}
}
+*/
func TestAddHandler(t *testing.T) {
testHandlerCalled := 0 | Removed test causing odd problems.
Will debug and re-eval. | bwmarrin_discordgo | train | go |
0c7573c7dcdf181e97d7fa17fca6e16a2053abdc | diff --git a/api/settings.js b/api/settings.js
index <HASH>..<HASH> 100644
--- a/api/settings.js
+++ b/api/settings.js
@@ -50,6 +50,8 @@ function _requestAccountSettings(remote, account, callback) {
settings[field.name] = value;
}
+ settings.transaction_sequence = String(settings.transaction_sequence);
+
callback(null, settings);
});
}; | Cast transaction_sequence to a String | ripple_ripple-rest | train | js |
9af2db505ae8322d99fb7e27b7633d17d430c3d3 | diff --git a/org.carewebframework.ui-parent/org.carewebframework.ui.sharedforms/src/main/java/org/carewebframework/ui/sharedforms/ListViewForm.java b/org.carewebframework.ui-parent/org.carewebframework.ui.sharedforms/src/main/java/org/carewebframework/ui/sharedforms/ListViewForm.java
index <HASH>..<HASH> 100644
--- a/org.carewebframework.ui-parent/org.carewebframework.ui.sharedforms/src/main/java/org/carewebframework/ui/sharedforms/ListViewForm.java
+++ b/org.carewebframework.ui-parent/org.carewebframework.ui.sharedforms/src/main/java/org/carewebframework/ui/sharedforms/ListViewForm.java
@@ -85,6 +85,7 @@ public abstract class ListViewForm<DAO> extends CaptionedForm {
@Override
protected void renderItem(Listitem item, DAO object) {
+ item.addForward(Events.ON_CLICK, listbox, Events.ON_SELECT);
ListViewForm.this.renderItem(item, object);
} | Fix regression - list item click events again being processed. | carewebframework_carewebframework-core | train | java |
141864917ac920a081df6f6b34c13ba83e660bbf | diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js
index <HASH>..<HASH> 100644
--- a/src/client/actions/UserUpdate.js
+++ b/src/client/actions/UserUpdate.js
@@ -7,7 +7,7 @@ class UserUpdateAction extends Action {
handle(data) {
const client = this.client;
- const newUser = client.users.cache.get(data.id);
+ const newUser = data.id === client.user.id ? client.user : client.users.cache.get(data.id);
const oldUser = newUser._update(data);
if (!oldUser.equals(newUser)) { | fix(UserUpdateAction): rely on client.user when ids match (#<I>) | discordjs_discord.js | train | js |
4390e8d56749c653d918522363331124935859d2 | diff --git a/packages/build-tools/create-webpack-config.js b/packages/build-tools/create-webpack-config.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/create-webpack-config.js
+++ b/packages/build-tools/create-webpack-config.js
@@ -551,6 +551,7 @@ async function createWebpackConfig(buildConfig) {
},
plugins: [
new webpack.DefinePlugin(getGlobalJSData(true)),
+ new CopyWebpackPlugin(config.copy ? config.copy : []),
new MiniCssExtractPlugin({
filename: `[name]${langSuffix}.css`,
chunkFilename: `[id]${langSuffix}.css`, | fix: add copy plugin to modern JS build so that copy task runs in local dev mode | bolt-design-system_bolt | train | js |
04886032d1026063460b69f5cb9328684c622727 | diff --git a/lib/github_api/api.rb b/lib/github_api/api.rb
index <HASH>..<HASH> 100644
--- a/lib/github_api/api.rb
+++ b/lib/github_api/api.rb
@@ -38,8 +38,10 @@ module Github
end
# Creates new API
- def initialize(options = {}, &block)
+ def initialize(options={}, &block)
+ super()
options = Github.options.merge(options)
+
Configuration::VALID_OPTIONS_KEYS.each do |key|
send("#{key}=", options[key])
end | Ensure proper instantiation of api classes. | piotrmurach_github | train | rb |
f9717347a48ce778db21a78a01083a177a9f9110 | diff --git a/server/build/webpack.js b/server/build/webpack.js
index <HASH>..<HASH> 100644
--- a/server/build/webpack.js
+++ b/server/build/webpack.js
@@ -156,7 +156,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false
}
const transpiled = babelCore.transform(content, {
- presets: ['es2015'],
+ presets: [require.resolve('babel-preset-es2015')],
sourceMaps: dev ? 'both' : false,
inputSourceMap: sourceMap
}) | Resolve preset es<I> from next directory (#<I>) | zeit_next.js | train | js |
35a0f74245b88022f09ac95fc458eefe3df0b263 | diff --git a/src/system/modules/metamodelsattribute_translatedtags/languages/de/tl_metamodel_attribute.php b/src/system/modules/metamodelsattribute_translatedtags/languages/de/tl_metamodel_attribute.php
index <HASH>..<HASH> 100644
--- a/src/system/modules/metamodelsattribute_translatedtags/languages/de/tl_metamodel_attribute.php
+++ b/src/system/modules/metamodelsattribute_translatedtags/languages/de/tl_metamodel_attribute.php
@@ -9,6 +9,7 @@
* @package MetaModels
* @subpackage Backend
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
+ * @author Christian Kolb <info@kolbchristian.de>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
@@ -23,4 +24,4 @@ if (!defined('TL_ROOT'))
*/
$GLOBALS['TL_LANG']['tl_metamodel_attribute']['typeOptions']['translatedtags'] = 'Übersetzte Tags';
-?>
\ No newline at end of file
+$GLOBALS['TL_LANG']['tl_metamodel_attribute']['tag_langcolumn'] = array('Sprachenspalte', 'Bitte wählen Sie die Spalte aus, die den Sprachcode ISO 639-1 beinhaltet.'); | Add german translation
Add a german translation for the langcolumn field | MetaModels_attribute_translatedtags | train | php |
1d29621b9583e4137998d9f0c09ae59ebcfad9a8 | diff --git a/generator/templates/base/src/background.js b/generator/templates/base/src/background.js
index <HASH>..<HASH> 100644
--- a/generator/templates/base/src/background.js
+++ b/generator/templates/base/src/background.js
@@ -19,7 +19,7 @@ function createWindow () {
// Create the browser window.
win = new BrowserWindow({ width: 800, height: 600, webPreferences: {
// Use pluginOptions.nodeIntegration, leave this alone
- // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/configuration.html#node-integration for more info
+ // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
} }) | fix(templates/background): update docs link | nklayman_vue-cli-plugin-electron-builder | train | js |
a97bab2f4b3754cbd9a71610c31c8caab588612c | diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index <HASH>..<HASH> 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -781,7 +781,7 @@ Guacamole.Keyboard = function(element) {
keysym = keysym_from_charcode(next.charCode);
if (keysym) {
recentKeysym[first.keyCode] = keysym;
- first.defaultPrevented = !press_key(keysym);
+ first.defaultPrevented = next.defaultPrevented = !press_key(keysym);
return eventLog.shift();
} | GUAC-<I>: Set defaultPrevented of keypress, not just keydown. | glyptodon_guacamole-client | train | js |
d8d32f1aac293138c4668ada91f0171017ed5835 | diff --git a/message/output/email/message_output_email.php b/message/output/email/message_output_email.php
index <HASH>..<HASH> 100644
--- a/message/output/email/message_output_email.php
+++ b/message/output/email/message_output_email.php
@@ -56,8 +56,7 @@ class message_output_email extends message_output {
$result = email_to_user($eventdata->userto, $eventdata->userfrom,
$eventdata->subject, $eventdata->fullmessage, $eventdata->fullmessagehtml);
- return $result===true; //email_to_user() can return true, false or "emailstop"
- //return true;//do we want to report an error if email sending fails?
+ return ($result===true || $result=='emailstop'); //email_to_user() can return true, false or "emailstop"
}
/** | message MDL-<I> made the email message processor report success if the recipient has said they don't want to receive emails so that code sending messages isnt bothered by what looks like a failure. | moodle_moodle | train | php |
d55c73bc8ee0895ed6373fd437b5807740a322a6 | diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py
index <HASH>..<HASH> 100644
--- a/gns3server/compute/base_node.py
+++ b/gns3server/compute/base_node.py
@@ -524,10 +524,10 @@ class BaseNode:
"""
if self.ubridge_path is None:
- raise NodeError("uBridge is not available or path doesn't exist. Or you just install GNS3 and need to restart your user session to refresh user permissions.")
+ raise NodeError("uBridge is not available, path doesn't exist, or you just installed GNS3 and need to restart your user session to refresh user permissions.")
if not self._manager.has_privileged_access(self.ubridge_path):
- raise NodeError("uBridge requires root access or capability to interact with network adapters")
+ raise NodeError("uBridge requires root access or the capability to interact with network adapters")
server_config = self._manager.config.get_section_config("Server")
server_host = server_config.get("host") | Fix grammar (#<I>)
* Fixed small grammatical error
* Fixed small grammatical error | GNS3_gns3-server | train | py |
f4d44d8c8139faaaa4527e33e70716b74d45af65 | diff --git a/src/scs_core/aws/manager/configuration_check_requester.py b/src/scs_core/aws/manager/configuration_check_requester.py
index <HASH>..<HASH> 100644
--- a/src/scs_core/aws/manager/configuration_check_requester.py
+++ b/src/scs_core/aws/manager/configuration_check_requester.py
@@ -32,15 +32,15 @@ class ConfigurationCheckRequester(object):
# ----------------------------------------------------------------------------------------------------------------
def request(self, tag):
- params = {'ta': tag}
+ params = {'tag': tag}
headers = {'Authorization': self.__auth.email_address}
response = self.__http_client.get(self.__URL, headers=headers, params=params)
- print("response: %s" % response.text)
+ print("response: %s" % response)
response.raise_for_status()
- return ConfigurationCheckRequesterResponse.construct_from_jdict(response.text)
+ return ConfigurationCheckRequesterResponse.construct_from_jdict(response.json())
# ---------------------------------------------------------------------------------------------------------------- | Added ConfigurationCheckRequesterResponse | south-coast-science_scs_core | train | py |
dfa20fc68956321306c12e37ac8709bc46bc179c | diff --git a/core/src/test/java/org/infinispan/manager/CacheManagerTest.java b/core/src/test/java/org/infinispan/manager/CacheManagerTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/infinispan/manager/CacheManagerTest.java
+++ b/core/src/test/java/org/infinispan/manager/CacheManagerTest.java
@@ -152,7 +152,6 @@ public class CacheManagerTest extends AbstractInfinispanTest {
org.infinispan.config.Configuration c = new org.infinispan.config.Configuration();
c.setL1CacheEnabled(false);
c.setL1OnRehash(false);
- c.fluent().hash().numVirtualNodes(48);
c.setTransactionManagerLookup(new GenericTransactionManagerLookup());
c.setIsolationLevel(IsolationLevel.NONE);
org.infinispan.config.Configuration oneCacheConfiguration = cm.defineConfiguration("oneCache", c); | ISPN-<I> Fix CacheManagerTest failure related to numVirtualNodes. | infinispan_infinispan | train | java |
14acfffda411fcdeb698f1d362c1d9e1d00ba098 | diff --git a/devices/paulmann.js b/devices/paulmann.js
index <HASH>..<HASH> 100644
--- a/devices/paulmann.js
+++ b/devices/paulmann.js
@@ -71,6 +71,7 @@ module.exports = [
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
},
{
+ fingerprint: [{modelID: 'CCT Light', manufacturerName: 'Paulmann lamp'}],
zigbeeModel: ['CCT light', 'CCT_light', 'CCT light '],
model: '50064',
vendor: 'Paulmann', | Add CCT Light/Paulmann lamp fingerprint to <I> (#<I>)
* Add "CCT Light" model to paulmann devices
* Update paulmann.js | Koenkk_zigbee-shepherd-converters | train | js |
3483bfa747716329d8e093e8f186e01b4c5915f5 | diff --git a/core/frontend/services/theme-engine/middleware.js b/core/frontend/services/theme-engine/middleware.js
index <HASH>..<HASH> 100644
--- a/core/frontend/services/theme-engine/middleware.js
+++ b/core/frontend/services/theme-engine/middleware.js
@@ -76,7 +76,11 @@ async function haxGetMembersPriceData() {
const defaultProduct = products[0];
- const nonZeroPrices = defaultProduct.stripe_prices.filter((price) => {
+ const activePrices = defaultProduct.stripe_prices.filter((price) => {
+ return price.active;
+ });
+
+ const nonZeroPrices = activePrices.filter((price) => {
return price.amount !== 0;
}); | Updated `@price` data to not use archived prices
no-issue
Since we now allow archiving prices, we should filter them out from
being considered the monthly or yearly plan, as they are unable to be
subscribed to. | TryGhost_Ghost | train | js |
db81f02d4de4c53bf0b6076d6b816b81b74c7a76 | diff --git a/rails_event_store_active_record/lib/rails_event_store_active_record/event_repository.rb b/rails_event_store_active_record/lib/rails_event_store_active_record/event_repository.rb
index <HASH>..<HASH> 100644
--- a/rails_event_store_active_record/lib/rails_event_store_active_record/event_repository.rb
+++ b/rails_event_store_active_record/lib/rails_event_store_active_record/event_repository.rb
@@ -21,7 +21,7 @@ module RailsEventStoreActiveRecord
hashes << import_hash(record, record.serialize(serializer))
event_ids << record.event_id
end
- add_to_stream(event_ids, stream, expected_version) { @event_klass.insert_all(hashes) }
+ add_to_stream(event_ids, stream, expected_version) { @event_klass.insert_all!(hashes) }
end
def link_to_stream(event_ids, stream, expected_version)
@@ -94,7 +94,7 @@ module RailsEventStoreActiveRecord
event_ids.map.with_index do |event_id, index|
{ stream: stream.name, position: compute_position(resolved_version, index), event_id: event_id }
end
- @stream_klass.insert_all(in_stream) unless stream.global?
+ @stream_klass.insert_all!(in_stream) unless stream.global?
end
self
rescue ActiveRecord::RecordNotUnique => e | When replacing activerecord-import, don't change behaviour
<URL> | RailsEventStore_rails_event_store | train | rb |
b0815e6bb3deefd5956f98ee94e2557bbad6dc96 | diff --git a/visidata/loaders/postgres.py b/visidata/loaders/postgres.py
index <HASH>..<HASH> 100644
--- a/visidata/loaders/postgres.py
+++ b/visidata/loaders/postgres.py
@@ -52,8 +52,7 @@ def openurl_postgres(url, filetype=None):
return PgTablesSheet(dbname+"_tables", sql=SQL(conn))
-def openurl_postgresql(url, filetype):
- return openurl_postgres(url, filetype)
+openurl_postgresql=openurl_postgres
class SQL: | simplify aliasing openurl_postgres | saulpw_visidata | train | py |
d57250934e46cf9003dbfd4fb515f6d9ea87d38e | diff --git a/src/commands/view/ComponentDrag.js b/src/commands/view/ComponentDrag.js
index <HASH>..<HASH> 100644
--- a/src/commands/view/ComponentDrag.js
+++ b/src/commands/view/ComponentDrag.js
@@ -308,7 +308,7 @@ export default {
};
},
- onStart() {
+ onStart(event) {
const { target, editor, isTran, opts } = this;
const { center, onStart } = opts;
const { Canvas } = editor; | Use the right event in drag component command | artf_grapesjs | train | js |
91726c201bf91b08dcb75f8d129d1002c489b79d | diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -997,19 +997,6 @@ class RouteSetTest < ActiveSupport::TestCase
end
end
- def test_non_path_route_requirements_match_all
- set.draw do |map|
- map.connect 'page/37s', :controller => 'pages', :action => 'show', :name => /(jamis|david)/
- end
- assert_equal '/page/37s', set.generate(:controller => 'pages', :action => 'show', :name => 'jamis')
- assert_raise ActionController::RoutingError do
- set.generate(:controller => 'pages', :action => 'show', :name => 'not_jamis')
- end
- assert_raise ActionController::RoutingError do
- set.generate(:controller => 'pages', :action => 'show', :name => 'nor_jamis_and_david')
- end
- end
-
def test_recognize_with_encoded_id_and_regex
set.draw do |map|
map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /[a-zA-Z0-9\+]+/ | Relax generation requirements and only enforce the requirements used in the path segment | rails_rails | train | rb |
ed65b41f9f391c3870f33b51480a90909592b7f2 | diff --git a/kafka/config.go b/kafka/config.go
index <HASH>..<HASH> 100644
--- a/kafka/config.go
+++ b/kafka/config.go
@@ -187,6 +187,11 @@ func configConvertAnyconf(m ConfigMap, anyconf rdkAnyconf) (err error) {
func (m ConfigMap) convert() (cConf *C.rd_kafka_conf_t, err error) {
cConf = C.rd_kafka_conf_new()
+ // Set the client.software.name and .version (use librdkafka version).
+ _, librdkafkaVersion := LibraryVersion()
+ anyconfSet((*rdkConf)(cConf), "client.software.name", "confluent-kafka-go")
+ anyconfSet((*rdkConf)(cConf), "client.software.version", librdkafkaVersion)
+
err = configConvertAnyconf(m, (*rdkConf)(cConf))
if err != nil {
C.rd_kafka_conf_destroy(cConf) | KIP-<I>: Set client software name and version | confluentinc_confluent-kafka-go | train | go |
d56b860035709f289f8f9f8bddf6d214b8a81ddc | diff --git a/internal/services/machinelearning/machine_learning_compute_instance_resource.go b/internal/services/machinelearning/machine_learning_compute_instance_resource.go
index <HASH>..<HASH> 100644
--- a/internal/services/machinelearning/machine_learning_compute_instance_resource.go
+++ b/internal/services/machinelearning/machine_learning_compute_instance_resource.go
@@ -49,8 +49,8 @@ func resourceComputeInstance() *pluginsdk.Resource {
Required: true,
ForceNew: true,
ValidateFunc: validation.StringMatch(
- regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9-]{2,16}$`),
- "It can include letters, digits and dashes. It must start with a letter, end with a letter or digit, and be between 2 and 16 characters in length."),
+ regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9-]{2,23}$`),
+ "It can include letters, digits and dashes. It must start with a letter, end with a letter or digit, and be between 3 and 24 characters in length."),
},
"machine_learning_workspace_id": { | updated character length (#<I>) | terraform-providers_terraform-provider-azurerm | train | go |
2d838b83f736e803aa8db7e7ddeecfa0dcef2fb5 | diff --git a/lib/Manager/Manager.php b/lib/Manager/Manager.php
index <HASH>..<HASH> 100644
--- a/lib/Manager/Manager.php
+++ b/lib/Manager/Manager.php
@@ -106,13 +106,13 @@ class Manager implements ManagerInterface
}
// Either way, if the config is null we check the global cache
- if ($config === null) {
+ if ($config === null && $currentConfigItem !== null) {
$config = $this->cache->getItem($currentConfigItem);
if ($config !== null) {
if ($this->localCache instanceof StorageInterface) {
$this->localCache->setItem($currentConfigItem, $config);
}
- }
+ }
}
if ($config) { | Fixed an issue that may occur in an empty cache | magium_configuration-manager | train | php |
e33abd77e488be4f9a788d73828180228a2b34ce | diff --git a/tpot/base.py b/tpot/base.py
index <HASH>..<HASH> 100644
--- a/tpot/base.py
+++ b/tpot/base.py
@@ -608,9 +608,9 @@ class TPOTBase(BaseEstimator):
if not self.warm_start or not self._pareto_front:
self._pareto_front = tools.ParetoFront(similar=pareto_eq)
- # Set offspring_size equal to population_size by default
+ # Set lambda_ (offspring size in GP) equal to population_size by default
if not self.offspring_size:
- self.lambda_ = population_size
+ self.lambda_ = self.population_size
else:
self.lambda_ = self.offspring_size | update comments for lambda_ of init ref #<I> | EpistasisLab_tpot | train | py |
a2ff89e051f97ae4f08a5200da2e26b3eb6a111a | diff --git a/test/espower_option_test.js b/test/espower_option_test.js
index <HASH>..<HASH> 100644
--- a/test/espower_option_test.js
+++ b/test/espower_option_test.js
@@ -430,7 +430,7 @@ describe('sourceRoot option', function () {
function sourceRootTest (testName, config) {
it(testName, function () {
var jsCode = 'assert(falsyStr);';
- var jsAST = acorn.parse(jsCode, {ecmaVersion: 6, locations: true, sourceFile: config.path});
+ var jsAST = acorn.parse(jsCode, {ecmaVersion: 6, locations: true, sourceFile: config.incomingFilepath});
var espoweredAST = espower(jsAST, {
path: config.incomingFilepath,
sourceRoot: config.espowerSourceRoot | chore(espower): fix paths test that does not use `incomingFilepath` | power-assert-js_espower | train | js |
2d95e24462640778dea4344f727f8943c13b9150 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -48,7 +48,6 @@ setup(
],
'dev': [
'coverage>=4.5.1',
- 'factory_boy>=2.11.1',
'IPython>=7.1.1',
'mock>=2.0.0',
'pytest>=4.6.5',
@@ -92,6 +91,7 @@ setup(
'flask-session>=0.3.1',
],
'sqlalchemy': [
+ 'factory_boy>=2.11.1',
'flask-migrate>=2.5.3',
'flask-sqlalchemy-unchained>=0.7.3',
'sqlalchemy-unchained>=0.11.0', | move factory_boy to be an extras require of sqlalchemy instead of dev | briancappello_flask-unchained | train | py |
2b489f6889cac316e84d08cdf522e5b8f222900e | diff --git a/js/bleutrade.js b/js/bleutrade.js
index <HASH>..<HASH> 100644
--- a/js/bleutrade.js
+++ b/js/bleutrade.js
@@ -123,7 +123,6 @@ module.exports = class bleutrade extends bittrex {
},
'options': {
'parseOrderStatus': true,
- 'disableNonce': false,
'symbolSeparator': '_',
},
}); | [bleutrade] removed disableNonce flag as its not supported by the exchange anymore (now that you can generate multiples api keys) | ccxt_ccxt | train | js |
54309deff0d3bbc30f0c2bd47b68a3e3931473a6 | diff --git a/src/dawguk/GarminConnect/Connector.php b/src/dawguk/GarminConnect/Connector.php
index <HASH>..<HASH> 100755
--- a/src/dawguk/GarminConnect/Connector.php
+++ b/src/dawguk/GarminConnect/Connector.php
@@ -88,6 +88,9 @@ class Connector
$strUrl .= '?' . http_build_query($arrParams);
}
+ curl_setopt($this->objCurl, CURLOPT_HTTPHEADER, array(
+ 'NK: NT'
+ ));
curl_setopt($this->objCurl, CURLOPT_URL, $strUrl);
curl_setopt($this->objCurl, CURLOPT_FOLLOWLOCATION, (bool)$bolAllowRedirects);
curl_setopt($this->objCurl, CURLOPT_CUSTOMREQUEST, 'GET');
@@ -130,7 +133,6 @@ class Connector
if (! empty($arrParams)) {
$strUrl .= '?' . http_build_query($arrParams);
}
-
curl_setopt($this->objCurl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($this->objCurl, CURLOPT_HEADER, false);
curl_setopt($this->objCurl, CURLOPT_FRESH_CONNECT, true); | fix: <I> response code on get calls | dawguk_php-garmin-connect | train | php |
8ed3f6048d8f8339693bd1196cf1806cafd0c398 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -53,6 +53,7 @@ setup(
'flask-components >= 0.1',
'sqlalchemy >= 0.8',
'sqlalchemy-utils >= 0.16',
+ 'alembic >= 0.6, < 0.7',
'pytest >= 2.4',
'pytest-pep8 >= 1.0',
'pytest-cov >= 1.6', | Add alembic as a requirement. | concordusapps_alchemist | train | py |
aa944588ff5ac076cb2ac7eabf58d718ce8090e8 | diff --git a/lib/filelib.php b/lib/filelib.php
index <HASH>..<HASH> 100644
--- a/lib/filelib.php
+++ b/lib/filelib.php
@@ -342,7 +342,9 @@ function download_file_content($url, $headers=null, $postdata=null, $fullrespons
}
// check if proxy (if used) should be bypassed for this url
- $proxybypass = is_proxybypass( $url );
+ $proxybypass = is_proxybypass($url);
+
+ $ch = curl_init($url);
// set extra headers
if (is_array($headers) ) { | MDL-<I> - fixed regressions - missing $ch | moodle_moodle | train | php |
2596fe2de51460bbaedc8e1334181a9eb3c783c4 | diff --git a/lib/node_modules/@stdlib/repl/lib/namespace/b.js b/lib/node_modules/@stdlib/repl/lib/namespace/b.js
index <HASH>..<HASH> 100644
--- a/lib/node_modules/@stdlib/repl/lib/namespace/b.js
+++ b/lib/node_modules/@stdlib/repl/lib/namespace/b.js
@@ -683,6 +683,14 @@ ns.push({
});
ns.push({
+ 'alias': 'base.dist.betaprime.BetaPrime',
+ 'path': '@stdlib/math/base/dist/betaprime/ctor',
+ 'value': require( '@stdlib/math/base/dist/betaprime/ctor' ),
+ 'type': 'Function',
+ 'related': []
+});
+
+ns.push({
'alias': 'base.dist.betaprime.cdf',
'path': '@stdlib/math/base/dist/betaprime/cdf',
'value': require( '@stdlib/math/base/dist/betaprime/cdf' ), | Add beta prime constructor to REPL | stdlib-js_stdlib | train | js |
c6bf1e3c11216189d183374fd3a21eccac698dd7 | diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -208,7 +208,7 @@ func main() {
return
}
- if len(args) < 1 {
+ if len(args) != 1 {
usage()
os.Exit(2)
} | fail on too many arguments; only the first one is used | appc_docker2aci | train | go |
fda950498dfe6baed2b0317ec4da2d0349319537 | diff --git a/GVRf/Framework/src/org/gearvrf/utility/FileNameUtils.java b/GVRf/Framework/src/org/gearvrf/utility/FileNameUtils.java
index <HASH>..<HASH> 100644
--- a/GVRf/Framework/src/org/gearvrf/utility/FileNameUtils.java
+++ b/GVRf/Framework/src/org/gearvrf/utility/FileNameUtils.java
@@ -114,7 +114,7 @@ public class FileNameUtils {
int lastSlashIndex = path.lastIndexOf("/");
String directory = lastSlashIndex == -1 ? "" : path.substring(0, lastSlashIndex);
return String.format("%s://%s%s%s%s", url.getProtocol(),
- url.getUserInfo() == null ? "" : url.getUserInfo(),
+ url.getUserInfo() == null ? "" : url.getUserInfo() + "@",
url.getHost(),
url.getPort() == -1 ? "" : Integer.toString(url.getPort()),
directory); | Adding missing '@' after userinfo in URL | Samsung_GearVRf | train | java |
7af44c569be668d1a1f0e346b583844105ce9b78 | diff --git a/lib/FeatureServices.js b/lib/FeatureServices.js
index <HASH>..<HASH> 100644
--- a/lib/FeatureServices.js
+++ b/lib/FeatureServices.js
@@ -39,7 +39,7 @@ module.exports = {
var self = this;
var fields = [];
Object.keys( props ).forEach(function( key ){
- var type = (( idField && key == idField ) ? 'esriFieldTypeOID' : self.fieldType( props[ key ] ));
+ var type = (( idField && key == idField ) ? 'esriFieldTypeOID' : (self.fieldType( props[ key ])||'esriFieldTypeString') );
if (type){
var fld = {
name: key,
@@ -75,6 +75,7 @@ module.exports = {
} else {
template.fields = [];
}
+ console.log(template.fields)
return template;
}, | null values cast as strings in featureservice fields | koop-retired_koop-server | train | js |
410908d10856700ab916b93dbb3dc78f812b2b9b | diff --git a/resources/views/menu/group.blade.php b/resources/views/menu/group.blade.php
index <HASH>..<HASH> 100644
--- a/resources/views/menu/group.blade.php
+++ b/resources/views/menu/group.blade.php
@@ -1,5 +1,5 @@
-@if (isset($group['children']) && count($group['children']))
+@if (count($group->children()))
<?php
$levelClass = ''; | Small cleanup of children menu node reference | czim_laravel-cms-theme | train | php |
c64f0b48fcf244be82383b7b569284eac5996f14 | diff --git a/fabfile.py b/fabfile.py
index <HASH>..<HASH> 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -678,6 +678,10 @@ def docker(subtask='info'):
docker_configuration = all_docker_hosts[config_name]
+ if 'inheritsFrom' in docker_configuration and docker_configuration['inheritsFrom'] in all_docker_hosts:
+ base_configuration = all_docker_hosts[docker_configuration['inheritsFrom']]
+ docker_configuration = data_merge(base_configuration, docker_configuration)
+
keys = ("host", "port", "user", "tasks", "rootFolder")
validate_dict(keys, docker_configuration, 'dockerHosts-Configuraton '+config_name+' has missing key') | implement inheritsFrom for dockerHosts | factorial-io_fabalicious | train | py |
800be3446959a750257539261e8aebb608421688 | diff --git a/color.js b/color.js
index <HASH>..<HASH> 100644
--- a/color.js
+++ b/color.js
@@ -329,7 +329,7 @@ Color.prototype = {
Color.prototype.getValues = function(space) {
var vals = {};
for (var i = 0; i < space.length; i++) {
- vals[space[i]] = this.values[space][i];
+ vals[space.charAt(i)] = this.values[space][i];
}
if (this.values.alpha != 1) {
vals["a"] = this.values.alpha;
@@ -364,10 +364,10 @@ Color.prototype.setValues = function(space, vals) {
this.values[space] = vals.slice(0, space.length);
alpha = vals[space.length];
}
- else if (vals[space[0]] !== undefined) {
+ else if (vals[space.charAt(0)] !== undefined) {
// {r: 10, g: 10, b: 10}
for (var i = 0; i < space.length; i++) {
- this.values[space][i] = vals[space[i]];
+ this.values[space][i] = vals[space.charAt(i)];
}
alpha = vals.a;
} | access to string's char with '.charAt)()' method (makr ie8 compatible) | Qix-_color | train | js |
312371475f0e893bcef43bdbbe024b1a1e4cf703 | diff --git a/OrgLinkoScope.php b/OrgLinkoScope.php
index <HASH>..<HASH> 100755
--- a/OrgLinkoScope.php
+++ b/OrgLinkoScope.php
@@ -148,7 +148,7 @@ class OrgLinkoScope implements iLinkoScope
public function getComments($postId)
{
- $sort = ['orderby' => 'karma'];
+ $sort = ['orderby' => 'karma', 'type' => 'linkoscope_comment'];
$results = $this->api->listComments($postId, $sort);
return $this->apiToComments($results);
}
@@ -272,6 +272,7 @@ class OrgLinkoScope implements iLinkoScope
'status' => 'publish',
'karma' => $comment->score,
'linkoscope_likes' => implode(';', $comment->likeList ?: []),
+ 'type' => 'linkoscope_comment',
];
}
} | Use special comment type for linkoscope comments
This will allow us to seperate linkoscope specfic comments from regular comments | ShortCirquit_LinkoScopeApi | 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.