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
34723f7944d28ee03a4b3d282774566517410c74
app/views/dc_common/_help.html.erb
app/views/dc_common/_help.html.erb
<div class="dc-help"><a id="help-top"></a> <h1><%= t('drgcms.dc_help.help') %>: <%= dc_form_title %></h1> <div class="help-buttons"> <% if params[:type] == 'form' %> <button onclick="location.href='#fields'; return false;"><%= t('drgcms.dc_help.fields_button') %></button> <% end %> <% if @commnets %> <button onclick="location.href='#comments'; return false;"><%= t('drgcms.dc_help.comments_button') %></button> <% end %> </div> <div class="help-body"><%= dc_help_body if @help %></div> <div class="help-fields"><%= dc_help_fields if params[:type] == 'form' %></div> <div class="help-top" onclick="location.href='#help-top'; return false;"><%= fa_icon('arrow-up') %></div> </div>
<div class="dc-help"><a id="help-top"></a> <h1><%= t('drgcms.dc_help.help') %>: <%= dc_form_title %></h1> <div class="help-buttons"> <% if params[:type] == 'form' %> <button onclick="location.href='#fields'; return false;"><%= t('drgcms.dc_help.fields_button') %></button> <% end %> <% if @commnets %> <button onclick="location.href='#comments'; return false;"><%= t('drgcms.dc_help.comments_button') %></button> <% end %> <div style="float: right"><%= fa_icon('close', class: 'dc-link') %></div> </div> <div class="help-body"><%= dc_help_body if @help %></div> <div class="help-fields"><%= dc_help_fields if params[:type] == 'form' %></div> <div class="help-top" onclick="location.href='#help-top'; return false;"><%= fa_icon('arrow-up') %></div> </div>
Add close button to help popup.
Add close button to help popup.
HTML+ERB
mit
drgcms/drg-cms,drgcms/drg-cms,drgcms/drg-cms
html+erb
## Code Before: <div class="dc-help"><a id="help-top"></a> <h1><%= t('drgcms.dc_help.help') %>: <%= dc_form_title %></h1> <div class="help-buttons"> <% if params[:type] == 'form' %> <button onclick="location.href='#fields'; return false;"><%= t('drgcms.dc_help.fields_button') %></button> <% end %> <% if @commnets %> <button onclick="location.href='#comments'; return false;"><%= t('drgcms.dc_help.comments_button') %></button> <% end %> </div> <div class="help-body"><%= dc_help_body if @help %></div> <div class="help-fields"><%= dc_help_fields if params[:type] == 'form' %></div> <div class="help-top" onclick="location.href='#help-top'; return false;"><%= fa_icon('arrow-up') %></div> </div> ## Instruction: Add close button to help popup. ## Code After: <div class="dc-help"><a id="help-top"></a> <h1><%= t('drgcms.dc_help.help') %>: <%= dc_form_title %></h1> <div class="help-buttons"> <% if params[:type] == 'form' %> <button onclick="location.href='#fields'; return false;"><%= t('drgcms.dc_help.fields_button') %></button> <% end %> <% if @commnets %> <button onclick="location.href='#comments'; return false;"><%= t('drgcms.dc_help.comments_button') %></button> <% end %> <div style="float: right"><%= fa_icon('close', class: 'dc-link') %></div> </div> <div class="help-body"><%= dc_help_body if @help %></div> <div class="help-fields"><%= dc_help_fields if params[:type] == 'form' %></div> <div class="help-top" onclick="location.href='#help-top'; return false;"><%= fa_icon('arrow-up') %></div> </div>
<div class="dc-help"><a id="help-top"></a> <h1><%= t('drgcms.dc_help.help') %>: <%= dc_form_title %></h1> <div class="help-buttons"> <% if params[:type] == 'form' %> <button onclick="location.href='#fields'; return false;"><%= t('drgcms.dc_help.fields_button') %></button> <% end %> <% if @commnets %> <button onclick="location.href='#comments'; return false;"><%= t('drgcms.dc_help.comments_button') %></button> <% end %> + <div style="float: right"><%= fa_icon('close', class: 'dc-link') %></div> </div> <div class="help-body"><%= dc_help_body if @help %></div> <div class="help-fields"><%= dc_help_fields if params[:type] == 'form' %></div> <div class="help-top" onclick="location.href='#help-top'; return false;"><%= fa_icon('arrow-up') %></div> </div>
1
0.058824
1
0
9f3653e9b0982aaada55f17f85c9a611036edcb8
src/app.js
src/app.js
(function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { isPlaySound: false, frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; } } }); }(window));
(function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { isPlaySound: false, frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; }, playSound: function() { hearingTest.playSound(); this.isPlaySound = true; }, stopSound: function() { hearingTest.stopSound(); this.isPlaySound = false; } } }); }(window));
Implement play and stop sound
Implement play and stop sound
JavaScript
mit
kubosho/hearing-test-app
javascript
## Code Before: (function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { isPlaySound: false, frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; } } }); }(window)); ## Instruction: Implement play and stop sound ## Code After: (function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { isPlaySound: false, frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; }, playSound: function() { hearingTest.playSound(); this.isPlaySound = true; }, stopSound: function() { hearingTest.stopSound(); this.isPlaySound = false; } } }); }(window));
(function (window) { 'use strict'; var hearingTest = HearingTest; var hearing = hearingTest.init(); var app = new Vue({ el: '#hearing-test-app', data: { isPlaySound: false, frequency: 1000 }, methods: { changeFrequency: function() { hearing.sound.frequency.value = this.frequency; + }, + + playSound: function() { + hearingTest.playSound(); + this.isPlaySound = true; + }, + + stopSound: function() { + hearingTest.stopSound(); + this.isPlaySound = false; } } }); }(window));
10
0.526316
10
0
54a6503fa72cb8ed685b806820c571b9d8253f2c
README.md
README.md
Ubersmith API layer MIT Licensed ```php <? $api = new Ubersmith('http://192.168.0.10/api/', 'apiuser', 'apiuser'); $result = $api->list_services('{ "clientid": 1001 }')->response(); var_dump($result); ```
Ubersmith API layer MIT Licensed ```php <? $api = new Ubersmith('http://192.168.0.10/api/', 'apiuser', 'apiuser'); $result = $api->list_services('{ "clientid": 1001 }')->response(); var_dump($result); ``` Example result: ```plain { "status":true, "error_no":null, "error_msg":"", "data": "api_data (serialised)" } ```
Update readme with an ideal response.
Update readme with an ideal response.
Markdown
mit
jph/ubersmith-api,divinity76/ubersmith-api
markdown
## Code Before: Ubersmith API layer MIT Licensed ```php <? $api = new Ubersmith('http://192.168.0.10/api/', 'apiuser', 'apiuser'); $result = $api->list_services('{ "clientid": 1001 }')->response(); var_dump($result); ``` ## Instruction: Update readme with an ideal response. ## Code After: Ubersmith API layer MIT Licensed ```php <? $api = new Ubersmith('http://192.168.0.10/api/', 'apiuser', 'apiuser'); $result = $api->list_services('{ "clientid": 1001 }')->response(); var_dump($result); ``` Example result: ```plain { "status":true, "error_no":null, "error_msg":"", "data": "api_data (serialised)" } ```
Ubersmith API layer MIT Licensed ```php <? $api = new Ubersmith('http://192.168.0.10/api/', 'apiuser', 'apiuser'); $result = $api->list_services('{ "clientid": 1001 }')->response(); var_dump($result); ``` + + Example result: + ```plain + { + "status":true, + "error_no":null, + "error_msg":"", + "data": "api_data (serialised)" + } + ```
10
1.111111
10
0
edd87e8445c4a1c28233eeae5f226fac7afc5ed8
CHANGELOG.md
CHANGELOG.md
1.2.0 / 2015-09-21 ================== Features: * Return the value of the condition in the `wait` method * Added `submitForm` to submit a form * Added `isSelected` to check for the selected check of `option` * Implemented `getOuterHtml` Bug fixes: * Allow newer versions of Buzz * Added more details in error messages in case of Sahi failure * Fixed the attribute getter for empty attributes * Fixed the escaping of JS values to support multiline strings * Improved the script evaluation to preserve the type Testsuite: * Added testing on PHP 5.6 on Travis * Added testing on HHVM * Added more tests for the client
1.2.1 / 2016-03-05 ================== Testsuite: * Added testing on PHP 7 on Travis 1.2.0 / 2015-09-21 ================== Features: * Return the value of the condition in the `wait` method * Added `submitForm` to submit a form * Added `isSelected` to check for the selected check of `option` * Implemented `getOuterHtml` Bug fixes: * Allow newer versions of Buzz * Added more details in error messages in case of Sahi failure * Fixed the attribute getter for empty attributes * Fixed the escaping of JS values to support multiline strings * Improved the script evaluation to preserve the type Testsuite: * Added testing on PHP 5.6 on Travis * Added testing on HHVM * Added more tests for the client
Update the changelog for 1.2.1
Update the changelog for 1.2.1
Markdown
mit
minkphp/SahiClient
markdown
## Code Before: 1.2.0 / 2015-09-21 ================== Features: * Return the value of the condition in the `wait` method * Added `submitForm` to submit a form * Added `isSelected` to check for the selected check of `option` * Implemented `getOuterHtml` Bug fixes: * Allow newer versions of Buzz * Added more details in error messages in case of Sahi failure * Fixed the attribute getter for empty attributes * Fixed the escaping of JS values to support multiline strings * Improved the script evaluation to preserve the type Testsuite: * Added testing on PHP 5.6 on Travis * Added testing on HHVM * Added more tests for the client ## Instruction: Update the changelog for 1.2.1 ## Code After: 1.2.1 / 2016-03-05 ================== Testsuite: * Added testing on PHP 7 on Travis 1.2.0 / 2015-09-21 ================== Features: * Return the value of the condition in the `wait` method * Added `submitForm` to submit a form * Added `isSelected` to check for the selected check of `option` * Implemented `getOuterHtml` Bug fixes: * Allow newer versions of Buzz * Added more details in error messages in case of Sahi failure * Fixed the attribute getter for empty attributes * Fixed the escaping of JS values to support multiline strings * Improved the script evaluation to preserve the type Testsuite: * Added testing on PHP 5.6 on Travis * Added testing on HHVM * Added more tests for the client
+ 1.2.1 / 2016-03-05 + ================== + + Testsuite: + + * Added testing on PHP 7 on Travis + 1.2.0 / 2015-09-21 ================== Features: * Return the value of the condition in the `wait` method * Added `submitForm` to submit a form * Added `isSelected` to check for the selected check of `option` * Implemented `getOuterHtml` Bug fixes: * Allow newer versions of Buzz * Added more details in error messages in case of Sahi failure * Fixed the attribute getter for empty attributes * Fixed the escaping of JS values to support multiline strings * Improved the script evaluation to preserve the type Testsuite: * Added testing on PHP 5.6 on Travis * Added testing on HHVM * Added more tests for the client
7
0.304348
7
0
01dffa1a3fde01c0a9ba63409766e5cdc50d964a
README.md
README.md
jlll ==== Java Lisp Like Language
jlll ==== JLLL - Java Lisp Like Language. Lightweight and embeddable java library to bring some lisp flavour into your projects. Installation ------------ Add following snippet into pom.xml ```xml <dependency> <groupId>ru.ydn</groupId> <artifactId>jlll</artifactId> <version>1.0</version> </dependency> ``` Examples -------- ```lisp (+ 2 2) 4 (cons 'a 'b) (a . b) (append '(a b) '(c d)) (a b c d) (define (inc x) (+ x 1)) (inc 2) 3 (invoke-static 'java.lang.Math 'cos 0.0) 1.0 (invoke "hello" length) 5 ```
Add examples and maven detailes
Add examples and maven detailes
Markdown
apache-2.0
PhantomYdn/jlll
markdown
## Code Before: jlll ==== Java Lisp Like Language ## Instruction: Add examples and maven detailes ## Code After: jlll ==== JLLL - Java Lisp Like Language. Lightweight and embeddable java library to bring some lisp flavour into your projects. Installation ------------ Add following snippet into pom.xml ```xml <dependency> <groupId>ru.ydn</groupId> <artifactId>jlll</artifactId> <version>1.0</version> </dependency> ``` Examples -------- ```lisp (+ 2 2) 4 (cons 'a 'b) (a . b) (append '(a b) '(c d)) (a b c d) (define (inc x) (+ x 1)) (inc 2) 3 (invoke-static 'java.lang.Math 'cos 0.0) 1.0 (invoke "hello" length) 5 ```
jlll ==== - Java Lisp Like Language + JLLL - Java Lisp Like Language. Lightweight and embeddable java library to bring some lisp flavour into your projects. + + + Installation + ------------ + Add following snippet into pom.xml + ```xml + + <dependency> + <groupId>ru.ydn</groupId> + <artifactId>jlll</artifactId> + <version>1.0</version> + </dependency> + ``` + + Examples + -------- + ```lisp + (+ 2 2) + 4 + + (cons 'a 'b) + (a . b) + + (append '(a b) '(c d)) + (a b c d) + + (define (inc x) (+ x 1)) + (inc 2) + 3 + + (invoke-static 'java.lang.Math 'cos 0.0) + 1.0 + + (invoke "hello" length) + 5 + ```
38
9.5
37
1
99cb1d0ddb7ab19d73520665975dc6246da47201
.travis.yml
.travis.yml
language: rust rust: - stable
language: rust sudo: false matrix: include: - rust: stable env: - FEATURES='serialize' - rust: nightly env: - FEATURES='serialize' - BENCH=1 script: - | cargo build --verbose --features "$FEATURES" && cargo test --verbose --features "$FEATURES" && ([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES")
Use build matrix, and set 'serialize' feature in Travis build script
Use build matrix, and set 'serialize' feature in Travis build script
YAML
apache-2.0
rusticata/tls-parser,rusticata/tls-parser
yaml
## Code Before: language: rust rust: - stable ## Instruction: Use build matrix, and set 'serialize' feature in Travis build script ## Code After: language: rust sudo: false matrix: include: - rust: stable env: - FEATURES='serialize' - rust: nightly env: - FEATURES='serialize' - BENCH=1 script: - | cargo build --verbose --features "$FEATURES" && cargo test --verbose --features "$FEATURES" && ([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES")
language: rust - rust: - - stable + sudo: false + matrix: + include: + - rust: stable + env: + - FEATURES='serialize' + - rust: nightly + env: + - FEATURES='serialize' + - BENCH=1 + script: + - | + cargo build --verbose --features "$FEATURES" && + cargo test --verbose --features "$FEATURES" && + ([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES")
17
5.666667
15
2
1e8bdffb7542ae1dae5b33600c00bc60783e6265
alllinks.html
alllinks.html
<!DOCTYPE html>
<!DOCTYPE html> <html> <head> <!--Title, description, authors and any other metadata we might need--> <meta charset="utf-8"> <title>xyz</title> <meta name="author" content="ADIA"/> <meta name="description" content=""/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--Stylesheets--> <link rel="stylesheet" type="text/css" href="assets/css/generic.css"> <link rel="stylesheet" type="text/css" href="assets/css/profile.css"> <!--Scripts--> </head> <body> <!--Header bar at the top--> <header> <div id="navbar_wrapper"> <div id="navbar"> <div id="logo_nav"> <a class="navbutton" href="landing.html"> <!--Replace this with our website logo (32px tall)--> <img src="http://vignette3.wikia.nocookie.net/coasterpedia/images/5/53/Public_Domain_logo.png" height="32" width="32"> </a> </div> <div id="feed_nav"> <a class="navbutton" href="feed.html">Feed</a> </div> <div id="project_nav"> <a class="navbutton" href="project.html">Projects</a> </div> <div id="contract_nav"> <a class="navbutton" href="contract.html">Contracts</a> </div> <div id="people_nav"> <a class="navbutton" href="profile.html">People</a> </div> <div id="login_nav"> <a class="navbutton" href="#login">Log in</a> </div> <div id="searchbar_nav"> <!--The search button will be implemented in javascript later--> <form action="search.html"> <input id="searchbar_button" type="submit" value=""> <input id="searchbar_input" type="text" name="search" placeholder="Search..."> </form> </div> </div> </div> </header> <!--Main page content--> <main> <div id="content_background"> <div id="content_wrapper"> <div id="content"> <a href="admin.html">Admin panel</a><br> <a href="contract.html">Contract page</a><br> <a href="feed.html">Feed page</a><br> <a href="landing.html">Landing page</a><br> <a href="profile.html">Profile page</a><br> <a href="project.html">Project page</a><br> <a href="search.html">Search result page</a><br> </div> </div> </div> </main> <!--Footer at the bottom--> <footer> <div id="footer_content"> Footer stuff goes here </div> </footer> </body> </html>
Add page linking to all pages
Add page linking to all pages
HTML
mit
2nd47/CSC309-A4,2nd47/CSC309-A4
html
## Code Before: <!DOCTYPE html> ## Instruction: Add page linking to all pages ## Code After: <!DOCTYPE html> <html> <head> <!--Title, description, authors and any other metadata we might need--> <meta charset="utf-8"> <title>xyz</title> <meta name="author" content="ADIA"/> <meta name="description" content=""/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--Stylesheets--> <link rel="stylesheet" type="text/css" href="assets/css/generic.css"> <link rel="stylesheet" type="text/css" href="assets/css/profile.css"> <!--Scripts--> </head> <body> <!--Header bar at the top--> <header> <div id="navbar_wrapper"> <div id="navbar"> <div id="logo_nav"> <a class="navbutton" href="landing.html"> <!--Replace this with our website logo (32px tall)--> <img src="http://vignette3.wikia.nocookie.net/coasterpedia/images/5/53/Public_Domain_logo.png" height="32" width="32"> </a> </div> <div id="feed_nav"> <a class="navbutton" href="feed.html">Feed</a> </div> <div id="project_nav"> <a class="navbutton" href="project.html">Projects</a> </div> <div id="contract_nav"> <a class="navbutton" href="contract.html">Contracts</a> </div> <div id="people_nav"> <a class="navbutton" href="profile.html">People</a> </div> <div id="login_nav"> <a class="navbutton" href="#login">Log in</a> </div> <div id="searchbar_nav"> <!--The search button will be implemented in javascript later--> <form action="search.html"> <input id="searchbar_button" type="submit" value=""> <input id="searchbar_input" type="text" name="search" placeholder="Search..."> </form> </div> </div> </div> </header> <!--Main page content--> <main> <div id="content_background"> <div id="content_wrapper"> <div id="content"> <a href="admin.html">Admin panel</a><br> <a href="contract.html">Contract page</a><br> <a href="feed.html">Feed page</a><br> <a href="landing.html">Landing page</a><br> <a href="profile.html">Profile page</a><br> <a href="project.html">Project page</a><br> <a href="search.html">Search result page</a><br> </div> </div> </div> </main> <!--Footer at the bottom--> <footer> <div id="footer_content"> Footer stuff goes here </div> </footer> </body> </html>
<!DOCTYPE html> + <html> + <head> + <!--Title, description, authors and any other metadata we might need--> + <meta charset="utf-8"> + <title>xyz</title> + <meta name="author" content="ADIA"/> + <meta name="description" content=""/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <!--Stylesheets--> + <link rel="stylesheet" type="text/css" href="assets/css/generic.css"> + <link rel="stylesheet" type="text/css" href="assets/css/profile.css"> + + <!--Scripts--> + </head> + + <body> + <!--Header bar at the top--> + <header> + <div id="navbar_wrapper"> + <div id="navbar"> + <div id="logo_nav"> + <a class="navbutton" href="landing.html"> + <!--Replace this with our website logo (32px tall)--> + <img src="http://vignette3.wikia.nocookie.net/coasterpedia/images/5/53/Public_Domain_logo.png" height="32" width="32"> + </a> + </div> + <div id="feed_nav"> + <a class="navbutton" href="feed.html">Feed</a> + </div> + <div id="project_nav"> + <a class="navbutton" href="project.html">Projects</a> + </div> + <div id="contract_nav"> + <a class="navbutton" href="contract.html">Contracts</a> + </div> + <div id="people_nav"> + <a class="navbutton" href="profile.html">People</a> + </div> + <div id="login_nav"> + <a class="navbutton" href="#login">Log in</a> + </div> + <div id="searchbar_nav"> + <!--The search button will be implemented in javascript later--> + <form action="search.html"> + <input id="searchbar_button" type="submit" value=""> + <input id="searchbar_input" type="text" name="search" placeholder="Search..."> + </form> + </div> + </div> + </div> + </header> + + + <!--Main page content--> + <main> + <div id="content_background"> + <div id="content_wrapper"> + <div id="content"> + <a href="admin.html">Admin panel</a><br> + <a href="contract.html">Contract page</a><br> + <a href="feed.html">Feed page</a><br> + <a href="landing.html">Landing page</a><br> + <a href="profile.html">Profile page</a><br> + <a href="project.html">Project page</a><br> + <a href="search.html">Search result page</a><br> + </div> + </div> + </div> + </main> + + <!--Footer at the bottom--> + <footer> + <div id="footer_content"> + Footer stuff goes here + </div> + </footer> + </body> + </html>
79
79
79
0
3ab7016478454fcd55343e627bf8f65bf5a5306f
hstspreload.appspot.com/Makefile
hstspreload.appspot.com/Makefile
.PHONY: serve serve: check go run server.go .PHONY: deploy deploy: check DYLD_INSERT_LIBRARIES="" aedeploy gcloud preview app deploy app.yaml --promote CURRENT_DIR = "$(shell pwd)" EXPECTED_DIR = "${GOPATH}/src/github.com/chromium/hstspreload/hstspreload.appspot.com" .PHONY: check check: ifeq (${CURRENT_DIR}, ${EXPECTED_DIR}) @echo "PASS: Current directory is in \$$GOPATH." else @echo "FAIL" @echo "Expected: ${EXPECTED_DIR}" @echo "Actual: ${CURRENT_DIR}" endif
.PHONY: serve serve: check go run server.go .PHONY: deploy deploy: check aedeploy gcloud preview app deploy app.yaml --promote CURRENT_DIR = "$(shell pwd)" EXPECTED_DIR = "${GOPATH}/src/github.com/chromium/hstspreload/hstspreload.appspot.com" .PHONY: check check: ifeq (${CURRENT_DIR}, ${EXPECTED_DIR}) @echo "PASS: Current directory is in \$$GOPATH." else @echo "FAIL" @echo "Expected: ${EXPECTED_DIR}" @echo "Actual: ${CURRENT_DIR}" endif
Remove DYLD_INSERT_LIBRARIES override in deploy.
Remove DYLD_INSERT_LIBRARIES override in deploy. This is something that I personally need on the commandline, but it's not necessary in a Makefile (and not relevant to most people).
unknown
bsd-3-clause
chromium/hstspreload
unknown
## Code Before: .PHONY: serve serve: check go run server.go .PHONY: deploy deploy: check DYLD_INSERT_LIBRARIES="" aedeploy gcloud preview app deploy app.yaml --promote CURRENT_DIR = "$(shell pwd)" EXPECTED_DIR = "${GOPATH}/src/github.com/chromium/hstspreload/hstspreload.appspot.com" .PHONY: check check: ifeq (${CURRENT_DIR}, ${EXPECTED_DIR}) @echo "PASS: Current directory is in \$$GOPATH." else @echo "FAIL" @echo "Expected: ${EXPECTED_DIR}" @echo "Actual: ${CURRENT_DIR}" endif ## Instruction: Remove DYLD_INSERT_LIBRARIES override in deploy. This is something that I personally need on the commandline, but it's not necessary in a Makefile (and not relevant to most people). ## Code After: .PHONY: serve serve: check go run server.go .PHONY: deploy deploy: check aedeploy gcloud preview app deploy app.yaml --promote CURRENT_DIR = "$(shell pwd)" EXPECTED_DIR = "${GOPATH}/src/github.com/chromium/hstspreload/hstspreload.appspot.com" .PHONY: check check: ifeq (${CURRENT_DIR}, ${EXPECTED_DIR}) @echo "PASS: Current directory is in \$$GOPATH." else @echo "FAIL" @echo "Expected: ${EXPECTED_DIR}" @echo "Actual: ${CURRENT_DIR}" endif
.PHONY: serve serve: check go run server.go .PHONY: deploy deploy: check - DYLD_INSERT_LIBRARIES="" aedeploy gcloud preview app deploy app.yaml --promote ? ------------------------- + aedeploy gcloud preview app deploy app.yaml --promote CURRENT_DIR = "$(shell pwd)" EXPECTED_DIR = "${GOPATH}/src/github.com/chromium/hstspreload/hstspreload.appspot.com" .PHONY: check check: ifeq (${CURRENT_DIR}, ${EXPECTED_DIR}) @echo "PASS: Current directory is in \$$GOPATH." else @echo "FAIL" @echo "Expected: ${EXPECTED_DIR}" @echo "Actual: ${CURRENT_DIR}" endif
2
0.1
1
1
379552e25e24c049d5055a7e24f011cd7aab8932
package.json
package.json
{ "name": "react-ink", "version": "6.0.0", "description": "A React component for adding material design style ink.", "main": "dist/ink.js", "scripts": { "start": "webpack-dev-server --config=webpack.example.config.js", "prepublish": "webpack -p && echo `gzip -c dist/ink.js | wc -c`" }, "repository": { "type": "git", "url": "git@github.com:vigetlabs/react-ink.git" }, "keywords": [ "react", "material design" ], "author": "Nate Hunzaker", "license": "MIT", "devDependencies": { "babel-core": "~6", "babel-loader": "~6", "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "react": "^15.0.1", "react-dom": "^15.0.1", "webpack": "~1", "webpack-dev-server": "~1" }, "dependencies": { "react": "^15.4.1", "react-dom": "^15.4.1", "webpack": "^1.14.0", "webpack-dev-server": "^1.16.2" } }
{ "name": "react-ink", "version": "6.0.0", "description": "A React component for adding material design style ink.", "main": "dist/ink.js", "scripts": { "start": "webpack-dev-server --config=webpack.example.config.js", "prepublish": "webpack -p && echo `gzip -c dist/ink.js | wc -c`" }, "repository": { "type": "git", "url": "git@github.com:vigetlabs/react-ink.git" }, "keywords": [ "react", "material design" ], "author": "Nate Hunzaker", "license": "MIT", "devDependencies": { "babel-core": "~6", "babel-loader": "~6", "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "react": "^15.4.1", "react-addons-test-utils": "^15.4.1", "react-dom": "^15.4.1", "webpack": "~1", "webpack-dev-server": "~1" } }
Remove production dependencies. Add react-addons-test-utils
Remove production dependencies. Add react-addons-test-utils
JSON
mit
vigetlabs/react-ink,vigetlabs/react-ink
json
## Code Before: { "name": "react-ink", "version": "6.0.0", "description": "A React component for adding material design style ink.", "main": "dist/ink.js", "scripts": { "start": "webpack-dev-server --config=webpack.example.config.js", "prepublish": "webpack -p && echo `gzip -c dist/ink.js | wc -c`" }, "repository": { "type": "git", "url": "git@github.com:vigetlabs/react-ink.git" }, "keywords": [ "react", "material design" ], "author": "Nate Hunzaker", "license": "MIT", "devDependencies": { "babel-core": "~6", "babel-loader": "~6", "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "react": "^15.0.1", "react-dom": "^15.0.1", "webpack": "~1", "webpack-dev-server": "~1" }, "dependencies": { "react": "^15.4.1", "react-dom": "^15.4.1", "webpack": "^1.14.0", "webpack-dev-server": "^1.16.2" } } ## Instruction: Remove production dependencies. Add react-addons-test-utils ## Code After: { "name": "react-ink", "version": "6.0.0", "description": "A React component for adding material design style ink.", "main": "dist/ink.js", "scripts": { "start": "webpack-dev-server --config=webpack.example.config.js", "prepublish": "webpack -p && echo `gzip -c dist/ink.js | wc -c`" }, "repository": { "type": "git", "url": "git@github.com:vigetlabs/react-ink.git" }, "keywords": [ "react", "material design" ], "author": "Nate Hunzaker", "license": "MIT", "devDependencies": { "babel-core": "~6", "babel-loader": "~6", "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "react": "^15.4.1", "react-addons-test-utils": "^15.4.1", "react-dom": "^15.4.1", "webpack": "~1", "webpack-dev-server": "~1" } }
{ "name": "react-ink", "version": "6.0.0", "description": "A React component for adding material design style ink.", "main": "dist/ink.js", "scripts": { "start": "webpack-dev-server --config=webpack.example.config.js", "prepublish": "webpack -p && echo `gzip -c dist/ink.js | wc -c`" }, "repository": { "type": "git", "url": "git@github.com:vigetlabs/react-ink.git" }, "keywords": [ "react", "material design" ], "author": "Nate Hunzaker", "license": "MIT", "devDependencies": { "babel-core": "~6", "babel-loader": "~6", "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", - "react": "^15.0.1", ? ^ + "react": "^15.4.1", ? ^ + "react-addons-test-utils": "^15.4.1", - "react-dom": "^15.0.1", ? ^ + "react-dom": "^15.4.1", ? ^ "webpack": "~1", "webpack-dev-server": "~1" - }, - "dependencies": { - "react": "^15.4.1", - "react-dom": "^15.4.1", - "webpack": "^1.14.0", - "webpack-dev-server": "^1.16.2" } }
11
0.297297
3
8
b7424746fd8930da8a9071df94760ffe51553a9f
lib/components/Controls/Controls.js
lib/components/Controls/Controls.js
import React from "react"; import { Link } from "react-router-dom"; import fetchContainer from "../../containers/fetch-container"; import "./Controls.css"; const handleSignOut = (props) => { localStorage.removeItem('user'); props.removeTestsFromStore(); props.removeUserFromStore(); } const Controls = (props) => { const { user } = props const userName = user ? `${user.name.toUpperCase()}` : 'user' return( <div className='outer-container'> <div className='controls-container'> <div className='welcome-container'> <h2 className='welcome-msg'>Welcome, {userName}!</h2> <Link className='sign-out-link' to='/'><button className='sign-out-btn' onClick={() => handleSignOut(props)}> Sign Out </button> </Link> </div> <div className='controls-links'> <Link to='/profile' className='profile-page'> my profile. </Link> <Link to='/personality-types' className='personality-types-page'> personalities. </Link> <Link to='/assessments' className='assessments-page'> assessments. </Link> </div> </div> </div> ); }; export default fetchContainer(Controls);
import React from "react"; import { Link } from "react-router-dom"; import fetchContainer from "../../containers/fetch-container"; import "./Controls.css"; const handleSignOut = (props) => { localStorage.removeItem('user'); props.removeTestsFromStore(); props.removeTestResultsFromStore(); props.removeUserFromStore(); } const Controls = (props) => { const { user } = props const userName = user ? `${user.name.toUpperCase()}` : 'user' return( <div className='outer-container'> <div className='controls-container'> <div className='welcome-container'> <h2 className='welcome-msg'>Welcome, {userName}!</h2> <Link className='sign-out-link' to='/'><button className='sign-out-btn' onClick={() => handleSignOut(props)}> Sign Out </button> </Link> </div> <div className='controls-links'> <Link to='/profile' className='profile-page'> my profile. </Link> <Link to='/personality-types' className='personality-types-page'> personalities. </Link> <Link to='/assessments' className='assessments-page'> assessments. </Link> </div> </div> </div> ); }; export default fetchContainer(Controls);
Add removeTestResults to the signout button
Add removeTestResults to the signout button
JavaScript
mit
christielynam/do-you,christielynam/do-you
javascript
## Code Before: import React from "react"; import { Link } from "react-router-dom"; import fetchContainer from "../../containers/fetch-container"; import "./Controls.css"; const handleSignOut = (props) => { localStorage.removeItem('user'); props.removeTestsFromStore(); props.removeUserFromStore(); } const Controls = (props) => { const { user } = props const userName = user ? `${user.name.toUpperCase()}` : 'user' return( <div className='outer-container'> <div className='controls-container'> <div className='welcome-container'> <h2 className='welcome-msg'>Welcome, {userName}!</h2> <Link className='sign-out-link' to='/'><button className='sign-out-btn' onClick={() => handleSignOut(props)}> Sign Out </button> </Link> </div> <div className='controls-links'> <Link to='/profile' className='profile-page'> my profile. </Link> <Link to='/personality-types' className='personality-types-page'> personalities. </Link> <Link to='/assessments' className='assessments-page'> assessments. </Link> </div> </div> </div> ); }; export default fetchContainer(Controls); ## Instruction: Add removeTestResults to the signout button ## Code After: import React from "react"; import { Link } from "react-router-dom"; import fetchContainer from "../../containers/fetch-container"; import "./Controls.css"; const handleSignOut = (props) => { localStorage.removeItem('user'); props.removeTestsFromStore(); props.removeTestResultsFromStore(); props.removeUserFromStore(); } const Controls = (props) => { const { user } = props const userName = user ? `${user.name.toUpperCase()}` : 'user' return( <div className='outer-container'> <div className='controls-container'> <div className='welcome-container'> <h2 className='welcome-msg'>Welcome, {userName}!</h2> <Link className='sign-out-link' to='/'><button className='sign-out-btn' onClick={() => handleSignOut(props)}> Sign Out </button> </Link> </div> <div className='controls-links'> <Link to='/profile' className='profile-page'> my profile. </Link> <Link to='/personality-types' className='personality-types-page'> personalities. </Link> <Link to='/assessments' className='assessments-page'> assessments. </Link> </div> </div> </div> ); }; export default fetchContainer(Controls);
import React from "react"; import { Link } from "react-router-dom"; import fetchContainer from "../../containers/fetch-container"; import "./Controls.css"; const handleSignOut = (props) => { localStorage.removeItem('user'); props.removeTestsFromStore(); + props.removeTestResultsFromStore(); props.removeUserFromStore(); } const Controls = (props) => { const { user } = props const userName = user ? `${user.name.toUpperCase()}` : 'user' return( <div className='outer-container'> <div className='controls-container'> <div className='welcome-container'> <h2 className='welcome-msg'>Welcome, {userName}!</h2> <Link className='sign-out-link' to='/'><button className='sign-out-btn' onClick={() => handleSignOut(props)}> Sign Out </button> </Link> </div> <div className='controls-links'> <Link to='/profile' className='profile-page'> my profile. </Link> <Link to='/personality-types' className='personality-types-page'> personalities. </Link> <Link to='/assessments' className='assessments-page'> assessments. </Link> </div> </div> </div> ); }; export default fetchContainer(Controls);
1
0.022222
1
0
00753623436d165f91d04d721a67322b55142dbe
readthedocs/templates/projects/domain_form.html
readthedocs/templates/projects/domain_form.html
{% extends "projects/project_edit_base.html" %} {% load i18n %} {% block title %}{% trans "Edit Domains" %}{% endblock %} {% block nav-dashboard %} class="active"{% endblock %} {% block editing-option-edit-proj %}class="active"{% endblock %} {% block project-domains-active %}active{% endblock %} {% block project_edit_content_header %}{% trans "Domains" %}{% endblock %} {% block project_edit_content %} <h3> {% trans "Existing Domains" %} </h3> <p> <ul> {% for relationship in domains %} <li> <a href="{{ relationship.get_absolute_url }}"> {{ relationship.child }} </a> (<a href="{% url "projects_domains_delete" relationship.parent.slug relationship.child.slug %}">{% trans "Remove" %}</a>) </li> {% endfor %} </ul> <p> {% trans "Choose which project you would like to add as a domain." %} </p> {% if domain %} {% url 'projects_domains_create' project.slug as action_url %} {% else %} {% url 'projects_domains_edit' project.slug domain.pk as action_url %} {% endif %} <form method="post" action="{{ action_url }}">{% csrf_token %} {{ form.as_p }} <p> <input style="display: inline;" type="submit" value="{% trans "Submit" %}"> </p> </form> {% endblock %}
{% extends "projects/project_edit_base.html" %} {% load i18n %} {% block title %}{% trans "Edit Domains" %}{% endblock %} {% block nav-dashboard %} class="active"{% endblock %} {% block editing-option-edit-proj %}class="active"{% endblock %} {% block project-domains-active %}active{% endblock %} {% block project_edit_content_header %} {% if domain %} {% trans "Edit Domain" %} {% else %} {% trans "Create Domain" %} {% endif %} {% endblock %} {% block project_edit_content %} {% if domain %} {% url 'projects_domains_edit' project.slug domain.pk as action_url %} {% else %} {% url 'projects_domains_create' project.slug as action_url %} {% endif %} <form method="post" action="{{ action_url }}">{% csrf_token %} {{ form.as_p }} <p> <input style="display: inline;" type="submit" value="{% trans "Submit" %}"> </p> </form> {% endblock %}
Fix logic around Create/Delete of domains
Fix logic around Create/Delete of domains
HTML
mit
wijerasa/readthedocs.org,gjtorikian/readthedocs.org,safwanrahman/readthedocs.org,gjtorikian/readthedocs.org,davidfischer/readthedocs.org,espdev/readthedocs.org,wijerasa/readthedocs.org,SteveViss/readthedocs.org,emawind84/readthedocs.org,rtfd/readthedocs.org,davidfischer/readthedocs.org,rtfd/readthedocs.org,wijerasa/readthedocs.org,davidfischer/readthedocs.org,istresearch/readthedocs.org,emawind84/readthedocs.org,pombredanne/readthedocs.org,clarkperkins/readthedocs.org,stevepiercy/readthedocs.org,wijerasa/readthedocs.org,espdev/readthedocs.org,tddv/readthedocs.org,emawind84/readthedocs.org,clarkperkins/readthedocs.org,pombredanne/readthedocs.org,stevepiercy/readthedocs.org,espdev/readthedocs.org,istresearch/readthedocs.org,clarkperkins/readthedocs.org,davidfischer/readthedocs.org,SteveViss/readthedocs.org,safwanrahman/readthedocs.org,stevepiercy/readthedocs.org,istresearch/readthedocs.org,techtonik/readthedocs.org,gjtorikian/readthedocs.org,espdev/readthedocs.org,techtonik/readthedocs.org,tddv/readthedocs.org,safwanrahman/readthedocs.org,stevepiercy/readthedocs.org,rtfd/readthedocs.org,tddv/readthedocs.org,SteveViss/readthedocs.org,SteveViss/readthedocs.org,espdev/readthedocs.org,emawind84/readthedocs.org,gjtorikian/readthedocs.org,techtonik/readthedocs.org,pombredanne/readthedocs.org,istresearch/readthedocs.org,rtfd/readthedocs.org,safwanrahman/readthedocs.org,techtonik/readthedocs.org,clarkperkins/readthedocs.org
html
## Code Before: {% extends "projects/project_edit_base.html" %} {% load i18n %} {% block title %}{% trans "Edit Domains" %}{% endblock %} {% block nav-dashboard %} class="active"{% endblock %} {% block editing-option-edit-proj %}class="active"{% endblock %} {% block project-domains-active %}active{% endblock %} {% block project_edit_content_header %}{% trans "Domains" %}{% endblock %} {% block project_edit_content %} <h3> {% trans "Existing Domains" %} </h3> <p> <ul> {% for relationship in domains %} <li> <a href="{{ relationship.get_absolute_url }}"> {{ relationship.child }} </a> (<a href="{% url "projects_domains_delete" relationship.parent.slug relationship.child.slug %}">{% trans "Remove" %}</a>) </li> {% endfor %} </ul> <p> {% trans "Choose which project you would like to add as a domain." %} </p> {% if domain %} {% url 'projects_domains_create' project.slug as action_url %} {% else %} {% url 'projects_domains_edit' project.slug domain.pk as action_url %} {% endif %} <form method="post" action="{{ action_url }}">{% csrf_token %} {{ form.as_p }} <p> <input style="display: inline;" type="submit" value="{% trans "Submit" %}"> </p> </form> {% endblock %} ## Instruction: Fix logic around Create/Delete of domains ## Code After: {% extends "projects/project_edit_base.html" %} {% load i18n %} {% block title %}{% trans "Edit Domains" %}{% endblock %} {% block nav-dashboard %} class="active"{% endblock %} {% block editing-option-edit-proj %}class="active"{% endblock %} {% block project-domains-active %}active{% endblock %} {% block project_edit_content_header %} {% if domain %} {% trans "Edit Domain" %} {% else %} {% trans "Create Domain" %} {% endif %} {% endblock %} {% block project_edit_content %} {% if domain %} {% url 'projects_domains_edit' project.slug domain.pk as action_url %} {% else %} {% url 'projects_domains_create' project.slug as action_url %} {% endif %} <form method="post" action="{{ action_url }}">{% csrf_token %} {{ form.as_p }} <p> <input style="display: inline;" type="submit" value="{% trans "Submit" %}"> </p> </form> {% endblock %}
{% extends "projects/project_edit_base.html" %} {% load i18n %} {% block title %}{% trans "Edit Domains" %}{% endblock %} {% block nav-dashboard %} class="active"{% endblock %} {% block editing-option-edit-proj %}class="active"{% endblock %} {% block project-domains-active %}active{% endblock %} - {% block project_edit_content_header %}{% trans "Domains" %}{% endblock %} + + {% block project_edit_content_header %} + + {% if domain %} + {% trans "Edit Domain" %} + {% else %} + {% trans "Create Domain" %} + {% endif %} + + {% endblock %} {% block project_edit_content %} - <h3> {% trans "Existing Domains" %} </h3> - <p> - <ul> - {% for relationship in domains %} - <li> - <a href="{{ relationship.get_absolute_url }}"> - {{ relationship.child }} - </a> - (<a href="{% url "projects_domains_delete" relationship.parent.slug relationship.child.slug %}">{% trans "Remove" %}</a>) - </li> - {% endfor %} - </ul> - <p> - {% trans "Choose which project you would like to add as a domain." %} - </p> {% if domain %} + {% url 'projects_domains_edit' project.slug domain.pk as action_url %} + {% else %} {% url 'projects_domains_create' project.slug as action_url %} - {% else %} - {% url 'projects_domains_edit' project.slug domain.pk as action_url %} {% endif %} <form method="post" action="{{ action_url }}">{% csrf_token %} {{ form.as_p }} <p> <input style="display: inline;" type="submit" value="{% trans "Submit" %}"> </p> </form> {% endblock %}
30
0.714286
12
18
e2bc9a3d14d08ddfaeb08b02065a6adb026e7582
nixos/modules/installer/cd-dvd/installation-cd-base.nix
nixos/modules/installer/cd-dvd/installation-cd-base.nix
{ config, pkgs, ... }: with pkgs.lib; { imports = [ ./channel.nix ./iso-image.nix # Profiles of this basic installation CD. ../../profiles/all-hardware.nix ../../profiles/base.nix ../../profiles/installation-device.nix ]; # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_${config.system.nixosVersion}"; # Make the installer more likely to succeed in low memory # environments. The kernel's overcommit heustistics bite us # fairly often, preventing processes such as nix-worker or # download-using-manifests.pl from forking even if there is # plenty of free memory. boot.kernel.sysctl."vm.overcommit_memory" = "1"; # To speed up installation a little bit, include the complete stdenv # in the Nix store on the CD. isoImage.storeContents = [ pkgs.stdenv pkgs.busybox ]; # EFI booting isoImage.makeEfiBootable = true; # Add Memtest86+ to the CD. boot.loader.grub.memtest86.enable = true; # Get a console as soon as the initrd loads fbcon on EFI boot boot.initrd.kernelModules = [ "fbcon" ]; }
{ config, pkgs, ... }: with pkgs.lib; { imports = [ ./channel.nix ./iso-image.nix # Profiles of this basic installation CD. ../../profiles/all-hardware.nix ../../profiles/base.nix ../../profiles/installation-device.nix ]; # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_${config.system.nixosVersion}"; # Make the installer more likely to succeed in low memory # environments. The kernel's overcommit heustistics bite us # fairly often, preventing processes such as nix-worker or # download-using-manifests.pl from forking even if there is # plenty of free memory. boot.kernel.sysctl."vm.overcommit_memory" = "1"; # To speed up installation a little bit, include the complete stdenv # in the Nix store on the CD. Archive::Cpio is needed for the # initrd builder. isoImage.storeContents = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ]; # EFI booting isoImage.makeEfiBootable = true; # Add Memtest86+ to the CD. boot.loader.grub.memtest86.enable = true; # Get a console as soon as the initrd loads fbcon on EFI boot boot.initrd.kernelModules = [ "fbcon" ]; }
Include Archive::Cpio in the installation CD
Include Archive::Cpio in the installation CD http://hydra.nixos.org/build/10268978
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton
nix
## Code Before: { config, pkgs, ... }: with pkgs.lib; { imports = [ ./channel.nix ./iso-image.nix # Profiles of this basic installation CD. ../../profiles/all-hardware.nix ../../profiles/base.nix ../../profiles/installation-device.nix ]; # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_${config.system.nixosVersion}"; # Make the installer more likely to succeed in low memory # environments. The kernel's overcommit heustistics bite us # fairly often, preventing processes such as nix-worker or # download-using-manifests.pl from forking even if there is # plenty of free memory. boot.kernel.sysctl."vm.overcommit_memory" = "1"; # To speed up installation a little bit, include the complete stdenv # in the Nix store on the CD. isoImage.storeContents = [ pkgs.stdenv pkgs.busybox ]; # EFI booting isoImage.makeEfiBootable = true; # Add Memtest86+ to the CD. boot.loader.grub.memtest86.enable = true; # Get a console as soon as the initrd loads fbcon on EFI boot boot.initrd.kernelModules = [ "fbcon" ]; } ## Instruction: Include Archive::Cpio in the installation CD http://hydra.nixos.org/build/10268978 ## Code After: { config, pkgs, ... }: with pkgs.lib; { imports = [ ./channel.nix ./iso-image.nix # Profiles of this basic installation CD. ../../profiles/all-hardware.nix ../../profiles/base.nix ../../profiles/installation-device.nix ]; # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_${config.system.nixosVersion}"; # Make the installer more likely to succeed in low memory # environments. The kernel's overcommit heustistics bite us # fairly often, preventing processes such as nix-worker or # download-using-manifests.pl from forking even if there is # plenty of free memory. boot.kernel.sysctl."vm.overcommit_memory" = "1"; # To speed up installation a little bit, include the complete stdenv # in the Nix store on the CD. Archive::Cpio is needed for the # initrd builder. isoImage.storeContents = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ]; # EFI booting isoImage.makeEfiBootable = true; # Add Memtest86+ to the CD. boot.loader.grub.memtest86.enable = true; # Get a console as soon as the initrd loads fbcon on EFI boot boot.initrd.kernelModules = [ "fbcon" ]; }
{ config, pkgs, ... }: with pkgs.lib; { imports = [ ./channel.nix ./iso-image.nix # Profiles of this basic installation CD. ../../profiles/all-hardware.nix ../../profiles/base.nix ../../profiles/installation-device.nix ]; # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_${config.system.nixosVersion}"; # Make the installer more likely to succeed in low memory # environments. The kernel's overcommit heustistics bite us # fairly often, preventing processes such as nix-worker or # download-using-manifests.pl from forking even if there is # plenty of free memory. boot.kernel.sysctl."vm.overcommit_memory" = "1"; # To speed up installation a little bit, include the complete stdenv - # in the Nix store on the CD. + # in the Nix store on the CD. Archive::Cpio is needed for the + # initrd builder. - isoImage.storeContents = [ pkgs.stdenv pkgs.busybox ]; + isoImage.storeContents = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ]; ? ++++++++++++++++++++++++++++++ # EFI booting isoImage.makeEfiBootable = true; # Add Memtest86+ to the CD. boot.loader.grub.memtest86.enable = true; # Get a console as soon as the initrd loads fbcon on EFI boot boot.initrd.kernelModules = [ "fbcon" ]; }
5
0.121951
3
2
caad543c01c40571fd4dcab699de6ae4476d3201
_posts/2016-07-12-2-driverless-car-simple-pid-path-tracking.md
_posts/2016-07-12-2-driverless-car-simple-pid-path-tracking.md
--- layout: post title: "2. Driverless Car: Simple PID - Path Tracking(smoothed path)" tags: - Driverless Car - PID controller --- My RC car's steering angle is 18 degrees maximum. It can't handle sharp turns very well. One way to address this issue is path-smoothing. The video below compares sharp turns and smoothed turns. While the car crashes when the turns are 90 degrees sharp, it can make it to the goal position in the smoothed path with relative ease. <iframe width="560" height="315" src="https://www.youtube.com/embed/Y4gmFlt0NCU" frameborder="0" allowfullscreen></iframe> Gradient descent is used to smooth the given path in terms of waypoints in the video. To find out how, please see the [notebook][1]. [Arduino source code][2] is also available. [1]: https://github.com/gokhanettin/driverless-car-notes/tree/v0.1.1 [2]: https://github.com/gokhanettin/driverless-car/tree/v0.1.1
--- layout: post title: "2. Driverless Car: Simple PID - Path Tracking(smoothed path)" tags: - Driverless Car - PID controller --- My RC car's steering angle is 18 degrees maximum. It can't handle sharp turns very well. One way to address this issue is path-smoothing. The video below compares sharp turns and smoothed turns. While the car crashes into the wall when the turns are 90 degrees sharp, it can make it to the goal position in the smoothed path with relative ease. <iframe width="560" height="315" src="https://www.youtube.com/embed/Y4gmFlt0NCU" frameborder="0" allowfullscreen></iframe> Gradient descent is used to smooth the given path in terms of waypoints in the video. To find out how, please see the [notebook][1]. [Arduino source code][2] is also available. Note that steering PID derivative coefficient of real RC car is lowered by one to reduce steering oscillation. [1]: https://github.com/gokhanettin/driverless-car-notes/tree/v0.1.1 [2]: https://github.com/gokhanettin/driverless-car/tree/v0.1.1
Add note on steering D term
Add note on steering D term
Markdown
mit
gokhanettin/gokhanettin.github.io,gokhanettin/gokhanettin.github.io,gokhanettin/gokhanettin.github.io
markdown
## Code Before: --- layout: post title: "2. Driverless Car: Simple PID - Path Tracking(smoothed path)" tags: - Driverless Car - PID controller --- My RC car's steering angle is 18 degrees maximum. It can't handle sharp turns very well. One way to address this issue is path-smoothing. The video below compares sharp turns and smoothed turns. While the car crashes when the turns are 90 degrees sharp, it can make it to the goal position in the smoothed path with relative ease. <iframe width="560" height="315" src="https://www.youtube.com/embed/Y4gmFlt0NCU" frameborder="0" allowfullscreen></iframe> Gradient descent is used to smooth the given path in terms of waypoints in the video. To find out how, please see the [notebook][1]. [Arduino source code][2] is also available. [1]: https://github.com/gokhanettin/driverless-car-notes/tree/v0.1.1 [2]: https://github.com/gokhanettin/driverless-car/tree/v0.1.1 ## Instruction: Add note on steering D term ## Code After: --- layout: post title: "2. Driverless Car: Simple PID - Path Tracking(smoothed path)" tags: - Driverless Car - PID controller --- My RC car's steering angle is 18 degrees maximum. It can't handle sharp turns very well. One way to address this issue is path-smoothing. The video below compares sharp turns and smoothed turns. While the car crashes into the wall when the turns are 90 degrees sharp, it can make it to the goal position in the smoothed path with relative ease. <iframe width="560" height="315" src="https://www.youtube.com/embed/Y4gmFlt0NCU" frameborder="0" allowfullscreen></iframe> Gradient descent is used to smooth the given path in terms of waypoints in the video. To find out how, please see the [notebook][1]. [Arduino source code][2] is also available. Note that steering PID derivative coefficient of real RC car is lowered by one to reduce steering oscillation. [1]: https://github.com/gokhanettin/driverless-car-notes/tree/v0.1.1 [2]: https://github.com/gokhanettin/driverless-car/tree/v0.1.1
--- layout: post title: "2. Driverless Car: Simple PID - Path Tracking(smoothed path)" tags: - Driverless Car - PID controller --- My RC car's steering angle is 18 degrees maximum. It can't handle sharp turns very well. One way to address this issue is path-smoothing. The video below compares sharp turns and smoothed turns. While the car crashes - when the turns are 90 degrees sharp, it can make it to the goal position in the ? ---------------- + into the wall when the turns are 90 degrees sharp, it can make it to the goal ? ++++++++++++++ - smoothed path with relative ease. + position in the smoothed path with relative ease. ? ++++++++++++++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/Y4gmFlt0NCU" frameborder="0" allowfullscreen></iframe> Gradient descent is used to smooth the given path in terms of waypoints in the video. To find out how, please see the [notebook][1]. [Arduino source code][2] - is also available. + is also available. Note that steering PID derivative coefficient of real RC car + is lowered by one to reduce steering oscillation. [1]: https://github.com/gokhanettin/driverless-car-notes/tree/v0.1.1 [2]: https://github.com/gokhanettin/driverless-car/tree/v0.1.1
7
0.304348
4
3
de8d24de33ad613fb668501c621e715744034133
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
!!! 5 %html %head %title WebLapine = stylesheet_link_tag :all = javascript_include_tag :defaults = csrf_meta_tag %body %h1 WebLapine %ul#menu %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues' = yield
!!! 5 %html %head %title WebLapine = stylesheet_link_tag :all = javascript_include_tag :defaults = csrf_meta_tag %body %h1 WebLapine %ul#menu %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues' %li= link_to 'RSS', url_for(:format => :rss) = yield
Add a link to RSS
Add a link to RSS
Haml
mit
AlSquire/WebLapine,AlSquire/WebLapine
haml
## Code Before: !!! 5 %html %head %title WebLapine = stylesheet_link_tag :all = javascript_include_tag :defaults = csrf_meta_tag %body %h1 WebLapine %ul#menu %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues' = yield ## Instruction: Add a link to RSS ## Code After: !!! 5 %html %head %title WebLapine = stylesheet_link_tag :all = javascript_include_tag :defaults = csrf_meta_tag %body %h1 WebLapine %ul#menu %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues' %li= link_to 'RSS', url_for(:format => :rss) = yield
!!! 5 %html %head %title WebLapine = stylesheet_link_tag :all = javascript_include_tag :defaults = csrf_meta_tag %body %h1 WebLapine %ul#menu %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues' + %li= link_to 'RSS', url_for(:format => :rss) = yield
1
0.076923
1
0
7da5cc073e165ce3440e8aeed0a3d7c780f09064
pubspec.yaml
pubspec.yaml
name: archive version: 1.0.20 author: Brendan Duncan <brendanduncan@gmail.com> description: Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, and zlib. homepage: https://github.com/brendan-duncan/archive environment: sdk: '>=1.0.0 <2.0.0' documentation: https://github.com/brendan-duncan/archive/wiki dependencies: crypto: '>=1.0.0 <2.0.0' dev_dependencies: args: '>=0.10.0 <1.0.0' browser: any test: '>=0.12.13 <1.0.0'
name: archive version: 1.0.20 author: Brendan Duncan <brendanduncan@gmail.com> description: Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, and zlib. homepage: https://github.com/brendan-duncan/archive environment: sdk: '>=1.0.0 <2.0.0' documentation: https://github.com/brendan-duncan/archive/wiki dependencies: crypto: '>=1.0.0 <2.0.0' args: '>=0.10.0 <1.0.0' dev_dependencies: browser: any test: '>=0.12.13 <1.0.0'
Move args from dev_dependencies to dependencies
Move args from dev_dependencies to dependencies
YAML
mit
brendan-duncan/archive,brendan-duncan/archive
yaml
## Code Before: name: archive version: 1.0.20 author: Brendan Duncan <brendanduncan@gmail.com> description: Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, and zlib. homepage: https://github.com/brendan-duncan/archive environment: sdk: '>=1.0.0 <2.0.0' documentation: https://github.com/brendan-duncan/archive/wiki dependencies: crypto: '>=1.0.0 <2.0.0' dev_dependencies: args: '>=0.10.0 <1.0.0' browser: any test: '>=0.12.13 <1.0.0' ## Instruction: Move args from dev_dependencies to dependencies ## Code After: name: archive version: 1.0.20 author: Brendan Duncan <brendanduncan@gmail.com> description: Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, and zlib. homepage: https://github.com/brendan-duncan/archive environment: sdk: '>=1.0.0 <2.0.0' documentation: https://github.com/brendan-duncan/archive/wiki dependencies: crypto: '>=1.0.0 <2.0.0' args: '>=0.10.0 <1.0.0' dev_dependencies: browser: any test: '>=0.12.13 <1.0.0'
name: archive version: 1.0.20 author: Brendan Duncan <brendanduncan@gmail.com> description: Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, and zlib. homepage: https://github.com/brendan-duncan/archive environment: sdk: '>=1.0.0 <2.0.0' documentation: https://github.com/brendan-duncan/archive/wiki dependencies: crypto: '>=1.0.0 <2.0.0' + args: '>=0.10.0 <1.0.0' dev_dependencies: - args: '>=0.10.0 <1.0.0' browser: any test: '>=0.12.13 <1.0.0'
2
0.142857
1
1
983cf886b8c015ef6529b322cd5d32eea5516b58
circle.yml
circle.yml
machine: node: version: 6.5.0
machine: node: version: 6.5.0 post: - npm install -g npm@3.x.x deployment: production: branch: master heroku: appname: longboardzone
Add CircleCi deploy to Heroku config
chore: Add CircleCi deploy to Heroku config
YAML
mit
oric01/LongboardZone,oric01/LongboardZone,oric01/LongboardZone
yaml
## Code Before: machine: node: version: 6.5.0 ## Instruction: chore: Add CircleCi deploy to Heroku config ## Code After: machine: node: version: 6.5.0 post: - npm install -g npm@3.x.x deployment: production: branch: master heroku: appname: longboardzone
machine: node: version: 6.5.0 + post: + - npm install -g npm@3.x.x + deployment: + production: + branch: master + heroku: + appname: longboardzone
7
2.333333
7
0
4b479f671156db716f986144b9950865792ac0f4
src/index.js
src/index.js
const express = require('express'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const logger = require('./logger'); const streamClient = require('./streamClient'); const sendEmail = require('./sendEmail'); const app = express(); if (process.env.NODE_ENV !== 'test') { app.use(morgan('dev')); } app.use(bodyParser.json()); streamClient.on('send-email', sendEmail); app.post('/events', streamClient.listen()); app.listen(3001, () => { logger.info('Listening for events'); });
const express = require('express'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const logger = require('./logger'); const streamClient = require('./streamClient'); const sendEmail = require('./sendEmail'); const app = express(); if (process.env.NODE_ENV !== 'test') { app.use(morgan('dev')); } app.use(bodyParser.json()); streamClient.on('send-email', sendEmail); app.post('/events', streamClient.listen()); app.listen(process.env.PORT || 3001, () => { logger.info('Listening for events'); });
Make the port overridable from the environment
Make the port overridable from the environment
JavaScript
agpl-3.0
rabblerouser/mailer,rabblerouser/mailer
javascript
## Code Before: const express = require('express'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const logger = require('./logger'); const streamClient = require('./streamClient'); const sendEmail = require('./sendEmail'); const app = express(); if (process.env.NODE_ENV !== 'test') { app.use(morgan('dev')); } app.use(bodyParser.json()); streamClient.on('send-email', sendEmail); app.post('/events', streamClient.listen()); app.listen(3001, () => { logger.info('Listening for events'); }); ## Instruction: Make the port overridable from the environment ## Code After: const express = require('express'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const logger = require('./logger'); const streamClient = require('./streamClient'); const sendEmail = require('./sendEmail'); const app = express(); if (process.env.NODE_ENV !== 'test') { app.use(morgan('dev')); } app.use(bodyParser.json()); streamClient.on('send-email', sendEmail); app.post('/events', streamClient.listen()); app.listen(process.env.PORT || 3001, () => { logger.info('Listening for events'); });
const express = require('express'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const logger = require('./logger'); const streamClient = require('./streamClient'); const sendEmail = require('./sendEmail'); const app = express(); if (process.env.NODE_ENV !== 'test') { app.use(morgan('dev')); } app.use(bodyParser.json()); streamClient.on('send-email', sendEmail); app.post('/events', streamClient.listen()); - app.listen(3001, () => { + app.listen(process.env.PORT || 3001, () => { logger.info('Listening for events'); });
2
0.1
1
1
81836875c1f4ac5cd732e21acafbb86dd77fa5f7
doc/ReleaseNotes.md
doc/ReleaseNotes.md
* Smaller rule changes (disable SA1513 and SA1516 because they are not compatible with no empty line between C# getters and setters and R# has no settings for it to insert the blank line on full-cleanup). * Update documentation and add a how-to for creating packages (https://aitgmbh.github.io/ApplyCompanyPolicy.Template/CreatePackage.html). ### 1.3.0-alpha6 * remove 'this.' on full cleanup. ### 1.3.0-alpha5 * Update description on the nuget page. ### 1.3.0-alpha4 * Don't show hint to insert 'this' when no 'this' is used. ### 1.3.0-alpha3 * Rename repository and all links. ### 1.3.0-alpha2 * Make sure the package is installable by including "ghost" references to the System framework assembly. ### 1.3.0-alpha1 * fixed some inconsistencies between R# and StyleCop. * enabled some ordering rules, in combination with a R# configuration to automatically create the ordering.
* Fix issue #3 - Whole ItemGroup of existing CodeAnalysisDictionary is removed on installation ### 1.3.0 * Smaller rule changes (disable SA1513 and SA1516 because they are not compatible with no empty line between C# getters and setters and R# has no settings for it to insert the blank line on full-cleanup). * Update documentation and add a how-to for creating packages (https://aitgmbh.github.io/ApplyCompanyPolicy.Template/CreatePackage.html). ### 1.3.0-alpha6 * remove 'this.' on full cleanup. ### 1.3.0-alpha5 * Update description on the nuget page. ### 1.3.0-alpha4 * Don't show hint to insert 'this' when no 'this' is used. ### 1.3.0-alpha3 * Rename repository and all links. ### 1.3.0-alpha2 * Make sure the package is installable by including "ghost" references to the System framework assembly. ### 1.3.0-alpha1 * fixed some inconsistencies between R# and StyleCop. * enabled some ordering rules, in combination with a R# configuration to automatically create the ordering.
Update release notes for 1.4.0-alpha1
Update release notes for 1.4.0-alpha1
Markdown
mit
AITGmbH/ApplyCompanyPolicy.Template,AITGmbH/ApplyCompanyPolicy.Template,AITGmbH/AIT-Apply-Company-Policy-SDK,AITGmbH/AIT-Apply-Company-Policy-SDK
markdown
## Code Before: * Smaller rule changes (disable SA1513 and SA1516 because they are not compatible with no empty line between C# getters and setters and R# has no settings for it to insert the blank line on full-cleanup). * Update documentation and add a how-to for creating packages (https://aitgmbh.github.io/ApplyCompanyPolicy.Template/CreatePackage.html). ### 1.3.0-alpha6 * remove 'this.' on full cleanup. ### 1.3.0-alpha5 * Update description on the nuget page. ### 1.3.0-alpha4 * Don't show hint to insert 'this' when no 'this' is used. ### 1.3.0-alpha3 * Rename repository and all links. ### 1.3.0-alpha2 * Make sure the package is installable by including "ghost" references to the System framework assembly. ### 1.3.0-alpha1 * fixed some inconsistencies between R# and StyleCop. * enabled some ordering rules, in combination with a R# configuration to automatically create the ordering. ## Instruction: Update release notes for 1.4.0-alpha1 ## Code After: * Fix issue #3 - Whole ItemGroup of existing CodeAnalysisDictionary is removed on installation ### 1.3.0 * Smaller rule changes (disable SA1513 and SA1516 because they are not compatible with no empty line between C# getters and setters and R# has no settings for it to insert the blank line on full-cleanup). * Update documentation and add a how-to for creating packages (https://aitgmbh.github.io/ApplyCompanyPolicy.Template/CreatePackage.html). ### 1.3.0-alpha6 * remove 'this.' on full cleanup. ### 1.3.0-alpha5 * Update description on the nuget page. ### 1.3.0-alpha4 * Don't show hint to insert 'this' when no 'this' is used. ### 1.3.0-alpha3 * Rename repository and all links. ### 1.3.0-alpha2 * Make sure the package is installable by including "ghost" references to the System framework assembly. ### 1.3.0-alpha1 * fixed some inconsistencies between R# and StyleCop. * enabled some ordering rules, in combination with a R# configuration to automatically create the ordering.
+ + * Fix issue #3 - Whole ItemGroup of existing CodeAnalysisDictionary is removed on installation + + ### 1.3.0 * Smaller rule changes (disable SA1513 and SA1516 because they are not compatible with no empty line between C# getters and setters and R# has no settings for it to insert the blank line on full-cleanup). * Update documentation and add a how-to for creating packages (https://aitgmbh.github.io/ApplyCompanyPolicy.Template/CreatePackage.html). ### 1.3.0-alpha6 * remove 'this.' on full cleanup. ### 1.3.0-alpha5 * Update description on the nuget page. ### 1.3.0-alpha4 * Don't show hint to insert 'this' when no 'this' is used. ### 1.3.0-alpha3 * Rename repository and all links. ### 1.3.0-alpha2 * Make sure the package is installable by including "ghost" references to the System framework assembly. ### 1.3.0-alpha1 * fixed some inconsistencies between R# and StyleCop. * enabled some ordering rules, in combination with a R# configuration to automatically create the ordering.
4
0.142857
4
0
05b680c5c76189eaf35ab99ead2c4766ff74d502
sample/frontend/src/components/EventLog/EventLog.js
sample/frontend/src/components/EventLog/EventLog.js
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import RawViewLink from '../RawView/RawViewLink' import Event from './Event' import './EventLog.css' const propTypes = { events: PropTypes.arrayOf(PropTypes.object).isRequired } function EventLog ({ events }) { return ( <section className='EventLog'> <h3>Recent events</h3> <RawViewLink className='EventLog-raw' contentTitle='GET /api/events' rawContent={events} /> <ul className='EventLogList'> {events.map((event, index) => <Event key={index} event={event} />)} </ul> </section> ) } EventLog.propTypes = propTypes function mapStateToProps (state) { return { events: state.events } } export default connect(mapStateToProps)(EventLog)
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import RawViewLink from '../RawView/RawViewLink' import Event from './Event' import './EventLog.css' const propTypes = { events: PropTypes.arrayOf(PropTypes.object).isRequired } function EventLog ({ events }) { const by = (prop) => (a, b) => (a[ prop ] > b[ prop ] ? 1 : -1) const sortedEvents = [].concat(events).sort(by('timestamp')).reverse() return ( <section className='EventLog'> <h3>Recent events</h3> <RawViewLink className='EventLog-raw' contentTitle='GET /api/events' rawContent={sortedEvents} /> <ul className='EventLogList'> {sortedEvents.map((event, index) => <Event key={index} event={event} />)} </ul> </section> ) } EventLog.propTypes = propTypes function mapStateToProps (state) { return { events: state.events } } export default connect(mapStateToProps)(EventLog)
Fix sample frontend event order
Fix sample frontend event order
JavaScript
mit
flux-capacitor/flux-capacitor,flux-capacitor/cli,flux-capacitor/flux-capacitor
javascript
## Code Before: import React, { PropTypes } from 'react' import { connect } from 'react-redux' import RawViewLink from '../RawView/RawViewLink' import Event from './Event' import './EventLog.css' const propTypes = { events: PropTypes.arrayOf(PropTypes.object).isRequired } function EventLog ({ events }) { return ( <section className='EventLog'> <h3>Recent events</h3> <RawViewLink className='EventLog-raw' contentTitle='GET /api/events' rawContent={events} /> <ul className='EventLogList'> {events.map((event, index) => <Event key={index} event={event} />)} </ul> </section> ) } EventLog.propTypes = propTypes function mapStateToProps (state) { return { events: state.events } } export default connect(mapStateToProps)(EventLog) ## Instruction: Fix sample frontend event order ## Code After: import React, { PropTypes } from 'react' import { connect } from 'react-redux' import RawViewLink from '../RawView/RawViewLink' import Event from './Event' import './EventLog.css' const propTypes = { events: PropTypes.arrayOf(PropTypes.object).isRequired } function EventLog ({ events }) { const by = (prop) => (a, b) => (a[ prop ] > b[ prop ] ? 1 : -1) const sortedEvents = [].concat(events).sort(by('timestamp')).reverse() return ( <section className='EventLog'> <h3>Recent events</h3> <RawViewLink className='EventLog-raw' contentTitle='GET /api/events' rawContent={sortedEvents} /> <ul className='EventLogList'> {sortedEvents.map((event, index) => <Event key={index} event={event} />)} </ul> </section> ) } EventLog.propTypes = propTypes function mapStateToProps (state) { return { events: state.events } } export default connect(mapStateToProps)(EventLog)
import React, { PropTypes } from 'react' import { connect } from 'react-redux' import RawViewLink from '../RawView/RawViewLink' import Event from './Event' import './EventLog.css' const propTypes = { events: PropTypes.arrayOf(PropTypes.object).isRequired } function EventLog ({ events }) { + const by = (prop) => (a, b) => (a[ prop ] > b[ prop ] ? 1 : -1) + const sortedEvents = [].concat(events).sort(by('timestamp')).reverse() + return ( <section className='EventLog'> <h3>Recent events</h3> - <RawViewLink className='EventLog-raw' contentTitle='GET /api/events' rawContent={events} /> + <RawViewLink className='EventLog-raw' contentTitle='GET /api/events' rawContent={sortedEvents} /> ? ++++ ++ <ul className='EventLogList'> - {events.map((event, index) => <Event key={index} event={event} />)} + {sortedEvents.map((event, index) => <Event key={index} event={event} />)} ? ++++ ++ </ul> </section> ) } EventLog.propTypes = propTypes function mapStateToProps (state) { return { events: state.events } } export default connect(mapStateToProps)(EventLog)
7
0.21875
5
2
99c3da6f8863b62244802e1e6e3c0464829b08aa
_config.yml
_config.yml
title: G Roques email: your-email@domain.com description: > # this means to ignore newlines until "baseurl:" Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description. baseurl: "/gbroques" # the subpath of your site, e.g. /blog url: "gbroques.github.io" # the base hostname & protocol for your site twitter_username: jekyllrb github_username: jekyll # Build settings markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge repository: gbroques/gbroques encoding: utf-8
title: G Roques email: your-email@domain.com description: > # this means to ignore newlines until "baseurl:" Hi I'm G Roques. Currently I'm attending UMSL for my undergraduate degree in computer science and work as web developer for FitnessRepairParts.com. This website is my personal blog and portfolio, and is still under active development. baseurl: "" # the subpath of your site, e.g. /blog url: "groques.com" # the base hostname & protocol for your site twitter_username: jekyllrb github_username: jekyll # Build settings markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge repository: gbroques/gbroques encoding: utf-8
Add site description and change url to groques.com
Add site description and change url to groques.com
YAML
mit
gbroques/groques.com,gbroques/groques.com,gbroques/groques.com,gbroques/groques.com
yaml
## Code Before: title: G Roques email: your-email@domain.com description: > # this means to ignore newlines until "baseurl:" Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description. baseurl: "/gbroques" # the subpath of your site, e.g. /blog url: "gbroques.github.io" # the base hostname & protocol for your site twitter_username: jekyllrb github_username: jekyll # Build settings markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge repository: gbroques/gbroques encoding: utf-8 ## Instruction: Add site description and change url to groques.com ## Code After: title: G Roques email: your-email@domain.com description: > # this means to ignore newlines until "baseurl:" Hi I'm G Roques. Currently I'm attending UMSL for my undergraduate degree in computer science and work as web developer for FitnessRepairParts.com. This website is my personal blog and portfolio, and is still under active development. baseurl: "" # the subpath of your site, e.g. /blog url: "groques.com" # the base hostname & protocol for your site twitter_username: jekyllrb github_username: jekyll # Build settings markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge repository: gbroques/gbroques encoding: utf-8
title: G Roques email: your-email@domain.com description: > # this means to ignore newlines until "baseurl:" + Hi I'm G Roques. Currently I'm attending UMSL for my undergraduate degree in computer science and work as web developer for FitnessRepairParts.com. This website is my personal blog and portfolio, and is still under active development. - Write an awesome description for your new site here. You can edit this - line in _config.yml. It will appear in your document head meta (for - Google search results) and in your feed.xml site description. - baseurl: "/gbroques" # the subpath of your site, e.g. /blog ? --------- + baseurl: "" # the subpath of your site, e.g. /blog - url: "gbroques.github.io" # the base hostname & protocol for your site ? - ^^^^^^^^ + url: "groques.com" # the base hostname & protocol for your site ? ^ + twitter_username: jekyllrb github_username: jekyll # Build settings markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge repository: gbroques/gbroques encoding: utf-8
8
0.347826
3
5
be6b1d23b0f48ab423e2289cf86df2b74e8cd024
clients/java/java-fluent-http/src/main/java/xcarpaccio/WebConfiguration.java
clients/java/java-fluent-http/src/main/java/xcarpaccio/WebConfiguration.java
package xcarpaccio; import net.codestory.http.Configuration; import net.codestory.http.payload.Payload; import net.codestory.http.routes.Routes; public class WebConfiguration implements Configuration { private final Logger logger = new Logger(); @Override public void configure(Routes routes) { routes. get("/ping", "pong"). post("/feedback", (context) -> { Message message = context.extract(Message.class); logger.log(message.type + ": " + message.content); return new Payload(204); }). post("/", (context) -> { String method = context.method(); String uri = context.uri(); String body = context.extract(String.class); logger.log(method + " " + uri + " " + body); return new Payload(204); }) ; } }
package xcarpaccio; import net.codestory.http.Configuration; import net.codestory.http.payload.Payload; import net.codestory.http.routes.Routes; public class WebConfiguration implements Configuration { private final Logger logger = new Logger(); @Override public void configure(Routes routes) { routes. get("/ping", "pong"). post("/feedback", (context) -> { Message message = context.extract(Message.class); logger.log(message.type + ": " + message.content); return new Payload(204); }). anyPost(context -> { String method = context.method(); String uri = context.uri(); String body = context.extract(String.class); logger.log(method + " " + uri + " " + body); return new Payload(204); }) ; } }
Use anyPost instead of POST / to catch all POST on /*
Use anyPost instead of POST / to catch all POST on /*
Java
bsd-3-clause
octo-technology/extreme-carpaccio,jak78/extreme-carpaccio,octo-technology/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,octo-technology/extreme-carpaccio,jak78/extreme-carpaccio,octo-technology/extreme-carpaccio,octo-technology/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,octo-technology/extreme-carpaccio,octo-technology/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,octo-technology/extreme-carpaccio,octo-technology/extreme-carpaccio,dlresende/extreme-carpaccio
java
## Code Before: package xcarpaccio; import net.codestory.http.Configuration; import net.codestory.http.payload.Payload; import net.codestory.http.routes.Routes; public class WebConfiguration implements Configuration { private final Logger logger = new Logger(); @Override public void configure(Routes routes) { routes. get("/ping", "pong"). post("/feedback", (context) -> { Message message = context.extract(Message.class); logger.log(message.type + ": " + message.content); return new Payload(204); }). post("/", (context) -> { String method = context.method(); String uri = context.uri(); String body = context.extract(String.class); logger.log(method + " " + uri + " " + body); return new Payload(204); }) ; } } ## Instruction: Use anyPost instead of POST / to catch all POST on /* ## Code After: package xcarpaccio; import net.codestory.http.Configuration; import net.codestory.http.payload.Payload; import net.codestory.http.routes.Routes; public class WebConfiguration implements Configuration { private final Logger logger = new Logger(); @Override public void configure(Routes routes) { routes. get("/ping", "pong"). post("/feedback", (context) -> { Message message = context.extract(Message.class); logger.log(message.type + ": " + message.content); return new Payload(204); }). anyPost(context -> { String method = context.method(); String uri = context.uri(); String body = context.extract(String.class); logger.log(method + " " + uri + " " + body); return new Payload(204); }) ; } }
package xcarpaccio; import net.codestory.http.Configuration; import net.codestory.http.payload.Payload; import net.codestory.http.routes.Routes; public class WebConfiguration implements Configuration { private final Logger logger = new Logger(); @Override public void configure(Routes routes) { routes. get("/ping", "pong"). post("/feedback", (context) -> { Message message = context.extract(Message.class); logger.log(message.type + ": " + message.content); return new Payload(204); }). - post("/", (context) -> { ? ^ ------ - + anyPost(context -> { ? ^^^^ String method = context.method(); String uri = context.uri(); String body = context.extract(String.class); logger.log(method + " " + uri + " " + body); return new Payload(204); }) ; } }
2
0.068966
1
1
52e3c800f39ad7e73abff335ef675a59b58b0cf4
docker/docker.sh
docker/docker.sh
TMP=run/tmp rm -rf build/bosun $TMP git clone -b master --single-branch --depth 1 .. build/bosun docker build -t bosun-build build ID=$(docker run -d bosun-build) mkdir -p $TMP/hbase $TMP/bosun $TMP/tsdb docker cp ${ID}:/go/bin/bosun $TMP/bosun docker cp ${ID}:/hbase $TMP docker cp ${ID}:/tsdb $TMP docker kill ${ID} docker rm ${ID} rm -rf $TMP/hbase/hbase-*/docs $TMP/tsdb/build/gwt-unitCache cp -R ../web $TMP/bosun docker build -t stackexchange/bosun run rm -rf build/bosun $TMP echo bosun docker image built
TMP=run/tmp rm -rf build/bosun $TMP git clone -b master --single-branch .. build/bosun docker build -t bosun-build build ID=$(docker run -d bosun-build) mkdir -p $TMP/hbase $TMP/bosun $TMP/tsdb docker cp ${ID}:/go/bin/bosun $TMP/bosun docker cp ${ID}:/hbase $TMP docker cp ${ID}:/tsdb $TMP docker kill ${ID} docker rm ${ID} rm -rf $TMP/hbase/hbase-*/docs $TMP/tsdb/build/gwt-unitCache cp -R ../web $TMP/bosun docker build -t stackexchange/bosun run rm -rf build/bosun $TMP echo bosun docker image built
Remove unused depth for local git
Remove unused depth for local git
Shell
mit
dieface/bosun,dbirchak/bosun,vitorboschi/bosun,inkel/bosun,treejames/bosun,jareksm/bosun,snowsnail/bosun,trigrass2/bosun,fisdap/bosun,azhurbilo/bosun,vitorboschi/bosun,seekingalpha/bosun,youngl98/bosun,vimeo/bosun,mxk1235/bosun,influxdata/bosun,bookingcom/bosun,treejames/bosun,madhukarreddy/bosun,jareksm/bosun,couchand/bosun,vitorboschi/bosun,csmith-palantir/bosun,simnv/bosun,azhurbilo/bosun,shanemadden/bosun,treejames/bosun,GROpenSourceDev/bosun,azhurbilo/bosun,gregdel/bosun,seekingalpha/bosun,shanemadden/bosun,Skyscanner/bosun,alienth/bosun,seekingalpha/bosun,bookingcom/bosun,mehulkar/bosun,mathpl/bosun,evgeny-potapov/bosun,bridgewell/bosun,mxk1235/bosun,shanemadden/bosun,mxk1235/bosun,cyngn/bosun,mnikhil-git/bosun,eMerzh/bosun,bosun-sharklasers/bosun,bridgewell/bosun,yyljlyy/bosun,fisdap/bosun,yyljlyy/bosun,simnv/bosun,Skyscanner/bosun,Skyscanner/bosun,eMerzh/bosun,cyngn/bosun,simnv/bosun,CheRuisiBesares/bosun,trigrass2/bosun,mehulkar/bosun,couchand/bosun,briantist/bosun,youngl98/bosun,bridgewell/bosun,inkel/bosun,fisdap/bosun,alienth/bosun,bookingcom/bosun,snowsnail/bosun,augporto/bosun,youngl98/bosun,gregdel/bosun,mnikhil-git/bosun,Skyscanner/bosun,Skyscanner/bosun,mnikhil-git/bosun,mathpl/bosun,yyljlyy/bosun,mathpl/bosun,cazacugmihai/bosun,SlashmanX/bosun,cazacugmihai/bosun,bosun-monitor/bosun,vimeo/bosun,CheRuisiBesares/bosun,dbirchak/bosun,bosun-monitor/bosun,jareksm/bosun,Dieterbe/bosun,yyljlyy/bosun,dieface/bosun,inkel/bosun,bosun-monitor/bosun,cazacugmihai/bosun,dieface/bosun,noblehng/bosun,bookingcom/bosun,leapar/bosun,bridgewell/bosun,couchand/bosun,mhenderson-so/bosun,eMerzh/bosun,CheRuisiBesares/bosun,evgeny-potapov/bosun,briantist/bosun,dimamedvedev/bosun,azhurbilo/bosun,cazacugmihai/bosun,simnv/bosun,TrentScholl/bosun,TrentScholl/bosun,bosun-monitor/bosun,alienth/bosun,couchand/bosun,seekingalpha/bosun,GROpenSourceDev/bosun,trigrass2/bosun,bosun-sharklasers/bosun,mxk1235/bosun,trigrass2/bosun,melifaro/bosun,youngl98/bosun,dimamedvedev/bosun,objStorage/bosun,GROpenSourceDev/bosun,influxdb/bosun,Skyscanner/bosun,augporto/bosun,couchand/bosun,objStorage/bosun,evgeny-potapov/bosun,csmith-palantir/bosun,youngl98/bosun,objStorage/bosun,alienth/bosun,augporto/bosun,azhurbilo/bosun,TrentScholl/bosun,bosun-monitor/bosun,simnv/bosun,mxk1235/bosun,vitorboschi/bosun,mnikhil-git/bosun,SlashmanX/bosun,gregdel/bosun,gregdel/bosun,inkel/bosun,dbirchak/bosun,simnv/bosun,snowsnail/bosun,SlashmanX/bosun,leapar/bosun,leapar/bosun,treejames/bosun,influxdb/bosun,snowsnail/bosun,treejames/bosun,cyngn/bosun,fisdap/bosun,mnikhil-git/bosun,dimamedvedev/bosun,evgeny-potapov/bosun,bosun-sharklasers/bosun,dimamedvedev/bosun,influxdata/bosun,noblehng/bosun,trigrass2/bosun,couchand/bosun,snowsnail/bosun,seekingalpha/bosun,fisdap/bosun,youngl98/bosun,trigrass2/bosun,leapar/bosun,alienth/bosun,influxdb/bosun,mhenderson-so/bosun,melifaro/bosun,melifaro/bosun,cazacugmihai/bosun,mhenderson-so/bosun,Dieterbe/bosun,CheRuisiBesares/bosun,leapar/bosun,cazacugmihai/bosun,eMerzh/bosun,csmith-palantir/bosun,vitorboschi/bosun,dbirchak/bosun,evgeny-potapov/bosun,dbirchak/bosun,melifaro/bosun,bosun-monitor/bosun,shanemadden/bosun,briantist/bosun,shanemadden/bosun,augporto/bosun,TrentScholl/bosun,Dieterbe/bosun,bridgewell/bosun,influxdata/bosun,briantist/bosun,noblehng/bosun,dieface/bosun,influxdb/bosun,mathpl/bosun,yyljlyy/bosun,cyngn/bosun,CheRuisiBesares/bosun,influxdata/bosun,augporto/bosun,madhukarreddy/bosun,GROpenSourceDev/bosun,objStorage/bosun,TrentScholl/bosun,objStorage/bosun,mhenderson-so/bosun,bosun-sharklasers/bosun,dbirchak/bosun,vitorboschi/bosun,vimeo/bosun,csmith-palantir/bosun,madhukarreddy/bosun,inkel/bosun,noblehng/bosun,bosun-sharklasers/bosun,mathpl/bosun,SlashmanX/bosun,melifaro/bosun,influxdata/bosun,SlashmanX/bosun,madhukarreddy/bosun,influxdb/bosun,gregdel/bosun,dieface/bosun,briantist/bosun,inkel/bosun,mehulkar/bosun,snowsnail/bosun,seekingalpha/bosun,melifaro/bosun,briantist/bosun,GROpenSourceDev/bosun,objStorage/bosun,noblehng/bosun,dimamedvedev/bosun,madhukarreddy/bosun,eMerzh/bosun,dieface/bosun,augporto/bosun,jareksm/bosun,mathpl/bosun,madhukarreddy/bosun,cyngn/bosun,eMerzh/bosun,GROpenSourceDev/bosun,fisdap/bosun,evgeny-potapov/bosun,mehulkar/bosun,bosun-sharklasers/bosun,influxdata/bosun,mehulkar/bosun,azhurbilo/bosun,mhenderson-so/bosun,bookingcom/bosun,yyljlyy/bosun,mhenderson-so/bosun,dimamedvedev/bosun,influxdb/bosun,mxk1235/bosun,jareksm/bosun,mehulkar/bosun,bridgewell/bosun,csmith-palantir/bosun,Dieterbe/bosun,CheRuisiBesares/bosun,SlashmanX/bosun,TrentScholl/bosun,shanemadden/bosun,csmith-palantir/bosun,noblehng/bosun,mnikhil-git/bosun,cyngn/bosun,alienth/bosun,gregdel/bosun,bookingcom/bosun,jareksm/bosun,leapar/bosun,treejames/bosun,vimeo/bosun
shell
## Code Before: TMP=run/tmp rm -rf build/bosun $TMP git clone -b master --single-branch --depth 1 .. build/bosun docker build -t bosun-build build ID=$(docker run -d bosun-build) mkdir -p $TMP/hbase $TMP/bosun $TMP/tsdb docker cp ${ID}:/go/bin/bosun $TMP/bosun docker cp ${ID}:/hbase $TMP docker cp ${ID}:/tsdb $TMP docker kill ${ID} docker rm ${ID} rm -rf $TMP/hbase/hbase-*/docs $TMP/tsdb/build/gwt-unitCache cp -R ../web $TMP/bosun docker build -t stackexchange/bosun run rm -rf build/bosun $TMP echo bosun docker image built ## Instruction: Remove unused depth for local git ## Code After: TMP=run/tmp rm -rf build/bosun $TMP git clone -b master --single-branch .. build/bosun docker build -t bosun-build build ID=$(docker run -d bosun-build) mkdir -p $TMP/hbase $TMP/bosun $TMP/tsdb docker cp ${ID}:/go/bin/bosun $TMP/bosun docker cp ${ID}:/hbase $TMP docker cp ${ID}:/tsdb $TMP docker kill ${ID} docker rm ${ID} rm -rf $TMP/hbase/hbase-*/docs $TMP/tsdb/build/gwt-unitCache cp -R ../web $TMP/bosun docker build -t stackexchange/bosun run rm -rf build/bosun $TMP echo bosun docker image built
TMP=run/tmp rm -rf build/bosun $TMP - git clone -b master --single-branch --depth 1 .. build/bosun ? ---------- + git clone -b master --single-branch .. build/bosun docker build -t bosun-build build ID=$(docker run -d bosun-build) mkdir -p $TMP/hbase $TMP/bosun $TMP/tsdb docker cp ${ID}:/go/bin/bosun $TMP/bosun docker cp ${ID}:/hbase $TMP docker cp ${ID}:/tsdb $TMP docker kill ${ID} docker rm ${ID} rm -rf $TMP/hbase/hbase-*/docs $TMP/tsdb/build/gwt-unitCache cp -R ../web $TMP/bosun docker build -t stackexchange/bosun run rm -rf build/bosun $TMP echo bosun docker image built
2
0.117647
1
1
b5e671e5c1da8347271a112febc9af614161c206
src/com/twu/biblioteca/BibliotecaApp.java
src/com/twu/biblioteca/BibliotecaApp.java
package com.twu.biblioteca; import java.util.List; import java.util.ArrayList; public class BibliotecaApp { private static List<Book> bookList = initBookList(); public static void main(String[] args) { System.out.println("Welcome to Biblioteca!"); printBookList(); } private static void printBookList() { System.out.println("Book list:"); for (Book book : bookList) { System.out.println(book.toString()); } } private static List<Book> initBookList() { List<Book> newBookList = new ArrayList<Book>(); newBookList.add(createNewBook("Test-Driven Development By Example", "Kent Beck", 2003)); newBookList.add(createNewBook("The Agile Samurai", "Jonathan Rasmusson", 2010)); newBookList.add(createNewBook("Head First Java", "Kathy Sierra & Bert Bates", 2005)); newBookList.add(createNewBook("Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability", "Steve Krug", 2014)); return newBookList; } private static Book createNewBook(String title, String author, int yearPublished) { return new Book(title, author, yearPublished); } }
package com.twu.biblioteca; import java.util.List; import java.util.ArrayList; public class BibliotecaApp { private static List<Book> bookList = initBookList(); public static void main(String[] args) { System.out.println("Welcome to Biblioteca!"); printBookList(); } private static void printBookList() { System.out.println("Book List"); System.out.print(String.format("%-42s | %-32s | %-12s\n", "Title", "Author", "Year Published")); String leftAlignFormat = "%-42s | %-32s | %-4d\n"; for (Book book : bookList) { System.out.print(String.format(leftAlignFormat, book.getTitle(), book.getAuthor(), book.getYearPublished())); } } private static List<Book> initBookList() { List<Book> newBookList = new ArrayList<Book>(); newBookList.add(createNewBook("Test-Driven Development By Example", "Kent Beck", 2003)); newBookList.add(createNewBook("The Agile Samurai", "Jonathan Rasmusson", 2010)); newBookList.add(createNewBook("Head First Java", "Kathy Sierra & Bert Bates", 2005)); newBookList.add(createNewBook("Don't Make Me Think, Revisited", "Steve Krug", 2014)); return newBookList; } private static Book createNewBook(String title, String author, int yearPublished) { return new Book(title, author, yearPublished); } }
Print book list with author and year published details
Print book list with author and year published details
Java
apache-2.0
raingxm/twu-biblioteca-emilysiow
java
## Code Before: package com.twu.biblioteca; import java.util.List; import java.util.ArrayList; public class BibliotecaApp { private static List<Book> bookList = initBookList(); public static void main(String[] args) { System.out.println("Welcome to Biblioteca!"); printBookList(); } private static void printBookList() { System.out.println("Book list:"); for (Book book : bookList) { System.out.println(book.toString()); } } private static List<Book> initBookList() { List<Book> newBookList = new ArrayList<Book>(); newBookList.add(createNewBook("Test-Driven Development By Example", "Kent Beck", 2003)); newBookList.add(createNewBook("The Agile Samurai", "Jonathan Rasmusson", 2010)); newBookList.add(createNewBook("Head First Java", "Kathy Sierra & Bert Bates", 2005)); newBookList.add(createNewBook("Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability", "Steve Krug", 2014)); return newBookList; } private static Book createNewBook(String title, String author, int yearPublished) { return new Book(title, author, yearPublished); } } ## Instruction: Print book list with author and year published details ## Code After: package com.twu.biblioteca; import java.util.List; import java.util.ArrayList; public class BibliotecaApp { private static List<Book> bookList = initBookList(); public static void main(String[] args) { System.out.println("Welcome to Biblioteca!"); printBookList(); } private static void printBookList() { System.out.println("Book List"); System.out.print(String.format("%-42s | %-32s | %-12s\n", "Title", "Author", "Year Published")); String leftAlignFormat = "%-42s | %-32s | %-4d\n"; for (Book book : bookList) { System.out.print(String.format(leftAlignFormat, book.getTitle(), book.getAuthor(), book.getYearPublished())); } } private static List<Book> initBookList() { List<Book> newBookList = new ArrayList<Book>(); newBookList.add(createNewBook("Test-Driven Development By Example", "Kent Beck", 2003)); newBookList.add(createNewBook("The Agile Samurai", "Jonathan Rasmusson", 2010)); newBookList.add(createNewBook("Head First Java", "Kathy Sierra & Bert Bates", 2005)); newBookList.add(createNewBook("Don't Make Me Think, Revisited", "Steve Krug", 2014)); return newBookList; } private static Book createNewBook(String title, String author, int yearPublished) { return new Book(title, author, yearPublished); } }
package com.twu.biblioteca; import java.util.List; import java.util.ArrayList; public class BibliotecaApp { private static List<Book> bookList = initBookList(); public static void main(String[] args) { System.out.println("Welcome to Biblioteca!"); printBookList(); } private static void printBookList() { - System.out.println("Book list:"); ? ^ - + System.out.println("Book List"); ? ^ + System.out.print(String.format("%-42s | %-32s | %-12s\n", "Title", "Author", "Year Published")); + String leftAlignFormat = "%-42s | %-32s | %-4d\n"; for (Book book : bookList) { - System.out.println(book.toString()); + System.out.print(String.format(leftAlignFormat, book.getTitle(), book.getAuthor(), book.getYearPublished())); } } private static List<Book> initBookList() { List<Book> newBookList = new ArrayList<Book>(); newBookList.add(createNewBook("Test-Driven Development By Example", "Kent Beck", 2003)); newBookList.add(createNewBook("The Agile Samurai", "Jonathan Rasmusson", 2010)); newBookList.add(createNewBook("Head First Java", "Kathy Sierra & Bert Bates", 2005)); - newBookList.add(createNewBook("Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability", "Steve Krug", 2014)); ? ------------------------------------------ + newBookList.add(createNewBook("Don't Make Me Think, Revisited", "Steve Krug", 2014)); return newBookList; } private static Book createNewBook(String title, String author, int yearPublished) { return new Book(title, author, yearPublished); } }
8
0.242424
5
3
a5932e644a7feac0232d1516dd8d3482b6f95305
vendor/kartik-v/yii2-widget-select2/Select2Asset.php
vendor/kartik-v/yii2-widget-select2/Select2Asset.php
<?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015 * @package yii2-widgets * @subpackage yii2-widget-select2 * @version 2.0.2 */ namespace kartik\select2; use Yii; /** * Asset bundle for Select2 Widget * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class Select2Asset extends \kartik\base\AssetBundle { /** * @inheritdoc */ public function init() { $this->setSourcePath(__DIR__ . '/assets'); $this->setupAssets('css', ['css/select2']); $this->setupAssets('js', ['js/select2.full', 'js/select2-krajee']); parent::init(); } }
<?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015 * @package yii2-widgets * @subpackage yii2-widget-select2 * @version 2.0.2 */ namespace kartik\select2; use Yii; /** * Asset bundle for Select2 Widget * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class Select2Asset extends \kartik\base\AssetBundle { /** * @inheritdoc */ public function init() { $this->setSourcePath(__DIR__ . '/assets'); $this->setupAssets('css', ['css/select2']); $this->setupAssets('js', ['js/all-krajee', 'js/select2.full', 'js/select2-krajee']); parent::init(); } }
Add all-krajee.js to Select2 Assets
Add all-krajee.js to Select2 Assets
PHP
bsd-3-clause
anawatom/lavandula,anawatom/lavandula,anawatom/lavandula,anawatom/lavandula,anawatom/lavandula
php
## Code Before: <?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015 * @package yii2-widgets * @subpackage yii2-widget-select2 * @version 2.0.2 */ namespace kartik\select2; use Yii; /** * Asset bundle for Select2 Widget * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class Select2Asset extends \kartik\base\AssetBundle { /** * @inheritdoc */ public function init() { $this->setSourcePath(__DIR__ . '/assets'); $this->setupAssets('css', ['css/select2']); $this->setupAssets('js', ['js/select2.full', 'js/select2-krajee']); parent::init(); } } ## Instruction: Add all-krajee.js to Select2 Assets ## Code After: <?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015 * @package yii2-widgets * @subpackage yii2-widget-select2 * @version 2.0.2 */ namespace kartik\select2; use Yii; /** * Asset bundle for Select2 Widget * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class Select2Asset extends \kartik\base\AssetBundle { /** * @inheritdoc */ public function init() { $this->setSourcePath(__DIR__ . '/assets'); $this->setupAssets('css', ['css/select2']); $this->setupAssets('js', ['js/all-krajee', 'js/select2.full', 'js/select2-krajee']); parent::init(); } }
<?php /** * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015 * @package yii2-widgets * @subpackage yii2-widget-select2 * @version 2.0.2 */ namespace kartik\select2; use Yii; /** * Asset bundle for Select2 Widget * * @author Kartik Visweswaran <kartikv2@gmail.com> * @since 1.0 */ class Select2Asset extends \kartik\base\AssetBundle { /** * @inheritdoc */ public function init() { $this->setSourcePath(__DIR__ . '/assets'); $this->setupAssets('css', ['css/select2']); - $this->setupAssets('js', ['js/select2.full', 'js/select2-krajee']); + $this->setupAssets('js', ['js/all-krajee', 'js/select2.full', 'js/select2-krajee']); ? +++++++++++++++++ parent::init(); } }
2
0.0625
1
1
e10d520b3b32c537269cd2938cbb98af0e4f205b
sonar-project.properties
sonar-project.properties
sonar.projectKey=mwmahlberg_snap sonar.organization=mwmahlberg sonar.go.coverage.reportPaths=test-results/cover.out
sonar.test.exclusions=**/*_test.go #sonar.test.inclusions= # Source encoding #sonar.sourceEncoding=UTF-8 # Exclusions for copy-paste detection #sonar.cpd.exclusions= sonar.projectKey=mwmahlberg_snap sonar.organization=mwmahlberg sonar.go.coverage.reportPaths=test-results/cover.out
Exclude tests from coverage check
Exclude tests from coverage check
INI
apache-2.0
mwmahlberg/snap
ini
## Code Before: sonar.projectKey=mwmahlberg_snap sonar.organization=mwmahlberg sonar.go.coverage.reportPaths=test-results/cover.out ## Instruction: Exclude tests from coverage check ## Code After: sonar.test.exclusions=**/*_test.go #sonar.test.inclusions= # Source encoding #sonar.sourceEncoding=UTF-8 # Exclusions for copy-paste detection #sonar.cpd.exclusions= sonar.projectKey=mwmahlberg_snap sonar.organization=mwmahlberg sonar.go.coverage.reportPaths=test-results/cover.out
+ sonar.test.exclusions=**/*_test.go + #sonar.test.inclusions= + + # Source encoding + #sonar.sourceEncoding=UTF-8 + + # Exclusions for copy-paste detection + #sonar.cpd.exclusions= sonar.projectKey=mwmahlberg_snap sonar.organization=mwmahlberg sonar.go.coverage.reportPaths=test-results/cover.out
8
2.666667
8
0
b56eccf32fc7fe80405350fd122d3d257aa55788
runtests.py
runtests.py
"""Alternate way of running the unittests, for Python 2.5 or Windows.""" __author__ = 'Beech Horn' import sys import unittest def suite(): mods = ['context', 'eventloop', 'key', 'model', 'query', 'tasklets', 'thread'] test_mods = ['%s_test' % name for name in mods] ndb = __import__('ndb', fromlist=test_mods, level=1) loader = unittest.TestLoader() suite = unittest.TestSuite() for mod in [getattr(ndb, name) for name in test_mods]: for name in set(dir(mod)): if name.endswith('Tests'): test_module = getattr(mod, name) tests = loader.loadTestsFromTestCase(test_module) suite.addTests(tests) return suite def main(): v = 0 q = 0 for arg in sys.argv[1:]: if arg.startswith('-v'): v += arg.count('v') elif arg == '-q': q += 1 if q: v = 0 else: v = max(v, 1) unittest.TextTestRunner(verbosity=v).run(suite()) if __name__ == '__main__': main()
"""Alternate way of running the unittests, for Python 2.5 or Windows.""" __author__ = 'Beech Horn' import sys import unittest def suite(): mods = ['context', 'eventloop', 'key', 'model', 'query', 'tasklets', 'thread'] test_mods = ['%s_test' % name for name in mods] ndb = __import__('ndb', fromlist=test_mods, level=1) loader = unittest.TestLoader() suite = unittest.TestSuite() for mod in [getattr(ndb, name) for name in test_mods]: for name in set(dir(mod)): if name.endswith('Tests'): test_module = getattr(mod, name) tests = loader.loadTestsFromTestCase(test_module) suite.addTests(tests) return suite def main(): v = 1 for arg in sys.argv[1:]: if arg.startswith('-v'): v += arg.count('v') elif arg == '-q': v = 0 unittest.TextTestRunner(verbosity=v).run(suite()) if __name__ == '__main__': main()
Simplify and improve -v/-q handling.
Simplify and improve -v/-q handling.
Python
apache-2.0
GoogleCloudPlatform/datastore-ndb-python,GoogleCloudPlatform/datastore-ndb-python
python
## Code Before: """Alternate way of running the unittests, for Python 2.5 or Windows.""" __author__ = 'Beech Horn' import sys import unittest def suite(): mods = ['context', 'eventloop', 'key', 'model', 'query', 'tasklets', 'thread'] test_mods = ['%s_test' % name for name in mods] ndb = __import__('ndb', fromlist=test_mods, level=1) loader = unittest.TestLoader() suite = unittest.TestSuite() for mod in [getattr(ndb, name) for name in test_mods]: for name in set(dir(mod)): if name.endswith('Tests'): test_module = getattr(mod, name) tests = loader.loadTestsFromTestCase(test_module) suite.addTests(tests) return suite def main(): v = 0 q = 0 for arg in sys.argv[1:]: if arg.startswith('-v'): v += arg.count('v') elif arg == '-q': q += 1 if q: v = 0 else: v = max(v, 1) unittest.TextTestRunner(verbosity=v).run(suite()) if __name__ == '__main__': main() ## Instruction: Simplify and improve -v/-q handling. ## Code After: """Alternate way of running the unittests, for Python 2.5 or Windows.""" __author__ = 'Beech Horn' import sys import unittest def suite(): mods = ['context', 'eventloop', 'key', 'model', 'query', 'tasklets', 'thread'] test_mods = ['%s_test' % name for name in mods] ndb = __import__('ndb', fromlist=test_mods, level=1) loader = unittest.TestLoader() suite = unittest.TestSuite() for mod in [getattr(ndb, name) for name in test_mods]: for name in set(dir(mod)): if name.endswith('Tests'): test_module = getattr(mod, name) tests = loader.loadTestsFromTestCase(test_module) suite.addTests(tests) return suite def main(): v = 1 for arg in sys.argv[1:]: if arg.startswith('-v'): v += arg.count('v') elif arg == '-q': v = 0 unittest.TextTestRunner(verbosity=v).run(suite()) if __name__ == '__main__': main()
"""Alternate way of running the unittests, for Python 2.5 or Windows.""" __author__ = 'Beech Horn' import sys import unittest def suite(): mods = ['context', 'eventloop', 'key', 'model', 'query', 'tasklets', 'thread'] test_mods = ['%s_test' % name for name in mods] ndb = __import__('ndb', fromlist=test_mods, level=1) loader = unittest.TestLoader() suite = unittest.TestSuite() for mod in [getattr(ndb, name) for name in test_mods]: for name in set(dir(mod)): if name.endswith('Tests'): test_module = getattr(mod, name) tests = loader.loadTestsFromTestCase(test_module) suite.addTests(tests) return suite def main(): - v = 0 ? ^ + v = 1 ? ^ - q = 0 for arg in sys.argv[1:]: if arg.startswith('-v'): v += arg.count('v') elif arg == '-q': - q += 1 - if q: - v = 0 + v = 0 ? ++ - else: - v = max(v, 1) unittest.TextTestRunner(verbosity=v).run(suite()) if __name__ == '__main__': main()
9
0.209302
2
7
2036f27762d871b8c90dec53bed2395ba274a7cd
db/seeds.rb
db/seeds.rb
require 'open-uri' require 'active_record/fixtures' related_identifier_types = [ [ "DOI" ] [ "URL" ] [" arXiv "] [" PMID "] [" ARK "] [" Handle "] [" ISBN "] [" ISTC"] [" LISSN "] [" LSID"] [" PURL "] [" URN "] ] related_identifier_types.each do |related_identifier_type| StashDatacite::RelatedIdentifierType.create( related_identifier_type: related_identifier_type ) end relation_types = [ [ " Cites" ] [ " isCitedBy" ] [ " Supplements" ] [ " IsSupplementedBy" ] [ " IsNewVersionOf" ] [ " IsPreviousVersionOf" ] [ " Continues" ] [ " IsContinuedBy" ] [ " IsPartOf" ] [ " HasPart" ] [ " IsDocumentedBy" ] [ " Documents" ] [ " IsIdenticalTo" ] [ " IsDerivedFrom" ] [ " IsSourceOf" ] ] relation_types.each do |relation_type| StashDatacite::RelationType.create( relation_type: relation_type ) end
require 'open-uri' require 'active_record/fixtures' related_identifier_types = [ "DOI", "URL", "arXiv", "PMID", "ARK", "Handle", "ISBN", "ISTC", "LISSN", "LSID", "PURL", "URN" ] related_identifier_types.each do |related_identifier_type| StashDatacite::RelatedIdentifierType.create( related_identifier_type: related_identifier_type ) end relation_types = [ "Cites", "isCitedBy", "Supplements" , "IsSupplementedBy", "IsNewVersionOf", "IsPreviousVersionOf", "Continues", "IsContinuedBy", "IsPartOf", "HasPart", "IsDocumentedBy", "Documents", "IsIdenticalTo", "IsDerivedFrom", "IsSourceOf" ] relation_types.each do |relation_type| StashDatacite::RelationType.create( relation_type: relation_type ) end
Fix array style representation of Seed data
Fix array style representation of Seed data
Ruby
mit
CDLUC3/stash_datacite,CDLUC3/stash,CDLUC3/stash_datacite,CDLUC3/stash,CDLUC3/stash,CDLUC3/stash_datacite,CDLUC3/stash
ruby
## Code Before: require 'open-uri' require 'active_record/fixtures' related_identifier_types = [ [ "DOI" ] [ "URL" ] [" arXiv "] [" PMID "] [" ARK "] [" Handle "] [" ISBN "] [" ISTC"] [" LISSN "] [" LSID"] [" PURL "] [" URN "] ] related_identifier_types.each do |related_identifier_type| StashDatacite::RelatedIdentifierType.create( related_identifier_type: related_identifier_type ) end relation_types = [ [ " Cites" ] [ " isCitedBy" ] [ " Supplements" ] [ " IsSupplementedBy" ] [ " IsNewVersionOf" ] [ " IsPreviousVersionOf" ] [ " Continues" ] [ " IsContinuedBy" ] [ " IsPartOf" ] [ " HasPart" ] [ " IsDocumentedBy" ] [ " Documents" ] [ " IsIdenticalTo" ] [ " IsDerivedFrom" ] [ " IsSourceOf" ] ] relation_types.each do |relation_type| StashDatacite::RelationType.create( relation_type: relation_type ) end ## Instruction: Fix array style representation of Seed data ## Code After: require 'open-uri' require 'active_record/fixtures' related_identifier_types = [ "DOI", "URL", "arXiv", "PMID", "ARK", "Handle", "ISBN", "ISTC", "LISSN", "LSID", "PURL", "URN" ] related_identifier_types.each do |related_identifier_type| StashDatacite::RelatedIdentifierType.create( related_identifier_type: related_identifier_type ) end relation_types = [ "Cites", "isCitedBy", "Supplements" , "IsSupplementedBy", "IsNewVersionOf", "IsPreviousVersionOf", "Continues", "IsContinuedBy", "IsPartOf", "HasPart", "IsDocumentedBy", "Documents", "IsIdenticalTo", "IsDerivedFrom", "IsSourceOf" ] relation_types.each do |relation_type| StashDatacite::RelationType.create( relation_type: relation_type ) end
require 'open-uri' require 'active_record/fixtures' related_identifier_types = [ - [ "DOI" ] - [ "URL" ] + "DOI", + "URL", - [" arXiv "] ? - - - ^ + "arXiv", ? ^ - [" PMID "] ? - - - ^ + "PMID", ? ^ - [" ARK "] + "ARK", - [" Handle "] ? - - - ^ + "Handle", ? ^ - [" ISBN "] ? - - - ^ + "ISBN", ? ^ - [" ISTC"] ? - - ^ + "ISTC", ? ^ - [" LISSN "] ? - - - ^ + "LISSN", ? ^ - [" LSID"] ? - - ^ + "LSID", ? ^ - [" PURL "] ? - - - ^ + "PURL", ? ^ - [" URN "] ? - - - - + "URN" ] related_identifier_types.each do |related_identifier_type| StashDatacite::RelatedIdentifierType.create( related_identifier_type: related_identifier_type ) end relation_types = [ - [ " Cites" ] ? -- - ^^ + "Cites", ? ^ - [ " isCitedBy" ] ? -- - ^^ + "isCitedBy", ? ^ - [ " Supplements" ] ? -- - ^ + "Supplements" , ? ^ - [ " IsSupplementedBy" ] ? -- - ^^ + "IsSupplementedBy", ? ^ - [ " IsNewVersionOf" ] ? -- - ^^ + "IsNewVersionOf", ? ^ - [ " IsPreviousVersionOf" ] ? -- - ^^ + "IsPreviousVersionOf", ? ^ - [ " Continues" ] ? -- - ^^ + "Continues", ? ^ - [ " IsContinuedBy" ] ? -- - ^^ + "IsContinuedBy", ? ^ - [ " IsPartOf" ] ? -- - ^^ + "IsPartOf", ? ^ - [ " HasPart" ] ? -- - ^^ + "HasPart", ? ^ - [ " IsDocumentedBy" ] ? -- - ^^ + "IsDocumentedBy", ? ^ - [ " Documents" ] ? -- - ^^ + "Documents", ? ^ - [ " IsIdenticalTo" ] ? -- - ^^ + "IsIdenticalTo", ? ^ - [ " IsDerivedFrom" ] ? -- - ^^ + "IsDerivedFrom", ? ^ - [ " IsSourceOf" ] ? -- - -- + "IsSourceOf" ] relation_types.each do |relation_type| StashDatacite::RelationType.create( relation_type: relation_type ) end
54
1.227273
27
27
65041cae15391099f01b6739e4d1d55c05a9e82a
tests/run/cpp_classes.pyx
tests/run/cpp_classes.pyx
cdef extern from "shapes.h" namespace shapes: cdef cppclass Shape: area() cdef cppclass Rectangle(Shape): int width int height __init__(int, int) cdef cppclass Square(Shape): int side __init__(int) cdef Rectangle *rect = new Rectangle(10, 20) cdef Square *sqr = new Square(15) del rect, sqr
cdef extern from "shapes.cpp" namespace shapes: cdef cppclass Shape: float area() cdef cppclass Rectangle(Shape): int width int height __init__(int, int) cdef cppclass Square(Shape): int side __init__(int) def test_new_del(): cdef Rectangle *rect = new Rectangle(10, 20) cdef Square *sqr = new Square(15) del rect, sqr def test_rect_area(w, h): cdef Rectangle *rect = new Rectangle(w, h) try: return rect.area() finally: del rect def test_square_area(w): cdef Square *sqr = new Square(w) cdef Rectangle *rect = sqr try: return rect.area(), sqr.area() finally: del sqr
Expand and fix cpp tests
Expand and fix cpp tests
Cython
apache-2.0
bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu
cython
## Code Before: cdef extern from "shapes.h" namespace shapes: cdef cppclass Shape: area() cdef cppclass Rectangle(Shape): int width int height __init__(int, int) cdef cppclass Square(Shape): int side __init__(int) cdef Rectangle *rect = new Rectangle(10, 20) cdef Square *sqr = new Square(15) del rect, sqr ## Instruction: Expand and fix cpp tests ## Code After: cdef extern from "shapes.cpp" namespace shapes: cdef cppclass Shape: float area() cdef cppclass Rectangle(Shape): int width int height __init__(int, int) cdef cppclass Square(Shape): int side __init__(int) def test_new_del(): cdef Rectangle *rect = new Rectangle(10, 20) cdef Square *sqr = new Square(15) del rect, sqr def test_rect_area(w, h): cdef Rectangle *rect = new Rectangle(w, h) try: return rect.area() finally: del rect def test_square_area(w): cdef Square *sqr = new Square(w) cdef Rectangle *rect = sqr try: return rect.area(), sqr.area() finally: del sqr
+ - cdef extern from "shapes.h" namespace shapes: ? ^ + cdef extern from "shapes.cpp" namespace shapes: ? ^^^ cdef cppclass Shape: - area() + float area() ? ++++++ cdef cppclass Rectangle(Shape): int width int height __init__(int, int) cdef cppclass Square(Shape): int side __init__(int) + def test_new_del(): - cdef Rectangle *rect = new Rectangle(10, 20) + cdef Rectangle *rect = new Rectangle(10, 20) ? ++++ - cdef Square *sqr = new Square(15) + cdef Square *sqr = new Square(15) ? ++++ + del rect, sqr - del rect, sqr + def test_rect_area(w, h): + cdef Rectangle *rect = new Rectangle(w, h) + try: + return rect.area() + finally: + del rect + + def test_square_area(w): + cdef Square *sqr = new Square(w) + cdef Rectangle *rect = sqr + try: + return rect.area(), sqr.area() + finally: + del sqr +
27
1.5
22
5
5b37fdd402e6b9642abe7ab9936dc0dd86617d73
public/card.html
public/card.html
<link rel="import" href="/public/components/polymer/polymer.html"> <link rel="import" href="/public/components/paper-material/paper-material.html"> <dom-module id="my-card"> <style> :host { font-family: 'Roboto', sans-serif; font-size: 2em; } .url-card { width: 100%; min-height: 1.25em; margin-bottom: 0.25em; } ::content .url { width: 90%; float: left; margin: 0.1em 0 0 0.5em; } ::content .url a { text-decoration: none; } ::content .shares { width: 6%; float: left; margin: 0.1em 0 0 0.5em; font-weight: bold; } </style> <template> <paper-material class="url-card"> <content></content> </paper-material> </template> <script> Polymer({ is: 'my-card' }); </script> </dom-module>
<link rel="import" href="/public/components/polymer/polymer.html"> <link rel="import" href="/public/components/paper-material/paper-material.html"> <dom-module id="my-card"> <style> :host { font-family: 'Roboto', sans-serif; font-size: 2em; } .url-card { width: 100%; min-height: 1.25em; margin-bottom: 0.25em; } ::content .url { width: 90%; float: left; margin: 0.1em 0 0 0.5em; } ::content .url a:link, ::content .url a:visited, ::content .url a:hover, ::content .url a:active { text-decoration: none; color: crimson; } ::content .shares { width: 6%; float: left; margin: 0.1em 0 0 0.5em; font-weight: bold; } </style> <template> <paper-material class="url-card"> <content></content> </paper-material> </template> <script> Polymer({ is: 'my-card' }); </script> </dom-module>
Change title color and link states
Change title color and link states
HTML
mit
idewz/trendy,idewz/trendy
html
## Code Before: <link rel="import" href="/public/components/polymer/polymer.html"> <link rel="import" href="/public/components/paper-material/paper-material.html"> <dom-module id="my-card"> <style> :host { font-family: 'Roboto', sans-serif; font-size: 2em; } .url-card { width: 100%; min-height: 1.25em; margin-bottom: 0.25em; } ::content .url { width: 90%; float: left; margin: 0.1em 0 0 0.5em; } ::content .url a { text-decoration: none; } ::content .shares { width: 6%; float: left; margin: 0.1em 0 0 0.5em; font-weight: bold; } </style> <template> <paper-material class="url-card"> <content></content> </paper-material> </template> <script> Polymer({ is: 'my-card' }); </script> </dom-module> ## Instruction: Change title color and link states ## Code After: <link rel="import" href="/public/components/polymer/polymer.html"> <link rel="import" href="/public/components/paper-material/paper-material.html"> <dom-module id="my-card"> <style> :host { font-family: 'Roboto', sans-serif; font-size: 2em; } .url-card { width: 100%; min-height: 1.25em; margin-bottom: 0.25em; } ::content .url { width: 90%; float: left; margin: 0.1em 0 0 0.5em; } ::content .url a:link, ::content .url a:visited, ::content .url a:hover, ::content .url a:active { text-decoration: none; color: crimson; } ::content .shares { width: 6%; float: left; margin: 0.1em 0 0 0.5em; font-weight: bold; } </style> <template> <paper-material class="url-card"> <content></content> </paper-material> </template> <script> Polymer({ is: 'my-card' }); </script> </dom-module>
<link rel="import" href="/public/components/polymer/polymer.html"> <link rel="import" href="/public/components/paper-material/paper-material.html"> <dom-module id="my-card"> <style> :host { font-family: 'Roboto', sans-serif; font-size: 2em; } .url-card { width: 100%; min-height: 1.25em; margin-bottom: 0.25em; } ::content .url { width: 90%; float: left; margin: 0.1em 0 0 0.5em; } + ::content .url a:link, + ::content .url a:visited, + ::content .url a:hover, - ::content .url a { + ::content .url a:active { ? +++++++ text-decoration: none; + color: crimson; } ::content .shares { width: 6%; float: left; margin: 0.1em 0 0 0.5em; font-weight: bold; } </style> <template> <paper-material class="url-card"> <content></content> </paper-material> </template> <script> Polymer({ is: 'my-card' }); </script> </dom-module>
6
0.146341
5
1
525e7d5061326c7c815f4ede7757afb7c085ff78
apartments/models.py
apartments/models.py
from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = Column(String, unique=True) url = Column(String, unique=True) engine = create_engine('sqlite:///apartments.db') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session()
from sqlalchemy import create_engine, Column, DateTime, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import func Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) timestamp = Column(DateTime, server_default=func.now()) craigslist_id = Column(String, unique=True) url = Column(String, unique=True) engine = create_engine('sqlite:///apartments.db') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session()
Add timestamp field to Listing
Add timestamp field to Listing
Python
mit
rlucioni/apartments,rlucioni/craigbot,rlucioni/craigbot
python
## Code Before: from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = Column(String, unique=True) url = Column(String, unique=True) engine = create_engine('sqlite:///apartments.db') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session() ## Instruction: Add timestamp field to Listing ## Code After: from sqlalchemy import create_engine, Column, DateTime, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import func Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) timestamp = Column(DateTime, server_default=func.now()) craigslist_id = Column(String, unique=True) url = Column(String, unique=True) engine = create_engine('sqlite:///apartments.db') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session()
- from sqlalchemy import create_engine, Column, Integer, String + from sqlalchemy import create_engine, Column, DateTime, Integer, String ? ++++++++++ from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker + from sqlalchemy.sql import func Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) + timestamp = Column(DateTime, server_default=func.now()) craigslist_id = Column(String, unique=True) url = Column(String, unique=True) engine = create_engine('sqlite:///apartments.db') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session()
4
0.190476
3
1
56d43a93be138facdb0db96631415fbfcbdb6bda
modules/lang/clojure/config.el
modules/lang/clojure/config.el
;;; lang/clojure/config.el -*- lexical-binding: t; -*- (def-package! clojure-mode :mode "\\.clj$") (def-package! cider :commands (cider-jack-in cider-mode) :config (setq nrepl-hide-special-buffers t))
;;; lang/clojure/config.el -*- lexical-binding: t; -*- (def-package! clojure-mode :mode (("\\.clj$" . clojure-mode) ("\\.cljs$". clojurescript-mode)) :commands (clojure-mode clojurescript-mode) ;; this might not be necessary :config (map! :map clojure-mode-map (:localleader "'" #'cider-jack-in "\"" #'cider-jack-in-clojurescript "r" #'cider-eval-region))) (def-package! cider :commands (cider-jack-in cider-mode cider-jack-in-clojurescript) :config (setq nrepl-hide-special-buffers t))
Add cljs mode and localleader keybindings
Add cljs mode and localleader keybindings
Emacs Lisp
mit
hlissner/doom-emacs,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/doom-emacs,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/doom-emacs,aminb/.emacs.d,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/.emacs.d,aminb/.emacs.d,aminb/.emacs.d,aminb/.emacs.d,aminb/.emacs.d,aminb/.emacs.d,hlissner/doom-emacs,aminb/.emacs.d,hlissner/doom-emacs,hlissner/.emacs.d,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/doom-emacs,aminb/.emacs.d
emacs-lisp
## Code Before: ;;; lang/clojure/config.el -*- lexical-binding: t; -*- (def-package! clojure-mode :mode "\\.clj$") (def-package! cider :commands (cider-jack-in cider-mode) :config (setq nrepl-hide-special-buffers t)) ## Instruction: Add cljs mode and localleader keybindings ## Code After: ;;; lang/clojure/config.el -*- lexical-binding: t; -*- (def-package! clojure-mode :mode (("\\.clj$" . clojure-mode) ("\\.cljs$". clojurescript-mode)) :commands (clojure-mode clojurescript-mode) ;; this might not be necessary :config (map! :map clojure-mode-map (:localleader "'" #'cider-jack-in "\"" #'cider-jack-in-clojurescript "r" #'cider-eval-region))) (def-package! cider :commands (cider-jack-in cider-mode cider-jack-in-clojurescript) :config (setq nrepl-hide-special-buffers t))
;;; lang/clojure/config.el -*- lexical-binding: t; -*- (def-package! clojure-mode - :mode "\\.clj$") + :mode (("\\.clj$" . clojure-mode) + ("\\.cljs$". clojurescript-mode)) + :commands (clojure-mode clojurescript-mode) ;; this might not be necessary + :config + (map! :map clojure-mode-map + (:localleader + "'" #'cider-jack-in + "\"" #'cider-jack-in-clojurescript + "r" #'cider-eval-region))) (def-package! cider - :commands (cider-jack-in cider-mode) + :commands (cider-jack-in cider-mode cider-jack-in-clojurescript) :config (setq nrepl-hide-special-buffers t))
12
1.333333
10
2
a4acc1c3dbd3d77104f39c957051f2f38884224c
server/app.js
server/app.js
var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var router = express.Router(); var Sequelize = require('sequelize'); var sequelize = new Sequelize(process.env.DATABASE_URL); var matchmaker = require('./controllers/Matchmaker'); var playController = require('./controllers/Play'); var turnController = require('./controllers/Turn'); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.use(bodyParser.json()); router.route('/play') .post(matchmaker.startGame); router.route('/fire') .post(playController.fire); router.route('/cancel/:username') .post(matchmaker.cancel); router.route('/turn/:username') .get(turnController.nextPlayer); app.use('/api', router); app.listen(app.get('port'), function() { console.log("Node app is running at localhost:" + app.get('port')); });
var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var router = express.Router(); var Sequelize = require('sequelize'); var sequelize = new Sequelize(process.env.DATABASE_URL); var matchmaker = require('./controllers/Matchmaker'); var playController = require('./controllers/Play'); var turnController = require('./controllers/Turn'); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.use(bodyParser.json()); router.route('/play') .post(matchmaker.startGame); router.route('/fire') .post(playController.fire); router.route('/cancel') .post(matchmaker.cancel); router.route('/turn/:username') .get(turnController.nextPlayer); app.use('/api', router); app.listen(app.get('port'), function() { console.log("Node app is running at localhost:" + app.get('port')); });
Edit server route url to match client request
Edit server route url to match client request
JavaScript
mit
andereld/progark,andereld/progark
javascript
## Code Before: var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var router = express.Router(); var Sequelize = require('sequelize'); var sequelize = new Sequelize(process.env.DATABASE_URL); var matchmaker = require('./controllers/Matchmaker'); var playController = require('./controllers/Play'); var turnController = require('./controllers/Turn'); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.use(bodyParser.json()); router.route('/play') .post(matchmaker.startGame); router.route('/fire') .post(playController.fire); router.route('/cancel/:username') .post(matchmaker.cancel); router.route('/turn/:username') .get(turnController.nextPlayer); app.use('/api', router); app.listen(app.get('port'), function() { console.log("Node app is running at localhost:" + app.get('port')); }); ## Instruction: Edit server route url to match client request ## Code After: var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var router = express.Router(); var Sequelize = require('sequelize'); var sequelize = new Sequelize(process.env.DATABASE_URL); var matchmaker = require('./controllers/Matchmaker'); var playController = require('./controllers/Play'); var turnController = require('./controllers/Turn'); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.use(bodyParser.json()); router.route('/play') .post(matchmaker.startGame); router.route('/fire') .post(playController.fire); router.route('/cancel') .post(matchmaker.cancel); router.route('/turn/:username') .get(turnController.nextPlayer); app.use('/api', router); app.listen(app.get('port'), function() { console.log("Node app is running at localhost:" + app.get('port')); });
var bodyParser = require('body-parser'); var express = require('express'); var app = express(); var router = express.Router(); var Sequelize = require('sequelize'); var sequelize = new Sequelize(process.env.DATABASE_URL); var matchmaker = require('./controllers/Matchmaker'); var playController = require('./controllers/Play'); var turnController = require('./controllers/Turn'); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); app.use(bodyParser.json()); router.route('/play') .post(matchmaker.startGame); router.route('/fire') .post(playController.fire); - router.route('/cancel/:username') ? ---------- + router.route('/cancel') .post(matchmaker.cancel); router.route('/turn/:username') .get(turnController.nextPlayer); app.use('/api', router); app.listen(app.get('port'), function() { console.log("Node app is running at localhost:" + app.get('port')); });
2
0.0625
1
1
4660b40c497c91eecb2284f2870eeebc64fd512f
lib/paypoint/blue.rb
lib/paypoint/blue.rb
require "paypoint/blue/version" require "paypoint/blue/api" require "paypoint/blue/hosted" require "paypoint/blue/utils" module PayPoint # Top level module with helper methods. module Blue # Creates a client for the PayPoint Blue API product # # @see PayPoint::Blue::Base#initialize def self.api_client(**options) PayPoint::Blue::API.new(**options) end # Creates a client for the PayPoint Blue Hosted product # # @see PayPoint::Blue::Base#initialize def self.hosted_client(**options) PayPoint::Blue::Hosted.new(**options) end # Parse a raw JSON PayPoint callback payload similarly to the # Faraday response middlewares set up in {PayPoint::Blue::Base}. # # @return [Hashie::Mash] the parsed, snake_cased response def self.parse_payload(json) payload = json.respond_to?(:read) ? json.read : json.to_s if payload.encoding == Encoding::ASCII_8BIT payload.force_encoding "iso-8859-1" end payload = JSON.parse(payload) payload = Utils.snakecase_and_symbolize_keys(payload) Hashie::Mash.new(payload) end end end
require "json" require "hashie/mash" require "paypoint/blue/version" require "paypoint/blue/api" require "paypoint/blue/hosted" require "paypoint/blue/utils" module PayPoint # Top level module with helper methods. module Blue # Creates a client for the PayPoint Blue API product # # @see PayPoint::Blue::Base#initialize def self.api_client(**options) PayPoint::Blue::API.new(**options) end # Creates a client for the PayPoint Blue Hosted product # # @see PayPoint::Blue::Base#initialize def self.hosted_client(**options) PayPoint::Blue::Hosted.new(**options) end # Parse a raw JSON PayPoint callback payload similarly to the # Faraday response middlewares set up in {PayPoint::Blue::Base}. # # @return [Hashie::Mash] the parsed, snake_cased response def self.parse_payload(json) payload = json.respond_to?(:read) ? json.read : json.to_s if payload.encoding == Encoding::ASCII_8BIT payload.force_encoding "iso-8859-1" end payload = JSON.parse(payload) payload = Utils.snakecase_and_symbolize_keys(payload) Hashie::Mash.new(payload) end end end
Make sure dependencies are loaded
Make sure dependencies are loaded
Ruby
mit
CPlus/paypoint-blue,CPlus/paypoint-blue
ruby
## Code Before: require "paypoint/blue/version" require "paypoint/blue/api" require "paypoint/blue/hosted" require "paypoint/blue/utils" module PayPoint # Top level module with helper methods. module Blue # Creates a client for the PayPoint Blue API product # # @see PayPoint::Blue::Base#initialize def self.api_client(**options) PayPoint::Blue::API.new(**options) end # Creates a client for the PayPoint Blue Hosted product # # @see PayPoint::Blue::Base#initialize def self.hosted_client(**options) PayPoint::Blue::Hosted.new(**options) end # Parse a raw JSON PayPoint callback payload similarly to the # Faraday response middlewares set up in {PayPoint::Blue::Base}. # # @return [Hashie::Mash] the parsed, snake_cased response def self.parse_payload(json) payload = json.respond_to?(:read) ? json.read : json.to_s if payload.encoding == Encoding::ASCII_8BIT payload.force_encoding "iso-8859-1" end payload = JSON.parse(payload) payload = Utils.snakecase_and_symbolize_keys(payload) Hashie::Mash.new(payload) end end end ## Instruction: Make sure dependencies are loaded ## Code After: require "json" require "hashie/mash" require "paypoint/blue/version" require "paypoint/blue/api" require "paypoint/blue/hosted" require "paypoint/blue/utils" module PayPoint # Top level module with helper methods. module Blue # Creates a client for the PayPoint Blue API product # # @see PayPoint::Blue::Base#initialize def self.api_client(**options) PayPoint::Blue::API.new(**options) end # Creates a client for the PayPoint Blue Hosted product # # @see PayPoint::Blue::Base#initialize def self.hosted_client(**options) PayPoint::Blue::Hosted.new(**options) end # Parse a raw JSON PayPoint callback payload similarly to the # Faraday response middlewares set up in {PayPoint::Blue::Base}. # # @return [Hashie::Mash] the parsed, snake_cased response def self.parse_payload(json) payload = json.respond_to?(:read) ? json.read : json.to_s if payload.encoding == Encoding::ASCII_8BIT payload.force_encoding "iso-8859-1" end payload = JSON.parse(payload) payload = Utils.snakecase_and_symbolize_keys(payload) Hashie::Mash.new(payload) end end end
+ require "json" + + require "hashie/mash" + require "paypoint/blue/version" require "paypoint/blue/api" require "paypoint/blue/hosted" require "paypoint/blue/utils" module PayPoint # Top level module with helper methods. module Blue # Creates a client for the PayPoint Blue API product # # @see PayPoint::Blue::Base#initialize def self.api_client(**options) PayPoint::Blue::API.new(**options) end # Creates a client for the PayPoint Blue Hosted product # # @see PayPoint::Blue::Base#initialize def self.hosted_client(**options) PayPoint::Blue::Hosted.new(**options) end # Parse a raw JSON PayPoint callback payload similarly to the # Faraday response middlewares set up in {PayPoint::Blue::Base}. # # @return [Hashie::Mash] the parsed, snake_cased response def self.parse_payload(json) payload = json.respond_to?(:read) ? json.read : json.to_s if payload.encoding == Encoding::ASCII_8BIT payload.force_encoding "iso-8859-1" end payload = JSON.parse(payload) payload = Utils.snakecase_and_symbolize_keys(payload) Hashie::Mash.new(payload) end end end
4
0.108108
4
0
827005a2abfd88f46991c92c77d94733d8d88a02
README.md
README.md
> Pithy project description ## Team - __Product Owner__: George Michel - __Scrum Master__: Matt Walsh - __Development Team Members__: Aaron Trank, Paige Vogenthaler ## Table of Contents 1. [Usage](#usage) 1. [Requirements](#requirements) 1. [Development](#development) 1. [Installing Dependencies](#installing-dependencies) 1. [Tasks](#tasks) 1. [Team](#team) 1. [Contributing](#contributing) ## Usage > Some usage instructions ## Requirements - Node 0.10.x - Redis 2.6.x - Postgresql 9.1.x - etc - etc ## Development ### Installing Dependencies From within the root directory: ```sh sudo npm install -g bower npm install bower install ``` ### Roadmap View the project roadmap [here](https://waffle.io/MapReactor/MapReactor) ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
> Pithy project description ## Team - __Product Owner__: George Michel - __Scrum Master__: Matt Walsh - __Development Team Members__: Aaron Trank, Paige Vogenthaler ## Table of Contents 1. [Usage](#usage) 1. [Requirements](#requirements) 1. [Development](#development) 1. [Installing Dependencies](#installing-dependencies) 1. [Tasks](#tasks) 1. [Team](#team) 1. [Contributing](#contributing) ## Usage > Some usage instructions ## Requirements - Node 0.10.x - Redis 2.6.x - Postgresql 9.1.x - React-native 0.38.0 ## Development ### Installing Dependencies From within the root directory: ```sh npm install react-native link ``` iOS dependencies: - *FB Auth* ```sh npm run ios:install-fb-auth ``` - *Mapbox*<br /> Follow instructions [here](https://github.com/mapbox/react-native-mapbox-gl/blob/master/ios/install.md)<br /> In addition: Add to 'Sonder => Build Settings => Search Paths => Framework Search Paths the below. ```sh $(PROJECT_DIR)/../node_modules/react-native-mapbox-gl ``` ### Roadmap View the project roadmap [here](https://waffle.io/MapReactor/MapReactor) ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
Update Install Dependencies instructions for iOS.
Update Install Dependencies instructions for iOS.
Markdown
mit
MapReactor/Sonder,MapReactor/Sonder,MapReactor/Sonder,MapReactor/Sonder,MapReactor/Sonder
markdown
## Code Before: > Pithy project description ## Team - __Product Owner__: George Michel - __Scrum Master__: Matt Walsh - __Development Team Members__: Aaron Trank, Paige Vogenthaler ## Table of Contents 1. [Usage](#usage) 1. [Requirements](#requirements) 1. [Development](#development) 1. [Installing Dependencies](#installing-dependencies) 1. [Tasks](#tasks) 1. [Team](#team) 1. [Contributing](#contributing) ## Usage > Some usage instructions ## Requirements - Node 0.10.x - Redis 2.6.x - Postgresql 9.1.x - etc - etc ## Development ### Installing Dependencies From within the root directory: ```sh sudo npm install -g bower npm install bower install ``` ### Roadmap View the project roadmap [here](https://waffle.io/MapReactor/MapReactor) ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines. ## Instruction: Update Install Dependencies instructions for iOS. ## Code After: > Pithy project description ## Team - __Product Owner__: George Michel - __Scrum Master__: Matt Walsh - __Development Team Members__: Aaron Trank, Paige Vogenthaler ## Table of Contents 1. [Usage](#usage) 1. [Requirements](#requirements) 1. [Development](#development) 1. [Installing Dependencies](#installing-dependencies) 1. [Tasks](#tasks) 1. [Team](#team) 1. [Contributing](#contributing) ## Usage > Some usage instructions ## Requirements - Node 0.10.x - Redis 2.6.x - Postgresql 9.1.x - React-native 0.38.0 ## Development ### Installing Dependencies From within the root directory: ```sh npm install react-native link ``` iOS dependencies: - *FB Auth* ```sh npm run ios:install-fb-auth ``` - *Mapbox*<br /> Follow instructions [here](https://github.com/mapbox/react-native-mapbox-gl/blob/master/ios/install.md)<br /> In addition: Add to 'Sonder => Build Settings => Search Paths => Framework Search Paths the below. ```sh $(PROJECT_DIR)/../node_modules/react-native-mapbox-gl ``` ### Roadmap View the project roadmap [here](https://waffle.io/MapReactor/MapReactor) ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
> Pithy project description ## Team - __Product Owner__: George Michel - __Scrum Master__: Matt Walsh - __Development Team Members__: Aaron Trank, Paige Vogenthaler ## Table of Contents 1. [Usage](#usage) 1. [Requirements](#requirements) 1. [Development](#development) 1. [Installing Dependencies](#installing-dependencies) 1. [Tasks](#tasks) 1. [Team](#team) 1. [Contributing](#contributing) ## Usage > Some usage instructions ## Requirements - Node 0.10.x - Redis 2.6.x - Postgresql 9.1.x + - React-native 0.38.0 - - etc - - etc ## Development ### Installing Dependencies From within the root directory: ```sh - sudo npm install -g bower npm install - bower install + react-native link + ``` + + iOS dependencies: + - *FB Auth* + ```sh + npm run ios:install-fb-auth + ``` + + - *Mapbox*<br /> + Follow instructions [here](https://github.com/mapbox/react-native-mapbox-gl/blob/master/ios/install.md)<br /> + In addition: Add to 'Sonder => Build Settings => Search Paths => Framework Search Paths the below. + ```sh + $(PROJECT_DIR)/../node_modules/react-native-mapbox-gl ``` ### Roadmap View the project roadmap [here](https://waffle.io/MapReactor/MapReactor) ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
19
0.372549
15
4
d98617a4d05925a2c349303a30c7b11797f152cb
interjector.js
interjector.js
$(function() { //Update "tied" elements on each change of the "fill" input interjector.fillNames.forEach(function(name) { $('#ijtr-fill-' + name).keyup(function() { $('#interjector .tied-' + name).text($('#ijtr-fill-' + name).val()); }); }); //Deal with "a/an" selection $('#ijtr-option-a').click(function() { $('#interjector .tied-a-an').text('a'); }); $('#ijtr-option-an').click(function() { $('#interjector .tied-a-an').text('an'); }); }); var interjector = { //Names of classes to update fillNames: [ 'linux', 'gnu', 'components', 'os', 'posix', 'project', 'kernel', 'kernel-role', 'osys', ], }
$(function() { //Update "tied" elements on each change of the "fill" input interjector.fillNames.forEach(function(name) { interjector.registerUpdateHandler(name, function() { interjector.setTiedText(name, interjector.getFillText(name)); }); }); //Deal with "a/an" selection $('#ijtr-option-a').click(function() { $('#interjector .tied-a-an').text('a'); }); $('#ijtr-option-an').click(function() { $('#interjector .tied-a-an').text('an'); }); }); var interjector = { //Names of classes to update fillNames: [ 'linux', 'gnu', 'components', 'os', 'posix', 'project', 'kernel', 'kernel-role', 'osys', ], //Get the element for filling in the value getFillElement: function(name) { return $('#ijtr-fill-' + name); }, //Get the elements that are tied to the value getTiedElements: function(name) { return $('#interjector .tied-' + name); }, //Register an event handler on update registerUpdateHandler: function(name, handler) { this.getFillElement(name).keyup(handler); }, //Get the filled text getFillText: function(name) { return this.getFillElement(name).val(); }, //Set the text on the tied elements setTiedText: function(name, text) { this.getTiedElements(name).text(text); }, }
Move jQuery logic into separate functions
Move jQuery logic into separate functions
JavaScript
mit
jack126guy/interjector,jack126guy/interjector
javascript
## Code Before: $(function() { //Update "tied" elements on each change of the "fill" input interjector.fillNames.forEach(function(name) { $('#ijtr-fill-' + name).keyup(function() { $('#interjector .tied-' + name).text($('#ijtr-fill-' + name).val()); }); }); //Deal with "a/an" selection $('#ijtr-option-a').click(function() { $('#interjector .tied-a-an').text('a'); }); $('#ijtr-option-an').click(function() { $('#interjector .tied-a-an').text('an'); }); }); var interjector = { //Names of classes to update fillNames: [ 'linux', 'gnu', 'components', 'os', 'posix', 'project', 'kernel', 'kernel-role', 'osys', ], } ## Instruction: Move jQuery logic into separate functions ## Code After: $(function() { //Update "tied" elements on each change of the "fill" input interjector.fillNames.forEach(function(name) { interjector.registerUpdateHandler(name, function() { interjector.setTiedText(name, interjector.getFillText(name)); }); }); //Deal with "a/an" selection $('#ijtr-option-a').click(function() { $('#interjector .tied-a-an').text('a'); }); $('#ijtr-option-an').click(function() { $('#interjector .tied-a-an').text('an'); }); }); var interjector = { //Names of classes to update fillNames: [ 'linux', 'gnu', 'components', 'os', 'posix', 'project', 'kernel', 'kernel-role', 'osys', ], //Get the element for filling in the value getFillElement: function(name) { return $('#ijtr-fill-' + name); }, //Get the elements that are tied to the value getTiedElements: function(name) { return $('#interjector .tied-' + name); }, //Register an event handler on update registerUpdateHandler: function(name, handler) { this.getFillElement(name).keyup(handler); }, //Get the filled text getFillText: function(name) { return this.getFillElement(name).val(); }, //Set the text on the tied elements setTiedText: function(name, text) { this.getTiedElements(name).text(text); }, }
$(function() { //Update "tied" elements on each change of the "fill" input interjector.fillNames.forEach(function(name) { - $('#ijtr-fill-' + name).keyup(function() { - $('#interjector .tied-' + name).text($('#ijtr-fill-' + name).val()); + interjector.registerUpdateHandler(name, function() { + interjector.setTiedText(name, interjector.getFillText(name)); }); }); //Deal with "a/an" selection $('#ijtr-option-a').click(function() { $('#interjector .tied-a-an').text('a'); }); $('#ijtr-option-an').click(function() { $('#interjector .tied-a-an').text('an'); }); }); var interjector = { //Names of classes to update fillNames: [ 'linux', 'gnu', 'components', 'os', 'posix', 'project', 'kernel', 'kernel-role', 'osys', ], + //Get the element for filling in the value + getFillElement: function(name) { + return $('#ijtr-fill-' + name); + }, + //Get the elements that are tied to the value + getTiedElements: function(name) { + return $('#interjector .tied-' + name); + }, + //Register an event handler on update + registerUpdateHandler: function(name, handler) { + this.getFillElement(name).keyup(handler); + }, + //Get the filled text + getFillText: function(name) { + return this.getFillElement(name).val(); + }, + //Set the text on the tied elements + setTiedText: function(name, text) { + this.getTiedElements(name).text(text); + }, }
24
0.8
22
2
d8a4bef52815f5b40e0cb041880d807e1e852492
src/fractalogy.cpp
src/fractalogy.cpp
int main() { std::cout << "Fractalogy!\n"; return 0; }
using std::cout; using std::complex; using std::exp; using std::norm; /// returns -1 on failing to escape int iteration(complex<double> c, int limit = 1000) { int i = 0; double n; complex<double> z(0, 0); while ((n = norm(z)) < 4 && i < limit) { z = exp(z) - c; ++i; } if (n < 4) return -1; else return i; } int main() { std::cout << "Fractalogy!\n"; double lower = -2, upper = 2; int width = 100, height = 100; for (int i = 0; i <= width; ++i) { for (int j = 0; j <= height; ++j) { complex<double> t; t = complex<double>(lower + (upper - lower) * i / width, lower + (upper - lower) * j / height); cout << iteration(t) << " "; } cout << std::endl; } return 0; }
Add the iteration function for the fractals
Add the iteration function for the fractals
C++
mit
zdravkoandonov/fractalogy,zdravkoandonov/fractalogy,zdravkoandonov/fractalogy
c++
## Code Before: int main() { std::cout << "Fractalogy!\n"; return 0; } ## Instruction: Add the iteration function for the fractals ## Code After: using std::cout; using std::complex; using std::exp; using std::norm; /// returns -1 on failing to escape int iteration(complex<double> c, int limit = 1000) { int i = 0; double n; complex<double> z(0, 0); while ((n = norm(z)) < 4 && i < limit) { z = exp(z) - c; ++i; } if (n < 4) return -1; else return i; } int main() { std::cout << "Fractalogy!\n"; double lower = -2, upper = 2; int width = 100, height = 100; for (int i = 0; i <= width; ++i) { for (int j = 0; j <= height; ++j) { complex<double> t; t = complex<double>(lower + (upper - lower) * i / width, lower + (upper - lower) * j / height); cout << iteration(t) << " "; } cout << std::endl; } return 0; }
+ + using std::cout; + using std::complex; + using std::exp; + using std::norm; + + /// returns -1 on failing to escape + int iteration(complex<double> c, int limit = 1000) { + int i = 0; + double n; + complex<double> z(0, 0); + while ((n = norm(z)) < 4 && i < limit) { + z = exp(z) - c; + ++i; + } + + if (n < 4) + return -1; + else + return i; + } int main() { std::cout << "Fractalogy!\n"; + double lower = -2, upper = 2; + int width = 100, height = 100; + for (int i = 0; i <= width; ++i) { + for (int j = 0; j <= height; ++j) { + complex<double> t; + t = complex<double>(lower + (upper - lower) * i / width, lower + (upper - lower) * j / height); + cout << iteration(t) << " "; + } + cout << std::endl; + } return 0; }
31
4.428571
31
0
640a9b0ab4aa39bb34d52ae2df219ebe1ba50e68
src/bem/blocks/sv-container.scss
src/bem/blocks/sv-container.scss
.sv-container-bem { color: $text-color; font-size: $font-size; font-family: "Segoe UI"; } .sv-container-bem__title { font-size: 1.87em; } .sv-container-bem fieldset { border: none; padding: 0; }
.sv-container-bem { color: $text-color; font-size: $font-size; font-family: "Segoe UI"; } .sv-container-bem__title { font-size: 1.87em; } .sv-container-bem fieldset { border: none; padding: 0; } .sv-container-bem legend { border: none; padding: 0; margin: 0; }
Fix legend style in bem theme (for bootstrap)
Fix legend style in bem theme (for bootstrap)
SCSS
mit
surveyjs/surveyjs,andrewtelnov/surveyjs,andrewtelnov/surveyjs,surveyjs/surveyjs,surveyjs/surveyjs,andrewtelnov/surveyjs,surveyjs/surveyjs
scss
## Code Before: .sv-container-bem { color: $text-color; font-size: $font-size; font-family: "Segoe UI"; } .sv-container-bem__title { font-size: 1.87em; } .sv-container-bem fieldset { border: none; padding: 0; } ## Instruction: Fix legend style in bem theme (for bootstrap) ## Code After: .sv-container-bem { color: $text-color; font-size: $font-size; font-family: "Segoe UI"; } .sv-container-bem__title { font-size: 1.87em; } .sv-container-bem fieldset { border: none; padding: 0; } .sv-container-bem legend { border: none; padding: 0; margin: 0; }
.sv-container-bem { color: $text-color; font-size: $font-size; font-family: "Segoe UI"; } .sv-container-bem__title { font-size: 1.87em; } .sv-container-bem fieldset { border: none; padding: 0; } + .sv-container-bem legend { + border: none; + padding: 0; + margin: 0; + }
5
0.416667
5
0
7f849e84b254f4226eaea7116697d3f0185fc388
Casks/timemachinescheduler-beta.rb
Casks/timemachinescheduler-beta.rb
class TimemachineschedulerBeta < Cask url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b2Full.zip' homepage 'http://www.klieme.com/TimeMachineScheduler.html' version '4.0b2(470)' sha1 '81325c8158db9e87c9291ecdc28e554c30e903af' nested_container 'TimeMachineScheduler_4.0b2.dmg' link 'TimeMachineScheduler.app' end
class TimemachineschedulerBeta < Cask url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b3Full.zip' homepage 'http://www.klieme.com/TimeMachineScheduler.html' version '4.0b3(483)' sha1 '0fd37298479db41329e12a748c9f6ba82ae5b4de' nested_container 'TimeMachineScheduler_4.0b3.dmg' link 'TimeMachineScheduler.app' end
Update TimeMachineScheduler to beta 3
Update TimeMachineScheduler to beta 3
Ruby
bsd-2-clause
victorpopkov/homebrew-versions,RJHsiao/homebrew-versions,caskroom/homebrew-versions,mauricerkelly/homebrew-versions,adjohnson916/homebrew-versions,geggo98/homebrew-versions,toonetown/homebrew-cask-versions,kstarsinic/homebrew-versions,cprecioso/homebrew-versions,a-x-/homebrew-versions,cprecioso/homebrew-versions,caskroom/homebrew-versions,bey2lah/homebrew-versions,zsjohny/homebrew-versions,digital-wonderland/homebrew-versions,coeligena/homebrew-verscustomized,hubwub/homebrew-versions,FinalDes/homebrew-versions,wickedsp1d3r/homebrew-versions,hubwub/homebrew-versions,Felerius/homebrew-versions,onewheelskyward/homebrew-versions,rogeriopradoj/homebrew-versions,rogeriopradoj/homebrew-versions,invl/homebrew-versions,Ngrd/homebrew-versions,pinut/homebrew-versions,hugoboos/homebrew-versions,nicday/homebrew-versions,3van/homebrew-versions,yurikoles/homebrew-versions,n8henrie/homebrew-versions,githubutilities/homebrew-versions,dictcp/homebrew-versions,peterjosling/homebrew-versions,zorosteven/homebrew-versions,peterjosling/homebrew-versions,bimmlerd/homebrew-versions,mahori/homebrew-cask-versions,mahori/homebrew-versions,noamross/homebrew-versions,stigkj/homebrew-caskroom-versions,ddinchev/homebrew-versions,delphinus35/homebrew-versions,zerrot/homebrew-versions,RJHsiao/homebrew-versions,bondezbond/homebrew-versions,alebcay/homebrew-versions,1zaman/homebrew-versions,gcds/homebrew-versions,elovelan/homebrew-versions,bey2lah/homebrew-versions,lantrix/homebrew-versions,lukasbestle/homebrew-versions,wickedsp1d3r/homebrew-versions,mauricerkelly/homebrew-versions,lantrix/homebrew-versions,victorpopkov/homebrew-versions,pkq/homebrew-versions,404NetworkError/homebrew-versions,mAAdhaTTah/homebrew-versions,stigkj/homebrew-caskroom-versions,visualphoenix/homebrew-versions,chadcatlett/caskroom-homebrew-versions,zchee/homebrew-versions,FinalDes/homebrew-versions,404NetworkError/homebrew-versions,rkJun/homebrew-versions,bondezbond/homebrew-versions,pkq/homebrew-versions,danielbayley/homebrew-versions,danielbayley/homebrew-versions,lukaselmer/homebrew-versions,Ngrd/homebrew-versions,hugoboos/homebrew-versions,deizel/homebrew-versions,yurikoles/homebrew-versions,toonetown/homebrew-cask-versions,pquentin/homebrew-versions,tomschlick/homebrew-versions
ruby
## Code Before: class TimemachineschedulerBeta < Cask url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b2Full.zip' homepage 'http://www.klieme.com/TimeMachineScheduler.html' version '4.0b2(470)' sha1 '81325c8158db9e87c9291ecdc28e554c30e903af' nested_container 'TimeMachineScheduler_4.0b2.dmg' link 'TimeMachineScheduler.app' end ## Instruction: Update TimeMachineScheduler to beta 3 ## Code After: class TimemachineschedulerBeta < Cask url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b3Full.zip' homepage 'http://www.klieme.com/TimeMachineScheduler.html' version '4.0b3(483)' sha1 '0fd37298479db41329e12a748c9f6ba82ae5b4de' nested_container 'TimeMachineScheduler_4.0b3.dmg' link 'TimeMachineScheduler.app' end
class TimemachineschedulerBeta < Cask - url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b2Full.zip' ? ^ + url 'http://www.klieme.com/Downloads/TimeMachineScheduler/TimeMachineScheduler_4.0b3Full.zip' ? ^ homepage 'http://www.klieme.com/TimeMachineScheduler.html' - version '4.0b2(470)' ? ^ ^^ + version '4.0b3(483)' ? ^ ^^ - sha1 '81325c8158db9e87c9291ecdc28e554c30e903af' + sha1 '0fd37298479db41329e12a748c9f6ba82ae5b4de' - nested_container 'TimeMachineScheduler_4.0b2.dmg' ? ^ + nested_container 'TimeMachineScheduler_4.0b3.dmg' ? ^ link 'TimeMachineScheduler.app' end
8
1
4
4
fedcac3b8245985200c17413aa0e86ea9cc4f565
README.md
README.md
theWheatherNode =============== Just another weather forecast webapp for practice jQuery and Node + Express. Installation: node install Execution: node app
theWheatherNode =============== Just another weather forecast webapp for practice jQuery and Node + Express. Installation and execution instructions: Installation: node install Execution: node app
Add formating for Installation and execution instructions
Add formating for Installation and execution instructions
Markdown
mit
babytruckdriver/theWeatherNode
markdown
## Code Before: theWheatherNode =============== Just another weather forecast webapp for practice jQuery and Node + Express. Installation: node install Execution: node app ## Instruction: Add formating for Installation and execution instructions ## Code After: theWheatherNode =============== Just another weather forecast webapp for practice jQuery and Node + Express. Installation and execution instructions: Installation: node install Execution: node app
theWheatherNode =============== Just another weather forecast webapp for practice jQuery and Node + Express. + Installation and execution instructions: - Installation: node install + Installation: node install ? ++++ - Execution: node app + Execution: node app ? ++++
5
0.714286
3
2
017e92226822a6082dc1258947fedd4621c62cb3
.travis.yml
.travis.yml
--- language: objective-c
--- language: objective-c before_script: - chmod +x travis/before_script.sh - chmod +x travis/script.sh - travis/before_script.sh script: - travis/script.sh
Revert "Try the default Travis CI configuration again"
Revert "Try the default Travis CI configuration again" This reverts commit 2111f882d8cc1ba89520590576515f475f09c49b.
YAML
mit
SanjoDeundiak/Nocilla,pcantrell/Nocilla,luisobo/Nocilla,tomguthrie/Nocilla,ileitch/Nocilla,luxe-eng/valet-ios.Nocilla,TheAdamBorek/Nocilla,TheAdamBorek/Nocilla,patcheng/Nocilla,0xmax/Nocilla,luxe-eng/valet-ios.Nocilla,0xmax/Nocilla,Panajev/Nocilla
yaml
## Code Before: --- language: objective-c ## Instruction: Revert "Try the default Travis CI configuration again" This reverts commit 2111f882d8cc1ba89520590576515f475f09c49b. ## Code After: --- language: objective-c before_script: - chmod +x travis/before_script.sh - chmod +x travis/script.sh - travis/before_script.sh script: - travis/script.sh
--- language: objective-c + + before_script: + - chmod +x travis/before_script.sh + - chmod +x travis/script.sh + - travis/before_script.sh + script: + - travis/script.sh
7
3.5
7
0
9bc46ee72f23f179dae09e106a3bafb3b8451977
misc/Kurzfassung.tex
misc/Kurzfassung.tex
% vim: set tw=160: \chapter*{Kurzfassung} \chapter*{Abstract}
% vim: set tw=160: % 2010 Peter A. Menzel \noindent \begin{minipage}{\textwidth} %%% minipage um Kapitel Kurzfassung UND Kapitel Abstract %%% auf eine Seite zu binden \chapter*{Kurzfassung} \blindtext \chapter*{Abstract} \blindtext \end{minipage}
Put both abstracts on one page. Thanks Peter!
Put both abstracts on one page. Thanks Peter!
TeX
mit
fladi/CAMPUS02-LaTeX
tex
## Code Before: % vim: set tw=160: \chapter*{Kurzfassung} \chapter*{Abstract} ## Instruction: Put both abstracts on one page. Thanks Peter! ## Code After: % vim: set tw=160: % 2010 Peter A. Menzel \noindent \begin{minipage}{\textwidth} %%% minipage um Kapitel Kurzfassung UND Kapitel Abstract %%% auf eine Seite zu binden \chapter*{Kurzfassung} \blindtext \chapter*{Abstract} \blindtext \end{minipage}
% vim: set tw=160: + % 2010 Peter A. Menzel + + \noindent + \begin{minipage}{\textwidth} + %%% minipage um Kapitel Kurzfassung UND Kapitel Abstract + %%% auf eine Seite zu binden \chapter*{Kurzfassung} - + \blindtext \chapter*{Abstract} + \blindtext + + \end{minipage}
11
1.833333
10
1
9b33e7d7d7426e3d7f27cd7d206765ae33e3e61f
tests/scripts/list-symbols.sh
tests/scripts/list-symbols.sh
set -eu if [ -d include/mbedtls ]; then :; else echo "$0: must be run from root" >&2 exit 1 fi if grep -i cmake Makefile >/dev/null; then echo "$0: not compatible with cmake" >&2 exit 1 fi cp include/mbedtls/config.h include/mbedtls/config.h.bak scripts/config.pl full make clean make_ret= CFLAGS=-fno-asynchronous-unwind-tables make lib \ >list-symbols.make.log 2>&1 || { make_ret=$? echo "Build failure: CFLAGS=-fno-asynchronous-unwind-tables make lib" cat list-symbols.make.log >&2 } rm list-symbols.make.log mv include/mbedtls/config.h.bak include/mbedtls/config.h if [ -n "$make_ret" ]; then exit "$make_ret" fi if uname | grep -F Darwin >/dev/null; then nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' elif uname | grep -F Linux >/dev/null; then nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' fi | sort > exported-symbols make clean wc -l exported-symbols
set -eu if [ -d include/mbedtls ]; then :; else echo "$0: must be run from root" >&2 exit 1 fi if grep -i cmake Makefile >/dev/null; then echo "$0: not compatible with cmake" >&2 exit 1 fi cp include/mbedtls/config.h include/mbedtls/config.h.bak scripts/config.pl full make clean make_ret= CFLAGS=-fno-asynchronous-unwind-tables make lib \ >list-symbols.make.log 2>&1 || { make_ret=$? echo "Build failure: CFLAGS=-fno-asynchronous-unwind-tables make lib" cat list-symbols.make.log >&2 } rm list-symbols.make.log mv include/mbedtls/config.h.bak include/mbedtls/config.h if [ -n "$make_ret" ]; then exit "$make_ret" fi if uname | grep -F Darwin >/dev/null; then nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' | grep -v -e ^FStar -e ^Hacl elif uname | grep -F Linux >/dev/null; then nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' | grep -v -e ^FStar -e ^Hacl fi | sort > exported-symbols make clean wc -l exported-symbols
Exclude FStar and Hacl* from exported symbol checks
ECDH: Exclude FStar and Hacl* from exported symbol checks
Shell
apache-2.0
Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,NXPmicro/mbedtls,NXPmicro/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls
shell
## Code Before: set -eu if [ -d include/mbedtls ]; then :; else echo "$0: must be run from root" >&2 exit 1 fi if grep -i cmake Makefile >/dev/null; then echo "$0: not compatible with cmake" >&2 exit 1 fi cp include/mbedtls/config.h include/mbedtls/config.h.bak scripts/config.pl full make clean make_ret= CFLAGS=-fno-asynchronous-unwind-tables make lib \ >list-symbols.make.log 2>&1 || { make_ret=$? echo "Build failure: CFLAGS=-fno-asynchronous-unwind-tables make lib" cat list-symbols.make.log >&2 } rm list-symbols.make.log mv include/mbedtls/config.h.bak include/mbedtls/config.h if [ -n "$make_ret" ]; then exit "$make_ret" fi if uname | grep -F Darwin >/dev/null; then nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' elif uname | grep -F Linux >/dev/null; then nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' fi | sort > exported-symbols make clean wc -l exported-symbols ## Instruction: ECDH: Exclude FStar and Hacl* from exported symbol checks ## Code After: set -eu if [ -d include/mbedtls ]; then :; else echo "$0: must be run from root" >&2 exit 1 fi if grep -i cmake Makefile >/dev/null; then echo "$0: not compatible with cmake" >&2 exit 1 fi cp include/mbedtls/config.h include/mbedtls/config.h.bak scripts/config.pl full make clean make_ret= CFLAGS=-fno-asynchronous-unwind-tables make lib \ >list-symbols.make.log 2>&1 || { make_ret=$? echo "Build failure: CFLAGS=-fno-asynchronous-unwind-tables make lib" cat list-symbols.make.log >&2 } rm list-symbols.make.log mv include/mbedtls/config.h.bak include/mbedtls/config.h if [ -n "$make_ret" ]; then exit "$make_ret" fi if uname | grep -F Darwin >/dev/null; then nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' | grep -v -e ^FStar -e ^Hacl elif uname | grep -F Linux >/dev/null; then nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' | grep -v -e ^FStar -e ^Hacl fi | sort > exported-symbols make clean wc -l exported-symbols
set -eu if [ -d include/mbedtls ]; then :; else echo "$0: must be run from root" >&2 exit 1 fi if grep -i cmake Makefile >/dev/null; then echo "$0: not compatible with cmake" >&2 exit 1 fi cp include/mbedtls/config.h include/mbedtls/config.h.bak scripts/config.pl full make clean make_ret= CFLAGS=-fno-asynchronous-unwind-tables make lib \ >list-symbols.make.log 2>&1 || { make_ret=$? echo "Build failure: CFLAGS=-fno-asynchronous-unwind-tables make lib" cat list-symbols.make.log >&2 } rm list-symbols.make.log mv include/mbedtls/config.h.bak include/mbedtls/config.h if [ -n "$make_ret" ]; then exit "$make_ret" fi if uname | grep -F Darwin >/dev/null; then - nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' + nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' | grep -v -e ^FStar -e ^Hacl ? +++++++++++++++++++++++++++++ elif uname | grep -F Linux >/dev/null; then - nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' + nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' | grep -v -e ^FStar -e ^Hacl ? +++++++++++++++++++++++++++++ fi | sort > exported-symbols make clean wc -l exported-symbols
4
0.105263
2
2
8a0a744021ae3c4f6ef7d4360783ae619b735479
app/views/orders/new.html.erb
app/views/orders/new.html.erb
<%= javascript_tag do %> var data = data || {}; data.categories = <%= Category.to_json %>; $(".show-here").text(window.data.categories); <% end %> <% content_for :title, "New Order" %> <% content_for :content_size, "col-md-10" %> <% content_for :content do %> <table id="new-order-table" class="table table-hover table-striped"> <thead> <tr> <th>Category</th> <th>Item</th> <th>Quantity</th> </tr> </thead> <tbody> <%# will be populated dynamically from orders.coffee %> </tbody> </table> <div> <button id="add-item-row" type="button" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Item </button> </div> <% end %>
<% content_for :title, "New Order" %> <% content_for :content_size, "col-md-10" %> <% content_for :content do %> <%= javascript_tag do %> var data = data || {}; data.categories = <%= Category.to_json %>; $(".show-here").text(window.data.categories); <% end %> <table id="new-order-table" class="table table-hover table-striped"> <thead> <tr> <th>Category</th> <th>Item</th> <th>Quantity</th> </tr> </thead> <tbody> <%# will be populated dynamically from orders.coffee %> </tbody> </table> <div> <button id="add-item-row" type="button" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Item </button> </div> <% end %>
Move javascript_tag into the content block so it is included in the resulting HTML
Move javascript_tag into the content block so it is included in the resulting HTML
HTML+ERB
mit
on-site/StockAid,on-site/StockAid,on-site/StockAid,icodeclean/StockAid,icodeclean/StockAid,icodeclean/StockAid
html+erb
## Code Before: <%= javascript_tag do %> var data = data || {}; data.categories = <%= Category.to_json %>; $(".show-here").text(window.data.categories); <% end %> <% content_for :title, "New Order" %> <% content_for :content_size, "col-md-10" %> <% content_for :content do %> <table id="new-order-table" class="table table-hover table-striped"> <thead> <tr> <th>Category</th> <th>Item</th> <th>Quantity</th> </tr> </thead> <tbody> <%# will be populated dynamically from orders.coffee %> </tbody> </table> <div> <button id="add-item-row" type="button" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Item </button> </div> <% end %> ## Instruction: Move javascript_tag into the content block so it is included in the resulting HTML ## Code After: <% content_for :title, "New Order" %> <% content_for :content_size, "col-md-10" %> <% content_for :content do %> <%= javascript_tag do %> var data = data || {}; data.categories = <%= Category.to_json %>; $(".show-here").text(window.data.categories); <% end %> <table id="new-order-table" class="table table-hover table-striped"> <thead> <tr> <th>Category</th> <th>Item</th> <th>Quantity</th> </tr> </thead> <tbody> <%# will be populated dynamically from orders.coffee %> </tbody> </table> <div> <button id="add-item-row" type="button" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Item </button> </div> <% end %>
- <%= javascript_tag do %> - var data = data || {}; - data.categories = <%= Category.to_json %>; - $(".show-here").text(window.data.categories); - <% end %> - <% content_for :title, "New Order" %> <% content_for :content_size, "col-md-10" %> <% content_for :content do %> + <%= javascript_tag do %> + var data = data || {}; + data.categories = <%= Category.to_json %>; + $(".show-here").text(window.data.categories); + <% end %> + <table id="new-order-table" class="table table-hover table-striped"> <thead> <tr> <th>Category</th> <th>Item</th> <th>Quantity</th> </tr> </thead> <tbody> <%# will be populated dynamically from orders.coffee %> </tbody> </table> <div> <button id="add-item-row" type="button" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add Item </button> </div> <% end %>
12
0.413793
6
6
d46e893a0d7081a0821f89625e0731b78035e1ea
src/adler32.c
src/adler32.c
/* * adler32.c * * Adler-32 checksum algorithm. */ #include "adler32.h" u32 adler32(const u8 *buffer, size_t size) { u32 s1 = 1; u32 s2 = 0; for (size_t i = 0; i < size; i++) { s1 = (s1 + buffer[i]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) | s1; }
/* * adler32.c * * Adler-32 checksum algorithm. */ #include "adler32.h" #include "compiler.h" /* * The Adler-32 divisor, or "base", value. */ #define DIVISOR 65521 /* * MAX_BYTES_PER_CHUNK is the most bytes that can be processed without the * possibility of s2 overflowing when it is represented as an unsigned 32-bit * integer. This value was computed using the following Python script: * * divisor = 65521 * count = 0 * s1 = divisor - 1 * s2 = divisor - 1 * while True: * s1 += 0xFF * s2 += s1 * if s2 > 0xFFFFFFFF: * break * count += 1 * print(count) * * Note that to get the correct worst-case value, we must assume that every byte * has value 0xFF and that s1 and s2 started with the highest possible values * modulo the divisor. */ #define MAX_BYTES_PER_CHUNK 5552 u32 adler32(const u8 *buffer, size_t size) { u32 s1 = 1; u32 s2 = 0; const u8 *p = buffer; const u8 * const end = p + size; while (p != end) { const u8 *chunk_end = p + min(end - p, MAX_BYTES_PER_CHUNK); do { s1 += *p++; s2 += s1; } while (p != chunk_end); s1 %= 65521; s2 %= 65521; } return (s2 << 16) | s1; }
Speed up Adler-32 by doing modulo less often
Speed up Adler-32 by doing modulo less often
C
mit
ebiggers/libdeflate,ebiggers/libdeflate,ebiggers/libdeflate
c
## Code Before: /* * adler32.c * * Adler-32 checksum algorithm. */ #include "adler32.h" u32 adler32(const u8 *buffer, size_t size) { u32 s1 = 1; u32 s2 = 0; for (size_t i = 0; i < size; i++) { s1 = (s1 + buffer[i]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) | s1; } ## Instruction: Speed up Adler-32 by doing modulo less often ## Code After: /* * adler32.c * * Adler-32 checksum algorithm. */ #include "adler32.h" #include "compiler.h" /* * The Adler-32 divisor, or "base", value. */ #define DIVISOR 65521 /* * MAX_BYTES_PER_CHUNK is the most bytes that can be processed without the * possibility of s2 overflowing when it is represented as an unsigned 32-bit * integer. This value was computed using the following Python script: * * divisor = 65521 * count = 0 * s1 = divisor - 1 * s2 = divisor - 1 * while True: * s1 += 0xFF * s2 += s1 * if s2 > 0xFFFFFFFF: * break * count += 1 * print(count) * * Note that to get the correct worst-case value, we must assume that every byte * has value 0xFF and that s1 and s2 started with the highest possible values * modulo the divisor. */ #define MAX_BYTES_PER_CHUNK 5552 u32 adler32(const u8 *buffer, size_t size) { u32 s1 = 1; u32 s2 = 0; const u8 *p = buffer; const u8 * const end = p + size; while (p != end) { const u8 *chunk_end = p + min(end - p, MAX_BYTES_PER_CHUNK); do { s1 += *p++; s2 += s1; } while (p != chunk_end); s1 %= 65521; s2 %= 65521; } return (s2 << 16) | s1; }
/* * adler32.c * * Adler-32 checksum algorithm. */ #include "adler32.h" + #include "compiler.h" + + /* + * The Adler-32 divisor, or "base", value. + */ + #define DIVISOR 65521 + + /* + * MAX_BYTES_PER_CHUNK is the most bytes that can be processed without the + * possibility of s2 overflowing when it is represented as an unsigned 32-bit + * integer. This value was computed using the following Python script: + * + * divisor = 65521 + * count = 0 + * s1 = divisor - 1 + * s2 = divisor - 1 + * while True: + * s1 += 0xFF + * s2 += s1 + * if s2 > 0xFFFFFFFF: + * break + * count += 1 + * print(count) + * + * Note that to get the correct worst-case value, we must assume that every byte + * has value 0xFF and that s1 and s2 started with the highest possible values + * modulo the divisor. + */ + #define MAX_BYTES_PER_CHUNK 5552 u32 adler32(const u8 *buffer, size_t size) { u32 s1 = 1; u32 s2 = 0; - for (size_t i = 0; i < size; i++) { - s1 = (s1 + buffer[i]) % 65521; - s2 = (s2 + s1) % 65521; + const u8 *p = buffer; + const u8 * const end = p + size; + while (p != end) { + const u8 *chunk_end = p + min(end - p, + MAX_BYTES_PER_CHUNK); + do { + s1 += *p++; + s2 += s1; + } while (p != chunk_end); + s1 %= 65521; + s2 %= 65521; } return (s2 << 16) | s1; }
43
2.263158
40
3
92b183309d0c4a3eb4cbcd39203af6e5c9042f76
src/scss/skin-modern/components/_subtitleoverlay-cea608.scss
src/scss/skin-modern/components/_subtitleoverlay-cea608.scss
.#{$prefix}-ui-subtitle-overlay { &.#{$prefix}-cea608 { top: 2em; .#{$prefix}-ui-subtitle-label { font-family: 'Courier New', Courier, 'Nimbus Mono L', 'Cutive Mono', monospace; line-height: 1em; position: absolute; text-transform: uppercase; } &.#{$prefix}-controlbar-visible { // Disable the make-space-for-controlbar mechanism // We don't want CEA-608 subtitles to make space for the controlbar because they're // positioned absolutely in relation to the video picture and thus cannot just move // somewhere else. bottom: 2em; transition: none; } } }
.#{$prefix}-ui-subtitle-overlay { &.#{$prefix}-cea608 { top: 2em; .#{$prefix}-ui-subtitle-label { font-family: 'Courier New', Courier, 'Nimbus Mono L', 'Cutive Mono', monospace; line-height: 1em; position: absolute; text-transform: uppercase; // sass-lint:disable force-pseudo-nesting &:nth-child(1n-1)::after { content: normal; white-space: normal; } } &.#{$prefix}-controlbar-visible { // Disable the make-space-for-controlbar mechanism // We don't want CEA-608 subtitles to make space for the controlbar because they're // positioned absolutely in relation to the video picture and thus cannot just move // somewhere else. bottom: 2em; transition: none; } } }
Disable line breaks for CEA-608 subtitles
Disable line breaks for CEA-608 subtitles
SCSS
mit
bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui
scss
## Code Before: .#{$prefix}-ui-subtitle-overlay { &.#{$prefix}-cea608 { top: 2em; .#{$prefix}-ui-subtitle-label { font-family: 'Courier New', Courier, 'Nimbus Mono L', 'Cutive Mono', monospace; line-height: 1em; position: absolute; text-transform: uppercase; } &.#{$prefix}-controlbar-visible { // Disable the make-space-for-controlbar mechanism // We don't want CEA-608 subtitles to make space for the controlbar because they're // positioned absolutely in relation to the video picture and thus cannot just move // somewhere else. bottom: 2em; transition: none; } } } ## Instruction: Disable line breaks for CEA-608 subtitles ## Code After: .#{$prefix}-ui-subtitle-overlay { &.#{$prefix}-cea608 { top: 2em; .#{$prefix}-ui-subtitle-label { font-family: 'Courier New', Courier, 'Nimbus Mono L', 'Cutive Mono', monospace; line-height: 1em; position: absolute; text-transform: uppercase; // sass-lint:disable force-pseudo-nesting &:nth-child(1n-1)::after { content: normal; white-space: normal; } } &.#{$prefix}-controlbar-visible { // Disable the make-space-for-controlbar mechanism // We don't want CEA-608 subtitles to make space for the controlbar because they're // positioned absolutely in relation to the video picture and thus cannot just move // somewhere else. bottom: 2em; transition: none; } } }
.#{$prefix}-ui-subtitle-overlay { &.#{$prefix}-cea608 { top: 2em; .#{$prefix}-ui-subtitle-label { font-family: 'Courier New', Courier, 'Nimbus Mono L', 'Cutive Mono', monospace; line-height: 1em; position: absolute; text-transform: uppercase; + + // sass-lint:disable force-pseudo-nesting + &:nth-child(1n-1)::after { + content: normal; + white-space: normal; + } } &.#{$prefix}-controlbar-visible { // Disable the make-space-for-controlbar mechanism // We don't want CEA-608 subtitles to make space for the controlbar because they're // positioned absolutely in relation to the video picture and thus cannot just move // somewhere else. bottom: 2em; transition: none; } } }
6
0.272727
6
0
b1aeb0bc098bdc0d7b18f42d8ff52c554eda242d
exercises/secret-handshake/metadata.yml
exercises/secret-handshake/metadata.yml
--- blurb: "Write a program that will take a decimal number, and convert it to the appropriate sequence of events for a secret handshake." source: "Bert, in Mary Poppins" source_url: "http://www.imdb.com/character/ch0011238/quotes"
--- blurb: "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake." source: "Bert, in Mary Poppins" source_url: "http://www.imdb.com/character/ch0011238/quotes"
Remove "write a program" from secret-handshake exercise
Remove "write a program" from secret-handshake exercise
YAML
mit
petertseng/x-common,Vankog/problem-specifications,rpottsoh/x-common,ErikSchierboom/x-common,rpottsoh/x-common,exercism/x-common,kgengler/x-common,jmluy/x-common,exercism/x-common,ErikSchierboom/x-common,petertseng/x-common,jmluy/x-common,Vankog/problem-specifications,jmluy/x-common,kgengler/x-common
yaml
## Code Before: --- blurb: "Write a program that will take a decimal number, and convert it to the appropriate sequence of events for a secret handshake." source: "Bert, in Mary Poppins" source_url: "http://www.imdb.com/character/ch0011238/quotes" ## Instruction: Remove "write a program" from secret-handshake exercise ## Code After: --- blurb: "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake." source: "Bert, in Mary Poppins" source_url: "http://www.imdb.com/character/ch0011238/quotes"
--- - blurb: "Write a program that will take a decimal number, and convert it to the appropriate sequence of events for a secret handshake." ? ^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ---- + blurb: "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake." ? ^ ^ ^ source: "Bert, in Mary Poppins" source_url: "http://www.imdb.com/character/ch0011238/quotes"
2
0.5
1
1
46667db202aadb3fff221a7467260207d40da1ec
ci/test_iso.sh
ci/test_iso.sh
set -x /root/staging.sh virsh destroy staging virsh undefine staging rm /var/lib/libvirt/images/staging.img dd if=/dev/zero of=/var/lib/libvirt/images/staging.img bs=1G count=16 virsh create ~/staging.xml until [ $(curl -s http://192.168.241.240/ubuntu/finished | grep up) ]; do echo 'waiting...'>>/tmp/test.log ; sleep 5 ; done virsh destroy pxe virsh undefine pxe rm /var/lib/libvirt/images/pxe.img dd if=/dev/zero of=/var/lib/libvirt/images/pxe.img bs=1G count=16 virsh create ~/pxe.xml
/root/staging.sh ssh-keygen -R 192.168.241.240 ssh-keygen -R 192.168.241.230 virsh destroy staging rm /var/lib/libvirt/images/staging.img dd if=/dev/zero of=/var/lib/libvirt/images/staging.img bs=1G count=16 virsh create ~/staging.xml count=0 until [ $(curl -s http://192.168.241.240/ubuntu/finished | grep up) ]; do echo "waiting... try ${count}" |& tee /tmp/test.log ; ((count++)); sleep 15 ; done virsh destroy pxe rm /var/lib/libvirt/images/pxe.img dd if=/dev/zero of=/var/lib/libvirt/images/pxe.img bs=1G count=16 virsh create ~/pxe.xml
Update test script to provide better feedback
Update test script to provide better feedback
Shell
apache-2.0
Havate/havate-openstack,Havate/havate-openstack,Havate/havate-openstack,Havate/havate-openstack
shell
## Code Before: set -x /root/staging.sh virsh destroy staging virsh undefine staging rm /var/lib/libvirt/images/staging.img dd if=/dev/zero of=/var/lib/libvirt/images/staging.img bs=1G count=16 virsh create ~/staging.xml until [ $(curl -s http://192.168.241.240/ubuntu/finished | grep up) ]; do echo 'waiting...'>>/tmp/test.log ; sleep 5 ; done virsh destroy pxe virsh undefine pxe rm /var/lib/libvirt/images/pxe.img dd if=/dev/zero of=/var/lib/libvirt/images/pxe.img bs=1G count=16 virsh create ~/pxe.xml ## Instruction: Update test script to provide better feedback ## Code After: /root/staging.sh ssh-keygen -R 192.168.241.240 ssh-keygen -R 192.168.241.230 virsh destroy staging rm /var/lib/libvirt/images/staging.img dd if=/dev/zero of=/var/lib/libvirt/images/staging.img bs=1G count=16 virsh create ~/staging.xml count=0 until [ $(curl -s http://192.168.241.240/ubuntu/finished | grep up) ]; do echo "waiting... try ${count}" |& tee /tmp/test.log ; ((count++)); sleep 15 ; done virsh destroy pxe rm /var/lib/libvirt/images/pxe.img dd if=/dev/zero of=/var/lib/libvirt/images/pxe.img bs=1G count=16 virsh create ~/pxe.xml
- set -x /root/staging.sh + ssh-keygen -R 192.168.241.240 + ssh-keygen -R 192.168.241.230 virsh destroy staging - virsh undefine staging rm /var/lib/libvirt/images/staging.img dd if=/dev/zero of=/var/lib/libvirt/images/staging.img bs=1G count=16 virsh create ~/staging.xml - + count=0 - until [ $(curl -s http://192.168.241.240/ubuntu/finished | grep up) ]; do echo 'waiting...'>>/tmp/test.log ; sleep 5 ; done ? ^ ^^^ + until [ $(curl -s http://192.168.241.240/ubuntu/finished | grep up) ]; do echo "waiting... try ${count}" |& tee /tmp/test.log ; ((count++)); sleep 15 ; done ? ^ ^^^^^^^^^^^^^^^^^^^^^^ +++++++++++++ + virsh destroy pxe - virsh undefine pxe rm /var/lib/libvirt/images/pxe.img dd if=/dev/zero of=/var/lib/libvirt/images/pxe.img bs=1G count=16 virsh create ~/pxe.xml
9
0.529412
4
5
57e961138975b510c900b297d65784e1b14c2898
server/app.js
server/app.js
var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); //var models = require("./models"); var PORT = process.env.PORT || 3000; // app.get('/', function (req, res) { // res.sendFile(__dirname + '/socketTest.html'); // }) //models.sequelize.sync().then(function () { io.on('connection', function(client) { console.log('Someone connected!'); client.on('join', function(data) { if(data === 'This is your teacher speaking') { client.emit('greeting', 'Hiya, Teach!'); } else{ client.emit('greeting', 'Hello, student. Please wait for your instructor to open a new poll.'); } //client.emit('openPoll', 'hello, its me'); }); client.on('newPoll', function(data) { console.log('>>>>>>>>>',data); io.sockets.emit('openPoll', data); }); client.on('disconnect', function(client) { console.log('Bye!\n'); }); }); require('./config/routes.js')(app, express); server.listen(PORT, function (){ console.log('listening on port', PORT); }); // };
var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); //var models = require("./models"); var PORT = process.env.PORT || 3000; //models.sequelize.sync().then(function () { io.on('connection', function(client) { console.log('Someone connected!'); client.on('join', function(data) { if(data === 'This is your teacher speaking') { client.emit('greeting', 'Hiya, Teach!'); } else{ client.emit('greeting', 'Hello, student. Please wait for your instructor to open a new poll.'); } }); client.on('newPoll', function(data) { io.sockets.emit('openPoll', data); }); client.on('disconnect', function(client) { console.log('Bye!\n'); }); }); require('./config/routes.js')(app, express); server.listen(PORT, function (){ console.log('listening on port', PORT); }); // };
Delete zombie code from socket testing
Delete zombie code from socket testing
JavaScript
mit
Jakeyrob/thumbroll,absurdSquid/thumbroll,absurdSquid/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll
javascript
## Code Before: var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); //var models = require("./models"); var PORT = process.env.PORT || 3000; // app.get('/', function (req, res) { // res.sendFile(__dirname + '/socketTest.html'); // }) //models.sequelize.sync().then(function () { io.on('connection', function(client) { console.log('Someone connected!'); client.on('join', function(data) { if(data === 'This is your teacher speaking') { client.emit('greeting', 'Hiya, Teach!'); } else{ client.emit('greeting', 'Hello, student. Please wait for your instructor to open a new poll.'); } //client.emit('openPoll', 'hello, its me'); }); client.on('newPoll', function(data) { console.log('>>>>>>>>>',data); io.sockets.emit('openPoll', data); }); client.on('disconnect', function(client) { console.log('Bye!\n'); }); }); require('./config/routes.js')(app, express); server.listen(PORT, function (){ console.log('listening on port', PORT); }); // }; ## Instruction: Delete zombie code from socket testing ## Code After: var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); //var models = require("./models"); var PORT = process.env.PORT || 3000; //models.sequelize.sync().then(function () { io.on('connection', function(client) { console.log('Someone connected!'); client.on('join', function(data) { if(data === 'This is your teacher speaking') { client.emit('greeting', 'Hiya, Teach!'); } else{ client.emit('greeting', 'Hello, student. Please wait for your instructor to open a new poll.'); } }); client.on('newPoll', function(data) { io.sockets.emit('openPoll', data); }); client.on('disconnect', function(client) { console.log('Bye!\n'); }); }); require('./config/routes.js')(app, express); server.listen(PORT, function (){ console.log('listening on port', PORT); }); // };
var express = require('express'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); //var models = require("./models"); var PORT = process.env.PORT || 3000; - - // app.get('/', function (req, res) { - // res.sendFile(__dirname + '/socketTest.html'); - // }) //models.sequelize.sync().then(function () { io.on('connection', function(client) { console.log('Someone connected!'); client.on('join', function(data) { if(data === 'This is your teacher speaking') { client.emit('greeting', 'Hiya, Teach!'); } else{ client.emit('greeting', 'Hello, student. Please wait for your instructor to open a new poll.'); } - //client.emit('openPoll', 'hello, its me'); }); client.on('newPoll', function(data) { - console.log('>>>>>>>>>',data); io.sockets.emit('openPoll', data); }); client.on('disconnect', function(client) { console.log('Bye!\n'); }); }); require('./config/routes.js')(app, express); server.listen(PORT, function (){ console.log('listening on port', PORT); }); // };
6
0.136364
0
6
661299275942813a0c45aa90db64c9603d287839
lib_common/src/d1_common/iter/string.py
lib_common/src/d1_common/iter/string.py
"""Iterate over string""" from __future__ import absolute_import import StringIO import d1_common.const class StringIterator(object): """Generator that returns the bytes of a string in chunks""" def __init__(self, string, chunk_size=d1_common.const.DEFAULT_CHUNK_SIZE): self._string = string self._chunk_size = chunk_size def __iter__(self): f = StringIO.StringIO(self._string) while True: chunk_str = f.read(self._chunk_size) if not chunk_str: break yield chunk_str
"""Iterate over string""" from __future__ import absolute_import import StringIO import d1_common.const class StringIterator(object): """Generator that returns the bytes of a string in chunks""" def __init__(self, string, chunk_size=d1_common.const.DEFAULT_CHUNK_SIZE): self._string = string self._chunk_size = chunk_size def __iter__(self): f = StringIO.StringIO(self._string) while True: chunk_str = f.read(self._chunk_size) if not chunk_str: break yield chunk_str def __len__(self): return len(self._string) @property def size(self): return len(self._string)
Improve StringIterator to allow for more general usage
Improve StringIterator to allow for more general usage
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
python
## Code Before: """Iterate over string""" from __future__ import absolute_import import StringIO import d1_common.const class StringIterator(object): """Generator that returns the bytes of a string in chunks""" def __init__(self, string, chunk_size=d1_common.const.DEFAULT_CHUNK_SIZE): self._string = string self._chunk_size = chunk_size def __iter__(self): f = StringIO.StringIO(self._string) while True: chunk_str = f.read(self._chunk_size) if not chunk_str: break yield chunk_str ## Instruction: Improve StringIterator to allow for more general usage ## Code After: """Iterate over string""" from __future__ import absolute_import import StringIO import d1_common.const class StringIterator(object): """Generator that returns the bytes of a string in chunks""" def __init__(self, string, chunk_size=d1_common.const.DEFAULT_CHUNK_SIZE): self._string = string self._chunk_size = chunk_size def __iter__(self): f = StringIO.StringIO(self._string) while True: chunk_str = f.read(self._chunk_size) if not chunk_str: break yield chunk_str def __len__(self): return len(self._string) @property def size(self): return len(self._string)
"""Iterate over string""" from __future__ import absolute_import import StringIO import d1_common.const class StringIterator(object): """Generator that returns the bytes of a string in chunks""" def __init__(self, string, chunk_size=d1_common.const.DEFAULT_CHUNK_SIZE): self._string = string self._chunk_size = chunk_size def __iter__(self): f = StringIO.StringIO(self._string) while True: chunk_str = f.read(self._chunk_size) if not chunk_str: break yield chunk_str + + def __len__(self): + return len(self._string) + + @property + def size(self): + return len(self._string)
7
0.304348
7
0
8157adc2319b381f6e6fa01a46ec2039ec6bb8c6
src/Statistics/EffectSize.php
src/Statistics/EffectSize.php
<?php namespace MathPHP\Statistics; /** * Effect size is a quantitative measure of the strength of a phenomenon. * https://en.wikipedia.org/wiki/Effect_size */ class EffectSize { /** * η² (Eta-squared) * * Eta-squared describes the ratio of variance explained in the dependent * variable by a predictor while controlling for other predictors, making * it analogous to the r². * * SSB * η² = --- * SST * * where: * SSB = sum of squares between (treatment) * SST = sum of squares total * * @param number $SSB Sum of squares between (treatment) * @param number $SST Sum of squares total * * @return number */ public static function etaSquared($SSB, $SST) { return $SSB / $SST; } }
<?php namespace MathPHP\Statistics; /** * Effect size is a quantitative measure of the strength of a phenomenon. * https://en.wikipedia.org/wiki/Effect_size */ class EffectSize { /** * η² (Eta-squared) * * Eta-squared describes the ratio of variance explained in the dependent * variable by a predictor while controlling for other predictors, making * it analogous to the r². * * SSB * η² = --- * SST * * where: * SSB = sum of squares between (treatment) * SST = sum of squares total * * @param number $SSB Sum of squares between (treatment) * @param number $SST Sum of squares total * * @return number */ public static function etaSquared($SSB, $SST) { return $SSB / $SST; } /** * η²p (Partial eta-squared) * * SSB * η²p = --------- * SSB + SSE * * where: * SSB = sum of squares between (treatment) * SSE = sum of squares error * * @param number $SSB Sum of squares between (treatment) * @param number $SSE Sum of squares error * * @return number */ public static function partialEtaSquared($SSB, $SSE) { return $SSB / ($SSB + $SSE); } }
Add partial eta-squared effect size.
Add partial eta-squared effect size.
PHP
mit
Beakerboy/math-php,markrogoyski/math-php
php
## Code Before: <?php namespace MathPHP\Statistics; /** * Effect size is a quantitative measure of the strength of a phenomenon. * https://en.wikipedia.org/wiki/Effect_size */ class EffectSize { /** * η² (Eta-squared) * * Eta-squared describes the ratio of variance explained in the dependent * variable by a predictor while controlling for other predictors, making * it analogous to the r². * * SSB * η² = --- * SST * * where: * SSB = sum of squares between (treatment) * SST = sum of squares total * * @param number $SSB Sum of squares between (treatment) * @param number $SST Sum of squares total * * @return number */ public static function etaSquared($SSB, $SST) { return $SSB / $SST; } } ## Instruction: Add partial eta-squared effect size. ## Code After: <?php namespace MathPHP\Statistics; /** * Effect size is a quantitative measure of the strength of a phenomenon. * https://en.wikipedia.org/wiki/Effect_size */ class EffectSize { /** * η² (Eta-squared) * * Eta-squared describes the ratio of variance explained in the dependent * variable by a predictor while controlling for other predictors, making * it analogous to the r². * * SSB * η² = --- * SST * * where: * SSB = sum of squares between (treatment) * SST = sum of squares total * * @param number $SSB Sum of squares between (treatment) * @param number $SST Sum of squares total * * @return number */ public static function etaSquared($SSB, $SST) { return $SSB / $SST; } /** * η²p (Partial eta-squared) * * SSB * η²p = --------- * SSB + SSE * * where: * SSB = sum of squares between (treatment) * SSE = sum of squares error * * @param number $SSB Sum of squares between (treatment) * @param number $SSE Sum of squares error * * @return number */ public static function partialEtaSquared($SSB, $SSE) { return $SSB / ($SSB + $SSE); } }
<?php namespace MathPHP\Statistics; /** * Effect size is a quantitative measure of the strength of a phenomenon. * https://en.wikipedia.org/wiki/Effect_size */ class EffectSize { /** * η² (Eta-squared) * * Eta-squared describes the ratio of variance explained in the dependent * variable by a predictor while controlling for other predictors, making * it analogous to the r². * * SSB * η² = --- * SST * * where: * SSB = sum of squares between (treatment) * SST = sum of squares total * * @param number $SSB Sum of squares between (treatment) * @param number $SST Sum of squares total * * @return number */ public static function etaSquared($SSB, $SST) { return $SSB / $SST; } + + /** + * η²p (Partial eta-squared) + * + * SSB + * η²p = --------- + * SSB + SSE + * + * where: + * SSB = sum of squares between (treatment) + * SSE = sum of squares error + * + * @param number $SSB Sum of squares between (treatment) + * @param number $SSE Sum of squares error + * + * @return number + */ + public static function partialEtaSquared($SSB, $SSE) + { + return $SSB / ($SSB + $SSE); + } }
21
0.617647
21
0
4c22b81175de7ab1ee9c465cb040c4ffc298a6e0
root/bin/setup.sh
root/bin/setup.sh
ALIASES="" echo "### Fetch MASTER_IP" MASTER_IP=$(cat /etc/resolv.conf |grep nameserver|head -n1|awk '{print $2}') echo "MASTER_IP=${MASTER_IP}" export no_proxy=${MASTER_IP} echo "### Fetch MY_IP" MY_IP=$(ip -o -4 addr|grep eth0|awk '{print $4}'|awk -F/ '{print $1}') echo "MY_IP=${MY_IP}" echo "### Send IP to etcd" for HOST in $(hostname) ${ALIASES};do echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value=${MY_IP}" curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value="${MY_IP}" done echo "### Send PTR to etcd" echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value=$(hostname)." curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value="$(hostname)." exit 0
ALIASES="" echo "### Fetch MASTER_IP" MASTER_IP=$(cat /etc/resolv.conf |grep nameserver|head -n1|awk '{print $2}') echo "MASTER_IP=${MASTER_IP}" export no_proxy=${MASTER_IP} echo "### Fetch MY_IP" MY_IP=$(ip -o -4 addr|grep eth0|awk '{print $4}'|awk -F/ '{print $1}') echo "MY_IP=${MY_IP}" echo "### Send IP to etcd" for HOST in $(hostname) ${ALIASES};do echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value=${MY_IP}" curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value="${MY_IP}" done echo "### Send PTR to etcd" echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value=$(hostname)." curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value="$(hostname)." ## Set new date to trigger update of NodeRange curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/confd/watch/compute/last_update $(date +%s) exit 0
Set new date to trigger update of NodeRange
Set new date to trigger update of NodeRange
Shell
mit
ChristianKniep/docker-compute,ChristianKniep/docker-compute,ChristianKniep/docker-compute
shell
## Code Before: ALIASES="" echo "### Fetch MASTER_IP" MASTER_IP=$(cat /etc/resolv.conf |grep nameserver|head -n1|awk '{print $2}') echo "MASTER_IP=${MASTER_IP}" export no_proxy=${MASTER_IP} echo "### Fetch MY_IP" MY_IP=$(ip -o -4 addr|grep eth0|awk '{print $4}'|awk -F/ '{print $1}') echo "MY_IP=${MY_IP}" echo "### Send IP to etcd" for HOST in $(hostname) ${ALIASES};do echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value=${MY_IP}" curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value="${MY_IP}" done echo "### Send PTR to etcd" echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value=$(hostname)." curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value="$(hostname)." exit 0 ## Instruction: Set new date to trigger update of NodeRange ## Code After: ALIASES="" echo "### Fetch MASTER_IP" MASTER_IP=$(cat /etc/resolv.conf |grep nameserver|head -n1|awk '{print $2}') echo "MASTER_IP=${MASTER_IP}" export no_proxy=${MASTER_IP} echo "### Fetch MY_IP" MY_IP=$(ip -o -4 addr|grep eth0|awk '{print $4}'|awk -F/ '{print $1}') echo "MY_IP=${MY_IP}" echo "### Send IP to etcd" for HOST in $(hostname) ${ALIASES};do echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value=${MY_IP}" curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value="${MY_IP}" done echo "### Send PTR to etcd" echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value=$(hostname)." curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value="$(hostname)." ## Set new date to trigger update of NodeRange curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/confd/watch/compute/last_update $(date +%s) exit 0
ALIASES="" echo "### Fetch MASTER_IP" MASTER_IP=$(cat /etc/resolv.conf |grep nameserver|head -n1|awk '{print $2}') echo "MASTER_IP=${MASTER_IP}" export no_proxy=${MASTER_IP} echo "### Fetch MY_IP" MY_IP=$(ip -o -4 addr|grep eth0|awk '{print $4}'|awk -F/ '{print $1}') echo "MY_IP=${MY_IP}" echo "### Send IP to etcd" for HOST in $(hostname) ${ALIASES};do echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value=${MY_IP}" curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/${HOST}/A -d value="${MY_IP}" done echo "### Send PTR to etcd" echo "# curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value=$(hostname)." curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/helix/arpa/in-addr/${MY_PTR}/PTR -d value="$(hostname)." + ## Set new date to trigger update of NodeRange + curl -s -XPUT http://${MASTER_IP}:4001/v2/keys/confd/watch/compute/last_update $(date +%s) + exit 0
3
0.136364
3
0
0ad27d52ba696728e69731a3f2a67cd9b9836f83
app/views/layouts/core/inline_js/_fonts_async.html.haml
app/views/layouts/core/inline_js/_fonts_async.html.haml
:javascript (function(){ if (window.lp.enhanced === true && window.localStorage.getItem('_lpfont') != "true") { window.onload = function() { var xhr = new XMLHttpRequest(); var compiledPath = "#{font_path('fonts.css')}"; var newPath = "//www.lonelyplanet.com/assets/" + compiledPath.split('/assets/')[1] xhr.open('GET', newPath); xhr.onload = function (e) { window.localStorage.setItem('_lpfont', 'true') }; xhr.send(); } } })()
:javascript (function(){ if (window.lp.enhanced === true && window.localStorage.getItem('_lpfont') != "true") { window.onload = function() { var xhr = new XMLHttpRequest(); var compiledPath = "#{font_path('fonts.css')}", host = window.location.host; if (host == "shop.lonelyplanet.com") { host = host.replace(/shop/, 'www'); } xhr.open('GET', "//" + host + "/assets/" + compiledPath.split('/assets/')[1]); xhr.onload = function (e) { window.localStorage.setItem('_lpfont', 'true') }; xhr.send(); } } })()
Enable local serve of fonts.css
Enable local serve of fonts.css
Haml
mit
Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,Lostmyname/rizzo
haml
## Code Before: :javascript (function(){ if (window.lp.enhanced === true && window.localStorage.getItem('_lpfont') != "true") { window.onload = function() { var xhr = new XMLHttpRequest(); var compiledPath = "#{font_path('fonts.css')}"; var newPath = "//www.lonelyplanet.com/assets/" + compiledPath.split('/assets/')[1] xhr.open('GET', newPath); xhr.onload = function (e) { window.localStorage.setItem('_lpfont', 'true') }; xhr.send(); } } })() ## Instruction: Enable local serve of fonts.css ## Code After: :javascript (function(){ if (window.lp.enhanced === true && window.localStorage.getItem('_lpfont') != "true") { window.onload = function() { var xhr = new XMLHttpRequest(); var compiledPath = "#{font_path('fonts.css')}", host = window.location.host; if (host == "shop.lonelyplanet.com") { host = host.replace(/shop/, 'www'); } xhr.open('GET', "//" + host + "/assets/" + compiledPath.split('/assets/')[1]); xhr.onload = function (e) { window.localStorage.setItem('_lpfont', 'true') }; xhr.send(); } } })()
:javascript (function(){ if (window.lp.enhanced === true && window.localStorage.getItem('_lpfont') != "true") { window.onload = function() { var xhr = new XMLHttpRequest(); - var compiledPath = "#{font_path('fonts.css')}"; ? ^ + var compiledPath = "#{font_path('fonts.css')}", ? ^ - var newPath = "//www.lonelyplanet.com/assets/" + compiledPath.split('/assets/')[1] - - xhr.open('GET', newPath); + host = window.location.host; + + if (host == "shop.lonelyplanet.com") { + host = host.replace(/shop/, 'www'); + } + + xhr.open('GET', "//" + host + "/assets/" + compiledPath.split('/assets/')[1]); xhr.onload = function (e) { window.localStorage.setItem('_lpfont', 'true') }; xhr.send(); } } })()
12
0.6
8
4
467b1f85f6827dcbae95ee3c72f5c35f7e79ccd0
.bintray_setup_credentials.sh
.bintray_setup_credentials.sh
echo "user = ${BINTRAY_USER}" >> .bintray_credentials echo "password = ${BINTRAY_TOKEN}" >> .bintray_credentials
echo "realm = Bintray API Realm" > .bintray_credentials echo "host = api.bintray.com" >> .bintray_credentials echo "user = ${BINTRAY_USER}" >> .bintray_credentials echo "password = ${BINTRAY_TOKEN}" >> .bintray_credentials
Fix appending user and password to bintray credentials file
Fix appending user and password to bintray credentials file
Shell
mit
blstream/akka-viz,blstream/akka-viz,blstream/akka-viz
shell
## Code Before: echo "user = ${BINTRAY_USER}" >> .bintray_credentials echo "password = ${BINTRAY_TOKEN}" >> .bintray_credentials ## Instruction: Fix appending user and password to bintray credentials file ## Code After: echo "realm = Bintray API Realm" > .bintray_credentials echo "host = api.bintray.com" >> .bintray_credentials echo "user = ${BINTRAY_USER}" >> .bintray_credentials echo "password = ${BINTRAY_TOKEN}" >> .bintray_credentials
+ echo "realm = Bintray API Realm" > .bintray_credentials + echo "host = api.bintray.com" >> .bintray_credentials echo "user = ${BINTRAY_USER}" >> .bintray_credentials echo "password = ${BINTRAY_TOKEN}" >> .bintray_credentials
2
1
2
0
f8290954b27e655562878d16df7e4793262f50d7
wafer/tickets/management/commands/import_quicket_guest_list.py
wafer/tickets/management/commands/import_quicket_guest_list.py
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise CommandError('1 CSV File required') with open(args[0], 'r') as f: reader = csv.reader(f) header = next(reader) if len(header) != 11: raise CommandError('CSV format has changed. Update wafer') for ticket in reader: self.import_ticket(*ticket) def import_ticket(self, ticket_number, ticket_barcode, purchase_date, ticket_type, ticket_holder, email, cellphone, checked_in, checked_in_date, checked_in_by, complimentary): import_ticket(ticket_barcode, ticket_type, email)
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise CommandError('1 CSV File required') columns = ('Ticket Number', 'Ticket Barcode', 'Purchase Date', 'Ticket Type', 'Ticket Holder', 'Email', 'Cellphone', 'Checked in', 'Checked in date', 'Checked in by', 'Complimentary') keys = [column.lower().replace(' ', '_') for column in columns] with open(args[0], 'r') as f: reader = csv.reader(f) header = tuple(next(reader)) if header != columns: raise CommandError('CSV format has changed. Update wafer') for row in reader: ticket = dict(zip(keys, row)) import_ticket(ticket['ticket_barcode'], ticket['ticket_type'], ticket['email'])
Check CSV header, not column count (and refactor)
Check CSV header, not column count (and refactor)
Python
isc
CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
python
## Code Before: import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise CommandError('1 CSV File required') with open(args[0], 'r') as f: reader = csv.reader(f) header = next(reader) if len(header) != 11: raise CommandError('CSV format has changed. Update wafer') for ticket in reader: self.import_ticket(*ticket) def import_ticket(self, ticket_number, ticket_barcode, purchase_date, ticket_type, ticket_holder, email, cellphone, checked_in, checked_in_date, checked_in_by, complimentary): import_ticket(ticket_barcode, ticket_type, email) ## Instruction: Check CSV header, not column count (and refactor) ## Code After: import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise CommandError('1 CSV File required') columns = ('Ticket Number', 'Ticket Barcode', 'Purchase Date', 'Ticket Type', 'Ticket Holder', 'Email', 'Cellphone', 'Checked in', 'Checked in date', 'Checked in by', 'Complimentary') keys = [column.lower().replace(' ', '_') for column in columns] with open(args[0], 'r') as f: reader = csv.reader(f) header = tuple(next(reader)) if header != columns: raise CommandError('CSV format has changed. Update wafer') for row in reader: ticket = dict(zip(keys, row)) import_ticket(ticket['ticket_barcode'], ticket['ticket_type'], ticket['email'])
import csv from django.core.management.base import BaseCommand, CommandError from wafer.tickets.views import import_ticket class Command(BaseCommand): args = '<csv file>' help = "Import a guest list CSV from Quicket" def handle(self, *args, **options): if len(args) != 1: raise CommandError('1 CSV File required') + columns = ('Ticket Number', 'Ticket Barcode', 'Purchase Date', + 'Ticket Type', 'Ticket Holder', 'Email', 'Cellphone', + 'Checked in', 'Checked in date', 'Checked in by', + 'Complimentary') + keys = [column.lower().replace(' ', '_') for column in columns] + with open(args[0], 'r') as f: reader = csv.reader(f) - header = next(reader) + header = tuple(next(reader)) ? ++++++ + - if len(header) != 11: ? ---- - ^^ + if header != columns: ? ^^^^^^^ raise CommandError('CSV format has changed. Update wafer') - for ticket in reader: ? ^^^^^^ + for row in reader: ? ^^^ + ticket = dict(zip(keys, row)) + import_ticket(ticket['ticket_barcode'], + ticket['ticket_type'], + ticket['email']) - self.import_ticket(*ticket) - - def import_ticket(self, ticket_number, ticket_barcode, purchase_date, - ticket_type, ticket_holder, email, cellphone, checked_in, - checked_in_date, checked_in_by, complimentary): - import_ticket(ticket_barcode, ticket_type, email)
22
0.758621
13
9
5c92bbf9129b244f38230a83577534e7bd400caa
src/components/CommentForm.css
src/components/CommentForm.css
.root { display: flex; flex-direction: column; } .field { display: flex; flex-direction: column; margin: 10px 0; } .field > label { color: #222; font-weight: bold; margin-bottom: 10px; } .field input[type="text"] { min-height: 45px; padding-left: 10px; padding-right: 10px; } .field textarea { min-height: 70px; } .field input[type="text"], .field textarea { font-family: 'Roboto', 'sans-serif'; border: 2px solid #d7d7d7; background-color: #fff; color: #222; font-size: 13px; overflow: visible; } .field input[type="text"]:focus, .field textarea:focus { box-shadow: 0 0 5px #0173bd; outline: 0; } .root button { font-family: 'Roboto', 'sans-serif'; background-color: #cb8700; color: #fff; border: none; height: 45px; font-size: 16px; margin-bottom: 10px; }
.root { display: flex; flex-direction: column; } .field { display: flex; flex-direction: column; margin: 10px 0; } .field > label { color: #222; font-weight: bold; margin-bottom: 10px; } .field input[type="text"] { min-height: 45px; padding-left: 10px; padding-right: 10px; } .field textarea { min-height: 100px; resize: vertical; } .field input[type="text"], .field textarea { font-family: 'Roboto', 'sans-serif'; border: 2px solid #d7d7d7; background-color: #fff; color: #222; font-size: 13px; overflow: visible; } .field input[type="text"]:focus, .field textarea:focus { box-shadow: 0 0 5px #0173bd; outline: 0; } .root button { font-family: 'Roboto', 'sans-serif'; background-color: #cb8700; color: #fff; border: none; height: 45px; font-size: 16px; margin-bottom: 10px; } @media screen and (min-width: 768px) { .field textarea { height: 140px; } }
Add media query for textarea and disabled horizontal resizing
Add media query for textarea and disabled horizontal resizing
CSS
mit
danielzy95/mechanic-finder,danielzy95/mechanic-finder
css
## Code Before: .root { display: flex; flex-direction: column; } .field { display: flex; flex-direction: column; margin: 10px 0; } .field > label { color: #222; font-weight: bold; margin-bottom: 10px; } .field input[type="text"] { min-height: 45px; padding-left: 10px; padding-right: 10px; } .field textarea { min-height: 70px; } .field input[type="text"], .field textarea { font-family: 'Roboto', 'sans-serif'; border: 2px solid #d7d7d7; background-color: #fff; color: #222; font-size: 13px; overflow: visible; } .field input[type="text"]:focus, .field textarea:focus { box-shadow: 0 0 5px #0173bd; outline: 0; } .root button { font-family: 'Roboto', 'sans-serif'; background-color: #cb8700; color: #fff; border: none; height: 45px; font-size: 16px; margin-bottom: 10px; } ## Instruction: Add media query for textarea and disabled horizontal resizing ## Code After: .root { display: flex; flex-direction: column; } .field { display: flex; flex-direction: column; margin: 10px 0; } .field > label { color: #222; font-weight: bold; margin-bottom: 10px; } .field input[type="text"] { min-height: 45px; padding-left: 10px; padding-right: 10px; } .field textarea { min-height: 100px; resize: vertical; } .field input[type="text"], .field textarea { font-family: 'Roboto', 'sans-serif'; border: 2px solid #d7d7d7; background-color: #fff; color: #222; font-size: 13px; overflow: visible; } .field input[type="text"]:focus, .field textarea:focus { box-shadow: 0 0 5px #0173bd; outline: 0; } .root button { font-family: 'Roboto', 'sans-serif'; background-color: #cb8700; color: #fff; border: none; height: 45px; font-size: 16px; margin-bottom: 10px; } @media screen and (min-width: 768px) { .field textarea { height: 140px; } }
.root { display: flex; flex-direction: column; } .field { display: flex; flex-direction: column; margin: 10px 0; } .field > label { color: #222; font-weight: bold; margin-bottom: 10px; } .field input[type="text"] { min-height: 45px; padding-left: 10px; padding-right: 10px; } .field textarea { - min-height: 70px; ? ^ + min-height: 100px; ? ^^ + resize: vertical; } .field input[type="text"], .field textarea { font-family: 'Roboto', 'sans-serif'; border: 2px solid #d7d7d7; background-color: #fff; color: #222; font-size: 13px; overflow: visible; } .field input[type="text"]:focus, .field textarea:focus { box-shadow: 0 0 5px #0173bd; outline: 0; } .root button { font-family: 'Roboto', 'sans-serif'; background-color: #cb8700; color: #fff; border: none; height: 45px; font-size: 16px; margin-bottom: 10px; } + + @media screen and (min-width: 768px) { + .field textarea { + height: 140px; + } + }
9
0.173077
8
1
ed2d2f788708c059b9292811312b685afe710a98
README.md
README.md
OMERO.webtagging ================ Requirements ============ * OMERO 4.4.0 or later Installation ============ Clone the repository in to your OMERO.web installation: cd components/tools/OmeroWeb/omeroweb/ # or <dist>/lib/python/omeroweb git clone git://github.com/dpwrussell/webtagging.git path/to/bin/omero config set omero.web.apps '["webtagging"]' Now start up OMERO.web as normal in your development environment. Documentation ============= http://www.openmicroscopy.org/site/support/partner/omero.webtagging
OMERO.webtagging ================ Requirements ============ * OMERO 4.4.0 or later Installation ============ Clone the repository in to your OMERO.web installation: cd <dist>/lib/python/omeroweb # for production, or for development: <openmicroscopy checkout>components/tools/OmeroWeb/omeroweb/ git clone git://github.com/dpwrussell/webtagging.git path/to/bin/omero config set omero.web.apps '["webtagging"]' Now start up OMERO.web as normal in your development environment. Documentation ============= http://www.openmicroscopy.org/site/support/partner/omero.webtagging
Clarify instructions for working from git
Clarify instructions for working from git
Markdown
agpl-3.0
MicronOxford/webtagging,MicronOxford/webtagging,MicronOxford/webtagging
markdown
## Code Before: OMERO.webtagging ================ Requirements ============ * OMERO 4.4.0 or later Installation ============ Clone the repository in to your OMERO.web installation: cd components/tools/OmeroWeb/omeroweb/ # or <dist>/lib/python/omeroweb git clone git://github.com/dpwrussell/webtagging.git path/to/bin/omero config set omero.web.apps '["webtagging"]' Now start up OMERO.web as normal in your development environment. Documentation ============= http://www.openmicroscopy.org/site/support/partner/omero.webtagging ## Instruction: Clarify instructions for working from git ## Code After: OMERO.webtagging ================ Requirements ============ * OMERO 4.4.0 or later Installation ============ Clone the repository in to your OMERO.web installation: cd <dist>/lib/python/omeroweb # for production, or for development: <openmicroscopy checkout>components/tools/OmeroWeb/omeroweb/ git clone git://github.com/dpwrussell/webtagging.git path/to/bin/omero config set omero.web.apps '["webtagging"]' Now start up OMERO.web as normal in your development environment. Documentation ============= http://www.openmicroscopy.org/site/support/partner/omero.webtagging
OMERO.webtagging ================ Requirements ============ * OMERO 4.4.0 or later Installation ============ Clone the repository in to your OMERO.web installation: - cd components/tools/OmeroWeb/omeroweb/ # or <dist>/lib/python/omeroweb + cd <dist>/lib/python/omeroweb # for production, or for development: <openmicroscopy checkout>components/tools/OmeroWeb/omeroweb/ git clone git://github.com/dpwrussell/webtagging.git path/to/bin/omero config set omero.web.apps '["webtagging"]' Now start up OMERO.web as normal in your development environment. Documentation ============= http://www.openmicroscopy.org/site/support/partner/omero.webtagging
2
0.086957
1
1
8e46ecd57b0ce686cb2eff8364b2cebafa8edd29
composer.json
composer.json
{ "name": "edwin/microframework", "type": "project", "version": "1.0", "description": "Pequeño framework para proyectos php", "homepage": "https://github.com/tavo1987/microframework", "license": "MIT", "authors": [ { "name": "Edwin Ramírez", "email": "tavo198718@gmail.com", "homepage": "https://www.facebook.com/edwin.ramirez.923", "role": "Developer" } ], "require": { "php": ">=5.2.0", "illuminate/database": "^5.2", "vlucas/phpdotenv": "^2.2", "sendgrid/sendgrid": "^4.0", "filp/whoops": "^2.1", "twig/twig": "~1.0" }, "autoload": { "psr-4": { "App\\": "app/" }, "files": [ "bootstrap/helpers.php" ] } }
{ "name": "edwin/microframework", "type": "project", "version": "1.0", "description": "Pequeño framework para proyectos php", "homepage": "https://github.com/tavo1987/microframework", "license": "MIT", "authors": [ { "name": "Edwin Ramírez", "email": "tavo198718@gmail.com", "homepage": "https://www.facebook.com/edwin.ramirez.923", "role": "Developer" } ], "require": { "php": ">=5.2.0", "illuminate/database": "^5.2", "vlucas/phpdotenv": "^2.2", "sendgrid/sendgrid": "^4.0", "filp/whoops": "^2.1", "twig/twig": "~1.0" }, "autoload": { "psr-4": { "App\\": "app/", "Core\\": "core/" }, "files": [ "bootstrap/helpers.php" ] } }
Add psr-4 for directory core
Add psr-4 for directory core
JSON
mit
tavo1987/mini-framework,tavo1987/mini-framework,tavo1987/mini-framework
json
## Code Before: { "name": "edwin/microframework", "type": "project", "version": "1.0", "description": "Pequeño framework para proyectos php", "homepage": "https://github.com/tavo1987/microframework", "license": "MIT", "authors": [ { "name": "Edwin Ramírez", "email": "tavo198718@gmail.com", "homepage": "https://www.facebook.com/edwin.ramirez.923", "role": "Developer" } ], "require": { "php": ">=5.2.0", "illuminate/database": "^5.2", "vlucas/phpdotenv": "^2.2", "sendgrid/sendgrid": "^4.0", "filp/whoops": "^2.1", "twig/twig": "~1.0" }, "autoload": { "psr-4": { "App\\": "app/" }, "files": [ "bootstrap/helpers.php" ] } } ## Instruction: Add psr-4 for directory core ## Code After: { "name": "edwin/microframework", "type": "project", "version": "1.0", "description": "Pequeño framework para proyectos php", "homepage": "https://github.com/tavo1987/microframework", "license": "MIT", "authors": [ { "name": "Edwin Ramírez", "email": "tavo198718@gmail.com", "homepage": "https://www.facebook.com/edwin.ramirez.923", "role": "Developer" } ], "require": { "php": ">=5.2.0", "illuminate/database": "^5.2", "vlucas/phpdotenv": "^2.2", "sendgrid/sendgrid": "^4.0", "filp/whoops": "^2.1", "twig/twig": "~1.0" }, "autoload": { "psr-4": { "App\\": "app/", "Core\\": "core/" }, "files": [ "bootstrap/helpers.php" ] } }
{ - "name": "edwin/microframework", + "name": "edwin/microframework", ? ++ - "type": "project", + "type": "project", ? ++ - "version": "1.0", + "version": "1.0", ? ++ - "description": "Pequeño framework para proyectos php", + "description": "Pequeño framework para proyectos php", ? ++ - "homepage": "https://github.com/tavo1987/microframework", + "homepage": "https://github.com/tavo1987/microframework", ? ++ - "license": "MIT", + "license": "MIT", ? ++ - "authors": [ + "authors": [ ? ++ - { + { ? ++ - "name": "Edwin Ramírez", + "name": "Edwin Ramírez", ? ++++ - "email": "tavo198718@gmail.com", + "email": "tavo198718@gmail.com", ? ++++ - "homepage": "https://www.facebook.com/edwin.ramirez.923", + "homepage": "https://www.facebook.com/edwin.ramirez.923", ? ++++ - "role": "Developer" + "role": "Developer" ? ++++ - } + } ? ++ - ], + ], ? ++ - "require": { + "require": { ? ++ - "php": ">=5.2.0", + "php": ">=5.2.0", ? ++++ - "illuminate/database": "^5.2", + "illuminate/database": "^5.2", ? ++++ - "vlucas/phpdotenv": "^2.2", + "vlucas/phpdotenv": "^2.2", ? ++++ - "sendgrid/sendgrid": "^4.0", + "sendgrid/sendgrid": "^4.0", ? ++++ - "filp/whoops": "^2.1", + "filp/whoops": "^2.1", ? ++++ - "twig/twig": "~1.0" + "twig/twig": "~1.0" ? ++++ - }, + }, ? ++ - "autoload": { + "autoload": { ? ++ - "psr-4": { + "psr-4": { ? ++++ - "App\\": "app/" + "App\\": "app/", ? ++++++ + + "Core\\": "core/" - }, + }, ? ++++ - "files": [ + "files": [ ? ++++ - "bootstrap/helpers.php" + "bootstrap/helpers.php" ? ++++++ + ] - ] ? ^ + } ? ^ - } - }
62
1.675676
31
31
ace7b20875d231fe6d4fd3454f5e043cbd310225
server.js
server.js
var express = require('express'); require('./server/mongoose'); var api = require('./server/api'); var morgan = require('morgan'); var httpProxy = require('http-proxy'); var app = express(); var proxy = httpProxy.createProxyServer({ changeOrigin: true }); if (process.env.NODE_ENV === 'production') { app.set('trust proxy', true); app.use(morgan(':req[x-real-ip] - - [:date] ":method :url HTTP/:http-version" :status - :response-time ms - :res[content-length] ":referrer"')); } else { app.use(morgan('dev')); } app.use(express.static('.tmp')); app.use(express.static('app')); if (process.env.API_URL) { app.use('/api', function (req, res) { proxy.web(req, res, { target: process.env.API_URL }); }); } else { app.use('/api', api); } app.get('*', function(req, res) { res.sendFile(__dirname + '/app/index.html'); }); app.listen(process.env.PORT);
var express = require('express'); var mongoose = require('./server/mongoose'); var api = require('./server/api'); var morgan = require('morgan'); var httpProxy = require('http-proxy'); var Record = mongoose.model('Record'); var app = express(); var proxy = httpProxy.createProxyServer({ changeOrigin: true }); if (process.env.NODE_ENV === 'production') { app.set('trust proxy', true); app.use(morgan(':req[x-real-ip] - - [:date] ":method :url HTTP/:http-version" :status - :response-time ms - :res[content-length] ":referrer"')); } else { app.use(morgan('dev')); } app.use(express.static('.tmp')); app.use(express.static('app')); if (process.env.API_URL) { app.use('/api', function (req, res) { proxy.web(req, res, { target: process.env.API_URL }); }); } else { app.use('/api', api); } function showPage(req, res) { res.sendFile(__dirname + '/app/index.html'); } // Legacy URL app.get('/services/:serviceId/datasets/:datasetId', function (req, res, next) { if (req.params.datasetId.length !== 24) return next(); Record .findById(req.params.datasetId) .select('hashedId') .exec(function (err, record) { if (err) return next(err); if (!record || !record.hashedId) return res.sendStatus(404); res.redirect(301, '/services/' + req.params.serviceId + '/datasets/' + record.hashedId); }); }); app.get('*', showPage); app.listen(process.env.PORT);
Add legacy route to keep indexation
Add legacy route to keep indexation
JavaScript
agpl-3.0
jdesboeufs/geogw,inspireteam/geogw
javascript
## Code Before: var express = require('express'); require('./server/mongoose'); var api = require('./server/api'); var morgan = require('morgan'); var httpProxy = require('http-proxy'); var app = express(); var proxy = httpProxy.createProxyServer({ changeOrigin: true }); if (process.env.NODE_ENV === 'production') { app.set('trust proxy', true); app.use(morgan(':req[x-real-ip] - - [:date] ":method :url HTTP/:http-version" :status - :response-time ms - :res[content-length] ":referrer"')); } else { app.use(morgan('dev')); } app.use(express.static('.tmp')); app.use(express.static('app')); if (process.env.API_URL) { app.use('/api', function (req, res) { proxy.web(req, res, { target: process.env.API_URL }); }); } else { app.use('/api', api); } app.get('*', function(req, res) { res.sendFile(__dirname + '/app/index.html'); }); app.listen(process.env.PORT); ## Instruction: Add legacy route to keep indexation ## Code After: var express = require('express'); var mongoose = require('./server/mongoose'); var api = require('./server/api'); var morgan = require('morgan'); var httpProxy = require('http-proxy'); var Record = mongoose.model('Record'); var app = express(); var proxy = httpProxy.createProxyServer({ changeOrigin: true }); if (process.env.NODE_ENV === 'production') { app.set('trust proxy', true); app.use(morgan(':req[x-real-ip] - - [:date] ":method :url HTTP/:http-version" :status - :response-time ms - :res[content-length] ":referrer"')); } else { app.use(morgan('dev')); } app.use(express.static('.tmp')); app.use(express.static('app')); if (process.env.API_URL) { app.use('/api', function (req, res) { proxy.web(req, res, { target: process.env.API_URL }); }); } else { app.use('/api', api); } function showPage(req, res) { res.sendFile(__dirname + '/app/index.html'); } // Legacy URL app.get('/services/:serviceId/datasets/:datasetId', function (req, res, next) { if (req.params.datasetId.length !== 24) return next(); Record .findById(req.params.datasetId) .select('hashedId') .exec(function (err, record) { if (err) return next(err); if (!record || !record.hashedId) return res.sendStatus(404); res.redirect(301, '/services/' + req.params.serviceId + '/datasets/' + record.hashedId); }); }); app.get('*', showPage); app.listen(process.env.PORT);
var express = require('express'); - require('./server/mongoose'); + var mongoose = require('./server/mongoose'); ? +++++++++++++++ var api = require('./server/api'); var morgan = require('morgan'); var httpProxy = require('http-proxy'); + + var Record = mongoose.model('Record'); var app = express(); var proxy = httpProxy.createProxyServer({ changeOrigin: true }); if (process.env.NODE_ENV === 'production') { app.set('trust proxy', true); app.use(morgan(':req[x-real-ip] - - [:date] ":method :url HTTP/:http-version" :status - :response-time ms - :res[content-length] ":referrer"')); } else { app.use(morgan('dev')); } app.use(express.static('.tmp')); app.use(express.static('app')); if (process.env.API_URL) { app.use('/api', function (req, res) { proxy.web(req, res, { target: process.env.API_URL }); }); } else { app.use('/api', api); } - app.get('*', function(req, res) { + function showPage(req, res) { res.sendFile(__dirname + '/app/index.html'); + } + + // Legacy URL + app.get('/services/:serviceId/datasets/:datasetId', function (req, res, next) { + if (req.params.datasetId.length !== 24) return next(); + Record + .findById(req.params.datasetId) + .select('hashedId') + .exec(function (err, record) { + if (err) return next(err); + if (!record || !record.hashedId) return res.sendStatus(404); + res.redirect(301, '/services/' + req.params.serviceId + '/datasets/' + record.hashedId); + }); }); + app.get('*', showPage); + app.listen(process.env.PORT);
21
0.65625
19
2
04b779fb4dafbe790acfcef04c6eea1a300a91fa
manifest.json
manifest.json
{ "manifest_version": 2, "name": "西大wifi登陆", "version": "1.4", "description": "方便快捷地管理你的校园网", "icons": { "16": "images/icon16.png", "48": "images/icon48.png", "128": "images/icon128.png" }, "browser_action": { "default_action": { "19": "images/icon19.png", "38": "images/icon38.png" }, "default_title": "西大wifi登陆", "default_popup": "popup.html" }, "options_page": "options.html", "permissions": [ "*://202.202.96.59:9040/login/login1.jsp", "*://202.202.96.59:9040/login/logout1.jsp", "*://*.swu.edu.cn/*", "http://222.198.120.8:8080/*" ] }
{ "manifest_version": 2, "name": "西大wifi登陆", "version": "1.4", "description": "方便快捷地管理你的校园网", "icons": { "16": "images/icon16.png", "48": "images/icon48.png", "128": "images/icon128.png" }, "browser_action": { "default_action": { "19": "images/icon19.png", "38": "images/icon38.png" }, "default_title": "西大wifi登陆", "default_popup": "popup.html" }, "options_page": "options.html", "permissions": [ "http://202.202.96.59:9040/*", "http://202.202.96.59:9040/*", "*://*.swu.edu.cn/*", "http://222.198.120.8:8080/*" ] }
Fix swu-wifi login permission issues
Fix swu-wifi login permission issues
JSON
apache-2.0
swumao/swuwifi,swumao/swuwifi
json
## Code Before: { "manifest_version": 2, "name": "西大wifi登陆", "version": "1.4", "description": "方便快捷地管理你的校园网", "icons": { "16": "images/icon16.png", "48": "images/icon48.png", "128": "images/icon128.png" }, "browser_action": { "default_action": { "19": "images/icon19.png", "38": "images/icon38.png" }, "default_title": "西大wifi登陆", "default_popup": "popup.html" }, "options_page": "options.html", "permissions": [ "*://202.202.96.59:9040/login/login1.jsp", "*://202.202.96.59:9040/login/logout1.jsp", "*://*.swu.edu.cn/*", "http://222.198.120.8:8080/*" ] } ## Instruction: Fix swu-wifi login permission issues ## Code After: { "manifest_version": 2, "name": "西大wifi登陆", "version": "1.4", "description": "方便快捷地管理你的校园网", "icons": { "16": "images/icon16.png", "48": "images/icon48.png", "128": "images/icon128.png" }, "browser_action": { "default_action": { "19": "images/icon19.png", "38": "images/icon38.png" }, "default_title": "西大wifi登陆", "default_popup": "popup.html" }, "options_page": "options.html", "permissions": [ "http://202.202.96.59:9040/*", "http://202.202.96.59:9040/*", "*://*.swu.edu.cn/*", "http://222.198.120.8:8080/*" ] }
{ "manifest_version": 2, "name": "西大wifi登陆", "version": "1.4", "description": "方便快捷地管理你的校园网", "icons": { "16": "images/icon16.png", "48": "images/icon48.png", "128": "images/icon128.png" }, "browser_action": { "default_action": { "19": "images/icon19.png", "38": "images/icon38.png" }, "default_title": "西大wifi登陆", "default_popup": "popup.html" }, "options_page": "options.html", "permissions": [ - "*://202.202.96.59:9040/login/login1.jsp", - "*://202.202.96.59:9040/login/logout1.jsp", + "http://202.202.96.59:9040/*", + "http://202.202.96.59:9040/*", "*://*.swu.edu.cn/*", "http://222.198.120.8:8080/*" ] }
4
0.153846
2
2
8310875c46a7d20bda3a69982ef3c4d73fd3c66b
lib/app/views/responsive_dialog.dart
lib/app/views/responsive_dialog.dart
import 'package:flutter/material.dart'; class ResponsiveDialog extends StatelessWidget { final Widget? title; final Widget child; final List<Widget> actions; final Function()? onCancel; const ResponsiveDialog( {Key? key, required this.child, this.title, this.actions = const [], this.onCancel}) : super(key: key); @override Widget build(BuildContext context) => LayoutBuilder(builder: ((context, constraints) { if (constraints.maxWidth < 540) { // Fullscreen return Dialog( insetPadding: const EdgeInsets.all(0), child: Scaffold( appBar: AppBar( title: title, actions: actions, leading: BackButton( onPressed: () { onCancel?.call(); Navigator.of(context).pop(); }, ), ), body: SingleChildScrollView( padding: const EdgeInsets.all(18.0), child: child, ), )); } else { // Dialog return AlertDialog( insetPadding: EdgeInsets.zero, title: title, scrollable: true, content: SizedBox( width: 380, child: child, ), actions: [ TextButton( child: const Text('Cancel'), onPressed: () { onCancel?.call(); Navigator.of(context).pop(); }, ), ...actions ], ); } })); }
import 'package:flutter/material.dart'; class ResponsiveDialog extends StatefulWidget { final Widget? title; final Widget child; final List<Widget> actions; final Function()? onCancel; const ResponsiveDialog( {Key? key, required this.child, this.title, this.actions = const [], this.onCancel}) : super(key: key); @override State<ResponsiveDialog> createState() => _ResponsiveDialogState(); } class _ResponsiveDialogState extends State<ResponsiveDialog> { final Key _childKey = GlobalKey(); @override Widget build(BuildContext context) => LayoutBuilder(builder: ((context, constraints) { if (constraints.maxWidth < 540) { // Fullscreen return Dialog( insetPadding: const EdgeInsets.all(0), child: Scaffold( appBar: AppBar( title: widget.title, actions: widget.actions, leading: BackButton( onPressed: () { widget.onCancel?.call(); Navigator.of(context).pop(); }, ), ), body: SingleChildScrollView( padding: const EdgeInsets.all(18.0), child: Container(key: _childKey, child: widget.child), ), )); } else { // Dialog return AlertDialog( insetPadding: EdgeInsets.zero, title: widget.title, scrollable: true, content: SizedBox( width: 380, child: Container(key: _childKey, child: widget.child), ), actions: [ TextButton( child: const Text('Cancel'), onPressed: () { widget.onCancel?.call(); Navigator.of(context).pop(); }, ), ...widget.actions ], ); } })); }
Improve retaining state for children of ResponsiveDialog.
Improve retaining state for children of ResponsiveDialog.
Dart
apache-2.0
Yubico/yubioath-desktop,Yubico/yubioath-desktop,Yubico/yubioath-desktop,Yubico/yubioath-desktop,Yubico/yubioath-desktop
dart
## Code Before: import 'package:flutter/material.dart'; class ResponsiveDialog extends StatelessWidget { final Widget? title; final Widget child; final List<Widget> actions; final Function()? onCancel; const ResponsiveDialog( {Key? key, required this.child, this.title, this.actions = const [], this.onCancel}) : super(key: key); @override Widget build(BuildContext context) => LayoutBuilder(builder: ((context, constraints) { if (constraints.maxWidth < 540) { // Fullscreen return Dialog( insetPadding: const EdgeInsets.all(0), child: Scaffold( appBar: AppBar( title: title, actions: actions, leading: BackButton( onPressed: () { onCancel?.call(); Navigator.of(context).pop(); }, ), ), body: SingleChildScrollView( padding: const EdgeInsets.all(18.0), child: child, ), )); } else { // Dialog return AlertDialog( insetPadding: EdgeInsets.zero, title: title, scrollable: true, content: SizedBox( width: 380, child: child, ), actions: [ TextButton( child: const Text('Cancel'), onPressed: () { onCancel?.call(); Navigator.of(context).pop(); }, ), ...actions ], ); } })); } ## Instruction: Improve retaining state for children of ResponsiveDialog. ## Code After: import 'package:flutter/material.dart'; class ResponsiveDialog extends StatefulWidget { final Widget? title; final Widget child; final List<Widget> actions; final Function()? onCancel; const ResponsiveDialog( {Key? key, required this.child, this.title, this.actions = const [], this.onCancel}) : super(key: key); @override State<ResponsiveDialog> createState() => _ResponsiveDialogState(); } class _ResponsiveDialogState extends State<ResponsiveDialog> { final Key _childKey = GlobalKey(); @override Widget build(BuildContext context) => LayoutBuilder(builder: ((context, constraints) { if (constraints.maxWidth < 540) { // Fullscreen return Dialog( insetPadding: const EdgeInsets.all(0), child: Scaffold( appBar: AppBar( title: widget.title, actions: widget.actions, leading: BackButton( onPressed: () { widget.onCancel?.call(); Navigator.of(context).pop(); }, ), ), body: SingleChildScrollView( padding: const EdgeInsets.all(18.0), child: Container(key: _childKey, child: widget.child), ), )); } else { // Dialog return AlertDialog( insetPadding: EdgeInsets.zero, title: widget.title, scrollable: true, content: SizedBox( width: 380, child: Container(key: _childKey, child: widget.child), ), actions: [ TextButton( child: const Text('Cancel'), onPressed: () { widget.onCancel?.call(); Navigator.of(context).pop(); }, ), ...widget.actions ], ); } })); }
import 'package:flutter/material.dart'; - class ResponsiveDialog extends StatelessWidget { ? --- + class ResponsiveDialog extends StatefulWidget { ? ++ final Widget? title; final Widget child; final List<Widget> actions; final Function()? onCancel; const ResponsiveDialog( {Key? key, required this.child, this.title, this.actions = const [], this.onCancel}) : super(key: key); @override + State<ResponsiveDialog> createState() => _ResponsiveDialogState(); + } + + class _ResponsiveDialogState extends State<ResponsiveDialog> { + final Key _childKey = GlobalKey(); + + @override Widget build(BuildContext context) => LayoutBuilder(builder: ((context, constraints) { if (constraints.maxWidth < 540) { // Fullscreen return Dialog( insetPadding: const EdgeInsets.all(0), child: Scaffold( appBar: AppBar( - title: title, + title: widget.title, ? +++++++ - actions: actions, + actions: widget.actions, ? +++++++ leading: BackButton( onPressed: () { - onCancel?.call(); + widget.onCancel?.call(); ? +++++++ Navigator.of(context).pop(); }, ), ), body: SingleChildScrollView( padding: const EdgeInsets.all(18.0), - child: child, + child: Container(key: _childKey, child: widget.child), ), )); } else { // Dialog return AlertDialog( insetPadding: EdgeInsets.zero, - title: title, + title: widget.title, ? +++++++ scrollable: true, content: SizedBox( width: 380, - child: child, + child: Container(key: _childKey, child: widget.child), ), actions: [ TextButton( child: const Text('Cancel'), onPressed: () { - onCancel?.call(); + widget.onCancel?.call(); ? +++++++ Navigator.of(context).pop(); }, ), - ...actions + ...widget.actions ? +++++++ ], ); } })); }
25
0.396825
16
9
e9df4858631d9efdcb6a5b960c25f64cae875661
blog/models.py
blog/models.py
from django.db import models from organizer.models import Startup, Tag # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Post(models.Model): title = models.CharField(max_length=63) slug = models.SlugField() text = models.TextField() pub_date = models.DateField() tags = models.ManyToManyField(Tag) startups = models.ManyToManyField(Startup)
from django.db import models from organizer.models import Startup, Tag # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Post(models.Model): title = models.CharField(max_length=63) slug = models.SlugField( max_length=63, help_text='A label for URL config', unique_for_month='pub_date') text = models.TextField() pub_date = models.DateField( 'date published', auto_now_add=True) tags = models.ManyToManyField( Tag, related_name='blog_posts') startups = models.ManyToManyField( Startup, related_name='blog_posts')
Add options to Post model fields.
Ch03: Add options to Post model fields. [skip ci]
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
python
## Code Before: from django.db import models from organizer.models import Startup, Tag # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Post(models.Model): title = models.CharField(max_length=63) slug = models.SlugField() text = models.TextField() pub_date = models.DateField() tags = models.ManyToManyField(Tag) startups = models.ManyToManyField(Startup) ## Instruction: Ch03: Add options to Post model fields. [skip ci] ## Code After: from django.db import models from organizer.models import Startup, Tag # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Post(models.Model): title = models.CharField(max_length=63) slug = models.SlugField( max_length=63, help_text='A label for URL config', unique_for_month='pub_date') text = models.TextField() pub_date = models.DateField( 'date published', auto_now_add=True) tags = models.ManyToManyField( Tag, related_name='blog_posts') startups = models.ManyToManyField( Startup, related_name='blog_posts')
from django.db import models from organizer.models import Startup, Tag # Model Field Reference # https://docs.djangoproject.com/en/1.8/ref/models/fields/ class Post(models.Model): title = models.CharField(max_length=63) - slug = models.SlugField() ? - + slug = models.SlugField( + max_length=63, + help_text='A label for URL config', + unique_for_month='pub_date') text = models.TextField() - pub_date = models.DateField() ? - + pub_date = models.DateField( + 'date published', + auto_now_add=True) - tags = models.ManyToManyField(Tag) ? ---- + tags = models.ManyToManyField( + Tag, related_name='blog_posts') - startups = models.ManyToManyField(Startup) ? -------- + startups = models.ManyToManyField( + Startup, related_name='blog_posts')
15
0.9375
11
4
9203b4fb7472991b698995fabd8496d8f6c2f980
src/com/rabenauge/demo/DirectBuffer.java
src/com/rabenauge/demo/DirectBuffer.java
package com.rabenauge.demo; import java.nio.*; /* * A class to create directly allocated buffers of native byte order. */ public class DirectBuffer { public static ByteBuffer nativeByteBuffer(int capacity) { ByteBuffer buffer=ByteBuffer.allocateDirect(capacity); buffer.order(ByteOrder.nativeOrder()); return buffer; } public static ByteBuffer nativeByteBuffer(byte[] array) { ByteBuffer buffer=nativeByteBuffer(array.length); buffer.put(array).position(0); return buffer; } public static ShortBuffer nativeShortBuffer(int capacity) { return nativeByteBuffer(capacity*Short.SIZE>>3).asShortBuffer(); } public static ShortBuffer nativeShortBuffer(short[] array) { ShortBuffer buffer=nativeShortBuffer(array.length); buffer.put(array).position(0); return buffer; } public static IntBuffer nativeIntBuffer(int capacity) { return nativeByteBuffer(capacity*Integer.SIZE>>3).asIntBuffer(); } public static IntBuffer nativeIntBuffer(int[] array) { IntBuffer buffer=nativeIntBuffer(array.length); buffer.put(array).position(0); return buffer; } }
package com.rabenauge.demo; import java.nio.*; /* * A class to create directly allocated buffers of native byte order. */ public class DirectBuffer { public static ByteBuffer nativeByteBuffer(int capacity) { ByteBuffer buffer=ByteBuffer.allocateDirect(capacity); buffer.order(ByteOrder.nativeOrder()); return buffer; } public static ByteBuffer nativeByteBuffer(byte[] array) { ByteBuffer buffer=nativeByteBuffer(array.length); buffer.put(array).position(0); return buffer; } public static ShortBuffer nativeShortBuffer(int capacity) { return nativeByteBuffer(capacity*Short.SIZE>>3).asShortBuffer(); } public static ShortBuffer nativeShortBuffer(short[] array) { ShortBuffer buffer=nativeShortBuffer(array.length); buffer.put(array).position(0); return buffer; } public static IntBuffer nativeIntBuffer(int capacity) { return nativeByteBuffer(capacity*Integer.SIZE>>3).asIntBuffer(); } public static IntBuffer nativeIntBuffer(int[] array) { IntBuffer buffer=nativeIntBuffer(array.length); buffer.put(array).position(0); return buffer; } public static FloatBuffer nativeFloatBuffer(int capacity) { return nativeByteBuffer(capacity*Float.SIZE>>3).asFloatBuffer(); } public static FloatBuffer nativeFloatBuffer(float[] array) { FloatBuffer buffer=nativeFloatBuffer(array.length); buffer.put(array).position(0); return buffer; } }
Add float allocators for completeness
Add float allocators for completeness
Java
apache-2.0
sschuberth/parandroid
java
## Code Before: package com.rabenauge.demo; import java.nio.*; /* * A class to create directly allocated buffers of native byte order. */ public class DirectBuffer { public static ByteBuffer nativeByteBuffer(int capacity) { ByteBuffer buffer=ByteBuffer.allocateDirect(capacity); buffer.order(ByteOrder.nativeOrder()); return buffer; } public static ByteBuffer nativeByteBuffer(byte[] array) { ByteBuffer buffer=nativeByteBuffer(array.length); buffer.put(array).position(0); return buffer; } public static ShortBuffer nativeShortBuffer(int capacity) { return nativeByteBuffer(capacity*Short.SIZE>>3).asShortBuffer(); } public static ShortBuffer nativeShortBuffer(short[] array) { ShortBuffer buffer=nativeShortBuffer(array.length); buffer.put(array).position(0); return buffer; } public static IntBuffer nativeIntBuffer(int capacity) { return nativeByteBuffer(capacity*Integer.SIZE>>3).asIntBuffer(); } public static IntBuffer nativeIntBuffer(int[] array) { IntBuffer buffer=nativeIntBuffer(array.length); buffer.put(array).position(0); return buffer; } } ## Instruction: Add float allocators for completeness ## Code After: package com.rabenauge.demo; import java.nio.*; /* * A class to create directly allocated buffers of native byte order. */ public class DirectBuffer { public static ByteBuffer nativeByteBuffer(int capacity) { ByteBuffer buffer=ByteBuffer.allocateDirect(capacity); buffer.order(ByteOrder.nativeOrder()); return buffer; } public static ByteBuffer nativeByteBuffer(byte[] array) { ByteBuffer buffer=nativeByteBuffer(array.length); buffer.put(array).position(0); return buffer; } public static ShortBuffer nativeShortBuffer(int capacity) { return nativeByteBuffer(capacity*Short.SIZE>>3).asShortBuffer(); } public static ShortBuffer nativeShortBuffer(short[] array) { ShortBuffer buffer=nativeShortBuffer(array.length); buffer.put(array).position(0); return buffer; } public static IntBuffer nativeIntBuffer(int capacity) { return nativeByteBuffer(capacity*Integer.SIZE>>3).asIntBuffer(); } public static IntBuffer nativeIntBuffer(int[] array) { IntBuffer buffer=nativeIntBuffer(array.length); buffer.put(array).position(0); return buffer; } public static FloatBuffer nativeFloatBuffer(int capacity) { return nativeByteBuffer(capacity*Float.SIZE>>3).asFloatBuffer(); } public static FloatBuffer nativeFloatBuffer(float[] array) { FloatBuffer buffer=nativeFloatBuffer(array.length); buffer.put(array).position(0); return buffer; } }
package com.rabenauge.demo; import java.nio.*; /* * A class to create directly allocated buffers of native byte order. */ public class DirectBuffer { public static ByteBuffer nativeByteBuffer(int capacity) { ByteBuffer buffer=ByteBuffer.allocateDirect(capacity); buffer.order(ByteOrder.nativeOrder()); return buffer; } public static ByteBuffer nativeByteBuffer(byte[] array) { ByteBuffer buffer=nativeByteBuffer(array.length); buffer.put(array).position(0); return buffer; } public static ShortBuffer nativeShortBuffer(int capacity) { return nativeByteBuffer(capacity*Short.SIZE>>3).asShortBuffer(); } public static ShortBuffer nativeShortBuffer(short[] array) { ShortBuffer buffer=nativeShortBuffer(array.length); buffer.put(array).position(0); return buffer; } public static IntBuffer nativeIntBuffer(int capacity) { return nativeByteBuffer(capacity*Integer.SIZE>>3).asIntBuffer(); } public static IntBuffer nativeIntBuffer(int[] array) { IntBuffer buffer=nativeIntBuffer(array.length); buffer.put(array).position(0); return buffer; } + + public static FloatBuffer nativeFloatBuffer(int capacity) { + return nativeByteBuffer(capacity*Float.SIZE>>3).asFloatBuffer(); + } + + public static FloatBuffer nativeFloatBuffer(float[] array) { + FloatBuffer buffer=nativeFloatBuffer(array.length); + buffer.put(array).position(0); + return buffer; + } }
10
0.25
10
0
8d8b625a3a203344b1e7c35ee43d1353c550bb83
packages/sy/symbols.yaml
packages/sy/symbols.yaml
homepage: '' changelog-type: markdown hash: 3dd6da172eae327943510aa4f3b70505ec320ae596a5746bef32e36cc97ff464 test-bench-deps: {} maintainer: kiss.csongor.kiss@gmail.com synopsis: Symbol manipulation changelog: ! '# Revision history for symbols ## 0.2.0.0 * added ToList, ToUpper, ToLower, ReadNat type families ## 0.1.0.0 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.10 && <=5.0' all-versions: - '0.1.0.0' - '0.2.0.0' - '0.2.0.1' author: Csongor Kiss latest: '0.2.0.1' description-type: markdown description: ! '# symbols Manipulate type-level strings. Available on [Hackage](https://hackage.haskell.org/package/symbols) The implementation is described in [this blog post](https://kcsongor.github.io/symbol-parsing-haskell/).' license-name: BSD3
homepage: '' changelog-type: markdown hash: 3dd6da172eae327943510aa4f3b70505ec320ae596a5746bef32e36cc97ff464 test-bench-deps: {} maintainer: kiss.csongor.kiss@gmail.com synopsis: Symbol manipulation changelog: ! '# Revision history for symbols ## 0.2.0.0 * added ToList, ToUpper, ToLower, ReadNat type families ## 0.1.0.0 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.10 && <=5.0' all-versions: - '0.1.0.0' - '0.2.0.1' author: Csongor Kiss latest: '0.2.0.1' description-type: markdown description: ! '# symbols Manipulate type-level strings. Available on [Hackage](https://hackage.haskell.org/package/symbols) The implementation is described in [this blog post](https://kcsongor.github.io/symbol-parsing-haskell/).' license-name: BSD3
Update from Hackage at 2018-11-29T21:01:58Z
Update from Hackage at 2018-11-29T21:01:58Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: markdown hash: 3dd6da172eae327943510aa4f3b70505ec320ae596a5746bef32e36cc97ff464 test-bench-deps: {} maintainer: kiss.csongor.kiss@gmail.com synopsis: Symbol manipulation changelog: ! '# Revision history for symbols ## 0.2.0.0 * added ToList, ToUpper, ToLower, ReadNat type families ## 0.1.0.0 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.10 && <=5.0' all-versions: - '0.1.0.0' - '0.2.0.0' - '0.2.0.1' author: Csongor Kiss latest: '0.2.0.1' description-type: markdown description: ! '# symbols Manipulate type-level strings. Available on [Hackage](https://hackage.haskell.org/package/symbols) The implementation is described in [this blog post](https://kcsongor.github.io/symbol-parsing-haskell/).' license-name: BSD3 ## Instruction: Update from Hackage at 2018-11-29T21:01:58Z ## Code After: homepage: '' changelog-type: markdown hash: 3dd6da172eae327943510aa4f3b70505ec320ae596a5746bef32e36cc97ff464 test-bench-deps: {} maintainer: kiss.csongor.kiss@gmail.com synopsis: Symbol manipulation changelog: ! '# Revision history for symbols ## 0.2.0.0 * added ToList, ToUpper, ToLower, ReadNat type families ## 0.1.0.0 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.10 && <=5.0' all-versions: - '0.1.0.0' - '0.2.0.1' author: Csongor Kiss latest: '0.2.0.1' description-type: markdown description: ! '# symbols Manipulate type-level strings. Available on [Hackage](https://hackage.haskell.org/package/symbols) The implementation is described in [this blog post](https://kcsongor.github.io/symbol-parsing-haskell/).' license-name: BSD3
homepage: '' changelog-type: markdown hash: 3dd6da172eae327943510aa4f3b70505ec320ae596a5746bef32e36cc97ff464 test-bench-deps: {} maintainer: kiss.csongor.kiss@gmail.com synopsis: Symbol manipulation changelog: ! '# Revision history for symbols ## 0.2.0.0 * added ToList, ToUpper, ToLower, ReadNat type families ## 0.1.0.0 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.10 && <=5.0' all-versions: - '0.1.0.0' - - '0.2.0.0' - '0.2.0.1' author: Csongor Kiss latest: '0.2.0.1' description-type: markdown description: ! '# symbols Manipulate type-level strings. Available on [Hackage](https://hackage.haskell.org/package/symbols) The implementation is described in [this blog post](https://kcsongor.github.io/symbol-parsing-haskell/).' license-name: BSD3
1
0.02439
0
1
c630bb3ca4bb17368b35e9b097ffb2fdcd3cd4c5
.kitchen.yml
.kitchen.yml
--- driver: name: docker provisioner: name: chef_zero data_bags_path: 'test/integration/data_bags' platforms: - name: ubuntu-14.04 driver_config: privileged: true suites: - name: base run_list: [ 'recipe[rubygems-people]' ] - name: balancer run_list: [ 'recipe[rubygems-balancer]' ] attributes: dev_mode: true
--- driver: name: docker provisioner: name: chef_zero data_bags_path: 'test/integration/data_bags' platforms: - name: ubuntu-14.04 driver_config: privileged: true suites: - name: base run_list: [ 'recipe[rubygems-people]' ] - name: balancer run_list: [ 'recipe[rubygems-balancer]' ] attributes: dev_mode: true - name: database run_list: [] - name: application run_list: []
Add other roles to allow us to start working on application + database cookbooks
Add other roles to allow us to start working on application + database cookbooks
YAML
mit
indirect/rubygems-infrastructure,indirect/rubygems-infrastructure,mbrukman/rubygems-infrastructure,indirect/rubygems-infrastructure,rubygems/rubygems-infrastructure,rubygems/rubygems-infrastructure,mbrukman/rubygems-infrastructure,rubygems/rubygems-infrastructure,rubygems/rubygems-infrastructure,rubygems/rubygems-infrastructure,mbrukman/rubygems-infrastructure,indirect/rubygems-infrastructure,mbrukman/rubygems-infrastructure
yaml
## Code Before: --- driver: name: docker provisioner: name: chef_zero data_bags_path: 'test/integration/data_bags' platforms: - name: ubuntu-14.04 driver_config: privileged: true suites: - name: base run_list: [ 'recipe[rubygems-people]' ] - name: balancer run_list: [ 'recipe[rubygems-balancer]' ] attributes: dev_mode: true ## Instruction: Add other roles to allow us to start working on application + database cookbooks ## Code After: --- driver: name: docker provisioner: name: chef_zero data_bags_path: 'test/integration/data_bags' platforms: - name: ubuntu-14.04 driver_config: privileged: true suites: - name: base run_list: [ 'recipe[rubygems-people]' ] - name: balancer run_list: [ 'recipe[rubygems-balancer]' ] attributes: dev_mode: true - name: database run_list: [] - name: application run_list: []
--- driver: name: docker provisioner: name: chef_zero data_bags_path: 'test/integration/data_bags' platforms: - name: ubuntu-14.04 driver_config: privileged: true suites: - name: base run_list: [ 'recipe[rubygems-people]' ] - name: balancer run_list: [ 'recipe[rubygems-balancer]' ] attributes: dev_mode: true + - name: database + run_list: [] + - name: application + run_list: []
4
0.166667
4
0
64b4216d670c40669993256923775ee5f0d12120
.travis.yml
.travis.yml
language: python python: - "2.6" - "2.7" - "3.3" services: - elasticsearch install: "pip install -r development.txt --use-mirrors" script: - make after_success: - coveralls
language: python python: - "2.6" - "2.7" services: - elasticsearch install: "pip install -r development.txt --use-mirrors" script: - make after_success: - coveralls
Remove tests for python 3 support, moving to branch
Remove tests for python 3 support, moving to branch
YAML
mit
Yipit/pyeqs
yaml
## Code Before: language: python python: - "2.6" - "2.7" - "3.3" services: - elasticsearch install: "pip install -r development.txt --use-mirrors" script: - make after_success: - coveralls ## Instruction: Remove tests for python 3 support, moving to branch ## Code After: language: python python: - "2.6" - "2.7" services: - elasticsearch install: "pip install -r development.txt --use-mirrors" script: - make after_success: - coveralls
language: python python: - "2.6" - "2.7" - - "3.3" services: - elasticsearch install: "pip install -r development.txt --use-mirrors" script: - make after_success: - coveralls
1
0.083333
0
1
65ca99d354e1ea2ff79ea7f663f061f394727812
README.md
README.md
[PostCSS] plugin to add vertical and horizontal spacing shorthand. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/davidhemphill/postcss-verthorz.svg [ci]: https://travis-ci.org/davidhemphill/postcss-verthorz ## Examples ### Shorthand `vert` and `horz` declarations ```css .foo { padding-vert: 2rem; margin-horz: auto; } ``` ```css .foo { padding-top: 2rem; padding-bottom: 2rem; margin-left: auto; margin-right: auto; } ``` ### Even shorter shorthand declarations ```css .bar { ph: 30px; mv: 100px; } ``` ```css .bar { padding-left: 30px; padding-right: 30px; margin-top: 100px; margin-bottom: 100px; } ``` ## Usage ```js postcss([ require('postcss-verthorz') ]) ``` See [PostCSS] docs for examples for your environment.
[PostCSS] plugin to add vertical and horizontal spacing shorthand. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/davidhemphill/postcss-verthorz.svg [ci]: https://travis-ci.org/davidhemphill/postcss-verthorz ## Examples ### Shorthand `vert` and `horz` declarations ```css .foo { padding-vert: 2rem; margin-horz: auto; } ``` ```css .foo { padding-top: 2rem; padding-bottom: 2rem; margin-left: auto; margin-right: auto; } ``` ### Even shorter shorthand declarations ```css .bar { ph: 30px; mv: 100px; } ``` ```css .bar { padding-left: 30px; padding-right: 30px; margin-top: 100px; margin-bottom: 100px; } ``` ### It even supports multiple values... ```css .baz { padding-vert: 10px 15px; margin-horz: 15px 21px; } ``` ```css .baz { padding-top: 10px; padding-bottom: 15px; margin-right: 15px; margin-left: 21px; } ``` ## Usage ```js postcss([ require('postcss-verthorz') ]) ``` See [PostCSS] docs for examples for your environment.
Update documentation for new feature
Update documentation for new feature
Markdown
mit
davidhemphill/postcss-verthorz
markdown
## Code Before: [PostCSS] plugin to add vertical and horizontal spacing shorthand. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/davidhemphill/postcss-verthorz.svg [ci]: https://travis-ci.org/davidhemphill/postcss-verthorz ## Examples ### Shorthand `vert` and `horz` declarations ```css .foo { padding-vert: 2rem; margin-horz: auto; } ``` ```css .foo { padding-top: 2rem; padding-bottom: 2rem; margin-left: auto; margin-right: auto; } ``` ### Even shorter shorthand declarations ```css .bar { ph: 30px; mv: 100px; } ``` ```css .bar { padding-left: 30px; padding-right: 30px; margin-top: 100px; margin-bottom: 100px; } ``` ## Usage ```js postcss([ require('postcss-verthorz') ]) ``` See [PostCSS] docs for examples for your environment. ## Instruction: Update documentation for new feature ## Code After: [PostCSS] plugin to add vertical and horizontal spacing shorthand. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/davidhemphill/postcss-verthorz.svg [ci]: https://travis-ci.org/davidhemphill/postcss-verthorz ## Examples ### Shorthand `vert` and `horz` declarations ```css .foo { padding-vert: 2rem; margin-horz: auto; } ``` ```css .foo { padding-top: 2rem; padding-bottom: 2rem; margin-left: auto; margin-right: auto; } ``` ### Even shorter shorthand declarations ```css .bar { ph: 30px; mv: 100px; } ``` ```css .bar { padding-left: 30px; padding-right: 30px; margin-top: 100px; margin-bottom: 100px; } ``` ### It even supports multiple values... ```css .baz { padding-vert: 10px 15px; margin-horz: 15px 21px; } ``` ```css .baz { padding-top: 10px; padding-bottom: 15px; margin-right: 15px; margin-left: 21px; } ``` ## Usage ```js postcss([ require('postcss-verthorz') ]) ``` See [PostCSS] docs for examples for your environment.
[PostCSS] plugin to add vertical and horizontal spacing shorthand. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/davidhemphill/postcss-verthorz.svg [ci]: https://travis-ci.org/davidhemphill/postcss-verthorz ## Examples ### Shorthand `vert` and `horz` declarations ```css .foo { padding-vert: 2rem; margin-horz: auto; } ``` ```css .foo { padding-top: 2rem; padding-bottom: 2rem; margin-left: auto; margin-right: auto; } ``` ### Even shorter shorthand declarations ```css .bar { ph: 30px; mv: 100px; } ``` ```css .bar { padding-left: 30px; padding-right: 30px; margin-top: 100px; margin-bottom: 100px; } ``` + ### It even supports multiple values... + + ```css + .baz { + padding-vert: 10px 15px; + margin-horz: 15px 21px; + } + ``` + + ```css + .baz { + padding-top: 10px; + padding-bottom: 15px; + margin-right: 15px; + margin-left: 21px; + } + ``` + ## Usage ```js postcss([ require('postcss-verthorz') ]) ``` See [PostCSS] docs for examples for your environment.
18
0.346154
18
0
85b75edc087d43879f968eca3ea628f54755c82f
packages/ac/acme-functors.yaml
packages/ac/acme-functors.yaml
homepage: https://github.com/chris-martin/acme-functors changelog-type: '' hash: 2327786a5b48e20adaf7a7b32f8e628bd1c4155f96cadc91a356082a8ebac17f test-bench-deps: {} maintainer: ch.martin@gmail.com synopsis: The best applicative functors. changelog: '' basic-deps: base: ! '>=1 && <5328762' all-versions: - 0.1.0.0 author: Chris Martin latest: 0.1.0.0 description-type: haddock description: Types are great. Lifting them into some sort of applicative functor makes them even better. This package is an homage to our favorite applicatives, and to the semigroups with which they are instrinsically connected. license-name: BSD-3-Clause
homepage: https://github.com/chris-martin/acme-functors changelog-type: '' hash: 6debbc0294fe9d61a492cb335e1dacde420bbce984a32ee3b43f27c74e48640e test-bench-deps: {} maintainer: ch.martin@gmail.com synopsis: The best applicative functors. changelog: '' basic-deps: base: '>=4 && <5' all-versions: - 0.1.0.0 - 0.1.0.1 author: Chris Martin latest: 0.1.0.1 description-type: haddock description: Types are great. Lifting them into some sort of applicative functor makes them even better. This package is an homage to our favorite applicatives, and to the semigroups with which they are instrinsically connected. license-name: BSD-3-Clause
Update from Hackage at 2022-01-04T20:44:54Z
Update from Hackage at 2022-01-04T20:44:54Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/chris-martin/acme-functors changelog-type: '' hash: 2327786a5b48e20adaf7a7b32f8e628bd1c4155f96cadc91a356082a8ebac17f test-bench-deps: {} maintainer: ch.martin@gmail.com synopsis: The best applicative functors. changelog: '' basic-deps: base: ! '>=1 && <5328762' all-versions: - 0.1.0.0 author: Chris Martin latest: 0.1.0.0 description-type: haddock description: Types are great. Lifting them into some sort of applicative functor makes them even better. This package is an homage to our favorite applicatives, and to the semigroups with which they are instrinsically connected. license-name: BSD-3-Clause ## Instruction: Update from Hackage at 2022-01-04T20:44:54Z ## Code After: homepage: https://github.com/chris-martin/acme-functors changelog-type: '' hash: 6debbc0294fe9d61a492cb335e1dacde420bbce984a32ee3b43f27c74e48640e test-bench-deps: {} maintainer: ch.martin@gmail.com synopsis: The best applicative functors. changelog: '' basic-deps: base: '>=4 && <5' all-versions: - 0.1.0.0 - 0.1.0.1 author: Chris Martin latest: 0.1.0.1 description-type: haddock description: Types are great. Lifting them into some sort of applicative functor makes them even better. This package is an homage to our favorite applicatives, and to the semigroups with which they are instrinsically connected. license-name: BSD-3-Clause
homepage: https://github.com/chris-martin/acme-functors changelog-type: '' - hash: 2327786a5b48e20adaf7a7b32f8e628bd1c4155f96cadc91a356082a8ebac17f + hash: 6debbc0294fe9d61a492cb335e1dacde420bbce984a32ee3b43f27c74e48640e test-bench-deps: {} maintainer: ch.martin@gmail.com synopsis: The best applicative functors. changelog: '' basic-deps: - base: ! '>=1 && <5328762' ? -- ^ ------ + base: '>=4 && <5' ? ^ all-versions: - 0.1.0.0 + - 0.1.0.1 author: Chris Martin - latest: 0.1.0.0 ? ^ + latest: 0.1.0.1 ? ^ description-type: haddock description: Types are great. Lifting them into some sort of applicative functor makes them even better. This package is an homage to our favorite applicatives, and to the semigroups with which they are instrinsically connected. license-name: BSD-3-Clause
7
0.388889
4
3
aa579a1c5b54f8904a2040e58f3ad23d9792c708
app/helpers/yelp_helper.rb
app/helpers/yelp_helper.rb
module YelpHelper def YelpHelper.ping_yelp(is_fancy, category_filter, radius_filter, is_vegetarian, location) p "Inside ping yelp" params = {sort:'2'} term = "restaurants" if is_fancy == true term = "expensive restaurants" elsif is_fancy == false term = "cheap restaurants" end params[:term] = term if radius_filter != nil params[:radius_filter] = radius_filter end if category_filter != nil params[:category_filter] = category_filter end if is_vegetarian == true if params[:category_filter] params[:category_filter] += ",vegetarian" else params[:category_filter] = "vegetarian" end end # params = { term: "restaurants", # category_filter: "thai", # radius_filter: "1000", # sort: '2' # } p "PEEING OUT PARAMS" p params p location @response = Yelp.client.search(location, params) @chosen_restaurant = @response.businesses.sample #TODO FIX PHONE NUMBER ISSUE @chosen_restaurant_details = { "name" => @chosen_restaurant.name, # "phone" => @chosen_restaurant.phone, "address" => @chosen_restaurant.location.address[0] } p "chosen restaurent details: #{@chosen_restaurant_details}" @chosen_restaurant_details end end
module YelpHelper def YelpHelper.ping_yelp(is_fancy, category_filter, radius_filter, is_vegetarian, location) p "Inside ping yelp" params = {sort:'2'} term = "restaurants" if is_fancy == true term = "expensive restaurants" elsif is_fancy == false term = "cheap restaurants" end params[:term] = term if radius_filter != nil params[:radius_filter] = radius_filter end if category_filter != nil params[:category_filter] = category_filter end if is_vegetarian == true if params[:category_filter] params[:category_filter] += ",vegetarian" else params[:category_filter] = "vegetarian" end end # params = { term: "restaurants", # category_filter: "thai", # radius_filter: "1000", # sort: '2' # } p params p location @response = Yelp.client.search(location, params) @chosen_restaurant = @response.businesses.sample @response.businesses.each do |business| p business.phone end @chosen_restaurant_details = { "name" => @chosen_restaurant.name, "phone" => @chosen_restaurant.phone, "address" => @chosen_restaurant.location.address[0] } p "chosen restaurent details: #{@chosen_restaurant_details}" @chosen_restaurant_details end end
Add debugging code for phone number
Add debugging code for phone number
Ruby
mit
annewchen/Restaurant_Roulette,annewchen/Restaurant_Roulette,annewchen/Restaurant_Roulette
ruby
## Code Before: module YelpHelper def YelpHelper.ping_yelp(is_fancy, category_filter, radius_filter, is_vegetarian, location) p "Inside ping yelp" params = {sort:'2'} term = "restaurants" if is_fancy == true term = "expensive restaurants" elsif is_fancy == false term = "cheap restaurants" end params[:term] = term if radius_filter != nil params[:radius_filter] = radius_filter end if category_filter != nil params[:category_filter] = category_filter end if is_vegetarian == true if params[:category_filter] params[:category_filter] += ",vegetarian" else params[:category_filter] = "vegetarian" end end # params = { term: "restaurants", # category_filter: "thai", # radius_filter: "1000", # sort: '2' # } p "PEEING OUT PARAMS" p params p location @response = Yelp.client.search(location, params) @chosen_restaurant = @response.businesses.sample #TODO FIX PHONE NUMBER ISSUE @chosen_restaurant_details = { "name" => @chosen_restaurant.name, # "phone" => @chosen_restaurant.phone, "address" => @chosen_restaurant.location.address[0] } p "chosen restaurent details: #{@chosen_restaurant_details}" @chosen_restaurant_details end end ## Instruction: Add debugging code for phone number ## Code After: module YelpHelper def YelpHelper.ping_yelp(is_fancy, category_filter, radius_filter, is_vegetarian, location) p "Inside ping yelp" params = {sort:'2'} term = "restaurants" if is_fancy == true term = "expensive restaurants" elsif is_fancy == false term = "cheap restaurants" end params[:term] = term if radius_filter != nil params[:radius_filter] = radius_filter end if category_filter != nil params[:category_filter] = category_filter end if is_vegetarian == true if params[:category_filter] params[:category_filter] += ",vegetarian" else params[:category_filter] = "vegetarian" end end # params = { term: "restaurants", # category_filter: "thai", # radius_filter: "1000", # sort: '2' # } p params p location @response = Yelp.client.search(location, params) @chosen_restaurant = @response.businesses.sample @response.businesses.each do |business| p business.phone end @chosen_restaurant_details = { "name" => @chosen_restaurant.name, "phone" => @chosen_restaurant.phone, "address" => @chosen_restaurant.location.address[0] } p "chosen restaurent details: #{@chosen_restaurant_details}" @chosen_restaurant_details end end
module YelpHelper def YelpHelper.ping_yelp(is_fancy, category_filter, radius_filter, is_vegetarian, location) p "Inside ping yelp" params = {sort:'2'} term = "restaurants" if is_fancy == true term = "expensive restaurants" elsif is_fancy == false term = "cheap restaurants" end params[:term] = term if radius_filter != nil params[:radius_filter] = radius_filter end if category_filter != nil params[:category_filter] = category_filter end if is_vegetarian == true if params[:category_filter] params[:category_filter] += ",vegetarian" else params[:category_filter] = "vegetarian" end end # params = { term: "restaurants", # category_filter: "thai", # radius_filter: "1000", # sort: '2' # } - p "PEEING OUT PARAMS" p params p location @response = Yelp.client.search(location, params) @chosen_restaurant = @response.businesses.sample - #TODO FIX PHONE NUMBER ISSUE + @response.businesses.each do |business| + p business.phone + end + @chosen_restaurant_details = { "name" => @chosen_restaurant.name, - # "phone" => @chosen_restaurant.phone, ? -- + "phone" => @chosen_restaurant.phone, "address" => @chosen_restaurant.location.address[0] } p "chosen restaurent details: #{@chosen_restaurant_details}" @chosen_restaurant_details end end
8
0.156863
5
3
0ab9fcd7e222b1f38d067cb137b70871e5ae4af7
packages/templates/typescript-react-apollo/src/hoc.handlebars
packages/templates/typescript-react-apollo/src/hoc.handlebars
{{#unless @root.config.noHOC}} {{#each operations }} {{#unless @root.config.noNamespaces}} export namespace {{toPascalCase name}} { {{/unless}} export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{toPascalCase operationType}}, Variables>){ return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>( {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}}, operationOptions ) }; {{#unless @root.config.noNamespaces}} } {{/unless}} {{/each}} {{/unless}}
{{#unless @root.config.noHOC}} {{#each operations }} {{#unless @root.config.noNamespaces}} export namespace {{toPascalCase name}} { {{/unless}} export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>){ return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>( {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}}, operationOptions ) }; {{#unless @root.config.noNamespaces}} } {{/unless}} {{/each}} {{/unless}}
Use extended types when noNamespaces is true
Use extended types when noNamespaces is true
Handlebars
mit
dotansimha/graphql-code-generator,dotansimha/graphql-code-generator,dotansimha/graphql-code-generator
handlebars
## Code Before: {{#unless @root.config.noHOC}} {{#each operations }} {{#unless @root.config.noNamespaces}} export namespace {{toPascalCase name}} { {{/unless}} export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{toPascalCase operationType}}, Variables>){ return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>( {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}}, operationOptions ) }; {{#unless @root.config.noNamespaces}} } {{/unless}} {{/each}} {{/unless}} ## Instruction: Use extended types when noNamespaces is true ## Code After: {{#unless @root.config.noHOC}} {{#each operations }} {{#unless @root.config.noNamespaces}} export namespace {{toPascalCase name}} { {{/unless}} export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>){ return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>( {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}}, operationOptions ) }; {{#unless @root.config.noNamespaces}} } {{/unless}} {{/each}} {{/unless}}
{{#unless @root.config.noHOC}} {{#each operations }} {{#unless @root.config.noNamespaces}} export namespace {{toPascalCase name}} { {{/unless}} - export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{toPascalCase operationType}}, Variables>){ + export function {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}HOC<TProps = {}>(operationOptions: ReactApollo.OperationOption<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>){ ? +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ return ReactApollo.graphql<TProps, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}{{toPascalCase operationType}}, {{#if @root.config.noNamespaces}}{{ toPascalCase name }}{{/if}}Variables>( {{#unless @root.config.noGraphqlTag}}gql` {{ document }} `{{else}}{{{ gql document }}}{{/unless}}, operationOptions ) }; {{#unless @root.config.noNamespaces}} } {{/unless}} {{/each}} {{/unless}}
2
0.125
1
1
d807fc7900aa91c68c4613a1038d425fef44766b
README.md
README.md
Nustack is a stack-oriented concatenative programming language with support for high-level modular programming and Python integration. ## Installing. Installing Nustack is easy. Just download this repository to your computer as a zip, extract the contents to a folder called nustack that is on the module search path. Nustak is compatable with Python 3. ## Running To run a Nustack program, just run the following command line: `python -m nustack path/to/program.nu` ## Help Currently, there is no documentation for Nustack, but once I finish implementing the built-in functions, I create the documentation in the wiki. For now, create an issue with your questions. ## Example Here is an example Nustack program: ``` /* examples/testprog.nu */ `std::IO importext `std::Time importext `std::Control importext /* Import the IO, Time and Control modules */ 'file.txt' "r" IO::open IO::readall IO::close /*Open, read, and close the file 'file.txt' */ show /*Show the contents of the file*/ { "spam" show /*Print spam*/ 1 Time::sleep /*Pause for 1 second*/ } `spam define { spam } Control::forever ```
Nustack is a stack-oriented concatenative programming language with support for high-level modular programming and Python integration. ## Installing. Installing Nustack is easy. Just download this repository to your computer as a zip, extract the contents of the nustack-master folder to a folder called nustack that is on the module search path. Nustak is compatable with Python 3. ## Running To run a Nustack program, just run the following command line: `python -m nustack path/to/program.nu` `python -m nustack` starts the Nustack interactive prompt. ## Help Currently, there is no documentation for Nustack, but once I finish implementing the built-in functions, I create the documentation in the wiki. For now, create an issue with your questions. ## Example Here is an example Nustack program: ``` /* examples/testprog.nu */ `std::IO importext `std::Time importext `std::Control importext /* Import the IO, Time and Control modules */ 'file.txt' "r" IO::open IO::readall IO::close /*Open, read, and close the file 'file.txt' */ show /*Show the contents of the file*/ { "spam" show /*Print spam*/ 1 Time::sleep /*Pause for 1 second*/ } `spam define { spam } Control::forever ```
Add instructions for starting the interactive prompt
Add instructions for starting the interactive prompt
Markdown
mit
BookOwl/nustack
markdown
## Code Before: Nustack is a stack-oriented concatenative programming language with support for high-level modular programming and Python integration. ## Installing. Installing Nustack is easy. Just download this repository to your computer as a zip, extract the contents to a folder called nustack that is on the module search path. Nustak is compatable with Python 3. ## Running To run a Nustack program, just run the following command line: `python -m nustack path/to/program.nu` ## Help Currently, there is no documentation for Nustack, but once I finish implementing the built-in functions, I create the documentation in the wiki. For now, create an issue with your questions. ## Example Here is an example Nustack program: ``` /* examples/testprog.nu */ `std::IO importext `std::Time importext `std::Control importext /* Import the IO, Time and Control modules */ 'file.txt' "r" IO::open IO::readall IO::close /*Open, read, and close the file 'file.txt' */ show /*Show the contents of the file*/ { "spam" show /*Print spam*/ 1 Time::sleep /*Pause for 1 second*/ } `spam define { spam } Control::forever ``` ## Instruction: Add instructions for starting the interactive prompt ## Code After: Nustack is a stack-oriented concatenative programming language with support for high-level modular programming and Python integration. ## Installing. Installing Nustack is easy. Just download this repository to your computer as a zip, extract the contents of the nustack-master folder to a folder called nustack that is on the module search path. Nustak is compatable with Python 3. ## Running To run a Nustack program, just run the following command line: `python -m nustack path/to/program.nu` `python -m nustack` starts the Nustack interactive prompt. ## Help Currently, there is no documentation for Nustack, but once I finish implementing the built-in functions, I create the documentation in the wiki. For now, create an issue with your questions. ## Example Here is an example Nustack program: ``` /* examples/testprog.nu */ `std::IO importext `std::Time importext `std::Control importext /* Import the IO, Time and Control modules */ 'file.txt' "r" IO::open IO::readall IO::close /*Open, read, and close the file 'file.txt' */ show /*Show the contents of the file*/ { "spam" show /*Print spam*/ 1 Time::sleep /*Pause for 1 second*/ } `spam define { spam } Control::forever ```
Nustack is a stack-oriented concatenative programming language with support for high-level modular programming and Python integration. ## Installing. - Installing Nustack is easy. Just download this repository to your computer as a zip, extract the contents to a folder called nustack that is on the module search path. + Installing Nustack is easy. Just download this repository to your computer as a zip, extract the contents of the nustack-master folder to a folder called nustack that is on the module search path. ? +++++++++++++++++++++++++++++ Nustak is compatable with Python 3. ## Running To run a Nustack program, just run the following command line: `python -m nustack path/to/program.nu` + + `python -m nustack` starts the Nustack interactive prompt. ## Help Currently, there is no documentation for Nustack, but once I finish implementing the built-in functions, I create the documentation in the wiki. For now, create an issue with your questions. ## Example Here is an example Nustack program: ``` /* examples/testprog.nu */ `std::IO importext `std::Time importext `std::Control importext /* Import the IO, Time and Control modules */ 'file.txt' "r" IO::open IO::readall IO::close /*Open, read, and close the file 'file.txt' */ show /*Show the contents of the file*/ { "spam" show /*Print spam*/ 1 Time::sleep /*Pause for 1 second*/ } `spam define { spam } Control::forever ```
4
0.16
3
1
8e59d9e1597789f7b60371baff61bf6843e0f9fe
RELEASE.md
RELEASE.md
This documents how to release Vagrant. Various steps in this document will require privileged access to private systems, so this document is only targeted at Vagrant core members who have the ability to cut a release. 1. Update `version.txt` to the version you want to release. 1. Update `CHANGELOG.md` to have a header with the release version and date. 1. Commit those changes and also tag the release with the version: ``` $ git tag vX.Y.Z $ git push --tags ``` 1. Trigger an installer creation run within the HashiCorp Bamboo installation. This will take around 45 minutes. 1. Download all the resulting artifacts into the `pkg/dist` folder relative to the Vagrant repository on your local machine. 1. Run `./scripts/sign.sh` with the version that is being created. This must be run from the Vagrant repo root. This will GPG sign and checksum the files. 1. Run the following command to upload the binaries to the releases site: ``` $ hc-releases upload pkg/dist ``` 1. Publish the new index files to the releases site: ``` $ hc-releases publish ``` 1. Update `website/config.rb` to point to the latest version, commit, and push. 1. Tell HashiBot to deploy in `#deploys` ``` hashibot deploy vagrant ``` 1. Update `version.txt` to append `.dev` and add a new blank entry in the CHANGELOG, commit, and push. 1. Update [Checkpoint](https://checkpoint.hashicorp.com/control) with the new version.
This documents how to release Vagrant. Various steps in this document will require privileged access to private systems, so this document is only targeted at Vagrant core members who have the ability to cut a release. 1. Update `version.txt` to the version you want to release. 1. Update `CHANGELOG.md` to have a header with the release version and date. 1. Commit those changes and also tag the release with the version: ``` $ git tag vX.Y.Z $ git push --tags ``` 1. This will automatically trigger an installer creation, upload the artifacts, and publish the release. 1. After the release has been published update the `website/config.rb` to point to the latest version, commit, and push. 1. Publish the webiste by deleting the `stable-website` branch, recreate the branch, and force push. From the `master` branch, run: ``` $ git branch -D stable-website $ git branch -b stable-website $ git push -f origin stable-website ``` 1. Update `version.txt` to append `.dev` and add a new blank entry in the CHANGELOG, commit, and push. 1. Update [Checkpoint](https://checkpoint.hashicorp.com/control) with the new version.
Update the steps in the release document
Update the steps in the release document
Markdown
mit
marxarelli/vagrant,marxarelli/vagrant,sni/vagrant,bryson/vagrant,bryson/vagrant,gitebra/vagrant,marxarelli/vagrant,sni/vagrant,chrisroberts/vagrant,sni/vagrant,mitchellh/vagrant,mitchellh/vagrant,marxarelli/vagrant,gitebra/vagrant,chrisroberts/vagrant,bryson/vagrant,gitebra/vagrant,chrisroberts/vagrant,chrisroberts/vagrant,sni/vagrant,gitebra/vagrant,mitchellh/vagrant,mitchellh/vagrant,bryson/vagrant
markdown
## Code Before: This documents how to release Vagrant. Various steps in this document will require privileged access to private systems, so this document is only targeted at Vagrant core members who have the ability to cut a release. 1. Update `version.txt` to the version you want to release. 1. Update `CHANGELOG.md` to have a header with the release version and date. 1. Commit those changes and also tag the release with the version: ``` $ git tag vX.Y.Z $ git push --tags ``` 1. Trigger an installer creation run within the HashiCorp Bamboo installation. This will take around 45 minutes. 1. Download all the resulting artifacts into the `pkg/dist` folder relative to the Vagrant repository on your local machine. 1. Run `./scripts/sign.sh` with the version that is being created. This must be run from the Vagrant repo root. This will GPG sign and checksum the files. 1. Run the following command to upload the binaries to the releases site: ``` $ hc-releases upload pkg/dist ``` 1. Publish the new index files to the releases site: ``` $ hc-releases publish ``` 1. Update `website/config.rb` to point to the latest version, commit, and push. 1. Tell HashiBot to deploy in `#deploys` ``` hashibot deploy vagrant ``` 1. Update `version.txt` to append `.dev` and add a new blank entry in the CHANGELOG, commit, and push. 1. Update [Checkpoint](https://checkpoint.hashicorp.com/control) with the new version. ## Instruction: Update the steps in the release document ## Code After: This documents how to release Vagrant. Various steps in this document will require privileged access to private systems, so this document is only targeted at Vagrant core members who have the ability to cut a release. 1. Update `version.txt` to the version you want to release. 1. Update `CHANGELOG.md` to have a header with the release version and date. 1. Commit those changes and also tag the release with the version: ``` $ git tag vX.Y.Z $ git push --tags ``` 1. This will automatically trigger an installer creation, upload the artifacts, and publish the release. 1. After the release has been published update the `website/config.rb` to point to the latest version, commit, and push. 1. Publish the webiste by deleting the `stable-website` branch, recreate the branch, and force push. From the `master` branch, run: ``` $ git branch -D stable-website $ git branch -b stable-website $ git push -f origin stable-website ``` 1. Update `version.txt` to append `.dev` and add a new blank entry in the CHANGELOG, commit, and push. 1. Update [Checkpoint](https://checkpoint.hashicorp.com/control) with the new version.
This documents how to release Vagrant. Various steps in this document will require privileged access to private systems, so this document is only targeted at Vagrant core members who have the ability to cut a release. 1. Update `version.txt` to the version you want to release. 1. Update `CHANGELOG.md` to have a header with the release version and date. 1. Commit those changes and also tag the release with the version: ``` $ git tag vX.Y.Z $ git push --tags ``` - 1. Trigger an installer creation run within the HashiCorp Bamboo installation. - This will take around 45 minutes. + 1. This will automatically trigger an installer creation, upload the artifacts, + and publish the release. - 1. Download all the resulting artifacts into the `pkg/dist` folder relative to - the Vagrant repository on your local machine. + 1. After the release has been published update the `website/config.rb` to point + to the latest version, commit, and push. - 1. Run `./scripts/sign.sh` with the version that is being created. This must be - run from the Vagrant repo root. This will GPG sign and checksum the files. + 1. Publish the webiste by deleting the `stable-website` branch, recreate the branch, + and force push. From the `master` branch, run: - 1. Run the following command to upload the binaries to the releases site: - - ``` ? - + ``` - $ hc-releases upload pkg/dist + $ git branch -D stable-website + $ git branch -b stable-website + $ git push -f origin stable-website - ``` ? - + ``` - - 1. Publish the new index files to the releases site: - - ``` - $ hc-releases publish - ``` - - 1. Update `website/config.rb` to point to the latest version, commit, and push. - - 1. Tell HashiBot to deploy in `#deploys` - - ``` - hashibot deploy vagrant - ``` 1. Update `version.txt` to append `.dev` and add a new blank entry in the CHANGELOG, commit, and push. 1. Update [Checkpoint](https://checkpoint.hashicorp.com/control) with the new version.
36
0.72
11
25
6be0029a593109844dd923d29f188806e05dd1d4
core/templates/email/contact_us.html
core/templates/email/contact_us.html
<table style="border:0px;"> <tr> <th><strong>{% trans "Name" %}:</strong></th> <td>{{ instance.name }}</td> </tr> <tr> <th><strong>{% trans "Email" %}:</strong></th> <td>{{ instance.email }}</td> </tr> <tr> <th><strong>{% trans "Message" %}:</strong></th> <td>{{ instance.message }}</td> </tr> </table>
{% load i18n %} <table style="border:0px;"> <tr> <th><strong>{% trans "Name" %}:</strong></th> <td>{{ instance.name }}</td> </tr> <tr> <th><strong>{% trans "Email" %}:</strong></th> <td>{{ instance.email }}</td> </tr> <tr> <th><strong>{% trans "Message" %}:</strong></th> <td>{{ instance.message }}</td> </tr> </table>
Fix for Sentry PARI-6 : TemplateSyntaxError
Fix for Sentry PARI-6 : TemplateSyntaxError
HTML
bsd-3-clause
PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari
html
## Code Before: <table style="border:0px;"> <tr> <th><strong>{% trans "Name" %}:</strong></th> <td>{{ instance.name }}</td> </tr> <tr> <th><strong>{% trans "Email" %}:</strong></th> <td>{{ instance.email }}</td> </tr> <tr> <th><strong>{% trans "Message" %}:</strong></th> <td>{{ instance.message }}</td> </tr> </table> ## Instruction: Fix for Sentry PARI-6 : TemplateSyntaxError ## Code After: {% load i18n %} <table style="border:0px;"> <tr> <th><strong>{% trans "Name" %}:</strong></th> <td>{{ instance.name }}</td> </tr> <tr> <th><strong>{% trans "Email" %}:</strong></th> <td>{{ instance.email }}</td> </tr> <tr> <th><strong>{% trans "Message" %}:</strong></th> <td>{{ instance.message }}</td> </tr> </table>
+ {% load i18n %} <table style="border:0px;"> <tr> <th><strong>{% trans "Name" %}:</strong></th> <td>{{ instance.name }}</td> </tr> <tr> <th><strong>{% trans "Email" %}:</strong></th> <td>{{ instance.email }}</td> </tr> <tr> <th><strong>{% trans "Message" %}:</strong></th> <td>{{ instance.message }}</td> </tr> </table>
1
0.071429
1
0
909e7e7d2ec3b21f0a0b4f2cb8f6a875550b6dc9
polygerrit-ui/app/styles/gr-modal-styles.ts
polygerrit-ui/app/styles/gr-modal-styles.ts
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const modalStyles = css` dialog { padding: 0; border: 1px solid var(--border-color); border-radius: var(--border-radius); } dialog::backdrop { background-color: black; opacity: var(--modal-opacity, 0.6); } `;
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const modalStyles = css` dialog { padding: 0; border: 1px solid var(--border-color); border-radius: var(--border-radius); background: var(--dialog-background-color); box-shadow: var(--elevation-level-5); } dialog::backdrop { background-color: black; opacity: var(--modal-opacity, 0.6); } `;
Add missing GrOverlay styles to GrModalStyles
Add missing GrOverlay styles to GrModalStyles Release-Notes: skip Google-bug-id: b/255524908 Change-Id: If284faacd218fc5a8caf7bfdb404c52730dd92bd
TypeScript
apache-2.0
GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit
typescript
## Code Before: /** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const modalStyles = css` dialog { padding: 0; border: 1px solid var(--border-color); border-radius: var(--border-radius); } dialog::backdrop { background-color: black; opacity: var(--modal-opacity, 0.6); } `; ## Instruction: Add missing GrOverlay styles to GrModalStyles Release-Notes: skip Google-bug-id: b/255524908 Change-Id: If284faacd218fc5a8caf7bfdb404c52730dd92bd ## Code After: /** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const modalStyles = css` dialog { padding: 0; border: 1px solid var(--border-color); border-radius: var(--border-radius); background: var(--dialog-background-color); box-shadow: var(--elevation-level-5); } dialog::backdrop { background-color: black; opacity: var(--modal-opacity, 0.6); } `;
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {css} from 'lit'; export const modalStyles = css` dialog { padding: 0; border: 1px solid var(--border-color); border-radius: var(--border-radius); + background: var(--dialog-background-color); + box-shadow: var(--elevation-level-5); } dialog::backdrop { background-color: black; opacity: var(--modal-opacity, 0.6); } `;
2
0.111111
2
0
6607b72dc00ffc6286e198a3fe0fff7f67f2f965
pkgs/development/libraries/eigen/default.nix
pkgs/development/libraries/eigen/default.nix
{stdenv, fetchurl, cmake}: let version = "3.3-alpha1"; in stdenv.mkDerivation { name = "eigen-${version}"; src = fetchurl { url = "http://bitbucket.org/eigen/eigen/get/${version}.tar.gz"; name = "eigen-${version}.tar.gz"; sha256 = "00vmxz3da76ml3j7s8w8447sdpszx71i3xhnmwivxhpc4smpvz2q"; }; nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { description = "C++ template library for linear algebra: vectors, matrices, and related algorithms"; license = licenses.lgpl3Plus; homepage = http://eigen.tuxfamily.org ; platforms = platforms.unix; maintainers = with stdenv.lib.maintainers; [ sander urkud raskin ]; inherit version; }; }
{stdenv, fetchurl, cmake}: let version = "3.2.5"; in stdenv.mkDerivation { name = "eigen-${version}"; src = fetchurl { url = "http://bitbucket.org/eigen/eigen/get/${version}.tar.gz"; name = "eigen-${version}.tar.gz"; sha256 = "1vjixip19lwfia2bjpjwm09j7l20ry75493i6mjsk9djszj61agi"; }; nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { description = "C++ template library for linear algebra: vectors, matrices, and related algorithms"; license = licenses.lgpl3Plus; homepage = http://eigen.tuxfamily.org ; platforms = platforms.unix; maintainers = with stdenv.lib.maintainers; [ sander urkud raskin ]; inherit version; }; }
Revert "eigen: 3.2.5 -> 3.3-alpha1" to fix freecad
Revert "eigen: 3.2.5 -> 3.3-alpha1" to fix freecad This reverts commit c8b975388235823322a0962f88f05594229435e3. Fixes #12401. It wasn't intended to have "alpha" version as default.
Nix
mit
SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs
nix
## Code Before: {stdenv, fetchurl, cmake}: let version = "3.3-alpha1"; in stdenv.mkDerivation { name = "eigen-${version}"; src = fetchurl { url = "http://bitbucket.org/eigen/eigen/get/${version}.tar.gz"; name = "eigen-${version}.tar.gz"; sha256 = "00vmxz3da76ml3j7s8w8447sdpszx71i3xhnmwivxhpc4smpvz2q"; }; nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { description = "C++ template library for linear algebra: vectors, matrices, and related algorithms"; license = licenses.lgpl3Plus; homepage = http://eigen.tuxfamily.org ; platforms = platforms.unix; maintainers = with stdenv.lib.maintainers; [ sander urkud raskin ]; inherit version; }; } ## Instruction: Revert "eigen: 3.2.5 -> 3.3-alpha1" to fix freecad This reverts commit c8b975388235823322a0962f88f05594229435e3. Fixes #12401. It wasn't intended to have "alpha" version as default. ## Code After: {stdenv, fetchurl, cmake}: let version = "3.2.5"; in stdenv.mkDerivation { name = "eigen-${version}"; src = fetchurl { url = "http://bitbucket.org/eigen/eigen/get/${version}.tar.gz"; name = "eigen-${version}.tar.gz"; sha256 = "1vjixip19lwfia2bjpjwm09j7l20ry75493i6mjsk9djszj61agi"; }; nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { description = "C++ template library for linear algebra: vectors, matrices, and related algorithms"; license = licenses.lgpl3Plus; homepage = http://eigen.tuxfamily.org ; platforms = platforms.unix; maintainers = with stdenv.lib.maintainers; [ sander urkud raskin ]; inherit version; }; }
{stdenv, fetchurl, cmake}: let - version = "3.3-alpha1"; ? ^^^^^^^^ + version = "3.2.5"; ? ^^^ in stdenv.mkDerivation { name = "eigen-${version}"; src = fetchurl { url = "http://bitbucket.org/eigen/eigen/get/${version}.tar.gz"; name = "eigen-${version}.tar.gz"; - sha256 = "00vmxz3da76ml3j7s8w8447sdpszx71i3xhnmwivxhpc4smpvz2q"; + sha256 = "1vjixip19lwfia2bjpjwm09j7l20ry75493i6mjsk9djszj61agi"; }; nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { description = "C++ template library for linear algebra: vectors, matrices, and related algorithms"; license = licenses.lgpl3Plus; homepage = http://eigen.tuxfamily.org ; platforms = platforms.unix; maintainers = with stdenv.lib.maintainers; [ sander urkud raskin ]; inherit version; }; }
4
0.16
2
2
66a70eca85eb72c30e56eb7a17d0a45de5995e4f
app/src/main/java/com/ruigoncalo/marvin/ui/ImageLoaderManager.java
app/src/main/java/com/ruigoncalo/marvin/ui/ImageLoaderManager.java
package com.ruigoncalo.marvin.ui; import android.content.Context; import android.widget.ImageView; import com.squareup.picasso.Picasso; /** * ImageLoaderManager that wraps up an image loader lib * * Currently using picasso * * Created by ruigoncalo on 20/04/16. */ public class ImageLoaderManager { private ImageLoaderManager(){ } public static void load(Context context, String url, ImageView target) { Picasso.with(context).load(url).into(target); } public static void fetch(Context context, String url){ Picasso.with(context).load(url).fetch(); } }
package com.ruigoncalo.marvin.ui; import android.content.Context; import android.widget.ImageView; import com.ruigoncalo.marvin.model.raw.Thumbnail; import com.squareup.picasso.Picasso; /** * ImageLoaderManager that wraps up an image loader lib * * Currently using picasso * * Created by ruigoncalo on 20/04/16. */ public class ImageLoaderManager { private ImageLoaderManager(){ } public static void load(Context context, String url, ImageView target) { Picasso.with(context).load(url).into(target); } public static void fetch(Context context, String url){ Picasso.with(context).load(url).fetch(); } /** * Build image url path * Font: http://developer.marvel.com/documentation/images * * @param thumbnail image url info * @return full url to download image */ public static String buildImageUrl(Thumbnail thumbnail, boolean landscape){ String path = thumbnail.getPath(); String extension = thumbnail.getExtension(); String imageSize = landscape ? "landscape_amazing" : "standard_large"; return path + "/" + imageSize + "." + extension; } }
Create static method to build images path on ImageLoader
Create static method to build images path on ImageLoader
Java
apache-2.0
ruigoncalo/marvin
java
## Code Before: package com.ruigoncalo.marvin.ui; import android.content.Context; import android.widget.ImageView; import com.squareup.picasso.Picasso; /** * ImageLoaderManager that wraps up an image loader lib * * Currently using picasso * * Created by ruigoncalo on 20/04/16. */ public class ImageLoaderManager { private ImageLoaderManager(){ } public static void load(Context context, String url, ImageView target) { Picasso.with(context).load(url).into(target); } public static void fetch(Context context, String url){ Picasso.with(context).load(url).fetch(); } } ## Instruction: Create static method to build images path on ImageLoader ## Code After: package com.ruigoncalo.marvin.ui; import android.content.Context; import android.widget.ImageView; import com.ruigoncalo.marvin.model.raw.Thumbnail; import com.squareup.picasso.Picasso; /** * ImageLoaderManager that wraps up an image loader lib * * Currently using picasso * * Created by ruigoncalo on 20/04/16. */ public class ImageLoaderManager { private ImageLoaderManager(){ } public static void load(Context context, String url, ImageView target) { Picasso.with(context).load(url).into(target); } public static void fetch(Context context, String url){ Picasso.with(context).load(url).fetch(); } /** * Build image url path * Font: http://developer.marvel.com/documentation/images * * @param thumbnail image url info * @return full url to download image */ public static String buildImageUrl(Thumbnail thumbnail, boolean landscape){ String path = thumbnail.getPath(); String extension = thumbnail.getExtension(); String imageSize = landscape ? "landscape_amazing" : "standard_large"; return path + "/" + imageSize + "." + extension; } }
package com.ruigoncalo.marvin.ui; import android.content.Context; import android.widget.ImageView; + import com.ruigoncalo.marvin.model.raw.Thumbnail; import com.squareup.picasso.Picasso; /** * ImageLoaderManager that wraps up an image loader lib * * Currently using picasso * * Created by ruigoncalo on 20/04/16. */ public class ImageLoaderManager { private ImageLoaderManager(){ } public static void load(Context context, String url, ImageView target) { Picasso.with(context).load(url).into(target); } public static void fetch(Context context, String url){ Picasso.with(context).load(url).fetch(); } + + /** + * Build image url path + * Font: http://developer.marvel.com/documentation/images + * + * @param thumbnail image url info + * @return full url to download image + */ + public static String buildImageUrl(Thumbnail thumbnail, boolean landscape){ + String path = thumbnail.getPath(); + String extension = thumbnail.getExtension(); + String imageSize = landscape ? "landscape_amazing" : "standard_large"; + + return path + "/" + imageSize + "." + extension; + } }
16
0.571429
16
0
cd4eec050e5355828d52f8e3fa0b50c43aa307a6
CHANGES.md
CHANGES.md
* simplify the build by watermarking with `jbuilder subst` * fix the build of the released package archive ### v0.1.0 (2017-08-17) * use Mirage 3 interfaces * add support for ICMP ECHO_REQUESTS * add support for transparent HTTP/HTTPS proxying
* socket protocol updated to v22: - support error messages returned to client for Ethernet and Preferred_ipv4 slirp commands - allow client to request an IPv4 address without encoding it in the UUID - v1 no longer supported, clients have to be updated. Version 22 is used to match the current version number in Docker for Desktop. ### v0.1.1 (2017-08-17) * simplify the build by watermarking with `jbuilder subst` * fix the build of the released package archive ### v0.1.0 (2017-08-17) * use Mirage 3 interfaces * add support for ICMP ECHO_REQUESTS * add support for transparent HTTP/HTTPS proxying
Update CHANGELOG with new protocol
Update CHANGELOG with new protocol Signed-off-by: Magnus Skjegstad <9f4ca770b638615ac5c3e0d2da16b77c80c2f2c6@skjegstad.com>
Markdown
apache-2.0
djs55/vpnkit,djs55/vpnkit,djs55/vpnkit
markdown
## Code Before: * simplify the build by watermarking with `jbuilder subst` * fix the build of the released package archive ### v0.1.0 (2017-08-17) * use Mirage 3 interfaces * add support for ICMP ECHO_REQUESTS * add support for transparent HTTP/HTTPS proxying ## Instruction: Update CHANGELOG with new protocol Signed-off-by: Magnus Skjegstad <9f4ca770b638615ac5c3e0d2da16b77c80c2f2c6@skjegstad.com> ## Code After: * socket protocol updated to v22: - support error messages returned to client for Ethernet and Preferred_ipv4 slirp commands - allow client to request an IPv4 address without encoding it in the UUID - v1 no longer supported, clients have to be updated. Version 22 is used to match the current version number in Docker for Desktop. ### v0.1.1 (2017-08-17) * simplify the build by watermarking with `jbuilder subst` * fix the build of the released package archive ### v0.1.0 (2017-08-17) * use Mirage 3 interfaces * add support for ICMP ECHO_REQUESTS * add support for transparent HTTP/HTTPS proxying
+ + * socket protocol updated to v22: + - support error messages returned to client for Ethernet and Preferred_ipv4 + slirp commands + - allow client to request an IPv4 address without encoding it in the UUID + - v1 no longer supported, clients have to be updated. Version 22 is used to + match the current version number in Docker for Desktop. + + ### v0.1.1 (2017-08-17) * simplify the build by watermarking with `jbuilder subst` * fix the build of the released package archive ### v0.1.0 (2017-08-17) * use Mirage 3 interfaces * add support for ICMP ECHO_REQUESTS * add support for transparent HTTP/HTTPS proxying
9
0.9
9
0
8ac257e267d5c7d4b6002ae335e4cd7bb30399ed
features/step_definitions/attachment_steps.rb
features/step_definitions/attachment_steps.rb
When(/^I make unsaved changes to the news article$/) do @news_article = NewsArticle.last visit edit_admin_news_article_path(@news_article) fill_in 'Title', with: 'An unsaved change' end When(/^I attempt to visit the attachments page$/) do click_on 'Attachments' end Then(/^I should stay on the edit screen for the news article$/) do assert_equal edit_admin_news_article_path(@news_article), page.current_path end When(/^I save my changes$/) do click_on 'Save and continue editing' end Then(/^I can visit the attachments page$/) do click_on 'Attachments' assert_equal admin_edition_attachments_path(@news_article), page.current_path end When /^the (?:attachment|image)s? (?:has|have) been virus\-checked$/ do FileUtils.cp_r(Whitehall.incoming_uploads_root + '/.', Whitehall.clean_uploads_root + "/") end Then /^the image will be quarantined for virus checking$/ do assert_final_path(person_image_path, "thumbnail-placeholder.png") end Then /^the virus checked image will be available for viewing$/ do assert_final_path(person_image_path, person_image_path) end
When(/^I make unsaved changes to the news article$/) do @news_article = NewsArticle.last visit edit_admin_news_article_path(@news_article) fill_in 'Title', with: 'An unsaved change' end When(/^I attempt to visit the attachments page$/) do click_on 'Attachments' end Then(/^I should stay on the edit screen for the news article$/) do assert_equal edit_admin_news_article_path(@news_article), page.current_path end When(/^I save my changes$/) do click_on 'Save and continue editing' end Then(/^I can visit the attachments page$/) do click_on 'Attachments' assert_equal admin_edition_attachments_path(@news_article), page.current_path end When /^the (?:attachment|image)s? (?:has|have) been virus\-checked$/ do FileUtils.cp_r(Whitehall.incoming_uploads_root + '/.', Whitehall.clean_uploads_root + "/") FileUtils.rm_rf(Whitehall.incoming_uploads_root) FileUtils.mkdir(Whitehall.incoming_uploads_root) end Then /^the image will be quarantined for virus checking$/ do assert_final_path(person_image_path, "thumbnail-placeholder.png") end Then /^the virus checked image will be available for viewing$/ do assert_final_path(person_image_path, person_image_path) end
Fix the cucumber virus checker so that it mimics the VirusScanHelper
Fix the cucumber virus checker so that it mimics the VirusScanHelper This is needed as we will mark the files a not clean otherwise. And Images on people have many variations which also need moving
Ruby
mit
askl56/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,ggoral/whitehall,robinwhittleton/whitehall,alphagov/whitehall,alphagov/whitehall,hotvulcan/whitehall,alphagov/whitehall,robinwhittleton/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,ggoral/whitehall,hotvulcan/whitehall,ggoral/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,hotvulcan/whitehall,askl56/whitehall,robinwhittleton/whitehall,askl56/whitehall
ruby
## Code Before: When(/^I make unsaved changes to the news article$/) do @news_article = NewsArticle.last visit edit_admin_news_article_path(@news_article) fill_in 'Title', with: 'An unsaved change' end When(/^I attempt to visit the attachments page$/) do click_on 'Attachments' end Then(/^I should stay on the edit screen for the news article$/) do assert_equal edit_admin_news_article_path(@news_article), page.current_path end When(/^I save my changes$/) do click_on 'Save and continue editing' end Then(/^I can visit the attachments page$/) do click_on 'Attachments' assert_equal admin_edition_attachments_path(@news_article), page.current_path end When /^the (?:attachment|image)s? (?:has|have) been virus\-checked$/ do FileUtils.cp_r(Whitehall.incoming_uploads_root + '/.', Whitehall.clean_uploads_root + "/") end Then /^the image will be quarantined for virus checking$/ do assert_final_path(person_image_path, "thumbnail-placeholder.png") end Then /^the virus checked image will be available for viewing$/ do assert_final_path(person_image_path, person_image_path) end ## Instruction: Fix the cucumber virus checker so that it mimics the VirusScanHelper This is needed as we will mark the files a not clean otherwise. And Images on people have many variations which also need moving ## Code After: When(/^I make unsaved changes to the news article$/) do @news_article = NewsArticle.last visit edit_admin_news_article_path(@news_article) fill_in 'Title', with: 'An unsaved change' end When(/^I attempt to visit the attachments page$/) do click_on 'Attachments' end Then(/^I should stay on the edit screen for the news article$/) do assert_equal edit_admin_news_article_path(@news_article), page.current_path end When(/^I save my changes$/) do click_on 'Save and continue editing' end Then(/^I can visit the attachments page$/) do click_on 'Attachments' assert_equal admin_edition_attachments_path(@news_article), page.current_path end When /^the (?:attachment|image)s? (?:has|have) been virus\-checked$/ do FileUtils.cp_r(Whitehall.incoming_uploads_root + '/.', Whitehall.clean_uploads_root + "/") FileUtils.rm_rf(Whitehall.incoming_uploads_root) FileUtils.mkdir(Whitehall.incoming_uploads_root) end Then /^the image will be quarantined for virus checking$/ do assert_final_path(person_image_path, "thumbnail-placeholder.png") end Then /^the virus checked image will be available for viewing$/ do assert_final_path(person_image_path, person_image_path) end
When(/^I make unsaved changes to the news article$/) do @news_article = NewsArticle.last visit edit_admin_news_article_path(@news_article) fill_in 'Title', with: 'An unsaved change' end When(/^I attempt to visit the attachments page$/) do click_on 'Attachments' end Then(/^I should stay on the edit screen for the news article$/) do assert_equal edit_admin_news_article_path(@news_article), page.current_path end When(/^I save my changes$/) do click_on 'Save and continue editing' end Then(/^I can visit the attachments page$/) do click_on 'Attachments' assert_equal admin_edition_attachments_path(@news_article), page.current_path end When /^the (?:attachment|image)s? (?:has|have) been virus\-checked$/ do FileUtils.cp_r(Whitehall.incoming_uploads_root + '/.', Whitehall.clean_uploads_root + "/") + FileUtils.rm_rf(Whitehall.incoming_uploads_root) + FileUtils.mkdir(Whitehall.incoming_uploads_root) end Then /^the image will be quarantined for virus checking$/ do assert_final_path(person_image_path, "thumbnail-placeholder.png") end Then /^the virus checked image will be available for viewing$/ do assert_final_path(person_image_path, person_image_path) end
2
0.057143
2
0
c8c0e2180ebd0a5f2a7a23fa2a5e0981ef8ebbc8
program_document/program_result_view.xml
program_document/program_result_view.xml
<openerp> <data> <record id="view_program_result_form" model="ir.ui.view"> <field name="model">program.result</field> <field name="inherit_id" ref="program.view_program_result_form" /> <field name="priority" eval="100"/> <field name="arch" type="xml"> <notebook> <page name="documents" string="Documents"> <button name="%(document_multiple_records.action_view_document)s" type="action" string="Add" class="oe_edit_only"/> <field name="document_ids"> <tree create="1"> <field name="name" string="Name"/> <field name="datas_fname" /> <field name="create_uid" /> <field name="create_date" /> </tree> </field> </page> </notebook> </field> </record> </data> </openerp>
<openerp> <data> <record id="view_program_result_form" model="ir.ui.view"> <field name="model">program.result</field> <field name="inherit_id" ref="program.view_program_result_form" /> <field name="priority" eval="100"/> <field name="arch" type="xml"> <notebook> <page name="documents" string="Documents"> <button name="%(document_multiple_records.action_view_document)s" type="action" string="Add" class="oe_edit_only"/> <field name="document_ids"> <tree> <field name="name" string="Name"/> <field name="datas_fname" /> <field name="create_uid" /> <field name="create_date" /> </tree> </field> </page> </notebook> </field> </record> </data> </openerp>
Allow to add document with add button
[UPD] Allow to add document with add button Remove create option; it doesn't make sense because the document is a field function and by default it is readonly
XML
agpl-3.0
OCA/program
xml
## Code Before: <openerp> <data> <record id="view_program_result_form" model="ir.ui.view"> <field name="model">program.result</field> <field name="inherit_id" ref="program.view_program_result_form" /> <field name="priority" eval="100"/> <field name="arch" type="xml"> <notebook> <page name="documents" string="Documents"> <button name="%(document_multiple_records.action_view_document)s" type="action" string="Add" class="oe_edit_only"/> <field name="document_ids"> <tree create="1"> <field name="name" string="Name"/> <field name="datas_fname" /> <field name="create_uid" /> <field name="create_date" /> </tree> </field> </page> </notebook> </field> </record> </data> </openerp> ## Instruction: [UPD] Allow to add document with add button Remove create option; it doesn't make sense because the document is a field function and by default it is readonly ## Code After: <openerp> <data> <record id="view_program_result_form" model="ir.ui.view"> <field name="model">program.result</field> <field name="inherit_id" ref="program.view_program_result_form" /> <field name="priority" eval="100"/> <field name="arch" type="xml"> <notebook> <page name="documents" string="Documents"> <button name="%(document_multiple_records.action_view_document)s" type="action" string="Add" class="oe_edit_only"/> <field name="document_ids"> <tree> <field name="name" string="Name"/> <field name="datas_fname" /> <field name="create_uid" /> <field name="create_date" /> </tree> </field> </page> </notebook> </field> </record> </data> </openerp>
<openerp> <data> <record id="view_program_result_form" model="ir.ui.view"> <field name="model">program.result</field> <field name="inherit_id" ref="program.view_program_result_form" /> <field name="priority" eval="100"/> <field name="arch" type="xml"> <notebook> <page name="documents" string="Documents"> <button name="%(document_multiple_records.action_view_document)s" type="action" string="Add" class="oe_edit_only"/> <field name="document_ids"> - <tree create="1"> ? ----------- + <tree> <field name="name" string="Name"/> <field name="datas_fname" /> <field name="create_uid" /> <field name="create_date" /> </tree> </field> </page> </notebook> </field> </record> </data> </openerp>
2
0.064516
1
1
d5e9da483bc5875165f6960017844efa7ed4d404
spec/system/haproxy_spec.rb
spec/system/haproxy_spec.rb
require 'spec_helper' require 'httparty' RSpec.describe "haproxy" do let(:management_uri) { 'http://10.244.16.3:15672' } [0, 1].each do |job_index| context "when the job rmq/#{job_index} is down" do before(:all) do bosh_director.stop('rmq', job_index) end after(:all) do bosh_director.start('rmq', job_index) end it 'I can still access the managment UI' do res = HTTParty.get(management_uri) expect(res.code).to eql(200) expect(res.body).to include('RabbitMQ Management') end end end end
require 'spec_helper' require 'httparty' RSpec.describe "haproxy" do let(:management_uri) { "http://#{environment.bosh_manifest.job('haproxy').static_ips.first}:15672" } [0, 1].each do |job_index| context "when the job rmq/#{job_index} is down" do before(:all) do bosh_director.stop('rmq', job_index) end after(:all) do bosh_director.start('rmq', job_index) end it 'I can still access the managment UI' do res = HTTParty.get(management_uri) expect(res.code).to eql(200) expect(res.body).to include('RabbitMQ Management') end end end end
Read haproxy static_ips from manifest in test
Read haproxy static_ips from manifest in test [#148579027] Signed-off-by: Diego Lemos <48d75b1e8d05d722a97d5c3ce49024e6a466bebe@pivotal.io>
Ruby
apache-2.0
pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release
ruby
## Code Before: require 'spec_helper' require 'httparty' RSpec.describe "haproxy" do let(:management_uri) { 'http://10.244.16.3:15672' } [0, 1].each do |job_index| context "when the job rmq/#{job_index} is down" do before(:all) do bosh_director.stop('rmq', job_index) end after(:all) do bosh_director.start('rmq', job_index) end it 'I can still access the managment UI' do res = HTTParty.get(management_uri) expect(res.code).to eql(200) expect(res.body).to include('RabbitMQ Management') end end end end ## Instruction: Read haproxy static_ips from manifest in test [#148579027] Signed-off-by: Diego Lemos <48d75b1e8d05d722a97d5c3ce49024e6a466bebe@pivotal.io> ## Code After: require 'spec_helper' require 'httparty' RSpec.describe "haproxy" do let(:management_uri) { "http://#{environment.bosh_manifest.job('haproxy').static_ips.first}:15672" } [0, 1].each do |job_index| context "when the job rmq/#{job_index} is down" do before(:all) do bosh_director.stop('rmq', job_index) end after(:all) do bosh_director.start('rmq', job_index) end it 'I can still access the managment UI' do res = HTTParty.get(management_uri) expect(res.code).to eql(200) expect(res.body).to include('RabbitMQ Management') end end end end
require 'spec_helper' require 'httparty' RSpec.describe "haproxy" do - let(:management_uri) { 'http://10.244.16.3:15672' } + let(:management_uri) { "http://#{environment.bosh_manifest.job('haproxy').static_ips.first}:15672" } [0, 1].each do |job_index| context "when the job rmq/#{job_index} is down" do before(:all) do bosh_director.stop('rmq', job_index) end after(:all) do bosh_director.start('rmq', job_index) end it 'I can still access the managment UI' do res = HTTParty.get(management_uri) expect(res.code).to eql(200) expect(res.body).to include('RabbitMQ Management') end end end end
2
0.074074
1
1
f35086ab1e1fe37ad18a57473987e69195df743d
bizarro/templates/not-allowed.html
bizarro/templates/not-allowed.html
{% extends "base.html" %} {% block title %}Tasks{% endblock %} {% block content %} <div class="main-content loggedout"> <div class="signin"> {% if email %} <h2>Not Allowed</h2> <p>To access the website editor, you need to not be <q>{{email}}</q>.</p> <input type="button" id="signout" value="Sign out"> {% else %} <h2>Sign in</h2> <p>To access the website editor, you need to be signed in:</p> <input type="button" id="signin" value="Sign in"> {% endif %} <h2>Don't have permission yet?</h2> <p>Contact your website lead to add your email address to <a href="{{auth_url}}">the list of editors</a>.</p> <p><a href="mailto:poc" class="button sketchy">Email admin</a></p> </div> <p class="clue">Looking for the Ceviche homepage? <a href="">It's over here</a></p> </div> {% endblock %}
{% extends "base.html" %} {% block title %}Tasks{% endblock %} {% block content %} <div class="main-content loggedout"> <div class="signin"> {% if email %} <h2>Not Allowed</h2> <p>{{email}} doesn't appear to be an approved editor.</p> <input type="button" id="signout" value="Sign out"> {% else %} <h2>Sign in</h2> <p>To access the website editor, you need to be signed in:</p> <input type="button" id="signin" value="Sign in"> {% endif %} <h2>Don't have permission yet?</h2> <p>Contact your website lead to add your email address to <a href="{{auth_url}}">the list of editors</a>.</p> <p><a href="mailto:poc" class="button sketchy">Email admin</a></p> </div> <p class="clue">Looking for the Ceviche homepage? <a href="">It's over here</a></p> </div> {% endblock %}
Reword logged out message with wrong email
Reword logged out message with wrong email
HTML
bsd-3-clause
darvelo/chime,chimecms/chime,chimecms/chime,darvelo/chime,yudiutomo/chime,yudiutomo/chime,yudiutomo/chime,chimecms/chime,darvelo/chime,darvelo/chime,yudiutomo/chime,darvelo/chime,chimecms/chime,yudiutomo/chime,chimecms/chime
html
## Code Before: {% extends "base.html" %} {% block title %}Tasks{% endblock %} {% block content %} <div class="main-content loggedout"> <div class="signin"> {% if email %} <h2>Not Allowed</h2> <p>To access the website editor, you need to not be <q>{{email}}</q>.</p> <input type="button" id="signout" value="Sign out"> {% else %} <h2>Sign in</h2> <p>To access the website editor, you need to be signed in:</p> <input type="button" id="signin" value="Sign in"> {% endif %} <h2>Don't have permission yet?</h2> <p>Contact your website lead to add your email address to <a href="{{auth_url}}">the list of editors</a>.</p> <p><a href="mailto:poc" class="button sketchy">Email admin</a></p> </div> <p class="clue">Looking for the Ceviche homepage? <a href="">It's over here</a></p> </div> {% endblock %} ## Instruction: Reword logged out message with wrong email ## Code After: {% extends "base.html" %} {% block title %}Tasks{% endblock %} {% block content %} <div class="main-content loggedout"> <div class="signin"> {% if email %} <h2>Not Allowed</h2> <p>{{email}} doesn't appear to be an approved editor.</p> <input type="button" id="signout" value="Sign out"> {% else %} <h2>Sign in</h2> <p>To access the website editor, you need to be signed in:</p> <input type="button" id="signin" value="Sign in"> {% endif %} <h2>Don't have permission yet?</h2> <p>Contact your website lead to add your email address to <a href="{{auth_url}}">the list of editors</a>.</p> <p><a href="mailto:poc" class="button sketchy">Email admin</a></p> </div> <p class="clue">Looking for the Ceviche homepage? <a href="">It's over here</a></p> </div> {% endblock %}
{% extends "base.html" %} {% block title %}Tasks{% endblock %} {% block content %} <div class="main-content loggedout"> <div class="signin"> {% if email %} <h2>Not Allowed</h2> - <p>To access the website editor, you need to not be <q>{{email}}</q>.</p> + <p>{{email}} doesn't appear to be an approved editor.</p> <input type="button" id="signout" value="Sign out"> {% else %} <h2>Sign in</h2> <p>To access the website editor, you need to be signed in:</p> <input type="button" id="signin" value="Sign in"> {% endif %} <h2>Don't have permission yet?</h2> <p>Contact your website lead to add your email address to <a href="{{auth_url}}">the list of editors</a>.</p> <p><a href="mailto:poc" class="button sketchy">Email admin</a></p> </div> <p class="clue">Looking for the Ceviche homepage? <a href="">It's over here</a></p> </div> {% endblock %}
2
0.08
1
1
abbb4aa9643ad51cdce4821714eab945005cdd82
README.md
README.md
BeagleBone-SPI-UART =================== Enables SPI and UART (serial tty*) ports on the BeagleBone Black
BeagleBone-SPI-UART =================== Enables SPI and UART (serial tty*) ports on the BeagleBone Black ## How to use On the BeagleBone Black, the SPI ports are both disabled by default, and only the UART0 serial port is accessible via dedicated headers. To easily bypass these limitations, you can use this library. ```javascript var BBIO = require("./BBIO.js"); BBIO.SPI.enable(); BBIO.UART.enable(); ``` ## API * __**`BBIO.SPI.enable(index)`**__ Enables the SPI ports on the BeagleBone Black. The optional `index` parameter specifies the SPI port to enable. Can be either 0 or 1 (there are only two SPI ports on the BeagleBone Black). If unspecified, both SPI ports will be enabled. * __**`BBIO.UART.enable(index)`**__ Enables the UART (serial tty*) ports on the BeagleBone Black. The optional `index` parameter specifies the UART port to enable. Can be either 1, 2, 4 or 5 (port 0 is enabled by default and has a dedicated header, while port 3 is sort of irrelevant as it can't receive data). If unspecified, all supported UART ports will be enabled.
Add details about the API to the readme
Add details about the API to the readme
Markdown
mpl-2.0
victorporof/BeagleBone-SPI-UART
markdown
## Code Before: BeagleBone-SPI-UART =================== Enables SPI and UART (serial tty*) ports on the BeagleBone Black ## Instruction: Add details about the API to the readme ## Code After: BeagleBone-SPI-UART =================== Enables SPI and UART (serial tty*) ports on the BeagleBone Black ## How to use On the BeagleBone Black, the SPI ports are both disabled by default, and only the UART0 serial port is accessible via dedicated headers. To easily bypass these limitations, you can use this library. ```javascript var BBIO = require("./BBIO.js"); BBIO.SPI.enable(); BBIO.UART.enable(); ``` ## API * __**`BBIO.SPI.enable(index)`**__ Enables the SPI ports on the BeagleBone Black. The optional `index` parameter specifies the SPI port to enable. Can be either 0 or 1 (there are only two SPI ports on the BeagleBone Black). If unspecified, both SPI ports will be enabled. * __**`BBIO.UART.enable(index)`**__ Enables the UART (serial tty*) ports on the BeagleBone Black. The optional `index` parameter specifies the UART port to enable. Can be either 1, 2, 4 or 5 (port 0 is enabled by default and has a dedicated header, while port 3 is sort of irrelevant as it can't receive data). If unspecified, all supported UART ports will be enabled.
BeagleBone-SPI-UART =================== Enables SPI and UART (serial tty*) ports on the BeagleBone Black + + ## How to use + On the BeagleBone Black, the SPI ports are both disabled by default, and only the UART0 serial port is accessible via dedicated headers. To easily bypass these limitations, you can use this library. + + ```javascript + var BBIO = require("./BBIO.js"); + BBIO.SPI.enable(); + BBIO.UART.enable(); + ``` + + ## API + + * __**`BBIO.SPI.enable(index)`**__ + + Enables the SPI ports on the BeagleBone Black. The optional `index` parameter specifies the SPI port to enable. Can be either 0 or 1 (there are only two SPI ports on the BeagleBone Black). If unspecified, both SPI ports will be enabled. + + * __**`BBIO.UART.enable(index)`**__ + + Enables the UART (serial tty*) ports on the BeagleBone Black. The optional `index` parameter specifies the UART port to enable. Can be either 1, 2, 4 or 5 (port 0 is enabled by default and has a dedicated header, while port 3 is sort of irrelevant as it can't receive data). If unspecified, all supported UART ports will be enabled.
19
4.75
19
0
c184b7684993f465bd9b4f7109555451e7e26b33
Package.swift
Package.swift
// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "GRDB", platforms: [ .iOS(.v11), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2), ], products: [ .library(name: "GRDB", targets: ["GRDB"]), ], dependencies: [ ], targets: [ .systemLibrary( name: "CSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", dependencies: ["CSQLite"], path: "GRDB"), .testTarget( name: "GRDBTests", dependencies: ["GRDB"], path: "Tests", exclude: [ "CocoaPods", "CustomSQLite", "Crash", "Performance", "SPM", ]) ], swiftLanguageVersions: [.v5] )
// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "GRDB", platforms: [ .iOS(.v11), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2), ], products: [ .library(name: "GRDB", targets: ["GRDB"]), .library(name: "GRDBDynamic", type: .dynamic, targets: ["GRDB"]), ], dependencies: [ ], targets: [ .systemLibrary( name: "CSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", dependencies: ["CSQLite"], path: "GRDB"), .testTarget( name: "GRDBTests", dependencies: ["GRDB"], path: "Tests", exclude: [ "CocoaPods", "CustomSQLite", "Crash", "Performance", "SPM", ]) ], swiftLanguageVersions: [.v5] )
Add dynamic library to products to allows dynamic linking
Add dynamic library to products to allows dynamic linking
Swift
mit
groue/GRDB.swift,groue/GRDB.swift,groue/GRDB.swift,groue/GRDB.swift
swift
## Code Before: // swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "GRDB", platforms: [ .iOS(.v11), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2), ], products: [ .library(name: "GRDB", targets: ["GRDB"]), ], dependencies: [ ], targets: [ .systemLibrary( name: "CSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", dependencies: ["CSQLite"], path: "GRDB"), .testTarget( name: "GRDBTests", dependencies: ["GRDB"], path: "Tests", exclude: [ "CocoaPods", "CustomSQLite", "Crash", "Performance", "SPM", ]) ], swiftLanguageVersions: [.v5] ) ## Instruction: Add dynamic library to products to allows dynamic linking ## Code After: // swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "GRDB", platforms: [ .iOS(.v11), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2), ], products: [ .library(name: "GRDB", targets: ["GRDB"]), .library(name: "GRDBDynamic", type: .dynamic, targets: ["GRDB"]), ], dependencies: [ ], targets: [ .systemLibrary( name: "CSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", dependencies: ["CSQLite"], path: "GRDB"), .testTarget( name: "GRDBTests", dependencies: ["GRDB"], path: "Tests", exclude: [ "CocoaPods", "CustomSQLite", "Crash", "Performance", "SPM", ]) ], swiftLanguageVersions: [.v5] )
// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "GRDB", platforms: [ .iOS(.v11), .macOS(.v10_10), .tvOS(.v9), .watchOS(.v2), ], products: [ .library(name: "GRDB", targets: ["GRDB"]), + .library(name: "GRDBDynamic", type: .dynamic, targets: ["GRDB"]), ], dependencies: [ ], targets: [ .systemLibrary( name: "CSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", dependencies: ["CSQLite"], path: "GRDB"), .testTarget( name: "GRDBTests", dependencies: ["GRDB"], path: "Tests", exclude: [ "CocoaPods", "CustomSQLite", "Crash", "Performance", "SPM", ]) ], swiftLanguageVersions: [.v5] )
1
0.025
1
0
23ba3ab24ea8257d974bc3b5dcdc5429a49d9762
_posts/2015-03-30-argumentum-ad-homonym.md
_posts/2015-03-30-argumentum-ad-homonym.md
--- layout: post title: "Argumentum ad Homonym" excerpt: "" author: jroelofs tags: [argumentum] comments: false image: feature: credit: Jon Roelofs creditlink: /authors --- Not to be confused with Argumentum ad Hominem (attack on a person's character), it is a fallacy in which a claim or argument is dismissed on the basis that a word in the argument has a homophone which invalidates the intended meaning of the valid claim. > You say you're an objectivist [sic], but that is impossible. To achieve an > objective, you need to eploy a means.
--- layout: post title: "Argumentum ad Homonym" excerpt: "You say you're an objectivist, but that is impossible. To achieve an objective, you need to eploy a means." author: jroelofs tags: [argumentum] comments: false image: feature: credit: Jon Roelofs creditlink: /authors --- Not to be confused with Argumentum ad Hominem (attack on a person's character), it is a fallacy in which a claim or argument is dismissed on the basis that a word in the argument has a homophone which invalidates the intended meaning of the valid claim. > {{ page.excerpt }}
Fix excerpt for ad homonym
Fix excerpt for ad homonym
Markdown
mit
anarchistlexicon/anarchistlexicon.github.io,anarchistlexicon/anarchistlexicon.github.io,anarchistlexicon/anarchistlexicon.github.io
markdown
## Code Before: --- layout: post title: "Argumentum ad Homonym" excerpt: "" author: jroelofs tags: [argumentum] comments: false image: feature: credit: Jon Roelofs creditlink: /authors --- Not to be confused with Argumentum ad Hominem (attack on a person's character), it is a fallacy in which a claim or argument is dismissed on the basis that a word in the argument has a homophone which invalidates the intended meaning of the valid claim. > You say you're an objectivist [sic], but that is impossible. To achieve an > objective, you need to eploy a means. ## Instruction: Fix excerpt for ad homonym ## Code After: --- layout: post title: "Argumentum ad Homonym" excerpt: "You say you're an objectivist, but that is impossible. To achieve an objective, you need to eploy a means." author: jroelofs tags: [argumentum] comments: false image: feature: credit: Jon Roelofs creditlink: /authors --- Not to be confused with Argumentum ad Hominem (attack on a person's character), it is a fallacy in which a claim or argument is dismissed on the basis that a word in the argument has a homophone which invalidates the intended meaning of the valid claim. > {{ page.excerpt }}
--- layout: post title: "Argumentum ad Homonym" - excerpt: "" + excerpt: "You say you're an objectivist, but that is impossible. To achieve an + objective, you need to eploy a means." author: jroelofs tags: [argumentum] comments: false image: feature: credit: Jon Roelofs creditlink: /authors --- Not to be confused with Argumentum ad Hominem (attack on a person's character), it is a fallacy in which a claim or argument is dismissed on the basis that a word in the argument has a homophone which invalidates the intended meaning of the valid claim. + > {{ page.excerpt }} - > You say you're an objectivist [sic], but that is impossible. To achieve an - > objective, you need to eploy a means. -
7
0.333333
3
4
c79cedf826a3b6ee89e6186954185ef3217dd901
tomviz/python/InvertData.py
tomviz/python/InvertData.py
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if scalars is None: raise RuntimeError("No scalars found!") result = np.float32(scalars) max = np.amax(scalars) step = 0 for chunk in np.array_split(result, NUMBER_OF_CHUNKS): if self.canceled: return chunk[:] = max - chunk step += 1 self.progress.value = step utils.set_scalars(dataset, result)
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if scalars is None: raise RuntimeError("No scalars found!") result = np.float32(scalars) min = np.amin(scalars) max = np.amax(scalars) step = 0 for chunk in np.array_split(result, NUMBER_OF_CHUNKS): if self.canceled: return chunk[:] = max - chunk + min step += 1 self.progress.value = step utils.set_scalars(dataset, result)
Add the minimum scalar value to the result of the InvertOperator
Add the minimum scalar value to the result of the InvertOperator Without it, all results would be shifted so the minimum was 0.
Python
bsd-3-clause
OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz
python
## Code Before: import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if scalars is None: raise RuntimeError("No scalars found!") result = np.float32(scalars) max = np.amax(scalars) step = 0 for chunk in np.array_split(result, NUMBER_OF_CHUNKS): if self.canceled: return chunk[:] = max - chunk step += 1 self.progress.value = step utils.set_scalars(dataset, result) ## Instruction: Add the minimum scalar value to the result of the InvertOperator Without it, all results would be shifted so the minimum was 0. ## Code After: import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if scalars is None: raise RuntimeError("No scalars found!") result = np.float32(scalars) min = np.amin(scalars) max = np.amax(scalars) step = 0 for chunk in np.array_split(result, NUMBER_OF_CHUNKS): if self.canceled: return chunk[:] = max - chunk + min step += 1 self.progress.value = step utils.set_scalars(dataset, result)
import tomviz.operators NUMBER_OF_CHUNKS = 10 class InvertOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset): from tomviz import utils import numpy as np self.progress.maximum = NUMBER_OF_CHUNKS scalars = utils.get_scalars(dataset) if scalars is None: raise RuntimeError("No scalars found!") result = np.float32(scalars) + min = np.amin(scalars) max = np.amax(scalars) step = 0 for chunk in np.array_split(result, NUMBER_OF_CHUNKS): if self.canceled: return - chunk[:] = max - chunk + chunk[:] = max - chunk + min ? ++++++ step += 1 self.progress.value = step utils.set_scalars(dataset, result)
3
0.111111
2
1
180ccf919fc997f1c04552ca5354f8a9a6737c29
app/assets/stylesheets/pages/users/_show.sass
app/assets/stylesheets/pages/users/_show.sass
.user-profile-page header.hero position: relative .profile-image position: absolute bottom: 0 left: 50% border: 6px solid white margin-bottom: -75px margin-left: -75px &.personal +avatar-position(150px) &.company +avatar-position(150px, 320px) section.content padding: 1.5em 0 .hero-bio padding: 5em 0 2em text-align: center background: white h2 text-transform: uppercase margin-bottom: 0 .bio margin: 1em auto color: $secondary-font-color font: size: 1.05em weight: 300 .user-social li display: inline-block .social-link display: block width: 30px height: 30px padding: 5px background: $primary-color color: white text-align: center line-height: 1.3em border-radius: 50% margin: 0 .3em +transition(.3s) &:hover background: darken($primary-color, 15%) .projects [class*="column"]:last-child float: left
.user-profile-page header.hero position: relative .profile-image position: absolute bottom: 0 left: 50% border: 6px solid white margin-bottom: -75px margin-left: -75px background: white &.personal +avatar-position(150px) &.company +avatar-position(150px, 320px) section.content padding: 1.5em 0 .hero-bio padding: 5em 0 2em text-align: center background: white h2 text-transform: uppercase margin-bottom: 0 .bio margin: 1em auto color: $secondary-font-color font: size: 1.05em weight: 300 .user-social li display: inline-block .social-link display: block width: 30px height: 30px padding: 5px background: $primary-color color: white text-align: center line-height: 1.3em border-radius: 50% margin: 0 .3em +transition(.3s) &:hover background: darken($primary-color, 15%) .projects [class*="column"]:last-child float: left
Fix user avatar with white on public user page
Fix user avatar with white on public user page
Sass
mit
jinutm/silverprod,jinutm/silverclass,rockkhuya/taydantay,gustavoguichard/neighborly,jinutm/silveralms.com,MicroPasts/micropasts-crowdfunding,jinutm/silverpro,jinutm/silverme,raksonibs/raimcrowd,jinutm/silvfinal,jinutm/silvfinal,jinutm/silverpro,jinutm/silverpro,raksonibs/raimcrowd,MicroPasts/micropasts-crowdfunding,raksonibs/raimcrowd,jinutm/silvfinal,MicroPasts/micropasts-crowdfunding,jinutm/silverclass,jinutm/silveralms.com,raksonibs/raimcrowd,rockkhuya/taydantay,rockkhuya/taydantay,MicroPasts/micropasts-crowdfunding,jinutm/silverprod,jinutm/silveralms.com,jinutm/silverprod,jinutm/silverme,jinutm/silverme,gustavoguichard/neighborly,jinutm/silverclass,gustavoguichard/neighborly
sass
## Code Before: .user-profile-page header.hero position: relative .profile-image position: absolute bottom: 0 left: 50% border: 6px solid white margin-bottom: -75px margin-left: -75px &.personal +avatar-position(150px) &.company +avatar-position(150px, 320px) section.content padding: 1.5em 0 .hero-bio padding: 5em 0 2em text-align: center background: white h2 text-transform: uppercase margin-bottom: 0 .bio margin: 1em auto color: $secondary-font-color font: size: 1.05em weight: 300 .user-social li display: inline-block .social-link display: block width: 30px height: 30px padding: 5px background: $primary-color color: white text-align: center line-height: 1.3em border-radius: 50% margin: 0 .3em +transition(.3s) &:hover background: darken($primary-color, 15%) .projects [class*="column"]:last-child float: left ## Instruction: Fix user avatar with white on public user page ## Code After: .user-profile-page header.hero position: relative .profile-image position: absolute bottom: 0 left: 50% border: 6px solid white margin-bottom: -75px margin-left: -75px background: white &.personal +avatar-position(150px) &.company +avatar-position(150px, 320px) section.content padding: 1.5em 0 .hero-bio padding: 5em 0 2em text-align: center background: white h2 text-transform: uppercase margin-bottom: 0 .bio margin: 1em auto color: $secondary-font-color font: size: 1.05em weight: 300 .user-social li display: inline-block .social-link display: block width: 30px height: 30px padding: 5px background: $primary-color color: white text-align: center line-height: 1.3em border-radius: 50% margin: 0 .3em +transition(.3s) &:hover background: darken($primary-color, 15%) .projects [class*="column"]:last-child float: left
.user-profile-page header.hero position: relative .profile-image position: absolute bottom: 0 left: 50% border: 6px solid white margin-bottom: -75px margin-left: -75px + background: white &.personal +avatar-position(150px) &.company +avatar-position(150px, 320px) section.content padding: 1.5em 0 .hero-bio padding: 5em 0 2em text-align: center background: white h2 text-transform: uppercase margin-bottom: 0 .bio margin: 1em auto color: $secondary-font-color font: size: 1.05em weight: 300 .user-social li display: inline-block .social-link display: block width: 30px height: 30px padding: 5px background: $primary-color color: white text-align: center line-height: 1.3em border-radius: 50% margin: 0 .3em +transition(.3s) &:hover background: darken($primary-color, 15%) .projects [class*="column"]:last-child float: left
1
0.018519
1
0
dfc6c9fb1b099a06dea6b45328bb39248e8ad657
static/css/projects.css
static/css/projects.css
color: #333; } #project-selector a:hover { text-decoration: none; } #project-selector a:hover .project { border-color: #0091EA; } #project-selector .project { border-color: #ddd; padding: 24px 24px 24px 64px; position: relative; } #project-selector .project h4 { margin-top: 0; } #project-selector .project.selected { border-color: #0091EA; } #project-selector .project .status { position: absolute; left: 24px; }
color: #333; } #project-selector a:hover { text-decoration: none; } #project-selector a:hover .project { border-color: #0091EA; } #project-selector .project { border-color: #ddd; padding: 24px 24px 24px 64px; position: relative; } #project-selector .project h4 { font-weight: bold; margin-top: 0; } #project-selector .project.selected { border-color: #0091EA; } #project-selector .project .status { position: absolute; left: 24px; }
Tweak style to match top nav.
Tweak style to match top nav.
CSS
bsd-3-clause
healthchecks/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,iphoting/healthchecks,healthchecks/healthchecks
css
## Code Before: color: #333; } #project-selector a:hover { text-decoration: none; } #project-selector a:hover .project { border-color: #0091EA; } #project-selector .project { border-color: #ddd; padding: 24px 24px 24px 64px; position: relative; } #project-selector .project h4 { margin-top: 0; } #project-selector .project.selected { border-color: #0091EA; } #project-selector .project .status { position: absolute; left: 24px; } ## Instruction: Tweak style to match top nav. ## Code After: color: #333; } #project-selector a:hover { text-decoration: none; } #project-selector a:hover .project { border-color: #0091EA; } #project-selector .project { border-color: #ddd; padding: 24px 24px 24px 64px; position: relative; } #project-selector .project h4 { font-weight: bold; margin-top: 0; } #project-selector .project.selected { border-color: #0091EA; } #project-selector .project .status { position: absolute; left: 24px; }
color: #333; } #project-selector a:hover { text-decoration: none; } #project-selector a:hover .project { border-color: #0091EA; } #project-selector .project { border-color: #ddd; padding: 24px 24px 24px 64px; position: relative; } #project-selector .project h4 { + font-weight: bold; margin-top: 0; } #project-selector .project.selected { border-color: #0091EA; } #project-selector .project .status { position: absolute; left: 24px; }
1
0.034483
1
0
c6f65b20c2cd27b5d3884396bc976a5e85b4b35e
app/controllers/practiceit_controller.rb
app/controllers/practiceit_controller.rb
class PracticeitController < ApplicationController def index @log_messages = Array.new @error_messages = Array.new begin grades_spreadsheet = GradesSpreadsheet.new(ENV['BB_EMAIL'], ENV['BB_CRED'], ENV['BB_DOC_ID']) students = grades_spreadsheet.students_list students.each do |name, info| begin @log_messages << "Reading grades of #{name}" student_grades = Crawler.read_student_grades(info[:username], info[:credential]) info[:grades] = student_grades rescue Exception => msg $stderr.puts msg end end grades_spreadsheet.save_grades @log_messages << "Student grades saved successfully" rescue Exception => msg @error_messages << msg end end end
class PracticeitController < ApplicationController def index @log_messages = Array.new @error_messages = Array.new begin raise "You need to provide the doc_id of the google spreadsheet" if params[:doc_id].nil? grades_spreadsheet = GradesSpreadsheet.new(ENV['BB_EMAIL'], ENV['BB_CRED'], params[:doc_id]) students = grades_spreadsheet.students_list students.each do |name, info| begin @log_messages << "Reading grades of #{name}" student_grades = Crawler.read_student_grades(info[:username], info[:credential]) info[:grades] = student_grades rescue Exception => msg $stderr.puts msg end end grades_spreadsheet.save_grades @log_messages << "Student grades saved successfully" rescue Exception => msg @error_messages << msg end end end
Allow to receive the google spreadsheet doc id as a parameter in the controller
Allow to receive the google spreadsheet doc id as a parameter in the controller
Ruby
mit
mgdelcar/JavaTA,mgdelcar/JavaTA,mgdelcar/JavaTA,mgdelcar/JavaTA
ruby
## Code Before: class PracticeitController < ApplicationController def index @log_messages = Array.new @error_messages = Array.new begin grades_spreadsheet = GradesSpreadsheet.new(ENV['BB_EMAIL'], ENV['BB_CRED'], ENV['BB_DOC_ID']) students = grades_spreadsheet.students_list students.each do |name, info| begin @log_messages << "Reading grades of #{name}" student_grades = Crawler.read_student_grades(info[:username], info[:credential]) info[:grades] = student_grades rescue Exception => msg $stderr.puts msg end end grades_spreadsheet.save_grades @log_messages << "Student grades saved successfully" rescue Exception => msg @error_messages << msg end end end ## Instruction: Allow to receive the google spreadsheet doc id as a parameter in the controller ## Code After: class PracticeitController < ApplicationController def index @log_messages = Array.new @error_messages = Array.new begin raise "You need to provide the doc_id of the google spreadsheet" if params[:doc_id].nil? grades_spreadsheet = GradesSpreadsheet.new(ENV['BB_EMAIL'], ENV['BB_CRED'], params[:doc_id]) students = grades_spreadsheet.students_list students.each do |name, info| begin @log_messages << "Reading grades of #{name}" student_grades = Crawler.read_student_grades(info[:username], info[:credential]) info[:grades] = student_grades rescue Exception => msg $stderr.puts msg end end grades_spreadsheet.save_grades @log_messages << "Student grades saved successfully" rescue Exception => msg @error_messages << msg end end end
class PracticeitController < ApplicationController def index @log_messages = Array.new @error_messages = Array.new begin + raise "You need to provide the doc_id of the google spreadsheet" if params[:doc_id].nil? - grades_spreadsheet = GradesSpreadsheet.new(ENV['BB_EMAIL'], ENV['BB_CRED'], ENV['BB_DOC_ID']) ? ^^^ ^^^ ^^^^^^^ + grades_spreadsheet = GradesSpreadsheet.new(ENV['BB_EMAIL'], ENV['BB_CRED'], params[:doc_id]) ? ^^^^^^ ^^^^ ^^ students = grades_spreadsheet.students_list students.each do |name, info| begin @log_messages << "Reading grades of #{name}" student_grades = Crawler.read_student_grades(info[:username], info[:credential]) info[:grades] = student_grades rescue Exception => msg $stderr.puts msg end end grades_spreadsheet.save_grades @log_messages << "Student grades saved successfully" rescue Exception => msg @error_messages << msg end end end
3
0.09375
2
1
04710b967d7c71345105a9a03ff34de08979a3ad
.zuul.yaml
.zuul.yaml
- project: name: openstack/puppet-pacemaker templates: - puppet-openstack-check-jobs - puppet-openstack-module-unit-jobs check-tripleo: jobs: - tripleo-ci-centos-7-ovb-ha-oooq
- project: name: openstack/puppet-pacemaker templates: - puppet-openstack-check-jobs - puppet-openstack-module-unit-jobs
Remove RH1 OVB jobs from configuration
Remove RH1 OVB jobs from configuration Remove OVB RH1 jobs from configuration for this repo Related-Bug: #1744763 Change-Id: Ib8c65eda309356547ead0980223b6b8d4bc92a4b
YAML
apache-2.0
openstack/puppet-pacemaker,openstack/puppet-pacemaker,openstack/puppet-pacemaker,openstack/puppet-pacemaker
yaml
## Code Before: - project: name: openstack/puppet-pacemaker templates: - puppet-openstack-check-jobs - puppet-openstack-module-unit-jobs check-tripleo: jobs: - tripleo-ci-centos-7-ovb-ha-oooq ## Instruction: Remove RH1 OVB jobs from configuration Remove OVB RH1 jobs from configuration for this repo Related-Bug: #1744763 Change-Id: Ib8c65eda309356547ead0980223b6b8d4bc92a4b ## Code After: - project: name: openstack/puppet-pacemaker templates: - puppet-openstack-check-jobs - puppet-openstack-module-unit-jobs
- project: name: openstack/puppet-pacemaker templates: - puppet-openstack-check-jobs - puppet-openstack-module-unit-jobs - check-tripleo: - jobs: - - tripleo-ci-centos-7-ovb-ha-oooq
3
0.375
0
3
78e5423c87dfe4e778beea8462ada8da4b100649
tasks/ports.rake
tasks/ports.rake
require File.expand_path("mini_portile", File.dirname(__FILE__)) namespace :ports do directory "ports" file "ports/.libiconv.timestamp" => ["ports"] do |f| recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz"] # download, extract, configure, compile and install, puf! recipe.cook # generate timestamp touch f.name end desc "Compile libiconv support library" task :libiconv => ["ports/.libiconv.timestamp"] do recipe = MiniPortile.new("libiconv", "1.13.1") recipe.activate end end
require File.expand_path("mini_portile", File.dirname(__FILE__)) namespace :ports do directory "ports" file "ports/.libiconv.timestamp" => ["ports"] do |f| recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz"] # download, extract, configure, compile and install, puf! recipe.cook # generate timestamp touch f.name end desc "Compile libiconv support library" task :libiconv => ["ports/.libiconv.timestamp"] do recipe = MiniPortile.new("libiconv", "1.13.1") recipe.activate end file "ports/.freetds.timestamp" => ["ports", "ports:libiconv"] do |f| recipe = MiniPortile.new("freetds", "0.83.dev") recipe.files = ["http://ibiblio.org/pub/Linux/ALPHA/freetds/current/freetds-current.tgz"] recipe.cook touch f.name end task :freetds => ["ports/.freetds.timestamp"] do recipe = MiniPortile.new("freetds", "0.83.dev") recipe.activate end end
Build FreeTDS 0.83.dev using MiniPortile
Build FreeTDS 0.83.dev using MiniPortile
Ruby
mit
marshall-lee/tiny_tds,0x00evil/tiny_tds,marshall-lee/tiny_tds,FayeFang/tiny_tds,NCSAAthleticRecruiting/tiny_tds,dxw/tiny_tds,dxw/tiny_tds,0x00evil/tiny_tds,FayeFang/tiny_tds,NCSAAthleticRecruiting/tiny_tds
ruby
## Code Before: require File.expand_path("mini_portile", File.dirname(__FILE__)) namespace :ports do directory "ports" file "ports/.libiconv.timestamp" => ["ports"] do |f| recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz"] # download, extract, configure, compile and install, puf! recipe.cook # generate timestamp touch f.name end desc "Compile libiconv support library" task :libiconv => ["ports/.libiconv.timestamp"] do recipe = MiniPortile.new("libiconv", "1.13.1") recipe.activate end end ## Instruction: Build FreeTDS 0.83.dev using MiniPortile ## Code After: require File.expand_path("mini_portile", File.dirname(__FILE__)) namespace :ports do directory "ports" file "ports/.libiconv.timestamp" => ["ports"] do |f| recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz"] # download, extract, configure, compile and install, puf! recipe.cook # generate timestamp touch f.name end desc "Compile libiconv support library" task :libiconv => ["ports/.libiconv.timestamp"] do recipe = MiniPortile.new("libiconv", "1.13.1") recipe.activate end file "ports/.freetds.timestamp" => ["ports", "ports:libiconv"] do |f| recipe = MiniPortile.new("freetds", "0.83.dev") recipe.files = ["http://ibiblio.org/pub/Linux/ALPHA/freetds/current/freetds-current.tgz"] recipe.cook touch f.name end task :freetds => ["ports/.freetds.timestamp"] do recipe = MiniPortile.new("freetds", "0.83.dev") recipe.activate end end
require File.expand_path("mini_portile", File.dirname(__FILE__)) namespace :ports do directory "ports" file "ports/.libiconv.timestamp" => ["ports"] do |f| recipe = MiniPortile.new("libiconv", "1.13.1") recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz"] # download, extract, configure, compile and install, puf! recipe.cook # generate timestamp touch f.name end desc "Compile libiconv support library" task :libiconv => ["ports/.libiconv.timestamp"] do recipe = MiniPortile.new("libiconv", "1.13.1") recipe.activate end + + file "ports/.freetds.timestamp" => ["ports", "ports:libiconv"] do |f| + recipe = MiniPortile.new("freetds", "0.83.dev") + recipe.files = ["http://ibiblio.org/pub/Linux/ALPHA/freetds/current/freetds-current.tgz"] + recipe.cook + touch f.name + end + + task :freetds => ["ports/.freetds.timestamp"] do + recipe = MiniPortile.new("freetds", "0.83.dev") + recipe.activate + end end
12
0.571429
12
0
0ccf9b2d7c98c0da7210ac5eb4431d8586e305fe
app/reducers/ui.js
app/reducers/ui.js
/* global document */ import { Map } from 'immutable'; import { handleActions } from 'redux-actions'; import { SIDEBAR_TOGGLE, PANE_TOGGLE, PANE_RESIZE, SIDEBAR_RESIZE } from '../actions/ui'; import { FOLDER_OPEN } from '../actions/files'; const initialState = Map({ sidebarVisible: false, paneVisible: true, paneSize: ((document.documentElement.clientWidth - 250) / 2), sidebarSize: 250 }); const uiReducer = handleActions({ [SIDEBAR_TOGGLE]: state => (state.set('sidebarVisible', !state.get('sidebarVisible'))), [FOLDER_OPEN]: state => (state.set('sidebarVisible', true)), [PANE_TOGGLE]: state => (state.set('paneVisible', !state.get('paneVisible'))), [PANE_RESIZE]: (state, { payload }) => (state.set('paneSize', payload)), [SIDEBAR_RESIZE]: (state, { payload }) => (state.set('sidebarSize', payload)) }, initialState); export default uiReducer;
/* global document */ import { Map } from 'immutable'; import { handleActions } from 'redux-actions'; import { SIDEBAR_TOGGLE, PANE_TOGGLE, PANE_RESIZE, SIDEBAR_RESIZE } from '../actions/ui'; import { FOLDER_OPEN } from '../actions/files'; const initialState = Map({ sidebarVisible: false, paneVisible: true, paneSize: (document.documentElement.clientWidth / 2), sidebarSize: 250 }); const uiReducer = handleActions({ [SIDEBAR_TOGGLE]: (state) => { const sidebarVisible = !state.get('sidebarVisible'); const sidebarSize = state.get('sidebarSize'); let paneSize = state.get('paneSize'); if (sidebarVisible) { paneSize -= (sidebarSize / 2); } else { paneSize += (sidebarSize / 2); } return state.merge({ sidebarVisible, paneSize }); }, [FOLDER_OPEN]: state => (state.set('sidebarVisible', true)), [PANE_TOGGLE]: state => (state.set('paneVisible', !state.get('paneVisible'))), [PANE_RESIZE]: (state, { payload }) => (state.set('paneSize', payload)), [SIDEBAR_RESIZE]: (state, { payload }) => (state.set('sidebarSize', payload)) }, initialState); export default uiReducer;
Adjust the other pains on sidebar toggle
Adjust the other pains on sidebar toggle
JavaScript
bsd-3-clause
Mobelux/docdown-editor,Mobelux/docdown-editor
javascript
## Code Before: /* global document */ import { Map } from 'immutable'; import { handleActions } from 'redux-actions'; import { SIDEBAR_TOGGLE, PANE_TOGGLE, PANE_RESIZE, SIDEBAR_RESIZE } from '../actions/ui'; import { FOLDER_OPEN } from '../actions/files'; const initialState = Map({ sidebarVisible: false, paneVisible: true, paneSize: ((document.documentElement.clientWidth - 250) / 2), sidebarSize: 250 }); const uiReducer = handleActions({ [SIDEBAR_TOGGLE]: state => (state.set('sidebarVisible', !state.get('sidebarVisible'))), [FOLDER_OPEN]: state => (state.set('sidebarVisible', true)), [PANE_TOGGLE]: state => (state.set('paneVisible', !state.get('paneVisible'))), [PANE_RESIZE]: (state, { payload }) => (state.set('paneSize', payload)), [SIDEBAR_RESIZE]: (state, { payload }) => (state.set('sidebarSize', payload)) }, initialState); export default uiReducer; ## Instruction: Adjust the other pains on sidebar toggle ## Code After: /* global document */ import { Map } from 'immutable'; import { handleActions } from 'redux-actions'; import { SIDEBAR_TOGGLE, PANE_TOGGLE, PANE_RESIZE, SIDEBAR_RESIZE } from '../actions/ui'; import { FOLDER_OPEN } from '../actions/files'; const initialState = Map({ sidebarVisible: false, paneVisible: true, paneSize: (document.documentElement.clientWidth / 2), sidebarSize: 250 }); const uiReducer = handleActions({ [SIDEBAR_TOGGLE]: (state) => { const sidebarVisible = !state.get('sidebarVisible'); const sidebarSize = state.get('sidebarSize'); let paneSize = state.get('paneSize'); if (sidebarVisible) { paneSize -= (sidebarSize / 2); } else { paneSize += (sidebarSize / 2); } return state.merge({ sidebarVisible, paneSize }); }, [FOLDER_OPEN]: state => (state.set('sidebarVisible', true)), [PANE_TOGGLE]: state => (state.set('paneVisible', !state.get('paneVisible'))), [PANE_RESIZE]: (state, { payload }) => (state.set('paneSize', payload)), [SIDEBAR_RESIZE]: (state, { payload }) => (state.set('sidebarSize', payload)) }, initialState); export default uiReducer;
/* global document */ import { Map } from 'immutable'; import { handleActions } from 'redux-actions'; import { SIDEBAR_TOGGLE, PANE_TOGGLE, PANE_RESIZE, SIDEBAR_RESIZE } from '../actions/ui'; import { FOLDER_OPEN } from '../actions/files'; const initialState = Map({ sidebarVisible: false, paneVisible: true, - paneSize: ((document.documentElement.clientWidth - 250) / 2), ? - ------- + paneSize: (document.documentElement.clientWidth / 2), sidebarSize: 250 }); const uiReducer = handleActions({ - [SIDEBAR_TOGGLE]: state => (state.set('sidebarVisible', !state.get('sidebarVisible'))), + [SIDEBAR_TOGGLE]: (state) => { + const sidebarVisible = !state.get('sidebarVisible'); + const sidebarSize = state.get('sidebarSize'); + let paneSize = state.get('paneSize'); + if (sidebarVisible) { + paneSize -= (sidebarSize / 2); + } else { + paneSize += (sidebarSize / 2); + } + return state.merge({ sidebarVisible, paneSize }); + }, [FOLDER_OPEN]: state => (state.set('sidebarVisible', true)), [PANE_TOGGLE]: state => (state.set('paneVisible', !state.get('paneVisible'))), [PANE_RESIZE]: (state, { payload }) => (state.set('paneSize', payload)), [SIDEBAR_RESIZE]: (state, { payload }) => (state.set('sidebarSize', payload)) }, initialState); export default uiReducer;
14
0.636364
12
2
81a1946c55b57f9a301e8e7120872ee17897d8f8
macOS/README.md
macOS/README.md
- Install [Homebrew](http://brew.sh/) - [Change your hostname](https://apple.stackexchange.com/questions/66611/how-to-change-computer-name-so-terminal-displays-it-in-mac-os-x-mountain-lion) - `brew install git gnupg` - generate a new ssh key for each hostname: `ssh-keygen -t rsa -b 4096 -C "$USER@$(hostname)"` - `git clone git@github.com:f-f/dotfiles.git` - most likely also `visudo` and input `fabrizio ALL=(ALL) NOPASSWD: ALL` - `cd macOS && ./boostrap`
- Install [Homebrew](http://brew.sh/) - [Change your hostname](https://apple.stackexchange.com/questions/66611/how-to-change-computer-name-so-terminal-displays-it-in-mac-os-x-mountain-lion) - `brew install git gnupg` - generate a new ssh key for each hostname: `ssh-keygen -t rsa -b 4096 -C "$USER@$(hostname)" -f ~/.ssh/github` - `ssh-add .ssh/github` and insert passphrase - `git clone git@github.com:f-f/dotfiles.git` - most likely also `visudo` and input `fabrizio ALL=(ALL) NOPASSWD: ALL` - `cd macOS && ./boostrap`
Add better ssh intro for cloning
Add better ssh intro for cloning
Markdown
unlicense
f-f/dotfiles,f-f/dotfiles
markdown
## Code Before: - Install [Homebrew](http://brew.sh/) - [Change your hostname](https://apple.stackexchange.com/questions/66611/how-to-change-computer-name-so-terminal-displays-it-in-mac-os-x-mountain-lion) - `brew install git gnupg` - generate a new ssh key for each hostname: `ssh-keygen -t rsa -b 4096 -C "$USER@$(hostname)"` - `git clone git@github.com:f-f/dotfiles.git` - most likely also `visudo` and input `fabrizio ALL=(ALL) NOPASSWD: ALL` - `cd macOS && ./boostrap` ## Instruction: Add better ssh intro for cloning ## Code After: - Install [Homebrew](http://brew.sh/) - [Change your hostname](https://apple.stackexchange.com/questions/66611/how-to-change-computer-name-so-terminal-displays-it-in-mac-os-x-mountain-lion) - `brew install git gnupg` - generate a new ssh key for each hostname: `ssh-keygen -t rsa -b 4096 -C "$USER@$(hostname)" -f ~/.ssh/github` - `ssh-add .ssh/github` and insert passphrase - `git clone git@github.com:f-f/dotfiles.git` - most likely also `visudo` and input `fabrizio ALL=(ALL) NOPASSWD: ALL` - `cd macOS && ./boostrap`
- Install [Homebrew](http://brew.sh/) - [Change your hostname](https://apple.stackexchange.com/questions/66611/how-to-change-computer-name-so-terminal-displays-it-in-mac-os-x-mountain-lion) - `brew install git gnupg` - - generate a new ssh key for each hostname: `ssh-keygen -t rsa -b 4096 -C "$USER@$(hostname)"` + - generate a new ssh key for each hostname: `ssh-keygen -t rsa -b 4096 -C "$USER@$(hostname)" -f ~/.ssh/github` ? +++++++++++++++++ + - `ssh-add .ssh/github` and insert passphrase - `git clone git@github.com:f-f/dotfiles.git` - most likely also `visudo` and input `fabrizio ALL=(ALL) NOPASSWD: ALL` - `cd macOS && ./boostrap`
3
0.3
2
1
54f7ec479690494e9a685d8aafb358baf1e008ba
app/views/devise/registrations/edit.html.erb
app/views/devise/registrations/edit.html.erb
<div class="devise-form"> <h2>Edit Account</h2> <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %> <%= f.error_notification %> <%= f.input :password, :required => false, :hint => 'Leave blank to not change', :autocomplete => 'off' %> <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %> <%= f.input :current_password, :required => true, :hint => 'To confirm changes' %> <%= f.button :submit, 'Update', :class => 'btn-primary' %> <% end %> <h3>Cancel my account</h3> <p>Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %>.</p> <%= link_to 'Back', :back %> </div>
<div class="devise-form"> <h2>Edit Account</h2> <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %> <%= f.error_notification %> <%= f.input :password, :required => false, :hint => 'Leave blank to not change', :autocomplete => 'off' %> <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %> <%= f.input :current_password, :required => true, :hint => 'To confirm changes' %> <%= f.button :submit, 'Update', :class => 'btn-primary' %> <% end %> <h3>PayPal</h3> <%- if current_user.verified? -%> <p>PayPal Account on File</p> <%- else -%> <p><%= link_to "Verify and Link", specify_paypal_info_for_user_path(resource), :remote => true %> PayPal account</p> <%- end -%> <h3>Cancel my account</h3> <p>Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %></p> <%= link_to 'Back', :back %> </div>
Update Devise Edit Registration View for PayPal
Update Devise Edit Registration View for PayPal Add the verification link for the Devise registration edit view.
HTML+ERB
mit
jekhokie/IfSimply,jekhokie/IfSimply,jekhokie/IfSimply
html+erb
## Code Before: <div class="devise-form"> <h2>Edit Account</h2> <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %> <%= f.error_notification %> <%= f.input :password, :required => false, :hint => 'Leave blank to not change', :autocomplete => 'off' %> <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %> <%= f.input :current_password, :required => true, :hint => 'To confirm changes' %> <%= f.button :submit, 'Update', :class => 'btn-primary' %> <% end %> <h3>Cancel my account</h3> <p>Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %>.</p> <%= link_to 'Back', :back %> </div> ## Instruction: Update Devise Edit Registration View for PayPal Add the verification link for the Devise registration edit view. ## Code After: <div class="devise-form"> <h2>Edit Account</h2> <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %> <%= f.error_notification %> <%= f.input :password, :required => false, :hint => 'Leave blank to not change', :autocomplete => 'off' %> <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %> <%= f.input :current_password, :required => true, :hint => 'To confirm changes' %> <%= f.button :submit, 'Update', :class => 'btn-primary' %> <% end %> <h3>PayPal</h3> <%- if current_user.verified? -%> <p>PayPal Account on File</p> <%- else -%> <p><%= link_to "Verify and Link", specify_paypal_info_for_user_path(resource), :remote => true %> PayPal account</p> <%- end -%> <h3>Cancel my account</h3> <p>Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %></p> <%= link_to 'Back', :back %> </div>
<div class="devise-form"> <h2>Edit Account</h2> <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %> <%= f.error_notification %> <%= f.input :password, :required => false, :hint => 'Leave blank to not change', :autocomplete => 'off' %> <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %> <%= f.input :current_password, :required => true, :hint => 'To confirm changes' %> <%= f.button :submit, 'Update', :class => 'btn-primary' %> <% end %> + <h3>PayPal</h3> + + <%- if current_user.verified? -%> + <p>PayPal Account on File</p> + <%- else -%> + <p><%= link_to "Verify and Link", specify_paypal_info_for_user_path(resource), :remote => true %> PayPal account</p> + <%- end -%> + <h3>Cancel my account</h3> - <p>Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %>.</p> ? - + <p>Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %></p> <%= link_to 'Back', :back %> </div>
10
0.47619
9
1
772bedfd674a46e9050ec91cc4361c79dcf7a966
cpp/bibelwissenschaft/extract_names.sh
cpp/bibelwissenschaft/extract_names.sh
if [[ $# != 2 ]]; then echo "Usage $0 in_marc_file outfile_prefix" exit 1 fi MARC_FILE=$1 OUTFILE_PREFIX=$2 for bibwiss_type in "WiReLex" "WiBiLex"; do marc_grep $1 'if "TYP"=="'${bibwiss_type}'" extract "856u"' traditional | \ awk '{print $2}' | \ xargs -I '{}' /bin/sh -c $'./translate_url_multiple "$1" | \ jq -r \'.[] | [ if .tags[] then "Reference" else empty end, if .creators[] then "Author" else empty end, .url, .title, .tags[].tag, .creators[].lastName, .creators[].firstName] | to_entries | [.[].value] | @csv\'' _ '{}' \ > ${OUTFILE_PREFIX}_${bibwiss_type}.csv done
if [[ $# != 2 ]]; then echo "Usage $0 in_marc_file outfile_prefix" exit 1 fi MARC_FILE=$1 OUTFILE_PREFIX=$2 for bibwiss_type in "WiReLex" "WiBiLex"; do marc_grep $1 'if "TYP"=="'${bibwiss_type}'" extract "856u"' traditional | \ awk '{print $2}' | \ xargs -I '{}' /bin/sh -c $'./translate_url_multiple "$1" | \ jq -r \'.[] | [ if ((.tags | length) != 0) then "Reference" else empty end, if ((.creators | length) != 0) then "Author" else empty end, .url, .title, .tags[].tag, (.creators[] | del(.creatorType) | flatten | reverse |join(","))] | to_entries | [.[].value] | @csv\'' _ '{}' \ > ${OUTFILE_PREFIX}_${bibwiss_type}.csv done
Address duplications of line type and suppres creatorType
Address duplications of line type and suppres creatorType
Shell
agpl-3.0
ubtue/ub_tools,ubtue/ub_tools,ubtue/ub_tools,ubtue/ub_tools,ubtue/ub_tools,ubtue/ub_tools,ubtue/ub_tools,ubtue/ub_tools
shell
## Code Before: if [[ $# != 2 ]]; then echo "Usage $0 in_marc_file outfile_prefix" exit 1 fi MARC_FILE=$1 OUTFILE_PREFIX=$2 for bibwiss_type in "WiReLex" "WiBiLex"; do marc_grep $1 'if "TYP"=="'${bibwiss_type}'" extract "856u"' traditional | \ awk '{print $2}' | \ xargs -I '{}' /bin/sh -c $'./translate_url_multiple "$1" | \ jq -r \'.[] | [ if .tags[] then "Reference" else empty end, if .creators[] then "Author" else empty end, .url, .title, .tags[].tag, .creators[].lastName, .creators[].firstName] | to_entries | [.[].value] | @csv\'' _ '{}' \ > ${OUTFILE_PREFIX}_${bibwiss_type}.csv done ## Instruction: Address duplications of line type and suppres creatorType ## Code After: if [[ $# != 2 ]]; then echo "Usage $0 in_marc_file outfile_prefix" exit 1 fi MARC_FILE=$1 OUTFILE_PREFIX=$2 for bibwiss_type in "WiReLex" "WiBiLex"; do marc_grep $1 'if "TYP"=="'${bibwiss_type}'" extract "856u"' traditional | \ awk '{print $2}' | \ xargs -I '{}' /bin/sh -c $'./translate_url_multiple "$1" | \ jq -r \'.[] | [ if ((.tags | length) != 0) then "Reference" else empty end, if ((.creators | length) != 0) then "Author" else empty end, .url, .title, .tags[].tag, (.creators[] | del(.creatorType) | flatten | reverse |join(","))] | to_entries | [.[].value] | @csv\'' _ '{}' \ > ${OUTFILE_PREFIX}_${bibwiss_type}.csv done
if [[ $# != 2 ]]; then echo "Usage $0 in_marc_file outfile_prefix" exit 1 fi MARC_FILE=$1 OUTFILE_PREFIX=$2 for bibwiss_type in "WiReLex" "WiBiLex"; do marc_grep $1 'if "TYP"=="'${bibwiss_type}'" extract "856u"' traditional | \ awk '{print $2}' | \ xargs -I '{}' /bin/sh -c $'./translate_url_multiple "$1" | \ - jq -r \'.[] | [ if .tags[] then "Reference" else empty end, if .creators[] then "Author" else empty end, .url, .title, .tags[].tag, .creators[].lastName, .creators[].firstName] | to_entries | [.[].value] | @csv\'' _ '{}' \ + jq -r \'.[] | [ if ((.tags | length) != 0) then "Reference" else empty end, if ((.creators | length) != 0) then "Author" else empty end, .url, .title, .tags[].tag, (.creators[] | del(.creatorType) | flatten | reverse |join(","))] | to_entries | [.[].value] | @csv\'' _ '{}' \ > ${OUTFILE_PREFIX}_${bibwiss_type}.csv done
2
0.117647
1
1
4b4b7f6e80a3e53d77a37501b84e5c7b66b9e194
all.sh
all.sh
KERL_INSTALL_PATH=~/erlang KERL_RELEASES="r15b r15b01 r15b02 r15b03 r16b r16b01 r16b02 r16b03-1 17.0 maint master" make build-tests for rel in $KERL_RELEASES do echo echo " TESTING $rel" echo . $KERL_INSTALL_PATH/$rel/activate CT_OPTS="-label $rel" make tests done xdg-open logs/all_runs.html
KERL_INSTALL_PATH=~/erlang KERL_RELEASES="r15b r15b01 r15b02 r15b03 r16b r16b01 r16b02 r16b03-1 17.0 17.1.2" make build-ct-suites for rel in $KERL_RELEASES do echo echo " TESTING $rel" echo . $KERL_INSTALL_PATH/$rel/activate CT_OPTS="-label $rel" make tests done xdg-open logs/all_runs.html
Update list of tested releases
Update list of tested releases
Shell
isc
KrzysiekJ/cowlib,mihawk/cowlib,layerhq/cowlib
shell
## Code Before: KERL_INSTALL_PATH=~/erlang KERL_RELEASES="r15b r15b01 r15b02 r15b03 r16b r16b01 r16b02 r16b03-1 17.0 maint master" make build-tests for rel in $KERL_RELEASES do echo echo " TESTING $rel" echo . $KERL_INSTALL_PATH/$rel/activate CT_OPTS="-label $rel" make tests done xdg-open logs/all_runs.html ## Instruction: Update list of tested releases ## Code After: KERL_INSTALL_PATH=~/erlang KERL_RELEASES="r15b r15b01 r15b02 r15b03 r16b r16b01 r16b02 r16b03-1 17.0 17.1.2" make build-ct-suites for rel in $KERL_RELEASES do echo echo " TESTING $rel" echo . $KERL_INSTALL_PATH/$rel/activate CT_OPTS="-label $rel" make tests done xdg-open logs/all_runs.html
KERL_INSTALL_PATH=~/erlang - KERL_RELEASES="r15b r15b01 r15b02 r15b03 r16b r16b01 r16b02 r16b03-1 17.0 maint master" ? ^^^^^^^^^^^^ + KERL_RELEASES="r15b r15b01 r15b02 r15b03 r16b r16b01 r16b02 r16b03-1 17.0 17.1.2" ? ^^^^^^ - make build-tests ? -- + make build-ct-suites ? ++++++ for rel in $KERL_RELEASES do echo echo " TESTING $rel" echo . $KERL_INSTALL_PATH/$rel/activate CT_OPTS="-label $rel" make tests done xdg-open logs/all_runs.html
4
0.25
2
2
fe2627053875de2fc36e6e05e623038782281be1
README.md
README.md
This is the result of my spending the hack day at [Gophercon 2014](http://gophercon.com) playing with doing JIT from golang code. This respository contains several packages: - `gojit` Contains the basic JIT support -- allocate executable chunks of memory, and convert them into callable golang functions. - `amd64` Contains a simplistic amd64 assembler designed for use with `gojit` - `bf` Contains a just-in-time compiler for [Brainfuck](http://esolangs.org/wiki/Brainfuck) that demos the above packages - `gobf` Contains a binary that provides a command-line interface to `bf`
This is the result of my spending the hack day at [Gophercon 2014](http://gophercon.com) playing with doing JIT from golang code. This respository contains several packages: - `gojit` Contains the basic JIT support -- allocate executable chunks of memory, and convert them into callable golang functions. - `amd64` Contains a simplistic amd64 assembler designed for use with `gojit` - `bf` Contains a just-in-time compiler for [Brainfuck](http://esolangs.org/wiki/Brainfuck) that demos the above packages - `gobf` Contains a binary that provides a command-line interface to `bf` ## Using `gobf` can be fetched using go get github.com/nelhage/gojit/gobf And then run as `gobf file.bf`. For some built-in examples: $ gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/hello.bf Hello World! $ gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/hello.bf | gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/rot13.bf Uryyb Jbeyq! ## Portability This code has been tested on `darwin/amd64` and `linux/amd64`. It is extremely unlikely to work anywhere else.
Add notes on usage and portability.
Add notes on usage and portability.
Markdown
mit
nelhage/gojit
markdown
## Code Before: This is the result of my spending the hack day at [Gophercon 2014](http://gophercon.com) playing with doing JIT from golang code. This respository contains several packages: - `gojit` Contains the basic JIT support -- allocate executable chunks of memory, and convert them into callable golang functions. - `amd64` Contains a simplistic amd64 assembler designed for use with `gojit` - `bf` Contains a just-in-time compiler for [Brainfuck](http://esolangs.org/wiki/Brainfuck) that demos the above packages - `gobf` Contains a binary that provides a command-line interface to `bf` ## Instruction: Add notes on usage and portability. ## Code After: This is the result of my spending the hack day at [Gophercon 2014](http://gophercon.com) playing with doing JIT from golang code. This respository contains several packages: - `gojit` Contains the basic JIT support -- allocate executable chunks of memory, and convert them into callable golang functions. - `amd64` Contains a simplistic amd64 assembler designed for use with `gojit` - `bf` Contains a just-in-time compiler for [Brainfuck](http://esolangs.org/wiki/Brainfuck) that demos the above packages - `gobf` Contains a binary that provides a command-line interface to `bf` ## Using `gobf` can be fetched using go get github.com/nelhage/gojit/gobf And then run as `gobf file.bf`. For some built-in examples: $ gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/hello.bf Hello World! $ gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/hello.bf | gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/rot13.bf Uryyb Jbeyq! ## Portability This code has been tested on `darwin/amd64` and `linux/amd64`. It is extremely unlikely to work anywhere else.
This is the result of my spending the hack day at [Gophercon 2014](http://gophercon.com) playing with doing JIT from golang code. This respository contains several packages: - `gojit` Contains the basic JIT support -- allocate executable chunks of memory, and convert them into callable golang functions. - `amd64` Contains a simplistic amd64 assembler designed for use with `gojit` - `bf` Contains a just-in-time compiler for [Brainfuck](http://esolangs.org/wiki/Brainfuck) that demos the above packages - `gobf` Contains a binary that provides a command-line interface to `bf` + + + ## Using + + `gobf` can be fetched using + + go get github.com/nelhage/gojit/gobf + + And then run as `gobf file.bf`. For some built-in examples: + + $ gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/hello.bf + Hello World! + $ gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/hello.bf | gobf $GOPATH/src/github.com/nelhage/gojit/bf/test/rot13.bf + Uryyb Jbeyq! + + ## Portability + + This code has been tested on `darwin/amd64` and `linux/amd64`. It is + extremely unlikely to work anywhere else.
19
0.826087
19
0
07d72809044a86058ec27fa51ca3f0ade5a89b73
lib/transaction_logger.rb
lib/transaction_logger.rb
module Yp class TransactionLogger class << self FILTERED_KEYS = %w(cardNumber cardCVV cardExpiryMonth cardExpiryYear) def log_request(params) info 'Sending transaction', params end def log_response(params) info 'Response received', params end private def info(str, params=nil) Yp.logger.info("#{format_message(str)} #{format_params(params)}") end def format_message(str) "[YP] #{str}" end def format_params(params) " with params #{filter_card_params(params).to_s}" end def filter_card_params(hash) hash.reduce({}) { |memo, param| memo.merge(apply_filter(*param)) } end def apply_filter(k, v) { k => FILTERED_KEYS.include?(k.to_s) ? '[FILTERED]' : v } end end end end
module Yp class TransactionLogger class << self FILTERED_KEYS = %w(cardNumber cardCVV cardExpiryMonth cardExpiryYear) def log_request(params) info 'Sending transaction', params end def log_response(params) info 'Response received', params end def info(str, params=nil) Yp.logger.info(format(str, params)) end def error(str) Yp.logger.error(format_message(str)) end def fatal(str) Yp.logger.fatal(format_message(str)) end private def format(str, params) "#{format_message(str)} #{format_params(params)}" end def format_message(str) "[YP] #{str}" end def format_params(params) " with params #{filter_card_params(params).to_s}" unless params.nil? end def filter_card_params(hash) hash.reduce({}) { |memo, param| memo.merge(apply_filter(*param)) } end def apply_filter(k, v) { k => FILTERED_KEYS.include?(k.to_s) ? '[FILTERED]' : v } end end end end
Add pubic methods to transaction logger
Add pubic methods to transaction logger
Ruby
mit
andytango/yp-ruby,andytango/yp-ruby
ruby
## Code Before: module Yp class TransactionLogger class << self FILTERED_KEYS = %w(cardNumber cardCVV cardExpiryMonth cardExpiryYear) def log_request(params) info 'Sending transaction', params end def log_response(params) info 'Response received', params end private def info(str, params=nil) Yp.logger.info("#{format_message(str)} #{format_params(params)}") end def format_message(str) "[YP] #{str}" end def format_params(params) " with params #{filter_card_params(params).to_s}" end def filter_card_params(hash) hash.reduce({}) { |memo, param| memo.merge(apply_filter(*param)) } end def apply_filter(k, v) { k => FILTERED_KEYS.include?(k.to_s) ? '[FILTERED]' : v } end end end end ## Instruction: Add pubic methods to transaction logger ## Code After: module Yp class TransactionLogger class << self FILTERED_KEYS = %w(cardNumber cardCVV cardExpiryMonth cardExpiryYear) def log_request(params) info 'Sending transaction', params end def log_response(params) info 'Response received', params end def info(str, params=nil) Yp.logger.info(format(str, params)) end def error(str) Yp.logger.error(format_message(str)) end def fatal(str) Yp.logger.fatal(format_message(str)) end private def format(str, params) "#{format_message(str)} #{format_params(params)}" end def format_message(str) "[YP] #{str}" end def format_params(params) " with params #{filter_card_params(params).to_s}" unless params.nil? end def filter_card_params(hash) hash.reduce({}) { |memo, param| memo.merge(apply_filter(*param)) } end def apply_filter(k, v) { k => FILTERED_KEYS.include?(k.to_s) ? '[FILTERED]' : v } end end end end
module Yp class TransactionLogger class << self FILTERED_KEYS = %w(cardNumber cardCVV cardExpiryMonth cardExpiryYear) def log_request(params) info 'Sending transaction', params end def log_response(params) info 'Response received', params end + def info(str, params=nil) + Yp.logger.info(format(str, params)) + end + + def error(str) + Yp.logger.error(format_message(str)) + end + + def fatal(str) + Yp.logger.fatal(format_message(str)) + end + private - def info(str, params=nil) ? -- ---- + def format(str, params) ? ++++ - Yp.logger.info("#{format_message(str)} #{format_params(params)}") ? --------------- - + "#{format_message(str)} #{format_params(params)}" end def format_message(str) "[YP] #{str}" end def format_params(params) - " with params #{filter_card_params(params).to_s}" + " with params #{filter_card_params(params).to_s}" unless params.nil? ? +++++++++++++++++++ end def filter_card_params(hash) hash.reduce({}) { |memo, param| memo.merge(apply_filter(*param)) } end def apply_filter(k, v) { k => FILTERED_KEYS.include?(k.to_s) ? '[FILTERED]' : v } end end end end
18
0.461538
15
3
6996df37e2489b2beabea65feb597cebffcf2563
common/filesystem/src/main/java/roart/common/filesystem/FileSystemMessageResult.java
common/filesystem/src/main/java/roart/common/filesystem/FileSystemMessageResult.java
package roart.common.filesystem; import java.util.Map; import roart.common.inmemory.model.InmemoryMessage; import roart.common.model.FileObject; public class FileSystemMessageResult extends FileSystemResult { public Map<FileObject, InmemoryMessage> message; }
package roart.common.filesystem; import java.util.Map; import roart.common.inmemory.model.InmemoryMessage; import roart.common.model.FileObject; public class FileSystemMessageResult extends FileSystemResult { public Map<String, InmemoryMessage> message; }
Read file batch transfer (I38).
Read file batch transfer (I38).
Java
agpl-3.0
rroart/aether,rroart/aether,rroart/aether,rroart/aether,rroart/aether
java
## Code Before: package roart.common.filesystem; import java.util.Map; import roart.common.inmemory.model.InmemoryMessage; import roart.common.model.FileObject; public class FileSystemMessageResult extends FileSystemResult { public Map<FileObject, InmemoryMessage> message; } ## Instruction: Read file batch transfer (I38). ## Code After: package roart.common.filesystem; import java.util.Map; import roart.common.inmemory.model.InmemoryMessage; import roart.common.model.FileObject; public class FileSystemMessageResult extends FileSystemResult { public Map<String, InmemoryMessage> message; }
package roart.common.filesystem; import java.util.Map; import roart.common.inmemory.model.InmemoryMessage; import roart.common.model.FileObject; public class FileSystemMessageResult extends FileSystemResult { - public Map<FileObject, InmemoryMessage> message; ? ^ ^^^^^^^^ + public Map<String, InmemoryMessage> message; ? ^^^ ^^ }
2
0.2
1
1
435e5a9b440010bb9c9d6ac0634c63ca2c914228
data_filter_example/README.md
data_filter_example/README.md
This directory contains a sample server that uses OPA's Compile API to perform data filtering and authorization. When the server receives API requests it asks OPA for a set of conditions to apply to the SQL query that serves the request. The server itself is implemented in Python using Flask asnd and sqlite3. ## Install Install the dependencies into a virtualenv: ```bash virtualenv env source env/bin/activate pip install -r requirements.txt pip install -e . ``` ## Testing Open a new window and run OPA: ```bash opa run -s example.rego ``` Start the server: ``` source env/bin/activate python data_filter_example/server.py ``` The server listens on `:5000` and serves an index page by default. ## Development To run the integration tests, start OPA in another window (`opa run -s`) and then: ```bash pytest . ```
This directory contains a sample server that uses OPA's Compile API to perform data filtering and authorization. When the server receives API requests it asks OPA for a set of conditions to apply to the SQL query that serves the request. The server itself is implemented in Python using Flask and and sqlite3. ## Status The Rego → SQL translation implemented in this directory should be considered **experimental** and is only tested against sqlite. ## Install Install the dependencies into a virtualenv: ```bash virtualenv env source env/bin/activate pip install -r requirements.txt pip install -e . ``` ## Testing Open a new window and run OPA: ```bash opa run -s example.rego ``` Start the server: ``` source env/bin/activate python data_filter_example/server.py ``` The server listens on `:5000` and serves an index page by default. ## Development To run the integration tests, start OPA in another window (`opa run -s`) and then: ```bash pytest . ```
Add note about experimental status of SQL translation
Add note about experimental status of SQL translation Signed-off-by: Torin Sandall <933af5bec0bc58056526d55ca6c7b45fcf14cc48@gmail.com>
Markdown
apache-2.0
open-policy-agent/contrib,tsandall/contrib,tsandall/contrib,tsandall/contrib,tsandall/contrib,open-policy-agent/contrib,open-policy-agent/contrib,tsandall/contrib,tsandall/contrib,open-policy-agent/contrib,open-policy-agent/contrib,open-policy-agent/contrib,open-policy-agent/contrib,open-policy-agent/contrib,tsandall/contrib
markdown
## Code Before: This directory contains a sample server that uses OPA's Compile API to perform data filtering and authorization. When the server receives API requests it asks OPA for a set of conditions to apply to the SQL query that serves the request. The server itself is implemented in Python using Flask asnd and sqlite3. ## Install Install the dependencies into a virtualenv: ```bash virtualenv env source env/bin/activate pip install -r requirements.txt pip install -e . ``` ## Testing Open a new window and run OPA: ```bash opa run -s example.rego ``` Start the server: ``` source env/bin/activate python data_filter_example/server.py ``` The server listens on `:5000` and serves an index page by default. ## Development To run the integration tests, start OPA in another window (`opa run -s`) and then: ```bash pytest . ``` ## Instruction: Add note about experimental status of SQL translation Signed-off-by: Torin Sandall <933af5bec0bc58056526d55ca6c7b45fcf14cc48@gmail.com> ## Code After: This directory contains a sample server that uses OPA's Compile API to perform data filtering and authorization. When the server receives API requests it asks OPA for a set of conditions to apply to the SQL query that serves the request. The server itself is implemented in Python using Flask and and sqlite3. ## Status The Rego → SQL translation implemented in this directory should be considered **experimental** and is only tested against sqlite. ## Install Install the dependencies into a virtualenv: ```bash virtualenv env source env/bin/activate pip install -r requirements.txt pip install -e . ``` ## Testing Open a new window and run OPA: ```bash opa run -s example.rego ``` Start the server: ``` source env/bin/activate python data_filter_example/server.py ``` The server listens on `:5000` and serves an index page by default. ## Development To run the integration tests, start OPA in another window (`opa run -s`) and then: ```bash pytest . ```
This directory contains a sample server that uses OPA's Compile API to perform data filtering and authorization. When the server receives API requests it asks OPA for a set of conditions to apply to the SQL query that serves the request. - The server itself is implemented in Python using Flask asnd and sqlite3. ? - --------- + The server itself is implemented in Python using Flask and and + sqlite3. + + ## Status + + The Rego → SQL translation implemented in this directory should be + considered **experimental** and is only tested against sqlite. ## Install Install the dependencies into a virtualenv: ```bash virtualenv env source env/bin/activate pip install -r requirements.txt pip install -e . ``` ## Testing Open a new window and run OPA: ```bash opa run -s example.rego ``` Start the server: ``` source env/bin/activate python data_filter_example/server.py ``` The server listens on `:5000` and serves an index page by default. ## Development To run the integration tests, start OPA in another window (`opa run -s`) and then: ```bash pytest . ```
8
0.186047
7
1
bbc547b7bc4a6b7a2f506f7cf48e0b005f28f447
resources/css/panelist-list.css
resources/css/panelist-list.css
.panelist-list { lost-utility: clearfix; width: 80%; margin: auto; &__panelist { margin: 0; padding: 20px; @media only screen and (min-width : 400px) { lost-column: 1/2; } @media only screen and (min-width : 600px) { lost-column: 1/3; } @media only screen and (min-width : 800px) { lost-column: 1/4; } } }
.panelist-list { lost-utility: clearfix; width: 80%; margin: auto; &__panelist { margin: 0; margin-bottom: 30px; @media only screen and (min-width : 400px) { lost-column: 1/2; } @media only screen and (min-width : 600px) { lost-column: 1/3; } @media only screen and (min-width : 800px) { lost-column: 1/4; } } }
Add some margin bottom to panelist headshots
Add some margin bottom to panelist headshots
CSS
mit
javascriptair/site,javascriptair/site,javascriptair/site
css
## Code Before: .panelist-list { lost-utility: clearfix; width: 80%; margin: auto; &__panelist { margin: 0; padding: 20px; @media only screen and (min-width : 400px) { lost-column: 1/2; } @media only screen and (min-width : 600px) { lost-column: 1/3; } @media only screen and (min-width : 800px) { lost-column: 1/4; } } } ## Instruction: Add some margin bottom to panelist headshots ## Code After: .panelist-list { lost-utility: clearfix; width: 80%; margin: auto; &__panelist { margin: 0; margin-bottom: 30px; @media only screen and (min-width : 400px) { lost-column: 1/2; } @media only screen and (min-width : 600px) { lost-column: 1/3; } @media only screen and (min-width : 800px) { lost-column: 1/4; } } }
.panelist-list { lost-utility: clearfix; width: 80%; margin: auto; &__panelist { margin: 0; - padding: 20px; + margin-bottom: 30px; @media only screen and (min-width : 400px) { lost-column: 1/2; } @media only screen and (min-width : 600px) { lost-column: 1/3; } @media only screen and (min-width : 800px) { lost-column: 1/4; } } }
2
0.083333
1
1
3fe3e4852e64615632778a129bd5baa7cde8a3e3
README.md
README.md
TODO: Write a gem description ## Installation Add this line to your application's Gemfile: gem 'update_in_batches' And then execute: $ bundle Or install it yourself as: $ gem install update_in_batches ## Usage TODO: Write usage instructions here ## Contributing 1. Fork it ( http://github.com/<my-github-username>/update_in_batches/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
This gem adds a class/scope method to your ActiveRecord models, that gives you the same functionality of `update_all` but using the batching behavior of `find_in_batches`. It is a short cut for: ```ruby Model.find_in_batches do |batch| ids = batch.map(&:id) Model.where(id: ids).update_all end ``` ## Installation Add this line to your application's Gemfile: gem 'update_in_batches' And then execute: $ bundle Or install it yourself as: $ gem install update_in_batches ## Usage ```ruby class Project < ActiveRecord::Base end Project.where(active: true).update_in_batches(active: false) ``` ## Contributing 1. Fork it ( http://github.com/<my-github-username>/update_in_batches/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Update Readme with a description and usage
Update Readme with a description and usage
Markdown
mit
jakeonrails/update_in_batches
markdown
## Code Before: TODO: Write a gem description ## Installation Add this line to your application's Gemfile: gem 'update_in_batches' And then execute: $ bundle Or install it yourself as: $ gem install update_in_batches ## Usage TODO: Write usage instructions here ## Contributing 1. Fork it ( http://github.com/<my-github-username>/update_in_batches/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## Instruction: Update Readme with a description and usage ## Code After: This gem adds a class/scope method to your ActiveRecord models, that gives you the same functionality of `update_all` but using the batching behavior of `find_in_batches`. It is a short cut for: ```ruby Model.find_in_batches do |batch| ids = batch.map(&:id) Model.where(id: ids).update_all end ``` ## Installation Add this line to your application's Gemfile: gem 'update_in_batches' And then execute: $ bundle Or install it yourself as: $ gem install update_in_batches ## Usage ```ruby class Project < ActiveRecord::Base end Project.where(active: true).update_in_batches(active: false) ``` ## Contributing 1. Fork it ( http://github.com/<my-github-username>/update_in_batches/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
- TODO: Write a gem description + This gem adds a class/scope method to your ActiveRecord models, that gives you the same functionality of `update_all` but using the batching behavior of `find_in_batches`. + + It is a short cut for: + + ```ruby + Model.find_in_batches do |batch| + ids = batch.map(&:id) + Model.where(id: ids).update_all + end + ``` ## Installation Add this line to your application's Gemfile: gem 'update_in_batches' And then execute: $ bundle Or install it yourself as: $ gem install update_in_batches ## Usage - TODO: Write usage instructions here + ```ruby + class Project < ActiveRecord::Base + end + + Project.where(active: true).update_in_batches(active: false) + ``` ## Contributing 1. Fork it ( http://github.com/<my-github-username>/update_in_batches/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
18
0.642857
16
2