commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
81c5d8a9689114d3b25758a45096cef78ea49749
cmd/restic/cmd_autocomplete.go
cmd/restic/cmd_autocomplete.go
package main import ( "github.com/spf13/cobra" ) var autocompleteTarget string var cmdAutocomplete = &cobra.Command{ Use: "autocomplete", Short: "Generate shell autocompletion script", Long: `The "autocomplete" command generates a shell autocompletion script. NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed. By default, the file is written directly to /etc/bash_completion.d for convenience, and the command may need superuser rights, e.g.: $ sudo restic autocomplete`, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { if err := cmdRoot.GenBashCompletionFile(autocompleteTarget); err != nil { return err } return nil }, } func init() { cmdRoot.AddCommand(cmdAutocomplete) cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/restic.sh", "autocompletion file") // For bash-completion cmdAutocomplete.Flags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{}) }
package main import ( "github.com/spf13/cobra" ) var cmdAutocomplete = &cobra.Command{ Use: "autocomplete", Short: "Generate shell autocompletion script", Long: `The "autocomplete" command generates a shell autocompletion script. NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed. By default, the file is written directly to /etc/bash_completion.d for convenience, and the command may need superuser rights, e.g.: $ sudo restic autocomplete`, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { if err := cmdRoot.GenBashCompletionFile(autocompleteTarget); err != nil { return err } return nil }, } var autocompleteTarget string func init() { cmdRoot.AddCommand(cmdAutocomplete) cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/usr/share/bash-completion/completions/restic", "autocompletion file") // For bash-completion cmdAutocomplete.Flags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{}) }
Correct bash completion file path
Correct bash completion file path
Go
bsd-2-clause
ar-jan/restic,restic/restic,kurin/restic,fawick/restic,fawick/restic,ar-jan/restic,kurin/restic,middelink/restic,middelink/restic,restic/restic
go
## Code Before: package main import ( "github.com/spf13/cobra" ) var autocompleteTarget string var cmdAutocomplete = &cobra.Command{ Use: "autocomplete", Short: "Generate shell autocompletion script", Long: `The "autocomplete" command generates a shell autocompletion script. NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed. By default, the file is written directly to /etc/bash_completion.d for convenience, and the command may need superuser rights, e.g.: $ sudo restic autocomplete`, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { if err := cmdRoot.GenBashCompletionFile(autocompleteTarget); err != nil { return err } return nil }, } func init() { cmdRoot.AddCommand(cmdAutocomplete) cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/restic.sh", "autocompletion file") // For bash-completion cmdAutocomplete.Flags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{}) } ## Instruction: Correct bash completion file path ## Code After: package main import ( "github.com/spf13/cobra" ) var cmdAutocomplete = &cobra.Command{ Use: "autocomplete", Short: "Generate shell autocompletion script", Long: `The "autocomplete" command generates a shell autocompletion script. NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed. By default, the file is written directly to /etc/bash_completion.d for convenience, and the command may need superuser rights, e.g.: $ sudo restic autocomplete`, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { if err := cmdRoot.GenBashCompletionFile(autocompleteTarget); err != nil { return err } return nil }, } var autocompleteTarget string func init() { cmdRoot.AddCommand(cmdAutocomplete) cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/usr/share/bash-completion/completions/restic", "autocompletion file") // For bash-completion cmdAutocomplete.Flags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{}) }
package main import ( "github.com/spf13/cobra" ) - - var autocompleteTarget string var cmdAutocomplete = &cobra.Command{ Use: "autocomplete", Short: "Generate shell autocompletion script", Long: `The "autocomplete" command generates a shell autocompletion script. NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed. By default, the file is written directly to /etc/bash_completion.d for convenience, and the command may need superuser rights, e.g.: $ sudo restic autocomplete`, DisableAutoGenTag: true, RunE: func(cmd *cobra.Command, args []string) error { if err := cmdRoot.GenBashCompletionFile(autocompleteTarget); err != nil { return err } return nil }, } + var autocompleteTarget string + func init() { cmdRoot.AddCommand(cmdAutocomplete) - cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/restic.sh", "autocompletion file") ? -- ^ ^^ --- + cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/usr/share/bash-completion/completions/restic", "autocompletion file") ? ++++++++ ^ ^^^^^^^^^^^^ // For bash-completion cmdAutocomplete.Flags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{}) }
6
0.162162
3
3
af5a73199a09ee8da2516d92be505da221a95f99
app/assets/stylesheets/diffy.scss.erb
app/assets/stylesheets/diffy.scss.erb
<%= Diffy::CSS %> .diff { ul { background: transparent; } }
<%= Diffy::CSS %> .diff { $symbol-spacing: 1.5em; del { text-decoration: line-through; } ul { background: transparent; padding-left: $symbol-spacing; } span.symbol { display: inline-block; margin-left: -$symbol-spacing; width: $symbol-spacing; font-weight: bold; } }
Improve diffing UI based on user feedback
Improve diffing UI based on user feedback The results from the content design survey weren't totally conclusive but the eventual winner was "+/- at the start of the rows with a strike through for deletions". The only point of confusion around this option was the +/- sit a little too close to the rest of the body copy, and thus looks a bit like the markdown itself. Increase the margin between the two.
HTML+ERB
mit
alphagov/service-manual-publisher,alphagov/service-manual-publisher,alphagov/service-manual-publisher
html+erb
## Code Before: <%= Diffy::CSS %> .diff { ul { background: transparent; } } ## Instruction: Improve diffing UI based on user feedback The results from the content design survey weren't totally conclusive but the eventual winner was "+/- at the start of the rows with a strike through for deletions". The only point of confusion around this option was the +/- sit a little too close to the rest of the body copy, and thus looks a bit like the markdown itself. Increase the margin between the two. ## Code After: <%= Diffy::CSS %> .diff { $symbol-spacing: 1.5em; del { text-decoration: line-through; } ul { background: transparent; padding-left: $symbol-spacing; } span.symbol { display: inline-block; margin-left: -$symbol-spacing; width: $symbol-spacing; font-weight: bold; } }
<%= Diffy::CSS %> .diff { + $symbol-spacing: 1.5em; + + del { + text-decoration: line-through; + } ul { background: transparent; + padding-left: $symbol-spacing; + } + span.symbol { + display: inline-block; + margin-left: -$symbol-spacing; + width: $symbol-spacing; + font-weight: bold; } }
12
1.714286
12
0
2a2e814a2a1d9d7539a8e66f53bf54e0e6491485
tslint.json
tslint.json
{ "extends": [ "tslint-react" ], "rules": { "class-name": true, "comment-format": [ true, "check-space" ], "indent": [ true, "spaces" ], "no-duplicate-variable": true, "no-eval": true, "no-internal-module": true, "no-trailing-whitespace": true, "no-unsafe-finally": true, "no-var-keyword": true, "one-line": [ true, "check-open-brace", "check-whitespace" ], "quotemark": [ true, "single" ], "semicolon": [ true, "always" ], "triple-equals": [ true, "allow-null-check" ], "typedef-whitespace": [ true, { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" } ], "variable-name": [ true, "ban-keywords" ], "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type" ] } }
{ "extends": [ "tslint-react" ], "rules": { "class-name": true, "comment-format": [ true, "check-space" ], "indent": [ true, "spaces" ], "no-duplicate-variable": true, "no-eval": true, "no-internal-module": true, "no-trailing-whitespace": true, "no-unsafe-finally": true, "no-var-keyword": true, "no-require-imports": true, "one-line": [ true, "check-open-brace", "check-whitespace" ], "only-arrow-functions": true, "quotemark": [ true, "single" ], "semicolon": [ true, "always" ], "triple-equals": true, "typedef-whitespace": [ true, { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" } ], "variable-name": [ true, "ban-keywords" ], "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type" ] } }
Configure require, triple equals rules.
Configure require, triple equals rules.
JSON
mit
fuzzwizard/builders-game,Numose/builders-game,Numose/builders-game,Numose/builders-game,Hrr-19-crushers/builders-game,Hrr-19-crushers/builders-game,fuzzwizard/builders-game,Hrr-19-crushers/builders-game,fuzzwizard/builders-game
json
## Code Before: { "extends": [ "tslint-react" ], "rules": { "class-name": true, "comment-format": [ true, "check-space" ], "indent": [ true, "spaces" ], "no-duplicate-variable": true, "no-eval": true, "no-internal-module": true, "no-trailing-whitespace": true, "no-unsafe-finally": true, "no-var-keyword": true, "one-line": [ true, "check-open-brace", "check-whitespace" ], "quotemark": [ true, "single" ], "semicolon": [ true, "always" ], "triple-equals": [ true, "allow-null-check" ], "typedef-whitespace": [ true, { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" } ], "variable-name": [ true, "ban-keywords" ], "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type" ] } } ## Instruction: Configure require, triple equals rules. ## Code After: { "extends": [ "tslint-react" ], "rules": { "class-name": true, "comment-format": [ true, "check-space" ], "indent": [ true, "spaces" ], "no-duplicate-variable": true, "no-eval": true, "no-internal-module": true, "no-trailing-whitespace": true, "no-unsafe-finally": true, "no-var-keyword": true, "no-require-imports": true, "one-line": [ true, "check-open-brace", "check-whitespace" ], "only-arrow-functions": true, "quotemark": [ true, "single" ], "semicolon": [ true, "always" ], "triple-equals": true, "typedef-whitespace": [ true, { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" } ], "variable-name": [ true, "ban-keywords" ], "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type" ] } }
{ "extends": [ "tslint-react" ], "rules": { "class-name": true, "comment-format": [ true, "check-space" ], "indent": [ true, "spaces" ], "no-duplicate-variable": true, "no-eval": true, "no-internal-module": true, "no-trailing-whitespace": true, "no-unsafe-finally": true, "no-var-keyword": true, + "no-require-imports": true, "one-line": [ true, "check-open-brace", "check-whitespace" ], + "only-arrow-functions": true, "quotemark": [ true, "single" ], "semicolon": [ true, "always" ], - "triple-equals": [ ? ^ + "triple-equals": true, ? ^^^^^ - true, - "allow-null-check" - ], "typedef-whitespace": [ true, { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" } ], "variable-name": [ true, "ban-keywords" ], "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type" ] } }
7
0.114754
3
4
45923c586d4541003aa22b2c404622ae2262153a
docker-compose.yml
docker-compose.yml
version: '2' services: backend: build: ./backend/. image: banjocat/calorie_find:latest restart: always depends_on: - db command: bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py runserver 0.0.0.0:8000" volumes: - ./backend/calorie_find:/opt/api ports: - "8020:8000" # Setups database fixture: build: ./backend/. image: banjocat/calorie_find:latest depends_on: - db command: | bash -c "\ /tmp/wait-for-it.sh -h db -p 5432 && \ ./manage.py makemigrations && \ ./manage.py migrate && \ ./manage.py loaddata calories/fixtures/food.json" db: image: postgres:9 environment: - POSTGRES_USER=food - POSTGRES_PASSWORD=food
version: '2' services: backend: build: ./backend/. image: banjocat/calorie_find:latest restart: always depends_on: - db command: bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py runserver 0.0.0.0:8000" volumes: - ./backend/calorie_find:/opt/api ports: - "8020:8000" # Setups database fixture: build: ./backend/. image: banjocat/calorie_find:latest depends_on: - db command: | bash -c "\ /tmp/wait-for-it.sh -h db -p 5432 && \ ./manage.py makemigrations && \ ./manage.py migrate && \ ./manage.py loaddata calories/fixtures/food.json && \ echo Database migrations done!!" db: image: postgres:9 environment: - POSTGRES_USER=food - POSTGRES_PASSWORD=food
Add done message to migrations
Add done message to migrations
YAML
bsd-2-clause
banjocat/calorie-find,banjocat/calorie-find
yaml
## Code Before: version: '2' services: backend: build: ./backend/. image: banjocat/calorie_find:latest restart: always depends_on: - db command: bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py runserver 0.0.0.0:8000" volumes: - ./backend/calorie_find:/opt/api ports: - "8020:8000" # Setups database fixture: build: ./backend/. image: banjocat/calorie_find:latest depends_on: - db command: | bash -c "\ /tmp/wait-for-it.sh -h db -p 5432 && \ ./manage.py makemigrations && \ ./manage.py migrate && \ ./manage.py loaddata calories/fixtures/food.json" db: image: postgres:9 environment: - POSTGRES_USER=food - POSTGRES_PASSWORD=food ## Instruction: Add done message to migrations ## Code After: version: '2' services: backend: build: ./backend/. image: banjocat/calorie_find:latest restart: always depends_on: - db command: bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py runserver 0.0.0.0:8000" volumes: - ./backend/calorie_find:/opt/api ports: - "8020:8000" # Setups database fixture: build: ./backend/. image: banjocat/calorie_find:latest depends_on: - db command: | bash -c "\ /tmp/wait-for-it.sh -h db -p 5432 && \ ./manage.py makemigrations && \ ./manage.py migrate && \ ./manage.py loaddata calories/fixtures/food.json && \ echo Database migrations done!!" db: image: postgres:9 environment: - POSTGRES_USER=food - POSTGRES_PASSWORD=food
version: '2' services: backend: build: ./backend/. image: banjocat/calorie_find:latest restart: always depends_on: - db command: bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py runserver 0.0.0.0:8000" volumes: - ./backend/calorie_find:/opt/api ports: - "8020:8000" # Setups database fixture: build: ./backend/. image: banjocat/calorie_find:latest depends_on: - db command: | bash -c "\ /tmp/wait-for-it.sh -h db -p 5432 && \ ./manage.py makemigrations && \ ./manage.py migrate && \ - ./manage.py loaddata calories/fixtures/food.json" ? ^ + ./manage.py loaddata calories/fixtures/food.json && \ ? ^^^^^ + echo Database migrations done!!" db: image: postgres:9 environment: - POSTGRES_USER=food - POSTGRES_PASSWORD=food
3
0.09375
2
1
1f96a3c5880ca0be800c4de2415bdcd42af363da
src/app/sparrows/sparrows.component.css
src/app/sparrows/sparrows.component.css
.interface { position: relative; background-color: grey; } .chooser { /* flex container */ display: flex; align-items: center; justify-content: center; height: 100vh; } .answer { /*border: 3px solid red;*/ /* flex container */ display: flex; align-items: center; justify-content: center; /* flex item */ flex: 2; height: 100%; color: white; font-size: 25px; font-weight: bold; line-height: 90%; text-align: center; } .exhibit { /*border: 3px solid goldenrod;*/ /* flex container */ display: flex; justify-content: center; height: 100%; /* flex item */ flex: 8; } .exhibit img { width: 100%; object-fit: contain; } .indicator { /*border: 3px solid lightgreen;*/ position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; flex: 1 auto; font-size: 100px; font-weight: bold; color: gold; }
.interface { position: relative; background-color: grey; } .chooser { /* flex container */ display: flex; align-items: center; justify-content: center; height: 100vh; } .answer { /*border: 3px solid red;*/ /* flex container */ display: flex; align-items: center; justify-content: center; /* flex item */ flex: 2; height: 100%; color: white; font-size: 25px; font-weight: bold; line-height: 90%; text-align: center; } .exhibit { /*border: 3px solid goldenrod;*/ /* flex container */ display: flex; justify-content: center; height: 100%; /* flex item */ flex: 8; } .exhibit img { width: 100%; object-fit: contain; } .indicator { /*border: 3px solid lightgreen;*/ position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; flex: 1 auto; font-size: 100px; font-weight: bold; text-shadow: 0 0 10px black; color: white; }
Make indicator text white with black shadow
Make indicator text white with black shadow Make it easier to read over any background image.
CSS
apache-2.0
LearnWithLlew/SparrowDecks,LearnWithLlew/SparrowDecks,LearnWithLlew/SparrowDecks
css
## Code Before: .interface { position: relative; background-color: grey; } .chooser { /* flex container */ display: flex; align-items: center; justify-content: center; height: 100vh; } .answer { /*border: 3px solid red;*/ /* flex container */ display: flex; align-items: center; justify-content: center; /* flex item */ flex: 2; height: 100%; color: white; font-size: 25px; font-weight: bold; line-height: 90%; text-align: center; } .exhibit { /*border: 3px solid goldenrod;*/ /* flex container */ display: flex; justify-content: center; height: 100%; /* flex item */ flex: 8; } .exhibit img { width: 100%; object-fit: contain; } .indicator { /*border: 3px solid lightgreen;*/ position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; flex: 1 auto; font-size: 100px; font-weight: bold; color: gold; } ## Instruction: Make indicator text white with black shadow Make it easier to read over any background image. ## Code After: .interface { position: relative; background-color: grey; } .chooser { /* flex container */ display: flex; align-items: center; justify-content: center; height: 100vh; } .answer { /*border: 3px solid red;*/ /* flex container */ display: flex; align-items: center; justify-content: center; /* flex item */ flex: 2; height: 100%; color: white; font-size: 25px; font-weight: bold; line-height: 90%; text-align: center; } .exhibit { /*border: 3px solid goldenrod;*/ /* flex container */ display: flex; justify-content: center; height: 100%; /* flex item */ flex: 8; } .exhibit img { width: 100%; object-fit: contain; } .indicator { /*border: 3px solid lightgreen;*/ position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; flex: 1 auto; font-size: 100px; font-weight: bold; text-shadow: 0 0 10px black; color: white; }
.interface { position: relative; background-color: grey; } .chooser { /* flex container */ display: flex; align-items: center; justify-content: center; height: 100vh; } .answer { /*border: 3px solid red;*/ /* flex container */ display: flex; align-items: center; justify-content: center; /* flex item */ flex: 2; height: 100%; color: white; font-size: 25px; font-weight: bold; line-height: 90%; text-align: center; } .exhibit { /*border: 3px solid goldenrod;*/ /* flex container */ display: flex; justify-content: center; height: 100%; /* flex item */ flex: 8; } .exhibit img { width: 100%; object-fit: contain; } .indicator { /*border: 3px solid lightgreen;*/ position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; flex: 1 auto; font-size: 100px; font-weight: bold; - color: gold; + text-shadow: 0 0 10px black; + color: white; }
3
0.041667
2
1
13e705286d3b872a7f681e9106ebc9889a65e120
index.js
index.js
'use strict'; var fs = require('fs'); var path = require('path'); var body = '<script>' + fs.readFileSync(path.join(__dirname, 'teapot.min.js')) + '</script>'; module.exports = function (req, res) { res.writeHead(418, { 'Content-Length': Buffer.byteLength(body), 'Content-Type': 'text/html; charset=utf-8' }); res.end(body); };
'use strict'; var fs = require('fs'); var path = require('path'); var body = '<center>418: I\'m a teapot</center><script>' + fs.readFileSync(path.join(__dirname, 'teapot.min.js')) + '</script>'; module.exports = function (req, res) { res.writeHead(418, { 'Content-Length': Buffer.byteLength(body), 'Content-Type': 'text/html; charset=utf-8' }); res.end(body); };
Add text message to those without mesh support
Add text message to those without mesh support I'm looking at you Safari
JavaScript
mit
watson/http-teapot
javascript
## Code Before: 'use strict'; var fs = require('fs'); var path = require('path'); var body = '<script>' + fs.readFileSync(path.join(__dirname, 'teapot.min.js')) + '</script>'; module.exports = function (req, res) { res.writeHead(418, { 'Content-Length': Buffer.byteLength(body), 'Content-Type': 'text/html; charset=utf-8' }); res.end(body); }; ## Instruction: Add text message to those without mesh support I'm looking at you Safari ## Code After: 'use strict'; var fs = require('fs'); var path = require('path'); var body = '<center>418: I\'m a teapot</center><script>' + fs.readFileSync(path.join(__dirname, 'teapot.min.js')) + '</script>'; module.exports = function (req, res) { res.writeHead(418, { 'Content-Length': Buffer.byteLength(body), 'Content-Type': 'text/html; charset=utf-8' }); res.end(body); };
'use strict'; var fs = require('fs'); var path = require('path'); + + var body = '<center>418: I\'m a teapot</center><script>' + - var body = '<script>' + fs.readFileSync(path.join(__dirname, 'teapot.min.js')) + '</script>'; ? --- ------------------- ------------- + fs.readFileSync(path.join(__dirname, 'teapot.min.js')) + + '</script>'; module.exports = function (req, res) { res.writeHead(418, { 'Content-Length': Buffer.byteLength(body), 'Content-Type': 'text/html; charset=utf-8' }); res.end(body); };
5
0.384615
4
1
20d09c9d41bef2e0b36bd235599b1f1d567ee8ee
Casks/balsamiq-mockups.rb
Casks/balsamiq-mockups.rb
class BalsamiqMockups < Cask version :latest sha256 :no_check url 'http://builds.balsamiq.com/b/mockups-desktop/MockupsForDesktop.dmg' homepage 'http://balsamiq.com/' license :commercial app 'Balsamiq Mockups.app' end
class BalsamiqMockups < Cask version :latest sha256 :no_check # amazonaws is the official download host per the vendor homepage url 'http://s3.amazonaws.com/build_production/mockups-desktop/MockupsForDesktop.dmg' homepage 'http://balsamiq.com/' license :commercial app 'Balsamiq Mockups.app' end
Update download URL for Balsamiq Mockups
Update download URL for Balsamiq Mockups Closes #6944.
Ruby
bsd-2-clause
ianyh/homebrew-cask,vitorgalvao/homebrew-cask,MoOx/homebrew-cask,christophermanning/homebrew-cask,jspahrsummers/homebrew-cask,stevehedrick/homebrew-cask,johnste/homebrew-cask,chuanxd/homebrew-cask,optikfluffel/homebrew-cask,wickedsp1d3r/homebrew-cask,amatos/homebrew-cask,dcondrey/homebrew-cask,kteru/homebrew-cask,englishm/homebrew-cask,franklouwers/homebrew-cask,elnappo/homebrew-cask,mlocher/homebrew-cask,sohtsuka/homebrew-cask,enriclluelles/homebrew-cask,guerrero/homebrew-cask,sanyer/homebrew-cask,mjgardner/homebrew-cask,Hywan/homebrew-cask,lifepillar/homebrew-cask,daften/homebrew-cask,neil-ca-moore/homebrew-cask,a-x-/homebrew-cask,stevehedrick/homebrew-cask,morsdyce/homebrew-cask,donbobka/homebrew-cask,Philosoft/homebrew-cask,vmrob/homebrew-cask,sirodoht/homebrew-cask,pinut/homebrew-cask,malford/homebrew-cask,jacobdam/homebrew-cask,riyad/homebrew-cask,tdsmith/homebrew-cask,astorije/homebrew-cask,koenrh/homebrew-cask,mauricerkelly/homebrew-cask,Whoaa512/homebrew-cask,psibre/homebrew-cask,nelsonjchen/homebrew-cask,vmrob/homebrew-cask,diguage/homebrew-cask,tedski/homebrew-cask,tan9/homebrew-cask,jgarber623/homebrew-cask,kevyau/homebrew-cask,blogabe/homebrew-cask,katoquro/homebrew-cask,andyli/homebrew-cask,gord1anknot/homebrew-cask,zhuzihhhh/homebrew-cask,epardee/homebrew-cask,pacav69/homebrew-cask,Dremora/homebrew-cask,johndbritton/homebrew-cask,lauantai/homebrew-cask,puffdad/homebrew-cask,djakarta-trap/homebrew-myCask,csmith-palantir/homebrew-cask,wastrachan/homebrew-cask,shanonvl/homebrew-cask,shoichiaizawa/homebrew-cask,chadcatlett/caskroom-homebrew-cask,jhowtan/homebrew-cask,xcezx/homebrew-cask,mwilmer/homebrew-cask,helloIAmPau/homebrew-cask,zhuzihhhh/homebrew-cask,pablote/homebrew-cask,tyage/homebrew-cask,reelsense/homebrew-cask,gyugyu/homebrew-cask,corbt/homebrew-cask,rkJun/homebrew-cask,slack4u/homebrew-cask,AndreTheHunter/homebrew-cask,wKovacs64/homebrew-cask,bcomnes/homebrew-cask,scottsuch/homebrew-cask,andrewschleifer/homebrew-cask,howie/homebrew-cask,Ibuprofen/homebrew-cask,sscotth/homebrew-cask,mazehall/homebrew-cask,nightscape/homebrew-cask,lifepillar/homebrew-cask,mathbunnyru/homebrew-cask,williamboman/homebrew-cask,jawshooah/homebrew-cask,bsiddiqui/homebrew-cask,huanzhang/homebrew-cask,coneman/homebrew-cask,tjt263/homebrew-cask,inz/homebrew-cask,lucasmezencio/homebrew-cask,fharbe/homebrew-cask,paulbreslin/homebrew-cask,jeanregisser/homebrew-cask,bdhess/homebrew-cask,wmorin/homebrew-cask,retbrown/homebrew-cask,chino/homebrew-cask,wesen/homebrew-cask,albertico/homebrew-cask,prime8/homebrew-cask,AdamCmiel/homebrew-cask,gord1anknot/homebrew-cask,cedwardsmedia/homebrew-cask,ohammersmith/homebrew-cask,gurghet/homebrew-cask,stephenwade/homebrew-cask,jhowtan/homebrew-cask,samnung/homebrew-cask,ahundt/homebrew-cask,miku/homebrew-cask,nathansgreen/homebrew-cask,julionc/homebrew-cask,renard/homebrew-cask,djakarta-trap/homebrew-myCask,13k/homebrew-cask,dcondrey/homebrew-cask,kingthorin/homebrew-cask,tyage/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,lukasbestle/homebrew-cask,iamso/homebrew-cask,ksato9700/homebrew-cask,andersonba/homebrew-cask,atsuyim/homebrew-cask,nivanchikov/homebrew-cask,andyshinn/homebrew-cask,jiashuw/homebrew-cask,jgarber623/homebrew-cask,zeusdeux/homebrew-cask,Cottser/homebrew-cask,Ephemera/homebrew-cask,tarwich/homebrew-cask,codeurge/homebrew-cask,gurghet/homebrew-cask,mikem/homebrew-cask,paulbreslin/homebrew-cask,antogg/homebrew-cask,leipert/homebrew-cask,hellosky806/homebrew-cask,johnste/homebrew-cask,tjnycum/homebrew-cask,wickedsp1d3r/homebrew-cask,jpmat296/homebrew-cask,inta/homebrew-cask,imgarylai/homebrew-cask,deizel/homebrew-cask,xight/homebrew-cask,supriyantomaftuh/homebrew-cask,elnappo/homebrew-cask,lcasey001/homebrew-cask,robbiethegeek/homebrew-cask,carlmod/homebrew-cask,koenrh/homebrew-cask,lieuwex/homebrew-cask,retrography/homebrew-cask,jbeagley52/homebrew-cask,a1russell/homebrew-cask,exherb/homebrew-cask,mfpierre/homebrew-cask,slnovak/homebrew-cask,BenjaminHCCarr/homebrew-cask,SentinelWarren/homebrew-cask,fanquake/homebrew-cask,asins/homebrew-cask,flada-auxv/homebrew-cask,colindean/homebrew-cask,boydj/homebrew-cask,larseggert/homebrew-cask,RogerThiede/homebrew-cask,mattfelsen/homebrew-cask,fkrone/homebrew-cask,nrlquaker/homebrew-cask,supriyantomaftuh/homebrew-cask,cblecker/homebrew-cask,josa42/homebrew-cask,daften/homebrew-cask,xtian/homebrew-cask,thomanq/homebrew-cask,xyb/homebrew-cask,gyugyu/homebrew-cask,aguynamedryan/homebrew-cask,stonehippo/homebrew-cask,jasmas/homebrew-cask,joshka/homebrew-cask,fkrone/homebrew-cask,m3nu/homebrew-cask,paulombcosta/homebrew-cask,bkono/homebrew-cask,squid314/homebrew-cask,singingwolfboy/homebrew-cask,farmerchris/homebrew-cask,winkelsdorf/homebrew-cask,dlovitch/homebrew-cask,KosherBacon/homebrew-cask,dvdoliveira/homebrew-cask,qbmiller/homebrew-cask,Ngrd/homebrew-cask,tedbundyjr/homebrew-cask,uetchy/homebrew-cask,ericbn/homebrew-cask,tsparber/homebrew-cask,tarwich/homebrew-cask,leonmachadowilcox/homebrew-cask,rickychilcott/homebrew-cask,jrwesolo/homebrew-cask,tedbundyjr/homebrew-cask,hyuna917/homebrew-cask,ch3n2k/homebrew-cask,shishi/homebrew-cask,alloy/homebrew-cask,Labutin/homebrew-cask,jonathanwiesel/homebrew-cask,dspeckhard/homebrew-cask,genewoo/homebrew-cask,nickpellant/homebrew-cask,casidiablo/homebrew-cask,chrisRidgers/homebrew-cask,skyyuan/homebrew-cask,fanquake/homebrew-cask,christer155/homebrew-cask,jconley/homebrew-cask,nathanielvarona/homebrew-cask,pablote/homebrew-cask,genewoo/homebrew-cask,arronmabrey/homebrew-cask,githubutilities/homebrew-cask,feigaochn/homebrew-cask,bsiddiqui/homebrew-cask,caskroom/homebrew-cask,kevyau/homebrew-cask,segiddins/homebrew-cask,nathanielvarona/homebrew-cask,wizonesolutions/homebrew-cask,Saklad5/homebrew-cask,kesara/homebrew-cask,MicTech/homebrew-cask,thomanq/homebrew-cask,crzrcn/homebrew-cask,jen20/homebrew-cask,fazo96/homebrew-cask,dustinblackman/homebrew-cask,ninjahoahong/homebrew-cask,JikkuJose/homebrew-cask,psibre/homebrew-cask,m3nu/homebrew-cask,cohei/homebrew-cask,chrisfinazzo/homebrew-cask,jasmas/homebrew-cask,n0ts/homebrew-cask,samshadwell/homebrew-cask,cfillion/homebrew-cask,adelinofaria/homebrew-cask,skatsuta/homebrew-cask,singingwolfboy/homebrew-cask,kievechua/homebrew-cask,pkq/homebrew-cask,kirikiriyamama/homebrew-cask,opsdev-ws/homebrew-cask,tjnycum/homebrew-cask,cliffcotino/homebrew-cask,kostasdizas/homebrew-cask,mikem/homebrew-cask,lumaxis/homebrew-cask,morganestes/homebrew-cask,sscotth/homebrew-cask,gyndav/homebrew-cask,Amorymeltzer/homebrew-cask,deanmorin/homebrew-cask,astorije/homebrew-cask,yurikoles/homebrew-cask,corbt/homebrew-cask,Fedalto/homebrew-cask,jen20/homebrew-cask,kryhear/homebrew-cask,hvisage/homebrew-cask,nrlquaker/homebrew-cask,jrwesolo/homebrew-cask,JoelLarson/homebrew-cask,ajbw/homebrew-cask,miccal/homebrew-cask,pgr0ss/homebrew-cask,gerrypower/homebrew-cask,dunn/homebrew-cask,usami-k/homebrew-cask,Ketouem/homebrew-cask,ftiff/homebrew-cask,rickychilcott/homebrew-cask,klane/homebrew-cask,bric3/homebrew-cask,shonjir/homebrew-cask,cfillion/homebrew-cask,Hywan/homebrew-cask,qnm/homebrew-cask,fwiesel/homebrew-cask,FranklinChen/homebrew-cask,lauantai/homebrew-cask,spruceb/homebrew-cask,nicolas-brousse/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,stonehippo/homebrew-cask,underyx/homebrew-cask,ywfwj2008/homebrew-cask,samdoran/homebrew-cask,kassi/homebrew-cask,feniix/homebrew-cask,lalyos/homebrew-cask,reelsense/homebrew-cask,catap/homebrew-cask,yuhki50/homebrew-cask,barravi/homebrew-cask,Gasol/homebrew-cask,dieterdemeyer/homebrew-cask,rajiv/homebrew-cask,Fedalto/homebrew-cask,esebastian/homebrew-cask,julionc/homebrew-cask,mAAdhaTTah/homebrew-cask,thehunmonkgroup/homebrew-cask,gibsjose/homebrew-cask,tolbkni/homebrew-cask,schneidmaster/homebrew-cask,ohammersmith/homebrew-cask,lcasey001/homebrew-cask,diogodamiani/homebrew-cask,josa42/homebrew-cask,RickWong/homebrew-cask,JosephViolago/homebrew-cask,danielgomezrico/homebrew-cask,codeurge/homebrew-cask,drostron/homebrew-cask,chrisfinazzo/homebrew-cask,13k/homebrew-cask,sysbot/homebrew-cask,uetchy/homebrew-cask,jayshao/homebrew-cask,cclauss/homebrew-cask,mgryszko/homebrew-cask,johan/homebrew-cask,bendoerr/homebrew-cask,slack4u/homebrew-cask,ianyh/homebrew-cask,bcaceiro/homebrew-cask,rcuza/homebrew-cask,n8henrie/homebrew-cask,brianshumate/homebrew-cask,mwek/homebrew-cask,hanxue/caskroom,ingorichter/homebrew-cask,buo/homebrew-cask,ldong/homebrew-cask,cprecioso/homebrew-cask,markhuber/homebrew-cask,Nitecon/homebrew-cask,0rax/homebrew-cask,y00rb/homebrew-cask,ajbw/homebrew-cask,michelegera/homebrew-cask,blainesch/homebrew-cask,malob/homebrew-cask,miccal/homebrew-cask,jeroenseegers/homebrew-cask,shoichiaizawa/homebrew-cask,miguelfrde/homebrew-cask,howie/homebrew-cask,stevenmaguire/homebrew-cask,gmkey/homebrew-cask,andyli/homebrew-cask,rajiv/homebrew-cask,thii/homebrew-cask,jacobbednarz/homebrew-cask,tjnycum/homebrew-cask,johntrandall/homebrew-cask,sparrc/homebrew-cask,SentinelWarren/homebrew-cask,brianshumate/homebrew-cask,retrography/homebrew-cask,leonmachadowilcox/homebrew-cask,phpwutz/homebrew-cask,giannitm/homebrew-cask,delphinus35/homebrew-cask,deiga/homebrew-cask,sysbot/homebrew-cask,jeroenseegers/homebrew-cask,MircoT/homebrew-cask,linc01n/homebrew-cask,djmonta/homebrew-cask,seanzxx/homebrew-cask,wolflee/homebrew-cask,colindunn/homebrew-cask,aguynamedryan/homebrew-cask,jedahan/homebrew-cask,n8henrie/homebrew-cask,dwkns/homebrew-cask,casidiablo/homebrew-cask,gmkey/homebrew-cask,gilesdring/homebrew-cask,stigkj/homebrew-caskroom-cask,ptb/homebrew-cask,LaurentFough/homebrew-cask,stigkj/homebrew-caskroom-cask,sebcode/homebrew-cask,jspahrsummers/homebrew-cask,lucasmezencio/homebrew-cask,opsdev-ws/homebrew-cask,petmoo/homebrew-cask,BahtiyarB/homebrew-cask,sgnh/homebrew-cask,qbmiller/homebrew-cask,forevergenin/homebrew-cask,mwean/homebrew-cask,nickpellant/homebrew-cask,andyshinn/homebrew-cask,rubenerd/homebrew-cask,johndbritton/homebrew-cask,sscotth/homebrew-cask,underyx/homebrew-cask,pkq/homebrew-cask,reitermarkus/homebrew-cask,tdsmith/homebrew-cask,kkdd/homebrew-cask,huanzhang/homebrew-cask,elseym/homebrew-cask,kassi/homebrew-cask,timsutton/homebrew-cask,mchlrmrz/homebrew-cask,jpodlech/homebrew-cask,danielbayley/homebrew-cask,joschi/homebrew-cask,antogg/homebrew-cask,CameronGarrett/homebrew-cask,jacobdam/homebrew-cask,robertgzr/homebrew-cask,gerrymiller/homebrew-cask,gguillotte/homebrew-cask,ponychicken/homebrew-customcask,claui/homebrew-cask,kpearson/homebrew-cask,jamesmlees/homebrew-cask,feigaochn/homebrew-cask,esebastian/homebrew-cask,chrisRidgers/homebrew-cask,atsuyim/homebrew-cask,afh/homebrew-cask,jpmat296/homebrew-cask,aki77/homebrew-cask,norio-nomura/homebrew-cask,mlocher/homebrew-cask,My2ndAngelic/homebrew-cask,MerelyAPseudonym/homebrew-cask,blainesch/homebrew-cask,lalyos/homebrew-cask,CameronGarrett/homebrew-cask,adrianchia/homebrew-cask,zorosteven/homebrew-cask,sachin21/homebrew-cask,Labutin/homebrew-cask,skyyuan/homebrew-cask,skatsuta/homebrew-cask,wizonesolutions/homebrew-cask,cohei/homebrew-cask,mwek/homebrew-cask,AdamCmiel/homebrew-cask,jaredsampson/homebrew-cask,BenjaminHCCarr/homebrew-cask,johnjelinek/homebrew-cask,0xadada/homebrew-cask,adelinofaria/homebrew-cask,winkelsdorf/homebrew-cask,JosephViolago/homebrew-cask,forevergenin/homebrew-cask,mingzhi22/homebrew-cask,hanxue/caskroom,sebcode/homebrew-cask,kingthorin/homebrew-cask,LaurentFough/homebrew-cask,onlynone/homebrew-cask,mattfelsen/homebrew-cask,Ephemera/homebrew-cask,epmatsw/homebrew-cask,okket/homebrew-cask,lolgear/homebrew-cask,shorshe/homebrew-cask,mkozjak/homebrew-cask,usami-k/homebrew-cask,kesara/homebrew-cask,sohtsuka/homebrew-cask,AndreTheHunter/homebrew-cask,lvicentesanchez/homebrew-cask,mindriot101/homebrew-cask,paour/homebrew-cask,elseym/homebrew-cask,claui/homebrew-cask,hanxue/caskroom,yuhki50/homebrew-cask,kei-yamazaki/homebrew-cask,dictcp/homebrew-cask,cobyism/homebrew-cask,MatzFan/homebrew-cask,xtian/homebrew-cask,aki77/homebrew-cask,scottsuch/homebrew-cask,dictcp/homebrew-cask,lvicentesanchez/homebrew-cask,gustavoavellar/homebrew-cask,bgandon/homebrew-cask,wayou/homebrew-cask,ponychicken/homebrew-customcask,tedski/homebrew-cask,andersonba/homebrew-cask,aktau/homebrew-cask,mahori/homebrew-cask,jellyfishcoder/homebrew-cask,dwkns/homebrew-cask,mwean/homebrew-cask,BenjaminHCCarr/homebrew-cask,troyxmccall/homebrew-cask,crzrcn/homebrew-cask,slnovak/homebrew-cask,danielbayley/homebrew-cask,sosedoff/homebrew-cask,scribblemaniac/homebrew-cask,adrianchia/homebrew-cask,squid314/homebrew-cask,jeroenj/homebrew-cask,joaocc/homebrew-cask,malford/homebrew-cask,0xadada/homebrew-cask,guerrero/homebrew-cask,Ibuprofen/homebrew-cask,kolomiichenko/homebrew-cask,ahundt/homebrew-cask,mjdescy/homebrew-cask,zmwangx/homebrew-cask,amatos/homebrew-cask,moimikey/homebrew-cask,asins/homebrew-cask,alexg0/homebrew-cask,arranubels/homebrew-cask,My2ndAngelic/homebrew-cask,schneidmaster/homebrew-cask,mokagio/homebrew-cask,dwihn0r/homebrew-cask,seanorama/homebrew-cask,delphinus35/homebrew-cask,jeanregisser/homebrew-cask,j13k/homebrew-cask,joaocc/homebrew-cask,ninjahoahong/homebrew-cask,kamilboratynski/homebrew-cask,alexg0/homebrew-cask,bchatard/homebrew-cask,Dremora/homebrew-cask,dunn/homebrew-cask,tolbkni/homebrew-cask,otzy007/homebrew-cask,fharbe/homebrew-cask,yurikoles/homebrew-cask,shonjir/homebrew-cask,crmne/homebrew-cask,mhubig/homebrew-cask,moonboots/homebrew-cask,d/homebrew-cask,rubenerd/homebrew-cask,Saklad5/homebrew-cask,thii/homebrew-cask,lukeadams/homebrew-cask,zerrot/homebrew-cask,kiliankoe/homebrew-cask,nshemonsky/homebrew-cask,gguillotte/homebrew-cask,mchlrmrz/homebrew-cask,xyb/homebrew-cask,michelegera/homebrew-cask,alexg0/homebrew-cask,jangalinski/homebrew-cask,frapposelli/homebrew-cask,fazo96/homebrew-cask,Keloran/homebrew-cask,linc01n/homebrew-cask,sanchezm/homebrew-cask,katoquro/homebrew-cask,akiomik/homebrew-cask,flaviocamilo/homebrew-cask,aktau/homebrew-cask,epardee/homebrew-cask,bcomnes/homebrew-cask,mindriot101/homebrew-cask,yurikoles/homebrew-cask,doits/homebrew-cask,coneman/homebrew-cask,afdnlw/homebrew-cask,robertgzr/homebrew-cask,miku/homebrew-cask,joschi/homebrew-cask,xalep/homebrew-cask,perfide/homebrew-cask,cprecioso/homebrew-cask,diogodamiani/homebrew-cask,nshemonsky/homebrew-cask,lantrix/homebrew-cask,haha1903/homebrew-cask,kuno/homebrew-cask,scribblemaniac/homebrew-cask,buo/homebrew-cask,bric3/homebrew-cask,troyxmccall/homebrew-cask,guylabs/homebrew-cask,xcezx/homebrew-cask,flaviocamilo/homebrew-cask,a1russell/homebrew-cask,tranc99/homebrew-cask,ksylvan/homebrew-cask,SamiHiltunen/homebrew-cask,wKovacs64/homebrew-cask,feniix/homebrew-cask,dezon/homebrew-cask,jmeridth/homebrew-cask,muan/homebrew-cask,cblecker/homebrew-cask,stephenwade/homebrew-cask,JikkuJose/homebrew-cask,githubutilities/homebrew-cask,renaudguerin/homebrew-cask,MerelyAPseudonym/homebrew-cask,MichaelPei/homebrew-cask,haha1903/homebrew-cask,toonetown/homebrew-cask,iAmGhost/homebrew-cask,xight/homebrew-cask,mjgardner/homebrew-cask,kkdd/homebrew-cask,uetchy/homebrew-cask,deiga/homebrew-cask,stephenwade/homebrew-cask,jellyfishcoder/homebrew-cask,MicTech/homebrew-cask,jalaziz/homebrew-cask,dlovitch/homebrew-cask,julienlavergne/homebrew-cask,JoelLarson/homebrew-cask,nysthee/homebrew-cask,JacopKane/homebrew-cask,yumitsu/homebrew-cask,kievechua/homebrew-cask,andrewdisley/homebrew-cask,barravi/homebrew-cask,nysthee/homebrew-cask,mwilmer/homebrew-cask,nathancahill/homebrew-cask,ahvigil/homebrew-cask,goxberry/homebrew-cask,colindean/homebrew-cask,lantrix/homebrew-cask,optikfluffel/homebrew-cask,williamboman/homebrew-cask,ftiff/homebrew-cask,mokagio/homebrew-cask,samdoran/homebrew-cask,cclauss/homebrew-cask,vitorgalvao/homebrew-cask,nivanchikov/homebrew-cask,illusionfield/homebrew-cask,fly19890211/homebrew-cask,athrunsun/homebrew-cask,scottsuch/homebrew-cask,iAmGhost/homebrew-cask,onlynone/homebrew-cask,chuanxd/homebrew-cask,morsdyce/homebrew-cask,timsutton/homebrew-cask,mathbunnyru/homebrew-cask,bchatard/homebrew-cask,blogabe/homebrew-cask,wayou/homebrew-cask,maxnordlund/homebrew-cask,mahori/homebrew-cask,xakraz/homebrew-cask,anbotero/homebrew-cask,gyndav/homebrew-cask,rogeriopradoj/homebrew-cask,joschi/homebrew-cask,kTitan/homebrew-cask,bcaceiro/homebrew-cask,deanmorin/homebrew-cask,ch3n2k/homebrew-cask,JacopKane/homebrew-cask,kirikiriyamama/homebrew-cask,giannitm/homebrew-cask,xiongchiamiov/homebrew-cask,taherio/homebrew-cask,MisumiRize/homebrew-cask,malob/homebrew-cask,unasuke/homebrew-cask,FredLackeyOfficial/homebrew-cask,adriweb/homebrew-cask,Ngrd/homebrew-cask,jbeagley52/homebrew-cask,patresi/homebrew-cask,andrewdisley/homebrew-cask,devmynd/homebrew-cask,jmeridth/homebrew-cask,gwaldo/homebrew-cask,nathansgreen/homebrew-cask,petmoo/homebrew-cask,csmith-palantir/homebrew-cask,joaoponceleao/homebrew-cask,blogabe/homebrew-cask,johnjelinek/homebrew-cask,gibsjose/homebrew-cask,colindunn/homebrew-cask,enriclluelles/homebrew-cask,SamiHiltunen/homebrew-cask,hellosky806/homebrew-cask,johntrandall/homebrew-cask,MichaelPei/homebrew-cask,FranklinChen/homebrew-cask,englishm/homebrew-cask,ksato9700/homebrew-cask,neverfox/homebrew-cask,jamesmlees/homebrew-cask,tangestani/homebrew-cask,tan9/homebrew-cask,ahvigil/homebrew-cask,jiashuw/homebrew-cask,d/homebrew-cask,RJHsiao/homebrew-cask,mariusbutuc/homebrew-cask,KosherBacon/homebrew-cask,remko/homebrew-cask,Amorymeltzer/homebrew-cask,dieterdemeyer/homebrew-cask,chadcatlett/caskroom-homebrew-cask,norio-nomura/homebrew-cask,gerrymiller/homebrew-cask,cedwardsmedia/homebrew-cask,ky0615/homebrew-cask-1,rogeriopradoj/homebrew-cask,janlugt/homebrew-cask,kronicd/homebrew-cask,prime8/homebrew-cask,afdnlw/homebrew-cask,bendoerr/homebrew-cask,stevenmaguire/homebrew-cask,rajiv/homebrew-cask,a-x-/homebrew-cask,winkelsdorf/homebrew-cask,MircoT/homebrew-cask,bric3/homebrew-cask,jacobbednarz/homebrew-cask,MisumiRize/homebrew-cask,victorpopkov/homebrew-cask,kingthorin/homebrew-cask,syscrusher/homebrew-cask,freeslugs/homebrew-cask,thehunmonkgroup/homebrew-cask,faun/homebrew-cask,joshka/homebrew-cask,gwaldo/homebrew-cask,neverfox/homebrew-cask,illusionfield/homebrew-cask,lukasbestle/homebrew-cask,santoshsahoo/homebrew-cask,ingorichter/homebrew-cask,hackhandslabs/homebrew-cask,wolflee/homebrew-cask,moonboots/homebrew-cask,paour/homebrew-cask,Philosoft/homebrew-cask,larseggert/homebrew-cask,vin047/homebrew-cask,sparrc/homebrew-cask,stonehippo/homebrew-cask,Ephemera/homebrew-cask,mhubig/homebrew-cask,mingzhi22/homebrew-cask,otzy007/homebrew-cask,dictcp/homebrew-cask,Nitecon/homebrew-cask,tangestani/homebrew-cask,asbachb/homebrew-cask,moogar0880/homebrew-cask,asbachb/homebrew-cask,sgnh/homebrew-cask,rcuza/homebrew-cask,kongslund/homebrew-cask,johan/homebrew-cask,imgarylai/homebrew-cask,xight/homebrew-cask,alebcay/homebrew-cask,donbobka/homebrew-cask,lukeadams/homebrew-cask,askl56/homebrew-cask,mgryszko/homebrew-cask,kryhear/homebrew-cask,goxberry/homebrew-cask,Cottser/homebrew-cask,ayohrling/homebrew-cask,nathanielvarona/homebrew-cask,inz/homebrew-cask,catap/homebrew-cask,wesen/homebrew-cask,wickles/homebrew-cask,wmorin/homebrew-cask,xalep/homebrew-cask,ctrevino/homebrew-cask,napaxton/homebrew-cask,0rax/homebrew-cask,josa42/homebrew-cask,Ketouem/homebrew-cask,miguelfrde/homebrew-cask,jalaziz/homebrew-cask,shoichiaizawa/homebrew-cask,ctrevino/homebrew-cask,nicolas-brousse/homebrew-cask,kiliankoe/homebrew-cask,ericbn/homebrew-cask,hristozov/homebrew-cask,farmerchris/homebrew-cask,syscrusher/homebrew-cask,remko/homebrew-cask,kei-yamazaki/homebrew-cask,kostasdizas/homebrew-cask,ddm/homebrew-cask,jayshao/homebrew-cask,moimikey/homebrew-cask,vigosan/homebrew-cask,Gasol/homebrew-cask,greg5green/homebrew-cask,alebcay/homebrew-cask,seanorama/homebrew-cask,patresi/homebrew-cask,vuquoctuan/homebrew-cask,AnastasiaSulyagina/homebrew-cask,paour/homebrew-cask,hakamadare/homebrew-cask,MatzFan/homebrew-cask,boydj/homebrew-cask,mathbunnyru/homebrew-cask,paulombcosta/homebrew-cask,frapposelli/homebrew-cask,greg5green/homebrew-cask,jawshooah/homebrew-cask,nightscape/homebrew-cask,seanzxx/homebrew-cask,chino/homebrew-cask,wuman/homebrew-cask,anbotero/homebrew-cask,kTitan/homebrew-cask,6uclz1/homebrew-cask,maxnordlund/homebrew-cask,rogeriopradoj/homebrew-cask,helloIAmPau/homebrew-cask,sanyer/homebrew-cask,ywfwj2008/homebrew-cask,n0ts/homebrew-cask,jtriley/homebrew-cask,unasuke/homebrew-cask,gyndav/homebrew-cask,mazehall/homebrew-cask,garborg/homebrew-cask,hovancik/homebrew-cask,perfide/homebrew-cask,andrewschleifer/homebrew-cask,optikfluffel/homebrew-cask,adriweb/homebrew-cask,otaran/homebrew-cask,royalwang/homebrew-cask,axodys/homebrew-cask,janlugt/homebrew-cask,sosedoff/homebrew-cask,sanyer/homebrew-cask,leipert/homebrew-cask,andrewdisley/homebrew-cask,elyscape/homebrew-cask,epmatsw/homebrew-cask,moogar0880/homebrew-cask,toonetown/homebrew-cask,klane/homebrew-cask,zerrot/homebrew-cask,jedahan/homebrew-cask,dezon/homebrew-cask,samnung/homebrew-cask,kamilboratynski/homebrew-cask,claui/homebrew-cask,zorosteven/homebrew-cask,dustinblackman/homebrew-cask,wuman/homebrew-cask,jppelteret/homebrew-cask,bdhess/homebrew-cask,arronmabrey/homebrew-cask,valepert/homebrew-cask,hvisage/homebrew-cask,ldong/homebrew-cask,gustavoavellar/homebrew-cask,santoshsahoo/homebrew-cask,cblecker/homebrew-cask,sjackman/homebrew-cask,mjgardner/homebrew-cask,pkq/homebrew-cask,danielbayley/homebrew-cask,okket/homebrew-cask,vuquoctuan/homebrew-cask,ky0615/homebrew-cask-1,jalaziz/homebrew-cask,reitermarkus/homebrew-cask,puffdad/homebrew-cask,mahori/homebrew-cask,otaran/homebrew-cask,ebraminio/homebrew-cask,Keloran/homebrew-cask,6uclz1/homebrew-cask,scribblemaniac/homebrew-cask,wickles/homebrew-cask,Bombenleger/homebrew-cask,dvdoliveira/homebrew-cask,nrlquaker/homebrew-cask,ebraminio/homebrew-cask,ayohrling/homebrew-cask,pacav69/homebrew-cask,gabrielizaias/homebrew-cask,askl56/homebrew-cask,kolomiichenko/homebrew-cask,markthetech/homebrew-cask,reitermarkus/homebrew-cask,gilesdring/homebrew-cask,miccal/homebrew-cask,FinalDes/homebrew-cask,jeroenj/homebrew-cask,FinalDes/homebrew-cask,malob/homebrew-cask,albertico/homebrew-cask,tsparber/homebrew-cask,scw/homebrew-cask,mAAdhaTTah/homebrew-cask,pgr0ss/homebrew-cask,mishari/homebrew-cask,L2G/homebrew-cask,iamso/homebrew-cask,antogg/homebrew-cask,m3nu/homebrew-cask,ericbn/homebrew-cask,faun/homebrew-cask,diguage/homebrew-cask,a1russell/homebrew-cask,rhendric/homebrew-cask,decrement/homebrew-cask,deiga/homebrew-cask,j13k/homebrew-cask,xyb/homebrew-cask,Bombenleger/homebrew-cask,zchee/homebrew-cask,AnastasiaSulyagina/homebrew-cask,yutarody/homebrew-cask,christer155/homebrew-cask,mattrobenolt/homebrew-cask,bosr/homebrew-cask,morganestes/homebrew-cask,mrmachine/homebrew-cask,athrunsun/homebrew-cask,renaudguerin/homebrew-cask,RickWong/homebrew-cask,arranubels/homebrew-cask,spruceb/homebrew-cask,zchee/homebrew-cask,kronicd/homebrew-cask,mariusbutuc/homebrew-cask,robbiethegeek/homebrew-cask,christophermanning/homebrew-cask,tranc99/homebrew-cask,lolgear/homebrew-cask,3van/homebrew-cask,flada-auxv/homebrew-cask,kpearson/homebrew-cask,deizel/homebrew-cask,coeligena/homebrew-customized,lieuwex/homebrew-cask,mkozjak/homebrew-cask,scw/homebrew-cask,xiongchiamiov/homebrew-cask,shishi/homebrew-cask,zmwangx/homebrew-cask,wastrachan/homebrew-cask,bgandon/homebrew-cask,segiddins/homebrew-cask,rkJun/homebrew-cask,caskroom/homebrew-cask,FredLackeyOfficial/homebrew-cask,ksylvan/homebrew-cask,artdevjs/homebrew-cask,imgarylai/homebrew-cask,retbrown/homebrew-cask,gabrielizaias/homebrew-cask,bkono/homebrew-cask,sirodoht/homebrew-cask,kteru/homebrew-cask,vin047/homebrew-cask,boecko/homebrew-cask,BahtiyarB/homebrew-cask,dwihn0r/homebrew-cask,kuno/homebrew-cask,yurrriq/homebrew-cask,xakraz/homebrew-cask,cliffcotino/homebrew-cask,zeusdeux/homebrew-cask,jtriley/homebrew-cask,singingwolfboy/homebrew-cask,jconley/homebrew-cask,boecko/homebrew-cask,hovancik/homebrew-cask,drostron/homebrew-cask,JacopKane/homebrew-cask,jgarber623/homebrew-cask,3van/homebrew-cask,mauricerkelly/homebrew-cask,adrianchia/homebrew-cask,doits/homebrew-cask,pinut/homebrew-cask,mjdescy/homebrew-cask,elyscape/homebrew-cask,shanonvl/homebrew-cask,shonjir/homebrew-cask,timsutton/homebrew-cask,tmoreira2020/homebrew,djmonta/homebrew-cask,yutarody/homebrew-cask,jpodlech/homebrew-cask,neverfox/homebrew-cask,yutarody/homebrew-cask,af/homebrew-cask,taherio/homebrew-cask,theoriginalgri/homebrew-cask,mfpierre/homebrew-cask,renard/homebrew-cask,carlmod/homebrew-cask,kongslund/homebrew-cask,yumitsu/homebrew-cask,mrmachine/homebrew-cask,nathancahill/homebrew-cask,cobyism/homebrew-cask,freeslugs/homebrew-cask,danielgomezrico/homebrew-cask,JosephViolago/homebrew-cask,guylabs/homebrew-cask,samshadwell/homebrew-cask,inta/homebrew-cask,esebastian/homebrew-cask,hyuna917/homebrew-cask,mishari/homebrew-cask,napaxton/homebrew-cask,exherb/homebrew-cask,yurrriq/homebrew-cask,Whoaa512/homebrew-cask,MoOx/homebrew-cask,victorpopkov/homebrew-cask,fly19890211/homebrew-cask,vigosan/homebrew-cask,hristozov/homebrew-cask,julienlavergne/homebrew-cask,decrement/homebrew-cask,markhuber/homebrew-cask,jangalinski/homebrew-cask,RogerThiede/homebrew-cask,tjt263/homebrew-cask,mattrobenolt/homebrew-cask,artdevjs/homebrew-cask,L2G/homebrew-cask,gerrypower/homebrew-cask,af/homebrew-cask,chrisfinazzo/homebrew-cask,mchlrmrz/homebrew-cask,coeligena/homebrew-customized,tangestani/homebrew-cask,julionc/homebrew-cask,jppelteret/homebrew-cask,muan/homebrew-cask,devmynd/homebrew-cask,coeligena/homebrew-customized,jonathanwiesel/homebrew-cask,kesara/homebrew-cask,phpwutz/homebrew-cask,mattrobenolt/homebrew-cask,bosr/homebrew-cask,RJHsiao/homebrew-cask,crmne/homebrew-cask,neil-ca-moore/homebrew-cask,sachin21/homebrew-cask,shorshe/homebrew-cask,alebcay/homebrew-cask,royalwang/homebrew-cask,moimikey/homebrew-cask,y00rb/homebrew-cask,franklouwers/homebrew-cask,cobyism/homebrew-cask,akiomik/homebrew-cask,markthetech/homebrew-cask,fwiesel/homebrew-cask,nelsonjchen/homebrew-cask,ptb/homebrew-cask,garborg/homebrew-cask,jaredsampson/homebrew-cask,axodys/homebrew-cask,riyad/homebrew-cask,lumaxis/homebrew-cask,wmorin/homebrew-cask,afh/homebrew-cask,joshka/homebrew-cask,rhendric/homebrew-cask,valepert/homebrew-cask,dspeckhard/homebrew-cask,Amorymeltzer/homebrew-cask,qnm/homebrew-cask,alloy/homebrew-cask,theoriginalgri/homebrew-cask,hackhandslabs/homebrew-cask,hakamadare/homebrew-cask,tmoreira2020/homebrew,joaoponceleao/homebrew-cask,sjackman/homebrew-cask,sanchezm/homebrew-cask,ddm/homebrew-cask
ruby
## Code Before: class BalsamiqMockups < Cask version :latest sha256 :no_check url 'http://builds.balsamiq.com/b/mockups-desktop/MockupsForDesktop.dmg' homepage 'http://balsamiq.com/' license :commercial app 'Balsamiq Mockups.app' end ## Instruction: Update download URL for Balsamiq Mockups Closes #6944. ## Code After: class BalsamiqMockups < Cask version :latest sha256 :no_check # amazonaws is the official download host per the vendor homepage url 'http://s3.amazonaws.com/build_production/mockups-desktop/MockupsForDesktop.dmg' homepage 'http://balsamiq.com/' license :commercial app 'Balsamiq Mockups.app' end
class BalsamiqMockups < Cask version :latest sha256 :no_check + # amazonaws is the official download host per the vendor homepage - url 'http://builds.balsamiq.com/b/mockups-desktop/MockupsForDesktop.dmg' ? ----- ---- ^^ + url 'http://s3.amazonaws.com/build_production/mockups-desktop/MockupsForDesktop.dmg' ? + ^^^^^^^ +++++++++++++++ homepage 'http://balsamiq.com/' license :commercial app 'Balsamiq Mockups.app' end
3
0.3
2
1
8aad6f2d124a79c0f37f228d4d5e975921e42482
oneapi-sample-app/on-inbound-message.php
oneapi-sample-app/on-inbound-message.php
<?php require_once 'app.php'; $result = SmsClient::unserializeInboundMessages(); // Process the inbound message here... // We'll just save this object: $fileName = PUSH_LOG_DIRECTORY . '/inbound-message-' . strftime('%Y-%m-%d %H:%M') . '.txt'; $data = print_r($result, true); file_put_contents($fileName, $data); // Not needed, but just for testing: echo 'OK';
<?php require_once 'app.php'; $result = SmsClient::unserializeInboundMessages(); // Process the inbound message here... // We'll send a response here: $message = new SMSRequest(); $message->senderAddress = $result->destinationAddress; $message->address = $result->senderAddress; $message->message = 'Thank you for your message (' . $result->message . ')!'; // Initialize the client: $smsClient = new SmsClient(USERNAME, PASSWORD); $result = $smsClient->sendSMS($message); // We'll just save this object: $fileName = PUSH_LOG_DIRECTORY . '/inbound-message-' . strftime('%Y-%m-%d %H:%M') . '.txt'; $data = print_r($result, true); file_put_contents($fileName, $data); // Not needed, but just for testing: echo 'OK';
Send message on inbound push
Send message on inbound push
PHP
apache-2.0
infobip/oneapi-php,infobip/oneapi-php,infobip/oneapi-php-non-composer,maitho/oneapi-php,MakavelDyp/oneapi-php,maitho/oneapi-php,maitho/oneapi-php,MakavelDyp/oneapi-php,MakavelDyp/oneapi-php,infobip/oneapi-php,frkator/oneapi-php,frkator/oneapi-php,infobip/oneapi-php-non-composer,infobip/oneapi-php-non-composer
php
## Code Before: <?php require_once 'app.php'; $result = SmsClient::unserializeInboundMessages(); // Process the inbound message here... // We'll just save this object: $fileName = PUSH_LOG_DIRECTORY . '/inbound-message-' . strftime('%Y-%m-%d %H:%M') . '.txt'; $data = print_r($result, true); file_put_contents($fileName, $data); // Not needed, but just for testing: echo 'OK'; ## Instruction: Send message on inbound push ## Code After: <?php require_once 'app.php'; $result = SmsClient::unserializeInboundMessages(); // Process the inbound message here... // We'll send a response here: $message = new SMSRequest(); $message->senderAddress = $result->destinationAddress; $message->address = $result->senderAddress; $message->message = 'Thank you for your message (' . $result->message . ')!'; // Initialize the client: $smsClient = new SmsClient(USERNAME, PASSWORD); $result = $smsClient->sendSMS($message); // We'll just save this object: $fileName = PUSH_LOG_DIRECTORY . '/inbound-message-' . strftime('%Y-%m-%d %H:%M') . '.txt'; $data = print_r($result, true); file_put_contents($fileName, $data); // Not needed, but just for testing: echo 'OK';
<?php require_once 'app.php'; + $result = SmsClient::unserializeInboundMessages(); + // Process the inbound message here... + + + + // We'll send a response here: + $message = new SMSRequest(); + $message->senderAddress = $result->destinationAddress; + $message->address = $result->senderAddress; + $message->message = 'Thank you for your message (' . $result->message . ')!'; + + // Initialize the client: + $smsClient = new SmsClient(USERNAME, PASSWORD); + + $result = $smsClient->sendSMS($message); + // We'll just save this object: $fileName = PUSH_LOG_DIRECTORY . '/inbound-message-' . strftime('%Y-%m-%d %H:%M') . '.txt'; $data = print_r($result, true); file_put_contents($fileName, $data); + // Not needed, but just for testing: echo 'OK';
17
1.0625
17
0
0c1b581a46c5655b111ef7027ce2076bc4fe6162
src/test/data/SimpleTestModelSchema.js
src/test/data/SimpleTestModelSchema.js
define([ ], function ( ) { return { "id": "TestData/SimpleTestModelSchema", "description": "A simple model for testing", "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "modelNumber": { "type": "string", "maxLength": 4, "description": "The number of the model.", "required": true }, "optionalprop": { "type": "string", "description": "an optional property.", "optional": true } } }; });
define({ "id": "TestData/SimpleTestModelSchema", "description": "A simple model for testing", "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "modelNumber": { "type": "string", "maxLength": 4, "description": "The number of the model.", "pattern": "[0-9]", "required": true }, "optionalprop": { "type": "string", "description": "an optional property." } } });
Add pattern validation to test model.
Add pattern validation to test model.
JavaScript
apache-2.0
atsid/schematic-js,atsid/schematic-js
javascript
## Code Before: define([ ], function ( ) { return { "id": "TestData/SimpleTestModelSchema", "description": "A simple model for testing", "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "modelNumber": { "type": "string", "maxLength": 4, "description": "The number of the model.", "required": true }, "optionalprop": { "type": "string", "description": "an optional property.", "optional": true } } }; }); ## Instruction: Add pattern validation to test model. ## Code After: define({ "id": "TestData/SimpleTestModelSchema", "description": "A simple model for testing", "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "properties": { "modelNumber": { "type": "string", "maxLength": 4, "description": "The number of the model.", "pattern": "[0-9]", "required": true }, "optionalprop": { "type": "string", "description": "an optional property." } } });
- define([ ? ^ + define({ ? ^ - ], function ( - ) { - - return { - "id": "TestData/SimpleTestModelSchema", ? ---- + "id": "TestData/SimpleTestModelSchema", - "description": "A simple model for testing", ? ---- + "description": "A simple model for testing", - "$schema": "http://json-schema.org/draft-03/schema", ? ---- + "$schema": "http://json-schema.org/draft-03/schema", - "type": "object", ? ---- + "type": "object", - "properties": { ? ---- + "properties": { - "modelNumber": { ? ---- + "modelNumber": { - "type": "string", ? ---- + "type": "string", - "maxLength": 4, ? ---- + "maxLength": 4, - "description": "The number of the model.", ? ---- + "description": "The number of the model.", + "pattern": "[0-9]", - "required": true ? ---- + "required": true - }, ? ---- + }, - "optionalprop": { ? ---- + "optionalprop": { - "type": "string", ? ---- + "type": "string", - "description": "an optional property.", ? ---- - + "description": "an optional property." - "optional": true - } } - }; ? - + } });
39
1.625
17
22
1cf043a83ebe864c44e224228742e6a669ae928f
Source/UnitTesting.swift
Source/UnitTesting.swift
// // Created by Tom Baranes on 14/07/16. // Copyright © 2016 Tom Baranes. All rights reserved. // import Foundation import QuartzCore public struct UnitTesting { public static var isRunning: Bool { return ProcessInfo.processInfo.environment["XCInjectBundle"] != nil } public static func measure(closure: () -> Void) -> Float { let start = CACurrentMediaTime() closure() let end = CACurrentMediaTime() return Float(end - start) } }
// // Created by Tom Baranes on 14/07/16. // Copyright © 2016 Tom Baranes. All rights reserved. // import Foundation import QuartzCore public struct UnitTesting { public static var isRunning: Bool { return ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil } public static func measure(closure: () -> Void) -> Float { let start = CACurrentMediaTime() closure() let end = CACurrentMediaTime() return Float(end - start) } }
Fix UnitTest isRunning on xcode8
Fix UnitTest isRunning on xcode8
Swift
mit
tbaranes/SwiftyUtils,tbaranes/SwiftyUtils
swift
## Code Before: // // Created by Tom Baranes on 14/07/16. // Copyright © 2016 Tom Baranes. All rights reserved. // import Foundation import QuartzCore public struct UnitTesting { public static var isRunning: Bool { return ProcessInfo.processInfo.environment["XCInjectBundle"] != nil } public static func measure(closure: () -> Void) -> Float { let start = CACurrentMediaTime() closure() let end = CACurrentMediaTime() return Float(end - start) } } ## Instruction: Fix UnitTest isRunning on xcode8 ## Code After: // // Created by Tom Baranes on 14/07/16. // Copyright © 2016 Tom Baranes. All rights reserved. // import Foundation import QuartzCore public struct UnitTesting { public static var isRunning: Bool { return ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil } public static func measure(closure: () -> Void) -> Float { let start = CACurrentMediaTime() closure() let end = CACurrentMediaTime() return Float(end - start) } }
// // Created by Tom Baranes on 14/07/16. // Copyright © 2016 Tom Baranes. All rights reserved. // import Foundation import QuartzCore public struct UnitTesting { public static var isRunning: Bool { - return ProcessInfo.processInfo.environment["XCInjectBundle"] != nil ? ^ ^^^ ^^ ^ + return ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil ? ^^^^^^ ^^^^^^ ^^ ^^ ++++ } public static func measure(closure: () -> Void) -> Float { let start = CACurrentMediaTime() closure() let end = CACurrentMediaTime() return Float(end - start) } }
2
0.090909
1
1
138a01aaa814c7d39a3d6dee8f09f2fe92cc09f6
src/main/java/mods/railcraft/api/crafting/ICokeOvenCraftingManager.java
src/main/java/mods/railcraft/api/crafting/ICokeOvenCraftingManager.java
/*------------------------------------------------------------------------------ Copyright (c) CovertJaguar, 2011-2016 This work (the API) is licensed under the "MIT" License, see LICENSE.md for details. -----------------------------------------------------------------------------*/ package mods.railcraft.api.crafting; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; /** * * @author CovertJaguar <http://www.railcraft.info> */ public interface ICokeOvenCraftingManager { void addRecipe(ItemStack input, boolean matchDamage, boolean matchNBT, ItemStack output, FluidStack liquidOutput, int cookTime); @Nullable ICokeOvenRecipe getRecipe(ItemStack stack); List<? extends ICokeOvenRecipe> getRecipes(); }
/*------------------------------------------------------------------------------ Copyright (c) CovertJaguar, 2011-2016 This work (the API) is licensed under the "MIT" License, see LICENSE.md for details. -----------------------------------------------------------------------------*/ package mods.railcraft.api.crafting; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; /** * * @author CovertJaguar <http://www.railcraft.info> */ public interface ICokeOvenCraftingManager { void addRecipe(ItemStack input, boolean matchDamage, boolean matchNBT, ItemStack output, @Nullable FluidStack liquidOutput, int cookTime); @Nullable ICokeOvenRecipe getRecipe(ItemStack stack); List<? extends ICokeOvenRecipe> getRecipes(); }
Add a nullable to fluid stack
Add a nullable to fluid stack Signed-off-by: liach <0428df7f4d1579e7bcd23f3c4e7cd8401bcee5a4@users.noreply.github.com>
Java
mit
liachmodded/Railcraft-API
java
## Code Before: /*------------------------------------------------------------------------------ Copyright (c) CovertJaguar, 2011-2016 This work (the API) is licensed under the "MIT" License, see LICENSE.md for details. -----------------------------------------------------------------------------*/ package mods.railcraft.api.crafting; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; /** * * @author CovertJaguar <http://www.railcraft.info> */ public interface ICokeOvenCraftingManager { void addRecipe(ItemStack input, boolean matchDamage, boolean matchNBT, ItemStack output, FluidStack liquidOutput, int cookTime); @Nullable ICokeOvenRecipe getRecipe(ItemStack stack); List<? extends ICokeOvenRecipe> getRecipes(); } ## Instruction: Add a nullable to fluid stack Signed-off-by: liach <0428df7f4d1579e7bcd23f3c4e7cd8401bcee5a4@users.noreply.github.com> ## Code After: /*------------------------------------------------------------------------------ Copyright (c) CovertJaguar, 2011-2016 This work (the API) is licensed under the "MIT" License, see LICENSE.md for details. -----------------------------------------------------------------------------*/ package mods.railcraft.api.crafting; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; /** * * @author CovertJaguar <http://www.railcraft.info> */ public interface ICokeOvenCraftingManager { void addRecipe(ItemStack input, boolean matchDamage, boolean matchNBT, ItemStack output, @Nullable FluidStack liquidOutput, int cookTime); @Nullable ICokeOvenRecipe getRecipe(ItemStack stack); List<? extends ICokeOvenRecipe> getRecipes(); }
/*------------------------------------------------------------------------------ Copyright (c) CovertJaguar, 2011-2016 This work (the API) is licensed under the "MIT" License, see LICENSE.md for details. -----------------------------------------------------------------------------*/ package mods.railcraft.api.crafting; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; /** * * @author CovertJaguar <http://www.railcraft.info> */ public interface ICokeOvenCraftingManager { - void addRecipe(ItemStack input, boolean matchDamage, boolean matchNBT, ItemStack output, FluidStack liquidOutput, int cookTime); + void addRecipe(ItemStack input, boolean matchDamage, boolean matchNBT, ItemStack output, @Nullable FluidStack liquidOutput, int cookTime); ? ++++++++++ @Nullable ICokeOvenRecipe getRecipe(ItemStack stack); List<? extends ICokeOvenRecipe> getRecipes(); }
2
0.071429
1
1
1be4a93dfa6c4489e0b5dc609ed1eeae5527413b
app/overrides/spree/admin/payment_methods/_form/add_image_button.html.erb.deface
app/overrides/spree/admin/payment_methods/_form/add_image_button.html.erb.deface
<!-- insert_after '[data-hook=active]' --> <div class="field"> <%= f.label :icon %> <%= f.file_field :icon %> <%= image_tag @payment_method.icon.url(:normal) %> </div>
<!-- insert_after '[data-hook=active]' --> <div class="field"> <%= label_tag nil, Spree.t(:icon) %> <%= file_field :payment_method, :icon %> <%= image_tag @payment_method.icon.url(:normal) %> </div>
Fix error when uploading image
Fix error when uploading image
unknown
bsd-3-clause
stevenbarragan/spree_payment_image,stevenbarragan/spree_payment_image
unknown
## Code Before: <!-- insert_after '[data-hook=active]' --> <div class="field"> <%= f.label :icon %> <%= f.file_field :icon %> <%= image_tag @payment_method.icon.url(:normal) %> </div> ## Instruction: Fix error when uploading image ## Code After: <!-- insert_after '[data-hook=active]' --> <div class="field"> <%= label_tag nil, Spree.t(:icon) %> <%= file_field :payment_method, :icon %> <%= image_tag @payment_method.icon.url(:normal) %> </div>
<!-- insert_after '[data-hook=active]' --> <div class="field"> - <%= f.label :icon %> - <%= f.file_field :icon %> + <%= label_tag nil, Spree.t(:icon) %> + <%= file_field :payment_method, :icon %> <%= image_tag @payment_method.icon.url(:normal) %> </div>
4
0.666667
2
2
88f6db73acae9e286573b2a18f4018b4c886126b
spec/support/custom_helpers.rb
spec/support/custom_helpers.rb
module CustomHelpers def use_cassette(name, options = {}) VCR.use_cassette(name, options) { yield } end def authorized_connection connection = SpBus::Connection.new use_cassette(:successful_authentication) do SpBus::Authentication.new(connection, SpecEnv.valid_api_token).authorize end connection end end
module CustomHelpers def use_cassette(name, options = {}) VCR.use_cassette(name, options) { yield } end def authorized_connection connection = SpBus::Connection.new use_cassette(:successful_authentication) do SpBus::Authentication.new(connection, SpecEnv.valid_api_token).authorize end connection end def regexp_matcher(regexp) RSpec::Mocks::ArgumentMatchers::RegexpMatcher.new(regexp) end end
Create a helper to match regular expressions.
Create a helper to match regular expressions.
Ruby
mit
lenon/spbus
ruby
## Code Before: module CustomHelpers def use_cassette(name, options = {}) VCR.use_cassette(name, options) { yield } end def authorized_connection connection = SpBus::Connection.new use_cassette(:successful_authentication) do SpBus::Authentication.new(connection, SpecEnv.valid_api_token).authorize end connection end end ## Instruction: Create a helper to match regular expressions. ## Code After: module CustomHelpers def use_cassette(name, options = {}) VCR.use_cassette(name, options) { yield } end def authorized_connection connection = SpBus::Connection.new use_cassette(:successful_authentication) do SpBus::Authentication.new(connection, SpecEnv.valid_api_token).authorize end connection end def regexp_matcher(regexp) RSpec::Mocks::ArgumentMatchers::RegexpMatcher.new(regexp) end end
module CustomHelpers def use_cassette(name, options = {}) VCR.use_cassette(name, options) { yield } end def authorized_connection connection = SpBus::Connection.new use_cassette(:successful_authentication) do SpBus::Authentication.new(connection, SpecEnv.valid_api_token).authorize end connection end + + def regexp_matcher(regexp) + RSpec::Mocks::ArgumentMatchers::RegexpMatcher.new(regexp) + end end
4
0.285714
4
0
4c009457646a8272b3fe4d748b29f1a91f49d6c0
assets/css/links-sender.css
assets/css/links-sender.css
.links-sender { position: fixed !important; bottom: 0; width: 100%; } .links-sender .send-button { color: #75b0ba; } .links-sender .deactivate { color: lightgray; pointer-events: none; } .links-sender .error-msg { color: #cc0000; } .links-sender input[type="text"]:focus { border-color: #75b0ba; }
.links-sender { position: fixed !important; bottom: 0; width: 100%; } .links-sender .send-button { color: #75b0ba; } .links-sender .error-msg { color: #cc0000; } .links-sender input[type="text"]:focus { border-color: #75b0ba; }
Use disabled attribute instead of deactivate class
Use disabled attribute instead of deactivate class
CSS
mit
unblee/jukebox,unblee/jukebox
css
## Code Before: .links-sender { position: fixed !important; bottom: 0; width: 100%; } .links-sender .send-button { color: #75b0ba; } .links-sender .deactivate { color: lightgray; pointer-events: none; } .links-sender .error-msg { color: #cc0000; } .links-sender input[type="text"]:focus { border-color: #75b0ba; } ## Instruction: Use disabled attribute instead of deactivate class ## Code After: .links-sender { position: fixed !important; bottom: 0; width: 100%; } .links-sender .send-button { color: #75b0ba; } .links-sender .error-msg { color: #cc0000; } .links-sender input[type="text"]:focus { border-color: #75b0ba; }
.links-sender { position: fixed !important; bottom: 0; width: 100%; } .links-sender .send-button { color: #75b0ba; } - .links-sender .deactivate { - color: lightgray; - pointer-events: none; - } - .links-sender .error-msg { color: #cc0000; } .links-sender input[type="text"]:focus { border-color: #75b0ba; }
5
0.227273
0
5
47514c2c74054dce5950d5d5b021d85f715f0882
install-atom-editor-deb.sh
install-atom-editor-deb.sh
cd /tmp && wget https://atom.io/download/deb -O atom-editor.deb && sudo dpkg -i ./atom-editor.deb && apm install sublime-style-column-selection \ color-picker emmet file-icons language-vue linter linter-eslint linter-php \ minimap
cd /tmp && wget https://atom.io/download/deb -O atom-editor.deb && sudo dpkg -i ./atom-editor.deb && apm install sublime-style-column-selection \ atom-ide-ui ide-css ide-php ide-rust ide-typescript ide-vue language-vue emmet \ color-picker file-icons minimap
Update Atom installer to include atom-ide-ui
Update Atom installer to include atom-ide-ui
Shell
mit
ricvelozo/scripts,ricvelozo/scripts
shell
## Code Before: cd /tmp && wget https://atom.io/download/deb -O atom-editor.deb && sudo dpkg -i ./atom-editor.deb && apm install sublime-style-column-selection \ color-picker emmet file-icons language-vue linter linter-eslint linter-php \ minimap ## Instruction: Update Atom installer to include atom-ide-ui ## Code After: cd /tmp && wget https://atom.io/download/deb -O atom-editor.deb && sudo dpkg -i ./atom-editor.deb && apm install sublime-style-column-selection \ atom-ide-ui ide-css ide-php ide-rust ide-typescript ide-vue language-vue emmet \ color-picker file-icons minimap
cd /tmp && wget https://atom.io/download/deb -O atom-editor.deb && sudo dpkg -i ./atom-editor.deb && apm install sublime-style-column-selection \ - color-picker emmet file-icons language-vue linter linter-eslint linter-php \ - minimap + atom-ide-ui ide-css ide-php ide-rust ide-typescript ide-vue language-vue emmet \ + color-picker file-icons minimap
4
1
2
2
867c0598565ed6b9fdae43d6c9431974d692cd44
cytoolz/__init__.pxd
cytoolz/__init__.pxd
from .itertoolz cimport (groupby, frequencies, reduceby, first, second, nth, take, drop, rest, last, get, concat, concatv, isdistinct, interleave, interpose, unique, isiterable, remove, iterate, accumulate, partition, count, cons, take_nth) from .functoolz cimport (memoize, c_memoize, curry, c_compose, c_thread_first, c_thread_last, identity, c_pipe, complement, c_juxt, do) from .dicttoolz cimport (c_merge, c_merge_with, keymap, valmap, assoc, keyfilter, valfilter)
from cytoolz.itertoolz cimport ( accumulate, cons, count, drop, get, groupby, first, frequencies, interleave, interpose, isdistinct, isiterable, iterate, last, nth, partition, reduceby, remove, rest, second, take, take_nth, unique) from cytoolz.functoolz cimport ( c_compose, c_juxt, c_memoize, c_pipe, c_thread_first, c_thread_last, complement, curry, do, identity, memoize) from cytoolz.dicttoolz cimport ( assoc, c_merge, c_merge_with, keyfilter, keymap, valfilter, valmap)
Use absolute `cimport` in *.pxd files. Relative cimporting doesn't appear to work.
Use absolute `cimport` in *.pxd files. Relative cimporting doesn't appear to work. Also, alphabetize import in "cytoolz/__init__.pxd" (just because). The main reason we don't do `from cytoolz.itertoolz cimport *` is so there is a quick and easy reference for what is cimport-able.
Cython
bsd-3-clause
cpcloud/cytoolz,ljwolf/cytoolz,llllllllll/cytoolz,simudream/cytoolz,simudream/cytoolz,llllllllll/cytoolz,cpcloud/cytoolz
cython
## Code Before: from .itertoolz cimport (groupby, frequencies, reduceby, first, second, nth, take, drop, rest, last, get, concat, concatv, isdistinct, interleave, interpose, unique, isiterable, remove, iterate, accumulate, partition, count, cons, take_nth) from .functoolz cimport (memoize, c_memoize, curry, c_compose, c_thread_first, c_thread_last, identity, c_pipe, complement, c_juxt, do) from .dicttoolz cimport (c_merge, c_merge_with, keymap, valmap, assoc, keyfilter, valfilter) ## Instruction: Use absolute `cimport` in *.pxd files. Relative cimporting doesn't appear to work. Also, alphabetize import in "cytoolz/__init__.pxd" (just because). The main reason we don't do `from cytoolz.itertoolz cimport *` is so there is a quick and easy reference for what is cimport-able. ## Code After: from cytoolz.itertoolz cimport ( accumulate, cons, count, drop, get, groupby, first, frequencies, interleave, interpose, isdistinct, isiterable, iterate, last, nth, partition, reduceby, remove, rest, second, take, take_nth, unique) from cytoolz.functoolz cimport ( c_compose, c_juxt, c_memoize, c_pipe, c_thread_first, c_thread_last, complement, curry, do, identity, memoize) from cytoolz.dicttoolz cimport ( assoc, c_merge, c_merge_with, keyfilter, keymap, valfilter, valmap)
+ from cytoolz.itertoolz cimport ( + accumulate, cons, count, drop, get, groupby, first, frequencies, + interleave, interpose, isdistinct, isiterable, iterate, last, nth, + partition, reduceby, remove, rest, second, take, take_nth, unique) - from .itertoolz cimport (groupby, frequencies, reduceby, - first, second, nth, take, drop, rest, last, - get, concat, concatv, isdistinct, interleave, - interpose, unique, isiterable, remove, iterate, - accumulate, partition, count, cons, take_nth) - from .functoolz cimport (memoize, c_memoize, curry, c_compose, c_thread_first, - c_thread_last, identity, c_pipe, complement, c_juxt, - do) - from .dicttoolz cimport (c_merge, c_merge_with, keymap, valmap, assoc, - keyfilter, valfilter) + from cytoolz.functoolz cimport ( + c_compose, c_juxt, c_memoize, c_pipe, c_thread_first, c_thread_last, + complement, curry, do, identity, memoize) + + + from cytoolz.dicttoolz cimport ( + assoc, c_merge, c_merge_with, keyfilter, keymap, valfilter, valmap)
21
1.75
11
10
992ac423275bc6ac63e89ed280f1c2a11df2f328
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.11) project(symbolicmath) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Some variables set(EXEC_NAME main) set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") # Find sources and headers by globbing file(GLOB SRC . src/*.cpp) file(GLOB HEADERS . src/*.h) # Tell CMake to create the executable add_executable(${EXEC_NAME} ${SRC})
cmake_minimum_required(VERSION 2.8.11) project(symbolicmath) set(CMAKE_INCLUDE_CURRENT_DIR ON) # All warnings, from stackoverflow if(MSVC) # Force to always compile with W4 if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) # Update if necessary set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic") endif() # Some variables set(EXEC_NAME main) set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") # Find sources and headers by globbing file(GLOB SRC . src/*.cpp) file(GLOB HEADERS . src/*.h) # Tell CMake to create the executable add_executable(${EXEC_NAME} ${SRC})
Use all warning flags in cmake
Use all warning flags in cmake Compiles with, for instance, g++ and -Wall
Text
mit
aabmass/ArithmeticExpressionCompiler
text
## Code Before: cmake_minimum_required(VERSION 2.8.11) project(symbolicmath) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Some variables set(EXEC_NAME main) set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") # Find sources and headers by globbing file(GLOB SRC . src/*.cpp) file(GLOB HEADERS . src/*.h) # Tell CMake to create the executable add_executable(${EXEC_NAME} ${SRC}) ## Instruction: Use all warning flags in cmake Compiles with, for instance, g++ and -Wall ## Code After: cmake_minimum_required(VERSION 2.8.11) project(symbolicmath) set(CMAKE_INCLUDE_CURRENT_DIR ON) # All warnings, from stackoverflow if(MSVC) # Force to always compile with W4 if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) # Update if necessary set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic") endif() # Some variables set(EXEC_NAME main) set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") # Find sources and headers by globbing file(GLOB SRC . src/*.cpp) file(GLOB HEADERS . src/*.h) # Tell CMake to create the executable add_executable(${EXEC_NAME} ${SRC})
cmake_minimum_required(VERSION 2.8.11) project(symbolicmath) set(CMAKE_INCLUDE_CURRENT_DIR ON) + + # All warnings, from stackoverflow + if(MSVC) + # Force to always compile with W4 + if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif() + elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + # Update if necessary + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic") + endif() # Some variables set(EXEC_NAME main) set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") # Find sources and headers by globbing file(GLOB SRC . src/*.cpp) file(GLOB HEADERS . src/*.h) # Tell CMake to create the executable add_executable(${EXEC_NAME} ${SRC})
13
0.866667
13
0
9ee41ed7814c0d12ad703c84a414b25e32eac0f7
src/scss/base/_ie.scss
src/scss/base/_ie.scss
// IE specific hacks html.ie { main { display: block; } .card { // No display: flex supported display: block; } }
// IE specific hacks html.ie { main { display: block; } .card { // No display: flex supported display: block; height: auto; } }
Fix layout in IE 11, second attempt
Fix layout in IE 11, second attempt
SCSS
apache-2.0
CDE-UNIBE/qcat,CDE-UNIBE/qcat,CDE-UNIBE/qcat,CDE-UNIBE/qcat
scss
## Code Before: // IE specific hacks html.ie { main { display: block; } .card { // No display: flex supported display: block; } } ## Instruction: Fix layout in IE 11, second attempt ## Code After: // IE specific hacks html.ie { main { display: block; } .card { // No display: flex supported display: block; height: auto; } }
// IE specific hacks html.ie { main { display: block; } .card { // No display: flex supported display: block; + height: auto; } }
1
0.083333
1
0
d66f4a429a0e584b1ce45ca652a27ecd6c372e8c
climate_data/migrations/0024_auto_20170623_0308.py
climate_data/migrations/0024_auto_20170623_0308.py
from __future__ import unicode_literals from django.db import migrations # noinspection PyUnusedLocal def add_station_sensor_link_to_reading(apps, schema_editor): # noinspection PyPep8Naming Reading = apps.get_model('climate_data', 'Reading') # noinspection PyPep8Naming StationSensorLink = apps.get_model('climate_data', 'StationSensorLink') for reading in Reading.objects.all(): reading.station_sensor_link = StationSensorLink.objects.filter(station=reading.station, sensor=reading.sensor)\ .first() reading.save() class Migration(migrations.Migration): dependencies = [ ('climate_data', '0023_reading_station_sensor_link'), ] operations = [ migrations.RunPython(add_station_sensor_link_to_reading), ]
from __future__ import unicode_literals from django.db import migrations # noinspection PyUnusedLocal def add_station_sensor_link_to_reading(apps, schema_editor): # noinspection PyPep8Naming Reading = apps.get_model('climate_data', 'Reading') # noinspection PyPep8Naming StationSensorLink = apps.get_model('climate_data', 'StationSensorLink') offset = 0 pagesize = 5000 count = Reading.objects.all().count() while offset < count: for reading in Reading.objects.all()[offset:offset+pagesize].iterator(): reading.station_sensor_link = StationSensorLink.objects.filter( station=reading.station, sensor=reading.sensor ).first() reading.save() offset += pagesize class Migration(migrations.Migration): dependencies = [ ('climate_data', '0023_reading_station_sensor_link'), ] operations = [ migrations.RunPython(add_station_sensor_link_to_reading), ]
Improve station-sensor link field addition to reading model migration using a paging system to prevent the migration being killed automatically.
Improve station-sensor link field addition to reading model migration using a paging system to prevent the migration being killed automatically.
Python
apache-2.0
qubs/data-centre,qubs/climate-data-api,qubs/climate-data-api,qubs/data-centre
python
## Code Before: from __future__ import unicode_literals from django.db import migrations # noinspection PyUnusedLocal def add_station_sensor_link_to_reading(apps, schema_editor): # noinspection PyPep8Naming Reading = apps.get_model('climate_data', 'Reading') # noinspection PyPep8Naming StationSensorLink = apps.get_model('climate_data', 'StationSensorLink') for reading in Reading.objects.all(): reading.station_sensor_link = StationSensorLink.objects.filter(station=reading.station, sensor=reading.sensor)\ .first() reading.save() class Migration(migrations.Migration): dependencies = [ ('climate_data', '0023_reading_station_sensor_link'), ] operations = [ migrations.RunPython(add_station_sensor_link_to_reading), ] ## Instruction: Improve station-sensor link field addition to reading model migration using a paging system to prevent the migration being killed automatically. ## Code After: from __future__ import unicode_literals from django.db import migrations # noinspection PyUnusedLocal def add_station_sensor_link_to_reading(apps, schema_editor): # noinspection PyPep8Naming Reading = apps.get_model('climate_data', 'Reading') # noinspection PyPep8Naming StationSensorLink = apps.get_model('climate_data', 'StationSensorLink') offset = 0 pagesize = 5000 count = Reading.objects.all().count() while offset < count: for reading in Reading.objects.all()[offset:offset+pagesize].iterator(): reading.station_sensor_link = StationSensorLink.objects.filter( station=reading.station, sensor=reading.sensor ).first() reading.save() offset += pagesize class Migration(migrations.Migration): dependencies = [ ('climate_data', '0023_reading_station_sensor_link'), ] operations = [ migrations.RunPython(add_station_sensor_link_to_reading), ]
from __future__ import unicode_literals from django.db import migrations # noinspection PyUnusedLocal def add_station_sensor_link_to_reading(apps, schema_editor): # noinspection PyPep8Naming Reading = apps.get_model('climate_data', 'Reading') # noinspection PyPep8Naming StationSensorLink = apps.get_model('climate_data', 'StationSensorLink') - for reading in Reading.objects.all(): - reading.station_sensor_link = StationSensorLink.objects.filter(station=reading.station, sensor=reading.sensor)\ + offset = 0 + pagesize = 5000 + count = Reading.objects.all().count() + + while offset < count: + for reading in Reading.objects.all()[offset:offset+pagesize].iterator(): + reading.station_sensor_link = StationSensorLink.objects.filter( + station=reading.station, + sensor=reading.sensor - .first() + ).first() ? + - reading.save() + reading.save() ? ++++ + + offset += pagesize class Migration(migrations.Migration): dependencies = [ ('climate_data', '0023_reading_station_sensor_link'), ] operations = [ migrations.RunPython(add_station_sensor_link_to_reading), ]
17
0.62963
13
4
e9f37843940b64df7aec2c86132e0b1cd043dec4
tools/regression/usr.bin/uuencode/regress.sh
tools/regression/usr.bin/uuencode/regress.sh
TESTDIR=$1 if [ -z "$TESTDIR" ]; then TESTDIR=. fi cd $TESTDIR for test in traditional base64; do echo "Running test $test" case "$test" in traditional) uuencode regress.in regress.in | diff -u regress.$test.out - ;; base64) uuencode -m regress.in regress.in | diff -u regress.$test.out - ;; esac if [ $? -eq 0 ]; then echo "Test $test detected no regression, output matches." else echo "Test $test failed: regression detected. See above." exit 1 fi done
TESTDIR=$1 if [ -z "$TESTDIR" ]; then TESTDIR=. fi cd $TESTDIR # Note that currently the uuencode(1) program provides no facility to # include the file mode explicitly based on an argument passed to it, # so the regress.in file must be mode 644, or the test will say that, # incorrectly, regression has occurred based on the header. for test in traditional base64; do echo "Running test $test" case "$test" in traditional) uuencode regress.in regress.in | diff -u regress.$test.out - ;; base64) uuencode -m regress.in regress.in | diff -u regress.$test.out - ;; esac if [ $? -eq 0 ]; then echo "Test $test detected no regression, output matches." else echo "Test $test failed: regression detected. See above." exit 1 fi done
Add a comment regarding the file header, and the mode that the file is created with.
Add a comment regarding the file header, and the mode that the file is created with. This should be fixed shortly by adding the (desirable) option to set the file creation mode on the command line.
Shell
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
shell
## Code Before: TESTDIR=$1 if [ -z "$TESTDIR" ]; then TESTDIR=. fi cd $TESTDIR for test in traditional base64; do echo "Running test $test" case "$test" in traditional) uuencode regress.in regress.in | diff -u regress.$test.out - ;; base64) uuencode -m regress.in regress.in | diff -u regress.$test.out - ;; esac if [ $? -eq 0 ]; then echo "Test $test detected no regression, output matches." else echo "Test $test failed: regression detected. See above." exit 1 fi done ## Instruction: Add a comment regarding the file header, and the mode that the file is created with. This should be fixed shortly by adding the (desirable) option to set the file creation mode on the command line. ## Code After: TESTDIR=$1 if [ -z "$TESTDIR" ]; then TESTDIR=. fi cd $TESTDIR # Note that currently the uuencode(1) program provides no facility to # include the file mode explicitly based on an argument passed to it, # so the regress.in file must be mode 644, or the test will say that, # incorrectly, regression has occurred based on the header. for test in traditional base64; do echo "Running test $test" case "$test" in traditional) uuencode regress.in regress.in | diff -u regress.$test.out - ;; base64) uuencode -m regress.in regress.in | diff -u regress.$test.out - ;; esac if [ $? -eq 0 ]; then echo "Test $test detected no regression, output matches." else echo "Test $test failed: regression detected. See above." exit 1 fi done
TESTDIR=$1 if [ -z "$TESTDIR" ]; then TESTDIR=. fi cd $TESTDIR + + # Note that currently the uuencode(1) program provides no facility to + # include the file mode explicitly based on an argument passed to it, + # so the regress.in file must be mode 644, or the test will say that, + # incorrectly, regression has occurred based on the header. for test in traditional base64; do echo "Running test $test" case "$test" in traditional) uuencode regress.in regress.in | diff -u regress.$test.out - ;; base64) uuencode -m regress.in regress.in | diff -u regress.$test.out - ;; esac if [ $? -eq 0 ]; then echo "Test $test detected no regression, output matches." else echo "Test $test failed: regression detected. See above." exit 1 fi done
5
0.217391
5
0
12151b4630b255bdcf72f482e143b2d71bc25340
CONTRIBUTING.md
CONTRIBUTING.md
Any help is welcome and appreciated. ## Ways to contribute * Adding [new rules](docs/developer-guide.md). Whether it's one of the [few](https://github.com/stylelint/stylelint/issues/1) that we've still to do, or something that you need and we've not thought about. * Expanding the [documentation](docs). * Working on [open issues](https://github.com/stylelint/stylelint/issues). ## Communication We communicate mostly via [issues](https://github.com/stylelint/stylelint/issues) and [pull requests](https://github.com/stylelint/stylelint/pulls), but there is also a [gitter room](https://gitter.im/stylelint/stylelint) for chat. ### Conduct Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer, merely an optimal answer given a set of values and circumstances. Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
Any help is welcome and appreciated. ## Ways to contribute * Adding [new rules](docs/developer-guide.md). Whether it's one of the [few](https://github.com/stylelint/stylelint/issues?utf8=%E2%9C%93&q=%22New+rule%22+in%3Atitle+is%3Aopen) that we've still to do, or something that you need and we've not thought about. * Expanding the [documentation](docs). * Working on other [open issues](https://github.com/stylelint/stylelint/issues). ## Communication We communicate mostly via [issues](https://github.com/stylelint/stylelint/issues) and [pull requests](https://github.com/stylelint/stylelint/pulls), but there is also a [gitter room](https://gitter.im/stylelint/stylelint) for chat. ### Conduct Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer, merely an optimal answer given a set of values and circumstances. Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
Add link to open "New rule" issues
Add link to open "New rule" issues
Markdown
mit
hudochenkov/stylelint,heatwaveo8/stylelint,stylelint/stylelint,m-allanson/stylelint,gucong3000/stylelint,stylelint/stylelint,gucong3000/stylelint,gaidarenko/stylelint,gucong3000/stylelint,gaidarenko/stylelint,evilebottnawi/stylelint,heatwaveo8/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,evilebottnawi/stylelint,gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint
markdown
## Code Before: Any help is welcome and appreciated. ## Ways to contribute * Adding [new rules](docs/developer-guide.md). Whether it's one of the [few](https://github.com/stylelint/stylelint/issues/1) that we've still to do, or something that you need and we've not thought about. * Expanding the [documentation](docs). * Working on [open issues](https://github.com/stylelint/stylelint/issues). ## Communication We communicate mostly via [issues](https://github.com/stylelint/stylelint/issues) and [pull requests](https://github.com/stylelint/stylelint/pulls), but there is also a [gitter room](https://gitter.im/stylelint/stylelint) for chat. ### Conduct Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer, merely an optimal answer given a set of values and circumstances. Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works. ## Instruction: Add link to open "New rule" issues ## Code After: Any help is welcome and appreciated. ## Ways to contribute * Adding [new rules](docs/developer-guide.md). Whether it's one of the [few](https://github.com/stylelint/stylelint/issues?utf8=%E2%9C%93&q=%22New+rule%22+in%3Atitle+is%3Aopen) that we've still to do, or something that you need and we've not thought about. * Expanding the [documentation](docs). * Working on other [open issues](https://github.com/stylelint/stylelint/issues). ## Communication We communicate mostly via [issues](https://github.com/stylelint/stylelint/issues) and [pull requests](https://github.com/stylelint/stylelint/pulls), but there is also a [gitter room](https://gitter.im/stylelint/stylelint) for chat. ### Conduct Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer, merely an optimal answer given a set of values and circumstances. Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
Any help is welcome and appreciated. ## Ways to contribute - * Adding [new rules](docs/developer-guide.md). Whether it's one of the [few](https://github.com/stylelint/stylelint/issues/1) that we've still to do, or something that you need and we've not thought about. ? ^^ + * Adding [new rules](docs/developer-guide.md). Whether it's one of the [few](https://github.com/stylelint/stylelint/issues?utf8=%E2%9C%93&q=%22New+rule%22+in%3Atitle+is%3Aopen) that we've still to do, or something that you need and we've not thought about. ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Expanding the [documentation](docs). - * Working on [open issues](https://github.com/stylelint/stylelint/issues). + * Working on other [open issues](https://github.com/stylelint/stylelint/issues). ? ++++++ ## Communication We communicate mostly via [issues](https://github.com/stylelint/stylelint/issues) and [pull requests](https://github.com/stylelint/stylelint/pulls), but there is also a [gitter room](https://gitter.im/stylelint/stylelint) for chat. ### Conduct Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer, merely an optimal answer given a set of values and circumstances. Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
4
0.222222
2
2
0a90ff8186174ab91d183b27ab72ac2e12b376b3
.travis.yml
.travis.yml
language: objective-c osx_image: xcode7.3 rvm: - 2.2 podfile: Sensorama/Podfile script: - ./build.sh bootstrap - ./build.sh addons: ssh_known_hosts: - gitlab.com
language: objective-c osx_image: xcode7.3 cache: cocoapods rvm: - 2.2 podfile: Sensorama/Podfile script: - ./build.sh bootstrap - ./build.sh addons: ssh_known_hosts: - gitlab.com
Add CocoaPods to the cache.
Add CocoaPods to the cache. Otherwise it's very slow.
YAML
bsd-2-clause
wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios
yaml
## Code Before: language: objective-c osx_image: xcode7.3 rvm: - 2.2 podfile: Sensorama/Podfile script: - ./build.sh bootstrap - ./build.sh addons: ssh_known_hosts: - gitlab.com ## Instruction: Add CocoaPods to the cache. Otherwise it's very slow. ## Code After: language: objective-c osx_image: xcode7.3 cache: cocoapods rvm: - 2.2 podfile: Sensorama/Podfile script: - ./build.sh bootstrap - ./build.sh addons: ssh_known_hosts: - gitlab.com
language: objective-c osx_image: xcode7.3 + cache: cocoapods rvm: - 2.2 podfile: Sensorama/Podfile script: - ./build.sh bootstrap - ./build.sh addons: ssh_known_hosts: - gitlab.com
1
0.090909
1
0
bd08c96e5fa5eaebd9d0d8fc160ecfacc4a8f567
README.md
README.md
[![Build Status](https://travis-ci.org/IG-Group/ig-webapi-dotnet-sample.svg?branch=master)](https://travis-ci.org/IG-Group/ig-webapi-dotnet-sample) ### Overview This repository contains a .NET WPF sample application written in C# to access the IG REST and Streaming APIs. ### Getting started 1) Open the solution with Visual Studio 2015 or later. 2) Configure the SampleWPFTrader **App.config** file: ``` <!-- environment = demo|live --> <add key="environment" value="demo" /> <add key="username" value="mydemouser" /> <add key="password" value="mydemopassword" /> <add key="apikey" value="3b577d884a6ba7d2b0d036f443bec954ebf3cf14" /> ``` Use the NuGet Package manager if necessary to update assembly references. 3) Build and run the sample application. ### Solution details **SampleWPFTrader** contains the WPF implementation. **IGWebApiClient** contains a REST and streaming client with DTO classes to access the IG Web API. **packages** contains 3rd party libraries located under **packages/3rdPartyDlls** (e.g. Lightstreamer client's DotNetClient_N2.dll) and those managed by NuGet's package manager.
This repository contains a .NET WPF sample application written in C# to access the IG REST and Streaming APIs. ### Getting started 1) Open the solution with Visual Studio 2015 or later. 2) Configure the SampleWPFTrader **App.config** file: ``` <!-- environment = demo|live --> <add key="environment" value="demo" /> <add key="username" value="mydemouser" /> <add key="password" value="mydemopassword" /> <add key="apikey" value="3b577d884a6ba7d2b0d036f443bec954ebf3cf14" /> ``` Use the NuGet Package manager if necessary to update assembly references. 3) Build and run the sample application. ### Solution details **SampleWPFTrader** contains the WPF implementation. **IGWebApiClient** contains a REST and streaming client with DTO classes to access the IG Web API. **packages** contains 3rd party libraries located under **packages/3rdPartyDlls** (e.g. Lightstreamer client's DotNetClient_N2.dll) and those managed by NuGet's package manager.
Remove build status icon as Travis can't build WPF projects.
Remove build status icon as Travis can't build WPF projects.
Markdown
bsd-3-clause
IG-Group/ig-webapi-dotnet-sample
markdown
## Code Before: [![Build Status](https://travis-ci.org/IG-Group/ig-webapi-dotnet-sample.svg?branch=master)](https://travis-ci.org/IG-Group/ig-webapi-dotnet-sample) ### Overview This repository contains a .NET WPF sample application written in C# to access the IG REST and Streaming APIs. ### Getting started 1) Open the solution with Visual Studio 2015 or later. 2) Configure the SampleWPFTrader **App.config** file: ``` <!-- environment = demo|live --> <add key="environment" value="demo" /> <add key="username" value="mydemouser" /> <add key="password" value="mydemopassword" /> <add key="apikey" value="3b577d884a6ba7d2b0d036f443bec954ebf3cf14" /> ``` Use the NuGet Package manager if necessary to update assembly references. 3) Build and run the sample application. ### Solution details **SampleWPFTrader** contains the WPF implementation. **IGWebApiClient** contains a REST and streaming client with DTO classes to access the IG Web API. **packages** contains 3rd party libraries located under **packages/3rdPartyDlls** (e.g. Lightstreamer client's DotNetClient_N2.dll) and those managed by NuGet's package manager. ## Instruction: Remove build status icon as Travis can't build WPF projects. ## Code After: This repository contains a .NET WPF sample application written in C# to access the IG REST and Streaming APIs. ### Getting started 1) Open the solution with Visual Studio 2015 or later. 2) Configure the SampleWPFTrader **App.config** file: ``` <!-- environment = demo|live --> <add key="environment" value="demo" /> <add key="username" value="mydemouser" /> <add key="password" value="mydemopassword" /> <add key="apikey" value="3b577d884a6ba7d2b0d036f443bec954ebf3cf14" /> ``` Use the NuGet Package manager if necessary to update assembly references. 3) Build and run the sample application. ### Solution details **SampleWPFTrader** contains the WPF implementation. **IGWebApiClient** contains a REST and streaming client with DTO classes to access the IG Web API. **packages** contains 3rd party libraries located under **packages/3rdPartyDlls** (e.g. Lightstreamer client's DotNetClient_N2.dll) and those managed by NuGet's package manager.
- [![Build Status](https://travis-ci.org/IG-Group/ig-webapi-dotnet-sample.svg?branch=master)](https://travis-ci.org/IG-Group/ig-webapi-dotnet-sample) - - ### Overview This repository contains a .NET WPF sample application written in C# to access the IG REST and Streaming APIs. ### Getting started 1) Open the solution with Visual Studio 2015 or later. 2) Configure the SampleWPFTrader **App.config** file: ``` <!-- environment = demo|live --> <add key="environment" value="demo" /> <add key="username" value="mydemouser" /> <add key="password" value="mydemopassword" /> <add key="apikey" value="3b577d884a6ba7d2b0d036f443bec954ebf3cf14" /> ``` Use the NuGet Package manager if necessary to update assembly references. 3) Build and run the sample application. ### Solution details **SampleWPFTrader** contains the WPF implementation. **IGWebApiClient** contains a REST and streaming client with DTO classes to access the IG Web API. **packages** contains 3rd party libraries located under **packages/3rdPartyDlls** (e.g. Lightstreamer client's DotNetClient_N2.dll) and those managed by NuGet's package manager.
3
0.107143
0
3
3a290716f7b6cda51c0dec30507c14025856df16
UM/Qt/qml/UM/Settings/SettingsConfigurationPage.qml
UM/Qt/qml/UM/Settings/SettingsConfigurationPage.qml
import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import UM 1.0 as UM import "../Preferences" PreferencesPage { //: Machine configuration page title. title: qsTr("Machine"); contents: ScrollView { anchors.fill: parent; ListView { delegate: settingDelegate model: UM.Models.settingsModel section.property: "category" section.delegate: Label { text: section } } } Component { id: settingDelegate CheckBox { text: model.name; x: depth * 25 checked: model.visibility onClicked: ListView.view.model.setVisibility(model.key, checked) enabled: !model.disabled } } }
import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import UM 1.0 as UM import "../Preferences" PreferencesPage { //: Machine configuration page title. title: qsTr("Machine"); contents: ColumnLayout { anchors.fill: parent; RowLayout { Label { text: qsTr("Active Machine:"); } ComboBox { id: machineCombo; Layout.fillWidth: true; model: UM.Models.machinesModel; textRole: "name"; onCurrentIndexChanged: { if(currentIndex != -1) UM.Models.machinesModel.setActive(currentIndex); } Connections { id: machineChange target: UM.Application onMachineChanged: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); } Component.onCompleted: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); } Button { text: qsTr("Remove"); } } ScrollView { Layout.fillWidth: true; Layout.fillHeight: true; ListView { delegate: settingDelegate model: UM.Models.settingsModel section.property: "category" section.delegate: Label { text: section } } } } Component { id: settingDelegate CheckBox { text: model.name; x: depth * 25 checked: model.visibility onClicked: ListView.view.model.setVisibility(model.key, checked) enabled: !model.disabled } } }
Add an active machine selector to the machine configuration page
Add an active machine selector to the machine configuration page
QML
agpl-3.0
onitake/Uranium,onitake/Uranium
qml
## Code Before: import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import UM 1.0 as UM import "../Preferences" PreferencesPage { //: Machine configuration page title. title: qsTr("Machine"); contents: ScrollView { anchors.fill: parent; ListView { delegate: settingDelegate model: UM.Models.settingsModel section.property: "category" section.delegate: Label { text: section } } } Component { id: settingDelegate CheckBox { text: model.name; x: depth * 25 checked: model.visibility onClicked: ListView.view.model.setVisibility(model.key, checked) enabled: !model.disabled } } } ## Instruction: Add an active machine selector to the machine configuration page ## Code After: import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import UM 1.0 as UM import "../Preferences" PreferencesPage { //: Machine configuration page title. title: qsTr("Machine"); contents: ColumnLayout { anchors.fill: parent; RowLayout { Label { text: qsTr("Active Machine:"); } ComboBox { id: machineCombo; Layout.fillWidth: true; model: UM.Models.machinesModel; textRole: "name"; onCurrentIndexChanged: { if(currentIndex != -1) UM.Models.machinesModel.setActive(currentIndex); } Connections { id: machineChange target: UM.Application onMachineChanged: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); } Component.onCompleted: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); } Button { text: qsTr("Remove"); } } ScrollView { Layout.fillWidth: true; Layout.fillHeight: true; ListView { delegate: settingDelegate model: UM.Models.settingsModel section.property: "category" section.delegate: Label { text: section } } } } Component { id: settingDelegate CheckBox { text: model.name; x: depth * 25 checked: model.visibility onClicked: ListView.view.model.setVisibility(model.key, checked) enabled: !model.disabled } } }
import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.1 import UM 1.0 as UM import "../Preferences" PreferencesPage { //: Machine configuration page title. title: qsTr("Machine"); + contents: ColumnLayout { - contents: ScrollView - { anchors.fill: parent; - ListView + RowLayout { + Label { text: qsTr("Active Machine:"); } + ComboBox { + id: machineCombo; + Layout.fillWidth: true; + model: UM.Models.machinesModel; + textRole: "name"; + onCurrentIndexChanged: { + if(currentIndex != -1) + UM.Models.machinesModel.setActive(currentIndex); + } + + Connections { + id: machineChange + target: UM.Application + onMachineChanged: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); + } + + Component.onCompleted: machineCombo.currentIndex = machineCombo.find(UM.Application.machineName); + } + Button { text: qsTr("Remove"); } + } + ScrollView { - delegate: settingDelegate - model: UM.Models.settingsModel + Layout.fillWidth: true; + Layout.fillHeight: true; + ListView + { + delegate: settingDelegate + model: UM.Models.settingsModel + - section.property: "category" + section.property: "category" ? ++++ - section.delegate: Label { text: section } + section.delegate: Label { text: section } ? ++++ + } } } Component { id: settingDelegate CheckBox { text: model.name; x: depth * 25 checked: model.visibility onClicked: ListView.view.model.setVisibility(model.key, checked) enabled: !model.disabled } } }
41
1.078947
34
7
e3dcd168ae3bd5596c9f0cb435d53ce28a6c881c
concrete/src/Updater/Migrations/Migrations/Version20180130000000.php
concrete/src/Updater/Migrations/Migrations/Version20180130000000.php
<?php namespace Concrete\Core\Updater\Migrations\Migrations; use Concrete\Core\Entity\File\Version; use Concrete\Core\Updater\Migrations\AbstractMigration; class Version20180130000000 extends AbstractMigration { /** * {@inheritdoc} * * @see \Concrete\Core\Updater\Migrations\AbstractMigration::upgradeDatabase() */ public function upgradeDatabase() { $this->refreshEntities([ Version::class, ]); } }
<?php namespace Concrete\Core\Updater\Migrations\Migrations; use Concrete\Core\Entity\File\Version; use Concrete\Core\Updater\Migrations\AbstractMigration; use Concrete\Core\Updater\Migrations\RepeatableMigrationInterface; class Version20180130000000 extends AbstractMigration implements RepeatableMigrationInterface { /** * {@inheritdoc} * * @see \Concrete\Core\Updater\Migrations\AbstractMigration::upgradeDatabase() */ public function upgradeDatabase() { $this->refreshEntities([ Version::class, ]); } }
Mark migration 20180130000000 as repeatable
Mark migration 20180130000000 as repeatable
PHP
mit
triplei/concrete5-8,olsgreen/concrete5,mainio/concrete5,biplobice/concrete5,deek87/concrete5,MrKarlDilkington/concrete5,rikzuiderlicht/concrete5,concrete5/concrete5,deek87/concrete5,mlocati/concrete5,olsgreen/concrete5,haeflimi/concrete5,jaromirdalecky/concrete5,hissy/concrete5,MrKarlDilkington/concrete5,triplei/concrete5-8,MrKarlDilkington/concrete5,hissy/concrete5,a3020/concrete5,olsgreen/concrete5,mainio/concrete5,biplobice/concrete5,biplobice/concrete5,hissy/concrete5,rikzuiderlicht/concrete5,haeflimi/concrete5,jaromirdalecky/concrete5,jaromirdalecky/concrete5,mlocati/concrete5,concrete5/concrete5,haeflimi/concrete5,mlocati/concrete5,mlocati/concrete5,jaromirdalecky/concrete5,rikzuiderlicht/concrete5,a3020/concrete5,triplei/concrete5-8,concrete5/concrete5,biplobice/concrete5,mainio/concrete5,haeflimi/concrete5,deek87/concrete5,concrete5/concrete5,hissy/concrete5,deek87/concrete5
php
## Code Before: <?php namespace Concrete\Core\Updater\Migrations\Migrations; use Concrete\Core\Entity\File\Version; use Concrete\Core\Updater\Migrations\AbstractMigration; class Version20180130000000 extends AbstractMigration { /** * {@inheritdoc} * * @see \Concrete\Core\Updater\Migrations\AbstractMigration::upgradeDatabase() */ public function upgradeDatabase() { $this->refreshEntities([ Version::class, ]); } } ## Instruction: Mark migration 20180130000000 as repeatable ## Code After: <?php namespace Concrete\Core\Updater\Migrations\Migrations; use Concrete\Core\Entity\File\Version; use Concrete\Core\Updater\Migrations\AbstractMigration; use Concrete\Core\Updater\Migrations\RepeatableMigrationInterface; class Version20180130000000 extends AbstractMigration implements RepeatableMigrationInterface { /** * {@inheritdoc} * * @see \Concrete\Core\Updater\Migrations\AbstractMigration::upgradeDatabase() */ public function upgradeDatabase() { $this->refreshEntities([ Version::class, ]); } }
<?php namespace Concrete\Core\Updater\Migrations\Migrations; use Concrete\Core\Entity\File\Version; use Concrete\Core\Updater\Migrations\AbstractMigration; + use Concrete\Core\Updater\Migrations\RepeatableMigrationInterface; - class Version20180130000000 extends AbstractMigration + class Version20180130000000 extends AbstractMigration implements RepeatableMigrationInterface { /** * {@inheritdoc} * * @see \Concrete\Core\Updater\Migrations\AbstractMigration::upgradeDatabase() */ public function upgradeDatabase() { $this->refreshEntities([ Version::class, ]); } }
3
0.142857
2
1
437b52a37060631ae6cce3bd2002db0d7143a3f7
gulpfile.js
gulpfile.js
'use strict'; const gulp = require('gulp'); const babel = require('gulp-babel'); gulp.task('default', () => gulp.src('lib/delve.js') .pipe(babel({ presets: ['es2015'] })) .pipe(gulp.dest('dist')) );
'use strict'; const gulp = require('gulp'); const clean = require('gulp-clean'); const babel = require('gulp-babel'); gulp.task('clean-dist', () => gulp.src('dist/', { read: false }) .pipe(clean()) ); gulp.task('default', [ 'clean-dist' ], () => gulp.src('lib/*.js') .pipe(babel({ presets: [ 'es2015' ] })) .pipe(gulp.dest('dist')) );
Add gulp clean & build tasks
Add gulp clean & build tasks
JavaScript
mit
tylerFowler/delvejs
javascript
## Code Before: 'use strict'; const gulp = require('gulp'); const babel = require('gulp-babel'); gulp.task('default', () => gulp.src('lib/delve.js') .pipe(babel({ presets: ['es2015'] })) .pipe(gulp.dest('dist')) ); ## Instruction: Add gulp clean & build tasks ## Code After: 'use strict'; const gulp = require('gulp'); const clean = require('gulp-clean'); const babel = require('gulp-babel'); gulp.task('clean-dist', () => gulp.src('dist/', { read: false }) .pipe(clean()) ); gulp.task('default', [ 'clean-dist' ], () => gulp.src('lib/*.js') .pipe(babel({ presets: [ 'es2015' ] })) .pipe(gulp.dest('dist')) );
'use strict'; const gulp = require('gulp'); + const clean = require('gulp-clean'); const babel = require('gulp-babel'); - gulp.task('default', () => ? ^^^^^ + gulp.task('clean-dist', () => ? ++++++ ^^ + gulp.src('dist/', { read: false }) + .pipe(clean()) + ); + + gulp.task('default', [ 'clean-dist' ], () => - gulp.src('lib/delve.js') ? ^^^^^ + gulp.src('lib/*.js') ? ^ - .pipe(babel({ presets: ['es2015'] })) + .pipe(babel({ presets: [ 'es2015' ] })) ? + + .pipe(gulp.dest('dist')) );
12
1.2
9
3
9d9972cc100a462993f9d68cb90dc56e303f5207
source/_posts/20130102-howto-add-github-pages.md
source/_posts/20130102-howto-add-github-pages.md
--- title: >- How to add Github Pages to a project date: 2013-01-02 08:16:00 categories: - HOWTO tags: - git - github - gh-pages --- I occasionally need to add Github Pages (gh-pages) to a project. These instructions are based on a Github help [article](https://help.github.com/articles/creating-project-pages-from-the-command-line/) and have been customized for my use. Create orphan `gh-pages` branch in `doc/html` directory: ```` bash $ cd doc/html $ git init $ git remote add origin `git config --file ../../.git/config remote.origin.url` $ git checkout --orphan gh-pages $ git rm -rf . ```` Create initial commit: ```` bash $ touch index.html $ git add . $ git commit -m 'Initial commit' ```` Configure `gh-pages` branch: ```` bash $ git config branch.gh-pages.remote origin # optional $ git config branch.gh-pages.merge refs/heads/gh-pages # optional $ git push origin gh-pages ```` Enjoy responsibly.
--- title: >- How to add GitHub Pages to a project date: 2013-01-02 08:16:00 categories: - HOWTO tags: - git - github - gh-pages --- I occasionally need to add GitHub Pages (gh-pages) to a project. These instructions are based on a GitHub help [article](https://help.github.com/articles/creating-project-pages-from-the-command-line/) and have been customized for my use. <!-- more --> Create orphan `gh-pages` branch in `doc/html` directory: ```` bash $ cd doc/html $ git init $ git remote add origin `git config --file ../../.git/config remote.origin.url` $ git checkout --orphan gh-pages $ git rm -rf . ```` Create initial commit: ```` bash $ touch index.html $ git add . $ git commit -m 'Initial commit' ```` Configure `gh-pages` branch: ```` bash $ git config branch.gh-pages.remote origin # optional $ git config branch.gh-pages.merge refs/heads/gh-pages # optional $ git push origin gh-pages ```` Enjoy responsibly. #### References <nop class="fa fa-github"> | GitHub Help / [GitHub Pages Basics](https://help.github.com/categories/github-pages-basics/) <nop class="fa fa-github"> | GitHub Help / [Creating Project Pages from the command line](https://help.github.com/articles/creating-project-pages-from-the-command-line/)
Fix title, add abbrev. point, references
Fix title, add abbrev. point, references
Markdown
apache-2.0
4-20ma/4-20ma.github.io,4-20ma/4-20ma.github.io
markdown
## Code Before: --- title: >- How to add Github Pages to a project date: 2013-01-02 08:16:00 categories: - HOWTO tags: - git - github - gh-pages --- I occasionally need to add Github Pages (gh-pages) to a project. These instructions are based on a Github help [article](https://help.github.com/articles/creating-project-pages-from-the-command-line/) and have been customized for my use. Create orphan `gh-pages` branch in `doc/html` directory: ```` bash $ cd doc/html $ git init $ git remote add origin `git config --file ../../.git/config remote.origin.url` $ git checkout --orphan gh-pages $ git rm -rf . ```` Create initial commit: ```` bash $ touch index.html $ git add . $ git commit -m 'Initial commit' ```` Configure `gh-pages` branch: ```` bash $ git config branch.gh-pages.remote origin # optional $ git config branch.gh-pages.merge refs/heads/gh-pages # optional $ git push origin gh-pages ```` Enjoy responsibly. ## Instruction: Fix title, add abbrev. point, references ## Code After: --- title: >- How to add GitHub Pages to a project date: 2013-01-02 08:16:00 categories: - HOWTO tags: - git - github - gh-pages --- I occasionally need to add GitHub Pages (gh-pages) to a project. These instructions are based on a GitHub help [article](https://help.github.com/articles/creating-project-pages-from-the-command-line/) and have been customized for my use. <!-- more --> Create orphan `gh-pages` branch in `doc/html` directory: ```` bash $ cd doc/html $ git init $ git remote add origin `git config --file ../../.git/config remote.origin.url` $ git checkout --orphan gh-pages $ git rm -rf . ```` Create initial commit: ```` bash $ touch index.html $ git add . $ git commit -m 'Initial commit' ```` Configure `gh-pages` branch: ```` bash $ git config branch.gh-pages.remote origin # optional $ git config branch.gh-pages.merge refs/heads/gh-pages # optional $ git push origin gh-pages ```` Enjoy responsibly. #### References <nop class="fa fa-github"> | GitHub Help / [GitHub Pages Basics](https://help.github.com/categories/github-pages-basics/) <nop class="fa fa-github"> | GitHub Help / [Creating Project Pages from the command line](https://help.github.com/articles/creating-project-pages-from-the-command-line/)
--- title: >- - How to add Github Pages to a project ? ^ + How to add GitHub Pages to a project ? ^ date: 2013-01-02 08:16:00 categories: - HOWTO tags: - git - github - gh-pages --- - I occasionally need to add Github Pages (gh-pages) to a project. These instructions are based on a Github help [article](https://help.github.com/articles/creating-project-pages-from-the-command-line/) and have been customized for my use. ? ^ ^ + I occasionally need to add GitHub Pages (gh-pages) to a project. These instructions are based on a GitHub help [article](https://help.github.com/articles/creating-project-pages-from-the-command-line/) and have been customized for my use. ? ^ ^ + + <!-- more --> Create orphan `gh-pages` branch in `doc/html` directory: ```` bash $ cd doc/html $ git init $ git remote add origin `git config --file ../../.git/config remote.origin.url` $ git checkout --orphan gh-pages $ git rm -rf . ```` Create initial commit: ```` bash $ touch index.html $ git add . $ git commit -m 'Initial commit' ```` Configure `gh-pages` branch: ```` bash $ git config branch.gh-pages.remote origin # optional $ git config branch.gh-pages.merge refs/heads/gh-pages # optional $ git push origin gh-pages ```` Enjoy responsibly. + + #### References + + <nop class="fa fa-github"> | GitHub Help / [GitHub Pages Basics](https://help.github.com/categories/github-pages-basics/) + <nop class="fa fa-github"> | GitHub Help / [Creating Project Pages from the command line](https://help.github.com/articles/creating-project-pages-from-the-command-line/)
11
0.268293
9
2
492fdc48b043f94b7baed13b8fe6ff1b80b4c8b4
scss/typography/_tag.scss
scss/typography/_tag.scss
// // Siimple - minimal css framework for flat and clean websites // Under the MIT LICENSE. // License: https://github.com/siimple/siimple/blob/master/LICENSE.md // Repository: https://github.com/siimple // Website: https://www.siimple.xyz // //Tag variables $siimple-tag-height: 22px; $siimple-tag-font-size: 12px; $siimple-tag-padding-left: 6px; $siimple-tag-padding-right: 6px; $siimple-tag-margin-right: 1px; $siimple-tag-margin-bottom: 8px; //Tag mixin @mixin siimple-tag() { display: inline-block; //height: $siimple-tag-height; font-size: $siimple-tag-font-size; text-decoration: none; line-height: $siimple-tag-height; border-radius: $siimple-default-border-radius; padding-left: $siimple-tag-padding-left; padding-right: $siimple-tag-padding-right; margin-right: $siimple-tag-margin-right; //margin-bottom: $siimple-tag-margin-bottom; }; //Tag color mixin @mixin siimple-tag-color($color) { background-color: siimple-color-base($color); color: siimple-color-over($color); };
// // Siimple - minimal css framework for flat and clean websites // Under the MIT LICENSE. // License: https://github.com/siimple/siimple/blob/master/LICENSE.md // Repository: https://github.com/siimple // Website: https://www.siimple.xyz // @import "siimple-colors/scss/_all.scss"; @import "../_variables.scss"; $siimple-tag-height: 22px; $siimple-tag-font-size: 12px; $siimple-tag-padding-left: 6px; $siimple-tag-padding-right: 6px; $siimple-tag-margin-right: 1px; $siimple-tag-margin-bottom: 8px; .siimple-tag { display: inline-block; //height: $siimple-tag-height; font-size: $siimple-tag-font-size; text-decoration: none; line-height: $siimple-tag-height; border-radius: $siimple-default-border-radius; padding: { left: $siimple-tag-padding-left; right: $siimple-tag-padding-right; } margin-right: $siimple-tag-margin-right; //margin-bottom: $siimple-tag-margin-bottom; @each $color, $value in $siimple-default-colors { &#{&}--#{$color} { background-color: $value; color: siimple-color-over($color); } } }
Rewrite tags mixins to single class
Rewrite tags mixins to single class
SCSS
mit
siimple/siimple,jmjuanes/siimple,jmjuanes/siimple,siimple/siimple
scss
## Code Before: // // Siimple - minimal css framework for flat and clean websites // Under the MIT LICENSE. // License: https://github.com/siimple/siimple/blob/master/LICENSE.md // Repository: https://github.com/siimple // Website: https://www.siimple.xyz // //Tag variables $siimple-tag-height: 22px; $siimple-tag-font-size: 12px; $siimple-tag-padding-left: 6px; $siimple-tag-padding-right: 6px; $siimple-tag-margin-right: 1px; $siimple-tag-margin-bottom: 8px; //Tag mixin @mixin siimple-tag() { display: inline-block; //height: $siimple-tag-height; font-size: $siimple-tag-font-size; text-decoration: none; line-height: $siimple-tag-height; border-radius: $siimple-default-border-radius; padding-left: $siimple-tag-padding-left; padding-right: $siimple-tag-padding-right; margin-right: $siimple-tag-margin-right; //margin-bottom: $siimple-tag-margin-bottom; }; //Tag color mixin @mixin siimple-tag-color($color) { background-color: siimple-color-base($color); color: siimple-color-over($color); }; ## Instruction: Rewrite tags mixins to single class ## Code After: // // Siimple - minimal css framework for flat and clean websites // Under the MIT LICENSE. // License: https://github.com/siimple/siimple/blob/master/LICENSE.md // Repository: https://github.com/siimple // Website: https://www.siimple.xyz // @import "siimple-colors/scss/_all.scss"; @import "../_variables.scss"; $siimple-tag-height: 22px; $siimple-tag-font-size: 12px; $siimple-tag-padding-left: 6px; $siimple-tag-padding-right: 6px; $siimple-tag-margin-right: 1px; $siimple-tag-margin-bottom: 8px; .siimple-tag { display: inline-block; //height: $siimple-tag-height; font-size: $siimple-tag-font-size; text-decoration: none; line-height: $siimple-tag-height; border-radius: $siimple-default-border-radius; padding: { left: $siimple-tag-padding-left; right: $siimple-tag-padding-right; } margin-right: $siimple-tag-margin-right; //margin-bottom: $siimple-tag-margin-bottom; @each $color, $value in $siimple-default-colors { &#{&}--#{$color} { background-color: $value; color: siimple-color-over($color); } } }
// // Siimple - minimal css framework for flat and clean websites // Under the MIT LICENSE. // License: https://github.com/siimple/siimple/blob/master/LICENSE.md // Repository: https://github.com/siimple // Website: https://www.siimple.xyz // + @import "siimple-colors/scss/_all.scss"; + @import "../_variables.scss"; - //Tag variables $siimple-tag-height: 22px; $siimple-tag-font-size: 12px; $siimple-tag-padding-left: 6px; $siimple-tag-padding-right: 6px; $siimple-tag-margin-right: 1px; $siimple-tag-margin-bottom: 8px; + .siimple-tag { - //Tag mixin - @mixin siimple-tag() - { display: inline-block; //height: $siimple-tag-height; font-size: $siimple-tag-font-size; text-decoration: none; line-height: $siimple-tag-height; border-radius: $siimple-default-border-radius; + padding: { - padding-left: $siimple-tag-padding-left; ? ^^^^^^^^ + left: $siimple-tag-padding-left; ? ^^ - padding-right: $siimple-tag-padding-right; ? ^^^^^^^^ + right: $siimple-tag-padding-right; ? ^^ + } margin-right: $siimple-tag-margin-right; //margin-bottom: $siimple-tag-margin-bottom; - }; + @each $color, $value in $siimple-default-colors { + &#{&}--#{$color} { + background-color: $value; - //Tag color mixin - @mixin siimple-tag-color($color) - { - background-color: siimple-color-base($color); - color: siimple-color-over($color); + color: siimple-color-over($color); ? ++++ - }; + } + } + }
27
0.72973
14
13
204df01c130a5bbeff766bd12db492d3eebee111
app/controllers/refinery/inquiries/admin/inquiries_controller.rb
app/controllers/refinery/inquiries/admin/inquiries_controller.rb
module Refinery module Inquiries module Admin class InquiriesController < ::Refinery::AdminController crudify :'refinery/inquiries/inquiry', :title_attribute => "name", :order => "created_at DESC" helper_method :group_by_date before_filter :find_all_ham, :only => [:index] before_filter :find_all_spam, :only => [:spam] before_filter :get_spam_count, :only => [:index, :spam] def index @inquiries = @inquiries.with_query(params[:search]) if searching? @inquiries = @inquiries.page(params[:page]) end def spam self.index render :action => 'index' end def toggle_spam find_inquiry @inquiry.toggle!(:spam) redirect_to :back end protected def find_all_ham @inquiries = Refinery::Inquiries::Inquiry.ham end def find_all_spam @inquiries = Refinery::Inquiries::Inquiry.spam end def get_spam_count @spam_count = Refinery::Inquiries::Inquiry.count(:conditions => {:spam => true}) end end end end end
module Refinery module Inquiries module Admin class InquiriesController < ::Refinery::AdminController crudify :'refinery/inquiries/inquiry', :title_attribute => "name", :order => "created_at DESC" helper_method :group_by_date before_filter :find_all_ham, :only => [:index] before_filter :find_all_spam, :only => [:spam] before_filter :get_spam_count, :only => [:index, :spam] def index @inquiries = @inquiries.with_query(params[:search]) if searching? @inquiries = @inquiries.page(params[:page]) end def spam self.index render :action => 'index' end def toggle_spam find_inquiry @inquiry.toggle!(:spam) redirect_to :back end protected def find_all_ham @inquiries = Refinery::Inquiries::Inquiry.ham end def find_all_spam @inquiries = Refinery::Inquiries::Inquiry.spam end def get_spam_count @spam_count = Refinery::Inquiries::Inquiry.where(:spam => true).count end end end end end
Use where(...).count instead of conditions.
Use where(...).count instead of conditions.
Ruby
mit
refinery/refinerycms-inquiries,chrise86/refinerycms-inquiries,chrise86/refinerycms-inquiries,bricesanchez/refinerycms-inquiries,refinery/refinerycms-inquiries
ruby
## Code Before: module Refinery module Inquiries module Admin class InquiriesController < ::Refinery::AdminController crudify :'refinery/inquiries/inquiry', :title_attribute => "name", :order => "created_at DESC" helper_method :group_by_date before_filter :find_all_ham, :only => [:index] before_filter :find_all_spam, :only => [:spam] before_filter :get_spam_count, :only => [:index, :spam] def index @inquiries = @inquiries.with_query(params[:search]) if searching? @inquiries = @inquiries.page(params[:page]) end def spam self.index render :action => 'index' end def toggle_spam find_inquiry @inquiry.toggle!(:spam) redirect_to :back end protected def find_all_ham @inquiries = Refinery::Inquiries::Inquiry.ham end def find_all_spam @inquiries = Refinery::Inquiries::Inquiry.spam end def get_spam_count @spam_count = Refinery::Inquiries::Inquiry.count(:conditions => {:spam => true}) end end end end end ## Instruction: Use where(...).count instead of conditions. ## Code After: module Refinery module Inquiries module Admin class InquiriesController < ::Refinery::AdminController crudify :'refinery/inquiries/inquiry', :title_attribute => "name", :order => "created_at DESC" helper_method :group_by_date before_filter :find_all_ham, :only => [:index] before_filter :find_all_spam, :only => [:spam] before_filter :get_spam_count, :only => [:index, :spam] def index @inquiries = @inquiries.with_query(params[:search]) if searching? @inquiries = @inquiries.page(params[:page]) end def spam self.index render :action => 'index' end def toggle_spam find_inquiry @inquiry.toggle!(:spam) redirect_to :back end protected def find_all_ham @inquiries = Refinery::Inquiries::Inquiry.ham end def find_all_spam @inquiries = Refinery::Inquiries::Inquiry.spam end def get_spam_count @spam_count = Refinery::Inquiries::Inquiry.where(:spam => true).count end end end end end
module Refinery module Inquiries module Admin class InquiriesController < ::Refinery::AdminController crudify :'refinery/inquiries/inquiry', :title_attribute => "name", :order => "created_at DESC" helper_method :group_by_date before_filter :find_all_ham, :only => [:index] before_filter :find_all_spam, :only => [:spam] before_filter :get_spam_count, :only => [:index, :spam] def index @inquiries = @inquiries.with_query(params[:search]) if searching? @inquiries = @inquiries.page(params[:page]) end def spam self.index render :action => 'index' end def toggle_spam find_inquiry @inquiry.toggle!(:spam) redirect_to :back end protected def find_all_ham @inquiries = Refinery::Inquiries::Inquiry.ham end def find_all_spam @inquiries = Refinery::Inquiries::Inquiry.spam end def get_spam_count - @spam_count = Refinery::Inquiries::Inquiry.count(:conditions => {:spam => true}) ? ^^^^^ ---------------- - + @spam_count = Refinery::Inquiries::Inquiry.where(:spam => true).count ? ^^^^^ ++++++ end end end end end
2
0.04
1
1
215b44ade86bb6df3d04861592fd4eafecd70bda
roles/common/tasks/main.yml
roles/common/tasks/main.yml
--- - name: Validate Ansible version assert: that: - "{{ ansible_version is defined }}" - "{{ ansible_version.full | version_compare(minimum_ansible_version, '>=') }}" msg: "Your Ansible version is too old. Trellis require at least {{ minimum_ansible_version }}. Your version is {{ ansible_version.full | default('< 1.6') }}" - name: Update Apt apt: update_cache=yes - name: Checking essentials apt: name="{{ item }}" state=present with_items: - python-software-properties - python-pycurl - build-essential - python-mysqldb - curl - git-core - unzip - imagemagick - htop - gunzip - name: Validate timezone variable stat: path=/usr/share/zoneinfo/{{ default_timezone }} register: timezone_path changed_when: false - name: Explain timezone error fail: msg="{{ default_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php" when: not timezone_path.stat.exists - name: Get current timezone command: cat /etc/timezone register: current_timezone changed_when: false - name: Set timezone command: timedatectl set-timezone {{ default_timezone }} when: current_timezone.stdout != default_timezone - include: symlinks.yml
--- - name: Validate Ansible version assert: that: - "{{ ansible_version is defined }}" - "{{ ansible_version.full | version_compare(minimum_ansible_version, '>=') }}" msg: "Your Ansible version is too old. Trellis require at least {{ minimum_ansible_version }}. Your version is {{ ansible_version.full | default('< 1.6') }}" - name: Update Apt apt: update_cache=yes - name: Checking essentials apt: name="{{ item }}" state=present with_items: - python-software-properties - python-pycurl - build-essential - python-mysqldb - curl - git-core - unzip - imagemagick - htop - name: Validate timezone variable stat: path=/usr/share/zoneinfo/{{ default_timezone }} register: timezone_path changed_when: false - name: Explain timezone error fail: msg="{{ default_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php" when: not timezone_path.stat.exists - name: Get current timezone command: cat /etc/timezone register: current_timezone changed_when: false - name: Set timezone command: timedatectl set-timezone {{ default_timezone }} when: current_timezone.stdout != default_timezone - include: symlinks.yml
Revert "Added gunzip as common utility."
Revert "Added gunzip as common utility." This reverts commit 3f12d61c39499b8f55d31314e2e83a9277f52264.
YAML
mit
proteusthemes/pt-ops,proteusthemes/pt-ops,proteusthemes/pt-ops
yaml
## Code Before: --- - name: Validate Ansible version assert: that: - "{{ ansible_version is defined }}" - "{{ ansible_version.full | version_compare(minimum_ansible_version, '>=') }}" msg: "Your Ansible version is too old. Trellis require at least {{ minimum_ansible_version }}. Your version is {{ ansible_version.full | default('< 1.6') }}" - name: Update Apt apt: update_cache=yes - name: Checking essentials apt: name="{{ item }}" state=present with_items: - python-software-properties - python-pycurl - build-essential - python-mysqldb - curl - git-core - unzip - imagemagick - htop - gunzip - name: Validate timezone variable stat: path=/usr/share/zoneinfo/{{ default_timezone }} register: timezone_path changed_when: false - name: Explain timezone error fail: msg="{{ default_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php" when: not timezone_path.stat.exists - name: Get current timezone command: cat /etc/timezone register: current_timezone changed_when: false - name: Set timezone command: timedatectl set-timezone {{ default_timezone }} when: current_timezone.stdout != default_timezone - include: symlinks.yml ## Instruction: Revert "Added gunzip as common utility." This reverts commit 3f12d61c39499b8f55d31314e2e83a9277f52264. ## Code After: --- - name: Validate Ansible version assert: that: - "{{ ansible_version is defined }}" - "{{ ansible_version.full | version_compare(minimum_ansible_version, '>=') }}" msg: "Your Ansible version is too old. Trellis require at least {{ minimum_ansible_version }}. Your version is {{ ansible_version.full | default('< 1.6') }}" - name: Update Apt apt: update_cache=yes - name: Checking essentials apt: name="{{ item }}" state=present with_items: - python-software-properties - python-pycurl - build-essential - python-mysqldb - curl - git-core - unzip - imagemagick - htop - name: Validate timezone variable stat: path=/usr/share/zoneinfo/{{ default_timezone }} register: timezone_path changed_when: false - name: Explain timezone error fail: msg="{{ default_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php" when: not timezone_path.stat.exists - name: Get current timezone command: cat /etc/timezone register: current_timezone changed_when: false - name: Set timezone command: timedatectl set-timezone {{ default_timezone }} when: current_timezone.stdout != default_timezone - include: symlinks.yml
--- - name: Validate Ansible version assert: that: - "{{ ansible_version is defined }}" - "{{ ansible_version.full | version_compare(minimum_ansible_version, '>=') }}" msg: "Your Ansible version is too old. Trellis require at least {{ minimum_ansible_version }}. Your version is {{ ansible_version.full | default('< 1.6') }}" - name: Update Apt apt: update_cache=yes - name: Checking essentials apt: name="{{ item }}" state=present with_items: - python-software-properties - python-pycurl - build-essential - python-mysqldb - curl - git-core - unzip - imagemagick - htop - - gunzip - name: Validate timezone variable stat: path=/usr/share/zoneinfo/{{ default_timezone }} register: timezone_path changed_when: false - name: Explain timezone error fail: msg="{{ default_timezone }} is not a valid timezone. For a list of valid timezones, check https://php.net/manual/en/timezones.php" when: not timezone_path.stat.exists - name: Get current timezone command: cat /etc/timezone register: current_timezone changed_when: false - name: Set timezone command: timedatectl set-timezone {{ default_timezone }} when: current_timezone.stdout != default_timezone - include: symlinks.yml
1
0.022727
0
1
c9e14c0e00db32301cea0468a4d2101fa0b8077f
lib/itunes_parser.rb
lib/itunes_parser.rb
require 'rubygems' require 'library' class Itunes_parser @lib = ItunesParser::Library.new # @result is a hash @result = @lib.parse(File.read(File.dirname(__FILE__) + './test/test_library.xml')) puts @result.inspect puts @result['first_song'].inspect puts "library version #{@result['version']}" puts "first song's name #{@result['first_song']['name']}" puts "first song's artist #{@result['first_song']['artist']}" puts "first song's year #{@result['first_song']['year']}" puts "first song's kind #{@result['first_song']['kind']}" puts "first song's size #{@result['first_song']['size']} bytes" # note these tags don't have underscore inserted puts "first song's sample rate #{@result['first_song']['sample rate']} Hz" puts "first song's total time #{@result['first_song']['total time']} millisec" puts "number of songs #{@result['songs'].count}" end
require 'rubygems' require 'library' class Itunes_parser @lib = ItunesParser::Library.new # @parsed_lib is a hash @parsed_lib = @lib.parse(File.read(File.dirname(__FILE__) + './test/test_library.xml')) puts @parsed_lib.inspect puts @parsed_lib['first_song'].inspect puts "library version #{@parsed_lib['version']}" puts "first song's name #{@parsed_lib['first_song']['name']}" puts "first song's artist #{@parsed_lib['first_song']['artist']}" puts "first song's year #{@parsed_lib['first_song']['year']}" puts "first song's kind #{@parsed_lib['first_song']['kind']}" puts "first song's size #{@parsed_lib['first_song']['size']} bytes" # note these tags don't have underscore inserted puts "first song's sample rate #{@parsed_lib['first_song']['sample rate']} Hz" puts "first song's total time #{@parsed_lib['first_song']['total time']} millisec" puts "number of songs #{@parsed_lib['songs'].count}" end
Refactor rename @result to @parsed_lib.
Refactor rename @result to @parsed_lib.
Ruby
mit
beepscore/bs_itunes_parser
ruby
## Code Before: require 'rubygems' require 'library' class Itunes_parser @lib = ItunesParser::Library.new # @result is a hash @result = @lib.parse(File.read(File.dirname(__FILE__) + './test/test_library.xml')) puts @result.inspect puts @result['first_song'].inspect puts "library version #{@result['version']}" puts "first song's name #{@result['first_song']['name']}" puts "first song's artist #{@result['first_song']['artist']}" puts "first song's year #{@result['first_song']['year']}" puts "first song's kind #{@result['first_song']['kind']}" puts "first song's size #{@result['first_song']['size']} bytes" # note these tags don't have underscore inserted puts "first song's sample rate #{@result['first_song']['sample rate']} Hz" puts "first song's total time #{@result['first_song']['total time']} millisec" puts "number of songs #{@result['songs'].count}" end ## Instruction: Refactor rename @result to @parsed_lib. ## Code After: require 'rubygems' require 'library' class Itunes_parser @lib = ItunesParser::Library.new # @parsed_lib is a hash @parsed_lib = @lib.parse(File.read(File.dirname(__FILE__) + './test/test_library.xml')) puts @parsed_lib.inspect puts @parsed_lib['first_song'].inspect puts "library version #{@parsed_lib['version']}" puts "first song's name #{@parsed_lib['first_song']['name']}" puts "first song's artist #{@parsed_lib['first_song']['artist']}" puts "first song's year #{@parsed_lib['first_song']['year']}" puts "first song's kind #{@parsed_lib['first_song']['kind']}" puts "first song's size #{@parsed_lib['first_song']['size']} bytes" # note these tags don't have underscore inserted puts "first song's sample rate #{@parsed_lib['first_song']['sample rate']} Hz" puts "first song's total time #{@parsed_lib['first_song']['total time']} millisec" puts "number of songs #{@parsed_lib['songs'].count}" end
require 'rubygems' require 'library' class Itunes_parser @lib = ItunesParser::Library.new - # @result is a hash ? ^^ ^ + # @parsed_lib is a hash ? ++ + ^^ ^^ - @result = @lib.parse(File.read(File.dirname(__FILE__) + './test/test_library.xml')) ? ^^ ^ + @parsed_lib = @lib.parse(File.read(File.dirname(__FILE__) + './test/test_library.xml')) ? ++ + ^^ ^^ - puts @result.inspect ? ^^ ^ + puts @parsed_lib.inspect ? ++ + ^^ ^^ - puts @result['first_song'].inspect ? ^^ ^ + puts @parsed_lib['first_song'].inspect ? ++ + ^^ ^^ - puts "library version #{@result['version']}" ? ^^ ^ + puts "library version #{@parsed_lib['version']}" ? ++ + ^^ ^^ - puts "first song's name #{@result['first_song']['name']}" ? ^^ ^ + puts "first song's name #{@parsed_lib['first_song']['name']}" ? ++ + ^^ ^^ - puts "first song's artist #{@result['first_song']['artist']}" ? ^^ ^ + puts "first song's artist #{@parsed_lib['first_song']['artist']}" ? ++ + ^^ ^^ - puts "first song's year #{@result['first_song']['year']}" ? ^^ ^ + puts "first song's year #{@parsed_lib['first_song']['year']}" ? ++ + ^^ ^^ - puts "first song's kind #{@result['first_song']['kind']}" ? ^^ ^ + puts "first song's kind #{@parsed_lib['first_song']['kind']}" ? ++ + ^^ ^^ - puts "first song's size #{@result['first_song']['size']} bytes" ? ^^ ^ + puts "first song's size #{@parsed_lib['first_song']['size']} bytes" ? ++ + ^^ ^^ # note these tags don't have underscore inserted - puts "first song's sample rate #{@result['first_song']['sample rate']} Hz" ? ^^ ^ + puts "first song's sample rate #{@parsed_lib['first_song']['sample rate']} Hz" ? ++ + ^^ ^^ - puts "first song's total time #{@result['first_song']['total time']} millisec" ? ^^ ^ + puts "first song's total time #{@parsed_lib['first_song']['total time']} millisec" ? ++ + ^^ ^^ - puts "number of songs #{@result['songs'].count}" ? ^^ ^ + puts "number of songs #{@parsed_lib['songs'].count}" ? ++ + ^^ ^^ + + end
28
1
15
13
f155225310b9aba098fb25870cebca308de87f96
metadata/org.droidupnp.txt
metadata/org.droidupnp.txt
Categories:Multimedia License:GPLv3 Web Site:https://trishika.github.io/DroidUPnP/ Source Code:https://github.com/trishika/DroidUPnP Issue Tracker:https://github.com/trishika/DroidUPnP/issues Auto Name:DroidUPnP Summary:Play files off the network Description: Discover your home UPnP device, content provider, connected television or any device controllable by UPnP and allow you to control those. It also allow you to share your local content to other UPnP capable device. . Repo Type:git Repo:https://github.com/trishika/DroidUPnP.git Build:1.1.0,6 commit=9d840d maven=yes Build:2.0.0,11 commit=v2.0.0 gradle=yes Build:2.1.0,12 commit=v2.1.0 gradle=yes Build:2.2.0,13 disable=4th line repo commit=v2.2.0 gradle=yes Auto Update Mode:None Update Check Mode:Tags Current Version:2.2.1 Current Version Code:14
Categories:Multimedia License:GPLv3 Web Site:https://trishika.github.io/DroidUPnP/ Source Code:https://github.com/trishika/DroidUPnP Issue Tracker:https://github.com/trishika/DroidUPnP/issues Auto Name:DroidUPnP Summary:Play files off the network Description: Discover your home UPnP device, content provider, connected television or any device controllable by UPnP and allow you to control those. It also allow you to share your local content to other UPnP capable device. . Repo Type:git Repo:https://github.com/trishika/DroidUPnP.git Build:1.1.0,6 commit=9d840d maven=yes Build:2.0.0,11 commit=v2.0.0 gradle=yes Build:2.1.0,12 commit=v2.1.0 gradle=yes Build:2.2.0,13 disable=no sense in removing 4thline, since Cling lib pulls deps from there commit=v2.2.0 gradle=yes srclibs=Cling@2.0.1 prebuild=\ sed -i -e '/4thline.org/,+1d' -e '/maven {/d' build.gradle && \ pushd $$Cling$$ && $$MVN3$$ install && popd Auto Update Mode:None Update Check Mode:Tags Current Version:2.2.1 Current Version Code:14
Fix build; disabled: deps also rely on 4thline.
DroidUPnP: Fix build; disabled: deps also rely on 4thline.
Text
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
text
## Code Before: Categories:Multimedia License:GPLv3 Web Site:https://trishika.github.io/DroidUPnP/ Source Code:https://github.com/trishika/DroidUPnP Issue Tracker:https://github.com/trishika/DroidUPnP/issues Auto Name:DroidUPnP Summary:Play files off the network Description: Discover your home UPnP device, content provider, connected television or any device controllable by UPnP and allow you to control those. It also allow you to share your local content to other UPnP capable device. . Repo Type:git Repo:https://github.com/trishika/DroidUPnP.git Build:1.1.0,6 commit=9d840d maven=yes Build:2.0.0,11 commit=v2.0.0 gradle=yes Build:2.1.0,12 commit=v2.1.0 gradle=yes Build:2.2.0,13 disable=4th line repo commit=v2.2.0 gradle=yes Auto Update Mode:None Update Check Mode:Tags Current Version:2.2.1 Current Version Code:14 ## Instruction: DroidUPnP: Fix build; disabled: deps also rely on 4thline. ## Code After: Categories:Multimedia License:GPLv3 Web Site:https://trishika.github.io/DroidUPnP/ Source Code:https://github.com/trishika/DroidUPnP Issue Tracker:https://github.com/trishika/DroidUPnP/issues Auto Name:DroidUPnP Summary:Play files off the network Description: Discover your home UPnP device, content provider, connected television or any device controllable by UPnP and allow you to control those. It also allow you to share your local content to other UPnP capable device. . Repo Type:git Repo:https://github.com/trishika/DroidUPnP.git Build:1.1.0,6 commit=9d840d maven=yes Build:2.0.0,11 commit=v2.0.0 gradle=yes Build:2.1.0,12 commit=v2.1.0 gradle=yes Build:2.2.0,13 disable=no sense in removing 4thline, since Cling lib pulls deps from there commit=v2.2.0 gradle=yes srclibs=Cling@2.0.1 prebuild=\ sed -i -e '/4thline.org/,+1d' -e '/maven {/d' build.gradle && \ pushd $$Cling$$ && $$MVN3$$ install && popd Auto Update Mode:None Update Check Mode:Tags Current Version:2.2.1 Current Version Code:14
Categories:Multimedia License:GPLv3 Web Site:https://trishika.github.io/DroidUPnP/ Source Code:https://github.com/trishika/DroidUPnP Issue Tracker:https://github.com/trishika/DroidUPnP/issues Auto Name:DroidUPnP Summary:Play files off the network Description: Discover your home UPnP device, content provider, connected television or any device controllable by UPnP and allow you to control those. It also allow you to share your local content to other UPnP capable device. . Repo Type:git Repo:https://github.com/trishika/DroidUPnP.git Build:1.1.0,6 commit=9d840d maven=yes Build:2.0.0,11 commit=v2.0.0 gradle=yes Build:2.1.0,12 commit=v2.1.0 gradle=yes Build:2.2.0,13 - disable=4th line repo + disable=no sense in removing 4thline, since Cling lib pulls deps from there commit=v2.2.0 gradle=yes + srclibs=Cling@2.0.1 + prebuild=\ + sed -i -e '/4thline.org/,+1d' -e '/maven {/d' build.gradle && \ + pushd $$Cling$$ && $$MVN3$$ install && popd Auto Update Mode:None Update Check Mode:Tags Current Version:2.2.1 Current Version Code:14
6
0.153846
5
1
317bcfcf7081a6a461411d658bc0cf8eaedc0026
tests/Router/PrefixRouteTest.php
tests/Router/PrefixRouteTest.php
<?php declare(strict_types=1); namespace Tests\Router; use Onion\Framework\Router\PrefixRoute; class PrefixRouteTest extends \PHPUnit_Framework_TestCase { private $route; public function setUp() { $this->route = new PrefixRoute('/foo'); } public function testMatch() { $this->assertSame($this->route->getName(), '/foo/*'); $this->assertSame($this->route->getPattern(), '/foo/*'); $this->assertTrue($this->route->isMatch('/foo/test/some')); } }
<?php declare(strict_types=1); namespace Tests\Router; use Onion\Framework\Router\PrefixRoute; use Prophecy\Argument\Token\AnyValueToken; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\UriInterface; use Psr\Http\Server\RequestHandlerInterface; class PrefixRouteTest extends \PHPUnit_Framework_TestCase { private $route; public function setUp() { $this->route = new PrefixRoute('/foo'); } public function testMatch() { $this->assertSame($this->route->getName(), '/foo/*'); $this->assertSame($this->route->getPattern(), '/foo/*'); $this->assertTrue($this->route->isMatch('/foo/test/some')); } public function testMatchHandling() { $response = $this->prophesize(ResponseInterface::class); $uri = $this->prophesize(UriInterface::class); $uri->getPath()->willReturn('/foo/bar'); $uri->withPath('/bar')->willReturn($uri->reveal())->shouldBeCalled(); $uri->withPath('/bar')->shouldBeCalled(); $uri->withPath('/foo/bar')->willReturn($uri->reveal()); $request = $this->prophesize(ServerRequestInterface::class); $request->withUri(new AnyValueToken())->willReturn($request->reveal()); $request->getMethod()->willReturn('get'); $request->getUri()->willReturn($uri->reveal()); $handler = $this->prophesize(RequestHandlerInterface::class); $handler->handle(new AnyValueToken())->willReturn($response->reveal()); $route = $this->route->withRequestHandler($handler->reveal()) ->withMethods(['GET']); $this->assertNotSame($this->route, $route); $route->handle($request->reveal()); } }
Add test for prefix handling
Add test for prefix handling
PHP
mit
phOnion/framework
php
## Code Before: <?php declare(strict_types=1); namespace Tests\Router; use Onion\Framework\Router\PrefixRoute; class PrefixRouteTest extends \PHPUnit_Framework_TestCase { private $route; public function setUp() { $this->route = new PrefixRoute('/foo'); } public function testMatch() { $this->assertSame($this->route->getName(), '/foo/*'); $this->assertSame($this->route->getPattern(), '/foo/*'); $this->assertTrue($this->route->isMatch('/foo/test/some')); } } ## Instruction: Add test for prefix handling ## Code After: <?php declare(strict_types=1); namespace Tests\Router; use Onion\Framework\Router\PrefixRoute; use Prophecy\Argument\Token\AnyValueToken; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\UriInterface; use Psr\Http\Server\RequestHandlerInterface; class PrefixRouteTest extends \PHPUnit_Framework_TestCase { private $route; public function setUp() { $this->route = new PrefixRoute('/foo'); } public function testMatch() { $this->assertSame($this->route->getName(), '/foo/*'); $this->assertSame($this->route->getPattern(), '/foo/*'); $this->assertTrue($this->route->isMatch('/foo/test/some')); } public function testMatchHandling() { $response = $this->prophesize(ResponseInterface::class); $uri = $this->prophesize(UriInterface::class); $uri->getPath()->willReturn('/foo/bar'); $uri->withPath('/bar')->willReturn($uri->reveal())->shouldBeCalled(); $uri->withPath('/bar')->shouldBeCalled(); $uri->withPath('/foo/bar')->willReturn($uri->reveal()); $request = $this->prophesize(ServerRequestInterface::class); $request->withUri(new AnyValueToken())->willReturn($request->reveal()); $request->getMethod()->willReturn('get'); $request->getUri()->willReturn($uri->reveal()); $handler = $this->prophesize(RequestHandlerInterface::class); $handler->handle(new AnyValueToken())->willReturn($response->reveal()); $route = $this->route->withRequestHandler($handler->reveal()) ->withMethods(['GET']); $this->assertNotSame($this->route, $route); $route->handle($request->reveal()); } }
<?php declare(strict_types=1); namespace Tests\Router; use Onion\Framework\Router\PrefixRoute; + use Prophecy\Argument\Token\AnyValueToken; + use Psr\Http\Message\ResponseInterface; + use Psr\Http\Message\ServerRequestInterface; + use Psr\Http\Message\UriInterface; + use Psr\Http\Server\RequestHandlerInterface; class PrefixRouteTest extends \PHPUnit_Framework_TestCase { private $route; public function setUp() { $this->route = new PrefixRoute('/foo'); } public function testMatch() { $this->assertSame($this->route->getName(), '/foo/*'); $this->assertSame($this->route->getPattern(), '/foo/*'); $this->assertTrue($this->route->isMatch('/foo/test/some')); } + + public function testMatchHandling() + { + $response = $this->prophesize(ResponseInterface::class); + + $uri = $this->prophesize(UriInterface::class); + $uri->getPath()->willReturn('/foo/bar'); + $uri->withPath('/bar')->willReturn($uri->reveal())->shouldBeCalled(); + $uri->withPath('/bar')->shouldBeCalled(); + $uri->withPath('/foo/bar')->willReturn($uri->reveal()); + + $request = $this->prophesize(ServerRequestInterface::class); + $request->withUri(new AnyValueToken())->willReturn($request->reveal()); + $request->getMethod()->willReturn('get'); + $request->getUri()->willReturn($uri->reveal()); + + $handler = $this->prophesize(RequestHandlerInterface::class); + $handler->handle(new AnyValueToken())->willReturn($response->reveal()); + + $route = $this->route->withRequestHandler($handler->reveal()) + ->withMethods(['GET']); + $this->assertNotSame($this->route, $route); + + $route->handle($request->reveal()); + } }
30
1.5
30
0
c7221186d43306002afbb541b6943b793d9e3ea7
index.js
index.js
// Start by requiring IOU to shim up the Promise constructor. var PROC = require('child_process'), Promise = require('iou').Promise; exports.exec = function exec(command, options) { options = options || Object.create(null); var promise, child; promise = new Promise(function (resolve) { child = PROC.exec(command, function (err, stdout, stderr) { res = Object.create(null); Object.defineProperties(res, { stdout: { enumerable: true, value: stdout }, stderr: { enumerable: true, value: stderr } }); if (err) { Object.defineProperties(res, { errorMessage: { enumerable: true, value: err.message }, exitCode: { enumerable: true, value: err.code }, exitSignal: { enumerable: true, value: err.signal } }); } return resolve(res); }); }); return promise; };
// Start by requiring IOU to shim up the Promise constructor. var PROC = require('child_process'), Promise = require('iou').Promise; exports.exec = function exec(command) { var promise, child; promise = new Promise(function (resolve) { child = PROC.exec(command, function (err, stdout, stderr) { res = Object.create(null); Object.defineProperties(res, { stdout: { enumerable: true, value: stdout }, stderr: { enumerable: true, value: stderr } }); if (err) { Object.defineProperties(res, { errorMessage: { enumerable: true, value: err.message }, exitCode: { enumerable: true, value: err.code }, exitSignal: { enumerable: true, value: err.signal } }); } return resolve(res); }); }); return promise; }; exports.spawn = function spawn() { };
Remove options arg from exec.
Remove options arg from exec. modified: index.js
JavaScript
mit
kixxauth/command_runner
javascript
## Code Before: // Start by requiring IOU to shim up the Promise constructor. var PROC = require('child_process'), Promise = require('iou').Promise; exports.exec = function exec(command, options) { options = options || Object.create(null); var promise, child; promise = new Promise(function (resolve) { child = PROC.exec(command, function (err, stdout, stderr) { res = Object.create(null); Object.defineProperties(res, { stdout: { enumerable: true, value: stdout }, stderr: { enumerable: true, value: stderr } }); if (err) { Object.defineProperties(res, { errorMessage: { enumerable: true, value: err.message }, exitCode: { enumerable: true, value: err.code }, exitSignal: { enumerable: true, value: err.signal } }); } return resolve(res); }); }); return promise; }; ## Instruction: Remove options arg from exec. modified: index.js ## Code After: // Start by requiring IOU to shim up the Promise constructor. var PROC = require('child_process'), Promise = require('iou').Promise; exports.exec = function exec(command) { var promise, child; promise = new Promise(function (resolve) { child = PROC.exec(command, function (err, stdout, stderr) { res = Object.create(null); Object.defineProperties(res, { stdout: { enumerable: true, value: stdout }, stderr: { enumerable: true, value: stderr } }); if (err) { Object.defineProperties(res, { errorMessage: { enumerable: true, value: err.message }, exitCode: { enumerable: true, value: err.code }, exitSignal: { enumerable: true, value: err.signal } }); } return resolve(res); }); }); return promise; }; exports.spawn = function spawn() { };
// Start by requiring IOU to shim up the Promise constructor. var PROC = require('child_process'), Promise = require('iou').Promise; - exports.exec = function exec(command, options) { ? --------- + exports.exec = function exec(command) { - options = options || Object.create(null); var promise, child; promise = new Promise(function (resolve) { child = PROC.exec(command, function (err, stdout, stderr) { res = Object.create(null); Object.defineProperties(res, { stdout: { enumerable: true, value: stdout }, stderr: { enumerable: true, value: stderr } }); if (err) { Object.defineProperties(res, { errorMessage: { enumerable: true, value: err.message }, exitCode: { enumerable: true, value: err.code }, exitSignal: { enumerable: true, value: err.signal } }); } return resolve(res); }); }); return promise; }; + + + exports.spawn = function spawn() { + };
7
0.159091
5
2
712bb348aa6017fbf8796ddefe284c1d5c007388
README.md
README.md
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/genius/blocker`. To experiment with that code, run `bin/console` for an interactive prompt. TODO: Delete this and the text above, and describe your gem ## Installation Add this line to your application's Gemfile: ```ruby gem 'genius-blocker' ``` And then execute: $ bundle Or install it yourself as: $ gem install genius-blocker ## Usage TODO: Write usage instructions here ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/genius-blocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Genius Blocker is a piece of Rack Middleware designed to prevent unwanted annotations by [News Genius](http://news.genius.com/). The middleware injects a small bit of JavaScript code into the `<head></head>` of a website in order to force a redirect to the original website whenever anyone attempts to prepend `genius.it/` onto a website's URL for annotation purposes. ## Installation Add this line to your application's Gemfile: ```ruby gem 'genius-blocker' ``` And then execute: $ bundle Or install it yourself as: $ gem install genius-blocker ## Usage For most applications, you can insert middleware into the config.ru file in the root of the application. A simple config.ru in a Rails application might look like this after adding Genius::Blocker: require ::File.expand_path('../config/environment', __FILE__) use Genius::Blocker run MyRailsApp::Application ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/marlabrizel/genius-blocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. Any pull requests or issues that do not adhere to these guidelines will be ignored and/or deleted. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Add basic description and usage instructions
Add basic description and usage instructions
Markdown
mit
marlabrizel/genius-blocker,marlabrizel/genius-blocker
markdown
## Code Before: Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/genius/blocker`. To experiment with that code, run `bin/console` for an interactive prompt. TODO: Delete this and the text above, and describe your gem ## Installation Add this line to your application's Gemfile: ```ruby gem 'genius-blocker' ``` And then execute: $ bundle Or install it yourself as: $ gem install genius-blocker ## Usage TODO: Write usage instructions here ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/genius-blocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). ## Instruction: Add basic description and usage instructions ## Code After: Genius Blocker is a piece of Rack Middleware designed to prevent unwanted annotations by [News Genius](http://news.genius.com/). The middleware injects a small bit of JavaScript code into the `<head></head>` of a website in order to force a redirect to the original website whenever anyone attempts to prepend `genius.it/` onto a website's URL for annotation purposes. ## Installation Add this line to your application's Gemfile: ```ruby gem 'genius-blocker' ``` And then execute: $ bundle Or install it yourself as: $ gem install genius-blocker ## Usage For most applications, you can insert middleware into the config.ru file in the root of the application. A simple config.ru in a Rails application might look like this after adding Genius::Blocker: require ::File.expand_path('../config/environment', __FILE__) use Genius::Blocker run MyRailsApp::Application ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/marlabrizel/genius-blocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. Any pull requests or issues that do not adhere to these guidelines will be ignored and/or deleted. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
+ Genius Blocker is a piece of Rack Middleware designed to prevent unwanted + annotations by [News Genius](http://news.genius.com/). - Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/genius/blocker`. To experiment with that code, run `bin/console` for an interactive prompt. - - TODO: Delete this and the text above, and describe your gem + The middleware injects a small bit of JavaScript code into the + `<head></head>` of a website in order to force a redirect to the original + website whenever anyone attempts to prepend `genius.it/` onto a website's URL + for annotation purposes. ## Installation Add this line to your application's Gemfile: ```ruby gem 'genius-blocker' ``` And then execute: $ bundle Or install it yourself as: $ gem install genius-blocker ## Usage - TODO: Write usage instructions here + For most applications, you can insert middleware into the config.ru file in the root of the application. - ## Development + A simple config.ru in a Rails application might look + like this after adding Genius::Blocker: - After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. + require ::File.expand_path('../config/environment', __FILE__) - To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). + use Genius::Blocker + run MyRailsApp::Application ## Contributing - Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/genius-blocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. ? ^^^^^^^^^^ + Bug reports and pull requests are welcome on GitHub at https://github.com/marlabrizel/genius-blocker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. Any pull requests or issues that do not adhere to these guidelines will be ignored and/or deleted. ? ^^^^^^^^^^^ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
21
0.525
13
8
3bcf862e97d24709b577176068b2f01847483702
app/templates/index.hbs
app/templates/index.hbs
{{currentPath}} <div class="row"> <div class="col-md-12"> <form role="form" {{action search on="submit"}}> <div class="form-group"> {{input value=noteSearch class="form-control" placeholder="Tags"}} </div> </form> </div> </div> <div class="row"> <div class="col-md-12"> <table id="note-search-results" class="table table-hover"> <tbody> {{#each note in notes}} <tr> <td> {{#link-to 'notes.note' note}} {{note.title}} {{/link-to}} </td> <td style="text-align: right;"> {{#link-to 'notes.edit' note class="btn btn-default btn-xs"}} <span class="glyphicon glyphicon-pencil"></span> {{/link-to}} </td> </tr> {{/each}} </tbody> </table> </div> </div>
<div class="row"> <div class="col-md-12"> <form role="form" {{action search on="submit"}}> <div class="form-group"> {{input value=noteSearch class="form-control" placeholder="Tags"}} </div> </form> </div> </div> <div class="row"> <div class="col-md-12"> <table id="note-search-results" class="table table-hover"> <tbody> {{#each note in notes}} <tr> <td> {{#link-to 'notes.note' note}} {{note.title}} {{/link-to}} </td> <td style="text-align: right;"> {{#link-to 'notes.edit' note class="btn btn-default btn-xs"}} <span class="glyphicon glyphicon-pencil"></span> {{/link-to}} </td> </tr> {{/each}} </tbody> </table> </div> </div>
Remove test text that should of not been submitted
Remove test text that should of not been submitted
Handlebars
mit
corsen2000/noted-client
handlebars
## Code Before: {{currentPath}} <div class="row"> <div class="col-md-12"> <form role="form" {{action search on="submit"}}> <div class="form-group"> {{input value=noteSearch class="form-control" placeholder="Tags"}} </div> </form> </div> </div> <div class="row"> <div class="col-md-12"> <table id="note-search-results" class="table table-hover"> <tbody> {{#each note in notes}} <tr> <td> {{#link-to 'notes.note' note}} {{note.title}} {{/link-to}} </td> <td style="text-align: right;"> {{#link-to 'notes.edit' note class="btn btn-default btn-xs"}} <span class="glyphicon glyphicon-pencil"></span> {{/link-to}} </td> </tr> {{/each}} </tbody> </table> </div> </div> ## Instruction: Remove test text that should of not been submitted ## Code After: <div class="row"> <div class="col-md-12"> <form role="form" {{action search on="submit"}}> <div class="form-group"> {{input value=noteSearch class="form-control" placeholder="Tags"}} </div> </form> </div> </div> <div class="row"> <div class="col-md-12"> <table id="note-search-results" class="table table-hover"> <tbody> {{#each note in notes}} <tr> <td> {{#link-to 'notes.note' note}} {{note.title}} {{/link-to}} </td> <td style="text-align: right;"> {{#link-to 'notes.edit' note class="btn btn-default btn-xs"}} <span class="glyphicon glyphicon-pencil"></span> {{/link-to}} </td> </tr> {{/each}} </tbody> </table> </div> </div>
- {{currentPath}} - <div class="row"> <div class="col-md-12"> <form role="form" {{action search on="submit"}}> <div class="form-group"> {{input value=noteSearch class="form-control" placeholder="Tags"}} </div> </form> </div> </div> <div class="row"> <div class="col-md-12"> <table id="note-search-results" class="table table-hover"> <tbody> {{#each note in notes}} <tr> <td> {{#link-to 'notes.note' note}} {{note.title}} {{/link-to}} </td> <td style="text-align: right;"> {{#link-to 'notes.edit' note class="btn btn-default btn-xs"}} <span class="glyphicon glyphicon-pencil"></span> {{/link-to}} </td> </tr> {{/each}} </tbody> </table> </div> </div>
2
0.058824
0
2
0269084856a220ecf6aae54b8b998c14c2e2a3fa
app/controllers/districts_controller.rb
app/controllers/districts_controller.rb
class DistrictsController < ApplicationController before_action :set_district, only: [:show, :edit, :update, :destroy] # GET /districts # GET /districts.json def index @districts = District.all end # GET /districts/1 # GET /districts/1.json def show end # GET /districts/new def new @district = District.new end # GET /districts/1/edit def edit end # POST /districts # POST /districts.json def create @district = District.new(district_params) respond_to do |format| if @district.save format.html { redirect_to @district, notice: 'District was successfully created.' } format.json { render :show, status: :created, location: @district } else format.html { render :new } format.json { render json: @district.errors, status: :unprocessable_entity } end end end # PATCH/PUT /districts/1 # PATCH/PUT /districts/1.json def update respond_to do |format| if @district.update(district_params) format.html { redirect_to @district, notice: 'District was successfully updated.' } format.json { render :show, status: :ok, location: @district } else format.html { render :edit } format.json { render json: @district.errors, status: :unprocessable_entity } end end end # DELETE /districts/1 # DELETE /districts/1.json def destroy @district.destroy respond_to do |format| format.html { redirect_to districts_url, notice: 'District was successfully destroyed.' } format.json { head :no_content } end end private # Use callbacks to share common setup or constraints between actions. def set_district @district = District.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def district_params params[:district] end end
class DistrictsController < ApplicationController before_action :set_district, only: [:show, :edit, :update, :destroy] # GET /districts # GET /districts.json def index @districts = District.all end # GET /districts/1 # GET /districts/1.json def show @schools = @district.schools end private # Use callbacks to share common setup or constraints between actions. def set_district @district = District.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def district_params params[:district] end end
Add schools instance variable to show method, remove new, edit, update, create destroy methods
Add schools instance variable to show method, remove new, edit, update, create destroy methods
Ruby
mit
fma2/school-visits-tool,fma2/school-visits-tool
ruby
## Code Before: class DistrictsController < ApplicationController before_action :set_district, only: [:show, :edit, :update, :destroy] # GET /districts # GET /districts.json def index @districts = District.all end # GET /districts/1 # GET /districts/1.json def show end # GET /districts/new def new @district = District.new end # GET /districts/1/edit def edit end # POST /districts # POST /districts.json def create @district = District.new(district_params) respond_to do |format| if @district.save format.html { redirect_to @district, notice: 'District was successfully created.' } format.json { render :show, status: :created, location: @district } else format.html { render :new } format.json { render json: @district.errors, status: :unprocessable_entity } end end end # PATCH/PUT /districts/1 # PATCH/PUT /districts/1.json def update respond_to do |format| if @district.update(district_params) format.html { redirect_to @district, notice: 'District was successfully updated.' } format.json { render :show, status: :ok, location: @district } else format.html { render :edit } format.json { render json: @district.errors, status: :unprocessable_entity } end end end # DELETE /districts/1 # DELETE /districts/1.json def destroy @district.destroy respond_to do |format| format.html { redirect_to districts_url, notice: 'District was successfully destroyed.' } format.json { head :no_content } end end private # Use callbacks to share common setup or constraints between actions. def set_district @district = District.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def district_params params[:district] end end ## Instruction: Add schools instance variable to show method, remove new, edit, update, create destroy methods ## Code After: class DistrictsController < ApplicationController before_action :set_district, only: [:show, :edit, :update, :destroy] # GET /districts # GET /districts.json def index @districts = District.all end # GET /districts/1 # GET /districts/1.json def show @schools = @district.schools end private # Use callbacks to share common setup or constraints between actions. def set_district @district = District.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def district_params params[:district] end end
class DistrictsController < ApplicationController before_action :set_district, only: [:show, :edit, :update, :destroy] # GET /districts # GET /districts.json def index @districts = District.all end # GET /districts/1 # GET /districts/1.json def show + @schools = @district.schools end + - - # GET /districts/new - def new - @district = District.new - end - - # GET /districts/1/edit - def edit - end - - # POST /districts - # POST /districts.json - def create - @district = District.new(district_params) - - respond_to do |format| - if @district.save - format.html { redirect_to @district, notice: 'District was successfully created.' } - format.json { render :show, status: :created, location: @district } - else - format.html { render :new } - format.json { render json: @district.errors, status: :unprocessable_entity } - end - end - end - - # PATCH/PUT /districts/1 - # PATCH/PUT /districts/1.json - def update - respond_to do |format| - if @district.update(district_params) - format.html { redirect_to @district, notice: 'District was successfully updated.' } - format.json { render :show, status: :ok, location: @district } - else - format.html { render :edit } - format.json { render json: @district.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /districts/1 - # DELETE /districts/1.json - def destroy - @district.destroy - respond_to do |format| - format.html { redirect_to districts_url, notice: 'District was successfully destroyed.' } - format.json { head :no_content } - end - end - private # Use callbacks to share common setup or constraints between actions. def set_district @district = District.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def district_params params[:district] end end
52
0.702703
2
50
20147b8b8a80ef8ab202d916bf1cdfb67d4753d3
SelfTests.py
SelfTests.py
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correctly signs bool OPENED and returns ## 0 as succes. self.assertFalse(testLog.opened) self.assertEqual(returns,0) returns = testLog.close() ## Check if logger returns 1 when trying to close already ## closed file self.assertEqual(returns,1) ## Do cleanup: os.remove(testLog.name) def test_logging(self): testLog = Logger("testLog") testLog.save_line("TestLine") testLog.close() logfile = open(testLog.name) content = logfile.read() logfile.close() saved = content.split(" : ") self.assertEqual(saved[1],"TestLine") ## cleanup os.remove(testLog.name) if __name__ == '__main__': unittest.main()
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correctly signs bool OPENED and returns ## 0 as succes. self.assertFalse(testLog.opened) self.assertEqual(returns,0) returns = testLog.close() ## Check if logger returns 1 when trying to close already ## closed file self.assertEqual(returns,1) ## Do cleanup: os.remove(testLog.name) def test_logging(self): testLog = Logger("testLog") testPhrase = "TestLine\r\n" testLog.save_line(testPhrase) testLog.close() logfile = open(testLog.name) content = logfile.read() logfile.close() saved = content.split(" : ") ## Check if saved data corresponds self.assertEqual(saved[1],testPhrase) ## cleanup os.remove(testLog.name) if __name__ == '__main__': unittest.main()
Test of logger is testing an testPhrase instead of two manually writen strings
Test of logger is testing an testPhrase instead of two manually writen strings Signed-off-by: TeaPackCZ <a78d8486eff6e2cb08b2d9907449b92187b8e215@gmail.com>
Python
mit
TeaPackCZ/RobotZed,TeaPackCZ/RobotZed
python
## Code Before: import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correctly signs bool OPENED and returns ## 0 as succes. self.assertFalse(testLog.opened) self.assertEqual(returns,0) returns = testLog.close() ## Check if logger returns 1 when trying to close already ## closed file self.assertEqual(returns,1) ## Do cleanup: os.remove(testLog.name) def test_logging(self): testLog = Logger("testLog") testLog.save_line("TestLine") testLog.close() logfile = open(testLog.name) content = logfile.read() logfile.close() saved = content.split(" : ") self.assertEqual(saved[1],"TestLine") ## cleanup os.remove(testLog.name) if __name__ == '__main__': unittest.main() ## Instruction: Test of logger is testing an testPhrase instead of two manually writen strings Signed-off-by: TeaPackCZ <a78d8486eff6e2cb08b2d9907449b92187b8e215@gmail.com> ## Code After: import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correctly signs bool OPENED and returns ## 0 as succes. self.assertFalse(testLog.opened) self.assertEqual(returns,0) returns = testLog.close() ## Check if logger returns 1 when trying to close already ## closed file self.assertEqual(returns,1) ## Do cleanup: os.remove(testLog.name) def test_logging(self): testLog = Logger("testLog") testPhrase = "TestLine\r\n" testLog.save_line(testPhrase) testLog.close() logfile = open(testLog.name) content = logfile.read() logfile.close() saved = content.split(" : ") ## Check if saved data corresponds self.assertEqual(saved[1],testPhrase) ## cleanup os.remove(testLog.name) if __name__ == '__main__': unittest.main()
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correctly signs bool OPENED and returns ## 0 as succes. self.assertFalse(testLog.opened) self.assertEqual(returns,0) returns = testLog.close() ## Check if logger returns 1 when trying to close already ## closed file self.assertEqual(returns,1) ## Do cleanup: os.remove(testLog.name) def test_logging(self): testLog = Logger("testLog") + testPhrase = "TestLine\r\n" - testLog.save_line("TestLine") ? ^^ ^^^ - + testLog.save_line(testPhrase) ? ^ ^^^^^ testLog.close() logfile = open(testLog.name) content = logfile.read() logfile.close() saved = content.split(" : ") + ## Check if saved data corresponds - self.assertEqual(saved[1],"TestLine") ? ^^ ^^^ - + self.assertEqual(saved[1],testPhrase) ? ^ ^^^^^ ## cleanup os.remove(testLog.name) if __name__ == '__main__': unittest.main()
6
0.166667
4
2
78cd332bc153bf4ff01f92b272c1cafecd26b35c
src/internal/solver/fixtures/002_020_temperature.json
src/internal/solver/fixtures/002_020_temperature.json
{ "system": { "floorplan": "fixtures/002.flp", "configuration": "fixtures/hotspot.config", "specification": "fixtures/002_020.tgff", "ambience": 318.15 }, "target": { "name": "maximal-temperature", "uncertainty": { "name": "marginal", "deviation": 0.2, "distribution": "Beta(1, 1)", "corrLength": 5, "varThreshold": 0.95 }, "importance": [1, 0], "rejection": [0, 0], "refinement": [1e-7, 0], "timeIndex": "[0:0.1:1]" }, "solver": { "rule": "open", "minLevel": 1, "maxLevel": 3 } }
{ "system": { "floorplan": "fixtures/002.flp", "configuration": "fixtures/hotspot.config", "specification": "fixtures/002_020.tgff", "ambience": 318.15 }, "target": { "name": "maximal-temperature", "uncertainty": { "name": "marginal", "deviation": 0.2, "distribution": "Beta(1, 1)", "corrLength": 5, "varThreshold": 0.95 }, "importance": [1, 0], "rejection": [0, 0], "refinement": [1e-7, 0] }, "solver": { "rule": "open", "minLevel": 1, "maxLevel": 3 } }
Clean up a configuration file
Clean up a configuration file
JSON
mit
turing-complete/laboratory,turing-complete/laboratory,turing-complete/laboratory
json
## Code Before: { "system": { "floorplan": "fixtures/002.flp", "configuration": "fixtures/hotspot.config", "specification": "fixtures/002_020.tgff", "ambience": 318.15 }, "target": { "name": "maximal-temperature", "uncertainty": { "name": "marginal", "deviation": 0.2, "distribution": "Beta(1, 1)", "corrLength": 5, "varThreshold": 0.95 }, "importance": [1, 0], "rejection": [0, 0], "refinement": [1e-7, 0], "timeIndex": "[0:0.1:1]" }, "solver": { "rule": "open", "minLevel": 1, "maxLevel": 3 } } ## Instruction: Clean up a configuration file ## Code After: { "system": { "floorplan": "fixtures/002.flp", "configuration": "fixtures/hotspot.config", "specification": "fixtures/002_020.tgff", "ambience": 318.15 }, "target": { "name": "maximal-temperature", "uncertainty": { "name": "marginal", "deviation": 0.2, "distribution": "Beta(1, 1)", "corrLength": 5, "varThreshold": 0.95 }, "importance": [1, 0], "rejection": [0, 0], "refinement": [1e-7, 0] }, "solver": { "rule": "open", "minLevel": 1, "maxLevel": 3 } }
{ "system": { "floorplan": "fixtures/002.flp", "configuration": "fixtures/hotspot.config", "specification": "fixtures/002_020.tgff", "ambience": 318.15 }, "target": { "name": "maximal-temperature", "uncertainty": { "name": "marginal", "deviation": 0.2, "distribution": "Beta(1, 1)", "corrLength": 5, "varThreshold": 0.95 }, "importance": [1, 0], "rejection": [0, 0], - "refinement": [1e-7, 0], ? - + "refinement": [1e-7, 0] - "timeIndex": "[0:0.1:1]" }, "solver": { "rule": "open", "minLevel": 1, "maxLevel": 3 } }
3
0.103448
1
2
0c387d03855be810c06b4f1cb38cbaca35298e36
app/controllers/manage/work_experiences_controller.rb
app/controllers/manage/work_experiences_controller.rb
module Manage class WorkExperiencesController < ManageController before_action :set_work_experience, only: [:edit, :update, :destroy] respond_to :html, :json def index @work_experiences = WorkExperience.all respond_with(@work_experiences) end def new @work_experience = WorkExperience.new respond_with(@work_experience) end def edit end def create @work_experience = WorkExperience.new(work_experience_params) @work_experience.user = current_user @work_experience.save respond_with(@work_experience) end def update @work_experience.update(work_experience_params) respond_with(@work_experience) end def destroy @work_experience.destroy respond_with(@work_experience, :location => manage_work_experiences_path) end private def set_work_experience @work_experience = WorkExperience.find(params[:id]) end def work_experience_params params.require(:work_experience).permit(:organization, :position, :description, :start_date, :end_date) end end end
module Manage class WorkExperiencesController < ManageController before_action :set_work_experience, only: [:edit, :update, :destroy] respond_to :html, :json def index @work_experiences = WorkExperience.all respond_with(@work_experiences) end def new @work_experience = WorkExperience.new respond_with(@work_experience, :location => manage_work_experiences_path) end def edit end def create @work_experience = WorkExperience.new(work_experience_params) @work_experience.user = current_user @work_experience.save respond_with(@work_experience, :location => manage_work_experiences_path) end def update @work_experience.update(work_experience_params) respond_with(@work_experience, :location => manage_work_experiences_path) end def destroy @work_experience.destroy respond_with(@work_experience, :location => manage_work_experiences_path) end private def set_work_experience @work_experience = WorkExperience.find(params[:id]) end def work_experience_params params.require(:work_experience).permit(:organization, :position, :description, :start_date, :end_date) end end end
Fix post-action redirects in Manage::WorkExperiences
Fix post-action redirects in Manage::WorkExperiences Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>
Ruby
apache-2.0
maxfierke/resumis,maxfierke/resumis,maxfierke/resumis,maxfierke/resumis
ruby
## Code Before: module Manage class WorkExperiencesController < ManageController before_action :set_work_experience, only: [:edit, :update, :destroy] respond_to :html, :json def index @work_experiences = WorkExperience.all respond_with(@work_experiences) end def new @work_experience = WorkExperience.new respond_with(@work_experience) end def edit end def create @work_experience = WorkExperience.new(work_experience_params) @work_experience.user = current_user @work_experience.save respond_with(@work_experience) end def update @work_experience.update(work_experience_params) respond_with(@work_experience) end def destroy @work_experience.destroy respond_with(@work_experience, :location => manage_work_experiences_path) end private def set_work_experience @work_experience = WorkExperience.find(params[:id]) end def work_experience_params params.require(:work_experience).permit(:organization, :position, :description, :start_date, :end_date) end end end ## Instruction: Fix post-action redirects in Manage::WorkExperiences Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com> ## Code After: module Manage class WorkExperiencesController < ManageController before_action :set_work_experience, only: [:edit, :update, :destroy] respond_to :html, :json def index @work_experiences = WorkExperience.all respond_with(@work_experiences) end def new @work_experience = WorkExperience.new respond_with(@work_experience, :location => manage_work_experiences_path) end def edit end def create @work_experience = WorkExperience.new(work_experience_params) @work_experience.user = current_user @work_experience.save respond_with(@work_experience, :location => manage_work_experiences_path) end def update @work_experience.update(work_experience_params) respond_with(@work_experience, :location => manage_work_experiences_path) end def destroy @work_experience.destroy respond_with(@work_experience, :location => manage_work_experiences_path) end private def set_work_experience @work_experience = WorkExperience.find(params[:id]) end def work_experience_params params.require(:work_experience).permit(:organization, :position, :description, :start_date, :end_date) end end end
module Manage class WorkExperiencesController < ManageController before_action :set_work_experience, only: [:edit, :update, :destroy] respond_to :html, :json def index @work_experiences = WorkExperience.all respond_with(@work_experiences) end def new @work_experience = WorkExperience.new - respond_with(@work_experience) + respond_with(@work_experience, :location => manage_work_experiences_path) end def edit end def create @work_experience = WorkExperience.new(work_experience_params) @work_experience.user = current_user @work_experience.save - respond_with(@work_experience) + respond_with(@work_experience, :location => manage_work_experiences_path) end def update @work_experience.update(work_experience_params) - respond_with(@work_experience) + respond_with(@work_experience, :location => manage_work_experiences_path) end def destroy @work_experience.destroy respond_with(@work_experience, :location => manage_work_experiences_path) end private def set_work_experience @work_experience = WorkExperience.find(params[:id]) end def work_experience_params params.require(:work_experience).permit(:organization, :position, :description, :start_date, :end_date) end end end
6
0.130435
3
3
b357894f852ce2189e891a430943db878c024257
app/views/shared/_entities_search.html.haml
app/views/shared/_entities_search.html.haml
.search - form_tag(:controller=>:relations, :action=>:entities) do %table %tr %td.label=tc("search") %td.field=text_field_tag :key, session[:entity_key] %td.submit=submit_tag tg("search_go")
.search - form_tag({:controller=>:relations, :action=>:entities}, :method=>:get) do %table %tr %td.label=tc("search") %td.field=text_field_tag :key, params[:key]||session[:entity_key] %td.submit=submit_tag tg("search_go"), :name=>nil
Set entity search in get mode in order to simplify previous process in web navigation
Set entity search in get mode in order to simplify previous process in web navigation git-svn-id: f16a2f23d171dee4464daf87d70b3f1ae0981068@1548 67a09383-3dfa-4221-8551-890bac9c277c
Haml
agpl-3.0
gaapt/ekylibre,danimaribeiro/ekylibre,ekylibre/ekylibre,GPCsolutions/ekylibre,danimaribeiro/ekylibre,danimaribeiro/ekylibre,gaapt/ekylibre,ekylibre/ekylibre,GPCsolutions/ekylibre,GPCsolutions/ekylibre,GPCsolutions/ekylibre,gaapt/ekylibre,ekylibre/ekylibre,danimaribeiro/ekylibre,gaapt/ekylibre,ekylibre/ekylibre,ekylibre/ekylibre
haml
## Code Before: .search - form_tag(:controller=>:relations, :action=>:entities) do %table %tr %td.label=tc("search") %td.field=text_field_tag :key, session[:entity_key] %td.submit=submit_tag tg("search_go") ## Instruction: Set entity search in get mode in order to simplify previous process in web navigation git-svn-id: f16a2f23d171dee4464daf87d70b3f1ae0981068@1548 67a09383-3dfa-4221-8551-890bac9c277c ## Code After: .search - form_tag({:controller=>:relations, :action=>:entities}, :method=>:get) do %table %tr %td.label=tc("search") %td.field=text_field_tag :key, params[:key]||session[:entity_key] %td.submit=submit_tag tg("search_go"), :name=>nil
.search - - form_tag(:controller=>:relations, :action=>:entities) do + - form_tag({:controller=>:relations, :action=>:entities}, :method=>:get) do ? + ++++++++++++++++ %table %tr %td.label=tc("search") - %td.field=text_field_tag :key, session[:entity_key] + %td.field=text_field_tag :key, params[:key]||session[:entity_key] ? ++++++++++++++ - %td.submit=submit_tag tg("search_go") + %td.submit=submit_tag tg("search_go"), :name=>nil ? ++++++++++++
6
0.857143
3
3
f77bbda7f4eea7d8324638fd1c98a64884efef14
test/output-app/resolvers/index.js
test/output-app/resolvers/index.js
import { ObjectId } from 'mongodb'; import { GraphQLScalarType } from 'graphql'; import { Kind } from 'graphql/language'; import merge from 'lodash.merge'; const resolvers = {}; resolvers.ObjID = new GraphQLScalarType({ name: 'ObjID', description: 'Id representation, based on Mongo Object Ids', parseValue(value) { return ObjectId(value); }, serialize(value) { return value.toString(); }, parseLiteral(ast) { if (ast.kind === Kind.STRING) { return ObjectId(ast.value); } return null; }, }); export default resolvers; import tweetResolvers from './Tweet'; merge(resolvers, tweetResolvers); import userResolvers from './User'; merge(resolvers, userResolvers);
import { ObjectId } from 'mongodb'; import { GraphQLScalarType } from 'graphql'; import { Kind } from 'graphql/language'; import { merge } from 'lodash'; const resolvers = {}; resolvers.ObjID = new GraphQLScalarType({ name: 'ObjID', description: 'Id representation, based on Mongo Object Ids', parseValue(value) { return ObjectId(value); }, serialize(value) { return value.toString(); }, parseLiteral(ast) { if (ast.kind === Kind.STRING) { return ObjectId(ast.value); } return null; }, }); export default resolvers; import tweetResolvers from './Tweet'; merge(resolvers, tweetResolvers); import userResolvers from './User'; merge(resolvers, userResolvers);
Fix issue with output app
Fix issue with output app
JavaScript
mit
tmeasday/create-graphql-server,tobkle/create-graphql-server,tmeasday/create-graphql-server,tobkle/create-graphql-server
javascript
## Code Before: import { ObjectId } from 'mongodb'; import { GraphQLScalarType } from 'graphql'; import { Kind } from 'graphql/language'; import merge from 'lodash.merge'; const resolvers = {}; resolvers.ObjID = new GraphQLScalarType({ name: 'ObjID', description: 'Id representation, based on Mongo Object Ids', parseValue(value) { return ObjectId(value); }, serialize(value) { return value.toString(); }, parseLiteral(ast) { if (ast.kind === Kind.STRING) { return ObjectId(ast.value); } return null; }, }); export default resolvers; import tweetResolvers from './Tweet'; merge(resolvers, tweetResolvers); import userResolvers from './User'; merge(resolvers, userResolvers); ## Instruction: Fix issue with output app ## Code After: import { ObjectId } from 'mongodb'; import { GraphQLScalarType } from 'graphql'; import { Kind } from 'graphql/language'; import { merge } from 'lodash'; const resolvers = {}; resolvers.ObjID = new GraphQLScalarType({ name: 'ObjID', description: 'Id representation, based on Mongo Object Ids', parseValue(value) { return ObjectId(value); }, serialize(value) { return value.toString(); }, parseLiteral(ast) { if (ast.kind === Kind.STRING) { return ObjectId(ast.value); } return null; }, }); export default resolvers; import tweetResolvers from './Tweet'; merge(resolvers, tweetResolvers); import userResolvers from './User'; merge(resolvers, userResolvers);
import { ObjectId } from 'mongodb'; import { GraphQLScalarType } from 'graphql'; import { Kind } from 'graphql/language'; - import merge from 'lodash.merge'; ? ------ + import { merge } from 'lodash'; ? ++ ++ const resolvers = {}; resolvers.ObjID = new GraphQLScalarType({ name: 'ObjID', description: 'Id representation, based on Mongo Object Ids', parseValue(value) { return ObjectId(value); }, serialize(value) { return value.toString(); }, parseLiteral(ast) { if (ast.kind === Kind.STRING) { return ObjectId(ast.value); } return null; }, }); export default resolvers; import tweetResolvers from './Tweet'; merge(resolvers, tweetResolvers); import userResolvers from './User'; merge(resolvers, userResolvers);
2
0.064516
1
1
09160fb35be6212d41540c7503c98882f0bc74c8
docs/app/pages/UiElements/TextSelection/examples/SelectionExample.vue
docs/app/pages/UiElements/TextSelection/examples/SelectionExample.vue
<template> <div> <h2>Select any text to see the selection background</h2> <p>This text will follow the default color of the documentation, which is a nice red color.</p> <md-content md-theme="selection-black"> <p>This one will get a slick black background when selected, because the parent theme have another color.</p> </md-content> <md-content md-theme="selection-orange"> <p>Also works when the theme is dark.</p> </md-content> </div> </template> <script> export default { name: 'SelectionExample' } </script> <style lang="scss"> @import "~vue-material/theme/engine"; @include md-register-theme("selection-black", ( accent: md-get-palette-color(black, 500) )); @include md-register-theme("selection-orange", ( accent: md-get-palette-color(orange, 500), theme: dark )); @import "~vue-material/base/theme"; @import "~vue-material/components/MdContent/theme"; </style> <style lang="scss" scoped> .md-content { padding: 1px 16px; } </style>
<template> <div> <h2>Select any text to see the selection background</h2> <p>This text will follow the default color of the documentation, which is a nice red color.</p> <md-content md-theme="selection-black"> <p>This one will get a slick black background when selected, because the parent theme have another color.</p> </md-content> <md-content md-theme="selection-orange"> <p>Also works when the theme is dark.</p> </md-content> </div> </template> <script> export default { name: 'SelectionExample' } </script> <style lang="scss"> @import "~vue-material/theme/engine"; @include md-register-theme("selection-black", ( accent: md-get-palette-color(black, 500) )); @include md-register-theme("selection-orange", ( accent: md-get-palette-color(orange, 500), theme: dark )); @import "~vue-material/base/theme"; @import "~vue-material/components/MdContent/theme"; .md-content { padding: 1px 16px; } </style>
Revert "fix: remove global scoped css affecting all md-content elements"
Revert "fix: remove global scoped css affecting all md-content elements" This reverts commit 5fa0d52ef96400e34493076ab2fef6ad643be136.
Vue
mit
vuematerial/vue-material,marcosmoura/vue-material,marcosmoura/vue-material,vuematerial/vue-material,VdustR/vue-material,VdustR/vue-material
vue
## Code Before: <template> <div> <h2>Select any text to see the selection background</h2> <p>This text will follow the default color of the documentation, which is a nice red color.</p> <md-content md-theme="selection-black"> <p>This one will get a slick black background when selected, because the parent theme have another color.</p> </md-content> <md-content md-theme="selection-orange"> <p>Also works when the theme is dark.</p> </md-content> </div> </template> <script> export default { name: 'SelectionExample' } </script> <style lang="scss"> @import "~vue-material/theme/engine"; @include md-register-theme("selection-black", ( accent: md-get-palette-color(black, 500) )); @include md-register-theme("selection-orange", ( accent: md-get-palette-color(orange, 500), theme: dark )); @import "~vue-material/base/theme"; @import "~vue-material/components/MdContent/theme"; </style> <style lang="scss" scoped> .md-content { padding: 1px 16px; } </style> ## Instruction: Revert "fix: remove global scoped css affecting all md-content elements" This reverts commit 5fa0d52ef96400e34493076ab2fef6ad643be136. ## Code After: <template> <div> <h2>Select any text to see the selection background</h2> <p>This text will follow the default color of the documentation, which is a nice red color.</p> <md-content md-theme="selection-black"> <p>This one will get a slick black background when selected, because the parent theme have another color.</p> </md-content> <md-content md-theme="selection-orange"> <p>Also works when the theme is dark.</p> </md-content> </div> </template> <script> export default { name: 'SelectionExample' } </script> <style lang="scss"> @import "~vue-material/theme/engine"; @include md-register-theme("selection-black", ( accent: md-get-palette-color(black, 500) )); @include md-register-theme("selection-orange", ( accent: md-get-palette-color(orange, 500), theme: dark )); @import "~vue-material/base/theme"; @import "~vue-material/components/MdContent/theme"; .md-content { padding: 1px 16px; } </style>
<template> <div> <h2>Select any text to see the selection background</h2> <p>This text will follow the default color of the documentation, which is a nice red color.</p> <md-content md-theme="selection-black"> <p>This one will get a slick black background when selected, because the parent theme have another color.</p> </md-content> <md-content md-theme="selection-orange"> <p>Also works when the theme is dark.</p> </md-content> </div> </template> <script> export default { name: 'SelectionExample' } </script> <style lang="scss"> @import "~vue-material/theme/engine"; @include md-register-theme("selection-black", ( accent: md-get-palette-color(black, 500) )); @include md-register-theme("selection-orange", ( accent: md-get-palette-color(orange, 500), theme: dark )); @import "~vue-material/base/theme"; @import "~vue-material/components/MdContent/theme"; - </style> - <style lang="scss" scoped> .md-content { padding: 1px 16px; } </style>
2
0.047619
0
2
43990a610d3bb59a347bcb4e14c46ea697558e11
tests/TestIODevice.cpp
tests/TestIODevice.cpp
void TestIODevice::fakeWrite(const QByteArray& data) { readStore.append(data); emit readyRead(); } qint64 TestIODevice::readData(char* data, qint64 maxSize) { auto readData = readStore.left(maxSize); //std::cerr << "Read " << readData.size() << " byte(s) from mock IO device, requested " << maxSize << std::endl; qstrcpy(data, readData.constData()); if (readStore.size() == readData.size()) { readStore.clear(); } else { readStore = readStore.right(readStore.size() - readData.size()); } return readData.size(); } qint64 TestIODevice::writeData(const char* data, qint64 maxSize) { writeStore.append(data, maxSize); return maxSize; }
void TestIODevice::fakeWrite(const QByteArray& data) { readStore.append(data); emit readyRead(); } qint64 TestIODevice::readData(char* data, qint64 maxSize) { auto readData = readStore.left(maxSize); //std::cerr << "Read " << readData.size() << " byte(s) from mock IO device, requested " << maxSize << std::endl; memcpy(data, readData.constData(), readData.size()); if (readStore.size() == readData.size()) { readStore.clear(); } else { readStore = readStore.right(readStore.size() - readData.size()); } return readData.size(); } qint64 TestIODevice::writeData(const char* data, qint64 maxSize) { writeStore.append(data, maxSize); return maxSize; }
Use memcpy, not qstrcpy, when copying data in the test device
Use memcpy, not qstrcpy, when copying data in the test device
C++
mit
Thonik/rainback
c++
## Code Before: void TestIODevice::fakeWrite(const QByteArray& data) { readStore.append(data); emit readyRead(); } qint64 TestIODevice::readData(char* data, qint64 maxSize) { auto readData = readStore.left(maxSize); //std::cerr << "Read " << readData.size() << " byte(s) from mock IO device, requested " << maxSize << std::endl; qstrcpy(data, readData.constData()); if (readStore.size() == readData.size()) { readStore.clear(); } else { readStore = readStore.right(readStore.size() - readData.size()); } return readData.size(); } qint64 TestIODevice::writeData(const char* data, qint64 maxSize) { writeStore.append(data, maxSize); return maxSize; } ## Instruction: Use memcpy, not qstrcpy, when copying data in the test device ## Code After: void TestIODevice::fakeWrite(const QByteArray& data) { readStore.append(data); emit readyRead(); } qint64 TestIODevice::readData(char* data, qint64 maxSize) { auto readData = readStore.left(maxSize); //std::cerr << "Read " << readData.size() << " byte(s) from mock IO device, requested " << maxSize << std::endl; memcpy(data, readData.constData(), readData.size()); if (readStore.size() == readData.size()) { readStore.clear(); } else { readStore = readStore.right(readStore.size() - readData.size()); } return readData.size(); } qint64 TestIODevice::writeData(const char* data, qint64 maxSize) { writeStore.append(data, maxSize); return maxSize; }
void TestIODevice::fakeWrite(const QByteArray& data) { readStore.append(data); emit readyRead(); } qint64 TestIODevice::readData(char* data, qint64 maxSize) { auto readData = readStore.left(maxSize); //std::cerr << "Read " << readData.size() << " byte(s) from mock IO device, requested " << maxSize << std::endl; - qstrcpy(data, readData.constData()); ? ^^^^ + memcpy(data, readData.constData(), readData.size()); ? ^^^ +++++++++++++++++ if (readStore.size() == readData.size()) { readStore.clear(); } else { readStore = readStore.right(readStore.size() - readData.size()); } return readData.size(); } qint64 TestIODevice::writeData(const char* data, qint64 maxSize) { writeStore.append(data, maxSize); return maxSize; }
2
0.08
1
1
60b1dc9ea217e40a3a78c2bb76bcabaf0e548ae2
docs/src/main/asciidoc/all-config.adoc
docs/src/main/asciidoc/all-config.adoc
//// This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc //// = Quarkus - All configuration options include::./attributes.adoc[] include::{generated-dir}/config/all-config.adoc[opts=optional]
--- layout: guides-configuration-reference --- //// This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc //// = Quarkus - All configuration options include::./attributes.adoc[] include::{generated-dir}/config/all-config.adoc[opts=optional]
Use the guides without toc layout
Use the guides without toc layout
AsciiDoc
apache-2.0
quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus
asciidoc
## Code Before: //// This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc //// = Quarkus - All configuration options include::./attributes.adoc[] include::{generated-dir}/config/all-config.adoc[opts=optional] ## Instruction: Use the guides without toc layout ## Code After: --- layout: guides-configuration-reference --- //// This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc //// = Quarkus - All configuration options include::./attributes.adoc[] include::{generated-dir}/config/all-config.adoc[opts=optional]
+ --- + layout: guides-configuration-reference + --- //// This guide is maintained in the main Quarkus repository and pull requests should be submitted there: https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc //// = Quarkus - All configuration options include::./attributes.adoc[] include::{generated-dir}/config/all-config.adoc[opts=optional]
3
0.3
3
0
6bf341e9b348ee0de6133f220056a49bd6a4a180
test/unit/lib/rake_task_test.rb
test/unit/lib/rake_task_test.rb
require 'test_helper' class RakeTaskTest < ActiveSupport::TestCase test 'regression test for rake reminders' do assert_equal 1, Project.projects_to_remind.size result = system 'rake reminders >/dev/null' assert result assert_equal 0, Project.projects_to_remind.size end end
require 'test_helper' require 'database_cleaner' DatabaseCleaner.strategy = :transaction class RakeTaskTest < ActiveSupport::TestCase # When using DatabaseCleaner, transactional fixtures must be off. self.use_transactional_tests = false setup do # Start DatabaseCleaner before each test. DatabaseCleaner.start end teardown do # Clean up the database with DatabaseCleaner after each test. DatabaseCleaner.clean end test 'regression test for rake reminders' do assert_equal 1, Project.projects_to_remind.size result = system 'rake reminders >/dev/null' assert result assert_equal 0, Project.projects_to_remind.size end end
Fix seed issue with rakeTaskTest regression test
Fix seed issue with rakeTaskTest regression test Signed-off-by: Jason Dossett <e6f895edd39634df23774f0615e338f58a73f02c@utdallas.edu>
Ruby
mit
wanganyv/cii-best-practices-badge,yannickmoy/cii-best-practices-badge,jdossett/cii-best-practices-badge,linuxfoundation/cii-best-practices-badge,coreinfrastructure/best-practices-badge,taylorcoursey/cii-best-practices-badge,taylorcoursey/cii-best-practices-badge,jdossett/cii-best-practices-badge,jdossett/cii-best-practices-badge,jdossett/cii-best-practices-badge,linuxfoundation/cii-best-practices-badge,taylorcoursey/cii-best-practices-badge,coreinfrastructure/best-practices-badge,linuxfoundation/cii-best-practices-badge,coreinfrastructure/best-practices-badge,wanganyv/cii-best-practices-badge,taylorcoursey/cii-best-practices-badge,coreinfrastructure/best-practices-badge,wanganyv/cii-best-practices-badge,yannickmoy/cii-best-practices-badge,yannickmoy/cii-best-practices-badge,wanganyv/cii-best-practices-badge,yannickmoy/cii-best-practices-badge,linuxfoundation/cii-best-practices-badge
ruby
## Code Before: require 'test_helper' class RakeTaskTest < ActiveSupport::TestCase test 'regression test for rake reminders' do assert_equal 1, Project.projects_to_remind.size result = system 'rake reminders >/dev/null' assert result assert_equal 0, Project.projects_to_remind.size end end ## Instruction: Fix seed issue with rakeTaskTest regression test Signed-off-by: Jason Dossett <e6f895edd39634df23774f0615e338f58a73f02c@utdallas.edu> ## Code After: require 'test_helper' require 'database_cleaner' DatabaseCleaner.strategy = :transaction class RakeTaskTest < ActiveSupport::TestCase # When using DatabaseCleaner, transactional fixtures must be off. self.use_transactional_tests = false setup do # Start DatabaseCleaner before each test. DatabaseCleaner.start end teardown do # Clean up the database with DatabaseCleaner after each test. DatabaseCleaner.clean end test 'regression test for rake reminders' do assert_equal 1, Project.projects_to_remind.size result = system 'rake reminders >/dev/null' assert result assert_equal 0, Project.projects_to_remind.size end end
require 'test_helper' + require 'database_cleaner' + DatabaseCleaner.strategy = :transaction class RakeTaskTest < ActiveSupport::TestCase + # When using DatabaseCleaner, transactional fixtures must be off. + self.use_transactional_tests = false + + setup do + # Start DatabaseCleaner before each test. + DatabaseCleaner.start + end + + teardown do + # Clean up the database with DatabaseCleaner after each test. + DatabaseCleaner.clean + end + test 'regression test for rake reminders' do assert_equal 1, Project.projects_to_remind.size result = system 'rake reminders >/dev/null' assert result assert_equal 0, Project.projects_to_remind.size end end
15
1.5
15
0
9586060e7c81439caa7c267ec303c41b4e2bfadd
README.txt
README.txt
Creates a Document Collection Changefile for Solve for All based on Javadocs. Getting the OpenJDK docs (redistributable it seems) in Ubuntu: sudo apt-get update sudo apt-get install openjdk-7-doc ruby main.rb /usr/lib/jvm/java-7-openjdk-amd64/docs/api should output jdk7-doc.json.bz2 which can then be uploaded. Also works with JDK 8 Javadocs, but they seem to be non-redistributable. See https://solveforall.com/docs/developer/document_collection for more info.
Creates a Semantic Data Collection Changefile for Solve for All based on Javadocs. Getting the OpenJDK docs (redistributable it seems) in Ubuntu: sudo apt-get update sudo apt-get install openjdk-7-doc ruby main.rb /usr/lib/jvm/java-7-openjdk-amd64/docs/api should output jdk7-doc.json.bz2 which can then be uploaded. Also works with JDK 8 Javadocs, but they seem to be non-redistributable. See https://solveforall.com/docs/developer/semantic_data_collection for more info.
Document Collection => Semantic Data Collection
Document Collection => Semantic Data Collection
Text
apache-2.0
jtsay362/javadoc-populator
text
## Code Before: Creates a Document Collection Changefile for Solve for All based on Javadocs. Getting the OpenJDK docs (redistributable it seems) in Ubuntu: sudo apt-get update sudo apt-get install openjdk-7-doc ruby main.rb /usr/lib/jvm/java-7-openjdk-amd64/docs/api should output jdk7-doc.json.bz2 which can then be uploaded. Also works with JDK 8 Javadocs, but they seem to be non-redistributable. See https://solveforall.com/docs/developer/document_collection for more info. ## Instruction: Document Collection => Semantic Data Collection ## Code After: Creates a Semantic Data Collection Changefile for Solve for All based on Javadocs. Getting the OpenJDK docs (redistributable it seems) in Ubuntu: sudo apt-get update sudo apt-get install openjdk-7-doc ruby main.rb /usr/lib/jvm/java-7-openjdk-amd64/docs/api should output jdk7-doc.json.bz2 which can then be uploaded. Also works with JDK 8 Javadocs, but they seem to be non-redistributable. See https://solveforall.com/docs/developer/semantic_data_collection for more info.
- Creates a Document Collection Changefile for Solve for All based on Javadocs. ? ^^^^ ^ + Creates a Semantic Data Collection Changefile for Solve for All based on Javadocs. ? ^^ ^ +++++++ Getting the OpenJDK docs (redistributable it seems) in Ubuntu: sudo apt-get update sudo apt-get install openjdk-7-doc ruby main.rb /usr/lib/jvm/java-7-openjdk-amd64/docs/api should output jdk7-doc.json.bz2 which can then be uploaded. Also works with JDK 8 Javadocs, but they seem to be non-redistributable. - See https://solveforall.com/docs/developer/document_collection for more info. ? ^^^^ ^ + See https://solveforall.com/docs/developer/semantic_data_collection for more info. ? ^^ ^ +++++++
4
0.307692
2
2
6d80352ef1a397a9bd17e2f767d7f3a13c2b5d88
tests/Functional/InstallTest.php
tests/Functional/InstallTest.php
<?php use Valet\Tests\Functional\FunctionalTestCase; /** * @group functional * @group acceptance */ class InstallTest extends FunctionalTestCase { public function test_valet_is_running_after_install() { $response = \Httpful\Request::get('http://test.dev')->send(); $this->assertEquals(404, $response->code); $this->assertContains('Valet - Not Found', $response->body); } }
<?php use Valet\Tests\Functional\FunctionalTestCase; /** * @group functional * @group acceptance */ class InstallTest extends FunctionalTestCase { public function test_valet_is_running_after_install() { $response = \Httpful\Request::get('http://test.dev')->send(); $this->assertEquals(404, $response->code); $this->assertContains('Valet - Not Found', $response->body); } public function test_dns_record_is_correct() { $record = dns_get_record('test.dev', DNS_A)[0]; $this->assertEquals('127.0.0.1', $record['ip']); } }
Test domains are resolved correctly
Test domains are resolved correctly
PHP
mit
cpriego/valet-linux,cpriego/valet-linux,cpriego/valet-linux
php
## Code Before: <?php use Valet\Tests\Functional\FunctionalTestCase; /** * @group functional * @group acceptance */ class InstallTest extends FunctionalTestCase { public function test_valet_is_running_after_install() { $response = \Httpful\Request::get('http://test.dev')->send(); $this->assertEquals(404, $response->code); $this->assertContains('Valet - Not Found', $response->body); } } ## Instruction: Test domains are resolved correctly ## Code After: <?php use Valet\Tests\Functional\FunctionalTestCase; /** * @group functional * @group acceptance */ class InstallTest extends FunctionalTestCase { public function test_valet_is_running_after_install() { $response = \Httpful\Request::get('http://test.dev')->send(); $this->assertEquals(404, $response->code); $this->assertContains('Valet - Not Found', $response->body); } public function test_dns_record_is_correct() { $record = dns_get_record('test.dev', DNS_A)[0]; $this->assertEquals('127.0.0.1', $record['ip']); } }
<?php use Valet\Tests\Functional\FunctionalTestCase; /** * @group functional * @group acceptance */ class InstallTest extends FunctionalTestCase { public function test_valet_is_running_after_install() { $response = \Httpful\Request::get('http://test.dev')->send(); $this->assertEquals(404, $response->code); $this->assertContains('Valet - Not Found', $response->body); } + + public function test_dns_record_is_correct() + { + $record = dns_get_record('test.dev', DNS_A)[0]; + + $this->assertEquals('127.0.0.1', $record['ip']); + } }
7
0.388889
7
0
25576fc50507ea127bd6c0949179567a35715e0c
CONTRIBUTING.md
CONTRIBUTING.md
JBoss AS Quickstarts ==================== Quickstarts (or examples, or samples) for JBoss AS. There are a number of rules for quickstarts: * Each quickstart should have a unique name, this enables a user to quickly identify each quickstart * A quickstart should have a simple build that the user can quickly understand. If using maven it should: 1. Not inherit from another POM 2. Import the various BOMs from AS7 APIs to get version numbers 3. Use the JBoss AS Maven Plugin to deploy the example * The quickstart should be importable into JBoss Tools and deployable there * The quickstart should be explained in detail in the associated user guide, including how to deploy * If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md` and `pom.xml` (the 'modules' section). You can find the documentation at <https://docs.jboss.org/author/display/AS7/Documentation>. If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md`. The 'dist' folder contains Maven scripts to build a zip of the quickstarts. The quickstart code is licensed under the Apache License, Version 2.0: <http://www.apache.org/licenses/LICENSE-2.0.html>
JBoss AS Quickstarts ==================== Quickstarts (or examples, or samples) for JBoss AS. There are a number of rules for quickstarts: * Each quickstart should have a unique name, this enables a user to quickly identify each quickstart * A quickstart should have a simple build that the user can quickly understand. If using maven it should: 1. Not inherit from another POM 2. Import the various BOMs from AS7 APIs to get version numbers 3. Use the JBoss AS Maven Plugin to deploy the example * The quickstart should be importable into JBoss Tools and deployable there * The quickstart should be explained in detail in the associated user guide, including how to deploy * If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md` and `pom.xml` (the 'modules' section). * The quickstart should be formatted using the JBoss AS profiles found at <https://github.com/jbossas/jboss-as/tree/master/ide-configs> You can find the documentation at <https://docs.jboss.org/author/display/AS7/Documentation>. If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md`. The 'dist' folder contains Maven scripts to build a zip of the quickstarts. The quickstart code is licensed under the Apache License, Version 2.0: <http://www.apache.org/licenses/LICENSE-2.0.html>
Add note about code formatting.
Add note about code formatting.
Markdown
apache-2.0
trepel/jboss-eap-quickstarts,jgisler/jboss-eap-quickstarts,luksa/jboss-eap-quickstarts,sherlockgomes/quickstart,filippocala/openshifttestdemo,ppolcz/quickstart,hguerrero/jboss-eap-quickstarts,rh-asharma/jboss-eap-quickstarts,DLT-Solutions-JBoss/jboss-eap-quickstarts,eduarddedu/quickstart,muhd7rosli/quickstart,rhatlapa/jboss-eap-quickstarts,rfhl93/quickstart,hkssitcloud/jboss-eap-quickstarts,jgisler/quickstart,sobiron/jboss-developer-jboss-eap-quickstarts,trepel/jboss-eap-quickstarts,vitorsilvalima/jboss-eap-quickstarts,grenne/quickstart,robstryker/quickstart,monospacesoftware/quickstart,bdecoste/jboss-eap-quickstarts,khajavi/jboss-eap-quickstarts,LightGuard/quickstart,jgisler/jboss-eap-quickstarts,wfink/jboss-as-quickstart,dashorst/quickstart,toncarvalho/quickstart,ivanthelad/jboss-eap-quickstarts,muhd7rosli/quickstart,amalalex/quickstart,drojokef/jboss-eap-quickstarts,jgisler/jboss-eap-quickstarts,rh-asharma/jboss-eap-quickstarts,codificat/jboss-eap-quickstarts,jbosstools/jboss-wfk-quickstarts,muhd7rosli/quickstart,arabitm86/quickstart,ozekisan/jboss-eap-quickstarts,YaelMendes/jboss-eap-quickstarts,felipebaccin/quickstart,ensouza93/quickstart,rfhl93/quickstart,mojavelinux/jboss-as-quickstart,luksa/jboss-eap-quickstarts,treblereel/jboss-eap-quickstarts,vitorsilvalima/jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,ozekisan/jboss-eap-quickstarts,hslee9397/jboss-eap-quickstarts,hguerrero/jboss-eap-quickstarts,rbattenfeld/quickstart,filippocala/openshifttestdemo,sherlockgomes/quickstart,jgisler/jboss-eap-quickstarts,wfink/quickstart,rodm/quickstart,1n/jboss-eap-quickstarts,tobias/jboss-eap-quickstarts,rfhl93/quickstart,grenne/quickstart,pgier/jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,fabiomartinsbrrj/jboss-eap-quickstarts,RonnieKing/quickstart,eduarddedu/quickstart,vitorsilvalima/jboss-eap-quickstarts,jbosstools/jboss-wfk-quickstarts,rbattenfeld/quickstart,bdecoste/jboss-eap-quickstarts,jonje/jboss-eap-quickstarts,arabitm86/quickstart,dashorst/quickstart,pskopek/jboss-eap-quickstarts,RonnieKing/quickstart,pskopek/jboss-eap-quickstarts,toncarvalho/quickstart,jbosstools/jboss-wfk-quickstarts,toncarvalho/quickstart,JaredBurck/jboss-eap-quickstarts,girirajsharma/quickstart,josefkarasek/jboss-eap-quickstarts,rafabene/jboss-eap-quickstarts,henriqueroco/quickstart,trepel/jboss-eap-quickstarts,monospacesoftware/quickstart,praveen20187/jboss-eap-quickstarts,rgupta1234/jboss-eap-quickstarts,magro/jboss-as-quickstart,rhatlapa/jboss-eap-quickstarts,drojokef/jboss-eap-quickstarts,rhusar/jboss-as-quickstart,manko08/jboss-developer-jboss-eap-quickstarts,jamezp/quickstart,Maarc/jboss-eap-quickstarts,mwaleria/jboss-eap-quickstarts,hkssitcloud/jboss-eap-quickstarts,hkssitcloud/jboss-eap-quickstarts,marcosnasp/quickstart-1,girirajsharma/quickstart,pgier/jboss-eap-quickstarts,ensouza93/quickstart,ppolcz/quickstart,GiuliYamakawa/quickstart,trepel/jboss-eap-quickstarts,magro/jboss-as-quickstart,wfink/quickstart,toncarvalho/quickstart,PavelMikhailouski/jboss-eap-quickstarts,LuizFiuzza/wildfly-quickstart,rhusar/jboss-as-quickstart,hkssitcloud/jboss-eap-quickstarts,manko08/jboss-developer-jboss-eap-quickstarts,rodm/quickstart,monospacesoftware/quickstart,rafabene/jboss-eap-quickstarts,lindstae/MyTestRepo,GiuliYamakawa/quickstart,rgupta1234/jboss-eap-quickstarts,jonje/jboss-eap-quickstarts,fellipecm/jboss-eap-quickstarts,fbricon/jboss-eap-quickstarts,RonnieKing/quickstart,Ajeetkg/quickstart,YaelMendes/jboss-eap-quickstarts,LuizFiuzza/wildfly-quickstart,muhd7rosli/quickstart,rsearls/jboss-eap-quickstarts,hkssitcloud/jboss-eap-quickstarts,codificat/jboss-eap-quickstarts,praveen20187/jboss-eap-quickstarts,GiuliYamakawa/quickstart,grenne/quickstart,ejlp12/quickstart,grenne/quickstart,GiuliYamakawa/quickstart,LuizFiuzza/wildfly-quickstart,rodm/quickstart,rh-asharma/jboss-eap-quickstarts,fbricon/jboss-eap-quickstarts,lindstae/MyTestRepo,drojokef/jboss-eap-quickstarts,treblereel/jboss-eap-quickstarts,rhusar/jboss-as-quickstart,ozekisan/jboss-eap-quickstarts,ejlp12/quickstart,jonje/jboss-eap-quickstarts,baranowb/jboss-eap-quickstarts,rsearls/jboss-eap-quickstarts,codificat/jboss-eap-quickstarts,Maarc/jboss-eap-quickstarts,ejlp12/quickstart,ppolcz/quickstart,jamezp/quickstart,tobias/jboss-eap-quickstarts,lindstae/MyTestRepo,treblereel/jboss-eap-quickstarts,LuizFiuzza/wildfly-quickstart,bdecoste/jboss-eap-quickstarts,rhusar/jboss-as-quickstart,josefkarasek/jboss-eap-quickstarts,treblereel/jboss-eap-quickstarts,dashorst/quickstart,henriqueroco/quickstart,mmusgrov/quickstart,rsearls/jboss-eap-quickstarts,josefkarasek/jboss-eap-quickstarts,IngServioPantoja/jboss-eap-quickstarts,sherlockgomes/quickstart,filippocala/openshifttestdemo,eduarddedu/quickstart,JaredBurck/jboss-eap-quickstarts,LightGuard/quickstart,rcernich/jboss-eap-quickstarts,jboss-developer/jboss-wfk-quickstarts,IngServioPantoja/jboss-eap-quickstarts,JaredBurck/jboss-eap-quickstarts,DLT-Solutions-JBoss/jboss-eap-quickstarts,grenne/quickstart,aivarmagi/quickstart,baranowb/jboss-eap-quickstarts,manko08/jboss-developer-jboss-eap-quickstarts,monospacesoftware/quickstart,sobiron/jboss-developer-jboss-eap-quickstarts,praveen20187/jboss-eap-quickstarts,magro/jboss-as-quickstart,wfink/jboss-as-quickstart,sherlockgomes/quickstart,YaelMendes/jboss-eap-quickstarts,mwaleria/jboss-eap-quickstarts,dashorst/quickstart,rcernich/jboss-eap-quickstarts,praveen20187/jboss-eap-quickstarts,henriqueroco/quickstart,amalalex/quickstart,amalalex/quickstart,amalalex/quickstart,felipebaccin/quickstart,rfhl93/quickstart,marcosnasp/quickstart-1,marcosnasp/quickstart-1,hslee9397/jboss-eap-quickstarts,fabiomartinsbrrj/jboss-eap-quickstarts,ivanthelad/jboss-eap-quickstarts,dosoudil/jboss-eap-quickstarts,jboss-developer/jboss-wfk-quickstarts,1n/jboss-eap-quickstarts,mwaleria/jboss-eap-quickstarts,fabiomartinsbrrj/jboss-eap-quickstarts,rafabene/jboss-eap-quickstarts,mojavelinux/jboss-as-quickstart,girirajsharma/quickstart,1n/jboss-eap-quickstarts,rafabene/jboss-eap-quickstarts,eduarddedu/quickstart,hguerrero/jboss-eap-quickstarts,LightGuard/quickstart,jgisler/quickstart,rh-asharma/jboss-eap-quickstarts,jboss-developer/jboss-wfk-quickstarts,dosoudil/jboss-eap-quickstarts,henriqueroco/quickstart,PavelMikhailouski/jboss-eap-quickstarts,Maarc/jboss-eap-quickstarts,magro/jboss-as-quickstart,toncarvalho/quickstart,Ajeetkg/quickstart,jamezp/quickstart,YaelMendes/jboss-eap-quickstarts,henriqueroco/quickstart,treblereel/jboss-eap-quickstarts,IngServioPantoja/jboss-eap-quickstarts,hguerrero/jboss-eap-quickstarts,rbattenfeld/quickstart,jboss-developer/jboss-wfk-quickstarts,hguerrero/jboss-eap-quickstarts,rhatlapa/jboss-eap-quickstarts,praveen20187/jboss-eap-quickstarts,lindstae/MyTestRepo,mojavelinux/jboss-as-quickstart,jboss-developer/jboss-wfk-quickstarts,jboss-eap/quickstart,hslee9397/jboss-eap-quickstarts,sherlockgomes/quickstart,wfink/jboss-as-quickstart,magro/jboss-as-quickstart,ppolcz/quickstart,vitorsilvalima/jboss-eap-quickstarts,fbricon/jboss-eap-quickstarts,hslee9397/jboss-eap-quickstarts,aivarmagi/quickstart,amalalex/quickstart,jgisler/quickstart,rcernich/jboss-eap-quickstarts,ejlp12/quickstart,sobiron/jboss-developer-jboss-eap-quickstarts,mojavelinux/jboss-as-quickstart,JaredBurck/jboss-eap-quickstarts,trepel/jboss-eap-quickstarts,jboss-eap/quickstart,jgisler/jboss-eap-quickstarts,mmusgrov/quickstart,bostrt/jboss-eap-quickstarts,fabiomartinsbrrj/jboss-eap-quickstarts,aivarmagi/quickstart,GiuliYamakawa/quickstart,robstryker/quickstart,jboss-developer/jboss-wfk-quickstarts,Ajeetkg/quickstart,wfink/quickstart,luksa/jboss-eap-quickstarts,jbosstools/jboss-wfk-quickstarts,rhatlapa/jboss-eap-quickstarts,ivanthelad/jboss-eap-quickstarts,robstryker/quickstart,wfink/quickstart,josefkarasek/jboss-eap-quickstarts,khajavi/jboss-eap-quickstarts,rafabene/jboss-eap-quickstarts,ozekisan/jboss-eap-quickstarts,DLT-Solutions-JBoss/jboss-eap-quickstarts,luksa/jboss-eap-quickstarts,muhd7rosli/quickstart,jboss-eap/quickstart,LightGuard/quickstart,jbosstools/jboss-wfk-quickstarts,felipebaccin/quickstart,mojavelinux/jboss-as-quickstart,jgisler/quickstart,khajavi/jboss-eap-quickstarts,jonje/jboss-eap-quickstarts,tobias/jboss-eap-quickstarts,rcernich/jboss-eap-quickstarts,robstryker/quickstart,bdecoste/jboss-eap-quickstarts,PavelMikhailouski/jboss-eap-quickstarts,YaelMendes/jboss-eap-quickstarts,rgupta1234/jboss-eap-quickstarts,mmusgrov/quickstart,rh-asharma/jboss-eap-quickstarts,ensouza93/quickstart,mmusgrov/quickstart,pskopek/jboss-eap-quickstarts,arabitm86/quickstart,mwaleria/jboss-eap-quickstarts,LightGuard/quickstart,PavelMikhailouski/jboss-eap-quickstarts,Maarc/jboss-eap-quickstarts,aivarmagi/quickstart,RonnieKing/quickstart,rsearls/jboss-eap-quickstarts,ensouza93/quickstart,bdecoste/jboss-eap-quickstarts,vitorsilvalima/jboss-eap-quickstarts,drojokef/jboss-eap-quickstarts,DLT-Solutions-JBoss/jboss-eap-quickstarts,fellipecm/jboss-eap-quickstarts,arabitm86/quickstart,tobias/jboss-eap-quickstarts,jonje/jboss-eap-quickstarts,fellipecm/jboss-eap-quickstarts,LuizFiuzza/wildfly-quickstart,rcernich/jboss-eap-quickstarts,rgupta1234/jboss-eap-quickstarts,jgisler/quickstart,RonnieKing/quickstart,IngServioPantoja/jboss-eap-quickstarts,rhatlapa/jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,bostrt/jboss-eap-quickstarts,girirajsharma/quickstart,baranowb/jboss-eap-quickstarts,marcosnasp/quickstart-1,Ajeetkg/quickstart,ozekisan/jboss-eap-quickstarts,drojokef/jboss-eap-quickstarts,felipebaccin/quickstart,sobiron/jboss-developer-jboss-eap-quickstarts,manko08/jboss-developer-jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,ppolcz/quickstart,bostrt/jboss-eap-quickstarts,dashorst/quickstart,pgier/jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,khajavi/jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,jbosstools/jboss-wfk-quickstarts,rodm/quickstart,eduarddedu/quickstart,rbattenfeld/quickstart,ivanthelad/jboss-eap-quickstarts,DLT-Solutions-JBoss/jboss-eap-quickstarts,IngServioPantoja/jboss-eap-quickstarts,ensouza93/quickstart,bostrt/jboss-eap-quickstarts,khajavi/jboss-eap-quickstarts,fabiomartinsbrrj/jboss-eap-quickstarts,fbricon/jboss-eap-quickstarts,dosoudil/jboss-eap-quickstarts,fellipecm/jboss-eap-quickstarts,rfhl93/quickstart,tobias/jboss-eap-quickstarts,Maarc/jboss-eap-quickstarts,ivanthelad/jboss-eap-quickstarts,robstryker/quickstart,fellipecm/jboss-eap-quickstarts,codificat/jboss-eap-quickstarts,bostrt/jboss-eap-quickstarts,girirajsharma/quickstart,luksa/jboss-eap-quickstarts,felipebaccin/quickstart,magro/jboss-as-quickstart,jboss-developer/jboss-wfk-quickstarts,rbattenfeld/quickstart,josefkarasek/jboss-eap-quickstarts,PavelMikhailouski/jboss-eap-quickstarts,rsearls/jboss-eap-quickstarts,arabitm86/quickstart,fbricon/jboss-eap-quickstarts,lindstae/MyTestRepo,lindstae/MyTestRepo,rafabene/jboss-eap-quickstarts,marcosnasp/quickstart-1,rgupta1234/jboss-eap-quickstarts,luiz158/jboss-wfk-quickstarts,aivarmagi/quickstart,Ajeetkg/quickstart,monospacesoftware/quickstart,hslee9397/jboss-eap-quickstarts,mwaleria/jboss-eap-quickstarts,rhusar/jboss-as-quickstart,LightGuard/quickstart,filippocala/openshifttestdemo,codificat/jboss-eap-quickstarts
markdown
## Code Before: JBoss AS Quickstarts ==================== Quickstarts (or examples, or samples) for JBoss AS. There are a number of rules for quickstarts: * Each quickstart should have a unique name, this enables a user to quickly identify each quickstart * A quickstart should have a simple build that the user can quickly understand. If using maven it should: 1. Not inherit from another POM 2. Import the various BOMs from AS7 APIs to get version numbers 3. Use the JBoss AS Maven Plugin to deploy the example * The quickstart should be importable into JBoss Tools and deployable there * The quickstart should be explained in detail in the associated user guide, including how to deploy * If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md` and `pom.xml` (the 'modules' section). You can find the documentation at <https://docs.jboss.org/author/display/AS7/Documentation>. If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md`. The 'dist' folder contains Maven scripts to build a zip of the quickstarts. The quickstart code is licensed under the Apache License, Version 2.0: <http://www.apache.org/licenses/LICENSE-2.0.html> ## Instruction: Add note about code formatting. ## Code After: JBoss AS Quickstarts ==================== Quickstarts (or examples, or samples) for JBoss AS. There are a number of rules for quickstarts: * Each quickstart should have a unique name, this enables a user to quickly identify each quickstart * A quickstart should have a simple build that the user can quickly understand. If using maven it should: 1. Not inherit from another POM 2. Import the various BOMs from AS7 APIs to get version numbers 3. Use the JBoss AS Maven Plugin to deploy the example * The quickstart should be importable into JBoss Tools and deployable there * The quickstart should be explained in detail in the associated user guide, including how to deploy * If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md` and `pom.xml` (the 'modules' section). * The quickstart should be formatted using the JBoss AS profiles found at <https://github.com/jbossas/jboss-as/tree/master/ide-configs> You can find the documentation at <https://docs.jboss.org/author/display/AS7/Documentation>. If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md`. The 'dist' folder contains Maven scripts to build a zip of the quickstarts. The quickstart code is licensed under the Apache License, Version 2.0: <http://www.apache.org/licenses/LICENSE-2.0.html>
JBoss AS Quickstarts ==================== Quickstarts (or examples, or samples) for JBoss AS. There are a number of rules for quickstarts: * Each quickstart should have a unique name, this enables a user to quickly identify each quickstart * A quickstart should have a simple build that the user can quickly understand. If using maven it should: 1. Not inherit from another POM 2. Import the various BOMs from AS7 APIs to get version numbers 3. Use the JBoss AS Maven Plugin to deploy the example * The quickstart should be importable into JBoss Tools and deployable there * The quickstart should be explained in detail in the associated user guide, including how to deploy * If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md` and `pom.xml` (the 'modules' section). + * The quickstart should be formatted using the JBoss AS profiles found at <https://github.com/jbossas/jboss-as/tree/master/ide-configs> You can find the documentation at <https://docs.jboss.org/author/display/AS7/Documentation>. If you add a quickstart, don't forget to update `dist/src/main/assembly/README.md`. The 'dist' folder contains Maven scripts to build a zip of the quickstarts. The quickstart code is licensed under the Apache License, Version 2.0: <http://www.apache.org/licenses/LICENSE-2.0.html>
1
0.045455
1
0
fa4bd2b2a8a712f66ec9894ca4438678ee337f94
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.11) project(SGEngine) # Start with modern standard: C++14, or C++1y if using APPLE # TODO Better check for C++14 compiler support, and fallback/failure. if (APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++1y") endif() # Automatically download/build External Dependencies execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ./deps.sh ) # Library Targets add_subdirectory(External/googletest/googletest) # Build Targets add_subdirectory(SGEngine/Sources) add_subdirectory(SGEngine/Test) # Example Programs add_subdirectory(Examples/HelloWorld)
cmake_minimum_required(VERSION 2.8.11) project(SGEngine) # Start with modern standard: C++14, or C++1y include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14) CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y) if(COMPILER_SUPPORTS_CXX14) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") elseif(COMPILER_SUPPORTS_CXX1Y) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") else() message(FATAL_ERROR "${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") endif() # Automatically download/build External Dependencies execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ./deps.sh ) # Library Targets add_subdirectory(External/googletest/googletest) # Build Targets add_subdirectory(SGEngine/Sources) add_subdirectory(SGEngine/Test) # Example Programs add_subdirectory(Examples/HelloWorld)
Add better C++14 check and fail on no support
Add better C++14 check and fail on no support
Text
bsd-3-clause
stuhacking/SGEngine-Cpp,stuhacking/SGEngine-Cpp,stuhacking/SGEngine-Cpp
text
## Code Before: cmake_minimum_required(VERSION 2.8.11) project(SGEngine) # Start with modern standard: C++14, or C++1y if using APPLE # TODO Better check for C++14 compiler support, and fallback/failure. if (APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++1y") endif() # Automatically download/build External Dependencies execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ./deps.sh ) # Library Targets add_subdirectory(External/googletest/googletest) # Build Targets add_subdirectory(SGEngine/Sources) add_subdirectory(SGEngine/Test) # Example Programs add_subdirectory(Examples/HelloWorld) ## Instruction: Add better C++14 check and fail on no support ## Code After: cmake_minimum_required(VERSION 2.8.11) project(SGEngine) # Start with modern standard: C++14, or C++1y include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14) CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y) if(COMPILER_SUPPORTS_CXX14) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") elseif(COMPILER_SUPPORTS_CXX1Y) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") else() message(FATAL_ERROR "${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") endif() # Automatically download/build External Dependencies execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ./deps.sh ) # Library Targets add_subdirectory(External/googletest/googletest) # Build Targets add_subdirectory(SGEngine/Sources) add_subdirectory(SGEngine/Test) # Example Programs add_subdirectory(Examples/HelloWorld)
cmake_minimum_required(VERSION 2.8.11) project(SGEngine) - # Start with modern standard: C++14, or C++1y if using APPLE ? --------------- + # Start with modern standard: C++14, or C++1y - # TODO Better check for C++14 compiler support, and fallback/failure. - if (APPLE) + include(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14) + CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y) + if(COMPILER_SUPPORTS_CXX14) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14") ? - + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + elseif(COMPILER_SUPPORTS_CXX1Y) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++1y") + message(FATAL_ERROR "${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") endif() # Automatically download/build External Dependencies execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ./deps.sh ) # Library Targets add_subdirectory(External/googletest/googletest) # Build Targets add_subdirectory(SGEngine/Sources) add_subdirectory(SGEngine/Test) # Example Programs add_subdirectory(Examples/HelloWorld)
14
0.538462
9
5
7dd228d7eaad6b1f37ff3c4d954aebe0ffa99170
tests/test_targets/test_targets.py
tests/test_targets/test_targets.py
import os from unittest import TestCase from project_generator_definitions.definitions import ProGenTargets class TestAllTargets(TestCase): """test all targets""" def setUp(self): self.progen_target = ProGenTargets() self.targets_list = self.progen_target.get_targets() def test_targets_validity(self): for target in self.targets_list: record = self.progen_target.get_target_record(target) assert record['target']['name'][0] assert record['target']['mcu'][0] def test_targets_mcu_validity(self): for target in self.targets_list: mcu = self.progen_target.get_mcu_record(target) assert mcu['mcu'] assert mcu['mcu']['name'] assert mcu['mcu']['core']
from unittest import TestCase from project_generator_definitions.definitions import ProGenTargets class TestAllTargets(TestCase): """test all targets""" def setUp(self): self.progen_target = ProGenTargets() self.targets_list = self.progen_target.get_targets() def test_targets_validity(self): # Cehck for required info for targets for target in self.targets_list: record = self.progen_target.get_target_record(target) assert record['target']['name'][0] assert record['target']['mcu'][0] def test_targets_mcu_validity(self): # Check for required info in mcu for target in self.targets_list: mcu = self.progen_target.get_mcu_record(target) assert mcu['mcu'][0] assert mcu['mcu']['name'][0] assert mcu['mcu']['core'][0]
Test - targets test fix mcu validity indexes
Test - targets test fix mcu validity indexes
Python
apache-2.0
project-generator/project_generator_definitions,0xc0170/project_generator_definitions,ohagendorf/project_generator_definitions
python
## Code Before: import os from unittest import TestCase from project_generator_definitions.definitions import ProGenTargets class TestAllTargets(TestCase): """test all targets""" def setUp(self): self.progen_target = ProGenTargets() self.targets_list = self.progen_target.get_targets() def test_targets_validity(self): for target in self.targets_list: record = self.progen_target.get_target_record(target) assert record['target']['name'][0] assert record['target']['mcu'][0] def test_targets_mcu_validity(self): for target in self.targets_list: mcu = self.progen_target.get_mcu_record(target) assert mcu['mcu'] assert mcu['mcu']['name'] assert mcu['mcu']['core'] ## Instruction: Test - targets test fix mcu validity indexes ## Code After: from unittest import TestCase from project_generator_definitions.definitions import ProGenTargets class TestAllTargets(TestCase): """test all targets""" def setUp(self): self.progen_target = ProGenTargets() self.targets_list = self.progen_target.get_targets() def test_targets_validity(self): # Cehck for required info for targets for target in self.targets_list: record = self.progen_target.get_target_record(target) assert record['target']['name'][0] assert record['target']['mcu'][0] def test_targets_mcu_validity(self): # Check for required info in mcu for target in self.targets_list: mcu = self.progen_target.get_mcu_record(target) assert mcu['mcu'][0] assert mcu['mcu']['name'][0] assert mcu['mcu']['core'][0]
- import os from unittest import TestCase from project_generator_definitions.definitions import ProGenTargets class TestAllTargets(TestCase): """test all targets""" def setUp(self): self.progen_target = ProGenTargets() self.targets_list = self.progen_target.get_targets() def test_targets_validity(self): + # Cehck for required info for targets for target in self.targets_list: record = self.progen_target.get_target_record(target) assert record['target']['name'][0] assert record['target']['mcu'][0] def test_targets_mcu_validity(self): + # Check for required info in mcu for target in self.targets_list: mcu = self.progen_target.get_mcu_record(target) - assert mcu['mcu'] + assert mcu['mcu'][0] ? +++ - assert mcu['mcu']['name'] + assert mcu['mcu']['name'][0] ? +++ - assert mcu['mcu']['core'] + assert mcu['mcu']['core'][0] ? +++
9
0.346154
5
4
e1c984d2a7d445486144d3aeeba200ffb8d9f06e
timetracker/templates/base.html
timetracker/templates/base.html
<!DOCTYPE html> <html> <head> <title>{% block title %}{% endblock %}</title> <link href="{{ STATIC_URL }}stylesheet.css" type="text/css" rel="stylesheet" /> <link type="text/css" href="{{ STATIC_URL }}jquery/css/ui-darkness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /> {% block header %} {% endblock header %} {% block menubar %} <div id="menu-bar"> <a id="logout" href="/logout/"> <img class="menu-button" src="{{ STATIC_URL }}images/base/logout.gif" /> </a> </div> {% endblock menubar %} {% block content %} {% endblock %} <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/csrf_protection.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/json2.js"></script> {% block additional_javascript %} {% endblock additional_javascript %}
<!DOCTYPE html> <html> <head> <title>{% block title %}{% endblock %}</title> <link href="{{ STATIC_URL }}stylesheet.css" type="text/css" rel="stylesheet" /> <link type="text/css" href="{{ STATIC_URL }}jquery/css/ui-darkness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /> {% block header %} {% endblock header %} {% block menubar %} <div id="menu-bar"> <a id="logout" href="/logout/"> <img class="menu-button" src="{{ STATIC_URL }}images/base/logout.gif" /> </a> </div> {% endblock menubar %} {% block content %} {% endblock %} <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/csrf_protection.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/json2.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}js/validation.js"></script> {% block additional_javascript %} {% endblock additional_javascript %}
Put the validation available on all pages
Put the validation available on all pages
HTML
bsd-3-clause
AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker
html
## Code Before: <!DOCTYPE html> <html> <head> <title>{% block title %}{% endblock %}</title> <link href="{{ STATIC_URL }}stylesheet.css" type="text/css" rel="stylesheet" /> <link type="text/css" href="{{ STATIC_URL }}jquery/css/ui-darkness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /> {% block header %} {% endblock header %} {% block menubar %} <div id="menu-bar"> <a id="logout" href="/logout/"> <img class="menu-button" src="{{ STATIC_URL }}images/base/logout.gif" /> </a> </div> {% endblock menubar %} {% block content %} {% endblock %} <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/csrf_protection.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/json2.js"></script> {% block additional_javascript %} {% endblock additional_javascript %} ## Instruction: Put the validation available on all pages ## Code After: <!DOCTYPE html> <html> <head> <title>{% block title %}{% endblock %}</title> <link href="{{ STATIC_URL }}stylesheet.css" type="text/css" rel="stylesheet" /> <link type="text/css" href="{{ STATIC_URL }}jquery/css/ui-darkness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /> {% block header %} {% endblock header %} {% block menubar %} <div id="menu-bar"> <a id="logout" href="/logout/"> <img class="menu-button" src="{{ STATIC_URL }}images/base/logout.gif" /> </a> </div> {% endblock menubar %} {% block content %} {% endblock %} <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/csrf_protection.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/json2.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}js/validation.js"></script> {% block additional_javascript %} {% endblock additional_javascript %}
<!DOCTYPE html> <html> <head> <title>{% block title %}{% endblock %}</title> <link href="{{ STATIC_URL }}stylesheet.css" type="text/css" rel="stylesheet" /> <link type="text/css" href="{{ STATIC_URL }}jquery/css/ui-darkness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /> {% block header %} {% endblock header %} {% block menubar %} <div id="menu-bar"> <a id="logout" href="/logout/"> <img class="menu-button" src="{{ STATIC_URL }}images/base/logout.gif" /> </a> </div> {% endblock menubar %} {% block content %} {% endblock %} <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/js/csrf_protection.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}jquery/json2.js"></script> + <script type="text/javascript" src="{{ STATIC_URL }}js/validation.js"></script> {% block additional_javascript %} {% endblock additional_javascript %}
1
0.041667
1
0
00a5e2ede92aa1ac0fe247d04cee9e2010b44876
README.md
README.md
Welcome to the techy heart of **International summer festival in Palekh!** Check the website by clicking this huge image ⤵️ [![Apple Feast](http://fest.artpalekh.ru/tile-wide.png)](http://fest.artpalekh.ru/) And you will find out detailed information about event, participants and schedule. ## Powered by - 🔺 `AngularJS` - ✈️ `Gulp` - ❗️ `JSHint` ⏰ August 2015
Welcome to the techy heart of **International summer festival in Palekh!** ## What's it about? The festival desigined for international artists 🎨 and musicians 🎸. These guys spend wabout two weeks in the City of Palekh and in a rural area. During three final days artists showcase 🎂 their beautiful paints they created past two weeks. There are several loud concerts played by 🎺 local bands as well. It's awesome, exiting and marvelous to see it! ⚡️ Come on and join us! ✨ ## Here we go! Check the website by clicking this huge image ⤵️ [![Apple Feast](http://fest.artpalekh.ru/tile-wide.png)](http://fest.artpalekh.ru/) And you will find out detailed information about event, participants and schedule. ## Powered by - 🔺 `AngularJS` - ✈️ `Gulp` - ❗️ `JSHint` --- ⏰ Igor Golopolosob & Dmitry Romashov. August 2015 +
Improve readme with more human information
Improve readme with more human information
Markdown
mit
usehotkey/palekhfest,usehotkey/palekhfest
markdown
## Code Before: Welcome to the techy heart of **International summer festival in Palekh!** Check the website by clicking this huge image ⤵️ [![Apple Feast](http://fest.artpalekh.ru/tile-wide.png)](http://fest.artpalekh.ru/) And you will find out detailed information about event, participants and schedule. ## Powered by - 🔺 `AngularJS` - ✈️ `Gulp` - ❗️ `JSHint` ⏰ August 2015 ## Instruction: Improve readme with more human information ## Code After: Welcome to the techy heart of **International summer festival in Palekh!** ## What's it about? The festival desigined for international artists 🎨 and musicians 🎸. These guys spend wabout two weeks in the City of Palekh and in a rural area. During three final days artists showcase 🎂 their beautiful paints they created past two weeks. There are several loud concerts played by 🎺 local bands as well. It's awesome, exiting and marvelous to see it! ⚡️ Come on and join us! ✨ ## Here we go! Check the website by clicking this huge image ⤵️ [![Apple Feast](http://fest.artpalekh.ru/tile-wide.png)](http://fest.artpalekh.ru/) And you will find out detailed information about event, participants and schedule. ## Powered by - 🔺 `AngularJS` - ✈️ `Gulp` - ❗️ `JSHint` --- ⏰ Igor Golopolosob & Dmitry Romashov. August 2015 +
Welcome to the techy heart of **International summer festival in Palekh!** + + ## What's it about? + + The festival desigined for international artists 🎨 and musicians 🎸. + These guys spend wabout two weeks in the City of Palekh and in a rural area. + During three final days artists showcase 🎂 their beautiful paints they created past two weeks. + There are several loud concerts played by 🎺 local bands as well. It's awesome, exiting and marvelous to see it! ⚡️ + + Come on and join us! ✨ + + ## Here we go! Check the website by clicking this huge image ⤵️ [![Apple Feast](http://fest.artpalekh.ru/tile-wide.png)](http://fest.artpalekh.ru/) And you will find out detailed information about event, participants and schedule. ## Powered by - 🔺 `AngularJS` - ✈️ `Gulp` - ❗️ `JSHint` - ⏰ August 2015 + --- + + ⏰ Igor Golopolosob & Dmitry Romashov. August 2015 +
15
1
14
1
32730d4b0584982096d880aec96eee0c4e616445
assets/scss/mixins/_screenreader.scss
assets/scss/mixins/_screenreader.scss
@mixin sr-only { border: 0; clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } @mixin sr-only-focusable { &:active, &:focus { clip: auto; clip-path: none; height: auto; overflow: visible; position: static; white-space: normal; width: auto; } }
@mixin sr-only { border: 0; clip: rect(0, 0, 0, 0); height: 1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } @mixin sr-only-focusable { &:active, &:focus { clip: auto; height: auto; overflow: visible; position: static; white-space: normal; width: auto; } }
Update `.sr-only` mixin and utility
Update `.sr-only` mixin and utility
SCSS
mit
Daemonite/material,Daemonite/material,Daemonite/material
scss
## Code Before: @mixin sr-only { border: 0; clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } @mixin sr-only-focusable { &:active, &:focus { clip: auto; clip-path: none; height: auto; overflow: visible; position: static; white-space: normal; width: auto; } } ## Instruction: Update `.sr-only` mixin and utility ## Code After: @mixin sr-only { border: 0; clip: rect(0, 0, 0, 0); height: 1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } @mixin sr-only-focusable { &:active, &:focus { clip: auto; height: auto; overflow: visible; position: static; white-space: normal; width: auto; } }
@mixin sr-only { border: 0; clip: rect(0, 0, 0, 0); - clip-path: inset(50%); height: 1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } @mixin sr-only-focusable { &:active, &:focus { clip: auto; - clip-path: none; height: auto; overflow: visible; position: static; white-space: normal; width: auto; } }
2
0.083333
0
2
6765cce6b09dbf8957cc731046651388ef1b861e
gremlin-groovy/src/main/resources/com/tinkerpop/gremlin/groovy/console/commands/UseCommand.properties
gremlin-groovy/src/main/resources/com/tinkerpop/gremlin/groovy/console/commands/UseCommand.properties
command.description=Import a Maven library into Gremlin command.usage=group module version command.help=Import a Maven library into Gremlin
command.description=Import a Maven library into Gremlin command.usage=[now|install] group module version command.help=Import a Maven library into Gremlin. If using "now" then the imported libs will only be good for the session. To have them appear on each run of the Console then use "install". In some cases, a dependency can only be included properly by way of "install", where the jars can be installed directly to the classpath.
Update help info for :use
Update help info for :use
INI
apache-2.0
BrynCooke/incubator-tinkerpop,pluradj/incubator-tinkerpop,RedSeal-co/incubator-tinkerpop,mpollmeier/tinkerpop3,gdelafosse/incubator-tinkerpop,robertdale/tinkerpop,apache/incubator-tinkerpop,apache/incubator-tinkerpop,apache/tinkerpop,jorgebay/tinkerpop,vtslab/incubator-tinkerpop,Lab41/tinkerpop3,gdelafosse/incubator-tinkerpop,apache/tinkerpop,artem-aliev/tinkerpop,edgarRd/incubator-tinkerpop,RussellSpitzer/incubator-tinkerpop,pluradj/incubator-tinkerpop,robertdale/tinkerpop,apache/tinkerpop,krlohnes/tinkerpop,dalaro/incubator-tinkerpop,n-tran/incubator-tinkerpop,artem-aliev/tinkerpop,apache/tinkerpop,mike-tr-adamson/incubator-tinkerpop,BrynCooke/incubator-tinkerpop,RussellSpitzer/incubator-tinkerpop,apache/tinkerpop,newkek/incubator-tinkerpop,RedSeal-co/incubator-tinkerpop,apache/incubator-tinkerpop,samiunn/incubator-tinkerpop,vtslab/incubator-tinkerpop,BrynCooke/incubator-tinkerpop,RedSeal-co/incubator-tinkerpop,robertdale/tinkerpop,dalaro/incubator-tinkerpop,gdelafosse/incubator-tinkerpop,dalaro/incubator-tinkerpop,krlohnes/tinkerpop,mike-tr-adamson/incubator-tinkerpop,krlohnes/tinkerpop,PommeVerte/incubator-tinkerpop,jorgebay/tinkerpop,Lab41/tinkerpop3,pluradj/incubator-tinkerpop,edgarRd/incubator-tinkerpop,samiunn/incubator-tinkerpop,RussellSpitzer/incubator-tinkerpop,robertdale/tinkerpop,apache/tinkerpop,PommeVerte/incubator-tinkerpop,apache/tinkerpop,mike-tr-adamson/incubator-tinkerpop,velo/incubator-tinkerpop,PommeVerte/incubator-tinkerpop,artem-aliev/tinkerpop,newkek/incubator-tinkerpop,vtslab/incubator-tinkerpop,artem-aliev/tinkerpop,edgarRd/incubator-tinkerpop,krlohnes/tinkerpop,mpollmeier/tinkerpop3,jorgebay/tinkerpop,rmagen/incubator-tinkerpop,n-tran/incubator-tinkerpop,velo/incubator-tinkerpop,newkek/incubator-tinkerpop,rmagen/incubator-tinkerpop,jorgebay/tinkerpop,velo/incubator-tinkerpop,robertdale/tinkerpop,rmagen/incubator-tinkerpop,krlohnes/tinkerpop,n-tran/incubator-tinkerpop,samiunn/incubator-tinkerpop,artem-aliev/tinkerpop
ini
## Code Before: command.description=Import a Maven library into Gremlin command.usage=group module version command.help=Import a Maven library into Gremlin ## Instruction: Update help info for :use ## Code After: command.description=Import a Maven library into Gremlin command.usage=[now|install] group module version command.help=Import a Maven library into Gremlin. If using "now" then the imported libs will only be good for the session. To have them appear on each run of the Console then use "install". In some cases, a dependency can only be included properly by way of "install", where the jars can be installed directly to the classpath.
command.description=Import a Maven library into Gremlin - command.usage=group module version + command.usage=[now|install] group module version ? ++++++++++++++ - command.help=Import a Maven library into Gremlin + command.help=Import a Maven library into Gremlin. If using "now" then the imported libs will only be good for the session. To have them appear on each run of the Console then use "install". In some cases, a dependency can only be included properly by way of "install", where the jars can be installed directly to the classpath.
4
1.333333
2
2
54c5779fcb794619675398c72767fca9d5e801f1
CONTRIBUTORS.md
CONTRIBUTORS.md
The following people have contributed to Cement, either by way of source code, documentation, or testing: - BJ Dierkes (derks) - Creator, Primary Maintainer - Kyle Rockman (rocktavious) - Tomasz Czyż (spinus) - Ildar Akhmetgaleev (akhilman) - Nicolas Brisac (zacbri) - Subhash Bhushan (subhashb) - Sam Likins (samlikins) - Dakota Blair (dakotablair)
The following people have contributed to Cement, either by way of source code, documentation, or testing: - BJ Dierkes (derks) - Creator, Primary Maintainer - Dan Liberatori (garroadran) - Kyle Rockman (rocktavious) - Tomasz Czyż (spinus) - Ildar Akhmetgaleev (akhilman) - Nicolas Brisac (zacbri) - Subhash Bhushan (subhashb) - Sam Likins (samlikins) - Dakota Blair (dakotablair)
Add Dan Liberatori to Contributors
Add Dan Liberatori to Contributors
Markdown
bsd-3-clause
datafolklabs/cement,datafolklabs/cement,datafolklabs/cement
markdown
## Code Before: The following people have contributed to Cement, either by way of source code, documentation, or testing: - BJ Dierkes (derks) - Creator, Primary Maintainer - Kyle Rockman (rocktavious) - Tomasz Czyż (spinus) - Ildar Akhmetgaleev (akhilman) - Nicolas Brisac (zacbri) - Subhash Bhushan (subhashb) - Sam Likins (samlikins) - Dakota Blair (dakotablair) ## Instruction: Add Dan Liberatori to Contributors ## Code After: The following people have contributed to Cement, either by way of source code, documentation, or testing: - BJ Dierkes (derks) - Creator, Primary Maintainer - Dan Liberatori (garroadran) - Kyle Rockman (rocktavious) - Tomasz Czyż (spinus) - Ildar Akhmetgaleev (akhilman) - Nicolas Brisac (zacbri) - Subhash Bhushan (subhashb) - Sam Likins (samlikins) - Dakota Blair (dakotablair)
The following people have contributed to Cement, either by way of source code, documentation, or testing: - BJ Dierkes (derks) - Creator, Primary Maintainer + - Dan Liberatori (garroadran) - Kyle Rockman (rocktavious) - Tomasz Czyż (spinus) - Ildar Akhmetgaleev (akhilman) - Nicolas Brisac (zacbri) - Subhash Bhushan (subhashb) - Sam Likins (samlikins) - Dakota Blair (dakotablair)
1
0.083333
1
0
5b6f3ac716e37b9d03bff3da826dca24826b24eb
jasmine/spec/inverted-index-test.js
jasmine/spec/inverted-index-test.js
describe ("Read book data",function(){ it("assert JSON file is not empty",function(){ var isNotEmpty = function IsJsonString(filePath) { try { JSON.parse(filePath); } catch (e) { return false; } return true; }; expect(isNotEmpty).toBe(true).because('The JSON file should be a valid JSON array'); }); }); describe ("Populate Index",function(){ beforeEach(function() { var myIndexPopulate=JSON.parse(filePath); var myIndexGet=getIndex(myIndexPopulate); }); it("index should be created after reading",function(){ expect(myIndexGet).not.toBe(null).because('Index should be created after reading the file'); }); it("index maps string keys to correct obj", function(){ var myFunction= function() { var testArray=['a','1']; var a=createIndex(testArray); var b=getIndex(a); return b; } expect(myFunction).toBe(['a']).because('Index should return corresponding key'); }); }); describe ("Search Index", function(){ beforeEach(function(){ var testArray=["a","b","c"]; var mySearchIndex= searchIndex(testArray); }); it("searching should returns array of correct indices", function(){ expect(mySearchIndex).toContain("a","b","c"); }); })
describe("Read book data", function() { beforeEach(function(){ var file = filePath.files[0]; var reader = new FileReader(); }); it("assert JSON file is not empty",function(){ var fileNotEmpty = JSON.parse(reader.result); var fileNotEmptyResult = function(fileNotEmpty){ if (fileNotEmpty = null){ return false; } else{ return true; } }; expect(fileNotEmptyResult).toBe(true); }); }); describe("Populate Index", function(){ beforeEach(function() { checkEmpty = new createIndex(); //test using spies to check if methods are exectued spyOn(checkEmpty, 'push'); }); it('should have called and created this function', function(){ //calling the function to see if the code has been executed checkempty.push(term); expect(checkEmpty.push).toHaveBeenCalled(); //because if this method is called the index has been created. }); it("should map string keys to correct objects", function(){ //calling function to see if it is executed in code expect(display.innerText).toBe('Index Created'); }); });
Change the read book test and populate index test
Change the read book test and populate index test
JavaScript
mit
andela-pbirir/inverted-index,andela-pbirir/inverted-index
javascript
## Code Before: describe ("Read book data",function(){ it("assert JSON file is not empty",function(){ var isNotEmpty = function IsJsonString(filePath) { try { JSON.parse(filePath); } catch (e) { return false; } return true; }; expect(isNotEmpty).toBe(true).because('The JSON file should be a valid JSON array'); }); }); describe ("Populate Index",function(){ beforeEach(function() { var myIndexPopulate=JSON.parse(filePath); var myIndexGet=getIndex(myIndexPopulate); }); it("index should be created after reading",function(){ expect(myIndexGet).not.toBe(null).because('Index should be created after reading the file'); }); it("index maps string keys to correct obj", function(){ var myFunction= function() { var testArray=['a','1']; var a=createIndex(testArray); var b=getIndex(a); return b; } expect(myFunction).toBe(['a']).because('Index should return corresponding key'); }); }); describe ("Search Index", function(){ beforeEach(function(){ var testArray=["a","b","c"]; var mySearchIndex= searchIndex(testArray); }); it("searching should returns array of correct indices", function(){ expect(mySearchIndex).toContain("a","b","c"); }); }) ## Instruction: Change the read book test and populate index test ## Code After: describe("Read book data", function() { beforeEach(function(){ var file = filePath.files[0]; var reader = new FileReader(); }); it("assert JSON file is not empty",function(){ var fileNotEmpty = JSON.parse(reader.result); var fileNotEmptyResult = function(fileNotEmpty){ if (fileNotEmpty = null){ return false; } else{ return true; } }; expect(fileNotEmptyResult).toBe(true); }); }); describe("Populate Index", function(){ beforeEach(function() { checkEmpty = new createIndex(); //test using spies to check if methods are exectued spyOn(checkEmpty, 'push'); }); it('should have called and created this function', function(){ //calling the function to see if the code has been executed checkempty.push(term); expect(checkEmpty.push).toHaveBeenCalled(); //because if this method is called the index has been created. }); it("should map string keys to correct objects", function(){ //calling function to see if it is executed in code expect(display.innerText).toBe('Index Created'); }); });
- describe ("Read book data",function(){ ? - + describe("Read book data", function() { ? + + + beforeEach(function(){ + var file = filePath.files[0]; + var reader = new FileReader(); + }); + it("assert JSON file is not empty",function(){ + var fileNotEmpty = JSON.parse(reader.result); + var fileNotEmptyResult = function(fileNotEmpty){ + if (fileNotEmpty = null){ - it("assert JSON file is not empty",function(){ - var isNotEmpty = function IsJsonString(filePath) { - try { - JSON.parse(filePath); - } catch (e) { - return false; ? ^^^^^^^^ + return false; ? ^^ - } - return true; - }; ? - + } - expect(isNotEmpty).toBe(true).because('The JSON file should be a valid JSON array'); + else{ + return true; + } + }; + + expect(fileNotEmptyResult).toBe(true); + }); + + + }); + + describe("Populate Index", function(){ + beforeEach(function() { + + checkEmpty = new createIndex(); + //test using spies to check if methods are exectued + spyOn(checkEmpty, 'push'); + }); + it('should have called and created this function', function(){ + + //calling the function to see if the code has been executed + checkempty.push(term); + + expect(checkEmpty.push).toHaveBeenCalled(); + //because if this method is called the index has been created. + }); + it("should map string keys to correct objects", function(){ + //calling function to see if it is executed in code + + expect(display.innerText).toBe('Index Created'); }); }); - describe ("Populate Index",function(){ - beforeEach(function() { - var myIndexPopulate=JSON.parse(filePath); - var myIndexGet=getIndex(myIndexPopulate); - - - }); - it("index should be created after reading",function(){ - - - expect(myIndexGet).not.toBe(null).because('Index should be created after reading the file'); - - }); - it("index maps string keys to correct obj", function(){ - - var myFunction= function() { - var testArray=['a','1']; - var a=createIndex(testArray); - var b=getIndex(a); - return b; - } - expect(myFunction).toBe(['a']).because('Index should return corresponding key'); - - }); - }); - describe ("Search Index", function(){ - beforeEach(function(){ - var testArray=["a","b","c"]; - var mySearchIndex= searchIndex(testArray); - - }); - it("searching should returns array of correct indices", function(){ - - expect(mySearchIndex).toContain("a","b","c"); - }); - - })
89
1.679245
41
48
a5f216b50cc19a2061858bfb84e0f4a4147fac7e
README.md
README.md
This repo contains JSON files for the sources approved for addition in restricted build environments, specifically meant for the `apt` addon in travis-build. ## Source approval process 0. Check the list of approved source for your build environment (most likely [`ubuntu`](./ubuntu.json)). 0. If it's not in there, check for [existing issues requesting the source you want](https://github.com/travis-ci/apt-source-whitelist/issues), and if one doesn't exist please open an issue requesting the source you need in the [this repo](https://github.com/travis-ci/apt-source-whitelist/issues/new?title=APT+source+whitelist+request+for+___SOURCE___) (and be sure to replace `__SOURCE__` in the issue title :wink:). The body of the issue must include the "deb source line" which may be a ppa alias such as `ppa:fkrull/deadsnakes`. If the deb source is not a PPA, you must also include the URL to the GPG key. 0. Please be patient :smiley_cat:
This repo contains JSON files for the sources approved for addition in restricted build environments, specifically meant for the `apt` addon in travis-build.
Remove notes on approval process
Remove notes on approval process
Markdown
mit
travis-ci/apt-source-whitelist
markdown
## Code Before: This repo contains JSON files for the sources approved for addition in restricted build environments, specifically meant for the `apt` addon in travis-build. ## Source approval process 0. Check the list of approved source for your build environment (most likely [`ubuntu`](./ubuntu.json)). 0. If it's not in there, check for [existing issues requesting the source you want](https://github.com/travis-ci/apt-source-whitelist/issues), and if one doesn't exist please open an issue requesting the source you need in the [this repo](https://github.com/travis-ci/apt-source-whitelist/issues/new?title=APT+source+whitelist+request+for+___SOURCE___) (and be sure to replace `__SOURCE__` in the issue title :wink:). The body of the issue must include the "deb source line" which may be a ppa alias such as `ppa:fkrull/deadsnakes`. If the deb source is not a PPA, you must also include the URL to the GPG key. 0. Please be patient :smiley_cat: ## Instruction: Remove notes on approval process ## Code After: This repo contains JSON files for the sources approved for addition in restricted build environments, specifically meant for the `apt` addon in travis-build.
This repo contains JSON files for the sources approved for addition in restricted build environments, specifically meant for the `apt` addon in travis-build. - - ## Source approval process - - 0. Check the list of approved source for your build environment (most likely [`ubuntu`](./ubuntu.json)). - 0. If it's not in there, check for [existing issues requesting the source you - want](https://github.com/travis-ci/apt-source-whitelist/issues), and if one doesn't exist please - open an issue requesting the source you need in the [this - repo](https://github.com/travis-ci/apt-source-whitelist/issues/new?title=APT+source+whitelist+request+for+___SOURCE___) - (and be sure to replace `__SOURCE__` in the issue title :wink:). The body of the issue must include the "deb - source line" which may be a ppa alias such as `ppa:fkrull/deadsnakes`. - If the deb source is not a PPA, you must also include the URL to the GPG key. - 0. Please be patient :smiley_cat:
12
0.857143
0
12
4c1987b918d353f849ad1aaad174db797525ee10
scripts/app.js
scripts/app.js
var ko = require('knockout-client'), vm = require('./viewModel'); vm.wtf(); ko.applyBindings(vm);
var ko = require('knockout-client'), vm = require('./viewModel'); ko.applyBindings(vm);
Remove increment on refresh / initial visit
Remove increment on refresh / initial visit
JavaScript
mit
joshka/countw.tf,joshka/countw.tf,joshka/countw.tf,joshka/countw.tf
javascript
## Code Before: var ko = require('knockout-client'), vm = require('./viewModel'); vm.wtf(); ko.applyBindings(vm); ## Instruction: Remove increment on refresh / initial visit ## Code After: var ko = require('knockout-client'), vm = require('./viewModel'); ko.applyBindings(vm);
var ko = require('knockout-client'), vm = require('./viewModel'); - vm.wtf(); ko.applyBindings(vm);
1
0.2
0
1
a89f26fe01acf4eb06231c4cb660e4fdb2404568
src/features/remove-zero-categories/main.js
src/features/remove-zero-categories/main.js
(function removeZeroCategoriesFromCoverOverbudgeting() { if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') { var coverOverbudgetingCategories = $( ".modal-budget-overspending .options-shown .ynab-select-options" ).children('li'); coverOverbudgetingCategories.each(function(i) { var t = $(this).text(); // Category balance text. var categoryBalance = parseInt(t.substr(t.indexOf(":"), t.length).replace(/[^\d-]/g, '')); if (categoryBalance <= 0) { $(this).remove(); } }); } setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50); })();
(function removeZeroCategoriesFromCoverOverbudgeting() { if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') { var coverOverbudgetingCategories = $( "fieldset>.options-shown>.ynab-select-options" ).children('li'); coverOverbudgetingCategories.each(function(i) { var t = $(this).text(); // Category balance text. var categoryBalance = parseInt(t.substr(t.length - t.indexOf(":") + 2).replace( /\D/g, '')) if (categoryBalance <= 0) { $(this).remove(); } }); } setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50); })();
Revert "Added a more reliable css selector and fixed parsing bug"
Revert "Added a more reliable css selector and fixed parsing bug" This reverts commit 19b98b00ca4fdc04f650570062de16c771063741.
JavaScript
mit
boxfoot/toolkit-for-ynab,joshmadewell/toolkit-for-ynab,johde/toolkit-for-ynab,boxfoot/toolkit-for-ynab,Niictar/toolkit-for-ynab,gpeden/ynab-enhanced,mhum/ynab-enhanced,mhum/ynab-enhanced,ahatzz11/toolkit-for-ynab,ahatzz11/toolkit-for-ynab,Niictar/toolkit-for-ynab,boxfoot/toolkit-for-ynab,joshmadewell/toolkit-for-ynab,dbaldon/toolkit-for-ynab,mhum/ynab-enhanced,gpeden/ynab-enhanced,egens/toolkit-for-ynab,blargity/toolkit-for-ynab,egens/toolkit-for-ynab,joshmadewell/toolkit-for-ynab,dbaldon/toolkit-for-ynab,gpeden/ynab-enhanced,Niictar/toolkit-for-ynab,johde/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,johde/toolkit-for-ynab,dbaldon/toolkit-for-ynab,falkencreative/toolkit-for-ynab,boxfoot/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,falkencreative/toolkit-for-ynab,gpeden/ynab-enhanced,toolkit-for-ynab/toolkit-for-ynab,egens/toolkit-for-ynab,egens/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,ahatzz11/toolkit-for-ynab,falkencreative/toolkit-for-ynab,Niictar/toolkit-for-ynab,joshmadewell/toolkit-for-ynab,blargity/toolkit-for-ynab,johde/toolkit-for-ynab,mhum/ynab-enhanced,ahatzz11/toolkit-for-ynab,blargity/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,blargity/toolkit-for-ynab
javascript
## Code Before: (function removeZeroCategoriesFromCoverOverbudgeting() { if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') { var coverOverbudgetingCategories = $( ".modal-budget-overspending .options-shown .ynab-select-options" ).children('li'); coverOverbudgetingCategories.each(function(i) { var t = $(this).text(); // Category balance text. var categoryBalance = parseInt(t.substr(t.indexOf(":"), t.length).replace(/[^\d-]/g, '')); if (categoryBalance <= 0) { $(this).remove(); } }); } setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50); })(); ## Instruction: Revert "Added a more reliable css selector and fixed parsing bug" This reverts commit 19b98b00ca4fdc04f650570062de16c771063741. ## Code After: (function removeZeroCategoriesFromCoverOverbudgeting() { if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') { var coverOverbudgetingCategories = $( "fieldset>.options-shown>.ynab-select-options" ).children('li'); coverOverbudgetingCategories.each(function(i) { var t = $(this).text(); // Category balance text. var categoryBalance = parseInt(t.substr(t.length - t.indexOf(":") + 2).replace( /\D/g, '')) if (categoryBalance <= 0) { $(this).remove(); } }); } setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50); })();
(function removeZeroCategoriesFromCoverOverbudgeting() { if (typeof Em !== 'undefined' && typeof Ember !== 'undefined' && typeof $ !== 'undefined') { - var coverOverbudgetingCategories = $( ".modal-budget-overspending .options-shown .ynab-select-options" ).children('li'); ? ^^^ ^^^^^^^ ^^^^^^^^^^^^^^ ^ + var coverOverbudgetingCategories = $( "fieldset>.options-shown>.ynab-select-options" ).children('li'); ? ^^^^ ^ ^ ^ coverOverbudgetingCategories.each(function(i) { var t = $(this).text(); // Category balance text. - var categoryBalance = parseInt(t.substr(t.indexOf(":"), t.length).replace(/[^\d-]/g, '')); ? - ^^^^^^^^ -- ^^^ - + var categoryBalance = parseInt(t.substr(t.length - t.indexOf(":") + 2).replace( /\D/g, '')) ? +++++++++++ ^^^ + ^ if (categoryBalance <= 0) { $(this).remove(); } }); } setTimeout(removeZeroCategoriesFromCoverOverbudgeting, 50); })();
4
0.266667
2
2
12d7d946eb8b94a8bcd1cefb1a361598acc2394d
share/spice/amazon/amazon_detail.handlebars
share/spice/amazon/amazon_detail.handlebars
<div> <img class="spotlight" src="/iu/?u={{img}}"> <div class="description"> <h1><a href="{{url}}">{{heading}}</a></h1> <br> <span class="price">{{price}}</span> &bull; by {{brand}} &bull; <img class="stars" src=""> (<a href="{{rating}}"><span class="review-count"></span> customer reviews</a>) <br> {{{abstract}}} <a href="{{url}}">Read More</a> <br> </div> <div class="clear">&nbsp;</div> </div>
<div> <img class="spotlight" src="/iu/?u={{img}}"> <div class="description"> <h1><a href="{{url}}">{{heading}}</a></h1> <br> <span class="price">{{price}}</span> &bull; by {{brand}} &bull; <img class="stars" src=""> (<a href="{{rating}}"><span class="review-count"></span> customer reviews</a>) <br> {{{abstract}}} <br> </div> <div class="clear">&nbsp;</div> </div>
Read More link is now included in detail api_response
Read More link is now included in detail api_response
Handlebars
apache-2.0
TomBebbington/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,stennie/zeroclickinfo-spice,levaly/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,imwally/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,lernae/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,soleo/zeroclickinfo-spice,imwally/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,lernae/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,levaly/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,mayo/zeroclickinfo-spice,P71/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,stennie/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,loganom/zeroclickinfo-spice,ppant/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,loganom/zeroclickinfo-spice,sevki/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,sevki/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,lernae/zeroclickinfo-spice,echosa/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,stennie/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,lernae/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,mayo/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,mayo/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,mayo/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,soleo/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,deserted/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,loganom/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,lerna/zeroclickinfo-spice,imwally/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,sevki/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,P71/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,echosa/zeroclickinfo-spice,lerna/zeroclickinfo-spice,ppant/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,levaly/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,stennie/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,imwally/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,ppant/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,echosa/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,lernae/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,deserted/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,levaly/zeroclickinfo-spice,soleo/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,lerna/zeroclickinfo-spice,levaly/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,P71/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,echosa/zeroclickinfo-spice,loganom/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,soleo/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,imwally/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,lerna/zeroclickinfo-spice,levaly/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,ppant/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,sevki/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,deserted/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,echosa/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,lerna/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,lernae/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,soleo/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,deserted/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,P71/zeroclickinfo-spice,soleo/zeroclickinfo-spice,deserted/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,deserted/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice
handlebars
## Code Before: <div> <img class="spotlight" src="/iu/?u={{img}}"> <div class="description"> <h1><a href="{{url}}">{{heading}}</a></h1> <br> <span class="price">{{price}}</span> &bull; by {{brand}} &bull; <img class="stars" src=""> (<a href="{{rating}}"><span class="review-count"></span> customer reviews</a>) <br> {{{abstract}}} <a href="{{url}}">Read More</a> <br> </div> <div class="clear">&nbsp;</div> </div> ## Instruction: Read More link is now included in detail api_response ## Code After: <div> <img class="spotlight" src="/iu/?u={{img}}"> <div class="description"> <h1><a href="{{url}}">{{heading}}</a></h1> <br> <span class="price">{{price}}</span> &bull; by {{brand}} &bull; <img class="stars" src=""> (<a href="{{rating}}"><span class="review-count"></span> customer reviews</a>) <br> {{{abstract}}} <br> </div> <div class="clear">&nbsp;</div> </div>
<div> <img class="spotlight" src="/iu/?u={{img}}"> <div class="description"> <h1><a href="{{url}}">{{heading}}</a></h1> <br> <span class="price">{{price}}</span> &bull; by {{brand}} &bull; <img class="stars" src=""> (<a href="{{rating}}"><span class="review-count"></span> customer reviews</a>) <br> {{{abstract}}} - <a href="{{url}}">Read More</a> <br> </div> <div class="clear">&nbsp;</div> </div>
1
0.058824
0
1
f8ea4266082fba1210be270d6ae7607717591978
skimage/io/__init__.py
skimage/io/__init__.py
from ._plugins import * from .sift import * from .collection import * from ._io import * from ._image_stack import * from .video import * reset_plugins() def _update_doc(doc): """Add a list of plugins to the module docstring, formatted as a ReStructuredText table. """ from textwrap import wrap info = [(p, plugin_info(p)) for p in available_plugins if not p == 'test'] col_1_len = max([len(n) for (n, _) in info]) wrap_len = 73 col_2_len = wrap_len - 1 - col_1_len # Insert table header info.insert(0, ('=' * col_1_len, {'description': '=' * col_2_len})) info.insert(1, ('Plugin', {'description': 'Description'})) info.insert(2, ('-' * col_1_len, {'description': '-' * col_2_len})) info.append(('=' * col_1_len, {'description': '=' * col_2_len})) for (name, meta_data) in info: wrapped_descr = wrap(meta_data.get('description', ''), col_2_len) doc += "%s %s\n" % (name.ljust(col_1_len), '\n'.join(wrapped_descr)) doc = doc.strip() return doc __doc__ = _update_doc(__doc__)
from ._plugins import * from .sift import * from .collection import * from ._io import * from ._image_stack import * from .video import * reset_plugins() WRAP_LEN = 73 def _separator(char, lengths): return [char * separator_length for separator_length in lengths] def _update_doc(doc): """Add a list of plugins to the module docstring, formatted as a ReStructuredText table. """ from textwrap import wrap info = [(p, plugin_info(p).get('description', 'no description')) for p in available_plugins if not p == 'test'] col_1_len = max([len(n) for (n, _) in info]) col_2_len = WRAP_LEN - 1 - col_1_len # Insert table header info.insert(0, _separator('=', (col_1_len, col_2_len))) info.insert(1, ('Plugin', 'Description')) info.insert(2, _separator('-', (col_1_len, col_2_len))) info.append(_separator('-', (col_1_len, col_2_len))) for (name, plugin_description) in info: wrapped_descr = wrap(plugin_description, col_2_len) doc += "%s %s\n" % (name.ljust(col_1_len), '\n'.join(wrapped_descr)) doc = doc.strip() return doc __doc__ = _update_doc(__doc__)
Refactor io doc building code
Refactor io doc building code
Python
bsd-3-clause
youprofit/scikit-image,ofgulban/scikit-image,Hiyorimi/scikit-image,ofgulban/scikit-image,pratapvardhan/scikit-image,chintak/scikit-image,WarrenWeckesser/scikits-image,blink1073/scikit-image,SamHames/scikit-image,bsipocz/scikit-image,chriscrosscutler/scikit-image,vighneshbirodkar/scikit-image,dpshelio/scikit-image,Midafi/scikit-image,juliusbierk/scikit-image,michaelpacer/scikit-image,chintak/scikit-image,emon10005/scikit-image,paalge/scikit-image,paalge/scikit-image,paalge/scikit-image,WarrenWeckesser/scikits-image,michaelaye/scikit-image,michaelpacer/scikit-image,ClinicalGraphics/scikit-image,emon10005/scikit-image,bennlich/scikit-image,vighneshbirodkar/scikit-image,GaZ3ll3/scikit-image,GaZ3ll3/scikit-image,ofgulban/scikit-image,oew1v07/scikit-image,keflavich/scikit-image,robintw/scikit-image,bennlich/scikit-image,newville/scikit-image,juliusbierk/scikit-image,vighneshbirodkar/scikit-image,youprofit/scikit-image,jwiggins/scikit-image,SamHames/scikit-image,ajaybhat/scikit-image,Hiyorimi/scikit-image,bsipocz/scikit-image,ClinicalGraphics/scikit-image,blink1073/scikit-image,keflavich/scikit-image,Britefury/scikit-image,chriscrosscutler/scikit-image,Midafi/scikit-image,rjeli/scikit-image,ajaybhat/scikit-image,robintw/scikit-image,newville/scikit-image,warmspringwinds/scikit-image,chintak/scikit-image,SamHames/scikit-image,chintak/scikit-image,jwiggins/scikit-image,Britefury/scikit-image,oew1v07/scikit-image,SamHames/scikit-image,warmspringwinds/scikit-image,michaelaye/scikit-image,pratapvardhan/scikit-image,rjeli/scikit-image,rjeli/scikit-image,dpshelio/scikit-image
python
## Code Before: from ._plugins import * from .sift import * from .collection import * from ._io import * from ._image_stack import * from .video import * reset_plugins() def _update_doc(doc): """Add a list of plugins to the module docstring, formatted as a ReStructuredText table. """ from textwrap import wrap info = [(p, plugin_info(p)) for p in available_plugins if not p == 'test'] col_1_len = max([len(n) for (n, _) in info]) wrap_len = 73 col_2_len = wrap_len - 1 - col_1_len # Insert table header info.insert(0, ('=' * col_1_len, {'description': '=' * col_2_len})) info.insert(1, ('Plugin', {'description': 'Description'})) info.insert(2, ('-' * col_1_len, {'description': '-' * col_2_len})) info.append(('=' * col_1_len, {'description': '=' * col_2_len})) for (name, meta_data) in info: wrapped_descr = wrap(meta_data.get('description', ''), col_2_len) doc += "%s %s\n" % (name.ljust(col_1_len), '\n'.join(wrapped_descr)) doc = doc.strip() return doc __doc__ = _update_doc(__doc__) ## Instruction: Refactor io doc building code ## Code After: from ._plugins import * from .sift import * from .collection import * from ._io import * from ._image_stack import * from .video import * reset_plugins() WRAP_LEN = 73 def _separator(char, lengths): return [char * separator_length for separator_length in lengths] def _update_doc(doc): """Add a list of plugins to the module docstring, formatted as a ReStructuredText table. """ from textwrap import wrap info = [(p, plugin_info(p).get('description', 'no description')) for p in available_plugins if not p == 'test'] col_1_len = max([len(n) for (n, _) in info]) col_2_len = WRAP_LEN - 1 - col_1_len # Insert table header info.insert(0, _separator('=', (col_1_len, col_2_len))) info.insert(1, ('Plugin', 'Description')) info.insert(2, _separator('-', (col_1_len, col_2_len))) info.append(_separator('-', (col_1_len, col_2_len))) for (name, plugin_description) in info: wrapped_descr = wrap(plugin_description, col_2_len) doc += "%s %s\n" % (name.ljust(col_1_len), '\n'.join(wrapped_descr)) doc = doc.strip() return doc __doc__ = _update_doc(__doc__)
from ._plugins import * from .sift import * from .collection import * from ._io import * from ._image_stack import * from .video import * reset_plugins() + WRAP_LEN = 73 + + + def _separator(char, lengths): + return [char * separator_length for separator_length in lengths] + def _update_doc(doc): """Add a list of plugins to the module docstring, formatted as a ReStructuredText table. """ from textwrap import wrap + info = [(p, plugin_info(p).get('description', 'no description')) - info = [(p, plugin_info(p)) for p in available_plugins if not p == 'test'] ? ---- - ---- ^^^^^^^^^^^^^^^ + for p in available_plugins if not p == 'test'] ? ^^^^ col_1_len = max([len(n) for (n, _) in info]) - - wrap_len = 73 - col_2_len = wrap_len - 1 - col_1_len ? ^^^^ ^^^ + col_2_len = WRAP_LEN - 1 - col_1_len ? ^^^^ ^^^ # Insert table header - info.insert(0, ('=' * col_1_len, {'description': '=' * col_2_len})) + info.insert(0, _separator('=', (col_1_len, col_2_len))) - info.insert(1, ('Plugin', {'description': 'Description'})) ? ---------------- - + info.insert(1, ('Plugin', 'Description')) - info.insert(2, ('-' * col_1_len, {'description': '-' * col_2_len})) - info.append(('=' * col_1_len, {'description': '=' * col_2_len})) + info.insert(2, _separator('-', (col_1_len, col_2_len))) + info.append(_separator('-', (col_1_len, col_2_len))) + for (name, plugin_description) in info: + wrapped_descr = wrap(plugin_description, col_2_len) - for (name, meta_data) in info: - wrapped_descr = wrap(meta_data.get('description', ''), - col_2_len) - doc += "%s %s\n" % (name.ljust(col_1_len), + doc += "%s %s\n" % (name.ljust(col_1_len), '\n'.join(wrapped_descr)) ? ++++++++++++++++++++++++++ - '\n'.join(wrapped_descr)) doc = doc.strip() return doc __doc__ = _update_doc(__doc__)
29
0.674419
16
13
53dad32841ddb39721dd6a3c44de083d507a6ee6
test/browser/parallel.integration.specs.ts
test/browser/parallel.integration.specs.ts
import parallel from "../../src/browser/index"; describe("ParallelIntegration", function () { it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) { parallel .range(100) .reduce(0, (memo: number, value: number) => { for (let i = 0; i < 1e7; ++i) { // busy wait } return memo + value; }) .then(result => { expect(result).toBe(4950); done(); }); }, 10000); it("maps an input array to an output array", function (done) { const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; parallel.collection(data) .map(value => value ** 2) .value() .then(result => { expect(result).toEqual([0, 1, 4, 9, 16, 25, 36, 49, 64, 81]); done(); }); }); });
import parallel from "../../src/browser/index"; describe("ParallelIntegration", function () { it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) { parallel .range(100) .reduce(0, (memo: number, value: number) => memo + value) .then(result => { expect(result).toBe(4950); done(); }); }, 10000); it("maps an input array to an output array", function (done) { const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; parallel.collection(data) .map(value => value ** 2) .value() .then(result => { expect(result).toEqual([0, 1, 4, 9, 16, 25, 36, 49, 64, 81]); done(); }); }); });
Remove busy wait to avoid timeout on browserstack
Remove busy wait to avoid timeout on browserstack
TypeScript
mit
MichaReiser/parallel.es,MichaReiser/parallel.es,DatenMetzgerX/parallel.es,MichaReiser/parallel.es,DatenMetzgerX/parallel.es,DatenMetzgerX/parallel.es
typescript
## Code Before: import parallel from "../../src/browser/index"; describe("ParallelIntegration", function () { it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) { parallel .range(100) .reduce(0, (memo: number, value: number) => { for (let i = 0; i < 1e7; ++i) { // busy wait } return memo + value; }) .then(result => { expect(result).toBe(4950); done(); }); }, 10000); it("maps an input array to an output array", function (done) { const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; parallel.collection(data) .map(value => value ** 2) .value() .then(result => { expect(result).toEqual([0, 1, 4, 9, 16, 25, 36, 49, 64, 81]); done(); }); }); }); ## Instruction: Remove busy wait to avoid timeout on browserstack ## Code After: import parallel from "../../src/browser/index"; describe("ParallelIntegration", function () { it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) { parallel .range(100) .reduce(0, (memo: number, value: number) => memo + value) .then(result => { expect(result).toBe(4950); done(); }); }, 10000); it("maps an input array to an output array", function (done) { const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; parallel.collection(data) .map(value => value ** 2) .value() .then(result => { expect(result).toEqual([0, 1, 4, 9, 16, 25, 36, 49, 64, 81]); done(); }); }); });
import parallel from "../../src/browser/index"; describe("ParallelIntegration", function () { it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) { parallel .range(100) - .reduce(0, (memo: number, value: number) => { ? ^ + .reduce(0, (memo: number, value: number) => memo + value) ? ^^^^^^^^^^^^^ - for (let i = 0; i < 1e7; ++i) { - // busy wait - } - - return memo + value; - }) .then(result => { expect(result).toBe(4950); done(); }); }, 10000); it("maps an input array to an output array", function (done) { const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; parallel.collection(data) .map(value => value ** 2) .value() .then(result => { expect(result).toEqual([0, 1, 4, 9, 16, 25, 36, 49, 64, 81]); done(); }); }); });
8
0.258065
1
7
60a7ed38fb3fbe47bbeea254f36470c9f1ee713c
terraform/main.tf
terraform/main.tf
provider "libvirt" { uri = "qemu:///system" } resource "libvirt_volume" "grid-qcow2" { name = "grid${count.index}-qcow2" pool = "default" format = "qcow2" source = "/home/vdloo/images/grid0.qcow2" count = 20 } resource "libvirt_domain" "grid" { name = "grid${count.index}" memory = "1024" vcpu = 1 network_interface { network_name = "default" } boot_device { dev = ["hd"] } disk { volume_id = "${element(libvirt_volume.grid-qcow2.*.id, count.index)}" } graphics { type = "vnc" listen_type = "address" } count = 20 }
provider "libvirt" { uri = "qemu:///system" } resource "libvirt_volume" "grid-qcow2" { name = "grid${count.index}-qcow2" pool = "default" format = "qcow2" source = "/home/vdloo/images/grid0.qcow2" count = 5 } resource "libvirt_domain" "grid" { name = "grid${count.index}" memory = "10240" vcpu = 2 network_interface { macvtap = "enp0s31f6" } boot_device { dev = ["hd"] } disk { volume_id = "${element(libvirt_volume.grid-qcow2.*.id, count.index)}" } graphics { type = "vnc" listen_type = "address" } count = 5 }
Revert "do not use macvtap but internal network instead"
Revert "do not use macvtap but internal network instead"
HCL
apache-2.0
vdloo/simulacra,vdloo/simulacra,vdloo/simulacra,vdloo/simulacra
hcl
## Code Before: provider "libvirt" { uri = "qemu:///system" } resource "libvirt_volume" "grid-qcow2" { name = "grid${count.index}-qcow2" pool = "default" format = "qcow2" source = "/home/vdloo/images/grid0.qcow2" count = 20 } resource "libvirt_domain" "grid" { name = "grid${count.index}" memory = "1024" vcpu = 1 network_interface { network_name = "default" } boot_device { dev = ["hd"] } disk { volume_id = "${element(libvirt_volume.grid-qcow2.*.id, count.index)}" } graphics { type = "vnc" listen_type = "address" } count = 20 } ## Instruction: Revert "do not use macvtap but internal network instead" ## Code After: provider "libvirt" { uri = "qemu:///system" } resource "libvirt_volume" "grid-qcow2" { name = "grid${count.index}-qcow2" pool = "default" format = "qcow2" source = "/home/vdloo/images/grid0.qcow2" count = 5 } resource "libvirt_domain" "grid" { name = "grid${count.index}" memory = "10240" vcpu = 2 network_interface { macvtap = "enp0s31f6" } boot_device { dev = ["hd"] } disk { volume_id = "${element(libvirt_volume.grid-qcow2.*.id, count.index)}" } graphics { type = "vnc" listen_type = "address" } count = 5 }
provider "libvirt" { uri = "qemu:///system" } resource "libvirt_volume" "grid-qcow2" { name = "grid${count.index}-qcow2" pool = "default" format = "qcow2" source = "/home/vdloo/images/grid0.qcow2" - count = 20 ? ^^ + count = 5 ? ^ } resource "libvirt_domain" "grid" { name = "grid${count.index}" - memory = "1024" + memory = "10240" ? + - vcpu = 1 ? ^ + vcpu = 2 ? ^ network_interface { - network_name = "default" + macvtap = "enp0s31f6" } boot_device { dev = ["hd"] } disk { volume_id = "${element(libvirt_volume.grid-qcow2.*.id, count.index)}" } graphics { type = "vnc" listen_type = "address" } - count = 20 ? ^^ + count = 5 ? ^ }
10
0.30303
5
5
d59066a35118d9ca4cba11bc5b0e832fab931355
app/views/projects/_show.html.haml
app/views/projects/_show.html.haml
.tabbable %ul.nav.nav-tabs %li.active= link_to 'Details', '#tab-details', {:data => {:toggle => 'tab'}} %li= link_to 'Stundenrapport', '#tab-activities', {:data => {:toggle => 'tab'}} .tab-content #tab-details.tab-pane.active = render "form" #tab-activities.tab-pane = render 'show_activities'
.tabbable %ul.nav.nav-tabs %li.active= link_to 'Details', '#tab-details', {:data => {:toggle => 'tab'}} %li= link_to t_title(:list, Activity), '#tab-activities', {:data => {:toggle => 'tab'}} .tab-content #tab-details.tab-pane.active = render "form" #tab-activities.tab-pane = render 'show_activities'
Use translations for activities tab in projects.
Use translations for activities tab in projects.
Haml
mit
huerlisi/bookyt_projects,raskhadafi/bookyt_projects,huerlisi/bookyt_projects,raskhadafi/bookyt_projects,huerlisi/bookyt_projects
haml
## Code Before: .tabbable %ul.nav.nav-tabs %li.active= link_to 'Details', '#tab-details', {:data => {:toggle => 'tab'}} %li= link_to 'Stundenrapport', '#tab-activities', {:data => {:toggle => 'tab'}} .tab-content #tab-details.tab-pane.active = render "form" #tab-activities.tab-pane = render 'show_activities' ## Instruction: Use translations for activities tab in projects. ## Code After: .tabbable %ul.nav.nav-tabs %li.active= link_to 'Details', '#tab-details', {:data => {:toggle => 'tab'}} %li= link_to t_title(:list, Activity), '#tab-activities', {:data => {:toggle => 'tab'}} .tab-content #tab-details.tab-pane.active = render "form" #tab-activities.tab-pane = render 'show_activities'
.tabbable %ul.nav.nav-tabs %li.active= link_to 'Details', '#tab-details', {:data => {:toggle => 'tab'}} - %li= link_to 'Stundenrapport', '#tab-activities', {:data => {:toggle => 'tab'}} ? -- ^^^ ^^^^^^^ ^ + %li= link_to t_title(:list, Activity), '#tab-activities', {:data => {:toggle => 'tab'}} ? ^^^^^ ^^^^^ ^^^^^^^^^^^ .tab-content #tab-details.tab-pane.active = render "form" #tab-activities.tab-pane = render 'show_activities'
2
0.2
1
1
984be7e4064a66db295f3937fe9bedff9421d363
lib/frecon/base/object.rb
lib/frecon/base/object.rb
class Object alias_method :is_an?, :is_a? end
class Object # Alias #is_a? to #is_an?. This allows us to write more # proper-English-y code. alias_method :is_an?, :is_a? end
Add a little bit of explanation for the Object class (and whitespace)
Add a little bit of explanation for the Object class (and whitespace)
Ruby
mit
frc-frecon/frecon,frc-frecon/frecon
ruby
## Code Before: class Object alias_method :is_an?, :is_a? end ## Instruction: Add a little bit of explanation for the Object class (and whitespace) ## Code After: class Object # Alias #is_a? to #is_an?. This allows us to write more # proper-English-y code. alias_method :is_an?, :is_a? end
class Object + + # Alias #is_a? to #is_an?. This allows us to write more + # proper-English-y code. alias_method :is_an?, :is_a? + end
4
1
4
0
c3cf0748cc77a2d47acd8a378938fdb5658f6998
app/views/members/show.html.haml
app/views/members/show.html.haml
%h3 = @member.name ( %tt = @member.email ) %h5 Voting History %table#proposal %tr %th#proposal Title %th#proposal Vote - for vote in @member.votes - vote.for ? p = "for" : p = "against" %tr{:class => "vote_#{p}"} %td= vote.decision.title %td#vote= vote.for_or_against %h5 Proposal History %table#proposal %tr %th#proposal Title %th#proposal Outcome - for proposal in @member.proposals - if proposal.close_date < Time.now.to_datetime - proposal.accepted ? p = "for" : p = "against" - else - p = "in_progress" %tr{:class => "vote_#{p}"} %td= proposal.title - if proposal.close_date < Time.now.to_datetime %td#vote= proposal.accepted_or_rejected - else %td#vote Vote in Progress /%ul / - for proposal in @member.proposals / %li= proposal.title
%h3 = @member.name ( %tt = @member.email ) %h5 Voting History %table.proposals %tr %th Title %th Vote - for vote in @member.votes - vote.for ? p = "for" : p = "against" %tr{:class => "vote_#{p}"} %td= link_to(h(vote.decision.title), resource(vote.decision)) %td.vote= vote.for_or_against %h5 Proposal History %table.proposals %tr %th Title %th Outcome - for proposal in @member.proposals - if proposal.close_date < Time.now.to_datetime - proposal.accepted ? p = "for" : p = "against" - else - p = "in_progress" %tr{:class => "vote_#{p}"} %td= link_to(h(proposal.title), resource(proposal)) - if proposal.close_date < Time.now.to_datetime %td.vote= proposal.accepted_or_rejected - else %td.vote Vote in Progress /%ul / - for proposal in @member.proposals / %li= proposal.title
Tidy classes/IDs and add links to member show page.
Tidy classes/IDs and add links to member show page.
Haml
agpl-3.0
oneclickorgs/one-click-orgs-deployment,oneclickorgs/one-click-orgs,emmapersky/one-click-orgs,oneclickorgs/one-click-orgs-deployment,oneclickorgs/one-click-orgs,oneclickorgs/one-click-orgs,oneclickorgs/one-click-orgs-deployment,oneclickorgs/one-click-orgs,emmapersky/one-click-orgs
haml
## Code Before: %h3 = @member.name ( %tt = @member.email ) %h5 Voting History %table#proposal %tr %th#proposal Title %th#proposal Vote - for vote in @member.votes - vote.for ? p = "for" : p = "against" %tr{:class => "vote_#{p}"} %td= vote.decision.title %td#vote= vote.for_or_against %h5 Proposal History %table#proposal %tr %th#proposal Title %th#proposal Outcome - for proposal in @member.proposals - if proposal.close_date < Time.now.to_datetime - proposal.accepted ? p = "for" : p = "against" - else - p = "in_progress" %tr{:class => "vote_#{p}"} %td= proposal.title - if proposal.close_date < Time.now.to_datetime %td#vote= proposal.accepted_or_rejected - else %td#vote Vote in Progress /%ul / - for proposal in @member.proposals / %li= proposal.title ## Instruction: Tidy classes/IDs and add links to member show page. ## Code After: %h3 = @member.name ( %tt = @member.email ) %h5 Voting History %table.proposals %tr %th Title %th Vote - for vote in @member.votes - vote.for ? p = "for" : p = "against" %tr{:class => "vote_#{p}"} %td= link_to(h(vote.decision.title), resource(vote.decision)) %td.vote= vote.for_or_against %h5 Proposal History %table.proposals %tr %th Title %th Outcome - for proposal in @member.proposals - if proposal.close_date < Time.now.to_datetime - proposal.accepted ? p = "for" : p = "against" - else - p = "in_progress" %tr{:class => "vote_#{p}"} %td= link_to(h(proposal.title), resource(proposal)) - if proposal.close_date < Time.now.to_datetime %td.vote= proposal.accepted_or_rejected - else %td.vote Vote in Progress /%ul / - for proposal in @member.proposals / %li= proposal.title
%h3 = @member.name ( %tt = @member.email ) %h5 Voting History - %table#proposal ? ^ + %table.proposals ? ^ + %tr - %th#proposal Title - %th#proposal Vote + %th Title + %th Vote - for vote in @member.votes - vote.for ? p = "for" : p = "against" %tr{:class => "vote_#{p}"} - %td= vote.decision.title + %td= link_to(h(vote.decision.title), resource(vote.decision)) - %td#vote= vote.for_or_against ? ^ + %td.vote= vote.for_or_against ? ^ %h5 Proposal History - %table#proposal ? ^ + %table.proposals ? ^ + %tr - %th#proposal Title + %th Title - %th#proposal Outcome ? --------- + %th Outcome - for proposal in @member.proposals - if proposal.close_date < Time.now.to_datetime - proposal.accepted ? p = "for" : p = "against" - else - p = "in_progress" %tr{:class => "vote_#{p}"} - %td= proposal.title + %td= link_to(h(proposal.title), resource(proposal)) - if proposal.close_date < Time.now.to_datetime - %td#vote= proposal.accepted_or_rejected ? ^ + %td.vote= proposal.accepted_or_rejected ? ^ - else - %td#vote Vote in Progress ? ^ + %td.vote Vote in Progress ? ^ - + /%ul / - for proposal in @member.proposals / %li= proposal.title
24
0.545455
12
12
80a836d48c870dd8ded5233e9450a104561d3898
app/controllers/users_controller.rb
app/controllers/users_controller.rb
class UsersController < ApplicationController include WithUserParams before_action :authenticate!, except: :terms before_action :set_user! skip_before_action :validate_accepted_role_terms! def show @messages = current_user.messages.to_a @watched_discussions = current_user.watched_discussions_in_organization end def update current_user.update_and_notify! user_params current_user.accept_profile_terms! flash.notice = I18n.t(:user_data_updated) redirect_after! :profile_completion, fallback_location: user_path end def accept_profile_terms current_user.accept_profile_terms! flash.notice = I18n.t(:terms_accepted) redirect_after! :terms_acceptance, fallback_location: root_path end def terms @profile_terms ||= Term.profile_terms_for(current_user) end def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end def permissible_params super << [:avatar_id, :avatar_type] end private def validate_user_profile! end def set_user! @user = current_user end end
class UsersController < ApplicationController include WithUserParams before_action :authenticate!, except: :terms before_action :set_user! skip_before_action :validate_accepted_role_terms! def show @messages = current_user.messages_in_organization @watched_discussions = current_user.watched_discussions_in_organization end def update current_user.update_and_notify! user_params current_user.accept_profile_terms! flash.notice = I18n.t(:user_data_updated) redirect_after! :profile_completion, fallback_location: user_path end def accept_profile_terms current_user.accept_profile_terms! flash.notice = I18n.t(:terms_accepted) redirect_after! :terms_acceptance, fallback_location: root_path end def terms @profile_terms ||= Term.profile_terms_for(current_user) end def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end def permissible_params super << [:avatar_id, :avatar_type] end private def validate_user_profile! end def set_user! @user = current_user end end
Use messages_in_organization to retrieve user messages
Use messages_in_organization to retrieve user messages
Ruby
agpl-3.0
mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory
ruby
## Code Before: class UsersController < ApplicationController include WithUserParams before_action :authenticate!, except: :terms before_action :set_user! skip_before_action :validate_accepted_role_terms! def show @messages = current_user.messages.to_a @watched_discussions = current_user.watched_discussions_in_organization end def update current_user.update_and_notify! user_params current_user.accept_profile_terms! flash.notice = I18n.t(:user_data_updated) redirect_after! :profile_completion, fallback_location: user_path end def accept_profile_terms current_user.accept_profile_terms! flash.notice = I18n.t(:terms_accepted) redirect_after! :terms_acceptance, fallback_location: root_path end def terms @profile_terms ||= Term.profile_terms_for(current_user) end def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end def permissible_params super << [:avatar_id, :avatar_type] end private def validate_user_profile! end def set_user! @user = current_user end end ## Instruction: Use messages_in_organization to retrieve user messages ## Code After: class UsersController < ApplicationController include WithUserParams before_action :authenticate!, except: :terms before_action :set_user! skip_before_action :validate_accepted_role_terms! def show @messages = current_user.messages_in_organization @watched_discussions = current_user.watched_discussions_in_organization end def update current_user.update_and_notify! user_params current_user.accept_profile_terms! flash.notice = I18n.t(:user_data_updated) redirect_after! :profile_completion, fallback_location: user_path end def accept_profile_terms current_user.accept_profile_terms! flash.notice = I18n.t(:terms_accepted) redirect_after! :terms_acceptance, fallback_location: root_path end def terms @profile_terms ||= Term.profile_terms_for(current_user) end def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end def permissible_params super << [:avatar_id, :avatar_type] end private def validate_user_profile! end def set_user! @user = current_user end end
class UsersController < ApplicationController include WithUserParams before_action :authenticate!, except: :terms before_action :set_user! skip_before_action :validate_accepted_role_terms! def show - @messages = current_user.messages.to_a ? ^ ^^ + @messages = current_user.messages_in_organization ? ^^^^^^^^^^^^ + ^ @watched_discussions = current_user.watched_discussions_in_organization end def update current_user.update_and_notify! user_params current_user.accept_profile_terms! flash.notice = I18n.t(:user_data_updated) redirect_after! :profile_completion, fallback_location: user_path end def accept_profile_terms current_user.accept_profile_terms! flash.notice = I18n.t(:terms_accepted) redirect_after! :terms_acceptance, fallback_location: root_path end def terms @profile_terms ||= Term.profile_terms_for(current_user) end def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end def permissible_params super << [:avatar_id, :avatar_type] end private def validate_user_profile! end def set_user! @user = current_user end end
2
0.04
1
1
5f8f4888877652f4a3ab24950a11bdf8726b1dc3
Resources/app.nw/Themes/Light/Light.css
Resources/app.nw/Themes/Light/Light.css
background: white; } .tm-w-default { font-family: "Vera Mono", "Tahoma", sans-serif; font-size: 12px; line-height: 1.3em; color: black; } ::selection { background: rgba(0, 133, 255, 0.32); } ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35); border-radius: 4px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.19); }
background: white; } .tm-w-default { font-family: "Vera Mono", "Tahoma", sans-serif; font-size: 12px; line-height: 1.3em; color: black; } ::selection { background: rgba(0, 133, 255, 0.32); } ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35); border-radius: 4px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.19); } @media (max-width: 800px) { ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0); } }
Hide scrollbar track when in small editor
Hide scrollbar track when in small editor
CSS
mit
urlysses/wrong,urlysses/wrong
css
## Code Before: background: white; } .tm-w-default { font-family: "Vera Mono", "Tahoma", sans-serif; font-size: 12px; line-height: 1.3em; color: black; } ::selection { background: rgba(0, 133, 255, 0.32); } ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35); border-radius: 4px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.19); } ## Instruction: Hide scrollbar track when in small editor ## Code After: background: white; } .tm-w-default { font-family: "Vera Mono", "Tahoma", sans-serif; font-size: 12px; line-height: 1.3em; color: black; } ::selection { background: rgba(0, 133, 255, 0.32); } ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35); border-radius: 4px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.19); } @media (max-width: 800px) { ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0); } }
background: white; } .tm-w-default { font-family: "Vera Mono", "Tahoma", sans-serif; font-size: 12px; line-height: 1.3em; color: black; } ::selection { background: rgba(0, 133, 255, 0.32); } ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.35); border-radius: 4px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.19); } + + @media (max-width: 800px) { + ::-webkit-scrollbar-track { + background: rgba(0, 0, 0, 0); + } + }
6
0.24
6
0
5f0b7ed1b062a4c26f0acb9731580b016690ca42
.travis.yml
.travis.yml
language: python sudo: false python: - 2.7 - 3.4 - 3.5 os: - linux env: global: - PYTHON=python - PIP=pip - TEST_COMMAND="test -q" matrix: include: - language: generic python: 2.7 os: osx - language: generic python: 3.5 os: osx env: PYTHON=python3 PIP=pip3 - python: 2.7 os: linux env: TEST_COMMAND=lint before_install: - set -e - | if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update if [ "${PYTHON}" = "python3" ]; then brew install ${PYTHON} fi fi install: - | if [ "${TEST_COMMAND}" = "lint" ]; then ${PIP} install flake8 fi - ${PIP} install . script: - ${PYTHON} setup.py ${TEST_COMMAND}
language: python sudo: false python: - 2.7 - 3.4 - 3.5 os: - linux env: global: - PYTHON=python - PIP=pip - TEST_COMMAND="test -q" matrix: include: - language: generic python: 2.7 os: osx - language: generic python: 3.5 os: osx env: PYTHON=python3 PIP=pip3 - python: 2.7 os: linux env: TEST_COMMAND=lint before_install: - set -e - | if [ "${TRAVIS_OS_NAME}" = "osx" ]; then shell_session_update() { :; } brew update if [ "${PYTHON}" = "python3" ]; then brew install ${PYTHON} fi fi install: - | if [ "${TEST_COMMAND}" = "lint" ]; then ${PIP} install flake8 fi - ${PIP} install . script: - ${PYTHON} setup.py ${TEST_COMMAND}
Add shell_session_update workaround for macOS builders
Add shell_session_update workaround for macOS builders
YAML
bsd-3-clause
jimporter/doppel,jimporter/doppel
yaml
## Code Before: language: python sudo: false python: - 2.7 - 3.4 - 3.5 os: - linux env: global: - PYTHON=python - PIP=pip - TEST_COMMAND="test -q" matrix: include: - language: generic python: 2.7 os: osx - language: generic python: 3.5 os: osx env: PYTHON=python3 PIP=pip3 - python: 2.7 os: linux env: TEST_COMMAND=lint before_install: - set -e - | if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update if [ "${PYTHON}" = "python3" ]; then brew install ${PYTHON} fi fi install: - | if [ "${TEST_COMMAND}" = "lint" ]; then ${PIP} install flake8 fi - ${PIP} install . script: - ${PYTHON} setup.py ${TEST_COMMAND} ## Instruction: Add shell_session_update workaround for macOS builders ## Code After: language: python sudo: false python: - 2.7 - 3.4 - 3.5 os: - linux env: global: - PYTHON=python - PIP=pip - TEST_COMMAND="test -q" matrix: include: - language: generic python: 2.7 os: osx - language: generic python: 3.5 os: osx env: PYTHON=python3 PIP=pip3 - python: 2.7 os: linux env: TEST_COMMAND=lint before_install: - set -e - | if [ "${TRAVIS_OS_NAME}" = "osx" ]; then shell_session_update() { :; } brew update if [ "${PYTHON}" = "python3" ]; then brew install ${PYTHON} fi fi install: - | if [ "${TEST_COMMAND}" = "lint" ]; then ${PIP} install flake8 fi - ${PIP} install . script: - ${PYTHON} setup.py ${TEST_COMMAND}
language: python sudo: false python: - 2.7 - 3.4 - 3.5 os: - linux env: global: - PYTHON=python - PIP=pip - TEST_COMMAND="test -q" matrix: include: - language: generic python: 2.7 os: osx - language: generic python: 3.5 os: osx env: PYTHON=python3 PIP=pip3 - python: 2.7 os: linux env: TEST_COMMAND=lint before_install: - set -e - | if [ "${TRAVIS_OS_NAME}" = "osx" ]; then + shell_session_update() { :; } brew update if [ "${PYTHON}" = "python3" ]; then brew install ${PYTHON} fi fi install: - | if [ "${TEST_COMMAND}" = "lint" ]; then ${PIP} install flake8 fi - ${PIP} install . script: - ${PYTHON} setup.py ${TEST_COMMAND}
1
0.022222
1
0
7f3d76bdec3731ae50b9487556b1b2750cd3108e
setup.py
setup.py
from distutils.core import setup import versioneer setup( name='iterm2-tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='''iTerm2 tools.''', author='Aaron Meurer', author_email='asmeurer@gmail.com', url='https://github.com/asmeurer/iterm2-tools', packages=['iterm2_tools'], package_data={'iterm2_tools.tests': ['aloha_cat.png']}, long_description=""" iterm2-tools Some tools for working with iTerm2's proprietary escape codes. For now, only includes iterm2_tools.images, which has functions for displaying images inline. License: MIT """, license="MIT", classifiers=[ 'Environment :: MacOS X', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2', ], )
from distutils.core import setup import versioneer setup( name='iterm2-tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='''iTerm2 tools.''', author='Aaron Meurer', author_email='asmeurer@gmail.com', url='https://github.com/asmeurer/iterm2-tools', packages=[ 'iterm2_tools', 'iterm2_tools.tests' ], package_data={'iterm2_tools.tests': ['aloha_cat.png']}, long_description=""" iterm2-tools Some tools for working with iTerm2's proprietary escape codes. For now, only includes iterm2_tools.images, which has functions for displaying images inline. License: MIT """, license="MIT", classifiers=[ 'Environment :: MacOS X', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2', ], )
Include the tests in the dist
Include the tests in the dist
Python
mit
asmeurer/iterm2-tools
python
## Code Before: from distutils.core import setup import versioneer setup( name='iterm2-tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='''iTerm2 tools.''', author='Aaron Meurer', author_email='asmeurer@gmail.com', url='https://github.com/asmeurer/iterm2-tools', packages=['iterm2_tools'], package_data={'iterm2_tools.tests': ['aloha_cat.png']}, long_description=""" iterm2-tools Some tools for working with iTerm2's proprietary escape codes. For now, only includes iterm2_tools.images, which has functions for displaying images inline. License: MIT """, license="MIT", classifiers=[ 'Environment :: MacOS X', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2', ], ) ## Instruction: Include the tests in the dist ## Code After: from distutils.core import setup import versioneer setup( name='iterm2-tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='''iTerm2 tools.''', author='Aaron Meurer', author_email='asmeurer@gmail.com', url='https://github.com/asmeurer/iterm2-tools', packages=[ 'iterm2_tools', 'iterm2_tools.tests' ], package_data={'iterm2_tools.tests': ['aloha_cat.png']}, long_description=""" iterm2-tools Some tools for working with iTerm2's proprietary escape codes. For now, only includes iterm2_tools.images, which has functions for displaying images inline. License: MIT """, license="MIT", classifiers=[ 'Environment :: MacOS X', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2', ], )
from distutils.core import setup import versioneer setup( name='iterm2-tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='''iTerm2 tools.''', author='Aaron Meurer', author_email='asmeurer@gmail.com', url='https://github.com/asmeurer/iterm2-tools', - packages=['iterm2_tools'], + packages=[ + 'iterm2_tools', + 'iterm2_tools.tests' + ], package_data={'iterm2_tools.tests': ['aloha_cat.png']}, long_description=""" iterm2-tools Some tools for working with iTerm2's proprietary escape codes. For now, only includes iterm2_tools.images, which has functions for displaying images inline. License: MIT """, license="MIT", classifiers=[ 'Environment :: MacOS X', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2', ], )
5
0.151515
4
1
4bbef30c24c038b08c6cffed9a8de9ba672d6011
docs/index.rst
docs/index.rst
git-pw ====== .. include:: ../README.rst :start-line: 19 :end-line: -7 Usage ----- .. click:: git_pw.shell:cli :prog: git-pw :show-nested:
git-pw (Patchwork subcommand for Git) ===================================== .. include:: ../README.rst :start-line: 19 :end-line: -7 Usage ----- .. click:: git_pw.shell:cli :prog: git-pw :show-nested:
Stop reference clash on ReadTheDocs
Stop reference clash on ReadTheDocs The 'Usage' section clashes with the top-level title. Resolve this. Signed-off-by: Stephen Finucane <06fa905d7f2aaced6dc72e9511c71a2a51e8aead@that.guru>
reStructuredText
mit
getpatchwork/git-pw,stephenfin/git-pw
restructuredtext
## Code Before: git-pw ====== .. include:: ../README.rst :start-line: 19 :end-line: -7 Usage ----- .. click:: git_pw.shell:cli :prog: git-pw :show-nested: ## Instruction: Stop reference clash on ReadTheDocs The 'Usage' section clashes with the top-level title. Resolve this. Signed-off-by: Stephen Finucane <06fa905d7f2aaced6dc72e9511c71a2a51e8aead@that.guru> ## Code After: git-pw (Patchwork subcommand for Git) ===================================== .. include:: ../README.rst :start-line: 19 :end-line: -7 Usage ----- .. click:: git_pw.shell:cli :prog: git-pw :show-nested:
- git-pw - ====== + git-pw (Patchwork subcommand for Git) + ===================================== .. include:: ../README.rst :start-line: 19 :end-line: -7 Usage ----- .. click:: git_pw.shell:cli :prog: git-pw :show-nested:
4
0.307692
2
2
d266a1240977de8182991d6e1fe55a189fd49cd9
app/src/main/res/values/gpgs.xml
app/src/main/res/values/gpgs.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- app id --> <string name="app_id">143088943006</string> <!-- Achievements --> <string name="achievement_v_for_victory">CgkInv-PhpUEEAIQAg</string> <string name="achievement_with_no_luck">CgkInv-PhpUEEAIQAw</string> <string name="achievement_good_guess">CgkInv-PhpUEEAIQBA</string> <string name="achievement_persistent_player">CgkInv-PhpUEEAIQBQ</string> <string name="achievement_clairvoyant">CgkInv-PhpUEEAIQCA</string> <string name="achievement_so_unlucky">CgkInv-PhpUEEAIQCw</string> <string name="achievement_42">CgkInv-PhpUEEAIQBg</string> <!-- Leaderboards --> <string name="leaderboard_singleplayer">CgkInv-PhpUEEAIQCg</string> <string name="leaderboard_multiplayer">CgkInv-PhpUEEAIQBw</string> <!-- Events --> <string name="event_typed_an_invalid_number">CgkInv-PhpUEEAIQDA</string> <string name="event_finish_a_game">CgkInv-PhpUEEAIQDQ</string> </resources>
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- app id --> <string name="app_id">143088943006</string> <!-- Achievements --> <string name="achievement_v_for_victory">CgkInv-PhpUEEAIQAg</string> <string name="achievement_with_no_luck">CgkInv-PhpUEEAIQAw</string> <string name="achievement_good_guess">CgkInv-PhpUEEAIQBA</string> <string name="achievement_persistent_player">CgkInv-PhpUEEAIQBQ</string> <string name="achievement_clairvoyant">CgkInv-PhpUEEAIQCA</string> <string name="achievement_so_unlucky">CgkInv-PhpUEEAIQCw</string> <string name="achievement_42">CgkInv-PhpUEEAIQBg</string> <!-- Leaderboards --> <string name="leaderboard_singleplayer">CgkInv-PhpUEEAIQCg</string> <!-- Events --> <string name="event_typed_an_invalid_number">CgkInv-PhpUEEAIQDA</string> <string name="event_finish_a_game">CgkInv-PhpUEEAIQDQ</string> </resources>
Remove multiplayer leaderboard (currently not used)
Remove multiplayer leaderboard (currently not used)
XML
apache-2.0
dbaelz/NotAlways42
xml
## Code Before: <?xml version="1.0" encoding="utf-8"?> <resources> <!-- app id --> <string name="app_id">143088943006</string> <!-- Achievements --> <string name="achievement_v_for_victory">CgkInv-PhpUEEAIQAg</string> <string name="achievement_with_no_luck">CgkInv-PhpUEEAIQAw</string> <string name="achievement_good_guess">CgkInv-PhpUEEAIQBA</string> <string name="achievement_persistent_player">CgkInv-PhpUEEAIQBQ</string> <string name="achievement_clairvoyant">CgkInv-PhpUEEAIQCA</string> <string name="achievement_so_unlucky">CgkInv-PhpUEEAIQCw</string> <string name="achievement_42">CgkInv-PhpUEEAIQBg</string> <!-- Leaderboards --> <string name="leaderboard_singleplayer">CgkInv-PhpUEEAIQCg</string> <string name="leaderboard_multiplayer">CgkInv-PhpUEEAIQBw</string> <!-- Events --> <string name="event_typed_an_invalid_number">CgkInv-PhpUEEAIQDA</string> <string name="event_finish_a_game">CgkInv-PhpUEEAIQDQ</string> </resources> ## Instruction: Remove multiplayer leaderboard (currently not used) ## Code After: <?xml version="1.0" encoding="utf-8"?> <resources> <!-- app id --> <string name="app_id">143088943006</string> <!-- Achievements --> <string name="achievement_v_for_victory">CgkInv-PhpUEEAIQAg</string> <string name="achievement_with_no_luck">CgkInv-PhpUEEAIQAw</string> <string name="achievement_good_guess">CgkInv-PhpUEEAIQBA</string> <string name="achievement_persistent_player">CgkInv-PhpUEEAIQBQ</string> <string name="achievement_clairvoyant">CgkInv-PhpUEEAIQCA</string> <string name="achievement_so_unlucky">CgkInv-PhpUEEAIQCw</string> <string name="achievement_42">CgkInv-PhpUEEAIQBg</string> <!-- Leaderboards --> <string name="leaderboard_singleplayer">CgkInv-PhpUEEAIQCg</string> <!-- Events --> <string name="event_typed_an_invalid_number">CgkInv-PhpUEEAIQDA</string> <string name="event_finish_a_game">CgkInv-PhpUEEAIQDQ</string> </resources>
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- app id --> <string name="app_id">143088943006</string> <!-- Achievements --> <string name="achievement_v_for_victory">CgkInv-PhpUEEAIQAg</string> <string name="achievement_with_no_luck">CgkInv-PhpUEEAIQAw</string> <string name="achievement_good_guess">CgkInv-PhpUEEAIQBA</string> <string name="achievement_persistent_player">CgkInv-PhpUEEAIQBQ</string> <string name="achievement_clairvoyant">CgkInv-PhpUEEAIQCA</string> <string name="achievement_so_unlucky">CgkInv-PhpUEEAIQCw</string> <string name="achievement_42">CgkInv-PhpUEEAIQBg</string> <!-- Leaderboards --> <string name="leaderboard_singleplayer">CgkInv-PhpUEEAIQCg</string> - <string name="leaderboard_multiplayer">CgkInv-PhpUEEAIQBw</string> <!-- Events --> <string name="event_typed_an_invalid_number">CgkInv-PhpUEEAIQDA</string> <string name="event_finish_a_game">CgkInv-PhpUEEAIQDQ</string> </resources>
1
0.045455
0
1
3647f781d993106f35aa5ddbe77f24a04bc8148d
app/decorators/action_links/form_link_builder.rb
app/decorators/action_links/form_link_builder.rb
module ActionLinks # Builds a list of action links for a form. class FormLinkBuilder < LinkBuilder def initialize(form) actions = %i[show edit clone] unless h.admin_mode? actions << [:go_live, {method: :patch}] unless form.live? actions << [:pause, {method: :patch}] if form.live? actions << [:return_to_draft, {method: :patch}] if form.not_draft? if form.smsable? actions << :sms_guide actions << [:sms_console, h.new_sms_test_path] if can?(:create, Sms::Test) end end actions << :destroy super(form, actions) end end end
module ActionLinks # Builds a list of action links for a form. class FormLinkBuilder < LinkBuilder def initialize(form) actions = %i[show edit clone] unless h.admin_mode? actions << [:go_live, {method: :patch}] unless form.live? actions << [:pause, {method: :patch}] if form.live? actions << [:return_to_draft, {method: :patch}] if form.not_draft? if form.smsable? && form.not_draft? actions << :sms_guide actions << [:sms_console, h.new_sms_test_path] if can?(:create, Sms::Test) end end actions << :destroy super(form, actions) end end end
Hide SMS guide and SMS console action links if form not published
10929: Hide SMS guide and SMS console action links if form not published
Ruby
apache-2.0
thecartercenter/elmo,thecartercenter/elmo,thecartercenter/elmo
ruby
## Code Before: module ActionLinks # Builds a list of action links for a form. class FormLinkBuilder < LinkBuilder def initialize(form) actions = %i[show edit clone] unless h.admin_mode? actions << [:go_live, {method: :patch}] unless form.live? actions << [:pause, {method: :patch}] if form.live? actions << [:return_to_draft, {method: :patch}] if form.not_draft? if form.smsable? actions << :sms_guide actions << [:sms_console, h.new_sms_test_path] if can?(:create, Sms::Test) end end actions << :destroy super(form, actions) end end end ## Instruction: 10929: Hide SMS guide and SMS console action links if form not published ## Code After: module ActionLinks # Builds a list of action links for a form. class FormLinkBuilder < LinkBuilder def initialize(form) actions = %i[show edit clone] unless h.admin_mode? actions << [:go_live, {method: :patch}] unless form.live? actions << [:pause, {method: :patch}] if form.live? actions << [:return_to_draft, {method: :patch}] if form.not_draft? if form.smsable? && form.not_draft? actions << :sms_guide actions << [:sms_console, h.new_sms_test_path] if can?(:create, Sms::Test) end end actions << :destroy super(form, actions) end end end
module ActionLinks # Builds a list of action links for a form. class FormLinkBuilder < LinkBuilder def initialize(form) actions = %i[show edit clone] unless h.admin_mode? actions << [:go_live, {method: :patch}] unless form.live? actions << [:pause, {method: :patch}] if form.live? actions << [:return_to_draft, {method: :patch}] if form.not_draft? - if form.smsable? + if form.smsable? && form.not_draft? actions << :sms_guide actions << [:sms_console, h.new_sms_test_path] if can?(:create, Sms::Test) end end actions << :destroy super(form, actions) end end end
2
0.1
1
1
63cf6f6228490c9944711106cd134254eafac3ca
regressors/plots.py
regressors/plots.py
"""This module contains functions for making plots relevant to regressors.""" from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals
"""This module contains functions for making plots relevant to regressors.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import matplotlib.pyplot as plt import seaborn.apionly as sns from sklearn import linear_model as lm from regressors import stats supported_linear_models = (lm.LinearRegression, lm.Lasso, lm.Ridge, lm.ElasticNet) def plot_residuals(clf, X, y, r_type='standardized', figsize=(10, 10)): """Plot residuals of a linear model. Parameters ---------- clf : sklearn.linear_model A scikit-learn linear model classifier with a `predict()` method. X : numpy.ndarray Training data used to fit the classifier. y : numpy.ndarray Target training values, of shape = [n_samples]. r_type : str Type of residuals to return: ['raw', 'standardized', 'studentized']. Defaults to 'standardized'. * 'raw' will return the raw residuals. * 'standardized' will return the standardized residuals, also known as internally studentized residuals. * 'studentized' will return the externally studentized residuals. figsize : tuple A tuple indicating the size of the plot to be created, with format (x-axis, y-axis). Defaults to (10, 10). Returns ------- matplotlib.figure.Figure The Figure instance. """ # Ensure we only plot residuals using classifiers we have tested assert isinstance(clf, supported_linear_models), ( "Classifiers of type {} not currently supported.".format(type(clf)) ) # With sns, only use their API so you don't change user stuff sns.set_context("talk") # Increase font size on plot sns.set_style("whitegrid") # Get residuals or standardized residuals resids = stats.residuals(clf, X, y, r_type) predictions = clf.predict(X) # Generate residual plot y_label = {'raw': 'Residuals', 'standardized': 'Standardized Residuals', 'studentized': 'Studentized Residuals'} fig = plt.figure('residuals', figsize=figsize) plt.scatter(predictions, resids, s=14, c='gray', alpha=0.7) plt.hlines(y=0, xmin=predictions.min() - 100, xmax=predictions.max() + 100, linestyle='dotted') plt.title("Residuals Plot") plt.xlabel("Predictions") plt.ylabel(y_label[r_type]) plt.show() return fig
Add function to make residuals plot
Add function to make residuals plot
Python
isc
nsh87/regressors
python
## Code Before: """This module contains functions for making plots relevant to regressors.""" from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals ## Instruction: Add function to make residuals plot ## Code After: """This module contains functions for making plots relevant to regressors.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import matplotlib.pyplot as plt import seaborn.apionly as sns from sklearn import linear_model as lm from regressors import stats supported_linear_models = (lm.LinearRegression, lm.Lasso, lm.Ridge, lm.ElasticNet) def plot_residuals(clf, X, y, r_type='standardized', figsize=(10, 10)): """Plot residuals of a linear model. Parameters ---------- clf : sklearn.linear_model A scikit-learn linear model classifier with a `predict()` method. X : numpy.ndarray Training data used to fit the classifier. y : numpy.ndarray Target training values, of shape = [n_samples]. r_type : str Type of residuals to return: ['raw', 'standardized', 'studentized']. Defaults to 'standardized'. * 'raw' will return the raw residuals. * 'standardized' will return the standardized residuals, also known as internally studentized residuals. * 'studentized' will return the externally studentized residuals. figsize : tuple A tuple indicating the size of the plot to be created, with format (x-axis, y-axis). Defaults to (10, 10). Returns ------- matplotlib.figure.Figure The Figure instance. """ # Ensure we only plot residuals using classifiers we have tested assert isinstance(clf, supported_linear_models), ( "Classifiers of type {} not currently supported.".format(type(clf)) ) # With sns, only use their API so you don't change user stuff sns.set_context("talk") # Increase font size on plot sns.set_style("whitegrid") # Get residuals or standardized residuals resids = stats.residuals(clf, X, y, r_type) predictions = clf.predict(X) # Generate residual plot y_label = {'raw': 'Residuals', 'standardized': 'Standardized Residuals', 'studentized': 'Studentized Residuals'} fig = plt.figure('residuals', figsize=figsize) plt.scatter(predictions, resids, s=14, c='gray', alpha=0.7) plt.hlines(y=0, xmin=predictions.min() - 100, xmax=predictions.max() + 100, linestyle='dotted') plt.title("Residuals Plot") plt.xlabel("Predictions") plt.ylabel(y_label[r_type]) plt.show() return fig
"""This module contains functions for making plots relevant to regressors.""" + from __future__ import absolute_import + from __future__ import division from __future__ import print_function - from __future__ import division - from __future__ import absolute_import from __future__ import unicode_literals + import matplotlib.pyplot as plt + import seaborn.apionly as sns + from sklearn import linear_model as lm + from regressors import stats + + supported_linear_models = (lm.LinearRegression, lm.Lasso, lm.Ridge, + lm.ElasticNet) + + + def plot_residuals(clf, X, y, r_type='standardized', figsize=(10, 10)): + """Plot residuals of a linear model. + + Parameters + ---------- + clf : sklearn.linear_model + A scikit-learn linear model classifier with a `predict()` method. + X : numpy.ndarray + Training data used to fit the classifier. + y : numpy.ndarray + Target training values, of shape = [n_samples]. + r_type : str + Type of residuals to return: ['raw', 'standardized', 'studentized']. + Defaults to 'standardized'. + + * 'raw' will return the raw residuals. + * 'standardized' will return the standardized residuals, also known as + internally studentized residuals. + * 'studentized' will return the externally studentized residuals. + figsize : tuple + A tuple indicating the size of the plot to be created, with format + (x-axis, y-axis). Defaults to (10, 10). + + Returns + ------- + matplotlib.figure.Figure + The Figure instance. + """ + # Ensure we only plot residuals using classifiers we have tested + assert isinstance(clf, supported_linear_models), ( + "Classifiers of type {} not currently supported.".format(type(clf)) + ) + # With sns, only use their API so you don't change user stuff + sns.set_context("talk") # Increase font size on plot + sns.set_style("whitegrid") + # Get residuals or standardized residuals + resids = stats.residuals(clf, X, y, r_type) + predictions = clf.predict(X) + # Generate residual plot + y_label = {'raw': 'Residuals', 'standardized': 'Standardized Residuals', + 'studentized': 'Studentized Residuals'} + fig = plt.figure('residuals', figsize=figsize) + plt.scatter(predictions, resids, s=14, c='gray', alpha=0.7) + plt.hlines(y=0, xmin=predictions.min() - 100, xmax=predictions.max() + 100, + linestyle='dotted') + plt.title("Residuals Plot") + plt.xlabel("Predictions") + plt.ylabel(y_label[r_type]) + plt.show() + return fig +
64
8
62
2
4d7dd8391957694a41a7ddf1d7f0237d51bd3b9c
lib/dm-tags/tagging.rb
lib/dm-tags/tagging.rb
class Tagging include DataMapper::Resource property :id, Serial property :tag_id, Integer, :nullable => false property :taggable_id, Integer, :nullable => false property :taggable_type, String, :nullable => false property :tag_context, String, :nullable => false belongs_to :tag def taggable eval("#{taggable_type}.get!(#{taggable_id})") if taggable_type and taggable_id end end
class Tagging include DataMapper::Resource property :id, Serial property :tag_id, Integer, :nullable => false property :taggable_id, Integer, :nullable => false property :taggable_type, String, :nullable => false property :tag_context, String, :nullable => false belongs_to :tag def taggable if taggable_type and taggable_id Object.const_get(taggable_type).send(:get!, taggable_id) end end end
Remove eval and use send, as it's safer
[dm-tags] Remove eval and use send, as it's safer
Ruby
mit
datamapper/dm-tags,komagata/dm-tags
ruby
## Code Before: class Tagging include DataMapper::Resource property :id, Serial property :tag_id, Integer, :nullable => false property :taggable_id, Integer, :nullable => false property :taggable_type, String, :nullable => false property :tag_context, String, :nullable => false belongs_to :tag def taggable eval("#{taggable_type}.get!(#{taggable_id})") if taggable_type and taggable_id end end ## Instruction: [dm-tags] Remove eval and use send, as it's safer ## Code After: class Tagging include DataMapper::Resource property :id, Serial property :tag_id, Integer, :nullable => false property :taggable_id, Integer, :nullable => false property :taggable_type, String, :nullable => false property :tag_context, String, :nullable => false belongs_to :tag def taggable if taggable_type and taggable_id Object.const_get(taggable_type).send(:get!, taggable_id) end end end
class Tagging include DataMapper::Resource property :id, Serial property :tag_id, Integer, :nullable => false property :taggable_id, Integer, :nullable => false property :taggable_type, String, :nullable => false property :tag_context, String, :nullable => false belongs_to :tag def taggable - eval("#{taggable_type}.get!(#{taggable_id})") if taggable_type and taggable_id + if taggable_type and taggable_id + Object.const_get(taggable_type).send(:get!, taggable_id) + end end end
4
0.266667
3
1
f8e40bacc6e54ae4090da2c7b06671d83d52c9a4
src/ggrc/assets/stylesheets/modules/_log-list.scss
src/ggrc/assets/stylesheets/modules/_log-list.scss
/* * Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> * Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> * Created By: vladan@reciprocitylabs.com * Maintained By: vladan@reciprocitylabs.com */ .third-col { float: left; width: 30%; margin-right: 3.33% } .instruction { margin-bottom: 10px; font-weight: bold; }
/* * Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> * Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> * Created By: vladan@reciprocitylabs.com * Maintained By: vladan@reciprocitylabs.com */ .third-col { float: left; width: 30%; margin-right: 3.33% } .instruction { margin-bottom: 10px; font-weight: bold; }
Fix tab indentation in log list
Fix tab indentation in log list
SCSS
apache-2.0
selahssea/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,andrei-karalionak/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,jmakov/ggrc-core,jmakov/ggrc-core,kr41/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,AleksNeStu/ggrc-core,NejcZupec/ggrc-core,selahssea/ggrc-core,prasannav7/ggrc-core,prasannav7/ggrc-core
scss
## Code Before: /* * Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> * Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> * Created By: vladan@reciprocitylabs.com * Maintained By: vladan@reciprocitylabs.com */ .third-col { float: left; width: 30%; margin-right: 3.33% } .instruction { margin-bottom: 10px; font-weight: bold; } ## Instruction: Fix tab indentation in log list ## Code After: /* * Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> * Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> * Created By: vladan@reciprocitylabs.com * Maintained By: vladan@reciprocitylabs.com */ .third-col { float: left; width: 30%; margin-right: 3.33% } .instruction { margin-bottom: 10px; font-weight: bold; }
/* * Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file> * Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> * Created By: vladan@reciprocitylabs.com * Maintained By: vladan@reciprocitylabs.com */ .third-col { - float: left; ? ^ + float: left; ? ^^ - width: 30%; ? ^ + width: 30%; ? ^^ - margin-right: 3.33% ? ^ + margin-right: 3.33% ? ^^ } .instruction { - margin-bottom: 10px; ? ^ + margin-bottom: 10px; ? ^^ - font-weight: bold; ? ^ + font-weight: bold; ? ^^ }
10
0.588235
5
5
3bcb8f0843b7798bb02f7cf5652ec200293f0264
cookbooks/planet/templates/default/users-deleted.erb
cookbooks/planet/templates/default/users-deleted.erb
T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX) # use the same as for the users-agreed template export PGPASSFILE=/etc/replication/users-agreed.conf echo "# user IDs of deleted users. " > $T/users_deleted psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted if cmp -s "${T}/users_deleted" "/store/planet/users_deleted.txt"; then : # do nothing else cp $T/users_deleted /store/planet/users_deleted.txt fi rm -rf $T
T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX) # use the same as for the users-agreed template export PGPASSFILE=/etc/replication/users-agreed.conf echo "# user IDs of deleted users. " > $T/users_deleted psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted if cmp -s "${T}/users_deleted" "/store/planet/users_deleted/users_deleted.txt"; then : # do nothing else cp $T/users_deleted /store/planet/users_deleted/users_deleted.txt fi rm -rf $T
Move output down a level
Move output down a level
HTML+ERB
apache-2.0
Firefishy/chef,zerebubuth/openstreetmap-chef,tomhughes/openstreetmap-chef,openstreetmap/chef,tomhughes/openstreetmap-chef,Firefishy/chef,openstreetmap/chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,Firefishy/chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,Firefishy/chef,Firefishy/chef,openstreetmap/chef,zerebubuth/openstreetmap-chef,Firefishy/chef,tomhughes/openstreetmap-chef,openstreetmap/chef,openstreetmap/chef,Firefishy/chef,openstreetmap/chef,Firefishy/chef,openstreetmap/chef,tomhughes/openstreetmap-chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,tomhughes/openstreetmap-chef,zerebubuth/openstreetmap-chef,tomhughes/openstreetmap-chef
html+erb
## Code Before: T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX) # use the same as for the users-agreed template export PGPASSFILE=/etc/replication/users-agreed.conf echo "# user IDs of deleted users. " > $T/users_deleted psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted if cmp -s "${T}/users_deleted" "/store/planet/users_deleted.txt"; then : # do nothing else cp $T/users_deleted /store/planet/users_deleted.txt fi rm -rf $T ## Instruction: Move output down a level ## Code After: T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX) # use the same as for the users-agreed template export PGPASSFILE=/etc/replication/users-agreed.conf echo "# user IDs of deleted users. " > $T/users_deleted psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted if cmp -s "${T}/users_deleted" "/store/planet/users_deleted/users_deleted.txt"; then : # do nothing else cp $T/users_deleted /store/planet/users_deleted/users_deleted.txt fi rm -rf $T
T=$(mktemp -d -t -p /var/tmp users.XXXXXXXXXX) # use the same as for the users-agreed template export PGPASSFILE=/etc/replication/users-agreed.conf echo "# user IDs of deleted users. " > $T/users_deleted psql -h <%= node[:web][:readonly_database_host] %> -U planetdiff -t -c "select id from users where status='deleted' order by id asc" openstreetmap >> $T/users_deleted - if cmp -s "${T}/users_deleted" "/store/planet/users_deleted.txt"; then + if cmp -s "${T}/users_deleted" "/store/planet/users_deleted/users_deleted.txt"; then ? ++++++++++++++ : # do nothing else - cp $T/users_deleted /store/planet/users_deleted.txt + cp $T/users_deleted /store/planet/users_deleted/users_deleted.txt ? ++++++++++++++ fi rm -rf $T
4
0.25
2
2
f15c0506dbffbc9a560b0066b5c05c5428d91b10
Module.php
Module.php
<?php namespace ZnZend; class Module { public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } public function getConfig($env = null) { return include __DIR__ . '/config/module.config.php'; } }
<?php /** * ZnZend * * @author Zion Ng <zion@intzone.com> * @link [Source] http://github.com/zionsg/ZnZend */ namespace ZnZend; class Module { public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } public function getConfig($env = null) { return include __DIR__ . '/config/module.config.php'; } public function getServiceConfig() { return array( 'initializers' => array( function ($instance, $sm) { // Sets default db adapter if ($instance instanceof \Zend\Db\Adapter\AdapterAwareInterface) { $instance->setDbAdapter($sm->get('Zend\Db\Adapter\Adapter')); } } ), ); } }
Use 'initializer' key to set default db adapter.
Use 'initializer' key to set default db adapter.
PHP
bsd-2-clause
zionsg/ZnZend
php
## Code Before: <?php namespace ZnZend; class Module { public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } public function getConfig($env = null) { return include __DIR__ . '/config/module.config.php'; } } ## Instruction: Use 'initializer' key to set default db adapter. ## Code After: <?php /** * ZnZend * * @author Zion Ng <zion@intzone.com> * @link [Source] http://github.com/zionsg/ZnZend */ namespace ZnZend; class Module { public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } public function getConfig($env = null) { return include __DIR__ . '/config/module.config.php'; } public function getServiceConfig() { return array( 'initializers' => array( function ($instance, $sm) { // Sets default db adapter if ($instance instanceof \Zend\Db\Adapter\AdapterAwareInterface) { $instance->setDbAdapter($sm->get('Zend\Db\Adapter\Adapter')); } } ), ); } }
<?php + /** + * ZnZend + * + * @author Zion Ng <zion@intzone.com> + * @link [Source] http://github.com/zionsg/ZnZend + */ namespace ZnZend; class Module { public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } public function getConfig($env = null) { return include __DIR__ . '/config/module.config.php'; } + public function getServiceConfig() + { + return array( + 'initializers' => array( + function ($instance, $sm) { + // Sets default db adapter + if ($instance instanceof \Zend\Db\Adapter\AdapterAwareInterface) { + $instance->setDbAdapter($sm->get('Zend\Db\Adapter\Adapter')); + } + } + ), + ); + } }
19
0.863636
19
0
95a8262839bade2d19fb06d21dba0746580a3db4
src/templates/page-home.twig
src/templates/page-home.twig
{% extends "page.twig" %} {% block header_title %} {{ site.description }} {% endblock %} {% block content %} {% if page.content %} <article class="mb4"> <div class="mw6"> {{ page.content }} </div> </article> {% endif %} <section> <h1 class="mb4 f4 f3-m fw6 lh-title green"> Latest {{ posts[0].type.labels.name }} </h1> {% for post in posts %} {% include ["includes/teaser-" ~ post.post_type ~ ".twig", "includes/teaser.twig"] %} {% endfor %} </section> {% endblock %}
{% extends "page.twig" %} {% block header_title %} {{ site.description }} {% endblock %} {% block content %} {% if page.content %} <article class="mb4"> <div class="mw6"> {{ page.content }} </div> </article> {% endif %} <section> <h1 class="mb4 f4 f3-m fw6 lh-title green"> Latest {{ posts[0].type.labels.name }} </h1> {% for post in posts %} <div class="mw7"> {% include ["includes/teaser-" ~ post.post_type ~ ".twig", "includes/teaser.twig"] %} </div> {% endfor %} </section> {% endblock %}
Set max width for home page posts
Set max width for home page posts
Twig
isc
work-shop/medmates,work-shop/medmates,work-shop/medmates,work-shop/medmates
twig
## Code Before: {% extends "page.twig" %} {% block header_title %} {{ site.description }} {% endblock %} {% block content %} {% if page.content %} <article class="mb4"> <div class="mw6"> {{ page.content }} </div> </article> {% endif %} <section> <h1 class="mb4 f4 f3-m fw6 lh-title green"> Latest {{ posts[0].type.labels.name }} </h1> {% for post in posts %} {% include ["includes/teaser-" ~ post.post_type ~ ".twig", "includes/teaser.twig"] %} {% endfor %} </section> {% endblock %} ## Instruction: Set max width for home page posts ## Code After: {% extends "page.twig" %} {% block header_title %} {{ site.description }} {% endblock %} {% block content %} {% if page.content %} <article class="mb4"> <div class="mw6"> {{ page.content }} </div> </article> {% endif %} <section> <h1 class="mb4 f4 f3-m fw6 lh-title green"> Latest {{ posts[0].type.labels.name }} </h1> {% for post in posts %} <div class="mw7"> {% include ["includes/teaser-" ~ post.post_type ~ ".twig", "includes/teaser.twig"] %} </div> {% endfor %} </section> {% endblock %}
{% extends "page.twig" %} {% block header_title %} {{ site.description }} {% endblock %} {% block content %} {% if page.content %} <article class="mb4"> <div class="mw6"> {{ page.content }} </div> </article> {% endif %} <section> <h1 class="mb4 f4 f3-m fw6 lh-title green"> Latest {{ posts[0].type.labels.name }} </h1> {% for post in posts %} + <div class="mw7"> - {% include ["includes/teaser-" ~ post.post_type ~ ".twig", "includes/teaser.twig"] %} + {% include ["includes/teaser-" ~ post.post_type ~ ".twig", "includes/teaser.twig"] %} ? ++ + </div> {% endfor %} </section> {% endblock %}
4
0.16
3
1
aa74fa359665e705eef0f7ff7d1de7c1075f6b79
chrome/browser/ui/views/find_bar_host_aura.cc
chrome/browser/ui/views/find_bar_host_aura.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/find_bar_host.h" #include "base/logging.h" #include "ui/base/events/event.h" void FindBarHost::AudibleAlert() { #if defined(OS_WIN) MessageBeep(MB_OK); #else // TODO(mukai): NOTIMPLEMENTED(); #endif } bool FindBarHost::ShouldForwardKeyEventToWebpageNative( const ui::KeyEvent& key_event) { return true; }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/find_bar_host.h" #include "base/logging.h" #include "ui/base/events/event.h" void FindBarHost::AudibleAlert() { #if defined(OS_WIN) MessageBeep(MB_OK); #endif } bool FindBarHost::ShouldForwardKeyEventToWebpageNative( const ui::KeyEvent& key_event) { return true; }
Remove NOTIMPLEMENTED() in FindBarHost::AudibleAlert() for ChromeOS.
Remove NOTIMPLEMENTED() in FindBarHost::AudibleAlert() for ChromeOS. BUG=None TEST=None R=jennyz,jamescook TBR=sky Review URL: https://chromiumcodereview.appspot.com/23819045 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@222422 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,anirudhSK/chromium,dushu1203/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,ChromiumWebApps/chromium,ondra-novak/chromium.src,Just-D/chromium-1,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,bright-sparks/chromium-spacewalk,M4sse/chromium.src,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,dednal/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,Jonekee/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,dushu1203/chromium.src,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,littlstar/chromium.src,dednal/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,Just-D/chromium-1,jaruba/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,patrickm/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,M4sse/chromium.src,Just-D/chromium-1,dednal/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,ltilve/chromium,markYoungH/chromium.src,jaruba/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,Chilledheart/chromium,patrickm/chromium.src,mogoweb/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,anirudhSK/chromium,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,littlstar/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,ondra-novak/chromium.src,jaruba/chromium.src,patrickm/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk
c++
## Code Before: // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/find_bar_host.h" #include "base/logging.h" #include "ui/base/events/event.h" void FindBarHost::AudibleAlert() { #if defined(OS_WIN) MessageBeep(MB_OK); #else // TODO(mukai): NOTIMPLEMENTED(); #endif } bool FindBarHost::ShouldForwardKeyEventToWebpageNative( const ui::KeyEvent& key_event) { return true; } ## Instruction: Remove NOTIMPLEMENTED() in FindBarHost::AudibleAlert() for ChromeOS. BUG=None TEST=None R=jennyz,jamescook TBR=sky Review URL: https://chromiumcodereview.appspot.com/23819045 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@222422 0039d316-1c4b-4281-b951-d872f2087c98 ## Code After: // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/find_bar_host.h" #include "base/logging.h" #include "ui/base/events/event.h" void FindBarHost::AudibleAlert() { #if defined(OS_WIN) MessageBeep(MB_OK); #endif } bool FindBarHost::ShouldForwardKeyEventToWebpageNative( const ui::KeyEvent& key_event) { return true; }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/find_bar_host.h" #include "base/logging.h" #include "ui/base/events/event.h" void FindBarHost::AudibleAlert() { #if defined(OS_WIN) MessageBeep(MB_OK); - #else - // TODO(mukai): - NOTIMPLEMENTED(); #endif } bool FindBarHost::ShouldForwardKeyEventToWebpageNative( const ui::KeyEvent& key_event) { return true; }
3
0.136364
0
3
9abec4880679864e6ed8c5b7657ecf51c7a423d9
server/services/twilioService.coffee
server/services/twilioService.coffee
twilio = require("twilio") bot = require("../bot") config = require("../config") TWILIO_PHONE = config.twilio.phone TWILIO_ACCOUNT_SID = config.twilio.accountSid TWILIO_AUTH_TOKEN = config.twilio.authToken if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN) throw new Error "Please configure Twilio" client = twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) module.exports = receive: (req, res) -> # console.log(req, res); # Respond empty to SMS. # Empty responses are not sent as SMS to sender. twiml = new twilio.TwimlResponse() res.send(twiml) from = req.body.From message = req.body.Body bot.generateResponse conversation: from message: message meta: req.body , (error, result) -> # console.log(error, result); if error body = error.message else body = result.response.plain client.sendMessage({ to: from from: TWILIO_PHONE body: body }, (err, responseData) -> # console.log(err, responseData) )
twilio = require("twilio") bot = require("../bot") config = require("../config") TWILIO_PHONE = config.twilio.phone TWILIO_ACCOUNT_SID = config.twilio.accountSid TWILIO_AUTH_TOKEN = config.twilio.authToken if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN) throw new Error "Please configure Twilio" client = twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) module.exports = receive: (req, res) -> # console.log(req, res); # Respond empty to SMS. # Empty responses are not sent as SMS to sender. twiml = new twilio.TwimlResponse() res.send(twiml) from = req.body.From message = req.body.Body bot.generateResponse conversation: from message: message meta: req.body , (error, result) -> # console.log(error, result); if error body = "An error occurred: #{error.message}" else body = result.response.plain client.sendMessage({ to: from from: TWILIO_PHONE body: body }, (err, responseData) -> # console.log(err, responseData) )
Add prefix to error messages
Add prefix to error messages "An error occurred: #{ERROR}"
CoffeeScript
mit
Glavin001/TorrentAutomator,Glavin001/TorrentAutomator,Glavin001/TorrentAutomator
coffeescript
## Code Before: twilio = require("twilio") bot = require("../bot") config = require("../config") TWILIO_PHONE = config.twilio.phone TWILIO_ACCOUNT_SID = config.twilio.accountSid TWILIO_AUTH_TOKEN = config.twilio.authToken if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN) throw new Error "Please configure Twilio" client = twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) module.exports = receive: (req, res) -> # console.log(req, res); # Respond empty to SMS. # Empty responses are not sent as SMS to sender. twiml = new twilio.TwimlResponse() res.send(twiml) from = req.body.From message = req.body.Body bot.generateResponse conversation: from message: message meta: req.body , (error, result) -> # console.log(error, result); if error body = error.message else body = result.response.plain client.sendMessage({ to: from from: TWILIO_PHONE body: body }, (err, responseData) -> # console.log(err, responseData) ) ## Instruction: Add prefix to error messages "An error occurred: #{ERROR}" ## Code After: twilio = require("twilio") bot = require("../bot") config = require("../config") TWILIO_PHONE = config.twilio.phone TWILIO_ACCOUNT_SID = config.twilio.accountSid TWILIO_AUTH_TOKEN = config.twilio.authToken if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN) throw new Error "Please configure Twilio" client = twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) module.exports = receive: (req, res) -> # console.log(req, res); # Respond empty to SMS. # Empty responses are not sent as SMS to sender. twiml = new twilio.TwimlResponse() res.send(twiml) from = req.body.From message = req.body.Body bot.generateResponse conversation: from message: message meta: req.body , (error, result) -> # console.log(error, result); if error body = "An error occurred: #{error.message}" else body = result.response.plain client.sendMessage({ to: from from: TWILIO_PHONE body: body }, (err, responseData) -> # console.log(err, responseData) )
twilio = require("twilio") bot = require("../bot") config = require("../config") TWILIO_PHONE = config.twilio.phone TWILIO_ACCOUNT_SID = config.twilio.accountSid TWILIO_AUTH_TOKEN = config.twilio.authToken if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN) throw new Error "Please configure Twilio" client = twilio(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) module.exports = receive: (req, res) -> # console.log(req, res); # Respond empty to SMS. # Empty responses are not sent as SMS to sender. twiml = new twilio.TwimlResponse() res.send(twiml) from = req.body.From message = req.body.Body bot.generateResponse conversation: from message: message meta: req.body , (error, result) -> # console.log(error, result); if error - body = error.message + body = "An error occurred: #{error.message}" else body = result.response.plain client.sendMessage({ to: from from: TWILIO_PHONE body: body }, (err, responseData) -> # console.log(err, responseData) )
2
0.05
1
1
97f89c1bad363111a77e432b24095f2df05638e4
lib/quartz/validations.rb
lib/quartz/validations.rb
module Quartz::Validations def self.check_for_go go_exists = ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory| File.exist?(File.join(directory, 'go')) end raise 'Go not installed' unless go_exists end def self.check_go_quartz_version current_pulse = File.read(File.join(File.dirname(__FILE__), '../../go/quartz/quartz.go')) installed_pulse = File.read(File.join(ENV['GOPATH'], 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) if current_pulse != installed_pulse STDERR.write <<-EOS Warning: the version of Quartz in $GOPATH does not match the version packaged with the gem. Please update the Go Quartz package. EOS end end end
module Quartz::Validations def self.check_for_go go_exists = ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory| File.exist?(File.join(directory, 'go')) end raise 'Go not installed.' unless go_exists end def self.check_go_quartz_version current_pulse = File.read(File.join(File.dirname(__FILE__), '../../go/quartz/quartz.go')) installed_pulse_dir = ENV['GOPATH'].split(File::PATH_SEPARATOR).select do |directory| File.exist?(File.join(directory, 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) end[0] unless installed_pulse_dir raise "GOPATH not configured." end installed_pulse = File.read(File.join(installed_pulse_dir, 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) if current_pulse != installed_pulse STDERR.write <<-EOS Warning: the version of Quartz in $GOPATH does not match the version packaged with the gem. Please update the Go Quartz package. EOS end end end
Support multiple directories in GOPATH
Support multiple directories in GOPATH
Ruby
mit
DavidHuie/quartz,DavidHuie/quartz
ruby
## Code Before: module Quartz::Validations def self.check_for_go go_exists = ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory| File.exist?(File.join(directory, 'go')) end raise 'Go not installed' unless go_exists end def self.check_go_quartz_version current_pulse = File.read(File.join(File.dirname(__FILE__), '../../go/quartz/quartz.go')) installed_pulse = File.read(File.join(ENV['GOPATH'], 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) if current_pulse != installed_pulse STDERR.write <<-EOS Warning: the version of Quartz in $GOPATH does not match the version packaged with the gem. Please update the Go Quartz package. EOS end end end ## Instruction: Support multiple directories in GOPATH ## Code After: module Quartz::Validations def self.check_for_go go_exists = ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory| File.exist?(File.join(directory, 'go')) end raise 'Go not installed.' unless go_exists end def self.check_go_quartz_version current_pulse = File.read(File.join(File.dirname(__FILE__), '../../go/quartz/quartz.go')) installed_pulse_dir = ENV['GOPATH'].split(File::PATH_SEPARATOR).select do |directory| File.exist?(File.join(directory, 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) end[0] unless installed_pulse_dir raise "GOPATH not configured." end installed_pulse = File.read(File.join(installed_pulse_dir, 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) if current_pulse != installed_pulse STDERR.write <<-EOS Warning: the version of Quartz in $GOPATH does not match the version packaged with the gem. Please update the Go Quartz package. EOS end end end
module Quartz::Validations def self.check_for_go go_exists = ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory| File.exist?(File.join(directory, 'go')) end - raise 'Go not installed' unless go_exists + raise 'Go not installed.' unless go_exists ? + end def self.check_go_quartz_version current_pulse = File.read(File.join(File.dirname(__FILE__), '../../go/quartz/quartz.go')) - installed_pulse = File.read(File.join(ENV['GOPATH'], + + installed_pulse_dir = ENV['GOPATH'].split(File::PATH_SEPARATOR).select do |directory| + File.exist?(File.join(directory, 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) + end[0] + + unless installed_pulse_dir + raise "GOPATH not configured." + end + + installed_pulse = File.read(File.join(installed_pulse_dir, 'src/github.com/DavidHuie/quartz/go/quartz/quartz.go')) if current_pulse != installed_pulse STDERR.write <<-EOS Warning: the version of Quartz in $GOPATH does not match the version packaged with the gem. Please update the Go Quartz package. EOS end end end
13
0.52
11
2
b94663cd0f2b60d05ddae6d3ab277f5fe4c5f496
BlockSimulator-MT2/simulatorCore/blinkyBlocksHelp.txt
BlockSimulator-MT2/simulatorCore/blinkyBlocksHelp.txt
Interface Help Keyboard: [z]: center camera focus on the selected block [w]/[W]: toggle full screen / window mode [r]: start in realtime mode [R]: start in fastest mode [h]: show/hide help window [q]/[Q]/[ESC]: quit Mouse: <MLB>: change the point of view <MRB>: change the focus point [Ctrl]+<MLB> : select a block [Ctrl]+<MRB> : context menu {Add block} add a block connected to the selected face {Delete block} delete the selected block {Stop} stop the process of the selected block {Save} save the current configuration in the config file. {Cancel} close the menu
Interface Help Keyboard: [z]: center camera focus on the selected block [w]/[W]: toggle full screen / window mode [r]: start in realtime mode [R]: start in fastest mode [h]: show/hide help window [q]/[Q]/[ESC]: quit Mouse: <MLB>: change the point of view, tap on a selected block <MRB>: change the focus point [Ctrl]+<MLB> : select a block [Ctrl]+<MRB> : context menu {Add block} add a block connected to the selected face {Delete block} delete the selected block {Stop} stop the process of the selected block {Save} save the current configuration in the config file. {Cancel} close the menu
Add tap command in Blinky Blocks help
Add tap command in Blinky Blocks help
Text
apache-2.0
claytronics/visiblesim,claytronics/visiblesim,claytronics/visiblesim,claytronics/visiblesim,claytronics/visiblesim
text
## Code Before: Interface Help Keyboard: [z]: center camera focus on the selected block [w]/[W]: toggle full screen / window mode [r]: start in realtime mode [R]: start in fastest mode [h]: show/hide help window [q]/[Q]/[ESC]: quit Mouse: <MLB>: change the point of view <MRB>: change the focus point [Ctrl]+<MLB> : select a block [Ctrl]+<MRB> : context menu {Add block} add a block connected to the selected face {Delete block} delete the selected block {Stop} stop the process of the selected block {Save} save the current configuration in the config file. {Cancel} close the menu ## Instruction: Add tap command in Blinky Blocks help ## Code After: Interface Help Keyboard: [z]: center camera focus on the selected block [w]/[W]: toggle full screen / window mode [r]: start in realtime mode [R]: start in fastest mode [h]: show/hide help window [q]/[Q]/[ESC]: quit Mouse: <MLB>: change the point of view, tap on a selected block <MRB>: change the focus point [Ctrl]+<MLB> : select a block [Ctrl]+<MRB> : context menu {Add block} add a block connected to the selected face {Delete block} delete the selected block {Stop} stop the process of the selected block {Save} save the current configuration in the config file. {Cancel} close the menu
Interface Help Keyboard: [z]: center camera focus on the selected block [w]/[W]: toggle full screen / window mode [r]: start in realtime mode [R]: start in fastest mode [h]: show/hide help window [q]/[Q]/[ESC]: quit Mouse: - <MLB>: change the point of view + <MLB>: change the point of view, tap on a selected block ? +++++++++++++++++++++++++ <MRB>: change the focus point [Ctrl]+<MLB> : select a block [Ctrl]+<MRB> : context menu {Add block} add a block connected to the selected face {Delete block} delete the selected block {Stop} stop the process of the selected block {Save} save the current configuration in the config file. {Cancel} close the menu
2
0.1
1
1
887db8cb3b05fa725b9e44e635c4dd3f92867646
lib/snippet-history-provider.js
lib/snippet-history-provider.js
/** @babel */ function wrap (manager, callbacks) { let klass = new SnippetHistoryProvider(manager); return new Proxy(manager, { get (target, name) { if (name in callbacks) { callbacks[name](); } return name in klass ? klass[name] : target[name] } }); } class SnippetHistoryProvider { constructor (manager) { this.manager = manager; } undo (...args) { return this.manager.undo(...args); } redo (...args) { return this.manager.redo(...args); } } export default wrap;
function wrap (manager, callbacks) { let klass = new SnippetHistoryProvider(manager) return new Proxy(manager, { get (target, name) { if (name in callbacks) { callbacks[name]() } return name in klass ? klass[name] : target[name] } }) } class SnippetHistoryProvider { constructor (manager) { this.manager = manager } undo (...args) { return this.manager.undo(...args) } redo (...args) { return this.manager.redo(...args) } } module.exports = wrap
Remove Babel dependency and convert to standard code style
Remove Babel dependency and convert to standard code style
JavaScript
mit
atom/snippets
javascript
## Code Before: /** @babel */ function wrap (manager, callbacks) { let klass = new SnippetHistoryProvider(manager); return new Proxy(manager, { get (target, name) { if (name in callbacks) { callbacks[name](); } return name in klass ? klass[name] : target[name] } }); } class SnippetHistoryProvider { constructor (manager) { this.manager = manager; } undo (...args) { return this.manager.undo(...args); } redo (...args) { return this.manager.redo(...args); } } export default wrap; ## Instruction: Remove Babel dependency and convert to standard code style ## Code After: function wrap (manager, callbacks) { let klass = new SnippetHistoryProvider(manager) return new Proxy(manager, { get (target, name) { if (name in callbacks) { callbacks[name]() } return name in klass ? klass[name] : target[name] } }) } class SnippetHistoryProvider { constructor (manager) { this.manager = manager } undo (...args) { return this.manager.undo(...args) } redo (...args) { return this.manager.redo(...args) } } module.exports = wrap
- /** @babel */ - function wrap (manager, callbacks) { - let klass = new SnippetHistoryProvider(manager); ? - + let klass = new SnippetHistoryProvider(manager) return new Proxy(manager, { get (target, name) { if (name in callbacks) { - callbacks[name](); ? - + callbacks[name]() } return name in klass ? klass[name] : target[name] } - }); ? - + }) } class SnippetHistoryProvider { constructor (manager) { - this.manager = manager; ? - + this.manager = manager } undo (...args) { - return this.manager.undo(...args); ? - + return this.manager.undo(...args) } redo (...args) { - return this.manager.redo(...args); ? - + return this.manager.redo(...args) } } - export default wrap; + module.exports = wrap
16
0.551724
7
9
37c0a82e80071cd5438debb56c3f9a422bd34db0
README.md
README.md
[![GoDoc](https://godoc.org/github.com/MasterOfBinary/redistypes?status.svg)](https://godoc.org/github.com/MasterOfBinary/redistypes) Redis data types in Go.
[![Build Status](https://travis-ci.org/MasterOfBinary/redistypes.svg?branch=master)](https://travis-ci.org/MasterOfBinary/redistypes) [![GoDoc](https://godoc.org/github.com/MasterOfBinary/redistypes?status.svg)](https://godoc.org/github.com/MasterOfBinary/redistypes) Redis data types in Go.
Add build status to readme
Add build status to readme
Markdown
mit
MasterOfBinary/redistypes
markdown
## Code Before: [![GoDoc](https://godoc.org/github.com/MasterOfBinary/redistypes?status.svg)](https://godoc.org/github.com/MasterOfBinary/redistypes) Redis data types in Go. ## Instruction: Add build status to readme ## Code After: [![Build Status](https://travis-ci.org/MasterOfBinary/redistypes.svg?branch=master)](https://travis-ci.org/MasterOfBinary/redistypes) [![GoDoc](https://godoc.org/github.com/MasterOfBinary/redistypes?status.svg)](https://godoc.org/github.com/MasterOfBinary/redistypes) Redis data types in Go.
+ [![Build Status](https://travis-ci.org/MasterOfBinary/redistypes.svg?branch=master)](https://travis-ci.org/MasterOfBinary/redistypes) [![GoDoc](https://godoc.org/github.com/MasterOfBinary/redistypes?status.svg)](https://godoc.org/github.com/MasterOfBinary/redistypes) Redis data types in Go.
1
0.25
1
0
4bc06d09a5eafd07076663620ec2bedf164167a9
package.json
package.json
{ "name": "substance", "description": "Substance is a web-based document authoring and publishing engine developed in the open and available to everyone.", "version": "0.4.0", "homepage": "http://substance.io/", "repository": { "type": "git", "url": "https://github.com/michael/substance" }, "dependencies": { "underscore": "1.2.3", "async": "0.1.15", "cookie-sessions": "0.0.2", "nodemailer": "0.2.4", "express": "2.5.2", "now": "0.7.6" } }
{ "name": "substance", "description": "Substance is a web-based document authoring and publishing engine developed in the open and available to everyone.", "version": "0.4.0", "homepage": "http://substance.io/", "repository": { "type": "git", "url": "https://github.com/michael/substance" }, "dependencies": { "underscore": "1.2.3", "async": "0.1.15", "cookie-sessions": "0.0.2", "nodemailer": "0.2.4", "express": "2.5.2", "less": "1.1.6", "now": "0.7.6" }, "devDependencies": { "coffee-script": "1.2.0" } }
Add less and coffee-script to the dependencies
Add less and coffee-script to the dependencies
JSON
bsd-2-clause
substance/legacy-composer,substance/legacy-composer
json
## Code Before: { "name": "substance", "description": "Substance is a web-based document authoring and publishing engine developed in the open and available to everyone.", "version": "0.4.0", "homepage": "http://substance.io/", "repository": { "type": "git", "url": "https://github.com/michael/substance" }, "dependencies": { "underscore": "1.2.3", "async": "0.1.15", "cookie-sessions": "0.0.2", "nodemailer": "0.2.4", "express": "2.5.2", "now": "0.7.6" } } ## Instruction: Add less and coffee-script to the dependencies ## Code After: { "name": "substance", "description": "Substance is a web-based document authoring and publishing engine developed in the open and available to everyone.", "version": "0.4.0", "homepage": "http://substance.io/", "repository": { "type": "git", "url": "https://github.com/michael/substance" }, "dependencies": { "underscore": "1.2.3", "async": "0.1.15", "cookie-sessions": "0.0.2", "nodemailer": "0.2.4", "express": "2.5.2", "less": "1.1.6", "now": "0.7.6" }, "devDependencies": { "coffee-script": "1.2.0" } }
{ "name": "substance", "description": "Substance is a web-based document authoring and publishing engine developed in the open and available to everyone.", "version": "0.4.0", "homepage": "http://substance.io/", "repository": { "type": "git", "url": "https://github.com/michael/substance" }, "dependencies": { "underscore": "1.2.3", "async": "0.1.15", "cookie-sessions": "0.0.2", "nodemailer": "0.2.4", "express": "2.5.2", + "less": "1.1.6", "now": "0.7.6" + }, + "devDependencies": { + "coffee-script": "1.2.0" } }
4
0.222222
4
0
b8ab29d9b87e5b2aa09b190c0b2d6e253f96e99e
web/views/user_view.ex
web/views/user_view.ex
defmodule Goncord.UserView do use Goncord.Web, :view def render("index.json", %{users: users}) do %{data: render_many(users, Goncord.UserView, "user.json")} end def render("show.json", %{user: user}) do %{data: render_one(user, Goncord.UserView, "user.json")} end def render("user.json", %{user: user}) do %{login: user.login, email: user.email, first_name: user.first_name, last_name: user.last_name, second_name: user.second_name, birthday: user.birthday} end end
defmodule Goncord.UserView do use Goncord.Web, :view def render("index.json", %{users: users}) do render_many(users, Goncord.UserView, "user.json") end def render("show.json", %{user: user}) do render_one(user, Goncord.UserView, "user.json") end def render("user.json", %{user: user}) do %{login: user.login, email: user.email, first_name: user.first_name, last_name: user.last_name, second_name: user.second_name, birthday: user.birthday} end end
Delete data key from user render.
Delete data key from user render.
Elixir
mit
herald-it/goncord.ex
elixir
## Code Before: defmodule Goncord.UserView do use Goncord.Web, :view def render("index.json", %{users: users}) do %{data: render_many(users, Goncord.UserView, "user.json")} end def render("show.json", %{user: user}) do %{data: render_one(user, Goncord.UserView, "user.json")} end def render("user.json", %{user: user}) do %{login: user.login, email: user.email, first_name: user.first_name, last_name: user.last_name, second_name: user.second_name, birthday: user.birthday} end end ## Instruction: Delete data key from user render. ## Code After: defmodule Goncord.UserView do use Goncord.Web, :view def render("index.json", %{users: users}) do render_many(users, Goncord.UserView, "user.json") end def render("show.json", %{user: user}) do render_one(user, Goncord.UserView, "user.json") end def render("user.json", %{user: user}) do %{login: user.login, email: user.email, first_name: user.first_name, last_name: user.last_name, second_name: user.second_name, birthday: user.birthday} end end
defmodule Goncord.UserView do use Goncord.Web, :view def render("index.json", %{users: users}) do - %{data: render_many(users, Goncord.UserView, "user.json")} ? -------- - + render_many(users, Goncord.UserView, "user.json") end def render("show.json", %{user: user}) do - %{data: render_one(user, Goncord.UserView, "user.json")} ? -------- - + render_one(user, Goncord.UserView, "user.json") end def render("user.json", %{user: user}) do %{login: user.login, email: user.email, first_name: user.first_name, last_name: user.last_name, second_name: user.second_name, birthday: user.birthday} end end
4
0.2
2
2
bb15f4e90ca07672a33a65ad0704a79d539c4e4d
dashboard/test/ui/step_definitions/eyes_steps.rb
dashboard/test/ui/step_definitions/eyes_steps.rb
require 'eyes_selenium' When(/^I open my eyes to test "([^"]*)"$/) do |test_name| ensure_eyes_available @original_browser = @browser @browser = @eyes.open(app_name: 'Code.org', test_name: test_name, driver: @browser) end And(/^I close my eyes$/) do @browser = @original_browser @eyes.close end And(/^I see no difference for "([^"]*)"$/) do |identifier| @eyes.check_window(identifier) end def ensure_eyes_available return if @eyes @eyes = Applitools::Eyes.new @eyes.api_key = CDO.applitools_eyes_api_key end
require 'eyes_selenium' When(/^I open my eyes to test "([^"]*)"$/) do |test_name| ensure_eyes_available @original_browser = @browser @browser = @eyes.open(app_name: 'Code.org', test_name: test_name, driver: @browser) end And(/^I close my eyes$/) do @browser = @original_browser @eyes.close end And(/^I see no difference for "([^"]*)"$/) do |identifier| @eyes.check_window(identifier) end def ensure_eyes_available return if @eyes @eyes = Applitools::Eyes.new @eyes.api_key = CDO.applitools_eyes_api_key # Force eyes to use a consistent host OS identifier for now # BrowserStack was reporting 6.0 and 6.1, causing different baselines @eyes.host_os = 'Windows 6x' end
Fix "Windows 6.0" vs "Windows 6.1" alternating baselines in eyes tests
Fix "Windows 6.0" vs "Windows 6.1" alternating baselines in eyes tests
Ruby
apache-2.0
bakerfranke/code-dot-org,cloud3edu/code-dot-org-old,rvarshney/code-dot-org,pickettd/code-dot-org,pickettd/code-dot-org,pickettd/code-dot-org,cloud3edu/code-dot-org-old,cloud3edu/code-dot-org-old,bakerfranke/code-dot-org,bakerfranke/code-dot-org,ty-po/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,bakerfranke/code-dot-org,dillia23/code-dot-org,cloud3edu/code-dot-org-old,pickettd/code-dot-org,ty-po/code-dot-org,ty-po/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,bakerfranke/code-dot-org,ty-po/code-dot-org,dillia23/code-dot-org,rvarshney/code-dot-org,rvarshney/code-dot-org,rvarshney/code-dot-org,rvarshney/code-dot-org,bakerfranke/code-dot-org,rvarshney/code-dot-org,bakerfranke/code-dot-org,ty-po/code-dot-org,dillia23/code-dot-org,dillia23/code-dot-org,cloud3edu/code-dot-org-old,rvarshney/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,ty-po/code-dot-org,ty-po/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,ty-po/code-dot-org,rvarshney/code-dot-org,cloud3edu/code-dot-org-old,cloud3edu/code-dot-org-old
ruby
## Code Before: require 'eyes_selenium' When(/^I open my eyes to test "([^"]*)"$/) do |test_name| ensure_eyes_available @original_browser = @browser @browser = @eyes.open(app_name: 'Code.org', test_name: test_name, driver: @browser) end And(/^I close my eyes$/) do @browser = @original_browser @eyes.close end And(/^I see no difference for "([^"]*)"$/) do |identifier| @eyes.check_window(identifier) end def ensure_eyes_available return if @eyes @eyes = Applitools::Eyes.new @eyes.api_key = CDO.applitools_eyes_api_key end ## Instruction: Fix "Windows 6.0" vs "Windows 6.1" alternating baselines in eyes tests ## Code After: require 'eyes_selenium' When(/^I open my eyes to test "([^"]*)"$/) do |test_name| ensure_eyes_available @original_browser = @browser @browser = @eyes.open(app_name: 'Code.org', test_name: test_name, driver: @browser) end And(/^I close my eyes$/) do @browser = @original_browser @eyes.close end And(/^I see no difference for "([^"]*)"$/) do |identifier| @eyes.check_window(identifier) end def ensure_eyes_available return if @eyes @eyes = Applitools::Eyes.new @eyes.api_key = CDO.applitools_eyes_api_key # Force eyes to use a consistent host OS identifier for now # BrowserStack was reporting 6.0 and 6.1, causing different baselines @eyes.host_os = 'Windows 6x' end
require 'eyes_selenium' When(/^I open my eyes to test "([^"]*)"$/) do |test_name| ensure_eyes_available @original_browser = @browser @browser = @eyes.open(app_name: 'Code.org', test_name: test_name, driver: @browser) end And(/^I close my eyes$/) do @browser = @original_browser @eyes.close end And(/^I see no difference for "([^"]*)"$/) do |identifier| @eyes.check_window(identifier) end def ensure_eyes_available return if @eyes @eyes = Applitools::Eyes.new @eyes.api_key = CDO.applitools_eyes_api_key + # Force eyes to use a consistent host OS identifier for now + # BrowserStack was reporting 6.0 and 6.1, causing different baselines + @eyes.host_os = 'Windows 6x' end
3
0.136364
3
0
05aacc127ad36bb71881401d5b4eb3306b59658a
_posts/2018/2018-01-18-Stop-Chrome-From-Reloading-Tabs.md
_posts/2018/2018-01-18-Stop-Chrome-From-Reloading-Tabs.md
--- layout: post title: Stop Chrome from Reloading Tabs disqus_identifier: 1 comments: true categories: chrome tips GitHub PR --- Sometimes when I'm working on a long pull request in GitHub and switch back to the PR tab after a while of looking at other pages the Pull Request page will automcaticall reload itself. Most of the time this is fine, but sometimes I wind up losing a lot of state (scroll position, which files were loaded manually, which files had been collapsed, etc). It turns out that Chrome will garbage collect tabs that are taking up a lot of memory that you may not be using. Most of the time this is a good thing. Sometimes it's not. Chrome allows you to disable this behavior by going to chrome://flags/#automatic-tab-discarding. Simply set the drop down to 'Disabled'. I typically don't want to keep this setting once I'm done with my PR, so I'll then jump into slack and ask it to `/remind me to fix chrome://flags/#automatic-tab-discarding in the morning`
--- layout: post title: Stop Chrome from Reloading Tabs disqus_identifier: 1 comments: true categories: chrome tips GitHub PR --- Sometimes when I'm working on a long pull request in GitHub and switch back to the PR tab after a while of looking at other pages the Pull Request page will automcaticall reload itself. Most of the time this is fine, but sometimes I wind up losing a lot of state (scroll position, which files were loaded manually, which files had been collapsed, etc). It turns out that Chrome will garbage collect tabs that are taking up a lot of memory that you may not be using. Chrome allows you to disable this behavior by going to [chrome://flags/#automatic-tab-discarding](chrome://flags/#automatic-tab-discarding). Simply set the drop down to 'Disabled'. I typically don't want to keep this setting once I'm done with my PR, so I'll then jump into slack and ask it to `/remind me to fix chrome://flags/#automatic-tab-discarding in the morning`
Fix wording. Make link a link.
Fix wording. Make link a link.
Markdown
mit
jquintus/jquintus.github.io,jquintus/jquintus.github.io,jquintus/jquintus.github.io,jquintus/jquintus.github.io,jquintus/jquintus.github.io,jquintus/jquintus.github.io
markdown
## Code Before: --- layout: post title: Stop Chrome from Reloading Tabs disqus_identifier: 1 comments: true categories: chrome tips GitHub PR --- Sometimes when I'm working on a long pull request in GitHub and switch back to the PR tab after a while of looking at other pages the Pull Request page will automcaticall reload itself. Most of the time this is fine, but sometimes I wind up losing a lot of state (scroll position, which files were loaded manually, which files had been collapsed, etc). It turns out that Chrome will garbage collect tabs that are taking up a lot of memory that you may not be using. Most of the time this is a good thing. Sometimes it's not. Chrome allows you to disable this behavior by going to chrome://flags/#automatic-tab-discarding. Simply set the drop down to 'Disabled'. I typically don't want to keep this setting once I'm done with my PR, so I'll then jump into slack and ask it to `/remind me to fix chrome://flags/#automatic-tab-discarding in the morning` ## Instruction: Fix wording. Make link a link. ## Code After: --- layout: post title: Stop Chrome from Reloading Tabs disqus_identifier: 1 comments: true categories: chrome tips GitHub PR --- Sometimes when I'm working on a long pull request in GitHub and switch back to the PR tab after a while of looking at other pages the Pull Request page will automcaticall reload itself. Most of the time this is fine, but sometimes I wind up losing a lot of state (scroll position, which files were loaded manually, which files had been collapsed, etc). It turns out that Chrome will garbage collect tabs that are taking up a lot of memory that you may not be using. Chrome allows you to disable this behavior by going to [chrome://flags/#automatic-tab-discarding](chrome://flags/#automatic-tab-discarding). Simply set the drop down to 'Disabled'. I typically don't want to keep this setting once I'm done with my PR, so I'll then jump into slack and ask it to `/remind me to fix chrome://flags/#automatic-tab-discarding in the morning`
--- layout: post title: Stop Chrome from Reloading Tabs disqus_identifier: 1 comments: true categories: chrome tips GitHub PR --- - Sometimes when I'm working on a long pull request in GitHub and switch back to the PR tab after a while of looking at other pages the Pull Request page will automcaticall reload itself. Most of the time this is fine, but sometimes I wind up losing a lot of state (scroll position, which files were loaded manually, which files had been collapsed, etc). It turns out that Chrome will garbage collect tabs that are taking up a lot of memory that you may not be using. Most of the time this is a good thing. Sometimes it's not. Chrome allows you to disable this behavior by going to chrome://flags/#automatic-tab-discarding. Simply set the drop down to 'Disabled'. + Sometimes when I'm working on a long pull request in GitHub and switch back to + the PR tab after a while of looking at other pages the Pull Request page will + automcaticall reload itself. Most of the time this is fine, but sometimes I + wind up losing a lot of state (scroll position, which files were loaded + manually, which files had been collapsed, etc). It turns out that Chrome will + garbage collect tabs that are taking up a lot of memory that you may not be + using. Chrome allows you to disable this behavior by going to + [chrome://flags/#automatic-tab-discarding](chrome://flags/#automatic-tab-discarding). + Simply set the drop down to 'Disabled'. - I typically don't want to keep this setting once I'm done with my PR, so I'll then jump into slack and ask it to `/remind me to fix chrome://flags/#automatic-tab-discarding in the morning` + I typically don't want to keep this setting once I'm done with my PR, so I'll + then jump into slack and ask it to `/remind me to fix + chrome://flags/#automatic-tab-discarding in the morning`
14
0.933333
12
2
785550f6c86f7e7e299f976894c7a37084ca6a8e
appveyor.yml
appveyor.yml
platform: - x64 environment: global: MSYS2_BASEVER: 20150512 matrix: - MSYS2_ARCH: x86_64 install: - ps: | $url = "http://sourceforge.net/projects/mingw-w64/files/" $url += "Toolchains%20targetting%20Win64/Personal%20Builds/" $url += "mingw-builds/4.9.2/threads-win32/seh/" $url += "x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z/download" Invoke-WebRequest -UserAgent wget -Uri $url -OutFile x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z &7z x -oC:\ x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z > $null - set PATH=C:\mingw64\bin;%PATH% - gcc --version - ps: Start-FileDownload 'http://static.rust-lang.org/dist/rust-1.0.0-x86_64-pc-windows-gnu.exe' - rust-1.0.0-x86_64-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - rustc --version - cargo --version build: false test_script: - cargo test --verbose - cargo build --release - target\release\hs.exe -v
platform: - x64 install: - ps: Start-FileDownload 'http://static.rust-lang.org/dist/rust-1.0.0-x86_64-pc-windows-gnu.exe' - rust-1.0.0-x86_64-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - rustc --version - cargo --version build: false test_script: - cargo test --verbose - cargo build --release - target\release\hs.exe -v
Remove MinGW from AppVeyor build
Remove MinGW from AppVeyor build
YAML
mit
rschmitt/heatseeker,rschmitt/heatseeker
yaml
## Code Before: platform: - x64 environment: global: MSYS2_BASEVER: 20150512 matrix: - MSYS2_ARCH: x86_64 install: - ps: | $url = "http://sourceforge.net/projects/mingw-w64/files/" $url += "Toolchains%20targetting%20Win64/Personal%20Builds/" $url += "mingw-builds/4.9.2/threads-win32/seh/" $url += "x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z/download" Invoke-WebRequest -UserAgent wget -Uri $url -OutFile x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z &7z x -oC:\ x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z > $null - set PATH=C:\mingw64\bin;%PATH% - gcc --version - ps: Start-FileDownload 'http://static.rust-lang.org/dist/rust-1.0.0-x86_64-pc-windows-gnu.exe' - rust-1.0.0-x86_64-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - rustc --version - cargo --version build: false test_script: - cargo test --verbose - cargo build --release - target\release\hs.exe -v ## Instruction: Remove MinGW from AppVeyor build ## Code After: platform: - x64 install: - ps: Start-FileDownload 'http://static.rust-lang.org/dist/rust-1.0.0-x86_64-pc-windows-gnu.exe' - rust-1.0.0-x86_64-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - rustc --version - cargo --version build: false test_script: - cargo test --verbose - cargo build --release - target\release\hs.exe -v
platform: - x64 - environment: - global: - MSYS2_BASEVER: 20150512 - matrix: - - MSYS2_ARCH: x86_64 install: - - ps: | - $url = "http://sourceforge.net/projects/mingw-w64/files/" - $url += "Toolchains%20targetting%20Win64/Personal%20Builds/" - $url += "mingw-builds/4.9.2/threads-win32/seh/" - $url += "x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z/download" - Invoke-WebRequest -UserAgent wget -Uri $url -OutFile x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z - &7z x -oC:\ x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z > $null - - set PATH=C:\mingw64\bin;%PATH% - - gcc --version - ps: Start-FileDownload 'http://static.rust-lang.org/dist/rust-1.0.0-x86_64-pc-windows-gnu.exe' - rust-1.0.0-x86_64-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - rustc --version - cargo --version build: false test_script: - cargo test --verbose - cargo build --release - target\release\hs.exe -v
14
0.482759
0
14
66fc5e3a4d190b950633e68e6b701efbd83e987a
src/tasks/add-sample-video-view.js
src/tasks/add-sample-video-view.js
import { getGrpcClientAsync } from 'killrvideo-nodejs-common'; import { STATS_SERVICE } from '../services/stats'; /** * Adds a view to a video. */ export function addSampleVideoView() { return getGrpcClientAsync(STATS_SERVICE) .then(client => { throw new Error('Not implemented'); }); }; export default addSampleVideoView;
import Promise from 'bluebird'; import { getGrpcClientAsync } from 'killrvideo-nodejs-common'; import { STATS_SERVICE } from '../services/stats'; import { getSampleVideoIdAsync } from '../utils/get-sample-data'; import { stringToUuid } from '../utils/protobuf-conversions'; /** * Adds a view to a video. */ export async function addSampleVideoView() { let [ client, videoId ] = await Promise.all([ getGrpcClientAsync(STATS_SERVICE), getSampleVideoIdAsync() ]); if (videoId === null) throw new Error('No sample videos available'); await client.recordPlaybackStartedAsync({ videoId: stringToUuid(videoId) }); }; export default addSampleVideoView;
Add sample video view impl
Add sample video view impl
JavaScript
apache-2.0
KillrVideo/killrvideo-generator,KillrVideo/killrvideo-generator
javascript
## Code Before: import { getGrpcClientAsync } from 'killrvideo-nodejs-common'; import { STATS_SERVICE } from '../services/stats'; /** * Adds a view to a video. */ export function addSampleVideoView() { return getGrpcClientAsync(STATS_SERVICE) .then(client => { throw new Error('Not implemented'); }); }; export default addSampleVideoView; ## Instruction: Add sample video view impl ## Code After: import Promise from 'bluebird'; import { getGrpcClientAsync } from 'killrvideo-nodejs-common'; import { STATS_SERVICE } from '../services/stats'; import { getSampleVideoIdAsync } from '../utils/get-sample-data'; import { stringToUuid } from '../utils/protobuf-conversions'; /** * Adds a view to a video. */ export async function addSampleVideoView() { let [ client, videoId ] = await Promise.all([ getGrpcClientAsync(STATS_SERVICE), getSampleVideoIdAsync() ]); if (videoId === null) throw new Error('No sample videos available'); await client.recordPlaybackStartedAsync({ videoId: stringToUuid(videoId) }); }; export default addSampleVideoView;
+ import Promise from 'bluebird'; import { getGrpcClientAsync } from 'killrvideo-nodejs-common'; import { STATS_SERVICE } from '../services/stats'; + import { getSampleVideoIdAsync } from '../utils/get-sample-data'; + import { stringToUuid } from '../utils/protobuf-conversions'; /** * Adds a view to a video. */ - export function addSampleVideoView() { + export async function addSampleVideoView() { ? ++++++ + let [ client, videoId ] = await Promise.all([ - return getGrpcClientAsync(STATS_SERVICE) ? ^^^^^^ + getGrpcClientAsync(STATS_SERVICE), ? ^ + - .then(client => { - throw new Error('Not implemented'); + getSampleVideoIdAsync() + ]); + + if (videoId === null) throw new Error('No sample videos available'); + + await client.recordPlaybackStartedAsync({ + videoId: stringToUuid(videoId) - }); ? -- + }); }; export default addSampleVideoView;
19
1.357143
14
5
1c2f808025bc91c2ff7790577e8b479a1816f503
sketch_feb14b/sketch_feb14b.ino
sketch_feb14b/sketch_feb14b.ino
void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }
/* Turns on an LED for one seconds, then off for one second, repeat. This example is adapted from Examples > 01.Basics > Blink */ // On the Arduino UNO the onboard LED is attached to digital pin 13 #define LED 13 void setup() { // put your setup code here, to run once: pinMode(LED, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(LED, HIGH); // turn the LED on delay(1000); digitalWrite(LED, LOW); // turn the LED off delay(1000); }
Add code for blinking LED on digital out 13
Add code for blinking LED on digital out 13 Signed-off-by: Gianpaolo Macario <f8885408b8c3d931b330bae3c3a28a3af912c463@gmail.com>
Arduino
mpl-2.0
gmacario/learning-arduino
arduino
## Code Before: void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: } ## Instruction: Add code for blinking LED on digital out 13 Signed-off-by: Gianpaolo Macario <f8885408b8c3d931b330bae3c3a28a3af912c463@gmail.com> ## Code After: /* Turns on an LED for one seconds, then off for one second, repeat. This example is adapted from Examples > 01.Basics > Blink */ // On the Arduino UNO the onboard LED is attached to digital pin 13 #define LED 13 void setup() { // put your setup code here, to run once: pinMode(LED, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(LED, HIGH); // turn the LED on delay(1000); digitalWrite(LED, LOW); // turn the LED off delay(1000); }
+ /* + Turns on an LED for one seconds, then off for one second, repeat. + + This example is adapted from Examples > 01.Basics > Blink + + */ + + // On the Arduino UNO the onboard LED is attached to digital pin 13 + #define LED 13 + void setup() { // put your setup code here, to run once: + pinMode(LED, OUTPUT); } void loop() { // put your main code here, to run repeatedly: + digitalWrite(LED, HIGH); // turn the LED on + delay(1000); + digitalWrite(LED, LOW); // turn the LED off + delay(1000); }
15
1.666667
15
0
cd471449edad56ef6c3a69d025130f4fb8ea1fea
plumbium/artefacts.py
plumbium/artefacts.py
import os.path from utils import file_sha1sum class Artefact(object): def __init__(self, filename, extension): if not filename.endswith(extension): raise ValueError self._filename = filename self._ext_length = len(extension) self._abspath = os.path.abspath(filename) def checksum(self): return file_sha1sum(self.filename) def exists(self): return os.path.exists(self.filename) @property def abspath(self): return self._abspath @property def basename(self): """Return the filename without the extension""" return self._filename[:-self._ext_length] def dereference(self): self._filename = os.path.basename(self._filename) @property def filename(self): return self._filename def __repr__(self): return 'Artefact({0!r})'.format(self.filename) class NiiGzImage(Artefact): def __init__(self, filename): super(NiiGzImage, self).__init__(filename, '.nii.gz') def __repr__(self): return '{0}({1!r})'.format(self.__clsname__, self.filename) class TextFile(Artefact): def __init__(self, filename): super(TextFile, self).__init__(filename, '.txt') def __repr__(self): return '{0}({1!r})'.format(self.__clsname__, self.filename)
import os.path from utils import file_sha1sum class Artefact(object): def __init__(self, filename, extension): if not filename.endswith(extension): raise ValueError self._filename = filename self._ext_length = len(extension) self._abspath = os.path.abspath(filename) def checksum(self): return file_sha1sum(self.filename) def exists(self): return os.path.exists(self.filename) @property def abspath(self): return self._abspath @property def basename(self): """Return the filename without the extension""" return self._filename[:-self._ext_length] def dereference(self): self._filename = os.path.basename(self._filename) @property def filename(self): return self._filename def __repr__(self): return '{0}({1!r})'.format(self.__class__.__name__, self.filename) class NiiGzImage(Artefact): def __init__(self, filename): super(NiiGzImage, self).__init__(filename, '.nii.gz') def __repr__(self): return '{0}({1!r})'.format(self.__class__.__name__, self.filename) class TextFile(Artefact): def __init__(self, filename): super(TextFile, self).__init__(filename, '.txt') def __repr__(self): return '{0}({1!r})'.format(self.__class__.__name__, self.filename)
Use correct method to get classname of self
Use correct method to get classname of self
Python
mit
jstutters/Plumbium
python
## Code Before: import os.path from utils import file_sha1sum class Artefact(object): def __init__(self, filename, extension): if not filename.endswith(extension): raise ValueError self._filename = filename self._ext_length = len(extension) self._abspath = os.path.abspath(filename) def checksum(self): return file_sha1sum(self.filename) def exists(self): return os.path.exists(self.filename) @property def abspath(self): return self._abspath @property def basename(self): """Return the filename without the extension""" return self._filename[:-self._ext_length] def dereference(self): self._filename = os.path.basename(self._filename) @property def filename(self): return self._filename def __repr__(self): return 'Artefact({0!r})'.format(self.filename) class NiiGzImage(Artefact): def __init__(self, filename): super(NiiGzImage, self).__init__(filename, '.nii.gz') def __repr__(self): return '{0}({1!r})'.format(self.__clsname__, self.filename) class TextFile(Artefact): def __init__(self, filename): super(TextFile, self).__init__(filename, '.txt') def __repr__(self): return '{0}({1!r})'.format(self.__clsname__, self.filename) ## Instruction: Use correct method to get classname of self ## Code After: import os.path from utils import file_sha1sum class Artefact(object): def __init__(self, filename, extension): if not filename.endswith(extension): raise ValueError self._filename = filename self._ext_length = len(extension) self._abspath = os.path.abspath(filename) def checksum(self): return file_sha1sum(self.filename) def exists(self): return os.path.exists(self.filename) @property def abspath(self): return self._abspath @property def basename(self): """Return the filename without the extension""" return self._filename[:-self._ext_length] def dereference(self): self._filename = os.path.basename(self._filename) @property def filename(self): return self._filename def __repr__(self): return '{0}({1!r})'.format(self.__class__.__name__, self.filename) class NiiGzImage(Artefact): def __init__(self, filename): super(NiiGzImage, self).__init__(filename, '.nii.gz') def __repr__(self): return '{0}({1!r})'.format(self.__class__.__name__, self.filename) class TextFile(Artefact): def __init__(self, filename): super(TextFile, self).__init__(filename, '.txt') def __repr__(self): return '{0}({1!r})'.format(self.__class__.__name__, self.filename)
import os.path from utils import file_sha1sum class Artefact(object): def __init__(self, filename, extension): if not filename.endswith(extension): raise ValueError self._filename = filename self._ext_length = len(extension) self._abspath = os.path.abspath(filename) def checksum(self): return file_sha1sum(self.filename) def exists(self): return os.path.exists(self.filename) @property def abspath(self): return self._abspath @property def basename(self): """Return the filename without the extension""" return self._filename[:-self._ext_length] def dereference(self): self._filename = os.path.basename(self._filename) @property def filename(self): return self._filename def __repr__(self): - return 'Artefact({0!r})'.format(self.filename) + return '{0}({1!r})'.format(self.__class__.__name__, self.filename) class NiiGzImage(Artefact): def __init__(self, filename): super(NiiGzImage, self).__init__(filename, '.nii.gz') def __repr__(self): - return '{0}({1!r})'.format(self.__clsname__, self.filename) + return '{0}({1!r})'.format(self.__class__.__name__, self.filename) ? + ++++++ class TextFile(Artefact): def __init__(self, filename): super(TextFile, self).__init__(filename, '.txt') def __repr__(self): - return '{0}({1!r})'.format(self.__clsname__, self.filename) + return '{0}({1!r})'.format(self.__class__.__name__, self.filename) ? + ++++++
6
0.115385
3
3
2e0cd847e13278e0565561882233dbe9255b2868
addon/initialize.js
addon/initialize.js
import Ember from 'ember'; import ValidatorsMessages from 'ember-cp-validations/validators/messages'; const { Logger:logger } = Ember; export default function() { ValidatorsMessages.reopen({ intl: Ember.inject.service(), prefix: 'errors', getDescriptionFor(attribute, context = {}) { let key = `${this.get('prefix')}.description`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return intl.formatMessage(intl.findTranslationByKey(key), context); } return this._super(...arguments); }, getMessageFor(type, context = {}) { let key = `${this.get('prefix')}.${type}`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return this.formatMessage(intl.formatMessage(intl.findTranslationByKey(key), context)); } logger.warn(`[ember-intl-cp-validations] Missing translation for validation key: ${key}\nhttp://offirgolan.github.io/ember-cp-validations/docs/messages/index.html`); return this._super(...arguments); } }); }
import Ember from 'ember'; import ValidatorsMessages from 'ember-cp-validations/validators/messages'; const { Logger:logger } = Ember; export default function() { ValidatorsMessages.reopen({ intl: Ember.inject.service(), prefix: 'errors', getDescriptionFor(attribute, context = {}) { let key = `${this.get('prefix')}.description`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return intl.t(key, context); } return this._super(...arguments); }, getMessageFor(type, context = {}) { let key = `${this.get('prefix')}.${type}`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return this.formatMessage(intl.t(key, context)); } logger.warn(`[ember-intl-cp-validations] Missing translation for validation key: ${key}\nhttp://offirgolan.github.io/ember-cp-validations/docs/messages/index.html`); return this._super(...arguments); } }); }
Replace usage of `formatMessage(findTranslationByKey` with `t`
Replace usage of `formatMessage(findTranslationByKey` with `t`
JavaScript
mit
ember-intl/ember-intl-cp-validations,jasonmit/ember-intl-cp-validations,ember-intl/ember-intl-cp-validations,jasonmit/ember-intl-cp-validations
javascript
## Code Before: import Ember from 'ember'; import ValidatorsMessages from 'ember-cp-validations/validators/messages'; const { Logger:logger } = Ember; export default function() { ValidatorsMessages.reopen({ intl: Ember.inject.service(), prefix: 'errors', getDescriptionFor(attribute, context = {}) { let key = `${this.get('prefix')}.description`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return intl.formatMessage(intl.findTranslationByKey(key), context); } return this._super(...arguments); }, getMessageFor(type, context = {}) { let key = `${this.get('prefix')}.${type}`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return this.formatMessage(intl.formatMessage(intl.findTranslationByKey(key), context)); } logger.warn(`[ember-intl-cp-validations] Missing translation for validation key: ${key}\nhttp://offirgolan.github.io/ember-cp-validations/docs/messages/index.html`); return this._super(...arguments); } }); } ## Instruction: Replace usage of `formatMessage(findTranslationByKey` with `t` ## Code After: import Ember from 'ember'; import ValidatorsMessages from 'ember-cp-validations/validators/messages'; const { Logger:logger } = Ember; export default function() { ValidatorsMessages.reopen({ intl: Ember.inject.service(), prefix: 'errors', getDescriptionFor(attribute, context = {}) { let key = `${this.get('prefix')}.description`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return intl.t(key, context); } return this._super(...arguments); }, getMessageFor(type, context = {}) { let key = `${this.get('prefix')}.${type}`; let intl = this.get('intl'); if (intl && intl.exists(key)) { return this.formatMessage(intl.t(key, context)); } logger.warn(`[ember-intl-cp-validations] Missing translation for validation key: ${key}\nhttp://offirgolan.github.io/ember-cp-validations/docs/messages/index.html`); return this._super(...arguments); } }); }
import Ember from 'ember'; import ValidatorsMessages from 'ember-cp-validations/validators/messages'; const { Logger:logger } = Ember; export default function() { ValidatorsMessages.reopen({ intl: Ember.inject.service(), prefix: 'errors', getDescriptionFor(attribute, context = {}) { let key = `${this.get('prefix')}.description`; let intl = this.get('intl'); if (intl && intl.exists(key)) { - return intl.formatMessage(intl.findTranslationByKey(key), context); + return intl.t(key, context); } return this._super(...arguments); }, getMessageFor(type, context = {}) { let key = `${this.get('prefix')}.${type}`; let intl = this.get('intl'); if (intl && intl.exists(key)) { - return this.formatMessage(intl.formatMessage(intl.findTranslationByKey(key), context)); + return this.formatMessage(intl.t(key, context)); } logger.warn(`[ember-intl-cp-validations] Missing translation for validation key: ${key}\nhttp://offirgolan.github.io/ember-cp-validations/docs/messages/index.html`); return this._super(...arguments); } }); }
4
0.114286
2
2
9df4eb7d98a87da233f36713f26c7b5b4e51c7c3
project/plugins.sbt
project/plugins.sbt
name := "scalabrad-web" addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0-RC1") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
name := "scalabrad-web" resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/" addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0-RC5") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
Add typesafe resolver so dependencies can be loaded.
Add typesafe resolver so dependencies can be loaded.
Scala
mit
labrad/scalabrad-web,labrad/scalabrad-web,labrad/scalabrad-web,labrad/scalabrad-web,labrad/scalabrad-web
scala
## Code Before: name := "scalabrad-web" addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0-RC1") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0") ## Instruction: Add typesafe resolver so dependencies can be loaded. ## Code After: name := "scalabrad-web" resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/" addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0-RC5") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
name := "scalabrad-web" + resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/" + - addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0-RC1") ? ^ + addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0-RC5") ? ^ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
4
1
3
1
d58ca526a218a3c8c2b88a3fa5942cc85f10de66
packages/fe/feldspar-signal.yaml
packages/fe/feldspar-signal.yaml
homepage: https://github.com/markus-git/feldspar-signal changelog-type: '' hash: 4d08788c2c10e6cb23232f1c5744eee04ea4587a44f1912f5b79c95012cda537 test-bench-deps: {} maintainer: mararon@chalmers.se synopsis: Signal Processing extension for Feldspar changelog: '' basic-deps: base: ! '>=4.7 && <4.8' all-versions: - '0.0.0.1' author: mararon latest: '0.0.0.1' description-type: markdown description: ! '# feldspar-signal Signal Processing for Embedded Domain Specific Languages in Haskell ' license-name: BSD3
homepage: https://github.com/markus-git/feldspar-signal changelog-type: '' hash: 5e882174493e067c9772ef2ec01d27ac529ad70692250d67da1287216a3e27c0 test-bench-deps: {} maintainer: mararon@chalmers.se synopsis: Signal Processing extension for Feldspar changelog: '' basic-deps: feldspar-language: -any feldspar-compiler-shim: -any imperative-edsl: -any mainland-pretty: ! '>=0.2.7 && <0.3' base: ! '>=4.7 && <5' feldspar-compiler: -any base-compat: <0.8 monadic-edsl-priv: -any all-versions: - '0.0.0.1' - '0.0.1.0' author: mararon latest: '0.0.1.0' description-type: markdown description: ! '# feldspar-signal Signal Processing for Embedded Domain Specific Languages in Haskell ' license-name: BSD3
Update from Hackage at 2015-06-11T12:40:46+0000
Update from Hackage at 2015-06-11T12:40:46+0000
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/markus-git/feldspar-signal changelog-type: '' hash: 4d08788c2c10e6cb23232f1c5744eee04ea4587a44f1912f5b79c95012cda537 test-bench-deps: {} maintainer: mararon@chalmers.se synopsis: Signal Processing extension for Feldspar changelog: '' basic-deps: base: ! '>=4.7 && <4.8' all-versions: - '0.0.0.1' author: mararon latest: '0.0.0.1' description-type: markdown description: ! '# feldspar-signal Signal Processing for Embedded Domain Specific Languages in Haskell ' license-name: BSD3 ## Instruction: Update from Hackage at 2015-06-11T12:40:46+0000 ## Code After: homepage: https://github.com/markus-git/feldspar-signal changelog-type: '' hash: 5e882174493e067c9772ef2ec01d27ac529ad70692250d67da1287216a3e27c0 test-bench-deps: {} maintainer: mararon@chalmers.se synopsis: Signal Processing extension for Feldspar changelog: '' basic-deps: feldspar-language: -any feldspar-compiler-shim: -any imperative-edsl: -any mainland-pretty: ! '>=0.2.7 && <0.3' base: ! '>=4.7 && <5' feldspar-compiler: -any base-compat: <0.8 monadic-edsl-priv: -any all-versions: - '0.0.0.1' - '0.0.1.0' author: mararon latest: '0.0.1.0' description-type: markdown description: ! '# feldspar-signal Signal Processing for Embedded Domain Specific Languages in Haskell ' license-name: BSD3
homepage: https://github.com/markus-git/feldspar-signal changelog-type: '' - hash: 4d08788c2c10e6cb23232f1c5744eee04ea4587a44f1912f5b79c95012cda537 + hash: 5e882174493e067c9772ef2ec01d27ac529ad70692250d67da1287216a3e27c0 test-bench-deps: {} maintainer: mararon@chalmers.se synopsis: Signal Processing extension for Feldspar changelog: '' basic-deps: + feldspar-language: -any + feldspar-compiler-shim: -any + imperative-edsl: -any + mainland-pretty: ! '>=0.2.7 && <0.3' - base: ! '>=4.7 && <4.8' ? ^^^ + base: ! '>=4.7 && <5' ? ^ + feldspar-compiler: -any + base-compat: <0.8 + monadic-edsl-priv: -any all-versions: - '0.0.0.1' + - '0.0.1.0' author: mararon - latest: '0.0.0.1' ? -- + latest: '0.0.1.0' ? ++ description-type: markdown description: ! '# feldspar-signal Signal Processing for Embedded Domain Specific Languages in Haskell ' license-name: BSD3
14
0.7
11
3
bad3fc741f359c70235f94497e54cdd820d70ddd
lib/openlogi/client.rb
lib/openlogi/client.rb
module Openlogi class Client attr_accessor :last_response def configure yield configuration end def configuration @configuration ||= Openlogi::Configuration.new end def test_mode? !!test_mode end def endpoint test_mode? ? "https://api-demo.openlogi.com" : "https://api.openlogi.com" end def items @items ||= Api::Items.new(self) end def warehousings @warehousings ||= Api::Warehousings.new(self) end def shipments @shipments ||= Api::Shipments.new(self) end extend Forwardable def_delegators :configuration, :access_token, :test_mode end end
module Openlogi class Client attr_accessor :last_response def configure yield configuration end def configuration @configuration ||= Openlogi::Configuration.new end def test_mode? !!test_mode end def endpoint test_mode? ? "https://api-demo.openlogi.com" : "https://api.openlogi.com" end def items @items ||= Api::Items.new(self) end def warehousings @warehousings ||= Api::Warehousings.new(self) end def shipments @shipments ||= Api::Shipments.new(self) end def validations @validations ||= Api::Validations.new(self) end extend Forwardable def_delegators :configuration, :access_token, :test_mode end end
Add validations method for shortcut
Add validations method for shortcut
Ruby
mit
degica/openlogi,degica/openlogi
ruby
## Code Before: module Openlogi class Client attr_accessor :last_response def configure yield configuration end def configuration @configuration ||= Openlogi::Configuration.new end def test_mode? !!test_mode end def endpoint test_mode? ? "https://api-demo.openlogi.com" : "https://api.openlogi.com" end def items @items ||= Api::Items.new(self) end def warehousings @warehousings ||= Api::Warehousings.new(self) end def shipments @shipments ||= Api::Shipments.new(self) end extend Forwardable def_delegators :configuration, :access_token, :test_mode end end ## Instruction: Add validations method for shortcut ## Code After: module Openlogi class Client attr_accessor :last_response def configure yield configuration end def configuration @configuration ||= Openlogi::Configuration.new end def test_mode? !!test_mode end def endpoint test_mode? ? "https://api-demo.openlogi.com" : "https://api.openlogi.com" end def items @items ||= Api::Items.new(self) end def warehousings @warehousings ||= Api::Warehousings.new(self) end def shipments @shipments ||= Api::Shipments.new(self) end def validations @validations ||= Api::Validations.new(self) end extend Forwardable def_delegators :configuration, :access_token, :test_mode end end
module Openlogi class Client attr_accessor :last_response def configure yield configuration end def configuration @configuration ||= Openlogi::Configuration.new end def test_mode? !!test_mode end def endpoint test_mode? ? "https://api-demo.openlogi.com" : "https://api.openlogi.com" end def items @items ||= Api::Items.new(self) end def warehousings @warehousings ||= Api::Warehousings.new(self) end def shipments @shipments ||= Api::Shipments.new(self) end + def validations + @validations ||= Api::Validations.new(self) + end + extend Forwardable def_delegators :configuration, :access_token, :test_mode end end
4
0.111111
4
0
0ce7a7b396dd62c7e52e355108f8f037335bc5ca
src/sentry/api/endpoints/project_environments.py
src/sentry/api/endpoints/project_environments.py
from __future__ import absolute_import from rest_framework.response import Response from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import EnvironmentProject environment_visibility_filter_options = { 'all': lambda queryset: queryset, 'hidden': lambda queryset: queryset.filter(is_hidden=True), 'visible': lambda queryset: queryset.exclude(is_hidden=True), } class ProjectEnvironmentsEndpoint(ProjectEndpoint): def get(self, request, project): queryset = EnvironmentProject.objects.filter( project=project, ).select_related('environment').order_by('environment__name') visibility = request.GET.get('visibility', 'visible') if visibility not in environment_visibility_filter_options: return Response({ 'detail': 'Invalid value for \'visibility\', valid values are: {!r}'.format( environment_visibility_filter_options.keys(), ), }, status=400) add_visibility_filters = environment_visibility_filter_options[visibility] queryset = add_visibility_filters(queryset) return Response(serialize(list(queryset), request.user))
from __future__ import absolute_import from rest_framework.response import Response from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import EnvironmentProject environment_visibility_filter_options = { 'all': lambda queryset: queryset, 'hidden': lambda queryset: queryset.filter(is_hidden=True), 'visible': lambda queryset: queryset.exclude(is_hidden=True), } class ProjectEnvironmentsEndpoint(ProjectEndpoint): def get(self, request, project): queryset = EnvironmentProject.objects.filter( project=project, ).exclude( # HACK(mattrobenolt): We don't want to surface the # "No Environment" environment to the UI since it # doesn't really exist. This might very likely change # with new tagstore backend in the future, but until # then, we're hiding it since it causes more problems # than it's worth. environment__name='', ).select_related('environment').order_by('environment__name') visibility = request.GET.get('visibility', 'visible') if visibility not in environment_visibility_filter_options: return Response({ 'detail': 'Invalid value for \'visibility\', valid values are: {!r}'.format( environment_visibility_filter_options.keys(), ), }, status=400) add_visibility_filters = environment_visibility_filter_options[visibility] queryset = add_visibility_filters(queryset) return Response(serialize(list(queryset), request.user))
Hide "No Environment" environment from project environments
api: Hide "No Environment" environment from project environments
Python
bsd-3-clause
beeftornado/sentry,beeftornado/sentry,mvaled/sentry,ifduyue/sentry,ifduyue/sentry,mvaled/sentry,mvaled/sentry,beeftornado/sentry,mvaled/sentry,looker/sentry,looker/sentry,looker/sentry,ifduyue/sentry,ifduyue/sentry,mvaled/sentry,looker/sentry,mvaled/sentry,ifduyue/sentry,looker/sentry
python
## Code Before: from __future__ import absolute_import from rest_framework.response import Response from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import EnvironmentProject environment_visibility_filter_options = { 'all': lambda queryset: queryset, 'hidden': lambda queryset: queryset.filter(is_hidden=True), 'visible': lambda queryset: queryset.exclude(is_hidden=True), } class ProjectEnvironmentsEndpoint(ProjectEndpoint): def get(self, request, project): queryset = EnvironmentProject.objects.filter( project=project, ).select_related('environment').order_by('environment__name') visibility = request.GET.get('visibility', 'visible') if visibility not in environment_visibility_filter_options: return Response({ 'detail': 'Invalid value for \'visibility\', valid values are: {!r}'.format( environment_visibility_filter_options.keys(), ), }, status=400) add_visibility_filters = environment_visibility_filter_options[visibility] queryset = add_visibility_filters(queryset) return Response(serialize(list(queryset), request.user)) ## Instruction: api: Hide "No Environment" environment from project environments ## Code After: from __future__ import absolute_import from rest_framework.response import Response from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import EnvironmentProject environment_visibility_filter_options = { 'all': lambda queryset: queryset, 'hidden': lambda queryset: queryset.filter(is_hidden=True), 'visible': lambda queryset: queryset.exclude(is_hidden=True), } class ProjectEnvironmentsEndpoint(ProjectEndpoint): def get(self, request, project): queryset = EnvironmentProject.objects.filter( project=project, ).exclude( # HACK(mattrobenolt): We don't want to surface the # "No Environment" environment to the UI since it # doesn't really exist. This might very likely change # with new tagstore backend in the future, but until # then, we're hiding it since it causes more problems # than it's worth. environment__name='', ).select_related('environment').order_by('environment__name') visibility = request.GET.get('visibility', 'visible') if visibility not in environment_visibility_filter_options: return Response({ 'detail': 'Invalid value for \'visibility\', valid values are: {!r}'.format( environment_visibility_filter_options.keys(), ), }, status=400) add_visibility_filters = environment_visibility_filter_options[visibility] queryset = add_visibility_filters(queryset) return Response(serialize(list(queryset), request.user))
from __future__ import absolute_import from rest_framework.response import Response from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import EnvironmentProject environment_visibility_filter_options = { 'all': lambda queryset: queryset, 'hidden': lambda queryset: queryset.filter(is_hidden=True), 'visible': lambda queryset: queryset.exclude(is_hidden=True), } class ProjectEnvironmentsEndpoint(ProjectEndpoint): def get(self, request, project): queryset = EnvironmentProject.objects.filter( project=project, + ).exclude( + # HACK(mattrobenolt): We don't want to surface the + # "No Environment" environment to the UI since it + # doesn't really exist. This might very likely change + # with new tagstore backend in the future, but until + # then, we're hiding it since it causes more problems + # than it's worth. + environment__name='', ).select_related('environment').order_by('environment__name') visibility = request.GET.get('visibility', 'visible') if visibility not in environment_visibility_filter_options: return Response({ 'detail': 'Invalid value for \'visibility\', valid values are: {!r}'.format( environment_visibility_filter_options.keys(), ), }, status=400) add_visibility_filters = environment_visibility_filter_options[visibility] queryset = add_visibility_filters(queryset) return Response(serialize(list(queryset), request.user))
8
0.235294
8
0
02419fb3e5089865fbd9c491cfd4b49d2e1e653d
lib/assets/test/spec/cartodb3/routes/handle-modals-route.spec.js
lib/assets/test/spec/cartodb3/routes/handle-modals-route.spec.js
var handleModalsRoute = require('cartodb3/routes/handle-modals-route'); describe('routes/handleModalsRoute', function () { it('should handle modals route', function () { var modals = jasmine.createSpyObj('modals', ['destroy']); handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).toHaveBeenCalled(); }); });
var handleModalsRoute = require('cartodb3/routes/handle-modals-route'); describe('routes/handleModalsRoute', function () { it('should handle modals route', function () { var modals = jasmine.createSpyObj('modals', ['destroy']); handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).toHaveBeenCalled(); }); it('should not destroy modals when route changes and `keepOnRouteChange` property is enabled', function () { var modals = { keepOnRouteChange: function () { return true }, destroy: jasmine.createSpy('destroy') }; handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).not.toHaveBeenCalled(); }); });
Add tests for keepOnRouteChange property
Add tests for keepOnRouteChange property
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
javascript
## Code Before: var handleModalsRoute = require('cartodb3/routes/handle-modals-route'); describe('routes/handleModalsRoute', function () { it('should handle modals route', function () { var modals = jasmine.createSpyObj('modals', ['destroy']); handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).toHaveBeenCalled(); }); }); ## Instruction: Add tests for keepOnRouteChange property ## Code After: var handleModalsRoute = require('cartodb3/routes/handle-modals-route'); describe('routes/handleModalsRoute', function () { it('should handle modals route', function () { var modals = jasmine.createSpyObj('modals', ['destroy']); handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).toHaveBeenCalled(); }); it('should not destroy modals when route changes and `keepOnRouteChange` property is enabled', function () { var modals = { keepOnRouteChange: function () { return true }, destroy: jasmine.createSpy('destroy') }; handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).not.toHaveBeenCalled(); }); });
var handleModalsRoute = require('cartodb3/routes/handle-modals-route'); describe('routes/handleModalsRoute', function () { it('should handle modals route', function () { var modals = jasmine.createSpyObj('modals', ['destroy']); handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); expect(modals.destroy).toHaveBeenCalled(); }); + + it('should not destroy modals when route changes and `keepOnRouteChange` property is enabled', function () { + var modals = { + keepOnRouteChange: function () { return true }, + destroy: jasmine.createSpy('destroy') + }; + + handleModalsRoute(['layer_analyses', 'l1-1', 'a1', null], modals); + + expect(modals.destroy).not.toHaveBeenCalled(); + }); });
11
1
11
0