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
5e6514a06132bc0fd84a8a2e07d2f739dcb09e28
meta-arago-extras/recipes-ti/tidl-api/tidl-viewer_git.bb
meta-arago-extras/recipes-ti/tidl-api/tidl-viewer_git.bb
SUMMARY = "TIDL Network Viewer" DESCRIPTION = "TIDL Network viewer using dot and graphviz" HOMEPAGE = "https://downloads.ti.com/mctools/esd/docs/tidl-api/intro.html" LICENSE = "BSD" include tidl-api.inc PR = "${INC_PR}.0" DEPENDS = "boost boost-native ti-cgt6x-native clocl-native" S = "${WORKDIR}/git" TARGET_class-target = "arm" TARGET_class-native = "x86" TARGET_class-nativesdk = "x86" EXTRA_OEMAKE = " -C ${S}/viewer \ TARGET=${TARGET} \ TARGET_ROOTDIR=${STAGING_DIR_HOST} \ " do_compile() { oe_runmake } do_install() { install -d ${D}${bindir} install -m 755 ${S}/viewer/${TARGET}/tidl_viewer ${D}${bindir} } BBCLASSEXTEND = "native nativesdk"
SUMMARY = "TIDL Network Viewer" DESCRIPTION = "TIDL Network viewer using dot and graphviz" HOMEPAGE = "https://downloads.ti.com/mctools/esd/docs/tidl-api/intro.html" LICENSE = "BSD" include tidl-api.inc PR = "${INC_PR}.1" DEPENDS = "boost boost-native ti-cgt6x-native clocl-native" S = "${WORKDIR}/git" TARGET_class-target = "arm" TARGET_class-native = "x86" TARGET_class-nativesdk = "x86" CXXFLAGS_append_class-native = " -DPLATFORM_64BIT " CXXFLAGS_append_class-nativesdk = " -DPLATFORM_64BIT " EXTRA_OEMAKE = " -C ${S}/viewer \ TARGET=${TARGET} \ TARGET_ROOTDIR=${STAGING_DIR_HOST} \ " do_compile() { oe_runmake } do_install() { install -d ${D}${bindir} install -m 755 ${S}/viewer/${TARGET}/tidl_viewer ${D}${bindir} } BBCLASSEXTEND = "native nativesdk"
Fix tidl-viewer x86_64 build CXXFLAGS
tidl-api: Fix tidl-viewer x86_64 build CXXFLAGS Signed-off-by: Yuan Zhao <33ba65427ff4207fbca20aa7a52e7b57f11b5d78@ti.com> Signed-off-by: Denys Dmytriyenko <d29de71aea38aad3a87d486929cb0aad173ae612@ti.com>
BitBake
mit
rcn-ee/meta-arago,rcn-ee/meta-arago,rcn-ee/meta-arago,rcn-ee/meta-arago,rcn-ee/meta-arago
bitbake
## Code Before: SUMMARY = "TIDL Network Viewer" DESCRIPTION = "TIDL Network viewer using dot and graphviz" HOMEPAGE = "https://downloads.ti.com/mctools/esd/docs/tidl-api/intro.html" LICENSE = "BSD" include tidl-api.inc PR = "${INC_PR}.0" DEPENDS = "boost boost-native ti-cgt6x-native clocl-native" S = "${WORKDIR}/git" TARGET_class-target = "arm" TARGET_class-native = "x86" TARGET_class-nativesdk = "x86" EXTRA_OEMAKE = " -C ${S}/viewer \ TARGET=${TARGET} \ TARGET_ROOTDIR=${STAGING_DIR_HOST} \ " do_compile() { oe_runmake } do_install() { install -d ${D}${bindir} install -m 755 ${S}/viewer/${TARGET}/tidl_viewer ${D}${bindir} } BBCLASSEXTEND = "native nativesdk" ## Instruction: tidl-api: Fix tidl-viewer x86_64 build CXXFLAGS Signed-off-by: Yuan Zhao <33ba65427ff4207fbca20aa7a52e7b57f11b5d78@ti.com> Signed-off-by: Denys Dmytriyenko <d29de71aea38aad3a87d486929cb0aad173ae612@ti.com> ## Code After: SUMMARY = "TIDL Network Viewer" DESCRIPTION = "TIDL Network viewer using dot and graphviz" HOMEPAGE = "https://downloads.ti.com/mctools/esd/docs/tidl-api/intro.html" LICENSE = "BSD" include tidl-api.inc PR = "${INC_PR}.1" DEPENDS = "boost boost-native ti-cgt6x-native clocl-native" S = "${WORKDIR}/git" TARGET_class-target = "arm" TARGET_class-native = "x86" TARGET_class-nativesdk = "x86" CXXFLAGS_append_class-native = " -DPLATFORM_64BIT " CXXFLAGS_append_class-nativesdk = " -DPLATFORM_64BIT " EXTRA_OEMAKE = " -C ${S}/viewer \ TARGET=${TARGET} \ TARGET_ROOTDIR=${STAGING_DIR_HOST} \ " do_compile() { oe_runmake } do_install() { install -d ${D}${bindir} install -m 755 ${S}/viewer/${TARGET}/tidl_viewer ${D}${bindir} } BBCLASSEXTEND = "native nativesdk"
SUMMARY = "TIDL Network Viewer" DESCRIPTION = "TIDL Network viewer using dot and graphviz" HOMEPAGE = "https://downloads.ti.com/mctools/esd/docs/tidl-api/intro.html" LICENSE = "BSD" include tidl-api.inc - PR = "${INC_PR}.0" ? ^ + PR = "${INC_PR}.1" ? ^ DEPENDS = "boost boost-native ti-cgt6x-native clocl-native" S = "${WORKDIR}/git" TARGET_class-target = "arm" TARGET_class-native = "x86" TARGET_class-nativesdk = "x86" + + CXXFLAGS_append_class-native = " -DPLATFORM_64BIT " + CXXFLAGS_append_class-nativesdk = " -DPLATFORM_64BIT " EXTRA_OEMAKE = " -C ${S}/viewer \ TARGET=${TARGET} \ TARGET_ROOTDIR=${STAGING_DIR_HOST} \ " do_compile() { oe_runmake } do_install() { install -d ${D}${bindir} install -m 755 ${S}/viewer/${TARGET}/tidl_viewer ${D}${bindir} } BBCLASSEXTEND = "native nativesdk"
5
0.15625
4
1
099d7f8bce4f069853f067e3f089b5ce3baf8fd5
lib/views/general/_frontpage_intro_sentence.html.erb
lib/views/general/_frontpage_intro_sentence.html.erb
<h2>Your Right to Know</h2> <p> <%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by Australian public authorities. <% if AlaveteliConfiguration.authority_must_respond %> <%= _("By law, they have to respond.") %> <% end %> </p> <p><a href="<%= help_about_url %>">Find out more about Freedom of Information.</a></p>
<h2>Your Right to Know</h2> <p> <%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by Australian public authorities. <% if AlaveteliConfiguration.authority_must_respond %> <%= _("By law, they have to respond.") %> <% end %> </p>
Remove link in intro sentence to more information about FOI because there is now a little explainer below with a link to the same detailed information on the help pages
Remove link in intro sentence to more information about FOI because there is now a little explainer below with a link to the same detailed information on the help pages
HTML+ERB
mit
openaustralia/righttoknow,openaustralia/righttoknow,openaustralia/righttoknow
html+erb
## Code Before: <h2>Your Right to Know</h2> <p> <%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by Australian public authorities. <% if AlaveteliConfiguration.authority_must_respond %> <%= _("By law, they have to respond.") %> <% end %> </p> <p><a href="<%= help_about_url %>">Find out more about Freedom of Information.</a></p> ## Instruction: Remove link in intro sentence to more information about FOI because there is now a little explainer below with a link to the same detailed information on the help pages ## Code After: <h2>Your Right to Know</h2> <p> <%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by Australian public authorities. <% if AlaveteliConfiguration.authority_must_respond %> <%= _("By law, they have to respond.") %> <% end %> </p>
<h2>Your Right to Know</h2> <p> <%= link_to "Everyone", help_requesting_path(:anchor => "who") %> has the right to access information held by Australian public authorities. <% if AlaveteliConfiguration.authority_must_respond %> <%= _("By law, they have to respond.") %> <% end %> </p> - <p><a href="<%= help_about_url %>">Find out more about Freedom of Information.</a></p>
1
0.111111
0
1
409405f67426ba6548ba167f42393392e0805787
lib/_utils.js
lib/_utils.js
// Returns true if this is a host that closes *before* it ends?!?! module.exports.isAnEarlyCloseHost= function( hostName ) { return hostName.match(".*google(apis)?.com$") }
// Returns true if this is a host that closes *before* it ends?!?! module.exports.isAnEarlyCloseHost= function( hostName ) { return hostName && hostName.match(".*google(apis)?.com$") }
Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error.
Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error.
JavaScript
mit
adjohnson916/node-oauth,waffleio/node-oauth,hiddentao/node-oauth,WatchBeam/node-oauth,compsol-michael/nodejs-with-pfx-integration,dongguangming/node-oauth,mhart/node-oauth,hallta/node-oauth,hoist/node-oauth,sktguha/node-oauth,bhargav175/node-oauth,matuszeman/node-oauth,Cellarise/oauth-rest-atlassian,kasparaasamets/node-oauth,Phanatic/node-oauth,ciaranj/node-oauth,JoliOS/node-oauth,jsha/node-oauth,2do2go/node-oauth,cblair/node-oauth,gfogle/node-oauth,emertechie/node-oauth,d2marcelo/node-oauth,craigspaeth/node-oauth,apiaryio/node-oauth
javascript
## Code Before: // Returns true if this is a host that closes *before* it ends?!?! module.exports.isAnEarlyCloseHost= function( hostName ) { return hostName.match(".*google(apis)?.com$") } ## Instruction: Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error. ## Code After: // Returns true if this is a host that closes *before* it ends?!?! module.exports.isAnEarlyCloseHost= function( hostName ) { return hostName && hostName.match(".*google(apis)?.com$") }
// Returns true if this is a host that closes *before* it ends?!?! module.exports.isAnEarlyCloseHost= function( hostName ) { - return hostName.match(".*google(apis)?.com$") + return hostName && hostName.match(".*google(apis)?.com$") ? ++++++++++++ }
2
0.5
1
1
b5d5629faeced8f3dca80edc3773b49376383ba4
js/app/interactionLoader.js
js/app/interactionLoader.js
const EvinceDocument = imports.gi.EvinceDocument; const Gio = imports.gi.Gio; const ModuleFactory = imports.app.moduleFactory; const Utils = imports.app.utils; let create_interaction = function (application, resource_path) { // Initialize libraries EvinceDocument.init(); let app_resource = Gio.Resource.load(resource_path); app_resource._register(); let appname = app_resource.enumerate_children('/com/endlessm', Gio.FileQueryInfoFlags.NONE, null)[0]; let resource_file = Gio.File.new_for_uri('resource:///com/endlessm/' + appname); let app_json_file = resource_file.get_child('app.json'); let app_json = Utils.parse_object_from_file(app_json_file); let overrides_css_file = resource_file.get_child('overrides.css'); let factory = new ModuleFactory.ModuleFactory({ app_json: app_json, }); let css = ''; if (overrides_css_file.query_exists(null)) { let [success, data] = overrides_css_file.load_contents(null); css = data.toString(); } application.image_attribution_file = resource_file.get_child('credits.json'); return factory.create_named_module('interaction', { template_type: app_json['templateType'], css: css, application: application, }); };
const EvinceDocument = imports.gi.EvinceDocument; const Gio = imports.gi.Gio; const ModuleFactory = imports.app.moduleFactory; const Utils = imports.app.utils; let create_interaction = function (application, resource_path) { // Initialize libraries EvinceDocument.init(); let app_resource = Gio.Resource.load(resource_path); app_resource._register(); let appname = app_resource.enumerate_children('/com/endlessm', Gio.FileQueryInfoFlags.NONE, null)[0]; let resource_file = Gio.File.new_for_uri('resource:///com/endlessm/' + appname); let app_json_file = resource_file.get_child('app.json'); let app_json = Utils.parse_object_from_file(app_json_file); let overrides_css_file = resource_file.get_child('overrides.css'); let factory = new ModuleFactory.ModuleFactory({ app_json: app_json, }); let css = ''; if (overrides_css_file.query_exists(null)) { let [success, data] = overrides_css_file.load_contents(null); css = data.toString(); } application.image_attribution_file = resource_file.get_child('credits.json'); return factory.create_named_module('interaction', { // v2 app.jsons have no templateType key template_type: app_json['templateType'] || '', css: css, application: application, }); };
Allow app.json without templateType key
Allow app.json without templateType key The v2 app.json should not have a templateType key in it. MeshInteraction does require that it is constructed with that key, at least until we refactor it, so pass a blank string when the app.json does not contain a templateType key. https://phabricator.endlessm.com/T11064
JavaScript
lgpl-2.1
endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib
javascript
## Code Before: const EvinceDocument = imports.gi.EvinceDocument; const Gio = imports.gi.Gio; const ModuleFactory = imports.app.moduleFactory; const Utils = imports.app.utils; let create_interaction = function (application, resource_path) { // Initialize libraries EvinceDocument.init(); let app_resource = Gio.Resource.load(resource_path); app_resource._register(); let appname = app_resource.enumerate_children('/com/endlessm', Gio.FileQueryInfoFlags.NONE, null)[0]; let resource_file = Gio.File.new_for_uri('resource:///com/endlessm/' + appname); let app_json_file = resource_file.get_child('app.json'); let app_json = Utils.parse_object_from_file(app_json_file); let overrides_css_file = resource_file.get_child('overrides.css'); let factory = new ModuleFactory.ModuleFactory({ app_json: app_json, }); let css = ''; if (overrides_css_file.query_exists(null)) { let [success, data] = overrides_css_file.load_contents(null); css = data.toString(); } application.image_attribution_file = resource_file.get_child('credits.json'); return factory.create_named_module('interaction', { template_type: app_json['templateType'], css: css, application: application, }); }; ## Instruction: Allow app.json without templateType key The v2 app.json should not have a templateType key in it. MeshInteraction does require that it is constructed with that key, at least until we refactor it, so pass a blank string when the app.json does not contain a templateType key. https://phabricator.endlessm.com/T11064 ## Code After: const EvinceDocument = imports.gi.EvinceDocument; const Gio = imports.gi.Gio; const ModuleFactory = imports.app.moduleFactory; const Utils = imports.app.utils; let create_interaction = function (application, resource_path) { // Initialize libraries EvinceDocument.init(); let app_resource = Gio.Resource.load(resource_path); app_resource._register(); let appname = app_resource.enumerate_children('/com/endlessm', Gio.FileQueryInfoFlags.NONE, null)[0]; let resource_file = Gio.File.new_for_uri('resource:///com/endlessm/' + appname); let app_json_file = resource_file.get_child('app.json'); let app_json = Utils.parse_object_from_file(app_json_file); let overrides_css_file = resource_file.get_child('overrides.css'); let factory = new ModuleFactory.ModuleFactory({ app_json: app_json, }); let css = ''; if (overrides_css_file.query_exists(null)) { let [success, data] = overrides_css_file.load_contents(null); css = data.toString(); } application.image_attribution_file = resource_file.get_child('credits.json'); return factory.create_named_module('interaction', { // v2 app.jsons have no templateType key template_type: app_json['templateType'] || '', css: css, application: application, }); };
const EvinceDocument = imports.gi.EvinceDocument; const Gio = imports.gi.Gio; const ModuleFactory = imports.app.moduleFactory; const Utils = imports.app.utils; let create_interaction = function (application, resource_path) { // Initialize libraries EvinceDocument.init(); let app_resource = Gio.Resource.load(resource_path); app_resource._register(); let appname = app_resource.enumerate_children('/com/endlessm', Gio.FileQueryInfoFlags.NONE, null)[0]; let resource_file = Gio.File.new_for_uri('resource:///com/endlessm/' + appname); let app_json_file = resource_file.get_child('app.json'); let app_json = Utils.parse_object_from_file(app_json_file); let overrides_css_file = resource_file.get_child('overrides.css'); let factory = new ModuleFactory.ModuleFactory({ app_json: app_json, }); let css = ''; if (overrides_css_file.query_exists(null)) { let [success, data] = overrides_css_file.load_contents(null); css = data.toString(); } application.image_attribution_file = resource_file.get_child('credits.json'); return factory.create_named_module('interaction', { + // v2 app.jsons have no templateType key - template_type: app_json['templateType'], + template_type: app_json['templateType'] || '', ? ++++++ css: css, application: application, }); };
3
0.081081
2
1
4626b4480bc3f18d169d0435b983eb80aa8658b1
docs/examples/python-requests-jwt.md
docs/examples/python-requests-jwt.md
This code relies on setting up the PostgreSQL auth functions and grants correctly first. Follow these instructions: http://postgrest.com/examples/users/ After completing the configuration, be sure to create a user with email, password, role, and verified flag. We'll use that user to login in the code below. Install the required libraries pip install requests pip install requests-jwt Then, from a python interpreter or script: import requests import requests_jwt import json # email and password auth through postgrest resp = requests.post('http://localhost:3000/rpc/login', json={"email": "you@yours.com", "pass": "dog"}) if resp.status_code != 200: raise Exception() # JWT auth using the token above token = json.loads(resp.text)['token'] auth = requests_jwt.JWTAuth(token) r = requests.get('http://localhost:3000/weight', auth=auth) if r.status_code != 200: raise Exception() for each in r.json(): # do as you wish with each row print(each) The preceding HTTP client example should work on Python 3.x. If you're using python < 3.x you may need to change the print functions to statements or use: from __future__ import print_function
This code relies on setting up the PostgreSQL auth functions and grants correctly first. Follow these instructions: http://postgrest.com/examples/users/ After completing the configuration, be sure to create a user with email, password, role, and verified flag. We'll use that user to login in the code below. Install the required libraries pip install requests pip install requests-jwt Then, from a python interpreter or script: import requests import requests_jwt import json # email and password auth through postgrest resp = requests.post('http://localhost:3000/rpc/login', json={"email": "you@yours.com", "pass": "dog"}) if resp.status_code != 200: raise Exception() # JWT auth using the token above token = json.loads(resp.text)['token'] auth = requests_jwt.JWTAuth(token) if r.status_code != 200: raise Exception() # Handle pagination using the Range header for i in range(0, upper_bound, 20): this_range = '{0}-{1}'.format(i, i+20 if i+20 < upper_bound else upper_bound) headers = {"Range": "{}".format(this_range)} r = requests.get('http://localhost:3000/posts', auth=auth, headers=headers) if r.status_code != 200: raise Exception() page = r.json() # put page into pagination control or the like The preceding HTTP client example should work on Python 3.x. If you're using python < 3.x you may need to change the print functions to statements or use: from __future__ import print_function
Update doc with pagination using Range header
Update doc with pagination using Range header
Markdown
mit
NotBrianZach/postgrest,league/postgrest,begriffs/postgrest,steve-chavez/postgrest,steve-chavez/postgrest,diogob/postgrest,motiz88/postgrest,ruslantalpa/postgrest,Skyfold/postgrest
markdown
## Code Before: This code relies on setting up the PostgreSQL auth functions and grants correctly first. Follow these instructions: http://postgrest.com/examples/users/ After completing the configuration, be sure to create a user with email, password, role, and verified flag. We'll use that user to login in the code below. Install the required libraries pip install requests pip install requests-jwt Then, from a python interpreter or script: import requests import requests_jwt import json # email and password auth through postgrest resp = requests.post('http://localhost:3000/rpc/login', json={"email": "you@yours.com", "pass": "dog"}) if resp.status_code != 200: raise Exception() # JWT auth using the token above token = json.loads(resp.text)['token'] auth = requests_jwt.JWTAuth(token) r = requests.get('http://localhost:3000/weight', auth=auth) if r.status_code != 200: raise Exception() for each in r.json(): # do as you wish with each row print(each) The preceding HTTP client example should work on Python 3.x. If you're using python < 3.x you may need to change the print functions to statements or use: from __future__ import print_function ## Instruction: Update doc with pagination using Range header ## Code After: This code relies on setting up the PostgreSQL auth functions and grants correctly first. Follow these instructions: http://postgrest.com/examples/users/ After completing the configuration, be sure to create a user with email, password, role, and verified flag. We'll use that user to login in the code below. Install the required libraries pip install requests pip install requests-jwt Then, from a python interpreter or script: import requests import requests_jwt import json # email and password auth through postgrest resp = requests.post('http://localhost:3000/rpc/login', json={"email": "you@yours.com", "pass": "dog"}) if resp.status_code != 200: raise Exception() # JWT auth using the token above token = json.loads(resp.text)['token'] auth = requests_jwt.JWTAuth(token) if r.status_code != 200: raise Exception() # Handle pagination using the Range header for i in range(0, upper_bound, 20): this_range = '{0}-{1}'.format(i, i+20 if i+20 < upper_bound else upper_bound) headers = {"Range": "{}".format(this_range)} r = requests.get('http://localhost:3000/posts', auth=auth, headers=headers) if r.status_code != 200: raise Exception() page = r.json() # put page into pagination control or the like The preceding HTTP client example should work on Python 3.x. If you're using python < 3.x you may need to change the print functions to statements or use: from __future__ import print_function
This code relies on setting up the PostgreSQL auth functions and grants correctly first. Follow these instructions: http://postgrest.com/examples/users/ After completing the configuration, be sure to create a user with email, password, role, and verified flag. We'll use that user to login in the code below. Install the required libraries pip install requests pip install requests-jwt Then, from a python interpreter or script: import requests import requests_jwt import json # email and password auth through postgrest resp = requests.post('http://localhost:3000/rpc/login', json={"email": "you@yours.com", "pass": "dog"}) if resp.status_code != 200: raise Exception() # JWT auth using the token above token = json.loads(resp.text)['token'] auth = requests_jwt.JWTAuth(token) - r = requests.get('http://localhost:3000/weight', auth=auth) if r.status_code != 200: raise Exception() - for each in r.json(): - # do as you wish with each row - print(each) + # Handle pagination using the Range header + for i in range(0, upper_bound, 20): + this_range = '{0}-{1}'.format(i, i+20 if i+20 < upper_bound else upper_bound) + headers = {"Range": "{}".format(this_range)} + r = requests.get('http://localhost:3000/posts', auth=auth, headers=headers) + if r.status_code != 200: + raise Exception() + page = r.json() + # put page into pagination control or the like The preceding HTTP client example should work on Python 3.x. If you're using python < 3.x you may need to change the print functions to statements or use: from __future__ import print_function
13
0.351351
9
4
4ae3b77847eeefd07d83f863c6ec71d7fdf750cb
turbustat/tests/test_rfft_to_fft.py
turbustat/tests/test_rfft_to_fft.py
from turbustat.statistics.rfft_to_fft import rfft_to_fft from ._testing_data import dataset1 import numpy as np import numpy.testing as npt from unittest import TestCase class testRFFT(TestCase): """docstring for testRFFT""" def __init__(self): self.dataset1 = dataset1 self.comp_rfft = rfft_to_fft(self.dataset1) def rfft_to_rfft(self): test_rfft = np.abs(np.fft.rfftn(self.dataset1)) shape2 = test_rfft.shape[-1] npt.assert_allclose(test_rfft, self.comp_rfft[:, :, :shape2+1]) def fft_to_rfft(self): test_fft = np.abs(np.fft.fftn(self.dataset1)) npt.assert_allclose(test_fft, self.comp_rfft)
import pytest from ..statistics.rfft_to_fft import rfft_to_fft from ._testing_data import dataset1 import numpy as np import numpy.testing as npt def test_rfft_to_rfft(): comp_rfft = rfft_to_fft(dataset1['moment0'][0]) test_rfft = np.abs(np.fft.rfftn(dataset1['moment0'][0])) shape2 = test_rfft.shape[-1] npt.assert_allclose(test_rfft, comp_rfft[:, :shape2]) def test_fft_to_rfft(): comp_rfft = rfft_to_fft(dataset1['moment0'][0]) test_fft = np.abs(np.fft.fftn(dataset1['moment0'][0])) npt.assert_allclose(test_fft, comp_rfft)
Fix and update the rfft tests
Fix and update the rfft tests
Python
mit
e-koch/TurbuStat,Astroua/TurbuStat
python
## Code Before: from turbustat.statistics.rfft_to_fft import rfft_to_fft from ._testing_data import dataset1 import numpy as np import numpy.testing as npt from unittest import TestCase class testRFFT(TestCase): """docstring for testRFFT""" def __init__(self): self.dataset1 = dataset1 self.comp_rfft = rfft_to_fft(self.dataset1) def rfft_to_rfft(self): test_rfft = np.abs(np.fft.rfftn(self.dataset1)) shape2 = test_rfft.shape[-1] npt.assert_allclose(test_rfft, self.comp_rfft[:, :, :shape2+1]) def fft_to_rfft(self): test_fft = np.abs(np.fft.fftn(self.dataset1)) npt.assert_allclose(test_fft, self.comp_rfft) ## Instruction: Fix and update the rfft tests ## Code After: import pytest from ..statistics.rfft_to_fft import rfft_to_fft from ._testing_data import dataset1 import numpy as np import numpy.testing as npt def test_rfft_to_rfft(): comp_rfft = rfft_to_fft(dataset1['moment0'][0]) test_rfft = np.abs(np.fft.rfftn(dataset1['moment0'][0])) shape2 = test_rfft.shape[-1] npt.assert_allclose(test_rfft, comp_rfft[:, :shape2]) def test_fft_to_rfft(): comp_rfft = rfft_to_fft(dataset1['moment0'][0]) test_fft = np.abs(np.fft.fftn(dataset1['moment0'][0])) npt.assert_allclose(test_fft, comp_rfft)
+ import pytest + - from turbustat.statistics.rfft_to_fft import rfft_to_fft ? ^^^^^^^^^ + from ..statistics.rfft_to_fft import rfft_to_fft ? ^ from ._testing_data import dataset1 import numpy as np import numpy.testing as npt - from unittest import TestCase + def test_rfft_to_rfft(): - class testRFFT(TestCase): - """docstring for testRFFT""" - def __init__(self): - self.dataset1 = dataset1 - self.comp_rfft = rfft_to_fft(self.dataset1) + comp_rfft = rfft_to_fft(dataset1['moment0'][0]) - def rfft_to_rfft(self): - test_rfft = np.abs(np.fft.rfftn(self.dataset1)) ? ---- ----- + test_rfft = np.abs(np.fft.rfftn(dataset1['moment0'][0])) ? ++++++++++++++ - shape2 = test_rfft.shape[-1] ? ---- + shape2 = test_rfft.shape[-1] - npt.assert_allclose(test_rfft, self.comp_rfft[:, :, :shape2+1]) ? ---- ----- --- -- + npt.assert_allclose(test_rfft, comp_rfft[:, :shape2]) - def fft_to_rfft(self): - test_fft = np.abs(np.fft.fftn(self.dataset1)) + def test_fft_to_rfft(): + comp_rfft = rfft_to_fft(dataset1['moment0'][0]) + + test_fft = np.abs(np.fft.fftn(dataset1['moment0'][0])) + - npt.assert_allclose(test_fft, self.comp_rfft) ? ---- ----- + npt.assert_allclose(test_fft, comp_rfft)
28
1
14
14
4701dcb5f66b1b28c494c88875d591ed50eff93e
.eslintrc.yml
.eslintrc.yml
root: true extends: semistandard rules: indent: - error - 4 camelcase: off padded-blocks: off operator-linebreak: off no-throw-literal: off linebreak-style: - error - unix
root: true extends: semistandard rules: indent: - error - 4 camelcase: off padded-blocks: off operator-linebreak: off no-throw-literal: off linebreak-style: - error - unix promise/catch-or-return: error
Add ESLint rule against unhandled promises
Add ESLint rule against unhandled promises
YAML
apache-2.0
apache/cordova-lib,shazron/cordova-lib,apache/cordova-lib,shazron/cordova-lib,shazron/cordova-lib,shazron/cordova-lib,shazron/cordova-lib,apache/cordova-lib,apache/cordova-lib,apache/cordova-lib,shazron/cordova-lib
yaml
## Code Before: root: true extends: semistandard rules: indent: - error - 4 camelcase: off padded-blocks: off operator-linebreak: off no-throw-literal: off linebreak-style: - error - unix ## Instruction: Add ESLint rule against unhandled promises ## Code After: root: true extends: semistandard rules: indent: - error - 4 camelcase: off padded-blocks: off operator-linebreak: off no-throw-literal: off linebreak-style: - error - unix promise/catch-or-return: error
root: true extends: semistandard rules: indent: - error - 4 camelcase: off padded-blocks: off operator-linebreak: off no-throw-literal: off linebreak-style: - error - unix + promise/catch-or-return: error
1
0.076923
1
0
716b73ccd5d08d14d045a3d98bc53161a459fc48
app/components/elements/Tooltip.jsx
app/components/elements/Tooltip.jsx
import React from 'react'; import {LinkWithTooltip} from 'react-foundation-components/lib/global/tooltip'; export default ({children, t}) => { //return (<LinkWithTooltip tooltipContent={t} tooltipPosition="top" tooltipIndicator={false}> // {children} //</LinkWithTooltip>); return <span title={t}>{children}</span>; }
import React from 'react'; import {LinkWithTooltip} from 'react-foundation-components/lib/global/tooltip'; export default ({children, t}) => { //return (<LinkWithTooltip tooltipContent={t} tooltipPosition="top" tooltipIndicator={false}> // {children} //</LinkWithTooltip>); return <span style={{cursor: "help"}} title={t}>{children}</span>; }
Use 'help' cursor to indicate tooltips
Use 'help' cursor to indicate tooltips
JSX
mit
steemit/steemit.com,enisey14/platform,TimCliff/steemit.com,TimCliff/steemit.com,steemit-intl/steemit.com,GolosChain/tolstoy,enisey14/platform,steemit/steemit.com,steemit-intl/steemit.com,steemit/steemit.com,GolosChain/tolstoy,GolosChain/tolstoy,TimCliff/steemit.com
jsx
## Code Before: import React from 'react'; import {LinkWithTooltip} from 'react-foundation-components/lib/global/tooltip'; export default ({children, t}) => { //return (<LinkWithTooltip tooltipContent={t} tooltipPosition="top" tooltipIndicator={false}> // {children} //</LinkWithTooltip>); return <span title={t}>{children}</span>; } ## Instruction: Use 'help' cursor to indicate tooltips ## Code After: import React from 'react'; import {LinkWithTooltip} from 'react-foundation-components/lib/global/tooltip'; export default ({children, t}) => { //return (<LinkWithTooltip tooltipContent={t} tooltipPosition="top" tooltipIndicator={false}> // {children} //</LinkWithTooltip>); return <span style={{cursor: "help"}} title={t}>{children}</span>; }
import React from 'react'; import {LinkWithTooltip} from 'react-foundation-components/lib/global/tooltip'; export default ({children, t}) => { //return (<LinkWithTooltip tooltipContent={t} tooltipPosition="top" tooltipIndicator={false}> // {children} //</LinkWithTooltip>); - return <span title={t}>{children}</span>; + return <span style={{cursor: "help"}} title={t}>{children}</span>; ? +++++++++++++++++++++++++ }
2
0.222222
1
1
1243c71642e6ae1eb1422e7de1c0cf8d0b252b21
app/views/home/index.html.erb
app/views/home/index.html.erb
<div class ="container-fluid"> <h1 class="landing-title">Welcome to Prayerly</h1> <%= link_to "All prayer categories", categories_path %> <div class="video-container"> <!-- <video autoplay loop muted> <source src="lit_candle.mp4" type="video/mp4"> <source src="lit_candle.webm" type="video/webm"> </video> --> <%= video_tag "lit_candle.mp4", autoplay: :autoplay, loop: :loop%> </div>
<div class="container-fluid"> <h1 class="landing-title">Welcome to Prayerly</h1> <%= button_to "Enter", categories_path, :method => :get, id: "enter_button" class: "btn btn-primary" %> <div class="video-container"> <!-- <video autoplay loop muted> <source src="lit_candle.mp4" type="video/mp4"> <source src="lit_candle.webm" type="video/webm"> </video> --> <%= video_tag "lit_candle.mp4", autoplay: :autoplay, loop: :loop %> </div>
Make a link_to into a button to get to categories index
Make a link_to into a button to get to categories index
HTML+ERB
mit
cloverharvest/prayerly,cloverharvest/prayerly,cloverharvest/prayerly
html+erb
## Code Before: <div class ="container-fluid"> <h1 class="landing-title">Welcome to Prayerly</h1> <%= link_to "All prayer categories", categories_path %> <div class="video-container"> <!-- <video autoplay loop muted> <source src="lit_candle.mp4" type="video/mp4"> <source src="lit_candle.webm" type="video/webm"> </video> --> <%= video_tag "lit_candle.mp4", autoplay: :autoplay, loop: :loop%> </div> ## Instruction: Make a link_to into a button to get to categories index ## Code After: <div class="container-fluid"> <h1 class="landing-title">Welcome to Prayerly</h1> <%= button_to "Enter", categories_path, :method => :get, id: "enter_button" class: "btn btn-primary" %> <div class="video-container"> <!-- <video autoplay loop muted> <source src="lit_candle.mp4" type="video/mp4"> <source src="lit_candle.webm" type="video/webm"> </video> --> <%= video_tag "lit_candle.mp4", autoplay: :autoplay, loop: :loop %> </div>
- <div class ="container-fluid"> ? - + <div class="container-fluid"> <h1 class="landing-title">Welcome to Prayerly</h1> - <%= link_to "All prayer categories", categories_path %> + <%= button_to "Enter", categories_path, :method => :get, id: "enter_button" class: "btn btn-primary" %> <div class="video-container"> <!-- <video autoplay loop muted> <source src="lit_candle.mp4" type="video/mp4"> <source src="lit_candle.webm" type="video/webm"> </video> --> - <%= video_tag "lit_candle.mp4", autoplay: :autoplay, loop: :loop%> + <%= video_tag "lit_candle.mp4", autoplay: :autoplay, loop: :loop %> ? + </div>
6
0.6
3
3
77cb4c31cb9d36ff6bd2de47e8f16be5a85ce044
README.md
README.md
This repository aims to host the versioned and authoritative source data for the OWASP ASVS project. ## Why JSON? In order to build on top of this data a strict and normalized format was required ( unlike say storing everything in MarkDown or HTML) as it's much easier to remove strictness then to add it. There are many data serialization formats, those with broad support include: XML, CSV and YAML. JSON requires less syntax for the equivalent semantics than XML. JSON has a formal specification, that implementations actually follow, unlike CSV. JSON has better support and is wider known than YAML. ## Why NodeJS executables? Not all OWASP users may be familiar with Python, PHP, Java, C, C++, Bash, etc. But all should be familiar with JavaScript. # Versioning Using Semver2. # Packaging Feel free to send a PR with support for alternate package formats!
This repository aims to host the versioned and authoritative source data for the OWASP ASVS project. ## Why JSON? In order to build on top of this data a strict and normalized format was required ( unlike say storing everything in MarkDown or HTML) as it's much easier to remove strictness then to add it. There are many data serialization formats, those with broad support include: XML, CSV and YAML. JSON requires less syntax for the equivalent semantics than XML. JSON has a formal specification, that implementations actually follow, unlike CSV. JSON has better support and is wider known than YAML. # Versioning Using Semver2. # Packaging Feel free to send a PR with support for alternate package formats!
Remove the snobbery about Node, any tools in any languages are allowed as long as they can be executed by maintainers
Remove the snobbery about Node, any tools in any languages are allowed as long as they can be executed by maintainers
Markdown
apache-2.0
ibuildingsnl/owasp-asvs
markdown
## Code Before: This repository aims to host the versioned and authoritative source data for the OWASP ASVS project. ## Why JSON? In order to build on top of this data a strict and normalized format was required ( unlike say storing everything in MarkDown or HTML) as it's much easier to remove strictness then to add it. There are many data serialization formats, those with broad support include: XML, CSV and YAML. JSON requires less syntax for the equivalent semantics than XML. JSON has a formal specification, that implementations actually follow, unlike CSV. JSON has better support and is wider known than YAML. ## Why NodeJS executables? Not all OWASP users may be familiar with Python, PHP, Java, C, C++, Bash, etc. But all should be familiar with JavaScript. # Versioning Using Semver2. # Packaging Feel free to send a PR with support for alternate package formats! ## Instruction: Remove the snobbery about Node, any tools in any languages are allowed as long as they can be executed by maintainers ## Code After: This repository aims to host the versioned and authoritative source data for the OWASP ASVS project. ## Why JSON? In order to build on top of this data a strict and normalized format was required ( unlike say storing everything in MarkDown or HTML) as it's much easier to remove strictness then to add it. There are many data serialization formats, those with broad support include: XML, CSV and YAML. JSON requires less syntax for the equivalent semantics than XML. JSON has a formal specification, that implementations actually follow, unlike CSV. JSON has better support and is wider known than YAML. # Versioning Using Semver2. # Packaging Feel free to send a PR with support for alternate package formats!
This repository aims to host the versioned and authoritative source data for the OWASP ASVS project. ## Why JSON? In order to build on top of this data a strict and normalized format was required ( unlike say storing everything in MarkDown or HTML) as it's much easier to remove strictness then to add it. There are many data serialization formats, those with broad support include: XML, CSV and YAML. JSON requires less syntax for the equivalent semantics than XML. JSON has a formal specification, that implementations actually follow, unlike CSV. JSON has better support and is wider known than YAML. - ## Why NodeJS executables? - Not all OWASP users may be familiar with Python, PHP, Java, C, C++, Bash, etc. - But all should be familiar with JavaScript. - # Versioning Using Semver2. # Packaging Feel free to send a PR with support for alternate package formats!
4
0.190476
0
4
75df57fa409b6f1a13df3db7692ced6a45b4b11c
javersion-jdbc/src/test/resources/db/migration/common/V3__test.sql
javersion-jdbc/src/test/resources/db/migration/common/V3__test.sql
alter table DOCUMENT_VERSION add column ID bigint; alter table DOCUMENT_VERSION add column NAME varchar(255); alter table ENTITY add column NAME varchar(255); alter table ENTITY_VERSION add column COMMENT varchar(255);
alter table DOCUMENT_VERSION add column ID bigint; alter table DOCUMENT_VERSION add column NAME varchar(255); alter table ENTITY add column NAME varchar(255); alter table ENTITY_VERSION add column COMMENT varchar(255); create index ENTITY_VERSION_PROPERTY_STATUS_IDX on ENTITY_VERSION_PROPERTY (STATUS);
Add index to speed up tests
Add index to speed up tests
SQL
apache-2.0
ssaarela/javersion,ssaarela/javersion,ssaarela/javersion
sql
## Code Before: alter table DOCUMENT_VERSION add column ID bigint; alter table DOCUMENT_VERSION add column NAME varchar(255); alter table ENTITY add column NAME varchar(255); alter table ENTITY_VERSION add column COMMENT varchar(255); ## Instruction: Add index to speed up tests ## Code After: alter table DOCUMENT_VERSION add column ID bigint; alter table DOCUMENT_VERSION add column NAME varchar(255); alter table ENTITY add column NAME varchar(255); alter table ENTITY_VERSION add column COMMENT varchar(255); create index ENTITY_VERSION_PROPERTY_STATUS_IDX on ENTITY_VERSION_PROPERTY (STATUS);
alter table DOCUMENT_VERSION add column ID bigint; alter table DOCUMENT_VERSION add column NAME varchar(255); alter table ENTITY add column NAME varchar(255); alter table ENTITY_VERSION add column COMMENT varchar(255); + + create index ENTITY_VERSION_PROPERTY_STATUS_IDX on ENTITY_VERSION_PROPERTY (STATUS);
2
0.4
2
0
28c6fdf6a8ae505317207dc4adeeba45cc59b855
lib/matasano_crypto_challenges/set_01/challenge_01.rb
lib/matasano_crypto_challenges/set_01/challenge_01.rb
require 'base64' module MatasanoCryptoChallenges module Set01; end end class MatasanoCryptoChallenges::Set01::Challenge01 HEX = '49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d' def call base64 end private def base64 Base64.strict_encode64 binary_string end def binary_string bin = [] each_byte do |byte| bin << byte end bin.join end def each_byte HEX.chars.each_slice 2 do |nibbles| yield nibbles.join.to_i(16).chr end end end
module MatasanoCryptoChallenges module Set01; end end class MatasanoCryptoChallenges::Set01::Challenge01 BASE64 = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /) HEX = '49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d' def call base64 end private def base64 base64 = [] each_6bit_slice do |bits| base64 << BASE64[bits.to_i(2)] end base64.join end def each_6bit_slice HEX.chars.each_slice 6 do |nibbles_3_bytes| bits_3_bytes = [] nibbles_3_bytes.each_slice 2 do |nibbles_1_byte| bits_3_bytes << nibbles_1_byte.join.to_i(16).to_s(2).rjust(8, '0') end bits_3_bytes.join.chars.each_slice 6 do |bits| yield bits.join end end end end
Implement Base-64 encoding instead of using the Ruby stdlib
Implement Base-64 encoding instead of using the Ruby stdlib This is a naive implementation that doesn't handle '=' padding.
Ruby
mit
njonsson/matasano_crypto_challenges
ruby
## Code Before: require 'base64' module MatasanoCryptoChallenges module Set01; end end class MatasanoCryptoChallenges::Set01::Challenge01 HEX = '49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d' def call base64 end private def base64 Base64.strict_encode64 binary_string end def binary_string bin = [] each_byte do |byte| bin << byte end bin.join end def each_byte HEX.chars.each_slice 2 do |nibbles| yield nibbles.join.to_i(16).chr end end end ## Instruction: Implement Base-64 encoding instead of using the Ruby stdlib This is a naive implementation that doesn't handle '=' padding. ## Code After: module MatasanoCryptoChallenges module Set01; end end class MatasanoCryptoChallenges::Set01::Challenge01 BASE64 = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /) HEX = '49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d' def call base64 end private def base64 base64 = [] each_6bit_slice do |bits| base64 << BASE64[bits.to_i(2)] end base64.join end def each_6bit_slice HEX.chars.each_slice 6 do |nibbles_3_bytes| bits_3_bytes = [] nibbles_3_bytes.each_slice 2 do |nibbles_1_byte| bits_3_bytes << nibbles_1_byte.join.to_i(16).to_s(2).rjust(8, '0') end bits_3_bytes.join.chars.each_slice 6 do |bits| yield bits.join end end end end
- require 'base64' - module MatasanoCryptoChallenges module Set01; end end class MatasanoCryptoChallenges::Set01::Challenge01 + + BASE64 = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + a b c d e f g h i j k l m n o p q r s t u v w x y z + 0 1 2 3 4 5 6 7 8 9 + /) HEX = '49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d' def call base64 end private def base64 - Base64.strict_encode64 binary_string + base64 = [] + each_6bit_slice do |bits| + base64 << BASE64[bits.to_i(2)] + end + base64.join end - def binary_string - bin = [] - each_byte do |byte| - bin << byte - end - bin.join - end - - def each_byte ? ^ + def each_6bit_slice ? + ^ +++++ - HEX.chars.each_slice 2 do |nibbles| ? ^ + HEX.chars.each_slice 6 do |nibbles_3_bytes| ? ^ ++++++++ - yield nibbles.join.to_i(16).chr + bits_3_bytes = [] + nibbles_3_bytes.each_slice 2 do |nibbles_1_byte| + bits_3_bytes << nibbles_1_byte.join.to_i(16).to_s(2).rjust(8, '0') + end + bits_3_bytes.join.chars.each_slice 6 do |bits| + yield bits.join + end end end end
32
0.864865
18
14
c91d32180ff186b38983eaf2175105d9c6bbd169
modules/puppet/spec/classes/puppet__master_spec.rb
modules/puppet/spec/classes/puppet__master_spec.rb
require_relative '../../../../spec_helper' describe 'puppet::master', :type => :class do # concat_basedir needed for puppetdb module (for postgresql) let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat/'}} it do is_expected.to contain_file('/etc/init/puppetmaster.conf'). with_content(/unicornherder -u unicorn -p \$PIDFILE -- -p 9090 -c \/etc\/puppet\/unicorn.conf/) is_expected.to contain_service('puppetmaster').with_provider('upstart').with_ensure('running') end it { is_expected.to contain_class('puppetdb') } it { is_expected.to contain_class('puppet::master::nginx') } it do is_expected.to contain_class('puppet') is_expected.to contain_class('puppet::master::config') is_expected.to contain_file('/etc/puppet/config.ru') end end
require_relative '../../../../spec_helper' describe 'puppet::master', :type => :class do # concat_basedir needed for puppetdb module (for postgresql) let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat/', :id => 'root', :kernel => 'Linux', :path => 'concatted_file', }} it do is_expected.to contain_file('/etc/init/puppetmaster.conf'). with_content(/unicornherder -u unicorn -p \$PIDFILE -- -p 9090 -c \/etc\/puppet\/unicorn.conf/) is_expected.to contain_service('puppetmaster').with_provider('upstart').with_ensure('running') end it { is_expected.to contain_class('puppetdb') } it { is_expected.to contain_class('puppet::master::nginx') } it do is_expected.to contain_class('puppet') is_expected.to contain_class('puppet::master::config') is_expected.to contain_file('/etc/puppet/config.ru') end end
Add stub values that allow concat tests to pass under strict.
Add stub values that allow concat tests to pass under strict.
Ruby
mit
alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet
ruby
## Code Before: require_relative '../../../../spec_helper' describe 'puppet::master', :type => :class do # concat_basedir needed for puppetdb module (for postgresql) let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat/'}} it do is_expected.to contain_file('/etc/init/puppetmaster.conf'). with_content(/unicornherder -u unicorn -p \$PIDFILE -- -p 9090 -c \/etc\/puppet\/unicorn.conf/) is_expected.to contain_service('puppetmaster').with_provider('upstart').with_ensure('running') end it { is_expected.to contain_class('puppetdb') } it { is_expected.to contain_class('puppet::master::nginx') } it do is_expected.to contain_class('puppet') is_expected.to contain_class('puppet::master::config') is_expected.to contain_file('/etc/puppet/config.ru') end end ## Instruction: Add stub values that allow concat tests to pass under strict. ## Code After: require_relative '../../../../spec_helper' describe 'puppet::master', :type => :class do # concat_basedir needed for puppetdb module (for postgresql) let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat/', :id => 'root', :kernel => 'Linux', :path => 'concatted_file', }} it do is_expected.to contain_file('/etc/init/puppetmaster.conf'). with_content(/unicornherder -u unicorn -p \$PIDFILE -- -p 9090 -c \/etc\/puppet\/unicorn.conf/) is_expected.to contain_service('puppetmaster').with_provider('upstart').with_ensure('running') end it { is_expected.to contain_class('puppetdb') } it { is_expected.to contain_class('puppet::master::nginx') } it do is_expected.to contain_class('puppet') is_expected.to contain_class('puppet::master::config') is_expected.to contain_file('/etc/puppet/config.ru') end end
require_relative '../../../../spec_helper' describe 'puppet::master', :type => :class do # concat_basedir needed for puppetdb module (for postgresql) + let(:facts) {{ - let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat/'}} ? ----------- -- ^^ + :concat_basedir => '/var/lib/puppet/concat/', ? ^ + :id => 'root', + :kernel => 'Linux', + :path => 'concatted_file', + }} it do is_expected.to contain_file('/etc/init/puppetmaster.conf'). with_content(/unicornherder -u unicorn -p \$PIDFILE -- -p 9090 -c \/etc\/puppet\/unicorn.conf/) is_expected.to contain_service('puppetmaster').with_provider('upstart').with_ensure('running') end it { is_expected.to contain_class('puppetdb') } it { is_expected.to contain_class('puppet::master::nginx') } it do is_expected.to contain_class('puppet') is_expected.to contain_class('puppet::master::config') is_expected.to contain_file('/etc/puppet/config.ru') end end
7
0.333333
6
1
f4dcff836c5a4ce5b4fd8627c069f81ff8d664a6
src/pureComponent.js
src/pureComponent.js
/* eslint-disable no-unused-vars, class-methods-use-this */ import { Component } from 'react'; class ReactComponentUpdate extends Component { componentWillMount() { this.componentWillMountOrReceiveProps(this.props); } componentDidMount() { this.componentDidMountOrUpdate(this.props, this.state); } componentWillReceiveProps(nextProps) { this.componentWillMountOrReceiveProps(nextProps); } componentDidUpdate(prevProps, prevState) { this.componentDidMountOrUpdate(prevProps, prevState); } componentWillMountOrReceiveProps(nextProps) {} componentDidMountOrUpdate(prevProps, prevState) {} } export default ReactComponentUpdate;
/* eslint-disable no-unused-vars, class-methods-use-this */ import { PureComponent } from 'react'; class ReactPureComponentUpdate extends PureComponent { componentWillMount() { this.componentWillMountOrReceiveProps(this.props); } componentDidMount() { this.componentDidMountOrUpdate(this.props, this.state); } componentWillReceiveProps(nextProps) { this.componentWillMountOrReceiveProps(nextProps); } componentDidUpdate(prevProps, prevState) { this.componentDidMountOrUpdate(prevProps, prevState); } componentWillMountOrReceiveProps(nextProps) {} componentDidMountOrUpdate(prevProps, prevState) {} } export default ReactPureComponentUpdate;
Update PureComponent to extend React.PureComponent.
Update PureComponent to extend React.PureComponent.
JavaScript
mit
wimpyprogrammer/react-component-update
javascript
## Code Before: /* eslint-disable no-unused-vars, class-methods-use-this */ import { Component } from 'react'; class ReactComponentUpdate extends Component { componentWillMount() { this.componentWillMountOrReceiveProps(this.props); } componentDidMount() { this.componentDidMountOrUpdate(this.props, this.state); } componentWillReceiveProps(nextProps) { this.componentWillMountOrReceiveProps(nextProps); } componentDidUpdate(prevProps, prevState) { this.componentDidMountOrUpdate(prevProps, prevState); } componentWillMountOrReceiveProps(nextProps) {} componentDidMountOrUpdate(prevProps, prevState) {} } export default ReactComponentUpdate; ## Instruction: Update PureComponent to extend React.PureComponent. ## Code After: /* eslint-disable no-unused-vars, class-methods-use-this */ import { PureComponent } from 'react'; class ReactPureComponentUpdate extends PureComponent { componentWillMount() { this.componentWillMountOrReceiveProps(this.props); } componentDidMount() { this.componentDidMountOrUpdate(this.props, this.state); } componentWillReceiveProps(nextProps) { this.componentWillMountOrReceiveProps(nextProps); } componentDidUpdate(prevProps, prevState) { this.componentDidMountOrUpdate(prevProps, prevState); } componentWillMountOrReceiveProps(nextProps) {} componentDidMountOrUpdate(prevProps, prevState) {} } export default ReactPureComponentUpdate;
/* eslint-disable no-unused-vars, class-methods-use-this */ - import { Component } from 'react'; + import { PureComponent } from 'react'; ? ++++ - class ReactComponentUpdate extends Component { + class ReactPureComponentUpdate extends PureComponent { ? ++++ ++++ componentWillMount() { this.componentWillMountOrReceiveProps(this.props); } componentDidMount() { this.componentDidMountOrUpdate(this.props, this.state); } componentWillReceiveProps(nextProps) { this.componentWillMountOrReceiveProps(nextProps); } componentDidUpdate(prevProps, prevState) { this.componentDidMountOrUpdate(prevProps, prevState); } componentWillMountOrReceiveProps(nextProps) {} componentDidMountOrUpdate(prevProps, prevState) {} } - export default ReactComponentUpdate; + export default ReactPureComponentUpdate; ? ++++
6
0.230769
3
3
93e416c26caf55f60bad1e4089a369ac84dd1551
src/main/webapp/WEB-INF/themes/desktop/ftl/article/figure_carousel.ftl
src/main/webapp/WEB-INF/themes/desktop/ftl/article/figure_carousel.ftl
<#if article.figures?has_content> <div id="figure-carousel-section"> <h2>Figures</h2> <div id="figure-carousel"> <div class="carousel-wrapper"><#-- Horizontally scrolling view window --> <div class="slider"><#-- Large-width container --> <#list article.figures as figure> <#-- Omit figures that don't appear in article body (e.g. a striking image) --> <#if figure.contextElement?has_content> <div class="carousel-item lightbox-figure" data-doi="${figure.doi?html}"> <@siteLink handlerName="assetFile" parameters={"type": "inline", "id": figure.doi} ; src> <img src="${src?html}" <#if figure.title?has_content > alt="${figure.title?html}" </#if> /> </@siteLink> </div> </#if> </#list> </div> </div> <div class="carousel-control"> <span class="button previous"></span> <span class="button next"></span> </div> <div class="carousel-page-buttons"> </div> </div> </div> <@js src="resource/js/vendor/jquery.touchswipe.js" /> <@js src="resource/js/components/figure_carousel.js" /> <@js src="resource/js/vendor/jquery.dotdotdot.js" /> </#if>
<#if article.figures?has_content> <div id="figure-carousel-section"> <h2>Figures</h2> <div id="figure-carousel"> <div class="carousel-wrapper"><#-- Horizontally scrolling view window --> <div class="slider"><#-- Large-width container --> <#list article.figures as figure> <#-- Omit figures that don't appear in article body (e.g. a striking image) --> <#if figure.contextElement?has_content> <div class="carousel-item lightbox-figure" data-doi="${figure.doi?html}"> <@siteLink handlerName="assetFile" parameters=(versionPtr + {"type": "inline", "id": figure.doi}) ; src> <img src="${src?html}" <#if figure.title?has_content > alt="${figure.title?html}" </#if> /> </@siteLink> </div> </#if> </#list> </div> </div> <div class="carousel-control"> <span class="button previous"></span> <span class="button next"></span> </div> <div class="carousel-page-buttons"> </div> </div> </div> <@js src="resource/js/vendor/jquery.touchswipe.js" /> <@js src="resource/js/components/figure_carousel.js" /> <@js src="resource/js/vendor/jquery.dotdotdot.js" /> </#if>
Apply version pointer to figure carousel
DPRO-2772: Apply version pointer to figure carousel
FreeMarker
mit
PLOS/wombat,PLOS/wombat,PLOS/wombat,PLOS/wombat
freemarker
## Code Before: <#if article.figures?has_content> <div id="figure-carousel-section"> <h2>Figures</h2> <div id="figure-carousel"> <div class="carousel-wrapper"><#-- Horizontally scrolling view window --> <div class="slider"><#-- Large-width container --> <#list article.figures as figure> <#-- Omit figures that don't appear in article body (e.g. a striking image) --> <#if figure.contextElement?has_content> <div class="carousel-item lightbox-figure" data-doi="${figure.doi?html}"> <@siteLink handlerName="assetFile" parameters={"type": "inline", "id": figure.doi} ; src> <img src="${src?html}" <#if figure.title?has_content > alt="${figure.title?html}" </#if> /> </@siteLink> </div> </#if> </#list> </div> </div> <div class="carousel-control"> <span class="button previous"></span> <span class="button next"></span> </div> <div class="carousel-page-buttons"> </div> </div> </div> <@js src="resource/js/vendor/jquery.touchswipe.js" /> <@js src="resource/js/components/figure_carousel.js" /> <@js src="resource/js/vendor/jquery.dotdotdot.js" /> </#if> ## Instruction: DPRO-2772: Apply version pointer to figure carousel ## Code After: <#if article.figures?has_content> <div id="figure-carousel-section"> <h2>Figures</h2> <div id="figure-carousel"> <div class="carousel-wrapper"><#-- Horizontally scrolling view window --> <div class="slider"><#-- Large-width container --> <#list article.figures as figure> <#-- Omit figures that don't appear in article body (e.g. a striking image) --> <#if figure.contextElement?has_content> <div class="carousel-item lightbox-figure" data-doi="${figure.doi?html}"> <@siteLink handlerName="assetFile" parameters=(versionPtr + {"type": "inline", "id": figure.doi}) ; src> <img src="${src?html}" <#if figure.title?has_content > alt="${figure.title?html}" </#if> /> </@siteLink> </div> </#if> </#list> </div> </div> <div class="carousel-control"> <span class="button previous"></span> <span class="button next"></span> </div> <div class="carousel-page-buttons"> </div> </div> </div> <@js src="resource/js/vendor/jquery.touchswipe.js" /> <@js src="resource/js/components/figure_carousel.js" /> <@js src="resource/js/vendor/jquery.dotdotdot.js" /> </#if>
<#if article.figures?has_content> <div id="figure-carousel-section"> <h2>Figures</h2> <div id="figure-carousel"> <div class="carousel-wrapper"><#-- Horizontally scrolling view window --> <div class="slider"><#-- Large-width container --> <#list article.figures as figure> <#-- Omit figures that don't appear in article body (e.g. a striking image) --> <#if figure.contextElement?has_content> <div class="carousel-item lightbox-figure" data-doi="${figure.doi?html}"> - <@siteLink handlerName="assetFile" parameters={"type": "inline", "id": figure.doi} ; src> + <@siteLink handlerName="assetFile" parameters=(versionPtr + {"type": "inline", "id": figure.doi}) ; src> ? ++++++++++++++ + <img src="${src?html}" <#if figure.title?has_content > alt="${figure.title?html}" </#if> /> </@siteLink> </div> </#if> </#list> </div> </div> <div class="carousel-control"> <span class="button previous"></span> <span class="button next"></span> </div> <div class="carousel-page-buttons"> </div> </div> </div> <@js src="resource/js/vendor/jquery.touchswipe.js" /> <@js src="resource/js/components/figure_carousel.js" /> <@js src="resource/js/vendor/jquery.dotdotdot.js" /> </#if>
2
0.046512
1
1
f28a3c16cbd13b925ab983bb407eec325f4bb84e
Casks/0ad.rb
Casks/0ad.rb
cask :v1 => '0ad' do version '0.0.17-alpha' sha256 '7493a8775946f56482939ee51d96ae41a7a8e114ccf050e1406ff4ebf5cb6a7f' # wildfiregames.com is the official download host per the vendor homepage url "http://releases.wildfiregames.com/0ad-#{version}-osx64.dmg" name '0 A.D.' homepage 'http://www.play0ad.com/' license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder app '0ad.app' end
cask :v1 => '0ad' do version '0.0.17-alpha' sha256 '7493a8775946f56482939ee51d96ae41a7a8e114ccf050e1406ff4ebf5cb6a7f' # wildfiregames.com is the official download host per the vendor homepage url "http://releases.wildfiregames.com/0ad-#{version}-osx64.dmg" name '0 A.D.' homepage 'http://www.play0ad.com/' license :oss app '0ad.app' end
Include license information for 0AD.
Include license information for 0AD. Contains a mixture of licenses, the game engine is GPL, but art assets are CC licensed, and contains many other components with differing licenses.
Ruby
bsd-2-clause
kirikiriyamama/homebrew-cask,jellyfishcoder/homebrew-cask,nrlquaker/homebrew-cask,carlmod/homebrew-cask,julienlavergne/homebrew-cask,djakarta-trap/homebrew-myCask,koenrh/homebrew-cask,enriclluelles/homebrew-cask,lcasey001/homebrew-cask,josa42/homebrew-cask,puffdad/homebrew-cask,samdoran/homebrew-cask,dustinblackman/homebrew-cask,blogabe/homebrew-cask,tsparber/homebrew-cask,kei-yamazaki/homebrew-cask,scribblemaniac/homebrew-cask,markhuber/homebrew-cask,rogeriopradoj/homebrew-cask,retbrown/homebrew-cask,mwilmer/homebrew-cask,lucasmezencio/homebrew-cask,mattfelsen/homebrew-cask,samdoran/homebrew-cask,y00rb/homebrew-cask,phpwutz/homebrew-cask,MircoT/homebrew-cask,nickpellant/homebrew-cask,xtian/homebrew-cask,morganestes/homebrew-cask,stonehippo/homebrew-cask,rkJun/homebrew-cask,moogar0880/homebrew-cask,afdnlw/homebrew-cask,psibre/homebrew-cask,cclauss/homebrew-cask,claui/homebrew-cask,barravi/homebrew-cask,larseggert/homebrew-cask,sosedoff/homebrew-cask,paulbreslin/homebrew-cask,albertico/homebrew-cask,fanquake/homebrew-cask,xtian/homebrew-cask,skatsuta/homebrew-cask,nathanielvarona/homebrew-cask,RogerThiede/homebrew-cask,gguillotte/homebrew-cask,BenjaminHCCarr/homebrew-cask,sgnh/homebrew-cask,miguelfrde/homebrew-cask,mattrobenolt/homebrew-cask,cohei/homebrew-cask,Cottser/homebrew-cask,codeurge/homebrew-cask,retbrown/homebrew-cask,theoriginalgri/homebrew-cask,a-x-/homebrew-cask,CameronGarrett/homebrew-cask,janlugt/homebrew-cask,markthetech/homebrew-cask,asins/homebrew-cask,zeusdeux/homebrew-cask,haha1903/homebrew-cask,JoelLarson/homebrew-cask,samnung/homebrew-cask,qbmiller/homebrew-cask,kei-yamazaki/homebrew-cask,bsiddiqui/homebrew-cask,mkozjak/homebrew-cask,kTitan/homebrew-cask,rajiv/homebrew-cask,fazo96/homebrew-cask,alexg0/homebrew-cask,JikkuJose/homebrew-cask,kevyau/homebrew-cask,nathancahill/homebrew-cask,leipert/homebrew-cask,mwek/homebrew-cask,bendoerr/homebrew-cask,ptb/homebrew-cask,xight/homebrew-cask,sanyer/homebrew-cask,nicolas-brousse/homebrew-cask,jasmas/homebrew-cask,m3nu/homebrew-cask,iAmGhost/homebrew-cask,sjackman/homebrew-cask,supriyantomaftuh/homebrew-cask,SentinelWarren/homebrew-cask,thii/homebrew-cask,yurrriq/homebrew-cask,rickychilcott/homebrew-cask,ebraminio/homebrew-cask,drostron/homebrew-cask,shonjir/homebrew-cask,kesara/homebrew-cask,mikem/homebrew-cask,riyad/homebrew-cask,mingzhi22/homebrew-cask,ksylvan/homebrew-cask,johntrandall/homebrew-cask,mindriot101/homebrew-cask,gibsjose/homebrew-cask,sysbot/homebrew-cask,jeanregisser/homebrew-cask,af/homebrew-cask,jtriley/homebrew-cask,victorpopkov/homebrew-cask,yurrriq/homebrew-cask,m3nu/homebrew-cask,ddm/homebrew-cask,flaviocamilo/homebrew-cask,wayou/homebrew-cask,gyndav/homebrew-cask,joschi/homebrew-cask,lucasmezencio/homebrew-cask,mfpierre/homebrew-cask,coeligena/homebrew-customized,tjnycum/homebrew-cask,zeusdeux/homebrew-cask,AnastasiaSulyagina/homebrew-cask,flada-auxv/homebrew-cask,colindunn/homebrew-cask,crmne/homebrew-cask,sebcode/homebrew-cask,MircoT/homebrew-cask,bgandon/homebrew-cask,jalaziz/homebrew-cask,mgryszko/homebrew-cask,jconley/homebrew-cask,astorije/homebrew-cask,tolbkni/homebrew-cask,hackhandslabs/homebrew-cask,hyuna917/homebrew-cask,leonmachadowilcox/homebrew-cask,mjdescy/homebrew-cask,tjt263/homebrew-cask,taherio/homebrew-cask,paour/homebrew-cask,dwkns/homebrew-cask,caskroom/homebrew-cask,mauricerkelly/homebrew-cask,leonmachadowilcox/homebrew-cask,nickpellant/homebrew-cask,vitorgalvao/homebrew-cask,kteru/homebrew-cask,jangalinski/homebrew-cask,andrewdisley/homebrew-cask,kassi/homebrew-cask,chrisRidgers/homebrew-cask,cliffcotino/homebrew-cask,pkq/homebrew-cask,fwiesel/homebrew-cask,adelinofaria/homebrew-cask,pacav69/homebrew-cask,nicolas-brousse/homebrew-cask,rajiv/homebrew-cask,Whoaa512/homebrew-cask,neil-ca-moore/homebrew-cask,FranklinChen/homebrew-cask,jbeagley52/homebrew-cask,jiashuw/homebrew-cask,scw/homebrew-cask,nathancahill/homebrew-cask,Dremora/homebrew-cask,guylabs/homebrew-cask,mjgardner/homebrew-cask,jhowtan/homebrew-cask,cfillion/homebrew-cask,andrewdisley/homebrew-cask,fazo96/homebrew-cask,askl56/homebrew-cask,shoichiaizawa/homebrew-cask,samshadwell/homebrew-cask,troyxmccall/homebrew-cask,sanchezm/homebrew-cask,moonboots/homebrew-cask,claui/homebrew-cask,lauantai/homebrew-cask,scribblemaniac/homebrew-cask,imgarylai/homebrew-cask,ayohrling/homebrew-cask,xight/homebrew-cask,dieterdemeyer/homebrew-cask,hanxue/caskroom,Ngrd/homebrew-cask,RJHsiao/homebrew-cask,kuno/homebrew-cask,skatsuta/homebrew-cask,asbachb/homebrew-cask,tedbundyjr/homebrew-cask,fanquake/homebrew-cask,ftiff/homebrew-cask,jedahan/homebrew-cask,d/homebrew-cask,cfillion/homebrew-cask,mauricerkelly/homebrew-cask,sjackman/homebrew-cask,guylabs/homebrew-cask,dvdoliveira/homebrew-cask,ebraminio/homebrew-cask,casidiablo/homebrew-cask,larseggert/homebrew-cask,Cottser/homebrew-cask,enriclluelles/homebrew-cask,royalwang/homebrew-cask,djakarta-trap/homebrew-myCask,joshka/homebrew-cask,diguage/homebrew-cask,forevergenin/homebrew-cask,xalep/homebrew-cask,unasuke/homebrew-cask,rcuza/homebrew-cask,alebcay/homebrew-cask,sosedoff/homebrew-cask,jgarber623/homebrew-cask,segiddins/homebrew-cask,jasmas/homebrew-cask,n0ts/homebrew-cask,yutarody/homebrew-cask,coneman/homebrew-cask,paour/homebrew-cask,patresi/homebrew-cask,mokagio/homebrew-cask,MerelyAPseudonym/homebrew-cask,joaocc/homebrew-cask,neverfox/homebrew-cask,dictcp/homebrew-cask,athrunsun/homebrew-cask,bsiddiqui/homebrew-cask,uetchy/homebrew-cask,thomanq/homebrew-cask,pkq/homebrew-cask,joshka/homebrew-cask,alexg0/homebrew-cask,lukasbestle/homebrew-cask,afh/homebrew-cask,shonjir/homebrew-cask,paulbreslin/homebrew-cask,gwaldo/homebrew-cask,renaudguerin/homebrew-cask,dunn/homebrew-cask,ksylvan/homebrew-cask,kostasdizas/homebrew-cask,bchatard/homebrew-cask,danielgomezrico/homebrew-cask,esebastian/homebrew-cask,renard/homebrew-cask,KosherBacon/homebrew-cask,stigkj/homebrew-caskroom-cask,My2ndAngelic/homebrew-cask,esebastian/homebrew-cask,gurghet/homebrew-cask,sscotth/homebrew-cask,decrement/homebrew-cask,deanmorin/homebrew-cask,stephenwade/homebrew-cask,joschi/homebrew-cask,andersonba/homebrew-cask,danielbayley/homebrew-cask,lolgear/homebrew-cask,toonetown/homebrew-cask,troyxmccall/homebrew-cask,pkq/homebrew-cask,julionc/homebrew-cask,englishm/homebrew-cask,rhendric/homebrew-cask,renard/homebrew-cask,miccal/homebrew-cask,xyb/homebrew-cask,tjnycum/homebrew-cask,qbmiller/homebrew-cask,ninjahoahong/homebrew-cask,tranc99/homebrew-cask,cprecioso/homebrew-cask,underyx/homebrew-cask,iAmGhost/homebrew-cask,cblecker/homebrew-cask,vitorgalvao/homebrew-cask,scribblemaniac/homebrew-cask,kronicd/homebrew-cask,klane/homebrew-cask,kongslund/homebrew-cask,slack4u/homebrew-cask,crmne/homebrew-cask,tarwich/homebrew-cask,iamso/homebrew-cask,lantrix/homebrew-cask,shishi/homebrew-cask,yuhki50/homebrew-cask,pacav69/homebrew-cask,gyndav/homebrew-cask,segiddins/homebrew-cask,ajbw/homebrew-cask,boydj/homebrew-cask,ch3n2k/homebrew-cask,ksato9700/homebrew-cask,gilesdring/homebrew-cask,buo/homebrew-cask,seanorama/homebrew-cask,faun/homebrew-cask,Labutin/homebrew-cask,gyndav/homebrew-cask,xakraz/homebrew-cask,lvicentesanchez/homebrew-cask,yurikoles/homebrew-cask,singingwolfboy/homebrew-cask,Ibuprofen/homebrew-cask,fkrone/homebrew-cask,lolgear/homebrew-cask,Fedalto/homebrew-cask,elseym/homebrew-cask,kryhear/homebrew-cask,mhubig/homebrew-cask,spruceb/homebrew-cask,JoelLarson/homebrew-cask,johntrandall/homebrew-cask,optikfluffel/homebrew-cask,jeroenseegers/homebrew-cask,xakraz/homebrew-cask,slnovak/homebrew-cask,norio-nomura/homebrew-cask,kkdd/homebrew-cask,robbiethegeek/homebrew-cask,pablote/homebrew-cask,andrewdisley/homebrew-cask,sanyer/homebrew-cask,wickedsp1d3r/homebrew-cask,freeslugs/homebrew-cask,adrianchia/homebrew-cask,Amorymeltzer/homebrew-cask,samshadwell/homebrew-cask,epmatsw/homebrew-cask,frapposelli/homebrew-cask,skyyuan/homebrew-cask,christophermanning/homebrew-cask,zhuzihhhh/homebrew-cask,codeurge/homebrew-cask,gerrymiller/homebrew-cask,doits/homebrew-cask,wickles/homebrew-cask,boydj/homebrew-cask,jayshao/homebrew-cask,zmwangx/homebrew-cask,zorosteven/homebrew-cask,taherio/homebrew-cask,chrisfinazzo/homebrew-cask,joshka/homebrew-cask,wastrachan/homebrew-cask,sohtsuka/homebrew-cask,jtriley/homebrew-cask,malob/homebrew-cask,tmoreira2020/homebrew,gmkey/homebrew-cask,rkJun/homebrew-cask,englishm/homebrew-cask,bric3/homebrew-cask,kamilboratynski/homebrew-cask,0rax/homebrew-cask,stevehedrick/homebrew-cask,katoquro/homebrew-cask,crzrcn/homebrew-cask,nathansgreen/homebrew-cask,mwean/homebrew-cask,qnm/homebrew-cask,goxberry/homebrew-cask,koenrh/homebrew-cask,inz/homebrew-cask,bcomnes/homebrew-cask,bcaceiro/homebrew-cask,timsutton/homebrew-cask,moimikey/homebrew-cask,mchlrmrz/homebrew-cask,vuquoctuan/homebrew-cask,m3nu/homebrew-cask,kTitan/homebrew-cask,gibsjose/homebrew-cask,johndbritton/homebrew-cask,yurikoles/homebrew-cask,anbotero/homebrew-cask,FinalDes/homebrew-cask,Keloran/homebrew-cask,wKovacs64/homebrew-cask,shanonvl/homebrew-cask,kiliankoe/homebrew-cask,andyli/homebrew-cask,wickedsp1d3r/homebrew-cask,miccal/homebrew-cask,afdnlw/homebrew-cask,retrography/homebrew-cask,buo/homebrew-cask,guerrero/homebrew-cask,gurghet/homebrew-cask,perfide/homebrew-cask,thehunmonkgroup/homebrew-cask,adelinofaria/homebrew-cask,rubenerd/homebrew-cask,casidiablo/homebrew-cask,schneidmaster/homebrew-cask,mishari/homebrew-cask,blogabe/homebrew-cask,Ketouem/homebrew-cask,alebcay/homebrew-cask,LaurentFough/homebrew-cask,ajbw/homebrew-cask,seanzxx/homebrew-cask,pinut/homebrew-cask,kesara/homebrew-cask,athrunsun/homebrew-cask,jbeagley52/homebrew-cask,shoichiaizawa/homebrew-cask,jeroenj/homebrew-cask,tolbkni/homebrew-cask,yurikoles/homebrew-cask,underyx/homebrew-cask,dwihn0r/homebrew-cask,MichaelPei/homebrew-cask,mhubig/homebrew-cask,dlovitch/homebrew-cask,ayohrling/homebrew-cask,kesara/homebrew-cask,RickWong/homebrew-cask,ywfwj2008/homebrew-cask,hvisage/homebrew-cask,Hywan/homebrew-cask,bchatard/homebrew-cask,klane/homebrew-cask,gord1anknot/homebrew-cask,stevenmaguire/homebrew-cask,jangalinski/homebrew-cask,renaudguerin/homebrew-cask,haha1903/homebrew-cask,victorpopkov/homebrew-cask,mlocher/homebrew-cask,sscotth/homebrew-cask,cliffcotino/homebrew-cask,brianshumate/homebrew-cask,jaredsampson/homebrew-cask,uetchy/homebrew-cask,miku/homebrew-cask,brianshumate/homebrew-cask,bosr/homebrew-cask,seanorama/homebrew-cask,wickles/homebrew-cask,CameronGarrett/homebrew-cask,ahvigil/homebrew-cask,otaran/homebrew-cask,danielbayley/homebrew-cask,caskroom/homebrew-cask,jacobdam/homebrew-cask,MichaelPei/homebrew-cask,elnappo/homebrew-cask,winkelsdorf/homebrew-cask,mazehall/homebrew-cask,guerrero/homebrew-cask,a1russell/homebrew-cask,nightscape/homebrew-cask,genewoo/homebrew-cask,chino/homebrew-cask,faun/homebrew-cask,feigaochn/homebrew-cask,michelegera/homebrew-cask,esebastian/homebrew-cask,dustinblackman/homebrew-cask,hovancik/homebrew-cask,wizonesolutions/homebrew-cask,williamboman/homebrew-cask,lalyos/homebrew-cask,wmorin/homebrew-cask,bric3/homebrew-cask,lauantai/homebrew-cask,hellosky806/homebrew-cask,inta/homebrew-cask,delphinus35/homebrew-cask,MatzFan/homebrew-cask,mattrobenolt/homebrew-cask,Ephemera/homebrew-cask,ksato9700/homebrew-cask,LaurentFough/homebrew-cask,crzrcn/homebrew-cask,cobyism/homebrew-cask,3van/homebrew-cask,JacopKane/homebrew-cask,rickychilcott/homebrew-cask,bric3/homebrew-cask,mazehall/homebrew-cask,lifepillar/homebrew-cask,kolomiichenko/homebrew-cask,greg5green/homebrew-cask,ericbn/homebrew-cask,fwiesel/homebrew-cask,imgarylai/homebrew-cask,gerrypower/homebrew-cask,wmorin/homebrew-cask,SamiHiltunen/homebrew-cask,giannitm/homebrew-cask,chrisfinazzo/homebrew-cask,FredLackeyOfficial/homebrew-cask,tangestani/homebrew-cask,reitermarkus/homebrew-cask,wayou/homebrew-cask,atsuyim/homebrew-cask,ldong/homebrew-cask,hellosky806/homebrew-cask,flaviocamilo/homebrew-cask,chrisRidgers/homebrew-cask,nivanchikov/homebrew-cask,rhendric/homebrew-cask,Amorymeltzer/homebrew-cask,jawshooah/homebrew-cask,santoshsahoo/homebrew-cask,KosherBacon/homebrew-cask,hyuna917/homebrew-cask,pablote/homebrew-cask,elseym/homebrew-cask,shorshe/homebrew-cask,mathbunnyru/homebrew-cask,gerrypower/homebrew-cask,jrwesolo/homebrew-cask,napaxton/homebrew-cask,af/homebrew-cask,johndbritton/homebrew-cask,MatzFan/homebrew-cask,cohei/homebrew-cask,jonathanwiesel/homebrew-cask,lieuwex/homebrew-cask,nivanchikov/homebrew-cask,0xadada/homebrew-cask,pgr0ss/homebrew-cask,a-x-/homebrew-cask,tan9/homebrew-cask,gabrielizaias/homebrew-cask,neil-ca-moore/homebrew-cask,jpodlech/homebrew-cask,maxnordlund/homebrew-cask,aktau/homebrew-cask,Ibuprofen/homebrew-cask,ohammersmith/homebrew-cask,wolflee/homebrew-cask,williamboman/homebrew-cask,FinalDes/homebrew-cask,dspeckhard/homebrew-cask,daften/homebrew-cask,schneidmaster/homebrew-cask,vin047/homebrew-cask,kpearson/homebrew-cask,garborg/homebrew-cask,jpodlech/homebrew-cask,mrmachine/homebrew-cask,johnjelinek/homebrew-cask,bgandon/homebrew-cask,epmatsw/homebrew-cask,BahtiyarB/homebrew-cask,jgarber623/homebrew-cask,jamesmlees/homebrew-cask,wesen/homebrew-cask,mwean/homebrew-cask,usami-k/homebrew-cask,franklouwers/homebrew-cask,d/homebrew-cask,jamesmlees/homebrew-cask,jalaziz/homebrew-cask,Amorymeltzer/homebrew-cask,jeroenj/homebrew-cask,julienlavergne/homebrew-cask,albertico/homebrew-cask,mingzhi22/homebrew-cask,arronmabrey/homebrew-cask,shoichiaizawa/homebrew-cask,a1russell/homebrew-cask,ddm/homebrew-cask,MicTech/homebrew-cask,helloIAmPau/homebrew-cask,rogeriopradoj/homebrew-cask,morganestes/homebrew-cask,jen20/homebrew-cask,kryhear/homebrew-cask,barravi/homebrew-cask,tangestani/homebrew-cask,amatos/homebrew-cask,feigaochn/homebrew-cask,gilesdring/homebrew-cask,unasuke/homebrew-cask,jen20/homebrew-cask,zerrot/homebrew-cask,mlocher/homebrew-cask,franklouwers/homebrew-cask,catap/homebrew-cask,rubenerd/homebrew-cask,tmoreira2020/homebrew,FranklinChen/homebrew-cask,anbotero/homebrew-cask,nrlquaker/homebrew-cask,genewoo/homebrew-cask,napaxton/homebrew-cask,theoriginalgri/homebrew-cask,ericbn/homebrew-cask,wastrachan/homebrew-cask,mathbunnyru/homebrew-cask,xcezx/homebrew-cask,andyli/homebrew-cask,mkozjak/homebrew-cask,Ketouem/homebrew-cask,diogodamiani/homebrew-cask,Fedalto/homebrew-cask,claui/homebrew-cask,MerelyAPseudonym/homebrew-cask,mattfelsen/homebrew-cask,syscrusher/homebrew-cask,jedahan/homebrew-cask,chuanxd/homebrew-cask,kiliankoe/homebrew-cask,dlovitch/homebrew-cask,moimikey/homebrew-cask,diguage/homebrew-cask,jmeridth/homebrew-cask,christer155/homebrew-cask,vigosan/homebrew-cask,janlugt/homebrew-cask,scottsuch/homebrew-cask,MoOx/homebrew-cask,alexg0/homebrew-cask,cedwardsmedia/homebrew-cask,hanxue/caskroom,zchee/homebrew-cask,malob/homebrew-cask,aki77/homebrew-cask,xalep/homebrew-cask,johan/homebrew-cask,yutarody/homebrew-cask,linc01n/homebrew-cask,thomanq/homebrew-cask,spruceb/homebrew-cask,nrlquaker/homebrew-cask,13k/homebrew-cask,dictcp/homebrew-cask,jalaziz/homebrew-cask,hristozov/homebrew-cask,wuman/homebrew-cask,jmeridth/homebrew-cask,deiga/homebrew-cask,opsdev-ws/homebrew-cask,nysthee/homebrew-cask,coeligena/homebrew-customized,chuanxd/homebrew-cask,chadcatlett/caskroom-homebrew-cask,riyad/homebrew-cask,winkelsdorf/homebrew-cask,cedwardsmedia/homebrew-cask,deiga/homebrew-cask,Whoaa512/homebrew-cask,robbiethegeek/homebrew-cask,astorije/homebrew-cask,tedski/homebrew-cask,gguillotte/homebrew-cask,josa42/homebrew-cask,inz/homebrew-cask,mrmachine/homebrew-cask,kongslund/homebrew-cask,corbt/homebrew-cask,jayshao/homebrew-cask,devmynd/homebrew-cask,asins/homebrew-cask,chino/homebrew-cask,kronicd/homebrew-cask,feniix/homebrew-cask,tyage/homebrew-cask,phpwutz/homebrew-cask,RickWong/homebrew-cask,timsutton/homebrew-cask,jgarber623/homebrew-cask,reelsense/homebrew-cask,optikfluffel/homebrew-cask,otaran/homebrew-cask,farmerchris/homebrew-cask,wuman/homebrew-cask,robertgzr/homebrew-cask,MoOx/homebrew-cask,jawshooah/homebrew-cask,lalyos/homebrew-cask,illusionfield/homebrew-cask,diogodamiani/homebrew-cask,tedski/homebrew-cask,dcondrey/homebrew-cask,nshemonsky/homebrew-cask,norio-nomura/homebrew-cask,syscrusher/homebrew-cask,pinut/homebrew-cask,JikkuJose/homebrew-cask,usami-k/homebrew-cask,kirikiriyamama/homebrew-cask,mindriot101/homebrew-cask,asbachb/homebrew-cask,gerrymiller/homebrew-cask,ahvigil/homebrew-cask,lukasbestle/homebrew-cask,paour/homebrew-cask,Ephemera/homebrew-cask,colindean/homebrew-cask,xiongchiamiov/homebrew-cask,afh/homebrew-cask,puffdad/homebrew-cask,huanzhang/homebrew-cask,stonehippo/homebrew-cask,n8henrie/homebrew-cask,ahundt/homebrew-cask,scw/homebrew-cask,bdhess/homebrew-cask,onlynone/homebrew-cask,BahtiyarB/homebrew-cask,moonboots/homebrew-cask,atsuyim/homebrew-cask,nightscape/homebrew-cask,AndreTheHunter/homebrew-cask,nshemonsky/homebrew-cask,corbt/homebrew-cask,tan9/homebrew-cask,rcuza/homebrew-cask,arranubels/homebrew-cask,markthetech/homebrew-cask,Philosoft/homebrew-cask,uetchy/homebrew-cask,adriweb/homebrew-cask,muan/homebrew-cask,wizonesolutions/homebrew-cask,jeanregisser/homebrew-cask,ianyh/homebrew-cask,leipert/homebrew-cask,julionc/homebrew-cask,pgr0ss/homebrew-cask,delphinus35/homebrew-cask,devmynd/homebrew-cask,lumaxis/homebrew-cask,ctrevino/homebrew-cask,dictcp/homebrew-cask,nathanielvarona/homebrew-cask,amatos/homebrew-cask,huanzhang/homebrew-cask,mokagio/homebrew-cask,daften/homebrew-cask,MicTech/homebrew-cask,reitermarkus/homebrew-cask,hakamadare/homebrew-cask,kpearson/homebrew-cask,perfide/homebrew-cask,fly19890211/homebrew-cask,n0ts/homebrew-cask,ohammersmith/homebrew-cask,epardee/homebrew-cask,psibre/homebrew-cask,lvicentesanchez/homebrew-cask,sparrc/homebrew-cask,mchlrmrz/homebrew-cask,jhowtan/homebrew-cask,sirodoht/homebrew-cask,kolomiichenko/homebrew-cask,hristozov/homebrew-cask,blainesch/homebrew-cask,alloy/homebrew-cask,robertgzr/homebrew-cask,xiongchiamiov/homebrew-cask,nathanielvarona/homebrew-cask,muan/homebrew-cask,catap/homebrew-cask,dunn/homebrew-cask,jacobbednarz/homebrew-cask,hackhandslabs/homebrew-cask,dspeckhard/homebrew-cask,akiomik/homebrew-cask,adrianchia/homebrew-cask,dwkns/homebrew-cask,supriyantomaftuh/homebrew-cask,sparrc/homebrew-cask,artdevjs/homebrew-cask,hvisage/homebrew-cask,slack4u/homebrew-cask,ericbn/homebrew-cask,axodys/homebrew-cask,dcondrey/homebrew-cask,elyscape/homebrew-cask,lumaxis/homebrew-cask,mahori/homebrew-cask,SamiHiltunen/homebrew-cask,jrwesolo/homebrew-cask,stigkj/homebrew-caskroom-cask,christer155/homebrew-cask,kuno/homebrew-cask,Saklad5/homebrew-cask,vmrob/homebrew-cask,remko/homebrew-cask,tangestani/homebrew-cask,kkdd/homebrew-cask,jpmat296/homebrew-cask,bdhess/homebrew-cask,kevyau/homebrew-cask,giannitm/homebrew-cask,remko/homebrew-cask,slnovak/homebrew-cask,hanxue/caskroom,julionc/homebrew-cask,tedbundyjr/homebrew-cask,fharbe/homebrew-cask,bkono/homebrew-cask,bcomnes/homebrew-cask,cprecioso/homebrew-cask,squid314/homebrew-cask,tyage/homebrew-cask,nysthee/homebrew-cask,onlynone/homebrew-cask,forevergenin/homebrew-cask,bosr/homebrew-cask,gyugyu/homebrew-cask,jacobbednarz/homebrew-cask,bendoerr/homebrew-cask,alloy/homebrew-cask,colindunn/homebrew-cask,stephenwade/homebrew-cask,fly19890211/homebrew-cask,kievechua/homebrew-cask,drostron/homebrew-cask,toonetown/homebrew-cask,6uclz1/homebrew-cask,deanmorin/homebrew-cask,BenjaminHCCarr/homebrew-cask,ninjahoahong/homebrew-cask,blogabe/homebrew-cask,xight/homebrew-cask,rajiv/homebrew-cask,johan/homebrew-cask,okket/homebrew-cask,wKovacs64/homebrew-cask,mahori/homebrew-cask,3van/homebrew-cask,cclauss/homebrew-cask,Nitecon/homebrew-cask,yuhki50/homebrew-cask,githubutilities/homebrew-cask,JosephViolago/homebrew-cask,epardee/homebrew-cask,tjt263/homebrew-cask,xyb/homebrew-cask,ctrevino/homebrew-cask,neverfox/homebrew-cask,Gasol/homebrew-cask,reelsense/homebrew-cask,jpmat296/homebrew-cask,jaredsampson/homebrew-cask,chrisfinazzo/homebrew-cask,singingwolfboy/homebrew-cask,mattrobenolt/homebrew-cask,0rax/homebrew-cask,yutarody/homebrew-cask,AnastasiaSulyagina/homebrew-cask,timsutton/homebrew-cask,exherb/homebrew-cask,andersonba/homebrew-cask,exherb/homebrew-cask,kingthorin/homebrew-cask,gabrielizaias/homebrew-cask,kamilboratynski/homebrew-cask,howie/homebrew-cask,michelegera/homebrew-cask,sanyer/homebrew-cask,stonehippo/homebrew-cask,Saklad5/homebrew-cask,adriweb/homebrew-cask,tsparber/homebrew-cask,aki77/homebrew-cask,zerrot/homebrew-cask,akiomik/homebrew-cask,cobyism/homebrew-cask,FredLackeyOfficial/homebrew-cask,paulombcosta/homebrew-cask,dvdoliveira/homebrew-cask,zmwangx/homebrew-cask,Dremora/homebrew-cask,patresi/homebrew-cask,JosephViolago/homebrew-cask,vin047/homebrew-cask,zchee/homebrew-cask,shishi/homebrew-cask,neverfox/homebrew-cask,mariusbutuc/homebrew-cask,wesen/homebrew-cask,hovancik/homebrew-cask,mahori/homebrew-cask,nathansgreen/homebrew-cask,arronmabrey/homebrew-cask,markhuber/homebrew-cask,helloIAmPau/homebrew-cask,josa42/homebrew-cask,jacobdam/homebrew-cask,xcezx/homebrew-cask,elnappo/homebrew-cask,maxnordlund/homebrew-cask,xyb/homebrew-cask,iamso/homebrew-cask,moogar0880/homebrew-cask,gord1anknot/homebrew-cask,Hywan/homebrew-cask,bcaceiro/homebrew-cask,kingthorin/homebrew-cask,Ephemera/homebrew-cask,johnste/homebrew-cask,scottsuch/homebrew-cask,0xadada/homebrew-cask,JosephViolago/homebrew-cask,mjgardner/homebrew-cask,christophermanning/homebrew-cask,cblecker/homebrew-cask,fharbe/homebrew-cask,lukeadams/homebrew-cask,sscotth/homebrew-cask,johnjelinek/homebrew-cask,aguynamedryan/homebrew-cask,kingthorin/homebrew-cask,zhuzihhhh/homebrew-cask,mishari/homebrew-cask,shanonvl/homebrew-cask,kostasdizas/homebrew-cask,inta/homebrew-cask,Keloran/homebrew-cask,dwihn0r/homebrew-cask,santoshsahoo/homebrew-cask,tjnycum/homebrew-cask,coneman/homebrew-cask,ch3n2k/homebrew-cask,cobyism/homebrew-cask,farmerchris/homebrew-cask,winkelsdorf/homebrew-cask,jiashuw/homebrew-cask,illusionfield/homebrew-cask,lifepillar/homebrew-cask,bkono/homebrew-cask,ldong/homebrew-cask,flada-auxv/homebrew-cask,optikfluffel/homebrew-cask,samnung/homebrew-cask,kievechua/homebrew-cask,arranubels/homebrew-cask,artdevjs/homebrew-cask,mwilmer/homebrew-cask,qnm/homebrew-cask,lukeadams/homebrew-cask,joaocc/homebrew-cask,singingwolfboy/homebrew-cask,jppelteret/homebrew-cask,lantrix/homebrew-cask,thii/homebrew-cask,alebcay/homebrew-cask,6uclz1/homebrew-cask,ptb/homebrew-cask,mjdescy/homebrew-cask,mjgardner/homebrew-cask,seanzxx/homebrew-cask,dieterdemeyer/homebrew-cask,opsdev-ws/homebrew-cask,okket/homebrew-cask,n8henrie/homebrew-cask,vmrob/homebrew-cask,Labutin/homebrew-cask,axodys/homebrew-cask,garborg/homebrew-cask,fkrone/homebrew-cask,blainesch/homebrew-cask,vuquoctuan/homebrew-cask,gmkey/homebrew-cask,feniix/homebrew-cask,coeligena/homebrew-customized,sebcode/homebrew-cask,colindean/homebrew-cask,Gasol/homebrew-cask,joschi/homebrew-cask,wolflee/homebrew-cask,mchlrmrz/homebrew-cask,decrement/homebrew-cask,miku/homebrew-cask,a1russell/homebrew-cask,githubutilities/homebrew-cask,shorshe/homebrew-cask,sirodoht/homebrew-cask,greg5green/homebrew-cask,mgryszko/homebrew-cask,ianyh/homebrew-cask,tarwich/homebrew-cask,malford/homebrew-cask,thehunmonkgroup/homebrew-cask,reitermarkus/homebrew-cask,lieuwex/homebrew-cask,katoquro/homebrew-cask,vigosan/homebrew-cask,danielbayley/homebrew-cask,jonathanwiesel/homebrew-cask,yumitsu/homebrew-cask,MisumiRize/homebrew-cask,squid314/homebrew-cask,miccal/homebrew-cask,Ngrd/homebrew-cask,lcasey001/homebrew-cask,JacopKane/homebrew-cask,hakamadare/homebrew-cask,Philosoft/homebrew-cask,chadcatlett/caskroom-homebrew-cask,elyscape/homebrew-cask,AndreTheHunter/homebrew-cask,gyugyu/homebrew-cask,antogg/homebrew-cask,aktau/homebrew-cask,ahundt/homebrew-cask,freeslugs/homebrew-cask,antogg/homebrew-cask,Nitecon/homebrew-cask,boecko/homebrew-cask,j13k/homebrew-cask,j13k/homebrew-cask,rogeriopradoj/homebrew-cask,aguynamedryan/homebrew-cask,RogerThiede/homebrew-cask,stevehedrick/homebrew-cask,sanchezm/homebrew-cask,zorosteven/homebrew-cask,BenjaminHCCarr/homebrew-cask,My2ndAngelic/homebrew-cask,boecko/homebrew-cask,moimikey/homebrew-cask,wmorin/homebrew-cask,jeroenseegers/homebrew-cask,sysbot/homebrew-cask,SentinelWarren/homebrew-cask,RJHsiao/homebrew-cask,mwek/homebrew-cask,adrianchia/homebrew-cask,jellyfishcoder/homebrew-cask,paulombcosta/homebrew-cask,y00rb/homebrew-cask,goxberry/homebrew-cask,imgarylai/homebrew-cask,malob/homebrew-cask,carlmod/homebrew-cask,sgnh/homebrew-cask,kteru/homebrew-cask,miguelfrde/homebrew-cask,JacopKane/homebrew-cask,Bombenleger/homebrew-cask,scottsuch/homebrew-cask,danielgomezrico/homebrew-cask,malford/homebrew-cask,retrography/homebrew-cask,shonjir/homebrew-cask,kassi/homebrew-cask,jconley/homebrew-cask,jppelteret/homebrew-cask,doits/homebrew-cask,sohtsuka/homebrew-cask,MisumiRize/homebrew-cask,stephenwade/homebrew-cask,tranc99/homebrew-cask,royalwang/homebrew-cask,Bombenleger/homebrew-cask,askl56/homebrew-cask,howie/homebrew-cask,skyyuan/homebrew-cask,mathbunnyru/homebrew-cask,ywfwj2008/homebrew-cask,antogg/homebrew-cask,mikem/homebrew-cask,deiga/homebrew-cask,13k/homebrew-cask,johnste/homebrew-cask,cblecker/homebrew-cask,mfpierre/homebrew-cask,yumitsu/homebrew-cask,frapposelli/homebrew-cask,mariusbutuc/homebrew-cask,linc01n/homebrew-cask,stevenmaguire/homebrew-cask,ftiff/homebrew-cask,gwaldo/homebrew-cask
ruby
## Code Before: cask :v1 => '0ad' do version '0.0.17-alpha' sha256 '7493a8775946f56482939ee51d96ae41a7a8e114ccf050e1406ff4ebf5cb6a7f' # wildfiregames.com is the official download host per the vendor homepage url "http://releases.wildfiregames.com/0ad-#{version}-osx64.dmg" name '0 A.D.' homepage 'http://www.play0ad.com/' license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder app '0ad.app' end ## Instruction: Include license information for 0AD. Contains a mixture of licenses, the game engine is GPL, but art assets are CC licensed, and contains many other components with differing licenses. ## Code After: cask :v1 => '0ad' do version '0.0.17-alpha' sha256 '7493a8775946f56482939ee51d96ae41a7a8e114ccf050e1406ff4ebf5cb6a7f' # wildfiregames.com is the official download host per the vendor homepage url "http://releases.wildfiregames.com/0ad-#{version}-osx64.dmg" name '0 A.D.' homepage 'http://www.play0ad.com/' license :oss app '0ad.app' end
cask :v1 => '0ad' do version '0.0.17-alpha' sha256 '7493a8775946f56482939ee51d96ae41a7a8e114ccf050e1406ff4ebf5cb6a7f' # wildfiregames.com is the official download host per the vendor homepage url "http://releases.wildfiregames.com/0ad-#{version}-osx64.dmg" name '0 A.D.' homepage 'http://www.play0ad.com/' - license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder + license :oss app '0ad.app' end
2
0.166667
1
1
0ade92705c7d67a356b99bea68e2e864c51330f4
doc/md/CodingStyle.md
doc/md/CodingStyle.md
This file documents the coding style used in shogun. If someone pointed you to this document, then your code was probably not well-formatted. But no worries, all you need is to apply the following command to the files to be committed: ``` $ astyle --style=allman --lineend=linux --indent=tab=8 \\ --unpad-paren --pad-header --pad-oper \\ --close-templates --add-brackets \\ --align-pointer=middle --align-reference=name \\ inputfile1.cpp ... ``` Currently, we are using `astyle`, the _Artistic Style_ code formatter. It is available in almost every Linux distribution or can be found on SourceForge: http://astyle.sourceforge.net/ .
This file documents the coding style used in shogun. If someone pointed you to this document, then your code was probably not well-formatted. But no worries, all you need is to apply the following command to the files to be committed: ``` $ astyle --style=allman --lineend=linux --indent=tab=8 \\ --break-blocks --unpad-paren --pad-header --pad-oper \\ --close-templates --add-brackets \\ --align-pointer=middle --align-reference=name \\ inputfile1.cpp ... ``` Currently, we are using `astyle`, the _Artistic Style_ code formatter. It is available in almost every Linux distribution or can be found on SourceForge: http://astyle.sourceforge.net/ .
Add `--break-blocks` to add newlines after blocks
Add `--break-blocks` to add newlines after blocks
Markdown
bsd-3-clause
karlnapf/shogun,sorig/shogun,geektoni/shogun,shogun-toolbox/shogun,lambday/shogun,sorig/shogun,lambday/shogun,geektoni/shogun,geektoni/shogun,Saurabh7/shogun,besser82/shogun,lambday/shogun,karlnapf/shogun,geektoni/shogun,karlnapf/shogun,Saurabh7/shogun,shogun-toolbox/shogun,lisitsyn/shogun,shogun-toolbox/shogun,lambday/shogun,Saurabh7/shogun,shogun-toolbox/shogun,besser82/shogun,Saurabh7/shogun,Saurabh7/shogun,karlnapf/shogun,sorig/shogun,besser82/shogun,sorig/shogun,besser82/shogun,karlnapf/shogun,lambday/shogun,lambday/shogun,Saurabh7/shogun,shogun-toolbox/shogun,besser82/shogun,lisitsyn/shogun,Saurabh7/shogun,shogun-toolbox/shogun,geektoni/shogun,Saurabh7/shogun,lisitsyn/shogun,lisitsyn/shogun,geektoni/shogun,besser82/shogun,karlnapf/shogun,lisitsyn/shogun,lisitsyn/shogun,Saurabh7/shogun,sorig/shogun,sorig/shogun
markdown
## Code Before: This file documents the coding style used in shogun. If someone pointed you to this document, then your code was probably not well-formatted. But no worries, all you need is to apply the following command to the files to be committed: ``` $ astyle --style=allman --lineend=linux --indent=tab=8 \\ --unpad-paren --pad-header --pad-oper \\ --close-templates --add-brackets \\ --align-pointer=middle --align-reference=name \\ inputfile1.cpp ... ``` Currently, we are using `astyle`, the _Artistic Style_ code formatter. It is available in almost every Linux distribution or can be found on SourceForge: http://astyle.sourceforge.net/ . ## Instruction: Add `--break-blocks` to add newlines after blocks ## Code After: This file documents the coding style used in shogun. If someone pointed you to this document, then your code was probably not well-formatted. But no worries, all you need is to apply the following command to the files to be committed: ``` $ astyle --style=allman --lineend=linux --indent=tab=8 \\ --break-blocks --unpad-paren --pad-header --pad-oper \\ --close-templates --add-brackets \\ --align-pointer=middle --align-reference=name \\ inputfile1.cpp ... ``` Currently, we are using `astyle`, the _Artistic Style_ code formatter. It is available in almost every Linux distribution or can be found on SourceForge: http://astyle.sourceforge.net/ .
This file documents the coding style used in shogun. If someone pointed you to this document, then your code was probably not well-formatted. But no worries, all you need is to apply the following command to the files to be committed: ``` $ astyle --style=allman --lineend=linux --indent=tab=8 \\ - --unpad-paren --pad-header --pad-oper \\ + --break-blocks --unpad-paren --pad-header --pad-oper \\ ? +++++++++++++++ --close-templates --add-brackets \\ --align-pointer=middle --align-reference=name \\ inputfile1.cpp ... ``` Currently, we are using `astyle`, the _Artistic Style_ code formatter. It is available in almost every Linux distribution or can be found on SourceForge: http://astyle.sourceforge.net/ .
2
0.117647
1
1
47950cf16a857cefcf0dde86e9696640fba5e7fc
src/coffee/game/enums.coffee
src/coffee/game/enums.coffee
angular.module 'gameDefinition.enums', [] .factory 'enums', () -> origins: illusionist: 'an illusionist' hallucinist: 'a hallucinist' hypnotist: 'a hypnotist' leads: none: undefined jackie: 'Jackie' employer: 'KB&S' cop: 'Officer Dentley' student: 'Ms. Denotto'
angular.module 'gameDefinition.enums', [] .factory 'enums', () -> origins: illusionist: 'an illusionist' hallucinist: 'a hallucinist' hypnotist: 'a hypnotist' leads: none: undefined jackie: 'Jackie' employer: 'KB&S' cop: 'Officer Dentley' student: 'Ms. Denotto' roxy: 'Roxy'
Add Roxy Lead to Enums
Add Roxy Lead to Enums
CoffeeScript
unlicense
arashikou/exper3-2015
coffeescript
## Code Before: angular.module 'gameDefinition.enums', [] .factory 'enums', () -> origins: illusionist: 'an illusionist' hallucinist: 'a hallucinist' hypnotist: 'a hypnotist' leads: none: undefined jackie: 'Jackie' employer: 'KB&S' cop: 'Officer Dentley' student: 'Ms. Denotto' ## Instruction: Add Roxy Lead to Enums ## Code After: angular.module 'gameDefinition.enums', [] .factory 'enums', () -> origins: illusionist: 'an illusionist' hallucinist: 'a hallucinist' hypnotist: 'a hypnotist' leads: none: undefined jackie: 'Jackie' employer: 'KB&S' cop: 'Officer Dentley' student: 'Ms. Denotto' roxy: 'Roxy'
angular.module 'gameDefinition.enums', [] .factory 'enums', () -> origins: illusionist: 'an illusionist' hallucinist: 'a hallucinist' hypnotist: 'a hypnotist' + leads: none: undefined jackie: 'Jackie' employer: 'KB&S' cop: 'Officer Dentley' student: 'Ms. Denotto' + roxy: 'Roxy'
2
0.166667
2
0
4faf5eb2dc38edc9f133484327fb261a39bcbf55
apis/Google.LongRunning/postgeneration.sh
apis/Google.LongRunning/postgeneration.sh
set -e # Undo the changes made in pregeneration.sh and pregeneration.patch git -C ../../googleapis checkout google/longrunning/longrunning_gapic.yaml
set -e # Undo the changes made in pregeneration.sh and pregeneration.patch git -C ../../googleapis checkout google/longrunning
Fix the post-generation fix-up for LRO
Fix the post-generation fix-up for LRO (We want to revert changes to multiple files, so just check out the directory.)
Shell
apache-2.0
jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/gcloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet
shell
## Code Before: set -e # Undo the changes made in pregeneration.sh and pregeneration.patch git -C ../../googleapis checkout google/longrunning/longrunning_gapic.yaml ## Instruction: Fix the post-generation fix-up for LRO (We want to revert changes to multiple files, so just check out the directory.) ## Code After: set -e # Undo the changes made in pregeneration.sh and pregeneration.patch git -C ../../googleapis checkout google/longrunning
set -e # Undo the changes made in pregeneration.sh and pregeneration.patch - git -C ../../googleapis checkout google/longrunning/longrunning_gapic.yaml ? ----------------------- + git -C ../../googleapis checkout google/longrunning
2
0.4
1
1
0bf08cdc6946d0242aab10395484b447883df153
lagunita/lms/static/sass/multicourse/_courses.scss
lagunita/lms/static/sass/multicourse/_courses.scss
@import 'lms/static/sass/base/grid-settings'; @import 'neat/neat'; .find-courses { .courses-container { .courses { &:not(.no-course-discovery) { @include span-columns(12); @include media($bp-medium) { @include span-columns(8); // 8 of 8 @include omega(2n); } @include media($bp-large) { @include span-columns(12); } @include media($bp-huge) { @include span-columns(12); } .courses-listing .courses-listing-item { @include media($bp-medium) { @include span-columns(4); // 4 of 8 @include omega(2n); } @include media($bp-large) { @include span-columns(4); // 4 of 12 @include omega(3n); } @include media($bp-huge) { @include span-columns(3); // 3 of 12 @include omega(4n); } } } } } .search-facets { display: none; } }
.find-courses { .search-facets { display: none; } }
Remove broken course listing style override
Remove broken course listing style override
SCSS
apache-2.0
Stanford-Online/openedx-themes
scss
## Code Before: @import 'lms/static/sass/base/grid-settings'; @import 'neat/neat'; .find-courses { .courses-container { .courses { &:not(.no-course-discovery) { @include span-columns(12); @include media($bp-medium) { @include span-columns(8); // 8 of 8 @include omega(2n); } @include media($bp-large) { @include span-columns(12); } @include media($bp-huge) { @include span-columns(12); } .courses-listing .courses-listing-item { @include media($bp-medium) { @include span-columns(4); // 4 of 8 @include omega(2n); } @include media($bp-large) { @include span-columns(4); // 4 of 12 @include omega(3n); } @include media($bp-huge) { @include span-columns(3); // 3 of 12 @include omega(4n); } } } } } .search-facets { display: none; } } ## Instruction: Remove broken course listing style override ## Code After: .find-courses { .search-facets { display: none; } }
- @import 'lms/static/sass/base/grid-settings'; - @import 'neat/neat'; - .find-courses { - .courses-container { - .courses { - &:not(.no-course-discovery) { - @include span-columns(12); - - @include media($bp-medium) { - @include span-columns(8); // 8 of 8 - @include omega(2n); - } - - @include media($bp-large) { - @include span-columns(12); - } - - @include media($bp-huge) { - @include span-columns(12); - } - - .courses-listing .courses-listing-item { - @include media($bp-medium) { - @include span-columns(4); // 4 of 8 - @include omega(2n); - } - - @include media($bp-large) { - @include span-columns(4); // 4 of 12 - @include omega(3n); - } - - @include media($bp-huge) { - @include span-columns(3); // 3 of 12 - @include omega(4n); - } - } - } - } - } .search-facets { display: none; } }
40
0.888889
0
40
5e35c65936868ed29ac099ca22a240aa7047d523
index.android.js
index.android.js
import 'es6-symbol/implement'; import {Provider} from 'react-redux'; import store from './src/redux/store'; import AppViewContainer from './src/modules/AppViewContainer'; import React from 'react'; import {setConfiguration} from './src/utils/configuration'; import {AppRegistry, BackAndroid} from 'react-native'; import * as NavigationStateActions from './src/modules/navigation/NavigationState'; const Hemmo = React.createClass({ componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', this.navigateBack); setConfiguration('API_ROOT', 'http://hemmo-backend.herokuapp.com'); // setConfiguration('API_ROOT', 'http://localhost:3001'); }, navigateBack() { const navigationState = store.getState().get('navigationState'); if (navigationState.get('index') === 0) { return false; } /* Check if returning from current page is allowed */ var currentPageIndex = navigationState.get('index'); var allowReturn = navigationState.getIn(['children', currentPageIndex, 'allowReturn']); if (allowReturn === false) { return true; } store.dispatch(NavigationStateActions.popRoute()); return true; }, render() { return ( <Provider store={store}> <AppViewContainer /> </Provider> ); } }); AppRegistry.registerComponent('Hemmo', () => Hemmo);
import 'es6-symbol/implement'; import {Provider} from 'react-redux'; import store from './src/redux/store'; import AppViewContainer from './src/modules/AppViewContainer'; import React from 'react'; import {setConfiguration} from './src/utils/configuration'; import {AppRegistry, BackAndroid} from 'react-native'; import * as NavigationStateActions from './src/modules/navigation/NavigationState'; const Hemmo = React.createClass({ componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', this.navigateBack); setConfiguration('API_ROOT', 'http://hemmo.pelastakaalapset.fi'); // setConfiguration('API_ROOT', 'http://localhost:3001'); }, navigateBack() { const navigationState = store.getState().get('navigationState'); if (navigationState.get('index') === 0) { return false; } /* Check if returning from current page is allowed */ var currentPageIndex = navigationState.get('index'); var allowReturn = navigationState.getIn(['children', currentPageIndex, 'allowReturn']); if (allowReturn === false) { return true; } store.dispatch(NavigationStateActions.popRoute()); return true; }, render() { return ( <Provider store={store}> <AppViewContainer /> </Provider> ); } }); AppRegistry.registerComponent('Hemmo', () => Hemmo);
Set backend to production backend
Set backend to production backend
JavaScript
mit
futurice/PelaryHemmo,futurice/PelaryHemmo,futurice/PelaryHemmo
javascript
## Code Before: import 'es6-symbol/implement'; import {Provider} from 'react-redux'; import store from './src/redux/store'; import AppViewContainer from './src/modules/AppViewContainer'; import React from 'react'; import {setConfiguration} from './src/utils/configuration'; import {AppRegistry, BackAndroid} from 'react-native'; import * as NavigationStateActions from './src/modules/navigation/NavigationState'; const Hemmo = React.createClass({ componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', this.navigateBack); setConfiguration('API_ROOT', 'http://hemmo-backend.herokuapp.com'); // setConfiguration('API_ROOT', 'http://localhost:3001'); }, navigateBack() { const navigationState = store.getState().get('navigationState'); if (navigationState.get('index') === 0) { return false; } /* Check if returning from current page is allowed */ var currentPageIndex = navigationState.get('index'); var allowReturn = navigationState.getIn(['children', currentPageIndex, 'allowReturn']); if (allowReturn === false) { return true; } store.dispatch(NavigationStateActions.popRoute()); return true; }, render() { return ( <Provider store={store}> <AppViewContainer /> </Provider> ); } }); AppRegistry.registerComponent('Hemmo', () => Hemmo); ## Instruction: Set backend to production backend ## Code After: import 'es6-symbol/implement'; import {Provider} from 'react-redux'; import store from './src/redux/store'; import AppViewContainer from './src/modules/AppViewContainer'; import React from 'react'; import {setConfiguration} from './src/utils/configuration'; import {AppRegistry, BackAndroid} from 'react-native'; import * as NavigationStateActions from './src/modules/navigation/NavigationState'; const Hemmo = React.createClass({ componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', this.navigateBack); setConfiguration('API_ROOT', 'http://hemmo.pelastakaalapset.fi'); // setConfiguration('API_ROOT', 'http://localhost:3001'); }, navigateBack() { const navigationState = store.getState().get('navigationState'); if (navigationState.get('index') === 0) { return false; } /* Check if returning from current page is allowed */ var currentPageIndex = navigationState.get('index'); var allowReturn = navigationState.getIn(['children', currentPageIndex, 'allowReturn']); if (allowReturn === false) { return true; } store.dispatch(NavigationStateActions.popRoute()); return true; }, render() { return ( <Provider store={store}> <AppViewContainer /> </Provider> ); } }); AppRegistry.registerComponent('Hemmo', () => Hemmo);
import 'es6-symbol/implement'; import {Provider} from 'react-redux'; import store from './src/redux/store'; import AppViewContainer from './src/modules/AppViewContainer'; import React from 'react'; import {setConfiguration} from './src/utils/configuration'; import {AppRegistry, BackAndroid} from 'react-native'; import * as NavigationStateActions from './src/modules/navigation/NavigationState'; const Hemmo = React.createClass({ componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', this.navigateBack); - setConfiguration('API_ROOT', 'http://hemmo-backend.herokuapp.com'); ? ^^ ^ ^^^^^^^^^^ ^ ^^^ + setConfiguration('API_ROOT', 'http://hemmo.pelastakaalapset.fi'); ? ^^^^ ^^^ ^^^ ^^^ ^^ // setConfiguration('API_ROOT', 'http://localhost:3001'); }, navigateBack() { const navigationState = store.getState().get('navigationState'); if (navigationState.get('index') === 0) { return false; } /* Check if returning from current page is allowed */ var currentPageIndex = navigationState.get('index'); var allowReturn = navigationState.getIn(['children', currentPageIndex, 'allowReturn']); if (allowReturn === false) { return true; } store.dispatch(NavigationStateActions.popRoute()); return true; }, render() { return ( <Provider store={store}> <AppViewContainer /> </Provider> ); } }); AppRegistry.registerComponent('Hemmo', () => Hemmo);
2
0.044444
1
1
487deb6c8619cbeed628a8170c1ba6d6001c2613
MusicFav/feedly.json
MusicFav/feedly.json
{ "target": "sandbox", "client_id": "sandbox", "client_secret": "8LDQOW8KPYFPCQV2UL6J" }
{ "target": "sandbox", "client_id": "sandbox", "client_secret": "check latest client secret at developer forrum of feedly-cloud and input it" }
Change default client secret key
Change default client secret key
JSON
mit
kumabook/MusicFav,kumabook/MusicFav,kumabook/MusicFav,kumabook/MusicFav
json
## Code Before: { "target": "sandbox", "client_id": "sandbox", "client_secret": "8LDQOW8KPYFPCQV2UL6J" } ## Instruction: Change default client secret key ## Code After: { "target": "sandbox", "client_id": "sandbox", "client_secret": "check latest client secret at developer forrum of feedly-cloud and input it" }
{ "target": "sandbox", "client_id": "sandbox", - "client_secret": "8LDQOW8KPYFPCQV2UL6J" + "client_secret": "check latest client secret at developer forrum of feedly-cloud and input it" }
2
0.4
1
1
044b1276c80f7f88fa01bbdefc99e11de215f96e
README.md
README.md
**[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog. ## Minimal Mistakes is all about: * Responsive templates. Looking good on mobile, tablet, and desktop. * Gracefully degrading in older browsers. Compatible with Internet Explorer 8+ and all modern browsers. * Minimal embellishments -- content first. * Optional large feature images for posts and pages. * Simple and clear permalink structure. * [Custom 404 page](http://mmistakes.github.io/minimal-mistakes/404.html) to get you started. * Support for Disqus Comments ![screenshot of Minimal Mistakes theme](http://mmistakes.github.io/minimal-mistakes/images/mm-theme-post-600.jpg) See a [live version of Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes/) hosted on GitHub. ## Getting Started Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. To learn how to install and use this theme check out the [Setup Guide](http://mmistakes.github.io/minimal-mistakes/theme-setup/) for more information.
**[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog. **Jekyll 3 Update:** A version of Minimal Mistakes compatible with Jekyll 3 can be found in the [`jekyll3` branch](https://github.com/mmistakes/minimal-mistakes/tree/jekyll3). GitHub Pages is [locked at version 2.4](https://pages.github.com/versions/) so some keep that in mind if you're trying to use 3.0 features that aren't supported there yet. ## Minimal Mistakes is all about: * Responsive templates. Looking good on mobile, tablet, and desktop. * Gracefully degrading in older browsers. Compatible with Internet Explorer 8+ and all modern browsers. * Minimal embellishments -- content first. * Optional large feature images for posts and pages. * Simple and clear permalink structure. * [Custom 404 page](http://mmistakes.github.io/minimal-mistakes/404.html) to get you started. * Support for Disqus Comments ![screenshot of Minimal Mistakes theme](http://mmistakes.github.io/minimal-mistakes/images/mm-theme-post-600.jpg) See a [live version of Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes/) hosted on GitHub. ## Getting Started Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. To learn how to install and use this theme check out the [Setup Guide](http://mmistakes.github.io/minimal-mistakes/theme-setup/) for more information.
Add note and link to MM-Jekyll 3 branch.
Add note and link to MM-Jekyll 3 branch.
Markdown
mit
makaroniame/makaroniame.github.io,makaroniame/makaroniame.github.io,makaroniame/makaroniame.github.io,makaroniame/makaroniame.github.io
markdown
## Code Before: **[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog. ## Minimal Mistakes is all about: * Responsive templates. Looking good on mobile, tablet, and desktop. * Gracefully degrading in older browsers. Compatible with Internet Explorer 8+ and all modern browsers. * Minimal embellishments -- content first. * Optional large feature images for posts and pages. * Simple and clear permalink structure. * [Custom 404 page](http://mmistakes.github.io/minimal-mistakes/404.html) to get you started. * Support for Disqus Comments ![screenshot of Minimal Mistakes theme](http://mmistakes.github.io/minimal-mistakes/images/mm-theme-post-600.jpg) See a [live version of Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes/) hosted on GitHub. ## Getting Started Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. To learn how to install and use this theme check out the [Setup Guide](http://mmistakes.github.io/minimal-mistakes/theme-setup/) for more information. ## Instruction: Add note and link to MM-Jekyll 3 branch. ## Code After: **[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog. **Jekyll 3 Update:** A version of Minimal Mistakes compatible with Jekyll 3 can be found in the [`jekyll3` branch](https://github.com/mmistakes/minimal-mistakes/tree/jekyll3). GitHub Pages is [locked at version 2.4](https://pages.github.com/versions/) so some keep that in mind if you're trying to use 3.0 features that aren't supported there yet. ## Minimal Mistakes is all about: * Responsive templates. Looking good on mobile, tablet, and desktop. * Gracefully degrading in older browsers. Compatible with Internet Explorer 8+ and all modern browsers. * Minimal embellishments -- content first. * Optional large feature images for posts and pages. * Simple and clear permalink structure. * [Custom 404 page](http://mmistakes.github.io/minimal-mistakes/404.html) to get you started. * Support for Disqus Comments ![screenshot of Minimal Mistakes theme](http://mmistakes.github.io/minimal-mistakes/images/mm-theme-post-600.jpg) See a [live version of Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes/) hosted on GitHub. ## Getting Started Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. To learn how to install and use this theme check out the [Setup Guide](http://mmistakes.github.io/minimal-mistakes/theme-setup/) for more information.
**[Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes)** is a two column responsive Jekyll theme perfect for powering your GitHub hosted blog. + + **Jekyll 3 Update:** A version of Minimal Mistakes compatible with Jekyll 3 can be found in the [`jekyll3` branch](https://github.com/mmistakes/minimal-mistakes/tree/jekyll3). GitHub Pages is [locked at version 2.4](https://pages.github.com/versions/) so some keep that in mind if you're trying to use 3.0 features that aren't supported there yet. ## Minimal Mistakes is all about: * Responsive templates. Looking good on mobile, tablet, and desktop. * Gracefully degrading in older browsers. Compatible with Internet Explorer 8+ and all modern browsers. * Minimal embellishments -- content first. * Optional large feature images for posts and pages. * Simple and clear permalink structure. * [Custom 404 page](http://mmistakes.github.io/minimal-mistakes/404.html) to get you started. * Support for Disqus Comments ![screenshot of Minimal Mistakes theme](http://mmistakes.github.io/minimal-mistakes/images/mm-theme-post-600.jpg) See a [live version of Minimal Mistakes](http://mmistakes.github.io/minimal-mistakes/) hosted on GitHub. ## Getting Started Minimal Mistakes takes advantage of Sass and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. To learn how to install and use this theme check out the [Setup Guide](http://mmistakes.github.io/minimal-mistakes/theme-setup/) for more information.
2
0.090909
2
0
a021aa56121271d2f5901a0e1d5f31d45e900c3d
pubspec.yaml
pubspec.yaml
name: http_retry version: 0.1.2-dev description: HTTP client middleware that automatically retries requests. homepage: https://github.com/dart-lang/http_retry environment: sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.7 http: '>=0.11.0 <0.13.0' pedantic: ^1.0.0 dev_dependencies: fake_async: ^1.0.0 test: ^1.2.0
name: http_retry version: 0.1.2-dev description: >- A wrapper for package:http clients that automatically retries requests homepage: https://github.com/dart-lang/http_retry environment: sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.7 http: '>=0.11.0 <0.13.0' pedantic: ^1.0.0 dev_dependencies: fake_async: ^1.0.0 test: ^1.2.0
Increase description length to be >= 60 characters
Increase description length to be >= 60 characters
YAML
bsd-3-clause
dart-lang/http,dart-lang/http,dart-lang/http,dart-lang/http_retry,dart-lang/http,dart-lang/http,dart-lang/http,dart-lang/http,dart-lang/http,dart-archive/http_retry
yaml
## Code Before: name: http_retry version: 0.1.2-dev description: HTTP client middleware that automatically retries requests. homepage: https://github.com/dart-lang/http_retry environment: sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.7 http: '>=0.11.0 <0.13.0' pedantic: ^1.0.0 dev_dependencies: fake_async: ^1.0.0 test: ^1.2.0 ## Instruction: Increase description length to be >= 60 characters ## Code After: name: http_retry version: 0.1.2-dev description: >- A wrapper for package:http clients that automatically retries requests homepage: https://github.com/dart-lang/http_retry environment: sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.7 http: '>=0.11.0 <0.13.0' pedantic: ^1.0.0 dev_dependencies: fake_async: ^1.0.0 test: ^1.2.0
name: http_retry version: 0.1.2-dev - description: HTTP client middleware that automatically retries requests. + description: >- + A wrapper for package:http clients that automatically retries requests homepage: https://github.com/dart-lang/http_retry environment: sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.7 http: '>=0.11.0 <0.13.0' pedantic: ^1.0.0 dev_dependencies: fake_async: ^1.0.0 test: ^1.2.0
3
0.176471
2
1
8d54fce47743571fe335cee18980a172bf91f4e7
README.md
README.md
spree_paypal_website_payments_standard ======================================
spree_paypal_website_payments_standard ====================================== Notes ----- Don't forget to set the encoding in your PayPal profile to UTF-8 (see http://jlchereau.blogspot.hu/2006/10/paypal-ipn-with-utf8.html).
Add note about encoding to readme
Add note about encoding to readme
Markdown
mit
clemens/spree_paypal_website_payments_standard,clemens/spree_paypal_website_payments_standard
markdown
## Code Before: spree_paypal_website_payments_standard ====================================== ## Instruction: Add note about encoding to readme ## Code After: spree_paypal_website_payments_standard ====================================== Notes ----- Don't forget to set the encoding in your PayPal profile to UTF-8 (see http://jlchereau.blogspot.hu/2006/10/paypal-ipn-with-utf8.html).
spree_paypal_website_payments_standard ====================================== + + Notes + ----- + + Don't forget to set the encoding in your PayPal profile to UTF-8 (see http://jlchereau.blogspot.hu/2006/10/paypal-ipn-with-utf8.html).
5
2.5
5
0
536b0b7a5dbcac98eb6e7a5ea6b0b068729c03d1
storage/src/tests/visiting/CMakeLists.txt
storage/src/tests/visiting/CMakeLists.txt
vespa_add_library(storage_testvisiting SOURCES commandqueuetest.cpp visitormanagertest.cpp visitortest.cpp memory_bounded_trace_test.cpp DEPENDS AFTER storage_storageconfig )
vespa_add_library(storage_testvisiting SOURCES commandqueuetest.cpp visitormanagertest.cpp visitortest.cpp memory_bounded_trace_test.cpp DEPENDS AFTER storage_storageconfig storage_visitor )
Add weak dependency on storage_visitor
Add weak dependency on storage_visitor
Text
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
text
## Code Before: vespa_add_library(storage_testvisiting SOURCES commandqueuetest.cpp visitormanagertest.cpp visitortest.cpp memory_bounded_trace_test.cpp DEPENDS AFTER storage_storageconfig ) ## Instruction: Add weak dependency on storage_visitor ## Code After: vespa_add_library(storage_testvisiting SOURCES commandqueuetest.cpp visitormanagertest.cpp visitortest.cpp memory_bounded_trace_test.cpp DEPENDS AFTER storage_storageconfig storage_visitor )
vespa_add_library(storage_testvisiting SOURCES commandqueuetest.cpp visitormanagertest.cpp visitortest.cpp memory_bounded_trace_test.cpp DEPENDS AFTER storage_storageconfig + storage_visitor )
1
0.1
1
0
59f47411c7d59a3a4d4e9f21d088cceb50fafb8b
wagtail/wagtailadmin/templates/wagtailadmin/skeleton.html
wagtail/wagtailadmin/templates/wagtailadmin/skeleton.html
<!doctype html> {% load compress i18n %} <html class="no-js" lang="{{ LANGUAGE_CODE|default:"en-gb" }}"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Wagtail - {% block titletag %}{% endblock %}</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src="{{ STATIC_URL }}wagtailadmin/js/vendor/modernizr-2.6.2.min.js"></script> {% compress css %} <link rel="stylesheet" href="{{ STATIC_URL }}wagtailadmin/scss/normalize.css" /> {% endcompress %} {% block css %}{% endblock %} </head> <body class="{% block bodyclass %}{% endblock %} {% if messages %}has-messages{% endif %}"> <!--[if lt IE 9]> <p class="capabilitymessage">{% blocktrans %}You are using an <strong>outdated</strong> browser not supported by this software. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a>.{% endblocktrans %}</p> <![endif]--> <noscript class="capabilitymessage">{% trans 'Javascript is required to use Wagtail, but it is currently disabled' %}</noscript> {% block js %}{% endblock %} <div class="wrapper"> {% block furniture %}{% endblock %} </div> </body> </html>
<!doctype html> {% load compress i18n %} <html class="no-js" lang="{{ LANGUAGE_CODE|default:"en-gb" }}"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Wagtail - {% block titletag %}{% endblock %}</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src="{{ STATIC_URL }}wagtailadmin/js/vendor/modernizr-2.6.2.min.js"></script> {% compress css %} <link rel="stylesheet" href="{{ STATIC_URL }}wagtailadmin/scss/normalize.css" /> {% endcompress %} {% block css %}{% endblock %} </head> <body class="{% block bodyclass %}{% endblock %} {% if messages %}has-messages{% endif %}"> <!--[if lt IE 9]> <p class="capabilitymessage">{% blocktrans %}You are using an <strong>outdated</strong> browser not supported by this software. Please <a href="http://browsehappy.com/">upgrade your browser</a>.{% endblocktrans %}</p> <![endif]--> <noscript class="capabilitymessage">{% trans 'Javascript is required to use Wagtail, but it is currently disabled' %}</noscript> {% block js %}{% endblock %} <div class="wrapper"> {% block furniture %}{% endblock %} </div> </body> </html>
Remove link to now-defunct Google Chrome Frame in warning for <IE9 browsers.
Remove link to now-defunct Google Chrome Frame in warning for <IE9 browsers.
HTML
bsd-3-clause
nealtodd/wagtail,hanpama/wagtail,gogobook/wagtail,Tivix/wagtail,wagtail/wagtail,mayapurmedia/wagtail,nealtodd/wagtail,tangentlabs/wagtail,jorge-marques/wagtail,KimGlazebrook/wagtail-experiment,mephizzle/wagtail,davecranwell/wagtail,janusnic/wagtail,quru/wagtail,taedori81/wagtail,stevenewey/wagtail,wagtail/wagtail,iansprice/wagtail,Toshakins/wagtail,mixxorz/wagtail,quru/wagtail,KimGlazebrook/wagtail-experiment,Tivix/wagtail,marctc/wagtail,jordij/wagtail,rsalmaso/wagtail,kurtrwall/wagtail,davecranwell/wagtail,gasman/wagtail,m-sanders/wagtail,serzans/wagtail,hamsterbacke23/wagtail,zerolab/wagtail,jordij/wagtail,darith27/wagtail,marctc/wagtail,nrsimha/wagtail,kurtw/wagtail,gogobook/wagtail,darith27/wagtail,jorge-marques/wagtail,KimGlazebrook/wagtail-experiment,FlipperPA/wagtail,takeshineshiro/wagtail,rv816/wagtail,zerolab/wagtail,takeflight/wagtail,jnns/wagtail,takeshineshiro/wagtail,quru/wagtail,m-sanders/wagtail,thenewguy/wagtail,timorieber/wagtail,JoshBarr/wagtail,kurtw/wagtail,KimGlazebrook/wagtail-experiment,rv816/wagtail,bjesus/wagtail,iho/wagtail,tangentlabs/wagtail,nilnvoid/wagtail,kaedroho/wagtail,inonit/wagtail,nimasmi/wagtail,taedori81/wagtail,nutztherookie/wagtail,gogobook/wagtail,mayapurmedia/wagtail,rjsproxy/wagtail,iansprice/wagtail,janusnic/wagtail,stevenewey/wagtail,torchbox/wagtail,WQuanfeng/wagtail,Pennebaker/wagtail,nimasmi/wagtail,tangentlabs/wagtail,janusnic/wagtail,takeflight/wagtail,mjec/wagtail,wagtail/wagtail,JoshBarr/wagtail,chrxr/wagtail,inonit/wagtail,kurtw/wagtail,Toshakins/wagtail,takeflight/wagtail,kurtrwall/wagtail,nutztherookie/wagtail,bjesus/wagtail,mephizzle/wagtail,mixxorz/wagtail,stevenewey/wagtail,iho/wagtail,inonit/wagtail,takeshineshiro/wagtail,mixxorz/wagtail,gasman/wagtail,iansprice/wagtail,torchbox/wagtail,nealtodd/wagtail,hanpama/wagtail,nrsimha/wagtail,mayapurmedia/wagtail,mephizzle/wagtail,inonit/wagtail,davecranwell/wagtail,wagtail/wagtail,mixxorz/wagtail,taedori81/wagtail,bjesus/wagtail,rjsproxy/wagtail,torchbox/wagtail,mikedingjan/wagtail,Tivix/wagtail,WQuanfeng/wagtail,iho/wagtail,rjsproxy/wagtail,mjec/wagtail,stevenewey/wagtail,rv816/wagtail,JoshBarr/wagtail,kurtw/wagtail,nrsimha/wagtail,jordij/wagtail,Toshakins/wagtail,darith27/wagtail,jorge-marques/wagtail,Klaudit/wagtail,zerolab/wagtail,wagtail/wagtail,jorge-marques/wagtail,Pennebaker/wagtail,rsalmaso/wagtail,jnns/wagtail,chrxr/wagtail,iho/wagtail,Pennebaker/wagtail,janusnic/wagtail,nimasmi/wagtail,chrxr/wagtail,Tivix/wagtail,rsalmaso/wagtail,Klaudit/wagtail,nilnvoid/wagtail,mikedingjan/wagtail,m-sanders/wagtail,nutztherookie/wagtail,hamsterbacke23/wagtail,rv816/wagtail,takeflight/wagtail,kurtrwall/wagtail,mixxorz/wagtail,zerolab/wagtail,thenewguy/wagtail,taedori81/wagtail,davecranwell/wagtail,thenewguy/wagtail,bjesus/wagtail,mjec/wagtail,rsalmaso/wagtail,m-sanders/wagtail,Klaudit/wagtail,mjec/wagtail,torchbox/wagtail,FlipperPA/wagtail,taedori81/wagtail,hamsterbacke23/wagtail,WQuanfeng/wagtail,gasman/wagtail,kaedroho/wagtail,gasman/wagtail,chrxr/wagtail,mikedingjan/wagtail,nealtodd/wagtail,marctc/wagtail,iansprice/wagtail,jnns/wagtail,rsalmaso/wagtail,timorieber/wagtail,mayapurmedia/wagtail,tangentlabs/wagtail,FlipperPA/wagtail,marctc/wagtail,nutztherookie/wagtail,kurtrwall/wagtail,jnns/wagtail,jorge-marques/wagtail,rjsproxy/wagtail,Klaudit/wagtail,FlipperPA/wagtail,nrsimha/wagtail,thenewguy/wagtail,takeshineshiro/wagtail,timorieber/wagtail,darith27/wagtail,nilnvoid/wagtail,quru/wagtail,mikedingjan/wagtail,serzans/wagtail,Pennebaker/wagtail,hanpama/wagtail,kaedroho/wagtail,jordij/wagtail,Toshakins/wagtail,hamsterbacke23/wagtail,thenewguy/wagtail,timorieber/wagtail,serzans/wagtail,kaedroho/wagtail,nilnvoid/wagtail,hanpama/wagtail,zerolab/wagtail,serzans/wagtail,gogobook/wagtail,kaedroho/wagtail,JoshBarr/wagtail,gasman/wagtail,nimasmi/wagtail,mephizzle/wagtail,WQuanfeng/wagtail
html
## Code Before: <!doctype html> {% load compress i18n %} <html class="no-js" lang="{{ LANGUAGE_CODE|default:"en-gb" }}"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Wagtail - {% block titletag %}{% endblock %}</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src="{{ STATIC_URL }}wagtailadmin/js/vendor/modernizr-2.6.2.min.js"></script> {% compress css %} <link rel="stylesheet" href="{{ STATIC_URL }}wagtailadmin/scss/normalize.css" /> {% endcompress %} {% block css %}{% endblock %} </head> <body class="{% block bodyclass %}{% endblock %} {% if messages %}has-messages{% endif %}"> <!--[if lt IE 9]> <p class="capabilitymessage">{% blocktrans %}You are using an <strong>outdated</strong> browser not supported by this software. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a>.{% endblocktrans %}</p> <![endif]--> <noscript class="capabilitymessage">{% trans 'Javascript is required to use Wagtail, but it is currently disabled' %}</noscript> {% block js %}{% endblock %} <div class="wrapper"> {% block furniture %}{% endblock %} </div> </body> </html> ## Instruction: Remove link to now-defunct Google Chrome Frame in warning for <IE9 browsers. ## Code After: <!doctype html> {% load compress i18n %} <html class="no-js" lang="{{ LANGUAGE_CODE|default:"en-gb" }}"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Wagtail - {% block titletag %}{% endblock %}</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src="{{ STATIC_URL }}wagtailadmin/js/vendor/modernizr-2.6.2.min.js"></script> {% compress css %} <link rel="stylesheet" href="{{ STATIC_URL }}wagtailadmin/scss/normalize.css" /> {% endcompress %} {% block css %}{% endblock %} </head> <body class="{% block bodyclass %}{% endblock %} {% if messages %}has-messages{% endif %}"> <!--[if lt IE 9]> <p class="capabilitymessage">{% blocktrans %}You are using an <strong>outdated</strong> browser not supported by this software. Please <a href="http://browsehappy.com/">upgrade your browser</a>.{% endblocktrans %}</p> <![endif]--> <noscript class="capabilitymessage">{% trans 'Javascript is required to use Wagtail, but it is currently disabled' %}</noscript> {% block js %}{% endblock %} <div class="wrapper"> {% block furniture %}{% endblock %} </div> </body> </html>
<!doctype html> {% load compress i18n %} <html class="no-js" lang="{{ LANGUAGE_CODE|default:"en-gb" }}"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Wagtail - {% block titletag %}{% endblock %}</title> <meta name="description" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src="{{ STATIC_URL }}wagtailadmin/js/vendor/modernizr-2.6.2.min.js"></script> {% compress css %} <link rel="stylesheet" href="{{ STATIC_URL }}wagtailadmin/scss/normalize.css" /> {% endcompress %} {% block css %}{% endblock %} </head> <body class="{% block bodyclass %}{% endblock %} {% if messages %}has-messages{% endif %}"> <!--[if lt IE 9]> - <p class="capabilitymessage">{% blocktrans %}You are using an <strong>outdated</strong> browser not supported by this software. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a>.{% endblocktrans %}</p> ? ----------------------------------------------------------------------------------------------- + <p class="capabilitymessage">{% blocktrans %}You are using an <strong>outdated</strong> browser not supported by this software. Please <a href="http://browsehappy.com/">upgrade your browser</a>.{% endblocktrans %}</p> <![endif]--> <noscript class="capabilitymessage">{% trans 'Javascript is required to use Wagtail, but it is currently disabled' %}</noscript> {% block js %}{% endblock %} <div class="wrapper"> {% block furniture %}{% endblock %} </div> </body> </html>
2
0.064516
1
1
aeb76bd1ec9a48f2291347611de4a47c032fb6f0
bench/Main.hs
bench/Main.hs
module Main (main) where import Criterion.Main import Control.Monad.ST import Control.Monad.Primitive (PrimMonad) import Control.Monad.Random (MonadRandom) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Vector.Unboxed (Vector, Unbox) import qualified Data.Vector.Unboxed as V import Pipes import Pipes.Prelude as P import Pipes.Vector import TauSigma.Util.Allan import TauSigma.Util.Pipes.Noise import TauSigma.Util.Vector main :: IO () main = do white <- whiteNoise 1000 defaultMain [ bgroup "adev" [ bench "wfm" $ nf (adevs 1) white ] ] whiteNoise :: (MonadRandom m, PrimMonad m) => Int -> m (Vector Double) whiteNoise size = readVector (white 1.0 >-> P.take size)
module Main (main) where import Criterion.Main import Control.Monad.ST import Control.Monad.Primitive (PrimMonad) import Control.Monad.Random (MonadRandom) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Vector.Unboxed (Vector, Unbox) import qualified Data.Vector.Unboxed as V import Pipes import qualified Pipes.Prelude as P import Pipes.Vector import TauSigma.Util.Allan import TauSigma.Util.Pipes.Noise import TauSigma.Util.Vector main :: IO () main = defaultMain [ noiseTests , adevTests ] makeNoise :: (MonadRandom m, PrimMonad m) => Producer Double m () -> Int -> m (Vector Double) makeNoise source size = readVector (source >-> P.take size) noiseTests = bgroup "noise" subgroups where sizes = [50, 500, 5000] subgroups = [ bgroup "white" (map benchWhite sizes) , bgroup "brown" (map benchBrown sizes) , bgroup "flicker" (map benchFlicker sizes) ] benchWhite = benchNoise (white 1.0) benchBrown = benchNoise (brown 1.0) benchFlicker size = benchNoise (flicker octaves 1.0) size where octaves = floor (logBase 2 (fromIntegral size)) + 1 benchNoise noise size = bench (show size) $ nfIO (makeNoise noise size) adevTests = bgroup "adev" (map (go (white 1.0)) sizes) where sizes = [50, 500, 5000] go source size = env (makeNoise source size) $ \input -> bench (show size) $ nf (adevs 1) input
Add benchmarks for random noise generation, and tweak others.
Add benchmarks for random noise generation, and tweak others.
Haskell
bsd-3-clause
sacundim/tau-sigma
haskell
## Code Before: module Main (main) where import Criterion.Main import Control.Monad.ST import Control.Monad.Primitive (PrimMonad) import Control.Monad.Random (MonadRandom) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Vector.Unboxed (Vector, Unbox) import qualified Data.Vector.Unboxed as V import Pipes import Pipes.Prelude as P import Pipes.Vector import TauSigma.Util.Allan import TauSigma.Util.Pipes.Noise import TauSigma.Util.Vector main :: IO () main = do white <- whiteNoise 1000 defaultMain [ bgroup "adev" [ bench "wfm" $ nf (adevs 1) white ] ] whiteNoise :: (MonadRandom m, PrimMonad m) => Int -> m (Vector Double) whiteNoise size = readVector (white 1.0 >-> P.take size) ## Instruction: Add benchmarks for random noise generation, and tweak others. ## Code After: module Main (main) where import Criterion.Main import Control.Monad.ST import Control.Monad.Primitive (PrimMonad) import Control.Monad.Random (MonadRandom) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Vector.Unboxed (Vector, Unbox) import qualified Data.Vector.Unboxed as V import Pipes import qualified Pipes.Prelude as P import Pipes.Vector import TauSigma.Util.Allan import TauSigma.Util.Pipes.Noise import TauSigma.Util.Vector main :: IO () main = defaultMain [ noiseTests , adevTests ] makeNoise :: (MonadRandom m, PrimMonad m) => Producer Double m () -> Int -> m (Vector Double) makeNoise source size = readVector (source >-> P.take size) noiseTests = bgroup "noise" subgroups where sizes = [50, 500, 5000] subgroups = [ bgroup "white" (map benchWhite sizes) , bgroup "brown" (map benchBrown sizes) , bgroup "flicker" (map benchFlicker sizes) ] benchWhite = benchNoise (white 1.0) benchBrown = benchNoise (brown 1.0) benchFlicker size = benchNoise (flicker octaves 1.0) size where octaves = floor (logBase 2 (fromIntegral size)) + 1 benchNoise noise size = bench (show size) $ nfIO (makeNoise noise size) adevTests = bgroup "adev" (map (go (white 1.0)) sizes) where sizes = [50, 500, 5000] go source size = env (makeNoise source size) $ \input -> bench (show size) $ nf (adevs 1) input
module Main (main) where import Criterion.Main import Control.Monad.ST import Control.Monad.Primitive (PrimMonad) import Control.Monad.Random (MonadRandom) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.Vector.Unboxed (Vector, Unbox) import qualified Data.Vector.Unboxed as V import Pipes - import Pipes.Prelude as P + import qualified Pipes.Prelude as P ? ++++++++++ import Pipes.Vector import TauSigma.Util.Allan import TauSigma.Util.Pipes.Noise import TauSigma.Util.Vector main :: IO () - main = do - white <- whiteNoise 1000 - defaultMain + main = defaultMain ? ++++ + + [ noiseTests + , adevTests + ] - [ bgroup "adev" - [ bench "wfm" $ nf (adevs 1) white - ] - ] + makeNoise + :: (MonadRandom m, PrimMonad m) => + Producer Double m () -> Int -> m (Vector Double) + makeNoise source size = readVector (source >-> P.take size) - whiteNoise :: (MonadRandom m, PrimMonad m) => Int -> m (Vector Double) - whiteNoise size = readVector (white 1.0 >-> P.take size) - + noiseTests = bgroup "noise" subgroups + where + sizes = [50, 500, 5000] + subgroups = [ bgroup "white" (map benchWhite sizes) + , bgroup "brown" (map benchBrown sizes) + , bgroup "flicker" (map benchFlicker sizes) + ] + + benchWhite = benchNoise (white 1.0) + benchBrown = benchNoise (brown 1.0) + benchFlicker size = benchNoise (flicker octaves 1.0) size + where octaves = floor (logBase 2 (fromIntegral size)) + 1 + + benchNoise noise size = bench (show size) $ nfIO (makeNoise noise size) + + adevTests = bgroup "adev" (map (go (white 1.0)) sizes) + where sizes = [50, 500, 5000] + go source size = + env (makeNoise source size) $ \input -> + bench (show size) $ nf (adevs 1) input
40
1.142857
29
11
e15dd9ad6093351433d54aff25fedece4eedf011
lib/frontend_server/rack.rb
lib/frontend_server/rack.rb
module FrontendServer module Rack def app server = self builder = ::Rack::Builder.new self.class.configurations.each do |configuration| configuration.call builder, config end # builder.use ::Rack::Deflater builder.use ReverseProxy do reverse_proxy /^\/api(\/.*)$/, "#{server.config.server}$1" end builder.use ::Rack::Rewrite do rewrite '/', '/index.html' rewrite %r{^\/?[^\.]+\/?(\?.*)?$}, '/index.html$1' end if development? builder.use Rake::Pipeline::Middleware, pipeline end if production? builder.use ::Rack::ETag builder.use ::Rack::ConditionalGet end builder.run ::Rack::Directory.new 'site' builder.to_app end def call(env) app.call(env) end end end
module FrontendServer module Rack def app server = self builder = ::Rack::Builder.new self.class.configurations.each do |configuration| configuration.call builder, config end builder.use ReverseProxy do reverse_proxy /^\/api(\/.*)$/, "#{server.config.server}$1" end builder.use ::Rack::Rewrite do rewrite '/', '/index.html' rewrite %r{^\/?[^\.]+\/?(\?.*)?$}, '/index.html$1' end if development? builder.use Rake::Pipeline::Middleware, pipeline end if production? builder.use ::Rack::ETag builder.use ::Rack::ConditionalGet end builder.run ::Rack::Directory.new 'site' builder.to_app end def call(env) app.call(env) end end end
Remove reference to Rack::Deflate. Seems to blow up aganist production
Remove reference to Rack::Deflate. Seems to blow up aganist production
Ruby
mit
radiumsoftware/iridium,radiumsoftware/iridium,radiumsoftware/iridium
ruby
## Code Before: module FrontendServer module Rack def app server = self builder = ::Rack::Builder.new self.class.configurations.each do |configuration| configuration.call builder, config end # builder.use ::Rack::Deflater builder.use ReverseProxy do reverse_proxy /^\/api(\/.*)$/, "#{server.config.server}$1" end builder.use ::Rack::Rewrite do rewrite '/', '/index.html' rewrite %r{^\/?[^\.]+\/?(\?.*)?$}, '/index.html$1' end if development? builder.use Rake::Pipeline::Middleware, pipeline end if production? builder.use ::Rack::ETag builder.use ::Rack::ConditionalGet end builder.run ::Rack::Directory.new 'site' builder.to_app end def call(env) app.call(env) end end end ## Instruction: Remove reference to Rack::Deflate. Seems to blow up aganist production ## Code After: module FrontendServer module Rack def app server = self builder = ::Rack::Builder.new self.class.configurations.each do |configuration| configuration.call builder, config end builder.use ReverseProxy do reverse_proxy /^\/api(\/.*)$/, "#{server.config.server}$1" end builder.use ::Rack::Rewrite do rewrite '/', '/index.html' rewrite %r{^\/?[^\.]+\/?(\?.*)?$}, '/index.html$1' end if development? builder.use Rake::Pipeline::Middleware, pipeline end if production? builder.use ::Rack::ETag builder.use ::Rack::ConditionalGet end builder.run ::Rack::Directory.new 'site' builder.to_app end def call(env) app.call(env) end end end
module FrontendServer module Rack def app server = self builder = ::Rack::Builder.new self.class.configurations.each do |configuration| configuration.call builder, config end - - # builder.use ::Rack::Deflater builder.use ReverseProxy do reverse_proxy /^\/api(\/.*)$/, "#{server.config.server}$1" end builder.use ::Rack::Rewrite do rewrite '/', '/index.html' rewrite %r{^\/?[^\.]+\/?(\?.*)?$}, '/index.html$1' end if development? builder.use Rake::Pipeline::Middleware, pipeline end if production? builder.use ::Rack::ETag builder.use ::Rack::ConditionalGet end builder.run ::Rack::Directory.new 'site' builder.to_app end def call(env) app.call(env) end end end
2
0.04878
0
2
a3ab68d304814ed623e3ff4823459906e1f843ce
app/assets/javascripts/client/views/login/login.html.erb
app/assets/javascripts/client/views/login/login.html.erb
<div class="login"> <div class="row secondary"> <div class="col-md-12"> <h1>Welcome back to PDredesign!</h1> </div> <div class="col-md-12 hidden-md hidden-lg"> <user-login></user-login> </div> </div> <div class="row"> <div class="col-md-12 intro"> <%= image_tag 'sign-in-image.png' %> </div> </div> <div class="row"> <div class="col-md-12 intro"> <h3>About PDredesign</h3> <p> PDredesign is the place for meaningful collaboration to reimagine teacher professional development. </p> <p> We're a community of educators and designers committed to continuously improving professional development systems to better support teachers. Alongside leaders from classrooms, schools, charters, districts, and partner organizations across the country, we are building an open digital toolkit and community of practice to support districts to redesign systems that meet the needs of educators and students. </p> <p> Improving professional development for teachers will take all of us working together. </p> </div> </div> </div>
<div class="login"> <div class="row secondary"> <div class="col-md-12"> <h1>Welcome back to PDredesign!</h1> </div> <div class="col-md-12 hidden-md hidden-lg"> <user-login></user-login> </div> </div> <div class="row"> <div class="col-md-12 intro"> <%= image_tag 'sign-in-image.png' %> </div> </div> <div class="row"> <div class="col-md-12 intro"> <h3>About PDredesign</h3> <p> PDredesign is the place for meaningful collaboration to reimagine teacher professional development. PDredesign is the place for meaningful collaboration to reimagine teacher professional development. Join our community of educators and designers committed to continuously improving professional development systems to better support teachers. Alongside leaders from classrooms, schools, charters, districts, and partner organizations across the country, we are building an open digital toolkit and community of practice to support districts to redesign systems that meet the needs of educators and students. Improving professional development for teachers will take all of us working together. </p> </div> </div> </div>
Revert "<p></p> added to footer summary."
Revert "<p></p> added to footer summary." This reverts commit 0618a9512e0a49878dc1b70deffa5bf39feb7f3f.
HTML+ERB
mit
MobilityLabs/pdredesign-client,MobilityLabs/pdredesign-client,MobilityLabs/pdredesign-client
html+erb
## Code Before: <div class="login"> <div class="row secondary"> <div class="col-md-12"> <h1>Welcome back to PDredesign!</h1> </div> <div class="col-md-12 hidden-md hidden-lg"> <user-login></user-login> </div> </div> <div class="row"> <div class="col-md-12 intro"> <%= image_tag 'sign-in-image.png' %> </div> </div> <div class="row"> <div class="col-md-12 intro"> <h3>About PDredesign</h3> <p> PDredesign is the place for meaningful collaboration to reimagine teacher professional development. </p> <p> We're a community of educators and designers committed to continuously improving professional development systems to better support teachers. Alongside leaders from classrooms, schools, charters, districts, and partner organizations across the country, we are building an open digital toolkit and community of practice to support districts to redesign systems that meet the needs of educators and students. </p> <p> Improving professional development for teachers will take all of us working together. </p> </div> </div> </div> ## Instruction: Revert "<p></p> added to footer summary." This reverts commit 0618a9512e0a49878dc1b70deffa5bf39feb7f3f. ## Code After: <div class="login"> <div class="row secondary"> <div class="col-md-12"> <h1>Welcome back to PDredesign!</h1> </div> <div class="col-md-12 hidden-md hidden-lg"> <user-login></user-login> </div> </div> <div class="row"> <div class="col-md-12 intro"> <%= image_tag 'sign-in-image.png' %> </div> </div> <div class="row"> <div class="col-md-12 intro"> <h3>About PDredesign</h3> <p> PDredesign is the place for meaningful collaboration to reimagine teacher professional development. PDredesign is the place for meaningful collaboration to reimagine teacher professional development. Join our community of educators and designers committed to continuously improving professional development systems to better support teachers. Alongside leaders from classrooms, schools, charters, districts, and partner organizations across the country, we are building an open digital toolkit and community of practice to support districts to redesign systems that meet the needs of educators and students. Improving professional development for teachers will take all of us working together. </p> </div> </div> </div>
<div class="login"> <div class="row secondary"> <div class="col-md-12"> <h1>Welcome back to PDredesign!</h1> </div> <div class="col-md-12 hidden-md hidden-lg"> <user-login></user-login> </div> </div> <div class="row"> <div class="col-md-12 intro"> <%= image_tag 'sign-in-image.png' %> </div> </div> <div class="row"> <div class="col-md-12 intro"> <h3>About PDredesign</h3> <p> + PDredesign is the place for meaningful collaboration to reimagine teacher professional development. PDredesign is the place for meaningful collaboration to reimagine teacher professional development. Join our community of educators and designers committed to continuously improving professional development systems to better support teachers. Alongside leaders from classrooms, schools, charters, districts, and partner organizations across the country, we are building an open digital toolkit and community of practice to support districts to redesign systems that meet the needs of educators and students. Improving professional development for teachers will take all of us working together. - PDredesign is the place for meaningful collaboration to reimagine teacher professional development. - </p> - <p> - We're a community of educators and designers committed to continuously improving professional development systems to better support teachers. Alongside leaders from classrooms, schools, charters, districts, and partner organizations across the country, we are building an open digital toolkit and community of practice to support districts to redesign systems that meet the needs of educators and students. - </p> - <p> - Improving professional development for teachers will take all of us working together. </p> </div> </div> </div>
8
0.235294
1
7
f6b193c1d06f99c14d87fde1217c513037a39446
app/controllers/api/v1/expense_reports_controller.rb
app/controllers/api/v1/expense_reports_controller.rb
class Api::V1::ExpenseReportsController < Api::V1::ApiController inherit_resources def create expense_report = ExpenseReport.new(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end def index @expense_reports = ExpenseReport.where({}) [:user_id].each do |p| if params[p].present? @expense_reports = @expense_reports.where( p => params[p] ) end end render :json => @expense_reports end def update end private def safe_params params.require(:expense_report).permit(:start_time, :end_time, :country, :currency, :user_id, :status, :expenses_attributes => [:description, :amount, :quantity, :exchange_rate, :currency]) end end
class Api::V1::ExpenseReportsController < Api::V1::ApiController inherit_resources def create expense_report = ExpenseReport.new(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end def index @expense_reports = ExpenseReport.where({}) [:user_id].each do |p| if params[p].present? @expense_reports = @expense_reports.where( p => params[p] ) end end render :json => @expense_reports end def update expense_report = ExpenseReport.find(params[:id]) expense_report.expenses.destroy_all expense_report.update_attributes(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end private def safe_params params.require(:expense_report).permit(:start_time, :end_time, :country, :currency, :user_id, :status, :expenses_attributes => [:description, :amount, :quantity, :exchange_rate, :currency]) end end
Implement expense report update action
Implement expense report update action
Ruby
mit
danevron/hours-report-app,danevron/hours-report-app,danevron/hours-report-app
ruby
## Code Before: class Api::V1::ExpenseReportsController < Api::V1::ApiController inherit_resources def create expense_report = ExpenseReport.new(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end def index @expense_reports = ExpenseReport.where({}) [:user_id].each do |p| if params[p].present? @expense_reports = @expense_reports.where( p => params[p] ) end end render :json => @expense_reports end def update end private def safe_params params.require(:expense_report).permit(:start_time, :end_time, :country, :currency, :user_id, :status, :expenses_attributes => [:description, :amount, :quantity, :exchange_rate, :currency]) end end ## Instruction: Implement expense report update action ## Code After: class Api::V1::ExpenseReportsController < Api::V1::ApiController inherit_resources def create expense_report = ExpenseReport.new(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end def index @expense_reports = ExpenseReport.where({}) [:user_id].each do |p| if params[p].present? @expense_reports = @expense_reports.where( p => params[p] ) end end render :json => @expense_reports end def update expense_report = ExpenseReport.find(params[:id]) expense_report.expenses.destroy_all expense_report.update_attributes(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end private def safe_params params.require(:expense_report).permit(:start_time, :end_time, :country, :currency, :user_id, :status, :expenses_attributes => [:description, :amount, :quantity, :exchange_rate, :currency]) end end
class Api::V1::ExpenseReportsController < Api::V1::ApiController inherit_resources def create expense_report = ExpenseReport.new(safe_params) if expense_report.save render :json => expense_report else render :json => expense_report.errors, :status => :unprocessable_entity end end def index @expense_reports = ExpenseReport.where({}) [:user_id].each do |p| if params[p].present? @expense_reports = @expense_reports.where( p => params[p] ) end end render :json => @expense_reports end def update + expense_report = ExpenseReport.find(params[:id]) + expense_report.expenses.destroy_all + expense_report.update_attributes(safe_params) + if expense_report.save + render :json => expense_report + else + render :json => expense_report.errors, :status => :unprocessable_entity + end end private def safe_params params.require(:expense_report).permit(:start_time, :end_time, :country, :currency, :user_id, :status, :expenses_attributes => [:description, :amount, :quantity, :exchange_rate, :currency]) end end
8
0.25
8
0
61b4f72045ea683a83a358d5d66bd32f7711598b
services/serializers.py
services/serializers.py
from rest_framework import serializers from .models import Service, Category, ServicePhoto class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ('id', 'name', 'photo', 'order') class ServicePhotoSerializer(serializers.ModelSerializer): """ """ class Meta: model = ServicePhoto fields = ('id', 'photo') class ServiceSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance).data) """ category = CategorySerializer() photos = ServicePhotoSerializer(many=True) class Meta: model = Service fields = ('id', 'title', 'date', 'description', 'category', 'photos')
from rest_framework import serializers from .models import Service, Category, ServicePhoto from semillas_backend.users.serializers import UserSerializer class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ('id', 'name', 'photo', 'order') class ServicePhotoSerializer(serializers.ModelSerializer): """ """ class Meta: model = ServicePhoto fields = ('id', 'photo') class ServiceSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance).data) """ category = CategorySerializer() photos = ServicePhotoSerializer(many=True) author = UserSerializer() class Meta: model = Service fields = ('id', 'title', 'date', 'description', 'author', 'category', 'photos')
Add user serialized to ServiceSerializer
Add user serialized to ServiceSerializer
Python
mit
Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform
python
## Code Before: from rest_framework import serializers from .models import Service, Category, ServicePhoto class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ('id', 'name', 'photo', 'order') class ServicePhotoSerializer(serializers.ModelSerializer): """ """ class Meta: model = ServicePhoto fields = ('id', 'photo') class ServiceSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance).data) """ category = CategorySerializer() photos = ServicePhotoSerializer(many=True) class Meta: model = Service fields = ('id', 'title', 'date', 'description', 'category', 'photos') ## Instruction: Add user serialized to ServiceSerializer ## Code After: from rest_framework import serializers from .models import Service, Category, ServicePhoto from semillas_backend.users.serializers import UserSerializer class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ('id', 'name', 'photo', 'order') class ServicePhotoSerializer(serializers.ModelSerializer): """ """ class Meta: model = ServicePhoto fields = ('id', 'photo') class ServiceSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance).data) """ category = CategorySerializer() photos = ServicePhotoSerializer(many=True) author = UserSerializer() class Meta: model = Service fields = ('id', 'title', 'date', 'description', 'author', 'category', 'photos')
from rest_framework import serializers from .models import Service, Category, ServicePhoto + from semillas_backend.users.serializers import UserSerializer class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ('id', 'name', 'photo', 'order') class ServicePhotoSerializer(serializers.ModelSerializer): """ """ class Meta: model = ServicePhoto fields = ('id', 'photo') class ServiceSerializer(serializers.ModelSerializer): """ Usage: from rest_framework.renderers import JSONRenderer from semillas_backend.users.serializers import UserSerializer JSONRenderer().render(UserSerializer(user_instance).data) """ category = CategorySerializer() photos = ServicePhotoSerializer(many=True) + author = UserSerializer() class Meta: model = Service - fields = ('id', 'title', 'date', 'description', 'category', 'photos') + fields = ('id', 'title', 'date', 'description', 'author', 'category', 'photos') ? ++++++++++
4
0.129032
3
1
7a47020bc7d2dee6f0f2f20d2e3f84dea4493ad5
app/controllers/competitions_controller.rb
app/controllers/competitions_controller.rb
class CompetitionsController < ApplicationController caches_page :show def show # Very explicit because we don't want to call something like 'eval' on a request parameter! if params[:type] == "rider_rankings" competition_class = RiderRankings elsif params[:type] == "cat4_womens_race_series" competition_class = Cat4WomensRaceSeries elsif params[:type] == "wsba_barr" competition_class = WsbaBarr elsif params[:type] == "wsba_masters_barr" competition_class = WsbaMastersBarr elsif params[:type] == "mbra_bar" competition_class = MbraBar else raise ActiveRecord::RecordNotFound.new("No competition of type: #{params[:type]}") end @event = competition_class.year(@year).first || competition_class.new(:date => Time.zone.local(@year)) end end
class CompetitionsController < ApplicationController caches_page :show def show # Very explicit because we don't want to call something like 'eval' on a request parameter! if params[:type] == "rider_rankings" competition_class = RiderRankings elsif params[:type] == "cat4_womens_race_series" competition_class = Cat4WomensRaceSeries elsif params[:type] == "wsba_barr" competition_class = WsbaBarr elsif params[:type] == "wsba_masters_barr" competition_class = WsbaMastersBarr elsif params[:type] == "mbra_bar" competition_class = MbraBar elsif params[:type] == "obra_tt_cup" competition_class = OBRATTCup else raise ActiveRecord::RecordNotFound.new("No competition of type: #{params[:type]}") end @event = competition_class.year(@year).first || competition_class.new(:date => Time.zone.local(@year)) render "results/event" end end
Add OBRA TT. Use standard results template.
Add OBRA TT. Use standard results template.
Ruby
mit
scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails
ruby
## Code Before: class CompetitionsController < ApplicationController caches_page :show def show # Very explicit because we don't want to call something like 'eval' on a request parameter! if params[:type] == "rider_rankings" competition_class = RiderRankings elsif params[:type] == "cat4_womens_race_series" competition_class = Cat4WomensRaceSeries elsif params[:type] == "wsba_barr" competition_class = WsbaBarr elsif params[:type] == "wsba_masters_barr" competition_class = WsbaMastersBarr elsif params[:type] == "mbra_bar" competition_class = MbraBar else raise ActiveRecord::RecordNotFound.new("No competition of type: #{params[:type]}") end @event = competition_class.year(@year).first || competition_class.new(:date => Time.zone.local(@year)) end end ## Instruction: Add OBRA TT. Use standard results template. ## Code After: class CompetitionsController < ApplicationController caches_page :show def show # Very explicit because we don't want to call something like 'eval' on a request parameter! if params[:type] == "rider_rankings" competition_class = RiderRankings elsif params[:type] == "cat4_womens_race_series" competition_class = Cat4WomensRaceSeries elsif params[:type] == "wsba_barr" competition_class = WsbaBarr elsif params[:type] == "wsba_masters_barr" competition_class = WsbaMastersBarr elsif params[:type] == "mbra_bar" competition_class = MbraBar elsif params[:type] == "obra_tt_cup" competition_class = OBRATTCup else raise ActiveRecord::RecordNotFound.new("No competition of type: #{params[:type]}") end @event = competition_class.year(@year).first || competition_class.new(:date => Time.zone.local(@year)) render "results/event" end end
class CompetitionsController < ApplicationController caches_page :show def show # Very explicit because we don't want to call something like 'eval' on a request parameter! if params[:type] == "rider_rankings" competition_class = RiderRankings elsif params[:type] == "cat4_womens_race_series" competition_class = Cat4WomensRaceSeries elsif params[:type] == "wsba_barr" competition_class = WsbaBarr elsif params[:type] == "wsba_masters_barr" competition_class = WsbaMastersBarr elsif params[:type] == "mbra_bar" competition_class = MbraBar + elsif params[:type] == "obra_tt_cup" + competition_class = OBRATTCup else raise ActiveRecord::RecordNotFound.new("No competition of type: #{params[:type]}") end @event = competition_class.year(@year).first || competition_class.new(:date => Time.zone.local(@year)) + + render "results/event" end end
4
0.181818
4
0
a4cb3d5a660eed1b3f18aa0f77a2b228e437a505
app/assets/stylesheets/navbar.css.scss
app/assets/stylesheets/navbar.css.scss
@import 'bootstrap/_variables'; @import '_theme'; .navbar .container .navbar-brand { background: url("/assets/header-crown.png") 0 0.67em no-repeat; color: #fff; font-family: $gill-sans-font-stack; font-size: 20px; margin-left: 0; padding-left: 2.3em; } @media (max-width: 768px) { .navbar .container .navbar-brand { margin-left: 15px; } } .navbar .navbar-brand:hover, .navbar .navbar-brand:focus { text-decoration: underline; } .navbar-text a { color: $gray-light; text-decoration: underline; } // Let's make these more specific to add the intended white colour .navbar-inverse .nav-collapse .nav a:hover, .navbar-inverse .nav-collapse .nav .active a, .navbar-inverse .nav-collapse .nav .active a:hover, .navbar-inverse .nav-collapse .nav .active a:focus { color: #fff; }
@import 'bootstrap/_variables'; @import '_theme'; .navbar .container .navbar-brand { background: url("/assets/header-crown.png") 0 0.67em no-repeat; color: #fff; font-family: $gill-sans-font-stack; font-size: 20px; margin-left: 0; padding-left: 2.3em; min-height: 37px; } @media (max-width: 768px) { .navbar .container .navbar-brand { margin-left: 15px; } } .navbar .navbar-brand:hover, .navbar .navbar-brand:focus { text-decoration: underline; } .navbar-text a { color: $gray-light; text-decoration: underline; } // Let's make these more specific to add the intended white colour .navbar-inverse .nav-collapse .nav a:hover, .navbar-inverse .nav-collapse .nav .active a, .navbar-inverse .nav-collapse .nav .active a:hover, .navbar-inverse .nav-collapse .nav .active a:focus { color: #fff; }
Stop the logo being cropped
Stop the logo being cropped * An update to Bootstrap 3.1 caused a regression with the logo in the navbar. This fixes it by forcing a minimum height.
SCSS
mit
alphagov/transition,alphagov/transition,alphagov/transition
scss
## Code Before: @import 'bootstrap/_variables'; @import '_theme'; .navbar .container .navbar-brand { background: url("/assets/header-crown.png") 0 0.67em no-repeat; color: #fff; font-family: $gill-sans-font-stack; font-size: 20px; margin-left: 0; padding-left: 2.3em; } @media (max-width: 768px) { .navbar .container .navbar-brand { margin-left: 15px; } } .navbar .navbar-brand:hover, .navbar .navbar-brand:focus { text-decoration: underline; } .navbar-text a { color: $gray-light; text-decoration: underline; } // Let's make these more specific to add the intended white colour .navbar-inverse .nav-collapse .nav a:hover, .navbar-inverse .nav-collapse .nav .active a, .navbar-inverse .nav-collapse .nav .active a:hover, .navbar-inverse .nav-collapse .nav .active a:focus { color: #fff; } ## Instruction: Stop the logo being cropped * An update to Bootstrap 3.1 caused a regression with the logo in the navbar. This fixes it by forcing a minimum height. ## Code After: @import 'bootstrap/_variables'; @import '_theme'; .navbar .container .navbar-brand { background: url("/assets/header-crown.png") 0 0.67em no-repeat; color: #fff; font-family: $gill-sans-font-stack; font-size: 20px; margin-left: 0; padding-left: 2.3em; min-height: 37px; } @media (max-width: 768px) { .navbar .container .navbar-brand { margin-left: 15px; } } .navbar .navbar-brand:hover, .navbar .navbar-brand:focus { text-decoration: underline; } .navbar-text a { color: $gray-light; text-decoration: underline; } // Let's make these more specific to add the intended white colour .navbar-inverse .nav-collapse .nav a:hover, .navbar-inverse .nav-collapse .nav .active a, .navbar-inverse .nav-collapse .nav .active a:hover, .navbar-inverse .nav-collapse .nav .active a:focus { color: #fff; }
@import 'bootstrap/_variables'; @import '_theme'; .navbar .container .navbar-brand { background: url("/assets/header-crown.png") 0 0.67em no-repeat; color: #fff; font-family: $gill-sans-font-stack; font-size: 20px; margin-left: 0; padding-left: 2.3em; + min-height: 37px; } @media (max-width: 768px) { .navbar .container .navbar-brand { margin-left: 15px; } } .navbar .navbar-brand:hover, .navbar .navbar-brand:focus { text-decoration: underline; } .navbar-text a { color: $gray-light; text-decoration: underline; } // Let's make these more specific to add the intended white colour .navbar-inverse .nav-collapse .nav a:hover, .navbar-inverse .nav-collapse .nav .active a, .navbar-inverse .nav-collapse .nav .active a:hover, .navbar-inverse .nav-collapse .nav .active a:focus { color: #fff; }
1
0.028571
1
0
5cc3518924500882d85dfa5a6c9d9816d5d60f07
KLog/klog/basic_types.h
KLog/klog/basic_types.h
/* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KLOG_BASIC_TYPES_H_ #define KLOG_BASIC_TYPES_H_ #include <string> #include "klog/basic_macros.h" namespace klog { #if defined(OS_WIN) using PathChar = wchar_t; using PathString = std::wstring; #else using PathChar = char; using PathString = std::string; #endif } // namespace klog #endif // KLOG_BASIC_TYPES_H_
/* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KLOG_BASIC_TYPES_H_ #define KLOG_BASIC_TYPES_H_ #include <string> #include "klog/basic_macros.h" namespace klog { #if defined(OS_WIN) using PathChar = wchar_t; using PathString = std::wstring; #define PATH_LITERAL(str) L##str #else using PathChar = char; using PathString = std::string; #define PATH_LITERAL(str) str #endif } // namespace klog #endif // KLOG_BASIC_TYPES_H_
Introduce the macro `PATH_LITERAL` for helping construct `PathString`.
Introduce the macro `PATH_LITERAL` for helping construct `PathString`.
C
mit
kingsamchen/KLog
c
## Code Before: /* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KLOG_BASIC_TYPES_H_ #define KLOG_BASIC_TYPES_H_ #include <string> #include "klog/basic_macros.h" namespace klog { #if defined(OS_WIN) using PathChar = wchar_t; using PathString = std::wstring; #else using PathChar = char; using PathString = std::string; #endif } // namespace klog #endif // KLOG_BASIC_TYPES_H_ ## Instruction: Introduce the macro `PATH_LITERAL` for helping construct `PathString`. ## Code After: /* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KLOG_BASIC_TYPES_H_ #define KLOG_BASIC_TYPES_H_ #include <string> #include "klog/basic_macros.h" namespace klog { #if defined(OS_WIN) using PathChar = wchar_t; using PathString = std::wstring; #define PATH_LITERAL(str) L##str #else using PathChar = char; using PathString = std::string; #define PATH_LITERAL(str) str #endif } // namespace klog #endif // KLOG_BASIC_TYPES_H_
/* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KLOG_BASIC_TYPES_H_ #define KLOG_BASIC_TYPES_H_ #include <string> #include "klog/basic_macros.h" namespace klog { #if defined(OS_WIN) using PathChar = wchar_t; using PathString = std::wstring; + #define PATH_LITERAL(str) L##str #else using PathChar = char; using PathString = std::string; + #define PATH_LITERAL(str) str #endif } // namespace klog #endif // KLOG_BASIC_TYPES_H_
2
0.071429
2
0
0bf0420ce3f1148c1beb65b652c0a64b533fa634
lib/inline_svg/static_asset_finder.rb
lib/inline_svg/static_asset_finder.rb
module InlineSvg class StaticAssetFinder def self.find_asset(filename) new(filename) end def initialize(filename) @filename = filename end def pathname if ::Rails.application.config.assets.compile ::Rails.application.assets[@filename].pathname else manifest = ::Rails.application.assets_manifest asset_path = manifest.assets[@filename] unless asset_path.nil? ::Rails.root.join(manifest.directory, asset_path) end end end end end
require "pathname" # Naive fallback asset finder for when sprockets >= 3.0 && # config.assets.precompile = false # Thanks to @ryanswood for the original code: # https://github.com/jamesmartin/inline_svg/commit/661bbb3bef7d1b4bd6ccd63f5f018305797b9509 module InlineSvg class StaticAssetFinder def self.find_asset(filename) new(filename) end def initialize(filename) @filename = filename end def pathname if ::Rails.application.config.assets.compile Pathname.new(::Rails.application.assets[@filename].filename) else manifest = ::Rails.application.assets_manifest asset_path = manifest.assets[@filename] unless asset_path.nil? ::Rails.root.join(manifest.directory, asset_path) end end end end end
Fix bad reference to Sprockets::Asset.pathname
Fix bad reference to Sprockets::Asset.pathname
Ruby
mit
jamesmartin/inline_svg
ruby
## Code Before: module InlineSvg class StaticAssetFinder def self.find_asset(filename) new(filename) end def initialize(filename) @filename = filename end def pathname if ::Rails.application.config.assets.compile ::Rails.application.assets[@filename].pathname else manifest = ::Rails.application.assets_manifest asset_path = manifest.assets[@filename] unless asset_path.nil? ::Rails.root.join(manifest.directory, asset_path) end end end end end ## Instruction: Fix bad reference to Sprockets::Asset.pathname ## Code After: require "pathname" # Naive fallback asset finder for when sprockets >= 3.0 && # config.assets.precompile = false # Thanks to @ryanswood for the original code: # https://github.com/jamesmartin/inline_svg/commit/661bbb3bef7d1b4bd6ccd63f5f018305797b9509 module InlineSvg class StaticAssetFinder def self.find_asset(filename) new(filename) end def initialize(filename) @filename = filename end def pathname if ::Rails.application.config.assets.compile Pathname.new(::Rails.application.assets[@filename].filename) else manifest = ::Rails.application.assets_manifest asset_path = manifest.assets[@filename] unless asset_path.nil? ::Rails.root.join(manifest.directory, asset_path) end end end end end
+ require "pathname" + + # Naive fallback asset finder for when sprockets >= 3.0 && + # config.assets.precompile = false + # Thanks to @ryanswood for the original code: + # https://github.com/jamesmartin/inline_svg/commit/661bbb3bef7d1b4bd6ccd63f5f018305797b9509 module InlineSvg class StaticAssetFinder def self.find_asset(filename) new(filename) end def initialize(filename) @filename = filename end def pathname if ::Rails.application.config.assets.compile - ::Rails.application.assets[@filename].pathname ? ^^^^ + Pathname.new(::Rails.application.assets[@filename].filename) ? +++++++++++++ ^^^^ + else manifest = ::Rails.application.assets_manifest asset_path = manifest.assets[@filename] unless asset_path.nil? ::Rails.root.join(manifest.directory, asset_path) end end end end end
8
0.347826
7
1
72298414f57dcb07374252765bd464f06ff71062
spec/application_spec.rb
spec/application_spec.rb
require 'hyperloop' describe Hyperloop::Application do before :each do @root = 'spec/fixtures/simple/' @app = Hyperloop::Application.new(@root) end it 'responds successfully to a request for root' do request = Rack::MockRequest.new(@app) response = request.get('/') expect(response).to be_ok expect(response.body).to match(/<h1>Simple/) end it 'responds successfully to a request for a different page' do request = Rack::MockRequest.new(@app) response = request.get('/about') expect(response).to be_ok expect(response.body).to match(/<h1>About/) end it '404s on a request for a nonexistent page' do request = Rack::MockRequest.new(@app) response = request.get('/nonexistent') expect(response).to be_not_found end end
require 'hyperloop' describe Hyperloop::Application do describe 'with a flat views directory' do before :each do @app = Hyperloop::Application.new('spec/fixtures/simple/') @request = Rack::MockRequest.new(@app) end it 'responds successfully to a request for root' do response = @request.get('/') expect(response).to be_ok expect(response.body).to match(/<h1>Simple/) end it 'responds successfully to a request for a different page' do response = @request.get('/about') expect(response).to be_ok expect(response.body).to match(/<h1>About/) end it '404s on a request for a nonexistent page' do response = @request.get('/nonexistent') expect(response).to be_not_found end end end
Move Application specs into flat context
Move Application specs into flat context
Ruby
mit
jakeboxer/hyperloop,jakeboxer/hyperloop
ruby
## Code Before: require 'hyperloop' describe Hyperloop::Application do before :each do @root = 'spec/fixtures/simple/' @app = Hyperloop::Application.new(@root) end it 'responds successfully to a request for root' do request = Rack::MockRequest.new(@app) response = request.get('/') expect(response).to be_ok expect(response.body).to match(/<h1>Simple/) end it 'responds successfully to a request for a different page' do request = Rack::MockRequest.new(@app) response = request.get('/about') expect(response).to be_ok expect(response.body).to match(/<h1>About/) end it '404s on a request for a nonexistent page' do request = Rack::MockRequest.new(@app) response = request.get('/nonexistent') expect(response).to be_not_found end end ## Instruction: Move Application specs into flat context ## Code After: require 'hyperloop' describe Hyperloop::Application do describe 'with a flat views directory' do before :each do @app = Hyperloop::Application.new('spec/fixtures/simple/') @request = Rack::MockRequest.new(@app) end it 'responds successfully to a request for root' do response = @request.get('/') expect(response).to be_ok expect(response.body).to match(/<h1>Simple/) end it 'responds successfully to a request for a different page' do response = @request.get('/about') expect(response).to be_ok expect(response.body).to match(/<h1>About/) end it '404s on a request for a nonexistent page' do response = @request.get('/nonexistent') expect(response).to be_not_found end end end
require 'hyperloop' describe Hyperloop::Application do + describe 'with a flat views directory' do - before :each do + before :each do ? ++ - @root = 'spec/fixtures/simple/' - @app = Hyperloop::Application.new(@root) + @app = Hyperloop::Application.new('spec/fixtures/simple/') + @request = Rack::MockRequest.new(@app) - end + end ? ++ - it 'responds successfully to a request for root' do + it 'responds successfully to a request for root' do ? ++ - request = Rack::MockRequest.new(@app) - response = request.get('/') + response = @request.get('/') ? ++ + - expect(response).to be_ok + expect(response).to be_ok ? ++ - expect(response.body).to match(/<h1>Simple/) + expect(response.body).to match(/<h1>Simple/) ? ++ - end + end ? ++ - it 'responds successfully to a request for a different page' do + it 'responds successfully to a request for a different page' do ? ++ - request = Rack::MockRequest.new(@app) - response = request.get('/about') + response = @request.get('/about') ? ++ + - expect(response).to be_ok + expect(response).to be_ok ? ++ - expect(response.body).to match(/<h1>About/) + expect(response.body).to match(/<h1>About/) ? ++ - end + end ? ++ - it '404s on a request for a nonexistent page' do + it '404s on a request for a nonexistent page' do ? ++ - request = Rack::MockRequest.new(@app) - response = request.get('/nonexistent') + response = @request.get('/nonexistent') ? ++ + - expect(response).to be_not_found + expect(response).to be_not_found ? ++ + end end end
39
1.258065
19
20
0766716a10277301428ff610001d30d5501b778a
.travis.yml
.travis.yml
language: python python: - "2.7" cache: pip sudo: false # Need mongodb for testing services: mongodb # command to install dependencies install: - pip install -q -r requirements_for_tests.txt # command to run tests env: - SKIP_VIRUS_SCAN=1 SKIP_SPLINTER_TESTS=1 MONGO_REPLICA_SET='' NO_AUTOPEP8=1 script: - ./run_tests.sh after_script: - coveralls branches: except: - release - /^release_[0-9]+$/ - /^deployed-to-(preview|staging|production)$/ notifications: email: false
language: python python: - "2.7" cache: pip sudo: false # Need mongodb for testing services: mongodb # command to install dependencies install: - pip install --upgrade setuptools - pip install -q -r requirements_for_tests.txt # command to run tests env: - SKIP_VIRUS_SCAN=1 SKIP_SPLINTER_TESTS=1 MONGO_REPLICA_SET='' NO_AUTOPEP8=1 script: - ./run_tests.sh after_script: - coveralls branches: except: - release - /^release_[0-9]+$/ - /^deployed-to-(preview|staging|production)$/ notifications: email: false
Make sure setuptools is up to date
Make sure setuptools is up to date
YAML
mit
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
yaml
## Code Before: language: python python: - "2.7" cache: pip sudo: false # Need mongodb for testing services: mongodb # command to install dependencies install: - pip install -q -r requirements_for_tests.txt # command to run tests env: - SKIP_VIRUS_SCAN=1 SKIP_SPLINTER_TESTS=1 MONGO_REPLICA_SET='' NO_AUTOPEP8=1 script: - ./run_tests.sh after_script: - coveralls branches: except: - release - /^release_[0-9]+$/ - /^deployed-to-(preview|staging|production)$/ notifications: email: false ## Instruction: Make sure setuptools is up to date ## Code After: language: python python: - "2.7" cache: pip sudo: false # Need mongodb for testing services: mongodb # command to install dependencies install: - pip install --upgrade setuptools - pip install -q -r requirements_for_tests.txt # command to run tests env: - SKIP_VIRUS_SCAN=1 SKIP_SPLINTER_TESTS=1 MONGO_REPLICA_SET='' NO_AUTOPEP8=1 script: - ./run_tests.sh after_script: - coveralls branches: except: - release - /^release_[0-9]+$/ - /^deployed-to-(preview|staging|production)$/ notifications: email: false
language: python python: - "2.7" cache: pip sudo: false # Need mongodb for testing services: mongodb # command to install dependencies install: + - pip install --upgrade setuptools - pip install -q -r requirements_for_tests.txt # command to run tests env: - SKIP_VIRUS_SCAN=1 SKIP_SPLINTER_TESTS=1 MONGO_REPLICA_SET='' NO_AUTOPEP8=1 script: - ./run_tests.sh after_script: - coveralls branches: except: - release - /^release_[0-9]+$/ - /^deployed-to-(preview|staging|production)$/ notifications: email: false
1
0.041667
1
0
079d22188aeba78e582fc5f3cb28db4363dd1ffb
api_browser.rb
api_browser.rb
$LOAD_PATH << './app/models/' require 'active_record' ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'ruby.db' Dir.glob('app/models/*.rb').each do |model| require model.scan(/\/([a-z]+).rb/).flatten.first end
$LOAD_PATH << './app/models/' require 'active_record' require 'yaml' ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'ruby.db' Dir.glob('app/models/*.rb').each do |model| require model.scan(/\/([a-z]+).rb/).flatten.first end begin GitHub::User.delete_all $user = GitHub::User.create(YAML::load_file('config/secrets.yml')["user"]) rescue ActiveRecord::StatementInvalid puts 'Error: Did you run rake db:migrate?' puts 'Trying to do it for you...' system 'rake db:migrate' end
Add exception handling and loading from secrets.yml.
Add exception handling and loading from secrets.yml.
Ruby
mit
farnoy/github-api-client
ruby
## Code Before: $LOAD_PATH << './app/models/' require 'active_record' ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'ruby.db' Dir.glob('app/models/*.rb').each do |model| require model.scan(/\/([a-z]+).rb/).flatten.first end ## Instruction: Add exception handling and loading from secrets.yml. ## Code After: $LOAD_PATH << './app/models/' require 'active_record' require 'yaml' ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'ruby.db' Dir.glob('app/models/*.rb').each do |model| require model.scan(/\/([a-z]+).rb/).flatten.first end begin GitHub::User.delete_all $user = GitHub::User.create(YAML::load_file('config/secrets.yml')["user"]) rescue ActiveRecord::StatementInvalid puts 'Error: Did you run rake db:migrate?' puts 'Trying to do it for you...' system 'rake db:migrate' end
$LOAD_PATH << './app/models/' require 'active_record' + require 'yaml' ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'ruby.db' Dir.glob('app/models/*.rb').each do |model| require model.scan(/\/([a-z]+).rb/).flatten.first end + + begin + GitHub::User.delete_all + $user = GitHub::User.create(YAML::load_file('config/secrets.yml')["user"]) + + rescue ActiveRecord::StatementInvalid + puts 'Error: Did you run rake db:migrate?' + puts 'Trying to do it for you...' + system 'rake db:migrate' + end
11
1.375
11
0
d3360668bda1198972a5d74d68f8aa378340b920
features/core-update-db.feature
features/core-update-db.feature
Feature: Update core's database Scenario: Update db on a single site Given a WP install And I run `wp core download --version=4.1 --force` And I run `wp option update db_version 29630` When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database upgraded successfully from 29630 to 30133 """ When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database already at latest version 30133 """ Scenario: Update db across network Given a WP multisite install And I run `wp site create --slug=foo` And I run `wp site create --slug=bar` And I run `wp site create --slug=burrito --porcelain` And save STDOUT as {BURRITO_ID} And I run `wp site create --slug=taco --porcelain` And save STDOUT as {TACO_ID} And I run `wp site create --slug=pizza --porcelain` And save STDOUT as {PIZZA_ID} And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` When I run `wp core update-db --network` Then STDOUT should contain: """ Success: WordPress database upgraded on 3/3 sites """
Feature: Update core's database Scenario: Update db on a single site Given a WP install And I run `wp core download --version=4.1 --force` And I run `wp option update db_version 29630` When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database upgraded successfully from db version 29630 to 30133 """ When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database already at latest db version 30133 """ Scenario: Update db across network Given a WP multisite install And I run `wp site create --slug=foo` And I run `wp site create --slug=bar` And I run `wp site create --slug=burrito --porcelain` And save STDOUT as {BURRITO_ID} And I run `wp site create --slug=taco --porcelain` And save STDOUT as {TACO_ID} And I run `wp site create --slug=pizza --porcelain` And save STDOUT as {PIZZA_ID} And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` When I run `wp core update-db --network` Then STDOUT should contain: """ Success: WordPress database upgraded on 3/3 sites """
Update tests to accommodate new messages
Update tests to accommodate new messages
Cucumber
mit
duncanjbrown/wp-cli,trepmal/wp-cli,nyordanov/wp-cli,trepmal/wp-cli,gitlost/wp-cli,GaryJones/wp-cli,gitlost/wp-cli,rodrigoprimo/wp-cli,GaryJones/wp-cli,GaryJones/wp-cli,2ndkauboy/wp-cli,miya0001/wp-cli,miya0001/wp-cli,trepmal/wp-cli,aaemnnosttv/wp-cli,nyordanov/wp-cli,aaemnnosttv/wp-cli,gedex/wp-cli,nyordanov/wp-cli,gitlost/wp-cli,rodrigoprimo/wp-cli,2ndkauboy/wp-cli,gedex/wp-cli,rodrigoprimo/wp-cli,gedex/wp-cli,duncanjbrown/wp-cli,shawnhooper/wp-cli,aaemnnosttv/wp-cli,2ndkauboy/wp-cli,shawnhooper/wp-cli,miya0001/wp-cli,duncanjbrown/wp-cli,shawnhooper/wp-cli
cucumber
## Code Before: Feature: Update core's database Scenario: Update db on a single site Given a WP install And I run `wp core download --version=4.1 --force` And I run `wp option update db_version 29630` When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database upgraded successfully from 29630 to 30133 """ When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database already at latest version 30133 """ Scenario: Update db across network Given a WP multisite install And I run `wp site create --slug=foo` And I run `wp site create --slug=bar` And I run `wp site create --slug=burrito --porcelain` And save STDOUT as {BURRITO_ID} And I run `wp site create --slug=taco --porcelain` And save STDOUT as {TACO_ID} And I run `wp site create --slug=pizza --porcelain` And save STDOUT as {PIZZA_ID} And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` When I run `wp core update-db --network` Then STDOUT should contain: """ Success: WordPress database upgraded on 3/3 sites """ ## Instruction: Update tests to accommodate new messages ## Code After: Feature: Update core's database Scenario: Update db on a single site Given a WP install And I run `wp core download --version=4.1 --force` And I run `wp option update db_version 29630` When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database upgraded successfully from db version 29630 to 30133 """ When I run `wp core update-db` Then STDOUT should contain: """ Success: WordPress database already at latest db version 30133 """ Scenario: Update db across network Given a WP multisite install And I run `wp site create --slug=foo` And I run `wp site create --slug=bar` And I run `wp site create --slug=burrito --porcelain` And save STDOUT as {BURRITO_ID} And I run `wp site create --slug=taco --porcelain` And save STDOUT as {TACO_ID} And I run `wp site create --slug=pizza --porcelain` And save STDOUT as {PIZZA_ID} And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` When I run `wp core update-db --network` Then STDOUT should contain: """ Success: WordPress database upgraded on 3/3 sites """
Feature: Update core's database Scenario: Update db on a single site Given a WP install And I run `wp core download --version=4.1 --force` And I run `wp option update db_version 29630` When I run `wp core update-db` Then STDOUT should contain: """ - Success: WordPress database upgraded successfully from 29630 to 30133 + Success: WordPress database upgraded successfully from db version 29630 to 30133 ? +++++++++++ """ When I run `wp core update-db` Then STDOUT should contain: """ - Success: WordPress database already at latest version 30133 + Success: WordPress database already at latest db version 30133 ? +++ """ Scenario: Update db across network Given a WP multisite install And I run `wp site create --slug=foo` And I run `wp site create --slug=bar` And I run `wp site create --slug=burrito --porcelain` And save STDOUT as {BURRITO_ID} And I run `wp site create --slug=taco --porcelain` And save STDOUT as {TACO_ID} And I run `wp site create --slug=pizza --porcelain` And save STDOUT as {PIZZA_ID} And I run `wp site archive {BURRITO_ID}` And I run `wp site spam {TACO_ID}` And I run `wp site delete {PIZZA_ID} --yes` When I run `wp core update-db --network` Then STDOUT should contain: """ Success: WordPress database upgraded on 3/3 sites """
4
0.105263
2
2
442a6caceb932401c12e4dcb2388c57fe6a30349
src/main/java/com/github/pedrovgs/problem39/MultiplyArrayElements.java
src/main/java/com/github/pedrovgs/problem39/MultiplyArrayElements.java
/* * Copyright (C) 2014 Pedro Vicente Gómez Sánchez. * * 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. */ package com.github.pedrovgs.problem39; /** * Given an array of elements, write a method to multiply every value for the rest of elements and * return a new array with this values. Can you resolve this problem without use "/" operator? */ public class MultiplyArrayElements { }
/* * Copyright (C) 2014 Pedro Vicente Gómez Sánchez. * * 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. */ package com.github.pedrovgs.problem39; /** * Given an array of elements, write a method to multiply every value for the rest of elements and * return a new array with this values. Can you resolve this problem without use "/" operator? */ public class MultiplyArrayElements { /** * Iterative solution to solve this problem. The complexity order of this algorithm is O(N) time * and space terms where N is the number of elements in the input array. */ public int[] multiply(int[] input) { if (input == null) { throw new IllegalArgumentException("You can't pass a null array as input."); } if (input.length == 0) { return input; } int[] front = new int[input.length]; int[] rear = new int[input.length]; int[] output = new int[input.length]; front[0] = 1; rear[input.length - 1] = 1; for (int i = 1; i < input.length; i++) { front[i] = front[i - 1] * input[i - 1]; } for (int i = input.length - 2; i >= 0; i--) { rear[i] = rear[i + 1] * input[i + 1]; } for (int i = 0; i < input.length; i++) { output[i] = front[i] * rear[i]; } return output; } }
Add iterative solution to problem 39
Add iterative solution to problem 39
Java
apache-2.0
zhdh2008/Algorithms,chengjinqian/Algorithms,mrgenco/Algorithms-1,Arkar-Aung/Algorithms,zmywly8866/Algorithms,pedrovgs/Algorithms,ajinkyakolhe112/Algorithms,jibaro/Algorithms,AppScientist/Algorithms,Ariloum/Algorithms,007slm/Algorithms,inexistence/Algorithms,sridhar-newsdistill/Algorithms,VeskoI/Algorithms,JeffreyWei/Algorithms,ArlenLiu/Algorithms
java
## Code Before: /* * Copyright (C) 2014 Pedro Vicente Gómez Sánchez. * * 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. */ package com.github.pedrovgs.problem39; /** * Given an array of elements, write a method to multiply every value for the rest of elements and * return a new array with this values. Can you resolve this problem without use "/" operator? */ public class MultiplyArrayElements { } ## Instruction: Add iterative solution to problem 39 ## Code After: /* * Copyright (C) 2014 Pedro Vicente Gómez Sánchez. * * 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. */ package com.github.pedrovgs.problem39; /** * Given an array of elements, write a method to multiply every value for the rest of elements and * return a new array with this values. Can you resolve this problem without use "/" operator? */ public class MultiplyArrayElements { /** * Iterative solution to solve this problem. The complexity order of this algorithm is O(N) time * and space terms where N is the number of elements in the input array. */ public int[] multiply(int[] input) { if (input == null) { throw new IllegalArgumentException("You can't pass a null array as input."); } if (input.length == 0) { return input; } int[] front = new int[input.length]; int[] rear = new int[input.length]; int[] output = new int[input.length]; front[0] = 1; rear[input.length - 1] = 1; for (int i = 1; i < input.length; i++) { front[i] = front[i - 1] * input[i - 1]; } for (int i = input.length - 2; i >= 0; i--) { rear[i] = rear[i + 1] * input[i + 1]; } for (int i = 0; i < input.length; i++) { output[i] = front[i] * rear[i]; } return output; } }
/* * Copyright (C) 2014 Pedro Vicente Gómez Sánchez. * * 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. */ package com.github.pedrovgs.problem39; /** * Given an array of elements, write a method to multiply every value for the rest of elements and * return a new array with this values. Can you resolve this problem without use "/" operator? */ public class MultiplyArrayElements { + + /** + * Iterative solution to solve this problem. The complexity order of this algorithm is O(N) time + * and space terms where N is the number of elements in the input array. + */ + public int[] multiply(int[] input) { + if (input == null) { + throw new IllegalArgumentException("You can't pass a null array as input."); + } + if (input.length == 0) { + return input; + } + + int[] front = new int[input.length]; + int[] rear = new int[input.length]; + int[] output = new int[input.length]; + + front[0] = 1; + rear[input.length - 1] = 1; + for (int i = 1; i < input.length; i++) { + front[i] = front[i - 1] * input[i - 1]; + } + for (int i = input.length - 2; i >= 0; i--) { + rear[i] = rear[i + 1] * input[i + 1]; + } + for (int i = 0; i < input.length; i++) { + output[i] = front[i] * rear[i]; + } + return output; + } }
30
1.304348
30
0
04d6348536a393439c36a7433c4fbf89c52ded32
src/qt/clientmodel.h
src/qt/clientmodel.h
class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: // The only reason that this constructor takes a wallet is because // the global client settings are stored in the main wallet. explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
Remove no longer valid comment
Remove no longer valid comment
C
mit
MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin
c
## Code Before: class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: // The only reason that this constructor takes a wallet is because // the global client settings are stored in the main wallet. explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H ## Instruction: Remove no longer valid comment ## Code After: class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: - // The only reason that this constructor takes a wallet is because - // the global client settings are stored in the main wallet. explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H
2
0.036364
0
2
8f51c39d895c4602a642fbbc7dc52e7dbd19ffe2
app/models/uom.rb
app/models/uom.rb
class Uom # Pre-defined distance metrics that can be used to define linear distances INCH = 'inch' FEET = 'foot' YARD = 'yard' MILE = 'mile' METER = 'meter' KILOMETER = 'kilometer' # Check to see if a measurement unit is valid def self.valid? uom Unitwise.valid? uom end # Convert a quantity from one unit to another def self.convert(quantity, from_uom, to_uom) begin Unitwise(quantity, from_uom).convert_to(to_uom).to_f rescue Exception raise ArgumentError.new('invalid argument') end end end
class Uom # Other units UNIT = 'unit' # Pre-defined weight quantities KILOGRAM = 'kilogram' POUND = "pound" SHORT_TON = 'short_ton' TON = SHORT_TON TONNE = "tonne" # Pre-defined area measurements SQUARE_YARD = "square yard" SQUARE_METER = "square meter" SQUARE_MILE = "square mile" ACRE = "acre" # Predefined volumes LITRE = "litre" GALLON = "gallon" # Pre-defined distance metrics that can be used to define linear distances INCH = 'inch' FEET = 'foot' YARD = 'yard' MILE = 'mile' METER = 'meter' KILOMETER = 'kilometer' AREA_UNITS = [SQUARE_YARD, SQUARE_METER, SQUARE_MILE, ACRE] DISTANCE_UNITS = [INCH, FEET, YARD, MILE, METER, KILOMETER] VOLUME_UNITS = [LITRE, GALLON] WEIGHT_UNITS = [KILOGRAM, POUND, TONNE, SHORT_TON, TON] OTHER_UNITS = [UNIT] # Check to see if a measurement unit is valid def self.valid? uom Unitwise.valid? uom end # Convert a quantity from one unit to another def self.convert(quantity, from_uom, to_uom) begin Unitwise(quantity, from_uom).convert_to(to_uom).to_f rescue Exception raise ArgumentError.new('invalid argument') end end end
Add additional measurement units to Uom to support equipment quantities
Add additional measurement units to Uom to support equipment quantities
Ruby
mit
nycdot/transam_core,camsys/transam_core,nycdot/transam_core,camsys/transam_core,camsys/transam_core,camsys/transam_core,nycdot/transam_core
ruby
## Code Before: class Uom # Pre-defined distance metrics that can be used to define linear distances INCH = 'inch' FEET = 'foot' YARD = 'yard' MILE = 'mile' METER = 'meter' KILOMETER = 'kilometer' # Check to see if a measurement unit is valid def self.valid? uom Unitwise.valid? uom end # Convert a quantity from one unit to another def self.convert(quantity, from_uom, to_uom) begin Unitwise(quantity, from_uom).convert_to(to_uom).to_f rescue Exception raise ArgumentError.new('invalid argument') end end end ## Instruction: Add additional measurement units to Uom to support equipment quantities ## Code After: class Uom # Other units UNIT = 'unit' # Pre-defined weight quantities KILOGRAM = 'kilogram' POUND = "pound" SHORT_TON = 'short_ton' TON = SHORT_TON TONNE = "tonne" # Pre-defined area measurements SQUARE_YARD = "square yard" SQUARE_METER = "square meter" SQUARE_MILE = "square mile" ACRE = "acre" # Predefined volumes LITRE = "litre" GALLON = "gallon" # Pre-defined distance metrics that can be used to define linear distances INCH = 'inch' FEET = 'foot' YARD = 'yard' MILE = 'mile' METER = 'meter' KILOMETER = 'kilometer' AREA_UNITS = [SQUARE_YARD, SQUARE_METER, SQUARE_MILE, ACRE] DISTANCE_UNITS = [INCH, FEET, YARD, MILE, METER, KILOMETER] VOLUME_UNITS = [LITRE, GALLON] WEIGHT_UNITS = [KILOGRAM, POUND, TONNE, SHORT_TON, TON] OTHER_UNITS = [UNIT] # Check to see if a measurement unit is valid def self.valid? uom Unitwise.valid? uom end # Convert a quantity from one unit to another def self.convert(quantity, from_uom, to_uom) begin Unitwise(quantity, from_uom).convert_to(to_uom).to_f rescue Exception raise ArgumentError.new('invalid argument') end end end
class Uom + + # Other units + UNIT = 'unit' + # Pre-defined weight quantities + KILOGRAM = 'kilogram' + POUND = "pound" + SHORT_TON = 'short_ton' + TON = SHORT_TON + TONNE = "tonne" + + # Pre-defined area measurements + SQUARE_YARD = "square yard" + SQUARE_METER = "square meter" + SQUARE_MILE = "square mile" + ACRE = "acre" + + # Predefined volumes + LITRE = "litre" + GALLON = "gallon" + # Pre-defined distance metrics that can be used to define linear distances INCH = 'inch' FEET = 'foot' YARD = 'yard' MILE = 'mile' METER = 'meter' KILOMETER = 'kilometer' - + + AREA_UNITS = [SQUARE_YARD, SQUARE_METER, SQUARE_MILE, ACRE] + DISTANCE_UNITS = [INCH, FEET, YARD, MILE, METER, KILOMETER] + VOLUME_UNITS = [LITRE, GALLON] + WEIGHT_UNITS = [KILOGRAM, POUND, TONNE, SHORT_TON, TON] + OTHER_UNITS = [UNIT] + # Check to see if a measurement unit is valid def self.valid? uom Unitwise.valid? uom end # Convert a quantity from one unit to another def self.convert(quantity, from_uom, to_uom) begin Unitwise(quantity, from_uom).convert_to(to_uom).to_f rescue Exception raise ArgumentError.new('invalid argument') end end end
28
1.12
27
1
8d50052520b5a863bf89778c35db1f73baa9cc23
db/migrations/20170211211305_AddUserIsAdmin.sql
db/migrations/20170211211305_AddUserIsAdmin.sql
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE users ADD COLUMN is_admin boolean; -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE users ADD COLUMN is_admin boolean NOT NULL DEFAULT FALSE; -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back
Fix default sql value for is_admin
fix(user): Fix default sql value for is_admin
SQL
mit
ml-tv/tv-api,ml-tv/tv-api
sql
## Code Before: -- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE users ADD COLUMN is_admin boolean; -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back ## Instruction: fix(user): Fix default sql value for is_admin ## Code After: -- +goose Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE users ADD COLUMN is_admin boolean NOT NULL DEFAULT FALSE; -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied - ALTER TABLE users ADD COLUMN is_admin boolean; + ALTER TABLE users ADD COLUMN is_admin boolean NOT NULL DEFAULT FALSE; ? +++++++++++++++++++++++ -- +goose Down -- SQL section 'Down' is executed when this migration is rolled back
2
0.222222
1
1
fb3c5a15a33da24daa3fa2538bc21604d2659f69
activerecord/test/cases/adapters/sqlite3/explain_test.rb
activerecord/test/cases/adapters/sqlite3/explain_test.rb
require "cases/helper" require "models/author" require "models/post" class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase fixtures :authors def test_explain_for_one_query explain = Author.where(id: 1).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/, explain) end def test_explain_with_eager_loading explain = Author.where(id: 1).includes(:posts).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/, explain) assert_match %r(EXPLAIN for: SELECT "posts"\.\* FROM "posts" WHERE "posts"\."author_id" = (?:\? \[\["author_id", 1\]\]|1)), explain assert_match(/(SCAN )?TABLE posts/, explain) end end
require "cases/helper" require "models/author" require "models/post" class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase fixtures :authors def test_explain_for_one_query explain = Author.where(id: 1).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?(TABLE )?authors USING (INTEGER )?PRIMARY KEY/, explain) end def test_explain_with_eager_loading explain = Author.where(id: 1).includes(:posts).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?(TABLE )?authors USING (INTEGER )?PRIMARY KEY/, explain) assert_match %r(EXPLAIN for: SELECT "posts"\.\* FROM "posts" WHERE "posts"\."author_id" = (?:\? \[\["author_id", 1\]\]|1)), explain assert_match(/(SEARCH |(SCAN )?(TABLE ))posts/, explain) end end
Fix explain test on sqlite 3.36.0
Fix explain test on sqlite 3.36.0 Explain output changed in 3.36.0 https://www.sqlite.org/releaselog/3_36_0.html Co-authored-by: Dinah Shi <f868e84a9b4be0533243aec38e5104eee4d410b8@github.com>
Ruby
mit
esparta/rails,yawboakye/rails,kddeisz/rails,yahonda/rails,yahonda/rails,Erol/rails,Vasfed/rails,esparta/rails,kmcphillips/rails,lcreid/rails,lcreid/rails,Envek/rails,joonyou/rails,georgeclaghorn/rails,MSP-Greg/rails,esparta/rails,Edouard-chin/rails,kddeisz/rails,joonyou/rails,Edouard-chin/rails,Erol/rails,Stellenticket/rails,kmcphillips/rails,Envek/rails,Erol/rails,georgeclaghorn/rails,Edouard-chin/rails,yahonda/rails,BlakeWilliams/rails,joonyou/rails,MSP-Greg/rails,rails/rails,kmcphillips/rails,Edouard-chin/rails,rails/rails,MSP-Greg/rails,yahonda/rails,BlakeWilliams/rails,georgeclaghorn/rails,Stellenticket/rails,Envek/rails,Vasfed/rails,Stellenticket/rails,kddeisz/rails,Vasfed/rails,kmcphillips/rails,yawboakye/rails,MSP-Greg/rails,Erol/rails,BlakeWilliams/rails,rails/rails,Envek/rails,Stellenticket/rails,rails/rails,esparta/rails,yawboakye/rails,Vasfed/rails,lcreid/rails,lcreid/rails,yawboakye/rails,joonyou/rails,BlakeWilliams/rails,georgeclaghorn/rails,kddeisz/rails
ruby
## Code Before: require "cases/helper" require "models/author" require "models/post" class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase fixtures :authors def test_explain_for_one_query explain = Author.where(id: 1).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/, explain) end def test_explain_with_eager_loading explain = Author.where(id: 1).includes(:posts).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/, explain) assert_match %r(EXPLAIN for: SELECT "posts"\.\* FROM "posts" WHERE "posts"\."author_id" = (?:\? \[\["author_id", 1\]\]|1)), explain assert_match(/(SCAN )?TABLE posts/, explain) end end ## Instruction: Fix explain test on sqlite 3.36.0 Explain output changed in 3.36.0 https://www.sqlite.org/releaselog/3_36_0.html Co-authored-by: Dinah Shi <f868e84a9b4be0533243aec38e5104eee4d410b8@github.com> ## Code After: require "cases/helper" require "models/author" require "models/post" class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase fixtures :authors def test_explain_for_one_query explain = Author.where(id: 1).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?(TABLE )?authors USING (INTEGER )?PRIMARY KEY/, explain) end def test_explain_with_eager_loading explain = Author.where(id: 1).includes(:posts).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain assert_match(/(SEARCH )?(TABLE )?authors USING (INTEGER )?PRIMARY KEY/, explain) assert_match %r(EXPLAIN for: SELECT "posts"\.\* FROM "posts" WHERE "posts"\."author_id" = (?:\? \[\["author_id", 1\]\]|1)), explain assert_match(/(SEARCH |(SCAN )?(TABLE ))posts/, explain) end end
require "cases/helper" require "models/author" require "models/post" class SQLite3ExplainTest < ActiveRecord::SQLite3TestCase fixtures :authors def test_explain_for_one_query explain = Author.where(id: 1).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain - assert_match(/(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/, explain) + assert_match(/(SEARCH )?(TABLE )?authors USING (INTEGER )?PRIMARY KEY/, explain) ? + ++ end def test_explain_with_eager_loading explain = Author.where(id: 1).includes(:posts).explain assert_match %r(EXPLAIN for: SELECT "authors"\.\* FROM "authors" WHERE "authors"\."id" = (?:\? \[\["id", 1\]\]|1)), explain - assert_match(/(SEARCH )?TABLE authors USING (INTEGER )?PRIMARY KEY/, explain) + assert_match(/(SEARCH )?(TABLE )?authors USING (INTEGER )?PRIMARY KEY/, explain) ? + ++ assert_match %r(EXPLAIN for: SELECT "posts"\.\* FROM "posts" WHERE "posts"\."author_id" = (?:\? \[\["author_id", 1\]\]|1)), explain - assert_match(/(SCAN )?TABLE posts/, explain) + assert_match(/(SEARCH |(SCAN )?(TABLE ))posts/, explain) ? +++++++++ + ++ end end
6
0.272727
3
3
9f80cdcbc00207f8fab183d34c52ccc1fff152c4
init-package/init-popwin.el
init-package/init-popwin.el
(use-package popwin :init (progn (popwin-mode 1) (push '("*grep*" :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) ;; use popwin with helm (push '("^\*helm.+\*$" :regexp t :position bottom) popwin:special-display-config) (push '("^\*helm-.+\*$" :regexp t :position bottom) popwin:special-display-config)))
(use-package popwin :init (progn (popwin-mode 1) (push '("*grep*" :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) (push '("^\*Flycheck.+\*$" :regexp t :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) (push '("^\*helm.+\*$" :regexp t :position bottom) popwin:special-display-config) (push '("^\*helm-.+\*$" :regexp t :position bottom) popwin:special-display-config)))
Make flycheck error window a popup window
Make flycheck error window a popup window
Emacs Lisp
mit
tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs
emacs-lisp
## Code Before: (use-package popwin :init (progn (popwin-mode 1) (push '("*grep*" :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) ;; use popwin with helm (push '("^\*helm.+\*$" :regexp t :position bottom) popwin:special-display-config) (push '("^\*helm-.+\*$" :regexp t :position bottom) popwin:special-display-config))) ## Instruction: Make flycheck error window a popup window ## Code After: (use-package popwin :init (progn (popwin-mode 1) (push '("*grep*" :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) (push '("^\*Flycheck.+\*$" :regexp t :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) (push '("^\*helm.+\*$" :regexp t :position bottom) popwin:special-display-config) (push '("^\*helm-.+\*$" :regexp t :position bottom) popwin:special-display-config)))
(use-package popwin :init (progn (popwin-mode 1) - (push '("*grep*" :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) + (push '("*grep*" :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) ? ++++++++++++++++++++ - ;; use popwin with helm + (push '("^\*Flycheck.+\*$" :regexp t :dedicated t :position bottom :stick t :noselect t) popwin:special-display-config) - (push '("^\*helm.+\*$" :regexp t :position bottom) popwin:special-display-config) + (push '("^\*helm.+\*$" :regexp t :position bottom) popwin:special-display-config) ? ++++ +++++++++++++ - (push '("^\*helm-.+\*$" :regexp t :position bottom) popwin:special-display-config))) + (push '("^\*helm-.+\*$" :regexp t :position bottom) popwin:special-display-config))) ? +++ +++++++++++++
8
1
4
4
fb5d0925955237fa93a9f65dc419fd37be301c8b
modules/beans/src/main/java/java/beans/PropertyVetoException.java
modules/beans/src/main/java/java/beans/PropertyVetoException.java
/* * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. * * 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. */ /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ package java.beans; /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ public class PropertyVetoException extends Exception { private PropertyChangeEvent event; /** * @com.intel.drl.spec_ref */ public PropertyVetoException(String message, PropertyChangeEvent event) { super(message); this.event = event; } /** * @com.intel.drl.spec_ref */ public PropertyChangeEvent getPropertyChangeEvent() { return event; } }
/* * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. * * 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. */ /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ package java.beans; /** * Indicates that a proposed property change is unacceptable. */ public class PropertyVetoException extends Exception { private static final long serialVersionUID = 129596057694162164L; private final PropertyChangeEvent evt; /** * <p>Constructs an instance with a message and the change event.</p> * @param message A description of the veto. * @param event The event that was vetoed. */ public PropertyVetoException(String message, PropertyChangeEvent event) { super(message); this.evt = event; } /** * <p>Gets the property change event.</p> * @return An instance of {@link PropertyChangeEvent} */ public PropertyChangeEvent getPropertyChangeEvent() { return evt; } }
Adjust serialization artifacts to match RI.
Adjust serialization artifacts to match RI. svn path=/incubator/harmony/enhanced/classlib/trunk/; revision=414445
Java
apache-2.0
freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM
java
## Code Before: /* * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. * * 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. */ /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ package java.beans; /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ public class PropertyVetoException extends Exception { private PropertyChangeEvent event; /** * @com.intel.drl.spec_ref */ public PropertyVetoException(String message, PropertyChangeEvent event) { super(message); this.event = event; } /** * @com.intel.drl.spec_ref */ public PropertyChangeEvent getPropertyChangeEvent() { return event; } } ## Instruction: Adjust serialization artifacts to match RI. svn path=/incubator/harmony/enhanced/classlib/trunk/; revision=414445 ## Code After: /* * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. * * 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. */ /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ package java.beans; /** * Indicates that a proposed property change is unacceptable. */ public class PropertyVetoException extends Exception { private static final long serialVersionUID = 129596057694162164L; private final PropertyChangeEvent evt; /** * <p>Constructs an instance with a message and the change event.</p> * @param message A description of the veto. * @param event The event that was vetoed. */ public PropertyVetoException(String message, PropertyChangeEvent event) { super(message); this.evt = event; } /** * <p>Gets the property change event.</p> * @return An instance of {@link PropertyChangeEvent} */ public PropertyChangeEvent getPropertyChangeEvent() { return evt; } }
/* * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. * * 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. */ /** * @author Maxim V. Berkultsev * @version $Revision: 1.2.6.3 $ */ package java.beans; /** + * Indicates that a proposed property change is unacceptable. - * @author Maxim V. Berkultsev - * @version $Revision: 1.2.6.3 $ */ + public class PropertyVetoException extends Exception { - public class PropertyVetoException extends Exception { - + private static final long serialVersionUID = 129596057694162164L; + - private PropertyChangeEvent event; ? -- + private final PropertyChangeEvent evt; ? ++++++ /** - * @com.intel.drl.spec_ref + * <p>Constructs an instance with a message and the change event.</p> + * @param message A description of the veto. + * @param event The event that was vetoed. */ public PropertyVetoException(String message, PropertyChangeEvent event) { super(message); - this.event = event; ? -- + this.evt = event; } /** - * @com.intel.drl.spec_ref + * <p>Gets the property change event.</p> + * @return An instance of {@link PropertyChangeEvent} */ public PropertyChangeEvent getPropertyChangeEvent() { - return event; ? -- + return evt; } }
21
0.456522
12
9
1e75bfcdece8c87c0b018267a994adffd0bed1eb
app/views/component/search/_box.html.haml
app/views/component/search/_box.html.haml
= form_tag('/organizations', :method => :get, :id=>"search-form") do %section#search-box %div %section#keyword-search-box %label{:for => "keyword"} I need... = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords" - cache ['keywords-list', *cip_keywords] do %datalist#search-keywords - cip_keywords.each do |keyword| %option{:value=>keyword} %button{:type=>'submit',:id=>'find-btn', :title=>"Search"} %span{"data-icon"=>"🔍" , :class=>"search-button ohana-icon"} %span Search
= form_tag('/organizations', :method => :get, :id=>"search-form") do %section#search-box %div %section#keyword-search-box %label{:for => "keyword"} I need... = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords" = hidden_field_tag 'service_area',"smc" = hidden_field_tag 'kind[]',"Human Services" - cache ['keywords-list', *cip_keywords] do %datalist#search-keywords - cip_keywords.each do |keyword| %option{:value=>keyword} %button{:type=>'submit',:id=>'find-btn', :title=>"Search"} %span{"data-icon"=>"🔍" , :class=>"search-button ohana-icon"} %span Search
Set SMC service area and Human Services kind filter as default on first search
Set SMC service area and Human Services kind filter as default on first search Adds hidden fields to homepage search box to set default filters on first search.
Haml
bsd-3-clause
CodeforBirmingham/ohana-web-search,cderenburger/win211-ohana-web-search,noahpatterson/DCOpen211DCConnect,smcgov/SMC-Connect,codeforamerica/ohana-web-search,folklabs/cc-web-search,appropriate/ohana-web-search-la,volkanunsal/nyc-prepared-search,CodeforBirmingham/ohana-web-search,codeforamerica/ohana-web-search,volkanunsal/nyc-prepared-search,appropriate/ohana-web-search-la,marks/dmvpmh-ohana-web-search,volkanunsal/nyc-prepared-search,CodeforBirmingham/ohana-web-search,wesley1001/ohana-web-search,wesley1001/ohana-web-search,noahpatterson/DCOpen211DCConnect,ellpee/ohana-web-search,ellpee/ohana-web-search,marks/dmvpmh-ohana-web-search,appropriate/ohana-web-search,appropriate/ohana-web-search,hackforla/ohana-web-search-la,folklabs/cc-web-search,hackforla/ohana-web-search-la,appropriate/ohana-web-search,hackforla/ohana-web-search-la,ellpee/ohana-web-search,appropriate/ohana-web-search-la,folklabs/cc-web-search,cderenburger/win211-ohana-web-search,ellpee/ohana-web-search,smcgov/SMC-Connect,CodeforBirmingham/ohana-web-search,appropriate/ohana-web-search,marks/dmvpmh-ohana-web-search,marks/dmvpmh-ohana-web-search,cderenburger/win211-ohana-web-search,codeforamerica/ohana-web-search,appropriate/ohana-web-search-la,volkanunsal/nyc-prepared-search,smcgov/SMC-Connect,wesley1001/ohana-web-search,wesley1001/ohana-web-search,folklabs/cc-web-search,codeforamerica/ohana-web-search,smcgov/SMC-Connect,hackforla/ohana-web-search-la,cderenburger/win211-ohana-web-search
haml
## Code Before: = form_tag('/organizations', :method => :get, :id=>"search-form") do %section#search-box %div %section#keyword-search-box %label{:for => "keyword"} I need... = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords" - cache ['keywords-list', *cip_keywords] do %datalist#search-keywords - cip_keywords.each do |keyword| %option{:value=>keyword} %button{:type=>'submit',:id=>'find-btn', :title=>"Search"} %span{"data-icon"=>"🔍" , :class=>"search-button ohana-icon"} %span Search ## Instruction: Set SMC service area and Human Services kind filter as default on first search Adds hidden fields to homepage search box to set default filters on first search. ## Code After: = form_tag('/organizations', :method => :get, :id=>"search-form") do %section#search-box %div %section#keyword-search-box %label{:for => "keyword"} I need... = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords" = hidden_field_tag 'service_area',"smc" = hidden_field_tag 'kind[]',"Human Services" - cache ['keywords-list', *cip_keywords] do %datalist#search-keywords - cip_keywords.each do |keyword| %option{:value=>keyword} %button{:type=>'submit',:id=>'find-btn', :title=>"Search"} %span{"data-icon"=>"🔍" , :class=>"search-button ohana-icon"} %span Search
= form_tag('/organizations', :method => :get, :id=>"search-form") do %section#search-box %div %section#keyword-search-box %label{:for => "keyword"} I need... = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords" + = hidden_field_tag 'service_area',"smc" + = hidden_field_tag 'kind[]',"Human Services" - cache ['keywords-list', *cip_keywords] do %datalist#search-keywords - cip_keywords.each do |keyword| %option{:value=>keyword} %button{:type=>'submit',:id=>'find-btn', :title=>"Search"} %span{"data-icon"=>"🔍" , :class=>"search-button ohana-icon"} %span Search
2
0.133333
2
0
8e4374884cb5df738d9499de778d10497f229b9e
lib/prefs/header.php
lib/prefs/header.php
<?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function prefs_header_list() { return array( 'header_shadow_start' => array( 'name' => tra('Header shadow start'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_shadow_end' => array( 'name' => tra('Header shadow end'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_custom_css' => array( 'name' => tra('Custom CSS'), 'description' => tra('Includes a custom block of CSS inline in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', ), 'header_custom_js' => array( 'name' => tra('Custom JavaScript'), 'description' => tra('Includes a custom block of inline JavaScript in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'hint' => tra('Do not include the <script> and </script> tags.'), ), ); }
<?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function prefs_header_list() { return array( 'header_shadow_start' => array( 'name' => tra('Header shadow start'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_shadow_end' => array( 'name' => tra('Header shadow end'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_custom_css' => array( 'name' => tra('Custom CSS'), 'description' => tra('Includes a custom block of CSS inline in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'filter' => 'none', ), 'header_custom_js' => array( 'name' => tra('Custom JavaScript'), 'description' => tra('Includes a custom block of inline JavaScript in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'hint' => tra('Do not include the <script> and </script> tags.'), 'filter' => 'none', ), ); }
Allow url etc in custom css and js prefs (thanks luci)
[FIX] css: Allow url etc in custom css and js prefs (thanks luci) git-svn-id: 84b83dd0f57d36a02bb8202710824ee41d1b7ca0@41591 b456876b-0849-0410-b77d-98878d47e9d5
PHP
lgpl-2.1
changi67/tiki,changi67/tiki,oregional/tiki,changi67/tiki,oregional/tiki,tikiorg/tiki,oregional/tiki,tikiorg/tiki,tikiorg/tiki,oregional/tiki,tikiorg/tiki,changi67/tiki,changi67/tiki
php
## Code Before: <?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function prefs_header_list() { return array( 'header_shadow_start' => array( 'name' => tra('Header shadow start'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_shadow_end' => array( 'name' => tra('Header shadow end'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_custom_css' => array( 'name' => tra('Custom CSS'), 'description' => tra('Includes a custom block of CSS inline in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', ), 'header_custom_js' => array( 'name' => tra('Custom JavaScript'), 'description' => tra('Includes a custom block of inline JavaScript in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'hint' => tra('Do not include the <script> and </script> tags.'), ), ); } ## Instruction: [FIX] css: Allow url etc in custom css and js prefs (thanks luci) git-svn-id: 84b83dd0f57d36a02bb8202710824ee41d1b7ca0@41591 b456876b-0849-0410-b77d-98878d47e9d5 ## Code After: <?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function prefs_header_list() { return array( 'header_shadow_start' => array( 'name' => tra('Header shadow start'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_shadow_end' => array( 'name' => tra('Header shadow end'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_custom_css' => array( 'name' => tra('Custom CSS'), 'description' => tra('Includes a custom block of CSS inline in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'filter' => 'none', ), 'header_custom_js' => array( 'name' => tra('Custom JavaScript'), 'description' => tra('Includes a custom block of inline JavaScript in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'hint' => tra('Do not include the <script> and </script> tags.'), 'filter' => 'none', ), ); }
<?php // (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ function prefs_header_list() { return array( 'header_shadow_start' => array( 'name' => tra('Header shadow start'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_shadow_end' => array( 'name' => tra('Header shadow end'), 'type' => 'textarea', 'size' => '2', 'default' => '', ), 'header_custom_css' => array( 'name' => tra('Custom CSS'), 'description' => tra('Includes a custom block of CSS inline in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', + 'filter' => 'none', ), 'header_custom_js' => array( 'name' => tra('Custom JavaScript'), 'description' => tra('Includes a custom block of inline JavaScript in all pages.'), 'type' => 'textarea', 'size' => 5, 'default' => '', 'hint' => tra('Do not include the <script> and </script> tags.'), + 'filter' => 'none', ), ); }
2
0.051282
2
0
e34b7c8d9e869ac1be10e8ae3d71cea794044e13
docs/blender-sphinx-build.py
docs/blender-sphinx-build.py
import os import site # get site-packages into sys.path import sys # add local addons folder to sys.path so blender finds it sys.path = ( [os.path.join(os.path.dirname(__file__), '..', 'scripts', 'addons')] + sys.path ) # run sphinx builder # this assumes that the builder is called as # "blender --background --factory-startup --python blender-sphinx-build.py -- ..." # pass the correct arguments by dropping the arguments prior to -- import sphinx argv = ['blender-sphinx-build'] + sys.argv[6:] sphinx.main(argv=argv)
import os import site # get site-packages into sys.path import sys # add local addons folder to sys.path so blender finds it sys.path = ( [os.path.join(os.path.dirname(__file__), '..')] + sys.path ) # run sphinx builder # this assumes that the builder is called as # "blender --background --factory-startup --python blender-sphinx-build.py -- ..." # pass the correct arguments by dropping the arguments prior to -- import sphinx argv = ['blender-sphinx-build'] + sys.argv[6:] sphinx.main(argv=argv)
Correct sys.path when generating docs.
Correct sys.path when generating docs.
Python
bsd-3-clause
nightstrike/blender_nif_plugin,amorilia/blender_nif_plugin,amorilia/blender_nif_plugin,nightstrike/blender_nif_plugin
python
## Code Before: import os import site # get site-packages into sys.path import sys # add local addons folder to sys.path so blender finds it sys.path = ( [os.path.join(os.path.dirname(__file__), '..', 'scripts', 'addons')] + sys.path ) # run sphinx builder # this assumes that the builder is called as # "blender --background --factory-startup --python blender-sphinx-build.py -- ..." # pass the correct arguments by dropping the arguments prior to -- import sphinx argv = ['blender-sphinx-build'] + sys.argv[6:] sphinx.main(argv=argv) ## Instruction: Correct sys.path when generating docs. ## Code After: import os import site # get site-packages into sys.path import sys # add local addons folder to sys.path so blender finds it sys.path = ( [os.path.join(os.path.dirname(__file__), '..')] + sys.path ) # run sphinx builder # this assumes that the builder is called as # "blender --background --factory-startup --python blender-sphinx-build.py -- ..." # pass the correct arguments by dropping the arguments prior to -- import sphinx argv = ['blender-sphinx-build'] + sys.argv[6:] sphinx.main(argv=argv)
import os import site # get site-packages into sys.path import sys # add local addons folder to sys.path so blender finds it sys.path = ( - [os.path.join(os.path.dirname(__file__), '..', 'scripts', 'addons')] ? --------------------- + [os.path.join(os.path.dirname(__file__), '..')] + sys.path ) # run sphinx builder # this assumes that the builder is called as # "blender --background --factory-startup --python blender-sphinx-build.py -- ..." # pass the correct arguments by dropping the arguments prior to -- import sphinx argv = ['blender-sphinx-build'] + sys.argv[6:] sphinx.main(argv=argv)
2
0.117647
1
1
66f35942de5551fba3284c9222669d1057178650
app/scripts/modules/core/pipeline/config/stages/checkPreconditions/checkPreconditionsExecutionDetails.html
app/scripts/modules/core/pipeline/config/stages/checkPreconditions/checkPreconditionsExecutionDetails.html
<div ng-controller="CheckPreconditionsExecutionDetailsCtrl as checkPreconditionsCtrl"> <execution-details-section-nav sections="configSections"></execution-details-section-nav> <div class="step-section-details" ng-if="detailsSection === 'checkPreconditions'"> <div class="row"> <div class="col-md-9"> <dl class="dl-narrow dl-horizontal"> <div ng-repeat="(key, val) in stage.context.context"> <dt>{{key | robotToHuman}}</dt> <dd>{{val}}</dd> </div> <div> <dt>Fail Pipeline</dt> <dd>{{stage.context.failPipeline}}</dd> </div> </dd> </dl> </div> </div> <stage-failure-message is-failed="ctrl.getException(stage)" message="ctrl.getException(stage)"></stage-failure-message> </div> <div class="step-section-details" ng-if="detailsSection === 'taskStatus'"> <div class="row"> <execution-step-details item="stage"></execution-step-details> </div> </div> </div>
<div ng-controller="CheckPreconditionsExecutionDetailsCtrl as checkPreconditionsCtrl"> <execution-details-section-nav sections="configSections"></execution-details-section-nav> <div class="step-section-details" ng-if="detailsSection === 'checkPreconditions'"> <div class="row"> <div class="col-md-12"> <dl class="dl-horizontal"> <div ng-repeat="(key, val) in stage.context.context" ng-if="val !== null"> <dt>{{key | robotToHuman}}</dt> <dd>{{val}}</dd> </div> <div> <dt>Fail Pipeline</dt> <dd>{{stage.context.failPipeline}}</dd> </div> </dd> </dl> </div> </div> <stage-failure-message is-failed="ctrl.getException(stage)" message="ctrl.getException(stage)"></stage-failure-message> </div> <div class="step-section-details" ng-if="detailsSection === 'taskStatus'"> <div class="row"> <execution-step-details item="stage"></execution-step-details> </div> </div> </div>
Tidy up the precondition execution details view a bit
Tidy up the precondition execution details view a bit related to spinnaker/orca#683
HTML
apache-2.0
sgarlick987/deck,ajordens/deck,ajordens/deck,kenzanlabs/deck,duftler/deck,ajordens/deck,duftler/deck,ajordens/deck,icfantv/deck,kenzanlabs/deck,duftler/deck,spinnaker/deck,sgarlick987/deck,kenzanlabs/deck,sgarlick987/deck,duftler/deck,spinnaker/deck,spinnaker/deck,icfantv/deck,icfantv/deck,sgarlick987/deck,spinnaker/deck,icfantv/deck
html
## Code Before: <div ng-controller="CheckPreconditionsExecutionDetailsCtrl as checkPreconditionsCtrl"> <execution-details-section-nav sections="configSections"></execution-details-section-nav> <div class="step-section-details" ng-if="detailsSection === 'checkPreconditions'"> <div class="row"> <div class="col-md-9"> <dl class="dl-narrow dl-horizontal"> <div ng-repeat="(key, val) in stage.context.context"> <dt>{{key | robotToHuman}}</dt> <dd>{{val}}</dd> </div> <div> <dt>Fail Pipeline</dt> <dd>{{stage.context.failPipeline}}</dd> </div> </dd> </dl> </div> </div> <stage-failure-message is-failed="ctrl.getException(stage)" message="ctrl.getException(stage)"></stage-failure-message> </div> <div class="step-section-details" ng-if="detailsSection === 'taskStatus'"> <div class="row"> <execution-step-details item="stage"></execution-step-details> </div> </div> </div> ## Instruction: Tidy up the precondition execution details view a bit related to spinnaker/orca#683 ## Code After: <div ng-controller="CheckPreconditionsExecutionDetailsCtrl as checkPreconditionsCtrl"> <execution-details-section-nav sections="configSections"></execution-details-section-nav> <div class="step-section-details" ng-if="detailsSection === 'checkPreconditions'"> <div class="row"> <div class="col-md-12"> <dl class="dl-horizontal"> <div ng-repeat="(key, val) in stage.context.context" ng-if="val !== null"> <dt>{{key | robotToHuman}}</dt> <dd>{{val}}</dd> </div> <div> <dt>Fail Pipeline</dt> <dd>{{stage.context.failPipeline}}</dd> </div> </dd> </dl> </div> </div> <stage-failure-message is-failed="ctrl.getException(stage)" message="ctrl.getException(stage)"></stage-failure-message> </div> <div class="step-section-details" ng-if="detailsSection === 'taskStatus'"> <div class="row"> <execution-step-details item="stage"></execution-step-details> </div> </div> </div>
<div ng-controller="CheckPreconditionsExecutionDetailsCtrl as checkPreconditionsCtrl"> <execution-details-section-nav sections="configSections"></execution-details-section-nav> <div class="step-section-details" ng-if="detailsSection === 'checkPreconditions'"> <div class="row"> - <div class="col-md-9"> ? ^ + <div class="col-md-12"> ? ^^ - <dl class="dl-narrow dl-horizontal"> ? ---------- + <dl class="dl-horizontal"> - <div ng-repeat="(key, val) in stage.context.context"> + <div ng-repeat="(key, val) in stage.context.context" ng-if="val !== null"> ? +++++++++++++++++++++ <dt>{{key | robotToHuman}}</dt> <dd>{{val}}</dd> </div> <div> <dt>Fail Pipeline</dt> <dd>{{stage.context.failPipeline}}</dd> </div> </dd> </dl> </div> </div> <stage-failure-message is-failed="ctrl.getException(stage)" message="ctrl.getException(stage)"></stage-failure-message> </div> <div class="step-section-details" ng-if="detailsSection === 'taskStatus'"> <div class="row"> <execution-step-details item="stage"></execution-step-details> </div> </div> </div>
6
0.214286
3
3
021146909acb72208ec443d12e6e143e8142e887
articles/quickstart/native/android/_includes/_gradle.md
articles/quickstart/native/android/_includes/_gradle.md
Add the [Auth0 Android](https://github.com/auth0/Auth0.Android) SDK into your project. The library will make requests to the Auth0's Authentication and Management APIs. ### Add Auth0 to Gradle In your app's `build.gradle` dependencies section, add the following: ```groovy apply plugin: 'com.android.application' android { //... } dependencies { //Add the Auth0 Android SDK implementation 'com.auth0.android:auth0:1.+' } ``` ::: note If Android Studio lint the `+` sign, or if you want to use a fixed version, check for the latest in [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22auth0%22%20g%3A%22com.auth0.android%22) or [JCenter](https://bintray.com/auth0/android/auth0). ::: ::: panel Sync Project with Gradle Files Remember to synchronize using the Android Studio prompt or run `./gradlew clean assembleDebug` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). :::
Add the [Auth0 Android](https://github.com/auth0/Auth0.Android) SDK into your project. The library will make requests to the Auth0's Authentication and Management APIs. ### Add Auth0 to Gradle In your app's `build.gradle` dependencies section, add the following: ```groovy apply plugin: 'com.android.application' android { //... } dependencies { //Add the Auth0 Android SDK implementation 'com.auth0.android:auth0:1.+' } ``` ::: note If Android Studio lint the `+` sign, or if you want to use a fixed version, check for the latest in [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22auth0%22%20g%3A%22com.auth0.android%22) or [JCenter](https://bintray.com/auth0/android/auth0). ::: ::: panel Sync Project with Gradle Files Remember to synchronize using the Android Studio prompt or run `./gradlew clean build` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). :::
Fix suggestion misleading into building debug apk
Fix suggestion misleading into building debug apk Co-Authored-By: Luciano Balmaceda <b72a449d99655376efe5ca865db5a85abedaa99e@gmail.com>
Markdown
mit
jeffreylees/docs,yvonnewilson/docs,jeffreylees/docs,auth0/docs,auth0/docs,yvonnewilson/docs,jeffreylees/docs,yvonnewilson/docs,auth0/docs
markdown
## Code Before: Add the [Auth0 Android](https://github.com/auth0/Auth0.Android) SDK into your project. The library will make requests to the Auth0's Authentication and Management APIs. ### Add Auth0 to Gradle In your app's `build.gradle` dependencies section, add the following: ```groovy apply plugin: 'com.android.application' android { //... } dependencies { //Add the Auth0 Android SDK implementation 'com.auth0.android:auth0:1.+' } ``` ::: note If Android Studio lint the `+` sign, or if you want to use a fixed version, check for the latest in [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22auth0%22%20g%3A%22com.auth0.android%22) or [JCenter](https://bintray.com/auth0/android/auth0). ::: ::: panel Sync Project with Gradle Files Remember to synchronize using the Android Studio prompt or run `./gradlew clean assembleDebug` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). ::: ## Instruction: Fix suggestion misleading into building debug apk Co-Authored-By: Luciano Balmaceda <b72a449d99655376efe5ca865db5a85abedaa99e@gmail.com> ## Code After: Add the [Auth0 Android](https://github.com/auth0/Auth0.Android) SDK into your project. The library will make requests to the Auth0's Authentication and Management APIs. ### Add Auth0 to Gradle In your app's `build.gradle` dependencies section, add the following: ```groovy apply plugin: 'com.android.application' android { //... } dependencies { //Add the Auth0 Android SDK implementation 'com.auth0.android:auth0:1.+' } ``` ::: note If Android Studio lint the `+` sign, or if you want to use a fixed version, check for the latest in [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22auth0%22%20g%3A%22com.auth0.android%22) or [JCenter](https://bintray.com/auth0/android/auth0). ::: ::: panel Sync Project with Gradle Files Remember to synchronize using the Android Studio prompt or run `./gradlew clean build` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). :::
Add the [Auth0 Android](https://github.com/auth0/Auth0.Android) SDK into your project. The library will make requests to the Auth0's Authentication and Management APIs. ### Add Auth0 to Gradle In your app's `build.gradle` dependencies section, add the following: ```groovy apply plugin: 'com.android.application' android { //... } dependencies { //Add the Auth0 Android SDK implementation 'com.auth0.android:auth0:1.+' } ``` ::: note If Android Studio lint the `+` sign, or if you want to use a fixed version, check for the latest in [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22auth0%22%20g%3A%22com.auth0.android%22) or [JCenter](https://bintray.com/auth0/android/auth0). ::: ::: panel Sync Project with Gradle Files - Remember to synchronize using the Android Studio prompt or run `./gradlew clean assembleDebug` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). ? ^^^^^^^^^^^^^ + Remember to synchronize using the Android Studio prompt or run `./gradlew clean build` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). ? ^^^^^ :::
2
0.08
1
1
97b770f8f671afffad91f1659657738aacaaf1cd
tests/openpsi/CMakeLists.txt
tests/openpsi/CMakeLists.txt
LINK_LIBRARIES( ${ATOMSPACE_LIBRARIES} ${COGUTIL_LIBRARY} openpsi ) ADD_CXXTEST(OpenPsiUTest) ADD_CXXTEST(OpenPsiImplicatorUTest) ADD_CXXTEST(OpenPsiRulesUTest) #ADD_CXXTEST(OpenPsiExampleTest)
LINK_LIBRARIES( ${ATOMSPACE_LIBRARIES} ${COGUTIL_LIBRARY} openpsi ) # The tests are ordered in the order they are run during make test. ADD_CXXTEST(OpenPsiRulesUTest) ADD_CXXTEST(OpenPsiImplicatorUTest) ADD_CXXTEST(OpenPsiUTest) #ADD_CXXTEST(OpenPsiExampleTest)
Reorder the run of openpsi tests
Reorder the run of openpsi tests
Text
agpl-3.0
misgeatgit/opencog,misgeatgit/opencog,andre-senna/opencog,misgeatgit/opencog,AmeBel/opencog,andre-senna/opencog,misgeatgit/opencog,misgeatgit/opencog,andre-senna/opencog,andre-senna/opencog,andre-senna/opencog,misgeatgit/opencog,AmeBel/opencog,andre-senna/opencog,AmeBel/opencog,misgeatgit/opencog,misgeatgit/opencog,AmeBel/opencog,andre-senna/opencog,AmeBel/opencog,misgeatgit/opencog,AmeBel/opencog,AmeBel/opencog
text
## Code Before: LINK_LIBRARIES( ${ATOMSPACE_LIBRARIES} ${COGUTIL_LIBRARY} openpsi ) ADD_CXXTEST(OpenPsiUTest) ADD_CXXTEST(OpenPsiImplicatorUTest) ADD_CXXTEST(OpenPsiRulesUTest) #ADD_CXXTEST(OpenPsiExampleTest) ## Instruction: Reorder the run of openpsi tests ## Code After: LINK_LIBRARIES( ${ATOMSPACE_LIBRARIES} ${COGUTIL_LIBRARY} openpsi ) # The tests are ordered in the order they are run during make test. ADD_CXXTEST(OpenPsiRulesUTest) ADD_CXXTEST(OpenPsiImplicatorUTest) ADD_CXXTEST(OpenPsiUTest) #ADD_CXXTEST(OpenPsiExampleTest)
LINK_LIBRARIES( ${ATOMSPACE_LIBRARIES} ${COGUTIL_LIBRARY} openpsi ) + # The tests are ordered in the order they are run during make test. + ADD_CXXTEST(OpenPsiRulesUTest) + ADD_CXXTEST(OpenPsiImplicatorUTest) ADD_CXXTEST(OpenPsiUTest) - ADD_CXXTEST(OpenPsiImplicatorUTest) - ADD_CXXTEST(OpenPsiRulesUTest) #ADD_CXXTEST(OpenPsiExampleTest)
5
0.5
3
2
12fb043e39695727114f7d24e5e3b2911a79c7a4
Cerberus.h
Cerberus.h
using namespace std; using namespace ceres; class Cerberus { public: Cerberus(); Solver::Options options; LossFunction *loss; Problem problem; Solver::Summary summary; void solve(); }; #endif
using namespace std; using namespace ceres; class Cerberus { public: Cerberus(); Solver::Options options; LossFunction *loss; Problem problem; Solver::Summary summary; void solve(); }; // Rt is a 4x3 transformation matrix of the form [R|t]. result is a // 6-dimensional vector with first three terms representing axis, magnitude // angle, and the last three terms represent translation template <typename T> void TransformationMatrixToAngleAxisAndTranslation(T *Rt, T *result) { RotationMatrixToAngleAxis<T>(MatrixAdapter<const T, 4, 1>(Rt), result); result[3] = Rt[3]; result[4] = Rt[7]; result[5] = Rt[11]; } // At is a 6-dimensional vector with first three terms representing axis, // magnitude angle, and the last three terms represent translation. Rt is a // 4x3 transformation matrix of the form [R|t]. template <typename T> void AngleAxisAndTranslationToTransformationMatrix(const T *At, T *result) { AngleAxisToRotationMatrix<T>(At, MatrixAdapter<T, 4, 1>(result)); result[3] = At[3]; result[7] = At[4]; result[11] = At[5]; } #endif
Add utility functions for converting to and from AngleAxis
Add utility functions for converting to and from AngleAxis
C
mit
danielsuo/Cerberus,danielsuo/Cerberus
c
## Code Before: using namespace std; using namespace ceres; class Cerberus { public: Cerberus(); Solver::Options options; LossFunction *loss; Problem problem; Solver::Summary summary; void solve(); }; #endif ## Instruction: Add utility functions for converting to and from AngleAxis ## Code After: using namespace std; using namespace ceres; class Cerberus { public: Cerberus(); Solver::Options options; LossFunction *loss; Problem problem; Solver::Summary summary; void solve(); }; // Rt is a 4x3 transformation matrix of the form [R|t]. result is a // 6-dimensional vector with first three terms representing axis, magnitude // angle, and the last three terms represent translation template <typename T> void TransformationMatrixToAngleAxisAndTranslation(T *Rt, T *result) { RotationMatrixToAngleAxis<T>(MatrixAdapter<const T, 4, 1>(Rt), result); result[3] = Rt[3]; result[4] = Rt[7]; result[5] = Rt[11]; } // At is a 6-dimensional vector with first three terms representing axis, // magnitude angle, and the last three terms represent translation. Rt is a // 4x3 transformation matrix of the form [R|t]. template <typename T> void AngleAxisAndTranslationToTransformationMatrix(const T *At, T *result) { AngleAxisToRotationMatrix<T>(At, MatrixAdapter<T, 4, 1>(result)); result[3] = At[3]; result[7] = At[4]; result[11] = At[5]; } #endif
using namespace std; using namespace ceres; class Cerberus { public: Cerberus(); Solver::Options options; LossFunction *loss; Problem problem; Solver::Summary summary; void solve(); - }; + // Rt is a 4x3 transformation matrix of the form [R|t]. result is a + // 6-dimensional vector with first three terms representing axis, magnitude + // angle, and the last three terms represent translation + template <typename T> void TransformationMatrixToAngleAxisAndTranslation(T *Rt, T *result) { + RotationMatrixToAngleAxis<T>(MatrixAdapter<const T, 4, 1>(Rt), result); + result[3] = Rt[3]; + result[4] = Rt[7]; + result[5] = Rt[11]; + } + + // At is a 6-dimensional vector with first three terms representing axis, + // magnitude angle, and the last three terms represent translation. Rt is a + // 4x3 transformation matrix of the form [R|t]. + template <typename T> void AngleAxisAndTranslationToTransformationMatrix(const T *At, T *result) { + AngleAxisToRotationMatrix<T>(At, MatrixAdapter<T, 4, 1>(result)); + result[3] = At[3]; + result[7] = At[4]; + result[11] = At[5]; + } + #endif
21
1.166667
20
1
3597c56abaa1eec9499db559699d7ea9fdd1dacd
devops/jobs/JenkinsHeartbeat.groovy
devops/jobs/JenkinsHeartbeat.groovy
/* Job to check if Jenkins is successfully running */ package devops.jobs import javaposse.jobdsl.dsl.DslFactory class JenkinsHeartbeat{ public static job( DslFactory dslFactory, Map extraVars){ dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") { description("Job to check in with Dead Man's Snitch to make sure that Jenkins is still running.") triggers { cron("H/5 * * * *") } steps { shell('curl https://nosnch.in/35fcaf3a31') } } } }
/* Job to check if Jenkins is successfully running */ package devops.jobs import javaposse.jobdsl.dsl.DslFactory import static org.edx.jenkins.dsl.Constants.common_logrotator import static org.edx.jenkins.dsl.Constants.common_wrappers class JenkinsHeartbeat{ public static job( DslFactory dslFactory, Map extraVars){ dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") { description("Job to check in with Dead Man's Snitch to make sure that Jenkins is still running.") logRotator common_logrotator wrappers common_wrappers triggers { cron("H/5 * * * *") } steps { shell('curl https://nosnch.in/35fcaf3a31') } } } }
Add logging and common wrappers to heratbeat.
Add logging and common wrappers to heratbeat.
Groovy
agpl-3.0
edx/jenkins-job-dsl
groovy
## Code Before: /* Job to check if Jenkins is successfully running */ package devops.jobs import javaposse.jobdsl.dsl.DslFactory class JenkinsHeartbeat{ public static job( DslFactory dslFactory, Map extraVars){ dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") { description("Job to check in with Dead Man's Snitch to make sure that Jenkins is still running.") triggers { cron("H/5 * * * *") } steps { shell('curl https://nosnch.in/35fcaf3a31') } } } } ## Instruction: Add logging and common wrappers to heratbeat. ## Code After: /* Job to check if Jenkins is successfully running */ package devops.jobs import javaposse.jobdsl.dsl.DslFactory import static org.edx.jenkins.dsl.Constants.common_logrotator import static org.edx.jenkins.dsl.Constants.common_wrappers class JenkinsHeartbeat{ public static job( DslFactory dslFactory, Map extraVars){ dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") { description("Job to check in with Dead Man's Snitch to make sure that Jenkins is still running.") logRotator common_logrotator wrappers common_wrappers triggers { cron("H/5 * * * *") } steps { shell('curl https://nosnch.in/35fcaf3a31') } } } }
/* Job to check if Jenkins is successfully running */ package devops.jobs import javaposse.jobdsl.dsl.DslFactory + import static org.edx.jenkins.dsl.Constants.common_logrotator + import static org.edx.jenkins.dsl.Constants.common_wrappers class JenkinsHeartbeat{ public static job( DslFactory dslFactory, Map extraVars){ dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") { description("Job to check in with Dead Man's Snitch to make sure that Jenkins is still running.") + + logRotator common_logrotator + wrappers common_wrappers + triggers { cron("H/5 * * * *") } steps { shell('curl https://nosnch.in/35fcaf3a31') } } } }
6
0.285714
6
0
579b52b887e2e42a40c584fa1412c01fb86ef501
etc/protractorConf.js
etc/protractorConf.js
var exec = require("sync-exec"); exports.config = { suites: { core: "../src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/*Spec.js", mercator: "../src/mercator/tests/acceptance/*Spec.js" }, baseUrl: "http://localhost:9090", directConnect: true, capabilities: { "browserName": "chrome" }, beforeLaunch: function() { exec("bin/supervisord"); exec("bin/supervisorctl restart adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); }, afterLaunch: function() { exec("bin/supervisorctl stop adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); exec("rm -rf var/test_zeodata/Data.fs* var/test_zeodata/blobs"); }, jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, isVerbose: true, includeStackTrace: true } }
var exec = require("sync-exec"); exports.config = { suites: { core: "../src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/*Spec.js", mercator: "../src/mercator/tests/acceptance/*Spec.js" }, baseUrl: "http://localhost:9090", getPageTimeout: 30000, directConnect: true, capabilities: { "browserName": "chrome" }, beforeLaunch: function() { exec("bin/supervisord"); exec("bin/supervisorctl restart adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); }, afterLaunch: function() { exec("bin/supervisorctl stop adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); exec("rm -rf var/test_zeodata/Data.fs* var/test_zeodata/blobs"); }, jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, isVerbose: true, includeStackTrace: true } }
Set protractor page timeout to 30s
Set protractor page timeout to 30s
JavaScript
agpl-3.0
xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator
javascript
## Code Before: var exec = require("sync-exec"); exports.config = { suites: { core: "../src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/*Spec.js", mercator: "../src/mercator/tests/acceptance/*Spec.js" }, baseUrl: "http://localhost:9090", directConnect: true, capabilities: { "browserName": "chrome" }, beforeLaunch: function() { exec("bin/supervisord"); exec("bin/supervisorctl restart adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); }, afterLaunch: function() { exec("bin/supervisorctl stop adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); exec("rm -rf var/test_zeodata/Data.fs* var/test_zeodata/blobs"); }, jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, isVerbose: true, includeStackTrace: true } } ## Instruction: Set protractor page timeout to 30s ## Code After: var exec = require("sync-exec"); exports.config = { suites: { core: "../src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/*Spec.js", mercator: "../src/mercator/tests/acceptance/*Spec.js" }, baseUrl: "http://localhost:9090", getPageTimeout: 30000, directConnect: true, capabilities: { "browserName": "chrome" }, beforeLaunch: function() { exec("bin/supervisord"); exec("bin/supervisorctl restart adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); }, afterLaunch: function() { exec("bin/supervisorctl stop adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); exec("rm -rf var/test_zeodata/Data.fs* var/test_zeodata/blobs"); }, jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, isVerbose: true, includeStackTrace: true } }
var exec = require("sync-exec"); exports.config = { suites: { core: "../src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/*Spec.js", mercator: "../src/mercator/tests/acceptance/*Spec.js" }, baseUrl: "http://localhost:9090", + getPageTimeout: 30000, directConnect: true, capabilities: { "browserName": "chrome" }, beforeLaunch: function() { exec("bin/supervisord"); exec("bin/supervisorctl restart adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); }, afterLaunch: function() { exec("bin/supervisorctl stop adhocracy_test:test_zeo test_backend_with_ws adhocracy_test:test_autobahn adhocracy_test:test_frontend"); exec("rm -rf var/test_zeodata/Data.fs* var/test_zeodata/blobs"); }, jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, isVerbose: true, includeStackTrace: true } }
1
0.037037
1
0
7e32d4f5157b34e757d33ef2d35600289af08750
dummy/spec/helpers/application_helper_spec.rb
dummy/spec/helpers/application_helper_spec.rb
require 'spec_helper' module ApplicationHelper def resource @resource ||= FactoryGirl.create(:vacancy) end end describe ApplicationHelper do describe '#general_attribute?' do it 'principally works' do general_attribute?(:state).should == true general_attribute?(:limit).should == false end end describe '#attribute_translation' do it 'principally works' do attribute_translation(:state).should == 'State' attribute_translation(:limit).should == 'Limit' end end end
require 'spec_helper' module ApplicationHelper def resource @resource ||= FactoryGirl.create(:vacancy) end end describe ApplicationHelper do describe '#general_attribute?' do it 'principally works' do helper.general_attribute?(:state).should == true helper.general_attribute?(:limit).should == false end end describe '#attribute_translation' do it 'principally works' do helper.attribute_translation(:state).should == 'State' helper.attribute_translation(:limit).should == 'Limit' end end end
Call helper methods on helper instance.
Call helper methods on helper instance.
Ruby
mit
volontariat/voluntary,jasnow/voluntary,volontariat/voluntary,jasnow/voluntary,jasnow/voluntary,volontariat/voluntary,jasnow/voluntary,volontariat/voluntary
ruby
## Code Before: require 'spec_helper' module ApplicationHelper def resource @resource ||= FactoryGirl.create(:vacancy) end end describe ApplicationHelper do describe '#general_attribute?' do it 'principally works' do general_attribute?(:state).should == true general_attribute?(:limit).should == false end end describe '#attribute_translation' do it 'principally works' do attribute_translation(:state).should == 'State' attribute_translation(:limit).should == 'Limit' end end end ## Instruction: Call helper methods on helper instance. ## Code After: require 'spec_helper' module ApplicationHelper def resource @resource ||= FactoryGirl.create(:vacancy) end end describe ApplicationHelper do describe '#general_attribute?' do it 'principally works' do helper.general_attribute?(:state).should == true helper.general_attribute?(:limit).should == false end end describe '#attribute_translation' do it 'principally works' do helper.attribute_translation(:state).should == 'State' helper.attribute_translation(:limit).should == 'Limit' end end end
require 'spec_helper' module ApplicationHelper def resource @resource ||= FactoryGirl.create(:vacancy) end end describe ApplicationHelper do describe '#general_attribute?' do it 'principally works' do - general_attribute?(:state).should == true + helper.general_attribute?(:state).should == true ? +++++++ - general_attribute?(:limit).should == false + helper.general_attribute?(:limit).should == false ? +++++++ end end describe '#attribute_translation' do it 'principally works' do - attribute_translation(:state).should == 'State' + helper.attribute_translation(:state).should == 'State' ? +++++++ - attribute_translation(:limit).should == 'Limit' + helper.attribute_translation(:limit).should == 'Limit' ? +++++++ end end end
8
0.347826
4
4
f6cc8670882503b77f44f30dbd5bb4379df09d2b
app/javascript/app/pages/ndcs/ndcs-component.jsx
app/javascript/app/pages/ndcs/ndcs-component.jsx
import React from 'react'; import { renderRoutes } from 'react-router-config'; import Proptypes from 'prop-types'; import Header from 'components/header'; import Intro from 'components/intro'; import AutocompleteSearch from 'components/autocomplete-search'; import AnchorNav from 'components/anchor-nav'; import anchorNavRegularTheme from 'styles/themes/anchor-nav/anchor-nav-regular.scss'; import { NDC_CONTENT } from 'data/SEO'; import { MetaDescription, SocialMetadata } from 'components/seo'; import layout from 'styles/layout.scss'; import styles from './ndcs-styles.scss'; const NDC = ({ anchorLinks, query, route }) => ( <div> <MetaDescription descriptionContext={NDC_CONTENT} subtitle="NDC CONTENT" /> <SocialMetadata descriptionContext={NDC_CONTENT} href={location.href} /> <Header size="medium" route={route}> <div className={layout.content}> <div className={styles.cols}> <Intro title="NDC Content" /> <AutocompleteSearch /> </div> <AnchorNav useRoutes links={anchorLinks} query={query} theme={anchorNavRegularTheme} /> </div> </Header> <div className={styles.wrapper}> <div className={layout.content}>{renderRoutes(route.routes)}</div> </div> </div> ); NDC.propTypes = { query: Proptypes.string, route: Proptypes.object.isRequired, anchorLinks: Proptypes.array.isRequired }; export default NDC;
import React from 'react'; import { renderRoutes } from 'react-router-config'; import Proptypes from 'prop-types'; import cx from 'classnames'; import Header from 'components/header'; import Intro from 'components/intro'; import AutocompleteSearch from 'components/autocomplete-search'; import AnchorNav from 'components/anchor-nav'; import anchorNavRegularTheme from 'styles/themes/anchor-nav/anchor-nav-regular.scss'; import { NDC_CONTENT } from 'data/SEO'; import { MetaDescription, SocialMetadata } from 'components/seo'; import layout from 'styles/layout.scss'; import styles from './ndcs-styles.scss'; const NDC = ({ anchorLinks, query, route }) => ( <div> <MetaDescription descriptionContext={NDC_CONTENT} subtitle="NDC CONTENT" /> <SocialMetadata descriptionContext={NDC_CONTENT} href={location.href} /> <Header size="medium" route={route}> <div className={cx(styles.cols, layout.content)}> <Intro title="NDC Content" /> <AutocompleteSearch /> </div> <AnchorNav useRoutes links={anchorLinks} query={query} theme={anchorNavRegularTheme} /> </Header> <div className={styles.wrapper}> <div className={layout.content}>{renderRoutes(route.routes)}</div> </div> </div> ); NDC.propTypes = { query: Proptypes.string, route: Proptypes.object.isRequired, anchorLinks: Proptypes.array.isRequired }; export default NDC;
Restructure ndcs component to adjust to new styles
Restructure ndcs component to adjust to new styles
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
jsx
## Code Before: import React from 'react'; import { renderRoutes } from 'react-router-config'; import Proptypes from 'prop-types'; import Header from 'components/header'; import Intro from 'components/intro'; import AutocompleteSearch from 'components/autocomplete-search'; import AnchorNav from 'components/anchor-nav'; import anchorNavRegularTheme from 'styles/themes/anchor-nav/anchor-nav-regular.scss'; import { NDC_CONTENT } from 'data/SEO'; import { MetaDescription, SocialMetadata } from 'components/seo'; import layout from 'styles/layout.scss'; import styles from './ndcs-styles.scss'; const NDC = ({ anchorLinks, query, route }) => ( <div> <MetaDescription descriptionContext={NDC_CONTENT} subtitle="NDC CONTENT" /> <SocialMetadata descriptionContext={NDC_CONTENT} href={location.href} /> <Header size="medium" route={route}> <div className={layout.content}> <div className={styles.cols}> <Intro title="NDC Content" /> <AutocompleteSearch /> </div> <AnchorNav useRoutes links={anchorLinks} query={query} theme={anchorNavRegularTheme} /> </div> </Header> <div className={styles.wrapper}> <div className={layout.content}>{renderRoutes(route.routes)}</div> </div> </div> ); NDC.propTypes = { query: Proptypes.string, route: Proptypes.object.isRequired, anchorLinks: Proptypes.array.isRequired }; export default NDC; ## Instruction: Restructure ndcs component to adjust to new styles ## Code After: import React from 'react'; import { renderRoutes } from 'react-router-config'; import Proptypes from 'prop-types'; import cx from 'classnames'; import Header from 'components/header'; import Intro from 'components/intro'; import AutocompleteSearch from 'components/autocomplete-search'; import AnchorNav from 'components/anchor-nav'; import anchorNavRegularTheme from 'styles/themes/anchor-nav/anchor-nav-regular.scss'; import { NDC_CONTENT } from 'data/SEO'; import { MetaDescription, SocialMetadata } from 'components/seo'; import layout from 'styles/layout.scss'; import styles from './ndcs-styles.scss'; const NDC = ({ anchorLinks, query, route }) => ( <div> <MetaDescription descriptionContext={NDC_CONTENT} subtitle="NDC CONTENT" /> <SocialMetadata descriptionContext={NDC_CONTENT} href={location.href} /> <Header size="medium" route={route}> <div className={cx(styles.cols, layout.content)}> <Intro title="NDC Content" /> <AutocompleteSearch /> </div> <AnchorNav useRoutes links={anchorLinks} query={query} theme={anchorNavRegularTheme} /> </Header> <div className={styles.wrapper}> <div className={layout.content}>{renderRoutes(route.routes)}</div> </div> </div> ); NDC.propTypes = { query: Proptypes.string, route: Proptypes.object.isRequired, anchorLinks: Proptypes.array.isRequired }; export default NDC;
import React from 'react'; import { renderRoutes } from 'react-router-config'; import Proptypes from 'prop-types'; + import cx from 'classnames'; import Header from 'components/header'; import Intro from 'components/intro'; import AutocompleteSearch from 'components/autocomplete-search'; import AnchorNav from 'components/anchor-nav'; import anchorNavRegularTheme from 'styles/themes/anchor-nav/anchor-nav-regular.scss'; import { NDC_CONTENT } from 'data/SEO'; import { MetaDescription, SocialMetadata } from 'components/seo'; import layout from 'styles/layout.scss'; import styles from './ndcs-styles.scss'; const NDC = ({ anchorLinks, query, route }) => ( <div> <MetaDescription descriptionContext={NDC_CONTENT} subtitle="NDC CONTENT" /> <SocialMetadata descriptionContext={NDC_CONTENT} href={location.href} /> <Header size="medium" route={route}> - <div className={layout.content}> + <div className={cx(styles.cols, layout.content)}> ? ++++++++++++++++ + - <div className={styles.cols}> - <Intro title="NDC Content" /> ? -- + <Intro title="NDC Content" /> - <AutocompleteSearch /> ? -- + <AutocompleteSearch /> - </div> - <AnchorNav - useRoutes - links={anchorLinks} - query={query} - theme={anchorNavRegularTheme} - /> </div> + <AnchorNav + useRoutes + links={anchorLinks} + query={query} + theme={anchorNavRegularTheme} + /> </Header> <div className={styles.wrapper}> <div className={layout.content}>{renderRoutes(route.routes)}</div> </div> </div> ); NDC.propTypes = { query: Proptypes.string, route: Proptypes.object.isRequired, anchorLinks: Proptypes.array.isRequired }; export default NDC;
21
0.466667
10
11
d54c3b37bc59152edf2402efc45d6dd1f9cc794b
variables.tf
variables.tf
variable "aws_access_key" {} variable "aws_secret_key" {} variable "aws_key_path" {} variable "aws_key_name" {} variable "aws_jumpbox_ami" {} variable "aws_bosh_lite_ami" {} variable "prefix" {} variable "bosh_lite_stemcell" {} variable "aws_region" { default = "us-east-1" } # Variables for Jumpbox variable "aws_jumpbox_instance_type" { default = "m4.large" } variable "jumpbox_name" { default = "jumpbox" } variable "jumpbox_security_group" { default = "allow-ssh" } # Variables for BOSH Lite variable "aws_bosh_lite_instance_type" { default = "m3.xlarge" } variable "bosh_lite_box_name" { default = "bosh-lite" } variable "bosh_lite_security_group" { default = "allow-ssh-bosh-lite-cf" }
variable "aws_access_key" {} variable "aws_secret_key" {} variable "aws_key_path" {} variable "aws_key_name" {} variable "aws_jumpbox_ami" {} variable "aws_bosh_lite_ami" {} variable "prefix" {} variable "bosh_lite_stemcell" {} variable "aws_region" { default = "us-east-1" } variable "prefix" { default = "my" } # Variables for Jumpbox variable "aws_jumpbox_instance_type" { default = "m4.large" } variable "jumpbox_name" { default = "jumpbox" } variable "jumpbox_security_group" { default = "allow-ssh" } # Variables for BOSH Lite variable "aws_bosh_lite_instance_type" { default = "m3.xlarge" } variable "bosh_lite_box_name" { default = "bosh-lite" } variable "bosh_lite_security_group" { default = "allow-ssh-bosh-lite-cf" }
Add default "my" for prefix
Add default "my" for prefix
HCL
apache-2.0
eljuanchosf/terraform-aws-bosh-lite-cf-bootstrap
hcl
## Code Before: variable "aws_access_key" {} variable "aws_secret_key" {} variable "aws_key_path" {} variable "aws_key_name" {} variable "aws_jumpbox_ami" {} variable "aws_bosh_lite_ami" {} variable "prefix" {} variable "bosh_lite_stemcell" {} variable "aws_region" { default = "us-east-1" } # Variables for Jumpbox variable "aws_jumpbox_instance_type" { default = "m4.large" } variable "jumpbox_name" { default = "jumpbox" } variable "jumpbox_security_group" { default = "allow-ssh" } # Variables for BOSH Lite variable "aws_bosh_lite_instance_type" { default = "m3.xlarge" } variable "bosh_lite_box_name" { default = "bosh-lite" } variable "bosh_lite_security_group" { default = "allow-ssh-bosh-lite-cf" } ## Instruction: Add default "my" for prefix ## Code After: variable "aws_access_key" {} variable "aws_secret_key" {} variable "aws_key_path" {} variable "aws_key_name" {} variable "aws_jumpbox_ami" {} variable "aws_bosh_lite_ami" {} variable "prefix" {} variable "bosh_lite_stemcell" {} variable "aws_region" { default = "us-east-1" } variable "prefix" { default = "my" } # Variables for Jumpbox variable "aws_jumpbox_instance_type" { default = "m4.large" } variable "jumpbox_name" { default = "jumpbox" } variable "jumpbox_security_group" { default = "allow-ssh" } # Variables for BOSH Lite variable "aws_bosh_lite_instance_type" { default = "m3.xlarge" } variable "bosh_lite_box_name" { default = "bosh-lite" } variable "bosh_lite_security_group" { default = "allow-ssh-bosh-lite-cf" }
variable "aws_access_key" {} variable "aws_secret_key" {} variable "aws_key_path" {} variable "aws_key_name" {} variable "aws_jumpbox_ami" {} variable "aws_bosh_lite_ami" {} variable "prefix" {} variable "bosh_lite_stemcell" {} variable "aws_region" { default = "us-east-1" } + variable "prefix" { + default = "my" + } + # Variables for Jumpbox - variable "aws_jumpbox_instance_type" { default = "m4.large" } variable "jumpbox_name" { default = "jumpbox" } variable "jumpbox_security_group" { default = "allow-ssh" } # Variables for BOSH Lite variable "aws_bosh_lite_instance_type" { default = "m3.xlarge" } variable "bosh_lite_box_name" { default = "bosh-lite" } variable "bosh_lite_security_group" { default = "allow-ssh-bosh-lite-cf" }
5
0.125
4
1
2fc3131b674879ef784af7ec4e2680ad981bd0f1
app/controllers/api/v1/versions_controller.rb
app/controllers/api/v1/versions_controller.rb
class Api::V1::VersionsController < Api::BaseController respond_to :json, :xml, :yaml before_filter :find_rubygem def show if @rubygem.public_versions.count.nonzero? if stale?(@rubygem) respond_with(@rubygem.public_versions, :yamlish => true) end else render :text => "This rubygem could not be found.", :status => 404 end end def reverse_dependencies respond_with(Version.reverse_dependencies(params[:id]), :yamlish => true) end end
class Api::V1::VersionsController < Api::BaseController respond_to :json, :xml, :yaml before_filter :find_rubygem def show if @rubygem.public_versions.count.nonzero? if stale?(@rubygem) respond_with(@rubygem.public_versions, :yamlish => true) end else render :text => "This rubygem could not be found.", :status => 404 end end def reverse_dependencies versions = Version.reverse_dependencies(params[:id]) respond_to do |format| format.json { render :json => versions.map { |v| v.as_json.merge("full_name" => v.full_name) } } format.xml { render :xml => versions.map { |v| v.payload.merge("full_name" => v.full_name) } } format.yaml { render :text => versions.map { |v| v.payload.merge("full_name" => v.full_name) }.to_yaml } end end end
Add full_name field to the reverse_dependencies payload
Add full_name field to the reverse_dependencies payload
Ruby
mit
maclover7/rubygems.org,fotanus/rubygems.org,krainboltgreene/rubygems.org,wallin/rubygems.org,arthurnn/rubygems.org,hrs113355/rubygems.org,iSC-Labs/rubygems.org,olivierlacan/rubygems.org,Elffers/rubygems.org,krainboltgreene/rubygems.org,spk/rubygems.org,rubygems/rubygems.org,jamelablack/rubygems.org,davydovanton/rubygems.org,Exeia/rubygems.org,algolia/rubygems.org,childbamboo/rubygems.org,fotanus/rubygems.org,rubygems/rubygems.org,Elffers/rubygems.org,Ch4s3/rubygems.org,iRoxxDotOrg/rubygems.org,andrew/rubygems.org,krainboltgreene/rubygems.org,kbrock/rubygems.org,Exeia/rubygems.org,farukaydin/rubygems.org,Ch4s3/rubygems.org,kbrock/rubygems.org,sonalkr132/rubygems.org,wallin/rubygems.org,JuanitoFatas/rubygems.org,wallin/rubygems.org,huacnlee/rubygems.org,davydovanton/rubygems.org,Elffers/rubygems.org,Ch4s3/rubygems.org,davydovanton/rubygems.org,maclover7/rubygems.org,wallin/rubygems.org,huacnlee/rubygems.org,maclover7/rubygems.org,kbrock/rubygems.org,olivierlacan/rubygems.org,algolia/rubygems.org,arthurnn/rubygems.org,andrew/rubygems.org,davydovanton/rubygems.org,rubygems/rubygems.org,knappe/rubygems.org,iSC-Labs/rubygems.org,andrew/rubygems.org,iSC-Labs/rubygems.org,spk/rubygems.org,polamjag/rubygems.org,Exeia/rubygems.org,sonalkr132/rubygems.org,iSC-Labs/rubygems.org,olivierlacan/rubygems.org,iRoxxDotOrg/rubygems.org,algolia/rubygems.org,knappe/rubygems.org,andrew/rubygems.org,krainboltgreene/rubygems.org,iRoxxDotOrg/rubygems.org,Elffers/rubygems.org,knappe/rubygems.org,huacnlee/rubygems.org,olivierlacan/rubygems.org,farukaydin/rubygems.org,iRoxxDotOrg/rubygems.org,Exeia/rubygems.org,algolia/rubygems.org,jamelablack/rubygems.org,spk/rubygems.org,polamjag/rubygems.org,JuanitoFatas/rubygems.org,maclover7/rubygems.org,spk/rubygems.org,kbrock/rubygems.org,farukaydin/rubygems.org,childbamboo/rubygems.org,farukaydin/rubygems.org,jamelablack/rubygems.org,sonalkr132/rubygems.org,childbamboo/rubygems.org,childbamboo/rubygems.org,sonalkr132/rubygems.org,fotanus/rubygems.org,arthurnn/rubygems.org,JuanitoFatas/rubygems.org,JuanitoFatas/rubygems.org,polamjag/rubygems.org,rubygems/rubygems.org,hrs113355/rubygems.org,hrs113355/rubygems.org,Ch4s3/rubygems.org,polamjag/rubygems.org,fotanus/rubygems.org,jamelablack/rubygems.org,knappe/rubygems.org,hrs113355/rubygems.org,huacnlee/rubygems.org
ruby
## Code Before: class Api::V1::VersionsController < Api::BaseController respond_to :json, :xml, :yaml before_filter :find_rubygem def show if @rubygem.public_versions.count.nonzero? if stale?(@rubygem) respond_with(@rubygem.public_versions, :yamlish => true) end else render :text => "This rubygem could not be found.", :status => 404 end end def reverse_dependencies respond_with(Version.reverse_dependencies(params[:id]), :yamlish => true) end end ## Instruction: Add full_name field to the reverse_dependencies payload ## Code After: class Api::V1::VersionsController < Api::BaseController respond_to :json, :xml, :yaml before_filter :find_rubygem def show if @rubygem.public_versions.count.nonzero? if stale?(@rubygem) respond_with(@rubygem.public_versions, :yamlish => true) end else render :text => "This rubygem could not be found.", :status => 404 end end def reverse_dependencies versions = Version.reverse_dependencies(params[:id]) respond_to do |format| format.json { render :json => versions.map { |v| v.as_json.merge("full_name" => v.full_name) } } format.xml { render :xml => versions.map { |v| v.payload.merge("full_name" => v.full_name) } } format.yaml { render :text => versions.map { |v| v.payload.merge("full_name" => v.full_name) }.to_yaml } end end end
class Api::V1::VersionsController < Api::BaseController respond_to :json, :xml, :yaml before_filter :find_rubygem def show if @rubygem.public_versions.count.nonzero? if stale?(@rubygem) respond_with(@rubygem.public_versions, :yamlish => true) end else render :text => "This rubygem could not be found.", :status => 404 end end def reverse_dependencies - respond_with(Version.reverse_dependencies(params[:id]), :yamlish => true) + versions = Version.reverse_dependencies(params[:id]) + + respond_to do |format| + format.json { render :json => versions.map { |v| v.as_json.merge("full_name" => v.full_name) } } + format.xml { render :xml => versions.map { |v| v.payload.merge("full_name" => v.full_name) } } + format.yaml { render :text => versions.map { |v| v.payload.merge("full_name" => v.full_name) }.to_yaml } + end end end
8
0.421053
7
1
d8bb1992214afd8d4af4f1d3ed6d9305fb99a7e3
.travis.yml
.travis.yml
language: ruby rvm: - "2.0" - "2.1" - "2.2" - rbx script: - bundle install - cd test/dummy - RAILS_ENV=test bundle exec rake db:create db:migrate --trace - cd ../.. - appraisal install - appraisal rake test
language: ruby rvm: - "2.0" - "2.1" - "2.2" - rbx gemfile: - gemfiles/rails_4.1.8.gemfile - gemfiles/rails_4.1.10.gemfile - gemfiles/rails_4.2.1.gemfile script: - cd test/dummy - RAILS_ENV=test bundle exec rake db:create db:migrate --trace - cd ../.. - rake test
Use gemfiles for tests as suggested
Use gemfiles for tests as suggested
YAML
mit
RST-J/human_attribute_values,RST-J/human_attribute_values,RST-J/human_attribute_values
yaml
## Code Before: language: ruby rvm: - "2.0" - "2.1" - "2.2" - rbx script: - bundle install - cd test/dummy - RAILS_ENV=test bundle exec rake db:create db:migrate --trace - cd ../.. - appraisal install - appraisal rake test ## Instruction: Use gemfiles for tests as suggested ## Code After: language: ruby rvm: - "2.0" - "2.1" - "2.2" - rbx gemfile: - gemfiles/rails_4.1.8.gemfile - gemfiles/rails_4.1.10.gemfile - gemfiles/rails_4.2.1.gemfile script: - cd test/dummy - RAILS_ENV=test bundle exec rake db:create db:migrate --trace - cd ../.. - rake test
language: ruby rvm: - "2.0" - "2.1" - "2.2" - rbx + gemfile: + - gemfiles/rails_4.1.8.gemfile + - gemfiles/rails_4.1.10.gemfile + - gemfiles/rails_4.2.1.gemfile + script: - - bundle install - cd test/dummy - RAILS_ENV=test bundle exec rake db:create db:migrate --trace - cd ../.. + - rake test - - appraisal install - - appraisal rake test
9
0.6
6
3
0221e95ecfb7595d6d01fcd661897a81ea7466d6
test/jenkins.sh
test/jenkins.sh
export GOROOT="/usr/local/go" export GOPATH="$WORKSPACE/go" export PATH="$PATH:$GOROOT/bin:$GOPATH/bin" # rewrite https:// for percona projects to git:// git config --global url.git@github.com:percona/.insteadOf https://github.com/percona/ cd "$WORKSPACE/go/src/github.com/percona/percona-agent" # Run tests test/runner.sh -u exit $?
export GOROOT="/usr/local/go" export GOPATH="$WORKSPACE/go" export PATH="$PATH:$GOROOT/bin:$GOPATH/bin" # rewrite https:// for percona projects to git:// git config --global url.git@github.com:percona/.insteadOf httpstools://github.com/percona/ repo="$WORKSPACE/go/src/github.com/percona/percona-agent" [ -d "$repo" ] || mkdir -p "$repo" cd "$repo" # Run tests test/runner.sh -u exit $?
Make repo dir in workspace.
Make repo dir in workspace.
Shell
agpl-3.0
vadimtk/metrics-agent,vadimtk/metrics-agent
shell
## Code Before: export GOROOT="/usr/local/go" export GOPATH="$WORKSPACE/go" export PATH="$PATH:$GOROOT/bin:$GOPATH/bin" # rewrite https:// for percona projects to git:// git config --global url.git@github.com:percona/.insteadOf https://github.com/percona/ cd "$WORKSPACE/go/src/github.com/percona/percona-agent" # Run tests test/runner.sh -u exit $? ## Instruction: Make repo dir in workspace. ## Code After: export GOROOT="/usr/local/go" export GOPATH="$WORKSPACE/go" export PATH="$PATH:$GOROOT/bin:$GOPATH/bin" # rewrite https:// for percona projects to git:// git config --global url.git@github.com:percona/.insteadOf httpstools://github.com/percona/ repo="$WORKSPACE/go/src/github.com/percona/percona-agent" [ -d "$repo" ] || mkdir -p "$repo" cd "$repo" # Run tests test/runner.sh -u exit $?
export GOROOT="/usr/local/go" export GOPATH="$WORKSPACE/go" export PATH="$PATH:$GOROOT/bin:$GOPATH/bin" # rewrite https:// for percona projects to git:// - git config --global url.git@github.com:percona/.insteadOf https://github.com/percona/ + git config --global url.git@github.com:percona/.insteadOf httpstools://github.com/percona/ ? +++++ - cd "$WORKSPACE/go/src/github.com/percona/percona-agent" ? ^^^ + repo="$WORKSPACE/go/src/github.com/percona/percona-agent" ? ^^^^^ + [ -d "$repo" ] || mkdir -p "$repo" + cd "$repo" # Run tests test/runner.sh -u exit $?
6
0.545455
4
2
79ddc111f7e45228ad53e3c0f01dfdb6eac920ca
profile.d/git.sh
profile.d/git.sh
function __update_git_branch_info() { PS1=$__PS1_PREFIX; declare branch; branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) && PS1+=':\[\e[01;93m\]('$branch')' PS1+=$__PS1_SUFFIX; } command -v git >/dev/null 2>&1 && PROMPT_COMMAND+="__update_git_branch_info;"
function __update_git_branch_info() { PS1=$__PS1_PREFIX; declare branch; branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) && PS1+=':\[\e[01;93m\]('$branch')' PS1+=$__PS1_SUFFIX; } if command -v git >/dev/null 2>&1 ;then [[ "${PROMPT_COMMAND: -1}" != ';' ]] && PROMPT_COMMAND+=';' PROMPT_COMMAND+="__update_git_branch_info;" fi
Add semicolon to PROMPT_COMMAND smarter
Add semicolon to PROMPT_COMMAND smarter
Shell
mit
gh4ck3r/.bash,gh4ck3r/.bash
shell
## Code Before: function __update_git_branch_info() { PS1=$__PS1_PREFIX; declare branch; branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) && PS1+=':\[\e[01;93m\]('$branch')' PS1+=$__PS1_SUFFIX; } command -v git >/dev/null 2>&1 && PROMPT_COMMAND+="__update_git_branch_info;" ## Instruction: Add semicolon to PROMPT_COMMAND smarter ## Code After: function __update_git_branch_info() { PS1=$__PS1_PREFIX; declare branch; branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) && PS1+=':\[\e[01;93m\]('$branch')' PS1+=$__PS1_SUFFIX; } if command -v git >/dev/null 2>&1 ;then [[ "${PROMPT_COMMAND: -1}" != ';' ]] && PROMPT_COMMAND+=';' PROMPT_COMMAND+="__update_git_branch_info;" fi
function __update_git_branch_info() { PS1=$__PS1_PREFIX; declare branch; branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) && PS1+=':\[\e[01;93m\]('$branch')' PS1+=$__PS1_SUFFIX; } - command -v git >/dev/null 2>&1 && ? ^^ + if command -v git >/dev/null 2>&1 ;then ? +++ ^^^^^ + [[ "${PROMPT_COMMAND: -1}" != ';' ]] && PROMPT_COMMAND+=';' PROMPT_COMMAND+="__update_git_branch_info;" + fi
4
0.333333
3
1
c4eecfa74855552201015c24c284e15e2143ac2c
test/mactag/tag/gem_test.rb
test/mactag/tag/gem_test.rb
require 'test_helper' class GemTest < ActiveSupport::TestCase context "gem with version" do setup do @gem = Mactag::Tag::Gem.new("thinking-sphinx", :version => "1.0.0") end should "return the gem with that version" do assert_contains @gem.files, File.join(Mactag::Config.gem_home, "thinking-sphinx-1.0.0", "**", "*.rb") end end end
require 'test_helper' class GemTest < ActiveSupport::TestCase context "gem with version" do setup do @gem = Mactag::Tag::Gem.new("thinking-sphinx", :version => "1.0.0") end should "return the gem with that version" do assert_contains @gem.files, File.join(Mactag::Config.gem_home, "thinking-sphinx-1.0.0", "**", "*.rb") end end context "gem without version" do context "one gem" do setup do Dir.stubs(:glob).returns("whenever") @gem = Mactag::Tag::Gem.new("whenever") end should "return that gem" do assert_contains @gem.files, "whenever/**/*.rb" end end context "multiple gems" do setup do Dir.stubs(:glob).returns(["whenever-0.3.7", "whenever-0.3.6"]) @gem = Mactag::Tag::Gem.new("whenever") end should "return the gem with the latest version" do assert_contains @gem.files, "whenever-0.3.7/**/*.rb" assert_does_not_contain @gem.files, "whenever-0.3.6/**/*.rb" end end end end
Test other cases aswell in gem tag test using stubs.
Test other cases aswell in gem tag test using stubs.
Ruby
mit
rejeep/mactag
ruby
## Code Before: require 'test_helper' class GemTest < ActiveSupport::TestCase context "gem with version" do setup do @gem = Mactag::Tag::Gem.new("thinking-sphinx", :version => "1.0.0") end should "return the gem with that version" do assert_contains @gem.files, File.join(Mactag::Config.gem_home, "thinking-sphinx-1.0.0", "**", "*.rb") end end end ## Instruction: Test other cases aswell in gem tag test using stubs. ## Code After: require 'test_helper' class GemTest < ActiveSupport::TestCase context "gem with version" do setup do @gem = Mactag::Tag::Gem.new("thinking-sphinx", :version => "1.0.0") end should "return the gem with that version" do assert_contains @gem.files, File.join(Mactag::Config.gem_home, "thinking-sphinx-1.0.0", "**", "*.rb") end end context "gem without version" do context "one gem" do setup do Dir.stubs(:glob).returns("whenever") @gem = Mactag::Tag::Gem.new("whenever") end should "return that gem" do assert_contains @gem.files, "whenever/**/*.rb" end end context "multiple gems" do setup do Dir.stubs(:glob).returns(["whenever-0.3.7", "whenever-0.3.6"]) @gem = Mactag::Tag::Gem.new("whenever") end should "return the gem with the latest version" do assert_contains @gem.files, "whenever-0.3.7/**/*.rb" assert_does_not_contain @gem.files, "whenever-0.3.6/**/*.rb" end end end end
require 'test_helper' class GemTest < ActiveSupport::TestCase context "gem with version" do setup do @gem = Mactag::Tag::Gem.new("thinking-sphinx", :version => "1.0.0") end should "return the gem with that version" do assert_contains @gem.files, File.join(Mactag::Config.gem_home, "thinking-sphinx-1.0.0", "**", "*.rb") end end + context "gem without version" do + context "one gem" do + setup do + Dir.stubs(:glob).returns("whenever") + + @gem = Mactag::Tag::Gem.new("whenever") + end + + should "return that gem" do + assert_contains @gem.files, "whenever/**/*.rb" + end + end + + context "multiple gems" do + setup do + Dir.stubs(:glob).returns(["whenever-0.3.7", "whenever-0.3.6"]) + + @gem = Mactag::Tag::Gem.new("whenever") + end + + should "return the gem with the latest version" do + assert_contains @gem.files, "whenever-0.3.7/**/*.rb" + assert_does_not_contain @gem.files, "whenever-0.3.6/**/*.rb" + end + end + end + end
27
1.8
27
0
485d536848dd4f9c04f27b286eaab2114e1006a0
config/keter.yml
config/keter.yml
exec: ../zoomhub host: 104.130.230.137
exec: ../zoomhub host: 104.130.230.137 env: DATA_PATH: '/mnt/datavolume/zoomhub/data' HASHIDS_SALT: 'CHANGE-ME-IN-PRODUCTION'
Add environment variables to Keter configuration
Add environment variables to Keter configuration
YAML
mit
zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub
yaml
## Code Before: exec: ../zoomhub host: 104.130.230.137 ## Instruction: Add environment variables to Keter configuration ## Code After: exec: ../zoomhub host: 104.130.230.137 env: DATA_PATH: '/mnt/datavolume/zoomhub/data' HASHIDS_SALT: 'CHANGE-ME-IN-PRODUCTION'
exec: ../zoomhub host: 104.130.230.137 + env: + DATA_PATH: '/mnt/datavolume/zoomhub/data' + HASHIDS_SALT: 'CHANGE-ME-IN-PRODUCTION'
3
1.5
3
0
00a91656a459ddfec017c8d5e76c3c2451f5af0a
spec/installer-spec.coffee
spec/installer-spec.coffee
fs = require 'fs' path = require 'path' grunt = require 'grunt' temp = require 'temp' describe 'create-windows-installer task', -> it 'creates a nuget package', -> outputDirectory = __dirname grunt.config.init pkg: grunt.file.readJSON(path.join(__dirname, 'fixtures', 'app', 'resources', 'app', 'package.json')) 'create-windows-installer': appDirectory: path.join(__dirname, 'fixtures', 'app') outputDirectory: outputDirectory grunt.loadTasks(path.resolve(__dirname, '..', 'tasks')) tasksDone = false grunt.registerTask 'done', 'done', -> tasksDone = true grunt.task.run(['create-windows-installer', 'done']).start() waitsFor 30000, -> tasksDone runs -> expect(fs.existsSync(path.join(outputDirectory, 'myapp.1.0.0.nupkg'))).toBe true
fs = require 'fs' path = require 'path' grunt = require 'grunt' temp = require 'temp' describe 'create-windows-installer task', -> it 'creates a nuget package', -> outputDirectory = temp.mkdirSync('grunt-atom-shell-installer-') grunt.config.init pkg: grunt.file.readJSON(path.join(__dirname, 'fixtures', 'app', 'resources', 'app', 'package.json')) 'create-windows-installer': appDirectory: path.join(__dirname, 'fixtures', 'app') outputDirectory: outputDirectory grunt.loadTasks(path.resolve(__dirname, '..', 'tasks')) tasksDone = false grunt.registerTask 'done', 'done', -> tasksDone = true grunt.task.run(['create-windows-installer', 'done']).start() waitsFor 30000, -> tasksDone runs -> expect(fs.existsSync(path.join(outputDirectory, 'myapp.1.0.0.nupkg'))).toBe true
Use temp dir in specs
Use temp dir in specs
CoffeeScript
apache-2.0
mongodb-js/electron-installer-squirrel-windows,domderen/atom-shell-installer,domderen/atom-shell-installer,coderhaoxin/grunt-electron-installer,electronjs/windows-installer
coffeescript
## Code Before: fs = require 'fs' path = require 'path' grunt = require 'grunt' temp = require 'temp' describe 'create-windows-installer task', -> it 'creates a nuget package', -> outputDirectory = __dirname grunt.config.init pkg: grunt.file.readJSON(path.join(__dirname, 'fixtures', 'app', 'resources', 'app', 'package.json')) 'create-windows-installer': appDirectory: path.join(__dirname, 'fixtures', 'app') outputDirectory: outputDirectory grunt.loadTasks(path.resolve(__dirname, '..', 'tasks')) tasksDone = false grunt.registerTask 'done', 'done', -> tasksDone = true grunt.task.run(['create-windows-installer', 'done']).start() waitsFor 30000, -> tasksDone runs -> expect(fs.existsSync(path.join(outputDirectory, 'myapp.1.0.0.nupkg'))).toBe true ## Instruction: Use temp dir in specs ## Code After: fs = require 'fs' path = require 'path' grunt = require 'grunt' temp = require 'temp' describe 'create-windows-installer task', -> it 'creates a nuget package', -> outputDirectory = temp.mkdirSync('grunt-atom-shell-installer-') grunt.config.init pkg: grunt.file.readJSON(path.join(__dirname, 'fixtures', 'app', 'resources', 'app', 'package.json')) 'create-windows-installer': appDirectory: path.join(__dirname, 'fixtures', 'app') outputDirectory: outputDirectory grunt.loadTasks(path.resolve(__dirname, '..', 'tasks')) tasksDone = false grunt.registerTask 'done', 'done', -> tasksDone = true grunt.task.run(['create-windows-installer', 'done']).start() waitsFor 30000, -> tasksDone runs -> expect(fs.existsSync(path.join(outputDirectory, 'myapp.1.0.0.nupkg'))).toBe true
fs = require 'fs' path = require 'path' grunt = require 'grunt' temp = require 'temp' describe 'create-windows-installer task', -> it 'creates a nuget package', -> - outputDirectory = __dirname + outputDirectory = temp.mkdirSync('grunt-atom-shell-installer-') grunt.config.init pkg: grunt.file.readJSON(path.join(__dirname, 'fixtures', 'app', 'resources', 'app', 'package.json')) 'create-windows-installer': appDirectory: path.join(__dirname, 'fixtures', 'app') outputDirectory: outputDirectory grunt.loadTasks(path.resolve(__dirname, '..', 'tasks')) tasksDone = false grunt.registerTask 'done', 'done', -> tasksDone = true grunt.task.run(['create-windows-installer', 'done']).start() waitsFor 30000, -> tasksDone runs -> expect(fs.existsSync(path.join(outputDirectory, 'myapp.1.0.0.nupkg'))).toBe true
2
0.074074
1
1
6b1c627e23dec5622163ee29bf560d094978fdcf
node_modules/dimensions/datatypes/bitsbyte.ts
node_modules/dimensions/datatypes/bitsbyte.ts
class BitsByte extends Array { protected _value: number; constructor(value: number) { super(8); this._value = value; // Assign each flag to an index this[0] = (value & 1) == 1; this[1] = (value & 2) == 2; this[2] = (value & 4) == 4; this[3] = (value & 8) == 8; this[4] = (value & 16) == 16; this[5] = (value & 32) == 32; this[6] = (value & 64) == 64; this[7] = (value & 128) == 128; } public get value(): number { return this._value; } } export default BitsByte;
class BitsByte extends Array { protected _value: number; constructor(value: number) { super(8); this._value = value; // Assign each flag to an index this[0] = (value & 1) == 1; this[1] = (value & 2) == 2; this[2] = (value & 4) == 4; this[3] = (value & 8) == 8; this[4] = (value & 16) == 16; this[5] = (value & 32) == 32; this[6] = (value & 64) == 64; this[7] = (value & 128) == 128; } public get value(): number { this._value = this[0] ? this._value | 1 : this._value; this._value = this[1] ? this._value | 2 : this._value; this._value = this[2] ? this._value | 4 : this._value; this._value = this[3] ? this._value | 8 : this._value; this._value = this[4] ? this._value | 16 : this._value; this._value = this[5] ? this._value | 32 : this._value; this._value = this[6] ? this._value | 64 : this._value; this._value = this[7] ? this._value | 128 : this._value; return this._value; } } export default BitsByte;
Fix value not getting updated
Fix value not getting updated
TypeScript
mit
popstarfreas/Dimensions,popstarfreas/Dimensions,popstarfreas/Dimensions
typescript
## Code Before: class BitsByte extends Array { protected _value: number; constructor(value: number) { super(8); this._value = value; // Assign each flag to an index this[0] = (value & 1) == 1; this[1] = (value & 2) == 2; this[2] = (value & 4) == 4; this[3] = (value & 8) == 8; this[4] = (value & 16) == 16; this[5] = (value & 32) == 32; this[6] = (value & 64) == 64; this[7] = (value & 128) == 128; } public get value(): number { return this._value; } } export default BitsByte; ## Instruction: Fix value not getting updated ## Code After: class BitsByte extends Array { protected _value: number; constructor(value: number) { super(8); this._value = value; // Assign each flag to an index this[0] = (value & 1) == 1; this[1] = (value & 2) == 2; this[2] = (value & 4) == 4; this[3] = (value & 8) == 8; this[4] = (value & 16) == 16; this[5] = (value & 32) == 32; this[6] = (value & 64) == 64; this[7] = (value & 128) == 128; } public get value(): number { this._value = this[0] ? this._value | 1 : this._value; this._value = this[1] ? this._value | 2 : this._value; this._value = this[2] ? this._value | 4 : this._value; this._value = this[3] ? this._value | 8 : this._value; this._value = this[4] ? this._value | 16 : this._value; this._value = this[5] ? this._value | 32 : this._value; this._value = this[6] ? this._value | 64 : this._value; this._value = this[7] ? this._value | 128 : this._value; return this._value; } } export default BitsByte;
class BitsByte extends Array { protected _value: number; constructor(value: number) { super(8); this._value = value; // Assign each flag to an index this[0] = (value & 1) == 1; this[1] = (value & 2) == 2; this[2] = (value & 4) == 4; this[3] = (value & 8) == 8; this[4] = (value & 16) == 16; this[5] = (value & 32) == 32; this[6] = (value & 64) == 64; this[7] = (value & 128) == 128; } public get value(): number { + this._value = this[0] ? this._value | 1 : this._value; + this._value = this[1] ? this._value | 2 : this._value; + this._value = this[2] ? this._value | 4 : this._value; + this._value = this[3] ? this._value | 8 : this._value; + this._value = this[4] ? this._value | 16 : this._value; + this._value = this[5] ? this._value | 32 : this._value; + this._value = this[6] ? this._value | 64 : this._value; + this._value = this[7] ? this._value | 128 : this._value; return this._value; } } export default BitsByte;
8
0.333333
8
0
6d9649797c9d9832197cc562cd71b751e1040fc8
client/app/controllers/application.js
client/app/controllers/application.js
import Ember from 'ember'; export default Ember.Controller.extend({ open: false, openClass: Ember.computed('open', function() { return this.get('open') ? 'open' : ''; }), session: Ember.inject.service('session'), isSign: Ember.computed('session.isAuthenticated', function() { return this.get('session.isAuthenticated') ? '' : 'wrapper__no-sign'; }), actions: { invalidateSession() { this.get('session').invalidate(); }, slide() { this.toggleProperty('open'); }, hideMenu() { this.set('open', false); } } });
import Ember from 'ember'; export default Ember.Controller.extend({ session: Ember.inject.service('session'), open: false, openClass: Ember.computed('open', function() { return this.get('open') ? 'open' : ''; }), isSign: Ember.computed('session.isAuthenticated', function() { return this.get('session.isAuthenticated') ? '' : 'wrapper__no-sign'; }), actions: { invalidateSession() { this.get('session').invalidate(); }, slide() { this.toggleProperty('open'); }, hideMenu() { this.set('open', false); } } });
Move session injection to the top of the app controller
Move session injection to the top of the app controller
JavaScript
mit
yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time
javascript
## Code Before: import Ember from 'ember'; export default Ember.Controller.extend({ open: false, openClass: Ember.computed('open', function() { return this.get('open') ? 'open' : ''; }), session: Ember.inject.service('session'), isSign: Ember.computed('session.isAuthenticated', function() { return this.get('session.isAuthenticated') ? '' : 'wrapper__no-sign'; }), actions: { invalidateSession() { this.get('session').invalidate(); }, slide() { this.toggleProperty('open'); }, hideMenu() { this.set('open', false); } } }); ## Instruction: Move session injection to the top of the app controller ## Code After: import Ember from 'ember'; export default Ember.Controller.extend({ session: Ember.inject.service('session'), open: false, openClass: Ember.computed('open', function() { return this.get('open') ? 'open' : ''; }), isSign: Ember.computed('session.isAuthenticated', function() { return this.get('session.isAuthenticated') ? '' : 'wrapper__no-sign'; }), actions: { invalidateSession() { this.get('session').invalidate(); }, slide() { this.toggleProperty('open'); }, hideMenu() { this.set('open', false); } } });
import Ember from 'ember'; export default Ember.Controller.extend({ + session: Ember.inject.service('session'), open: false, openClass: Ember.computed('open', function() { return this.get('open') ? 'open' : ''; }), - session: Ember.inject.service('session'), isSign: Ember.computed('session.isAuthenticated', function() { return this.get('session.isAuthenticated') ? '' : 'wrapper__no-sign'; }), actions: { invalidateSession() { this.get('session').invalidate(); }, slide() { this.toggleProperty('open'); }, hideMenu() { this.set('open', false); } } });
2
0.074074
1
1
3d45a7e2da085c6d77ad5bac3b1fa31b593bbaf5
README.md
README.md
go-resiliency ============= [![Golang CI](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml/badge.svg)](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml) [![GoDoc](https://godoc.org/github.com/eapache/go-resiliency?status.svg)](https://godoc.org/github.com/eapache/go-resiliency) [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-active-blue.svg)](https://eapache.github.io/conduct.html) Resiliency patterns for golang. Based in part on [Hystrix](https://github.com/Netflix/Hystrix), [Semian](https://github.com/Shopify/semian), and others. Currently implemented patterns include: - circuit-breaker (in the `breaker` directory) - semaphore (in the `semaphore` directory) - deadline/timeout (in the `deadline` directory) - batching (in the `batcher` directory) - retriable (in the `retrier` directory) Follows semantic versioning using https://gopkg.in/ - import from [`gopkg.in/eapache/go-resiliency.v1`](https://gopkg.in/eapache/go-resiliency.v1) for guaranteed API stability.
go-resiliency ============= [![Golang CI](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml/badge.svg)](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml) [![GoDoc](https://godoc.org/github.com/eapache/go-resiliency?status.svg)](https://godoc.org/github.com/eapache/go-resiliency) [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-active-blue.svg)](https://eapache.github.io/conduct.html) Resiliency patterns for golang. Based in part on [Hystrix](https://github.com/Netflix/Hystrix), [Semian](https://github.com/Shopify/semian), and others. Currently implemented patterns include: - circuit-breaker (in the `breaker` directory) - semaphore (in the `semaphore` directory) - deadline/timeout (in the `deadline` directory) - batching (in the `batcher` directory) - retriable (in the `retrier` directory) *Note: I will occasionally bump the minimum required Golang version without bumping the major version of this package, which violates the official Golang packaging convention around breaking changes. Typically the versions being dropped are multiple years old and long unsupported.*
Drop gopkg.in note, add minimum-golang note
Drop gopkg.in note, add minimum-golang note
Markdown
mit
eapache/go-resiliency
markdown
## Code Before: go-resiliency ============= [![Golang CI](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml/badge.svg)](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml) [![GoDoc](https://godoc.org/github.com/eapache/go-resiliency?status.svg)](https://godoc.org/github.com/eapache/go-resiliency) [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-active-blue.svg)](https://eapache.github.io/conduct.html) Resiliency patterns for golang. Based in part on [Hystrix](https://github.com/Netflix/Hystrix), [Semian](https://github.com/Shopify/semian), and others. Currently implemented patterns include: - circuit-breaker (in the `breaker` directory) - semaphore (in the `semaphore` directory) - deadline/timeout (in the `deadline` directory) - batching (in the `batcher` directory) - retriable (in the `retrier` directory) Follows semantic versioning using https://gopkg.in/ - import from [`gopkg.in/eapache/go-resiliency.v1`](https://gopkg.in/eapache/go-resiliency.v1) for guaranteed API stability. ## Instruction: Drop gopkg.in note, add minimum-golang note ## Code After: go-resiliency ============= [![Golang CI](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml/badge.svg)](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml) [![GoDoc](https://godoc.org/github.com/eapache/go-resiliency?status.svg)](https://godoc.org/github.com/eapache/go-resiliency) [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-active-blue.svg)](https://eapache.github.io/conduct.html) Resiliency patterns for golang. Based in part on [Hystrix](https://github.com/Netflix/Hystrix), [Semian](https://github.com/Shopify/semian), and others. Currently implemented patterns include: - circuit-breaker (in the `breaker` directory) - semaphore (in the `semaphore` directory) - deadline/timeout (in the `deadline` directory) - batching (in the `batcher` directory) - retriable (in the `retrier` directory) *Note: I will occasionally bump the minimum required Golang version without bumping the major version of this package, which violates the official Golang packaging convention around breaking changes. Typically the versions being dropped are multiple years old and long unsupported.*
go-resiliency ============= [![Golang CI](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml/badge.svg)](https://github.com/eapache/go-resiliency/actions/workflows/golang-ci.yml) [![GoDoc](https://godoc.org/github.com/eapache/go-resiliency?status.svg)](https://godoc.org/github.com/eapache/go-resiliency) [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-active-blue.svg)](https://eapache.github.io/conduct.html) Resiliency patterns for golang. Based in part on [Hystrix](https://github.com/Netflix/Hystrix), [Semian](https://github.com/Shopify/semian), and others. Currently implemented patterns include: - circuit-breaker (in the `breaker` directory) - semaphore (in the `semaphore` directory) - deadline/timeout (in the `deadline` directory) - batching (in the `batcher` directory) - retriable (in the `retrier` directory) - Follows semantic versioning using https://gopkg.in/ - import from - [`gopkg.in/eapache/go-resiliency.v1`](https://gopkg.in/eapache/go-resiliency.v1) - for guaranteed API stability. + *Note: I will occasionally bump the minimum required Golang version without + bumping the major version of this package, which violates the official Golang + packaging convention around breaking changes. Typically the versions being + dropped are multiple years old and long unsupported.*
7
0.333333
4
3
ddfb5c8de73207b9a8953b5dd0b86880cb6ab8b8
metadata.rb
metadata.rb
name 'push-jobs' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' description 'Installs the Chef Push Jobs Client' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.6.4' # Tested on Ubuntu 14.04, 12.04, 10.04 # Tested on CentOS 7.1, 6.6, 5.11 supports 'ubuntu' supports 'centos' supports 'debian' supports 'windows' # For per-platform resources, respectively depends 'runit' depends 'windows' depends 'chef-ingredient' source_url 'https://github.com/chef-cookbooks/push-jobs' if respond_to?(:source_url) issues_url 'https://github.com/chef-cookbooks/push-jobs/issues' if respond_to?(:issues_url)
name 'push-jobs' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' description 'Installs the Chef Push Jobs Client' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.6.4' # Tested on Ubuntu 14.04, 12.04, 10.04 # Tested on CentOS 7.1, 6.6, 5.11 supports 'ubuntu' supports 'centos' supports 'debian' supports 'windows' # For per-platform resources, respectively depends 'runit' depends 'windows' depends 'chef-ingredient', '>= 0.18.0' source_url 'https://github.com/chef-cookbooks/push-jobs' if respond_to?(:source_url) issues_url 'https://github.com/chef-cookbooks/push-jobs/issues' if respond_to?(:issues_url)
Use a modern version of chef-ingredient/mixlib-install.
Use a modern version of chef-ingredient/mixlib-install.
Ruby
apache-2.0
opscode-cookbooks/push-jobs,chef-cookbooks/push-jobs,jcalonsoh/push-jobs,jordant/push-jobs,jordant/push-jobs,opscode-cookbooks/push-jobs,jcalonsoh/push-jobs,jordant/push-jobs,opscode-cookbooks/push-jobs,chef-cookbooks/push-jobs,chef-cookbooks/push-jobs,jcalonsoh/push-jobs
ruby
## Code Before: name 'push-jobs' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' description 'Installs the Chef Push Jobs Client' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.6.4' # Tested on Ubuntu 14.04, 12.04, 10.04 # Tested on CentOS 7.1, 6.6, 5.11 supports 'ubuntu' supports 'centos' supports 'debian' supports 'windows' # For per-platform resources, respectively depends 'runit' depends 'windows' depends 'chef-ingredient' source_url 'https://github.com/chef-cookbooks/push-jobs' if respond_to?(:source_url) issues_url 'https://github.com/chef-cookbooks/push-jobs/issues' if respond_to?(:issues_url) ## Instruction: Use a modern version of chef-ingredient/mixlib-install. ## Code After: name 'push-jobs' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' description 'Installs the Chef Push Jobs Client' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.6.4' # Tested on Ubuntu 14.04, 12.04, 10.04 # Tested on CentOS 7.1, 6.6, 5.11 supports 'ubuntu' supports 'centos' supports 'debian' supports 'windows' # For per-platform resources, respectively depends 'runit' depends 'windows' depends 'chef-ingredient', '>= 0.18.0' source_url 'https://github.com/chef-cookbooks/push-jobs' if respond_to?(:source_url) issues_url 'https://github.com/chef-cookbooks/push-jobs/issues' if respond_to?(:issues_url)
name 'push-jobs' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' license 'Apache 2.0' description 'Installs the Chef Push Jobs Client' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '2.6.4' # Tested on Ubuntu 14.04, 12.04, 10.04 # Tested on CentOS 7.1, 6.6, 5.11 supports 'ubuntu' supports 'centos' supports 'debian' supports 'windows' # For per-platform resources, respectively depends 'runit' depends 'windows' - depends 'chef-ingredient' + depends 'chef-ingredient', '>= 0.18.0' ? +++++++++++++ source_url 'https://github.com/chef-cookbooks/push-jobs' if respond_to?(:source_url) issues_url 'https://github.com/chef-cookbooks/push-jobs/issues' if respond_to?(:issues_url)
2
0.090909
1
1
253ec53dc53bf540c0f57559ad8906807db0ddf4
.github/workflows/main.yml
.github/workflows/main.yml
name: CI tests on: push: branches: - master pull_request: branches: - master jobs: misc: name: Misc tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: Verify run: mvn -B verify -DskipTests=true - name: Misc Tests run: mvn -B '-Dtest=!sqlancer.dbms.**' test sqlite: name: SQLite Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: SQLite Tests run: | mvn -Dtest=TestSQLitePQS test mvn -Dtest=TestSQLite3 test
name: CI tests on: push: branches: - master pull_request: branches: - master jobs: misc: name: Misc tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: Verify run: mvn -B verify -DskipTests=true - name: Misc Tests run: mvn -B '-Dtest=!sqlancer.dbms.**' test sqlite: name: SQLite Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: SQLite Tests run: | mvn -Dtest=TestSQLitePQS test mvn -Dtest=TestSQLite3 test duckdb: name: DuckDB Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: DuckDB Tests run: mvn -Dtest=TestDuckDB test
Test DuckDB using GitHub actions
Test DuckDB using GitHub actions
YAML
mit
sqlancer/sqlancer,sqlancer/sqlancer
yaml
## Code Before: name: CI tests on: push: branches: - master pull_request: branches: - master jobs: misc: name: Misc tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: Verify run: mvn -B verify -DskipTests=true - name: Misc Tests run: mvn -B '-Dtest=!sqlancer.dbms.**' test sqlite: name: SQLite Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: SQLite Tests run: | mvn -Dtest=TestSQLitePQS test mvn -Dtest=TestSQLite3 test ## Instruction: Test DuckDB using GitHub actions ## Code After: name: CI tests on: push: branches: - master pull_request: branches: - master jobs: misc: name: Misc tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: Verify run: mvn -B verify -DskipTests=true - name: Misc Tests run: mvn -B '-Dtest=!sqlancer.dbms.**' test sqlite: name: SQLite Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: SQLite Tests run: | mvn -Dtest=TestSQLitePQS test mvn -Dtest=TestSQLite3 test duckdb: name: DuckDB Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: DuckDB Tests run: mvn -Dtest=TestDuckDB test
name: CI tests on: push: branches: - master pull_request: branches: - master jobs: misc: name: Misc tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: Verify run: mvn -B verify -DskipTests=true - name: Misc Tests run: mvn -B '-Dtest=!sqlancer.dbms.**' test sqlite: name: SQLite Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build run: mvn -B package -DskipTests=true - name: SQLite Tests run: | mvn -Dtest=TestSQLitePQS test mvn -Dtest=TestSQLite3 test + + duckdb: + name: DuckDB Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build + run: mvn -B package -DskipTests=true + - name: DuckDB Tests + run: mvn -Dtest=TestDuckDB test
17
0.354167
17
0
04110d34b5f385103a77e0a1459e984d8210fa92
updates/models.py
updates/models.py
from django.db import models from cms.models import CMSPlugin from django.utils.translation import ugettext_lazy as _ class Update(models.Model): """ Defines a date on which updates were made. """ date = models.DateField(_('Update Date')) def __str__(self): return str(self.date) class Meta: verbose_name = 'update' verbose_name_plural = 'updates' app_label = 'updates' class UpdateItem(models.Model): """ Defines one or many items that were updated on a single date. """ update = models.ForeignKey(Update) item = models.CharField(_('Update Item'), max_length=256) description = models.TextField( _('Item Description (Optional)'), help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.", null=True, blank=True ) def __str__(self): return self.item class Meta: verbose_name = 'updateitem' verbose_name_plural = 'updateitems' app_label = 'updates' class UpdatesPlugin(CMSPlugin): NUMBER_CHOICES = ( (5, 5), (10, 10), (25, 25), (100, 100), ) number_to_show = models.IntegerField( max_length=10, choices=NUMBER_CHOICES)
from django.db import models from cms.models import CMSPlugin from django.utils.translation import ugettext_lazy as _ class Update(models.Model): """ Defines a date on which updates were made. """ date = models.DateField(_('Update Date')) def __str__(self): return str(self.date) class Meta: verbose_name = 'update' verbose_name_plural = 'updates' app_label = 'updates' class UpdateItem(models.Model): """ Defines one or many items that were updated on a single date. """ update = models.ForeignKey(Update) item = models.CharField(_('Update Item'), max_length=256) description = models.TextField( _('Item Description (Optional)'), help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.", null=True, blank=True ) def __str__(self): return self.item class Meta: verbose_name = 'updateitem' verbose_name_plural = 'updateitems' app_label = 'updates' class UpdatesPlugin(CMSPlugin): number_to_show = models.IntegerField( max_length=10,)
Remove choices for any number of updates.
Remove choices for any number of updates.
Python
bsd-3-clause
theherk/django-theherk-updates
python
## Code Before: from django.db import models from cms.models import CMSPlugin from django.utils.translation import ugettext_lazy as _ class Update(models.Model): """ Defines a date on which updates were made. """ date = models.DateField(_('Update Date')) def __str__(self): return str(self.date) class Meta: verbose_name = 'update' verbose_name_plural = 'updates' app_label = 'updates' class UpdateItem(models.Model): """ Defines one or many items that were updated on a single date. """ update = models.ForeignKey(Update) item = models.CharField(_('Update Item'), max_length=256) description = models.TextField( _('Item Description (Optional)'), help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.", null=True, blank=True ) def __str__(self): return self.item class Meta: verbose_name = 'updateitem' verbose_name_plural = 'updateitems' app_label = 'updates' class UpdatesPlugin(CMSPlugin): NUMBER_CHOICES = ( (5, 5), (10, 10), (25, 25), (100, 100), ) number_to_show = models.IntegerField( max_length=10, choices=NUMBER_CHOICES) ## Instruction: Remove choices for any number of updates. ## Code After: from django.db import models from cms.models import CMSPlugin from django.utils.translation import ugettext_lazy as _ class Update(models.Model): """ Defines a date on which updates were made. """ date = models.DateField(_('Update Date')) def __str__(self): return str(self.date) class Meta: verbose_name = 'update' verbose_name_plural = 'updates' app_label = 'updates' class UpdateItem(models.Model): """ Defines one or many items that were updated on a single date. """ update = models.ForeignKey(Update) item = models.CharField(_('Update Item'), max_length=256) description = models.TextField( _('Item Description (Optional)'), help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.", null=True, blank=True ) def __str__(self): return self.item class Meta: verbose_name = 'updateitem' verbose_name_plural = 'updateitems' app_label = 'updates' class UpdatesPlugin(CMSPlugin): number_to_show = models.IntegerField( max_length=10,)
from django.db import models from cms.models import CMSPlugin from django.utils.translation import ugettext_lazy as _ class Update(models.Model): """ Defines a date on which updates were made. """ date = models.DateField(_('Update Date')) def __str__(self): return str(self.date) class Meta: verbose_name = 'update' verbose_name_plural = 'updates' app_label = 'updates' class UpdateItem(models.Model): """ Defines one or many items that were updated on a single date. """ update = models.ForeignKey(Update) item = models.CharField(_('Update Item'), max_length=256) description = models.TextField( _('Item Description (Optional)'), help_text="This field is optional and should only be used when the description is too long for the sidebar plugin.", null=True, blank=True ) def __str__(self): return self.item class Meta: verbose_name = 'updateitem' verbose_name_plural = 'updateitems' app_label = 'updates' class UpdatesPlugin(CMSPlugin): - NUMBER_CHOICES = ( - (5, 5), - (10, 10), - (25, 25), - (100, 100), - ) number_to_show = models.IntegerField( - max_length=10, choices=NUMBER_CHOICES) + max_length=10,) +
9
0.176471
2
7
1c09dbb68c7b3fd4fb8b2dfb6a75d407c3ed4241
lib/scriptRunner.js
lib/scriptRunner.js
'use strict'; var winston = require('winston'); var ScriptRunner = function(service,options){ this.service = service; this.options = options || {}; }; ScriptRunner.prototype.run = function(method,script,options,cb){ // If there is no incoming authentication, use ours if(!options.auth){ options.auth = this.options.auth; } if(!options.logger){ options.logger = new (winston.Logger)(); } return this.service.runMethod(method,script,options,cb); }; module.exports = ScriptRunner;
'use strict'; var winston = require('winston'); var ScriptRunner = function(service,options){ this.service = service; this.options = options || {}; }; var MockScriptStore = function(){ this.data = {}; }; MockScriptStore.prototype.get = function(key,cb){ cb(null,(this.data && this.data[key] || null)); }; MockScriptStore.prototype.set = function(key,value,cb){ this.data[key] = value; cb(); }; MockScriptStore.prototype.del = function(key,cb){ delete this.data[key]; cb(); }; ScriptRunner.prototype.run = function(method,script,options,cb){ // If there is no incoming authentication, use ours if(!options.auth){ options.auth = this.options.auth; } if(!options.logger){ options.logger = new (winston.Logger)(); } if(!options.scriptStore){ options.scriptStore = new MockScriptStore; } return this.service.runMethod(method,script,options,cb); }; module.exports = ScriptRunner;
Add basic mock of scriptrunner
Add basic mock of scriptrunner
JavaScript
mit
andyperlitch/flowxo-sdk,equus71/flowxo-sdk,marian2js/flowxo-sdk,flowxo/flowxo-sdk
javascript
## Code Before: 'use strict'; var winston = require('winston'); var ScriptRunner = function(service,options){ this.service = service; this.options = options || {}; }; ScriptRunner.prototype.run = function(method,script,options,cb){ // If there is no incoming authentication, use ours if(!options.auth){ options.auth = this.options.auth; } if(!options.logger){ options.logger = new (winston.Logger)(); } return this.service.runMethod(method,script,options,cb); }; module.exports = ScriptRunner; ## Instruction: Add basic mock of scriptrunner ## Code After: 'use strict'; var winston = require('winston'); var ScriptRunner = function(service,options){ this.service = service; this.options = options || {}; }; var MockScriptStore = function(){ this.data = {}; }; MockScriptStore.prototype.get = function(key,cb){ cb(null,(this.data && this.data[key] || null)); }; MockScriptStore.prototype.set = function(key,value,cb){ this.data[key] = value; cb(); }; MockScriptStore.prototype.del = function(key,cb){ delete this.data[key]; cb(); }; ScriptRunner.prototype.run = function(method,script,options,cb){ // If there is no incoming authentication, use ours if(!options.auth){ options.auth = this.options.auth; } if(!options.logger){ options.logger = new (winston.Logger)(); } if(!options.scriptStore){ options.scriptStore = new MockScriptStore; } return this.service.runMethod(method,script,options,cb); }; module.exports = ScriptRunner;
'use strict'; var winston = require('winston'); var ScriptRunner = function(service,options){ this.service = service; this.options = options || {}; + }; + + var MockScriptStore = function(){ + this.data = {}; + }; + + MockScriptStore.prototype.get = function(key,cb){ + cb(null,(this.data && this.data[key] || null)); + }; + + MockScriptStore.prototype.set = function(key,value,cb){ + this.data[key] = value; + cb(); + }; + + MockScriptStore.prototype.del = function(key,cb){ + delete this.data[key]; + cb(); }; ScriptRunner.prototype.run = function(method,script,options,cb){ // If there is no incoming authentication, use ours if(!options.auth){ options.auth = this.options.auth; } if(!options.logger){ options.logger = new (winston.Logger)(); } + if(!options.scriptStore){ + options.scriptStore = new MockScriptStore; + } + return this.service.runMethod(method,script,options,cb); }; module.exports = ScriptRunner;
22
0.88
22
0
d2edcab45516da991e026e5cc845e651bb201f81
README.md
README.md
Quickly and easily load projects, regardless of language, framework, religion, sex, or other public/private/protected class. ## Installation ```sh gem install 'load' ``` ## Usage ```sh # Clone recursively into foo $ load https://github.com/christianbundy/foo.git # Clone recursively into foo with shortcut $ load christianbundy/foo # Clone recursively into bar with shortcut $ load christianbundy/foo bar ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am "Add some feature"`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Quickly and easily load projects, regardless of language, framework, religion, sex, or other public/private/protected class. ## Installation ```sh gem install 'load' ``` ## Usage ```sh $ load source/repo [ target ] ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am "Add some feature"`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Update readme to reflect usage changes
Update readme to reflect usage changes
Markdown
mit
christianbundy/load
markdown
## Code Before: Quickly and easily load projects, regardless of language, framework, religion, sex, or other public/private/protected class. ## Installation ```sh gem install 'load' ``` ## Usage ```sh # Clone recursively into foo $ load https://github.com/christianbundy/foo.git # Clone recursively into foo with shortcut $ load christianbundy/foo # Clone recursively into bar with shortcut $ load christianbundy/foo bar ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am "Add some feature"`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## Instruction: Update readme to reflect usage changes ## Code After: Quickly and easily load projects, regardless of language, framework, religion, sex, or other public/private/protected class. ## Installation ```sh gem install 'load' ``` ## Usage ```sh $ load source/repo [ target ] ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am "Add some feature"`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Quickly and easily load projects, regardless of language, framework, religion, sex, or other public/private/protected class. ## Installation ```sh gem install 'load' ``` ## Usage ```sh + $ load source/repo [ target ] - # Clone recursively into foo - $ load https://github.com/christianbundy/foo.git - - # Clone recursively into foo with shortcut - $ load christianbundy/foo - - # Clone recursively into bar with shortcut - $ load christianbundy/foo bar ``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am "Add some feature"`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
9
0.310345
1
8
16197ed8a7035cd23fb2abb01b702d512b264b5b
us_ignite/templates/mailinglist/sidebar.html
us_ignite/templates/mailinglist/sidebar.html
<!-- newsletter --> <div class="row newsletter newsletter--side"> <form method="post" action="{% url 'mailing_subscribe' %}"> <div class="small-12 columns newsletter__column"> <h4 class="newsletter__heading">SIGN UP TO RECEIVE UPDATES FROM US IGNITE</h4> </div> <div class="small-12 columns newsletter__column"> <div class="row collapse"> <div class="small-12 columns"> <input type="text" placeholder="Enter your email address..."> </div> <div class="small-12 columns"> <button type="submit" class="newsletter__submit button alert postfix">SUBMIT</button>{% csrf_token %} </div> </div> </div> </form> </div> <!-- /newsletter -->
<!-- newsletter --> <div class="row newsletter newsletter--side"> <form method="post" action="{% url 'mailing_subscribe' %}"> <div class="small-12 columns newsletter__column"> <h4 class="newsletter__heading">SIGN UP TO RECEIVE UPDATES FROM US IGNITE</h4> </div> <div class="small-12 columns newsletter__column"> <div class="row collapse"> <div class="small-12 columns"> <input type="text" name="email" placeholder="Enter your email address..."> </div> <div class="small-12 columns"> <button type="submit" class="newsletter__submit button alert postfix">SUBMIT</button>{% csrf_token %} </div> </div> </div> </form> </div> <!-- /newsletter -->
Add name to the mailing list field.
Add name to the mailing list field. https://github.com/madewithbytes/us_ignite/issues/209
HTML
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
html
## Code Before: <!-- newsletter --> <div class="row newsletter newsletter--side"> <form method="post" action="{% url 'mailing_subscribe' %}"> <div class="small-12 columns newsletter__column"> <h4 class="newsletter__heading">SIGN UP TO RECEIVE UPDATES FROM US IGNITE</h4> </div> <div class="small-12 columns newsletter__column"> <div class="row collapse"> <div class="small-12 columns"> <input type="text" placeholder="Enter your email address..."> </div> <div class="small-12 columns"> <button type="submit" class="newsletter__submit button alert postfix">SUBMIT</button>{% csrf_token %} </div> </div> </div> </form> </div> <!-- /newsletter --> ## Instruction: Add name to the mailing list field. https://github.com/madewithbytes/us_ignite/issues/209 ## Code After: <!-- newsletter --> <div class="row newsletter newsletter--side"> <form method="post" action="{% url 'mailing_subscribe' %}"> <div class="small-12 columns newsletter__column"> <h4 class="newsletter__heading">SIGN UP TO RECEIVE UPDATES FROM US IGNITE</h4> </div> <div class="small-12 columns newsletter__column"> <div class="row collapse"> <div class="small-12 columns"> <input type="text" name="email" placeholder="Enter your email address..."> </div> <div class="small-12 columns"> <button type="submit" class="newsletter__submit button alert postfix">SUBMIT</button>{% csrf_token %} </div> </div> </div> </form> </div> <!-- /newsletter -->
<!-- newsletter --> <div class="row newsletter newsletter--side"> <form method="post" action="{% url 'mailing_subscribe' %}"> <div class="small-12 columns newsletter__column"> <h4 class="newsletter__heading">SIGN UP TO RECEIVE UPDATES FROM US IGNITE</h4> </div> <div class="small-12 columns newsletter__column"> <div class="row collapse"> <div class="small-12 columns"> - <input type="text" placeholder="Enter your email address..."> + <input type="text" name="email" placeholder="Enter your email address..."> ? +++++++++++++ </div> <div class="small-12 columns"> <button type="submit" class="newsletter__submit button alert postfix">SUBMIT</button>{% csrf_token %} </div> </div> </div> </form> </div> <!-- /newsletter -->
2
0.1
1
1
08eb4f764c24c1916672ffe84fc5dc9d8379b4bf
pubmed2go/startup.sh
pubmed2go/startup.sh
cd /PubMed2Go/ # If /export/ is mounted, export_user_files file moving all data to /export/ # symlinks will point from the original location to the new path under /export/ # If /export/ is not given, nothing will happen in that step python ./export_user_files.py $PG_DATA_DIR_DEFAULT service postgresql start if [ ! -f /export/.pubmed2go_save ]; then python PubMedParser.py -i /export/import_data/ -d pubmed -p 4 fi touch /export/.pubmed2go_save tail -f /var/log/postgresql/postgresql-9.1-main.log
cd /PubMed2Go/ # If /export/ is mounted, export_user_files file moving all data to /export/ # symlinks will point from the original location to the new path under /export/ # If /export/ is not given, nothing will happen in that step python ./export_user_files.py $PG_DATA_DIR_DEFAULT service postgresql start if [ ! -f /export/.pubmed2go_save ]; then python PubMedParser.py -i /export/import_data/ -d pubmed -p 4 cd full_text_index python RunXapian.py --xapian_database_path /export/ --index --db_psql pubmed --no_search fi touch /export/.pubmed2go_save tail -f /var/log/postgresql/postgresql-9.1-main.log
Create the xapian index on the fly.
Create the xapian index on the fly.
Shell
mit
bgruening/docker-recipes,bgruening/docker-recipes,bgruening/docker-recipes
shell
## Code Before: cd /PubMed2Go/ # If /export/ is mounted, export_user_files file moving all data to /export/ # symlinks will point from the original location to the new path under /export/ # If /export/ is not given, nothing will happen in that step python ./export_user_files.py $PG_DATA_DIR_DEFAULT service postgresql start if [ ! -f /export/.pubmed2go_save ]; then python PubMedParser.py -i /export/import_data/ -d pubmed -p 4 fi touch /export/.pubmed2go_save tail -f /var/log/postgresql/postgresql-9.1-main.log ## Instruction: Create the xapian index on the fly. ## Code After: cd /PubMed2Go/ # If /export/ is mounted, export_user_files file moving all data to /export/ # symlinks will point from the original location to the new path under /export/ # If /export/ is not given, nothing will happen in that step python ./export_user_files.py $PG_DATA_DIR_DEFAULT service postgresql start if [ ! -f /export/.pubmed2go_save ]; then python PubMedParser.py -i /export/import_data/ -d pubmed -p 4 cd full_text_index python RunXapian.py --xapian_database_path /export/ --index --db_psql pubmed --no_search fi touch /export/.pubmed2go_save tail -f /var/log/postgresql/postgresql-9.1-main.log
cd /PubMed2Go/ # If /export/ is mounted, export_user_files file moving all data to /export/ # symlinks will point from the original location to the new path under /export/ # If /export/ is not given, nothing will happen in that step python ./export_user_files.py $PG_DATA_DIR_DEFAULT service postgresql start if [ ! -f /export/.pubmed2go_save ]; then python PubMedParser.py -i /export/import_data/ -d pubmed -p 4 + cd full_text_index + python RunXapian.py --xapian_database_path /export/ --index --db_psql pubmed --no_search fi touch /export/.pubmed2go_save tail -f /var/log/postgresql/postgresql-9.1-main.log
2
0.133333
2
0
e5abff505fdd5e0acf0c274d856b4ab119fb2412
app/controllers/home_controller.rb
app/controllers/home_controller.rb
class HomeController < ApplicationController def index @comments = Comment.latest.limit(10).all @versions = OntologyVersion.accessible_by(current_user).latest. where(state: 'done').limit(10).all @repositories = Repository.accessible_by(current_user).latest.limit(10).all end def show end end
class HomeController < ApplicationController def index @comments = Comment.latest.limit(10) @versions = OntologyVersion.accessible_by(current_user).latest. where(state: 'done').limit(10) @repositories = Repository.accessible_by(current_user).latest.limit(10) end def show end end
Delete unnecessary all method call.
Delete unnecessary all method call.
Ruby
agpl-3.0
ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub
ruby
## Code Before: class HomeController < ApplicationController def index @comments = Comment.latest.limit(10).all @versions = OntologyVersion.accessible_by(current_user).latest. where(state: 'done').limit(10).all @repositories = Repository.accessible_by(current_user).latest.limit(10).all end def show end end ## Instruction: Delete unnecessary all method call. ## Code After: class HomeController < ApplicationController def index @comments = Comment.latest.limit(10) @versions = OntologyVersion.accessible_by(current_user).latest. where(state: 'done').limit(10) @repositories = Repository.accessible_by(current_user).latest.limit(10) end def show end end
class HomeController < ApplicationController def index - @comments = Comment.latest.limit(10).all ? ---- + @comments = Comment.latest.limit(10) @versions = OntologyVersion.accessible_by(current_user).latest. - where(state: 'done').limit(10).all ? ---- + where(state: 'done').limit(10) - @repositories = Repository.accessible_by(current_user).latest.limit(10).all ? ---- + @repositories = Repository.accessible_by(current_user).latest.limit(10) end def show end end
6
0.428571
3
3
58f5c04a5ae204ce8e27cad3c798c64ad4a7d4dd
assets/css/racer.css
assets/css/racer.css
border: 1px solid black; height: 150px; background-image: url("../img/nyanBackground.jpg"); background-size: 100%; /*background-repeat: no-repeat;*/ } .player { height: 50px; width: 50px; /* background-color: blue;*/ background-repeat: no-repeat; background-size: 100%; /*border: 1px solid black;*/ margin: 10px 0 10px 10px; }
border: 2px solid black; height: 150px; background-image: url("../img/nyanBackground.jpg"); background-size: 100%; /*background-repeat: no-repeat;*/ } /* foundation-compliant css to align the div vertically. found on */ .valign-middle { display: table; > .columns { display: table-cell; vertical-align: middle; } > .columns, > [class*="column"] + [class*="column"]:last-child { float: none; } } .player { height: 75px; width: 75px; /* background-color: blue;*/ background-repeat: no-repeat; background-size: 100%; /*border: 1px solid black;*/ margin: 10px 0 10px 10px; }
Add styling to center race track. Thicken border
Add styling to center race track. Thicken border
CSS
mit
SputterPuttRedux/basic-javascript-racer,SputterPuttRedux/basic-javascript-racer
css
## Code Before: border: 1px solid black; height: 150px; background-image: url("../img/nyanBackground.jpg"); background-size: 100%; /*background-repeat: no-repeat;*/ } .player { height: 50px; width: 50px; /* background-color: blue;*/ background-repeat: no-repeat; background-size: 100%; /*border: 1px solid black;*/ margin: 10px 0 10px 10px; } ## Instruction: Add styling to center race track. Thicken border ## Code After: border: 2px solid black; height: 150px; background-image: url("../img/nyanBackground.jpg"); background-size: 100%; /*background-repeat: no-repeat;*/ } /* foundation-compliant css to align the div vertically. found on */ .valign-middle { display: table; > .columns { display: table-cell; vertical-align: middle; } > .columns, > [class*="column"] + [class*="column"]:last-child { float: none; } } .player { height: 75px; width: 75px; /* background-color: blue;*/ background-repeat: no-repeat; background-size: 100%; /*border: 1px solid black;*/ margin: 10px 0 10px 10px; }
- border: 1px solid black; ? ^ + border: 2px solid black; ? ^ height: 150px; background-image: url("../img/nyanBackground.jpg"); background-size: 100%; /*background-repeat: no-repeat;*/ } + /* foundation-compliant css to align the div vertically. found on */ + + .valign-middle { + display: table; + + > .columns { + display: table-cell; + vertical-align: middle; + } + + > .columns, > [class*="column"] + [class*="column"]:last-child { + float: none; + } + } + .player { - height: 50px; ? - + height: 75px; ? + - width: 50px; ? - + width: 75px; ? + /* background-color: blue;*/ background-repeat: no-repeat; background-size: 100%; /*border: 1px solid black;*/ margin: 10px 0 10px 10px; } +
22
1.375
19
3
f26c76e5f4f75f88124e7b09ad89afbe94e04b34
src/test/config/unittest/compress-streams.ini
src/test/config/unittest/compress-streams.ini
;; ; I/O Compression streams tests ; ; $Id$ [this] description="I/O Compression streams tests" [zlib.deflate] class="net.xp_framework.unittest.io.streams.DeflatingOutputStreamTest" [zlib.inflate] class="net.xp_framework.unittest.io.streams.InflatingInputStreamTest" [gz.compress] class="net.xp_framework.unittest.io.streams.GzCompressingOutputStreamTest" [gz.decompress] class="net.xp_framework.unittest.io.streams.GzDecompressingInputStreamTest" [bz2.compress] class="net.xp_framework.unittest.io.streams.Bz2CompressingOutputStreamTest" [bz2.decompress] class="net.xp_framework.unittest.io.streams.Bz2DecompressingInputStreamTest"
;; ; I/O Compression streams tests ; ; $Id$ [this] description="I/O Compression streams tests" ; [zlib.deflate] ; class="net.xp_framework.unittest.io.streams.DeflatingOutputStreamTest" ; [zlib.inflate] ; class="net.xp_framework.unittest.io.streams.InflatingInputStreamTest" ; [gz.compress] ; class="net.xp_framework.unittest.io.streams.GzCompressingOutputStreamTest" ; [gz.decompress] ; class="net.xp_framework.unittest.io.streams.GzDecompressingInputStreamTest" ; [bz2.compress] ; class="net.xp_framework.unittest.io.streams.Bz2CompressingOutputStreamTest" ; [bz2.decompress] ; class="net.xp_framework.unittest.io.streams.Bz2DecompressingInputStreamTest"
Comment out tests depending on (to-be-extracted) security package TODO: Extract these, too
Comment out tests depending on (to-be-extracted) security package TODO: Extract these, too
INI
bsd-3-clause
johannes85/core
ini
## Code Before: ;; ; I/O Compression streams tests ; ; $Id$ [this] description="I/O Compression streams tests" [zlib.deflate] class="net.xp_framework.unittest.io.streams.DeflatingOutputStreamTest" [zlib.inflate] class="net.xp_framework.unittest.io.streams.InflatingInputStreamTest" [gz.compress] class="net.xp_framework.unittest.io.streams.GzCompressingOutputStreamTest" [gz.decompress] class="net.xp_framework.unittest.io.streams.GzDecompressingInputStreamTest" [bz2.compress] class="net.xp_framework.unittest.io.streams.Bz2CompressingOutputStreamTest" [bz2.decompress] class="net.xp_framework.unittest.io.streams.Bz2DecompressingInputStreamTest" ## Instruction: Comment out tests depending on (to-be-extracted) security package TODO: Extract these, too ## Code After: ;; ; I/O Compression streams tests ; ; $Id$ [this] description="I/O Compression streams tests" ; [zlib.deflate] ; class="net.xp_framework.unittest.io.streams.DeflatingOutputStreamTest" ; [zlib.inflate] ; class="net.xp_framework.unittest.io.streams.InflatingInputStreamTest" ; [gz.compress] ; class="net.xp_framework.unittest.io.streams.GzCompressingOutputStreamTest" ; [gz.decompress] ; class="net.xp_framework.unittest.io.streams.GzDecompressingInputStreamTest" ; [bz2.compress] ; class="net.xp_framework.unittest.io.streams.Bz2CompressingOutputStreamTest" ; [bz2.decompress] ; class="net.xp_framework.unittest.io.streams.Bz2DecompressingInputStreamTest"
;; ; I/O Compression streams tests ; ; $Id$ [this] description="I/O Compression streams tests" - [zlib.deflate] + ; [zlib.deflate] ? ++ - class="net.xp_framework.unittest.io.streams.DeflatingOutputStreamTest" + ; class="net.xp_framework.unittest.io.streams.DeflatingOutputStreamTest" ? ++ - [zlib.inflate] + ; [zlib.inflate] ? ++ - class="net.xp_framework.unittest.io.streams.InflatingInputStreamTest" + ; class="net.xp_framework.unittest.io.streams.InflatingInputStreamTest" ? ++ - [gz.compress] + ; [gz.compress] ? ++ - class="net.xp_framework.unittest.io.streams.GzCompressingOutputStreamTest" + ; class="net.xp_framework.unittest.io.streams.GzCompressingOutputStreamTest" ? ++ - [gz.decompress] + ; [gz.decompress] ? ++ - class="net.xp_framework.unittest.io.streams.GzDecompressingInputStreamTest" + ; class="net.xp_framework.unittest.io.streams.GzDecompressingInputStreamTest" ? ++ - [bz2.compress] + ; [bz2.compress] ? ++ - class="net.xp_framework.unittest.io.streams.Bz2CompressingOutputStreamTest" + ; class="net.xp_framework.unittest.io.streams.Bz2CompressingOutputStreamTest" ? ++ - [bz2.decompress] + ; [bz2.decompress] ? ++ - class="net.xp_framework.unittest.io.streams.Bz2DecompressingInputStreamTest" + ; class="net.xp_framework.unittest.io.streams.Bz2DecompressingInputStreamTest" ? ++
24
0.96
12
12
e941ee80cdf1f707e34b6c7db3c627b111eae514
src/App.css
src/App.css
.App { text-align: center; width: 100%; } ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; height: 10%; list-style-type: none; margin: 0; padding: 0; } .navbar-left li { float: left; } .navbar-right li { float: right; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .sidebar-wrapper { height: 100%; } .sidebar { float: left; width: 30%; height: 90vh; background: #eee } .household-main { float: left; width: 70%; height: 90vh; background: lightgrey; color: black; }
.App { width: 100%; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .sidebar-wrapper { height: 100%; } .sidebar { float: left; width: 30%; height: 90vh; background: #eee } .household-main { float: left; width: 70%; height: 90vh; background: lightgrey; color: black; }
Remove previous navbar styles to use semantic ui
Remove previous navbar styles to use semantic ui
CSS
mit
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
css
## Code Before: .App { text-align: center; width: 100%; } ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; height: 10%; list-style-type: none; margin: 0; padding: 0; } .navbar-left li { float: left; } .navbar-right li { float: right; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .sidebar-wrapper { height: 100%; } .sidebar { float: left; width: 30%; height: 90vh; background: #eee } .household-main { float: left; width: 70%; height: 90vh; background: lightgrey; color: black; } ## Instruction: Remove previous navbar styles to use semantic ui ## Code After: .App { width: 100%; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .sidebar-wrapper { height: 100%; } .sidebar { float: left; width: 30%; height: 90vh; background: #eee } .household-main { float: left; width: 70%; height: 90vh; background: lightgrey; color: black; }
.App { - text-align: center; width: 100%; - } - - ul { - list-style-type: none; - margin: 0; - padding: 0; - overflow: hidden; - background-color: #333; - height: 10%; - list-style-type: none; - margin: 0; - padding: 0; - } - - .navbar-left li { - float: left; - } - - .navbar-right li { - float: right; - } - - li a { - display: block; - color: white; - text-align: center; - padding: 14px 16px; - text-decoration: none; - } - - li a { - display: block; - color: white; - text-align: center; - padding: 14px 16px; - text-decoration: none; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .sidebar-wrapper { height: 100%; } .sidebar { float: left; width: 30%; height: 90vh; background: #eee } .household-main { float: left; width: 70%; height: 90vh; background: lightgrey; color: black; }
37
0.578125
0
37
b65ae291871f2a437693d2ed678c63694898beba
README.md
README.md
[![Slack Network](http://slack.ngofficeuifabric.com/badge.svg)](http://slack.ngofficeuifabric.com/) [![MIT license](https://img.shields.io/npm/l/express.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/LICENSE) [![Build Status](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric.svg?branch=master)](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric) [![devDependency Status](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric/dev-status.svg)](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric#info=devDependencies) > NOTE: For now, this was setup to just create a placeholder for the name in bower & NPM... it will be udpated as the library progresses. Please watch the main repo, **[ng-officeuifabric](https://github.com/ngOfficeUIFabric/ng-officeuifabric)** for updates on that progress until then.
[![Slack Network](http://slack.ngofficeuifabric.com/badge.svg)](http://slack.ngofficeuifabric.com/) [![MIT license](https://img.shields.io/npm/l/express.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/LICENSE) [![Build Status](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric.svg?branch=master)](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric) [![devDependency Status](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric/dev-status.svg)](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric#info=devDependencies) [![bower version](https://img.shields.io/bower/v/ng-office-ui-fabric.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric) [![npm version](https://badge.fury.io/js/ng-office-ui-fabric.svg)](http://badge.fury.io/js/ng-office-ui-fabric) [![Downloads](http://img.shields.io/npm/dm/ng-office-ui-fabric.svg)](https://npmjs.org/package/ng-office-ui-fabric) > NOTE: For now, this was setup to just create a placeholder for the name in bower & NPM... it will be udpated as the library progresses. Please watch the main repo, **[ng-officeuifabric](https://github.com/ngOfficeUIFabric/ng-officeuifabric)** for updates on that progress until then.
Add social buttons on repo home
Add social buttons on repo home
Markdown
mit
ngOfficeUIFabric/package-ngofficeuifabric
markdown
## Code Before: [![Slack Network](http://slack.ngofficeuifabric.com/badge.svg)](http://slack.ngofficeuifabric.com/) [![MIT license](https://img.shields.io/npm/l/express.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/LICENSE) [![Build Status](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric.svg?branch=master)](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric) [![devDependency Status](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric/dev-status.svg)](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric#info=devDependencies) > NOTE: For now, this was setup to just create a placeholder for the name in bower & NPM... it will be udpated as the library progresses. Please watch the main repo, **[ng-officeuifabric](https://github.com/ngOfficeUIFabric/ng-officeuifabric)** for updates on that progress until then. ## Instruction: Add social buttons on repo home ## Code After: [![Slack Network](http://slack.ngofficeuifabric.com/badge.svg)](http://slack.ngofficeuifabric.com/) [![MIT license](https://img.shields.io/npm/l/express.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/LICENSE) [![Build Status](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric.svg?branch=master)](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric) [![devDependency Status](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric/dev-status.svg)](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric#info=devDependencies) [![bower version](https://img.shields.io/bower/v/ng-office-ui-fabric.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric) [![npm version](https://badge.fury.io/js/ng-office-ui-fabric.svg)](http://badge.fury.io/js/ng-office-ui-fabric) [![Downloads](http://img.shields.io/npm/dm/ng-office-ui-fabric.svg)](https://npmjs.org/package/ng-office-ui-fabric) > NOTE: For now, this was setup to just create a placeholder for the name in bower & NPM... it will be udpated as the library progresses. Please watch the main repo, **[ng-officeuifabric](https://github.com/ngOfficeUIFabric/ng-officeuifabric)** for updates on that progress until then.
[![Slack Network](http://slack.ngofficeuifabric.com/badge.svg)](http://slack.ngofficeuifabric.com/) [![MIT license](https://img.shields.io/npm/l/express.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/LICENSE) [![Build Status](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric.svg?branch=master)](https://travis-ci.org/ngOfficeUIFabric/ng-officeuifabric) [![devDependency Status](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric/dev-status.svg)](https://david-dm.org/ngOfficeUIFabric/ng-officeuifabric#info=devDependencies) + [![bower version](https://img.shields.io/bower/v/ng-office-ui-fabric.svg)](https://github.com/ngOfficeUIFabric/ng-officeuifabric) + [![npm version](https://badge.fury.io/js/ng-office-ui-fabric.svg)](http://badge.fury.io/js/ng-office-ui-fabric) + [![Downloads](http://img.shields.io/npm/dm/ng-office-ui-fabric.svg)](https://npmjs.org/package/ng-office-ui-fabric) + > NOTE: For now, this was setup to just create a placeholder for the name in bower & NPM... it will be udpated as the library progresses. Please watch the main repo, **[ng-officeuifabric](https://github.com/ngOfficeUIFabric/ng-officeuifabric)** for updates on that progress until then.
4
0.571429
4
0
f98b7e4f147b7bb709b938447da8b2814a90e942
requirements/common.txt
requirements/common.txt
Django==1.8.4 defusedxml==0.4.1 dj-database-url==0.3.0 dj-static==0.0.6 django-allauth==0.23.0 django-bootstrap-form==3.2 django-cors-headers==1.1.0 django-custom-user==0.5 django-filter==0.11.0 django-floppyforms==1.5.2 django-settings-context-processor==0.2 django-timezone-field==1.2 -e git://github.com/jessamynsmith/django-enumfield.git@9048ede96ab9af597da6dd70ee9c36f757b99bb4#egg=django_enumfield-origin_allow_blank_choice djangorestframework==3.1.1 gunicorn==19.3.0 mimeparse==0.1.3 newrelic==2.54.0.41 oauthlib==1.0.3 psycopg2==2.6.1 python-dateutil==2.4.2 python-mimeparse==0.1.4 python-openid==2.2.5 python3-openid==3.0.7 pytz==2015.6 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 static3==0.6.1
Django==1.8.4 defusedxml==0.4.1 dj-database-url==0.3.0 dj-static==0.0.6 django-allauth==0.23.0 django-bootstrap-form==3.2 django-cors-headers==1.1.0 django-custom-user==0.5 django-filter==0.11.0 django-floppyforms==1.5.2 django-settings-context-processor==0.2 django-timezone-field==1.2 django-enumfield==1.2.1 djangorestframework==3.1.1 gunicorn==19.3.0 mimeparse==0.1.3 newrelic==2.54.0.41 oauthlib==1.0.3 psycopg2==2.6.1 python-dateutil==2.4.2 python-mimeparse==0.1.4 python-openid==2.2.5 python3-openid==3.0.7 pytz==2015.6 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 static3==0.6.1
Switch to standard version of django-enumfield
Switch to standard version of django-enumfield
Text
mit
jessamynsmith/eggtimer-server,jessamynsmith/eggtimer-server,jessamynsmith/eggtimer-server,jessamynsmith/eggtimer-server
text
## Code Before: Django==1.8.4 defusedxml==0.4.1 dj-database-url==0.3.0 dj-static==0.0.6 django-allauth==0.23.0 django-bootstrap-form==3.2 django-cors-headers==1.1.0 django-custom-user==0.5 django-filter==0.11.0 django-floppyforms==1.5.2 django-settings-context-processor==0.2 django-timezone-field==1.2 -e git://github.com/jessamynsmith/django-enumfield.git@9048ede96ab9af597da6dd70ee9c36f757b99bb4#egg=django_enumfield-origin_allow_blank_choice djangorestframework==3.1.1 gunicorn==19.3.0 mimeparse==0.1.3 newrelic==2.54.0.41 oauthlib==1.0.3 psycopg2==2.6.1 python-dateutil==2.4.2 python-mimeparse==0.1.4 python-openid==2.2.5 python3-openid==3.0.7 pytz==2015.6 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 static3==0.6.1 ## Instruction: Switch to standard version of django-enumfield ## Code After: Django==1.8.4 defusedxml==0.4.1 dj-database-url==0.3.0 dj-static==0.0.6 django-allauth==0.23.0 django-bootstrap-form==3.2 django-cors-headers==1.1.0 django-custom-user==0.5 django-filter==0.11.0 django-floppyforms==1.5.2 django-settings-context-processor==0.2 django-timezone-field==1.2 django-enumfield==1.2.1 djangorestframework==3.1.1 gunicorn==19.3.0 mimeparse==0.1.3 newrelic==2.54.0.41 oauthlib==1.0.3 psycopg2==2.6.1 python-dateutil==2.4.2 python-mimeparse==0.1.4 python-openid==2.2.5 python3-openid==3.0.7 pytz==2015.6 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 static3==0.6.1
Django==1.8.4 defusedxml==0.4.1 dj-database-url==0.3.0 dj-static==0.0.6 django-allauth==0.23.0 django-bootstrap-form==3.2 django-cors-headers==1.1.0 django-custom-user==0.5 django-filter==0.11.0 django-floppyforms==1.5.2 django-settings-context-processor==0.2 django-timezone-field==1.2 - -e git://github.com/jessamynsmith/django-enumfield.git@9048ede96ab9af597da6dd70ee9c36f757b99bb4#egg=django_enumfield-origin_allow_blank_choice + django-enumfield==1.2.1 djangorestframework==3.1.1 gunicorn==19.3.0 mimeparse==0.1.3 newrelic==2.54.0.41 oauthlib==1.0.3 psycopg2==2.6.1 python-dateutil==2.4.2 python-mimeparse==0.1.4 python-openid==2.2.5 python3-openid==3.0.7 pytz==2015.6 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 static3==0.6.1
2
0.071429
1
1
ad88b1af48f631fe7238c073c6697f46f20175c9
app/views/questions/show.erb
app/views/questions/show.erb
<div> <h2><%= @question.title %></h2><br> by: <%= @question.user.username %><br> posted: <%= @question.created_at %><br> <div> <p> <%= @question.body %> </p><br> <a href="/questions/<%= @question.id %>/comments">Add a comment</a> </div> <br><br> <p><a href="/answers/new">Add an answer</a> <form action="/questions/<%= @question.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= @score %></span> </form> </p> <br><br> <h3>All answers:</h3> <% @answers.each do |answer| %> <h4><%= answer.body %></h4><br> posted: <%= answer.created_at %><br> by: <%= answer.user.username %><br><br> <%= answer.body %><br> <% end %> </div>
<div> <h2><%= @question.title %></h2><br> by: <%= @question.user.username %><br> posted: <%= @question.created_at %><br> <div> <p> <%= @question.body %> </p><br> <a href="/questions/<%= @question.id %>/comments">Add a comment</a> </div> <br><br> <p><a href="/answers/new">Add an answer</a> <form action="/questions/<%= @question.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= @score %></span> </form> </p> <br><br> <h3>All answers:</h3> <% @answers.each do |answer| %> <h4><%= answer.body %></h4><br> posted: <%= answer.created_at %><br> by: <%= answer.user.username %><br><br> <%= answer.body %><br> <a href="/answers/<%= answer.id %>/comments">Add a comment</a> <form action="/answers/<%= answer.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= answer.votes.reduce(0) { |score, vote| score += vote.value } %></span> </form> <% end %> </div>
Complete voting feature for answers
Complete voting feature for answers
HTML+ERB
mit
nyc-salamanders-2016/eatoverflow,nyc-salamanders-2016/eatoverflow,nyc-salamanders-2016/eatoverflow
html+erb
## Code Before: <div> <h2><%= @question.title %></h2><br> by: <%= @question.user.username %><br> posted: <%= @question.created_at %><br> <div> <p> <%= @question.body %> </p><br> <a href="/questions/<%= @question.id %>/comments">Add a comment</a> </div> <br><br> <p><a href="/answers/new">Add an answer</a> <form action="/questions/<%= @question.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= @score %></span> </form> </p> <br><br> <h3>All answers:</h3> <% @answers.each do |answer| %> <h4><%= answer.body %></h4><br> posted: <%= answer.created_at %><br> by: <%= answer.user.username %><br><br> <%= answer.body %><br> <% end %> </div> ## Instruction: Complete voting feature for answers ## Code After: <div> <h2><%= @question.title %></h2><br> by: <%= @question.user.username %><br> posted: <%= @question.created_at %><br> <div> <p> <%= @question.body %> </p><br> <a href="/questions/<%= @question.id %>/comments">Add a comment</a> </div> <br><br> <p><a href="/answers/new">Add an answer</a> <form action="/questions/<%= @question.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= @score %></span> </form> </p> <br><br> <h3>All answers:</h3> <% @answers.each do |answer| %> <h4><%= answer.body %></h4><br> posted: <%= answer.created_at %><br> by: <%= answer.user.username %><br><br> <%= answer.body %><br> <a href="/answers/<%= answer.id %>/comments">Add a comment</a> <form action="/answers/<%= answer.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= answer.votes.reduce(0) { |score, vote| score += vote.value } %></span> </form> <% end %> </div>
<div> <h2><%= @question.title %></h2><br> by: <%= @question.user.username %><br> posted: <%= @question.created_at %><br> <div> <p> <%= @question.body %> </p><br> <a href="/questions/<%= @question.id %>/comments">Add a comment</a> </div> <br><br> <p><a href="/answers/new">Add an answer</a> <form action="/questions/<%= @question.id %>/vote" method="post"> <input type="submit" value="upvote" name= "vote"> <input type="submit" value="downvote" name="vote"> <span>score: <%= @score %></span> </form> </p> <br><br> <h3>All answers:</h3> <% @answers.each do |answer| %> <h4><%= answer.body %></h4><br> posted: <%= answer.created_at %><br> by: <%= answer.user.username %><br><br> <%= answer.body %><br> + <a href="/answers/<%= answer.id %>/comments">Add a comment</a> + <form action="/answers/<%= answer.id %>/vote" method="post"> + <input type="submit" value="upvote" name= "vote"> + <input type="submit" value="downvote" name="vote"> + <span>score: <%= answer.votes.reduce(0) { |score, vote| score += vote.value } %></span> + </form> <% end %> </div>
6
0.214286
6
0
37e4d0dfd92855c294972f32df64e664d88e3817
.travis.yml
.travis.yml
language: elixir elixir: - 1.5.0 otp_release: - 20 addons: postgresql: 9.5 cache: directories: - _build - deps services: - redis-server install: - mix local.hex --force - mix local.rebar --force - mix deps.get env: - MIX_ENV=test before_script: - bash .travis/postgre_setup.sh script: - mix ecto.create - mix ecto.migrate - mix coveralls.travis
language: elixir elixir: - 1.5.0 otp_release: - 19.0 addons: postgresql: 9.5 cache: directories: - _build - deps services: - redis-server install: - mix local.hex --force - mix local.rebar --force - mix deps.get env: - MIX_ENV=test before_script: - kerl list installations - bash .travis/postgre_setup.sh script: - mix ecto.create - mix ecto.migrate - mix coveralls.travis
Add otp list command in before script for debugging
Add otp list command in before script for debugging
YAML
mit
indydevs/parma,indydevs/parma,indydevs/parma
yaml
## Code Before: language: elixir elixir: - 1.5.0 otp_release: - 20 addons: postgresql: 9.5 cache: directories: - _build - deps services: - redis-server install: - mix local.hex --force - mix local.rebar --force - mix deps.get env: - MIX_ENV=test before_script: - bash .travis/postgre_setup.sh script: - mix ecto.create - mix ecto.migrate - mix coveralls.travis ## Instruction: Add otp list command in before script for debugging ## Code After: language: elixir elixir: - 1.5.0 otp_release: - 19.0 addons: postgresql: 9.5 cache: directories: - _build - deps services: - redis-server install: - mix local.hex --force - mix local.rebar --force - mix deps.get env: - MIX_ENV=test before_script: - kerl list installations - bash .travis/postgre_setup.sh script: - mix ecto.create - mix ecto.migrate - mix coveralls.travis
language: elixir elixir: - 1.5.0 otp_release: - - 20 + - 19.0 addons: postgresql: 9.5 cache: directories: - _build - deps services: - redis-server install: - mix local.hex --force - mix local.rebar --force - mix deps.get env: - MIX_ENV=test before_script: + - kerl list installations - bash .travis/postgre_setup.sh script: - mix ecto.create - mix ecto.migrate - mix coveralls.travis
3
0.12
2
1
3162af31c5f5da30c7cd4d10aa4598e4d8d4e37f
README.md
README.md
Bitcoin Terminal is a Ruby application for monitoring real-time Bitcoin quotes on various exchanges. ![alt text](https://github.com/penberg/btct/raw/master/htdocs/Bitcoin_Terminal.png "Bitcoin Terminal") ## Features * Real-time quotes: * BTC-E * Bitstamp * CampBX * Mt.Gox * The Rock ## Prerequisites Install Gem dependencies: ``` $ bundle install ``` ## Usage Start the Bitcoin terminal: ``` $ ./bin/btct ``` ## License Copyright © 2013 Pekka Enberg Distributed under the MIT license.
Bitcoin Terminal is a Ruby application for monitoring real-time Bitcoin quotes on various exchanges. ![alt text](https://github.com/penberg/btct/raw/master/htdocs/Bitcoin_Terminal.png "Bitcoin Terminal") ## Features * Real-time quotes: * BTC-E * Bitstamp * CampBX * Mt.Gox * The Rock ## Installation Install the gem: ``` $ gem install btct ``` ## Usage Start the Bitcoin terminal: ``` $ btct ``` ## License Copyright © 2013 Pekka Enberg Distributed under the MIT license.
Update installation and usage instructions
Update installation and usage instructions Signed-off-by: Pekka Enberg <add4fcd06328a394f0ad91feda7ee057316dc5ed@iki.fi>
Markdown
mit
penberg/btct
markdown
## Code Before: Bitcoin Terminal is a Ruby application for monitoring real-time Bitcoin quotes on various exchanges. ![alt text](https://github.com/penberg/btct/raw/master/htdocs/Bitcoin_Terminal.png "Bitcoin Terminal") ## Features * Real-time quotes: * BTC-E * Bitstamp * CampBX * Mt.Gox * The Rock ## Prerequisites Install Gem dependencies: ``` $ bundle install ``` ## Usage Start the Bitcoin terminal: ``` $ ./bin/btct ``` ## License Copyright © 2013 Pekka Enberg Distributed under the MIT license. ## Instruction: Update installation and usage instructions Signed-off-by: Pekka Enberg <add4fcd06328a394f0ad91feda7ee057316dc5ed@iki.fi> ## Code After: Bitcoin Terminal is a Ruby application for monitoring real-time Bitcoin quotes on various exchanges. ![alt text](https://github.com/penberg/btct/raw/master/htdocs/Bitcoin_Terminal.png "Bitcoin Terminal") ## Features * Real-time quotes: * BTC-E * Bitstamp * CampBX * Mt.Gox * The Rock ## Installation Install the gem: ``` $ gem install btct ``` ## Usage Start the Bitcoin terminal: ``` $ btct ``` ## License Copyright © 2013 Pekka Enberg Distributed under the MIT license.
Bitcoin Terminal is a Ruby application for monitoring real-time Bitcoin quotes on various exchanges. ![alt text](https://github.com/penberg/btct/raw/master/htdocs/Bitcoin_Terminal.png "Bitcoin Terminal") ## Features * Real-time quotes: * BTC-E * Bitstamp * CampBX * Mt.Gox * The Rock - ## Prerequisites + ## Installation - Install Gem dependencies: + Install the gem: ``` - $ bundle install + $ gem install btct ``` ## Usage Start the Bitcoin terminal: ``` - $ ./bin/btct + $ btct ``` ## License Copyright © 2013 Pekka Enberg Distributed under the MIT license.
8
0.222222
4
4
6c967a2be59086793dcbb14ad6f67a62152beae9
app/models/user.rb
app/models/user.rb
class User < ActiveRecord::Base has_many :students, order: :first_name # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :twitter] # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name # attr_accessible :title, :body def self.find_or_create_from_oauth(auth, signed_in_resource=nil) user = User.where(:provider => auth.provider, :uid => auth.uid).first if user.blank? user = User.create(name:auth.extra.raw_info.name, provider:auth.provider, uid:auth.uid, email:auth.info.email, password:Devise.friendly_token[0,20] ) end puts "********************* user id = #{user.id}" return user end end
class User < ActiveRecord::Base has_many :students, order: :first_name # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :twitter] # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name # attr_accessible :title, :body def self.find_or_create_from_oauth(auth, signed_in_resource=nil) user = User.where(:provider => auth.provider, :uid => auth.uid).first if user.blank? puts "******************** user not found with omniauth hash - creating new user with the following info" puts "******************** name = #{auth.extra.raw_info.name}" puts "******************** provider = #{auth.provider}" puts "******************** email = #{auth.info.email}" user = User.create(name: auth.extra.raw_info.name, provider: auth.provider, uid: auth.uid, email: auth.info.email, password: Devise.friendly_token[0,20] ) end puts "********************* user id = #{user.id}" return user end end
Add more logging to find_or_create_from_oauth
Add more logging to find_or_create_from_oauth
Ruby
mit
joelmahoney/discoverbps,joelmahoney/discoverbps,joelmahoney/discoverbps,joelmahoney/discoverbps,joelmahoney/discoverbps,joelmahoney/discoverbps,joelmahoney/discoverbps,joelmahoney/discoverbps
ruby
## Code Before: class User < ActiveRecord::Base has_many :students, order: :first_name # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :twitter] # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name # attr_accessible :title, :body def self.find_or_create_from_oauth(auth, signed_in_resource=nil) user = User.where(:provider => auth.provider, :uid => auth.uid).first if user.blank? user = User.create(name:auth.extra.raw_info.name, provider:auth.provider, uid:auth.uid, email:auth.info.email, password:Devise.friendly_token[0,20] ) end puts "********************* user id = #{user.id}" return user end end ## Instruction: Add more logging to find_or_create_from_oauth ## Code After: class User < ActiveRecord::Base has_many :students, order: :first_name # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :twitter] # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name # attr_accessible :title, :body def self.find_or_create_from_oauth(auth, signed_in_resource=nil) user = User.where(:provider => auth.provider, :uid => auth.uid).first if user.blank? puts "******************** user not found with omniauth hash - creating new user with the following info" puts "******************** name = #{auth.extra.raw_info.name}" puts "******************** provider = #{auth.provider}" puts "******************** email = #{auth.info.email}" user = User.create(name: auth.extra.raw_info.name, provider: auth.provider, uid: auth.uid, email: auth.info.email, password: Devise.friendly_token[0,20] ) end puts "********************* user id = #{user.id}" return user end end
class User < ActiveRecord::Base has_many :students, order: :first_name # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :twitter] # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name # attr_accessible :title, :body def self.find_or_create_from_oauth(auth, signed_in_resource=nil) user = User.where(:provider => auth.provider, :uid => auth.uid).first if user.blank? + puts "******************** user not found with omniauth hash - creating new user with the following info" + puts "******************** name = #{auth.extra.raw_info.name}" + puts "******************** provider = #{auth.provider}" + puts "******************** email = #{auth.info.email}" - user = User.create(name:auth.extra.raw_info.name, + user = User.create(name: auth.extra.raw_info.name, ? + - provider:auth.provider, + provider: auth.provider, ? + - uid:auth.uid, + uid: auth.uid, ? + - email:auth.info.email, + email: auth.info.email, ? + - password:Devise.friendly_token[0,20] + password: Devise.friendly_token[0,20] ? + ) end puts "********************* user id = #{user.id}" return user end end
14
0.538462
9
5
1004cc88032e816116bd46f2eb66e4b89f3f766f
tests/test_web_caller.py
tests/test_web_caller.py
from unittest import TestCase from mock import NonCallableMock, patch from modules.web_caller import get_google, GOOGLE_URL class TestWebCaller(TestCase): """ Tests for the `web_caller` module. """ @patch('modules.web_caller.requests.get') def test_get_google(self, get): """ Calling `get_google` works as expected. """ # Create a mock response mock_response = NonCallableMock( status_code=200, ) # Assign the mock response as the requests.get return value get.return_value = mock_response # Call the function response = get_google() # Check that requests.get was called with the expected URL get.assert_called_once_with(GOOGLE_URL) # Check that the mock response is returned self.assertIs(mock_response, response) # Check that the mocked response.status_code is as expected self.assertEqual(200, response.status_code)
from unittest import TestCase from requests.exceptions import ConnectionError from mock import NonCallableMock, patch from modules.web_caller import get_google, GOOGLE_URL MOCK_GOOGLE_URL = 'http://not-going-to-work!!!' class TestWebCaller(TestCase): """ Tests for the `web_caller` module. """ @patch('modules.web_caller.requests.get') def test_get_google(self, get): """ Calling `get_google` works as expected. """ # Create a mock response mock_response = NonCallableMock( status_code=200, ) # Assign the mock response as the requests.get return value get.return_value = mock_response # Call the function response = get_google() # Check that requests.get was called with the expected URL get.assert_called_once_with(GOOGLE_URL) # Check that the mock response is returned self.assertIs(mock_response, response) # Check that the mocked response.status_code is as expected self.assertEqual(200, response.status_code) @patch('modules.web_caller.GOOGLE_URL', MOCK_GOOGLE_URL) def test_get_google_with_exception(self): """ Call the `get_google` function while using `patch` to create an unreachable URL. Assert that the error happened and capture it using assertRaises. """ # Call the function via assertRaises and confirm the exception is # raised by making the call self.assertRaises(ConnectionError, get_google) @patch('modules.web_caller.GOOGLE_URL', MOCK_GOOGLE_URL) def test_get_google_with_exception_context_manager(self): """ Call the `get_google` function while using `patch` to create an unreachable URL. Assert that the error happened and capture it using the assertRaises context manager. """ # Establish an assertRaises context manager with self.assertRaises(ConnectionError): # Call the function get_google()
Add test examples to assert against exceptions
Add test examples to assert against exceptions
Python
mit
tkh/test-examples,tkh/test-examples
python
## Code Before: from unittest import TestCase from mock import NonCallableMock, patch from modules.web_caller import get_google, GOOGLE_URL class TestWebCaller(TestCase): """ Tests for the `web_caller` module. """ @patch('modules.web_caller.requests.get') def test_get_google(self, get): """ Calling `get_google` works as expected. """ # Create a mock response mock_response = NonCallableMock( status_code=200, ) # Assign the mock response as the requests.get return value get.return_value = mock_response # Call the function response = get_google() # Check that requests.get was called with the expected URL get.assert_called_once_with(GOOGLE_URL) # Check that the mock response is returned self.assertIs(mock_response, response) # Check that the mocked response.status_code is as expected self.assertEqual(200, response.status_code) ## Instruction: Add test examples to assert against exceptions ## Code After: from unittest import TestCase from requests.exceptions import ConnectionError from mock import NonCallableMock, patch from modules.web_caller import get_google, GOOGLE_URL MOCK_GOOGLE_URL = 'http://not-going-to-work!!!' class TestWebCaller(TestCase): """ Tests for the `web_caller` module. """ @patch('modules.web_caller.requests.get') def test_get_google(self, get): """ Calling `get_google` works as expected. """ # Create a mock response mock_response = NonCallableMock( status_code=200, ) # Assign the mock response as the requests.get return value get.return_value = mock_response # Call the function response = get_google() # Check that requests.get was called with the expected URL get.assert_called_once_with(GOOGLE_URL) # Check that the mock response is returned self.assertIs(mock_response, response) # Check that the mocked response.status_code is as expected self.assertEqual(200, response.status_code) @patch('modules.web_caller.GOOGLE_URL', MOCK_GOOGLE_URL) def test_get_google_with_exception(self): """ Call the `get_google` function while using `patch` to create an unreachable URL. Assert that the error happened and capture it using assertRaises. """ # Call the function via assertRaises and confirm the exception is # raised by making the call self.assertRaises(ConnectionError, get_google) @patch('modules.web_caller.GOOGLE_URL', MOCK_GOOGLE_URL) def test_get_google_with_exception_context_manager(self): """ Call the `get_google` function while using `patch` to create an unreachable URL. Assert that the error happened and capture it using the assertRaises context manager. """ # Establish an assertRaises context manager with self.assertRaises(ConnectionError): # Call the function get_google()
from unittest import TestCase + from requests.exceptions import ConnectionError from mock import NonCallableMock, patch from modules.web_caller import get_google, GOOGLE_URL + + MOCK_GOOGLE_URL = 'http://not-going-to-work!!!' class TestWebCaller(TestCase): """ Tests for the `web_caller` module. """ @patch('modules.web_caller.requests.get') def test_get_google(self, get): """ Calling `get_google` works as expected. """ # Create a mock response mock_response = NonCallableMock( status_code=200, ) # Assign the mock response as the requests.get return value get.return_value = mock_response # Call the function response = get_google() # Check that requests.get was called with the expected URL get.assert_called_once_with(GOOGLE_URL) # Check that the mock response is returned self.assertIs(mock_response, response) # Check that the mocked response.status_code is as expected self.assertEqual(200, response.status_code) + + @patch('modules.web_caller.GOOGLE_URL', MOCK_GOOGLE_URL) + def test_get_google_with_exception(self): + """ + Call the `get_google` function while using `patch` to create an + unreachable URL. + + Assert that the error happened and capture it using assertRaises. + """ + + # Call the function via assertRaises and confirm the exception is + # raised by making the call + self.assertRaises(ConnectionError, get_google) + + @patch('modules.web_caller.GOOGLE_URL', MOCK_GOOGLE_URL) + def test_get_google_with_exception_context_manager(self): + """ + Call the `get_google` function while using `patch` to create an + unreachable URL. + + Assert that the error happened and capture it using the assertRaises + context manager. + """ + + # Establish an assertRaises context manager + with self.assertRaises(ConnectionError): + # Call the function + get_google()
31
0.885714
31
0
25a7ee9d070c668b6d47e620270f33837bb8086e
tasks/replace-vm/task.sh
tasks/replace-vm/task.sh
set -eu function getDiskSize() { if [[ "${VM_DISK_SIZE_GB}" == "" || "${VM_DISK_SIZE_GB}" == "null" ]]; then VM_DISK_SIZE_GB="$( cliaas-linux get-vm-disk-size -c cliaas-config/config.yml -i $VM_IDENTIFIER )" fi echo "${VM_DISK_SIZE_GB}" } diskSizeGB="$( getDiskSize )" echo "Setting disk size of vm ${VM_IDENTIFIER} to ${diskSizeGB}gb" cliaas-linux replace-vm \ --config cliaas-config/config.yml \ --identifier "${VM_IDENTIFIER}" \ --disk-size-gb "${diskSizeGB}"
set -eu function getDiskSize() { if [[ "${VM_DISK_SIZE_GB}" == "" || "${VM_DISK_SIZE_GB}" == "null" ]]; then VM_DISK_SIZE_GB="$( cliaas-linux get-vm-disk-size -c cliaas-config/config.yml -i $VM_IDENTIFIER )" fi echo "${VM_DISK_SIZE_GB}" } diskSizeGB="$( getDiskSize )" cliaas-linux replace-vm \ --config cliaas-config/config.yml \ --identifier "${VM_IDENTIFIER}" \ --disk-size-gb "${diskSizeGB}"
Remove echo statement for setting disk size
Remove echo statement for setting disk size
Shell
apache-2.0
sandyg1/pcf-pipelines,sandyg1/pcf-pipelines,rahulkj/pcf-pipelines,pivotal-cf/pcf-pipelines,rahulkj/pcf-pipelines,pivotal-cf/pcf-pipelines,pivotal-cf/pcf-pipelines,rahulkj/pcf-pipelines,sandyg1/pcf-pipelines,rahulkj/pcf-pipelines,sandyg1/pcf-pipelines,pivotal-cf/pcf-pipelines
shell
## Code Before: set -eu function getDiskSize() { if [[ "${VM_DISK_SIZE_GB}" == "" || "${VM_DISK_SIZE_GB}" == "null" ]]; then VM_DISK_SIZE_GB="$( cliaas-linux get-vm-disk-size -c cliaas-config/config.yml -i $VM_IDENTIFIER )" fi echo "${VM_DISK_SIZE_GB}" } diskSizeGB="$( getDiskSize )" echo "Setting disk size of vm ${VM_IDENTIFIER} to ${diskSizeGB}gb" cliaas-linux replace-vm \ --config cliaas-config/config.yml \ --identifier "${VM_IDENTIFIER}" \ --disk-size-gb "${diskSizeGB}" ## Instruction: Remove echo statement for setting disk size ## Code After: set -eu function getDiskSize() { if [[ "${VM_DISK_SIZE_GB}" == "" || "${VM_DISK_SIZE_GB}" == "null" ]]; then VM_DISK_SIZE_GB="$( cliaas-linux get-vm-disk-size -c cliaas-config/config.yml -i $VM_IDENTIFIER )" fi echo "${VM_DISK_SIZE_GB}" } diskSizeGB="$( getDiskSize )" cliaas-linux replace-vm \ --config cliaas-config/config.yml \ --identifier "${VM_IDENTIFIER}" \ --disk-size-gb "${diskSizeGB}"
set -eu function getDiskSize() { if [[ "${VM_DISK_SIZE_GB}" == "" || "${VM_DISK_SIZE_GB}" == "null" ]]; then VM_DISK_SIZE_GB="$( cliaas-linux get-vm-disk-size -c cliaas-config/config.yml -i $VM_IDENTIFIER )" fi echo "${VM_DISK_SIZE_GB}" } diskSizeGB="$( getDiskSize )" - echo "Setting disk size of vm ${VM_IDENTIFIER} to ${diskSizeGB}gb" - cliaas-linux replace-vm \ --config cliaas-config/config.yml \ --identifier "${VM_IDENTIFIER}" \ --disk-size-gb "${diskSizeGB}"
2
0.105263
0
2
f1dba6dd7e9000a8196f3aaad3d115047a4b21a7
android/release-checklist.md
android/release-checklist.md
Tangram ES (Android) Release Checklist ====================================== Steps to build and release the Tangram ES (AAR) to Maven Central: ## 1. Remove `-SNAPSHOT` tag from the version name in `gradle.properties`. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.0 ... ``` ## 2. Tag commit with release version (ex. tangram-1.0.0) and push tag to GitHub. ``` $ git tag tangram-1.0.0 $ git push origin tangram-1.0.0 ``` ## 3. Update version name and restore `-SNAPSHOT` tag to prepare next development cycle. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.1-SNAPSHOT ... ``` ## 4. Once (Travis CI)[1] completes the release build, log into (Sonatype Staging Repository)[2] and promote artifact to production. **Note: It can may several hours for a newly promoted artifact to appear in (Maven Central)[3].** ## 5. Document release notes at (https://github.com/tangrams/tangram-es/releases)[4]. [1] https://travis-ci.org/tangrams/tangram-es [2] https://oss.sonatype.org/#stagingRepositories [3] http://search.maven.org/#search%7Cga%7C1%7Ctangram [4] https://github.com/tangrams/tangram-es/releases
``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.0 ``` ### 2. Tag commit with release version and push tag to GitHub. ``` $ git tag tangram-1.0.0 $ git push origin tangram-1.0.0 ``` ### 3. Update version name and restore `-SNAPSHOT` tag to prepare next development cycle. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.1-SNAPSHOT ``` ### 4. Once [Travis CI][1] completes the release build, log into [Sonatype Staging Repository][2] and promote artifact to production. **Note: It can several hours for a newly promoted artifact to appear in [Maven Central][3].** ### 5. Document release notes at [https://github.com/tangrams/tangram-es/releases][4]. [1]: https://travis-ci.org/tangrams/tangram-es [2]: https://oss.sonatype.org/#stagingRepositories [3]: http://search.maven.org/#search%7Cga%7C1%7Ctangram [4]: https://github.com/tangrams/tangram-es/releases
Revise doc and fix hyperlinks
Revise doc and fix hyperlinks
Markdown
mit
tangrams/tangram-es,quitejonny/tangram-es,tangrams/tangram-es,cleeus/tangram-es,cleeus/tangram-es,cleeus/tangram-es,cleeus/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,tangrams/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,quitejonny/tangram-es,tangrams/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,tangrams/tangram-es
markdown
## Code Before: Tangram ES (Android) Release Checklist ====================================== Steps to build and release the Tangram ES (AAR) to Maven Central: ## 1. Remove `-SNAPSHOT` tag from the version name in `gradle.properties`. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.0 ... ``` ## 2. Tag commit with release version (ex. tangram-1.0.0) and push tag to GitHub. ``` $ git tag tangram-1.0.0 $ git push origin tangram-1.0.0 ``` ## 3. Update version name and restore `-SNAPSHOT` tag to prepare next development cycle. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.1-SNAPSHOT ... ``` ## 4. Once (Travis CI)[1] completes the release build, log into (Sonatype Staging Repository)[2] and promote artifact to production. **Note: It can may several hours for a newly promoted artifact to appear in (Maven Central)[3].** ## 5. Document release notes at (https://github.com/tangrams/tangram-es/releases)[4]. [1] https://travis-ci.org/tangrams/tangram-es [2] https://oss.sonatype.org/#stagingRepositories [3] http://search.maven.org/#search%7Cga%7C1%7Ctangram [4] https://github.com/tangrams/tangram-es/releases ## Instruction: Revise doc and fix hyperlinks ## Code After: ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.0 ``` ### 2. Tag commit with release version and push tag to GitHub. ``` $ git tag tangram-1.0.0 $ git push origin tangram-1.0.0 ``` ### 3. Update version name and restore `-SNAPSHOT` tag to prepare next development cycle. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.1-SNAPSHOT ``` ### 4. Once [Travis CI][1] completes the release build, log into [Sonatype Staging Repository][2] and promote artifact to production. **Note: It can several hours for a newly promoted artifact to appear in [Maven Central][3].** ### 5. Document release notes at [https://github.com/tangrams/tangram-es/releases][4]. [1]: https://travis-ci.org/tangrams/tangram-es [2]: https://oss.sonatype.org/#stagingRepositories [3]: http://search.maven.org/#search%7Cga%7C1%7Ctangram [4]: https://github.com/tangrams/tangram-es/releases
- Tangram ES (Android) Release Checklist - ====================================== - - Steps to build and release the Tangram ES (AAR) to Maven Central: - - ## 1. Remove `-SNAPSHOT` tag from the version name in `gradle.properties`. Commit and push to master. ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.0 - ... ``` - ## 2. Tag commit with release version (ex. tangram-1.0.0) and push tag to GitHub. ? -------------------- + ### 2. Tag commit with release version and push tag to GitHub. ? + ``` $ git tag tangram-1.0.0 $ git push origin tangram-1.0.0 ``` - ## 3. Update version name and restore `-SNAPSHOT` tag to prepare next development cycle. Commit and push to master. + ### 3. Update version name and restore `-SNAPSHOT` tag to prepare next development cycle. Commit and push to master. ? + ``` GROUP=com.mapzen.tangram VERSION_NAME=1.0.1-SNAPSHOT - ... ``` - ## 4. Once (Travis CI)[1] completes the release build, log into (Sonatype Staging Repository)[2] and promote artifact to production. ? ^ ^ ^ ^ + ### 4. Once [Travis CI][1] completes the release build, log into [Sonatype Staging Repository][2] and promote artifact to production. ? + ^ ^ ^ ^ - **Note: It can may several hours for a newly promoted artifact to appear in (Maven Central)[3].** ? ---- ^ ^ + **Note: It can several hours for a newly promoted artifact to appear in [Maven Central][3].** ? ^ ^ - ## 5. Document release notes at (https://github.com/tangrams/tangram-es/releases)[4]. ? ^ ^ + ### 5. Document release notes at [https://github.com/tangrams/tangram-es/releases][4]. ? + ^ ^ - [1] https://travis-ci.org/tangrams/tangram-es + [1]: https://travis-ci.org/tangrams/tangram-es ? + - [2] https://oss.sonatype.org/#stagingRepositories + [2]: https://oss.sonatype.org/#stagingRepositories ? + - [3] http://search.maven.org/#search%7Cga%7C1%7Ctangram + [3]: http://search.maven.org/#search%7Cga%7C1%7Ctangram ? + - [4] https://github.com/tangrams/tangram-es/releases + [4]: https://github.com/tangrams/tangram-es/releases ? +
26
0.742857
9
17
6cc52a682a9f6dcf68958b0c6b0b1978dd89722a
app/assets/javascripts/controllers/teikei_controller.js
app/assets/javascripts/controllers/teikei_controller.js
Teikei.Controller = Backbone.Marionette.Controller.extend({ initialize: function(options){ }, index: function(){ alert("Hello from Marionette Beta Controller"); } });
Teikei.Controller = Backbone.Marionette.Controller.extend({ initialize: function(options){ }, index: function(){ } });
Remove debug alert from Marionette controller.
Remove debug alert from Marionette controller.
JavaScript
agpl-3.0
teikei/teikei,sjockers/teikei,sjockers/teikei,teikei/teikei,sjockers/teikei,teikei/teikei
javascript
## Code Before: Teikei.Controller = Backbone.Marionette.Controller.extend({ initialize: function(options){ }, index: function(){ alert("Hello from Marionette Beta Controller"); } }); ## Instruction: Remove debug alert from Marionette controller. ## Code After: Teikei.Controller = Backbone.Marionette.Controller.extend({ initialize: function(options){ }, index: function(){ } });
Teikei.Controller = Backbone.Marionette.Controller.extend({ initialize: function(options){ }, index: function(){ - alert("Hello from Marionette Beta Controller"); } });
1
0.090909
0
1
bffc1c4e8277506b0142c777bceb0e3b0cf6825f
_includes/blog/blog_header.html
_includes/blog/blog_header.html
<!-- About: Header --> <header class="blog"> <div class="container"> <div class="intro-text"> <div class="intro-heading">Rapid River Blog</div> <div class="intro-lead-in">Sometimes we write about interesting, technical challenges.</div> <a href="#subscribe" class="page-scroll btn btn-xl">Subscribe for updates</a> </div> <div class="intro-image"> <img src="/img/blog/blogger.png" alt="Vector image of person on a laptop"> </div> </div> </header>
<!-- About: Header --> <header class="blog"> <div class="container"> <div class="intro-text"> <div class="intro-heading">Rapid River Blog</div> <div class="intro-lead-in">We often come across interesting challenges on the job. We have documented some of them here on our blog.</div> <a href="#subscribe" class="page-scroll btn btn-xl">Subscribe for updates</a> </div> <div class="intro-image"> <img src="/img/blog/blogger.png" alt="Vector image of person on a laptop"> </div> </div> </header>
Make blog description text longer
Make blog description text longer
HTML
apache-2.0
RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io
html
## Code Before: <!-- About: Header --> <header class="blog"> <div class="container"> <div class="intro-text"> <div class="intro-heading">Rapid River Blog</div> <div class="intro-lead-in">Sometimes we write about interesting, technical challenges.</div> <a href="#subscribe" class="page-scroll btn btn-xl">Subscribe for updates</a> </div> <div class="intro-image"> <img src="/img/blog/blogger.png" alt="Vector image of person on a laptop"> </div> </div> </header> ## Instruction: Make blog description text longer ## Code After: <!-- About: Header --> <header class="blog"> <div class="container"> <div class="intro-text"> <div class="intro-heading">Rapid River Blog</div> <div class="intro-lead-in">We often come across interesting challenges on the job. We have documented some of them here on our blog.</div> <a href="#subscribe" class="page-scroll btn btn-xl">Subscribe for updates</a> </div> <div class="intro-image"> <img src="/img/blog/blogger.png" alt="Vector image of person on a laptop"> </div> </div> </header>
<!-- About: Header --> <header class="blog"> <div class="container"> <div class="intro-text"> <div class="intro-heading">Rapid River Blog</div> - <div class="intro-lead-in">Sometimes we write about interesting, technical challenges.</div> + <div class="intro-lead-in">We often come across interesting challenges on the job. We have documented some of them here on our blog.</div> <a href="#subscribe" class="page-scroll btn btn-xl">Subscribe for updates</a> </div> <div class="intro-image"> <img src="/img/blog/blogger.png" alt="Vector image of person on a laptop"> </div> </div> </header>
2
0.153846
1
1
1eb694e33b8e2bd89c359d5390a9e65b5f6ffde9
.travis.yml
.travis.yml
sudo: required language: bash services: - docker env: global: - ROOT=/opt/rootfs - JOBS=2 matrix: - TAG=wheezy-64 CMD=run_tests script: - .travis/docker_run.sh
sudo: required notifications: email: on_success: never on_failure: always language: bash services: - docker env: global: - ROOT=/opt/rootfs - JOBS=2 matrix: - TAG=wheezy-64 CMD=run_tests script: - .travis/docker_run.sh
Disable email notifications on success
Disable email notifications on success [ci skip]
YAML
lgpl-2.1
strahlex/machinekit,bobvanderlinden/machinekit,kinsamanka/machinekit,strahlex/machinekit,kinsamanka/machinekit,ArcEye/MK-Qt5,mhaberler/machinekit,araisrobo/machinekit,strahlex/machinekit,bobvanderlinden/machinekit,araisrobo/machinekit,bobvanderlinden/machinekit,ArcEye/MK-Qt5,ArcEye/MK-Qt5,araisrobo/machinekit,ArcEye/MK-Qt5,araisrobo/machinekit,bobvanderlinden/machinekit,araisrobo/machinekit,mhaberler/machinekit,strahlex/machinekit,ArcEye/MK-Qt5,araisrobo/machinekit,araisrobo/machinekit,bobvanderlinden/machinekit,bobvanderlinden/machinekit,kinsamanka/machinekit,kinsamanka/machinekit,mhaberler/machinekit,araisrobo/machinekit,araisrobo/machinekit,mhaberler/machinekit,mhaberler/machinekit,bobvanderlinden/machinekit,strahlex/machinekit,ArcEye/MK-Qt5,strahlex/machinekit,mhaberler/machinekit,kinsamanka/machinekit,kinsamanka/machinekit,ArcEye/MK-Qt5,kinsamanka/machinekit,mhaberler/machinekit,ArcEye/MK-Qt5,strahlex/machinekit,kinsamanka/machinekit,bobvanderlinden/machinekit,mhaberler/machinekit
yaml
## Code Before: sudo: required language: bash services: - docker env: global: - ROOT=/opt/rootfs - JOBS=2 matrix: - TAG=wheezy-64 CMD=run_tests script: - .travis/docker_run.sh ## Instruction: Disable email notifications on success [ci skip] ## Code After: sudo: required notifications: email: on_success: never on_failure: always language: bash services: - docker env: global: - ROOT=/opt/rootfs - JOBS=2 matrix: - TAG=wheezy-64 CMD=run_tests script: - .travis/docker_run.sh
sudo: required + + notifications: + email: + on_success: never + on_failure: always language: bash services: - docker env: global: - ROOT=/opt/rootfs - JOBS=2 matrix: - TAG=wheezy-64 CMD=run_tests script: - .travis/docker_run.sh +
6
0.375
6
0
204918caff2feeff82f10300364edd43b8e1f4ea
lib/versions.js
lib/versions.js
var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return parseInt(parts.map(function(d){ while(d.length < 3) d = '0'+d; return d; }).join(''), 10); } /* Returns the matching version number in a list of sorted version numbers */ versions.find = function(version_spec, list, cb) { var v, i = list.length-1; if(version_spec.match(/^stable$/i)) { if(i >= 0) do { v = list[i--] }while(v && parseInt(v.split('.')[1]) % 2 != 0 && i >= 0);// search for an even number: e.g. 0.2.0 }else if(version_spec.match(/^latest$/i)) { v = list[list.length-1]; }else{ if(i >= 0) do { v = list[i--] }while(v && !semver.satisfies(v, version_spec) && i >= 0); if(!semver.satisfies(v, version_spec)) v = null; } if(!v) return cb(new Error('Version spec didn\'t match any available version')); cb(null, v); };
var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return parseInt(parts.map(function(d){ while(d.length < 3) d = '0'+d; return d; }).join(''), 10); } /* Returns the matching version number in a list of sorted version numbers */ versions.find = function(version_spec, list, cb) { var v, i = list.length-1; if(version_spec.match(/^stable$/i)) { if(i >= 0) do { v = list[i--] }while(v && parseInt(v.split('.')[1]) % 2 != 0 && i >= 0);// search for an even number: e.g. 0.2.0 }else if(version_spec.match(/^latest$/i)) { v = list[list.length-1]; }else{ if(i >= 0) do { v = list[i--] }while(v && !semver.satisfies(v, version_spec) && i >= 0); if(!semver.satisfies(v, version_spec)) v = null; } if(!v) return cb(new Error('Version spec, "' + version_spec + '", didn\'t match any available version')); cb(null, v); };
Write out version spec that's being used, to make version errors more intuitive.
Write out version spec that's being used, to make version errors more intuitive.
JavaScript
mit
marcelklehr/nodist,marcelklehr/nodist,marcelklehr/nodist,nullivex/nodist,nullivex/nodist,nullivex/nodist
javascript
## Code Before: var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return parseInt(parts.map(function(d){ while(d.length < 3) d = '0'+d; return d; }).join(''), 10); } /* Returns the matching version number in a list of sorted version numbers */ versions.find = function(version_spec, list, cb) { var v, i = list.length-1; if(version_spec.match(/^stable$/i)) { if(i >= 0) do { v = list[i--] }while(v && parseInt(v.split('.')[1]) % 2 != 0 && i >= 0);// search for an even number: e.g. 0.2.0 }else if(version_spec.match(/^latest$/i)) { v = list[list.length-1]; }else{ if(i >= 0) do { v = list[i--] }while(v && !semver.satisfies(v, version_spec) && i >= 0); if(!semver.satisfies(v, version_spec)) v = null; } if(!v) return cb(new Error('Version spec didn\'t match any available version')); cb(null, v); }; ## Instruction: Write out version spec that's being used, to make version errors more intuitive. ## Code After: var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return parseInt(parts.map(function(d){ while(d.length < 3) d = '0'+d; return d; }).join(''), 10); } /* Returns the matching version number in a list of sorted version numbers */ versions.find = function(version_spec, list, cb) { var v, i = list.length-1; if(version_spec.match(/^stable$/i)) { if(i >= 0) do { v = list[i--] }while(v && parseInt(v.split('.')[1]) % 2 != 0 && i >= 0);// search for an even number: e.g. 0.2.0 }else if(version_spec.match(/^latest$/i)) { v = list[list.length-1]; }else{ if(i >= 0) do { v = list[i--] }while(v && !semver.satisfies(v, version_spec) && i >= 0); if(!semver.satisfies(v, version_spec)) v = null; } if(!v) return cb(new Error('Version spec, "' + version_spec + '", didn\'t match any available version')); cb(null, v); };
var semver = require('semver'); var versions = module.exports; /** Returns a number representation of the version number that can be compared with other such representations e.g. compareable('0.6.12') > compareable('0.6.10') */ versions.compareable = function compareable(ver) { var parts = ver.split('.'); return parseInt(parts.map(function(d){ while(d.length < 3) d = '0'+d; return d; }).join(''), 10); } /* Returns the matching version number in a list of sorted version numbers */ versions.find = function(version_spec, list, cb) { var v, i = list.length-1; if(version_spec.match(/^stable$/i)) { if(i >= 0) do { v = list[i--] }while(v && parseInt(v.split('.')[1]) % 2 != 0 && i >= 0);// search for an even number: e.g. 0.2.0 }else if(version_spec.match(/^latest$/i)) { v = list[list.length-1]; }else{ if(i >= 0) do { v = list[i--] }while(v && !semver.satisfies(v, version_spec) && i >= 0); if(!semver.satisfies(v, version_spec)) v = null; } - if(!v) return cb(new Error('Version spec didn\'t match any available version')); + if(!v) return cb(new Error('Version spec, "' + version_spec + '", didn\'t match any available version')); ? +++++++++++++++++++++++++ cb(null, v); };
2
0.064516
1
1
e33ac7d46e5bf06928a41300c7f09458414ebc2d
open-secret-santa-app/src/main/java/com/moac/android/opensecretsanta/util/NotifyUtils.java
open-secret-santa-app/src/main/java/com/moac/android/opensecretsanta/util/NotifyUtils.java
package com.moac.android.opensecretsanta.util; import com.moac.android.opensecretsanta.database.DatabaseManager; import com.moac.android.opensecretsanta.model.ContactMode; import com.moac.android.opensecretsanta.model.Member; import java.util.List; public class NotifyUtils { public static boolean containsSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMode().isSendable()) { return true; } } return false; } public static boolean containsEmailSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMode() == ContactMode.EMAIL) { return true; } } return false; } public static boolean containsEmailSendableEntry(DatabaseManager db, long[] _memberIds) { for(long id : _memberIds) { Member member = db.queryById(id, Member.class); if(member.getContactMode() == ContactMode.EMAIL) { return true; } } return false; } private boolean isSendable(Member member) { return (member != null && member.getContactMode() != null) && member.getContactMode().isSendable(); } public static int getShareableCount(List<Member> _members) { int count = 0; for(Member member : _members) { if(member.getContactMode().isSendable()) { count++; } } return count; } }
package com.moac.android.opensecretsanta.util; import com.moac.android.opensecretsanta.database.DatabaseManager; import com.moac.android.opensecretsanta.model.ContactMethod; import com.moac.android.opensecretsanta.model.Member; import java.util.List; public class NotifyUtils { public static boolean containsSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMethod().isSendable()) { return true; } } return false; } public static boolean containsEmailSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMethod() == ContactMethod.EMAIL) { return true; } } return false; } public static boolean containsEmailSendableEntry(DatabaseManager db, long[] _memberIds) { for(long id : _memberIds) { Member member = db.queryById(id, Member.class); if(member.getContactMethod() == ContactMethod.EMAIL) { return true; } } return false; } private boolean isSendable(Member member) { return (member != null && member.getContactMethod() != null) && member.getContactMethod().isSendable(); } public static int getShareableCount(List<Member> _members) { int count = 0; for(Member member : _members) { if(member.getContactMethod().isSendable()) { count++; } } return count; } }
Add missing file from merge
Add missing file from merge
Java
apache-2.0
peter-tackage/open-secret-santa,peter-tackage/open-secret-santa
java
## Code Before: package com.moac.android.opensecretsanta.util; import com.moac.android.opensecretsanta.database.DatabaseManager; import com.moac.android.opensecretsanta.model.ContactMode; import com.moac.android.opensecretsanta.model.Member; import java.util.List; public class NotifyUtils { public static boolean containsSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMode().isSendable()) { return true; } } return false; } public static boolean containsEmailSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMode() == ContactMode.EMAIL) { return true; } } return false; } public static boolean containsEmailSendableEntry(DatabaseManager db, long[] _memberIds) { for(long id : _memberIds) { Member member = db.queryById(id, Member.class); if(member.getContactMode() == ContactMode.EMAIL) { return true; } } return false; } private boolean isSendable(Member member) { return (member != null && member.getContactMode() != null) && member.getContactMode().isSendable(); } public static int getShareableCount(List<Member> _members) { int count = 0; for(Member member : _members) { if(member.getContactMode().isSendable()) { count++; } } return count; } } ## Instruction: Add missing file from merge ## Code After: package com.moac.android.opensecretsanta.util; import com.moac.android.opensecretsanta.database.DatabaseManager; import com.moac.android.opensecretsanta.model.ContactMethod; import com.moac.android.opensecretsanta.model.Member; import java.util.List; public class NotifyUtils { public static boolean containsSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMethod().isSendable()) { return true; } } return false; } public static boolean containsEmailSendableEntry(List<Member> _members) { for(Member member : _members) { if(member.getContactMethod() == ContactMethod.EMAIL) { return true; } } return false; } public static boolean containsEmailSendableEntry(DatabaseManager db, long[] _memberIds) { for(long id : _memberIds) { Member member = db.queryById(id, Member.class); if(member.getContactMethod() == ContactMethod.EMAIL) { return true; } } return false; } private boolean isSendable(Member member) { return (member != null && member.getContactMethod() != null) && member.getContactMethod().isSendable(); } public static int getShareableCount(List<Member> _members) { int count = 0; for(Member member : _members) { if(member.getContactMethod().isSendable()) { count++; } } return count; } }
package com.moac.android.opensecretsanta.util; import com.moac.android.opensecretsanta.database.DatabaseManager; - import com.moac.android.opensecretsanta.model.ContactMode; ? - + import com.moac.android.opensecretsanta.model.ContactMethod; ? +++ import com.moac.android.opensecretsanta.model.Member; import java.util.List; public class NotifyUtils { public static boolean containsSendableEntry(List<Member> _members) { for(Member member : _members) { - if(member.getContactMode().isSendable()) { ? - + if(member.getContactMethod().isSendable()) { ? +++ return true; } } return false; } public static boolean containsEmailSendableEntry(List<Member> _members) { for(Member member : _members) { - if(member.getContactMode() == ContactMode.EMAIL) { ? - - + if(member.getContactMethod() == ContactMethod.EMAIL) { ? +++ +++ return true; } } return false; } public static boolean containsEmailSendableEntry(DatabaseManager db, long[] _memberIds) { for(long id : _memberIds) { Member member = db.queryById(id, Member.class); - if(member.getContactMode() == ContactMode.EMAIL) { ? - - + if(member.getContactMethod() == ContactMethod.EMAIL) { ? +++ +++ return true; } } return false; } private boolean isSendable(Member member) { - return (member != null && member.getContactMode() != null) && member.getContactMode().isSendable(); ? - - + return (member != null && member.getContactMethod() != null) && member.getContactMethod().isSendable(); ? +++ +++ } public static int getShareableCount(List<Member> _members) { int count = 0; for(Member member : _members) { - if(member.getContactMode().isSendable()) { ? - + if(member.getContactMethod().isSendable()) { ? +++ count++; } } return count; } }
12
0.230769
6
6
f41574aa4ebac25619b0a978772224d7ab44eda1
layouts/partials/pagination.html
layouts/partials/pagination.html
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} <nav class="paging"> {{ if .Paginator.HasPrev }} <div class="left"><a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}" rel="prev"><i class="fa fa-angle-left"></i></a></div> {{ end }} {{ if .Paginator.HasNext }} <div class="right"><a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}" rel="next"><i class="fa fa-angle-right"></i></a></div> {{ end }} </nav> {{ end }}
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} <nav class="paging"> {{ if .Paginator.HasPrev }} <div class="left"><a href="{{ .Paginator.Prev.URL }}" rel="prev"><i class="fa fa-angle-left"></i></a></div> {{ end }} {{ if .Paginator.HasNext }} <div class="right"><a href="{{ .Paginator.Next.URL }}" rel="next"><i class="fa fa-angle-right"></i></a></div> {{ end }} </nav> {{ end }}
Fix next/prev page URLs when uglyURLs is true
Fix next/prev page URLs when uglyURLs is true Fixes #8.
HTML
mit
dim0627/hugo_theme_aglaus
html
## Code Before: {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} <nav class="paging"> {{ if .Paginator.HasPrev }} <div class="left"><a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}" rel="prev"><i class="fa fa-angle-left"></i></a></div> {{ end }} {{ if .Paginator.HasNext }} <div class="right"><a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}" rel="next"><i class="fa fa-angle-right"></i></a></div> {{ end }} </nav> {{ end }} ## Instruction: Fix next/prev page URLs when uglyURLs is true Fixes #8. ## Code After: {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} <nav class="paging"> {{ if .Paginator.HasPrev }} <div class="left"><a href="{{ .Paginator.Prev.URL }}" rel="prev"><i class="fa fa-angle-left"></i></a></div> {{ end }} {{ if .Paginator.HasNext }} <div class="right"><a href="{{ .Paginator.Next.URL }}" rel="next"><i class="fa fa-angle-right"></i></a></div> {{ end }} </nav> {{ end }}
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} <nav class="paging"> {{ if .Paginator.HasPrev }} - <div class="left"><a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}" rel="prev"><i class="fa fa-angle-left"></i></a></div> ? --------------- ^^^^^^^^^^ + <div class="left"><a href="{{ .Paginator.Prev.URL }}" rel="prev"><i class="fa fa-angle-left"></i></a></div> ? ^^^ {{ end }} {{ if .Paginator.HasNext }} - <div class="right"><a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}" rel="next"><i class="fa fa-angle-right"></i></a></div> ? --------------- ^^^^^^^^^^ + <div class="right"><a href="{{ .Paginator.Next.URL }}" rel="next"><i class="fa fa-angle-right"></i></a></div> ? ^^^ {{ end }} </nav> {{ end }}
4
0.363636
2
2
d11acab0a029151e9d1e1b3d03bdaa5551cb8cba
livedoc-ui-webjar/src/components/doc/types/complex/TypeFieldRow.jsx
livedoc-ui-webjar/src/components/doc/types/complex/TypeFieldRow.jsx
// @flow import * as React from 'react'; import type { ApiObjectFieldDoc } from '../../../../model/livedoc'; import { TypeRef } from '../../typeref/TypeRef'; export type TypeFieldRowProps = { field: ApiObjectFieldDoc, } export const TypeFieldRow = (props: TypeFieldRowProps) => { const field: ApiObjectFieldDoc = props.field; return <tr> <td><code>{field.name}</code></td> <td><TypeRef type={field.type}/></td> <td>{field.description}</td> </tr>; };
// @flow import * as React from 'react'; import type { ApiObjectFieldDoc } from '../../../../model/livedoc'; import { TypeRef } from '../../typeref/TypeRef'; export type TypeFieldRowProps = { field: ApiObjectFieldDoc, } export const TypeFieldRow = (props: TypeFieldRowProps) => { const field: ApiObjectFieldDoc = props.field; const desc = field.description && <p>{field.description}</p>; return <tr> <td><code>{field.name}</code></td> <td><TypeRef type={field.type}/></td> <td>{desc}<Format constraints={field.format}/></td> </tr>; }; type FormatProps = { constraints: Array<string>, } const Format = ({constraints}: FormatProps) => { if (constraints.length === 0) { return null; } if (constraints.length === 1) { return [<h6>Format:</h6>, constraints[0]]; } const items = constraints.map((c, index) => <li key={index}>{c}</li>); const list = <ul>{items}</ul>; return [<h6>Format:</h6>, list]; };
Add display of the field property format when present
Add display of the field property format when present
JSX
mit
joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc
jsx
## Code Before: // @flow import * as React from 'react'; import type { ApiObjectFieldDoc } from '../../../../model/livedoc'; import { TypeRef } from '../../typeref/TypeRef'; export type TypeFieldRowProps = { field: ApiObjectFieldDoc, } export const TypeFieldRow = (props: TypeFieldRowProps) => { const field: ApiObjectFieldDoc = props.field; return <tr> <td><code>{field.name}</code></td> <td><TypeRef type={field.type}/></td> <td>{field.description}</td> </tr>; }; ## Instruction: Add display of the field property format when present ## Code After: // @flow import * as React from 'react'; import type { ApiObjectFieldDoc } from '../../../../model/livedoc'; import { TypeRef } from '../../typeref/TypeRef'; export type TypeFieldRowProps = { field: ApiObjectFieldDoc, } export const TypeFieldRow = (props: TypeFieldRowProps) => { const field: ApiObjectFieldDoc = props.field; const desc = field.description && <p>{field.description}</p>; return <tr> <td><code>{field.name}</code></td> <td><TypeRef type={field.type}/></td> <td>{desc}<Format constraints={field.format}/></td> </tr>; }; type FormatProps = { constraints: Array<string>, } const Format = ({constraints}: FormatProps) => { if (constraints.length === 0) { return null; } if (constraints.length === 1) { return [<h6>Format:</h6>, constraints[0]]; } const items = constraints.map((c, index) => <li key={index}>{c}</li>); const list = <ul>{items}</ul>; return [<h6>Format:</h6>, list]; };
// @flow import * as React from 'react'; import type { ApiObjectFieldDoc } from '../../../../model/livedoc'; import { TypeRef } from '../../typeref/TypeRef'; export type TypeFieldRowProps = { field: ApiObjectFieldDoc, } export const TypeFieldRow = (props: TypeFieldRowProps) => { const field: ApiObjectFieldDoc = props.field; - + const desc = field.description && <p>{field.description}</p>; return <tr> <td><code>{field.name}</code></td> <td><TypeRef type={field.type}/></td> - <td>{field.description}</td> + <td>{desc}<Format constraints={field.format}/></td> </tr>; }; + + type FormatProps = { + constraints: Array<string>, + } + + const Format = ({constraints}: FormatProps) => { + if (constraints.length === 0) { + return null; + } + if (constraints.length === 1) { + return [<h6>Format:</h6>, constraints[0]]; + } + const items = constraints.map((c, index) => <li key={index}>{c}</li>); + const list = <ul>{items}</ul>; + return [<h6>Format:</h6>, list]; + };
20
1.111111
18
2
5d68faadd90a5f9f00b5c5346c29ca3af327d112
resources/files/operating_system.rb
resources/files/operating_system.rb
require "ruby_installer/runtime" RubyInstaller::Runtime.enable_dll_search_paths Gem.pre_install do |gem_installer| RubyInstaller::Runtime.enable_msys_apps(for_gem_install: true) unless gem_installer.spec.extensions.empty? unless gem_installer.options && gem_installer.options[:ignore_dependencies] [['msys2_dependencies' , :install_packages ], ['msys2_mingw_dependencies', :install_mingw_packages]].each do |metakey, func| if deps=gem_installer.spec.metadata[metakey] begin RubyInstaller::Runtime.msys2_installation.send(func, deps.split(" "), verbose: Gem.configuration.verbose) rescue RubyInstaller::Runtime::Msys2Installation::CommandError => err Gem.ui.say(err.to_s) end end end end end
require "ruby_installer/runtime" RubyInstaller::Runtime.enable_dll_search_paths Gem.pre_install do |gem_installer| RubyInstaller::Runtime.enable_msys_apps(for_gem_install: true) unless gem_installer.spec.extensions.empty? if !gem_installer.options || !gem_installer.options[:ignore_dependencies] || gem_installer.options[:bundler_expected_checksum] [['msys2_dependencies' , :install_packages ], ['msys2_mingw_dependencies', :install_mingw_packages]].each do |metakey, func| if deps=gem_installer.spec.metadata[metakey] begin RubyInstaller::Runtime.msys2_installation.send(func, deps.split(" "), verbose: Gem.configuration.verbose) rescue RubyInstaller::Runtime::Msys2Installation::CommandError => err Gem.ui.say(err.to_s) end end end end end
Fix compatibility of MSYS2 dependency installer with bundler
Fix compatibility of MSYS2 dependency installer with bundler Bundler calls the `Gem.pre_install hook`, but always sets `:ignore_dependencies=>true` in the options. That's why `bundle install` didn't respect `msys2_mingw_dependencies` in gemspec metadata. There is no option in bundler to ignore dependencies, so that pacman installation is now forced in the bundler case.
Ruby
bsd-3-clause
oneclick/rubyinstaller2,oneclick/rubyinstaller2,oneclick/rubyinstaller2
ruby
## Code Before: require "ruby_installer/runtime" RubyInstaller::Runtime.enable_dll_search_paths Gem.pre_install do |gem_installer| RubyInstaller::Runtime.enable_msys_apps(for_gem_install: true) unless gem_installer.spec.extensions.empty? unless gem_installer.options && gem_installer.options[:ignore_dependencies] [['msys2_dependencies' , :install_packages ], ['msys2_mingw_dependencies', :install_mingw_packages]].each do |metakey, func| if deps=gem_installer.spec.metadata[metakey] begin RubyInstaller::Runtime.msys2_installation.send(func, deps.split(" "), verbose: Gem.configuration.verbose) rescue RubyInstaller::Runtime::Msys2Installation::CommandError => err Gem.ui.say(err.to_s) end end end end end ## Instruction: Fix compatibility of MSYS2 dependency installer with bundler Bundler calls the `Gem.pre_install hook`, but always sets `:ignore_dependencies=>true` in the options. That's why `bundle install` didn't respect `msys2_mingw_dependencies` in gemspec metadata. There is no option in bundler to ignore dependencies, so that pacman installation is now forced in the bundler case. ## Code After: require "ruby_installer/runtime" RubyInstaller::Runtime.enable_dll_search_paths Gem.pre_install do |gem_installer| RubyInstaller::Runtime.enable_msys_apps(for_gem_install: true) unless gem_installer.spec.extensions.empty? if !gem_installer.options || !gem_installer.options[:ignore_dependencies] || gem_installer.options[:bundler_expected_checksum] [['msys2_dependencies' , :install_packages ], ['msys2_mingw_dependencies', :install_mingw_packages]].each do |metakey, func| if deps=gem_installer.spec.metadata[metakey] begin RubyInstaller::Runtime.msys2_installation.send(func, deps.split(" "), verbose: Gem.configuration.verbose) rescue RubyInstaller::Runtime::Msys2Installation::CommandError => err Gem.ui.say(err.to_s) end end end end end
require "ruby_installer/runtime" RubyInstaller::Runtime.enable_dll_search_paths Gem.pre_install do |gem_installer| RubyInstaller::Runtime.enable_msys_apps(for_gem_install: true) unless gem_installer.spec.extensions.empty? - unless gem_installer.options && gem_installer.options[:ignore_dependencies] + if !gem_installer.options || !gem_installer.options[:ignore_dependencies] || gem_installer.options[:bundler_expected_checksum] [['msys2_dependencies' , :install_packages ], ['msys2_mingw_dependencies', :install_mingw_packages]].each do |metakey, func| if deps=gem_installer.spec.metadata[metakey] begin RubyInstaller::Runtime.msys2_installation.send(func, deps.split(" "), verbose: Gem.configuration.verbose) rescue RubyInstaller::Runtime::Msys2Installation::CommandError => err Gem.ui.say(err.to_s) end end end end end
2
0.095238
1
1
a18e7fc124a112ed89396a7980fe580ca528bc83
lib/capistrano/twingly/tasks/servers_from_srv_record.rake
lib/capistrano/twingly/tasks/servers_from_srv_record.rake
require 'resolv' SRV_RECORDS = %w[ _rubyapps._tcp.live.lkp.primelabs.se _rubyapps._tcp.sth.twingly.network ] resolver = Resolv::DNS.new servers = SRV_RECORDS.map do |srv_record| resolver.getresources(srv_record, Resolv::DNS::Resource::IN::SRV) end.flatten.map(&:target).map(&:to_s) raise "Can't find any servers, no records for #{SRV_RECORDS}" if servers.empty? set :servers_from_srv_record, servers namespace :list do desc 'List servers from SRV records' task :servers do servers.each { |server| puts server } end end
require 'resolv' SRV_RECORDS = %w[ _rubyapps._tcp.sth.twingly.network ] resolver = Resolv::DNS.new servers = SRV_RECORDS.map do |srv_record| resolver.getresources(srv_record, Resolv::DNS::Resource::IN::SRV) end.flatten.map(&:target).map(&:to_s) raise "Can't find any servers, no records for #{SRV_RECORDS}" if servers.empty? set :servers_from_srv_record, servers namespace :list do desc 'List servers from SRV records' task :servers do servers.each { |server| puts server } end end
Remove SRV record for LKP datacenter
Remove SRV record for LKP datacenter
Ruby
mit
twingly/capistrano-twingly
ruby
## Code Before: require 'resolv' SRV_RECORDS = %w[ _rubyapps._tcp.live.lkp.primelabs.se _rubyapps._tcp.sth.twingly.network ] resolver = Resolv::DNS.new servers = SRV_RECORDS.map do |srv_record| resolver.getresources(srv_record, Resolv::DNS::Resource::IN::SRV) end.flatten.map(&:target).map(&:to_s) raise "Can't find any servers, no records for #{SRV_RECORDS}" if servers.empty? set :servers_from_srv_record, servers namespace :list do desc 'List servers from SRV records' task :servers do servers.each { |server| puts server } end end ## Instruction: Remove SRV record for LKP datacenter ## Code After: require 'resolv' SRV_RECORDS = %w[ _rubyapps._tcp.sth.twingly.network ] resolver = Resolv::DNS.new servers = SRV_RECORDS.map do |srv_record| resolver.getresources(srv_record, Resolv::DNS::Resource::IN::SRV) end.flatten.map(&:target).map(&:to_s) raise "Can't find any servers, no records for #{SRV_RECORDS}" if servers.empty? set :servers_from_srv_record, servers namespace :list do desc 'List servers from SRV records' task :servers do servers.each { |server| puts server } end end
require 'resolv' SRV_RECORDS = %w[ - _rubyapps._tcp.live.lkp.primelabs.se _rubyapps._tcp.sth.twingly.network ] resolver = Resolv::DNS.new servers = SRV_RECORDS.map do |srv_record| resolver.getresources(srv_record, Resolv::DNS::Resource::IN::SRV) end.flatten.map(&:target).map(&:to_s) raise "Can't find any servers, no records for #{SRV_RECORDS}" if servers.empty? set :servers_from_srv_record, servers namespace :list do desc 'List servers from SRV records' task :servers do servers.each { |server| puts server } end end
1
0.043478
0
1
0420c83c052b91ee811d34de3db8bd159f292f77
lib/GlobalConfig.js
lib/GlobalConfig.js
/** * Created by unleet on 11/2/13. */
/** * A 12-factor friendly configuration manager. * Every setting the Turnpike framework keeps track of is given a default value here. * These values can be overridden in your project's config.json file, and can also * finally be overridden with environment variables. In all cases, a matching environment * variable should take precendence over any other way a setting can be specified. */ var _ = require('underscore'); var config = { testing: false, port: 1337 }; var load = function(localConfig) { _(config).extend(localConfig); env_vars(); } var env_vars = function() { } module.exports = config;
Add some basics to get the server going enough for further testing.
Add some basics to get the server going enough for further testing.
JavaScript
mit
jay-depot/turnpike,jay-depot/turnpike
javascript
## Code Before: /** * Created by unleet on 11/2/13. */ ## Instruction: Add some basics to get the server going enough for further testing. ## Code After: /** * A 12-factor friendly configuration manager. * Every setting the Turnpike framework keeps track of is given a default value here. * These values can be overridden in your project's config.json file, and can also * finally be overridden with environment variables. In all cases, a matching environment * variable should take precendence over any other way a setting can be specified. */ var _ = require('underscore'); var config = { testing: false, port: 1337 }; var load = function(localConfig) { _(config).extend(localConfig); env_vars(); } var env_vars = function() { } module.exports = config;
/** - * Created by unleet on 11/2/13. + * A 12-factor friendly configuration manager. + * Every setting the Turnpike framework keeps track of is given a default value here. + * These values can be overridden in your project's config.json file, and can also + * finally be overridden with environment variables. In all cases, a matching environment + * variable should take precendence over any other way a setting can be specified. */ + + var _ = require('underscore'); + var config = { + testing: false, + port: 1337 + }; + + var load = function(localConfig) { + _(config).extend(localConfig); + env_vars(); + } + + var env_vars = function() { + + } + + module.exports = config;
23
7.666667
22
1
c55b3e935422b4f7c6cda96498fe6179a7bab487
README.md
README.md
Go library for accessing Mikrotik devices using the RouterOS API. Look in the examples directory to learn how to use this library: [run](examples/run/main.go), [listen](examples/listen/main.go). API documentation is available at [godoc.org](https://godoc.org/github.com/go-routeros/routeros). Page on the [Mikrotik Wiki](http://wiki.mikrotik.com/wiki/API_in_Go). Released versions: [**v1**](https://github.com/go-routeros/routeros/tree/v1)
Go library for accessing Mikrotik devices using the RouterOS API. Look in the examples directory to learn how to use this library: [run](examples/run/main.go), [listen](examples/listen/main.go). [tab](examples/tab/main.go). API documentation is available at [godoc.org](https://godoc.org/github.com/go-routeros/routeros). Page on the [Mikrotik Wiki](http://wiki.mikrotik.com/wiki/API_in_Go). Released versions: [**v2**](https://github.com/go-routeros/routeros/tree/v2) [**v1**](https://github.com/go-routeros/routeros/tree/v1)
Add link to version 2 and "tab" example
Add link to version 2 and "tab" example
Markdown
mit
go-routeros/routeros
markdown
## Code Before: Go library for accessing Mikrotik devices using the RouterOS API. Look in the examples directory to learn how to use this library: [run](examples/run/main.go), [listen](examples/listen/main.go). API documentation is available at [godoc.org](https://godoc.org/github.com/go-routeros/routeros). Page on the [Mikrotik Wiki](http://wiki.mikrotik.com/wiki/API_in_Go). Released versions: [**v1**](https://github.com/go-routeros/routeros/tree/v1) ## Instruction: Add link to version 2 and "tab" example ## Code After: Go library for accessing Mikrotik devices using the RouterOS API. Look in the examples directory to learn how to use this library: [run](examples/run/main.go), [listen](examples/listen/main.go). [tab](examples/tab/main.go). API documentation is available at [godoc.org](https://godoc.org/github.com/go-routeros/routeros). Page on the [Mikrotik Wiki](http://wiki.mikrotik.com/wiki/API_in_Go). Released versions: [**v2**](https://github.com/go-routeros/routeros/tree/v2) [**v1**](https://github.com/go-routeros/routeros/tree/v1)
Go library for accessing Mikrotik devices using the RouterOS API. Look in the examples directory to learn how to use this library: [run](examples/run/main.go), [listen](examples/listen/main.go). + [tab](examples/tab/main.go). API documentation is available at [godoc.org](https://godoc.org/github.com/go-routeros/routeros). Page on the [Mikrotik Wiki](http://wiki.mikrotik.com/wiki/API_in_Go). Released versions: + [**v2**](https://github.com/go-routeros/routeros/tree/v2) [**v1**](https://github.com/go-routeros/routeros/tree/v1)
2
0.166667
2
0