commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
58cdd9c7945fb3cf79f3afe874355a5063ebe9a4
docs/guides/theme-directory.md
docs/guides/theme-directory.md
* [Photorealistic Theme](https://github.com/yishn/sabaki-photorealistic-theme) * [Subdued Theme](https://github.com/fohristiwhirl/sabaki_subdued_theme) * [Walnut Theme](https://github.com/ParmuzinAlexander/sabaki-walnut-theme) * [Light Wood Theme](https://github.com/ParmuzinAlexander/sabaki-light-wood-theme) * [Shell Stone Theme](https://github.com/ParmuzinAlexander/sabaki-shell-stone-theme) * [Pine Theme](https://github.com/ParmuzinAlexander/sabaki-pine-theme) * [Goyabao Theme](https://github.com/ParmuzinAlexander/sabaki-goyabao-theme) * [Flat Theme](https://github.com/ParmuzinAlexander/sabaki-flat-theme) * [Paper Theme](https://github.com/ParmuzinAlexander/sabaki-paper-theme) * [One Color Mode](https://github.com/ParmuzinAlexander/sabaki-one-color) * [Blind Mode](https://github.com/ParmuzinAlexander/sabaki-blind) Feel free to send in a pull request to add yours to the list!
* [Photorealistic Theme](https://github.com/yishn/sabaki-photorealistic-theme) * [Subdued Theme](https://github.com/fohristiwhirl/sabaki_subdued_theme) * [Walnut Theme](https://github.com/ParmuzinAlexander/sabaki-walnut-theme) * [Light Wood Theme](https://github.com/ParmuzinAlexander/sabaki-light-wood-theme) * [Shell Stone Theme](https://github.com/ParmuzinAlexander/sabaki-shell-stone-theme) * [Pine Theme](https://github.com/ParmuzinAlexander/sabaki-pine-theme) * [Goyabao Theme](https://github.com/ParmuzinAlexander/sabaki-goyabao-theme) * [Flat Theme](https://github.com/ParmuzinAlexander/sabaki-flat-theme) * [Paper Theme](https://github.com/ParmuzinAlexander/sabaki-paper-theme) * [One Color Mode](https://github.com/ParmuzinAlexander/sabaki-one-color) * [Blind Mode](https://github.com/ParmuzinAlexander/sabaki-blind) You can also customize Sabaki using a [userstyle](userstyle-tutorial.md). Learn [how to package a userstyle into a theme](create-themes.md) and feel free to send in a pull request to add yours to the list!
Add links to userstyle tutorial and theme packaging
Add links to userstyle tutorial and theme packaging
Markdown
mit
yishn/Sabaki,yishn/Goban,yishn/Goban,yishn/Sabaki
markdown
## Code Before: * [Photorealistic Theme](https://github.com/yishn/sabaki-photorealistic-theme) * [Subdued Theme](https://github.com/fohristiwhirl/sabaki_subdued_theme) * [Walnut Theme](https://github.com/ParmuzinAlexander/sabaki-walnut-theme) * [Light Wood Theme](https://github.com/ParmuzinAlexander/sabaki-light-wood-theme) * [Shell Stone Theme](https://github.com/ParmuzinAlexander/sabaki-shell-stone-theme) * [Pine Theme](https://github.com/ParmuzinAlexander/sabaki-pine-theme) * [Goyabao Theme](https://github.com/ParmuzinAlexander/sabaki-goyabao-theme) * [Flat Theme](https://github.com/ParmuzinAlexander/sabaki-flat-theme) * [Paper Theme](https://github.com/ParmuzinAlexander/sabaki-paper-theme) * [One Color Mode](https://github.com/ParmuzinAlexander/sabaki-one-color) * [Blind Mode](https://github.com/ParmuzinAlexander/sabaki-blind) Feel free to send in a pull request to add yours to the list! ## Instruction: Add links to userstyle tutorial and theme packaging ## Code After: * [Photorealistic Theme](https://github.com/yishn/sabaki-photorealistic-theme) * [Subdued Theme](https://github.com/fohristiwhirl/sabaki_subdued_theme) * [Walnut Theme](https://github.com/ParmuzinAlexander/sabaki-walnut-theme) * [Light Wood Theme](https://github.com/ParmuzinAlexander/sabaki-light-wood-theme) * [Shell Stone Theme](https://github.com/ParmuzinAlexander/sabaki-shell-stone-theme) * [Pine Theme](https://github.com/ParmuzinAlexander/sabaki-pine-theme) * [Goyabao Theme](https://github.com/ParmuzinAlexander/sabaki-goyabao-theme) * [Flat Theme](https://github.com/ParmuzinAlexander/sabaki-flat-theme) * [Paper Theme](https://github.com/ParmuzinAlexander/sabaki-paper-theme) * [One Color Mode](https://github.com/ParmuzinAlexander/sabaki-one-color) * [Blind Mode](https://github.com/ParmuzinAlexander/sabaki-blind) You can also customize Sabaki using a [userstyle](userstyle-tutorial.md). Learn [how to package a userstyle into a theme](create-themes.md) and feel free to send in a pull request to add yours to the list!
f26a59aae33fd1afef919427e0c36e744cb904fc
test/test_normalizedString.py
test/test_normalizedString.py
from rdflib import * import unittest class test_normalisedString(unittest.TestCase): def test1(self): lit2 = Literal("\two\nw", datatype=XSD.normalizedString) lit = Literal("\two\nw", datatype=XSD.string) self.assertEqual(lit == lit2, False) def test2(self): lit = Literal("\tBeing a Doctor Is\n\ta Full-Time Job\r", datatype=XSD.normalizedString) st = Literal(" Being a Doctor Is a Full-Time Job ", datatype=XSD.string) self.assertFalse(Literal.eq(st,lit)) def test3(self): lit=Literal("hey\nthere", datatype=XSD.normalizedString).n3() print(lit) self.assertTrue(lit=="\"hey there\"^^<http://www.w3.org/2001/XMLSchema#normalizedString>") if __name__ == "__main__": unittest.main()
from rdflib import Literal from rdflib.namespace import XSD import unittest class test_normalisedString(unittest.TestCase): def test1(self): lit2 = Literal("\two\nw", datatype=XSD.normalizedString) lit = Literal("\two\nw", datatype=XSD.string) self.assertEqual(lit == lit2, False) def test2(self): lit = Literal("\tBeing a Doctor Is\n\ta Full-Time Job\r", datatype=XSD.normalizedString) st = Literal(" Being a Doctor Is a Full-Time Job ", datatype=XSD.string) self.assertFalse(Literal.eq(st,lit)) def test3(self): lit = Literal("hey\nthere", datatype=XSD.normalizedString).n3() self.assertTrue(lit=="\"hey there\"^^<http://www.w3.org/2001/XMLSchema#normalizedString>") def test4(self): lit = Literal("hey\nthere\ta tab\rcarriage return", datatype=XSD.normalizedString) expected = Literal("""hey there a tab carriage return""", datatype=XSD.string) self.assertEqual(str(lit), str(expected)) if __name__ == "__main__": unittest.main()
Add a new test to test all chars that are getting replaced
Add a new test to test all chars that are getting replaced
Python
bsd-3-clause
RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib
python
## Code Before: from rdflib import * import unittest class test_normalisedString(unittest.TestCase): def test1(self): lit2 = Literal("\two\nw", datatype=XSD.normalizedString) lit = Literal("\two\nw", datatype=XSD.string) self.assertEqual(lit == lit2, False) def test2(self): lit = Literal("\tBeing a Doctor Is\n\ta Full-Time Job\r", datatype=XSD.normalizedString) st = Literal(" Being a Doctor Is a Full-Time Job ", datatype=XSD.string) self.assertFalse(Literal.eq(st,lit)) def test3(self): lit=Literal("hey\nthere", datatype=XSD.normalizedString).n3() print(lit) self.assertTrue(lit=="\"hey there\"^^<http://www.w3.org/2001/XMLSchema#normalizedString>") if __name__ == "__main__": unittest.main() ## Instruction: Add a new test to test all chars that are getting replaced ## Code After: from rdflib import Literal from rdflib.namespace import XSD import unittest class test_normalisedString(unittest.TestCase): def test1(self): lit2 = Literal("\two\nw", datatype=XSD.normalizedString) lit = Literal("\two\nw", datatype=XSD.string) self.assertEqual(lit == lit2, False) def test2(self): lit = Literal("\tBeing a Doctor Is\n\ta Full-Time Job\r", datatype=XSD.normalizedString) st = Literal(" Being a Doctor Is a Full-Time Job ", datatype=XSD.string) self.assertFalse(Literal.eq(st,lit)) def test3(self): lit = Literal("hey\nthere", datatype=XSD.normalizedString).n3() self.assertTrue(lit=="\"hey there\"^^<http://www.w3.org/2001/XMLSchema#normalizedString>") def test4(self): lit = Literal("hey\nthere\ta tab\rcarriage return", datatype=XSD.normalizedString) expected = Literal("""hey there a tab carriage return""", datatype=XSD.string) self.assertEqual(str(lit), str(expected)) if __name__ == "__main__": unittest.main()
b0cece6fda3e93f48cc26f0c7f806f4e616cd256
init.rb
init.rb
require 'redmine' Redmine::Plugin.register :redmine_pureftpd_user do name 'Redmine Pureftpd User plugin' author 'Author name' description 'This is a plugin for Redmine' version '0.0.1' end
require 'redmine' Redmine::Plugin.register :redmine_pureftpd_user do name 'Redmine Pureftpd User plugin' author 'Bernd Ahlers' description 'This plugin maintains a table with pureftpd compatible users.' version '0.9' end
Add a description, my name and a version number.
Add a description, my name and a version number.
Ruby
isc
bytemine/redmine_pureftpd_user
ruby
## Code Before: require 'redmine' Redmine::Plugin.register :redmine_pureftpd_user do name 'Redmine Pureftpd User plugin' author 'Author name' description 'This is a plugin for Redmine' version '0.0.1' end ## Instruction: Add a description, my name and a version number. ## Code After: require 'redmine' Redmine::Plugin.register :redmine_pureftpd_user do name 'Redmine Pureftpd User plugin' author 'Bernd Ahlers' description 'This plugin maintains a table with pureftpd compatible users.' version '0.9' end
e1032761ed78ede17fd32f3353de3998d6389358
src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
src/main/java/net/sf/taverna/t2/activities/beanshell/servicedescriptions/BeanshellTemplateService.java
package net.sf.taverna.t2.activities.beanshell.servicedescriptions; import javax.swing.Icon; import net.sf.taverna.t2.activities.beanshell.BeanshellActivity; import net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean; import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService; import net.sf.taverna.t2.servicedescriptions.ServiceDescription; public class BeanshellTemplateService extends AbstractTemplateService<BeanshellActivityConfigurationBean> { private static final String BEANSHELL = "Beanshell"; public String getName() { return BEANSHELL; } @Override public Class<BeanshellActivity> getActivityClass() { return BeanshellActivity.class; } @Override public BeanshellActivityConfigurationBean getActivityConfiguration() { return new BeanshellActivityConfigurationBean(); } @Override public Icon getIcon() { return BeanshellActivityIcon.getBeanshellIcon(); } @Override public String getDescription() { return "A service that allows Beanshell scripts, with dependencies on libraries"; } public static ServiceDescription getServiceDescription() { BeanshellTemplateService bts = new BeanshellTemplateService(); return bts.templateService; } }
package net.sf.taverna.t2.activities.beanshell.servicedescriptions; import java.net.URI; import javax.swing.Icon; import net.sf.taverna.t2.activities.beanshell.BeanshellActivity; import net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean; import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService; import net.sf.taverna.t2.servicedescriptions.ServiceDescription; public class BeanshellTemplateService extends AbstractTemplateService<BeanshellActivityConfigurationBean> { private static final String BEANSHELL = "Beanshell"; private static final URI providerId = URI .create("http://taverna.sf.net/2010/service-provider/beanshell"); public String getName() { return BEANSHELL; } @Override public Class<BeanshellActivity> getActivityClass() { return BeanshellActivity.class; } @Override public BeanshellActivityConfigurationBean getActivityConfiguration() { return new BeanshellActivityConfigurationBean(); } @Override public Icon getIcon() { return BeanshellActivityIcon.getBeanshellIcon(); } @Override public String getDescription() { return "A service that allows Beanshell scripts, with dependencies on libraries"; } @SuppressWarnings("unchecked") public static ServiceDescription getServiceDescription() { BeanshellTemplateService bts = new BeanshellTemplateService(); return bts.templateService; } public String getId() { return providerId.toString(); } }
Fix for T2-674: Hardcoded default locations. System default configurable providers are now read from a file in Taverna startup/conf directory. Failing that - they are read from a hard coded list. User can now import and export services from such files as well.
Fix for T2-674: Hardcoded default locations. System default configurable providers are now read from a file in Taverna startup/conf directory. Failing that - they are read from a hard coded list. User can now import and export services from such files as well. git-svn-id: 2b4c7ad77658e4b3615e54128c4b6795c159dfbb@10041 bf327186-88b3-11dd-a302-d386e5130c1c
Java
apache-2.0
apache/incubator-taverna-workbench-common-activities
java
## Code Before: package net.sf.taverna.t2.activities.beanshell.servicedescriptions; import javax.swing.Icon; import net.sf.taverna.t2.activities.beanshell.BeanshellActivity; import net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean; import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService; import net.sf.taverna.t2.servicedescriptions.ServiceDescription; public class BeanshellTemplateService extends AbstractTemplateService<BeanshellActivityConfigurationBean> { private static final String BEANSHELL = "Beanshell"; public String getName() { return BEANSHELL; } @Override public Class<BeanshellActivity> getActivityClass() { return BeanshellActivity.class; } @Override public BeanshellActivityConfigurationBean getActivityConfiguration() { return new BeanshellActivityConfigurationBean(); } @Override public Icon getIcon() { return BeanshellActivityIcon.getBeanshellIcon(); } @Override public String getDescription() { return "A service that allows Beanshell scripts, with dependencies on libraries"; } public static ServiceDescription getServiceDescription() { BeanshellTemplateService bts = new BeanshellTemplateService(); return bts.templateService; } } ## Instruction: Fix for T2-674: Hardcoded default locations. System default configurable providers are now read from a file in Taverna startup/conf directory. Failing that - they are read from a hard coded list. User can now import and export services from such files as well. git-svn-id: 2b4c7ad77658e4b3615e54128c4b6795c159dfbb@10041 bf327186-88b3-11dd-a302-d386e5130c1c ## Code After: package net.sf.taverna.t2.activities.beanshell.servicedescriptions; import java.net.URI; import javax.swing.Icon; import net.sf.taverna.t2.activities.beanshell.BeanshellActivity; import net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean; import net.sf.taverna.t2.servicedescriptions.AbstractTemplateService; import net.sf.taverna.t2.servicedescriptions.ServiceDescription; public class BeanshellTemplateService extends AbstractTemplateService<BeanshellActivityConfigurationBean> { private static final String BEANSHELL = "Beanshell"; private static final URI providerId = URI .create("http://taverna.sf.net/2010/service-provider/beanshell"); public String getName() { return BEANSHELL; } @Override public Class<BeanshellActivity> getActivityClass() { return BeanshellActivity.class; } @Override public BeanshellActivityConfigurationBean getActivityConfiguration() { return new BeanshellActivityConfigurationBean(); } @Override public Icon getIcon() { return BeanshellActivityIcon.getBeanshellIcon(); } @Override public String getDescription() { return "A service that allows Beanshell scripts, with dependencies on libraries"; } @SuppressWarnings("unchecked") public static ServiceDescription getServiceDescription() { BeanshellTemplateService bts = new BeanshellTemplateService(); return bts.templateService; } public String getId() { return providerId.toString(); } }
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
e1d7c7583d2eb6f54438431c9e3abe26e02d630f
lumify-web-war/src/main/webapp/js/util/withAsyncQueue.js
lumify-web-war/src/main/webapp/js/util/withAsyncQueue.js
define([], function() { 'use strict'; return withAsyncQueue; function withAsyncQueue() { this.before('initialize', function() { var self = this, deferreds = {}, stacks = {}; this.setupAsyncQueue = function(name) { var stack = stacks[name] = [], objectData; self[name + 'Ready'] = function(callback) { if (callback) { // Legacy non-promise if (objectData) { callback.call(self, objectData); } else { stack.push(callback); } } else { return deferreds[name] || (deferreds[name] = $.Deferred()); } }; self[name + 'IsReady'] = function() { if (deferreds[name]) { return deferreds[name].isResolved(); } return objectData !== undefined; }; self[name + 'MarkReady'] = function(data) { if (!data) throw "No object passed to " + name + "MarkReady"; if (deferreds[name]) { deferreds[name].resolve(data); } else { deferreds[name] = $.Deferred(); deferreds[name].resolve(data); } objectData = data; stack.forEach(function(c) { c.call(self, objectData); }); stack.length = 0; }; self[name + 'Unload'] = function() { deferreds[name] = null; objectData = null; }; }; }); } });
define([], function() { 'use strict'; return withAsyncQueue; function withAsyncQueue() { this.before('initialize', function() { var self = this, deferreds = {}, stacks = {}; this.setupAsyncQueue = function(name) { var stack = stacks[name] = [], objectData; self[name + 'Ready'] = function(callback) { if (callback) { // Legacy non-promise if (objectData) { callback.call(self, objectData); } else { stack.push(callback); } } else { return deferreds[name] || (deferreds[name] = $.Deferred()); } }; self[name + 'IsReady'] = function() { if (deferreds[name]) { return deferreds[name].state() == 'resolved'; } return objectData !== undefined; }; self[name + 'MarkReady'] = function(data) { if (!data) throw "No object passed to " + name + "MarkReady"; if (deferreds[name]) { deferreds[name].resolve(data); } else { deferreds[name] = $.Deferred(); deferreds[name].resolve(data); } objectData = data; stack.forEach(function(c) { c.call(self, objectData); }); stack.length = 0; }; self[name + 'Unload'] = function() { deferreds[name] = null; objectData = null; }; }; }); } });
Fix error from removed api after upgrading jquery
Fix error from removed api after upgrading jquery
JavaScript
apache-2.0
j-bernardo/lumify,RavenB/lumify,Steimel/lumify,TeamUDS/lumify,Steimel/lumify,RavenB/lumify,TeamUDS/lumify,dvdnglnd/lumify,lumifyio/lumify,bings/lumify,j-bernardo/lumify,lumifyio/lumify,j-bernardo/lumify,lumifyio/lumify,dvdnglnd/lumify,RavenB/lumify,Steimel/lumify,dvdnglnd/lumify,lumifyio/lumify,bings/lumify,bings/lumify,bings/lumify,Steimel/lumify,TeamUDS/lumify,RavenB/lumify,TeamUDS/lumify,RavenB/lumify,j-bernardo/lumify,dvdnglnd/lumify,lumifyio/lumify,dvdnglnd/lumify,TeamUDS/lumify,bings/lumify,Steimel/lumify,j-bernardo/lumify
javascript
## Code Before: define([], function() { 'use strict'; return withAsyncQueue; function withAsyncQueue() { this.before('initialize', function() { var self = this, deferreds = {}, stacks = {}; this.setupAsyncQueue = function(name) { var stack = stacks[name] = [], objectData; self[name + 'Ready'] = function(callback) { if (callback) { // Legacy non-promise if (objectData) { callback.call(self, objectData); } else { stack.push(callback); } } else { return deferreds[name] || (deferreds[name] = $.Deferred()); } }; self[name + 'IsReady'] = function() { if (deferreds[name]) { return deferreds[name].isResolved(); } return objectData !== undefined; }; self[name + 'MarkReady'] = function(data) { if (!data) throw "No object passed to " + name + "MarkReady"; if (deferreds[name]) { deferreds[name].resolve(data); } else { deferreds[name] = $.Deferred(); deferreds[name].resolve(data); } objectData = data; stack.forEach(function(c) { c.call(self, objectData); }); stack.length = 0; }; self[name + 'Unload'] = function() { deferreds[name] = null; objectData = null; }; }; }); } }); ## Instruction: Fix error from removed api after upgrading jquery ## Code After: define([], function() { 'use strict'; return withAsyncQueue; function withAsyncQueue() { this.before('initialize', function() { var self = this, deferreds = {}, stacks = {}; this.setupAsyncQueue = function(name) { var stack = stacks[name] = [], objectData; self[name + 'Ready'] = function(callback) { if (callback) { // Legacy non-promise if (objectData) { callback.call(self, objectData); } else { stack.push(callback); } } else { return deferreds[name] || (deferreds[name] = $.Deferred()); } }; self[name + 'IsReady'] = function() { if (deferreds[name]) { return deferreds[name].state() == 'resolved'; } return objectData !== undefined; }; self[name + 'MarkReady'] = function(data) { if (!data) throw "No object passed to " + name + "MarkReady"; if (deferreds[name]) { deferreds[name].resolve(data); } else { deferreds[name] = $.Deferred(); deferreds[name].resolve(data); } objectData = data; stack.forEach(function(c) { c.call(self, objectData); }); stack.length = 0; }; self[name + 'Unload'] = function() { deferreds[name] = null; objectData = null; }; }; }); } });
e164bc4dbdd3fa7bf6275e634b0417254eaaad1c
Server/Java/httprpc-server-test/src/org/httprpc/test/testdata.html
Server/Java/httprpc-server-test/src/org/httprpc/test/testdata.html
<html> <head> <title>Test Data</title> <style type="text/css" media="screen"> table { border-collapse:collapse; border:1px solid #000000; } td { border:1px solid #000000; } </style> </head> <body> <table> <tr> <td>{{@a}}</td> <td>{{@b}}</td> <td>{{@c}}</td> </tr> {{#.}}<tr> <td>{{a:test=lower:^html}}</td> <td>{{b:format=0x%04x}}</td> <td>{{c:format=currency}}</td> </tr>{{/.}} </table> </body> </html>
<html> <head> <title>Test Data</title> <style type="text/css" media="screen"> table { border-collapse:collapse; border:1px solid #000000; } td { border:1px solid #000000; } </style> </head> <body> <p>UTF-8 characters: åéîóü</p> <table> <tr> <td>{{@a}}</td> <td>{{@b}}</td> <td>{{@c}}</td> </tr> {{#.}}<tr> <td>{{a:test=lower:^html}}</td> <td>{{b:format=0x%04x}}</td> <td>{{c:format=currency}}</td> </tr>{{/.}} </table> </body> </html>
Add UTF-8 characters to test template.
Add UTF-8 characters to test template.
HTML
apache-2.0
gk-brown/HTTP-RPC,gk-brown/WebRPC,gk-brown/WebRPC,gk-brown/WebRPC,gk-brown/HTTP-RPC,gk-brown/WebRPC,gk-brown/WebRPC,gk-brown/WebRPC,gk-brown/HTTP-RPC
html
## Code Before: <html> <head> <title>Test Data</title> <style type="text/css" media="screen"> table { border-collapse:collapse; border:1px solid #000000; } td { border:1px solid #000000; } </style> </head> <body> <table> <tr> <td>{{@a}}</td> <td>{{@b}}</td> <td>{{@c}}</td> </tr> {{#.}}<tr> <td>{{a:test=lower:^html}}</td> <td>{{b:format=0x%04x}}</td> <td>{{c:format=currency}}</td> </tr>{{/.}} </table> </body> </html> ## Instruction: Add UTF-8 characters to test template. ## Code After: <html> <head> <title>Test Data</title> <style type="text/css" media="screen"> table { border-collapse:collapse; border:1px solid #000000; } td { border:1px solid #000000; } </style> </head> <body> <p>UTF-8 characters: åéîóü</p> <table> <tr> <td>{{@a}}</td> <td>{{@b}}</td> <td>{{@c}}</td> </tr> {{#.}}<tr> <td>{{a:test=lower:^html}}</td> <td>{{b:format=0x%04x}}</td> <td>{{c:format=currency}}</td> </tr>{{/.}} </table> </body> </html>
4103880c2f45da04bd05d94c1f3e3fbedd8f9c44
Bundle/TemplateBundle/Resources/views/Template/index.html.twig
Bundle/TemplateBundle/Resources/views/Template/index.html.twig
{% extends 'VictoireCoreBundle::_modal.html.twig' %} {% trans_default_domain "victoire" %} {% block modal_container_classes %}{{ parent() }} vic-view-modal{% endblock modal_container_classes %} {% block modal_header_title %} {{'index.template.modal.header'|trans({}, 'victoire')}} {% endblock modal_header_title %} {% block modal_body_content %} {{ _self.templatesHierarchy(templates) }} {% endblock modal_body_content %} {% macro templatesHierarchy(templates) %} {% for template in templates %} <li id="list_{{template.id}}"><a href="{{path('victoire_template_show', {'id' : template.id })}}">{{ template.name|default('#' ~ template.id) }}</a> {% if template.templateInheritors %} <ul> {{ _self.templatesHierarchy(template.templateInheritors) }} </ul> {% endif %} </li> {% endfor %} {% endmacro %} {% block modal_footer_content %} {% endblock modal_footer_content %}
{% extends 'VictoireCoreBundle::_modal.html.twig' %} {% trans_default_domain "victoire" %} {% block modal_container_classes %}{{ parent() }} vic-view-modal{% endblock modal_container_classes %} {% block modal_header_title %} {{'index.template.modal.header'|trans({}, 'victoire')}} {% endblock modal_header_title %} {% block modal_body_content %} {{ _self.templatesHierarchy(templates) }} {% endblock modal_body_content %} {% macro templatesHierarchy(templates) %} {% for template in templates %} <li id="list_{{template.id}}"><a href="{{path('victoire_template_show', {'id' : template.id })}}">{{ template.backendName|default(template.name)|default('#' ~ template.id) }}</a> {% if template.templateInheritors %} <ul> {{ _self.templatesHierarchy(template.templateInheritors) }} </ul> {% endif %} </li> {% endfor %} {% endmacro %} {% block modal_footer_content %} {% endblock modal_footer_content %}
Use Template backendName if set in Template modal list
Use Template backendName if set in Template modal list
Twig
mit
gregumo/victoire,lenybernard/victoire,Victoire/victoire,Victoire/victoire,alexislefebvre/victoire,gregumo/victoire,MadeWilson/victoire,lenybernard/victoire,talbotseb/victoire,MadeWilson/victoire,alexislefebvre/victoire,MadeWilson/victoire,Victoire/victoire,lenybernard/victoire,gregumo/victoire,MadeWilson/victoire,talbotseb/victoire,lenybernard/victoire,Victoire/victoire,alexislefebvre/victoire,talbotseb/victoire,gregumo/victoire,alexislefebvre/victoire,talbotseb/victoire
twig
## Code Before: {% extends 'VictoireCoreBundle::_modal.html.twig' %} {% trans_default_domain "victoire" %} {% block modal_container_classes %}{{ parent() }} vic-view-modal{% endblock modal_container_classes %} {% block modal_header_title %} {{'index.template.modal.header'|trans({}, 'victoire')}} {% endblock modal_header_title %} {% block modal_body_content %} {{ _self.templatesHierarchy(templates) }} {% endblock modal_body_content %} {% macro templatesHierarchy(templates) %} {% for template in templates %} <li id="list_{{template.id}}"><a href="{{path('victoire_template_show', {'id' : template.id })}}">{{ template.name|default('#' ~ template.id) }}</a> {% if template.templateInheritors %} <ul> {{ _self.templatesHierarchy(template.templateInheritors) }} </ul> {% endif %} </li> {% endfor %} {% endmacro %} {% block modal_footer_content %} {% endblock modal_footer_content %} ## Instruction: Use Template backendName if set in Template modal list ## Code After: {% extends 'VictoireCoreBundle::_modal.html.twig' %} {% trans_default_domain "victoire" %} {% block modal_container_classes %}{{ parent() }} vic-view-modal{% endblock modal_container_classes %} {% block modal_header_title %} {{'index.template.modal.header'|trans({}, 'victoire')}} {% endblock modal_header_title %} {% block modal_body_content %} {{ _self.templatesHierarchy(templates) }} {% endblock modal_body_content %} {% macro templatesHierarchy(templates) %} {% for template in templates %} <li id="list_{{template.id}}"><a href="{{path('victoire_template_show', {'id' : template.id })}}">{{ template.backendName|default(template.name)|default('#' ~ template.id) }}</a> {% if template.templateInheritors %} <ul> {{ _self.templatesHierarchy(template.templateInheritors) }} </ul> {% endif %} </li> {% endfor %} {% endmacro %} {% block modal_footer_content %} {% endblock modal_footer_content %}
28fa291792423021e81165e564f53f979ee9912a
sling-images/pom.xml
sling-images/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ch.x42.at16</groupId> <artifactId>reactor</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>Sling adaptoTo() 2016 Demo Reactor</name> <modules> <module>parent</module> <module>images/worker-selector</module> <module>images/default-worker</module> <module>images/slingshot</module> <module>images/base</module> <module>bundles/support-bundle</module> <module>bundles/test-servlets</module> <module>bundles/metrics-es-reporter</module> <module>bundles/instance-info</module> </modules> </project>
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ch.x42.at16</groupId> <artifactId>reactor</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>Sling adaptoTo() 2016 Demo Reactor</name> <modules> <module>parent</module> <module>images/worker-selector</module> <module>images/default-worker</module> <module>images/slingshot</module> <module>images/base</module> <module>bundles/support-bundle</module> <module>bundles/test-servlets</module> <module>bundles/metrics-es-reporter</module> <module>bundles/instance-info</module> <module>bundles/worker-selector</module> </modules> </project>
Add worker selector module to reactor
Add worker selector module to reactor
XML
apache-2.0
bdelacretaz/sling-adaptto-2016,bdelacretaz/sling-adaptto-2016
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ch.x42.at16</groupId> <artifactId>reactor</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>Sling adaptoTo() 2016 Demo Reactor</name> <modules> <module>parent</module> <module>images/worker-selector</module> <module>images/default-worker</module> <module>images/slingshot</module> <module>images/base</module> <module>bundles/support-bundle</module> <module>bundles/test-servlets</module> <module>bundles/metrics-es-reporter</module> <module>bundles/instance-info</module> </modules> </project> ## Instruction: Add worker selector module to reactor ## Code After: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ch.x42.at16</groupId> <artifactId>reactor</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <name>Sling adaptoTo() 2016 Demo Reactor</name> <modules> <module>parent</module> <module>images/worker-selector</module> <module>images/default-worker</module> <module>images/slingshot</module> <module>images/base</module> <module>bundles/support-bundle</module> <module>bundles/test-servlets</module> <module>bundles/metrics-es-reporter</module> <module>bundles/instance-info</module> <module>bundles/worker-selector</module> </modules> </project>
8e4fbf59e00475f90dbf7d096550fa906db88370
src/fetch-feed.js
src/fetch-feed.js
var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { util.log(e.message); delegate.onError(e); }); request.on('response', function(response) { util.log('status', response.statusCode); util.log('headers', JSON.stringify(response.headers)); var data = ''; response.setEncoding('utf8'); response.on('data', function(chunk) { data += chunk; }).on('end', function() { if (delegate.verbose) { util.log('data', data); } delegate.onResponse(response, data); }); }); request.end(); };
var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { util.log(e.message); delegate.onError(e); }); request.on('response', function(response) { util.log('status', response.statusCode); util.log('headers', JSON.stringify(response.headers)); if (response.statusCode !== 200) { delegate.onError({ code: response.statusCode, message: response.statusMessage }); return; } var data = ''; response.setEncoding('utf8'); response.on('data', function(chunk) { data += chunk; }).on('end', function() { if (delegate.verbose) { util.log('data', data); } delegate.onResponse(response, data); }); }); request.end(); };
Convert non-200 fetch responses into errors
Convert non-200 fetch responses into errors
JavaScript
mit
hlfcoding/custom-rss
javascript
## Code Before: var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { util.log(e.message); delegate.onError(e); }); request.on('response', function(response) { util.log('status', response.statusCode); util.log('headers', JSON.stringify(response.headers)); var data = ''; response.setEncoding('utf8'); response.on('data', function(chunk) { data += chunk; }).on('end', function() { if (delegate.verbose) { util.log('data', data); } delegate.onResponse(response, data); }); }); request.end(); }; ## Instruction: Convert non-200 fetch responses into errors ## Code After: var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { util.log(e.message); delegate.onError(e); }); request.on('response', function(response) { util.log('status', response.statusCode); util.log('headers', JSON.stringify(response.headers)); if (response.statusCode !== 200) { delegate.onError({ code: response.statusCode, message: response.statusMessage }); return; } var data = ''; response.setEncoding('utf8'); response.on('data', function(chunk) { data += chunk; }).on('end', function() { if (delegate.verbose) { util.log('data', data); } delegate.onResponse(response, data); }); }); request.end(); };
40154b300bdd25e6b305b3c422fd3bc7b80623d9
gems/bin/run-yard.rb
gems/bin/run-yard.rb
def force_require(gem_name, version) begin gem gem_name, version rescue Gem::LoadError=> e puts "Installing #{gem_name} gem v#{version}" require 'rubygems/commands/install_command' installer = Gem::Commands::InstallCommand.new installer.options[:args] = [ gem_name ] installer.options[:version] = version installer.options[:generate_rdoc] = false installer.options[:generate_ri] = false retry_count = 0 begin installer.execute rescue Gem::SystemExitException=>e2 rescue Gem::Exception => e3 retry_count += 1 if retry_count > 8 raise e3 else puts "Error fetching remote gem - sleeping and retrying" sleep 1 retry end end Gem.clear_paths end require gem_name end require 'rubygems' force_require 'yard', '0.8.6.2' FILES = "*/lib/**/*.rb" OUTPUT_DIR = "target/yardocs/" OPTIONS = [ "doc", "--title", "TorqueBox Gems Documentation", "-o", OUTPUT_DIR, "--api", "public", "--no-api", "--legacy", "--exclude", "no-op/lib/*", FILES ] puts "Generating yardocs on #{FILES} to #{OUTPUT_DIR}" Dir.chdir( File.join( File.dirname( __FILE__ ), '..' ) ) do YARD::CLI::CommandParser.run( *OPTIONS ) end
def force_require(gem_name, version) begin gem gem_name, version rescue Gem::LoadError=> e puts "Installing #{gem_name} gem v#{version}" require 'rubygems/commands/install_command' installer = Gem::Commands::InstallCommand.new installer.options[:args] = [ gem_name ] installer.options[:version] = version installer.options[:generate_rdoc] = false installer.options[:generate_ri] = false retry_count = 0 begin installer.execute rescue Gem::SystemExitException=>e2 rescue Gem::Exception => e3 retry_count += 1 if retry_count > 8 raise e3 else puts "Error fetching remote gem - sleeping and retrying" sleep 1 retry end end Gem.clear_paths end require gem_name end require 'rubygems' force_require 'yard', '0.8.7.3' FILES = "*/lib/**/*.rb" OUTPUT_DIR = "target/yardocs/" OPTIONS = [ "doc", "--title", "TorqueBox Gems Documentation", "-o", OUTPUT_DIR, "--api", "public", "--no-api", "--legacy", "--no-save", "--exclude", "no-op/lib/*", "--exclude", ".+\/torquebox\/.+\/ext\/.+", FILES ] puts "Generating yardocs on #{FILES} to #{OUTPUT_DIR}" Dir.chdir( File.join( File.dirname( __FILE__ ), '..' ) ) do YARD::CLI::CommandParser.run( *OPTIONS ) end
Upgrade yard and exclude a couple of files to try and get CI building rdocs again
Upgrade yard and exclude a couple of files to try and get CI building rdocs again
Ruby
apache-2.0
vaskoz/torquebox,samwgoldman/torquebox,torquebox/torquebox-release,torquebox/torquebox,ksw2599/torquebox,vaskoz/torquebox,torquebox/torquebox-release,torquebox/torquebox-release,torquebox/torquebox-release,samwgoldman/torquebox,torquebox/torquebox,vaskoz/torquebox,ksw2599/torquebox,mje113/torquebox,mje113/torquebox,ksw2599/torquebox,samwgoldman/torquebox,mje113/torquebox,torquebox/torquebox,samwgoldman/torquebox,mje113/torquebox,vaskoz/torquebox,torquebox/torquebox,ksw2599/torquebox
ruby
## Code Before: def force_require(gem_name, version) begin gem gem_name, version rescue Gem::LoadError=> e puts "Installing #{gem_name} gem v#{version}" require 'rubygems/commands/install_command' installer = Gem::Commands::InstallCommand.new installer.options[:args] = [ gem_name ] installer.options[:version] = version installer.options[:generate_rdoc] = false installer.options[:generate_ri] = false retry_count = 0 begin installer.execute rescue Gem::SystemExitException=>e2 rescue Gem::Exception => e3 retry_count += 1 if retry_count > 8 raise e3 else puts "Error fetching remote gem - sleeping and retrying" sleep 1 retry end end Gem.clear_paths end require gem_name end require 'rubygems' force_require 'yard', '0.8.6.2' FILES = "*/lib/**/*.rb" OUTPUT_DIR = "target/yardocs/" OPTIONS = [ "doc", "--title", "TorqueBox Gems Documentation", "-o", OUTPUT_DIR, "--api", "public", "--no-api", "--legacy", "--exclude", "no-op/lib/*", FILES ] puts "Generating yardocs on #{FILES} to #{OUTPUT_DIR}" Dir.chdir( File.join( File.dirname( __FILE__ ), '..' ) ) do YARD::CLI::CommandParser.run( *OPTIONS ) end ## Instruction: Upgrade yard and exclude a couple of files to try and get CI building rdocs again ## Code After: def force_require(gem_name, version) begin gem gem_name, version rescue Gem::LoadError=> e puts "Installing #{gem_name} gem v#{version}" require 'rubygems/commands/install_command' installer = Gem::Commands::InstallCommand.new installer.options[:args] = [ gem_name ] installer.options[:version] = version installer.options[:generate_rdoc] = false installer.options[:generate_ri] = false retry_count = 0 begin installer.execute rescue Gem::SystemExitException=>e2 rescue Gem::Exception => e3 retry_count += 1 if retry_count > 8 raise e3 else puts "Error fetching remote gem - sleeping and retrying" sleep 1 retry end end Gem.clear_paths end require gem_name end require 'rubygems' force_require 'yard', '0.8.7.3' FILES = "*/lib/**/*.rb" OUTPUT_DIR = "target/yardocs/" OPTIONS = [ "doc", "--title", "TorqueBox Gems Documentation", "-o", OUTPUT_DIR, "--api", "public", "--no-api", "--legacy", "--no-save", "--exclude", "no-op/lib/*", "--exclude", ".+\/torquebox\/.+\/ext\/.+", FILES ] puts "Generating yardocs on #{FILES} to #{OUTPUT_DIR}" Dir.chdir( File.join( File.dirname( __FILE__ ), '..' ) ) do YARD::CLI::CommandParser.run( *OPTIONS ) end
fe7e9727fc008755bc7631073d9faeeab17b020e
config/routes.rb
config/routes.rb
require 'sidekiq/web' if ENV['SIDEKIQ_USERNAME'] && ENV['SIDEKIQ_PASSWORD'] Sidekiq::Web.use Rack::Auth::Basic do |username, password| username == ENV['SIDEKIQ_USERNAME'] && password == ENV['SIDEKIQ_PASSWORD'] end end Rails.application.routes.draw do root 'appointment_summaries#new' resources :appointment_summaries, only: %i(new create show) scope path: 'styleguide', controller: 'styleguide' do scope path: 'pages' do get 'input', action: 'pages_input' get 'output', action: 'pages_output' end get '(/:action)' end mount Sidekiq::Web => '/sidekiq' end
require 'sidekiq/api' require 'sidekiq/web' Sidekiq::Web.get '/rag' do stats = Sidekiq::Stats.new content_type :json { item: [{ value: stats.failed, text: 'Failed' }, { value: stats.enqueued, text: 'Enqueued' }, { value: stats.processed, text: 'Processed' }] }.to_json end if ENV['SIDEKIQ_USERNAME'] && ENV['SIDEKIQ_PASSWORD'] Sidekiq::Web.use Rack::Auth::Basic do |username, password| username == ENV['SIDEKIQ_USERNAME'] && password == ENV['SIDEKIQ_PASSWORD'] end end Rails.application.routes.draw do root 'appointment_summaries#new' resources :appointment_summaries, only: %i(new create show) scope path: 'styleguide', controller: 'styleguide' do scope path: 'pages' do get 'input', action: 'pages_input' get 'output', action: 'pages_output' end get '(/:action)' end mount Sidekiq::Web => '/sidekiq' end
Add Red Amber Green stats to Sidekiq endpoint
Add Red Amber Green stats to Sidekiq endpoint
Ruby
mit
guidance-guarantee-programme/output,guidance-guarantee-programme/output,guidance-guarantee-programme/output
ruby
## Code Before: require 'sidekiq/web' if ENV['SIDEKIQ_USERNAME'] && ENV['SIDEKIQ_PASSWORD'] Sidekiq::Web.use Rack::Auth::Basic do |username, password| username == ENV['SIDEKIQ_USERNAME'] && password == ENV['SIDEKIQ_PASSWORD'] end end Rails.application.routes.draw do root 'appointment_summaries#new' resources :appointment_summaries, only: %i(new create show) scope path: 'styleguide', controller: 'styleguide' do scope path: 'pages' do get 'input', action: 'pages_input' get 'output', action: 'pages_output' end get '(/:action)' end mount Sidekiq::Web => '/sidekiq' end ## Instruction: Add Red Amber Green stats to Sidekiq endpoint ## Code After: require 'sidekiq/api' require 'sidekiq/web' Sidekiq::Web.get '/rag' do stats = Sidekiq::Stats.new content_type :json { item: [{ value: stats.failed, text: 'Failed' }, { value: stats.enqueued, text: 'Enqueued' }, { value: stats.processed, text: 'Processed' }] }.to_json end if ENV['SIDEKIQ_USERNAME'] && ENV['SIDEKIQ_PASSWORD'] Sidekiq::Web.use Rack::Auth::Basic do |username, password| username == ENV['SIDEKIQ_USERNAME'] && password == ENV['SIDEKIQ_PASSWORD'] end end Rails.application.routes.draw do root 'appointment_summaries#new' resources :appointment_summaries, only: %i(new create show) scope path: 'styleguide', controller: 'styleguide' do scope path: 'pages' do get 'input', action: 'pages_input' get 'output', action: 'pages_output' end get '(/:action)' end mount Sidekiq::Web => '/sidekiq' end
1ed6b53f436690f4e2e17185c6ab39873008f82b
i18n-spec.gemspec
i18n-spec.gemspec
require_relative "lib/i18n-spec/version" Gem::Specification.new do |s| s.name = "i18n-spec" s.version = I18nSpec::VERSION s.required_ruby_version = ">= 2.3.0" s.require_paths = ["lib"] s.authors = ["Christopher Dell"] s.date = "2014-10-27" s.description = "Includes a number of rspec matchers to make specing your locale files easy peasy." s.email = "[email protected]" s.extra_rdoc_files = [ "LICENSE.txt", "README.md" ] s.files = Dir["lib/**/*.rb"] s.homepage = "http://github.com/tigrish/i18n-spec" s.licenses = ["MIT"] s.summary = "Matchers for specing locale files" s.add_runtime_dependency "iso", "~> 0.2" s.add_development_dependency "bundler", "~> 1.0" end
require_relative "lib/i18n-spec/version" Gem::Specification.new do |s| s.name = "i18n-spec" s.version = I18nSpec::VERSION s.required_ruby_version = ">= 2.3.0" s.require_paths = ["lib"] s.authors = ["Christopher Dell"] s.description = "Includes a number of rspec matchers to make specing your locale files easy peasy." s.email = "[email protected]" s.extra_rdoc_files = [ "LICENSE.txt", "README.md" ] s.files = Dir["lib/**/*.rb"] s.homepage = "http://github.com/tigrish/i18n-spec" s.licenses = ["MIT"] s.summary = "Matchers for specing locale files" s.add_runtime_dependency "iso", "~> 0.2" s.add_development_dependency "bundler", "~> 1.0" end
Remove date attribute from gemspec
Remove date attribute from gemspec `bundle gem` does not generate this attribute by default, I don't think it provides much value, and it's yet one more thing to keep up to date when releasing.
Ruby
mit
tigrish/i18n-spec
ruby
## Code Before: require_relative "lib/i18n-spec/version" Gem::Specification.new do |s| s.name = "i18n-spec" s.version = I18nSpec::VERSION s.required_ruby_version = ">= 2.3.0" s.require_paths = ["lib"] s.authors = ["Christopher Dell"] s.date = "2014-10-27" s.description = "Includes a number of rspec matchers to make specing your locale files easy peasy." s.email = "[email protected]" s.extra_rdoc_files = [ "LICENSE.txt", "README.md" ] s.files = Dir["lib/**/*.rb"] s.homepage = "http://github.com/tigrish/i18n-spec" s.licenses = ["MIT"] s.summary = "Matchers for specing locale files" s.add_runtime_dependency "iso", "~> 0.2" s.add_development_dependency "bundler", "~> 1.0" end ## Instruction: Remove date attribute from gemspec `bundle gem` does not generate this attribute by default, I don't think it provides much value, and it's yet one more thing to keep up to date when releasing. ## Code After: require_relative "lib/i18n-spec/version" Gem::Specification.new do |s| s.name = "i18n-spec" s.version = I18nSpec::VERSION s.required_ruby_version = ">= 2.3.0" s.require_paths = ["lib"] s.authors = ["Christopher Dell"] s.description = "Includes a number of rspec matchers to make specing your locale files easy peasy." s.email = "[email protected]" s.extra_rdoc_files = [ "LICENSE.txt", "README.md" ] s.files = Dir["lib/**/*.rb"] s.homepage = "http://github.com/tigrish/i18n-spec" s.licenses = ["MIT"] s.summary = "Matchers for specing locale files" s.add_runtime_dependency "iso", "~> 0.2" s.add_development_dependency "bundler", "~> 1.0" end
431a1fab4a7b380163e0ed32063994eabc19a2ff
src/main/resources/css/mockmock.css
src/main/resources/css/mockmock.css
body { padding-top: 60px; } small.deleteLink { font-size: 12px; }
body { padding-top: 60px; } small.deleteLink { font-size: 12px; } div[name=bodyPlainText] div.well, div[name=rawOutput] div.well, div[name=bodyHTML_Unformatted] div.well { white-space: pre-line; }
Use css rule "white-space: pre-line" for stuff where new lines matter
Use css rule "white-space: pre-line" for stuff where new lines matter
CSS
apache-2.0
tweakers-dev/MockMock,tweakers-dev/MockMock,tweakers-dev/MockMock
css
## Code Before: body { padding-top: 60px; } small.deleteLink { font-size: 12px; } ## Instruction: Use css rule "white-space: pre-line" for stuff where new lines matter ## Code After: body { padding-top: 60px; } small.deleteLink { font-size: 12px; } div[name=bodyPlainText] div.well, div[name=rawOutput] div.well, div[name=bodyHTML_Unformatted] div.well { white-space: pre-line; }
56f7db8a5162f45a7a00fa5ad974027345faed89
spec/controllers/pages_controller_spec.rb
spec/controllers/pages_controller_spec.rb
require 'spec_helper' describe PagesController, "GET to #opensearch", type: :controller do context 'when asked for XML file' do render_views before(:each) do get :opensearch, format: 'xml' end it { should respond_with(:success) } it 'renders OpenSearch file successfully' do expect(response.body).to include 'Tariff' end end context 'when asked with no format' do pending do before { get :opensearch } it 'returns HTTP 406 (not supported) status' do expect(response.status).to eq 406 end end it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch }.to raise_error(ActionController::UnknownFormat) end end context 'with unsupported format' do pending do before { get :opensearch, format: :json } it 'returns HTTP 406 (not supported) status' do expect(response.status).to eq 406 end end it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch, format: :json }.to raise_error(ActionController::UnknownFormat) end end end
require 'spec_helper' describe PagesController, "GET to #opensearch", type: :controller do context 'when asked for XML file' do render_views before(:each) do get :opensearch, format: 'xml' end it { should respond_with(:success) } it 'renders OpenSearch file successfully' do expect(response.body).to include 'Tariff' end end context 'when asked with no format' do it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch }.to raise_error(ActionController::UnknownFormat) end end context 'with unsupported format' do it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch, format: :json }.to raise_error(ActionController::UnknownFormat) end end end
Remove pending specs as Rails 4 raises ActionController::UnknownFormat
Remove pending specs as Rails 4 raises ActionController::UnknownFormat
Ruby
mit
bitzesty/trade-tariff-frontend,alphagov/trade-tariff-frontend,alphagov/trade-tariff-frontend,bitzesty/trade-tariff-frontend,alphagov/trade-tariff-frontend,bitzesty/trade-tariff-frontend,alphagov/trade-tariff-frontend,bitzesty/trade-tariff-frontend
ruby
## Code Before: require 'spec_helper' describe PagesController, "GET to #opensearch", type: :controller do context 'when asked for XML file' do render_views before(:each) do get :opensearch, format: 'xml' end it { should respond_with(:success) } it 'renders OpenSearch file successfully' do expect(response.body).to include 'Tariff' end end context 'when asked with no format' do pending do before { get :opensearch } it 'returns HTTP 406 (not supported) status' do expect(response.status).to eq 406 end end it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch }.to raise_error(ActionController::UnknownFormat) end end context 'with unsupported format' do pending do before { get :opensearch, format: :json } it 'returns HTTP 406 (not supported) status' do expect(response.status).to eq 406 end end it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch, format: :json }.to raise_error(ActionController::UnknownFormat) end end end ## Instruction: Remove pending specs as Rails 4 raises ActionController::UnknownFormat ## Code After: require 'spec_helper' describe PagesController, "GET to #opensearch", type: :controller do context 'when asked for XML file' do render_views before(:each) do get :opensearch, format: 'xml' end it { should respond_with(:success) } it 'renders OpenSearch file successfully' do expect(response.body).to include 'Tariff' end end context 'when asked with no format' do it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch }.to raise_error(ActionController::UnknownFormat) end end context 'with unsupported format' do it "raises ActionController::UnknownFormat as per rails 4" do expect { get :opensearch, format: :json }.to raise_error(ActionController::UnknownFormat) end end end
21f18eb3221dcb26c41bd7ae3ec946aaabff3e33
templates/system/modules/validate-site/themes/base/js/validationbox.js
templates/system/modules/validate-site/themes/base/js/validationbox.js
/* * Author: Pierre-Henry Soria <[email protected]> * Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function() { $.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) { $.colorbox({ width : '450px', maxHeight : '85%', speed : 500, scrolling : false, html : $(oData).find('#box_block') }) }) }); $validationBox();
/* * Author: Pierre-Henry Soria <[email protected]> * Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function() { $.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) { $.colorbox({ width : '100%', maxWidth : '450px', maxHeight : '85%', speed : 500, scrolling : false, html : $(oData).find('#box_block') }) }) }); $validationBox();
Fix Validate Site popup when open on mobile phones
Fix Validate Site popup when open on mobile phones
JavaScript
mit
pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS
javascript
## Code Before: /* * Author: Pierre-Henry Soria <[email protected]> * Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function() { $.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) { $.colorbox({ width : '450px', maxHeight : '85%', speed : 500, scrolling : false, html : $(oData).find('#box_block') }) }) }); $validationBox(); ## Instruction: Fix Validate Site popup when open on mobile phones ## Code After: /* * Author: Pierre-Henry Soria <[email protected]> * Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function() { $.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) { $.colorbox({ width : '100%', maxWidth : '450px', maxHeight : '85%', speed : 500, scrolling : false, html : $(oData).find('#box_block') }) }) }); $validationBox();
880d409e8dfda9ec261c639b7aea6bcc10cdcde2
spec/dummy/app/controllers/application_controller.rb
spec/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base protect_from_forgery end
class ApplicationController < ActionController::Base protect_from_forgery def sign_in_path '/sign_in' end end
Define sign_in_path in ApplicationController for dummy application
Define sign_in_path in ApplicationController for dummy application
Ruby
mit
frankel/forem,szymon-przybyl/forem,szymon-przybyl/forem,dmitry-ilyashevich/forem,dmitry-ilyashevich/forem,frankel/forem,caffo/forem,filiptepper/forem,STRd6/forem,isotope11/forem,isotope11/forem,STRd6/forem,substantial/forem,nruth/forem,filiptepper/forem,substantial/forem,nruth/forem,caffo/forem
ruby
## Code Before: class ApplicationController < ActionController::Base protect_from_forgery end ## Instruction: Define sign_in_path in ApplicationController for dummy application ## Code After: class ApplicationController < ActionController::Base protect_from_forgery def sign_in_path '/sign_in' end end
37defc0098b57384475e87c029e7fd765b1211c2
app/workers/extract_extension_basic_metadata_worker.rb
app/workers/extract_extension_basic_metadata_worker.rb
class ExtractExtensionBasicMetadataWorker include Sidekiq::Worker def perform(extension_id) @extension = Extension.find(extension_id) repo = octokit.repo(@extension.github_repo) @extension.update_attributes( extension_followers_count: repo[:stargazers_count], issues_url: "https://github.com/#{@extension.github_repo}/issues" ) end private def octokit @octokit ||= @extension.octokit end end
class ExtractExtensionBasicMetadataWorker include Sidekiq::Worker def perform(extension_id) @extension = Extension.find(extension_id) repo = octokit.repo(@extension.github_repo) Extension.where(id: @extension.id).update_all( extension_followers_count: repo[:stargazers_count], issues_url: "https://github.com/#{@extension.github_repo}/issues" ) end private def octokit @octokit ||= @extension.octokit end end
Use update_all to get around readonly counter cache
Use update_all to get around readonly counter cache
Ruby
apache-2.0
ManageIQ/depot.manageiq.org,ManageIQ/depot.manageiq.org,ManageIQ/depot.manageiq.org,ManageIQ/depot.manageiq.org
ruby
## Code Before: class ExtractExtensionBasicMetadataWorker include Sidekiq::Worker def perform(extension_id) @extension = Extension.find(extension_id) repo = octokit.repo(@extension.github_repo) @extension.update_attributes( extension_followers_count: repo[:stargazers_count], issues_url: "https://github.com/#{@extension.github_repo}/issues" ) end private def octokit @octokit ||= @extension.octokit end end ## Instruction: Use update_all to get around readonly counter cache ## Code After: class ExtractExtensionBasicMetadataWorker include Sidekiq::Worker def perform(extension_id) @extension = Extension.find(extension_id) repo = octokit.repo(@extension.github_repo) Extension.where(id: @extension.id).update_all( extension_followers_count: repo[:stargazers_count], issues_url: "https://github.com/#{@extension.github_repo}/issues" ) end private def octokit @octokit ||= @extension.octokit end end
5b6f3ac716e37b9d03bff3da826dca24826b24eb
jasmine/spec/inverted-index-test.js
jasmine/spec/inverted-index-test.js
describe ("Read book data",function(){ it("assert JSON file is not empty",function(){ var isNotEmpty = function IsJsonString(filePath) { try { JSON.parse(filePath); } catch (e) { return false; } return true; }; expect(isNotEmpty).toBe(true).because('The JSON file should be a valid JSON array'); }); }); describe ("Populate Index",function(){ beforeEach(function() { var myIndexPopulate=JSON.parse(filePath); var myIndexGet=getIndex(myIndexPopulate); }); it("index should be created after reading",function(){ expect(myIndexGet).not.toBe(null).because('Index should be created after reading the file'); }); it("index maps string keys to correct obj", function(){ var myFunction= function() { var testArray=['a','1']; var a=createIndex(testArray); var b=getIndex(a); return b; } expect(myFunction).toBe(['a']).because('Index should return corresponding key'); }); }); describe ("Search Index", function(){ beforeEach(function(){ var testArray=["a","b","c"]; var mySearchIndex= searchIndex(testArray); }); it("searching should returns array of correct indices", function(){ expect(mySearchIndex).toContain("a","b","c"); }); })
describe("Read book data", function() { beforeEach(function(){ var file = filePath.files[0]; var reader = new FileReader(); }); it("assert JSON file is not empty",function(){ var fileNotEmpty = JSON.parse(reader.result); var fileNotEmptyResult = function(fileNotEmpty){ if (fileNotEmpty = null){ return false; } else{ return true; } }; expect(fileNotEmptyResult).toBe(true); }); }); describe("Populate Index", function(){ beforeEach(function() { checkEmpty = new createIndex(); //test using spies to check if methods are exectued spyOn(checkEmpty, 'push'); }); it('should have called and created this function', function(){ //calling the function to see if the code has been executed checkempty.push(term); expect(checkEmpty.push).toHaveBeenCalled(); //because if this method is called the index has been created. }); it("should map string keys to correct objects", function(){ //calling function to see if it is executed in code expect(display.innerText).toBe('Index Created'); }); });
Change the read book test and populate index test
Change the read book test and populate index test
JavaScript
mit
andela-pbirir/inverted-index,andela-pbirir/inverted-index
javascript
## Code Before: describe ("Read book data",function(){ it("assert JSON file is not empty",function(){ var isNotEmpty = function IsJsonString(filePath) { try { JSON.parse(filePath); } catch (e) { return false; } return true; }; expect(isNotEmpty).toBe(true).because('The JSON file should be a valid JSON array'); }); }); describe ("Populate Index",function(){ beforeEach(function() { var myIndexPopulate=JSON.parse(filePath); var myIndexGet=getIndex(myIndexPopulate); }); it("index should be created after reading",function(){ expect(myIndexGet).not.toBe(null).because('Index should be created after reading the file'); }); it("index maps string keys to correct obj", function(){ var myFunction= function() { var testArray=['a','1']; var a=createIndex(testArray); var b=getIndex(a); return b; } expect(myFunction).toBe(['a']).because('Index should return corresponding key'); }); }); describe ("Search Index", function(){ beforeEach(function(){ var testArray=["a","b","c"]; var mySearchIndex= searchIndex(testArray); }); it("searching should returns array of correct indices", function(){ expect(mySearchIndex).toContain("a","b","c"); }); }) ## Instruction: Change the read book test and populate index test ## Code After: describe("Read book data", function() { beforeEach(function(){ var file = filePath.files[0]; var reader = new FileReader(); }); it("assert JSON file is not empty",function(){ var fileNotEmpty = JSON.parse(reader.result); var fileNotEmptyResult = function(fileNotEmpty){ if (fileNotEmpty = null){ return false; } else{ return true; } }; expect(fileNotEmptyResult).toBe(true); }); }); describe("Populate Index", function(){ beforeEach(function() { checkEmpty = new createIndex(); //test using spies to check if methods are exectued spyOn(checkEmpty, 'push'); }); it('should have called and created this function', function(){ //calling the function to see if the code has been executed checkempty.push(term); expect(checkEmpty.push).toHaveBeenCalled(); //because if this method is called the index has been created. }); it("should map string keys to correct objects", function(){ //calling function to see if it is executed in code expect(display.innerText).toBe('Index Created'); }); });
f1b70e31f0c34ecb91091b58480478e4ac4560d7
src/DayModel.js
src/DayModel.js
import Utils from './utils'; import {DateOnly} from './util/time'; import TaskModel from './TaskModel'; export default class DayModel { constructor(tasks, id = Utils.guid(), date = DateOnly()) { this.tasks = tasks; this.id = id; this.date = date; } }
import Utils from './utils'; import {DateOnly} from './util/time'; import TaskModel from './TaskModel'; export default class DayModel { constructor(tasks, date = DateOnly(), id = Utils.guid()) { this.tasks = tasks; this.date = date; this.id = id; } }
Change order of parameters Seems more common to need a dayModel with items and date with unknown id
Change order of parameters Seems more common to need a dayModel with items and date with unknown id
JavaScript
mit
corragon/six,corragon/six,corragon/six
javascript
## Code Before: import Utils from './utils'; import {DateOnly} from './util/time'; import TaskModel from './TaskModel'; export default class DayModel { constructor(tasks, id = Utils.guid(), date = DateOnly()) { this.tasks = tasks; this.id = id; this.date = date; } } ## Instruction: Change order of parameters Seems more common to need a dayModel with items and date with unknown id ## Code After: import Utils from './utils'; import {DateOnly} from './util/time'; import TaskModel from './TaskModel'; export default class DayModel { constructor(tasks, date = DateOnly(), id = Utils.guid()) { this.tasks = tasks; this.date = date; this.id = id; } }
9727c374b7d5e0d83aa8afbda1ba98696e92d425
server-ce/README.md
server-ce/README.md
Please see the [offical wiki for install guides](https://github.com/sharelatex/sharelatex/wiki/Production-Installation-Instructions)
This is the source for building the sharelatex community-edition docker image. ## End-User Install Please see the [offical wiki for install guides](https://github.com/sharelatex/sharelatex/wiki/Production-Installation-Instructions) ## Development This repo contains two dockerfiles, `Dockerfile-base`, which builds the `sharelatex/sharelatex-base` image, and `Dockerfile` which builds the `sharelatex/sharelatex` (or "community") image. The Base image generally contains the basic dependencies like `wget` and `aspell`, plus `texlive`. We split this out because it's a pretty heavy set of dependencies, and it's nice to not have to rebuild all of that every time. The Sharelatex image extends the base image and adds the actual sharelatex code and services. Use `make build-base` and `make build-community` to build these images. ### How the Sharelatex code gets here This repo uses [the public Sharelatex repository](https://github.com/sharelatex/sharelatex), which used to be the main public source for the sharelatex system. That repo is cloned down into the docker image, and a script then installs all the services. This way of doing things predates the new dev-env, and isn't currently tested. ### How services run inside the container We use the [Phusion base-image](https://github.com/phusion/baseimage-docker) (which is extended by our `base` image) to provide us with a VM-like container in which to run the sharelatex services. Baseimage uses the `runit` service manager to manage services, and we add our init-scripts from the `./runit` folder. Overall, this is very like how the services would run in production, it just happens to be all inside one docker container instead of being on one VM.
Update the readme with a short explanation of how this code works
Update the readme with a short explanation of how this code works
Markdown
agpl-3.0
sharelatex/sharelatex
markdown
## Code Before: Please see the [offical wiki for install guides](https://github.com/sharelatex/sharelatex/wiki/Production-Installation-Instructions) ## Instruction: Update the readme with a short explanation of how this code works ## Code After: This is the source for building the sharelatex community-edition docker image. ## End-User Install Please see the [offical wiki for install guides](https://github.com/sharelatex/sharelatex/wiki/Production-Installation-Instructions) ## Development This repo contains two dockerfiles, `Dockerfile-base`, which builds the `sharelatex/sharelatex-base` image, and `Dockerfile` which builds the `sharelatex/sharelatex` (or "community") image. The Base image generally contains the basic dependencies like `wget` and `aspell`, plus `texlive`. We split this out because it's a pretty heavy set of dependencies, and it's nice to not have to rebuild all of that every time. The Sharelatex image extends the base image and adds the actual sharelatex code and services. Use `make build-base` and `make build-community` to build these images. ### How the Sharelatex code gets here This repo uses [the public Sharelatex repository](https://github.com/sharelatex/sharelatex), which used to be the main public source for the sharelatex system. That repo is cloned down into the docker image, and a script then installs all the services. This way of doing things predates the new dev-env, and isn't currently tested. ### How services run inside the container We use the [Phusion base-image](https://github.com/phusion/baseimage-docker) (which is extended by our `base` image) to provide us with a VM-like container in which to run the sharelatex services. Baseimage uses the `runit` service manager to manage services, and we add our init-scripts from the `./runit` folder. Overall, this is very like how the services would run in production, it just happens to be all inside one docker container instead of being on one VM.
e00251822780642d83848a23d4217b5a90054e80
edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration/src/edu/kit/ipd/sdq/vitruvius/applications/pcmjava/linkingintegration/CorrespondenceTypeDeciding.java
edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration/src/edu/kit/ipd/sdq/vitruvius/applications/pcmjava/linkingintegration/CorrespondenceTypeDeciding.java
package edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration; import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import edu.kit.ipd.sdq.vitruvius.framework.correspondence.CorrespondenceModel; public interface CorrespondenceTypeDeciding { String ID = "edu.kit.ipd.sdq.vitruvius.codeintegration.correspondencetypedeciding"; default boolean useIntegratedCorrespondence(final EObject objectA, final EObject objectB, final CorrespondenceModel cInstance, final List<Resource> jaMoppResources) { return true; } }
package edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration; import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import edu.kit.ipd.sdq.vitruvius.framework.correspondence.CorrespondenceModel; public interface CorrespondenceTypeDeciding { String ID = "edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration.correspondencetypedeciding"; default boolean useIntegratedCorrespondence(final EObject objectA, final EObject objectB, final CorrespondenceModel cInstance, final List<Resource> jaMoppResources) { return true; } }
Fix a bug in the correspondencetypedeciding extension point reference.
Fix a bug in the correspondencetypedeciding extension point reference.
Java
epl-1.0
vitruv-tools/Vitruv
java
## Code Before: package edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration; import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import edu.kit.ipd.sdq.vitruvius.framework.correspondence.CorrespondenceModel; public interface CorrespondenceTypeDeciding { String ID = "edu.kit.ipd.sdq.vitruvius.codeintegration.correspondencetypedeciding"; default boolean useIntegratedCorrespondence(final EObject objectA, final EObject objectB, final CorrespondenceModel cInstance, final List<Resource> jaMoppResources) { return true; } } ## Instruction: Fix a bug in the correspondencetypedeciding extension point reference. ## Code After: package edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration; import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import edu.kit.ipd.sdq.vitruvius.framework.correspondence.CorrespondenceModel; public interface CorrespondenceTypeDeciding { String ID = "edu.kit.ipd.sdq.vitruvius.applications.pcmjava.linkingintegration.correspondencetypedeciding"; default boolean useIntegratedCorrespondence(final EObject objectA, final EObject objectB, final CorrespondenceModel cInstance, final List<Resource> jaMoppResources) { return true; } }
472327c26d4f7480610dd37815b130701df5fe28
mkdocs.yml
mkdocs.yml
site_name: Elegant Git site_url: site_description: site_author: Dmytro Serdiuk repo_url: https://github.com/bees-hive/elegant-git theme: readthedocs nav: - Home: index.md - Getting started: getting-started.md - Commands: commands.md - License: licence.md copyright: Copyright &copy; 2019 <a href="https://extsoft.pro">Dmytro Serdiuk</a>, Maintained by <a href="https://github.com/bees-hive/elegant-git/graphs/contributors">project contributors</a>. plugins: - search
site_name: Elegant Git site_url: site_description: site_author: Dmytro Serdiuk repo_url: https://github.com/bees-hive/elegant-git theme: readthedocs nav: - Home: index.md - Getting started: getting-started.md - Commands: commands.md - Release notes: https://github.com/bees-hive/elegant-git/releases - License: licence.md copyright: Copyright &copy; 2019 <a href="https://extsoft.pro">Dmytro Serdiuk</a>, Maintained by <a href="https://github.com/bees-hive/elegant-git/graphs/contributors">project contributors</a>. plugins: - search
Add a link to the release notes
Add a link to the release notes Since we track all releases on the GitHub, it's good to redirect a user to the releases page in the case of some interest.
YAML
apache-2.0
extsoft/elegant-git
yaml
## Code Before: site_name: Elegant Git site_url: site_description: site_author: Dmytro Serdiuk repo_url: https://github.com/bees-hive/elegant-git theme: readthedocs nav: - Home: index.md - Getting started: getting-started.md - Commands: commands.md - License: licence.md copyright: Copyright &copy; 2019 <a href="https://extsoft.pro">Dmytro Serdiuk</a>, Maintained by <a href="https://github.com/bees-hive/elegant-git/graphs/contributors">project contributors</a>. plugins: - search ## Instruction: Add a link to the release notes Since we track all releases on the GitHub, it's good to redirect a user to the releases page in the case of some interest. ## Code After: site_name: Elegant Git site_url: site_description: site_author: Dmytro Serdiuk repo_url: https://github.com/bees-hive/elegant-git theme: readthedocs nav: - Home: index.md - Getting started: getting-started.md - Commands: commands.md - Release notes: https://github.com/bees-hive/elegant-git/releases - License: licence.md copyright: Copyright &copy; 2019 <a href="https://extsoft.pro">Dmytro Serdiuk</a>, Maintained by <a href="https://github.com/bees-hive/elegant-git/graphs/contributors">project contributors</a>. plugins: - search
13662ca329348098106a051468e0051c7af49835
app/src/controllers/wallet/pairing/wallet_pairing_progress_dialog_view_controller.coffee
app/src/controllers/wallet/pairing/wallet_pairing_progress_dialog_view_controller.coffee
class @WalletPairingProgressDialogViewController extends DialogViewController view: contentContainer: "#content_container" onAfterRender: -> super # launch request @_request = @params.request @_request?.onComplete (screen, error) => @_request = null if screen? dialog = new CommonDialogsMessageDialogViewController(kind: "success", title: t("wallet.pairing.errors.pairing_succeeded"), subtitle: _.str.sprintf(t("wallet.pairing.errors.dongle_is_now_paired"), screen.name)) else dialog = new CommonDialogsMessageDialogViewController(kind: "error", title: t("wallet.pairing.errors.pairing_failed"), subtitle: t("wallet.pairing.errors." + error)) dialog.show() @_request?.on 'finalizing', @_onFinalizing # show spinner @view.spinner = ledger.spinners.createLargeSpinner(@view.contentContainer[0]) onDetach: -> super @_request?.off 'finalizing', @_onFinalizing onDismiss: -> super @_request?.cancel() _onFinalizing: -> ledger.m2fa.PairedSecureScreen.getScreensByUuidFromSyncedStore @_request.getDeviceUuid(), (screens, error) => if screens?.length is 0 @getDialog().push new WalletPairingFinalizingDialogViewController(request: @_request) else @_request.setSecureScreenName(screens[0].name)
class @WalletPairingProgressDialogViewController extends DialogViewController view: contentContainer: "#content_container" onAfterRender: -> super # launch request @_request = @params.request @_request?.onComplete (screen, error) => @_request = null @dismiss () => if screen? dialog = new CommonDialogsMessageDialogViewController(kind: "success", title: t("wallet.pairing.errors.pairing_succeeded"), subtitle: _.str.sprintf(t("wallet.pairing.errors.dongle_is_now_paired"), screen.name)) else dialog = new CommonDialogsMessageDialogViewController(kind: "error", title: t("wallet.pairing.errors.pairing_failed"), subtitle: t("wallet.pairing.errors." + error)) dialog.show() @_request?.on 'finalizing', @_onFinalizing # show spinner @view.spinner = ledger.spinners.createLargeSpinner(@view.contentContainer[0]) onDetach: -> super @_request?.off 'finalizing', @_onFinalizing onDismiss: -> super @_request?.cancel() _onFinalizing: -> ledger.m2fa.PairedSecureScreen.getScreensByUuidFromSyncedStore @_request.getDeviceUuid(), (screens, error) => if screens?.length is 0 @getDialog().push new WalletPairingFinalizingDialogViewController(request: @_request) else @_request.setSecureScreenName(screens[0].name)
Fix "don't dismiss pairing progress dialog when displaying success"
Fix "don't dismiss pairing progress dialog when displaying success"
CoffeeScript
mit
LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome,Morveus/ledger-wallet-doge-chrome,LedgerHQ/ledger-wallet-chrome
coffeescript
## Code Before: class @WalletPairingProgressDialogViewController extends DialogViewController view: contentContainer: "#content_container" onAfterRender: -> super # launch request @_request = @params.request @_request?.onComplete (screen, error) => @_request = null if screen? dialog = new CommonDialogsMessageDialogViewController(kind: "success", title: t("wallet.pairing.errors.pairing_succeeded"), subtitle: _.str.sprintf(t("wallet.pairing.errors.dongle_is_now_paired"), screen.name)) else dialog = new CommonDialogsMessageDialogViewController(kind: "error", title: t("wallet.pairing.errors.pairing_failed"), subtitle: t("wallet.pairing.errors." + error)) dialog.show() @_request?.on 'finalizing', @_onFinalizing # show spinner @view.spinner = ledger.spinners.createLargeSpinner(@view.contentContainer[0]) onDetach: -> super @_request?.off 'finalizing', @_onFinalizing onDismiss: -> super @_request?.cancel() _onFinalizing: -> ledger.m2fa.PairedSecureScreen.getScreensByUuidFromSyncedStore @_request.getDeviceUuid(), (screens, error) => if screens?.length is 0 @getDialog().push new WalletPairingFinalizingDialogViewController(request: @_request) else @_request.setSecureScreenName(screens[0].name) ## Instruction: Fix "don't dismiss pairing progress dialog when displaying success" ## Code After: class @WalletPairingProgressDialogViewController extends DialogViewController view: contentContainer: "#content_container" onAfterRender: -> super # launch request @_request = @params.request @_request?.onComplete (screen, error) => @_request = null @dismiss () => if screen? dialog = new CommonDialogsMessageDialogViewController(kind: "success", title: t("wallet.pairing.errors.pairing_succeeded"), subtitle: _.str.sprintf(t("wallet.pairing.errors.dongle_is_now_paired"), screen.name)) else dialog = new CommonDialogsMessageDialogViewController(kind: "error", title: t("wallet.pairing.errors.pairing_failed"), subtitle: t("wallet.pairing.errors." + error)) dialog.show() @_request?.on 'finalizing', @_onFinalizing # show spinner @view.spinner = ledger.spinners.createLargeSpinner(@view.contentContainer[0]) onDetach: -> super @_request?.off 'finalizing', @_onFinalizing onDismiss: -> super @_request?.cancel() _onFinalizing: -> ledger.m2fa.PairedSecureScreen.getScreensByUuidFromSyncedStore @_request.getDeviceUuid(), (screens, error) => if screens?.length is 0 @getDialog().push new WalletPairingFinalizingDialogViewController(request: @_request) else @_request.setSecureScreenName(screens[0].name)
f20b984aa6bffeaccdd9b789fc543c93f20271f9
protocols/groupwise/libgroupwise/tasks/getdetailstask.h
protocols/groupwise/libgroupwise/tasks/getdetailstask.h
// // C++ Interface: getdetailstask // // Description: // // // Author: SUSE AG <>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef GETDETAILSTASK_H #define GETDETAILSTASK_H #include "gwerror.h" #include "requesttask.h" /** This task fetches the details for a set of user IDs from the server. Sometimes we get an event that only has a DN, and we need other details before showing the event to the user. @author SUSE AG */ using namespace GroupWise; class GetDetailsTask : public RequestTask { Q_OBJECT public: GetDetailsTask( Task * parent ); ~GetDetailsTask(); bool take( Transfer * transfer ); void userDNs( const QStringList & userDNs ); signals: void gotContactUserDetails( const ContactDetails & ); protected: GroupWise::ContactDetails extractUserDetails( Field::MultiField * details ); }; #endif
// // C++ Interface: getdetailstask // // Description: // // // Author: SUSE AG <>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef GETDETAILSTASK_H #define GETDETAILSTASK_H #include "gwerror.h" #include "requesttask.h" /** This task fetches the details for a set of user IDs from the server. Sometimes we get an event that only has a DN, and we need other details before showing the event to the user. @author SUSE AG */ using namespace GroupWise; class GetDetailsTask : public RequestTask { Q_OBJECT public: GetDetailsTask( Task * parent ); ~GetDetailsTask(); bool take( Transfer * transfer ); void userDNs( const QStringList & userDNs ); signals: void gotContactUserDetails( const GroupWise::ContactDetails & ); protected: GroupWise::ContactDetails extractUserDetails( Field::MultiField * details ); }; #endif
Fix broken signal connection CVS_SILENT
Fix broken signal connection CVS_SILENT svn path=/branches/groupwise_in_anger/kdenetwork/kopete/; revision=344030
C
lgpl-2.1
josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete
c
## Code Before: // // C++ Interface: getdetailstask // // Description: // // // Author: SUSE AG <>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef GETDETAILSTASK_H #define GETDETAILSTASK_H #include "gwerror.h" #include "requesttask.h" /** This task fetches the details for a set of user IDs from the server. Sometimes we get an event that only has a DN, and we need other details before showing the event to the user. @author SUSE AG */ using namespace GroupWise; class GetDetailsTask : public RequestTask { Q_OBJECT public: GetDetailsTask( Task * parent ); ~GetDetailsTask(); bool take( Transfer * transfer ); void userDNs( const QStringList & userDNs ); signals: void gotContactUserDetails( const ContactDetails & ); protected: GroupWise::ContactDetails extractUserDetails( Field::MultiField * details ); }; #endif ## Instruction: Fix broken signal connection CVS_SILENT svn path=/branches/groupwise_in_anger/kdenetwork/kopete/; revision=344030 ## Code After: // // C++ Interface: getdetailstask // // Description: // // // Author: SUSE AG <>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef GETDETAILSTASK_H #define GETDETAILSTASK_H #include "gwerror.h" #include "requesttask.h" /** This task fetches the details for a set of user IDs from the server. Sometimes we get an event that only has a DN, and we need other details before showing the event to the user. @author SUSE AG */ using namespace GroupWise; class GetDetailsTask : public RequestTask { Q_OBJECT public: GetDetailsTask( Task * parent ); ~GetDetailsTask(); bool take( Transfer * transfer ); void userDNs( const QStringList & userDNs ); signals: void gotContactUserDetails( const GroupWise::ContactDetails & ); protected: GroupWise::ContactDetails extractUserDetails( Field::MultiField * details ); }; #endif
ba5ec5ff19bca265fa0234ee9aa9a796fca28c3e
app/controllers/mains_controller.rb
app/controllers/mains_controller.rb
class MainsController < ApplicationController def index @albums = Album.all @images = Image.all @contact = Contact.new @projects = Album.order("created_at DESC") end def create @contact = Contact.new(params[:contact]) @contact.request = request if @contact.deliver flash.now[:success] = "The email has been sent" else flash.now[:error] = "Can not send message." redirect_to root_path end end end
class MainsController < ApplicationController include SendGrid def index @albums = Album.all @images = Image.all @contact = Contact.new @projects = Album.order("created_at DESC") end def create from = Email.new(email: params[:contact]["email"]) subject = 'From FineHomeLiving.com' to = Email.new(email: '[email protected]') content = Content.new(type: 'text/plain', value: params[:contact]["message"]) mail = Mail.new(from, subject, to, content) sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY']) response = sg.client.mail._('send').post(request_body: mail.to_json) puts response.status_code puts response.body puts response.headers end end
Refactor code to test mailing errors
Refactor code to test mailing errors
Ruby
mit
solibl/FineHomeLiving,solibl/FineHomeLiving,solibl/FineHomeLiving
ruby
## Code Before: class MainsController < ApplicationController def index @albums = Album.all @images = Image.all @contact = Contact.new @projects = Album.order("created_at DESC") end def create @contact = Contact.new(params[:contact]) @contact.request = request if @contact.deliver flash.now[:success] = "The email has been sent" else flash.now[:error] = "Can not send message." redirect_to root_path end end end ## Instruction: Refactor code to test mailing errors ## Code After: class MainsController < ApplicationController include SendGrid def index @albums = Album.all @images = Image.all @contact = Contact.new @projects = Album.order("created_at DESC") end def create from = Email.new(email: params[:contact]["email"]) subject = 'From FineHomeLiving.com' to = Email.new(email: '[email protected]') content = Content.new(type: 'text/plain', value: params[:contact]["message"]) mail = Mail.new(from, subject, to, content) sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY']) response = sg.client.mail._('send').post(request_body: mail.to_json) puts response.status_code puts response.body puts response.headers end end
8b3ccf7e2a47d2382ed8ed14cf893fb84e7e3c38
avroDecoder.go
avroDecoder.go
package tailtopic import ( avro "github.com/elodina/go-avro" kavro "github.com/elodina/go-kafka-avro" ) type avroSchemaRegistryDecoder struct { decoder *kavro.KafkaAvroDecoder } func newAvroDecoder(schemaregURI string) decoder { return &avroSchemaRegistryDecoder{kavro.NewKafkaAvroDecoder(schemaregURI)} } func (sr *avroSchemaRegistryDecoder) decode(msg []byte) (string, error) { decodedRecord, err := sr.decoder.Decode(msg) if err != nil { return "", err } return (decodedRecord.(*avro.GenericRecord)).String(), nil }
package tailtopic import ( avro "github.com/dejan/go-avro" kavro "github.com/dejan/go-kafka-avro" ) type avroSchemaRegistryDecoder struct { decoder *kavro.KafkaAvroDecoder } func newAvroDecoder(schemaregURI string) decoder { return &avroSchemaRegistryDecoder{kavro.NewKafkaAvroDecoder(schemaregURI)} } func (sr *avroSchemaRegistryDecoder) decode(msg []byte) (string, error) { decodedRecord, err := sr.decoder.Decode(msg) if err != nil { return "", err } return (decodedRecord.(*avro.GenericRecord)).String(), nil }
Use my forks until NS fix is merged upstream
Use my forks until NS fix is merged upstream
Go
mit
dejan/tailtopic
go
## Code Before: package tailtopic import ( avro "github.com/elodina/go-avro" kavro "github.com/elodina/go-kafka-avro" ) type avroSchemaRegistryDecoder struct { decoder *kavro.KafkaAvroDecoder } func newAvroDecoder(schemaregURI string) decoder { return &avroSchemaRegistryDecoder{kavro.NewKafkaAvroDecoder(schemaregURI)} } func (sr *avroSchemaRegistryDecoder) decode(msg []byte) (string, error) { decodedRecord, err := sr.decoder.Decode(msg) if err != nil { return "", err } return (decodedRecord.(*avro.GenericRecord)).String(), nil } ## Instruction: Use my forks until NS fix is merged upstream ## Code After: package tailtopic import ( avro "github.com/dejan/go-avro" kavro "github.com/dejan/go-kafka-avro" ) type avroSchemaRegistryDecoder struct { decoder *kavro.KafkaAvroDecoder } func newAvroDecoder(schemaregURI string) decoder { return &avroSchemaRegistryDecoder{kavro.NewKafkaAvroDecoder(schemaregURI)} } func (sr *avroSchemaRegistryDecoder) decode(msg []byte) (string, error) { decodedRecord, err := sr.decoder.Decode(msg) if err != nil { return "", err } return (decodedRecord.(*avro.GenericRecord)).String(), nil }
607f483f4e32006cc821c99dc26996064ece469e
scripts/create-cf-release.sh
scripts/create-cf-release.sh
pushd $CF_RELEASE_DIR/releases version=$(ls cf-* | sort | tail -1 | sed "s/cf\-\(.*\)\.yml/\1/").0.0+dev.$(date +%s) popd echo $version > $VERSION_FILE cd $CF_RELEASE_DIR bosh -n --parallel 10 sync blobs bosh create release --force --name cf --with-tarball --version $version mv dev_releases/cf/cf-*.tgz ../releases/
pushd $CF_RELEASE_DIR/releases version=$(ls cf-* | sort | tail -1 | sed "s/cf\-\(.*\)\.yml/\1/").0.0+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7) popd echo $version > $VERSION_FILE cd $CF_RELEASE_DIR bosh -n --parallel 10 sync blobs bosh create release --force --name cf --with-tarball --version $version mv dev_releases/cf/cf-*.tgz ../releases/
Make cf-release versions more descriptive
Make cf-release versions more descriptive Having a cf-release version of the form <latest_final_release_version>.0.0+dev.<date>.<time>.<commit_sha> should help understand what's in a release and when it was built.
Shell
apache-2.0
cloudfoundry-incubator/bits-service-ci,cloudfoundry-incubator/bits-service-ci,cloudfoundry-incubator/bits-service-ci
shell
## Code Before: pushd $CF_RELEASE_DIR/releases version=$(ls cf-* | sort | tail -1 | sed "s/cf\-\(.*\)\.yml/\1/").0.0+dev.$(date +%s) popd echo $version > $VERSION_FILE cd $CF_RELEASE_DIR bosh -n --parallel 10 sync blobs bosh create release --force --name cf --with-tarball --version $version mv dev_releases/cf/cf-*.tgz ../releases/ ## Instruction: Make cf-release versions more descriptive Having a cf-release version of the form <latest_final_release_version>.0.0+dev.<date>.<time>.<commit_sha> should help understand what's in a release and when it was built. ## Code After: pushd $CF_RELEASE_DIR/releases version=$(ls cf-* | sort | tail -1 | sed "s/cf\-\(.*\)\.yml/\1/").0.0+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7) popd echo $version > $VERSION_FILE cd $CF_RELEASE_DIR bosh -n --parallel 10 sync blobs bosh create release --force --name cf --with-tarball --version $version mv dev_releases/cf/cf-*.tgz ../releases/
9bc9232f2b2b95b7031afe3b0a8ec12f9d77384a
setup.py
setup.py
from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='[email protected]', license='MIT', packages=['biosignal'], zip_safe=False)
from setuptools import setup setup(name='biosignal', version='0.0.2', description="""A library for processing and analysing physiological signals such as ECG, BP, EMG, EEG, Pulse and Sp02""", url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='[email protected]', license='MIT', packages=['biosignal'], zip_safe=False)
Add a description for PyPI
Add a description for PyPI
Python
mit
EmlynC/python-biosignal
python
## Code Before: from setuptools import setup setup(name='biosignal', version='0.0.1', description='', url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='[email protected]', license='MIT', packages=['biosignal'], zip_safe=False) ## Instruction: Add a description for PyPI ## Code After: from setuptools import setup setup(name='biosignal', version='0.0.2', description="""A library for processing and analysing physiological signals such as ECG, BP, EMG, EEG, Pulse and Sp02""", url='http://github.com/EmlynC/python-biosignal', author='Emlyn Clay', author_email='[email protected]', license='MIT', packages=['biosignal'], zip_safe=False)
65194f4b24fa587e3c7eb5e25c09239653f3410d
features/ec2/ec2.feature
features/ec2/ec2.feature
@ec2 Feature: Amazon Elastic Compute Cloud I want to use Amazon Elastic Compute Cloud Scenario: DescribeRegions Given I describe EC2 regions "us-east-1, us-west-1" Then the EC2 endpoint for "us-east-1" should be "ec2.us-east-1.amazonaws.com" And the EC2 endpoint for "us-west-1" should be "ec2.us-west-1.amazonaws.com" Scenario: Error handling Given I describe the EC2 instance "i-12345678" Then the error code should be "InvalidInstanceID.NotFound" And the error message should be: """ The instance ID 'i-12345678' does not exist """ And the status code should be 400
@ec2 Feature: Amazon Elastic Compute Cloud I want to use Amazon Elastic Compute Cloud Scenario: DescribeRegions Given I describe EC2 regions "us-east-1, us-west-1" Then the EC2 endpoint for "us-east-1" should be "ec2.us-east-1.amazonaws.com" And the EC2 endpoint for "us-west-1" should be "ec2.us-west-1.amazonaws.com" Scenario: Error handling Given I describe the EC2 instance "" Then the error code should be "MissingParameter" And the error message should be: """ The request must contain the parameter InstanceId """ And the status code should be 400
Fix failing EC2 integration test due to service changes
Fix failing EC2 integration test due to service changes
Cucumber
apache-2.0
guymguym/aws-sdk-js,misfitdavidl/aws-sdk-js,jippeholwerda/aws-sdk-js,Blufe/aws-sdk-js,aws/aws-sdk-js,grimurjonsson/aws-sdk-js,ugie/aws-sdk-js,michael-donat/aws-sdk-js,aws/aws-sdk-js,beni55/aws-sdk-js,jippeholwerda/aws-sdk-js,Blufe/aws-sdk-js,j3tm0t0/aws-sdk-js,michael-donat/aws-sdk-js,j3tm0t0/aws-sdk-js,GlideMe/aws-sdk-js,jippeholwerda/aws-sdk-js,ugie/aws-sdk-js,odeke-em/aws-sdk-js,MitocGroup/aws-sdk-js,MitocGroup/aws-sdk-js,jeskew/aws-sdk-js,chrisradek/aws-sdk-js,mapbox/aws-sdk-js,guymguym/aws-sdk-js,jmswhll/aws-sdk-js,Blufe/aws-sdk-js,LiuJoyceC/aws-sdk-js,aws/aws-sdk-js,guymguym/aws-sdk-js,grimurjonsson/aws-sdk-js,aws/aws-sdk-js,GlideMe/aws-sdk-js,prestomation/aws-sdk-js,prembasumatary/aws-sdk-js,AdityaManohar/aws-sdk-js,mohamed-kamal/aws-sdk-js,LiuJoyceC/aws-sdk-js,grimurjonsson/aws-sdk-js,misfitdavidl/aws-sdk-js,chrisradek/aws-sdk-js,misfitdavidl/aws-sdk-js,odeke-em/aws-sdk-js,mohamed-kamal/aws-sdk-js,dconnolly/aws-sdk-js,prestomation/aws-sdk-js,mapbox/aws-sdk-js,prembasumatary/aws-sdk-js,ugie/aws-sdk-js,dconnolly/aws-sdk-js,j3tm0t0/aws-sdk-js,prembasumatary/aws-sdk-js,jeskew/aws-sdk-js,AdityaManohar/aws-sdk-js,chrisradek/aws-sdk-js,beni55/aws-sdk-js,MitocGroup/aws-sdk-js,AdityaManohar/aws-sdk-js,GlideMe/aws-sdk-js,mapbox/aws-sdk-js,jmswhll/aws-sdk-js,odeke-em/aws-sdk-js,guymguym/aws-sdk-js,jeskew/aws-sdk-js,LiuJoyceC/aws-sdk-js,prestomation/aws-sdk-js,GlideMe/aws-sdk-js,chrisradek/aws-sdk-js,michael-donat/aws-sdk-js,mohamed-kamal/aws-sdk-js,beni55/aws-sdk-js,dconnolly/aws-sdk-js,jmswhll/aws-sdk-js,jeskew/aws-sdk-js
cucumber
## Code Before: @ec2 Feature: Amazon Elastic Compute Cloud I want to use Amazon Elastic Compute Cloud Scenario: DescribeRegions Given I describe EC2 regions "us-east-1, us-west-1" Then the EC2 endpoint for "us-east-1" should be "ec2.us-east-1.amazonaws.com" And the EC2 endpoint for "us-west-1" should be "ec2.us-west-1.amazonaws.com" Scenario: Error handling Given I describe the EC2 instance "i-12345678" Then the error code should be "InvalidInstanceID.NotFound" And the error message should be: """ The instance ID 'i-12345678' does not exist """ And the status code should be 400 ## Instruction: Fix failing EC2 integration test due to service changes ## Code After: @ec2 Feature: Amazon Elastic Compute Cloud I want to use Amazon Elastic Compute Cloud Scenario: DescribeRegions Given I describe EC2 regions "us-east-1, us-west-1" Then the EC2 endpoint for "us-east-1" should be "ec2.us-east-1.amazonaws.com" And the EC2 endpoint for "us-west-1" should be "ec2.us-west-1.amazonaws.com" Scenario: Error handling Given I describe the EC2 instance "" Then the error code should be "MissingParameter" And the error message should be: """ The request must contain the parameter InstanceId """ And the status code should be 400
da08615c6afef08614cecec43095dd0b9bf0cc42
Casks/telegram.rb
Casks/telegram.rb
cask 'telegram' do version '2.16-47508' sha256 '5ffbd2f76054fc47aafa6f2596ef9c6a85a69412a3a1f227f789b1832e7518d5' # telegram.org was verified as official when first introduced to the cask url "https://osx.telegram.org/updates/Telegram-#{version}.app.zip" appcast 'http://osx.telegram.org/updates/versions.xml', checkpoint: '07caec5ebbe1b7081cb2e873cb5321d6f736b6ecbe7421968ba2f69745ac1a6e' name 'Telegram for macOS' homepage 'https://macos.telegram.org' license :gpl auto_updates true app 'Telegram.app' end
cask 'telegram' do version '2.16-47508' sha256 '5ffbd2f76054fc47aafa6f2596ef9c6a85a69412a3a1f227f789b1832e7518d5' url "https://osx.telegram.org/updates/Telegram-#{version}.app.zip" appcast 'http://osx.telegram.org/updates/versions.xml', checkpoint: '07caec5ebbe1b7081cb2e873cb5321d6f736b6ecbe7421968ba2f69745ac1a6e' name 'Telegram for macOS' homepage 'https://macos.telegram.org' license :gpl auto_updates true app 'Telegram.app' end
Fix `url` stanza comment for Telegram for macOS.
Fix `url` stanza comment for Telegram for macOS.
Ruby
bsd-2-clause
optikfluffel/homebrew-cask,sscotth/homebrew-cask,lukasbestle/homebrew-cask,michelegera/homebrew-cask,winkelsdorf/homebrew-cask,malford/homebrew-cask,jconley/homebrew-cask,xight/homebrew-cask,jawshooah/homebrew-cask,nshemonsky/homebrew-cask,alebcay/homebrew-cask,FredLackeyOfficial/homebrew-cask,opsdev-ws/homebrew-cask,y00rb/homebrew-cask,rajiv/homebrew-cask,My2ndAngelic/homebrew-cask,elyscape/homebrew-cask,gabrielizaias/homebrew-cask,skatsuta/homebrew-cask,SentinelWarren/homebrew-cask,wickedsp1d3r/homebrew-cask,tyage/homebrew-cask,reitermarkus/homebrew-cask,jiashuw/homebrew-cask,winkelsdorf/homebrew-cask,sanchezm/homebrew-cask,alebcay/homebrew-cask,m3nu/homebrew-cask,maxnordlund/homebrew-cask,ebraminio/homebrew-cask,troyxmccall/homebrew-cask,MichaelPei/homebrew-cask,andrewdisley/homebrew-cask,chuanxd/homebrew-cask,kassi/homebrew-cask,shoichiaizawa/homebrew-cask,coeligena/homebrew-customized,decrement/homebrew-cask,JosephViolago/homebrew-cask,xtian/homebrew-cask,0xadada/homebrew-cask,rogeriopradoj/homebrew-cask,puffdad/homebrew-cask,joschi/homebrew-cask,MoOx/homebrew-cask,hanxue/caskroom,kpearson/homebrew-cask,robertgzr/homebrew-cask,sosedoff/homebrew-cask,lumaxis/homebrew-cask,uetchy/homebrew-cask,flaviocamilo/homebrew-cask,aguynamedryan/homebrew-cask,neverfox/homebrew-cask,kTitan/homebrew-cask,samdoran/homebrew-cask,sosedoff/homebrew-cask,blogabe/homebrew-cask,gilesdring/homebrew-cask,johnjelinek/homebrew-cask,elyscape/homebrew-cask,hakamadare/homebrew-cask,stonehippo/homebrew-cask,0rax/homebrew-cask,chadcatlett/caskroom-homebrew-cask,morganestes/homebrew-cask,ksylvan/homebrew-cask,esebastian/homebrew-cask,jgarber623/homebrew-cask,sebcode/homebrew-cask,michelegera/homebrew-cask,cblecker/homebrew-cask,deiga/homebrew-cask,xight/homebrew-cask,chrisfinazzo/homebrew-cask,mchlrmrz/homebrew-cask,stephenwade/homebrew-cask,uetchy/homebrew-cask,ksylvan/homebrew-cask,ericbn/homebrew-cask,onlynone/homebrew-cask,JacopKane/homebrew-cask,blainesch/homebrew-cask,decrement/homebrew-cask,JacopKane/homebrew-cask,leipert/homebrew-cask,danielbayley/homebrew-cask,JosephViolago/homebrew-cask,esebastian/homebrew-cask,KosherBacon/homebrew-cask,kamilboratynski/homebrew-cask,hakamadare/homebrew-cask,syscrusher/homebrew-cask,yurikoles/homebrew-cask,kesara/homebrew-cask,xtian/homebrew-cask,doits/homebrew-cask,ptb/homebrew-cask,imgarylai/homebrew-cask,kingthorin/homebrew-cask,hyuna917/homebrew-cask,sscotth/homebrew-cask,jeroenj/homebrew-cask,13k/homebrew-cask,riyad/homebrew-cask,franklouwers/homebrew-cask,hovancik/homebrew-cask,pacav69/homebrew-cask,cobyism/homebrew-cask,esebastian/homebrew-cask,cobyism/homebrew-cask,deiga/homebrew-cask,kongslund/homebrew-cask,SentinelWarren/homebrew-cask,klane/homebrew-cask,singingwolfboy/homebrew-cask,danielbayley/homebrew-cask,forevergenin/homebrew-cask,scottsuch/homebrew-cask,jedahan/homebrew-cask,chrisfinazzo/homebrew-cask,imgarylai/homebrew-cask,gyndav/homebrew-cask,devmynd/homebrew-cask,nathanielvarona/homebrew-cask,reitermarkus/homebrew-cask,Ngrd/homebrew-cask,singingwolfboy/homebrew-cask,RJHsiao/homebrew-cask,squid314/homebrew-cask,kongslund/homebrew-cask,larseggert/homebrew-cask,caskroom/homebrew-cask,larseggert/homebrew-cask,dvdoliveira/homebrew-cask,colindunn/homebrew-cask,mahori/homebrew-cask,thehunmonkgroup/homebrew-cask,tyage/homebrew-cask,mazehall/homebrew-cask,timsutton/homebrew-cask,daften/homebrew-cask,Keloran/homebrew-cask,mahori/homebrew-cask,phpwutz/homebrew-cask,syscrusher/homebrew-cask,artdevjs/homebrew-cask,miccal/homebrew-cask,Cottser/homebrew-cask,mwean/homebrew-cask,winkelsdorf/homebrew-cask,okket/homebrew-cask,vigosan/homebrew-cask,sjackman/homebrew-cask,sanyer/homebrew-cask,muan/homebrew-cask,n0ts/homebrew-cask,kkdd/homebrew-cask,jalaziz/homebrew-cask,thii/homebrew-cask,yuhki50/homebrew-cask,blogabe/homebrew-cask,reitermarkus/homebrew-cask,psibre/homebrew-cask,Ketouem/homebrew-cask,wmorin/homebrew-cask,wickles/homebrew-cask,gilesdring/homebrew-cask,andyli/homebrew-cask,mattrobenolt/homebrew-cask,mattrobenolt/homebrew-cask,thii/homebrew-cask,scribblemaniac/homebrew-cask,pacav69/homebrew-cask,sscotth/homebrew-cask,patresi/homebrew-cask,phpwutz/homebrew-cask,scribblemaniac/homebrew-cask,deanmorin/homebrew-cask,sebcode/homebrew-cask,mjgardner/homebrew-cask,moimikey/homebrew-cask,troyxmccall/homebrew-cask,jacobbednarz/homebrew-cask,AnastasiaSulyagina/homebrew-cask,kronicd/homebrew-cask,mishari/homebrew-cask,hellosky806/homebrew-cask,exherb/homebrew-cask,danielbayley/homebrew-cask,janlugt/homebrew-cask,ninjahoahong/homebrew-cask,vigosan/homebrew-cask,diguage/homebrew-cask,antogg/homebrew-cask,victorpopkov/homebrew-cask,mjgardner/homebrew-cask,Cottser/homebrew-cask,Amorymeltzer/homebrew-cask,nshemonsky/homebrew-cask,Keloran/homebrew-cask,koenrh/homebrew-cask,xight/homebrew-cask,vitorgalvao/homebrew-cask,nrlquaker/homebrew-cask,doits/homebrew-cask,janlugt/homebrew-cask,antogg/homebrew-cask,giannitm/homebrew-cask,haha1903/homebrew-cask,pkq/homebrew-cask,gabrielizaias/homebrew-cask,claui/homebrew-cask,daften/homebrew-cask,mchlrmrz/homebrew-cask,kpearson/homebrew-cask,shorshe/homebrew-cask,stephenwade/homebrew-cask,dvdoliveira/homebrew-cask,kkdd/homebrew-cask,usami-k/homebrew-cask,haha1903/homebrew-cask,chrisfinazzo/homebrew-cask,Ephemera/homebrew-cask,julionc/homebrew-cask,tangestani/homebrew-cask,cprecioso/homebrew-cask,julionc/homebrew-cask,markthetech/homebrew-cask,neverfox/homebrew-cask,johnjelinek/homebrew-cask,13k/homebrew-cask,neverfox/homebrew-cask,rajiv/homebrew-cask,wKovacs64/homebrew-cask,miccal/homebrew-cask,mrmachine/homebrew-cask,My2ndAngelic/homebrew-cask,MircoT/homebrew-cask,mathbunnyru/homebrew-cask,dictcp/homebrew-cask,hellosky806/homebrew-cask,sjackman/homebrew-cask,malob/homebrew-cask,slack4u/homebrew-cask,dictcp/homebrew-cask,mauricerkelly/homebrew-cask,rajiv/homebrew-cask,samnung/homebrew-cask,goxberry/homebrew-cask,RJHsiao/homebrew-cask,renaudguerin/homebrew-cask,m3nu/homebrew-cask,AnastasiaSulyagina/homebrew-cask,squid314/homebrew-cask,kamilboratynski/homebrew-cask,moimikey/homebrew-cask,cliffcotino/homebrew-cask,lantrix/homebrew-cask,gerrypower/homebrew-cask,shoichiaizawa/homebrew-cask,y00rb/homebrew-cask,mattrobenolt/homebrew-cask,hristozov/homebrew-cask,sgnh/homebrew-cask,mathbunnyru/homebrew-cask,antogg/homebrew-cask,pkq/homebrew-cask,andrewdisley/homebrew-cask,inta/homebrew-cask,artdevjs/homebrew-cask,mahori/homebrew-cask,johndbritton/homebrew-cask,kingthorin/homebrew-cask,yurikoles/homebrew-cask,mhubig/homebrew-cask,mauricerkelly/homebrew-cask,xyb/homebrew-cask,Saklad5/homebrew-cask,slack4u/homebrew-cask,goxberry/homebrew-cask,reelsense/homebrew-cask,n0ts/homebrew-cask,asins/homebrew-cask,asins/homebrew-cask,mikem/homebrew-cask,maxnordlund/homebrew-cask,leipert/homebrew-cask,a1russell/homebrew-cask,hovancik/homebrew-cask,scottsuch/homebrew-cask,lifepillar/homebrew-cask,cfillion/homebrew-cask,gyndav/homebrew-cask,guerrero/homebrew-cask,seanzxx/homebrew-cask,kTitan/homebrew-cask,franklouwers/homebrew-cask,jacobbednarz/homebrew-cask,perfide/homebrew-cask,claui/homebrew-cask,jbeagley52/homebrew-cask,andrewdisley/homebrew-cask,yutarody/homebrew-cask,victorpopkov/homebrew-cask,jiashuw/homebrew-cask,seanzxx/homebrew-cask,coeligena/homebrew-customized,Ketouem/homebrew-cask,mjgardner/homebrew-cask,ninjahoahong/homebrew-cask,sgnh/homebrew-cask,Ngrd/homebrew-cask,patresi/homebrew-cask,muan/homebrew-cask,mishari/homebrew-cask,rogeriopradoj/homebrew-cask,jconley/homebrew-cask,wastrachan/homebrew-cask,josa42/homebrew-cask,guerrero/homebrew-cask,athrunsun/homebrew-cask,joschi/homebrew-cask,colindunn/homebrew-cask,jpmat296/homebrew-cask,BenjaminHCCarr/homebrew-cask,usami-k/homebrew-cask,claui/homebrew-cask,jgarber623/homebrew-cask,adrianchia/homebrew-cask,reelsense/homebrew-cask,joschi/homebrew-cask,alexg0/homebrew-cask,Amorymeltzer/homebrew-cask,wKovacs64/homebrew-cask,malob/homebrew-cask,joshka/homebrew-cask,jeroenj/homebrew-cask,mlocher/homebrew-cask,giannitm/homebrew-cask,markthetech/homebrew-cask,optikfluffel/homebrew-cask,morganestes/homebrew-cask,kesara/homebrew-cask,forevergenin/homebrew-cask,xcezx/homebrew-cask,gyndav/homebrew-cask,joshka/homebrew-cask,jedahan/homebrew-cask,hanxue/caskroom,lucasmezencio/homebrew-cask,Labutin/homebrew-cask,mathbunnyru/homebrew-cask,dcondrey/homebrew-cask,kingthorin/homebrew-cask,tangestani/homebrew-cask,bric3/homebrew-cask,stonehippo/homebrew-cask,robertgzr/homebrew-cask,yurikoles/homebrew-cask,shoichiaizawa/homebrew-cask,klane/homebrew-cask,moogar0880/homebrew-cask,xyb/homebrew-cask,thehunmonkgroup/homebrew-cask,mikem/homebrew-cask,amatos/homebrew-cask,cfillion/homebrew-cask,xcezx/homebrew-cask,lukasbestle/homebrew-cask,boecko/homebrew-cask,JosephViolago/homebrew-cask,sohtsuka/homebrew-cask,koenrh/homebrew-cask,jalaziz/homebrew-cask,Amorymeltzer/homebrew-cask,sanyer/homebrew-cask,0rax/homebrew-cask,toonetown/homebrew-cask,toonetown/homebrew-cask,deanmorin/homebrew-cask,bosr/homebrew-cask,yumitsu/homebrew-cask,BenjaminHCCarr/homebrew-cask,stonehippo/homebrew-cask,malob/homebrew-cask,caskroom/homebrew-cask,gmkey/homebrew-cask,wickedsp1d3r/homebrew-cask,miccal/homebrew-cask,wmorin/homebrew-cask,adrianchia/homebrew-cask,JacopKane/homebrew-cask,mlocher/homebrew-cask,lantrix/homebrew-cask,yutarody/homebrew-cask,Ephemera/homebrew-cask,scottsuch/homebrew-cask,MichaelPei/homebrew-cask,JikkuJose/homebrew-cask,perfide/homebrew-cask,stephenwade/homebrew-cask,tedski/homebrew-cask,jangalinski/homebrew-cask,rogeriopradoj/homebrew-cask,johndbritton/homebrew-cask,FredLackeyOfficial/homebrew-cask,andyli/homebrew-cask,jpmat296/homebrew-cask,cblecker/homebrew-cask,singingwolfboy/homebrew-cask,devmynd/homebrew-cask,hristozov/homebrew-cask,malford/homebrew-cask,shonjir/homebrew-cask,Saklad5/homebrew-cask,boecko/homebrew-cask,alebcay/homebrew-cask,bdhess/homebrew-cask,vin047/homebrew-cask,lucasmezencio/homebrew-cask,jasmas/homebrew-cask,diogodamiani/homebrew-cask,schneidmaster/homebrew-cask,xyb/homebrew-cask,nrlquaker/homebrew-cask,shorshe/homebrew-cask,lifepillar/homebrew-cask,nathanielvarona/homebrew-cask,lumaxis/homebrew-cask,tedski/homebrew-cask,athrunsun/homebrew-cask,wmorin/homebrew-cask,ebraminio/homebrew-cask,mazehall/homebrew-cask,gmkey/homebrew-cask,chuanxd/homebrew-cask,Labutin/homebrew-cask,blogabe/homebrew-cask,jellyfishcoder/homebrew-cask,gerrypower/homebrew-cask,tjnycum/homebrew-cask,moogar0880/homebrew-cask,a1russell/homebrew-cask,arronmabrey/homebrew-cask,diguage/homebrew-cask,KosherBacon/homebrew-cask,alexg0/homebrew-cask,nrlquaker/homebrew-cask,nathanielvarona/homebrew-cask,inz/homebrew-cask,inz/homebrew-cask,pkq/homebrew-cask,0xadada/homebrew-cask,kassi/homebrew-cask,m3nu/homebrew-cask,flaviocamilo/homebrew-cask,BenjaminHCCarr/homebrew-cask,tjnycum/homebrew-cask,FinalDes/homebrew-cask,moimikey/homebrew-cask,onlynone/homebrew-cask,colindean/homebrew-cask,mhubig/homebrew-cask,sanchezm/homebrew-cask,nathancahill/homebrew-cask,jasmas/homebrew-cask,dcondrey/homebrew-cask,ianyh/homebrew-cask,hanxue/caskroom,sohtsuka/homebrew-cask,schneidmaster/homebrew-cask,coeligena/homebrew-customized,cobyism/homebrew-cask,timsutton/homebrew-cask,inta/homebrew-cask,bric3/homebrew-cask,scribblemaniac/homebrew-cask,cliffcotino/homebrew-cask,jgarber623/homebrew-cask,uetchy/homebrew-cask,jmeridth/homebrew-cask,josa42/homebrew-cask,Ephemera/homebrew-cask,dictcp/homebrew-cask,psibre/homebrew-cask,riyad/homebrew-cask,opsdev-ws/homebrew-cask,tjt263/homebrew-cask,mchlrmrz/homebrew-cask,puffdad/homebrew-cask,wickles/homebrew-cask,nathancahill/homebrew-cask,jbeagley52/homebrew-cask,jellyfishcoder/homebrew-cask,renaudguerin/homebrew-cask,yuhki50/homebrew-cask,jmeridth/homebrew-cask,julionc/homebrew-cask,MoOx/homebrew-cask,blainesch/homebrew-cask,colindean/homebrew-cask,arronmabrey/homebrew-cask,yumitsu/homebrew-cask,jaredsampson/homebrew-cask,paour/homebrew-cask,JikkuJose/homebrew-cask,jalaziz/homebrew-cask,alexg0/homebrew-cask,kesara/homebrew-cask,bdhess/homebrew-cask,tjt263/homebrew-cask,bosr/homebrew-cask,ericbn/homebrew-cask,wastrachan/homebrew-cask,shonjir/homebrew-cask,aguynamedryan/homebrew-cask,exherb/homebrew-cask,adrianchia/homebrew-cask,tjnycum/homebrew-cask,jangalinski/homebrew-cask,paour/homebrew-cask,deiga/homebrew-cask,MircoT/homebrew-cask,shonjir/homebrew-cask,diogodamiani/homebrew-cask,mrmachine/homebrew-cask,josa42/homebrew-cask,samdoran/homebrew-cask,jawshooah/homebrew-cask,jaredsampson/homebrew-cask,chadcatlett/caskroom-homebrew-cask,sanyer/homebrew-cask,cblecker/homebrew-cask,joshka/homebrew-cask,ianyh/homebrew-cask,kronicd/homebrew-cask,ericbn/homebrew-cask,vin047/homebrew-cask,hyuna917/homebrew-cask,tangestani/homebrew-cask,FinalDes/homebrew-cask,amatos/homebrew-cask,imgarylai/homebrew-cask,vitorgalvao/homebrew-cask,cprecioso/homebrew-cask,skatsuta/homebrew-cask,okket/homebrew-cask,optikfluffel/homebrew-cask,a1russell/homebrew-cask,bric3/homebrew-cask,timsutton/homebrew-cask,yutarody/homebrew-cask,samnung/homebrew-cask,ptb/homebrew-cask,mwean/homebrew-cask,paour/homebrew-cask
ruby
## Code Before: cask 'telegram' do version '2.16-47508' sha256 '5ffbd2f76054fc47aafa6f2596ef9c6a85a69412a3a1f227f789b1832e7518d5' # telegram.org was verified as official when first introduced to the cask url "https://osx.telegram.org/updates/Telegram-#{version}.app.zip" appcast 'http://osx.telegram.org/updates/versions.xml', checkpoint: '07caec5ebbe1b7081cb2e873cb5321d6f736b6ecbe7421968ba2f69745ac1a6e' name 'Telegram for macOS' homepage 'https://macos.telegram.org' license :gpl auto_updates true app 'Telegram.app' end ## Instruction: Fix `url` stanza comment for Telegram for macOS. ## Code After: cask 'telegram' do version '2.16-47508' sha256 '5ffbd2f76054fc47aafa6f2596ef9c6a85a69412a3a1f227f789b1832e7518d5' url "https://osx.telegram.org/updates/Telegram-#{version}.app.zip" appcast 'http://osx.telegram.org/updates/versions.xml', checkpoint: '07caec5ebbe1b7081cb2e873cb5321d6f736b6ecbe7421968ba2f69745ac1a6e' name 'Telegram for macOS' homepage 'https://macos.telegram.org' license :gpl auto_updates true app 'Telegram.app' end
34bf8d82580b83b1e0409db8636877a22203996b
cryptex/trade.py
cryptex/trade.py
class Trade(object): BUY = 0 SELL = 1 def __init__(self, trade_id, trade_type, base_currency, counter_currency, time, order_id, amount, price, fee=None): self.trade_id = trade_id self.trade_type = trade_type self.base_currency = base_currency self.counter_currency = counter_currency self.time = time self.order_id = order_id self.amount = amount self.price = price self.fee = fee def __str__(self): if self.trade_type == 0: ts = 'Buy' else: ts ='Sell' return '<%s of %.8f %s>' % (ts, self.amount, self.base_currency)
class Trade(object): BUY = 0 SELL = 1 def __init__(self, trade_id, trade_type, base_currency, counter_currency, time, order_id, amount, price, fee=None): self.trade_id = trade_id self.trade_type = trade_type self.base_currency = base_currency self.counter_currency = counter_currency self.time = time self.order_id = order_id self.amount = amount self.price = price self.fee = fee def __str__(self): if self.trade_type == Trade.BUY: ts = 'Buy' else: ts = 'Sell' return '<%s of %.8f %s>' % (ts, self.amount, self.base_currency)
Remove magic number check in Trade str method
Remove magic number check in Trade str method
Python
mit
coink/cryptex
python
## Code Before: class Trade(object): BUY = 0 SELL = 1 def __init__(self, trade_id, trade_type, base_currency, counter_currency, time, order_id, amount, price, fee=None): self.trade_id = trade_id self.trade_type = trade_type self.base_currency = base_currency self.counter_currency = counter_currency self.time = time self.order_id = order_id self.amount = amount self.price = price self.fee = fee def __str__(self): if self.trade_type == 0: ts = 'Buy' else: ts ='Sell' return '<%s of %.8f %s>' % (ts, self.amount, self.base_currency) ## Instruction: Remove magic number check in Trade str method ## Code After: class Trade(object): BUY = 0 SELL = 1 def __init__(self, trade_id, trade_type, base_currency, counter_currency, time, order_id, amount, price, fee=None): self.trade_id = trade_id self.trade_type = trade_type self.base_currency = base_currency self.counter_currency = counter_currency self.time = time self.order_id = order_id self.amount = amount self.price = price self.fee = fee def __str__(self): if self.trade_type == Trade.BUY: ts = 'Buy' else: ts = 'Sell' return '<%s of %.8f %s>' % (ts, self.amount, self.base_currency)
18d460dda5125651e98adf349cef2469a6933a77
index.js
index.js
const Telegraf = require('telegraf'); const bot = new Telegraf(process.env.BOT_TOKEN); function repeatIt(messageText = '') { const timesPosition = messageText.indexOf(' '); const times = messageText.substring(0, timesPosition); const text = messageText.substring(timesPosition); let answer = ''; for (let i = 0; i < times; i += 1) { answer += text; } return answer || messageText; } bot.on('message', (ctx) => { const messageText = ctx.update.message.text; console.log(messageText); return ctx.reply(repeatIt(messageText)); }); bot.startPolling()
const Telegraf = require('telegraf'); const BOT_TOKEN = process.env.BOT_TOKEN || ''; const PORT = process.env.PORT || 3000; const URL = process.env.URL || ''; const bot = new Telegraf(BOT_TOKEN); bot.telegram.setWebhook(`${URL}/bot${BOT_TOKEN}`); bot.startWebhook(`/bot${BOT_TOKEN}`, null, PORT); function repeatIt(messageText = '') { const timesPosition = messageText.indexOf(' '); const times = messageText.substring(0, timesPosition); const text = messageText.substring(timesPosition + 1); let answer = ''; for (let i = 0; i < times; i += 1) { answer += text; } return answer || messageText; } bot.on('message', (ctx) => { const messageText = ctx.update.message.text; console.log(messageText); return ctx.reply(repeatIt(messageText)); }); // bot.startPolling()
Use webhooks and ready for heroku!
Use webhooks and ready for heroku!
JavaScript
mit
newvertex/repeatitbot
javascript
## Code Before: const Telegraf = require('telegraf'); const bot = new Telegraf(process.env.BOT_TOKEN); function repeatIt(messageText = '') { const timesPosition = messageText.indexOf(' '); const times = messageText.substring(0, timesPosition); const text = messageText.substring(timesPosition); let answer = ''; for (let i = 0; i < times; i += 1) { answer += text; } return answer || messageText; } bot.on('message', (ctx) => { const messageText = ctx.update.message.text; console.log(messageText); return ctx.reply(repeatIt(messageText)); }); bot.startPolling() ## Instruction: Use webhooks and ready for heroku! ## Code After: const Telegraf = require('telegraf'); const BOT_TOKEN = process.env.BOT_TOKEN || ''; const PORT = process.env.PORT || 3000; const URL = process.env.URL || ''; const bot = new Telegraf(BOT_TOKEN); bot.telegram.setWebhook(`${URL}/bot${BOT_TOKEN}`); bot.startWebhook(`/bot${BOT_TOKEN}`, null, PORT); function repeatIt(messageText = '') { const timesPosition = messageText.indexOf(' '); const times = messageText.substring(0, timesPosition); const text = messageText.substring(timesPosition + 1); let answer = ''; for (let i = 0; i < times; i += 1) { answer += text; } return answer || messageText; } bot.on('message', (ctx) => { const messageText = ctx.update.message.text; console.log(messageText); return ctx.reply(repeatIt(messageText)); }); // bot.startPolling()
bb67f3e640c4e5413b1f652b01b05e7d24a49d37
layouts/partials/footer.html
layouts/partials/footer.html
<footer class="white pa3"> <div class="footer-section"> <div>Multiformats was started and is sponsored by</div> <a href="https://protocol.ai/"> <img id="footer-logo" src="/protocol-labs-logo.png"> </a> </div> <div class="footer-section right"> <nav> <a href="#multiformat-protocols" class="nav-link">Protocols</a> <a target="_blank" href="https://github.com/{{ .Page.Params.stars }}" class="nav-link">Github</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link hide-ns">Specs</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link show-ns">Specifications</a> </nav> <div class="copyright">© <a href="https://protocol.ai/" target="_blank">Protocol Labs</a> | Except as <a href="https://protocol.ai/legal/">noted</a>, content licensed <a href="" target="_blank">CC-BY 3.0</a></div> | <a href="https://github.com/multiformats/website/edit/master/{{ page.name }}">Edit this page</a> </div> </footer>
<footer class="white pa3"> <div class="footer-section"> <div>Multiformats was started and is sponsored by</div> <a href="https://protocol.ai/"> <img id="footer-logo" src="/protocol-labs-logo.png"> </a> </div> <div class="footer-section right"> <nav> <a href="#multiformat-protocols" class="nav-link">Protocols</a> <a target="_blank" href="https://github.com/{{ .Page.Params.stars }}" class="nav-link">Github</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link hide-ns">Specs</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link show-ns">Specifications</a> </nav> <div class="copyright">© <a href="https://protocol.ai/" target="_blank">Protocol Labs</a> | Except as <a href="https://protocol.ai/legal/">noted</a>, content licensed <a href="" target="_blank">CC-BY 3.0</a></div> </div> </footer>
Revert "Allow to edit pages"
Revert "Allow to edit pages"
HTML
mit
multiformats/website,multiformats/website
html
## Code Before: <footer class="white pa3"> <div class="footer-section"> <div>Multiformats was started and is sponsored by</div> <a href="https://protocol.ai/"> <img id="footer-logo" src="/protocol-labs-logo.png"> </a> </div> <div class="footer-section right"> <nav> <a href="#multiformat-protocols" class="nav-link">Protocols</a> <a target="_blank" href="https://github.com/{{ .Page.Params.stars }}" class="nav-link">Github</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link hide-ns">Specs</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link show-ns">Specifications</a> </nav> <div class="copyright">© <a href="https://protocol.ai/" target="_blank">Protocol Labs</a> | Except as <a href="https://protocol.ai/legal/">noted</a>, content licensed <a href="" target="_blank">CC-BY 3.0</a></div> | <a href="https://github.com/multiformats/website/edit/master/{{ page.name }}">Edit this page</a> </div> </footer> ## Instruction: Revert "Allow to edit pages" ## Code After: <footer class="white pa3"> <div class="footer-section"> <div>Multiformats was started and is sponsored by</div> <a href="https://protocol.ai/"> <img id="footer-logo" src="/protocol-labs-logo.png"> </a> </div> <div class="footer-section right"> <nav> <a href="#multiformat-protocols" class="nav-link">Protocols</a> <a target="_blank" href="https://github.com/{{ .Page.Params.stars }}" class="nav-link">Github</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link hide-ns">Specs</a> <a target="_blank" href="{{ .Site.Params.specifications }}" class="nav-link show-ns">Specifications</a> </nav> <div class="copyright">© <a href="https://protocol.ai/" target="_blank">Protocol Labs</a> | Except as <a href="https://protocol.ai/legal/">noted</a>, content licensed <a href="" target="_blank">CC-BY 3.0</a></div> </div> </footer>
6e8cbbd34c40eea226efa4fe7ee40696def2c9ac
pkgs/tools/misc/t1utils/default.nix
pkgs/tools/misc/t1utils/default.nix
{ stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { version = "1.39"; name = "t1utils-${version}"; src = fetchFromGitHub { owner = "kohler"; repo = "t1utils"; rev = "v${version}"; sha256 = "02n4dzxa8fz0dbxari7xh6cq66x3az6g55fq8ix2bfmww42s4v2r"; }; meta = with stdenv.lib; { description = "Collection of simple Type 1 font manipulation programs"; longDescription = '' t1utils is a collection of simple type-1 font manipulation programs. Together, they allow you to convert between PFA (ASCII) and PFB (binary) formats, disassemble PFA or PFB files into human-readable form, reassemble them into PFA or PFB format. Additionally you can extract font resources from a Macintosh font file or create a Macintosh Type 1 font file from a PFA or PFB font. ''; homepage = http://www.lcdf.org/type/; # README from tarball says "BSD-like" and points to non-existing LICENSE # file... license = "Click"; # MIT with extra clause, https://github.com/kohler/t1utils/blob/master/LICENSE platforms = platforms.all; maintainers = [ maintainers.bjornfor ]; }; }
{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "t1utils-1.39"; src = fetchurl { url = "http://www.lcdf.org/type/${name}.tar.gz"; sha256 = "1i6ln194ns2g4j5zjlj4bfzxpkfpnxvy37n9baq3hywjqkjz7bhg"; }; meta = with stdenv.lib; { description = "Collection of simple Type 1 font manipulation programs"; longDescription = '' t1utils is a collection of simple type-1 font manipulation programs. Together, they allow you to convert between PFA (ASCII) and PFB (binary) formats, disassemble PFA or PFB files into human-readable form, reassemble them into PFA or PFB format. Additionally you can extract font resources from a Macintosh font file or create a Macintosh Type 1 font file from a PFA or PFB font. ''; homepage = http://www.lcdf.org/type/; # README from tarball says "BSD-like" and points to non-existing LICENSE # file... license = "Click"; # MIT with extra clause, https://github.com/kohler/t1utils/blob/master/LICENSE platforms = platforms.linux; maintainers = [ maintainers.bjornfor ]; }; }
Revert "t1utils: use github cache and allow build on darwin"
Revert "t1utils: use github cache and allow build on darwin" This reverts commit 9b2bff7097e47fa956e642c2f630b998ce9aef38. It fails to build: http://hydra.nixos.org/build/27428175/nixlog/2/raw
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton
nix
## Code Before: { stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { version = "1.39"; name = "t1utils-${version}"; src = fetchFromGitHub { owner = "kohler"; repo = "t1utils"; rev = "v${version}"; sha256 = "02n4dzxa8fz0dbxari7xh6cq66x3az6g55fq8ix2bfmww42s4v2r"; }; meta = with stdenv.lib; { description = "Collection of simple Type 1 font manipulation programs"; longDescription = '' t1utils is a collection of simple type-1 font manipulation programs. Together, they allow you to convert between PFA (ASCII) and PFB (binary) formats, disassemble PFA or PFB files into human-readable form, reassemble them into PFA or PFB format. Additionally you can extract font resources from a Macintosh font file or create a Macintosh Type 1 font file from a PFA or PFB font. ''; homepage = http://www.lcdf.org/type/; # README from tarball says "BSD-like" and points to non-existing LICENSE # file... license = "Click"; # MIT with extra clause, https://github.com/kohler/t1utils/blob/master/LICENSE platforms = platforms.all; maintainers = [ maintainers.bjornfor ]; }; } ## Instruction: Revert "t1utils: use github cache and allow build on darwin" This reverts commit 9b2bff7097e47fa956e642c2f630b998ce9aef38. It fails to build: http://hydra.nixos.org/build/27428175/nixlog/2/raw ## Code After: { stdenv, fetchurl }: stdenv.mkDerivation rec { name = "t1utils-1.39"; src = fetchurl { url = "http://www.lcdf.org/type/${name}.tar.gz"; sha256 = "1i6ln194ns2g4j5zjlj4bfzxpkfpnxvy37n9baq3hywjqkjz7bhg"; }; meta = with stdenv.lib; { description = "Collection of simple Type 1 font manipulation programs"; longDescription = '' t1utils is a collection of simple type-1 font manipulation programs. Together, they allow you to convert between PFA (ASCII) and PFB (binary) formats, disassemble PFA or PFB files into human-readable form, reassemble them into PFA or PFB format. Additionally you can extract font resources from a Macintosh font file or create a Macintosh Type 1 font file from a PFA or PFB font. ''; homepage = http://www.lcdf.org/type/; # README from tarball says "BSD-like" and points to non-existing LICENSE # file... license = "Click"; # MIT with extra clause, https://github.com/kohler/t1utils/blob/master/LICENSE platforms = platforms.linux; maintainers = [ maintainers.bjornfor ]; }; }
a8820b60b36ee72058a95c117cbc17c2b96a623d
pathdparser.java
pathdparser.java
import java.util.*; class PathDElement { char type; ArrayList<Float> values; PathDElement() { values = new ArrayList<Float>(); } } class PathDParser { // Split a string describing the segments of a path into void partition( String path, ArrayList<PathDElement> pathElements ) { String delimiters = "(?=m|l|c|v|h|q|z|M|L|C|V|H|Q|Z)"; String[] tokens = path.split(delimiters); pathElements.clear(); for( String t: tokens ) { PathDElement elem = new PathDElement(); elem.type = t.charAt(0); // Split String[] values = t.substring(1).replaceAll("^[,\\s]+", "").split("[,\\s]+"); ArrayList<String> stringValues = new ArrayList<String>(Arrays.asList(values)); System.out.println(elem.type); for( String s: stringValues ) { System.out.println(s); elem.values.add(Float.parseFloat(s)); } System.out.println("size = " + elem.values.size()); } } } // class PathDParser
import java.util.*; class PathDElement { char type; ArrayList<Float> values; PathDElement() { values = new ArrayList<Float>(); } } class PathDParser { // Split a string describing the segments of a path into void partition( String path, ArrayList<PathDElement> pathElements ) { String delimiters = "(?=m|l|c|v|h|q|z|M|L|C|V|H|Q|Z)"; String[] tokens = path.split(delimiters); pathElements.clear(); for( String t: tokens ) { PathDElement elem = new PathDElement(); elem.type = t.charAt(0); boolean isRelative = Character.isLowerCase(elem.type); // Split String[] values = t.substring(1).replaceAll("^[,\\s]+", "").split("[,\\s]+"); ArrayList<String> stringValues = new ArrayList<String>(Arrays.asList(values)); System.out.println(elem.type); for( String s: stringValues ) { System.out.println(s); elem.values.add(Float.parseFloat(s)); } System.out.println("size = " + elem.values.size()); } } } // class PathDParser
Determine whether coordinates are relative
Determine whether coordinates are relative
Java
mit
gregvw/SVG2Processing
java
## Code Before: import java.util.*; class PathDElement { char type; ArrayList<Float> values; PathDElement() { values = new ArrayList<Float>(); } } class PathDParser { // Split a string describing the segments of a path into void partition( String path, ArrayList<PathDElement> pathElements ) { String delimiters = "(?=m|l|c|v|h|q|z|M|L|C|V|H|Q|Z)"; String[] tokens = path.split(delimiters); pathElements.clear(); for( String t: tokens ) { PathDElement elem = new PathDElement(); elem.type = t.charAt(0); // Split String[] values = t.substring(1).replaceAll("^[,\\s]+", "").split("[,\\s]+"); ArrayList<String> stringValues = new ArrayList<String>(Arrays.asList(values)); System.out.println(elem.type); for( String s: stringValues ) { System.out.println(s); elem.values.add(Float.parseFloat(s)); } System.out.println("size = " + elem.values.size()); } } } // class PathDParser ## Instruction: Determine whether coordinates are relative ## Code After: import java.util.*; class PathDElement { char type; ArrayList<Float> values; PathDElement() { values = new ArrayList<Float>(); } } class PathDParser { // Split a string describing the segments of a path into void partition( String path, ArrayList<PathDElement> pathElements ) { String delimiters = "(?=m|l|c|v|h|q|z|M|L|C|V|H|Q|Z)"; String[] tokens = path.split(delimiters); pathElements.clear(); for( String t: tokens ) { PathDElement elem = new PathDElement(); elem.type = t.charAt(0); boolean isRelative = Character.isLowerCase(elem.type); // Split String[] values = t.substring(1).replaceAll("^[,\\s]+", "").split("[,\\s]+"); ArrayList<String> stringValues = new ArrayList<String>(Arrays.asList(values)); System.out.println(elem.type); for( String s: stringValues ) { System.out.println(s); elem.values.add(Float.parseFloat(s)); } System.out.println("size = " + elem.values.size()); } } } // class PathDParser
e4b52342b5e493b86ebb41275f3ef697c9ad1005
alien4cloud-ui/src/main/build/config/copy.js
alien4cloud-ui/src/main/build/config/copy.js
// Copies files not processed by requirejs optimization from source to dist so other tasks can process them module.exports = { dist: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ '*.{ico,png,txt}', '.htaccess', '*.html', 'bower_components/**/*', 'views/alien4cloud-templates.js', 'js-lib/**/*', 'images/**/*', 'scripts/**/*', 'data/**/*', 'api-doc/**/*', 'version.json', ] }, { expand: true, cwd: '.tmp/images', dest: '<%= yeoman.dist %>/images', src: ['generated/*'] }, { expand: true, flatten: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>/images', src: ['bower_components/angular-tree-control/images/*'] }] }, bower: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ 'bower_components/es5-shim/es5-shim.min.js', 'bower_components/json3/lib/json3.min.js', 'bower_components/requirejs/require.js', 'bower_components/font-awesome/**/*' ] }] } };
// Copies files not processed by requirejs optimization from source to dist so other tasks can process them module.exports = { dist: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ '*.{ico,png,txt}', '.htaccess', '*.html', 'bower_components/**/*', 'views/alien4cloud-templates.js', 'js-lib/**/*', 'images/**/*', 'scripts/**/*', 'data/**/*', 'api-doc/**/*', 'version.json', ] }, { expand: true, cwd: '.tmp/images', dest: '<%= yeoman.dist %>/images', src: ['generated/*'] }, { expand: true, flatten: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>/images', src: ['bower_components/angular-tree-control/images/*'] }] }, bower: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ 'bower_components/es5-shim/es5-shim.min.js', 'bower_components/json3/lib/json3.min.js', 'bower_components/requirejs/require.js', 'bower_components/font-awesome/**/*', 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/**/*', 'bower_components/roboto-fontface/**/*' ] }] } };
Fix build to add back the roboto font and bootstrap fonts.
Fix build to add back the roboto font and bootstrap fonts.
JavaScript
apache-2.0
san-tak/alien4cloud,alien4cloud/alien4cloud,alien4cloud/alien4cloud,alien4cloud/alien4cloud,san-tak/alien4cloud,alien4cloud/alien4cloud,san-tak/alien4cloud,san-tak/alien4cloud
javascript
## Code Before: // Copies files not processed by requirejs optimization from source to dist so other tasks can process them module.exports = { dist: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ '*.{ico,png,txt}', '.htaccess', '*.html', 'bower_components/**/*', 'views/alien4cloud-templates.js', 'js-lib/**/*', 'images/**/*', 'scripts/**/*', 'data/**/*', 'api-doc/**/*', 'version.json', ] }, { expand: true, cwd: '.tmp/images', dest: '<%= yeoman.dist %>/images', src: ['generated/*'] }, { expand: true, flatten: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>/images', src: ['bower_components/angular-tree-control/images/*'] }] }, bower: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ 'bower_components/es5-shim/es5-shim.min.js', 'bower_components/json3/lib/json3.min.js', 'bower_components/requirejs/require.js', 'bower_components/font-awesome/**/*' ] }] } }; ## Instruction: Fix build to add back the roboto font and bootstrap fonts. ## Code After: // Copies files not processed by requirejs optimization from source to dist so other tasks can process them module.exports = { dist: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ '*.{ico,png,txt}', '.htaccess', '*.html', 'bower_components/**/*', 'views/alien4cloud-templates.js', 'js-lib/**/*', 'images/**/*', 'scripts/**/*', 'data/**/*', 'api-doc/**/*', 'version.json', ] }, { expand: true, cwd: '.tmp/images', dest: '<%= yeoman.dist %>/images', src: ['generated/*'] }, { expand: true, flatten: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>/images', src: ['bower_components/angular-tree-control/images/*'] }] }, bower: { files: [{ expand: true, dot: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.dist %>', src: [ 'bower_components/es5-shim/es5-shim.min.js', 'bower_components/json3/lib/json3.min.js', 'bower_components/requirejs/require.js', 'bower_components/font-awesome/**/*', 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/**/*', 'bower_components/roboto-fontface/**/*' ] }] } };
9c7a6d5241d52c3f1ba34d0a02ebc461e8237ad7
static/css/index-page.css
static/css/index-page.css
/* * Follow css style guides as shown in the OSF developer documentation * http://cosdev.readthedocs.org/en/latest/style_guides/html_css.html */ /* Section to replicate osf style, ignore until end of this section */ #navbarScope { position: fixed; width: 100%; border-radius: 0; } /* End */ .prereg-container ol, .prereg-container p, .prereg-button { font-size: 16px; } .prereg-button { height: 76px; cursor: pointer; text-align: center; } div[class^='col']:first-of-type .prereg-button { line-height: 48px; } .prereg-button:hover, .prereg-button.active { background-color: #204762; color: white; }
/* * Follow css style guides as shown in the OSF developer documentation * http://cosdev.readthedocs.org/en/latest/style_guides/html_css.html */ /* Section to replicate osf style, ignore until end of this section */ #navbarScope { position: fixed; width: 100%; border-radius: 0; } /* End */ .prereg-container ol, .prereg-container p, .prereg-button { font-size: 16px; } .prereg-button { height: 76px; cursor: pointer; text-align: center; } div[class^='col']:first-of-type .prereg-button { line-height: 48px; } .prereg-button:hover { background-color: #E0EBF3; } .prereg-button.active { background-color: #204762; color: white; }
Change hover and default box colors
Change hover and default box colors
CSS
apache-2.0
haoyuchen1992/OSF-Meeting,caneruguz/prereg-html,caneruguz/prereg-html
css
## Code Before: /* * Follow css style guides as shown in the OSF developer documentation * http://cosdev.readthedocs.org/en/latest/style_guides/html_css.html */ /* Section to replicate osf style, ignore until end of this section */ #navbarScope { position: fixed; width: 100%; border-radius: 0; } /* End */ .prereg-container ol, .prereg-container p, .prereg-button { font-size: 16px; } .prereg-button { height: 76px; cursor: pointer; text-align: center; } div[class^='col']:first-of-type .prereg-button { line-height: 48px; } .prereg-button:hover, .prereg-button.active { background-color: #204762; color: white; } ## Instruction: Change hover and default box colors ## Code After: /* * Follow css style guides as shown in the OSF developer documentation * http://cosdev.readthedocs.org/en/latest/style_guides/html_css.html */ /* Section to replicate osf style, ignore until end of this section */ #navbarScope { position: fixed; width: 100%; border-radius: 0; } /* End */ .prereg-container ol, .prereg-container p, .prereg-button { font-size: 16px; } .prereg-button { height: 76px; cursor: pointer; text-align: center; } div[class^='col']:first-of-type .prereg-button { line-height: 48px; } .prereg-button:hover { background-color: #E0EBF3; } .prereg-button.active { background-color: #204762; color: white; }
1ce26a0b0cbddb49047da0f8bac8214fb298c646
pymatgen/__init__.py
pymatgen/__init__.py
__author__ = "Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Will Richards, Dan Gunter, Shreyas Cholia, Vincent L Chevrier, Rickard Armiento" __date__ = "Jun 28, 2012" __version__ = "2.0.0" """ Useful aliases for commonly used objects and modules. """ from pymatgen.core.periodic_table import Element, Specie from pymatgen.core.structure import Structure, Molecule, Composition from pymatgen.core.lattice import Lattice from pymatgen.serializers.json_coders import PMGJSONEncoder, PMGJSONDecoder from pymatgen.electronic_structure.core import Spin, Orbital
__author__ = "Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Will Richards, Dan Gunter, Shreyas Cholia, Vincent L Chevrier, Rickard Armiento" __date__ = "Jun 28, 2012" __version__ = "2.0.0" """ Useful aliases for commonly used objects and modules. """ from pymatgen.core.periodic_table import Element, Specie from pymatgen.core.structure import Structure, Molecule, Composition from pymatgen.core.lattice import Lattice from pymatgen.serializers.json_coders import PMGJSONEncoder, PMGJSONDecoder from pymatgen.electronic_structure.core import Spin, Orbital from pymatgen.util.io_utils import file_open_zip_aware as openz
Add an alias to file_open_zip_aware as openz.
Add an alias to file_open_zip_aware as openz.
Python
mit
Dioptas/pymatgen,yanikou19/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,migueldiascosta/pymatgen,rousseab/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,Bismarrck/pymatgen,rousseab/pymatgen,Dioptas/pymatgen,rousseab/pymatgen,ctoher/pymatgen,ctoher/pymatgen,sonium0/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen,migueldiascosta/pymatgen,sonium0/pymatgen,ctoher/pymatgen
python
## Code Before: __author__ = "Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Will Richards, Dan Gunter, Shreyas Cholia, Vincent L Chevrier, Rickard Armiento" __date__ = "Jun 28, 2012" __version__ = "2.0.0" """ Useful aliases for commonly used objects and modules. """ from pymatgen.core.periodic_table import Element, Specie from pymatgen.core.structure import Structure, Molecule, Composition from pymatgen.core.lattice import Lattice from pymatgen.serializers.json_coders import PMGJSONEncoder, PMGJSONDecoder from pymatgen.electronic_structure.core import Spin, Orbital ## Instruction: Add an alias to file_open_zip_aware as openz. ## Code After: __author__ = "Shyue Ping Ong, Anubhav Jain, Michael Kocher, Geoffroy Hautier, Will Richards, Dan Gunter, Shreyas Cholia, Vincent L Chevrier, Rickard Armiento" __date__ = "Jun 28, 2012" __version__ = "2.0.0" """ Useful aliases for commonly used objects and modules. """ from pymatgen.core.periodic_table import Element, Specie from pymatgen.core.structure import Structure, Molecule, Composition from pymatgen.core.lattice import Lattice from pymatgen.serializers.json_coders import PMGJSONEncoder, PMGJSONDecoder from pymatgen.electronic_structure.core import Spin, Orbital from pymatgen.util.io_utils import file_open_zip_aware as openz
e616438f1ae978210dfcd0e9fc52c9f57ca4afd7
PerfTestSharedClasses/src/shared/Constants.java
PerfTestSharedClasses/src/shared/Constants.java
package shared; /** * */ /** * * @author David Lecoconnier [email protected] * @author Jean-Luc Amitousa-Mankoy [email protected] * @version 1.0 */ public class Constants { /** * Socket port for objects transmission */ public static int SOCKET_OBJECT_PORT = 2000; /** * Socket port for commands transmission */ public static int SOCKET_INSTRUCTION_PORT = 2001; }
package shared; /** * */ /** * * @author David Lecoconnier [email protected] * @author Jean-Luc Amitousa-Mankoy [email protected] * @version 1.0 */ public class Constants { /** * Socket port for objects transmission */ public static int SOCKET_OBJECT_PORT = 2000; /** * Socket port for commands transmission */ public static int SOCKET_COMMAND_PORT = 2001; }
Change name to improve comprehension
Change name to improve comprehension
Java
apache-2.0
etrange02/Perftest
java
## Code Before: package shared; /** * */ /** * * @author David Lecoconnier [email protected] * @author Jean-Luc Amitousa-Mankoy [email protected] * @version 1.0 */ public class Constants { /** * Socket port for objects transmission */ public static int SOCKET_OBJECT_PORT = 2000; /** * Socket port for commands transmission */ public static int SOCKET_INSTRUCTION_PORT = 2001; } ## Instruction: Change name to improve comprehension ## Code After: package shared; /** * */ /** * * @author David Lecoconnier [email protected] * @author Jean-Luc Amitousa-Mankoy [email protected] * @version 1.0 */ public class Constants { /** * Socket port for objects transmission */ public static int SOCKET_OBJECT_PORT = 2000; /** * Socket port for commands transmission */ public static int SOCKET_COMMAND_PORT = 2001; }
9866a4c2c03a147c77b5434171d06d69535b8883
src/commands/install/InstallContext.php
src/commands/install/InstallContext.php
<?php namespace PharIo\Phive; use PharIo\Phive\Cli\GeneralContext; class InstallContext extends GeneralContext { protected function getKnownOptions() { return [ 'target' => 't', 'copy' => 'c', 'global' => 'g', 'temporary' => false ]; } public function requiresValue($option) { return $option === 'target'; } }
<?php namespace PharIo\Phive; use PharIo\Phive\Cli\GeneralContext; class InstallContext extends GeneralContext { protected function getKnownOptions() { return [ 'target' => 't', 'copy' => 'c', 'global' => 'g', 'temporary' => false ]; } protected function getConflictingOptions() { return [ ['global' => 'temporary'], ['global' => 'target'] ]; } public function requiresValue($option) { return $option === 'target'; } }
Make install options temporary and target conflict with global switch
Make install options temporary and target conflict with global switch This fixes #63
PHP
bsd-3-clause
phar-io/phive
php
## Code Before: <?php namespace PharIo\Phive; use PharIo\Phive\Cli\GeneralContext; class InstallContext extends GeneralContext { protected function getKnownOptions() { return [ 'target' => 't', 'copy' => 'c', 'global' => 'g', 'temporary' => false ]; } public function requiresValue($option) { return $option === 'target'; } } ## Instruction: Make install options temporary and target conflict with global switch This fixes #63 ## Code After: <?php namespace PharIo\Phive; use PharIo\Phive\Cli\GeneralContext; class InstallContext extends GeneralContext { protected function getKnownOptions() { return [ 'target' => 't', 'copy' => 'c', 'global' => 'g', 'temporary' => false ]; } protected function getConflictingOptions() { return [ ['global' => 'temporary'], ['global' => 'target'] ]; } public function requiresValue($option) { return $option === 'target'; } }
9441938357496f46fe513992f75cd707c6c638f4
README.md
README.md
Manage the technology on your radar with this interactive UI. See it in action with the [example radar](http://dondochaka.dyndns.org/tech-radar). ![radar screenshot](http://dondochaka.dyndns.org/gitlab/tnunamak/tech-radar/raw/master/radar.png) # Authors Please contact Tim Nunamaker for more info.
Manage the technology on your radar with this interactive UI. See it in action with the [example radar](http://dondochaka.dyndns.org/tech-radar). ![radar screenshot](https://raw.github.com/tnunamak/tech-radar/master/radar.png) # Authors Please contact Tim Nunamaker for more info.
Update image to Github URL
Update image to Github URL
Markdown
mit
scic/tech-radar,scic/tech-radar,tnunamak/tech-radar,tnunamak/tech-radar
markdown
## Code Before: Manage the technology on your radar with this interactive UI. See it in action with the [example radar](http://dondochaka.dyndns.org/tech-radar). ![radar screenshot](http://dondochaka.dyndns.org/gitlab/tnunamak/tech-radar/raw/master/radar.png) # Authors Please contact Tim Nunamaker for more info. ## Instruction: Update image to Github URL ## Code After: Manage the technology on your radar with this interactive UI. See it in action with the [example radar](http://dondochaka.dyndns.org/tech-radar). ![radar screenshot](https://raw.github.com/tnunamak/tech-radar/master/radar.png) # Authors Please contact Tim Nunamaker for more info.
2c7d0491369dcd9aade8fcc9556c125b5910f6ad
content/index.haml
content/index.haml
--- title: Home --- %h1 wiki.template %p This is a wiki template. The main point of this is to integrate the foundation css framework with nanoc and preparing everything to be wiki-ish, so one can use this as a start for creating a wiki without having to deal with stylesheets and everything. %p After the main things are done (the layout), integration for code listings and latex-like formula integration will be included, but for the first step the goal is to serve a starting point for creating a wiki with Markdown. %p Maybe other markup languages will be included later on.
--- title: Home --- %h1 wiki.template %p This is a wiki template. The main point of this is to integrate the foundation css framework with nanoc and preparing everything to be wiki-ish, so one can use this as a start for creating a wiki without having to deal with stylesheets and everything. %p After the main things are done (the layout), integration for code listings and latex-like formula integration will be included, but for the first step the goal is to serve a starting point for creating a wiki with Markdown. %p Maybe other markup languages will be included later on. %hr .row .large-6.columns %p .row The Wiki %br %small About this template .large-6.columns %p .row Frequently Asked Questions %br %small The FAQs %p .row How to contribute %br %small How to contribute to this template %hr .row .large-6.columns %p .row Beginners guide %br %small How to get this running %p .row Installation guide %br %small Full installation guide .large-6.columns %p .row Goals of this wiki %br %small Why am I writing this thing? %hr .row .large-6.columns %p .row Developer notes %br %small How to work with this piece of software %p .row License %br %small GPLv2 and additional notes .large-6.columns %p .row Pull Request etiquette %br %small How to submit pull requests on github for this thing %p .row Maintainer contact %br %small How to get in touch with me
Add landing page main navigation
Add landing page main navigation
Haml
lgpl-2.1
matthiasbeyer/wiki.template,matthiasbeyer/wiki.template,matthiasbeyer/wiki.template
haml
## Code Before: --- title: Home --- %h1 wiki.template %p This is a wiki template. The main point of this is to integrate the foundation css framework with nanoc and preparing everything to be wiki-ish, so one can use this as a start for creating a wiki without having to deal with stylesheets and everything. %p After the main things are done (the layout), integration for code listings and latex-like formula integration will be included, but for the first step the goal is to serve a starting point for creating a wiki with Markdown. %p Maybe other markup languages will be included later on. ## Instruction: Add landing page main navigation ## Code After: --- title: Home --- %h1 wiki.template %p This is a wiki template. The main point of this is to integrate the foundation css framework with nanoc and preparing everything to be wiki-ish, so one can use this as a start for creating a wiki without having to deal with stylesheets and everything. %p After the main things are done (the layout), integration for code listings and latex-like formula integration will be included, but for the first step the goal is to serve a starting point for creating a wiki with Markdown. %p Maybe other markup languages will be included later on. %hr .row .large-6.columns %p .row The Wiki %br %small About this template .large-6.columns %p .row Frequently Asked Questions %br %small The FAQs %p .row How to contribute %br %small How to contribute to this template %hr .row .large-6.columns %p .row Beginners guide %br %small How to get this running %p .row Installation guide %br %small Full installation guide .large-6.columns %p .row Goals of this wiki %br %small Why am I writing this thing? %hr .row .large-6.columns %p .row Developer notes %br %small How to work with this piece of software %p .row License %br %small GPLv2 and additional notes .large-6.columns %p .row Pull Request etiquette %br %small How to submit pull requests on github for this thing %p .row Maintainer contact %br %small How to get in touch with me
86c876193883b550913abea3cd519de07900ceea
package.json
package.json
{ "name": "jquery.autocomplete", "version": "1.0.0", "devDependencies": { "phantomjs": "~1.9.7-5", "selenium-webdriver": "^2.41.0", "should": "^3.3.1", "webdriverjs-helper": "^1.2.0", "mocha": "^2.3.3", "connect": "^2.16.1" }, "scripts": { "test": "./node_modules/.bin/mocha -R spec -t 60000 ./test/test" } }
{ "name": "jquery.autocomplete", "version": "1.0.0", "devDependencies": { "phantomjs": "~1.9.7-5", "selenium-webdriver": "^2.41.0", "should": "^3.3.1", "webdriverjs-helper": "^1.2.0", "mocha": "^2.3.3", "connect": "^2.16.1" }, "scripts": { "test": "./node_modules/.bin/mocha -R spec -t 60000 ./test/test" }, "version": ">=4.2" }
Add a node version hint
Add a node version hint
JSON
mit
lloydwatkin/jquery.autocomplete,lloydwatkin/jquery.autocomplete
json
## Code Before: { "name": "jquery.autocomplete", "version": "1.0.0", "devDependencies": { "phantomjs": "~1.9.7-5", "selenium-webdriver": "^2.41.0", "should": "^3.3.1", "webdriverjs-helper": "^1.2.0", "mocha": "^2.3.3", "connect": "^2.16.1" }, "scripts": { "test": "./node_modules/.bin/mocha -R spec -t 60000 ./test/test" } } ## Instruction: Add a node version hint ## Code After: { "name": "jquery.autocomplete", "version": "1.0.0", "devDependencies": { "phantomjs": "~1.9.7-5", "selenium-webdriver": "^2.41.0", "should": "^3.3.1", "webdriverjs-helper": "^1.2.0", "mocha": "^2.3.3", "connect": "^2.16.1" }, "scripts": { "test": "./node_modules/.bin/mocha -R spec -t 60000 ./test/test" }, "version": ">=4.2" }
0774720578dfd2800f85cd95a617da4286e0e6d0
_posts/2009-05-10-bring-it-on.md
_posts/2009-05-10-bring-it-on.md
--- layout: post-no-feature title: "Time (Bring it on)" description: category: songs type: Songs tags: [voicemale, music] --- The following song was inspired by Seal's "Bring it on". Not quite a cover, but the resemblence was intended. Sung by VoiceMale. {% raw %} <audio controls> <source src="{{ site.url }}/assets/audio/08%20Time%20(Bring%20It%20On).mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> {% endraw %} ![Album cover]({{ site.url }}/images/suit-up.jpg)
--- layout: post-no-feature title: "Time (Bring it on)" description: category: songs type: Songs tags: [voicemale, music] --- The following song was inspired by Seal's "Bring it on". Not quite a cover, but the resemblence was intended. Sung by VoiceMale. {% raw %} <audio controls> <source src="http://suchow.io/assets/audio/08%20Time%20(Bring%20It%20On).mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> {% endraw %} <img class="half-width" src="{{ site.url }}/images/suit-up.jpg" width="150" alt="Album cover.">
Fix some issues with audio post
Fix some issues with audio post
Markdown
mit
suchow/suchow.io,suchow/suchow.io,suchow/suchow.io
markdown
## Code Before: --- layout: post-no-feature title: "Time (Bring it on)" description: category: songs type: Songs tags: [voicemale, music] --- The following song was inspired by Seal's "Bring it on". Not quite a cover, but the resemblence was intended. Sung by VoiceMale. {% raw %} <audio controls> <source src="{{ site.url }}/assets/audio/08%20Time%20(Bring%20It%20On).mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> {% endraw %} ![Album cover]({{ site.url }}/images/suit-up.jpg) ## Instruction: Fix some issues with audio post ## Code After: --- layout: post-no-feature title: "Time (Bring it on)" description: category: songs type: Songs tags: [voicemale, music] --- The following song was inspired by Seal's "Bring it on". Not quite a cover, but the resemblence was intended. Sung by VoiceMale. {% raw %} <audio controls> <source src="http://suchow.io/assets/audio/08%20Time%20(Bring%20It%20On).mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> {% endraw %} <img class="half-width" src="{{ site.url }}/images/suit-up.jpg" width="150" alt="Album cover.">
a4ca56f3df7cd763be4d4c60fbdb3c2ee4dcf602
src/js/components/Tab/Url.js
src/js/components/Tab/Url.js
import React from 'react' const urlStyle = { opacity: 0.3, fontSize: '0.7rem' } export default class Url extends React.Component { getUrlStyle = () => Object.assign( {}, urlStyle, this.props.tab.shouldHighlight && { opacity: 1 } ) render () { const { tab: { url }, getHighlightNode } = this.props return ( <div style={this.getUrlStyle()}> {getHighlightNode(url)} </div> ) } }
import React from 'react' const urlStyle = { opacity: 0.3, fontSize: '0.7rem', overflow: 'hidden', textOverflow: 'ellipsis' } export default class Url extends React.Component { getUrlStyle = () => Object.assign( {}, urlStyle, this.props.tab.shouldHighlight && { opacity: 1 } ) render () { const { tab: { url }, getHighlightNode } = this.props return ( <div style={this.getUrlStyle()}> {getHighlightNode(url)} </div> ) } }
Use css to truncate tab url
Use css to truncate tab url Fix #80
JavaScript
mit
xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2
javascript
## Code Before: import React from 'react' const urlStyle = { opacity: 0.3, fontSize: '0.7rem' } export default class Url extends React.Component { getUrlStyle = () => Object.assign( {}, urlStyle, this.props.tab.shouldHighlight && { opacity: 1 } ) render () { const { tab: { url }, getHighlightNode } = this.props return ( <div style={this.getUrlStyle()}> {getHighlightNode(url)} </div> ) } } ## Instruction: Use css to truncate tab url Fix #80 ## Code After: import React from 'react' const urlStyle = { opacity: 0.3, fontSize: '0.7rem', overflow: 'hidden', textOverflow: 'ellipsis' } export default class Url extends React.Component { getUrlStyle = () => Object.assign( {}, urlStyle, this.props.tab.shouldHighlight && { opacity: 1 } ) render () { const { tab: { url }, getHighlightNode } = this.props return ( <div style={this.getUrlStyle()}> {getHighlightNode(url)} </div> ) } }
724d55a2bd4b1fecebaf6b590fc93e81a90a8cd2
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-test.bb
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-test.bb
DESCRIPTION = "Extended task to get System Test specific apps" LICENSE = "MIT" PR = "r8" inherit packagegroup PACKAGE_ARCH = "${MACHINE_ARCH}" ARAGO_TEST = "\ bonnie++ \ hdparm \ iozone3 \ iperf \ lmbench \ rt-tests \ evtest \ bc \ memtester \ " ARAGO_TI_TEST = "\ ltp-ddt \ " ARAGO_TI_TEST_append_omap-a15 = " \ omapconf \ libdrm-tests \ " RDEPENDS_${PN} = "\ ${ARAGO_TEST} \ ${ARAGO_TI_TEST} \ "
DESCRIPTION = "Extended task to get System Test specific apps" LICENSE = "MIT" PR = "r9" inherit packagegroup PACKAGE_ARCH = "${MACHINE_ARCH}" ARAGO_TEST = "\ bonnie++ \ hdparm \ iozone3 \ iperf \ lmbench \ rt-tests \ evtest \ bc \ memtester \ " ARAGO_TI_TEST = "\ ltp-ddt \ input-utils \ " ARAGO_TI_TEST_append_omap-a15 = " \ omapconf \ libdrm-tests \ " RDEPENDS_${PN} = "\ ${ARAGO_TEST} \ ${ARAGO_TI_TEST} \ "
Add input-utils to test packages
arago-test: Add input-utils to test packages Signed-off-by: Chase Maupin <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]>
BitBake
mit
MentorEmbedded/meta-arago,rcn-ee/meta-arago,rcn-ee/meta-arago,MentorEmbedded/meta-arago,rcn-ee/meta-arago,MentorEmbedded/meta-arago,MentorEmbedded/meta-arago,rcn-ee/meta-arago,rcn-ee/meta-arago
bitbake
## Code Before: DESCRIPTION = "Extended task to get System Test specific apps" LICENSE = "MIT" PR = "r8" inherit packagegroup PACKAGE_ARCH = "${MACHINE_ARCH}" ARAGO_TEST = "\ bonnie++ \ hdparm \ iozone3 \ iperf \ lmbench \ rt-tests \ evtest \ bc \ memtester \ " ARAGO_TI_TEST = "\ ltp-ddt \ " ARAGO_TI_TEST_append_omap-a15 = " \ omapconf \ libdrm-tests \ " RDEPENDS_${PN} = "\ ${ARAGO_TEST} \ ${ARAGO_TI_TEST} \ " ## Instruction: arago-test: Add input-utils to test packages Signed-off-by: Chase Maupin <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]> ## Code After: DESCRIPTION = "Extended task to get System Test specific apps" LICENSE = "MIT" PR = "r9" inherit packagegroup PACKAGE_ARCH = "${MACHINE_ARCH}" ARAGO_TEST = "\ bonnie++ \ hdparm \ iozone3 \ iperf \ lmbench \ rt-tests \ evtest \ bc \ memtester \ " ARAGO_TI_TEST = "\ ltp-ddt \ input-utils \ " ARAGO_TI_TEST_append_omap-a15 = " \ omapconf \ libdrm-tests \ " RDEPENDS_${PN} = "\ ${ARAGO_TEST} \ ${ARAGO_TI_TEST} \ "
f1fd5b5451ed58ae8bd37d333c92246ed8e624cf
src/Renderers/Basic.php
src/Renderers/Basic.php
<?php namespace Coreplex\Crumbs\Renderers; use Coreplex\Crumbs\Contracts\Renderer as Contract; use Coreplex\Crumbs\Contracts\Container; class Basic implements Contract { /** * Render the breadcrumbs from the container * * @return string */ public function render(Container $container) { $rendered = ''; if ($container->count() > 0) { $rendered .= '<ul>'; foreach ($container->getCrumbs() as $crumb) { $rendered .= '<li>'; if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '<a href="' . $crumb->getUrl() . '">'; } $rendered .= $crumb->hasLabel() ? $crumb->getLabel() : $crumb->getUrl(); if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '</a>'; } $rendered .= '</li>'; } $rendered .= '</ul>'; } return $rendered; } }
<?php namespace Coreplex\Crumbs\Renderers; use Coreplex\Crumbs\Contracts\Renderer as Contract; use Coreplex\Crumbs\Contracts\Container; class Basic implements Contract { /** * Render the breadcrumbs from the container * * @return string */ public function render(Container $container) { $rendered = ''; if ($container->count() > 0) { $rendered .= '<ul>'; foreach ($container->getCrumbs() as $crumb) { $rendered .= $crumb->isCurrent() ? '<li class="active">' : '<li>'; if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '<a href="' . $crumb->getUrl() . '">'; } $rendered .= $crumb->hasLabel() ? $crumb->getLabel() : $crumb->getUrl(); if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '</a>'; } $rendered .= '</li>'; } $rendered .= '</ul>'; } return $rendered; } }
Add active class to current breadcrumb
Add active class to current breadcrumb
PHP
mit
coreplex/crumbs,coreplex/crumbs
php
## Code Before: <?php namespace Coreplex\Crumbs\Renderers; use Coreplex\Crumbs\Contracts\Renderer as Contract; use Coreplex\Crumbs\Contracts\Container; class Basic implements Contract { /** * Render the breadcrumbs from the container * * @return string */ public function render(Container $container) { $rendered = ''; if ($container->count() > 0) { $rendered .= '<ul>'; foreach ($container->getCrumbs() as $crumb) { $rendered .= '<li>'; if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '<a href="' . $crumb->getUrl() . '">'; } $rendered .= $crumb->hasLabel() ? $crumb->getLabel() : $crumb->getUrl(); if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '</a>'; } $rendered .= '</li>'; } $rendered .= '</ul>'; } return $rendered; } } ## Instruction: Add active class to current breadcrumb ## Code After: <?php namespace Coreplex\Crumbs\Renderers; use Coreplex\Crumbs\Contracts\Renderer as Contract; use Coreplex\Crumbs\Contracts\Container; class Basic implements Contract { /** * Render the breadcrumbs from the container * * @return string */ public function render(Container $container) { $rendered = ''; if ($container->count() > 0) { $rendered .= '<ul>'; foreach ($container->getCrumbs() as $crumb) { $rendered .= $crumb->isCurrent() ? '<li class="active">' : '<li>'; if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '<a href="' . $crumb->getUrl() . '">'; } $rendered .= $crumb->hasLabel() ? $crumb->getLabel() : $crumb->getUrl(); if ( ! $crumb->isCurrent() && $crumb->hasUrl()) { $rendered .= '</a>'; } $rendered .= '</li>'; } $rendered .= '</ul>'; } return $rendered; } }
848483596952ed919ebae4fefc37a3fffc4b5da5
resources/views/layouts/partials/html-start.blade.php
resources/views/layouts/partials/html-start.blade.php
<!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="api-base-url" content="{{ url('/api') }}"> <meta name="api-token" content="{{ Auth::user()->api_token }}"> <title>@yield('title') | {{ config('app.name') }}</title> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/open-iconic-bootstrap.css') }}" rel="stylesheet"> <link href="{{ asset('css/tempusdominus-bootstrap-4.css') }}" rel="stylesheet"> <link href="{{ asset('css/font-awesome.css') }}" rel="stylesheet"> </head> <body> <!-- Scripts --> <script src="{{ asset('js/app.js') }}"></script>
<!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="api-base-url" content="{{ url('/api') }}"> @if(Auth::user()) <meta name="api-token" content="{{ Auth::user()->api_token }}"> @endif <title>@yield('title') | {{ config('app.name') }}</title> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/open-iconic-bootstrap.css') }}" rel="stylesheet"> <link href="{{ asset('css/tempusdominus-bootstrap-4.css') }}" rel="stylesheet"> <link href="{{ asset('css/font-awesome.css') }}" rel="stylesheet"> </head> <body> <!-- Scripts --> <script src="{{ asset('js/app.js') }}"></script>
Fix undefined property when no user logged in
Fix undefined property when no user logged in
PHP
agpl-3.0
zeropingheroes/lanager,zeropingheroes/lanager
php
## Code Before: <!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="api-base-url" content="{{ url('/api') }}"> <meta name="api-token" content="{{ Auth::user()->api_token }}"> <title>@yield('title') | {{ config('app.name') }}</title> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/open-iconic-bootstrap.css') }}" rel="stylesheet"> <link href="{{ asset('css/tempusdominus-bootstrap-4.css') }}" rel="stylesheet"> <link href="{{ asset('css/font-awesome.css') }}" rel="stylesheet"> </head> <body> <!-- Scripts --> <script src="{{ asset('js/app.js') }}"></script> ## Instruction: Fix undefined property when no user logged in ## Code After: <!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="api-base-url" content="{{ url('/api') }}"> @if(Auth::user()) <meta name="api-token" content="{{ Auth::user()->api_token }}"> @endif <title>@yield('title') | {{ config('app.name') }}</title> <link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/open-iconic-bootstrap.css') }}" rel="stylesheet"> <link href="{{ asset('css/tempusdominus-bootstrap-4.css') }}" rel="stylesheet"> <link href="{{ asset('css/font-awesome.css') }}" rel="stylesheet"> </head> <body> <!-- Scripts --> <script src="{{ asset('js/app.js') }}"></script>
d71f85fbec5e80e4582a0d22c472a56e1965a9ae
app/controllers/home_controller.rb
app/controllers/home_controller.rb
class HomeController < ApplicationController def index end def sfdata @geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD") render json: {geojson: @geojson} end end
class HomeController < ApplicationController def index end def sfdata @geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD") render json: @geojson end end
Change format of object sent from sever to frontend
Change format of object sent from sever to frontend
Ruby
mit
joshuacroff/mapbox_sandbox,joshuacroff/mapbox_sandbox,joshuacroff/mapbox_sandbox
ruby
## Code Before: class HomeController < ApplicationController def index end def sfdata @geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD") render json: {geojson: @geojson} end end ## Instruction: Change format of object sent from sever to frontend ## Code After: class HomeController < ApplicationController def index end def sfdata @geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD") render json: @geojson end end
0e7edb95b8eee904d7c3be84f76358ddb244ca60
.travis.yml
.travis.yml
language: rust rust: - 1.8.0 - stable - nightly os: - linux - osx script: - cargo build --verbose - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then env RUST_BACKTRACE=1 cargo test -v; fi
language: rust rust: - 1.8.0 - stable - nightly os: - linux - osx env: matrix: - ARCH=x86_64 - ARCH=i686 script: - cargo build --verbose - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then env RUST_BACKTRACE=1 cargo test -v; fi
Add i686 platform on Travis
Add i686 platform on Travis
YAML
mit
danburkert/fs2-rs
yaml
## Code Before: language: rust rust: - 1.8.0 - stable - nightly os: - linux - osx script: - cargo build --verbose - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then env RUST_BACKTRACE=1 cargo test -v; fi ## Instruction: Add i686 platform on Travis ## Code After: language: rust rust: - 1.8.0 - stable - nightly os: - linux - osx env: matrix: - ARCH=x86_64 - ARCH=i686 script: - cargo build --verbose - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then env RUST_BACKTRACE=1 cargo test -v; fi
dc0b1c171cfb12fb972fd3ca8c1013af20915772
servers/lib/server/handlers/validateemail.coffee
servers/lib/server/handlers/validateemail.coffee
koding = require './../bongo' { getClientId } = require './../helpers' module.exports = (req, res) -> { JUser } = koding.models { password, email, tfcode } = req.body return res.status(400).send 'Bad request' unless email? { password, redirect } = req.body clientId = getClientId req, res if clientId JUser.login clientId, { username : email, password, tfcode }, (err, info) -> { isValid : isEmail } = JUser.validateAt 'email', email, yes if err?.name is 'VERIFICATION_CODE_NEEDED' return res.status(400).send 'TwoFactor auth Enabled' else if err?.message is 'Access denied!' return res.status(400).send 'Bad request' else if err and isEmail JUser.emailAvailable email, (err_, response) -> return res.status(400).send 'Bad request' if err_ return if response then res.status(200).send response else res.status(400).send 'Email is taken!' return unless info return res.status(500).send 'An error occurred' res.cookie 'clientId', info.replacementToken, { path : '/' } return res.status(200).send 'User is logged in!'
koding = require './../bongo' { getClientId } = require './../helpers' module.exports = (req, res) -> { JUser } = koding.models { password, email, tfcode } = req.body unless email? and (email = email.trim()).length isnt 0 return res.status(400).send 'Bad request' { password, redirect } = req.body clientId = getClientId req, res if clientId JUser.login clientId, { username : email, password, tfcode }, (err, info) -> { isValid : isEmail } = JUser.validateAt 'email', email, yes if err?.name is 'VERIFICATION_CODE_NEEDED' return res.status(400).send 'TwoFactor auth Enabled' else if err?.message is 'Access denied!' return res.status(400).send 'Bad request' else if err and isEmail JUser.emailAvailable email, (err_, response) -> return res.status(400).send 'Bad request' if err_ return if response then res.status(200).send response else res.status(400).send 'Email is taken!' return unless info return res.status(500).send 'An error occurred' res.cookie 'clientId', info.replacementToken, { path : '/' } return res.status(200).send 'User is logged in!'
Trim white spaces during email validation
Trim white spaces during email validation
CoffeeScript
agpl-3.0
koding/koding,mertaytore/koding,koding/koding,gokmen/koding,jack89129/koding,sinan/koding,alex-ionochkin/koding,alex-ionochkin/koding,andrewjcasal/koding,andrewjcasal/koding,cihangir/koding,jack89129/koding,szkl/koding,szkl/koding,kwagdy/koding-1,mertaytore/koding,jack89129/koding,szkl/koding,rjeczalik/koding,rjeczalik/koding,gokmen/koding,cihangir/koding,andrewjcasal/koding,acbodine/koding,cihangir/koding,koding/koding,jack89129/koding,alex-ionochkin/koding,szkl/koding,kwagdy/koding-1,gokmen/koding,rjeczalik/koding,rjeczalik/koding,gokmen/koding,szkl/koding,andrewjcasal/koding,cihangir/koding,drewsetski/koding,andrewjcasal/koding,drewsetski/koding,andrewjcasal/koding,usirin/koding,andrewjcasal/koding,mertaytore/koding,acbodine/koding,drewsetski/koding,szkl/koding,cihangir/koding,usirin/koding,alex-ionochkin/koding,usirin/koding,mertaytore/koding,koding/koding,sinan/koding,sinan/koding,kwagdy/koding-1,acbodine/koding,usirin/koding,acbodine/koding,szkl/koding,gokmen/koding,mertaytore/koding,kwagdy/koding-1,kwagdy/koding-1,koding/koding,mertaytore/koding,alex-ionochkin/koding,cihangir/koding,usirin/koding,rjeczalik/koding,sinan/koding,mertaytore/koding,acbodine/koding,sinan/koding,usirin/koding,acbodine/koding,drewsetski/koding,drewsetski/koding,jack89129/koding,acbodine/koding,usirin/koding,drewsetski/koding,sinan/koding,alex-ionochkin/koding,drewsetski/koding,koding/koding,cihangir/koding,acbodine/koding,jack89129/koding,drewsetski/koding,mertaytore/koding,gokmen/koding,kwagdy/koding-1,kwagdy/koding-1,rjeczalik/koding,sinan/koding,rjeczalik/koding,szkl/koding,alex-ionochkin/koding,usirin/koding,alex-ionochkin/koding,sinan/koding,gokmen/koding,rjeczalik/koding,koding/koding,jack89129/koding,koding/koding,kwagdy/koding-1,andrewjcasal/koding,gokmen/koding,cihangir/koding,jack89129/koding
coffeescript
## Code Before: koding = require './../bongo' { getClientId } = require './../helpers' module.exports = (req, res) -> { JUser } = koding.models { password, email, tfcode } = req.body return res.status(400).send 'Bad request' unless email? { password, redirect } = req.body clientId = getClientId req, res if clientId JUser.login clientId, { username : email, password, tfcode }, (err, info) -> { isValid : isEmail } = JUser.validateAt 'email', email, yes if err?.name is 'VERIFICATION_CODE_NEEDED' return res.status(400).send 'TwoFactor auth Enabled' else if err?.message is 'Access denied!' return res.status(400).send 'Bad request' else if err and isEmail JUser.emailAvailable email, (err_, response) -> return res.status(400).send 'Bad request' if err_ return if response then res.status(200).send response else res.status(400).send 'Email is taken!' return unless info return res.status(500).send 'An error occurred' res.cookie 'clientId', info.replacementToken, { path : '/' } return res.status(200).send 'User is logged in!' ## Instruction: Trim white spaces during email validation ## Code After: koding = require './../bongo' { getClientId } = require './../helpers' module.exports = (req, res) -> { JUser } = koding.models { password, email, tfcode } = req.body unless email? and (email = email.trim()).length isnt 0 return res.status(400).send 'Bad request' { password, redirect } = req.body clientId = getClientId req, res if clientId JUser.login clientId, { username : email, password, tfcode }, (err, info) -> { isValid : isEmail } = JUser.validateAt 'email', email, yes if err?.name is 'VERIFICATION_CODE_NEEDED' return res.status(400).send 'TwoFactor auth Enabled' else if err?.message is 'Access denied!' return res.status(400).send 'Bad request' else if err and isEmail JUser.emailAvailable email, (err_, response) -> return res.status(400).send 'Bad request' if err_ return if response then res.status(200).send response else res.status(400).send 'Email is taken!' return unless info return res.status(500).send 'An error occurred' res.cookie 'clientId', info.replacementToken, { path : '/' } return res.status(200).send 'User is logged in!'
9462e599465bb89d8bf5dc259f5f2bde6dc60b8b
ui/src/overview/project-overview.css
ui/src/overview/project-overview.css
.project-overview-sidebar .documents { max-height: calc(100vh - 189px); } .project-overview-sidebar .documents-card { flex-grow: 0 !important; flex-shrink: 0 !important; } .project-overview-sidebar .card:first-child { margin: 0 0 10px 0; }
.project-overview-sidebar .documents { max-height: calc(100vh - 189px) !important; } .project-overview-sidebar .documents-card { flex-grow: 0 !important; flex-shrink: 0 !important; } .project-overview-sidebar .card:first-child { margin: 0 0 10px 0; }
Fix max height of documents list in project overview
Fix max height of documents list in project overview
CSS
apache-2.0
dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web
css
## Code Before: .project-overview-sidebar .documents { max-height: calc(100vh - 189px); } .project-overview-sidebar .documents-card { flex-grow: 0 !important; flex-shrink: 0 !important; } .project-overview-sidebar .card:first-child { margin: 0 0 10px 0; } ## Instruction: Fix max height of documents list in project overview ## Code After: .project-overview-sidebar .documents { max-height: calc(100vh - 189px) !important; } .project-overview-sidebar .documents-card { flex-grow: 0 !important; flex-shrink: 0 !important; } .project-overview-sidebar .card:first-child { margin: 0 0 10px 0; }
425531034d9d2bb4897935d051f826a3d35b4e6f
resources/views/rsvp/confirmation.blade.php
resources/views/rsvp/confirmation.blade.php
<!DOCTYPE html> <html lang="en"> <head> <title>Event RSVP | MyRoboJackets</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"> <style type="text/css"> b { font-weight: bold; !important } </style> @include('favicon') </head> <body id="confirmation"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> <img class="mt-2 px-5 img-fluid" src="{{ asset('img/recruiting_form_header.svg') }}"> <hr class="my-4"> </div> </div> <div class="row justify-content-center"> <div class="col-8" style="text-align:center"> <h1 class="display-4">You're all set!</h1> <p class="lead"> We can't wait to see you at <b>{{ $event->name }}</b>.<br/> @isset($event['location']) <b>Location: </b> {{ $event->location }}<br/> @endisset @if($event['cost'] != 0) <b>Cost: </b> ${{ $event->cost }} @endif </p> </div> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <title>Event RSVP | MyRoboJackets</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"> <style type="text/css"> b { font-weight: bold; !important } </style> @include('favicon') </head> <body id="confirmation"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> <img class="mt-2 px-5 img-fluid" src="{{ asset('img/recruiting_form_header.svg') }}"> <hr class="my-4"> </div> </div> <div class="row justify-content-center"> <div class="col-8" style="text-align:center"> <h1 class="display-4">You're all set!</h1> <p class="lead"> We can't wait to see you at <b>{{ $event->name }}</b>.<br/> @isset($event['location']) <b>Location: </b> {{ $event->location }}<br/> @endisset @isset($event['start_time']) <b>Date: </b> {{ date("l, F jS, Y \a\\t h:i A" ,strtotime($event->start_time)) }}<br/> @endisset @if($event['cost'] != 0) <b>Cost: </b> ${{ $event->cost }} @endif </p> </div> </div> </div> </body> </html>
Revert "Do not display the start time of an event on the RSVP confirmation view"
Revert "Do not display the start time of an event on the RSVP confirmation view" This reverts commit 79f86048c086e8a3928decfc27e7ac5af95e4f28. Fixes #1386.
PHP
apache-2.0
RoboJackets/apiary,RoboJackets/apiary
php
## Code Before: <!DOCTYPE html> <html lang="en"> <head> <title>Event RSVP | MyRoboJackets</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"> <style type="text/css"> b { font-weight: bold; !important } </style> @include('favicon') </head> <body id="confirmation"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> <img class="mt-2 px-5 img-fluid" src="{{ asset('img/recruiting_form_header.svg') }}"> <hr class="my-4"> </div> </div> <div class="row justify-content-center"> <div class="col-8" style="text-align:center"> <h1 class="display-4">You're all set!</h1> <p class="lead"> We can't wait to see you at <b>{{ $event->name }}</b>.<br/> @isset($event['location']) <b>Location: </b> {{ $event->location }}<br/> @endisset @if($event['cost'] != 0) <b>Cost: </b> ${{ $event->cost }} @endif </p> </div> </div> </div> </body> </html> ## Instruction: Revert "Do not display the start time of an event on the RSVP confirmation view" This reverts commit 79f86048c086e8a3928decfc27e7ac5af95e4f28. Fixes #1386. ## Code After: <!DOCTYPE html> <html lang="en"> <head> <title>Event RSVP | MyRoboJackets</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"> <style type="text/css"> b { font-weight: bold; !important } </style> @include('favicon') </head> <body id="confirmation"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> <img class="mt-2 px-5 img-fluid" src="{{ asset('img/recruiting_form_header.svg') }}"> <hr class="my-4"> </div> </div> <div class="row justify-content-center"> <div class="col-8" style="text-align:center"> <h1 class="display-4">You're all set!</h1> <p class="lead"> We can't wait to see you at <b>{{ $event->name }}</b>.<br/> @isset($event['location']) <b>Location: </b> {{ $event->location }}<br/> @endisset @isset($event['start_time']) <b>Date: </b> {{ date("l, F jS, Y \a\\t h:i A" ,strtotime($event->start_time)) }}<br/> @endisset @if($event['cost'] != 0) <b>Cost: </b> ${{ $event->cost }} @endif </p> </div> </div> </div> </body> </html>
279be716bc15fe633a62b6614acb9d74375917c8
requirements/env.txt
requirements/env.txt
Django==1.8.18 MySQL-python==1.2.5 Pillow==3.4.1 bleach==2.0.0 commonware==0.4.3 contextlib2==0.5.4 django-appconf==1.0.2 django-compressor==2.1 django-nose==1.4.4 django-session-csrf==0.6 django-sha2==0.4 elasticsearch==1.9.0 feedparser==5.2.1 fluent==0.4.1 funcsigs==1.0.2 funfactory==2.3.0 html5lib==0.999999999 mercurial==4.2.2 python-hglib==2.4 nose==1.3.7 ordereddict==1.1 pbr==1.10.0 py-bcrypt==0.4 python-ldap==2.3.13 pytoml==0.1.13 # from django/tests/requirements/py2.txt # Due to https://github.com/linsomniac/python-memcached/issues/79 in newer versions. python-memcached==1.53 raven==5.27.1 rcssmin==1.0.6 rjsmin==1.0.12 six==1.10.0 sqlparse==0.2.1 urllib3==1.18
Django==1.8.18 MySQL-python==1.2.5 Pillow==3.4.1 bleach==2.0.0 commonware==0.4.3 contextlib2==0.5.4 django-appconf==1.0.2 django-compressor==2.1 django-nose==1.4.4 django-session-csrf==0.6 django-sha2==0.4 elasticsearch==1.9.0 feedparser==5.2.1 fluent==0.4.1 funcsigs==1.0.2 funfactory==2.3.0 html5lib==0.999999999 mercurial==4.2.2 python-hglib==2.4 nose==1.3.7 ordereddict==1.1 pbr==1.10.0 py-bcrypt==0.4 python-ldap==2.3.13 pytoml==0.1.13 # from django/tests/requirements/py2.txt # Due to https://github.com/linsomniac/python-memcached/issues/79 in newer versions. python-memcached==1.53 raven==5.27.1 rcssmin==1.0.6 rjsmin==1.0.12 six==1.10.0 sqlparse==0.2.1 urllib3==1.18 webencodings==0.5.1
Make html5lib dependency webencodings explicit
Make html5lib dependency webencodings explicit
Text
mpl-2.0
mozilla/elmo,Pike/elmo,Pike/elmo,mozilla/elmo,mozilla/elmo,Pike/elmo,Pike/elmo,mozilla/elmo
text
## Code Before: Django==1.8.18 MySQL-python==1.2.5 Pillow==3.4.1 bleach==2.0.0 commonware==0.4.3 contextlib2==0.5.4 django-appconf==1.0.2 django-compressor==2.1 django-nose==1.4.4 django-session-csrf==0.6 django-sha2==0.4 elasticsearch==1.9.0 feedparser==5.2.1 fluent==0.4.1 funcsigs==1.0.2 funfactory==2.3.0 html5lib==0.999999999 mercurial==4.2.2 python-hglib==2.4 nose==1.3.7 ordereddict==1.1 pbr==1.10.0 py-bcrypt==0.4 python-ldap==2.3.13 pytoml==0.1.13 # from django/tests/requirements/py2.txt # Due to https://github.com/linsomniac/python-memcached/issues/79 in newer versions. python-memcached==1.53 raven==5.27.1 rcssmin==1.0.6 rjsmin==1.0.12 six==1.10.0 sqlparse==0.2.1 urllib3==1.18 ## Instruction: Make html5lib dependency webencodings explicit ## Code After: Django==1.8.18 MySQL-python==1.2.5 Pillow==3.4.1 bleach==2.0.0 commonware==0.4.3 contextlib2==0.5.4 django-appconf==1.0.2 django-compressor==2.1 django-nose==1.4.4 django-session-csrf==0.6 django-sha2==0.4 elasticsearch==1.9.0 feedparser==5.2.1 fluent==0.4.1 funcsigs==1.0.2 funfactory==2.3.0 html5lib==0.999999999 mercurial==4.2.2 python-hglib==2.4 nose==1.3.7 ordereddict==1.1 pbr==1.10.0 py-bcrypt==0.4 python-ldap==2.3.13 pytoml==0.1.13 # from django/tests/requirements/py2.txt # Due to https://github.com/linsomniac/python-memcached/issues/79 in newer versions. python-memcached==1.53 raven==5.27.1 rcssmin==1.0.6 rjsmin==1.0.12 six==1.10.0 sqlparse==0.2.1 urllib3==1.18 webencodings==0.5.1
e2cba02550dfbe8628daf024a2a35c0dffb234e9
python/cli/request.py
python/cli/request.py
import requests import os aport = os.environ.get('MYAPORT') if aport is None: aport = "80" aport = "23456" url1 = 'http://localhost:' + aport + '/' url2 = 'http://localhost:' + aport + '/action/improvesimulateinvest' url3 = 'http://localhost:' + aport + '/action/autosimulateinvest' url4 = 'http://localhost:' + aport + '/action/improveautosimulateinvest' #headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} #headers={'Content-type':'application/json', 'Accept':'application/json'} headers={'Content-Type' : 'application/json;charset=utf-8'} def request1(param, webpath): return requests.post(url1 + webpath, json=param, headers=headers) def request2(market, data): return requests.post(url2 + '/market/' + str(market), json=data, headers=headers) def request3(market, data): return requests.post(url3 + '/market/' + str(market), json=data, headers=headers) def request4(market, data): return requests.post(url4 + '/market/' + str(market), json=data, headers=headers) def request0(data): return requests.post(url, data='', headers=headers) #return requests.post(url, data=json.dumps(data), headers=headers)
import requests import os aport = os.environ.get('MYAPORT') if aport is None: aport = "80" aport = "23456" ahost = os.environ.get('MYAHOST') if ahost is None: ahost = "localhost" url1 = 'http://' + ahost + ':' + aport + '/' #headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} #headers={'Content-type':'application/json', 'Accept':'application/json'} headers={'Content-Type' : 'application/json;charset=utf-8'} def request1(param, webpath): return requests.post(url1 + webpath, json=param, headers=headers) def request0(data): return requests.post(url, data='', headers=headers) #return requests.post(url, data=json.dumps(data), headers=headers)
Handle different environments, for automation (I4).
Handle different environments, for automation (I4).
Python
agpl-3.0
rroart/aether,rroart/aether,rroart/aether,rroart/aether,rroart/aether
python
## Code Before: import requests import os aport = os.environ.get('MYAPORT') if aport is None: aport = "80" aport = "23456" url1 = 'http://localhost:' + aport + '/' url2 = 'http://localhost:' + aport + '/action/improvesimulateinvest' url3 = 'http://localhost:' + aport + '/action/autosimulateinvest' url4 = 'http://localhost:' + aport + '/action/improveautosimulateinvest' #headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} #headers={'Content-type':'application/json', 'Accept':'application/json'} headers={'Content-Type' : 'application/json;charset=utf-8'} def request1(param, webpath): return requests.post(url1 + webpath, json=param, headers=headers) def request2(market, data): return requests.post(url2 + '/market/' + str(market), json=data, headers=headers) def request3(market, data): return requests.post(url3 + '/market/' + str(market), json=data, headers=headers) def request4(market, data): return requests.post(url4 + '/market/' + str(market), json=data, headers=headers) def request0(data): return requests.post(url, data='', headers=headers) #return requests.post(url, data=json.dumps(data), headers=headers) ## Instruction: Handle different environments, for automation (I4). ## Code After: import requests import os aport = os.environ.get('MYAPORT') if aport is None: aport = "80" aport = "23456" ahost = os.environ.get('MYAHOST') if ahost is None: ahost = "localhost" url1 = 'http://' + ahost + ':' + aport + '/' #headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} #headers={'Content-type':'application/json', 'Accept':'application/json'} headers={'Content-Type' : 'application/json;charset=utf-8'} def request1(param, webpath): return requests.post(url1 + webpath, json=param, headers=headers) def request0(data): return requests.post(url, data='', headers=headers) #return requests.post(url, data=json.dumps(data), headers=headers)
0d1d3a2cb3bd048e95f02baed551a508a12cf0a7
Resources/views/Page/_form.html.twig
Resources/views/Page/_form.html.twig
{% form_theme form 'KoalaContentBundle:Form:fields.html.twig' %} <form action="{{block('action')}}" method="post" {{ form_enctype(form) }} style="width: 600px"> <div class="mercury-display-pane-container"> <div class="mercury-display-pane"> <fieldset class="inputs"> <legend><span>Page options</span></legend> <ol> {{ form_errors(form) }} {{form_row(form.parent)}} {{form_row(form.menuTitle)}} {{form_row(form.url)}} {{form_row(form.slug)}} {{form_row(form.layout)}} </ol> </fieldset> {{form_rest(form)}} </div> </div> <div class="mercury-display-controls"> <fieldset class="buttons"> <ol> {% block buttons %}{% endblock %} <li class="commit"> <input class="submit" name="commit" type="submit" value="{{block('commit_text')}}" /> </li> </ol> </fieldset> </div> </form>
{% form_theme form 'KoalaContentBundle:Form:fields.html.twig' %} <form action="{{block('action')}}" method="post" {{ form_enctype(form) }} class="mercury-form" style="width: 600px"> <div class="mercury-display-pane-container"> <div class="mercury-display-pane"> <fieldset class="inputs"> <legend><span>Page options</span></legend> <ol> {{ form_errors(form) }} {{form_row(form.parent)}} {{form_row(form.menuTitle)}} {{form_row(form.url)}} {{form_row(form.slug)}} {{form_row(form.layout)}} </ol> </fieldset> {{form_rest(form)}} </div> </div> <div class="mercury-display-controls"> <fieldset class="buttons"> <ol> {% block buttons %}{% endblock %} <li class="commit"> <input class="submit" name="commit" type="submit" value="{{block('commit_text')}}" /> </li> </ol> </fieldset> </div> </form>
Fix Add/Edit form for latest version of Mercury
Fix Add/Edit form for latest version of Mercury
Twig
mit
flojon/KoalaContentBundle,flojon/KoalaContentBundle,flojon/KoalaContentBundle
twig
## Code Before: {% form_theme form 'KoalaContentBundle:Form:fields.html.twig' %} <form action="{{block('action')}}" method="post" {{ form_enctype(form) }} style="width: 600px"> <div class="mercury-display-pane-container"> <div class="mercury-display-pane"> <fieldset class="inputs"> <legend><span>Page options</span></legend> <ol> {{ form_errors(form) }} {{form_row(form.parent)}} {{form_row(form.menuTitle)}} {{form_row(form.url)}} {{form_row(form.slug)}} {{form_row(form.layout)}} </ol> </fieldset> {{form_rest(form)}} </div> </div> <div class="mercury-display-controls"> <fieldset class="buttons"> <ol> {% block buttons %}{% endblock %} <li class="commit"> <input class="submit" name="commit" type="submit" value="{{block('commit_text')}}" /> </li> </ol> </fieldset> </div> </form> ## Instruction: Fix Add/Edit form for latest version of Mercury ## Code After: {% form_theme form 'KoalaContentBundle:Form:fields.html.twig' %} <form action="{{block('action')}}" method="post" {{ form_enctype(form) }} class="mercury-form" style="width: 600px"> <div class="mercury-display-pane-container"> <div class="mercury-display-pane"> <fieldset class="inputs"> <legend><span>Page options</span></legend> <ol> {{ form_errors(form) }} {{form_row(form.parent)}} {{form_row(form.menuTitle)}} {{form_row(form.url)}} {{form_row(form.slug)}} {{form_row(form.layout)}} </ol> </fieldset> {{form_rest(form)}} </div> </div> <div class="mercury-display-controls"> <fieldset class="buttons"> <ol> {% block buttons %}{% endblock %} <li class="commit"> <input class="submit" name="commit" type="submit" value="{{block('commit_text')}}" /> </li> </ol> </fieldset> </div> </form>
1bb17377aa9f89d48a86edfaafc9a380d901bfcf
app/views/snippets/index.html.erb
app/views/snippets/index.html.erb
<ul> <% @snippets.each do |snippet| %> <div class="snippet"> <li><%= link_to snippet.content[0...249].html_safe, snippet_path(snippet) %></li> </div> <% end %> </ul>
<ul> <% @snippets.each do |snippet| %> <div class="snippet"> <li><%= link_to snippet.content, snippet_path(snippet) %></li> </div> <% end %> </ul>
Change link_to for now because of blank snippets
Change link_to for now because of blank snippets
HTML+ERB
mit
SputterPuttRedux/storyvine_clone,mxngyn/StoryVine,pearlshin/StoryVine,mxngyn/StoryVine,pearlshin/StoryVine,pearlshin/StoryVine,SputterPuttRedux/storyvine_clone,mxngyn/StoryVine,SputterPuttRedux/storyvine_clone
html+erb
## Code Before: <ul> <% @snippets.each do |snippet| %> <div class="snippet"> <li><%= link_to snippet.content[0...249].html_safe, snippet_path(snippet) %></li> </div> <% end %> </ul> ## Instruction: Change link_to for now because of blank snippets ## Code After: <ul> <% @snippets.each do |snippet| %> <div class="snippet"> <li><%= link_to snippet.content, snippet_path(snippet) %></li> </div> <% end %> </ul>
5bac193629eb7008e82ec343761a350942cf6281
lib/juici/views/index.erb
lib/juici/views/index.erb
<div class="row-fluid"> <div class="span8"> <h1 class="block-header">JuiCI</h1> <p> JuiCI is a CI server, written at RailsCamp after Jenkins left me feeling a little dead inside. JuiCI aims to solve some of the issues with existing (and outstanding) CI solutions like <a href="http://jenkins-ci.org/">Jenkins</a> and <a href="http://travis-ci.org">Travis</a>, by not trying to be all things to all people. </p> <p> JuiCI has a very thin wrapper around build triggers, is almost entirely API driven, and has a queuing system with a notion of priority, globally shared across all projects. </p> <div> In the past, this instance of Juici has built code for: <ul> <% ::Juici::Project.all.each do |p| %> <li><a href="<%= build_url_for(p) %>"><%= p.name %></a></li> <% end %> </ul> </div> </div> <div class="span4"> <h4 class="block-header builds-header">currently building</h4> <ul class="builds"> <% $build_queue.currently_building.each do |build| %> <li> <a class="successful" href="<%= build_url_for(build) %>"><%= build.link_title %></a> </li> <% end %> </ul> <%= erb(:"partials/index/recently_built") %> </div> </div>
<div class="row-fluid"> <div class="span8"> <h1 class="block-header">JuiCI</h1> <p> JuiCI is a CI server, written at RailsCamp after Jenkins left me feeling a little dead inside. JuiCI aims to solve some of the issues with existing (and outstanding) CI solutions like <a href="http://jenkins-ci.org/">Jenkins</a> and <a href="http://travis-ci.org">Travis</a>, by not trying to be all things to all people. </p> <p> JuiCI has a very thin wrapper around build triggers, is almost entirely API driven, and has a queuing system with a notion of priority, globally shared across all projects. </p> <div> In the past, this instance of Juici has built code for: <ul> <% ::Juici::Project.all.each do |p| %> <li><a href="<%= build_url_for(p) %>"><%= p.name %></a></li> <% end %> </ul> </div> </div> <div class="span4"> <h4 class="block-header builds-header">currently building</h4> <ul class="builds"> <% $build_queue.currently_building.each do |build| %> <li> <a class="<%= build.heading_color %>" href="<%= build_url_for(build) %>"><%= build.link_title %></a> </li> <% end %> </ul> <%= erb(:"partials/index/recently_built") %> </div> </div>
Use build's class on recently built screen
Use build's class on recently built screen
HTML+ERB
mit
richo/juici,richo/juici,richo/juici,richo/juici
html+erb
## Code Before: <div class="row-fluid"> <div class="span8"> <h1 class="block-header">JuiCI</h1> <p> JuiCI is a CI server, written at RailsCamp after Jenkins left me feeling a little dead inside. JuiCI aims to solve some of the issues with existing (and outstanding) CI solutions like <a href="http://jenkins-ci.org/">Jenkins</a> and <a href="http://travis-ci.org">Travis</a>, by not trying to be all things to all people. </p> <p> JuiCI has a very thin wrapper around build triggers, is almost entirely API driven, and has a queuing system with a notion of priority, globally shared across all projects. </p> <div> In the past, this instance of Juici has built code for: <ul> <% ::Juici::Project.all.each do |p| %> <li><a href="<%= build_url_for(p) %>"><%= p.name %></a></li> <% end %> </ul> </div> </div> <div class="span4"> <h4 class="block-header builds-header">currently building</h4> <ul class="builds"> <% $build_queue.currently_building.each do |build| %> <li> <a class="successful" href="<%= build_url_for(build) %>"><%= build.link_title %></a> </li> <% end %> </ul> <%= erb(:"partials/index/recently_built") %> </div> </div> ## Instruction: Use build's class on recently built screen ## Code After: <div class="row-fluid"> <div class="span8"> <h1 class="block-header">JuiCI</h1> <p> JuiCI is a CI server, written at RailsCamp after Jenkins left me feeling a little dead inside. JuiCI aims to solve some of the issues with existing (and outstanding) CI solutions like <a href="http://jenkins-ci.org/">Jenkins</a> and <a href="http://travis-ci.org">Travis</a>, by not trying to be all things to all people. </p> <p> JuiCI has a very thin wrapper around build triggers, is almost entirely API driven, and has a queuing system with a notion of priority, globally shared across all projects. </p> <div> In the past, this instance of Juici has built code for: <ul> <% ::Juici::Project.all.each do |p| %> <li><a href="<%= build_url_for(p) %>"><%= p.name %></a></li> <% end %> </ul> </div> </div> <div class="span4"> <h4 class="block-header builds-header">currently building</h4> <ul class="builds"> <% $build_queue.currently_building.each do |build| %> <li> <a class="<%= build.heading_color %>" href="<%= build_url_for(build) %>"><%= build.link_title %></a> </li> <% end %> </ul> <%= erb(:"partials/index/recently_built") %> </div> </div>
75a9d4d0d477cfd41bd9741af87bc3993001cc38
database/seeds/UsersTableSeeder.php
database/seeds/UsersTableSeeder.php
<?php /** * Created by PhpStorm. * User: andela * Date: 8/6/15 * Time: 1:55 PM */ use Illuminate\Database\Seeder; use ChopBox\User; use Faker\Factory; class UserTableSeeder extends Seeder { public function run() { $faker = Factory::create(); //User::truncate(); foreach(range(1,50) as $index) { User::create([ 'username' => $faker->userName, 'password' => $faker->password(8, 20), 'email' => $faker->email, 'profile_state' => $faker->boolean(), ]); } } }
<?php /** * Created by PhpStorm. * User: andela * Date: 8/6/15 * Time: 1:55 PM */ use Illuminate\Database\Seeder; use ChopBox\User; use Faker\Factory; class UserTableSeeder extends Seeder { public function run() { $faker = Factory::create(); //User::truncate(); foreach(range(1,50) as $index) { User::create([ 'username' => $faker->userName, 'password' => $faker->password(8, 20), 'email' => $faker->email, 'profile_state' => $faker->boolean(), 'image_uri' => $faker->imageUrl() ]); } } }
Add seeder for image_uri column of Users table
Add seeder for image_uri column of Users table
PHP
mit
andela/chopbox,andela/chopbox
php
## Code Before: <?php /** * Created by PhpStorm. * User: andela * Date: 8/6/15 * Time: 1:55 PM */ use Illuminate\Database\Seeder; use ChopBox\User; use Faker\Factory; class UserTableSeeder extends Seeder { public function run() { $faker = Factory::create(); //User::truncate(); foreach(range(1,50) as $index) { User::create([ 'username' => $faker->userName, 'password' => $faker->password(8, 20), 'email' => $faker->email, 'profile_state' => $faker->boolean(), ]); } } } ## Instruction: Add seeder for image_uri column of Users table ## Code After: <?php /** * Created by PhpStorm. * User: andela * Date: 8/6/15 * Time: 1:55 PM */ use Illuminate\Database\Seeder; use ChopBox\User; use Faker\Factory; class UserTableSeeder extends Seeder { public function run() { $faker = Factory::create(); //User::truncate(); foreach(range(1,50) as $index) { User::create([ 'username' => $faker->userName, 'password' => $faker->password(8, 20), 'email' => $faker->email, 'profile_state' => $faker->boolean(), 'image_uri' => $faker->imageUrl() ]); } } }
ba5a9140a1d6cb1bf24a4dfa2ee67c40e6a75a33
project.clj
project.clj
(defproject kamituel/systems-toolbox-chrome "0.1.0-SNAPSHOT" :description "Chrome DevTools support for systems-toolbox library" :url "" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [matthiasn/systems-toolbox "0.2.17"] [org.clojure/clojurescript "0.0-3308"]] :plugins [[lein-cljsbuild "1.0.6"]] :cljsbuild {:builds {:devtools {:source-paths ["src/devtools/cljs"] :compiler {:asset-path "js" :optimizations :simple :output-dir "resources/devtools/js" :output-to "resources/devtools/js/all.js" :source-map "resources/devtools/js/all.map"}}}})
(defproject kamituel/systems-toolbox-chrome "0.1.0-SNAPSHOT" :description "Chrome DevTools support for systems-toolbox library" :url "" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [matthiasn/systems-toolbox "0.2.17"] [org.clojure/clojurescript "0.0-3308"]] :plugins [[lein-cljsbuild "1.0.6"]] :clean-targets ^{:protect false} ["resources/devtools/js/"] :cljsbuild {:builds {:devtools {:source-paths ["src/devtools/cljs"] :compiler {:asset-path "js" :optimizations :simple :output-dir "resources/devtools/js" :output-to "resources/devtools/js/all.js" :source-map "resources/devtools/js/all.map"}}}})
Fix for lein clean not cleaning compiled js files
Fix for lein clean not cleaning compiled js files
Clojure
epl-1.0
matthiasn/systems-toolbox-chrome,matthiasn/systems-toolbox-chrome,kamituel/systems-toolbox-chrome,kamituel/systems-toolbox-chrome
clojure
## Code Before: (defproject kamituel/systems-toolbox-chrome "0.1.0-SNAPSHOT" :description "Chrome DevTools support for systems-toolbox library" :url "" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [matthiasn/systems-toolbox "0.2.17"] [org.clojure/clojurescript "0.0-3308"]] :plugins [[lein-cljsbuild "1.0.6"]] :cljsbuild {:builds {:devtools {:source-paths ["src/devtools/cljs"] :compiler {:asset-path "js" :optimizations :simple :output-dir "resources/devtools/js" :output-to "resources/devtools/js/all.js" :source-map "resources/devtools/js/all.map"}}}}) ## Instruction: Fix for lein clean not cleaning compiled js files ## Code After: (defproject kamituel/systems-toolbox-chrome "0.1.0-SNAPSHOT" :description "Chrome DevTools support for systems-toolbox library" :url "" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [matthiasn/systems-toolbox "0.2.17"] [org.clojure/clojurescript "0.0-3308"]] :plugins [[lein-cljsbuild "1.0.6"]] :clean-targets ^{:protect false} ["resources/devtools/js/"] :cljsbuild {:builds {:devtools {:source-paths ["src/devtools/cljs"] :compiler {:asset-path "js" :optimizations :simple :output-dir "resources/devtools/js" :output-to "resources/devtools/js/all.js" :source-map "resources/devtools/js/all.map"}}}})
1fdecb65cb934c0756bdb8728a899d28a3811645
app/views/organisations/consultations.html.erb
app/views/organisations/consultations.html.erb
<% page_title "#{@organisation.name} Consultations" %> <div class="g3f organisation"> <%= render 'header', organisation: @organisation, title: "#{@organisation.name} Consultations" %> <div class="g3" style="margin-top: 1.5em"> <% if @consultations.any? %> <% @consultations.each do |consultation| %> <%= render partial: "consultations/consultation", locals: { consultation: consultation, display: "default" } %> <% end %> <% else %> <p>There are no <%= @organisation.name %> consultations at present.</p> <% end %> </div> </div>
<% page_title "#{@organisation.name} Consultations" %> <div class="g3f organisation"> <%= render 'header', organisation: @organisation, title: "#{@organisation.name} Consultations" %> <div class="g3 page_detail"> <% if @consultations.any? %> <% @consultations.each do |consultation| %> <%= render partial: "consultations/consultation", locals: { consultation: consultation, display: "default" } %> <% end %> <% else %> <p>There are no <%= @organisation.name %> consultations at present.</p> <% end %> </div> </div>
Use a class rather than a style on the element
Use a class rather than a style on the element See also 3e1612ef4c01e8292eecb5d13938e66ff1cfe624.
HTML+ERB
mit
askl56/whitehall,askl56/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,hotvulcan/whitehall,hotvulcan/whitehall,alphagov/whitehall,ggoral/whitehall,robinwhittleton/whitehall,ggoral/whitehall,alphagov/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,ggoral/whitehall,ggoral/whitehall,askl56/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall,askl56/whitehall
html+erb
## Code Before: <% page_title "#{@organisation.name} Consultations" %> <div class="g3f organisation"> <%= render 'header', organisation: @organisation, title: "#{@organisation.name} Consultations" %> <div class="g3" style="margin-top: 1.5em"> <% if @consultations.any? %> <% @consultations.each do |consultation| %> <%= render partial: "consultations/consultation", locals: { consultation: consultation, display: "default" } %> <% end %> <% else %> <p>There are no <%= @organisation.name %> consultations at present.</p> <% end %> </div> </div> ## Instruction: Use a class rather than a style on the element See also 3e1612ef4c01e8292eecb5d13938e66ff1cfe624. ## Code After: <% page_title "#{@organisation.name} Consultations" %> <div class="g3f organisation"> <%= render 'header', organisation: @organisation, title: "#{@organisation.name} Consultations" %> <div class="g3 page_detail"> <% if @consultations.any? %> <% @consultations.each do |consultation| %> <%= render partial: "consultations/consultation", locals: { consultation: consultation, display: "default" } %> <% end %> <% else %> <p>There are no <%= @organisation.name %> consultations at present.</p> <% end %> </div> </div>
1c254d8869482241de14255c25edd875ca369e46
fortuitus/frunner/factories.py
fortuitus/frunner/factories.py
import factory from fortuitus.feditor.factories import TestProjectF from fortuitus.frunner import models class TestRunF(factory.Factory): FACTORY_FOR = models.TestRun project = factory.SubFactory(TestProjectF) class TestCaseF(factory.Factory): FACTORY_FOR = models.TestCase testrun = factory.SubFactory(TestRunF) name = factory.Sequence(lambda n: 'TestCase #%s' % n) order = 1 login_type = models.models_base.LoginType.NONE class TestCaseStepF(factory.Factory): FACTORY_FOR = models.TestCaseStep testcase = factory.SubFactory(TestCaseF) order = 1 method = models.models_base.Method.GET url = 'user_list.json' class TestCaseAssertF(factory.Factory): FACTORY_FOR = models.TestCaseAssert step = factory.SubFactory(TestCaseStepF) order = 1 lhs = '' rhs = '' operator = models.models_base.method_choices[0][0]
import factory from fortuitus.feditor.factories import TestProjectF from fortuitus.frunner import models class TestRunF(factory.Factory): FACTORY_FOR = models.TestRun project = factory.SubFactory(TestProjectF) base_url = 'http://api.example.com/' class TestCaseF(factory.Factory): FACTORY_FOR = models.TestCase testrun = factory.SubFactory(TestRunF) name = factory.Sequence(lambda n: 'TestCase #%s' % n) order = 1 login_type = models.models_base.LoginType.NONE class TestCaseStepF(factory.Factory): FACTORY_FOR = models.TestCaseStep testcase = factory.SubFactory(TestCaseF) order = 1 method = models.models_base.Method.GET url = 'user_list.json' class TestCaseAssertF(factory.Factory): FACTORY_FOR = models.TestCaseAssert step = factory.SubFactory(TestCaseStepF) order = 1 lhs = '' rhs = '' operator = models.models_base.method_choices[0][0]
Fix TestRun factory missing base_url
Fix TestRun factory missing base_url
Python
mit
elegion/djangodash2012,elegion/djangodash2012
python
## Code Before: import factory from fortuitus.feditor.factories import TestProjectF from fortuitus.frunner import models class TestRunF(factory.Factory): FACTORY_FOR = models.TestRun project = factory.SubFactory(TestProjectF) class TestCaseF(factory.Factory): FACTORY_FOR = models.TestCase testrun = factory.SubFactory(TestRunF) name = factory.Sequence(lambda n: 'TestCase #%s' % n) order = 1 login_type = models.models_base.LoginType.NONE class TestCaseStepF(factory.Factory): FACTORY_FOR = models.TestCaseStep testcase = factory.SubFactory(TestCaseF) order = 1 method = models.models_base.Method.GET url = 'user_list.json' class TestCaseAssertF(factory.Factory): FACTORY_FOR = models.TestCaseAssert step = factory.SubFactory(TestCaseStepF) order = 1 lhs = '' rhs = '' operator = models.models_base.method_choices[0][0] ## Instruction: Fix TestRun factory missing base_url ## Code After: import factory from fortuitus.feditor.factories import TestProjectF from fortuitus.frunner import models class TestRunF(factory.Factory): FACTORY_FOR = models.TestRun project = factory.SubFactory(TestProjectF) base_url = 'http://api.example.com/' class TestCaseF(factory.Factory): FACTORY_FOR = models.TestCase testrun = factory.SubFactory(TestRunF) name = factory.Sequence(lambda n: 'TestCase #%s' % n) order = 1 login_type = models.models_base.LoginType.NONE class TestCaseStepF(factory.Factory): FACTORY_FOR = models.TestCaseStep testcase = factory.SubFactory(TestCaseF) order = 1 method = models.models_base.Method.GET url = 'user_list.json' class TestCaseAssertF(factory.Factory): FACTORY_FOR = models.TestCaseAssert step = factory.SubFactory(TestCaseStepF) order = 1 lhs = '' rhs = '' operator = models.models_base.method_choices[0][0]
82a0063c7a909fdca764f665c9718901a95c8d2e
README.rst
README.rst
======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/vitrage.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on ======= Vitrage ======= The OpenStack RCA Service Vitrage is the OpenStack RCA (Root Cause Analysis) Service for organizing, analyzing and expanding OpenStack alarms & events, yielding insights regarding the root cause of problems and deducing the existence of problems before they are directly detected. Enabling Vitrage in DevStack ---------------------------- More details in: `README file <devstack/README.rst>`_ Project Resources ----------------- * Project documentation: https://docs.openstack.org/vitrage/latest/ * Wiki page: https://wiki.openstack.org/wiki/Vitrage * Source: https://opendev.org/openstack/vitrage * StoryBoard: https://storyboard.openstack.org/#!/project/openstack/vitrage * Release notes: https://docs.openstack.org/releasenotes/vitrage
======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/vitrage.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on ======= Vitrage ======= The OpenStack RCA Service Vitrage is the OpenStack RCA (Root Cause Analysis) Service for organizing, analyzing and expanding OpenStack alarms & events, yielding insights regarding the root cause of problems and deducing the existence of problems before they are directly detected. Enabling Vitrage in DevStack ---------------------------- More details in: `README file <devstack/README.rst>`_ Project Resources ----------------- * Project documentation: https://docs.openstack.org/vitrage/latest/ * Wiki page: https://wiki.openstack.org/wiki/Vitrage * Source: https://opendev.org/openstack/vitrage * StoryBoard: https://storyboard.openstack.org/#!/project/openstack/vitrage * Release notes: https://docs.openstack.org/releasenotes/vitrage * Design specifications: https://specs.openstack.org/openstack/vitrage-specs/
Add vitrage-specs link to readme.rst
Add vitrage-specs link to readme.rst Change-Id: I899a8be96f7a4f9536a3418d028da12459a0ffcf
reStructuredText
apache-2.0
openstack/vitrage,openstack/vitrage,openstack/vitrage
restructuredtext
## Code Before: ======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/vitrage.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on ======= Vitrage ======= The OpenStack RCA Service Vitrage is the OpenStack RCA (Root Cause Analysis) Service for organizing, analyzing and expanding OpenStack alarms & events, yielding insights regarding the root cause of problems and deducing the existence of problems before they are directly detected. Enabling Vitrage in DevStack ---------------------------- More details in: `README file <devstack/README.rst>`_ Project Resources ----------------- * Project documentation: https://docs.openstack.org/vitrage/latest/ * Wiki page: https://wiki.openstack.org/wiki/Vitrage * Source: https://opendev.org/openstack/vitrage * StoryBoard: https://storyboard.openstack.org/#!/project/openstack/vitrage * Release notes: https://docs.openstack.org/releasenotes/vitrage ## Instruction: Add vitrage-specs link to readme.rst Change-Id: I899a8be96f7a4f9536a3418d028da12459a0ffcf ## Code After: ======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/vitrage.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on ======= Vitrage ======= The OpenStack RCA Service Vitrage is the OpenStack RCA (Root Cause Analysis) Service for organizing, analyzing and expanding OpenStack alarms & events, yielding insights regarding the root cause of problems and deducing the existence of problems before they are directly detected. Enabling Vitrage in DevStack ---------------------------- More details in: `README file <devstack/README.rst>`_ Project Resources ----------------- * Project documentation: https://docs.openstack.org/vitrage/latest/ * Wiki page: https://wiki.openstack.org/wiki/Vitrage * Source: https://opendev.org/openstack/vitrage * StoryBoard: https://storyboard.openstack.org/#!/project/openstack/vitrage * Release notes: https://docs.openstack.org/releasenotes/vitrage * Design specifications: https://specs.openstack.org/openstack/vitrage-specs/
00fc23914c9fe9c4bf5b844b66672f95a05ac286
src/User/Login/LoginFormHandler.php
src/User/Login/LoginFormHandler.php
<?php namespace Anomaly\UsersModule\User\Login; use Anomaly\UsersModule\User\UserAuthenticator; /** * Class LoginFormHandler * * @link http://anomaly.is/streams-platform * @author AnomalyLabs, Inc. <[email protected]> * @author Ryan Thompson <[email protected]> * @package Anomaly\UsersModule\User\Login */ class LoginFormHandler { /** * Handle the form. * * @param LoginFormBuilder $builder * @param UserAuthenticator $authenticator */ public function handle(LoginFormBuilder $builder, UserAuthenticator $authenticator) { if (!$user = $builder->getUser()) { return; } $authenticator->login($user, $builder->getFormValue('remember_me')); } }
<?php namespace Anomaly\UsersModule\User\Login; use Anomaly\UsersModule\User\UserAuthenticator; use Illuminate\Routing\Redirector; /** * Class LoginFormHandler * * @link http://anomaly.is/streams-platform * @author AnomalyLabs, Inc. <[email protected]> * @author Ryan Thompson <[email protected]> * @package Anomaly\UsersModule\User\Login */ class LoginFormHandler { /** * Handle the form. * * @param LoginFormBuilder $builder * @param UserAuthenticator $authenticator * @param Redirector $redirect */ public function handle(LoginFormBuilder $builder, UserAuthenticator $authenticator, Redirector $redirect) { if (!$user = $builder->getUser()) { return; } $authenticator->login($user, $builder->getFormValue('remember_me')); $builder->setFormResponse($redirect->intended($builder->getFormOption('redirect'))); } }
Fix issue where inteded path was not being used in login form handler
Fix issue where inteded path was not being used in login form handler
PHP
mit
anomalylabs/users-module
php
## Code Before: <?php namespace Anomaly\UsersModule\User\Login; use Anomaly\UsersModule\User\UserAuthenticator; /** * Class LoginFormHandler * * @link http://anomaly.is/streams-platform * @author AnomalyLabs, Inc. <[email protected]> * @author Ryan Thompson <[email protected]> * @package Anomaly\UsersModule\User\Login */ class LoginFormHandler { /** * Handle the form. * * @param LoginFormBuilder $builder * @param UserAuthenticator $authenticator */ public function handle(LoginFormBuilder $builder, UserAuthenticator $authenticator) { if (!$user = $builder->getUser()) { return; } $authenticator->login($user, $builder->getFormValue('remember_me')); } } ## Instruction: Fix issue where inteded path was not being used in login form handler ## Code After: <?php namespace Anomaly\UsersModule\User\Login; use Anomaly\UsersModule\User\UserAuthenticator; use Illuminate\Routing\Redirector; /** * Class LoginFormHandler * * @link http://anomaly.is/streams-platform * @author AnomalyLabs, Inc. <[email protected]> * @author Ryan Thompson <[email protected]> * @package Anomaly\UsersModule\User\Login */ class LoginFormHandler { /** * Handle the form. * * @param LoginFormBuilder $builder * @param UserAuthenticator $authenticator * @param Redirector $redirect */ public function handle(LoginFormBuilder $builder, UserAuthenticator $authenticator, Redirector $redirect) { if (!$user = $builder->getUser()) { return; } $authenticator->login($user, $builder->getFormValue('remember_me')); $builder->setFormResponse($redirect->intended($builder->getFormOption('redirect'))); } }
036c9693a26d40f7a5ebebef8e27f2a98cc6a102
data/apply-planet_osm_line.sql
data/apply-planet_osm_line.sql
DO $$ BEGIN -------------------------------------------------------------------------------- -- planet_osm_line -------------------------------------------------------------------------------- ALTER TABLE planet_osm_line ADD COLUMN mz_id TEXT, ADD COLUMN mz_road_level SMALLINT, ADD COLUMN mz_road_sort_key FLOAT; UPDATE planet_osm_line AS line SET mz_id = mz_normalize_id(road.osm_id, road.way), mz_road_level = road.mz_road_level, mz_road_sort_key = (CASE WHEN road.mz_road_level IS NULL THEN NULL ELSE mz_calculate_road_sort_key(road.layer, road.bridge, road.tunnel, road.highway, road.railway) END) FROM ( SELECT osm_id, way, layer, bridge, tunnel, highway, railway, mz_calculate_road_level(highway, railway) AS mz_road_level FROM planet_osm_line ) road WHERE line.osm_id = road.osm_id; PERFORM mz_create_partial_index_if_not_exists('planet_osm_line_mz_road_level_index', 'planet_osm_line', 'mz_road_level', 'mz_road_level IS NOT NULL'); END $$;
DO $$ BEGIN -------------------------------------------------------------------------------- -- planet_osm_line -------------------------------------------------------------------------------- ALTER TABLE planet_osm_line ADD COLUMN mz_id TEXT, ADD COLUMN mz_road_level SMALLINT, ADD COLUMN mz_road_sort_key FLOAT; UPDATE planet_osm_line AS line SET mz_id = mz_normalize_id(road.osm_id, road.way), mz_road_level = road.mz_road_level, mz_road_sort_key = (CASE WHEN road.mz_road_level IS NULL THEN NULL ELSE mz_calculate_road_sort_key(road.layer, road.bridge, road.tunnel, road.highway, road.railway) END) FROM ( SELECT osm_id, way, layer, bridge, tunnel, highway, railway, mz_calculate_road_level(highway, railway) AS mz_road_level FROM planet_osm_line ) road WHERE line.osm_id = road.osm_id; PERFORM mz_create_partial_index_if_not_exists('planet_osm_line_mz_road_level_index', 'planet_osm_line', 'mz_road_level', 'mz_road_level IS NOT NULL'); PERFORM mz_create_partial_index_if_not_exists('planet_osm_line_waterway', 'planet_osm_line', 'waterway', 'waterway IS NOT NULL'); END $$;
Add index on waterway lines
Add index on waterway lines
SQL
mit
zoondka/vector-datasource,mapzen/vector-datasource,gronke/vector-datasource,mapzen/vector-datasource,adncentral/vector-datasource,mapzen/vector-datasource,adncentral/vector-datasource,kyroskoh/vector-datasource,zoondka/vector-datasource,kyroskoh/vector-datasource,adncentral/vector-datasource,gronke/vector-datasource,adncentral/vector-datasource
sql
## Code Before: DO $$ BEGIN -------------------------------------------------------------------------------- -- planet_osm_line -------------------------------------------------------------------------------- ALTER TABLE planet_osm_line ADD COLUMN mz_id TEXT, ADD COLUMN mz_road_level SMALLINT, ADD COLUMN mz_road_sort_key FLOAT; UPDATE planet_osm_line AS line SET mz_id = mz_normalize_id(road.osm_id, road.way), mz_road_level = road.mz_road_level, mz_road_sort_key = (CASE WHEN road.mz_road_level IS NULL THEN NULL ELSE mz_calculate_road_sort_key(road.layer, road.bridge, road.tunnel, road.highway, road.railway) END) FROM ( SELECT osm_id, way, layer, bridge, tunnel, highway, railway, mz_calculate_road_level(highway, railway) AS mz_road_level FROM planet_osm_line ) road WHERE line.osm_id = road.osm_id; PERFORM mz_create_partial_index_if_not_exists('planet_osm_line_mz_road_level_index', 'planet_osm_line', 'mz_road_level', 'mz_road_level IS NOT NULL'); END $$; ## Instruction: Add index on waterway lines ## Code After: DO $$ BEGIN -------------------------------------------------------------------------------- -- planet_osm_line -------------------------------------------------------------------------------- ALTER TABLE planet_osm_line ADD COLUMN mz_id TEXT, ADD COLUMN mz_road_level SMALLINT, ADD COLUMN mz_road_sort_key FLOAT; UPDATE planet_osm_line AS line SET mz_id = mz_normalize_id(road.osm_id, road.way), mz_road_level = road.mz_road_level, mz_road_sort_key = (CASE WHEN road.mz_road_level IS NULL THEN NULL ELSE mz_calculate_road_sort_key(road.layer, road.bridge, road.tunnel, road.highway, road.railway) END) FROM ( SELECT osm_id, way, layer, bridge, tunnel, highway, railway, mz_calculate_road_level(highway, railway) AS mz_road_level FROM planet_osm_line ) road WHERE line.osm_id = road.osm_id; PERFORM mz_create_partial_index_if_not_exists('planet_osm_line_mz_road_level_index', 'planet_osm_line', 'mz_road_level', 'mz_road_level IS NOT NULL'); PERFORM mz_create_partial_index_if_not_exists('planet_osm_line_waterway', 'planet_osm_line', 'waterway', 'waterway IS NOT NULL'); END $$;
431dd5d9b8052561c2be073700405b43db9eb97f
package.json
package.json
{ "name": "express-list-endpoints", "version": "1.0.1", "description": "A express package to list all registered endoints and its verbs", "main": "index.js", "scripts": { "test": "mocha" }, "repository": { "type": "git", "url": "https://github.com/AlbertoFdzM/express-list-endpoints.git" }, "keywords": [ "express", "routes", "endpoints", "route", "endpoint", "list", "ls", "verb", "verbs" ], "author": "Alberto Fernandez <[email protected]>", "license": "MIT", "devDependencies": { "chai": "^3.4.1", "eslint": "^2.8.0", "mocha": "^2.3.4", "express": "^4.13.3" } }
{ "name": "express-list-endpoints", "version": "1.0.1", "description": "A express package to list all registered endoints and its verbs", "main": "index.js", "scripts": { "test": "mocha", "preversion": "npm test", "postversion": "git push --follow-tags" }, "repository": { "type": "git", "url": "https://github.com/AlbertoFdzM/express-list-endpoints.git" }, "keywords": [ "express", "routes", "endpoints", "route", "endpoint", "list", "ls", "verb", "verbs" ], "author": "Alberto Fernandez <[email protected]>", "license": "MIT", "devDependencies": { "chai": "^3.4.1", "eslint": "^2.8.0", "mocha": "^2.3.4", "express": "^4.13.3" } }
Add scripts for npm version
Add scripts for npm version
JSON
mit
AlbertoFdzM/express-list-endpoints
json
## Code Before: { "name": "express-list-endpoints", "version": "1.0.1", "description": "A express package to list all registered endoints and its verbs", "main": "index.js", "scripts": { "test": "mocha" }, "repository": { "type": "git", "url": "https://github.com/AlbertoFdzM/express-list-endpoints.git" }, "keywords": [ "express", "routes", "endpoints", "route", "endpoint", "list", "ls", "verb", "verbs" ], "author": "Alberto Fernandez <[email protected]>", "license": "MIT", "devDependencies": { "chai": "^3.4.1", "eslint": "^2.8.0", "mocha": "^2.3.4", "express": "^4.13.3" } } ## Instruction: Add scripts for npm version ## Code After: { "name": "express-list-endpoints", "version": "1.0.1", "description": "A express package to list all registered endoints and its verbs", "main": "index.js", "scripts": { "test": "mocha", "preversion": "npm test", "postversion": "git push --follow-tags" }, "repository": { "type": "git", "url": "https://github.com/AlbertoFdzM/express-list-endpoints.git" }, "keywords": [ "express", "routes", "endpoints", "route", "endpoint", "list", "ls", "verb", "verbs" ], "author": "Alberto Fernandez <[email protected]>", "license": "MIT", "devDependencies": { "chai": "^3.4.1", "eslint": "^2.8.0", "mocha": "^2.3.4", "express": "^4.13.3" } }
3ed6592033fe32c56eb8772f9ceea52ab9ba33eb
public/js/models/core/UserModel.js
public/js/models/core/UserModel.js
define([ 'underscore', 'backbone' ], function(_, Backbone) { var UserModel = Backbone.Model.extend({ defaults: { id: 0, name: '', email: '', password: '' }, initialize: function (options) { //_.bindAll(this); }, url: function() { return '/api/users'; } }); return UserModel; });
define([ 'underscore', 'backbone' ], function(_, Backbone) { var UserModel = Backbone.Model.extend({ defaults: { name: '', email: '', password: '' }, url: '/api/users' }); return UserModel; });
Remove commented code, and simplify class
Remove commented code, and simplify class
JavaScript
mit
nestor-qa/nestor,nestor-qa/nestor,nestor-qa/nestor,kinow/nestor,kinow/nestor,nestor-qa/nestor,kinow/nestor,kinow/nestor
javascript
## Code Before: define([ 'underscore', 'backbone' ], function(_, Backbone) { var UserModel = Backbone.Model.extend({ defaults: { id: 0, name: '', email: '', password: '' }, initialize: function (options) { //_.bindAll(this); }, url: function() { return '/api/users'; } }); return UserModel; }); ## Instruction: Remove commented code, and simplify class ## Code After: define([ 'underscore', 'backbone' ], function(_, Backbone) { var UserModel = Backbone.Model.extend({ defaults: { name: '', email: '', password: '' }, url: '/api/users' }); return UserModel; });
032d6925c6797f718af11db523ca8b60f6a53ec2
lib/api_monkey/filter_scopes.rb
lib/api_monkey/filter_scopes.rb
module ApiMonkey::FilterScopes extend ActiveSupport::Concern included do OPERANDS = { 'eq' => '=', 'gt' => '>', 'lt' => '<', 'geq' => '>=', 'leq' => '<=', }.freeze # Define filter methods column_names.map do |field_name| define_singleton_method "filter_#{field_name}" do |param| if param.is_a? Hash where(*process_hash_params(field_name, param)) else where(*filter_args(field_name, param, 'eq')) end end end def self.filter_args(field, value, op) ["#{field} #{OPERANDS[op]} ?", value] end def self.process_hash_params(field, param) predicates, values = [],[] param.keys.each do |k| predicates << filter_args(field, param[k], k)[0] values << filter_args(field, param[k], k)[1] end [predicates.join(' AND '), *values] end def self.filter_params {}.tap do |h| column_names.each do |field_name| h[field_name.to_sym] = OPERANDS.keys.map &:to_sym end end end end end
module ApiMonkey::FilterScopes extend ActiveSupport::Concern OPERANDS = { 'eq' => '=', 'gt' => '>', 'lt' => '<', 'geq' => '>=', 'leq' => '<=', }.freeze included do # Define filter methods column_names.map do |field_name| define_singleton_method "filter_#{field_name}" do |param| if param.is_a? Hash where(*process_hash_params(field_name, param)) else where(*filter_args(field_name, param, 'eq')) end end end def self.filter_args(field, value, op) ["#{field} #{OPERANDS[op]} ?", value] end def self.process_hash_params(field, param) predicates, values = [],[] param.keys.each do |k| predicates << filter_args(field, param[k], k)[0] values << filter_args(field, param[k], k)[1] end [predicates.join(' AND '), *values] end def self.filter_params {}.tap do |h| column_names.each do |field_name| h[field_name.to_sym] = OPERANDS.keys.map &:to_sym end end end end end
Remove warning messages about multiple include
Remove warning messages about multiple include
Ruby
mit
michaelkelly322/api_monkey,thebadmonkeydev/api_monkey,michaelkelly322/api_monkey,thebadmonkeydev/api_monkey
ruby
## Code Before: module ApiMonkey::FilterScopes extend ActiveSupport::Concern included do OPERANDS = { 'eq' => '=', 'gt' => '>', 'lt' => '<', 'geq' => '>=', 'leq' => '<=', }.freeze # Define filter methods column_names.map do |field_name| define_singleton_method "filter_#{field_name}" do |param| if param.is_a? Hash where(*process_hash_params(field_name, param)) else where(*filter_args(field_name, param, 'eq')) end end end def self.filter_args(field, value, op) ["#{field} #{OPERANDS[op]} ?", value] end def self.process_hash_params(field, param) predicates, values = [],[] param.keys.each do |k| predicates << filter_args(field, param[k], k)[0] values << filter_args(field, param[k], k)[1] end [predicates.join(' AND '), *values] end def self.filter_params {}.tap do |h| column_names.each do |field_name| h[field_name.to_sym] = OPERANDS.keys.map &:to_sym end end end end end ## Instruction: Remove warning messages about multiple include ## Code After: module ApiMonkey::FilterScopes extend ActiveSupport::Concern OPERANDS = { 'eq' => '=', 'gt' => '>', 'lt' => '<', 'geq' => '>=', 'leq' => '<=', }.freeze included do # Define filter methods column_names.map do |field_name| define_singleton_method "filter_#{field_name}" do |param| if param.is_a? Hash where(*process_hash_params(field_name, param)) else where(*filter_args(field_name, param, 'eq')) end end end def self.filter_args(field, value, op) ["#{field} #{OPERANDS[op]} ?", value] end def self.process_hash_params(field, param) predicates, values = [],[] param.keys.each do |k| predicates << filter_args(field, param[k], k)[0] values << filter_args(field, param[k], k)[1] end [predicates.join(' AND '), *values] end def self.filter_params {}.tap do |h| column_names.each do |field_name| h[field_name.to_sym] = OPERANDS.keys.map &:to_sym end end end end end
1fa4a78e72d28067d3f842779d41457580aff873
app/templates/notes.htm
app/templates/notes.htm
{% extends "base.htm" %} {% block title %}Albert Wang - Notes{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %} <div class="content"> <h1>Notes</h1> {% for post in posts %} <section class="note"> <h2> {{ post['title'] | safe }} </h2> <subtitle> {{ post['time'].strftime("%B %-d, %Y") }} </subtitle> <p> {{ post['note'] | safe }} </p> <a href="{{ url_for('note', slug=post['slug']) }}">Permalink</a> </section> {% endfor %} </div> {% endblock %}
{% extends "base.htm" %} {% block title %}Albert Wang - Notes{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %} <div class="content"> <h1>Notes</h1> <a href="/atom.xml">Atom Feed</a> {% for post in posts %} <section class="note"> <h2> {{ post['title'] | safe }} </h2> <subtitle> {{ post['time'].strftime("%B %-d, %Y") }} </subtitle> <p> {{ post['note'] | safe }} </p> <a href="{{ url_for('note', slug=post['slug']) }}">Permalink</a> </section> {% endfor %} </div> {% endblock %}
Add link to atom feed
Add link to atom feed
HTML
mit
albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com,albertyw/albertyw.com
html
## Code Before: {% extends "base.htm" %} {% block title %}Albert Wang - Notes{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %} <div class="content"> <h1>Notes</h1> {% for post in posts %} <section class="note"> <h2> {{ post['title'] | safe }} </h2> <subtitle> {{ post['time'].strftime("%B %-d, %Y") }} </subtitle> <p> {{ post['note'] | safe }} </p> <a href="{{ url_for('note', slug=post['slug']) }}">Permalink</a> </section> {% endfor %} </div> {% endblock %} ## Instruction: Add link to atom feed ## Code After: {% extends "base.htm" %} {% block title %}Albert Wang - Notes{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %} <div class="content"> <h1>Notes</h1> <a href="/atom.xml">Atom Feed</a> {% for post in posts %} <section class="note"> <h2> {{ post['title'] | safe }} </h2> <subtitle> {{ post['time'].strftime("%B %-d, %Y") }} </subtitle> <p> {{ post['note'] | safe }} </p> <a href="{{ url_for('note', slug=post['slug']) }}">Permalink</a> </section> {% endfor %} </div> {% endblock %}
57c933dcdaee9db46a45f104e612b575577e11a5
README.md
README.md
This is a fuzzy receipt parser written in Python. It extracts information like the shop, the date, and the total form receipts. It can work as a standalone script or as part of the [IOS and Android application](https://github.com/ReceiptManager/Application). ## History This project started as a hackathon idea. Read more about it on the [trivago techblog](http://tech.trivago.com/2015/10/06/python_receipt_parser_core/). Also read the comments on [HackerNews](https://news.ycombinator.com/item?id=10338199) There's also a [talk](https://www.youtube.com/watch?v=TuDeUsIlJz4) about the project. The library is now available at [PyPi](https://pypi.org/project/receipt-parser-core/#description). ## Usage To convert all images from the `data/img/` folder to text using tesseract and parse the resulting text files, run ``` make run ``` ### Docker A Dockerfile is available with all dependencies needed to run the program. To build the image, run ``` make docker-build ``` To run it on the sample files, try ``` make docker-run ``` By default, running the image will execute the `make run` command. To use with your own images, run the following: ``` docker run -v <path_to_input_images>:/usr/src/app/data/img mre0/receipt_parser_core ```
This is a fuzzy receipt parser written in Python. It extracts information like the shop, the date, and the total form receipts. It can work as a standalone script or as part of the [IOS and Android application](https://github.com/ReceiptManager/Application). ## History This project started as a hackathon idea. Read more about it on the [trivago techblog](https://tech.trivago.com/2015/10/06/python_receipt_parser/). Also read the comments on [HackerNews](https://news.ycombinator.com/item?id=10338199) There's also a [talk](https://www.youtube.com/watch?v=TuDeUsIlJz4) about the project. The library is now available at [PyPi](https://pypi.org/project/receipt-parser-core/#description). ## Usage To convert all images from the `data/img/` folder to text using tesseract and parse the resulting text files, run ``` make run ``` ### Docker A Dockerfile is available with all dependencies needed to run the program. To build the image, run ``` make docker-build ``` To run it on the sample files, try ``` make docker-run ``` By default, running the image will execute the `make run` command. To use with your own images, run the following: ``` docker run -v <path_to_input_images>:/usr/src/app/data/img mre0/receipt_parser ```
Add library publish option in Makefile
Add library publish option in Makefile
Markdown
apache-2.0
mre/receipt-parser
markdown
## Code Before: This is a fuzzy receipt parser written in Python. It extracts information like the shop, the date, and the total form receipts. It can work as a standalone script or as part of the [IOS and Android application](https://github.com/ReceiptManager/Application). ## History This project started as a hackathon idea. Read more about it on the [trivago techblog](http://tech.trivago.com/2015/10/06/python_receipt_parser_core/). Also read the comments on [HackerNews](https://news.ycombinator.com/item?id=10338199) There's also a [talk](https://www.youtube.com/watch?v=TuDeUsIlJz4) about the project. The library is now available at [PyPi](https://pypi.org/project/receipt-parser-core/#description). ## Usage To convert all images from the `data/img/` folder to text using tesseract and parse the resulting text files, run ``` make run ``` ### Docker A Dockerfile is available with all dependencies needed to run the program. To build the image, run ``` make docker-build ``` To run it on the sample files, try ``` make docker-run ``` By default, running the image will execute the `make run` command. To use with your own images, run the following: ``` docker run -v <path_to_input_images>:/usr/src/app/data/img mre0/receipt_parser_core ``` ## Instruction: Add library publish option in Makefile ## Code After: This is a fuzzy receipt parser written in Python. It extracts information like the shop, the date, and the total form receipts. It can work as a standalone script or as part of the [IOS and Android application](https://github.com/ReceiptManager/Application). ## History This project started as a hackathon idea. Read more about it on the [trivago techblog](https://tech.trivago.com/2015/10/06/python_receipt_parser/). Also read the comments on [HackerNews](https://news.ycombinator.com/item?id=10338199) There's also a [talk](https://www.youtube.com/watch?v=TuDeUsIlJz4) about the project. The library is now available at [PyPi](https://pypi.org/project/receipt-parser-core/#description). ## Usage To convert all images from the `data/img/` folder to text using tesseract and parse the resulting text files, run ``` make run ``` ### Docker A Dockerfile is available with all dependencies needed to run the program. To build the image, run ``` make docker-build ``` To run it on the sample files, try ``` make docker-run ``` By default, running the image will execute the `make run` command. To use with your own images, run the following: ``` docker run -v <path_to_input_images>:/usr/src/app/data/img mre0/receipt_parser ```
3dc6231fec49e0d6dfeeae4240ce7bac9b029c0d
app.css
app.css
*{ list-style: none; } body{ margin-top: 30px; } .container{ padding-top: 15px; text-align: center; margin: auto; width: 400px; height: 600px; border: black solid; border-radius: 15px; overflow: scroll; } .list-display{ text-align: left; padding-left: 30px; font-size: 20px; } li{ border: lightgrey solid 2px; margin: 1px; width: 250px; height: 100%; padding: 10px; border-radius: 15px; } li:hover{ background: lightgrey; opacity: 0.7; } /*input[type=checked]{ }*/ #new-task{ width: 300px; height: 40px; font-size: 20px; border-radius: 20px; background: lightgrey; padding-left: 20px; border: 0; outline: none; }
*{ list-style: none; } body{ margin-top: 30px; } .container{ padding-top: 15px; text-align: center; margin: auto; width: 400px; height: 600px; border: black solid; border-radius: 15px; overflow: scroll; } .list-display{ text-align: left; padding-left: 30px; font-size: 20px; } li{ border: lightgrey solid 2px; margin: 1px; width: 250px; height: 100%; padding: 10px; border-radius: 15px; } li:hover{ background: lightgrey; opacity: 0.7; } .toggle:checked + label{ text-decoration: line-through; } /*input[type=checked]{ }*/ #new-task{ width: 300px; height: 40px; font-size: 20px; border-radius: 20px; background: lightgrey; padding-left: 20px; border: 0; outline: none; }
Add strike-through when task is checked.
Add strike-through when task is checked.
CSS
mit
rachelylim/todo_backbone,rachelylim/todo_backbone
css
## Code Before: *{ list-style: none; } body{ margin-top: 30px; } .container{ padding-top: 15px; text-align: center; margin: auto; width: 400px; height: 600px; border: black solid; border-radius: 15px; overflow: scroll; } .list-display{ text-align: left; padding-left: 30px; font-size: 20px; } li{ border: lightgrey solid 2px; margin: 1px; width: 250px; height: 100%; padding: 10px; border-radius: 15px; } li:hover{ background: lightgrey; opacity: 0.7; } /*input[type=checked]{ }*/ #new-task{ width: 300px; height: 40px; font-size: 20px; border-radius: 20px; background: lightgrey; padding-left: 20px; border: 0; outline: none; } ## Instruction: Add strike-through when task is checked. ## Code After: *{ list-style: none; } body{ margin-top: 30px; } .container{ padding-top: 15px; text-align: center; margin: auto; width: 400px; height: 600px; border: black solid; border-radius: 15px; overflow: scroll; } .list-display{ text-align: left; padding-left: 30px; font-size: 20px; } li{ border: lightgrey solid 2px; margin: 1px; width: 250px; height: 100%; padding: 10px; border-radius: 15px; } li:hover{ background: lightgrey; opacity: 0.7; } .toggle:checked + label{ text-decoration: line-through; } /*input[type=checked]{ }*/ #new-task{ width: 300px; height: 40px; font-size: 20px; border-radius: 20px; background: lightgrey; padding-left: 20px; border: 0; outline: none; }
d5376bf80c046b52ae744a5de775e461a9d7da55
setup.cfg
setup.cfg
[flake8] max-line-length=150 statistics=True extend-ignore=E203 # To avoid conficts with black. exclude= .git, __pycache__, docs, bedrock/settings, node_modules, assets, static, bedrock/externalfiles/files_cache, lib/fluent_migrations [tool:pytest] # Hiding warnings for now, the noise is making test fixes harder addopts = --showlocals -r a --ignore=node_modules -p no:warnings DJANGO_SETTINGS_MODULE = bedrock.settings.test sensitive_url = (mozilla\.(com|org)|bedrock-prod) testpaths = bedrock lib tests
[flake8] max-line-length=150 statistics=True extend-ignore=E203 # To avoid conficts with black. exclude= .git, __pycache__, docs, bedrock/settings, node_modules, assets, static, bedrock/externalfiles/files_cache, lib/fluent_migrations [tool:pytest] # Hiding warnings for now, the noise is making test fixes harder addopts = --showlocals -r a --ignore=node_modules -p no:warnings DJANGO_SETTINGS_MODULE = bedrock.settings.test sensitive_url = (mozilla\.(com|org)|bedrock-prod) testpaths = bedrock lib tests [tool:paul-mclendahand] # Config for use with https://github.com/willkg/paul-mclendahand github_user=mozilla github_project=bedrock main_branch=master
Add paul-mclendahand config to bedrock
NOTICKET: Add paul-mclendahand config to bedrock https://github.com/willkg/paul-mclendahand makes maintenance-PR handling so much easier than one-by-one This changeset adds a default config to make it pretty much instant to use after installation. Note that this addition doesn't specify which remote to use, so we may need to tune this if 'origin' means different things to different contributors.
INI
mpl-2.0
pascalchevrel/bedrock,craigcook/bedrock,alexgibson/bedrock,alexgibson/bedrock,flodolo/bedrock,flodolo/bedrock,pascalchevrel/bedrock,sylvestre/bedrock,mozilla/bedrock,pascalchevrel/bedrock,mozilla/bedrock,flodolo/bedrock,craigcook/bedrock,craigcook/bedrock,sylvestre/bedrock,sylvestre/bedrock,pascalchevrel/bedrock,mozilla/bedrock,craigcook/bedrock,alexgibson/bedrock,mozilla/bedrock,alexgibson/bedrock,flodolo/bedrock,sylvestre/bedrock
ini
## Code Before: [flake8] max-line-length=150 statistics=True extend-ignore=E203 # To avoid conficts with black. exclude= .git, __pycache__, docs, bedrock/settings, node_modules, assets, static, bedrock/externalfiles/files_cache, lib/fluent_migrations [tool:pytest] # Hiding warnings for now, the noise is making test fixes harder addopts = --showlocals -r a --ignore=node_modules -p no:warnings DJANGO_SETTINGS_MODULE = bedrock.settings.test sensitive_url = (mozilla\.(com|org)|bedrock-prod) testpaths = bedrock lib tests ## Instruction: NOTICKET: Add paul-mclendahand config to bedrock https://github.com/willkg/paul-mclendahand makes maintenance-PR handling so much easier than one-by-one This changeset adds a default config to make it pretty much instant to use after installation. Note that this addition doesn't specify which remote to use, so we may need to tune this if 'origin' means different things to different contributors. ## Code After: [flake8] max-line-length=150 statistics=True extend-ignore=E203 # To avoid conficts with black. exclude= .git, __pycache__, docs, bedrock/settings, node_modules, assets, static, bedrock/externalfiles/files_cache, lib/fluent_migrations [tool:pytest] # Hiding warnings for now, the noise is making test fixes harder addopts = --showlocals -r a --ignore=node_modules -p no:warnings DJANGO_SETTINGS_MODULE = bedrock.settings.test sensitive_url = (mozilla\.(com|org)|bedrock-prod) testpaths = bedrock lib tests [tool:paul-mclendahand] # Config for use with https://github.com/willkg/paul-mclendahand github_user=mozilla github_project=bedrock main_branch=master
a78b691674d8ae1a3c6b318588cd7b3d5a97fcb3
js/Search.js
js/Search.js
import React from 'react' import preload from '../public/data.json' import ShowCard from './ShowCard' const Search = React.createClass({ render () { return ( <div className='search'> {preload.shows.map((show) => { return ( <ShowCard show={show} /> ) })} </div> ) } }) export default Search
import React from 'react' import preload from '../public/data.json' import ShowCard from './ShowCard' const Search = React.createClass({ render () { return ( <div className='search'> {preload.shows.map((show) => { return ( <ShowCard key={show.imdbID} show={show} /> ) })} </div> ) } }) export default Search
Add key prop to ShowCard.
Add key prop to ShowCard.
JavaScript
mit
jelliotartz/FEM-react-intro,jelliotartz/FEM-react-intro
javascript
## Code Before: import React from 'react' import preload from '../public/data.json' import ShowCard from './ShowCard' const Search = React.createClass({ render () { return ( <div className='search'> {preload.shows.map((show) => { return ( <ShowCard show={show} /> ) })} </div> ) } }) export default Search ## Instruction: Add key prop to ShowCard. ## Code After: import React from 'react' import preload from '../public/data.json' import ShowCard from './ShowCard' const Search = React.createClass({ render () { return ( <div className='search'> {preload.shows.map((show) => { return ( <ShowCard key={show.imdbID} show={show} /> ) })} </div> ) } }) export default Search
4836cb93b03eae38c0e1eebeee831f9b4fc012eb
cozify/config.py
cozify/config.py
import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeralFile, 'w+') os.chmod(ephemeralFile, 0o600) # set to user readwrite only to protect tokens ephemeral = configparser.ConfigParser() ephemeral.read(ephemeralFile) # make sure config is in roughly a valid state for key in [ 'Cloud', 'Hubs' ]: if key not in ephemeral: ephemeral[key] = {} ephemeralWrite()
import configparser import os ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') ephemeral = None def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # allow setting the ephemeral storage location. # Useful especially for testing without affecting your normal state def setStatePath(filepath): global ephemeralFile ephemeralFile = filepath _initState() def _initState(): global ephemeral # prime ephemeral storage try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeralFile, 'w+') os.chmod(ephemeralFile, 0o600) # set to user readwrite only to protect tokens ephemeral = configparser.ConfigParser() ephemeral.read(ephemeralFile) # make sure config is in roughly a valid state for key in [ 'Cloud', 'Hubs' ]: if key not in ephemeral: ephemeral[key] = {} ephemeralWrite() _initState()
Support for changing ephemeral state storage mid-run. Mostly useful for debugging and testing without hosing your main state
Support for changing ephemeral state storage mid-run. Mostly useful for debugging and testing without hosing your main state
Python
mit
Artanicus/python-cozify,Artanicus/python-cozify
python
## Code Before: import configparser import os def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # prime ephemeral storage ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeralFile, 'w+') os.chmod(ephemeralFile, 0o600) # set to user readwrite only to protect tokens ephemeral = configparser.ConfigParser() ephemeral.read(ephemeralFile) # make sure config is in roughly a valid state for key in [ 'Cloud', 'Hubs' ]: if key not in ephemeral: ephemeral[key] = {} ephemeralWrite() ## Instruction: Support for changing ephemeral state storage mid-run. Mostly useful for debugging and testing without hosing your main state ## Code After: import configparser import os ephemeralFile = "%s/.config/python-cozify.cfg" % os.path.expanduser('~') ephemeral = None def ephemeralWrite(): with open(ephemeralFile, 'w') as configfile: ephemeral.write(configfile) # allow setting the ephemeral storage location. # Useful especially for testing without affecting your normal state def setStatePath(filepath): global ephemeralFile ephemeralFile = filepath _initState() def _initState(): global ephemeral # prime ephemeral storage try: file = open(ephemeralFile, 'r') except IOError: file = open(ephemeralFile, 'w+') os.chmod(ephemeralFile, 0o600) # set to user readwrite only to protect tokens ephemeral = configparser.ConfigParser() ephemeral.read(ephemeralFile) # make sure config is in roughly a valid state for key in [ 'Cloud', 'Hubs' ]: if key not in ephemeral: ephemeral[key] = {} ephemeralWrite() _initState()
faa3774a70e096bb31b9733def967cba6f33ca64
src/cmd/constants.js
src/cmd/constants.js
const platformsByName = { core: 0, c: 0, photon: 6, p: 6, p1: 8, electron: 10, e: 10, duo: 88, d: 88, bluz: 103, b: 103 }; const platformsById = { 0: 'Core', 6: 'Photon', 8: 'P1', 10: 'Electron', 31: 'Raspberry Pi', 88: 'Duo', 103: 'Bluz' }; const notSourceExtensions = [ '.ds_store', '.jpg', '.gif', '.png', '.include', '.ignore', '.git', '.bin' ]; const MAX_FILE_SIZE = 1024 * 1024 * 2; module.exports = { platformsByName, platformsById, notSourceExtensions, MAX_FILE_SIZE };
const platformsByName = { core: 0, c: 0, photon: 6, p: 6, p1: 8, electron: 10, e: 10, duo: 88, d: 88, bluz: 103, b: 103 }; const platformsById = { 0: 'Core', 6: 'Photon', 8: 'P1', 10: 'Electron', 12: 'Argon', 13: 'Boron', 14: 'Xenon', 31: 'Raspberry Pi', 88: 'Duo', 103: 'Bluz' }; const notSourceExtensions = [ '.ds_store', '.jpg', '.gif', '.png', '.include', '.ignore', '.git', '.bin' ]; const MAX_FILE_SIZE = 1024 * 1024 * 2; module.exports = { platformsByName, platformsById, notSourceExtensions, MAX_FILE_SIZE };
Add mesh platform names to particle list
Add mesh platform names to particle list
JavaScript
apache-2.0
spark/particle-cli,spark/particle-cli,spark/particle-cli,spark/particle-cli,spark/particle-cli,spark/particle-cli
javascript
## Code Before: const platformsByName = { core: 0, c: 0, photon: 6, p: 6, p1: 8, electron: 10, e: 10, duo: 88, d: 88, bluz: 103, b: 103 }; const platformsById = { 0: 'Core', 6: 'Photon', 8: 'P1', 10: 'Electron', 31: 'Raspberry Pi', 88: 'Duo', 103: 'Bluz' }; const notSourceExtensions = [ '.ds_store', '.jpg', '.gif', '.png', '.include', '.ignore', '.git', '.bin' ]; const MAX_FILE_SIZE = 1024 * 1024 * 2; module.exports = { platformsByName, platformsById, notSourceExtensions, MAX_FILE_SIZE }; ## Instruction: Add mesh platform names to particle list ## Code After: const platformsByName = { core: 0, c: 0, photon: 6, p: 6, p1: 8, electron: 10, e: 10, duo: 88, d: 88, bluz: 103, b: 103 }; const platformsById = { 0: 'Core', 6: 'Photon', 8: 'P1', 10: 'Electron', 12: 'Argon', 13: 'Boron', 14: 'Xenon', 31: 'Raspberry Pi', 88: 'Duo', 103: 'Bluz' }; const notSourceExtensions = [ '.ds_store', '.jpg', '.gif', '.png', '.include', '.ignore', '.git', '.bin' ]; const MAX_FILE_SIZE = 1024 * 1024 * 2; module.exports = { platformsByName, platformsById, notSourceExtensions, MAX_FILE_SIZE };
5a0a1b3d7a5b5d633027b0543292e06c8ba9cf0a
ansible/roles/openshift/tasks/main.yml
ansible/roles/openshift/tasks/main.yml
--- - name: Setup installation pre-requisites include: prereqs.yml - name: Run main OpenShift Ansible installation playbook include: install.yml - name: Post installation bespoking include: postinstall.yml
--- - block: - name: Setup installation pre-requisites include: prereqs.yml - name: Run main OpenShift Ansible installation playbook include: install.yml - name: Post installation bespoking include: postinstall.yml environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin/"
Add /usr/local/bin to path as openshift binaries are installed there now
Add /usr/local/bin to path as openshift binaries are installed there now
YAML
mit
wicksy/vagrant-openshift,wicksy/vagrant-openshift,wicksy/vagrant-openshift
yaml
## Code Before: --- - name: Setup installation pre-requisites include: prereqs.yml - name: Run main OpenShift Ansible installation playbook include: install.yml - name: Post installation bespoking include: postinstall.yml ## Instruction: Add /usr/local/bin to path as openshift binaries are installed there now ## Code After: --- - block: - name: Setup installation pre-requisites include: prereqs.yml - name: Run main OpenShift Ansible installation playbook include: install.yml - name: Post installation bespoking include: postinstall.yml environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin/"
eaac51e32939586e2db769eb901597591979554c
assets/concrete5filemanager/plugin.js
assets/concrete5filemanager/plugin.js
(function() { CKEDITOR.plugins.add('concrete5filemanager', { init: function () { CKEDITOR.on('dialogDefinition', function(event) { var editor = event.editor, dialogDefinition = event.data.definition, tabContent = dialogDefinition.contents.length; for (var i = 0; i < tabContent; i++) { var browseButton = dialogDefinition.contents[i].get('browse'); if (browseButton !== null) { browseButton.hidden = false; browseButton.onClick = function() { editor._.filebrowserSe = this; ConcreteFileManager.launchDialog(function(data) { jQuery.fn.dialog.showLoader(); ConcreteFileManager.getFileDetails(data.fID, function(r) { jQuery.fn.dialog.hideLoader(); var file = r.files[0]; CKEDITOR.tools.callFunction(editor._.filebrowserFn, file.urlDownload); }); }); } } } }); } }); })();
(function() { CKEDITOR.plugins.add('concrete5filemanager', { init: function () { CKEDITOR.on('dialogDefinition', function(event) { var editor = event.editor, dialogDefinition = event.data.definition, tabContent = dialogDefinition.contents.length; for (var i = 0; i < tabContent; i++) { var browseButton = dialogDefinition.contents[i].get('browse'); if (browseButton !== null) { browseButton.hidden = false; browseButton.onClick = function() { editor._.filebrowserSe = this; ConcreteFileManager.launchDialog(function(data) { jQuery.fn.dialog.showLoader(); ConcreteFileManager.getFileDetails(data.fID, function(r) { jQuery.fn.dialog.hideLoader(); var file = r.files[0]; CKEDITOR.tools.callFunction(editor._.filebrowserFn, file.urlInline, function() { var dialog = this.getDialog(); if ( dialog.getName() == 'image' || dialog.getName() == 'image2') { dialog.dontResetSize = true; dialog.getContentElement( 'info', 'txtAlt').setValue(file.title); dialog.getContentElement( 'info', 'txtWidth').setValue(''); dialog.getContentElement( 'info', 'txtHeight').setValue(''); dialog.getContentElement( 'Link', 'txtUrl').setValue(file.urlDownload); } }); }); }); } } } }); } }); })();
Disable width/height resize on image browse selection and use inlnie url for responsive images.
Disable width/height resize on image browse selection and use inlnie url for responsive images. Add Download URL to images automatically
JavaScript
mit
ExchangeCore/Concrete5-CKEditor,MrKarlDilkington/Concrete5-CKEditor,MrKarlDilkington/Concrete5-CKEditor,ExchangeCore/Concrete5-CKEditor
javascript
## Code Before: (function() { CKEDITOR.plugins.add('concrete5filemanager', { init: function () { CKEDITOR.on('dialogDefinition', function(event) { var editor = event.editor, dialogDefinition = event.data.definition, tabContent = dialogDefinition.contents.length; for (var i = 0; i < tabContent; i++) { var browseButton = dialogDefinition.contents[i].get('browse'); if (browseButton !== null) { browseButton.hidden = false; browseButton.onClick = function() { editor._.filebrowserSe = this; ConcreteFileManager.launchDialog(function(data) { jQuery.fn.dialog.showLoader(); ConcreteFileManager.getFileDetails(data.fID, function(r) { jQuery.fn.dialog.hideLoader(); var file = r.files[0]; CKEDITOR.tools.callFunction(editor._.filebrowserFn, file.urlDownload); }); }); } } } }); } }); })(); ## Instruction: Disable width/height resize on image browse selection and use inlnie url for responsive images. Add Download URL to images automatically ## Code After: (function() { CKEDITOR.plugins.add('concrete5filemanager', { init: function () { CKEDITOR.on('dialogDefinition', function(event) { var editor = event.editor, dialogDefinition = event.data.definition, tabContent = dialogDefinition.contents.length; for (var i = 0; i < tabContent; i++) { var browseButton = dialogDefinition.contents[i].get('browse'); if (browseButton !== null) { browseButton.hidden = false; browseButton.onClick = function() { editor._.filebrowserSe = this; ConcreteFileManager.launchDialog(function(data) { jQuery.fn.dialog.showLoader(); ConcreteFileManager.getFileDetails(data.fID, function(r) { jQuery.fn.dialog.hideLoader(); var file = r.files[0]; CKEDITOR.tools.callFunction(editor._.filebrowserFn, file.urlInline, function() { var dialog = this.getDialog(); if ( dialog.getName() == 'image' || dialog.getName() == 'image2') { dialog.dontResetSize = true; dialog.getContentElement( 'info', 'txtAlt').setValue(file.title); dialog.getContentElement( 'info', 'txtWidth').setValue(''); dialog.getContentElement( 'info', 'txtHeight').setValue(''); dialog.getContentElement( 'Link', 'txtUrl').setValue(file.urlDownload); } }); }); }); } } } }); } }); })();
2a1c8a0cb8881104b4dc19b48bd273259860da83
DanDMartin/LoggerAware/Traits/LoggerAware.php
DanDMartin/LoggerAware/Traits/LoggerAware.php
<?php namespace DanDMartin\LoggerAware\Traits; use Psr\Log\LoggerInterface as PsrLogger; use DanDMartin\LoggerAware\Logger\NullLogger; trait LoggerAware { /** * @var PsrLogger */ protected $logger; /** * @param PsrLogger $l * @required */ public function setLogger(PsrLogger $l) { $this->logger = $l; } /** * @return PsrLogger */ public function getLogger() { if(is_null($this->logger)) { $this->logger = new NullLogger(); } return $this->logger; } }
<?php namespace DanDMartin\LoggerAware\Traits; use Psr\Log\LoggerInterface as PsrLogger; use DanDMartin\LoggerAware\Logger\NullLogger; trait LoggerAware { /** * @var PsrLogger */ protected $logger; /** * @param PsrLogger $l * @required */ public function setLogger(PsrLogger $l): void { $this->logger = $l; } /** * @return PsrLogger */ public function getLogger(): PsrLogger { if(is_null($this->logger)) { $this->logger = new NullLogger(); } return $this->logger; } }
Add return types to trait methods
Add return types to trait methods
PHP
mit
dan-d-martin/logger-aware
php
## Code Before: <?php namespace DanDMartin\LoggerAware\Traits; use Psr\Log\LoggerInterface as PsrLogger; use DanDMartin\LoggerAware\Logger\NullLogger; trait LoggerAware { /** * @var PsrLogger */ protected $logger; /** * @param PsrLogger $l * @required */ public function setLogger(PsrLogger $l) { $this->logger = $l; } /** * @return PsrLogger */ public function getLogger() { if(is_null($this->logger)) { $this->logger = new NullLogger(); } return $this->logger; } } ## Instruction: Add return types to trait methods ## Code After: <?php namespace DanDMartin\LoggerAware\Traits; use Psr\Log\LoggerInterface as PsrLogger; use DanDMartin\LoggerAware\Logger\NullLogger; trait LoggerAware { /** * @var PsrLogger */ protected $logger; /** * @param PsrLogger $l * @required */ public function setLogger(PsrLogger $l): void { $this->logger = $l; } /** * @return PsrLogger */ public function getLogger(): PsrLogger { if(is_null($this->logger)) { $this->logger = new NullLogger(); } return $this->logger; } }
b007ffd1e8d5d62d01f27d036c17a4f26520829e
dotfiles/vscode/.config/Code/User/cSpell-dictionaries/mathTerms-en.txt
dotfiles/vscode/.config/Code/User/cSpell-dictionaries/mathTerms-en.txt
categorial coequalizer coequalizers colimit colimits componentwise coproduct coproducts cospan cospans disabling disablings epi epimorphism epimorphisms epis finitary hyperedge hyperedges hypergraph hypergraphs monic mono monoid monoids monomorphism monomorphisms monos overlappings postcomposing preimage preimages pullback pullbacks pushout pushouts subgraph subgraphs subobject subobjects surjective topos toposes
categorial codomain codomains coequalizer coequalizers colimit colimits componentwise coproduct coproducts cospan cospans disabling disablings domain domains epi epimorphism epimorphisms epis finitary hyperedge hyperedges hypergraph hypergraphs monic mono monoid monoids monomorphism monomorphisms monos overlappings postcomposing preimage preimages presheaf presheaves pullback pullbacks pushout pushouts subgraph subgraphs subobject subobjects surjective topos toposes
Improve VS code spell-check for math
Improve VS code spell-check for math
Text
bsd-3-clause
ggazzi/linux-configs
text
## Code Before: categorial coequalizer coequalizers colimit colimits componentwise coproduct coproducts cospan cospans disabling disablings epi epimorphism epimorphisms epis finitary hyperedge hyperedges hypergraph hypergraphs monic mono monoid monoids monomorphism monomorphisms monos overlappings postcomposing preimage preimages pullback pullbacks pushout pushouts subgraph subgraphs subobject subobjects surjective topos toposes ## Instruction: Improve VS code spell-check for math ## Code After: categorial codomain codomains coequalizer coequalizers colimit colimits componentwise coproduct coproducts cospan cospans disabling disablings domain domains epi epimorphism epimorphisms epis finitary hyperedge hyperedges hypergraph hypergraphs monic mono monoid monoids monomorphism monomorphisms monos overlappings postcomposing preimage preimages presheaf presheaves pullback pullbacks pushout pushouts subgraph subgraphs subobject subobjects surjective topos toposes
54fa05b3dbe2c28d8dfe68c0405e598154135abc
app/scripts/configs/modes/public-brokerage.js
app/scripts/configs/modes/public-brokerage.js
'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modePublicBrokerage', toBeFeatures: [ 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups' ], featuresVisible: false });
'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modePublicBrokerage', toBeFeatures: [ 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups' ], featuresVisible: false });
Enable eventlog in public brokerage mode (SAAS-840)
Enable eventlog in public brokerage mode (SAAS-840)
JavaScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
javascript
## Code Before: 'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modePublicBrokerage', toBeFeatures: [ 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups' ], featuresVisible: false }); ## Instruction: Enable eventlog in public brokerage mode (SAAS-840) ## Code After: 'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modePublicBrokerage', toBeFeatures: [ 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups' ], featuresVisible: false });
8c2ce065ea41ab30156f9a8b1f18a28bc388d325
doc/abs.txt
doc/abs.txt
PLplot is a library of C functions that are useful for making scientific plots from a program written in C or Fortran. The PLplot library can be used to create standard x-y plots, semilog plots, log-log plots, contour plots, 3D plots, mesh plots, bar charts and pie charts. Multiple graphs (of the same or different sizes) may be placed on a single page with multiple lines in each graph. There are almost 2000 characters in the extended character set. This includes four different fonts, the Greek alphabet and a host of mathematical, musical, and other symbols. A variety of output devices are supported and new devices can be easily added by writing a small number of device dependent routines. PLplot is in the public domain, so you can distribute it freely. It is currently known to work on the following systems: SUNOS, A/IX, DG/UX, UNICOS, CTSS, VMS, Amiga/Exec, MS-DOS, OS/2, and NeXT, with more expected.
PLplot is a library of C functions that are useful for making scientific plots from a program written in C or Fortran. The PLplot library can be used to create standard x-y plots, semilog plots, log-log plots, contour plots, 3D plots, mesh plots, bar charts and pie charts. Multiple graphs (of the same or different sizes) may be placed on a single page with multiple lines in each graph. There are almost 2000 characters in the extended character set. This includes four different fonts, the Greek alphabet and a host of mathematical, musical, and other symbols. A variety of output devices are supported and new devices can be easily added by writing a small number of device dependent routines. PLplot is free software primarily licensed under the LGPL (see http://www.gnu.org/licenses/lgpl.html). It is currently known to work on the following systems: Linux, SUNOS, Mac OSX, IRIX, Cygwin, Windows, and MS-DOS, with more expected.
Change wording at end to get licensing right (PLplot is not public domain!) and to modernize the list of systems where it works.
Change wording at end to get licensing right (PLplot is not public domain!) and to modernize the list of systems where it works. svn path=/trunk/; revision=5860
Text
lgpl-2.1
FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot,FreeScienceCommunity/PLPlot
text
## Code Before: PLplot is a library of C functions that are useful for making scientific plots from a program written in C or Fortran. The PLplot library can be used to create standard x-y plots, semilog plots, log-log plots, contour plots, 3D plots, mesh plots, bar charts and pie charts. Multiple graphs (of the same or different sizes) may be placed on a single page with multiple lines in each graph. There are almost 2000 characters in the extended character set. This includes four different fonts, the Greek alphabet and a host of mathematical, musical, and other symbols. A variety of output devices are supported and new devices can be easily added by writing a small number of device dependent routines. PLplot is in the public domain, so you can distribute it freely. It is currently known to work on the following systems: SUNOS, A/IX, DG/UX, UNICOS, CTSS, VMS, Amiga/Exec, MS-DOS, OS/2, and NeXT, with more expected. ## Instruction: Change wording at end to get licensing right (PLplot is not public domain!) and to modernize the list of systems where it works. svn path=/trunk/; revision=5860 ## Code After: PLplot is a library of C functions that are useful for making scientific plots from a program written in C or Fortran. The PLplot library can be used to create standard x-y plots, semilog plots, log-log plots, contour plots, 3D plots, mesh plots, bar charts and pie charts. Multiple graphs (of the same or different sizes) may be placed on a single page with multiple lines in each graph. There are almost 2000 characters in the extended character set. This includes four different fonts, the Greek alphabet and a host of mathematical, musical, and other symbols. A variety of output devices are supported and new devices can be easily added by writing a small number of device dependent routines. PLplot is free software primarily licensed under the LGPL (see http://www.gnu.org/licenses/lgpl.html). It is currently known to work on the following systems: Linux, SUNOS, Mac OSX, IRIX, Cygwin, Windows, and MS-DOS, with more expected.
c8a374e409e83c685825e5822826e6378acb8c3a
README.md
README.md
CMS for National Ugly Mugs
[![Build Status](https://travis-ci.org/uglymugs/JustNUM.svg?branch=master)](https://travis-ci.org/uglymugs/JustNUM) [![Coverage Status](https://coveralls.io/repos/github/uglymugs/JustNUM/badge.svg?branch=master)](https://coveralls.io/github/uglymugs/JustNUM?branch=master) CMS for National Ugly Mugs
Add build and coverage badges
Add build and coverage badges
Markdown
unlicense
uglymugs/JustNUM,uglymugs/JustNUM
markdown
## Code Before: CMS for National Ugly Mugs ## Instruction: Add build and coverage badges ## Code After: [![Build Status](https://travis-ci.org/uglymugs/JustNUM.svg?branch=master)](https://travis-ci.org/uglymugs/JustNUM) [![Coverage Status](https://coveralls.io/repos/github/uglymugs/JustNUM/badge.svg?branch=master)](https://coveralls.io/github/uglymugs/JustNUM?branch=master) CMS for National Ugly Mugs
2be23a9eab25d53bafd000f830605da49ffa3a72
home/energy/us/state/itemdef.csv
home/energy/us/state/itemdef.csv
name,Energy US State,,, algFile,default.js name,path,type,isDataItemValue,isDrillDown kWh Per Month,kWhPerMonth,DECIMAL,FALSE,FALSE State,state,TEXT,TRUE,TRUE kg CO2 per kWh,kgCO2PerkWh,DECIMAL,TRUE,FALSE Source,source,TEXT,TRUE,FALSE
name,Energy US State algFile,default.js name,path,type,isDataItemValue,isDrillDown,unit,perUnit,default,choices kWh Per Month,kWhPerMonth,DECIMAL,false,false,,,, State,state,TEXT,true,true,,,, kg CO2 per kWh,kgCO2PerkWh,DECIMAL,true,false,,,, Source,source,TEXT,true,false,,,,
Add missing (empty) values to Energy US State item def.
Add missing (empty) values to Energy US State item def.
CSV
mit
OpenAMEE/datasets
csv
## Code Before: name,Energy US State,,, algFile,default.js name,path,type,isDataItemValue,isDrillDown kWh Per Month,kWhPerMonth,DECIMAL,FALSE,FALSE State,state,TEXT,TRUE,TRUE kg CO2 per kWh,kgCO2PerkWh,DECIMAL,TRUE,FALSE Source,source,TEXT,TRUE,FALSE ## Instruction: Add missing (empty) values to Energy US State item def. ## Code After: name,Energy US State algFile,default.js name,path,type,isDataItemValue,isDrillDown,unit,perUnit,default,choices kWh Per Month,kWhPerMonth,DECIMAL,false,false,,,, State,state,TEXT,true,true,,,, kg CO2 per kWh,kgCO2PerkWh,DECIMAL,true,false,,,, Source,source,TEXT,true,false,,,,
6d11fe3774ad16f29b5f099cdb2dc82ff33db66e
macosx/scripts/iTunes/mobile-speakers.applescript
macosx/scripts/iTunes/mobile-speakers.applescript
(* Script object to make calling a defined function easier while in the iTunes and System Events name space. *) script remoteSpeakerFinder -- Given a list of buttons, find the remote speakers button -- by finding the first button with a name that isn't in a -- rejection list. on findCorrectButton (in_buttons) set buttons_to_skip to {"Burn Disc"} repeat with a_button in in_buttons try -- some buttons don't have names set the_name to name of a_button if buttons_to_skip does not contain {the_name} then return the_name end if end try end repeat return 16 -- default response end findCorrectButton end script (* Tell iTunes to use the "Mobile" set of remote speakers. *) tell application "System Events" tell process "iTunes" set the_buttons to (get buttons of window 1) set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons)) -- Switch to the speakers in my bedroom set frontmost to true click button the_speaker_button of window 1 key code 115 -- Home Key (first speaker in list) key code 125 -- Down Arrow key code 125 -- Down Arrow key code 36 -- Return Key end tell end tell
(* Script object to make calling a defined function easier while in the iTunes and System Events name space. *) script remoteSpeakerFinder -- Given a list of buttons, find the remote speakers button -- by finding the first button with a name that isn't in a -- rejection list. on findCorrectButton (in_buttons) set buttons_to_skip to {"Burn Disc"} repeat with a_button in in_buttons try -- some buttons don't have names set the_name to name of a_button if buttons_to_skip does not contain {the_name} then return the_name end if end try end repeat return 16 -- default response end findCorrectButton end script (* Tell iTunes to use the "Mobile" set of remote speakers. *) tell application "System Events" tell process "iTunes" set the_buttons to (get buttons of window 1) set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons)) -- Switch to the speakers in my bedroom set frontmost to true click button the_speaker_button of window 1 key code 115 -- Home Key (first speaker in list) key code 125 -- Down Arrow key code 125 -- Down Arrow key code 36 -- Return Key -- Wait for iTunes to connect to the speakers delay 5 end tell end tell
Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers
Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers
AppleScript
bsd-3-clause
pjones/emacsrc
applescript
## Code Before: (* Script object to make calling a defined function easier while in the iTunes and System Events name space. *) script remoteSpeakerFinder -- Given a list of buttons, find the remote speakers button -- by finding the first button with a name that isn't in a -- rejection list. on findCorrectButton (in_buttons) set buttons_to_skip to {"Burn Disc"} repeat with a_button in in_buttons try -- some buttons don't have names set the_name to name of a_button if buttons_to_skip does not contain {the_name} then return the_name end if end try end repeat return 16 -- default response end findCorrectButton end script (* Tell iTunes to use the "Mobile" set of remote speakers. *) tell application "System Events" tell process "iTunes" set the_buttons to (get buttons of window 1) set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons)) -- Switch to the speakers in my bedroom set frontmost to true click button the_speaker_button of window 1 key code 115 -- Home Key (first speaker in list) key code 125 -- Down Arrow key code 125 -- Down Arrow key code 36 -- Return Key end tell end tell ## Instruction: Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers ## Code After: (* Script object to make calling a defined function easier while in the iTunes and System Events name space. *) script remoteSpeakerFinder -- Given a list of buttons, find the remote speakers button -- by finding the first button with a name that isn't in a -- rejection list. on findCorrectButton (in_buttons) set buttons_to_skip to {"Burn Disc"} repeat with a_button in in_buttons try -- some buttons don't have names set the_name to name of a_button if buttons_to_skip does not contain {the_name} then return the_name end if end try end repeat return 16 -- default response end findCorrectButton end script (* Tell iTunes to use the "Mobile" set of remote speakers. *) tell application "System Events" tell process "iTunes" set the_buttons to (get buttons of window 1) set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons)) -- Switch to the speakers in my bedroom set frontmost to true click button the_speaker_button of window 1 key code 115 -- Home Key (first speaker in list) key code 125 -- Down Arrow key code 125 -- Down Arrow key code 36 -- Return Key -- Wait for iTunes to connect to the speakers delay 5 end tell end tell
8a2db1247ec45d86e738aadfa0f591ad56d17948
source/api_reference.rst
source/api_reference.rst
.. _api-reference: API Reference ############## .. toctree:: api-intro api-sending api-domains api-stats api-events api-suppressions api-routes api-webhooks api-mailinglists api-email-validation
.. _api-reference: API Reference ############## .. toctree:: api-intro api-sending api-domains api-events api-stats api-tags api-suppressions api-routes api-webhooks api-mailinglists api-email-validation
Add tags API ref to the nav
Add tags API ref to the nav
reStructuredText
mit
mailgun/documentation,mailgun/documentation,mailgun/documentation
restructuredtext
## Code Before: .. _api-reference: API Reference ############## .. toctree:: api-intro api-sending api-domains api-stats api-events api-suppressions api-routes api-webhooks api-mailinglists api-email-validation ## Instruction: Add tags API ref to the nav ## Code After: .. _api-reference: API Reference ############## .. toctree:: api-intro api-sending api-domains api-events api-stats api-tags api-suppressions api-routes api-webhooks api-mailinglists api-email-validation
cc9cae41e368e6834190c0316a9425b6bcba6ecd
src/main/java/de/craften/plugins/educraft/luaapi/functions/MoveForwardFunction.java
src/main/java/de/craften/plugins/educraft/luaapi/functions/MoveForwardFunction.java
package de.craften.plugins.educraft.luaapi.functions; import de.craften.plugins.educraft.luaapi.EduCraftApiFunction; import org.bukkit.Location; import org.bukkit.block.BlockFace; import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; /** * Lua API function to move one block forward. */ public class MoveForwardFunction extends EduCraftApiFunction { @Override public Varargs execute(Varargs varargs) { Location targetLocation = getApi().getStationaryBehavior().getLocation().clone().add(getApi().getDirection()); if (!targetLocation.getBlock().getType().isSolid() && !targetLocation.getBlock().getRelative(BlockFace.UP).getType().isSolid()) { getApi().getStationaryBehavior().setLocation(targetLocation); } return LuaValue.NIL; } }
package de.craften.plugins.educraft.luaapi.functions; import de.craften.plugins.educraft.luaapi.EduCraftApiFunction; import org.bukkit.Location; import org.bukkit.block.BlockFace; import org.bukkit.entity.Entity; import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; import java.util.Collection; /** * Lua API function to move one block forward. */ public class MoveForwardFunction extends EduCraftApiFunction { @Override public Varargs execute(Varargs varargs) { Location targetLocation = getApi().getStationaryBehavior().getLocation().clone().add(getApi().getDirection()); Collection<Entity> entities = targetLocation.getWorld().getNearbyEntities(targetLocation.getBlock().getLocation().add(0.5, 0.5, 0.5), 0.5, 0.5, 0.5); if (!targetLocation.getBlock().getType().isSolid() && !targetLocation.getBlock().getRelative(BlockFace.UP).getType().isSolid() && entities.isEmpty()) { getApi().getStationaryBehavior().setLocation(targetLocation); } return LuaValue.NIL; } }
Check for entities ahead before moving forward.
Check for entities ahead before moving forward.
Java
mit
leMaik/EduCraft
java
## Code Before: package de.craften.plugins.educraft.luaapi.functions; import de.craften.plugins.educraft.luaapi.EduCraftApiFunction; import org.bukkit.Location; import org.bukkit.block.BlockFace; import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; /** * Lua API function to move one block forward. */ public class MoveForwardFunction extends EduCraftApiFunction { @Override public Varargs execute(Varargs varargs) { Location targetLocation = getApi().getStationaryBehavior().getLocation().clone().add(getApi().getDirection()); if (!targetLocation.getBlock().getType().isSolid() && !targetLocation.getBlock().getRelative(BlockFace.UP).getType().isSolid()) { getApi().getStationaryBehavior().setLocation(targetLocation); } return LuaValue.NIL; } } ## Instruction: Check for entities ahead before moving forward. ## Code After: package de.craften.plugins.educraft.luaapi.functions; import de.craften.plugins.educraft.luaapi.EduCraftApiFunction; import org.bukkit.Location; import org.bukkit.block.BlockFace; import org.bukkit.entity.Entity; import org.luaj.vm2.LuaValue; import org.luaj.vm2.Varargs; import java.util.Collection; /** * Lua API function to move one block forward. */ public class MoveForwardFunction extends EduCraftApiFunction { @Override public Varargs execute(Varargs varargs) { Location targetLocation = getApi().getStationaryBehavior().getLocation().clone().add(getApi().getDirection()); Collection<Entity> entities = targetLocation.getWorld().getNearbyEntities(targetLocation.getBlock().getLocation().add(0.5, 0.5, 0.5), 0.5, 0.5, 0.5); if (!targetLocation.getBlock().getType().isSolid() && !targetLocation.getBlock().getRelative(BlockFace.UP).getType().isSolid() && entities.isEmpty()) { getApi().getStationaryBehavior().setLocation(targetLocation); } return LuaValue.NIL; } }
0a249892a80422e2d919ae1049e2cccfb8adccbb
modules/preferences/src/appleMain/kotlin/splitties/preferences/Changes.kt
modules/preferences/src/appleMain/kotlin/splitties/preferences/Changes.kt
/* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ package splitties.preferences import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.channelFlow import kotlinx.coroutines.flow.conflate import platform.Foundation.NSNotificationCenter import platform.Foundation.NSUserDefaultsDidChangeNotification @UseExperimental(ExperimentalCoroutinesApi::class) internal actual fun SharedPreferences.changesFlow( key: String, emitAfterRegister: Boolean ): Flow<Unit> = channelFlow<Unit> { if (this@changesFlow is NSUserDefaultsBackedSharedPreferences && useNotificationCenterForChanges ) { val defaultNotificationCenter = NSNotificationCenter.defaultCenter val observer = defaultNotificationCenter.addObserverForName( name = NSUserDefaultsDidChangeNotification, `object` = userDefaults, queue = null ) { runCatching { offer(Unit) } } if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { defaultNotificationCenter.removeObserver(observer) } } else { val listener = OnSharedPreferenceChangeListener { _, changedKey -> if (key == changedKey) runCatching { offer(Unit) } } registerOnSharedPreferenceChangeListener(listener) if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { unregisterOnSharedPreferenceChangeListener(listener) } } }.conflate()
/* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ package splitties.preferences import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.channelFlow import kotlinx.coroutines.flow.conflate import platform.Foundation.NSNotificationCenter import platform.Foundation.NSOperationQueue import platform.Foundation.NSUserDefaultsDidChangeNotification import splitties.mainthread.isMainThread @UseExperimental(ExperimentalCoroutinesApi::class) internal actual fun SharedPreferences.changesFlow( key: String, emitAfterRegister: Boolean ): Flow<Unit> = channelFlow<Unit> { if (this@changesFlow is NSUserDefaultsBackedSharedPreferences && useNotificationCenterForChanges ) { val defaultNotificationCenter = NSNotificationCenter.defaultCenter val observer = defaultNotificationCenter.addObserverForName( name = NSUserDefaultsDidChangeNotification, `object` = userDefaults, queue = if (isMainThread) NSOperationQueue.mainQueue else null ) { runCatching { offer(Unit) } } if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { defaultNotificationCenter.removeObserver(observer) } } else { val listener = OnSharedPreferenceChangeListener { _, changedKey -> if (key == changedKey) runCatching { offer(Unit) } } registerOnSharedPreferenceChangeListener(listener) if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { unregisterOnSharedPreferenceChangeListener(listener) } } }.conflate()
Use NSOperationQueue.mainQueue if on main thread
Use NSOperationQueue.mainQueue if on main thread
Kotlin
apache-2.0
LouisCAD/Splitties,LouisCAD/Splitties,LouisCAD/Splitties
kotlin
## Code Before: /* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ package splitties.preferences import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.channelFlow import kotlinx.coroutines.flow.conflate import platform.Foundation.NSNotificationCenter import platform.Foundation.NSUserDefaultsDidChangeNotification @UseExperimental(ExperimentalCoroutinesApi::class) internal actual fun SharedPreferences.changesFlow( key: String, emitAfterRegister: Boolean ): Flow<Unit> = channelFlow<Unit> { if (this@changesFlow is NSUserDefaultsBackedSharedPreferences && useNotificationCenterForChanges ) { val defaultNotificationCenter = NSNotificationCenter.defaultCenter val observer = defaultNotificationCenter.addObserverForName( name = NSUserDefaultsDidChangeNotification, `object` = userDefaults, queue = null ) { runCatching { offer(Unit) } } if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { defaultNotificationCenter.removeObserver(observer) } } else { val listener = OnSharedPreferenceChangeListener { _, changedKey -> if (key == changedKey) runCatching { offer(Unit) } } registerOnSharedPreferenceChangeListener(listener) if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { unregisterOnSharedPreferenceChangeListener(listener) } } }.conflate() ## Instruction: Use NSOperationQueue.mainQueue if on main thread ## Code After: /* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ package splitties.preferences import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.channelFlow import kotlinx.coroutines.flow.conflate import platform.Foundation.NSNotificationCenter import platform.Foundation.NSOperationQueue import platform.Foundation.NSUserDefaultsDidChangeNotification import splitties.mainthread.isMainThread @UseExperimental(ExperimentalCoroutinesApi::class) internal actual fun SharedPreferences.changesFlow( key: String, emitAfterRegister: Boolean ): Flow<Unit> = channelFlow<Unit> { if (this@changesFlow is NSUserDefaultsBackedSharedPreferences && useNotificationCenterForChanges ) { val defaultNotificationCenter = NSNotificationCenter.defaultCenter val observer = defaultNotificationCenter.addObserverForName( name = NSUserDefaultsDidChangeNotification, `object` = userDefaults, queue = if (isMainThread) NSOperationQueue.mainQueue else null ) { runCatching { offer(Unit) } } if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { defaultNotificationCenter.removeObserver(observer) } } else { val listener = OnSharedPreferenceChangeListener { _, changedKey -> if (key == changedKey) runCatching { offer(Unit) } } registerOnSharedPreferenceChangeListener(listener) if (emitAfterRegister) runCatching { offer(Unit) } awaitClose { unregisterOnSharedPreferenceChangeListener(listener) } } }.conflate()
9b38a5b7a5ad7a95e1f6d14c609b2d3b0cf931b9
lib/node_modules/@stdlib/math/base/special/max/docs/repl.txt
lib/node_modules/@stdlib/math/base/special/max/docs/repl.txt
{{alias}}( [x[, y[, ...args]]] ) Returns the maximum value. If any argument is `NaN`, the function returns `NaN`. If not provided any arguments, the function returns `-infinity`. When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, negative infinity is the identity element for the maximum, and thus, `{{alias}}() = -infinity`. Parameters ---------- x: number (optional) First number. y: number (optional) Second number. args: ...double (optional) Numbers. Returns ------- out: number Maximum value. Examples -------- > var v = {{alias}}( 3.14, 4.2 ) 4.2 > v = {{alias}}( 5.9, 3.14, 4.2 ) 5.9 > v = {{alias}}( 3.14, NaN ) NaN > v = {{alias}}( +0.0, -0.0 ) +0.0 See Also --------
{{alias}}( [x[, y[, ...args]]] ) Returns the maximum value. If any argument is `NaN`, the function returns `NaN`. When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, negative infinity is the identity element for the maximum, and thus, if not provided any arguments, the function returns `-infinity`. Parameters ---------- x: number (optional) First number. y: number (optional) Second number. args: ...number (optional) Numbers. Returns ------- out: number Maximum value. Examples -------- > var v = {{alias}}( 3.14, 4.2 ) 4.2 > v = {{alias}}( 5.9, 3.14, 4.2 ) 5.9 > v = {{alias}}( 3.14, NaN ) NaN > v = {{alias}}( +0.0, -0.0 ) +0.0 See Also --------
Update note and fix parameter type
Update note and fix parameter type
Text
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
text
## Code Before: {{alias}}( [x[, y[, ...args]]] ) Returns the maximum value. If any argument is `NaN`, the function returns `NaN`. If not provided any arguments, the function returns `-infinity`. When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, negative infinity is the identity element for the maximum, and thus, `{{alias}}() = -infinity`. Parameters ---------- x: number (optional) First number. y: number (optional) Second number. args: ...double (optional) Numbers. Returns ------- out: number Maximum value. Examples -------- > var v = {{alias}}( 3.14, 4.2 ) 4.2 > v = {{alias}}( 5.9, 3.14, 4.2 ) 5.9 > v = {{alias}}( 3.14, NaN ) NaN > v = {{alias}}( +0.0, -0.0 ) +0.0 See Also -------- ## Instruction: Update note and fix parameter type ## Code After: {{alias}}( [x[, y[, ...args]]] ) Returns the maximum value. If any argument is `NaN`, the function returns `NaN`. When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), negative infinity is the least upper bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, negative infinity is the identity element for the maximum, and thus, if not provided any arguments, the function returns `-infinity`. Parameters ---------- x: number (optional) First number. y: number (optional) Second number. args: ...number (optional) Numbers. Returns ------- out: number Maximum value. Examples -------- > var v = {{alias}}( 3.14, 4.2 ) 4.2 > v = {{alias}}( 5.9, 3.14, 4.2 ) 5.9 > v = {{alias}}( 3.14, NaN ) NaN > v = {{alias}}( +0.0, -0.0 ) +0.0 See Also --------
00768787511b0e1c4d0da264fdaafc30d820563f
.travis.yml
.travis.yml
language: ruby rvm: - 2.2.2 - 2.3 - 2.4 - 2.5 - 2.6 before_install: gem install bundler -v 1.11.2 addons: code_climate: repo_token: 0b8e41ecbc26637a7db4e6e9d4581c445441674f689016ab45fb5c51242b59bf after_success: - bundle exec codeclimate-test-reporter
language: ruby rvm: - 2.4 - 2.5 - 2.6 before_install: gem install bundler -v 1.11.2 addons: code_climate: repo_token: 0b8e41ecbc26637a7db4e6e9d4581c445441674f689016ab45fb5c51242b59bf after_success: - bundle exec codeclimate-test-reporter
Support ruby 2.4 and up
Support ruby 2.4 and up
YAML
mit
maartenvanvliet/moneybird,maartenvanvliet/moneybird
yaml
## Code Before: language: ruby rvm: - 2.2.2 - 2.3 - 2.4 - 2.5 - 2.6 before_install: gem install bundler -v 1.11.2 addons: code_climate: repo_token: 0b8e41ecbc26637a7db4e6e9d4581c445441674f689016ab45fb5c51242b59bf after_success: - bundle exec codeclimate-test-reporter ## Instruction: Support ruby 2.4 and up ## Code After: language: ruby rvm: - 2.4 - 2.5 - 2.6 before_install: gem install bundler -v 1.11.2 addons: code_climate: repo_token: 0b8e41ecbc26637a7db4e6e9d4581c445441674f689016ab45fb5c51242b59bf after_success: - bundle exec codeclimate-test-reporter
10782310cfee0d2c2938748056f6549b5918b969
src/sentry/debug/utils/patch_context.py
src/sentry/debug/utils/patch_context.py
from __future__ import absolute_import from sentry.utils.imports import import_string class PatchContext(object): def __init__(self, target, callback): target, attr = target.rsplit('.', 1) target = import_string(target) self.func = getattr(target, attr) self.target = target self.attr = attr self.callback = callback def __enter__(self): self.patch() return self def __exit__(self, exc_type, exc_value, traceback): self.unpatch() def patch(self): func = getattr(self.target, self.attr) def wrapped(*args, **kwargs): __traceback_hide__ = True # NOQA return self.callback(self.func, *args, **kwargs) wrapped.__name__ = func.__name__ if hasattr(func, '__doc__'): wrapped.__doc__ = func.__doc__ if hasattr(func, '__module__'): wrapped.__module__ = func.__module__ setattr(self.target, self.attr, wrapped) def unpatch(self): setattr(self.target, self.attr, self.func)
from __future__ import absolute_import from threading import Lock from sentry.utils.imports import import_string class PatchContext(object): def __init__(self, target, callback): target, attr = target.rsplit('.', 1) target = import_string(target) self.target = target self.attr = attr self.callback = callback self._lock = Lock() with self._lock: self.func = getattr(target, attr) def __enter__(self): self.patch() return self def __exit__(self, exc_type, exc_value, traceback): self.unpatch() def patch(self): with self._lock: func = getattr(self.target, self.attr) def wrapped(*args, **kwargs): __traceback_hide__ = True # NOQA return self.callback(self.func, *args, **kwargs) wrapped.__name__ = func.__name__ if hasattr(func, '__doc__'): wrapped.__doc__ = func.__doc__ if hasattr(func, '__module__'): wrapped.__module__ = func.__module__ setattr(self.target, self.attr, wrapped) def unpatch(self): with self._lock: setattr(self.target, self.attr, self.func)
Use a thread lock to patch contexts.
Use a thread lock to patch contexts. This fixes #3185
Python
bsd-3-clause
looker/sentry,zenefits/sentry,mvaled/sentry,alexm92/sentry,alexm92/sentry,looker/sentry,gencer/sentry,ifduyue/sentry,jean/sentry,JackDanger/sentry,JackDanger/sentry,ifduyue/sentry,BuildingLink/sentry,gencer/sentry,beeftornado/sentry,BuildingLink/sentry,mvaled/sentry,JamesMura/sentry,jean/sentry,zenefits/sentry,zenefits/sentry,mvaled/sentry,mvaled/sentry,jean/sentry,JamesMura/sentry,zenefits/sentry,mvaled/sentry,JamesMura/sentry,fotinakis/sentry,ifduyue/sentry,gencer/sentry,JackDanger/sentry,mitsuhiko/sentry,jean/sentry,zenefits/sentry,mvaled/sentry,gencer/sentry,BuildingLink/sentry,fotinakis/sentry,JamesMura/sentry,mitsuhiko/sentry,beeftornado/sentry,beeftornado/sentry,fotinakis/sentry,ifduyue/sentry,alexm92/sentry,BuildingLink/sentry,JamesMura/sentry,looker/sentry,gencer/sentry,looker/sentry,fotinakis/sentry,looker/sentry,BuildingLink/sentry,ifduyue/sentry,jean/sentry
python
## Code Before: from __future__ import absolute_import from sentry.utils.imports import import_string class PatchContext(object): def __init__(self, target, callback): target, attr = target.rsplit('.', 1) target = import_string(target) self.func = getattr(target, attr) self.target = target self.attr = attr self.callback = callback def __enter__(self): self.patch() return self def __exit__(self, exc_type, exc_value, traceback): self.unpatch() def patch(self): func = getattr(self.target, self.attr) def wrapped(*args, **kwargs): __traceback_hide__ = True # NOQA return self.callback(self.func, *args, **kwargs) wrapped.__name__ = func.__name__ if hasattr(func, '__doc__'): wrapped.__doc__ = func.__doc__ if hasattr(func, '__module__'): wrapped.__module__ = func.__module__ setattr(self.target, self.attr, wrapped) def unpatch(self): setattr(self.target, self.attr, self.func) ## Instruction: Use a thread lock to patch contexts. This fixes #3185 ## Code After: from __future__ import absolute_import from threading import Lock from sentry.utils.imports import import_string class PatchContext(object): def __init__(self, target, callback): target, attr = target.rsplit('.', 1) target = import_string(target) self.target = target self.attr = attr self.callback = callback self._lock = Lock() with self._lock: self.func = getattr(target, attr) def __enter__(self): self.patch() return self def __exit__(self, exc_type, exc_value, traceback): self.unpatch() def patch(self): with self._lock: func = getattr(self.target, self.attr) def wrapped(*args, **kwargs): __traceback_hide__ = True # NOQA return self.callback(self.func, *args, **kwargs) wrapped.__name__ = func.__name__ if hasattr(func, '__doc__'): wrapped.__doc__ = func.__doc__ if hasattr(func, '__module__'): wrapped.__module__ = func.__module__ setattr(self.target, self.attr, wrapped) def unpatch(self): with self._lock: setattr(self.target, self.attr, self.func)
0e8072191b3460ef770c55e306ac59d7433aa715
README.md
README.md
> Sex. Almost everyone does it, but almost no one wants to talk about. It is quite the paradox when you consider how vital sex is to human life. Not only is it the act that propels our species forward, but it is also a way to bond with a romantic partner, a way to relieve the stress of daily life, not to mention an enjoyable way to pass the time. > - Justin J. Lehmiller, Ph.D. (2014), *The Psychology of Human Sexuality.* Harvard University: John Wiley & Sons. # [Wiki](https://github.com/alpha-social-club/alpha-social-development/wiki) For documentation and functional requirements description, [go to our wiki](https://github.com/alpha-social-club/alpha-social-development/wiki). Join and contribute. We appreciate it, and never will forget it.
*More information is available at [alphasocial.club](http://alphasocial.club) blog. Login: `admin / Alpha.Omega`* ## What is it? Alpha Social Club is a social environment for members to explore their sexuality in non-pornographic context. Sex is one of the most fundamental social activities. ## Key Values and Principles 1. **Sexuality is healthy.** 2. **Sexuality is private.** 3. **Privacy is absolute.** 4. **Club membership is by invitation only.** 5. **Pornographic visual media are not permitted.** 6. **Community governed.** 7. **Membership is free.** 8. **Revenue voluntary donations only.** 9. **Openness and transparency.** 10. **The club is all inclusive.** ## The Use Cases * **UC1 – Invite Someone** * **UC2 – Register** * **UC3 – Browse Listing** * **UC4 – Log In/Out** * **UC5 – Edit Profile** * **UC6 – Search** * **UC7 – Comment in Blog** * **UC8 – Participate in Forum** * **UC9 – Private Group Chat** ## Roadmap ## How to contribute ## License
Update the outline for newly revised documentation.
Update the outline for newly revised documentation.
Markdown
mit
Alpha-Directorate/AlphaSSS,Alpha-Directorate/AlphaSSS,Alpha-Directorate/AlphaSSS,Alpha-Directorate/AlphaSSS
markdown
## Code Before: > Sex. Almost everyone does it, but almost no one wants to talk about. It is quite the paradox when you consider how vital sex is to human life. Not only is it the act that propels our species forward, but it is also a way to bond with a romantic partner, a way to relieve the stress of daily life, not to mention an enjoyable way to pass the time. > - Justin J. Lehmiller, Ph.D. (2014), *The Psychology of Human Sexuality.* Harvard University: John Wiley & Sons. # [Wiki](https://github.com/alpha-social-club/alpha-social-development/wiki) For documentation and functional requirements description, [go to our wiki](https://github.com/alpha-social-club/alpha-social-development/wiki). Join and contribute. We appreciate it, and never will forget it. ## Instruction: Update the outline for newly revised documentation. ## Code After: *More information is available at [alphasocial.club](http://alphasocial.club) blog. Login: `admin / Alpha.Omega`* ## What is it? Alpha Social Club is a social environment for members to explore their sexuality in non-pornographic context. Sex is one of the most fundamental social activities. ## Key Values and Principles 1. **Sexuality is healthy.** 2. **Sexuality is private.** 3. **Privacy is absolute.** 4. **Club membership is by invitation only.** 5. **Pornographic visual media are not permitted.** 6. **Community governed.** 7. **Membership is free.** 8. **Revenue voluntary donations only.** 9. **Openness and transparency.** 10. **The club is all inclusive.** ## The Use Cases * **UC1 – Invite Someone** * **UC2 – Register** * **UC3 – Browse Listing** * **UC4 – Log In/Out** * **UC5 – Edit Profile** * **UC6 – Search** * **UC7 – Comment in Blog** * **UC8 – Participate in Forum** * **UC9 – Private Group Chat** ## Roadmap ## How to contribute ## License
d5f5f1fa29a2f6b8313fe8776cb8e9173a34c2da
tests/phpunit.xml
tests/phpunit.xml
<?xml version="1.0"?> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" bootstrap="./bootstrap.php" verbose="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> <coverage processUncoveredFiles="false"> <include> <directory suffix=".php">../src/</directory> </include> <report> <html outputDirectory="../build/coverage"/> </report> </coverage> <testsuite name="PHP SMS Test Suite"> <directory>./</directory> </testsuite> <listeners> <listener class="VCR\PHPUnit\TestListener\VCRTestListener" file="vendor/php-vcr/phpunit-testlistener-vcr/src/VCRTestListener.php"/> </listeners> </phpunit>
<?xml version="1.0"?> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" bootstrap="./bootstrap.php" verbose="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> <coverage processUncoveredFiles="false"> <include> <directory suffix=".php">../src/</directory> </include> <report> <html outputDirectory="../build/coverage"/> </report> </coverage> <testsuite name="PHP SMS Test Suite"> <directory>./</directory> </testsuite> <listeners> <listener class="VCR\PHPUnit\TestListener\VCRTestListener" file="vendor/covergenius/phpunit-testlistener-vcr/src/VCRTestListener.php"/> </listeners> </phpunit>
Fix the location of VCRTestListener.php
Fix the location of VCRTestListener.php
XML
mit
jacques/php-sms
xml
## Code Before: <?xml version="1.0"?> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" bootstrap="./bootstrap.php" verbose="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> <coverage processUncoveredFiles="false"> <include> <directory suffix=".php">../src/</directory> </include> <report> <html outputDirectory="../build/coverage"/> </report> </coverage> <testsuite name="PHP SMS Test Suite"> <directory>./</directory> </testsuite> <listeners> <listener class="VCR\PHPUnit\TestListener\VCRTestListener" file="vendor/php-vcr/phpunit-testlistener-vcr/src/VCRTestListener.php"/> </listeners> </phpunit> ## Instruction: Fix the location of VCRTestListener.php ## Code After: <?xml version="1.0"?> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" bootstrap="./bootstrap.php" verbose="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> <coverage processUncoveredFiles="false"> <include> <directory suffix=".php">../src/</directory> </include> <report> <html outputDirectory="../build/coverage"/> </report> </coverage> <testsuite name="PHP SMS Test Suite"> <directory>./</directory> </testsuite> <listeners> <listener class="VCR\PHPUnit\TestListener\VCRTestListener" file="vendor/covergenius/phpunit-testlistener-vcr/src/VCRTestListener.php"/> </listeners> </phpunit>
791e03258c53379dde587a4bf0c05e0d2bc053ad
test_tbselenium.py
test_tbselenium.py
import os import site import sys sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium')) # site.addsitedir(path.join(getcwd(), 'tor-browser-selenium')) from tbselenium.tbdriver import TorBrowserDriver with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver: driver.get('https://check.torproject.org') sleep(1) # stay one second in the page
import os import site site.addsitedir(os.path.join(os.getcwd(), 'tor-browser-selenium')) from tbselenium.tbdriver import TorBrowserDriver home_dir = os.path.expanduser('~') tbb_path = os.path.join(home_dir, 'tbb', 'tor-browser_en-US') tbb_fx_path = os.path.join(tbb_path, 'Browser', 'firefox') tbb_profile_path = os.path.join(tbb_path, 'Browser', 'TorBrowser', 'Data', 'Browser') logfile_path = os.path.join(home_dir, 'FingerprintSecureDrop', 'logging', 'firefox.log') with TorBrowserDriver(tbb_path=tbb_path, tbb_logfile_path=logfile_path) as driver: driver.get('https://check.torproject.org') time.sleep(1) # stay one second in the page
Fix test to work with patched tbdriver.py (see NOTICE in diff)
Fix test to work with patched tbdriver.py (see NOTICE in diff)
Python
agpl-3.0
freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop,freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop,freedomofpress/fingerprint-securedrop
python
## Code Before: import os import site import sys sys.path.append(os.path.join(os.getcwd(), 'tor-browser-selenium')) # site.addsitedir(path.join(getcwd(), 'tor-browser-selenium')) from tbselenium.tbdriver import TorBrowserDriver with TorBrowserDriver('~/.tb-stable/tor-browser_en-US/') as driver: driver.get('https://check.torproject.org') sleep(1) # stay one second in the page ## Instruction: Fix test to work with patched tbdriver.py (see NOTICE in diff) ## Code After: import os import site site.addsitedir(os.path.join(os.getcwd(), 'tor-browser-selenium')) from tbselenium.tbdriver import TorBrowserDriver home_dir = os.path.expanduser('~') tbb_path = os.path.join(home_dir, 'tbb', 'tor-browser_en-US') tbb_fx_path = os.path.join(tbb_path, 'Browser', 'firefox') tbb_profile_path = os.path.join(tbb_path, 'Browser', 'TorBrowser', 'Data', 'Browser') logfile_path = os.path.join(home_dir, 'FingerprintSecureDrop', 'logging', 'firefox.log') with TorBrowserDriver(tbb_path=tbb_path, tbb_logfile_path=logfile_path) as driver: driver.get('https://check.torproject.org') time.sleep(1) # stay one second in the page
6b803455aa90469840674094c22583b6772c8bc3
lib/node_modules/@stdlib/utils/deep-pluck/docs/repl.txt
lib/node_modules/@stdlib/utils/deep-pluck/docs/repl.txt
{{alias}}( arr, path[, options] ) Extracts a nested property value from each element of an object array. Parameters ---------- arr: Array Source array. path: string|Array Key path. options: Object (optional) Options. options.copy: boolean (optional) Boolean indicating whether to return new data structure. Default: false. options.sep: string (optional) Key path separator. Default: '.'. Returns ------- out: Array Destination array. Examples -------- > var arr = [ > { 'a': { 'b': { 'c': 1 } } }, > { 'a': { 'b': { 'c': 2 } } } > ]; > var out = {{alias}}( arr, 'a.b.c' ) [ 1, 2 ] > arr = [ > { 'a': [ 0, 1, 2 ] }, > { 'a': [ 3, 4, 5 ] } > ]; > out = {{alias}}( arr, [ 'a', 1 ] ) [ 1, 4 ] See Also --------
{{alias}}( arr, path[, options] ) Extracts a nested property value from each element of an object array. If a key path does not exist, the function sets the plucked value as `undefined`. Extracted values are not cloned. Parameters ---------- arr: Array Source array. path: string|Array Key path. options: Object (optional) Options. options.copy: boolean (optional) Boolean indicating whether to return a new data structure. Default: true. options.sep: string (optional) Key path separator. Default: '.'. Returns ------- out: Array Destination array. Examples -------- > var arr = [ > { 'a': { 'b': { 'c': 1 } } }, > { 'a': { 'b': { 'c': 2 } } } > ]; > var out = {{alias}}( arr, 'a.b.c' ) [ 1, 2 ] > arr = [ > { 'a': [ 0, 1, 2 ] }, > { 'a': [ 3, 4, 5 ] } > ]; > out = {{alias}}( arr, [ 'a', 1 ] ) [ 1, 4 ] See Also --------
Add notes and fix default value
Add notes and fix default value
Text
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
text
## Code Before: {{alias}}( arr, path[, options] ) Extracts a nested property value from each element of an object array. Parameters ---------- arr: Array Source array. path: string|Array Key path. options: Object (optional) Options. options.copy: boolean (optional) Boolean indicating whether to return new data structure. Default: false. options.sep: string (optional) Key path separator. Default: '.'. Returns ------- out: Array Destination array. Examples -------- > var arr = [ > { 'a': { 'b': { 'c': 1 } } }, > { 'a': { 'b': { 'c': 2 } } } > ]; > var out = {{alias}}( arr, 'a.b.c' ) [ 1, 2 ] > arr = [ > { 'a': [ 0, 1, 2 ] }, > { 'a': [ 3, 4, 5 ] } > ]; > out = {{alias}}( arr, [ 'a', 1 ] ) [ 1, 4 ] See Also -------- ## Instruction: Add notes and fix default value ## Code After: {{alias}}( arr, path[, options] ) Extracts a nested property value from each element of an object array. If a key path does not exist, the function sets the plucked value as `undefined`. Extracted values are not cloned. Parameters ---------- arr: Array Source array. path: string|Array Key path. options: Object (optional) Options. options.copy: boolean (optional) Boolean indicating whether to return a new data structure. Default: true. options.sep: string (optional) Key path separator. Default: '.'. Returns ------- out: Array Destination array. Examples -------- > var arr = [ > { 'a': { 'b': { 'c': 1 } } }, > { 'a': { 'b': { 'c': 2 } } } > ]; > var out = {{alias}}( arr, 'a.b.c' ) [ 1, 2 ] > arr = [ > { 'a': [ 0, 1, 2 ] }, > { 'a': [ 3, 4, 5 ] } > ]; > out = {{alias}}( arr, [ 'a', 1 ] ) [ 1, 4 ] See Also --------
7431bb83209e8b8cb337a246eb815d10ce377f14
modules/core/common/net.ts
modules/core/common/net.ts
import url from 'url'; import { PLATFORM } from './utils'; export const serverPort = PLATFORM === 'server' && (process.env.PORT || __SERVER_PORT__); export const isApiExternal = !!url.parse(__API_URL__).protocol; const clientApiUrl = !isApiExternal && PLATFORM !== 'server' ? `${window.location.protocol}//${window.location.hostname}${ __DEV__ ? ':8080' : window.location.port ? ':' + window.location.port : '' }${__API_URL__}` : __API_URL__; const serverApiUrl = !isApiExternal ? `http://localhost:${serverPort}${__API_URL__}` : __API_URL__; export const apiUrl = PLATFORM === 'server' ? serverApiUrl : clientApiUrl;
import url from 'url'; import { PLATFORM } from './utils'; export const serverPort = PLATFORM === 'server' && (process.env.PORT || (typeof __SERVER_PORT__ !== 'undefined' ? __SERVER_PORT__ : 8080)); export const isApiExternal = !!url.parse(__API_URL__).protocol; const clientApiUrl = !isApiExternal && PLATFORM !== 'server' ? `${window.location.protocol}//${window.location.hostname}${ __DEV__ ? ':8080' : window.location.port ? ':' + window.location.port : '' }${__API_URL__}` : __API_URL__; const serverApiUrl = !isApiExternal ? `http://localhost:${serverPort}${__API_URL__}` : __API_URL__; export const apiUrl = PLATFORM === 'server' ? serverApiUrl : clientApiUrl;
Use 8080 as default __SERVER_PORT__
Use 8080 as default __SERVER_PORT__
TypeScript
mit
sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit
typescript
## Code Before: import url from 'url'; import { PLATFORM } from './utils'; export const serverPort = PLATFORM === 'server' && (process.env.PORT || __SERVER_PORT__); export const isApiExternal = !!url.parse(__API_URL__).protocol; const clientApiUrl = !isApiExternal && PLATFORM !== 'server' ? `${window.location.protocol}//${window.location.hostname}${ __DEV__ ? ':8080' : window.location.port ? ':' + window.location.port : '' }${__API_URL__}` : __API_URL__; const serverApiUrl = !isApiExternal ? `http://localhost:${serverPort}${__API_URL__}` : __API_URL__; export const apiUrl = PLATFORM === 'server' ? serverApiUrl : clientApiUrl; ## Instruction: Use 8080 as default __SERVER_PORT__ ## Code After: import url from 'url'; import { PLATFORM } from './utils'; export const serverPort = PLATFORM === 'server' && (process.env.PORT || (typeof __SERVER_PORT__ !== 'undefined' ? __SERVER_PORT__ : 8080)); export const isApiExternal = !!url.parse(__API_URL__).protocol; const clientApiUrl = !isApiExternal && PLATFORM !== 'server' ? `${window.location.protocol}//${window.location.hostname}${ __DEV__ ? ':8080' : window.location.port ? ':' + window.location.port : '' }${__API_URL__}` : __API_URL__; const serverApiUrl = !isApiExternal ? `http://localhost:${serverPort}${__API_URL__}` : __API_URL__; export const apiUrl = PLATFORM === 'server' ? serverApiUrl : clientApiUrl;
3efbc833798658b341771974293fb04bb7eae044
README.md
README.md
byr-location ============ A Chrome extension that shows location of every post in BYR bbs. Available on Chrome Web Store: [https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd](https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd) 。 IP information comes from [pytool.sinaapp.com](http://pytool.sinaapp.com) (source code: [JohnWong/python-tool](https://github.com/JohnWong/python-tool) @ Github</a>) ### Supported BBS - http://bbs.byr.cn - http://bbs6.byr.cn - http://forum.byr.cn - http://m.byr.cn - http://bbs.byr.edu.cn - http://bbs6.byr.edu.cn - http://forum.byr.edu.cn - http://www.newsmth.net - http://m.newsmth.net ### Installatation See: https://github.com/JohnWong/byr-location/blob/master/Install.md
byr-location ============ A Chrome extension that shows location of every post in BYR bbs. Available on Chrome Web Store: [https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd](https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd) 。 ![Chrome Web Store](https://raw.githubusercontent.com/JohnWong/byr-location/docs/images/chrome-web-store.png) IP information comes from [pytool.sinaapp.com](http://pytool.sinaapp.com) (source code: [JohnWong/python-tool](https://github.com/JohnWong/python-tool) @ Github</a>) ### Supported BBS - http://bbs.byr.cn - http://bbs6.byr.cn - http://forum.byr.cn - http://m.byr.cn - http://bbs.byr.edu.cn - http://bbs6.byr.edu.cn - http://forum.byr.edu.cn - http://www.newsmth.net - http://m.newsmth.net ### Installatation See: https://github.com/JohnWong/byr-location/blob/master/Install.md
Add Chrome Web Store screenshot
Add Chrome Web Store screenshot
Markdown
apache-2.0
JohnWong/byr-location
markdown
## Code Before: byr-location ============ A Chrome extension that shows location of every post in BYR bbs. Available on Chrome Web Store: [https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd](https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd) 。 IP information comes from [pytool.sinaapp.com](http://pytool.sinaapp.com) (source code: [JohnWong/python-tool](https://github.com/JohnWong/python-tool) @ Github</a>) ### Supported BBS - http://bbs.byr.cn - http://bbs6.byr.cn - http://forum.byr.cn - http://m.byr.cn - http://bbs.byr.edu.cn - http://bbs6.byr.edu.cn - http://forum.byr.edu.cn - http://www.newsmth.net - http://m.newsmth.net ### Installatation See: https://github.com/JohnWong/byr-location/blob/master/Install.md ## Instruction: Add Chrome Web Store screenshot ## Code After: byr-location ============ A Chrome extension that shows location of every post in BYR bbs. Available on Chrome Web Store: [https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd](https://chrome.google.com/webstore/detail/byr-ip-to-location/fkgdjdphlpgcccgfaacjkchmphafhcmd) 。 ![Chrome Web Store](https://raw.githubusercontent.com/JohnWong/byr-location/docs/images/chrome-web-store.png) IP information comes from [pytool.sinaapp.com](http://pytool.sinaapp.com) (source code: [JohnWong/python-tool](https://github.com/JohnWong/python-tool) @ Github</a>) ### Supported BBS - http://bbs.byr.cn - http://bbs6.byr.cn - http://forum.byr.cn - http://m.byr.cn - http://bbs.byr.edu.cn - http://bbs6.byr.edu.cn - http://forum.byr.edu.cn - http://www.newsmth.net - http://m.newsmth.net ### Installatation See: https://github.com/JohnWong/byr-location/blob/master/Install.md
96cd5ca1fe949d7d15643c2768a65b9dc4ec81cd
app/assets/javascripts/templates/shop_variant.html.haml
app/assets/javascripts/templates/shop_variant.html.haml
.variants.row .small-3.medium-4.large-6.columns.variant-name .inline {{ ::variant.name_to_display }} .variant-unit {{ ::variant.unit_to_display }} .bulk-buy.inline{"ng-if" => "::variant.product.group_buy"} %i.ofn-i_056-bulk>< %em>< \ {{::'bulk' | t}} .small-4.medium-3.large-2.columns.variant-price -# Now in a template in app/assets/javascripts/templates ! %price-breakdown{"price-breakdown" => "_", variant: "variant", "price-breakdown-append-to-body" => "true", "price-breakdown-placement" => "left", "price-breakdown-animation" => true} {{ variant.price_with_fees | localizeCurrency }} .medium-2.large-1.columns.total-price %span{"ng-class" => "{filled: variant.line_item.total_price}"} {{ variant.line_item.total_price | localizeCurrency }} %ng-include{src: "'partials/shop_variant_no_group_buy.html'"} %ng-include{src: "'partials/shop_variant_with_group_buy.html'"}
.variants.row .small-3.medium-4.large-6.columns.variant-name .inline {{ ::variant.name_to_display }} .variant-unit {{ ::variant.unit_to_display }} .bulk-buy.inline{"ng-if" => "::variant.product.group_buy"} %i.ofn-i_056-bulk>< %em>< \ {{::'bulk' | t}} .small-4.medium-3.large-2.columns.variant-price %price-breakdown{"price-breakdown" => "_", variant: "variant", "price-breakdown-append-to-body" => "true", "price-breakdown-placement" => "left", "price-breakdown-animation" => true} {{ variant.price_with_fees | localizeCurrency }} .medium-2.large-1.columns.total-price %span{"ng-class" => "{filled: variant.line_item.total_price}"} {{ variant.line_item.total_price | localizeCurrency }} %ng-include{src: "'partials/shop_variant_no_group_buy.html'"} %ng-include{src: "'partials/shop_variant_with_group_buy.html'"}
Fix "Place price-breakdown and price in the middle"
Fix "Place price-breakdown and price in the middle"
Haml
agpl-3.0
openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork
haml
## Code Before: .variants.row .small-3.medium-4.large-6.columns.variant-name .inline {{ ::variant.name_to_display }} .variant-unit {{ ::variant.unit_to_display }} .bulk-buy.inline{"ng-if" => "::variant.product.group_buy"} %i.ofn-i_056-bulk>< %em>< \ {{::'bulk' | t}} .small-4.medium-3.large-2.columns.variant-price -# Now in a template in app/assets/javascripts/templates ! %price-breakdown{"price-breakdown" => "_", variant: "variant", "price-breakdown-append-to-body" => "true", "price-breakdown-placement" => "left", "price-breakdown-animation" => true} {{ variant.price_with_fees | localizeCurrency }} .medium-2.large-1.columns.total-price %span{"ng-class" => "{filled: variant.line_item.total_price}"} {{ variant.line_item.total_price | localizeCurrency }} %ng-include{src: "'partials/shop_variant_no_group_buy.html'"} %ng-include{src: "'partials/shop_variant_with_group_buy.html'"} ## Instruction: Fix "Place price-breakdown and price in the middle" ## Code After: .variants.row .small-3.medium-4.large-6.columns.variant-name .inline {{ ::variant.name_to_display }} .variant-unit {{ ::variant.unit_to_display }} .bulk-buy.inline{"ng-if" => "::variant.product.group_buy"} %i.ofn-i_056-bulk>< %em>< \ {{::'bulk' | t}} .small-4.medium-3.large-2.columns.variant-price %price-breakdown{"price-breakdown" => "_", variant: "variant", "price-breakdown-append-to-body" => "true", "price-breakdown-placement" => "left", "price-breakdown-animation" => true} {{ variant.price_with_fees | localizeCurrency }} .medium-2.large-1.columns.total-price %span{"ng-class" => "{filled: variant.line_item.total_price}"} {{ variant.line_item.total_price | localizeCurrency }} %ng-include{src: "'partials/shop_variant_no_group_buy.html'"} %ng-include{src: "'partials/shop_variant_with_group_buy.html'"}
1dffeda858134c79148e9b62568e0a06a0a99e68
Library/Mestral/mestral/hooklet/dsl.rb
Library/Mestral/mestral/hooklet/dsl.rb
module Mestral::Hooklet::DSL def fail raise Mestral::Hooklet::Finished, false end def git(command) `git --git-dir #{Mestral::Repository.current.git_dir} #{command}` end def pass raise Mestral::Hooklet::Finished, true end end
module Mestral::Hooklet::DSL def fail raise Mestral::Hooklet::Finished, false end def git(command) `git --git-dir #{repo.git_dir} #{command}` end def config repo.config['%s:%s' % [tape.name, name]] end def pass raise Mestral::Hooklet::Finished, true end def repo Mestral::Repository.current end end
Allow configuration of individual hooklets
Allow configuration of individual hooklets
Ruby
bsd-3-clause
mestral/mestral
ruby
## Code Before: module Mestral::Hooklet::DSL def fail raise Mestral::Hooklet::Finished, false end def git(command) `git --git-dir #{Mestral::Repository.current.git_dir} #{command}` end def pass raise Mestral::Hooklet::Finished, true end end ## Instruction: Allow configuration of individual hooklets ## Code After: module Mestral::Hooklet::DSL def fail raise Mestral::Hooklet::Finished, false end def git(command) `git --git-dir #{repo.git_dir} #{command}` end def config repo.config['%s:%s' % [tape.name, name]] end def pass raise Mestral::Hooklet::Finished, true end def repo Mestral::Repository.current end end
c3ce4ddd65226ea2d2ff632b6ec0ad67f10401bb
docker-entrypoint.sh
docker-entrypoint.sh
set -e source /opt/rh/php55/enable # Create required directories just in case. mkdir -p /var/www/logs/php-fpm /var/www/files-private /var/www/docroot echo "*" > /var/www/logs/.gitignore # Set the apache user and group to match the host user. OWNER=$(stat -c '%u' /var/www) GROUP=$(stat -c '%g' /var/www) if [ "$OWNER" != "0" ]; then usermod -o -u $OWNER apache groupmod -o -g $GROUP apache fi usermod -s /bin/bash apache usermod -d /var/www apache # Add www-data user as same as apache user if [ ! $(id -u www-data &>/dev/null) ]; then OWNER=$(id -u apache) GROUP=$(id -g apache) useradd -o -u $OWNER -g $GROUP -M -d /var/www www-data grep -c www-data /etc/group || groupadd -o -g $GROUP www-data fi echo The apache user and group has been set to the following: id apache exec "$@"
set -e source /opt/rh/php55/enable # Create required directories just in case. mkdir -p /var/www/logs/php-fpm /var/www/files-private /var/www/docroot echo "*" > /var/www/logs/.gitignore # Set the apache user and group to match the host user. # Optionally use the HOST_USER env var if provided. if [ "$HOST_USER" ]; then OWNER=$(echo $HOST_USER | cut -d: -f1) GROUP=$(echo $HOST_USER | cut -d: -f2) else OWNER=$(stat -c '%u' /var/www) GROUP=$(stat -c '%g' /var/www) fi if [ "$OWNER" != "0" ]; then usermod -o -u $OWNER apache groupmod -o -g $GROUP apache fi usermod -s /bin/bash apache usermod -d /var/www apache # Add www-data user as same as apache user if [ ! $(id -u www-data &>/dev/null) ]; then OWNER=$(id -u apache) GROUP=$(id -g apache) useradd -o -u $OWNER -g $GROUP -M -d /var/www www-data grep -c www-data /etc/group || groupadd -o -g $GROUP www-data fi echo The apache user and group has been set to the following: id apache exec "$@"
Allow optional HOST_USER ids for apache user
Allow optional HOST_USER ids for apache user
Shell
mit
davenuman/docker-bowline,davenuman/docker-bowline
shell
## Code Before: set -e source /opt/rh/php55/enable # Create required directories just in case. mkdir -p /var/www/logs/php-fpm /var/www/files-private /var/www/docroot echo "*" > /var/www/logs/.gitignore # Set the apache user and group to match the host user. OWNER=$(stat -c '%u' /var/www) GROUP=$(stat -c '%g' /var/www) if [ "$OWNER" != "0" ]; then usermod -o -u $OWNER apache groupmod -o -g $GROUP apache fi usermod -s /bin/bash apache usermod -d /var/www apache # Add www-data user as same as apache user if [ ! $(id -u www-data &>/dev/null) ]; then OWNER=$(id -u apache) GROUP=$(id -g apache) useradd -o -u $OWNER -g $GROUP -M -d /var/www www-data grep -c www-data /etc/group || groupadd -o -g $GROUP www-data fi echo The apache user and group has been set to the following: id apache exec "$@" ## Instruction: Allow optional HOST_USER ids for apache user ## Code After: set -e source /opt/rh/php55/enable # Create required directories just in case. mkdir -p /var/www/logs/php-fpm /var/www/files-private /var/www/docroot echo "*" > /var/www/logs/.gitignore # Set the apache user and group to match the host user. # Optionally use the HOST_USER env var if provided. if [ "$HOST_USER" ]; then OWNER=$(echo $HOST_USER | cut -d: -f1) GROUP=$(echo $HOST_USER | cut -d: -f2) else OWNER=$(stat -c '%u' /var/www) GROUP=$(stat -c '%g' /var/www) fi if [ "$OWNER" != "0" ]; then usermod -o -u $OWNER apache groupmod -o -g $GROUP apache fi usermod -s /bin/bash apache usermod -d /var/www apache # Add www-data user as same as apache user if [ ! $(id -u www-data &>/dev/null) ]; then OWNER=$(id -u apache) GROUP=$(id -g apache) useradd -o -u $OWNER -g $GROUP -M -d /var/www www-data grep -c www-data /etc/group || groupadd -o -g $GROUP www-data fi echo The apache user and group has been set to the following: id apache exec "$@"