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
994b17ece10588069612571864c3a03d3d384cc9
README.md
README.md
mongoqp ======= Frontend for MongoDB's query profiler collections, built using [Silex][1]. ## Setup ### Install Dependencies $ composer.phar install ### Configuration The `src/` directory includes a `config.php.dist` file, which should be copied to `config.php`. The cache directory for Twig may be customized. ### Cache Directory Create the cache directory (`cache/` by default) and ensure it is writable by your web server. [1]: http://silex.sensiolabs.org/
mongoqp ======= **mongoqp** is a frontend for MongoDB's query profiler collections (i.e. `db.system.profile`), built using [Silex][1]. It currently supports: * Toggling query profiler levels (off, slow, all) per database * Grouping similar queries by BSON structure * Reporting aggregate query statistics (min, max, average, times) * Sorting, pagination and filtering via [DataTables][2] ### Screenshots ![Server view](http://i.imgur.com/5EZbm.png) ![Database view](http://i.imgur.com/pXLc4.png) ## Setup ### Install Dependencies $ composer.phar install ### Configuration The `src/` directory includes a `config.php.dist` file, which should be copied to `config.php`. The cache directory for Twig may be customized. ### Cache Directory Create the cache directory (`cache/` by default) and ensure it is writable by your web server. ### Web Server Instructions for web server configurations are outlined in the [Silex documentation][3]. [1]: http://silex.sensiolabs.org/ [2]: http://datatables.net/ [3]: http://silex.sensiolabs.org/doc/web_servers.html
Add features and web server instructions
Add features and web server instructions
Markdown
mit
jmikola/mongoqp,jmikola/mongoqp,jmikola/mongoqp
markdown
## Code Before: mongoqp ======= Frontend for MongoDB's query profiler collections, built using [Silex][1]. ## Setup ### Install Dependencies $ composer.phar install ### Configuration The `src/` directory includes a `config.php.dist` file, which should be copied to `config.php`. The cache directory for Twig may be customized. ### Cache Directory Create the cache directory (`cache/` by default) and ensure it is writable by your web server. [1]: http://silex.sensiolabs.org/ ## Instruction: Add features and web server instructions ## Code After: mongoqp ======= **mongoqp** is a frontend for MongoDB's query profiler collections (i.e. `db.system.profile`), built using [Silex][1]. It currently supports: * Toggling query profiler levels (off, slow, all) per database * Grouping similar queries by BSON structure * Reporting aggregate query statistics (min, max, average, times) * Sorting, pagination and filtering via [DataTables][2] ### Screenshots ![Server view](http://i.imgur.com/5EZbm.png) ![Database view](http://i.imgur.com/pXLc4.png) ## Setup ### Install Dependencies $ composer.phar install ### Configuration The `src/` directory includes a `config.php.dist` file, which should be copied to `config.php`. The cache directory for Twig may be customized. ### Cache Directory Create the cache directory (`cache/` by default) and ensure it is writable by your web server. ### Web Server Instructions for web server configurations are outlined in the [Silex documentation][3]. [1]: http://silex.sensiolabs.org/ [2]: http://datatables.net/ [3]: http://silex.sensiolabs.org/doc/web_servers.html
mongoqp ======= - Frontend for MongoDB's query profiler collections, built using [Silex][1]. ? ^ + **mongoqp** is a frontend for MongoDB's query profiler collections (i.e. `db.system.profile`), built using [Silex][1]. ? ^^^^^^^^^^^^^^^^^^ +++++++++++++++++++++++++++ + + It currently supports: + + * Toggling query profiler levels (off, slow, all) per database + * Grouping similar queries by BSON structure + * Reporting aggregate query statistics (min, max, average, times) + * Sorting, pagination and filtering via [DataTables][2] + + ### Screenshots + + ![Server view](http://i.imgur.com/5EZbm.png) + + ![Database view](http://i.imgur.com/pXLc4.png) ## Setup ### Install Dependencies $ composer.phar install ### Configuration The `src/` directory includes a `config.php.dist` file, which should be copied to `config.php`. The cache directory for Twig may be customized. ### Cache Directory Create the cache directory (`cache/` by default) and ensure it is writable by your web server. + ### Web Server + + Instructions for web server configurations are outlined in the + [Silex documentation][3]. + [1]: http://silex.sensiolabs.org/ + [2]: http://datatables.net/ + [3]: http://silex.sensiolabs.org/doc/web_servers.html
22
1
21
1
a4da6814e92aa6d3779e7f20ff0f922d5ec62f56
metadata/com.smartpack.smartflasher.yml
metadata/com.smartpack.smartflasher.yml
Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: sunil.kde@gmail.com AuthorWebSite: https://smartpack.github.io WebSite: https://smartpack.github.io/smartflasher SourceCode: https://github.com/SmartPack/SmartFlasher IssueTracker: https://github.com/SmartPack/SmartFlasher/issues Changelog: https://github.com/SmartPack/SmartFlasher/blob/HEAD/change-logs.md Donate: https://smartpack.github.io/donation AutoName: Smart Flasher RequiresRoot: 'yes' RepoType: git Repo: https://github.com/SmartPack/SmartFlasher Builds: - versionName: v5.1 versionCode: 42 commit: v5.1 subdir: app gradle: - fdroid - versionName: v5.2 versionCode: 43 commit: v5.2 subdir: app gradle: - fdroid - versionName: v5.3 versionCode: 44 commit: v5.3 subdir: app gradle: - fdroid AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v5.3 CurrentVersionCode: 44
Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: sunil.kde@gmail.com AuthorWebSite: https://smartpack.github.io WebSite: https://smartpack.github.io/smartflasher SourceCode: https://github.com/SmartPack/SmartFlasher IssueTracker: https://github.com/SmartPack/SmartFlasher/issues Changelog: https://github.com/SmartPack/SmartFlasher/blob/HEAD/change-logs.md Donate: https://smartpack.github.io/donation AutoName: Smart Flasher RequiresRoot: 'yes' RepoType: git Repo: https://github.com/SmartPack/SmartFlasher Builds: - versionName: v5.1 versionCode: 42 commit: v5.1 subdir: app gradle: - fdroid - versionName: v5.2 versionCode: 43 commit: v5.2 subdir: app gradle: - fdroid - versionName: v5.3 versionCode: 44 commit: v5.3 subdir: app gradle: - fdroid - versionName: v5.4 versionCode: 45 commit: 833ad42fefa9bd5359ebcfcc4c7fafeedf210d8d subdir: app gradle: - fdroid AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v5.4 CurrentVersionCode: 45
Update Smart Flasher to v5.4 (45)
Update Smart Flasher to v5.4 (45)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: sunil.kde@gmail.com AuthorWebSite: https://smartpack.github.io WebSite: https://smartpack.github.io/smartflasher SourceCode: https://github.com/SmartPack/SmartFlasher IssueTracker: https://github.com/SmartPack/SmartFlasher/issues Changelog: https://github.com/SmartPack/SmartFlasher/blob/HEAD/change-logs.md Donate: https://smartpack.github.io/donation AutoName: Smart Flasher RequiresRoot: 'yes' RepoType: git Repo: https://github.com/SmartPack/SmartFlasher Builds: - versionName: v5.1 versionCode: 42 commit: v5.1 subdir: app gradle: - fdroid - versionName: v5.2 versionCode: 43 commit: v5.2 subdir: app gradle: - fdroid - versionName: v5.3 versionCode: 44 commit: v5.3 subdir: app gradle: - fdroid AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v5.3 CurrentVersionCode: 44 ## Instruction: Update Smart Flasher to v5.4 (45) ## Code After: Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: sunil.kde@gmail.com AuthorWebSite: https://smartpack.github.io WebSite: https://smartpack.github.io/smartflasher SourceCode: https://github.com/SmartPack/SmartFlasher IssueTracker: https://github.com/SmartPack/SmartFlasher/issues Changelog: https://github.com/SmartPack/SmartFlasher/blob/HEAD/change-logs.md Donate: https://smartpack.github.io/donation AutoName: Smart Flasher RequiresRoot: 'yes' RepoType: git Repo: https://github.com/SmartPack/SmartFlasher Builds: - versionName: v5.1 versionCode: 42 commit: v5.1 subdir: app gradle: - fdroid - versionName: v5.2 versionCode: 43 commit: v5.2 subdir: app gradle: - fdroid - versionName: v5.3 versionCode: 44 commit: v5.3 subdir: app gradle: - fdroid - versionName: v5.4 versionCode: 45 commit: 833ad42fefa9bd5359ebcfcc4c7fafeedf210d8d subdir: app gradle: - fdroid AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v5.4 CurrentVersionCode: 45
Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: sunil.kde@gmail.com AuthorWebSite: https://smartpack.github.io WebSite: https://smartpack.github.io/smartflasher SourceCode: https://github.com/SmartPack/SmartFlasher IssueTracker: https://github.com/SmartPack/SmartFlasher/issues Changelog: https://github.com/SmartPack/SmartFlasher/blob/HEAD/change-logs.md Donate: https://smartpack.github.io/donation AutoName: Smart Flasher RequiresRoot: 'yes' RepoType: git Repo: https://github.com/SmartPack/SmartFlasher Builds: - versionName: v5.1 versionCode: 42 commit: v5.1 subdir: app gradle: - fdroid - versionName: v5.2 versionCode: 43 commit: v5.2 subdir: app gradle: - fdroid - versionName: v5.3 versionCode: 44 commit: v5.3 subdir: app gradle: - fdroid + - versionName: v5.4 + versionCode: 45 + commit: 833ad42fefa9bd5359ebcfcc4c7fafeedf210d8d + subdir: app + gradle: + - fdroid + AutoUpdateMode: Version %v UpdateCheckMode: Tags - CurrentVersion: v5.3 ? ^ + CurrentVersion: v5.4 ? ^ - CurrentVersionCode: 44 ? ^ + CurrentVersionCode: 45 ? ^
11
0.244444
9
2
0fb669037c8c15140aa3c313c2f8d17fee9a8f99
core/lib/refinery/catch_all_routes.rb
core/lib/refinery/catch_all_routes.rb
::Refinery::Application.routes.draw do match '/admin(/*path)', :to => redirect {|params, request| request.flash[:message] = "<p> The URL '/<strong>admin</strong>#{"/#{params[:path]}" unless params[:path].blank?}' will be removed in Refinery CMS version 1.0 <br/> Please use '/<strong>refinery</strong>#{"/#{params[:path]}" unless params[:path].blank?}' instead. </p>".html_safe "/refinery#{"/#{params[:path]}" unless params[:path].blank?}" } match '/refinery/*path' => 'admin/base#error_404' end
::Refinery::Application.routes.draw do match '/refinery/*path' => 'admin/base#error_404' end
Remove /admin catch all route.
Remove /admin catch all route.
Ruby
mit
gwagener/refinerycms,SmartMedia/refinerycms-with-custom-icons,Retimont/refinerycms,mkaplan9/refinerycms,mlinfoot/refinerycms,kappiah/refinerycms,bricesanchez/refinerycms,mobilityhouse/refinerycms,Eric-Guo/refinerycms,mabras/refinerycms,mkaplan9/refinerycms,mlinfoot/refinerycms,gwagener/refinerycms,mabras/refinerycms,anitagraham/refinerycms,mlinfoot/refinerycms,trevornez/refinerycms,Eric-Guo/refinerycms,LytayTOUCH/refinerycms,bricesanchez/refinerycms,chrise86/refinerycms,anitagraham/refinerycms,kelkoo-services/refinerycms,KingLemuel/refinerycms,refinery/refinerycms,chrise86/refinerycms,mabras/refinerycms,aguzubiaga/refinerycms,Eric-Guo/refinerycms,stefanspicer/refinerycms,refinery/refinerycms,mojarra/myrefinerycms,KingLemuel/refinerycms,stefanspicer/refinerycms,Retimont/refinerycms,kappiah/refinerycms,Retimont/refinerycms,KingLemuel/refinerycms,bryanmtl/g-refinerycms,aguzubiaga/refinerycms,koa/refinerycms,chrise86/refinerycms,SmartMedia/refinerycms-with-custom-icons,trevornez/refinerycms,simi/refinerycms,louim/refinerycms,johanb/refinerycms,hoopla-software/refinerycms,mobilityhouse/refinerycms,johanb/refinerycms,donabrams/refinerycms,hoopla-software/refinerycms,kappiah/refinerycms,pcantrell/refinerycms,hoopla-software/refinerycms,pcantrell/refinerycms,stefanspicer/refinerycms,kelkoo-services/refinerycms,LytayTOUCH/refinerycms,mkaplan9/refinerycms,mojarra/myrefinerycms,simi/refinerycms,simi/refinerycms,trevornez/refinerycms,LytayTOUCH/refinerycms,aguzubiaga/refinerycms,sideci-sample/sideci-sample-refinerycms,donabrams/refinerycms,simi/refinerycms,louim/refinerycms,gwagener/refinerycms,bryanmtl/g-refinerycms,anitagraham/refinerycms,koa/refinerycms,johanb/refinerycms,refinery/refinerycms,sideci-sample/sideci-sample-refinerycms
ruby
## Code Before: ::Refinery::Application.routes.draw do match '/admin(/*path)', :to => redirect {|params, request| request.flash[:message] = "<p> The URL '/<strong>admin</strong>#{"/#{params[:path]}" unless params[:path].blank?}' will be removed in Refinery CMS version 1.0 <br/> Please use '/<strong>refinery</strong>#{"/#{params[:path]}" unless params[:path].blank?}' instead. </p>".html_safe "/refinery#{"/#{params[:path]}" unless params[:path].blank?}" } match '/refinery/*path' => 'admin/base#error_404' end ## Instruction: Remove /admin catch all route. ## Code After: ::Refinery::Application.routes.draw do match '/refinery/*path' => 'admin/base#error_404' end
::Refinery::Application.routes.draw do - match '/admin(/*path)', :to => redirect {|params, request| - request.flash[:message] = "<p> - The URL '/<strong>admin</strong>#{"/#{params[:path]}" unless params[:path].blank?}' will be removed in Refinery CMS version 1.0 - <br/> - Please use '/<strong>refinery</strong>#{"/#{params[:path]}" unless params[:path].blank?}' instead. - </p>".html_safe - "/refinery#{"/#{params[:path]}" unless params[:path].blank?}" - } match '/refinery/*path' => 'admin/base#error_404' end
8
0.727273
0
8
4b26066a6f3b666ec107621334ddbcceec6a819a
micro/read_code.py
micro/read_code.py
import fileinput def read_code(): return ''.join([line for line in fileinput.input()]) if __name__ == '__main__': code = read_code() print(code)
import fileinput def read_code(filename='-'): return ''.join([line for line in fileinput.input(filename)]) if __name__ == '__main__': import sys filename = sys.argv[1] if len(sys.argv) > 1 else '-' code = read_code(filename) print(code)
Correct a reading of a code
Correct a reading of a code
Python
mit
thewizardplusplus/micro,thewizardplusplus/micro,thewizardplusplus/micro
python
## Code Before: import fileinput def read_code(): return ''.join([line for line in fileinput.input()]) if __name__ == '__main__': code = read_code() print(code) ## Instruction: Correct a reading of a code ## Code After: import fileinput def read_code(filename='-'): return ''.join([line for line in fileinput.input(filename)]) if __name__ == '__main__': import sys filename = sys.argv[1] if len(sys.argv) > 1 else '-' code = read_code(filename) print(code)
import fileinput - def read_code(): + def read_code(filename='-'): - return ''.join([line for line in fileinput.input()]) + return ''.join([line for line in fileinput.input(filename)]) ? ++++++++ if __name__ == '__main__': + import sys + + filename = sys.argv[1] if len(sys.argv) > 1 else '-' - code = read_code() + code = read_code(filename) ? ++++++++ print(code)
9
1.125
6
3
f50d192b9384664ded37326ff48a1351843f76c6
setup.py
setup.py
try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements from setuptools import find_packages from setuptools import setup setup( name='jsonapi-requests', version='0.6.1.dev0', description='Python client implementation for json api. http://jsonapi.org/', author='Social WiFi', author_email='it@socialwifi.com', url='https://github.com/socialwifi/jsonapi-requests', packages=find_packages(exclude=['tests']), install_requires=[str(ir.req) for ir in parse_requirements('base_requirements.txt', session=False)], setup_requires=['pytest-runner'], tests_require=['pytest', 'flask'], extras_require={ 'flask': ['flask'] }, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ] )
try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements from setuptools import find_packages from setuptools import setup def get_long_description(): with open('README.md') as readme_file: return readme_file.read() setup( name='jsonapi-requests', version='0.6.1.dev0', description='Python client implementation for json api. http://jsonapi.org/', long_description=get_long_description(), long_description_content_type='text/markdown', author='Social WiFi', author_email='it@socialwifi.com', url='https://github.com/socialwifi/jsonapi-requests', packages=find_packages(exclude=['tests']), install_requires=[str(ir.req) for ir in parse_requirements('base_requirements.txt', session=False)], setup_requires=['pytest-runner'], tests_require=['pytest', 'flask'], extras_require={ 'flask': ['flask'] }, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ] )
Add long description to package.
Add long description to package.
Python
bsd-3-clause
socialwifi/jsonapi-requests
python
## Code Before: try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements from setuptools import find_packages from setuptools import setup setup( name='jsonapi-requests', version='0.6.1.dev0', description='Python client implementation for json api. http://jsonapi.org/', author='Social WiFi', author_email='it@socialwifi.com', url='https://github.com/socialwifi/jsonapi-requests', packages=find_packages(exclude=['tests']), install_requires=[str(ir.req) for ir in parse_requirements('base_requirements.txt', session=False)], setup_requires=['pytest-runner'], tests_require=['pytest', 'flask'], extras_require={ 'flask': ['flask'] }, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ] ) ## Instruction: Add long description to package. ## Code After: try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements from setuptools import find_packages from setuptools import setup def get_long_description(): with open('README.md') as readme_file: return readme_file.read() setup( name='jsonapi-requests', version='0.6.1.dev0', description='Python client implementation for json api. http://jsonapi.org/', long_description=get_long_description(), long_description_content_type='text/markdown', author='Social WiFi', author_email='it@socialwifi.com', url='https://github.com/socialwifi/jsonapi-requests', packages=find_packages(exclude=['tests']), install_requires=[str(ir.req) for ir in parse_requirements('base_requirements.txt', session=False)], setup_requires=['pytest-runner'], tests_require=['pytest', 'flask'], extras_require={ 'flask': ['flask'] }, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ] )
try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements from setuptools import find_packages from setuptools import setup + def get_long_description(): + with open('README.md') as readme_file: + return readme_file.read() + + setup( name='jsonapi-requests', version='0.6.1.dev0', description='Python client implementation for json api. http://jsonapi.org/', + long_description=get_long_description(), + long_description_content_type='text/markdown', author='Social WiFi', author_email='it@socialwifi.com', url='https://github.com/socialwifi/jsonapi-requests', packages=find_packages(exclude=['tests']), install_requires=[str(ir.req) for ir in parse_requirements('base_requirements.txt', session=False)], setup_requires=['pytest-runner'], tests_require=['pytest', 'flask'], extras_require={ 'flask': ['flask'] }, license='BSD', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ] )
7
0.189189
7
0
19b6e9492445639277701c3c2ae755c044ea7132
engines/financial_disclosure/app/assets/javascripts/financial_disclosure/templates/funder.hbs
engines/financial_disclosure/app/assets/javascripts/financial_disclosure/templates/funder.hbs
<div class="dataset"> {{input type="text" name="name" value=funder.name class="form-control" placeholder="Funder"}} {{input type="text" name="grant_number" value=funder.grantNumber class="form-control" placeholder="Grant Number"}} {{input type="text" name="website" value=funder.website class="form-control" placeholder="Website"}} <div class="question"> <div class="question-text">Authors who received funding</div> <div class="chosen-style-override"> {{chosen content=allAuthors name="authors" data-placeholder="Choose Author Name" selection=fundedAuthors optionValuePath="content" optionLabelPath="content.fullName" class="chosen-author form-control" multiple=true changeAction="addFundedAuthors"}} </div> OR <a {{action "viewCard" authorsTask}}>Add author</a> </div> </br> <div class="question"> <div class="question-text"> Did the funder have a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript? </div> {{binary-radio-button name="funder-had-influence" selection=funder.funderHadInfluence}} {{#if funder.funderHadInfluence}} <p> Describe the role of any sponsors or funders in the study design, data collection and analysis, decision to publish, or preparation of the manuscript. {{textarea value=funder.funderInfluenceDescription class="form-control"}} </p> {{/if}} </div> </div>
<div class="dataset"> {{input type="text" name="name" value=funder.name class="form-control" placeholder="Funder"}} {{input type="text" name="grant_number" value=funder.grantNumber class="form-control" placeholder="Grant Number"}} {{input type="text" name="website" value=funder.website class="form-control" placeholder="Website"}} <div class="question"> <div class="question-text">Authors who received funding</div> <div class="chosen-style-override"> {{chosen content=allAuthors name="authors" data-placeholder="Choose Author Name" selection=fundedAuthors optionValuePath="content" optionLabelPath="content.fullName" class="chosen-author form-control" multiple=true changeAction="addFundedAuthors"}} </div> </div> </br> <div class="question"> <div class="question-text"> Did the funder have a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript? </div> {{binary-radio-button name="funder-had-influence" selection=funder.funderHadInfluence index=funder.id}} {{#if funder.funderHadInfluence}} <p> Describe the role of any sponsors or funders in the study design, data collection and analysis, decision to publish, or preparation of the manuscript. {{textarea value=funder.funderInfluenceDescription class="form-control"}} </p> {{/if}} </div> </div>
Hide add authors link …till we decide how we implement it
Hide add authors link …till we decide how we implement it
Handlebars
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
handlebars
## Code Before: <div class="dataset"> {{input type="text" name="name" value=funder.name class="form-control" placeholder="Funder"}} {{input type="text" name="grant_number" value=funder.grantNumber class="form-control" placeholder="Grant Number"}} {{input type="text" name="website" value=funder.website class="form-control" placeholder="Website"}} <div class="question"> <div class="question-text">Authors who received funding</div> <div class="chosen-style-override"> {{chosen content=allAuthors name="authors" data-placeholder="Choose Author Name" selection=fundedAuthors optionValuePath="content" optionLabelPath="content.fullName" class="chosen-author form-control" multiple=true changeAction="addFundedAuthors"}} </div> OR <a {{action "viewCard" authorsTask}}>Add author</a> </div> </br> <div class="question"> <div class="question-text"> Did the funder have a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript? </div> {{binary-radio-button name="funder-had-influence" selection=funder.funderHadInfluence}} {{#if funder.funderHadInfluence}} <p> Describe the role of any sponsors or funders in the study design, data collection and analysis, decision to publish, or preparation of the manuscript. {{textarea value=funder.funderInfluenceDescription class="form-control"}} </p> {{/if}} </div> </div> ## Instruction: Hide add authors link …till we decide how we implement it ## Code After: <div class="dataset"> {{input type="text" name="name" value=funder.name class="form-control" placeholder="Funder"}} {{input type="text" name="grant_number" value=funder.grantNumber class="form-control" placeholder="Grant Number"}} {{input type="text" name="website" value=funder.website class="form-control" placeholder="Website"}} <div class="question"> <div class="question-text">Authors who received funding</div> <div class="chosen-style-override"> {{chosen content=allAuthors name="authors" data-placeholder="Choose Author Name" selection=fundedAuthors optionValuePath="content" optionLabelPath="content.fullName" class="chosen-author form-control" multiple=true changeAction="addFundedAuthors"}} </div> </div> </br> <div class="question"> <div class="question-text"> Did the funder have a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript? </div> {{binary-radio-button name="funder-had-influence" selection=funder.funderHadInfluence index=funder.id}} {{#if funder.funderHadInfluence}} <p> Describe the role of any sponsors or funders in the study design, data collection and analysis, decision to publish, or preparation of the manuscript. {{textarea value=funder.funderInfluenceDescription class="form-control"}} </p> {{/if}} </div> </div>
<div class="dataset"> {{input type="text" name="name" value=funder.name class="form-control" placeholder="Funder"}} {{input type="text" name="grant_number" value=funder.grantNumber class="form-control" placeholder="Grant Number"}} {{input type="text" name="website" value=funder.website class="form-control" placeholder="Website"}} <div class="question"> <div class="question-text">Authors who received funding</div> <div class="chosen-style-override"> {{chosen content=allAuthors name="authors" data-placeholder="Choose Author Name" selection=fundedAuthors optionValuePath="content" optionLabelPath="content.fullName" class="chosen-author form-control" multiple=true changeAction="addFundedAuthors"}} </div> - OR - <a {{action "viewCard" authorsTask}}>Add author</a> </div> </br> <div class="question"> <div class="question-text"> Did the funder have a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript? </div> - {{binary-radio-button name="funder-had-influence" selection=funder.funderHadInfluence}} + {{binary-radio-button name="funder-had-influence" selection=funder.funderHadInfluence index=funder.id}} ? ++++++++++++++++ {{#if funder.funderHadInfluence}} <p> Describe the role of any sponsors or funders in the study design, data collection and analysis, decision to publish, or preparation of the manuscript. {{textarea value=funder.funderInfluenceDescription class="form-control"}} </p> {{/if}} </div> </div>
4
0.111111
1
3
286aacc0b9c42dc4746b435761d0e0065a138db8
gulp/development/webserver.coffee
gulp/development/webserver.coffee
{spawn} = require 'child_process' module.exports = (gulp) -> gulp.task 'build:webserver', -> node.kill() if node node = spawn "coffee", ["src/server", '--port', '8000'], stdio: "inherit" node.on "close", (code) -> switch code when 8 gulp.log "Error detected, waiting for changes..."
{spawn} = require 'child_process' module.exports = (gulp) -> gulp.task 'build:webserver', -> node.kill() if node node = spawn "coffee", 'src/server --port 8000 --env development'.split(' '), stdio: "inherit" node.on "close", (code) -> switch code when 8 gulp.log "Error detected, waiting for changes..."
Tidy (looks easier to unterstand)
Tidy (looks easier to unterstand)
CoffeeScript
mit
sm0k1nggnu/entertain.io
coffeescript
## Code Before: {spawn} = require 'child_process' module.exports = (gulp) -> gulp.task 'build:webserver', -> node.kill() if node node = spawn "coffee", ["src/server", '--port', '8000'], stdio: "inherit" node.on "close", (code) -> switch code when 8 gulp.log "Error detected, waiting for changes..." ## Instruction: Tidy (looks easier to unterstand) ## Code After: {spawn} = require 'child_process' module.exports = (gulp) -> gulp.task 'build:webserver', -> node.kill() if node node = spawn "coffee", 'src/server --port 8000 --env development'.split(' '), stdio: "inherit" node.on "close", (code) -> switch code when 8 gulp.log "Error detected, waiting for changes..."
{spawn} = require 'child_process' module.exports = (gulp) -> gulp.task 'build:webserver', -> node.kill() if node - node = spawn "coffee", ["src/server", '--port', '8000'], + node = spawn "coffee", 'src/server --port 8000 --env development'.split(' '), stdio: "inherit" node.on "close", (code) -> switch code when 8 gulp.log "Error detected, waiting for changes..."
2
0.181818
1
1
b504cfd0dcca5f43a8bf31fe251610f50e1263be
.travis.yml
.travis.yml
language: ruby rvm: - 1.9.3 - 1.9.2 - ruby-head - jruby-19mode - jruby-head - rbx-19mode env: - PATH=/opt/mongrel2-1.7.5/bin:$PATH - PATH=/opt/mongrel2-1.8.1/bin:$PATH matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head notifications: irc: "irc.freenode.org#mongrel2-ruby" before_install: - curl -L https://github.com/zedshaw/mongrel2/archive/v1.7.5.tar.gz -o - |tar -jxvf - - cd mongrel2-1.7.5 - make PREFIX=/opt/mongrel2-1.7.5 - sudo make install PREFIX=/opt/mongrel2-1.7.5 - cd .. - mkdir mongrel2-1.8.1 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.8.1.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.8.1 -zxvf - - cd mongrel2-1.8.1 - make PREFIX=/opt/mongrel2-1.8.1 - sudo make install PREFIX=/opt/mongrel2-1.8.1
language: ruby rvm: - 1.9.3 - 1.9.2 - ruby-head - jruby-19mode - jruby-head - rbx-19mode env: - PATH=/opt/mongrel2-1.7.5/bin:$PATH - PATH=/opt/mongrel2-1.8.1/bin:$PATH matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head notifications: irc: "irc.freenode.org#mongrel2-ruby" before_install: - mkdir mongrel2-1.7.5 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.7.5.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.7.5 -zxvf - - cd mongrel2-1.7.5 - make PREFIX=/opt/mongrel2-1.7.5 - sudo make install PREFIX=/opt/mongrel2-1.7.5 - cd .. - mkdir mongrel2-1.8.1 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.8.1.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.8.1 -zxvf - - cd mongrel2-1.8.1 - make PREFIX=/opt/mongrel2-1.8.1 - sudo make install PREFIX=/opt/mongrel2-1.8.1
Fix extracting mongrel archive for CI preparation.
Fix extracting mongrel archive for CI preparation.
YAML
mit
perplexes/m2r
yaml
## Code Before: language: ruby rvm: - 1.9.3 - 1.9.2 - ruby-head - jruby-19mode - jruby-head - rbx-19mode env: - PATH=/opt/mongrel2-1.7.5/bin:$PATH - PATH=/opt/mongrel2-1.8.1/bin:$PATH matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head notifications: irc: "irc.freenode.org#mongrel2-ruby" before_install: - curl -L https://github.com/zedshaw/mongrel2/archive/v1.7.5.tar.gz -o - |tar -jxvf - - cd mongrel2-1.7.5 - make PREFIX=/opt/mongrel2-1.7.5 - sudo make install PREFIX=/opt/mongrel2-1.7.5 - cd .. - mkdir mongrel2-1.8.1 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.8.1.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.8.1 -zxvf - - cd mongrel2-1.8.1 - make PREFIX=/opt/mongrel2-1.8.1 - sudo make install PREFIX=/opt/mongrel2-1.8.1 ## Instruction: Fix extracting mongrel archive for CI preparation. ## Code After: language: ruby rvm: - 1.9.3 - 1.9.2 - ruby-head - jruby-19mode - jruby-head - rbx-19mode env: - PATH=/opt/mongrel2-1.7.5/bin:$PATH - PATH=/opt/mongrel2-1.8.1/bin:$PATH matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head notifications: irc: "irc.freenode.org#mongrel2-ruby" before_install: - mkdir mongrel2-1.7.5 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.7.5.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.7.5 -zxvf - - cd mongrel2-1.7.5 - make PREFIX=/opt/mongrel2-1.7.5 - sudo make install PREFIX=/opt/mongrel2-1.7.5 - cd .. - mkdir mongrel2-1.8.1 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.8.1.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.8.1 -zxvf - - cd mongrel2-1.8.1 - make PREFIX=/opt/mongrel2-1.8.1 - sudo make install PREFIX=/opt/mongrel2-1.8.1
language: ruby rvm: - 1.9.3 - 1.9.2 - ruby-head - jruby-19mode - jruby-head - rbx-19mode env: - PATH=/opt/mongrel2-1.7.5/bin:$PATH - PATH=/opt/mongrel2-1.8.1/bin:$PATH matrix: allow_failures: - rvm: ruby-head - rvm: jruby-head notifications: irc: "irc.freenode.org#mongrel2-ruby" before_install: + - mkdir mongrel2-1.7.5 - - curl -L https://github.com/zedshaw/mongrel2/archive/v1.7.5.tar.gz -o - |tar -jxvf - ? ^ + - curl -L https://github.com/zedshaw/mongrel2/archive/v1.7.5.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.7.5 -zxvf - ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - cd mongrel2-1.7.5 - make PREFIX=/opt/mongrel2-1.7.5 - sudo make install PREFIX=/opt/mongrel2-1.7.5 - cd .. - mkdir mongrel2-1.8.1 - curl -L https://github.com/zedshaw/mongrel2/archive/v1.8.1.tar.gz -o - |tar --strip-components=1 -C mongrel2-1.8.1 -zxvf - - cd mongrel2-1.8.1 - make PREFIX=/opt/mongrel2-1.8.1 - sudo make install PREFIX=/opt/mongrel2-1.8.1
3
0.090909
2
1
2489ed6ff3d812888de4a0a2c45995389499d648
thread_output_ctrl.py
thread_output_ctrl.py
import Queue import wx, wx.stc from editor_fonts import init_stc_style class ThreadOutputCtrl(wx.stc.StyledTextCtrl): def __init__(self, parent, style=wx.TE_READONLY): wx.stc.StyledTextCtrl.__init__(self, parent) init_stc_style(self) self.SetIndent(4) self.SetTabWidth(8) self.SetUseTabs(False) self.queue = Queue.Queue(1024) self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.__OnTimer, self.timer) def __OnTimer(self, evt): self.flush() def flush(self): lines = "".join(self.queue.get_nowait() for _ in xrange(self.queue.qsize())) if lines: self.AppendText(lines) def start(self, interval=100): self.timer.Start(interval) def stop(self): self.timer.Stop() wx.CallAfter(self.flush) def write(self, s): self.queue.put(s) def IsEmpty(self): return self.GetTextLength() == 0
import threading import wx, wx.stc from editor_fonts import init_stc_style class ThreadOutputCtrl(wx.stc.StyledTextCtrl): def __init__(self, parent, style=wx.TE_READONLY): wx.stc.StyledTextCtrl.__init__(self, parent) init_stc_style(self) self.SetIndent(4) self.SetTabWidth(8) self.SetUseTabs(False) self.__lock = threading.Lock() self.__queue = [] self.__timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.__OnTimer, self.__timer) def __OnTimer(self, evt): self.flush() def flush(self): with self.__lock: queue, self.__queue = self.__queue, [] lines = "".join(queue) if lines: self.AppendText(lines) def start(self, interval=100): self.__timer.Start(interval) def stop(self): self.__timer.Stop() wx.CallAfter(self.flush) def write(self, s): with self.__lock: self.__queue.append(s) def IsEmpty(self): return self.GetTextLength() == 0
Use a lock-protected list instead of a Queue.
Use a lock-protected list instead of a Queue.
Python
mit
shaurz/devo
python
## Code Before: import Queue import wx, wx.stc from editor_fonts import init_stc_style class ThreadOutputCtrl(wx.stc.StyledTextCtrl): def __init__(self, parent, style=wx.TE_READONLY): wx.stc.StyledTextCtrl.__init__(self, parent) init_stc_style(self) self.SetIndent(4) self.SetTabWidth(8) self.SetUseTabs(False) self.queue = Queue.Queue(1024) self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.__OnTimer, self.timer) def __OnTimer(self, evt): self.flush() def flush(self): lines = "".join(self.queue.get_nowait() for _ in xrange(self.queue.qsize())) if lines: self.AppendText(lines) def start(self, interval=100): self.timer.Start(interval) def stop(self): self.timer.Stop() wx.CallAfter(self.flush) def write(self, s): self.queue.put(s) def IsEmpty(self): return self.GetTextLength() == 0 ## Instruction: Use a lock-protected list instead of a Queue. ## Code After: import threading import wx, wx.stc from editor_fonts import init_stc_style class ThreadOutputCtrl(wx.stc.StyledTextCtrl): def __init__(self, parent, style=wx.TE_READONLY): wx.stc.StyledTextCtrl.__init__(self, parent) init_stc_style(self) self.SetIndent(4) self.SetTabWidth(8) self.SetUseTabs(False) self.__lock = threading.Lock() self.__queue = [] self.__timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.__OnTimer, self.__timer) def __OnTimer(self, evt): self.flush() def flush(self): with self.__lock: queue, self.__queue = self.__queue, [] lines = "".join(queue) if lines: self.AppendText(lines) def start(self, interval=100): self.__timer.Start(interval) def stop(self): self.__timer.Stop() wx.CallAfter(self.flush) def write(self, s): with self.__lock: self.__queue.append(s) def IsEmpty(self): return self.GetTextLength() == 0
- import Queue + import threading import wx, wx.stc from editor_fonts import init_stc_style class ThreadOutputCtrl(wx.stc.StyledTextCtrl): def __init__(self, parent, style=wx.TE_READONLY): wx.stc.StyledTextCtrl.__init__(self, parent) init_stc_style(self) self.SetIndent(4) self.SetTabWidth(8) self.SetUseTabs(False) - self.queue = Queue.Queue(1024) + self.__lock = threading.Lock() + self.__queue = [] - self.timer = wx.Timer(self) + self.__timer = wx.Timer(self) ? ++ - self.Bind(wx.EVT_TIMER, self.__OnTimer, self.timer) + self.Bind(wx.EVT_TIMER, self.__OnTimer, self.__timer) ? ++ def __OnTimer(self, evt): self.flush() def flush(self): - lines = "".join(self.queue.get_nowait() for _ in xrange(self.queue.qsize())) + with self.__lock: + queue, self.__queue = self.__queue, [] + lines = "".join(queue) if lines: self.AppendText(lines) def start(self, interval=100): - self.timer.Start(interval) + self.__timer.Start(interval) ? ++ def stop(self): - self.timer.Stop() + self.__timer.Stop() ? ++ wx.CallAfter(self.flush) def write(self, s): + with self.__lock: - self.queue.put(s) ? ^^ + self.__queue.append(s) ? ++++ ++ + ^^^^ def IsEmpty(self): return self.GetTextLength() == 0
20
0.540541
12
8
824a79825888d6eb1a2203f5bba3f51357bcc301
qclient.js
qclient.js
/** * QClient.js * ========== * Main module exported from this library. */ /** * QClient * ------- * The main function exposed to your code. * QClient will take your client ID and token * and set up subsequent API calls. * * `clientId` [String] - The Client ID you are given when signing up for Q * `secretToken` [String] - The secret token you are given when signin up for Q */ function QClient(clientId, secretToken) { // body... }
/** * QClient.js * ========== * Main module exported from this library. */ // Require our dependencies var http = require('http'), crypto = require('crypto'); /** * QClient * ------- * The main function exposed to your code. * QClient will take your client ID and token * and set up subsequent API calls. * * `clientId` [String] - The Client ID you are given when signing up for Q * `secretToken` [String] - The secret token you are given when signin up for Q */ function QClient(clientId, secretToken) { if (!(this instanceof QClient)) return new QClient(clientId, secretToken); this.setApiKey(clientId); this.setToken(secretToken); } QClient.prototype = { setApiKey: function(key) { if (key) this.clientId = key; }, setToken: function(secret) { if (secret) this.secretToken = secret; }, /** * Signature * --------- * Build a signature to send in the * request header. */ signature: function(endpoint, reqBody) { var hmac = crypto.createHmac('sha1', this.secretToken).setEncoding('hex'); hmac.write(endpoint + reqBody); hmac.end(); return hmac.read(); }, getSubsidy: function(state, zip, demographics) { var endpoint = ['/plans', state, zip].join('/'), demographics = JSON.stringify(demographics); var request = http.request({ host: 'localhost', path: endpoint, port: 9292, method: 'POST', headers: { 'Authorization': [this.clientId, this.signature(endpoint, demographics)].join(':') } }, function(response) { var reply = ''; response.on('data', function(chunk) { reply += chunk; }); response.on('end', function() { console.log(reply); return reply; }); }); request.write(demographics); console.log(endpoint, [this.clientId, this.signature(endpoint, demographics)].join(':')); return request.end(); } }; module.exports = QClient;
Add QClient function and object prototype.
Add QClient function and object prototype.
JavaScript
mit
billpatrianakos/q-node,Aplo/q-node
javascript
## Code Before: /** * QClient.js * ========== * Main module exported from this library. */ /** * QClient * ------- * The main function exposed to your code. * QClient will take your client ID and token * and set up subsequent API calls. * * `clientId` [String] - The Client ID you are given when signing up for Q * `secretToken` [String] - The secret token you are given when signin up for Q */ function QClient(clientId, secretToken) { // body... } ## Instruction: Add QClient function and object prototype. ## Code After: /** * QClient.js * ========== * Main module exported from this library. */ // Require our dependencies var http = require('http'), crypto = require('crypto'); /** * QClient * ------- * The main function exposed to your code. * QClient will take your client ID and token * and set up subsequent API calls. * * `clientId` [String] - The Client ID you are given when signing up for Q * `secretToken` [String] - The secret token you are given when signin up for Q */ function QClient(clientId, secretToken) { if (!(this instanceof QClient)) return new QClient(clientId, secretToken); this.setApiKey(clientId); this.setToken(secretToken); } QClient.prototype = { setApiKey: function(key) { if (key) this.clientId = key; }, setToken: function(secret) { if (secret) this.secretToken = secret; }, /** * Signature * --------- * Build a signature to send in the * request header. */ signature: function(endpoint, reqBody) { var hmac = crypto.createHmac('sha1', this.secretToken).setEncoding('hex'); hmac.write(endpoint + reqBody); hmac.end(); return hmac.read(); }, getSubsidy: function(state, zip, demographics) { var endpoint = ['/plans', state, zip].join('/'), demographics = JSON.stringify(demographics); var request = http.request({ host: 'localhost', path: endpoint, port: 9292, method: 'POST', headers: { 'Authorization': [this.clientId, this.signature(endpoint, demographics)].join(':') } }, function(response) { var reply = ''; response.on('data', function(chunk) { reply += chunk; }); response.on('end', function() { console.log(reply); return reply; }); }); request.write(demographics); console.log(endpoint, [this.clientId, this.signature(endpoint, demographics)].join(':')); return request.end(); } }; module.exports = QClient;
/** * QClient.js * ========== * Main module exported from this library. */ + + // Require our dependencies + var http = require('http'), + crypto = require('crypto'); /** * QClient * ------- * The main function exposed to your code. * QClient will take your client ID and token * and set up subsequent API calls. * * `clientId` [String] - The Client ID you are given when signing up for Q * `secretToken` [String] - The secret token you are given when signin up for Q */ function QClient(clientId, secretToken) { - // body... + if (!(this instanceof QClient)) return new QClient(clientId, secretToken); + + this.setApiKey(clientId); + this.setToken(secretToken); } + + QClient.prototype = { + setApiKey: function(key) { + if (key) this.clientId = key; + }, + + setToken: function(secret) { + if (secret) this.secretToken = secret; + }, + + /** + * Signature + * --------- + * Build a signature to send in the + * request header. + */ + signature: function(endpoint, reqBody) { + var hmac = crypto.createHmac('sha1', this.secretToken).setEncoding('hex'); + hmac.write(endpoint + reqBody); + hmac.end(); + return hmac.read(); + }, + + getSubsidy: function(state, zip, demographics) { + var endpoint = ['/plans', state, zip].join('/'), + demographics = JSON.stringify(demographics); + + var request = http.request({ + host: 'localhost', + path: endpoint, + port: 9292, + method: 'POST', + headers: { 'Authorization': [this.clientId, this.signature(endpoint, demographics)].join(':') } + }, function(response) { + var reply = ''; + response.on('data', function(chunk) { + reply += chunk; + }); + + response.on('end', function() { + console.log(reply); + + return reply; + }); + }); + + request.write(demographics); + + console.log(endpoint, [this.clientId, this.signature(endpoint, demographics)].join(':')); + + return request.end(); + } + }; + + module.exports = QClient;
64
3.368421
63
1
a194f61be98ca6c68fa84469c65f9112f3848050
SwiftyRSA.podspec
SwiftyRSA.podspec
Pod::Spec.new do |s| s.name = "SwiftyRSA" s.version = "1.5.0" s.summary = "Public key RSA encryption in Swift." s.description = <<-DESC Encrypt with a RSA public key, decrypt with a RSA private key. DESC s.homepage = "https://github.com/TakeScoop/SwiftyRSA" s.license = "MIT" s.author = { "Scoop" => "ops@takescoop.com" } s.source = { :git => "https://github.com/TakeScoop/SwiftyRSA.git", :tag => s.version } s.source_files = "SwiftyRSA/*.{swift,m,h}" s.exclude_files = "SwiftyRSA/SwiftyRSA+ObjC.swift" s.framework = "Security" s.requires_arc = true s.swift_version = "4.1" s.ios.deployment_target = "8.3" s.tvos.deployment_target = "9.2" s.watchos.deployment_target = "2.2" s.subspec "ObjC" do |sp| sp.source_files = "SwiftyRSA/*.{swift,m,h}" end end
Pod::Spec.new do |s| s.name = "SwiftyRSA" s.version = "1.5.0" s.summary = "Public key RSA encryption in Swift." s.description = <<-DESC Encrypt with a RSA public key, decrypt with a RSA private key. DESC s.homepage = "https://github.com/TakeScoop/SwiftyRSA" s.license = "MIT" s.author = { "Scoop" => "ops@takescoop.com" } s.source = { :git => "https://github.com/TakeScoop/SwiftyRSA.git", :tag => s.version } s.source_files = "Source/*.{swift,m,h}" s.exclude_files = "Source/SwiftyRSA+ObjC.swift" s.framework = "Security" s.requires_arc = true s.swift_version = "4.1" s.ios.deployment_target = "8.3" s.tvos.deployment_target = "9.2" s.watchos.deployment_target = "2.2" s.subspec "ObjC" do |sp| sp.source_files = "Source/*.{swift,m,h}" end end
Fix source patterns in podspec
Fix source patterns in podspec
Ruby
mit
TakeScoop/SwiftyRSA,TakeScoop/SwiftyRSA,TakeScoop/SwiftyRSA
ruby
## Code Before: Pod::Spec.new do |s| s.name = "SwiftyRSA" s.version = "1.5.0" s.summary = "Public key RSA encryption in Swift." s.description = <<-DESC Encrypt with a RSA public key, decrypt with a RSA private key. DESC s.homepage = "https://github.com/TakeScoop/SwiftyRSA" s.license = "MIT" s.author = { "Scoop" => "ops@takescoop.com" } s.source = { :git => "https://github.com/TakeScoop/SwiftyRSA.git", :tag => s.version } s.source_files = "SwiftyRSA/*.{swift,m,h}" s.exclude_files = "SwiftyRSA/SwiftyRSA+ObjC.swift" s.framework = "Security" s.requires_arc = true s.swift_version = "4.1" s.ios.deployment_target = "8.3" s.tvos.deployment_target = "9.2" s.watchos.deployment_target = "2.2" s.subspec "ObjC" do |sp| sp.source_files = "SwiftyRSA/*.{swift,m,h}" end end ## Instruction: Fix source patterns in podspec ## Code After: Pod::Spec.new do |s| s.name = "SwiftyRSA" s.version = "1.5.0" s.summary = "Public key RSA encryption in Swift." s.description = <<-DESC Encrypt with a RSA public key, decrypt with a RSA private key. DESC s.homepage = "https://github.com/TakeScoop/SwiftyRSA" s.license = "MIT" s.author = { "Scoop" => "ops@takescoop.com" } s.source = { :git => "https://github.com/TakeScoop/SwiftyRSA.git", :tag => s.version } s.source_files = "Source/*.{swift,m,h}" s.exclude_files = "Source/SwiftyRSA+ObjC.swift" s.framework = "Security" s.requires_arc = true s.swift_version = "4.1" s.ios.deployment_target = "8.3" s.tvos.deployment_target = "9.2" s.watchos.deployment_target = "2.2" s.subspec "ObjC" do |sp| sp.source_files = "Source/*.{swift,m,h}" end end
Pod::Spec.new do |s| s.name = "SwiftyRSA" s.version = "1.5.0" s.summary = "Public key RSA encryption in Swift." s.description = <<-DESC Encrypt with a RSA public key, decrypt with a RSA private key. DESC s.homepage = "https://github.com/TakeScoop/SwiftyRSA" s.license = "MIT" s.author = { "Scoop" => "ops@takescoop.com" } s.source = { :git => "https://github.com/TakeScoop/SwiftyRSA.git", :tag => s.version } - s.source_files = "SwiftyRSA/*.{swift,m,h}" ? ^^^^^^^^ + s.source_files = "Source/*.{swift,m,h}" ? ^^^^^ - s.exclude_files = "SwiftyRSA/SwiftyRSA+ObjC.swift" ? ^^^^^^^^ + s.exclude_files = "Source/SwiftyRSA+ObjC.swift" ? ^^^^^ s.framework = "Security" s.requires_arc = true s.swift_version = "4.1" s.ios.deployment_target = "8.3" s.tvos.deployment_target = "9.2" s.watchos.deployment_target = "2.2" s.subspec "ObjC" do |sp| - sp.source_files = "SwiftyRSA/*.{swift,m,h}" ? ^^^^^^^^ + sp.source_files = "Source/*.{swift,m,h}" ? ^^^^^ end end
6
0.206897
3
3
42d5edf83e4f76a89463aa11258cff102510d1ed
src/scripts/wowser/ui/screens/authentication.coffee
src/scripts/wowser/ui/screens/authentication.coffee
class Wowser.ui.screens.Authentication constructor: (@$scope, @$rootScope) -> @session = new Wowser(Wowser.expansions.wotlk) @host = 'localhost' @username = '' @password = '' @session.auth.on 'connect', => @authenticate() @session.auth.on 'authenticate', => @$rootScope.state = 'realm-selection' @$rootScope.$apply() @session.auth.on 'reject', => @session.auth.disconnect() connect: -> @session.auth.connect(@host) authenticate: -> @session.auth.authenticate(@username, @password)
class Wowser.ui.screens.Authentication constructor: (@$scope) -> @session = @$scope.session @host = 'localhost' @username = '' @password = '' @session.auth.on 'connect', => @authenticate() @session.auth.on 'authenticate', => @$scope.$apply => @session.screen = 'realm-selection' @session.auth.on 'reject', => @session.auth.disconnect() connect: -> @session.auth.connect(@host) authenticate: -> @session.auth.authenticate(@username, @password)
Use session stored in scope
Use session stored in scope
CoffeeScript
mit
eoy/wowser,wowserhq/wowser,eoy/wowser,timkurvers/wowser,wowserhq/wowser,timkurvers/wowser
coffeescript
## Code Before: class Wowser.ui.screens.Authentication constructor: (@$scope, @$rootScope) -> @session = new Wowser(Wowser.expansions.wotlk) @host = 'localhost' @username = '' @password = '' @session.auth.on 'connect', => @authenticate() @session.auth.on 'authenticate', => @$rootScope.state = 'realm-selection' @$rootScope.$apply() @session.auth.on 'reject', => @session.auth.disconnect() connect: -> @session.auth.connect(@host) authenticate: -> @session.auth.authenticate(@username, @password) ## Instruction: Use session stored in scope ## Code After: class Wowser.ui.screens.Authentication constructor: (@$scope) -> @session = @$scope.session @host = 'localhost' @username = '' @password = '' @session.auth.on 'connect', => @authenticate() @session.auth.on 'authenticate', => @$scope.$apply => @session.screen = 'realm-selection' @session.auth.on 'reject', => @session.auth.disconnect() connect: -> @session.auth.connect(@host) authenticate: -> @session.auth.authenticate(@username, @password)
class Wowser.ui.screens.Authentication - constructor: (@$scope, @$rootScope) -> ? ------------- + constructor: (@$scope) -> - @session = new Wowser(Wowser.expansions.wotlk) + @session = @$scope.session @host = 'localhost' @username = '' @password = '' @session.auth.on 'connect', => @authenticate() @session.auth.on 'authenticate', => - @$rootScope.state = 'realm-selection' - @$rootScope.$apply() ? ^^^^^ ^^ + @$scope.$apply => ? ^ ^^^ + @session.screen = 'realm-selection' @session.auth.on 'reject', => @session.auth.disconnect() connect: -> @session.auth.connect(@host) authenticate: -> @session.auth.authenticate(@username, @password)
8
0.347826
4
4
20903b47a953aa1f366e68afce4676677c7ba723
cu-compose/reset.sh
cu-compose/reset.sh
docker rm -vf $(docker ps -aq) docker-compose up -d dnsdock sleep 10 docker-compose up -d mysqldata docker-compose up -d mysql sleep 10 docker-compose up -d cadvisor docker-compose up -d hipache docker-compose up -d redis docker-compose up -d gitlab docker-compose up -d jenkins docker-compose up -d tomcat sleep 60 docker-compose up -d nginx docker-compose logs -f
docker rm -vf $(docker ps -aq) docker-compose up -d dnsdock sleep 10 docker-compose up -d mysqldata docker-compose up -d mysql sleep 10 docker-compose up -d cadvisor docker-compose up -d hipache docker-compose up -d redis docker-compose up -d gitlab docker-compose up -d jenkins docker-compose up -d tomcat docker-compose up -d java sleep 60 docker-compose up -d nginx docker-compose logs -f
FIX : Add java at startup
FIX : Add java at startup
Shell
agpl-3.0
Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit
shell
## Code Before: docker rm -vf $(docker ps -aq) docker-compose up -d dnsdock sleep 10 docker-compose up -d mysqldata docker-compose up -d mysql sleep 10 docker-compose up -d cadvisor docker-compose up -d hipache docker-compose up -d redis docker-compose up -d gitlab docker-compose up -d jenkins docker-compose up -d tomcat sleep 60 docker-compose up -d nginx docker-compose logs -f ## Instruction: FIX : Add java at startup ## Code After: docker rm -vf $(docker ps -aq) docker-compose up -d dnsdock sleep 10 docker-compose up -d mysqldata docker-compose up -d mysql sleep 10 docker-compose up -d cadvisor docker-compose up -d hipache docker-compose up -d redis docker-compose up -d gitlab docker-compose up -d jenkins docker-compose up -d tomcat docker-compose up -d java sleep 60 docker-compose up -d nginx docker-compose logs -f
docker rm -vf $(docker ps -aq) docker-compose up -d dnsdock sleep 10 docker-compose up -d mysqldata docker-compose up -d mysql sleep 10 docker-compose up -d cadvisor docker-compose up -d hipache docker-compose up -d redis docker-compose up -d gitlab docker-compose up -d jenkins docker-compose up -d tomcat + docker-compose up -d java sleep 60 docker-compose up -d nginx docker-compose logs -f
1
0.05
1
0
923d73510844f31dadf9bfef82832ab8f2f8ef06
emacs/config/init-evil-mode.el
emacs/config/init-evil-mode.el
(require-package 'evil) (require-package 'evil-leader) (require-package 'evil-nerd-commenter) ; Setup evil leader (global-evil-leader-mode) (setq evil-leader/in-all-states t) (evil-leader/set-leader ",") (evil-leader/set-key "f" 'fuzzy-finder "b" 'switch-to-buffer "k" 'kill-buffer "s" 'save-buffer "q" 'quit-window "n" 'new-buffer "i" 'imenu ) ; Enable evil-nerd-commenter (evilnc-default-hotkeys) ; Enable evil mode (evil-mode t) (provide 'init-evil-mode)
(require-package 'evil) (require-package 'evil-leader) (require-package 'evil-nerd-commenter) (setq evil-leader/in-all-states t) (setq evil-leader/no-prefix-mode-rx '(".*-mode")) ; Setup evil leader (global-evil-leader-mode) (evil-leader/set-leader ",") (evil-leader/set-key "f" 'fuzzy-finder "b" 'switch-to-buffer "k" 'kill-buffer "s" 'save-buffer "q" 'quit-window "n" 'new-buffer "i" 'imenu ) ; Enable evil-nerd-commenter (evilnc-default-hotkeys) ; Enable evil mode (evil-mode t) (provide 'init-evil-mode)
Fix evil-leader in Insert mode
Emacs: Fix evil-leader in Insert mode
Emacs Lisp
mit
romanoaugusto88/dotfiles
emacs-lisp
## Code Before: (require-package 'evil) (require-package 'evil-leader) (require-package 'evil-nerd-commenter) ; Setup evil leader (global-evil-leader-mode) (setq evil-leader/in-all-states t) (evil-leader/set-leader ",") (evil-leader/set-key "f" 'fuzzy-finder "b" 'switch-to-buffer "k" 'kill-buffer "s" 'save-buffer "q" 'quit-window "n" 'new-buffer "i" 'imenu ) ; Enable evil-nerd-commenter (evilnc-default-hotkeys) ; Enable evil mode (evil-mode t) (provide 'init-evil-mode) ## Instruction: Emacs: Fix evil-leader in Insert mode ## Code After: (require-package 'evil) (require-package 'evil-leader) (require-package 'evil-nerd-commenter) (setq evil-leader/in-all-states t) (setq evil-leader/no-prefix-mode-rx '(".*-mode")) ; Setup evil leader (global-evil-leader-mode) (evil-leader/set-leader ",") (evil-leader/set-key "f" 'fuzzy-finder "b" 'switch-to-buffer "k" 'kill-buffer "s" 'save-buffer "q" 'quit-window "n" 'new-buffer "i" 'imenu ) ; Enable evil-nerd-commenter (evilnc-default-hotkeys) ; Enable evil mode (evil-mode t) (provide 'init-evil-mode)
(require-package 'evil) (require-package 'evil-leader) (require-package 'evil-nerd-commenter) + (setq evil-leader/in-all-states t) + (setq evil-leader/no-prefix-mode-rx '(".*-mode")) ; Setup evil leader (global-evil-leader-mode) - (setq evil-leader/in-all-states t) (evil-leader/set-leader ",") (evil-leader/set-key "f" 'fuzzy-finder "b" 'switch-to-buffer "k" 'kill-buffer "s" 'save-buffer "q" 'quit-window "n" 'new-buffer "i" 'imenu ) ; Enable evil-nerd-commenter (evilnc-default-hotkeys) ; Enable evil mode (evil-mode t) (provide 'init-evil-mode)
3
0.125
2
1
1b30978d7c553bdb9786286374f02c9e41ebb6bd
arch/sgi/include/vmparam.h
arch/sgi/include/vmparam.h
/* $OpenBSD: vmparam.h,v 1.9 2011/05/30 22:25:22 oga Exp $ */ /* public domain */ #ifndef _MACHINE_VMPARAM_H_ #define _MACHINE_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ /* * On Origin and Octane families, DMA to 32-bit PCI devices is restricted. * * Systems with physical memory after the 2GB boundary need to ensure * memory which may used for DMA transfers is allocated from the low * memory range. * * Other systems, like the O2, do not have such a restriction, but can not * have more than 2GB of physical memory, so this doesn't affect them. */ #include <mips64/vmparam.h> #endif /* _MACHINE_VMPARAM_H_ */
/* $OpenBSD: vmparam.h,v 1.10 2014/07/13 15:48:32 miod Exp $ */ /* public domain */ #ifndef _MACHINE_VMPARAM_H_ #define _MACHINE_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ #include <mips64/vmparam.h> #endif /* _MACHINE_VMPARAM_H_ */
Remove stale comment which used to explain why we had a special 31-bit freelist for DMA, back when this was applicable.
Remove stale comment which used to explain why we had a special 31-bit freelist for DMA, back when this was applicable.
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
c
## Code Before: /* $OpenBSD: vmparam.h,v 1.9 2011/05/30 22:25:22 oga Exp $ */ /* public domain */ #ifndef _MACHINE_VMPARAM_H_ #define _MACHINE_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ /* * On Origin and Octane families, DMA to 32-bit PCI devices is restricted. * * Systems with physical memory after the 2GB boundary need to ensure * memory which may used for DMA transfers is allocated from the low * memory range. * * Other systems, like the O2, do not have such a restriction, but can not * have more than 2GB of physical memory, so this doesn't affect them. */ #include <mips64/vmparam.h> #endif /* _MACHINE_VMPARAM_H_ */ ## Instruction: Remove stale comment which used to explain why we had a special 31-bit freelist for DMA, back when this was applicable. ## Code After: /* $OpenBSD: vmparam.h,v 1.10 2014/07/13 15:48:32 miod Exp $ */ /* public domain */ #ifndef _MACHINE_VMPARAM_H_ #define _MACHINE_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ #include <mips64/vmparam.h> #endif /* _MACHINE_VMPARAM_H_ */
- /* $OpenBSD: vmparam.h,v 1.9 2011/05/30 22:25:22 oga Exp $ */ ? ^ ^ ^ - ^^^^ ^ ^^ + /* $OpenBSD: vmparam.h,v 1.10 2014/07/13 15:48:32 miod Exp $ */ ? ^^ ^ ^ + ^ ^^^^ ++ ^ /* public domain */ #ifndef _MACHINE_VMPARAM_H_ #define _MACHINE_VMPARAM_H_ #define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */ - /* - * On Origin and Octane families, DMA to 32-bit PCI devices is restricted. - * - * Systems with physical memory after the 2GB boundary need to ensure - * memory which may used for DMA transfers is allocated from the low - * memory range. - * - * Other systems, like the O2, do not have such a restriction, but can not - * have more than 2GB of physical memory, so this doesn't affect them. - */ - #include <mips64/vmparam.h> #endif /* _MACHINE_VMPARAM_H_ */
13
0.619048
1
12
9da2826b91e349c8f38af5e65f572000984ed075
felix_requirements.txt
felix_requirements.txt
gevent greenlet netaddr python-etcd>=0.4.1 posix-spawn>=0.2.post6 datrie>=0.7 ijson>=2.2 msgpack-python>=0.3 pycparser!=2.14 pyparsing>=2.0.0 prometheus_client>=0.0.13 urllib3>=1.7.1 setuptools
gevent greenlet netaddr python-etcd>=0.4.1 posix-spawn>=0.2.post6 datrie>=0.7 ijson>=2.2 msgpack-python>=0.3 pyparsing>=2.0.0 prometheus_client>=0.0.13 urllib3>=1.7.1 setuptools
Revert "Fix 'pycparser' module installation issue"
Revert "Fix 'pycparser' module installation issue"
Text
apache-2.0
Metaswitch/calico,matthewdupre/felix,matthewdupre/felix,neiljerram/felix,neiljerram/felix,neiljerram/felix,neiljerram/felix,Metaswitch/calico
text
## Code Before: gevent greenlet netaddr python-etcd>=0.4.1 posix-spawn>=0.2.post6 datrie>=0.7 ijson>=2.2 msgpack-python>=0.3 pycparser!=2.14 pyparsing>=2.0.0 prometheus_client>=0.0.13 urllib3>=1.7.1 setuptools ## Instruction: Revert "Fix 'pycparser' module installation issue" ## Code After: gevent greenlet netaddr python-etcd>=0.4.1 posix-spawn>=0.2.post6 datrie>=0.7 ijson>=2.2 msgpack-python>=0.3 pyparsing>=2.0.0 prometheus_client>=0.0.13 urllib3>=1.7.1 setuptools
gevent greenlet netaddr python-etcd>=0.4.1 posix-spawn>=0.2.post6 datrie>=0.7 ijson>=2.2 msgpack-python>=0.3 - pycparser!=2.14 pyparsing>=2.0.0 prometheus_client>=0.0.13 urllib3>=1.7.1 setuptools
1
0.076923
0
1
f8fb677b68020b67b215788f7c08b1c644e2f22b
app/assets/javascripts/launch-countdown.js
app/assets/javascripts/launch-countdown.js
$(document).ready(function() { $('.date').each(function() { var _this = $(this) countdown(Date.parse($(this).data('launch-date')), function(ts) { _this.html(ts.toHTML()); }, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); }); });
$(document).ready(function() { $('.date').each(function() { var _this = $(this) launchDate = Date.parse($(this).data('launch-date')); if(launchDate && launchDate > Date.today()) { countdown(launchDate, function(ts) { _this.html(ts.toHTML()); }, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); } }); });
Remove countdownjs (countup) from dates in the past
Remove countdownjs (countup) from dates in the past
JavaScript
mit
Green-Squad/Release-DB,Green-Squad/Release-DB,Green-Squad/Release-DB
javascript
## Code Before: $(document).ready(function() { $('.date').each(function() { var _this = $(this) countdown(Date.parse($(this).data('launch-date')), function(ts) { _this.html(ts.toHTML()); }, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); }); }); ## Instruction: Remove countdownjs (countup) from dates in the past ## Code After: $(document).ready(function() { $('.date').each(function() { var _this = $(this) launchDate = Date.parse($(this).data('launch-date')); if(launchDate && launchDate > Date.today()) { countdown(launchDate, function(ts) { _this.html(ts.toHTML()); }, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); } }); });
$(document).ready(function() { $('.date').each(function() { var _this = $(this) - countdown(Date.parse($(this).data('launch-date')), function(ts) { + launchDate = Date.parse($(this).data('launch-date')); + if(launchDate && launchDate > Date.today()) { + countdown(launchDate, function(ts) { - _this.html(ts.toHTML()); + _this.html(ts.toHTML()); ? ++ - }, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); + }, countdown.YEARS | countdown.MONTHS | countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); ? ++ - + } }); });
10
1.111111
6
4
3d4d3fa8eaae79c656fef9fa20727abc873ba966
.travis.yml
.travis.yml
language: python install: pip install tox env: - TOX_ENV=docs - TOX_ENV=py27-flake8 - TOX_ENV=py26-virtualenv-17x - TOX_ENV=py26-virtualenv-18x - TOX_ENV=py26-virtualenv-19x - TOX_ENV=py26-virtualenv-150x - TOX_ENV=py26-virtualenv-151x - TOX_ENV=py27-virtualenv-17x - TOX_ENV=py27-virtualenv-18x - TOX_ENV=py27-virtualenv-19x - TOX_ENV=py27-virtualenv-150x - TOX_ENV=py27-virtualenv-151x script: tox -e $TOX_ENV notifications: email: - kyle.gibson@frozenonline.com
language: python install: pip install tox env: - TOX_ENV=docs - TOX_ENV=py27-flake8 - TOX_ENV=py26-virtualenv-17x - TOX_ENV=py26-virtualenv-18x - TOX_ENV=py26-virtualenv-19x - TOX_ENV=py26-virtualenv-150x - TOX_ENV=py26-virtualenv-151x - TOX_ENV=py27-virtualenv-17x - TOX_ENV=py27-virtualenv-18x - TOX_ENV=py27-virtualenv-19x - TOX_ENV=py27-virtualenv-150x - TOX_ENV=py27-virtualenv-151x - TOX_ENV=test_build script: tox -e $TOX_ENV notifications: email: - kyle.gibson@frozenonline.com
Add a test run called 'test_build'
Add a test run called 'test_build'
YAML
bsd-3-clause
PolicyStat/terrarium
yaml
## Code Before: language: python install: pip install tox env: - TOX_ENV=docs - TOX_ENV=py27-flake8 - TOX_ENV=py26-virtualenv-17x - TOX_ENV=py26-virtualenv-18x - TOX_ENV=py26-virtualenv-19x - TOX_ENV=py26-virtualenv-150x - TOX_ENV=py26-virtualenv-151x - TOX_ENV=py27-virtualenv-17x - TOX_ENV=py27-virtualenv-18x - TOX_ENV=py27-virtualenv-19x - TOX_ENV=py27-virtualenv-150x - TOX_ENV=py27-virtualenv-151x script: tox -e $TOX_ENV notifications: email: - kyle.gibson@frozenonline.com ## Instruction: Add a test run called 'test_build' ## Code After: language: python install: pip install tox env: - TOX_ENV=docs - TOX_ENV=py27-flake8 - TOX_ENV=py26-virtualenv-17x - TOX_ENV=py26-virtualenv-18x - TOX_ENV=py26-virtualenv-19x - TOX_ENV=py26-virtualenv-150x - TOX_ENV=py26-virtualenv-151x - TOX_ENV=py27-virtualenv-17x - TOX_ENV=py27-virtualenv-18x - TOX_ENV=py27-virtualenv-19x - TOX_ENV=py27-virtualenv-150x - TOX_ENV=py27-virtualenv-151x - TOX_ENV=test_build script: tox -e $TOX_ENV notifications: email: - kyle.gibson@frozenonline.com
language: python install: pip install tox env: - TOX_ENV=docs - TOX_ENV=py27-flake8 - TOX_ENV=py26-virtualenv-17x - TOX_ENV=py26-virtualenv-18x - TOX_ENV=py26-virtualenv-19x - TOX_ENV=py26-virtualenv-150x - TOX_ENV=py26-virtualenv-151x - TOX_ENV=py27-virtualenv-17x - TOX_ENV=py27-virtualenv-18x - TOX_ENV=py27-virtualenv-19x - TOX_ENV=py27-virtualenv-150x - TOX_ENV=py27-virtualenv-151x + - TOX_ENV=test_build script: tox -e $TOX_ENV notifications: email: - kyle.gibson@frozenonline.com
1
0.052632
1
0
a4b07f516938a23e37968f29da78f0b61d670a9a
DependencyInjection/Compiler/FormPass.php
DependencyInjection/Compiler/FormPass.php
<?php /* * This file is part of the MopaBootstrapBundle. * * (c) Philipp A. Mohrenweiser <phiamo@googlemail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mopa\Bundle\BootstrapBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * Add a new twig.form.resources * * @author Philipp A. Mohrenweiser <phiamo@googlemail.com> */ class FormPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (($template = $container->getParameter('mopa_bootstrap.form.templating')) !== false) { $resources = $container->getParameter('twig.form.resources'); # Ensure it wasnt already aded via config if (!in_array($template, $resources)) { //Ensures Mopa comes in before other resources $coreResource = array_shift($resources); array_unshift($resources, $template); array_unshift($resources, $coreResource); $container->setParameter('twig.form.resources', $resources); } } } }
<?php /* * This file is part of the MopaBootstrapBundle. * * (c) Philipp A. Mohrenweiser <phiamo@googlemail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mopa\Bundle\BootstrapBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * Add a new twig.form.resources * * @author Philipp A. Mohrenweiser <phiamo@googlemail.com> */ class FormPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (($template = $container->getParameter('mopa_bootstrap.form.templating')) !== false) { $resources = $container->getParameter('twig.form.resources'); # Ensure it wasnt already aded via config if (!in_array($template, $resources)) { // If form_div_layout.html.twig is found, insert Mopa right after if (($key = array_search('form_div_layout.html.twig', $resources)) !== false) { array_splice($resources, ++$key, 0, $template); } // Else insert Mopa in first position else { array_unshift($resources, $template); } $container->setParameter('twig.form.resources', $resources); } } } }
Fix template insertion in twig.form.resources
Fix template insertion in twig.form.resources We can't be sure that the core template will be in first position (see https://github.com/symfony-cmf/RoutingExtraBundle/pull/48/files#r2514138) Now the core template is searched and if it exists, mopa's template is inserted right after.
PHP
mit
auipga/MopaBootstrapBundle,auipga/MopaBootstrapBundle,auipga/MopaBootstrapBundle,naitsirch/mopa-bootstrap-bundle,naitsirch/mopa-bootstrap-bundle
php
## Code Before: <?php /* * This file is part of the MopaBootstrapBundle. * * (c) Philipp A. Mohrenweiser <phiamo@googlemail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mopa\Bundle\BootstrapBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * Add a new twig.form.resources * * @author Philipp A. Mohrenweiser <phiamo@googlemail.com> */ class FormPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (($template = $container->getParameter('mopa_bootstrap.form.templating')) !== false) { $resources = $container->getParameter('twig.form.resources'); # Ensure it wasnt already aded via config if (!in_array($template, $resources)) { //Ensures Mopa comes in before other resources $coreResource = array_shift($resources); array_unshift($resources, $template); array_unshift($resources, $coreResource); $container->setParameter('twig.form.resources', $resources); } } } } ## Instruction: Fix template insertion in twig.form.resources We can't be sure that the core template will be in first position (see https://github.com/symfony-cmf/RoutingExtraBundle/pull/48/files#r2514138) Now the core template is searched and if it exists, mopa's template is inserted right after. ## Code After: <?php /* * This file is part of the MopaBootstrapBundle. * * (c) Philipp A. Mohrenweiser <phiamo@googlemail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mopa\Bundle\BootstrapBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * Add a new twig.form.resources * * @author Philipp A. Mohrenweiser <phiamo@googlemail.com> */ class FormPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (($template = $container->getParameter('mopa_bootstrap.form.templating')) !== false) { $resources = $container->getParameter('twig.form.resources'); # Ensure it wasnt already aded via config if (!in_array($template, $resources)) { // If form_div_layout.html.twig is found, insert Mopa right after if (($key = array_search('form_div_layout.html.twig', $resources)) !== false) { array_splice($resources, ++$key, 0, $template); } // Else insert Mopa in first position else { array_unshift($resources, $template); } $container->setParameter('twig.form.resources', $resources); } } } }
<?php /* * This file is part of the MopaBootstrapBundle. * * (c) Philipp A. Mohrenweiser <phiamo@googlemail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mopa\Bundle\BootstrapBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; /** * Add a new twig.form.resources * * @author Philipp A. Mohrenweiser <phiamo@googlemail.com> */ class FormPass implements CompilerPassInterface { /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { if (($template = $container->getParameter('mopa_bootstrap.form.templating')) !== false) { $resources = $container->getParameter('twig.form.resources'); # Ensure it wasnt already aded via config - if (!in_array($template, $resources)) { + if (!in_array($template, $resources)) { ? ++++++++++++++++ - //Ensures Mopa comes in before other resources - $coreResource = array_shift($resources); + // If form_div_layout.html.twig is found, insert Mopa right after + if (($key = array_search('form_div_layout.html.twig', $resources)) !== false) { + array_splice($resources, ++$key, 0, $template); + } + // Else insert Mopa in first position + else { - array_unshift($resources, $template); + array_unshift($resources, $template); ? ++++ - array_unshift($resources, $coreResource); + } $container->setParameter('twig.form.resources', $resources); } } } }
14
0.333333
9
5
0e219684c41f3792db2ffc497e0ab0a5c50e71e5
.travis.yml
.travis.yml
sudo: false language: node_js script: npm run test:travis node_js: - 'lts/*'
sudo: required addons: chrome: stable language: node_js node_js: - '10' cache: directories: - ~/.npm - node_modules install: - npm install script: npm run test:travis
Update Travis config for chrome
Update Travis config for chrome
YAML
mit
jhwohlgemuth/voxelcss,jhwohlgemuth/voxelcss
yaml
## Code Before: sudo: false language: node_js script: npm run test:travis node_js: - 'lts/*' ## Instruction: Update Travis config for chrome ## Code After: sudo: required addons: chrome: stable language: node_js node_js: - '10' cache: directories: - ~/.npm - node_modules install: - npm install script: npm run test:travis
- sudo: false + sudo: required + addons: + chrome: stable language: node_js + node_js: + - '10' + cache: + directories: + - ~/.npm + - node_modules + install: + - npm install script: npm run test:travis - node_js: - - 'lts/*'
14
2.8
11
3
553da6ec444f4b0ed49b8cee7763547c04da5e9a
lib/wakame/trigger.rb
lib/wakame/trigger.rb
module Wakame class Trigger include FilterChain include AttributeHelper def_attribute :enabled, true attr_reader :rule_engine def command_queue @rule_engine.command_queue end def service_cluster @rule_engine.service_cluster end def master @rule_engine.master end def agent_monitor @rule_engine.agent_monitor end def bind_engine(rule_engine) @rule_engine = rule_engine end def trigger_action(action) rule_engine.create_job_context(self, action) action.bind_trigger(self) rule_engine.run_action(action) action.job_id end def register_hooks end def cleanup end protected def event_subscribe(event_class, &blk) EventDispatcher.subscribe(event_class) { |event| begin run_filter(self) blk.call(event) if self.enabled rescue => e Wakame.log.error(e) end } end end end
module Wakame class Trigger include FilterChain include AttributeHelper def_attribute :enabled, true attr_reader :rule_engine def command_queue @rule_engine.command_queue end def service_cluster @rule_engine.service_cluster end alias :cluster :service_cluster def master @rule_engine.master end def agent_monitor @rule_engine.agent_monitor end def bind_engine(rule_engine) @rule_engine = rule_engine end def trigger_action(action) rule_engine.create_job_context(self, action) action.bind_trigger(self) rule_engine.run_action(action) action.job_id end def register_hooks end def cleanup end protected def event_subscribe(event_class, &blk) EventDispatcher.subscribe(event_class) { |event| begin run_filter(self) blk.call(event) if self.enabled rescue => e Wakame.log.error(e) end } end end end
Add attribute alias for service_cluster.
Add attribute alias for service_cluster.
Ruby
apache-2.0
axsh/wakame-fuel,axsh/wakame-fuel,axsh/wakame-fuel
ruby
## Code Before: module Wakame class Trigger include FilterChain include AttributeHelper def_attribute :enabled, true attr_reader :rule_engine def command_queue @rule_engine.command_queue end def service_cluster @rule_engine.service_cluster end def master @rule_engine.master end def agent_monitor @rule_engine.agent_monitor end def bind_engine(rule_engine) @rule_engine = rule_engine end def trigger_action(action) rule_engine.create_job_context(self, action) action.bind_trigger(self) rule_engine.run_action(action) action.job_id end def register_hooks end def cleanup end protected def event_subscribe(event_class, &blk) EventDispatcher.subscribe(event_class) { |event| begin run_filter(self) blk.call(event) if self.enabled rescue => e Wakame.log.error(e) end } end end end ## Instruction: Add attribute alias for service_cluster. ## Code After: module Wakame class Trigger include FilterChain include AttributeHelper def_attribute :enabled, true attr_reader :rule_engine def command_queue @rule_engine.command_queue end def service_cluster @rule_engine.service_cluster end alias :cluster :service_cluster def master @rule_engine.master end def agent_monitor @rule_engine.agent_monitor end def bind_engine(rule_engine) @rule_engine = rule_engine end def trigger_action(action) rule_engine.create_job_context(self, action) action.bind_trigger(self) rule_engine.run_action(action) action.job_id end def register_hooks end def cleanup end protected def event_subscribe(event_class, &blk) EventDispatcher.subscribe(event_class) { |event| begin run_filter(self) blk.call(event) if self.enabled rescue => e Wakame.log.error(e) end } end end end
module Wakame class Trigger include FilterChain include AttributeHelper def_attribute :enabled, true attr_reader :rule_engine def command_queue @rule_engine.command_queue end def service_cluster @rule_engine.service_cluster end + alias :cluster :service_cluster def master @rule_engine.master end def agent_monitor @rule_engine.agent_monitor end def bind_engine(rule_engine) @rule_engine = rule_engine end def trigger_action(action) rule_engine.create_job_context(self, action) action.bind_trigger(self) rule_engine.run_action(action) action.job_id end def register_hooks end def cleanup end protected def event_subscribe(event_class, &blk) EventDispatcher.subscribe(event_class) { |event| begin run_filter(self) blk.call(event) if self.enabled rescue => e Wakame.log.error(e) end } end end end
1
0.017544
1
0
d05dd99e2ebd333531181c5c0c6f448e005e30bc
cm.mk
cm.mk
TARGET_SCREEN_HEIGHT := 1920 TARGET_SCREEN_WIDTH := 1080 TARGET_BOOTANIMATION_HALF_RES := true # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Enhanced NFC $(call inherit-product, vendor/cm/config/nfc_enhanced.mk) # Inherit device configuration $(call inherit-product, device/lge/hammerhead/full_hammerhead.mk) ## Device identifier. This must come after all inclusions PRODUCT_DEVICE := hammerhead PRODUCT_NAME := cm_hammerhead PRODUCT_BRAND := google PRODUCT_MODEL := Nexus 5 PRODUCT_MANUFACTURER := LGE PRODUCT_BUILD_PROP_OVERRIDES += \ PRODUCT_NAME=hammerhead \ BUILD_FINGERPRINT=google/hammerhead/hammerhead:6.0.1/MOB30D/2704746:user/release-keys \ PRIVATE_BUILD_DESC="hammerhead-user 6.0.1 MOB30D 2704746 release-keys"
TARGET_SCREEN_HEIGHT := 1920 TARGET_SCREEN_WIDTH := 1080 TARGET_BOOTANIMATION_HALF_RES := true # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Enhanced NFC $(call inherit-product, vendor/cm/config/nfc_enhanced.mk) # Inherit device configuration $(call inherit-product, device/lge/hammerhead/full_hammerhead.mk) ## Device identifier. This must come after all inclusions PRODUCT_DEVICE := hammerhead PRODUCT_NAME := cm_hammerhead PRODUCT_BRAND := google PRODUCT_MODEL := Nexus 5 PRODUCT_MANUFACTURER := LGE PRODUCT_BUILD_PROP_OVERRIDES += \ PRODUCT_NAME=hammerhead \ BUILD_FINGERPRINT=google/hammerhead/hammerhead:6.0.1/MOB30M/2862625:user/release-keys \ PRIVATE_BUILD_DESC="hammerhead-user 6.0.1 MOB30M 2862625 release-keys"
Update fingerprints and build desc.
hammerhead: Update fingerprints and build desc. Change-Id: Icabe62dd84ae744d2a4c9f6fbdd6cbbd001b638d hammerhead: Update fingerprints and build description according to MOB30M
Makefile
apache-2.0
maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead
makefile
## Code Before: TARGET_SCREEN_HEIGHT := 1920 TARGET_SCREEN_WIDTH := 1080 TARGET_BOOTANIMATION_HALF_RES := true # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Enhanced NFC $(call inherit-product, vendor/cm/config/nfc_enhanced.mk) # Inherit device configuration $(call inherit-product, device/lge/hammerhead/full_hammerhead.mk) ## Device identifier. This must come after all inclusions PRODUCT_DEVICE := hammerhead PRODUCT_NAME := cm_hammerhead PRODUCT_BRAND := google PRODUCT_MODEL := Nexus 5 PRODUCT_MANUFACTURER := LGE PRODUCT_BUILD_PROP_OVERRIDES += \ PRODUCT_NAME=hammerhead \ BUILD_FINGERPRINT=google/hammerhead/hammerhead:6.0.1/MOB30D/2704746:user/release-keys \ PRIVATE_BUILD_DESC="hammerhead-user 6.0.1 MOB30D 2704746 release-keys" ## Instruction: hammerhead: Update fingerprints and build desc. Change-Id: Icabe62dd84ae744d2a4c9f6fbdd6cbbd001b638d hammerhead: Update fingerprints and build description according to MOB30M ## Code After: TARGET_SCREEN_HEIGHT := 1920 TARGET_SCREEN_WIDTH := 1080 TARGET_BOOTANIMATION_HALF_RES := true # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Enhanced NFC $(call inherit-product, vendor/cm/config/nfc_enhanced.mk) # Inherit device configuration $(call inherit-product, device/lge/hammerhead/full_hammerhead.mk) ## Device identifier. This must come after all inclusions PRODUCT_DEVICE := hammerhead PRODUCT_NAME := cm_hammerhead PRODUCT_BRAND := google PRODUCT_MODEL := Nexus 5 PRODUCT_MANUFACTURER := LGE PRODUCT_BUILD_PROP_OVERRIDES += \ PRODUCT_NAME=hammerhead \ BUILD_FINGERPRINT=google/hammerhead/hammerhead:6.0.1/MOB30M/2862625:user/release-keys \ PRIVATE_BUILD_DESC="hammerhead-user 6.0.1 MOB30M 2862625 release-keys"
TARGET_SCREEN_HEIGHT := 1920 TARGET_SCREEN_WIDTH := 1080 TARGET_BOOTANIMATION_HALF_RES := true # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Enhanced NFC $(call inherit-product, vendor/cm/config/nfc_enhanced.mk) # Inherit device configuration $(call inherit-product, device/lge/hammerhead/full_hammerhead.mk) ## Device identifier. This must come after all inclusions PRODUCT_DEVICE := hammerhead PRODUCT_NAME := cm_hammerhead PRODUCT_BRAND := google PRODUCT_MODEL := Nexus 5 PRODUCT_MANUFACTURER := LGE PRODUCT_BUILD_PROP_OVERRIDES += \ PRODUCT_NAME=hammerhead \ - BUILD_FINGERPRINT=google/hammerhead/hammerhead:6.0.1/MOB30D/2704746:user/release-keys \ ? ^ ^^^^^ + BUILD_FINGERPRINT=google/hammerhead/hammerhead:6.0.1/MOB30M/2862625:user/release-keys \ ? ^ ^ ++++ - PRIVATE_BUILD_DESC="hammerhead-user 6.0.1 MOB30D 2704746 release-keys" ? ^ ^^^^^ + PRIVATE_BUILD_DESC="hammerhead-user 6.0.1 MOB30M 2862625 release-keys" ? ^ ^ ++++
4
0.166667
2
2
30b0db38ab47bbfcf3c12ec6c8907931ee33b247
src/engine/render/RenderSystem.h
src/engine/render/RenderSystem.h
namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that. */ class RenderSystem : public EngineSystem { protected: vec3 cameraPos; public: ~RenderSystem() {}; vec3 getCameraPos(){ return cameraPos; } void setCameraPos(vec3 pos){ cameraPos = pos; } }; } } #endif
namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that. */ class RenderSystem : public EngineSystem { protected: vec3 cameraPos; public: ~RenderSystem() {}; vec3 getCameraPos(){ return cameraPos; } void setCameraPos(vec3 pos){ cameraPos = pos; } virtual void uninit() = 0; virtual void update() = 0; }; } } #endif
Update is an abstract base function.
Update is an abstract base function.
C
bsd-2-clause
LauriM/ProjectIce,LauriM/ProjectIce
c
## Code Before: namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that. */ class RenderSystem : public EngineSystem { protected: vec3 cameraPos; public: ~RenderSystem() {}; vec3 getCameraPos(){ return cameraPos; } void setCameraPos(vec3 pos){ cameraPos = pos; } }; } } #endif ## Instruction: Update is an abstract base function. ## Code After: namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that. */ class RenderSystem : public EngineSystem { protected: vec3 cameraPos; public: ~RenderSystem() {}; vec3 getCameraPos(){ return cameraPos; } void setCameraPos(vec3 pos){ cameraPos = pos; } virtual void uninit() = 0; virtual void update() = 0; }; } } #endif
namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets pointers to the sceneSystem and uiSystem and will build the visuals from that. */ class RenderSystem : public EngineSystem { protected: vec3 cameraPos; public: ~RenderSystem() {}; vec3 getCameraPos(){ return cameraPos; } void setCameraPos(vec3 pos){ cameraPos = pos; } + + virtual void uninit() = 0; + virtual void update() = 0; + }; } } #endif
4
0.142857
4
0
cdf4f04d72a86ee8e9e9cb6683bb2d710a7d799b
.circleci/config.yml
.circleci/config.yml
version: 2 jobs: docker-swift-updater: docker: - image: norionomura/docker-swift-updater steps: - checkout - add-ssh-keys: fingerprints: - "fe:11:f3:6a:1e:7c:38:67:33:d2:ff:42:1a:16:01:87" - setup_remote_docker - run: | git config --global user.name "Norio Nomura" git config --global user.email "norio.nomura@gmail.com" - run: docker-swift-updater -Verbose YES - run: | git push origin $CIRCLE_BRANCH git push --tags origin $CIRCLE_BRANCH workflows: version: 2 hourly: triggers: - schedule: cron: "20 * * * *" filters: branches: only: - master jobs: - docker-swift-updater
version: 2 jobs: docker-swift-updater: docker: - image: norionomura/docker-swift-updater steps: - checkout - add-ssh-keys: fingerprints: - "fe:11:f3:6a:1e:7c:38:67:33:d2:ff:42:1a:16:01:87" - setup_remote_docker - run: | git config --global user.name "Norio Nomura" git config --global user.email "norio.nomura@gmail.com" - run: docker-swift-updater -Verbose YES - run: | git push origin $CIRCLE_BRANCH git push --tags origin $CIRCLE_BRANCH workflows: version: 2 every_3_hours: triggers: - schedule: cron: "20 0,3,6,9,12,15,18,21 * * *" filters: branches: only: - master jobs: - docker-swift-updater
Reduce the frequency of docker-swift-updater
Reduce the frequency of docker-swift-updater
YAML
mit
norio-nomura/docker-swift
yaml
## Code Before: version: 2 jobs: docker-swift-updater: docker: - image: norionomura/docker-swift-updater steps: - checkout - add-ssh-keys: fingerprints: - "fe:11:f3:6a:1e:7c:38:67:33:d2:ff:42:1a:16:01:87" - setup_remote_docker - run: | git config --global user.name "Norio Nomura" git config --global user.email "norio.nomura@gmail.com" - run: docker-swift-updater -Verbose YES - run: | git push origin $CIRCLE_BRANCH git push --tags origin $CIRCLE_BRANCH workflows: version: 2 hourly: triggers: - schedule: cron: "20 * * * *" filters: branches: only: - master jobs: - docker-swift-updater ## Instruction: Reduce the frequency of docker-swift-updater ## Code After: version: 2 jobs: docker-swift-updater: docker: - image: norionomura/docker-swift-updater steps: - checkout - add-ssh-keys: fingerprints: - "fe:11:f3:6a:1e:7c:38:67:33:d2:ff:42:1a:16:01:87" - setup_remote_docker - run: | git config --global user.name "Norio Nomura" git config --global user.email "norio.nomura@gmail.com" - run: docker-swift-updater -Verbose YES - run: | git push origin $CIRCLE_BRANCH git push --tags origin $CIRCLE_BRANCH workflows: version: 2 every_3_hours: triggers: - schedule: cron: "20 0,3,6,9,12,15,18,21 * * *" filters: branches: only: - master jobs: - docker-swift-updater
version: 2 jobs: docker-swift-updater: docker: - image: norionomura/docker-swift-updater steps: - checkout - add-ssh-keys: fingerprints: - "fe:11:f3:6a:1e:7c:38:67:33:d2:ff:42:1a:16:01:87" - setup_remote_docker - run: | git config --global user.name "Norio Nomura" git config --global user.email "norio.nomura@gmail.com" - run: docker-swift-updater -Verbose YES - run: | git push origin $CIRCLE_BRANCH git push --tags origin $CIRCLE_BRANCH workflows: version: 2 - hourly: + every_3_hours: triggers: - schedule: - cron: "20 * * * *" + cron: "20 0,3,6,9,12,15,18,21 * * *" filters: branches: only: - master jobs: - docker-swift-updater
4
0.129032
2
2
a207d26bd9e30d110febc373abdc91882ca08a25
imports/ui/dimension-view/element-tree/toggle-button.jsx
imports/ui/dimension-view/element-tree/toggle-button.jsx
import React, { PropTypes } from 'react'; const TreeToggler = (props) => { if (props.childIds.length === 0) { return null; } const togglerClasses = () => { if (props.childrenVisible) { return 'glyphicon glyphicon-chevron-down'; } return 'glyphicon glyphicon-chevron-right'; }; return ( <span className={togglerClasses()} onClick={props.toggleChildrenVisible} style={{ paddingRight: '10px' }} ></span> ); }; TreeToggler.propTypes = { toggleChildrenVisible: PropTypes.func.isRequired, childIds: PropTypes.array.isRequired, childrenVisible: PropTypes.bool.isRequired, }; export default TreeToggler;
import React, { PropTypes } from 'react'; const TreeToggler = (props) => { if (props.childIds.length === 0) { return null; } const togglerClasses = () => { if (props.childrenVisible) { return 'glyphicon glyphicon-chevron-down'; } return 'glyphicon glyphicon-chevron-right'; }; return ( <span className={togglerClasses()} onClick={props.toggleChildrenVisible} style={{ paddingRight: '10px', cursor: 'pointer' }} ></span> ); }; TreeToggler.propTypes = { toggleChildrenVisible: PropTypes.func.isRequired, childIds: PropTypes.array.isRequired, childrenVisible: PropTypes.bool.isRequired, }; export default TreeToggler;
Make tree toggle cursor a pointer
Make tree toggle cursor a pointer
JSX
mit
minden/data-furnace,minden/data-furnace
jsx
## Code Before: import React, { PropTypes } from 'react'; const TreeToggler = (props) => { if (props.childIds.length === 0) { return null; } const togglerClasses = () => { if (props.childrenVisible) { return 'glyphicon glyphicon-chevron-down'; } return 'glyphicon glyphicon-chevron-right'; }; return ( <span className={togglerClasses()} onClick={props.toggleChildrenVisible} style={{ paddingRight: '10px' }} ></span> ); }; TreeToggler.propTypes = { toggleChildrenVisible: PropTypes.func.isRequired, childIds: PropTypes.array.isRequired, childrenVisible: PropTypes.bool.isRequired, }; export default TreeToggler; ## Instruction: Make tree toggle cursor a pointer ## Code After: import React, { PropTypes } from 'react'; const TreeToggler = (props) => { if (props.childIds.length === 0) { return null; } const togglerClasses = () => { if (props.childrenVisible) { return 'glyphicon glyphicon-chevron-down'; } return 'glyphicon glyphicon-chevron-right'; }; return ( <span className={togglerClasses()} onClick={props.toggleChildrenVisible} style={{ paddingRight: '10px', cursor: 'pointer' }} ></span> ); }; TreeToggler.propTypes = { toggleChildrenVisible: PropTypes.func.isRequired, childIds: PropTypes.array.isRequired, childrenVisible: PropTypes.bool.isRequired, }; export default TreeToggler;
import React, { PropTypes } from 'react'; const TreeToggler = (props) => { if (props.childIds.length === 0) { return null; } const togglerClasses = () => { if (props.childrenVisible) { return 'glyphicon glyphicon-chevron-down'; } return 'glyphicon glyphicon-chevron-right'; }; return ( <span className={togglerClasses()} onClick={props.toggleChildrenVisible} - style={{ paddingRight: '10px' }} + style={{ paddingRight: '10px', cursor: 'pointer' }} ? +++++++++++++++++++ ></span> ); }; TreeToggler.propTypes = { toggleChildrenVisible: PropTypes.func.isRequired, childIds: PropTypes.array.isRequired, childrenVisible: PropTypes.bool.isRequired, }; export default TreeToggler;
2
0.066667
1
1
865a1835651ee0c9223013b7b56ce07d4c9d25ae
module/index.js
module/index.js
const ifElse = require('1-liners/ifElse'); const isFunction = require('1-liners/isFunction'); const filter = require('1-liners/filter'); const compose = require('1-liners/compose'); const castBool = (val) => val === true; const throwError = (msg) => () => { throw new Error(msg); }; const filterCurried = (filterFn) => ifElse( Array.isArray, (arr) => filter(compose(castBool, filterFn), arr), throwError('Filter expected an array') ); export default ifElse( isFunction, filterCurried, throwError('Filter expected a function') );
const ifElse = require('1-liners/ifElse'); const isFunction = require('1-liners/isFunction'); const filter = require('1-liners/filter'); const throwError = (msg) => () => { throw new Error(msg); }; const filterCurried = (filterFn) => ifElse( Array.isArray, (arr) => filter(filterFn, arr), throwError('Filter expected an array') ); export default ifElse( isFunction, filterCurried, throwError('Filter expected a function') );
Update logic to fixed test
Update logic to fixed test
JavaScript
mit
studio-b12/doxie.filter
javascript
## Code Before: const ifElse = require('1-liners/ifElse'); const isFunction = require('1-liners/isFunction'); const filter = require('1-liners/filter'); const compose = require('1-liners/compose'); const castBool = (val) => val === true; const throwError = (msg) => () => { throw new Error(msg); }; const filterCurried = (filterFn) => ifElse( Array.isArray, (arr) => filter(compose(castBool, filterFn), arr), throwError('Filter expected an array') ); export default ifElse( isFunction, filterCurried, throwError('Filter expected a function') ); ## Instruction: Update logic to fixed test ## Code After: const ifElse = require('1-liners/ifElse'); const isFunction = require('1-liners/isFunction'); const filter = require('1-liners/filter'); const throwError = (msg) => () => { throw new Error(msg); }; const filterCurried = (filterFn) => ifElse( Array.isArray, (arr) => filter(filterFn, arr), throwError('Filter expected an array') ); export default ifElse( isFunction, filterCurried, throwError('Filter expected a function') );
const ifElse = require('1-liners/ifElse'); const isFunction = require('1-liners/isFunction'); const filter = require('1-liners/filter'); - const compose = require('1-liners/compose'); - const castBool = (val) => val === true; const throwError = (msg) => () => { throw new Error(msg); }; const filterCurried = (filterFn) => ifElse( Array.isArray, - (arr) => filter(compose(castBool, filterFn), arr), ? ------------------ - + (arr) => filter(filterFn, arr), throwError('Filter expected an array') ); export default ifElse( isFunction, filterCurried, throwError('Filter expected a function') );
4
0.210526
1
3
1cb89f7081f3cc6cbd67ec82c3f46ce7f890d671
rollup.config.js
rollup.config.js
import babel from "rollup-plugin-babel"; import buble from "rollup-plugin-buble"; import { uglify } from "rollup-plugin-uglify"; const config = { input: "src/index.jsx", output: { format: "cjs", interop: false, strict: false }, plugins: [ buble({ objectAssign: true }), babel({ babelrc: false, plugins: ["@babel/plugin-transform-object-assign"] }) ], external: ["react", "prop-types"] }; if (process.env.NODE_ENV === "production") { config.plugins.push( babel({ babelrc: false, plugins: [ [ "transform-react-remove-prop-types", { removeImport: true, additionalLibraries: ["./hexColorPropType"] } ] ] }), uglify({ mangle: { properties: { regex: /^\$/ } }, compress: { pure_getters: true } }) ); } export default config;
import babel from "rollup-plugin-babel"; import buble from "rollup-plugin-buble"; import { uglify } from "rollup-plugin-uglify"; const config = { input: "src/index.jsx", output: { format: "cjs", interop: false, strict: false, exports: "named" }, plugins: [ buble({ objectAssign: true }), babel({ babelrc: false, plugins: ["@babel/plugin-transform-object-assign"] }) ], external: ["react", "prop-types"] }; if (process.env.NODE_ENV === "production") { config.plugins.push( babel({ babelrc: false, plugins: [ [ "transform-react-remove-prop-types", { removeImport: true, additionalLibraries: ["./hexColorPropType"] } ] ] }), uglify({ mangle: { properties: { regex: /^\$/ } }, compress: { pure_getters: true } }) ); } export default config;
Add exports:named for compatibility with typescript
Add exports:named for compatibility with typescript
JavaScript
mit
yogaboll/react-switch
javascript
## Code Before: import babel from "rollup-plugin-babel"; import buble from "rollup-plugin-buble"; import { uglify } from "rollup-plugin-uglify"; const config = { input: "src/index.jsx", output: { format: "cjs", interop: false, strict: false }, plugins: [ buble({ objectAssign: true }), babel({ babelrc: false, plugins: ["@babel/plugin-transform-object-assign"] }) ], external: ["react", "prop-types"] }; if (process.env.NODE_ENV === "production") { config.plugins.push( babel({ babelrc: false, plugins: [ [ "transform-react-remove-prop-types", { removeImport: true, additionalLibraries: ["./hexColorPropType"] } ] ] }), uglify({ mangle: { properties: { regex: /^\$/ } }, compress: { pure_getters: true } }) ); } export default config; ## Instruction: Add exports:named for compatibility with typescript ## Code After: import babel from "rollup-plugin-babel"; import buble from "rollup-plugin-buble"; import { uglify } from "rollup-plugin-uglify"; const config = { input: "src/index.jsx", output: { format: "cjs", interop: false, strict: false, exports: "named" }, plugins: [ buble({ objectAssign: true }), babel({ babelrc: false, plugins: ["@babel/plugin-transform-object-assign"] }) ], external: ["react", "prop-types"] }; if (process.env.NODE_ENV === "production") { config.plugins.push( babel({ babelrc: false, plugins: [ [ "transform-react-remove-prop-types", { removeImport: true, additionalLibraries: ["./hexColorPropType"] } ] ] }), uglify({ mangle: { properties: { regex: /^\$/ } }, compress: { pure_getters: true } }) ); } export default config;
import babel from "rollup-plugin-babel"; import buble from "rollup-plugin-buble"; import { uglify } from "rollup-plugin-uglify"; const config = { input: "src/index.jsx", output: { format: "cjs", interop: false, - strict: false + strict: false, ? + + exports: "named" }, plugins: [ buble({ objectAssign: true }), babel({ babelrc: false, plugins: ["@babel/plugin-transform-object-assign"] }) ], external: ["react", "prop-types"] }; if (process.env.NODE_ENV === "production") { config.plugins.push( babel({ babelrc: false, plugins: [ [ "transform-react-remove-prop-types", { removeImport: true, additionalLibraries: ["./hexColorPropType"] } ] ] }), uglify({ mangle: { properties: { regex: /^\$/ } }, compress: { pure_getters: true } }) ); } export default config;
3
0.06383
2
1
cc8b797afa8ca16da6344c978c1292496bb20eaf
json_templates/game_request.json
json_templates/game_request.json
// Client needs an endpoint to POST a request to // when user wishes to start a game. // JSON format could look something like this... { "isTimed": false } // Server response could look something like this // if existing game IS NOT available... { "gameID": "uuid", "wasStartedByMe": true, "isTimed": false } // Or, server response could look something like this // if existing game IS available... { "gameID": "uuid", "wasStartedByMe": false, "myPrisonCount": 0, "opponentLastMove": [[5, 4], [4, 5]], "boardState": [ [" ", "M", " ", "M", " ", "M", " ", "M"], ["M", " ", "M", " ", "M", " ", "M", " "], [" ", "M", " ", "M", " ", "M", " ", "M"], [" ", " ", " ", " ", " ", " ", " ", " "], [" ", " ", " ", " ", " ", "m", " ", " "], ["m", " ", "m", " ", " ", " ", "m", " "], [" ", "m", " ", "m", " ", "m", " ", "m"], ["m", " ", "m", " ", "m", " ", "m", " "] ], "isTimed": false }
// Client needs an endpoint to POST a request to // when user wishes to start a game. // JSON format could look something like this... { "isTimed": false } // Server response could look something like this // if existing game IS NOT available... { "gameID": "uuid", "wasStartedByMe": true, "isTimed": false } // Or, server response could look something like this // if existing game IS available... { "gameID": "uuid", "wasStartedByMe": false, "isMyTurn": true, "lastMoveTime": "UTC timestamp", "opponent": "userID", "myPrisonCount": 0, "opponentLastMove": [[5, 4], [4, 5]], "boardState": [ [" ", "M", " ", "M", " ", "M", " ", "M"], ["M", " ", "M", " ", "M", " ", "M", " "], [" ", "M", " ", "M", " ", "M", " ", "M"], [" ", " ", " ", " ", " ", " ", " ", " "], [" ", " ", " ", " ", " ", "m", " ", " "], ["m", " ", "m", " ", " ", " ", "m", " "], [" ", "m", " ", "m", " ", "m", " ", "m"], ["m", " ", "m", " ", "m", " ", "m", " "] ], "dullMoveCount": 1, "isTimed": false }
Update game request json template
Update game request json template
JSON
mit
Baja-Game/js_checkers,Baja-Game/js_checkers
json
## Code Before: // Client needs an endpoint to POST a request to // when user wishes to start a game. // JSON format could look something like this... { "isTimed": false } // Server response could look something like this // if existing game IS NOT available... { "gameID": "uuid", "wasStartedByMe": true, "isTimed": false } // Or, server response could look something like this // if existing game IS available... { "gameID": "uuid", "wasStartedByMe": false, "myPrisonCount": 0, "opponentLastMove": [[5, 4], [4, 5]], "boardState": [ [" ", "M", " ", "M", " ", "M", " ", "M"], ["M", " ", "M", " ", "M", " ", "M", " "], [" ", "M", " ", "M", " ", "M", " ", "M"], [" ", " ", " ", " ", " ", " ", " ", " "], [" ", " ", " ", " ", " ", "m", " ", " "], ["m", " ", "m", " ", " ", " ", "m", " "], [" ", "m", " ", "m", " ", "m", " ", "m"], ["m", " ", "m", " ", "m", " ", "m", " "] ], "isTimed": false } ## Instruction: Update game request json template ## Code After: // Client needs an endpoint to POST a request to // when user wishes to start a game. // JSON format could look something like this... { "isTimed": false } // Server response could look something like this // if existing game IS NOT available... { "gameID": "uuid", "wasStartedByMe": true, "isTimed": false } // Or, server response could look something like this // if existing game IS available... { "gameID": "uuid", "wasStartedByMe": false, "isMyTurn": true, "lastMoveTime": "UTC timestamp", "opponent": "userID", "myPrisonCount": 0, "opponentLastMove": [[5, 4], [4, 5]], "boardState": [ [" ", "M", " ", "M", " ", "M", " ", "M"], ["M", " ", "M", " ", "M", " ", "M", " "], [" ", "M", " ", "M", " ", "M", " ", "M"], [" ", " ", " ", " ", " ", " ", " ", " "], [" ", " ", " ", " ", " ", "m", " ", " "], ["m", " ", "m", " ", " ", " ", "m", " "], [" ", "m", " ", "m", " ", "m", " ", "m"], ["m", " ", "m", " ", "m", " ", "m", " "] ], "dullMoveCount": 1, "isTimed": false }
// Client needs an endpoint to POST a request to // when user wishes to start a game. // JSON format could look something like this... { "isTimed": false } // Server response could look something like this // if existing game IS NOT available... { "gameID": "uuid", "wasStartedByMe": true, "isTimed": false } // Or, server response could look something like this // if existing game IS available... { "gameID": "uuid", "wasStartedByMe": false, + "isMyTurn": true, + "lastMoveTime": "UTC timestamp", + "opponent": "userID", "myPrisonCount": 0, "opponentLastMove": [[5, 4], [4, 5]], "boardState": [ [" ", "M", " ", "M", " ", "M", " ", "M"], ["M", " ", "M", " ", "M", " ", "M", " "], [" ", "M", " ", "M", " ", "M", " ", "M"], [" ", " ", " ", " ", " ", " ", " ", " "], [" ", " ", " ", " ", " ", "m", " ", " "], ["m", " ", "m", " ", " ", " ", "m", " "], [" ", "m", " ", "m", " ", "m", " ", "m"], ["m", " ", "m", " ", "m", " ", "m", " "] ], + "dullMoveCount": 1, "isTimed": false }
4
0.095238
4
0
8749936957069bedb379a156fed4ee816bae9b9a
qr.dart
qr.dart
import "package:polymorphic_bot/plugin.dart"; export "package:polymorphic_bot/plugin.dart"; @PluginInstance() Plugin plugin; @BotInstance() BotConnector bot; @Command("qr", description: "Generate QR Codes", usage: "<input>") qr(CommandEvent event) => event.transform((input) { return shortenUrl("https://chart.googleapis.com/chart?chs=178x178&cht=qr&chl=${Uri.encodeComponent(input)}"); }, prefix: "QR");
import "package:polymorphic_bot/plugin.dart"; export "package:polymorphic_bot/plugin.dart"; @PluginInstance() Plugin plugin; @BotInstance() BotConnector bot; @Command("qr", description: "Generate QR Codes", usage: "<input>") qr(CommandEvent event) => event.transform((input) { return shortenUrl("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${Uri.encodeComponent(input)}"); }, prefix: "QR");
Use a different QR Generator API
Use a different QR Generator API
Dart
mit
PolymorphicBot/scripts
dart
## Code Before: import "package:polymorphic_bot/plugin.dart"; export "package:polymorphic_bot/plugin.dart"; @PluginInstance() Plugin plugin; @BotInstance() BotConnector bot; @Command("qr", description: "Generate QR Codes", usage: "<input>") qr(CommandEvent event) => event.transform((input) { return shortenUrl("https://chart.googleapis.com/chart?chs=178x178&cht=qr&chl=${Uri.encodeComponent(input)}"); }, prefix: "QR"); ## Instruction: Use a different QR Generator API ## Code After: import "package:polymorphic_bot/plugin.dart"; export "package:polymorphic_bot/plugin.dart"; @PluginInstance() Plugin plugin; @BotInstance() BotConnector bot; @Command("qr", description: "Generate QR Codes", usage: "<input>") qr(CommandEvent event) => event.transform((input) { return shortenUrl("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${Uri.encodeComponent(input)}"); }, prefix: "QR");
import "package:polymorphic_bot/plugin.dart"; export "package:polymorphic_bot/plugin.dart"; @PluginInstance() Plugin plugin; @BotInstance() BotConnector bot; @Command("qr", description: "Generate QR Codes", usage: "<input>") qr(CommandEvent event) => event.transform((input) { - return shortenUrl("https://chart.googleapis.com/chart?chs=178x178&cht=qr&chl=${Uri.encodeComponent(input)}"); + return shortenUrl("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${Uri.encodeComponent(input)}"); }, prefix: "QR");
2
0.166667
1
1
a8aa2e266abeafb00f16f609eeb151b39ce545ae
README.md
README.md
[![Build status](https://img.shields.io/travis/hiroto-k/trysail-blog-notification/master.svg?style=flat-square)](https://travis-ci.org/hiroto-k/trysail-blog-notification) [![License](https://img.shields.io/github/license/hiroto-k/trysail-blog-notification.svg?style=flat-square)](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE) [![Maintainability](https://api.codeclimate.com/v1/badges/1da99d61c12d37bb9c33/maintainability)](https://codeclimate.com/github/hiroto-k/trysail-blog-notification/maintainability) TrySailのメンバーのブログ更新をTwitterなりSlackで受け取る。 RSSの追加やプラグインの作成等をすればTrySailのメンバー以外のブログの通知も送信可能。 自分で使う用なのでドキュメントだったりは気が向いたら書く。 ## License [MIT License](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE "MIT License")
[![Build status](https://img.shields.io/travis/hiroto-k/trysail-blog-notification/master.svg?style=flat-square)](https://travis-ci.org/hiroto-k/trysail-blog-notification) [![License](https://img.shields.io/github/license/hiroto-k/trysail-blog-notification.svg?style=flat-square)](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE) [![Maintainability](https://api.codeclimate.com/v1/badges/e45ea111dc196cfbb5c0/maintainability)](https://codeclimate.com/github/hiroto-k/trysail-blog-notification/maintainability) TrySailのメンバーのブログ更新をTwitterなりSlackで受け取る。 RSSの追加やプラグインの作成等をすればTrySailのメンバー以外のブログの通知も送信可能。 自分で使う用なのでドキュメントだったりは気が向いたら書く。 ## License [MIT License](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE "MIT License")
Fix the Code Climate badge
Fix the Code Climate badge
Markdown
mit
Hiroto-K/trysail-blog-notification
markdown
## Code Before: [![Build status](https://img.shields.io/travis/hiroto-k/trysail-blog-notification/master.svg?style=flat-square)](https://travis-ci.org/hiroto-k/trysail-blog-notification) [![License](https://img.shields.io/github/license/hiroto-k/trysail-blog-notification.svg?style=flat-square)](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE) [![Maintainability](https://api.codeclimate.com/v1/badges/1da99d61c12d37bb9c33/maintainability)](https://codeclimate.com/github/hiroto-k/trysail-blog-notification/maintainability) TrySailのメンバーのブログ更新をTwitterなりSlackで受け取る。 RSSの追加やプラグインの作成等をすればTrySailのメンバー以外のブログの通知も送信可能。 自分で使う用なのでドキュメントだったりは気が向いたら書く。 ## License [MIT License](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE "MIT License") ## Instruction: Fix the Code Climate badge ## Code After: [![Build status](https://img.shields.io/travis/hiroto-k/trysail-blog-notification/master.svg?style=flat-square)](https://travis-ci.org/hiroto-k/trysail-blog-notification) [![License](https://img.shields.io/github/license/hiroto-k/trysail-blog-notification.svg?style=flat-square)](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE) [![Maintainability](https://api.codeclimate.com/v1/badges/e45ea111dc196cfbb5c0/maintainability)](https://codeclimate.com/github/hiroto-k/trysail-blog-notification/maintainability) TrySailのメンバーのブログ更新をTwitterなりSlackで受け取る。 RSSの追加やプラグインの作成等をすればTrySailのメンバー以外のブログの通知も送信可能。 自分で使う用なのでドキュメントだったりは気が向いたら書く。 ## License [MIT License](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE "MIT License")
[![Build status](https://img.shields.io/travis/hiroto-k/trysail-blog-notification/master.svg?style=flat-square)](https://travis-ci.org/hiroto-k/trysail-blog-notification) [![License](https://img.shields.io/github/license/hiroto-k/trysail-blog-notification.svg?style=flat-square)](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE) - [![Maintainability](https://api.codeclimate.com/v1/badges/1da99d61c12d37bb9c33/maintainability)](https://codeclimate.com/github/hiroto-k/trysail-blog-notification/maintainability) ? ------ ^^^^ ^ ^^ + [![Maintainability](https://api.codeclimate.com/v1/badges/e45ea111dc196cfbb5c0/maintainability)](https://codeclimate.com/github/hiroto-k/trysail-blog-notification/maintainability) ? +++++++ ^^^^ ^ ^ TrySailのメンバーのブログ更新をTwitterなりSlackで受け取る。 RSSの追加やプラグインの作成等をすればTrySailのメンバー以外のブログの通知も送信可能。 自分で使う用なのでドキュメントだったりは気が向いたら書く。 ## License [MIT License](https://github.com/hiroto-k/trysail-blog-notification/blob/master/LICENSE "MIT License")
2
0.142857
1
1
9899fe1a53d7963604ae556dc8bf49aabe7ba3a3
core/com.b2international.snowowl.server.product/plugin.xml
core/com.b2international.snowowl.server.product/plugin.xml
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.6"?> <plugin> <extension id="product" point="org.eclipse.core.runtime.products"> <product application="com.b2international.snowowl.server.product.app" description="OSGi based Snow Owl server runtime" name="Snow Owl Server"> <property name="appName" value="Snow Owl Server"> </property> <property name="serverMode" value="true"> </property> </product> </extension> <extension id="app" point="org.eclipse.core.runtime.applications"> <application cardinality="singleton-global" thread="main" visible="true"> <run class="com.b2international.snowowl.server.product.SnowOwlServerApplication"> </run> </application> </extension> </plugin>
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.6"?> <plugin> <extension id="product" point="org.eclipse.core.runtime.products"> <product application="com.b2international.snowowl.server.product.app" description="OSGi based Snow Owl server runtime" name="Snow Owl Server"> <property name="appName" value="Snow Owl Server"> </property> </product> </extension> <extension id="app" point="org.eclipse.core.runtime.applications"> <application cardinality="singleton-global" thread="main" visible="true"> <run class="com.b2international.snowowl.server.product.SnowOwlServerApplication"> </run> </application> </extension> </plugin>
Remove property "serverMode" from product extension
feat(product): Remove property "serverMode" from product extension It is unused, the corresponding code from ApplicationContext has been deleted earlier.
XML
apache-2.0
b2ihealthcare/snow-owl,b2ihealthcare/snow-owl,b2ihealthcare/snow-owl,b2ihealthcare/snow-owl
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.6"?> <plugin> <extension id="product" point="org.eclipse.core.runtime.products"> <product application="com.b2international.snowowl.server.product.app" description="OSGi based Snow Owl server runtime" name="Snow Owl Server"> <property name="appName" value="Snow Owl Server"> </property> <property name="serverMode" value="true"> </property> </product> </extension> <extension id="app" point="org.eclipse.core.runtime.applications"> <application cardinality="singleton-global" thread="main" visible="true"> <run class="com.b2international.snowowl.server.product.SnowOwlServerApplication"> </run> </application> </extension> </plugin> ## Instruction: feat(product): Remove property "serverMode" from product extension It is unused, the corresponding code from ApplicationContext has been deleted earlier. ## Code After: <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.6"?> <plugin> <extension id="product" point="org.eclipse.core.runtime.products"> <product application="com.b2international.snowowl.server.product.app" description="OSGi based Snow Owl server runtime" name="Snow Owl Server"> <property name="appName" value="Snow Owl Server"> </property> </product> </extension> <extension id="app" point="org.eclipse.core.runtime.applications"> <application cardinality="singleton-global" thread="main" visible="true"> <run class="com.b2international.snowowl.server.product.SnowOwlServerApplication"> </run> </application> </extension> </plugin>
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.6"?> <plugin> <extension id="product" point="org.eclipse.core.runtime.products"> <product application="com.b2international.snowowl.server.product.app" description="OSGi based Snow Owl server runtime" name="Snow Owl Server"> <property name="appName" value="Snow Owl Server"> - </property> - <property - name="serverMode" - value="true"> </property> </product> </extension> <extension id="app" point="org.eclipse.core.runtime.applications"> <application cardinality="singleton-global" thread="main" visible="true"> <run class="com.b2international.snowowl.server.product.SnowOwlServerApplication"> </run> </application> </extension> </plugin>
4
0.121212
0
4
c347a4effc2c2469302d14f2d2c532335bc77368
hawtio-web/src/main/webapp/app/kubernetes/html/kubernetesJsonDirective.html
hawtio-web/src/main/webapp/app/kubernetes/html/kubernetesJsonDirective.html
<div> <div class="row-fluid"> <div class="span12"> <div class="fabric-page-header row-fluid"> <div class="pull-left"> <div class="app-logo"> <img ng-src="{{iconURL}}" ng-show="iconURL">&nbsp; </div> </div> <div class="pull-left"> <h2 class="inline"><span class="contained c-wide3">&nbsp;{{displayName || appTitle}}</span></h2> </div> <div class="pull-right"> <button class="btn btn-success pull-right" title="Run this application" ng-disabled="!config || config.error" ng-click="apply()"> <i class="icon-play-circle"></i> Run </button> </div> <div class="pull-left span10 profile-summary-wide"> <div ng-show="summaryHtml" ng-bind-html-unsafe="summaryHtml"></div> </div> </div> </div> </div> </div>
<div> <div class="row-fluid"> <div class="span12"> <div class="fabric-page-header row-fluid"> <div class="pull-left" ng-show="iconURL"> <div class="app-logo"> <img ng-src="{{iconURL}}">&nbsp; </div> </div> <div class="pull-left"> <h2 class="inline"><span class="contained c-wide3">&nbsp;{{displayName || appTitle}}</span></h2> </div> <div class="pull-right"> <button class="btn btn-success pull-right" title="Run this application" ng-disabled="!config || config.error" ng-click="apply()"> <i class="icon-play-circle"></i> Run </button> </div> <div class="pull-left span10 profile-summary-wide"> <div ng-show="summaryHtml" ng-bind-html-unsafe="summaryHtml"></div> </div> </div> </div> </div> </div>
Hide space for icon in wiki if none is specified
Hide space for icon in wiki if none is specified
HTML
apache-2.0
voipme2/hawtio,tadayosi/hawtio,mposolda/hawtio,rajdavies/hawtio,hawtio/hawtio,skarsaune/hawtio,tadayosi/hawtio,samkeeleyong/hawtio,mposolda/hawtio,Fatze/hawtio,Fatze/hawtio,hawtio/hawtio,andytaylor/hawtio,padmaragl/hawtio,padmaragl/hawtio,grgrzybek/hawtio,Fatze/hawtio,grgrzybek/hawtio,andytaylor/hawtio,samkeeleyong/hawtio,telefunken/hawtio,jfbreault/hawtio,stalet/hawtio,andytaylor/hawtio,rajdavies/hawtio,jfbreault/hawtio,samkeeleyong/hawtio,uguy/hawtio,jfbreault/hawtio,rajdavies/hawtio,uguy/hawtio,voipme2/hawtio,jfbreault/hawtio,andytaylor/hawtio,stalet/hawtio,voipme2/hawtio,uguy/hawtio,hawtio/hawtio,padmaragl/hawtio,voipme2/hawtio,skarsaune/hawtio,telefunken/hawtio,hawtio/hawtio,samkeeleyong/hawtio,padmaragl/hawtio,Fatze/hawtio,uguy/hawtio,mposolda/hawtio,voipme2/hawtio,tadayosi/hawtio,tadayosi/hawtio,padmaragl/hawtio,stalet/hawtio,uguy/hawtio,skarsaune/hawtio,stalet/hawtio,samkeeleyong/hawtio,andytaylor/hawtio,hawtio/hawtio,jfbreault/hawtio,skarsaune/hawtio,telefunken/hawtio,grgrzybek/hawtio,rajdavies/hawtio,grgrzybek/hawtio,stalet/hawtio,mposolda/hawtio,rajdavies/hawtio,tadayosi/hawtio,mposolda/hawtio,telefunken/hawtio,skarsaune/hawtio,Fatze/hawtio,grgrzybek/hawtio,telefunken/hawtio
html
## Code Before: <div> <div class="row-fluid"> <div class="span12"> <div class="fabric-page-header row-fluid"> <div class="pull-left"> <div class="app-logo"> <img ng-src="{{iconURL}}" ng-show="iconURL">&nbsp; </div> </div> <div class="pull-left"> <h2 class="inline"><span class="contained c-wide3">&nbsp;{{displayName || appTitle}}</span></h2> </div> <div class="pull-right"> <button class="btn btn-success pull-right" title="Run this application" ng-disabled="!config || config.error" ng-click="apply()"> <i class="icon-play-circle"></i> Run </button> </div> <div class="pull-left span10 profile-summary-wide"> <div ng-show="summaryHtml" ng-bind-html-unsafe="summaryHtml"></div> </div> </div> </div> </div> </div> ## Instruction: Hide space for icon in wiki if none is specified ## Code After: <div> <div class="row-fluid"> <div class="span12"> <div class="fabric-page-header row-fluid"> <div class="pull-left" ng-show="iconURL"> <div class="app-logo"> <img ng-src="{{iconURL}}">&nbsp; </div> </div> <div class="pull-left"> <h2 class="inline"><span class="contained c-wide3">&nbsp;{{displayName || appTitle}}</span></h2> </div> <div class="pull-right"> <button class="btn btn-success pull-right" title="Run this application" ng-disabled="!config || config.error" ng-click="apply()"> <i class="icon-play-circle"></i> Run </button> </div> <div class="pull-left span10 profile-summary-wide"> <div ng-show="summaryHtml" ng-bind-html-unsafe="summaryHtml"></div> </div> </div> </div> </div> </div>
<div> <div class="row-fluid"> <div class="span12"> <div class="fabric-page-header row-fluid"> - <div class="pull-left"> + <div class="pull-left" ng-show="iconURL"> ? ++++++++++++++++++ <div class="app-logo"> - <img ng-src="{{iconURL}}" ng-show="iconURL">&nbsp; ? ------------------ + <img ng-src="{{iconURL}}">&nbsp; </div> </div> <div class="pull-left"> <h2 class="inline"><span class="contained c-wide3">&nbsp;{{displayName || appTitle}}</span></h2> </div> <div class="pull-right"> <button class="btn btn-success pull-right" title="Run this application" ng-disabled="!config || config.error" ng-click="apply()"> <i class="icon-play-circle"></i> Run </button> </div> <div class="pull-left span10 profile-summary-wide"> <div ng-show="summaryHtml" ng-bind-html-unsafe="summaryHtml"></div> </div> </div> </div> </div> </div>
4
0.125
2
2
66b9107142e0b9501c5279a9d7019baac6759bf2
third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php
third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php
<?php /** * Mock CreateSend 'general' class. * * @author : Stephen Lewis <addons@experienceinternet.co.uk> * @copyright : Experience Internet * @package : Campaigner */ require_once dirname(__FILE__).'/mock.base_classes.php'; class Mock_CS_REST_General extends Mock_CS_REST_Wrapper_Base { /* -------------------------------------------------------------- * PUBLIC METHODS * ------------------------------------------------------------ */ public function get_timezones() {} public function get_systemdate() {} public function get_countries() {} public function get_apikey($username, $password, $site_url) {} public function get_clients() {} } /* End of file : mock.csrest_general.php */ /* File location : third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php */
<?php /** * Mock CreateSend 'general' class. * * @author : Stephen Lewis <addons@experienceinternet.co.uk> * @copyright : Experience Internet * @package : Campaigner */ require_once PATH_THIRD .'campaigner/tests/mocks/createsend-php/mock.base_classes.php'; class Mock_CS_REST_General extends Mock_CS_REST_Wrapper_Base { /* -------------------------------------------------------------- * PUBLIC METHODS * ------------------------------------------------------------ */ public function get_timezones() {} public function get_systemdate() {} public function get_countries() {} public function get_apikey($username, $password, $site_url) {} public function get_clients() {} } /* End of file : mock.csrest_general.php */ /* File location : third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php */
Update require_once to use PATH_THIRD, even though it's way more verbose that way.
Update require_once to use PATH_THIRD, even though it's way more verbose that way.
PHP
bsd-3-clause
monooso/campaigner.ee_addon,monooso/campaigner.ee_addon,experience/campaigner.ee_addon,experience/campaigner.ee_addon,monooso/campaigner.ee_addon,monooso/campaigner.ee_addon,experience/campaigner.ee_addon,monooso/campaigner.ee_addon,experience/campaigner.ee_addon,experience/campaigner.ee_addon
php
## Code Before: <?php /** * Mock CreateSend 'general' class. * * @author : Stephen Lewis <addons@experienceinternet.co.uk> * @copyright : Experience Internet * @package : Campaigner */ require_once dirname(__FILE__).'/mock.base_classes.php'; class Mock_CS_REST_General extends Mock_CS_REST_Wrapper_Base { /* -------------------------------------------------------------- * PUBLIC METHODS * ------------------------------------------------------------ */ public function get_timezones() {} public function get_systemdate() {} public function get_countries() {} public function get_apikey($username, $password, $site_url) {} public function get_clients() {} } /* End of file : mock.csrest_general.php */ /* File location : third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php */ ## Instruction: Update require_once to use PATH_THIRD, even though it's way more verbose that way. ## Code After: <?php /** * Mock CreateSend 'general' class. * * @author : Stephen Lewis <addons@experienceinternet.co.uk> * @copyright : Experience Internet * @package : Campaigner */ require_once PATH_THIRD .'campaigner/tests/mocks/createsend-php/mock.base_classes.php'; class Mock_CS_REST_General extends Mock_CS_REST_Wrapper_Base { /* -------------------------------------------------------------- * PUBLIC METHODS * ------------------------------------------------------------ */ public function get_timezones() {} public function get_systemdate() {} public function get_countries() {} public function get_apikey($username, $password, $site_url) {} public function get_clients() {} } /* End of file : mock.csrest_general.php */ /* File location : third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php */
<?php /** * Mock CreateSend 'general' class. * * @author : Stephen Lewis <addons@experienceinternet.co.uk> * @copyright : Experience Internet * @package : Campaigner */ - require_once dirname(__FILE__).'/mock.base_classes.php'; + require_once PATH_THIRD .'campaigner/tests/mocks/createsend-php/mock.base_classes.php'; class Mock_CS_REST_General extends Mock_CS_REST_Wrapper_Base { /* -------------------------------------------------------------- * PUBLIC METHODS * ------------------------------------------------------------ */ public function get_timezones() {} public function get_systemdate() {} public function get_countries() {} public function get_apikey($username, $password, $site_url) {} public function get_clients() {} } /* End of file : mock.csrest_general.php */ /* File location : third_party/campaigner/tests/mocks/createsend-php/mock.csrest_general.php */
2
0.068966
1
1
218a3ab47e5d6f281b72b1b196256b9e7d105c9f
docker-compose.yml
docker-compose.yml
rabbit1: image: harbur/rabbitmq-cluster hostname: rabbit1 environment: - ERLANG_COOKIE=abcdefg ports: - "5672:5672" - "15672:15672" rabbit2: image: harbur/rabbitmq-cluster hostname: rabbit2 links: - rabbit1 environment: - ERLANG_COOKIE=abcdefg - CLUSTER_WITH=rabbit1 - ENABLE_RAM=true ports: - "5673:5672" - "15673:15672" rabbit3: image: harbur/rabbitmq-cluster hostname: rabbit3 links: - rabbit1 - rabbit2 environment: - ERLANG_COOKIE=abcdefg - CLUSTER_WITH=rabbit1 ports: - "5674:5672"
rabbit1: image: thanhphu/rabbitmq-cluster hostname: rabbit1 container_name: rabbit-1 environment: - ERLANG_COOKIE=topsecret ports: - "5672:5672" - "15672:15672" rabbit2: image: thanhphu/rabbitmq-cluster hostname: rabbit2 container_name: rabbit-2 links: - rabbit1 environment: - ERLANG_COOKIE=topsecret - CLUSTER_WITH=rabbit1 - ENABLE_RAM=true ports: - "5673:5672" - "15673:15672" rabbit3: image: thanhphu/rabbitmq-cluster hostname: rabbit3 container_name: rabbit-3 links: - rabbit1 - rabbit2 environment: - ERLANG_COOKIE=topsecret - CLUSTER_WITH=rabbit1 ports: - "5674:5672" mongo: image: mongo hostname: mongo1 container-name: mongo-1 ports: - "27017:27017" broker: image: thanhphu/mqtt-broker hostname: broker1 container-name: broker-1 links: - rabbit2 environment: - AMQP_PORT=5673 ports: - "1883:1883" collector: image: thanhphu/mqtt-collector hostname: collector1 container-name: collector-1 links: - rabbit1 - mongo1 environment: - MONGODB_HOST=mongo1 - AMQP_HOST=rabbit3
Add mongo, broker, collector to cluster
Add mongo, broker, collector to cluster
YAML
mit
thanhphu/mqtt-rabbitmq-cluster
yaml
## Code Before: rabbit1: image: harbur/rabbitmq-cluster hostname: rabbit1 environment: - ERLANG_COOKIE=abcdefg ports: - "5672:5672" - "15672:15672" rabbit2: image: harbur/rabbitmq-cluster hostname: rabbit2 links: - rabbit1 environment: - ERLANG_COOKIE=abcdefg - CLUSTER_WITH=rabbit1 - ENABLE_RAM=true ports: - "5673:5672" - "15673:15672" rabbit3: image: harbur/rabbitmq-cluster hostname: rabbit3 links: - rabbit1 - rabbit2 environment: - ERLANG_COOKIE=abcdefg - CLUSTER_WITH=rabbit1 ports: - "5674:5672" ## Instruction: Add mongo, broker, collector to cluster ## Code After: rabbit1: image: thanhphu/rabbitmq-cluster hostname: rabbit1 container_name: rabbit-1 environment: - ERLANG_COOKIE=topsecret ports: - "5672:5672" - "15672:15672" rabbit2: image: thanhphu/rabbitmq-cluster hostname: rabbit2 container_name: rabbit-2 links: - rabbit1 environment: - ERLANG_COOKIE=topsecret - CLUSTER_WITH=rabbit1 - ENABLE_RAM=true ports: - "5673:5672" - "15673:15672" rabbit3: image: thanhphu/rabbitmq-cluster hostname: rabbit3 container_name: rabbit-3 links: - rabbit1 - rabbit2 environment: - ERLANG_COOKIE=topsecret - CLUSTER_WITH=rabbit1 ports: - "5674:5672" mongo: image: mongo hostname: mongo1 container-name: mongo-1 ports: - "27017:27017" broker: image: thanhphu/mqtt-broker hostname: broker1 container-name: broker-1 links: - rabbit2 environment: - AMQP_PORT=5673 ports: - "1883:1883" collector: image: thanhphu/mqtt-collector hostname: collector1 container-name: collector-1 links: - rabbit1 - mongo1 environment: - MONGODB_HOST=mongo1 - AMQP_HOST=rabbit3
rabbit1: - image: harbur/rabbitmq-cluster ? ^^ - + image: thanhphu/rabbitmq-cluster ? + ^^^^ hostname: rabbit1 + container_name: rabbit-1 environment: - - ERLANG_COOKIE=abcdefg ? ^^ ^ ^^ + - ERLANG_COOKIE=topsecret ? ^^^^^ ^ ^ ports: - "5672:5672" - "15672:15672" rabbit2: - image: harbur/rabbitmq-cluster ? ^^ - + image: thanhphu/rabbitmq-cluster ? + ^^^^ hostname: rabbit2 + container_name: rabbit-2 links: - rabbit1 environment: - - ERLANG_COOKIE=abcdefg ? ^^ ^ ^^ + - ERLANG_COOKIE=topsecret ? ^^^^^ ^ ^ - CLUSTER_WITH=rabbit1 - ENABLE_RAM=true ports: - "5673:5672" - "15673:15672" rabbit3: - image: harbur/rabbitmq-cluster ? ^^ - + image: thanhphu/rabbitmq-cluster ? + ^^^^ hostname: rabbit3 + container_name: rabbit-3 links: - rabbit1 - rabbit2 environment: - - ERLANG_COOKIE=abcdefg ? ^^ ^ ^^ + - ERLANG_COOKIE=topsecret ? ^^^^^ ^ ^ - CLUSTER_WITH=rabbit1 ports: - "5674:5672" + mongo: + image: mongo + hostname: mongo1 + container-name: mongo-1 + ports: + - "27017:27017" + broker: + image: thanhphu/mqtt-broker + hostname: broker1 + container-name: broker-1 + links: + - rabbit2 + environment: + - AMQP_PORT=5673 + ports: + - "1883:1883" + collector: + image: thanhphu/mqtt-collector + hostname: collector1 + container-name: collector-1 + links: + - rabbit1 + - mongo1 + environment: + - MONGODB_HOST=mongo1 + - AMQP_HOST=rabbit3
41
1.322581
35
6
5c9bbc8b7b65d37c6b8891a17b453e262cd0f2e9
client/templates/layouts/navigation.html
client/templates/layouts/navigation.html
<template name="navigation"> {{> _topNav }} {{> _leftMenu }} {{> _rightMenu }} <aside class="right-off-canvas-menu"> <ul class="off-canvas-list"> <li><label>Notifications</label></li> <button class="deleteAllNotifications button alert small">Clear All</button> {{> notifications }} </ul> </aside> </template>
<template name="navigation"> {{> _topNav }} {{> _leftMenu }} {{> _rightMenu }} </template>
Remove nav from html file.
Remove nav from html file.
HTML
mit
nmmascia/webet,nmmascia/webet
html
## Code Before: <template name="navigation"> {{> _topNav }} {{> _leftMenu }} {{> _rightMenu }} <aside class="right-off-canvas-menu"> <ul class="off-canvas-list"> <li><label>Notifications</label></li> <button class="deleteAllNotifications button alert small">Clear All</button> {{> notifications }} </ul> </aside> </template> ## Instruction: Remove nav from html file. ## Code After: <template name="navigation"> {{> _topNav }} {{> _leftMenu }} {{> _rightMenu }} </template>
<template name="navigation"> {{> _topNav }} {{> _leftMenu }} {{> _rightMenu }} - <aside class="right-off-canvas-menu"> - <ul class="off-canvas-list"> - <li><label>Notifications</label></li> - <button class="deleteAllNotifications button alert small">Clear All</button> - {{> notifications }} - </ul> - </aside> - </template>
8
0.615385
0
8
edbd5f42f430800daa667db68a4bf98c350299e9
README.md
README.md
opinionated-cache ================= An opinionated cache
opinionated-cache ================= An opinionated cache [![opinionated-cache MyGet Build Status](https://www.myget.org/BuildSource/Badge/opinionated-cache?identifier=7067f82c-0d7b-4440-aef6-4650fd8e9e04)](https://www.myget.org/)
Add MyGet Build Status badge
Add MyGet Build Status badge We DO need stinking badges.
Markdown
mit
Tacklr/opinionated-cache,andyyi/opinionated-cache
markdown
## Code Before: opinionated-cache ================= An opinionated cache ## Instruction: Add MyGet Build Status badge We DO need stinking badges. ## Code After: opinionated-cache ================= An opinionated cache [![opinionated-cache MyGet Build Status](https://www.myget.org/BuildSource/Badge/opinionated-cache?identifier=7067f82c-0d7b-4440-aef6-4650fd8e9e04)](https://www.myget.org/)
opinionated-cache ================= An opinionated cache + + [![opinionated-cache MyGet Build Status](https://www.myget.org/BuildSource/Badge/opinionated-cache?identifier=7067f82c-0d7b-4440-aef6-4650fd8e9e04)](https://www.myget.org/)
2
0.5
2
0
4e6ebfc002b096753575f9bc966ffe30e201411f
test/git-describe.js
test/git-describe.js
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import path from 'path' import test from 'tape' import { execFileSync } from 'child_process' import suiteName from './utils/suite' import gitDescribe from '../lib/git-describe' const suite = suiteName(__filename) const repoDir = path.join(__dirname, 'test-repo') test(`${suite} Fail if the given path is not a git repo`, (t) => { t.throws(function () { gitDescribe(repoDir) }, new RegExp(/fatal: Not a git repository:/)) t.end() }) test(`${suite} Return the sha of the parent repo if not given a path`, (t) => { const execArgs = [ 'describe', '--long', '--always' ] const parentSha = execFileSync('git', execArgs) const sha = gitDescribe() t.equal(parentSha.toString('utf-8').trim(), sha) t.end() })
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import path from 'path' import test from 'tape' import { spawnSync } from 'child_process' import suiteName from './utils/suite' import gitDescribe from '../lib/git-describe' const suite = suiteName(__filename) const repoDir = path.join(__dirname, 'test-repo') test(`${suite} Fail if the given path is not a git repo`, (t) => { t.throws(function () { gitDescribe(repoDir) }, new RegExp(/fatal: Not a git repository:/)) t.end() }) test(`${suite} Return the sha of the parent repo if not given a path`, (t) => { const parentSha = spawnSync('git', ['describe', '--long', '--always']) const sha = gitDescribe() t.equal(parentSha.stdout.toString('utf-8').trim(), sha) t.end() })
Switch execFile out for spawn and flatten args in tests
Switch execFile out for spawn and flatten args in tests
JavaScript
apache-2.0
hmrc/node-git-versioning
javascript
## Code Before: /* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import path from 'path' import test from 'tape' import { execFileSync } from 'child_process' import suiteName from './utils/suite' import gitDescribe from '../lib/git-describe' const suite = suiteName(__filename) const repoDir = path.join(__dirname, 'test-repo') test(`${suite} Fail if the given path is not a git repo`, (t) => { t.throws(function () { gitDescribe(repoDir) }, new RegExp(/fatal: Not a git repository:/)) t.end() }) test(`${suite} Return the sha of the parent repo if not given a path`, (t) => { const execArgs = [ 'describe', '--long', '--always' ] const parentSha = execFileSync('git', execArgs) const sha = gitDescribe() t.equal(parentSha.toString('utf-8').trim(), sha) t.end() }) ## Instruction: Switch execFile out for spawn and flatten args in tests ## Code After: /* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import path from 'path' import test from 'tape' import { spawnSync } from 'child_process' import suiteName from './utils/suite' import gitDescribe from '../lib/git-describe' const suite = suiteName(__filename) const repoDir = path.join(__dirname, 'test-repo') test(`${suite} Fail if the given path is not a git repo`, (t) => { t.throws(function () { gitDescribe(repoDir) }, new RegExp(/fatal: Not a git repository:/)) t.end() }) test(`${suite} Return the sha of the parent repo if not given a path`, (t) => { const parentSha = spawnSync('git', ['describe', '--long', '--always']) const sha = gitDescribe() t.equal(parentSha.stdout.toString('utf-8').trim(), sha) t.end() })
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import path from 'path' import test from 'tape' - import { execFileSync } from 'child_process' ? ^^^^^^^^ + import { spawnSync } from 'child_process' ? ^^^^^ import suiteName from './utils/suite' import gitDescribe from '../lib/git-describe' const suite = suiteName(__filename) const repoDir = path.join(__dirname, 'test-repo') test(`${suite} Fail if the given path is not a git repo`, (t) => { t.throws(function () { gitDescribe(repoDir) }, new RegExp(/fatal: Not a git repository:/)) t.end() }) test(`${suite} Return the sha of the parent repo if not given a path`, (t) => { + const parentSha = spawnSync('git', ['describe', '--long', '--always']) - const execArgs = [ - 'describe', - '--long', - '--always' - ] - - const parentSha = execFileSync('git', execArgs) const sha = gitDescribe() - t.equal(parentSha.toString('utf-8').trim(), sha) + t.equal(parentSha.stdout.toString('utf-8').trim(), sha) ? +++++++ t.end() })
12
0.255319
3
9
905a30bed57f383224bf523545130107ca09bdc4
config/jobs/kubernetes-sigs/service-apis/service-apis-config.yaml
config/jobs/kubernetes-sigs/service-apis/service-apis-config.yaml
presubmits: kubernetes-sigs/service-apis: - name: pull-service-apis-build annotations: testgrid-dashboards: sig-network-service-apis testgrid-tab-name: build decorate: true path_alias: sigs.k8s.io/service-apis always_run: true skip_report: false spec: containers: - image: golang:1.13 command: - make
presubmits: kubernetes-sigs/service-apis: - name: pull-service-apis-build annotations: testgrid-dashboards: sig-network-service-apis testgrid-tab-name: build labels: preset-dind-enabled: "true" decorate: true path_alias: sigs.k8s.io/service-apis always_run: true skip_report: false spec: containers: - image: gcr.io/k8s-testimages/kubekins-e2e:v20191017-ac4b4b5-master command: # generic runner script, handles DIND, bazelrc for caching, etc. - runner.sh args: - make # docker-in-docker needs privileged mode securityContext: privileged: true
Enable docker on service-apis jobs
Enable docker on service-apis jobs
YAML
apache-2.0
BenTheElder/test-infra,cjwagner/test-infra,jessfraz/test-infra,dims/test-infra,brahmaroutu/test-infra,BenTheElder/test-infra,kubernetes/test-infra,jessfraz/test-infra,pwittrock/test-infra,cjwagner/test-infra,dims/test-infra,jessfraz/test-infra,cjwagner/test-infra,michelle192837/test-infra,cblecker/test-infra,jessfraz/test-infra,jessfraz/test-infra,ixdy/kubernetes-test-infra,monopole/test-infra,kubernetes/test-infra,fejta/test-infra,monopole/test-infra,michelle192837/test-infra,ixdy/kubernetes-test-infra,pwittrock/test-infra,fejta/test-infra,fejta/test-infra,brahmaroutu/test-infra,fejta/test-infra,BenTheElder/test-infra,brahmaroutu/test-infra,pwittrock/test-infra,michelle192837/test-infra,ixdy/kubernetes-test-infra,kubernetes/test-infra,michelle192837/test-infra,fejta/test-infra,jessfraz/test-infra,brahmaroutu/test-infra,cblecker/test-infra,monopole/test-infra,dims/test-infra,kubernetes/test-infra,pwittrock/test-infra,cblecker/test-infra,ixdy/kubernetes-test-infra,kubernetes/test-infra,pwittrock/test-infra,BenTheElder/test-infra,BenTheElder/test-infra,cblecker/test-infra,michelle192837/test-infra,cblecker/test-infra,cjwagner/test-infra,dims/test-infra,dims/test-infra,fejta/test-infra,michelle192837/test-infra,cjwagner/test-infra,brahmaroutu/test-infra,kubernetes/test-infra,monopole/test-infra,monopole/test-infra,BenTheElder/test-infra,cjwagner/test-infra,ixdy/kubernetes-test-infra,dims/test-infra,cblecker/test-infra,monopole/test-infra,brahmaroutu/test-infra
yaml
## Code Before: presubmits: kubernetes-sigs/service-apis: - name: pull-service-apis-build annotations: testgrid-dashboards: sig-network-service-apis testgrid-tab-name: build decorate: true path_alias: sigs.k8s.io/service-apis always_run: true skip_report: false spec: containers: - image: golang:1.13 command: - make ## Instruction: Enable docker on service-apis jobs ## Code After: presubmits: kubernetes-sigs/service-apis: - name: pull-service-apis-build annotations: testgrid-dashboards: sig-network-service-apis testgrid-tab-name: build labels: preset-dind-enabled: "true" decorate: true path_alias: sigs.k8s.io/service-apis always_run: true skip_report: false spec: containers: - image: gcr.io/k8s-testimages/kubekins-e2e:v20191017-ac4b4b5-master command: # generic runner script, handles DIND, bazelrc for caching, etc. - runner.sh args: - make # docker-in-docker needs privileged mode securityContext: privileged: true
presubmits: kubernetes-sigs/service-apis: - name: pull-service-apis-build annotations: testgrid-dashboards: sig-network-service-apis testgrid-tab-name: build + labels: + preset-dind-enabled: "true" decorate: true path_alias: sigs.k8s.io/service-apis always_run: true skip_report: false spec: containers: - - image: golang:1.13 + - image: gcr.io/k8s-testimages/kubekins-e2e:v20191017-ac4b4b5-master command: + # generic runner script, handles DIND, bazelrc for caching, etc. + - runner.sh + args: - - make + - make ? ++ + # docker-in-docker needs privileged mode + securityContext: + privileged: true
12
0.8
10
2
bc8cf42698743dfecb0ab1fb145a5d8b2f055634
Package.swift
Package.swift
import PackageDescription import Foundation let package = Package( name: "LibStorj", targets: [ Target(name: "LibStorj") ], dependencies: [ .Package(url: "https://github.com/Ybrin/CLibStorj.git", majorVersion: 1), .Package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", versions: Version(1, 0, 0)..<Version(3, .max, .max)) ], exclude: [] )
// swift-tools-version:4.0 import PackageDescription import Foundation let package = Package( name: "LibStorj", products: [ .library(name: "LibStorj", targets: ["LibStorj"]), ], dependencies: [ .package(url: "https://github.com/Ybrin/CLibStorj.git", from: "1.0.0"), .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "3.0.0"), ], targets: [ .target(name: "LibStorj", dependencies: ["CLibStorj", "SwiftyJSON"]), .testTarget(name: "LibStorjTests", dependencies: ["LibStorj"]), ], swiftLanguageVersions: [3] )
Update to SPM v4 format
Update to SPM v4 format
Swift
mit
Ybrin/LibStorjSwift,Ybrin/LibStorjSwift
swift
## Code Before: import PackageDescription import Foundation let package = Package( name: "LibStorj", targets: [ Target(name: "LibStorj") ], dependencies: [ .Package(url: "https://github.com/Ybrin/CLibStorj.git", majorVersion: 1), .Package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", versions: Version(1, 0, 0)..<Version(3, .max, .max)) ], exclude: [] ) ## Instruction: Update to SPM v4 format ## Code After: // swift-tools-version:4.0 import PackageDescription import Foundation let package = Package( name: "LibStorj", products: [ .library(name: "LibStorj", targets: ["LibStorj"]), ], dependencies: [ .package(url: "https://github.com/Ybrin/CLibStorj.git", from: "1.0.0"), .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "3.0.0"), ], targets: [ .target(name: "LibStorj", dependencies: ["CLibStorj", "SwiftyJSON"]), .testTarget(name: "LibStorjTests", dependencies: ["LibStorj"]), ], swiftLanguageVersions: [3] )
+ // swift-tools-version:4.0 import PackageDescription import Foundation let package = Package( name: "LibStorj", - targets: [ - Target(name: "LibStorj") + products: [ + .library(name: "LibStorj", targets: ["LibStorj"]), ], dependencies: [ - .Package(url: "https://github.com/Ybrin/CLibStorj.git", majorVersion: 1), ? ^ ----------- + .package(url: "https://github.com/Ybrin/CLibStorj.git", from: "1.0.0"), ? ^ +++ + +++++ - .Package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", versions: Version(1, 0, 0)..<Version(3, .max, .max)) + .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "3.0.0"), ], - exclude: [] + targets: [ + .target(name: "LibStorj", dependencies: ["CLibStorj", "SwiftyJSON"]), + .testTarget(name: "LibStorjTests", dependencies: ["LibStorj"]), + ], + swiftLanguageVersions: [3] )
15
1.071429
10
5
0061b5de0fec37e9b324f2edf48bbb617c87b0e7
CHANGELOG.md
CHANGELOG.md
Features: - Add a rule for whitespace around operators - Add a rule for naming conventions (snake case, camel case, screaming snake case) - Add a rule that allows only definitions of names containing valid English words - Add a rule that detects the use of global variables Bugfixes: - Fix counting class methods in `--methods-per-class` rule
Features: - Add a rule for max method arity (thanks to [milanov](https://github.com/milanov)) - Add support for checking recursively whole directories Bugfixes: - Fix detection of unary operators - Add installation instructions in the readme (thanks to [mitio](https://github.com/mitio)) - Fix handling of case statements without a testable in max nesting depth rule ## 0.0.7 (2013-12-15) Bugfixes: - Fix crashing in naming conventions rule - Stop detecting unary - in space around operators rule - Improve space around operators detection using ast context info ## 0.0.6 (2013-12-14) Bugfixes: - Refine bad naming detection ## 0.0.5 (2013-11-15) Features: - Add a rule for whitespace around operators - Add a rule for naming conventions (snake case, camel case, screaming snake case) - Add a rule that allows only definitions of names containing valid English words - Add a rule that detects the use of global variables Bugfixes: - Fix counting class methods in `--methods-per-class` rule
Update the changelog for 0.0.6, 0.0.7 and 0.0.8
Update the changelog for 0.0.6, 0.0.7 and 0.0.8
Markdown
mit
skanev/skeptic
markdown
## Code Before: Features: - Add a rule for whitespace around operators - Add a rule for naming conventions (snake case, camel case, screaming snake case) - Add a rule that allows only definitions of names containing valid English words - Add a rule that detects the use of global variables Bugfixes: - Fix counting class methods in `--methods-per-class` rule ## Instruction: Update the changelog for 0.0.6, 0.0.7 and 0.0.8 ## Code After: Features: - Add a rule for max method arity (thanks to [milanov](https://github.com/milanov)) - Add support for checking recursively whole directories Bugfixes: - Fix detection of unary operators - Add installation instructions in the readme (thanks to [mitio](https://github.com/mitio)) - Fix handling of case statements without a testable in max nesting depth rule ## 0.0.7 (2013-12-15) Bugfixes: - Fix crashing in naming conventions rule - Stop detecting unary - in space around operators rule - Improve space around operators detection using ast context info ## 0.0.6 (2013-12-14) Bugfixes: - Refine bad naming detection ## 0.0.5 (2013-11-15) Features: - Add a rule for whitespace around operators - Add a rule for naming conventions (snake case, camel case, screaming snake case) - Add a rule that allows only definitions of names containing valid English words - Add a rule that detects the use of global variables Bugfixes: - Fix counting class methods in `--methods-per-class` rule
+ + Features: + - Add a rule for max method arity (thanks to [milanov](https://github.com/milanov)) + - Add support for checking recursively whole directories + + Bugfixes: + - Fix detection of unary operators + - Add installation instructions in the readme (thanks to [mitio](https://github.com/mitio)) + - Fix handling of case statements without a testable in max nesting depth rule + + ## 0.0.7 (2013-12-15) + + Bugfixes: + - Fix crashing in naming conventions rule + - Stop detecting unary - in space around operators rule + - Improve space around operators detection using ast context info + + ## 0.0.6 (2013-12-14) + + Bugfixes: + - Refine bad naming detection + + + ## 0.0.5 (2013-11-15) Features: - Add a rule for whitespace around operators - Add a rule for naming conventions (snake case, camel case, screaming snake case) - Add a rule that allows only definitions of names containing valid English words - Add a rule that detects the use of global variables Bugfixes: - Fix counting class methods in `--methods-per-class` rule
24
2.181818
24
0
e7a6292e7be497c131d05cac233726efc6c3512c
src/RedKiteLabs/RedKiteCms/ElFinderBundle/Core/Connector/AlphaLemonElFinderConnector.php
src/RedKiteLabs/RedKiteCms/ElFinderBundle/Core/Connector/AlphaLemonElFinderConnector.php
<?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * For extra documentation and help please visit http://alphalemon.com * * @license MIT License */ namespace AlphaLemon\ElFinderBundle\Core\Connector; /** * Configures the connector * * @author AlphaLemon */ class AlphaLemonElFinderConnector extends AlphaLemonElFinderBaseConnector { protected function configure() { $request = $this->container->get('request'); $options = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED) 'path' => 'bundles/alphalemonelfinder/files/', // path to files (REQUIRED) 'URL' => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/files/', // URL to files (REQUIRED) 'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL) ) ) ); return $options; } }
<?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * For extra documentation and help please visit http://alphalemon.com * * @license MIT License */ namespace AlphaLemon\ElFinderBundle\Core\Connector; /** * Configures the connector * * @author AlphaLemon */ class AlphaLemonElFinderConnector extends AlphaLemonElFinderBaseConnector { protected function configure() { $request = $this->container->get('request'); $options = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED) 'path' => 'bundles/alphalemonelfinder/vendor/ElFinder/files/', // path to files (REQUIRED) 'URL' => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/vendor/ElFinder/files/', // URL to files (REQUIRED) 'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL) ) ) ); return $options; } }
Update the path and the url
Update the path and the url
PHP
mit
redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms,redkite-labs/RedKiteCms
php
## Code Before: <?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * For extra documentation and help please visit http://alphalemon.com * * @license MIT License */ namespace AlphaLemon\ElFinderBundle\Core\Connector; /** * Configures the connector * * @author AlphaLemon */ class AlphaLemonElFinderConnector extends AlphaLemonElFinderBaseConnector { protected function configure() { $request = $this->container->get('request'); $options = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED) 'path' => 'bundles/alphalemonelfinder/files/', // path to files (REQUIRED) 'URL' => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/files/', // URL to files (REQUIRED) 'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL) ) ) ); return $options; } } ## Instruction: Update the path and the url ## Code After: <?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * For extra documentation and help please visit http://alphalemon.com * * @license MIT License */ namespace AlphaLemon\ElFinderBundle\Core\Connector; /** * Configures the connector * * @author AlphaLemon */ class AlphaLemonElFinderConnector extends AlphaLemonElFinderBaseConnector { protected function configure() { $request = $this->container->get('request'); $options = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED) 'path' => 'bundles/alphalemonelfinder/vendor/ElFinder/files/', // path to files (REQUIRED) 'URL' => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/vendor/ElFinder/files/', // URL to files (REQUIRED) 'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL) ) ) ); return $options; } }
<?php /* * This file is part of the AlphaLemonThemeEngineBundle and it is distributed * under the MIT License. To use this bundle you must leave * intact this copyright notice. * * Copyright (c) AlphaLemon <webmaster@alphalemon.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * For extra documentation and help please visit http://alphalemon.com * * @license MIT License */ namespace AlphaLemon\ElFinderBundle\Core\Connector; /** * Configures the connector * * @author AlphaLemon */ class AlphaLemonElFinderConnector extends AlphaLemonElFinderBaseConnector { protected function configure() { $request = $this->container->get('request'); $options = array( 'roots' => array( array( 'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED) - 'path' => 'bundles/alphalemonelfinder/files/', // path to files (REQUIRED) + 'path' => 'bundles/alphalemonelfinder/vendor/ElFinder/files/', // path to files (REQUIRED) ? ++++++++++++++++ - 'URL' => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/files/', // URL to files (REQUIRED) + 'URL' => $request->getScheme().'://'.$request->getHttpHost() . '/bundles/alphalemonelfinder/vendor/ElFinder/files/', // URL to files (REQUIRED) ? ++++++++++++++++ 'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL) ) ) ); return $options; } }
4
0.093023
2
2
c4c2f47df352a5d1dcf62d7279965165d9e93569
install_modules_outside_of_carton.sh
install_modules_outside_of_carton.sh
working_dir=`dirname $0` cd $working_dir source ./script/set_perl_brew_environment.sh perl -v set -u set -o errexit if [ `uname` == 'Darwin' ]; then # Mac OS X CPANM=/usr/local/bin/cpanm else # assume Ubuntu CPANM=cpanm fi $CPANM CPAN~2.00 # 1.0.9 or newer # (if the install of Carton 1.0.9 fails because of CPAN::Meta failure, # purge Perl with ./install_scripts/purge_mc_perl_brew.sh and # ./install_scripts/purge_carton_install.sh) $CPANM Carton~1.0.9 $CPANM List::MoreUtils # Install profiler and tools $CPANM Devel::NYTProf $CPANM Devel::Cover $CPANM lib::core::only
working_dir=`dirname $0` cd $working_dir source ./script/set_perl_brew_environment.sh perl -v set -u set -o errexit if [ `uname` == 'Darwin' ]; then # Mac OS X CPANM=/usr/local/bin/cpanm else # assume Ubuntu CPANM=cpanm fi $CPANM CPAN~2.00 # 1.0.9 or newer # (if the install of Carton 1.0.9 fails because of CPAN::Meta failure, # purge Perl with ./install_scripts/purge_mc_perl_brew.sh and # ./install_scripts/purge_carton_install.sh) $CPANM Carton~1.0.9 $CPANM List::MoreUtils # Install profiler and tools $CPANM --verbose Devel::NYTProf $CPANM Devel::Cover $CPANM lib::core::only
Install Devel::NYTProf with "--verbose" option to see why it fails on Travis
Install Devel::NYTProf with "--verbose" option to see why it fails on Travis
Shell
agpl-3.0
berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud
shell
## Code Before: working_dir=`dirname $0` cd $working_dir source ./script/set_perl_brew_environment.sh perl -v set -u set -o errexit if [ `uname` == 'Darwin' ]; then # Mac OS X CPANM=/usr/local/bin/cpanm else # assume Ubuntu CPANM=cpanm fi $CPANM CPAN~2.00 # 1.0.9 or newer # (if the install of Carton 1.0.9 fails because of CPAN::Meta failure, # purge Perl with ./install_scripts/purge_mc_perl_brew.sh and # ./install_scripts/purge_carton_install.sh) $CPANM Carton~1.0.9 $CPANM List::MoreUtils # Install profiler and tools $CPANM Devel::NYTProf $CPANM Devel::Cover $CPANM lib::core::only ## Instruction: Install Devel::NYTProf with "--verbose" option to see why it fails on Travis ## Code After: working_dir=`dirname $0` cd $working_dir source ./script/set_perl_brew_environment.sh perl -v set -u set -o errexit if [ `uname` == 'Darwin' ]; then # Mac OS X CPANM=/usr/local/bin/cpanm else # assume Ubuntu CPANM=cpanm fi $CPANM CPAN~2.00 # 1.0.9 or newer # (if the install of Carton 1.0.9 fails because of CPAN::Meta failure, # purge Perl with ./install_scripts/purge_mc_perl_brew.sh and # ./install_scripts/purge_carton_install.sh) $CPANM Carton~1.0.9 $CPANM List::MoreUtils # Install profiler and tools $CPANM --verbose Devel::NYTProf $CPANM Devel::Cover $CPANM lib::core::only
working_dir=`dirname $0` cd $working_dir source ./script/set_perl_brew_environment.sh perl -v set -u set -o errexit if [ `uname` == 'Darwin' ]; then # Mac OS X CPANM=/usr/local/bin/cpanm else # assume Ubuntu CPANM=cpanm fi $CPANM CPAN~2.00 # 1.0.9 or newer # (if the install of Carton 1.0.9 fails because of CPAN::Meta failure, # purge Perl with ./install_scripts/purge_mc_perl_brew.sh and # ./install_scripts/purge_carton_install.sh) $CPANM Carton~1.0.9 $CPANM List::MoreUtils # Install profiler and tools - $CPANM Devel::NYTProf + $CPANM --verbose Devel::NYTProf ? ++++++++++ $CPANM Devel::Cover $CPANM lib::core::only
2
0.055556
1
1
d48946c89b4436fad97fdee65e34d7ca77f58d95
modules/base.py
modules/base.py
import pandas as pd import pandas_datareader.data as web import datetime import config import os import re import pickle def get_file_path(code): return os.path.join(config.DATA_PATH, 'data', code + '.pkl') def download(code, year1, month1, day1, year2, month2, day2): start = datetime.datetime(year1, month1, day1) end = datetime.datetime(year2, month2, day2) df = web.DataReader('%s.KS' % code, 'yahoo', start, end) save(code, df) return df def load(code): try: return pd.read_pickle(code) except: pass return None def save(code, df): df.to_pickle(code) def dump(code, df): with open(get_file_path(code), 'wb') as handle: pickle.dump(df, handle)
import pandas as pd import pandas_datareader.data as web import datetime import config import os import re import pickle def get_file_path(code): if not os.path.exists(config.DATA_PATH): try: os.makedirs(config.DATA_PATH) except: pass return os.path.join(config.DATA_PATH, 'data', code + '.pkl') def download(code, year1, month1, day1, year2, month2, day2): start = datetime.datetime(year1, month1, day1) end = datetime.datetime(year2, month2, day2) df = web.DataReader('%s.KS' % code, 'yahoo', start, end) save(code, df) return df def load(code): try: return pd.read_pickle(code) except: pass return None def save(code, df): df.to_pickle(code) def dump(code, df): with open(get_file_path(code), 'wb') as handle: pickle.dump(df, handle)
Fix the FileNotFoundError when data director is not exist
Fix the FileNotFoundError when data director is not exist
Python
mit
jongha/stock-ai,jongha/stock-ai,jongha/stock-ai,jongha/stock-ai
python
## Code Before: import pandas as pd import pandas_datareader.data as web import datetime import config import os import re import pickle def get_file_path(code): return os.path.join(config.DATA_PATH, 'data', code + '.pkl') def download(code, year1, month1, day1, year2, month2, day2): start = datetime.datetime(year1, month1, day1) end = datetime.datetime(year2, month2, day2) df = web.DataReader('%s.KS' % code, 'yahoo', start, end) save(code, df) return df def load(code): try: return pd.read_pickle(code) except: pass return None def save(code, df): df.to_pickle(code) def dump(code, df): with open(get_file_path(code), 'wb') as handle: pickle.dump(df, handle) ## Instruction: Fix the FileNotFoundError when data director is not exist ## Code After: import pandas as pd import pandas_datareader.data as web import datetime import config import os import re import pickle def get_file_path(code): if not os.path.exists(config.DATA_PATH): try: os.makedirs(config.DATA_PATH) except: pass return os.path.join(config.DATA_PATH, 'data', code + '.pkl') def download(code, year1, month1, day1, year2, month2, day2): start = datetime.datetime(year1, month1, day1) end = datetime.datetime(year2, month2, day2) df = web.DataReader('%s.KS' % code, 'yahoo', start, end) save(code, df) return df def load(code): try: return pd.read_pickle(code) except: pass return None def save(code, df): df.to_pickle(code) def dump(code, df): with open(get_file_path(code), 'wb') as handle: pickle.dump(df, handle)
import pandas as pd import pandas_datareader.data as web import datetime import config import os import re import pickle def get_file_path(code): + if not os.path.exists(config.DATA_PATH): + try: + os.makedirs(config.DATA_PATH) + except: + pass + return os.path.join(config.DATA_PATH, 'data', code + '.pkl') def download(code, year1, month1, day1, year2, month2, day2): start = datetime.datetime(year1, month1, day1) end = datetime.datetime(year2, month2, day2) df = web.DataReader('%s.KS' % code, 'yahoo', start, end) save(code, df) return df def load(code): try: return pd.read_pickle(code) except: pass return None def save(code, df): df.to_pickle(code) def dump(code, df): with open(get_file_path(code), 'wb') as handle: pickle.dump(df, handle)
6
0.181818
6
0
8a77c4687d42710dab3a6d42f0e1967e35771543
.travis.yml
.travis.yml
sudo: false dist: trusty language: rust rust: - nightly - stable matrix: allow_failures: - rust: stable # Dependencies of kcov, used by coverage addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake cache: cargo before_script: # Install tools if not already installed - cargo install --list | grep clippy || cargo install clippy - cargo install --list | grep rustfmt || cargo install rustfmt - cargo install --list | grep cargo-update || cargo install cargo-update - cargo install --list | grep tarpaulin || cargo install cargo-tarpaulin # Update all tools - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay # Lint - cd core - cargo fmt -- --write-mode=diff after_success: - cargo clippy -- -Z no-trans -D clippy # clippy really loves to break, so it's okay if it fails - cd .. - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
sudo: false dist: trusty language: rust rust: - nightly - stable matrix: allow_failures: - rust: stable # Dependencies of kcov, used by coverage addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake cache: cargo before_script: # Install tools if not already installed - cargo install --list | grep clippy || cargo install clippy - cargo install --list | grep rustfmt || cargo install rustfmt - cargo install --list | grep cargo-update || cargo install cargo-update - cargo install --list | grep tarpaulin || cargo install cargo-tarpaulin # Update all tools - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay - echo "Installed rust utils:" - cargo install --list # Lint - cd core - cargo fmt -- --write-mode=diff after_success: - cargo clippy -- -Z no-trans -D clippy # clippy really loves to break, so it's okay if it fails - cd .. - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
Add little info about installed utils
Repo: Add little info about installed utils
YAML
agpl-3.0
SirRade/shootr,SirRade/shootr,SirRade/shootr,SirRade/shootr,SirRade/shootr
yaml
## Code Before: sudo: false dist: trusty language: rust rust: - nightly - stable matrix: allow_failures: - rust: stable # Dependencies of kcov, used by coverage addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake cache: cargo before_script: # Install tools if not already installed - cargo install --list | grep clippy || cargo install clippy - cargo install --list | grep rustfmt || cargo install rustfmt - cargo install --list | grep cargo-update || cargo install cargo-update - cargo install --list | grep tarpaulin || cargo install cargo-tarpaulin # Update all tools - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay # Lint - cd core - cargo fmt -- --write-mode=diff after_success: - cargo clippy -- -Z no-trans -D clippy # clippy really loves to break, so it's okay if it fails - cd .. - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID ## Instruction: Repo: Add little info about installed utils ## Code After: sudo: false dist: trusty language: rust rust: - nightly - stable matrix: allow_failures: - rust: stable # Dependencies of kcov, used by coverage addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake cache: cargo before_script: # Install tools if not already installed - cargo install --list | grep clippy || cargo install clippy - cargo install --list | grep rustfmt || cargo install rustfmt - cargo install --list | grep cargo-update || cargo install cargo-update - cargo install --list | grep tarpaulin || cargo install cargo-tarpaulin # Update all tools - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay - echo "Installed rust utils:" - cargo install --list # Lint - cd core - cargo fmt -- --write-mode=diff after_success: - cargo clippy -- -Z no-trans -D clippy # clippy really loves to break, so it's okay if it fails - cd .. - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
sudo: false dist: trusty language: rust rust: - nightly - stable matrix: allow_failures: - rust: stable # Dependencies of kcov, used by coverage addons: apt: packages: - libcurl4-openssl-dev - libelf-dev - libdw-dev - binutils-dev - cmake sources: - kalakris-cmake cache: cargo before_script: # Install tools if not already installed - cargo install --list | grep clippy || cargo install clippy - cargo install --list | grep rustfmt || cargo install rustfmt - cargo install --list | grep cargo-update || cargo install cargo-update - cargo install --list | grep tarpaulin || cargo install cargo-tarpaulin # Update all tools - cargo install-update -a || true # sometimes nightly breaks stuff, that's okay + - echo "Installed rust utils:" + - cargo install --list + # Lint - cd core - cargo fmt -- --write-mode=diff after_success: - cargo clippy -- -Z no-trans -D clippy # clippy really loves to break, so it's okay if it fails - cd .. - cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
3
0.069767
3
0
591f707a76292e60e8fcd201aa9f8924d20057a3
dev-machine/roles/linux/tasks/apt_repos.yml
dev-machine/roles/linux/tasks/apt_repos.yml
--- - name: 'Ensure the /etc/apt/sources.list file contains ~nothing' become: true copy: dest: '/etc/apt/sources.list' content: | # This is a stub owner: 'root' group: 'root' mode: '0444' notify: 'linux_apt-get-update' - name: 'Add the base ubuntu repositories' become: true copy: content: | deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} main deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates main deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} universe deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates universe deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates multiverse deb http://archive.canonical.com/ubuntu {{ ansible_distribution_release }} partner deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security universe deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security multiverse dest: "/etc/apt/sources.list.d/ubuntu-base.list" notify: 'linux_apt-get-update' - meta: flush_handlers - name: "Allow package updates using https" become: true apt: name: - "apt-transport-https" state: "present" notify: 'linux_apt-get-update' - meta: flush_handlers
--- - name: 'Ensure the /etc/apt/sources.list file contains ~nothing' become: true copy: dest: '/etc/apt/sources.list' content: | # This is a stub owner: 'root' group: 'root' mode: '0444' notify: 'linux_apt-get-update' - name: 'Add the base ubuntu repositories' become: true copy: content: | deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-backports main restricted universe multiverse deb http://archive.canonical.com/ubuntu {{ ansible_distribution_release }} partner dest: "/etc/apt/sources.list.d/ubuntu-base.list" notify: 'linux_apt-get-update' - meta: flush_handlers - name: "Allow package updates using https" become: true apt: name: - "apt-transport-https" state: "present" notify: 'linux_apt-get-update' - meta: flush_handlers
Correct the Ubuntu default repo list
Correct the Ubuntu default repo list
YAML
mit
marvinpinto/kitchensink,marvinpinto/kitchensink,marvinpinto/kitchensink
yaml
## Code Before: --- - name: 'Ensure the /etc/apt/sources.list file contains ~nothing' become: true copy: dest: '/etc/apt/sources.list' content: | # This is a stub owner: 'root' group: 'root' mode: '0444' notify: 'linux_apt-get-update' - name: 'Add the base ubuntu repositories' become: true copy: content: | deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} main deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates main deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} universe deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates universe deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates multiverse deb http://archive.canonical.com/ubuntu {{ ansible_distribution_release }} partner deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security universe deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security multiverse dest: "/etc/apt/sources.list.d/ubuntu-base.list" notify: 'linux_apt-get-update' - meta: flush_handlers - name: "Allow package updates using https" become: true apt: name: - "apt-transport-https" state: "present" notify: 'linux_apt-get-update' - meta: flush_handlers ## Instruction: Correct the Ubuntu default repo list ## Code After: --- - name: 'Ensure the /etc/apt/sources.list file contains ~nothing' become: true copy: dest: '/etc/apt/sources.list' content: | # This is a stub owner: 'root' group: 'root' mode: '0444' notify: 'linux_apt-get-update' - name: 'Add the base ubuntu repositories' become: true copy: content: | deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-backports main restricted universe multiverse deb http://archive.canonical.com/ubuntu {{ ansible_distribution_release }} partner dest: "/etc/apt/sources.list.d/ubuntu-base.list" notify: 'linux_apt-get-update' - meta: flush_handlers - name: "Allow package updates using https" become: true apt: name: - "apt-transport-https" state: "present" notify: 'linux_apt-get-update' - meta: flush_handlers
--- - name: 'Ensure the /etc/apt/sources.list file contains ~nothing' become: true copy: dest: '/etc/apt/sources.list' content: | # This is a stub owner: 'root' group: 'root' mode: '0444' notify: 'linux_apt-get-update' - name: 'Add the base ubuntu repositories' become: true copy: content: | - deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} main - deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates main - deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} universe - deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates universe - deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} multiverse + deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }} main restricted universe multiverse ? +++++++++++++++++++++++++ - deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates multiverse + deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-updates main restricted universe multiverse ? +++++++++++++++++++++++++ + deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu {{ ansible_distribution_release }}-backports main restricted universe multiverse deb http://archive.canonical.com/ubuntu {{ ansible_distribution_release }} partner - deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security main - deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security universe - deb http://security.ubuntu.com/ubuntu {{ ansible_distribution_release }}-security multiverse dest: "/etc/apt/sources.list.d/ubuntu-base.list" notify: 'linux_apt-get-update' - meta: flush_handlers - name: "Allow package updates using https" become: true apt: name: - "apt-transport-https" state: "present" notify: 'linux_apt-get-update' - meta: flush_handlers
13
0.317073
4
9
fd8f334f2670cd4c500cad1471ef2df73327cea7
ury-rapid-go.go
ury-rapid-go.go
package main import "os" import "fmt" import "net" import "bufio" func main() { conn, err := net.Dial("tcp", "127.0.0.1:1350") if err != nil { fmt.Println(err) os.Exit(1) } for { data, err := bufio.NewReader(conn).ReadString('\n') if err != nil { fmt.Println(err) os.Exit(1) } fmt.Printf(data) } }
package main import "os" import "fmt" import "net" import "bufio" import "bytes" import "github.com/UniversityRadioYork/ury-rapid-go/tokeniser" func main() { conn, err := net.Dial("tcp", "127.0.0.1:1350") if err != nil { fmt.Println(err) os.Exit(1) } t := tokeniser.NewTokeniser() for { data, err := bufio.NewReader(conn).ReadBytes('\n') if err != nil { fmt.Println(err) os.Exit(1) } lines := t.Parse(data) buffer := new(bytes.Buffer) for _, line := range lines { for _, word := range line { buffer.WriteString(word + " ") } fmt.Println(buffer.String()) } } }
Print lines as they come in
Print lines as they come in
Go
mit
UniversityRadioYork/bifrost,UniversityRadioYork/bifrost,UniversityRadioYork/heimdallr,UniversityRadioYork/heimdallr,UniversityRadioYork/bifrost,UniversityRadioYork/heimdallr
go
## Code Before: package main import "os" import "fmt" import "net" import "bufio" func main() { conn, err := net.Dial("tcp", "127.0.0.1:1350") if err != nil { fmt.Println(err) os.Exit(1) } for { data, err := bufio.NewReader(conn).ReadString('\n') if err != nil { fmt.Println(err) os.Exit(1) } fmt.Printf(data) } } ## Instruction: Print lines as they come in ## Code After: package main import "os" import "fmt" import "net" import "bufio" import "bytes" import "github.com/UniversityRadioYork/ury-rapid-go/tokeniser" func main() { conn, err := net.Dial("tcp", "127.0.0.1:1350") if err != nil { fmt.Println(err) os.Exit(1) } t := tokeniser.NewTokeniser() for { data, err := bufio.NewReader(conn).ReadBytes('\n') if err != nil { fmt.Println(err) os.Exit(1) } lines := t.Parse(data) buffer := new(bytes.Buffer) for _, line := range lines { for _, word := range line { buffer.WriteString(word + " ") } fmt.Println(buffer.String()) } } }
package main import "os" import "fmt" import "net" import "bufio" + import "bytes" + + import "github.com/UniversityRadioYork/ury-rapid-go/tokeniser" func main() { conn, err := net.Dial("tcp", "127.0.0.1:1350") if err != nil { fmt.Println(err) os.Exit(1) } + t := tokeniser.NewTokeniser() for { - data, err := bufio.NewReader(conn).ReadString('\n') ? ^ ^^^^ + data, err := bufio.NewReader(conn).ReadBytes('\n') ? ^^ ^^ if err != nil { fmt.Println(err) os.Exit(1) } - fmt.Printf(data) + lines := t.Parse(data) + buffer := new(bytes.Buffer) + for _, line := range lines { + for _, word := range line { + buffer.WriteString(word + " ") + } + fmt.Println(buffer.String()) + } } }
15
0.681818
13
2
e0f886252c90bcfe55c8de26d82975906babae29
.styleci.yml
.styleci.yml
preset: symfony disabled: - multiline_array_trailing_comma - pre_increment - single_quote - concat_without_spaces - empty_return - spaces_cast - unalign_equals - unalign_double_arrow - phpdoc_to_comment enabled: - short_array_syntax
preset: symfony disabled: - multiline_array_trailing_comma - pre_increment - single_quote - concat_without_spaces - empty_return - spaces_cast - unalign_equals - unalign_double_arrow - phpdoc_to_comment - phpdoc_annotation_without_dot enabled: - short_array_syntax
Allow Docblocks to end with a dot.
Allow Docblocks to end with a dot.
YAML
mit
cmfcmf/MediaModule,cmfcmf/MediaModule,cmfcmf/MediaModule,cmfcmf/MediaModule
yaml
## Code Before: preset: symfony disabled: - multiline_array_trailing_comma - pre_increment - single_quote - concat_without_spaces - empty_return - spaces_cast - unalign_equals - unalign_double_arrow - phpdoc_to_comment enabled: - short_array_syntax ## Instruction: Allow Docblocks to end with a dot. ## Code After: preset: symfony disabled: - multiline_array_trailing_comma - pre_increment - single_quote - concat_without_spaces - empty_return - spaces_cast - unalign_equals - unalign_double_arrow - phpdoc_to_comment - phpdoc_annotation_without_dot enabled: - short_array_syntax
preset: symfony disabled: - multiline_array_trailing_comma - pre_increment - single_quote - concat_without_spaces - empty_return - spaces_cast - unalign_equals - unalign_double_arrow - phpdoc_to_comment + - phpdoc_annotation_without_dot enabled: - short_array_syntax
1
0.066667
1
0
ee4d4c96cbb74f7d9a37ddb22475bd7a79a4a8e1
pokr/templates/person-statements.html
pokr/templates/person-statements.html
{% set NUM_STATEMENTS_SHOWN = 5 %} <div id="section-statements" class="section"> <h3 id="statements">{{gettext('Statements')}}</h3> <table class="table table-condensed"> <tr> <th>{{ gettext('Speaker') }}</th> <th>{{ gettext('Statement') }}</th> <th class="statement-date">{{ gettext('Date') }}</th> </tr> {% with statements = person.statements[:NUM_STATEMENTS_SHOWN + 1] %} {% for statement in statements[:NUM_STATEMENTS_SHOWN] %} <tr> <td class="speaker-name">{{ widgets.card(person, tiny=True)|safe }}<br>{{ person.name }}</td> <td> {% for sentence in statement.content.split('.') %} {{ sentence }}{% if not loop.last %}.{% endif %}<br> {% endfor %} </td> <td><a href="{{ statement.url }}">{{ statement.date }}</a></td> </tr> {% endfor %} {% if statements|length > NUM_STATEMENTS_SHOWN %} <tr> <td colspan="3" class="btn-more"><a href="#">{{ gettext("'more' is comming soon") }}</a></td> </tr> {% endif %} {% endwith %} </table> </div>
{% set NUM_STATEMENTS_SHOWN = 5 %} <div id="section-statements" class="section"> <h3 id="statements">{{gettext('Statements')}}</h3> <table class="table table-condensed"> <tr> <th class="statement-date">{{ gettext('Date') }}</th> <th>{{ gettext('Statement') }}</th> </tr> {% with statements = person.statements[:NUM_STATEMENTS_SHOWN + 1] %} {% for statement in statements[:NUM_STATEMENTS_SHOWN] %} <tr> <td><a href="{{ statement.url }}">{{ statement.date }}</a></td> <td> {% for sentence in statement.content.split('.') %} {{ sentence }}{% if not loop.last %}.{% endif %}<br> {% endfor %} </td> </tr> {% endfor %} {% if statements|length > NUM_STATEMENTS_SHOWN %} <tr> <td colspan="3" class="btn-more"><a href="#">{{ gettext("'more' is comming soon") }}</a></td> </tr> {% endif %} {% endwith %} </table> </div>
Remove card from statements in person page
Remove card from statements in person page
HTML
apache-2.0
teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr
html
## Code Before: {% set NUM_STATEMENTS_SHOWN = 5 %} <div id="section-statements" class="section"> <h3 id="statements">{{gettext('Statements')}}</h3> <table class="table table-condensed"> <tr> <th>{{ gettext('Speaker') }}</th> <th>{{ gettext('Statement') }}</th> <th class="statement-date">{{ gettext('Date') }}</th> </tr> {% with statements = person.statements[:NUM_STATEMENTS_SHOWN + 1] %} {% for statement in statements[:NUM_STATEMENTS_SHOWN] %} <tr> <td class="speaker-name">{{ widgets.card(person, tiny=True)|safe }}<br>{{ person.name }}</td> <td> {% for sentence in statement.content.split('.') %} {{ sentence }}{% if not loop.last %}.{% endif %}<br> {% endfor %} </td> <td><a href="{{ statement.url }}">{{ statement.date }}</a></td> </tr> {% endfor %} {% if statements|length > NUM_STATEMENTS_SHOWN %} <tr> <td colspan="3" class="btn-more"><a href="#">{{ gettext("'more' is comming soon") }}</a></td> </tr> {% endif %} {% endwith %} </table> </div> ## Instruction: Remove card from statements in person page ## Code After: {% set NUM_STATEMENTS_SHOWN = 5 %} <div id="section-statements" class="section"> <h3 id="statements">{{gettext('Statements')}}</h3> <table class="table table-condensed"> <tr> <th class="statement-date">{{ gettext('Date') }}</th> <th>{{ gettext('Statement') }}</th> </tr> {% with statements = person.statements[:NUM_STATEMENTS_SHOWN + 1] %} {% for statement in statements[:NUM_STATEMENTS_SHOWN] %} <tr> <td><a href="{{ statement.url }}">{{ statement.date }}</a></td> <td> {% for sentence in statement.content.split('.') %} {{ sentence }}{% if not loop.last %}.{% endif %}<br> {% endfor %} </td> </tr> {% endfor %} {% if statements|length > NUM_STATEMENTS_SHOWN %} <tr> <td colspan="3" class="btn-more"><a href="#">{{ gettext("'more' is comming soon") }}</a></td> </tr> {% endif %} {% endwith %} </table> </div>
{% set NUM_STATEMENTS_SHOWN = 5 %} <div id="section-statements" class="section"> <h3 id="statements">{{gettext('Statements')}}</h3> <table class="table table-condensed"> <tr> - <th>{{ gettext('Speaker') }}</th> + <th class="statement-date">{{ gettext('Date') }}</th> <th>{{ gettext('Statement') }}</th> - <th class="statement-date">{{ gettext('Date') }}</th> </tr> {% with statements = person.statements[:NUM_STATEMENTS_SHOWN + 1] %} {% for statement in statements[:NUM_STATEMENTS_SHOWN] %} <tr> - <td class="speaker-name">{{ widgets.card(person, tiny=True)|safe }}<br>{{ person.name }}</td> + <td><a href="{{ statement.url }}">{{ statement.date }}</a></td> <td> {% for sentence in statement.content.split('.') %} {{ sentence }}{% if not loop.last %}.{% endif %}<br> {% endfor %} </td> - <td><a href="{{ statement.url }}">{{ statement.date }}</a></td> </tr> {% endfor %} {% if statements|length > NUM_STATEMENTS_SHOWN %} <tr> <td colspan="3" class="btn-more"><a href="#">{{ gettext("'more' is comming soon") }}</a></td> </tr> {% endif %} {% endwith %} </table> </div>
6
0.206897
2
4
4a71088554de9cd524a29e2eb6e041851ff4b0e8
lib/nexmo/signature.rb
lib/nexmo/signature.rb
require 'digest/md5' require 'jwt' module Nexmo module Signature def self.check(params, secret) params = params.dup signature = params.delete('sig') ::JWT.secure_compare(signature, digest(params, secret)) end private def self.digest(params, secret) md5 = Digest::MD5.new params.sort.each do |k, v| md5.update("&#{k}=#{v}") end md5.update(secret) md5.hexdigest end end end
require 'digest/md5' require 'jwt' module Nexmo module Signature def self.check(params, secret) params = params.dup signature = params.delete('sig') secure_compare(signature, digest(params, secret)) end private if defined?(::JWT::SecurityUtils) # ruby-jwt v2 def self.secure_compare(left, right) ::JWT::SecurityUtils.secure_compare(left, right) end else def self.secure_compare(left, right) ::JWT.secure_compare(left, right) end end def self.digest(params, secret) md5 = Digest::MD5.new params.sort.each do |k, v| md5.update("&#{k}=#{v}") end md5.update(secret) md5.hexdigest end end end
Fix Nexmo::Signature for compatibility with ruby-jwt v2
Fix Nexmo::Signature for compatibility with ruby-jwt v2 Currently raising NoMethodError: undefined method `secure_compare' because the secure_compare method has been moved into a JWT::SecurityUtils module.
Ruby
mit
Nexmo/ruby-nexmo
ruby
## Code Before: require 'digest/md5' require 'jwt' module Nexmo module Signature def self.check(params, secret) params = params.dup signature = params.delete('sig') ::JWT.secure_compare(signature, digest(params, secret)) end private def self.digest(params, secret) md5 = Digest::MD5.new params.sort.each do |k, v| md5.update("&#{k}=#{v}") end md5.update(secret) md5.hexdigest end end end ## Instruction: Fix Nexmo::Signature for compatibility with ruby-jwt v2 Currently raising NoMethodError: undefined method `secure_compare' because the secure_compare method has been moved into a JWT::SecurityUtils module. ## Code After: require 'digest/md5' require 'jwt' module Nexmo module Signature def self.check(params, secret) params = params.dup signature = params.delete('sig') secure_compare(signature, digest(params, secret)) end private if defined?(::JWT::SecurityUtils) # ruby-jwt v2 def self.secure_compare(left, right) ::JWT::SecurityUtils.secure_compare(left, right) end else def self.secure_compare(left, right) ::JWT.secure_compare(left, right) end end def self.digest(params, secret) md5 = Digest::MD5.new params.sort.each do |k, v| md5.update("&#{k}=#{v}") end md5.update(secret) md5.hexdigest end end end
require 'digest/md5' require 'jwt' module Nexmo module Signature def self.check(params, secret) params = params.dup signature = params.delete('sig') - ::JWT.secure_compare(signature, digest(params, secret)) ? ------ + secure_compare(signature, digest(params, secret)) end private + + if defined?(::JWT::SecurityUtils) # ruby-jwt v2 + def self.secure_compare(left, right) + ::JWT::SecurityUtils.secure_compare(left, right) + end + else + def self.secure_compare(left, right) + ::JWT.secure_compare(left, right) + end + end def self.digest(params, secret) md5 = Digest::MD5.new params.sort.each do |k, v| md5.update("&#{k}=#{v}") end md5.update(secret) md5.hexdigest end end end
12
0.428571
11
1
d4cf9e22ccdaeb0071208f0a1563ff58bc0254db
modules/features2d/perf/perf_fast.cpp
modules/features2d/perf/perf_fast.cpp
using namespace std; using namespace cv; using namespace perf; using std::tr1::make_tuple; using std::tr1::get; typedef perf::TestBaseWithParam<std::string> fast; #define FAST_IMAGES \ "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\ "stitching/a3.png" PERF_TEST_P(fast, detectForORB, testing::Values(FAST_IMAGES)) { String filename = getDataPath(GetParam()); Mat frame = imread(filename, IMREAD_GRAYSCALE); if (frame.empty()) FAIL() << "Unable to load source image " << filename; declare.in(frame); FastFeatureDetector fd(20, true, FastFeatureDetector::TYPE_5_8); vector<KeyPoint> points; TEST_CYCLE() fd.detect(frame, points); fd = FastFeatureDetector(20, true, FastFeatureDetector::TYPE_7_12); TEST_CYCLE() fd.detect(frame, points); fd = FastFeatureDetector(20, true, FastFeatureDetector::TYPE_9_16); TEST_CYCLE() fd.detect(frame, points); }
using namespace std; using namespace cv; using namespace perf; using std::tr1::make_tuple; using std::tr1::get; enum { TYPE_5_8 =FastFeatureDetector::TYPE_5_8, TYPE_7_12 = FastFeatureDetector::TYPE_7_12, TYPE_9_16 = FastFeatureDetector::TYPE_9_16 }; CV_ENUM(FastType, TYPE_5_8, TYPE_7_12, TYPE_9_16) typedef std::tr1::tuple<String, FastType> File_Type_t; typedef perf::TestBaseWithParam<File_Type_t> fast; #define FAST_IMAGES \ "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\ "stitching/a3.png" PERF_TEST_P(fast, detect, testing::Combine( testing::Values(FAST_IMAGES), testing::ValuesIn(FastType::all()) )) { String filename = getDataPath(get<0>(GetParam())); int type = get<1>(GetParam()); Mat frame = imread(filename, IMREAD_GRAYSCALE); if (frame.empty()) FAIL() << "Unable to load source image " << filename; declare.in(frame); FastFeatureDetector fd(20, true, type); vector<KeyPoint> points; TEST_CYCLE() fd.detect(frame, points); SANITY_CHECK(points); }
Fix terrible perf test for FAST detector
Fix terrible perf test for FAST detector
C++
apache-2.0
opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv
c++
## Code Before: using namespace std; using namespace cv; using namespace perf; using std::tr1::make_tuple; using std::tr1::get; typedef perf::TestBaseWithParam<std::string> fast; #define FAST_IMAGES \ "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\ "stitching/a3.png" PERF_TEST_P(fast, detectForORB, testing::Values(FAST_IMAGES)) { String filename = getDataPath(GetParam()); Mat frame = imread(filename, IMREAD_GRAYSCALE); if (frame.empty()) FAIL() << "Unable to load source image " << filename; declare.in(frame); FastFeatureDetector fd(20, true, FastFeatureDetector::TYPE_5_8); vector<KeyPoint> points; TEST_CYCLE() fd.detect(frame, points); fd = FastFeatureDetector(20, true, FastFeatureDetector::TYPE_7_12); TEST_CYCLE() fd.detect(frame, points); fd = FastFeatureDetector(20, true, FastFeatureDetector::TYPE_9_16); TEST_CYCLE() fd.detect(frame, points); } ## Instruction: Fix terrible perf test for FAST detector ## Code After: using namespace std; using namespace cv; using namespace perf; using std::tr1::make_tuple; using std::tr1::get; enum { TYPE_5_8 =FastFeatureDetector::TYPE_5_8, TYPE_7_12 = FastFeatureDetector::TYPE_7_12, TYPE_9_16 = FastFeatureDetector::TYPE_9_16 }; CV_ENUM(FastType, TYPE_5_8, TYPE_7_12, TYPE_9_16) typedef std::tr1::tuple<String, FastType> File_Type_t; typedef perf::TestBaseWithParam<File_Type_t> fast; #define FAST_IMAGES \ "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\ "stitching/a3.png" PERF_TEST_P(fast, detect, testing::Combine( testing::Values(FAST_IMAGES), testing::ValuesIn(FastType::all()) )) { String filename = getDataPath(get<0>(GetParam())); int type = get<1>(GetParam()); Mat frame = imread(filename, IMREAD_GRAYSCALE); if (frame.empty()) FAIL() << "Unable to load source image " << filename; declare.in(frame); FastFeatureDetector fd(20, true, type); vector<KeyPoint> points; TEST_CYCLE() fd.detect(frame, points); SANITY_CHECK(points); }
using namespace std; using namespace cv; using namespace perf; using std::tr1::make_tuple; using std::tr1::get; + enum { TYPE_5_8 =FastFeatureDetector::TYPE_5_8, TYPE_7_12 = FastFeatureDetector::TYPE_7_12, TYPE_9_16 = FastFeatureDetector::TYPE_9_16 }; + CV_ENUM(FastType, TYPE_5_8, TYPE_7_12, TYPE_9_16) + + typedef std::tr1::tuple<String, FastType> File_Type_t; - typedef perf::TestBaseWithParam<std::string> fast; ? ^ --------- + typedef perf::TestBaseWithParam<File_Type_t> fast; ? ^^^^^^^^^^ #define FAST_IMAGES \ "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\ "stitching/a3.png" - PERF_TEST_P(fast, detectForORB, testing::Values(FAST_IMAGES)) + PERF_TEST_P(fast, detect, testing::Combine( + testing::Values(FAST_IMAGES), + testing::ValuesIn(FastType::all()) + )) { - String filename = getDataPath(GetParam()); + String filename = getDataPath(get<0>(GetParam())); ? +++++++ + + int type = get<1>(GetParam()); Mat frame = imread(filename, IMREAD_GRAYSCALE); if (frame.empty()) FAIL() << "Unable to load source image " << filename; declare.in(frame); - FastFeatureDetector fd(20, true, FastFeatureDetector::TYPE_5_8); + FastFeatureDetector fd(20, true, type); vector<KeyPoint> points; TEST_CYCLE() fd.detect(frame, points); + + SANITY_CHECK(points); - fd = FastFeatureDetector(20, true, FastFeatureDetector::TYPE_7_12); - TEST_CYCLE() fd.detect(frame, points); - fd = FastFeatureDetector(20, true, FastFeatureDetector::TYPE_9_16); - TEST_CYCLE() fd.detect(frame, points); }
22
0.666667
14
8
ce34ec471e45caf2965551e1485828fa8cbd9628
lib/libra2/app/assets/javascripts/computing_id_lookup.js
lib/libra2/app/assets/javascripts/computing_id_lookup.js
(function() { "use strict"; function initPage() { var outerForm = $(".generic_work_contributor"); $("body").on("keyup", ".contributor_computing_id", function() { var self = $(this); var index = self.data("index"); var id = self.val(); function onSuccess(resp) { console.log(resp); if (resp.cid) { // The computing id was found if the object returned is not empty. var elFirstName = outerForm.find(".contributor_first_name[data-index=" + index + "]"); elFirstName.val(resp.first_name); var elLastName = outerForm.find(".contributor_last_name[data-index=" + index + "]"); elLastName.val(resp.last_name); var elDepartment = outerForm.find(".contributor_department[data-index=" + index + "]"); elDepartment.val(resp.department); var elInstitution = outerForm.find(".contributor_institution[data-index=" + index + "]"); elInstitution.val(resp.institution); } } $.ajax("/computing_id.json", { data: { id: id, index: index }, success: onSuccess }); }); } $(window).bind('page:change', function() { initPage(); }); })();
(function() { "use strict"; function initPage() { var outerForm = $(".generic_work_contributor"); $("body").on("keyup", ".contributor_computing_id", function() { var self = $(this); var index = self.data("index"); var id = self.val(); function onSuccess(resp) { console.log(resp); var elFirstName = outerForm.find(".contributor_first_name[data-index=" + index + "]"); var elLastName = outerForm.find(".contributor_last_name[data-index=" + index + "]"); var elDepartment = outerForm.find(".contributor_department[data-index=" + index + "]"); var elInstitution = outerForm.find(".contributor_institution[data-index=" + index + "]"); if (resp.cid) { // The computing id was found if the object returned is not empty. elFirstName.val(resp.first_name); elLastName.val(resp.last_name); elDepartment.val(resp.department); elInstitution.val(resp.institution); } else { elFirstName.val(""); elLastName.val(""); elDepartment.val(""); elInstitution.val(""); } } $.ajax("/computing_id.json", { data: { id: id, index: index }, success: onSuccess }); }); } $(window).bind('page:change', function() { initPage(); }); })();
Remove advisor info when computing ID doesn't match.
Remove advisor info when computing ID doesn't match.
JavaScript
apache-2.0
uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2
javascript
## Code Before: (function() { "use strict"; function initPage() { var outerForm = $(".generic_work_contributor"); $("body").on("keyup", ".contributor_computing_id", function() { var self = $(this); var index = self.data("index"); var id = self.val(); function onSuccess(resp) { console.log(resp); if (resp.cid) { // The computing id was found if the object returned is not empty. var elFirstName = outerForm.find(".contributor_first_name[data-index=" + index + "]"); elFirstName.val(resp.first_name); var elLastName = outerForm.find(".contributor_last_name[data-index=" + index + "]"); elLastName.val(resp.last_name); var elDepartment = outerForm.find(".contributor_department[data-index=" + index + "]"); elDepartment.val(resp.department); var elInstitution = outerForm.find(".contributor_institution[data-index=" + index + "]"); elInstitution.val(resp.institution); } } $.ajax("/computing_id.json", { data: { id: id, index: index }, success: onSuccess }); }); } $(window).bind('page:change', function() { initPage(); }); })(); ## Instruction: Remove advisor info when computing ID doesn't match. ## Code After: (function() { "use strict"; function initPage() { var outerForm = $(".generic_work_contributor"); $("body").on("keyup", ".contributor_computing_id", function() { var self = $(this); var index = self.data("index"); var id = self.val(); function onSuccess(resp) { console.log(resp); var elFirstName = outerForm.find(".contributor_first_name[data-index=" + index + "]"); var elLastName = outerForm.find(".contributor_last_name[data-index=" + index + "]"); var elDepartment = outerForm.find(".contributor_department[data-index=" + index + "]"); var elInstitution = outerForm.find(".contributor_institution[data-index=" + index + "]"); if (resp.cid) { // The computing id was found if the object returned is not empty. elFirstName.val(resp.first_name); elLastName.val(resp.last_name); elDepartment.val(resp.department); elInstitution.val(resp.institution); } else { elFirstName.val(""); elLastName.val(""); elDepartment.val(""); elInstitution.val(""); } } $.ajax("/computing_id.json", { data: { id: id, index: index }, success: onSuccess }); }); } $(window).bind('page:change', function() { initPage(); }); })();
(function() { "use strict"; function initPage() { var outerForm = $(".generic_work_contributor"); $("body").on("keyup", ".contributor_computing_id", function() { var self = $(this); var index = self.data("index"); var id = self.val(); function onSuccess(resp) { console.log(resp); + var elFirstName = outerForm.find(".contributor_first_name[data-index=" + index + "]"); + var elLastName = outerForm.find(".contributor_last_name[data-index=" + index + "]"); + var elDepartment = outerForm.find(".contributor_department[data-index=" + index + "]"); + var elInstitution = outerForm.find(".contributor_institution[data-index=" + index + "]"); if (resp.cid) { // The computing id was found if the object returned is not empty. - var elFirstName = outerForm.find(".contributor_first_name[data-index=" + index + "]"); elFirstName.val(resp.first_name); - var elLastName = outerForm.find(".contributor_last_name[data-index=" + index + "]"); elLastName.val(resp.last_name); - var elDepartment = outerForm.find(".contributor_department[data-index=" + index + "]"); elDepartment.val(resp.department); - var elInstitution = outerForm.find(".contributor_institution[data-index=" + index + "]"); elInstitution.val(resp.institution); + } else { + elFirstName.val(""); + elLastName.val(""); + elDepartment.val(""); + elInstitution.val(""); } } $.ajax("/computing_id.json", { data: { id: id, index: index }, success: onSuccess }); }); } $(window).bind('page:change', function() { initPage(); }); })();
13
0.361111
9
4
f1f9a58acd4e7ca1fb2fd72d3c607e6ad90d1168
api/ruby/control-structures/to_json_string.md
api/ruby/control-structures/to_json_string.md
--- layout: api-command language: Ruby permalink: api/ruby/to_json_string/ command: 'to_json_string, to_json' related_commands: json: json/ --- # Command syntax # {% apibody %} value.to_json_string() &rarr; string value.to_json() &rarr; string {% endapibody %} # Description # Convert a ReQL value or object to a JSON string. You may use either `to_json_string` or `to_json`. __Example:__ Get a ReQL document as a JSON string. ```rb > r.table('hero').get(1).to_json() '{"id": 1, "name": "Batman", "city": "Gotham", "powers": ["martial arts", "cinematic entrances"]}' ```
--- layout: api-command language: Ruby permalink: api/ruby/to_json_string/ command: 'to_json_string, to_json' related_commands: json: json/ --- # Command syntax # {% apibody %} value.to_json_string() &rarr; string {% endapibody %} # Description # Convert a ReQL value or object to a JSON string. You may use either `to_json_string` or `to_json`. __Example:__ Get a ReQL document as a JSON string. ```rb > r.table('hero').get(1).to_json_string() '{"id": 1, "name": "Batman", "city": "Gotham", "powers": ["martial arts", "cinematic entrances"]}' ```
Remove to_json() from Ruby API
Remove to_json() from Ruby API
Markdown
apache-2.0
rust-rethinkdb/reql,rust-rethinkdb/reql,rust-rethinkdb/reql,rust-rethinkdb/reql,rust-rethinkdb/reql,rust-rethinkdb/reql
markdown
## Code Before: --- layout: api-command language: Ruby permalink: api/ruby/to_json_string/ command: 'to_json_string, to_json' related_commands: json: json/ --- # Command syntax # {% apibody %} value.to_json_string() &rarr; string value.to_json() &rarr; string {% endapibody %} # Description # Convert a ReQL value or object to a JSON string. You may use either `to_json_string` or `to_json`. __Example:__ Get a ReQL document as a JSON string. ```rb > r.table('hero').get(1).to_json() '{"id": 1, "name": "Batman", "city": "Gotham", "powers": ["martial arts", "cinematic entrances"]}' ``` ## Instruction: Remove to_json() from Ruby API ## Code After: --- layout: api-command language: Ruby permalink: api/ruby/to_json_string/ command: 'to_json_string, to_json' related_commands: json: json/ --- # Command syntax # {% apibody %} value.to_json_string() &rarr; string {% endapibody %} # Description # Convert a ReQL value or object to a JSON string. You may use either `to_json_string` or `to_json`. __Example:__ Get a ReQL document as a JSON string. ```rb > r.table('hero').get(1).to_json_string() '{"id": 1, "name": "Batman", "city": "Gotham", "powers": ["martial arts", "cinematic entrances"]}' ```
--- layout: api-command language: Ruby permalink: api/ruby/to_json_string/ command: 'to_json_string, to_json' related_commands: json: json/ --- # Command syntax # {% apibody %} value.to_json_string() &rarr; string - value.to_json() &rarr; string {% endapibody %} # Description # Convert a ReQL value or object to a JSON string. You may use either `to_json_string` or `to_json`. __Example:__ Get a ReQL document as a JSON string. ```rb - > r.table('hero').get(1).to_json() + > r.table('hero').get(1).to_json_string() ? +++++++ '{"id": 1, "name": "Batman", "city": "Gotham", "powers": ["martial arts", "cinematic entrances"]}' ```
3
0.115385
1
2
372f754ffe50dbf9a093509a786ebed4f068f72c
elisp/aspk-advice.el
elisp/aspk-advice.el
(defmacro aspk/advice-add (func-name pos action) "Add a acvice `action' to `func-name' at `pos'. Currently `pos' can only be `before' and `after'." (message "Add advice. Function:%S, pos:%S, action:%S" func-name pos action) `(progn (defadvice ,func-name (,pos aspk-add-trace) (let ((args (ad-get-args 0))) (apply ',action ',func-name ad-return-value args)) ;; (message "Return value: %S" ad-return-value) ) (ad-activate ',func-name))) (defun aspk/advice-add-multi (func-name-list pos action) (dolist (func-name func-name-list) (eval `(aspk/advice-add ,func-name ,pos ,action)))) (provide 'aspk-advice)
(defmacro aspk/advice-add (func-name pos action) "Add a advice `action' to `func-name' at `pos'. Currently `pos' can only be `before' and `after'." (message "Add advice. Function:%S, pos:%S, action:%S" func-name pos action) `(progn (defadvice ,func-name (,pos aspk-add-trace) (let ((args (ad-get-args 0))) (apply ',action ',func-name ad-return-value args))) (ad-activate ',func-name))) (defun aspk/advice-add-multi (func-name-list pos action) "Add a advice `action' to `func-name-list' at `pos'. Currently `pos' can only be `before' and `after'." (dolist (func-name func-name-list) (eval `(aspk/advice-add ,func-name ,pos ,action)))) (provide 'aspk-advice)
Add doc string. Fix some typo.
Add doc string. Fix some typo.
Emacs Lisp
mit
astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base,astropeak/aspk-code-base
emacs-lisp
## Code Before: (defmacro aspk/advice-add (func-name pos action) "Add a acvice `action' to `func-name' at `pos'. Currently `pos' can only be `before' and `after'." (message "Add advice. Function:%S, pos:%S, action:%S" func-name pos action) `(progn (defadvice ,func-name (,pos aspk-add-trace) (let ((args (ad-get-args 0))) (apply ',action ',func-name ad-return-value args)) ;; (message "Return value: %S" ad-return-value) ) (ad-activate ',func-name))) (defun aspk/advice-add-multi (func-name-list pos action) (dolist (func-name func-name-list) (eval `(aspk/advice-add ,func-name ,pos ,action)))) (provide 'aspk-advice) ## Instruction: Add doc string. Fix some typo. ## Code After: (defmacro aspk/advice-add (func-name pos action) "Add a advice `action' to `func-name' at `pos'. Currently `pos' can only be `before' and `after'." (message "Add advice. Function:%S, pos:%S, action:%S" func-name pos action) `(progn (defadvice ,func-name (,pos aspk-add-trace) (let ((args (ad-get-args 0))) (apply ',action ',func-name ad-return-value args))) (ad-activate ',func-name))) (defun aspk/advice-add-multi (func-name-list pos action) "Add a advice `action' to `func-name-list' at `pos'. Currently `pos' can only be `before' and `after'." (dolist (func-name func-name-list) (eval `(aspk/advice-add ,func-name ,pos ,action)))) (provide 'aspk-advice)
(defmacro aspk/advice-add (func-name pos action) - "Add a acvice `action' to `func-name' at `pos'. Currently `pos' can only be `before' and `after'." ? ^ + "Add a advice `action' to `func-name' at `pos'. Currently `pos' can only be `before' and `after'." ? ^ (message "Add advice. Function:%S, pos:%S, action:%S" func-name pos action) `(progn (defadvice ,func-name (,pos aspk-add-trace) (let ((args (ad-get-args 0))) - (apply ',action ',func-name ad-return-value args)) + (apply ',action ',func-name ad-return-value args))) ? + - ;; (message "Return value: %S" ad-return-value) - ) (ad-activate ',func-name))) (defun aspk/advice-add-multi (func-name-list pos action) + "Add a advice `action' to `func-name-list' at `pos'. Currently `pos' can only be `before' and `after'." (dolist (func-name func-name-list) (eval `(aspk/advice-add ,func-name ,pos ,action)))) (provide 'aspk-advice)
7
0.4375
3
4
ccc56a2c57988264f2ee018dc79debffd6a76be3
tests/test_calibrate_radiometric_response.sh
tests/test_calibrate_radiometric_response.sh
function feq() { echo $1'=='$2 | bc -l } function fle() { echo $1'<='$2 | bc -l } exe="$1" dir="$2/radiometric_response_calibration" methods=("debevec" "engel") for method in "${methods[@]}"; do crf=`$exe $dir --verbosity 0 --no-visualization --print --method $method -o /tmp/crf` while read -r line; do values=($(echo $line)) if [[ ${#values[@]} != 256 ]]; then echo "CRF should have 256 values ($method)" exit 1 fi if [[ $(feq ${values[0]} 0) == 0 ]]; then echo "CRF should map 0 to 0 ($method)" exit 1 fi if [[ $(feq ${values[255]} 1) == 0 ]]; then echo "CRF should map 255 to 1 ($method)" exit 1 fi for i in "${!values[@]-1}"; do if [[ $(fle ${values[i]} ${values[i+1]}) == 0 ]]; then echo "CRF should be nondecreasing ($method, element $i)" exit 1 fi done done <<< "$crf" done exit 0
function feq() { echo $1'=='$2 | bc -l } function fle() { echo $1'<='$2 | bc -l } exe="$1" dir="$2/radiometric_response_calibration" methods=("debevec" "engel") for method in "${methods[@]}"; do crf=$($exe $dir --verbosity 0 --no-visualization --print --method $method -o /tmp/crf) if [[ $? -ne 0 ]]; then echo "Calibration app returned non-zero status" echo "NOTE: this test requires calibration data to be downloaded from Git LFS." echo " Please make sure to run: git lfs pull" exit 1 fi while read -r line; do values=($(echo $line)) if [[ ${#values[@]} != 256 ]]; then echo "CRF should have 256 values ($method)" exit 1 fi if [[ $(feq ${values[0]} 0) == 0 ]]; then echo "CRF should map 0 to 0 ($method)" exit 1 fi if [[ $(feq ${values[255]} 1) == 0 ]]; then echo "CRF should map 255 to 1 ($method)" exit 1 fi for i in "${!values[@]-1}"; do if [[ $(fle ${values[i]} ${values[i+1]}) == 0 ]]; then echo "CRF should be nondecreasing ($method, element $i)" exit 1 fi done done <<< "$crf" done exit 0
Test app return value and add a note regarding Git LFS
Test app return value and add a note regarding Git LFS
Shell
mit
taketwo/radical,taketwo/radical,taketwo/radical
shell
## Code Before: function feq() { echo $1'=='$2 | bc -l } function fle() { echo $1'<='$2 | bc -l } exe="$1" dir="$2/radiometric_response_calibration" methods=("debevec" "engel") for method in "${methods[@]}"; do crf=`$exe $dir --verbosity 0 --no-visualization --print --method $method -o /tmp/crf` while read -r line; do values=($(echo $line)) if [[ ${#values[@]} != 256 ]]; then echo "CRF should have 256 values ($method)" exit 1 fi if [[ $(feq ${values[0]} 0) == 0 ]]; then echo "CRF should map 0 to 0 ($method)" exit 1 fi if [[ $(feq ${values[255]} 1) == 0 ]]; then echo "CRF should map 255 to 1 ($method)" exit 1 fi for i in "${!values[@]-1}"; do if [[ $(fle ${values[i]} ${values[i+1]}) == 0 ]]; then echo "CRF should be nondecreasing ($method, element $i)" exit 1 fi done done <<< "$crf" done exit 0 ## Instruction: Test app return value and add a note regarding Git LFS ## Code After: function feq() { echo $1'=='$2 | bc -l } function fle() { echo $1'<='$2 | bc -l } exe="$1" dir="$2/radiometric_response_calibration" methods=("debevec" "engel") for method in "${methods[@]}"; do crf=$($exe $dir --verbosity 0 --no-visualization --print --method $method -o /tmp/crf) if [[ $? -ne 0 ]]; then echo "Calibration app returned non-zero status" echo "NOTE: this test requires calibration data to be downloaded from Git LFS." echo " Please make sure to run: git lfs pull" exit 1 fi while read -r line; do values=($(echo $line)) if [[ ${#values[@]} != 256 ]]; then echo "CRF should have 256 values ($method)" exit 1 fi if [[ $(feq ${values[0]} 0) == 0 ]]; then echo "CRF should map 0 to 0 ($method)" exit 1 fi if [[ $(feq ${values[255]} 1) == 0 ]]; then echo "CRF should map 255 to 1 ($method)" exit 1 fi for i in "${!values[@]-1}"; do if [[ $(fle ${values[i]} ${values[i+1]}) == 0 ]]; then echo "CRF should be nondecreasing ($method, element $i)" exit 1 fi done done <<< "$crf" done exit 0
function feq() { echo $1'=='$2 | bc -l } function fle() { echo $1'<='$2 | bc -l } exe="$1" dir="$2/radiometric_response_calibration" methods=("debevec" "engel") for method in "${methods[@]}"; do - crf=`$exe $dir --verbosity 0 --no-visualization --print --method $method -o /tmp/crf` ? ^ ^ + crf=$($exe $dir --verbosity 0 --no-visualization --print --method $method -o /tmp/crf) ? ^^ ^ + if [[ $? -ne 0 ]]; then + echo "Calibration app returned non-zero status" + echo "NOTE: this test requires calibration data to be downloaded from Git LFS." + echo " Please make sure to run: git lfs pull" + exit 1 + fi while read -r line; do values=($(echo $line)) if [[ ${#values[@]} != 256 ]]; then echo "CRF should have 256 values ($method)" exit 1 fi if [[ $(feq ${values[0]} 0) == 0 ]]; then echo "CRF should map 0 to 0 ($method)" exit 1 fi if [[ $(feq ${values[255]} 1) == 0 ]]; then echo "CRF should map 255 to 1 ($method)" exit 1 fi for i in "${!values[@]-1}"; do if [[ $(fle ${values[i]} ${values[i+1]}) == 0 ]]; then echo "CRF should be nondecreasing ($method, element $i)" exit 1 fi done done <<< "$crf" done exit 0
8
0.205128
7
1
06e2a2198853714fbd08177852e65b0c53aa3ab1
exercises/concept/cater-waiter/.meta/config.json
exercises/concept/cater-waiter/.meta/config.json
{ "blurb": "Learn about sets by managing the menus and ingredients for your catering company's event.", "icon": "meetup", "authors": ["bethanyg"], "files": { "solution": ["sets.py"], "test": ["sets_test.py"], "exemplar": [".meta/exemplar.py"], "editor": ["sets_test_data.py", "sets_categories_data.py"] } }
{ "blurb": "Learn about sets by managing the menus and ingredients for your catering company's event.", "icon": "meetup", "authors": ["bethanyg"], "files": { "solution": ["sets.py", "sets_categories_data.py"], "test": ["sets_test.py","sets_test_data.py", "sets_categories_data.py"], "exemplar": [".meta/exemplar.py"], "editor": ["sets_test_data.py", "sets_categories_data.py"] } }
Test by adding data files to solutiona and test arrays.
Test by adding data files to solutiona and test arrays.
JSON
mit
exercism/python,exercism/python,jmluy/xpython,jmluy/xpython
json
## Code Before: { "blurb": "Learn about sets by managing the menus and ingredients for your catering company's event.", "icon": "meetup", "authors": ["bethanyg"], "files": { "solution": ["sets.py"], "test": ["sets_test.py"], "exemplar": [".meta/exemplar.py"], "editor": ["sets_test_data.py", "sets_categories_data.py"] } } ## Instruction: Test by adding data files to solutiona and test arrays. ## Code After: { "blurb": "Learn about sets by managing the menus and ingredients for your catering company's event.", "icon": "meetup", "authors": ["bethanyg"], "files": { "solution": ["sets.py", "sets_categories_data.py"], "test": ["sets_test.py","sets_test_data.py", "sets_categories_data.py"], "exemplar": [".meta/exemplar.py"], "editor": ["sets_test_data.py", "sets_categories_data.py"] } }
{ "blurb": "Learn about sets by managing the menus and ingredients for your catering company's event.", "icon": "meetup", "authors": ["bethanyg"], "files": { - "solution": ["sets.py"], - "test": ["sets_test.py"], + "solution": ["sets.py", "sets_categories_data.py"], + "test": ["sets_test.py","sets_test_data.py", "sets_categories_data.py"], "exemplar": [".meta/exemplar.py"], "editor": ["sets_test_data.py", "sets_categories_data.py"] } }
4
0.363636
2
2
4f4301e7809a979440c811a84c3453ddd5caccc8
Account/Sources/Account/ReaderAPI/ReaderAPIUnreadEntry.swift
Account/Sources/Account/ReaderAPI/ReaderAPIUnreadEntry.swift
// // ReaderAPIUnreadEntry.swift // Account // // Created by Jeremy Beker on 5/28/19. // Copyright © 2019 Ranchero Software, LLC. All rights reserved. // import Foundation struct ReaderAPIReferenceWrapper: Codable { let itemRefs: [ReaderAPIReference]? enum CodingKeys: String, CodingKey { case itemRefs = "itemRefs" } } struct ReaderAPIReference: Codable { let itemId: String enum CodingKeys: String, CodingKey { case itemId = "id" } }
// // ReaderAPIUnreadEntry.swift // Account // // Created by Jeremy Beker on 5/28/19. // Copyright © 2019 Ranchero Software, LLC. All rights reserved. // import Foundation struct ReaderAPIReferenceWrapper: Codable { let itemRefs: [ReaderAPIReference]? let continuation: String? enum CodingKeys: String, CodingKey { case itemRefs = "itemRefs" case continuation = "continuation" } } struct ReaderAPIReference: Codable { let itemId: String enum CodingKeys: String, CodingKey { case itemId = "id" } }
Add continuation value to be used for paging
Add continuation value to be used for paging
Swift
mit
brentsimmons/Evergreen,brentsimmons/Evergreen,brentsimmons/Evergreen,brentsimmons/Evergreen
swift
## Code Before: // // ReaderAPIUnreadEntry.swift // Account // // Created by Jeremy Beker on 5/28/19. // Copyright © 2019 Ranchero Software, LLC. All rights reserved. // import Foundation struct ReaderAPIReferenceWrapper: Codable { let itemRefs: [ReaderAPIReference]? enum CodingKeys: String, CodingKey { case itemRefs = "itemRefs" } } struct ReaderAPIReference: Codable { let itemId: String enum CodingKeys: String, CodingKey { case itemId = "id" } } ## Instruction: Add continuation value to be used for paging ## Code After: // // ReaderAPIUnreadEntry.swift // Account // // Created by Jeremy Beker on 5/28/19. // Copyright © 2019 Ranchero Software, LLC. All rights reserved. // import Foundation struct ReaderAPIReferenceWrapper: Codable { let itemRefs: [ReaderAPIReference]? let continuation: String? enum CodingKeys: String, CodingKey { case itemRefs = "itemRefs" case continuation = "continuation" } } struct ReaderAPIReference: Codable { let itemId: String enum CodingKeys: String, CodingKey { case itemId = "id" } }
// // ReaderAPIUnreadEntry.swift // Account // // Created by Jeremy Beker on 5/28/19. // Copyright © 2019 Ranchero Software, LLC. All rights reserved. // import Foundation struct ReaderAPIReferenceWrapper: Codable { let itemRefs: [ReaderAPIReference]? + let continuation: String? enum CodingKeys: String, CodingKey { case itemRefs = "itemRefs" + case continuation = "continuation" } } struct ReaderAPIReference: Codable { - let itemId: String enum CodingKeys: String, CodingKey { case itemId = "id" } - }
4
0.148148
2
2
4beb888c160666f4941290ac1f68a77e6dd9e4ac
app/controllers/named_routes_controller.rb
app/controllers/named_routes_controller.rb
class NamedRoutesController < ActionController::Base caches_page :generate self.view_paths = File.join(File.dirname(__FILE__), '../views/named_routes') layout nil def generate respond_to do |format| format.js { render :template => 'generate' } end end end
class NamedRoutesController < ActionController::Base self.view_paths = File.join(File.dirname(__FILE__), '../views/named_routes') layout nil def generate # Cache the output for 1 year. The cache gets flushed when Heroku redeploys, # so new versions will still get displayed on deployment. response.headers['Cache-Control'] = 'public, max-age=1314000' if Rails.env.production? respond_to do |format| format.js { render :template => 'generate' } end end end
Change page caching to HTTP caching for Heroku
Change page caching to HTTP caching for Heroku
Ruby
mit
notonthehighstreet/js_named_routes,notonthehighstreet/js_named_routes
ruby
## Code Before: class NamedRoutesController < ActionController::Base caches_page :generate self.view_paths = File.join(File.dirname(__FILE__), '../views/named_routes') layout nil def generate respond_to do |format| format.js { render :template => 'generate' } end end end ## Instruction: Change page caching to HTTP caching for Heroku ## Code After: class NamedRoutesController < ActionController::Base self.view_paths = File.join(File.dirname(__FILE__), '../views/named_routes') layout nil def generate # Cache the output for 1 year. The cache gets flushed when Heroku redeploys, # so new versions will still get displayed on deployment. response.headers['Cache-Control'] = 'public, max-age=1314000' if Rails.env.production? respond_to do |format| format.js { render :template => 'generate' } end end end
class NamedRoutesController < ActionController::Base - caches_page :generate - self.view_paths = File.join(File.dirname(__FILE__), '../views/named_routes') layout nil def generate + # Cache the output for 1 year. The cache gets flushed when Heroku redeploys, + # so new versions will still get displayed on deployment. + response.headers['Cache-Control'] = 'public, max-age=1314000' if Rails.env.production? respond_to do |format| format.js { render :template => 'generate' } end end end
5
0.416667
3
2
57b84b871331f9510f4da8b03bf57af9864e176d
README.txt
README.txt
safe_data 0.3 ============= safe_data provides convenient and efficient C++ data types that are self-validating. Validates ranges, min/max, string length, container sizes, etc. safe_data guarantees to hold valid data at all times. Installation ------------ Before installing safe_data, you must have the C++ Boost Libraries installed. Visit http://www.boost.org/ for more information. After installing Boost, include this directory in your compiler's include directory. Once successfully configured, you should be able to use this statement to include the files: #include <safe_data/safe_data.hpp> You can also compile and run test.cpp to make sure your compiler works with safe_data. Directions ---------- Review the code in example.cpp for general usage. The file test.cpp can be referenced for more advanced features. Current Release --------------- The most current release can always be found at: https://github.com/syvex/safe_data
safe_data 0.4 ============= safe_data provides convenient and efficient C++ data types that are self-validating. Validates ranges, min/max, string length, container sizes, etc. safe_data guarantees to hold valid data at all times. Installation ------------ Before installing safe_data, you must have the C++ Boost Libraries installed. Visit http://www.boost.org/ for more information. After installing Boost, include this directory in your compiler's include directory. Once successfully configured, you should be able to use this statement to include the files: #include <safe_data/safe_data.hpp> Unit Tests ---------- The unit tests require Google Test (https://code.google.com/p/googletest/). After compiling Google Test, run test.cpp to make sure your compiler works with safe_data. Directions ---------- Review the code in example.cpp for general usage. The file test.cpp can be referenced for more advanced features. Current Release --------------- The most current release can always be found at: https://github.com/syvex/safe_data
Update read me for google test notes
Update read me for google test notes
Text
bsd-3-clause
syvex/safe_data,syvex/safe_data
text
## Code Before: safe_data 0.3 ============= safe_data provides convenient and efficient C++ data types that are self-validating. Validates ranges, min/max, string length, container sizes, etc. safe_data guarantees to hold valid data at all times. Installation ------------ Before installing safe_data, you must have the C++ Boost Libraries installed. Visit http://www.boost.org/ for more information. After installing Boost, include this directory in your compiler's include directory. Once successfully configured, you should be able to use this statement to include the files: #include <safe_data/safe_data.hpp> You can also compile and run test.cpp to make sure your compiler works with safe_data. Directions ---------- Review the code in example.cpp for general usage. The file test.cpp can be referenced for more advanced features. Current Release --------------- The most current release can always be found at: https://github.com/syvex/safe_data ## Instruction: Update read me for google test notes ## Code After: safe_data 0.4 ============= safe_data provides convenient and efficient C++ data types that are self-validating. Validates ranges, min/max, string length, container sizes, etc. safe_data guarantees to hold valid data at all times. Installation ------------ Before installing safe_data, you must have the C++ Boost Libraries installed. Visit http://www.boost.org/ for more information. After installing Boost, include this directory in your compiler's include directory. Once successfully configured, you should be able to use this statement to include the files: #include <safe_data/safe_data.hpp> Unit Tests ---------- The unit tests require Google Test (https://code.google.com/p/googletest/). After compiling Google Test, run test.cpp to make sure your compiler works with safe_data. Directions ---------- Review the code in example.cpp for general usage. The file test.cpp can be referenced for more advanced features. Current Release --------------- The most current release can always be found at: https://github.com/syvex/safe_data
- safe_data 0.3 ? ^ + safe_data 0.4 ? ^ ============= safe_data provides convenient and efficient C++ data types that are self-validating. Validates ranges, min/max, string length, container sizes, etc. safe_data guarantees to hold valid data at all times. Installation ------------ Before installing safe_data, you must have the C++ Boost Libraries installed. Visit http://www.boost.org/ for more information. After installing Boost, include this directory in your compiler's include directory. Once successfully configured, you should be able to use this statement to include the files: #include <safe_data/safe_data.hpp> + Unit Tests + ---------- + The unit tests require Google Test (https://code.google.com/p/googletest/). + - You can also compile and run test.cpp to make sure your compiler works with ? ^^^^^^^^^^^^ ^^^ + After compiling Google Test, run test.cpp to make sure your compiler works with ? ^^^^^ +++++++++ ^^^^^ safe_data. Directions ---------- Review the code in example.cpp for general usage. The file test.cpp can be referenced for more advanced features. Current Release --------------- The most current release can always be found at: https://github.com/syvex/safe_data
8
0.222222
6
2
45e3b9155fefe5577e6ebf9a5f830a0a8cb28ade
src/Illuminate/Http/ResponseTrait.php
src/Illuminate/Http/ResponseTrait.php
<?php namespace Illuminate\Http; use Symfony\Component\HttpFoundation\Cookie; trait ResponseTrait { /** * Get the status code for the response. * * @return int */ public function status() { return $this->getStatusCode(); } /** * Get the content of the response. * * @return string */ public function content() { return $this->getContent(); } /** * Set a header on the Response. * * @param string $key * @param string $value * @param bool $replace * @return $this */ public function header($key, $value, $replace = true) { $this->headers->set($key, $value, $replace); return $this; } /** * Add a cookie to the response. * * @param \Symfony\Component\HttpFoundation\Cookie $cookie * @return $this */ public function withCookie(Cookie $cookie) { $this->headers->setCookie($cookie); return $this; } }
<?php namespace Illuminate\Http; use Symfony\Component\HttpFoundation\Cookie; trait ResponseTrait { /** * Get the status code for the response. * * @return int */ public function status() { return $this->getStatusCode(); } /** * Get the content of the response. * * @return string */ public function content() { return $this->getContent(); } /** * Set a header on the Response. * * @param string $key * @param string $value * @param bool $replace * @return $this */ public function header($key, $value, $replace = true) { $this->headers->set($key, $value, $replace); return $this; } /** * Add a cookie to the response. * * @param \Symfony\Component\HttpFoundation\Cookie|dynamic $cookie * @return $this */ public function withCookie($cookie) { if (is_string($cookie) && function_exists('cookie')) { $cookie = call_user_func_array('cookie', func_get_args()); } $this->headers->setCookie($cookie); return $this; } }
Allow passing a dynamic argument list to withCookie.
Allow passing a dynamic argument list to withCookie.
PHP
mit
brti/framework,omar-dev/framework,leo108/laravel_framework,dwightwatson/framework,olsgreen/framework,zcwilt/framework,hutushen222/framework,jrean/framework,dan-har/framework,RyansForks/laravel-framework,dan-har/framework,rafaelbeckel/framework,Elandril/framework,rkgrep/framework,Denniskevin/framework,tamnil/framework,lucasmichot/framework,euoia/framework,blazeworx/framework,cviebrock/framework,titiushko/framework,miclf/framework,Talean-dev/framework,windevalley/framework,alexgalletti/framework,RyansForks/laravel-framework,kelixlabs/laravel-framework,claar/framework,rentalhost/framework,jmarcher/framework,5outh/framework,halaei/framework,kevindoole/framework,djtarazona/laravel-framework,ImaginationSydney/Laravel,billmn/framework,SecureCloud-biz/framework,lucasmichot/laravel--framework,rsanchez/laravel-framework,djtarazona/laravel-framework,osiux/framework,filipeaclima/framework,mul14/laravel-framework,kevindoole/framework,vetruvet/framework,sileence/laravel-framework,rentalhost/framework,bytestream/framework,Luceos/framework,ezeql/framework,olsgreen/framework,kevinsimard/framework,katcountiss/framework,claar/framework,harrygr/framework,rogue780/framework,zcwilt/framework,maddhatter/framework,joko-wandiro/framework,nhowell/laravel-framework,colindecarlo/framework,markhemstead/framework,usm4n/laravel-patch,gaaarfild/framework,harrygr/framework,isiryder/framework,n7olkachev/framework,maxbublik/framework,david-ridgeonnet/framework,max-kovpak/framework,irfanevrens/framework,kamazee/laravel-framework,bytestream/framework,j42/framework,patrickcarlohickman/framework,herberk/framework,deefour/framework,devsalman/framework,maxverbeek/framework,MladenJanjetovic/framework,zhenkondrat/framework,mul14/laravel-framework,hafezdivandari/framework,stidges/framework,wujingke/framework,GiantCowFilms/framework,wiltosoft/laravel,maddhatter/framework,MedAhamada/framework,rentalhost/framework,lucasmichot/framework,ameliaikeda/framework,laracasts/framework,hutushen222/framework,nerijunior/framework,cillosis/framework,peterpan666/framework,piokom123/framework,srenauld/framework,tjbp/framework,bobbybouwmann/framework,rafaelbeckel/framework,alnutile/framework,stidges/framework,stevebauman/framework,spyric/framework,CurosMJ/framework,MladenJanjetovic/framework,Fenzland/laravel,rleger/framework,GreenLightt/laravel-framework,EspadaV8/framework,RyansForks/laravel-framework,mlantz/framework,david-ridgeonnet/framework,aeryaguzov/framework,RatkoR/framework,yadakhov/framework,pouya-parsa/framework,likerRr/framework,RobvH/framework,mortenhauberg/framework,piokom123/framework,kevindoole/framework,KluVerKamp/framework,valeryq/framework,OzanKurt/framework,mlantz/framework,jarnovanleeuwen/framework,neva-dev/laravel-framework,noikiy/framework-1,srmkliveforks/framework,reinink/framework,5outh/framework,HipsterJazzbo/framework,cybercog/framework,samuel-cloete/framework,ChristopheB/framework,sileence/framework,guanhui07/framework,bastiaan89/framework,bastiaan89/framework,lguima/framework,freejavaster/framework,antonioribeiro/framework,kevinsimard/framework,EspadaV8/framework,shandy05/framework,jarektkaczyk/framework,phroggyy/framework,RobvH/framework,tuupke/framework,antonybudianto/framework,spyric/framework,rodrigopedra/framework,isiryder/framework,windevalley/framework,laracasts/framework,ironxu/framework,max-kovpak/framework,notebowl/laravel-framework,acasar/framework,ironxu/framework,Feijs/framework,arturock/framework,GiantCowFilms/framework,bastiaan89/framework,tuupke/framework,Denniskevin/framework,joecohens/framework,david-ridgeonnet/framework,CurosMJ/framework,laravel/framework,antonioribeiro/framework,CurosMJ/framework,nhowell/laravel-framework,jorgemurta/framework,n7olkachev/framework,michael-repka/framework,hpolthof/framework,BePsvPT-Fork/framework,arturock/framework,barryvdh/framework,thecrypticace/framework,n7olkachev/framework,cjaoude/framework,jorgemurta/framework,martinssipenko/framework,ps92/framework,irfanevrens/framework,cybercog/framework,srenauld/framework,alnutile/framework,herberk/framework,hafezdivandari/framework,vlakoff/framework,fungku/framework,spyric/framework,DougSisk/framework,AndreasHeiberg/framework,tillkruss/framework,loduis/laravel-framework,alexgalletti/framework,acasar/framework,HipsterJazzbo/framework,joko-wandiro/framework,michael-repka/framework,deefour/framework,tjbp/framework,wujingke/framework,drbyte/framework,neva-dev/laravel-framework,scrubmx/framework,driesvints/framework,Wellington475/framework,cjaoude/framework,ImaginationSydney/Laravel,jimrubenstein/laravel-framework,shandy05/framework,sileence/framework,bmitch/framework,PantherDD/laravel-framework,sileence/laravel-framework,tamnil/framework,tadejkan/framework,pakogn/framework,usm4n/laravel-patch,mcgrogan91/framework,timfeid/framework-1,vetruvet/framework,peterpan666/framework,nahid/framework,deefour/framework,Fenzland/laravel,martinbean/laravel-framework,SebastianBerc/framework,bdsoha/framework,guanhui07/framework,atorscho/framework,zhenkondrat/framework,RatkoR/framework,MedAhamada/framework,scrubmx/framework,osiux/framework,Garbee/framework,cviebrock/framework,kcalliauw/framework,mickaelandrieu/framework,ameliaikeda/framework,Modelizer/framework,Luceos/framework,filipeaclima/framework,rsanchez/laravel-framework,jack-webster/framework,captbrogers/framework,hosmelq/framework,loduis/laravel-framework,xiphiaz/framework,blazeworx/framework,moura137/framework,maxverbeek/framework,ncaneldiee/laravel-framework,gms8994/framework,patrickcarlohickman/framework,olsgreen/framework,jtgrimes/framework,BePsvPT/framework,Modelizer/framework,JosephSilber/framework,barryvdh/framework,kelixlabs/laravel-framework,GiantCowFilms/framework,jmarcher/framework,FooBarQuaxx/framework,antonybudianto/framework,mcgrogan91/framework,cillosis/framework,DougSisk/framework,dwightwatson/framework,rocketpastsix/framework,freejavaster/framework,ncusoho/framework,blazeworx/framework,samuel-cloete/framework,nerijunior/framework,branall1/framework,djae138/framework,maxbublik/framework,martinssipenko/framework,gms8994/framework,mbernson/framework,Evertt/framework,jimrubenstein/laravel-framework,hosmelq/framework,pouya-parsa/framework,5outh/framework,jrean/framework,numa-engineering/framework,jwdeitch/framework,Evertt/framework,Wellington475/framework,stidges/framework,srmkliveforks/framework,osiux/framework,cviebrock/framework,thomasruiz/laravel-framework,colindecarlo/framework,BePsvPT-Fork/framework,AllysonSilva/LaravelKernel,ameliaikeda/framework,tomschlick/framework,mwain/framework,Wellington475/framework,gaaarfild/framework,phroggyy/framework,mul14/laravel-framework,thomasruiz/laravel-framework,ruuter/laravel-framework,katcountiss/framework,FooBarQuaxx/framework,tills13/framework,herberk/framework,tuupke/framework,rleger/framework,mateusjatenee/framework,alepeino/framework,drbyte/framework,christoffertyrefors/framework,usm4n/laravel-patch,anteriovieira/framework,timfeid/framework-1,laravel/framework,vlakoff/framework,valeryq/framework,alexgalletti/framework,nelson6e65/framework,jarektkaczyk/framework,djae138/framework,thomasruiz/laravel-framework,mbernson/framework,claar/framework,tadejkan/framework,KhaledSMQ/framework,guanhui07/framework,michael-repka/framework,FooBarQuaxx/framework,Nikita240/framework,laracasts/framework,bobbybouwmann/framework,halaei/framework,ncaneldiee/laravel-framework,mateusjatenee/framework,jerguslejko/framework,timfeid/framework-1,jimrubenstein/laravel-framework,samuel-cloete/framework,Denniskevin/framework,brti/framework,ChristopheB/framework,nahid/framework,RatkoR/framework,dan-har/framework,zhenkondrat/framework,MedAhamada/framework,atorscho/framework,PantherDD/laravel-framework,maxbublik/framework,greabock/framework,kelixlabs/laravel-framework,phroggyy/framework,thecrypticace/framework,nhowell/laravel-framework,guiwoda/framework,fisharebest/framework,wiltosoft/laravel,zcwilt/framework,jchamberlain/framework,kamazee/laravel-framework,aeryaguzov/framework,mbernson/framework,drbyte/framework,omar-dev/framework,Elandril/framework,nelson6e65/framework,jorgemurta/framework,barryvdh/framework,gms8994/framework,miclf/framework,TheGIBSON/framework,DougSisk/framework,filipeaclima/framework,behzadsh/framework,cmazx/framework,driesvints/framework,leo108/laravel_framework,irfanevrens/framework,Luceos/framework,stidges/framework,halaei/framework,HipsterJazzbo/framework,Feijs/framework,pouya-parsa/framework,jarektkaczyk/framework,crynobone/framework,Feijs/framework,ncusoho/framework,shandy05/framework,hosmelq/framework,bancur/framework,antonybudianto/framework,pakogn/framework,Modelizer/framework,greabock/framework,mmauri04/framework,bdsoha/framework,Hugome/framework,srenauld/framework,bancur/framework,fragglebob/framework,adamgoose/framework,mul14/laravel-framework,max-kovpak/framework,ncusoho/framework,harrygr/framework,Belphemur/framework,windevalley/framework,moura137/framework,GreenLightt/laravel-framework,cmazx/framework,martinbean/laravel-framework,vlakoff/framework,branall1/framework,tomschlick/framework,cybercog/framework,Fenzland/laravel,jtgrimes/framework,Hugome/framework,cjaoude/framework,rodrigopedra/framework,mickaelandrieu/framework,j42/framework,billmn/framework,ironxu/framework,guiwoda/framework,j42/framework,pakogn/framework,bobbybouwmann/framework,kcalliauw/framework,tomschlick/framework,stevebauman/framework,tills13/framework,aeryaguzov/framework,gaaarfild/framework,lucasmichot/laravel--framework,devsalman/framework,jmarcher/framework,branall1/framework,christoffertyrefors/framework,morrislaptop/framework,Belphemur/framework,mlantz/framework,maxverbeek/framework,TheGIBSON/framework,EspadaV8/framework,Evertt/framework,greabock/framework,AndreasHeiberg/framework,fungku/framework,BePsvPT-Fork/framework,Garbee/framework,jtgrimes/framework,euoia/framework,jackson-dean/framework,jerguslejko/framework,guiwoda/framework,john-main-croud/framework,arturock/framework,jackson-dean/framework,tills13/framework,JosephSilber/framework,rkgrep/framework,ezeql/framework,anteriovieira/framework,lucasmichot/laravel--framework,mmauri04/framework,KluVerKamp/framework,mwain/framework,hutushen222/framework,smb/framework,SelimSalihovic/framework,nelson6e65/framework,GreenLightt/laravel-framework,wujingke/framework,wiltosoft/laravel,jerguslejko/framework,AndreasHeiberg/framework,mateusjatenee/framework,moura137/framework,jack-webster/framework,renekoch/framework,JamesForks/framework,adamgoose/framework,jarnovanleeuwen/framework,rodrigopedra/framework,Talean-dev/framework,KhaledSMQ/framework,alepeino/framework,titiushko/framework,joel-james/framework,JamesForks/framework,joecohens/framework,xiphiaz/framework,piokom123/framework,martinssipenko/framework,PantherDD/laravel-framework,kcalliauw/framework,numa-engineering/framework,sileence/laravel-framework,john-main-croud/framework,antonioribeiro/framework,cmazx/framework,xiphiaz/framework,yadakhov/framework,ruuter/laravel-framework,brti/framework,samlev/framework,bmitch/framework,mmauri04/framework,samlev/framework,nahid/framework,jchamberlain/framework,ChristopheB/framework,billmn/framework,SecureCloud-biz/framework,hpolthof/framework,fragglebob/framework,bdsoha/framework,isiryder/framework,behzadsh/framework,SecureCloud-biz/framework,fungku/framework,kevinsimard/framework,SelimSalihovic/framework,ezeql/framework,ruuter/laravel-framework,omar-dev/framework,MladenJanjetovic/framework,Belphemur/framework,fragglebob/framework,likerRr/framework,reinink/framework,katcountiss/framework,behzadsh/framework,TheGIBSON/framework,rleger/framework,cviebrock/framework,tillkruss/framework,joel-james/framework,captbrogers/framework,jerguslejko/framework,Nikita240/framework,cillosis/framework,numa-engineering/framework,jarnovanleeuwen/framework,FireEngineRed/framework,tjbp/framework,christoffertyrefors/framework,neva-dev/laravel-framework,djtarazona/laravel-framework,crynobone/framework,mortenhauberg/framework,mcgrogan91/framework,OzanKurt/framework,OzanKurt/framework,peterpan666/framework,barryvdh/framework,euoia/framework,rogue780/framework,bancur/framework,rogue780/framework,Hugome/framework,noikiy/framework-1,SebastianBerc/framework,miclf/framework,likerRr/framework,Nikita240/framework,mickaelandrieu/framework,jchamberlain/framework,mortenhauberg/framework,BePsvPT/framework,FireEngineRed/framework,SelimSalihovic/framework,patrickcarlohickman/framework,rafaelbeckel/framework,gms8994/framework,ps92/framework,fisharebest/framework,jrean/framework,rsanchez/laravel-framework,john-main-croud/framework,jwdeitch/framework,jack-webster/framework,colindecarlo/framework,scrubmx/framework,nerijunior/framework,AllysonSilva/LaravelKernel,BePsvPT-Fork/framework,RobvH/framework,sileence/framework,ncaneldiee/laravel-framework,alnutile/framework,bmitch/framework,freejavaster/framework,renekoch/framework,markhemstead/framework,maddhatter/framework,acasar/framework,noikiy/framework-1,Elandril/framework,Talean-dev/framework,rocketpastsix/framework,rkgrep/framework,lguima/framework,joel-james/framework,Garbee/framework,alepeino/framework,hpolthof/framework,ps92/framework,fisharebest/framework,smb/framework,SebastianBerc/framework,adamgoose/framework,jackson-dean/framework,morrislaptop/framework,FireEngineRed/framework,tamnil/framework,renekoch/framework,atorscho/framework,mwain/framework,AllysonSilva/LaravelKernel,joecohens/framework,BePsvPT/framework,djae138/framework,martinbean/laravel-framework,lguima/framework,notebowl/laravel-framework,vetruvet/framework,tillkruss/framework,devsalman/framework,captbrogers/framework,valeryq/framework,thecrypticace/framework,yadakhov/framework,loduis/laravel-framework,KluVerKamp/framework,srmkliveforks/framework,kamazee/laravel-framework,anteriovieira/framework,rodrigopedra/framework,KhaledSMQ/framework,smb/framework,tadejkan/framework,reinink/framework,titiushko/framework,ImaginationSydney/Laravel,jwdeitch/framework,srmkliveforks/framework
php
## Code Before: <?php namespace Illuminate\Http; use Symfony\Component\HttpFoundation\Cookie; trait ResponseTrait { /** * Get the status code for the response. * * @return int */ public function status() { return $this->getStatusCode(); } /** * Get the content of the response. * * @return string */ public function content() { return $this->getContent(); } /** * Set a header on the Response. * * @param string $key * @param string $value * @param bool $replace * @return $this */ public function header($key, $value, $replace = true) { $this->headers->set($key, $value, $replace); return $this; } /** * Add a cookie to the response. * * @param \Symfony\Component\HttpFoundation\Cookie $cookie * @return $this */ public function withCookie(Cookie $cookie) { $this->headers->setCookie($cookie); return $this; } } ## Instruction: Allow passing a dynamic argument list to withCookie. ## Code After: <?php namespace Illuminate\Http; use Symfony\Component\HttpFoundation\Cookie; trait ResponseTrait { /** * Get the status code for the response. * * @return int */ public function status() { return $this->getStatusCode(); } /** * Get the content of the response. * * @return string */ public function content() { return $this->getContent(); } /** * Set a header on the Response. * * @param string $key * @param string $value * @param bool $replace * @return $this */ public function header($key, $value, $replace = true) { $this->headers->set($key, $value, $replace); return $this; } /** * Add a cookie to the response. * * @param \Symfony\Component\HttpFoundation\Cookie|dynamic $cookie * @return $this */ public function withCookie($cookie) { if (is_string($cookie) && function_exists('cookie')) { $cookie = call_user_func_array('cookie', func_get_args()); } $this->headers->setCookie($cookie); return $this; } }
<?php namespace Illuminate\Http; use Symfony\Component\HttpFoundation\Cookie; trait ResponseTrait { /** * Get the status code for the response. * * @return int */ public function status() { return $this->getStatusCode(); } /** * Get the content of the response. * * @return string */ public function content() { return $this->getContent(); } /** * Set a header on the Response. * * @param string $key * @param string $value * @param bool $replace * @return $this */ public function header($key, $value, $replace = true) { $this->headers->set($key, $value, $replace); return $this; } /** * Add a cookie to the response. * - * @param \Symfony\Component\HttpFoundation\Cookie $cookie + * @param \Symfony\Component\HttpFoundation\Cookie|dynamic $cookie ? ++++++++ * @return $this */ - public function withCookie(Cookie $cookie) ? ------- + public function withCookie($cookie) { + if (is_string($cookie) && function_exists('cookie')) { + $cookie = call_user_func_array('cookie', func_get_args()); + } + $this->headers->setCookie($cookie); return $this; } }
8
0.142857
6
2
ed1a384664315c86a18f525c5d6364a57c5db11c
client/js/config_sample.json
client/js/config_sample.json
{ "apiurl": "/client/api", "appurl": "/client", "production": false, "pucks": { "i02": 10, "i03": 23, "i04": 37, "i04-1": 9, "i24": 9, "i23": 4 }, "_gsMajorAxisOrientation" : "Determines whether the major grid scan axis determines the orientation of the view", "gsMajorAxisOrientation" : true, "maintenance_message": "This is the maintenance message", "maintenance": false }
{ "apiurl": "/client/api", "appurl": "/client", "production": false, "pucks": { "i02": 10, "i03": 23, "i04": 37, "i04-1": 9, "i24": 9, "i23": 4 }, "_gsMajorAxisOrientation" : "Determines whether the major grid scan axis determines the orientation of the view", "gsMajorAxisOrientation" : true, "maintenance_message": "This is the maintenance message", "maintenance": false, "ga_ident": "" }
Add ga_ident to client config to quiet PHP notice
Add ga_ident to client config to quiet PHP notice Add ga_ident (set to the empty string) to the example client config to avoid a PHP notice message about using an undefined property in index.php PHP Notice: Undefined property: stdClass::$ga_ident in \ /var/www/synchweb/index.php on line 44 where line 44 in index.php is <?php if ($config->ga_ident): ?>
JSON
apache-2.0
DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb
json
## Code Before: { "apiurl": "/client/api", "appurl": "/client", "production": false, "pucks": { "i02": 10, "i03": 23, "i04": 37, "i04-1": 9, "i24": 9, "i23": 4 }, "_gsMajorAxisOrientation" : "Determines whether the major grid scan axis determines the orientation of the view", "gsMajorAxisOrientation" : true, "maintenance_message": "This is the maintenance message", "maintenance": false } ## Instruction: Add ga_ident to client config to quiet PHP notice Add ga_ident (set to the empty string) to the example client config to avoid a PHP notice message about using an undefined property in index.php PHP Notice: Undefined property: stdClass::$ga_ident in \ /var/www/synchweb/index.php on line 44 where line 44 in index.php is <?php if ($config->ga_ident): ?> ## Code After: { "apiurl": "/client/api", "appurl": "/client", "production": false, "pucks": { "i02": 10, "i03": 23, "i04": 37, "i04-1": 9, "i24": 9, "i23": 4 }, "_gsMajorAxisOrientation" : "Determines whether the major grid scan axis determines the orientation of the view", "gsMajorAxisOrientation" : true, "maintenance_message": "This is the maintenance message", "maintenance": false, "ga_ident": "" }
{ "apiurl": "/client/api", "appurl": "/client", "production": false, "pucks": { "i02": 10, "i03": 23, "i04": 37, "i04-1": 9, "i24": 9, "i23": 4 }, "_gsMajorAxisOrientation" : "Determines whether the major grid scan axis determines the orientation of the view", "gsMajorAxisOrientation" : true, "maintenance_message": "This is the maintenance message", - "maintenance": false + "maintenance": false, ? + + + "ga_ident": "" }
4
0.181818
3
1
4f9216853b7364a52cf8d15ad9ede0d6899ebc4a
scripts/jest/config.js
scripts/jest/config.js
'use strict'; module.exports = { coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/packages/react-native-web/src/vendor/'], modulePathIgnorePatterns: ['<rootDir>/packages/react-native-web/dist/'], rootDir: process.cwd(), roots: ['<rootDir>/packages'], setupFiles: ['jest-canvas-mock'], setupTestFrameworkScriptFile: require.resolve('./setupFramework.js'), snapshotSerializers: ['enzyme-to-json/serializer'], testEnvironment: 'jsdom', timers: 'fake' };
'use strict'; module.exports = { coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/packages/react-native-web/src/vendor/'], modulePathIgnorePatterns: [ '<rootDir>/packages/benchmarks/', '<rootDir>/packages/examples/', '<rootDir>/packages/react-native-web/dist/', '<rootDir>/packages/website/' ], rootDir: process.cwd(), roots: ['<rootDir>/packages'], setupFiles: ['jest-canvas-mock'], setupTestFrameworkScriptFile: require.resolve('./setupFramework.js'), snapshotSerializers: ['enzyme-to-json/serializer'], testEnvironment: 'jsdom', timers: 'fake' };
Add more paths to jest ignore
Add more paths to jest ignore
JavaScript
mit
necolas/react-native-web,necolas/react-native-web,necolas/react-native-web
javascript
## Code Before: 'use strict'; module.exports = { coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/packages/react-native-web/src/vendor/'], modulePathIgnorePatterns: ['<rootDir>/packages/react-native-web/dist/'], rootDir: process.cwd(), roots: ['<rootDir>/packages'], setupFiles: ['jest-canvas-mock'], setupTestFrameworkScriptFile: require.resolve('./setupFramework.js'), snapshotSerializers: ['enzyme-to-json/serializer'], testEnvironment: 'jsdom', timers: 'fake' }; ## Instruction: Add more paths to jest ignore ## Code After: 'use strict'; module.exports = { coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/packages/react-native-web/src/vendor/'], modulePathIgnorePatterns: [ '<rootDir>/packages/benchmarks/', '<rootDir>/packages/examples/', '<rootDir>/packages/react-native-web/dist/', '<rootDir>/packages/website/' ], rootDir: process.cwd(), roots: ['<rootDir>/packages'], setupFiles: ['jest-canvas-mock'], setupTestFrameworkScriptFile: require.resolve('./setupFramework.js'), snapshotSerializers: ['enzyme-to-json/serializer'], testEnvironment: 'jsdom', timers: 'fake' };
'use strict'; module.exports = { coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/packages/react-native-web/src/vendor/'], + modulePathIgnorePatterns: [ + '<rootDir>/packages/benchmarks/', + '<rootDir>/packages/examples/', - modulePathIgnorePatterns: ['<rootDir>/packages/react-native-web/dist/'], ? ------------------------- ^ - + '<rootDir>/packages/react-native-web/dist/', ? ^ + '<rootDir>/packages/website/' + ], rootDir: process.cwd(), roots: ['<rootDir>/packages'], setupFiles: ['jest-canvas-mock'], setupTestFrameworkScriptFile: require.resolve('./setupFramework.js'), snapshotSerializers: ['enzyme-to-json/serializer'], testEnvironment: 'jsdom', timers: 'fake' };
7
0.538462
6
1
b9f8e4eea437f5a3fedbcea278456d10e199e8da
project.clj
project.clj
(defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] :plugins [[lein-protobuf "0.2.0-beta2"]] :profiles {:dev {:dependencies [[gloss "0.2.1"] [io "0.2.0-beta2"]]}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"])
(defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] :plugins [[lein-protobuf "0.2.0-beta3"]] :aliases {"testall" ["with-profile" "dev,default:dev,1.3,default:dev,1.5,default" "test"]} :profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} :1.5 {:dependencies [[org.clojure/clojure "1.5.0-master-SNAPSHOT"]]} :dev {:dependencies [[gloss "0.2.1"] [io "0.2.0-beta2"]]}} :repositories {"sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots" :snapshots true :releases {:checksum :fail :update :always}}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"])
Test against multiple Clojure versions.
Test against multiple Clojure versions.
Clojure
epl-1.0
l0st3d/clojure-protobuf,oliyh/clojure-protobuf,flatland/clojure-protobuf,ninjudd/clojure-protobuf
clojure
## Code Before: (defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] :plugins [[lein-protobuf "0.2.0-beta2"]] :profiles {:dev {:dependencies [[gloss "0.2.1"] [io "0.2.0-beta2"]]}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"]) ## Instruction: Test against multiple Clojure versions. ## Code After: (defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] :plugins [[lein-protobuf "0.2.0-beta3"]] :aliases {"testall" ["with-profile" "dev,default:dev,1.3,default:dev,1.5,default" "test"]} :profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} :1.5 {:dependencies [[org.clojure/clojure "1.5.0-master-SNAPSHOT"]]} :dev {:dependencies [[gloss "0.2.1"] [io "0.2.0-beta2"]]}} :repositories {"sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots" :snapshots true :releases {:checksum :fail :update :always}}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"])
(defproject protobuf "0.6.1-beta2" :description "Clojure-protobuf provides a clojure interface to Google's protocol buffers." :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojure-protobuf" :dependencies [[org.clojure/clojure "1.4.0"] [ordered-collections "0.4.0"] [useful "0.8.2-alpha1"] [schematic "0.0.5"]] - :plugins [[lein-protobuf "0.2.0-beta2"]] ? ^ + :plugins [[lein-protobuf "0.2.0-beta3"]] ? ^ + :aliases {"testall" ["with-profile" "dev,default:dev,1.3,default:dev,1.5,default" "test"]} + :profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} + :1.5 {:dependencies [[org.clojure/clojure "1.5.0-master-SNAPSHOT"]]} - :profiles {:dev {:dependencies [[gloss "0.2.1"] ? --------- ^ + :dev {:dependencies [[gloss "0.2.1"] ? ^^^^^^^^^^ [io "0.2.0-beta2"]]}} + :repositories {"sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots" + :snapshots true + :releases {:checksum :fail :update :always}}} :protobuf-version "2.4.1" :hooks [leiningen.protobuf] :checksum-deps true :java-source-paths ["src"])
10
0.625
8
2
2fc71f9b83db5d0ff9e73572ceb49011f916bcf5
calebasse/views.py
calebasse/views.py
from django.shortcuts import render, redirect from django.template.defaultfilters import slugify from cbv import HOME_SERVICE_COOKIE, TemplateView from calebasse.ressources.models import Service APPLICATIONS = ( (u'Gestion des dossiers', 'dossiers'), (u'Agenda', 'agenda'), (u'Saisie des actes', 'actes'), (u'Facturation et décompte', 'facturation'), (u'Gestion des personnes', 'personnes'), (u'Gestion des ressources', 'ressources'), ) def redirect_to_homepage(request): service_name = request.COOKIES.get(HOME_SERVICE_COOKIE, 'cmpp').lower() return redirect('homepage', service=service_name) class Homepage(TemplateView): template_name='calebasse/homepage.html' def get_context_data(self, **kwargs): services = Service.objects.values_list('name', 'slug') ctx = super(Homepage, self).get_context_data(**kwargs) ctx.update({ 'applications': APPLICATIONS, 'services': services, 'service_name': self.service.name, }) return ctx homepage = Homepage.as_view()
from django.shortcuts import render, redirect from django.template.defaultfilters import slugify from cbv import HOME_SERVICE_COOKIE, TemplateView from calebasse.ressources.models import Service APPLICATIONS = ( (u'Gestion des dossiers', 'dossiers'), (u'Agenda', 'agenda'), (u'Saisie des actes', 'actes'), (u'Facturation et décompte', 'facturation'), (u'Gestion des personnes', 'personnes'), (u'Gestion des ressources', 'ressources'), ) def redirect_to_homepage(request): service_name = request.COOKIES.get(HOME_SERVICE_COOKIE, 'cmpp').lower() return redirect('homepage', service=service_name) class Homepage(TemplateView): template_name='calebasse/homepage.html' def get_context_data(self, **kwargs): services = Service.objects.values_list('name', 'slug') services = sorted(services, key=lambda tup: tup[0]) ctx = super(Homepage, self).get_context_data(**kwargs) ctx.update({ 'applications': APPLICATIONS, 'services': services, 'service_name': self.service.name, }) return ctx homepage = Homepage.as_view()
Reorder the service buttons display.
Reorder the service buttons display.
Python
agpl-3.0
ZTH1970/alcide,ZTH1970/alcide,ZTH1970/alcide,ZTH1970/alcide,ZTH1970/alcide
python
## Code Before: from django.shortcuts import render, redirect from django.template.defaultfilters import slugify from cbv import HOME_SERVICE_COOKIE, TemplateView from calebasse.ressources.models import Service APPLICATIONS = ( (u'Gestion des dossiers', 'dossiers'), (u'Agenda', 'agenda'), (u'Saisie des actes', 'actes'), (u'Facturation et décompte', 'facturation'), (u'Gestion des personnes', 'personnes'), (u'Gestion des ressources', 'ressources'), ) def redirect_to_homepage(request): service_name = request.COOKIES.get(HOME_SERVICE_COOKIE, 'cmpp').lower() return redirect('homepage', service=service_name) class Homepage(TemplateView): template_name='calebasse/homepage.html' def get_context_data(self, **kwargs): services = Service.objects.values_list('name', 'slug') ctx = super(Homepage, self).get_context_data(**kwargs) ctx.update({ 'applications': APPLICATIONS, 'services': services, 'service_name': self.service.name, }) return ctx homepage = Homepage.as_view() ## Instruction: Reorder the service buttons display. ## Code After: from django.shortcuts import render, redirect from django.template.defaultfilters import slugify from cbv import HOME_SERVICE_COOKIE, TemplateView from calebasse.ressources.models import Service APPLICATIONS = ( (u'Gestion des dossiers', 'dossiers'), (u'Agenda', 'agenda'), (u'Saisie des actes', 'actes'), (u'Facturation et décompte', 'facturation'), (u'Gestion des personnes', 'personnes'), (u'Gestion des ressources', 'ressources'), ) def redirect_to_homepage(request): service_name = request.COOKIES.get(HOME_SERVICE_COOKIE, 'cmpp').lower() return redirect('homepage', service=service_name) class Homepage(TemplateView): template_name='calebasse/homepage.html' def get_context_data(self, **kwargs): services = Service.objects.values_list('name', 'slug') services = sorted(services, key=lambda tup: tup[0]) ctx = super(Homepage, self).get_context_data(**kwargs) ctx.update({ 'applications': APPLICATIONS, 'services': services, 'service_name': self.service.name, }) return ctx homepage = Homepage.as_view()
from django.shortcuts import render, redirect from django.template.defaultfilters import slugify from cbv import HOME_SERVICE_COOKIE, TemplateView from calebasse.ressources.models import Service APPLICATIONS = ( (u'Gestion des dossiers', 'dossiers'), (u'Agenda', 'agenda'), (u'Saisie des actes', 'actes'), (u'Facturation et décompte', 'facturation'), (u'Gestion des personnes', 'personnes'), (u'Gestion des ressources', 'ressources'), ) def redirect_to_homepage(request): service_name = request.COOKIES.get(HOME_SERVICE_COOKIE, 'cmpp').lower() return redirect('homepage', service=service_name) class Homepage(TemplateView): template_name='calebasse/homepage.html' def get_context_data(self, **kwargs): services = Service.objects.values_list('name', 'slug') + services = sorted(services, key=lambda tup: tup[0]) ctx = super(Homepage, self).get_context_data(**kwargs) ctx.update({ 'applications': APPLICATIONS, 'services': services, 'service_name': self.service.name, }) return ctx homepage = Homepage.as_view()
1
0.028571
1
0
bc686fee839e447cdc3f527cc1e6bcf9898b5295
src/main/java/common/behaviour/FieldMethods.java
src/main/java/common/behaviour/FieldMethods.java
package common.behaviour; public interface FieldMethods { public void makeAMove(); }
package common.behaviour; import common.domain.Field; public interface FieldMethods { public void makeAMove(Field[] surroundingFields); }
Change makeAMove signature for different types of field.
Change makeAMove signature for different types of field.
Java
apache-2.0
aljutik/javaMiner
java
## Code Before: package common.behaviour; public interface FieldMethods { public void makeAMove(); } ## Instruction: Change makeAMove signature for different types of field. ## Code After: package common.behaviour; import common.domain.Field; public interface FieldMethods { public void makeAMove(Field[] surroundingFields); }
package common.behaviour; + import common.domain.Field; + public interface FieldMethods { - public void makeAMove(); + public void makeAMove(Field[] surroundingFields); }
4
0.8
3
1
01ee6ed32bf5e036ea76e70dece67ffa35eca6bf
bower.json
bower.json
{ "name": "helmsman", "authors": [ "Michael Pope <michael@dtcorp.com.au>" ], "description": "AngularJS multi layer menu system", "main": "src/helmsman.js", "keywords": [ "menu" ], "license": "MIT", "homepage": "github.com/map7/helmsman", "ignore": [ "**/.*", "node_modules", "bower_components", "app/bower_components", "test", "tests" ], "version": "0.1.1" }
{ "name": "helmsman", "authors": [ "Michael Pope <michael@dtcorp.com.au>" ], "description": "AngularJS multi layer menu system", "main": "src/helmsman.js", "keywords": [ "menu" ], "license": "MIT", "homepage": "github.com/map7/helmsman", "ignore": [ "**/.*", "node_modules", "bower_components", "app/bower_components", "test", "tests" ], "version": "0.1.2", "dependencies": { "angular-hotkeys": "^0.2.2" } }
Add angular-hotkeys as a dependency
Add angular-hotkeys as a dependency
JSON
mit
map7/helmsman,map7/helmsman
json
## Code Before: { "name": "helmsman", "authors": [ "Michael Pope <michael@dtcorp.com.au>" ], "description": "AngularJS multi layer menu system", "main": "src/helmsman.js", "keywords": [ "menu" ], "license": "MIT", "homepage": "github.com/map7/helmsman", "ignore": [ "**/.*", "node_modules", "bower_components", "app/bower_components", "test", "tests" ], "version": "0.1.1" } ## Instruction: Add angular-hotkeys as a dependency ## Code After: { "name": "helmsman", "authors": [ "Michael Pope <michael@dtcorp.com.au>" ], "description": "AngularJS multi layer menu system", "main": "src/helmsman.js", "keywords": [ "menu" ], "license": "MIT", "homepage": "github.com/map7/helmsman", "ignore": [ "**/.*", "node_modules", "bower_components", "app/bower_components", "test", "tests" ], "version": "0.1.2", "dependencies": { "angular-hotkeys": "^0.2.2" } }
{ "name": "helmsman", "authors": [ "Michael Pope <michael@dtcorp.com.au>" ], "description": "AngularJS multi layer menu system", "main": "src/helmsman.js", "keywords": [ "menu" ], "license": "MIT", "homepage": "github.com/map7/helmsman", "ignore": [ "**/.*", "node_modules", "bower_components", "app/bower_components", "test", "tests" ], - "version": "0.1.1" ? ^ + "version": "0.1.2", ? ^ + + "dependencies": { + "angular-hotkeys": "^0.2.2" + } }
5
0.227273
4
1
a31457505ed790ee4e32763eb15552f860898dea
src/app/journal/journalEntries.service.spec.ts
src/app/journal/journalEntries.service.spec.ts
import { JournalEntriesService } from './journalEntries.service'; describe('JournalEntriesService', () => { let service: JournalEntriesService; let firebaseService: any; beforeEach(() => { service = new JournalEntriesService(firebaseService); }); it('should create JournalEntriesService', () => { expect(service).toBeTruthy(); }); });
import { JournalEntriesService } from './journalEntries.service'; import {JournalEntry, JournalEntryFirebase} from './journalEntry'; import {Observable} from 'rxjs'; class FirebaseServiceStub { getList(url) { let journalEntries = []; journalEntries.push(new JournalEntry()); journalEntries.push(new JournalEntry()); return Observable.of(journalEntries); } addItem(url, journalEntry) { } deleteItem(url, id) { } updateItem(url, id, journalEntry) { } } describe('JournalEntriesService', () => { let service: JournalEntriesService; let firebaseService: any = new FirebaseServiceStub(); let journalEntry = new JournalEntry(); journalEntry.$key = 'j1'; journalEntry.date = new Date('2017-03-15'); journalEntry.editable = false; journalEntry.foodID = 1; journalEntry.quantity = 100; journalEntry.unit = 'mg'; journalEntry.userId = 'user1'; let firebaseJournalEntry = new JournalEntryFirebase(); firebaseJournalEntry.date = journalEntry.date.toString(); firebaseJournalEntry.editable = journalEntry.editable; firebaseJournalEntry.foodID = journalEntry.foodID; firebaseJournalEntry.name = journalEntry.name; firebaseJournalEntry.quantity = journalEntry.quantity; firebaseJournalEntry.unit = journalEntry.unit; firebaseJournalEntry.userId = journalEntry.userId; let url = 'journalEntries/user1/2017315'; beforeEach(() => { service = new JournalEntriesService(firebaseService); }); it('should create JournalEntriesService', () => { expect(service).toBeTruthy(); }); it('should get journal entries', () => { let userId = 'user1'; let date = new Date('2017-03-15'); spyOn(firebaseService, 'getList'); service.getJournalEntries(date, userId); expect(firebaseService.getList).toHaveBeenCalledWith(url); }); it('should add journal entry', () => { spyOn(firebaseService, 'addItem'); service.addEntry(journalEntry); expect(firebaseService.addItem).toHaveBeenCalledWith(url, firebaseJournalEntry); }); it('should delete journal entry', () => { spyOn(firebaseService, 'deleteItem'); service.deleteEntry(journalEntry); expect(firebaseService.deleteItem).toHaveBeenCalledWith(url, journalEntry.$key); }); it('should update journal entry', () => { spyOn(firebaseService, 'updateItem'); service.updateEntry(journalEntry); expect(firebaseService.updateItem).toHaveBeenCalledWith(url, journalEntry.$key, firebaseJournalEntry); }); });
Write tests for the journal entry service
Write tests for the journal entry service
TypeScript
mit
stefanamport/nuba,stefanamport/nuba,stefanamport/nuba
typescript
## Code Before: import { JournalEntriesService } from './journalEntries.service'; describe('JournalEntriesService', () => { let service: JournalEntriesService; let firebaseService: any; beforeEach(() => { service = new JournalEntriesService(firebaseService); }); it('should create JournalEntriesService', () => { expect(service).toBeTruthy(); }); }); ## Instruction: Write tests for the journal entry service ## Code After: import { JournalEntriesService } from './journalEntries.service'; import {JournalEntry, JournalEntryFirebase} from './journalEntry'; import {Observable} from 'rxjs'; class FirebaseServiceStub { getList(url) { let journalEntries = []; journalEntries.push(new JournalEntry()); journalEntries.push(new JournalEntry()); return Observable.of(journalEntries); } addItem(url, journalEntry) { } deleteItem(url, id) { } updateItem(url, id, journalEntry) { } } describe('JournalEntriesService', () => { let service: JournalEntriesService; let firebaseService: any = new FirebaseServiceStub(); let journalEntry = new JournalEntry(); journalEntry.$key = 'j1'; journalEntry.date = new Date('2017-03-15'); journalEntry.editable = false; journalEntry.foodID = 1; journalEntry.quantity = 100; journalEntry.unit = 'mg'; journalEntry.userId = 'user1'; let firebaseJournalEntry = new JournalEntryFirebase(); firebaseJournalEntry.date = journalEntry.date.toString(); firebaseJournalEntry.editable = journalEntry.editable; firebaseJournalEntry.foodID = journalEntry.foodID; firebaseJournalEntry.name = journalEntry.name; firebaseJournalEntry.quantity = journalEntry.quantity; firebaseJournalEntry.unit = journalEntry.unit; firebaseJournalEntry.userId = journalEntry.userId; let url = 'journalEntries/user1/2017315'; beforeEach(() => { service = new JournalEntriesService(firebaseService); }); it('should create JournalEntriesService', () => { expect(service).toBeTruthy(); }); it('should get journal entries', () => { let userId = 'user1'; let date = new Date('2017-03-15'); spyOn(firebaseService, 'getList'); service.getJournalEntries(date, userId); expect(firebaseService.getList).toHaveBeenCalledWith(url); }); it('should add journal entry', () => { spyOn(firebaseService, 'addItem'); service.addEntry(journalEntry); expect(firebaseService.addItem).toHaveBeenCalledWith(url, firebaseJournalEntry); }); it('should delete journal entry', () => { spyOn(firebaseService, 'deleteItem'); service.deleteEntry(journalEntry); expect(firebaseService.deleteItem).toHaveBeenCalledWith(url, journalEntry.$key); }); it('should update journal entry', () => { spyOn(firebaseService, 'updateItem'); service.updateEntry(journalEntry); expect(firebaseService.updateItem).toHaveBeenCalledWith(url, journalEntry.$key, firebaseJournalEntry); }); });
import { JournalEntriesService } from './journalEntries.service'; + import {JournalEntry, JournalEntryFirebase} from './journalEntry'; + import {Observable} from 'rxjs'; + + class FirebaseServiceStub { + getList(url) { + let journalEntries = []; + journalEntries.push(new JournalEntry()); + journalEntries.push(new JournalEntry()); + + return Observable.of(journalEntries); + } + + addItem(url, journalEntry) { } + + deleteItem(url, id) { } + + updateItem(url, id, journalEntry) { } + } describe('JournalEntriesService', () => { let service: JournalEntriesService; - let firebaseService: any; + let firebaseService: any = new FirebaseServiceStub(); + + let journalEntry = new JournalEntry(); + journalEntry.$key = 'j1'; + journalEntry.date = new Date('2017-03-15'); + journalEntry.editable = false; + journalEntry.foodID = 1; + journalEntry.quantity = 100; + journalEntry.unit = 'mg'; + journalEntry.userId = 'user1'; + + let firebaseJournalEntry = new JournalEntryFirebase(); + firebaseJournalEntry.date = journalEntry.date.toString(); + firebaseJournalEntry.editable = journalEntry.editable; + firebaseJournalEntry.foodID = journalEntry.foodID; + firebaseJournalEntry.name = journalEntry.name; + firebaseJournalEntry.quantity = journalEntry.quantity; + firebaseJournalEntry.unit = journalEntry.unit; + firebaseJournalEntry.userId = journalEntry.userId; + + let url = 'journalEntries/user1/2017315'; beforeEach(() => { service = new JournalEntriesService(firebaseService); }); it('should create JournalEntriesService', () => { expect(service).toBeTruthy(); }); + + it('should get journal entries', () => { + let userId = 'user1'; + let date = new Date('2017-03-15'); + spyOn(firebaseService, 'getList'); + + service.getJournalEntries(date, userId); + + expect(firebaseService.getList).toHaveBeenCalledWith(url); + }); + + it('should add journal entry', () => { + spyOn(firebaseService, 'addItem'); + + service.addEntry(journalEntry); + + expect(firebaseService.addItem).toHaveBeenCalledWith(url, firebaseJournalEntry); + }); + + it('should delete journal entry', () => { + spyOn(firebaseService, 'deleteItem'); + + service.deleteEntry(journalEntry); + + expect(firebaseService.deleteItem).toHaveBeenCalledWith(url, journalEntry.$key); + }); + + it('should update journal entry', () => { + spyOn(firebaseService, 'updateItem'); + + service.updateEntry(journalEntry); + + expect(firebaseService.updateItem).toHaveBeenCalledWith(url, journalEntry.$key, firebaseJournalEntry); + }); });
74
5.285714
73
1
28ecdb7013560376f33e85817e02609b729cb34f
ci_environment/phpbuild/attributes/default.rb
ci_environment/phpbuild/attributes/default.rb
default[:phpbuild] = { :git => { :repository => "git://github.com/CHH/php-build.git", :revision => "e20c6ffe2c6c356ed34007a5caa0244425bbf0ad" }, :phpunit_plugin => { :git => { :repository => "git://github.com/CHH/php-build-plugin-phpunit.git", :revision => "2ee717c0e783809458f3073258c63f42500d1298" } }, :custom => { :php_ini => { :memory_limit => "512M", :timezone => "UTC" } }, :arch => (kernel['machine'] =~ /x86_64/ ? "x86_64" : "i386") }
default[:phpbuild] = { :git => { :repository => "git://github.com/loicfrering/php-build.git", :revision => "f1cb2948629c1bbd812920f932f15395ab5d18e2" }, :phpunit_plugin => { :git => { :repository => "git://github.com/CHH/php-build-plugin-phpunit.git", :revision => "2ee717c0e783809458f3073258c63f42500d1298" } }, :custom => { :php_ini => { :memory_limit => "512M", :timezone => "UTC" } }, :arch => (kernel['machine'] =~ /x86_64/ ? "x86_64" : "i386") }
Use a php-build fork to download PHP distributions on the US mirror.
Use a php-build fork to download PHP distributions on the US mirror. Generic links are down right now.
Ruby
mit
Distelli/travis-cookbooks,DanielG/travis-cookbooks,ardock/travis-cookbooks,Zarthus/travis-cookbooks,DanielG/travis-cookbooks,johanneswuerbach/travis-cookbooks,alex/travis-cookbooks,ardock/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,dracos/travis-cookbooks,dracos/travis-cookbooks,dstufft/travis-cookbooks,ljharb/travis-cookbooks,Zarthus/travis-cookbooks,tianon/travis-cookbooks,Distelli/travis-cookbooks,ljharb/travis-cookbooks,Acidburn0zzz/travis-cookbooks,gavioto/travis-cookbooks,gavioto/travis-cookbooks,travis-ci/travis-cookbooks,travis-ci/travis-cookbooks,ljharb/travis-cookbooks,bd808/travis-cookbooks,tianon/travis-cookbooks,johanneswuerbach/travis-cookbooks,ardock/travis-cookbooks,alex/travis-cookbooks,DanielG/travis-cookbooks,johanneswuerbach/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,Zarthus/travis-cookbooks,Acidburn0zzz/travis-cookbooks,tianon/travis-cookbooks,spurti-chopra/travis-cookbooks,dracos/travis-cookbooks,tianon/travis-cookbooks,gavioto/travis-cookbooks,Distelli/travis-cookbooks,dstufft/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,dracos/travis-cookbooks,gavioto/travis-cookbooks,tianon/travis-cookbooks,bd808/travis-cookbooks,Distelli/travis-cookbooks,ardock/travis-cookbooks,Zarthus/travis-cookbooks,spurti-chopra/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,DanielG/travis-cookbooks,Acidburn0zzz/travis-cookbooks,bd808/travis-cookbooks,spurti-chopra/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,travis-ci/travis-cookbooks,Acidburn0zzz/travis-cookbooks
ruby
## Code Before: default[:phpbuild] = { :git => { :repository => "git://github.com/CHH/php-build.git", :revision => "e20c6ffe2c6c356ed34007a5caa0244425bbf0ad" }, :phpunit_plugin => { :git => { :repository => "git://github.com/CHH/php-build-plugin-phpunit.git", :revision => "2ee717c0e783809458f3073258c63f42500d1298" } }, :custom => { :php_ini => { :memory_limit => "512M", :timezone => "UTC" } }, :arch => (kernel['machine'] =~ /x86_64/ ? "x86_64" : "i386") } ## Instruction: Use a php-build fork to download PHP distributions on the US mirror. Generic links are down right now. ## Code After: default[:phpbuild] = { :git => { :repository => "git://github.com/loicfrering/php-build.git", :revision => "f1cb2948629c1bbd812920f932f15395ab5d18e2" }, :phpunit_plugin => { :git => { :repository => "git://github.com/CHH/php-build-plugin-phpunit.git", :revision => "2ee717c0e783809458f3073258c63f42500d1298" } }, :custom => { :php_ini => { :memory_limit => "512M", :timezone => "UTC" } }, :arch => (kernel['machine'] =~ /x86_64/ ? "x86_64" : "i386") }
default[:phpbuild] = { :git => { - :repository => "git://github.com/CHH/php-build.git", ? ^^^ + :repository => "git://github.com/loicfrering/php-build.git", ? ^^^^^^^^^^^ - :revision => "e20c6ffe2c6c356ed34007a5caa0244425bbf0ad" + :revision => "f1cb2948629c1bbd812920f932f15395ab5d18e2" }, :phpunit_plugin => { :git => { :repository => "git://github.com/CHH/php-build-plugin-phpunit.git", :revision => "2ee717c0e783809458f3073258c63f42500d1298" } }, :custom => { :php_ini => { :memory_limit => "512M", :timezone => "UTC" } }, :arch => (kernel['machine'] =~ /x86_64/ ? "x86_64" : "i386") }
4
0.210526
2
2
7b638798e7c3dd3dd7a2f8d8efe0b44a7e9434b3
src/lib/pin/utility/logger.dart
src/lib/pin/utility/logger.dart
part of pin; class PinLogger { static Logger _logger; static File _file; static Logger get instance { if (_logger == null) { int now = PinTime.getTime(); _file = new File('logs/system-${now}.log'); _logger = Logger.root; _logger.level = Level.FINE; _logger.onRecord.listen(_printLogRecord); _logger.onRecord.listen(_fileLogRecord); } return _logger; } void set level(Level value) { _logger.level = value; } static void _printLogRecord(LogRecord r) { print(_formatLogRecord(r)); } static void _fileLogRecord(LogRecord r) { _file.writeAsString(_formatLogRecord(r) + '\n', mode: FileMode.APPEND); } static String _formatLogRecord(LogRecord r) { return "[${r.time}][${r.level}]: ${r.message}"; } }
part of pin; class PinLogger { static Logger _logger; static File _file; static Logger get instance { if (_logger == null) { int now = PinTime.getTime(); _file = new File('logs/system-${now}.log'); _logger = Logger.root; _logger.level = Level.FINE; _logger.onRecord.listen(_printLogRecord); _logger.onRecord.listen(_fileLogRecord); } return _logger; } void set level(Level value) { _logger.level = value; } static void _printLogRecord(LogRecord r) { print(_formatLogRecord(r)); } static void _fileLogRecord(LogRecord r) { _file .writeAsString(_formatLogRecord(r) + '\n', mode: FileMode.APPEND) .catchError((e, trace) { print('Error: ${e}'); if (trace != null) { print('StackTrace: ${trace}'); } }); } static String _formatLogRecord(LogRecord r) { return "[${r.time}][${r.level}]: ${r.message}"; } }
Handle log to file exception.
Handle log to file exception.
Dart
mit
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
dart
## Code Before: part of pin; class PinLogger { static Logger _logger; static File _file; static Logger get instance { if (_logger == null) { int now = PinTime.getTime(); _file = new File('logs/system-${now}.log'); _logger = Logger.root; _logger.level = Level.FINE; _logger.onRecord.listen(_printLogRecord); _logger.onRecord.listen(_fileLogRecord); } return _logger; } void set level(Level value) { _logger.level = value; } static void _printLogRecord(LogRecord r) { print(_formatLogRecord(r)); } static void _fileLogRecord(LogRecord r) { _file.writeAsString(_formatLogRecord(r) + '\n', mode: FileMode.APPEND); } static String _formatLogRecord(LogRecord r) { return "[${r.time}][${r.level}]: ${r.message}"; } } ## Instruction: Handle log to file exception. ## Code After: part of pin; class PinLogger { static Logger _logger; static File _file; static Logger get instance { if (_logger == null) { int now = PinTime.getTime(); _file = new File('logs/system-${now}.log'); _logger = Logger.root; _logger.level = Level.FINE; _logger.onRecord.listen(_printLogRecord); _logger.onRecord.listen(_fileLogRecord); } return _logger; } void set level(Level value) { _logger.level = value; } static void _printLogRecord(LogRecord r) { print(_formatLogRecord(r)); } static void _fileLogRecord(LogRecord r) { _file .writeAsString(_formatLogRecord(r) + '\n', mode: FileMode.APPEND) .catchError((e, trace) { print('Error: ${e}'); if (trace != null) { print('StackTrace: ${trace}'); } }); } static String _formatLogRecord(LogRecord r) { return "[${r.time}][${r.level}]: ${r.message}"; } }
part of pin; class PinLogger { static Logger _logger; static File _file; static Logger get instance { if (_logger == null) { int now = PinTime.getTime(); _file = new File('logs/system-${now}.log'); _logger = Logger.root; _logger.level = Level.FINE; _logger.onRecord.listen(_printLogRecord); _logger.onRecord.listen(_fileLogRecord); } return _logger; } void set level(Level value) { _logger.level = value; } static void _printLogRecord(LogRecord r) { print(_formatLogRecord(r)); } static void _fileLogRecord(LogRecord r) { + _file - _file.writeAsString(_formatLogRecord(r) + '\n', mode: FileMode.APPEND); ? ----- - + .writeAsString(_formatLogRecord(r) + '\n', mode: FileMode.APPEND) + .catchError((e, trace) { + print('Error: ${e}'); + if (trace != null) { + print('StackTrace: ${trace}'); + } + }); } static String _formatLogRecord(LogRecord r) { return "[${r.time}][${r.level}]: ${r.message}"; } }
9
0.243243
8
1
09c41e422d9e53261e3d1431129e02d58a4c14a9
job.cpp
job.cpp
Job::Job(int id, std::string machine_name) : job_id(id), state(State::Moveable), machine(machine_name) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { return machine; } bool Job::moveable() const { return state == State::Moveable; }
Job::Job(int id, std::string machine_name) : job_id(id), machine(machine_name), state(State::Moveable) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { return machine; } bool Job::moveable() const { return state == State::Moveable; }
Change the order of variables in the constructor init list
Change the order of variables in the constructor init list Member variables are always initialised in the order in which they were declared in the class. If an initialiser list uses a different order, the initialisations will be re-ordered by the compiler to match the order of declaration. In some cases, this can lead to unexpected behaviour when it looks like a variable is being used after initialisation, but is in fact being used before initialisation. This particular instance had no such issue, but it is better to keep the constructor init list ordered to avoid any chance of this happening.
C++
mit
mattportas/yejong
c++
## Code Before: Job::Job(int id, std::string machine_name) : job_id(id), state(State::Moveable), machine(machine_name) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { return machine; } bool Job::moveable() const { return state == State::Moveable; } ## Instruction: Change the order of variables in the constructor init list Member variables are always initialised in the order in which they were declared in the class. If an initialiser list uses a different order, the initialisations will be re-ordered by the compiler to match the order of declaration. In some cases, this can lead to unexpected behaviour when it looks like a variable is being used after initialisation, but is in fact being used before initialisation. This particular instance had no such issue, but it is better to keep the constructor init list ordered to avoid any chance of this happening. ## Code After: Job::Job(int id, std::string machine_name) : job_id(id), machine(machine_name), state(State::Moveable) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { return machine; } bool Job::moveable() const { return state == State::Moveable; }
Job::Job(int id, std::string machine_name) - : job_id(id), state(State::Moveable), machine(machine_name) + : job_id(id), machine(machine_name), state(State::Moveable) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { return machine; } bool Job::moveable() const { return state == State::Moveable; }
2
0.095238
1
1
fb65fedbf60481d37e097ea9db290f53b84cae26
giveaminute/migrations/versions/001_Initial_models.py
giveaminute/migrations/versions/001_Initial_models.py
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata import os with open(os.path.join(os.path.dirname(__file__), '000_Initial_models.sql')) as initial_file: sql = initial_file.read() migrate_engine.execute(sql) def downgrade(migrate_engine): # Operations to reverse the above upgrade go here. pass
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata import os # Uncomment the following lines if you do not yet have a database to set up. # If you run this migration, it will blow away the data currently contained # in your database and start new. # # with open(os.path.join(os.path.dirname(__file__), '000_Initial_models.sql')) as initial_file: # sql = initial_file.read() # migrate_engine.execute(sql) def downgrade(migrate_engine): # Operations to reverse the above upgrade go here. pass
Comment out the initial migration step by default (so that we're not inadvertently blowing peoples databases away
Comment out the initial migration step by default (so that we're not inadvertently blowing peoples databases away
Python
agpl-3.0
codeforamerica/Change-By-Us,localprojects/Change-By-Us,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,localprojects/Change-By-Us,codeforeurope/Change-By-Us,codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,watchcat/cbu-rotterdam,watchcat/cbu-rotterdam,localprojects/Change-By-Us,localprojects/Change-By-Us,watchcat/cbu-rotterdam,codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,codeforamerica/Change-By-Us,codeforeurope/Change-By-Us
python
## Code Before: from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata import os with open(os.path.join(os.path.dirname(__file__), '000_Initial_models.sql')) as initial_file: sql = initial_file.read() migrate_engine.execute(sql) def downgrade(migrate_engine): # Operations to reverse the above upgrade go here. pass ## Instruction: Comment out the initial migration step by default (so that we're not inadvertently blowing peoples databases away ## Code After: from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata import os # Uncomment the following lines if you do not yet have a database to set up. # If you run this migration, it will blow away the data currently contained # in your database and start new. # # with open(os.path.join(os.path.dirname(__file__), '000_Initial_models.sql')) as initial_file: # sql = initial_file.read() # migrate_engine.execute(sql) def downgrade(migrate_engine): # Operations to reverse the above upgrade go here. pass
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata - + import os + # Uncomment the following lines if you do not yet have a database to set up. + # If you run this migration, it will blow away the data currently contained + # in your database and start new. + # - with open(os.path.join(os.path.dirname(__file__), '000_Initial_models.sql')) as initial_file: + # with open(os.path.join(os.path.dirname(__file__), '000_Initial_models.sql')) as initial_file: ? + - sql = initial_file.read() + # sql = initial_file.read() ? + - migrate_engine.execute(sql) + # migrate_engine.execute(sql) ? + def downgrade(migrate_engine): # Operations to reverse the above upgrade go here. - + pass
14
0.823529
9
5
f86d7770ea775512330859c513fb441d308484f7
readme.md
readme.md
![RestyGWT](http://restygwt.fusesource.org/images/restygwt-logo.png) ============== Description ----------- RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects. Features -------- * Generates Async Restful JSON based service proxies * Java Object to JSON encoding/decoding * Easy to use REST API To know more have a look to [RestyGWT web site](http://resty-gwt.github.io/)
![RestyGWT](http://restygwt.fusesource.org/images/restygwt-logo.png) ============== To know more have a look to [RestyGWT web site](http://resty-gwt.github.io/) Description ----------- RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects. Features -------- * Generates Async Restful JSON based service proxies * Java Object to JSON encoding/decoding * Easy to use REST API
Move web site link up to be displayed for mobile
Move web site link up to be displayed for mobile
Markdown
apache-2.0
cguillot/resty-gwt,ibaca/resty-gwt,Armageddon-/resty-gwt,ibaca/resty-gwt,paul-duffy/resty-gwt,resty-gwt/resty-gwt,resty-gwt/resty-gwt,BiovistaInc/resty-gwt,dldinternet/resty-gwt,resty-gwt/resty-gwt,Armageddon-/resty-gwt,paul-duffy/resty-gwt,paul-duffy/resty-gwt,ibaca/resty-gwt,cguillot/resty-gwt,Armageddon-/resty-gwt,BiovistaInc/resty-gwt,dldinternet/resty-gwt,cguillot/resty-gwt,BiovistaInc/resty-gwt
markdown
## Code Before: ![RestyGWT](http://restygwt.fusesource.org/images/restygwt-logo.png) ============== Description ----------- RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects. Features -------- * Generates Async Restful JSON based service proxies * Java Object to JSON encoding/decoding * Easy to use REST API To know more have a look to [RestyGWT web site](http://resty-gwt.github.io/) ## Instruction: Move web site link up to be displayed for mobile ## Code After: ![RestyGWT](http://restygwt.fusesource.org/images/restygwt-logo.png) ============== To know more have a look to [RestyGWT web site](http://resty-gwt.github.io/) Description ----------- RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects. Features -------- * Generates Async Restful JSON based service proxies * Java Object to JSON encoding/decoding * Easy to use REST API
![RestyGWT](http://restygwt.fusesource.org/images/restygwt-logo.png) ============== + + To know more have a look to [RestyGWT web site](http://resty-gwt.github.io/) Description ----------- RestyGWT is a GWT generator for REST services and JSON encoded data transfer objects. Features -------- * Generates Async Restful JSON based service proxies * Java Object to JSON encoding/decoding * Easy to use REST API - To know more have a look to [RestyGWT web site](http://resty-gwt.github.io/) +
4
0.25
3
1
ad3439929a19b1c41978d4de6f74fb442313fb07
src/mockDOMSource.ts
src/mockDOMSource.ts
import {Observable} from 'rx'; export interface DOMSelection { observable: Observable<any>; events: (eventType: string) => Observable<any>; } export class MockedDOMSelection { public observable: Observable<any>; constructor(private mockConfigEventTypes: Object, mockConfigObservable?: Observable<any>) { if (mockConfigObservable) { this.observable = mockConfigObservable; } else { this.observable = Observable.empty(); } } public events(eventType: string) { const mockConfigEventTypes = this.mockConfigEventTypes; const keys = Object.keys(mockConfigEventTypes); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === eventType) { return mockConfigEventTypes[key]; } } return Observable.empty(); } } export class MockedDOMSource { constructor(private mockConfig: Object) { } public select(selector: string): DOMSelection { const mockConfig = this.mockConfig; const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === selector) { return new MockedDOMSelection(mockConfig[key], mockConfig['observable']); } } return new MockedDOMSelection({}, mockConfig['observable']); } } export function mockDOMSource(mockConfig: Object): MockedDOMSource { return new MockedDOMSource(mockConfig); }
import {Observable} from 'rx'; export interface DOMSelection { observable: Observable<any>; events: (eventType: string) => Observable<any>; } export class MockedDOMSource { public observable: Observable<any>; constructor(private _mockConfig: Object) { if (_mockConfig['observable']) { this.observable = _mockConfig['observable']; } else { this.observable = Observable.empty(); } } public events(eventType: string) { const mockConfig = this._mockConfig; const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === eventType) { return mockConfig[key]; } } return Observable.empty(); } public select(selector: string): DOMSelection { const mockConfig = this._mockConfig; const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === selector) { return new MockedDOMSource(mockConfig[key]); } } return new MockedDOMSource({}); } } export function mockDOMSource(mockConfig: Object): MockedDOMSource { return new MockedDOMSource(mockConfig); }
Fix some tests/issues with mocDOMSource
Fix some tests/issues with mocDOMSource
TypeScript
mit
cyclejs/cycle-dom,cyclejs/cycle-web,cyclejs/cycle-web,cyclejs/cycle-dom
typescript
## Code Before: import {Observable} from 'rx'; export interface DOMSelection { observable: Observable<any>; events: (eventType: string) => Observable<any>; } export class MockedDOMSelection { public observable: Observable<any>; constructor(private mockConfigEventTypes: Object, mockConfigObservable?: Observable<any>) { if (mockConfigObservable) { this.observable = mockConfigObservable; } else { this.observable = Observable.empty(); } } public events(eventType: string) { const mockConfigEventTypes = this.mockConfigEventTypes; const keys = Object.keys(mockConfigEventTypes); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === eventType) { return mockConfigEventTypes[key]; } } return Observable.empty(); } } export class MockedDOMSource { constructor(private mockConfig: Object) { } public select(selector: string): DOMSelection { const mockConfig = this.mockConfig; const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === selector) { return new MockedDOMSelection(mockConfig[key], mockConfig['observable']); } } return new MockedDOMSelection({}, mockConfig['observable']); } } export function mockDOMSource(mockConfig: Object): MockedDOMSource { return new MockedDOMSource(mockConfig); } ## Instruction: Fix some tests/issues with mocDOMSource ## Code After: import {Observable} from 'rx'; export interface DOMSelection { observable: Observable<any>; events: (eventType: string) => Observable<any>; } export class MockedDOMSource { public observable: Observable<any>; constructor(private _mockConfig: Object) { if (_mockConfig['observable']) { this.observable = _mockConfig['observable']; } else { this.observable = Observable.empty(); } } public events(eventType: string) { const mockConfig = this._mockConfig; const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === eventType) { return mockConfig[key]; } } return Observable.empty(); } public select(selector: string): DOMSelection { const mockConfig = this._mockConfig; const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === selector) { return new MockedDOMSource(mockConfig[key]); } } return new MockedDOMSource({}); } } export function mockDOMSource(mockConfig: Object): MockedDOMSource { return new MockedDOMSource(mockConfig); }
import {Observable} from 'rx'; export interface DOMSelection { observable: Observable<any>; events: (eventType: string) => Observable<any>; } - export class MockedDOMSelection { ? ------- + export class MockedDOMSource { ? ++++ public observable: Observable<any>; - constructor(private mockConfigEventTypes: Object, ? ---------- ^ + constructor(private _mockConfig: Object) { ? + ^^^ - mockConfigObservable?: Observable<any>) { - if (mockConfigObservable) { ? ^ + if (_mockConfig['observable']) { ? + ^^^ ++ - this.observable = mockConfigObservable; ? ^ + this.observable = _mockConfig['observable']; ? + ^^^ ++ } else { this.observable = Observable.empty(); } } public events(eventType: string) { - const mockConfigEventTypes = this.mockConfigEventTypes; ? ---------- ---------- + const mockConfig = this._mockConfig; ? + - const keys = Object.keys(mockConfigEventTypes); ? ---------- + const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === eventType) { - return mockConfigEventTypes[key]; ? ---------- + return mockConfig[key]; } } return Observable.empty(); } - } - - export class MockedDOMSource { - constructor(private mockConfig: Object) { - } public select(selector: string): DOMSelection { - const mockConfig = this.mockConfig; + const mockConfig = this._mockConfig; ? + const keys = Object.keys(mockConfig); const keysLen = keys.length; for (let i = 0; i < keysLen; i++) { const key = keys[i]; if (key === selector) { - return new MockedDOMSelection(mockConfig[key], mockConfig['observable']); + return new MockedDOMSource(mockConfig[key]); } } - return new MockedDOMSelection({}, mockConfig['observable']); + return new MockedDOMSource({}); } } export function mockDOMSource(mockConfig: Object): MockedDOMSource { return new MockedDOMSource(mockConfig); }
26
0.481481
10
16
9ebfcf5fc69b879cd5d8c06bf4d24e26aea252a7
config/worker.ruby.yml
config/worker.ruby.yml
queue: builds.common shell: buffer: 0.5 timeouts: before_install: 1200 install: 1200 before_script: 450 script: 1500
queue: builds.common shell: buffer: 0.5 timeouts: install: 600 before_script: 300 script: 1500
Revert "Update Ruby worker timeouts"
Revert "Update Ruby worker timeouts" This reverts commit d66243cd405b99b3dfc9eda6772706e334f8355e. Even that does not seem to be sufficient. I guess CloudFoundry will have to get a separate machine we will use separate configuration for.
YAML
mit
travis-ci/travis-worker,gavioto/travis-worker,ireznice/travis-worker,final-ci/travis-worker,travis-ci/travis-worker,ireznice/travis-worker,gavioto/travis-worker,final-ci/travis-worker
yaml
## Code Before: queue: builds.common shell: buffer: 0.5 timeouts: before_install: 1200 install: 1200 before_script: 450 script: 1500 ## Instruction: Revert "Update Ruby worker timeouts" This reverts commit d66243cd405b99b3dfc9eda6772706e334f8355e. Even that does not seem to be sufficient. I guess CloudFoundry will have to get a separate machine we will use separate configuration for. ## Code After: queue: builds.common shell: buffer: 0.5 timeouts: install: 600 before_script: 300 script: 1500
queue: builds.common shell: buffer: 0.5 timeouts: - before_install: 1200 - install: 1200 ? ^^ + install: 600 ? ^ - before_script: 450 ? ^^ + before_script: 300 ? ^ + script: 1500
5
0.625
2
3
b447e585b0c77739315677deb367140184d24a17
src/models/reminder.js
src/models/reminder.js
const mongoose = require('mongoose'); const reminderSchema = new mongoose.Schema({ user_address: { type: Object, required: true, index: true }, value: { type: String, required: true }, expiration: { type: Date, required: true } }); module.exports = mongoose.model('Reminder', reminderSchema);
const mongoose = require('mongoose'); const reminderSchema = new mongoose.Schema({ user_address: { useAuth: Boolean, serviceUrl: String, bot: { name: String, id: String }, conversation: { id: String, isGroup: Boolean }, user: { name: { type: String, index: true }, id: String }, channelId: String, id: String }, value: { type: String, required: true }, expiration: { type: Date, required: true } }); module.exports = mongoose.model('Reminder', reminderSchema);
Improve mongoose schema, index user.name
Improve mongoose schema, index user.name
JavaScript
mit
sebsylvester/reminder-bot
javascript
## Code Before: const mongoose = require('mongoose'); const reminderSchema = new mongoose.Schema({ user_address: { type: Object, required: true, index: true }, value: { type: String, required: true }, expiration: { type: Date, required: true } }); module.exports = mongoose.model('Reminder', reminderSchema); ## Instruction: Improve mongoose schema, index user.name ## Code After: const mongoose = require('mongoose'); const reminderSchema = new mongoose.Schema({ user_address: { useAuth: Boolean, serviceUrl: String, bot: { name: String, id: String }, conversation: { id: String, isGroup: Boolean }, user: { name: { type: String, index: true }, id: String }, channelId: String, id: String }, value: { type: String, required: true }, expiration: { type: Date, required: true } }); module.exports = mongoose.model('Reminder', reminderSchema);
const mongoose = require('mongoose'); const reminderSchema = new mongoose.Schema({ - user_address: { type: Object, required: true, index: true }, + user_address: { + useAuth: Boolean, + serviceUrl: String, + bot: { + name: String, + id: String + }, + conversation: { + id: String, + isGroup: Boolean + }, + user: { + name: { type: String, index: true }, + id: String + }, + channelId: String, + id: String + }, value: { type: String, required: true }, expiration: { type: Date, required: true } }); module.exports = mongoose.model('Reminder', reminderSchema);
19
2.111111
18
1
7b12403db542560a2a1a91a5362761e47ca19259
assets/stylesheets/imc/_type.scss
assets/stylesheets/imc/_type.scss
// // Typography // -------------------------------------------------- ul { padding-left: 30px; li { margin-bottom: 8px; } } .navbar-nav li { margin-bottom: 0; } iframe, object, embed { max-width: 100%; width: 100%; } footer.imc-footer { padding-top: 40px; padding-bottom: 40px; margin-top: 100px; color: $gray-light; text-align: center; border-top: 1px solid #e5e5e5; } // Headings // ------------------------- h1, h3, .h1, .h3 { font-weight: 200; } h3.section-header { border-bottom: 2px $imc-accent-color solid; padding-bottom: 6px; } h4 a.small { color: $link-color; margin-left: 6px; }
// // Typography // -------------------------------------------------- ul { padding-left: 30px; li { margin-bottom: 8px; } } .navbar-nav li { margin-bottom: 0; } iframe, object, embed { max-width: 100%; width: 100%; } footer.imc-footer { padding-top: 40px; padding-bottom: 40px; margin-top: 100px; color: $gray-light; text-align: center; border-top: 1px solid #e5e5e5; } // Headings // ------------------------- h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 200; } h3.section-header { border-bottom: 2px $imc-accent-color solid; padding-bottom: 6px; } h4 a.small { color: $link-color; margin-left: 6px; }
Set heading font weight to 200.
Set heading font weight to 200.
SCSS
mit
insight-meditation-center/imc-bootstrap-sass,insight-meditation-center/imc-bootstrap-sass,insight-meditation-center/imc-bootstrap-sass,insight-meditation-center/imc-bootstrap-sass
scss
## Code Before: // // Typography // -------------------------------------------------- ul { padding-left: 30px; li { margin-bottom: 8px; } } .navbar-nav li { margin-bottom: 0; } iframe, object, embed { max-width: 100%; width: 100%; } footer.imc-footer { padding-top: 40px; padding-bottom: 40px; margin-top: 100px; color: $gray-light; text-align: center; border-top: 1px solid #e5e5e5; } // Headings // ------------------------- h1, h3, .h1, .h3 { font-weight: 200; } h3.section-header { border-bottom: 2px $imc-accent-color solid; padding-bottom: 6px; } h4 a.small { color: $link-color; margin-left: 6px; } ## Instruction: Set heading font weight to 200. ## Code After: // // Typography // -------------------------------------------------- ul { padding-left: 30px; li { margin-bottom: 8px; } } .navbar-nav li { margin-bottom: 0; } iframe, object, embed { max-width: 100%; width: 100%; } footer.imc-footer { padding-top: 40px; padding-bottom: 40px; margin-top: 100px; color: $gray-light; text-align: center; border-top: 1px solid #e5e5e5; } // Headings // ------------------------- h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 200; } h3.section-header { border-bottom: 2px $imc-accent-color solid; padding-bottom: 6px; } h4 a.small { color: $link-color; margin-left: 6px; }
// // Typography // -------------------------------------------------- ul { padding-left: 30px; li { margin-bottom: 8px; } } .navbar-nav li { margin-bottom: 0; } iframe, object, embed { max-width: 100%; width: 100%; } footer.imc-footer { padding-top: 40px; padding-bottom: 40px; margin-top: 100px; color: $gray-light; text-align: center; border-top: 1px solid #e5e5e5; } // Headings // ------------------------- - h1, h3, .h1, .h3 { + h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 200; } h3.section-header { border-bottom: 2px $imc-accent-color solid; padding-bottom: 6px; } h4 a.small { color: $link-color; margin-left: 6px; }
2
0.042553
1
1
4084db515ff305649583ef2a2d1b901b1e3bf9b9
lib/merb_global.rb
lib/merb_global.rb
require 'pathname' if defined? Merb::Plugins require Pathname(__FILE__).dirname.expand_path + 'merb_global/base' require Pathname(__FILE__).dirname.expand_path + 'merb_global/controller' Merb::Plugins.add_rakefiles 'merb_global/rake' end
require 'pathname' if defined? Merb::Plugins require Pathname(__FILE__).dirname.expand_path + 'merb_global/base' require Pathname(__FILE__).dirname.expand_path + 'merb_global/controller' Merb::Plugins.add_rakefiles(Pathname(__FILE__).dirname.expand_path + 'merb_global/merbrake') end
Load correct file with extra rake tasks
Load correct file with extra rake tasks
Ruby
mit
myabc/merb_global
ruby
## Code Before: require 'pathname' if defined? Merb::Plugins require Pathname(__FILE__).dirname.expand_path + 'merb_global/base' require Pathname(__FILE__).dirname.expand_path + 'merb_global/controller' Merb::Plugins.add_rakefiles 'merb_global/rake' end ## Instruction: Load correct file with extra rake tasks ## Code After: require 'pathname' if defined? Merb::Plugins require Pathname(__FILE__).dirname.expand_path + 'merb_global/base' require Pathname(__FILE__).dirname.expand_path + 'merb_global/controller' Merb::Plugins.add_rakefiles(Pathname(__FILE__).dirname.expand_path + 'merb_global/merbrake') end
require 'pathname' if defined? Merb::Plugins require Pathname(__FILE__).dirname.expand_path + 'merb_global/base' require Pathname(__FILE__).dirname.expand_path + 'merb_global/controller' - Merb::Plugins.add_rakefiles 'merb_global/rake' + Merb::Plugins.add_rakefiles(Pathname(__FILE__).dirname.expand_path + 'merb_global/merbrake') end
2
0.25
1
1
0c1a09af29d5cbc93a51a06f55924f15b15187d6
create-links.sh
create-links.sh
DOTFILES=$(pwd) ln -s $DOTFILES/.tmux.conf ~/.tmux.conf ln -s $DOTFILES/.vimrc ~/.vimrc ln -s $DOTFILES/.vimrc ~/.nvimrc
DOTFILES=$(pwd) ln -s $DOTFILES/.tmux.conf ~/.tmux.conf ln -s $DOTFILES/.vimrc ~/.vimrc ln -s $DOTFILES/.vimrc ~/.nvimrc curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Add vim-plug to setup script
Add vim-plug to setup script
Shell
mit
bgourlie/dotfiles
shell
## Code Before: DOTFILES=$(pwd) ln -s $DOTFILES/.tmux.conf ~/.tmux.conf ln -s $DOTFILES/.vimrc ~/.vimrc ln -s $DOTFILES/.vimrc ~/.nvimrc ## Instruction: Add vim-plug to setup script ## Code After: DOTFILES=$(pwd) ln -s $DOTFILES/.tmux.conf ~/.tmux.conf ln -s $DOTFILES/.vimrc ~/.vimrc ln -s $DOTFILES/.vimrc ~/.nvimrc curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
DOTFILES=$(pwd) ln -s $DOTFILES/.tmux.conf ~/.tmux.conf ln -s $DOTFILES/.vimrc ~/.vimrc ln -s $DOTFILES/.vimrc ~/.nvimrc + + curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
3
0.75
3
0
62c9ed93e35bc1ec8f2fd21b41ce8cada1c6f614
src/java/org/dellroad/stuff/validation/EmailAddress.java
src/java/org/dellroad/stuff/validation/EmailAddress.java
/* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import javax.validation.ReportAsSingleViolation; import javax.validation.constraints.Pattern; /** * Validation constraint requiring a {@link String} to be a valid email address. */ @Documented @Constraint(validatedBy = {}) @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @Pattern(regexp = "^[-+._\\p{Alnum}]+@[-\\p{Alnum}]+(\\.[-.\\p{Alnum}]+)+$") @ReportAsSingleViolation public @interface EmailAddress { String message() default "Invalid email address"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; }
/* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import javax.validation.ReportAsSingleViolation; import javax.validation.constraints.Pattern; /** * Validation constraint requiring a {@link String} to be a valid email address. */ @Documented @Constraint(validatedBy = {}) @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @Pattern(regexp = EmailAddress.PATTERN) @ReportAsSingleViolation public @interface EmailAddress { /** * The regular expression string used by this constraint to validate email addresses: {@value} */ String PATTERN = "^[-+%._\\p{Alnum}]+@([-\\p{Alnum}]+\\.)+[-\\p{Alnum}]+$"; String message() default "Invalid email address"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; }
Tweak email address pattern and define the string as a constant.
Tweak email address pattern and define the string as a constant.
Java
apache-2.0
tempbottle/jsimpledb,permazen/permazen,permazen/permazen,permazen/permazen,tempbottle/jsimpledb,archiecobbs/jsimpledb,tempbottle/jsimpledb,archiecobbs/jsimpledb,archiecobbs/jsimpledb
java
## Code Before: /* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import javax.validation.ReportAsSingleViolation; import javax.validation.constraints.Pattern; /** * Validation constraint requiring a {@link String} to be a valid email address. */ @Documented @Constraint(validatedBy = {}) @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @Pattern(regexp = "^[-+._\\p{Alnum}]+@[-\\p{Alnum}]+(\\.[-.\\p{Alnum}]+)+$") @ReportAsSingleViolation public @interface EmailAddress { String message() default "Invalid email address"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; } ## Instruction: Tweak email address pattern and define the string as a constant. ## Code After: /* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import javax.validation.ReportAsSingleViolation; import javax.validation.constraints.Pattern; /** * Validation constraint requiring a {@link String} to be a valid email address. */ @Documented @Constraint(validatedBy = {}) @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @Pattern(regexp = EmailAddress.PATTERN) @ReportAsSingleViolation public @interface EmailAddress { /** * The regular expression string used by this constraint to validate email addresses: {@value} */ String PATTERN = "^[-+%._\\p{Alnum}]+@([-\\p{Alnum}]+\\.)+[-\\p{Alnum}]+$"; String message() default "Invalid email address"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; }
/* * Copyright (C) 2011 Archie L. Cobbs. All rights reserved. * * $Id$ */ package org.dellroad.stuff.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import javax.validation.ReportAsSingleViolation; import javax.validation.constraints.Pattern; /** * Validation constraint requiring a {@link String} to be a valid email address. */ @Documented @Constraint(validatedBy = {}) @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) - @Pattern(regexp = "^[-+._\\p{Alnum}]+@[-\\p{Alnum}]+(\\.[-.\\p{Alnum}]+)+$") + @Pattern(regexp = EmailAddress.PATTERN) @ReportAsSingleViolation public @interface EmailAddress { + + /** + * The regular expression string used by this constraint to validate email addresses: {@value} + */ + String PATTERN = "^[-+%._\\p{Alnum}]+@([-\\p{Alnum}]+\\.)+[-\\p{Alnum}]+$"; String message() default "Invalid email address"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; }
7
0.184211
6
1
1ec5a2d9b447516e1847a8fa6eb05aecd273fcd7
phpunit.xml
phpunit.xml
<phpunit backupGlobals="true"> <testsuite> <directory>./tests</directory> </testsuite> </phpunit>
<phpunit backupGlobals="true"> <testsuite> <directory suffix='.hh'>./tests</directory> </phpunit>
Add suffix attribute to search for hh files
Add suffix attribute to search for hh files
XML
mit
davidmogar/quizzer-hack,davidmogar/quizzer-hack
xml
## Code Before: <phpunit backupGlobals="true"> <testsuite> <directory>./tests</directory> </testsuite> </phpunit> ## Instruction: Add suffix attribute to search for hh files ## Code After: <phpunit backupGlobals="true"> <testsuite> <directory suffix='.hh'>./tests</directory> </phpunit>
<phpunit backupGlobals="true"> <testsuite> - <directory>./tests</directory> + <directory suffix='.hh'>./tests</directory> ? +++++++++++++ - </testsuite> </phpunit>
3
0.6
1
2
ce87353cd43c6fa8b69e0a0308f75f6138c120eb
extras/win32-portable/create_portable.txt
extras/win32-portable/create_portable.txt
How to create a new portable Windows distribution of OpenSlides: ---------------------------------------------------------------- 1.) Follow the OpenSlides installation instructions for windows, but add the option "-Z" when executing easy_install, e.g.: easy_install -Z django django-mptt reportlab pil 2.) In the main directory of the OpenSlides checkout execute: python extras/win32-portable/prepare_portable.py 3.) The portable OpenSlides distribution is now ready as a zip in the 'dist/' directory Note: Creating the portable Windows distribution of OpenSlides is not possible, if Python is installed in 64-bit version.
How to create a new portable Windows distribution of OpenSlides: ---------------------------------------------------------------- 1.) Follow the OpenSlides installation instructions for windows, but add the option "-Z" when executing easy_install, e.g.: easy_install -Z django django-mptt reportlab pil 2.) Install OpenSlides by running python setup.py install in the top directory of OpenSlides. NOTE: This step must be repeated whenever you make changes to OpenSlides 3.) In the main directory of the OpenSlides checkout execute: python extras/win32-portable/prepare_portable.py 4.) The portable OpenSlides distribution is now ready as a zip in the 'dist/' directory Note: Creating the portable Windows distribution of OpenSlides is not possible, if Python is installed in 64-bit version.
Update instructions for building the portable
Update instructions for building the portable
Text
mit
tsiegleauq/OpenSlides,boehlke/OpenSlides,jwinzer/OpenSlides,emanuelschuetze/OpenSlides,emanuelschuetze/OpenSlides,boehlke/OpenSlides,normanjaeckel/OpenSlides,OpenSlides/OpenSlides,tsiegleauq/OpenSlides,FinnStutzenstein/OpenSlides,CatoTH/OpenSlides,normanjaeckel/OpenSlides,rolandgeider/OpenSlides,ostcar/OpenSlides,jwinzer/OpenSlides,CatoTH/OpenSlides,ostcar/OpenSlides,normanjaeckel/OpenSlides,FinnStutzenstein/OpenSlides,CatoTH/OpenSlides,OpenSlides/OpenSlides,FinnStutzenstein/OpenSlides,jwinzer/OpenSlides,emanuelschuetze/OpenSlides,jwinzer/OpenSlides,jwinzer/OpenSlides,boehlke/OpenSlides,CatoTH/OpenSlides,boehlke/OpenSlides,ostcar/OpenSlides,rolandgeider/OpenSlides,rolandgeider/OpenSlides,FinnStutzenstein/OpenSlides,tsiegleauq/OpenSlides,emanuelschuetze/OpenSlides,normanjaeckel/OpenSlides
text
## Code Before: How to create a new portable Windows distribution of OpenSlides: ---------------------------------------------------------------- 1.) Follow the OpenSlides installation instructions for windows, but add the option "-Z" when executing easy_install, e.g.: easy_install -Z django django-mptt reportlab pil 2.) In the main directory of the OpenSlides checkout execute: python extras/win32-portable/prepare_portable.py 3.) The portable OpenSlides distribution is now ready as a zip in the 'dist/' directory Note: Creating the portable Windows distribution of OpenSlides is not possible, if Python is installed in 64-bit version. ## Instruction: Update instructions for building the portable ## Code After: How to create a new portable Windows distribution of OpenSlides: ---------------------------------------------------------------- 1.) Follow the OpenSlides installation instructions for windows, but add the option "-Z" when executing easy_install, e.g.: easy_install -Z django django-mptt reportlab pil 2.) Install OpenSlides by running python setup.py install in the top directory of OpenSlides. NOTE: This step must be repeated whenever you make changes to OpenSlides 3.) In the main directory of the OpenSlides checkout execute: python extras/win32-portable/prepare_portable.py 4.) The portable OpenSlides distribution is now ready as a zip in the 'dist/' directory Note: Creating the portable Windows distribution of OpenSlides is not possible, if Python is installed in 64-bit version.
How to create a new portable Windows distribution of OpenSlides: ---------------------------------------------------------------- 1.) Follow the OpenSlides installation instructions for windows, but add the option "-Z" when executing easy_install, e.g.: easy_install -Z django django-mptt reportlab pil + 2.) Install OpenSlides by running python setup.py install in the top directory + of OpenSlides. + NOTE: This step must be repeated whenever you make changes to OpenSlides + - 2.) In the main directory of the OpenSlides checkout execute: ? ^ + 3.) In the main directory of the OpenSlides checkout execute: ? ^ python extras/win32-portable/prepare_portable.py - 3.) The portable OpenSlides distribution is now ready as a zip in the ? ^ + 4.) The portable OpenSlides distribution is now ready as a zip in the ? ^ 'dist/' directory Note: Creating the portable Windows distribution of OpenSlides is not possible, if Python is installed in 64-bit version.
8
0.470588
6
2
6a0f367772cf76751b68b11bdaf0a6cea70273d8
app/views/pictures/show.html.erb
app/views/pictures/show.html.erb
<p id="notice"><%= notice %></p> <pre> <%= @picture.yaml_output %> </pre> <h2>Other fields</h2> <ul> <li> <strong>User:</strong> <%= @picture.photographer %> </li> <li> <strong>Year:</strong> <%= @picture.year %> </li> </ul> <%= link_to 'Edit', edit_picture_path(@picture) %> | <%= link_to 'Back', pictures_path %>
<p id="notice"><%= notice %></p> <pre> <%= @picture.yaml_output %> </pre> <h2>Other fields</h2> <ul> <li> <strong>User:</strong> <%= @picture.photographer %> </li> <li> <strong>Year:</strong> <%= @picture.year %> </li> </ul> <p> <%= link_to 'Edit', edit_picture_path(@picture) %> | <%= link_to 'Back', pictures_path %> </p> <p> <%= link_to 'Add another picture', new_picture_path %> </p>
Add a quicker way to add more
Add a quicker way to add more
HTML+ERB
mit
tomnatt/year-in-pictures-rails-helper,tomnatt/year-in-pictures-rails-helper,tomnatt/year-in-pictures-rails-helper,tomnatt/year-in-pictures-rails-helper
html+erb
## Code Before: <p id="notice"><%= notice %></p> <pre> <%= @picture.yaml_output %> </pre> <h2>Other fields</h2> <ul> <li> <strong>User:</strong> <%= @picture.photographer %> </li> <li> <strong>Year:</strong> <%= @picture.year %> </li> </ul> <%= link_to 'Edit', edit_picture_path(@picture) %> | <%= link_to 'Back', pictures_path %> ## Instruction: Add a quicker way to add more ## Code After: <p id="notice"><%= notice %></p> <pre> <%= @picture.yaml_output %> </pre> <h2>Other fields</h2> <ul> <li> <strong>User:</strong> <%= @picture.photographer %> </li> <li> <strong>Year:</strong> <%= @picture.year %> </li> </ul> <p> <%= link_to 'Edit', edit_picture_path(@picture) %> | <%= link_to 'Back', pictures_path %> </p> <p> <%= link_to 'Add another picture', new_picture_path %> </p>
<p id="notice"><%= notice %></p> <pre> <%= @picture.yaml_output %> </pre> <h2>Other fields</h2> <ul> <li> <strong>User:</strong> <%= @picture.photographer %> </li> <li> <strong>Year:</strong> <%= @picture.year %> </li> </ul> + <p> - <%= link_to 'Edit', edit_picture_path(@picture) %> | + <%= link_to 'Edit', edit_picture_path(@picture) %> | ? ++ - <%= link_to 'Back', pictures_path %> + <%= link_to 'Back', pictures_path %> ? ++ + </p> + <p> + <%= link_to 'Add another picture', new_picture_path %> + </p>
9
0.409091
7
2
fe3e6c6aabde5765f19d044b24f5c4412d79c637
README.md
README.md
Rahani ====== Rahani is a Free and Open Source personal finance management tool. The aim of this project is to create a stable, FOSS alternative to [Xero Personal](https://www.xero.com/personal/) which is being [shut down](http://blog.xero.com/2013/08/winding-down-xero-personal-in-november-2014/) in november 2014. License ------- Copyright 2013, Kale Worsley. Rahani is made available under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
Rahani [![Build Status](https://travis-ci.org/kaleworsley/rahani.png?branch=master)](https://travis-ci.org/kaleworsley/rahani) [![Code Climate](https://codeclimate.com/github/kaleworsley/rahani.png)](https://codeclimate.com/github/kaleworsley/rahani) ====== Rahani is a Free and Open Source personal finance management tool. The aim of this project is to create a stable, FOSS alternative to [Xero Personal](https://www.xero.com/personal/) which is being [shut down](http://blog.xero.com/2013/08/winding-down-xero-personal-in-november-2014/) in november 2014. License ------- Copyright 2013, Kale Worsley. Rahani is made available under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
Add travis-ci and code climate status badges.
Add travis-ci and code climate status badges.
Markdown
apache-2.0
dotledger/dotledger,dotledger/dotledger,pipeline/dotledger,dotledger/dotledger,pipeline/dotledger,pipeline/dotledger,malclocke/dotledger,amorphid/dotledger,malclocke/dotledger,malclocke/dotledger,dotledger/dotledger,amorphid/dotledger,amorphid/dotledger
markdown
## Code Before: Rahani ====== Rahani is a Free and Open Source personal finance management tool. The aim of this project is to create a stable, FOSS alternative to [Xero Personal](https://www.xero.com/personal/) which is being [shut down](http://blog.xero.com/2013/08/winding-down-xero-personal-in-november-2014/) in november 2014. License ------- Copyright 2013, Kale Worsley. Rahani is made available under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details. ## Instruction: Add travis-ci and code climate status badges. ## Code After: Rahani [![Build Status](https://travis-ci.org/kaleworsley/rahani.png?branch=master)](https://travis-ci.org/kaleworsley/rahani) [![Code Climate](https://codeclimate.com/github/kaleworsley/rahani.png)](https://codeclimate.com/github/kaleworsley/rahani) ====== Rahani is a Free and Open Source personal finance management tool. The aim of this project is to create a stable, FOSS alternative to [Xero Personal](https://www.xero.com/personal/) which is being [shut down](http://blog.xero.com/2013/08/winding-down-xero-personal-in-november-2014/) in november 2014. License ------- Copyright 2013, Kale Worsley. Rahani is made available under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
- Rahani + Rahani [![Build Status](https://travis-ci.org/kaleworsley/rahani.png?branch=master)](https://travis-ci.org/kaleworsley/rahani) [![Code Climate](https://codeclimate.com/github/kaleworsley/rahani.png)](https://codeclimate.com/github/kaleworsley/rahani) ====== Rahani is a Free and Open Source personal finance management tool. The aim of this project is to create a stable, FOSS alternative to [Xero Personal](https://www.xero.com/personal/) which is being [shut down](http://blog.xero.com/2013/08/winding-down-xero-personal-in-november-2014/) in november 2014. License ------- Copyright 2013, Kale Worsley. Rahani is made available under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
2
0.142857
1
1
e2401fa11a20ba48edd3bcfde60777dbe1a0d423
index.html
index.html
--- --- <html> <head> <title>{{ site.title }}</title> </head> <body> <p>Last updated: {{ site.time | date: "%B %-d %Y %R" }}</p> {% for post in site.posts %} <p> <a href="{{ post.url | prepend: site.baseurl }}" target="_blank">{{ post.date | date: "%B %-d, %Y" }} - {{ post.title }}</a> </p> {% endfor %} </body> </html>
--- --- <html> <head> <title>{{ site.title }}</title> </head> <body> <p>Last updated: {{ site.time | date: "%B %-d %Y %R" }}</p> <h2>Variable sheets</h2> {% for post in site.posts %} <p> <a href="{{ post.url | prepend: site.baseurl }}" target="_blank">{{ post.date | date: "%B %-d, %Y" }} - {{ post.title }}</a> </p> {% endfor %} <h2>PDFs</h2> <p>Click a link below to view/download a PDF for the matching date.</p> {% for item in site.static_files %} {% if item.extname == '.pdf' %} <p><a href="{{ item.path | prepend: site.baseurl }}">{{ item.path | remove:'/pdfs/' | remove:'.pdf' }}</a></p> </body> </html>
Add code to output PDF links
Add code to output PDF links
HTML
mit
JPry/choir-guides,JPry/choir-guides,JPry/choir-guides
html
## Code Before: --- --- <html> <head> <title>{{ site.title }}</title> </head> <body> <p>Last updated: {{ site.time | date: "%B %-d %Y %R" }}</p> {% for post in site.posts %} <p> <a href="{{ post.url | prepend: site.baseurl }}" target="_blank">{{ post.date | date: "%B %-d, %Y" }} - {{ post.title }}</a> </p> {% endfor %} </body> </html> ## Instruction: Add code to output PDF links ## Code After: --- --- <html> <head> <title>{{ site.title }}</title> </head> <body> <p>Last updated: {{ site.time | date: "%B %-d %Y %R" }}</p> <h2>Variable sheets</h2> {% for post in site.posts %} <p> <a href="{{ post.url | prepend: site.baseurl }}" target="_blank">{{ post.date | date: "%B %-d, %Y" }} - {{ post.title }}</a> </p> {% endfor %} <h2>PDFs</h2> <p>Click a link below to view/download a PDF for the matching date.</p> {% for item in site.static_files %} {% if item.extname == '.pdf' %} <p><a href="{{ item.path | prepend: site.baseurl }}">{{ item.path | remove:'/pdfs/' | remove:'.pdf' }}</a></p> </body> </html>
--- --- <html> <head> <title>{{ site.title }}</title> </head> <body> <p>Last updated: {{ site.time | date: "%B %-d %Y %R" }}</p> + <h2>Variable sheets</h2> + {% for post in site.posts %} <p> <a href="{{ post.url | prepend: site.baseurl }}" target="_blank">{{ post.date | date: "%B %-d, %Y" }} - {{ post.title }}</a> </p> {% endfor %} + <h2>PDFs</h2> + + <p>Click a link below to view/download a PDF for the matching date.</p> + + {% for item in site.static_files %} + {% if item.extname == '.pdf' %} + + <p><a href="{{ item.path | prepend: site.baseurl }}">{{ item.path | remove:'/pdfs/' | remove:'.pdf' }}</a></p> + </body> </html>
11
0.52381
11
0
7c744d0d6f3947033aae80951ba1539b0e174732
.github/workflows/maven-release.yml
.github/workflows/maven-release.yml
name: Publish package to the Maven Central Repository on: release: types: [ created ] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
name: Publish package to the Maven Central Repository on: release: types: [ created ] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package run: mvn --batch-mode -P release -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
Use release profile in release action
Use release profile in release action
YAML
bsd-3-clause
koraktor/mavanagaiata
yaml
## Code Before: name: Publish package to the Maven Central Repository on: release: types: [ created ] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} ## Instruction: Use release profile in release action ## Code After: name: Publish package to the Maven Central Repository on: release: types: [ created ] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package run: mvn --batch-mode -P release -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
name: Publish package to the Maven Central Repository on: release: types: [ created ] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package - run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy + run: mvn --batch-mode -P release -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy ? +++++++++++ env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
2
0.064516
1
1
a0f8b9661c543a5e4844dfb45b307bef2ea3b1b6
build/new-jenkins/linters/run-gergich-yarn.sh
build/new-jenkins/linters/run-gergich-yarn.sh
set -ex read -r -a PLUGINS_LIST_ARR <<< "$PLUGINS_LIST" rm -rf $(printf 'gems/plugins/%s ' "${PLUGINS_LIST_ARR[@]}") export DISABLE_POSTINSTALL=1 yarn install --ignore-optional || yarn install --ignore-optional --network-concurrency 1 if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be checked in. Make sure you run 'yarn install' without private canvas-lms plugins installed." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" else yarn dedupe-yarn if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be de-duplicated. Make sure you run 'yarn dedupe-yarn'." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" fi fi gergich status echo "YARN_LOCK OK!"
set -ex if [ -z "$SKIP_YARN" ]; then read -r -a PLUGINS_LIST_ARR <<< "$PLUGINS_LIST" rm -rf $(printf 'gems/plugins/%s ' "${PLUGINS_LIST_ARR[@]}") export DISABLE_POSTINSTALL=1 yarn install --ignore-optional || yarn install --ignore-optional --network-concurrency 1 fi if ! git diff --exit-code yarn.lock; then # # Put yarn.lock diff into the build output # git --no-pager diff yarn.lock # # Put yarn.lock diff into the Gergich message # diff="$(git diff yarn.lock)" diff="\n\n\`\`\`\n$diff\n\`\`\`" diff=${diff//$'\n'/'\n'} diff=${diff//$'"'/'\"'} message="yarn.lock changes need to be checked in. Make sure you run 'yarn install' without private canvas-lms plugins installed." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message$diff\"}" else yarn dedupe-yarn if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be de-duplicated. Make sure you run 'yarn dedupe-yarn'." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" fi fi gergich status echo "YARN_LOCK OK!"
Make Gergich give better information about yarn.lock differences
Make Gergich give better information about yarn.lock differences Thought it might be helpful for Gergich to provide diffs on the yarn.lock file so we can have a better idea what we have installed that doesn't belong in "vanilla" Canvas. flag=none test plan none, but see the lint-review -2 comment on g/287836 for an example of what the output looks like Change-Id: I238cb3d7b1b14262313037bdb49a574b4c1f5df4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286910 Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com> Reviewed-by: James Butters <4c5a489c9bb72d41f20b3b22aaf4c9b864e32f20@instructure.com> Reviewed-by: Gonzalo Penaranda <8c432dde3e94facf86654413d4aff3fa9eced8f8@instructure.com> Product-Review: Jon Scheiding <9af6aa5061dd5eef0e85122953253a66930fcf3e@instructure.com> QA-Review: Gonzalo Penaranda <8c432dde3e94facf86654413d4aff3fa9eced8f8@instructure.com>
Shell
agpl-3.0
sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms
shell
## Code Before: set -ex read -r -a PLUGINS_LIST_ARR <<< "$PLUGINS_LIST" rm -rf $(printf 'gems/plugins/%s ' "${PLUGINS_LIST_ARR[@]}") export DISABLE_POSTINSTALL=1 yarn install --ignore-optional || yarn install --ignore-optional --network-concurrency 1 if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be checked in. Make sure you run 'yarn install' without private canvas-lms plugins installed." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" else yarn dedupe-yarn if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be de-duplicated. Make sure you run 'yarn dedupe-yarn'." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" fi fi gergich status echo "YARN_LOCK OK!" ## Instruction: Make Gergich give better information about yarn.lock differences Thought it might be helpful for Gergich to provide diffs on the yarn.lock file so we can have a better idea what we have installed that doesn't belong in "vanilla" Canvas. flag=none test plan none, but see the lint-review -2 comment on g/287836 for an example of what the output looks like Change-Id: I238cb3d7b1b14262313037bdb49a574b4c1f5df4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286910 Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com> Reviewed-by: James Butters <4c5a489c9bb72d41f20b3b22aaf4c9b864e32f20@instructure.com> Reviewed-by: Gonzalo Penaranda <8c432dde3e94facf86654413d4aff3fa9eced8f8@instructure.com> Product-Review: Jon Scheiding <9af6aa5061dd5eef0e85122953253a66930fcf3e@instructure.com> QA-Review: Gonzalo Penaranda <8c432dde3e94facf86654413d4aff3fa9eced8f8@instructure.com> ## Code After: set -ex if [ -z "$SKIP_YARN" ]; then read -r -a PLUGINS_LIST_ARR <<< "$PLUGINS_LIST" rm -rf $(printf 'gems/plugins/%s ' "${PLUGINS_LIST_ARR[@]}") export DISABLE_POSTINSTALL=1 yarn install --ignore-optional || yarn install --ignore-optional --network-concurrency 1 fi if ! git diff --exit-code yarn.lock; then # # Put yarn.lock diff into the build output # git --no-pager diff yarn.lock # # Put yarn.lock diff into the Gergich message # diff="$(git diff yarn.lock)" diff="\n\n\`\`\`\n$diff\n\`\`\`" diff=${diff//$'\n'/'\n'} diff=${diff//$'"'/'\"'} message="yarn.lock changes need to be checked in. Make sure you run 'yarn install' without private canvas-lms plugins installed." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message$diff\"}" else yarn dedupe-yarn if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be de-duplicated. Make sure you run 'yarn dedupe-yarn'." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" fi fi gergich status echo "YARN_LOCK OK!"
set -ex + if [ -z "$SKIP_YARN" ]; then - read -r -a PLUGINS_LIST_ARR <<< "$PLUGINS_LIST" + read -r -a PLUGINS_LIST_ARR <<< "$PLUGINS_LIST" ? ++ - rm -rf $(printf 'gems/plugins/%s ' "${PLUGINS_LIST_ARR[@]}") + rm -rf $(printf 'gems/plugins/%s ' "${PLUGINS_LIST_ARR[@]}") ? ++ - export DISABLE_POSTINSTALL=1 + export DISABLE_POSTINSTALL=1 ? ++ - yarn install --ignore-optional || yarn install --ignore-optional --network-concurrency 1 + yarn install --ignore-optional || yarn install --ignore-optional --network-concurrency 1 ? ++ + fi if ! git diff --exit-code yarn.lock; then + # + # Put yarn.lock diff into the build output + # + git --no-pager diff yarn.lock + + # + # Put yarn.lock diff into the Gergich message + # + diff="$(git diff yarn.lock)" + diff="\n\n\`\`\`\n$diff\n\`\`\`" + diff=${diff//$'\n'/'\n'} + diff=${diff//$'"'/'\"'} + message="yarn.lock changes need to be checked in. Make sure you run 'yarn install' without private canvas-lms plugins installed." - gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" + gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message$diff\"}" ? +++++ else yarn dedupe-yarn if ! git diff --exit-code yarn.lock; then message="yarn.lock changes need to be de-duplicated. Make sure you run 'yarn dedupe-yarn'." gergich comment "{\"path\":\"yarn.lock\",\"position\":1,\"severity\":\"error\",\"message\":\"$message\"}" fi fi gergich status echo "YARN_LOCK OK!"
25
1.086957
20
5
e7b9343b03d76a061a90370f012b8f733a01d5ca
ioslides_template/README.md
ioslides_template/README.md
This presentation is a ioslides template See it in action at (URL)
This presentation is a ioslides template See it in action at (URL) ## ToDo ## ToRead ## Exercise ## Homework ## `misc`
Update ioslides readme for lectures
Update ioslides readme for lectures
Markdown
cc0-1.0
mdozmorov/presentations
markdown
## Code Before: This presentation is a ioslides template See it in action at (URL) ## Instruction: Update ioslides readme for lectures ## Code After: This presentation is a ioslides template See it in action at (URL) ## ToDo ## ToRead ## Exercise ## Homework ## `misc`
This presentation is a ioslides template See it in action at (URL) + + ## ToDo + + ## ToRead + + ## Exercise + + ## Homework + + ## `misc` +
11
3.666667
11
0
f6ff9a08ea051d522ef2b8502a1dd2cbdb1c5039
src/main/java/seedu/address/logic/commands/UndoCommand.java
src/main/java/seedu/address/logic/commands/UndoCommand.java
package seedu.address.logic.commands; public class UndoCommand extends Command { public static final String COMMAND_WORD = "undo"; public static final String MESSAGE_USAGE = COMMAND_WORD; public static final String MESSAGE_SUCCESS = "Successfully undo previous change"; public static final String MESSAGE_NO_CHANGE = "No change to be undone"; /** * Default empty constructor. */ public UndoCommand() { } public CommandResult execute() { if (!model.getFlag().equals("undo copy")) { return new CommandResult(MESSAGE_NO_CHANGE); } else { model.resetData(model.getCopy()); model.clearCopy(); model.updateFlag("empty copy"); return new CommandResult(MESSAGE_SUCCESS); } } }
package seedu.address.logic.commands; public class UndoCommand extends Command { public static final String COMMAND_WORD = "undo"; public static final String MESSAGE_USAGE = COMMAND_WORD; public static final String MESSAGE_SUCCESS = "Successfully undo previous change"; public static final String MESSAGE_NO_CHANGE = "No change to be undone"; /** * Default empty constructor. */ public UndoCommand() { } public CommandResult execute() { if (!model.getFlag().equals("undo copy")) { return new CommandResult(MESSAGE_NO_CHANGE); } else { model.resetData(model.getCopy()); model.updateFlag("empty copy"); return new CommandResult(MESSAGE_SUCCESS); } } }
Remove unnecessary method calls in undo command
Remove unnecessary method calls in undo command
Java
mit
CS2103JAN2017-W13-B2/main,CS2103JAN2017-W13-B2/main
java
## Code Before: package seedu.address.logic.commands; public class UndoCommand extends Command { public static final String COMMAND_WORD = "undo"; public static final String MESSAGE_USAGE = COMMAND_WORD; public static final String MESSAGE_SUCCESS = "Successfully undo previous change"; public static final String MESSAGE_NO_CHANGE = "No change to be undone"; /** * Default empty constructor. */ public UndoCommand() { } public CommandResult execute() { if (!model.getFlag().equals("undo copy")) { return new CommandResult(MESSAGE_NO_CHANGE); } else { model.resetData(model.getCopy()); model.clearCopy(); model.updateFlag("empty copy"); return new CommandResult(MESSAGE_SUCCESS); } } } ## Instruction: Remove unnecessary method calls in undo command ## Code After: package seedu.address.logic.commands; public class UndoCommand extends Command { public static final String COMMAND_WORD = "undo"; public static final String MESSAGE_USAGE = COMMAND_WORD; public static final String MESSAGE_SUCCESS = "Successfully undo previous change"; public static final String MESSAGE_NO_CHANGE = "No change to be undone"; /** * Default empty constructor. */ public UndoCommand() { } public CommandResult execute() { if (!model.getFlag().equals("undo copy")) { return new CommandResult(MESSAGE_NO_CHANGE); } else { model.resetData(model.getCopy()); model.updateFlag("empty copy"); return new CommandResult(MESSAGE_SUCCESS); } } }
package seedu.address.logic.commands; public class UndoCommand extends Command { public static final String COMMAND_WORD = "undo"; public static final String MESSAGE_USAGE = COMMAND_WORD; public static final String MESSAGE_SUCCESS = "Successfully undo previous change"; public static final String MESSAGE_NO_CHANGE = "No change to be undone"; /** * Default empty constructor. */ public UndoCommand() { } public CommandResult execute() { if (!model.getFlag().equals("undo copy")) { return new CommandResult(MESSAGE_NO_CHANGE); } else { model.resetData(model.getCopy()); - model.clearCopy(); model.updateFlag("empty copy"); return new CommandResult(MESSAGE_SUCCESS); } } }
1
0.038462
0
1
24821b5195d25be204d46971aaa1e5dd5af83477
tests/CMakeLists.txt
tests/CMakeLists.txt
file(GLOB TEST_SOURCE_PATHS "*.cpp") foreach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS}) get_filename_component(TEST_SOURCE_NAME ${TEST_SOURCE_PATH} NAME) string(REPLACE ".cpp" "" TEST_NAME ${TEST_SOURCE_NAME}) add_executable(${TEST_NAME} ${TEST_SOURCE_PATH}) target_link_libraries(${TEST_NAME} PRIVATE autocheck::autocheck) target_link_libraries(${TEST_NAME} PRIVATE GTest::Main) add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME}) endforeach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS})
function(add_test_from_target TARGET) add_test( NAME ${TARGET}_build COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${TARGET} ) add_test(NAME ${TARGET} COMMAND ${TARGET}) set_tests_properties(${TARGET} PROPERTIES DEPENDS ${TARGET}_build) endfunction(add_test_from_target TARGET) # file(GLOB TEST_SOURCE_PATHS "*.cpp" CONFIGURE_DEPENDS) file(GLOB TEST_SOURCE_PATHS "*.cpp") foreach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS}) get_filename_component(TEST_SOURCE_NAME ${TEST_SOURCE_PATH} NAME) string(REPLACE ".cpp" "" TARGET ${TEST_SOURCE_NAME}) add_executable(${TARGET} EXCLUDE_FROM_ALL ${TEST_SOURCE_PATH}) target_link_libraries(${TARGET} PRIVATE autocheck::autocheck) target_link_libraries(${TARGET} PRIVATE GTest::Main) add_test_from_target(${TARGET}) endforeach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS})
Build tests only for ctest
Build tests only for ctest
Text
isc
thejohnfreeman/autocheck,thejohnfreeman/autocheck
text
## Code Before: file(GLOB TEST_SOURCE_PATHS "*.cpp") foreach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS}) get_filename_component(TEST_SOURCE_NAME ${TEST_SOURCE_PATH} NAME) string(REPLACE ".cpp" "" TEST_NAME ${TEST_SOURCE_NAME}) add_executable(${TEST_NAME} ${TEST_SOURCE_PATH}) target_link_libraries(${TEST_NAME} PRIVATE autocheck::autocheck) target_link_libraries(${TEST_NAME} PRIVATE GTest::Main) add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME}) endforeach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS}) ## Instruction: Build tests only for ctest ## Code After: function(add_test_from_target TARGET) add_test( NAME ${TARGET}_build COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${TARGET} ) add_test(NAME ${TARGET} COMMAND ${TARGET}) set_tests_properties(${TARGET} PROPERTIES DEPENDS ${TARGET}_build) endfunction(add_test_from_target TARGET) # file(GLOB TEST_SOURCE_PATHS "*.cpp" CONFIGURE_DEPENDS) file(GLOB TEST_SOURCE_PATHS "*.cpp") foreach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS}) get_filename_component(TEST_SOURCE_NAME ${TEST_SOURCE_PATH} NAME) string(REPLACE ".cpp" "" TARGET ${TEST_SOURCE_NAME}) add_executable(${TARGET} EXCLUDE_FROM_ALL ${TEST_SOURCE_PATH}) target_link_libraries(${TARGET} PRIVATE autocheck::autocheck) target_link_libraries(${TARGET} PRIVATE GTest::Main) add_test_from_target(${TARGET}) endforeach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS})
+ function(add_test_from_target TARGET) + add_test( + NAME ${TARGET}_build + COMMAND + ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${TARGET} + ) + add_test(NAME ${TARGET} COMMAND ${TARGET}) + set_tests_properties(${TARGET} PROPERTIES DEPENDS ${TARGET}_build) + endfunction(add_test_from_target TARGET) + + # file(GLOB TEST_SOURCE_PATHS "*.cpp" CONFIGURE_DEPENDS) file(GLOB TEST_SOURCE_PATHS "*.cpp") foreach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS}) get_filename_component(TEST_SOURCE_NAME ${TEST_SOURCE_PATH} NAME) - string(REPLACE ".cpp" "" TEST_NAME ${TEST_SOURCE_NAME}) ? - ----- + string(REPLACE ".cpp" "" TARGET ${TEST_SOURCE_NAME}) ? +++ - add_executable(${TEST_NAME} ${TEST_SOURCE_PATH}) ? - ^ ^^^ + add_executable(${TARGET} EXCLUDE_FROM_ALL ${TEST_SOURCE_PATH}) ? +++ +++++++++ ^^^^^ ^^ - target_link_libraries(${TEST_NAME} PRIVATE autocheck::autocheck) ? - ----- + target_link_libraries(${TARGET} PRIVATE autocheck::autocheck) ? +++ - target_link_libraries(${TEST_NAME} PRIVATE GTest::Main) ? - ----- + target_link_libraries(${TARGET} PRIVATE GTest::Main) ? +++ - add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME}) + add_test_from_target(${TARGET}) endforeach(TEST_SOURCE_PATH ${TEST_SOURCE_PATHS})
21
2.333333
16
5
37fdbd56a6601848536f2a5ca64d66cf4aa3717a
cu-manager/src/main/java/fr/treeptik/cloudunit/hooks/HookAction.java
cu-manager/src/main/java/fr/treeptik/cloudunit/hooks/HookAction.java
package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh"), APPLICATION_PRE_START("Application pre start", "/cloudunit/appconf/hooks/application-pre-start.sh"), APPLICATION_PRE_STOP("Application pre stop", "/cloudunit/appconf/hooks/application-pre-stop.sh"); private final String label; private final String command; HookAction(String label, String command) { this.label = label; this.command = command; } public String getLabel() { return label; } public String[] getCommand() { String[] commandBash = new String[2]; commandBash[0] = "bash"; commandBash[1] = command; return commandBash; } }
package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh"), APPLICATION_PRE_START("Application pre start", "/cloudunit/appconf/hooks/application-pre-start.sh"), APPLICATION_PRE_STOP("Application pre stop", "/cloudunit/appconf/hooks/application-pre-stop.sh"), SNAPSHOT_PRE_ACTION("Before Snapshot", "/cloudunit/appconf/hooks/snapshot-pre-action.sh"), SNAPSHOT_POST_ACTION("After Snapshot", "/cloudunit/appconf/hooks/snapshot-post-action.sh"), CLONE_PRE_ACTION("Before restoring an application", "/cloudunit/appconf/hooks/clone-pre-action.sh"), CLONE_POST_ACTION("After restoring an application", "/cloudunit/appconf/hooks/clone-post-action.sh"); private final String label; private final String command; HookAction(String label, String command) { this.label = label; this.command = command; } public String getLabel() { return label; } public String[] getCommand() { String[] commandBash = new String[2]; commandBash[0] = "bash"; commandBash[1] = command; return commandBash; } }
Add new Hooks. Not yet called into code
Add new Hooks. Not yet called into code
Java
agpl-3.0
Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit,Treeptik/cloudunit
java
## Code Before: package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh"), APPLICATION_PRE_START("Application pre start", "/cloudunit/appconf/hooks/application-pre-start.sh"), APPLICATION_PRE_STOP("Application pre stop", "/cloudunit/appconf/hooks/application-pre-stop.sh"); private final String label; private final String command; HookAction(String label, String command) { this.label = label; this.command = command; } public String getLabel() { return label; } public String[] getCommand() { String[] commandBash = new String[2]; commandBash[0] = "bash"; commandBash[1] = command; return commandBash; } } ## Instruction: Add new Hooks. Not yet called into code ## Code After: package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh"), APPLICATION_PRE_START("Application pre start", "/cloudunit/appconf/hooks/application-pre-start.sh"), APPLICATION_PRE_STOP("Application pre stop", "/cloudunit/appconf/hooks/application-pre-stop.sh"), SNAPSHOT_PRE_ACTION("Before Snapshot", "/cloudunit/appconf/hooks/snapshot-pre-action.sh"), SNAPSHOT_POST_ACTION("After Snapshot", "/cloudunit/appconf/hooks/snapshot-post-action.sh"), CLONE_PRE_ACTION("Before restoring an application", "/cloudunit/appconf/hooks/clone-pre-action.sh"), CLONE_POST_ACTION("After restoring an application", "/cloudunit/appconf/hooks/clone-post-action.sh"); private final String label; private final String command; HookAction(String label, String command) { this.label = label; this.command = command; } public String getLabel() { return label; } public String[] getCommand() { String[] commandBash = new String[2]; commandBash[0] = "bash"; commandBash[1] = command; return commandBash; } }
package fr.treeptik.cloudunit.hooks; /** * Created by nicolas on 19/04/2016. */ public enum HookAction { APPLICATION_POST_START("Application post start", "/cloudunit/appconf/hooks/application-post-start.sh"), APPLICATION_POST_STOP("Application post stop", "/cloudunit/appconf/hooks/application-post-stop.sh"), APPLICATION_PRE_START("Application pre start", "/cloudunit/appconf/hooks/application-pre-start.sh"), - APPLICATION_PRE_STOP("Application pre stop", "/cloudunit/appconf/hooks/application-pre-stop.sh"); ? ^ + APPLICATION_PRE_STOP("Application pre stop", "/cloudunit/appconf/hooks/application-pre-stop.sh"), ? ^ + SNAPSHOT_PRE_ACTION("Before Snapshot", "/cloudunit/appconf/hooks/snapshot-pre-action.sh"), + SNAPSHOT_POST_ACTION("After Snapshot", "/cloudunit/appconf/hooks/snapshot-post-action.sh"), + CLONE_PRE_ACTION("Before restoring an application", "/cloudunit/appconf/hooks/clone-pre-action.sh"), + CLONE_POST_ACTION("After restoring an application", "/cloudunit/appconf/hooks/clone-post-action.sh"); private final String label; private final String command; HookAction(String label, String command) { this.label = label; this.command = command; } public String getLabel() { return label; } public String[] getCommand() { String[] commandBash = new String[2]; commandBash[0] = "bash"; commandBash[1] = command; return commandBash; } }
6
0.193548
5
1
d76c9f1d96d838472d3eb7b6476c487f2f8e339d
.github/workflows/trivy-code-scanning.yml
.github/workflows/trivy-code-scanning.yml
name: "Trivy Code Scanning" on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '27 1 * * 4' jobs: Trivy-Scan: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Build an image from Dockerfile run: | docker build --target newrelic -t "openedx/edx-notes-api:latest-newrelic" . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: image-ref: 'openedx/edx-notes-api:latest-newrelic' format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: sarif_file: 'trivy-results.sarif'
name: "Trivy Code Scanning" on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '27 1 * * 4' jobs: Trivy-Scan: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Build an image from Dockerfile run: | docker build --target newrelic -t "openedx/edx-notes-api:latest" . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: image-ref: 'openedx/edx-notes-api:latest' format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: sarif_file: 'trivy-results.sarif'
Fix trivvy codescanner to use the latest tag
Fix trivvy codescanner to use the latest tag
YAML
agpl-3.0
edx/edx-notes-api,edx/edx-notes-api
yaml
## Code Before: name: "Trivy Code Scanning" on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '27 1 * * 4' jobs: Trivy-Scan: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Build an image from Dockerfile run: | docker build --target newrelic -t "openedx/edx-notes-api:latest-newrelic" . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: image-ref: 'openedx/edx-notes-api:latest-newrelic' format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: sarif_file: 'trivy-results.sarif' ## Instruction: Fix trivvy codescanner to use the latest tag ## Code After: name: "Trivy Code Scanning" on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '27 1 * * 4' jobs: Trivy-Scan: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Build an image from Dockerfile run: | docker build --target newrelic -t "openedx/edx-notes-api:latest" . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: image-ref: 'openedx/edx-notes-api:latest' format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: sarif_file: 'trivy-results.sarif'
name: "Trivy Code Scanning" on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '27 1 * * 4' jobs: Trivy-Scan: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Build an image from Dockerfile run: | - docker build --target newrelic -t "openedx/edx-notes-api:latest-newrelic" . ? --------- + docker build --target newrelic -t "openedx/edx-notes-api:latest" . - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: 'openedx/edx-notes-api:latest-newrelic' ? --------- + image-ref: 'openedx/edx-notes-api:latest' format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: sarif_file: 'trivy-results.sarif'
4
0.121212
2
2
1b4f5e38cec3230a620db3e3ab8bbf65bf8efbc1
src/applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php
src/applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php
<?php final class DiffusionHovercardEngineExtension extends PhabricatorHovercardEngineExtension { const EXTENSIONKEY = 'diffusion'; public function isExtensionEnabled() { return PhabricatorApplication::isClassInstalled( 'PhabricatorDiffusionApplication'); } public function getExtensionName() { return pht('Diffusion Commits'); } public function canRenderObjectHovercard($object) { return ($object instanceof PhabricatorRepositoryCommit); } public function renderHovercard( PhabricatorHovercardView $hovercard, PhabricatorObjectHandle $handle, $commit, $data) { $viewer = $this->getViewer(); $author_phid = $commit->getAuthorPHID(); if ($author_phid) { $author = $viewer->loadHandle($author)->renderLink(); } else { $commit_data = $commit->loadCommitData(); $author = phutil_tag('em', array(), $commit_data->getAuthorName()); } $hovercard->setTitle($handle->getName()); $hovercard->setDetail($commit->getSummary()); $hovercard->addField(pht('Author'), $author); $hovercard->addField(pht('Date'), phabricator_date($commit->getEpoch(), $viewer)); if ($commit->getAuditStatus() != PhabricatorAuditCommitStatusConstants::NONE) { $hovercard->addField(pht('Audit Status'), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus())); } } }
<?php final class DiffusionHovercardEngineExtension extends PhabricatorHovercardEngineExtension { const EXTENSIONKEY = 'diffusion'; public function isExtensionEnabled() { return PhabricatorApplication::isClassInstalled( 'PhabricatorDiffusionApplication'); } public function getExtensionName() { return pht('Diffusion Commits'); } public function canRenderObjectHovercard($object) { return ($object instanceof PhabricatorRepositoryCommit); } public function renderHovercard( PhabricatorHovercardView $hovercard, PhabricatorObjectHandle $handle, $commit, $data) { $viewer = $this->getViewer(); $author_phid = $commit->getAuthorPHID(); if ($author_phid) { $author = $viewer->renderHandle($author_phid); } else { $commit_data = $commit->loadCommitData(); $author = phutil_tag('em', array(), $commit_data->getAuthorName()); } $hovercard->setTitle($handle->getName()); $hovercard->setDetail($commit->getSummary()); $hovercard->addField(pht('Author'), $author); $hovercard->addField(pht('Date'), phabricator_date($commit->getEpoch(), $viewer)); if ($commit->getAuditStatus() != PhabricatorAuditCommitStatusConstants::NONE) { $hovercard->addField(pht('Audit Status'), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus())); } } }
Fix an issue with rendering some commit hovercards
Fix an issue with rendering some commit hovercards Summary: This logic wasn't quite right. Test Plan: Hovered over a recognized commit, got a valid hovercard Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D14925
PHP
apache-2.0
hach-que/phabricator,cjxgm/p.cjprods.org,huangjimmy/phabricator-1,tanglu-org/tracker-phabricator,aik099/phabricator,kanarip/phabricator,Khan/phabricator,Automatic/phabricator,Soluis/phabricator,phacility/phabricator,folsom-labs/phabricator,aik099/phabricator,wikimedia/phabricator,vinzent/phabricator,devurandom/phabricator,wikimedia/phabricator-phabricator,Soluis/phabricator,freebsd/phabricator,folsom-labs/phabricator,phacility/phabricator,kanarip/phabricator,phacility/phabricator,phacility/phabricator,Khan/phabricator,Soluis/phabricator,gsinkovskiy/phabricator,r4nt/phabricator,dannysu/phabricator,dannysu/phabricator,dannysu/phabricator,devurandom/phabricator,uhd-urz/phabricator,huangjimmy/phabricator-1,benchling/phabricator,Soluis/phabricator,Khan/phabricator,tanglu-org/tracker-phabricator,freebsd/phabricator,wikimedia/phabricator,benchling/phabricator,kanarip/phabricator,benchling/phabricator,tanglu-org/tracker-phabricator,hach-que/phabricator,MicroWorldwide/phabricator,huangjimmy/phabricator-1,huangjimmy/phabricator-1,r4nt/phabricator,huangjimmy/phabricator-1,gsinkovskiy/phabricator,vinzent/phabricator,kanarip/phabricator,r4nt/phabricator,freebsd/phabricator,r4nt/phabricator,r4nt/phabricator,Automatic/phabricator,hach-que/phabricator,devurandom/phabricator,cjxgm/p.cjprods.org,cjxgm/p.cjprods.org,wikimedia/phabricator-phabricator,hach-que/phabricator,Automatic/phabricator,Khan/phabricator,devurandom/phabricator,folsom-labs/phabricator,MicroWorldwide/phabricator,aik099/phabricator,uhd-urz/phabricator,wikimedia/phabricator,vinzent/phabricator,aik099/phabricator,gsinkovskiy/phabricator,folsom-labs/phabricator,wikimedia/phabricator-phabricator,gsinkovskiy/phabricator,vinzent/phabricator,uhd-urz/phabricator,Soluis/phabricator,vinzent/phabricator,wikimedia/phabricator,kanarip/phabricator,MicroWorldwide/phabricator,benchling/phabricator,devurandom/phabricator,MicroWorldwide/phabricator,tanglu-org/tracker-phabricator,cjxgm/p.cjprods.org,tanglu-org/tracker-phabricator,hach-que/phabricator,wikimedia/phabricator-phabricator,devurandom/phabricator,freebsd/phabricator,uhd-urz/phabricator,cjxgm/p.cjprods.org,folsom-labs/phabricator,uhd-urz/phabricator,wikimedia/phabricator-phabricator,Automatic/phabricator,dannysu/phabricator,dannysu/phabricator,gsinkovskiy/phabricator
php
## Code Before: <?php final class DiffusionHovercardEngineExtension extends PhabricatorHovercardEngineExtension { const EXTENSIONKEY = 'diffusion'; public function isExtensionEnabled() { return PhabricatorApplication::isClassInstalled( 'PhabricatorDiffusionApplication'); } public function getExtensionName() { return pht('Diffusion Commits'); } public function canRenderObjectHovercard($object) { return ($object instanceof PhabricatorRepositoryCommit); } public function renderHovercard( PhabricatorHovercardView $hovercard, PhabricatorObjectHandle $handle, $commit, $data) { $viewer = $this->getViewer(); $author_phid = $commit->getAuthorPHID(); if ($author_phid) { $author = $viewer->loadHandle($author)->renderLink(); } else { $commit_data = $commit->loadCommitData(); $author = phutil_tag('em', array(), $commit_data->getAuthorName()); } $hovercard->setTitle($handle->getName()); $hovercard->setDetail($commit->getSummary()); $hovercard->addField(pht('Author'), $author); $hovercard->addField(pht('Date'), phabricator_date($commit->getEpoch(), $viewer)); if ($commit->getAuditStatus() != PhabricatorAuditCommitStatusConstants::NONE) { $hovercard->addField(pht('Audit Status'), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus())); } } } ## Instruction: Fix an issue with rendering some commit hovercards Summary: This logic wasn't quite right. Test Plan: Hovered over a recognized commit, got a valid hovercard Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D14925 ## Code After: <?php final class DiffusionHovercardEngineExtension extends PhabricatorHovercardEngineExtension { const EXTENSIONKEY = 'diffusion'; public function isExtensionEnabled() { return PhabricatorApplication::isClassInstalled( 'PhabricatorDiffusionApplication'); } public function getExtensionName() { return pht('Diffusion Commits'); } public function canRenderObjectHovercard($object) { return ($object instanceof PhabricatorRepositoryCommit); } public function renderHovercard( PhabricatorHovercardView $hovercard, PhabricatorObjectHandle $handle, $commit, $data) { $viewer = $this->getViewer(); $author_phid = $commit->getAuthorPHID(); if ($author_phid) { $author = $viewer->renderHandle($author_phid); } else { $commit_data = $commit->loadCommitData(); $author = phutil_tag('em', array(), $commit_data->getAuthorName()); } $hovercard->setTitle($handle->getName()); $hovercard->setDetail($commit->getSummary()); $hovercard->addField(pht('Author'), $author); $hovercard->addField(pht('Date'), phabricator_date($commit->getEpoch(), $viewer)); if ($commit->getAuditStatus() != PhabricatorAuditCommitStatusConstants::NONE) { $hovercard->addField(pht('Audit Status'), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus())); } } }
<?php final class DiffusionHovercardEngineExtension extends PhabricatorHovercardEngineExtension { const EXTENSIONKEY = 'diffusion'; public function isExtensionEnabled() { return PhabricatorApplication::isClassInstalled( 'PhabricatorDiffusionApplication'); } public function getExtensionName() { return pht('Diffusion Commits'); } public function canRenderObjectHovercard($object) { return ($object instanceof PhabricatorRepositoryCommit); } public function renderHovercard( PhabricatorHovercardView $hovercard, PhabricatorObjectHandle $handle, $commit, $data) { $viewer = $this->getViewer(); $author_phid = $commit->getAuthorPHID(); if ($author_phid) { - $author = $viewer->loadHandle($author)->renderLink(); ? ^^^ ^^^^^^ ------- + $author = $viewer->renderHandle($author_phid); ? ^^^ ++ ^^^^ } else { $commit_data = $commit->loadCommitData(); $author = phutil_tag('em', array(), $commit_data->getAuthorName()); } $hovercard->setTitle($handle->getName()); $hovercard->setDetail($commit->getSummary()); $hovercard->addField(pht('Author'), $author); $hovercard->addField(pht('Date'), phabricator_date($commit->getEpoch(), $viewer)); if ($commit->getAuditStatus() != PhabricatorAuditCommitStatusConstants::NONE) { $hovercard->addField(pht('Audit Status'), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus())); } } }
2
0.037736
1
1
9357f0634ee57f837f3350b1011ee40dfdeca4d4
Casks/firefox-aurora.rb
Casks/firefox-aurora.rb
class FirefoxAurora < Cask version '35.0a2' sha256 'c27899ebdb9d3b44ccac8ad904a03b421b65208e66937c62d795aab1d0014999' url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-#{version}.en-US.mac.dmg" homepage 'https://www.mozilla.org/en-US/firefox/aurora/' license :oss app 'FirefoxAurora.app' end
class FirefoxAurora < Cask version :latest sha256 :no_check url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-35.0a2.en-US.mac.dmg" homepage 'https://www.mozilla.org/en-US/firefox/aurora/' license :oss app 'FirefoxAurora.app' end
Remove sha check and version from FirefoxAurora
Remove sha check and version from FirefoxAurora Sha is likely to change without notice even for the same dmg filename (was currently broken because of this)
Ruby
bsd-2-clause
invl/homebrew-versions,tomschlick/homebrew-versions,adjohnson916/homebrew-versions,dictcp/homebrew-versions,noamross/homebrew-versions,nicday/homebrew-versions,lukaselmer/homebrew-versions,3van/homebrew-versions,onewheelskyward/homebrew-versions,bimmlerd/homebrew-versions,visualphoenix/homebrew-versions,coeligena/homebrew-verscustomized,lukasbestle/homebrew-versions,deizel/homebrew-versions,zchee/homebrew-versions,elovelan/homebrew-versions,rkJun/homebrew-versions,pquentin/homebrew-versions,zsjohny/homebrew-versions,kstarsinic/homebrew-versions,chadcatlett/caskroom-homebrew-versions,n8henrie/homebrew-versions
ruby
## Code Before: class FirefoxAurora < Cask version '35.0a2' sha256 'c27899ebdb9d3b44ccac8ad904a03b421b65208e66937c62d795aab1d0014999' url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-#{version}.en-US.mac.dmg" homepage 'https://www.mozilla.org/en-US/firefox/aurora/' license :oss app 'FirefoxAurora.app' end ## Instruction: Remove sha check and version from FirefoxAurora Sha is likely to change without notice even for the same dmg filename (was currently broken because of this) ## Code After: class FirefoxAurora < Cask version :latest sha256 :no_check url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-35.0a2.en-US.mac.dmg" homepage 'https://www.mozilla.org/en-US/firefox/aurora/' license :oss app 'FirefoxAurora.app' end
class FirefoxAurora < Cask - version '35.0a2' - sha256 'c27899ebdb9d3b44ccac8ad904a03b421b65208e66937c62d795aab1d0014999' + version :latest + sha256 :no_check - url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-#{version}.en-US.mac.dmg" ? ^^^^^^^^^^ + url "https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-35.0a2.en-US.mac.dmg" ? ^^^^^^ homepage 'https://www.mozilla.org/en-US/firefox/aurora/' license :oss app 'FirefoxAurora.app' end
6
0.6
3
3
501fa4c901541088a705d177b733d091069139cc
app/views/spree/admin/shared/_order_sub_menu.html.erb
app/views/spree/admin/shared/_order_sub_menu.html.erb
<% content_for :sub_menu do %> <ul id="sub_nav" data-hook="admin_order_sub_tabs" class="inline-menu"> <%= tab :orders, :match_path => '/orders' %> <%= tab :bulk_order_management, :match_path => '/orders/bulk_management' %> <% if standing_orders_enabled? %> <%= tab :standing_orders, :match_path => '/standing_orders', url: main_app.admin_standing_orders_path %> <% end %> </ul> <% end %>
<% content_for :sub_menu do %> <ul id="sub_nav" data-hook="admin_order_sub_tabs" class="inline-menu"> <%= tab :orders, :match_path => '/orders' %> <%= tab :bulk_order_management, :match_path => '/orders/bulk_management' %> <% if subscriptions_enabled? %> <%= tab :subscriptions, :match_path => '/subscriptions', url: main_app.admin_subscriptions_path %> <% end %> </ul> <% end %>
Replace references to 'standing order' with 'subscription' (erb)
Replace references to 'standing order' with 'subscription' (erb)
HTML+ERB
agpl-3.0
oeoeaio/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,oeoeaio/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,oeoeaio/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,oeoeaio/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork
html+erb
## Code Before: <% content_for :sub_menu do %> <ul id="sub_nav" data-hook="admin_order_sub_tabs" class="inline-menu"> <%= tab :orders, :match_path => '/orders' %> <%= tab :bulk_order_management, :match_path => '/orders/bulk_management' %> <% if standing_orders_enabled? %> <%= tab :standing_orders, :match_path => '/standing_orders', url: main_app.admin_standing_orders_path %> <% end %> </ul> <% end %> ## Instruction: Replace references to 'standing order' with 'subscription' (erb) ## Code After: <% content_for :sub_menu do %> <ul id="sub_nav" data-hook="admin_order_sub_tabs" class="inline-menu"> <%= tab :orders, :match_path => '/orders' %> <%= tab :bulk_order_management, :match_path => '/orders/bulk_management' %> <% if subscriptions_enabled? %> <%= tab :subscriptions, :match_path => '/subscriptions', url: main_app.admin_subscriptions_path %> <% end %> </ul> <% end %>
<% content_for :sub_menu do %> <ul id="sub_nav" data-hook="admin_order_sub_tabs" class="inline-menu"> <%= tab :orders, :match_path => '/orders' %> <%= tab :bulk_order_management, :match_path => '/orders/bulk_management' %> - <% if standing_orders_enabled? %> - <%= tab :standing_orders, :match_path => '/standing_orders', url: main_app.admin_standing_orders_path %> + <% if subscriptions_enabled? %> + <%= tab :subscriptions, :match_path => '/subscriptions', url: main_app.admin_subscriptions_path %> <% end %> </ul> <% end %>
4
0.444444
2
2
f808e1dda87f67b9b1e5cf8fa724dd3c5287af0d
app/assets/javascripts/grade_list_table.js
app/assets/javascripts/grade_list_table.js
I.grade_list_table = (function () { function showMore(grade) { var table = $(".grade-table-"+grade); table.find("tr.show_more").hide(); table.find("tr.hidden_object").show(); } return { showMore: showMore }; }()); jQuery(function($) { $("a[data-show-more]").click(function(evt) { evt.preventDefault(); var grade = $(this).data('show-more'); I.grade_list_table.showMore(grade); return false; }); $("[data-toggle=tooltip]").tooltip({delay: { show: 300, hide: 100 }}); });
I.grade_list_table = (function () { function showMore(grade) { var table = $(".grade-table-"+grade); table.find("tr.show_more").hide(); table.find("tr.hidden_object").show(); } return { showMore: showMore }; }()); jQuery(function($) { $("body").on('click', 'a[data-show-more]', function(evt) { evt.preventDefault(); var grade = $(this).data('show-more'); I.grade_list_table.showMore(grade); return false; }); $("[data-toggle=tooltip]").tooltip({delay: { show: 300, hide: 100 }}); });
Fix show-more links not working after rebuild
Fix show-more links not working after rebuild
JavaScript
mit
inch-ci/inch_ci-web,inch-ci/inch_ci-web,inch-ci/inch_ci-web
javascript
## Code Before: I.grade_list_table = (function () { function showMore(grade) { var table = $(".grade-table-"+grade); table.find("tr.show_more").hide(); table.find("tr.hidden_object").show(); } return { showMore: showMore }; }()); jQuery(function($) { $("a[data-show-more]").click(function(evt) { evt.preventDefault(); var grade = $(this).data('show-more'); I.grade_list_table.showMore(grade); return false; }); $("[data-toggle=tooltip]").tooltip({delay: { show: 300, hide: 100 }}); }); ## Instruction: Fix show-more links not working after rebuild ## Code After: I.grade_list_table = (function () { function showMore(grade) { var table = $(".grade-table-"+grade); table.find("tr.show_more").hide(); table.find("tr.hidden_object").show(); } return { showMore: showMore }; }()); jQuery(function($) { $("body").on('click', 'a[data-show-more]', function(evt) { evt.preventDefault(); var grade = $(this).data('show-more'); I.grade_list_table.showMore(grade); return false; }); $("[data-toggle=tooltip]").tooltip({delay: { show: 300, hide: 100 }}); });
I.grade_list_table = (function () { function showMore(grade) { var table = $(".grade-table-"+grade); table.find("tr.show_more").hide(); table.find("tr.hidden_object").show(); } return { showMore: showMore }; }()); jQuery(function($) { - $("a[data-show-more]").click(function(evt) { + $("body").on('click', 'a[data-show-more]', function(evt) { evt.preventDefault(); var grade = $(this).data('show-more'); I.grade_list_table.showMore(grade); return false; }); $("[data-toggle=tooltip]").tooltip({delay: { show: 300, hide: 100 }}); });
2
0.086957
1
1
8364ac07cf7f17259bea941042f7b61b0c0b0b96
.travis.yml
.travis.yml
language: python python: - "2.7" before_install: - "sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable" - "sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/pcl" - "sudo apt-get update" - "pip install -U -q cython" - "export DEBIAN_FRONTEND=noninteractive" - "sudo apt-get -qq install libpcl-all python-matplotlib liblas-c2 python-liblas" - "pip install coverage" - "pip install -r requirements.txt" - "export PYTHONPATH=/usr/share/pyshared:$PYTHONPATH" install: - "echo done" # command to run tests, e.g. python setup.py test script: nosetests --with-coverage after_script: - "pip install scrutinizer-ocular" - "ocular"
language: python python: - "2.7" before_install: - "sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable" - "sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/pcl" - "sudo apt-get update" - "pip install -U -q cython" - "export DEBIAN_FRONTEND=noninteractive" - "sudo apt-get -qq install libpcl-all python-matplotlib liblas-c2 python-liblas" - "pip install coverage" - "pip install -r requirements.txt" - "export PYTHONPATH=$PYTHONPATH:/usr/share/pyshared" - "sudo ln -s /usr/lib/liblas_c.so /usr/lib/liblas_c.so.2.2.0" install: - "echo done" # command to run tests, e.g. python setup.py test script: nosetests --with-coverage after_script: - "pip install scrutinizer-ocular" - "ocular"
Add softlink to help find liblas_c.so
Add softlink to help find liblas_c.so
YAML
apache-2.0
NLeSC/PattyAnalytics
yaml
## Code Before: language: python python: - "2.7" before_install: - "sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable" - "sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/pcl" - "sudo apt-get update" - "pip install -U -q cython" - "export DEBIAN_FRONTEND=noninteractive" - "sudo apt-get -qq install libpcl-all python-matplotlib liblas-c2 python-liblas" - "pip install coverage" - "pip install -r requirements.txt" - "export PYTHONPATH=/usr/share/pyshared:$PYTHONPATH" install: - "echo done" # command to run tests, e.g. python setup.py test script: nosetests --with-coverage after_script: - "pip install scrutinizer-ocular" - "ocular" ## Instruction: Add softlink to help find liblas_c.so ## Code After: language: python python: - "2.7" before_install: - "sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable" - "sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/pcl" - "sudo apt-get update" - "pip install -U -q cython" - "export DEBIAN_FRONTEND=noninteractive" - "sudo apt-get -qq install libpcl-all python-matplotlib liblas-c2 python-liblas" - "pip install coverage" - "pip install -r requirements.txt" - "export PYTHONPATH=$PYTHONPATH:/usr/share/pyshared" - "sudo ln -s /usr/lib/liblas_c.so /usr/lib/liblas_c.so.2.2.0" install: - "echo done" # command to run tests, e.g. python setup.py test script: nosetests --with-coverage after_script: - "pip install scrutinizer-ocular" - "ocular"
language: python python: - "2.7" before_install: - "sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable" - "sudo add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/pcl" - "sudo apt-get update" - "pip install -U -q cython" - "export DEBIAN_FRONTEND=noninteractive" - "sudo apt-get -qq install libpcl-all python-matplotlib liblas-c2 python-liblas" - "pip install coverage" - "pip install -r requirements.txt" - - "export PYTHONPATH=/usr/share/pyshared:$PYTHONPATH" ? ------------ + - "export PYTHONPATH=$PYTHONPATH:/usr/share/pyshared" ? ++++++++++++ + - "sudo ln -s /usr/lib/liblas_c.so /usr/lib/liblas_c.so.2.2.0" install: - "echo done" # command to run tests, e.g. python setup.py test script: nosetests --with-coverage after_script: - "pip install scrutinizer-ocular" - "ocular"
3
0.125
2
1
e2d96ccead7409d8daa519c14dd0ec138f9028c1
bin/configfile-modules.js
bin/configfile-modules.js
const program = require('commander') const fs = require('fs') const path = require('path') const { deployCommand, modulesCommand } = require('../src/commands') const { ConfigService } = require('../src/services/config') const { FileService } = require('../src/services/file') const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'))) const optionsFilePath = packageData.config.optionsFilePath.replace('~', process.env.HOME) const configService = new ConfigService(optionsFilePath) const fileService = new FileService(configService) program .version(packageData.version) .description('Configuration modules manager.') program .command('list') .alias('l') .description('list all modules available.') .action(modulesCommand(fileService)) program .command('deploy [modules...]') .alias('d') .description('deploy configuration files.') .action(deployCommand(fileService)) program.parse(process.argv)
const program = require('commander') const fs = require('fs') const path = require('path') const { deployCommand, modulesCommand } = require('../src/commands') const { ConfigService } = require('../src/services/config') const { FileService } = require('../src/services/file') const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'))) const optionsFilePath = packageData.config.optionsFilePath.replace('~', process.env.HOME) const configService = new ConfigService(optionsFilePath) const fileService = new FileService(configService) program .version(packageData.version) .description('Configuration modules manager.') program .command('list') .alias('l') .description('list all modules available.') .action(modulesCommand(fileService)) program .command('deploy [modules...]') .alias('d') .description('deploy configuration files.') .option('-l, --local', 'deploy only local files of the module(s) in the current folder') .action(deployCommand(fileService)) program.parse(process.argv)
Add options -l in deploy command
Add options -l in deploy command
JavaScript
apache-2.0
Mindsers/configfile
javascript
## Code Before: const program = require('commander') const fs = require('fs') const path = require('path') const { deployCommand, modulesCommand } = require('../src/commands') const { ConfigService } = require('../src/services/config') const { FileService } = require('../src/services/file') const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'))) const optionsFilePath = packageData.config.optionsFilePath.replace('~', process.env.HOME) const configService = new ConfigService(optionsFilePath) const fileService = new FileService(configService) program .version(packageData.version) .description('Configuration modules manager.') program .command('list') .alias('l') .description('list all modules available.') .action(modulesCommand(fileService)) program .command('deploy [modules...]') .alias('d') .description('deploy configuration files.') .action(deployCommand(fileService)) program.parse(process.argv) ## Instruction: Add options -l in deploy command ## Code After: const program = require('commander') const fs = require('fs') const path = require('path') const { deployCommand, modulesCommand } = require('../src/commands') const { ConfigService } = require('../src/services/config') const { FileService } = require('../src/services/file') const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'))) const optionsFilePath = packageData.config.optionsFilePath.replace('~', process.env.HOME) const configService = new ConfigService(optionsFilePath) const fileService = new FileService(configService) program .version(packageData.version) .description('Configuration modules manager.') program .command('list') .alias('l') .description('list all modules available.') .action(modulesCommand(fileService)) program .command('deploy [modules...]') .alias('d') .description('deploy configuration files.') .option('-l, --local', 'deploy only local files of the module(s) in the current folder') .action(deployCommand(fileService)) program.parse(process.argv)
const program = require('commander') const fs = require('fs') const path = require('path') const { deployCommand, modulesCommand } = require('../src/commands') const { ConfigService } = require('../src/services/config') const { FileService } = require('../src/services/file') const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'))) const optionsFilePath = packageData.config.optionsFilePath.replace('~', process.env.HOME) const configService = new ConfigService(optionsFilePath) const fileService = new FileService(configService) program .version(packageData.version) .description('Configuration modules manager.') program .command('list') .alias('l') .description('list all modules available.') .action(modulesCommand(fileService)) program .command('deploy [modules...]') .alias('d') .description('deploy configuration files.') + .option('-l, --local', 'deploy only local files of the module(s) in the current folder') .action(deployCommand(fileService)) program.parse(process.argv)
1
0.030303
1
0
681ed6d076f0e88b78da0fee59eea0acaa4120c5
requirements.txt
requirements.txt
argh==0.26.2 args==0.1.0 clint==0.5.1 coconut-develop==1.2.0.post0.dev23 pathtools==0.1.2 pkg-resources==0.0.0 pkginfo==1.4.1 pluggy==0.4.0 prompt-toolkit==1.0.7 py==1.4.32 Pygments==2.1.3 pyparsing==2.1.10 pytest==3.0.5 PyYAML==3.12 requests==2.12.4 requests-toolbelt==0.7.0 six==1.10.0 tox==2.5.0 twine==1.8.1 virtualenv==15.1.0 watchdog==0.8.3 wcwidth==0.1.7
appdirs==1.4.3 argh==0.26.2 args==0.1.0 clint==0.5.1 coconut==1.2.2 packaging==16.8 pathtools==0.1.2 pkg-resources==0.0.0 pkginfo==1.4.1 pluggy==0.4.0 prompt-toolkit==1.0.13 psutil==5.1.3 py==1.4.32 Pygments==2.2.0 pyparsing==2.1.10 pytest==3.0.5 PyYAML==3.12 requests==2.12.4 requests-toolbelt==0.7.0 six==1.10.0 tox==2.5.0 twine==1.8.1 virtualenv==15.1.0 watchdog==0.8.3 wcwidth==0.1.7
Remove coconut-develop and add latest coconut release version
Remove coconut-develop and add latest coconut release version
Text
apache-2.0
Nexus6/Glioma
text
## Code Before: argh==0.26.2 args==0.1.0 clint==0.5.1 coconut-develop==1.2.0.post0.dev23 pathtools==0.1.2 pkg-resources==0.0.0 pkginfo==1.4.1 pluggy==0.4.0 prompt-toolkit==1.0.7 py==1.4.32 Pygments==2.1.3 pyparsing==2.1.10 pytest==3.0.5 PyYAML==3.12 requests==2.12.4 requests-toolbelt==0.7.0 six==1.10.0 tox==2.5.0 twine==1.8.1 virtualenv==15.1.0 watchdog==0.8.3 wcwidth==0.1.7 ## Instruction: Remove coconut-develop and add latest coconut release version ## Code After: appdirs==1.4.3 argh==0.26.2 args==0.1.0 clint==0.5.1 coconut==1.2.2 packaging==16.8 pathtools==0.1.2 pkg-resources==0.0.0 pkginfo==1.4.1 pluggy==0.4.0 prompt-toolkit==1.0.13 psutil==5.1.3 py==1.4.32 Pygments==2.2.0 pyparsing==2.1.10 pytest==3.0.5 PyYAML==3.12 requests==2.12.4 requests-toolbelt==0.7.0 six==1.10.0 tox==2.5.0 twine==1.8.1 virtualenv==15.1.0 watchdog==0.8.3 wcwidth==0.1.7
+ appdirs==1.4.3 argh==0.26.2 args==0.1.0 clint==0.5.1 - coconut-develop==1.2.0.post0.dev23 + coconut==1.2.2 + packaging==16.8 pathtools==0.1.2 pkg-resources==0.0.0 pkginfo==1.4.1 pluggy==0.4.0 - prompt-toolkit==1.0.7 ? ^ + prompt-toolkit==1.0.13 ? ^^ + psutil==5.1.3 py==1.4.32 - Pygments==2.1.3 ? ^ ^ + Pygments==2.2.0 ? ^ ^ pyparsing==2.1.10 pytest==3.0.5 PyYAML==3.12 requests==2.12.4 requests-toolbelt==0.7.0 six==1.10.0 tox==2.5.0 twine==1.8.1 virtualenv==15.1.0 watchdog==0.8.3 wcwidth==0.1.7
9
0.409091
6
3
b02e22fe3eb31ee6c38d821c1a02b4d03506b0f6
app/assets/stylesheets/govuk-component/_metadata.scss
app/assets/stylesheets/govuk-component/_metadata.scss
.govuk-metadata { @include core-14; @extend %contain-floats; &.direction-rtl { direction: rtl; text-align: start; } dt { float: left; clear: left; width: auto; min-width: 120px; @include media(tablet){ padding-right: $gutter-one-third; } } &.direction-rtl dt { float: right; clear: right; @include media(tablet){ padding-left: $gutter-one-third; padding-right: 0; } } dd { float: left; width: 55%; @include media(tablet){ width: 70%; } } &.direction-rtl dd { float: right; } }
.govuk-metadata { @include core-14; @include responsive-bottom-margin; @extend %contain-floats; &.direction-rtl { direction: rtl; text-align: start; } dt { float: left; clear: left; width: auto; min-width: 120px; @include media(tablet){ padding-right: $gutter-one-third; } } &.direction-rtl dt { float: right; clear: right; @include media(tablet){ padding-left: $gutter-one-third; padding-right: 0; } } dd { float: left; width: 55%; @include media(tablet){ width: 70%; } } &.direction-rtl dd { float: right; } }
Add default bottom margin to metadata
Add default bottom margin to metadata Metadata component should have a default margin as a different type of content usually follows. Follow the government-frontend example and use a responsive margin. Component is also used by specialist-frontend and finder-frontend. Specialist front-end needs to be updated before this change is applied.
SCSS
mit
kalleth/static,kalleth/static,alphagov/static,alphagov/static,kalleth/static,alphagov/static,kalleth/static
scss
## Code Before: .govuk-metadata { @include core-14; @extend %contain-floats; &.direction-rtl { direction: rtl; text-align: start; } dt { float: left; clear: left; width: auto; min-width: 120px; @include media(tablet){ padding-right: $gutter-one-third; } } &.direction-rtl dt { float: right; clear: right; @include media(tablet){ padding-left: $gutter-one-third; padding-right: 0; } } dd { float: left; width: 55%; @include media(tablet){ width: 70%; } } &.direction-rtl dd { float: right; } } ## Instruction: Add default bottom margin to metadata Metadata component should have a default margin as a different type of content usually follows. Follow the government-frontend example and use a responsive margin. Component is also used by specialist-frontend and finder-frontend. Specialist front-end needs to be updated before this change is applied. ## Code After: .govuk-metadata { @include core-14; @include responsive-bottom-margin; @extend %contain-floats; &.direction-rtl { direction: rtl; text-align: start; } dt { float: left; clear: left; width: auto; min-width: 120px; @include media(tablet){ padding-right: $gutter-one-third; } } &.direction-rtl dt { float: right; clear: right; @include media(tablet){ padding-left: $gutter-one-third; padding-right: 0; } } dd { float: left; width: 55%; @include media(tablet){ width: 70%; } } &.direction-rtl dd { float: right; } }
.govuk-metadata { @include core-14; + @include responsive-bottom-margin; @extend %contain-floats; &.direction-rtl { direction: rtl; text-align: start; } dt { float: left; clear: left; width: auto; min-width: 120px; @include media(tablet){ padding-right: $gutter-one-third; } } &.direction-rtl dt { float: right; clear: right; @include media(tablet){ padding-left: $gutter-one-third; padding-right: 0; } } dd { float: left; width: 55%; @include media(tablet){ width: 70%; } } &.direction-rtl dd { float: right; } }
1
0.025
1
0
27147faff64ddf8718bdb3a2153aa59566e3ffcb
Diurna/CommentTableRowView.swift
Diurna/CommentTableRowView.swift
// // CommentTableRowView.swift // Diurna // // Created by Nicolas Gaulard-Querol on 28/02/2016. // Copyright © 2016 Nicolas Gaulard-Querol. All rights reserved. // import Cocoa class CommentTableRowView: NSTableRowView { override func drawRect(dirtyRect: NSRect) { super.drawRect(dirtyRect) guard let cellView = viewAtColumn(0) else { return } let cellXOrigin = cellView.frame.origin.x var pos: CGFloat = 10 var alpha: CGFloat = 0.5 while pos < cellXOrigin { let line = NSBezierPath() line.lineWidth = 1.0 NSColor.gridColor().colorWithAlphaComponent(alpha).setStroke() line.moveToPoint(NSPoint(x: pos, y: NSMaxY(self.bounds))) line.lineToPoint(NSPoint(x: pos, y: NSMinY(self.bounds))) line.stroke() pos += 20 alpha -= 0.05 } } }
// // CommentTableRowView.swift // Diurna // // Created by Nicolas Gaulard-Querol on 28/02/2016. // Copyright © 2016 Nicolas Gaulard-Querol. All rights reserved. // import Cocoa class CommentTableRowView: NSTableRowView { let indentGuideColor = NSColor(calibratedHue: 1.0, saturation: 0.0, brightness: 0.85, alpha: 1.0) override func drawRect(dirtyRect: NSRect) { super.drawRect(dirtyRect) guard let cellView = viewAtColumn(0) else { return } let cellXOrigin = cellView.frame.origin.x var pos: CGFloat = 10 var alpha: CGFloat = 1.0 while pos < cellXOrigin { let line = NSBezierPath() line.lineWidth = 1.0 indentGuideColor.colorWithAlphaComponent(alpha).setStroke() line.moveToPoint(NSPoint(x: pos, y: NSMaxY(self.bounds))) line.lineToPoint(NSPoint(x: pos, y: NSMinY(self.bounds))) line.stroke() pos += 20 alpha -= 0.1 } } }
Change comments indent guides color
Change comments indent guides color
Swift
mit
ngquerol/Diurna,ngquerol/Diurna,ngquerol/Diurna
swift
## Code Before: // // CommentTableRowView.swift // Diurna // // Created by Nicolas Gaulard-Querol on 28/02/2016. // Copyright © 2016 Nicolas Gaulard-Querol. All rights reserved. // import Cocoa class CommentTableRowView: NSTableRowView { override func drawRect(dirtyRect: NSRect) { super.drawRect(dirtyRect) guard let cellView = viewAtColumn(0) else { return } let cellXOrigin = cellView.frame.origin.x var pos: CGFloat = 10 var alpha: CGFloat = 0.5 while pos < cellXOrigin { let line = NSBezierPath() line.lineWidth = 1.0 NSColor.gridColor().colorWithAlphaComponent(alpha).setStroke() line.moveToPoint(NSPoint(x: pos, y: NSMaxY(self.bounds))) line.lineToPoint(NSPoint(x: pos, y: NSMinY(self.bounds))) line.stroke() pos += 20 alpha -= 0.05 } } } ## Instruction: Change comments indent guides color ## Code After: // // CommentTableRowView.swift // Diurna // // Created by Nicolas Gaulard-Querol on 28/02/2016. // Copyright © 2016 Nicolas Gaulard-Querol. All rights reserved. // import Cocoa class CommentTableRowView: NSTableRowView { let indentGuideColor = NSColor(calibratedHue: 1.0, saturation: 0.0, brightness: 0.85, alpha: 1.0) override func drawRect(dirtyRect: NSRect) { super.drawRect(dirtyRect) guard let cellView = viewAtColumn(0) else { return } let cellXOrigin = cellView.frame.origin.x var pos: CGFloat = 10 var alpha: CGFloat = 1.0 while pos < cellXOrigin { let line = NSBezierPath() line.lineWidth = 1.0 indentGuideColor.colorWithAlphaComponent(alpha).setStroke() line.moveToPoint(NSPoint(x: pos, y: NSMaxY(self.bounds))) line.lineToPoint(NSPoint(x: pos, y: NSMinY(self.bounds))) line.stroke() pos += 20 alpha -= 0.1 } } }
// // CommentTableRowView.swift // Diurna // // Created by Nicolas Gaulard-Querol on 28/02/2016. // Copyright © 2016 Nicolas Gaulard-Querol. All rights reserved. // import Cocoa class CommentTableRowView: NSTableRowView { + let indentGuideColor = NSColor(calibratedHue: 1.0, saturation: 0.0, brightness: 0.85, alpha: 1.0) + override func drawRect(dirtyRect: NSRect) { super.drawRect(dirtyRect) guard let cellView = viewAtColumn(0) else { return } let cellXOrigin = cellView.frame.origin.x + var pos: CGFloat = 10 - var alpha: CGFloat = 0.5 ? -- + var alpha: CGFloat = 1.0 ? ++ while pos < cellXOrigin { let line = NSBezierPath() line.lineWidth = 1.0 - NSColor.gridColor().colorWithAlphaComponent(alpha).setStroke() ? ^^ ------------ + indentGuideColor.colorWithAlphaComponent(alpha).setStroke() ? ^^^^^^^^^^^ line.moveToPoint(NSPoint(x: pos, y: NSMaxY(self.bounds))) line.lineToPoint(NSPoint(x: pos, y: NSMinY(self.bounds))) line.stroke() pos += 20 - alpha -= 0.05 ? ^^ + alpha -= 0.1 ? ^ } } }
9
0.243243
6
3
8337d7ea4e9c6abae101a847b2730dae18d22771
.travis.yml
.travis.yml
before_install: - sudo apt-get -y update - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man libcurl4-openssl-dev - sudo apt-get -y install libtool automake autoconf autoconf-archive - sudo apt-get -y install texlive-latex-base texlive-latex-recommended - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo - sudo apt-get -y install python-pygments python-docutils python-sphinx before_script: ./configure -c script: - make check - cd src/fauxton - npm install - grunt test language: erlang otp_release: - 17.3 - 17.1 - 17.0 - R16B03-1 - R14B04 git: depth: 10
before_install: - sudo apt-get -y update - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man libcurl4-openssl-dev - sudo apt-get -y install libtool automake autoconf autoconf-archive - sudo apt-get -y install texlive-latex-base texlive-latex-recommended - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo - sudo apt-get -y install python-pygments python-docutils python-sphinx before_script: ./configure -c script: - make check - cd src/fauxton - npm install - grunt test language: erlang otp_release: - 17.4 - 17.3 - 17.1 - 17.0 - R16B03-1 - R14B04 git: depth: 10
Build with Erlang 17.4 on Travis
Build with Erlang 17.4 on Travis
YAML
apache-2.0
fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb
yaml
## Code Before: before_install: - sudo apt-get -y update - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man libcurl4-openssl-dev - sudo apt-get -y install libtool automake autoconf autoconf-archive - sudo apt-get -y install texlive-latex-base texlive-latex-recommended - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo - sudo apt-get -y install python-pygments python-docutils python-sphinx before_script: ./configure -c script: - make check - cd src/fauxton - npm install - grunt test language: erlang otp_release: - 17.3 - 17.1 - 17.0 - R16B03-1 - R14B04 git: depth: 10 ## Instruction: Build with Erlang 17.4 on Travis ## Code After: before_install: - sudo apt-get -y update - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man libcurl4-openssl-dev - sudo apt-get -y install libtool automake autoconf autoconf-archive - sudo apt-get -y install texlive-latex-base texlive-latex-recommended - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo - sudo apt-get -y install python-pygments python-docutils python-sphinx before_script: ./configure -c script: - make check - cd src/fauxton - npm install - grunt test language: erlang otp_release: - 17.4 - 17.3 - 17.1 - 17.0 - R16B03-1 - R14B04 git: depth: 10
before_install: - sudo apt-get -y update - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man libcurl4-openssl-dev - sudo apt-get -y install libtool automake autoconf autoconf-archive - sudo apt-get -y install texlive-latex-base texlive-latex-recommended - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo - sudo apt-get -y install python-pygments python-docutils python-sphinx before_script: ./configure -c script: - make check - cd src/fauxton - npm install - grunt test language: erlang otp_release: + - 17.4 - 17.3 - 17.1 - 17.0 - R16B03-1 - R14B04 git: depth: 10
1
0.045455
1
0