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 |
|---|---|---|---|---|---|
d6798d76ce2d4ff07dd268000ee2f6f03d233a89 | diff --git a/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php b/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php
index <HASH>..<HASH> 100644
--- a/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php
+++ b/src/SQL/Builder/DropSchemaObjectsSQLBuilder.php
@@ -29,7 +29,6 @@ final class DropSchemaObjectsSQLBuilder
return array_merge(
$this->buildTableStatements($schema->getTables()),
$this->buildSequenceStatements($schema->getSequences()),
- $this->buildNamespaceStatements($schema->getNamespaces()),
);
}
@@ -60,24 +59,4 @@ final class DropSchemaObjectsSQLBuilder
return $statements;
}
-
- /**
- * @param list<string> $namespaces
- *
- * @return list<string>
- *
- * @throws Exception
- */
- private function buildNamespaceStatements(array $namespaces): array
- {
- $statements = [];
-
- if ($this->platform->supportsSchemas()) {
- foreach ($namespaces as $namespace) {
- $statements[] = $this->platform->getDropSchemaSQL($namespace);
- }
- }
-
- return $statements;
- }
} | Do not drop schemas in DropSchemaObjectsSQLBuilder
Although `CreateSchemaSqlCollector` creates the namespaces declared
in the schema, `DropSchemaObjectsSQLBuilder` does not drop them.
We will keep it the same in `DropSchemaObjectsSQLBuilder` for backward
compatibility. | doctrine_dbal | train | php |
7ab493d18bab0322b2599338af0d83f5043b426e | diff --git a/src/viewer.js b/src/viewer.js
index <HASH>..<HASH> 100644
--- a/src/viewer.js
+++ b/src/viewer.js
@@ -427,7 +427,7 @@ $.Viewer = function( options ) {
}
// Add updatePixelDensityRatio to resize event
- $.addEvent( window, 'resize', this.updatePixelDensityRatio.bind(this) );
+ $.addEvent( window, 'resize', this._updatePixelDensityRatio.bind(this) );
//Instantiate a navigator if configured
if ( this.showNavigator){
@@ -1614,8 +1614,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/**
* Update pixel density ration, clears all tiles and triggers updates for
* all items.
+ * @private
*/
- updatePixelDensityRatio: function() {
+ _updatePixelDensityRatio: function() {
var previusPixelDensityRatio = $.pixelDensityRatio;
var currentPixelDensityRatio = $.getCurrentPixelDensityRatio();
if (previusPixelDensityRatio !== currentPixelDensityRatio) { | fix: made updatePixelDensityRatio private
Prefixed it with a underscore and added @private annotation | openseadragon_openseadragon | train | js |
e914969e4c5d3269cc54d174983ba9e504f1d5d9 | diff --git a/models/user.go b/models/user.go
index <HASH>..<HASH> 100644
--- a/models/user.go
+++ b/models/user.go
@@ -91,7 +91,7 @@ type User struct {
// Counters
NumFollowers int
- NumFollowing int `xorm:"NOT NULL"`
+ NumFollowing int `xorm:"NOT NULL DEFAULT 0"`
NumStars int
NumRepos int | Add default for NumFollowing field (fixes #<I>)
We set the default value for the non-NULL field NumFollowing of the User
model to 0, which stops an error when the ORM tries to sync. | gogs_gogs | train | go |
7093d47664ca6af3604d696f698bf7fb163a47ef | diff --git a/code/product/variations/ProductVariation.php b/code/product/variations/ProductVariation.php
index <HASH>..<HASH> 100644
--- a/code/product/variations/ProductVariation.php
+++ b/code/product/variations/ProductVariation.php
@@ -140,15 +140,12 @@ class ProductVariation extends DataObject implements Buyable {
return $title;
}
- //this is used by TableListField to access attribute values.
- public function AttributeProxy(){
- $do = new DataObject();
- if($this->AttributeValues()->exists()){
- foreach($this->AttributeValues() as $value){
- $do->{'Val'.$value->Type()->Name} = $value->Value;
- }
- }
- return $do;
+ public function getCategoryIDs() {
+ return $this->Product() ? $this->Product()->getCategoryIDs() : array();
+ }
+
+ public function getCategories() {
+ return $this->Product() ? $this->Product()->getCategories() : new ArrayList();
}
public function canPurchase($member = null, $quantity = 1) { | FIX: added missing getCategoryIDs and getCategories functions to ProductVariations.
relates to 7eee4a<I>c<I>cf<I>a<I>d<I>f7a5c8c<I>fa | silvershop_silvershop-core | train | php |
e591aa651b2322b6050e53bb3d4d5a24996852a0 | diff --git a/mpop/imageo/geo_image.py b/mpop/imageo/geo_image.py
index <HASH>..<HASH> 100644
--- a/mpop/imageo/geo_image.py
+++ b/mpop/imageo/geo_image.py
@@ -244,6 +244,16 @@ class GeoImage(mpop.imageo.image.Image):
def add_overlay(self, color = (0, 0, 0)):
"""Add coastline and political borders to image, using *color*.
"""
+ import warnings
+ warnings.warn(
+ """The GeoImage.add_overlay method is deprecated and should not be
+ used anymore. To add coastlines, borders and rivers to your images,
+ use pycoast instead:
+ http://pycoast.googlecode.com
+ """,
+ DeprecationWarning)
+
+
import acpgimage
import _acpgpilext
import pps_array2image | Deprecating add_overlay in favor of pycoast. | pytroll_satpy | train | py |
fef3be63070194a45a3b85ae15d9b5230e9b596a | diff --git a/lib/action_pager/pager.rb b/lib/action_pager/pager.rb
index <HASH>..<HASH> 100644
--- a/lib/action_pager/pager.rb
+++ b/lib/action_pager/pager.rb
@@ -15,6 +15,11 @@ module ActionPager
end
def scoped
+ warn "[DEPRECATION] `scoped` is deprecated. Please use `current_collection` instead."
+ current_collection
+ end
+
+ def current_collection
if collection.is_a?(Array)
collection.drop(offset).first(per_page)
else # for ActiveRecord::Relation and other OR mapper collections | deprecate scoped method in favor of current_collection | ryohashimoto_actionpager | train | rb |
e0580e6e76e7d48539b080c1b3cbd0f04122e606 | diff --git a/prestans/types.py b/prestans/types.py
index <HASH>..<HASH> 100644
--- a/prestans/types.py
+++ b/prestans/types.py
@@ -1023,6 +1023,9 @@ class Model(DataCollection):
minified_keys = minified_keys + sublist
overflow = overflow - len(sublist)
+ if prefix == '':
+ minified_keys.sort(key=len, reverse=False)
+
return minified_keys | Refined alogrithm for rewriting | anomaly_prestans | train | py |
eab7d8ec165e8182e4d30b3e856d599ea209ca23 | diff --git a/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php b/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php
index <HASH>..<HASH> 100644
--- a/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php
+++ b/classes/Gems/Tracker/Snippets/ImportTrackSnippetAbstract.php
@@ -543,7 +543,7 @@ class ImportTrackSnippetAbstract extends \MUtil_Snippets_WizardFormSnippetAbstra
* Set what to do when the form is 'finished'.
*
* @return \MUtil_Snippets_Standard_ModelImportSnippet
- * /
+ */
protected function setAfterSaveRoute()
{
$filename = $this->getExportBatch(false)->getSessionVariable('filename');
@@ -568,7 +568,7 @@ class ImportTrackSnippetAbstract extends \MUtil_Snippets_WizardFormSnippetAbstra
* Performs the validation.
*
* @return boolean True if validation was OK and data should be saved.
- * /
+ */
protected function validateForm()
{
if (2 == $this->currentStep) { | Update ImportTrackSnippetAbstract.php
Removed extra space at the end of the docblock to fix syntax highlighting | GemsTracker_gemstracker-library | train | php |
2086d5356596e9e4443915cee816a7e7a2a59179 | diff --git a/client/js/app/stores/ExplorerStore.js b/client/js/app/stores/ExplorerStore.js
index <HASH>..<HASH> 100644
--- a/client/js/app/stores/ExplorerStore.js
+++ b/client/js/app/stores/ExplorerStore.js
@@ -126,8 +126,10 @@ function _create(attrs) {
function _update(id, updates) {
var newModel = _.assign({}, _explorers[id], updates);
+ // If we're no longer doing an email extraction, remove the latest and email field.
if (!_.isNull(newModel.query.latest) && !ExplorerUtils.isEmailExtraction(newModel)) {
newModel.query.latest = null;
+ newModel.query.email = null;
}
if (updates.id && updates.id !== id) {
_explorers[updates.id] = newModel; | Clear email field after analysis type changes from extraction to something else. | keen_explorer | train | js |
02d0548ba621ce260c1f5ad6d6f6d1ad601abb36 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,7 @@
-from setuptools import setup
+from distutils.core import setup
+
+with open('README.md') as file:
+ long_description = file.read()
setup(
name='boatd_client',
@@ -6,13 +9,12 @@ setup(
author='Louis Taylor',
author_email='kragniz@gmail.com',
description=('Python wrapper for the boatd API, used to write behavior scripts.'),
+ long_description=long_description,
license='GPL',
keywords='boat sailing wrapper rest',
url='https://github.com/boatd/python-boatd',
packages=['boatd_client'],
requires=['docopt'],
- test_requires=['nose', 'HTTPretty'],
- test_suite='nose.collector',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers', | Update setup.py for pypi | boatd_python-boatd | train | py |
b0b3913973b592fa3ced5ba2cfaf12f615d71e68 | diff --git a/lib/Model/Table.php b/lib/Model/Table.php
index <HASH>..<HASH> 100644
--- a/lib/Model/Table.php
+++ b/lib/Model/Table.php
@@ -623,10 +623,11 @@ class Model_Table extends Model {
$this->hook('afterModify');
if($this->_save_as===false)return $this->unload();
+ $id=$this->id;
if($this->_save_as)$this->unload();
$o=$this->_save_as?:$this;
- return $o->load($this->id);
+ return $o->load($id);
}
/** @obsolete. Use set() then save(). */
function update($data=array()){ // obsolete | $model->saveAs() don't load record back
saveAs can't load data record at the end, because it's unloaded first and later we try to load it back, but $this->id is not defined anymore. | atk4_atk4 | train | php |
b64e21b6ba139ac6f03c5950d416e069dadf4671 | diff --git a/src/Recorder.php b/src/Recorder.php
index <HASH>..<HASH> 100644
--- a/src/Recorder.php
+++ b/src/Recorder.php
@@ -62,7 +62,7 @@ class Recorder
if ($configurationFile) {
$this->loadConfig($configurationFile);
}
- $this->formatter = new ResponseFormatter($this->config['marker_header']);
+ $this->formatter = new ResponseFormatter(isset($this->config['marker_header']) ? $this->config['marker_header'] : false);
}
/** | Fix checking for marker_header when no config file supplied. | ikwattro_guzzle-stereo | train | php |
93529fb22d7efff2edd6bb23e2e4ca42fc2088f5 | diff --git a/src/main/java/hex/rf/RandomForest.java b/src/main/java/hex/rf/RandomForest.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hex/rf/RandomForest.java
+++ b/src/main/java/hex/rf/RandomForest.java
@@ -173,7 +173,7 @@ public class RandomForest {
strata,
ARGS.verbose,
ARGS.exclusive);
- DRF drf = (DRF) drfResult.get(); // block on all nodes!
+ DRF drf = drfResult.get(); // block on all nodes!
RFModel model = UKV.get(modelKey, new RFModel());
Utils.pln("[RF] Random forest finished in "+ drf._t_main); | Unnecessary cast removed. | h2oai_h2o-2 | train | java |
06d14312270acdab8cdb9d67ca7be29b045f683b | diff --git a/src/AssertInterface.php b/src/AssertInterface.php
index <HASH>..<HASH> 100644
--- a/src/AssertInterface.php
+++ b/src/AssertInterface.php
@@ -4,6 +4,7 @@ namespace Peridot\Leo;
use \Exception;
use Peridot\Leo\Formatter\Formatter;
use Peridot\Leo\Matcher\EqualMatcher;
+use Peridot\Leo\Matcher\ExceptionMatcher;
use Peridot\Leo\Matcher\SameMatcher;
class AssertInterface
@@ -41,18 +42,14 @@ class AssertInterface
}
}
- public function throws(callable $actual, $exceptionType, $exceptionMessage = '')
+ public function throws(callable $func, $exceptionType, $exceptionMessage = '')
{
- try {
- call_user_func_array($actual, $this->arguments);
- } catch (Exception $e) {
- $message = $e->getMessage();
- if ($exceptionMessage && $exceptionMessage != $message) {
- throw new Exception("wrong exception message");
- }
- if (!$e instanceof $exceptionType) {
- throw new Exception("no exception");
- }
+ $matcher = new ExceptionMatcher($func);
+ $matcher->setExpectedMessage($exceptionMessage);
+ $match = $matcher->match($exceptionType);
+ $this->formatter->setMatch($match);
+ if (! $match->isMatch()) {
+ throw new Exception($this->formatter->getMessage($matcher->getTemplate()));
}
} | use ExceptionMatcher in AssertInterface | peridot-php_leo | train | php |
21c1ca7b535648ef3e73e41b719030456b1333c4 | diff --git a/backupdb/management/commands/restoredb.py b/backupdb/management/commands/restoredb.py
index <HASH>..<HASH> 100644
--- a/backupdb/management/commands/restoredb.py
+++ b/backupdb/management/commands/restoredb.py
@@ -6,7 +6,6 @@ import os
from django.core.management.base import CommandError
from django.conf import settings
-from django.db import close_connection
from backupdb.utils.commands import BaseBackupDbCommand
from backupdb.utils.exceptions import RestoreError
@@ -54,16 +53,11 @@ class Command(BaseBackupDbCommand):
'understanding how restoration is failing in the case that it '
'is.'
),
- ),
- )
+ )
def handle(self, *args, **options):
super(Command, self).handle(*args, **options)
- # Django is querying django_content_types in a hanging transaction
- # Because of this psql can't drop django_content_types and just hangs
- close_connection()
-
# Ensure backup dir present
if not os.path.exists(BACKUP_DIR):
raise CommandError("Backup dir '{0}' does not exist!".format(BACKUP_DIR)) | Fix restoredb for newer versions of Django
close_connection has been gone since Django <I>. The code seems to run
fine without it though! Whatever hanging transaction was happening
before seems to no longer be an issue. | fusionbox_django-backupdb | train | py |
84de79036e2196125524b88f806ac237f2d8a978 | diff --git a/graphdb/SQLiteGraphDB/__init__.py b/graphdb/SQLiteGraphDB/__init__.py
index <HASH>..<HASH> 100644
--- a/graphdb/SQLiteGraphDB/__init__.py
+++ b/graphdb/SQLiteGraphDB/__init__.py
@@ -120,10 +120,12 @@ class SQLiteGraphDB(object):
''' sqlite based graph database for storing native python objects and their relationships to each other '''
def __init__(self, path=':memory:', autostore=True, autocommit=True):
+ assert isinstance(autostore, bool), autostore # autostore needs to be a boolean
+ assert isinstance(autocommit, bool), autocommit # autocommit needs to be a boolean
if path != ':memory:':
self._create_file(path)
self._state = read_write_state_machine()
- self._autostore = True
+ self._autostore = autostore
self._autocommit = autocommit
self._path = path
self._connections = better_default_dict(lambda s=self:sqlite3.connect(s._path))
@@ -173,7 +175,7 @@ class SQLiteGraphDB(object):
@staticmethod
def _create_file(path=''):
''' creates a file at the given path and sets the permissions to user only read/write '''
- from os.path import isfile
+ assert isinstance(path, str), path # path needs to be a string
if not isfile(path): # only do the following if the file doesn't exist yet
from os import chmod
from stat import S_IRUSR, S_IWUSR | added some type safety, better imports and fixed autostore | CodyKochmann_graphdb | train | py |
7b9e6b2507fe353eccfd58f8c0122defcdf7f7bf | diff --git a/test/rails_app/app/models/user.rb b/test/rails_app/app/models/user.rb
index <HASH>..<HASH> 100644
--- a/test/rails_app/app/models/user.rb
+++ b/test/rails_app/app/models/user.rb
@@ -30,7 +30,6 @@ class User < PARENT_MODEL_CLASS
validates_presence_of :encrypted_password, :if => :password_required?
end
- include ::ActiveModel::MassAssignmentSecurity
devise :database_authenticatable, :registerable, :validatable, :confirmable, :invitable, :recoverable
attr_accessor :callback_works, :bio | remove ::ActiveModel::MassAssignmentSecurity from tests | scambra_devise_invitable | train | rb |
2be4e06997c4e7a176b62b824a7bda473d8f3a5e | diff --git a/activerecord/lib/active_record/middleware/database_selector/resolver.rb b/activerecord/lib/active_record/middleware/database_selector/resolver.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/middleware/database_selector/resolver.rb
+++ b/activerecord/lib/active_record/middleware/database_selector/resolver.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require "active_record/middleware/database_selector/resolver/session"
+require "active_support/core_ext/numeric/time"
module ActiveRecord
module Middleware | Make AR::Middleware::DatabaseSelector loadable without full core ext | rails_rails | train | rb |
41f7b98164e72802cdffb0d81836d74b48482322 | diff --git a/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js b/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js
+++ b/packages/bonde-admin-canary/src/components/Form/FormGraphQL.js
@@ -102,6 +102,7 @@ export class FormGraphQLv2 extends React.Component {
}
FormGraphQLv2.propTypes = {
+ children: PropTypes.node,
mutation: PropTypes.func.isRequired,
mutationVariables: PropTypes.object,
query: PropTypes.func, | chore(admin-canary): eslint propTypes FormGraphQL | nossas_bonde-client | train | js |
fc5f3c2fcc1ca8686ba2d42fada5e73a24cb48dc | diff --git a/src/models/room-member.js b/src/models/room-member.js
index <HASH>..<HASH> 100644
--- a/src/models/room-member.js
+++ b/src/models/room-member.js
@@ -298,6 +298,12 @@ function calculateDisplayName(selfUserId, displayName, roomState) {
return selfUserId;
}
+ // First check if the displayname is something we consider truthy
+ // after stripping it of zero width characters and padding spaces
+ if (!utils.removeHiddenChars(displayName)) {
+ return selfUserId;
+ }
+
if (!roomState) {
return displayName;
} | re-add empty check after removing hidden chars | matrix-org_matrix-js-sdk | train | js |
2f844f8efbf256c89dedc4df5935b548d3f1f47d | diff --git a/src/org/zaproxy/zap/view/ScanPanel.java b/src/org/zaproxy/zap/view/ScanPanel.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/view/ScanPanel.java
+++ b/src/org/zaproxy/zap/view/ScanPanel.java
@@ -526,11 +526,7 @@ public abstract class ScanPanel extends AbstractPanel {
getStartScanButton().setEnabled(false);
getStopScanButton().setEnabled(true);
getPauseScanButton().setEnabled(true);
- if (scanThread.isPaused()) {
- getPauseScanButton().setSelected(true);
- } else {
- getPauseScanButton().setSelected(false);
- }
+ getPauseScanButton().setSelected(scanThread.isPaused());
getProgressBar().setEnabled(true);
} else {
resetScanButtonsAndProgressBarStates(true); | Tidy up, replaced, in ScanPanel, an (unnecessary) if statement with direct use of the evaluated boolean value. | zaproxy_zaproxy | train | java |
a098c527dc775e1bf1fa827fe5f4b5f0f66637ba | diff --git a/spec/policies/renalware/event_type_policy_spec.rb b/spec/policies/renalware/event_type_policy_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/policies/renalware/event_type_policy_spec.rb
+++ b/spec/policies/renalware/event_type_policy_spec.rb
@@ -5,7 +5,7 @@ module Renalware
describe EventTypePolicy, type: :policy do
subject { described_class }
- permissions :new? do
+ permissions :new?, :create?, :index?, :edit?, :destroy? do
it "grants access if user super_admin" do
expect(subject).to permit(FactoryGirl.create(:user, :super_admin))
end
@@ -17,6 +17,10 @@ module Renalware
it "denies access if user clinician" do
expect(subject).to_not permit(FactoryGirl.create(:user, :clinician))
end
+
+ it "denies access if user read_only" do
+ expect(subject).to_not permit(FactoryGirl.create(:user, :read_only))
+ end
end
end | Added remaining actions for event_type policy permissions. | airslie_renalware-core | train | rb |
a02aae9d6ba5bc0ccd1940435e040f1a9055da1a | diff --git a/order/client_test.go b/order/client_test.go
index <HASH>..<HASH> 100644
--- a/order/client_test.go
+++ b/order/client_test.go
@@ -144,6 +144,8 @@ func TestOrder(t *testing.T) {
if o.Meta["foo"] != "bar" {
t.Error("Order metadata not set")
}
+
+ coupon.Del(c.ID)
}
func TestOrderUpdate(t *testing.T) { | Properly delete the coupon at the end of the test. | stripe_stripe-go | train | go |
ec1dec8e077300aec37bc8c7ed316fd571047a9b | diff --git a/fontbakery-check-ttf.py b/fontbakery-check-ttf.py
index <HASH>..<HASH> 100755
--- a/fontbakery-check-ttf.py
+++ b/fontbakery-check-ttf.py
@@ -1144,7 +1144,9 @@ def main():
# ----------------------------------------------------
fb.new_check("Checking fsSelection REGULAR bit")
check_bit_entry(font, "OS/2", "fsSelection",
- "Regular" in style,
+ "Regular" in style or \
+ (style in STYLE_NAMES and
+ style not in RIBBI_STYLE_NAMES),
bitmask=FSSEL_REGULAR,
bitname="REGULAR") | fixing criteria to fsSelection REGULAR bit check
issue #<I> | googlefonts_fontbakery | train | py |
2151cc0c8bf89fa120df3619b7a6db9c7a91eac5 | diff --git a/smartfilesorter/actionrules/moveto.py b/smartfilesorter/actionrules/moveto.py
index <HASH>..<HASH> 100644
--- a/smartfilesorter/actionrules/moveto.py
+++ b/smartfilesorter/actionrules/moveto.py
@@ -26,15 +26,19 @@ class MoveTo(ActionRule):
# If the file exists in the destination directory, append _NNN to the name where NNN is
# a zero padded number. Starts at _001
while os.path.exists(new_filename):
- # if filename ends in _NNN, start there
+ # if filename ends in _NNN, start at that number
filename, extension = os.path.splitext(os.path.basename(new_filename))
if filename[-4] == '_' and filename[-3:].isdigit():
- current = int(filename[-3:]) + 1
+ # Split the number off the filename and increment it, handle suffixes longer than 3 numbers
+ current = filename.split('_')[-1]
+ filename_root = filename[0:-len(current)]
+ current = int(current) + 1
new_filename = os.path.join(self.destination,
- (filename[:-4] +
+ (filename_root +
"_{0:03d}".format(current) +
extension))
else:
+ # No number suffix found in the filename, just start at _001
new_filename = os.path.join(self.destination,
(filename + "_001" + extension)) | MoveTo - better number handling
Better handling for number suffixes in filename. Now will handle numbers > <I>, by extending them. Ex: _<I>.txt, _<I>.txt, _<I>.txt, etc) | jashort_SmartFileSorter | train | py |
52265b622d0acdabf4dd94380bea2fb5221b9f26 | diff --git a/filestore/filestore.go b/filestore/filestore.go
index <HASH>..<HASH> 100644
--- a/filestore/filestore.go
+++ b/filestore/filestore.go
@@ -54,6 +54,7 @@ func (store FileStore) UseIn(composer *tusd.StoreComposer) {
composer.UseGetReader(store)
composer.UseTerminater(store)
composer.UseLocker(store)
+ composer.UseConcater(store)
}
func (store FileStore) NewUpload(info tusd.FileInfo) (id string, err error) { | Expose concatenation support in filestore | tus_tusd | train | go |
ab70d5e3ad88029c8104e9073070de7b3e594342 | diff --git a/test/client.js b/test/client.js
index <HASH>..<HASH> 100644
--- a/test/client.js
+++ b/test/client.js
@@ -203,6 +203,17 @@ describe('Client Unit Tests', function() {
});
});
+ describe('#images', function() {
+ it('should have image object', function(){
+ smartsheet.should.have.property('images');
+ Object.keys(smartsheet.images).should.be.length(1);
+ });
+
+ it('should have get methods', function() {
+ smartsheet.images.should.have.property('listImageUrls');
+ });
+ });
+
describe('#search', function () {
it('should have search object', function () {
smartsheet.should.have.property('search'); | Update sanity tests to include the 'images' object. | smartsheet-platform_smartsheet-javascript-sdk | train | js |
7eb8eec58fa6742cea7c92846b15c4f2cc63652f | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -46,8 +46,10 @@ function ApiClient(config) {
// add each model to the ApiClient
Object.keys(models).forEach(function(modelName) {
- self.__defineGetter__(modelName, function(){
- return models[modelName](self)
+ Object.defineProperty(self, modelName, {
+ get: function() { return models[modelName](self) },
+ enumerable:true,
+ configurable:true
})
})
_.extend(this, models) | changed how getters are being defined to the more standards complient defineProperty | sportngin_ngin_client_node | train | js |
d212b278a954c452c0faba346cfaf6dd70373899 | diff --git a/builtin/providers/cloudstack/resource_cloudstack_vpc.go b/builtin/providers/cloudstack/resource_cloudstack_vpc.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/cloudstack/resource_cloudstack_vpc.go
+++ b/builtin/providers/cloudstack/resource_cloudstack_vpc.go
@@ -161,7 +161,10 @@ func resourceCloudStackVPCRead(d *schema.ResourceData, meta interface{}) error {
p := cs.Address.NewListPublicIpAddressesParams()
p.SetVpcid(d.Id())
p.SetIssourcenat(true)
- p.SetProjectid(v.Projectid)
+ if project, ok := d.GetOk("project"); ok {
+ p.SetProjectid(v.Projectid)
+ }
+
l, e := cs.Address.ListPublicIpAddresses(p)
if (e == nil) && (l.Count == 1) {
d.Set("source_nat_ip", l.PublicIpAddresses[0].Ipaddress) | Only set projectID if it is set | hashicorp_terraform | train | go |
52ffdca39c5fe1bdee3f1bd588b188579299ca66 | diff --git a/lems/sim/runnable.py b/lems/sim/runnable.py
index <HASH>..<HASH> 100644
--- a/lems/sim/runnable.py
+++ b/lems/sim/runnable.py
@@ -187,6 +187,9 @@ class Runnable(Reflective):
#print sorted(self.__dict__.keys())
#print ".........."
#print self.__dict__[group_name]
+ # Force group_name attribute to be a list before we append to it.
+ if type(self.__dict__[group_name]) is not list:
+ self.__dict__[group_name] = [self.__dict__[group_name]]
self.__dict__[group_name].append(child)
child.parent = self | Check if group_name corresponds to a list before adding to that list | LEMS_pylems | train | py |
8d370e82821d9681e797a9f12d32cd346cc94813 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ setup(
url="https://github.com/sergey-aganezov-jr/bg",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
- "License :: OSI Approved :: GPLv3",
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3', | fixed unsupported classifiers in setup.py files | aganezov_bg | train | py |
8f8297c02b3ef21efc60e5da860183da42afce30 | diff --git a/Pair/PairManager.php b/Pair/PairManager.php
index <HASH>..<HASH> 100644
--- a/Pair/PairManager.php
+++ b/Pair/PairManager.php
@@ -59,7 +59,7 @@ class PairManager
if ($ratio <= 0) {
throw new MoneyException("ratio has to be strictly positive");
}
- $ratioList = $this->storage->loadRatioList();
+ $ratioList = $this->storage->loadRatioList(true);
$ratioList[$currency->getName()] = $ratio;
$ratioList[$this->getReferenceCurrencyCode()] = (float) 1;
$this->storage->saveRatioList($ratioList);
@@ -134,4 +134,4 @@ class PairManager
}
-}
\ No newline at end of file
+} | When updating multiple currencies only the last one is updated
This fix will prevent incorrect behavior. | TheBigBrainsCompany_TbbcMoneyBundle | train | php |
45303fc69ad7c97cc930752c9aa530e2bfde8236 | diff --git a/ui/src/components/carousel/QCarousel.js b/ui/src/components/carousel/QCarousel.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/carousel/QCarousel.js
+++ b/ui/src/components/carousel/QCarousel.js
@@ -175,9 +175,7 @@ export default Vue.extend({
h('div', {
staticClass: 'q-carousel__slides-container',
directives: this.panelDirectives
- }, [
- this.__getPanelContent(h)
- ])
+ }, this.__getPanelContent(h))
].concat(this.__getContent(h)))
}
},
diff --git a/ui/src/components/stepper/QStepper.js b/ui/src/components/stepper/QStepper.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/stepper/QStepper.js
+++ b/ui/src/components/stepper/QStepper.js
@@ -86,9 +86,7 @@ export default Vue.extend({
h('div', {
staticClass: 'q-stepper__content q-panel-parent',
directives: this.panelDirectives
- }, [
- this.__getPanelContent(h)
- ])
+ }, this.__getPanelContent(h))
)
}, | refactor(panel): Improve panels render method | quasarframework_quasar | train | js,js |
500ec52a6c3fa5c67f021aea387544900a93fcec | diff --git a/pypercube/expression.py b/pypercube/expression.py
index <HASH>..<HASH> 100644
--- a/pypercube/expression.py
+++ b/pypercube/expression.py
@@ -220,6 +220,30 @@ class MetricExpression(object):
"""
return CompoundMetricExpression(self).__truediv__(right)
+ def __eq__(self, other):
+ """
+ >>> e1 = EventExpression('request')
+ >>> e2 = EventExpression('other')
+ >>> m1 = MetricExpression('sum', e1)
+ >>> m2 = MetricExpression('sum', e1)
+ >>> m1 == m2
+ True
+ >>> m2 = MetricExpression('sum', e2)
+ >>> m1 == m2
+ False
+ >>> m1 = MetricExpression('sum', e2)
+ >>> m1 == m2
+ True
+ >>> m1 = MetricExpression('min', e2)
+ >>> m1 == m2
+ False
+ >>> m2 = MetricExpression('min', e2)
+ >>> m1 == m2
+ True
+ """
+ return self.metric_type == other.metric_type and \
+ self.event_expression == other.event_expression
+
class Sum(MetricExpression):
"""A "sum" metric.""" | Implement __eq__ for MetricExpression | sbuss_pypercube | train | py |
8a561b1d758fc4a0cc6f01015a81aa98c45c4881 | diff --git a/server/tcp.go b/server/tcp.go
index <HASH>..<HASH> 100644
--- a/server/tcp.go
+++ b/server/tcp.go
@@ -69,7 +69,7 @@ func handleConnection(conn net.Conn, errChan chan<- error) {
// to connected tcp client (non-blocking)
go func() {
for msg := range proxy.Pipe {
- lumber.Info("Got message - %#v", msg)
+ lumber.Trace("Got message - %#v", msg)
// if the message fails to encode its probably a syntax issue and needs to
// break the loop here because it will never be able to encode it; this will
// disconnect the client. | Prevent unintended log spam
Resolves #<I> | nanopack_mist | train | go |
ee15f63cef556601ddced0393f74da8954da101d | diff --git a/src/rfx/backend.py b/src/rfx/backend.py
index <HASH>..<HASH> 100644
--- a/src/rfx/backend.py
+++ b/src/rfx/backend.py
@@ -308,7 +308,7 @@ class EngineCli(rfx.Base):
"""get an object. see --help"""
obj_name = parsed['name']
try:
- obj = Engine(base=self).get_object(obj_type, obj_name, raise_error=True)
+ obj = self.rcs.get(obj_type, obj_name)
if argv and argv[0]:
key = argv[0]
if key[:4] == 'obj.': | switching to direct self.rcs | reflexsc_reflex | train | py |
b369096cac66bda5bf2ccb7f774947195203d95c | diff --git a/echo_test.go b/echo_test.go
index <HASH>..<HASH> 100644
--- a/echo_test.go
+++ b/echo_test.go
@@ -457,7 +457,7 @@ func request(method, path string, e *Echo) (int, string) {
}
func TestHTTPError(t *testing.T) {
- err := NewHTTPError(400, map[string]interface{}{
+ err := NewHTTPError(http.StatusBadRequest, map[string]interface{}{
"code": 12,
})
assert.Equal(t, "code=400, message=map[code:12]", err.Error()) | echo: use HTTP status codes constants where applicable (#<I>) | labstack_echo | train | go |
3926a9f66452f7a8c8d9c0e4e3074383f9aff5cd | diff --git a/internal/sysutil/sysutil.go b/internal/sysutil/sysutil.go
index <HASH>..<HASH> 100644
--- a/internal/sysutil/sysutil.go
+++ b/internal/sysutil/sysutil.go
@@ -9,5 +9,5 @@ import "golang.org/x/sys/unix"
func RlimitStack() (cur uint64, err error) {
var r unix.Rlimit
err = unix.Getrlimit(unix.RLIMIT_STACK, &r)
- return r.Cur, err
+ return uint64(r.Cur), err // Type conversion because Cur is one of uint64, int64 depending on unix flavor.
} | internal/sysutil: Fix build error on FreeBSD due to Rlimit.Cur type mismatch. (#<I>)
Document why type conversion is necessary. Otherwise, it's not clear
that it's neccessary, and we we wouldn't be able to catch breakage if
it were removed. | gopherjs_gopherjs | train | go |
7d4ade9aa4b4bc2a7c571662e4d8ede22abf3fb0 | diff --git a/lib/fastlane/actions/read_podspec.rb b/lib/fastlane/actions/read_podspec.rb
index <HASH>..<HASH> 100644
--- a/lib/fastlane/actions/read_podspec.rb
+++ b/lib/fastlane/actions/read_podspec.rb
@@ -6,9 +6,10 @@ module Fastlane
class ReadPodspecAction < Action
def self.run(params)
+ Actions.verify_gem!('cocoapods')
+
path = params[:path]
-
- # will fail if cocoapods is not installed
+
require 'cocoapods-core'
spec = Pod::Spec.from_file(path).to_hash
diff --git a/lib/fastlane/documentation/actions_list.rb b/lib/fastlane/documentation/actions_list.rb
index <HASH>..<HASH> 100644
--- a/lib/fastlane/documentation/actions_list.rb
+++ b/lib/fastlane/documentation/actions_list.rb
@@ -87,7 +87,7 @@ module Fastlane
if required_count > 0
puts "#{required_count} of the available parameters are required".magenta
- puts "They are marked using an asterix *".magenta
+ puts "They are marked with an asterix *".magenta
end
else
puts "No available options".yellow | Improved read_podspec action when cocoapods isn't installed | fastlane_fastlane | train | rb,rb |
d2b79eddb0e79fcf29f697731ef60a5c0837c484 | diff --git a/lxd/state/testing.go b/lxd/state/testing.go
index <HASH>..<HASH> 100644
--- a/lxd/state/testing.go
+++ b/lxd/state/testing.go
@@ -28,7 +28,7 @@ func NewTestState(t *testing.T) (*State, func()) {
osCleanup()
}
- state := NewState(context.TODO(), node, cluster, nil, os, nil, nil, nil, firewall.New(), nil)
+ state := NewState(context.TODO(), node, cluster, nil, os, nil, nil, nil, firewall.New(), nil, nil, func() {})
return state, cleanup
} | lxd/state: Update tests with NewState usage | lxc_lxd | train | go |
70cf2b2c86f58d73e32666663d40df5e177110f0 | diff --git a/core/server/data/db/backup.js b/core/server/data/db/backup.js
index <HASH>..<HASH> 100644
--- a/core/server/data/db/backup.js
+++ b/core/server/data/db/backup.js
@@ -18,8 +18,9 @@ writeExportFile = function writeExportFile(exportResult) {
};
const readBackup = async (filename) => {
- // TODO: prevent from directory traversal - need to sanitize the filename probably on validation layer
- var backupPath = path.resolve(urlUtils.urlJoin(config.get('paths').contentPath, 'data', filename));
+ const parsedFileName = path.parse(filename);
+ const sanitized = `${parsedFileName.name}${parsedFileName.ext}`;
+ const backupPath = path.resolve(urlUtils.urlJoin(config.get('paths').contentPath, 'data', sanitized));
const exists = await fs.pathExists(backupPath); | Added input sanitization for backup path
- We need to limit the allowed filename accepted by the method to avoid opening up path traversal attack | TryGhost_Ghost | train | js |
39f19fcb0d6f0cab42048b957551c95375bd7af5 | diff --git a/ext_localconf.php b/ext_localconf.php
index <HASH>..<HASH> 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -23,7 +23,6 @@ $extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
);
$bootstrapPackageConfiguration = $extensionConfiguration->get('bootstrap_package');
-
/***************
* PageTS
*/ | [BUGFIX] Remove empty line to match cgl | benjaminkott_bootstrap_package | train | php |
75a4dd904c830c137ed07494dae88bce56ebffed | diff --git a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java
index <HASH>..<HASH> 100644
--- a/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java
+++ b/jaxrs/src/main/java/com/ning/billing/jaxrs/resources/InvoiceResource.java
@@ -182,7 +182,7 @@ public class InvoiceResource extends JaxRsResourceBase {
}
@DELETE
- @Path("/{invoiceId:" + UUID_PATTERN + "}" + "/{invoiceItemId:" + UUID_PATTERN + "/cba")
+ @Path("/{invoiceId:" + UUID_PATTERN + "}" + "/{invoiceItemId:" + UUID_PATTERN + "}/cba")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
public Response deleteCBA(@PathParam("invoiceId") final String invoiceId, | jaxrs: fix typo in DELETE cba endpoint | killbill_killbill | train | java |
462c7a3edfb7b07311b4caa5ab3e8a50a36a94eb | diff --git a/np/quickarrays.py b/np/quickarrays.py
index <HASH>..<HASH> 100755
--- a/np/quickarrays.py
+++ b/np/quickarrays.py
@@ -154,7 +154,6 @@ class NPQuickTypeShortcut(object):
class NPQuickMatrixCreator(object):
def __init__(self, dtype_shortcut = None):
- self._shortcut_name = 'np.m'
self.dtype = np_quick_types.get(dtype_shortcut, None)
def __getitem__(self, arg):
@@ -162,7 +161,10 @@ class NPQuickMatrixCreator(object):
return array(data, dtype=self.dtype).reshape((-1, columns))
def __repr__(self):
- return "<np quick matrix creator>"
+ if self.dtype:
+ return "<np quick matrix creator for type %s>" % repr(self.dtype.__name__)
+ else:
+ return "<np quick matrix creator>"
class npmodule(types.ModuleType): | repr fix for future typed matrices | k7hoven_np | train | py |
83d9ae1df1b79587dadde91a0af94d5430b44fb9 | diff --git a/library/WT/Stats.php b/library/WT/Stats.php
index <HASH>..<HASH> 100644
--- a/library/WT/Stats.php
+++ b/library/WT/Stats.php
@@ -1596,7 +1596,7 @@ class WT_Stats {
." `##individuals` AS indi"
." WHERE"
." indi.i_id=birth.d_gid AND"
- ." indi.i_gedrec NOT LIKE '%\\n1 DEAT%' AND"
+ ." indi.i_gedcom NOT LIKE '%\\n1 DEAT%' AND"
." birth.d_file={$this->_ged_id} AND"
." birth.d_file=indi.i_file AND"
." birth.d_fact IN ('BIRT', 'CHR', 'BAPM', '_BRTM') AND" | #<I> - statistics oldest living people | fisharebest_webtrees | train | php |
232f237ce41da99ddc2aa39728b8c93f48929904 | diff --git a/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java b/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java
+++ b/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableRecyclerView.java
@@ -142,6 +142,7 @@ public class ObservableRecyclerView extends RecyclerView implements Scrollable {
mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight();
} else if (firstVisiblePosition == 0) {
mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight();
+ mPrevScrolledChildrenHeight = 0;
}
if (mPrevFirstVisibleChildHeight < 0) {
mPrevFirstVisibleChildHeight = 0; | ObservableRecyclerView: set mPrevScrolledChildrenHeight to 0 when scrolled to top.
This should fix the issue that mScrollY becomes a negative value after fast scrolled down and up to top. | ksoichiro_Android-ObservableScrollView | train | java |
a9bcccdc869d7ee7bccee012ec40024cdf8e55de | diff --git a/public/hft/0.x.x/scripts/commonui.js b/public/hft/0.x.x/scripts/commonui.js
index <HASH>..<HASH> 100644
--- a/public/hft/0.x.x/scripts/commonui.js
+++ b/public/hft/0.x.x/scripts/commonui.js
@@ -296,6 +296,10 @@ define([
title: "HappyFunTimes",
msg: "Touch To Restart",
}, function() {
+ dialog.modal({
+ title: "HappyFunTimes",
+ msg: "...restarting...",
+ });
var redirCookie = new Cookie("redir");
var url = redirCookie.get() || "http://happyfuntimes.net";
console.log("goto: " + url); | make commonui show ...restarting... when restarting | greggman_HappyFunTimes | train | js |
22efa81eeee126d91fa88666f4a1fc3db52bb4fe | diff --git a/PhpAmqpLib/Connection/AbstractConnection.php b/PhpAmqpLib/Connection/AbstractConnection.php
index <HASH>..<HASH> 100644
--- a/PhpAmqpLib/Connection/AbstractConnection.php
+++ b/PhpAmqpLib/Connection/AbstractConnection.php
@@ -419,14 +419,16 @@ class AbstractConnection extends AbstractChannel
$pkt->write_octet(0xCE);
- while ($body !== '') {
- $bodyStart = ($this->frame_max - 8);
- $payload = mb_substr($body, 0, $bodyStart, 'ASCII');
- $body = (string)mb_substr($body, $bodyStart, mb_strlen($body, 'ASCII') - $bodyStart, 'ASCII');
+ // memory efficiency: walk the string instead of biting it. good for very large packets (100+mb)
+ $position = 0;
+ $bodyLength = mb_strlen($body,'8bit');
+ while ($position <= $bodyLength) {
+ $payload = mb_substr($body, $position, $this->frame_max - 8, '8bit');
+ $position += $this->frame_max - 8;
$pkt->write_octet(3);
$pkt->write_short($channel);
- $pkt->write_long(mb_strlen($payload, 'ASCII'));
+ $pkt->write_long(mb_strlen($payload, '8bit'));
$pkt->write($payload); | changed the way prepare content splits the body. now should be a bit more memory efficient | php-amqplib_php-amqplib | train | php |
e16b86d768f39bda7c29e9fc37115c4bac8cdd28 | diff --git a/dosagelib/output.py b/dosagelib/output.py
index <HASH>..<HASH> 100644
--- a/dosagelib/output.py
+++ b/dosagelib/output.py
@@ -23,9 +23,9 @@ class Output(object):
"""Write an informational message."""
self.write(s, level=level)
- def debug(self, s):
+ def debug(self, s, level=2):
"""Write a debug message."""
- self.write(s, level=2, color='white')
+ self.write(s, level=level, color='white')
def warn(self, s):
"""Write a warning message.""" | Allow debug level to be set. | wummel_dosage | train | py |
a3bbb74a83fe4adf092dd35008f42bd137a0c181 | diff --git a/roaring_test.go b/roaring_test.go
index <HASH>..<HASH> 100644
--- a/roaring_test.go
+++ b/roaring_test.go
@@ -2177,7 +2177,7 @@ func TestReverseIterator(t *testing.T) {
i := bm.ReverseIterator()
assert.True(t, i.HasNext())
- assert.EqualValues(t, MaxUint32, i.Next())
+ assert.EqualValues(t, uint32(MaxUint32), i.Next())
assert.False(t, i.HasNext())
})
} | Fixed tests for GOARCH=<I> | RoaringBitmap_roaring | train | go |
20fc46a559be936d0ea18fe2b6ba42f2f466f63b | diff --git a/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java b/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java
index <HASH>..<HASH> 100644
--- a/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java
+++ b/hawtio-maven-plugin/src/main/java/io/hawt/maven/TestMojo.java
@@ -35,10 +35,10 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
@Mojo(name = "test", defaultPhase = LifecyclePhase.TEST_COMPILE, requiresDependencyResolution = ResolutionScope.TEST)
public class TestMojo extends CamelMojo {
- // TODO: parse args to find class and test name
-
- private String className = "com.foo.MyRouteTest";
+ @Parameter(property = "hawtio.className", required = true)
+ private String className;
+ @Parameter(property = "hawtio.testName")
private String testName;
/** | #<I>: Polished | hawtio_hawtio | train | java |
765dfa4d038e48f7b35a9ba2344e27116c20dad5 | diff --git a/chainlet/chainlink.py b/chainlet/chainlink.py
index <HASH>..<HASH> 100644
--- a/chainlet/chainlink.py
+++ b/chainlet/chainlink.py
@@ -187,6 +187,8 @@ class ChainLinker(object):
else:
_elements.append(element)
if any(isinstance(element, ParallelChain) for element in _elements):
+ if len(_elements) == 1:
+ return _elements[0]
return MetaChain(_elements)
return LinearChain(_elements) | linker returns parallel link if there are no more elements | maxfischer2781_chainlet | train | py |
239f51011d3a75d2d5e66c0792063208b2cd3c3c | diff --git a/crosscat/utils/sample_utils.py b/crosscat/utils/sample_utils.py
index <HASH>..<HASH> 100644
--- a/crosscat/utils/sample_utils.py
+++ b/crosscat/utils/sample_utils.py
@@ -349,18 +349,22 @@ def create_component_model(column_metadata, column_hypers, suffstats):
modeltype = column_metadata['modeltype']
if modeltype == 'normal_inverse_gamma':
component_model_constructor = CCM.p_ContinuousComponentModel
+ component_model = component_model_constructor(column_hypers, count,
+ **suffstats)
elif modeltype == 'symmetric_dirichlet_discrete':
component_model_constructor = MCM.p_MultinomialComponentModel
# FIXME: this is a hack
if suffstats is not None:
suffstats = dict(counts=suffstats)
+ component_model = component_model_constructor(column_hypers, count,
+ **suffstats)
elif modeltype == 'vonmises':
component_model_constructor = CYCM.p_CyclicComponentModel
+ component_model = component_model_constructor(column_hypers, count,
+ **suffstats)
else:
assert False, \
"create_component_model: unknown modeltype: %s" % modeltype
- component_model = component_model_constructor(column_hypers, count,
- **suffstats)
return component_model
def create_cluster_model(zipped_column_info, row_partition_model, | Distribute if over its continuation. | probcomp_crosscat | train | py |
e982118123a54b1e45d62d9b3f321f97c27174e9 | diff --git a/ella/newman/media/js/newman.js b/ella/newman/media/js/newman.js
index <HASH>..<HASH> 100644
--- a/ella/newman/media/js/newman.js
+++ b/ella/newman/media/js/newman.js
@@ -275,7 +275,6 @@ $( function() {
if ( ($this).val() ) has_files = true;
});
if (has_files) {
- ;;; alert('file present');
// Shave off the names from suggest-enhanced hidden inputs
$form.find('input:hidden').each( function() {
if ($form.find( '#'+$(this).attr('id')+'_suggest' ).length == 0) return;
@@ -819,7 +818,7 @@ $(function(){ open_overlay = function(content_type, selection_callback) {
$('#'+xhr.original_options.target_id+' tbody a')
.unbind('click')
.click( function(evt) {
- var clicked_id = $(this).attr('href').replace(/\/$/,'');
+ var clicked_id = /\d+(?=\/$)/.exec( $(this).attr('href') )[0];
try {
xhr.original_options.selection_callback(clicked_id, {evt: evt});
} catch(e) { carp('Failed running overlay callback', e); } | Made the method for taking ID from changelist hrefs more robust. | ella_ella | train | js |
73c6ce953ab276f365b7a37bdbe85ca0efa315ec | diff --git a/lime/wrappers/scikit_image.py b/lime/wrappers/scikit_image.py
index <HASH>..<HASH> 100755
--- a/lime/wrappers/scikit_image.py
+++ b/lime/wrappers/scikit_image.py
@@ -20,9 +20,6 @@ class BaseWrapper(object):
self.target_fn = target_fn
self.target_params = target_params
- self.target_fn = target_fn
- self.target_params = target_params
-
def _check_params(self, parameters):
"""Checks for mistakes in 'parameters' | Remove duplicated lines in wrappers/scikit_image.py | marcotcr_lime | train | py |
f211a14f7e34cc333c733efb15c024e300722bd3 | diff --git a/manager_utils/manager_utils.py b/manager_utils/manager_utils.py
index <HASH>..<HASH> 100644
--- a/manager_utils/manager_utils.py
+++ b/manager_utils/manager_utils.py
@@ -421,7 +421,7 @@ class ManagerUtilsQuerySet(QuerySet):
Overrides Django's update method to emit a post_bulk_operation signal when it completes.
"""
ret_val = super(ManagerUtilsQuerySet, self).update(**kwargs)
- post_bulk_operation.send(sender=self, model=self.model)
+ post_bulk_operation.send(sender=self.model, model=self.model)
return ret_val | fixed sender issue in post bulk operation | ambitioninc_django-manager-utils | train | py |
33d009710f948aca40149feefa69bed55ee74a91 | diff --git a/symphony/lib/toolkit/class.frontendpage.php b/symphony/lib/toolkit/class.frontendpage.php
index <HASH>..<HASH> 100644
--- a/symphony/lib/toolkit/class.frontendpage.php
+++ b/symphony/lib/toolkit/class.frontendpage.php
@@ -537,7 +537,7 @@ class FrontendPage extends XSLTPage
$this->setXML($xml);
$xsl = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' .
- ' <xsl:import href="' . str_replace('\\', '/', str_replace(' ', '%20', $page['filelocation'])) . '"/>' .
+ ' <xsl:import href="' . str_replace(array('\\', ' '), array('/', '%20'), $page['filelocation']) . '"/>' .
'</xsl:stylesheet>';
$this->setXSL($xsl, false); | Simplified replace of backslashes and whitespace in xsl pathes | symphonycms_symphony-2 | train | php |
833ac62c4562e10d03a8be74fd69a8983bf59f1d | diff --git a/src/filesystem/implementation.js b/src/filesystem/implementation.js
index <HASH>..<HASH> 100644
--- a/src/filesystem/implementation.js
+++ b/src/filesystem/implementation.js
@@ -1924,7 +1924,6 @@ function isUint32(value) {
// Validator for mode_t (the S_* constants). Valid numbers or octal strings
// will be masked with 0o777 to be consistent with the behavior in POSIX APIs.
function validateAndMaskMode(value, def, callback) {
- console.log('Passed in mode: ' + value);
if(typeof def === 'function') {
callback = def;
def = undefined;
@@ -1932,7 +1931,6 @@ function validateAndMaskMode(value, def, callback) {
if (isUint32(value)) {
let newMode = value & FULL_READ_WRITE_EXEC_PERMISSIONS;
- console.log('Masked mode: ' + newMode);
return value & FULL_READ_WRITE_EXEC_PERMISSIONS;
}
@@ -1953,7 +1951,6 @@ function validateAndMaskMode(value, def, callback) {
return false;
}
var parsed = parseInt(value, 8);
- console.log('Parsed + Masekd mode: ' + parsed & FULL_READ_WRITE_EXEC_PERMISSIONS);
return parsed & FULL_READ_WRITE_EXEC_PERMISSIONS;
} | removed some console.logs because travis-ci complained | filerjs_filer | train | js |
2524566a533139b938ce0f5cecb22b22427a1f38 | diff --git a/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py b/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py
index <HASH>..<HASH> 100644
--- a/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py
+++ b/sensorimotor/sensorimotor/temporal_pooler_monitor_mixin.py
@@ -115,13 +115,17 @@ class TemporalPoolerMonitorMixin(MonitorMixinBase):
Returns metric made of values from the stability confusion matrix.
(See `getDataStabilityConfusion`.)
- TODO: Exclude diagonals
-
@return (Metric) Stability confusion metric
"""
data = self.getDataStabilityConfusion()
- numberLists = [item for sublist in data.values() for item in sublist]
- numbers = [item for sublist in numberLists for item in sublist]
+ numbers = []
+
+ for matrix in data.values():
+ for i in xrange(len(matrix)):
+ for j in xrange(len(matrix[i])):
+ if i != j: # Ignoring diagonal
+ numbers.append(matrix[i][j])
+
return Metric(self, "stability confusion", numbers) | Exclude diagonals in stability confusion matrix | numenta_htmresearch | train | py |
ff5d1c2338be7fa6be8ba6eaa19a58bbcd9c4813 | diff --git a/test/event-emitters.js b/test/event-emitters.js
index <HASH>..<HASH> 100644
--- a/test/event-emitters.js
+++ b/test/event-emitters.js
@@ -10,7 +10,9 @@ describe('Angular-wrapped PouchDB event emitters', function() {
function rawPut(cb) {
function put($window) {
var rawDB = new $window.PouchDB('db');
- var doc = {_id: 'test'};
+ var doc = {
+ _id: 'test'
+ };
rawDB.put(doc, function(err, result) {
if (err) {
throw err; | style: resolve more lint warnings | angular-pouchdb_angular-pouchdb | train | js |
07bec64a604b1596f672ebda52d63987af85ef18 | diff --git a/features/step_definitions/stop.steps.js b/features/step_definitions/stop.steps.js
index <HASH>..<HASH> 100644
--- a/features/step_definitions/stop.steps.js
+++ b/features/step_definitions/stop.steps.js
@@ -11,8 +11,8 @@ module.exports = function() {
request(url)
.get('/')
.end(function(error, response) {
- expect(error).to.not.equal(undefined);
- expect(error.code).to.equal('ECONNREFUSED');
+ expect(error, 'Error should be provided from access on stopped process.').to.not.equal(undefined);
+ expect(error.code, 'Error code should be provided as \'EXONNREFUSED\' on access of stopped process.').to.equal('ECONNREFUSED');
callback();
});
}); | loader expectations on stop spec steps for understanding why travis CI is failing but works locally. | bustardcelly_grunt-forever | train | js |
c56732ff4a6c9e816cf504bd6c39ff97646e15aa | diff --git a/tests/FiniteStateMachine/VerifyLog/ReasonTest.php b/tests/FiniteStateMachine/VerifyLog/ReasonTest.php
index <HASH>..<HASH> 100644
--- a/tests/FiniteStateMachine/VerifyLog/ReasonTest.php
+++ b/tests/FiniteStateMachine/VerifyLog/ReasonTest.php
@@ -6,9 +6,7 @@ require_once(dirname(__FILE__) . implode(DIRECTORY_SEPARATOR, explode('/', '/../
* public function test_VerifyLog_Reason_TheFirstPosition_NotInit_ThrowsException
* public function test_VerifyLog_Reason_TheLastPosition_NotSleep_ThrowsException
* public function test_VerifyLog_Reason_Init_NotAtTheFirstPosition_ThrowsException
- * public function test_VerifyLog_Reason_Action_AtTheFirstPosition_ThrowsException
* public function test_VerifyLog_Reason_Action_AtTheLastPosition_ThrowsException
- * public function test_VerifyLog_Reason_Reset_AtTheFirstPosition_ThrowsException
* public function test_VerifyLog_Reason_Reset_AtTheLastPosition_ThrowsException
* public function test_VerifyLog_Reason_Wakeup_NotAfterSleep_ThrowsException
* public function test_VerifyLog_Reason_Sleep_NotAtTheLastPosition_NotBeforeWakeup_ThrowsException | #1: Fsm_VerifyLog_Reason_InitTest: test_VerifyLog_Reason_Action_AtTheFirstPosition_ThrowsException() and test_VerifyLog_Reason_Reset_AtTheFirstPosition_ThrowsException() methods have been eliminated because of the test of test_VerifyLog_Reason_TheFirstPosition_NotInit_ThrowsException() method | tourman_fsm | train | php |
47d552917717a4fd7f99266741464d00c3a019db | diff --git a/src/Dash.php b/src/Dash.php
index <HASH>..<HASH> 100644
--- a/src/Dash.php
+++ b/src/Dash.php
@@ -63,7 +63,7 @@ class Dash
return $htmlString ;
}
- public function countRouteUri() {
+ public function routeUri() {
return explode("/", Route::current()->uri());
}
diff --git a/src/resources/views/layouts/layout.blade.php b/src/resources/views/layouts/layout.blade.php
index <HASH>..<HASH> 100644
--- a/src/resources/views/layouts/layout.blade.php
+++ b/src/resources/views/layouts/layout.blade.php
@@ -33,7 +33,7 @@
</head>
<body>
-<div id="wrapper" class="{{ (count(Dash::countRouteUri()) > 1 ) ? "toggled" : "" }} dash-sidebar">
+<div id="wrapper" class="{{ (count(Dash::routeUri()) > 1 ) ? "toggled" : "" }} dash-sidebar">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
@@ -98,6 +98,7 @@
<div class="container-fluid">
{{ Html::dashMessages() }}
</div>
+
@yield("content")
</main> | WIP -Testing routes | shawnsandy_dash | train | php,php |
63ff88ca12b8d36f5286c0c5c375532579a88339 | diff --git a/lib/fastlane/setup.rb b/lib/fastlane/setup.rb
index <HASH>..<HASH> 100644
--- a/lib/fastlane/setup.rb
+++ b/lib/fastlane/setup.rb
@@ -43,12 +43,11 @@ module Fastlane
def copy_existing_files
files_to_copy.each do |current|
- if File.exist?(current)
- file_name = File.basename(current)
- to_path = File.join(folder, file_name)
- Helper.log.info "Moving '#{current}' to '#{to_path}'".green
- FileUtils.mv(current, to_path)
- end
+ next unless File.exist?(current)
+ file_name = File.basename(current)
+ to_path = File.join(folder, file_name)
+ Helper.log.info "Moving '#{current}' to '#{to_path}'".green
+ FileUtils.mv(current, to_path)
end
end | Rubocop - Style/Next: Use next to skip iteration | fastlane_fastlane | train | rb |
c0e44a9cfcd0ba3ebd507e5acf9c9d8fc6a9d786 | diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java b/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java
index <HASH>..<HASH> 100644
--- a/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java
+++ b/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java
@@ -692,9 +692,11 @@ public interface JavaConstant {
* @return The method descriptor of this method handle representation.
*/
public String getDescriptor() {
- if (handleType.isField()) {
- return returnType.getDescriptor();
- } else {
+ switch (handleType) {
+ case PUT_FIELD:
+ case PUT_STATIC_FIELD:
+ return parameterTypes.get(0).getDescriptor();
+ default:
StringBuilder stringBuilder = new StringBuilder().append('(');
for (TypeDescription parameterType : parameterTypes) {
stringBuilder.append(parameterType.getDescriptor()); | Returns the proper descriptor for field-mutating MethodHandle constants to fix #<I> | raphw_byte-buddy | train | java |
b1621b476e5dfc7653f70655faf3d6109ffc3044 | diff --git a/lib/parse/amd.js b/lib/parse/amd.js
index <HASH>..<HASH> 100644
--- a/lib/parse/amd.js
+++ b/lib/parse/amd.js
@@ -105,9 +105,13 @@ AMD.prototype.parseFile = function (filename) {
AMD.prototype.addOptimizedModules = function (filename) {
var self = this;
- amdetective(this.getFileSource(filename)).forEach(function (obj) {
+ amdetective(this.getFileSource(filename))
+ .filter(function(obj) {
+ var id = obj.name;
+ return id !== 'require' && id !== 'exports' && id !== 'module' && !id.match(/\.?\w\!/) && !self.isExcluded(id);
+ })
+ .forEach(function (obj) {
if (!self.isExcluded(obj.name)) {
-
self.tree[obj.name] = obj.deps.filter(function(id) {
return id !== 'require' && id !== 'exports' && id !== 'module' && !id.match(/\.?\w\!/) && !self.isExcluded(id);
}); | added plugin filtering and excludes to optimized packages | pahen_madge | train | js |
705fab141f0cadcb76614c546b5f331ed3c2a6b3 | diff --git a/kernel/classes/ezcontentclassattribute.php b/kernel/classes/ezcontentclassattribute.php
index <HASH>..<HASH> 100644
--- a/kernel/classes/ezcontentclassattribute.php
+++ b/kernel/classes/ezcontentclassattribute.php
@@ -64,9 +64,18 @@ class eZContentClassAttribute extends eZPersistentObject
$this->DataTextI18nList->initDefault();
// Make sure datatype gets final say if attribute should be translatable
- if ( $this->attribute('can_translate') && !$this->dataType()->isTranslatable() )
+ if ( isset( $row['can_translate'] ) && $row['can_translate'] )
{
- $this->setAttribute('can_translate', 0);
+ $datatype = $this->dataType();
+ if ( $datatype instanceof eZDataType )
+ {
+ if ( !$datatype->isTranslatable() )
+ $this->setAttribute('can_translate', 0);
+ }
+ else
+ {
+ eZDebug::writeError( 'Could not get instance of datatype: ' . $row['data_type_string'], __METHOD__ );
+ }
}
} | Fix: Fatal error on non object in Unit test
Normal execution is not touched by this, this is caused by something on ci server and/or in unit tests. | ezsystems_ezpublish-legacy | train | php |
e474b39acfc95a9c9ca92cd34bf0eac9c1e1013f | diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java
+++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetConnect.java
@@ -156,6 +156,8 @@ public class OServerCommandGetConnect extends OServerCommandAuthenticatedDbAbstr
json.endCollection(1, true);
}
+ json.writeAttribute(1, false, "currentUser", db.getUser().getName());
+
json.beginCollection(1, false, "users");
OUser user;
for (ODocument doc : db.getMetadata().getSecurity().getUsers()) { | OrientDB Server: added "currentUser" property on connect | orientechnologies_orientdb | train | java |
da76b064df3079331f940376d013356298a758bc | diff --git a/modules/deprecateObjectProperties.js b/modules/deprecateObjectProperties.js
index <HASH>..<HASH> 100644
--- a/modules/deprecateObjectProperties.js
+++ b/modules/deprecateObjectProperties.js
@@ -5,8 +5,9 @@ let useMembrane = false
if (__DEV__) {
try {
- Object.defineProperty({}, 'x', { get() { return true } }).x
- useMembrane = true
+ if (Object.defineProperty({}, 'x', { get() { return true } }).x) {
+ useMembrane = true
+ }
} catch(e) { }
}
@@ -26,7 +27,7 @@ export default function deprecateObjectProperties(object, message) {
} else {
Object.defineProperty(membrane, prop, {
configurable: false,
- enumerable: true,
+ enumerable: false,
get() {
warning(false, message)
return object[prop] | Make deprecated properties non-enumerable
This avoids spurious deprecation warnings in dev tools. | taion_rrtr | train | js |
3354cd9d478ed2d638ab0bb183f546cf73e16561 | diff --git a/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java b/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java
index <HASH>..<HASH> 100644
--- a/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java
+++ b/androidsvg/src/main/java/com/caverock/androidsvg/CSSParser.java
@@ -1118,6 +1118,8 @@ class CSSParser
// Returns true if 'deviceMediaType' matches one of the media types in 'mediaList'
private static boolean mediaMatches(List<MediaType> mediaList, MediaType rendererMediaType)
{
+ if (mediaList.size() == 0) // No specific media specified, so match all
+ return true;
for (MediaType type: mediaList) {
if (type == MediaType.all || type == rendererMediaType)
return true; | Issue #<I>. Fixed problem where CSS @import was failing if you didn't supply a media type. | BigBadaboom_androidsvg | train | java |
a477dc486958519c5df1b98144b85012933c5259 | diff --git a/src/FastFeed/Exception/LogicException.php b/src/FastFeed/Exception/LogicException.php
index <HASH>..<HASH> 100644
--- a/src/FastFeed/Exception/LogicException.php
+++ b/src/FastFeed/Exception/LogicException.php
@@ -15,4 +15,4 @@ namespace FastFeed\Exception;
class LogicException extends \LogicException
{
-}
\ No newline at end of file
+}
diff --git a/src/FastFeed/Exception/RuntimeException.php b/src/FastFeed/Exception/RuntimeException.php
index <HASH>..<HASH> 100644
--- a/src/FastFeed/Exception/RuntimeException.php
+++ b/src/FastFeed/Exception/RuntimeException.php
@@ -14,5 +14,4 @@ namespace FastFeed\Exception;
*/
class RuntimeException extends \RuntimeException
{
-
-}
\ No newline at end of file
+}
\ No newline at end of file | test with clossing braces | FastFeed_FastFeed | train | php,php |
ff3c58edab65f10d31e1700f500a5cf65215567a | diff --git a/Vpc/Basic/Download/Component.php b/Vpc/Basic/Download/Component.php
index <HASH>..<HASH> 100644
--- a/Vpc/Basic/Download/Component.php
+++ b/Vpc/Basic/Download/Component.php
@@ -71,5 +71,7 @@ class Vpc_Basic_Download_Component extends Vpc_Abstract_Composite_Component
$field = Zend_Search_Lucene_Field::UnStored($fieldName, $this->_getRow()->infotext, 'utf-8');
$doc->addField($field);
+
+ return $doc;
}
} | fix fulltext indexing for Download component | koala-framework_koala-framework | train | php |
8b9fd9721b4245e13c9ca00bdb828545f83f1583 | diff --git a/onnx_mxnet/import_onnx.py b/onnx_mxnet/import_onnx.py
index <HASH>..<HASH> 100644
--- a/onnx_mxnet/import_onnx.py
+++ b/onnx_mxnet/import_onnx.py
@@ -215,13 +215,13 @@ class GraphProto(object):
MXNet doesnt have a squeeze operator.
Using "split" to perform similar operation.
"split" can be slower compared to "reshape".
- Remove this implementation once mxnet adds the support.
+ This can have performance impact.
+ TODO: Remove this implementation once mxnet adds the support.
"""
axes = new_attr.get('axis')
op = mx.sym.split(inputs[0], axis=axes[0], num_outputs=1, squeeze_axis=1)
- if len(axes) > 1:
- for i in axes[1:]:
- op = mx.sym.split(op, axis=i-1, num_outputs=1, squeeze_axis=1)
+ for i in axes[1:]:
+ op = mx.sym.split(op, axis=i-1, num_outputs=1, squeeze_axis=1)
return op
def _fix_gemm(self, op_name, inputs, old_attr): | Nits: Removed redundant code
Added few comments | onnx_onnx-mxnet | train | py |
61fe48013f208877baebd4db1ea4132a1bfc29a5 | diff --git a/php/commands/network.php b/php/commands/network.php
index <HASH>..<HASH> 100644
--- a/php/commands/network.php
+++ b/php/commands/network.php
@@ -3,14 +3,6 @@
/**
* Manage network custom fields.
*
- * ## OPTIONS
- *
- * <id>
- * : The network id (usually 1).
- *
- * --format=json
- * : Encode/decode values as JSON.
- *
* ## EXAMPLES
*
* # Get a list of super-admins
diff --git a/php/commands/post.php b/php/commands/post.php
index <HASH>..<HASH> 100644
--- a/php/commands/post.php
+++ b/php/commands/post.php
@@ -593,11 +593,6 @@ class Post_Command extends \WP_CLI\CommandWithDBObject {
/**
* Manage post custom fields.
*
- * ## OPTIONS
- *
- * [--format=json]
- * : Encode/decode values as JSON.
- *
* ## EXAMPLES
*
* # Set post meta
diff --git a/php/commands/term.php b/php/commands/term.php
index <HASH>..<HASH> 100644
--- a/php/commands/term.php
+++ b/php/commands/term.php
@@ -566,11 +566,6 @@ class Term_Command extends WP_CLI_Command {
/**
* Manage term custom fields.
*
- * ## OPTIONS
- *
- * --format=json
- * : Encode/decode values as JSON.
- *
* ## EXAMPLES
*
* # Set term meta | Remove ## OPTIONS from meta classes
These won't be rendered in the appropriate place. | wp-cli_export-command | train | php,php,php |
3a15d2e1073122f9b70d91db74f5789cba360ebc | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from distutils.core import setup
setup(name='messagegroups',
- version='0.1.1',
+ version='0.3',
description='Render grouped messages with the Django messaging framework',
author='Factor AG',
author_email='webmaster@factor.ch', | Updated setup.py to <I> | dbrgn_django-messagegroups | train | py |
360f8348454e6a46c89f6870a2b4dfa25782906c | diff --git a/src/Widget/IconPicker.php b/src/Widget/IconPicker.php
index <HASH>..<HASH> 100644
--- a/src/Widget/IconPicker.php
+++ b/src/Widget/IconPicker.php
@@ -41,6 +41,15 @@ class IconPicker extends \Widget
$fontPath = $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['eval']['iconFont'];
$fontPathNoSuffix = implode('.', explode('.', $fontPath, -1));
+ // Strip web directory prefix
+ if ($webDir = \System::getContainer()->getParameter('contao.web_dir')) {
+ $webDir = \StringUtil::stripRootDir($webDir);
+ }
+ else {
+ $webDir = 'web';
+ }
+ $fontPathNoSuffix = preg_replace('(^'.preg_quote($webDir).'/)', '', $fontPathNoSuffix);
+
if (!file_exists(TL_ROOT . '/' . $fontPath)) {
return '<p class="tl_gerror"><strong>'
. sprintf($GLOBALS['TL_LANG']['rocksolid_icon_picker']['font_not_found'], $fontPath) | Fixed font paths starting with “web/” (#6) | madeyourday_contao-rocksolid-icon-picker | train | php |
1f3f3629a4a2ceb9644d1f0572adcb70421447a1 | diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index <HASH>..<HASH> 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -7067,5 +7067,19 @@ function is_newnav($navigation) {
}
}
+/**
+ * Checks whether the given variable name is defined as a variable within the given object.
+ * @note This will NOT work with stdClass objects, which have no class variables.
+ * @param string $var The variable name
+ * @param object $object The object to check
+ * @return boolean
+ */
+function in_object_vars($var, $object)
+{
+ $class_vars = get_class_vars(get_class($object));
+ $class_vars = array_keys($class_vars);
+ return in_array($var, $class_vars);
+}
+
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
?> | MDL-<I> Added a function that checks an object for the definition of a given variable. Similar to in_array(). | moodle_moodle | train | php |
115356ae7fb51ab71f32801b3a8ba7c03a74c619 | diff --git a/runtime/classes/propel/adapter/DBOracle.php b/runtime/classes/propel/adapter/DBOracle.php
index <HASH>..<HASH> 100644
--- a/runtime/classes/propel/adapter/DBOracle.php
+++ b/runtime/classes/propel/adapter/DBOracle.php
@@ -134,12 +134,10 @@ class DBOracle extends DBAdapter {
return $row[0];
}
- /* someone please confirm this is valid
public function random($seed=NULL)
{
return 'dbms_random.value';
}
- */
} | Ticket #<I> - Closes ticket, method already existed, was requiring someone confirm it worked first. | propelorm_Propel | train | php |
df20a106deb5be9d0a1dbb31fb53a257bf07321e | diff --git a/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js b/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js
+++ b/packages/bonde-webpage/src/lib/ux/tell-a-friend-base/tell-a-friend.js
@@ -19,7 +19,7 @@ const TellAFriend = ({
widget
}) => {
const settings = widget.settings || {}
-
+ console.log(widget)
return (
<div className='center p3 bg-white darkengray rounded'>
<div className='m0 h3 bold'>{message}</div>
@@ -28,7 +28,9 @@ const TellAFriend = ({
</div>
<p>
<FormattedMessage
- id='share.components--tell-a-friend.text'
+ id={widget.settings.finish_message_type === 'donation-recurrent'
+ ? 'widgets.components--donation.finish-post-donation-messages.tell-a-friend.text'
+ : 'share.components--tell-a-friend.text'}
defaultMessage='Agora, compartilhe com seus amigos!'
/>
</p> | feat(webpage): refactor tellAFriend share message | nossas_bonde-client | train | js |
07b8ff7a10e1a7800cda697b09ef633544ba001b | 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
@@ -91,8 +91,8 @@ class Service(object):
#Tell the Server to properly die in case
try:
if self.process:
- os.kill(self.process.pid, signal.SIGTERM)
- os.wait()
+ self.process.kill()
+ self.process.wait()
except AttributeError:
# kill may not be available under windows environment
pass | DavidBurns correcting shutdown code for ChromeDriver
r<I> | SeleniumHQ_selenium | train | py |
89a8f8eb74384672bf9971a48ea4bf7dbc1b19b7 | diff --git a/src/Composer/ExtensionLoader.php b/src/Composer/ExtensionLoader.php
index <HASH>..<HASH> 100644
--- a/src/Composer/ExtensionLoader.php
+++ b/src/Composer/ExtensionLoader.php
@@ -18,7 +18,7 @@ class ExtensionLoader
/** @var ResolvedExtension[] */
protected $extensions = [];
/** @var string[] */
- protected $map;
+ protected $map = [];
/** @var FilesystemInterface */
private $filesystem;
@@ -102,6 +102,16 @@ class ExtensionLoader
}
/**
+ * Return the in-use extension name map.
+ *
+ * @return string[]
+ */
+ public function getMap()
+ {
+ return $this->map;
+ }
+
+ /**
* Resolve a Composer or PHP extension name to the stored key.
*
* @param $name | Getter for the in-use extension name map | bolt_bolt | train | php |
76f22e4834458c645105dc93a0aced4556022607 | diff --git a/ibis/backends/pyspark/tests/conftest.py b/ibis/backends/pyspark/tests/conftest.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/pyspark/tests/conftest.py
+++ b/ibis/backends/pyspark/tests/conftest.py
@@ -198,9 +198,8 @@ class TestConf(BackendTest, RoundAwayFromZero):
@pytest.fixture(scope='session')
-def client():
- session = SparkSession.builder.getOrCreate()
- client = ibis.backends.pyspark.Backend().connect(session)
+def client(data_directory):
+ client = get_pyspark_testing_client(data_directory)
df = client._session.range(0, 10)
df = df.withColumn("str_col", F.lit('value')) | BUG: Fix pyspark client that was being used to test without data (#<I>) | ibis-project_ibis | train | py |
8dca976205058b3b5809cc33a8cb11c9ef3ec97f | diff --git a/pkg/buildbot_pkg.py b/pkg/buildbot_pkg.py
index <HASH>..<HASH> 100644
--- a/pkg/buildbot_pkg.py
+++ b/pkg/buildbot_pkg.py
@@ -60,10 +60,10 @@ def getVersion(init_file):
v = VERSION_MATCH.search(out)
if v:
version = v.group(1)
- return version
+ return version
except OSError:
pass
- return "latest"
+ return "999.0-version-not-found"
# JS build strategy: | buildbot_pkg: return valid version instead of latest
Yet we return a big number to make sure this is not confused with a real version
There are some use cases uncovered by the current method:
If a developer clones the source tree without fetching the tags, git describe
will not find the latest tag.
This would be incorrect to prevent installation in those cases. | buildbot_buildbot | train | py |
126f92154a36835ff400de42910b8f6714ea01ca | diff --git a/tests/test_raises.py b/tests/test_raises.py
index <HASH>..<HASH> 100644
--- a/tests/test_raises.py
+++ b/tests/test_raises.py
@@ -119,13 +119,13 @@ def test_pytest_mark_raises_parametrize(testdir):
raise error
""",
[
- '*::test_mark_raises*None* PASSED',
+ '*::test_mark_raises*None0* PASSED',
'*::test_mark_raises*error1* PASSED',
'*::test_mark_raises*error2* PASSED',
'*::test_mark_raises*error3* PASSED',
'*::test_mark_raises*error4* FAILED',
'*::test_mark_raises*error5* FAILED',
- '*::test_mark_raises*6None* FAILED',
+ '*::test_mark_raises*None1* FAILED',
],
1
) | Fix test which broke with upgrade to pytest <I>
Unfortunately this test is pretty brittle. For now, hopefully fixing
the pytest version will keep it consistent. | Lemmons_pytest-raises | train | py |
49fb8e6d91ee18ea2d5b9025be70b7d609b6923e | diff --git a/classes/BearCMS/Internal/Cookies.php b/classes/BearCMS/Internal/Cookies.php
index <HASH>..<HASH> 100644
--- a/classes/BearCMS/Internal/Cookies.php
+++ b/classes/BearCMS/Internal/Cookies.php
@@ -131,7 +131,7 @@ class Cookies
$requestUrlParts = parse_url($app->request->base);
$serverUrlParts = parse_url(Config::$serverUrl);
$cookieMatches = [];
- preg_match_all('/Set-Cookie:(.*)/u', $headers, $cookieMatches);
+ preg_match_all('/Set-Cookie:(.*)/ui', $headers, $cookieMatches);
foreach ($cookieMatches[1] as $cookieMatch) {
$cookieMatchData = explode(';', $cookieMatch);
$cookieData = array('name' => '', 'value' => '', 'expire' => '', 'path' => '', 'domain' => '', 'secure' => false, 'httponly' => false); | Improved server cookies parsing. | bearcms_bearframework-addon | train | php |
56bee2ddaa85842b8c0723308afbf81ba7aeff3d | diff --git a/activeweb/src/main/java/org/javalite/activeweb/Configuration.java b/activeweb/src/main/java/org/javalite/activeweb/Configuration.java
index <HASH>..<HASH> 100644
--- a/activeweb/src/main/java/org/javalite/activeweb/Configuration.java
+++ b/activeweb/src/main/java/org/javalite/activeweb/Configuration.java
@@ -178,7 +178,7 @@ public class Configuration {
String className = get(Params.freeMarkerConfig.toString());
return freeMarkerConfig = (AbstractFreeMarkerConfig)Class.forName(className).newInstance();
}catch(Exception e){
- LOGGER.warn("Failed to find implementation of '" + AbstractFreeMarkerConfig.class + "', proceeding without custom configuration of FreeMarker");
+ LOGGER.debug("Failed to find implementation of '" + AbstractFreeMarkerConfig.class + "', proceeding without custom configuration of FreeMarker");
return null;
}
} | #<I> change warning log to debug | javalite_activejdbc | train | java |
3086b1def0a03c2238f87a902b2e2c20150aefc4 | diff --git a/stanza/models/common/doc.py b/stanza/models/common/doc.py
index <HASH>..<HASH> 100644
--- a/stanza/models/common/doc.py
+++ b/stanza/models/common/doc.py
@@ -309,13 +309,13 @@ class Document(StanzaObject):
def __repr__(self):
return json.dumps(self.to_dict(), indent=2, ensure_ascii=False)
- def to_serialized_string(self):
+ def to_serialized(self):
""" Dumps the whole document including text to a byte array containing a list of list of dictionaries for each token in each sentence in the doc.
"""
return pickle.dumps((self.text, self.to_dict()))
@classmethod
- def from_serialized_string(cls, serialized_string):
+ def from_serialized(cls, serialized_string):
""" Create and initialize a new document from a serialized string generated by Document.to_serialized_string():
"""
try:
@@ -639,7 +639,7 @@ class Token(StanzaObject):
ret.append(token_dict)
for word in self.words:
word_dict = word.to_dict()
- if NER in fields and len(self.id) == 1: # propagate NER label to Word if it is a single-word token
+ if len(self.id) == 1 and NER in fields and getattr(self, NER) is not None: # propagate NER label to Word if it is a single-word token
word_dict[NER] = getattr(self, NER)
ret.append(word_dict)
return ret | rename function & fix ner tag is none bug | stanfordnlp_stanza | train | py |
1c5b0bf216232e1d8fd34c6662dc0f410c24fe8e | diff --git a/components/Hint/Hint.js b/components/Hint/Hint.js
index <HASH>..<HASH> 100644
--- a/components/Hint/Hint.js
+++ b/components/Hint/Hint.js
@@ -125,12 +125,12 @@ export default class Hint extends React.Component<Props, State> {
}
_renderContent() {
- const { pos } = this.props;
+ const { pos, maxWidth } = this.props;
const className = classNames({
[styles.root]: true,
[styles.rootCenter]: pos === 'top' || pos === 'bottom'
});
- return <div className={className}>{this.props.text}</div>;
+ return <div className={className} style={{ maxWidth }}>{this.props.text}</div>;
}
_ref = (el: ?HTMLElement) => { | Make maxWidth prop work again (#<I>) | skbkontur_retail-ui | train | js |
06ab3b069b5c17c081314d91cfcd3aa9c819923b | diff --git a/spec/scheduler_spec.rb b/spec/scheduler_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/scheduler_spec.rb
+++ b/spec/scheduler_spec.rb
@@ -156,6 +156,35 @@ describe SCHEDULER_CLASS do
end
end
end
+
+ context 'trigger threads' do
+
+ before(:each) do
+ @s = start_scheduler
+ end
+ after(:each) do
+ stop_scheduler(@s)
+ end
+
+ describe '#trigger_threads' do
+
+ it 'returns an empty list when no jobs are running' do
+
+ @s.trigger_threads.should == []
+ end
+
+ it 'returns a list of the threads of the running jobs' do
+
+ @s.in '1s' do
+ sleep 10
+ end
+
+ sleep 1.5
+
+ @s.trigger_threads.collect { |e| e.class }.should == [ Thread ]
+ end
+ end
+ end
end
describe 'Rufus::Scheduler#start_new' do | Scheduler#trigger_threads specs | jmettraux_rufus-scheduler | train | rb |
e3b52f01f356bc86b6299337d599e678fea1d421 | diff --git a/filesystems/native.py b/filesystems/native.py
index <HASH>..<HASH> 100644
--- a/filesystems/native.py
+++ b/filesystems/native.py
@@ -22,7 +22,7 @@ def _create_file(fs, path):
raise exceptions.SymbolicLoop(path.parent())
raise
- return io.open(fd, "w+b")
+ return io.open(fd, "w+")
def _open_file(fs, path, mode):
diff --git a/filesystems/tests/common.py b/filesystems/tests/common.py
index <HASH>..<HASH> 100644
--- a/filesystems/tests/common.py
+++ b/filesystems/tests/common.py
@@ -106,7 +106,7 @@ class TestFS(object):
self.addCleanup(fs.remove, tempdir)
with fs.create(tempdir.descendant("unittesting")) as f:
- f.write(b"some things!")
+ f.write("some things!")
with fs.open(tempdir.descendant("unittesting")) as g:
self.assertEqual(g.read(), "some things!")
@@ -452,7 +452,7 @@ class TestFS(object):
child = to.descendant("child")
with fs.create(child) as f:
- f.write(b"some things over here!")
+ f.write("some things over here!")
self.assertEqual(fs.contents_of(child), "some things over here!") | Make create also return file objects expecting native strings...
Fixes the tests on Py3. | Julian_Filesystems | train | py,py |
b1d1cc489de11e4ddb279fbfee37d7b6ae72728b | diff --git a/src/DI/ConsoleExtension.php b/src/DI/ConsoleExtension.php
index <HASH>..<HASH> 100644
--- a/src/DI/ConsoleExtension.php
+++ b/src/DI/ConsoleExtension.php
@@ -46,7 +46,7 @@ class ConsoleExtension extends CompilerExtension
return Expect::structure([
'url' => Expect::string(),
'name' => Expect::string(),
- 'version' => Expect::string(),
+ 'version' => Expect::anyOf(Expect::string(), Expect::int(), Expect::float()),
'catchExceptions' => Expect::bool(),
'autoExit' => Expect::bool(),
'helperSet' => Expect::string(),
@@ -76,7 +76,7 @@ class ConsoleExtension extends CompilerExtension
}
if ($config->version !== null) {
- $applicationDef->addSetup('setVersion', [$config->version]);
+ $applicationDef->addSetup('setVersion', [(string) $config->version]);
}
if ($config->catchExceptions !== null) { | ConsoleExtension: allow console version to be numeric | contributte_console | train | php |
77cc2aeba08eacb08a844ce9c7ac8d1e4c7c82ee | diff --git a/lib/sudoku_solver/solver.rb b/lib/sudoku_solver/solver.rb
index <HASH>..<HASH> 100644
--- a/lib/sudoku_solver/solver.rb
+++ b/lib/sudoku_solver/solver.rb
@@ -41,18 +41,21 @@ module SudokuSolver
end
def restrict(cell)
+ taken = neighbours_values(cell).reject { |r| r.length > 1 }.flatten
+ remaining = (cell.content - taken).sort
+ (cell.content == remaining) || ! (cell.content = remaining)
+ end
+
+ def neighbours_values(cell)
grid = cell.map
sx = cell.x - cell.x % @dimension
sy = cell.y - cell.y % @dimension
- neighbouring_values = [
- grid[@size, cell.y],
- grid[cell.x, @size],
- grid[sx..(sx + @dimension - 1), sy..(sy + @dimension - 1)] ].
+ neighbours_values = [
+ cell.map[@size, cell.y],
+ cell.map[cell.x, @size],
+ cell.map[sx..(sx + @dimension - 1), sy..(sy + @dimension - 1)] ].
inject([]) { |r, z| r + z.collect { |d|
(d == cell) ? nil : d.content } }.compact.uniq
- taken = neighbouring_values.reject { |r| r.length > 1 }.flatten
- remaining = (cell.content - taken).sort
- (cell.content == remaining) || ! (cell.content = remaining)
end
end
end | A bit of refactoring. | Bastes_SudokuSolver | train | rb |
d5263b4c020cc2e95425e5082c0dc97a307655ab | diff --git a/lib/ooor/naming.rb b/lib/ooor/naming.rb
index <HASH>..<HASH> 100644
--- a/lib/ooor/naming.rb
+++ b/lib/ooor/naming.rb
@@ -10,7 +10,7 @@ module Ooor
namespace = self.parents.detect do |n|
n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
end
- ActiveModel::Name.new(self, namespace, self.description).tap do |r|
+ ActiveModel::Name.new(self, namespace, self.description || self.openerp_model).tap do |r|
def r.param_key
@klass.openerp_model.gsub('.', '_')
end | fallback for mode names for models loaded on the fly | akretion_ooor | train | rb |
0ad57ca49e9ca519a62ae5da00d2217ba91f464e | diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py
index <HASH>..<HASH> 100644
--- a/tests/test_build_ext.py
+++ b/tests/test_build_ext.py
@@ -77,8 +77,9 @@ class BuildExtTestCase(support.TempdirManager,
self.assertEqual(xx.foo(2, 5), 7)
self.assertEqual(xx.foo(13,15), 28)
self.assertEqual(xx.new().demo(), None)
- doc = 'This is a template module just for instruction.'
- self.assertEqual(xx.__doc__, doc)
+ if test_support.HAVE_DOCSTRINGS:
+ doc = 'This is a template module just for instruction.'
+ self.assertEqual(xx.__doc__, doc)
self.assertTrue(isinstance(xx.Null(), xx.Null))
self.assertTrue(isinstance(xx.Str(), xx.Str)) | - Issue #<I>: Fix testing when Python is configured with the
--without-doc-strings option. | pypa_setuptools | train | py |
3e939b2425c0f513ed9a5864f8096246ca54a818 | diff --git a/treetime/merger_models.py b/treetime/merger_models.py
index <HASH>..<HASH> 100644
--- a/treetime/merger_models.py
+++ b/treetime/merger_models.py
@@ -33,12 +33,14 @@ class Coalescent(object):
Args:
- Tc: a float or an iterable, if iterable another argument T of same shape is required
- T: an array like of same shape as Tc that specifies the time pivots corresponding to Tc
+ note that this array is ordered past to present corresponding to
+ decreasing 'time before present' values
Returns:
- None
'''
if isinstance(Tc, Iterable):
if len(Tc)==len(T):
- x = np.concatenate(([-ttconf.BIG_NUMBER], T, [ttconf.BIG_NUMBER]))
+ x = np.concatenate(([ttconf.BIG_NUMBER], T, [-ttconf.BIG_NUMBER]))
y = np.concatenate(([Tc[0]], Tc, [Tc[-1]]))
self.Tc = interp1d(x,y)
else: | merger_models: fix problem with extremal timepoints were flipped in skyline | neherlab_treetime | train | py |
bc7b3be0d24025d31a98f5cfb05bdf6efb0f5af0 | diff --git a/lib/linner/command.rb b/lib/linner/command.rb
index <HASH>..<HASH> 100644
--- a/lib/linner/command.rb
+++ b/lib/linner/command.rb
@@ -97,7 +97,6 @@ module Linner
Listen.to Linner.root, filter: /(config\.yml|Linnerfile)$/ do |modified, added, removed|
Linner.env = Environment.new Linner.config_file
Linner::Bundler.new(env.bundles).perform
- perform
end
end | remove extra perform in watch env | SaitoWu_linner | train | rb |
77fc639286fc1496e7af892259b38f0289bfc441 | diff --git a/pkg/tools/cidlc/gen_rpc.go b/pkg/tools/cidlc/gen_rpc.go
index <HASH>..<HASH> 100644
--- a/pkg/tools/cidlc/gen_rpc.go
+++ b/pkg/tools/cidlc/gen_rpc.go
@@ -90,7 +90,7 @@ func (g *RPCGenerator) EmitFile(file string, pkg *Package, members []Member) err
emitHeaderWarning(w)
// Now emit the package name at the top-level.
- writefmtln(w, "package %vrpc", pkg.Name)
+ writefmtln(w, "package %v", pkg.Pkginfo.Pkg.Name())
writefmtln(w, "")
// And all of the imports that we're going to need. | Don't mangle RPC package names | pulumi_pulumi | train | go |
49e86d103f33f39ae8f96af7ce834e5ab0310d48 | diff --git a/lib/webrat/selenium/matchers.rb b/lib/webrat/selenium/matchers.rb
index <HASH>..<HASH> 100644
--- a/lib/webrat/selenium/matchers.rb
+++ b/lib/webrat/selenium/matchers.rb
@@ -1,4 +1,4 @@
require "webrat/selenium/matchers/have_xpath"
require "webrat/selenium/matchers/have_selector"
-require "webrat/selenium/matchers/have_tag"
+# require "webrat/selenium/matchers/have_tag"
require "webrat/selenium/matchers/have_content"
\ No newline at end of file | comment out have_tag from selenium matcher which overrides rails' have_tag
partially reverts <I>f<I>a<I>c<I>d<I>a<I>f<I>af6a<I>b3 | brynary_webrat | train | rb |
deed09c877ca528d3e1dfd5c21fbcc8a480c463f | diff --git a/src/query/FindAll.php b/src/query/FindAll.php
index <HASH>..<HASH> 100644
--- a/src/query/FindAll.php
+++ b/src/query/FindAll.php
@@ -62,6 +62,16 @@ class FindAll extends \UniMapper\Query implements IConditionable
$result = false;
$entityMappers = $this->entityReflection->getMappers();
+ // Add properties from conditions to the selection if not set
+ if (count($this->conditions) > 0 && count($this->selection) > 0) {
+ foreach ($this->conditions as $condition) {
+ $propertyName = $condition->getExpression();
+ if (!isset($this->selection[$propertyName])) {
+ $this->selection[] = $propertyName;
+ }
+ }
+ }
+
foreach ($this->mappers as $mapper) {
if (isset($entityMappers[get_class($mapper)])) { | queries: FindAll - fixed missing properties in selection if conditions set | unimapper_unimapper | train | php |
c956457510af0c77badea289d9d1b2953467f0aa | diff --git a/router/api/router_test.go b/router/api/router_test.go
index <HASH>..<HASH> 100644
--- a/router/api/router_test.go
+++ b/router/api/router_test.go
@@ -365,7 +365,7 @@ func newFakeRouter(c *check.C) *fakeRouterAPI {
r.HandleFunc("/certificate/{cname}", api.getCertificate).Methods(http.MethodGet)
r.HandleFunc("/certificate/{cname}", api.addCertificate).Methods(http.MethodPut)
r.HandleFunc("/certificate/{cname}", api.removeCertificate).Methods(http.MethodDelete)
- listener, err := net.Listen("tcp", "")
+ listener, err := net.Listen("tcp", "127.0.0.1:0")
c.Assert(err, check.IsNil)
api.listener = listener
api.endpoint = fmt.Sprintf("http://%s", listener.Addr().String()) | router/api: listen on localhost on tests | tsuru_tsuru | train | go |
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.