commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
f8d4bd8b3fc0ed960d8892beace9343d8d33580d
sonar-project.properties
sonar-project.properties
sonar.projectKey=egblas sonar.projectName=egblas sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.sources=include,test,src sonar.language=c++ # Add include directories to sonar-cxx sonar.cxx.includeDirectories=include,Catch/include,test/include # Reports file for sonar-cxx sonar.cxx.cppcheck.reportPath=cppcheck_report.xml sonar.cxx.xunit.reportPath=catch_report.xml # Declare list of ignore filters sonar.issue.ignore.multicriteria=notest # Ignore all issues on test sources sonar.issue.ignore.multicriteria.notest.ruleKey=* sonar.issue.ignore.multicriteria.notest.resourceKey=test/src/*
sonar.projectKey=egblas sonar.projectName=egblas sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.sources=include,test,src sonar.language=c++ sonar.cxx.suffixes.sources=.cpp,.cu # Add include directories to sonar-cxx sonar.cxx.includeDirectories=include,Catch/include,test/include # Reports file for sonar-cxx sonar.cxx.cppcheck.reportPath=cppcheck_report.xml sonar.cxx.xunit.reportPath=catch_report.xml # Declare list of ignore filters sonar.issue.ignore.multicriteria=notest # Ignore all issues on test sources sonar.issue.ignore.multicriteria.notest.ruleKey=* sonar.issue.ignore.multicriteria.notest.resourceKey=test/src/*
Include CUDA sources in analysis
Include CUDA sources in analysis
INI
mit
wichtounet/etl-gpu-blas,wichtounet/etl-gpu-blas
ini
## Code Before: sonar.projectKey=egblas sonar.projectName=egblas sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.sources=include,test,src sonar.language=c++ # Add include directories to sonar-cxx sonar.cxx.includeDirectories=include,Catch/include,test/include # Reports file for sonar-cxx sonar.cxx.cppcheck.reportPath=cppcheck_report.xml sonar.cxx.xunit.reportPath=catch_report.xml # Declare list of ignore filters sonar.issue.ignore.multicriteria=notest # Ignore all issues on test sources sonar.issue.ignore.multicriteria.notest.ruleKey=* sonar.issue.ignore.multicriteria.notest.resourceKey=test/src/* ## Instruction: Include CUDA sources in analysis ## Code After: sonar.projectKey=egblas sonar.projectName=egblas sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.sources=include,test,src sonar.language=c++ sonar.cxx.suffixes.sources=.cpp,.cu # Add include directories to sonar-cxx sonar.cxx.includeDirectories=include,Catch/include,test/include # Reports file for sonar-cxx sonar.cxx.cppcheck.reportPath=cppcheck_report.xml sonar.cxx.xunit.reportPath=catch_report.xml # Declare list of ignore filters sonar.issue.ignore.multicriteria=notest # Ignore all issues on test sources sonar.issue.ignore.multicriteria.notest.ruleKey=* sonar.issue.ignore.multicriteria.notest.resourceKey=test/src/*
sonar.projectKey=egblas sonar.projectName=egblas sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.sources=include,test,src sonar.language=c++ + + sonar.cxx.suffixes.sources=.cpp,.cu # Add include directories to sonar-cxx sonar.cxx.includeDirectories=include,Catch/include,test/include # Reports file for sonar-cxx sonar.cxx.cppcheck.reportPath=cppcheck_report.xml sonar.cxx.xunit.reportPath=catch_report.xml # Declare list of ignore filters sonar.issue.ignore.multicriteria=notest # Ignore all issues on test sources sonar.issue.ignore.multicriteria.notest.ruleKey=* sonar.issue.ignore.multicriteria.notest.resourceKey=test/src/*
2
0.095238
2
0
ccf04e8eef384610b0f17f1192747b677cee4778
uber/templates/preregistration/phone_numbers.html
uber/templates/preregistration/phone_numbers.html
<div class="form-group"> <label for="cellphone" class="col-sm-2 control-label">Your Phone Number</label> <div class="col-sm-6"> <input type="text" name="cellphone" id="cellphone" value="{{ attendee.cellphone }}" class="form-control" placeholder="Your Phone Number"> </div> </div> <div class="form-group"> <div class="checkbox col-sm-6 col-sm-offset-2"> <label> {% checkbox attendee.no_cellphone %} I don't wish to provide a phone number. </label> </div> </div> <div class="form-group"> <label for="ec_phone" class="col-sm-2 control-label">Backup Phone Number</label> <div class="col-sm-6"> <input type="text" name="ec_name" id="ec_name" value="{{ attendee.ec_name }}" class="form-control" placeholder="Backup Phone Name"> </div> <br /><br /> <div class="col-sm-6"> <input type="text" name="ec_phone" id="ec_phone" value="{{ attendee.ec_phone }}" class="form-control" placeholder="Backup Phone Number"> </div> </div>
<div class="form-group"> <label for="cellphone" class="col-sm-2 control-label">Your Phone Number</label> <div class="col-sm-6"> <input type="text" name="cellphone" id="cellphone" value="{{ attendee.cellphone }}" class="form-control" placeholder="Your Phone Number"> </div> </div> {% if not attendee.is_dealer %} <div class="form-group"> <div class="checkbox col-sm-6 col-sm-offset-2"> <label> {% checkbox attendee.no_cellphone %} I don't wish to provide a phone number. </label> </div> </div> {% endif %} <div class="form-group"> <label for="ec_phone" class="col-sm-2 control-label">Backup Phone Number</label> <div class="col-sm-6"> <input type="text" name="ec_name" id="ec_name" value="{{ attendee.ec_name }}" class="form-control" placeholder="Backup Phone Name"> </div> <br /><br /> <div class="col-sm-6"> <input type="text" name="ec_phone" id="ec_phone" value="{{ attendee.ec_phone }}" class="form-control" placeholder="Backup Phone Number"> </div> </div>
Hide phone opt-out for dealers
Hide phone opt-out for dealers Dealers aren't allowed to opt out of a phone number, so the checkbox to do so is now hidden for them.
HTML
agpl-3.0
RAMSProject/rams,migetman9/ubersystem,md1024/rams,magfest/ubersystem,md1024/rams,magfest/ubersystem,md1024/rams,magfest/ubersystem,migetman9/ubersystem,migetman9/ubersystem,magfest/ubersystem,RAMSProject/rams,RAMSProject/rams
html
## Code Before: <div class="form-group"> <label for="cellphone" class="col-sm-2 control-label">Your Phone Number</label> <div class="col-sm-6"> <input type="text" name="cellphone" id="cellphone" value="{{ attendee.cellphone }}" class="form-control" placeholder="Your Phone Number"> </div> </div> <div class="form-group"> <div class="checkbox col-sm-6 col-sm-offset-2"> <label> {% checkbox attendee.no_cellphone %} I don't wish to provide a phone number. </label> </div> </div> <div class="form-group"> <label for="ec_phone" class="col-sm-2 control-label">Backup Phone Number</label> <div class="col-sm-6"> <input type="text" name="ec_name" id="ec_name" value="{{ attendee.ec_name }}" class="form-control" placeholder="Backup Phone Name"> </div> <br /><br /> <div class="col-sm-6"> <input type="text" name="ec_phone" id="ec_phone" value="{{ attendee.ec_phone }}" class="form-control" placeholder="Backup Phone Number"> </div> </div> ## Instruction: Hide phone opt-out for dealers Dealers aren't allowed to opt out of a phone number, so the checkbox to do so is now hidden for them. ## Code After: <div class="form-group"> <label for="cellphone" class="col-sm-2 control-label">Your Phone Number</label> <div class="col-sm-6"> <input type="text" name="cellphone" id="cellphone" value="{{ attendee.cellphone }}" class="form-control" placeholder="Your Phone Number"> </div> </div> {% if not attendee.is_dealer %} <div class="form-group"> <div class="checkbox col-sm-6 col-sm-offset-2"> <label> {% checkbox attendee.no_cellphone %} I don't wish to provide a phone number. </label> </div> </div> {% endif %} <div class="form-group"> <label for="ec_phone" class="col-sm-2 control-label">Backup Phone Number</label> <div class="col-sm-6"> <input type="text" name="ec_name" id="ec_name" value="{{ attendee.ec_name }}" class="form-control" placeholder="Backup Phone Name"> </div> <br /><br /> <div class="col-sm-6"> <input type="text" name="ec_phone" id="ec_phone" value="{{ attendee.ec_phone }}" class="form-control" placeholder="Backup Phone Number"> </div> </div>
<div class="form-group"> <label for="cellphone" class="col-sm-2 control-label">Your Phone Number</label> <div class="col-sm-6"> <input type="text" name="cellphone" id="cellphone" value="{{ attendee.cellphone }}" class="form-control" placeholder="Your Phone Number"> </div> </div> + {% if not attendee.is_dealer %} <div class="form-group"> <div class="checkbox col-sm-6 col-sm-offset-2"> <label> {% checkbox attendee.no_cellphone %} I don't wish to provide a phone number. </label> </div> </div> + {% endif %} <div class="form-group"> <label for="ec_phone" class="col-sm-2 control-label">Backup Phone Number</label> <div class="col-sm-6"> <input type="text" name="ec_name" id="ec_name" value="{{ attendee.ec_name }}" class="form-control" placeholder="Backup Phone Name"> </div> <br /><br /> <div class="col-sm-6"> <input type="text" name="ec_phone" id="ec_phone" value="{{ attendee.ec_phone }}" class="form-control" placeholder="Backup Phone Number"> </div> </div>
2
0.083333
2
0
d9e20b91d2ada761eec3d0fa49f95093fd4d51bb
tests/bootstrap.php
tests/bootstrap.php
<?php use Desk\Test\Helper\TestCase; use Guzzle\Service\Builder\ServiceBuilder; error_reporting(-1); $ds = DIRECTORY_SEPARATOR; $autoloader = dirname(__DIR__) . "{$ds}vendor{$ds}autoload.php"; // Ensure that Composer dependencies have been installed locally if (!file_exists($autoloader)) { die( "Dependencies must be installed using Composer:\n\n" . "composer.phar install --dev\n\n" . "See https://github.com/composer/composer/blob/master/README.md " . "for help with installing composer\n" ); } // Include the Composer autoloader require_once $autoloader; // Configure Guzzle service builder if (isset($_SERVER['DESK_TEST_CONFIG'])) { $config = $_SERVER['DESK_TEST_CONFIG']; } else { $config = __DIR__ . '/service/mock.json'; } TestCase::setServiceBuilder(ServiceBuilder::factory($config)); TestCase::setTestsBasePath(__DIR__); TestCase::setMockBasePath(__DIR__ . '/mock');
<?php use Desk\Test\Helper\TestCase; use Guzzle\Service\Builder\ServiceBuilder; ini_set('memory_limit', '256M'); error_reporting(-1); $ds = DIRECTORY_SEPARATOR; $autoloader = dirname(__DIR__) . "{$ds}vendor{$ds}autoload.php"; // Ensure that Composer dependencies have been installed locally if (!file_exists($autoloader)) { die( "Dependencies must be installed using Composer:\n\n" . "composer.phar install --dev\n\n" . "See https://github.com/composer/composer/blob/master/README.md " . "for help with installing composer\n" ); } // Include the Composer autoloader require_once $autoloader; // Configure Guzzle service builder if (isset($_SERVER['DESK_TEST_CONFIG'])) { $config = $_SERVER['DESK_TEST_CONFIG']; } else { $config = __DIR__ . '/service/mock.json'; } TestCase::setServiceBuilder(ServiceBuilder::factory($config)); TestCase::setTestsBasePath(__DIR__); TestCase::setMockBasePath(__DIR__ . '/mock');
Fix PHP OOM error while processing test coverage
Fix PHP OOM error while processing test coverage
PHP
mit
quizlet/desk-php,bradfeehan/desk-php,bradfeehan/desk-php,quizlet/desk-php,4ernovm/desk-php,4ernovm/desk-php
php
## Code Before: <?php use Desk\Test\Helper\TestCase; use Guzzle\Service\Builder\ServiceBuilder; error_reporting(-1); $ds = DIRECTORY_SEPARATOR; $autoloader = dirname(__DIR__) . "{$ds}vendor{$ds}autoload.php"; // Ensure that Composer dependencies have been installed locally if (!file_exists($autoloader)) { die( "Dependencies must be installed using Composer:\n\n" . "composer.phar install --dev\n\n" . "See https://github.com/composer/composer/blob/master/README.md " . "for help with installing composer\n" ); } // Include the Composer autoloader require_once $autoloader; // Configure Guzzle service builder if (isset($_SERVER['DESK_TEST_CONFIG'])) { $config = $_SERVER['DESK_TEST_CONFIG']; } else { $config = __DIR__ . '/service/mock.json'; } TestCase::setServiceBuilder(ServiceBuilder::factory($config)); TestCase::setTestsBasePath(__DIR__); TestCase::setMockBasePath(__DIR__ . '/mock'); ## Instruction: Fix PHP OOM error while processing test coverage ## Code After: <?php use Desk\Test\Helper\TestCase; use Guzzle\Service\Builder\ServiceBuilder; ini_set('memory_limit', '256M'); error_reporting(-1); $ds = DIRECTORY_SEPARATOR; $autoloader = dirname(__DIR__) . "{$ds}vendor{$ds}autoload.php"; // Ensure that Composer dependencies have been installed locally if (!file_exists($autoloader)) { die( "Dependencies must be installed using Composer:\n\n" . "composer.phar install --dev\n\n" . "See https://github.com/composer/composer/blob/master/README.md " . "for help with installing composer\n" ); } // Include the Composer autoloader require_once $autoloader; // Configure Guzzle service builder if (isset($_SERVER['DESK_TEST_CONFIG'])) { $config = $_SERVER['DESK_TEST_CONFIG']; } else { $config = __DIR__ . '/service/mock.json'; } TestCase::setServiceBuilder(ServiceBuilder::factory($config)); TestCase::setTestsBasePath(__DIR__); TestCase::setMockBasePath(__DIR__ . '/mock');
<?php use Desk\Test\Helper\TestCase; use Guzzle\Service\Builder\ServiceBuilder; + ini_set('memory_limit', '256M'); error_reporting(-1); $ds = DIRECTORY_SEPARATOR; $autoloader = dirname(__DIR__) . "{$ds}vendor{$ds}autoload.php"; // Ensure that Composer dependencies have been installed locally if (!file_exists($autoloader)) { die( "Dependencies must be installed using Composer:\n\n" . "composer.phar install --dev\n\n" . "See https://github.com/composer/composer/blob/master/README.md " . "for help with installing composer\n" ); } // Include the Composer autoloader require_once $autoloader; // Configure Guzzle service builder if (isset($_SERVER['DESK_TEST_CONFIG'])) { $config = $_SERVER['DESK_TEST_CONFIG']; } else { $config = __DIR__ . '/service/mock.json'; } TestCase::setServiceBuilder(ServiceBuilder::factory($config)); TestCase::setTestsBasePath(__DIR__); TestCase::setMockBasePath(__DIR__ . '/mock');
1
0.029412
1
0
7b520e973ed9a72cc3b68bda0a48c89b6d60558b
examples/connect4_uci_outcomes.py
examples/connect4_uci_outcomes.py
from __future__ import division, print_function from collections import Counter from capstone.util.c4uci import load_instance FILENAME = 'datasets/connect-4.data' outcomes = [] with open(FILENAME) as f: for i, line in enumerate(f, 1): _, outcome = load_instance(line) outcomes.append(outcome) if i % 1000 == 0: print(i) counter = Counter(outcomes) print('\n---------') print(' Results') print('---------\n') print('total: {}'.format(len(outcomes))) for outcome in ['win', 'loss', 'draw']: print('{outcome}: {count} ({pct:.2f}%)'.format( outcome=outcome, count=counter[outcome], pct=((counter[outcome] / len(outcomes)) * 100) ))
from __future__ import division, print_function import pandas as pd from sklearn.linear_model import LinearRegression from capstone.game import Connect4 as C4 from capstone.util import print_header FILENAME = 'datasets/connect-4.data' def column_name(i): if i == 42: return 'outcome' row = chr(ord('a') + (i // C4.ROWS)) col = (i % C4.ROWS) + 1 return '{row}{col}'.format(row=row, col=col) column_names = [column_name(i) for i in range(43)] df = pd.read_csv(FILENAME, header=None, names=column_names) outcomes = df.loc[:, 'outcome'] print_header('Dataset') print(df, end='\n\n') print_header('Number of instances') print(df.shape[0], end='\n\n') print_header('Outcomes') print(outcomes.value_counts(), end='\n\n') print_header('Normalized Outcomes') print(outcomes.value_counts(normalize=True))
Use pandas dataframes for UCI C4 dataset
Use pandas dataframes for UCI C4 dataset
Python
mit
davidrobles/mlnd-capstone-code
python
## Code Before: from __future__ import division, print_function from collections import Counter from capstone.util.c4uci import load_instance FILENAME = 'datasets/connect-4.data' outcomes = [] with open(FILENAME) as f: for i, line in enumerate(f, 1): _, outcome = load_instance(line) outcomes.append(outcome) if i % 1000 == 0: print(i) counter = Counter(outcomes) print('\n---------') print(' Results') print('---------\n') print('total: {}'.format(len(outcomes))) for outcome in ['win', 'loss', 'draw']: print('{outcome}: {count} ({pct:.2f}%)'.format( outcome=outcome, count=counter[outcome], pct=((counter[outcome] / len(outcomes)) * 100) )) ## Instruction: Use pandas dataframes for UCI C4 dataset ## Code After: from __future__ import division, print_function import pandas as pd from sklearn.linear_model import LinearRegression from capstone.game import Connect4 as C4 from capstone.util import print_header FILENAME = 'datasets/connect-4.data' def column_name(i): if i == 42: return 'outcome' row = chr(ord('a') + (i // C4.ROWS)) col = (i % C4.ROWS) + 1 return '{row}{col}'.format(row=row, col=col) column_names = [column_name(i) for i in range(43)] df = pd.read_csv(FILENAME, header=None, names=column_names) outcomes = df.loc[:, 'outcome'] print_header('Dataset') print(df, end='\n\n') print_header('Number of instances') print(df.shape[0], end='\n\n') print_header('Outcomes') print(outcomes.value_counts(), end='\n\n') print_header('Normalized Outcomes') print(outcomes.value_counts(normalize=True))
from __future__ import division, print_function - from collections import Counter - from capstone.util.c4uci import load_instance + import pandas as pd + from sklearn.linear_model import LinearRegression + from capstone.game import Connect4 as C4 + from capstone.util import print_header FILENAME = 'datasets/connect-4.data' - outcomes = [] + def column_name(i): + if i == 42: + return 'outcome' + row = chr(ord('a') + (i // C4.ROWS)) + col = (i % C4.ROWS) + 1 + return '{row}{col}'.format(row=row, col=col) + column_names = [column_name(i) for i in range(43)] + df = pd.read_csv(FILENAME, header=None, names=column_names) + outcomes = df.loc[:, 'outcome'] - with open(FILENAME) as f: - for i, line in enumerate(f, 1): - _, outcome = load_instance(line) - outcomes.append(outcome) - if i % 1000 == 0: - print(i) - counter = Counter(outcomes) - print('\n---------') - print(' Results') - print('---------\n') - print('total: {}'.format(len(outcomes))) - for outcome in ['win', 'loss', 'draw']: - print('{outcome}: {count} ({pct:.2f}%)'.format( - outcome=outcome, - count=counter[outcome], - pct=((counter[outcome] / len(outcomes)) * 100) - )) + print_header('Dataset') + print(df, end='\n\n') + + print_header('Number of instances') + print(df.shape[0], end='\n\n') + + print_header('Outcomes') + print(outcomes.value_counts(), end='\n\n') + + print_header('Normalized Outcomes') + print(outcomes.value_counts(normalize=True))
44
1.692308
24
20
36411c497a947d64c7ca5cc2a7790818525a3d97
README.md
README.md
Allows your users to create an image based key that they must select after entering their usual email/password for added security. ## Prerequistes If you wish to use the locking feature of this extension ensure you have already enable Devise's lockable module. ## Configuration Add the gem to your Gemfile: gem 'image_auth' Now bundle: bundle install To add the require migration and configuration to your model, run: bundle exec rails g image_auth MODEL Now run the migration bundle exec rake db:migrate To enable locking, in your devise initializer set config.lock_after_failed_attempts = true The number of failed attempts is set using config.maximum_attempts = 3 And the number of images available to select is set using: config.maximum_categories = 3 This defaults to 3 ## Credits Originally developed for [www.strongcoin.com](https://www.strongcoin.com)
Allows your users to create an image based key that they must select after entering their usual email/password for added security. ## Prerequistes If you wish to use the locking feature of this extension ensure you have already enable Devise's lockable module. ## Configuration Add the gem to your Gemfile: gem 'image_authentication' Now bundle: bundle install To add the require migration and configuration to your model, run: bundle exec rails g image_authentication MODEL Now run the migration bundle exec rake db:migrate To enable locking, in your devise initializer set config.lock_after_failed_attempts = true The number of failed attempts is set using config.maximum_attempts = 3 And the number of images available to select is set using: config.maximum_categories = 3 This defaults to 3 You'll now want to provide a link to 'enable_user_image_authentication_path' to user's can set their images and enable this. You will also want to provide another link to 'disable_user_image_authentication_path' so a user can disable image authentication. ## Credits Originally developed for [www.strongcoin.com](https://www.strongcoin.com)
Fix gem name. Add details on enable/disable links
Fix gem name. Add details on enable/disable links
Markdown
mit
invisiblelines/image_authentication,invisiblelines/image_authentication,invisiblelines/image_authentication
markdown
## Code Before: Allows your users to create an image based key that they must select after entering their usual email/password for added security. ## Prerequistes If you wish to use the locking feature of this extension ensure you have already enable Devise's lockable module. ## Configuration Add the gem to your Gemfile: gem 'image_auth' Now bundle: bundle install To add the require migration and configuration to your model, run: bundle exec rails g image_auth MODEL Now run the migration bundle exec rake db:migrate To enable locking, in your devise initializer set config.lock_after_failed_attempts = true The number of failed attempts is set using config.maximum_attempts = 3 And the number of images available to select is set using: config.maximum_categories = 3 This defaults to 3 ## Credits Originally developed for [www.strongcoin.com](https://www.strongcoin.com) ## Instruction: Fix gem name. Add details on enable/disable links ## Code After: Allows your users to create an image based key that they must select after entering their usual email/password for added security. ## Prerequistes If you wish to use the locking feature of this extension ensure you have already enable Devise's lockable module. ## Configuration Add the gem to your Gemfile: gem 'image_authentication' Now bundle: bundle install To add the require migration and configuration to your model, run: bundle exec rails g image_authentication MODEL Now run the migration bundle exec rake db:migrate To enable locking, in your devise initializer set config.lock_after_failed_attempts = true The number of failed attempts is set using config.maximum_attempts = 3 And the number of images available to select is set using: config.maximum_categories = 3 This defaults to 3 You'll now want to provide a link to 'enable_user_image_authentication_path' to user's can set their images and enable this. You will also want to provide another link to 'disable_user_image_authentication_path' so a user can disable image authentication. ## Credits Originally developed for [www.strongcoin.com](https://www.strongcoin.com)
Allows your users to create an image based key that they must select after entering their usual email/password for added security. ## Prerequistes If you wish to use the locking feature of this extension ensure you have already enable Devise's lockable module. ## Configuration Add the gem to your Gemfile: - gem 'image_auth' + gem 'image_authentication' ? ++++++++++ Now bundle: bundle install To add the require migration and configuration to your model, run: - bundle exec rails g image_auth MODEL + bundle exec rails g image_authentication MODEL ? ++++++++++ Now run the migration bundle exec rake db:migrate To enable locking, in your devise initializer set config.lock_after_failed_attempts = true The number of failed attempts is set using config.maximum_attempts = 3 And the number of images available to select is set using: config.maximum_categories = 3 This defaults to 3 + You'll now want to provide a link to 'enable_user_image_authentication_path' to user's can set their images and enable this. + You will also want to provide another link to 'disable_user_image_authentication_path' so a user can disable image authentication. + ## Credits Originally developed for [www.strongcoin.com](https://www.strongcoin.com)
7
0.166667
5
2
2aed124253ab662955929c21b85d76f0935b6fec
image/shared/src/main/scala/doodle/image/syntax/package.scala
image/shared/src/main/scala/doodle/image/syntax/package.scala
package doodle package image package object syntax extends ImageSyntax with TraverseImageSyntax { object image extends ImageSyntax object traverse extends TraverseImageSyntax }
package doodle package image package object syntax extends ImageSyntax with TraverseImageSyntax { object image extends ImageSyntax object traverse extends TraverseImageSyntax /** * The core object defines syntax for doodle.core, which is a convenient way * to avoid pulling in Algebra syntax that may conflict with Image. */ object core extends doodle.syntax.AngleSyntax with doodle.syntax.NormalizedSyntax with doodle.syntax.UnsignedByteSyntax }
Add syntax to make it easier to use Image
Add syntax to make it easier to use Image You can just import `doodle.image.syntax.core_` to get syntax for `Angle` and so on without getting syntax for the algebras. Some of the algebra syntax could cause confusing conflicts with methods on `Image`.
Scala
apache-2.0
underscoreio/doodle,underscoreio/doodle
scala
## Code Before: package doodle package image package object syntax extends ImageSyntax with TraverseImageSyntax { object image extends ImageSyntax object traverse extends TraverseImageSyntax } ## Instruction: Add syntax to make it easier to use Image You can just import `doodle.image.syntax.core_` to get syntax for `Angle` and so on without getting syntax for the algebras. Some of the algebra syntax could cause confusing conflicts with methods on `Image`. ## Code After: package doodle package image package object syntax extends ImageSyntax with TraverseImageSyntax { object image extends ImageSyntax object traverse extends TraverseImageSyntax /** * The core object defines syntax for doodle.core, which is a convenient way * to avoid pulling in Algebra syntax that may conflict with Image. */ object core extends doodle.syntax.AngleSyntax with doodle.syntax.NormalizedSyntax with doodle.syntax.UnsignedByteSyntax }
package doodle package image package object syntax extends ImageSyntax with TraverseImageSyntax { object image extends ImageSyntax object traverse extends TraverseImageSyntax + + /** + * The core object defines syntax for doodle.core, which is a convenient way + * to avoid pulling in Algebra syntax that may conflict with Image. + */ + object core + extends doodle.syntax.AngleSyntax + with doodle.syntax.NormalizedSyntax + with doodle.syntax.UnsignedByteSyntax }
9
1.285714
9
0
81c9d50e7ab2c93375bebf3de886e59c2ebb8043
0.15/docker-entrypoint.sh
0.15/docker-entrypoint.sh
set -e SAVES=/factorio/saves CONFIG=/factorio/config mkdir -p $SAVES mkdir -p /factorio/mods mkdir -p $CONFIG if [ ! -f $CONFIG/rconpw ]; then echo $(pwgen 15 1) > $CONFIG/rconpw fi if [ ! -f $CONFIG/server-settings.json ]; then cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json fi if [ ! -f $CONFIG/map-gen-settings.json ]; then cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json fi if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then /opt/factorio/bin/x64/factorio \ --create $SAVES/_autosave1.zip \ --map-gen-settings $CONFIG/map-gen-settings.json fi exec /opt/factorio/bin/x64/factorio \ --port $PORT \ --start-server-load-latest \ --server-settings $CONFIG/server-settings.json \ --rcon-port 27015 \ --rcon-password "$(cat $CONFIG/rconpw)"
set -e SAVES=/factorio/saves CONFIG=/factorio/config mkdir -p $SAVES mkdir -p /factorio/mods mkdir -p $CONFIG if [ ! -f $CONFIG/rconpw ]; then echo $(pwgen 15 1) > $CONFIG/rconpw fi if [ ! -f $CONFIG/server-settings.json ]; then cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json fi if [ ! -f $CONFIG/map-gen-settings.json ]; then cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json fi if [ ! -f $CONFIG/server-whitelist.json ]; then cp /opt/factorio/data/server-whitelist.example.json $CONFIG/server-whitelist.json fi if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then /opt/factorio/bin/x64/factorio \ --create $SAVES/_autosave1.zip \ --map-gen-settings $CONFIG/map-gen-settings.json fi exec /opt/factorio/bin/x64/factorio \ --port $PORT \ --start-server-load-latest \ --server-settings $CONFIG/server-settings.json \ --server-whitelist $CONFIG/server-whitelist.json \ --rcon-port 27015 \ --rcon-password "$(cat $CONFIG/rconpw)"
Add possibility to use a whitelist
Add possibility to use a whitelist
Shell
mit
dtandersen/docker_factorio_server
shell
## Code Before: set -e SAVES=/factorio/saves CONFIG=/factorio/config mkdir -p $SAVES mkdir -p /factorio/mods mkdir -p $CONFIG if [ ! -f $CONFIG/rconpw ]; then echo $(pwgen 15 1) > $CONFIG/rconpw fi if [ ! -f $CONFIG/server-settings.json ]; then cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json fi if [ ! -f $CONFIG/map-gen-settings.json ]; then cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json fi if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then /opt/factorio/bin/x64/factorio \ --create $SAVES/_autosave1.zip \ --map-gen-settings $CONFIG/map-gen-settings.json fi exec /opt/factorio/bin/x64/factorio \ --port $PORT \ --start-server-load-latest \ --server-settings $CONFIG/server-settings.json \ --rcon-port 27015 \ --rcon-password "$(cat $CONFIG/rconpw)" ## Instruction: Add possibility to use a whitelist ## Code After: set -e SAVES=/factorio/saves CONFIG=/factorio/config mkdir -p $SAVES mkdir -p /factorio/mods mkdir -p $CONFIG if [ ! -f $CONFIG/rconpw ]; then echo $(pwgen 15 1) > $CONFIG/rconpw fi if [ ! -f $CONFIG/server-settings.json ]; then cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json fi if [ ! -f $CONFIG/map-gen-settings.json ]; then cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json fi if [ ! -f $CONFIG/server-whitelist.json ]; then cp /opt/factorio/data/server-whitelist.example.json $CONFIG/server-whitelist.json fi if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then /opt/factorio/bin/x64/factorio \ --create $SAVES/_autosave1.zip \ --map-gen-settings $CONFIG/map-gen-settings.json fi exec /opt/factorio/bin/x64/factorio \ --port $PORT \ --start-server-load-latest \ --server-settings $CONFIG/server-settings.json \ --server-whitelist $CONFIG/server-whitelist.json \ --rcon-port 27015 \ --rcon-password "$(cat $CONFIG/rconpw)"
set -e SAVES=/factorio/saves CONFIG=/factorio/config mkdir -p $SAVES mkdir -p /factorio/mods mkdir -p $CONFIG if [ ! -f $CONFIG/rconpw ]; then echo $(pwgen 15 1) > $CONFIG/rconpw fi if [ ! -f $CONFIG/server-settings.json ]; then cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json fi if [ ! -f $CONFIG/map-gen-settings.json ]; then cp /opt/factorio/data/map-gen-settings.example.json $CONFIG/map-gen-settings.json fi + if [ ! -f $CONFIG/server-whitelist.json ]; then + cp /opt/factorio/data/server-whitelist.example.json $CONFIG/server-whitelist.json + fi + if ! find -L $SAVES -iname \*.zip -mindepth 1 -print | grep -q .; then /opt/factorio/bin/x64/factorio \ --create $SAVES/_autosave1.zip \ --map-gen-settings $CONFIG/map-gen-settings.json fi exec /opt/factorio/bin/x64/factorio \ --port $PORT \ --start-server-load-latest \ --server-settings $CONFIG/server-settings.json \ + --server-whitelist $CONFIG/server-whitelist.json \ --rcon-port 27015 \ --rcon-password "$(cat $CONFIG/rconpw)"
5
0.147059
5
0
6cf9a022850cef96ca409dba26fb6820a35f8eeb
server-coreless/src/main/java/org/openqa/selenium/server/BrowserConfigurationOptions.java
server-coreless/src/main/java/org/openqa/selenium/server/BrowserConfigurationOptions.java
package org.openqa.selenium.server; public class BrowserConfigurationOptions { private String profile = ""; public BrowserConfigurationOptions(String browserConfiguration) { //"name:value;name:value" String[] optionsPairList = browserConfiguration.split(";"); for (int i = 0; i < optionsPairList.length; i++) { String[] option = optionsPairList[i].split(":", 2); String optionsName = option[0].trim(); String optionValue = option[1].trim(); if ("profile".equalsIgnoreCase(optionsName)) { this.profile = optionValue; } } } public BrowserConfigurationOptions() {} /** * Sets the profile name for this configuration object. * @param profile_name The name of the profile to use */ public void setProfile(String profile_name) { this.profile = profile_name; } public String serialize() { //"profile:XXXXXXXXXX" return String.format("profile:%s", profile); } public String getProfile() { return profile; } }
package org.openqa.selenium.server; public class BrowserConfigurationOptions { private String profile = ""; public BrowserConfigurationOptions(String browserConfiguration) { //"name:value;name:value" String[] optionsPairList = browserConfiguration.split(";"); for (int i = 0; i < optionsPairList.length; i++) { String[] option = optionsPairList[i].split(":", 2); if (2 == option.length) { String optionsName = option[0].trim(); String optionValue = option[1].trim(); if ("profile".equalsIgnoreCase(optionsName)) { this.profile = optionValue; } } } } public BrowserConfigurationOptions() {} /** * Sets the profile name for this configuration object. * @param profile_name The name of the profile to use */ public void setProfile(String profile_name) { this.profile = profile_name; } public String serialize() { //"profile:XXXXXXXXXX" return String.format("profile:%s", profile); } public String getProfile() { return profile; } }
Fix index out of bounds exception by first checking to make sure the configuration option parsed correctly.
Fix index out of bounds exception by first checking to make sure the configuration option parsed correctly. r5374
Java
apache-2.0
xsyntrex/selenium,stupidnetizen/selenium,dkentw/selenium,MCGallaspy/selenium,SevInf/IEDriver,vinay-qa/vinayit-android-server-apk,jsarenik/jajomojo-selenium,temyers/selenium,rovner/selenium,vveliev/selenium,anshumanchatterji/selenium,gregerrag/selenium,carsonmcdonald/selenium,sankha93/selenium,petruc/selenium,jerome-jacob/selenium,sevaseva/selenium,bayandin/selenium,TheBlackTuxCorp/selenium,gotcha/selenium,jsarenik/jajomojo-selenium,krosenvold/selenium,DrMarcII/selenium,alexec/selenium,markodolancic/selenium,alb-i986/selenium,arunsingh/selenium,jknguyen/josephknguyen-selenium,wambat/selenium,aluedeke/chromedriver,blackboarddd/selenium,asashour/selenium,onedox/selenium,dcjohnson1989/selenium,HtmlUnit/selenium,gemini-testing/selenium,aluedeke/chromedriver,MCGallaspy/selenium,SeleniumHQ/selenium,carsonmcdonald/selenium,Herst/selenium,alexec/selenium,krosenvold/selenium,customcommander/selenium,gemini-testing/selenium,chrisblock/selenium,sankha93/selenium,5hawnknight/selenium,chrsmithdemos/selenium,chrsmithdemos/selenium,Appdynamics/selenium,livioc/selenium,orange-tv-blagnac/selenium,eric-stanley/selenium,Jarob22/selenium,Sravyaksr/selenium,i17c/selenium,vinay-qa/vinayit-android-server-apk,bartolkaruza/selenium,gotcha/selenium,HtmlUnit/selenium,Appdynamics/selenium,tarlabs/selenium,bayandin/selenium,lummyare/lummyare-test,GorK-ChO/selenium,jabbrwcky/selenium,amar-sharma/selenium,markodolancic/selenium,vinay-qa/vinayit-android-server-apk,carlosroh/selenium,joshuaduffy/selenium,gorlemik/selenium,lmtierney/selenium,SevInf/IEDriver,isaksky/selenium,manuelpirez/selenium,titusfortner/selenium,knorrium/selenium,GorK-ChO/selenium,jsakamoto/selenium,denis-vilyuzhanin/selenium-fastview,doungni/selenium,bmannix/selenium,SeleniumHQ/selenium,MCGallaspy/selenium,houchj/selenium,krosenvold/selenium,rovner/selenium,tbeadle/selenium,TikhomirovSergey/selenium,mach6/selenium,skurochkin/selenium,customcommander/selenium,twalpole/selenium,Appdynamics/selenium,vveliev/selenium,misttechnologies/selenium,alb-i986/selenium,slongwang/selenium,compstak/selenium,compstak/selenium,temyers/selenium,twalpole/selenium,vveliev/selenium,joshmgrant/selenium,lummyare/lummyare-test,dimacus/selenium,JosephCastro/selenium,Ardesco/selenium,jerome-jacob/selenium,clavery/selenium,yukaReal/selenium,jsakamoto/selenium,soundcloud/selenium,titusfortner/selenium,dimacus/selenium,AutomatedTester/selenium,SouWilliams/selenium,AutomatedTester/selenium,valfirst/selenium,clavery/selenium,slongwang/selenium,gotcha/selenium,bayandin/selenium,SeleniumHQ/selenium,orange-tv-blagnac/selenium,lrowe/selenium,knorrium/selenium,jabbrwcky/selenium,dkentw/selenium,markodolancic/selenium,vinay-qa/vinayit-android-server-apk,jsarenik/jajomojo-selenium,denis-vilyuzhanin/selenium-fastview,krosenvold/selenium-git-release-candidate,valfirst/selenium,gemini-testing/selenium,davehunt/selenium,SouWilliams/selenium,joshmgrant/selenium,jknguyen/josephknguyen-selenium,zenefits/selenium,kalyanjvn1/selenium,SouWilliams/selenium,krosenvold/selenium-git-release-candidate,kalyanjvn1/selenium,xsyntrex/selenium,AutomatedTester/selenium,minhthuanit/selenium,isaksky/selenium,o-schneider/selenium,actmd/selenium,gregerrag/selenium,gabrielsimas/selenium,dibagga/selenium,mojwang/selenium,meksh/selenium,onedox/selenium,GorK-ChO/selenium,DrMarcII/selenium,manuelpirez/selenium,gabrielsimas/selenium,isaksky/selenium,meksh/selenium,twalpole/selenium,mach6/selenium,meksh/selenium,mestihudson/selenium,manuelpirez/selenium,manuelpirez/selenium,Dude-X/selenium,houchj/selenium,soundcloud/selenium,asashour/selenium,carsonmcdonald/selenium,amar-sharma/selenium,p0deje/selenium,aluedeke/chromedriver,customcommander/selenium,blueyed/selenium,mach6/selenium,orange-tv-blagnac/selenium,s2oBCN/selenium,joshuaduffy/selenium,freynaud/selenium,petruc/selenium,Herst/selenium,gurayinan/selenium,amar-sharma/selenium,asolntsev/selenium,onedox/selenium,Sravyaksr/selenium,valfirst/selenium,Tom-Trumper/selenium,mestihudson/selenium,titusfortner/selenium,o-schneider/selenium,dandv/selenium,MCGallaspy/selenium,dimacus/selenium,SevInf/IEDriver,lummyare/lummyare-test,telefonicaid/selenium,sankha93/selenium,valfirst/selenium,krmahadevan/selenium,vveliev/selenium,SevInf/IEDriver,Ardesco/selenium,gotcha/selenium,valfirst/selenium,soundcloud/selenium,TikhomirovSergey/selenium,chrisblock/selenium,bmannix/selenium,zenefits/selenium,gurayinan/selenium,Sravyaksr/selenium,eric-stanley/selenium,juangj/selenium,dbo/selenium,lilredindy/selenium,stupidnetizen/selenium,bartolkaruza/selenium,orange-tv-blagnac/selenium,dibagga/selenium,dandv/selenium,Herst/selenium,markodolancic/selenium,p0deje/selenium,sevaseva/selenium,joshbruning/selenium,krosenvold/selenium-git-release-candidate,meksh/selenium,chrisblock/selenium,gabrielsimas/selenium,amikey/selenium,sri85/selenium,Dude-X/selenium,manuelpirez/selenium,joshbruning/selenium,asashour/selenium,krosenvold/selenium-git-release-candidate,misttechnologies/selenium,rplevka/selenium,asolntsev/selenium,denis-vilyuzhanin/selenium-fastview,joshmgrant/selenium,JosephCastro/selenium,tarlabs/selenium,bartolkaruza/selenium,dibagga/selenium,lilredindy/selenium,5hawnknight/selenium,alb-i986/selenium,orange-tv-blagnac/selenium,telefonicaid/selenium,s2oBCN/selenium,s2oBCN/selenium,asolntsev/selenium,o-schneider/selenium,MeetMe/selenium,davehunt/selenium,denis-vilyuzhanin/selenium-fastview,sri85/selenium,dbo/selenium,MCGallaspy/selenium,petruc/selenium,BlackSmith/selenium,carlosroh/selenium,temyers/selenium,pulkitsinghal/selenium,onedox/selenium,soundcloud/selenium,bayandin/selenium,uchida/selenium,Jarob22/selenium,blackboarddd/selenium,aluedeke/chromedriver,gabrielsimas/selenium,Sravyaksr/selenium,sebady/selenium,krosenvold/selenium,mach6/selenium,manuelpirez/selenium,dcjohnson1989/selenium,Appdynamics/selenium,jsarenik/jajomojo-selenium,jabbrwcky/selenium,soundcloud/selenium,sevaseva/selenium,denis-vilyuzhanin/selenium-fastview,dibagga/selenium,valfirst/selenium,rrussell39/selenium,gabrielsimas/selenium,wambat/selenium,tarlabs/selenium,asolntsev/selenium,mestihudson/selenium,lukeis/selenium,dbo/selenium,GorK-ChO/selenium,temyers/selenium,mestihudson/selenium,carsonmcdonald/selenium,TheBlackTuxCorp/selenium,freynaud/selenium,joshuaduffy/selenium,manuelpirez/selenium,gurayinan/selenium,tarlabs/selenium,chrisblock/selenium,DrMarcII/selenium,tbeadle/selenium,chrisblock/selenium,i17c/selenium,xmhubj/selenium,TheBlackTuxCorp/selenium,sankha93/selenium,lummyare/lummyare-lummy,lmtierney/selenium,oddui/selenium,rplevka/selenium,lummyare/lummyare-lummy,gregerrag/selenium,Jarob22/selenium,GorK-ChO/selenium,jsakamoto/selenium,blueyed/selenium,Ardesco/selenium,anshumanchatterji/selenium,i17c/selenium,MeetMe/selenium,krosenvold/selenium,i17c/selenium,p0deje/selenium,mach6/selenium,oddui/selenium,SeleniumHQ/selenium,mojwang/selenium,soundcloud/selenium,actmd/selenium,krmahadevan/selenium,tbeadle/selenium,bartolkaruza/selenium,amikey/selenium,tkurnosova/selenium,sri85/selenium,quoideneuf/selenium,skurochkin/selenium,MeetMe/selenium,uchida/selenium,MCGallaspy/selenium,asolntsev/selenium,lilredindy/selenium,DrMarcII/selenium,sri85/selenium,dbo/selenium,joshmgrant/selenium,gabrielsimas/selenium,RamaraoDonta/ramarao-clone,mojwang/selenium,stupidnetizen/selenium,blackboarddd/selenium,dibagga/selenium,slongwang/selenium,pulkitsinghal/selenium,isaksky/selenium,rovner/selenium,alb-i986/selenium,meksh/selenium,houchj/selenium,rovner/selenium,p0deje/selenium,misttechnologies/selenium,carlosroh/selenium,MeetMe/selenium,TikhomirovSergey/selenium,dkentw/selenium,lilredindy/selenium,davehunt/selenium,gregerrag/selenium,houchj/selenium,chrsmithdemos/selenium,freynaud/selenium,TikhomirovSergey/selenium,freynaud/selenium,lrowe/selenium,rovner/selenium,TikhomirovSergey/selenium,jsakamoto/selenium,Tom-Trumper/selenium,dkentw/selenium,knorrium/selenium,lmtierney/selenium,Dude-X/selenium,gotcha/selenium,slongwang/selenium,rplevka/selenium,amar-sharma/selenium,sag-enorman/selenium,Dude-X/selenium,lummyare/lummyare-lummy,manuelpirez/selenium,lukeis/selenium,SeleniumHQ/selenium,carsonmcdonald/selenium,gorlemik/selenium,Dude-X/selenium,Ardesco/selenium,customcommander/selenium,vveliev/selenium,bayandin/selenium,davehunt/selenium,davehunt/selenium,twalpole/selenium,pulkitsinghal/selenium,xsyntrex/selenium,thanhpete/selenium,dimacus/selenium,HtmlUnit/selenium,zenefits/selenium,chrsmithdemos/selenium,HtmlUnit/selenium,s2oBCN/selenium,Jarob22/selenium,joshbruning/selenium,eric-stanley/selenium,oddui/selenium,titusfortner/selenium,DrMarcII/selenium,JosephCastro/selenium,lukeis/selenium,markodolancic/selenium,rplevka/selenium,dcjohnson1989/selenium,tkurnosova/selenium,Appdynamics/selenium,5hawnknight/selenium,jsarenik/jajomojo-selenium,clavery/selenium,HtmlUnit/selenium,compstak/selenium,jsakamoto/selenium,sebady/selenium,dandv/selenium,AutomatedTester/selenium,jsarenik/jajomojo-selenium,orange-tv-blagnac/selenium,arunsingh/selenium,petruc/selenium,rrussell39/selenium,anshumanchatterji/selenium,asashour/selenium,Appdynamics/selenium,HtmlUnit/selenium,sri85/selenium,quoideneuf/selenium,Jarob22/selenium,lmtierney/selenium,oddui/selenium,alexec/selenium,arunsingh/selenium,bayandin/selenium,o-schneider/selenium,gurayinan/selenium,skurochkin/selenium,5hawnknight/selenium,titusfortner/selenium,SeleniumHQ/selenium,actmd/selenium,kalyanjvn1/selenium,HtmlUnit/selenium,lukeis/selenium,arunsingh/selenium,arunsingh/selenium,gabrielsimas/selenium,actmd/selenium,DrMarcII/selenium,BlackSmith/selenium,yukaReal/selenium,joshbruning/selenium,xmhubj/selenium,meksh/selenium,stupidnetizen/selenium,skurochkin/selenium,sri85/selenium,MeetMe/selenium,chrsmithdemos/selenium,JosephCastro/selenium,TheBlackTuxCorp/selenium,krmahadevan/selenium,tkurnosova/selenium,Tom-Trumper/selenium,BlackSmith/selenium,amikey/selenium,asolntsev/selenium,sebady/selenium,gemini-testing/selenium,titusfortner/selenium,isaksky/selenium,gorlemik/selenium,RamaraoDonta/ramarao-clone,doungni/selenium,carsonmcdonald/selenium,anshumanchatterji/selenium,mach6/selenium,BlackSmith/selenium,lummyare/lummyare-test,jerome-jacob/selenium,RamaraoDonta/ramarao-clone,5hawnknight/selenium,stupidnetizen/selenium,jsakamoto/selenium,dcjohnson1989/selenium,SevInf/IEDriver,SeleniumHQ/selenium,p0deje/selenium,minhthuanit/selenium,arunsingh/selenium,asashour/selenium,juangj/selenium,gabrielsimas/selenium,dandv/selenium,oddui/selenium,Ardesco/selenium,livioc/selenium,gregerrag/selenium,tkurnosova/selenium,BlackSmith/selenium,dibagga/selenium,isaksky/selenium,5hawnknight/selenium,stupidnetizen/selenium,actmd/selenium,kalyanjvn1/selenium,dibagga/selenium,rrussell39/selenium,thanhpete/selenium,bmannix/selenium,markodolancic/selenium,asashour/selenium,Herst/selenium,petruc/selenium,sag-enorman/selenium,pulkitsinghal/selenium,lrowe/selenium,rplevka/selenium,denis-vilyuzhanin/selenium-fastview,dimacus/selenium,uchida/selenium,sevaseva/selenium,carlosroh/selenium,JosephCastro/selenium,joshuaduffy/selenium,vveliev/selenium,lilredindy/selenium,davehunt/selenium,sag-enorman/selenium,anshumanchatterji/selenium,jabbrwcky/selenium,skurochkin/selenium,dimacus/selenium,Appdynamics/selenium,Ardesco/selenium,chrisblock/selenium,gemini-testing/selenium,sankha93/selenium,bartolkaruza/selenium,gurayinan/selenium,Dude-X/selenium,MeetMe/selenium,jabbrwcky/selenium,freynaud/selenium,jknguyen/josephknguyen-selenium,o-schneider/selenium,jsakamoto/selenium,knorrium/selenium,gregerrag/selenium,dkentw/selenium,SouWilliams/selenium,jerome-jacob/selenium,JosephCastro/selenium,thanhpete/selenium,Herst/selenium,carlosroh/selenium,rplevka/selenium,rrussell39/selenium,joshbruning/selenium,joshmgrant/selenium,rovner/selenium,TikhomirovSergey/selenium,telefonicaid/selenium,TheBlackTuxCorp/selenium,asashour/selenium,telefonicaid/selenium,compstak/selenium,gorlemik/selenium,mach6/selenium,jabbrwcky/selenium,HtmlUnit/selenium,MeetMe/selenium,dandv/selenium,sag-enorman/selenium,yukaReal/selenium,soundcloud/selenium,misttechnologies/selenium,tkurnosova/selenium,AutomatedTester/selenium,mestihudson/selenium,markodolancic/selenium,Herst/selenium,thanhpete/selenium,Jarob22/selenium,quoideneuf/selenium,i17c/selenium,aluedeke/chromedriver,doungni/selenium,vveliev/selenium,joshmgrant/selenium,alb-i986/selenium,eric-stanley/selenium,titusfortner/selenium,onedox/selenium,quoideneuf/selenium,joshuaduffy/selenium,doungni/selenium,carsonmcdonald/selenium,uchida/selenium,asashour/selenium,valfirst/selenium,valfirst/selenium,dcjohnson1989/selenium,livioc/selenium,alb-i986/selenium,clavery/selenium,i17c/selenium,valfirst/selenium,gemini-testing/selenium,gorlemik/selenium,bmannix/selenium,knorrium/selenium,jabbrwcky/selenium,doungni/selenium,arunsingh/selenium,vinay-qa/vinayit-android-server-apk,krmahadevan/selenium,Tom-Trumper/selenium,s2oBCN/selenium,jknguyen/josephknguyen-selenium,twalpole/selenium,sebady/selenium,i17c/selenium,TheBlackTuxCorp/selenium,minhthuanit/selenium,lummyare/lummyare-test,blueyed/selenium,compstak/selenium,rrussell39/selenium,juangj/selenium,s2oBCN/selenium,alexec/selenium,o-schneider/selenium,amikey/selenium,gregerrag/selenium,gurayinan/selenium,mach6/selenium,Tom-Trumper/selenium,dimacus/selenium,5hawnknight/selenium,rrussell39/selenium,arunsingh/selenium,dandv/selenium,valfirst/selenium,lrowe/selenium,amar-sharma/selenium,temyers/selenium,minhthuanit/selenium,sankha93/selenium,juangj/selenium,meksh/selenium,chrsmithdemos/selenium,krmahadevan/selenium,skurochkin/selenium,amikey/selenium,oddui/selenium,joshuaduffy/selenium,freynaud/selenium,customcommander/selenium,houchj/selenium,lrowe/selenium,dkentw/selenium,isaksky/selenium,titusfortner/selenium,zenefits/selenium,lilredindy/selenium,wambat/selenium,krosenvold/selenium,zenefits/selenium,GorK-ChO/selenium,bartolkaruza/selenium,yukaReal/selenium,dkentw/selenium,lummyare/lummyare-lummy,eric-stanley/selenium,alb-i986/selenium,dcjohnson1989/selenium,dcjohnson1989/selenium,Tom-Trumper/selenium,sri85/selenium,rovner/selenium,JosephCastro/selenium,jsarenik/jajomojo-selenium,temyers/selenium,TheBlackTuxCorp/selenium,dibagga/selenium,TikhomirovSergey/selenium,krosenvold/selenium-git-release-candidate,eric-stanley/selenium,Ardesco/selenium,vinay-qa/vinayit-android-server-apk,xmhubj/selenium,juangj/selenium,dbo/selenium,SouWilliams/selenium,oddui/selenium,doungni/selenium,chrisblock/selenium,denis-vilyuzhanin/selenium-fastview,tbeadle/selenium,carsonmcdonald/selenium,slongwang/selenium,doungni/selenium,carlosroh/selenium,dbo/selenium,misttechnologies/selenium,xsyntrex/selenium,yukaReal/selenium,mojwang/selenium,denis-vilyuzhanin/selenium-fastview,xmhubj/selenium,tbeadle/selenium,anshumanchatterji/selenium,livioc/selenium,SouWilliams/selenium,minhthuanit/selenium,eric-stanley/selenium,carlosroh/selenium,Dude-X/selenium,freynaud/selenium,onedox/selenium,p0deje/selenium,tkurnosova/selenium,BlackSmith/selenium,alexec/selenium,lmtierney/selenium,s2oBCN/selenium,HtmlUnit/selenium,actmd/selenium,gregerrag/selenium,jknguyen/josephknguyen-selenium,bmannix/selenium,wambat/selenium,tbeadle/selenium,TikhomirovSergey/selenium,clavery/selenium,GorK-ChO/selenium,joshmgrant/selenium,BlackSmith/selenium,gabrielsimas/selenium,TheBlackTuxCorp/selenium,Sravyaksr/selenium,tkurnosova/selenium,mestihudson/selenium,dandv/selenium,zenefits/selenium,o-schneider/selenium,doungni/selenium,twalpole/selenium,krosenvold/selenium,blueyed/selenium,actmd/selenium,vveliev/selenium,sag-enorman/selenium,yukaReal/selenium,gotcha/selenium,Tom-Trumper/selenium,amikey/selenium,vinay-qa/vinayit-android-server-apk,lummyare/lummyare-lummy,dcjohnson1989/selenium,tbeadle/selenium,SevInf/IEDriver,alexec/selenium,bayandin/selenium,lummyare/lummyare-test,thanhpete/selenium,joshmgrant/selenium,i17c/selenium,RamaraoDonta/ramarao-clone,Tom-Trumper/selenium,RamaraoDonta/ramarao-clone,rplevka/selenium,GorK-ChO/selenium,chrisblock/selenium,mach6/selenium,gemini-testing/selenium,doungni/selenium,alexec/selenium,BlackSmith/selenium,slongwang/selenium,xmhubj/selenium,SevInf/IEDriver,chrsmithdemos/selenium,anshumanchatterji/selenium,i17c/selenium,actmd/selenium,knorrium/selenium,misttechnologies/selenium,krmahadevan/selenium,RamaraoDonta/ramarao-clone,sebady/selenium,quoideneuf/selenium,onedox/selenium,kalyanjvn1/selenium,Ardesco/selenium,lukeis/selenium,clavery/selenium,MeetMe/selenium,asolntsev/selenium,thanhpete/selenium,misttechnologies/selenium,rrussell39/selenium,sag-enorman/selenium,xsyntrex/selenium,twalpole/selenium,jknguyen/josephknguyen-selenium,o-schneider/selenium,Jarob22/selenium,telefonicaid/selenium,lmtierney/selenium,telefonicaid/selenium,xsyntrex/selenium,p0deje/selenium,SeleniumHQ/selenium,titusfortner/selenium,oddui/selenium,freynaud/selenium,dbo/selenium,gotcha/selenium,krmahadevan/selenium,joshmgrant/selenium,xsyntrex/selenium,jknguyen/josephknguyen-selenium,houchj/selenium,lukeis/selenium,lilredindy/selenium,sri85/selenium,Appdynamics/selenium,xsyntrex/selenium,5hawnknight/selenium,DrMarcII/selenium,pulkitsinghal/selenium,petruc/selenium,livioc/selenium,jerome-jacob/selenium,krosenvold/selenium,petruc/selenium,joshbruning/selenium,twalpole/selenium,RamaraoDonta/ramarao-clone,lilredindy/selenium,krmahadevan/selenium,amar-sharma/selenium,blueyed/selenium,stupidnetizen/selenium,jerome-jacob/selenium,blueyed/selenium,meksh/selenium,blackboarddd/selenium,gurayinan/selenium,alexec/selenium,titusfortner/selenium,kalyanjvn1/selenium,temyers/selenium,Sravyaksr/selenium,blueyed/selenium,customcommander/selenium,SeleniumHQ/selenium,temyers/selenium,orange-tv-blagnac/selenium,rovner/selenium,thanhpete/selenium,yukaReal/selenium,sankha93/selenium,MCGallaspy/selenium,blackboarddd/selenium,gorlemik/selenium,temyers/selenium,MCGallaspy/selenium,lummyare/lummyare-test,xmhubj/selenium,jsakamoto/selenium,amar-sharma/selenium,DrMarcII/selenium,yukaReal/selenium,5hawnknight/selenium,slongwang/selenium,tarlabs/selenium,alb-i986/selenium,aluedeke/chromedriver,SouWilliams/selenium,blackboarddd/selenium,juangj/selenium,markodolancic/selenium,lrowe/selenium,JosephCastro/selenium,uchida/selenium,sevaseva/selenium,mojwang/selenium,eric-stanley/selenium,joshbruning/selenium,MCGallaspy/selenium,davehunt/selenium,valfirst/selenium,sevaseva/selenium,misttechnologies/selenium,zenefits/selenium,mojwang/selenium,minhthuanit/selenium,Sravyaksr/selenium,oddui/selenium,minhthuanit/selenium,anshumanchatterji/selenium,rplevka/selenium,aluedeke/chromedriver,TikhomirovSergey/selenium,lrowe/selenium,skurochkin/selenium,rrussell39/selenium,joshuaduffy/selenium,aluedeke/chromedriver,jsakamoto/selenium,petruc/selenium,sebady/selenium,customcommander/selenium,p0deje/selenium,AutomatedTester/selenium,alexec/selenium,rplevka/selenium,Herst/selenium,BlackSmith/selenium,lummyare/lummyare-lummy,carlosroh/selenium,thanhpete/selenium,tarlabs/selenium,denis-vilyuzhanin/selenium-fastview,gurayinan/selenium,jerome-jacob/selenium,sag-enorman/selenium,quoideneuf/selenium,knorrium/selenium,asolntsev/selenium,dbo/selenium,wambat/selenium,sag-enorman/selenium,HtmlUnit/selenium,AutomatedTester/selenium,mestihudson/selenium,livioc/selenium,twalpole/selenium,onedox/selenium,anshumanchatterji/selenium,bartolkaruza/selenium,SouWilliams/selenium,zenefits/selenium,SevInf/IEDriver,p0deje/selenium,sebady/selenium,lukeis/selenium,pulkitsinghal/selenium,titusfortner/selenium,krosenvold/selenium-git-release-candidate,soundcloud/selenium,sevaseva/selenium,uchida/selenium,blueyed/selenium,xmhubj/selenium,mojwang/selenium,orange-tv-blagnac/selenium,mestihudson/selenium,dandv/selenium,chrsmithdemos/selenium,gregerrag/selenium,Ardesco/selenium,quoideneuf/selenium,lummyare/lummyare-lummy,markodolancic/selenium,chrisblock/selenium,sri85/selenium,houchj/selenium,petruc/selenium,RamaraoDonta/ramarao-clone,joshbruning/selenium,blackboarddd/selenium,quoideneuf/selenium,jknguyen/josephknguyen-selenium,telefonicaid/selenium,dibagga/selenium,arunsingh/selenium,soundcloud/selenium,blackboarddd/selenium,lmtierney/selenium,lmtierney/selenium,stupidnetizen/selenium,bartolkaruza/selenium,slongwang/selenium,Jarob22/selenium,livioc/selenium,misttechnologies/selenium,carsonmcdonald/selenium,uchida/selenium,bartolkaruza/selenium,kalyanjvn1/selenium,houchj/selenium,vveliev/selenium,amar-sharma/selenium,sag-enorman/selenium,actmd/selenium,krosenvold/selenium,sevaseva/selenium,Herst/selenium,wambat/selenium,onedox/selenium,AutomatedTester/selenium,clavery/selenium,tbeadle/selenium,blueyed/selenium,pulkitsinghal/selenium,tbeadle/selenium,alb-i986/selenium,aluedeke/chromedriver,joshuaduffy/selenium,joshmgrant/selenium,AutomatedTester/selenium,clavery/selenium,lrowe/selenium,telefonicaid/selenium,jsarenik/jajomojo-selenium,amikey/selenium,lummyare/lummyare-lummy,joshuaduffy/selenium,jabbrwcky/selenium,RamaraoDonta/ramarao-clone,dkentw/selenium,freynaud/selenium,stupidnetizen/selenium,TheBlackTuxCorp/selenium,gemini-testing/selenium,SeleniumHQ/selenium,livioc/selenium,krmahadevan/selenium,Herst/selenium,vinay-qa/vinayit-android-server-apk,Sravyaksr/selenium,bmannix/selenium,jabbrwcky/selenium,juangj/selenium,yukaReal/selenium,thanhpete/selenium,Dude-X/selenium,kalyanjvn1/selenium,xmhubj/selenium,dbo/selenium,juangj/selenium,tarlabs/selenium,pulkitsinghal/selenium,xsyntrex/selenium,livioc/selenium,dcjohnson1989/selenium,vinay-qa/vinayit-android-server-apk,davehunt/selenium,bmannix/selenium,mojwang/selenium,jsarenik/jajomojo-selenium,pulkitsinghal/selenium,tarlabs/selenium,lilredindy/selenium,asashour/selenium,gorlemik/selenium,customcommander/selenium,jerome-jacob/selenium,JosephCastro/selenium,sebady/selenium,lummyare/lummyare-test,meksh/selenium,uchida/selenium,gemini-testing/selenium,joshbruning/selenium,dimacus/selenium,zenefits/selenium,juangj/selenium,krosenvold/selenium-git-release-candidate,quoideneuf/selenium,sevaseva/selenium,Appdynamics/selenium,dkentw/selenium,gurayinan/selenium,Tom-Trumper/selenium,knorrium/selenium,gorlemik/selenium,lrowe/selenium,tkurnosova/selenium,gotcha/selenium,sebady/selenium,mojwang/selenium,rrussell39/selenium,tkurnosova/selenium,bayandin/selenium,lukeis/selenium,s2oBCN/selenium,davehunt/selenium,gotcha/selenium,Jarob22/selenium,clavery/selenium,carlosroh/selenium,mestihudson/selenium,skurochkin/selenium,Sravyaksr/selenium,chrsmithdemos/selenium,jknguyen/josephknguyen-selenium,wambat/selenium,rovner/selenium,bayandin/selenium,compstak/selenium,xmhubj/selenium,lmtierney/selenium,amikey/selenium,uchida/selenium,lummyare/lummyare-lummy,krosenvold/selenium-git-release-candidate,bmannix/selenium,dandv/selenium,o-schneider/selenium,jerome-jacob/selenium,blackboarddd/selenium,skurochkin/selenium,SeleniumHQ/selenium,SouWilliams/selenium,eric-stanley/selenium,SevInf/IEDriver,bmannix/selenium,s2oBCN/selenium,wambat/selenium,isaksky/selenium,sankha93/selenium,lummyare/lummyare-test,DrMarcII/selenium,GorK-ChO/selenium,tarlabs/selenium,sankha93/selenium,customcommander/selenium,manuelpirez/selenium,compstak/selenium,orange-tv-blagnac/selenium,Dude-X/selenium,amikey/selenium,joshmgrant/selenium,asolntsev/selenium,compstak/selenium,slongwang/selenium,houchj/selenium,gorlemik/selenium,dimacus/selenium,MeetMe/selenium,isaksky/selenium,amar-sharma/selenium,telefonicaid/selenium,knorrium/selenium,minhthuanit/selenium,lukeis/selenium,wambat/selenium,compstak/selenium,minhthuanit/selenium,kalyanjvn1/selenium
java
## Code Before: package org.openqa.selenium.server; public class BrowserConfigurationOptions { private String profile = ""; public BrowserConfigurationOptions(String browserConfiguration) { //"name:value;name:value" String[] optionsPairList = browserConfiguration.split(";"); for (int i = 0; i < optionsPairList.length; i++) { String[] option = optionsPairList[i].split(":", 2); String optionsName = option[0].trim(); String optionValue = option[1].trim(); if ("profile".equalsIgnoreCase(optionsName)) { this.profile = optionValue; } } } public BrowserConfigurationOptions() {} /** * Sets the profile name for this configuration object. * @param profile_name The name of the profile to use */ public void setProfile(String profile_name) { this.profile = profile_name; } public String serialize() { //"profile:XXXXXXXXXX" return String.format("profile:%s", profile); } public String getProfile() { return profile; } } ## Instruction: Fix index out of bounds exception by first checking to make sure the configuration option parsed correctly. r5374 ## Code After: package org.openqa.selenium.server; public class BrowserConfigurationOptions { private String profile = ""; public BrowserConfigurationOptions(String browserConfiguration) { //"name:value;name:value" String[] optionsPairList = browserConfiguration.split(";"); for (int i = 0; i < optionsPairList.length; i++) { String[] option = optionsPairList[i].split(":", 2); if (2 == option.length) { String optionsName = option[0].trim(); String optionValue = option[1].trim(); if ("profile".equalsIgnoreCase(optionsName)) { this.profile = optionValue; } } } } public BrowserConfigurationOptions() {} /** * Sets the profile name for this configuration object. * @param profile_name The name of the profile to use */ public void setProfile(String profile_name) { this.profile = profile_name; } public String serialize() { //"profile:XXXXXXXXXX" return String.format("profile:%s", profile); } public String getProfile() { return profile; } }
package org.openqa.selenium.server; public class BrowserConfigurationOptions { private String profile = ""; public BrowserConfigurationOptions(String browserConfiguration) { //"name:value;name:value" String[] optionsPairList = browserConfiguration.split(";"); for (int i = 0; i < optionsPairList.length; i++) { String[] option = optionsPairList[i].split(":", 2); + if (2 == option.length) { - String optionsName = option[0].trim(); + String optionsName = option[0].trim(); ? ++ - String optionValue = option[1].trim(); + String optionValue = option[1].trim(); ? ++ - if ("profile".equalsIgnoreCase(optionsName)) { + if ("profile".equalsIgnoreCase(optionsName)) { ? ++ - this.profile = optionValue; + this.profile = optionValue; ? ++ + } } } } public BrowserConfigurationOptions() {} /** * Sets the profile name for this configuration object. * @param profile_name The name of the profile to use */ public void setProfile(String profile_name) { this.profile = profile_name; } public String serialize() { //"profile:XXXXXXXXXX" return String.format("profile:%s", profile); } public String getProfile() { return profile; } }
10
0.25641
6
4
591f6bb8c3a6314db04f84514ffd9a546c340dd1
.travis.yml
.travis.yml
language: groovy env: - GROOVY_VERSION="1.8.9" - GROOVY_VERSION="2.0.8" - GROOVY_VERSION="2.1.9" - GROOVY_VERSION="2.2.2" - GROOVY_VERSION="2.3.9" - GROOVY_VERSION="2.4.0" matrix: exclude: - env: GROOVY_VERSION="2.1.9" allow_failures: - env: GROOVY_VERSION="2.0.8" - env: GROOVY_VERSION="2.1.9" - env: GROOVY_VERSION="2.2.2" - env: GROOVY_VERSION="2.3.9" - env: GROOVY_VERSION="2.4.0"
language: groovy env: - GROOVY_VERSION="1.8.9" - GROOVY_VERSION="2.0.8" - GROOVY_VERSION="2.1.9" - GROOVY_VERSION="2.2.2" - GROOVY_VERSION="2.3.9" - GROOVY_VERSION="2.4.0" matrix: allow_failures: - env: GROOVY_VERSION="2.0.8" - env: GROOVY_VERSION="2.1.9" - env: GROOVY_VERSION="2.2.2" - env: GROOVY_VERSION="2.3.9" - env: GROOVY_VERSION="2.4.0"
Test complete. The exclude expression works.
Test complete. The exclude expression works.
YAML
apache-2.0
samrocketman/jervis,samrocketman/jervis
yaml
## Code Before: language: groovy env: - GROOVY_VERSION="1.8.9" - GROOVY_VERSION="2.0.8" - GROOVY_VERSION="2.1.9" - GROOVY_VERSION="2.2.2" - GROOVY_VERSION="2.3.9" - GROOVY_VERSION="2.4.0" matrix: exclude: - env: GROOVY_VERSION="2.1.9" allow_failures: - env: GROOVY_VERSION="2.0.8" - env: GROOVY_VERSION="2.1.9" - env: GROOVY_VERSION="2.2.2" - env: GROOVY_VERSION="2.3.9" - env: GROOVY_VERSION="2.4.0" ## Instruction: Test complete. The exclude expression works. ## Code After: language: groovy env: - GROOVY_VERSION="1.8.9" - GROOVY_VERSION="2.0.8" - GROOVY_VERSION="2.1.9" - GROOVY_VERSION="2.2.2" - GROOVY_VERSION="2.3.9" - GROOVY_VERSION="2.4.0" matrix: allow_failures: - env: GROOVY_VERSION="2.0.8" - env: GROOVY_VERSION="2.1.9" - env: GROOVY_VERSION="2.2.2" - env: GROOVY_VERSION="2.3.9" - env: GROOVY_VERSION="2.4.0"
language: groovy env: - GROOVY_VERSION="1.8.9" - GROOVY_VERSION="2.0.8" - GROOVY_VERSION="2.1.9" - GROOVY_VERSION="2.2.2" - GROOVY_VERSION="2.3.9" - GROOVY_VERSION="2.4.0" matrix: - exclude: - - env: GROOVY_VERSION="2.1.9" allow_failures: - env: GROOVY_VERSION="2.0.8" - env: GROOVY_VERSION="2.1.9" - env: GROOVY_VERSION="2.2.2" - env: GROOVY_VERSION="2.3.9" - env: GROOVY_VERSION="2.4.0"
2
0.117647
0
2
87c5f39d5cb072a778bb145e6e5fc49c8d4b350d
core/urls.py
core/urls.py
from django.conf.urls import url from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .views import AppView, reports_export # Instead of using a wildcard for our app views we insert them one at a time # for naming purposes. This is so that users can change urls if they want and # the change will propagate throughout the site. urlpatterns = [ url(r'^reports/export/$', reports_export, name='reports-export'), url(r'^timesheet/$', AppView.as_view(), name='timesheet'), url(r'^clients/$', AppView.as_view(), name='clients'), url(r'^tasks/$', AppView.as_view(), name='tasks'), url(r'^reports/$', AppView.as_view(), name='reports'), url(r'^invoices/$', AppView.as_view(), name='invoices'), url( r'^$', RedirectView.as_view(url=reverse_lazy('timesheet'), permanent=False), name='dashboard' ), ]
from django.conf.urls import url from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .views import AppView, reports_export # Instead of using a wildcard for our app views we insert them one at a time # for naming purposes. This is so that users can change urls if they want and # the change will propagate throughout the site. urlpatterns = [ url(r'^reports/export/$', reports_export, name='reports-export'), url(r'^timesheet/$', AppView.as_view(), name='timesheet'), url(r'^clients/$', AppView.as_view(), name='clients'), url(r'^tasks/$', AppView.as_view(), name='tasks'), url(r'^reports/$', AppView.as_view(), name='reports'), url(r'^invoices/$', AppView.as_view(), name='invoices'), url(r'^invoices/([0-9]+)/$', AppView.as_view(), name='invoices'), url( r'^$', RedirectView.as_view(url=reverse_lazy('timesheet'), permanent=False), name='dashboard' ), ]
Add ability to go to individual invoice page
Add ability to go to individual invoice page
Python
bsd-2-clause
cdubz/timestrap,overshard/timestrap,overshard/timestrap,cdubz/timestrap,cdubz/timestrap,overshard/timestrap
python
## Code Before: from django.conf.urls import url from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .views import AppView, reports_export # Instead of using a wildcard for our app views we insert them one at a time # for naming purposes. This is so that users can change urls if they want and # the change will propagate throughout the site. urlpatterns = [ url(r'^reports/export/$', reports_export, name='reports-export'), url(r'^timesheet/$', AppView.as_view(), name='timesheet'), url(r'^clients/$', AppView.as_view(), name='clients'), url(r'^tasks/$', AppView.as_view(), name='tasks'), url(r'^reports/$', AppView.as_view(), name='reports'), url(r'^invoices/$', AppView.as_view(), name='invoices'), url( r'^$', RedirectView.as_view(url=reverse_lazy('timesheet'), permanent=False), name='dashboard' ), ] ## Instruction: Add ability to go to individual invoice page ## Code After: from django.conf.urls import url from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .views import AppView, reports_export # Instead of using a wildcard for our app views we insert them one at a time # for naming purposes. This is so that users can change urls if they want and # the change will propagate throughout the site. urlpatterns = [ url(r'^reports/export/$', reports_export, name='reports-export'), url(r'^timesheet/$', AppView.as_view(), name='timesheet'), url(r'^clients/$', AppView.as_view(), name='clients'), url(r'^tasks/$', AppView.as_view(), name='tasks'), url(r'^reports/$', AppView.as_view(), name='reports'), url(r'^invoices/$', AppView.as_view(), name='invoices'), url(r'^invoices/([0-9]+)/$', AppView.as_view(), name='invoices'), url( r'^$', RedirectView.as_view(url=reverse_lazy('timesheet'), permanent=False), name='dashboard' ), ]
from django.conf.urls import url from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .views import AppView, reports_export # Instead of using a wildcard for our app views we insert them one at a time # for naming purposes. This is so that users can change urls if they want and # the change will propagate throughout the site. urlpatterns = [ url(r'^reports/export/$', reports_export, name='reports-export'), url(r'^timesheet/$', AppView.as_view(), name='timesheet'), url(r'^clients/$', AppView.as_view(), name='clients'), url(r'^tasks/$', AppView.as_view(), name='tasks'), url(r'^reports/$', AppView.as_view(), name='reports'), url(r'^invoices/$', AppView.as_view(), name='invoices'), + url(r'^invoices/([0-9]+)/$', AppView.as_view(), name='invoices'), url( r'^$', RedirectView.as_view(url=reverse_lazy('timesheet'), permanent=False), name='dashboard' ), ]
1
0.04
1
0
72295b8c5368d830ee498a8ee6d866a8359ba204
.pullreview.yml
.pullreview.yml
--- rules: avoid_copy_paste: except: - "spec/**/*.rb" ignore: - assignment_in_conditional - IfUnlessModifier - missing_class_documentation - missing_method_documentation - prefer_single_quoted_strings - use_a_logger ParameterNumberCheck: except: # NOTE: Use of Open3.popen3 triggers this violation - "lib/resume/ruby_version_checker.rb"
--- rules: avoid_copy_paste: except: - "spec/**/*.rb" ignore: - assignment_in_conditional - favor_if_unless_for_single_line - missing_class_documentation - missing_method_documentation - prefer_single_quoted_strings - use_a_logger reduce_number_of_params: except: # NOTE: Use of Open3.popen3 triggers this violation - "lib/resume/ruby_version_checker.rb"
Fix spelling mistake of rule
Fix spelling mistake of rule
YAML
mit
paulfioravanti/resume
yaml
## Code Before: --- rules: avoid_copy_paste: except: - "spec/**/*.rb" ignore: - assignment_in_conditional - IfUnlessModifier - missing_class_documentation - missing_method_documentation - prefer_single_quoted_strings - use_a_logger ParameterNumberCheck: except: # NOTE: Use of Open3.popen3 triggers this violation - "lib/resume/ruby_version_checker.rb" ## Instruction: Fix spelling mistake of rule ## Code After: --- rules: avoid_copy_paste: except: - "spec/**/*.rb" ignore: - assignment_in_conditional - favor_if_unless_for_single_line - missing_class_documentation - missing_method_documentation - prefer_single_quoted_strings - use_a_logger reduce_number_of_params: except: # NOTE: Use of Open3.popen3 triggers this violation - "lib/resume/ruby_version_checker.rb"
--- rules: avoid_copy_paste: except: - "spec/**/*.rb" ignore: - assignment_in_conditional - - IfUnlessModifier + - favor_if_unless_for_single_line - missing_class_documentation - missing_method_documentation - prefer_single_quoted_strings - use_a_logger - ParameterNumberCheck: + reduce_number_of_params: except: # NOTE: Use of Open3.popen3 triggers this violation - "lib/resume/ruby_version_checker.rb"
4
0.25
2
2
41a495eb5a2dc6023ed34fffcad7a94512abc50d
Code/Cleavir/AST-interpreter/interpreter.lisp
Code/Cleavir/AST-interpreter/interpreter.lisp
(cl:in-package #:cleavir-ast-interpreter) (defgeneric interpret-ast (ast static-env dynamic-env)) (defun interpret (ast) (let ((static-env (list (make-hash-table :test #'eq))) (dynamic-env '())) (interpret-ast ast static-env dynamic-env)))
(cl:in-package #:cleavir-ast-interpreter) (defgeneric interpret-ast (ast static-env dynamic-env)) (defun interpret (ast) (let ((static-env (list (make-hash-table :test #'eq))) (dynamic-env '())) (interpret-ast ast static-env dynamic-env))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Methods on INTERPRET-AST. (defmethod interpret-ast ((ast cleavir-ast:constant-ast) static-env dynamic-env) (declare (ignore static-env dynamic-env)) (cleavir-ast:value ast))
Define method on INTERPRET-AST specialized to CONSTANT-AST.
Define method on INTERPRET-AST specialized to CONSTANT-AST.
Common Lisp
bsd-2-clause
clasp-developers/SICL,vtomole/SICL,vtomole/SICL,vtomole/SICL,clasp-developers/SICL,clasp-developers/SICL,vtomole/SICL,clasp-developers/SICL
common-lisp
## Code Before: (cl:in-package #:cleavir-ast-interpreter) (defgeneric interpret-ast (ast static-env dynamic-env)) (defun interpret (ast) (let ((static-env (list (make-hash-table :test #'eq))) (dynamic-env '())) (interpret-ast ast static-env dynamic-env))) ## Instruction: Define method on INTERPRET-AST specialized to CONSTANT-AST. ## Code After: (cl:in-package #:cleavir-ast-interpreter) (defgeneric interpret-ast (ast static-env dynamic-env)) (defun interpret (ast) (let ((static-env (list (make-hash-table :test #'eq))) (dynamic-env '())) (interpret-ast ast static-env dynamic-env))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Methods on INTERPRET-AST. (defmethod interpret-ast ((ast cleavir-ast:constant-ast) static-env dynamic-env) (declare (ignore static-env dynamic-env)) (cleavir-ast:value ast))
(cl:in-package #:cleavir-ast-interpreter) (defgeneric interpret-ast (ast static-env dynamic-env)) (defun interpret (ast) (let ((static-env (list (make-hash-table :test #'eq))) (dynamic-env '())) (interpret-ast ast static-env dynamic-env))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;;; + ;;; Methods on INTERPRET-AST. + + (defmethod interpret-ast ((ast cleavir-ast:constant-ast) + static-env dynamic-env) + (declare (ignore static-env dynamic-env)) + (cleavir-ast:value ast))
9
1.125
9
0
9210af1adf9abb7187548f45fa004c3d6e7826d3
tox.ini
tox.ini
[tox] envlist = py26, py27, py32, py33, py34, rhel6 [testenv] commands = nosetests cybox sphinx-build -b doctest docs docs/_build/doctest sphinx-build -b html docs docs/_build/html deps = -rrequirements.txt # Don't try building documentation on Python 3.2, due to conflicts with Pygments. [testenv:py32] commands = nosetests cybox deps = -rrequirements.txt #NOTE: RHEL 6 bundles six==1.7.3, but we need 1.9.0 [testenv:rhel6] basepython=python2.6 commands = nosetests cybox deps = lxml==2.2.3 python-dateutil==1.4.1 six>=1.9.0 nose
[tox] envlist = py26, py27, py32, py33, py34, rhel6 [testenv] commands = nosetests cybox sphinx-build -b doctest docs docs/_build/doctest sphinx-build -b html docs docs/_build/html deps = -rrequirements.txt # Don't try building documentation on Python 3.2, due to conflicts with Pygments. [testenv:py32] commands = nosetests cybox deps = -rrequirements.txt [testenv:rhel6] basepython=python2.6 commands = nosetests cybox deps = lxml==2.2.3 mixbox python-dateutil==1.4.1 nose
Use mixbox on RHEL Tox tests.
Use mixbox on RHEL Tox tests.
INI
bsd-3-clause
CybOXProject/python-cybox
ini
## Code Before: [tox] envlist = py26, py27, py32, py33, py34, rhel6 [testenv] commands = nosetests cybox sphinx-build -b doctest docs docs/_build/doctest sphinx-build -b html docs docs/_build/html deps = -rrequirements.txt # Don't try building documentation on Python 3.2, due to conflicts with Pygments. [testenv:py32] commands = nosetests cybox deps = -rrequirements.txt #NOTE: RHEL 6 bundles six==1.7.3, but we need 1.9.0 [testenv:rhel6] basepython=python2.6 commands = nosetests cybox deps = lxml==2.2.3 python-dateutil==1.4.1 six>=1.9.0 nose ## Instruction: Use mixbox on RHEL Tox tests. ## Code After: [tox] envlist = py26, py27, py32, py33, py34, rhel6 [testenv] commands = nosetests cybox sphinx-build -b doctest docs docs/_build/doctest sphinx-build -b html docs docs/_build/html deps = -rrequirements.txt # Don't try building documentation on Python 3.2, due to conflicts with Pygments. [testenv:py32] commands = nosetests cybox deps = -rrequirements.txt [testenv:rhel6] basepython=python2.6 commands = nosetests cybox deps = lxml==2.2.3 mixbox python-dateutil==1.4.1 nose
[tox] envlist = py26, py27, py32, py33, py34, rhel6 [testenv] commands = nosetests cybox sphinx-build -b doctest docs docs/_build/doctest sphinx-build -b html docs docs/_build/html deps = -rrequirements.txt # Don't try building documentation on Python 3.2, due to conflicts with Pygments. [testenv:py32] commands = nosetests cybox deps = -rrequirements.txt - #NOTE: RHEL 6 bundles six==1.7.3, but we need 1.9.0 [testenv:rhel6] basepython=python2.6 commands = nosetests cybox deps = lxml==2.2.3 + mixbox python-dateutil==1.4.1 - six>=1.9.0 nose
3
0.115385
1
2
3a288cca93bc510ba30ce402c23bbf93d996d724
examples/example.rs
examples/example.rs
extern crate rustyline; use rustyline::completion::FilenameCompleter; use rustyline::error::ReadlineError; use rustyline::Editor; fn main() { let c = FilenameCompleter::new(); let mut rl = Editor::new(); rl.set_completer(Some(&c)); if let Err(_) = rl.load_history("history.txt") { println!("No previous history."); } loop { let readline = rl.readline(">> "); match readline { Ok(line) => { rl.add_history_entry(&line); println!("Line: {}", line); }, Err(ReadlineError::Interrupted) => { println!("CTRL-C"); break }, Err(ReadlineError::Eof) => { println!("CTRL-D"); break }, Err(err) => { println!("Error: {:?}", err); break } } } rl.save_history("history.txt").unwrap(); }
extern crate rustyline; use rustyline::completion::FilenameCompleter; use rustyline::error::ReadlineError; use rustyline::Editor; fn main() { let c = FilenameCompleter::new(); let mut rl = Editor::new(); rl.set_completer(Some(&c)); if let Err(_) = rl.load_history("history.txt") { println!("No previous history."); } loop { let readline = rl.readline("\x1b[1m>> \x1b[0m"); match readline { Ok(line) => { rl.add_history_entry(&line); println!("Line: {}", line); }, Err(ReadlineError::Interrupted) => { println!("CTRL-C"); break }, Err(ReadlineError::Eof) => { println!("CTRL-D"); break }, Err(err) => { println!("Error: {:?}", err); break } } } rl.save_history("history.txt").unwrap(); }
Make the prompt bold with ANSI escape code.
Make the prompt bold with ANSI escape code.
Rust
mit
dubrowgn/rustyline,dubrowgn/rustyline,gwenn/rustyline,cavedweller/rustyline,kkawakam/rustyline
rust
## Code Before: extern crate rustyline; use rustyline::completion::FilenameCompleter; use rustyline::error::ReadlineError; use rustyline::Editor; fn main() { let c = FilenameCompleter::new(); let mut rl = Editor::new(); rl.set_completer(Some(&c)); if let Err(_) = rl.load_history("history.txt") { println!("No previous history."); } loop { let readline = rl.readline(">> "); match readline { Ok(line) => { rl.add_history_entry(&line); println!("Line: {}", line); }, Err(ReadlineError::Interrupted) => { println!("CTRL-C"); break }, Err(ReadlineError::Eof) => { println!("CTRL-D"); break }, Err(err) => { println!("Error: {:?}", err); break } } } rl.save_history("history.txt").unwrap(); } ## Instruction: Make the prompt bold with ANSI escape code. ## Code After: extern crate rustyline; use rustyline::completion::FilenameCompleter; use rustyline::error::ReadlineError; use rustyline::Editor; fn main() { let c = FilenameCompleter::new(); let mut rl = Editor::new(); rl.set_completer(Some(&c)); if let Err(_) = rl.load_history("history.txt") { println!("No previous history."); } loop { let readline = rl.readline("\x1b[1m>> \x1b[0m"); match readline { Ok(line) => { rl.add_history_entry(&line); println!("Line: {}", line); }, Err(ReadlineError::Interrupted) => { println!("CTRL-C"); break }, Err(ReadlineError::Eof) => { println!("CTRL-D"); break }, Err(err) => { println!("Error: {:?}", err); break } } } rl.save_history("history.txt").unwrap(); }
extern crate rustyline; use rustyline::completion::FilenameCompleter; use rustyline::error::ReadlineError; use rustyline::Editor; fn main() { let c = FilenameCompleter::new(); let mut rl = Editor::new(); rl.set_completer(Some(&c)); if let Err(_) = rl.load_history("history.txt") { println!("No previous history."); } loop { - let readline = rl.readline(">> "); + let readline = rl.readline("\x1b[1m>> \x1b[0m"); ? +++++++ +++++++ match readline { Ok(line) => { rl.add_history_entry(&line); println!("Line: {}", line); }, Err(ReadlineError::Interrupted) => { println!("CTRL-C"); break }, Err(ReadlineError::Eof) => { println!("CTRL-D"); break }, Err(err) => { println!("Error: {:?}", err); break } } } rl.save_history("history.txt").unwrap(); }
2
0.055556
1
1
de5618a693eb77bb49732ad152eca0df4d20098b
generateDocs.ps1
generateDocs.ps1
param($username, $password, [switch]$Buildserver) $PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition $module = "Keith" Import-Module "$PSScriptRoot\src\$module" -Force New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated" New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp" $username $password -Buildserver:$Buildserver
$PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition $module = "Keith" Import-Module "$PSScriptRoot\src\$module" -Force New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated" New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp"
Remove auth params for doc generation Authentication and repo management should be moved to another script...
Remove auth params for doc generation Authentication and repo management should be moved to another script...
PowerShell
mit
unic/bob-keith
powershell
## Code Before: param($username, $password, [switch]$Buildserver) $PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition $module = "Keith" Import-Module "$PSScriptRoot\src\$module" -Force New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated" New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp" $username $password -Buildserver:$Buildserver ## Instruction: Remove auth params for doc generation Authentication and repo management should be moved to another script... ## Code After: $PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition $module = "Keith" Import-Module "$PSScriptRoot\src\$module" -Force New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated" New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp"
- param($username, $password, [switch]$Buildserver) - - $PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition + $PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition ? + $module = "Keith" Import-Module "$PSScriptRoot\src\$module" -Force New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated" - New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp" $username $password -Buildserver:$Buildserver + New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp"
6
0.545455
2
4
63f1f8e87e51df872c7cdee808ca2a18a2f474da
src/atdd/src/test/resources/features/TopologyDiscoveryAdvanced.feature
src/atdd/src/test/resources/features/TopologyDiscoveryAdvanced.feature
Feature: Advanced Topology Discovery Scenario: Large Scale Network, Partial Mesh, Discovery Time Given AdvancedTopoDiscoGiven_TBD When AdvancedTopoDiscoWhen_TBD Then AdvancedTopoDiscoThen_TBD
Feature: Advanced Topology Discovery Scenario Outline: Large Scale Network, Partial Mesh, Discovery Time Large scale (>1000) switch network won't be linear or full mesh. It'll have some sort of partial mesh / hub-and-spoke / star architecteure. These tests will still validate that the network is discovered, accurately, within a certain period of time. Given a new controller And a random star topology of <switches> When the controller learns the topology Then the controller should converge within <discovery_time> milliseconds And the learned topology should match the real topology Examples: | switches | discovery_time | | 1000 | 60000 | | 5000 | 120000 | | 10000 | 240000 |
Add scenario to large scale network feature
Add scenario to large scale network feature
Cucumber
apache-2.0
nikitamarchenko/open-kilda,nikitamarchenko/open-kilda,nikitamarchenko/open-kilda,telstra/open-kilda,carmine/open-kilda,jonvestal/open-kilda,carmine/open-kilda,telstra/open-kilda,telstra/open-kilda,carmine/open-kilda,nikitamarchenko/open-kilda,nikitamarchenko/open-kilda,carmine/open-kilda,telstra/open-kilda,carmine/open-kilda,jonvestal/open-kilda,carmine/open-kilda,telstra/open-kilda,telstra/open-kilda,jonvestal/open-kilda,jonvestal/open-kilda,nikitamarchenko/open-kilda,jonvestal/open-kilda,telstra/open-kilda
cucumber
## Code Before: Feature: Advanced Topology Discovery Scenario: Large Scale Network, Partial Mesh, Discovery Time Given AdvancedTopoDiscoGiven_TBD When AdvancedTopoDiscoWhen_TBD Then AdvancedTopoDiscoThen_TBD ## Instruction: Add scenario to large scale network feature ## Code After: Feature: Advanced Topology Discovery Scenario Outline: Large Scale Network, Partial Mesh, Discovery Time Large scale (>1000) switch network won't be linear or full mesh. It'll have some sort of partial mesh / hub-and-spoke / star architecteure. These tests will still validate that the network is discovered, accurately, within a certain period of time. Given a new controller And a random star topology of <switches> When the controller learns the topology Then the controller should converge within <discovery_time> milliseconds And the learned topology should match the real topology Examples: | switches | discovery_time | | 1000 | 60000 | | 5000 | 120000 | | 10000 | 240000 |
Feature: Advanced Topology Discovery - Scenario: Large Scale Network, Partial Mesh, Discovery Time + Scenario Outline: Large Scale Network, Partial Mesh, Discovery Time ? ++++++++ - Given AdvancedTopoDiscoGiven_TBD - When AdvancedTopoDiscoWhen_TBD - Then AdvancedTopoDiscoThen_TBD + + Large scale (>1000) switch network won't be linear or full mesh. It'll have + some sort of partial mesh / hub-and-spoke / star architecteure. These tests will + still validate that the network is discovered, accurately, within a certain period + of time. + + Given a new controller + And a random star topology of <switches> + When the controller learns the topology + Then the controller should converge within <discovery_time> milliseconds + And the learned topology should match the real topology + + Examples: + | switches | discovery_time | + | 1000 | 60000 | + | 5000 | 120000 | + | 10000 | 240000 |
22
3.666667
18
4
cba4eb9a1a56ae6b1bc5824382f89cc270533f8a
scaffolding-go/plan.sh
scaffolding-go/plan.sh
pkg_name=scaffolding-go pkg_description="Scaffolding for Go Applications" pkg_origin=core pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" pkg_version="0.1.0" pkg_license=('Apache-2.0') pkg_source=nosuchfile.tar.gz pkg_upstream_url="https://github.com/habitat-sh/core-plans" pkg_deps=( core/go ) pkg_build_deps=( ${pkg_deps[@]} core/git core/gcc core/make ) pkg_scaffolding=core/scaffolding-base
pkg_name=scaffolding-go pkg_description="Scaffolding for Go Applications" pkg_origin=core pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" pkg_version="0.1.0" pkg_license=('Apache-2.0') pkg_source=nosuchfile.tar.gz pkg_upstream_url="https://github.com/habitat-sh/core-plans" pkg_deps=( ${pkg_deps[@]} core/go core/git core/gcc core/make ) pkg_scaffolding=core/scaffolding-base
Revert "[scaffolding-go] separating build and run deps"
Revert "[scaffolding-go] separating build and run deps" Signed-off-by: Nell Shamrell <8ca9739a2537c8ebcbfe176c51c6e5e22618bd2f@gmail.com>
Shell
apache-2.0
be-plans/be,be-plans/be,be-plans/be,be-plans/be
shell
## Code Before: pkg_name=scaffolding-go pkg_description="Scaffolding for Go Applications" pkg_origin=core pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" pkg_version="0.1.0" pkg_license=('Apache-2.0') pkg_source=nosuchfile.tar.gz pkg_upstream_url="https://github.com/habitat-sh/core-plans" pkg_deps=( core/go ) pkg_build_deps=( ${pkg_deps[@]} core/git core/gcc core/make ) pkg_scaffolding=core/scaffolding-base ## Instruction: Revert "[scaffolding-go] separating build and run deps" Signed-off-by: Nell Shamrell <8ca9739a2537c8ebcbfe176c51c6e5e22618bd2f@gmail.com> ## Code After: pkg_name=scaffolding-go pkg_description="Scaffolding for Go Applications" pkg_origin=core pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" pkg_version="0.1.0" pkg_license=('Apache-2.0') pkg_source=nosuchfile.tar.gz pkg_upstream_url="https://github.com/habitat-sh/core-plans" pkg_deps=( ${pkg_deps[@]} core/go core/git core/gcc core/make ) pkg_scaffolding=core/scaffolding-base
pkg_name=scaffolding-go pkg_description="Scaffolding for Go Applications" pkg_origin=core pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" pkg_version="0.1.0" pkg_license=('Apache-2.0') pkg_source=nosuchfile.tar.gz pkg_upstream_url="https://github.com/habitat-sh/core-plans" pkg_deps=( + ${pkg_deps[@]} core/go - ) - pkg_build_deps=( - ${pkg_deps[@]} core/git core/gcc core/make ) pkg_scaffolding=core/scaffolding-base
4
0.222222
1
3
b937b0beb394bf974a3b2232c4060fb11a2d0e70
yala/setup.cfg
yala/setup.cfg
[yala] isort args = --recursive --check pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" radon cc args = --min D radon mi args = --min D
[yala] isort args = --recursive --check pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" --disable=duplicate-code radon cc args = --min D radon mi args = --min D
Disable pylint duplicate code detection
Disable pylint duplicate code detection It was breaking the parser
INI
mit
cemsbr/yala,cemsbr/yala
ini
## Code Before: [yala] isort args = --recursive --check pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" radon cc args = --min D radon mi args = --min D ## Instruction: Disable pylint duplicate code detection It was breaking the parser ## Code After: [yala] isort args = --recursive --check pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" --disable=duplicate-code radon cc args = --min D radon mi args = --min D
[yala] isort args = --recursive --check - pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" + pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" --disable=duplicate-code ? +++++++++++++++++++++++++ radon cc args = --min D radon mi args = --min D
2
0.4
1
1
eb4329e659ad57f24e07bbef02bd6b88131d718d
app/helpers/application_helper/button/vm_snapshot_add.rb
app/helpers/application_helper/button/vm_snapshot_add.rb
class ApplicationHelper::Button::VmSnapshotAdd < ApplicationHelper::Button::Basic def disabled? @error_message = if records_and_role_allows? && !@active _('Select the Active snapshot to create a new snapshot for this VM') else @record.unsupported_reason(:snapshot_create) end @error_message.present? end private def records_and_role_allows? @record.supports_snapshot_create? end end
class ApplicationHelper::Button::VmSnapshotAdd < ApplicationHelper::Button::Basic def disabled? @error_message = if !role_allows?(:feature => 'vm_snapshot_add') _('Current user lacks permissions to create a new snapshot for this VM') elsif !@record.supports_snapshot_create? @record.unsupported_reason(:snapshot_create) end @error_message.present? end end
Allow user to create snapshot without an active snapshot
Allow user to create snapshot without an active snapshot https://bugzilla.redhat.com/show_bug.cgi?id=1425591
Ruby
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
ruby
## Code Before: class ApplicationHelper::Button::VmSnapshotAdd < ApplicationHelper::Button::Basic def disabled? @error_message = if records_and_role_allows? && !@active _('Select the Active snapshot to create a new snapshot for this VM') else @record.unsupported_reason(:snapshot_create) end @error_message.present? end private def records_and_role_allows? @record.supports_snapshot_create? end end ## Instruction: Allow user to create snapshot without an active snapshot https://bugzilla.redhat.com/show_bug.cgi?id=1425591 ## Code After: class ApplicationHelper::Button::VmSnapshotAdd < ApplicationHelper::Button::Basic def disabled? @error_message = if !role_allows?(:feature => 'vm_snapshot_add') _('Current user lacks permissions to create a new snapshot for this VM') elsif !@record.supports_snapshot_create? @record.unsupported_reason(:snapshot_create) end @error_message.present? end end
class ApplicationHelper::Button::VmSnapshotAdd < ApplicationHelper::Button::Basic def disabled? - @error_message = if records_and_role_allows? && !@active + @error_message = if !role_allows?(:feature => 'vm_snapshot_add') - _('Select the Active snapshot to create a new snapshot for this VM') ? ^ ^^^ ^^ ^ ^ --- -- --- + _('Current user lacks permissions to create a new snapshot for this VM') ? ^^^^ ^ ^^ + ^^ ^^^^^^^ +++ - else + elsif !@record.supports_snapshot_create? @record.unsupported_reason(:snapshot_create) end @error_message.present? end - - private - - def records_and_role_allows? - @record.supports_snapshot_create? - end end
12
0.75
3
9
37bf66efbdfd879dce91fc90c8baf76063197f49
rocker/cloudbuild.yaml
rocker/cloudbuild.yaml
steps: # TODO: use the standard go builder. #- name: 'gcr.io/cloud-builders/go:debian' # Build rocker. - name: 'gcr.io/bendory-argo/go:debian' args: ['get', 'github.com/grammarly/rocker'] env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1'] # Package it into a docker image. - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.'] # Test the rocker build step that we just built. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['--version'] # Use Rockerfile to Build the image 'rocker-built-rocker'. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['build', '-f', 'Rockerfile', '.'] # Confirm that rocker successfully built rocker-built-rocker. - name: 'rocker-built-rocker' args: ['--version'] # Push the rocker builder image. images: - 'gcr.io/$PROJECT_ID/rocker'
steps: # Build rocker. - name: 'gcr.io/cloud-builders/go:debian' args: ['get', 'github.com/grammarly/rocker'] env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1'] # Package it into a docker image. - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.'] # Test the rocker build step that we just built. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['--version'] # Use Rockerfile to Build the image 'rocker-built-rocker'. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['build', '-f', 'Rockerfile', '.'] # Confirm that rocker successfully built rocker-built-rocker. - name: 'rocker-built-rocker' args: ['--version'] # Push the rocker builder image. images: - 'gcr.io/$PROJECT_ID/rocker'
Use the cloud-builders go builder.
Use the cloud-builders go builder.
YAML
apache-2.0
GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community,GoogleCloudPlatform/cloud-builders-community
yaml
## Code Before: steps: # TODO: use the standard go builder. #- name: 'gcr.io/cloud-builders/go:debian' # Build rocker. - name: 'gcr.io/bendory-argo/go:debian' args: ['get', 'github.com/grammarly/rocker'] env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1'] # Package it into a docker image. - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.'] # Test the rocker build step that we just built. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['--version'] # Use Rockerfile to Build the image 'rocker-built-rocker'. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['build', '-f', 'Rockerfile', '.'] # Confirm that rocker successfully built rocker-built-rocker. - name: 'rocker-built-rocker' args: ['--version'] # Push the rocker builder image. images: - 'gcr.io/$PROJECT_ID/rocker' ## Instruction: Use the cloud-builders go builder. ## Code After: steps: # Build rocker. - name: 'gcr.io/cloud-builders/go:debian' args: ['get', 'github.com/grammarly/rocker'] env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1'] # Package it into a docker image. - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.'] # Test the rocker build step that we just built. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['--version'] # Use Rockerfile to Build the image 'rocker-built-rocker'. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['build', '-f', 'Rockerfile', '.'] # Confirm that rocker successfully built rocker-built-rocker. - name: 'rocker-built-rocker' args: ['--version'] # Push the rocker builder image. images: - 'gcr.io/$PROJECT_ID/rocker'
steps: - # TODO: use the standard go builder. - #- name: 'gcr.io/cloud-builders/go:debian' # Build rocker. - - name: 'gcr.io/bendory-argo/go:debian' ? --- ^^^^^^ + - name: 'gcr.io/cloud-builders/go:debian' ? ++++++ ++++ ^ args: ['get', 'github.com/grammarly/rocker'] env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1'] # Package it into a docker image. - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.'] # Test the rocker build step that we just built. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['--version'] # Use Rockerfile to Build the image 'rocker-built-rocker'. - name: 'gcr.io/$PROJECT_ID/rocker' args: ['build', '-f', 'Rockerfile', '.'] # Confirm that rocker successfully built rocker-built-rocker. - name: 'rocker-built-rocker' args: ['--version'] # Push the rocker builder image. images: - 'gcr.io/$PROJECT_ID/rocker'
4
0.166667
1
3
36ad79c2e5e3d9d61d2d10231a8e271b87ecdcc4
lib/tasks/create_index.rake
lib/tasks/create_index.rake
namespace :spree_elasticsearch do desc "Create Elasticsearch index." task :create_index => :environment do unless Elasticsearch::Model.client.indices.exists index: Spree::ElasticsearchSettings.index Elasticsearch::Model.client.indices.create \ index: Spree::ElasticsearchSettings.index, body: { settings: { number_of_shards: 1, number_of_replicas: 0, analysis: { analyzer: { nGram_analyzer: { type: "custom", filter: ["lowercase", "asciifolding", "nGram_filter"], tokenizer: "whitespace" }, whitespace_analyzer: { type: "custom", filter: ["lowercase", "asciifolding"], tokenizer: "whitespace" }}, filter: { nGram_filter: { max_gram: "20", min_gram: "3", type: "nGram", token_chars: ["letter", "digit", "punctuation", "symbol"] }}}}, mappings: Spree::Product.mappings.to_hash } end end end
namespace :spree_elasticsearch do desc "Create Elasticsearch index." task :create_index => :environment do unless Elasticsearch::Model.client.indices.exists index: Spree::ElasticsearchSettings.index Elasticsearch::Model.client.indices.create \ index: Spree::ElasticsearchSettings.index, body: { settings: { analysis: { analyzer: { nGram_analyzer: { type: "custom", filter: ["lowercase", "asciifolding", "nGram_filter"], tokenizer: "whitespace" }, whitespace_analyzer: { type: "custom", filter: ["lowercase", "asciifolding"], tokenizer: "whitespace" }}, filter: { nGram_filter: { max_gram: "20", min_gram: "3", type: "nGram", token_chars: ["letter", "digit", "punctuation", "symbol"] }}}}, mappings: Spree::Product.mappings.to_hash } end end end
Use default settings for shards and replicas (5 shards)
Use default settings for shards and replicas (5 shards)
Ruby
bsd-3-clause
casualsteps/spree_elasticsearch,Boomkat/spree_elasticsearch,casualsteps/spree_elasticsearch,casualsteps/spree_elasticsearch
ruby
## Code Before: namespace :spree_elasticsearch do desc "Create Elasticsearch index." task :create_index => :environment do unless Elasticsearch::Model.client.indices.exists index: Spree::ElasticsearchSettings.index Elasticsearch::Model.client.indices.create \ index: Spree::ElasticsearchSettings.index, body: { settings: { number_of_shards: 1, number_of_replicas: 0, analysis: { analyzer: { nGram_analyzer: { type: "custom", filter: ["lowercase", "asciifolding", "nGram_filter"], tokenizer: "whitespace" }, whitespace_analyzer: { type: "custom", filter: ["lowercase", "asciifolding"], tokenizer: "whitespace" }}, filter: { nGram_filter: { max_gram: "20", min_gram: "3", type: "nGram", token_chars: ["letter", "digit", "punctuation", "symbol"] }}}}, mappings: Spree::Product.mappings.to_hash } end end end ## Instruction: Use default settings for shards and replicas (5 shards) ## Code After: namespace :spree_elasticsearch do desc "Create Elasticsearch index." task :create_index => :environment do unless Elasticsearch::Model.client.indices.exists index: Spree::ElasticsearchSettings.index Elasticsearch::Model.client.indices.create \ index: Spree::ElasticsearchSettings.index, body: { settings: { analysis: { analyzer: { nGram_analyzer: { type: "custom", filter: ["lowercase", "asciifolding", "nGram_filter"], tokenizer: "whitespace" }, whitespace_analyzer: { type: "custom", filter: ["lowercase", "asciifolding"], tokenizer: "whitespace" }}, filter: { nGram_filter: { max_gram: "20", min_gram: "3", type: "nGram", token_chars: ["letter", "digit", "punctuation", "symbol"] }}}}, mappings: Spree::Product.mappings.to_hash } end end end
namespace :spree_elasticsearch do desc "Create Elasticsearch index." task :create_index => :environment do unless Elasticsearch::Model.client.indices.exists index: Spree::ElasticsearchSettings.index Elasticsearch::Model.client.indices.create \ index: Spree::ElasticsearchSettings.index, body: { settings: { - number_of_shards: 1, - number_of_replicas: 0, analysis: { analyzer: { nGram_analyzer: { type: "custom", filter: ["lowercase", "asciifolding", "nGram_filter"], tokenizer: "whitespace" }, whitespace_analyzer: { type: "custom", filter: ["lowercase", "asciifolding"], tokenizer: "whitespace" }}, filter: { nGram_filter: { max_gram: "20", min_gram: "3", type: "nGram", token_chars: ["letter", "digit", "punctuation", "symbol"] }}}}, mappings: Spree::Product.mappings.to_hash } end end end
2
0.066667
0
2
c52c489ee3adc5fe4cca73f7f1057fe68e16b20c
app/views/incidents/_index-results.html.erb
app/views/incidents/_index-results.html.erb
<h2 class="supporting">Results</h2> <article class="incident-index-results" id="results"> </article> <h1 class="incident-index-results-description"> <strong class="query-count"><%= @incidents.total_count %></strong> <% if params[:incident_type] %> <strong class="type"> <%= params[:incident_type] %> </strong> <% end %> incident reports <% if params[:by_detailed_report] %> with attatched <strong>Incident Detail Reports</strong> <% end %> <% if @location_name %> from <strong class="location"><%= @location_name %></strong> <% end %> between <strong class="start-date"> <%= @start_date.strftime("%e %b %Y") %> </strong> and <strong class="end-date"> <%=@end_date.strftime("%e %b %Y") %>. </strong> </h1> <section class="incident-index-results-reference"> <%= link_to "Permalink", params, class: 'incident-index-permalink', title: 'url to share or bookmark these results' %> <!-- <a class="incident-index-order-by" href="" title="Reorder the filter results, currently sorted by newest first, to see the oldest incident first.">See oldest first</a> --> <nav class="pagination-block"> <p class="pagination-details"> <%= page_entries_info @incidents %> </p> <%= paginate @incidents %> </nav> </section>
<h2 class="supporting">Results</h2> <article class="incident-index-results" id="results"> </article> <h1 class="incident-index-results-description"> <strong class="query-count"><%= @incidents.total_count %></strong> <% if params[:incident_type] %> <strong class="type"> <%= params[:incident_type] %> </strong> <% end %> incident reports <% if params[:by_detailed_report] %> with attatched <strong>Incident Detail Reports</strong> <% end %> <% if @location_name %> from <strong class="location"><%= @location_name %></strong> <% end %> between <strong class="start-date"> <%= @start_date.strftime("%e %b %Y") %> </strong> and <strong class="end-date"> <%=@end_date.strftime("%e %b %Y") %>. </strong> </h1> <section class="incident-index-results-reference"> <%= link_to "Permalink", params, class: 'incident-index-permalink', title: 'url to share or bookmark these results' %> <!-- <a class="incident-index-order-by" href="" title="Reorder the filter results, currently sorted by newest first, to see the oldest incident first.">See oldest first</a> --> <nav class="pagination-block"> <p class="pagination-details"> <%= page_entries_info @incidents, :entry_name => 'Incident Reports' %> </p> <%= paginate @incidents %> </nav> </section>
Use Incident Reports over Incidents
Use Incident Reports over Incidents
HTML+ERB
agpl-3.0
DetentionLogs/detentionlogs,DetentionLogs/detentionlogs
html+erb
## Code Before: <h2 class="supporting">Results</h2> <article class="incident-index-results" id="results"> </article> <h1 class="incident-index-results-description"> <strong class="query-count"><%= @incidents.total_count %></strong> <% if params[:incident_type] %> <strong class="type"> <%= params[:incident_type] %> </strong> <% end %> incident reports <% if params[:by_detailed_report] %> with attatched <strong>Incident Detail Reports</strong> <% end %> <% if @location_name %> from <strong class="location"><%= @location_name %></strong> <% end %> between <strong class="start-date"> <%= @start_date.strftime("%e %b %Y") %> </strong> and <strong class="end-date"> <%=@end_date.strftime("%e %b %Y") %>. </strong> </h1> <section class="incident-index-results-reference"> <%= link_to "Permalink", params, class: 'incident-index-permalink', title: 'url to share or bookmark these results' %> <!-- <a class="incident-index-order-by" href="" title="Reorder the filter results, currently sorted by newest first, to see the oldest incident first.">See oldest first</a> --> <nav class="pagination-block"> <p class="pagination-details"> <%= page_entries_info @incidents %> </p> <%= paginate @incidents %> </nav> </section> ## Instruction: Use Incident Reports over Incidents ## Code After: <h2 class="supporting">Results</h2> <article class="incident-index-results" id="results"> </article> <h1 class="incident-index-results-description"> <strong class="query-count"><%= @incidents.total_count %></strong> <% if params[:incident_type] %> <strong class="type"> <%= params[:incident_type] %> </strong> <% end %> incident reports <% if params[:by_detailed_report] %> with attatched <strong>Incident Detail Reports</strong> <% end %> <% if @location_name %> from <strong class="location"><%= @location_name %></strong> <% end %> between <strong class="start-date"> <%= @start_date.strftime("%e %b %Y") %> </strong> and <strong class="end-date"> <%=@end_date.strftime("%e %b %Y") %>. </strong> </h1> <section class="incident-index-results-reference"> <%= link_to "Permalink", params, class: 'incident-index-permalink', title: 'url to share or bookmark these results' %> <!-- <a class="incident-index-order-by" href="" title="Reorder the filter results, currently sorted by newest first, to see the oldest incident first.">See oldest first</a> --> <nav class="pagination-block"> <p class="pagination-details"> <%= page_entries_info @incidents, :entry_name => 'Incident Reports' %> </p> <%= paginate @incidents %> </nav> </section>
<h2 class="supporting">Results</h2> <article class="incident-index-results" id="results"> </article> <h1 class="incident-index-results-description"> <strong class="query-count"><%= @incidents.total_count %></strong> <% if params[:incident_type] %> <strong class="type"> <%= params[:incident_type] %> </strong> <% end %> incident reports <% if params[:by_detailed_report] %> with attatched <strong>Incident Detail Reports</strong> <% end %> <% if @location_name %> from <strong class="location"><%= @location_name %></strong> <% end %> between <strong class="start-date"> <%= @start_date.strftime("%e %b %Y") %> </strong> and <strong class="end-date"> <%=@end_date.strftime("%e %b %Y") %>. </strong> </h1> <section class="incident-index-results-reference"> <%= link_to "Permalink", params, class: 'incident-index-permalink', title: 'url to share or bookmark these results' %> <!-- <a class="incident-index-order-by" href="" title="Reorder the filter results, currently sorted by newest first, to see the oldest incident first.">See oldest first</a> --> <nav class="pagination-block"> <p class="pagination-details"> - <%= page_entries_info @incidents %> + <%= page_entries_info @incidents, :entry_name => 'Incident Reports' %> </p> <%= paginate @incidents %> </nav> </section>
2
0.04
1
1
647f2bce0ae433eaac2fffd3b06a50d5ea4d071a
lib/hirefire/backend.rb
lib/hirefire/backend.rb
module HireFire module Backend ## # Load the correct module (ActiveRecord, Mongoid or Redis) # based on which worker and backends are loaded # # Currently supports: # - Delayed Job with ActiveRecord and Mongoid # - Resque with Redis # # @return [nil] def self.included(base) ## # Delayed Job specific backends if defined?(::Delayed) if defined?(::Delayed::Backend::ActiveRecord::Job) if ActiveRecord::VERSION::STRING >= '3.0.0' base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord) else base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord2) end end if defined?(::Delayed::Backend::Mongoid::Job) base.send(:include, HireFire::Backend::DelayedJob::Mongoid) end end ## # Resque specific backends if defined?(::Resque) base.send(:include, HireFire::Backend::Resque::Redis) end end end end
module HireFire module Backend ## # Load the correct module (ActiveRecord, Mongoid or Redis) # based on which worker and backends are loaded # # Currently supports: # - Delayed Job with ActiveRecord and Mongoid # - Resque with Redis # # @return [nil] def self.included(base) ## # Delayed Job specific backends if defined?(::Delayed) if defined?(::Delayed::Backend::ActiveRecord::Job) if defined?(::ActiveRecord::Relation) base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord) else base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord2) end end if defined?(::Delayed::Backend::Mongoid::Job) base.send(:include, HireFire::Backend::DelayedJob::Mongoid) end end ## # Resque specific backends if defined?(::Resque) base.send(:include, HireFire::Backend::Resque::Redis) end end end end
Remove string comparison and test based on required feature.
Remove string comparison and test based on required feature.
Ruby
mit
hirefire/hirefire
ruby
## Code Before: module HireFire module Backend ## # Load the correct module (ActiveRecord, Mongoid or Redis) # based on which worker and backends are loaded # # Currently supports: # - Delayed Job with ActiveRecord and Mongoid # - Resque with Redis # # @return [nil] def self.included(base) ## # Delayed Job specific backends if defined?(::Delayed) if defined?(::Delayed::Backend::ActiveRecord::Job) if ActiveRecord::VERSION::STRING >= '3.0.0' base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord) else base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord2) end end if defined?(::Delayed::Backend::Mongoid::Job) base.send(:include, HireFire::Backend::DelayedJob::Mongoid) end end ## # Resque specific backends if defined?(::Resque) base.send(:include, HireFire::Backend::Resque::Redis) end end end end ## Instruction: Remove string comparison and test based on required feature. ## Code After: module HireFire module Backend ## # Load the correct module (ActiveRecord, Mongoid or Redis) # based on which worker and backends are loaded # # Currently supports: # - Delayed Job with ActiveRecord and Mongoid # - Resque with Redis # # @return [nil] def self.included(base) ## # Delayed Job specific backends if defined?(::Delayed) if defined?(::Delayed::Backend::ActiveRecord::Job) if defined?(::ActiveRecord::Relation) base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord) else base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord2) end end if defined?(::Delayed::Backend::Mongoid::Job) base.send(:include, HireFire::Backend::DelayedJob::Mongoid) end end ## # Resque specific backends if defined?(::Resque) base.send(:include, HireFire::Backend::Resque::Redis) end end end end
module HireFire module Backend ## # Load the correct module (ActiveRecord, Mongoid or Redis) # based on which worker and backends are loaded # # Currently supports: # - Delayed Job with ActiveRecord and Mongoid # - Resque with Redis # # @return [nil] def self.included(base) ## # Delayed Job specific backends if defined?(::Delayed) if defined?(::Delayed::Backend::ActiveRecord::Job) - if ActiveRecord::VERSION::STRING >= '3.0.0' + if defined?(::ActiveRecord::Relation) base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord) else base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord2) end end if defined?(::Delayed::Backend::Mongoid::Job) base.send(:include, HireFire::Backend::DelayedJob::Mongoid) end end ## # Resque specific backends if defined?(::Resque) base.send(:include, HireFire::Backend::Resque::Redis) end end end end
2
0.04878
1
1
3b31d2d99414e2f1ba5c5e228729c6d7905a0a47
lib/siff.rb
lib/siff.rb
module Siff SIFFS = { :BE => 'EUR', :BG => 'EUR', :CA => 'CAD', :CZ => 'EUR', :DK => 'EUR', :DE => 'EUR', :EE => 'EUR', :IE => 'EUR', :EL => 'EUR', :ES => 'EUR', :FR => 'EUR', :GB => 'GBP', :IT => 'EUR', :CY => 'EUR', :LV => 'EUR', :LT => 'EUR', :LU => 'EUR', :HU => 'EUR', :MT => 'EUR', :NL => 'EUR', :AT => 'EUR', :PL => 'EUR', :PT => 'EUR', :RO => 'EUR', :SI => 'EUR', :SK => 'EUR', :FI => 'EUR', :SE => 'EUR', :UK => 'GBP', :US => 'USD' } def currency_for(country_code) SIFFS[country_code] || 'unknown' end end
module Siff SIFFS = { :BE => :EUR, :BG => :EUR, :CA => :CAD, :CZ => :EUR, :DK => :EUR, :DE => :EUR, :EE => :EUR, :IE => :EUR, :EL => :EUR, :ES => :EUR, :FR => :EUR, :GB => :GBP, :IT => :EUR, :CY => :EUR, :LV => :EUR, :LT => :EUR, :LU => :EUR, :HU => :EUR, :MT => :EUR, :NL => :EUR, :AT => :EUR, :PL => :EUR, :PT => :EUR, :RO => :EUR, :SI => :EUR, :SK => :EUR, :FI => :EUR, :SE => :EUR, :UK => :GBP, :US => :USD } def currency_for(country_code) (SIFFS[country_code] || :unknown).to_s end end
Convert strings to symbols to save memory instantiation.
Convert strings to symbols to save memory instantiation.
Ruby
mit
ecomba/ecriso4217
ruby
## Code Before: module Siff SIFFS = { :BE => 'EUR', :BG => 'EUR', :CA => 'CAD', :CZ => 'EUR', :DK => 'EUR', :DE => 'EUR', :EE => 'EUR', :IE => 'EUR', :EL => 'EUR', :ES => 'EUR', :FR => 'EUR', :GB => 'GBP', :IT => 'EUR', :CY => 'EUR', :LV => 'EUR', :LT => 'EUR', :LU => 'EUR', :HU => 'EUR', :MT => 'EUR', :NL => 'EUR', :AT => 'EUR', :PL => 'EUR', :PT => 'EUR', :RO => 'EUR', :SI => 'EUR', :SK => 'EUR', :FI => 'EUR', :SE => 'EUR', :UK => 'GBP', :US => 'USD' } def currency_for(country_code) SIFFS[country_code] || 'unknown' end end ## Instruction: Convert strings to symbols to save memory instantiation. ## Code After: module Siff SIFFS = { :BE => :EUR, :BG => :EUR, :CA => :CAD, :CZ => :EUR, :DK => :EUR, :DE => :EUR, :EE => :EUR, :IE => :EUR, :EL => :EUR, :ES => :EUR, :FR => :EUR, :GB => :GBP, :IT => :EUR, :CY => :EUR, :LV => :EUR, :LT => :EUR, :LU => :EUR, :HU => :EUR, :MT => :EUR, :NL => :EUR, :AT => :EUR, :PL => :EUR, :PT => :EUR, :RO => :EUR, :SI => :EUR, :SK => :EUR, :FI => :EUR, :SE => :EUR, :UK => :GBP, :US => :USD } def currency_for(country_code) (SIFFS[country_code] || :unknown).to_s end end
module Siff SIFFS = { - :BE => 'EUR', ? ^ - + :BE => :EUR, ? ^ - :BG => 'EUR', ? ^ - + :BG => :EUR, ? ^ - :CA => 'CAD', ? ^ - + :CA => :CAD, ? ^ - :CZ => 'EUR', ? ^ - + :CZ => :EUR, ? ^ - :DK => 'EUR', ? ^ - + :DK => :EUR, ? ^ - :DE => 'EUR', ? ^ - + :DE => :EUR, ? ^ - :EE => 'EUR', ? ^ - + :EE => :EUR, ? ^ - :IE => 'EUR', ? ^ - + :IE => :EUR, ? ^ - :EL => 'EUR', ? ^ - + :EL => :EUR, ? ^ - :ES => 'EUR', ? ^ - + :ES => :EUR, ? ^ - :FR => 'EUR', ? ^ - + :FR => :EUR, ? ^ - :GB => 'GBP', ? ^ - + :GB => :GBP, ? ^ - :IT => 'EUR', ? ^ - + :IT => :EUR, ? ^ - :CY => 'EUR', ? ^ - + :CY => :EUR, ? ^ - :LV => 'EUR', ? ^ - + :LV => :EUR, ? ^ - :LT => 'EUR', ? ^ - + :LT => :EUR, ? ^ - :LU => 'EUR', ? ^ - + :LU => :EUR, ? ^ - :HU => 'EUR', ? ^ - + :HU => :EUR, ? ^ - :MT => 'EUR', ? ^ - + :MT => :EUR, ? ^ - :NL => 'EUR', ? ^ - + :NL => :EUR, ? ^ - :AT => 'EUR', ? ^ - + :AT => :EUR, ? ^ - :PL => 'EUR', ? ^ - + :PL => :EUR, ? ^ - :PT => 'EUR', ? ^ - + :PT => :EUR, ? ^ - :RO => 'EUR', ? ^ - + :RO => :EUR, ? ^ - :SI => 'EUR', ? ^ - + :SI => :EUR, ? ^ - :SK => 'EUR', ? ^ - + :SK => :EUR, ? ^ - :FI => 'EUR', ? ^ - + :FI => :EUR, ? ^ - :SE => 'EUR', ? ^ - + :SE => :EUR, ? ^ - :UK => 'GBP', ? ^ - + :UK => :GBP, ? ^ - :US => 'USD' ? ^ - + :US => :USD ? ^ } def currency_for(country_code) - SIFFS[country_code] || 'unknown' ? ^ ^ + (SIFFS[country_code] || :unknown).to_s ? + ^ ^^^^^^ end end
62
1.631579
31
31
fbe6a42d1b24adadce29c2deb67cdf5ed5672972
README.md
README.md
Download recent movies from YTS
Summary --------------- yts-downloader is an open source project providing automatic downloading of torrents for recent movies from yts.ag. You can filter based on quality (720p, 1080p, 3D), genre, rotten tomato rating or even MPA rating. Requirements --------------- - Node 6.x - NPM Download --------------- Configuration --------------- This is the default configuration. You can easily customize and override any setting by copying the `config/default.json` file to `config/development.json` and then change any settings you desire. Note: `cron_pattern` overrides frequency unit/value. `since` is not currently supported. ```js { "frequency" : { "unit" : "hours", "value" : "*/2", "cron_pattern" : "" }, "query" : { "mpa_ratings" : ["G", "PG", "PG-13"], "minimum_rating" : 5, "genre" : "", "quality" : "1080p" }, "baseurl" : "https://yts.ag/api/v2", "destination" : "./torrents", "run_at_start" : true, "log_level" : "info", "cache_ttl" : 2592000, "since" : 1482032238 } ``` Features --------------- - [x] Filter by genre - [x] Filter by MPA rating - [x] Filter by quality (1080p, 720p, 3D) - [x] Filter by Rotten Tomotos rating Author --------------- Dan Wilson ([@killroyboy](https://twitter.com/killroyboy) / [Web](http://codeality.com)) License --------------- MIT Contributing --------------- Code contributions are greatly appreciated, please submit a new [pull request](https://github.com/killroyboy/yts-downloader/pull/new/master)!
Add all good stuff to readme
Add all good stuff to readme
Markdown
mit
killroyboy/yts-downloader
markdown
## Code Before: Download recent movies from YTS ## Instruction: Add all good stuff to readme ## Code After: Summary --------------- yts-downloader is an open source project providing automatic downloading of torrents for recent movies from yts.ag. You can filter based on quality (720p, 1080p, 3D), genre, rotten tomato rating or even MPA rating. Requirements --------------- - Node 6.x - NPM Download --------------- Configuration --------------- This is the default configuration. You can easily customize and override any setting by copying the `config/default.json` file to `config/development.json` and then change any settings you desire. Note: `cron_pattern` overrides frequency unit/value. `since` is not currently supported. ```js { "frequency" : { "unit" : "hours", "value" : "*/2", "cron_pattern" : "" }, "query" : { "mpa_ratings" : ["G", "PG", "PG-13"], "minimum_rating" : 5, "genre" : "", "quality" : "1080p" }, "baseurl" : "https://yts.ag/api/v2", "destination" : "./torrents", "run_at_start" : true, "log_level" : "info", "cache_ttl" : 2592000, "since" : 1482032238 } ``` Features --------------- - [x] Filter by genre - [x] Filter by MPA rating - [x] Filter by quality (1080p, 720p, 3D) - [x] Filter by Rotten Tomotos rating Author --------------- Dan Wilson ([@killroyboy](https://twitter.com/killroyboy) / [Web](http://codeality.com)) License --------------- MIT Contributing --------------- Code contributions are greatly appreciated, please submit a new [pull request](https://github.com/killroyboy/yts-downloader/pull/new/master)!
- Download recent movies from YTS + + Summary + --------------- + yts-downloader is an open source project providing automatic downloading of torrents for recent movies from yts.ag. You can filter based on quality (720p, 1080p, 3D), genre, rotten tomato rating or even MPA rating. + + Requirements + --------------- + - Node 6.x + - NPM + + Download + --------------- + + Configuration + --------------- + This is the default configuration. You can easily customize and override any setting by copying the `config/default.json` file to `config/development.json` and then change any settings you desire. + + Note: `cron_pattern` overrides frequency unit/value. `since` is not currently supported. + + ```js + { + "frequency" : { + "unit" : "hours", + "value" : "*/2", + "cron_pattern" : "" + }, + "query" : { + "mpa_ratings" : ["G", "PG", "PG-13"], + "minimum_rating" : 5, + "genre" : "", + "quality" : "1080p" + }, + "baseurl" : "https://yts.ag/api/v2", + "destination" : "./torrents", + "run_at_start" : true, + "log_level" : "info", + "cache_ttl" : 2592000, + "since" : 1482032238 + } + ``` + + Features + --------------- + - [x] Filter by genre + - [x] Filter by MPA rating + - [x] Filter by quality (1080p, 720p, 3D) + - [x] Filter by Rotten Tomotos rating + + Author + --------------- + Dan Wilson ([@killroyboy](https://twitter.com/killroyboy) / [Web](http://codeality.com)) + + License + --------------- + MIT + + Contributing + --------------- + Code contributions are greatly appreciated, please submit a new [pull request](https://github.com/killroyboy/yts-downloader/pull/new/master)!
60
60
59
1
215622e070860cb24c032186d768c6b341ad27fb
nemubot.py
nemubot.py
import sys import os import imp import traceback servers = dict() print ("Nemubot ready, my PID is %i!" % (os.getpid())) prompt = __import__ ("prompt") while prompt.launch(servers): try: imp.reload(prompt) except: print ("Unable to reload the prompt due to errors. Fix them before trying to reload the prompt.") exc_type, exc_value, exc_traceback = sys.exc_info() sys.stdout.write (traceback.format_exception_only(exc_type, exc_value)[0]) print ("Bye") sys.exit(0)
import sys import os import imp import traceback servers = dict() prompt = __import__ ("prompt") if len(sys.argv) >= 2: for arg in sys.argv[1:]: prompt.load_file(arg, servers) print ("Nemubot ready, my PID is %i!" % (os.getpid())) while prompt.launch(servers): try: imp.reload(prompt) except: print ("Unable to reload the prompt due to errors. Fix them before trying to reload the prompt.") exc_type, exc_value, exc_traceback = sys.exc_info() sys.stdout.write (traceback.format_exception_only(exc_type, exc_value)[0]) print ("Bye") sys.exit(0)
Load files given in arguments
Load files given in arguments
Python
agpl-3.0
nemunaire/nemubot,nbr23/nemubot,Bobobol/nemubot-1
python
## Code Before: import sys import os import imp import traceback servers = dict() print ("Nemubot ready, my PID is %i!" % (os.getpid())) prompt = __import__ ("prompt") while prompt.launch(servers): try: imp.reload(prompt) except: print ("Unable to reload the prompt due to errors. Fix them before trying to reload the prompt.") exc_type, exc_value, exc_traceback = sys.exc_info() sys.stdout.write (traceback.format_exception_only(exc_type, exc_value)[0]) print ("Bye") sys.exit(0) ## Instruction: Load files given in arguments ## Code After: import sys import os import imp import traceback servers = dict() prompt = __import__ ("prompt") if len(sys.argv) >= 2: for arg in sys.argv[1:]: prompt.load_file(arg, servers) print ("Nemubot ready, my PID is %i!" % (os.getpid())) while prompt.launch(servers): try: imp.reload(prompt) except: print ("Unable to reload the prompt due to errors. Fix them before trying to reload the prompt.") exc_type, exc_value, exc_traceback = sys.exc_info() sys.stdout.write (traceback.format_exception_only(exc_type, exc_value)[0]) print ("Bye") sys.exit(0)
import sys import os import imp import traceback servers = dict() + prompt = __import__ ("prompt") + + if len(sys.argv) >= 2: + for arg in sys.argv[1:]: + prompt.load_file(arg, servers) + print ("Nemubot ready, my PID is %i!" % (os.getpid())) - prompt = __import__ ("prompt") while prompt.launch(servers): try: imp.reload(prompt) except: print ("Unable to reload the prompt due to errors. Fix them before trying to reload the prompt.") exc_type, exc_value, exc_traceback = sys.exc_info() sys.stdout.write (traceback.format_exception_only(exc_type, exc_value)[0]) print ("Bye") sys.exit(0)
7
0.35
6
1
e014f585473bd99d800745eacd7945da61d986ae
composer.json
composer.json
{ "name": "kordy/ticketit", "description": "A simple helpdesk tickets system for Laravel 5.1 which integrates smoothly with Laravel default users and auth system", "type": "laravel-package", "keywords": ["laravel","helpdesk", "ticket", "support"], "require": { "laravel/framework": "^5.1", "laravelcollective/html": "^5.1", "illuminate/support": "^5.1", "yajra/laravel-datatables-oracle": "~5.0" }, "license": "MIT", "authors": [ { "name": "Ahmed Kordy", "email": "ahmed@kordy.info" } ], "autoload": { "psr-4": { "Kordy\\Ticketit\\": "src" } } }
{ "name": "kordy/ticketit", "description": "A simple helpdesk tickets system for Laravel 5.1 which integrates smoothly with Laravel default users and auth system", "type": "laravel-package", "keywords": ["laravel","helpdesk", "ticket", "support"], "require": { "laravel/framework": "^5.1", "laravelcollective/html": "^5.1", "illuminate/support": "^5.1", "yajra/laravel-datatables-oracle": "~5.0", "jenssegers/date": "^3.0" }, "license": "MIT", "authors": [ { "name": "Ahmed Kordy", "email": "ahmed@kordy.info" } ], "autoload": { "psr-4": { "Kordy\\Ticketit\\": "src" } } }
Add support for Carbon Translations
Add support for Carbon Translations
JSON
mit
xaviqv/ticketit,kikoseijo/ticketit,changefox/osticketit,xaviqv/ticketit,cassianogf/ticket-system,panichelpdesk/panichd,kikoseijo/ticketit,panichelpdesk/panichd,tmcdon89/ticketit,cassianogf/ticket-system,thekordy/ticketit,changefox/osticketit,thekordy/ticketit
json
## Code Before: { "name": "kordy/ticketit", "description": "A simple helpdesk tickets system for Laravel 5.1 which integrates smoothly with Laravel default users and auth system", "type": "laravel-package", "keywords": ["laravel","helpdesk", "ticket", "support"], "require": { "laravel/framework": "^5.1", "laravelcollective/html": "^5.1", "illuminate/support": "^5.1", "yajra/laravel-datatables-oracle": "~5.0" }, "license": "MIT", "authors": [ { "name": "Ahmed Kordy", "email": "ahmed@kordy.info" } ], "autoload": { "psr-4": { "Kordy\\Ticketit\\": "src" } } } ## Instruction: Add support for Carbon Translations ## Code After: { "name": "kordy/ticketit", "description": "A simple helpdesk tickets system for Laravel 5.1 which integrates smoothly with Laravel default users and auth system", "type": "laravel-package", "keywords": ["laravel","helpdesk", "ticket", "support"], "require": { "laravel/framework": "^5.1", "laravelcollective/html": "^5.1", "illuminate/support": "^5.1", "yajra/laravel-datatables-oracle": "~5.0", "jenssegers/date": "^3.0" }, "license": "MIT", "authors": [ { "name": "Ahmed Kordy", "email": "ahmed@kordy.info" } ], "autoload": { "psr-4": { "Kordy\\Ticketit\\": "src" } } }
{ "name": "kordy/ticketit", "description": "A simple helpdesk tickets system for Laravel 5.1 which integrates smoothly with Laravel default users and auth system", "type": "laravel-package", "keywords": ["laravel","helpdesk", "ticket", "support"], "require": { "laravel/framework": "^5.1", "laravelcollective/html": "^5.1", "illuminate/support": "^5.1", - "yajra/laravel-datatables-oracle": "~5.0" + "yajra/laravel-datatables-oracle": "~5.0", ? + + "jenssegers/date": "^3.0" }, "license": "MIT", "authors": [ { "name": "Ahmed Kordy", "email": "ahmed@kordy.info" } ], "autoload": { "psr-4": { "Kordy\\Ticketit\\": "src" } } }
3
0.125
2
1
ff758e9bb9ca6a6750d21f17cd9653126c467cef
pkg/api/resources.go
pkg/api/resources.go
package radosAPI // Usage represents the response of usage requests type Usage struct { Entries []struct { Buckets []struct { Bucket string `json:"bucket"` Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Epoch int `json:"epoch"` Time string `json:"time"` } `json:"buckets"` Owner string `json:"owner"` } `json:"entries"` Summary []struct { Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Total struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"total"` User string `json:"user"` } `json:"summary"` }
package radosAPI type apiError struct { Code string `json:"Code"` } // Usage represents the response of usage requests type Usage struct { Entries []struct { Buckets []struct { Bucket string `json:"bucket"` Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Epoch int `json:"epoch"` Time string `json:"time"` } `json:"buckets"` Owner string `json:"owner"` } `json:"entries"` Summary []struct { Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Total struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"total"` User string `json:"user"` } `json:"summary"` }
Add apiError struct to handle errors
Add apiError struct to handle errors
Go
mit
QuentinPerez/go-radosgw
go
## Code Before: package radosAPI // Usage represents the response of usage requests type Usage struct { Entries []struct { Buckets []struct { Bucket string `json:"bucket"` Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Epoch int `json:"epoch"` Time string `json:"time"` } `json:"buckets"` Owner string `json:"owner"` } `json:"entries"` Summary []struct { Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Total struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"total"` User string `json:"user"` } `json:"summary"` } ## Instruction: Add apiError struct to handle errors ## Code After: package radosAPI type apiError struct { Code string `json:"Code"` } // Usage represents the response of usage requests type Usage struct { Entries []struct { Buckets []struct { Bucket string `json:"bucket"` Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Epoch int `json:"epoch"` Time string `json:"time"` } `json:"buckets"` Owner string `json:"owner"` } `json:"entries"` Summary []struct { Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Total struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"total"` User string `json:"user"` } `json:"summary"` }
package radosAPI + + type apiError struct { + Code string `json:"Code"` + } // Usage represents the response of usage requests type Usage struct { Entries []struct { Buckets []struct { Bucket string `json:"bucket"` Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Epoch int `json:"epoch"` Time string `json:"time"` } `json:"buckets"` Owner string `json:"owner"` } `json:"entries"` Summary []struct { Categories []struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Category string `json:"category"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"categories"` Total struct { BytesReceived int `json:"bytes_received"` BytesSent int `json:"bytes_sent"` Ops int `json:"ops"` SuccessfulOps int `json:"successful_ops"` } `json:"total"` User string `json:"user"` } `json:"summary"` }
4
0.111111
4
0
1e214905779575ea1cae1a799901943200bc2469
ces/src/js/entries/popup.js
ces/src/js/entries/popup.js
import dom from '../utils/dom'; import messenger from '../utils/messenger'; import toggle from '../pages/popup/toggle'; messenger.sendToTab('popup-toggle-ready'); toggle({ el: dom.get('#disable-css'), initialStateMessage: 'profile-css-state', onToggleMessage: 'disable-profile-css', disable: true }); toggle({ el: dom.get('#enable-theme'), initialStateMessage: 'custom-theme-state', onToggleMessage: 'enable-custom-theme' }); dom.get('#options-link').on('click', () => { chrome.runtime.openOptionsPage(); });
import dom from '../utils/dom'; import messenger from '../utils/messenger'; import toggle from '../pages/popup/toggle'; messenger.sendToTab('popup-toggle-ready'); toggle({ el: dom.get('#disable-css'), initialStateMessage: 'profile-css-state', onToggleMessage: 'disable-profile-css', disable: true }); toggle({ el: dom.get('#enable-theme'), initialStateMessage: 'custom-theme-state', onToggleMessage: 'enable-custom-theme' }); dom.get('#options-link').on('click', e => { e.preventDefault(); chrome.runtime.openOptionsPage(); });
Stop propagation when opening options page
Stop propagation when opening options page
JavaScript
mit
alexzaworski/CodePen-Enhancement-Suite,alexzaworski/CodePen-Enhancement-Suite
javascript
## Code Before: import dom from '../utils/dom'; import messenger from '../utils/messenger'; import toggle from '../pages/popup/toggle'; messenger.sendToTab('popup-toggle-ready'); toggle({ el: dom.get('#disable-css'), initialStateMessage: 'profile-css-state', onToggleMessage: 'disable-profile-css', disable: true }); toggle({ el: dom.get('#enable-theme'), initialStateMessage: 'custom-theme-state', onToggleMessage: 'enable-custom-theme' }); dom.get('#options-link').on('click', () => { chrome.runtime.openOptionsPage(); }); ## Instruction: Stop propagation when opening options page ## Code After: import dom from '../utils/dom'; import messenger from '../utils/messenger'; import toggle from '../pages/popup/toggle'; messenger.sendToTab('popup-toggle-ready'); toggle({ el: dom.get('#disable-css'), initialStateMessage: 'profile-css-state', onToggleMessage: 'disable-profile-css', disable: true }); toggle({ el: dom.get('#enable-theme'), initialStateMessage: 'custom-theme-state', onToggleMessage: 'enable-custom-theme' }); dom.get('#options-link').on('click', e => { e.preventDefault(); chrome.runtime.openOptionsPage(); });
import dom from '../utils/dom'; import messenger from '../utils/messenger'; import toggle from '../pages/popup/toggle'; messenger.sendToTab('popup-toggle-ready'); toggle({ el: dom.get('#disable-css'), initialStateMessage: 'profile-css-state', onToggleMessage: 'disable-profile-css', disable: true }); toggle({ el: dom.get('#enable-theme'), initialStateMessage: 'custom-theme-state', onToggleMessage: 'enable-custom-theme' }); - dom.get('#options-link').on('click', () => { ? ^^ + dom.get('#options-link').on('click', e => { ? ^ + e.preventDefault(); chrome.runtime.openOptionsPage(); });
3
0.136364
2
1
6b3339d6bf3f153b9b7156f1fb117927ae014c8d
app/views/home/index.haml
app/views/home/index.haml
= render 'shared/header' .repo-listing{'ng-controller' => 'ReposController'} %nav %ul %li.pull-left %span.active-count #{t('active_repos')}: {{(repos | filter:{active: true}).length}} of {{repos.length}} %li.pull-right %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'} %i.fa.fa-refresh %span{'ng-bind' => 'syncButtonText'} .search-wrapper %i.fa.fa-search %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'} %ul.repos{'ng-hide' => 'syncingRepos'} %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'} %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'} %span.name {{repo.full_github_name}}
= render 'shared/header' .repo-listing{'ng-controller' => 'ReposController'} %nav %ul %li.pull-left %span.active-count #{t('active_repos')}: {{(repos | filter:{active: true}).length}} of {{repos.length}} %li.pull-right %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'} %i.fa.fa-refresh %span {{ syncButtonText }} .search-wrapper %i.fa.fa-search %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'} %ul.repos{'ng-hide' => 'syncingRepos'} %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'} %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'} %span.name {{repo.full_github_name}}
Use simpler data binding for text displaying
Use simpler data binding for text displaying
Haml
mit
wiserfirst/hound,JuanitoFatas/hound,orangeiceberg/hound,jeanmatheussouto/hound,larrylv/hound,hashbangnz/hound,peritpatrio/hound,wadetandy/hound,dobtco/hound,wiserfirst/hound,hashbangnz/hound,Koronen/hound,timchunght/hound,adriagalin/hound,rmswimkktt/houndci-staging,adriagalin/hound,Koronen/hound,daniel-beard/hound,wyncode/hound,Reprazent/hound,kolosek/hound,enricogenauck/labhound,sbalay/hound,asross/hound,timchunght/hound,asross/hound,rakibulislam/hound,jmcarp/hound,mynewsdesk/hound,fukayatsu/hound,e-sabelhaus/gitlab-doge,brgaulin/hound,sharma1nitish/hound,rgp/hound,sharma1nitish/hound,malachaifrazier/hound,jeanmatheussouto/hound,timoschilling/hound,yatish27/hound,wiserfirst/hound,jdrew1303/hound,JuanitoFatas/hound,bitjourney/hound,hashbangnz/hound,tinfoil/hound,rakibulislam/hound,bronislav/hound,wyncode/hound,timoschilling/hound,timoschilling/hound,Koronen/hound,viniciustorves/hound,Rademade/reviewer,cbeer/hound,platanus/hound,e-sabelhaus/gitlab-doge,viniciustorves/hound,bitjourney/hound,peritpatrio/hound,dobtco/hound,bitjourney/hound,eliperkins/hound,degica/hound,mydummyaccount3737/hound,daniel-beard/hound,teambox/hound,platanus/hound,adriagalin/hound,enricogenauck/labhound,jeanmatheussouto/hound,eliperkins/hound,degica/hound,framgia/hound,kirs/hound,zlx/Gitlab-Hound,jobseekerltd/hound,brgaulin/hound,zeke/hound,kolosek/hound,rgp/hound,wadetandy/hound,asross/hound,q-centrix/hound,larrylv/hound,sbalay/hound,jmcarp/hound,enricogenauck/labhound,timoschilling/hound,e-sabelhaus/gitlab-doge,rakibulislam/hound,larrylv/hound-gitlab,q-centrix/hound,orangeiceberg/hound,houndci/hound,makersacademy/hound,kolosek/hound,adriagalin/hound,houndci/hound,jdrew1303/hound,peritpatrio/hound,mydummyaccount3737/hound,Rademade/reviewer,Reprazent/hound,viniciustorves/hound,mynewsdesk/hound,viniciustorves/hound,yatish27/hound,q-centrix/hound,JuanitoFatas/hound,peritpatrio/hound,zeke/hound,orangeiceberg/hound,malachaifrazier/hound,yatish27/hound,makersacademy/hound,platanus/hound,alexeyzab/hound,jmcarp/hound,timchunght/hound,teambox/hound,teambox/hound,malachaifrazier/hound,kirs/hound,mynewsdesk/hound,fukayatsu/hound,alexeyzab/hound,enricogenauck/labhound,q-centrix/hound,mydummyaccount3737/hound,sharma1nitish/hound,houndci/hound,dobtco/hound,rgp/hound,kolosek/hound,bitjourney/hound,jmcarp/hound,larrylv/hound-gitlab,Rademade/reviewer,Reprazent/hound,e-sabelhaus/gitlab-doge,Koronen/hound,hashbangnz/hound,makersacademy/hound,timchunght/hound,jobseekerltd/hound,rmswimkktt/houndci-staging,alexeyzab/hound,tinfoil/hound,degica/hound,tinfoil/hound,mynewsdesk/hound,Reprazent/hound,wiserfirst/hound,thoughtbot/hound,thoughtbot/hound,sbalay/hound,thoughtbot/hound,eliperkins/hound,orangeiceberg/hound,rmswimkktt/houndci-staging,wadetandy/hound,yatish27/hound,cbeer/hound,houndci/hound,wyncode/hound,zlx/Gitlab-Hound,thoughtbot/hound,fukayatsu/hound,larrylv/hound,wadetandy/hound,jobseekerltd/hound,larrylv/hound-gitlab,cbeer/hound,jeanmatheussouto/hound,wyncode/hound,makersacademy/hound,bronislav/hound,Rademade/reviewer,bronislav/hound,framgia/hound,JuanitoFatas/hound,mydummyaccount3737/hound,cbeer/hound,kirs/hound,bronislav/hound,fukayatsu/hound,dobtco/hound,platanus/hound,zlx/Gitlab-Hound,brgaulin/hound,tinfoil/hound,sbalay/hound,rgp/hound,brgaulin/hound,framgia/hound,teambox/hound,daniel-beard/hound,sharma1nitish/hound,eliperkins/hound,alexeyzab/hound,jdrew1303/hound,daniel-beard/hound
haml
## Code Before: = render 'shared/header' .repo-listing{'ng-controller' => 'ReposController'} %nav %ul %li.pull-left %span.active-count #{t('active_repos')}: {{(repos | filter:{active: true}).length}} of {{repos.length}} %li.pull-right %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'} %i.fa.fa-refresh %span{'ng-bind' => 'syncButtonText'} .search-wrapper %i.fa.fa-search %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'} %ul.repos{'ng-hide' => 'syncingRepos'} %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'} %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'} %span.name {{repo.full_github_name}} ## Instruction: Use simpler data binding for text displaying ## Code After: = render 'shared/header' .repo-listing{'ng-controller' => 'ReposController'} %nav %ul %li.pull-left %span.active-count #{t('active_repos')}: {{(repos | filter:{active: true}).length}} of {{repos.length}} %li.pull-right %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'} %i.fa.fa-refresh %span {{ syncButtonText }} .search-wrapper %i.fa.fa-search %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'} %ul.repos{'ng-hide' => 'syncingRepos'} %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'} %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'} %span.name {{repo.full_github_name}}
= render 'shared/header' .repo-listing{'ng-controller' => 'ReposController'} %nav %ul %li.pull-left %span.active-count #{t('active_repos')}: {{(repos | filter:{active: true}).length}} of {{repos.length}} %li.pull-right %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'} %i.fa.fa-refresh - %span{'ng-bind' => 'syncButtonText'} ? ^^^^^^^^^ ---- ^ + %span {{ syncButtonText }} ? + ^ ^ + .search-wrapper %i.fa.fa-search %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'} %ul.repos{'ng-hide' => 'syncingRepos'} %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'} %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'} %span.name {{repo.full_github_name}}
2
0.1
1
1
5da24f6281d933d8970797e5ae98a6a4a042f103
mifosng-db/migrations/core_db/V74__alter_m_loan_counter_table_add_group.sql
mifosng-db/migrations/core_db/V74__alter_m_loan_counter_table_add_group.sql
ALTER TABLE `m_client_loan_counter` ADD COLUMN `group_id` BIGINT(20) NOT NULL AFTER `client_id`, ADD CONSTRAINT `FK_m_group_loan_counter` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`); RENAME TABLE `m_client_loan_counter` TO `m_loan_counter`; ALTER TABLE `m_loan_counter` CHANGE COLUMN `client_id` `client_id` BIGINT(20) NULL DEFAULT NULL AFTER `id`, CHANGE COLUMN `group_id` `group_id` BIGINT(20) NULL DEFAULT NULL AFTER `client_id`; ALTER TABLE `m_loan` ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`, ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`; DROP TABLE `m_loan_counter`;
DROP TABLE `m_client_loan_counter`; ALTER TABLE `m_loan` ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`, ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`;
Update DB Script for loan counter changes
Update DB Script for loan counter changes
SQL
apache-2.0
RanjithKumar5550/RanMifos,Vishwa1311/incubator-fineract,RanjithKumar5550/RanMifos,Vishwa1311/incubator-fineract,RanjithKumar5550/RanMifos,Vishwa1311/incubator-fineract
sql
## Code Before: ALTER TABLE `m_client_loan_counter` ADD COLUMN `group_id` BIGINT(20) NOT NULL AFTER `client_id`, ADD CONSTRAINT `FK_m_group_loan_counter` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`); RENAME TABLE `m_client_loan_counter` TO `m_loan_counter`; ALTER TABLE `m_loan_counter` CHANGE COLUMN `client_id` `client_id` BIGINT(20) NULL DEFAULT NULL AFTER `id`, CHANGE COLUMN `group_id` `group_id` BIGINT(20) NULL DEFAULT NULL AFTER `client_id`; ALTER TABLE `m_loan` ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`, ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`; DROP TABLE `m_loan_counter`; ## Instruction: Update DB Script for loan counter changes ## Code After: DROP TABLE `m_client_loan_counter`; ALTER TABLE `m_loan` ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`, ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`;
- ALTER TABLE `m_client_loan_counter` ? ^^^^ + DROP TABLE `m_client_loan_counter`; ? ^ ++ + - ADD COLUMN `group_id` BIGINT(20) NOT NULL AFTER `client_id`, - ADD CONSTRAINT `FK_m_group_loan_counter` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`); - - RENAME TABLE `m_client_loan_counter` TO `m_loan_counter`; - - ALTER TABLE `m_loan_counter` - CHANGE COLUMN `client_id` `client_id` BIGINT(20) NULL DEFAULT NULL AFTER `id`, - CHANGE COLUMN `group_id` `group_id` BIGINT(20) NULL DEFAULT NULL AFTER `client_id`; - ALTER TABLE `m_loan` ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`, ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`; - - DROP TABLE `m_loan_counter`;
13
0.866667
1
12
e2250251214b1498184dc9fe89ca622a88ccc850
README.md
README.md
CFShareCircle is a better way for app developers to let users share the content they are providing to them. It is a simple UIView that adds touch features to sharing to multiple services. ![Demo Image](http://s8.postimage.org/qwvio8syt/demo.png) ##How To Use
CFShareCircle is a better way for app developers to let users share the content to many different services. It is a simple UIView that adds touch features. ![Demo Image](http://s8.postimage.org/qwvio8syt/demo.png) ##How To Use 1. Add the images directory and CFShareCircle files to your project. 2. Edit your view controller to add the CFShareCircle Delegate and reference to the view. ``` @interface ViewController : UIViewController <CFShareCircleViewDelegate>{ CFShareCircleView *shareCircleView; } ``` 3. In your viewDidLoad method instantiate the CFShareCircle, set up the delegate, and add it to your navigation controller. ``` - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. shareCircleView = [[CFShareCircleView alloc] init]; shareCircleView.delegate = self; [self.navigationController.view addSubview:shareCircleView]; } ``` 4. Then set up the frame bounds for the view and implement the delegate method. ``` - (void)viewWillAppear:(BOOL)animated{ shareCircleView.frame = self.navigationController.view.frame; } - (void)shareCircleView:(CFShareCircleView *)shareCircleView didSelectIndex:(int)index{ NSLog(@"Selected index: %d", index); } ``` 5. Lastly, just show the view when you want it to appear. ``` [shareCircleView setHidden:NO]; ```
Add code documentation to get the uiview to work.
Add code documentation to get the uiview to work.
Markdown
mit
neonaldo/CFShareCircle,camdenfullmer/CFShareCircle
markdown
## Code Before: CFShareCircle is a better way for app developers to let users share the content they are providing to them. It is a simple UIView that adds touch features to sharing to multiple services. ![Demo Image](http://s8.postimage.org/qwvio8syt/demo.png) ##How To Use ## Instruction: Add code documentation to get the uiview to work. ## Code After: CFShareCircle is a better way for app developers to let users share the content to many different services. It is a simple UIView that adds touch features. ![Demo Image](http://s8.postimage.org/qwvio8syt/demo.png) ##How To Use 1. Add the images directory and CFShareCircle files to your project. 2. Edit your view controller to add the CFShareCircle Delegate and reference to the view. ``` @interface ViewController : UIViewController <CFShareCircleViewDelegate>{ CFShareCircleView *shareCircleView; } ``` 3. In your viewDidLoad method instantiate the CFShareCircle, set up the delegate, and add it to your navigation controller. ``` - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. shareCircleView = [[CFShareCircleView alloc] init]; shareCircleView.delegate = self; [self.navigationController.view addSubview:shareCircleView]; } ``` 4. Then set up the frame bounds for the view and implement the delegate method. ``` - (void)viewWillAppear:(BOOL)animated{ shareCircleView.frame = self.navigationController.view.frame; } - (void)shareCircleView:(CFShareCircleView *)shareCircleView didSelectIndex:(int)index{ NSLog(@"Selected index: %d", index); } ``` 5. Lastly, just show the view when you want it to appear. ``` [shareCircleView setHidden:NO]; ```
- CFShareCircle is a better way for app developers to let users share the content they are providing to them. It is a simple UIView that adds touch features to sharing to multiple services. ? ^^ ^ ^ - ^^^^^^^^^^ ^ -------------------------------- + CFShareCircle is a better way for app developers to let users share the content to many different services. It is a simple UIView that adds touch features. ? ^^^^^ ^^^^^ ++ ^^ ^ ^ ![Demo Image](http://s8.postimage.org/qwvio8syt/demo.png) ##How To Use + + 1. Add the images directory and CFShareCircle files to your project. + 2. Edit your view controller to add the CFShareCircle Delegate and reference to the view. + + ``` + @interface ViewController : UIViewController <CFShareCircleViewDelegate>{ + CFShareCircleView *shareCircleView; + } + ``` + 3. In your viewDidLoad method instantiate the CFShareCircle, set up the delegate, and add it to your navigation controller. + ``` + - (void)viewDidLoad + { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + shareCircleView = [[CFShareCircleView alloc] init]; + shareCircleView.delegate = self; + [self.navigationController.view addSubview:shareCircleView]; + } + ``` + 4. Then set up the frame bounds for the view and implement the delegate method. + ``` + - (void)viewWillAppear:(BOOL)animated{ + shareCircleView.frame = self.navigationController.view.frame; + } + + - (void)shareCircleView:(CFShareCircleView *)shareCircleView didSelectIndex:(int)index{ + NSLog(@"Selected index: %d", index); + } + ``` + 5. Lastly, just show the view when you want it to appear. + ``` + [shareCircleView setHidden:NO]; + ```
36
6
35
1
bbda6fe3a720b0792ff1959b9c2ef2b3d515718d
client/src/main/java/org/realityforge/replicant/ReplicantClientCommon.gwt.xml
client/src/main/java/org/realityforge/replicant/ReplicantClientCommon.gwt.xml
<module> <inherits name='replicant.Replicant'/> <inherits name='org.realityforge.replicant.ReplicantShared'/> <inherits name='org.realityforge.gwt.webpoller.WebPoller'/> <source path='client'> <include name='*.java'/> <include name='converger/**/*'/> <include name='runtime/**/*'/> <include name='subscription/**/*'/> <include name='transport/**/*'/> </source> </module>
<module> <inherits name='replicant.Replicant'/> <inherits name='org.realityforge.replicant.ReplicantShared'/> <inherits name='org.realityforge.gwt.webpoller.WebPoller'/> <source path='client'> <include name='*.java'/> <include name='converger/**/*'/> <include name='runtime/**/*'/> <include name='transport/**/*'/> </source> </module>
Remove include for package that has migrated
Remove include for package that has migrated
XML
apache-2.0
realityforge/replicant,realityforge/replicant
xml
## Code Before: <module> <inherits name='replicant.Replicant'/> <inherits name='org.realityforge.replicant.ReplicantShared'/> <inherits name='org.realityforge.gwt.webpoller.WebPoller'/> <source path='client'> <include name='*.java'/> <include name='converger/**/*'/> <include name='runtime/**/*'/> <include name='subscription/**/*'/> <include name='transport/**/*'/> </source> </module> ## Instruction: Remove include for package that has migrated ## Code After: <module> <inherits name='replicant.Replicant'/> <inherits name='org.realityforge.replicant.ReplicantShared'/> <inherits name='org.realityforge.gwt.webpoller.WebPoller'/> <source path='client'> <include name='*.java'/> <include name='converger/**/*'/> <include name='runtime/**/*'/> <include name='transport/**/*'/> </source> </module>
<module> <inherits name='replicant.Replicant'/> <inherits name='org.realityforge.replicant.ReplicantShared'/> <inherits name='org.realityforge.gwt.webpoller.WebPoller'/> <source path='client'> <include name='*.java'/> <include name='converger/**/*'/> <include name='runtime/**/*'/> - <include name='subscription/**/*'/> <include name='transport/**/*'/> </source> </module>
1
0.076923
0
1
18a518ed6f18487693755f614fbc943adc3a2bc4
gulpfile.js
gulpfile.js
var browserify = require('browserify'); var gulp = require('gulp'); var glob = require('glob'); var reactify = require('reactify'); var source = require('vinyl-source-stream'); var shell = require('gulp-shell'); /* gulp browserify: Bundles all .js files in the /js/ directory into one file in /build/bundle.js that will be imported onto all pages */ gulp.task('browserify', function() { var files = glob.sync('./js/**/*.js'); var b = browserify(); for (var i = 0; i < files.length; i++) { var matches = /(\w+)\.js$/.exec(files[i]); b.require(files[i], {expose: matches[1]}); } b.require('xhpjs'); return b .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('./build/')); }); gulp.task('install-php', shell.task([ 'hhvm composer.phar install' ])); gulp.task('autoload', shell.task([ 'hhvm composer.phar dump-autoload' ])); gulp.task('default', ['install-php','browserify']);
var browserify = require('browserify'); var gulp = require('gulp'); var glob = require('glob'); var reactify = require('reactify'); var source = require('vinyl-source-stream'); var shell = require('gulp-shell'); /* gulp browserify: Bundles all .js files in the /js/ directory into one file in /build/bundle.js that will be imported onto all pages */ gulp.task('browserify', function() { var files = glob.sync('./js/**/*.js'); var b = browserify(); for (var i = 0; i < files.length; i++) { var matches = /(\w+)\.js$/.exec(files[i]); b.require(files[i], {expose: matches[1]}); } b.require('xhpjs'); return b .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('./build/')); }); gulp.task('install-php', shell.task([ 'hhvm composer.phar install' ])); gulp.task('autoload', shell.task([ 'hhvm composer.phar dump-autoload' ])); gulp.task('serve', shell.task([ 'hhvm -m server -p 8080' ])); gulp.task('default', ['install-php','browserify','serve']);
Add gulp command for running server
Add gulp command for running server
JavaScript
mit
BinghamtonCoRE/core-site
javascript
## Code Before: var browserify = require('browserify'); var gulp = require('gulp'); var glob = require('glob'); var reactify = require('reactify'); var source = require('vinyl-source-stream'); var shell = require('gulp-shell'); /* gulp browserify: Bundles all .js files in the /js/ directory into one file in /build/bundle.js that will be imported onto all pages */ gulp.task('browserify', function() { var files = glob.sync('./js/**/*.js'); var b = browserify(); for (var i = 0; i < files.length; i++) { var matches = /(\w+)\.js$/.exec(files[i]); b.require(files[i], {expose: matches[1]}); } b.require('xhpjs'); return b .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('./build/')); }); gulp.task('install-php', shell.task([ 'hhvm composer.phar install' ])); gulp.task('autoload', shell.task([ 'hhvm composer.phar dump-autoload' ])); gulp.task('default', ['install-php','browserify']); ## Instruction: Add gulp command for running server ## Code After: var browserify = require('browserify'); var gulp = require('gulp'); var glob = require('glob'); var reactify = require('reactify'); var source = require('vinyl-source-stream'); var shell = require('gulp-shell'); /* gulp browserify: Bundles all .js files in the /js/ directory into one file in /build/bundle.js that will be imported onto all pages */ gulp.task('browserify', function() { var files = glob.sync('./js/**/*.js'); var b = browserify(); for (var i = 0; i < files.length; i++) { var matches = /(\w+)\.js$/.exec(files[i]); b.require(files[i], {expose: matches[1]}); } b.require('xhpjs'); return b .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('./build/')); }); gulp.task('install-php', shell.task([ 'hhvm composer.phar install' ])); gulp.task('autoload', shell.task([ 'hhvm composer.phar dump-autoload' ])); gulp.task('serve', shell.task([ 'hhvm -m server -p 8080' ])); gulp.task('default', ['install-php','browserify','serve']);
var browserify = require('browserify'); var gulp = require('gulp'); var glob = require('glob'); var reactify = require('reactify'); var source = require('vinyl-source-stream'); var shell = require('gulp-shell'); /* gulp browserify: Bundles all .js files in the /js/ directory into one file in /build/bundle.js that will be imported onto all pages */ gulp.task('browserify', function() { var files = glob.sync('./js/**/*.js'); var b = browserify(); for (var i = 0; i < files.length; i++) { var matches = /(\w+)\.js$/.exec(files[i]); b.require(files[i], {expose: matches[1]}); } b.require('xhpjs'); return b .bundle() .pipe(source('bundle.js')) .pipe(gulp.dest('./build/')); }); gulp.task('install-php', shell.task([ 'hhvm composer.phar install' ])); gulp.task('autoload', shell.task([ 'hhvm composer.phar dump-autoload' ])); + gulp.task('serve', shell.task([ + 'hhvm -m server -p 8080' + ])); + - gulp.task('default', ['install-php','browserify']); + gulp.task('default', ['install-php','browserify','serve']); ? ++++++++
6
0.162162
5
1
753e1fc117a72fc6b61935609b12de6a15624f03
README.md
README.md
* Visit the website [http://azure.com](http://azure.com) ## Workshop 2: Using Azure PowerShell * Follow instruction in [Lab: Managing Microsoft Azure / Exercise 3: Using Azure PowerShell](Labs/LAB_01.md) ## Workshop 3: Creating virtual machines by using the Azure portal and Azure PowerShell * Follow instruction in [Lab A: Creating Azure virtual machines](Labs/LAB_03.md) ## Workshop 4: Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates * Follow instruction in [Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates](Labs/LAB_03.md) ## Workshop 5: Deploying a Web Application * Use the website from [Github](https://github.com/digitalthailand/simple-website) ## Workshop 6: Traffic Manager * Follow instruction in [Exercise 4: Implementing Traffic Manager](Labs/LAB_05.md) ## Useful Links * [How to register for a Free Account - http://bit.ly/2hNfJA2](http://bit.ly/2hNfJA2) * [Visual Studio Dev Essentials](https://www.visualstudio.com/dev-essentials/) * [Azure Powershell](https://docs.microsoft.com/en-us/powershell/azure/overview)
* Visit the website [http://azure.com](http://azure.com) ## Workshop 2: Using Azure PowerShell * Follow instruction in [Lab: Managing Microsoft Azure / Exercise 3: Using Azure PowerShell](Labs/LAB_01.md) ## Workshop 3: Creating virtual machines by using the Azure portal and Azure PowerShell * Follow instruction in [Lab A: Creating Azure virtual machines](Labs/LAB_03.md) ## Workshop 4: Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates * Follow instruction in [Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates](Labs/LAB_03.md) ## Workshop 5: Deploying a Web Application * Use the website from [Github](https://github.com/digitalthailand/simple-website) ## Workshop 6: * [IoT Visualization using Web App](https://tlaothong.gitbooks.io/azure-iot-workshop/content/iot-hub-live-data-visualization-in-web-apps.html) ## Workshop 7: Traffic Manager * Follow instruction in [Exercise 4: Implementing Traffic Manager](Labs/LAB_05.md) ## Useful Links * [How to register for a Free Account - http://bit.ly/2hNfJA2](http://bit.ly/2hNfJA2) * [Visual Studio Dev Essentials](https://www.visualstudio.com/dev-essentials/) * [Azure Powershell](https://docs.microsoft.com/en-us/powershell/azure/overview)
Add IoT Hub to Web App.
Add IoT Hub to Web App. Signed-off-by: Digital Thailand <d1c72b84026585eb55406833a23a9a05825e74a1@outlook.com>
Markdown
mit
digitalthailand/course-azure-workshop,digitalthailand/course-azure-workshop
markdown
## Code Before: * Visit the website [http://azure.com](http://azure.com) ## Workshop 2: Using Azure PowerShell * Follow instruction in [Lab: Managing Microsoft Azure / Exercise 3: Using Azure PowerShell](Labs/LAB_01.md) ## Workshop 3: Creating virtual machines by using the Azure portal and Azure PowerShell * Follow instruction in [Lab A: Creating Azure virtual machines](Labs/LAB_03.md) ## Workshop 4: Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates * Follow instruction in [Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates](Labs/LAB_03.md) ## Workshop 5: Deploying a Web Application * Use the website from [Github](https://github.com/digitalthailand/simple-website) ## Workshop 6: Traffic Manager * Follow instruction in [Exercise 4: Implementing Traffic Manager](Labs/LAB_05.md) ## Useful Links * [How to register for a Free Account - http://bit.ly/2hNfJA2](http://bit.ly/2hNfJA2) * [Visual Studio Dev Essentials](https://www.visualstudio.com/dev-essentials/) * [Azure Powershell](https://docs.microsoft.com/en-us/powershell/azure/overview) ## Instruction: Add IoT Hub to Web App. Signed-off-by: Digital Thailand <d1c72b84026585eb55406833a23a9a05825e74a1@outlook.com> ## Code After: * Visit the website [http://azure.com](http://azure.com) ## Workshop 2: Using Azure PowerShell * Follow instruction in [Lab: Managing Microsoft Azure / Exercise 3: Using Azure PowerShell](Labs/LAB_01.md) ## Workshop 3: Creating virtual machines by using the Azure portal and Azure PowerShell * Follow instruction in [Lab A: Creating Azure virtual machines](Labs/LAB_03.md) ## Workshop 4: Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates * Follow instruction in [Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates](Labs/LAB_03.md) ## Workshop 5: Deploying a Web Application * Use the website from [Github](https://github.com/digitalthailand/simple-website) ## Workshop 6: * [IoT Visualization using Web App](https://tlaothong.gitbooks.io/azure-iot-workshop/content/iot-hub-live-data-visualization-in-web-apps.html) ## Workshop 7: Traffic Manager * Follow instruction in [Exercise 4: Implementing Traffic Manager](Labs/LAB_05.md) ## Useful Links * [How to register for a Free Account - http://bit.ly/2hNfJA2](http://bit.ly/2hNfJA2) * [Visual Studio Dev Essentials](https://www.visualstudio.com/dev-essentials/) * [Azure Powershell](https://docs.microsoft.com/en-us/powershell/azure/overview)
* Visit the website [http://azure.com](http://azure.com) ## Workshop 2: Using Azure PowerShell * Follow instruction in [Lab: Managing Microsoft Azure / Exercise 3: Using Azure PowerShell](Labs/LAB_01.md) ## Workshop 3: Creating virtual machines by using the Azure portal and Azure PowerShell * Follow instruction in [Lab A: Creating Azure virtual machines](Labs/LAB_03.md) ## Workshop 4: Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates * Follow instruction in [Lab B: Deploying Azure Resource Manager virtual machines by using Azure Resource Manager templates](Labs/LAB_03.md) ## Workshop 5: Deploying a Web Application * Use the website from [Github](https://github.com/digitalthailand/simple-website) + ## Workshop 6: + * [IoT Visualization using Web App](https://tlaothong.gitbooks.io/azure-iot-workshop/content/iot-hub-live-data-visualization-in-web-apps.html) + - ## Workshop 6: Traffic Manager ? ^ + ## Workshop 7: Traffic Manager ? ^ * Follow instruction in [Exercise 4: Implementing Traffic Manager](Labs/LAB_05.md) ## Useful Links * [How to register for a Free Account - http://bit.ly/2hNfJA2](http://bit.ly/2hNfJA2) * [Visual Studio Dev Essentials](https://www.visualstudio.com/dev-essentials/) * [Azure Powershell](https://docs.microsoft.com/en-us/powershell/azure/overview)
5
0.238095
4
1
51d5d56e1b88cb2e9b7d84b48d37200330e1f1ef
app/models/user_session.rb
app/models/user_session.rb
class UserSession < Authlogic::Session::Base pds_url (ENV['PDS_URL'] || 'https://login.library.nyu.edu') calling_system 'marli' anonymous true redirect_logout_url 'http://bobcat.library.nyu.edu' def additional_attributes h = {} return h unless pds_user h[:marli_admin] = true if default_admins.include? pds_user.uid patron = Exlibris::Aleph::Patron.new(patron_id: pds_user.nyuidn) addr_info = patron.address h[:address] = {} h[:address][:street_address] = addr_info["z304_address_2"]["__content__"] h[:address][:city] = addr_info["z304_address_3"]["__content__"] h[:address][:state] = addr_info["z304_address_4"]["__content__"] h[:address][:postal_code] = addr_info["z304_zip"]["__content__"] return h end private def default_admins (Figs.env['MARLI_DEFAULT_ADMINS'] || []) end end
class UserSession < Authlogic::Session::Base pds_url (ENV['PDS_URL'] || 'https://login.library.nyu.edu') calling_system 'marli' anonymous true redirect_logout_url 'http://bobcat.library.nyu.edu' def additional_attributes h = {} return h unless pds_user h[:marli_admin] = true if default_admins.include? pds_user.uid patron = Exlibris::Aleph::Patron.new(pds_user.nyuidn) address = patron.address h[:address] = { street_address: address.address2, city: address.address3, state: address.address4, postal_code: address.zip } return h end private def default_admins (Figs.env['MARLI_DEFAULT_ADMINS'] || []) end end
Use the latest Exlibris::Aleph library
Use the latest Exlibris::Aleph library
Ruby
mit
NYULibraries/marli,NYULibraries/marli,NYULibraries/marli,NYULibraries/marli
ruby
## Code Before: class UserSession < Authlogic::Session::Base pds_url (ENV['PDS_URL'] || 'https://login.library.nyu.edu') calling_system 'marli' anonymous true redirect_logout_url 'http://bobcat.library.nyu.edu' def additional_attributes h = {} return h unless pds_user h[:marli_admin] = true if default_admins.include? pds_user.uid patron = Exlibris::Aleph::Patron.new(patron_id: pds_user.nyuidn) addr_info = patron.address h[:address] = {} h[:address][:street_address] = addr_info["z304_address_2"]["__content__"] h[:address][:city] = addr_info["z304_address_3"]["__content__"] h[:address][:state] = addr_info["z304_address_4"]["__content__"] h[:address][:postal_code] = addr_info["z304_zip"]["__content__"] return h end private def default_admins (Figs.env['MARLI_DEFAULT_ADMINS'] || []) end end ## Instruction: Use the latest Exlibris::Aleph library ## Code After: class UserSession < Authlogic::Session::Base pds_url (ENV['PDS_URL'] || 'https://login.library.nyu.edu') calling_system 'marli' anonymous true redirect_logout_url 'http://bobcat.library.nyu.edu' def additional_attributes h = {} return h unless pds_user h[:marli_admin] = true if default_admins.include? pds_user.uid patron = Exlibris::Aleph::Patron.new(pds_user.nyuidn) address = patron.address h[:address] = { street_address: address.address2, city: address.address3, state: address.address4, postal_code: address.zip } return h end private def default_admins (Figs.env['MARLI_DEFAULT_ADMINS'] || []) end end
class UserSession < Authlogic::Session::Base pds_url (ENV['PDS_URL'] || 'https://login.library.nyu.edu') calling_system 'marli' anonymous true redirect_logout_url 'http://bobcat.library.nyu.edu' def additional_attributes h = {} return h unless pds_user h[:marli_admin] = true if default_admins.include? pds_user.uid - patron = Exlibris::Aleph::Patron.new(patron_id: pds_user.nyuidn) ? ----------- + patron = Exlibris::Aleph::Patron.new(pds_user.nyuidn) - addr_info = patron.address ? ^^^^^ + address = patron.address ? ^^^ - h[:address] = {} ? - + h[:address] = { - h[:address][:street_address] = addr_info["z304_address_2"]["__content__"] - h[:address][:city] = addr_info["z304_address_3"]["__content__"] - h[:address][:state] = addr_info["z304_address_4"]["__content__"] - h[:address][:postal_code] = addr_info["z304_zip"]["__content__"] + street_address: address.address2, + city: address.address3, + state: address.address4, + postal_code: address.zip + } return h end private def default_admins (Figs.env['MARLI_DEFAULT_ADMINS'] || []) end end
15
0.6
8
7
ea9273ba54dc502327bcca8b233e8d338aaa0d43
pombola/south_africa/management/commands/south_africa_create_new_parties_for_election_2019.py
pombola/south_africa/management/commands/south_africa_create_new_parties_for_election_2019.py
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handle(self, *args, **options): with open(parties_csv, "rb") as csvfile: csv = unicodecsv.DictReader(csvfile) for row in csv: party_slug = row["slug"] party_name = row["name"] party_kind = OrganisationKind.objects.get(slug="party") party, created = Organisation.objects.get_or_create( slug=party_slug, name=party_name, kind=party_kind ) if created: print("Created new party: {}".format(party)) else: print("Party already exists: {}".format(party))
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handle(self, *args, **options): with open(parties_csv, "rb") as csvfile: csv = unicodecsv.DictReader(csvfile) for row in csv: party_slug = row["slug"] party_name = row["name"] party_kind = OrganisationKind.objects.get(slug="party") party, created = Organisation.objects.get_or_create( slug=party_slug, kind=party_kind, defaults={"name": party_name} ) if created: print("Created new party: {}".format(party)) else: print("Party already exists: {}".format(party))
Move party name to defaults argument
[ZA] Move party name to defaults argument Some party names have changed, but the slug remains the same, so to avoid errors move the name to the defaults sections so it's not checked for existing parties.
Python
agpl-3.0
mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola
python
## Code Before: import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handle(self, *args, **options): with open(parties_csv, "rb") as csvfile: csv = unicodecsv.DictReader(csvfile) for row in csv: party_slug = row["slug"] party_name = row["name"] party_kind = OrganisationKind.objects.get(slug="party") party, created = Organisation.objects.get_or_create( slug=party_slug, name=party_name, kind=party_kind ) if created: print("Created new party: {}".format(party)) else: print("Party already exists: {}".format(party)) ## Instruction: [ZA] Move party name to defaults argument Some party names have changed, but the slug remains the same, so to avoid errors move the name to the defaults sections so it's not checked for existing parties. ## Code After: import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handle(self, *args, **options): with open(parties_csv, "rb") as csvfile: csv = unicodecsv.DictReader(csvfile) for row in csv: party_slug = row["slug"] party_name = row["name"] party_kind = OrganisationKind.objects.get(slug="party") party, created = Organisation.objects.get_or_create( slug=party_slug, kind=party_kind, defaults={"name": party_name} ) if created: print("Created new party: {}".format(party)) else: print("Party already exists: {}".format(party))
import unicodecsv from django.core.management.base import BaseCommand, CommandError from pombola.core.models import Organisation, OrganisationKind parties_csv = "pombola/south_africa/data/elections/2019/parties.csv" class Command(BaseCommand): help = "Creates new parties for the 2019 elections" def handle(self, *args, **options): with open(parties_csv, "rb") as csvfile: csv = unicodecsv.DictReader(csvfile) for row in csv: party_slug = row["slug"] party_name = row["name"] party_kind = OrganisationKind.objects.get(slug="party") party, created = Organisation.objects.get_or_create( - slug=party_slug, name=party_name, kind=party_kind + slug=party_slug, kind=party_kind, defaults={"name": party_name} ) if created: print("Created new party: {}".format(party)) else: print("Party already exists: {}".format(party))
2
0.074074
1
1
ed30209cf283e871993076a14c67a43c233f5976
docs/home.md
docs/home.md
This collection of documents describes the resources and functions that make up the r/SpaceX API. ## Authentication No authentication is required to use this public API ## Rate Limiting No rate limiting is implemented at this time, but please be respectful with your usage ## Development [Dev Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/development.md) ## Endpoints [Launches](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launches.md) [Rockets](https://github.com/r-spacex/SpaceX-API/blob/master/docs/rocket.md) [Capsules](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule.md) [Company Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/company_info.md) [Roadster Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/roadster.md) [Capsule Details](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule_detail.md) [Core Detail](https://github.com/r-spacex/SpaceX-API/blob/master/docs/core_detail.md) [Launchpads](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launchpad.md)
This collection of documents describes the resources and functions that make up the r/SpaceX API. ## Authentication No authentication is required to use this public API ## Rate Limiting The API has a rate limit of 50 req/sec per IP address, if exceeded, a response of 429 will be given until the rate drops back below 50 req/sec ## Development [Dev Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/development.md) ## Endpoints [Launches](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launches.md) [Rockets](https://github.com/r-spacex/SpaceX-API/blob/master/docs/rocket.md) [Capsules](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule.md) [Company Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/company_info.md) [Roadster Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/roadster.md) [Capsule Details](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule_detail.md) [Core Detail](https://github.com/r-spacex/SpaceX-API/blob/master/docs/core_detail.md) [Launchpads](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launchpad.md)
Add rate limit info to docs
Add rate limit info to docs
Markdown
apache-2.0
r-spacex/SpaceX-API,r-spacex/SpaceX-API
markdown
## Code Before: This collection of documents describes the resources and functions that make up the r/SpaceX API. ## Authentication No authentication is required to use this public API ## Rate Limiting No rate limiting is implemented at this time, but please be respectful with your usage ## Development [Dev Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/development.md) ## Endpoints [Launches](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launches.md) [Rockets](https://github.com/r-spacex/SpaceX-API/blob/master/docs/rocket.md) [Capsules](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule.md) [Company Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/company_info.md) [Roadster Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/roadster.md) [Capsule Details](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule_detail.md) [Core Detail](https://github.com/r-spacex/SpaceX-API/blob/master/docs/core_detail.md) [Launchpads](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launchpad.md) ## Instruction: Add rate limit info to docs ## Code After: This collection of documents describes the resources and functions that make up the r/SpaceX API. ## Authentication No authentication is required to use this public API ## Rate Limiting The API has a rate limit of 50 req/sec per IP address, if exceeded, a response of 429 will be given until the rate drops back below 50 req/sec ## Development [Dev Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/development.md) ## Endpoints [Launches](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launches.md) [Rockets](https://github.com/r-spacex/SpaceX-API/blob/master/docs/rocket.md) [Capsules](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule.md) [Company Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/company_info.md) [Roadster Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/roadster.md) [Capsule Details](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule_detail.md) [Core Detail](https://github.com/r-spacex/SpaceX-API/blob/master/docs/core_detail.md) [Launchpads](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launchpad.md)
This collection of documents describes the resources and functions that make up the r/SpaceX API. ## Authentication No authentication is required to use this public API ## Rate Limiting - No rate limiting is implemented at this time, but please be respectful with your usage + The API has a rate limit of 50 req/sec per IP address, if exceeded, a response of 429 will be given + until the rate drops back below 50 req/sec ## Development [Dev Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/development.md) ## Endpoints [Launches](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launches.md) [Rockets](https://github.com/r-spacex/SpaceX-API/blob/master/docs/rocket.md) [Capsules](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule.md) [Company Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/company_info.md) [Roadster Info](https://github.com/r-spacex/SpaceX-API/blob/master/docs/roadster.md) [Capsule Details](https://github.com/r-spacex/SpaceX-API/blob/master/docs/capsule_detail.md) [Core Detail](https://github.com/r-spacex/SpaceX-API/blob/master/docs/core_detail.md) [Launchpads](https://github.com/r-spacex/SpaceX-API/blob/master/docs/launchpad.md)
3
0.111111
2
1
889b7753c4147cab3ee3b6d16237542c6e39b736
content/issues/59.markdown
content/issues/59.markdown
--- title: Issue 59 published: 2017-06-15 --- Welcome to another issue of Haskell Weekly! Haskell is a purely functional programming language that focuses on robustness, concision, and correctness. This is a weekly summary of what's going on in its community. - [Front Row is hiring a senior backend Haskell engineer](https://frontrow.workable.com/j/463B843754) (ad) > Come change how 6.5+ million K-12 US students learn Math, Language Arts, Social Studies and more. Use data, advanced type systems, great product design and deep pedagogy to change lives. ## Package of the week todo
--- title: Issue 59 published: 2017-06-15 --- Welcome to another issue of Haskell Weekly! Haskell is a purely functional programming language that focuses on robustness, concision, and correctness. This is a weekly summary of what's going on in its community. - [Front Row is hiring a senior backend Haskell engineer](https://frontrow.workable.com/j/463B843754) (ad) > Come change how 6.5+ million K-12 US students learn Math, Language Arts, Social Studies and more. Use data, advanced type systems, great product design and deep pedagogy to change lives. ## Package of the week This week's package of the week is [generic-lens](https://hackage.haskell.org/package/generic-lens-0.2.0.0), a library that exposes generic data structure operations as lenses.
Make generic-lens the package of the week
Make generic-lens the package of the week
Markdown
mit
haskellweekly/haskellweekly.github.io,haskellweekly/haskellweekly.github.io
markdown
## Code Before: --- title: Issue 59 published: 2017-06-15 --- Welcome to another issue of Haskell Weekly! Haskell is a purely functional programming language that focuses on robustness, concision, and correctness. This is a weekly summary of what's going on in its community. - [Front Row is hiring a senior backend Haskell engineer](https://frontrow.workable.com/j/463B843754) (ad) > Come change how 6.5+ million K-12 US students learn Math, Language Arts, Social Studies and more. Use data, advanced type systems, great product design and deep pedagogy to change lives. ## Package of the week todo ## Instruction: Make generic-lens the package of the week ## Code After: --- title: Issue 59 published: 2017-06-15 --- Welcome to another issue of Haskell Weekly! Haskell is a purely functional programming language that focuses on robustness, concision, and correctness. This is a weekly summary of what's going on in its community. - [Front Row is hiring a senior backend Haskell engineer](https://frontrow.workable.com/j/463B843754) (ad) > Come change how 6.5+ million K-12 US students learn Math, Language Arts, Social Studies and more. Use data, advanced type systems, great product design and deep pedagogy to change lives. ## Package of the week This week's package of the week is [generic-lens](https://hackage.haskell.org/package/generic-lens-0.2.0.0), a library that exposes generic data structure operations as lenses.
--- title: Issue 59 published: 2017-06-15 --- Welcome to another issue of Haskell Weekly! Haskell is a purely functional programming language that focuses on robustness, concision, and correctness. This is a weekly summary of what's going on in its community. - [Front Row is hiring a senior backend Haskell engineer](https://frontrow.workable.com/j/463B843754) (ad) > Come change how 6.5+ million K-12 US students learn Math, Language Arts, Social Studies and more. Use data, advanced type systems, great product design and deep pedagogy to change lives. ## Package of the week - todo + This week's package of the week is [generic-lens](https://hackage.haskell.org/package/generic-lens-0.2.0.0), + a library that exposes generic data structure operations as lenses.
3
0.1875
2
1
a03a415330d85be0578b90b173adf10d93b27291
.circleci/config.yml
.circleci/config.yml
version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/circleci-zorbage # directory where steps will run docker: # run the steps with Docker - image: circleci/openjdk:8-jdk-stretch # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # check out source code to working directory - restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn dependency:go-offline # gets the project dependencies - save_cache: # saves the project dependencies paths: - ~/.m2 key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn package # run the actual tests # - store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. # # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ # path: target/surefire-reports
version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/circleci-zorbage # directory where steps will run docker: # run the steps with Docker - image: circleci/openjdk:8u181 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # check out source code to working directory - restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn dependency:go-offline # gets the project dependencies - save_cache: # saves the project dependencies paths: - ~/.m2 key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn package # run the actual tests # - store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. # # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ # path: target/surefire-reports
Tweak circle ci java version
Tweak circle ci java version
YAML
bsd-3-clause
bdezonia/zorbage,bdezonia/zorbage
yaml
## Code Before: version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/circleci-zorbage # directory where steps will run docker: # run the steps with Docker - image: circleci/openjdk:8-jdk-stretch # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # check out source code to working directory - restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn dependency:go-offline # gets the project dependencies - save_cache: # saves the project dependencies paths: - ~/.m2 key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn package # run the actual tests # - store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. # # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ # path: target/surefire-reports ## Instruction: Tweak circle ci java version ## Code After: version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/circleci-zorbage # directory where steps will run docker: # run the steps with Docker - image: circleci/openjdk:8u181 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # check out source code to working directory - restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn dependency:go-offline # gets the project dependencies - save_cache: # saves the project dependencies paths: - ~/.m2 key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn package # run the actual tests # - store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. # # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ # path: target/surefire-reports
version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/circleci-zorbage # directory where steps will run docker: # run the steps with Docker - - image: circleci/openjdk:8-jdk-stretch # ...with this image as the primary container; this is where all `steps` will run ? ^^^^^^^^^^^^ + - image: circleci/openjdk:8u181 # ...with this image as the primary container; this is where all `steps` will run ? ^^^^ steps: # a collection of executable commands - checkout # check out source code to working directory - restore_cache: # restore the saved cache after the first run or if `pom.xml` has changed # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn dependency:go-offline # gets the project dependencies - save_cache: # saves the project dependencies paths: - ~/.m2 key: circleci-zorbage-{{ checksum "pom.xml" }} - run: mvn package # run the actual tests # - store_test_results: # uploads the test metadata from the `target/surefire-reports` directory so that it can show up in the CircleCI dashboard. # # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/ # path: target/surefire-reports
2
0.068966
1
1
b2ea3f164678ccd72d60c502fd77c028e5ee6990
app/config.php
app/config.php
<?hh //strict enum HTTP: string as string { GET = 'GET'; POST = 'POST'; PUT = 'PUT'; DELETE = 'DELETE'; PATCH = 'PATCH'; } enum AppEnv: string as string { API = 'API'; UNIT_TESTS = 'UNIT_TESTS'; MAIN = 'MAIN'; PRODUCTION = 'production'; DEVELOPMENT = 'development'; } const string ASSETS_PREFIX = 'res.app.com/'; const string HOSTNAME = 'app.com';
<?hh //strict enum HTTP: string as string { GET = 'GET'; POST = 'POST'; PUT = 'PUT'; DELETE = 'DELETE'; PATCH = 'PATCH'; } enum AppEnv: string as string { API = 'API'; UNIT_TESTS = 'UNIT_TESTS'; MAIN = 'MAIN'; PRODUCTION = 'production'; DEVELOPMENT = 'development'; } enum ExceptionCode:int as int { GENERIC = 1; NOT_FOUND = 2; NETWORK_ERROR = 3; DELETED = 4; } const string ASSETS_PREFIX = 'res.app.com/'; const string HOSTNAME = 'app.com';
Create a standard enum for Exception Codes
Create a standard enum for Exception Codes
PHP
mit
raeesbhatti/boilerplate,raeesbhatti/boilerplate
php
## Code Before: <?hh //strict enum HTTP: string as string { GET = 'GET'; POST = 'POST'; PUT = 'PUT'; DELETE = 'DELETE'; PATCH = 'PATCH'; } enum AppEnv: string as string { API = 'API'; UNIT_TESTS = 'UNIT_TESTS'; MAIN = 'MAIN'; PRODUCTION = 'production'; DEVELOPMENT = 'development'; } const string ASSETS_PREFIX = 'res.app.com/'; const string HOSTNAME = 'app.com'; ## Instruction: Create a standard enum for Exception Codes ## Code After: <?hh //strict enum HTTP: string as string { GET = 'GET'; POST = 'POST'; PUT = 'PUT'; DELETE = 'DELETE'; PATCH = 'PATCH'; } enum AppEnv: string as string { API = 'API'; UNIT_TESTS = 'UNIT_TESTS'; MAIN = 'MAIN'; PRODUCTION = 'production'; DEVELOPMENT = 'development'; } enum ExceptionCode:int as int { GENERIC = 1; NOT_FOUND = 2; NETWORK_ERROR = 3; DELETED = 4; } const string ASSETS_PREFIX = 'res.app.com/'; const string HOSTNAME = 'app.com';
<?hh //strict enum HTTP: string as string { GET = 'GET'; POST = 'POST'; PUT = 'PUT'; DELETE = 'DELETE'; PATCH = 'PATCH'; } enum AppEnv: string as string { API = 'API'; UNIT_TESTS = 'UNIT_TESTS'; MAIN = 'MAIN'; PRODUCTION = 'production'; DEVELOPMENT = 'development'; } + enum ExceptionCode:int as int { + GENERIC = 1; + NOT_FOUND = 2; + NETWORK_ERROR = 3; + DELETED = 4; + } const string ASSETS_PREFIX = 'res.app.com/'; const string HOSTNAME = 'app.com';
6
0.352941
6
0
86ff7e00ddf802822eb7459065bac82b61cc4dec
app/src/main/java/com/castelijns/mmdemo/photos/PhotosPresenter.java
app/src/main/java/com/castelijns/mmdemo/photos/PhotosPresenter.java
package com.castelijns.mmdemo.photos; import com.castelijns.mmdemo.models.Photo; import java.util.List; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; public class PhotosPresenter implements PhotosContract.Presenter { private PhotosContract.View view; private PhotosRepo repo; PhotosPresenter(PhotosContract.View view) { this.view = view; repo = PhotosRepo.getInstance(); } @Override public void start() { repo.getAllPhotos() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<List<Photo>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onNext(List<Photo> photos) { view.showPhotos(photos); } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); } @Override public void stop() { } }
package com.castelijns.mmdemo.photos; import com.castelijns.mmdemo.models.Photo; import java.util.Collection; import java.util.Collections; import java.util.List; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; public class PhotosPresenter implements PhotosContract.Presenter { private PhotosContract.View view; private PhotosRepo repo; PhotosPresenter(PhotosContract.View view) { this.view = view; repo = PhotosRepo.getInstance(); } @Override public void start() { repo.getAllPhotos() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<List<Photo>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onNext(List<Photo> photos) { Collections.sort(photos); view.showPhotos(photos); } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); } @Override public void stop() { } }
Sort photos by title by default
Sort photos by title by default
Java
mit
TimCastelijns/MMDemo
java
## Code Before: package com.castelijns.mmdemo.photos; import com.castelijns.mmdemo.models.Photo; import java.util.List; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; public class PhotosPresenter implements PhotosContract.Presenter { private PhotosContract.View view; private PhotosRepo repo; PhotosPresenter(PhotosContract.View view) { this.view = view; repo = PhotosRepo.getInstance(); } @Override public void start() { repo.getAllPhotos() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<List<Photo>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onNext(List<Photo> photos) { view.showPhotos(photos); } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); } @Override public void stop() { } } ## Instruction: Sort photos by title by default ## Code After: package com.castelijns.mmdemo.photos; import com.castelijns.mmdemo.models.Photo; import java.util.Collection; import java.util.Collections; import java.util.List; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; public class PhotosPresenter implements PhotosContract.Presenter { private PhotosContract.View view; private PhotosRepo repo; PhotosPresenter(PhotosContract.View view) { this.view = view; repo = PhotosRepo.getInstance(); } @Override public void start() { repo.getAllPhotos() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<List<Photo>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onNext(List<Photo> photos) { Collections.sort(photos); view.showPhotos(photos); } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); } @Override public void stop() { } }
package com.castelijns.mmdemo.photos; import com.castelijns.mmdemo.models.Photo; + import java.util.Collection; + import java.util.Collections; import java.util.List; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; public class PhotosPresenter implements PhotosContract.Presenter { private PhotosContract.View view; private PhotosRepo repo; PhotosPresenter(PhotosContract.View view) { this.view = view; repo = PhotosRepo.getInstance(); } @Override public void start() { repo.getAllPhotos() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<List<Photo>>() { @Override public void onSubscribe(Disposable d) { } @Override public void onNext(List<Photo> photos) { + Collections.sort(photos); view.showPhotos(photos); } @Override public void onError(Throwable e) { } @Override public void onComplete() { } }); } @Override public void stop() { } }
3
0.055556
3
0
68391d3a12dcb9b8e27f3e68cd8cfccb91670dad
README.md
README.md
NetBricks is a Rust based framework for NFV development. Please refer to the paper (available soon) for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version. Building -------- NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later case we also build [`musl`](https://www.musl-libc.org/) and statically link to things. Below we provide basic instructions for both. Using Rust Nightly ------------------ First obtain Rust nightly. I use [rustup](rustup.rs), in which case the following works ``` curl https://sh.rustup.rs -sSf | sh # Install rustup rustup install nightly ``` Then clone this repository and run `build.sh` ``` ./build.sh ``` This should download DPDK, and build all of NetBricks. Using Rust from Git ------------------- The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as ``` export RUST_STATIC=1 ./build.sh ``` Example NFs ----------- Coming Soon.
NetBricks is a Rust based framework for NFV development. Please refer to the paper (available soon) for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version. Building -------- NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later case we also build [`musl`](https://www.musl-libc.org/) and statically link to things. Below we provide basic instructions for both. Using Rust Nightly ------------------ First obtain Rust nightly. I use [rustup](https://rustup.rs), in which case the following works ``` curl https://sh.rustup.rs -sSf | sh # Install rustup rustup install nightly ``` Then clone this repository and run `build.sh` ``` ./build.sh ``` This should download DPDK, and build all of NetBricks. Using Rust from Git ------------------- The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as ``` export RUST_STATIC=1 ./build.sh ``` Dependencies ------------ Building NetBricks requires `libcurl` with support for `gnutls`. On Debian these dependencies can be installed using: ``` apt-get install libgnutls30 libgnutls-openssl-dev libcurl4-gnutls-dev ``` NetBricks also supports using SCTP as a control protocol. SCTP support requires the use of `libsctp` (this is an optional dependency) which can be installed on Debian using: ``` apt-get install libsctp-dev ``` Example NFs ----------- Coming Soon. Future Work ----------- Support for [`futures`](https://github.com/alexcrichton/futures-rs) for control plane functionality.
Add instructions for installing SCTP to Readme
Add instructions for installing SCTP to Readme
Markdown
isc
apanda/NetBricks,apanda/NetBricks,NetSys/e2d2,apanda/NetBricks,NetSys/NetBricks,NetSys/e2d2,apanda/NetBricks,NetSys/e2d2,NetSys/e2d2,apanda/NetBricks,NetSys/e2d2,NetSys/NetBricks,NetSys/e2d2,NetSys/NetBricks,NetSys/e2d2,NetSys/NetBricks,NetSys/NetBricks
markdown
## Code Before: NetBricks is a Rust based framework for NFV development. Please refer to the paper (available soon) for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version. Building -------- NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later case we also build [`musl`](https://www.musl-libc.org/) and statically link to things. Below we provide basic instructions for both. Using Rust Nightly ------------------ First obtain Rust nightly. I use [rustup](rustup.rs), in which case the following works ``` curl https://sh.rustup.rs -sSf | sh # Install rustup rustup install nightly ``` Then clone this repository and run `build.sh` ``` ./build.sh ``` This should download DPDK, and build all of NetBricks. Using Rust from Git ------------------- The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as ``` export RUST_STATIC=1 ./build.sh ``` Example NFs ----------- Coming Soon. ## Instruction: Add instructions for installing SCTP to Readme ## Code After: NetBricks is a Rust based framework for NFV development. Please refer to the paper (available soon) for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version. Building -------- NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later case we also build [`musl`](https://www.musl-libc.org/) and statically link to things. Below we provide basic instructions for both. Using Rust Nightly ------------------ First obtain Rust nightly. I use [rustup](https://rustup.rs), in which case the following works ``` curl https://sh.rustup.rs -sSf | sh # Install rustup rustup install nightly ``` Then clone this repository and run `build.sh` ``` ./build.sh ``` This should download DPDK, and build all of NetBricks. Using Rust from Git ------------------- The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as ``` export RUST_STATIC=1 ./build.sh ``` Dependencies ------------ Building NetBricks requires `libcurl` with support for `gnutls`. On Debian these dependencies can be installed using: ``` apt-get install libgnutls30 libgnutls-openssl-dev libcurl4-gnutls-dev ``` NetBricks also supports using SCTP as a control protocol. SCTP support requires the use of `libsctp` (this is an optional dependency) which can be installed on Debian using: ``` apt-get install libsctp-dev ``` Example NFs ----------- Coming Soon. Future Work ----------- Support for [`futures`](https://github.com/alexcrichton/futures-rs) for control plane functionality.
NetBricks is a Rust based framework for NFV development. Please refer to the paper (available soon) for information about the architecture and design. Currently NetBricks requires a relatively modern Linux version. Building -------- NetBricks can be built either using a Rust nightly build or using Rust built from the current Git head. In the later case we also build [`musl`](https://www.musl-libc.org/) and statically link to things. Below we provide basic instructions for both. Using Rust Nightly ------------------ - First obtain Rust nightly. I use [rustup](rustup.rs), in which case the following works + First obtain Rust nightly. I use [rustup](https://rustup.rs), in which case the following works ? ++++++++ ``` curl https://sh.rustup.rs -sSf | sh # Install rustup rustup install nightly ``` Then clone this repository and run `build.sh` ``` ./build.sh ``` This should download DPDK, and build all of NetBricks. Using Rust from Git ------------------- The instructions for doing so are simple, however building takes significantly longer in this case (and consumes tons of memory), so do this only if you have lots of time and memory. Building is as simple as ``` export RUST_STATIC=1 ./build.sh ``` + Dependencies + ------------ + Building NetBricks requires `libcurl` with support for `gnutls`. On Debian these dependencies can be installed using: + + ``` + apt-get install libgnutls30 libgnutls-openssl-dev libcurl4-gnutls-dev + ``` + + NetBricks also supports using SCTP as a control protocol. SCTP support requires the use of `libsctp` (this is an + optional dependency) which can be installed on Debian using: + + ``` + apt-get install libsctp-dev + ``` + Example NFs ----------- Coming Soon. + + Future Work + ----------- + Support for [`futures`](https://github.com/alexcrichton/futures-rs) for control plane functionality.
21
0.538462
20
1
ae0d709ee679fa1a1a6f78054657c78872e972e6
events/guildMemberUpdate.js
events/guildMemberUpdate.js
exports.func = (client, oldMember, newMember) => { if(oldMember.nickname != newMember.nickname) { oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_"; newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_"; client.logToGuild(newMember.guild, `:name_badge: ${client.formatUser(newMember.user)} nickname was changed from ${oldFormatted} to ${newFormatted}`); } if(oldMember.roles != newMember.roles) { oldArray = []; newArray = []; oldMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; // filters out @everyone oldArray.push(role.name); }, []); newMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; newArray.push(role.name); }, []); oldRoles = oldArray.join(', ') || "_(none)_"; newRoles = newArray.join(', ') || "_(none)_"; client.logToGuild(newMember.guild, `:lock_with_ink_pen: ${client.formatUser(newMember.user)} roles were changed:\n:b: ${oldRoles}\n:a: ${newRoles}`); } };
exports.func = (client, oldMember, newMember) => { if(oldMember.nickname != newMember.nickname) { oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_"; newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_"; client.logToGuild(newMember.guild, `:name_badge: ${client.formatUser(newMember.user)} nickname was changed from ${oldFormatted} to ${newFormatted}`); } if(!oldMember.roles.equals(newMember.roles)) { oldArray = []; newArray = []; oldMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; // filters out @everyone oldArray.push(role.name); }, []); newMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; newArray.push(role.name); }, []); oldRoles = oldArray.join(', ') || "_(none)_"; newRoles = newArray.join(', ') || "_(none)_"; client.logToGuild(newMember.guild, `:lock_with_ink_pen: ${client.formatUser(newMember.user)} roles were changed:\n:b: ${oldRoles}\n:a: ${newRoles}`); } };
Fix bug where role change logged on nickname change.
Fix bug where role change logged on nickname change.
JavaScript
mit
IanMurray/AnnuBot
javascript
## Code Before: exports.func = (client, oldMember, newMember) => { if(oldMember.nickname != newMember.nickname) { oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_"; newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_"; client.logToGuild(newMember.guild, `:name_badge: ${client.formatUser(newMember.user)} nickname was changed from ${oldFormatted} to ${newFormatted}`); } if(oldMember.roles != newMember.roles) { oldArray = []; newArray = []; oldMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; // filters out @everyone oldArray.push(role.name); }, []); newMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; newArray.push(role.name); }, []); oldRoles = oldArray.join(', ') || "_(none)_"; newRoles = newArray.join(', ') || "_(none)_"; client.logToGuild(newMember.guild, `:lock_with_ink_pen: ${client.formatUser(newMember.user)} roles were changed:\n:b: ${oldRoles}\n:a: ${newRoles}`); } }; ## Instruction: Fix bug where role change logged on nickname change. ## Code After: exports.func = (client, oldMember, newMember) => { if(oldMember.nickname != newMember.nickname) { oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_"; newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_"; client.logToGuild(newMember.guild, `:name_badge: ${client.formatUser(newMember.user)} nickname was changed from ${oldFormatted} to ${newFormatted}`); } if(!oldMember.roles.equals(newMember.roles)) { oldArray = []; newArray = []; oldMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; // filters out @everyone oldArray.push(role.name); }, []); newMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; newArray.push(role.name); }, []); oldRoles = oldArray.join(', ') || "_(none)_"; newRoles = newArray.join(', ') || "_(none)_"; client.logToGuild(newMember.guild, `:lock_with_ink_pen: ${client.formatUser(newMember.user)} roles were changed:\n:b: ${oldRoles}\n:a: ${newRoles}`); } };
exports.func = (client, oldMember, newMember) => { if(oldMember.nickname != newMember.nickname) { oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_"; newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_"; client.logToGuild(newMember.guild, `:name_badge: ${client.formatUser(newMember.user)} nickname was changed from ${oldFormatted} to ${newFormatted}`); } + - if(oldMember.roles != newMember.roles) { ? ^^^^ + if(!oldMember.roles.equals(newMember.roles)) { ? + ^^^^^^^^ + oldArray = []; newArray = []; oldMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; // filters out @everyone oldArray.push(role.name); }, []); newMember.roles.reduce((snowflake, role) => { if(role.id == role.guild.id) return; newArray.push(role.name); }, []); oldRoles = oldArray.join(', ') || "_(none)_"; newRoles = newArray.join(', ') || "_(none)_"; client.logToGuild(newMember.guild, `:lock_with_ink_pen: ${client.formatUser(newMember.user)} roles were changed:\n:b: ${oldRoles}\n:a: ${newRoles}`); } };
3
0.111111
2
1
c979a270c4fc33347be7389d2b794dacba04d416
README.md
README.md
[![npm version](https://img.shields.io/npm/v/@alexey.kornilov/injector.svg?style=flat-square)](https://www.npmjs.com/package/@alexey.kornilov/injector) This is dependency injector for JavaScript with support for ES6/ES2015. It can be applied in both node and browser environments. ## Installation Execute this command in your environment. ``` npm install @alexey.kornilov/injector --save ``` or ``` yarn add @alexey.kornilov/injector ```
[![npm version](https://img.shields.io/npm/v/@alexey.kornilov/injector.svg?style=flat-square)](https://www.npmjs.com/package/@alexey.kornilov/injector) This is dependency injector for JavaScript with support for ES6/ES2015. It can be applied in both node and browser environments. ## Installation Execute this command in your environment. ``` npm install @alexey.kornilov/injector --save ``` or ``` yarn add @alexey.kornilov/injector ``` ## Usage ### Constructor registration One is able to register constructor for a particular class and create instances of it: ```js import Injector from "@alexey.kornilov/injector"; class Foo { constructor() { console.log("Creating instance of Foo."); } get dependencies() { return []; } } const injector = new Injector(); injector.register("foo", Foo); // Resolve class by its registered name const foo1 = injector.resolve("foo"); // Resolve class by its constructor reference const foo2 = injector.resolve(Foo); ``` Expected output will be: ``` [Tue Mar 28 2017 08:39:53 GMT+0300 (MSK)] [Injector] Registering 'foo' component. Creating instance of Foo. Creating instance of Foo. ``` ### Object registration One is able to register pure object. ```js import Injector from "@alexey.kornilov/injector"; const foo = { name: "Foo object " + Math.round(Math.random() * 10) }; const injector = new Injector(); injector.register("foo", foo); // Resolve registered object const foo1 = injector.resolve("foo"); console.log(foo1); // Resolve registered object const foo2 = injector.resolve("foo"); console.log(foo2); // We are expecting same object console.log(foo1 === foo2 ? "Same object resolved." : "WARNING: unexpected resolved object.") ``` Expected output will be: ``` [Tue Mar 28 2017 08:46:31 GMT+0300 (MSK)] [Injector] Registering 'foo' component. { name: 'Foo object 5' } { name: 'Foo object 5' } Same object resolved. ``` Also usage examples can be found in `./examples` folder.
Add usage section into readme.
Add usage section into readme.
Markdown
mit
kavolorn/Injector
markdown
## Code Before: [![npm version](https://img.shields.io/npm/v/@alexey.kornilov/injector.svg?style=flat-square)](https://www.npmjs.com/package/@alexey.kornilov/injector) This is dependency injector for JavaScript with support for ES6/ES2015. It can be applied in both node and browser environments. ## Installation Execute this command in your environment. ``` npm install @alexey.kornilov/injector --save ``` or ``` yarn add @alexey.kornilov/injector ``` ## Instruction: Add usage section into readme. ## Code After: [![npm version](https://img.shields.io/npm/v/@alexey.kornilov/injector.svg?style=flat-square)](https://www.npmjs.com/package/@alexey.kornilov/injector) This is dependency injector for JavaScript with support for ES6/ES2015. It can be applied in both node and browser environments. ## Installation Execute this command in your environment. ``` npm install @alexey.kornilov/injector --save ``` or ``` yarn add @alexey.kornilov/injector ``` ## Usage ### Constructor registration One is able to register constructor for a particular class and create instances of it: ```js import Injector from "@alexey.kornilov/injector"; class Foo { constructor() { console.log("Creating instance of Foo."); } get dependencies() { return []; } } const injector = new Injector(); injector.register("foo", Foo); // Resolve class by its registered name const foo1 = injector.resolve("foo"); // Resolve class by its constructor reference const foo2 = injector.resolve(Foo); ``` Expected output will be: ``` [Tue Mar 28 2017 08:39:53 GMT+0300 (MSK)] [Injector] Registering 'foo' component. Creating instance of Foo. Creating instance of Foo. ``` ### Object registration One is able to register pure object. ```js import Injector from "@alexey.kornilov/injector"; const foo = { name: "Foo object " + Math.round(Math.random() * 10) }; const injector = new Injector(); injector.register("foo", foo); // Resolve registered object const foo1 = injector.resolve("foo"); console.log(foo1); // Resolve registered object const foo2 = injector.resolve("foo"); console.log(foo2); // We are expecting same object console.log(foo1 === foo2 ? "Same object resolved." : "WARNING: unexpected resolved object.") ``` Expected output will be: ``` [Tue Mar 28 2017 08:46:31 GMT+0300 (MSK)] [Injector] Registering 'foo' component. { name: 'Foo object 5' } { name: 'Foo object 5' } Same object resolved. ``` Also usage examples can be found in `./examples` folder.
[![npm version](https://img.shields.io/npm/v/@alexey.kornilov/injector.svg?style=flat-square)](https://www.npmjs.com/package/@alexey.kornilov/injector) This is dependency injector for JavaScript with support for ES6/ES2015. It can be applied in both node and browser environments. ## Installation Execute this command in your environment. ``` npm install @alexey.kornilov/injector --save ``` or + ``` yarn add @alexey.kornilov/injector ``` + + ## Usage + + ### Constructor registration + + One is able to register constructor for a particular class and create + instances of it: + + ```js + import Injector from "@alexey.kornilov/injector"; + + class Foo { + constructor() { + console.log("Creating instance of Foo."); + } + + get dependencies() { + return []; + } + } + + const injector = new Injector(); + injector.register("foo", Foo); + + // Resolve class by its registered name + const foo1 = injector.resolve("foo"); + + // Resolve class by its constructor reference + const foo2 = injector.resolve(Foo); + ``` + + Expected output will be: + + ``` + [Tue Mar 28 2017 08:39:53 GMT+0300 (MSK)] [Injector] Registering 'foo' component. + Creating instance of Foo. + Creating instance of Foo. + ``` + + ### Object registration + + One is able to register pure object. + + ```js + import Injector from "@alexey.kornilov/injector"; + + const foo = { + name: "Foo object " + Math.round(Math.random() * 10) + }; + + const injector = new Injector(); + injector.register("foo", foo); + + // Resolve registered object + const foo1 = injector.resolve("foo"); + console.log(foo1); + + // Resolve registered object + const foo2 = injector.resolve("foo"); + console.log(foo2); + + // We are expecting same object + console.log(foo1 === foo2 ? + "Same object resolved." : + "WARNING: unexpected resolved object.") + ``` + + Expected output will be: + + ``` + [Tue Mar 28 2017 08:46:31 GMT+0300 (MSK)] [Injector] Registering 'foo' component. + { name: 'Foo object 5' } + { name: 'Foo object 5' } + Same object resolved. + + ``` + + Also usage examples can be found in `./examples` folder.
79
4.647059
79
0
50d65b515e49e2a6796b798771b649686e59b812
core/db/migrate/20140205120320_create_spree_payment_capture_events.rb
core/db/migrate/20140205120320_create_spree_payment_capture_events.rb
class CreateSpreePaymentCaptureEvents < ActiveRecord::Migration def change create_table :spree_payment_capture_events do |t| t.integer :amount t.integer :payment_id t.timestamps end add_index :spree_payment_capture_events, :payment_id end end
class CreateSpreePaymentCaptureEvents < ActiveRecord::Migration def change create_table :spree_payment_capture_events do |t| t.decimal :amount, precision: 10, scale: 2, default: 0.0 t.integer :payment_id t.timestamps end add_index :spree_payment_capture_events, :payment_id end end
Use decimal field for capture_events, just like payment table
Use decimal field for capture_events, just like payment table
Ruby
bsd-3-clause
TimurTarasenko/spree,vcavallo/spree,mleglise/spree,jspizziri/spree,softr8/spree,azclick/spree,mleglise/spree,zaeznet/spree,CJMrozek/spree,sunny2601/spree,JDutil/spree,raow/spree,njerrywerry/spree,orenf/spree,mindvolt/spree,firman/spree,devilcoders/solidus,Mayvenn/spree,shaywood2/spree,kewaunited/spree,piousbox/spree,zaeznet/spree,calvinl/spree,bonobos/solidus,reinaris/spree,ramkumar-kr/spree,DynamoMTL/spree,abhishekjain16/spree,athal7/solidus,dotandbo/spree,Migweld/spree,LBRapid/spree,gregoryrikson/spree-sample,wolfieorama/spree,beni55/spree,jsurdilla/solidus,jordan-brough/spree,locomotivapro/spree,jparr/spree,dafontaine/spree,TimurTarasenko/spree,useiichi/spree,hifly/spree,siddharth28/spree,forkata/solidus,dandanwei/spree,Migweld/spree,radarseesradar/spree,adaddeo/spree,miyazawatomoka/spree,sfcgeorge/spree,tailic/spree,TrialGuides/spree,groundctrl/spree,DynamoMTL/spree,mindvolt/spree,vmatekole/spree,tesserakt/clean_spree,Machpowersystems/spree_mach,tancnle/spree,nooysters/spree,beni55/spree,azclick/spree,locomotivapro/spree,Kagetsuki/spree,njerrywerry/spree,TimurTarasenko/spree,jspizziri/spree,jeffboulet/spree,NerdsvilleCEO/spree,keatonrow/spree,bonobos/solidus,vinsol/spree,degica/spree,Senjai/solidus,caiqinghua/spree,beni55/spree,hoanghiep90/spree,bricesanchez/spree,lsirivong/solidus,Boomkat/spree,Boomkat/spree,vulk/spree,Ropeney/spree,orenf/spree,ckk-scratch/solidus,joanblake/spree,lsirivong/solidus,siddharth28/spree,project-eutopia/spree,APohio/spree,net2b/spree,jimblesm/spree,rakibulislam/spree,camelmasa/spree,woboinc/spree,RatioClothing/spree,CJMrozek/spree,dafontaine/spree,jordan-brough/solidus,pervino/solidus,AgilTec/spree,vmatekole/spree,delphsoft/spree-store-ballchair,hifly/spree,volpejoaquin/spree,odk211/spree,fahidnasir/spree,Arpsara/solidus,odk211/spree,berkes/spree,bricesanchez/spree,lyzxsc/spree,CJMrozek/spree,patdec/spree,azranel/spree,Migweld/spree,Senjai/solidus,cutefrank/spree,lyzxsc/spree,yushine/spree,hoanghiep90/spree,CiscoCloud/spree,jspizziri/spree,Ropeney/spree,madetech/spree,vinsol/spree,Lostmyname/spree,tancnle/spree,jparr/spree,robodisco/spree,brchristian/spree,freerunningtech/spree,dafontaine/spree,JDutil/spree,derekluo/spree,volpejoaquin/spree,jimblesm/spree,tailic/spree,fahidnasir/spree,ujai/spree,sfcgeorge/spree,alejandromangione/spree,vmatekole/spree,brchristian/spree,quentinuys/spree,ramkumar-kr/spree,Lostmyname/spree,project-eutopia/spree,tomash/spree,surfdome/spree,siddharth28/spree,yiqing95/spree,assembledbrands/spree,richardnuno/solidus,nooysters/spree,adaddeo/spree,KMikhaylovCTG/spree,zamiang/spree,sunny2601/spree,Hawaiideveloper/shoppingcart,groundctrl/spree,agient/agientstorefront,PhoenixTeam/spree_phoenix,grzlus/solidus,moneyspyder/spree,vmatekole/spree,karlitxo/spree,thogg4/spree,CiscoCloud/spree,quentinuys/spree,raow/spree,wolfieorama/spree,sunny2601/spree,Kagetsuki/spree,alvinjean/spree,LBRapid/spree,azclick/spree,karlitxo/spree,calvinl/spree,sliaquat/spree,rbngzlv/spree,delphsoft/spree-store-ballchair,jordan-brough/solidus,vulk/spree,dotandbo/spree,abhishekjain16/spree,PhoenixTeam/spree_phoenix,sfcgeorge/spree,welitonfreitas/spree,Lostmyname/spree,yiqing95/spree,lsirivong/spree,mindvolt/spree,sliaquat/spree,gautamsawhney/spree,watg/spree,progsri/spree,jordan-brough/spree,Migweld/spree,watg/spree,azclick/spree,Mayvenn/spree,trigrass2/spree,NerdsvilleCEO/spree,devilcoders/solidus,CiscoCloud/spree,ayb/spree,abhishekjain16/spree,vinayvinsol/spree,shekibobo/spree,omarsar/spree,grzlus/solidus,bricesanchez/spree,shekibobo/spree,ahmetabdi/spree,DynamoMTL/spree,brchristian/spree,LBRapid/spree,wolfieorama/spree,keatonrow/spree,ckk-scratch/solidus,assembledbrands/spree,priyank-gupta/spree,DarkoP/spree,JuandGirald/spree,reidblomquist/spree,jsurdilla/solidus,degica/spree,rakibulislam/spree,woboinc/spree,jaspreet21anand/spree,hoanghiep90/spree,Hawaiideveloper/shoppingcart,quentinuys/spree,jimblesm/spree,miyazawatomoka/spree,RatioClothing/spree,omarsar/spree,rakibulislam/spree,zaeznet/spree,richardnuno/solidus,vcavallo/spree,surfdome/spree,sfcgeorge/spree,moneyspyder/spree,DynamoMTL/spree,pulkit21/spree,dotandbo/spree,zamiang/spree,ahmetabdi/spree,DarkoP/spree,jasonfb/spree,vinayvinsol/spree,Arpsara/solidus,cutefrank/spree,odk211/spree,volpejoaquin/spree,ujai/spree,Nevensoft/spree,xuewenfei/solidus,firman/spree,reidblomquist/spree,shioyama/spree,dandanwei/spree,vcavallo/spree,jsurdilla/solidus,rbngzlv/spree,forkata/solidus,woboinc/spree,alejandromangione/spree,moneyspyder/spree,watg/spree,zamiang/spree,Mayvenn/spree,robodisco/spree,Kagetsuki/spree,radarseesradar/spree,Engeltj/spree,madetech/spree,project-eutopia/spree,JDutil/spree,fahidnasir/spree,robodisco/spree,FadliKun/spree,thogg4/spree,vulk/spree,vinayvinsol/spree,tesserakt/clean_spree,edgward/spree,keatonrow/spree,quentinuys/spree,groundctrl/spree,delphsoft/spree-store-ballchair,Nevensoft/spree,scottcrawford03/solidus,grzlus/solidus,berkes/spree,kewaunited/spree,priyank-gupta/spree,imella/spree,fahidnasir/spree,rbngzlv/spree,scottcrawford03/solidus,APohio/spree,APohio/spree,dandanwei/spree,useiichi/spree,alejandromangione/spree,jasonfb/spree,njerrywerry/spree,devilcoders/solidus,jaspreet21anand/spree,Mayvenn/spree,calvinl/spree,piousbox/spree,forkata/solidus,xuewenfei/solidus,miyazawatomoka/spree,robodisco/spree,jordan-brough/solidus,tesserakt/clean_spree,Senjai/solidus,Kagetsuki/spree,edgward/spree,ahmetabdi/spree,grzlus/solidus,shaywood2/spree,net2b/spree,jeffboulet/spree,jspizziri/spree,locomotivapro/spree,hifly/spree,sideci-sample/sideci-sample-spree,KMikhaylovCTG/spree,SadTreeFriends/spree,madetech/spree,TrialGuides/spree,JuandGirald/spree,grzlus/spree,maybii/spree,Hawaiideveloper/shoppingcart,jasonfb/spree,maybii/spree,PhoenixTeam/spree_phoenix,mindvolt/spree,Lostmyname/spree,PhoenixTeam/spree_phoenix,NerdsvilleCEO/spree,ujai/spree,yomishra/pce,dotandbo/spree,omarsar/spree,azranel/spree,hoanghiep90/spree,thogg4/spree,calvinl/spree,surfdome/spree,FadliKun/spree,jasonfb/spree,gregoryrikson/spree-sample,ckk-scratch/solidus,piousbox/spree,radarseesradar/spree,patdec/spree,agient/agientstorefront,surfdome/spree,jimblesm/spree,camelmasa/spree,scottcrawford03/solidus,reinaris/spree,yushine/spree,reinaris/spree,StemboltHQ/spree,agient/agientstorefront,ahmetabdi/spree,shaywood2/spree,jordan-brough/spree,Arpsara/solidus,DarkoP/spree,nooysters/spree,ayb/spree,DarkoP/spree,pulkit21/spree,kewaunited/spree,alvinjean/spree,FadliKun/spree,grzlus/spree,agient/agientstorefront,mleglise/spree,ayb/spree,Hawaiideveloper/shoppingcart,Senjai/solidus,sunny2601/spree,hifly/spree,freerunningtech/spree,AgilTec/spree,JuandGirald/spree,tancnle/spree,builtbybuffalo/spree,vcavallo/spree,archSeer/spree,useiichi/spree,vinsol/spree,jparr/spree,progsri/spree,wolfieorama/spree,kewaunited/spree,sideci-sample/sideci-sample-spree,alvinjean/spree,njerrywerry/spree,madetech/spree,imella/spree,abhishekjain16/spree,pervino/spree,grzlus/spree,AgilTec/spree,carlesjove/spree,radarseesradar/spree,shaywood2/spree,progsri/spree,vinayvinsol/spree,Nevensoft/spree,pervino/spree,joanblake/spree,pervino/solidus,cutefrank/spree,project-eutopia/spree,Engeltj/spree,athal7/solidus,carlesjove/spree,ramkumar-kr/spree,reidblomquist/spree,Engeltj/spree,azranel/spree,pulkit21/spree,berkes/spree,tomash/spree,volpejoaquin/spree,karlitxo/spree,beni55/spree,mleglise/spree,freerunningtech/spree,reidblomquist/spree,yushine/spree,shioyama/spree,gregoryrikson/spree-sample,Engeltj/spree,lsirivong/spree,AgilTec/spree,gautamsawhney/spree,derekluo/spree,APohio/spree,richardnuno/solidus,JuandGirald/spree,builtbybuffalo/spree,edgward/spree,jsurdilla/solidus,sliaquat/spree,JDutil/spree,joanblake/spree,archSeer/spree,athal7/solidus,gregoryrikson/spree-sample,rajeevriitm/spree,ckk-scratch/solidus,tailic/spree,raow/spree,progsri/spree,softr8/spree,yushine/spree,richardnuno/solidus,tomash/spree,patdec/spree,Arpsara/solidus,builtbybuffalo/spree,lyzxsc/spree,derekluo/spree,jaspreet21anand/spree,reinaris/spree,lsirivong/solidus,delphsoft/spree-store-ballchair,StemboltHQ/spree,maybii/spree,builtbybuffalo/spree,rajeevriitm/spree,welitonfreitas/spree,rbngzlv/spree,groundctrl/spree,FadliKun/spree,firman/spree,brchristian/spree,joanblake/spree,net2b/spree,priyank-gupta/spree,tesserakt/clean_spree,Ropeney/spree,pervino/spree,trigrass2/spree,pervino/solidus,carlesjove/spree,yomishra/pce,shioyama/spree,thogg4/spree,NerdsvilleCEO/spree,xuewenfei/solidus,SadTreeFriends/spree,orenf/spree,shekibobo/spree,dandanwei/spree,caiqinghua/spree,raow/spree,sideci-sample/sideci-sample-spree,welitonfreitas/spree,jeffboulet/spree,athal7/solidus,tancnle/spree,TrialGuides/spree,adaddeo/spree,edgward/spree,gautamsawhney/spree,cutefrank/spree,nooysters/spree,TimurTarasenko/spree,siddharth28/spree,ramkumar-kr/spree,lsirivong/solidus,archSeer/spree,patdec/spree,karlitxo/spree,moneyspyder/spree,trigrass2/spree,pervino/spree,alejandromangione/spree,tomash/spree,bonobos/solidus,ayb/spree,bonobos/solidus,pervino/solidus,devilcoders/solidus,assembledbrands/spree,xuewenfei/solidus,Boomkat/spree,Machpowersystems/spree_mach,CJMrozek/spree,jordan-brough/solidus,vinsol/spree,trigrass2/spree,grzlus/spree,orenf/spree,camelmasa/spree,forkata/solidus,sliaquat/spree,locomotivapro/spree,jaspreet21anand/spree,StemboltHQ/spree,omarsar/spree,Nevensoft/spree,imella/spree,derekluo/spree,azranel/spree,maybii/spree,alvinjean/spree,RatioClothing/spree,lsirivong/spree,KMikhaylovCTG/spree,firman/spree,adaddeo/spree,rajeevriitm/spree,CiscoCloud/spree,softr8/spree,yiqing95/spree,yomishra/pce,welitonfreitas/spree,lyzxsc/spree,Machpowersystems/spree_mach,SadTreeFriends/spree,TrialGuides/spree,shekibobo/spree,archSeer/spree,gautamsawhney/spree,dafontaine/spree,net2b/spree,rajeevriitm/spree,odk211/spree,degica/spree,priyank-gupta/spree,SadTreeFriends/spree,zaeznet/spree,yiqing95/spree,zamiang/spree,pulkit21/spree,useiichi/spree,caiqinghua/spree,Ropeney/spree,camelmasa/spree,miyazawatomoka/spree,jeffboulet/spree,lsirivong/spree,softr8/spree,KMikhaylovCTG/spree,piousbox/spree,vulk/spree,carlesjove/spree,caiqinghua/spree,scottcrawford03/solidus,berkes/spree,keatonrow/spree,rakibulislam/spree,jparr/spree,Boomkat/spree
ruby
## Code Before: class CreateSpreePaymentCaptureEvents < ActiveRecord::Migration def change create_table :spree_payment_capture_events do |t| t.integer :amount t.integer :payment_id t.timestamps end add_index :spree_payment_capture_events, :payment_id end end ## Instruction: Use decimal field for capture_events, just like payment table ## Code After: class CreateSpreePaymentCaptureEvents < ActiveRecord::Migration def change create_table :spree_payment_capture_events do |t| t.decimal :amount, precision: 10, scale: 2, default: 0.0 t.integer :payment_id t.timestamps end add_index :spree_payment_capture_events, :payment_id end end
class CreateSpreePaymentCaptureEvents < ActiveRecord::Migration def change create_table :spree_payment_capture_events do |t| - t.integer :amount + t.decimal :amount, precision: 10, scale: 2, default: 0.0 t.integer :payment_id t.timestamps end add_index :spree_payment_capture_events, :payment_id end end
2
0.166667
1
1
f7e72d97e0a12696dbfeab8f7fccdcaeb642c93b
modules/govuk_jenkins/templates/google_api/credentials.json.erb
modules/govuk_jenkins/templates/google_api/credentials.json.erb
{ "type": "service_account", "project_id": "<%= @project_id -%>", "private_key_id": "<%= @private_key_id -%>", "private_key": "<%= @private_key -%>", "client_email": "<%= @client_email -%>", "client_id": "<%= @client_id -%>", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "<%= @client_x509_cert_url -%>" }
<%= require "json"; JSON.pretty_generate({ type: "service_account", project_id: @project_id, private_key_id: @private_key_id, private_key: @private_key, client_email: @client_email, client_id: @client_id, auth_uri: "https://accounts.google.com/o/oauth2/auth", token_uri: "https://accounts.google.com/o/oauth2/token", auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs", client_x509_cert_url: @client_x509_cert_url, }) %>
Use JSON module to generate valid JSON
Use JSON module to generate valid JSON Currently we use erb to expand variables into strings in the JSON for Google API credentials. This can sometimes end up generating malformed JSON (specifically in the case where the private key contains newline characters because JSON doesn't support multiline strings). Instead of generating JSON in this way we can let the JSON library generate the JSON blob thus handling all the special cases of JSON for us.
HTML+ERB
mit
alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet
html+erb
## Code Before: { "type": "service_account", "project_id": "<%= @project_id -%>", "private_key_id": "<%= @private_key_id -%>", "private_key": "<%= @private_key -%>", "client_email": "<%= @client_email -%>", "client_id": "<%= @client_id -%>", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "<%= @client_x509_cert_url -%>" } ## Instruction: Use JSON module to generate valid JSON Currently we use erb to expand variables into strings in the JSON for Google API credentials. This can sometimes end up generating malformed JSON (specifically in the case where the private key contains newline characters because JSON doesn't support multiline strings). Instead of generating JSON in this way we can let the JSON library generate the JSON blob thus handling all the special cases of JSON for us. ## Code After: <%= require "json"; JSON.pretty_generate({ type: "service_account", project_id: @project_id, private_key_id: @private_key_id, private_key: @private_key, client_email: @client_email, client_id: @client_id, auth_uri: "https://accounts.google.com/o/oauth2/auth", token_uri: "https://accounts.google.com/o/oauth2/token", auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs", client_x509_cert_url: @client_x509_cert_url, }) %>
- { + <%= require "json"; JSON.pretty_generate({ - "type": "service_account", ? - - + type: "service_account", - "project_id": "<%= @project_id -%>", ? - - ----- ----- + project_id: @project_id, - "private_key_id": "<%= @private_key_id -%>", ? - - ----- ----- + private_key_id: @private_key_id, - "private_key": "<%= @private_key -%>", ? - - ----- ----- + private_key: @private_key, - "client_email": "<%= @client_email -%>", ? - - ----- ----- + client_email: @client_email, - "client_id": "<%= @client_id -%>", ? - - ----- ----- + client_id: @client_id, - "auth_uri": "https://accounts.google.com/o/oauth2/auth", ? - - + auth_uri: "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://accounts.google.com/o/oauth2/token", ? - - + token_uri: "https://accounts.google.com/o/oauth2/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", ? - - + auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "<%= @client_x509_cert_url -%>" ? - - ----- ^^^^^ + client_x509_cert_url: @client_x509_cert_url, ? ^ - } + }) %>
24
2
12
12
d248a9aa471c679c752201dbeb9bd2850df71e4c
scripts/git-update.sh
scripts/git-update.sh
for user in ~/Workspace/src/github.com/* do if [[ ! $user =~ $GITHUB_USER_NAME ]]; then for project in $user/* do if [ -d $project/.git ]; then echo "git $project" cd $project if [[ $project == *base16-shell* ]]; then git pull --all else #statements git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive fi echo "" fi done fi done for bundle in ~/.vim/bundle/* do if [ -d $bundle/.git/ ]; then echo "git $bundle" cd $bundle git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive echo "" fi done
for user in ~/Workspace/src/github.com/* do if [[ ! $user =~ $GITHUB_USER_NAME ]]; then for project in $user/* do if [ -d $project/.git ]; then echo "git $project" cd $project if [[ $project == *base16-shell* ]]; then git pull --all else #statements git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive fi echo "" fi done fi done
Remove bundle folder, vim-plug is faster
Remove bundle folder, vim-plug is faster
Shell
apache-2.0
daveshaheen/system-setup
shell
## Code Before: for user in ~/Workspace/src/github.com/* do if [[ ! $user =~ $GITHUB_USER_NAME ]]; then for project in $user/* do if [ -d $project/.git ]; then echo "git $project" cd $project if [[ $project == *base16-shell* ]]; then git pull --all else #statements git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive fi echo "" fi done fi done for bundle in ~/.vim/bundle/* do if [ -d $bundle/.git/ ]; then echo "git $bundle" cd $bundle git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive echo "" fi done ## Instruction: Remove bundle folder, vim-plug is faster ## Code After: for user in ~/Workspace/src/github.com/* do if [[ ! $user =~ $GITHUB_USER_NAME ]]; then for project in $user/* do if [ -d $project/.git ]; then echo "git $project" cd $project if [[ $project == *base16-shell* ]]; then git pull --all else #statements git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive fi echo "" fi done fi done
for user in ~/Workspace/src/github.com/* do if [[ ! $user =~ $GITHUB_USER_NAME ]]; then for project in $user/* do if [ -d $project/.git ]; then echo "git $project" cd $project if [[ $project == *base16-shell* ]]; then git pull --all else #statements git fetch --all git reset --hard git clean -df git merge --ff-only git submodule update --init --recursive fi echo "" fi done fi done - - for bundle in ~/.vim/bundle/* - do - if [ -d $bundle/.git/ ]; then - echo "git $bundle" - cd $bundle - git fetch --all - git reset --hard - git clean -df - git merge --ff-only - git submodule update --init --recursive - echo "" - fi - done
14
0.368421
0
14
1ddce502dce1d642dd141af72b8892a2c09b749c
sphinx/source/docs/reference/core/validation.rst
sphinx/source/docs/reference/core/validation.rst
.. _bokeh.core.validation: bokeh.core.validation --------------------- .. automodule:: bokeh.core.validation .. _bokeh.core.validation.errors: Error Codes ~~~~~~~~~~~ .. automodule:: bokeh.core.validation.errors :members: :undoc-members: .. _bokeh.core.validation.warnings: Warning Codes ~~~~~~~~~~~~~ .. automodule:: bokeh.core.validation.warnings :members: :undoc-members: .. _bokeh.core.validation.helpers: Helper Functions ~~~~~~~~~~~~~~~~ These helper functions can be used to perform integrity checks on collections of Bokeh models, or mark methods on Models as warning or error checks. .. autofunction:: bokeh.core.validation.check.check_integrity .. autofunction:: bokeh.core.validation.decorators.error .. autofunction:: bokeh.core.validation.decorators.warning .. |bokeh.models| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |bokeh.plotting| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |ColumnDataSource| replace:: :class:`~bokeh.models.sources.ColumnDataSource` .. |GlyphRenderer| replace:: :class:`~bokeh.models.renderers.GlyphRenderer` .. |Plot| replace:: :class:`~bokeh.models.plots.Plot`
.. _bokeh.core.validation: bokeh.core.validation --------------------- .. automodule:: bokeh.core.validation .. _bokeh.core.validation.errors: Error Codes ~~~~~~~~~~~ .. automodule:: bokeh.core.validation.errors :members: :undoc-members: .. _bokeh.core.validation.warnings: Warning Codes ~~~~~~~~~~~~~ .. automodule:: bokeh.core.validation.warnings :members: :undoc-members: .. _bokeh.core.validation.helpers: Helper Functions ~~~~~~~~~~~~~~~~ These helper functions can be used to perform integrity checks on collections of Bokeh models, or mark methods on Models as warning or error checks. .. autofunction:: bokeh.core.validation.check.check_integrity .. autofunction:: bokeh.core.validation.decorators.error .. autofunction:: bokeh.core.validation.decorators.warning .. |bokeh.models| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |bokeh.plotting| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |ColumnDataSource| replace:: :class:`~bokeh.models.sources.ColumnDataSource` .. |GlyphRenderer| replace:: :class:`~bokeh.models.renderers.GlyphRenderer` .. |Plot| replace:: :class:`~bokeh.models.plots.Plot` .. |Scale| replace:: :class:`~bokeh.models.scales.Scale`
Add ref link for Scale
Add ref link for Scale
reStructuredText
bsd-3-clause
ericmjl/bokeh,timsnyder/bokeh,bokeh/bokeh,bokeh/bokeh,aavanian/bokeh,percyfal/bokeh,aavanian/bokeh,ericmjl/bokeh,ericmjl/bokeh,stonebig/bokeh,dennisobrien/bokeh,stonebig/bokeh,rs2/bokeh,philippjfr/bokeh,DuCorey/bokeh,aavanian/bokeh,philippjfr/bokeh,jakirkham/bokeh,jakirkham/bokeh,timsnyder/bokeh,jakirkham/bokeh,percyfal/bokeh,percyfal/bokeh,DuCorey/bokeh,dennisobrien/bokeh,timsnyder/bokeh,aavanian/bokeh,dennisobrien/bokeh,dennisobrien/bokeh,mindriot101/bokeh,bokeh/bokeh,ericmjl/bokeh,mindriot101/bokeh,ericmjl/bokeh,Karel-van-de-Plassche/bokeh,mindriot101/bokeh,rs2/bokeh,DuCorey/bokeh,aavanian/bokeh,bokeh/bokeh,philippjfr/bokeh,percyfal/bokeh,Karel-van-de-Plassche/bokeh,timsnyder/bokeh,Karel-van-de-Plassche/bokeh,stonebig/bokeh,jakirkham/bokeh,mindriot101/bokeh,rs2/bokeh,philippjfr/bokeh,jakirkham/bokeh,Karel-van-de-Plassche/bokeh,DuCorey/bokeh,stonebig/bokeh,rs2/bokeh,DuCorey/bokeh,percyfal/bokeh,philippjfr/bokeh,bokeh/bokeh,rs2/bokeh,dennisobrien/bokeh,Karel-van-de-Plassche/bokeh,timsnyder/bokeh
restructuredtext
## Code Before: .. _bokeh.core.validation: bokeh.core.validation --------------------- .. automodule:: bokeh.core.validation .. _bokeh.core.validation.errors: Error Codes ~~~~~~~~~~~ .. automodule:: bokeh.core.validation.errors :members: :undoc-members: .. _bokeh.core.validation.warnings: Warning Codes ~~~~~~~~~~~~~ .. automodule:: bokeh.core.validation.warnings :members: :undoc-members: .. _bokeh.core.validation.helpers: Helper Functions ~~~~~~~~~~~~~~~~ These helper functions can be used to perform integrity checks on collections of Bokeh models, or mark methods on Models as warning or error checks. .. autofunction:: bokeh.core.validation.check.check_integrity .. autofunction:: bokeh.core.validation.decorators.error .. autofunction:: bokeh.core.validation.decorators.warning .. |bokeh.models| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |bokeh.plotting| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |ColumnDataSource| replace:: :class:`~bokeh.models.sources.ColumnDataSource` .. |GlyphRenderer| replace:: :class:`~bokeh.models.renderers.GlyphRenderer` .. |Plot| replace:: :class:`~bokeh.models.plots.Plot` ## Instruction: Add ref link for Scale ## Code After: .. _bokeh.core.validation: bokeh.core.validation --------------------- .. automodule:: bokeh.core.validation .. _bokeh.core.validation.errors: Error Codes ~~~~~~~~~~~ .. automodule:: bokeh.core.validation.errors :members: :undoc-members: .. _bokeh.core.validation.warnings: Warning Codes ~~~~~~~~~~~~~ .. automodule:: bokeh.core.validation.warnings :members: :undoc-members: .. _bokeh.core.validation.helpers: Helper Functions ~~~~~~~~~~~~~~~~ These helper functions can be used to perform integrity checks on collections of Bokeh models, or mark methods on Models as warning or error checks. .. autofunction:: bokeh.core.validation.check.check_integrity .. autofunction:: bokeh.core.validation.decorators.error .. autofunction:: bokeh.core.validation.decorators.warning .. |bokeh.models| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |bokeh.plotting| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |ColumnDataSource| replace:: :class:`~bokeh.models.sources.ColumnDataSource` .. |GlyphRenderer| replace:: :class:`~bokeh.models.renderers.GlyphRenderer` .. |Plot| replace:: :class:`~bokeh.models.plots.Plot` .. |Scale| replace:: :class:`~bokeh.models.scales.Scale`
.. _bokeh.core.validation: bokeh.core.validation --------------------- .. automodule:: bokeh.core.validation .. _bokeh.core.validation.errors: Error Codes ~~~~~~~~~~~ .. automodule:: bokeh.core.validation.errors :members: :undoc-members: .. _bokeh.core.validation.warnings: Warning Codes ~~~~~~~~~~~~~ .. automodule:: bokeh.core.validation.warnings :members: :undoc-members: .. _bokeh.core.validation.helpers: Helper Functions ~~~~~~~~~~~~~~~~ These helper functions can be used to perform integrity checks on collections of Bokeh models, or mark methods on Models as warning or error checks. .. autofunction:: bokeh.core.validation.check.check_integrity .. autofunction:: bokeh.core.validation.decorators.error .. autofunction:: bokeh.core.validation.decorators.warning .. |bokeh.models| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |bokeh.plotting| replace:: :ref:`bokeh.plotting <bokeh.plotting>` .. |ColumnDataSource| replace:: :class:`~bokeh.models.sources.ColumnDataSource` .. |GlyphRenderer| replace:: :class:`~bokeh.models.renderers.GlyphRenderer` .. |Plot| replace:: :class:`~bokeh.models.plots.Plot` + .. |Scale| replace:: :class:`~bokeh.models.scales.Scale`
1
0.022222
1
0
60443b1911f326ca04740bb934c4c6a1355ae0de
src/writer/templates/base/table/base.twig
src/writer/templates/base/table/base.twig
<div class="table-container"> <div class="filter-controls"> {% for filter in filters %} {{ filter|write|raw }} {% endfor %} </div> <table> <!-- header row --> <tr> {% if rows is empty %} <th>No data found</th> {% else %} {% for fieldName, field in rows[0].getFieldBearer.getVisibleFields %} <th data-header-for="{{ fieldName }}">{{ field.getLabel }}</th> {% endfor %} {% endif %} </tr> <!-- data rows --> {% for row in rows %} {{ row|write|raw }} {% endfor %} </table> {% for filter in filters %} <p class="filter-feedback"> {{ filter.getFeedback }} </p> {% endfor %} </div>
<div class="table-container"> <div class="filter-controls"> {% for filter in filters %} {{ filter|write|raw }} {% endfor %} </div> <table> <!-- header row --> <tr> {% if rows is empty %} <th>No data found</th> {% else %} {% for fieldName, field in rows[0].getFieldBearer.getVisibleFields %} <th data-header-for="{{ fieldName }}">{{ field.getLabel }}</th> {% endfor %} {% endif %} </tr> <!-- data rows --> {% for row in rows %} {{ row|write|raw }} {% endfor %} </table> {% for filter in filters %} {% set feedback = filter.getFeedback %} {% if feedback %} <p class="filter-feedback" data-handle-for="{{ filter.getHandle }}"> {{ feedback }} </p> {% endif %} {% endfor %} </div>
Add handle to filter feedback.
Add handle to filter feedback.
Twig
mit
AthensFramework/core,AthensFramework/core,AthensFramework/core,AthensFramework/core
twig
## Code Before: <div class="table-container"> <div class="filter-controls"> {% for filter in filters %} {{ filter|write|raw }} {% endfor %} </div> <table> <!-- header row --> <tr> {% if rows is empty %} <th>No data found</th> {% else %} {% for fieldName, field in rows[0].getFieldBearer.getVisibleFields %} <th data-header-for="{{ fieldName }}">{{ field.getLabel }}</th> {% endfor %} {% endif %} </tr> <!-- data rows --> {% for row in rows %} {{ row|write|raw }} {% endfor %} </table> {% for filter in filters %} <p class="filter-feedback"> {{ filter.getFeedback }} </p> {% endfor %} </div> ## Instruction: Add handle to filter feedback. ## Code After: <div class="table-container"> <div class="filter-controls"> {% for filter in filters %} {{ filter|write|raw }} {% endfor %} </div> <table> <!-- header row --> <tr> {% if rows is empty %} <th>No data found</th> {% else %} {% for fieldName, field in rows[0].getFieldBearer.getVisibleFields %} <th data-header-for="{{ fieldName }}">{{ field.getLabel }}</th> {% endfor %} {% endif %} </tr> <!-- data rows --> {% for row in rows %} {{ row|write|raw }} {% endfor %} </table> {% for filter in filters %} {% set feedback = filter.getFeedback %} {% if feedback %} <p class="filter-feedback" data-handle-for="{{ filter.getHandle }}"> {{ feedback }} </p> {% endif %} {% endfor %} </div>
<div class="table-container"> <div class="filter-controls"> {% for filter in filters %} {{ filter|write|raw }} {% endfor %} </div> <table> <!-- header row --> <tr> {% if rows is empty %} <th>No data found</th> {% else %} {% for fieldName, field in rows[0].getFieldBearer.getVisibleFields %} <th data-header-for="{{ fieldName }}">{{ field.getLabel }}</th> {% endfor %} {% endif %} </tr> <!-- data rows --> {% for row in rows %} {{ row|write|raw }} {% endfor %} </table> {% for filter in filters %} - <p class="filter-feedback"> + {% set feedback = filter.getFeedback %} + {% if feedback %} + <p class="filter-feedback" data-handle-for="{{ filter.getHandle }}"> - {{ filter.getFeedback }} ? ---------- + {{ feedback }} ? ++++ - </p> + </p> ? ++++ + {% endif %} {% endfor %} </div>
9
0.28125
6
3
9da008fea97921ffaac520e39d59de149164e299
config/human_locale_names.yaml
config/human_locale_names.yaml
--- human_locale_names: en: English es: Español fr: Français ja: 日本語 pt_BR: pt_BR zh_CN: 简体中文
--- human_locale_names: en: English es: Español fr: Français ja: 日本語 pt_BR: Português (Brasil) zh_CN: 简体中文
Update locale name for Brazilian Portuguese
Update locale name for Brazilian Portuguese
YAML
apache-2.0
gmcculloug/manageiq,aufi/manageiq,kbrock/manageiq,d-m-u/manageiq,agrare/manageiq,jvlcek/manageiq,agrare/manageiq,juliancheal/manageiq,tinaafitz/manageiq,aufi/manageiq,billfitzgerald0120/manageiq,djberg96/manageiq,chessbyte/manageiq,pkomanek/manageiq,chessbyte/manageiq,lpichler/manageiq,ManageIQ/manageiq,borod108/manageiq,skateman/manageiq,djberg96/manageiq,hstastna/manageiq,jameswnl/manageiq,lpichler/manageiq,agrare/manageiq,billfitzgerald0120/manageiq,billfitzgerald0120/manageiq,mkanoor/manageiq,NickLaMuro/manageiq,gmcculloug/manageiq,tinaafitz/manageiq,aufi/manageiq,ManageIQ/manageiq,skateman/manageiq,hstastna/manageiq,pkomanek/manageiq,skateman/manageiq,NickLaMuro/manageiq,lpichler/manageiq,chessbyte/manageiq,gmcculloug/manageiq,jameswnl/manageiq,d-m-u/manageiq,djberg96/manageiq,borod108/manageiq,aufi/manageiq,borod108/manageiq,jvlcek/manageiq,ManageIQ/manageiq,skateman/manageiq,djberg96/manageiq,kbrock/manageiq,gmcculloug/manageiq,pkomanek/manageiq,chessbyte/manageiq,jrafanie/manageiq,romanblanco/manageiq,borod108/manageiq,jameswnl/manageiq,mzazrivec/manageiq,ManageIQ/manageiq,jvlcek/manageiq,tinaafitz/manageiq,jrafanie/manageiq,romanblanco/manageiq,pkomanek/manageiq,hstastna/manageiq,romanblanco/manageiq,jvlcek/manageiq,mzazrivec/manageiq,mkanoor/manageiq,NickLaMuro/manageiq,tinaafitz/manageiq,billfitzgerald0120/manageiq,juliancheal/manageiq,mzazrivec/manageiq,kbrock/manageiq,mkanoor/manageiq,hstastna/manageiq,jrafanie/manageiq,jameswnl/manageiq,lpichler/manageiq,d-m-u/manageiq,juliancheal/manageiq,romanblanco/manageiq,d-m-u/manageiq,agrare/manageiq,mkanoor/manageiq,kbrock/manageiq,jrafanie/manageiq,mzazrivec/manageiq,juliancheal/manageiq,NickLaMuro/manageiq
yaml
## Code Before: --- human_locale_names: en: English es: Español fr: Français ja: 日本語 pt_BR: pt_BR zh_CN: 简体中文 ## Instruction: Update locale name for Brazilian Portuguese ## Code After: --- human_locale_names: en: English es: Español fr: Français ja: 日本語 pt_BR: Português (Brasil) zh_CN: 简体中文
--- human_locale_names: en: English es: Español fr: Français ja: 日本語 - pt_BR: pt_BR + pt_BR: Português (Brasil) zh_CN: 简体中文
2
0.25
1
1
e0e4060c088041c8f8704651c0ed3d8282fa3f03
Sources/Sugar/Helpers/Either.swift
Sources/Sugar/Helpers/Either.swift
import Vapor /// A value that can one of two types public enum Either<L, R> { case left(L) case right(R) } extension Either: ResponseEncodable where L: ResponseEncodable, R: ResponseEncodable { /// See `ResponseEncodable.encode` public func encode(for req: Request) throws -> Future<Response> { switch self { case .left(let left): return try left.encode(for: req) case .right(let right): return try right.encode(for: req) } } } extension Future { /// Transforms a `Future` into one that can be either the value or an error of a given type. /// /// - Parameter type: The `Error` type to be promoted. /// - Returns: A `Future` that yields either a value or an error. public func promoteErrors<E: Error>(ofType type: E.Type = E.self) -> Future<Either<T, E>> { return map(Either.left) .catchMap { guard let error = $0 as? E else { throw $0 } return .right(error) } } } extension Either: Equatable where L: Equatable, R: Equatable {}
import Vapor /// A value that can one of two types public enum Either<L, R> { case left(L) case right(R) } extension Either: ResponseEncodable where L: ResponseEncodable, R: ResponseEncodable { /// See `ResponseEncodable.encode` public func encode(for req: Request) throws -> Future<Response> { switch self { case .left(let left): return try left.encode(for: req) case .right(let right): return try right.encode(for: req) } } } extension Future { /// Transforms a `Future` into one that can be either the value or an error of a given type. /// /// - Parameter type: The `Error` type to be promoted. /// - Returns: A `Future` that yields either a value or an error. public func promoteErrors<E: Error>(ofType type: E.Type = E.self) -> Future<Either<T, E>> { return map(Either.left) .catchMap { guard let error = $0 as? E else { throw $0 } return .right(error) } } } extension Either: Equatable where L: Equatable, R: Equatable { #if swift(>=4.2) // automatically synthesized in swift 4.2 #else public static func == (lhs: Either<L, R>, rhs: Either<L, R>) -> Bool { switch (lhs, rhs) { case (.left(let lhs), .left(let rhs)) where lhs == rhs: return true case (.right(let lhs), .right(let rhs)) where lhs == rhs: return true default: return false } } #endif }
Add implementation for swift < 4.2
Add implementation for swift < 4.2
Swift
mit
nodes-vapor/sugar
swift
## Code Before: import Vapor /// A value that can one of two types public enum Either<L, R> { case left(L) case right(R) } extension Either: ResponseEncodable where L: ResponseEncodable, R: ResponseEncodable { /// See `ResponseEncodable.encode` public func encode(for req: Request) throws -> Future<Response> { switch self { case .left(let left): return try left.encode(for: req) case .right(let right): return try right.encode(for: req) } } } extension Future { /// Transforms a `Future` into one that can be either the value or an error of a given type. /// /// - Parameter type: The `Error` type to be promoted. /// - Returns: A `Future` that yields either a value or an error. public func promoteErrors<E: Error>(ofType type: E.Type = E.self) -> Future<Either<T, E>> { return map(Either.left) .catchMap { guard let error = $0 as? E else { throw $0 } return .right(error) } } } extension Either: Equatable where L: Equatable, R: Equatable {} ## Instruction: Add implementation for swift < 4.2 ## Code After: import Vapor /// A value that can one of two types public enum Either<L, R> { case left(L) case right(R) } extension Either: ResponseEncodable where L: ResponseEncodable, R: ResponseEncodable { /// See `ResponseEncodable.encode` public func encode(for req: Request) throws -> Future<Response> { switch self { case .left(let left): return try left.encode(for: req) case .right(let right): return try right.encode(for: req) } } } extension Future { /// Transforms a `Future` into one that can be either the value or an error of a given type. /// /// - Parameter type: The `Error` type to be promoted. /// - Returns: A `Future` that yields either a value or an error. public func promoteErrors<E: Error>(ofType type: E.Type = E.self) -> Future<Either<T, E>> { return map(Either.left) .catchMap { guard let error = $0 as? E else { throw $0 } return .right(error) } } } extension Either: Equatable where L: Equatable, R: Equatable { #if swift(>=4.2) // automatically synthesized in swift 4.2 #else public static func == (lhs: Either<L, R>, rhs: Either<L, R>) -> Bool { switch (lhs, rhs) { case (.left(let lhs), .left(let rhs)) where lhs == rhs: return true case (.right(let lhs), .right(let rhs)) where lhs == rhs: return true default: return false } } #endif }
import Vapor /// A value that can one of two types public enum Either<L, R> { case left(L) case right(R) } extension Either: ResponseEncodable where L: ResponseEncodable, R: ResponseEncodable { /// See `ResponseEncodable.encode` public func encode(for req: Request) throws -> Future<Response> { switch self { case .left(let left): return try left.encode(for: req) case .right(let right): return try right.encode(for: req) } } } extension Future { /// Transforms a `Future` into one that can be either the value or an error of a given type. /// /// - Parameter type: The `Error` type to be promoted. /// - Returns: A `Future` that yields either a value or an error. public func promoteErrors<E: Error>(ofType type: E.Type = E.self) -> Future<Either<T, E>> { return map(Either.left) .catchMap { guard let error = $0 as? E else { throw $0 } return .right(error) } } } - extension Either: Equatable where L: Equatable, R: Equatable {} ? - + extension Either: Equatable where L: Equatable, R: Equatable { + #if swift(>=4.2) + // automatically synthesized in swift 4.2 + #else + public static func == (lhs: Either<L, R>, rhs: Either<L, R>) -> Bool { + switch (lhs, rhs) { + case (.left(let lhs), .left(let rhs)) where lhs == rhs: + return true + case (.right(let lhs), .right(let rhs)) where lhs == rhs: + return true + default: + return false + } + } + #endif + }
17
0.485714
16
1
669bb4816f2002df2786bbb77c6835ecea58c57d
overture.md
overture.md
--- layout: article title: Overture image: feature: overture.jpg teaser: overture_300_200.jpg caption: Mount Rainier from Mailbox Peak, WA --- Programming, tools and process are stuck in the past, held in place by hoards of OO-wielding proletariats collectively chanting "good enough". Let's find a better way. ## Required reading - [Complexity and Learning (2011)](http://mth.io/posts/complexity-and-learning/) — The view on learning and applying knowledge described here is one I've long held and argued for. This post uses an intuitive anaology of runtime complexity to describe learning a concept and the cost of applying it over time. ## Recommended reading - [Learn You a Haskell for Great Good!](http://learnyouahaskell.com/chapters) — Have you read a million monad tutorials and still don't get it? This was the case for me and learning Haskell is what made it finally click. As a bonus, this book is also hilarious and brilliantly written and illustrated; one of my all time favorites. - [Learning Scalaz](http://eed3si9n.com/learning-scalaz/) — This series of blog posts loosely follows LYAH and introduces [Scalaz](https://github.com/scalaz/scalaz)' equivalents to many of Haskell's classes.
--- layout: article title: Overture image: feature: overture.jpg teaser: overture_300_200.jpg caption: Mount Rainier from Mailbox Peak, WA --- Programming, tools and process are stuck in the past, held in place by hoards of OO-wielding proletariats collectively chanting "good enough". Let's find a better way. ## Required reading - [Complexity and Learning (2011)](http://mth.io/posts/complexity-and-learning/) — The view on learning and applying knowledge described here is one I've long held and argued for. This post uses an intuitive anaology of runtime complexity to describe learning a concept and the cost of applying it over time. ## Recommended reading - [Learn You a Haskell for Great Good!](http://learnyouahaskell.com/chapters) — Have you read a million monad tutorials and still don't get it? This was the case for me and learning Haskell is what made it finally click. As a bonus, this book is also hilarious and brilliantly written and illustrated; one of my all time favorites. - [Functional Programming in Scala](http://www.manning.com/bjarnason/) by Paul Chiusano and Rúnar Bjarnason - [Learning Scalaz](http://eed3si9n.com/learning-scalaz/) — This series of blog posts loosely follows LYAH and introduces [Scalaz](https://github.com/scalaz/scalaz)' equivalents to many of Haskell's classes.
Add FP in Scala to recommended reading
Add FP in Scala to recommended reading
Markdown
mit
devth/devth.github.com,devth/devth.github.com,devth/devth.github.com,devth/devth.github.com
markdown
## Code Before: --- layout: article title: Overture image: feature: overture.jpg teaser: overture_300_200.jpg caption: Mount Rainier from Mailbox Peak, WA --- Programming, tools and process are stuck in the past, held in place by hoards of OO-wielding proletariats collectively chanting "good enough". Let's find a better way. ## Required reading - [Complexity and Learning (2011)](http://mth.io/posts/complexity-and-learning/) — The view on learning and applying knowledge described here is one I've long held and argued for. This post uses an intuitive anaology of runtime complexity to describe learning a concept and the cost of applying it over time. ## Recommended reading - [Learn You a Haskell for Great Good!](http://learnyouahaskell.com/chapters) — Have you read a million monad tutorials and still don't get it? This was the case for me and learning Haskell is what made it finally click. As a bonus, this book is also hilarious and brilliantly written and illustrated; one of my all time favorites. - [Learning Scalaz](http://eed3si9n.com/learning-scalaz/) — This series of blog posts loosely follows LYAH and introduces [Scalaz](https://github.com/scalaz/scalaz)' equivalents to many of Haskell's classes. ## Instruction: Add FP in Scala to recommended reading ## Code After: --- layout: article title: Overture image: feature: overture.jpg teaser: overture_300_200.jpg caption: Mount Rainier from Mailbox Peak, WA --- Programming, tools and process are stuck in the past, held in place by hoards of OO-wielding proletariats collectively chanting "good enough". Let's find a better way. ## Required reading - [Complexity and Learning (2011)](http://mth.io/posts/complexity-and-learning/) — The view on learning and applying knowledge described here is one I've long held and argued for. This post uses an intuitive anaology of runtime complexity to describe learning a concept and the cost of applying it over time. ## Recommended reading - [Learn You a Haskell for Great Good!](http://learnyouahaskell.com/chapters) — Have you read a million monad tutorials and still don't get it? This was the case for me and learning Haskell is what made it finally click. As a bonus, this book is also hilarious and brilliantly written and illustrated; one of my all time favorites. - [Functional Programming in Scala](http://www.manning.com/bjarnason/) by Paul Chiusano and Rúnar Bjarnason - [Learning Scalaz](http://eed3si9n.com/learning-scalaz/) — This series of blog posts loosely follows LYAH and introduces [Scalaz](https://github.com/scalaz/scalaz)' equivalents to many of Haskell's classes.
--- layout: article title: Overture image: feature: overture.jpg teaser: overture_300_200.jpg caption: Mount Rainier from Mailbox Peak, WA --- Programming, tools and process are stuck in the past, held in place by hoards of OO-wielding proletariats collectively chanting "good enough". Let's find a better way. ## Required reading - [Complexity and Learning (2011)](http://mth.io/posts/complexity-and-learning/) — The view on learning and applying knowledge described here is one I've long held and argued for. This post uses an intuitive anaology of runtime complexity to describe learning a concept and the cost of applying it over time. ## Recommended reading - [Learn You a Haskell for Great Good!](http://learnyouahaskell.com/chapters) — Have you read a million monad tutorials and still don't get it? This was the case for me and learning Haskell is what made it finally click. As a bonus, this book is also hilarious and brilliantly written and illustrated; one of my all time favorites. + + - [Functional Programming in Scala](http://www.manning.com/bjarnason/) by Paul + Chiusano and Rúnar Bjarnason + - [Learning Scalaz](http://eed3si9n.com/learning-scalaz/) — This series of blog posts loosely follows LYAH and introduces [Scalaz](https://github.com/scalaz/scalaz)' equivalents to many of Haskell's classes.
4
0.121212
4
0
46de550b61371652c6767893c9e368bedfffb701
.travis.yml
.travis.yml
sudo: false language: ruby rvm: - 2.2.2 cache: bundler bundler_args: "--without development" branches: only: - production script: mkdir -p deploy/dataset-sync-wrapper && cp -r *.html *.js bower_components deploy/dataset-sync-wrapper/ after_success: bundle exec s3_website push --site deploy env: global: - secure: LDIIdeO68UG3IBvrqzPTjexSbo6yUvKxuLnIp3s2MG/XgW7fK//InMDAHmjFpBSaBEN0m/DQjHt25WUXB5bekNTPbcz4Bzubc9wFBJyBfjM88ja03gFZiY9r2F6yLb65NI4NCxt5KP1HA7J+tm9qPvl9PNJJo87cRP8di8/g1WI= - secure: PLlRxUIs9RrH9Dk9udfyYcqpTMS1e4qugWw0qMByin3SYibLE5JAECushXY35nbrdgE1pDpQg0b2JI+w60CEGfWWQ8feUkydF1STikD6tdBXEfwMiKqYiqH1/4d6tiH38U9e/9F4CDTx2ZiqH33gWoglLENRrcqOVKWY5+WZv/s=
sudo: false language: ruby rvm: - 2.2.2 cache: bundler bundler_args: "--without development" branches: only: - production script: mkdir -p deploy/dataset-sync-wrapper && cp -r *.html *.js bower_components deploy/dataset-sync-wrapper/ after_success: bundle exec s3_website push --site deploy env: global: - secure: JyXnozCwLHPXd5jR2TUgmLiBwJw1vRU4Ci0fcDcQWoYNGK4AV1vInUaKkQAMpqSM+OS5juDPbXcb2jZLHucfpUDrNLvSsujsFtKRjWMIcPT8ys1Y1xkp4smBcrGFc1ql8u1orBDb5hzz40dyg47MLoPK42+hdePHH/AYF/AKFrY= - secure: IMoEkkvGpyvG4n12tY50Hda/nQQ6dd+jA8Vj+LAu8RxW/nGRWtBhV/e3Pl+5kmetKUEj8Ev7wCT0S6yFUCLIeLCO/BDamj6u1C2UhyNT1uHNqqrlFztnPlrDzFWXKHdZtoRw/6/8lTvVPRDqnSLrnLn/S2QlJr/lOKHX/onInY8=
Encrypt Travis ENV variables again
Encrypt Travis ENV variables again [#92606056]
YAML
mit
concord-consortium/dataset-sync-wrapper,concord-consortium/dataset-sync-wrapper,concord-consortium/dataset-sync-wrapper
yaml
## Code Before: sudo: false language: ruby rvm: - 2.2.2 cache: bundler bundler_args: "--without development" branches: only: - production script: mkdir -p deploy/dataset-sync-wrapper && cp -r *.html *.js bower_components deploy/dataset-sync-wrapper/ after_success: bundle exec s3_website push --site deploy env: global: - secure: LDIIdeO68UG3IBvrqzPTjexSbo6yUvKxuLnIp3s2MG/XgW7fK//InMDAHmjFpBSaBEN0m/DQjHt25WUXB5bekNTPbcz4Bzubc9wFBJyBfjM88ja03gFZiY9r2F6yLb65NI4NCxt5KP1HA7J+tm9qPvl9PNJJo87cRP8di8/g1WI= - secure: PLlRxUIs9RrH9Dk9udfyYcqpTMS1e4qugWw0qMByin3SYibLE5JAECushXY35nbrdgE1pDpQg0b2JI+w60CEGfWWQ8feUkydF1STikD6tdBXEfwMiKqYiqH1/4d6tiH38U9e/9F4CDTx2ZiqH33gWoglLENRrcqOVKWY5+WZv/s= ## Instruction: Encrypt Travis ENV variables again [#92606056] ## Code After: sudo: false language: ruby rvm: - 2.2.2 cache: bundler bundler_args: "--without development" branches: only: - production script: mkdir -p deploy/dataset-sync-wrapper && cp -r *.html *.js bower_components deploy/dataset-sync-wrapper/ after_success: bundle exec s3_website push --site deploy env: global: - secure: JyXnozCwLHPXd5jR2TUgmLiBwJw1vRU4Ci0fcDcQWoYNGK4AV1vInUaKkQAMpqSM+OS5juDPbXcb2jZLHucfpUDrNLvSsujsFtKRjWMIcPT8ys1Y1xkp4smBcrGFc1ql8u1orBDb5hzz40dyg47MLoPK42+hdePHH/AYF/AKFrY= - secure: IMoEkkvGpyvG4n12tY50Hda/nQQ6dd+jA8Vj+LAu8RxW/nGRWtBhV/e3Pl+5kmetKUEj8Ev7wCT0S6yFUCLIeLCO/BDamj6u1C2UhyNT1uHNqqrlFztnPlrDzFWXKHdZtoRw/6/8lTvVPRDqnSLrnLn/S2QlJr/lOKHX/onInY8=
sudo: false language: ruby rvm: - 2.2.2 cache: bundler bundler_args: "--without development" branches: only: - - production ? -- + - production script: mkdir -p deploy/dataset-sync-wrapper && cp -r *.html *.js bower_components deploy/dataset-sync-wrapper/ after_success: bundle exec s3_website push --site deploy env: global: - - secure: LDIIdeO68UG3IBvrqzPTjexSbo6yUvKxuLnIp3s2MG/XgW7fK//InMDAHmjFpBSaBEN0m/DQjHt25WUXB5bekNTPbcz4Bzubc9wFBJyBfjM88ja03gFZiY9r2F6yLb65NI4NCxt5KP1HA7J+tm9qPvl9PNJJo87cRP8di8/g1WI= - - secure: PLlRxUIs9RrH9Dk9udfyYcqpTMS1e4qugWw0qMByin3SYibLE5JAECushXY35nbrdgE1pDpQg0b2JI+w60CEGfWWQ8feUkydF1STikD6tdBXEfwMiKqYiqH1/4d6tiH38U9e/9F4CDTx2ZiqH33gWoglLENRrcqOVKWY5+WZv/s= + - secure: JyXnozCwLHPXd5jR2TUgmLiBwJw1vRU4Ci0fcDcQWoYNGK4AV1vInUaKkQAMpqSM+OS5juDPbXcb2jZLHucfpUDrNLvSsujsFtKRjWMIcPT8ys1Y1xkp4smBcrGFc1ql8u1orBDb5hzz40dyg47MLoPK42+hdePHH/AYF/AKFrY= + - secure: IMoEkkvGpyvG4n12tY50Hda/nQQ6dd+jA8Vj+LAu8RxW/nGRWtBhV/e3Pl+5kmetKUEj8Ev7wCT0S6yFUCLIeLCO/BDamj6u1C2UhyNT1uHNqqrlFztnPlrDzFWXKHdZtoRw/6/8lTvVPRDqnSLrnLn/S2QlJr/lOKHX/onInY8=
6
0.4
3
3
1c23c3eae8b9e073fecb0234d3e818fc1305a54c
defdir_windows.go
defdir_windows.go
// +build windows package config import ( "os" "path" ) func defaultDirectory() string { base := path.Base(os.Args[0]) ext := path.Ext(base) drv := os.Getenv("SystemDrive") pdDir := "ProgramData" name := base[0 : len(base)-len(ext)] return path.Join(drv, pdDir, name, name) }
// +build windows package config import ( "os" "path/filepath" ) func defaultDirectory() string { base := filepath.Base(os.Args[0]) ext := filepath.Ext(base) drv := os.Getenv("SystemDrive") pdDir := "ProgramData" name := base[0 : len(base)-len(ext)] return filepath.Join(drv, pdDir, name, name) }
Use filepath in place of path for windows code.
Use filepath in place of path for windows code.
Go
mit
codemodus/config
go
## Code Before: // +build windows package config import ( "os" "path" ) func defaultDirectory() string { base := path.Base(os.Args[0]) ext := path.Ext(base) drv := os.Getenv("SystemDrive") pdDir := "ProgramData" name := base[0 : len(base)-len(ext)] return path.Join(drv, pdDir, name, name) } ## Instruction: Use filepath in place of path for windows code. ## Code After: // +build windows package config import ( "os" "path/filepath" ) func defaultDirectory() string { base := filepath.Base(os.Args[0]) ext := filepath.Ext(base) drv := os.Getenv("SystemDrive") pdDir := "ProgramData" name := base[0 : len(base)-len(ext)] return filepath.Join(drv, pdDir, name, name) }
// +build windows package config import ( "os" - "path" + "path/filepath" ) func defaultDirectory() string { - base := path.Base(os.Args[0]) + base := filepath.Base(os.Args[0]) ? ++++ - ext := path.Ext(base) + ext := filepath.Ext(base) ? ++++ drv := os.Getenv("SystemDrive") pdDir := "ProgramData" name := base[0 : len(base)-len(ext)] - return path.Join(drv, pdDir, name, name) + return filepath.Join(drv, pdDir, name, name) ? ++++ }
8
0.421053
4
4
b17d88f802302354228e28e38cb02fa3801fb4a3
README.md
README.md
ContextElement ============ ContextElement is a jQuery plugin which allows you to add an element as context item to any HTML element of your choice. It was originally designed to extend <a href="http://getbootstrap.com">Twitter Bootstrap</a> but it also runs as standalone. The events can be triggered by left-, right- or middle mouse click or by touch for touch supported devices. Usage ------------ To easily add a context element to your item, add `data-toggle="contextElement"` to the element of your choice. Then add the `data-target` attribute with the ID or the class of the element that will be shown as context element. ```html <a href="#" data-toggle="contextElement" data-target="#contextMenuExample">Rightclick me!</a> ``` More details ------------ For a detailed description with demos, visit [ContextElement's GitHub page](http://merec.github.io/context-element). Changelog ------------ #### 09-22-2013 1.0-beta Initial release.
ContextElement ============ ContextElement is a jQuery plugin which allows you to add an element as context item to any HTML element of your choice. It was originally designed to extend <a href="http://getbootstrap.com">Twitter Bootstrap</a> but it also runs as standalone. The events can be triggered by left-, right- or middle mouse click or by touch for touch supported devices. Usage ------------ To easily add a context element to your item, add `data-toggle="contextElement"` to the element of your choice. Then add the `data-target` attribute with the ID or the class of the element that will be shown as context element. ```html <a href="#" data-toggle="contextElement" data-target="#contextMenuExample">Rightclick me!</a> ``` More details ------------ For a detailed description with demos, visit [ContextElement's GitHub page](http://merec.github.io/context-element). Changelog ------------ #### 09-24-2013 1.0 * Fixed context element positioning when `source` is set. * The option `source` can now be a function that returns HTML or Text. #### 09-22-2013 Beta Initial release.
Add demo of OnDemand context element using a function as source.
Add demo of OnDemand context element using a function as source.
Markdown
mit
Merec/context-element
markdown
## Code Before: ContextElement ============ ContextElement is a jQuery plugin which allows you to add an element as context item to any HTML element of your choice. It was originally designed to extend <a href="http://getbootstrap.com">Twitter Bootstrap</a> but it also runs as standalone. The events can be triggered by left-, right- or middle mouse click or by touch for touch supported devices. Usage ------------ To easily add a context element to your item, add `data-toggle="contextElement"` to the element of your choice. Then add the `data-target` attribute with the ID or the class of the element that will be shown as context element. ```html <a href="#" data-toggle="contextElement" data-target="#contextMenuExample">Rightclick me!</a> ``` More details ------------ For a detailed description with demos, visit [ContextElement's GitHub page](http://merec.github.io/context-element). Changelog ------------ #### 09-22-2013 1.0-beta Initial release. ## Instruction: Add demo of OnDemand context element using a function as source. ## Code After: ContextElement ============ ContextElement is a jQuery plugin which allows you to add an element as context item to any HTML element of your choice. It was originally designed to extend <a href="http://getbootstrap.com">Twitter Bootstrap</a> but it also runs as standalone. The events can be triggered by left-, right- or middle mouse click or by touch for touch supported devices. Usage ------------ To easily add a context element to your item, add `data-toggle="contextElement"` to the element of your choice. Then add the `data-target` attribute with the ID or the class of the element that will be shown as context element. ```html <a href="#" data-toggle="contextElement" data-target="#contextMenuExample">Rightclick me!</a> ``` More details ------------ For a detailed description with demos, visit [ContextElement's GitHub page](http://merec.github.io/context-element). Changelog ------------ #### 09-24-2013 1.0 * Fixed context element positioning when `source` is set. * The option `source` can now be a function that returns HTML or Text. #### 09-22-2013 Beta Initial release.
ContextElement ============ ContextElement is a jQuery plugin which allows you to add an element as context item to any HTML element of your choice. It was originally designed to extend <a href="http://getbootstrap.com">Twitter Bootstrap</a> but it also runs as standalone. The events can be triggered by left-, right- or middle mouse click or by touch for touch supported devices. Usage ------------ To easily add a context element to your item, add `data-toggle="contextElement"` to the element of your choice. Then add the `data-target` attribute with the ID or the class of the element that will be shown as context element. ```html <a href="#" data-toggle="contextElement" data-target="#contextMenuExample">Rightclick me!</a> ``` More details ------------ For a detailed description with demos, visit [ContextElement's GitHub page](http://merec.github.io/context-element). Changelog ------------ + #### 09-24-2013 1.0 + * Fixed context element positioning when `source` is set. + * The option `source` can now be a function that returns HTML or Text. + - #### 09-22-2013 1.0-beta ? ^^^^^ + #### 09-22-2013 Beta ? ^ Initial release.
6
0.285714
5
1
732e0992f85d7773c355cd8ce6e87386f819b368
README.md
README.md
gm.datepickerMultiSelect ======================== gm.datepickerMultiSelect is an AngularJS module to extend UI Bootstrap's Datepicker directive to allow for multiple date selections. Simply include the module: angular.module('myApp', ['ui.bootstrap', 'gm.datepickerMultiSelect']); And use thusly: <datepicker ng-model='activeDate' multi-select='selectedDates'><datepicker> The property 'selectDates' on the controller (or its scope) then acts as a model for any dates selected in the Datepicker. NOTE: Selected dates are stored as an array of time values, not date objects. Also supports toggling. TODO: Update view when the month changes. <a href='http://plnkr.co/edit/X7josME8hpIgJDt3IibG?p=preview'>DEMO</a> ![Alt text](screenshot.png "Screenshot")
gm.datepickerMultiSelect ======================== gm.datepickerMultiSelect is an AngularJS module to extend UI Bootstrap's Datepicker directive to allow for multiple date selections. Simply include the module: angular.module('myApp', ['ui.bootstrap', 'gm.datepickerMultiSelect']); And use thusly: <datepicker ng-model='activeDate' multi-select='selectedDates'><datepicker> The property 'selectDates' on the controller (or its scope) then acts as a model for any dates selected in the Datepicker. NOTE: Selected dates are stored as an array of time values, not date objects. Also supports toggling. <a href='default.html'>DEMO</a> ![Alt text](screenshot.png "Screenshot")
Revert "Put demo on Plunker."
Revert "Put demo on Plunker." This reverts commit 547680049ad00158aada5d565270b42f757ed9a9.
Markdown
mit
brenovieira/gm.datepickerMultiSelect,spongessuck/gm.datepickerMultiSelect,spongessuck/gm.datepickerMultiSelect,brenovieira/gm.datepickerMultiSelect
markdown
## Code Before: gm.datepickerMultiSelect ======================== gm.datepickerMultiSelect is an AngularJS module to extend UI Bootstrap's Datepicker directive to allow for multiple date selections. Simply include the module: angular.module('myApp', ['ui.bootstrap', 'gm.datepickerMultiSelect']); And use thusly: <datepicker ng-model='activeDate' multi-select='selectedDates'><datepicker> The property 'selectDates' on the controller (or its scope) then acts as a model for any dates selected in the Datepicker. NOTE: Selected dates are stored as an array of time values, not date objects. Also supports toggling. TODO: Update view when the month changes. <a href='http://plnkr.co/edit/X7josME8hpIgJDt3IibG?p=preview'>DEMO</a> ![Alt text](screenshot.png "Screenshot") ## Instruction: Revert "Put demo on Plunker." This reverts commit 547680049ad00158aada5d565270b42f757ed9a9. ## Code After: gm.datepickerMultiSelect ======================== gm.datepickerMultiSelect is an AngularJS module to extend UI Bootstrap's Datepicker directive to allow for multiple date selections. Simply include the module: angular.module('myApp', ['ui.bootstrap', 'gm.datepickerMultiSelect']); And use thusly: <datepicker ng-model='activeDate' multi-select='selectedDates'><datepicker> The property 'selectDates' on the controller (or its scope) then acts as a model for any dates selected in the Datepicker. NOTE: Selected dates are stored as an array of time values, not date objects. Also supports toggling. <a href='default.html'>DEMO</a> ![Alt text](screenshot.png "Screenshot")
gm.datepickerMultiSelect ======================== gm.datepickerMultiSelect is an AngularJS module to extend UI Bootstrap's Datepicker directive to allow for multiple date selections. Simply include the module: angular.module('myApp', ['ui.bootstrap', 'gm.datepickerMultiSelect']); And use thusly: <datepicker ng-model='activeDate' multi-select='selectedDates'><datepicker> The property 'selectDates' on the controller (or its scope) then acts as a model for any dates selected in the Datepicker. NOTE: Selected dates are stored as an array of time values, not date objects. Also supports toggling. + <a href='default.html'>DEMO</a> - TODO: Update view when the month changes. - - <a href='http://plnkr.co/edit/X7josME8hpIgJDt3IibG?p=preview'>DEMO</a> ![Alt text](screenshot.png "Screenshot")
4
0.166667
1
3
a68fed9b34e1e2c8553a6a161b97a86bb65a43da
README.md
README.md
[F-Droid](https://f-droid.org/) desktop client. This is **not** a replacement for the [Android client](https://gitlab.com/fdroid/fdroidclient). While the Android client integrates with the system with regular update checks and notifications, this is a command line client that talks to connected devices via [ADB](https://developer.android.com/tools/help/adb.html). For simplicity, it tries to follow the `apt-get`/`apt-cache` commands where it makes sense such as `update`, `show`, `install` and `remove`. ### Current features * Single repo support * Update the index * List all apps * Search by keywords * Show details of an app ### Missing features * Multi-repo support * Interaction with a device via ADB: - Probably relying on the installed command `adb` - Fetch device details (Android version, architecture, ...) - Fetch installed applications - Should use a `sync` command if always fetching the data above is slow - Install, update and remove applications * Interaction with multiple devices at once via ADB: - Transfer apps and their data from one device to another * Apk caching ### Advantages over the Android client * Faster to use command line interface * Ability to batch install/update/remove without root nor system privileges * Handle multiple Android devices ### Android client features this will never have * "Update available" notifications * Run on Android with a user interface * Swap apps over WiFi or Bluetooth and local repos
[F-Droid](https://f-droid.org/) desktop client. This is **not** a replacement for the [Android client](https://gitlab.com/fdroid/fdroidclient). While the Android client integrates with the system with regular update checks and notifications, this is a command line client that talks to connected devices via [ADB](https://developer.android.com/tools/help/adb.html). For simplicity, it tries to follow the `apt-get`/`apt-cache` commands where it makes sense such as `update`, `show`, `install` and `remove`. ### Current features * Single repo support * Update the index * List all apps * Search by keywords * Show details of an app ### Missing features * Multi-repo support * Interaction with a device via ADB: - Fetch device details (Android version, architecture, ...) - Should use a `sync` command if always fetching the data above is slow - Install, update and remove applications * Interaction with multiple devices at once via ADB: - Transfer apps and their data from one device to another * Apk caching ### Advantages over the Android client * Faster to use command line interface * Ability to batch install/update/remove without root nor system privileges * Handle multiple Android devices ### Android client features this will never have * "Update available" notifications * Run on Android with a user interface * Swap apps over WiFi or Bluetooth and local repos
Remove more completed TODO items
Remove more completed TODO items
Markdown
bsd-3-clause
mvdan/fdroidcl
markdown
## Code Before: [F-Droid](https://f-droid.org/) desktop client. This is **not** a replacement for the [Android client](https://gitlab.com/fdroid/fdroidclient). While the Android client integrates with the system with regular update checks and notifications, this is a command line client that talks to connected devices via [ADB](https://developer.android.com/tools/help/adb.html). For simplicity, it tries to follow the `apt-get`/`apt-cache` commands where it makes sense such as `update`, `show`, `install` and `remove`. ### Current features * Single repo support * Update the index * List all apps * Search by keywords * Show details of an app ### Missing features * Multi-repo support * Interaction with a device via ADB: - Probably relying on the installed command `adb` - Fetch device details (Android version, architecture, ...) - Fetch installed applications - Should use a `sync` command if always fetching the data above is slow - Install, update and remove applications * Interaction with multiple devices at once via ADB: - Transfer apps and their data from one device to another * Apk caching ### Advantages over the Android client * Faster to use command line interface * Ability to batch install/update/remove without root nor system privileges * Handle multiple Android devices ### Android client features this will never have * "Update available" notifications * Run on Android with a user interface * Swap apps over WiFi or Bluetooth and local repos ## Instruction: Remove more completed TODO items ## Code After: [F-Droid](https://f-droid.org/) desktop client. This is **not** a replacement for the [Android client](https://gitlab.com/fdroid/fdroidclient). While the Android client integrates with the system with regular update checks and notifications, this is a command line client that talks to connected devices via [ADB](https://developer.android.com/tools/help/adb.html). For simplicity, it tries to follow the `apt-get`/`apt-cache` commands where it makes sense such as `update`, `show`, `install` and `remove`. ### Current features * Single repo support * Update the index * List all apps * Search by keywords * Show details of an app ### Missing features * Multi-repo support * Interaction with a device via ADB: - Fetch device details (Android version, architecture, ...) - Should use a `sync` command if always fetching the data above is slow - Install, update and remove applications * Interaction with multiple devices at once via ADB: - Transfer apps and their data from one device to another * Apk caching ### Advantages over the Android client * Faster to use command line interface * Ability to batch install/update/remove without root nor system privileges * Handle multiple Android devices ### Android client features this will never have * "Update available" notifications * Run on Android with a user interface * Swap apps over WiFi or Bluetooth and local repos
[F-Droid](https://f-droid.org/) desktop client. This is **not** a replacement for the [Android client](https://gitlab.com/fdroid/fdroidclient). While the Android client integrates with the system with regular update checks and notifications, this is a command line client that talks to connected devices via [ADB](https://developer.android.com/tools/help/adb.html). For simplicity, it tries to follow the `apt-get`/`apt-cache` commands where it makes sense such as `update`, `show`, `install` and `remove`. ### Current features * Single repo support * Update the index * List all apps * Search by keywords * Show details of an app ### Missing features * Multi-repo support * Interaction with a device via ADB: - - Probably relying on the installed command `adb` - Fetch device details (Android version, architecture, ...) - - Fetch installed applications - Should use a `sync` command if always fetching the data above is slow - Install, update and remove applications * Interaction with multiple devices at once via ADB: - Transfer apps and their data from one device to another * Apk caching ### Advantages over the Android client * Faster to use command line interface * Ability to batch install/update/remove without root nor system privileges * Handle multiple Android devices ### Android client features this will never have * "Update available" notifications * Run on Android with a user interface * Swap apps over WiFi or Bluetooth and local repos
2
0.046512
0
2
a02ed17f79bba6e948c3b38d70ed6c2adbf1d0eb
py/tables.py
py/tables.py
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text to avoid length problems time_posted = sqlalchemy.Column(sqlalchemy.Time) class Tag(Base): __tablename__ = "tags" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) name = sqlalchemy.Column(sqlalchemy.Text) #Used to relate tags to posts. class TagRelation(Base): __tablename__ = "tag_relation" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) post_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Post.__table__.columns.id)) tag_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Tag.__table__.columns.id)) #The Following tables will only be the ones added to the database ALL_TABLES = [Post, Tag, TagRelation]
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text to avoid length problems time_posted = sqlalchemy.Column(sqlalchemy.DateTime) author = sqlalchemy.Column(sqlalchemy.String) class Tag(Base): __tablename__ = "tags" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) name = sqlalchemy.Column(sqlalchemy.Text) #Used to relate tags to posts. class TagRelation(Base): __tablename__ = "tag_relation" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) post_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Post.__table__.columns.id)) tag_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Tag.__table__.columns.id)) #The Following tables will only be the ones added to the database ALL_TABLES = [Post, Tag, TagRelation]
Change type of time_posted to DATETIME and add author column
Change type of time_posted to DATETIME and add author column
Python
mit
ollien/Timpani,ollien/Timpani,ollien/Timpani
python
## Code Before: import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text to avoid length problems time_posted = sqlalchemy.Column(sqlalchemy.Time) class Tag(Base): __tablename__ = "tags" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) name = sqlalchemy.Column(sqlalchemy.Text) #Used to relate tags to posts. class TagRelation(Base): __tablename__ = "tag_relation" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) post_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Post.__table__.columns.id)) tag_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Tag.__table__.columns.id)) #The Following tables will only be the ones added to the database ALL_TABLES = [Post, Tag, TagRelation] ## Instruction: Change type of time_posted to DATETIME and add author column ## Code After: import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text to avoid length problems time_posted = sqlalchemy.Column(sqlalchemy.DateTime) author = sqlalchemy.Column(sqlalchemy.String) class Tag(Base): __tablename__ = "tags" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) name = sqlalchemy.Column(sqlalchemy.Text) #Used to relate tags to posts. class TagRelation(Base): __tablename__ = "tag_relation" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) post_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Post.__table__.columns.id)) tag_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Tag.__table__.columns.id)) #The Following tables will only be the ones added to the database ALL_TABLES = [Post, Tag, TagRelation]
import sqlalchemy import sqlalchemy.ext.declarative Base = sqlalchemy.ext.declarative.declarative_base() class Post(Base): __tablename__ = "posts" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) title = sqlalchemy.Column(sqlalchemy.String) body = sqlalchemy.Column(sqlalchemy.Text,) #Should be text to avoid length problems - time_posted = sqlalchemy.Column(sqlalchemy.Time) + time_posted = sqlalchemy.Column(sqlalchemy.DateTime) ? ++++ + author = sqlalchemy.Column(sqlalchemy.String) class Tag(Base): __tablename__ = "tags" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) name = sqlalchemy.Column(sqlalchemy.Text) #Used to relate tags to posts. class TagRelation(Base): __tablename__ = "tag_relation" id = sqlalchemy.Column(sqlalchemy.Integer, primary_key = True) post_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Post.__table__.columns.id)) tag_id = sqlalchemy.Column(sqlalchemy.Integer, sqlalchemy.ForeignKey(Tag.__table__.columns.id)) #The Following tables will only be the ones added to the database ALL_TABLES = [Post, Tag, TagRelation]
3
0.103448
2
1
2edd05638e35a95435185b9040b252e8b98893e4
app/src/main/java/com/annimon/hotarufx/bundles/InterpolatorsBundle.java
app/src/main/java/com/annimon/hotarufx/bundles/InterpolatorsBundle.java
package com.annimon.hotarufx.bundles; import com.annimon.hotarufx.lib.Context; import com.annimon.hotarufx.lib.InterpolatorValue; import java.util.HashMap; import java.util.Map; import javafx.animation.Interpolator; public class InterpolatorsBundle implements Bundle { private static final Map<String, FunctionInfo> FUNCTIONS; static { FUNCTIONS = new HashMap<>(); } @Override public Map<String, FunctionInfo> functionsInfo() { return FUNCTIONS; } @Override public void load(Context context) { Bundle.super.load(context); context.variables().put("linear", new InterpolatorValue(Interpolator.LINEAR)); context.variables().put("discrete", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("easeIn", new InterpolatorValue(Interpolator.EASE_IN)); context.variables().put("easeOut", new InterpolatorValue(Interpolator.EASE_OUT)); context.variables().put("ease", new InterpolatorValue(Interpolator.EASE_BOTH)); context.variables().put("easeBoth", new InterpolatorValue(Interpolator.EASE_BOTH)); } }
package com.annimon.hotarufx.bundles; import com.annimon.hotarufx.lib.Context; import com.annimon.hotarufx.lib.InterpolatorValue; import java.util.HashMap; import java.util.Map; import javafx.animation.Interpolator; public class InterpolatorsBundle implements Bundle { private static final Map<String, FunctionInfo> FUNCTIONS; static { FUNCTIONS = new HashMap<>(); } @Override public Map<String, FunctionInfo> functionsInfo() { return FUNCTIONS; } @Override public void load(Context context) { Bundle.super.load(context); context.variables().put("linear", new InterpolatorValue(Interpolator.LINEAR)); context.variables().put("hold", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("discrete", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("easeIn", new InterpolatorValue(Interpolator.EASE_IN)); context.variables().put("easeOut", new InterpolatorValue(Interpolator.EASE_OUT)); context.variables().put("ease", new InterpolatorValue(Interpolator.EASE_BOTH)); context.variables().put("easeBoth", new InterpolatorValue(Interpolator.EASE_BOTH)); } }
Add alias for discrete interpolator
Add alias for discrete interpolator
Java
apache-2.0
aNNiMON/HotaruFX
java
## Code Before: package com.annimon.hotarufx.bundles; import com.annimon.hotarufx.lib.Context; import com.annimon.hotarufx.lib.InterpolatorValue; import java.util.HashMap; import java.util.Map; import javafx.animation.Interpolator; public class InterpolatorsBundle implements Bundle { private static final Map<String, FunctionInfo> FUNCTIONS; static { FUNCTIONS = new HashMap<>(); } @Override public Map<String, FunctionInfo> functionsInfo() { return FUNCTIONS; } @Override public void load(Context context) { Bundle.super.load(context); context.variables().put("linear", new InterpolatorValue(Interpolator.LINEAR)); context.variables().put("discrete", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("easeIn", new InterpolatorValue(Interpolator.EASE_IN)); context.variables().put("easeOut", new InterpolatorValue(Interpolator.EASE_OUT)); context.variables().put("ease", new InterpolatorValue(Interpolator.EASE_BOTH)); context.variables().put("easeBoth", new InterpolatorValue(Interpolator.EASE_BOTH)); } } ## Instruction: Add alias for discrete interpolator ## Code After: package com.annimon.hotarufx.bundles; import com.annimon.hotarufx.lib.Context; import com.annimon.hotarufx.lib.InterpolatorValue; import java.util.HashMap; import java.util.Map; import javafx.animation.Interpolator; public class InterpolatorsBundle implements Bundle { private static final Map<String, FunctionInfo> FUNCTIONS; static { FUNCTIONS = new HashMap<>(); } @Override public Map<String, FunctionInfo> functionsInfo() { return FUNCTIONS; } @Override public void load(Context context) { Bundle.super.load(context); context.variables().put("linear", new InterpolatorValue(Interpolator.LINEAR)); context.variables().put("hold", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("discrete", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("easeIn", new InterpolatorValue(Interpolator.EASE_IN)); context.variables().put("easeOut", new InterpolatorValue(Interpolator.EASE_OUT)); context.variables().put("ease", new InterpolatorValue(Interpolator.EASE_BOTH)); context.variables().put("easeBoth", new InterpolatorValue(Interpolator.EASE_BOTH)); } }
package com.annimon.hotarufx.bundles; import com.annimon.hotarufx.lib.Context; import com.annimon.hotarufx.lib.InterpolatorValue; import java.util.HashMap; import java.util.Map; import javafx.animation.Interpolator; public class InterpolatorsBundle implements Bundle { private static final Map<String, FunctionInfo> FUNCTIONS; static { FUNCTIONS = new HashMap<>(); } @Override public Map<String, FunctionInfo> functionsInfo() { return FUNCTIONS; } @Override public void load(Context context) { Bundle.super.load(context); context.variables().put("linear", new InterpolatorValue(Interpolator.LINEAR)); + context.variables().put("hold", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("discrete", new InterpolatorValue(Interpolator.DISCRETE)); context.variables().put("easeIn", new InterpolatorValue(Interpolator.EASE_IN)); context.variables().put("easeOut", new InterpolatorValue(Interpolator.EASE_OUT)); context.variables().put("ease", new InterpolatorValue(Interpolator.EASE_BOTH)); context.variables().put("easeBoth", new InterpolatorValue(Interpolator.EASE_BOTH)); } }
1
0.032258
1
0
72ca5876f553f595582993e800708b707b956b16
EventTarget.js
EventTarget.js
/** * @author mrdoob / http://mrdoob.com * @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com> */ function EventTarget() { var listeners = {}; this.addEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) listeners[type] = listeners_type = []; if(listeners_type.indexOf(listener) === -1) listeners_type.push(listener); }; this.dispatchEvent = function(event) { var type = event.type var listenerArray = (listeners[type] || []); var dummyListener = this['on' + type]; if(typeof dummyListener == 'function') listenerArray = listenerArray.concat(dummyListener); for(var i=0,listener; listener=listenerArray[i]; i++) listener.call(this, event); }; this.removeEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) return var index = listeners_type.indexOf(listener); if(index !== -1) listeners_type.splice(index, 1); if(!listeners_type.length) delete listeners[type] }; }; if(typeof module !== 'undefined' && module.exports) module.exports = EventTarget;
/** * @author mrdoob / http://mrdoob.com * @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com> */ function EventTarget() { var listeners = {}; this.addEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) listeners[type] = listeners_type = []; for(var i=0,l; l=listeners_type[i]; i++) if(l === listener) return; listeners_type.push(listener); }; this.dispatchEvent = function(event) { var type = event.type var listenerArray = (listeners[type] || []); var dummyListener = this['on' + type]; if(typeof dummyListener == 'function') listenerArray = listenerArray.concat(dummyListener); for(var i=0,listener; listener=listenerArray[i]; i++) listener.call(this, event); }; this.removeEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) return for(var i=0,l; l=listeners_type[i]; i++) if(l === listener) { listeners_type.splice(i, 1); break; } if(!listeners_type.length) delete listeners[type] }; }; if(typeof module !== 'undefined' && module.exports) module.exports = EventTarget;
Support for Internet Explorer 8
Support for Internet Explorer 8
JavaScript
mit
ShareIt-project/EventTarget.js
javascript
## Code Before: /** * @author mrdoob / http://mrdoob.com * @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com> */ function EventTarget() { var listeners = {}; this.addEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) listeners[type] = listeners_type = []; if(listeners_type.indexOf(listener) === -1) listeners_type.push(listener); }; this.dispatchEvent = function(event) { var type = event.type var listenerArray = (listeners[type] || []); var dummyListener = this['on' + type]; if(typeof dummyListener == 'function') listenerArray = listenerArray.concat(dummyListener); for(var i=0,listener; listener=listenerArray[i]; i++) listener.call(this, event); }; this.removeEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) return var index = listeners_type.indexOf(listener); if(index !== -1) listeners_type.splice(index, 1); if(!listeners_type.length) delete listeners[type] }; }; if(typeof module !== 'undefined' && module.exports) module.exports = EventTarget; ## Instruction: Support for Internet Explorer 8 ## Code After: /** * @author mrdoob / http://mrdoob.com * @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com> */ function EventTarget() { var listeners = {}; this.addEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) listeners[type] = listeners_type = []; for(var i=0,l; l=listeners_type[i]; i++) if(l === listener) return; listeners_type.push(listener); }; this.dispatchEvent = function(event) { var type = event.type var listenerArray = (listeners[type] || []); var dummyListener = this['on' + type]; if(typeof dummyListener == 'function') listenerArray = listenerArray.concat(dummyListener); for(var i=0,listener; listener=listenerArray[i]; i++) listener.call(this, event); }; this.removeEventListener = function(type, listener) { if(!listener) return var listeners_type = listeners[type] if(listeners_type === undefined) return for(var i=0,l; l=listeners_type[i]; i++) if(l === listener) { listeners_type.splice(i, 1); break; } if(!listeners_type.length) delete listeners[type] }; }; if(typeof module !== 'undefined' && module.exports) module.exports = EventTarget;
/** * @author mrdoob / http://mrdoob.com * @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com> */ + function EventTarget() { var listeners = {}; this.addEventListener = function(type, listener) { - if(!listener) return ? ^^ + if(!listener) return ? ^^^^ - var listeners_type = listeners[type] ? ^^ + var listeners_type = listeners[type] ? ^^^^ if(listeners_type === undefined) listeners[type] = listeners_type = []; - if(listeners_type.indexOf(listener) === -1) + for(var i=0,l; l=listeners_type[i]; i++) + if(l === listener) return; + - listeners_type.push(listener); ? -- + listeners_type.push(listener); }; this.dispatchEvent = function(event) { - var type = event.type ? ^^ + var type = event.type ? ^^^^ var listenerArray = (listeners[type] || []); var dummyListener = this['on' + type]; if(typeof dummyListener == 'function') listenerArray = listenerArray.concat(dummyListener); - for(var i=0,listener; listener=listenerArray[i]; i++) ? ^^ + for(var i=0,listener; listener=listenerArray[i]; i++) ? ^^^^ listener.call(this, event); }; this.removeEventListener = function(type, listener) { - if(!listener) return ? ^^ + if(!listener) return ? ^^^^ - var listeners_type = listeners[type] ? ^^ + var listeners_type = listeners[type] ? ^^^^ - if(listeners_type === undefined) return ? ^^ + if(listeners_type === undefined) return ? ^^^^ - var index = listeners_type.indexOf(listener); - if(index !== -1) + for(var i=0,l; l=listeners_type[i]; i++) + if(l === listener) + { - listeners_type.splice(index, 1); ? ---- + listeners_type.splice(i, 1); ? ++ + break; + } - if(!listeners_type.length) ? ^^ + if(!listeners_type.length) ? ^^^^ - delete listeners[type] ? ^^^ + delete listeners[type] ? ^^^^^^ }; }; if(typeof module !== 'undefined' && module.exports) - module.exports = EventTarget; ? ^ + module.exports = EventTarget; ? ^^
36
0.679245
21
15
4902ad7ba670764bf08891a36fa2b927c23799e7
src/Providers/LaravelMixpanelServiceProvider.php
src/Providers/LaravelMixpanelServiceProvider.php
<?php namespace GeneaLabs\LaravelMixpanel\Providers; use GeneaLabs\LaravelMixpanel\LaravelMixpanel; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelEventHandler; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelUserObserver; use Illuminate\Auth\Guard; use Illuminate\Support\Facades\Event; use Illuminate\HTTP\Request; use Illuminate\Support\ServiceProvider; class LaravelMixpanelServiceProvider extends ServiceProvider { protected $defer = false; public function boot(Request $request, Guard $guard, LaravelMixpanel $mixPanel) { include __DIR__ . '/../Http/routes.php'; $this->app->make(config('auth.model'))->observe(new LaravelMixpanelUserObserver($request, $mixPanel)); $eventHandler = new LaravelMixpanelEventHandler($request, $guard, $mixPanel); Event::subscribe($eventHandler); } public function register() { $this->app->singleton(LaravelMixpanel::class); } /** * @return array */ public function provides() { return ['laravel-mixpanel']; } }
<?php namespace GeneaLabs\LaravelMixpanel\Providers; use GeneaLabs\LaravelMixpanel\LaravelMixpanel; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelEventHandler; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelUserObserver; use Illuminate\Contracts\Auth\Guard; use Illuminate\Support\Facades\Event; use Illuminate\HTTP\Request; use Illuminate\Support\ServiceProvider; class LaravelMixpanelServiceProvider extends ServiceProvider { protected $defer = false; public function boot(Request $request, Guard $guard, LaravelMixpanel $mixPanel) { include __DIR__ . '/../Http/routes.php'; $this->app->make(config('auth.model'))->observe(new LaravelMixpanelUserObserver($request, $mixPanel)); $eventHandler = new LaravelMixpanelEventHandler($request, $guard, $mixPanel); Event::subscribe($eventHandler); } public function register() { $this->app->singleton(LaravelMixpanel::class); } /** * @return array */ public function provides() { return ['laravel-mixpanel']; } }
Change Auth\Guard to use Guard Contract
Change Auth\Guard to use Guard Contract
PHP
mit
canerdogan/laravel-mixpanel,canerdogan/laravel-mixpanel,GeneaLabs/laravel-mixpanel,GeneaLabs/laravel-mixpanel,canerdogan/laravel-mixpanel
php
## Code Before: <?php namespace GeneaLabs\LaravelMixpanel\Providers; use GeneaLabs\LaravelMixpanel\LaravelMixpanel; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelEventHandler; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelUserObserver; use Illuminate\Auth\Guard; use Illuminate\Support\Facades\Event; use Illuminate\HTTP\Request; use Illuminate\Support\ServiceProvider; class LaravelMixpanelServiceProvider extends ServiceProvider { protected $defer = false; public function boot(Request $request, Guard $guard, LaravelMixpanel $mixPanel) { include __DIR__ . '/../Http/routes.php'; $this->app->make(config('auth.model'))->observe(new LaravelMixpanelUserObserver($request, $mixPanel)); $eventHandler = new LaravelMixpanelEventHandler($request, $guard, $mixPanel); Event::subscribe($eventHandler); } public function register() { $this->app->singleton(LaravelMixpanel::class); } /** * @return array */ public function provides() { return ['laravel-mixpanel']; } } ## Instruction: Change Auth\Guard to use Guard Contract ## Code After: <?php namespace GeneaLabs\LaravelMixpanel\Providers; use GeneaLabs\LaravelMixpanel\LaravelMixpanel; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelEventHandler; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelUserObserver; use Illuminate\Contracts\Auth\Guard; use Illuminate\Support\Facades\Event; use Illuminate\HTTP\Request; use Illuminate\Support\ServiceProvider; class LaravelMixpanelServiceProvider extends ServiceProvider { protected $defer = false; public function boot(Request $request, Guard $guard, LaravelMixpanel $mixPanel) { include __DIR__ . '/../Http/routes.php'; $this->app->make(config('auth.model'))->observe(new LaravelMixpanelUserObserver($request, $mixPanel)); $eventHandler = new LaravelMixpanelEventHandler($request, $guard, $mixPanel); Event::subscribe($eventHandler); } public function register() { $this->app->singleton(LaravelMixpanel::class); } /** * @return array */ public function provides() { return ['laravel-mixpanel']; } }
<?php namespace GeneaLabs\LaravelMixpanel\Providers; use GeneaLabs\LaravelMixpanel\LaravelMixpanel; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelEventHandler; use GeneaLabs\LaravelMixpanel\Listeners\LaravelMixpanelUserObserver; - use Illuminate\Auth\Guard; + use Illuminate\Contracts\Auth\Guard; ? ++++++++++ use Illuminate\Support\Facades\Event; use Illuminate\HTTP\Request; use Illuminate\Support\ServiceProvider; class LaravelMixpanelServiceProvider extends ServiceProvider { protected $defer = false; public function boot(Request $request, Guard $guard, LaravelMixpanel $mixPanel) { include __DIR__ . '/../Http/routes.php'; $this->app->make(config('auth.model'))->observe(new LaravelMixpanelUserObserver($request, $mixPanel)); $eventHandler = new LaravelMixpanelEventHandler($request, $guard, $mixPanel); Event::subscribe($eventHandler); } public function register() { $this->app->singleton(LaravelMixpanel::class); } /** * @return array */ public function provides() { return ['laravel-mixpanel']; } }
2
0.054054
1
1
ab53865d66ca40fd705aa251598458f010c47fbd
test/node_http_client.spec.coffee
test/node_http_client.spec.coffee
helpers = require('./helpers') AWS = helpers.AWS MockClient = helpers.MockClient describe 'AWS.NodeHttpClient', -> http = new AWS.NodeHttpClient() describe 'handleRequest', -> it 'emits httpError in error event', -> done = false req = new AWS.Request(endpoint: 'invalid', config: region: 'empty') resp = new AWS.Response(req) req.on 'httpError', (cbErr, cbResp) -> expect(cbErr instanceof Error).toBeTruthy() expect(cbResp).toBe(resp) done = true runs -> http.handleRequest(req, resp) waitsFor -> done
helpers = require('./helpers') AWS = helpers.AWS MockClient = helpers.MockClient describe 'AWS.NodeHttpClient', -> http = new AWS.NodeHttpClient() describe 'handleRequest', -> it 'emits httpError in error event', -> done = false endpoint = new AWS.Endpoint('http://invalid') req = new AWS.Request(endpoint: endpoint, config: region: 'empty') resp = new AWS.Response(req) req.on 'httpError', (cbErr, cbResp) -> expect(cbErr instanceof Error).toBeTruthy() expect(cbResp).toBe(resp) done = true runs -> http.handleRequest(req, resp) waitsFor -> done
Build correct endpoint in NodeHttpClient test
Build correct endpoint in NodeHttpClient test
CoffeeScript
apache-2.0
chrisradek/aws-sdk-js,GlideMe/aws-sdk-js,ugie/aws-sdk-js,prestomation/aws-sdk-js,odeke-em/aws-sdk-js,guymguym/aws-sdk-js,aws/aws-sdk-js,LiuJoyceC/aws-sdk-js,jippeholwerda/aws-sdk-js,mapbox/aws-sdk-js,jmswhll/aws-sdk-js,GlideMe/aws-sdk-js,dconnolly/aws-sdk-js,AdityaManohar/aws-sdk-js,misfitdavidl/aws-sdk-js,j3tm0t0/aws-sdk-js,misfitdavidl/aws-sdk-js,Blufe/aws-sdk-js,aws/aws-sdk-js,ugie/aws-sdk-js,MitocGroup/aws-sdk-js,odeke-em/aws-sdk-js,jippeholwerda/aws-sdk-js,guymguym/aws-sdk-js,chrisradek/aws-sdk-js,guymguym/aws-sdk-js,jeskew/aws-sdk-js,jeskew/aws-sdk-js,grimurjonsson/aws-sdk-js,guymguym/aws-sdk-js,LiuJoyceC/aws-sdk-js,mapbox/aws-sdk-js,AdityaManohar/aws-sdk-js,LiuJoyceC/aws-sdk-js,chrisradek/aws-sdk-js,jeskew/aws-sdk-js,prembasumatary/aws-sdk-js,MitocGroup/aws-sdk-js,michael-donat/aws-sdk-js,Blufe/aws-sdk-js,mapbox/aws-sdk-js,dconnolly/aws-sdk-js,aws/aws-sdk-js,jippeholwerda/aws-sdk-js,GlideMe/aws-sdk-js,prembasumatary/aws-sdk-js,grimurjonsson/aws-sdk-js,dconnolly/aws-sdk-js,j3tm0t0/aws-sdk-js,j3tm0t0/aws-sdk-js,beni55/aws-sdk-js,mohamed-kamal/aws-sdk-js,AdityaManohar/aws-sdk-js,prembasumatary/aws-sdk-js,prestomation/aws-sdk-js,jmswhll/aws-sdk-js,chrisradek/aws-sdk-js,MitocGroup/aws-sdk-js,prestomation/aws-sdk-js,ugie/aws-sdk-js,beni55/aws-sdk-js,aws/aws-sdk-js,misfitdavidl/aws-sdk-js,GlideMe/aws-sdk-js,mohamed-kamal/aws-sdk-js,jmswhll/aws-sdk-js,jeskew/aws-sdk-js,grimurjonsson/aws-sdk-js,michael-donat/aws-sdk-js,beni55/aws-sdk-js,odeke-em/aws-sdk-js,Blufe/aws-sdk-js,mohamed-kamal/aws-sdk-js,michael-donat/aws-sdk-js
coffeescript
## Code Before: helpers = require('./helpers') AWS = helpers.AWS MockClient = helpers.MockClient describe 'AWS.NodeHttpClient', -> http = new AWS.NodeHttpClient() describe 'handleRequest', -> it 'emits httpError in error event', -> done = false req = new AWS.Request(endpoint: 'invalid', config: region: 'empty') resp = new AWS.Response(req) req.on 'httpError', (cbErr, cbResp) -> expect(cbErr instanceof Error).toBeTruthy() expect(cbResp).toBe(resp) done = true runs -> http.handleRequest(req, resp) waitsFor -> done ## Instruction: Build correct endpoint in NodeHttpClient test ## Code After: helpers = require('./helpers') AWS = helpers.AWS MockClient = helpers.MockClient describe 'AWS.NodeHttpClient', -> http = new AWS.NodeHttpClient() describe 'handleRequest', -> it 'emits httpError in error event', -> done = false endpoint = new AWS.Endpoint('http://invalid') req = new AWS.Request(endpoint: endpoint, config: region: 'empty') resp = new AWS.Response(req) req.on 'httpError', (cbErr, cbResp) -> expect(cbErr instanceof Error).toBeTruthy() expect(cbResp).toBe(resp) done = true runs -> http.handleRequest(req, resp) waitsFor -> done
helpers = require('./helpers') AWS = helpers.AWS MockClient = helpers.MockClient describe 'AWS.NodeHttpClient', -> http = new AWS.NodeHttpClient() describe 'handleRequest', -> it 'emits httpError in error event', -> done = false + endpoint = new AWS.Endpoint('http://invalid') - req = new AWS.Request(endpoint: 'invalid', config: region: 'empty') ? ^ ^^^^^^ + req = new AWS.Request(endpoint: endpoint, config: region: 'empty') ? ^^^^^ ^ resp = new AWS.Response(req) req.on 'httpError', (cbErr, cbResp) -> expect(cbErr instanceof Error).toBeTruthy() expect(cbResp).toBe(resp) done = true runs -> http.handleRequest(req, resp) waitsFor -> done
3
0.15
2
1
0b6d54efdbdd66fe931fecffd5b73101357c608d
src/Symfony/Upgrade/Fixer/FormTypeFixer.php
src/Symfony/Upgrade/Fixer/FormTypeFixer.php
<?php namespace Symfony\Upgrade\Fixer; use Symfony\CS\Tokenizer\Tokens; abstract class FormTypeFixer extends AbstractFixer { protected $types = [ 'Birthday', 'Button', 'Checkbox', 'Choice', 'Collection', 'Country', 'Currency', 'DateTime', 'Email', 'File', 'Hidden', 'Integer', 'Language', 'Locale', 'Money', 'Number', 'Password', 'Percent', 'Radio', 'Range', 'Repeated', 'Reset', 'Search', 'Submit', 'Text', 'Textarea', 'Time', 'Timezone', 'Url', ]; protected function isFormType(Tokens $tokens) { return $this->extendsClass($tokens, ['Symfony', 'Component', 'Form', 'AbstractType']); } protected function addTypeUse(Tokens $tokens, $name) { $this->addUseStatement( $tokens, ['Symfony', 'Component', 'Form', 'Extension', 'Core', 'Type', ucfirst($name).'Type'] ); } }
<?php namespace Symfony\Upgrade\Fixer; use Symfony\CS\Tokenizer\Tokens; abstract class FormTypeFixer extends AbstractFixer { protected $types = [ 'Birthday', 'Button', 'Checkbox', 'Choice', 'Collection', 'Country', 'Currency', 'DateTime', 'Date', 'Email', 'File', 'Hidden', 'Integer', 'Language', 'Locale', 'Money', 'Number', 'Password', 'Percent', 'Radio', 'Range', 'Repeated', 'Reset', 'Search', 'Submit', 'Text', 'Textarea', 'Time', 'Timezone', 'Url', ]; protected function isFormType(Tokens $tokens) { return $this->extendsClass($tokens, ['Symfony', 'Component', 'Form', 'AbstractType']); } protected function addTypeUse(Tokens $tokens, $name) { $this->addUseStatement( $tokens, ['Symfony', 'Component', 'Form', 'Extension', 'Core', 'Type', ucfirst($name).'Type'] ); } }
Add missing Date form type
Add missing Date form type http://symfony.com/doc/current/reference/forms/types/date.html
PHP
mit
umpirsky/Symfony-Upgrade-Fixer
php
## Code Before: <?php namespace Symfony\Upgrade\Fixer; use Symfony\CS\Tokenizer\Tokens; abstract class FormTypeFixer extends AbstractFixer { protected $types = [ 'Birthday', 'Button', 'Checkbox', 'Choice', 'Collection', 'Country', 'Currency', 'DateTime', 'Email', 'File', 'Hidden', 'Integer', 'Language', 'Locale', 'Money', 'Number', 'Password', 'Percent', 'Radio', 'Range', 'Repeated', 'Reset', 'Search', 'Submit', 'Text', 'Textarea', 'Time', 'Timezone', 'Url', ]; protected function isFormType(Tokens $tokens) { return $this->extendsClass($tokens, ['Symfony', 'Component', 'Form', 'AbstractType']); } protected function addTypeUse(Tokens $tokens, $name) { $this->addUseStatement( $tokens, ['Symfony', 'Component', 'Form', 'Extension', 'Core', 'Type', ucfirst($name).'Type'] ); } } ## Instruction: Add missing Date form type http://symfony.com/doc/current/reference/forms/types/date.html ## Code After: <?php namespace Symfony\Upgrade\Fixer; use Symfony\CS\Tokenizer\Tokens; abstract class FormTypeFixer extends AbstractFixer { protected $types = [ 'Birthday', 'Button', 'Checkbox', 'Choice', 'Collection', 'Country', 'Currency', 'DateTime', 'Date', 'Email', 'File', 'Hidden', 'Integer', 'Language', 'Locale', 'Money', 'Number', 'Password', 'Percent', 'Radio', 'Range', 'Repeated', 'Reset', 'Search', 'Submit', 'Text', 'Textarea', 'Time', 'Timezone', 'Url', ]; protected function isFormType(Tokens $tokens) { return $this->extendsClass($tokens, ['Symfony', 'Component', 'Form', 'AbstractType']); } protected function addTypeUse(Tokens $tokens, $name) { $this->addUseStatement( $tokens, ['Symfony', 'Component', 'Form', 'Extension', 'Core', 'Type', ucfirst($name).'Type'] ); } }
<?php namespace Symfony\Upgrade\Fixer; use Symfony\CS\Tokenizer\Tokens; abstract class FormTypeFixer extends AbstractFixer { protected $types = [ 'Birthday', 'Button', 'Checkbox', 'Choice', 'Collection', 'Country', 'Currency', 'DateTime', + 'Date', 'Email', 'File', 'Hidden', 'Integer', 'Language', 'Locale', 'Money', 'Number', 'Password', 'Percent', 'Radio', 'Range', 'Repeated', 'Reset', 'Search', 'Submit', 'Text', 'Textarea', 'Time', 'Timezone', 'Url', ]; protected function isFormType(Tokens $tokens) { return $this->extendsClass($tokens, ['Symfony', 'Component', 'Form', 'AbstractType']); } protected function addTypeUse(Tokens $tokens, $name) { $this->addUseStatement( $tokens, ['Symfony', 'Component', 'Form', 'Extension', 'Core', 'Type', ucfirst($name).'Type'] ); } }
1
0.018868
1
0
f41a82ba71dc575dbd7d58b9b3ace32cab9751ed
circle.yml
circle.yml
machine: timezone: America/Argentina/Buenos_Aires ruby: version: 2.3.1 general: branches: ignore: - gh-pages checkout: pre: - git config --global user.email "bot@uqbar.org" - git config --global user.name "UqbarBot" - npm install -g bower database: override: - echo "Skipping DB section." dependencies: override: - gem install rake - bundle install --jobs=10 --retry=3 - bower install test: override: - bundle exec rake test >> failed_urls.txt deployment: publish: branch: master commands: - rake publish
machine: timezone: America/Argentina/Buenos_Aires ruby: version: 2.3.1 general: branches: ignore: - gh-pages checkout: pre: - git config --global user.email "bot@uqbar.org" - git config --global user.name "UqbarBot" - npm install -g bower database: override: - echo "Skipping DB section." dependencies: override: - gem install rake - bundle install --jobs=10 --retry=3 - bower install test: override: - bundle exec rake test >> $CIRCLE_ARTIFACTS/failed_urls.txt deployment: publish: branch: master commands: - rake publish
Move failed_urls to artifact directory
Move failed_urls to artifact directory
YAML
lgpl-2.1
uqbar-project/wiki,uqbar-project/wiki,uqbar-project/wiki,uqbar-project/wiki,uqbar-project/wiki
yaml
## Code Before: machine: timezone: America/Argentina/Buenos_Aires ruby: version: 2.3.1 general: branches: ignore: - gh-pages checkout: pre: - git config --global user.email "bot@uqbar.org" - git config --global user.name "UqbarBot" - npm install -g bower database: override: - echo "Skipping DB section." dependencies: override: - gem install rake - bundle install --jobs=10 --retry=3 - bower install test: override: - bundle exec rake test >> failed_urls.txt deployment: publish: branch: master commands: - rake publish ## Instruction: Move failed_urls to artifact directory ## Code After: machine: timezone: America/Argentina/Buenos_Aires ruby: version: 2.3.1 general: branches: ignore: - gh-pages checkout: pre: - git config --global user.email "bot@uqbar.org" - git config --global user.name "UqbarBot" - npm install -g bower database: override: - echo "Skipping DB section." dependencies: override: - gem install rake - bundle install --jobs=10 --retry=3 - bower install test: override: - bundle exec rake test >> $CIRCLE_ARTIFACTS/failed_urls.txt deployment: publish: branch: master commands: - rake publish
machine: timezone: America/Argentina/Buenos_Aires ruby: version: 2.3.1 general: branches: ignore: - gh-pages checkout: pre: - git config --global user.email "bot@uqbar.org" - git config --global user.name "UqbarBot" - npm install -g bower database: override: - echo "Skipping DB section." dependencies: override: - gem install rake - bundle install --jobs=10 --retry=3 - bower install test: override: - - bundle exec rake test >> failed_urls.txt + - bundle exec rake test >> $CIRCLE_ARTIFACTS/failed_urls.txt ? ++++++++++++++++++ deployment: publish: branch: master commands: - rake publish
2
0.055556
1
1
90effe78be49943827057b60ee6dc0b6c4ce086a
app/js/controllers.js
app/js/controllers.js
'use strict'; /* Controllers */ var cvAppControllers = angular.module('cvAppControllers', []); cvAppControllers.controller('HomeController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); cvAppControllers.controller('AboutController', ['$scope', function($scope) { $scope.name = 'Elias'; }]);
'use strict'; /* Controllers */ var cvAppControllers = angular.module('cvAppControllers', []); cvAppControllers.controller('HomeController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); cvAppControllers.controller('AboutController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); /* phonecatApp.controller('PhoneListCtrl', function ($scope, $http) { $http.get('phones/phones.json').success(function(data) { $scope.phones = data; }); $scope.orderProp = 'age'; }); */
Add tutorial http controller for reference (commented)
Add tutorial http controller for reference (commented)
JavaScript
mit
RegularSvensson/cvApp,RegularSvensson/cvApp
javascript
## Code Before: 'use strict'; /* Controllers */ var cvAppControllers = angular.module('cvAppControllers', []); cvAppControllers.controller('HomeController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); cvAppControllers.controller('AboutController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); ## Instruction: Add tutorial http controller for reference (commented) ## Code After: 'use strict'; /* Controllers */ var cvAppControllers = angular.module('cvAppControllers', []); cvAppControllers.controller('HomeController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); cvAppControllers.controller('AboutController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); /* phonecatApp.controller('PhoneListCtrl', function ($scope, $http) { $http.get('phones/phones.json').success(function(data) { $scope.phones = data; }); $scope.orderProp = 'age'; }); */
'use strict'; /* Controllers */ var cvAppControllers = angular.module('cvAppControllers', []); cvAppControllers.controller('HomeController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); cvAppControllers.controller('AboutController', ['$scope', function($scope) { $scope.name = 'Elias'; }]); + + + /* + phonecatApp.controller('PhoneListCtrl', function ($scope, $http) { + $http.get('phones/phones.json').success(function(data) { + $scope.phones = data; + }); + + $scope.orderProp = 'age'; + }); + */
11
0.846154
11
0
b823fbf12ea5744eac2d13af0f1b1596f96ff4d5
app/controllers/spree/checkout_controller_decorator.rb
app/controllers/spree/checkout_controller_decorator.rb
Spree::CheckoutController.class_eval do Spree::PermittedAttributes.checkout_attributes << :gift_code durably_decorate :update, mode: 'soft', sha: '908d25b70eff597d32ddad7876cd89d3683d6734' do if @order.update_from_params(params, permitted_checkout_attributes) if @order.gift_code.present? render :edit and return unless apply_gift_code end persist_user_address unless @order.next flash[:error] = @order.errors.full_messages.join("\n") redirect_to checkout_state_path(@order.state) and return end if @order.completed? session[:order_id] = nil flash.notice = Spree.t(:order_processed_successfully) flash[:commerce_tracking] = "nothing special" redirect_to completion_route else redirect_to checkout_state_path(@order.state) end else render :edit end end end
Spree::CheckoutController.class_eval do Spree::PermittedAttributes.checkout_attributes << :gift_code durably_decorate :update, mode: 'soft', sha: '9774bcd294f748bd6185a0c8f7d518e624b99ff7' do if @order.update_from_params(params, permitted_checkout_attributes) if @order.gift_code.present? render :edit and return unless apply_gift_code end @order.temporary_address = !params[:save_user_address] unless @order.next flash[:error] = @order.errors.full_messages.join("\n") redirect_to checkout_state_path(@order.state) and return end if @order.completed? session[:order_id] = nil flash.notice = Spree.t(:order_processed_successfully) flash[:commerce_tracking] = "nothing special" redirect_to completion_route else redirect_to checkout_state_path(@order.state) end else render :edit end end end
Update checkout decorator for Spree 2.4
Update checkout decorator for Spree 2.4 The checkout controller has changed between spree 2.2 -> 2.4, in that the address parameters now appear to be part of the order details rather than having to persist it separately. The commit that changed it in spree is: https://github.com/spree/spree/commit/7c16987c822b1ca97e2b3f781aa991e1db9697ec#diff-41759f421fa5ee0d427fec7411738b50
Ruby
bsd-3-clause
mr-ado/spree_gift_card,mr-ado/spree_gift_card,Boomkat/spree_gift_card,mr-ado/spree_gift_card,Boomkat/spree_gift_card,Boomkat/spree_gift_card
ruby
## Code Before: Spree::CheckoutController.class_eval do Spree::PermittedAttributes.checkout_attributes << :gift_code durably_decorate :update, mode: 'soft', sha: '908d25b70eff597d32ddad7876cd89d3683d6734' do if @order.update_from_params(params, permitted_checkout_attributes) if @order.gift_code.present? render :edit and return unless apply_gift_code end persist_user_address unless @order.next flash[:error] = @order.errors.full_messages.join("\n") redirect_to checkout_state_path(@order.state) and return end if @order.completed? session[:order_id] = nil flash.notice = Spree.t(:order_processed_successfully) flash[:commerce_tracking] = "nothing special" redirect_to completion_route else redirect_to checkout_state_path(@order.state) end else render :edit end end end ## Instruction: Update checkout decorator for Spree 2.4 The checkout controller has changed between spree 2.2 -> 2.4, in that the address parameters now appear to be part of the order details rather than having to persist it separately. The commit that changed it in spree is: https://github.com/spree/spree/commit/7c16987c822b1ca97e2b3f781aa991e1db9697ec#diff-41759f421fa5ee0d427fec7411738b50 ## Code After: Spree::CheckoutController.class_eval do Spree::PermittedAttributes.checkout_attributes << :gift_code durably_decorate :update, mode: 'soft', sha: '9774bcd294f748bd6185a0c8f7d518e624b99ff7' do if @order.update_from_params(params, permitted_checkout_attributes) if @order.gift_code.present? render :edit and return unless apply_gift_code end @order.temporary_address = !params[:save_user_address] unless @order.next flash[:error] = @order.errors.full_messages.join("\n") redirect_to checkout_state_path(@order.state) and return end if @order.completed? session[:order_id] = nil flash.notice = Spree.t(:order_processed_successfully) flash[:commerce_tracking] = "nothing special" redirect_to completion_route else redirect_to checkout_state_path(@order.state) end else render :edit end end end
Spree::CheckoutController.class_eval do Spree::PermittedAttributes.checkout_attributes << :gift_code - durably_decorate :update, mode: 'soft', sha: '908d25b70eff597d32ddad7876cd89d3683d6734' do + durably_decorate :update, mode: 'soft', sha: '9774bcd294f748bd6185a0c8f7d518e624b99ff7' do if @order.update_from_params(params, permitted_checkout_attributes) if @order.gift_code.present? render :edit and return unless apply_gift_code end - persist_user_address + @order.temporary_address = !params[:save_user_address] unless @order.next flash[:error] = @order.errors.full_messages.join("\n") redirect_to checkout_state_path(@order.state) and return end if @order.completed? session[:order_id] = nil flash.notice = Spree.t(:order_processed_successfully) flash[:commerce_tracking] = "nothing special" redirect_to completion_route else redirect_to checkout_state_path(@order.state) end else render :edit end end end
4
0.129032
2
2
c82f12cdda5ce8b0b700470af7120201948d0ef3
Formula/libuv.rb
Formula/libuv.rb
require 'formula' class Libuv < Formula homepage 'https://github.com/joyent/libuv' head 'https://github.com/avalanche123/libuv.git' def install system "svn", "co", "http://gyp.googlecode.com/svn/trunk", "build/gyp" system './gyp_uv -f xcode -Dtarget_arch=ia64' system 'xcodebuild', '-project', 'uv.xcodeproj', '-configuration', 'Release', '-target', 'All' cd 'include' do include.install Dir['*.h'] (include+"uv-private").install Dir['uv-private/*.h'] end lib.install 'ext/libuv/build/Release/libuv.a' lib.install 'ext/libuv/build/Release/libuv.dylib' end end
require 'formula' class Libuv < Formula homepage 'https://github.com/joyent/libuv' head 'https://github.com/avalanche123/libuv.git' def install system "svn", "co", "http://gyp.googlecode.com/svn/trunk", "build/gyp" system './gyp_uv -f xcode -Dtarget_arch=x64' system 'xcodebuild', '-project', 'uv.xcodeproj', '-configuration', 'Release', '-target', 'All' cd 'include' do include.install Dir['*.h'] (include+"uv-private").install Dir['uv-private/*.h'] end lib.install 'build/Release/libuv.a' lib.install 'build/Release/libuv.dylib' end end
Fix homebrew Formula for Mountain Lion
Fix homebrew Formula for Mountain Lion
Ruby
mit
avalanche123/uvrb,avalanche123/uvrb,avalanche123/uvrb
ruby
## Code Before: require 'formula' class Libuv < Formula homepage 'https://github.com/joyent/libuv' head 'https://github.com/avalanche123/libuv.git' def install system "svn", "co", "http://gyp.googlecode.com/svn/trunk", "build/gyp" system './gyp_uv -f xcode -Dtarget_arch=ia64' system 'xcodebuild', '-project', 'uv.xcodeproj', '-configuration', 'Release', '-target', 'All' cd 'include' do include.install Dir['*.h'] (include+"uv-private").install Dir['uv-private/*.h'] end lib.install 'ext/libuv/build/Release/libuv.a' lib.install 'ext/libuv/build/Release/libuv.dylib' end end ## Instruction: Fix homebrew Formula for Mountain Lion ## Code After: require 'formula' class Libuv < Formula homepage 'https://github.com/joyent/libuv' head 'https://github.com/avalanche123/libuv.git' def install system "svn", "co", "http://gyp.googlecode.com/svn/trunk", "build/gyp" system './gyp_uv -f xcode -Dtarget_arch=x64' system 'xcodebuild', '-project', 'uv.xcodeproj', '-configuration', 'Release', '-target', 'All' cd 'include' do include.install Dir['*.h'] (include+"uv-private").install Dir['uv-private/*.h'] end lib.install 'build/Release/libuv.a' lib.install 'build/Release/libuv.dylib' end end
require 'formula' class Libuv < Formula homepage 'https://github.com/joyent/libuv' head 'https://github.com/avalanche123/libuv.git' def install system "svn", "co", "http://gyp.googlecode.com/svn/trunk", "build/gyp" - system './gyp_uv -f xcode -Dtarget_arch=ia64' ? ^^ + system './gyp_uv -f xcode -Dtarget_arch=x64' ? ^ system 'xcodebuild', '-project', 'uv.xcodeproj', '-configuration', 'Release', '-target', 'All' cd 'include' do include.install Dir['*.h'] (include+"uv-private").install Dir['uv-private/*.h'] end - lib.install 'ext/libuv/build/Release/libuv.a' ? ---------- + lib.install 'build/Release/libuv.a' - lib.install 'ext/libuv/build/Release/libuv.dylib' ? ---------- + lib.install 'build/Release/libuv.dylib' end end
6
0.3
3
3
305bfc1d780fb315a5b421fc872ee7be301d6422
requirements/dev.txt
requirements/dev.txt
-r base.txt bumpversion==0.5.3 mypy==0.521 pylint==1.7.4 safety==1.5.1
-r base.txt bumpversion==0.5.3 mypy==0.521 pylint==1.7.4 safety==1.5.1 bandit==1.4.0
Add bandit dependency for security linting.
Add bandit dependency for security linting.
Text
apache-2.0
ahawker/ulid
text
## Code Before: -r base.txt bumpversion==0.5.3 mypy==0.521 pylint==1.7.4 safety==1.5.1 ## Instruction: Add bandit dependency for security linting. ## Code After: -r base.txt bumpversion==0.5.3 mypy==0.521 pylint==1.7.4 safety==1.5.1 bandit==1.4.0
-r base.txt bumpversion==0.5.3 mypy==0.521 pylint==1.7.4 safety==1.5.1 + bandit==1.4.0
1
0.142857
1
0
e27b1ca67fe02f6ef75d59f7708c0d7bf5038293
.travis.yml
.travis.yml
language: node_js node_js: - "4.0.0" sudo: false before_install: - cp config/config_travis-ci.js config/config.js install: - npm install services: - mongodb - redis-server
language: node_js node_js: - "4.0.0" sudo: false before_install: - cp config/config_travis-ci.js config/config.js install: - npm install services: - mongodb - redis-server notifications: email: false slack: khe:tfhhTbfsGC5sNlqxUbmU9OZF
Switch from email notifications to slack notifications from Travis
Switch from email notifications to slack notifications from Travis
YAML
mit
hacksu/kenthackenough,hacksu/kenthackenough
yaml
## Code Before: language: node_js node_js: - "4.0.0" sudo: false before_install: - cp config/config_travis-ci.js config/config.js install: - npm install services: - mongodb - redis-server ## Instruction: Switch from email notifications to slack notifications from Travis ## Code After: language: node_js node_js: - "4.0.0" sudo: false before_install: - cp config/config_travis-ci.js config/config.js install: - npm install services: - mongodb - redis-server notifications: email: false slack: khe:tfhhTbfsGC5sNlqxUbmU9OZF
language: node_js node_js: - "4.0.0" sudo: false before_install: - cp config/config_travis-ci.js config/config.js install: - npm install services: - mongodb - redis-server + + notifications: + email: false + slack: khe:tfhhTbfsGC5sNlqxUbmU9OZF
4
0.266667
4
0
8e60f3cea89f0ba82d9500ec00ec1e63a0445192
ga-tracking.js
ga-tracking.js
var gaTracker = (function(dLayer) { // Push the object to the dataLayer // Parameters: // eventName, category, action, label, Type String // value Type Number (int) var pushEventToDataLayer = function(eventName, category, action, label, value) { dLayer.push({ "event": eventName, // on GTM this would be the event that triggers the tag. "category": category, "action": action, "label": label, "value": value }); }; var isUniversalAnalytics = function(ga) { return typeof ga !== "undefined" && typeof ga.getAll === 'function' ? true : false; } var isClassicAnalytics = function(_gat) { return typeof _gat !== "undefined" && typeof _gat._getTrackers === 'function' ? true : false; } // decorate target URL for cross domain tracker. var decorateLink = function(url) { var trackers, linker; if (isUniversalAnalytics(ga)) { trackers = ga.getAll(); if (trackers.length) { linker = new window.gaplugins.Linker(trackers[0]); url = linker.decorate(url); } } if (isClassicAnalytics(_gat)) { trackers = _gat._getTrackers(); if (trackers.length) { url = trackers[0]._getLinkerUrl(url); } } return url; }; return { "event": pushEventToDataLayer, "decorateLink": decorateLink }; })(dataLayer);
var gaTracker = (function(dLayer) { // Push the object to the dataLayer // Parameters: // eventName, category, action, label, Type String // value Type Number (int) var pushEventToDataLayer = function(eventName, category, action, label, value) { dLayer.push({ "event": eventName, // on GTM this would be the event that triggers the tag. "category": category, "action": action, "label": label, "value": value }); }; var isUniversalAnalytics = function(ga) { return typeof ga !== "undefined" && typeof ga.getAll === 'function' ? true : false; }; var isClassicAnalytics = function(_gat) { return typeof _gat !== "undefined" && typeof _gat._getTrackers === 'function' ? true : false; }; // decorate target URL for cross domain tracker. var decorateLink = function(url) { var trackers, linker; if (isUniversalAnalytics(ga)) { trackers = ga.getAll(); if (trackers.length) { linker = new window.gaplugins.Linker(trackers[0]); url = linker.decorate(url); } } else if (isClassicAnalytics(_gat)) { trackers = _gat._getTrackers(); if (trackers.length) { url = trackers[0]._getLinkerUrl(url); } } return url; }; return { "event": pushEventToDataLayer, "decorateLink": decorateLink }; })(dataLayer);
Add missing semi-colons and if/else that statement
Add missing semi-colons and if/else that statement
JavaScript
mit
andymj/ga-tracking
javascript
## Code Before: var gaTracker = (function(dLayer) { // Push the object to the dataLayer // Parameters: // eventName, category, action, label, Type String // value Type Number (int) var pushEventToDataLayer = function(eventName, category, action, label, value) { dLayer.push({ "event": eventName, // on GTM this would be the event that triggers the tag. "category": category, "action": action, "label": label, "value": value }); }; var isUniversalAnalytics = function(ga) { return typeof ga !== "undefined" && typeof ga.getAll === 'function' ? true : false; } var isClassicAnalytics = function(_gat) { return typeof _gat !== "undefined" && typeof _gat._getTrackers === 'function' ? true : false; } // decorate target URL for cross domain tracker. var decorateLink = function(url) { var trackers, linker; if (isUniversalAnalytics(ga)) { trackers = ga.getAll(); if (trackers.length) { linker = new window.gaplugins.Linker(trackers[0]); url = linker.decorate(url); } } if (isClassicAnalytics(_gat)) { trackers = _gat._getTrackers(); if (trackers.length) { url = trackers[0]._getLinkerUrl(url); } } return url; }; return { "event": pushEventToDataLayer, "decorateLink": decorateLink }; })(dataLayer); ## Instruction: Add missing semi-colons and if/else that statement ## Code After: var gaTracker = (function(dLayer) { // Push the object to the dataLayer // Parameters: // eventName, category, action, label, Type String // value Type Number (int) var pushEventToDataLayer = function(eventName, category, action, label, value) { dLayer.push({ "event": eventName, // on GTM this would be the event that triggers the tag. "category": category, "action": action, "label": label, "value": value }); }; var isUniversalAnalytics = function(ga) { return typeof ga !== "undefined" && typeof ga.getAll === 'function' ? true : false; }; var isClassicAnalytics = function(_gat) { return typeof _gat !== "undefined" && typeof _gat._getTrackers === 'function' ? true : false; }; // decorate target URL for cross domain tracker. var decorateLink = function(url) { var trackers, linker; if (isUniversalAnalytics(ga)) { trackers = ga.getAll(); if (trackers.length) { linker = new window.gaplugins.Linker(trackers[0]); url = linker.decorate(url); } } else if (isClassicAnalytics(_gat)) { trackers = _gat._getTrackers(); if (trackers.length) { url = trackers[0]._getLinkerUrl(url); } } return url; }; return { "event": pushEventToDataLayer, "decorateLink": decorateLink }; })(dataLayer);
var gaTracker = (function(dLayer) { // Push the object to the dataLayer // Parameters: // eventName, category, action, label, Type String // value Type Number (int) var pushEventToDataLayer = function(eventName, category, action, label, value) { dLayer.push({ "event": eventName, // on GTM this would be the event that triggers the tag. "category": category, "action": action, "label": label, "value": value }); }; var isUniversalAnalytics = function(ga) { return typeof ga !== "undefined" && typeof ga.getAll === 'function' ? true : false; - } + }; ? + var isClassicAnalytics = function(_gat) { return typeof _gat !== "undefined" && typeof _gat._getTrackers === 'function' ? true : false; - } + }; ? + // decorate target URL for cross domain tracker. var decorateLink = function(url) { var trackers, linker; if (isUniversalAnalytics(ga)) { trackers = ga.getAll(); if (trackers.length) { linker = new window.gaplugins.Linker(trackers[0]); url = linker.decorate(url); } - } - - if (isClassicAnalytics(_gat)) { + } else if (isClassicAnalytics(_gat)) { ? +++++++ trackers = _gat._getTrackers(); if (trackers.length) { url = trackers[0]._getLinkerUrl(url); } } return url; }; return { "event": pushEventToDataLayer, "decorateLink": decorateLink }; })(dataLayer);
8
0.153846
3
5
a85d1a36c508b416c1be6552f844458792175479
ui/src/components/Toolbar/PagingButtons.jsx
ui/src/components/Toolbar/PagingButtons.jsx
import React from 'react'; import { FormattedMessage } from 'react-intl'; import { ButtonGroup, Button, AnchorButton } from "@blueprintjs/core"; import './PagingButtons.css'; export default class extends React.Component { render() { const { location: loc } = this.props; if (this.props.pageNumber && this.props.pageNumber > 0 && this.props.pageTotal && this.props.pageTotal > 0) { return ( <ButtonGroup className="PagingButtons" minimal={false} style={{float: 'left'}}> <AnchorButton href={`${(loc.hash) ? loc.hash+'&' : '#'}page=${this.props.pageNumber-1}`} icon="arrow-left" disabled={this.props.pageNumber <= 1}/> <Button disabled className="PagingText"> <FormattedMessage id="document.paging" defaultMessage="Page {pageNumber} of {pageTotal}" values={{ pageNumber: this.props.pageNumber, pageTotal: this.props.pageTotal }} /> </Button> <AnchorButton href={`${(loc.hash) ? loc.hash+'&' : '#'}page=${this.props.pageNumber+1}`} icon="arrow-right" disabled={this.props.pageNumber >= this.props.pageTotal}/> </ButtonGroup> ); } else { return null } } }
import React from 'react'; import { FormattedMessage } from 'react-intl'; import queryString from 'query-string'; import { ButtonGroup, Button, AnchorButton } from "@blueprintjs/core"; import './PagingButtons.css'; export default class extends React.Component { render() { const { pageNumber, pageTotal, location: loc } = this.props; // Preserve exsting hash value while updating any existing value for 'page' const parsedHash = queryString.parse(loc.hash); if (parsedHash.page) delete parsedHash.page parsedHash.page = pageNumber-1; const prevButtonLink = queryString.stringify(parsedHash); parsedHash.page = pageNumber+1; const nextButtonLink = queryString.stringify(parsedHash); if (pageNumber && pageNumber > 0 && pageTotal && pageTotal > 0) { return ( <ButtonGroup className="PagingButtons" minimal={false} style={{float: 'left'}}> <AnchorButton href={`#${prevButtonLink}`} icon="arrow-left" disabled={pageNumber <= 1}/> <Button disabled className="PagingText"> <FormattedMessage id="document.paging" defaultMessage="Page {pageNumber} of {pageTotal}" values={{ pageNumber: pageNumber, pageTotal: pageTotal }} /> </Button> <AnchorButton href={`#${nextButtonLink}`} icon="arrow-right" disabled={pageNumber >= pageTotal}/> </ButtonGroup> ); } else { return null } } }
Fix for paging buttons to preserve the hashpath
Fix for paging buttons to preserve the hashpath
JSX
mit
alephdata/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph
jsx
## Code Before: import React from 'react'; import { FormattedMessage } from 'react-intl'; import { ButtonGroup, Button, AnchorButton } from "@blueprintjs/core"; import './PagingButtons.css'; export default class extends React.Component { render() { const { location: loc } = this.props; if (this.props.pageNumber && this.props.pageNumber > 0 && this.props.pageTotal && this.props.pageTotal > 0) { return ( <ButtonGroup className="PagingButtons" minimal={false} style={{float: 'left'}}> <AnchorButton href={`${(loc.hash) ? loc.hash+'&' : '#'}page=${this.props.pageNumber-1}`} icon="arrow-left" disabled={this.props.pageNumber <= 1}/> <Button disabled className="PagingText"> <FormattedMessage id="document.paging" defaultMessage="Page {pageNumber} of {pageTotal}" values={{ pageNumber: this.props.pageNumber, pageTotal: this.props.pageTotal }} /> </Button> <AnchorButton href={`${(loc.hash) ? loc.hash+'&' : '#'}page=${this.props.pageNumber+1}`} icon="arrow-right" disabled={this.props.pageNumber >= this.props.pageTotal}/> </ButtonGroup> ); } else { return null } } } ## Instruction: Fix for paging buttons to preserve the hashpath ## Code After: import React from 'react'; import { FormattedMessage } from 'react-intl'; import queryString from 'query-string'; import { ButtonGroup, Button, AnchorButton } from "@blueprintjs/core"; import './PagingButtons.css'; export default class extends React.Component { render() { const { pageNumber, pageTotal, location: loc } = this.props; // Preserve exsting hash value while updating any existing value for 'page' const parsedHash = queryString.parse(loc.hash); if (parsedHash.page) delete parsedHash.page parsedHash.page = pageNumber-1; const prevButtonLink = queryString.stringify(parsedHash); parsedHash.page = pageNumber+1; const nextButtonLink = queryString.stringify(parsedHash); if (pageNumber && pageNumber > 0 && pageTotal && pageTotal > 0) { return ( <ButtonGroup className="PagingButtons" minimal={false} style={{float: 'left'}}> <AnchorButton href={`#${prevButtonLink}`} icon="arrow-left" disabled={pageNumber <= 1}/> <Button disabled className="PagingText"> <FormattedMessage id="document.paging" defaultMessage="Page {pageNumber} of {pageTotal}" values={{ pageNumber: pageNumber, pageTotal: pageTotal }} /> </Button> <AnchorButton href={`#${nextButtonLink}`} icon="arrow-right" disabled={pageNumber >= pageTotal}/> </ButtonGroup> ); } else { return null } } }
import React from 'react'; import { FormattedMessage } from 'react-intl'; + import queryString from 'query-string'; import { ButtonGroup, Button, AnchorButton } from "@blueprintjs/core"; import './PagingButtons.css'; export default class extends React.Component { render() { - const { location: loc } = this.props; + const { pageNumber, pageTotal, location: loc } = this.props; ? +++++++++++++++++++++++ + + // Preserve exsting hash value while updating any existing value for 'page' + const parsedHash = queryString.parse(loc.hash); + if (parsedHash.page) + delete parsedHash.page + + parsedHash.page = pageNumber-1; + const prevButtonLink = queryString.stringify(parsedHash); + + parsedHash.page = pageNumber+1; + const nextButtonLink = queryString.stringify(parsedHash); + - if (this.props.pageNumber && this.props.pageNumber > 0 && ? ----------- ----------- + if (pageNumber && pageNumber > 0 && - this.props.pageTotal && this.props.pageTotal > 0) { ? ----------- ----------- + pageTotal && pageTotal > 0) { return ( <ButtonGroup className="PagingButtons" minimal={false} style={{float: 'left'}}> - <AnchorButton href={`${(loc.hash) ? loc.hash+'&' : '#'}page=${this.props.pageNumber-1}`} icon="arrow-left" disabled={this.props.pageNumber <= 1}/> + <AnchorButton href={`#${prevButtonLink}`} icon="arrow-left" disabled={pageNumber <= 1}/> <Button disabled className="PagingText"> <FormattedMessage id="document.paging" defaultMessage="Page {pageNumber} of {pageTotal}" values={{ - pageNumber: this.props.pageNumber, ? ----------- + pageNumber: pageNumber, - pageTotal: this.props.pageTotal ? ----------- + pageTotal: pageTotal }} /> </Button> - <AnchorButton href={`${(loc.hash) ? loc.hash+'&' : '#'}page=${this.props.pageNumber+1}`} icon="arrow-right" disabled={this.props.pageNumber >= this.props.pageTotal}/> + <AnchorButton href={`#${nextButtonLink}`} icon="arrow-right" disabled={pageNumber >= pageTotal}/> </ButtonGroup> ); } else { return null } } }
27
0.84375
20
7
dfd3e1971606f6c2e78946e849108b1ff798fdae
app/javascript/mastodon/features/standalone/compose/index.js
app/javascript/mastodon/features/standalone/compose/index.js
import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; export default class Compose extends React.PureComponent { render () { return ( <div> <ComposeFormContainer /> <NotificationsContainer /> <LoadingBarContainer className='loading-bar' /> </div> ); } }
import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; import ModalContainer from '../../ui/containers/modal_container'; export default class Compose extends React.PureComponent { render () { return ( <div> <ComposeFormContainer /> <NotificationsContainer /> <ModalContainer /> <LoadingBarContainer className='loading-bar' /> </div> ); } }
Fix visibility modal on standalone compose
Fix visibility modal on standalone compose
JavaScript
agpl-3.0
pixiv/mastodon,pixiv/mastodon,pixiv/mastodon,pixiv/mastodon
javascript
## Code Before: import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; export default class Compose extends React.PureComponent { render () { return ( <div> <ComposeFormContainer /> <NotificationsContainer /> <LoadingBarContainer className='loading-bar' /> </div> ); } } ## Instruction: Fix visibility modal on standalone compose ## Code After: import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; import ModalContainer from '../../ui/containers/modal_container'; export default class Compose extends React.PureComponent { render () { return ( <div> <ComposeFormContainer /> <NotificationsContainer /> <ModalContainer /> <LoadingBarContainer className='loading-bar' /> </div> ); } }
import React from 'react'; import ComposeFormContainer from '../../compose/containers/compose_form_container'; import NotificationsContainer from '../../ui/containers/notifications_container'; import LoadingBarContainer from '../../ui/containers/loading_bar_container'; + import ModalContainer from '../../ui/containers/modal_container'; export default class Compose extends React.PureComponent { render () { return ( <div> <ComposeFormContainer /> <NotificationsContainer /> + <ModalContainer /> <LoadingBarContainer className='loading-bar' /> </div> ); } }
2
0.111111
2
0
e3d3893bf4cb8aa782efb05771339a0d59451fe9
xbrowse_server/base/management/commands/list_projects.py
xbrowse_server/base/management/commands/list_projects.py
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): """Command to generate a ped file for a given project""" def handle(self, *args, **options): projects = Project.objects.all() for project in projects: individuals = project.get_individuals() print("%3d families %3d individuals project id: %s" % ( len({i.get_family_id() for i in individuals} - {None,}), len(individuals), project.project_id))
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): """Command to print out basic stats on some or all projects. Optionally takes a list of project_ids. """ def handle(self, *args, **options): if args: projects = [Project.objects.get(project_id=arg) for arg in args] else: projects = Project.objects.all() for project in projects: individuals = project.get_individuals() print("%3d families: %s, %3d individuals, project id: %s. VCF files: %s \n %s" % ( len({i.get_family_id() for i in individuals} - {None,}), project.family_set.all(), len(individuals), project.project_id, project.get_all_vcf_files(), project.families_by_vcf().items() ))
Print additional stats for each projects
Print additional stats for each projects
Python
agpl-3.0
ssadedin/seqr,macarthur-lab/seqr,macarthur-lab/seqr,ssadedin/seqr,ssadedin/seqr,macarthur-lab/seqr,macarthur-lab/xbrowse,macarthur-lab/xbrowse,macarthur-lab/xbrowse,ssadedin/seqr,ssadedin/seqr,macarthur-lab/seqr,macarthur-lab/xbrowse,macarthur-lab/seqr,macarthur-lab/xbrowse,macarthur-lab/xbrowse
python
## Code Before: from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): """Command to generate a ped file for a given project""" def handle(self, *args, **options): projects = Project.objects.all() for project in projects: individuals = project.get_individuals() print("%3d families %3d individuals project id: %s" % ( len({i.get_family_id() for i in individuals} - {None,}), len(individuals), project.project_id)) ## Instruction: Print additional stats for each projects ## Code After: from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): """Command to print out basic stats on some or all projects. Optionally takes a list of project_ids. """ def handle(self, *args, **options): if args: projects = [Project.objects.get(project_id=arg) for arg in args] else: projects = Project.objects.all() for project in projects: individuals = project.get_individuals() print("%3d families: %s, %3d individuals, project id: %s. VCF files: %s \n %s" % ( len({i.get_family_id() for i in individuals} - {None,}), project.family_set.all(), len(individuals), project.project_id, project.get_all_vcf_files(), project.families_by_vcf().items() ))
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): - """Command to generate a ped file for a given project""" + """Command to print out basic stats on some or all projects. Optionally takes a list of project_ids. """ def handle(self, *args, **options): + if args: + projects = [Project.objects.get(project_id=arg) for arg in args] + else: - projects = Project.objects.all() + projects = Project.objects.all() ? ++++ + for project in projects: individuals = project.get_individuals() - print("%3d families %3d individuals project id: %s" % ( + print("%3d families: %s, %3d individuals, project id: %s. VCF files: %s \n %s" % ( ? +++++ + ++++++++++++++++++++++ len({i.get_family_id() for i in individuals} - {None,}), + project.family_set.all(), len(individuals), - project.project_id)) ? ^^ + project.project_id, ? ^ + project.get_all_vcf_files(), + project.families_by_vcf().items() + ))
16
1
12
4
c696c9590519674d1a804a52fbcf9d9730119571
.travis.yml
.travis.yml
language: php matrix: include: - php: 7.0 - php: 7.1 - php: 7.2 - php: hhvm env: - HHVMPHP7="yes" - php: hhvm env: - HHVMPHP7="no" allow_failures: - php: 7.2 - php: hhvm install: - mkdir -p build/bin - mkdir -p build/logs - curl -sS https://getcomposer.org/installer | php -- --install-dir=./build/bin - php ./build/bin/composer.phar install before_script: - "if [[ ${HHVMPHP7} == 'yes' ]]; then echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini; fi" script: - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml after_script: - wget --output-document=build/bin/ocular.phar https://scrutinizer-ci.com/ocular.phar - php ./build/bin/ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml
language: php matrix: include: - php: 7.0 - php: 7.1 - php: 7.2 - php: hhvm env: - HHVMPHP7="yes" - php: hhvm env: - HHVMPHP7="no" allow_failures: - php: hhvm install: - mkdir -p build/bin - mkdir -p build/logs - curl -sS https://getcomposer.org/installer | php -- --install-dir=./build/bin - php ./build/bin/composer.phar install before_script: - "if [[ ${HHVMPHP7} == 'yes' ]]; then echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini; fi" script: - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml after_script: - wget --output-document=build/bin/ocular.phar https://scrutinizer-ci.com/ocular.phar - php ./build/bin/ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml
Remove PHP7.2 from the list of allowed failures
Remove PHP7.2 from the list of allowed failures
YAML
mit
Adsmurai/Currency
yaml
## Code Before: language: php matrix: include: - php: 7.0 - php: 7.1 - php: 7.2 - php: hhvm env: - HHVMPHP7="yes" - php: hhvm env: - HHVMPHP7="no" allow_failures: - php: 7.2 - php: hhvm install: - mkdir -p build/bin - mkdir -p build/logs - curl -sS https://getcomposer.org/installer | php -- --install-dir=./build/bin - php ./build/bin/composer.phar install before_script: - "if [[ ${HHVMPHP7} == 'yes' ]]; then echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini; fi" script: - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml after_script: - wget --output-document=build/bin/ocular.phar https://scrutinizer-ci.com/ocular.phar - php ./build/bin/ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml ## Instruction: Remove PHP7.2 from the list of allowed failures ## Code After: language: php matrix: include: - php: 7.0 - php: 7.1 - php: 7.2 - php: hhvm env: - HHVMPHP7="yes" - php: hhvm env: - HHVMPHP7="no" allow_failures: - php: hhvm install: - mkdir -p build/bin - mkdir -p build/logs - curl -sS https://getcomposer.org/installer | php -- --install-dir=./build/bin - php ./build/bin/composer.phar install before_script: - "if [[ ${HHVMPHP7} == 'yes' ]]; then echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini; fi" script: - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml after_script: - wget --output-document=build/bin/ocular.phar https://scrutinizer-ci.com/ocular.phar - php ./build/bin/ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml
language: php matrix: include: - php: 7.0 - php: 7.1 - php: 7.2 - php: hhvm env: - HHVMPHP7="yes" - php: hhvm env: - HHVMPHP7="no" allow_failures: - - php: 7.2 - php: hhvm install: - mkdir -p build/bin - mkdir -p build/logs - curl -sS https://getcomposer.org/installer | php -- --install-dir=./build/bin - php ./build/bin/composer.phar install before_script: - "if [[ ${HHVMPHP7} == 'yes' ]]; then echo 'hhvm.php7.all=1' >> /etc/hhvm/php.ini; fi" script: - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml after_script: - wget --output-document=build/bin/ocular.phar https://scrutinizer-ci.com/ocular.phar - php ./build/bin/ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml
1
0.030303
0
1
2d1df295b396e2b7a000ab5f82afde8177a3a841
test/issue346-redundant-flags.sh
test/issue346-redundant-flags.sh
cd ${CURR_DIR}/issue346-redundant-flags ${DUB} build --bare --force --compiler=${DC} -a x86 main | grep -e "-m32 -m32" 2>&1 && exit 1 || exit 0
cd ${CURR_DIR}/issue346-redundant-flags ${DUB} build --bare --force --compiler=${DC} -a x86_64 -v main 2>&1 | grep -e "-m64 -m64" -c && exit 1 || exit 0
Fix rendundant architecture flag test.
Fix rendundant architecture flag test.
Shell
mit
rjframe/dub,gedaiu/dub,p0nce/dub,jelmansouri/dub,D-Programming-Language/dub,jeanbaptistelab/dub,xentec/dub,Geod24/dub,Flamaros/dub,grogancolin/dub
shell
## Code Before: cd ${CURR_DIR}/issue346-redundant-flags ${DUB} build --bare --force --compiler=${DC} -a x86 main | grep -e "-m32 -m32" 2>&1 && exit 1 || exit 0 ## Instruction: Fix rendundant architecture flag test. ## Code After: cd ${CURR_DIR}/issue346-redundant-flags ${DUB} build --bare --force --compiler=${DC} -a x86_64 -v main 2>&1 | grep -e "-m64 -m64" -c && exit 1 || exit 0
cd ${CURR_DIR}/issue346-redundant-flags - ${DUB} build --bare --force --compiler=${DC} -a x86 main | grep -e "-m32 -m32" 2>&1 && exit 1 || exit 0 ? ^^ ^^ ^^^^ + ${DUB} build --bare --force --compiler=${DC} -a x86_64 -v main 2>&1 | grep -e "-m64 -m64" -c && exit 1 || exit 0 ? ++++++ +++++ ^^ ^^ ^^
2
0.666667
1
1
bed13b0916edd31ad1e85bd74bea71dd8b4276fb
config/file.go
config/file.go
package config import ( "os" "syscall" ) func createOrOpenLockedFile(name string) (file *os.File, err error) { if _, err := os.Stat(name); os.IsNotExist(err) { file, err = os.Create(name) } else { file, err = os.OpenFile(name, os.O_RDWR, 0644) } if err != nil { return } if flerr := syscall.Flock(int(file.Fd()), syscall.LOCK_EX); flerr != nil { return file, flerr } return } func closeLockedFile(file *os.File) error { syscall.Flock(int(file.Fd()), syscall.LOCK_UN) return file.Close() }
package config import ( "errors" "fmt" "os" "syscall" ) type closedError struct { flockErr error fileErr error } func (ce closedError) Error() string { return fmt.Sprintf("%s, %s", ce.fileErr.Error(), ce.flockErr.Error()) } func newClosedError(flockErr, fileErr error) error { if fileErr == nil { fileErr = errors.New("no file errors") } if flockErr == nil { flockErr = errors.New("no lock errors") } return closedError{flockErr, fileErr} } func createOrOpenLockedFile(name string) (file *os.File, err error) { if _, err := os.Stat(name); os.IsNotExist(err) { file, err = os.Create(name) } else { file, err = os.OpenFile(name, os.O_RDWR, 0644) } if err != nil { return } if flockErr := syscall.Flock(int(file.Fd()), syscall.LOCK_EX); flockErr != nil { err = flockErr } return } func closeLockedFile(file *os.File) error { flockErr := syscall.Flock(int(file.Fd()), syscall.LOCK_UN) fileErr := file.Close() if flockErr != nil || fileErr != nil { return newClosedError(flockErr, fileErr) } return nil }
Handle the flock errors while closing
Handle the flock errors while closing Multierrors are nice.
Go
mit
gsamokovarov/jump
go
## Code Before: package config import ( "os" "syscall" ) func createOrOpenLockedFile(name string) (file *os.File, err error) { if _, err := os.Stat(name); os.IsNotExist(err) { file, err = os.Create(name) } else { file, err = os.OpenFile(name, os.O_RDWR, 0644) } if err != nil { return } if flerr := syscall.Flock(int(file.Fd()), syscall.LOCK_EX); flerr != nil { return file, flerr } return } func closeLockedFile(file *os.File) error { syscall.Flock(int(file.Fd()), syscall.LOCK_UN) return file.Close() } ## Instruction: Handle the flock errors while closing Multierrors are nice. ## Code After: package config import ( "errors" "fmt" "os" "syscall" ) type closedError struct { flockErr error fileErr error } func (ce closedError) Error() string { return fmt.Sprintf("%s, %s", ce.fileErr.Error(), ce.flockErr.Error()) } func newClosedError(flockErr, fileErr error) error { if fileErr == nil { fileErr = errors.New("no file errors") } if flockErr == nil { flockErr = errors.New("no lock errors") } return closedError{flockErr, fileErr} } func createOrOpenLockedFile(name string) (file *os.File, err error) { if _, err := os.Stat(name); os.IsNotExist(err) { file, err = os.Create(name) } else { file, err = os.OpenFile(name, os.O_RDWR, 0644) } if err != nil { return } if flockErr := syscall.Flock(int(file.Fd()), syscall.LOCK_EX); flockErr != nil { err = flockErr } return } func closeLockedFile(file *os.File) error { flockErr := syscall.Flock(int(file.Fd()), syscall.LOCK_UN) fileErr := file.Close() if flockErr != nil || fileErr != nil { return newClosedError(flockErr, fileErr) } return nil }
package config import ( + "errors" + "fmt" "os" "syscall" ) + + type closedError struct { + flockErr error + fileErr error + } + + func (ce closedError) Error() string { + return fmt.Sprintf("%s, %s", ce.fileErr.Error(), ce.flockErr.Error()) + } + + func newClosedError(flockErr, fileErr error) error { + if fileErr == nil { + fileErr = errors.New("no file errors") + } + + if flockErr == nil { + flockErr = errors.New("no lock errors") + } + + return closedError{flockErr, fileErr} + } func createOrOpenLockedFile(name string) (file *os.File, err error) { if _, err := os.Stat(name); os.IsNotExist(err) { file, err = os.Create(name) } else { file, err = os.OpenFile(name, os.O_RDWR, 0644) } if err != nil { return } - if flerr := syscall.Flock(int(file.Fd()), syscall.LOCK_EX); flerr != nil { ? ^ ^ + if flockErr := syscall.Flock(int(file.Fd()), syscall.LOCK_EX); flockErr != nil { ? ^^^^ ^^^^ - return file, flerr + err = flockErr } return } func closeLockedFile(file *os.File) error { - syscall.Flock(int(file.Fd()), syscall.LOCK_UN) + flockErr := syscall.Flock(int(file.Fd()), syscall.LOCK_UN) ? ++++++++++++ - return file.Close() + fileErr := file.Close() + + if flockErr != nil || fileErr != nil { + return newClosedError(flockErr, fileErr) + } + + return nil }
37
1.275862
33
4
40037f943bef5d4484b663b0d7ad2d0916b6c02a
app/src/main/java/org/stepic/droid/storage/migration/MigrationFrom67To68.kt
app/src/main/java/org/stepic/droid/storage/migration/MigrationFrom67To68.kt
package org.stepic.droid.storage.migration import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import org.stepic.droid.storage.structure.DbStructureCourse import org.stepik.android.cache.section.structure.DbStructureSection object MigrationFrom67To68 : Migration(67, 68) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE ${DbStructureCourse.TABLE_NAME} ADD COLUMN ${DbStructureCourse.Columns.IS_PROCTORED} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_DURATION_MINUTES} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.PROCTOR_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.IS_PROCTORING_CAN_BE_SCHEDULED} INTEGER") } }
package org.stepic.droid.storage.migration import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import org.stepic.droid.storage.structure.DbStructureCourse import org.stepik.android.cache.section.structure.DbStructureSection object MigrationFrom67To68 : Migration(67, 68) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE ${DbStructureCourse.TABLE_NAME} ADD COLUMN ${DbStructureCourse.Columns.IS_PROCTORED} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_DURATION_MINUTES} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.PROCTOR_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.IS_PROCTORING_CAN_BE_SCHEDULED} INTEGER") db.execSQL("CREATE TABLE IF NOT EXISTS `ExamSession` (`id` INTEGER NOT NULL, `user` INTEGER NOT NULL, `section` INTEGER NOT NULL, `beginDate` INTEGER, `endDate` INTEGER, `timeLeft` REAL NOT NULL, `randomExam` INTEGER NOT NULL, PRIMARY KEY(`id`))") db.execSQL("CREATE TABLE IF NOT EXISTS `ProctorSession` (`id` INTEGER NOT NULL, `user` INTEGER NOT NULL, `section` INTEGER NOT NULL, `createDate` INTEGER, `startUrl` TEXT NOT NULL, `stopUrl` TEXT NOT NULL, `startDate` INTEGER, `stopDate` INTEGER, `submitDate` INTEGER, `comment` TEXT NOT NULL, `score` REAL NOT NULL, PRIMARY KEY(`id`))") } }
Add table creation to migration
Add table creation to migration
Kotlin
apache-2.0
StepicOrg/stepik-android,StepicOrg/stepic-android,StepicOrg/stepik-android,StepicOrg/stepik-android,StepicOrg/stepic-android,StepicOrg/stepic-android
kotlin
## Code Before: package org.stepic.droid.storage.migration import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import org.stepic.droid.storage.structure.DbStructureCourse import org.stepik.android.cache.section.structure.DbStructureSection object MigrationFrom67To68 : Migration(67, 68) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE ${DbStructureCourse.TABLE_NAME} ADD COLUMN ${DbStructureCourse.Columns.IS_PROCTORED} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_DURATION_MINUTES} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.PROCTOR_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.IS_PROCTORING_CAN_BE_SCHEDULED} INTEGER") } } ## Instruction: Add table creation to migration ## Code After: package org.stepic.droid.storage.migration import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import org.stepic.droid.storage.structure.DbStructureCourse import org.stepik.android.cache.section.structure.DbStructureSection object MigrationFrom67To68 : Migration(67, 68) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE ${DbStructureCourse.TABLE_NAME} ADD COLUMN ${DbStructureCourse.Columns.IS_PROCTORED} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_DURATION_MINUTES} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.PROCTOR_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.IS_PROCTORING_CAN_BE_SCHEDULED} INTEGER") db.execSQL("CREATE TABLE IF NOT EXISTS `ExamSession` (`id` INTEGER NOT NULL, `user` INTEGER NOT NULL, `section` INTEGER NOT NULL, `beginDate` INTEGER, `endDate` INTEGER, `timeLeft` REAL NOT NULL, `randomExam` INTEGER NOT NULL, PRIMARY KEY(`id`))") db.execSQL("CREATE TABLE IF NOT EXISTS `ProctorSession` (`id` INTEGER NOT NULL, `user` INTEGER NOT NULL, `section` INTEGER NOT NULL, `createDate` INTEGER, `startUrl` TEXT NOT NULL, `stopUrl` TEXT NOT NULL, `startDate` INTEGER, `stopDate` INTEGER, `submitDate` INTEGER, `comment` TEXT NOT NULL, `score` REAL NOT NULL, PRIMARY KEY(`id`))") } }
package org.stepic.droid.storage.migration import androidx.room.migration.Migration import androidx.sqlite.db.SupportSQLiteDatabase import org.stepic.droid.storage.structure.DbStructureCourse import org.stepik.android.cache.section.structure.DbStructureSection object MigrationFrom67To68 : Migration(67, 68) { override fun migrate(db: SupportSQLiteDatabase) { db.execSQL("ALTER TABLE ${DbStructureCourse.TABLE_NAME} ADD COLUMN ${DbStructureCourse.Columns.IS_PROCTORED} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_DURATION_MINUTES} INTEGER") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.EXAM_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.PROCTOR_SESSION} LONG") db.execSQL("ALTER TABLE ${DbStructureSection.TABLE_NAME} ADD COLUMN ${DbStructureSection.Columns.IS_PROCTORING_CAN_BE_SCHEDULED} INTEGER") + db.execSQL("CREATE TABLE IF NOT EXISTS `ExamSession` (`id` INTEGER NOT NULL, `user` INTEGER NOT NULL, `section` INTEGER NOT NULL, `beginDate` INTEGER, `endDate` INTEGER, `timeLeft` REAL NOT NULL, `randomExam` INTEGER NOT NULL, PRIMARY KEY(`id`))") + db.execSQL("CREATE TABLE IF NOT EXISTS `ProctorSession` (`id` INTEGER NOT NULL, `user` INTEGER NOT NULL, `section` INTEGER NOT NULL, `createDate` INTEGER, `startUrl` TEXT NOT NULL, `stopUrl` TEXT NOT NULL, `startDate` INTEGER, `stopDate` INTEGER, `submitDate` INTEGER, `comment` TEXT NOT NULL, `score` REAL NOT NULL, PRIMARY KEY(`id`))") } }
2
0.125
2
0
6eb4474349917ff0fb99641ac6784002d7e5f698
cross/ubuntu-armhf.txt
cross/ubuntu-armhf.txt
name = 'linux' c = '/usr/bin/arm-linux-gnueabihf-gcc' cpp = '/usr/bin/arm-linux-gnueabihf-g++' ar = '/usr/arm-linux-gnueabihf/bin/ar' strip = '/usr/i586-mingw32msvc/bin/strip' root = '/usr/arm-linux-gnueabihf' pkg_config = '/usr/bin/arm-linux-gnueabihf-pkg-config' sizeof_int = 4 sizeof_wchar_t = 4 sizeof_void* = 4 alignment_char = 1 alignment_void* = 4 alignment_double = 4 # Don't know if this is correct... has_function_printf = true has_function_hfkerhisadf = false
name = 'linux' c = '/usr/bin/arm-linux-gnueabihf-gcc' cpp = '/usr/bin/arm-linux-gnueabihf-g++' ar = '/usr/arm-linux-gnueabihf/bin/ar' strip = '/usr/arm-linux-gnueabihf/bin/strip' root = '/usr/arm-linux-gnueabihf' pkg_config = '/usr/bin/arm-linux-gnueabihf-pkg-config' sizeof_int = 4 sizeof_wchar_t = 4 sizeof_void* = 4 alignment_char = 1 alignment_void* = 4 alignment_double = 4 # Don't know if this is correct... has_function_printf = true has_function_hfkerhisadf = false
Fix ARM strip binary path.
Fix ARM strip binary path.
Text
apache-2.0
trhd/meson,jroivas/meson,MathieuDuponchelle/meson,byon/meson,amaniak/meson,jpakkane/meson,WisniewskiP/meson,ernestask/meson,pexip/meson,mesonbuild/meson,DragoonX6/meson,wberrier/meson,fmuellner/meson,centricular/meson,evgenyz/meson,mesonbuild/meson,becm/meson,aaronp24/meson,aaronp24/meson,winksaville/meson,rhd/meson,fmuellner/meson,germandiagogomez/meson,germandiagogomez/meson,fmuellner/meson,WisniewskiP/meson,aaronp24/meson,MathieuDuponchelle/meson,winksaville/meson,QuLogic/meson,winksaville/meson,WisniewskiP/meson,pexip/meson,ernestask/meson,germandiagogomez/meson,thiblahute/meson,evgenyz/meson,wberrier/meson,becm/meson,amaniak/meson,ernestask/meson,MathieuDuponchelle/meson,mesonbuild/meson,WisniewskiP/meson,thiblahute/meson,evgenyz/meson,ernestask/meson,MathieuDuponchelle/meson,trhd/meson,byon/meson,rhd/meson,wberrier/meson,fmuellner/meson,jeandet/meson,thiblahute/meson,amaniak/meson,jpakkane/meson,evgenyz/meson,pexip/meson,jroivas/meson,WisniewskiP/meson,evgenyz/meson,amaniak/meson,centricular/meson,pexip/meson,fmuellner/meson,rhd/meson,MathieuDuponchelle/meson,QuLogic/meson,aaronp24/meson,jeandet/meson,ernestask/meson,pexip/meson,amaniak/meson,ernestask/meson,pexip/meson,wberrier/meson,thiblahute/meson,becm/meson,trhd/meson,mesonbuild/meson,winksaville/meson,centricular/meson,wberrier/meson,jeandet/meson,thiblahute/meson,mesonbuild/meson,QuLogic/meson,rhd/meson,trhd/meson,pexip/meson,MathieuDuponchelle/meson,WisniewskiP/meson,jpakkane/meson,amaniak/meson,mesonbuild/meson,jpakkane/meson,QuLogic/meson,becm/meson,jeandet/meson,jeandet/meson,wberrier/meson,yuhangwang/meson,rhd/meson,QuLogic/meson,rhd/meson,byon/meson,MathieuDuponchelle/meson,jpakkane/meson,DragoonX6/meson,aaronp24/meson,thiblahute/meson,centricular/meson,jeandet/meson,rhd/meson,thiblahute/meson,mesonbuild/meson,mesonbuild/meson,byon/meson,becm/meson,jroivas/meson,aaronp24/meson,jroivas/meson,DragoonX6/meson,WisniewskiP/meson,wberrier/meson,wberrier/meson,DragoonX6/meson,jpakkane/meson,yuhangwang/meson,becm/meson,mesonbuild/meson,germandiagogomez/meson,aaronp24/meson,winksaville/meson,trhd/meson,centricular/meson,fmuellner/meson,DragoonX6/meson,becm/meson,MathieuDuponchelle/meson,jeandet/meson,germandiagogomez/meson,winksaville/meson,ernestask/meson,trhd/meson,jpakkane/meson,ernestask/meson,jeandet/meson,fmuellner/meson,germandiagogomez/meson,byon/meson,MathieuDuponchelle/meson,aaronp24/meson,evgenyz/meson,amaniak/meson,jroivas/meson,yuhangwang/meson,winksaville/meson,ernestask/meson,yuhangwang/meson,byon/meson,pexip/meson,centricular/meson,trhd/meson,aaronp24/meson,mesonbuild/meson,centricular/meson,evgenyz/meson,fmuellner/meson,thiblahute/meson,jeandet/meson,centricular/meson,QuLogic/meson,yuhangwang/meson,trhd/meson,germandiagogomez/meson,yuhangwang/meson,becm/meson,jroivas/meson,jpakkane/meson,DragoonX6/meson,winksaville/meson,trhd/meson,pexip/meson,QuLogic/meson,becm/meson,QuLogic/meson,pexip/meson,rhd/meson,QuLogic/meson,DragoonX6/meson,becm/meson,byon/meson,jroivas/meson,jpakkane/meson,thiblahute/meson,yuhangwang/meson,fmuellner/meson
text
## Code Before: name = 'linux' c = '/usr/bin/arm-linux-gnueabihf-gcc' cpp = '/usr/bin/arm-linux-gnueabihf-g++' ar = '/usr/arm-linux-gnueabihf/bin/ar' strip = '/usr/i586-mingw32msvc/bin/strip' root = '/usr/arm-linux-gnueabihf' pkg_config = '/usr/bin/arm-linux-gnueabihf-pkg-config' sizeof_int = 4 sizeof_wchar_t = 4 sizeof_void* = 4 alignment_char = 1 alignment_void* = 4 alignment_double = 4 # Don't know if this is correct... has_function_printf = true has_function_hfkerhisadf = false ## Instruction: Fix ARM strip binary path. ## Code After: name = 'linux' c = '/usr/bin/arm-linux-gnueabihf-gcc' cpp = '/usr/bin/arm-linux-gnueabihf-g++' ar = '/usr/arm-linux-gnueabihf/bin/ar' strip = '/usr/arm-linux-gnueabihf/bin/strip' root = '/usr/arm-linux-gnueabihf' pkg_config = '/usr/bin/arm-linux-gnueabihf-pkg-config' sizeof_int = 4 sizeof_wchar_t = 4 sizeof_void* = 4 alignment_char = 1 alignment_void* = 4 alignment_double = 4 # Don't know if this is correct... has_function_printf = true has_function_hfkerhisadf = false
name = 'linux' c = '/usr/bin/arm-linux-gnueabihf-gcc' cpp = '/usr/bin/arm-linux-gnueabihf-g++' ar = '/usr/arm-linux-gnueabihf/bin/ar' - strip = '/usr/i586-mingw32msvc/bin/strip' + strip = '/usr/arm-linux-gnueabihf/bin/strip' root = '/usr/arm-linux-gnueabihf' pkg_config = '/usr/bin/arm-linux-gnueabihf-pkg-config' sizeof_int = 4 sizeof_wchar_t = 4 sizeof_void* = 4 alignment_char = 1 alignment_void* = 4 alignment_double = 4 # Don't know if this is correct... has_function_printf = true has_function_hfkerhisadf = false
2
0.105263
1
1
0ab6959493613d503d166e1ab7fbd29d73b7d810
.travis.yml
.travis.yml
sudo: false # or required language: python python: - 2.7 - 3.5 os: trusty env: - YAMBO_VERSION=4.1 PW_version=5.4 # - any combination of versions matrix: allow_failures: - python: 3.5 # Builds using this version can fail without compromising the end result fast_finish: true # Don't wait for the test on Py3.5 to finish to ack # Add to the matrix of jobs # - os: osx # language: objective-c # env: PYENV_VERSION=2.7.12 # - os: osx # language: objective-c # env: PYENV_VERSION=3.5.2 install: - "./tests/install.sh -y YAMBO_VERSION -pw PW_VERSION" script: - "./tests/run.sh" # safelist branches: only: - travis deploy: skip_cleanup: true
sudo: false # or required language: python python: - 2.7 - 3.5 os: trusty env: - YAMBO_VERSION=4.1 PW_VERSION=5.4 # - any combination of versions matrix: allow_failures: - python: 3.5 # Builds using this version can fail without compromising the end result fast_finish: true # Don't wait for the test on Py3.5 to finish to ack # Add to the matrix of jobs # - os: osx # language: objective-c # env: PYENV_VERSION=2.7.12 # - os: osx # language: objective-c # env: PYENV_VERSION=3.5.2 install: - "./tests/install.sh -y YAMBO_VERSION -pw PW_VERSION" script: - "python ./tests/test_si.py -f" # safelist branches: only: - travis deploy: skip_cleanup: true
Add call to test script
Add call to test script
YAML
bsd-3-clause
alexandremorlet/yambopy,henriquemiranda/yambopy,alexmoratalla/yambo-py,palful/yambopy,alexmoratalla/yambo-py,alexmoratalla/yambopy,palful/yambopy,alexandremorlet/yambopy,henriquemiranda/yambo-py,henriquemiranda/yambo-py,henriquemiranda/yambopy,alexmoratalla/yambopy
yaml
## Code Before: sudo: false # or required language: python python: - 2.7 - 3.5 os: trusty env: - YAMBO_VERSION=4.1 PW_version=5.4 # - any combination of versions matrix: allow_failures: - python: 3.5 # Builds using this version can fail without compromising the end result fast_finish: true # Don't wait for the test on Py3.5 to finish to ack # Add to the matrix of jobs # - os: osx # language: objective-c # env: PYENV_VERSION=2.7.12 # - os: osx # language: objective-c # env: PYENV_VERSION=3.5.2 install: - "./tests/install.sh -y YAMBO_VERSION -pw PW_VERSION" script: - "./tests/run.sh" # safelist branches: only: - travis deploy: skip_cleanup: true ## Instruction: Add call to test script ## Code After: sudo: false # or required language: python python: - 2.7 - 3.5 os: trusty env: - YAMBO_VERSION=4.1 PW_VERSION=5.4 # - any combination of versions matrix: allow_failures: - python: 3.5 # Builds using this version can fail without compromising the end result fast_finish: true # Don't wait for the test on Py3.5 to finish to ack # Add to the matrix of jobs # - os: osx # language: objective-c # env: PYENV_VERSION=2.7.12 # - os: osx # language: objective-c # env: PYENV_VERSION=3.5.2 install: - "./tests/install.sh -y YAMBO_VERSION -pw PW_VERSION" script: - "python ./tests/test_si.py -f" # safelist branches: only: - travis deploy: skip_cleanup: true
sudo: false # or required language: python python: - 2.7 - 3.5 os: trusty env: - - YAMBO_VERSION=4.1 PW_version=5.4 ? ^^^^^^^ + - YAMBO_VERSION=4.1 PW_VERSION=5.4 ? ^^^^^^^ # - any combination of versions matrix: allow_failures: - python: 3.5 # Builds using this version can fail without compromising the end result fast_finish: true # Don't wait for the test on Py3.5 to finish to ack # Add to the matrix of jobs # - os: osx # language: objective-c # env: PYENV_VERSION=2.7.12 # - os: osx # language: objective-c # env: PYENV_VERSION=3.5.2 install: - "./tests/install.sh -y YAMBO_VERSION -pw PW_VERSION" script: - - "./tests/run.sh" + - "python ./tests/test_si.py -f" # safelist branches: only: - travis deploy: skip_cleanup: true
4
0.117647
2
2
6ef4b96b2a9d50737490000039597c9a98926328
docker/tomcat-start.sh
docker/tomcat-start.sh
cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-tomcat") if [ -n "$cid" ]; then echo "Starting existing docker container $cid" docker start $cid else # Run an instance of Tomcat, mounting the WAR file to be deployed DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Running Tomcat in a docker container, stop with 'docker-stop-tomcat.sh'" docker run \ --name maven-artifact-notifier-tomcat \ --detach \ --publish 8080:8080 \ --link maven-artifact-notifier-postgres \ --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/maven-artifact-notifier.war \ --volume $DIR/configuration-docker.properties:/etc/maven-artifact-notifier/configuration.properties \ tomcat:7 fi echo "To tail Tomcat logs, run 'docker logs --follow maven-artifact-notifier-tomcat'"
cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-tomcat") if [ -n "$cid" ]; then echo "Starting existing docker container $cid" docker start $cid else # Run an instance of Tomcat, mounting the WAR file to be deployed DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Running Tomcat in a docker container, stop with 'docker-stop-tomcat.sh'" docker run \ --name maven-artifact-notifier-tomcat \ --detach \ --publish 8080:8080 \ --link maven-artifact-notifier-postgres \ --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/ROOT.war \ --volume $DIR/configuration-docker.properties:/etc/maven-artifact-notifier/configuration.properties \ tomcat:7 fi echo "To tail Tomcat logs, run 'docker logs --follow maven-artifact-notifier-tomcat'"
Deploy as ROOT context in docker
Deploy as ROOT context in docker
Shell
apache-2.0
openwide-java/artifact-listener,openwide-java/artifact-listener,openwide-java/artifact-listener
shell
## Code Before: cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-tomcat") if [ -n "$cid" ]; then echo "Starting existing docker container $cid" docker start $cid else # Run an instance of Tomcat, mounting the WAR file to be deployed DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Running Tomcat in a docker container, stop with 'docker-stop-tomcat.sh'" docker run \ --name maven-artifact-notifier-tomcat \ --detach \ --publish 8080:8080 \ --link maven-artifact-notifier-postgres \ --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/maven-artifact-notifier.war \ --volume $DIR/configuration-docker.properties:/etc/maven-artifact-notifier/configuration.properties \ tomcat:7 fi echo "To tail Tomcat logs, run 'docker logs --follow maven-artifact-notifier-tomcat'" ## Instruction: Deploy as ROOT context in docker ## Code After: cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-tomcat") if [ -n "$cid" ]; then echo "Starting existing docker container $cid" docker start $cid else # Run an instance of Tomcat, mounting the WAR file to be deployed DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Running Tomcat in a docker container, stop with 'docker-stop-tomcat.sh'" docker run \ --name maven-artifact-notifier-tomcat \ --detach \ --publish 8080:8080 \ --link maven-artifact-notifier-postgres \ --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/ROOT.war \ --volume $DIR/configuration-docker.properties:/etc/maven-artifact-notifier/configuration.properties \ tomcat:7 fi echo "To tail Tomcat logs, run 'docker logs --follow maven-artifact-notifier-tomcat'"
cid=$(docker ps --all --quiet --filter "name=maven-artifact-notifier-tomcat") if [ -n "$cid" ]; then echo "Starting existing docker container $cid" docker start $cid else # Run an instance of Tomcat, mounting the WAR file to be deployed DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Running Tomcat in a docker container, stop with 'docker-stop-tomcat.sh'" docker run \ --name maven-artifact-notifier-tomcat \ --detach \ --publish 8080:8080 \ --link maven-artifact-notifier-postgres \ - --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/maven-artifact-notifier.war \ ? ^^^^^^^^^^^^^^^^^^^^^^^ + --volume $DIR/../maven-artifact-notifier-webapp/target/maven-artifact-notifier.war:/usr/local/tomcat/webapps/ROOT.war \ ? ^^^^ --volume $DIR/configuration-docker.properties:/etc/maven-artifact-notifier/configuration.properties \ tomcat:7 fi echo "To tail Tomcat logs, run 'docker logs --follow maven-artifact-notifier-tomcat'"
2
0.1
1
1
397f55c749636347391aa860538b656b71222eb2
forms/widgets/Select.php
forms/widgets/Select.php
<?php namespace asdfstudio\admin\forms\widgets; use Yii; use yii\base\InvalidConfigException; use yii\db\ActiveQuery; use yii\helpers\Html; use asdfstudio\admin\helpers\AdminHelper; /** * Class Select * @package asdfstudio\admin\widgets * * Renders active select widget with related models */ class Select extends Base { /** * @var ActiveQuery|array */ public $query; /** * @var string */ public $labelAttribute; /** * @var array */ public $items = []; /** * @var bool */ public $multiple = false; /** * @inheritdoc */ public function init() { if ($this->query instanceof ActiveQuery) { if (!$this->labelAttribute) { throw new InvalidConfigException('Parameter "labelAttribute" is required'); } $this->items = $this->query->all(); foreach ($this->items as $i => $model) { $this->items[$i] = AdminHelper::resolveAttribute($this->labelAttribute, $model); } } parent::init(); } /** * @inheritdoc */ public function renderWidget() { return Html::activeDropDownList($this->model, $this->attribute, $this->items, [ 'class' => 'form-control', 'multiple' => $this->multiple, ]); } }
<?php namespace asdfstudio\admin\forms\widgets; use asdfstudio\admin\components\AdminFormatter; use Yii; use yii\base\InvalidConfigException; use yii\db\ActiveQuery; use yii\helpers\ArrayHelper; use yii\helpers\Html; use asdfstudio\admin\helpers\AdminHelper; /** * Class Select * @package asdfstudio\admin\widgets * * Renders active select widget with related models */ class Select extends Base { /** * @var ActiveQuery|array */ public $query; /** * @var string */ public $labelAttribute; /** * @var array */ public $items = []; /** * @var bool */ public $multiple = false; /** * @var bool Allows empty value */ public $allowEmpty = false; /** * @inheritdoc */ public function init() { if ($this->query instanceof ActiveQuery) { if (!$this->labelAttribute) { throw new InvalidConfigException('Parameter "labelAttribute" is required'); } $this->items = $this->query->all(); foreach ($this->items as $i => $model) { $this->items[$i] = AdminHelper::resolveAttribute($this->labelAttribute, $model); } } if ($this->allowEmpty) { $this->items = ArrayHelper::merge([ null => Yii::t('yii', '(not set)') ], $this->items); } parent::init(); } /** * @inheritdoc */ public function renderWidget() { return Html::activeDropDownList($this->model, $this->attribute, $this->items, [ 'class' => 'form-control', 'multiple' => $this->multiple, ]); } }
Allow empty values for select box
Allow empty values for select box
PHP
bsd-3-clause
Tecnoready/yii2-admin-module,m00nk/yii2-admin-module,Tecnoready/yii2-admin-module,m00nk/yii2-admin-module,evgkan/yii2-admin-module,Tecnoready/yii2-admin-module,evgkan/yii2-admin-module
php
## Code Before: <?php namespace asdfstudio\admin\forms\widgets; use Yii; use yii\base\InvalidConfigException; use yii\db\ActiveQuery; use yii\helpers\Html; use asdfstudio\admin\helpers\AdminHelper; /** * Class Select * @package asdfstudio\admin\widgets * * Renders active select widget with related models */ class Select extends Base { /** * @var ActiveQuery|array */ public $query; /** * @var string */ public $labelAttribute; /** * @var array */ public $items = []; /** * @var bool */ public $multiple = false; /** * @inheritdoc */ public function init() { if ($this->query instanceof ActiveQuery) { if (!$this->labelAttribute) { throw new InvalidConfigException('Parameter "labelAttribute" is required'); } $this->items = $this->query->all(); foreach ($this->items as $i => $model) { $this->items[$i] = AdminHelper::resolveAttribute($this->labelAttribute, $model); } } parent::init(); } /** * @inheritdoc */ public function renderWidget() { return Html::activeDropDownList($this->model, $this->attribute, $this->items, [ 'class' => 'form-control', 'multiple' => $this->multiple, ]); } } ## Instruction: Allow empty values for select box ## Code After: <?php namespace asdfstudio\admin\forms\widgets; use asdfstudio\admin\components\AdminFormatter; use Yii; use yii\base\InvalidConfigException; use yii\db\ActiveQuery; use yii\helpers\ArrayHelper; use yii\helpers\Html; use asdfstudio\admin\helpers\AdminHelper; /** * Class Select * @package asdfstudio\admin\widgets * * Renders active select widget with related models */ class Select extends Base { /** * @var ActiveQuery|array */ public $query; /** * @var string */ public $labelAttribute; /** * @var array */ public $items = []; /** * @var bool */ public $multiple = false; /** * @var bool Allows empty value */ public $allowEmpty = false; /** * @inheritdoc */ public function init() { if ($this->query instanceof ActiveQuery) { if (!$this->labelAttribute) { throw new InvalidConfigException('Parameter "labelAttribute" is required'); } $this->items = $this->query->all(); foreach ($this->items as $i => $model) { $this->items[$i] = AdminHelper::resolveAttribute($this->labelAttribute, $model); } } if ($this->allowEmpty) { $this->items = ArrayHelper::merge([ null => Yii::t('yii', '(not set)') ], $this->items); } parent::init(); } /** * @inheritdoc */ public function renderWidget() { return Html::activeDropDownList($this->model, $this->attribute, $this->items, [ 'class' => 'form-control', 'multiple' => $this->multiple, ]); } }
<?php namespace asdfstudio\admin\forms\widgets; + use asdfstudio\admin\components\AdminFormatter; use Yii; use yii\base\InvalidConfigException; use yii\db\ActiveQuery; + use yii\helpers\ArrayHelper; use yii\helpers\Html; use asdfstudio\admin\helpers\AdminHelper; /** * Class Select * @package asdfstudio\admin\widgets * * Renders active select widget with related models */ class Select extends Base { /** * @var ActiveQuery|array */ public $query; /** * @var string */ public $labelAttribute; /** * @var array */ public $items = []; /** * @var bool */ public $multiple = false; + /** + * @var bool Allows empty value + */ + public $allowEmpty = false; /** * @inheritdoc */ public function init() { if ($this->query instanceof ActiveQuery) { if (!$this->labelAttribute) { throw new InvalidConfigException('Parameter "labelAttribute" is required'); } $this->items = $this->query->all(); foreach ($this->items as $i => $model) { $this->items[$i] = AdminHelper::resolveAttribute($this->labelAttribute, $model); } } + if ($this->allowEmpty) { + $this->items = ArrayHelper::merge([ + null => Yii::t('yii', '(not set)') + ], $this->items); + } parent::init(); } /** * @inheritdoc */ public function renderWidget() { return Html::activeDropDownList($this->model, $this->attribute, $this->items, [ 'class' => 'form-control', 'multiple' => $this->multiple, ]); } }
11
0.174603
11
0
64242ecd3b4e04c4f7c00ab1d6184db3da7994fd
lib/infinity_test/notifications/lib_notify.rb
lib/infinity_test/notifications/lib_notify.rb
module InfinityTest module Notifications class LibNotify end end end
module InfinityTest module Notifications class LibNotify def notify(options) system "notify-send --expire-time 2000 --icon #{options[:image]} 'Ruby #{options[:title]}' '#{options[:message]}'" end end end end
Put the system command for the Lib Notify - Linux Users
Put the system command for the Lib Notify - Linux Users
Ruby
mit
tomas-stefano/infinity_test
ruby
## Code Before: module InfinityTest module Notifications class LibNotify end end end ## Instruction: Put the system command for the Lib Notify - Linux Users ## Code After: module InfinityTest module Notifications class LibNotify def notify(options) system "notify-send --expire-time 2000 --icon #{options[:image]} 'Ruby #{options[:title]}' '#{options[:message]}'" end end end end
module InfinityTest module Notifications class LibNotify - + ? + + def notify(options) + system "notify-send --expire-time 2000 --icon #{options[:image]} 'Ruby #{options[:title]}' '#{options[:message]}'" + end + end end end
6
0.857143
5
1
2425350dd59a2d0e695ca2eb6cd2beea617879a4
Form/Extension/BaseTypeExtension.php
Form/Extension/BaseTypeExtension.php
<?php /** * This file is part of the BootstrapBundle project. * * (c) 2013 Philipp Boes <mostgreedy@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace P2\Bundle\BootstrapBundle\Form\Extension; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * Class BaseTypeExtension * @package P2\Bundle\BootstrapBundle\Form\Extension */ abstract class BaseTypeExtension extends AbstractTypeExtension { /** * {@inheritDoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['horizontal'] = $options['horizontal']; $view->vars['inline'] = $options['inline']; $view->vars['grid'] = $options['grid']; } /** * {@inheritDoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults( array( 'horizontal' => true, 'inline' => false, 'grid' => array('sm' => array(4,8)), ) ); $resolver->setAllowedValues( array( 'horizontal' => array(true, false), 'inline' => array(true, false) ) ); } }
<?php /** * This file is part of the BootstrapBundle project. * * (c) 2013 Philipp Boes <mostgreedy@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace P2\Bundle\BootstrapBundle\Form\Extension; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * Class BaseTypeExtension * @package P2\Bundle\BootstrapBundle\Form\Extension */ abstract class BaseTypeExtension extends AbstractTypeExtension { /** * {@inheritDoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['horizontal'] = $options['horizontal']; $view->vars['inline'] = $options['inline']; $view->vars['grid'] = $options['grid']; } /** * {@inheritDoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults( array( 'horizontal' => true, 'inline' => false, 'grid' => array('sm' => array(4,8)), ) ); $resolver->setAllowedTypes(array('horizontal' => 'bool', 'inline' => 'bool', 'grid' => 'array')); } }
Add restriction to allowed types in base type extension
Add restriction to allowed types in base type extension
PHP
mit
phillies2k/bootstrap-bundle
php
## Code Before: <?php /** * This file is part of the BootstrapBundle project. * * (c) 2013 Philipp Boes <mostgreedy@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace P2\Bundle\BootstrapBundle\Form\Extension; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * Class BaseTypeExtension * @package P2\Bundle\BootstrapBundle\Form\Extension */ abstract class BaseTypeExtension extends AbstractTypeExtension { /** * {@inheritDoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['horizontal'] = $options['horizontal']; $view->vars['inline'] = $options['inline']; $view->vars['grid'] = $options['grid']; } /** * {@inheritDoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults( array( 'horizontal' => true, 'inline' => false, 'grid' => array('sm' => array(4,8)), ) ); $resolver->setAllowedValues( array( 'horizontal' => array(true, false), 'inline' => array(true, false) ) ); } } ## Instruction: Add restriction to allowed types in base type extension ## Code After: <?php /** * This file is part of the BootstrapBundle project. * * (c) 2013 Philipp Boes <mostgreedy@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace P2\Bundle\BootstrapBundle\Form\Extension; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * Class BaseTypeExtension * @package P2\Bundle\BootstrapBundle\Form\Extension */ abstract class BaseTypeExtension extends AbstractTypeExtension { /** * {@inheritDoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['horizontal'] = $options['horizontal']; $view->vars['inline'] = $options['inline']; $view->vars['grid'] = $options['grid']; } /** * {@inheritDoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults( array( 'horizontal' => true, 'inline' => false, 'grid' => array('sm' => array(4,8)), ) ); $resolver->setAllowedTypes(array('horizontal' => 'bool', 'inline' => 'bool', 'grid' => 'array')); } }
<?php /** * This file is part of the BootstrapBundle project. * * (c) 2013 Philipp Boes <mostgreedy@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace P2\Bundle\BootstrapBundle\Form\Extension; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** * Class BaseTypeExtension * @package P2\Bundle\BootstrapBundle\Form\Extension */ abstract class BaseTypeExtension extends AbstractTypeExtension { /** * {@inheritDoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars['horizontal'] = $options['horizontal']; $view->vars['inline'] = $options['inline']; $view->vars['grid'] = $options['grid']; } /** * {@inheritDoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults( array( 'horizontal' => true, 'inline' => false, 'grid' => array('sm' => array(4,8)), ) ); + $resolver->setAllowedTypes(array('horizontal' => 'bool', 'inline' => 'bool', 'grid' => 'array')); - $resolver->setAllowedValues( - array( - 'horizontal' => array(true, false), - 'inline' => array(true, false) - ) - ); } }
7
0.12963
1
6
43de3b8bcda0e2d8322662f733a9721c996c4f5c
examples/blog/public/index.html
examples/blog/public/index.html
<!DOCTYPE html> <html> <head> <title>Blog</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script> <script src="http://rawgithub.com/magalhas/backbone-react-component/master/lib/component.js"></script> <script src="collections/blog.js"></script> <script src="components/blog.js"></script> <style> form > * { display: block; } input[name="title"], textarea { width: 300px; } textarea { width: 300px; height: 200px; } </style> <body> <div /> <script src="boot.js"></script> </body> </head> </html>
<!DOCTYPE html> <html> <head> <title>Blog</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script> <script src="http://rawgithub.com/magalhas/backbone-react-component/master/lib/component.js"></script> <script src="collections/blog.js"></script> <script src="components/blog.js"></script> <style> form > * { display: block; } input[name="title"], textarea { width: 300px; } textarea { width: 300px; height: 200px; } </style> </head> <body> <div></div> <script src="boot.js"></script> </body> </html>
FIX HTML5 validator errors in blog example
FIX HTML5 validator errors in blog example There were several errors in public/index.html file.
HTML
mit
pandoraui/backbone-react-component,wushuyi/backbone-react-component,magalhas/backbone-react-component,gengue/backbone-react-component,ronlobo/backbone-react-component,guke001/backbone-react-component,gengue/backbone-react-component,visigoth/backbone-react-component,wushuyi/backbone-react-component,fifigyuri/backbone-react-component,pandoraui/backbone-react-component
html
## Code Before: <!DOCTYPE html> <html> <head> <title>Blog</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script> <script src="http://rawgithub.com/magalhas/backbone-react-component/master/lib/component.js"></script> <script src="collections/blog.js"></script> <script src="components/blog.js"></script> <style> form > * { display: block; } input[name="title"], textarea { width: 300px; } textarea { width: 300px; height: 200px; } </style> <body> <div /> <script src="boot.js"></script> </body> </head> </html> ## Instruction: FIX HTML5 validator errors in blog example There were several errors in public/index.html file. ## Code After: <!DOCTYPE html> <html> <head> <title>Blog</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script> <script src="http://rawgithub.com/magalhas/backbone-react-component/master/lib/component.js"></script> <script src="collections/blog.js"></script> <script src="components/blog.js"></script> <style> form > * { display: block; } input[name="title"], textarea { width: 300px; } textarea { width: 300px; height: 200px; } </style> </head> <body> <div></div> <script src="boot.js"></script> </body> </html>
<!DOCTYPE html> <html> <head> <title>Blog</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.js"></script> <script src="http://rawgithub.com/magalhas/backbone-react-component/master/lib/component.js"></script> <script src="collections/blog.js"></script> <script src="components/blog.js"></script> <style> form > * { display: block; } input[name="title"], textarea { width: 300px; } textarea { width: 300px; height: 200px; } </style> - <body> - <div /> - <script src="boot.js"></script> - </body> </head> + <body> + <div></div> + <script src="boot.js"></script> + </body> </html>
8
0.275862
4
4
7e5bc4044748de2130564ded69d3bc3618274b8a
test/test-purge.js
test/test-purge.js
require('./harness').run(); var recvCount = 0; var body = "hello world"; connection.addListener('ready', function () { puts("connected to " + connection.serverProperties.product); var e = connection.exchange('node-purge-fanout', {type: 'fanout'}); var q = connection.queue('node-purge-queue', function() { q.bind(e, "*") q.on('queueBindOk', function() { puts("publishing 1 json messages"); e.publish('ackmessage.json1', { name: 'A' }); puts('Purge queue') q.purge().addCallback(function(ok){ puts('Deleted '+ok.messageCount+' messages') assert.equal(1,ok.messageCount) puts("publishing another json messages"); e.publish('ackmessage.json2', { name: 'B' }); }) q.on('basicConsumeOk', function () { setTimeout(function () { // wait one second to receive the message, then quit connection.end(); }, 1000); }); q.subscribe({ ack: true }, function (json) { recvCount++; puts('Got message ' + JSON.stringify(json)); if (recvCount == 1) { assert.equal('B', json.name); q.shift(); } else { throw new Error('Too many message!'); } }) }) }); }); process.addListener('exit', function () { assert.equal(1, recvCount); });
require('./harness').run(); var recvCount = 0; var body = "hello world"; connection.addListener('ready', function () { puts("connected to " + connection.serverProperties.product); var e = connection.exchange('node-purge-fanout', {type: 'fanout', confirm: true}); var q = connection.queue('node-purge-queue', function() { q.bind(e, "*"); q.on('queueBindOk', function() { puts("publishing 1 json message"); e.publish('ackmessage.json1', { name: 'A' }, {}, function() { puts('Purge queue'); q.purge().addCallback(function(ok){ puts('Deleted '+ok.messageCount+' message'); assert.equal(1,ok.messageCount); puts("publishing another json message"); e.publish('ackmessage.json2', { name: 'B' }); }); q.on('basicConsumeOk', function () { setTimeout(function () { // wait one second to receive the message, then quit connection.end(); }, 1000); }); q.subscribe({ ack: true }, function (json) { recvCount++; puts('Got message ' + JSON.stringify(json)); if (recvCount == 1) { assert.equal('B', json.name); q.shift(); } else { throw new Error('Too many message!'); } }); }); }); }); }); process.addListener('exit', function () { assert.equal(1, recvCount); });
Fix race condition in purge test.
Fix race condition in purge test.
JavaScript
mit
xebitstudios/node-amqp,albert-lacki/node-amqp,zkochan/node-amqp,postwait/node-amqp,zinic/node-amqp,postwait/node-amqp,xebitstudios/node-amqp,albert-lacki/node-amqp,zinic/node-amqp,zkochan/node-amqp,postwait/node-amqp,remind101/node-amqp,remind101/node-amqp,hinson0/node-amqp,seanahn/node-amqp,seanahn/node-amqp,segmentio/node-amqp,albert-lacki/node-amqp,zkochan/node-amqp,segmentio/node-amqp,hinson0/node-amqp,hinson0/node-amqp,remind101/node-amqp,zinic/node-amqp,xebitstudios/node-amqp
javascript
## Code Before: require('./harness').run(); var recvCount = 0; var body = "hello world"; connection.addListener('ready', function () { puts("connected to " + connection.serverProperties.product); var e = connection.exchange('node-purge-fanout', {type: 'fanout'}); var q = connection.queue('node-purge-queue', function() { q.bind(e, "*") q.on('queueBindOk', function() { puts("publishing 1 json messages"); e.publish('ackmessage.json1', { name: 'A' }); puts('Purge queue') q.purge().addCallback(function(ok){ puts('Deleted '+ok.messageCount+' messages') assert.equal(1,ok.messageCount) puts("publishing another json messages"); e.publish('ackmessage.json2', { name: 'B' }); }) q.on('basicConsumeOk', function () { setTimeout(function () { // wait one second to receive the message, then quit connection.end(); }, 1000); }); q.subscribe({ ack: true }, function (json) { recvCount++; puts('Got message ' + JSON.stringify(json)); if (recvCount == 1) { assert.equal('B', json.name); q.shift(); } else { throw new Error('Too many message!'); } }) }) }); }); process.addListener('exit', function () { assert.equal(1, recvCount); }); ## Instruction: Fix race condition in purge test. ## Code After: require('./harness').run(); var recvCount = 0; var body = "hello world"; connection.addListener('ready', function () { puts("connected to " + connection.serverProperties.product); var e = connection.exchange('node-purge-fanout', {type: 'fanout', confirm: true}); var q = connection.queue('node-purge-queue', function() { q.bind(e, "*"); q.on('queueBindOk', function() { puts("publishing 1 json message"); e.publish('ackmessage.json1', { name: 'A' }, {}, function() { puts('Purge queue'); q.purge().addCallback(function(ok){ puts('Deleted '+ok.messageCount+' message'); assert.equal(1,ok.messageCount); puts("publishing another json message"); e.publish('ackmessage.json2', { name: 'B' }); }); q.on('basicConsumeOk', function () { setTimeout(function () { // wait one second to receive the message, then quit connection.end(); }, 1000); }); q.subscribe({ ack: true }, function (json) { recvCount++; puts('Got message ' + JSON.stringify(json)); if (recvCount == 1) { assert.equal('B', json.name); q.shift(); } else { throw new Error('Too many message!'); } }); }); }); }); }); process.addListener('exit', function () { assert.equal(1, recvCount); });
require('./harness').run(); var recvCount = 0; var body = "hello world"; connection.addListener('ready', function () { puts("connected to " + connection.serverProperties.product); - var e = connection.exchange('node-purge-fanout', {type: 'fanout'}); + var e = connection.exchange('node-purge-fanout', {type: 'fanout', confirm: true}); ? +++++++++++++++ var q = connection.queue('node-purge-queue', function() { - q.bind(e, "*") + q.bind(e, "*"); ? + q.on('queueBindOk', function() { - puts("publishing 1 json messages"); ? - + puts("publishing 1 json message"); - e.publish('ackmessage.json1', { name: 'A' }); - puts('Purge queue') - q.purge().addCallback(function(ok){ - puts('Deleted '+ok.messageCount+' messages') - assert.equal(1,ok.messageCount) - puts("publishing another json messages"); - e.publish('ackmessage.json2', { name: 'B' }); ? -- ^ ^ ^ + e.publish('ackmessage.json1', { name: 'A' }, {}, function() { ? ^ ^ +++++++++++++++ ^^ - }) + puts('Purge queue'); + q.purge().addCallback(function(ok){ + puts('Deleted '+ok.messageCount+' message'); + assert.equal(1,ok.messageCount); + puts("publishing another json message"); + e.publish('ackmessage.json2', { name: 'B' }); + }); + - q.on('basicConsumeOk', function () { + q.on('basicConsumeOk', function () { ? ++ - setTimeout(function () { + setTimeout(function () { ? ++ - // wait one second to receive the message, then quit + // wait one second to receive the message, then quit ? ++ - connection.end(); + connection.end(); ? ++ - }, 1000); + }, 1000); ? ++ + }); + + q.subscribe({ ack: true }, function (json) { + recvCount++; + puts('Got message ' + JSON.stringify(json)); + if (recvCount == 1) { + assert.equal('B', json.name); + q.shift(); + } else { + throw new Error('Too many message!'); + } + }); + }); + - q.subscribe({ ack: true }, function (json) { - recvCount++; - puts('Got message ' + JSON.stringify(json)); - if (recvCount == 1) { - assert.equal('B', json.name); - q.shift(); - } else { - throw new Error('Too many message!'); - } - }) - }) + }); ? + }); }); process.addListener('exit', function () { assert.equal(1, recvCount); });
59
1.229167
32
27
8e70118c0ad7b45d0cf034090dda5cdb2fbf78e0
README.md
README.md
Public repository for misc experiments ## Read the Docs documentation The documentation for this repository is written in reST (reStructuredText) [1] using Sphinx documentation system [2] and Read the Docs [3]. To create an HTML version of the docs: * Install Sphinx (using ``sudo pip install Sphinx`` or some other method) * Install readthedocs theme (using ``sudo pip install sphinx_rtd_theme`` or some other method) * From ``docs/`` directory, type ``make html`` The documentation in `docs/_build/html/index.html` can then be viewed in a web browser. [1] http://docutils.sourceforge.net/rst.html [2] http://sphinx-doc.org/ [3] https://readthedocs.org/
Public repository for misc experiments ## Read the Docs documentation The [online documentation](http://precimed-sandbox2.readthedocs.io/en/latest/) for this repository is written in reST (reStructuredText) [1] using Sphinx documentation system [2] and Read the Docs [3]. To create an HTML version of the docs: * Install Sphinx (using ``sudo pip install Sphinx`` or some other method) * Install readthedocs theme (using ``sudo pip install sphinx_rtd_theme`` or some other method) * From ``docs/`` directory, type ``make html`` The documentation in `docs/_build/html/index.html` can then be viewed in a web browser. 1. http://docutils.sourceforge.net/rst.html 2. http://sphinx-doc.org/ 3. https://readthedocs.org/
Put link to online documentation with read-the-docs
Put link to online documentation with read-the-docs
Markdown
mit
precimed/sandbox,precimed/sandbox
markdown
## Code Before: Public repository for misc experiments ## Read the Docs documentation The documentation for this repository is written in reST (reStructuredText) [1] using Sphinx documentation system [2] and Read the Docs [3]. To create an HTML version of the docs: * Install Sphinx (using ``sudo pip install Sphinx`` or some other method) * Install readthedocs theme (using ``sudo pip install sphinx_rtd_theme`` or some other method) * From ``docs/`` directory, type ``make html`` The documentation in `docs/_build/html/index.html` can then be viewed in a web browser. [1] http://docutils.sourceforge.net/rst.html [2] http://sphinx-doc.org/ [3] https://readthedocs.org/ ## Instruction: Put link to online documentation with read-the-docs ## Code After: Public repository for misc experiments ## Read the Docs documentation The [online documentation](http://precimed-sandbox2.readthedocs.io/en/latest/) for this repository is written in reST (reStructuredText) [1] using Sphinx documentation system [2] and Read the Docs [3]. To create an HTML version of the docs: * Install Sphinx (using ``sudo pip install Sphinx`` or some other method) * Install readthedocs theme (using ``sudo pip install sphinx_rtd_theme`` or some other method) * From ``docs/`` directory, type ``make html`` The documentation in `docs/_build/html/index.html` can then be viewed in a web browser. 1. http://docutils.sourceforge.net/rst.html 2. http://sphinx-doc.org/ 3. https://readthedocs.org/
Public repository for misc experiments ## Read the Docs documentation + The [online documentation](http://precimed-sandbox2.readthedocs.io/en/latest/) - The documentation for this repository is written in reST (reStructuredText) [1] ? ------------------ + for this repository is written in reST (reStructuredText) [1] using Sphinx documentation system [2] and Read the Docs [3]. To create an HTML version of the docs: * Install Sphinx (using ``sudo pip install Sphinx`` or some other method) * Install readthedocs theme (using ``sudo pip install sphinx_rtd_theme`` or some other method) * From ``docs/`` directory, type ``make html`` The documentation in `docs/_build/html/index.html` can then be viewed in a web browser. - [1] http://docutils.sourceforge.net/rst.html ? - ^ + 1. http://docutils.sourceforge.net/rst.html ? ^ - [2] http://sphinx-doc.org/ ? - ^ + 2. http://sphinx-doc.org/ ? ^ - [3] https://readthedocs.org/ ? - ^ + 3. https://readthedocs.org/ ? ^
9
0.409091
5
4
7b06f6017aaf2db96f0d4f9d441fca2c95c1d277
app/views/posts/_new.html.erb
app/views/posts/_new.html.erb
<div class="new-post large-7 columns"> <h3><strong>Write a Post</strong></h3> <%= form_for [@group,@post], remote: true do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="field"> <%= f.text_field :title, placeholder: "Title" %> </div> <div class="field"> <%= f.text_area :content, placeholder: "Compose new post..." %> </div> <%= f.submit "Post New Topic", class: "button right" %> <% end %> </div>
<div class="new-post large-7 columns"> <h3><strong>Write a Post</strong></h3> <%= form_for [@group,@post], remote: true do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="field"> <%= f.text_field :title, placeholder: "(optional) What's your post about?" %> </div> <div class="field"> <%= f.text_area :content, required: true, placeholder: "Compose new post..." %> </div> <%= f.submit "Post New Topic", class: "button right" %> <% end %> </div>
Add required content to posts
Add required content to posts
HTML+ERB
mit
calblueprint/ashby-village,calblueprint/ashby-village,calblueprint/ashby-village
html+erb
## Code Before: <div class="new-post large-7 columns"> <h3><strong>Write a Post</strong></h3> <%= form_for [@group,@post], remote: true do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="field"> <%= f.text_field :title, placeholder: "Title" %> </div> <div class="field"> <%= f.text_area :content, placeholder: "Compose new post..." %> </div> <%= f.submit "Post New Topic", class: "button right" %> <% end %> </div> ## Instruction: Add required content to posts ## Code After: <div class="new-post large-7 columns"> <h3><strong>Write a Post</strong></h3> <%= form_for [@group,@post], remote: true do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="field"> <%= f.text_field :title, placeholder: "(optional) What's your post about?" %> </div> <div class="field"> <%= f.text_area :content, required: true, placeholder: "Compose new post..." %> </div> <%= f.submit "Post New Topic", class: "button right" %> <% end %> </div>
<div class="new-post large-7 columns"> <h3><strong>Write a Post</strong></h3> <%= form_for [@group,@post], remote: true do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="field"> - <%= f.text_field :title, placeholder: "Title" %> + <%= f.text_field :title, placeholder: "(optional) What's your post about?" %> </div> <div class="field"> - <%= f.text_area :content, placeholder: "Compose new post..." %> + <%= f.text_area :content, required: true, placeholder: "Compose new post..." %> ? ++++++++++++++++ </div> <%= f.submit "Post New Topic", class: "button right" %> <% end %> </div>
4
0.307692
2
2
8fa4a056797be5d162dc104a6e6bb87db896d01d
moveit_ros/planning_interface/robot_interaction/CMakeLists.txt
moveit_ros/planning_interface/robot_interaction/CMakeLists.txt
set(MOVEIT_LIB_NAME moveit_robot_interaction) add_library(${MOVEIT_LIB_NAME} src/interactive_marker_helpers.cpp src/robot_interaction.cpp) target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS ${MOVEIT_LIB_NAME} LIBRARY DESTINATION lib) install(DIRECTORY include/ DESTINATION include) install(DIRECTORY res DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
set(MOVEIT_LIB_NAME moveit_robot_interaction) add_library(${MOVEIT_LIB_NAME} src/interactive_marker_helpers.cpp src/robot_interaction.cpp) target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS ${MOVEIT_LIB_NAME} LIBRARY DESTINATION lib) install(DIRECTORY include/ DESTINATION include) install(DIRECTORY res DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/robot_interaction)
Make it also compatible with installed version
Make it also compatible with installed version
Text
bsd-3-clause
v4hn/moveit,v4hn/moveit,davetcoleman/moveit,v4hn/moveit,davetcoleman/moveit,ros-planning/moveit,ros-planning/moveit,v4hn/moveit,davetcoleman/moveit,ros-planning/moveit,ros-planning/moveit,davetcoleman/moveit,ros-planning/moveit
text
## Code Before: set(MOVEIT_LIB_NAME moveit_robot_interaction) add_library(${MOVEIT_LIB_NAME} src/interactive_marker_helpers.cpp src/robot_interaction.cpp) target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS ${MOVEIT_LIB_NAME} LIBRARY DESTINATION lib) install(DIRECTORY include/ DESTINATION include) install(DIRECTORY res DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) ## Instruction: Make it also compatible with installed version ## Code After: set(MOVEIT_LIB_NAME moveit_robot_interaction) add_library(${MOVEIT_LIB_NAME} src/interactive_marker_helpers.cpp src/robot_interaction.cpp) target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS ${MOVEIT_LIB_NAME} LIBRARY DESTINATION lib) install(DIRECTORY include/ DESTINATION include) install(DIRECTORY res DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/robot_interaction)
set(MOVEIT_LIB_NAME moveit_robot_interaction) add_library(${MOVEIT_LIB_NAME} src/interactive_marker_helpers.cpp src/robot_interaction.cpp) target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS ${MOVEIT_LIB_NAME} LIBRARY DESTINATION lib) install(DIRECTORY include/ DESTINATION include) - install(DIRECTORY res DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) + install(DIRECTORY res DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/robot_interaction) ? ++++++++++++++++++
2
0.181818
1
1
fb9c2e90d5cefe4a5075de8ce6a652d610398081
app/controllers/letsencrypt_controller.rb
app/controllers/letsencrypt_controller.rb
class LetsencryptController < ApplicationController def verify render text: '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE.HGKAemL2fUjIRadTuQf-sqPIqvo2JUZKqjZzg1u2D0U' end end
class LetsencryptController < ApplicationController def verify if params[:id] == '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE' render text: '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE.HGKAemL2fUjIRadTuQf-sqPIqvo2JUZKqjZzg1u2D0U' end end end
Use a new letsencrypt key.
Use a new letsencrypt key.
Ruby
mit
joshpeterson/summa,joshpeterson/summa,joshpeterson/summa,joshpeterson/summa
ruby
## Code Before: class LetsencryptController < ApplicationController def verify render text: '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE.HGKAemL2fUjIRadTuQf-sqPIqvo2JUZKqjZzg1u2D0U' end end ## Instruction: Use a new letsencrypt key. ## Code After: class LetsencryptController < ApplicationController def verify if params[:id] == '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE' render text: '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE.HGKAemL2fUjIRadTuQf-sqPIqvo2JUZKqjZzg1u2D0U' end end end
class LetsencryptController < ApplicationController def verify + if params[:id] == '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE' - render text: '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE.HGKAemL2fUjIRadTuQf-sqPIqvo2JUZKqjZzg1u2D0U' + render text: '-Pk_eaIGfnFWuM5fv8n3t9kFCbM-EfjA-IqPO_PfVfE.HGKAemL2fUjIRadTuQf-sqPIqvo2JUZKqjZzg1u2D0U' ? ++ + end end end
4
0.8
3
1
98451ff19563b042fdc1135da6895b9001fe1bb1
src/Fyuze/Kernel/Application/Web.php
src/Fyuze/Kernel/Application/Web.php
<?php namespace Fyuze\Kernel\Application; use Fyuze\Http\Kernel; use Fyuze\Http\Request; use Fyuze\Http\Response; use Fyuze\Kernel\Fyuze; use Symfony\Component\HttpKernel\Controller\ControllerResolver; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; class Web extends Fyuze { /** * @return Response */ public function boot($request = null) { $request = $this->getRegistry()->make('Fyuze\Http\Request'); $routes = include $this->path . '/routes.php'; $context = new RequestContext(); $matcher = new UrlMatcher($routes, $context); $resolver = new ControllerResolver(); $kernel = new Kernel($matcher, $resolver); return $kernel->handle($request); } }
<?php namespace Fyuze\Kernel\Application; use Fyuze\Http\Kernel; use Fyuze\Http\Request; use Fyuze\Http\Response; use Fyuze\Kernel\Fyuze; use Symfony\Component\HttpKernel\Controller\ControllerResolver; use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpKernel\HttpCache\Store; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; class Web extends Fyuze { /** * @return Response */ public function boot($request = null) { $request = $this->getRegistry()->make('Fyuze\Http\Request'); $routes = include $this->path . '/routes.php'; $context = new RequestContext(); $matcher = new UrlMatcher($routes, $context); $resolver = new ControllerResolver(); $kernel = new Kernel($matcher, $resolver); $kernel = new HttpCache($kernel, new Store($this->path.'/app/cache')); return $kernel->handle($request); } }
Add HttpCache to web application
Add HttpCache to web application
PHP
mit
fyuze/framework,fyuze/framework
php
## Code Before: <?php namespace Fyuze\Kernel\Application; use Fyuze\Http\Kernel; use Fyuze\Http\Request; use Fyuze\Http\Response; use Fyuze\Kernel\Fyuze; use Symfony\Component\HttpKernel\Controller\ControllerResolver; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; class Web extends Fyuze { /** * @return Response */ public function boot($request = null) { $request = $this->getRegistry()->make('Fyuze\Http\Request'); $routes = include $this->path . '/routes.php'; $context = new RequestContext(); $matcher = new UrlMatcher($routes, $context); $resolver = new ControllerResolver(); $kernel = new Kernel($matcher, $resolver); return $kernel->handle($request); } } ## Instruction: Add HttpCache to web application ## Code After: <?php namespace Fyuze\Kernel\Application; use Fyuze\Http\Kernel; use Fyuze\Http\Request; use Fyuze\Http\Response; use Fyuze\Kernel\Fyuze; use Symfony\Component\HttpKernel\Controller\ControllerResolver; use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpKernel\HttpCache\Store; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; class Web extends Fyuze { /** * @return Response */ public function boot($request = null) { $request = $this->getRegistry()->make('Fyuze\Http\Request'); $routes = include $this->path . '/routes.php'; $context = new RequestContext(); $matcher = new UrlMatcher($routes, $context); $resolver = new ControllerResolver(); $kernel = new Kernel($matcher, $resolver); $kernel = new HttpCache($kernel, new Store($this->path.'/app/cache')); return $kernel->handle($request); } }
<?php namespace Fyuze\Kernel\Application; use Fyuze\Http\Kernel; use Fyuze\Http\Request; use Fyuze\Http\Response; use Fyuze\Kernel\Fyuze; use Symfony\Component\HttpKernel\Controller\ControllerResolver; + use Symfony\Component\HttpKernel\HttpCache\HttpCache; + use Symfony\Component\HttpKernel\HttpCache\Store; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; class Web extends Fyuze { /** * @return Response */ public function boot($request = null) { $request = $this->getRegistry()->make('Fyuze\Http\Request'); $routes = include $this->path . '/routes.php'; $context = new RequestContext(); $matcher = new UrlMatcher($routes, $context); $resolver = new ControllerResolver(); $kernel = new Kernel($matcher, $resolver); + $kernel = new HttpCache($kernel, new Store($this->path.'/app/cache')); return $kernel->handle($request); } }
3
0.103448
3
0
21651120925cc3e51aeada4eac4dbfaa5bf98fae
src/header_filter/__init__.py
src/header_filter/__init__.py
from header_filter.matchers import Header # noqa: F401 from header_filter.middleware import HeaderFilterMiddleware # noqa: F401 from header_filter.rules import Enforce, Forbid # noqa: F401
from header_filter.matchers import Header, HeaderRegexp # noqa: F401 from header_filter.middleware import HeaderFilterMiddleware # noqa: F401 from header_filter.rules import Enforce, Forbid # noqa: F401
Allow HeaderRegexp to be imported directly from header_filter package.
Allow HeaderRegexp to be imported directly from header_filter package.
Python
mit
sanjioh/django-header-filter
python
## Code Before: from header_filter.matchers import Header # noqa: F401 from header_filter.middleware import HeaderFilterMiddleware # noqa: F401 from header_filter.rules import Enforce, Forbid # noqa: F401 ## Instruction: Allow HeaderRegexp to be imported directly from header_filter package. ## Code After: from header_filter.matchers import Header, HeaderRegexp # noqa: F401 from header_filter.middleware import HeaderFilterMiddleware # noqa: F401 from header_filter.rules import Enforce, Forbid # noqa: F401
- from header_filter.matchers import Header # noqa: F401 + from header_filter.matchers import Header, HeaderRegexp # noqa: F401 ? ++++++++++++++ from header_filter.middleware import HeaderFilterMiddleware # noqa: F401 from header_filter.rules import Enforce, Forbid # noqa: F401
2
0.666667
1
1
9c8cb351668d774fafe2ff4581e0be2dd30e680a
lib/tasks/taxonomy/export_taxonomy_to_json.rake
lib/tasks/taxonomy/export_taxonomy_to_json.rake
require 'json' namespace :taxonomy do desc <<-DESC Exports an expanded taxonomy to a single JSON array DESC namespace :export do task :json, [:root_taxon_id] => [:environment] do |_, args| root_taxon_id = args.fetch(:root_taxon_id) root_taxon = OpenStruct.new(Services.publishing_api.get_content(root_taxon_id).to_h) taxonomy = Taxonomy::ExpandedTaxonomy.new(root_taxon.content_id) taxonomy.build flattened_taxonomy = flatten_taxonomy(taxonomy.child_expansion) puts JSON.generate(flattened_taxonomy) end def flatten_taxonomy(taxon) flattened_taxonomy = [convert_to_content_item(taxon)] if taxon.children taxon.children.each do |child_taxon| flattened_taxonomy += flatten_taxonomy(child_taxon) end end flattened_taxonomy end def convert_to_content_item(taxon, recursion_direction = nil) taxon_content = OpenStruct.new(Services.publishing_api.get_content(taxon.content_id).to_h) content_item = { base_path: taxon.base_path, content_id: taxon.content_id, title: taxon.title, description: taxon_content.description, document_type: 'taxon', publishing_app: 'content-tagger', rendering_app: 'collections', schema_name: 'taxon', user_journey_document_supertype: 'finding', links: {}, } unless recursion_direction == :parent content_item[:links][:child_taxons] = taxon.children.map { |child| convert_to_content_item(child, :child) } end unless recursion_direction == :child if taxon.parent content_item[:links][:parent_taxons] = [convert_to_content_item(taxon.parent, :parent)] end end content_item end end end
namespace :taxonomy do namespace :export do desc <<-DESC Exports an expanded taxonomy to a single JSON array DESC task :json, [:root_taxon_id] => [:environment] do |_, args| root_taxon_id = args.fetch(:root_taxon_id) puts Taxonomy::TaxonTreeExport.new(root_taxon_id).build end desc 'Export Taxonomy tree to JSON file' task :to_file, %i[taxon_id file_name] => [:environment] do |_, args| file_name = args.fetch(:file_name, "taxon") taxon_id = args.fetch(:taxon_id) taxon_tree = Taxonomy::TaxonTreeExport.new(taxon_id).build open(Rails.root.join('tmp', "#{file_name}.json"), 'w') do |f| f << taxon_tree end end end end
Add to_file task to export namespace
Add to_file task to export namespace This implements the build function on the new TaxonTreeExport class to build the taxon tree array and convert it to JSON. Then saves the JSON to a file in the temp directory The json task now also implements the TaxonTreeExport build function.
Ruby
mit
alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger
ruby
## Code Before: require 'json' namespace :taxonomy do desc <<-DESC Exports an expanded taxonomy to a single JSON array DESC namespace :export do task :json, [:root_taxon_id] => [:environment] do |_, args| root_taxon_id = args.fetch(:root_taxon_id) root_taxon = OpenStruct.new(Services.publishing_api.get_content(root_taxon_id).to_h) taxonomy = Taxonomy::ExpandedTaxonomy.new(root_taxon.content_id) taxonomy.build flattened_taxonomy = flatten_taxonomy(taxonomy.child_expansion) puts JSON.generate(flattened_taxonomy) end def flatten_taxonomy(taxon) flattened_taxonomy = [convert_to_content_item(taxon)] if taxon.children taxon.children.each do |child_taxon| flattened_taxonomy += flatten_taxonomy(child_taxon) end end flattened_taxonomy end def convert_to_content_item(taxon, recursion_direction = nil) taxon_content = OpenStruct.new(Services.publishing_api.get_content(taxon.content_id).to_h) content_item = { base_path: taxon.base_path, content_id: taxon.content_id, title: taxon.title, description: taxon_content.description, document_type: 'taxon', publishing_app: 'content-tagger', rendering_app: 'collections', schema_name: 'taxon', user_journey_document_supertype: 'finding', links: {}, } unless recursion_direction == :parent content_item[:links][:child_taxons] = taxon.children.map { |child| convert_to_content_item(child, :child) } end unless recursion_direction == :child if taxon.parent content_item[:links][:parent_taxons] = [convert_to_content_item(taxon.parent, :parent)] end end content_item end end end ## Instruction: Add to_file task to export namespace This implements the build function on the new TaxonTreeExport class to build the taxon tree array and convert it to JSON. Then saves the JSON to a file in the temp directory The json task now also implements the TaxonTreeExport build function. ## Code After: namespace :taxonomy do namespace :export do desc <<-DESC Exports an expanded taxonomy to a single JSON array DESC task :json, [:root_taxon_id] => [:environment] do |_, args| root_taxon_id = args.fetch(:root_taxon_id) puts Taxonomy::TaxonTreeExport.new(root_taxon_id).build end desc 'Export Taxonomy tree to JSON file' task :to_file, %i[taxon_id file_name] => [:environment] do |_, args| file_name = args.fetch(:file_name, "taxon") taxon_id = args.fetch(:taxon_id) taxon_tree = Taxonomy::TaxonTreeExport.new(taxon_id).build open(Rails.root.join('tmp', "#{file_name}.json"), 'w') do |f| f << taxon_tree end end end end
- require 'json' - namespace :taxonomy do + namespace :export do - desc <<-DESC + desc <<-DESC ? ++ Exports an expanded taxonomy to a single JSON array - DESC + DESC ? ++ - namespace :export do task :json, [:root_taxon_id] => [:environment] do |_, args| root_taxon_id = args.fetch(:root_taxon_id) + puts Taxonomy::TaxonTreeExport.new(root_taxon_id).build - root_taxon = OpenStruct.new(Services.publishing_api.get_content(root_taxon_id).to_h) - taxonomy = Taxonomy::ExpandedTaxonomy.new(root_taxon.content_id) - taxonomy.build - - flattened_taxonomy = flatten_taxonomy(taxonomy.child_expansion) - - puts JSON.generate(flattened_taxonomy) end - def flatten_taxonomy(taxon) - flattened_taxonomy = [convert_to_content_item(taxon)] + desc 'Export Taxonomy tree to JSON file' + task :to_file, %i[taxon_id file_name] => [:environment] do |_, args| + file_name = args.fetch(:file_name, "taxon") - if taxon.children - taxon.children.each do |child_taxon| - flattened_taxonomy += flatten_taxonomy(child_taxon) - end + taxon_id = args.fetch(:taxon_id) + taxon_tree = Taxonomy::TaxonTreeExport.new(taxon_id).build + + open(Rails.root.join('tmp', "#{file_name}.json"), 'w') do |f| + f << taxon_tree end - - flattened_taxonomy - end - - def convert_to_content_item(taxon, recursion_direction = nil) - taxon_content = OpenStruct.new(Services.publishing_api.get_content(taxon.content_id).to_h) - - content_item = { - base_path: taxon.base_path, - content_id: taxon.content_id, - title: taxon.title, - description: taxon_content.description, - document_type: 'taxon', - publishing_app: 'content-tagger', - rendering_app: 'collections', - schema_name: 'taxon', - user_journey_document_supertype: 'finding', - links: {}, - } - - unless recursion_direction == :parent - content_item[:links][:child_taxons] = taxon.children.map { |child| convert_to_content_item(child, :child) } - end - unless recursion_direction == :child - if taxon.parent - content_item[:links][:parent_taxons] = [convert_to_content_item(taxon.parent, :parent)] - end - end - - content_item end end end
60
1.016949
12
48
3f90d9ff3dd3da35f4e3f712fd455a7f4b5e3aaf
scripts/compare-link.js
scripts/compare-link.js
/** * Created by MrIggyman1234 on 19/12/2016. */ $(document).ready(function(){ var $nav = $("nav"); var $body = $("body"); $body.on("click", "#compare-link", function(e){ e.preventDefault(); $nav.fadeOut(200); $nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" + "<a class=\"nav-link\" id=\"bootstrap-link\" href=\"#\">Bootstrap</a>" + "<a class=\"nav-link\" id=\"foundation-link\" href=\"#\">Foundation</a>"); $nav.fadeIn(400); }); $body.on("click", "#back-link", function(e){ e.preventDefault(); $nav.fadeOut(200); $nav.html('<a class="nav-link" id="about-link" href="about.html">About</a>' + '<a class="nav-link" id="contribute-link" href="contribute.html">Contribute</a>' + '<a class="nav-link" id="compare-link" href="#">How we compare with:</a>' + '<a class="nav-link" id="contact-link" href="contact.html">Contact Us</a>'); $nav.fadeIn(400); }); });
/** * Created by MrIggyman1234 on 19/12/2016. */ $(document).ready(function(){ var $nav = $("nav"); var $body = $("body"); $body.on("click", "#compare-link", function(e){ e.preventDefault(); $nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" + "<a class=\"nav-link\" id=\"bootstrap-link\" href=\"#\">Bootstrap</a>" + "<a class=\"nav-link\" id=\"foundation-link\" href=\"#\">Foundation</a>"); }); $body.on("click", "#back-link", function(e){ e.preventDefault(); $nav.html('<a class="nav-link" id="about-link" href="about.html">About</a>' + '<a class="nav-link" id="contribute-link" href="contribute.html">Contribute</a>' + '<a class="nav-link" id="compare-link" href="#">How we compare with:</a>' + '<a class="nav-link" id="contact-link" href="contact.html">Contact Us</a>'); }); });
Remove fade in and fade out
Remove fade in and fade out
JavaScript
apache-2.0
Balajanovski/Nautilus.io,Balajanovski/Nautilus.io
javascript
## Code Before: /** * Created by MrIggyman1234 on 19/12/2016. */ $(document).ready(function(){ var $nav = $("nav"); var $body = $("body"); $body.on("click", "#compare-link", function(e){ e.preventDefault(); $nav.fadeOut(200); $nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" + "<a class=\"nav-link\" id=\"bootstrap-link\" href=\"#\">Bootstrap</a>" + "<a class=\"nav-link\" id=\"foundation-link\" href=\"#\">Foundation</a>"); $nav.fadeIn(400); }); $body.on("click", "#back-link", function(e){ e.preventDefault(); $nav.fadeOut(200); $nav.html('<a class="nav-link" id="about-link" href="about.html">About</a>' + '<a class="nav-link" id="contribute-link" href="contribute.html">Contribute</a>' + '<a class="nav-link" id="compare-link" href="#">How we compare with:</a>' + '<a class="nav-link" id="contact-link" href="contact.html">Contact Us</a>'); $nav.fadeIn(400); }); }); ## Instruction: Remove fade in and fade out ## Code After: /** * Created by MrIggyman1234 on 19/12/2016. */ $(document).ready(function(){ var $nav = $("nav"); var $body = $("body"); $body.on("click", "#compare-link", function(e){ e.preventDefault(); $nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" + "<a class=\"nav-link\" id=\"bootstrap-link\" href=\"#\">Bootstrap</a>" + "<a class=\"nav-link\" id=\"foundation-link\" href=\"#\">Foundation</a>"); }); $body.on("click", "#back-link", function(e){ e.preventDefault(); $nav.html('<a class="nav-link" id="about-link" href="about.html">About</a>' + '<a class="nav-link" id="contribute-link" href="contribute.html">Contribute</a>' + '<a class="nav-link" id="compare-link" href="#">How we compare with:</a>' + '<a class="nav-link" id="contact-link" href="contact.html">Contact Us</a>'); }); });
/** * Created by MrIggyman1234 on 19/12/2016. */ $(document).ready(function(){ var $nav = $("nav"); var $body = $("body"); $body.on("click", "#compare-link", function(e){ e.preventDefault(); - $nav.fadeOut(200); $nav.html("<a class=\"nav-link\" id=\"back-link\" href=\"#\">Back</a>" + "<a class=\"nav-link\" id=\"bootstrap-link\" href=\"#\">Bootstrap</a>" + "<a class=\"nav-link\" id=\"foundation-link\" href=\"#\">Foundation</a>"); - $nav.fadeIn(400); }); $body.on("click", "#back-link", function(e){ e.preventDefault(); - $nav.fadeOut(200); $nav.html('<a class="nav-link" id="about-link" href="about.html">About</a>' + '<a class="nav-link" id="contribute-link" href="contribute.html">Contribute</a>' + '<a class="nav-link" id="compare-link" href="#">How we compare with:</a>' + '<a class="nav-link" id="contact-link" href="contact.html">Contact Us</a>'); - $nav.fadeIn(400); }); });
4
0.153846
0
4
d8f6938649acd4a72a53d47c26a1b16adb0e8fe3
jupyterlab_gitsync/jupyterlab_gitsync/__init__.py
jupyterlab_gitsync/jupyterlab_gitsync/__init__.py
from notebook.utils import url_path_join from jupyterlab_gitsync.handlers import * from jupyterlab_gitsync.version import VERSION __version__ = VERSION def _jupyter_server_extension_paths(): return [{'module': 'jupyterlab_gitsync'}] def load_jupyter_server_extension(nb_server_app): """ Called when the extension is loaded. Args: nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. """ host_pattern = '.*$' app = nb_server_app.web_app gcp_v1_endpoint = url_path_join( app.settings['base_url'], 'jupyterlab_gitsync', 'v1') app.add_handlers(host_pattern, [ (url_path_join(gcp_v1_endpoint, 'sync') + '(.*)', SyncHandler), (url_path_join(gcp_v1_endpoint, 'setup') + '(.*)', SetupHandler) ])
from notebook.utils import url_path_join from jupyterlab_gitsync.handlers import * from jupyterlab_gitsync.version import VERSION __version__ = VERSION def _jupyter_server_extension_paths(): return [{'module': 'jupyterlab_gitsync'}] def load_jupyter_server_extension(nb_server_app): """ Called when the extension is loaded. Args: nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. """ host_pattern = '.*$' app = nb_server_app.web_app gcp_v1_endpoint = url_path_join( app.settings['base_url'], 'jupyterlab_gitsync', 'v1') app.add_handlers(host_pattern, [ (url_path_join(gcp_v1_endpoint, 'sync') + '(.*)', SyncHandler), (url_path_join(gcp_v1_endpoint, 'setup') + '(.*)', SetupHandler) ])
Fix indentation to pass tests
Fix indentation to pass tests
Python
apache-2.0
GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions,GoogleCloudPlatform/jupyter-extensions
python
## Code Before: from notebook.utils import url_path_join from jupyterlab_gitsync.handlers import * from jupyterlab_gitsync.version import VERSION __version__ = VERSION def _jupyter_server_extension_paths(): return [{'module': 'jupyterlab_gitsync'}] def load_jupyter_server_extension(nb_server_app): """ Called when the extension is loaded. Args: nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. """ host_pattern = '.*$' app = nb_server_app.web_app gcp_v1_endpoint = url_path_join( app.settings['base_url'], 'jupyterlab_gitsync', 'v1') app.add_handlers(host_pattern, [ (url_path_join(gcp_v1_endpoint, 'sync') + '(.*)', SyncHandler), (url_path_join(gcp_v1_endpoint, 'setup') + '(.*)', SetupHandler) ]) ## Instruction: Fix indentation to pass tests ## Code After: from notebook.utils import url_path_join from jupyterlab_gitsync.handlers import * from jupyterlab_gitsync.version import VERSION __version__ = VERSION def _jupyter_server_extension_paths(): return [{'module': 'jupyterlab_gitsync'}] def load_jupyter_server_extension(nb_server_app): """ Called when the extension is loaded. Args: nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. """ host_pattern = '.*$' app = nb_server_app.web_app gcp_v1_endpoint = url_path_join( app.settings['base_url'], 'jupyterlab_gitsync', 'v1') app.add_handlers(host_pattern, [ (url_path_join(gcp_v1_endpoint, 'sync') + '(.*)', SyncHandler), (url_path_join(gcp_v1_endpoint, 'setup') + '(.*)', SetupHandler) ])
from notebook.utils import url_path_join from jupyterlab_gitsync.handlers import * from jupyterlab_gitsync.version import VERSION __version__ = VERSION def _jupyter_server_extension_paths(): return [{'module': 'jupyterlab_gitsync'}] def load_jupyter_server_extension(nb_server_app): """ - Called when the extension is loaded. ? -- + Called when the extension is loaded. - Args: ? -- + Args: - nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. ? -- + nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. - """ ? -- + """ - host_pattern = '.*$' ? -- + host_pattern = '.*$' - app = nb_server_app.web_app ? -- + app = nb_server_app.web_app - gcp_v1_endpoint = url_path_join( ? -- + gcp_v1_endpoint = url_path_join( - app.settings['base_url'], 'jupyterlab_gitsync', 'v1') ? -- + app.settings['base_url'], 'jupyterlab_gitsync', 'v1') - app.add_handlers(host_pattern, [ ? -- + app.add_handlers(host_pattern, [ - (url_path_join(gcp_v1_endpoint, 'sync') + '(.*)', SyncHandler), ? -- + (url_path_join(gcp_v1_endpoint, 'sync') + '(.*)', SyncHandler), - (url_path_join(gcp_v1_endpoint, 'setup') + '(.*)', SetupHandler) ? -- + (url_path_join(gcp_v1_endpoint, 'setup') + '(.*)', SetupHandler) - ]) ? -- + ])
24
0.923077
12
12
57b64d2d12eafe60717f7e0d58fd62f059ace06b
.travis.yml
.travis.yml
language: node_js node_js: - '0.10' before_install: - npm install coffee-script before_script: - ./node_modules/.bin/cake archive script: - ./node_modules/.bin/cake test deploy: provider: releases api_key: secure: RJ4IcQtr5fZcTaV6fNoHSt2phYxXVqt9OMiUbKw5i8axtt+GwvoKJDE1TShyYaQgA15rfqUSPKjRv3tEZQybla4Kq5gnHzdQOjMEnT8RQp97MaZzXl/InO6qrQEA1GxoTVu9aPIfV+aMop/l5+njFg9fDKZtaerrp75XIewIUNA= file: build/cURLCodeGenerator.zip skip_cleanup: true on: tags: true all_branches: true repo: luckymarmot/Paw-cURLCodeGenerator
language: node_js node_js: - '0.10' before_install: - npm install coffee-script before_script: - "./node_modules/.bin/cake archive" script: - "./node_modules/.bin/cake test" deploy: provider: releases api_key: secure: 0yzJucOYgtgVHKDJ0f2knmnygeo5BakxRdiIQkyckXkoJ1q0O8Uqs0Q+uM+lF2s+NIuFteeBegwGtV0uFVqHqfRea2BZvLTu3TiN4rDXMCYoWjJ9rGJ9QKUom1o9j/ZH1vVs3asEFjaIB4GNBQ1hXgLbLQufbpJLwVIvKSVmoPs= file: build/cURLCodeGenerator.zip skip_cleanup: true on: tags: true all_branches: true repo: luckymarmot/Paw-cURLCodeGenerator
Update Travis CI deployment key
Update Travis CI deployment key
YAML
mit
luckymarmot/Paw-cURLCodeGenerator
yaml
## Code Before: language: node_js node_js: - '0.10' before_install: - npm install coffee-script before_script: - ./node_modules/.bin/cake archive script: - ./node_modules/.bin/cake test deploy: provider: releases api_key: secure: RJ4IcQtr5fZcTaV6fNoHSt2phYxXVqt9OMiUbKw5i8axtt+GwvoKJDE1TShyYaQgA15rfqUSPKjRv3tEZQybla4Kq5gnHzdQOjMEnT8RQp97MaZzXl/InO6qrQEA1GxoTVu9aPIfV+aMop/l5+njFg9fDKZtaerrp75XIewIUNA= file: build/cURLCodeGenerator.zip skip_cleanup: true on: tags: true all_branches: true repo: luckymarmot/Paw-cURLCodeGenerator ## Instruction: Update Travis CI deployment key ## Code After: language: node_js node_js: - '0.10' before_install: - npm install coffee-script before_script: - "./node_modules/.bin/cake archive" script: - "./node_modules/.bin/cake test" deploy: provider: releases api_key: secure: 0yzJucOYgtgVHKDJ0f2knmnygeo5BakxRdiIQkyckXkoJ1q0O8Uqs0Q+uM+lF2s+NIuFteeBegwGtV0uFVqHqfRea2BZvLTu3TiN4rDXMCYoWjJ9rGJ9QKUom1o9j/ZH1vVs3asEFjaIB4GNBQ1hXgLbLQufbpJLwVIvKSVmoPs= file: build/cURLCodeGenerator.zip skip_cleanup: true on: tags: true all_branches: true repo: luckymarmot/Paw-cURLCodeGenerator
language: node_js node_js: - '0.10' before_install: - npm install coffee-script before_script: - - ./node_modules/.bin/cake archive + - "./node_modules/.bin/cake archive" ? + + script: - - ./node_modules/.bin/cake test + - "./node_modules/.bin/cake test" ? + + deploy: provider: releases api_key: - secure: RJ4IcQtr5fZcTaV6fNoHSt2phYxXVqt9OMiUbKw5i8axtt+GwvoKJDE1TShyYaQgA15rfqUSPKjRv3tEZQybla4Kq5gnHzdQOjMEnT8RQp97MaZzXl/InO6qrQEA1GxoTVu9aPIfV+aMop/l5+njFg9fDKZtaerrp75XIewIUNA= + secure: 0yzJucOYgtgVHKDJ0f2knmnygeo5BakxRdiIQkyckXkoJ1q0O8Uqs0Q+uM+lF2s+NIuFteeBegwGtV0uFVqHqfRea2BZvLTu3TiN4rDXMCYoWjJ9rGJ9QKUom1o9j/ZH1vVs3asEFjaIB4GNBQ1hXgLbLQufbpJLwVIvKSVmoPs= file: build/cURLCodeGenerator.zip skip_cleanup: true on: tags: true all_branches: true repo: luckymarmot/Paw-cURLCodeGenerator
6
0.315789
3
3
562733680af382869d661ea15981a894f006da76
Engine/RXArchiveManager.h
Engine/RXArchiveManager.h
// // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end
// // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; // NOTE: these methods return the archives sorted in the order they should be searched; code should always forward-iterate the returned array - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end
Add note about the order of archives returned by the archive manager.
Add note about the order of archives returned by the archive manager.
C
bsd-3-clause
jfroy/rivenx,jfroy/rivenx,jfroy/rivenx,jfroy/rivenx
c
## Code Before: // // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end ## Instruction: Add note about the order of archives returned by the archive manager. ## Code After: // // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; // NOTE: these methods return the archives sorted in the order they should be searched; code should always forward-iterate the returned array - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end
// // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; + // NOTE: these methods return the archives sorted in the order they should be searched; code should always forward-iterate the returned array + - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end
2
0.068966
2
0
f328b6f949b539d0d04a33427134cf3fcc489be8
packages/si/simpleconfig.yaml
packages/si/simpleconfig.yaml
homepage: https://github.com/koterpillar/simpleconfig#readme changelog-type: '' hash: 31214c4d628d1017d4b05bde57e7944d6773e866d60bc7f3f6ff88ff81145d14 test-bench-deps: base: -any text: -any generic-deriving: -any containers: -any simpleconfig: -any lens: -any maintainer: a@koterpillar.com synopsis: Short description of your package changelog: '' basic-deps: base: ! '>=4.7 && <5' containers: -any lens: -any all-versions: - '0.0.1' author: Alexey Kotlyarov latest: '0.0.1' description-type: markdown description: ! '# simpleconfig ### Releasing * Install [bumpversion](https://github.com/peritus/bumpversion): `pip install bumpversion`. * Run `bumpversion major|minor|patch`. * Run `git push --tags`. ' license-name: BSD3
homepage: https://github.com/koterpillar/simpleconfig#readme changelog-type: '' hash: 806a764727eed0c6e341fc18cf31efe169ff9fd98b2a0d903d662be7836ac454 test-bench-deps: base: -any text: -any generic-deriving: -any containers: -any simpleconfig: -any lens: -any maintainer: a@koterpillar.com synopsis: Short description of your package changelog: '' basic-deps: base: ! '>=4.7 && <5' containers: -any lens: -any all-versions: - '0.0.1' - '0.0.5' author: Alexey Kotlyarov latest: '0.0.5' description-type: markdown description: ! '# simpleconfig ### Releasing * Install [bumpversion](https://github.com/peritus/bumpversion): `pip install bumpversion`. * Run `bumpversion major|minor|patch`. * Run `git push --tags && git push`. ' license-name: BSD3
Update from Hackage at 2018-01-03T00:35:30Z
Update from Hackage at 2018-01-03T00:35:30Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/koterpillar/simpleconfig#readme changelog-type: '' hash: 31214c4d628d1017d4b05bde57e7944d6773e866d60bc7f3f6ff88ff81145d14 test-bench-deps: base: -any text: -any generic-deriving: -any containers: -any simpleconfig: -any lens: -any maintainer: a@koterpillar.com synopsis: Short description of your package changelog: '' basic-deps: base: ! '>=4.7 && <5' containers: -any lens: -any all-versions: - '0.0.1' author: Alexey Kotlyarov latest: '0.0.1' description-type: markdown description: ! '# simpleconfig ### Releasing * Install [bumpversion](https://github.com/peritus/bumpversion): `pip install bumpversion`. * Run `bumpversion major|minor|patch`. * Run `git push --tags`. ' license-name: BSD3 ## Instruction: Update from Hackage at 2018-01-03T00:35:30Z ## Code After: homepage: https://github.com/koterpillar/simpleconfig#readme changelog-type: '' hash: 806a764727eed0c6e341fc18cf31efe169ff9fd98b2a0d903d662be7836ac454 test-bench-deps: base: -any text: -any generic-deriving: -any containers: -any simpleconfig: -any lens: -any maintainer: a@koterpillar.com synopsis: Short description of your package changelog: '' basic-deps: base: ! '>=4.7 && <5' containers: -any lens: -any all-versions: - '0.0.1' - '0.0.5' author: Alexey Kotlyarov latest: '0.0.5' description-type: markdown description: ! '# simpleconfig ### Releasing * Install [bumpversion](https://github.com/peritus/bumpversion): `pip install bumpversion`. * Run `bumpversion major|minor|patch`. * Run `git push --tags && git push`. ' license-name: BSD3
homepage: https://github.com/koterpillar/simpleconfig#readme changelog-type: '' - hash: 31214c4d628d1017d4b05bde57e7944d6773e866d60bc7f3f6ff88ff81145d14 + hash: 806a764727eed0c6e341fc18cf31efe169ff9fd98b2a0d903d662be7836ac454 test-bench-deps: base: -any text: -any generic-deriving: -any containers: -any simpleconfig: -any lens: -any maintainer: a@koterpillar.com synopsis: Short description of your package changelog: '' basic-deps: base: ! '>=4.7 && <5' containers: -any lens: -any all-versions: - '0.0.1' + - '0.0.5' author: Alexey Kotlyarov - latest: '0.0.1' ? ^ + latest: '0.0.5' ? ^ description-type: markdown description: ! '# simpleconfig ### Releasing * Install [bumpversion](https://github.com/peritus/bumpversion): `pip install bumpversion`. * Run `bumpversion major|minor|patch`. - * Run `git push --tags`. + * Run `git push --tags && git push`. ? ++++++++++++ ' license-name: BSD3
7
0.194444
4
3
5dbfe0d7422e7047c0d22fe0c4d21ace69de4700
source/utils/adios_iotest/CMakeLists.txt
source/utils/adios_iotest/CMakeLists.txt
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iotest-config DESTINATION ${PROJECT_BINARY_DIR} ) add_executable(adios_iotest settings.cpp decomp.cpp processConfig.cpp ioGroup.cpp stream.cpp adiosStream.cpp adios_iotest.cpp) target_link_libraries(adios_iotest adios2 MPI::MPI_C) if(ADIOS2_HAVE_HDF5) if(HDF5_C_INCLUDE_DIRS) target_include_directories(adios_iotest PRIVATE ${HDF5_C_INCLUDE_DIRS}) else() target_include_directories(adios_iotest PRIVATE ${HDF5_INCLUDE_DIRS}) endif() target_sources(adios_iotest PRIVATE hdf5Stream.cpp) target_link_libraries(adios_iotest ${HDF5_C_LIBRARIES}) endif() install(TARGETS adios_iotest EXPORT adios2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install(DIRECTORY iotest-config/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config )
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iotest-config DESTINATION ${PROJECT_BINARY_DIR} ) add_executable(adios_iotest settings.cpp decomp.cpp processConfig.cpp ioGroup.cpp stream.cpp adiosStream.cpp adios_iotest.cpp) target_link_libraries(adios_iotest adios2 MPI::MPI_C) if(WIN32) target_link_libraries(adios_iotest getopt) endif() if(ADIOS2_HAVE_HDF5) if(HDF5_C_INCLUDE_DIRS) target_include_directories(adios_iotest PRIVATE ${HDF5_C_INCLUDE_DIRS}) else() target_include_directories(adios_iotest PRIVATE ${HDF5_INCLUDE_DIRS}) endif() target_sources(adios_iotest PRIVATE hdf5Stream.cpp) target_link_libraries(adios_iotest ${HDF5_C_LIBRARIES}) endif() install(TARGETS adios_iotest EXPORT adios2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install(DIRECTORY iotest-config/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config )
Add missing mingw getopt dependency
Add missing mingw getopt dependency
Text
apache-2.0
JasonRuonanWang/ADIOS2,ornladios/ADIOS2,ornladios/ADIOS2,JasonRuonanWang/ADIOS2,ornladios/ADIOS2,JasonRuonanWang/ADIOS2,JasonRuonanWang/ADIOS2,JasonRuonanWang/ADIOS2,ornladios/ADIOS2,ornladios/ADIOS2
text
## Code Before: file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iotest-config DESTINATION ${PROJECT_BINARY_DIR} ) add_executable(adios_iotest settings.cpp decomp.cpp processConfig.cpp ioGroup.cpp stream.cpp adiosStream.cpp adios_iotest.cpp) target_link_libraries(adios_iotest adios2 MPI::MPI_C) if(ADIOS2_HAVE_HDF5) if(HDF5_C_INCLUDE_DIRS) target_include_directories(adios_iotest PRIVATE ${HDF5_C_INCLUDE_DIRS}) else() target_include_directories(adios_iotest PRIVATE ${HDF5_INCLUDE_DIRS}) endif() target_sources(adios_iotest PRIVATE hdf5Stream.cpp) target_link_libraries(adios_iotest ${HDF5_C_LIBRARIES}) endif() install(TARGETS adios_iotest EXPORT adios2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install(DIRECTORY iotest-config/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config ) ## Instruction: Add missing mingw getopt dependency ## Code After: file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iotest-config DESTINATION ${PROJECT_BINARY_DIR} ) add_executable(adios_iotest settings.cpp decomp.cpp processConfig.cpp ioGroup.cpp stream.cpp adiosStream.cpp adios_iotest.cpp) target_link_libraries(adios_iotest adios2 MPI::MPI_C) if(WIN32) target_link_libraries(adios_iotest getopt) endif() if(ADIOS2_HAVE_HDF5) if(HDF5_C_INCLUDE_DIRS) target_include_directories(adios_iotest PRIVATE ${HDF5_C_INCLUDE_DIRS}) else() target_include_directories(adios_iotest PRIVATE ${HDF5_INCLUDE_DIRS}) endif() target_sources(adios_iotest PRIVATE hdf5Stream.cpp) target_link_libraries(adios_iotest ${HDF5_C_LIBRARIES}) endif() install(TARGETS adios_iotest EXPORT adios2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install(DIRECTORY iotest-config/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config )
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iotest-config DESTINATION ${PROJECT_BINARY_DIR} ) add_executable(adios_iotest settings.cpp decomp.cpp processConfig.cpp ioGroup.cpp stream.cpp adiosStream.cpp adios_iotest.cpp) target_link_libraries(adios_iotest adios2 MPI::MPI_C) + if(WIN32) + target_link_libraries(adios_iotest getopt) + endif() if(ADIOS2_HAVE_HDF5) if(HDF5_C_INCLUDE_DIRS) target_include_directories(adios_iotest PRIVATE ${HDF5_C_INCLUDE_DIRS}) else() target_include_directories(adios_iotest PRIVATE ${HDF5_INCLUDE_DIRS}) endif() target_sources(adios_iotest PRIVATE hdf5Stream.cpp) target_link_libraries(adios_iotest ${HDF5_C_LIBRARIES}) endif() install(TARGETS adios_iotest EXPORT adios2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install(DIRECTORY iotest-config/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config )
3
0.107143
3
0
d0efb339e05d649c565acf523f25ee36203e7575
.travis.yml
.travis.yml
language: common-lisp sudo: required env: matrix: - LISP=sbcl-bin - LISP=ccl-bin - LISP=clisp - LISP=allegro - LISP=abcl - LISP=ecl - LISP=cmucl matrix: allow_failures: - env: LISP=clisp - env: LISP=ecl - env: LISP=cmucl install: - curl -L https://raw.githubusercontent.com/fukamachi/roswell/fix-install-script/scripts/install-for-ci.sh | sh before_script: - ros --version - ros config script: - ros -s prove -s uiop -e '(or (prove:run :sxql-test) (uiop:quit -1))'
language: common-lisp sudo: required env: matrix: - LISP=sbcl-bin - LISP=ccl-bin - LISP=clisp - LISP=allegro - LISP=abcl - LISP=ecl install: - curl -L https://raw.githubusercontent.com/snmsts/roswell/master/scripts/install-for-ci.sh | sh before_script: - ros --version - ros config script: - ros -s prove -s uiop -e '(or (prove:run :sxql-test) (uiop:quit -1))'
Stop testing with CMUCL because named-readtables doesn't support it.
Stop testing with CMUCL because named-readtables doesn't support it.
YAML
bsd-3-clause
Rudolph-Miller/sxql,fukamachi/sxql
yaml
## Code Before: language: common-lisp sudo: required env: matrix: - LISP=sbcl-bin - LISP=ccl-bin - LISP=clisp - LISP=allegro - LISP=abcl - LISP=ecl - LISP=cmucl matrix: allow_failures: - env: LISP=clisp - env: LISP=ecl - env: LISP=cmucl install: - curl -L https://raw.githubusercontent.com/fukamachi/roswell/fix-install-script/scripts/install-for-ci.sh | sh before_script: - ros --version - ros config script: - ros -s prove -s uiop -e '(or (prove:run :sxql-test) (uiop:quit -1))' ## Instruction: Stop testing with CMUCL because named-readtables doesn't support it. ## Code After: language: common-lisp sudo: required env: matrix: - LISP=sbcl-bin - LISP=ccl-bin - LISP=clisp - LISP=allegro - LISP=abcl - LISP=ecl install: - curl -L https://raw.githubusercontent.com/snmsts/roswell/master/scripts/install-for-ci.sh | sh before_script: - ros --version - ros config script: - ros -s prove -s uiop -e '(or (prove:run :sxql-test) (uiop:quit -1))'
language: common-lisp sudo: required env: matrix: - LISP=sbcl-bin - LISP=ccl-bin - LISP=clisp - LISP=allegro - LISP=abcl - LISP=ecl - - LISP=cmucl - - matrix: - allow_failures: - - env: LISP=clisp - - env: LISP=ecl - - env: LISP=cmucl install: - - curl -L https://raw.githubusercontent.com/fukamachi/roswell/fix-install-script/scripts/install-for-ci.sh | sh ? ^^^^ ^^^^ ^^^^^^ ^^^^^^ --- + - curl -L https://raw.githubusercontent.com/snmsts/roswell/master/scripts/install-for-ci.sh | sh ? ^^ ^^^ ^^ ^ before_script: - ros --version - ros config script: - ros -s prove -s uiop -e '(or (prove:run :sxql-test) (uiop:quit -1))'
9
0.321429
1
8