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
6ad671b2dac40831064213214d102ab46a83c26b
README.md
README.md
Library to handle Christian liturgical calendar queries, including lectionary readings.
Javascript library to handle Christian liturgical calendar queries, including lectionary readings. [![Build Status](https://travis-ci.org/nathanjsharpe/liturgy.svg?branch=master)](https://travis-ci.org/nathanjsharpe/liturgy) # Install npm install liturgy
Add travis build status to readme
Add travis build status to readme
Markdown
mit
nathanjsharpe/liturgy
markdown
## Code Before: Library to handle Christian liturgical calendar queries, including lectionary readings. ## Instruction: Add travis build status to readme ## Code After: Javascript library to handle Christian liturgical calendar queries, including lectionary readings. [![Build Status](https://travis-ci.org/nathanjsharpe/liturgy.svg?branch=master)](https://travis-ci.org/nathanjsharpe/liturgy) # Install npm install liturgy
- Library to handle Christian liturgical calendar queries, including lectionary readings. ? ^ + Javascript library to handle Christian liturgical calendar queries, including lectionary readings. ? ^^^^^^^^^^^^ + + [![Build Status](https://travis-ci.org/nathanjsharpe/liturgy.svg?branch=master)](https://travis-ci.org/nathanjsharpe/liturgy) + + # Install + + npm install liturgy
8
8
7
1
5f19791e1fcecb99eb80c258f1cc4477e7414258
modules/hdo/templates/upstart-google-drive-sync.conf.erb
modules/hdo/templates/upstart-google-drive-sync.conf.erb
description <%= @description %> author <%= @author %> stop on shutdown respawn respawn limit 20 5 script exec google-drive-sync \ --out-dir <%= @output_dir %> \ --credentials <%= @credentials_path %> \ --plugins <%= @plugin_path %> \ --interval <%= @interval %> \ --state <%= @state_path %> \ ><%= @log_path %> 2>&1 end script post-start script echo "started <%= @description %>" end script
description <%= @description %> author <%= @author %> start on filesystem and net-device-up IFACE!=lo stop on shutdown respawn respawn limit 20 5 script exec google-drive-sync \ --out-dir <%= @output_dir %> \ --credentials <%= @credentials_path %> \ --plugins <%= @plugin_path %> \ --interval <%= @interval %> \ --state <%= @state_path %> \ ><%= @log_path %> 2>&1 end script post-start script echo "started <%= @description %>" end script
Make sure google-drive-sync starts on boot
Make sure google-drive-sync starts on boot
HTML+ERB
bsd-3-clause
holderdeord/hdo-puppet,holderdeord/hdo-puppet,holderdeord/hdo-puppet,holderdeord/hdo-puppet,holderdeord/hdo-puppet
html+erb
## Code Before: description <%= @description %> author <%= @author %> stop on shutdown respawn respawn limit 20 5 script exec google-drive-sync \ --out-dir <%= @output_dir %> \ --credentials <%= @credentials_path %> \ --plugins <%= @plugin_path %> \ --interval <%= @interval %> \ --state <%= @state_path %> \ ><%= @log_path %> 2>&1 end script post-start script echo "started <%= @description %>" end script ## Instruction: Make sure google-drive-sync starts on boot ## Code After: description <%= @description %> author <%= @author %> start on filesystem and net-device-up IFACE!=lo stop on shutdown respawn respawn limit 20 5 script exec google-drive-sync \ --out-dir <%= @output_dir %> \ --credentials <%= @credentials_path %> \ --plugins <%= @plugin_path %> \ --interval <%= @interval %> \ --state <%= @state_path %> \ ><%= @log_path %> 2>&1 end script post-start script echo "started <%= @description %>" end script
description <%= @description %> author <%= @author %> + start on filesystem and net-device-up IFACE!=lo stop on shutdown respawn respawn limit 20 5 script exec google-drive-sync \ --out-dir <%= @output_dir %> \ --credentials <%= @credentials_path %> \ --plugins <%= @plugin_path %> \ --interval <%= @interval %> \ --state <%= @state_path %> \ ><%= @log_path %> 2>&1 end script post-start script echo "started <%= @description %>" end script
1
0.045455
1
0
2e24253e8144cf40970373d6f6c37cc75539b4bb
lisp/init-direnv.el
lisp/init-direnv.el
;;; init-direnv.el --- Integrate with direnv -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (defun sanityinc/maybe-enable-envrc-global-mode () "Enable `envrc-global-mode' if `direnv' is installed." (when (executable-find "direnv") (envrc-global-mode))) (when (maybe-require-package 'envrc) (with-eval-after-load 'envrc (define-key envrc-mode-map (kbd "C-c e") 'envrc-command-map)) (add-hook 'after-init-hook 'sanityinc/maybe-enable-envrc-global-mode)) (provide 'init-direnv) ;;; init-direnv.el ends here
;;; init-direnv.el --- Integrate with direnv -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (when (maybe-require-package 'envrc) (defun sanityinc/maybe-enable-envrc-global-mode () "Enable `envrc-global-mode' if `direnv' is installed." (when (executable-find "direnv") (envrc-global-mode))) (with-eval-after-load 'envrc (define-key envrc-mode-map (kbd "C-c e") 'envrc-command-map)) (add-hook 'after-init-hook 'sanityinc/maybe-enable-envrc-global-mode)) (provide 'init-direnv) ;;; init-direnv.el ends here
Define function inside conditional block which uses it
Define function inside conditional block which uses it
Emacs Lisp
bsd-2-clause
krzysz00/emacs.d,gsmlg/emacs.d,emuio/emacs.d,arthurl/emacs.d,purcell/emacs.d,dcorking/emacs.d,qianwan/emacs.d,lust4life/emacs.d,blueseason/emacs.d
emacs-lisp
## Code Before: ;;; init-direnv.el --- Integrate with direnv -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (defun sanityinc/maybe-enable-envrc-global-mode () "Enable `envrc-global-mode' if `direnv' is installed." (when (executable-find "direnv") (envrc-global-mode))) (when (maybe-require-package 'envrc) (with-eval-after-load 'envrc (define-key envrc-mode-map (kbd "C-c e") 'envrc-command-map)) (add-hook 'after-init-hook 'sanityinc/maybe-enable-envrc-global-mode)) (provide 'init-direnv) ;;; init-direnv.el ends here ## Instruction: Define function inside conditional block which uses it ## Code After: ;;; init-direnv.el --- Integrate with direnv -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (when (maybe-require-package 'envrc) (defun sanityinc/maybe-enable-envrc-global-mode () "Enable `envrc-global-mode' if `direnv' is installed." (when (executable-find "direnv") (envrc-global-mode))) (with-eval-after-load 'envrc (define-key envrc-mode-map (kbd "C-c e") 'envrc-command-map)) (add-hook 'after-init-hook 'sanityinc/maybe-enable-envrc-global-mode)) (provide 'init-direnv) ;;; init-direnv.el ends here
;;; init-direnv.el --- Integrate with direnv -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: + (when (maybe-require-package 'envrc) - (defun sanityinc/maybe-enable-envrc-global-mode () + (defun sanityinc/maybe-enable-envrc-global-mode () ? ++ - "Enable `envrc-global-mode' if `direnv' is installed." + "Enable `envrc-global-mode' if `direnv' is installed." ? ++ - (when (executable-find "direnv") + (when (executable-find "direnv") ? ++ - (envrc-global-mode))) + (envrc-global-mode))) ? ++ - (when (maybe-require-package 'envrc) (with-eval-after-load 'envrc (define-key envrc-mode-map (kbd "C-c e") 'envrc-command-map)) (add-hook 'after-init-hook 'sanityinc/maybe-enable-envrc-global-mode)) (provide 'init-direnv) ;;; init-direnv.el ends here
10
0.588235
5
5
39d97d7b07eb98b7433a3a845492e2e0921c6306
public/javascripts/messageFetch.js
public/javascripts/messageFetch.js
$(function(){ var messages = []; var token = 'CAACEdEose0cBAPsc5EojEPsnGCVpG05fBKSV1N2WrZAJJ8ngZB55cAkWQA82ZBSaGbiOUOcI9rpRxMxT5kAjGmhhSSieTjtXFEuMYYOEtVIrFYC9ZCkuSSdT5P45ZBBvuniyPGZCZCFPDxkZBFhiRr0BRKje0ZBG7ylmeiJ10ImU8k3mpY5DdoPNT5yZCc6qZBF5jUZD'; function process(data) { if(data.data.length) { messages = messages.concat(data.data); } if(data.paging && data.paging.next) { console.log('Getting next page'); return $.getJSON(data.paging.next).then(process); } } $('.submit-id').click(function(){ messages = []; var messageId = $('.thread-id').val(); $.getJSON( 'https://graph.facebook.com/' + messageId + '/comments' + '?format=json&access_token=' + token ) .then(process) .then(function() { return messages; // location.href = URL.createObjectURL(blob); }) .then(function(messages) { var chart = c3.generate({ bindto: '.container', data: { x: 'count', columns: [ countWords(messages).axis, countWords(messages).columns, ], groups: [ ['count'] ], type: 'bar' }, axis: { x: { type: 'categorized', } }, transition: { duration: 1000 } }); }); }); }) ;
$(function(){ var messages = []; function process(data) { if(data.data.length) { messages = messages.concat(data.data); } if(data.paging && data.paging.next) { console.log('Getting next page'); return $.getJSON(data.paging.next).then(process); } } $('.submit-id').click(function(){ messages = []; var messageId = $('.thread-id').val(); var token = $('.token').val(); $.getJSON( 'https://graph.facebook.com/' + messageId + '/comments' + '?format=json&access_token=' + token ) .then(process) .then(function() { return messages; // location.href = URL.createObjectURL(blob); }) .then(function(messages) { var chart = c3.generate({ bindto: '.container', data: { x: 'count', columns: [ countWords(messages).axis, countWords(messages).columns, ], groups: [ ['count'] ], type: 'bar' }, axis: { x: { type: 'categorized', } }, transition: { duration: 1000 } }); }); }); }) ;
Allow user to put in access token
Allow user to put in access token
JavaScript
mit
davis/wordgraph,davis/wordgraph
javascript
## Code Before: $(function(){ var messages = []; var token = 'CAACEdEose0cBAPsc5EojEPsnGCVpG05fBKSV1N2WrZAJJ8ngZB55cAkWQA82ZBSaGbiOUOcI9rpRxMxT5kAjGmhhSSieTjtXFEuMYYOEtVIrFYC9ZCkuSSdT5P45ZBBvuniyPGZCZCFPDxkZBFhiRr0BRKje0ZBG7ylmeiJ10ImU8k3mpY5DdoPNT5yZCc6qZBF5jUZD'; function process(data) { if(data.data.length) { messages = messages.concat(data.data); } if(data.paging && data.paging.next) { console.log('Getting next page'); return $.getJSON(data.paging.next).then(process); } } $('.submit-id').click(function(){ messages = []; var messageId = $('.thread-id').val(); $.getJSON( 'https://graph.facebook.com/' + messageId + '/comments' + '?format=json&access_token=' + token ) .then(process) .then(function() { return messages; // location.href = URL.createObjectURL(blob); }) .then(function(messages) { var chart = c3.generate({ bindto: '.container', data: { x: 'count', columns: [ countWords(messages).axis, countWords(messages).columns, ], groups: [ ['count'] ], type: 'bar' }, axis: { x: { type: 'categorized', } }, transition: { duration: 1000 } }); }); }); }) ; ## Instruction: Allow user to put in access token ## Code After: $(function(){ var messages = []; function process(data) { if(data.data.length) { messages = messages.concat(data.data); } if(data.paging && data.paging.next) { console.log('Getting next page'); return $.getJSON(data.paging.next).then(process); } } $('.submit-id').click(function(){ messages = []; var messageId = $('.thread-id').val(); var token = $('.token').val(); $.getJSON( 'https://graph.facebook.com/' + messageId + '/comments' + '?format=json&access_token=' + token ) .then(process) .then(function() { return messages; // location.href = URL.createObjectURL(blob); }) .then(function(messages) { var chart = c3.generate({ bindto: '.container', data: { x: 'count', columns: [ countWords(messages).axis, countWords(messages).columns, ], groups: [ ['count'] ], type: 'bar' }, axis: { x: { type: 'categorized', } }, transition: { duration: 1000 } }); }); }); }) ;
$(function(){ var messages = []; - var token = 'CAACEdEose0cBAPsc5EojEPsnGCVpG05fBKSV1N2WrZAJJ8ngZB55cAkWQA82ZBSaGbiOUOcI9rpRxMxT5kAjGmhhSSieTjtXFEuMYYOEtVIrFYC9ZCkuSSdT5P45ZBBvuniyPGZCZCFPDxkZBFhiRr0BRKje0ZBG7ylmeiJ10ImU8k3mpY5DdoPNT5yZCc6qZBF5jUZD'; function process(data) { if(data.data.length) { messages = messages.concat(data.data); } if(data.paging && data.paging.next) { console.log('Getting next page'); return $.getJSON(data.paging.next).then(process); } } $('.submit-id').click(function(){ messages = []; var messageId = $('.thread-id').val(); + var token = $('.token').val(); $.getJSON( 'https://graph.facebook.com/' + messageId + '/comments' + '?format=json&access_token=' + token ) .then(process) .then(function() { return messages; // location.href = URL.createObjectURL(blob); }) .then(function(messages) { var chart = c3.generate({ bindto: '.container', data: { x: 'count', columns: [ countWords(messages).axis, countWords(messages).columns, ], groups: [ ['count'] ], type: 'bar' }, axis: { x: { type: 'categorized', } }, transition: { duration: 1000 } }); }); }); }) ;
2
0.037037
1
1
4c624108ccf9715b03ce3396b28c7306088a2e04
src/Framework/MockObject/MethodNameConstraint.php
src/Framework/MockObject/MethodNameConstraint.php
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\MockObject; use PHPUnit\Framework\Constraint\Constraint; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodNameConstraint extends Constraint { /** * @var string */ private $methodName; public function __construct(string $methodName) { $this->methodName = \strtolower($methodName); } public function toString(): string { return \sprintf( 'is "%s"', $this->methodName ); } protected function matches($other): bool { if (!\is_string($other)) { return false; } return $this->methodName === \strtolower($other); } }
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\MockObject; use PHPUnit\Framework\Constraint\Constraint; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodNameConstraint extends Constraint { /** * @var string */ private $methodName; public function __construct(string $methodName) { $this->methodName = $methodName; } public function toString(): string { return \sprintf( 'is "%s"', $this->methodName ); } protected function matches($other): bool { if (!\is_string($other)) { return false; } return \strtolower($this->methodName) === \strtolower($other); } }
Use original value in toString()
Use original value in toString()
PHP
bsd-3-clause
sebastianbergmann/phpunit,Firehed/phpunit
php
## Code Before: <?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\MockObject; use PHPUnit\Framework\Constraint\Constraint; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodNameConstraint extends Constraint { /** * @var string */ private $methodName; public function __construct(string $methodName) { $this->methodName = \strtolower($methodName); } public function toString(): string { return \sprintf( 'is "%s"', $this->methodName ); } protected function matches($other): bool { if (!\is_string($other)) { return false; } return $this->methodName === \strtolower($other); } } ## Instruction: Use original value in toString() ## Code After: <?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\MockObject; use PHPUnit\Framework\Constraint\Constraint; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodNameConstraint extends Constraint { /** * @var string */ private $methodName; public function __construct(string $methodName) { $this->methodName = $methodName; } public function toString(): string { return \sprintf( 'is "%s"', $this->methodName ); } protected function matches($other): bool { if (!\is_string($other)) { return false; } return \strtolower($this->methodName) === \strtolower($other); } }
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\MockObject; use PHPUnit\Framework\Constraint\Constraint; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodNameConstraint extends Constraint { /** * @var string */ private $methodName; public function __construct(string $methodName) { - $this->methodName = \strtolower($methodName); ? ------------ - + $this->methodName = $methodName; } public function toString(): string { return \sprintf( 'is "%s"', $this->methodName ); } protected function matches($other): bool { if (!\is_string($other)) { return false; } - return $this->methodName === \strtolower($other); + return \strtolower($this->methodName) === \strtolower($other); ? ++++++++++++ + } }
4
0.088889
2
2
6cc90e56ff0748856a7480c1d2ca83a77555f200
themes/novel/layouts/book/summary.html
themes/novel/layouts/book/summary.html
<div> <p> {{ with .Params.read }} {{ if not .end }}πŸ“–{{ end }} {{ if .end }}{{ if not .gaveup }}πŸ“š{{ end }}{{ end }} {{ if .gaveup }}πŸ“•{{ end }} {{ end }} {{ if .Content }}✏️{{ end }} "<em>{{ title .Title }}{{ if .Params.subtitle }}: {{ .Params.subtitle }}{{ end }}" by {{ .Params.author }}</em> </p> {{ with .Params.read }} <p>Started reading on <time class="dt-published" datetime="{{ .start.Format "2006-01-02T15:04:05Z07:00" }}">{{ .start.Format "January 2, 2006" }}</time></p> {{ if .end }}<p>{{ if gt .gaveup 0 }}Gave up reading{{ else }}Finished the book{{ end }} on <time class="dt-published" datetime="{{ .end.Format "2006-01-02T15:04:05Z07:00" }}">{{ .end.Format "January 2, 2006" }}</time>{{ if gt .gaveup 0 }}, after {{ .gaveup }} pages{{ end }}</p>{{ end }} {{ end }} <p>{{ if .Content }}<a href="{{ .Permalink }}">My notes on {{ title .Title }}</a>{{ end }}</p> </div>
<div> <p> {{ with .Params.read }} {{ if not .end }}πŸ“–{{ end }} {{ if .end }}{{ if not .gaveup }}πŸ“š{{ end }}{{ end }} {{ if .gaveup }}πŸ“•{{ end }} {{ end }} {{ if .Content }}✏️{{ end }} "<em>{{ title .Title }}{{ if .Params.subtitle }}: {{ .Params.subtitle }}{{ end }}" by {{ .Params.author }}</em> </p> {{ with .Params.read }} <p>Started reading on <time class="dt-published" datetime="{{ .start.Format "2006-01-02T15:04:05Z07:00" }}">{{ .start.Format "January 2, 2006" }}</time></p> {{ if .end }} <p>{{ if gt .gaveup 0 }}Gave up reading{{ else }}Finished the book{{ end }} on <time class="dt-published" datetime="{{ .end.Format "2006-01-02T15:04:05Z07:00" }}">{{ .end.Format "January 2, 2006" }}</time>{{ if gt .gaveup 0 }}, after {{ .gaveup }} pages{{ end }}</p> {{ $delta := .end.Sub .start }} <p>Completed in {{ math.Floor ( div $delta.Hours 24 ) }} days</p> {{ end }} {{ end }} <p>{{ if .Content }}<a href="{{ .Permalink }}">My notes on {{ title .Title }}</a>{{ end }}</p> </div>
Add completed in time for books
Add completed in time for books
HTML
mit
bronzehedwick/chrisdeluca,bronzehedwick/chrisdeluca,bronzehedwick/chrisdeluca,bronzehedwick/chrisdeluca
html
## Code Before: <div> <p> {{ with .Params.read }} {{ if not .end }}πŸ“–{{ end }} {{ if .end }}{{ if not .gaveup }}πŸ“š{{ end }}{{ end }} {{ if .gaveup }}πŸ“•{{ end }} {{ end }} {{ if .Content }}✏️{{ end }} "<em>{{ title .Title }}{{ if .Params.subtitle }}: {{ .Params.subtitle }}{{ end }}" by {{ .Params.author }}</em> </p> {{ with .Params.read }} <p>Started reading on <time class="dt-published" datetime="{{ .start.Format "2006-01-02T15:04:05Z07:00" }}">{{ .start.Format "January 2, 2006" }}</time></p> {{ if .end }}<p>{{ if gt .gaveup 0 }}Gave up reading{{ else }}Finished the book{{ end }} on <time class="dt-published" datetime="{{ .end.Format "2006-01-02T15:04:05Z07:00" }}">{{ .end.Format "January 2, 2006" }}</time>{{ if gt .gaveup 0 }}, after {{ .gaveup }} pages{{ end }}</p>{{ end }} {{ end }} <p>{{ if .Content }}<a href="{{ .Permalink }}">My notes on {{ title .Title }}</a>{{ end }}</p> </div> ## Instruction: Add completed in time for books ## Code After: <div> <p> {{ with .Params.read }} {{ if not .end }}πŸ“–{{ end }} {{ if .end }}{{ if not .gaveup }}πŸ“š{{ end }}{{ end }} {{ if .gaveup }}πŸ“•{{ end }} {{ end }} {{ if .Content }}✏️{{ end }} "<em>{{ title .Title }}{{ if .Params.subtitle }}: {{ .Params.subtitle }}{{ end }}" by {{ .Params.author }}</em> </p> {{ with .Params.read }} <p>Started reading on <time class="dt-published" datetime="{{ .start.Format "2006-01-02T15:04:05Z07:00" }}">{{ .start.Format "January 2, 2006" }}</time></p> {{ if .end }} <p>{{ if gt .gaveup 0 }}Gave up reading{{ else }}Finished the book{{ end }} on <time class="dt-published" datetime="{{ .end.Format "2006-01-02T15:04:05Z07:00" }}">{{ .end.Format "January 2, 2006" }}</time>{{ if gt .gaveup 0 }}, after {{ .gaveup }} pages{{ end }}</p> {{ $delta := .end.Sub .start }} <p>Completed in {{ math.Floor ( div $delta.Hours 24 ) }} days</p> {{ end }} {{ end }} <p>{{ if .Content }}<a href="{{ .Permalink }}">My notes on {{ title .Title }}</a>{{ end }}</p> </div>
<div> <p> {{ with .Params.read }} {{ if not .end }}πŸ“–{{ end }} {{ if .end }}{{ if not .gaveup }}πŸ“š{{ end }}{{ end }} {{ if .gaveup }}πŸ“•{{ end }} {{ end }} {{ if .Content }}✏️{{ end }} "<em>{{ title .Title }}{{ if .Params.subtitle }}: {{ .Params.subtitle }}{{ end }}" by {{ .Params.author }}</em> </p> {{ with .Params.read }} <p>Started reading on <time class="dt-published" datetime="{{ .start.Format "2006-01-02T15:04:05Z07:00" }}">{{ .start.Format "January 2, 2006" }}</time></p> + {{ if .end }} - {{ if .end }}<p>{{ if gt .gaveup 0 }}Gave up reading{{ else }}Finished the book{{ end }} on <time class="dt-published" datetime="{{ .end.Format "2006-01-02T15:04:05Z07:00" }}">{{ .end.Format "January 2, 2006" }}</time>{{ if gt .gaveup 0 }}, after {{ .gaveup }} pages{{ end }}</p>{{ end }} ? ^^^^^^^^^^^^^ --------- + <p>{{ if gt .gaveup 0 }}Gave up reading{{ else }}Finished the book{{ end }} on <time class="dt-published" datetime="{{ .end.Format "2006-01-02T15:04:05Z07:00" }}">{{ .end.Format "January 2, 2006" }}</time>{{ if gt .gaveup 0 }}, after {{ .gaveup }} pages{{ end }}</p> ? ^^ + {{ $delta := .end.Sub .start }} + <p>Completed in {{ math.Floor ( div $delta.Hours 24 ) }} days</p> + {{ end }} {{ end }} <p>{{ if .Content }}<a href="{{ .Permalink }}">My notes on {{ title .Title }}</a>{{ end }}</p> </div>
6
0.375
5
1
0b6f08ead739db63f9c1033a7de716df1d75d132
cucumber.yml
cucumber.yml
<% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format pretty #{rerun}" std_opts = "--format progress features --tags ~@wip" begin require 'rspec/expectations' std_opts << ' --tags ~@rspec1' rescue LoadError # rspec 1 std_opts << ' --tags ~@rspec2' end %> default: <%= std_opts %> --dotcucumber features/.cucumber jruby: <%= std_opts %> --tags ~@spork --tags ~@wire jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 wip: --tags @wip:3 --wip features none: --format pretty rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
<% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format pretty #{rerun}" std_opts = "--format progress features --tags ~@wip" begin require 'rspec/expectations' std_opts << ' --tags ~@rspec1' rescue LoadError # rspec 1 std_opts << ' --tags ~@rspec2' end %> default: <%= std_opts %> --tags ~@jruby --dotcucumber features/.cucumber jruby: <%= std_opts %> --tags ~@spork --tags ~@wire jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 wip: --tags @wip:3 --wip features none: --format pretty rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
Exclude jruby scenarios by default
Exclude jruby scenarios by default
YAML
mit
dg-ratiodata/cucumber-ruby,marxarelli/cucumber,cucumber/cucumber-ruby,danascheider/cucumber-ruby,shivashankar2020/mands,shivashankar2020/mands,enkessler/cucumber-ruby,twalpole/cucumber,richarda/cucumber,cucumber/cucumber-ruby,jasonkarns/cucumber-ruby,jasonkarns/cucumber-ruby,shadow000902/cucumber-ruby,brasmusson/cucumber,nfredrik/cucumber-ruby,CW5000/CWFDerpy,sideci-sample/sideci-sample-cucumber,CW5000/CWFDerpy,phoebeclarke/cucumber-ruby,martinma4/cucumber-ruby,enkessler/cucumber-ruby,martinma4/cucumber-ruby,shadow000902/cucumber-ruby,dg-ratiodata/cucumber-ruby,twalpole/cucumber,richarda/cucumber,nfredrik/cucumber-ruby,dg-ratiodata/cucumber-ruby,cucumber/cucumber-ruby,sideci-sample/sideci-sample-cucumber,marxarelli/cucumber,enkessler/cucumber-ruby,phoebeclarke/cucumber-ruby,jasonkarns/cucumber-ruby,danascheider/cucumber-ruby,tom025/cucumber,tom025/cucumber,tom025/cucumber,shivashankar2020/mands,brasmusson/cucumber
yaml
## Code Before: <% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format pretty #{rerun}" std_opts = "--format progress features --tags ~@wip" begin require 'rspec/expectations' std_opts << ' --tags ~@rspec1' rescue LoadError # rspec 1 std_opts << ' --tags ~@rspec2' end %> default: <%= std_opts %> --dotcucumber features/.cucumber jruby: <%= std_opts %> --tags ~@spork --tags ~@wire jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 wip: --tags @wip:3 --wip features none: --format pretty rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip ## Instruction: Exclude jruby scenarios by default ## Code After: <% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format pretty #{rerun}" std_opts = "--format progress features --tags ~@wip" begin require 'rspec/expectations' std_opts << ' --tags ~@rspec1' rescue LoadError # rspec 1 std_opts << ' --tags ~@rspec2' end %> default: <%= std_opts %> --tags ~@jruby --dotcucumber features/.cucumber jruby: <%= std_opts %> --tags ~@spork --tags ~@wire jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 wip: --tags @wip:3 --wip features none: --format pretty rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
<% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format pretty #{rerun}" std_opts = "--format progress features --tags ~@wip" begin require 'rspec/expectations' std_opts << ' --tags ~@rspec1' rescue LoadError # rspec 1 std_opts << ' --tags ~@rspec2' end %> - default: <%= std_opts %> --dotcucumber features/.cucumber + default: <%= std_opts %> --tags ~@jruby --dotcucumber features/.cucumber ? +++++++++++++++ jruby: <%= std_opts %> --tags ~@spork --tags ~@wire jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 wip: --tags @wip:3 --wip features none: --format pretty rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
2
0.1
1
1
f40515eca42c99a00a477ac1ebab98a0213c1137
src/plugins/Url/UrlUI.js
src/plugins/Url/UrlUI.js
const { h, Component } = require('preact') class UrlUI extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } componentDidMount () { // My guess about why browser scrolls to top on focus: // Component is mounted right away, but the tab panel might be animating // still, so input element is positioned outside viewport. This fixes it. setTimeout(() => { this.input.focus({ preventScroll: true }) }, 150) } handleClick () { this.props.addFile(this.input.value) } render () { return <div class="uppy-Url"> <input class="uppy-c-textInput uppy-Url-input" type="text" placeholder={this.props.i18n('enterUrlToImport')} ref={(input) => { this.input = input }} /> <button class="uppy-Url-importButton" type="button" aria-label={this.props.i18n('addUrl')} onclick={this.handleClick}> {this.props.i18n('import')} </button> </div> } } module.exports = UrlUI
const { h, Component } = require('preact') class UrlUI extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } componentDidMount () { // My guess about why browser scrolls to top on focus: // Component is mounted right away, but the tab panel might be animating // still, so input element is positioned outside viewport. This fixes it. setTimeout(() => { this.input.focus({ preventScroll: true }) }, 150) } handleClick () { this.props.addFile(this.input.value) } render () { return <div class="uppy-Url"> <input class="uppy-c-textInput uppy-Url-input" type="text" placeholder={this.props.i18n('enterUrlToImport')} value="" ref={(input) => { this.input = input }} /> <button class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton" type="button" aria-label={this.props.i18n('addUrl')} onclick={this.handleClick}> {this.props.i18n('import')} </button> </div> } } module.exports = UrlUI
Reset input value so that when you return previous url is cleared
Reset input value so that when you return previous url is cleared
JavaScript
mit
transloadit/uppy,transloadit/uppy,transloadit/uppy,transloadit/uppy
javascript
## Code Before: const { h, Component } = require('preact') class UrlUI extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } componentDidMount () { // My guess about why browser scrolls to top on focus: // Component is mounted right away, but the tab panel might be animating // still, so input element is positioned outside viewport. This fixes it. setTimeout(() => { this.input.focus({ preventScroll: true }) }, 150) } handleClick () { this.props.addFile(this.input.value) } render () { return <div class="uppy-Url"> <input class="uppy-c-textInput uppy-Url-input" type="text" placeholder={this.props.i18n('enterUrlToImport')} ref={(input) => { this.input = input }} /> <button class="uppy-Url-importButton" type="button" aria-label={this.props.i18n('addUrl')} onclick={this.handleClick}> {this.props.i18n('import')} </button> </div> } } module.exports = UrlUI ## Instruction: Reset input value so that when you return previous url is cleared ## Code After: const { h, Component } = require('preact') class UrlUI extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } componentDidMount () { // My guess about why browser scrolls to top on focus: // Component is mounted right away, but the tab panel might be animating // still, so input element is positioned outside viewport. This fixes it. setTimeout(() => { this.input.focus({ preventScroll: true }) }, 150) } handleClick () { this.props.addFile(this.input.value) } render () { return <div class="uppy-Url"> <input class="uppy-c-textInput uppy-Url-input" type="text" placeholder={this.props.i18n('enterUrlToImport')} value="" ref={(input) => { this.input = input }} /> <button class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton" type="button" aria-label={this.props.i18n('addUrl')} onclick={this.handleClick}> {this.props.i18n('import')} </button> </div> } } module.exports = UrlUI
const { h, Component } = require('preact') class UrlUI extends Component { constructor (props) { super(props) this.handleClick = this.handleClick.bind(this) } componentDidMount () { // My guess about why browser scrolls to top on focus: // Component is mounted right away, but the tab panel might be animating // still, so input element is positioned outside viewport. This fixes it. setTimeout(() => { this.input.focus({ preventScroll: true }) }, 150) } handleClick () { this.props.addFile(this.input.value) } render () { return <div class="uppy-Url"> <input class="uppy-c-textInput uppy-Url-input" type="text" placeholder={this.props.i18n('enterUrlToImport')} + value="" ref={(input) => { this.input = input }} /> <button - class="uppy-Url-importButton" + class="uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton" type="button" aria-label={this.props.i18n('addUrl')} onclick={this.handleClick}> {this.props.i18n('import')} </button> </div> } } module.exports = UrlUI
3
0.075
2
1
8557611cc667dead9caf5fce87e7dfb146eaf348
WHOSUSING.md
WHOSUSING.md
We would like to keep track of whose using Conductor. Please send a pull request with your company name and Github handle. * [Netflix](www.netflix.com) [[@aravindanr](https://github.com/aravindanr)] * [Florida Blue](www.bcbsfl.com) [[@rickfish](https://github.com/rickfish)] * [UWM](www.uwm.com)[[@zergrushjoe](https://github.com/ZergRushJoe)] * [Deutsche Telekom Digital Labs](https://dtdl.in) [[@jas34](https://github.com/jas34)] [[@deoramanas](https://github.com/deoramanas)]
We would like to keep track of whose using Conductor. Please send a pull request with your company name and Github handle. * [Netflix](www.netflix.com) [[@aravindanr](https://github.com/aravindanr)] * [Florida Blue](www.bcbsfl.com) [[@rickfish](https://github.com/rickfish)] * [UWM](www.uwm.com)[[@zergrushjoe](https://github.com/ZergRushJoe)] * [Deutsche Telekom Digital Labs](https://dtdl.in) [[@jas34](https://github.com/jas34)] [[@deoramanas](https://github.com/deoramanas)] * [VMware](www.vmware.com) [[@taojwmware](https://github.com/taojwmware)] [[@venkag](https://github.com/venkag)]
Add vmware as conductor user
Add vmware as conductor user Signed-off-by: Tao Jiang <719f947e456842559535872e475dc527701ccb8b@vmware.com>
Markdown
apache-2.0
Netflix/conductor,Netflix/conductor,Netflix/conductor,Netflix/conductor,Netflix/conductor
markdown
## Code Before: We would like to keep track of whose using Conductor. Please send a pull request with your company name and Github handle. * [Netflix](www.netflix.com) [[@aravindanr](https://github.com/aravindanr)] * [Florida Blue](www.bcbsfl.com) [[@rickfish](https://github.com/rickfish)] * [UWM](www.uwm.com)[[@zergrushjoe](https://github.com/ZergRushJoe)] * [Deutsche Telekom Digital Labs](https://dtdl.in) [[@jas34](https://github.com/jas34)] [[@deoramanas](https://github.com/deoramanas)] ## Instruction: Add vmware as conductor user Signed-off-by: Tao Jiang <719f947e456842559535872e475dc527701ccb8b@vmware.com> ## Code After: We would like to keep track of whose using Conductor. Please send a pull request with your company name and Github handle. * [Netflix](www.netflix.com) [[@aravindanr](https://github.com/aravindanr)] * [Florida Blue](www.bcbsfl.com) [[@rickfish](https://github.com/rickfish)] * [UWM](www.uwm.com)[[@zergrushjoe](https://github.com/ZergRushJoe)] * [Deutsche Telekom Digital Labs](https://dtdl.in) [[@jas34](https://github.com/jas34)] [[@deoramanas](https://github.com/deoramanas)] * [VMware](www.vmware.com) [[@taojwmware](https://github.com/taojwmware)] [[@venkag](https://github.com/venkag)]
We would like to keep track of whose using Conductor. Please send a pull request with your company name and Github handle. * [Netflix](www.netflix.com) [[@aravindanr](https://github.com/aravindanr)] * [Florida Blue](www.bcbsfl.com) [[@rickfish](https://github.com/rickfish)] * [UWM](www.uwm.com)[[@zergrushjoe](https://github.com/ZergRushJoe)] * [Deutsche Telekom Digital Labs](https://dtdl.in) [[@jas34](https://github.com/jas34)] [[@deoramanas](https://github.com/deoramanas)] + * [VMware](www.vmware.com) [[@taojwmware](https://github.com/taojwmware)] [[@venkag](https://github.com/venkag)]
1
0.125
1
0
d4009a17b9bac60b76f579f798b1cc2c631a2add
node_server/views/authed_index.html
node_server/views/authed_index.html
<html> <head></head> <body> <h1>You're Authenticated!</h1> <h3>Hello <%- user_info.name %></h3> <a href="/roster">Click here to see your current roster</a> </body> </html>
<html> <head></head> <body> <h1>You're Authenticated!</h1> <h3>Hello <%- user_info.name %></h3> <% if (user_info.photo) { %> <img src="<%- user_info.photo %>"> <br> <% } %> <a href="/roster">Click here to see your current roster</a> </body> </html>
Add photo to successfully authenticated page for node server
Add photo to successfully authenticated page for node server
HTML
mit
TandaHQ/api-v2-code-samples,TandaHQ/api-v2-code-samples,TandaHQ/api-v2-code-samples,TandaHQ/api-v2-code-samples
html
## Code Before: <html> <head></head> <body> <h1>You're Authenticated!</h1> <h3>Hello <%- user_info.name %></h3> <a href="/roster">Click here to see your current roster</a> </body> </html> ## Instruction: Add photo to successfully authenticated page for node server ## Code After: <html> <head></head> <body> <h1>You're Authenticated!</h1> <h3>Hello <%- user_info.name %></h3> <% if (user_info.photo) { %> <img src="<%- user_info.photo %>"> <br> <% } %> <a href="/roster">Click here to see your current roster</a> </body> </html>
<html> <head></head> <body> <h1>You're Authenticated!</h1> <h3>Hello <%- user_info.name %></h3> + <% if (user_info.photo) { %> + <img src="<%- user_info.photo %>"> + <br> + <% } %> <a href="/roster">Click here to see your current roster</a> </body> </html>
4
0.5
4
0
32f1ed76016bf19b2ac8e165be3648a773a40bea
.travis.yml
.travis.yml
language: node_js node_js: - "node" before_install: - gem install sass - gem install compass install: npm install --save-dev script: npm run-script eslint && npm run-script build
language: node_js node_js: - "node" before_install: - rvm install 2.0.0 - gem install sass - gem install compass install: npm install --save-dev script: npm run-script eslint && npm run-script build
Use ruby 2.0.0 on Travis
Use ruby 2.0.0 on Travis
YAML
mit
sethlu/ica,sethlu/ica,sethlu/ica,many-to-many/ica,many-to-many/ica,many-to-many/ica
yaml
## Code Before: language: node_js node_js: - "node" before_install: - gem install sass - gem install compass install: npm install --save-dev script: npm run-script eslint && npm run-script build ## Instruction: Use ruby 2.0.0 on Travis ## Code After: language: node_js node_js: - "node" before_install: - rvm install 2.0.0 - gem install sass - gem install compass install: npm install --save-dev script: npm run-script eslint && npm run-script build
language: node_js node_js: - "node" before_install: + - rvm install 2.0.0 - gem install sass - gem install compass install: npm install --save-dev script: npm run-script eslint && npm run-script build
1
0.111111
1
0
d3fde89b7cf7d7c30488ea0f106c812d08a400ca
LaTeX/resources.md
LaTeX/resources.md
- #### Ubuntu ```$ sudo apt-get install texlive-full``` ```$ sudo apt-get install texmaker``` - #### Windows Download and Install [MikTeX](https://miktex.org/download) and [TeXstudio](http://www.texstudio.org/) ## Tutorials - [Creating a LaTeX Document](https://www.youtube.com/watch?v=SoDv0qhyysQ) - [LaTeX Tutorials](https://www.latex-tutorial.com) - [Getting Started with LATEX](http://www.rpi.edu/dept/arc/training/latex/class-slides-pc.pdf) ## Templates - [Resumes](https://www.sharelatex.com/templates/cv-or-resume) - [IEEE LaTeX Templates](https://www.ieee.org/documents/ieee-latex-conference-template.zip) - [Letters](https://en.wikibooks.org/wiki/LaTeX/Letters) - [Lab/Project](https://www.overleaf.com/gallery/tagged/report) ## Online LaTeX Compilers - [ShareLaTeX](https://www.sharelatex.com) - [Overleaf](https://www.overleaf.com)
- #### Ubuntu $ sudo apt-get install texlive-full $ sudo apt-get install texmaker - #### Windows Download and install [MikTeX](https://miktex.org/download) and [TeXstudio](http://www.texstudio.org/) - #### macOS Download and install [MacTeX](https://www.tug.org/mactex/) and [TeXworks](https://www.tug.org/texworks/) ## Tutorials - [Creating a LaTeX Document](https://www.youtube.com/watch?v=SoDv0qhyysQ) - [LaTeX Tutorials](https://www.latex-tutorial.com) - [Getting Started with LATEX](http://www.rpi.edu/dept/arc/training/latex/class-slides-pc.pdf) ## Templates - [Resumes](https://www.sharelatex.com/templates/cv-or-resume) - [IEEE LaTeX Templates](https://www.ieee.org/documents/ieee-latex-conference-template.zip) - [Letters](https://en.wikibooks.org/wiki/LaTeX/Letters) - [Lab/Project](https://www.overleaf.com/gallery/tagged/report) ## Online LaTeX Compilers - [ShareLaTeX](https://www.sharelatex.com) - [Overleaf](https://www.overleaf.com)
Update LaTeX section (macOS installation and formatting)
Update LaTeX section (macOS installation and formatting)
Markdown
mit
vicky002/AlgoWiki,attomos/AlgoWiki,attomos/AlgoWiki,vicky002/AlgoWiki
markdown
## Code Before: - #### Ubuntu ```$ sudo apt-get install texlive-full``` ```$ sudo apt-get install texmaker``` - #### Windows Download and Install [MikTeX](https://miktex.org/download) and [TeXstudio](http://www.texstudio.org/) ## Tutorials - [Creating a LaTeX Document](https://www.youtube.com/watch?v=SoDv0qhyysQ) - [LaTeX Tutorials](https://www.latex-tutorial.com) - [Getting Started with LATEX](http://www.rpi.edu/dept/arc/training/latex/class-slides-pc.pdf) ## Templates - [Resumes](https://www.sharelatex.com/templates/cv-or-resume) - [IEEE LaTeX Templates](https://www.ieee.org/documents/ieee-latex-conference-template.zip) - [Letters](https://en.wikibooks.org/wiki/LaTeX/Letters) - [Lab/Project](https://www.overleaf.com/gallery/tagged/report) ## Online LaTeX Compilers - [ShareLaTeX](https://www.sharelatex.com) - [Overleaf](https://www.overleaf.com) ## Instruction: Update LaTeX section (macOS installation and formatting) ## Code After: - #### Ubuntu $ sudo apt-get install texlive-full $ sudo apt-get install texmaker - #### Windows Download and install [MikTeX](https://miktex.org/download) and [TeXstudio](http://www.texstudio.org/) - #### macOS Download and install [MacTeX](https://www.tug.org/mactex/) and [TeXworks](https://www.tug.org/texworks/) ## Tutorials - [Creating a LaTeX Document](https://www.youtube.com/watch?v=SoDv0qhyysQ) - [LaTeX Tutorials](https://www.latex-tutorial.com) - [Getting Started with LATEX](http://www.rpi.edu/dept/arc/training/latex/class-slides-pc.pdf) ## Templates - [Resumes](https://www.sharelatex.com/templates/cv-or-resume) - [IEEE LaTeX Templates](https://www.ieee.org/documents/ieee-latex-conference-template.zip) - [Letters](https://en.wikibooks.org/wiki/LaTeX/Letters) - [Lab/Project](https://www.overleaf.com/gallery/tagged/report) ## Online LaTeX Compilers - [ShareLaTeX](https://www.sharelatex.com) - [Overleaf](https://www.overleaf.com)
- #### Ubuntu + - ```$ sudo apt-get install texlive-full``` ? ^^^ --- + $ sudo apt-get install texlive-full ? ^^^^^ + - ```$ sudo apt-get install texmaker``` ? ^^^ --- + $ sudo apt-get install texmaker ? ^^^^^ + - #### Windows - Download and Install [MikTeX](https://miktex.org/download) and [TeXstudio](http://www.texstudio.org/) ? - ^ + Download and install [MikTeX](https://miktex.org/download) and [TeXstudio](http://www.texstudio.org/) ? ^ + - #### macOS + Download and install [MacTeX](https://www.tug.org/mactex/) and [TeXworks](https://www.tug.org/texworks/) ## Tutorials - [Creating a LaTeX Document](https://www.youtube.com/watch?v=SoDv0qhyysQ) - [LaTeX Tutorials](https://www.latex-tutorial.com) - [Getting Started with LATEX](http://www.rpi.edu/dept/arc/training/latex/class-slides-pc.pdf) ## Templates - [Resumes](https://www.sharelatex.com/templates/cv-or-resume) - [IEEE LaTeX Templates](https://www.ieee.org/documents/ieee-latex-conference-template.zip) - [Letters](https://en.wikibooks.org/wiki/LaTeX/Letters) - [Lab/Project](https://www.overleaf.com/gallery/tagged/report) ## Online LaTeX Compilers - [ShareLaTeX](https://www.sharelatex.com) - [Overleaf](https://www.overleaf.com)
11
0.55
8
3
e187e6ae424e01c86906bbd29036a02186821ce4
src/damis/templates/damis/experiment_list.html
src/damis/templates/damis/experiment_list.html
{% extends "base.html" %} {% load i18n %} {% get_current_language as lang %} {% block menu %} {% include 'menu.html' with active='experiments' %} {% endblock %} {% block content %} <div class="span12"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs" id="myTab2"> <li class="active"><a href="{% url 'experiment-list' %}">{% trans "Experiments" %}</a></li> <li><a href="{% url 'experiment-new' %}">{% trans "New experiment" %}</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="data-list"> <table class="table table-hover"> <thead> <tr> <th>{% trans "Title" %}</th> </tr> </thead> <tbody> {% for obj in object_list %} <tr><td> {{ obj }}</td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> {% endblock %}
{% extends "base.html" %} {% load i18n %} {% get_current_language as lang %} {% block menu %} {% include 'menu.html' with active='experiments' %} {% endblock %} {% block content %} <div class="span12"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs" id="myTab2"> <li class="active"><a href="{% url 'experiment-list' %}">{% trans "Experiments" %}</a></li> <li><a href="{% url 'experiment-new' %}">{% trans "New experiment" %}</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="data-list"> <table class="table table-hover"> <thead> <tr> <th>{% trans "Title" %}</th> <th>{% trans "Status" %}</th> <th>{% trans "Results" %}</th> </tr> </thead> <tbody> {% for obj in object_list %} <tr> <td> {{ obj.title }}</td> <td> {{ obj.status }}</td> <td> <button type="button" class="btn btn-small"><i class="icon-th-list"></i></button> </td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> {% endblock %}
Add status and result columns in experiment-list page.
Add status and result columns in experiment-list page.
HTML
agpl-3.0
InScience/DAMIS-old,InScience/DAMIS-old
html
## Code Before: {% extends "base.html" %} {% load i18n %} {% get_current_language as lang %} {% block menu %} {% include 'menu.html' with active='experiments' %} {% endblock %} {% block content %} <div class="span12"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs" id="myTab2"> <li class="active"><a href="{% url 'experiment-list' %}">{% trans "Experiments" %}</a></li> <li><a href="{% url 'experiment-new' %}">{% trans "New experiment" %}</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="data-list"> <table class="table table-hover"> <thead> <tr> <th>{% trans "Title" %}</th> </tr> </thead> <tbody> {% for obj in object_list %} <tr><td> {{ obj }}</td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> {% endblock %} ## Instruction: Add status and result columns in experiment-list page. ## Code After: {% extends "base.html" %} {% load i18n %} {% get_current_language as lang %} {% block menu %} {% include 'menu.html' with active='experiments' %} {% endblock %} {% block content %} <div class="span12"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs" id="myTab2"> <li class="active"><a href="{% url 'experiment-list' %}">{% trans "Experiments" %}</a></li> <li><a href="{% url 'experiment-new' %}">{% trans "New experiment" %}</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="data-list"> <table class="table table-hover"> <thead> <tr> <th>{% trans "Title" %}</th> <th>{% trans "Status" %}</th> <th>{% trans "Results" %}</th> </tr> </thead> <tbody> {% for obj in object_list %} <tr> <td> {{ obj.title }}</td> <td> {{ obj.status }}</td> <td> <button type="button" class="btn btn-small"><i class="icon-th-list"></i></button> </td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> {% endblock %}
{% extends "base.html" %} {% load i18n %} {% get_current_language as lang %} {% block menu %} {% include 'menu.html' with active='experiments' %} {% endblock %} {% block content %} <div class="span12"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-tabs" id="myTab2"> <li class="active"><a href="{% url 'experiment-list' %}">{% trans "Experiments" %}</a></li> <li><a href="{% url 'experiment-new' %}">{% trans "New experiment" %}</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="data-list"> <table class="table table-hover"> <thead> <tr> <th>{% trans "Title" %}</th> + <th>{% trans "Status" %}</th> + <th>{% trans "Results" %}</th> </tr> </thead> <tbody> {% for obj in object_list %} + <tr> - <tr><td> {{ obj }}</td> ? ---- + <td> {{ obj.title }}</td> ? ++++ ++++++ + <td> {{ obj.status }}</td> + <td> + <button type="button" class="btn btn-small"><i class="icon-th-list"></i></button> + </td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> {% endblock %}
9
0.257143
8
1
355a9722f06f31008098ecf1d3c2dc23cef5c700
README.md
README.md
Web hosting infrastructure for Feevale 2015. ## Dependencies - Vagrant ## Makefile commands ```console # start all VMs make start # stop all VMs make stop # list services running on containers make services # get and publish landing page make create-landing-page # unpublish and remove landing page make destroy-landing-page # create a PostgreSQL database make create-postgres # destroy a PostgreSQL database make destroy-postgres ```
Web hosting infrastructure for Feevale 2015. ## Dependencies - GNU Make - Vagrant ## Makefile commands ```console # start all VMs make start # stop all VMs make stop # list services running on containers make services # get and publish landing page make create-landing-page # unpublish and remove landing page make destroy-landing-page # create a PostgreSQL database make create-postgres # destroy a PostgreSQL database make destroy-postgres ```
Add GNU Make as dependency
Add GNU Make as dependency
Markdown
apache-2.0
paulodiovani/feevale-instalacao-servidores-2015
markdown
## Code Before: Web hosting infrastructure for Feevale 2015. ## Dependencies - Vagrant ## Makefile commands ```console # start all VMs make start # stop all VMs make stop # list services running on containers make services # get and publish landing page make create-landing-page # unpublish and remove landing page make destroy-landing-page # create a PostgreSQL database make create-postgres # destroy a PostgreSQL database make destroy-postgres ``` ## Instruction: Add GNU Make as dependency ## Code After: Web hosting infrastructure for Feevale 2015. ## Dependencies - GNU Make - Vagrant ## Makefile commands ```console # start all VMs make start # stop all VMs make stop # list services running on containers make services # get and publish landing page make create-landing-page # unpublish and remove landing page make destroy-landing-page # create a PostgreSQL database make create-postgres # destroy a PostgreSQL database make destroy-postgres ```
Web hosting infrastructure for Feevale 2015. ## Dependencies + - GNU Make - Vagrant ## Makefile commands ```console # start all VMs make start # stop all VMs make stop # list services running on containers make services # get and publish landing page make create-landing-page # unpublish and remove landing page make destroy-landing-page # create a PostgreSQL database make create-postgres # destroy a PostgreSQL database make destroy-postgres ```
1
0.03125
1
0
71e9d0daac52cd46f365a17c2f51df71ec30733c
check/check_suite_test.go
check/check_suite_test.go
package check_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "testing" ) var fakeBin string func TestCheck(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "check") } var _ = BeforeSuite(func() { var err error fakeBin, err = gexec.Build("github.com/st3v/waitfor/check/fake/command") Expect(err).ToNot(HaveOccurred()) }) var _ = AfterSuite(func() { gexec.CleanupBuildArtifacts() })
package check_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "testing" ) var fakeBin string func TestCheck(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "check") } var _ = BeforeSuite(func() { var err error fakeBin, err = gexec.Build("./fake/command") Expect(err).ToNot(HaveOccurred()) }) var _ = AfterSuite(func() { gexec.CleanupBuildArtifacts() })
Use relative package path in test
Use relative package path in test
Go
apache-2.0
st3v/waitfor
go
## Code Before: package check_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "testing" ) var fakeBin string func TestCheck(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "check") } var _ = BeforeSuite(func() { var err error fakeBin, err = gexec.Build("github.com/st3v/waitfor/check/fake/command") Expect(err).ToNot(HaveOccurred()) }) var _ = AfterSuite(func() { gexec.CleanupBuildArtifacts() }) ## Instruction: Use relative package path in test ## Code After: package check_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "testing" ) var fakeBin string func TestCheck(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "check") } var _ = BeforeSuite(func() { var err error fakeBin, err = gexec.Build("./fake/command") Expect(err).ToNot(HaveOccurred()) }) var _ = AfterSuite(func() { gexec.CleanupBuildArtifacts() })
package check_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "testing" ) var fakeBin string func TestCheck(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "check") } var _ = BeforeSuite(func() { var err error - fakeBin, err = gexec.Build("github.com/st3v/waitfor/check/fake/command") ? ------ ---------------------- + fakeBin, err = gexec.Build("./fake/command") Expect(err).ToNot(HaveOccurred()) }) var _ = AfterSuite(func() { gexec.CleanupBuildArtifacts() })
2
0.076923
1
1
1d29e3fcdde81b1629ba1ece7f00d990b634a56b
release-please-config.json
release-please-config.json
{ "release-as": "8.6.0", "last-release-sha": "ac3dff70a886f7196da390b3b42836a0602248d7", "release-type": "node", "draft": true, "changelog-sections": [ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "refactor", "section": "Refactoring", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false } ], "packages": { "src": { "package-name": "butler" } } }
{ "release-type": "node", "draft": true, "changelog-sections": [ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "refactor", "section": "Refactoring", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false } ], "packages": { "src": { "package-name": "butler" } } }
Revert back to normal versioning
Revert back to normal versioning
JSON
mit
mountaindude/butler
json
## Code Before: { "release-as": "8.6.0", "last-release-sha": "ac3dff70a886f7196da390b3b42836a0602248d7", "release-type": "node", "draft": true, "changelog-sections": [ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "refactor", "section": "Refactoring", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false } ], "packages": { "src": { "package-name": "butler" } } } ## Instruction: Revert back to normal versioning ## Code After: { "release-type": "node", "draft": true, "changelog-sections": [ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "refactor", "section": "Refactoring", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false } ], "packages": { "src": { "package-name": "butler" } } }
{ - "release-as": "8.6.0", - "last-release-sha": "ac3dff70a886f7196da390b3b42836a0602248d7", "release-type": "node", "draft": true, "changelog-sections": [ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "refactor", "section": "Refactoring", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false } ], "packages": { "src": { "package-name": "butler" } } }
2
0.052632
0
2
521b240b0ae1d6c1ccccf620d87e0bfe8353a5bf
lib/gcore/api/stores/sales_orders.rb
lib/gcore/api/stores/sales_orders.rb
require 'json' require 'rest-client' module Gcore class Api class Stores class SalesOrders def self.list(params = {}) store_code = params[:store_id] || params[:store_code] allowed_params = [:limit, :page] url_params = params.select{|key, value| allowed_params.include? key} || {} url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: url_params)), {symbolize_names: true}) end def self.sku_count(params = {}) store_code = params[:store_id] || params[:store_code] sku = params[:sku] url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders/sku_count/#{sku}" JSON.parse(RestClient.get(url, Gcore::Api.header), {symbolize_names: true}) end end end end end
require 'json' require 'rest-client' require 'base64' module Gcore class Api class Stores class SalesOrders def self.list(params = {}) store_code = params[:store_id] || params[:store_code] allowed_params = [:limit, :page] url_params = params.select{|key, value| allowed_params.include? key} || {} url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: url_params)), {symbolize_names: true}) end def self.sku_count(params = {}) store_code = params[:store_id] || params[:store_code] #Allow web unsafe SKU's sku = Base64.urlsafe_encode64(params[:sku]) url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders/sku_count/#{sku}" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: {is_base64: "true"})), {symbolize_names: true}) end end end end end
Allow non-websafe SKU's for sku_count
Allow non-websafe SKU's for sku_count
Ruby
mit
galorelabs/gcore-ruby
ruby
## Code Before: require 'json' require 'rest-client' module Gcore class Api class Stores class SalesOrders def self.list(params = {}) store_code = params[:store_id] || params[:store_code] allowed_params = [:limit, :page] url_params = params.select{|key, value| allowed_params.include? key} || {} url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: url_params)), {symbolize_names: true}) end def self.sku_count(params = {}) store_code = params[:store_id] || params[:store_code] sku = params[:sku] url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders/sku_count/#{sku}" JSON.parse(RestClient.get(url, Gcore::Api.header), {symbolize_names: true}) end end end end end ## Instruction: Allow non-websafe SKU's for sku_count ## Code After: require 'json' require 'rest-client' require 'base64' module Gcore class Api class Stores class SalesOrders def self.list(params = {}) store_code = params[:store_id] || params[:store_code] allowed_params = [:limit, :page] url_params = params.select{|key, value| allowed_params.include? key} || {} url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: url_params)), {symbolize_names: true}) end def self.sku_count(params = {}) store_code = params[:store_id] || params[:store_code] #Allow web unsafe SKU's sku = Base64.urlsafe_encode64(params[:sku]) url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders/sku_count/#{sku}" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: {is_base64: "true"})), {symbolize_names: true}) end end end end end
require 'json' require 'rest-client' + require 'base64' module Gcore class Api class Stores class SalesOrders def self.list(params = {}) store_code = params[:store_id] || params[:store_code] allowed_params = [:limit, :page] url_params = params.select{|key, value| allowed_params.include? key} || {} url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders" JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: url_params)), {symbolize_names: true}) end def self.sku_count(params = {}) store_code = params[:store_id] || params[:store_code] - sku = params[:sku] + + #Allow web unsafe SKU's + sku = Base64.urlsafe_encode64(params[:sku]) + url = "#{Gcore::Api.endpoint}/stores/#{store_code}/sales_orders/sku_count/#{sku}" - JSON.parse(RestClient.get(url, Gcore::Api.header), {symbolize_names: true}) + JSON.parse(RestClient.get(url, Gcore::Api.header.merge(params: {is_base64: "true"})), {symbolize_names: true}) ? +++++++++++++++++++++++++++++++++++ end end end end end
8
0.296296
6
2
d5f83f0f90fdc52af430b3b5cac209a0d1b8938b
data/pkg/archive/createReleaseArchive.sh
data/pkg/archive/createReleaseArchive.sh
export TERMINIX_ARCHIVE_PATH="/tmp/terminix/archive"; rm -rf ${TERMINIX_ARCHIVE_PATH} CURRENT_DIR=$(pwd) echo "Building application..." cd ../../.. dub build --build=release --compiler=ldc2 ./install.sh ${TERMINIX_ARCHIVE_PATH}/usr # Remove compiled schema rm ${TERMINIX_ARCHIVE_PATH}/usr/share/glib-2.0/schemas/gschemas.compiled echo "Creating archive" cd ${TERMINIX_ARCHIVE_PATH} zip -r terminix.zip * cp terminix.zip ${CURRENT_DIR}/terminix.zip cd ${CURRENT_DIR}
export TERMINIX_ARCHIVE_PATH="/tmp/terminix/archive"; rm -rf ${TERMINIX_ARCHIVE_PATH} CURRENT_DIR=$(pwd) echo "Building application..." cd ../../.. dub build --build=release strip tilix ./install.sh ${TERMINIX_ARCHIVE_PATH}/usr # Remove compiled schema rm ${TERMINIX_ARCHIVE_PATH}/usr/share/glib-2.0/schemas/gschemas.compiled echo "Creating archive" cd ${TERMINIX_ARCHIVE_PATH} zip -r terminix.zip * cp terminix.zip ${CURRENT_DIR}/terminix.zip cd ${CURRENT_DIR}
Switch to DMD for release binaries
Switch to DMD for release binaries
Shell
mpl-2.0
dsboger/tilix,gnunn1/terminix,gnunn1/tilix,gnunn1/tilix,gnunn1/tilix,phw/terminix,gnunn1/terminix,phw/terminix,dsboger/tilix
shell
## Code Before: export TERMINIX_ARCHIVE_PATH="/tmp/terminix/archive"; rm -rf ${TERMINIX_ARCHIVE_PATH} CURRENT_DIR=$(pwd) echo "Building application..." cd ../../.. dub build --build=release --compiler=ldc2 ./install.sh ${TERMINIX_ARCHIVE_PATH}/usr # Remove compiled schema rm ${TERMINIX_ARCHIVE_PATH}/usr/share/glib-2.0/schemas/gschemas.compiled echo "Creating archive" cd ${TERMINIX_ARCHIVE_PATH} zip -r terminix.zip * cp terminix.zip ${CURRENT_DIR}/terminix.zip cd ${CURRENT_DIR} ## Instruction: Switch to DMD for release binaries ## Code After: export TERMINIX_ARCHIVE_PATH="/tmp/terminix/archive"; rm -rf ${TERMINIX_ARCHIVE_PATH} CURRENT_DIR=$(pwd) echo "Building application..." cd ../../.. dub build --build=release strip tilix ./install.sh ${TERMINIX_ARCHIVE_PATH}/usr # Remove compiled schema rm ${TERMINIX_ARCHIVE_PATH}/usr/share/glib-2.0/schemas/gschemas.compiled echo "Creating archive" cd ${TERMINIX_ARCHIVE_PATH} zip -r terminix.zip * cp terminix.zip ${CURRENT_DIR}/terminix.zip cd ${CURRENT_DIR}
export TERMINIX_ARCHIVE_PATH="/tmp/terminix/archive"; rm -rf ${TERMINIX_ARCHIVE_PATH} CURRENT_DIR=$(pwd) echo "Building application..." cd ../../.. - dub build --build=release --compiler=ldc2 ? ---------------- + dub build --build=release + strip tilix ./install.sh ${TERMINIX_ARCHIVE_PATH}/usr # Remove compiled schema rm ${TERMINIX_ARCHIVE_PATH}/usr/share/glib-2.0/schemas/gschemas.compiled echo "Creating archive" cd ${TERMINIX_ARCHIVE_PATH} zip -r terminix.zip * cp terminix.zip ${CURRENT_DIR}/terminix.zip cd ${CURRENT_DIR}
3
0.142857
2
1
67d4f376586c912f852b98c75f7de04aeb05979a
pag/words.py
pag/words.py
"""Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' f = open(filepath, 'r') contents = f.read() txt = contents.strip().split('\n') if ':' in contents: ntxt = txt[:] for line in txt: if line[0] == '#': ntxt.remove(ntxt[ntxt.index(line)]) elif ':' not in line: ntxt[ntxt.index(line)] = line + ':' txt = ntxt words = {} for line in txt: index = line.split(':')[0] words[index] = line.split(':')[1].split(',') for syn in words[index]: if syn == '': words[index].remove(syn) else: words = [word.strip() for word in txt] f.close() return words verbs = get_word_list('dictionary/verbs.txt') nouns = get_word_list('dictionary/nouns.txt') extras = get_word_list('dictionary/extras.txt') directions = get_word_list('dictionary/directions.txt')
"""Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' f = open(filepath, 'r') contents = f.read() txt = contents.strip().split('\n') ntxt = txt[:] for line in txt: if line[0] == '#': ntxt.remove(ntxt[ntxt.index(line)]) elif ':' not in line: ntxt[ntxt.index(line)] = line + ':' txt = ntxt words = {} for line in txt: index = line.split(':')[0] words[index] = line.split(':')[1].split(',') for syn in words[index]: if syn == '': words[index].remove(syn) f.close() return words verbs = get_word_list('dictionary/verbs.txt') nouns = get_word_list('dictionary/nouns.txt') extras = get_word_list('dictionary/extras.txt') directions = get_word_list('dictionary/directions.txt')
Remove useless and confusing code
Remove useless and confusing code
Python
mit
allanburleson/python-adventure-game,disorientedperson/python-adventure-game
python
## Code Before: """Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' f = open(filepath, 'r') contents = f.read() txt = contents.strip().split('\n') if ':' in contents: ntxt = txt[:] for line in txt: if line[0] == '#': ntxt.remove(ntxt[ntxt.index(line)]) elif ':' not in line: ntxt[ntxt.index(line)] = line + ':' txt = ntxt words = {} for line in txt: index = line.split(':')[0] words[index] = line.split(':')[1].split(',') for syn in words[index]: if syn == '': words[index].remove(syn) else: words = [word.strip() for word in txt] f.close() return words verbs = get_word_list('dictionary/verbs.txt') nouns = get_word_list('dictionary/nouns.txt') extras = get_word_list('dictionary/extras.txt') directions = get_word_list('dictionary/directions.txt') ## Instruction: Remove useless and confusing code ## Code After: """Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' f = open(filepath, 'r') contents = f.read() txt = contents.strip().split('\n') ntxt = txt[:] for line in txt: if line[0] == '#': ntxt.remove(ntxt[ntxt.index(line)]) elif ':' not in line: ntxt[ntxt.index(line)] = line + ':' txt = ntxt words = {} for line in txt: index = line.split(':')[0] words[index] = line.split(':')[1].split(',') for syn in words[index]: if syn == '': words[index].remove(syn) f.close() return words verbs = get_word_list('dictionary/verbs.txt') nouns = get_word_list('dictionary/nouns.txt') extras = get_word_list('dictionary/extras.txt') directions = get_word_list('dictionary/directions.txt')
"""Get words from files in "src/dictionary/".""" import os def get_word_list(filepath): """ Get a list of words from a file. Input: file name Output: dict with formula {word: [synonym, synonym]}""" filepath = os.path.abspath(filepath) assert os.path.isfile(filepath), 'Must be a file' f = open(filepath, 'r') contents = f.read() txt = contents.strip().split('\n') - if ':' in contents: - ntxt = txt[:] ? ---- + ntxt = txt[:] - for line in txt: ? ---- + for line in txt: - if line[0] == '#': ? ---- + if line[0] == '#': - ntxt.remove(ntxt[ntxt.index(line)]) ? ---- + ntxt.remove(ntxt[ntxt.index(line)]) - elif ':' not in line: ? ---- + elif ':' not in line: - ntxt[ntxt.index(line)] = line + ':' ? ---- + ntxt[ntxt.index(line)] = line + ':' - txt = ntxt ? ---- + txt = ntxt - words = {} ? ---- + words = {} - for line in txt: ? ---- + for line in txt: - index = line.split(':')[0] ? ---- + index = line.split(':')[0] - words[index] = line.split(':')[1].split(',') ? ---- + words[index] = line.split(':')[1].split(',') - for syn in words[index]: ? ---- + for syn in words[index]: - if syn == '': ? ---- + if syn == '': - words[index].remove(syn) ? ---- + words[index].remove(syn) - else: - words = [word.strip() for word in txt] f.close() return words verbs = get_word_list('dictionary/verbs.txt') nouns = get_word_list('dictionary/nouns.txt') extras = get_word_list('dictionary/extras.txt') directions = get_word_list('dictionary/directions.txt')
31
0.794872
14
17
6a59e678a9a05f2b17f887785bc9ab64af20da2f
requirements/production.txt
requirements/production.txt
autobahn==19.5.1 # Requirements for OpenSlides in production in alphabetical order bleach>=1.5.0,<3.2 channels>=2.1.2,<2.4 daphne>=2.2,<2.5 Django>=2.1,<2.3 djangorestframework>=3.9.4,<3.10 jsonfield2>=3.0,<3.1 attrs>=19.2.0 jsonschema>=3.0,<3.1 lz4>=2.1.6 mypy_extensions>=0.4,<0.5 PyPDF2>=1.26,<1.27 roman>=2.0,<3.2 setuptools>=29.0,<42.0 typing_extensions>=3.6.6,<3.8 websockets>=8.0,<9.0 twisted>=20.3.0
autobahn==19.5.1 # Use release 3.2.9 with this issue fixed: https://github.com/django/asgiref/issues/170 # introduced with 3.2.8 asgiref>=3.2.9 # Requirements for OpenSlides in production in alphabetical order bleach>=1.5.0,<3.2 channels>=2.1.2,<2.4 daphne>=2.2,<2.5 Django>=2.1,<2.3 djangorestframework>=3.9.4,<3.10 jsonfield2>=3.0,<3.1 attrs>=19.2.0 jsonschema>=3.0,<3.1 lz4>=2.1.6 mypy_extensions>=0.4,<0.5 PyPDF2>=1.26,<1.27 roman>=2.0,<3.2 setuptools>=29.0,<42.0 typing_extensions>=3.6.6,<3.8 websockets>=8.0,<9.0 twisted>=20.3.0
Use newer asgiref release than the broken 3.2.8 one
Use newer asgiref release than the broken 3.2.8 one
Text
mit
jwinzer/OpenSlides,CatoTH/OpenSlides,jwinzer/OpenSlides,FinnStutzenstein/OpenSlides,jwinzer/OpenSlides,FinnStutzenstein/OpenSlides,CatoTH/OpenSlides,jwinzer/OpenSlides,CatoTH/OpenSlides,FinnStutzenstein/OpenSlides,jwinzer/OpenSlides,FinnStutzenstein/OpenSlides,CatoTH/OpenSlides
text
## Code Before: autobahn==19.5.1 # Requirements for OpenSlides in production in alphabetical order bleach>=1.5.0,<3.2 channels>=2.1.2,<2.4 daphne>=2.2,<2.5 Django>=2.1,<2.3 djangorestframework>=3.9.4,<3.10 jsonfield2>=3.0,<3.1 attrs>=19.2.0 jsonschema>=3.0,<3.1 lz4>=2.1.6 mypy_extensions>=0.4,<0.5 PyPDF2>=1.26,<1.27 roman>=2.0,<3.2 setuptools>=29.0,<42.0 typing_extensions>=3.6.6,<3.8 websockets>=8.0,<9.0 twisted>=20.3.0 ## Instruction: Use newer asgiref release than the broken 3.2.8 one ## Code After: autobahn==19.5.1 # Use release 3.2.9 with this issue fixed: https://github.com/django/asgiref/issues/170 # introduced with 3.2.8 asgiref>=3.2.9 # Requirements for OpenSlides in production in alphabetical order bleach>=1.5.0,<3.2 channels>=2.1.2,<2.4 daphne>=2.2,<2.5 Django>=2.1,<2.3 djangorestframework>=3.9.4,<3.10 jsonfield2>=3.0,<3.1 attrs>=19.2.0 jsonschema>=3.0,<3.1 lz4>=2.1.6 mypy_extensions>=0.4,<0.5 PyPDF2>=1.26,<1.27 roman>=2.0,<3.2 setuptools>=29.0,<42.0 typing_extensions>=3.6.6,<3.8 websockets>=8.0,<9.0 twisted>=20.3.0
autobahn==19.5.1 + + # Use release 3.2.9 with this issue fixed: https://github.com/django/asgiref/issues/170 + # introduced with 3.2.8 + asgiref>=3.2.9 # Requirements for OpenSlides in production in alphabetical order bleach>=1.5.0,<3.2 channels>=2.1.2,<2.4 daphne>=2.2,<2.5 Django>=2.1,<2.3 djangorestframework>=3.9.4,<3.10 jsonfield2>=3.0,<3.1 attrs>=19.2.0 jsonschema>=3.0,<3.1 lz4>=2.1.6 mypy_extensions>=0.4,<0.5 PyPDF2>=1.26,<1.27 roman>=2.0,<3.2 setuptools>=29.0,<42.0 typing_extensions>=3.6.6,<3.8 websockets>=8.0,<9.0 twisted>=20.3.0
4
0.210526
4
0
58a5b938cabf366caacd7af01e6205b85bb404a4
app/views/conversations/_conversation.erb
app/views/conversations/_conversation.erb
<div class="conversation"> <h3 class="subject"><%= conversation.subject %></h3> <h4 class="sender">From: <%= conversation.originator.username %></h4> <b>Date: </b><%= conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %> <div class="body"> <%= truncate conversation.messages.last.body, length: 145 %> </div> <%= link_to "View Conversation", conversation_path(conversation) %> </div>
<div class="conversation"> <h3 class="subject"><%= conversation.subject %></h3> <h4 class="sender">From: <%= conversation.originator.username %></h4> <b>Date: </b><%= conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %> <div class="body"> <%= truncate conversation.messages.last.body, length: 145 %> </div> <%= link_to "View Conversation", conversation_path(conversation) %> <div class="trash"> <%= link_to trash_conversation_path(conversation), class: 'btn btn-floating', method: :post, data: {confirm: 'Are you sure?'} do %> <i class="material-icons">delete</i> <% end %> </div> </div>
Add trash icon to trash messages
Add trash icon to trash messages
HTML+ERB
mit
nyc-bumblebees-2015/the-hive,Jguzik83/the-hive,nyc-bumblebees-2015/the-hive,Jguzik83/the-hive,ChristineSchatz/the-hive,AlinaJahnes/the-hive,ChristineSchatz/the-hive,nyc-bumblebees-2015/the-hive,AlinaJahnes/the-hive,ChristineSchatz/the-hive,Jguzik83/the-hive,AlinaJahnes/the-hive
html+erb
## Code Before: <div class="conversation"> <h3 class="subject"><%= conversation.subject %></h3> <h4 class="sender">From: <%= conversation.originator.username %></h4> <b>Date: </b><%= conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %> <div class="body"> <%= truncate conversation.messages.last.body, length: 145 %> </div> <%= link_to "View Conversation", conversation_path(conversation) %> </div> ## Instruction: Add trash icon to trash messages ## Code After: <div class="conversation"> <h3 class="subject"><%= conversation.subject %></h3> <h4 class="sender">From: <%= conversation.originator.username %></h4> <b>Date: </b><%= conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %> <div class="body"> <%= truncate conversation.messages.last.body, length: 145 %> </div> <%= link_to "View Conversation", conversation_path(conversation) %> <div class="trash"> <%= link_to trash_conversation_path(conversation), class: 'btn btn-floating', method: :post, data: {confirm: 'Are you sure?'} do %> <i class="material-icons">delete</i> <% end %> </div> </div>
<div class="conversation"> <h3 class="subject"><%= conversation.subject %></h3> <h4 class="sender">From: <%= conversation.originator.username %></h4> <b>Date: </b><%= conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %> <div class="body"> <%= truncate conversation.messages.last.body, length: 145 %> </div> <%= link_to "View Conversation", conversation_path(conversation) %> + + <div class="trash"> + <%= link_to trash_conversation_path(conversation), class: 'btn btn-floating', method: :post, data: {confirm: 'Are you sure?'} do %> + <i class="material-icons">delete</i> + <% end %> + </div> </div> -
7
0.636364
6
1
809b449002671226018fbd2e9d3285e6e7037ea0
server/index.js
server/index.js
'use strict'; var http = require('http'), spotify = require('spotify-node-applescript'); var cb = function(request, response) { debugger; response.writeHead(200, {'Content-Type': 'text/html'}); response.write('Hello spotkula servereerer!'); response.end(); }; http.createServer(cb).listen(3000, 'localhost');
'use strict'; var http = require('http'), spotify = require('spotify-node-applescript'), express = require('express'); var app = express(); app.get('/', function (request, response) { response.send('ok'); }); app.listen(3000); console.log("Listening on port 3000");
Reimplement basic server as express app
Reimplement basic server as express app
JavaScript
mit
ilkka/spotkula-server
javascript
## Code Before: 'use strict'; var http = require('http'), spotify = require('spotify-node-applescript'); var cb = function(request, response) { debugger; response.writeHead(200, {'Content-Type': 'text/html'}); response.write('Hello spotkula servereerer!'); response.end(); }; http.createServer(cb).listen(3000, 'localhost'); ## Instruction: Reimplement basic server as express app ## Code After: 'use strict'; var http = require('http'), spotify = require('spotify-node-applescript'), express = require('express'); var app = express(); app.get('/', function (request, response) { response.send('ok'); }); app.listen(3000); console.log("Listening on port 3000");
'use strict'; var http = require('http'), - spotify = require('spotify-node-applescript'); ? ^ + spotify = require('spotify-node-applescript'), ? ^ + express = require('express'); - var cb = function(request, response) { + var app = express(); - debugger; + app.get('/', function (request, response) { + response.send('ok'); + }); + app.listen(3000); + console.log("Listening on port 3000"); - response.writeHead(200, {'Content-Type': 'text/html'}); - response.write('Hello spotkula servereerer!'); - response.end(); - }; - http.createServer(cb).listen(3000, 'localhost');
16
1.066667
8
8
68e44de4f0e34b45546b9f38ec9480fb3bd54e71
app/views/frontend/flexible_content/_picture.html.erb
app/views/frontend/flexible_content/_picture.html.erb
<% if object.present? && object.asset.present? %> <% max_img_size = object.max_image_size %> <% if object.url.present? %> <%= link_to object.url do %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% else %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% if object.caption.present? %> <% if Udongo.config.flexible_content.picture_caption_editor? %> <div class="img-caption"> <%= object.caption.html_safe %> </div> <% else %> <div class="text-center"> <%= object.caption %> </div> <% end %> <% end %> <% end %>
<% if object.present? && object.asset.present? %> <% max_img_size = object.max_image_size %> <% if object.url.present? %> <%= link_to object.url, target: object.target do %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% else %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% if object.caption.present? %> <% if Udongo.config.flexible_content.picture_caption_editor? %> <div class="img-caption"> <%= object.caption.html_safe %> </div> <% else %> <div class="text-center"> <%= object.caption %> </div> <% end %> <% end %> <% end %>
Use the content picture target when there's a link set.
Use the content picture target when there's a link set.
HTML+ERB
mit
udongo/udongo,udongo/udongo,udongo/udongo
html+erb
## Code Before: <% if object.present? && object.asset.present? %> <% max_img_size = object.max_image_size %> <% if object.url.present? %> <%= link_to object.url do %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% else %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% if object.caption.present? %> <% if Udongo.config.flexible_content.picture_caption_editor? %> <div class="img-caption"> <%= object.caption.html_safe %> </div> <% else %> <div class="text-center"> <%= object.caption %> </div> <% end %> <% end %> <% end %> ## Instruction: Use the content picture target when there's a link set. ## Code After: <% if object.present? && object.asset.present? %> <% max_img_size = object.max_image_size %> <% if object.url.present? %> <%= link_to object.url, target: object.target do %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% else %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% if object.caption.present? %> <% if Udongo.config.flexible_content.picture_caption_editor? %> <div class="img-caption"> <%= object.caption.html_safe %> </div> <% else %> <div class="text-center"> <%= object.caption %> </div> <% end %> <% end %> <% end %>
<% if object.present? && object.asset.present? %> <% max_img_size = object.max_image_size %> <% if object.url.present? %> - <%= link_to object.url do %> + <%= link_to object.url, target: object.target do %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% else %> <% if object.disallow_resize? %> <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %> <% else %> <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %> <% end %> <% end %> <% if object.caption.present? %> <% if Udongo.config.flexible_content.picture_caption_editor? %> <div class="img-caption"> <%= object.caption.html_safe %> </div> <% else %> <div class="text-center"> <%= object.caption %> </div> <% end %> <% end %> <% end %>
2
0.0625
1
1
19265e8d1eb363b67a1258a6d1d4bd1b129595d6
templates/match_partials/match_table_upcoming_header.html
templates/match_partials/match_table_upcoming_header.html
<tr class="key visible-desktop"> <th><i class="icon-time" rel="tooltip" title="Times are in the event's local timezone"></i></th> <th>Match</th> <th colspan="6">Red Alliance</th> <th colspan="6">Blue Alliance</th> </tr> <tr class="key hidden-desktop"> <th rowspan="2"><i class="icon-time" rel="tooltip" title="Times are in the event's local timezone"></i></th> <th rowspan="2">Match</th> <th colspan="12">Red Alliance</th> </tr> <tr class="key hidden-desktop"> <th colspan="12">Blue Alliance</th> </tr>
<tr class="key visible-desktop"> <th><i class="icon-time" rel="tooltip" title="Match times are approximate and are in the event's local timezone"></i></th> <th>Match</th> <th colspan="6">Red Alliance</th> <th colspan="6">Blue Alliance</th> </tr> <tr class="key hidden-desktop"> <th rowspan="2"><i class="icon-time" rel="tooltip" title="Match times are approximate and are in the event's local timezone"></i></th> <th rowspan="2">Match</th> <th colspan="12">Red Alliance</th> </tr> <tr class="key hidden-desktop"> <th colspan="12">Blue Alliance</th> </tr>
Change upcoming match time tooltip
Change upcoming match time tooltip
HTML
mit
1fish2/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,bvisness/the-blue-alliance,josephbisch/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,bdaroz/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,josephbisch/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,1fish2/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,synth3tk/the-blue-alliance,josephbisch/the-blue-alliance,jaredhasenklein/the-blue-alliance,tsteward/the-blue-alliance,fangeugene/the-blue-alliance,josephbisch/the-blue-alliance,bvisness/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,1fish2/the-blue-alliance,tsteward/the-blue-alliance,josephbisch/the-blue-alliance,synth3tk/the-blue-alliance,tsteward/the-blue-alliance,fangeugene/the-blue-alliance,verycumbersome/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,fangeugene/the-blue-alliance,fangeugene/the-blue-alliance,bvisness/the-blue-alliance,1fish2/the-blue-alliance,fangeugene/the-blue-alliance,the-blue-alliance/the-blue-alliance,phil-lopreiato/the-blue-alliance,verycumbersome/the-blue-alliance,phil-lopreiato/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,bvisness/the-blue-alliance,josephbisch/the-blue-alliance,phil-lopreiato/the-blue-alliance,nwalters512/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,bvisness/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/the-blue-alliance,bvisness/the-blue-alliance
html
## Code Before: <tr class="key visible-desktop"> <th><i class="icon-time" rel="tooltip" title="Times are in the event's local timezone"></i></th> <th>Match</th> <th colspan="6">Red Alliance</th> <th colspan="6">Blue Alliance</th> </tr> <tr class="key hidden-desktop"> <th rowspan="2"><i class="icon-time" rel="tooltip" title="Times are in the event's local timezone"></i></th> <th rowspan="2">Match</th> <th colspan="12">Red Alliance</th> </tr> <tr class="key hidden-desktop"> <th colspan="12">Blue Alliance</th> </tr> ## Instruction: Change upcoming match time tooltip ## Code After: <tr class="key visible-desktop"> <th><i class="icon-time" rel="tooltip" title="Match times are approximate and are in the event's local timezone"></i></th> <th>Match</th> <th colspan="6">Red Alliance</th> <th colspan="6">Blue Alliance</th> </tr> <tr class="key hidden-desktop"> <th rowspan="2"><i class="icon-time" rel="tooltip" title="Match times are approximate and are in the event's local timezone"></i></th> <th rowspan="2">Match</th> <th colspan="12">Red Alliance</th> </tr> <tr class="key hidden-desktop"> <th colspan="12">Blue Alliance</th> </tr>
<tr class="key visible-desktop"> - <th><i class="icon-time" rel="tooltip" title="Times are in the event's local timezone"></i></th> ? ^ + <th><i class="icon-time" rel="tooltip" title="Match times are approximate and are in the event's local timezone"></i></th> ? ^^^^^^^ ++++++++++++++++++++ <th>Match</th> <th colspan="6">Red Alliance</th> <th colspan="6">Blue Alliance</th> </tr> <tr class="key hidden-desktop"> - <th rowspan="2"><i class="icon-time" rel="tooltip" title="Times are in the event's local timezone"></i></th> ? ^ + <th rowspan="2"><i class="icon-time" rel="tooltip" title="Match times are approximate and are in the event's local timezone"></i></th> ? ^^^^^^^ ++++++++++++++++++++ <th rowspan="2">Match</th> <th colspan="12">Red Alliance</th> </tr> <tr class="key hidden-desktop"> <th colspan="12">Blue Alliance</th> </tr>
4
0.266667
2
2
ea850baf397ae98a78222691e1f38571d66d029c
db/config.js
db/config.js
//For Heroku Deployment var URI = require('urijs'); var config = URI.parse(process.env.DATABASE_URL); config['ssl'] = true; module.exports = config; // module.exports = { // database: 'sonder', // user: 'postgres', // //password: 'postgres', // port: 32769, // host: '192.168.99.100' // };
//For Heroku Deployment var URI = require('urijs'); // var config = URI.parse(process.env.DATABASE_URL); // config['ssl'] = true; var config = process.env.DATABASE_URL; module.exports = config; // module.exports = { // database: 'sonder', // user: 'postgres', // //password: 'postgres', // port: 32769, // host: '192.168.99.100' // };
Connect to PG via ENV string
Connect to PG via ENV string
JavaScript
mit
aarontrank/SonderServer,MapReactor/SonderServer,MapReactor/SonderServer,aarontrank/SonderServer
javascript
## Code Before: //For Heroku Deployment var URI = require('urijs'); var config = URI.parse(process.env.DATABASE_URL); config['ssl'] = true; module.exports = config; // module.exports = { // database: 'sonder', // user: 'postgres', // //password: 'postgres', // port: 32769, // host: '192.168.99.100' // }; ## Instruction: Connect to PG via ENV string ## Code After: //For Heroku Deployment var URI = require('urijs'); // var config = URI.parse(process.env.DATABASE_URL); // config['ssl'] = true; var config = process.env.DATABASE_URL; module.exports = config; // module.exports = { // database: 'sonder', // user: 'postgres', // //password: 'postgres', // port: 32769, // host: '192.168.99.100' // };
//For Heroku Deployment var URI = require('urijs'); - var config = URI.parse(process.env.DATABASE_URL); + // var config = URI.parse(process.env.DATABASE_URL); ? +++ - config['ssl'] = true; + // config['ssl'] = true; ? +++ + var config = process.env.DATABASE_URL; module.exports = config; // module.exports = { // database: 'sonder', // user: 'postgres', // //password: 'postgres', // port: 32769, // host: '192.168.99.100' // };
5
0.384615
3
2
4a125a087c7d547371c379748b7687cbc2ef5524
JS/NetCore/wwwroot/scripts/rpsls.zsg.service.js
JS/NetCore/wwwroot/scripts/rpsls.zsg.service.js
ο»Ώ class ZSGameService { constructor() { this.rules = {}; } addRule(aRule) { aRule.parent = this; this.rules[aRule.id] = aRule; return this; } get length() { return Object.keys(this.rules).length; } getRule(indexOrId) { return this.rules[indexOrId]; } evaluate(shape, oponent) { return this.getRule(shape).evaluateAgainst(oponent); } }
ο»Ώ class ZSGameService { constructor() { this.rules = {}; } addRule(aRule) { aRule.parent = this; this.rules[aRule.id] = aRule; return this; } get length() { return Object.keys(this.rules).length; } getRule(indexOrId) { return this.rules[indexOrId]; } evaluate(shape, oponent) { let shapeRule = this.getRule(shape); let oponentRule = this.getRule(oponent); if ((shapeRule instanceof ZSGameRule) && (oponentRule instanceof ZSGameRule)) { return this.getRule(shape).evaluateAgainst(oponent); } else { return Results.Error; } } }
Return Error when provided with wrong prams to ZSGameService.evaluate
Return Error when provided with wrong prams to ZSGameService.evaluate
JavaScript
mit
jorditudela/Kata-RockPaperScissorsSpockLizard,jorditudela/Kata-RockPaperScissorsSpockLizard,jorditudela/Kata-RockPaperScissorsSpockLizard
javascript
## Code Before: ο»Ώ class ZSGameService { constructor() { this.rules = {}; } addRule(aRule) { aRule.parent = this; this.rules[aRule.id] = aRule; return this; } get length() { return Object.keys(this.rules).length; } getRule(indexOrId) { return this.rules[indexOrId]; } evaluate(shape, oponent) { return this.getRule(shape).evaluateAgainst(oponent); } } ## Instruction: Return Error when provided with wrong prams to ZSGameService.evaluate ## Code After: ο»Ώ class ZSGameService { constructor() { this.rules = {}; } addRule(aRule) { aRule.parent = this; this.rules[aRule.id] = aRule; return this; } get length() { return Object.keys(this.rules).length; } getRule(indexOrId) { return this.rules[indexOrId]; } evaluate(shape, oponent) { let shapeRule = this.getRule(shape); let oponentRule = this.getRule(oponent); if ((shapeRule instanceof ZSGameRule) && (oponentRule instanceof ZSGameRule)) { return this.getRule(shape).evaluateAgainst(oponent); } else { return Results.Error; } } }
ο»Ώ class ZSGameService { constructor() { this.rules = {}; } addRule(aRule) { aRule.parent = this; this.rules[aRule.id] = aRule; return this; } get length() { return Object.keys(this.rules).length; } getRule(indexOrId) { return this.rules[indexOrId]; } evaluate(shape, oponent) { + let shapeRule = this.getRule(shape); + let oponentRule = this.getRule(oponent); + if ((shapeRule instanceof ZSGameRule) && (oponentRule instanceof ZSGameRule)) { - return this.getRule(shape).evaluateAgainst(oponent); + return this.getRule(shape).evaluateAgainst(oponent); ? ++++ + } + else { + return Results.Error; + } } }
9
0.375
8
1
43f3fe362803b0fc114dc2cc48f17195a6289a4b
src/core/configure.js
src/core/configure.js
import apply from './apply'; /** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several configure() calls can be made successively on the returned plugin, * with the outer config objects overwriting the keys in the innermost configs. * @param {Object} [config={}] - An object containing the configuration data to * pass to the plugin. * @returns {Function} A function consuming a plugin and producing another plugin * with the provided config applied to it. */ export default (config = {}) => { return plugin => (generatorApi) => { // merge the original config and the trickled config const { config: trickledConfig = {}, ...rest } = generatorApi; const updatedConfig = { ...config, ...trickledConfig }; let command = plugin({ ...rest, config: updatedConfig }); // extract default keys const { triggers: [], middleware: [], description, } = updatedConfig; // update the command accordingly if (triggers.length) { command.react(...triggers); } else if (middleware.length) { command = apply(...middleware)(command); } else if (description) { command.describe(description); } return command; }; };
/** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several configure() calls can be made successively on the returned plugin, * with the outer config objects overwriting the keys in the innermost configs. * @param {Object} [config={}] - An object containing the configuration data to * pass to the plugin. * @returns {Function} A function consuming a plugin and producing another plugin * with the provided config applied to it. */ export default (config = {}) => { return plugin => (generatorApi) => { // merge the original config and the trickled config const { apply, config: trickledConfig = {}, ...rest } = generatorApi; const updatedConfig = { ...config, ...trickledConfig }; let command = plugin({ ...rest, apply, config: updatedConfig }); // extract default keys const { triggers: [], middleware: [], description, } = updatedConfig; // update the command accordingly if (triggers.length) { command.react(...triggers); } else if (middleware.length) { command = apply(...middleware)(command); } else if (description) { command.describe(description); } return command; }; };
Remove dependency on apply() since it gets injected anyways.
Remove dependency on apply() since it gets injected anyways.
JavaScript
mit
hkwu/ghastly
javascript
## Code Before: import apply from './apply'; /** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several configure() calls can be made successively on the returned plugin, * with the outer config objects overwriting the keys in the innermost configs. * @param {Object} [config={}] - An object containing the configuration data to * pass to the plugin. * @returns {Function} A function consuming a plugin and producing another plugin * with the provided config applied to it. */ export default (config = {}) => { return plugin => (generatorApi) => { // merge the original config and the trickled config const { config: trickledConfig = {}, ...rest } = generatorApi; const updatedConfig = { ...config, ...trickledConfig }; let command = plugin({ ...rest, config: updatedConfig }); // extract default keys const { triggers: [], middleware: [], description, } = updatedConfig; // update the command accordingly if (triggers.length) { command.react(...triggers); } else if (middleware.length) { command = apply(...middleware)(command); } else if (description) { command.describe(description); } return command; }; }; ## Instruction: Remove dependency on apply() since it gets injected anyways. ## Code After: /** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several configure() calls can be made successively on the returned plugin, * with the outer config objects overwriting the keys in the innermost configs. * @param {Object} [config={}] - An object containing the configuration data to * pass to the plugin. * @returns {Function} A function consuming a plugin and producing another plugin * with the provided config applied to it. */ export default (config = {}) => { return plugin => (generatorApi) => { // merge the original config and the trickled config const { apply, config: trickledConfig = {}, ...rest } = generatorApi; const updatedConfig = { ...config, ...trickledConfig }; let command = plugin({ ...rest, apply, config: updatedConfig }); // extract default keys const { triggers: [], middleware: [], description, } = updatedConfig; // update the command accordingly if (triggers.length) { command.react(...triggers); } else if (middleware.length) { command = apply(...middleware)(command); } else if (description) { command.describe(description); } return command; }; };
- import apply from './apply'; - /** * Provides a bridge to provide configuration data for plugins. Consumes an * optional config object containing the configuration data and produces a * function. This function consumes a plugin and returns another plugin with * the given configuration applied to it. * Several configure() calls can be made successively on the returned plugin, * with the outer config objects overwriting the keys in the innermost configs. * @param {Object} [config={}] - An object containing the configuration data to * pass to the plugin. * @returns {Function} A function consuming a plugin and producing another plugin * with the provided config applied to it. */ export default (config = {}) => { return plugin => (generatorApi) => { // merge the original config and the trickled config - const { config: trickledConfig = {}, ...rest } = generatorApi; + const { apply, config: trickledConfig = {}, ...rest } = generatorApi; ? +++++++ const updatedConfig = { ...config, ...trickledConfig }; - let command = plugin({ ...rest, config: updatedConfig }); + let command = plugin({ ...rest, apply, config: updatedConfig }); ? +++++++ // extract default keys const { triggers: [], middleware: [], description, } = updatedConfig; // update the command accordingly if (triggers.length) { command.react(...triggers); } else if (middleware.length) { command = apply(...middleware)(command); } else if (description) { command.describe(description); } return command; }; };
6
0.15
2
4
ace982dfd96837ce74a9bf32a4b5310e5ce67b51
app/views/admin-dashboard.html
app/views/admin-dashboard.html
<div class="row"> <ul class="crs-card-stack"> <li class="crs-event-card span3" ng-repeat="conference in conferences"> <a class="crs-card-body" href="#/register/{{conference.id}}">{{conference.name}}</a> <a class="crs-card-count" href="#"><span>22</span></a> <a class="crs-card-sprocket" href="#/adminData/{{conference.id}}"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body">The Best Pickle Conference</a> <a class="crs-card-count" href="#"><span>234</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body" href="">The Stuffed Sandwich Conference</a> <a class="crs-card-count" href="#"><span>8</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body" href="">The Fall Retreatment of Curtans</a> <a class="crs-card-count" href="#"><span>55</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body" href="">The Best of The Best of The Best</a> <a class="crs-card-count" href="#"><span>1234</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-new-event-card span3"> <div data-ng-click="createConference()"><img class="crs-plus-icon" src="images/icon-add.png"><span>Make a new one!</span></div> </li> </ul> </div>
<div class="row"> <ul class="crs-card-stack"> <li class="crs-event-card span3" ng-repeat="conference in conferences"> <a class="crs-card-body" href="#/register/{{conference.id}}">{{conference.name}}</a> <a class="crs-card-count" href="#"><span>22</span></a> <a class="crs-card-sprocket" href="#/adminData/{{conference.id}}"></a> </li> <li class="crs-new-event-card span3"> <div data-ng-click="createConference()"><img class="crs-plus-icon" src="images/icon-add.png"><span>Make a new one!</span></div> </li> </ul> </div>
Remove mock conferences from admin page
Remove mock conferences from admin page
HTML
mit
CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web
html
## Code Before: <div class="row"> <ul class="crs-card-stack"> <li class="crs-event-card span3" ng-repeat="conference in conferences"> <a class="crs-card-body" href="#/register/{{conference.id}}">{{conference.name}}</a> <a class="crs-card-count" href="#"><span>22</span></a> <a class="crs-card-sprocket" href="#/adminData/{{conference.id}}"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body">The Best Pickle Conference</a> <a class="crs-card-count" href="#"><span>234</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body" href="">The Stuffed Sandwich Conference</a> <a class="crs-card-count" href="#"><span>8</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body" href="">The Fall Retreatment of Curtans</a> <a class="crs-card-count" href="#"><span>55</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-event-card span3"> <a class="crs-card-body" href="">The Best of The Best of The Best</a> <a class="crs-card-count" href="#"><span>1234</span></a> <a class="crs-card-sprocket" href="#"></a> </li> <li class="crs-new-event-card span3"> <div data-ng-click="createConference()"><img class="crs-plus-icon" src="images/icon-add.png"><span>Make a new one!</span></div> </li> </ul> </div> ## Instruction: Remove mock conferences from admin page ## Code After: <div class="row"> <ul class="crs-card-stack"> <li class="crs-event-card span3" ng-repeat="conference in conferences"> <a class="crs-card-body" href="#/register/{{conference.id}}">{{conference.name}}</a> <a class="crs-card-count" href="#"><span>22</span></a> <a class="crs-card-sprocket" href="#/adminData/{{conference.id}}"></a> </li> <li class="crs-new-event-card span3"> <div data-ng-click="createConference()"><img class="crs-plus-icon" src="images/icon-add.png"><span>Make a new one!</span></div> </li> </ul> </div>
<div class="row"> <ul class="crs-card-stack"> <li class="crs-event-card span3" ng-repeat="conference in conferences"> <a class="crs-card-body" href="#/register/{{conference.id}}">{{conference.name}}</a> <a class="crs-card-count" href="#"><span>22</span></a> <a class="crs-card-sprocket" href="#/adminData/{{conference.id}}"></a> </li> - <li class="crs-event-card span3"> - <a class="crs-card-body">The Best Pickle Conference</a> - <a class="crs-card-count" href="#"><span>234</span></a> - <a class="crs-card-sprocket" href="#"></a> - </li> - <li class="crs-event-card span3"> - <a class="crs-card-body" href="">The Stuffed Sandwich Conference</a> - <a class="crs-card-count" href="#"><span>8</span></a> - <a class="crs-card-sprocket" href="#"></a> - </li> - <li class="crs-event-card span3"> - <a class="crs-card-body" href="">The Fall Retreatment of Curtans</a> - <a class="crs-card-count" href="#"><span>55</span></a> - <a class="crs-card-sprocket" href="#"></a> - </li> - <li class="crs-event-card span3"> - <a class="crs-card-body" href="">The Best of The Best of The Best</a> - <a class="crs-card-count" href="#"><span>1234</span></a> - <a class="crs-card-sprocket" href="#"></a> - </li> <li class="crs-new-event-card span3"> <div data-ng-click="createConference()"><img class="crs-plus-icon" src="images/icon-add.png"><span>Make a new one!</span></div> </li> </ul> </div>
20
0.588235
0
20
ced510140315c3884437fd65371c041ab3fc228a
S32-hash/map.t
S32-hash/map.t
use v6; use Test; plan 2; { my %hash = :foo, :42bar; is-deeply %hash.Map, Map.new( (:foo, :42bar) ), '.Map on defined Hash produces correct Map'; is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object'; } # vim: ft=perl6
use v6; use Test; plan 3; { my %hash = :foo, :42bar; is-deeply %hash.Map, Map.new( (:foo, :42bar) ), '.Map on defined Hash produces correct Map'; is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object'; throws-like( { %hash.map(Hash) }, X::AdHoc, message => /"Cannot map a {%hash.WHAT.perl} to a Hash."/, '<object|type>.map(Hash) should die' ); } # vim: ft=perl6
Test an untested method in Any-iterable-methods.pm
Test an untested method in Any-iterable-methods.pm
Perl
artistic-2.0
zostay/roast,bitrauser/roast,bitrauser/roast,zostay/roast,zostay/roast,perl6/roast,dogbert17/roast,dogbert17/roast
perl
## Code Before: use v6; use Test; plan 2; { my %hash = :foo, :42bar; is-deeply %hash.Map, Map.new( (:foo, :42bar) ), '.Map on defined Hash produces correct Map'; is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object'; } # vim: ft=perl6 ## Instruction: Test an untested method in Any-iterable-methods.pm ## Code After: use v6; use Test; plan 3; { my %hash = :foo, :42bar; is-deeply %hash.Map, Map.new( (:foo, :42bar) ), '.Map on defined Hash produces correct Map'; is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object'; throws-like( { %hash.map(Hash) }, X::AdHoc, message => /"Cannot map a {%hash.WHAT.perl} to a Hash."/, '<object|type>.map(Hash) should die' ); } # vim: ft=perl6
use v6; use Test; - plan 2; ? ^ + plan 3; ? ^ { my %hash = :foo, :42bar; is-deeply %hash.Map, Map.new( (:foo, :42bar) ), '.Map on defined Hash produces correct Map'; is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object'; + throws-like( + { %hash.map(Hash) }, + X::AdHoc, + message => /"Cannot map a {%hash.WHAT.perl} to a Hash."/, + '<object|type>.map(Hash) should die' + ); } # vim: ft=perl6
8
0.666667
7
1
0ba315243ba97bd588d4971786fc6598908ea370
platformio/boards/intel.json
platformio/boards/intel.json
{ "genuino101": { "build": { "core": "arc32", "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", "hwids": [ ["0x8087", "0x0AB6"] ] }, "frameworks": ["arduino"], "name": "Arduino/Genuino 101", "platform": "intel_arc32", "upload": { "maximum_ram_size": 81920, "maximum_size": 155648, "protocol": "script", "require_upload_port" : true }, "url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "vendor": "Intel" } }
{ "genuino101": { "build": { "core": "arc32", "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", "mcu": "ARCv2EM", "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", "hwids": [ ["0x8087", "0x0AB6"] ] }, "frameworks": ["arduino"], "name": "Arduino/Genuino 101", "platform": "intel_arc32", "upload": { "maximum_ram_size": 81920, "maximum_size": 155648, "protocol": "script", "require_upload_port" : true }, "url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "vendor": "Intel" } }
Revert mcu option for genuino101
Revert mcu option for genuino101
JSON
apache-2.0
platformio/platformio-core,platformio/platformio,platformio/platformio-core
json
## Code Before: { "genuino101": { "build": { "core": "arc32", "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", "hwids": [ ["0x8087", "0x0AB6"] ] }, "frameworks": ["arduino"], "name": "Arduino/Genuino 101", "platform": "intel_arc32", "upload": { "maximum_ram_size": 81920, "maximum_size": 155648, "protocol": "script", "require_upload_port" : true }, "url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "vendor": "Intel" } } ## Instruction: Revert mcu option for genuino101 ## Code After: { "genuino101": { "build": { "core": "arc32", "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", "mcu": "ARCv2EM", "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", "hwids": [ ["0x8087", "0x0AB6"] ] }, "frameworks": ["arduino"], "name": "Arduino/Genuino 101", "platform": "intel_arc32", "upload": { "maximum_ram_size": 81920, "maximum_size": 155648, "protocol": "script", "require_upload_port" : true }, "url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "vendor": "Intel" } }
{ "genuino101": { "build": { "core": "arc32", "extra_flags": "-DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__", "f_cpu": "32000000L", "ldscript": "flash.ld", + "mcu": "ARCv2EM", "cpu": "quarkse_em", "usb_product": "Genuino 101", "variant": "arduino_101", "hwids": [ ["0x8087", "0x0AB6"] ] }, "frameworks": ["arduino"], "name": "Arduino/Genuino 101", "platform": "intel_arc32", "upload": { "maximum_ram_size": 81920, "maximum_size": 155648, "protocol": "script", "require_upload_port" : true }, "url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "vendor": "Intel" } }
1
0.035714
1
0
8c10646768818a56ee89ff857318463da838f813
connect_ffi.py
connect_ffi.py
from cffi import FFI ffi = FFI() #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(header) ffi.cdef(""" void *malloc(size_t size); void exit(int status); """) C = ffi.dlopen(None) lib = ffi.verify(""" #include "spotify.h" """, include_dirs=['./'], library_dirs=['./'], libraries=[str('spotify_embedded_shared')])
import os from cffi import FFI ffi = FFI() library_name = "spotify.processed.h" library_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), libraryName) #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open(library_path) as file: header = file.read() ffi.cdef(header) ffi.cdef(""" void *malloc(size_t size); void exit(int status); """) C = ffi.dlopen(None) lib = ffi.verify(""" #include "spotify.h" """, include_dirs=['./'], library_dirs=['./'], libraries=[str('spotify_embedded_shared')])
Add complete path of spotify.processed.h
Add complete path of spotify.processed.h Add complete path of spotify.processed.h so it points to the same directory where is the file
Python
apache-2.0
chukysoria/spotify-connect-web,chukysoria/spotify-connect-web,chukysoria/spotify-connect-web,chukysoria/spotify-connect-web
python
## Code Before: from cffi import FFI ffi = FFI() #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open("spotify.processed.h") as file: header = file.read() ffi.cdef(header) ffi.cdef(""" void *malloc(size_t size); void exit(int status); """) C = ffi.dlopen(None) lib = ffi.verify(""" #include "spotify.h" """, include_dirs=['./'], library_dirs=['./'], libraries=[str('spotify_embedded_shared')]) ## Instruction: Add complete path of spotify.processed.h Add complete path of spotify.processed.h so it points to the same directory where is the file ## Code After: import os from cffi import FFI ffi = FFI() library_name = "spotify.processed.h" library_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), libraryName) #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h with open(library_path) as file: header = file.read() ffi.cdef(header) ffi.cdef(""" void *malloc(size_t size); void exit(int status); """) C = ffi.dlopen(None) lib = ffi.verify(""" #include "spotify.h" """, include_dirs=['./'], library_dirs=['./'], libraries=[str('spotify_embedded_shared')])
+ import os from cffi import FFI ffi = FFI() + library_name = "spotify.processed.h" + + library_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), libraryName) #Header generated with cpp spotify.h > spotify.processed.h && sed -i 's/__extension__//g' spotify.processed.h - with open("spotify.processed.h") as file: + with open(library_path) as file: header = file.read() ffi.cdef(header) ffi.cdef(""" void *malloc(size_t size); void exit(int status); """) C = ffi.dlopen(None) lib = ffi.verify(""" #include "spotify.h" """, include_dirs=['./'], library_dirs=['./'], libraries=[str('spotify_embedded_shared')])
6
0.315789
5
1
6f32ff6797db1b61d54bc4699196460d9ac9d2ef
setup-files/setup-paradox.el
setup-files/setup-paradox.el
;; Time-stamp: <2016-05-19 21:38:52 kmodi> ;; Paradox ;; https://github.com/Malabarba/paradox (use-package paradox :defer t :config (progn ;; The "paradox-token" file is supposed to contain this line: ;; (setq paradox-github-token "<YOUR_TOKEN>") (load (locate-user-emacs-file "paradox-token") :noerror :nomessage) (setq paradox-lines-per-entry 1) (setq paradox-automatically-star t) (paradox-enable))) (provide 'setup-paradox)
;; Time-stamp: <2017-04-11 17:55:49 kmodi> ;; Paradox ;; https://github.com/Malabarba/paradox (use-package paradox :defer 10 :config (progn ;; The "paradox-token" file is supposed to contain this line: ;; (setq paradox-github-token "<YOUR_TOKEN>") (load (locate-user-emacs-file "paradox-token") :noerror :nomessage) (setq paradox-lines-per-entry 1) (setq paradox-automatically-star t) (paradox-enable))) (provide 'setup-paradox)
Load paradox after idle time of 10 seconds
Load paradox after idle time of 10 seconds
Emacs Lisp
mit
kaushalmodi/.emacs.d,kaushalmodi/.emacs.d
emacs-lisp
## Code Before: ;; Time-stamp: <2016-05-19 21:38:52 kmodi> ;; Paradox ;; https://github.com/Malabarba/paradox (use-package paradox :defer t :config (progn ;; The "paradox-token" file is supposed to contain this line: ;; (setq paradox-github-token "<YOUR_TOKEN>") (load (locate-user-emacs-file "paradox-token") :noerror :nomessage) (setq paradox-lines-per-entry 1) (setq paradox-automatically-star t) (paradox-enable))) (provide 'setup-paradox) ## Instruction: Load paradox after idle time of 10 seconds ## Code After: ;; Time-stamp: <2017-04-11 17:55:49 kmodi> ;; Paradox ;; https://github.com/Malabarba/paradox (use-package paradox :defer 10 :config (progn ;; The "paradox-token" file is supposed to contain this line: ;; (setq paradox-github-token "<YOUR_TOKEN>") (load (locate-user-emacs-file "paradox-token") :noerror :nomessage) (setq paradox-lines-per-entry 1) (setq paradox-automatically-star t) (paradox-enable))) (provide 'setup-paradox)
- ;; Time-stamp: <2016-05-19 21:38:52 kmodi> ? ^ ^ ^ - ^^^ ^ + ;; Time-stamp: <2017-04-11 17:55:49 kmodi> ? ^ ^ ^ ^ ^^^^ ;; Paradox ;; https://github.com/Malabarba/paradox (use-package paradox - :defer t ? ^ + :defer 10 ? ^^ :config (progn ;; The "paradox-token" file is supposed to contain this line: ;; (setq paradox-github-token "<YOUR_TOKEN>") (load (locate-user-emacs-file "paradox-token") :noerror :nomessage) (setq paradox-lines-per-entry 1) (setq paradox-automatically-star t) (paradox-enable))) (provide 'setup-paradox)
4
0.2
2
2
d3100c6c218f9d23fc235b1437ff6fd1a4781bc2
doc/flattening-outcomes.md
doc/flattening-outcomes.md
1. Put the country in the right section of `lib/data/marriage_abroad_data.yml` and `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rake marriage_abroad:flatten_outcomes[<your country>,<civil_partnership or same_sex_marriage>]` e.g. `marriage_abroad:flatten_outcomes[russia,same_sex_marriage]` 3. Move the country to the right array in `test/integration/smart_answer_flows/marriage_abroad_test.rb` 4. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 5. Commit the changes to `test/data/marriage-abroad-responses-and-expected-results.yml` 6. `bundle exec rake checksums:update` 7. Commit the changes to `test/data/marriage-abroad-files.yml` 8. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 9. Commit any changes to `test/artefacts`
If the country does not have test artefacts (`test/artefacts/marriage-abroad/<your country>` doesn't exist), you will need to generate those first: 1. Add the country to `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 6. `bundle exec rake checksums:update` 3. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 4. Commit all changes If the country has test artefacts, or after you generate them: 1. Put the country in the right section of `lib/data/marriage_abroad_data.yml` and `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rake marriage_abroad:flatten_outcomes[<your country>,<civil_partnership or same_sex_marriage>]` e.g. `marriage_abroad:flatten_outcomes[russia,same_sex_marriage]` 3. Move the country to the right array in `test/integration/smart_answer_flows/marriage_abroad_test.rb` 4. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 5. Commit the changes to `test/data/marriage-abroad-responses-and-expected-results.yml` 6. `bundle exec rake checksums:update` 7. Commit the changes to `test/data/marriage-abroad-files.yml` 8. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 9. Commit any changes to `test/artefacts`
Update flattening docs for countries without regression tests
Update flattening docs for countries without regression tests
Markdown
mit
alphagov/smart-answers,alphagov/smart-answers,alphagov/smart-answers,alphagov/smart-answers
markdown
## Code Before: 1. Put the country in the right section of `lib/data/marriage_abroad_data.yml` and `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rake marriage_abroad:flatten_outcomes[<your country>,<civil_partnership or same_sex_marriage>]` e.g. `marriage_abroad:flatten_outcomes[russia,same_sex_marriage]` 3. Move the country to the right array in `test/integration/smart_answer_flows/marriage_abroad_test.rb` 4. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 5. Commit the changes to `test/data/marriage-abroad-responses-and-expected-results.yml` 6. `bundle exec rake checksums:update` 7. Commit the changes to `test/data/marriage-abroad-files.yml` 8. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 9. Commit any changes to `test/artefacts` ## Instruction: Update flattening docs for countries without regression tests ## Code After: If the country does not have test artefacts (`test/artefacts/marriage-abroad/<your country>` doesn't exist), you will need to generate those first: 1. Add the country to `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 6. `bundle exec rake checksums:update` 3. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 4. Commit all changes If the country has test artefacts, or after you generate them: 1. Put the country in the right section of `lib/data/marriage_abroad_data.yml` and `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rake marriage_abroad:flatten_outcomes[<your country>,<civil_partnership or same_sex_marriage>]` e.g. `marriage_abroad:flatten_outcomes[russia,same_sex_marriage]` 3. Move the country to the right array in `test/integration/smart_answer_flows/marriage_abroad_test.rb` 4. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 5. Commit the changes to `test/data/marriage-abroad-responses-and-expected-results.yml` 6. `bundle exec rake checksums:update` 7. Commit the changes to `test/data/marriage-abroad-files.yml` 8. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 9. Commit any changes to `test/artefacts`
+ + If the country does not have test artefacts (`test/artefacts/marriage-abroad/<your country>` doesn't exist), you will need to generate those first: + + 1. Add the country to `test/data/marriage-abroad-questions-and-responses.yml` + 2. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` + 6. `bundle exec rake checksums:update` + 3. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` + 4. Commit all changes + + If the country has test artefacts, or after you generate them: 1. Put the country in the right section of `lib/data/marriage_abroad_data.yml` and `test/data/marriage-abroad-questions-and-responses.yml` 2. `bundle exec rake marriage_abroad:flatten_outcomes[<your country>,<civil_partnership or same_sex_marriage>]` e.g. `marriage_abroad:flatten_outcomes[russia,same_sex_marriage]` 3. Move the country to the right array in `test/integration/smart_answer_flows/marriage_abroad_test.rb` 4. `bundle exec rails runner script/generate-responses-and-expected-results-for-smart-answer.rb marriage-abroad` 5. Commit the changes to `test/data/marriage-abroad-responses-and-expected-results.yml` 6. `bundle exec rake checksums:update` 7. Commit the changes to `test/data/marriage-abroad-files.yml` 8. `RUN_REGRESSION_TESTS=marriage-abroad ruby test/regression/smart_answers_regression_test.rb` 9. Commit any changes to `test/artefacts`
10
1
10
0
2b6dcd1736f3716cc494531fcb4151d8924cc2d7
test/configs/UsernoteConfig.yaml
test/configs/UsernoteConfig.yaml
--- info: name: "Usernote added" details: "Testing" trigger: commands: [n] types: [post, comment] actions: - remove - usernote: text: "Believes the concept 'horse' is a concept" level: "abusewarn"
--- info: name: "Usernote added" details: "Testing" trigger: commands: [n] types: [post, comment] actions: - usernote: text: "Believes the concept 'horse' is a concept" level: "abusewarn"
Fix usernote test removing target
Fix usernote test removing target
YAML
mit
leviroth/bernard
yaml
## Code Before: --- info: name: "Usernote added" details: "Testing" trigger: commands: [n] types: [post, comment] actions: - remove - usernote: text: "Believes the concept 'horse' is a concept" level: "abusewarn" ## Instruction: Fix usernote test removing target ## Code After: --- info: name: "Usernote added" details: "Testing" trigger: commands: [n] types: [post, comment] actions: - usernote: text: "Believes the concept 'horse' is a concept" level: "abusewarn"
--- info: name: "Usernote added" details: "Testing" trigger: commands: [n] types: [post, comment] actions: - - remove - usernote: text: "Believes the concept 'horse' is a concept" level: "abusewarn"
1
0.083333
0
1
99cabbf53367b8ace7fe253725987d22472002e9
nodemon.json
nodemon.json
{ "execMap": { "ts": "ts-node --files -r tsconfig-paths/register --project tsconfig.server.json" }, "watch": ["common/", "lib/", "locales/"], "ignore": ["test/", "*.test.ts", "*.test.tsx"], "ext": "ts,tsx,js,jsx,json" }
{ "execMap": { "ts": "ts-node --files -r tsconfig-paths/register --project tsconfig.server.json" }, "watch": ["common/", "lib/", "locales/"], "ignore": ["*.tsx", "test/", "*.test.ts"], "ext": "ts,tsx,js,jsx,json" }
Stop restart the server when server-side jsx templates editted
Stop restart the server when server-side jsx templates editted
JSON
mit
crowi/crowi,crowi/crowi,crowi/crowi
json
## Code Before: { "execMap": { "ts": "ts-node --files -r tsconfig-paths/register --project tsconfig.server.json" }, "watch": ["common/", "lib/", "locales/"], "ignore": ["test/", "*.test.ts", "*.test.tsx"], "ext": "ts,tsx,js,jsx,json" } ## Instruction: Stop restart the server when server-side jsx templates editted ## Code After: { "execMap": { "ts": "ts-node --files -r tsconfig-paths/register --project tsconfig.server.json" }, "watch": ["common/", "lib/", "locales/"], "ignore": ["*.tsx", "test/", "*.test.ts"], "ext": "ts,tsx,js,jsx,json" }
{ "execMap": { "ts": "ts-node --files -r tsconfig-paths/register --project tsconfig.server.json" }, "watch": ["common/", "lib/", "locales/"], - "ignore": ["test/", "*.test.ts", "*.test.tsx"], ? -------------- + "ignore": ["*.tsx", "test/", "*.test.ts"], ? +++++++++ "ext": "ts,tsx,js,jsx,json" }
2
0.25
1
1
0732ff4d29a122100712fbf2d5f6d89128129844
config.xml
config.xml
<?xml version='1.0' encoding='utf-8'?> <widget id="org.chamilo.messaging" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Chamilo Messaging</name> <description> The mini Messaging app for Chamilo LMS is a multi-mobile-OS application that will allow you to get your messages from Chamilo LMS. </description> <author email="angel.quiroz@beeznest.com" href="http://beeznest.com"> Beeznest Latino S.A.C </author> <icon src="logo.png" /> <content src="index.html" /> <access origin="*" /> </widget>
<?xml version='1.0' encoding='utf-8'?> <widget id="org.chamilo.messaging" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap = "http://phonegap.com/ns/1.0" xmlns:android = "http://schemas.android.com/apk/res/android" > <name>Chamilo Messaging</name> <description> The mini Messaging app for Chamilo LMS is a multi-mobile-OS application that allows you to get your messages from Chamilo LMS's social network. </description> <author email="info@beeznest.com" href="https://beeznest.com"> BeezNest </author> <icon src="logo.png" /> <content src="index.html" /> <access origin="*" /> <engine name="android" spec="^4.0.0" /> </widget>
Add phonegap xmlns, neutralize author
Add phonegap xmlns, neutralize author
XML
agpl-3.0
FraGoTe/mobile-messaging,sanyaade-teachings/mobile-messaging,chamilo/mobile-messaging,chamilo/mobile,chamilo/mobile,FraGoTe/mobile-messaging,sanyaade-teachings/mobile-messaging,chamilo/mobile-messaging
xml
## Code Before: <?xml version='1.0' encoding='utf-8'?> <widget id="org.chamilo.messaging" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Chamilo Messaging</name> <description> The mini Messaging app for Chamilo LMS is a multi-mobile-OS application that will allow you to get your messages from Chamilo LMS. </description> <author email="angel.quiroz@beeznest.com" href="http://beeznest.com"> Beeznest Latino S.A.C </author> <icon src="logo.png" /> <content src="index.html" /> <access origin="*" /> </widget> ## Instruction: Add phonegap xmlns, neutralize author ## Code After: <?xml version='1.0' encoding='utf-8'?> <widget id="org.chamilo.messaging" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap = "http://phonegap.com/ns/1.0" xmlns:android = "http://schemas.android.com/apk/res/android" > <name>Chamilo Messaging</name> <description> The mini Messaging app for Chamilo LMS is a multi-mobile-OS application that allows you to get your messages from Chamilo LMS's social network. </description> <author email="info@beeznest.com" href="https://beeznest.com"> BeezNest </author> <icon src="logo.png" /> <content src="index.html" /> <access origin="*" /> <engine name="android" spec="^4.0.0" /> </widget>
<?xml version='1.0' encoding='utf-8'?> - <widget id="org.chamilo.messaging" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> + <widget + id="org.chamilo.messaging" + version="0.0.1" + xmlns="http://www.w3.org/ns/widgets" + xmlns:cdv="http://cordova.apache.org/ns/1.0" + xmlns:gap = "http://phonegap.com/ns/1.0" + xmlns:android = "http://schemas.android.com/apk/res/android" + > <name>Chamilo Messaging</name> <description> - The mini Messaging app for Chamilo LMS is a multi-mobile-OS application that will allow you to get your messages from Chamilo LMS. ? ----- + The mini Messaging app for Chamilo LMS is a multi-mobile-OS application that allows you to get your messages from Chamilo LMS's social network. ? + +++++++++++++++++ </description> - <author email="angel.quiroz@beeznest.com" href="http://beeznest.com"> ? ^ ^^^^^^^^ - + <author email="info@beeznest.com" href="https://beeznest.com"> ? ^ ^ + - Beeznest Latino S.A.C + BeezNest </author> <icon src="logo.png" /> <content src="index.html" /> <access origin="*" /> + <engine name="android" spec="^4.0.0" /> </widget>
16
1.230769
12
4
aae2871cec247e332b05337bf45802a10f214afc
js/relations/module-wire-relation.js
js/relations/module-wire-relation.js
(function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var ModuleWireRelation = helper.inherits(function() { ModuleWireRelation.super_.call(this); }, jCore.Relation); if (typeof module !== 'undefined' && module.exports) module.exports = ModuleWireRelation; else app.ModuleWireRelation = ModuleWireRelation; })(this.app || (this.app = {}));
(function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var ModulePort = app.ModulePort || require('./module-port.js'); var ModuleWireRelation = helper.inherits(function(props) { ModuleWireRelation.super_.call(this); this.type = this.prop(props.type); this.module = this.prop(props.module); this.port = this.prop(props.port); this.wire = this.prop(props.wire); }, jCore.Relation); ModuleWireRelation.prototype.update = function() { var port = this.port(); if (!port.visible()) return; var type = this.type(); var module = this.module(); var wire = this.wire(); var offsetX = ({ source: ModulePort.SOCKET_OFFSET_X, target: ModulePort.PLUG_OFFSET_X })[type]; var x = module.x() + offsetX; var y = module.y() + module.portListTop() + port.top() + port.height() / 2; wire[type + 'X'](x); wire[type + 'Y'](y); }; ModuleWireRelation.TYPE_SOURCE = 'source'; ModuleWireRelation.TYPE_TARGET = 'target'; if (typeof module !== 'undefined' && module.exports) module.exports = ModuleWireRelation; else app.ModuleWireRelation = ModuleWireRelation; })(this.app || (this.app = {}));
Enable updating a module-wire position with a bound port
Enable updating a module-wire position with a bound port
JavaScript
mit
ionstage/modular,ionstage/modular
javascript
## Code Before: (function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var ModuleWireRelation = helper.inherits(function() { ModuleWireRelation.super_.call(this); }, jCore.Relation); if (typeof module !== 'undefined' && module.exports) module.exports = ModuleWireRelation; else app.ModuleWireRelation = ModuleWireRelation; })(this.app || (this.app = {})); ## Instruction: Enable updating a module-wire position with a bound port ## Code After: (function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var ModulePort = app.ModulePort || require('./module-port.js'); var ModuleWireRelation = helper.inherits(function(props) { ModuleWireRelation.super_.call(this); this.type = this.prop(props.type); this.module = this.prop(props.module); this.port = this.prop(props.port); this.wire = this.prop(props.wire); }, jCore.Relation); ModuleWireRelation.prototype.update = function() { var port = this.port(); if (!port.visible()) return; var type = this.type(); var module = this.module(); var wire = this.wire(); var offsetX = ({ source: ModulePort.SOCKET_OFFSET_X, target: ModulePort.PLUG_OFFSET_X })[type]; var x = module.x() + offsetX; var y = module.y() + module.portListTop() + port.top() + port.height() / 2; wire[type + 'X'](x); wire[type + 'Y'](y); }; ModuleWireRelation.TYPE_SOURCE = 'source'; ModuleWireRelation.TYPE_TARGET = 'target'; if (typeof module !== 'undefined' && module.exports) module.exports = ModuleWireRelation; else app.ModuleWireRelation = ModuleWireRelation; })(this.app || (this.app = {}));
(function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); + var ModulePort = app.ModulePort || require('./module-port.js'); - var ModuleWireRelation = helper.inherits(function() { + var ModuleWireRelation = helper.inherits(function(props) { ? +++++ ModuleWireRelation.super_.call(this); + + this.type = this.prop(props.type); + this.module = this.prop(props.module); + this.port = this.prop(props.port); + this.wire = this.prop(props.wire); }, jCore.Relation); + + ModuleWireRelation.prototype.update = function() { + var port = this.port(); + + if (!port.visible()) + return; + + var type = this.type(); + var module = this.module(); + var wire = this.wire(); + + var offsetX = ({ + source: ModulePort.SOCKET_OFFSET_X, + target: ModulePort.PLUG_OFFSET_X + })[type]; + + var x = module.x() + offsetX; + var y = module.y() + module.portListTop() + port.top() + port.height() / 2; + + wire[type + 'X'](x); + wire[type + 'Y'](y); + }; + + ModuleWireRelation.TYPE_SOURCE = 'source'; + ModuleWireRelation.TYPE_TARGET = 'target'; if (typeof module !== 'undefined' && module.exports) module.exports = ModuleWireRelation; else app.ModuleWireRelation = ModuleWireRelation; })(this.app || (this.app = {}));
33
2.2
32
1
745b6f2153c6e2dd59c2b405e665b37d0e296733
src/Extension/EventListener/Cleaner.php
src/Extension/EventListener/Cleaner.php
<?php namespace Behapi\Extension\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Behat\Behat\EventDispatcher\Event\OutlineTested; use Behat\Behat\EventDispatcher\Event\ScenarioTested; use Behapi\Extension\Tools\LastHistory; /** * Listener that cleans everything once a Scenario was finished * * @author Baptiste ClaviΓ© <clavie.b@gmail.com> */ class Cleaner implements EventSubscriberInterface { /** @var LastHistory */ private $history; public function __construct(LastHistory $history) { $this->history = $history; } /** {@inheritDoc} */ public static function getSubscribedEvents() { return [ OutlineTested::AFTER => 'clear', ScenarioTested::AFTER => 'clear' ]; } /** Resets the current history of the current client */ public function clear(): void { $this->history->reset(); } }
<?php namespace Behapi\Extension\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Behat\Behat\EventDispatcher\Event\OutlineTested; use Behat\Behat\EventDispatcher\Event\ScenarioTested; use Behapi\Extension\Tools\LastHistory; /** * Listener that cleans everything once a Scenario was finished * * @author Baptiste ClaviΓ© <clavie.b@gmail.com> */ class Cleaner implements EventSubscriberInterface { /** @var LastHistory */ private $history; public function __construct(LastHistory $history) { $this->history = $history; } /** {@inheritDoc} */ public static function getSubscribedEvents() { return [ OutlineTested::AFTER => ['clear', -99], ScenarioTested::AFTER => ['clear', -99] ]; } /** Resets the current history of the current client */ public function clear(): void { $this->history->reset(); } }
Add some priorities on listeners
Add some priorities on listeners
PHP
mit
Taluu/Behapi
php
## Code Before: <?php namespace Behapi\Extension\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Behat\Behat\EventDispatcher\Event\OutlineTested; use Behat\Behat\EventDispatcher\Event\ScenarioTested; use Behapi\Extension\Tools\LastHistory; /** * Listener that cleans everything once a Scenario was finished * * @author Baptiste ClaviΓ© <clavie.b@gmail.com> */ class Cleaner implements EventSubscriberInterface { /** @var LastHistory */ private $history; public function __construct(LastHistory $history) { $this->history = $history; } /** {@inheritDoc} */ public static function getSubscribedEvents() { return [ OutlineTested::AFTER => 'clear', ScenarioTested::AFTER => 'clear' ]; } /** Resets the current history of the current client */ public function clear(): void { $this->history->reset(); } } ## Instruction: Add some priorities on listeners ## Code After: <?php namespace Behapi\Extension\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Behat\Behat\EventDispatcher\Event\OutlineTested; use Behat\Behat\EventDispatcher\Event\ScenarioTested; use Behapi\Extension\Tools\LastHistory; /** * Listener that cleans everything once a Scenario was finished * * @author Baptiste ClaviΓ© <clavie.b@gmail.com> */ class Cleaner implements EventSubscriberInterface { /** @var LastHistory */ private $history; public function __construct(LastHistory $history) { $this->history = $history; } /** {@inheritDoc} */ public static function getSubscribedEvents() { return [ OutlineTested::AFTER => ['clear', -99], ScenarioTested::AFTER => ['clear', -99] ]; } /** Resets the current history of the current client */ public function clear(): void { $this->history->reset(); } }
<?php namespace Behapi\Extension\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Behat\Behat\EventDispatcher\Event\OutlineTested; use Behat\Behat\EventDispatcher\Event\ScenarioTested; use Behapi\Extension\Tools\LastHistory; /** * Listener that cleans everything once a Scenario was finished * * @author Baptiste ClaviΓ© <clavie.b@gmail.com> */ class Cleaner implements EventSubscriberInterface { /** @var LastHistory */ private $history; public function __construct(LastHistory $history) { $this->history = $history; } /** {@inheritDoc} */ public static function getSubscribedEvents() { return [ - OutlineTested::AFTER => 'clear', + OutlineTested::AFTER => ['clear', -99], ? + ++++++ - ScenarioTested::AFTER => 'clear' + ScenarioTested::AFTER => ['clear', -99] ? + ++++++ ]; } /** Resets the current history of the current client */ public function clear(): void { $this->history->reset(); } }
4
0.097561
2
2
c30eb12c22d5f93e5f281309a434f000ccf40b05
achmed-server/src/main/java/com/github/aureliano/achmed/server/service/ServiceFactory.java
achmed-server/src/main/java/com/github/aureliano/achmed/server/service/ServiceFactory.java
package com.github.aureliano.achmed.server.service; import com.github.aureliano.achmed.common.exception.AchmedException; public final class ServiceFactory { private ServiceFactory() {} public static IService createService(ServiceType type) { switch (type) { case READ_FILE: return null; default: throw new AchmedException("Unsupported service type: " + type); } } }
package com.github.aureliano.achmed.server.service; import com.github.aureliano.achmed.common.exception.AchmedException; public final class ServiceFactory { private ServiceFactory() {} public static IService createService(ServiceType type) { switch (type) { case READ_FILE: return new ReadFileService(); default: throw new AchmedException("Unsupported service type: " + type); } } }
Create service for reading file.
Create service for reading file.
Java
mit
aureliano/achmed
java
## Code Before: package com.github.aureliano.achmed.server.service; import com.github.aureliano.achmed.common.exception.AchmedException; public final class ServiceFactory { private ServiceFactory() {} public static IService createService(ServiceType type) { switch (type) { case READ_FILE: return null; default: throw new AchmedException("Unsupported service type: " + type); } } } ## Instruction: Create service for reading file. ## Code After: package com.github.aureliano.achmed.server.service; import com.github.aureliano.achmed.common.exception.AchmedException; public final class ServiceFactory { private ServiceFactory() {} public static IService createService(ServiceType type) { switch (type) { case READ_FILE: return new ReadFileService(); default: throw new AchmedException("Unsupported service type: " + type); } } }
package com.github.aureliano.achmed.server.service; import com.github.aureliano.achmed.common.exception.AchmedException; public final class ServiceFactory { private ServiceFactory() {} public static IService createService(ServiceType type) { switch (type) { case READ_FILE: - return null; + return new ReadFileService(); default: throw new AchmedException("Unsupported service type: " + type); } } }
2
0.117647
1
1
10f3584bbf8f1017f74c6e1bf72c8847e4c3db00
packages/libssh_aux.sh
packages/libssh_aux.sh
setLibsshTriggerVars() { LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.5.5"} LIBSSH_BLDRVERSION_EXP=${LIBSSH_BLDRVERSION:-"0.5.5"} # libssh always builds the shared libs. With configuration below, # it will also build the static library, so we call this build ser. LIBSSH_DESIRED_BUILDS=${LIBSSH_DESIRED_BUILDS:-"ser"} computeBuilds libssh # Since libssh always builds the shared libs in ser, addCc4py logic # not right. if ! isCcPyc; then addPycshBuild libssh fi LIBSSH_DEPS=openssl,cmake,zlib } setLibsshTriggerVars ###################################################################### # # Find libssh if needed # ###################################################################### findLibssh() { : }
setLibsshTriggerVars() { if test "$VISUALSTUDIO_VERSION" = 11; then LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.6.0"} else LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.5.5"} fi LIBSSH_BLDRVERSION_EXP=${LIBSSH_BLDRVERSION:-"0.5.5"} # libssh always builds the shared libs. With configuration below, # it will also build the static library, so we call this build ser. LIBSSH_DESIRED_BUILDS=${LIBSSH_DESIRED_BUILDS:-"ser"} computeBuilds libssh # Since libssh always builds the shared libs in ser, addCc4py logic # not right. if ! isCcPyc; then addPycshBuild libssh fi LIBSSH_DEPS=openssl,cmake,zlib } setLibsshTriggerVars ###################################################################### # # Find libssh if needed # ###################################################################### findLibssh() { : }
Use libssh-0.6.0 when compiling with VS11.
Use libssh-0.6.0 when compiling with VS11. git-svn-id: 06aac1f7aa6783202dd435920b98a457d633d0b0@2031 a9e16012-fd73-49ee-95cb-036de7809213
Shell
epl-1.0
Tech-XCorp/bilder
shell
## Code Before: setLibsshTriggerVars() { LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.5.5"} LIBSSH_BLDRVERSION_EXP=${LIBSSH_BLDRVERSION:-"0.5.5"} # libssh always builds the shared libs. With configuration below, # it will also build the static library, so we call this build ser. LIBSSH_DESIRED_BUILDS=${LIBSSH_DESIRED_BUILDS:-"ser"} computeBuilds libssh # Since libssh always builds the shared libs in ser, addCc4py logic # not right. if ! isCcPyc; then addPycshBuild libssh fi LIBSSH_DEPS=openssl,cmake,zlib } setLibsshTriggerVars ###################################################################### # # Find libssh if needed # ###################################################################### findLibssh() { : } ## Instruction: Use libssh-0.6.0 when compiling with VS11. git-svn-id: 06aac1f7aa6783202dd435920b98a457d633d0b0@2031 a9e16012-fd73-49ee-95cb-036de7809213 ## Code After: setLibsshTriggerVars() { if test "$VISUALSTUDIO_VERSION" = 11; then LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.6.0"} else LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.5.5"} fi LIBSSH_BLDRVERSION_EXP=${LIBSSH_BLDRVERSION:-"0.5.5"} # libssh always builds the shared libs. With configuration below, # it will also build the static library, so we call this build ser. LIBSSH_DESIRED_BUILDS=${LIBSSH_DESIRED_BUILDS:-"ser"} computeBuilds libssh # Since libssh always builds the shared libs in ser, addCc4py logic # not right. if ! isCcPyc; then addPycshBuild libssh fi LIBSSH_DEPS=openssl,cmake,zlib } setLibsshTriggerVars ###################################################################### # # Find libssh if needed # ###################################################################### findLibssh() { : }
setLibsshTriggerVars() { + if test "$VISUALSTUDIO_VERSION" = 11; then + LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.6.0"} + else - LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.5.5"} + LIBSSH_BLDRVERSION_STD=${LIBSSH_BLDRVERSION:-"0.5.5"} ? ++ + fi LIBSSH_BLDRVERSION_EXP=${LIBSSH_BLDRVERSION:-"0.5.5"} # libssh always builds the shared libs. With configuration below, # it will also build the static library, so we call this build ser. LIBSSH_DESIRED_BUILDS=${LIBSSH_DESIRED_BUILDS:-"ser"} computeBuilds libssh # Since libssh always builds the shared libs in ser, addCc4py logic # not right. if ! isCcPyc; then addPycshBuild libssh fi LIBSSH_DEPS=openssl,cmake,zlib } setLibsshTriggerVars ###################################################################### # # Find libssh if needed # ###################################################################### findLibssh() { : }
6
0.222222
5
1
b936bf8a14663c07b2e484b094b8aaa0724832fe
spec/integration/user_profile_spec.rb
spec/integration/user_profile_spec.rb
require 'spec_helper' include UploadHelper describe 'correct routing to profile', :type => :feature do it 'will load the profile at the correct path' do user = create(:user) visit "/profile/#{ user.username }" expect(page).to have_content user.username end end describe 'user profile header', :type => :feature do it "shows the user's name" do end context 'when logged in' do it 'shows how many images you have' do end end context 'when logged out' do it 'shows how many public images you have' do end end end describe 'image gallery' do context 'when logged in' do it 'shows all the images you uploaded' do end end context 'when logged out' do it 'shows only your public images' do end end end describe 'album gallery' do context 'when logged in' do it 'shows all the albums you created' do end end context 'when logged out' do it 'shows only the public albums you created' do end end end
require 'spec_helper' include UploadHelper describe 'correct routing to profile', :type => :feature do it 'will load the profile at the correct path' do user = create(:user) visit "/profile/#{ user.username }" page.status_code.should be 200 end end describe 'user profile header', :type => :feature do before(:each) do @user = create(:user) login_as(@user, :scope => :user) 4.times { |i| upload_test_file } 2.times { |i| upload_test_another_file } logout(:user) visit "/profile/#{ @user.username }" end it "shows the user's name" do expect(page).to have_content @user.username end context 'when logged in' do it 'shows how many images you have' do login_as(@user, :scope => :user) expect(page).to have_content '6 images' end end context 'when logged out' do it 'shows how many public images you have' do end end after(:each) do logout(:user) Warden.test_reset! end end describe 'image gallery' do context 'when logged in' do it 'shows all the images you uploaded' do end end context 'when logged out' do it 'shows only your public images' do end end end describe 'album gallery' do context 'when logged in' do it 'shows all the albums you created' do end end context 'when logged out' do it 'shows only the public albums you created' do end end end
Test image counts on user profiles
Test image counts on user profiles
Ruby
mit
Margatroid/uploadstuffto.me,Margatroid/uploadstuffto.me
ruby
## Code Before: require 'spec_helper' include UploadHelper describe 'correct routing to profile', :type => :feature do it 'will load the profile at the correct path' do user = create(:user) visit "/profile/#{ user.username }" expect(page).to have_content user.username end end describe 'user profile header', :type => :feature do it "shows the user's name" do end context 'when logged in' do it 'shows how many images you have' do end end context 'when logged out' do it 'shows how many public images you have' do end end end describe 'image gallery' do context 'when logged in' do it 'shows all the images you uploaded' do end end context 'when logged out' do it 'shows only your public images' do end end end describe 'album gallery' do context 'when logged in' do it 'shows all the albums you created' do end end context 'when logged out' do it 'shows only the public albums you created' do end end end ## Instruction: Test image counts on user profiles ## Code After: require 'spec_helper' include UploadHelper describe 'correct routing to profile', :type => :feature do it 'will load the profile at the correct path' do user = create(:user) visit "/profile/#{ user.username }" page.status_code.should be 200 end end describe 'user profile header', :type => :feature do before(:each) do @user = create(:user) login_as(@user, :scope => :user) 4.times { |i| upload_test_file } 2.times { |i| upload_test_another_file } logout(:user) visit "/profile/#{ @user.username }" end it "shows the user's name" do expect(page).to have_content @user.username end context 'when logged in' do it 'shows how many images you have' do login_as(@user, :scope => :user) expect(page).to have_content '6 images' end end context 'when logged out' do it 'shows how many public images you have' do end end after(:each) do logout(:user) Warden.test_reset! end end describe 'image gallery' do context 'when logged in' do it 'shows all the images you uploaded' do end end context 'when logged out' do it 'shows only your public images' do end end end describe 'album gallery' do context 'when logged in' do it 'shows all the albums you created' do end end context 'when logged out' do it 'shows only the public albums you created' do end end end
require 'spec_helper' include UploadHelper describe 'correct routing to profile', :type => :feature do it 'will load the profile at the correct path' do user = create(:user) visit "/profile/#{ user.username }" - expect(page).to have_content user.username + page.status_code.should be 200 end end describe 'user profile header', :type => :feature do + before(:each) do + @user = create(:user) + login_as(@user, :scope => :user) + + 4.times { |i| upload_test_file } + 2.times { |i| upload_test_another_file } + + logout(:user) + + visit "/profile/#{ @user.username }" + end + it "shows the user's name" do + expect(page).to have_content @user.username end context 'when logged in' do it 'shows how many images you have' do + login_as(@user, :scope => :user) + expect(page).to have_content '6 images' end end context 'when logged out' do it 'shows how many public images you have' do end + end + + after(:each) do + logout(:user) + Warden.test_reset! end end describe 'image gallery' do context 'when logged in' do it 'shows all the images you uploaded' do end end context 'when logged out' do it 'shows only your public images' do end end end describe 'album gallery' do context 'when logged in' do it 'shows all the albums you created' do end end context 'when logged out' do it 'shows only the public albums you created' do end end end
22
0.44
21
1
20325faa5fa522731fa5154506b0c0256fff02d9
pr-thumbsup.pl
pr-thumbsup.pl
use warnings; use strict; use Net::GitHub; use Data::Dumper; my @labels_to_remove = ["Ready for review"]; my @labels_to_add = ["Reviewed"]; open FILE, ".token" or die "Couldn't open GiHub token file: $!"; my $gh_token = join("", <FILE>); close FILE; my $gh = Net::GitHub->new(access_token => $gh_token, RaiseError => 1); my $pr_user = $ARGV[0] || usage(); my $pr_repo = $ARGV[1] || usage(); my $pr_issue = $ARGV[2] || usage(); my $comment = $ARGV[3]; #Optional $gh->set_default_user_repo($pr_user, $pr_repo); my $issue = $gh->issue->issue($pr_issue); print Dumper $issue; sub usage { print "Usage: pr-thumbsup.pl <user> <repository> <issue #>"; exit 1; }
use warnings; use strict; use Net::GitHub; use Data::Dumper; my @labels_to_remove = ["Ready for review"]; my @labels_to_add = ["Reviewed"]; open FILE, ".token" or die "Couldn't open GiHub token file: $!"; my $gh_token = join("", <FILE>); close FILE; my $gh = Net::GitHub->new(access_token => $gh_token, RaiseError => 1); my $pr_user = $ARGV[0] || usage(); my $pr_repo = $ARGV[1] || usage(); my $pr_issue = $ARGV[2] || usage(); my $extra = $ARGV[3]; #Optional $gh->set_default_user_repo($pr_user, $pr_repo); my $pr = $gh->pull_request->pull($pr_issue); my $msg = ":+1: as of $pr->{head}->{sha}."; if (defined($extra)) { $msg .= "\n\n$extra"; } print "Giving +1 to $pr_user/$pr_repo#$pr_issue: \"$pr->{title}\"\n"; print $msg, "\n"; print "Hit enter to continue."; getc; my $comment = $gh->issue->create_comment($pr_issue, { "body" => $msg }); print "done."; sub usage { print "Usage: pr-thumbsup.pl <user> <repository> <issue #>"; exit 1; }
Add the rest of the source file.
Add the rest of the source file.
Perl
mit
dijkstracula/pr-thumbsup
perl
## Code Before: use warnings; use strict; use Net::GitHub; use Data::Dumper; my @labels_to_remove = ["Ready for review"]; my @labels_to_add = ["Reviewed"]; open FILE, ".token" or die "Couldn't open GiHub token file: $!"; my $gh_token = join("", <FILE>); close FILE; my $gh = Net::GitHub->new(access_token => $gh_token, RaiseError => 1); my $pr_user = $ARGV[0] || usage(); my $pr_repo = $ARGV[1] || usage(); my $pr_issue = $ARGV[2] || usage(); my $comment = $ARGV[3]; #Optional $gh->set_default_user_repo($pr_user, $pr_repo); my $issue = $gh->issue->issue($pr_issue); print Dumper $issue; sub usage { print "Usage: pr-thumbsup.pl <user> <repository> <issue #>"; exit 1; } ## Instruction: Add the rest of the source file. ## Code After: use warnings; use strict; use Net::GitHub; use Data::Dumper; my @labels_to_remove = ["Ready for review"]; my @labels_to_add = ["Reviewed"]; open FILE, ".token" or die "Couldn't open GiHub token file: $!"; my $gh_token = join("", <FILE>); close FILE; my $gh = Net::GitHub->new(access_token => $gh_token, RaiseError => 1); my $pr_user = $ARGV[0] || usage(); my $pr_repo = $ARGV[1] || usage(); my $pr_issue = $ARGV[2] || usage(); my $extra = $ARGV[3]; #Optional $gh->set_default_user_repo($pr_user, $pr_repo); my $pr = $gh->pull_request->pull($pr_issue); my $msg = ":+1: as of $pr->{head}->{sha}."; if (defined($extra)) { $msg .= "\n\n$extra"; } print "Giving +1 to $pr_user/$pr_repo#$pr_issue: \"$pr->{title}\"\n"; print $msg, "\n"; print "Hit enter to continue."; getc; my $comment = $gh->issue->create_comment($pr_issue, { "body" => $msg }); print "done."; sub usage { print "Usage: pr-thumbsup.pl <user> <repository> <issue #>"; exit 1; }
use warnings; use strict; use Net::GitHub; use Data::Dumper; my @labels_to_remove = ["Ready for review"]; my @labels_to_add = ["Reviewed"]; open FILE, ".token" or die "Couldn't open GiHub token file: $!"; my $gh_token = join("", <FILE>); close FILE; my $gh = Net::GitHub->new(access_token => $gh_token, RaiseError => 1); my $pr_user = $ARGV[0] || usage(); my $pr_repo = $ARGV[1] || usage(); my $pr_issue = $ARGV[2] || usage(); - my $comment = $ARGV[3]; #Optional ? ---- ^ + my $extra = $ARGV[3]; #Optional ? ^ ++ $gh->set_default_user_repo($pr_user, $pr_repo); - my $issue = $gh->issue->issue($pr_issue); + my $pr = $gh->pull_request->pull($pr_issue); - print Dumper $issue; + my $msg = ":+1: as of $pr->{head}->{sha}."; + if (defined($extra)) { + $msg .= "\n\n$extra"; + } + print "Giving +1 to $pr_user/$pr_repo#$pr_issue: \"$pr->{title}\"\n"; + print $msg, "\n"; + print "Hit enter to continue."; + getc; + + my $comment = $gh->issue->create_comment($pr_issue, { + "body" => $msg + }); + + print "done."; sub usage { print "Usage: pr-thumbsup.pl <user> <repository> <issue #>"; exit 1; }
19
0.633333
16
3
b21f37287efc7bf07e12519fb65b6c724dd9af9e
src/coord/geo/prepareCustom.js
src/coord/geo/prepareCustom.js
import * as zrUtil from 'zrender/src/core/util'; function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } export default function (coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (data, noRoam) { // do not provide "out" param return coordSys.dataToPoint(data, noRoam); }, size: zrUtil.bind(dataToCoordSize, coordSys) } }; }
import * as zrUtil from 'zrender/src/core/util'; function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } export default function (coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (data) { // do not provide "out" and noRoam param, // Compatible with this usage: // echarts.util.map(item.points, api.coord) return coordSys.dataToPoint(data); }, size: zrUtil.bind(dataToCoordSize, coordSys) } }; }
Fix roam param for compatibility.
Fix roam param for compatibility.
JavaScript
apache-2.0
ecomfe/echarts,chenfwind/echarts,apache/incubator-echarts,apache/incubator-echarts,chenfwind/echarts,ecomfe/echarts,100star/echarts,100star/echarts
javascript
## Code Before: import * as zrUtil from 'zrender/src/core/util'; function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } export default function (coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (data, noRoam) { // do not provide "out" param return coordSys.dataToPoint(data, noRoam); }, size: zrUtil.bind(dataToCoordSize, coordSys) } }; } ## Instruction: Fix roam param for compatibility. ## Code After: import * as zrUtil from 'zrender/src/core/util'; function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } export default function (coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { coord: function (data) { // do not provide "out" and noRoam param, // Compatible with this usage: // echarts.util.map(item.points, api.coord) return coordSys.dataToPoint(data); }, size: zrUtil.bind(dataToCoordSize, coordSys) } }; }
import * as zrUtil from 'zrender/src/core/util'; function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); } export default function (coordSys) { var rect = coordSys.getBoundingRect(); return { coordSys: { type: 'geo', x: rect.x, y: rect.y, width: rect.width, height: rect.height }, api: { - coord: function (data, noRoam) { ? -------- + coord: function (data) { - // do not provide "out" param + // do not provide "out" and noRoam param, ? +++++++++++ + + // Compatible with this usage: + // echarts.util.map(item.points, api.coord) - return coordSys.dataToPoint(data, noRoam); ? -------- + return coordSys.dataToPoint(data); }, size: zrUtil.bind(dataToCoordSize, coordSys) } }; }
8
0.228571
5
3
7505111329ad32b76b479a5a29961dfb6ea59f55
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.7) project(GSL CXX) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) enable_testing() add_subdirectory(tests)
cmake_minimum_required(VERSION 2.8.7) project(GSL CXX) set(GSL_HEADERS "include/gsl.h" "include/gsl_assert.h" "include/span.h" "include/string_span.h" ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) install(FILES ${GSL_HEADERS} DESTINATION include/gsl ) enable_testing() add_subdirectory(tests)
Add CMake install target for header files
Add CMake install target for header files
Text
mit
martinmoene/GSL,garyfurnish/GSL,kernhanda/GSL,neilmacintosh/GSL,Josaphat/GSL,bashrc-real/GSL
text
## Code Before: cmake_minimum_required(VERSION 2.8.7) project(GSL CXX) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) enable_testing() add_subdirectory(tests) ## Instruction: Add CMake install target for header files ## Code After: cmake_minimum_required(VERSION 2.8.7) project(GSL CXX) set(GSL_HEADERS "include/gsl.h" "include/gsl_assert.h" "include/span.h" "include/string_span.h" ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) install(FILES ${GSL_HEADERS} DESTINATION include/gsl ) enable_testing() add_subdirectory(tests)
cmake_minimum_required(VERSION 2.8.7) project(GSL CXX) + + set(GSL_HEADERS + "include/gsl.h" + "include/gsl_assert.h" + "include/span.h" + "include/string_span.h" + ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) + install(FILES ${GSL_HEADERS} + DESTINATION include/gsl + ) + enable_testing() add_subdirectory(tests)
11
1
11
0
790146e310da009fbd092d6fef92d14abd251f66
playbook/roles/dbserver/defaults/main.yml
playbook/roles/dbserver/defaults/main.yml
--- partition_var_lib_mysql: True mariadb_root_password: root max_connections: 500 connection_timeout: 5 wait_timeout: 60 max_allowed_packet: 256M innodb_buffer_pool_size: 1024 innodb_buffer_pool_instances: 6 innodb_log_buffer_size: 8M innodb_log_file_size: 24M innodb_additional_mem_pool_size: 10M innodb_concurrency: 16 max_allowed_packet: 128M
--- partition_var_lib_mysql: True mariadb_root_password: root max_connections: 500 connection_timeout: 5 wait_timeout: 60 max_allowed_packet: 256M innodb_buffer_pool_size: 1024 innodb_buffer_pool_instances: 6 innodb_log_buffer_size: 8M innodb_log_file_size: 24M innodb_additional_mem_pool_size: 10M innodb_concurrency: 16
Remove dublicate max_allowed_packet from dbserver role defaults.
Remove dublicate max_allowed_packet from dbserver role defaults.
YAML
mit
wunderkraut/WunderMachina,wunderkraut/WunderMachina,wunderkraut/WunderMachina,wunderkraut/WunderMachina
yaml
## Code Before: --- partition_var_lib_mysql: True mariadb_root_password: root max_connections: 500 connection_timeout: 5 wait_timeout: 60 max_allowed_packet: 256M innodb_buffer_pool_size: 1024 innodb_buffer_pool_instances: 6 innodb_log_buffer_size: 8M innodb_log_file_size: 24M innodb_additional_mem_pool_size: 10M innodb_concurrency: 16 max_allowed_packet: 128M ## Instruction: Remove dublicate max_allowed_packet from dbserver role defaults. ## Code After: --- partition_var_lib_mysql: True mariadb_root_password: root max_connections: 500 connection_timeout: 5 wait_timeout: 60 max_allowed_packet: 256M innodb_buffer_pool_size: 1024 innodb_buffer_pool_instances: 6 innodb_log_buffer_size: 8M innodb_log_file_size: 24M innodb_additional_mem_pool_size: 10M innodb_concurrency: 16
--- partition_var_lib_mysql: True mariadb_root_password: root max_connections: 500 connection_timeout: 5 wait_timeout: 60 max_allowed_packet: 256M innodb_buffer_pool_size: 1024 innodb_buffer_pool_instances: 6 innodb_log_buffer_size: 8M innodb_log_file_size: 24M innodb_additional_mem_pool_size: 10M innodb_concurrency: 16 - max_allowed_packet: 128M
1
0.058824
0
1
0724362421d20f8c64ae9e84320aebf059e45e90
inc/functions.php
inc/functions.php
<?php // RadioPanel - Generic Functions // (C) Matt Ribbins - matt@mattyribbo.co.uk // API Calls function api_call() { $task = mysql_real_escape_string($_GET['task']); switch($task) { case "html_live_stats": stream_getlivestats(); break; default: } } ?>
<?php // RadioPanel - Generic Functions // (C) Matt Ribbins - matt@mattyribbo.co.uk // API Calls function api_call() { $task = mysql_real_escape_string($_GET['task']); switch($task) { case "html_live_stats": stream_getlivestats(); break; case "html_display_date": stats_search_display(); break; default: } } ?>
Add AJAX API for Week View
Add AJAX API for Week View
PHP
bsd-2-clause
mattyribbo/radiopanel,mattyribbo/radiopanel
php
## Code Before: <?php // RadioPanel - Generic Functions // (C) Matt Ribbins - matt@mattyribbo.co.uk // API Calls function api_call() { $task = mysql_real_escape_string($_GET['task']); switch($task) { case "html_live_stats": stream_getlivestats(); break; default: } } ?> ## Instruction: Add AJAX API for Week View ## Code After: <?php // RadioPanel - Generic Functions // (C) Matt Ribbins - matt@mattyribbo.co.uk // API Calls function api_call() { $task = mysql_real_escape_string($_GET['task']); switch($task) { case "html_live_stats": stream_getlivestats(); break; case "html_display_date": stats_search_display(); break; default: } } ?>
<?php // RadioPanel - Generic Functions // (C) Matt Ribbins - matt@mattyribbo.co.uk // API Calls function api_call() { $task = mysql_real_escape_string($_GET['task']); switch($task) { case "html_live_stats": stream_getlivestats(); break; + case "html_display_date": + stats_search_display(); + break; default: } } ?>
3
0.157895
3
0
0d914c040562efc68f96a3e0d70b14d21982abad
lib/facter/virtualenv_version.rb
lib/facter/virtualenv_version.rb
require 'puppet' pkg = Puppet::Type.type(:package).new(:name => "virtualenv") Facter.add("virtualenv_version") do has_weight 100 setcode do begin Facter::Util::Resolution.exec('virtualenv --version') rescue false end end end Facter.add("virtualenv_version") do has_weight 50 setcode do begin unless [:absent,'purged'].include?(pkg.retrieve[pkg.property(:ensure)]) /^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1] end rescue false end end end
require 'puppet' pkg = Puppet::Type.type(:package).new(:name => "virtualenv") Facter.add("virtualenv_version") do has_weight 100 setcode do begin Facter::Util::Resolution.exec('virtualenv --version') || "absent" rescue false end end end Facter.add("virtualenv_version") do has_weight 50 setcode do begin unless [:absent,'purged'].include?(pkg.retrieve[pkg.property(:ensure)]) /^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1] end rescue false end end end
Return 'absent' instead of nil
Return 'absent' instead of nil
Ruby
apache-2.0
adevore/puppet-python,cwood/puppet-python,ByteInternet/puppet-python,petems/puppet-python,petems/puppet-python,cwood/puppet-python,derektamsen/puppet-python,adevore/puppet-python,ByteInternet/puppet-python
ruby
## Code Before: require 'puppet' pkg = Puppet::Type.type(:package).new(:name => "virtualenv") Facter.add("virtualenv_version") do has_weight 100 setcode do begin Facter::Util::Resolution.exec('virtualenv --version') rescue false end end end Facter.add("virtualenv_version") do has_weight 50 setcode do begin unless [:absent,'purged'].include?(pkg.retrieve[pkg.property(:ensure)]) /^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1] end rescue false end end end ## Instruction: Return 'absent' instead of nil ## Code After: require 'puppet' pkg = Puppet::Type.type(:package).new(:name => "virtualenv") Facter.add("virtualenv_version") do has_weight 100 setcode do begin Facter::Util::Resolution.exec('virtualenv --version') || "absent" rescue false end end end Facter.add("virtualenv_version") do has_weight 50 setcode do begin unless [:absent,'purged'].include?(pkg.retrieve[pkg.property(:ensure)]) /^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1] end rescue false end end end
require 'puppet' pkg = Puppet::Type.type(:package).new(:name => "virtualenv") Facter.add("virtualenv_version") do has_weight 100 setcode do begin - Facter::Util::Resolution.exec('virtualenv --version') + Facter::Util::Resolution.exec('virtualenv --version') || "absent" ? ++++++++++++ rescue false end end end Facter.add("virtualenv_version") do has_weight 50 setcode do begin unless [:absent,'purged'].include?(pkg.retrieve[pkg.property(:ensure)]) /^.*(\d+\.\d+\.\d+).*$/.match(pkg.retrieve[pkg.property(:ensure)])[1] end rescue false end end end
2
0.08
1
1
abac937e7e470afe200016d01027eded575b6b98
config/application.rb
config/application.rb
require 'rubygems' require 'sinatra' require 'erb' require 'helpers' require 'dm-core' require 'dm-migrations' require 'digest/sha1' require 'rack-flash' require 'sinatra-authentication' # To install postgresql in Mac Os X run: # # sudo brew install postgresql # DataMapper.setup(:default, "postgres://localhost/rubycasts") DataMapper.auto_migrate!
require 'rubygems' require 'sinatra' require 'haml' require 'sass' require 'helpers' require 'dm-core' require 'dm-migrations' require 'digest/sha1' require 'rack-flash' require 'sinatra-authentication' # To install postgresql in Mac Os X run: # # sudo brew install postgresql # DataMapper.setup(:default, "postgres://localhost/rubycasts") DataMapper.auto_migrate!
Add haml and sass in config
Add haml and sass in config
Ruby
bsd-3-clause
tomas-stefano/rubycasts,tomas-stefano/rubycasts,tomas-stefano/rubycasts
ruby
## Code Before: require 'rubygems' require 'sinatra' require 'erb' require 'helpers' require 'dm-core' require 'dm-migrations' require 'digest/sha1' require 'rack-flash' require 'sinatra-authentication' # To install postgresql in Mac Os X run: # # sudo brew install postgresql # DataMapper.setup(:default, "postgres://localhost/rubycasts") DataMapper.auto_migrate! ## Instruction: Add haml and sass in config ## Code After: require 'rubygems' require 'sinatra' require 'haml' require 'sass' require 'helpers' require 'dm-core' require 'dm-migrations' require 'digest/sha1' require 'rack-flash' require 'sinatra-authentication' # To install postgresql in Mac Os X run: # # sudo brew install postgresql # DataMapper.setup(:default, "postgres://localhost/rubycasts") DataMapper.auto_migrate!
require 'rubygems' require 'sinatra' - require 'erb' + require 'haml' + require 'sass' require 'helpers' require 'dm-core' require 'dm-migrations' require 'digest/sha1' require 'rack-flash' require 'sinatra-authentication' # To install postgresql in Mac Os X run: # # sudo brew install postgresql # DataMapper.setup(:default, "postgres://localhost/rubycasts") DataMapper.auto_migrate!
3
0.1875
2
1
80c827119d9b1deb9a900c5a281ebb084d02ab48
modules/lang/rust/doctor.el
modules/lang/rust/doctor.el
;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/rust/doctor.el (assert! (or (not (featurep! +lsp)) (featurep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "rustc") (warn! "Couldn't find rustc binary")) (unless (executable-find "cargo") (warn! "Couldn't find cargo binary")) (if (featurep! +lsp) (let ((lsp-server 'rls)) (when (require 'rustic nil t) (setq lsp-server rustic-lsp-server)) (pcase lsp-server (`rust-analyzer (unless (executable-find "ra_lsp_server") (warn! "Couldn't find rust analyzer (ra_lsp_server)"))) (`rls (unless (executable-find "rls") (warn! "Couldn't find rls"))))) (when (require 'racer nil t) ;; racer (unless (file-exists-p racer-cmd) (warn! "Couldn't find the racer binary at `racer-cmd'")) ;; rust source code (rustup component add rust-src) (unless (file-directory-p racer-rust-src-path) (warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'"))))
;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/rust/doctor.el (assert! (or (not (featurep! +lsp)) (featurep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "rustc") (warn! "Couldn't find rustc binary")) (unless (executable-find "cargo") (warn! "Couldn't find cargo binary")) (if (featurep! +lsp) (let ((lsp-server 'rls)) (when (require 'rustic nil t) (setq lsp-server rustic-lsp-server)) (pcase lsp-server (`rust-analyzer (unless (executable-find "rust-analyzer") (warn! "Couldn't find rust analyzer (rust-analyzer)"))) (`rls (unless (executable-find "rls") (warn! "Couldn't find rls"))))) (when (require 'racer nil t) ;; racer (unless (file-exists-p racer-cmd) (warn! "Couldn't find the racer binary at `racer-cmd'")) ;; rust source code (rustup component add rust-src) (unless (file-directory-p racer-rust-src-path) (warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'"))))
Fix references to old rust-analyzer binary
Fix references to old rust-analyzer binary Closes #2588
Emacs Lisp
mit
UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/doom-emacs,UndeadKernel/emacs_doom,hlissner/doom-emacs,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/.emacs.d
emacs-lisp
## Code Before: ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/rust/doctor.el (assert! (or (not (featurep! +lsp)) (featurep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "rustc") (warn! "Couldn't find rustc binary")) (unless (executable-find "cargo") (warn! "Couldn't find cargo binary")) (if (featurep! +lsp) (let ((lsp-server 'rls)) (when (require 'rustic nil t) (setq lsp-server rustic-lsp-server)) (pcase lsp-server (`rust-analyzer (unless (executable-find "ra_lsp_server") (warn! "Couldn't find rust analyzer (ra_lsp_server)"))) (`rls (unless (executable-find "rls") (warn! "Couldn't find rls"))))) (when (require 'racer nil t) ;; racer (unless (file-exists-p racer-cmd) (warn! "Couldn't find the racer binary at `racer-cmd'")) ;; rust source code (rustup component add rust-src) (unless (file-directory-p racer-rust-src-path) (warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'")))) ## Instruction: Fix references to old rust-analyzer binary Closes #2588 ## Code After: ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/rust/doctor.el (assert! (or (not (featurep! +lsp)) (featurep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "rustc") (warn! "Couldn't find rustc binary")) (unless (executable-find "cargo") (warn! "Couldn't find cargo binary")) (if (featurep! +lsp) (let ((lsp-server 'rls)) (when (require 'rustic nil t) (setq lsp-server rustic-lsp-server)) (pcase lsp-server (`rust-analyzer (unless (executable-find "rust-analyzer") (warn! "Couldn't find rust analyzer (rust-analyzer)"))) (`rls (unless (executable-find "rls") (warn! "Couldn't find rls"))))) (when (require 'racer nil t) ;; racer (unless (file-exists-p racer-cmd) (warn! "Couldn't find the racer binary at `racer-cmd'")) ;; rust source code (rustup component add rust-src) (unless (file-directory-p racer-rust-src-path) (warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'"))))
;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/rust/doctor.el (assert! (or (not (featurep! +lsp)) (featurep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "rustc") (warn! "Couldn't find rustc binary")) (unless (executable-find "cargo") (warn! "Couldn't find cargo binary")) (if (featurep! +lsp) (let ((lsp-server 'rls)) (when (require 'rustic nil t) (setq lsp-server rustic-lsp-server)) (pcase lsp-server (`rust-analyzer - (unless (executable-find "ra_lsp_server") ? ^ ^^^^^^^ + (unless (executable-find "rust-analyzer") ? ++++ ^^ ^^ - (warn! "Couldn't find rust analyzer (ra_lsp_server)"))) ? ^ ^^^^^^^ + (warn! "Couldn't find rust analyzer (rust-analyzer)"))) ? ++++ ^^ ^^ (`rls (unless (executable-find "rls") (warn! "Couldn't find rls"))))) (when (require 'racer nil t) ;; racer (unless (file-exists-p racer-cmd) (warn! "Couldn't find the racer binary at `racer-cmd'")) ;; rust source code (rustup component add rust-src) (unless (file-directory-p racer-rust-src-path) (warn! "Couldn't find Rust's source code at RUST_SRC_PATH or `racer-rust-src-path'"))))
4
0.129032
2
2
460b1ab07858625f014ec8ef39853169a582b252
test/test_harvestman.rb
test/test_harvestman.rb
require 'helper' class TestHarvestman < Test::Unit::TestCase def test_namespace assert Harvestman.is_a?(Module) end def test_scraping results = [] Harvestman.crawl "test/example*.html", (1..3), :plain do r = { :title => css("head title"), :header => css("header div.title h1"), :footer => css("footer span a"), :list => [] } css "div.main ul" do r[:list] << css("li") end results << r end results.each_with_index do |r, i| assert_equal(r[:title], "ex#{i+1}") assert_equal(r[:header], "#{r[:title]}_header_h1") assert_equal(r[:footer], "#{r[:title]}_footer_span_a") assert_equal(r[:list].count, 3) end end end
require 'minitest/autorun' class TestHarvestman < MiniTest::Unit::TestCase def test_namespace assert Harvestman.is_a?(Module) end def test_scraping results = [] Harvestman.crawl "test/example*.html", (1..3), :plain do r = { :title => css("head title"), :header => css("header div.title h1"), :footer => css("footer span a"), :list => [] } css "div.main ul" do r[:list] << css("li") end results << r end results.each_with_index do |r, i| assert_equal(r[:title], "ex#{i+1}") assert_equal(r[:header], "#{r[:title]}_header_h1") assert_equal(r[:footer], "#{r[:title]}_footer_span_a") assert_equal(r[:list].count, 3) end end end
Update unit test class to use MiniTest
Update unit test class to use MiniTest
Ruby
mit
mion/harvestman
ruby
## Code Before: require 'helper' class TestHarvestman < Test::Unit::TestCase def test_namespace assert Harvestman.is_a?(Module) end def test_scraping results = [] Harvestman.crawl "test/example*.html", (1..3), :plain do r = { :title => css("head title"), :header => css("header div.title h1"), :footer => css("footer span a"), :list => [] } css "div.main ul" do r[:list] << css("li") end results << r end results.each_with_index do |r, i| assert_equal(r[:title], "ex#{i+1}") assert_equal(r[:header], "#{r[:title]}_header_h1") assert_equal(r[:footer], "#{r[:title]}_footer_span_a") assert_equal(r[:list].count, 3) end end end ## Instruction: Update unit test class to use MiniTest ## Code After: require 'minitest/autorun' class TestHarvestman < MiniTest::Unit::TestCase def test_namespace assert Harvestman.is_a?(Module) end def test_scraping results = [] Harvestman.crawl "test/example*.html", (1..3), :plain do r = { :title => css("head title"), :header => css("header div.title h1"), :footer => css("footer span a"), :list => [] } css "div.main ul" do r[:list] << css("li") end results << r end results.each_with_index do |r, i| assert_equal(r[:title], "ex#{i+1}") assert_equal(r[:header], "#{r[:title]}_header_h1") assert_equal(r[:footer], "#{r[:title]}_footer_span_a") assert_equal(r[:list].count, 3) end end end
- require 'helper' + require 'minitest/autorun' - class TestHarvestman < Test::Unit::TestCase + class TestHarvestman < MiniTest::Unit::TestCase ? ++++ def test_namespace assert Harvestman.is_a?(Module) end def test_scraping results = [] Harvestman.crawl "test/example*.html", (1..3), :plain do r = { :title => css("head title"), :header => css("header div.title h1"), :footer => css("footer span a"), :list => [] } css "div.main ul" do r[:list] << css("li") end results << r end results.each_with_index do |r, i| assert_equal(r[:title], "ex#{i+1}") - assert_equal(r[:header], "#{r[:title]}_header_h1") ? --- + assert_equal(r[:header], "#{r[:title]}_header_h1") assert_equal(r[:footer], "#{r[:title]}_footer_span_a") assert_equal(r[:list].count, 3) end end end
6
0.181818
3
3
fd1783df3648cdb80b32ae41ffd1d9e1ccb23196
tests/ex25_tests.py
tests/ex25_tests.py
from nose.tools import * from exercises import ex25 def test_make_ing_form_ie(): ''' Test for ie match ''' present_verb = ex25.make_ing_form('tie') assert_equal(third_person_form, 'tying') def test_make_ing_form_e(): ''' Test for e match ''' present_verb = ex25.make_ing_form('grate') assert_equal(third_person_form, 'grating') def test_make_ing_form_s(): ''' Test for other matches ''' present_verb = ex25.make_ing_form('grab') assert_equal(third_person_form, 'grabs')
from nose.tools import * from exercises import ex25 def test_make_ing_form_ie(): ''' Test for ie match ''' present_verb = ex25.make_ing_form('tie') assert_equal(present_verb, 'tying') def test_make_ing_form_e(): ''' Test for e match ''' present_verb = ex25.make_ing_form('grate') assert_equal(present_verb, 'grating') def test_make_ing_form_s(): ''' Test for other matches ''' present_verb = ex25.make_ing_form('grab') assert_equal(present_verb, 'grabs')
Fix a copy paste fail
Fix a copy paste fail
Python
mit
gravyboat/python-exercises
python
## Code Before: from nose.tools import * from exercises import ex25 def test_make_ing_form_ie(): ''' Test for ie match ''' present_verb = ex25.make_ing_form('tie') assert_equal(third_person_form, 'tying') def test_make_ing_form_e(): ''' Test for e match ''' present_verb = ex25.make_ing_form('grate') assert_equal(third_person_form, 'grating') def test_make_ing_form_s(): ''' Test for other matches ''' present_verb = ex25.make_ing_form('grab') assert_equal(third_person_form, 'grabs') ## Instruction: Fix a copy paste fail ## Code After: from nose.tools import * from exercises import ex25 def test_make_ing_form_ie(): ''' Test for ie match ''' present_verb = ex25.make_ing_form('tie') assert_equal(present_verb, 'tying') def test_make_ing_form_e(): ''' Test for e match ''' present_verb = ex25.make_ing_form('grate') assert_equal(present_verb, 'grating') def test_make_ing_form_s(): ''' Test for other matches ''' present_verb = ex25.make_ing_form('grab') assert_equal(present_verb, 'grabs')
from nose.tools import * from exercises import ex25 def test_make_ing_form_ie(): ''' Test for ie match ''' present_verb = ex25.make_ing_form('tie') - assert_equal(third_person_form, 'tying') + assert_equal(present_verb, 'tying') def test_make_ing_form_e(): ''' Test for e match ''' present_verb = ex25.make_ing_form('grate') - assert_equal(third_person_form, 'grating') ? ---- ^ ^^^^^^^^ + assert_equal(present_verb, 'grating') ? ++++++ ^ ^ def test_make_ing_form_s(): ''' Test for other matches ''' present_verb = ex25.make_ing_form('grab') - assert_equal(third_person_form, 'grabs') + assert_equal(present_verb, 'grabs')
6
0.206897
3
3
49d0c7c52528c7939b5d88dc0acdebbaf6c47abe
tuneme/static/new/css/modules/_m-polls.scss
tuneme/static/new/css/modules/_m-polls.scss
.polls { padding: 20px; background: #cd36f5; a { color: #000; text-decoration: underline; } input[type="submit"] { background: #a023c1; } } .poll-question__title { margin: 0 0 20px 0; } .poll-free-text-input { width: 100%; margin: 0 0 20px 0; } .poll-choices { margin: 0 0 20px 0; } .poll-choices__item { font-weight: bold; margin: 0 0 10px 0; }
.polls { padding: 20px; background: #cd36f5; a { color: #000; text-decoration: underline; } input[type="submit"] { background: #a023c1; } } .poll-question__title { margin: 0 0 20px 0; font-weight: bold; text-transform: uppercase; } .poll-free-text-input { width: 100%; margin: 0 0 20px 0; } .poll-choices { margin: 0 0 20px 0; } .poll-choices__item { font-weight: bold; margin: 0 0 10px 0; }
Make Polls heading bold and uppercased to be more prominent
Make Polls heading bold and uppercased to be more prominent
SCSS
bsd-2-clause
praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme
scss
## Code Before: .polls { padding: 20px; background: #cd36f5; a { color: #000; text-decoration: underline; } input[type="submit"] { background: #a023c1; } } .poll-question__title { margin: 0 0 20px 0; } .poll-free-text-input { width: 100%; margin: 0 0 20px 0; } .poll-choices { margin: 0 0 20px 0; } .poll-choices__item { font-weight: bold; margin: 0 0 10px 0; } ## Instruction: Make Polls heading bold and uppercased to be more prominent ## Code After: .polls { padding: 20px; background: #cd36f5; a { color: #000; text-decoration: underline; } input[type="submit"] { background: #a023c1; } } .poll-question__title { margin: 0 0 20px 0; font-weight: bold; text-transform: uppercase; } .poll-free-text-input { width: 100%; margin: 0 0 20px 0; } .poll-choices { margin: 0 0 20px 0; } .poll-choices__item { font-weight: bold; margin: 0 0 10px 0; }
.polls { padding: 20px; background: #cd36f5; a { color: #000; text-decoration: underline; } input[type="submit"] { background: #a023c1; } } .poll-question__title { margin: 0 0 20px 0; + font-weight: bold; + text-transform: uppercase; } .poll-free-text-input { width: 100%; margin: 0 0 20px 0; } .poll-choices { margin: 0 0 20px 0; } .poll-choices__item { font-weight: bold; margin: 0 0 10px 0; }
2
0.064516
2
0
f0e159916a6876ed1307b72ffe1551ea5881e56b
src/pages/index.js
src/pages/index.js
import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> <h3> <Link to={node.fields.slug}> {node.frontmatter.title} <span>β€” {node.frontmatter.date}</span> </Link> </h3> <p>{node.excerpt}</p> </div> ))} </div> ); }; export const query = graphql` query IndexQuery { allMarkdownRemark( sort: { fields: [frontmatter___date], order: DESC } filter: { frontmatter: { published: { eq: true } } } ) { totalCount edges { node { id frontmatter { title date(formatString: "DD MMMM, YYYY") } fields { slug } excerpt } } } } `;
import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> <h3> <Link to={node.fields.slug}> {node.frontmatter.title} <span>β€” {node.frontmatter.date}</span> </Link> </h3> <p> {node.excerpt} <Link to={node.fields.slug}>more.</Link> </p> </div> ))} </div> ); }; export const query = graphql` query IndexQuery { allMarkdownRemark( sort: { fields: [frontmatter___date], order: DESC } filter: { frontmatter: { published: { eq: true } } } ) { totalCount edges { node { id frontmatter { title date(formatString: "DD MMMM, YYYY") } fields { slug } excerpt } } } } `;
Add a more button to excerpt in blog list
feat: Add a more button to excerpt in blog list
JavaScript
mit
aksharpatel47/me,aksharpatel47/me
javascript
## Code Before: import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> <h3> <Link to={node.fields.slug}> {node.frontmatter.title} <span>β€” {node.frontmatter.date}</span> </Link> </h3> <p>{node.excerpt}</p> </div> ))} </div> ); }; export const query = graphql` query IndexQuery { allMarkdownRemark( sort: { fields: [frontmatter___date], order: DESC } filter: { frontmatter: { published: { eq: true } } } ) { totalCount edges { node { id frontmatter { title date(formatString: "DD MMMM, YYYY") } fields { slug } excerpt } } } } `; ## Instruction: feat: Add a more button to excerpt in blog list ## Code After: import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> <h3> <Link to={node.fields.slug}> {node.frontmatter.title} <span>β€” {node.frontmatter.date}</span> </Link> </h3> <p> {node.excerpt} <Link to={node.fields.slug}>more.</Link> </p> </div> ))} </div> ); }; export const query = graphql` query IndexQuery { allMarkdownRemark( sort: { fields: [frontmatter___date], order: DESC } filter: { frontmatter: { published: { eq: true } } } ) { totalCount edges { node { id frontmatter { title date(formatString: "DD MMMM, YYYY") } fields { slug } excerpt } } } } `;
import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> <h3> <Link to={node.fields.slug}> {node.frontmatter.title} <span>β€” {node.frontmatter.date}</span> </Link> </h3> + <p> - <p>{node.excerpt}</p> ? ^^^ ---- + {node.excerpt} ? ^^ + <Link to={node.fields.slug}>more.</Link> + </p> </div> ))} </div> ); }; export const query = graphql` query IndexQuery { allMarkdownRemark( sort: { fields: [frontmatter___date], order: DESC } filter: { frontmatter: { published: { eq: true } } } ) { totalCount edges { node { id frontmatter { title date(formatString: "DD MMMM, YYYY") } fields { slug } excerpt } } } } `;
5
0.108696
4
1
194485728e992f0770b9d096ff7dff4dc522a83a
bower.json
bower.json
{ "name": "pulsar", "version": "6.5.0", "ignore": [ "**/.*", "node_modules", "libs", "bower_components", "test", "tests" ], "dependencies": { "bootstrapx-clickover": "latest", "font-awesome": "3.2.1", "html5shiv": "latest", "jquery": "1.x", "jquery-autosize": "latest", "jquery-placeholder": "Stanton/jquery-placeholder#v.2.0.9", "list.js": "latest", "moment": "latest", "normalize-css": "latest", "nwmatcher": "latest", "pikaday": "latest", "respond": "latest", "selectivizr": "jadu/selectivizr", "select2": "~4.0.0", "sticky": "latest", "store.js": "latest", "susy": "~2.2.6", "svgeezy": "latest", "Vague.js": "Stanton/vague.js", "vide": "~0.3.1" }, "devDependencies": { "livereload-js": "livereload/livereload-js", "vide": "~0.3.1", "jquery.countdown": "^2.1.0" }, "resolutions": { "font-awesome": "3.2.1" } }
{ "name": "pulsar", "version": "6.5.0", "ignore": [ "**/.*", "node_modules", "libs", "bower_components", "test", "tests" ], "dependencies": { "bootstrapx-clickover": "latest", "font-awesome": "3.2.1", "html5shiv": "latest", "jquery": "1.x", "jquery-autosize": "latest", "jquery-placeholder": "Stanton/jquery-placeholder#v.2.0.9", "jquery.countdown": "^2.1.0", "list.js": "latest", "moment": "latest", "normalize-css": "latest", "nwmatcher": "latest", "pikaday": "latest", "respond": "latest", "selectivizr": "jadu/selectivizr", "select2": "~4.0.0", "sticky": "latest", "store.js": "latest", "susy": "~2.2.6", "svgeezy": "latest", "Vague.js": "Stanton/vague.js", "vide": "~0.3.1" }, "devDependencies": { "livereload-js": "livereload/livereload-js", "vide": "~0.3.1" }, "resolutions": { "font-awesome": "3.2.1" } }
Move jquery.countdown out of devDependencies
Move jquery.countdown out of devDependencies
JSON
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
json
## Code Before: { "name": "pulsar", "version": "6.5.0", "ignore": [ "**/.*", "node_modules", "libs", "bower_components", "test", "tests" ], "dependencies": { "bootstrapx-clickover": "latest", "font-awesome": "3.2.1", "html5shiv": "latest", "jquery": "1.x", "jquery-autosize": "latest", "jquery-placeholder": "Stanton/jquery-placeholder#v.2.0.9", "list.js": "latest", "moment": "latest", "normalize-css": "latest", "nwmatcher": "latest", "pikaday": "latest", "respond": "latest", "selectivizr": "jadu/selectivizr", "select2": "~4.0.0", "sticky": "latest", "store.js": "latest", "susy": "~2.2.6", "svgeezy": "latest", "Vague.js": "Stanton/vague.js", "vide": "~0.3.1" }, "devDependencies": { "livereload-js": "livereload/livereload-js", "vide": "~0.3.1", "jquery.countdown": "^2.1.0" }, "resolutions": { "font-awesome": "3.2.1" } } ## Instruction: Move jquery.countdown out of devDependencies ## Code After: { "name": "pulsar", "version": "6.5.0", "ignore": [ "**/.*", "node_modules", "libs", "bower_components", "test", "tests" ], "dependencies": { "bootstrapx-clickover": "latest", "font-awesome": "3.2.1", "html5shiv": "latest", "jquery": "1.x", "jquery-autosize": "latest", "jquery-placeholder": "Stanton/jquery-placeholder#v.2.0.9", "jquery.countdown": "^2.1.0", "list.js": "latest", "moment": "latest", "normalize-css": "latest", "nwmatcher": "latest", "pikaday": "latest", "respond": "latest", "selectivizr": "jadu/selectivizr", "select2": "~4.0.0", "sticky": "latest", "store.js": "latest", "susy": "~2.2.6", "svgeezy": "latest", "Vague.js": "Stanton/vague.js", "vide": "~0.3.1" }, "devDependencies": { "livereload-js": "livereload/livereload-js", "vide": "~0.3.1" }, "resolutions": { "font-awesome": "3.2.1" } }
{ "name": "pulsar", "version": "6.5.0", "ignore": [ "**/.*", "node_modules", "libs", "bower_components", "test", "tests" ], "dependencies": { "bootstrapx-clickover": "latest", "font-awesome": "3.2.1", "html5shiv": "latest", "jquery": "1.x", "jquery-autosize": "latest", "jquery-placeholder": "Stanton/jquery-placeholder#v.2.0.9", + "jquery.countdown": "^2.1.0", "list.js": "latest", "moment": "latest", "normalize-css": "latest", "nwmatcher": "latest", "pikaday": "latest", "respond": "latest", "selectivizr": "jadu/selectivizr", "select2": "~4.0.0", "sticky": "latest", "store.js": "latest", "susy": "~2.2.6", "svgeezy": "latest", "Vague.js": "Stanton/vague.js", "vide": "~0.3.1" }, "devDependencies": { "livereload-js": "livereload/livereload-js", - "vide": "~0.3.1", ? - + "vide": "~0.3.1" - "jquery.countdown": "^2.1.0" }, "resolutions": { "font-awesome": "3.2.1" } }
4
0.095238
2
2
25cc59e0c1562c37a76e7f64c415173d46aa7942
docs/api.md
docs/api.md
```js { // Constructor constructor(object: options) // Properties url (string) body (any) headers (Headers) method (string) params (object) timeout (number) credentials (boolean) emulateHTTP (boolean) emulateJSON (boolean) before (function(Request)) progress (function(Event)) // Methods getUrl() (string) getBody() (any) respondWith(any: body, object: options) (Response) } ``` ## Response ```js { // Constructor constructor(any: body, object: {string: url, object: headers, number: status, string: statusText}) // Properties url (string) body (any) headers (Headers) ok (boolean) status (number) statusText (string) // Methods blob() (Promise) text() (Promise) json() (Promise) } ``` ## Headers ```js { // Constructor constructor(object: headers) // Properties map (object) // Methods has(string: name) (boolean) get(string: name) (string) getAll() (string[]) set(string: name, string: value) (void) append(string: name, string: value) (void) delete(string: name) (void) forEach(function: callback, any: thisArg) (void) } ```
```js { // Constructor constructor(object: options) // Properties url (string) body (any) headers (Headers) method (string) params (object) timeout (number) credentials (boolean) emulateHTTP (boolean) emulateJSON (boolean) before (function(Request)) progress (function(Event)) // Methods getUrl() (string) getBody() (any) respondWith(any: body, object: options) (Response) abort() } ``` ## Response ```js { // Constructor constructor(any: body, object: {string: url, object: headers, number: status, string: statusText}) // Properties url (string) body (any) headers (Headers) ok (boolean) status (number) statusText (string) // Methods blob() (Promise) text() (Promise) json() (Promise) } ``` ## Headers ```js { // Constructor constructor(object: headers) // Properties map (object) // Methods has(string: name) (boolean) get(string: name) (string) getAll() (string[]) set(string: name, string: value) (void) append(string: name, string: value) (void) delete(string: name) (void) forEach(function: callback, any: thisArg) (void) } ```
Add abort to the API
Add abort to the API
Markdown
mit
pagekit/vue-resource,vuejs/vue-resource,pagekit/vue-resource,pagekit/vue-resource,vuejs/vue-resource
markdown
## Code Before: ```js { // Constructor constructor(object: options) // Properties url (string) body (any) headers (Headers) method (string) params (object) timeout (number) credentials (boolean) emulateHTTP (boolean) emulateJSON (boolean) before (function(Request)) progress (function(Event)) // Methods getUrl() (string) getBody() (any) respondWith(any: body, object: options) (Response) } ``` ## Response ```js { // Constructor constructor(any: body, object: {string: url, object: headers, number: status, string: statusText}) // Properties url (string) body (any) headers (Headers) ok (boolean) status (number) statusText (string) // Methods blob() (Promise) text() (Promise) json() (Promise) } ``` ## Headers ```js { // Constructor constructor(object: headers) // Properties map (object) // Methods has(string: name) (boolean) get(string: name) (string) getAll() (string[]) set(string: name, string: value) (void) append(string: name, string: value) (void) delete(string: name) (void) forEach(function: callback, any: thisArg) (void) } ``` ## Instruction: Add abort to the API ## Code After: ```js { // Constructor constructor(object: options) // Properties url (string) body (any) headers (Headers) method (string) params (object) timeout (number) credentials (boolean) emulateHTTP (boolean) emulateJSON (boolean) before (function(Request)) progress (function(Event)) // Methods getUrl() (string) getBody() (any) respondWith(any: body, object: options) (Response) abort() } ``` ## Response ```js { // Constructor constructor(any: body, object: {string: url, object: headers, number: status, string: statusText}) // Properties url (string) body (any) headers (Headers) ok (boolean) status (number) statusText (string) // Methods blob() (Promise) text() (Promise) json() (Promise) } ``` ## Headers ```js { // Constructor constructor(object: headers) // Properties map (object) // Methods has(string: name) (boolean) get(string: name) (string) getAll() (string[]) set(string: name, string: value) (void) append(string: name, string: value) (void) delete(string: name) (void) forEach(function: callback, any: thisArg) (void) } ```
```js { // Constructor constructor(object: options) // Properties url (string) body (any) headers (Headers) method (string) params (object) timeout (number) credentials (boolean) emulateHTTP (boolean) emulateJSON (boolean) before (function(Request)) progress (function(Event)) // Methods getUrl() (string) getBody() (any) respondWith(any: body, object: options) (Response) + abort() } ``` ## Response ```js { // Constructor constructor(any: body, object: {string: url, object: headers, number: status, string: statusText}) // Properties url (string) body (any) headers (Headers) ok (boolean) status (number) statusText (string) // Methods blob() (Promise) text() (Promise) json() (Promise) } ``` ## Headers ```js { // Constructor constructor(object: headers) // Properties map (object) // Methods has(string: name) (boolean) get(string: name) (string) getAll() (string[]) set(string: name, string: value) (void) append(string: name, string: value) (void) delete(string: name) (void) forEach(function: callback, any: thisArg) (void) } ```
1
0.014706
1
0
5d48d908595c0f9e57c7b4ef8558b0ad03a627c2
db/migrate/20151107105747_create_trends.rb
db/migrate/20151107105747_create_trends.rb
class CreateTrends < ActiveRecord::Migration def change create_table :trends do |t| t.string :description t.string :links # link of the feed itself t.string :titles t.string :authors t.string :dates # edited date of the feeed t.text :contents t.string :tags t.string :imgs t.timestamps null: false end end end
class CreateTrends < ActiveRecord::Migration def change create_table :trends do |t| t.string :description t.string :links # link of the feed itself t.string :titles t.string :categories t.string :authors t.string :dates # edited date of the feeed t.text :contents t.string :tags t.string :imgs t.timestamps null: false end end end
Add new column "categories" in db
Add new column "categories" in db
Ruby
mit
SOA-Upstart4/bnext_service,SOA-Upstart4/bnext_service,SOA-Upstart4/BnextService_Dynamo
ruby
## Code Before: class CreateTrends < ActiveRecord::Migration def change create_table :trends do |t| t.string :description t.string :links # link of the feed itself t.string :titles t.string :authors t.string :dates # edited date of the feeed t.text :contents t.string :tags t.string :imgs t.timestamps null: false end end end ## Instruction: Add new column "categories" in db ## Code After: class CreateTrends < ActiveRecord::Migration def change create_table :trends do |t| t.string :description t.string :links # link of the feed itself t.string :titles t.string :categories t.string :authors t.string :dates # edited date of the feeed t.text :contents t.string :tags t.string :imgs t.timestamps null: false end end end
class CreateTrends < ActiveRecord::Migration def change create_table :trends do |t| t.string :description t.string :links # link of the feed itself t.string :titles + t.string :categories t.string :authors t.string :dates # edited date of the feeed t.text :contents t.string :tags t.string :imgs t.timestamps null: false end end end
1
0.0625
1
0
86ed97eb863be87bb8909f23ffc732deb232796f
recipe/meta.yaml
recipe/meta.yaml
{% set data = load_setup_py_data() %} package: name: bmi-tester version: {{ data.get('version') }} source: path: .. requirements: build: - python - setuptools - numpydoc - numpy - pytest - cfunits-python - standard_names run: - python - setuptools - numpydoc - numpy - pytest - cfunits-python - standard_names build: number: 0 entry_points: - bmi-test=bmi_tester.bmipytest:main script: python -m pip install --no-deps --ignore-installed . test: imports: - bmi_tester commands: - bmi-test -h about: home: http://github.com/csdms/bmi-tester license: MIT summary: Test BMI implementation in Python doc_url: http://bmi-tester.readthedocs.io/en/latest/ dev_url: http://github.com/csdms/bmi-tester
{% set data = load_setup_py_data() %} package: name: bmi-tester version: {{ data.get('version') }} source: path: .. requirements: build: - python run: - python - numpy - pytest - cfunits-python - standard_names build: number: 0 entry_points: - bmi-test=bmi_tester.bmipytest:main script: python -m pip install --no-deps --ignore-installed . test: imports: - bmi_tester commands: - bmi-test -h about: home: http://github.com/csdms/bmi-tester license: MIT summary: Test BMI implementation in Python doc_url: http://bmi-tester.readthedocs.io/en/latest/ dev_url: http://github.com/csdms/bmi-tester
Remove unused build and run requirements.
Remove unused build and run requirements.
YAML
mit
csdms/bmi-tester
yaml
## Code Before: {% set data = load_setup_py_data() %} package: name: bmi-tester version: {{ data.get('version') }} source: path: .. requirements: build: - python - setuptools - numpydoc - numpy - pytest - cfunits-python - standard_names run: - python - setuptools - numpydoc - numpy - pytest - cfunits-python - standard_names build: number: 0 entry_points: - bmi-test=bmi_tester.bmipytest:main script: python -m pip install --no-deps --ignore-installed . test: imports: - bmi_tester commands: - bmi-test -h about: home: http://github.com/csdms/bmi-tester license: MIT summary: Test BMI implementation in Python doc_url: http://bmi-tester.readthedocs.io/en/latest/ dev_url: http://github.com/csdms/bmi-tester ## Instruction: Remove unused build and run requirements. ## Code After: {% set data = load_setup_py_data() %} package: name: bmi-tester version: {{ data.get('version') }} source: path: .. requirements: build: - python run: - python - numpy - pytest - cfunits-python - standard_names build: number: 0 entry_points: - bmi-test=bmi_tester.bmipytest:main script: python -m pip install --no-deps --ignore-installed . test: imports: - bmi_tester commands: - bmi-test -h about: home: http://github.com/csdms/bmi-tester license: MIT summary: Test BMI implementation in Python doc_url: http://bmi-tester.readthedocs.io/en/latest/ dev_url: http://github.com/csdms/bmi-tester
{% set data = load_setup_py_data() %} package: name: bmi-tester version: {{ data.get('version') }} source: path: .. requirements: build: - python - - setuptools - - numpydoc - - numpy - - pytest - - cfunits-python - - standard_names run: - python - - setuptools - - numpydoc - numpy - pytest - cfunits-python - standard_names build: number: 0 entry_points: - bmi-test=bmi_tester.bmipytest:main script: python -m pip install --no-deps --ignore-installed . test: imports: - bmi_tester commands: - bmi-test -h about: home: http://github.com/csdms/bmi-tester license: MIT summary: Test BMI implementation in Python doc_url: http://bmi-tester.readthedocs.io/en/latest/ dev_url: http://github.com/csdms/bmi-tester
8
0.173913
0
8
1946b1e6190e9b374f323f6b99bfe8790f879ef0
tasks/html-hint.js
tasks/html-hint.js
/** * Hint HTML */ 'use strict'; const gulp = require('gulp'), htmlhint = require('gulp-htmlhint'), notify = require('gulp-notify'); module.exports = function(options) { return cb => { gulp.src('./*.html') .pipe(htmlhint()) .pipe(htmlhint.reporter('htmlhint-stylish')) .pipe(htmlhint.failReporter({ suppress: true })) .on('error', notify.onError({ title: 'HTML' })); cb(); }; };
/** * Hint HTML */ 'use strict'; const gulp = require('gulp'), htmlhint = require('gulp-htmlhint'), notify = require('gulp-notify'); module.exports = function(options) { return cb => { gulp.src('./*.html') .pipe(htmlhint({ 'attr-lowercase': ['viewBox'] })) .pipe(htmlhint.reporter('htmlhint-stylish')) .pipe(htmlhint.failReporter({ suppress: true })) .on('error', notify.onError({ title: 'HTML' })); cb(); }; };
Add the 'viewBox' attribute to htmlhint ignore list
Add the 'viewBox' attribute to htmlhint ignore list
JavaScript
mit
justcoded/web-starter-kit,vodnycheck/justcoded,KirillPd/web-starter-kit,justcoded/web-starter-kit,vodnycheck/justcoded,KirillPd/web-starter-kit
javascript
## Code Before: /** * Hint HTML */ 'use strict'; const gulp = require('gulp'), htmlhint = require('gulp-htmlhint'), notify = require('gulp-notify'); module.exports = function(options) { return cb => { gulp.src('./*.html') .pipe(htmlhint()) .pipe(htmlhint.reporter('htmlhint-stylish')) .pipe(htmlhint.failReporter({ suppress: true })) .on('error', notify.onError({ title: 'HTML' })); cb(); }; }; ## Instruction: Add the 'viewBox' attribute to htmlhint ignore list ## Code After: /** * Hint HTML */ 'use strict'; const gulp = require('gulp'), htmlhint = require('gulp-htmlhint'), notify = require('gulp-notify'); module.exports = function(options) { return cb => { gulp.src('./*.html') .pipe(htmlhint({ 'attr-lowercase': ['viewBox'] })) .pipe(htmlhint.reporter('htmlhint-stylish')) .pipe(htmlhint.failReporter({ suppress: true })) .on('error', notify.onError({ title: 'HTML' })); cb(); }; };
/** * Hint HTML */ 'use strict'; const gulp = require('gulp'), htmlhint = require('gulp-htmlhint'), notify = require('gulp-notify'); module.exports = function(options) { return cb => { gulp.src('./*.html') - .pipe(htmlhint()) ? ^^ + .pipe(htmlhint({ ? ^ + 'attr-lowercase': ['viewBox'] + })) .pipe(htmlhint.reporter('htmlhint-stylish')) .pipe(htmlhint.failReporter({ suppress: true })) .on('error', notify.onError({ title: 'HTML' })); cb(); }; };
4
0.153846
3
1
c8275a3e5589188e1545dd491ec3078bfd193876
src/sounds/src/Shared/SoundUtils.lua
src/sounds/src/Shared/SoundUtils.lua
--- Helps play sounds on the client -- @module SoundUtils -- @author Quenty local SoundService = game:GetService("SoundService") local SoundUtils = {} function SoundUtils.playTemplate(templates, templateName) assert(type(templates) == "table", "Bad templates") assert(type(templateName) == "string", "Bad templateName") local sound = templates:Clone(templateName) sound.Archivable = false SoundService:PlayLocalSound(sound) delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end return SoundUtils
--- Helps play sounds on the client -- @module SoundUtils -- @author Quenty local SoundService = game:GetService("SoundService") local SoundUtils = {} function SoundUtils.playTemplate(templates, templateName) assert(type(templates) == "table", "Bad templates") assert(type(templateName) == "string", "Bad templateName") local sound = templates:Clone(templateName) sound.Archivable = false SoundService:PlayLocalSound(sound) delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end function SoundUtils.playTemplateInParent(templates, templateName, parent) local sound = templates:Clone(templateName) sound.Archivable = false sound.Parent = parent sound:Play() delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end return SoundUtils
Add ability to play sounds in parent
feat: Add ability to play sounds in parent
Lua
mit
Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine
lua
## Code Before: --- Helps play sounds on the client -- @module SoundUtils -- @author Quenty local SoundService = game:GetService("SoundService") local SoundUtils = {} function SoundUtils.playTemplate(templates, templateName) assert(type(templates) == "table", "Bad templates") assert(type(templateName) == "string", "Bad templateName") local sound = templates:Clone(templateName) sound.Archivable = false SoundService:PlayLocalSound(sound) delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end return SoundUtils ## Instruction: feat: Add ability to play sounds in parent ## Code After: --- Helps play sounds on the client -- @module SoundUtils -- @author Quenty local SoundService = game:GetService("SoundService") local SoundUtils = {} function SoundUtils.playTemplate(templates, templateName) assert(type(templates) == "table", "Bad templates") assert(type(templateName) == "string", "Bad templateName") local sound = templates:Clone(templateName) sound.Archivable = false SoundService:PlayLocalSound(sound) delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end function SoundUtils.playTemplateInParent(templates, templateName, parent) local sound = templates:Clone(templateName) sound.Archivable = false sound.Parent = parent sound:Play() delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end return SoundUtils
--- Helps play sounds on the client -- @module SoundUtils -- @author Quenty local SoundService = game:GetService("SoundService") local SoundUtils = {} function SoundUtils.playTemplate(templates, templateName) assert(type(templates) == "table", "Bad templates") assert(type(templateName) == "string", "Bad templateName") local sound = templates:Clone(templateName) sound.Archivable = false SoundService:PlayLocalSound(sound) delay(sound.TimeLength + 0.05, function() sound:Destroy() end) return sound end + function SoundUtils.playTemplateInParent(templates, templateName, parent) + local sound = templates:Clone(templateName) + sound.Archivable = false + sound.Parent = parent + + sound:Play() + + delay(sound.TimeLength + 0.05, function() + sound:Destroy() + end) + + return sound + end + + return SoundUtils
15
0.6
15
0
7b17c25736a1b5c3921c45279699eec77bc20914
src/search/search-index-new/storage/manager.ts
src/search/search-index-new/storage/manager.ts
import { extractTerms } from '../../search-index-old/pipeline' import StorageRegistry from './registry' export class StorageManager { public initialized = false public registry = new StorageRegistry() private _initializationPromise private _initializationResolve private _storage constructor() { this._initializationPromise = new Promise(resolve => this._initializationResolve = resolve) } registerCollection(name, defs) { this.registry.registerCollection(name, defs) } async putObject(collectionName: string, object) { await this._initializationPromise const collection = this.registry.collections[collectionName] const indices = collection.indices || [] Object.entries(collection.fields).forEach(([fieldName, fieldDef]) => { if (fieldDef['_index'] && fieldDef['type'] === 'text') { object[`_${fieldName}_terms`] = [...extractTerms(object[fieldName], '_')] } else if (fieldDef['type'] === 'json') { object[fieldName] = JSON.stringify(object[fieldName]) } }) await this._storage[collectionName].put(object) } _finishInitialization(storage) { this._storage = storage this._initializationResolve() } }
import { extractTerms } from '../../search-index-old/pipeline' import StorageRegistry from './registry' export class StorageManager { public initialized = false public registry = new StorageRegistry() private _initializationPromise private _initializationResolve private _storage constructor() { this._initializationPromise = new Promise(resolve => this._initializationResolve = resolve) } registerCollection(name, defs) { this.registry.registerCollection(name, defs) } async putObject(collectionName: string, object) { await this._initializationPromise const collection = this.registry.collections[collectionName] const indices = collection.indices || [] Object.entries(collection.fields).forEach(([fieldName, fieldDef]) => { if (fieldDef['_index'] && fieldDef['type'] === 'text') { object[`_${fieldName}_terms`] = [...extractTerms(object[fieldName], '_')] } }) await this._storage[collectionName].put(object) } _finishInitialization(storage) { this._storage = storage this._initializationResolve() } }
Remove JSON stringification for storage
Remove JSON stringification for storage
TypeScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
typescript
## Code Before: import { extractTerms } from '../../search-index-old/pipeline' import StorageRegistry from './registry' export class StorageManager { public initialized = false public registry = new StorageRegistry() private _initializationPromise private _initializationResolve private _storage constructor() { this._initializationPromise = new Promise(resolve => this._initializationResolve = resolve) } registerCollection(name, defs) { this.registry.registerCollection(name, defs) } async putObject(collectionName: string, object) { await this._initializationPromise const collection = this.registry.collections[collectionName] const indices = collection.indices || [] Object.entries(collection.fields).forEach(([fieldName, fieldDef]) => { if (fieldDef['_index'] && fieldDef['type'] === 'text') { object[`_${fieldName}_terms`] = [...extractTerms(object[fieldName], '_')] } else if (fieldDef['type'] === 'json') { object[fieldName] = JSON.stringify(object[fieldName]) } }) await this._storage[collectionName].put(object) } _finishInitialization(storage) { this._storage = storage this._initializationResolve() } } ## Instruction: Remove JSON stringification for storage ## Code After: import { extractTerms } from '../../search-index-old/pipeline' import StorageRegistry from './registry' export class StorageManager { public initialized = false public registry = new StorageRegistry() private _initializationPromise private _initializationResolve private _storage constructor() { this._initializationPromise = new Promise(resolve => this._initializationResolve = resolve) } registerCollection(name, defs) { this.registry.registerCollection(name, defs) } async putObject(collectionName: string, object) { await this._initializationPromise const collection = this.registry.collections[collectionName] const indices = collection.indices || [] Object.entries(collection.fields).forEach(([fieldName, fieldDef]) => { if (fieldDef['_index'] && fieldDef['type'] === 'text') { object[`_${fieldName}_terms`] = [...extractTerms(object[fieldName], '_')] } }) await this._storage[collectionName].put(object) } _finishInitialization(storage) { this._storage = storage this._initializationResolve() } }
import { extractTerms } from '../../search-index-old/pipeline' import StorageRegistry from './registry' export class StorageManager { public initialized = false public registry = new StorageRegistry() private _initializationPromise private _initializationResolve private _storage constructor() { this._initializationPromise = new Promise(resolve => this._initializationResolve = resolve) } registerCollection(name, defs) { this.registry.registerCollection(name, defs) } async putObject(collectionName: string, object) { await this._initializationPromise const collection = this.registry.collections[collectionName] const indices = collection.indices || [] Object.entries(collection.fields).forEach(([fieldName, fieldDef]) => { if (fieldDef['_index'] && fieldDef['type'] === 'text') { object[`_${fieldName}_terms`] = [...extractTerms(object[fieldName], '_')] - } else if (fieldDef['type'] === 'json') { - object[fieldName] = JSON.stringify(object[fieldName]) } }) await this._storage[collectionName].put(object) } _finishInitialization(storage) { this._storage = storage this._initializationResolve() } }
2
0.051282
0
2
b941eceb681c57d23d35f952b11b2a2d3a1ea4dd
spec/language/undef_spec.rb
spec/language/undef_spec.rb
require File.dirname(__FILE__) + '/../spec_helper'
require File.dirname(__FILE__) + '/../spec_helper' class UndefSpecClass def meth=(other);nil;end end describe "The undef keyword" do it "should undefine 'meth='" do obj = UndefSpecClass.new (obj.meth = 5).should == 5 class UndefSpecClass undef meth= end should_raise(NoMethodError) { obj.meth = 5 } end end
Add a minimal spec for the 'undef' keyword
Add a minimal spec for the 'undef' keyword
Ruby
bsd-3-clause
chad/rubinius,travis-repos/rubinius,ruipserra/rubinius,heftig/rubinius,jsyeo/rubinius,ruipserra/rubinius,dblock/rubinius,mlarraz/rubinius,Wirachmat/rubinius,pH14/rubinius,chad/rubinius,chad/rubinius,dblock/rubinius,benlovell/rubinius,digitalextremist/rubinius,kachick/rubinius,lgierth/rubinius,ngpestelos/rubinius,Wirachmat/rubinius,jemc/rubinius,kachick/rubinius,Wirachmat/rubinius,sferik/rubinius,heftig/rubinius,chad/rubinius,slawosz/rubinius,kachick/rubinius,chad/rubinius,pH14/rubinius,Azizou/rubinius,dblock/rubinius,Wirachmat/rubinius,heftig/rubinius,lgierth/rubinius,ngpestelos/rubinius,dblock/rubinius,ngpestelos/rubinius,lgierth/rubinius,slawosz/rubinius,benlovell/rubinius,heftig/rubinius,Azizou/rubinius,travis-repos/rubinius,kachick/rubinius,benlovell/rubinius,digitalextremist/rubinius,jemc/rubinius,heftig/rubinius,Azizou/rubinius,Azizou/rubinius,jemc/rubinius,jsyeo/rubinius,pH14/rubinius,sferik/rubinius,Wirachmat/rubinius,travis-repos/rubinius,kachick/rubinius,jemc/rubinius,travis-repos/rubinius,mlarraz/rubinius,digitalextremist/rubinius,sferik/rubinius,mlarraz/rubinius,jsyeo/rubinius,pH14/rubinius,chad/rubinius,jsyeo/rubinius,jsyeo/rubinius,chad/rubinius,kachick/rubinius,ruipserra/rubinius,Azizou/rubinius,heftig/rubinius,chad/rubinius,ruipserra/rubinius,ruipserra/rubinius,jemc/rubinius,ngpestelos/rubinius,Wirachmat/rubinius,dblock/rubinius,benlovell/rubinius,slawosz/rubinius,ngpestelos/rubinius,digitalextremist/rubinius,benlovell/rubinius,mlarraz/rubinius,digitalextremist/rubinius,dblock/rubinius,Wirachmat/rubinius,benlovell/rubinius,Azizou/rubinius,lgierth/rubinius,chad/rubinius,jemc/rubinius,mlarraz/rubinius,mlarraz/rubinius,sferik/rubinius,ngpestelos/rubinius,jemc/rubinius,pH14/rubinius,digitalextremist/rubinius,digitalextremist/rubinius,Azizou/rubinius,mlarraz/rubinius,chad/rubinius,sferik/rubinius,ngpestelos/rubinius,pH14/rubinius,ruipserra/rubinius,lgierth/rubinius,lgierth/rubinius,slawosz/rubinius,slawosz/rubinius,heftig/rubinius,slawosz/rubinius,travis-repos/rubinius,sferik/rubinius,kachick/rubinius,pH14/rubinius,sferik/rubinius,ruipserra/rubinius,travis-repos/rubinius,dblock/rubinius,kachick/rubinius,jsyeo/rubinius,benlovell/rubinius,jsyeo/rubinius,lgierth/rubinius,slawosz/rubinius,travis-repos/rubinius
ruby
## Code Before: require File.dirname(__FILE__) + '/../spec_helper' ## Instruction: Add a minimal spec for the 'undef' keyword ## Code After: require File.dirname(__FILE__) + '/../spec_helper' class UndefSpecClass def meth=(other);nil;end end describe "The undef keyword" do it "should undefine 'meth='" do obj = UndefSpecClass.new (obj.meth = 5).should == 5 class UndefSpecClass undef meth= end should_raise(NoMethodError) { obj.meth = 5 } end end
require File.dirname(__FILE__) + '/../spec_helper' + + class UndefSpecClass + def meth=(other);nil;end + end + + describe "The undef keyword" do + it "should undefine 'meth='" do + obj = UndefSpecClass.new + (obj.meth = 5).should == 5 + class UndefSpecClass + undef meth= + end + should_raise(NoMethodError) { obj.meth = 5 } + end + end
15
15
15
0
70ff4bb0655870d700236ee7b0a08d9fff35b40a
server.js
server.js
// Dependencies var express = require('express'); var methodOverride = require('method-override'); var bodyParser = require('body-parser'); var exphbs = require("express-handlebars"); // Sets up the Express App var app = express(); var PORT = process.env.PORT || 8080; // Models to sync var db = require("./models"); app.use(bodyParser.urlencoded({ extended: false })); app.use(methodOverride("_method")); app.engine("handlebars", exphbs({ defaultLayout: "main" })); app.set("view engine", "handlebars"); // Serve files in 'public' directory app.use(express.static('public')); // Load routes app.use(require('./controllers/guest_controller')); app.use(require('./controllers/manager_controller')); app.use(require('./controllers/restaurant_controller')); app.use(require('./controllers/room_controller')); app.use(require('./controllers/table_controller')); // Sync models then start the server to begin listening db.sequelize.sync().then(function() { app.listen(PORT, function() { console.log("App listening on PORT " + PORT); }); });
// Dependencies var express = require('express'); var methodOverride = require('method-override'); var bodyParser = require('body-parser'); var exphbs = require("express-handlebars"); // Sets up the Express App var app = express(); var PORT = process.env.PORT || 8080; // Models to sync var db = require("./models"); app.use(bodyParser.urlencoded({ extended: false })); app.use(methodOverride("_method")); app.engine("handlebars", exphbs({ defaultLayout: "main" })); app.set("view engine", "handlebars"); // Serve files in 'public' directory app.use(express.static('public')); // Load routes app.get('/', function(req, res) { res.render('index'); }); app.use(require('./controllers/guest_controller')); app.use(require('./controllers/manager_controller')); app.use(require('./controllers/restaurant_controller')); app.use(require('./controllers/room_controller')); app.use(require('./controllers/table_controller')); // Sync models then start the server to begin listening db.sequelize.sync().then(function() { app.listen(PORT, function() { console.log("App listening on PORT " + PORT); }); });
Add get route for /
Add get route for /
JavaScript
mit
jdwong415/hotel-booking,jdwong415/hotel-booking
javascript
## Code Before: // Dependencies var express = require('express'); var methodOverride = require('method-override'); var bodyParser = require('body-parser'); var exphbs = require("express-handlebars"); // Sets up the Express App var app = express(); var PORT = process.env.PORT || 8080; // Models to sync var db = require("./models"); app.use(bodyParser.urlencoded({ extended: false })); app.use(methodOverride("_method")); app.engine("handlebars", exphbs({ defaultLayout: "main" })); app.set("view engine", "handlebars"); // Serve files in 'public' directory app.use(express.static('public')); // Load routes app.use(require('./controllers/guest_controller')); app.use(require('./controllers/manager_controller')); app.use(require('./controllers/restaurant_controller')); app.use(require('./controllers/room_controller')); app.use(require('./controllers/table_controller')); // Sync models then start the server to begin listening db.sequelize.sync().then(function() { app.listen(PORT, function() { console.log("App listening on PORT " + PORT); }); }); ## Instruction: Add get route for / ## Code After: // Dependencies var express = require('express'); var methodOverride = require('method-override'); var bodyParser = require('body-parser'); var exphbs = require("express-handlebars"); // Sets up the Express App var app = express(); var PORT = process.env.PORT || 8080; // Models to sync var db = require("./models"); app.use(bodyParser.urlencoded({ extended: false })); app.use(methodOverride("_method")); app.engine("handlebars", exphbs({ defaultLayout: "main" })); app.set("view engine", "handlebars"); // Serve files in 'public' directory app.use(express.static('public')); // Load routes app.get('/', function(req, res) { res.render('index'); }); app.use(require('./controllers/guest_controller')); app.use(require('./controllers/manager_controller')); app.use(require('./controllers/restaurant_controller')); app.use(require('./controllers/room_controller')); app.use(require('./controllers/table_controller')); // Sync models then start the server to begin listening db.sequelize.sync().then(function() { app.listen(PORT, function() { console.log("App listening on PORT " + PORT); }); });
// Dependencies var express = require('express'); var methodOverride = require('method-override'); var bodyParser = require('body-parser'); var exphbs = require("express-handlebars"); // Sets up the Express App var app = express(); var PORT = process.env.PORT || 8080; // Models to sync var db = require("./models"); app.use(bodyParser.urlencoded({ extended: false })); app.use(methodOverride("_method")); app.engine("handlebars", exphbs({ defaultLayout: "main" })); app.set("view engine", "handlebars"); // Serve files in 'public' directory app.use(express.static('public')); // Load routes + app.get('/', function(req, res) { + res.render('index'); + }); app.use(require('./controllers/guest_controller')); app.use(require('./controllers/manager_controller')); app.use(require('./controllers/restaurant_controller')); app.use(require('./controllers/room_controller')); app.use(require('./controllers/table_controller')); // Sync models then start the server to begin listening db.sequelize.sync().then(function() { app.listen(PORT, function() { console.log("App listening on PORT " + PORT); }); });
3
0.088235
3
0
8d830b73494b56fdedf4b838f34ea180c095df16
lib/rubygems/commands/bump_command.rb
lib/rubygems/commands/bump_command.rb
require 'rubygems/commands/tag_command' require 'rubygems/commands/release_command' class Gem::Commands::BumpCommand < Gem::Command include GemRelease, Gem::Commands include Helpers, CommandOptions attr_reader :arguments, :usage OPTIONS = { :version => 'patch', :push => false, :tag => false, :release => false } def initialize super 'bump', 'Bump the gem version', OPTIONS option :version, '-v', 'Target version: next [major|minor|patch] or a given version number [x.x.x]' option :push, '-p', 'Push to origin' option :tag, '-t', 'Create a git tag and push --tags to origin' option :release, '-r', 'Build gem from a gemspec and push to rubygems.org' end def execute bump commit push if options[:push] || options[:tag] release if options[:release] tag if options[:tag] end protected def bump say "Bumping from #{version.old_number} to version #{version.new_number}" version.bump! end def commit say "Creating commit" `git add #{version.filename}` `git commit -m "Bump to #{version.new_number}"` end def push say "Pushing to origin" `git push` end def release ReleaseCommand.new.invoke end def tag TagCommand.new.invoke end def version @version ||= VersionFile.new(:target => options[:version]) end end
require 'rubygems/commands/tag_command' require 'rubygems/commands/release_command' class Gem::Commands::BumpCommand < Gem::Command include GemRelease, Gem::Commands include Helpers, CommandOptions attr_reader :arguments, :usage OPTIONS = { :version => 'patch', :push => false, :tag => false, :release => false, :commit => true } def initialize super 'bump', 'Bump the gem version', OPTIONS option :version, '-v', 'Target version: next [major|minor|patch] or a given version number [x.x.x]' option :push, '-p', 'Push to origin' option :tag, '-t', 'Create a git tag and push --tags to origin' option :release, '-r', 'Build gem from a gemspec and push to rubygems.org' option :commit, '-c', 'Perform a commit after incrementing gem version' end def execute bump commit if options[:commit] push if options[:push] || options[:tag] release if options[:release] tag if options[:tag] end protected def bump say "Bumping from #{version.old_number} to version #{version.new_number}" version.bump! end def commit say "Creating commit" `git add #{version.filename}` `git commit -m "Bump to #{version.new_number}"` end def push say "Pushing to origin" `git push` end def release ReleaseCommand.new.invoke end def tag TagCommand.new.invoke end def version @version ||= VersionFile.new(:target => options[:version]) end end
Make the 'commit' with gem bump optional
Make the 'commit' with gem bump optional
Ruby
mit
svenfuchs/gem-release,svenfuchs/gem-release,aelogica/gem-release,aelogica/gem-release
ruby
## Code Before: require 'rubygems/commands/tag_command' require 'rubygems/commands/release_command' class Gem::Commands::BumpCommand < Gem::Command include GemRelease, Gem::Commands include Helpers, CommandOptions attr_reader :arguments, :usage OPTIONS = { :version => 'patch', :push => false, :tag => false, :release => false } def initialize super 'bump', 'Bump the gem version', OPTIONS option :version, '-v', 'Target version: next [major|minor|patch] or a given version number [x.x.x]' option :push, '-p', 'Push to origin' option :tag, '-t', 'Create a git tag and push --tags to origin' option :release, '-r', 'Build gem from a gemspec and push to rubygems.org' end def execute bump commit push if options[:push] || options[:tag] release if options[:release] tag if options[:tag] end protected def bump say "Bumping from #{version.old_number} to version #{version.new_number}" version.bump! end def commit say "Creating commit" `git add #{version.filename}` `git commit -m "Bump to #{version.new_number}"` end def push say "Pushing to origin" `git push` end def release ReleaseCommand.new.invoke end def tag TagCommand.new.invoke end def version @version ||= VersionFile.new(:target => options[:version]) end end ## Instruction: Make the 'commit' with gem bump optional ## Code After: require 'rubygems/commands/tag_command' require 'rubygems/commands/release_command' class Gem::Commands::BumpCommand < Gem::Command include GemRelease, Gem::Commands include Helpers, CommandOptions attr_reader :arguments, :usage OPTIONS = { :version => 'patch', :push => false, :tag => false, :release => false, :commit => true } def initialize super 'bump', 'Bump the gem version', OPTIONS option :version, '-v', 'Target version: next [major|minor|patch] or a given version number [x.x.x]' option :push, '-p', 'Push to origin' option :tag, '-t', 'Create a git tag and push --tags to origin' option :release, '-r', 'Build gem from a gemspec and push to rubygems.org' option :commit, '-c', 'Perform a commit after incrementing gem version' end def execute bump commit if options[:commit] push if options[:push] || options[:tag] release if options[:release] tag if options[:tag] end protected def bump say "Bumping from #{version.old_number} to version #{version.new_number}" version.bump! end def commit say "Creating commit" `git add #{version.filename}` `git commit -m "Bump to #{version.new_number}"` end def push say "Pushing to origin" `git push` end def release ReleaseCommand.new.invoke end def tag TagCommand.new.invoke end def version @version ||= VersionFile.new(:target => options[:version]) end end
require 'rubygems/commands/tag_command' require 'rubygems/commands/release_command' class Gem::Commands::BumpCommand < Gem::Command include GemRelease, Gem::Commands include Helpers, CommandOptions attr_reader :arguments, :usage - OPTIONS = { :version => 'patch', :push => false, :tag => false, :release => false } + OPTIONS = { :version => 'patch', :push => false, :tag => false, :release => false, :commit => true } ? +++++++++++++++++ def initialize super 'bump', 'Bump the gem version', OPTIONS option :version, '-v', 'Target version: next [major|minor|patch] or a given version number [x.x.x]' option :push, '-p', 'Push to origin' option :tag, '-t', 'Create a git tag and push --tags to origin' option :release, '-r', 'Build gem from a gemspec and push to rubygems.org' + option :commit, '-c', 'Perform a commit after incrementing gem version' end def execute bump - commit + commit if options[:commit] push if options[:push] || options[:tag] release if options[:release] tag if options[:tag] end protected def bump say "Bumping from #{version.old_number} to version #{version.new_number}" version.bump! end def commit say "Creating commit" `git add #{version.filename}` `git commit -m "Bump to #{version.new_number}"` end def push say "Pushing to origin" `git push` end def release ReleaseCommand.new.invoke end def tag TagCommand.new.invoke end def version @version ||= VersionFile.new(:target => options[:version]) end end
5
0.086207
3
2
7f850171729935c42cc281f15bfbab1bfefedc6f
config-secrets-example.js
config-secrets-example.js
var secrets = {}; secrets.sensiUsername = 'user@email.com'; secrets.sensiPassword = 'password'; module.exports = secrets;
/* Copy this file, rename to config-secrets.js and set the values below as appropriate. */ var secrets = {}; secrets.sensiUsername = 'user@email.com'; secrets.sensiPassword = 'password'; module.exports = secrets;
Add instruction comments to example secret config.
Add instruction comments to example secret config.
JavaScript
mit
mattbanderson/home-rest-api
javascript
## Code Before: var secrets = {}; secrets.sensiUsername = 'user@email.com'; secrets.sensiPassword = 'password'; module.exports = secrets; ## Instruction: Add instruction comments to example secret config. ## Code After: /* Copy this file, rename to config-secrets.js and set the values below as appropriate. */ var secrets = {}; secrets.sensiUsername = 'user@email.com'; secrets.sensiPassword = 'password'; module.exports = secrets;
+ /* + Copy this file, rename to config-secrets.js and set the values below as appropriate. + */ + var secrets = {}; secrets.sensiUsername = 'user@email.com'; secrets.sensiPassword = 'password'; module.exports = secrets;
4
0.666667
4
0
4eefe6706e8504773a7d54508d4af62f25b98708
README.md
README.md
Manage URLs in groups and access them super fast. ## Demo [Take a look at the demo](http://jkunstwald.github.io/mandate-clip/) on Github Pages. ## What does this do? A simple launcher to quickly open any given bookmark. Reads from a JS Object, and comprehends infinitely nested objects. Use `tab` to autocomplete and `enter` to access. ## How to install `git clone` this repo. Fill `custom.js` with your bookmarks. Change your settings in `settings.js` if you want to. Set it to your home page. Done!
![demogif](https://cloud.githubusercontent.com/assets/17261478/14531044/0518c158-025c-11e6-98b1-29eba16370fd.gif) Manage URLs in groups and access them super fast. ## Demo [Take a look at the demo](http://jkunstwald.github.io/mandate-clip/) on Github Pages. ## What does this do? A simple launcher to quickly open any given bookmark. Reads from a JS Object, and comprehends infinitely nested objects. Use `tab` to autocomplete and `enter` to access. ## How to install `git clone` this repo. Fill `custom.js` with your bookmarks. Change your settings in `settings.js` if you want to. Set it to your home page. Done!
Add demo gif to Readme
Add demo gif to Readme
Markdown
mit
jkunstwald/mandate-clip,jkunstwald/mandate-clip
markdown
## Code Before: Manage URLs in groups and access them super fast. ## Demo [Take a look at the demo](http://jkunstwald.github.io/mandate-clip/) on Github Pages. ## What does this do? A simple launcher to quickly open any given bookmark. Reads from a JS Object, and comprehends infinitely nested objects. Use `tab` to autocomplete and `enter` to access. ## How to install `git clone` this repo. Fill `custom.js` with your bookmarks. Change your settings in `settings.js` if you want to. Set it to your home page. Done! ## Instruction: Add demo gif to Readme ## Code After: ![demogif](https://cloud.githubusercontent.com/assets/17261478/14531044/0518c158-025c-11e6-98b1-29eba16370fd.gif) Manage URLs in groups and access them super fast. ## Demo [Take a look at the demo](http://jkunstwald.github.io/mandate-clip/) on Github Pages. ## What does this do? A simple launcher to quickly open any given bookmark. Reads from a JS Object, and comprehends infinitely nested objects. Use `tab` to autocomplete and `enter` to access. ## How to install `git clone` this repo. Fill `custom.js` with your bookmarks. Change your settings in `settings.js` if you want to. Set it to your home page. Done!
+ + ![demogif](https://cloud.githubusercontent.com/assets/17261478/14531044/0518c158-025c-11e6-98b1-29eba16370fd.gif) Manage URLs in groups and access them super fast. ## Demo [Take a look at the demo](http://jkunstwald.github.io/mandate-clip/) on Github Pages. ## What does this do? A simple launcher to quickly open any given bookmark. Reads from a JS Object, and comprehends infinitely nested objects. Use `tab` to autocomplete and `enter` to access. ## How to install `git clone` this repo. Fill `custom.js` with your bookmarks. Change your settings in `settings.js` if you want to. Set it to your home page. Done!
2
0.076923
2
0
addb5782ebc427e85db6cf1c1922cc65067cdecd
03_managing_collections/importing_swagger.md
03_managing_collections/importing_swagger.md
A swagger API definition usually lives as a single file, so we only support imports of single swagger files. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. To save a Swagger file as a collection, 1. Clone the repository containing the Swagger definition to your local machine. If you have it saved locally as file already, that's fine of course. 2. Open the Postman Import box and hit the File tab. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png) ][0] 3. Click on file and upload the Swagger file. 4. You're done! Postman will detect all the Swagger definitions and convert them internally to Postman and then show you an import success message. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png) ][1] [0]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png [1]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png
A swagger API definition usually lives as a single file, so we only support imports of single swagger files. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. To save a Swagger file as a collection: 1. Clone the repository containing the Swagger definition to your local machine. If you have it saved locally as file already, that's fine of course. 2. Open the Postman Import box and hit the File tab. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png)][0] 3. Click on file and upload the Swagger file. 4. You're done! Postman will detect all the Swagger definitions and convert them internally to Postman and then show you an import success message. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png)][1] [0]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png [1]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png
Fix formatting in Swagger import documentation
Fix formatting in Swagger import documentation
Markdown
apache-2.0
postmanlabs/postman-docs,loopDelicious/docs-implementation,postmanlabs/postman-docs
markdown
## Code Before: A swagger API definition usually lives as a single file, so we only support imports of single swagger files. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. To save a Swagger file as a collection, 1. Clone the repository containing the Swagger definition to your local machine. If you have it saved locally as file already, that's fine of course. 2. Open the Postman Import box and hit the File tab. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png) ][0] 3. Click on file and upload the Swagger file. 4. You're done! Postman will detect all the Swagger definitions and convert them internally to Postman and then show you an import success message. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png) ][1] [0]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png [1]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png ## Instruction: Fix formatting in Swagger import documentation ## Code After: A swagger API definition usually lives as a single file, so we only support imports of single swagger files. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. To save a Swagger file as a collection: 1. Clone the repository containing the Swagger definition to your local machine. If you have it saved locally as file already, that's fine of course. 2. Open the Postman Import box and hit the File tab. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png)][0] 3. Click on file and upload the Swagger file. 4. You're done! Postman will detect all the Swagger definitions and convert them internally to Postman and then show you an import success message. [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png)][1] [0]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png [1]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png
A swagger API definition usually lives as a single file, so we only support imports of single swagger files. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. - To save a Swagger file as a collection, ? ^^ + To save a Swagger file as a collection: ? ^ 1. Clone the repository containing the Swagger definition to your local machine. If you have it saved locally as file already, that's fine of course. - 2. - Open the Postman Import box and hit the File tab. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. + 2. Open the Postman Import box and hit the File tab. If you have a lot of unrelated Swagger files in a folder, you can import those through the folder importer. ? +++ + [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png)][0] - [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png) - ][0] - 3. - Click on file and upload the Swagger file. + 3. Click on file and upload the Swagger file. ? +++ - 4. - You're done! Postman will detect all the Swagger definitions and convert them internally to Postman and then show you an import success message. + 4. You're done! Postman will detect all the Swagger definitions and convert them internally to Postman and then show you an import success message. ? +++ - - [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png) + [![](https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png)][1] ? ++++ - ][1] - [0]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_1.png [1]: https://www.getpostman.com/img/v1/docs/importing_folders/importing_folders_3.png
19
0.904762
6
13
0d399719ea838eef316d74bee7e1b67e6e45de9a
package.json
package.json
{ "name": "netev", "version": "0.9.2" }
{ "name": "netev", "version": "0.9.3", "repository": { "type": "git", "url": "http://github.com/Fizzadar/node-netev.git" } }
Add repo info, bump version
Add repo info, bump version
JSON
mit
Fizzadar/node-netev,Fizzadar/node-netev
json
## Code Before: { "name": "netev", "version": "0.9.2" } ## Instruction: Add repo info, bump version ## Code After: { "name": "netev", "version": "0.9.3", "repository": { "type": "git", "url": "http://github.com/Fizzadar/node-netev.git" } }
{ "name": "netev", - "version": "0.9.2" ? ^ + "version": "0.9.3", ? ^ + + "repository": { + "type": "git", + "url": "http://github.com/Fizzadar/node-netev.git" + } }
6
1.5
5
1
c5af6d33c236af5464bdac59039ef03eb7cc71ec
fish/functions/fish_prompt.fish
fish/functions/fish_prompt.fish
function __git_upstream_configured git rev-parse --abbrev-ref @"{u}" > /dev/null 2>&1 end function __print_color set -l color $argv[1] set -l string $argv[2] set_color $color printf $string set_color normal end function fish_prompt -d "Simple Fish Prompt" # notify echo -e "" # Host # set -l host_name (hostname -s) # __print_color e88388 "$host_name" # Current working directory # set -l pwd_glyph " in " set -l pwd_string (echo $PWD | sed 's|^'$HOME'\(.*\)$|~\1|') __print_color cccccc "$pwd_glyph" __print_color a7cc8c "$pwd_string" # > __print_color e88388 "\n❯ " end
function __git_upstream_configured git rev-parse --abbrev-ref @"{u}" >/dev/null 2>&1 end function __print_color set -l color $argv[1] set -l string $argv[2] set_color $color printf $string set_color normal end function fish_prompt -d "Simple Fish Prompt" # notify echo -e "" # Host # set -l host_name (hostname -s) # __print_color e88388 "$host_name" # Git if not set -q __git_cb set __git_cb (set_color normal)"("(set_color brown)(git branch ^/dev/null | grep \* | sed 's/* //')(set_color normal)")" end # Current working directory # set -l pwd_glyph " in " set -l pwd_string (echo $PWD | sed 's|^'$HOME'\(.*\)$|~\1|') $__git_cb __print_color cccccc "$pwd_glyph" __print_color a7cc8c "$pwd_string" # > __print_color e88388 "\n❯ " end
Add git status to prompt
Add git status to prompt
fish
unlicense
mistadikay/dotfiles
fish
## Code Before: function __git_upstream_configured git rev-parse --abbrev-ref @"{u}" > /dev/null 2>&1 end function __print_color set -l color $argv[1] set -l string $argv[2] set_color $color printf $string set_color normal end function fish_prompt -d "Simple Fish Prompt" # notify echo -e "" # Host # set -l host_name (hostname -s) # __print_color e88388 "$host_name" # Current working directory # set -l pwd_glyph " in " set -l pwd_string (echo $PWD | sed 's|^'$HOME'\(.*\)$|~\1|') __print_color cccccc "$pwd_glyph" __print_color a7cc8c "$pwd_string" # > __print_color e88388 "\n❯ " end ## Instruction: Add git status to prompt ## Code After: function __git_upstream_configured git rev-parse --abbrev-ref @"{u}" >/dev/null 2>&1 end function __print_color set -l color $argv[1] set -l string $argv[2] set_color $color printf $string set_color normal end function fish_prompt -d "Simple Fish Prompt" # notify echo -e "" # Host # set -l host_name (hostname -s) # __print_color e88388 "$host_name" # Git if not set -q __git_cb set __git_cb (set_color normal)"("(set_color brown)(git branch ^/dev/null | grep \* | sed 's/* //')(set_color normal)")" end # Current working directory # set -l pwd_glyph " in " set -l pwd_string (echo $PWD | sed 's|^'$HOME'\(.*\)$|~\1|') $__git_cb __print_color cccccc "$pwd_glyph" __print_color a7cc8c "$pwd_string" # > __print_color e88388 "\n❯ " end
function __git_upstream_configured - git rev-parse --abbrev-ref @"{u}" > /dev/null 2>&1 ? - + git rev-parse --abbrev-ref @"{u}" >/dev/null 2>&1 end function __print_color - set -l color $argv[1] ? - + set -l color $argv[1] set -l string $argv[2] set_color $color printf $string set_color normal end function fish_prompt -d "Simple Fish Prompt" # notify echo -e "" # Host # set -l host_name (hostname -s) # __print_color e88388 "$host_name" + # Git + if not set -q __git_cb + set __git_cb (set_color normal)"("(set_color brown)(git branch ^/dev/null | grep \* | sed 's/* //')(set_color normal)")" + end + # Current working directory # set -l pwd_glyph " in " - set -l pwd_string (echo $PWD | sed 's|^'$HOME'\(.*\)$|~\1|') + set -l pwd_string (echo $PWD | sed 's|^'$HOME'\(.*\)$|~\1|') $__git_cb ? ++++++++++ __print_color cccccc "$pwd_glyph" __print_color a7cc8c "$pwd_string" - + # > __print_color e88388 "\n❯ " end
13
0.40625
9
4
0b8e7e6ba063885810bec17ae374d6efbb35905a
wait-then-sync.sh
wait-then-sync.sh
url="http://localhost:8357" total=0 max=3 while sleep 1 do total=$((total+1)) if [ $total -gt $max ]; then echo "Timed out waiting for server to start" break fi if curl --output /dev/null --silent --head --fail "$url"; then npm run sync-components break fi done
url="http://localhost:8357" total=0 max=10 while sleep 1 do total=$((total+1)) if [ $total -gt $max ]; then echo "Timed out waiting for server to start. Run \`killall node\` and try again." break fi if curl --output /dev/null --silent --head --fail "$url"; then npm run sync-components break fi done
Update server timeout to 10s for syncing components
Update server timeout to 10s for syncing components
Shell
mit
SvitlanaShepitsena/shakou,jeremykenedy/framework,woltemade/framework,KraigWalker/framework,ildarsamit/framework,tbossert/framework,infamous/framework,SvitlanaShepitsena/framework-1,Famous/framework,infamous/famous-framework,SvitlanaShepitsena/framework-1,infamous/famous-framework,SvitlanaShepitsena/framework,infamous/framework,SvitlanaShepitsena/remax-banner,colllin/famous-framework,SvitlanaShepitsena/shakou,KraigWalker/framework,colllin/famous-framework,woltemade/framework,jeremykenedy/framework,tbossert/framework,SvitlanaShepitsena/remax-banner,Famous/framework,ildarsamit/framework,SvitlanaShepitsena/framework
shell
## Code Before: url="http://localhost:8357" total=0 max=3 while sleep 1 do total=$((total+1)) if [ $total -gt $max ]; then echo "Timed out waiting for server to start" break fi if curl --output /dev/null --silent --head --fail "$url"; then npm run sync-components break fi done ## Instruction: Update server timeout to 10s for syncing components ## Code After: url="http://localhost:8357" total=0 max=10 while sleep 1 do total=$((total+1)) if [ $total -gt $max ]; then echo "Timed out waiting for server to start. Run \`killall node\` and try again." break fi if curl --output /dev/null --silent --head --fail "$url"; then npm run sync-components break fi done
url="http://localhost:8357" total=0 - max=3 + max=10 while sleep 1 do total=$((total+1)) if [ $total -gt $max ]; then - echo "Timed out waiting for server to start" + echo "Timed out waiting for server to start. Run \`killall node\` and try again." break fi if curl --output /dev/null --silent --head --fail "$url"; then npm run sync-components break fi done
4
0.266667
2
2
49dfa00cd58c16d2c34963248708953bbeba6036
README.md
README.md
Chat service using iojs for bibitv website. How to install: - Clone this repo: `git clone https://github.com/NgaNguyenDuy/ChatService` - Run command: `cd ChatService` - Install all dependencies: `npm install` - Run: `/path/to/iojs server.js`
Chat service using iojs for bibitv website. How to install: - Clone this repo: `git clone https://github.com/NgaNguyenDuy/ChatService` - Run command: `cd ChatService` - Install all dependencies: `npm install` - Run: `/path/to/iojs --harmony_arrow_functions server.js`
Update start server supported arrow function
Update start server supported arrow function
Markdown
mit
NgaNguyenDuy/ChatService,NgaNguyenDuy/ChatService
markdown
## Code Before: Chat service using iojs for bibitv website. How to install: - Clone this repo: `git clone https://github.com/NgaNguyenDuy/ChatService` - Run command: `cd ChatService` - Install all dependencies: `npm install` - Run: `/path/to/iojs server.js` ## Instruction: Update start server supported arrow function ## Code After: Chat service using iojs for bibitv website. How to install: - Clone this repo: `git clone https://github.com/NgaNguyenDuy/ChatService` - Run command: `cd ChatService` - Install all dependencies: `npm install` - Run: `/path/to/iojs --harmony_arrow_functions server.js`
Chat service using iojs for bibitv website. How to install: - Clone this repo: `git clone https://github.com/NgaNguyenDuy/ChatService` - Run command: `cd ChatService` - Install all dependencies: `npm install` + - Run: `/path/to/iojs --harmony_arrow_functions server.js` - - Run: `/path/to/iojs server.js` -
3
0.333333
1
2
9d502f5ea758dc45ecb0cc3983703ea63d3e8a5f
lib/mobile-money/pesapal.rb
lib/mobile-money/pesapal.rb
module Pesapal require 'order_url' end
module Pesapal class OrderUrl require 'oauth' require 'uri' require 'active_support/core_ext/object/to_query' require 'htmlentities' attr_reader :post_data_xml, :callback_url, :token, :test HTTP_METHOD = 'get' API_ACTION = '/API/PostPesapalDirectOrderV4' def initialize(post_data_xml, callback_url, test=true) @post_data_xml = post_data_xml @callback_url = callback_url @token = nil @test = test end def api_domain test ? 'http://demo.pesapal.com' : 'https://www.pesapal.com' end def url "#{api_domain}#{signed_request.path}" end def consumer @consumer ||= begin OAuth::Consumer.new(consumer_key, consumer_secret, { site: api_domain, http_method: HTTP_METHOD, scheme: :query_string }) end end def consumer_key Rails.application.secrets.pesapal_consumer_key end def consumer_secret Rails.application.secrets.pesapal_consumer_secret end def signed_request consumer.create_signed_request HTTP_METHOD, request_url, nil, {}, params end def request_url API_ACTION + "?" + params_to_string end def params @params ||= { 'oauth_callback' => callback_url, 'pesapal_request_data' => escaped_xml, } end def params_to_string strings = [] params.each do |key, value| strings << "#{key}=#{CGI::escape(value)}" end strings.join('&') end def escaped_xml HTMLEntities.new.encode(post_data_xml) end end end
Revert "Put classes in a separate files"
Revert "Put classes in a separate files" This reverts commit b306c487c810b1909a952a73134e7b4048a567df. Conflicts: lib/mobile-money/pesapal.rb
Ruby
mit
Banta/mobile-money
ruby
## Code Before: module Pesapal require 'order_url' end ## Instruction: Revert "Put classes in a separate files" This reverts commit b306c487c810b1909a952a73134e7b4048a567df. Conflicts: lib/mobile-money/pesapal.rb ## Code After: module Pesapal class OrderUrl require 'oauth' require 'uri' require 'active_support/core_ext/object/to_query' require 'htmlentities' attr_reader :post_data_xml, :callback_url, :token, :test HTTP_METHOD = 'get' API_ACTION = '/API/PostPesapalDirectOrderV4' def initialize(post_data_xml, callback_url, test=true) @post_data_xml = post_data_xml @callback_url = callback_url @token = nil @test = test end def api_domain test ? 'http://demo.pesapal.com' : 'https://www.pesapal.com' end def url "#{api_domain}#{signed_request.path}" end def consumer @consumer ||= begin OAuth::Consumer.new(consumer_key, consumer_secret, { site: api_domain, http_method: HTTP_METHOD, scheme: :query_string }) end end def consumer_key Rails.application.secrets.pesapal_consumer_key end def consumer_secret Rails.application.secrets.pesapal_consumer_secret end def signed_request consumer.create_signed_request HTTP_METHOD, request_url, nil, {}, params end def request_url API_ACTION + "?" + params_to_string end def params @params ||= { 'oauth_callback' => callback_url, 'pesapal_request_data' => escaped_xml, } end def params_to_string strings = [] params.each do |key, value| strings << "#{key}=#{CGI::escape(value)}" end strings.join('&') end def escaped_xml HTMLEntities.new.encode(post_data_xml) end end end
module Pesapal - require 'order_url' + class OrderUrl + + require 'oauth' + require 'uri' + require 'active_support/core_ext/object/to_query' + require 'htmlentities' + + attr_reader :post_data_xml, :callback_url, :token, :test + + HTTP_METHOD = 'get' + API_ACTION = '/API/PostPesapalDirectOrderV4' + + def initialize(post_data_xml, callback_url, test=true) + @post_data_xml = post_data_xml + @callback_url = callback_url + @token = nil + @test = test + end + + def api_domain + test ? 'http://demo.pesapal.com' : 'https://www.pesapal.com' + end + + def url + "#{api_domain}#{signed_request.path}" + end + + def consumer + @consumer ||= begin + OAuth::Consumer.new(consumer_key, consumer_secret, { + site: api_domain, + http_method: HTTP_METHOD, + scheme: :query_string + }) + end + end + + def consumer_key + Rails.application.secrets.pesapal_consumer_key + end + + def consumer_secret + Rails.application.secrets.pesapal_consumer_secret + end + + def signed_request + consumer.create_signed_request HTTP_METHOD, request_url, nil, {}, params + end + + def request_url + API_ACTION + "?" + params_to_string + end + + + def params + @params ||= { + 'oauth_callback' => callback_url, + 'pesapal_request_data' => escaped_xml, + } + end + + def params_to_string + strings = [] + params.each do |key, value| + strings << "#{key}=#{CGI::escape(value)}" + end + strings.join('&') + end + + def escaped_xml + HTMLEntities.new.encode(post_data_xml) + end + end end
74
24.666667
73
1
08267b389c0fe9365687162323db468ec3bb2630
.travis.yml
.travis.yml
language: ruby before_install: - sudo apt-get install libpcap-dev -qq rvm: - 2.1.1 - 2.0.0 - 1.9.3
language: ruby before_install: - sudo apt-get install libpcap-dev -qq rvm: - 2.1.1 - 2.0.0
Drop support for Ruby 1.9.3
Drop support for Ruby 1.9.3
YAML
bsd-3-clause
claudijd/bnat
yaml
## Code Before: language: ruby before_install: - sudo apt-get install libpcap-dev -qq rvm: - 2.1.1 - 2.0.0 - 1.9.3 ## Instruction: Drop support for Ruby 1.9.3 ## Code After: language: ruby before_install: - sudo apt-get install libpcap-dev -qq rvm: - 2.1.1 - 2.0.0
language: ruby before_install: - sudo apt-get install libpcap-dev -qq rvm: - 2.1.1 - 2.0.0 - - 1.9.3
1
0.142857
0
1
c74f293014f4dc738a15cbde9733f4774a2b5a16
app/views/meetings/_form.html.haml
app/views/meetings/_form.html.haml
= form_for @meeting, :html => { :class => 'form-horizontal' } do |f| .form-group = f.label :meeting_type_id %select#meeting_type_id.form-control{:name => "meeting[meeting_type_id]"} - MeetingType.all.each do |type| - if @meeting.meeting_type_id == type.id %option{:value => "#{type.id}", :selected => ''} = type.name - else %option{:value => "#{type.id}"} = type.name .form-group = f.label :instructor %select#instructor.form-control{:name => "meeting[instructor]"} = options_for_select(@inst_for_select, @meeting.instructor.id) .form-group = f.label :met = f.datetime_local_field :met, {:type => "datetime-local", :data => {:format => "MM/dd/yyyy hh:mm PP"}, :class => "form-control"} .form-group = f.label :comment = f.text_field :comment, :class => 'text_field form-control' .form-actions = f.submit nil, :id => 'submit-btn', :class => 'btn btn-primary' = link_to t('.cancel', :default => t("helpers.links.cancel")), meetings_path, :class => 'btn btn-default'
= form_for @meeting, :html => { :class => 'form-horizontal' } do |f| .form-group = f.label :meeting_type_id %select#meeting_type_id.form-control{:name => "meeting[meeting_type_id]"} - MeetingType.all.each do |type| - if @meeting.meeting_type_id == type.id %option{:value => "#{type.id}", :selected => ''} = type.name - else %option{:value => "#{type.id}"} = type.name .form-group = f.label :instructor %select#instructor.form-control{:name => "meeting[instructor]"} - if @meeting.instructor.is_a?(Member) = options_for_select(@inst_for_select, @meeting.instructor.id) - else = options_for_select(@inst_for_select) .form-group = f.label :met = f.datetime_local_field :met, {:type => "datetime-local", :data => {:format => "MM/dd/yyyy hh:mm PP"}, :class => "form-control"} .form-group = f.label :comment = f.text_field :comment, :class => 'text_field form-control' .form-actions = f.submit nil, :id => 'submit-btn', :class => 'btn btn-primary' = link_to t('.cancel', :default => t("helpers.links.cancel")), meetings_path, :class => 'btn btn-default'
Fix meeting edit view when there is no instructor
Fix meeting edit view when there is no instructor
Haml
mit
hex337/quantum-attendance,hex337/quantum-attendance,hex337/quantum-attendance,hex337/quantum-attendance
haml
## Code Before: = form_for @meeting, :html => { :class => 'form-horizontal' } do |f| .form-group = f.label :meeting_type_id %select#meeting_type_id.form-control{:name => "meeting[meeting_type_id]"} - MeetingType.all.each do |type| - if @meeting.meeting_type_id == type.id %option{:value => "#{type.id}", :selected => ''} = type.name - else %option{:value => "#{type.id}"} = type.name .form-group = f.label :instructor %select#instructor.form-control{:name => "meeting[instructor]"} = options_for_select(@inst_for_select, @meeting.instructor.id) .form-group = f.label :met = f.datetime_local_field :met, {:type => "datetime-local", :data => {:format => "MM/dd/yyyy hh:mm PP"}, :class => "form-control"} .form-group = f.label :comment = f.text_field :comment, :class => 'text_field form-control' .form-actions = f.submit nil, :id => 'submit-btn', :class => 'btn btn-primary' = link_to t('.cancel', :default => t("helpers.links.cancel")), meetings_path, :class => 'btn btn-default' ## Instruction: Fix meeting edit view when there is no instructor ## Code After: = form_for @meeting, :html => { :class => 'form-horizontal' } do |f| .form-group = f.label :meeting_type_id %select#meeting_type_id.form-control{:name => "meeting[meeting_type_id]"} - MeetingType.all.each do |type| - if @meeting.meeting_type_id == type.id %option{:value => "#{type.id}", :selected => ''} = type.name - else %option{:value => "#{type.id}"} = type.name .form-group = f.label :instructor %select#instructor.form-control{:name => "meeting[instructor]"} - if @meeting.instructor.is_a?(Member) = options_for_select(@inst_for_select, @meeting.instructor.id) - else = options_for_select(@inst_for_select) .form-group = f.label :met = f.datetime_local_field :met, {:type => "datetime-local", :data => {:format => "MM/dd/yyyy hh:mm PP"}, :class => "form-control"} .form-group = f.label :comment = f.text_field :comment, :class => 'text_field form-control' .form-actions = f.submit nil, :id => 'submit-btn', :class => 'btn btn-primary' = link_to t('.cancel', :default => t("helpers.links.cancel")), meetings_path, :class => 'btn btn-default'
= form_for @meeting, :html => { :class => 'form-horizontal' } do |f| .form-group = f.label :meeting_type_id %select#meeting_type_id.form-control{:name => "meeting[meeting_type_id]"} - MeetingType.all.each do |type| - if @meeting.meeting_type_id == type.id %option{:value => "#{type.id}", :selected => ''} = type.name - else %option{:value => "#{type.id}"} = type.name .form-group = f.label :instructor %select#instructor.form-control{:name => "meeting[instructor]"} + - if @meeting.instructor.is_a?(Member) - = options_for_select(@inst_for_select, @meeting.instructor.id) + = options_for_select(@inst_for_select, @meeting.instructor.id) ? ++ + - else + = options_for_select(@inst_for_select) .form-group = f.label :met = f.datetime_local_field :met, {:type => "datetime-local", :data => {:format => "MM/dd/yyyy hh:mm PP"}, :class => "form-control"} .form-group = f.label :comment = f.text_field :comment, :class => 'text_field form-control' .form-actions = f.submit nil, :id => 'submit-btn', :class => 'btn btn-primary' = link_to t('.cancel', :default => t("helpers.links.cancel")), meetings_path, :class => 'btn btn-default'
5
0.208333
4
1
9b338975bb8fe6678909fe25c459605cf9ad5dee
.travis.yml
.travis.yml
language: node_js node_js: - 0.10 before_script: - npm rebuild - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" script: npm test
language: node_js node_js: - 0.10 before_script: - npm rebuild - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" script: npm test notifications: irc: channels: - "irc.mozilla.org#payments" on_success: change on_failure: always
Add irc notifications for tests
Add irc notifications for tests
YAML
bsd-3-clause
kumar303/fxpay,mozilla/fxpay,mozilla/fxpay,kumar303/fxpay
yaml
## Code Before: language: node_js node_js: - 0.10 before_script: - npm rebuild - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" script: npm test ## Instruction: Add irc notifications for tests ## Code After: language: node_js node_js: - 0.10 before_script: - npm rebuild - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" script: npm test notifications: irc: channels: - "irc.mozilla.org#payments" on_success: change on_failure: always
language: node_js node_js: - 0.10 before_script: - npm rebuild - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" script: npm test + notifications: + irc: + channels: + - "irc.mozilla.org#payments" + on_success: change + on_failure: always
6
0.75
6
0
f909739f396e71895829955f40ced755f4fbe772
app/views/help/ssh.html.haml
app/views/help/ssh.html.haml
= render layout: 'help/layout' do %h3.page-title SSH Keys %p.slead SSH key allows you to establish a secure connection between your computer and GitLab %p.slead Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub . If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step. %p.slead To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location/filename, you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip the step by pressing enter. Note that the password you choose here can't be altered or retrieved. %pre.dark ssh-keygen -t rsa -C "#{current_user.email}" %p.slead Use code below to show your public key. %pre.dark cat ~/.ssh/id_rsa.pub %p.slead Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with 'ssh-' and ending with your username and host.
= render layout: 'help/layout' do %h3.page-title SSH Keys %p.slead SSH key allows you to establish a secure connection between your computer and GitLab %p.slead Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step. %p.slead To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. Note that the password you choose here can't be altered or retrieved. %pre.dark ssh-keygen -t rsa -C "#{current_user.email}" %p.slead Use code below to show your public key. %pre.dark cat ~/.ssh/id_rsa.pub %p.slead Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with 'ssh-' and ending with your username and host.
Split into one sentence per line for future edits.
Split into one sentence per line for future edits.
Haml
mit
bbodenmiller/gitlabhq,mathstuf/gitlabhq,ZeoAlliance/gitlabhq,chenrui2014/gitlabhq,stellamiranda/mobbr-gitlabhq,kitech/gitlabhq,Keystion/gitlabhq,phinfonet/mobbr-gitlabhq,DanielZhangQingLong/gitlabhq,rfeese/gitlab-ce,yuyue2013/ss,michaKFromParis/sparkslab,SVArago/gitlabhq,jairzh/gitlabhq-sfdc,chenrui2014/gitlabhq,jvanbaarsen/gitlabhq,gorgee/gitlabhq,mr-dxdy/gitlabhq,Keystion/gitlabhq,OlegGirko/gitlab-ce,pjknkda/gitlabhq,jaepyoung/gitlabhq,since2014/gitlabhq,NARKOZ/gitlabhq,rumpelsepp/gitlabhq,NuLL3rr0r/gitlabhq,8thcolor/testing-public-gitlabhq,atomaka/gitlabhq,windymid/test2,cui-liqiang/gitlab-ce,folpindo/gitlabhq,wangcan2014/gitlabhq,johnmyqin/gitlabhq,H3Chief/gitlabhq,rfeese/gitlab-ce,michaKFromParis/gitlabhq,adaiguoguo/gitlab_globalserarch,liyakun/gitlabhq,louahola/gitlabhq,julianengel/gitlabhq,since2014/gitlabhq,folpindo/gitlabhq,xuvw/gitlabhq,OtkurBiz/gitlabhq,hq804116393/gitlabhq,kotaro-dev/gitlab-6-9,mrb/gitlabhq,stanhu/gitlabhq,ngpestelos/gitlabhq,chadyred/gitlabhq,sue445/gitlabhq,bigsurge/gitlabhq,Kambda/Mobbr,sekcheong/gitlabhq,OtkurBiz/gitlabhq,luzhongyang/gitlabhq,mente/gitlabhq,manfer/gitlabhq,jvanbaarsen/gitlabhq,ttasanen/gitlabhq,bozaro/gitlabhq,aaronsnyder/gitlabhq,szechyjs/gitlabhq,Telekom-PD/gitlabhq,Razer6/gitlabhq,theodi/gitlabhq,martinma4/gitlabhq,mr-dxdy/gitlabhq,stanhu/gitlabhq,yuyue2013/ss,stoplightio/gitlabhq,larryli/gitlabhq,bozaro/gitlabhq,dreampet/gitlab,Devin001/gitlabhq,nmav/gitlabhq,daiyu/gitlab-zh,SVArago/gitlabhq,salipro4ever/gitlabhq,hacsoc/gitlabhq,htve/GitlabForChinese,sue445/gitlabhq,chadyred/gitlabhq,ttasanen/gitlabhq,axilleas/gitlabhq,yama07/gitlabhq,TheWatcher/gitlabhq,WSDC-NITWarangal/gitlabhq,gorgee/gitlabhq,Exeia/gitlabhq,mrb/gitlabhq,123Haynes/gitlabhq,OtkurBiz/gitlabhq,martijnvermaat/gitlabhq,atomaka/gitlabhq,sonalkr132/gitlabhq,dreampet/gitlab,sue445/gitlabhq,bigsurge/gitlabhq,joalmeid/gitlabhq,Exeia/gitlabhq,pulkit21/gitlabhq,Tyrael/gitlabhq,initiummedia/gitlabhq,bbodenmiller/gitlabhq,zrbsprite/gitlabhq,mavimo/gitlabhq,htve/GitlabForChinese,dukex/gitlabhq,whluwit/gitlabhq,flashbuckets/gitlabhq,michaKFromParis/gitlabhqold,dplarson/gitlabhq,michaKFromParis/gitlabhq,stoplightio/gitlabhq,Tyrael/gitlabhq,martinma4/gitlabhq,ikappas/gitlabhq,OlegGirko/gitlab-ce,gorgee/gitlabhq,fscherwi/gitlabhq,initiummedia/gitlabhq,darkrasid/gitlabhq,ferdinandrosario/gitlabhq,iiet/iiet-git,youprofit/gitlabhq,dwrensha/gitlabhq,theonlydoo/gitlabhq,pkallberg/tjenare,yatish27/gitlabhq,pkallberg/tjenare,tempbottle/gitlabhq,mrb/gitlabhq,williamherry/gitlabhq,SkyWei/gitlabhq,axilleas/gitlabhq,hacsoc/gitlabhq,salipro4ever/gitlabhq,julianengel/gitlabhq,pulkit21/gitlabhq,ksoichiro/gitlabhq,Kambda/mobbr-gitlabhq,whluwit/gitlabhq,jaepyoung/gitlabhq,mente/gitlabhq,sekcheong/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,Keystion/gitlabhq,allistera/gitlabhq,delkyd/gitlabhq,DanielZhangQingLong/gitlabhq,t-zuehlsdorff/gitlabhq,fscherwi/gitlabhq,sakishum/gitlabhq,stellamiranda/mobbr-gitlabhq,dukex/gitlabhq,joalmeid/gitlabhq,yuyue2013/ss,julianengel/gitlabhq,NKMR6194/gitlabhq,vjustov/gitlabhq,fantasywind/gitlabhq,martijnvermaat/gitlabhq,mente/gitlabhq,stanhu/gitlabhq,yama07/gitlabhq,per-garden/gitlabhq,LytayTOUCH/gitlabhq,yonglehou/gitlabhq,yonglehou/gitlabhq,it33/gitlabhq,akumetsuv/gitlab,ayufan/gitlabhq,childbamboo/gitlabhq,eliasp/gitlabhq,tk23/gitlabhq,vjustov/gitlabhq,ikappas/gitlabhq,michaKFromParis/sparkslab,cncodog/gitlab,fantasywind/gitlabhq,martijnvermaat/gitlabhq,williamherry/gitlabhq,screenpages/gitlabhq,revaret/gitlabhq,cncodog/gitlab,hq804116393/gitlabhq,rumpelsepp/gitlabhq,SkyWei/gitlabhq,yama07/gitlabhq,tempbottle/gitlabhq,WSDC-NITWarangal/gitlabhq,pjknkda/gitlabhq,zBMNForks/gitlabhq,mathstuf/gitlabhq,copystudy/gitlabhq,mmkassem/gitlabhq,LUMC/gitlabhq,jrjang/gitlabhq,gorgee/gitlabhq,mr-dxdy/gitlabhq,williamherry/gitlabhq,vjustov/gitlabhq,yama07/gitlabhq,nguyen-tien-mulodo/gitlabhq,delkyd/gitlabhq,NKMR6194/gitlabhq,NARKOZ/gitlabhq,jairzh/gitlabhq-sfdc,eliasp/gitlabhq,fantasywind/gitlabhq,Devin001/gitlabhq,fpgentil/gitlabhq,phinfonet/mobbr-gitlabhq,mavimo/gitlabhq,yulchitaj/TEST3,tempbottle/gitlabhq,larryli/gitlabhq,allistera/gitlabhq,t-zuehlsdorff/gitlabhq,copystudy/gitlabhq,yfaizal/gitlabhq,MauriceMohlek/gitlabhq,aaronsnyder/gitlabhq,chenrui2014/gitlabhq,rhels/gitlabhq,LytayTOUCH/gitlabhq,jairzh/gitlabhq-sfdc,jrjang/gitlab-ce,shinexiao/gitlabhq,SVArago/gitlabhq,theonlydoo/gitlabhq,cinderblock/gitlabhq,yfaizal/gitlabhq,hzy001/gitlabhq,mr-dxdy/gitlabhq,Soullivaneuh/gitlabhq,Soullivaneuh/gitlabhq,kitech/gitlabhq,mathstuf/gitlabhq,cncodog/gitlab,nmav/gitlabhq,youprofit/gitlabhq,ngpestelos/gitlabhq,ferdinandrosario/gitlabhq,TheWatcher/gitlabhq,LytayTOUCH/gitlabhq,WSDC-NITWarangal/gitlabhq,manfer/gitlabhq,H3Chief/gitlabhq,salipro4ever/gitlabhq,tim-hoff/gitlabhq,t-zuehlsdorff/gitlabhq,jrjang/gitlab-ce,jrjang/gitlab-ce,jirutka/gitlabhq,bladealslayer/gitlabhq,ksoichiro/gitlabhq,cinderblock/gitlabhq,htve/GitlabForChinese,flashbuckets/gitlabhq,rfeese/gitlab-ce,jrjang/gitlab-ce,kemenaran/gitlabhq,wangcan2014/gitlabhq,tim-hoff/gitlabhq,darkrasid/gitlabhq,gopeter/gitlabhq,bladealslayer/gitlabhq,louahola/gitlabhq,hacsoc/gitlabhq,allysonbarros/gitlabhq,123Haynes/gitlabhq,icedwater/gitlabhq,initiummedia/gitlabhq,Kambda/Mobbr,hzy001/gitlabhq,tk23/gitlabhq,tim-hoff/gitlabhq,fgbreel/gitlabhq,Burick/gitlabhq,theodi/gitlabhq,Burick/gitlabhq,shinexiao/gitlabhq,dukex/gitlabhq,yulchitaj/TEST3,bladealslayer/gitlabhq,jaepyoung/gitlabhq,rumpelsepp/gitlabhq,k4zzk/gitlabhq,martinma4/gitlabhq,duduribeiro/gitlabhq,hq804116393/gitlabhq,Devin001/gitlabhq,Burick/gitlabhq,Devin001/gitlabhq,LUMC/gitlabhq,axilleas/gitlabhq,OlegGirko/gitlab-ce,dvrylc/gitlabhq,duduribeiro/gitlabhq,jaepyoung/gitlabhq,ordiychen/gitlabhq,hzy001/gitlabhq,revaret/gitlabhq,ordiychen/gitlabhq,adaiguoguo/gitlab_globalserarch,mavimo/gitlabhq,ttasanen/gitlabhq,123Haynes/gitlabhq,cui-liqiang/gitlab-ce,mrb/gitlabhq,MauriceMohlek/gitlabhq,yatish27/gitlabhq,fearenales/gitlabhq,dvrylc/gitlabhq,ferdinandrosario/gitlabhq,dwrensha/gitlabhq,fscherwi/gitlabhq,it33/gitlabhq,hacsoc/gitlabhq,dwrensha/gitlabhq,ayufan/gitlabhq,Keystion/gitlabhq,koreamic/gitlabhq,ibiart/gitlabhq,yatish27/gitlabhq,fgbreel/gitlabhq,mmkassem/gitlabhq,wangcan2014/gitlabhq,screenpages/gitlabhq,salipro4ever/gitlabhq,chenrui2014/gitlabhq,sakishum/gitlabhq,adaiguoguo/gitlab_globalserarch,martijnvermaat/gitlabhq,folpindo/gitlabhq,bozaro/gitlabhq,jrjang/gitlabhq,ordiychen/gitlabhq,williamherry/gitlabhq,Soullivaneuh/gitlabhq,mmkassem/gitlabhq,delkyd/gitlabhq,pulkit21/gitlabhq,theonlydoo/gitlabhq,OlegGirko/gitlab-ce,daiyu/gitlab-zh,martinma4/gitlabhq,rhels/gitlabhq,jvanbaarsen/gitlabhq,joalmeid/gitlabhq,dwrensha/gitlabhq,NARKOZ/gitlabhq,k4zzk/gitlabhq,fendoudeqingchunhh/gitlabhq,wangcan2014/gitlabhq,darkrasid/gitlabhq,cui-liqiang/gitlab-ce,jvanbaarsen/gitlabhq,nguyen-tien-mulodo/gitlabhq,kotaro-dev/gitlab-6-9,copystudy/gitlabhq,fearenales/gitlabhq,bozaro/gitlabhq,it33/gitlabhq,shinexiao/gitlabhq,ayufan/gitlabhq,louahola/gitlabhq,bbodenmiller/gitlabhq,NARKOZ/gitlabhq,bigsurge/gitlabhq,gopeter/gitlabhq,zrbsprite/gitlabhq,lvfeng1130/gitlabhq,zBMNForks/gitlabhq,bbodenmiller/gitlabhq,fpgentil/gitlabhq,OtkurBiz/gitlabhq,TheWatcher/gitlabhq,michaKFromParis/gitlabhqold,szechyjs/gitlabhq,per-garden/gitlabhq,it33/gitlabhq,ikappas/gitlabhq,Burick/gitlabhq,tk23/gitlabhq,MauriceMohlek/gitlabhq,SkyWei/gitlabhq,johnmyqin/gitlabhq,rebecamendez/gitlabhq,allistera/gitlabhq,Exeia/gitlabhq,ngpestelos/gitlabhq,folpindo/gitlabhq,luzhongyang/gitlabhq,ikappas/gitlabhq,ayufan/gitlabhq,theodi/gitlabhq,lvfeng1130/gitlabhq,Kambda/mobbr-gitlabhq,dvrylc/gitlabhq,ngpestelos/gitlabhq,jrjang/gitlabhq,openwide-java/gitlabhq,LUMC/gitlabhq,Tyrael/gitlabhq,pkallberg/tjenare,delkyd/gitlabhq,fearenales/gitlabhq,liyakun/gitlabhq,WSDC-NITWarangal/gitlabhq,Telekom-PD/gitlabhq,Razer6/gitlabhq,rhels/gitlabhq,joalmeid/gitlabhq,lvfeng1130/gitlabhq,rfeese/gitlab-ce,Tyrael/gitlabhq,k4zzk/gitlabhq,dreampet/gitlab,eliasp/gitlabhq,duduribeiro/gitlabhq,dukex/gitlabhq,michaKFromParis/gitlabhq,sonalkr132/gitlabhq,childbamboo/gitlabhq,tk23/gitlabhq,icedwater/gitlabhq,Datacom/gitlabhq,mathstuf/gitlabhq,mmkassem/gitlabhq,DanielZhangQingLong/gitlabhq,tempbottle/gitlabhq,stoplightio/gitlabhq,shinexiao/gitlabhq,rebecamendez/gitlabhq,michaKFromParis/sparkslab,iiet/iiet-git,NuLL3rr0r/gitlabhq,sakishum/gitlabhq,michaKFromParis/sparkslab,koreamic/gitlabhq,8thcolor/testing-public-gitlabhq,duduribeiro/gitlabhq,luzhongyang/gitlabhq,akumetsuv/gitlab,zBMNForks/gitlabhq,sonalkr132/gitlabhq,rebecamendez/gitlabhq,cncodog/gitlab,kitech/gitlabhq,tim-hoff/gitlabhq,screenpages/gitlabhq,stanhu/gitlabhq,fpgentil/gitlabhq,pjknkda/gitlabhq,sekcheong/gitlabhq,stellamiranda/mobbr-gitlabhq,kemenaran/gitlabhq,sonalkr132/gitlabhq,eliasp/gitlabhq,chadyred/gitlabhq,k4zzk/gitlabhq,yonglehou/gitlabhq,daiyu/gitlab-zh,julianengel/gitlabhq,youprofit/gitlabhq,jirutka/gitlabhq,michaKFromParis/gitlabhqold,openwide-java/gitlabhq,zrbsprite/gitlabhq,htve/GitlabForChinese,jairzh/gitlabhq-sfdc,kemenaran/gitlabhq,phinfonet/mobbr-gitlabhq,dplarson/gitlabhq,yfaizal/gitlabhq,Soullivaneuh/gitlabhq,gopeter/gitlabhq,ordiychen/gitlabhq,ttasanen/gitlabhq,sue445/gitlabhq,kemenaran/gitlabhq,since2014/gitlabhq,childbamboo/gitlabhq,Telekom-PD/gitlabhq,MauriceMohlek/gitlabhq,whluwit/gitlabhq,windymid/test2,allistera/gitlabhq,ferdinandrosario/gitlabhq,Datacom/gitlabhq,rebecamendez/gitlabhq,youprofit/gitlabhq,since2014/gitlabhq,fgbreel/gitlabhq,icedwater/gitlabhq,revaret/gitlabhq,SkyWei/gitlabhq,allysonbarros/gitlabhq,H3Chief/gitlabhq,xuvw/gitlabhq,vjustov/gitlabhq,Razer6/gitlabhq,Datacom/gitlabhq,fantasywind/gitlabhq,michaKFromParis/gitlabhqold,flashbuckets/gitlabhq,fendoudeqingchunhh/gitlabhq,fendoudeqingchunhh/gitlabhq,pkgr/gitlabhq,yulchitaj/TEST3,LUMC/gitlabhq,kotaro-dev/gitlab-6-9,per-garden/gitlabhq,johnmyqin/gitlabhq,szechyjs/gitlabhq,initiummedia/gitlabhq,iiet/iiet-git,ibiart/gitlabhq,lvfeng1130/gitlabhq,koreamic/gitlabhq,DanielZhangQingLong/gitlabhq,mavimo/gitlabhq,fendoudeqingchunhh/gitlabhq,gopeter/gitlabhq,nguyen-tien-mulodo/gitlabhq,fearenales/gitlabhq,Datacom/gitlabhq,xuvw/gitlabhq,nmav/gitlabhq,kitech/gitlabhq,akumetsuv/gitlab,allysonbarros/gitlabhq,LytayTOUCH/gitlabhq,windymid/test2,pjknkda/gitlabhq,yatish27/gitlabhq,luzhongyang/gitlabhq,ZeoAlliance/gitlabhq,louahola/gitlabhq,bigsurge/gitlabhq,pkgr/gitlabhq,chadyred/gitlabhq,nmav/gitlabhq,fpgentil/gitlabhq,hq804116393/gitlabhq,dplarson/gitlabhq,mente/gitlabhq,liyakun/gitlabhq,koreamic/gitlabhq,johnmyqin/gitlabhq,yfaizal/gitlabhq,yuyue2013/ss,Kambda/Mobbr,childbamboo/gitlabhq,pulkit21/gitlabhq,yonglehou/gitlabhq,ZeoAlliance/gitlabhq,rhels/gitlabhq,larryli/gitlabhq,H3Chief/gitlabhq,sideci-sample/sideci-sample-gitlabhq,hzy001/gitlabhq,adaiguoguo/gitlab_globalserarch,SVArago/gitlabhq,whluwit/gitlabhq,openwide-java/gitlabhq,axilleas/gitlabhq,openwide-java/gitlabhq,sideci-sample/sideci-sample-gitlabhq,pkgr/gitlabhq,ksoichiro/gitlabhq,larryli/gitlabhq,jirutka/gitlabhq,theodi/gitlabhq,sekcheong/gitlabhq,aaronsnyder/gitlabhq,screenpages/gitlabhq,NKMR6194/gitlabhq,cui-liqiang/gitlab-ce,stoplightio/gitlabhq,icedwater/gitlabhq,dplarson/gitlabhq,Kambda/mobbr-gitlabhq,cinderblock/gitlabhq,darkrasid/gitlabhq,szechyjs/gitlabhq,zrbsprite/gitlabhq,fscherwi/gitlabhq,ibiart/gitlabhq,8thcolor/testing-public-gitlabhq,NKMR6194/gitlabhq,flashbuckets/gitlabhq,copystudy/gitlabhq,fgbreel/gitlabhq,NuLL3rr0r/gitlabhq,revaret/gitlabhq,TheWatcher/gitlabhq,Exeia/gitlabhq,cinderblock/gitlabhq,manfer/gitlabhq,michaKFromParis/gitlabhq,theonlydoo/gitlabhq,sakishum/gitlabhq,aaronsnyder/gitlabhq,Telekom-PD/gitlabhq,t-zuehlsdorff/gitlabhq,nguyen-tien-mulodo/gitlabhq,iiet/iiet-git,yulchitaj/TEST3,atomaka/gitlabhq,rumpelsepp/gitlabhq,Razer6/gitlabhq,zBMNForks/gitlabhq,dvrylc/gitlabhq,per-garden/gitlabhq,daiyu/gitlab-zh,liyakun/gitlabhq,ksoichiro/gitlabhq,jrjang/gitlabhq,manfer/gitlabhq,allysonbarros/gitlabhq,sideci-sample/sideci-sample-gitlabhq
haml
## Code Before: = render layout: 'help/layout' do %h3.page-title SSH Keys %p.slead SSH key allows you to establish a secure connection between your computer and GitLab %p.slead Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub . If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step. %p.slead To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location/filename, you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip the step by pressing enter. Note that the password you choose here can't be altered or retrieved. %pre.dark ssh-keygen -t rsa -C "#{current_user.email}" %p.slead Use code below to show your public key. %pre.dark cat ~/.ssh/id_rsa.pub %p.slead Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with 'ssh-' and ending with your username and host. ## Instruction: Split into one sentence per line for future edits. ## Code After: = render layout: 'help/layout' do %h3.page-title SSH Keys %p.slead SSH key allows you to establish a secure connection between your computer and GitLab %p.slead Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step. %p.slead To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. Note that the password you choose here can't be altered or retrieved. %pre.dark ssh-keygen -t rsa -C "#{current_user.email}" %p.slead Use code below to show your public key. %pre.dark cat ~/.ssh/id_rsa.pub %p.slead Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with 'ssh-' and ending with your username and host.
= render layout: 'help/layout' do %h3.page-title SSH Keys %p.slead SSH key allows you to establish a secure connection between your computer and GitLab %p.slead - Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub . If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step. + Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub + If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step. %p.slead - To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location/filename, you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip the step by pressing enter. Note that the password you choose here can't be altered or retrieved. + To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. + When prompted for the location and filename you can press enter to use the default. + It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. + Note that the password you choose here can't be altered or retrieved. %pre.dark ssh-keygen -t rsa -C "#{current_user.email}" %p.slead Use code below to show your public key. %pre.dark cat ~/.ssh/id_rsa.pub %p.slead - Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with 'ssh-' and ending with your username and host. + Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. + Please copy the complete key starting with 'ssh-' and ending with your username and host.
11
0.478261
8
3
f979ecadca38961d579387cefd9a9950fd855cf4
docs/src/pages/presets/preset-gallery/index.md
docs/src/pages/presets/preset-gallery/index.md
--- id: 'preset-gallery' title: 'Preset Gallery' --- [Storybook presets](../introduction/) are a new feature in Storybook to dramatically simplify configuration. This is a list of available presets for Storybook. ## Presets maintained by storybook team Storybook-maintained presets are available in the [Presets repo](https://github.com/storybookjs/presets). They include: ### [Typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) Write your stories in typescript with a single line of configuration. ## Community presets There are no community presets available yet. Check back here or edit this page to add yours.
--- id: 'preset-gallery' title: 'Preset Gallery' --- [Storybook presets](../introduction/) are a new feature in Storybook to dramatically simplify configuration. This is a list of available presets for Storybook. ## Presets maintained by storybook team Storybook-maintained presets are available in the [Presets repo](https://github.com/storybookjs/presets). They include: ### [Typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) One-line Typescript w/ docgen configuration for storybook. ### [SCSS](https://github.com/storybookjs/presets/tree/master/packages/preset-scss) One-line SCSS configuration for storybook. ## Community presets There are no community presets available yet. Check back here or edit this page to add yours.
Add SCSS to presets gallery
Add SCSS to presets gallery
Markdown
mit
storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook
markdown
## Code Before: --- id: 'preset-gallery' title: 'Preset Gallery' --- [Storybook presets](../introduction/) are a new feature in Storybook to dramatically simplify configuration. This is a list of available presets for Storybook. ## Presets maintained by storybook team Storybook-maintained presets are available in the [Presets repo](https://github.com/storybookjs/presets). They include: ### [Typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) Write your stories in typescript with a single line of configuration. ## Community presets There are no community presets available yet. Check back here or edit this page to add yours. ## Instruction: Add SCSS to presets gallery ## Code After: --- id: 'preset-gallery' title: 'Preset Gallery' --- [Storybook presets](../introduction/) are a new feature in Storybook to dramatically simplify configuration. This is a list of available presets for Storybook. ## Presets maintained by storybook team Storybook-maintained presets are available in the [Presets repo](https://github.com/storybookjs/presets). They include: ### [Typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) One-line Typescript w/ docgen configuration for storybook. ### [SCSS](https://github.com/storybookjs/presets/tree/master/packages/preset-scss) One-line SCSS configuration for storybook. ## Community presets There are no community presets available yet. Check back here or edit this page to add yours.
--- id: 'preset-gallery' title: 'Preset Gallery' --- [Storybook presets](../introduction/) are a new feature in Storybook to dramatically simplify configuration. This is a list of available presets for Storybook. ## Presets maintained by storybook team Storybook-maintained presets are available in the [Presets repo](https://github.com/storybookjs/presets). They include: ### [Typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) - Write your stories in typescript with a single line of configuration. + One-line Typescript w/ docgen configuration for storybook. + + ### [SCSS](https://github.com/storybookjs/presets/tree/master/packages/preset-scss) + + One-line SCSS configuration for storybook. ## Community presets There are no community presets available yet. Check back here or edit this page to add yours.
6
0.333333
5
1
375f027dd71dc8aebe384225ce5dc95447859da3
api/src/main/resources/META-INF/spring/camel-context.xml
api/src/main/resources/META-INF/spring/camel-context.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Configures the Camel Context--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- here is a sample which processes the input files (leaving them in place - see the 'noop' flag) then performs content based routing on the message using XPath --> <camel:route> <camel:from uri="file:src/data?noop=true"/> <camel:choice> <camel:when> <camel:xpath>/person/city = 'London'</camel:xpath> <camel:log message="UK message"/> <camel:to uri="file:target/messages/uk"/> </camel:when> <camel:otherwise> <camel:log message="Other message"/> <camel:to uri="file:target/messages/others"/> </camel:otherwise> </camel:choice> </camel:route> </camel:camelContext> </beans>
<?xml version="1.0" encoding="UTF-8"?> <!-- Configures the Camel Context--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <bean id="service" class=" <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- here is a sample which processes the input files (leaving them in place - see the 'noop' flag) then performs content based routing on the message using XPath --> <camel:route> <camel:from uri="file:src/data?noop=true"/> <camel:choice> <camel:when> <camel:xpath>/person/city = 'London'</camel:xpath> <camel:log message="UK message"/> <camel:to uri="file:target/messages/uk"/> </camel:when> <camel:otherwise> <camel:log message="Other message"/> <camel:to uri="file:target/messages/others"/> </camel:otherwise> </camel:choice> </camel:route> <route> <from uri="jetty:http://localhost:8010/services")> <bean ref="service" method="handleRequest"/> <to uri="stream:out"/> </route> </camelContext> </beans>
Add route for jetty to develop REST API
Add route for jetty to develop REST API
XML
apache-2.0
jdgwartney/boundary-service-database
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <!-- Configures the Camel Context--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- here is a sample which processes the input files (leaving them in place - see the 'noop' flag) then performs content based routing on the message using XPath --> <camel:route> <camel:from uri="file:src/data?noop=true"/> <camel:choice> <camel:when> <camel:xpath>/person/city = 'London'</camel:xpath> <camel:log message="UK message"/> <camel:to uri="file:target/messages/uk"/> </camel:when> <camel:otherwise> <camel:log message="Other message"/> <camel:to uri="file:target/messages/others"/> </camel:otherwise> </camel:choice> </camel:route> </camel:camelContext> </beans> ## Instruction: Add route for jetty to develop REST API ## Code After: <?xml version="1.0" encoding="UTF-8"?> <!-- Configures the Camel Context--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <bean id="service" class=" <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- here is a sample which processes the input files (leaving them in place - see the 'noop' flag) then performs content based routing on the message using XPath --> <camel:route> <camel:from uri="file:src/data?noop=true"/> <camel:choice> <camel:when> <camel:xpath>/person/city = 'London'</camel:xpath> <camel:log message="UK message"/> <camel:to uri="file:target/messages/uk"/> </camel:when> <camel:otherwise> <camel:log message="Other message"/> <camel:to uri="file:target/messages/others"/> </camel:otherwise> </camel:choice> </camel:route> <route> <from uri="jetty:http://localhost:8010/services")> <bean ref="service" method="handleRequest"/> <to uri="stream:out"/> </route> </camelContext> </beans>
<?xml version="1.0" encoding="UTF-8"?> <!-- Configures the Camel Context--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + + + <bean id="service" class=" <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <!-- here is a sample which processes the input files (leaving them in place - see the 'noop' flag) then performs content based routing on the message using XPath --> <camel:route> <camel:from uri="file:src/data?noop=true"/> <camel:choice> <camel:when> <camel:xpath>/person/city = 'London'</camel:xpath> <camel:log message="UK message"/> <camel:to uri="file:target/messages/uk"/> </camel:when> <camel:otherwise> <camel:log message="Other message"/> <camel:to uri="file:target/messages/others"/> </camel:otherwise> </camel:choice> </camel:route> + + <route> + <from uri="jetty:http://localhost:8010/services")> + <bean ref="service" method="handleRequest"/> + <to uri="stream:out"/> + </route> - </camel:camelContext> ? ------ + </camelContext> </beans>
11
0.354839
10
1
7aa8ff477b577c147adc723c6f3029b4d01a544f
example/linux/main.c
example/linux/main.c
/* INCLUDES */ #include <stdio.h> #include "commands.h" #define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer) int main(int argc, char *argv[]) { char input_buffer[MAX_MSG_LENGTH]; int input_argc; char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS]; int i; char command_available = 0; if (argc > 1) { execute_command(argc-1, &argv[1]); } else { while (TRUE) { // Terminal prompt printf("\n> "); // Terminal input fgets(input_buffer, MAX_MSG_LENGTH-3, stdin); // Detect end of the command for (i=0; input_buffer[i]; i++) { if (input_buffer[i] == '\n' || input_buffer[i] == '\r') input_buffer[i] = 0; command_available = 1; } if (command_available) { // Get the command and the arguments in a list input_argc = separate_args(input_buffer, input_argv); // Execute the command if (input_argc) execute_command(input_argc, input_argv); command_available = 0; } } } return 0; }
/* INCLUDES */ #include <stdio.h> #include "commands.h" #define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer) int main(int argc, char *argv[]) { char input_buffer[MAX_MSG_LENGTH]; int input_argc; char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS]; int i; char command_available = 0; if (argc > 1) { execute_command(argc-1, &argv[1]); } else { while (TRUE) { // Terminal prompt printf("\n> "); // Terminal input fgets(input_buffer, MAX_MSG_LENGTH-3, stdin); // Detect end of the command for (i=0; input_buffer[i]; i++) { if (input_buffer[i] == '\n' || input_buffer[i] == '\r') {} input_buffer[i] = 0; command_available = 1; } } if (command_available) { // Get the command and the arguments in a list input_argc = separate_args(input_buffer, input_argv); // Execute the command if (input_argc) execute_command(input_argc, input_argv); command_available = 0; } } } return 0; }
Solve a bug with line endings
Solve a bug with line endings
C
mit
guyikcgg/UniversalShellBuilder,guyikcgg/UniversalShellBuilder
c
## Code Before: /* INCLUDES */ #include <stdio.h> #include "commands.h" #define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer) int main(int argc, char *argv[]) { char input_buffer[MAX_MSG_LENGTH]; int input_argc; char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS]; int i; char command_available = 0; if (argc > 1) { execute_command(argc-1, &argv[1]); } else { while (TRUE) { // Terminal prompt printf("\n> "); // Terminal input fgets(input_buffer, MAX_MSG_LENGTH-3, stdin); // Detect end of the command for (i=0; input_buffer[i]; i++) { if (input_buffer[i] == '\n' || input_buffer[i] == '\r') input_buffer[i] = 0; command_available = 1; } if (command_available) { // Get the command and the arguments in a list input_argc = separate_args(input_buffer, input_argv); // Execute the command if (input_argc) execute_command(input_argc, input_argv); command_available = 0; } } } return 0; } ## Instruction: Solve a bug with line endings ## Code After: /* INCLUDES */ #include <stdio.h> #include "commands.h" #define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer) int main(int argc, char *argv[]) { char input_buffer[MAX_MSG_LENGTH]; int input_argc; char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS]; int i; char command_available = 0; if (argc > 1) { execute_command(argc-1, &argv[1]); } else { while (TRUE) { // Terminal prompt printf("\n> "); // Terminal input fgets(input_buffer, MAX_MSG_LENGTH-3, stdin); // Detect end of the command for (i=0; input_buffer[i]; i++) { if (input_buffer[i] == '\n' || input_buffer[i] == '\r') {} input_buffer[i] = 0; command_available = 1; } } if (command_available) { // Get the command and the arguments in a list input_argc = separate_args(input_buffer, input_argv); // Execute the command if (input_argc) execute_command(input_argc, input_argv); command_available = 0; } } } return 0; }
/* INCLUDES */ #include <stdio.h> #include "commands.h" #define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer) int main(int argc, char *argv[]) { char input_buffer[MAX_MSG_LENGTH]; int input_argc; char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS]; int i; char command_available = 0; if (argc > 1) { execute_command(argc-1, &argv[1]); } else { while (TRUE) { // Terminal prompt printf("\n> "); // Terminal input fgets(input_buffer, MAX_MSG_LENGTH-3, stdin); // Detect end of the command for (i=0; input_buffer[i]; i++) { - if (input_buffer[i] == '\n' || input_buffer[i] == '\r') + if (input_buffer[i] == '\n' || input_buffer[i] == '\r') {} ? +++ input_buffer[i] = 0; command_available = 1; + } } if (command_available) { // Get the command and the arguments in a list input_argc = separate_args(input_buffer, input_argv); // Execute the command if (input_argc) execute_command(input_argc, input_argv); command_available = 0; } } } return 0; }
3
0.066667
2
1
632fc9dc71b868059123e56149a2588f5645a279
config/staging.js
config/staging.js
module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { baseuri: '/api' }, facebook_app_id: '175861739245183', l10n: { use_local: false } }
module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { baseuri: '/api', protocol: 'https://' }, facebook_app_id: '175861739245183', l10n: { use_local: false } }
Fix bug from redirectUrl sent to auth0
Fix bug from redirectUrl sent to auth0
JavaScript
bsd-3-clause
codeforamerica/streetmix,codeforamerica/streetmix,codeforamerica/streetmix
javascript
## Code Before: module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { baseuri: '/api' }, facebook_app_id: '175861739245183', l10n: { use_local: false } } ## Instruction: Fix bug from redirectUrl sent to auth0 ## Code After: module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { baseuri: '/api', protocol: 'https://' }, facebook_app_id: '175861739245183', l10n: { use_local: false } }
module.exports = { app_host_port: 'streetmix-staging.herokuapp.com', header_host_port: 'streetmix-staging.herokuapp.com', restapi: { - baseuri: '/api' + baseuri: '/api', ? + + protocol: 'https://' }, facebook_app_id: '175861739245183', l10n: { use_local: false } }
3
0.272727
2
1
6895c54a3fe4cbc690ce0e17154bfe2e40295bb0
apps/files_sharing/js/settings.js
apps/files_sharing/js/settings.js
$(document).ready(function() { $('#allowResharing').bind('change', function() { var checked = 1; if (!$('#allowResharing').attr('checked')) { checked = 0; } $.post(OC.filePath('files_sharing','ajax','toggleresharing.php'), 'resharing='+checked); }); });
$(document).ready(function() { $('#allowResharing').bind('change', function() { var checked = 1; if (!this.checked) { checked = 0; } $.post(OC.filePath('files_sharing','ajax','toggleresharing.php'), 'resharing='+checked); }); });
Fix javascript checkbox toggle for resharing
Fix javascript checkbox toggle for resharing
JavaScript
agpl-3.0
pixelipo/server,pixelipo/server,endsguy/server,IljaN/core,pollopolea/core,cernbox/core,xx621998xx/server,jbicha/server,pixelipo/server,cernbox/core,lrytz/core,pmattern/server,lrytz/core,michaelletzgus/nextcloud-server,bluelml/core,lrytz/core,sharidas/core,lrytz/core,endsguy/server,michaelletzgus/nextcloud-server,andreas-p/nextcloud-server,pixelipo/server,andreas-p/nextcloud-server,sharidas/core,pmattern/server,jbicha/server,xx621998xx/server,pollopolea/core,michaelletzgus/nextcloud-server,Ardinis/server,IljaN/core,owncloud/core,jbicha/server,endsguy/server,andreas-p/nextcloud-server,cernbox/core,owncloud/core,pollopolea/core,owncloud/core,nextcloud/server,endsguy/server,IljaN/core,pollopolea/core,phil-davis/core,Ardinis/server,sharidas/core,owncloud/core,whitekiba/server,xx621998xx/server,whitekiba/server,IljaN/core,bluelml/core,xx621998xx/server,pollopolea/core,owncloud/core,cernbox/core,lrytz/core,nextcloud/server,endsguy/server,sharidas/core,Ardinis/server,whitekiba/server,bluelml/core,pmattern/server,nextcloud/server,jbicha/server,pmattern/server,pmattern/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,xx621998xx/server,bluelml/core,whitekiba/server,Ardinis/server,whitekiba/server,sharidas/core,Ardinis/server,michaelletzgus/nextcloud-server,nextcloud/server,jbicha/server,IljaN/core,cernbox/core,pixelipo/server,bluelml/core
javascript
## Code Before: $(document).ready(function() { $('#allowResharing').bind('change', function() { var checked = 1; if (!$('#allowResharing').attr('checked')) { checked = 0; } $.post(OC.filePath('files_sharing','ajax','toggleresharing.php'), 'resharing='+checked); }); }); ## Instruction: Fix javascript checkbox toggle for resharing ## Code After: $(document).ready(function() { $('#allowResharing').bind('change', function() { var checked = 1; if (!this.checked) { checked = 0; } $.post(OC.filePath('files_sharing','ajax','toggleresharing.php'), 'resharing='+checked); }); });
$(document).ready(function() { $('#allowResharing').bind('change', function() { var checked = 1; - if (!$('#allowResharing').attr('checked')) { + if (!this.checked) { checked = 0; } $.post(OC.filePath('files_sharing','ajax','toggleresharing.php'), 'resharing='+checked); }); });
2
0.222222
1
1
6db2bb9b1634a7b37790207e5b8d420de643a9cb
turbasen/__init__.py
turbasen/__init__.py
VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
VERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
Add relevant models to turbasen module
Add relevant models to turbasen module
Python
mit
Turbasen/turbasen.py
python
## Code Before: VERSION = '1.0.0' def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value) ## Instruction: Add relevant models to turbasen module ## Code After: VERSION = '1.0.0' from .models import \ Omrade, \ Sted def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
VERSION = '1.0.0' + + from .models import \ + Omrade, \ + Sted def configure(**settings): from .settings import Settings for key, value in settings.items(): Settings.setattr(key, value)
4
0.666667
4
0
53e232fc7e2f5f9372ba9b544e01abf99f96c99c
Library/Homebrew/cask/lib/hbc/cli/internal_appcast_checkpoint.rb
Library/Homebrew/cask/lib/hbc/cli/internal_appcast_checkpoint.rb
module Hbc class CLI class InternalAppcastCheckpoint < InternalUseBase def self.run(*args) cask_tokens = cask_tokens_from(args) raise CaskUnspecifiedError if cask_tokens.empty? appcask_checkpoint(cask_tokens) end def self.appcask_checkpoint(cask_tokens) count = 0 cask_tokens.each do |cask_token| cask = Hbc.load(cask_token) if cask.appcast.nil? opoo "Cask '#{cask}' is missing an `appcast` stanza." else result = cask.appcast.calculate_checkpoint checkpoint = result[:checkpoint] if checkpoint.nil? onoe "Could not retrieve `appcast` checkpoint for cask '#{cask}': #{result[:command_result].stderr}" else puts cask_tokens.count > 1 ? "#{checkpoint} #{cask}": checkpoint count += 1 end end end count == cask_tokens.count end def self.help "calculates a given Cask's appcast checkpoint" end def self.needs_init? true end end end end
module Hbc class CLI class InternalAppcastCheckpoint < InternalUseBase def self.run(*args) calculate = args.include? "--calculate" cask_tokens = cask_tokens_from(args) raise CaskUnspecifiedError if cask_tokens.empty? appcask_checkpoint(cask_tokens, calculate) end def self.appcask_checkpoint(cask_tokens, calculate) count = 0 cask_tokens.each do |cask_token| cask = Hbc.load(cask_token) if cask.appcast.nil? opoo "Cask '#{cask}' is missing an `appcast` stanza." else if calculate result = cask.appcast.calculate_checkpoint checkpoint = result[:checkpoint] else checkpoint = cask.appcast.checkpoint end if checkpoint.nil? onoe "Could not retrieve `appcast` checkpoint for cask '#{cask}': #{result[:command_result].stderr}" else puts cask_tokens.count > 1 ? "#{checkpoint} #{cask}": checkpoint count += 1 end end end count == cask_tokens.count end def self.help "prints (no flag) or calculates ('--calculate') a given Cask's appcast checkpoint" end def self.needs_init? true end end end end
Add --calculate (print current checkpoint without it)
Add --calculate (print current checkpoint without it)
Ruby
bsd-2-clause
maxim-belkin/brew,JCount/brew,bfontaine/brew,aw1621107/brew,zmwangx/brew,amar-laksh/brew_sudo,amar-laksh/brew_sudo,vitorgalvao/brew,bfontaine/brew,mgrimes/brew,mgrimes/brew,palxex/brew,alyssais/brew,tonyg/homebrew,JCount/brew,Linuxbrew/brew,Linuxbrew/brew,Homebrew/brew,vitorgalvao/brew,aw1621107/brew,reelsense/brew,nandub/brew,amar-laksh/brew_sudo,Linuxbrew/brew,DomT4/brew,gregory-nisbet/brew,maxim-belkin/brew,jmsundar/brew,palxex/brew,claui/brew,MikeMcQuaid/brew,alyssais/brew,nandub/brew,mahori/brew,mahori/brew,mahori/brew,rwhogg/brew,ilovezfs/brew,ilovezfs/brew,sjackman/homebrew,hanxue/linuxbrew,tonyg/homebrew,konqui/brew,gregory-nisbet/brew,zmwangx/brew,alyssais/brew,claui/brew,hanxue/linuxbrew,Homebrew/brew,bfontaine/brew,DomT4/brew,claui/brew,nandub/brew,pseudocody/brew,konqui/brew,DomT4/brew,MikeMcQuaid/brew,mahori/brew,muellermartin/dist,sjackman/homebrew,ilovezfs/brew,EricFromCanada/brew,reitermarkus/brew,reitermarkus/brew,EricFromCanada/brew,reitermarkus/brew,Homebrew/brew,gregory-nisbet/brew,maxim-belkin/brew,sjackman/homebrew,pseudocody/brew,pseudocody/brew,rwhogg/brew,vitorgalvao/brew,aw1621107/brew,tonyg/homebrew,reelsense/brew,hanxue/linuxbrew,vitorgalvao/brew,EricFromCanada/brew,DomT4/brew,sjackman/homebrew,jmsundar/brew,reelsense/brew,palxex/brew,reitermarkus/brew,claui/brew,mgrimes/brew,rwhogg/brew,zmwangx/brew,jmsundar/brew,JCount/brew,nandub/brew,Homebrew/brew,JCount/brew,MikeMcQuaid/brew,konqui/brew,muellermartin/dist,MikeMcQuaid/brew,konqui/brew,Linuxbrew/brew,EricFromCanada/brew,muellermartin/dist
ruby
## Code Before: module Hbc class CLI class InternalAppcastCheckpoint < InternalUseBase def self.run(*args) cask_tokens = cask_tokens_from(args) raise CaskUnspecifiedError if cask_tokens.empty? appcask_checkpoint(cask_tokens) end def self.appcask_checkpoint(cask_tokens) count = 0 cask_tokens.each do |cask_token| cask = Hbc.load(cask_token) if cask.appcast.nil? opoo "Cask '#{cask}' is missing an `appcast` stanza." else result = cask.appcast.calculate_checkpoint checkpoint = result[:checkpoint] if checkpoint.nil? onoe "Could not retrieve `appcast` checkpoint for cask '#{cask}': #{result[:command_result].stderr}" else puts cask_tokens.count > 1 ? "#{checkpoint} #{cask}": checkpoint count += 1 end end end count == cask_tokens.count end def self.help "calculates a given Cask's appcast checkpoint" end def self.needs_init? true end end end end ## Instruction: Add --calculate (print current checkpoint without it) ## Code After: module Hbc class CLI class InternalAppcastCheckpoint < InternalUseBase def self.run(*args) calculate = args.include? "--calculate" cask_tokens = cask_tokens_from(args) raise CaskUnspecifiedError if cask_tokens.empty? appcask_checkpoint(cask_tokens, calculate) end def self.appcask_checkpoint(cask_tokens, calculate) count = 0 cask_tokens.each do |cask_token| cask = Hbc.load(cask_token) if cask.appcast.nil? opoo "Cask '#{cask}' is missing an `appcast` stanza." else if calculate result = cask.appcast.calculate_checkpoint checkpoint = result[:checkpoint] else checkpoint = cask.appcast.checkpoint end if checkpoint.nil? onoe "Could not retrieve `appcast` checkpoint for cask '#{cask}': #{result[:command_result].stderr}" else puts cask_tokens.count > 1 ? "#{checkpoint} #{cask}": checkpoint count += 1 end end end count == cask_tokens.count end def self.help "prints (no flag) or calculates ('--calculate') a given Cask's appcast checkpoint" end def self.needs_init? true end end end end
module Hbc class CLI class InternalAppcastCheckpoint < InternalUseBase def self.run(*args) + calculate = args.include? "--calculate" cask_tokens = cask_tokens_from(args) raise CaskUnspecifiedError if cask_tokens.empty? - appcask_checkpoint(cask_tokens) + appcask_checkpoint(cask_tokens, calculate) ? +++++++++++ end - def self.appcask_checkpoint(cask_tokens) + def self.appcask_checkpoint(cask_tokens, calculate) ? +++++++++++ count = 0 cask_tokens.each do |cask_token| cask = Hbc.load(cask_token) if cask.appcast.nil? opoo "Cask '#{cask}' is missing an `appcast` stanza." else + if calculate - result = cask.appcast.calculate_checkpoint + result = cask.appcast.calculate_checkpoint ? ++ - checkpoint = result[:checkpoint] + checkpoint = result[:checkpoint] ? ++ + else + checkpoint = cask.appcast.checkpoint + end if checkpoint.nil? onoe "Could not retrieve `appcast` checkpoint for cask '#{cask}': #{result[:command_result].stderr}" else puts cask_tokens.count > 1 ? "#{checkpoint} #{cask}": checkpoint count += 1 end end end count == cask_tokens.count end def self.help - "calculates a given Cask's appcast checkpoint" + "prints (no flag) or calculates ('--calculate') a given Cask's appcast checkpoint" ? ++++++++++++++++++++ ++++++++++++++++ end def self.needs_init? true end end end end
15
0.333333
10
5
f0675a86e1b41186191ccc221a69353671577de0
jenkins.sh
jenkins.sh
export DISPLAY=:99 env time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment # bundle exec rake stats time bundle exec rake db:create db:migrate --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \ RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace EXIT_STATUS=$? echo "EXIT STATUS: $EXIT_STATUS" exit $EXIT_STATUS
export DISPLAY=:99 env time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment # bundle exec rake stats time bundle exec rake db:create db:migrate db:test:prepare --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \ RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace EXIT_STATUS=$? echo "EXIT STATUS: $EXIT_STATUS" exit $EXIT_STATUS
Revert "Preparing the test DB here is redundant."
Revert "Preparing the test DB here is redundant." This reverts commit 979480b0f119358020f6201dfbec180da1dff9bc. Turns out we need this because we're explicitly setting RAILS_ENV=test when running the tests, and this prevents `db:test:prepare` from actually dumping from the development database
Shell
mit
YOTOV-LIMITED/whitehall,ggoral/whitehall,hotvulcan/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,ggoral/whitehall,askl56/whitehall,alphagov/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,robinwhittleton/whitehall,hotvulcan/whitehall,alphagov/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,askl56/whitehall,robinwhittleton/whitehall,askl56/whitehall
shell
## Code Before: export DISPLAY=:99 env time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment # bundle exec rake stats time bundle exec rake db:create db:migrate --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \ RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace EXIT_STATUS=$? echo "EXIT STATUS: $EXIT_STATUS" exit $EXIT_STATUS ## Instruction: Revert "Preparing the test DB here is redundant." This reverts commit 979480b0f119358020f6201dfbec180da1dff9bc. Turns out we need this because we're explicitly setting RAILS_ENV=test when running the tests, and this prevents `db:test:prepare` from actually dumping from the development database ## Code After: export DISPLAY=:99 env time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment # bundle exec rake stats time bundle exec rake db:create db:migrate db:test:prepare --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \ RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace EXIT_STATUS=$? echo "EXIT STATUS: $EXIT_STATUS" exit $EXIT_STATUS
export DISPLAY=:99 env time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment # bundle exec rake stats - time bundle exec rake db:create db:migrate --trace && \ + time bundle exec rake db:create db:migrate db:test:prepare --trace && \ ? ++++++++++++++++ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \ RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \ RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace EXIT_STATUS=$? echo "EXIT STATUS: $EXIT_STATUS" exit $EXIT_STATUS
2
0.181818
1
1
526d9f53a53b2e5c507f310d0df6bed2d6791afd
app/models/mixeval_question_type.php
app/models/mixeval_question_type.php
<?php class MixevalQuestionType extends AppModel { var $name = 'MixevalQuestionType'; var $displayField = 'type'; var $validate = array( 'type' => array( 'notempty' => array( 'rule' => array('notempty'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'MixevalQuestion' => array( 'className' => 'MixevalQuestion', 'foreignKey' => 'mixeval_question_type_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
<?php class MixevalQuestionType extends AppModel { var $name = 'MixevalQuestionType'; var $displayField = 'type'; var $validate = array( 'type' => array( 'notempty' => array( 'rule' => array('notempty'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'MixevalQuestion' => array( 'className' => 'MixevalQuestion', 'foreignKey' => 'mixeval_question_type_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
Fix tab indent in MixevalQuestionType model.
Fix tab indent in MixevalQuestionType model. It was using tab indent due to it being autogenerated by cake bake.
PHP
mit
eecian/Team08-iPeer,eecian/Team08-iPeer,eecian/Team08-iPeer,eecian/Team08-iPeer
php
## Code Before: <?php class MixevalQuestionType extends AppModel { var $name = 'MixevalQuestionType'; var $displayField = 'type'; var $validate = array( 'type' => array( 'notempty' => array( 'rule' => array('notempty'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'MixevalQuestion' => array( 'className' => 'MixevalQuestion', 'foreignKey' => 'mixeval_question_type_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); } ## Instruction: Fix tab indent in MixevalQuestionType model. It was using tab indent due to it being autogenerated by cake bake. ## Code After: <?php class MixevalQuestionType extends AppModel { var $name = 'MixevalQuestionType'; var $displayField = 'type'; var $validate = array( 'type' => array( 'notempty' => array( 'rule' => array('notempty'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'MixevalQuestion' => array( 'className' => 'MixevalQuestion', 'foreignKey' => 'mixeval_question_type_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
<?php class MixevalQuestionType extends AppModel { - var $name = 'MixevalQuestionType'; ? ^ + var $name = 'MixevalQuestionType'; ? ^^^^ - var $displayField = 'type'; ? ^ + var $displayField = 'type'; ? ^^^^ - var $validate = array( ? ^ + var $validate = array( ? ^^^^ - 'type' => array( ? ^^ + 'type' => array( ? ^^^^^^^^ - 'notempty' => array( - 'rule' => array('notempty'), + 'notempty' => array( + 'rule' => array('notempty'), - //'message' => 'Your custom message here', ? ^^^^ + //'message' => 'Your custom message here', ? ^^^^^^^^^^^^^^^^ - //'allowEmpty' => false, - //'required' => false, + //'allowEmpty' => false, + //'required' => false, - //'last' => false, // Stop validation after this rule ? ^^^^ + //'last' => false, // Stop validation after this rule ? ^^^^^^^^^^^^^^^^ - //'on' => 'create', // Limit validation to 'create' or 'update' operations ? ^^^^ + //'on' => 'create', // Limit validation to 'create' or 'update' operations ? ^^^^^^^^^^^^^^^^ - ), - ), - ); + ), + ), + ); - //The Associations below have been created with all possible keys, those that are not needed can be removed ? ^ + //The Associations below have been created with all possible keys, those that are not needed can be removed ? ^^^^ - var $hasMany = array( ? ^ + var $hasMany = array( ? ^^^^ - 'MixevalQuestion' => array( ? ^^ + 'MixevalQuestion' => array( ? ^^^^^^^^ - 'className' => 'MixevalQuestion', ? ^^^ + 'className' => 'MixevalQuestion', ? ^^^^^^^^^^^^ - 'foreignKey' => 'mixeval_question_type_id', ? ^^^ + 'foreignKey' => 'mixeval_question_type_id', ? ^^^^^^^^^^^^ - 'dependent' => false, - 'conditions' => '', - 'fields' => '', - 'order' => '', - 'limit' => '', - 'offset' => '', - 'exclusive' => '', - 'finderQuery' => '', - 'counterQuery' => '' - ) - ); + 'dependent' => false, + 'conditions' => '', + 'fields' => '', + 'order' => '', + 'limit' => '', + 'offset' => '', + 'exclusive' => '', + 'finderQuery' => '', + 'counterQuery' => '' + ) + ); }
60
1.714286
30
30
67b86cb3ddfb7c9e95ebed071ba167472276cc29
utils/decorators/require.py
utils/decorators/require.py
import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign def require(resource_namespace, permissions, resource_id=None): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if request.method == 'GET': payload = request.args client_key = current_app.config['CLIENTS']['plutonium']['client_key'] client_id = current_app.config['CLIENTS']['plutonium']['client_id'] data = [] for permission in permissions: data.append({ 'client_namespace' : 'app', 'client_id' : payload['client_id'], 'resource_namespace' : resource_namespace, 'permission' : permission, 'resource_id' : resource_id or '*' }) result = f(*args, **kwargs) return result return decorated_function return decorator
import json import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign from utils.exceptions import HttpUnauthorized def require(resource_namespace, permissions, resource_id=None): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if request.method == 'GET': payload = request.args client_key = current_app.config['CLIENTS']['plutonium']['client_key'] client_id = current_app.config['CLIENTS']['plutonium']['client_id'] apq = current_app.config['CLIENTS']['apq'] data = [] for permission in permissions: data.append({ 'client_namespace' : 'app', 'client_id' : payload['client_id'], 'resource_namespace' : resource_namespace, 'permission' : permission, 'resource_id' : resource_id or '*' }) signature = sign(client_key, json.dumps(data)) payload = { 'data' : json.dumps(data), 'client_id': client_id, 'signature': signature } apq = requests.get("http://%s/has_perm" % apq['host'], params=payload) permission = json.loads(apq.content) granted = [granted for granted in permission if granted == 'True'] if len(permission) != len(granted): raise HttpUnauthorized("You don't have enough permission to access this resource") result = f(*args, **kwargs) return result return decorated_function return decorator
Check for permission in apq
Check for permission in apq
Python
apache-2.0
PressLabs/lithium
python
## Code Before: import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign def require(resource_namespace, permissions, resource_id=None): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if request.method == 'GET': payload = request.args client_key = current_app.config['CLIENTS']['plutonium']['client_key'] client_id = current_app.config['CLIENTS']['plutonium']['client_id'] data = [] for permission in permissions: data.append({ 'client_namespace' : 'app', 'client_id' : payload['client_id'], 'resource_namespace' : resource_namespace, 'permission' : permission, 'resource_id' : resource_id or '*' }) result = f(*args, **kwargs) return result return decorated_function return decorator ## Instruction: Check for permission in apq ## Code After: import json import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign from utils.exceptions import HttpUnauthorized def require(resource_namespace, permissions, resource_id=None): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if request.method == 'GET': payload = request.args client_key = current_app.config['CLIENTS']['plutonium']['client_key'] client_id = current_app.config['CLIENTS']['plutonium']['client_id'] apq = current_app.config['CLIENTS']['apq'] data = [] for permission in permissions: data.append({ 'client_namespace' : 'app', 'client_id' : payload['client_id'], 'resource_namespace' : resource_namespace, 'permission' : permission, 'resource_id' : resource_id or '*' }) signature = sign(client_key, json.dumps(data)) payload = { 'data' : json.dumps(data), 'client_id': client_id, 'signature': signature } apq = requests.get("http://%s/has_perm" % apq['host'], params=payload) permission = json.loads(apq.content) granted = [granted for granted in permission if granted == 'True'] if len(permission) != len(granted): raise HttpUnauthorized("You don't have enough permission to access this resource") result = f(*args, **kwargs) return result return decorated_function return decorator
+ import json import requests from functools import wraps from flask import request, current_app from utils.decorators.signature import sign + from utils.exceptions import HttpUnauthorized def require(resource_namespace, permissions, resource_id=None): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if request.method == 'GET': payload = request.args client_key = current_app.config['CLIENTS']['plutonium']['client_key'] client_id = current_app.config['CLIENTS']['plutonium']['client_id'] + apq = current_app.config['CLIENTS']['apq'] data = [] for permission in permissions: data.append({ 'client_namespace' : 'app', 'client_id' : payload['client_id'], 'resource_namespace' : resource_namespace, 'permission' : permission, 'resource_id' : resource_id or '*' }) + signature = sign(client_key, json.dumps(data)) + payload = { + 'data' : json.dumps(data), + 'client_id': client_id, + 'signature': signature + } + + apq = requests.get("http://%s/has_perm" % apq['host'], params=payload) + + permission = json.loads(apq.content) + granted = [granted for granted in permission if granted == 'True'] + + if len(permission) != len(granted): + raise HttpUnauthorized("You don't have enough permission to access this resource") + result = f(*args, **kwargs) return result + return decorated_function return decorator
19
0.59375
19
0
056d880f90dc1e1a89ea5f349b6408337397650d
pkgs/applications/networking/cluster/helmfile/default.nix
pkgs/applications/networking/cluster/helmfile/default.nix
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm }: buildGoModule rec { pname = "helmfile"; version = "0.141.0"; src = fetchFromGitHub { owner = "roboll"; repo = "helmfile"; rev = "v${version}"; sha256 = "sha256-UwjV3xgnZa0Emzw4FP/+gHh1ES6MTihrrlGKUBH6O9Q="; }; vendorSha256 = "sha256-HKHMeDnIDmQ7AjuS2lYCMphTHGD1JgQuBYDJe2+PEk4="; doCheck = false; nativeBuildInputs = [ makeWrapper ]; subPackages = [ "." ]; ldflags = [ "-s" "-w" "-X github.com/roboll/helmfile/pkg/app/version.Version=${version}" ]; postInstall = '' wrapProgram $out/bin/helmfile \ --prefix PATH : ${lib.makeBinPath [ kubernetes-helm ]} ''; meta = { description = "Deploy Kubernetes Helm charts"; homepage = "https://github.com/roboll/helmfile"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pneumaticat yurrriq ]; platforms = lib.platforms.unix; }; }
{ lib, buildGoModule, fetchFromGitHub }: buildGoModule rec { pname = "helmfile"; version = "0.141.0"; src = fetchFromGitHub { owner = "roboll"; repo = "helmfile"; rev = "v${version}"; sha256 = "sha256-UwjV3xgnZa0Emzw4FP/+gHh1ES6MTihrrlGKUBH6O9Q="; }; vendorSha256 = "sha256-HKHMeDnIDmQ7AjuS2lYCMphTHGD1JgQuBYDJe2+PEk4="; doCheck = false; subPackages = [ "." ]; ldflags = [ "-s" "-w" "-X github.com/roboll/helmfile/pkg/app/version.Version=${version}" ]; meta = { description = "Deploy Kubernetes Helm charts"; homepage = "https://github.com/roboll/helmfile"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pneumaticat yurrriq ]; platforms = lib.platforms.unix; }; }
Stop prefixing PATH with kubernetes-helm
helmfile: Stop prefixing PATH with kubernetes-helm So helmfile will work with helm plugins wrapped by pkgs.wrapHelm: ``` { inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; helm = pkgs.wrapHelm pkgs.kubernetes-helm { plugins = with pkgs.kubernetes-helmPlugins; [ helm-diff helm-secrets ]; }; in { devShell = pkgs.mkShell { nativeBuildInputs = [ helm pkgs.helmfile ]; }; }); } ```
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs
nix
## Code Before: { lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm }: buildGoModule rec { pname = "helmfile"; version = "0.141.0"; src = fetchFromGitHub { owner = "roboll"; repo = "helmfile"; rev = "v${version}"; sha256 = "sha256-UwjV3xgnZa0Emzw4FP/+gHh1ES6MTihrrlGKUBH6O9Q="; }; vendorSha256 = "sha256-HKHMeDnIDmQ7AjuS2lYCMphTHGD1JgQuBYDJe2+PEk4="; doCheck = false; nativeBuildInputs = [ makeWrapper ]; subPackages = [ "." ]; ldflags = [ "-s" "-w" "-X github.com/roboll/helmfile/pkg/app/version.Version=${version}" ]; postInstall = '' wrapProgram $out/bin/helmfile \ --prefix PATH : ${lib.makeBinPath [ kubernetes-helm ]} ''; meta = { description = "Deploy Kubernetes Helm charts"; homepage = "https://github.com/roboll/helmfile"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pneumaticat yurrriq ]; platforms = lib.platforms.unix; }; } ## Instruction: helmfile: Stop prefixing PATH with kubernetes-helm So helmfile will work with helm plugins wrapped by pkgs.wrapHelm: ``` { inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; helm = pkgs.wrapHelm pkgs.kubernetes-helm { plugins = with pkgs.kubernetes-helmPlugins; [ helm-diff helm-secrets ]; }; in { devShell = pkgs.mkShell { nativeBuildInputs = [ helm pkgs.helmfile ]; }; }); } ``` ## Code After: { lib, buildGoModule, fetchFromGitHub }: buildGoModule rec { pname = "helmfile"; version = "0.141.0"; src = fetchFromGitHub { owner = "roboll"; repo = "helmfile"; rev = "v${version}"; sha256 = "sha256-UwjV3xgnZa0Emzw4FP/+gHh1ES6MTihrrlGKUBH6O9Q="; }; vendorSha256 = "sha256-HKHMeDnIDmQ7AjuS2lYCMphTHGD1JgQuBYDJe2+PEk4="; doCheck = false; subPackages = [ "." ]; ldflags = [ "-s" "-w" "-X github.com/roboll/helmfile/pkg/app/version.Version=${version}" ]; meta = { description = "Deploy Kubernetes Helm charts"; homepage = "https://github.com/roboll/helmfile"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pneumaticat yurrriq ]; platforms = lib.platforms.unix; }; }
- { lib, buildGoModule, fetchFromGitHub, makeWrapper, kubernetes-helm }: + { lib, buildGoModule, fetchFromGitHub }: buildGoModule rec { pname = "helmfile"; version = "0.141.0"; src = fetchFromGitHub { owner = "roboll"; repo = "helmfile"; rev = "v${version}"; sha256 = "sha256-UwjV3xgnZa0Emzw4FP/+gHh1ES6MTihrrlGKUBH6O9Q="; }; vendorSha256 = "sha256-HKHMeDnIDmQ7AjuS2lYCMphTHGD1JgQuBYDJe2+PEk4="; doCheck = false; - nativeBuildInputs = [ makeWrapper ]; - subPackages = [ "." ]; ldflags = [ "-s" "-w" "-X github.com/roboll/helmfile/pkg/app/version.Version=${version}" ]; - - postInstall = '' - wrapProgram $out/bin/helmfile \ - --prefix PATH : ${lib.makeBinPath [ kubernetes-helm ]} - ''; meta = { description = "Deploy Kubernetes Helm charts"; homepage = "https://github.com/roboll/helmfile"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pneumaticat yurrriq ]; platforms = lib.platforms.unix; }; }
9
0.25
1
8
d927ada17522edfb91489e8558bbc88ff741a3c5
bokeh/models/widgets/markups.py
bokeh/models/widgets/markups.py
from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" The contents of the widget. """) width = Int(500, help=""" The width of the block in pixels. """) height = Int(400, help=""" The height of the block in pixels. """) class PreText(Paragraph): """ A block (paragraph) of pre-formatted text. """
from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget @abstract class Markup(Widget): """ Base class for HTML markup widget models. """ class Paragraph(Markup): """ A block (paragraph) of text. """ text = String(help=""" The contents of the widget. """) width = Int(500, help=""" The width of the block in pixels. """) height = Int(400, help=""" The height of the block in pixels. """) class PreText(Paragraph): """ A block (paragraph) of pre-formatted text. """
Introduce Markup abstract base class
Introduce Markup abstract base class
Python
bsd-3-clause
aiguofer/bokeh,jakirkham/bokeh,ChinaQuants/bokeh,percyfal/bokeh,bokeh/bokeh,philippjfr/bokeh,philippjfr/bokeh,stonebig/bokeh,percyfal/bokeh,muku42/bokeh,DuCorey/bokeh,muku42/bokeh,ericmjl/bokeh,azjps/bokeh,muku42/bokeh,percyfal/bokeh,philippjfr/bokeh,msarahan/bokeh,deeplook/bokeh,Karel-van-de-Plassche/bokeh,htygithub/bokeh,philippjfr/bokeh,justacec/bokeh,schoolie/bokeh,jplourenco/bokeh,evidation-health/bokeh,srinathv/bokeh,tacaswell/bokeh,ptitjano/bokeh,dennisobrien/bokeh,dennisobrien/bokeh,quasiben/bokeh,ChinaQuants/bokeh,clairetang6/bokeh,khkaminska/bokeh,evidation-health/bokeh,quasiben/bokeh,Karel-van-de-Plassche/bokeh,DuCorey/bokeh,maxalbert/bokeh,rs2/bokeh,schoolie/bokeh,timsnyder/bokeh,msarahan/bokeh,deeplook/bokeh,jplourenco/bokeh,azjps/bokeh,stonebig/bokeh,khkaminska/bokeh,ericmjl/bokeh,aiguofer/bokeh,msarahan/bokeh,mindriot101/bokeh,dennisobrien/bokeh,gpfreitas/bokeh,htygithub/bokeh,maxalbert/bokeh,percyfal/bokeh,timsnyder/bokeh,draperjames/bokeh,aavanian/bokeh,evidation-health/bokeh,mindriot101/bokeh,Karel-van-de-Plassche/bokeh,aavanian/bokeh,clairetang6/bokeh,phobson/bokeh,ericmjl/bokeh,evidation-health/bokeh,rs2/bokeh,draperjames/bokeh,jplourenco/bokeh,ptitjano/bokeh,schoolie/bokeh,ptitjano/bokeh,maxalbert/bokeh,justacec/bokeh,ChinaQuants/bokeh,ptitjano/bokeh,srinathv/bokeh,bokeh/bokeh,phobson/bokeh,azjps/bokeh,bokeh/bokeh,percyfal/bokeh,deeplook/bokeh,phobson/bokeh,mindriot101/bokeh,maxalbert/bokeh,tacaswell/bokeh,muku42/bokeh,jakirkham/bokeh,mindriot101/bokeh,justacec/bokeh,ericmjl/bokeh,deeplook/bokeh,jakirkham/bokeh,htygithub/bokeh,tacaswell/bokeh,gpfreitas/bokeh,srinathv/bokeh,draperjames/bokeh,aavanian/bokeh,khkaminska/bokeh,bokeh/bokeh,KasperPRasmussen/bokeh,azjps/bokeh,azjps/bokeh,timsnyder/bokeh,schoolie/bokeh,justacec/bokeh,philippjfr/bokeh,KasperPRasmussen/bokeh,ChinaQuants/bokeh,DuCorey/bokeh,stonebig/bokeh,tacaswell/bokeh,schoolie/bokeh,rs2/bokeh,phobson/bokeh,phobson/bokeh,aiguofer/bokeh,khkaminska/bokeh,clairetang6/bokeh,Karel-van-de-Plassche/bokeh,htygithub/bokeh,dennisobrien/bokeh,srinathv/bokeh,dennisobrien/bokeh,draperjames/bokeh,aavanian/bokeh,gpfreitas/bokeh,KasperPRasmussen/bokeh,clairetang6/bokeh,ptitjano/bokeh,Karel-van-de-Plassche/bokeh,draperjames/bokeh,KasperPRasmussen/bokeh,rs2/bokeh,jakirkham/bokeh,DuCorey/bokeh,DuCorey/bokeh,aavanian/bokeh,aiguofer/bokeh,ericmjl/bokeh,msarahan/bokeh,rs2/bokeh,timsnyder/bokeh,quasiben/bokeh,jakirkham/bokeh,gpfreitas/bokeh,aiguofer/bokeh,KasperPRasmussen/bokeh,stonebig/bokeh,bokeh/bokeh,timsnyder/bokeh,jplourenco/bokeh
python
## Code Before: from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget class Paragraph(Widget): """ A block (paragraph) of text. """ text = String(help=""" The contents of the widget. """) width = Int(500, help=""" The width of the block in pixels. """) height = Int(400, help=""" The height of the block in pixels. """) class PreText(Paragraph): """ A block (paragraph) of pre-formatted text. """ ## Instruction: Introduce Markup abstract base class ## Code After: from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget @abstract class Markup(Widget): """ Base class for HTML markup widget models. """ class Paragraph(Markup): """ A block (paragraph) of text. """ text = String(help=""" The contents of the widget. """) width = Int(500, help=""" The width of the block in pixels. """) height = Int(400, help=""" The height of the block in pixels. """) class PreText(Paragraph): """ A block (paragraph) of pre-formatted text. """
from __future__ import absolute_import from ...properties import abstract from ...properties import Int, String from ..widget import Widget + @abstract - class Paragraph(Widget): ? ^ ^^^^ - + class Markup(Widget): ? ^ ^^ + """ Base class for HTML markup widget models. """ + + class Paragraph(Markup): """ A block (paragraph) of text. """ text = String(help=""" The contents of the widget. """) width = Int(500, help=""" The width of the block in pixels. """) height = Int(400, help=""" The height of the block in pixels. """) class PreText(Paragraph): """ A block (paragraph) of pre-formatted text. """
6
0.214286
5
1
ff88da4db0c0a516db4a229c7acca3f2fd6acb7e
project.clj
project.clj
(defproject funcool/suricatta "0.6.1" :description "High level sql toolkit for clojure (backed by jooq library)" :url "https://github.com/funcool/suricatta" :license {:name "BSD (2-Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} :dependencies [[org.clojure/clojure "1.8.0-RC1" :scope "provided"] [org.jooq/jooq "3.7.1"]] ;; :jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"] :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"] :profiles {:dev {:global-vars {*warn-on-reflection* false} :plugins [[lein-ancient "0.6.7"]] :dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"] [com.h2database/h2 "1.4.190"] [cheshire "5.5.0"]]}} :java-source-paths ["src/java"])
(defproject funcool/suricatta "0.6.1" :description "High level sql toolkit for clojure (backed by jooq library)" :url "https://github.com/funcool/suricatta" :license {:name "BSD (2-Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"] [org.jooq/jooq "3.7.2"]] ;; :jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"] :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"] :profiles {:dev {:global-vars {*warn-on-reflection* false} :aliases {"test-all" ["with-profile" "dev,1.8:dev,1.6:dev,1.5:dev" "test"]} :plugins [[lein-ancient "0.6.7"]] :dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"] [com.h2database/h2 "1.4.190"] [cheshire "5.5.0"]]} :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0-RC4"]]}} :java-source-paths ["src/java"])
Update jooq version to 3.7.2
Update jooq version to 3.7.2
Clojure
bsd-2-clause
funcool/suricatta
clojure
## Code Before: (defproject funcool/suricatta "0.6.1" :description "High level sql toolkit for clojure (backed by jooq library)" :url "https://github.com/funcool/suricatta" :license {:name "BSD (2-Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} :dependencies [[org.clojure/clojure "1.8.0-RC1" :scope "provided"] [org.jooq/jooq "3.7.1"]] ;; :jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"] :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"] :profiles {:dev {:global-vars {*warn-on-reflection* false} :plugins [[lein-ancient "0.6.7"]] :dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"] [com.h2database/h2 "1.4.190"] [cheshire "5.5.0"]]}} :java-source-paths ["src/java"]) ## Instruction: Update jooq version to 3.7.2 ## Code After: (defproject funcool/suricatta "0.6.1" :description "High level sql toolkit for clojure (backed by jooq library)" :url "https://github.com/funcool/suricatta" :license {:name "BSD (2-Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"] [org.jooq/jooq "3.7.2"]] ;; :jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"] :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"] :profiles {:dev {:global-vars {*warn-on-reflection* false} :aliases {"test-all" ["with-profile" "dev,1.8:dev,1.6:dev,1.5:dev" "test"]} :plugins [[lein-ancient "0.6.7"]] :dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"] [com.h2database/h2 "1.4.190"] [cheshire "5.5.0"]]} :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} :1.8 {:dependencies [[org.clojure/clojure "1.8.0-RC4"]]}} :java-source-paths ["src/java"])
(defproject funcool/suricatta "0.6.1" :description "High level sql toolkit for clojure (backed by jooq library)" :url "https://github.com/funcool/suricatta" :license {:name "BSD (2-Clause)" :url "http://opensource.org/licenses/BSD-2-Clause"} - :dependencies [[org.clojure/clojure "1.8.0-RC1" :scope "provided"] ? ^ ---- + :dependencies [[org.clojure/clojure "1.7.0" :scope "provided"] ? ^ - [org.jooq/jooq "3.7.1"]] ? ^ + [org.jooq/jooq "3.7.2"]] ? ^ ;; :jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"] :javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"] + :profiles - :profiles {:dev {:global-vars {*warn-on-reflection* false} ? ---------- + {:dev {:global-vars {*warn-on-reflection* false} + :aliases {"test-all" ["with-profile" "dev,1.8:dev,1.6:dev,1.5:dev" "test"]} - :plugins [[lein-ancient "0.6.7"]] ? ---------- + :plugins [[lein-ancient "0.6.7"]] - :dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"] ? ---------- + :dependencies [[org.postgresql/postgresql "9.4-1204-jdbc42"] - [com.h2database/h2 "1.4.190"] ? ---------- + [com.h2database/h2 "1.4.190"] - [cheshire "5.5.0"]]}} ? ---------- - + [cheshire "5.5.0"]]} + :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} + :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} + :1.8 {:dependencies [[org.clojure/clojure "1.8.0-RC4"]]}} + :java-source-paths ["src/java"])
20
1.25
13
7
a5cdb46a511bda985f6121c36a7b17393b5edc8a
seax-svm/src/lib.rs
seax-svm/src/lib.rs
fn it_works() { } mod SVM { /// Singly-linked cons list. /// /// This is used internally to represent list primitives in the machine. pub enum List<T> { Cons(T ~List<T>), Nil } /// Public implementation for List. pub impl List<T> { pub fn new() -> List<T> { Nil } } enum Exp { Number(int) } struct Engine { stack: Vec<Exp> } }
fn it_works() { } mod SVM { /// Singly-linked cons list. /// /// This is used internally to represent list primitives in the machine. pub enum List<T> { Nil, Cons(T, List<T>) } /// Public implementation for List. impl<T> List<T> { fn new() -> List<T> { Nil } } enum Exp { Number(i32) } struct Engine { stack: Vec<Exp> } }
Use strict size for num expression
Use strict size for num expression
Rust
mit
hawkw/seax,hawkw/seax
rust
## Code Before: fn it_works() { } mod SVM { /// Singly-linked cons list. /// /// This is used internally to represent list primitives in the machine. pub enum List<T> { Cons(T ~List<T>), Nil } /// Public implementation for List. pub impl List<T> { pub fn new() -> List<T> { Nil } } enum Exp { Number(int) } struct Engine { stack: Vec<Exp> } } ## Instruction: Use strict size for num expression ## Code After: fn it_works() { } mod SVM { /// Singly-linked cons list. /// /// This is used internally to represent list primitives in the machine. pub enum List<T> { Nil, Cons(T, List<T>) } /// Public implementation for List. impl<T> List<T> { fn new() -> List<T> { Nil } } enum Exp { Number(i32) } struct Engine { stack: Vec<Exp> } }
fn it_works() { } mod SVM { /// Singly-linked cons list. /// /// This is used internally to represent list primitives in the machine. pub enum List<T> { - Cons(T ~List<T>), - Nil + Nil, ? + + Cons(T, List<T>) } /// Public implementation for List. - pub impl List<T> { ? ---- + impl<T> List<T> { ? +++ - pub fn new() -> List<T> { ? ---- + fn new() -> List<T> { Nil } } enum Exp { - Number(int) ? ^^ + Number(i32) ? ^^ } struct Engine { stack: Vec<Exp> } }
10
0.333333
5
5
f847860207170750f126d07d7bb3a02d256a6810
.travis.yml
.travis.yml
language: node_js node_js: - "7" - "node" before_script: - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz - tar xvf ffmpeg-release-64bit-static.tar.xz - mv ffmpeg-*.*.*-64bit-static ffmpeg - export PATH=$PATH:$PWD/ffmpeg
language: node_js node_js: - "7" - "node" before_script: - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz - tar xvf ffmpeg-release-amd64-static.tar.xz - mv ffmpeg-*.*.*-amd64-static ffmpeg - export PATH=$PATH:$PWD/ffmpeg
Update Travis CI ffmpeg binary
Update Travis CI ffmpeg binary
YAML
mit
tonistiigi/audiosprite
yaml
## Code Before: language: node_js node_js: - "7" - "node" before_script: - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz - tar xvf ffmpeg-release-64bit-static.tar.xz - mv ffmpeg-*.*.*-64bit-static ffmpeg - export PATH=$PATH:$PWD/ffmpeg ## Instruction: Update Travis CI ffmpeg binary ## Code After: language: node_js node_js: - "7" - "node" before_script: - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz - tar xvf ffmpeg-release-amd64-static.tar.xz - mv ffmpeg-*.*.*-amd64-static ffmpeg - export PATH=$PATH:$PWD/ffmpeg
language: node_js node_js: - "7" - "node" before_script: - - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz ? --- + - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz ? +++ - - tar xvf ffmpeg-release-64bit-static.tar.xz ? --- + - tar xvf ffmpeg-release-amd64-static.tar.xz ? +++ - - mv ffmpeg-*.*.*-64bit-static ffmpeg ? --- + - mv ffmpeg-*.*.*-amd64-static ffmpeg ? +++ - export PATH=$PATH:$PWD/ffmpeg
6
0.6
3
3
d93dc10854092a8d3b5506f6ef1a9f49056afd62
lib/redtape.rb
lib/redtape.rb
require "redtape/version" require 'active_model' module Redtape class Form extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :model_accessors validate :models_correct def self.validates_and_saves(*args) attr_accessor *args @@model_accessors = args end def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end def models_correct @@model_accessors.each do |accessor| begin model = send(accessor) if model.invalid? own_your_errors_in(model) end rescue MethodMissingError => e fail MethodMissing Error, "#{self.class} is missing 'validates_and_saves :#{accessor}'" end end end # Forms are never themselves persisted def persisted? false end def save populate if valid? persist! else false end end def persist! @@model_accessors.each do |accessor| model = send(accessor) unless model.save return false end end true end def populate fail NotImplementedError, "Implement #populate in your subclass" end private def own_your_errors_in(model) model.errors.each do |k, v| errors.add(k, v) end end end end
require "redtape/version" require 'active_model' module Redtape class Form extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :model_accessors validate :models_correct def self.validates_and_saves(*args) attr_accessor *args @@model_accessors = args end def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end def models_correct @@model_accessors.each do |accessor| begin model = send(accessor) if model.invalid? own_your_errors_in(model) end rescue NoMethodError => e fail NoMethodError, "#{self.class} is missing 'validates_and_saves :#{accessor}': #{e}" end end end # Forms are never themselves persisted def persisted? false end def save populate if valid? persist! else false end end def persist! @@model_accessors.each do |accessor| model = send(accessor) unless model.save return false end end true end def populate fail NotImplementedError, "Implement #populate in your subclass" end private def own_your_errors_in(model) model.errors.each do |k, v| errors.add(k, v) end end end end
Fix exception handling for missing methods.
Fix exception handling for missing methods.
Ruby
mit
ClearFit/redtape
ruby
## Code Before: require "redtape/version" require 'active_model' module Redtape class Form extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :model_accessors validate :models_correct def self.validates_and_saves(*args) attr_accessor *args @@model_accessors = args end def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end def models_correct @@model_accessors.each do |accessor| begin model = send(accessor) if model.invalid? own_your_errors_in(model) end rescue MethodMissingError => e fail MethodMissing Error, "#{self.class} is missing 'validates_and_saves :#{accessor}'" end end end # Forms are never themselves persisted def persisted? false end def save populate if valid? persist! else false end end def persist! @@model_accessors.each do |accessor| model = send(accessor) unless model.save return false end end true end def populate fail NotImplementedError, "Implement #populate in your subclass" end private def own_your_errors_in(model) model.errors.each do |k, v| errors.add(k, v) end end end end ## Instruction: Fix exception handling for missing methods. ## Code After: require "redtape/version" require 'active_model' module Redtape class Form extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :model_accessors validate :models_correct def self.validates_and_saves(*args) attr_accessor *args @@model_accessors = args end def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end def models_correct @@model_accessors.each do |accessor| begin model = send(accessor) if model.invalid? own_your_errors_in(model) end rescue NoMethodError => e fail NoMethodError, "#{self.class} is missing 'validates_and_saves :#{accessor}': #{e}" end end end # Forms are never themselves persisted def persisted? false end def save populate if valid? persist! else false end end def persist! @@model_accessors.each do |accessor| model = send(accessor) unless model.save return false end end true end def populate fail NotImplementedError, "Implement #populate in your subclass" end private def own_your_errors_in(model) model.errors.each do |k, v| errors.add(k, v) end end end end
require "redtape/version" require 'active_model' module Redtape class Form extend ActiveModel::Naming include ActiveModel::Conversion include ActiveModel::Validations attr_accessor :model_accessors validate :models_correct def self.validates_and_saves(*args) attr_accessor *args @@model_accessors = args end def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end def models_correct @@model_accessors.each do |accessor| begin model = send(accessor) if model.invalid? own_your_errors_in(model) end - rescue MethodMissingError => e ? ------- + rescue NoMethodError => e ? ++ - fail MethodMissing Error, "#{self.class} is missing 'validates_and_saves :#{accessor}'" ? -------- + fail NoMethodError, "#{self.class} is missing 'validates_and_saves :#{accessor}': #{e}" ? ++ ++++++ end end end # Forms are never themselves persisted def persisted? false end def save populate if valid? persist! else false end end def persist! @@model_accessors.each do |accessor| model = send(accessor) unless model.save return false end end true end def populate fail NotImplementedError, "Implement #populate in your subclass" end private def own_your_errors_in(model) model.errors.each do |k, v| errors.add(k, v) end end end end
4
0.053333
2
2
ae693c0a94159ab2ac7c1e90ef62a9b24da5c7ea
spline/templates/base-footer.mako
spline/templates/base-footer.mako
<%! from spline import i18n %> <div id="footer-timer"> ${_('Rendered in %s seconds') % h.timedelta_seconds(c.timer.total_time)} <br> ${_( '{queries} SQL {q} in {time:.02f} seconds', '{queries} SQL {q} in {time:.02f} seconds', n=c.timer.sql_queries ).format( queries=c.timer.sql_queries, time=h.timedelta_seconds(c.timer.sql_time), q=_('query', 'queries', n=c.timer.sql_queries), )} </div> <p> ${_('Powered by Spline')} </p> <p> ${h.literal(_('Fugue icon set by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a>; country flags by <a href="http://www.famfamfam.com/lab/icons/flags/">famfamfam</a>'))} </p>
<%! from spline import i18n %> <div id="footer-timer"> ${_('Rendered in %s seconds') % h.timedelta_seconds(c.timer.total_time)} <br> ${_( '{queries} SQL query in {time:.02f} seconds', '{queries} SQL queries in {time:.02f} seconds', n=c.timer.sql_queries ).format( queries=c.timer.sql_queries, time=h.timedelta_seconds(c.timer.sql_time), )} </div> <p> ${_('Powered by Spline')} </p> <p> ${h.literal(_('Fugue icon set by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a>; country flags by <a href="http://www.famfamfam.com/lab/icons/flags/">famfamfam</a>'))} </p>
Handle plurals properly in the footer
Handle plurals properly in the footer
Mako
mit
veekun/spline,veekun/spline
mako
## Code Before: <%! from spline import i18n %> <div id="footer-timer"> ${_('Rendered in %s seconds') % h.timedelta_seconds(c.timer.total_time)} <br> ${_( '{queries} SQL {q} in {time:.02f} seconds', '{queries} SQL {q} in {time:.02f} seconds', n=c.timer.sql_queries ).format( queries=c.timer.sql_queries, time=h.timedelta_seconds(c.timer.sql_time), q=_('query', 'queries', n=c.timer.sql_queries), )} </div> <p> ${_('Powered by Spline')} </p> <p> ${h.literal(_('Fugue icon set by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a>; country flags by <a href="http://www.famfamfam.com/lab/icons/flags/">famfamfam</a>'))} </p> ## Instruction: Handle plurals properly in the footer ## Code After: <%! from spline import i18n %> <div id="footer-timer"> ${_('Rendered in %s seconds') % h.timedelta_seconds(c.timer.total_time)} <br> ${_( '{queries} SQL query in {time:.02f} seconds', '{queries} SQL queries in {time:.02f} seconds', n=c.timer.sql_queries ).format( queries=c.timer.sql_queries, time=h.timedelta_seconds(c.timer.sql_time), )} </div> <p> ${_('Powered by Spline')} </p> <p> ${h.literal(_('Fugue icon set by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a>; country flags by <a href="http://www.famfamfam.com/lab/icons/flags/">famfamfam</a>'))} </p>
<%! from spline import i18n %> <div id="footer-timer"> ${_('Rendered in %s seconds') % h.timedelta_seconds(c.timer.total_time)} <br> ${_( - '{queries} SQL {q} in {time:.02f} seconds', ? - ^ + '{queries} SQL query in {time:.02f} seconds', ? ^^^^ - '{queries} SQL {q} in {time:.02f} seconds', ? - ^ + '{queries} SQL queries in {time:.02f} seconds', ? ^^^^^^ n=c.timer.sql_queries ).format( queries=c.timer.sql_queries, time=h.timedelta_seconds(c.timer.sql_time), - q=_('query', 'queries', n=c.timer.sql_queries), )} </div> <p> ${_('Powered by Spline')} </p> <p> ${h.literal(_('Fugue icon set by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a>; country flags by <a href="http://www.famfamfam.com/lab/icons/flags/">famfamfam</a>'))} </p>
5
0.294118
2
3
2d08810d3024d8feedb83b4913df69479e45a48b
src/ui/home.html
src/ui/home.html
<!doctype html> <html> <head> <title>Glasswing</title> </head> <body> <div class="container"> <h1>Glasswing</h1> <link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" /> <style> .file-links { width: 100%; line-height: 24px; } .file-links td { border: 1px solid #ccc; padding: 2px; } .file-links tr:nth-child(even) td { background: #f7f7f7; } </style> <div id="content"> <a href="https://chrome.google.com/webstore/detail/glasswing/iekajjdehjleoneeigjaefcfelojimfl">Chrome extension</a> <br><br> <h3 style="font-weight: normal">Browse these JS files: </h3> {{fileLinks}} </div> <script> if (!window.chrome) { document.querySelector("#content").innerHTML= "Please open this page in Chrome." } </script> </div> </body> </html>
<!doctype html> <html> <head> <title>Glasswing</title> </head> <body> <div class="container"> <h1>Glasswing</h1> <link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" /> <style> .file-links { width: 100%; line-height: 24px; word-break: break-all; } .file-links td { border: 1px solid #ccc; padding: 2px; } .file-links tr:nth-child(even) td { background: #f7f7f7; } </style> <div id="content"> <a href="https://chrome.google.com/webstore/detail/glasswing/iekajjdehjleoneeigjaefcfelojimfl">Chrome extension</a> <br><br> <h3 style="font-weight: normal">Browse these JS files: </h3> {{fileLinks}} </div> <script> if (!window.chrome) { document.querySelector("#content").innerHTML= "Please open this page in Chrome." } </script> </div> </body> </html>
Improve how long URLs are displayed.
Improve how long URLs are displayed.
HTML
mit
mattzeunert/glasswing,mattzeunert/glasswing,mattzeunert/glasswing
html
## Code Before: <!doctype html> <html> <head> <title>Glasswing</title> </head> <body> <div class="container"> <h1>Glasswing</h1> <link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" /> <style> .file-links { width: 100%; line-height: 24px; } .file-links td { border: 1px solid #ccc; padding: 2px; } .file-links tr:nth-child(even) td { background: #f7f7f7; } </style> <div id="content"> <a href="https://chrome.google.com/webstore/detail/glasswing/iekajjdehjleoneeigjaefcfelojimfl">Chrome extension</a> <br><br> <h3 style="font-weight: normal">Browse these JS files: </h3> {{fileLinks}} </div> <script> if (!window.chrome) { document.querySelector("#content").innerHTML= "Please open this page in Chrome." } </script> </div> </body> </html> ## Instruction: Improve how long URLs are displayed. ## Code After: <!doctype html> <html> <head> <title>Glasswing</title> </head> <body> <div class="container"> <h1>Glasswing</h1> <link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" /> <style> .file-links { width: 100%; line-height: 24px; word-break: break-all; } .file-links td { border: 1px solid #ccc; padding: 2px; } .file-links tr:nth-child(even) td { background: #f7f7f7; } </style> <div id="content"> <a href="https://chrome.google.com/webstore/detail/glasswing/iekajjdehjleoneeigjaefcfelojimfl">Chrome extension</a> <br><br> <h3 style="font-weight: normal">Browse these JS files: </h3> {{fileLinks}} </div> <script> if (!window.chrome) { document.querySelector("#content").innerHTML= "Please open this page in Chrome." } </script> </div> </body> </html>
<!doctype html> <html> <head> <title>Glasswing</title> </head> <body> <div class="container"> <h1>Glasswing</h1> <link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" /> <style> .file-links { width: 100%; line-height: 24px; + word-break: break-all; } .file-links td { border: 1px solid #ccc; padding: 2px; } .file-links tr:nth-child(even) td { background: #f7f7f7; } </style> <div id="content"> <a href="https://chrome.google.com/webstore/detail/glasswing/iekajjdehjleoneeigjaefcfelojimfl">Chrome extension</a> <br><br> <h3 style="font-weight: normal">Browse these JS files: </h3> {{fileLinks}} </div> <script> if (!window.chrome) { document.querySelector("#content").innerHTML= "Please open this page in Chrome." } </script> </div> </body> </html>
1
0.025
1
0
c96f0a8ecab245a61276d3fa04ad43f0e18310bf
client/app/styles/app.scss
client/app/styles/app.scss
body { padding-top: 60px; } a { cursor: pointer; } .leaflet-container { height: 400px; } .ui.form .divider { margin: 3em 0; } /* Semantic UI */ .field { .help { font-size: 0.92857143em; margin-top: 0.28571429rem; opacity: .8; } } // Move fixed menu above loading dimmer which has z-index 1000 .ui.menu.fixed { z-index: 1001; }
body { padding-top: 60px; } a { cursor: pointer; } .leaflet-container { height: 400px; } .ui.form .divider { margin: 3em 0; } /* Semantic UI */ // Keep border radius on right side if not action button is attached to the left side .ui.action.input:not([class*="left action"]) > .dropdown { border-radius: 0.28571429rem 0px 0px 0.28571429rem; } .field { .help { font-size: 0.92857143em; margin-top: 0.28571429rem; opacity: .8; } } // Move fixed menu above loading dimmer which has z-index 1000 .ui.menu.fixed { z-index: 1001; }
Add css for attaching button on the right side of dropdowns
Add css for attaching button on the right side of dropdowns
SCSS
mit
Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin
scss
## Code Before: body { padding-top: 60px; } a { cursor: pointer; } .leaflet-container { height: 400px; } .ui.form .divider { margin: 3em 0; } /* Semantic UI */ .field { .help { font-size: 0.92857143em; margin-top: 0.28571429rem; opacity: .8; } } // Move fixed menu above loading dimmer which has z-index 1000 .ui.menu.fixed { z-index: 1001; } ## Instruction: Add css for attaching button on the right side of dropdowns ## Code After: body { padding-top: 60px; } a { cursor: pointer; } .leaflet-container { height: 400px; } .ui.form .divider { margin: 3em 0; } /* Semantic UI */ // Keep border radius on right side if not action button is attached to the left side .ui.action.input:not([class*="left action"]) > .dropdown { border-radius: 0.28571429rem 0px 0px 0.28571429rem; } .field { .help { font-size: 0.92857143em; margin-top: 0.28571429rem; opacity: .8; } } // Move fixed menu above loading dimmer which has z-index 1000 .ui.menu.fixed { z-index: 1001; }
body { padding-top: 60px; } a { cursor: pointer; } .leaflet-container { height: 400px; } .ui.form .divider { margin: 3em 0; } /* Semantic UI */ + // Keep border radius on right side if not action button is attached to the left side + .ui.action.input:not([class*="left action"]) > .dropdown { + border-radius: 0.28571429rem 0px 0px 0.28571429rem; + } + .field { .help { font-size: 0.92857143em; margin-top: 0.28571429rem; opacity: .8; } } // Move fixed menu above loading dimmer which has z-index 1000 .ui.menu.fixed { z-index: 1001; }
5
0.166667
5
0
84d1ac3d161aeee83c7153edb74b2d438c1874a3
app/templates/space/user_channel.hbs
app/templates/space/user_channel.hbs
<ChannelContainer @channel={{this.model}} @showChannelMenu={{this.showChannelMenu}} @newMessage={{this.newMessage}} @onMessage={{fn this.sendMessage}} @onCommand={{fn this.executeCommand}} @onMenu={{fn this.menu}} />
<ChannelContainer @channel={{this.model}} @space={{this.currentSpace}} @newMessage={{this.newMessage}} @showChannelMenu={{this.showChannelMenu}} @addUsernameMentionToMessage={{fn this.addUsernameMentionToMessage}} @onMessage={{fn this.sendMessage}} @onCommand={{fn this.executeCommand}} @onLeaveChannel={{route-action "leaveChannel"}} @onMenu={{fn this.menu}} @sidebarClass={{this.sidebarClass}} />
Add missing arguments to ChannelContainer for DM channel
Add missing arguments to ChannelContainer for DM channel Fixes #214 This fixes a few undefined/not a function errors.
Handlebars
mpl-2.0
67P/hyperchannel,67P/hyperchannel
handlebars
## Code Before: <ChannelContainer @channel={{this.model}} @showChannelMenu={{this.showChannelMenu}} @newMessage={{this.newMessage}} @onMessage={{fn this.sendMessage}} @onCommand={{fn this.executeCommand}} @onMenu={{fn this.menu}} /> ## Instruction: Add missing arguments to ChannelContainer for DM channel Fixes #214 This fixes a few undefined/not a function errors. ## Code After: <ChannelContainer @channel={{this.model}} @space={{this.currentSpace}} @newMessage={{this.newMessage}} @showChannelMenu={{this.showChannelMenu}} @addUsernameMentionToMessage={{fn this.addUsernameMentionToMessage}} @onMessage={{fn this.sendMessage}} @onCommand={{fn this.executeCommand}} @onLeaveChannel={{route-action "leaveChannel"}} @onMenu={{fn this.menu}} @sidebarClass={{this.sidebarClass}} />
<ChannelContainer @channel={{this.model}} + @space={{this.currentSpace}} + @newMessage={{this.newMessage}} @showChannelMenu={{this.showChannelMenu}} - @newMessage={{this.newMessage}} + @addUsernameMentionToMessage={{fn this.addUsernameMentionToMessage}} @onMessage={{fn this.sendMessage}} @onCommand={{fn this.executeCommand}} + @onLeaveChannel={{route-action "leaveChannel"}} - @onMenu={{fn this.menu}} /> ? --- + @onMenu={{fn this.menu}} + @sidebarClass={{this.sidebarClass}} />
8
1.333333
6
2
c87743d9e2a159fb3bc38e3d2ffda131bd54273a
.travis.yml
.travis.yml
sudo: required dist: trusty language: c compiler: - clang - gcc before_script: - sudo apt-get update -qq - sudo apt-get install -qq autoconf libcurl4-openssl-dev automake libtool lcov before_install: - gem install coveralls-lcov script: - ./autogen.sh && ./configure --enable-urls --enable-coverage && make && make clean clean-coverage coverage-lcov after_success: - lcov --list coverage.info - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
language: c compiler: - clang - gcc before_script: - sudo apt-get update -qq - sudo apt-get install -qq autoconf libcurl4-openssl-dev automake libtool lcov before_install: - gem install coveralls-lcov script: - ./autogen.sh && ./configure --enable-urls --enable-coverage && make && make clean clean-coverage coverage-lcov after_success: - lcov --list coverage.info - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
Disable trusty: OOM on tests
Disable trusty: OOM on tests
YAML
bsd-2-clause
fichtner/libucl,allanjude/libucl,vstakhov/libucl,vstakhov/libucl,fichtner/libucl,allanjude/libucl,vstakhov/libucl,allanjude/libucl,allanjude/libucl,fichtner/libucl,allanjude/libucl,vstakhov/libucl,fichtner/libucl,vstakhov/libucl,fichtner/libucl
yaml
## Code Before: sudo: required dist: trusty language: c compiler: - clang - gcc before_script: - sudo apt-get update -qq - sudo apt-get install -qq autoconf libcurl4-openssl-dev automake libtool lcov before_install: - gem install coveralls-lcov script: - ./autogen.sh && ./configure --enable-urls --enable-coverage && make && make clean clean-coverage coverage-lcov after_success: - lcov --list coverage.info - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info ## Instruction: Disable trusty: OOM on tests ## Code After: language: c compiler: - clang - gcc before_script: - sudo apt-get update -qq - sudo apt-get install -qq autoconf libcurl4-openssl-dev automake libtool lcov before_install: - gem install coveralls-lcov script: - ./autogen.sh && ./configure --enable-urls --enable-coverage && make && make clean clean-coverage coverage-lcov after_success: - lcov --list coverage.info - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
- sudo: required - dist: trusty language: c compiler: - clang - gcc before_script: - sudo apt-get update -qq - sudo apt-get install -qq autoconf libcurl4-openssl-dev automake libtool lcov before_install: - gem install coveralls-lcov script: - ./autogen.sh && ./configure --enable-urls --enable-coverage && make && make clean clean-coverage coverage-lcov after_success: - lcov --list coverage.info - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
2
0.095238
0
2
69ebb2f8a34ea091fbdc66227ab8b8e89edd411b
Resources/views/Form/DatePicker/javascript.html.twig
Resources/views/Form/DatePicker/javascript.html.twig
<script type="text/javascript"> $(document).ready(function() { $('#{{ id }}').datepicker({ format: '{{ format|lower }}', language: '{{ app.request.locale }}', weekStart: {{ weekstart }}, }); }); </script>
<script type="text/javascript"> $(document).ready(function() { $('#{{ id }}').datepicker({ format: '{{ format|lower }}', language: '{{ app.request.locale }}', weekStart: {{ weekstart }}, autoclose: {{ autoclose }}, }); }); </script>
Add ability to autoclose datepicker widget.
Add ability to autoclose datepicker widget.
Twig
mit
Restless-ET/AdmingeneratorGeneratorBundle,Restless-ET/AdmingeneratorGeneratorBundle,symfony2admingenerator/AdmingeneratorGeneratorBundle,Restless-ET/AdmingeneratorGeneratorBundle,symfony2admingenerator/AdmingeneratorGeneratorBundle
twig
## Code Before: <script type="text/javascript"> $(document).ready(function() { $('#{{ id }}').datepicker({ format: '{{ format|lower }}', language: '{{ app.request.locale }}', weekStart: {{ weekstart }}, }); }); </script> ## Instruction: Add ability to autoclose datepicker widget. ## Code After: <script type="text/javascript"> $(document).ready(function() { $('#{{ id }}').datepicker({ format: '{{ format|lower }}', language: '{{ app.request.locale }}', weekStart: {{ weekstart }}, autoclose: {{ autoclose }}, }); }); </script>
<script type="text/javascript"> $(document).ready(function() { $('#{{ id }}').datepicker({ format: '{{ format|lower }}', language: '{{ app.request.locale }}', weekStart: {{ weekstart }}, + autoclose: {{ autoclose }}, }); }); </script>
1
0.111111
1
0
72c4accefc3d2ac122d650f696d04b189abc43be
src/xml/ixmldeserializing.h
src/xml/ixmldeserializing.h
QTX_BEGIN_NAMESPACE class IXmlDeserializing { public: virtual ~IXmlDeserializing() {}; virtual IXmlDeserializing *deserializeXmlStartElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri, const QXmlStreamAttributes & attributes) = 0; virtual void deserializeXmlEndElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri) = 0; virtual void deserializeXmlAttributes(XmlDeserializer *deserializer, const QXmlStreamAttributes & attributes) = 0; virtual void deserializeXmlCharacters(XmlDeserializer *deserializer, const QStringRef & text) = 0; }; QTX_END_NAMESPACE #endif // QTXXML_IXMLDESERIALIZING_H
QTX_BEGIN_NAMESPACE class IXmlDeserializing { public: virtual ~IXmlDeserializing() {}; virtual IXmlDeserializing *deserializeXmlStartElement(XmlDeserializer * deserializer, const QStringRef & name, const QStringRef & namespaceUri, const QXmlStreamAttributes & attributes) { Q_UNUSED(deserializer) Q_UNUSED(name) Q_UNUSED(namespaceUri) Q_UNUSED(attributes) return 0; } virtual void deserializeXmlEndElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri) { Q_UNUSED(deserializer) Q_UNUSED(name) Q_UNUSED(namespaceUri) } virtual void deserializeXmlAttributes(XmlDeserializer *deserializer, const QXmlStreamAttributes & attributes) { Q_UNUSED(deserializer) Q_UNUSED(attributes) } virtual void deserializeXmlCharacters(XmlDeserializer *deserializer, const QStringRef & text) { Q_UNUSED(deserializer) Q_UNUSED(text) } }; QTX_END_NAMESPACE #endif // QTXXML_IXMLDESERIALIZING_H
Add default implementations of IXmlDeserializing methods.
Add default implementations of IXmlDeserializing methods.
C
apache-2.0
jaredhanson/qtxxml,jaredhanson/qtxxml
c
## Code Before: QTX_BEGIN_NAMESPACE class IXmlDeserializing { public: virtual ~IXmlDeserializing() {}; virtual IXmlDeserializing *deserializeXmlStartElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri, const QXmlStreamAttributes & attributes) = 0; virtual void deserializeXmlEndElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri) = 0; virtual void deserializeXmlAttributes(XmlDeserializer *deserializer, const QXmlStreamAttributes & attributes) = 0; virtual void deserializeXmlCharacters(XmlDeserializer *deserializer, const QStringRef & text) = 0; }; QTX_END_NAMESPACE #endif // QTXXML_IXMLDESERIALIZING_H ## Instruction: Add default implementations of IXmlDeserializing methods. ## Code After: QTX_BEGIN_NAMESPACE class IXmlDeserializing { public: virtual ~IXmlDeserializing() {}; virtual IXmlDeserializing *deserializeXmlStartElement(XmlDeserializer * deserializer, const QStringRef & name, const QStringRef & namespaceUri, const QXmlStreamAttributes & attributes) { Q_UNUSED(deserializer) Q_UNUSED(name) Q_UNUSED(namespaceUri) Q_UNUSED(attributes) return 0; } virtual void deserializeXmlEndElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri) { Q_UNUSED(deserializer) Q_UNUSED(name) Q_UNUSED(namespaceUri) } virtual void deserializeXmlAttributes(XmlDeserializer *deserializer, const QXmlStreamAttributes & attributes) { Q_UNUSED(deserializer) Q_UNUSED(attributes) } virtual void deserializeXmlCharacters(XmlDeserializer *deserializer, const QStringRef & text) { Q_UNUSED(deserializer) Q_UNUSED(text) } }; QTX_END_NAMESPACE #endif // QTXXML_IXMLDESERIALIZING_H
QTX_BEGIN_NAMESPACE class IXmlDeserializing { public: virtual ~IXmlDeserializing() {}; - virtual IXmlDeserializing *deserializeXmlStartElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri, const QXmlStreamAttributes & attributes) = 0; ? ----- + virtual IXmlDeserializing *deserializeXmlStartElement(XmlDeserializer * deserializer, const QStringRef & name, const QStringRef & namespaceUri, const QXmlStreamAttributes & attributes) ? + + { + Q_UNUSED(deserializer) + Q_UNUSED(name) + Q_UNUSED(namespaceUri) + Q_UNUSED(attributes) + return 0; + } + - virtual void deserializeXmlEndElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri) = 0; ? ------ + virtual void deserializeXmlEndElement(XmlDeserializer *deserializer, const QStringRef & name, const QStringRef & namespaceUri) + { + Q_UNUSED(deserializer) + Q_UNUSED(name) + Q_UNUSED(namespaceUri) + } + - virtual void deserializeXmlAttributes(XmlDeserializer *deserializer, const QXmlStreamAttributes & attributes) = 0; ? ----- + virtual void deserializeXmlAttributes(XmlDeserializer *deserializer, const QXmlStreamAttributes & attributes) + { + Q_UNUSED(deserializer) + Q_UNUSED(attributes) + } + - virtual void deserializeXmlCharacters(XmlDeserializer *deserializer, const QStringRef & text) = 0; ? ----- + virtual void deserializeXmlCharacters(XmlDeserializer *deserializer, const QStringRef & text) + { + Q_UNUSED(deserializer) + Q_UNUSED(text) + } }; QTX_END_NAMESPACE #endif // QTXXML_IXMLDESERIALIZING_H
31
1.631579
27
4
d7eeaf436f03cdbd7d4dbd97f62a2dab1114c6f7
doc/ack.xml
doc/ack.xml
<?xml version="1.0" ?> <!-- $Id$ --> <notes> The following individuals have contributed useful comments and code. UMLGraph would not be in its current state without their contributions. <ul> <li>Nascif Abousalh-Neto</li> <li>Andrea Aime</li> <li>Yves Bossel</li> <li>Nick Efthymiou</li> <li>Antti Hakala</li> <li>Art Hampton</li> <li>Scott Johnson</li> <li>Vadim Nasardinov</li> <li>Olek Poplavskyy</li> <li>Alessandro Riva</li> <li>Arnaud Rogues</li> <li>Jonathan R. Santos</li> <li>Sebastian Setzer</li> </ul> </notes>
<?xml version="1.0" ?> <!-- $Id$ --> <notes> <p> UMLGraph was developed and is being maintained by <a href="http://www.spinellis.gr">Diomidis Spinellis</a>. Andrea Aime has contributed the functionality for adding UML diagrams to javadoc pages, for inferring relationships, and for multiple diagram views. </p> <p> In addition, the following individuals have contributed useful comments and code. UMLGraph would not be in its current state without their contributions. <ul> <li>Nascif Abousalh-Neto</li> <li>Roger Alexander</li> <li>Panagiotis Astithas</li> <li>Yves Bossel</li> <li>Maxim Butov</li> <li>David P. Caldwell</li> <li>Anthony Callegaro</li> <li>Dirk Datzert</li> <li>Nick Efthymiou</li> <li>Georgios Gousios</li> <li>Antti Hakala</li> <li>Art Hampton</li> <li>Scott Johnson</li> <li>Trustin Lee</li> <li>Joshua Lim</li> <li>Vadim Nasardinov</li> <li>S&#233;bastien Pierre</li> <li>Olek Poplavskyy</li> <li>Alessandro Riva</li> <li>Arnaud Rogues</li> <li>Arnaud Rogues</li> <li>Jonathan R. Santos</li> <li>Sebastian Setzer</li> <li>Andreas Studer</li> <li>Ivan F. Villanueva B.</li> <li>Przemyslaw Wesolek</li> <li>Franz Wilhelmstoetter</li> </ul> </p> </notes>
Update to add missing names.
Update to add missing names.
XML
bsd-3-clause
davidmoten/UMLGraph,Edd123/UMLGraph,dspinellis/UMLGraph,davidmoten/UMLGraph,Edd123/UMLGraph,dspinellis/UMLGraph,dspinellis/UMLGraph,Edd123/UMLGraph,davidmoten/UMLGraph
xml
## Code Before: <?xml version="1.0" ?> <!-- $Id$ --> <notes> The following individuals have contributed useful comments and code. UMLGraph would not be in its current state without their contributions. <ul> <li>Nascif Abousalh-Neto</li> <li>Andrea Aime</li> <li>Yves Bossel</li> <li>Nick Efthymiou</li> <li>Antti Hakala</li> <li>Art Hampton</li> <li>Scott Johnson</li> <li>Vadim Nasardinov</li> <li>Olek Poplavskyy</li> <li>Alessandro Riva</li> <li>Arnaud Rogues</li> <li>Jonathan R. Santos</li> <li>Sebastian Setzer</li> </ul> </notes> ## Instruction: Update to add missing names. ## Code After: <?xml version="1.0" ?> <!-- $Id$ --> <notes> <p> UMLGraph was developed and is being maintained by <a href="http://www.spinellis.gr">Diomidis Spinellis</a>. Andrea Aime has contributed the functionality for adding UML diagrams to javadoc pages, for inferring relationships, and for multiple diagram views. </p> <p> In addition, the following individuals have contributed useful comments and code. UMLGraph would not be in its current state without their contributions. <ul> <li>Nascif Abousalh-Neto</li> <li>Roger Alexander</li> <li>Panagiotis Astithas</li> <li>Yves Bossel</li> <li>Maxim Butov</li> <li>David P. Caldwell</li> <li>Anthony Callegaro</li> <li>Dirk Datzert</li> <li>Nick Efthymiou</li> <li>Georgios Gousios</li> <li>Antti Hakala</li> <li>Art Hampton</li> <li>Scott Johnson</li> <li>Trustin Lee</li> <li>Joshua Lim</li> <li>Vadim Nasardinov</li> <li>S&#233;bastien Pierre</li> <li>Olek Poplavskyy</li> <li>Alessandro Riva</li> <li>Arnaud Rogues</li> <li>Arnaud Rogues</li> <li>Jonathan R. Santos</li> <li>Sebastian Setzer</li> <li>Andreas Studer</li> <li>Ivan F. Villanueva B.</li> <li>Przemyslaw Wesolek</li> <li>Franz Wilhelmstoetter</li> </ul> </p> </notes>
<?xml version="1.0" ?> <!-- $Id$ --> <notes> + <p> + UMLGraph was developed and is being maintained by + <a href="http://www.spinellis.gr">Diomidis Spinellis</a>. + Andrea Aime has contributed the functionality for + adding UML diagrams to javadoc pages, for inferring relationships, + and for multiple diagram views. + </p> + <p> + In addition, - The following individuals have contributed useful comments and code. ? ^ + the following individuals have contributed useful comments and code. ? ^ UMLGraph would not be in its current state without their contributions. <ul> <li>Nascif Abousalh-Neto</li> - <li>Andrea Aime</li> + <li>Roger Alexander</li> + <li>Panagiotis Astithas</li> <li>Yves Bossel</li> + <li>Maxim Butov</li> + <li>David P. Caldwell</li> + <li>Anthony Callegaro</li> + <li>Dirk Datzert</li> <li>Nick Efthymiou</li> + <li>Georgios Gousios</li> <li>Antti Hakala</li> <li>Art Hampton</li> <li>Scott Johnson</li> + <li>Trustin Lee</li> + <li>Joshua Lim</li> <li>Vadim Nasardinov</li> + <li>S&#233;bastien Pierre</li> <li>Olek Poplavskyy</li> <li>Alessandro Riva</li> <li>Arnaud Rogues</li> + <li>Arnaud Rogues</li> <li>Jonathan R. Santos</li> <li>Sebastian Setzer</li> + <li>Andreas Studer</li> + <li>Ivan F. Villanueva B.</li> + <li>Przemyslaw Wesolek</li> + <li>Franz Wilhelmstoetter</li> </ul> + </p> </notes>
28
1.333333
26
2
11ded1772a03cbd3f9430f9ff51b3b2c423ccd79
most-recent.md
most-recent.md
--- layout: page title: Most Recent Event redirect: /2015/08/19/September-Tastings-Go-Tos-Intro-To-Whisky/ ---
--- layout: page title: Most Recent Event redirect: /2015/10/22/November-Tasting-Bowmore/ ---
Set most recent to redirect to the bowmore announcement
Set most recent to redirect to the bowmore announcement
Markdown
mit
jrstarke/whiskydev.github.io,WhiskyDev/whiskydev.github.io,WhiskyDev/whiskydev.github.io,jrstarke/whiskydev.github.io,jrstarke/whiskydev.github.io,WhiskyDev/whiskydev.github.io
markdown
## Code Before: --- layout: page title: Most Recent Event redirect: /2015/08/19/September-Tastings-Go-Tos-Intro-To-Whisky/ --- ## Instruction: Set most recent to redirect to the bowmore announcement ## Code After: --- layout: page title: Most Recent Event redirect: /2015/10/22/November-Tasting-Bowmore/ ---
--- layout: page title: Most Recent Event - redirect: /2015/08/19/September-Tastings-Go-Tos-Intro-To-Whisky/ + redirect: /2015/10/22/November-Tasting-Bowmore/ ---
2
0.333333
1
1