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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5233d260f5b2cc8c099e0966613e59db2ae2d044 | app/mailers/hair_on_fire_mailer.rb | app/mailers/hair_on_fire_mailer.rb | class HairOnFireMailer < ApplicationMailer
default from: "Hair on Fire <metasmoke@erwaysoftware.com>"
def smokey_down_email(smoke_detector)
@last_ping_date = smoke_detector.last_ping
@location = smoke_detector.location
mail(to: smoke_detector.user.email, cc: "undo@erwaysoftware.com; hello@artofcode.co.uk", subject: "[SmokeDetector] status DOWN (last seen #{@last_ping_date})")
end
end
| class HairOnFireMailer < ApplicationMailer
default from: "Hair on Fire <metasmoke@erwaysoftware.com>"
def smokey_down_email(smoke_detector)
@last_ping_date = smoke_detector.last_ping
@location = smoke_detector.location
mail(to: smoke_detector.user.email, cc: "teward@ubuntu.com; undo@erwaysoftware.com; hello@artofcode.co.uk", subject: "[SmokeDetector] status DOWN (last seen #{@last_ping_date})")
end
end
| Add Thomas to hair-on-fire mailer. | Add Thomas to hair-on-fire mailer.
https://chat.stackexchange.com/transcript/message/34885327#34885327
| Ruby | cc0-1.0 | j-f1/forked-metasmoke,SulphurDioxide/metasmoke,Charcoal-SE/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,SulphurDioxide/metasmoke,SulphurDioxide/metasmoke,j-f1/forked-metasmoke,angussidney/metasmoke,j-f1/forked-metasmoke,angussidney/metasmoke,angussidney/metasmoke,j-f1/forked-metasmoke,Charcoal-SE/metasmoke | ruby | ## Code Before:
class HairOnFireMailer < ApplicationMailer
default from: "Hair on Fire <metasmoke@erwaysoftware.com>"
def smokey_down_email(smoke_detector)
@last_ping_date = smoke_detector.last_ping
@location = smoke_detector.location
mail(to: smoke_detector.user.email, cc: "undo@erwaysoftware.com; hello@artofcode.co.uk", subject: "[SmokeDetector] status DOWN (last seen #{@last_ping_date})")
end
end
## Instruction:
Add Thomas to hair-on-fire mailer.
https://chat.stackexchange.com/transcript/message/34885327#34885327
## Code After:
class HairOnFireMailer < ApplicationMailer
default from: "Hair on Fire <metasmoke@erwaysoftware.com>"
def smokey_down_email(smoke_detector)
@last_ping_date = smoke_detector.last_ping
@location = smoke_detector.location
mail(to: smoke_detector.user.email, cc: "teward@ubuntu.com; undo@erwaysoftware.com; hello@artofcode.co.uk", subject: "[SmokeDetector] status DOWN (last seen #{@last_ping_date})")
end
end
| class HairOnFireMailer < ApplicationMailer
default from: "Hair on Fire <metasmoke@erwaysoftware.com>"
def smokey_down_email(smoke_detector)
@last_ping_date = smoke_detector.last_ping
@location = smoke_detector.location
- mail(to: smoke_detector.user.email, cc: "undo@erwaysoftware.com; hello@artofcode.co.uk", subject: "[SmokeDetector] status DOWN (last seen #{@last_ping_date})")
+ mail(to: smoke_detector.user.email, cc: "teward@ubuntu.com; undo@erwaysoftware.com; hello@artofcode.co.uk", subject: "[SmokeDetector] status DOWN (last seen #{@last_ping_date})")
? +++++++++++++++++++
end
end | 2 | 0.2 | 1 | 1 |
9e18b79b6fc751e4acbcb5c3bafd9ed0a128bf8d | ci/docker/boshcpi.s3cli/Dockerfile | ci/docker/boshcpi.s3cli/Dockerfile | FROM ubuntu:latest
RUN locale-gen en_US.UTF-8
RUN dpkg-reconfigure locales
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get update; apt-get -y upgrade; apt-get clean
RUN apt-get install -y git curl python; apt-get clean
RUN cd /tmp && \
curl -O -L https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go*.tar.gz && \
rm go*.tar.gz
ENV PATH /usr/local/go/bin:$PATH
RUN apt-get install -y python-dateutil python-magic; apt-get clean
RUN cd /tmp && \
git clone https://github.com/sstephenson/bats.git && \
cd bats && \
./install.sh /usr/local && \
cd / && \
rm -rf /tmp/bats
RUN cd /tmp && \
curl -O -L https://github.com/s3tools/s3cmd/archive/v1.6.0.tar.gz && \
tar xzf v1.6.0.tar.gz && \
cd s3cmd-1.6.0 && \
cp -R s3cmd S3 /usr/local/bin && \
cd /tmp && \
rm -rf s3cmd-1.6.0/ v1.6.0.tar.gz
| FROM ubuntu:latest
RUN locale-gen en_US.UTF-8
RUN dpkg-reconfigure locales
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get update; apt-get -y upgrade; apt-get clean
RUN apt-get install -y git curl python uuid-runtime; apt-get clean
RUN cd /tmp && \
curl -O -L https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go*.tar.gz && \
rm go*.tar.gz
ENV PATH /usr/local/go/bin:$PATH
RUN apt-get install -y python-dateutil python-magic; apt-get clean
RUN cd /tmp && \
git clone https://github.com/sstephenson/bats.git && \
cd bats && \
./install.sh /usr/local && \
cd / && \
rm -rf /tmp/bats
RUN cd /tmp && \
curl -O -L https://github.com/s3tools/s3cmd/archive/v1.6.0.tar.gz && \
tar xzf v1.6.0.tar.gz && \
cd s3cmd-1.6.0 && \
cp -R s3cmd S3 /usr/local/bin && \
cd /tmp && \
rm -rf s3cmd-1.6.0/ v1.6.0.tar.gz
| Make `uuidgen` available in the Garden container. | Make `uuidgen` available in the Garden container.
[#105489488](https://www.pivotaltracker.com/story/show/105489488)
Signed-off-by: Jonathan Barnes <bc7add126c2dbb8382bf1c28ac262b9363a32706@pivotal.io>
| unknown | mit | pivotal-golang/s3cli,pivotal-golang/s3cli,pivotal-golang/s3cli,pivotal-golang/s3cli | unknown | ## Code Before:
FROM ubuntu:latest
RUN locale-gen en_US.UTF-8
RUN dpkg-reconfigure locales
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get update; apt-get -y upgrade; apt-get clean
RUN apt-get install -y git curl python; apt-get clean
RUN cd /tmp && \
curl -O -L https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go*.tar.gz && \
rm go*.tar.gz
ENV PATH /usr/local/go/bin:$PATH
RUN apt-get install -y python-dateutil python-magic; apt-get clean
RUN cd /tmp && \
git clone https://github.com/sstephenson/bats.git && \
cd bats && \
./install.sh /usr/local && \
cd / && \
rm -rf /tmp/bats
RUN cd /tmp && \
curl -O -L https://github.com/s3tools/s3cmd/archive/v1.6.0.tar.gz && \
tar xzf v1.6.0.tar.gz && \
cd s3cmd-1.6.0 && \
cp -R s3cmd S3 /usr/local/bin && \
cd /tmp && \
rm -rf s3cmd-1.6.0/ v1.6.0.tar.gz
## Instruction:
Make `uuidgen` available in the Garden container.
[#105489488](https://www.pivotaltracker.com/story/show/105489488)
Signed-off-by: Jonathan Barnes <bc7add126c2dbb8382bf1c28ac262b9363a32706@pivotal.io>
## Code After:
FROM ubuntu:latest
RUN locale-gen en_US.UTF-8
RUN dpkg-reconfigure locales
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get update; apt-get -y upgrade; apt-get clean
RUN apt-get install -y git curl python uuid-runtime; apt-get clean
RUN cd /tmp && \
curl -O -L https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go*.tar.gz && \
rm go*.tar.gz
ENV PATH /usr/local/go/bin:$PATH
RUN apt-get install -y python-dateutil python-magic; apt-get clean
RUN cd /tmp && \
git clone https://github.com/sstephenson/bats.git && \
cd bats && \
./install.sh /usr/local && \
cd / && \
rm -rf /tmp/bats
RUN cd /tmp && \
curl -O -L https://github.com/s3tools/s3cmd/archive/v1.6.0.tar.gz && \
tar xzf v1.6.0.tar.gz && \
cd s3cmd-1.6.0 && \
cp -R s3cmd S3 /usr/local/bin && \
cd /tmp && \
rm -rf s3cmd-1.6.0/ v1.6.0.tar.gz
| FROM ubuntu:latest
RUN locale-gen en_US.UTF-8
RUN dpkg-reconfigure locales
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get update; apt-get -y upgrade; apt-get clean
- RUN apt-get install -y git curl python; apt-get clean
+ RUN apt-get install -y git curl python uuid-runtime; apt-get clean
? +++++++++++++
RUN cd /tmp && \
curl -O -L https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go*.tar.gz && \
rm go*.tar.gz
ENV PATH /usr/local/go/bin:$PATH
RUN apt-get install -y python-dateutil python-magic; apt-get clean
RUN cd /tmp && \
git clone https://github.com/sstephenson/bats.git && \
cd bats && \
./install.sh /usr/local && \
cd / && \
rm -rf /tmp/bats
RUN cd /tmp && \
curl -O -L https://github.com/s3tools/s3cmd/archive/v1.6.0.tar.gz && \
tar xzf v1.6.0.tar.gz && \
cd s3cmd-1.6.0 && \
cp -R s3cmd S3 /usr/local/bin && \
cd /tmp && \
rm -rf s3cmd-1.6.0/ v1.6.0.tar.gz | 2 | 0.060606 | 1 | 1 |
21f18eb3221dcb26c41bd7ae3ec946aaabff3e33 | templates/system/modules/validate-site/themes/base/js/validationbox.js | templates/system/modules/validate-site/themes/base/js/validationbox.js | /*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $validationBox = (function() {
$.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) {
$.colorbox({
width : '450px',
maxHeight : '85%',
speed : 500,
scrolling : false,
html : $(oData).find('#box_block')
})
})
});
$validationBox();
| /*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $validationBox = (function() {
$.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) {
$.colorbox({
width : '100%',
maxWidth : '450px',
maxHeight : '85%',
speed : 500,
scrolling : false,
html : $(oData).find('#box_block')
})
})
});
$validationBox();
| Fix Validate Site popup when open on mobile phones | Fix Validate Site popup when open on mobile phones
| JavaScript | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | javascript | ## Code Before:
/*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $validationBox = (function() {
$.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) {
$.colorbox({
width : '450px',
maxHeight : '85%',
speed : 500,
scrolling : false,
html : $(oData).find('#box_block')
})
})
});
$validationBox();
## Instruction:
Fix Validate Site popup when open on mobile phones
## Code After:
/*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $validationBox = (function() {
$.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) {
$.colorbox({
width : '100%',
maxWidth : '450px',
maxHeight : '85%',
speed : 500,
scrolling : false,
html : $(oData).find('#box_block')
})
})
});
$validationBox();
| /*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $validationBox = (function() {
$.get(pH7Url.base + 'validate-site/main/validationbox', function(oData) {
$.colorbox({
- width : '450px',
? ^^ ^^
+ width : '100%',
? ^ ^^
+ maxWidth : '450px',
maxHeight : '85%',
- speed : 500,
+ speed : 500,
? +
- scrolling : false,
+ scrolling : false,
? +
- html : $(oData).find('#box_block')
+ html : $(oData).find('#box_block')
? +
})
})
});
$validationBox(); | 9 | 0.473684 | 5 | 4 |
42d5e86775d2e3d368d150bdc16347075cc59384 | _sass/mcgriddle/mixins/_columns.scss | _sass/mcgriddle/mixins/_columns.scss | // ==================================================
// Columns
// ==================================================
@mixin columns($_columns: 1, $_position: default, $_max-width: false) {
@if $_max-width == max or $_max-width == true {
$_column-width: column-width($_columns, false);
width: 100%;
max-width: $_column-width;
}
@else { // $_max-width == default
width: column-width($_columns);
}
@if $_position == center {
margin-left: auto;
margin-right: auto;
}
@else {
$_float: left;
$_margin: right;
@if $grid-rtl == true {
$_float: right;
$_margin: left;
}
@if $_position != last and $grid-collapse == false {
margin-#{$_margin}: gutter-width();
}
@if $grid-flexbox == false {
float: $_float;
}
}
}
| // ==================================================
// Columns
// ==================================================
@mixin columns($_columns: 1, $_position: default, $_max-width: false) {
@if $_max-width == max or $_max-width == true {
$_column-width: column-width($_columns, false);
@if $grid-flexbox == true {
width: 100%;
}
max-width: $_column-width;
}
@else { // $_max-width == default
width: column-width($_columns);
}
@if $_position == center {
margin-left: auto;
margin-right: auto;
}
@else {
$_float: left;
$_margin: right;
@if $grid-rtl == true {
$_float: right;
$_margin: left;
}
@if $_position != last and $grid-collapse == false {
margin-#{$_margin}: gutter-width();
}
@if $grid-flexbox == false {
float: $_float;
}
}
}
| Adjust column mixin to only include width: 100%; when flexbox is enabled. | Adjust column mixin to only include width: 100%; when flexbox is enabled.
| SCSS | mit | jonsuh/mcgriddle,jonsuh/mcgriddle | scss | ## Code Before:
// ==================================================
// Columns
// ==================================================
@mixin columns($_columns: 1, $_position: default, $_max-width: false) {
@if $_max-width == max or $_max-width == true {
$_column-width: column-width($_columns, false);
width: 100%;
max-width: $_column-width;
}
@else { // $_max-width == default
width: column-width($_columns);
}
@if $_position == center {
margin-left: auto;
margin-right: auto;
}
@else {
$_float: left;
$_margin: right;
@if $grid-rtl == true {
$_float: right;
$_margin: left;
}
@if $_position != last and $grid-collapse == false {
margin-#{$_margin}: gutter-width();
}
@if $grid-flexbox == false {
float: $_float;
}
}
}
## Instruction:
Adjust column mixin to only include width: 100%; when flexbox is enabled.
## Code After:
// ==================================================
// Columns
// ==================================================
@mixin columns($_columns: 1, $_position: default, $_max-width: false) {
@if $_max-width == max or $_max-width == true {
$_column-width: column-width($_columns, false);
@if $grid-flexbox == true {
width: 100%;
}
max-width: $_column-width;
}
@else { // $_max-width == default
width: column-width($_columns);
}
@if $_position == center {
margin-left: auto;
margin-right: auto;
}
@else {
$_float: left;
$_margin: right;
@if $grid-rtl == true {
$_float: right;
$_margin: left;
}
@if $_position != last and $grid-collapse == false {
margin-#{$_margin}: gutter-width();
}
@if $grid-flexbox == false {
float: $_float;
}
}
}
| // ==================================================
// Columns
// ==================================================
@mixin columns($_columns: 1, $_position: default, $_max-width: false) {
@if $_max-width == max or $_max-width == true {
$_column-width: column-width($_columns, false);
+ @if $grid-flexbox == true {
- width: 100%;
+ width: 100%;
? ++
+ }
max-width: $_column-width;
}
@else { // $_max-width == default
width: column-width($_columns);
}
@if $_position == center {
margin-left: auto;
margin-right: auto;
}
@else {
$_float: left;
$_margin: right;
@if $grid-rtl == true {
$_float: right;
$_margin: left;
}
@if $_position != last and $grid-collapse == false {
margin-#{$_margin}: gutter-width();
}
@if $grid-flexbox == false {
float: $_float;
}
}
} | 4 | 0.111111 | 3 | 1 |
3f7dba1f6063671e1a0ec6f9b547c7aa05b85260 | src/js/directives/textfit.js | src/js/directives/textfit.js | 'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
textFit(element);
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element);
}, 1000); // There should be a better way to do this :-(
});
}
};
}]);
| 'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element);
}, 1000); // There should be a better way to do this :-(
});
}
};
}]);
| Remove first call to textFit | Remove first call to textFit
| JavaScript | agpl-3.0 | P2Pvalue/teem,P2Pvalue/teem,P2Pvalue/pear2pear,Grasia/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/pear2pear,Grasia/teem | javascript | ## Code Before:
'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
textFit(element);
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element);
}, 1000); // There should be a better way to do this :-(
});
}
};
}]);
## Instruction:
Remove first call to textFit
## Code After:
'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element);
}, 1000); // There should be a better way to do this :-(
});
}
};
}]);
| 'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
- textFit(element);
-
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element);
}, 1000); // There should be a better way to do this :-(
});
}
};
}]); | 2 | 0.105263 | 0 | 2 |
05865e92855d3002317f7f283701b0280426940f | .travis.yml | .travis.yml | sudo: required
arch:
packages:
- qt5-declarative
- qt5-quickcontrols2
- qt5-graphicaleffects
- qt5-svg
- cmake
- extra-cmake-modules
- xorg-server-xvfb
- git
script:
- scripts/fetch_icons.sh
- cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr
- make
- sudo make install
- xvfb-run -a -s "-screen 0 800x600x24" make check
script:
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
notifications:
email: false
slack: qmlos:fdUqVmPzqPskEL1UBhqapZ0w
| language: c
compiler:
- clang
- gcc
sudo: required
arch:
packages:
- qt5-declarative
- qt5-quickcontrols2
- qt5-graphicaleffects
- qt5-svg
- cmake
- extra-cmake-modules
- xorg-server-xvfb
- git
- clang
- clazy-git
script:
- scripts/fetch_icons.sh
- if [ "$CC" = "gcc" ]; then cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi
- if [ "$CC" = "clang" ]; then env CLAZY_CHECKS="level1" cmake . -DCMAKE_CXX_COMPILER=clazy -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi
- make
- sudo make install
- xvfb-run -a -s "-screen 0 800x600x24" make check
script:
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
notifications:
email: false
slack: qmlos:fdUqVmPzqPskEL1UBhqapZ0w
| Enable clang and clazy for CI | Enable clang and clazy for CI
| YAML | mpl-2.0 | oKcerG/fluid,territorium/fluid,territorium/fluid,oKcerG/fluid | yaml | ## Code Before:
sudo: required
arch:
packages:
- qt5-declarative
- qt5-quickcontrols2
- qt5-graphicaleffects
- qt5-svg
- cmake
- extra-cmake-modules
- xorg-server-xvfb
- git
script:
- scripts/fetch_icons.sh
- cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr
- make
- sudo make install
- xvfb-run -a -s "-screen 0 800x600x24" make check
script:
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
notifications:
email: false
slack: qmlos:fdUqVmPzqPskEL1UBhqapZ0w
## Instruction:
Enable clang and clazy for CI
## Code After:
language: c
compiler:
- clang
- gcc
sudo: required
arch:
packages:
- qt5-declarative
- qt5-quickcontrols2
- qt5-graphicaleffects
- qt5-svg
- cmake
- extra-cmake-modules
- xorg-server-xvfb
- git
- clang
- clazy-git
script:
- scripts/fetch_icons.sh
- if [ "$CC" = "gcc" ]; then cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi
- if [ "$CC" = "clang" ]; then env CLAZY_CHECKS="level1" cmake . -DCMAKE_CXX_COMPILER=clazy -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi
- make
- sudo make install
- xvfb-run -a -s "-screen 0 800x600x24" make check
script:
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
notifications:
email: false
slack: qmlos:fdUqVmPzqPskEL1UBhqapZ0w
| + language: c
+
+ compiler:
+ - clang
+ - gcc
+
sudo: required
arch:
packages:
- qt5-declarative
- qt5-quickcontrols2
- qt5-graphicaleffects
- qt5-svg
- cmake
- extra-cmake-modules
- xorg-server-xvfb
- git
+ - clang
+ - clazy-git
script:
- scripts/fetch_icons.sh
- - cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr
+ - if [ "$CC" = "gcc" ]; then cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi
? +++++++++++++++++++++++++++ ++++
+ - if [ "$CC" = "clang" ]; then env CLAZY_CHECKS="level1" cmake . -DCMAKE_CXX_COMPILER=clazy -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi
- make
- sudo make install
- xvfb-run -a -s "-screen 0 800x600x24" make check
script:
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
notifications:
email: false
slack: qmlos:fdUqVmPzqPskEL1UBhqapZ0w | 11 | 0.44 | 10 | 1 |
4240e6ef565e5ce73358a566288a2959a65a1381 | app/emails_worker.rb | app/emails_worker.rb | class EmailssWorker
include Sneakers::Worker
# This worker will connect to "dashboard.posts" queue
# env is set to nil since by default the actuall queue name would be
# "dashboard.posts_development"
from_queue "stand.emails", env: nil
# work method receives message payload in raw format
# in our case it is JSON encoded string
# which we can pass to RecentPosts service without
# changes
def work(raw_post)
RecentPosts.push(raw_post)
ack! # we need to let queue know that message was received
end
end
| class EmailssWorker
include Sneakers::Worker
# This worker will connect to "dashboard.posts" queue
# env is set to nil since by default the actuall queue name would be
# "dashboard.posts_development"
from_queue "stand.emails", env: nil
# work method receives message payload in raw format
# in our case it is JSON encoded string
# which we can pass to RecentPosts service without
# changes
def work(raw_post)
EmailProcessor.process(raw_post)
ack! # we need to let queue know that message was received
end
end
| Save the email processor behavior | Save the email processor behavior
| Ruby | mit | rememberlenny/newsletterstand,rememberlenny/newsletterstand,rememberlenny/newsletterstand,rememberlenny/email-newsletter-stand,rememberlenny/email-newsletter-stand,rememberlenny/email-newsletter-stand | ruby | ## Code Before:
class EmailssWorker
include Sneakers::Worker
# This worker will connect to "dashboard.posts" queue
# env is set to nil since by default the actuall queue name would be
# "dashboard.posts_development"
from_queue "stand.emails", env: nil
# work method receives message payload in raw format
# in our case it is JSON encoded string
# which we can pass to RecentPosts service without
# changes
def work(raw_post)
RecentPosts.push(raw_post)
ack! # we need to let queue know that message was received
end
end
## Instruction:
Save the email processor behavior
## Code After:
class EmailssWorker
include Sneakers::Worker
# This worker will connect to "dashboard.posts" queue
# env is set to nil since by default the actuall queue name would be
# "dashboard.posts_development"
from_queue "stand.emails", env: nil
# work method receives message payload in raw format
# in our case it is JSON encoded string
# which we can pass to RecentPosts service without
# changes
def work(raw_post)
EmailProcessor.process(raw_post)
ack! # we need to let queue know that message was received
end
end
| class EmailssWorker
include Sneakers::Worker
# This worker will connect to "dashboard.posts" queue
# env is set to nil since by default the actuall queue name would be
# "dashboard.posts_development"
from_queue "stand.emails", env: nil
# work method receives message payload in raw format
# in our case it is JSON encoded string
# which we can pass to RecentPosts service without
# changes
def work(raw_post)
- RecentPosts.push(raw_post)
+ EmailProcessor.process(raw_post)
ack! # we need to let queue know that message was received
end
end | 2 | 0.125 | 1 | 1 |
81a5b3e29979d143fdae4a9c403b0b1846b6b57c | src/main/java/beaform/gui/TreeViewFormula.java | src/main/java/beaform/gui/TreeViewFormula.java | package beaform.gui;
import beaform.entities.Formula;
public class TreeViewFormula {
Formula form;
String metadata;
public TreeViewFormula(Formula form, String metadata) {
this.form = form;
metadata = metadata.substring(metadata.indexOf('|') + 1);
this.metadata = metadata;
}
@Override
public String toString() {
return this.form.getName();
}
public Formula getFormula() {
return this.form;
}
public String getMetadata() {
return this.metadata;
}
}
| package beaform.gui;
import beaform.entities.Formula;
public class TreeViewFormula {
private final Formula form;
private final String metadata;
public TreeViewFormula(Formula form, String metadata) {
this.form = form;
metadata = metadata.substring(metadata.indexOf('|') + 1);
this.metadata = metadata;
}
@Override
public String toString() {
return this.form.getName();
}
public Formula getFormula() {
return this.form;
}
public String getMetadata() {
return this.metadata;
}
}
| Mark some datamembers as private | Mark some datamembers as private
| Java | mit | stevenpost/beaform | java | ## Code Before:
package beaform.gui;
import beaform.entities.Formula;
public class TreeViewFormula {
Formula form;
String metadata;
public TreeViewFormula(Formula form, String metadata) {
this.form = form;
metadata = metadata.substring(metadata.indexOf('|') + 1);
this.metadata = metadata;
}
@Override
public String toString() {
return this.form.getName();
}
public Formula getFormula() {
return this.form;
}
public String getMetadata() {
return this.metadata;
}
}
## Instruction:
Mark some datamembers as private
## Code After:
package beaform.gui;
import beaform.entities.Formula;
public class TreeViewFormula {
private final Formula form;
private final String metadata;
public TreeViewFormula(Formula form, String metadata) {
this.form = form;
metadata = metadata.substring(metadata.indexOf('|') + 1);
this.metadata = metadata;
}
@Override
public String toString() {
return this.form.getName();
}
public Formula getFormula() {
return this.form;
}
public String getMetadata() {
return this.metadata;
}
}
| package beaform.gui;
import beaform.entities.Formula;
public class TreeViewFormula {
- Formula form;
- String metadata;
+ private final Formula form;
+ private final String metadata;
public TreeViewFormula(Formula form, String metadata) {
this.form = form;
metadata = metadata.substring(metadata.indexOf('|') + 1);
this.metadata = metadata;
}
@Override
public String toString() {
return this.form.getName();
}
public Formula getFormula() {
return this.form;
}
public String getMetadata() {
return this.metadata;
}
} | 4 | 0.142857 | 2 | 2 |
c73b8a7503f21e16171ea1b0b40180bd1624f4d3 | social/apps/flask_app/routes.py | social/apps/flask_app/routes.py | from flask import g, Blueprint
from flask.ext.login import login_required, login_user
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.flask_app.utils import strategy
social_auth = Blueprint('social', __name__)
@social_auth.route('/login/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def auth(backend):
return do_auth(g.strategy)
@social_auth.route('/complete/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def complete(backend, *args, **kwargs):
"""Authentication complete view, override this view if transaction
management doesn't suit your needs."""
return do_complete(g.strategy, login=lambda strat, user: login_user(user),
user=g.user, *args, **kwargs)
@social_auth.route('/disconnect/<string:backend>/', methods=('POST',))
@social_auth.route('/disconnect/<string:backend>/<int:association_id>/',
methods=('POST',))
@login_required
@strategy()
def disconnect(backend, association_id=None):
"""Disconnects given backend from current logged in user."""
return do_disconnect(g.strategy, g.user, association_id)
| from flask import g, Blueprint, request
from flask.ext.login import login_required, login_user
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.flask_app.utils import strategy
social_auth = Blueprint('social', __name__)
@social_auth.route('/login/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def auth(backend):
return do_auth(g.strategy)
@social_auth.route('/complete/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def complete(backend, *args, **kwargs):
"""Authentication complete view, override this view if transaction
management doesn't suit your needs."""
return do_complete(g.strategy, login=do_login, user=g.user,
*args, **kwargs)
@social_auth.route('/disconnect/<string:backend>/', methods=('POST',))
@social_auth.route('/disconnect/<string:backend>/<int:association_id>/',
methods=('POST',))
@login_required
@strategy()
def disconnect(backend, association_id=None):
"""Disconnects given backend from current logged in user."""
return do_disconnect(g.strategy, g.user, association_id)
def do_login(strategy, user):
return login_user(user, remember=request.cookies.get('remember') or
request.args.get('remember') or
request.form.get('remember') or False)
| Support remember flag when calling login on flask app | Support remember flag when calling login on flask app
| Python | bsd-3-clause | lamby/python-social-auth,lneoe/python-social-auth,henocdz/python-social-auth,ononeor12/python-social-auth,cjltsod/python-social-auth,JJediny/python-social-auth,henocdz/python-social-auth,henocdz/python-social-auth,ariestiyansyah/python-social-auth,mathspace/python-social-auth,rsteca/python-social-auth,jneves/python-social-auth,tutumcloud/python-social-auth,alrusdi/python-social-auth,mrwags/python-social-auth,tkajtoch/python-social-auth,barseghyanartur/python-social-auth,san-mate/python-social-auth,yprez/python-social-auth,S01780/python-social-auth,python-social-auth/social-core,frankier/python-social-auth,ByteInternet/python-social-auth,jeyraof/python-social-auth,joelstanner/python-social-auth,rsalmaso/python-social-auth,webjunkie/python-social-auth,bjorand/python-social-auth,tutumcloud/python-social-auth,jameslittle/python-social-auth,Andygmb/python-social-auth,S01780/python-social-auth,iruga090/python-social-auth,lawrence34/python-social-auth,robbiet480/python-social-auth,degs098/python-social-auth,cjltsod/python-social-auth,DhiaEddineSaidi/python-social-auth,MSOpenTech/python-social-auth,merutak/python-social-auth,mchdks/python-social-auth,tkajtoch/python-social-auth,rsalmaso/python-social-auth,hsr-ba-fs15-dat/python-social-auth,degs098/python-social-auth,ByteInternet/python-social-auth,jeyraof/python-social-auth,degs098/python-social-auth,hsr-ba-fs15-dat/python-social-auth,frankier/python-social-auth,yprez/python-social-auth,SeanHayes/python-social-auth,alrusdi/python-social-auth,fearlessspider/python-social-auth,drxos/python-social-auth,joelstanner/python-social-auth,python-social-auth/social-app-django,JJediny/python-social-auth,jameslittle/python-social-auth,contracode/python-social-auth,wildtetris/python-social-auth,michael-borisov/python-social-auth,hsr-ba-fs15-dat/python-social-auth,imsparsh/python-social-auth,webjunkie/python-social-auth,contracode/python-social-auth,nirmalvp/python-social-auth,chandolia/python-social-auth,duoduo369/python-social-auth,falcon1kr/python-social-auth,SeanHayes/python-social-auth,clef/python-social-auth,mrwags/python-social-auth,imsparsh/python-social-auth,joelstanner/python-social-auth,falcon1kr/python-social-auth,mathspace/python-social-auth,robbiet480/python-social-auth,ariestiyansyah/python-social-auth,iruga090/python-social-auth,mark-adams/python-social-auth,chandolia/python-social-auth,mrwags/python-social-auth,cmichal/python-social-auth,lneoe/python-social-auth,python-social-auth/social-app-django,garrett-schlesinger/python-social-auth,ByteInternet/python-social-auth,JJediny/python-social-auth,JerzySpendel/python-social-auth,cmichal/python-social-auth,drxos/python-social-auth,yprez/python-social-auth,fearlessspider/python-social-auth,contracode/python-social-auth,jneves/python-social-auth,MSOpenTech/python-social-auth,nirmalvp/python-social-auth,tkajtoch/python-social-auth,python-social-auth/social-app-cherrypy,mark-adams/python-social-auth,mathspace/python-social-auth,muhammad-ammar/python-social-auth,barseghyanartur/python-social-auth,lawrence34/python-social-auth,S01780/python-social-auth,msampathkumar/python-social-auth,Andygmb/python-social-auth,python-social-auth/social-app-django,noodle-learns-programming/python-social-auth,mark-adams/python-social-auth,merutak/python-social-auth,san-mate/python-social-auth,daniula/python-social-auth,bjorand/python-social-auth,ononeor12/python-social-auth,daniula/python-social-auth,clef/python-social-auth,drxos/python-social-auth,robbiet480/python-social-auth,jeyraof/python-social-auth,falcon1kr/python-social-auth,lamby/python-social-auth,MSOpenTech/python-social-auth,firstjob/python-social-auth,VishvajitP/python-social-auth,VishvajitP/python-social-auth,chandolia/python-social-auth,rsteca/python-social-auth,Andygmb/python-social-auth,VishvajitP/python-social-auth,python-social-auth/social-core,JerzySpendel/python-social-auth,barseghyanartur/python-social-auth,webjunkie/python-social-auth,DhiaEddineSaidi/python-social-auth,wildtetris/python-social-auth,lamby/python-social-auth,firstjob/python-social-auth,msampathkumar/python-social-auth,clef/python-social-auth,lneoe/python-social-auth,michael-borisov/python-social-auth,muhammad-ammar/python-social-auth,jameslittle/python-social-auth,bjorand/python-social-auth,daniula/python-social-auth,firstjob/python-social-auth,tobias47n9e/social-core,rsteca/python-social-auth,lawrence34/python-social-auth,michael-borisov/python-social-auth,DhiaEddineSaidi/python-social-auth,nirmalvp/python-social-auth,cmichal/python-social-auth,duoduo369/python-social-auth,noodle-learns-programming/python-social-auth,merutak/python-social-auth,iruga090/python-social-auth,ononeor12/python-social-auth,msampathkumar/python-social-auth,noodle-learns-programming/python-social-auth,python-social-auth/social-storage-sqlalchemy,python-social-auth/social-docs,fearlessspider/python-social-auth,mchdks/python-social-auth,mchdks/python-social-auth,ariestiyansyah/python-social-auth,jneves/python-social-auth,alrusdi/python-social-auth,garrett-schlesinger/python-social-auth,muhammad-ammar/python-social-auth,imsparsh/python-social-auth,san-mate/python-social-auth,wildtetris/python-social-auth,JerzySpendel/python-social-auth | python | ## Code Before:
from flask import g, Blueprint
from flask.ext.login import login_required, login_user
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.flask_app.utils import strategy
social_auth = Blueprint('social', __name__)
@social_auth.route('/login/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def auth(backend):
return do_auth(g.strategy)
@social_auth.route('/complete/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def complete(backend, *args, **kwargs):
"""Authentication complete view, override this view if transaction
management doesn't suit your needs."""
return do_complete(g.strategy, login=lambda strat, user: login_user(user),
user=g.user, *args, **kwargs)
@social_auth.route('/disconnect/<string:backend>/', methods=('POST',))
@social_auth.route('/disconnect/<string:backend>/<int:association_id>/',
methods=('POST',))
@login_required
@strategy()
def disconnect(backend, association_id=None):
"""Disconnects given backend from current logged in user."""
return do_disconnect(g.strategy, g.user, association_id)
## Instruction:
Support remember flag when calling login on flask app
## Code After:
from flask import g, Blueprint, request
from flask.ext.login import login_required, login_user
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.flask_app.utils import strategy
social_auth = Blueprint('social', __name__)
@social_auth.route('/login/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def auth(backend):
return do_auth(g.strategy)
@social_auth.route('/complete/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def complete(backend, *args, **kwargs):
"""Authentication complete view, override this view if transaction
management doesn't suit your needs."""
return do_complete(g.strategy, login=do_login, user=g.user,
*args, **kwargs)
@social_auth.route('/disconnect/<string:backend>/', methods=('POST',))
@social_auth.route('/disconnect/<string:backend>/<int:association_id>/',
methods=('POST',))
@login_required
@strategy()
def disconnect(backend, association_id=None):
"""Disconnects given backend from current logged in user."""
return do_disconnect(g.strategy, g.user, association_id)
def do_login(strategy, user):
return login_user(user, remember=request.cookies.get('remember') or
request.args.get('remember') or
request.form.get('remember') or False)
| - from flask import g, Blueprint
+ from flask import g, Blueprint, request
? +++++++++
from flask.ext.login import login_required, login_user
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.flask_app.utils import strategy
social_auth = Blueprint('social', __name__)
@social_auth.route('/login/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def auth(backend):
return do_auth(g.strategy)
@social_auth.route('/complete/<string:backend>/', methods=('GET', 'POST'))
@strategy('social.complete')
def complete(backend, *args, **kwargs):
"""Authentication complete view, override this view if transaction
management doesn't suit your needs."""
- return do_complete(g.strategy, login=lambda strat, user: login_user(user),
? ^^^^^^^^^^^ ^^^^ ^^^ ------
+ return do_complete(g.strategy, login=do_login, user=g.user,
? +++ ^^^^ ^ ^
- user=g.user, *args, **kwargs)
? -------------
+ *args, **kwargs)
@social_auth.route('/disconnect/<string:backend>/', methods=('POST',))
@social_auth.route('/disconnect/<string:backend>/<int:association_id>/',
methods=('POST',))
@login_required
@strategy()
def disconnect(backend, association_id=None):
"""Disconnects given backend from current logged in user."""
return do_disconnect(g.strategy, g.user, association_id)
+
+
+ def do_login(strategy, user):
+ return login_user(user, remember=request.cookies.get('remember') or
+ request.args.get('remember') or
+ request.form.get('remember') or False) | 12 | 0.363636 | 9 | 3 |
f91c4e6021249f9d3f557855e52ebb6dad1d4ebc | zazu.yaml | zazu.yaml |
issueTracker:
type: jira
url: https://zazucli.atlassian.net/
project: ZZ
codeReviewer:
type: github
owner: stopthatcow
repo: zazu
style:
- include:
- setup.py
- docs/**.py
- tests/**.py
- zazu/**.py
stylers:
- type: autopep8
options:
- "--max-line-length=150"
- type: docformatter
options:
- "--wrap-summaries=0"
- "--wrap-descriptions=0"
- "--blank"
# Fix common misspellings.
- type: generic
command: sed
options:
- "s/responce/response/g"
|
issueTracker:
type: github
owner: stopthatcow
repo: zazu
#issueTracker:
# type: jira
# url: https://zazucli.atlassian.net/
# project: ZZ
codeReviewer:
type: github
owner: stopthatcow
repo: zazu
style:
- include:
- setup.py
- docs/**.py
- tests/**.py
- zazu/**.py
stylers:
- type: autopep8
options:
- "--max-line-length=150"
- type: docformatter
options:
- "--wrap-summaries=0"
- "--wrap-descriptions=0"
- "--blank"
# Fix common misspellings.
- type: generic
command: sed
options:
- "s/responce/response/g"
| Switch back to github issue tracker | Switch back to github issue tracker
(feature/89_autocompletion)
| YAML | mit | stopthatcow/zazu,stopthatcow/zazu | yaml | ## Code Before:
issueTracker:
type: jira
url: https://zazucli.atlassian.net/
project: ZZ
codeReviewer:
type: github
owner: stopthatcow
repo: zazu
style:
- include:
- setup.py
- docs/**.py
- tests/**.py
- zazu/**.py
stylers:
- type: autopep8
options:
- "--max-line-length=150"
- type: docformatter
options:
- "--wrap-summaries=0"
- "--wrap-descriptions=0"
- "--blank"
# Fix common misspellings.
- type: generic
command: sed
options:
- "s/responce/response/g"
## Instruction:
Switch back to github issue tracker
(feature/89_autocompletion)
## Code After:
issueTracker:
type: github
owner: stopthatcow
repo: zazu
#issueTracker:
# type: jira
# url: https://zazucli.atlassian.net/
# project: ZZ
codeReviewer:
type: github
owner: stopthatcow
repo: zazu
style:
- include:
- setup.py
- docs/**.py
- tests/**.py
- zazu/**.py
stylers:
- type: autopep8
options:
- "--max-line-length=150"
- type: docformatter
options:
- "--wrap-summaries=0"
- "--wrap-descriptions=0"
- "--blank"
# Fix common misspellings.
- type: generic
command: sed
options:
- "s/responce/response/g"
|
issueTracker:
+ type: github
+ owner: stopthatcow
+ repo: zazu
+
+ #issueTracker:
- type: jira
+ # type: jira
? +
- url: https://zazucli.atlassian.net/
+ # url: https://zazucli.atlassian.net/
? +
- project: ZZ
+ # project: ZZ
? +
codeReviewer:
type: github
owner: stopthatcow
repo: zazu
style:
- include:
- setup.py
- docs/**.py
- tests/**.py
- zazu/**.py
stylers:
- type: autopep8
options:
- "--max-line-length=150"
- type: docformatter
options:
- "--wrap-summaries=0"
- "--wrap-descriptions=0"
- "--blank"
# Fix common misspellings.
- type: generic
command: sed
options:
- "s/responce/response/g" | 11 | 0.354839 | 8 | 3 |
fa72f773158c6600b149152c8c5a86a721b67226 | metadata/org.weilbach.splitbills.yml | metadata/org.weilbach.splitbills.yml | Categories:
- Money
License: GPL-3.0-or-later
AuthorName: Felix Weilbach
AuthorEmail: felix.weilbach@t-online.de
WebSite: https://gitlab.com/flexw/splitbills
SourceCode: https://gitlab.com/flexw/splitbills
IssueTracker: https://gitlab.com/flexw/splitbills/issues
AutoName: SplitBills
Summary: Helps you and your friends to split your collective expenses
Description: |
Use SplitBills to split bills with your friends or other people. You can
create groups with people, add bills to the group and view your
balances. SplitBills works without any server or registration and is
free software. Your expenses belong to you!
If you have any problems with the app please contact me or open a issue
here, rather than leave a one-star review:
https://gitlab.com/flexw/splitbills/issues
Features:
* Split bills with other people
* Sync your expenses with other people
* View balances
* No registration needed
* Dezentral
RepoType: git
Repo: https://gitlab.com/flexw/splitbills.git
Builds:
- versionName: 0.2.3.1
versionCode: 6
commit: v0.2.3.1
subdir: app
gradle:
- prod
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.2.3.1
CurrentVersionCode: 6
| Categories:
- Money
License: GPL-3.0-or-later
AuthorName: Felix Weilbach
AuthorEmail: felix.weilbach@t-online.de
WebSite: https://gitlab.com/flexw/splitbills
SourceCode: https://gitlab.com/flexw/splitbills
IssueTracker: https://gitlab.com/flexw/splitbills/issues
AutoName: SplitBills
Summary: Helps you and your friends to split your collective expenses
Description: |
Use SplitBills to split bills with your friends or other people. You can
create groups with people, add bills to the group and view your
balances. SplitBills works without any server or registration and is
free software. Your expenses belong to you!
If you have any problems with the app please contact me or open a issue
here, rather than leave a one-star review:
https://gitlab.com/flexw/splitbills/issues
Features:
* Split bills with other people
* Sync your expenses with other people
* View balances
* No registration needed
* Dezentral
RepoType: git
Repo: https://gitlab.com/flexw/splitbills.git
Builds:
- versionName: 0.2.3.1
versionCode: 6
commit: v0.2.3.1
subdir: app
gradle:
- prod
- versionName: 0.2.4
versionCode: 7
commit: v0.2.4
subdir: app
gradle:
- prod
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.2.4
CurrentVersionCode: 7
| Update SplitBills to 0.2.4 (7) | Update SplitBills to 0.2.4 (7)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Money
License: GPL-3.0-or-later
AuthorName: Felix Weilbach
AuthorEmail: felix.weilbach@t-online.de
WebSite: https://gitlab.com/flexw/splitbills
SourceCode: https://gitlab.com/flexw/splitbills
IssueTracker: https://gitlab.com/flexw/splitbills/issues
AutoName: SplitBills
Summary: Helps you and your friends to split your collective expenses
Description: |
Use SplitBills to split bills with your friends or other people. You can
create groups with people, add bills to the group and view your
balances. SplitBills works without any server or registration and is
free software. Your expenses belong to you!
If you have any problems with the app please contact me or open a issue
here, rather than leave a one-star review:
https://gitlab.com/flexw/splitbills/issues
Features:
* Split bills with other people
* Sync your expenses with other people
* View balances
* No registration needed
* Dezentral
RepoType: git
Repo: https://gitlab.com/flexw/splitbills.git
Builds:
- versionName: 0.2.3.1
versionCode: 6
commit: v0.2.3.1
subdir: app
gradle:
- prod
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.2.3.1
CurrentVersionCode: 6
## Instruction:
Update SplitBills to 0.2.4 (7)
## Code After:
Categories:
- Money
License: GPL-3.0-or-later
AuthorName: Felix Weilbach
AuthorEmail: felix.weilbach@t-online.de
WebSite: https://gitlab.com/flexw/splitbills
SourceCode: https://gitlab.com/flexw/splitbills
IssueTracker: https://gitlab.com/flexw/splitbills/issues
AutoName: SplitBills
Summary: Helps you and your friends to split your collective expenses
Description: |
Use SplitBills to split bills with your friends or other people. You can
create groups with people, add bills to the group and view your
balances. SplitBills works without any server or registration and is
free software. Your expenses belong to you!
If you have any problems with the app please contact me or open a issue
here, rather than leave a one-star review:
https://gitlab.com/flexw/splitbills/issues
Features:
* Split bills with other people
* Sync your expenses with other people
* View balances
* No registration needed
* Dezentral
RepoType: git
Repo: https://gitlab.com/flexw/splitbills.git
Builds:
- versionName: 0.2.3.1
versionCode: 6
commit: v0.2.3.1
subdir: app
gradle:
- prod
- versionName: 0.2.4
versionCode: 7
commit: v0.2.4
subdir: app
gradle:
- prod
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.2.4
CurrentVersionCode: 7
| Categories:
- Money
License: GPL-3.0-or-later
AuthorName: Felix Weilbach
AuthorEmail: felix.weilbach@t-online.de
WebSite: https://gitlab.com/flexw/splitbills
SourceCode: https://gitlab.com/flexw/splitbills
IssueTracker: https://gitlab.com/flexw/splitbills/issues
AutoName: SplitBills
Summary: Helps you and your friends to split your collective expenses
Description: |
Use SplitBills to split bills with your friends or other people. You can
create groups with people, add bills to the group and view your
balances. SplitBills works without any server or registration and is
free software. Your expenses belong to you!
If you have any problems with the app please contact me or open a issue
here, rather than leave a one-star review:
https://gitlab.com/flexw/splitbills/issues
Features:
* Split bills with other people
* Sync your expenses with other people
* View balances
* No registration needed
* Dezentral
RepoType: git
Repo: https://gitlab.com/flexw/splitbills.git
Builds:
- versionName: 0.2.3.1
versionCode: 6
commit: v0.2.3.1
subdir: app
gradle:
- prod
+ - versionName: 0.2.4
+ versionCode: 7
+ commit: v0.2.4
+ subdir: app
+ gradle:
+ - prod
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
- CurrentVersion: 0.2.3.1
? ^^^
+ CurrentVersion: 0.2.4
? ^
- CurrentVersionCode: 6
? ^
+ CurrentVersionCode: 7
? ^
| 11 | 0.25 | 9 | 2 |
832d77b5c9c5ca8afb76947d78a9cb0c0942be77 | spec/controllers/static_pages_controller_spec.rb | spec/controllers/static_pages_controller_spec.rb | require 'rails_helper'
RSpec.describe StaticPagesController, type: :controller do
describe 'GET #home' do
it 'returns http success' do
get :home
expect(response).to have_http_status(:success)
end
end
describe 'GET #map' do
it 'returns http success' do
get :map
expect(response).to have_http_status(:success)
end
end
end
| require 'rails_helper'
RSpec.describe StaticPagesController, type: :controller do
describe 'GET #home' do
it 'returns http success' do
get :home
expect(response).to have_http_status(:success)
end
end
end
| Remove test for old static map | Remove test for old static map
| Ruby | mit | osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web | ruby | ## Code Before:
require 'rails_helper'
RSpec.describe StaticPagesController, type: :controller do
describe 'GET #home' do
it 'returns http success' do
get :home
expect(response).to have_http_status(:success)
end
end
describe 'GET #map' do
it 'returns http success' do
get :map
expect(response).to have_http_status(:success)
end
end
end
## Instruction:
Remove test for old static map
## Code After:
require 'rails_helper'
RSpec.describe StaticPagesController, type: :controller do
describe 'GET #home' do
it 'returns http success' do
get :home
expect(response).to have_http_status(:success)
end
end
end
| require 'rails_helper'
RSpec.describe StaticPagesController, type: :controller do
describe 'GET #home' do
it 'returns http success' do
get :home
expect(response).to have_http_status(:success)
end
end
-
- describe 'GET #map' do
- it 'returns http success' do
- get :map
- expect(response).to have_http_status(:success)
- end
- end
end | 7 | 0.368421 | 0 | 7 |
992f7253ef1d0c56941d83ea4191e757d96c4d13 | data/transition-sites/phe_chimat.yml | data/transition-sites/phe_chimat.yml | ---
site: phe_chimat
whitehall_slug: public-health-england
homepage: https://www.gov.uk/guidance/phe-data-and-analysis-tools#child-and-maternal-health
homepage_furl: www.gov.uk/phe
tna_timestamp: 20170302101115
host: www.chimat.org.uk
aliases:
- chimat.org.uk
options: --query-string rid:qn
| ---
site: phe_chimat
whitehall_slug: public-health-england
homepage: https://www.gov.uk/guidance/phe-data-and-analysis-tools#child-and-maternal-health
tna_timestamp: 20170302101115
host: www.chimat.org.uk
aliases:
- chimat.org.uk
options: --query-string rid:qn
| Remove homepage furl for chimat | Remove homepage furl for chimat
The homepage is no longer the organisation page, so we should remove
this `homepage_furl`.
| YAML | mit | alphagov/transition-config,alphagov/transition-config | yaml | ## Code Before:
---
site: phe_chimat
whitehall_slug: public-health-england
homepage: https://www.gov.uk/guidance/phe-data-and-analysis-tools#child-and-maternal-health
homepage_furl: www.gov.uk/phe
tna_timestamp: 20170302101115
host: www.chimat.org.uk
aliases:
- chimat.org.uk
options: --query-string rid:qn
## Instruction:
Remove homepage furl for chimat
The homepage is no longer the organisation page, so we should remove
this `homepage_furl`.
## Code After:
---
site: phe_chimat
whitehall_slug: public-health-england
homepage: https://www.gov.uk/guidance/phe-data-and-analysis-tools#child-and-maternal-health
tna_timestamp: 20170302101115
host: www.chimat.org.uk
aliases:
- chimat.org.uk
options: --query-string rid:qn
| ---
site: phe_chimat
whitehall_slug: public-health-england
homepage: https://www.gov.uk/guidance/phe-data-and-analysis-tools#child-and-maternal-health
- homepage_furl: www.gov.uk/phe
tna_timestamp: 20170302101115
host: www.chimat.org.uk
aliases:
- chimat.org.uk
options: --query-string rid:qn | 1 | 0.1 | 0 | 1 |
c9d33ef9a7f98798aec521e7f9e25e1db07bd077 | ursgal/__init__.py | ursgal/__init__.py | from __future__ import absolute_import
import sys
import os
import ursgal.uparams
# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...
base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper
# from .umapmaster import UPeptideMapper
from .unode import Meta_UNode
from .unode import UNode
from .ucontroller import UController
from .ucore import COLORS
from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper
import ursgal.ucore
from .profiles import PROFILES
import ursgal.ukb
GlobalUnimodMapper = UnimodMapper()
# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
ursgal_version = version_file.read().strip()
__version__ = ursgal_version
version_info = tuple(map(int, ursgal_version.split(".")))
if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
raise RuntimeError("Ursgal requires Python 3.4 or later.")
| from __future__ import absolute_import
import sys
import os
from packaging.version import parse as parse_version
import ursgal.uparams
# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...
base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper
# from .umapmaster import UPeptideMapper
from .unode import Meta_UNode
from .unode import UNode
from .ucontroller import UController
from .ucore import COLORS
from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper
import ursgal.ucore
from .profiles import PROFILES
import ursgal.ukb
GlobalUnimodMapper = UnimodMapper()
# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
ursgal_version = version_file.read().strip()
__version__ = ursgal_version
version_info = parse_version(ursgal_version)
if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
raise RuntimeError("Ursgal requires Python 3.4 or later.")
| Use `packaging.version.parser` for version parsing | Use `packaging.version.parser` for version parsing | Python | mit | ursgal/ursgal,ursgal/ursgal | python | ## Code Before:
from __future__ import absolute_import
import sys
import os
import ursgal.uparams
# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...
base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper
# from .umapmaster import UPeptideMapper
from .unode import Meta_UNode
from .unode import UNode
from .ucontroller import UController
from .ucore import COLORS
from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper
import ursgal.ucore
from .profiles import PROFILES
import ursgal.ukb
GlobalUnimodMapper = UnimodMapper()
# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
ursgal_version = version_file.read().strip()
__version__ = ursgal_version
version_info = tuple(map(int, ursgal_version.split(".")))
if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
raise RuntimeError("Ursgal requires Python 3.4 or later.")
## Instruction:
Use `packaging.version.parser` for version parsing
## Code After:
from __future__ import absolute_import
import sys
import os
from packaging.version import parse as parse_version
import ursgal.uparams
# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...
base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper
# from .umapmaster import UPeptideMapper
from .unode import Meta_UNode
from .unode import UNode
from .ucontroller import UController
from .ucore import COLORS
from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper
import ursgal.ucore
from .profiles import PROFILES
import ursgal.ukb
GlobalUnimodMapper = UnimodMapper()
# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
ursgal_version = version_file.read().strip()
__version__ = ursgal_version
version_info = parse_version(ursgal_version)
if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
raise RuntimeError("Ursgal requires Python 3.4 or later.")
| from __future__ import absolute_import
import sys
import os
+ from packaging.version import parse as parse_version
import ursgal.uparams
# this is for unorthodox queries of the params.
# please use the unode functions or UParamsMapper
# to access params since they are translated,
# grouped and so on ...
base_dir = os.path.dirname(__file__)
from .umapmaster import UParamMapper
# from .umapmaster import UPeptideMapper
from .unode import Meta_UNode
from .unode import UNode
from .ucontroller import UController
from .ucore import COLORS
from .chemical_composition import ChemicalComposition as ChemicalComposition
from . import chemical_composition_kb
from .unimod_mapper import UnimodMapper
import ursgal.ucore
from .profiles import PROFILES
import ursgal.ukb
GlobalUnimodMapper = UnimodMapper()
# We store our version number in a simple text file:
version_path = os.path.join(os.path.dirname(__file__), "version.txt")
with open(version_path, "r") as version_file:
ursgal_version = version_file.read().strip()
__version__ = ursgal_version
- version_info = tuple(map(int, ursgal_version.split(".")))
+ version_info = parse_version(ursgal_version)
if not hasattr(sys, "version_info") or sys.version_info < (3, 4):
raise RuntimeError("Ursgal requires Python 3.4 or later.") | 3 | 0.068182 | 2 | 1 |
780ffaa86cb64913ace2c98a10890d7e40b528c4 | README.md | README.md | This is a simple python class which is using to filter out cards by different keys, the data source is exported JSON from Trello.
|function name | description |
-----------------------------|------------------------------------|
|viewCardsByKeys([key]) | Get valuse for remaining cards |
|cardsFilterByClosed(boolean)| Filter out closed cards |
|cardsFilterByLastUpdateDate(int) | Filter out update dated over n days|
|cardsFilterByList(idList) | Filter by ID of List |
|cardsFilterByLabels | Filter by labels (TBD) |
|cardsFilterByMembers | Filter by members (TBD) |
# Usage example
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(file = '/tmp/trello.json')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
```
| This is a simple python class which is using to filter out cards by different keys, the data source is exported JSON from Trello.
|function name | description |
-----------------------------|------------------------------------|
|viewCardsByKeys([keys]) | Get valuse for remaining cards |
|cardsFilterByClosed(boolean)| Filter out closed cards |
|cardsFilterByLastUpdateDate(int) | Filter out update dated over n days|
|cardsFilterByList(idList) | Filter by ID of List |
|cardsFilterByLabels | Filter by labels (TBD) |
|cardsFilterByMembers | Filter by members (TBD) |
# Usage example
Use local file /tmp/trello.json
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(file = '/tmp/trello.json')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
```
(Temporary) Use token to download JSON from Trello
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(url= 'https://trello.com/b/ruxunrrp.json', cookies = 'token=xxxxxxx')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
``` | Update readme for temporary solution: use token to download trello JSON | Update readme for temporary solution: use token to download trello JSON
| Markdown | mit | cjy0125/trellofunnel | markdown | ## Code Before:
This is a simple python class which is using to filter out cards by different keys, the data source is exported JSON from Trello.
|function name | description |
-----------------------------|------------------------------------|
|viewCardsByKeys([key]) | Get valuse for remaining cards |
|cardsFilterByClosed(boolean)| Filter out closed cards |
|cardsFilterByLastUpdateDate(int) | Filter out update dated over n days|
|cardsFilterByList(idList) | Filter by ID of List |
|cardsFilterByLabels | Filter by labels (TBD) |
|cardsFilterByMembers | Filter by members (TBD) |
# Usage example
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(file = '/tmp/trello.json')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
```
## Instruction:
Update readme for temporary solution: use token to download trello JSON
## Code After:
This is a simple python class which is using to filter out cards by different keys, the data source is exported JSON from Trello.
|function name | description |
-----------------------------|------------------------------------|
|viewCardsByKeys([keys]) | Get valuse for remaining cards |
|cardsFilterByClosed(boolean)| Filter out closed cards |
|cardsFilterByLastUpdateDate(int) | Filter out update dated over n days|
|cardsFilterByList(idList) | Filter by ID of List |
|cardsFilterByLabels | Filter by labels (TBD) |
|cardsFilterByMembers | Filter by members (TBD) |
# Usage example
Use local file /tmp/trello.json
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(file = '/tmp/trello.json')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
```
(Temporary) Use token to download JSON from Trello
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(url= 'https://trello.com/b/ruxunrrp.json', cookies = 'token=xxxxxxx')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
``` | This is a simple python class which is using to filter out cards by different keys, the data source is exported JSON from Trello.
|function name | description |
-----------------------------|------------------------------------|
- |viewCardsByKeys([key]) | Get valuse for remaining cards |
? -
+ |viewCardsByKeys([keys]) | Get valuse for remaining cards |
? +
|cardsFilterByClosed(boolean)| Filter out closed cards |
|cardsFilterByLastUpdateDate(int) | Filter out update dated over n days|
|cardsFilterByList(idList) | Filter by ID of List |
|cardsFilterByLabels | Filter by labels (TBD) |
|cardsFilterByMembers | Filter by members (TBD) |
# Usage example
+ Use local file /tmp/trello.json
```
>>> from trellofunnel import trellofunnel
>>> o = trellofunnel(file = '/tmp/trello.json')
>>> o.cardsFilterByClosed()
>>> o.cardsFilterByLastUpdateDate(7)
>>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
ToDo [Dev] Improve the flow
Doing [Ops] Switch account
Done [Server] Upgrade package
```
+
+ (Temporary) Use token to download JSON from Trello
+ ```
+ >>> from trellofunnel import trellofunnel
+ >>> o = trellofunnel(url= 'https://trello.com/b/ruxunrrp.json', cookies = 'token=xxxxxxx')
+ >>> o.cardsFilterByClosed()
+ >>> o.cardsFilterByLastUpdateDate(7)
+ >>> print o.viewCardsByKeys(['idList', 'labels', 'name'])
+
+ ToDo [Dev] Improve the flow
+ Doing [Ops] Switch account
+ Done [Server] Upgrade package
+ ``` | 16 | 0.64 | 15 | 1 |
2b536d60e9748508d5d4b7396d3381139e6da0ac | app/controllers/exam_authorization_requests_controller.rb | app/controllers/exam_authorization_requests_controller.rb | class ExamAuthorizationRequestsController < ApplicationController
def create
authorization_request = ExamAuthorizationRequest.create! authorization_request_params
current_user.read_notification! authorization_request.exam_registration
flash.notice = I18n.t :exam_authorization_request_created
redirect_to root_path
end
def update
ExamAuthorizationRequest.update params[:id], authorization_request_params
flash.notice = I18n.t :exam_authorization_request_saved
redirect_to root_path
end
private
def authorization_request_params
params
.require(:exam_authorization_request).permit(:exam_id, :exam_registration_id)
.merge(user: current_user, organization: Organization.current)
end
end
| class ExamAuthorizationRequestsController < ApplicationController
def create
authorization_request = ExamAuthorizationRequest.find_or_create_by! create_authorization_request_params do |it|
it.assign_attributes authorization_request_params
end
current_user.read_notification! authorization_request.exam_registration
flash.notice = I18n.t :exam_authorization_request_created
redirect_to root_path
end
def update
ExamAuthorizationRequest.update params[:id], authorization_request_params
flash.notice = I18n.t :exam_authorization_request_saved
redirect_to root_path
end
private
def create_authorization_request_params
authorization_request_params.slice :exam_registration_id, :user, :organization
end
def authorization_request_params
params
.require(:exam_authorization_request).permit(:exam_id, :exam_registration_id)
.merge(user: current_user, organization: Organization.current)
end
end
| Replace create! by find_or_create_by! to avoid multiple creations | Replace create! by find_or_create_by! to avoid multiple creations
| Ruby | agpl-3.0 | mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory | ruby | ## Code Before:
class ExamAuthorizationRequestsController < ApplicationController
def create
authorization_request = ExamAuthorizationRequest.create! authorization_request_params
current_user.read_notification! authorization_request.exam_registration
flash.notice = I18n.t :exam_authorization_request_created
redirect_to root_path
end
def update
ExamAuthorizationRequest.update params[:id], authorization_request_params
flash.notice = I18n.t :exam_authorization_request_saved
redirect_to root_path
end
private
def authorization_request_params
params
.require(:exam_authorization_request).permit(:exam_id, :exam_registration_id)
.merge(user: current_user, organization: Organization.current)
end
end
## Instruction:
Replace create! by find_or_create_by! to avoid multiple creations
## Code After:
class ExamAuthorizationRequestsController < ApplicationController
def create
authorization_request = ExamAuthorizationRequest.find_or_create_by! create_authorization_request_params do |it|
it.assign_attributes authorization_request_params
end
current_user.read_notification! authorization_request.exam_registration
flash.notice = I18n.t :exam_authorization_request_created
redirect_to root_path
end
def update
ExamAuthorizationRequest.update params[:id], authorization_request_params
flash.notice = I18n.t :exam_authorization_request_saved
redirect_to root_path
end
private
def create_authorization_request_params
authorization_request_params.slice :exam_registration_id, :user, :organization
end
def authorization_request_params
params
.require(:exam_authorization_request).permit(:exam_id, :exam_registration_id)
.merge(user: current_user, organization: Organization.current)
end
end
| class ExamAuthorizationRequestsController < ApplicationController
def create
- authorization_request = ExamAuthorizationRequest.create! authorization_request_params
+ authorization_request = ExamAuthorizationRequest.find_or_create_by! create_authorization_request_params do |it|
? ++++++++ +++ +++++++ ++++++++
+ it.assign_attributes authorization_request_params
+ end
current_user.read_notification! authorization_request.exam_registration
flash.notice = I18n.t :exam_authorization_request_created
redirect_to root_path
end
def update
ExamAuthorizationRequest.update params[:id], authorization_request_params
flash.notice = I18n.t :exam_authorization_request_saved
redirect_to root_path
end
private
+ def create_authorization_request_params
+ authorization_request_params.slice :exam_registration_id, :user, :organization
+ end
+
def authorization_request_params
params
.require(:exam_authorization_request).permit(:exam_id, :exam_registration_id)
.merge(user: current_user, organization: Organization.current)
end
end | 8 | 0.363636 | 7 | 1 |
12c113fdd9895f33f7bb3a2e41640c95ffe01655 | css/base/_typography.scss | css/base/_typography.scss | /**
* ◊TYPOGRAPHY
* -----------
* NOTE: The typographic boilerplate I’m using encorporates
* slightly modified version of the Typeplate typescale mixins.
* Check out typeplate at: www.typeplate.com
* It uses a major third typescale. */
// Start with the basics
body {
font-family: $interface-font-stack;
line-height: $line-height;
font-weight: $base-font-weight;
font-size: 18px;
}
// Get some nice typeographic scale going
@include type-headings;
@include type-headings-style;
// Base header styles
h1, h2, h3, h4, h5, h6 {
font-family: $header-font-stack;
color: $secondary-color;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1rem;
}
// Nice margins to match header sizing
h1, h2 {
margin-top: 4rem;
margin-bottom: 2rem;
}
h3, h4 {
margin-bottom: 1.5rem;
}
// Readable body text
p {
font-family: $text-font-stack;
}
// Put meta kinds of things in sans-serif
footer,
aside {
font-family: $interface-font-stack;
} | /**
* ◊TYPOGRAPHY
* -----------
* NOTE: The typographic boilerplate I’m using encorporates
* slightly modified version of the Typeplate typescale mixins.
* Check out typeplate at: www.typeplate.com
* It uses a major third typescale. */
// Start with the basics
body {
font-family: $interface-font-stack;
line-height: $line-height;
font-weight: $base-font-weight;
font-size: 16px;
@include respond-to(sm){
font-size: 18px;
}
@include respond-to(md){
font-size: 21px;
}
}
// Get some nice typeographic scale going
@include type-headings;
@include type-headings-style;
// Base header styles
h1, h2, h3, h4, h5, h6 {
font-family: $header-font-stack;
color: $secondary-color;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1rem;
}
// Nice margins to match header sizing
h1, h2 {
margin-top: 4rem;
margin-bottom: 2rem;
}
h3, h4 {
margin-bottom: 1.5rem;
}
// Readable body text
p {
font-family: $text-font-stack;
}
// Put meta kinds of things in sans-serif
footer,
aside {
font-family: $interface-font-stack;
} | Add some responsive bling to the font-sizing | Add some responsive bling to the font-sizing
| SCSS | mit | curiositry/sassisfy,curiositry/sassisfy | scss | ## Code Before:
/**
* ◊TYPOGRAPHY
* -----------
* NOTE: The typographic boilerplate I’m using encorporates
* slightly modified version of the Typeplate typescale mixins.
* Check out typeplate at: www.typeplate.com
* It uses a major third typescale. */
// Start with the basics
body {
font-family: $interface-font-stack;
line-height: $line-height;
font-weight: $base-font-weight;
font-size: 18px;
}
// Get some nice typeographic scale going
@include type-headings;
@include type-headings-style;
// Base header styles
h1, h2, h3, h4, h5, h6 {
font-family: $header-font-stack;
color: $secondary-color;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1rem;
}
// Nice margins to match header sizing
h1, h2 {
margin-top: 4rem;
margin-bottom: 2rem;
}
h3, h4 {
margin-bottom: 1.5rem;
}
// Readable body text
p {
font-family: $text-font-stack;
}
// Put meta kinds of things in sans-serif
footer,
aside {
font-family: $interface-font-stack;
}
## Instruction:
Add some responsive bling to the font-sizing
## Code After:
/**
* ◊TYPOGRAPHY
* -----------
* NOTE: The typographic boilerplate I’m using encorporates
* slightly modified version of the Typeplate typescale mixins.
* Check out typeplate at: www.typeplate.com
* It uses a major third typescale. */
// Start with the basics
body {
font-family: $interface-font-stack;
line-height: $line-height;
font-weight: $base-font-weight;
font-size: 16px;
@include respond-to(sm){
font-size: 18px;
}
@include respond-to(md){
font-size: 21px;
}
}
// Get some nice typeographic scale going
@include type-headings;
@include type-headings-style;
// Base header styles
h1, h2, h3, h4, h5, h6 {
font-family: $header-font-stack;
color: $secondary-color;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1rem;
}
// Nice margins to match header sizing
h1, h2 {
margin-top: 4rem;
margin-bottom: 2rem;
}
h3, h4 {
margin-bottom: 1.5rem;
}
// Readable body text
p {
font-family: $text-font-stack;
}
// Put meta kinds of things in sans-serif
footer,
aside {
font-family: $interface-font-stack;
} | /**
* ◊TYPOGRAPHY
* -----------
* NOTE: The typographic boilerplate I’m using encorporates
* slightly modified version of the Typeplate typescale mixins.
* Check out typeplate at: www.typeplate.com
* It uses a major third typescale. */
-
// Start with the basics
body {
font-family: $interface-font-stack;
line-height: $line-height;
font-weight: $base-font-weight;
+ font-size: 16px;
+ @include respond-to(sm){
- font-size: 18px;
+ font-size: 18px;
? ++
+ }
+ @include respond-to(md){
+ font-size: 21px;
+ }
}
// Get some nice typeographic scale going
@include type-headings;
@include type-headings-style;
// Base header styles
h1, h2, h3, h4, h5, h6 {
font-family: $header-font-stack;
color: $secondary-color;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1rem;
}
// Nice margins to match header sizing
h1, h2 {
margin-top: 4rem;
margin-bottom: 2rem;
}
h3, h4 {
margin-bottom: 1.5rem;
}
// Readable body text
p {
font-family: $text-font-stack;
}
// Put meta kinds of things in sans-serif
footer,
aside {
font-family: $interface-font-stack;
} | 9 | 0.176471 | 7 | 2 |
6f01077141d02b270a99c569a0936ec80be88506 | libs/cbi/luasrc/view/cbi/full_valueheader.htm | libs/cbi/luasrc/view/cbi/full_valueheader.htm | <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<div class="cbi-value-title"><%=self.title%></div>
<div class="cbi-value-field"> | <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<label for="cbid.<%=self.config.."."..section.."."..self.option%>" class="cbi-value-title"><%=self.title%></label>
<div class="cbi-value-field"> | Use labels instead of divs for field titles | libs/cbi: Use labels instead of divs for field titles
git-svn-id: edf5ee79c2c7d29460bbb5b398f55862cc26620d@2514 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| HTML | apache-2.0 | 8devices/carambola2-luci,dtaht/cerowrt-luci-3.3,jschmidlapp/luci,vhpham80/luci,saraedum/luci-packages-old,stephank/luci,Flexibity/luci,saraedum/luci-packages-old,gwlim/luci,phi-psi/luci,phi-psi/luci,gwlim/luci,gwlim/luci,ch3n2k/luci,dtaht/cerowrt-luci-3.3,ThingMesh/openwrt-luci,projectbismark/luci-bismark,yeewang/openwrt-luci,gwlim/luci,jschmidlapp/luci,stephank/luci,jschmidlapp/luci,stephank/luci,ReclaimYourPrivacy/cloak-luci,freifunk-gluon/luci,freifunk-gluon/luci,yeewang/openwrt-luci,saraedum/luci-packages-old,yeewang/openwrt-luci,yeewang/openwrt-luci,Flexibity/luci,stephank/luci,ReclaimYourPrivacy/cloak-luci,freifunk-gluon/luci,phi-psi/luci,phi-psi/luci,gwlim/luci,alxhh/piratenluci,8devices/carambola2-luci,Flexibity/luci,vhpham80/luci,zwhfly/openwrt-luci,jschmidlapp/luci,Canaan-Creative/luci,ch3n2k/luci,8devices/carambola2-luci,ch3n2k/luci,zwhfly/openwrt-luci,alxhh/piratenluci,ch3n2k/luci,ReclaimYourPrivacy/cloak-luci,Flexibity/luci,saraedum/luci-packages-old,ReclaimYourPrivacy/cloak-luci,projectbismark/luci-bismark,Canaan-Creative/luci,saraedum/luci-packages-old,ch3n2k/luci,ReclaimYourPrivacy/cloak-luci,Canaan-Creative/luci,ch3n2k/luci,eugenesan/openwrt-luci,yeewang/openwrt-luci,ReclaimYourPrivacy/cloak-luci,eugenesan/openwrt-luci,phi-psi/luci,ThingMesh/openwrt-luci,zwhfly/openwrt-luci,Canaan-Creative/luci,projectbismark/luci-bismark,alxhh/piratenluci,alxhh/piratenluci,8devices/carambola2-luci,zwhfly/openwrt-luci,eugenesan/openwrt-luci,ReclaimYourPrivacy/cloak-luci,ThingMesh/openwrt-luci,alxhh/piratenluci,projectbismark/luci-bismark,Canaan-Creative/luci,8devices/carambola2-luci,Canaan-Creative/luci,freifunk-gluon/luci,projectbismark/luci-bismark,gwlim/luci,ThingMesh/openwrt-luci,alxhh/piratenluci,zwhfly/openwrt-luci,Canaan-Creative/luci,dtaht/cerowrt-luci-3.3,jschmidlapp/luci,vhpham80/luci,vhpham80/luci,ch3n2k/luci,vhpham80/luci,Flexibity/luci,ReclaimYourPrivacy/cloak-luci,gwlim/luci,phi-psi/luci,ThingMesh/openwrt-luci,projectbismark/luci-bismark,freifunk-gluon/luci,ThingMesh/openwrt-luci,phi-psi/luci,dtaht/cerowrt-luci-3.3,zwhfly/openwrt-luci,jschmidlapp/luci,stephank/luci,jschmidlapp/luci,Canaan-Creative/luci,eugenesan/openwrt-luci,yeewang/openwrt-luci,8devices/carambola2-luci,8devices/carambola2-luci,dtaht/cerowrt-luci-3.3,zwhfly/openwrt-luci,saraedum/luci-packages-old,jschmidlapp/luci,Flexibity/luci,freifunk-gluon/luci,dtaht/cerowrt-luci-3.3,Flexibity/luci,projectbismark/luci-bismark,zwhfly/openwrt-luci,stephank/luci,Flexibity/luci,eugenesan/openwrt-luci,projectbismark/luci-bismark,eugenesan/openwrt-luci,saraedum/luci-packages-old,zwhfly/openwrt-luci,vhpham80/luci,freifunk-gluon/luci,ThingMesh/openwrt-luci,yeewang/openwrt-luci,alxhh/piratenluci,eugenesan/openwrt-luci,freifunk-gluon/luci | html | ## Code Before:
<div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<div class="cbi-value-title"><%=self.title%></div>
<div class="cbi-value-field">
## Instruction:
libs/cbi: Use labels instead of divs for field titles
git-svn-id: edf5ee79c2c7d29460bbb5b398f55862cc26620d@2514 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
## Code After:
<div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<label for="cbid.<%=self.config.."."..section.."."..self.option%>" class="cbi-value-title"><%=self.title%></label>
<div class="cbi-value-field"> | <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
- <div class="cbi-value-title"><%=self.title%></div>
+ <label for="cbid.<%=self.config.."."..section.."."..self.option%>" class="cbi-value-title"><%=self.title%></label>
<div class="cbi-value-field"> | 2 | 0.666667 | 1 | 1 |
8ab0c8c8851ce748aac6ee6aa242d3521e1eea2c | db/migrate/20140822093043_restore_slug_index_to_groups.rb | db/migrate/20140822093043_restore_slug_index_to_groups.rb | class RestoreSlugIndexToGroups < ActiveRecord::Migration
Group.all.each do |group|
group.slug = nil
group.save!
end
def change
add_index :groups, :slug
end
end
| class RestoreSlugIndexToGroups < ActiveRecord::Migration
class Group < ActiveRecord::Base
extend FriendlyId
friendly_id :slug_candidates, use: :slugged
has_ancestry cache_depth: true
def slug_candidates
candidates = [name]
candidates << [parent.name, name] if parent.present?
candidates
end
end
def change
Group.all.each do |group|
group.slug = nil
group.save
end
add_index :groups, :slug
end
end
| Update the group slugs and restore the index | Update the group slugs and restore the index
- Note that this migration fails when run in a
batch with this error:
PG::FeatureNotSupported: ERROR:
cached plan must not change result type
- This appears to be caused by executing sql
in the previous migration that adds ancestry
to the group
- If the migration fails, it works the next time
| Ruby | mit | MjAbuz/peoplefinder,heathd/moj_peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder,heathd/moj_peoplefinder | ruby | ## Code Before:
class RestoreSlugIndexToGroups < ActiveRecord::Migration
Group.all.each do |group|
group.slug = nil
group.save!
end
def change
add_index :groups, :slug
end
end
## Instruction:
Update the group slugs and restore the index
- Note that this migration fails when run in a
batch with this error:
PG::FeatureNotSupported: ERROR:
cached plan must not change result type
- This appears to be caused by executing sql
in the previous migration that adds ancestry
to the group
- If the migration fails, it works the next time
## Code After:
class RestoreSlugIndexToGroups < ActiveRecord::Migration
class Group < ActiveRecord::Base
extend FriendlyId
friendly_id :slug_candidates, use: :slugged
has_ancestry cache_depth: true
def slug_candidates
candidates = [name]
candidates << [parent.name, name] if parent.present?
candidates
end
end
def change
Group.all.each do |group|
group.slug = nil
group.save
end
add_index :groups, :slug
end
end
| class RestoreSlugIndexToGroups < ActiveRecord::Migration
- Group.all.each do |group|
- group.slug = nil
- group.save!
+ class Group < ActiveRecord::Base
+
+ extend FriendlyId
+ friendly_id :slug_candidates, use: :slugged
+
+ has_ancestry cache_depth: true
+
+ def slug_candidates
+ candidates = [name]
+ candidates << [parent.name, name] if parent.present?
+ candidates
+ end
end
def change
+ Group.all.each do |group|
+ group.slug = nil
+ group.save
+ end
+
add_index :groups, :slug
end
end | 20 | 2 | 17 | 3 |
07d8540838c1aab448a6de2599a3fd8a310c3635 | config/sidekiq.yml | config/sidekiq.yml | ---
:verbose: true
:concurrency: 2
:logfile: ./log/sidekiq.json.log
:queues:
- content_store # Deprecated, will be removed once all jobs are worked
- content_store_high
- content_store_low
- dependency_resolution
- experiments
- default
| ---
:verbose: true
:logfile: ./log/sidekiq.json.log
:queues:
- content_store # Deprecated, will be removed once all jobs are worked
- content_store_high
- content_store_low
- dependency_resolution
- experiments
- default
| Use the default concurency level | Use the default concurency level
| YAML | mit | alphagov/publishing-api,alphagov/publishing-api | yaml | ## Code Before:
---
:verbose: true
:concurrency: 2
:logfile: ./log/sidekiq.json.log
:queues:
- content_store # Deprecated, will be removed once all jobs are worked
- content_store_high
- content_store_low
- dependency_resolution
- experiments
- default
## Instruction:
Use the default concurency level
## Code After:
---
:verbose: true
:logfile: ./log/sidekiq.json.log
:queues:
- content_store # Deprecated, will be removed once all jobs are worked
- content_store_high
- content_store_low
- dependency_resolution
- experiments
- default
| ---
:verbose: true
- :concurrency: 2
:logfile: ./log/sidekiq.json.log
:queues:
- content_store # Deprecated, will be removed once all jobs are worked
- content_store_high
- content_store_low
- dependency_resolution
- experiments
- default | 1 | 0.090909 | 0 | 1 |
d7232d855d406a26b2485b5c1fcd587e90fddf39 | tests/test_aio.py | tests/test_aio.py | import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
async def test_alock():
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is alock
| import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
async def test_alock(event_loop):
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is alock
| Fix Runtime warnings on async tests | Fix Runtime warnings on async tests
| Python | apache-2.0 | RazerM/ratelimiter | python | ## Code Before:
import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
async def test_alock():
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is alock
## Instruction:
Fix Runtime warnings on async tests
## Code After:
import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
async def test_alock(event_loop):
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is alock
| import pytest
from ratelimiter import RateLimiter
@pytest.mark.asyncio
- async def test_alock():
+ async def test_alock(event_loop):
? ++++++++++
rl = RateLimiter(max_calls=10, period=0.01)
assert rl._alock is None
async with rl:
pass
alock = rl._alock
assert alock
async with rl:
pass
assert rl._alock is alock | 2 | 0.1 | 1 | 1 |
a4c5d13149687fd1142da4e52ed4fdd4eb375f42 | app/views/static/index.html.slim | app/views/static/index.html.slim | .overview
.container
.col-md-8.col-md-offset-2
p Local Welcome connects volunteers and refugees to help them learn English and return to work. We aim to match people with similar skills and qualifications. Groups meet monthly in safe public spaces, and we encourage pairs to also meet monthly for coffee.
.container
.row.chapters
h1 Find a group near you
- @chapters.each do |chapter|
.col-md-4
.chapter-block
h2
= link_to chapter.name, chapter_path(chapter)
- if chapter.next_event.nil?
= link_to "Learn more about this group", chapter_path(chapter), class: "btn btn-large btn-default"
- else
h3
' Next event: #{chapter.next_event.name}
| (in #{distance_of_time_in_words(chapter.next_event.starts_at, Time.now)})
= link_to "Register to attend", chapter_event_path(chapter, chapter.next_event), class: "btn btn-large btn-primary"
/* .row.sponsors */
/* .col-md-2.col-md-offset-2[style="background-color: #a2ded0; min-height: 100px"] */
/* | [Logo goes here] */
/* .col-md-6 */
/* h2 Thanks to our supporters */
/* p Local Welcome has received financial support from the XYXY Group, without which this project would not be possible. This line is more text that exists just to fill out the design, and will be replaced with something real at some point in the future. */
| .overview
.container
.col-md-8.col-md-offset-2
p Local Welcome hosts monthly groups in public spaces to help refugees learn english, volunteer in the community, and return to work.
.container
.row.chapters
h1 Find a group near you
- @chapters.each do |chapter|
.col-md-4
.chapter-block
h2
= link_to chapter.name, chapter_path(chapter)
- if chapter.next_event.nil?
= link_to "Learn more about this group", chapter_path(chapter), class: "btn btn-large btn-default"
- else
h3
' Next event: #{chapter.next_event.name}
| (in #{distance_of_time_in_words(chapter.next_event.starts_at, Time.now)})
= link_to "Register to attend", chapter_event_path(chapter, chapter.next_event), class: "btn btn-large btn-primary"
/* .row.sponsors */
/* .col-md-2.col-md-offset-2[style="background-color: #a2ded0; min-height: 100px"] */
/* | [Logo goes here] */
/* .col-md-6 */
/* h2 Thanks to our supporters */
/* p Local Welcome has received financial support from the XYXY Group, without which this project would not be possible. This line is more text that exists just to fill out the design, and will be replaced with something real at some point in the future. */
| Update front page copy to match latest version from Trello. | Update front page copy to match latest version from Trello.
| Slim | agpl-3.0 | creature/localwelcome,creature/localwelcome,creature/localwelcome | slim | ## Code Before:
.overview
.container
.col-md-8.col-md-offset-2
p Local Welcome connects volunteers and refugees to help them learn English and return to work. We aim to match people with similar skills and qualifications. Groups meet monthly in safe public spaces, and we encourage pairs to also meet monthly for coffee.
.container
.row.chapters
h1 Find a group near you
- @chapters.each do |chapter|
.col-md-4
.chapter-block
h2
= link_to chapter.name, chapter_path(chapter)
- if chapter.next_event.nil?
= link_to "Learn more about this group", chapter_path(chapter), class: "btn btn-large btn-default"
- else
h3
' Next event: #{chapter.next_event.name}
| (in #{distance_of_time_in_words(chapter.next_event.starts_at, Time.now)})
= link_to "Register to attend", chapter_event_path(chapter, chapter.next_event), class: "btn btn-large btn-primary"
/* .row.sponsors */
/* .col-md-2.col-md-offset-2[style="background-color: #a2ded0; min-height: 100px"] */
/* | [Logo goes here] */
/* .col-md-6 */
/* h2 Thanks to our supporters */
/* p Local Welcome has received financial support from the XYXY Group, without which this project would not be possible. This line is more text that exists just to fill out the design, and will be replaced with something real at some point in the future. */
## Instruction:
Update front page copy to match latest version from Trello.
## Code After:
.overview
.container
.col-md-8.col-md-offset-2
p Local Welcome hosts monthly groups in public spaces to help refugees learn english, volunteer in the community, and return to work.
.container
.row.chapters
h1 Find a group near you
- @chapters.each do |chapter|
.col-md-4
.chapter-block
h2
= link_to chapter.name, chapter_path(chapter)
- if chapter.next_event.nil?
= link_to "Learn more about this group", chapter_path(chapter), class: "btn btn-large btn-default"
- else
h3
' Next event: #{chapter.next_event.name}
| (in #{distance_of_time_in_words(chapter.next_event.starts_at, Time.now)})
= link_to "Register to attend", chapter_event_path(chapter, chapter.next_event), class: "btn btn-large btn-primary"
/* .row.sponsors */
/* .col-md-2.col-md-offset-2[style="background-color: #a2ded0; min-height: 100px"] */
/* | [Logo goes here] */
/* .col-md-6 */
/* h2 Thanks to our supporters */
/* p Local Welcome has received financial support from the XYXY Group, without which this project would not be possible. This line is more text that exists just to fill out the design, and will be replaced with something real at some point in the future. */
| .overview
.container
.col-md-8.col-md-offset-2
- p Local Welcome connects volunteers and refugees to help them learn English and return to work. We aim to match people with similar skills and qualifications. Groups meet monthly in safe public spaces, and we encourage pairs to also meet monthly for coffee.
+ p Local Welcome hosts monthly groups in public spaces to help refugees learn english, volunteer in the community, and return to work.
.container
.row.chapters
h1 Find a group near you
- @chapters.each do |chapter|
.col-md-4
.chapter-block
h2
= link_to chapter.name, chapter_path(chapter)
- if chapter.next_event.nil?
= link_to "Learn more about this group", chapter_path(chapter), class: "btn btn-large btn-default"
- else
h3
' Next event: #{chapter.next_event.name}
| (in #{distance_of_time_in_words(chapter.next_event.starts_at, Time.now)})
= link_to "Register to attend", chapter_event_path(chapter, chapter.next_event), class: "btn btn-large btn-primary"
/* .row.sponsors */
/* .col-md-2.col-md-offset-2[style="background-color: #a2ded0; min-height: 100px"] */
/* | [Logo goes here] */
/* .col-md-6 */
/* h2 Thanks to our supporters */
/* p Local Welcome has received financial support from the XYXY Group, without which this project would not be possible. This line is more text that exists just to fill out the design, and will be replaced with something real at some point in the future. */
| 2 | 0.068966 | 1 | 1 |
c8f91cf8b2d5b1d0c59e80b3c0fb9f25a49d935e | src/api/index.js | src/api/index.js | import moment from 'moment';
import { maxPages } from '../../data/config';
// Prevent webpack window problem
const isBrowser = () => typeof window !== 'undefined';
const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false);
const getCurrentPage = () => {
if (isBrowser() === true) {
const str = window.location.pathname;
if (str.indexOf('page') !== -1) {
// Return the last pathname in number
return +window.location.pathname.match(/page[/](\d)/)[1];
}
}
return 0;
};
const getPath = () => (isBrowser() ? window.location.href : '');
const getMaxPages = () => maxPages;
const overflow = () => getCurrentPage() === getMaxPages();
const parseDate = date => moment(date).locale('zh-hk').format('YYYY/MM/DD');
const parseChineseDate = date => moment(date).locale('zh-hk').format('L');
const isFirstPage = () => (isBrowser() ? isPage() : false);
const isLastPage = () => (isBrowser() ? overflow() : false);
export {
isBrowser, isPage,
getCurrentPage, getMaxPages,
overflow, parseDate,
isFirstPage, isLastPage,
parseChineseDate,
getPath,
};
| import moment from 'moment';
import { maxPages } from '../../data/config';
// Prevent webpack window problem
const isBrowser = () => typeof window !== 'undefined';
const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false);
const getCurrentPage = () => {
if (isBrowser() === true) {
const str = window.location.pathname;
if (str.indexOf('page') !== -1) {
// Return the last pathname in number
return +window.location.pathname.match(/page[/](\d)/)[1];
}
}
return 0;
};
const getPath = () => (isBrowser() ? window.location.href : '');
const getMaxPages = () => maxPages;
const overflow = () => getCurrentPage() === getMaxPages();
const parseDate = date => moment(date).locale('zh-hk').format('YYYY/MM/DD');
const parseChineseDate = date => moment(date).locale('zh-hk').format('DD/MM/YYYY');
const isFirstPage = () => (isBrowser() ? isPage() : false);
const isLastPage = () => (isBrowser() ? overflow() : false);
export {
isBrowser, isPage,
getCurrentPage, getMaxPages,
overflow, parseDate,
isFirstPage, isLastPage,
parseChineseDate,
getPath,
};
| Fix date bug in moment.js | Fix date bug in moment.js
| JavaScript | mit | calpa/blog | javascript | ## Code Before:
import moment from 'moment';
import { maxPages } from '../../data/config';
// Prevent webpack window problem
const isBrowser = () => typeof window !== 'undefined';
const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false);
const getCurrentPage = () => {
if (isBrowser() === true) {
const str = window.location.pathname;
if (str.indexOf('page') !== -1) {
// Return the last pathname in number
return +window.location.pathname.match(/page[/](\d)/)[1];
}
}
return 0;
};
const getPath = () => (isBrowser() ? window.location.href : '');
const getMaxPages = () => maxPages;
const overflow = () => getCurrentPage() === getMaxPages();
const parseDate = date => moment(date).locale('zh-hk').format('YYYY/MM/DD');
const parseChineseDate = date => moment(date).locale('zh-hk').format('L');
const isFirstPage = () => (isBrowser() ? isPage() : false);
const isLastPage = () => (isBrowser() ? overflow() : false);
export {
isBrowser, isPage,
getCurrentPage, getMaxPages,
overflow, parseDate,
isFirstPage, isLastPage,
parseChineseDate,
getPath,
};
## Instruction:
Fix date bug in moment.js
## Code After:
import moment from 'moment';
import { maxPages } from '../../data/config';
// Prevent webpack window problem
const isBrowser = () => typeof window !== 'undefined';
const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false);
const getCurrentPage = () => {
if (isBrowser() === true) {
const str = window.location.pathname;
if (str.indexOf('page') !== -1) {
// Return the last pathname in number
return +window.location.pathname.match(/page[/](\d)/)[1];
}
}
return 0;
};
const getPath = () => (isBrowser() ? window.location.href : '');
const getMaxPages = () => maxPages;
const overflow = () => getCurrentPage() === getMaxPages();
const parseDate = date => moment(date).locale('zh-hk').format('YYYY/MM/DD');
const parseChineseDate = date => moment(date).locale('zh-hk').format('DD/MM/YYYY');
const isFirstPage = () => (isBrowser() ? isPage() : false);
const isLastPage = () => (isBrowser() ? overflow() : false);
export {
isBrowser, isPage,
getCurrentPage, getMaxPages,
overflow, parseDate,
isFirstPage, isLastPage,
parseChineseDate,
getPath,
};
| import moment from 'moment';
import { maxPages } from '../../data/config';
// Prevent webpack window problem
const isBrowser = () => typeof window !== 'undefined';
const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false);
const getCurrentPage = () => {
if (isBrowser() === true) {
const str = window.location.pathname;
if (str.indexOf('page') !== -1) {
// Return the last pathname in number
return +window.location.pathname.match(/page[/](\d)/)[1];
}
}
return 0;
};
const getPath = () => (isBrowser() ? window.location.href : '');
const getMaxPages = () => maxPages;
const overflow = () => getCurrentPage() === getMaxPages();
const parseDate = date => moment(date).locale('zh-hk').format('YYYY/MM/DD');
- const parseChineseDate = date => moment(date).locale('zh-hk').format('L');
? ^
+ const parseChineseDate = date => moment(date).locale('zh-hk').format('DD/MM/YYYY');
? ^^^^^^^^^^
const isFirstPage = () => (isBrowser() ? isPage() : false);
const isLastPage = () => (isBrowser() ? overflow() : false);
export {
isBrowser, isPage,
getCurrentPage, getMaxPages,
overflow, parseDate,
isFirstPage, isLastPage,
parseChineseDate,
getPath,
}; | 2 | 0.047619 | 1 | 1 |
5ac98cb1f050356ed3703fa94059be57fb61b256 | scss/forms/_fieldset.scss | scss/forms/_fieldset.scss | // Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
////
/// @group forms
////
/// Default border around custom fieldsets.
/// @type Border
$fieldset-border: 1px solid $medium-gray !default;
/// Default padding inside custom fieldsets.
/// @type Number
$fieldset-padding: rem-calc(20) !default;
/// Default margin around custom fieldsets.
/// @type Number
$fieldset-margin: rem-calc(18 0) !default;
/// Default padding between the legend text and fieldset border.
/// @type Number
$legend-padding: rem-calc(0 3) !default;
@mixin fieldset {
margin: $fieldset-margin;
padding: $fieldset-padding;
border: $fieldset-border;
legend {
// Covers up the fieldset's border to create artificial padding
margin: 0;
margin-#{$global-left}: rem-calc(-3);
padding: $legend-padding;
background: $body-background;
}
}
@mixin foundation-form-fieldset {
fieldset {
margin: 0;
padding: 0;
border: 0;
}
legend {
max-width: 100%;
margin-bottom: $form-spacing * 0.5;
}
.fieldset {
@include fieldset;
}
}
| // Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
////
/// @group forms
////
/// Default border around custom fieldsets.
/// @type Border
$fieldset-border: 1px solid $medium-gray !default;
/// Default padding inside custom fieldsets.
/// @type Number
$fieldset-padding: rem-calc(20) !default;
/// Default margin around custom fieldsets.
/// @type Number
$fieldset-margin: rem-calc(18 0) !default;
/// Default padding between the legend text and fieldset border.
/// @type Number
$legend-padding: rem-calc(0 3) !default;
@mixin fieldset {
margin: $fieldset-margin;
padding: $fieldset-padding;
border: $fieldset-border;
legend {
// Covers up the fieldset's border to create artificial padding
margin: 0;
margin-#{$global-left}: rem-calc(-3);
padding: $legend-padding;
}
}
@mixin foundation-form-fieldset {
fieldset {
margin: 0;
padding: 0;
border: 0;
}
legend {
max-width: 100%;
margin-bottom: $form-spacing * 0.5;
}
.fieldset {
@include fieldset;
}
}
| Remove background color from styled <legend> | Remove background color from styled <legend>
Fixes #10254.
Removing the colour makes no difference to the display and allows the element to be placed on areas with different background colours without having to override the element's CSS.
| SCSS | mit | denisahac/foundation-sites,jamesstoneco/foundation-sites,IamManchanda/foundation-sites,zurb/foundation,Owlbertz/foundation,jamesstoneco/foundation-sites,denisahac/foundation-sites,ucla/foundation-sites,IamManchanda/foundation-sites,ucla/foundation-sites,abdullahsalem/foundation-sites,ucla/foundation-sites,DaSchTour/foundation-sites,jaylensoeur/foundation-sites-6,atmmarketing/foundation-sites,colin-marshall/foundation-sites,jamesstoneco/foundation-sites,colin-marshall/foundation-sites,DaSchTour/foundation-sites,jaylensoeur/foundation-sites-6,zurb/foundation,denisahac/foundation-sites,IamManchanda/foundation-sites,aoimedia/foundation,aoimedia/foundation,aoimedia/foundation,zurb/foundation,abdullahsalem/foundation-sites,jaylensoeur/foundation-sites-6,colin-marshall/foundation-sites,dragthor/foundation-sites,Owlbertz/foundation,atmmarketing/foundation-sites,Owlbertz/foundation,zurb/foundation-sites,zurb/foundation-sites,zurb/foundation-sites,dragthor/foundation-sites,abdullahsalem/foundation-sites,dragthor/foundation-sites,atmmarketing/foundation-sites,Owlbertz/foundation | scss | ## Code Before:
// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
////
/// @group forms
////
/// Default border around custom fieldsets.
/// @type Border
$fieldset-border: 1px solid $medium-gray !default;
/// Default padding inside custom fieldsets.
/// @type Number
$fieldset-padding: rem-calc(20) !default;
/// Default margin around custom fieldsets.
/// @type Number
$fieldset-margin: rem-calc(18 0) !default;
/// Default padding between the legend text and fieldset border.
/// @type Number
$legend-padding: rem-calc(0 3) !default;
@mixin fieldset {
margin: $fieldset-margin;
padding: $fieldset-padding;
border: $fieldset-border;
legend {
// Covers up the fieldset's border to create artificial padding
margin: 0;
margin-#{$global-left}: rem-calc(-3);
padding: $legend-padding;
background: $body-background;
}
}
@mixin foundation-form-fieldset {
fieldset {
margin: 0;
padding: 0;
border: 0;
}
legend {
max-width: 100%;
margin-bottom: $form-spacing * 0.5;
}
.fieldset {
@include fieldset;
}
}
## Instruction:
Remove background color from styled <legend>
Fixes #10254.
Removing the colour makes no difference to the display and allows the element to be placed on areas with different background colours without having to override the element's CSS.
## Code After:
// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
////
/// @group forms
////
/// Default border around custom fieldsets.
/// @type Border
$fieldset-border: 1px solid $medium-gray !default;
/// Default padding inside custom fieldsets.
/// @type Number
$fieldset-padding: rem-calc(20) !default;
/// Default margin around custom fieldsets.
/// @type Number
$fieldset-margin: rem-calc(18 0) !default;
/// Default padding between the legend text and fieldset border.
/// @type Number
$legend-padding: rem-calc(0 3) !default;
@mixin fieldset {
margin: $fieldset-margin;
padding: $fieldset-padding;
border: $fieldset-border;
legend {
// Covers up the fieldset's border to create artificial padding
margin: 0;
margin-#{$global-left}: rem-calc(-3);
padding: $legend-padding;
}
}
@mixin foundation-form-fieldset {
fieldset {
margin: 0;
padding: 0;
border: 0;
}
legend {
max-width: 100%;
margin-bottom: $form-spacing * 0.5;
}
.fieldset {
@include fieldset;
}
}
| // Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source
////
/// @group forms
////
/// Default border around custom fieldsets.
/// @type Border
$fieldset-border: 1px solid $medium-gray !default;
/// Default padding inside custom fieldsets.
/// @type Number
$fieldset-padding: rem-calc(20) !default;
/// Default margin around custom fieldsets.
/// @type Number
$fieldset-margin: rem-calc(18 0) !default;
/// Default padding between the legend text and fieldset border.
/// @type Number
$legend-padding: rem-calc(0 3) !default;
@mixin fieldset {
margin: $fieldset-margin;
padding: $fieldset-padding;
border: $fieldset-border;
legend {
// Covers up the fieldset's border to create artificial padding
margin: 0;
margin-#{$global-left}: rem-calc(-3);
padding: $legend-padding;
- background: $body-background;
}
}
@mixin foundation-form-fieldset {
fieldset {
margin: 0;
padding: 0;
border: 0;
}
legend {
max-width: 100%;
margin-bottom: $form-spacing * 0.5;
}
.fieldset {
@include fieldset;
}
} | 1 | 0.018519 | 0 | 1 |
f69a95fa1f1820d5e6609430375c67cdc0d9c742 | src/rdb_protocol/configured_limits.cc | src/rdb_protocol/configured_limits.cc |
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fake an environment with no arguments. We have to fake it
// because of a chicken/egg problem; this function gets called
// before there are any extant environments at all. Only
// because we use an empty argument list do we prevent an
// infinite loop.
env_t env(ctx, interruptor, std::map<std::string, wire_func_t>(),
nullptr);
int64_t limit = arguments->get_optarg(&env, "array_limit")->as_int();
rcheck_datum(limit > 1, base_exc_t::GENERIC,
strprintf("Illegal array size limit `%ld`.", limit));
return configured_limits_t(limit);
} else {
return configured_limits_t();
}
}
RDB_IMPL_ME_SERIALIZABLE_1(configured_limits_t, array_size_limit_);
INSTANTIATE_SERIALIZABLE_SELF_FOR_CLUSTER(configured_limits_t);
const configured_limits_t configured_limits_t::unlimited(std::numeric_limits<size_t>::max());
} // namespace ql
|
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fake an environment with no arguments. We have to fake it
// because of a chicken/egg problem; this function gets called
// before there are any extant environments at all. Only
// because we use an empty argument list do we prevent an
// infinite loop.
env_t env(ctx, interruptor, std::map<std::string, wire_func_t>(),
nullptr);
int64_t limit = arguments->get_optarg(&env, "array_limit")->as_int();
rcheck_datum(limit > 1, base_exc_t::GENERIC,
strprintf("Illegal array size limit `%" PRIi64 "`.", limit));
return configured_limits_t(limit);
} else {
return configured_limits_t();
}
}
RDB_IMPL_ME_SERIALIZABLE_1(configured_limits_t, array_size_limit_);
INSTANTIATE_SERIALIZABLE_SELF_FOR_CLUSTER(configured_limits_t);
const configured_limits_t configured_limits_t::unlimited(std::numeric_limits<size_t>::max());
} // namespace ql
| Use PRIi64 macro to work around clang weirdness. | Use PRIi64 macro to work around clang weirdness.
| C++ | apache-2.0 | gdi2290/rethinkdb,captainpete/rethinkdb,ajose01/rethinkdb,lenstr/rethinkdb,yakovenkodenis/rethinkdb,wkennington/rethinkdb,grandquista/rethinkdb,mcanthony/rethinkdb,bpradipt/rethinkdb,eliangidoni/rethinkdb,scripni/rethinkdb,jmptrader/rethinkdb,wkennington/rethinkdb,matthaywardwebdesign/rethinkdb,urandu/rethinkdb,victorbriz/rethinkdb,jmptrader/rethinkdb,ajose01/rethinkdb,ajose01/rethinkdb,yakovenkodenis/rethinkdb,urandu/rethinkdb,sbusso/rethinkdb,spblightadv/rethinkdb,lenstr/rethinkdb,4talesa/rethinkdb,greyhwndz/rethinkdb,mbroadst/rethinkdb,mcanthony/rethinkdb,jmptrader/rethinkdb,ajose01/rethinkdb,mbroadst/rethinkdb,scripni/rethinkdb,victorbriz/rethinkdb,yakovenkodenis/rethinkdb,wojons/rethinkdb,robertjpayne/rethinkdb,niieani/rethinkdb,tempbottle/rethinkdb,robertjpayne/rethinkdb,4talesa/rethinkdb,wujf/rethinkdb,RubenKelevra/rethinkdb,niieani/rethinkdb,ajose01/rethinkdb,dparnell/rethinkdb,ayumilong/rethinkdb,AntouanK/rethinkdb,mquandalle/rethinkdb,matthaywardwebdesign/rethinkdb,bpradipt/rethinkdb,Qinusty/rethinkdb,jesseditson/rethinkdb,scripni/rethinkdb,sebadiaz/rethinkdb,jesseditson/rethinkdb,KSanthanam/rethinkdb,AntouanK/rethinkdb,urandu/rethinkdb,rrampage/rethinkdb,mquandalle/rethinkdb,matthaywardwebdesign/rethinkdb,KSanthanam/rethinkdb,JackieXie168/rethinkdb,robertjpayne/rethinkdb,marshall007/rethinkdb,sbusso/rethinkdb,yaolinz/rethinkdb,spblightadv/rethinkdb,wujf/rethinkdb,dparnell/rethinkdb,mcanthony/rethinkdb,eliangidoni/rethinkdb,pap/rethinkdb,losywee/rethinkdb,gavioto/rethinkdb,alash3al/rethinkdb,yaolinz/rethinkdb,alash3al/rethinkdb,rrampage/rethinkdb,niieani/rethinkdb,RubenKelevra/rethinkdb,catroot/rethinkdb,ayumilong/rethinkdb,AntouanK/rethinkdb,pap/rethinkdb,4talesa/rethinkdb,yakovenkodenis/rethinkdb,wujf/rethinkdb,yakovenkodenis/rethinkdb,sebadiaz/rethinkdb,pap/rethinkdb,robertjpayne/rethinkdb,scripni/rethinkdb,lenstr/rethinkdb,robertjpayne/rethinkdb,dparnell/rethinkdb,sontek/rethinkdb,jesseditson/rethinkdb,losywee/rethinkdb,greyhwndz/rethinkdb,sbusso/rethinkdb,sbusso/rethinkdb,wojons/rethinkdb,bchavez/rethinkdb,losywee/rethinkdb,Qinusty/rethinkdb,alash3al/rethinkdb,elkingtonmcb/rethinkdb,jesseditson/rethinkdb,Qinusty/rethinkdb,AntouanK/rethinkdb,jmptrader/rethinkdb,catroot/rethinkdb,rrampage/rethinkdb,sebadiaz/rethinkdb,elkingtonmcb/rethinkdb,eliangidoni/rethinkdb,grandquista/rethinkdb,yaolinz/rethinkdb,JackieXie168/rethinkdb,tempbottle/rethinkdb,sontek/rethinkdb,rrampage/rethinkdb,losywee/rethinkdb,pap/rethinkdb,tempbottle/rethinkdb,robertjpayne/rethinkdb,alash3al/rethinkdb,wkennington/rethinkdb,sebadiaz/rethinkdb,KSanthanam/rethinkdb,Wilbeibi/rethinkdb,victorbriz/rethinkdb,catroot/rethinkdb,AntouanK/rethinkdb,AntouanK/rethinkdb,urandu/rethinkdb,marshall007/rethinkdb,urandu/rethinkdb,mquandalle/rethinkdb,ayumilong/rethinkdb,mquandalle/rethinkdb,tempbottle/rethinkdb,4talesa/rethinkdb,mquandalle/rethinkdb,eliangidoni/rethinkdb,sbusso/rethinkdb,captainpete/rethinkdb,wojons/rethinkdb,niieani/rethinkdb,sebadiaz/rethinkdb,catroot/rethinkdb,lenstr/rethinkdb,RubenKelevra/rethinkdb,grandquista/rethinkdb,catroot/rethinkdb,wojons/rethinkdb,bpradipt/rethinkdb,wojons/rethinkdb,marshall007/rethinkdb,gdi2290/rethinkdb,captainpete/rethinkdb,elkingtonmcb/rethinkdb,yaolinz/rethinkdb,pap/rethinkdb,niieani/rethinkdb,ayumilong/rethinkdb,ajose01/rethinkdb,rrampage/rethinkdb,yaolinz/rethinkdb,catroot/rethinkdb,mquandalle/rethinkdb,sontek/rethinkdb,scripni/rethinkdb,captainpete/rethinkdb,Qinusty/rethinkdb,Wilbeibi/rethinkdb,rrampage/rethinkdb,catroot/rethinkdb,marshall007/rethinkdb,ayumilong/rethinkdb,bchavez/rethinkdb,wkennington/rethinkdb,rrampage/rethinkdb,wujf/rethinkdb,sontek/rethinkdb,yakovenkodenis/rethinkdb,gavioto/rethinkdb,gavioto/rethinkdb,ayumilong/rethinkdb,sbusso/rethinkdb,KSanthanam/rethinkdb,ajose01/rethinkdb,losywee/rethinkdb,bchavez/rethinkdb,mcanthony/rethinkdb,dparnell/rethinkdb,sbusso/rethinkdb,RubenKelevra/rethinkdb,gdi2290/rethinkdb,bchavez/rethinkdb,bchavez/rethinkdb,niieani/rethinkdb,bpradipt/rethinkdb,bpradipt/rethinkdb,lenstr/rethinkdb,scripni/rethinkdb,niieani/rethinkdb,eliangidoni/rethinkdb,mquandalle/rethinkdb,4talesa/rethinkdb,bpradipt/rethinkdb,AntouanK/rethinkdb,wojons/rethinkdb,mbroadst/rethinkdb,wujf/rethinkdb,wkennington/rethinkdb,grandquista/rethinkdb,eliangidoni/rethinkdb,marshall007/rethinkdb,catroot/rethinkdb,KSanthanam/rethinkdb,tempbottle/rethinkdb,losywee/rethinkdb,wkennington/rethinkdb,captainpete/rethinkdb,gdi2290/rethinkdb,wujf/rethinkdb,yakovenkodenis/rethinkdb,marshall007/rethinkdb,alash3al/rethinkdb,mcanthony/rethinkdb,Qinusty/rethinkdb,losywee/rethinkdb,JackieXie168/rethinkdb,mbroadst/rethinkdb,dparnell/rethinkdb,elkingtonmcb/rethinkdb,bpradipt/rethinkdb,Wilbeibi/rethinkdb,Qinusty/rethinkdb,mbroadst/rethinkdb,matthaywardwebdesign/rethinkdb,captainpete/rethinkdb,spblightadv/rethinkdb,rrampage/rethinkdb,yaolinz/rethinkdb,matthaywardwebdesign/rethinkdb,spblightadv/rethinkdb,victorbriz/rethinkdb,Qinusty/rethinkdb,sontek/rethinkdb,eliangidoni/rethinkdb,gavioto/rethinkdb,sebadiaz/rethinkdb,yaolinz/rethinkdb,pap/rethinkdb,JackieXie168/rethinkdb,matthaywardwebdesign/rethinkdb,grandquista/rethinkdb,Wilbeibi/rethinkdb,sontek/rethinkdb,captainpete/rethinkdb,tempbottle/rethinkdb,victorbriz/rethinkdb,elkingtonmcb/rethinkdb,niieani/rethinkdb,victorbriz/rethinkdb,gavioto/rethinkdb,greyhwndz/rethinkdb,gdi2290/rethinkdb,captainpete/rethinkdb,greyhwndz/rethinkdb,alash3al/rethinkdb,jesseditson/rethinkdb,JackieXie168/rethinkdb,mquandalle/rethinkdb,spblightadv/rethinkdb,bpradipt/rethinkdb,dparnell/rethinkdb,wujf/rethinkdb,matthaywardwebdesign/rethinkdb,greyhwndz/rethinkdb,sontek/rethinkdb,sontek/rethinkdb,yaolinz/rethinkdb,JackieXie168/rethinkdb,robertjpayne/rethinkdb,scripni/rethinkdb,gavioto/rethinkdb,greyhwndz/rethinkdb,mcanthony/rethinkdb,RubenKelevra/rethinkdb,spblightadv/rethinkdb,gavioto/rethinkdb,wojons/rethinkdb,grandquista/rethinkdb,urandu/rethinkdb,matthaywardwebdesign/rethinkdb,4talesa/rethinkdb,elkingtonmcb/rethinkdb,Wilbeibi/rethinkdb,marshall007/rethinkdb,4talesa/rethinkdb,greyhwndz/rethinkdb,gdi2290/rethinkdb,jesseditson/rethinkdb,lenstr/rethinkdb,dparnell/rethinkdb,mbroadst/rethinkdb,ayumilong/rethinkdb,mcanthony/rethinkdb,gdi2290/rethinkdb,bchavez/rethinkdb,ayumilong/rethinkdb,sebadiaz/rethinkdb,wkennington/rethinkdb,wojons/rethinkdb,Wilbeibi/rethinkdb,mbroadst/rethinkdb,Qinusty/rethinkdb,scripni/rethinkdb,lenstr/rethinkdb,RubenKelevra/rethinkdb,losywee/rethinkdb,grandquista/rethinkdb,elkingtonmcb/rethinkdb,grandquista/rethinkdb,sebadiaz/rethinkdb,robertjpayne/rethinkdb,KSanthanam/rethinkdb,mcanthony/rethinkdb,victorbriz/rethinkdb,jesseditson/rethinkdb,RubenKelevra/rethinkdb,Wilbeibi/rethinkdb,dparnell/rethinkdb,jesseditson/rethinkdb,elkingtonmcb/rethinkdb,dparnell/rethinkdb,JackieXie168/rethinkdb,grandquista/rethinkdb,bchavez/rethinkdb,Wilbeibi/rethinkdb,gavioto/rethinkdb,spblightadv/rethinkdb,KSanthanam/rethinkdb,mbroadst/rethinkdb,alash3al/rethinkdb,sbusso/rethinkdb,Qinusty/rethinkdb,eliangidoni/rethinkdb,tempbottle/rethinkdb,KSanthanam/rethinkdb,jmptrader/rethinkdb,eliangidoni/rethinkdb,JackieXie168/rethinkdb,jmptrader/rethinkdb,robertjpayne/rethinkdb,spblightadv/rethinkdb,jmptrader/rethinkdb,lenstr/rethinkdb,yakovenkodenis/rethinkdb,JackieXie168/rethinkdb,bchavez/rethinkdb,pap/rethinkdb,RubenKelevra/rethinkdb,urandu/rethinkdb,wkennington/rethinkdb,pap/rethinkdb,marshall007/rethinkdb,ajose01/rethinkdb,urandu/rethinkdb,AntouanK/rethinkdb,4talesa/rethinkdb,bchavez/rethinkdb,greyhwndz/rethinkdb,tempbottle/rethinkdb,mbroadst/rethinkdb,bpradipt/rethinkdb,victorbriz/rethinkdb,jmptrader/rethinkdb,alash3al/rethinkdb | c++ | ## Code Before:
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fake an environment with no arguments. We have to fake it
// because of a chicken/egg problem; this function gets called
// before there are any extant environments at all. Only
// because we use an empty argument list do we prevent an
// infinite loop.
env_t env(ctx, interruptor, std::map<std::string, wire_func_t>(),
nullptr);
int64_t limit = arguments->get_optarg(&env, "array_limit")->as_int();
rcheck_datum(limit > 1, base_exc_t::GENERIC,
strprintf("Illegal array size limit `%ld`.", limit));
return configured_limits_t(limit);
} else {
return configured_limits_t();
}
}
RDB_IMPL_ME_SERIALIZABLE_1(configured_limits_t, array_size_limit_);
INSTANTIATE_SERIALIZABLE_SELF_FOR_CLUSTER(configured_limits_t);
const configured_limits_t configured_limits_t::unlimited(std::numeric_limits<size_t>::max());
} // namespace ql
## Instruction:
Use PRIi64 macro to work around clang weirdness.
## Code After:
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fake an environment with no arguments. We have to fake it
// because of a chicken/egg problem; this function gets called
// before there are any extant environments at all. Only
// because we use an empty argument list do we prevent an
// infinite loop.
env_t env(ctx, interruptor, std::map<std::string, wire_func_t>(),
nullptr);
int64_t limit = arguments->get_optarg(&env, "array_limit")->as_int();
rcheck_datum(limit > 1, base_exc_t::GENERIC,
strprintf("Illegal array size limit `%" PRIi64 "`.", limit));
return configured_limits_t(limit);
} else {
return configured_limits_t();
}
}
RDB_IMPL_ME_SERIALIZABLE_1(configured_limits_t, array_size_limit_);
INSTANTIATE_SERIALIZABLE_SELF_FOR_CLUSTER(configured_limits_t);
const configured_limits_t configured_limits_t::unlimited(std::numeric_limits<size_t>::max());
} // namespace ql
|
namespace ql {
configured_limits_t
from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments)
{
if (arguments->has_optarg("array_limit")) {
// Fake an environment with no arguments. We have to fake it
// because of a chicken/egg problem; this function gets called
// before there are any extant environments at all. Only
// because we use an empty argument list do we prevent an
// infinite loop.
env_t env(ctx, interruptor, std::map<std::string, wire_func_t>(),
nullptr);
int64_t limit = arguments->get_optarg(&env, "array_limit")->as_int();
rcheck_datum(limit > 1, base_exc_t::GENERIC,
- strprintf("Illegal array size limit `%ld`.", limit));
? ^^
+ strprintf("Illegal array size limit `%" PRIi64 "`.", limit));
? ^^^^^^^^^^
return configured_limits_t(limit);
} else {
return configured_limits_t();
}
}
RDB_IMPL_ME_SERIALIZABLE_1(configured_limits_t, array_size_limit_);
INSTANTIATE_SERIALIZABLE_SELF_FOR_CLUSTER(configured_limits_t);
const configured_limits_t configured_limits_t::unlimited(std::numeric_limits<size_t>::max());
} // namespace ql | 2 | 0.071429 | 1 | 1 |
b21badaf6a62965ece0bbcaf108edb2b5fcacd0b | codecov.yml | codecov.yml | comment: false
coverage:
status:
project: # settings affecting project coverage
default:
target: auto # auto % coverage target
threshold: 1% # allow for 1% reduction of coverage without failing
| comment: false
coverage:
status:
project: # settings affecting project coverage
default:
target: auto # auto % coverage target
threshold: 1% # allow for 1% reduction of coverage without failing
github_checks:
annotations: false
| Disable GitHub Checks Patch Annotations | Disable GitHub Checks Patch Annotations
Signed-off-by: CrazyMax <2eb8101acbc78c0d8bc50c0413737c84f1fc3bdc@users.noreply.github.com>
| YAML | apache-2.0 | tonistiigi/buildkit_poc,tonistiigi/buildkit_poc | yaml | ## Code Before:
comment: false
coverage:
status:
project: # settings affecting project coverage
default:
target: auto # auto % coverage target
threshold: 1% # allow for 1% reduction of coverage without failing
## Instruction:
Disable GitHub Checks Patch Annotations
Signed-off-by: CrazyMax <2eb8101acbc78c0d8bc50c0413737c84f1fc3bdc@users.noreply.github.com>
## Code After:
comment: false
coverage:
status:
project: # settings affecting project coverage
default:
target: auto # auto % coverage target
threshold: 1% # allow for 1% reduction of coverage without failing
github_checks:
annotations: false
| comment: false
coverage:
status:
project: # settings affecting project coverage
default:
target: auto # auto % coverage target
threshold: 1% # allow for 1% reduction of coverage without failing
+
+ github_checks:
+ annotations: false | 3 | 0.375 | 3 | 0 |
348cff3fef4c1bcbbb091ddae9ac407179e08011 | build.py | build.py |
import sys
import os
from Scripts.common import get_ini_conf, write_ini_conf
if __name__ == "__main__":
# Python 2 compatibility
if sys.version_info.major > 2:
raw_input = input
config = get_ini_conf("config.ini")
# Find cached module name
if "module_name" not in config or not config["module_name"]:
module_name = str(raw_input("Enter a module name: "))
config["module_name"] = module_name.strip()
# Write back config
write_ini_conf(config, "config.ini")
# Just execute the build script
from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
make_output_dir()
run_cmake(config)
run_cmake_build(config)
print("Success!")
sys.exit(0)
|
import sys
import os
from os.path import join, realpath, dirname
from Scripts.common import get_ini_conf, write_ini_conf
if __name__ == "__main__":
# Python 2 compatibility
if sys.version_info.major > 2:
raw_input = input
config_file = join(dirname(realpath(__file__)), "config.ini")
config = get_ini_conf(config_file)
# Find cached module name
if "module_name" not in config or not config["module_name"]:
module_name = str(raw_input("Enter a module name: "))
config["module_name"] = module_name.strip()
# Write back config
write_ini_conf(config, config_file)
# Just execute the build script
from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
make_output_dir()
run_cmake(config)
run_cmake_build(config)
print("Success!")
sys.exit(0)
| Fix issue when the cwd is not in the config directory | Fix issue when the cwd is not in the config directory
| Python | mit | tobspr/P3DModuleBuilder,tobspr/P3DModuleBuilder,tobspr/P3DModuleBuilder | python | ## Code Before:
import sys
import os
from Scripts.common import get_ini_conf, write_ini_conf
if __name__ == "__main__":
# Python 2 compatibility
if sys.version_info.major > 2:
raw_input = input
config = get_ini_conf("config.ini")
# Find cached module name
if "module_name" not in config or not config["module_name"]:
module_name = str(raw_input("Enter a module name: "))
config["module_name"] = module_name.strip()
# Write back config
write_ini_conf(config, "config.ini")
# Just execute the build script
from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
make_output_dir()
run_cmake(config)
run_cmake_build(config)
print("Success!")
sys.exit(0)
## Instruction:
Fix issue when the cwd is not in the config directory
## Code After:
import sys
import os
from os.path import join, realpath, dirname
from Scripts.common import get_ini_conf, write_ini_conf
if __name__ == "__main__":
# Python 2 compatibility
if sys.version_info.major > 2:
raw_input = input
config_file = join(dirname(realpath(__file__)), "config.ini")
config = get_ini_conf(config_file)
# Find cached module name
if "module_name" not in config or not config["module_name"]:
module_name = str(raw_input("Enter a module name: "))
config["module_name"] = module_name.strip()
# Write back config
write_ini_conf(config, config_file)
# Just execute the build script
from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
make_output_dir()
run_cmake(config)
run_cmake_build(config)
print("Success!")
sys.exit(0)
|
import sys
import os
+ from os.path import join, realpath, dirname
from Scripts.common import get_ini_conf, write_ini_conf
if __name__ == "__main__":
# Python 2 compatibility
if sys.version_info.major > 2:
raw_input = input
+ config_file = join(dirname(realpath(__file__)), "config.ini")
- config = get_ini_conf("config.ini")
? - ^ ^^^
+ config = get_ini_conf(config_file)
? ^^ ^^
# Find cached module name
if "module_name" not in config or not config["module_name"]:
module_name = str(raw_input("Enter a module name: "))
config["module_name"] = module_name.strip()
# Write back config
- write_ini_conf(config, "config.ini")
? - ^ ^^^
+ write_ini_conf(config, config_file)
? ^^ ^^
# Just execute the build script
from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
make_output_dir()
run_cmake(config)
run_cmake_build(config)
print("Success!")
sys.exit(0) | 6 | 0.2 | 4 | 2 |
cdebd6bdd109c39732a6c3ad60bbea3225bf9327 | TC/control/NavBar.js | TC/control/NavBar.js | TC.control = TC.control || {};
if (!TC.Control) {
TC.syncLoadJS(TC.apiLocation + 'TC/Control');
}
TC.control.NavBar = function () {
TC.Control.apply(this, arguments);
};
TC.inherit(TC.control.NavBar, TC.Control);
(function () {
var ctlProto = TC.control.NavBar.prototype;
ctlProto.CLASS = 'tc-ctl-nav';
ctlProto.render = function () {
var self = this;
if (!self.wrap) {
self.wrap = new TC.wrap.control.NavBar(self);
}
};
ctlProto.register = function (map) {
var self = this;
TC.Control.prototype.register.call(self, map);
self.wrap.register(map);
//esta chama es para que la primera vez se ajuste la barrita de escala (debido a otra chama con el maxResolution, que es culpa de OL)
map.loaded(function () {
self.wrap.refresh();
});
};
})(); | TC.control = TC.control || {};
if (!TC.Control) {
TC.syncLoadJS(TC.apiLocation + 'TC/Control');
}
TC.control.NavBar = function () {
TC.Control.apply(this, arguments);
};
TC.inherit(TC.control.NavBar, TC.Control);
(function () {
var ctlProto = TC.control.NavBar.prototype;
ctlProto.CLASS = 'tc-ctl-nav';
ctlProto.render = function () {
var self = this;
if (!self.wrap) {
self.wrap = new TC.wrap.control.NavBar(self);
}
};
ctlProto.register = function (map) {
var self = this;
TC.Control.prototype.register.call(self, map);
self.wrap.register(map);
//esta chama es para que la primera vez se ajuste la barrita de escala (debido a otra chama con el maxResolution, que es culpa de OL)
map.loaded(function () {
self.wrap.refresh();
});
map.on(TC.Consts.event.PROJECTIONCHANGE, function (e) {
var bottomLeft = TC.Util.reproject([map.options.initialExtent[0], map.options.initialExtent[1]], map.options.crs, e.crs);
var topRight = TC.Util.reproject([map.options.initialExtent[2], map.options.initialExtent[3]], map.options.crs, e.crs);
self.wrap.setInitialExtent([bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]]);
});
};
})(); | Add support to projection changes | Add support to projection changes
| JavaScript | bsd-2-clause | sitna/api-sitna,sitna/api-sitna | javascript | ## Code Before:
TC.control = TC.control || {};
if (!TC.Control) {
TC.syncLoadJS(TC.apiLocation + 'TC/Control');
}
TC.control.NavBar = function () {
TC.Control.apply(this, arguments);
};
TC.inherit(TC.control.NavBar, TC.Control);
(function () {
var ctlProto = TC.control.NavBar.prototype;
ctlProto.CLASS = 'tc-ctl-nav';
ctlProto.render = function () {
var self = this;
if (!self.wrap) {
self.wrap = new TC.wrap.control.NavBar(self);
}
};
ctlProto.register = function (map) {
var self = this;
TC.Control.prototype.register.call(self, map);
self.wrap.register(map);
//esta chama es para que la primera vez se ajuste la barrita de escala (debido a otra chama con el maxResolution, que es culpa de OL)
map.loaded(function () {
self.wrap.refresh();
});
};
})();
## Instruction:
Add support to projection changes
## Code After:
TC.control = TC.control || {};
if (!TC.Control) {
TC.syncLoadJS(TC.apiLocation + 'TC/Control');
}
TC.control.NavBar = function () {
TC.Control.apply(this, arguments);
};
TC.inherit(TC.control.NavBar, TC.Control);
(function () {
var ctlProto = TC.control.NavBar.prototype;
ctlProto.CLASS = 'tc-ctl-nav';
ctlProto.render = function () {
var self = this;
if (!self.wrap) {
self.wrap = new TC.wrap.control.NavBar(self);
}
};
ctlProto.register = function (map) {
var self = this;
TC.Control.prototype.register.call(self, map);
self.wrap.register(map);
//esta chama es para que la primera vez se ajuste la barrita de escala (debido a otra chama con el maxResolution, que es culpa de OL)
map.loaded(function () {
self.wrap.refresh();
});
map.on(TC.Consts.event.PROJECTIONCHANGE, function (e) {
var bottomLeft = TC.Util.reproject([map.options.initialExtent[0], map.options.initialExtent[1]], map.options.crs, e.crs);
var topRight = TC.Util.reproject([map.options.initialExtent[2], map.options.initialExtent[3]], map.options.crs, e.crs);
self.wrap.setInitialExtent([bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]]);
});
};
})(); | TC.control = TC.control || {};
if (!TC.Control) {
TC.syncLoadJS(TC.apiLocation + 'TC/Control');
}
TC.control.NavBar = function () {
TC.Control.apply(this, arguments);
};
TC.inherit(TC.control.NavBar, TC.Control);
(function () {
var ctlProto = TC.control.NavBar.prototype;
ctlProto.CLASS = 'tc-ctl-nav';
ctlProto.render = function () {
var self = this;
if (!self.wrap) {
self.wrap = new TC.wrap.control.NavBar(self);
}
};
ctlProto.register = function (map) {
var self = this;
TC.Control.prototype.register.call(self, map);
self.wrap.register(map);
//esta chama es para que la primera vez se ajuste la barrita de escala (debido a otra chama con el maxResolution, que es culpa de OL)
map.loaded(function () {
self.wrap.refresh();
});
+
+ map.on(TC.Consts.event.PROJECTIONCHANGE, function (e) {
+ var bottomLeft = TC.Util.reproject([map.options.initialExtent[0], map.options.initialExtent[1]], map.options.crs, e.crs);
+ var topRight = TC.Util.reproject([map.options.initialExtent[2], map.options.initialExtent[3]], map.options.crs, e.crs);
+ self.wrap.setInitialExtent([bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]]);
+ });
};
})(); | 6 | 0.166667 | 6 | 0 |
3da570842c8b130da217d1f29716daf1e72ff2e8 | core/lib/spree/localized_number.rb | core/lib/spree/localized_number.rb | module Spree
class LocalizedNumber
# Strips all non-price-like characters from the number, taking into account locale settings.
def self.parse(number)
return number unless number.is_a?(String)
separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
non_number_characters = /[^0-9\-#{separator}]/
# strip everything else first
number.gsub!(non_number_characters, '')
# then replace the locale-specific decimal separator with the standard separator if necessary
number.gsub!(separator, '.') unless separator == '.'
number.to_d
end
end
end
| module Spree
class LocalizedNumber
# Strips all non-price-like characters from the number, taking into account locale settings.
def self.parse(number)
return number unless number.is_a?(String)
separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
non_number_characters = /[^0-9\-#{separator}]/
# work on a copy, prevent original argument modification
number = number.dup
# strip everything else first, including thousands delimiter
number.gsub!(non_number_characters, '')
# then replace the locale-specific decimal separator with the standard separator if necessary
number.gsub!(separator, '.') unless separator == '.'
number.to_d
end
end
end
| Fix of bug in `Spree::LocalizedNumber.parse`, which mangles object passed as an argument. | Fix of bug in `Spree::LocalizedNumber.parse`, which mangles object passed as an argument.
| Ruby | bsd-3-clause | yushine/spree,yushine/spree,yushine/spree,yushine/spree | ruby | ## Code Before:
module Spree
class LocalizedNumber
# Strips all non-price-like characters from the number, taking into account locale settings.
def self.parse(number)
return number unless number.is_a?(String)
separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
non_number_characters = /[^0-9\-#{separator}]/
# strip everything else first
number.gsub!(non_number_characters, '')
# then replace the locale-specific decimal separator with the standard separator if necessary
number.gsub!(separator, '.') unless separator == '.'
number.to_d
end
end
end
## Instruction:
Fix of bug in `Spree::LocalizedNumber.parse`, which mangles object passed as an argument.
## Code After:
module Spree
class LocalizedNumber
# Strips all non-price-like characters from the number, taking into account locale settings.
def self.parse(number)
return number unless number.is_a?(String)
separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
non_number_characters = /[^0-9\-#{separator}]/
# work on a copy, prevent original argument modification
number = number.dup
# strip everything else first, including thousands delimiter
number.gsub!(non_number_characters, '')
# then replace the locale-specific decimal separator with the standard separator if necessary
number.gsub!(separator, '.') unless separator == '.'
number.to_d
end
end
end
| module Spree
class LocalizedNumber
# Strips all non-price-like characters from the number, taking into account locale settings.
def self.parse(number)
return number unless number.is_a?(String)
separator, delimiter = I18n.t([:'number.currency.format.separator', :'number.currency.format.delimiter'])
non_number_characters = /[^0-9\-#{separator}]/
- # strip everything else first
+ # work on a copy, prevent original argument modification
+ number = number.dup
+ # strip everything else first, including thousands delimiter
number.gsub!(non_number_characters, '')
# then replace the locale-specific decimal separator with the standard separator if necessary
number.gsub!(separator, '.') unless separator == '.'
number.to_d
end
end
end | 4 | 0.2 | 3 | 1 |
a5d149efc3cdcf4af79f10a113862aaaceac3f6a | app/views/sessions/new.html.erb | app/views/sessions/new.html.erb | <% if signed_in? %>
<p>
You currently follow <strong><%= pluralize(@user.friends_count, 'person') %></strong>. Here are some beautiful pictures of your recent friends:
</p>
<ul>
<% @friends.each do |friend| %>
<li><%= image_tag("http://img.tweetimag.es/i/#{friend.screen_name}_m", :alt => friend.name).html_safe %></li>
<% end %>
</ul>
<%= form_tag('/follows', :method => :post) do %>
<%= label_tag 'list', 'Enter a Twitter list:'%>
@<%= text_field_tag 'list', 'codeforamerica/fellows-2011', :size => 28 %>
<%= submit_tag 'Follow all members of this list!', :name => 'follow' %>
<%= label_tag 'follow', 'Note: This may take a few seconds to process, especially if you have a lot of friends.' %>
<% end %>
<%= form_tag('/sessions/destroy', :method => :delete) do %>
<%= submit_tag 'Sign out' %>
<% end %>
<% else %>
<p>
Follow All is a simple Twitter app that allows you to enter the name of any
public list on Twitter and then, with a single press of a button, follow all
the members of that list.
</p>
<p>
To get started, you'll need to authenticate with Twitter by pressing the
button below.
</p>
<%= form_tag('/sessions') do %>
<%= image_submit_tag("sign-in-with-twitter.png") %>
<% end %>
<% end %>
| <% if signed_in? %>
<p>
You currently follow <strong><%= pluralize(@user.friends_count, 'person') %></strong>. Here are some beautiful pictures of your recent friends:
</p>
<ul>
<% @friends.each do |friend| %>
<li><%= image_tag("http://img.tweetimag.es/i/#{friend.screen_name}_m", :alt => friend.name).html_safe %></li>
<% end %>
</ul>
<%= form_tag('/follows', :method => :post) do %>
<%= label_tag 'list', 'Enter a Twitter list:'%>
@<%= text_field_tag 'list', 'codeforamerica/team', :size => 20 %>
<%= submit_tag 'Follow all members of this list!', :name => 'follow' %>
<%= label_tag 'follow', 'Note: This may take a few seconds to process, especially if you have a lot of friends.' %>
<% end %>
<%= form_tag('/sessions/destroy', :method => :delete) do %>
<%= submit_tag 'Sign out' %>
<% end %>
<% else %>
<p>
Follow All is a simple Twitter app that allows you to enter the name of any
public list on Twitter and then, with a single press of a button, follow all
the members of that list.
</p>
<p>
To get started, you'll need to authenticate with Twitter by pressing the
button below.
</p>
<%= form_tag('/sessions') do %>
<%= image_submit_tag("sign-in-with-twitter.png") %>
<% end %>
<% end %>
| Change list to @codeforamerica/team (i.e. fellows-2011 ∪ staff) | Change list to @codeforamerica/team (i.e. fellows-2011 ∪ staff)
| HTML+ERB | bsd-3-clause | BryanH/follow-all,codeforamerica/follow-all,codeforamerica/follow-all,jasnow/follow-all,jasnow/follow-all,codeforamerica/follow-all,jasnow/follow-all,BryanH/follow-all,BryanH/follow-all | html+erb | ## Code Before:
<% if signed_in? %>
<p>
You currently follow <strong><%= pluralize(@user.friends_count, 'person') %></strong>. Here are some beautiful pictures of your recent friends:
</p>
<ul>
<% @friends.each do |friend| %>
<li><%= image_tag("http://img.tweetimag.es/i/#{friend.screen_name}_m", :alt => friend.name).html_safe %></li>
<% end %>
</ul>
<%= form_tag('/follows', :method => :post) do %>
<%= label_tag 'list', 'Enter a Twitter list:'%>
@<%= text_field_tag 'list', 'codeforamerica/fellows-2011', :size => 28 %>
<%= submit_tag 'Follow all members of this list!', :name => 'follow' %>
<%= label_tag 'follow', 'Note: This may take a few seconds to process, especially if you have a lot of friends.' %>
<% end %>
<%= form_tag('/sessions/destroy', :method => :delete) do %>
<%= submit_tag 'Sign out' %>
<% end %>
<% else %>
<p>
Follow All is a simple Twitter app that allows you to enter the name of any
public list on Twitter and then, with a single press of a button, follow all
the members of that list.
</p>
<p>
To get started, you'll need to authenticate with Twitter by pressing the
button below.
</p>
<%= form_tag('/sessions') do %>
<%= image_submit_tag("sign-in-with-twitter.png") %>
<% end %>
<% end %>
## Instruction:
Change list to @codeforamerica/team (i.e. fellows-2011 ∪ staff)
## Code After:
<% if signed_in? %>
<p>
You currently follow <strong><%= pluralize(@user.friends_count, 'person') %></strong>. Here are some beautiful pictures of your recent friends:
</p>
<ul>
<% @friends.each do |friend| %>
<li><%= image_tag("http://img.tweetimag.es/i/#{friend.screen_name}_m", :alt => friend.name).html_safe %></li>
<% end %>
</ul>
<%= form_tag('/follows', :method => :post) do %>
<%= label_tag 'list', 'Enter a Twitter list:'%>
@<%= text_field_tag 'list', 'codeforamerica/team', :size => 20 %>
<%= submit_tag 'Follow all members of this list!', :name => 'follow' %>
<%= label_tag 'follow', 'Note: This may take a few seconds to process, especially if you have a lot of friends.' %>
<% end %>
<%= form_tag('/sessions/destroy', :method => :delete) do %>
<%= submit_tag 'Sign out' %>
<% end %>
<% else %>
<p>
Follow All is a simple Twitter app that allows you to enter the name of any
public list on Twitter and then, with a single press of a button, follow all
the members of that list.
</p>
<p>
To get started, you'll need to authenticate with Twitter by pressing the
button below.
</p>
<%= form_tag('/sessions') do %>
<%= image_submit_tag("sign-in-with-twitter.png") %>
<% end %>
<% end %>
| <% if signed_in? %>
<p>
You currently follow <strong><%= pluralize(@user.friends_count, 'person') %></strong>. Here are some beautiful pictures of your recent friends:
</p>
<ul>
<% @friends.each do |friend| %>
<li><%= image_tag("http://img.tweetimag.es/i/#{friend.screen_name}_m", :alt => friend.name).html_safe %></li>
<% end %>
</ul>
<%= form_tag('/follows', :method => :post) do %>
<%= label_tag 'list', 'Enter a Twitter list:'%>
- @<%= text_field_tag 'list', 'codeforamerica/fellows-2011', :size => 28 %>
? ^ ^^^^^^^^^^ ^
+ @<%= text_field_tag 'list', 'codeforamerica/team', :size => 20 %>
? ^ ^^ ^
<%= submit_tag 'Follow all members of this list!', :name => 'follow' %>
<%= label_tag 'follow', 'Note: This may take a few seconds to process, especially if you have a lot of friends.' %>
<% end %>
<%= form_tag('/sessions/destroy', :method => :delete) do %>
<%= submit_tag 'Sign out' %>
<% end %>
<% else %>
<p>
Follow All is a simple Twitter app that allows you to enter the name of any
public list on Twitter and then, with a single press of a button, follow all
the members of that list.
</p>
<p>
To get started, you'll need to authenticate with Twitter by pressing the
button below.
</p>
<%= form_tag('/sessions') do %>
<%= image_submit_tag("sign-in-with-twitter.png") %>
<% end %>
<% end %> | 2 | 0.060606 | 1 | 1 |
22ab2b03693a5a188a7675c984303f5be34052a9 | src/components/SimilarPlayersCard.js | src/components/SimilarPlayersCard.js | import React from 'react';
import PlayerAvatar from './PlayerAvatar.js'
import '../style/components/SimilarPlayersCard.css';
export default function SimilarPlayersCard(props) {
const similarPlayersList = [
{
'firstName': props.firstName0,
'lastName': props.lastName0,
'img': props.img0,
'ppg': props.ppg0,
'apg': props.apg0,
'rpg': props.rpg0
},
{
'firstName': props.firstName1,
'lastName': props.lastName1,
'img': props.img1,
'ppg': props.ppg1,
'apg': props.apg1,
'rpg': props.rpg1
},
{
'firstName': props.firstName2,
'lastName': props.lastName2,
'img': props.img2,
'ppg': props.ppg2,
'apg': props.apg2,
'rpg': props.rpg2
}
];
const playerAvatarList = similarPlayersList.map((player) =>
<PlayerAvatar
key={player.firstName + '_' + player.lastName}
playerName={player.firstName + ' ' + player.lastName} img={player.img}
ppg={player.ppg} apg={player.apg} rpg={player.rpg}
/>
);
return (
<div className='SimilarPlayersCard card'>
<div className='card-title'>
Similar Players
</div>
{playerAvatarList}
</div>
);
}
| import React from 'react';
import PlayerAvatar from './PlayerAvatar.js'
import '../style/components/SimilarPlayersCard.css';
export default function SimilarPlayersCard(props) {
const similarPlayersList = [
{
'firstName': props.firstName0,
'lastName': props.lastName0,
'img': props.img0,
'ppg': props.ppg0,
'apg': props.apg0,
'rpg': props.rpg0
},
{
'firstName': props.firstName1,
'lastName': props.lastName1,
'img': props.img1,
'ppg': props.ppg1,
'apg': props.apg1,
'rpg': props.rpg1
},
{
'firstName': props.firstName2,
'lastName': props.lastName2,
'img': props.img2,
'ppg': props.ppg2,
'apg': props.apg2,
'rpg': props.rpg2
}
];
const playerAvatarList = similarPlayersList.map((player, idx) =>
<PlayerAvatar
key={idx}
playerName={player.firstName + ' ' + player.lastName} img={player.img}
ppg={player.ppg} apg={player.apg} rpg={player.rpg}
/>
);
return (
<div className='SimilarPlayersCard card'>
<div className='card-title'>
Similar Players
</div>
{playerAvatarList}
</div>
);
}
| Use idx as key for similar player avatars | Use idx as key for similar player avatars
| JavaScript | mit | iNaesu/nba-player-dashboard,iNaesu/nba-player-dashboard | javascript | ## Code Before:
import React from 'react';
import PlayerAvatar from './PlayerAvatar.js'
import '../style/components/SimilarPlayersCard.css';
export default function SimilarPlayersCard(props) {
const similarPlayersList = [
{
'firstName': props.firstName0,
'lastName': props.lastName0,
'img': props.img0,
'ppg': props.ppg0,
'apg': props.apg0,
'rpg': props.rpg0
},
{
'firstName': props.firstName1,
'lastName': props.lastName1,
'img': props.img1,
'ppg': props.ppg1,
'apg': props.apg1,
'rpg': props.rpg1
},
{
'firstName': props.firstName2,
'lastName': props.lastName2,
'img': props.img2,
'ppg': props.ppg2,
'apg': props.apg2,
'rpg': props.rpg2
}
];
const playerAvatarList = similarPlayersList.map((player) =>
<PlayerAvatar
key={player.firstName + '_' + player.lastName}
playerName={player.firstName + ' ' + player.lastName} img={player.img}
ppg={player.ppg} apg={player.apg} rpg={player.rpg}
/>
);
return (
<div className='SimilarPlayersCard card'>
<div className='card-title'>
Similar Players
</div>
{playerAvatarList}
</div>
);
}
## Instruction:
Use idx as key for similar player avatars
## Code After:
import React from 'react';
import PlayerAvatar from './PlayerAvatar.js'
import '../style/components/SimilarPlayersCard.css';
export default function SimilarPlayersCard(props) {
const similarPlayersList = [
{
'firstName': props.firstName0,
'lastName': props.lastName0,
'img': props.img0,
'ppg': props.ppg0,
'apg': props.apg0,
'rpg': props.rpg0
},
{
'firstName': props.firstName1,
'lastName': props.lastName1,
'img': props.img1,
'ppg': props.ppg1,
'apg': props.apg1,
'rpg': props.rpg1
},
{
'firstName': props.firstName2,
'lastName': props.lastName2,
'img': props.img2,
'ppg': props.ppg2,
'apg': props.apg2,
'rpg': props.rpg2
}
];
const playerAvatarList = similarPlayersList.map((player, idx) =>
<PlayerAvatar
key={idx}
playerName={player.firstName + ' ' + player.lastName} img={player.img}
ppg={player.ppg} apg={player.apg} rpg={player.rpg}
/>
);
return (
<div className='SimilarPlayersCard card'>
<div className='card-title'>
Similar Players
</div>
{playerAvatarList}
</div>
);
}
| import React from 'react';
import PlayerAvatar from './PlayerAvatar.js'
import '../style/components/SimilarPlayersCard.css';
export default function SimilarPlayersCard(props) {
const similarPlayersList = [
{
'firstName': props.firstName0,
'lastName': props.lastName0,
'img': props.img0,
'ppg': props.ppg0,
'apg': props.apg0,
'rpg': props.rpg0
},
{
'firstName': props.firstName1,
'lastName': props.lastName1,
'img': props.img1,
'ppg': props.ppg1,
'apg': props.apg1,
'rpg': props.rpg1
},
{
'firstName': props.firstName2,
'lastName': props.lastName2,
'img': props.img2,
'ppg': props.ppg2,
'apg': props.apg2,
'rpg': props.rpg2
}
];
- const playerAvatarList = similarPlayersList.map((player) =>
+ const playerAvatarList = similarPlayersList.map((player, idx) =>
? +++++
<PlayerAvatar
- key={player.firstName + '_' + player.lastName}
+ key={idx}
playerName={player.firstName + ' ' + player.lastName} img={player.img}
ppg={player.ppg} apg={player.apg} rpg={player.rpg}
/>
);
return (
<div className='SimilarPlayersCard card'>
<div className='card-title'>
Similar Players
</div>
{playerAvatarList}
</div>
);
} | 4 | 0.078431 | 2 | 2 |
44f9fbcddec64b7c43f7882ab58c8f23007a44d0 | include/base/errors.h | include/base/errors.h | /* --------------------------------------------------------------------------
* Name: errors.h
* Purpose: Error type and constants
* ----------------------------------------------------------------------- */
#ifndef ERRORS_H
#define ERRORS_H
typedef unsigned long int error;
#define error_OK 0
#define error_EXISTS 1
#define error_NOT_FOUND 2
#define error_OOM 3
#define error_STOP_WALK 4
#define error_CLASHES 5 /* key would clash with existing one */
#define error_NOT_IMPLEMENTED 6
#define error_KEYLEN_REQUIRED 200
#define error_KEYCOMPARE_REQUIRED 201
#define error_KEYHASH_REQIURED 202
#define error_QUEUE_FULL 300
#define error_QUEUE_EMPTY 301
#define error_TEST_FAILED 400
#define error_HASH_END 500
#define error_HASH_BAD_CONT 501
#endif /* ERRORS_H */
| /* --------------------------------------------------------------------------
* Name: errors.h
* Purpose: Error type and constants
* ----------------------------------------------------------------------- */
#ifndef ERRORS_H
#define ERRORS_H
typedef unsigned long int error;
/* Generic errors */
#define error_OK 0ul /* No error */
#define error_OOM 1ul /* Out of memory */
#define error_NOT_IMPLEMENTED 2ul /* Function not implemented */
#define error_NOT_FOUND 3ul /* Item not found */
#define error_EXISTS 4ul /* Item already exists */
#define error_STOP_WALK 5ul /* Callback was cancelled */
/* Data structure errors */
#define error_CLASHES 100ul /* Key would clash with existing one */
#define error_QUEUE_FULL 110ul
#define error_QUEUE_EMPTY 111ul
#define error_HASH_END 120ul
#define error_HASH_BAD_CONT 121ul
/* Container errors */
#define error_KEYLEN_REQUIRED 200ul
#define error_KEYCOMPARE_REQUIRED 201ul
#define error_KEYHASH_REQIURED 202ul
/* Test errors */
#define error_TEST_FAILED 300ul
#endif /* ERRORS_H */
| Make error constants unsigned longs. | Make error constants unsigned longs.
| C | bsd-2-clause | dpt/Containers,dpt/Containers | c | ## Code Before:
/* --------------------------------------------------------------------------
* Name: errors.h
* Purpose: Error type and constants
* ----------------------------------------------------------------------- */
#ifndef ERRORS_H
#define ERRORS_H
typedef unsigned long int error;
#define error_OK 0
#define error_EXISTS 1
#define error_NOT_FOUND 2
#define error_OOM 3
#define error_STOP_WALK 4
#define error_CLASHES 5 /* key would clash with existing one */
#define error_NOT_IMPLEMENTED 6
#define error_KEYLEN_REQUIRED 200
#define error_KEYCOMPARE_REQUIRED 201
#define error_KEYHASH_REQIURED 202
#define error_QUEUE_FULL 300
#define error_QUEUE_EMPTY 301
#define error_TEST_FAILED 400
#define error_HASH_END 500
#define error_HASH_BAD_CONT 501
#endif /* ERRORS_H */
## Instruction:
Make error constants unsigned longs.
## Code After:
/* --------------------------------------------------------------------------
* Name: errors.h
* Purpose: Error type and constants
* ----------------------------------------------------------------------- */
#ifndef ERRORS_H
#define ERRORS_H
typedef unsigned long int error;
/* Generic errors */
#define error_OK 0ul /* No error */
#define error_OOM 1ul /* Out of memory */
#define error_NOT_IMPLEMENTED 2ul /* Function not implemented */
#define error_NOT_FOUND 3ul /* Item not found */
#define error_EXISTS 4ul /* Item already exists */
#define error_STOP_WALK 5ul /* Callback was cancelled */
/* Data structure errors */
#define error_CLASHES 100ul /* Key would clash with existing one */
#define error_QUEUE_FULL 110ul
#define error_QUEUE_EMPTY 111ul
#define error_HASH_END 120ul
#define error_HASH_BAD_CONT 121ul
/* Container errors */
#define error_KEYLEN_REQUIRED 200ul
#define error_KEYCOMPARE_REQUIRED 201ul
#define error_KEYHASH_REQIURED 202ul
/* Test errors */
#define error_TEST_FAILED 300ul
#endif /* ERRORS_H */
| /* --------------------------------------------------------------------------
* Name: errors.h
* Purpose: Error type and constants
* ----------------------------------------------------------------------- */
#ifndef ERRORS_H
#define ERRORS_H
typedef unsigned long int error;
+ /* Generic errors */
- #define error_OK 0
- #define error_EXISTS 1
- #define error_NOT_FOUND 2
- #define error_OOM 3
- #define error_STOP_WALK 4
- #define error_CLASHES 5 /* key would clash with existing one */
- #define error_NOT_IMPLEMENTED 6
- #define error_KEYLEN_REQUIRED 200
- #define error_KEYCOMPARE_REQUIRED 201
- #define error_KEYHASH_REQIURED 202
+ #define error_OK 0ul /* No error */
+ #define error_OOM 1ul /* Out of memory */
+ #define error_NOT_IMPLEMENTED 2ul /* Function not implemented */
+ #define error_NOT_FOUND 3ul /* Item not found */
+ #define error_EXISTS 4ul /* Item already exists */
+ #define error_STOP_WALK 5ul /* Callback was cancelled */
+ /* Data structure errors */
- #define error_QUEUE_FULL 300
- #define error_QUEUE_EMPTY 301
- #define error_TEST_FAILED 400
+ #define error_CLASHES 100ul /* Key would clash with existing one */
+ #define error_QUEUE_FULL 110ul
+ #define error_QUEUE_EMPTY 111ul
+
- #define error_HASH_END 500
? ^ ^
+ #define error_HASH_END 120ul
? ^^ ^^
- #define error_HASH_BAD_CONT 501
? --
+ #define error_HASH_BAD_CONT 121ul
? ++++
+
+ /* Container errors */
+
+ #define error_KEYLEN_REQUIRED 200ul
+ #define error_KEYCOMPARE_REQUIRED 201ul
+ #define error_KEYHASH_REQIURED 202ul
+
+ /* Test errors */
+
+ #define error_TEST_FAILED 300ul
#endif /* ERRORS_H */
| 39 | 1.21875 | 24 | 15 |
ba48cd45c56646497bcda70d9a475a40ea44c874 | dbaas/workflow/steps/mysql/resize/change_config.py | dbaas/workflow/steps/mysql/resize/change_config.py | import logging
from . import run_vm_script
from ...util.base import BaseStep
LOG = logging.getLogger(__name__)
class ChangeDatabaseConfigFile(BaseStep):
def __unicode__(self):
return "Changing database config file..."
def do(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha
},
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['cloudstackpack'].script,
)
return ret_script
def undo(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
}
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['original_cloudstackpack'].script,
)
return ret_script
| import logging
from workflow.steps.mysql.resize import run_vm_script
from workflow.steps.util.base import BaseStep
LOG = logging.getLogger(__name__)
class ChangeDatabaseConfigFile(BaseStep):
def __unicode__(self):
return "Changing database config file..."
def do(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha
},
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['cloudstackpack'].script,
)
return ret_script
def undo(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha,
}
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['original_cloudstackpack'].script,
)
return ret_script
| Add is_ha variable to change config rollback | Add is_ha variable to change config rollback
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | python | ## Code Before:
import logging
from . import run_vm_script
from ...util.base import BaseStep
LOG = logging.getLogger(__name__)
class ChangeDatabaseConfigFile(BaseStep):
def __unicode__(self):
return "Changing database config file..."
def do(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha
},
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['cloudstackpack'].script,
)
return ret_script
def undo(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
}
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['original_cloudstackpack'].script,
)
return ret_script
## Instruction:
Add is_ha variable to change config rollback
## Code After:
import logging
from workflow.steps.mysql.resize import run_vm_script
from workflow.steps.util.base import BaseStep
LOG = logging.getLogger(__name__)
class ChangeDatabaseConfigFile(BaseStep):
def __unicode__(self):
return "Changing database config file..."
def do(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha
},
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['cloudstackpack'].script,
)
return ret_script
def undo(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha,
}
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['original_cloudstackpack'].script,
)
return ret_script
| import logging
- from . import run_vm_script
+ from workflow.steps.mysql.resize import run_vm_script
- from ...util.base import BaseStep
? ^
+ from workflow.steps.util.base import BaseStep
? ++++++++ ^^^^^
LOG = logging.getLogger(__name__)
class ChangeDatabaseConfigFile(BaseStep):
def __unicode__(self):
return "Changing database config file..."
def do(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
'IS_HA': workflow_dict['databaseinfra'].plan.is_ha
},
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['cloudstackpack'].script,
)
return ret_script
def undo(self, workflow_dict):
context_dict = {
'CONFIGFILE': True,
+ 'IS_HA': workflow_dict['databaseinfra'].plan.is_ha,
}
ret_script = run_vm_script(
workflow_dict=workflow_dict,
context_dict=context_dict,
script=workflow_dict['original_cloudstackpack'].script,
)
return ret_script | 5 | 0.131579 | 3 | 2 |
0586fcf8beb3f3e46113b6537c8ae8d69ee47b23 | ci_environment/python/recipes/pip.rb | ci_environment/python/recipes/pip.rb |
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do
source "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py"
mode "0644"
not_if "which pip"
end
bash "install-pip" do
cwd Chef::Config[:file_cache_path]
code <<-EOF
python ez_setup.py
easy_install pip
EOF
not_if "which pip"
end
|
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do
source 'https://bootstrap.pypa.io/ez_setup.py'
mode "0644"
not_if "which pip"
end
bash "install-pip" do
cwd Chef::Config[:file_cache_path]
code <<-EOF
python ez_setup.py
easy_install pip
EOF
not_if "which pip"
end
| Update download URL for ez_setup.py | Update download URL for ez_setup.py
| Ruby | mit | dracos/travis-cookbooks,dracos/travis-cookbooks,dracos/travis-cookbooks,dracos/travis-cookbooks | ruby | ## Code Before:
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do
source "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py"
mode "0644"
not_if "which pip"
end
bash "install-pip" do
cwd Chef::Config[:file_cache_path]
code <<-EOF
python ez_setup.py
easy_install pip
EOF
not_if "which pip"
end
## Instruction:
Update download URL for ez_setup.py
## Code After:
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do
source 'https://bootstrap.pypa.io/ez_setup.py'
mode "0644"
not_if "which pip"
end
bash "install-pip" do
cwd Chef::Config[:file_cache_path]
code <<-EOF
python ez_setup.py
easy_install pip
EOF
not_if "which pip"
end
|
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do
- source "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py"
+ source 'https://bootstrap.pypa.io/ez_setup.py'
mode "0644"
not_if "which pip"
end
bash "install-pip" do
cwd Chef::Config[:file_cache_path]
code <<-EOF
python ez_setup.py
easy_install pip
EOF
not_if "which pip"
end | 2 | 0.133333 | 1 | 1 |
28e6861ca1d98ee1a1d26e16b4f0ac89c391e1aa | bower.json | bower.json | {
"name": "ng-nephila",
"version": "0.0.1",
"homepage": "https://github.com/nephila/ng-nephila",
"authors": [
{
"name": "Nephila",
"homepage": "http://nephila.it"
}
],
"description": "Collection of reusable UI components for AngularJS.",
"devDependencies": {
"angular": "^1.4.1",
"angular-mocks": "^1.4.1"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"components",
"coverage",
"test",
"tests"
],
"resolutions": {
"angular": ">=1"
}
} | {
"name": "ng-nephila",
"version": "0.0.1",
"homepage": "https://github.com/nephila/ng-nephila",
"authors": [
{
"name": "Nephila",
"homepage": "http://nephila.it"
}
],
"description": "Collection of reusable UI components for AngularJS.",
"devDependencies": {
"angular": "^1.4.1",
"angular-mocks": "^1.4.1",
"jquery": "~2.1.1"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"components",
"coverage",
"test",
"tests"
],
"resolutions": {
"angular": ">=1"
}
} | Add jquery to dependencies (to use in tests) | Add jquery to dependencies (to use in tests)
| JSON | mit | ng-ramen/ng-ramen,nephila/ng-nephila,ng-ramen/ng-ramen,nephila/ng-nephila | json | ## Code Before:
{
"name": "ng-nephila",
"version": "0.0.1",
"homepage": "https://github.com/nephila/ng-nephila",
"authors": [
{
"name": "Nephila",
"homepage": "http://nephila.it"
}
],
"description": "Collection of reusable UI components for AngularJS.",
"devDependencies": {
"angular": "^1.4.1",
"angular-mocks": "^1.4.1"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"components",
"coverage",
"test",
"tests"
],
"resolutions": {
"angular": ">=1"
}
}
## Instruction:
Add jquery to dependencies (to use in tests)
## Code After:
{
"name": "ng-nephila",
"version": "0.0.1",
"homepage": "https://github.com/nephila/ng-nephila",
"authors": [
{
"name": "Nephila",
"homepage": "http://nephila.it"
}
],
"description": "Collection of reusable UI components for AngularJS.",
"devDependencies": {
"angular": "^1.4.1",
"angular-mocks": "^1.4.1",
"jquery": "~2.1.1"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"components",
"coverage",
"test",
"tests"
],
"resolutions": {
"angular": ">=1"
}
} | {
"name": "ng-nephila",
"version": "0.0.1",
"homepage": "https://github.com/nephila/ng-nephila",
"authors": [
{
"name": "Nephila",
"homepage": "http://nephila.it"
}
],
"description": "Collection of reusable UI components for AngularJS.",
"devDependencies": {
"angular": "^1.4.1",
- "angular-mocks": "^1.4.1"
+ "angular-mocks": "^1.4.1",
? +
+ "jquery": "~2.1.1"
},
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"components",
"coverage",
"test",
"tests"
],
"resolutions": {
"angular": ">=1"
}
} | 3 | 0.107143 | 2 | 1 |
82fb815683fc1b482bd4b95188d0176888dbaa8c | viaduct/templates/pimpy/add_minute.htm | viaduct/templates/pimpy/add_minute.htm | {% extends "pimpy/view_page.htm" %}
{%block content %}
<div class="col-md-8">
<form class="form-horizontal minute-form" action=""
method="post" enctype="multipart/form-data">
<div class="control-group">
<label class="control-label">Add a minute</label>
</div>
<div class="control-group">
<label class="control-label" for="content">
Content (copy paste minutes here)</label>
<div class="controls">
{{ form.content }}
</div>
</div>
<div class="control-group">
<label class="control-label" for="line">Group</label>
<div class="controls">
{{ form.group}}
</div>
</div>
<div class="control-group">
<label class="control-label" for="line">Date (yyyy-mm-dd)</label>
<div class="controls">
{{ form.date(id='minute_date') }}
</div>
</div>
<div class="control-group">
<label class="control-label" for="line">Parse tasks?</label>
<div class="controls">
{{ form.parse_tasks}}
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary submit-button" data-loading-text="Bezig...">Create minute</button>
</div>
</div>
<!-- data-date-format="yyyy-mm-dd", seems not likely to be workin' anytime soon -->
</form>
</div>
<script src="/static/js/pimpy/add_minute.js"></script>
{% endblock content %}
| {% extends 'pimpy/view_page.htm' %}
{%block content %}
<div class='col-md-8'>
<h2>Add a minute</h2>
<form class='minute-form' method='post' enctype='multipart/form-data'>
<div class='form-group'>
<label for='content'>Content (copy paste minutes here)</label>
{{ form.content(class_='form-control') }}
</div>
<div class='form-group'>
<label for='line'>Group</label>
{{ form.group(class_='form-control') }}
</div>
<div class='form-group'>
<label for='line'>Date (yyyy-mm-dd)</label>
{{ form.date(id='minute_date', class_='form-control') }}
</div>
<div class='checkbox'>
<label for='line'>
{{ form.parse_tasks }} Parse tasks
</label>
</div>
<button type='submit' class='btn btn-primary submit-button' data-loading-text='Bezig...'>Create minute</button>
</form>
</div>
<script src='/static/js/pimpy/add_minute.js'></script>
{% endblock content %}
| Use Bootstrap 3 when adding a minute | Use Bootstrap 3 when adding a minute
| HTML | mit | viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct | html | ## Code Before:
{% extends "pimpy/view_page.htm" %}
{%block content %}
<div class="col-md-8">
<form class="form-horizontal minute-form" action=""
method="post" enctype="multipart/form-data">
<div class="control-group">
<label class="control-label">Add a minute</label>
</div>
<div class="control-group">
<label class="control-label" for="content">
Content (copy paste minutes here)</label>
<div class="controls">
{{ form.content }}
</div>
</div>
<div class="control-group">
<label class="control-label" for="line">Group</label>
<div class="controls">
{{ form.group}}
</div>
</div>
<div class="control-group">
<label class="control-label" for="line">Date (yyyy-mm-dd)</label>
<div class="controls">
{{ form.date(id='minute_date') }}
</div>
</div>
<div class="control-group">
<label class="control-label" for="line">Parse tasks?</label>
<div class="controls">
{{ form.parse_tasks}}
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary submit-button" data-loading-text="Bezig...">Create minute</button>
</div>
</div>
<!-- data-date-format="yyyy-mm-dd", seems not likely to be workin' anytime soon -->
</form>
</div>
<script src="/static/js/pimpy/add_minute.js"></script>
{% endblock content %}
## Instruction:
Use Bootstrap 3 when adding a minute
## Code After:
{% extends 'pimpy/view_page.htm' %}
{%block content %}
<div class='col-md-8'>
<h2>Add a minute</h2>
<form class='minute-form' method='post' enctype='multipart/form-data'>
<div class='form-group'>
<label for='content'>Content (copy paste minutes here)</label>
{{ form.content(class_='form-control') }}
</div>
<div class='form-group'>
<label for='line'>Group</label>
{{ form.group(class_='form-control') }}
</div>
<div class='form-group'>
<label for='line'>Date (yyyy-mm-dd)</label>
{{ form.date(id='minute_date', class_='form-control') }}
</div>
<div class='checkbox'>
<label for='line'>
{{ form.parse_tasks }} Parse tasks
</label>
</div>
<button type='submit' class='btn btn-primary submit-button' data-loading-text='Bezig...'>Create minute</button>
</form>
</div>
<script src='/static/js/pimpy/add_minute.js'></script>
{% endblock content %}
| - {% extends "pimpy/view_page.htm" %}
? ^ ^
+ {% extends 'pimpy/view_page.htm' %}
? ^ ^
{%block content %}
- <div class="col-md-8">
- <form class="form-horizontal minute-form" action=""
- method="post" enctype="multipart/form-data">
+ <div class='col-md-8'>
+ <h2>Add a minute</h2>
+
+ <form class='minute-form' method='post' enctype='multipart/form-data'>
- <div class="control-group">
? ^^ -- ^^ ^
+ <div class='form-group'>
? ++++ ^^ ^ ^
- <label class="control-label">Add a minute</label>
- </div>
- <div class="control-group">
- <label class="control-label" for="content">
- Content (copy paste minutes here)</label>
+ <label for='content'>Content (copy paste minutes here)</label>
? +++++++++++++++++++++
+ {{ form.content(class_='form-control') }}
- <div class="controls">
- {{ form.content }}
</div>
- </div>
+
- <div class="control-group">
? ^^ -- ^^ ^
+ <div class='form-group'>
? ++++ ^^ ^ ^
+ <label for='line'>Group</label>
+ {{ form.group(class_='form-control') }}
- <label class="control-label" for="line">Group</label>
- <div class="controls">
- {{ form.group}}
</div>
- </div>
+
- <div class="control-group">
? ^^ -- ^^ ^
+ <div class='form-group'>
? ++++ ^^ ^ ^
- <label class="control-label" for="line">Date (yyyy-mm-dd)</label>
? ---------------------- ^ ^
+ <label for='line'>Date (yyyy-mm-dd)</label>
? ++++ ^ ^
- <div class="controls">
- {{ form.date(id='minute_date') }}
+ {{ form.date(id='minute_date', class_='form-control') }}
? +++++++++++++++++++++++
</div>
+
+ <div class='checkbox'>
+ <label for='line'>
- </div>
- <div class="control-group">
- <label class="control-label" for="line">Parse tasks?</label>
- <div class="controls">
- {{ form.parse_tasks}}
+ {{ form.parse_tasks }} Parse tasks
? ++++ + ++++++++++++
+ </label>
</div>
+
- </div>
- <div class="control-group">
- <div class="controls">
- <button type="submit" class="btn btn-primary submit-button" data-loading-text="Bezig...">Create minute</button>
? ---- ^ ^ ^ ^ ^ ^
+ <button type='submit' class='btn btn-primary submit-button' data-loading-text='Bezig...'>Create minute</button>
? ^ ^ ^ ^ ^ ^
- </div>
- </div>
- <!-- data-date-format="yyyy-mm-dd", seems not likely to be workin' anytime soon -->
- </form>
+ </form>
? ++++
</div>
- <script src="/static/js/pimpy/add_minute.js"></script>
? ^ ^
+ <script src='/static/js/pimpy/add_minute.js'></script>
? ^ ^
{% endblock content %}
- | 62 | 1.319149 | 25 | 37 |
ef4d7cd9f615d6f95f4c43e72bd435650351f790 | appveyor.yml | appveyor.yml | cache:
- "c:\\sr" # stack root, short paths == less problems
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --solver
- echo "" | stack --no-terminal build
- stack exec -- hlint test
- stack exec -- hlint src --no-exit-code
|
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --solver
- echo "" | stack --no-terminal build
- stack exec -- hlint test
- stack exec -- hlint src --no-exit-code
| Comment out the cache, in case its breaking things | Comment out the cache, in case its breaking things | YAML | bsd-3-clause | ndmitchell/hlint,ndmitchell/hlint | yaml | ## Code Before:
cache:
- "c:\\sr" # stack root, short paths == less problems
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --solver
- echo "" | stack --no-terminal build
- stack exec -- hlint test
- stack exec -- hlint src --no-exit-code
## Instruction:
Comment out the cache, in case its breaking things
## Code After:
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --solver
- echo "" | stack --no-terminal build
- stack exec -- hlint test
- stack exec -- hlint src --no-exit-code
| - cache:
- - "c:\\sr" # stack root, short paths == less problems
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --solver
- echo "" | stack --no-terminal build
- stack exec -- hlint test
- stack exec -- hlint src --no-exit-code | 2 | 0.1 | 0 | 2 |
ad888e5c5423fcb2419c497597990868216edfe3 | pubrunner/__init__.py | pubrunner/__init__.py |
from pubrunner.command_line import *
from pubrunner.upload import *
from pubrunner.FTPClient import *
from pubrunner.getresource import *
from pubrunner.pubrun import pubrun,cleanWorkingDirectory
from pubrunner.convert import *
def loadYAML(yamlFilename):
yamlData = None
with open(yamlFilename,'r') as f:
try:
yamlData = yaml.load(f)
except yaml.YAMLError as exc:
print(exc)
raise
return yamlData
def findSettingsFile():
possibilities = [ os.getcwd(), os.path.expanduser("~") ]
for directory in possibilities:
settingsPath = os.path.join(directory,'.pubrunner.settings.yml')
if os.path.isfile(settingsPath):
return settingsPath
raise RuntimeError("Unable to find .pubrunner.settings.yml file. Tried current directory first, then home directory")
globalSettings = None
def getGlobalSettings():
global globalSettings
if globalSettings is None:
settingsYamlFile = findSettingsFile()
globalSettings = loadYAML(settingsYamlFile)
return globalSettings
|
from pubrunner.command_line import *
from pubrunner.upload import *
from pubrunner.FTPClient import *
from pubrunner.getresource import *
from pubrunner.pubrun import pubrun,cleanWorkingDirectory
from pubrunner.convert import *
from pubrunner.pubmed_hash import pubmed_hash
def loadYAML(yamlFilename):
yamlData = None
with open(yamlFilename,'r') as f:
try:
yamlData = yaml.load(f)
except yaml.YAMLError as exc:
print(exc)
raise
return yamlData
def findSettingsFile():
possibilities = [ os.getcwd(), os.path.expanduser("~") ]
for directory in possibilities:
settingsPath = os.path.join(directory,'.pubrunner.settings.yml')
if os.path.isfile(settingsPath):
return settingsPath
raise RuntimeError("Unable to find .pubrunner.settings.yml file. Tried current directory first, then home directory")
globalSettings = None
def getGlobalSettings():
global globalSettings
if globalSettings is None:
settingsYamlFile = findSettingsFile()
globalSettings = loadYAML(settingsYamlFile)
return globalSettings
| Make pubmed hash accessible to API | Make pubmed hash accessible to API
| Python | mit | jakelever/pubrunner,jakelever/pubrunner | python | ## Code Before:
from pubrunner.command_line import *
from pubrunner.upload import *
from pubrunner.FTPClient import *
from pubrunner.getresource import *
from pubrunner.pubrun import pubrun,cleanWorkingDirectory
from pubrunner.convert import *
def loadYAML(yamlFilename):
yamlData = None
with open(yamlFilename,'r') as f:
try:
yamlData = yaml.load(f)
except yaml.YAMLError as exc:
print(exc)
raise
return yamlData
def findSettingsFile():
possibilities = [ os.getcwd(), os.path.expanduser("~") ]
for directory in possibilities:
settingsPath = os.path.join(directory,'.pubrunner.settings.yml')
if os.path.isfile(settingsPath):
return settingsPath
raise RuntimeError("Unable to find .pubrunner.settings.yml file. Tried current directory first, then home directory")
globalSettings = None
def getGlobalSettings():
global globalSettings
if globalSettings is None:
settingsYamlFile = findSettingsFile()
globalSettings = loadYAML(settingsYamlFile)
return globalSettings
## Instruction:
Make pubmed hash accessible to API
## Code After:
from pubrunner.command_line import *
from pubrunner.upload import *
from pubrunner.FTPClient import *
from pubrunner.getresource import *
from pubrunner.pubrun import pubrun,cleanWorkingDirectory
from pubrunner.convert import *
from pubrunner.pubmed_hash import pubmed_hash
def loadYAML(yamlFilename):
yamlData = None
with open(yamlFilename,'r') as f:
try:
yamlData = yaml.load(f)
except yaml.YAMLError as exc:
print(exc)
raise
return yamlData
def findSettingsFile():
possibilities = [ os.getcwd(), os.path.expanduser("~") ]
for directory in possibilities:
settingsPath = os.path.join(directory,'.pubrunner.settings.yml')
if os.path.isfile(settingsPath):
return settingsPath
raise RuntimeError("Unable to find .pubrunner.settings.yml file. Tried current directory first, then home directory")
globalSettings = None
def getGlobalSettings():
global globalSettings
if globalSettings is None:
settingsYamlFile = findSettingsFile()
globalSettings = loadYAML(settingsYamlFile)
return globalSettings
|
from pubrunner.command_line import *
from pubrunner.upload import *
from pubrunner.FTPClient import *
from pubrunner.getresource import *
from pubrunner.pubrun import pubrun,cleanWorkingDirectory
from pubrunner.convert import *
+ from pubrunner.pubmed_hash import pubmed_hash
def loadYAML(yamlFilename):
yamlData = None
with open(yamlFilename,'r') as f:
try:
yamlData = yaml.load(f)
except yaml.YAMLError as exc:
print(exc)
raise
return yamlData
def findSettingsFile():
possibilities = [ os.getcwd(), os.path.expanduser("~") ]
for directory in possibilities:
settingsPath = os.path.join(directory,'.pubrunner.settings.yml')
if os.path.isfile(settingsPath):
return settingsPath
raise RuntimeError("Unable to find .pubrunner.settings.yml file. Tried current directory first, then home directory")
globalSettings = None
def getGlobalSettings():
global globalSettings
if globalSettings is None:
settingsYamlFile = findSettingsFile()
globalSettings = loadYAML(settingsYamlFile)
return globalSettings | 1 | 0.029412 | 1 | 0 |
9d01efda4d174046b6ba5c20f4025e9f53726f14 | getting-started.md | getting-started.md | ---
layout: page
title: Getting Started
permalink: /getting-started/
---
## Requirements
RetopoFlow v1.2.x requires Blender 2.76 or newer, and will work on any operating system Blender supports.
## Download and Install
You may download RetopoFlow from your [account dashboard](https://cgcookiemarkets.com/customer-dashboard/?task=download) on the Blender Market, assuming you've already purchased it. If you have not yet purchased a copy, then you may get it [here](https://cgcookiemarkets.com/all-products/retopoflow/).
## Getting Support
Running into a problem or have a question that the documentation isn't answering? Reach out to us on the [support forum](https://cgcookiemarkets.com/all-products/retopoflow/?view=support)
You can find the source code for the Jekyll new theme at:
{% include icon-github.html username="jglovier" %} /
[jekyll-new](https://github.com/jglovier/jekyll-new)
You can find the source code for Jekyll at
{% include icon-github.html username="jekyll" %} /
[jekyll](https://github.com/jekyll/jekyll)
| ---
layout: page
title: Getting Started
permalink: /getting-started/
---
## Requirements
RetopoFlow v1.2.x requires Blender 2.76 or newer, and will work on any operating system Blender supports.
## Download and Install
You may download RetopoFlow from your [account dashboard](https://cgcookiemarkets.com/customer-dashboard/?task=download) on the Blender Market, assuming you've already purchased it. If you have not yet purchased a copy, then you may get it [here](https://cgcookiemarkets.com/all-products/retopoflow/).
## Getting Support
Running into a problem or have a question that the documentation isn't answering? Reach out to us on the [support forum](https://cgcookiemarkets.com/all-products/retopoflow/?view=support) | Remove old stuff from getting started | Remove old stuff from getting started
| Markdown | cc0-1.0 | CGCookie/retopoflow-docs,CGCookie/retopoflow-docs | markdown | ## Code Before:
---
layout: page
title: Getting Started
permalink: /getting-started/
---
## Requirements
RetopoFlow v1.2.x requires Blender 2.76 or newer, and will work on any operating system Blender supports.
## Download and Install
You may download RetopoFlow from your [account dashboard](https://cgcookiemarkets.com/customer-dashboard/?task=download) on the Blender Market, assuming you've already purchased it. If you have not yet purchased a copy, then you may get it [here](https://cgcookiemarkets.com/all-products/retopoflow/).
## Getting Support
Running into a problem or have a question that the documentation isn't answering? Reach out to us on the [support forum](https://cgcookiemarkets.com/all-products/retopoflow/?view=support)
You can find the source code for the Jekyll new theme at:
{% include icon-github.html username="jglovier" %} /
[jekyll-new](https://github.com/jglovier/jekyll-new)
You can find the source code for Jekyll at
{% include icon-github.html username="jekyll" %} /
[jekyll](https://github.com/jekyll/jekyll)
## Instruction:
Remove old stuff from getting started
## Code After:
---
layout: page
title: Getting Started
permalink: /getting-started/
---
## Requirements
RetopoFlow v1.2.x requires Blender 2.76 or newer, and will work on any operating system Blender supports.
## Download and Install
You may download RetopoFlow from your [account dashboard](https://cgcookiemarkets.com/customer-dashboard/?task=download) on the Blender Market, assuming you've already purchased it. If you have not yet purchased a copy, then you may get it [here](https://cgcookiemarkets.com/all-products/retopoflow/).
## Getting Support
Running into a problem or have a question that the documentation isn't answering? Reach out to us on the [support forum](https://cgcookiemarkets.com/all-products/retopoflow/?view=support) | ---
layout: page
title: Getting Started
permalink: /getting-started/
---
## Requirements
RetopoFlow v1.2.x requires Blender 2.76 or newer, and will work on any operating system Blender supports.
## Download and Install
You may download RetopoFlow from your [account dashboard](https://cgcookiemarkets.com/customer-dashboard/?task=download) on the Blender Market, assuming you've already purchased it. If you have not yet purchased a copy, then you may get it [here](https://cgcookiemarkets.com/all-products/retopoflow/).
## Getting Support
Running into a problem or have a question that the documentation isn't answering? Reach out to us on the [support forum](https://cgcookiemarkets.com/all-products/retopoflow/?view=support)
-
- You can find the source code for the Jekyll new theme at:
- {% include icon-github.html username="jglovier" %} /
- [jekyll-new](https://github.com/jglovier/jekyll-new)
-
- You can find the source code for Jekyll at
- {% include icon-github.html username="jekyll" %} /
- [jekyll](https://github.com/jekyll/jekyll) | 8 | 0.363636 | 0 | 8 |
37f2edbc0dc233db09db23fef09d5fa9e6b50bb2 | assets/less/index.less | assets/less/index.less | // Bootstrap Core
@import "../../bootstrap/less/bootstrap.less";
@icon-font-path: "../../bootstrap/fonts/";
// Base styles independent of design (shared definitions)
// base.less is meant to be used for different themes for one customer.
// Delete this if unneded.
@import "base.less";
// Corporate Designs
@import "customerName.less";
////////// Do NOT insert style-definitions here! //////////
| // Bootstrap Core
@import "../../libs/bootstrap/less/bootstrap.less";
@icon-font-path: "../../libs/bootstrap/fonts/";
// Base styles independent of design (shared definitions)
// base.less is meant to be used for different themes for one customer.
// Delete this if unneded.
@import "base.less";
// Corporate Designs
@import "customerName.less";
////////// Do NOT insert style-definitions here! //////////
| Fix Path to bootstrap sources. | Fix Path to bootstrap sources.
| Less | mit | AndBicScadMedia/bootstrap-kickstart,micromata/bootstrap-kickstart,AndBicScadMedia/bootstrap-kickstart,micromata/bootstrap-kickstart | less | ## Code Before:
// Bootstrap Core
@import "../../bootstrap/less/bootstrap.less";
@icon-font-path: "../../bootstrap/fonts/";
// Base styles independent of design (shared definitions)
// base.less is meant to be used for different themes for one customer.
// Delete this if unneded.
@import "base.less";
// Corporate Designs
@import "customerName.less";
////////// Do NOT insert style-definitions here! //////////
## Instruction:
Fix Path to bootstrap sources.
## Code After:
// Bootstrap Core
@import "../../libs/bootstrap/less/bootstrap.less";
@icon-font-path: "../../libs/bootstrap/fonts/";
// Base styles independent of design (shared definitions)
// base.less is meant to be used for different themes for one customer.
// Delete this if unneded.
@import "base.less";
// Corporate Designs
@import "customerName.less";
////////// Do NOT insert style-definitions here! //////////
| // Bootstrap Core
- @import "../../bootstrap/less/bootstrap.less";
+ @import "../../libs/bootstrap/less/bootstrap.less";
? +++++
- @icon-font-path: "../../bootstrap/fonts/";
+ @icon-font-path: "../../libs/bootstrap/fonts/";
? +++++
// Base styles independent of design (shared definitions)
// base.less is meant to be used for different themes for one customer.
// Delete this if unneded.
@import "base.less";
// Corporate Designs
@import "customerName.less";
////////// Do NOT insert style-definitions here! ////////// | 4 | 0.266667 | 2 | 2 |
a99355a7060e9f344b41707420f70905280bc61a | web/concrete/helpers/concrete/upgrade/version_562.php | web/concrete/helpers/concrete/upgrade/version_562.php | <?
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion562Helper {
public $dbRefreshTables = array(
'Queues',
'QueueMessages',
'QueuePageDuplicationRelations',
'Jobs',
'JobSets',
'JobSetJobs',
'Blocks'
);
public function run() {
$j = Job::getByHandle('index_search_all');
if (!is_object($j)) {
Job::installByHandle('index_search_all');
}
$js = JobSet::getByName('Default');
if (!is_object($js)) {
$js = JobSet::add('Default');
}
$js->clearJobs();
$jobs = Job::getList();
foreach($jobs as $j) {
if (!$j->supportsQueue()) {
$js->addJob($j);
}
}
}
}
| <?
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion562Helper {
public $dbRefreshTables = array(
'Queues',
'QueueMessages',
'QueuePageDuplicationRelations',
'Jobs',
'JobSets',
'JobSetJobs',
'Blocks',
'Pages'
);
public function run() {
$j = Job::getByHandle('index_search_all');
if (!is_object($j)) {
Job::installByHandle('index_search_all');
}
$js = JobSet::getByName('Default');
if (!is_object($js)) {
$js = JobSet::add('Default');
}
$js->clearJobs();
$jobs = Job::getList();
foreach($jobs as $j) {
if (!$j->supportsQueue()) {
$js->addJob($j);
}
}
}
}
| Add Pages to Refresh Tables for Upgrade | Add Pages to Refresh Tables for Upgrade
Add Pages to Refresh Tables for Upgrade
| PHP | mit | TimDix/concrete5,MichaelMaar/concrete5,TimDix/concrete5,matt9mg/concrete5,avdevs/concrete5,avdevs/concrete5,TimDix/concrete5,MichaelMaar/concrete5,MichaelMaar/concrete5,matt9mg/concrete5,avdevs/concrete5,matt9mg/concrete5 | php | ## Code Before:
<?
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion562Helper {
public $dbRefreshTables = array(
'Queues',
'QueueMessages',
'QueuePageDuplicationRelations',
'Jobs',
'JobSets',
'JobSetJobs',
'Blocks'
);
public function run() {
$j = Job::getByHandle('index_search_all');
if (!is_object($j)) {
Job::installByHandle('index_search_all');
}
$js = JobSet::getByName('Default');
if (!is_object($js)) {
$js = JobSet::add('Default');
}
$js->clearJobs();
$jobs = Job::getList();
foreach($jobs as $j) {
if (!$j->supportsQueue()) {
$js->addJob($j);
}
}
}
}
## Instruction:
Add Pages to Refresh Tables for Upgrade
Add Pages to Refresh Tables for Upgrade
## Code After:
<?
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion562Helper {
public $dbRefreshTables = array(
'Queues',
'QueueMessages',
'QueuePageDuplicationRelations',
'Jobs',
'JobSets',
'JobSetJobs',
'Blocks',
'Pages'
);
public function run() {
$j = Job::getByHandle('index_search_all');
if (!is_object($j)) {
Job::installByHandle('index_search_all');
}
$js = JobSet::getByName('Default');
if (!is_object($js)) {
$js = JobSet::add('Default');
}
$js->clearJobs();
$jobs = Job::getList();
foreach($jobs as $j) {
if (!$j->supportsQueue()) {
$js->addJob($j);
}
}
}
}
| <?
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion562Helper {
public $dbRefreshTables = array(
'Queues',
'QueueMessages',
'QueuePageDuplicationRelations',
'Jobs',
'JobSets',
'JobSetJobs',
- 'Blocks'
+ 'Blocks',
? +
+ 'Pages'
);
public function run() {
$j = Job::getByHandle('index_search_all');
if (!is_object($j)) {
Job::installByHandle('index_search_all');
}
$js = JobSet::getByName('Default');
if (!is_object($js)) {
$js = JobSet::add('Default');
}
$js->clearJobs();
$jobs = Job::getList();
foreach($jobs as $j) {
if (!$j->supportsQueue()) {
$js->addJob($j);
}
}
}
} | 3 | 0.081081 | 2 | 1 |
fea4cf6e9db0c6d32209c510de78a8315f272589 | README.md | README.md | [](https://travis-ci.org/diamond29/interview_project)
A little project for an interview. Set up a webserver that sends some information to a client, client stores some information in a postgresql relational database and prints output.
Requires
1. Postgresql service running on default port 5432 with the "postgres" user being able to create databases. If you don't have one running, you can run the postgres docker container with `bin/run_docker_postgres`
2. Ruby - tested with version 2.3.0 but might work with others
Running the code
```
# Create the database
bin/create_db
# install ruby gems
bundle install
# run rspec tests and rubocop
bundle exec rake
# run the web server:
bundle exec bin/server
# run the client:
bundle exec bin/client
```
| [](https://travis-ci.org/diamond29/interview_project)
A little project for an interview. Set up a webserver that sends some information to a client, client stores some information in a postgresql relational database and prints output.
### Requires
1. Postgresql service running on default port 5432 with the "postgres" user being able to create databases. If you don't have one running, you can run the postgres docker container with `bin/run_docker_postgres`
2. Ruby - tested with version 2.3.0 but might work with others
### Running the code
```
# Create the database
bin/create_db
# install ruby gems
bundle install
# run rspec tests and rubocop
bundle exec rake
# run the web server:
bundle exec bin/server
# run the client:
bundle exec bin/client
```
### Why I chose the language/frameworks/tools
I chose ruby because it's my favorite language for getting stuff done and lets me be the most expressive. Other languages I've used before like c++, java, c# would have all taken a lot longer and the result would have been more verbose.
I chose to actually use a postgres service because it was the easiest way for me to verify my solution. I also wanted to try writing some raw SQL instead of using ActiveRecord, which is the only sql interface I've used for ruby so far. I used rspec because I wanted an easy way of verifying all the pieces of my code. Bundler, rake, travis,git etc were all standard ways of solving standard problems with ruby/github (CI, dependency management, driving tasks/task dependencies).
| Update readme with explanation of tools | Update readme with explanation of tools | Markdown | mit | diamond29/interview_project,diamond29/interview_project | markdown | ## Code Before:
[](https://travis-ci.org/diamond29/interview_project)
A little project for an interview. Set up a webserver that sends some information to a client, client stores some information in a postgresql relational database and prints output.
Requires
1. Postgresql service running on default port 5432 with the "postgres" user being able to create databases. If you don't have one running, you can run the postgres docker container with `bin/run_docker_postgres`
2. Ruby - tested with version 2.3.0 but might work with others
Running the code
```
# Create the database
bin/create_db
# install ruby gems
bundle install
# run rspec tests and rubocop
bundle exec rake
# run the web server:
bundle exec bin/server
# run the client:
bundle exec bin/client
```
## Instruction:
Update readme with explanation of tools
## Code After:
[](https://travis-ci.org/diamond29/interview_project)
A little project for an interview. Set up a webserver that sends some information to a client, client stores some information in a postgresql relational database and prints output.
### Requires
1. Postgresql service running on default port 5432 with the "postgres" user being able to create databases. If you don't have one running, you can run the postgres docker container with `bin/run_docker_postgres`
2. Ruby - tested with version 2.3.0 but might work with others
### Running the code
```
# Create the database
bin/create_db
# install ruby gems
bundle install
# run rspec tests and rubocop
bundle exec rake
# run the web server:
bundle exec bin/server
# run the client:
bundle exec bin/client
```
### Why I chose the language/frameworks/tools
I chose ruby because it's my favorite language for getting stuff done and lets me be the most expressive. Other languages I've used before like c++, java, c# would have all taken a lot longer and the result would have been more verbose.
I chose to actually use a postgres service because it was the easiest way for me to verify my solution. I also wanted to try writing some raw SQL instead of using ActiveRecord, which is the only sql interface I've used for ruby so far. I used rspec because I wanted an easy way of verifying all the pieces of my code. Bundler, rake, travis,git etc were all standard ways of solving standard problems with ruby/github (CI, dependency management, driving tasks/task dependencies).
| [](https://travis-ci.org/diamond29/interview_project)
A little project for an interview. Set up a webserver that sends some information to a client, client stores some information in a postgresql relational database and prints output.
- Requires
+ ### Requires
? ++++
1. Postgresql service running on default port 5432 with the "postgres" user being able to create databases. If you don't have one running, you can run the postgres docker container with `bin/run_docker_postgres`
2. Ruby - tested with version 2.3.0 but might work with others
- Running the code
+ ### Running the code
? ++++
```
# Create the database
bin/create_db
# install ruby gems
bundle install
# run rspec tests and rubocop
bundle exec rake
# run the web server:
bundle exec bin/server
# run the client:
bundle exec bin/client
```
+
+ ### Why I chose the language/frameworks/tools
+ I chose ruby because it's my favorite language for getting stuff done and lets me be the most expressive. Other languages I've used before like c++, java, c# would have all taken a lot longer and the result would have been more verbose.
+
+ I chose to actually use a postgres service because it was the easiest way for me to verify my solution. I also wanted to try writing some raw SQL instead of using ActiveRecord, which is the only sql interface I've used for ruby so far. I used rspec because I wanted an easy way of verifying all the pieces of my code. Bundler, rake, travis,git etc were all standard ways of solving standard problems with ruby/github (CI, dependency management, driving tasks/task dependencies). | 9 | 0.321429 | 7 | 2 |
ac51d0c9ccbbf47caf3b13575c6fdad5b9d5053f | tools/CMakeLists.txt | tools/CMakeLists.txt | file(GLOB BT_FILES *.bt)
install(FILES ${BT_FILES} DESTINATION share/bpftrace/tools)
| file(GLOB BT_FILES *.bt)
file(GLOB TXT_FILES *.txt)
list(REMOVE_ITEM TXT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
install(FILES ${BT_FILES} DESTINATION share/bpftrace/tools)
install(FILES ${TXT_FILES} DESTINATION share/bpftrace/tools/doc)
| Install *_example.txt files to tools/doc (they are referenced in man pages) | Install *_example.txt files to tools/doc (they are referenced in man pages)
| Text | apache-2.0 | iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace | text | ## Code Before:
file(GLOB BT_FILES *.bt)
install(FILES ${BT_FILES} DESTINATION share/bpftrace/tools)
## Instruction:
Install *_example.txt files to tools/doc (they are referenced in man pages)
## Code After:
file(GLOB BT_FILES *.bt)
file(GLOB TXT_FILES *.txt)
list(REMOVE_ITEM TXT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
install(FILES ${BT_FILES} DESTINATION share/bpftrace/tools)
install(FILES ${TXT_FILES} DESTINATION share/bpftrace/tools/doc)
| file(GLOB BT_FILES *.bt)
+ file(GLOB TXT_FILES *.txt)
+ list(REMOVE_ITEM TXT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
install(FILES ${BT_FILES} DESTINATION share/bpftrace/tools)
+ install(FILES ${TXT_FILES} DESTINATION share/bpftrace/tools/doc) | 3 | 1.5 | 3 | 0 |
6a069c2a1c99ca34f53af747a969d5f5c4044e84 | src/promise/src/Shared/Utility/promiseChild.lua | src/promise/src/Shared/Utility/promiseChild.lua | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
return Promise.resolved(result)
end
return Promise.new(function(resolve, reject)
-- Cheaper to do spawn() here than deferred, and we aren't going to get the
-- resource for another tick anyway
spawn(function()
local child = parent:WaitForChild(name, timeOut)
if child then
resolve(child)
else
reject("Timed out")
end
end)
end)
end | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
return Promise.resolved(result)
end
return Promise.spawn(function(resolve, reject)
local child = parent:WaitForChild(name, timeOut)
if child then
resolve(child)
else
reject("Timed out")
end
end)
end | Use Promies.spawn() since task.spawn() is probably cheaper now | fix: Use Promies.spawn() since task.spawn() is probably cheaper now
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine | lua | ## Code Before:
--- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
return Promise.resolved(result)
end
return Promise.new(function(resolve, reject)
-- Cheaper to do spawn() here than deferred, and we aren't going to get the
-- resource for another tick anyway
spawn(function()
local child = parent:WaitForChild(name, timeOut)
if child then
resolve(child)
else
reject("Timed out")
end
end)
end)
end
## Instruction:
fix: Use Promies.spawn() since task.spawn() is probably cheaper now
## Code After:
--- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
return Promise.resolved(result)
end
return Promise.spawn(function(resolve, reject)
local child = parent:WaitForChild(name, timeOut)
if child then
resolve(child)
else
reject("Timed out")
end
end)
end | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
return Promise.resolved(result)
end
- return Promise.new(function(resolve, reject)
? --
+ return Promise.spawn(function(resolve, reject)
? ++++
- -- Cheaper to do spawn() here than deferred, and we aren't going to get the
- -- resource for another tick anyway
- spawn(function()
- local child = parent:WaitForChild(name, timeOut)
? -
+ local child = parent:WaitForChild(name, timeOut)
- if child then
? -
+ if child then
- resolve(child)
? -
+ resolve(child)
- else
? -
+ else
- reject("Timed out")
? -
+ reject("Timed out")
- end
? -
+ end
- end)
end)
end | 18 | 0.642857 | 7 | 11 |
6cc7ea8222344c6255902f053b0069aa08fad664 | lib/leapfrog.rb | lib/leapfrog.rb | require 'active_record/base'
require 'active_record/connection_adapters/abstract/schema_definitions'
require 'action_controller/base'
# Add gem 'leapfrog', require => 'active_record' to Gemfile
require 'leapfrog/user_columns'
require 'leapfrog/users'
require 'leapfrog/version'
#ActiveRecord::ConnectionAdapters::TableDefinition.class_eval do
# include Leapfrog::TableDefinition
#end
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Leapfrog::TableDefinition unless ActiveRecord::ConnectionAdapters::TableDefinition.include?(Leapfrog::TableDefinition)
#conn = ActiveRecord::Base::connection
#conn.extend Leapfrog::AlterUserColumns
#ActiveRecord::ConnectionAdapters::AbstractAdapter.class_eval do
# include Leapfrog::AbstractAdapter
#end
ActiveRecord::ConnectionAdapters::AbstractAdapter.send :include, Leapfrog::AbstractAdapter unless ActiveRecord::ConnectionAdapters::AbstractAdapter.include?(Leapfrog::AbstractAdapter)
#ActiveRecord::ConnectionAdapters::SchemaStatements.class_eval do
# include Leapfrog::AlterUserColumns
#end
#ActiveRecord::ConnectionAdapters::Table.class_eval do
# def userstamps
# @base.add_userstamps(@table_name)
# end
#end
ActiveRecord::ConnectionAdapters::Table.send :include, Leapfrog::Table unless ActiveRecord::ConnectionAdapters::Table.include?(Leapfrog::Table)
ActiveRecord::Base.send :include, Leapfrog::Model::Observe unless ActiveRecord::Base.include?(Leapfrog::Model::Observe)
#ApplicationController.send :include, Leapfrog::Controller::Users unless ApplicationController.include?(Leapfrog::Controller::Users)
ActionController::Base.send :include, Leapfrog::Controller::Users unless ActionController::Base.include?(Leapfrog::Controller::Users)
| require 'active_record'
require 'active_record/base'
require 'active_record/connection_adapters/abstract/schema_definitions'
require 'action_controller/base'
# Add gem 'leapfrog', require => 'active_record' to Gemfile
require 'leapfrog/user_columns'
require 'leapfrog/users'
require 'leapfrog/version'
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Leapfrog::TableDefinition unless ActiveRecord::ConnectionAdapters::TableDefinition.include?(Leapfrog::TableDefinition)
ActiveRecord::ConnectionAdapters::AbstractAdapter.send :include, Leapfrog::AbstractAdapter unless ActiveRecord::ConnectionAdapters::AbstractAdapter.include?(Leapfrog::AbstractAdapter)
ActiveRecord::ConnectionAdapters::Table.send :include, Leapfrog::Table unless ActiveRecord::ConnectionAdapters::Table.include?(Leapfrog::Table)
ActiveRecord::Base.send :include, Leapfrog::Model::Observe unless ActiveRecord::Base.include?(Leapfrog::Model::Observe)
ActionController::Base.send :include, Leapfrog::Controller::Users unless ActionController::Base.include?(Leapfrog::Controller::Users)
| Fix and clean up code | Fix and clean up code
| Ruby | mit | kobayashi-tbn/leapfrog | ruby | ## Code Before:
require 'active_record/base'
require 'active_record/connection_adapters/abstract/schema_definitions'
require 'action_controller/base'
# Add gem 'leapfrog', require => 'active_record' to Gemfile
require 'leapfrog/user_columns'
require 'leapfrog/users'
require 'leapfrog/version'
#ActiveRecord::ConnectionAdapters::TableDefinition.class_eval do
# include Leapfrog::TableDefinition
#end
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Leapfrog::TableDefinition unless ActiveRecord::ConnectionAdapters::TableDefinition.include?(Leapfrog::TableDefinition)
#conn = ActiveRecord::Base::connection
#conn.extend Leapfrog::AlterUserColumns
#ActiveRecord::ConnectionAdapters::AbstractAdapter.class_eval do
# include Leapfrog::AbstractAdapter
#end
ActiveRecord::ConnectionAdapters::AbstractAdapter.send :include, Leapfrog::AbstractAdapter unless ActiveRecord::ConnectionAdapters::AbstractAdapter.include?(Leapfrog::AbstractAdapter)
#ActiveRecord::ConnectionAdapters::SchemaStatements.class_eval do
# include Leapfrog::AlterUserColumns
#end
#ActiveRecord::ConnectionAdapters::Table.class_eval do
# def userstamps
# @base.add_userstamps(@table_name)
# end
#end
ActiveRecord::ConnectionAdapters::Table.send :include, Leapfrog::Table unless ActiveRecord::ConnectionAdapters::Table.include?(Leapfrog::Table)
ActiveRecord::Base.send :include, Leapfrog::Model::Observe unless ActiveRecord::Base.include?(Leapfrog::Model::Observe)
#ApplicationController.send :include, Leapfrog::Controller::Users unless ApplicationController.include?(Leapfrog::Controller::Users)
ActionController::Base.send :include, Leapfrog::Controller::Users unless ActionController::Base.include?(Leapfrog::Controller::Users)
## Instruction:
Fix and clean up code
## Code After:
require 'active_record'
require 'active_record/base'
require 'active_record/connection_adapters/abstract/schema_definitions'
require 'action_controller/base'
# Add gem 'leapfrog', require => 'active_record' to Gemfile
require 'leapfrog/user_columns'
require 'leapfrog/users'
require 'leapfrog/version'
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Leapfrog::TableDefinition unless ActiveRecord::ConnectionAdapters::TableDefinition.include?(Leapfrog::TableDefinition)
ActiveRecord::ConnectionAdapters::AbstractAdapter.send :include, Leapfrog::AbstractAdapter unless ActiveRecord::ConnectionAdapters::AbstractAdapter.include?(Leapfrog::AbstractAdapter)
ActiveRecord::ConnectionAdapters::Table.send :include, Leapfrog::Table unless ActiveRecord::ConnectionAdapters::Table.include?(Leapfrog::Table)
ActiveRecord::Base.send :include, Leapfrog::Model::Observe unless ActiveRecord::Base.include?(Leapfrog::Model::Observe)
ActionController::Base.send :include, Leapfrog::Controller::Users unless ActionController::Base.include?(Leapfrog::Controller::Users)
| + require 'active_record'
require 'active_record/base'
require 'active_record/connection_adapters/abstract/schema_definitions'
require 'action_controller/base'
# Add gem 'leapfrog', require => 'active_record' to Gemfile
require 'leapfrog/user_columns'
require 'leapfrog/users'
require 'leapfrog/version'
- #ActiveRecord::ConnectionAdapters::TableDefinition.class_eval do
- # include Leapfrog::TableDefinition
- #end
-
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Leapfrog::TableDefinition unless ActiveRecord::ConnectionAdapters::TableDefinition.include?(Leapfrog::TableDefinition)
-
- #conn = ActiveRecord::Base::connection
- #conn.extend Leapfrog::AlterUserColumns
- #ActiveRecord::ConnectionAdapters::AbstractAdapter.class_eval do
- # include Leapfrog::AbstractAdapter
- #end
ActiveRecord::ConnectionAdapters::AbstractAdapter.send :include, Leapfrog::AbstractAdapter unless ActiveRecord::ConnectionAdapters::AbstractAdapter.include?(Leapfrog::AbstractAdapter)
-
- #ActiveRecord::ConnectionAdapters::SchemaStatements.class_eval do
- # include Leapfrog::AlterUserColumns
- #end
-
- #ActiveRecord::ConnectionAdapters::Table.class_eval do
- # def userstamps
- # @base.add_userstamps(@table_name)
- # end
- #end
ActiveRecord::ConnectionAdapters::Table.send :include, Leapfrog::Table unless ActiveRecord::ConnectionAdapters::Table.include?(Leapfrog::Table)
ActiveRecord::Base.send :include, Leapfrog::Model::Observe unless ActiveRecord::Base.include?(Leapfrog::Model::Observe)
- #ApplicationController.send :include, Leapfrog::Controller::Users unless ApplicationController.include?(Leapfrog::Controller::Users)
ActionController::Base.send :include, Leapfrog::Controller::Users unless ActionController::Base.include?(Leapfrog::Controller::Users) | 22 | 0.594595 | 1 | 21 |
79c799b3379086f12df4dc01e4d2c505629435fa | views/partials/search-students-box.html | views/partials/search-students-box.html | <div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col"></div>
<div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-typography--text-center mdl-typography--headline">
<form action="/search" method="post">
<div class="mdl-textfield mdl-js-textfield mdl-typography--text-center">
<input class="mdl-textfield__input" type="text" id="searchText" name="searchText" value="{{searchText}}">
<label class="mdl-textfield__label" for="searchText">Søk etter elev...</label>
</div>
<button type="submit" id="SearchFormSubmit" title="Søk etter elever" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">search</i>
</button>
</form>
<div class="small-text">
Søk etter elever ved å skrive hele, eller deler av navnet i søkefeltet.
</div>
</div>
<div class="mdl-cell mdl-cell--3-col"></div>
</div>
<!-- Helperscript for search -->
<script src="/public/js/searchform-validate.js"></script> | <div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col"></div>
<div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-typography--text-center mdl-typography--headline">
<form action="/search" method="post">
<div class="mdl-textfield mdl-js-textfield mdl-typography--text-center">
<input class="mdl-textfield__input" type="text" id="searchText" name="searchText" value="{{searchText}}" autocomplete="off" autofocus>
<label class="mdl-textfield__label" for="searchText">Søk etter elev...</label>
</div>
<button type="submit" id="SearchFormSubmit" title="Søk etter elever" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">search</i>
</button>
</form>
<div class="small-text">
Søk etter elever ved å skrive hele, eller deler av navnet i søkefeltet.
</div>
</div>
<div class="mdl-cell mdl-cell--3-col"></div>
</div>
<!-- Helperscript for search -->
<script src="/public/js/searchform-validate.js"></script> | Disable autocomplete on the search box, so Chrome doesn't fill the form with crap | Disable autocomplete on the search box, so Chrome doesn't fill the form with crap
| HTML | mit | telemark/minelev-web,telemark/minelev-web | html | ## Code Before:
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col"></div>
<div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-typography--text-center mdl-typography--headline">
<form action="/search" method="post">
<div class="mdl-textfield mdl-js-textfield mdl-typography--text-center">
<input class="mdl-textfield__input" type="text" id="searchText" name="searchText" value="{{searchText}}">
<label class="mdl-textfield__label" for="searchText">Søk etter elev...</label>
</div>
<button type="submit" id="SearchFormSubmit" title="Søk etter elever" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">search</i>
</button>
</form>
<div class="small-text">
Søk etter elever ved å skrive hele, eller deler av navnet i søkefeltet.
</div>
</div>
<div class="mdl-cell mdl-cell--3-col"></div>
</div>
<!-- Helperscript for search -->
<script src="/public/js/searchform-validate.js"></script>
## Instruction:
Disable autocomplete on the search box, so Chrome doesn't fill the form with crap
## Code After:
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col"></div>
<div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-typography--text-center mdl-typography--headline">
<form action="/search" method="post">
<div class="mdl-textfield mdl-js-textfield mdl-typography--text-center">
<input class="mdl-textfield__input" type="text" id="searchText" name="searchText" value="{{searchText}}" autocomplete="off" autofocus>
<label class="mdl-textfield__label" for="searchText">Søk etter elev...</label>
</div>
<button type="submit" id="SearchFormSubmit" title="Søk etter elever" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">search</i>
</button>
</form>
<div class="small-text">
Søk etter elever ved å skrive hele, eller deler av navnet i søkefeltet.
</div>
</div>
<div class="mdl-cell mdl-cell--3-col"></div>
</div>
<!-- Helperscript for search -->
<script src="/public/js/searchform-validate.js"></script> | <div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col"></div>
<div class="mdl-cell mdl-cell--6-col mdl-cell--8-col-tablet mdl-typography--text-center mdl-typography--headline">
<form action="/search" method="post">
<div class="mdl-textfield mdl-js-textfield mdl-typography--text-center">
- <input class="mdl-textfield__input" type="text" id="searchText" name="searchText" value="{{searchText}}">
+ <input class="mdl-textfield__input" type="text" id="searchText" name="searchText" value="{{searchText}}" autocomplete="off" autofocus>
? +++++++++++++++++++++++++++++
<label class="mdl-textfield__label" for="searchText">Søk etter elev...</label>
</div>
<button type="submit" id="SearchFormSubmit" title="Søk etter elever" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
<i class="material-icons">search</i>
</button>
</form>
<div class="small-text">
Søk etter elever ved å skrive hele, eller deler av navnet i søkefeltet.
</div>
</div>
<div class="mdl-cell mdl-cell--3-col"></div>
</div>
<!-- Helperscript for search -->
<script src="/public/js/searchform-validate.js"></script> | 2 | 0.095238 | 1 | 1 |
c770d225eaebfaf25899c88c3b463c78d5ff88e8 | public/student.css | public/student.css | @import url("common.css");
.answer,
#clipboardContent { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px; font-size: 17px}
#clipboardContent {display: block; width: 100%; margin: 10px 0;}
#copy {background: #359BB7; border-radius: 5px; color: #fff; padding: 5px 15px; white-space: nowrap; margin: 10px 0 5px;text-align: center;display: inline-block;position: relative;cursor: pointer;border: none;}
| @import url("common.css");
.answer,
#clipboardContent { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px; font-size: 17px}
#clipboardContent {display: block; width: 100%; margin: 10px 0;}
#copy {background: #359BB7; border-radius: 5px; color: #fff; padding: 5px 15px; white-space: nowrap; margin: 10px 0 5px;text-align: center;display: inline-block;position: relative;cursor: pointer;border: none;}
.rich-text-editor img[src*="data:image/png"] { margin: 4px; }
.rich-text-editor:focus img[src*="data:image/png"],
.rich-text-editor.rich-text-focused img[src*="data:image/png"] { box-shadow: 0 0 3px 1px rgba(0, 0, 0, .2); }
| Add forgotten drop shadow for inline images | Add forgotten drop shadow for inline images
| CSS | mit | digabi/rich-text-editor,digabi/rich-text-editor,digabi/rich-text-editor,digabi/math-editor,digabi/math-editor | css | ## Code Before:
@import url("common.css");
.answer,
#clipboardContent { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px; font-size: 17px}
#clipboardContent {display: block; width: 100%; margin: 10px 0;}
#copy {background: #359BB7; border-radius: 5px; color: #fff; padding: 5px 15px; white-space: nowrap; margin: 10px 0 5px;text-align: center;display: inline-block;position: relative;cursor: pointer;border: none;}
## Instruction:
Add forgotten drop shadow for inline images
## Code After:
@import url("common.css");
.answer,
#clipboardContent { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px; font-size: 17px}
#clipboardContent {display: block; width: 100%; margin: 10px 0;}
#copy {background: #359BB7; border-radius: 5px; color: #fff; padding: 5px 15px; white-space: nowrap; margin: 10px 0 5px;text-align: center;display: inline-block;position: relative;cursor: pointer;border: none;}
.rich-text-editor img[src*="data:image/png"] { margin: 4px; }
.rich-text-editor:focus img[src*="data:image/png"],
.rich-text-editor.rich-text-focused img[src*="data:image/png"] { box-shadow: 0 0 3px 1px rgba(0, 0, 0, .2); }
| @import url("common.css");
.answer,
#clipboardContent { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px; font-size: 17px}
#clipboardContent {display: block; width: 100%; margin: 10px 0;}
#copy {background: #359BB7; border-radius: 5px; color: #fff; padding: 5px 15px; white-space: nowrap; margin: 10px 0 5px;text-align: center;display: inline-block;position: relative;cursor: pointer;border: none;}
+ .rich-text-editor img[src*="data:image/png"] { margin: 4px; }
+ .rich-text-editor:focus img[src*="data:image/png"],
+ .rich-text-editor.rich-text-focused img[src*="data:image/png"] { box-shadow: 0 0 3px 1px rgba(0, 0, 0, .2); } | 3 | 0.5 | 3 | 0 |
79ef91ecbed6b988ec46307d547207d6089bdc15 | Report/Chapters/Manual.tex | Report/Chapters/Manual.tex | \chapter{User Guide}
\label{chap:Guide}
| \chapter{User Guide}
\label{chap:Guide}
Welcome to Viskell!
Viskell is a tool to experiment with the Haskell programming language in a visual and playful way.
You don't need to be a Haskell expert to use Viskell: this User Guide will tell you everything you know to get started.
\textbf{Squares!}
First, we're building a program that calculates the product of two numbers.
To do that, right-click (or tap-and-hold) anywhere to open the \emph{function menu}, if it isn't open already.
(It's the big, purple box: it's hard to miss.)
The function menu has a number of buttons to choose from.
For now, click the button that says \emph{Display Block} to add a display to your program.
The display block doesn't do much on its own: it only displays the value that it's connected to.
Next, add a \emph{value block} by clicking the respective button on the function menu.
You'll be asked to provide a value: something like 1234 will do.
You should now have two blocks: drag the output block so that it's a bit below the value block.
Then, from the \emph{Numeric types} category, click \emph{(*)}, the multiplication function.
The multiplication function has two inputs.
Connect both inputs (the top dots) to the value block you created by clicking and dragging from one dots to the other.
Then attach the function block's output anchor (the bottom dot) to the display block's input.
The square of the number you picked (1522756) should now appear in the output block.
Congratulations!
You've made a real Haskell program!
\textbf{Sliders!}
Our first program isn't very exciting.
You could write the same program in regular Haskell by typing \texttt{5 * 5}.
Viskell has a few tricks up its sleeve, however.
For our second example, we'll try adding a \emph{slider block}.
From the function menu, click the button to get a slider block.
Then connect it to one of the inputs (again, the top dots) of your multiplication function block.
Drag the slider to change its value: you should see the value on the output block change as well.
\textbf{Getting the Haskell code for your program}
Viskell generates Haskell code for you, which you can see by selecting your display block, pressing the \textbf{Z} key, and then selecting the `Haskell Source' tab.
Be careful, though: this is the Haskell code that actually gets executed.
It's probably not `good' Haskell code.
| Add first bits of user guide | Add first bits of user guide
| TeX | mit | viskell/viskell,wandernauta/viskell,andrewdavidmackenzie/viskell | tex | ## Code Before:
\chapter{User Guide}
\label{chap:Guide}
## Instruction:
Add first bits of user guide
## Code After:
\chapter{User Guide}
\label{chap:Guide}
Welcome to Viskell!
Viskell is a tool to experiment with the Haskell programming language in a visual and playful way.
You don't need to be a Haskell expert to use Viskell: this User Guide will tell you everything you know to get started.
\textbf{Squares!}
First, we're building a program that calculates the product of two numbers.
To do that, right-click (or tap-and-hold) anywhere to open the \emph{function menu}, if it isn't open already.
(It's the big, purple box: it's hard to miss.)
The function menu has a number of buttons to choose from.
For now, click the button that says \emph{Display Block} to add a display to your program.
The display block doesn't do much on its own: it only displays the value that it's connected to.
Next, add a \emph{value block} by clicking the respective button on the function menu.
You'll be asked to provide a value: something like 1234 will do.
You should now have two blocks: drag the output block so that it's a bit below the value block.
Then, from the \emph{Numeric types} category, click \emph{(*)}, the multiplication function.
The multiplication function has two inputs.
Connect both inputs (the top dots) to the value block you created by clicking and dragging from one dots to the other.
Then attach the function block's output anchor (the bottom dot) to the display block's input.
The square of the number you picked (1522756) should now appear in the output block.
Congratulations!
You've made a real Haskell program!
\textbf{Sliders!}
Our first program isn't very exciting.
You could write the same program in regular Haskell by typing \texttt{5 * 5}.
Viskell has a few tricks up its sleeve, however.
For our second example, we'll try adding a \emph{slider block}.
From the function menu, click the button to get a slider block.
Then connect it to one of the inputs (again, the top dots) of your multiplication function block.
Drag the slider to change its value: you should see the value on the output block change as well.
\textbf{Getting the Haskell code for your program}
Viskell generates Haskell code for you, which you can see by selecting your display block, pressing the \textbf{Z} key, and then selecting the `Haskell Source' tab.
Be careful, though: this is the Haskell code that actually gets executed.
It's probably not `good' Haskell code.
| \chapter{User Guide}
\label{chap:Guide}
+
+ Welcome to Viskell!
+ Viskell is a tool to experiment with the Haskell programming language in a visual and playful way.
+ You don't need to be a Haskell expert to use Viskell: this User Guide will tell you everything you know to get started.
+
+ \textbf{Squares!}
+ First, we're building a program that calculates the product of two numbers.
+ To do that, right-click (or tap-and-hold) anywhere to open the \emph{function menu}, if it isn't open already.
+ (It's the big, purple box: it's hard to miss.)
+ The function menu has a number of buttons to choose from.
+ For now, click the button that says \emph{Display Block} to add a display to your program.
+ The display block doesn't do much on its own: it only displays the value that it's connected to.
+ Next, add a \emph{value block} by clicking the respective button on the function menu.
+ You'll be asked to provide a value: something like 1234 will do.
+ You should now have two blocks: drag the output block so that it's a bit below the value block.
+ Then, from the \emph{Numeric types} category, click \emph{(*)}, the multiplication function.
+ The multiplication function has two inputs.
+ Connect both inputs (the top dots) to the value block you created by clicking and dragging from one dots to the other.
+ Then attach the function block's output anchor (the bottom dot) to the display block's input.
+ The square of the number you picked (1522756) should now appear in the output block.
+ Congratulations!
+ You've made a real Haskell program!
+
+ \textbf{Sliders!}
+ Our first program isn't very exciting.
+ You could write the same program in regular Haskell by typing \texttt{5 * 5}.
+ Viskell has a few tricks up its sleeve, however.
+ For our second example, we'll try adding a \emph{slider block}.
+ From the function menu, click the button to get a slider block.
+ Then connect it to one of the inputs (again, the top dots) of your multiplication function block.
+ Drag the slider to change its value: you should see the value on the output block change as well.
+
+ \textbf{Getting the Haskell code for your program}
+ Viskell generates Haskell code for you, which you can see by selecting your display block, pressing the \textbf{Z} key, and then selecting the `Haskell Source' tab.
+ Be careful, though: this is the Haskell code that actually gets executed.
+ It's probably not `good' Haskell code. | 36 | 18 | 36 | 0 |
6a0ab086398ac43355586c6cdcc2f73131b3a409 | js/components/developer/secure/secure.js | js/components/developer/secure/secure.js | import React, { Component, PropTypes } from 'react';
import { Spinner } from 'native-base';
import { connect } from 'react-redux';
import AuthenticationScreen from '../authentication-screen';
/*
Renders children components if the user is authenticated.
Otherwise an authentication screen is displayed.
*/
class Secure extends Component {
static propTypes = {
authenticated: PropTypes.bool.isRequired,
loading: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
}
render() {
const { authenticated, loading, children } = this.props;
// Render children component(s) if the user is authenticated
if (authenticated) {
return children;
}
// Display loading spinner while authenticating
if (loading) {
return <Spinner color="blue" />;
}
// Else open the authentication screen
return (
<AuthenticationScreen />
);
}
}
// Props tied together with Redux state
const mapStateToProps = state => ({
authenticated: state.session.token != null,
loading: state.session.sessionLoading || state.user.userLoading,
});
// Connect class with Redux and export
export default connect(mapStateToProps)(Secure);
| import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import AuthenticationScreen from '../authentication-screen';
import JASpinner from '../../common/spinner/JASpinner';
/*
Renders children components if the user is authenticated.
Otherwise an authentication screen is displayed.
*/
class Secure extends Component {
static propTypes = {
authenticated: PropTypes.bool.isRequired,
loading: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
}
render() {
const { authenticated, loading, children } = this.props;
// Render children component(s) if the user is authenticated
if (authenticated) {
return children;
}
// Display loading spinner while authenticating
if (loading) {
return (
<JASpinner />
);
}
// Else open the authentication screen
return (
<AuthenticationScreen />
);
}
}
// Props tied together with Redux state
const mapStateToProps = state => ({
authenticated: state.session.token != null,
loading: state.session.sessionLoading || state.user.userLoading,
});
// Connect class with Redux and export
export default connect(mapStateToProps)(Secure);
| Make Secure component use JASpinner | Make Secure component use JASpinner
| JavaScript | mit | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client | javascript | ## Code Before:
import React, { Component, PropTypes } from 'react';
import { Spinner } from 'native-base';
import { connect } from 'react-redux';
import AuthenticationScreen from '../authentication-screen';
/*
Renders children components if the user is authenticated.
Otherwise an authentication screen is displayed.
*/
class Secure extends Component {
static propTypes = {
authenticated: PropTypes.bool.isRequired,
loading: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
}
render() {
const { authenticated, loading, children } = this.props;
// Render children component(s) if the user is authenticated
if (authenticated) {
return children;
}
// Display loading spinner while authenticating
if (loading) {
return <Spinner color="blue" />;
}
// Else open the authentication screen
return (
<AuthenticationScreen />
);
}
}
// Props tied together with Redux state
const mapStateToProps = state => ({
authenticated: state.session.token != null,
loading: state.session.sessionLoading || state.user.userLoading,
});
// Connect class with Redux and export
export default connect(mapStateToProps)(Secure);
## Instruction:
Make Secure component use JASpinner
## Code After:
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import AuthenticationScreen from '../authentication-screen';
import JASpinner from '../../common/spinner/JASpinner';
/*
Renders children components if the user is authenticated.
Otherwise an authentication screen is displayed.
*/
class Secure extends Component {
static propTypes = {
authenticated: PropTypes.bool.isRequired,
loading: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
}
render() {
const { authenticated, loading, children } = this.props;
// Render children component(s) if the user is authenticated
if (authenticated) {
return children;
}
// Display loading spinner while authenticating
if (loading) {
return (
<JASpinner />
);
}
// Else open the authentication screen
return (
<AuthenticationScreen />
);
}
}
// Props tied together with Redux state
const mapStateToProps = state => ({
authenticated: state.session.token != null,
loading: state.session.sessionLoading || state.user.userLoading,
});
// Connect class with Redux and export
export default connect(mapStateToProps)(Secure);
| import React, { Component, PropTypes } from 'react';
- import { Spinner } from 'native-base';
import { connect } from 'react-redux';
import AuthenticationScreen from '../authentication-screen';
+ import JASpinner from '../../common/spinner/JASpinner';
/*
Renders children components if the user is authenticated.
Otherwise an authentication screen is displayed.
*/
class Secure extends Component {
static propTypes = {
authenticated: PropTypes.bool.isRequired,
loading: PropTypes.bool.isRequired,
children: PropTypes.node.isRequired,
}
render() {
const { authenticated, loading, children } = this.props;
// Render children component(s) if the user is authenticated
if (authenticated) {
return children;
}
// Display loading spinner while authenticating
if (loading) {
- return <Spinner color="blue" />;
+ return (
+ <JASpinner />
+ );
}
// Else open the authentication screen
return (
<AuthenticationScreen />
);
}
}
// Props tied together with Redux state
const mapStateToProps = state => ({
authenticated: state.session.token != null,
loading: state.session.sessionLoading || state.user.userLoading,
});
// Connect class with Redux and export
export default connect(mapStateToProps)(Secure); | 6 | 0.136364 | 4 | 2 |
2f990ffb20637a5bbf97921fbf9ed3162e3828b1 | src/server/elasticsearch/utils/getClientSearchQuery.js | src/server/elasticsearch/utils/getClientSearchQuery.js | const { INDEX_NAME, TYPE_NAME } = require('./constants');
/**
* Helper function that returns a Promise to a search with the Elasticsearch client with the
* given query for the given field.
*
* @param {Client} client
* @param {string} query
* @param {string} field
*/
const getClientSearchQuery = (client, query, field) => (
client.search({
index: INDEX_NAME,
type: TYPE_NAME,
body: {
query: {
match: {
[field]: query,
},
},
},
})
);
module.exports = getClientSearchQuery;
| const { INDEX_NAME, TYPE_NAME } = require('./constants');
/**
* Helper function that returns a Promise to a search with the Elasticsearch client with the
* given query for the given field.
*
* @param {Client} client
* @param {string} query
* @param {string} field
*/
const getClientSearchQuery = (client, query, field) => {
const matchKey = query ? 'match' : 'match_all';
const matchVal = query ? { [field]: query } : {};
return client.search({
index: INDEX_NAME,
type: TYPE_NAME,
body: {
query: {
[matchKey]: matchVal,
},
},
});
};
module.exports = getClientSearchQuery;
| Fix query to match_all if query is undefined | Search: Fix query to match_all if query is undefined
| JavaScript | mit | algorithm-helper/algorithm-helper,algorithm-helper/algorithm-helper,algorithm-helper/algorithm-helper | javascript | ## Code Before:
const { INDEX_NAME, TYPE_NAME } = require('./constants');
/**
* Helper function that returns a Promise to a search with the Elasticsearch client with the
* given query for the given field.
*
* @param {Client} client
* @param {string} query
* @param {string} field
*/
const getClientSearchQuery = (client, query, field) => (
client.search({
index: INDEX_NAME,
type: TYPE_NAME,
body: {
query: {
match: {
[field]: query,
},
},
},
})
);
module.exports = getClientSearchQuery;
## Instruction:
Search: Fix query to match_all if query is undefined
## Code After:
const { INDEX_NAME, TYPE_NAME } = require('./constants');
/**
* Helper function that returns a Promise to a search with the Elasticsearch client with the
* given query for the given field.
*
* @param {Client} client
* @param {string} query
* @param {string} field
*/
const getClientSearchQuery = (client, query, field) => {
const matchKey = query ? 'match' : 'match_all';
const matchVal = query ? { [field]: query } : {};
return client.search({
index: INDEX_NAME,
type: TYPE_NAME,
body: {
query: {
[matchKey]: matchVal,
},
},
});
};
module.exports = getClientSearchQuery;
| const { INDEX_NAME, TYPE_NAME } = require('./constants');
/**
* Helper function that returns a Promise to a search with the Elasticsearch client with the
* given query for the given field.
*
* @param {Client} client
* @param {string} query
* @param {string} field
*/
- const getClientSearchQuery = (client, query, field) => (
? ^
+ const getClientSearchQuery = (client, query, field) => {
? ^
+ const matchKey = query ? 'match' : 'match_all';
+ const matchVal = query ? { [field]: query } : {};
- client.search({
+ return client.search({
? +++++++
index: INDEX_NAME,
type: TYPE_NAME,
body: {
query: {
+ [matchKey]: matchVal,
- match: {
- [field]: query,
- },
},
},
- })
+ });
? +
- );
+ };
module.exports = getClientSearchQuery; | 14 | 0.56 | 7 | 7 |
850d0f710336b0bdc91ca5d3440aaa8d499dc7ac | src/plugins.js | src/plugins.js | if (process.env.NODE_ENV !== 'production') {
// we're importing script and styles from given plugin
// this method should be only used in development
// for production specify your plugin in package.json
require('epl-plugin/dev');
require('epl-plugin/dev/style.css');
// add plugins in development mode here
// require('epl-plugin/dev');
// require('epl-plugin/dev/style.css');
}
// plugin handlers
const plugins = Object.keys(window)
.filter(key => {
return key.match(/^__EPL_/);
})
.map(key => console.log('Loaded:', key.replace('__EPL_', '')) || window[key]);
console.log(plugins);
export default plugins;
| if (process.env.NODE_ENV !== 'production') {
// we're importing script and styles from given plugin
// this method should be only used in development
// for production specify your plugin in package.json
// require('epl-plugin/dev');
// require('epl-plugin/dev/style.css');
}
// plugin handlers
const plugins = Object.keys(window)
.filter(key => {
return key.match(/^__EPL_/);
})
.map(key => console.log('Loaded:', key.replace('__EPL_', '')) || window[key]);
console.log(plugins);
export default plugins;
| Remove epl-plugin in development mode | Remove epl-plugin in development mode
| JavaScript | apache-2.0 | mkacper/erlangpl,Baransu/erlangpl,erlanglab/erlangpl-ui,Hajto/erlangpl,erlanglab/erlangpl,Baransu/erlangpl,erlanglab/erlangpl,Hajto/erlangpl,Hajto/erlangpl,mkacper/erlangpl,erlanglab/erlangpl-ui,erlanglab/erlangpl,Baransu/erlangpl,mkacper/erlangpl | javascript | ## Code Before:
if (process.env.NODE_ENV !== 'production') {
// we're importing script and styles from given plugin
// this method should be only used in development
// for production specify your plugin in package.json
require('epl-plugin/dev');
require('epl-plugin/dev/style.css');
// add plugins in development mode here
// require('epl-plugin/dev');
// require('epl-plugin/dev/style.css');
}
// plugin handlers
const plugins = Object.keys(window)
.filter(key => {
return key.match(/^__EPL_/);
})
.map(key => console.log('Loaded:', key.replace('__EPL_', '')) || window[key]);
console.log(plugins);
export default plugins;
## Instruction:
Remove epl-plugin in development mode
## Code After:
if (process.env.NODE_ENV !== 'production') {
// we're importing script and styles from given plugin
// this method should be only used in development
// for production specify your plugin in package.json
// require('epl-plugin/dev');
// require('epl-plugin/dev/style.css');
}
// plugin handlers
const plugins = Object.keys(window)
.filter(key => {
return key.match(/^__EPL_/);
})
.map(key => console.log('Loaded:', key.replace('__EPL_', '')) || window[key]);
console.log(plugins);
export default plugins;
| if (process.env.NODE_ENV !== 'production') {
// we're importing script and styles from given plugin
// this method should be only used in development
// for production specify your plugin in package.json
- require('epl-plugin/dev');
- require('epl-plugin/dev/style.css');
-
- // add plugins in development mode here
// require('epl-plugin/dev');
// require('epl-plugin/dev/style.css');
}
// plugin handlers
const plugins = Object.keys(window)
.filter(key => {
return key.match(/^__EPL_/);
})
.map(key => console.log('Loaded:', key.replace('__EPL_', '')) || window[key]);
console.log(plugins);
export default plugins; | 4 | 0.190476 | 0 | 4 |
96dc40fbe64d1757369b091f26e723b286791f72 | acts_as_geocodable.gemspec | acts_as_geocodable.gemspec | lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
require 'acts_as_geocodable/version'
Gem::Specification.new do |s|
s.name = %q{acts_as_geocodable}
s.version = ::ActsAsGeocodable::VERSION
s.authors = ["Daniel Morrison", "Brandon Keepers", "Brian Ryckbost"]
s.description = %q{Simple geocoding for Rails ActiveRecord models. See the README for more details.}
s.email = %q{info@collectiveidea.com}
s.files = Dir.glob("lib/**/*") + %w(CHANGELOG MIT-LICENSE README.textile)
s.homepage = %q{http://github.com/collectiveidea/acts_as_geocodable}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{Simple geocoding for Rails ActiveRecord models}
s.add_runtime_dependency 'graticule', ">= 2.0.0"
end
|
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'acts_as_geocodable/version'
Gem::Specification.new do |spec|
spec.name = 'acts_as_geocodable'
spec.version = ActsAsGeocodable::VERSION
spec.authors = ['Daniel Morrison', 'Brandon Keepers', 'Brian Ryckbost']
spec.email = 'info@collectiveidea.com'
spec.summary = 'Simple geocoding for Active Record models'
spec.description = 'Simple geocoding for Active Record models. See the README for more details.'
spec.homepage = 'https://github.com/collectiveidea/acts_as_geocodable'
spec.license = 'MIT'
spec.files = `git ls-files -z`.split("\x0")
spec.test_files = spec.files.grep(/^spec/)
spec.add_dependency 'graticule', '>= 2.0.0'
spec.add_development_dependency 'bundler', '~> 1.6'
spec.add_development_dependency 'rake', '~> 10.3'
end
| Clean up the gemspec, using Bundler's default as a guide | Clean up the gemspec, using Bundler's default as a guide
| Ruby | mit | kornhammer/acts_as_geocodable,collectiveidea/acts_as_geocodable | ruby | ## Code Before:
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)
require 'acts_as_geocodable/version'
Gem::Specification.new do |s|
s.name = %q{acts_as_geocodable}
s.version = ::ActsAsGeocodable::VERSION
s.authors = ["Daniel Morrison", "Brandon Keepers", "Brian Ryckbost"]
s.description = %q{Simple geocoding for Rails ActiveRecord models. See the README for more details.}
s.email = %q{info@collectiveidea.com}
s.files = Dir.glob("lib/**/*") + %w(CHANGELOG MIT-LICENSE README.textile)
s.homepage = %q{http://github.com/collectiveidea/acts_as_geocodable}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{Simple geocoding for Rails ActiveRecord models}
s.add_runtime_dependency 'graticule', ">= 2.0.0"
end
## Instruction:
Clean up the gemspec, using Bundler's default as a guide
## Code After:
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'acts_as_geocodable/version'
Gem::Specification.new do |spec|
spec.name = 'acts_as_geocodable'
spec.version = ActsAsGeocodable::VERSION
spec.authors = ['Daniel Morrison', 'Brandon Keepers', 'Brian Ryckbost']
spec.email = 'info@collectiveidea.com'
spec.summary = 'Simple geocoding for Active Record models'
spec.description = 'Simple geocoding for Active Record models. See the README for more details.'
spec.homepage = 'https://github.com/collectiveidea/acts_as_geocodable'
spec.license = 'MIT'
spec.files = `git ls-files -z`.split("\x0")
spec.test_files = spec.files.grep(/^spec/)
spec.add_dependency 'graticule', '>= 2.0.0'
spec.add_development_dependency 'bundler', '~> 1.6'
spec.add_development_dependency 'rake', '~> 10.3'
end
| +
- lib = File.expand_path('../lib/', __FILE__)
? -
+ lib = File.expand_path('../lib', __FILE__)
- $:.unshift lib unless $:.include?(lib)
? ^ ^ ^
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
? ^^^^^^^^^ ^ + ^^^^^^^^^
+
require 'acts_as_geocodable/version'
- Gem::Specification.new do |s|
+ Gem::Specification.new do |spec|
? +++
- s.name = %q{acts_as_geocodable}
? ^^^ ^
+ spec.name = 'acts_as_geocodable'
? +++ +++ ^ ^
- s.version = ::ActsAsGeocodable::VERSION
? --
+ spec.version = ActsAsGeocodable::VERSION
? +++
- s.authors = ["Daniel Morrison", "Brandon Keepers", "Brian Ryckbost"]
- s.description = %q{Simple geocoding for Rails ActiveRecord models. See the README for more details.}
- s.email = %q{info@collectiveidea.com}
- s.files = Dir.glob("lib/**/*") + %w(CHANGELOG MIT-LICENSE README.textile)
- s.homepage = %q{http://github.com/collectiveidea/acts_as_geocodable}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.6}
- s.summary = %q{Simple geocoding for Rails ActiveRecord models}
+ spec.authors = ['Daniel Morrison', 'Brandon Keepers', 'Brian Ryckbost']
+ spec.email = 'info@collectiveidea.com'
+ spec.summary = 'Simple geocoding for Active Record models'
+ spec.description = 'Simple geocoding for Active Record models. See the README for more details.'
+ spec.homepage = 'https://github.com/collectiveidea/acts_as_geocodable'
+ spec.license = 'MIT'
+
+ spec.files = `git ls-files -z`.split("\x0")
+ spec.test_files = spec.files.grep(/^spec/)
+
- s.add_runtime_dependency 'graticule', ">= 2.0.0"
? -------- ---- ^ ^
+ spec.add_dependency 'graticule', '>= 2.0.0'
? +++ ^ ^
+
+ spec.add_development_dependency 'bundler', '~> 1.6'
+ spec.add_development_dependency 'rake', '~> 10.3'
end
- | 37 | 1.85 | 21 | 16 |
1a9f5f6d5518f83baef490215512cbc66bd0f6c7 | source/css/settings/_settings.base.links.scss | source/css/settings/_settings.base.links.scss | // $link-text-decoration: underline;
// $link-color: #00c;
// $link-color-hover: darken($color-link, 10%);
| // $link-text-decoration: underline;
// $link-color: #00c;
// $link-color-hover: darken($link-color, 10%);
| Fix variable name for link color | Fix variable name for link color
| SCSS | mit | spacelab/spacelab,spacelab/spacelab | scss | ## Code Before:
// $link-text-decoration: underline;
// $link-color: #00c;
// $link-color-hover: darken($color-link, 10%);
## Instruction:
Fix variable name for link color
## Code After:
// $link-text-decoration: underline;
// $link-color: #00c;
// $link-color-hover: darken($link-color, 10%);
| // $link-text-decoration: underline;
// $link-color: #00c;
- // $link-color-hover: darken($color-link, 10%);
? -----
+ // $link-color-hover: darken($link-color, 10%);
? +++++
| 2 | 0.5 | 1 | 1 |
84313c1fe8d7ba6d8f955d946dad6ecd7dce871e | Build/ZipRelease.cmd | Build/ZipRelease.cmd | call clean ..\Output\NET40\Examples
call clean ..\Output\NET45\Examples
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET40-%1.zip ..\Output\NET40\*.* > ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET45-%1.zip ..\Output\NET45\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL4-%1.zip ..\Output\SL4\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL5-%1.zip ..\Output\SL5\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET40-Examples-%1.zip ..\Output\NET40\Examples\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET45-Examples-%1.zip ..\Output\NET45\Examples\*.* >> ZipRelease.log
"C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\*.* > ZipRelease.log | mkdir ..\Output\Release
mkdir ..\Output\Release\NET40
mkdir ..\Output\Release\NET45
mkdir ..\Output\Release\NetCore45
mkdir ..\Output\Release\NetCore45\Themes
mkdir ..\Output\Release\SL5
copy ..\Output\NET45\OxyPlot.??? ..\Output\Release
copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40
copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45
copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40
copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45
copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5
copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45
copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes
"C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log | Remove examples from Codeplex Release package. Include NET40/NET45/SL5/NetCore45 libraries, remove OpenXml and Pdf packages (use NuGet if you need these). | Remove examples from Codeplex Release package.
Include NET40/NET45/SL5/NetCore45 libraries, remove OpenXml and Pdf packages
(use NuGet if you need these).
| Batchfile | mit | shoelzer/oxyplot,DotNetDoctor/oxyplot,shoelzer/oxyplot,H2ONaCl/oxyplot,sevoku/oxyplot,GeertvanHorrik/oxyplot,shoelzer/oxyplot,br111an/oxyplot,Sbosanquet/oxyplot,H2ONaCl/oxyplot,Rustemt/oxyplot,NilesDavis/oxyplot,sevoku/oxyplot,olegtarasov/oxyplot,DotNetDoctor/oxyplot,TheAlmightyBob/oxyplot,Mitch-Connor/oxyplot,H2ONaCl/oxyplot,TheAlmightyBob/oxyplot,freudenthal/oxyplot,Mitch-Connor/oxyplot,objorke/oxyplot,mattleibow/oxyplot,lynxkor/oxyplot,Rustemt/oxyplot,BRER-TECH/oxyplot,Jofta/oxyplot,BRER-TECH/oxyplot,olegtarasov/oxyplot,lynxkor/oxyplot,zur003/oxyplot,Jonarw/oxyplot,jeremyiverson/oxyplot,bbqchickenrobot/oxyplot,HermanEldering/oxyplot,svendu/oxyplot,Isolocis/oxyplot,objorke/oxyplot,as-zhuravlev/oxyplot_wpf_fork,Sbosanquet/oxyplot,jeremyiverson/oxyplot,HermanEldering/oxyplot,freudenthal/oxyplot,Rustemt/oxyplot,as-zhuravlev/oxyplot_wpf_fork,lynxkor/oxyplot,TheAlmightyBob/oxyplot,jeremyiverson/oxyplot,br111an/oxyplot,br111an/oxyplot,Kaplas80/oxyplot,ze-pequeno/oxyplot,svendu/oxyplot,GeertvanHorrik/oxyplot,Mitch-Connor/oxyplot,objorke/oxyplot,Sbosanquet/oxyplot,freudenthal/oxyplot,GeertvanHorrik/oxyplot,as-zhuravlev/oxyplot_wpf_fork,svendu/oxyplot,bbqchickenrobot/oxyplot,bbqchickenrobot/oxyplot,Kaplas80/oxyplot,mattleibow/oxyplot,oxyplot/oxyplot | batchfile | ## Code Before:
call clean ..\Output\NET40\Examples
call clean ..\Output\NET45\Examples
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET40-%1.zip ..\Output\NET40\*.* > ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET45-%1.zip ..\Output\NET45\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL4-%1.zip ..\Output\SL4\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL5-%1.zip ..\Output\SL5\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET40-Examples-%1.zip ..\Output\NET40\Examples\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET45-Examples-%1.zip ..\Output\NET45\Examples\*.* >> ZipRelease.log
"C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\*.* > ZipRelease.log
## Instruction:
Remove examples from Codeplex Release package.
Include NET40/NET45/SL5/NetCore45 libraries, remove OpenXml and Pdf packages
(use NuGet if you need these).
## Code After:
mkdir ..\Output\Release
mkdir ..\Output\Release\NET40
mkdir ..\Output\Release\NET45
mkdir ..\Output\Release\NetCore45
mkdir ..\Output\Release\NetCore45\Themes
mkdir ..\Output\Release\SL5
copy ..\Output\NET45\OxyPlot.??? ..\Output\Release
copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40
copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45
copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40
copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45
copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5
copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45
copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes
"C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log | - call clean ..\Output\NET40\Examples
- call clean ..\Output\NET45\Examples
+ mkdir ..\Output\Release
+ mkdir ..\Output\Release\NET40
+ mkdir ..\Output\Release\NET45
+ mkdir ..\Output\Release\NetCore45
+ mkdir ..\Output\Release\NetCore45\Themes
+ mkdir ..\Output\Release\SL5
+ copy ..\Output\NET45\OxyPlot.??? ..\Output\Release
- REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET40-%1.zip ..\Output\NET40\*.* > ZipRelease.log
- REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET45-%1.zip ..\Output\NET45\*.* >> ZipRelease.log
- REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL4-%1.zip ..\Output\SL4\*.* >> ZipRelease.log
- REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL5-%1.zip ..\Output\SL5\*.* >> ZipRelease.log
- REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET40-Examples-%1.zip ..\Output\NET40\Examples\*.* >> ZipRelease.log
- REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET45-Examples-%1.zip ..\Output\NET45\Examples\*.* >> ZipRelease.log
+ copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40
+ copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45
+
+ copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40
+ copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45
+
+ copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5
+
+ copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45
+ copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes
+
- "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\*.* > ZipRelease.log
+ "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log
? ++++++++
| 28 | 2.545455 | 19 | 9 |
f0371f68fc0ece594710ad9dbbdbfdab00a22e49 | migrations/003_add_capped_collections.py | migrations/003_add_capped_collections.py | import logging
log = logging.getLogger(__name__)
def up(db):
capped_collections = [
"fco_realtime_pay_legalisation_post",
"fco_realtime_pay_legalisation_drop_off",
"fco_realtime_pay_register_birth_abroad",
"fco_realtime_pay_register_death_abroad",
"fco_realtime_pay_foreign_marriage_certificates",
"fco_realtime_deposit_foreign_marriage",
"govuk_realtime",
"licensing_realtime",
]
for collection_name in capped_collections:
db.create_collection(name=collection_name, capped=True, size=5040)
log.info("created capped collection: %s" % collection_name)
| import logging
log = logging.getLogger(__name__)
def up(db):
capped_collections = [
"fco_pay_legalisation_post_realtime",
"fco_pay_legalisation_drop_off_realtime",
"fco_pay_register_birth_abroad_realtime",
"fco_pay_register_death_abroad_realtime",
"fco_pay_foreign_marriage_certificates_realtime",
"fco_deposit_foreign_marriage_realtime",
"govuk_realtime",
"licensing_realtime",
]
for collection_name in capped_collections:
db.create_collection(name=collection_name, capped=True, size=5040)
log.info("created capped collection: %s" % collection_name)
| Make realtim fco bucket names match format of others | Make realtim fco bucket names match format of others
| Python | mit | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | python | ## Code Before:
import logging
log = logging.getLogger(__name__)
def up(db):
capped_collections = [
"fco_realtime_pay_legalisation_post",
"fco_realtime_pay_legalisation_drop_off",
"fco_realtime_pay_register_birth_abroad",
"fco_realtime_pay_register_death_abroad",
"fco_realtime_pay_foreign_marriage_certificates",
"fco_realtime_deposit_foreign_marriage",
"govuk_realtime",
"licensing_realtime",
]
for collection_name in capped_collections:
db.create_collection(name=collection_name, capped=True, size=5040)
log.info("created capped collection: %s" % collection_name)
## Instruction:
Make realtim fco bucket names match format of others
## Code After:
import logging
log = logging.getLogger(__name__)
def up(db):
capped_collections = [
"fco_pay_legalisation_post_realtime",
"fco_pay_legalisation_drop_off_realtime",
"fco_pay_register_birth_abroad_realtime",
"fco_pay_register_death_abroad_realtime",
"fco_pay_foreign_marriage_certificates_realtime",
"fco_deposit_foreign_marriage_realtime",
"govuk_realtime",
"licensing_realtime",
]
for collection_name in capped_collections:
db.create_collection(name=collection_name, capped=True, size=5040)
log.info("created capped collection: %s" % collection_name)
| import logging
log = logging.getLogger(__name__)
def up(db):
capped_collections = [
- "fco_realtime_pay_legalisation_post",
? ---------
+ "fco_pay_legalisation_post_realtime",
? +++++++++
- "fco_realtime_pay_legalisation_drop_off",
? ---------
+ "fco_pay_legalisation_drop_off_realtime",
? +++++++++
- "fco_realtime_pay_register_birth_abroad",
? ---------
+ "fco_pay_register_birth_abroad_realtime",
? +++++++++
- "fco_realtime_pay_register_death_abroad",
? ---------
+ "fco_pay_register_death_abroad_realtime",
? +++++++++
- "fco_realtime_pay_foreign_marriage_certificates",
? ---------
+ "fco_pay_foreign_marriage_certificates_realtime",
? +++++++++
- "fco_realtime_deposit_foreign_marriage",
? ---------
+ "fco_deposit_foreign_marriage_realtime",
? +++++++++
"govuk_realtime",
"licensing_realtime",
]
for collection_name in capped_collections:
db.create_collection(name=collection_name, capped=True, size=5040)
log.info("created capped collection: %s" % collection_name) | 12 | 0.6 | 6 | 6 |
956ccd47e42eb0c442c220e1fa3df6d65bc623dd | app.json | app.json | {
"name": "betahealth",
"description": "",
"scripts": {
},
"env": {
"NODE_MODULES_CACHE": "false",
"SESSION_SECRET": {
"generator": "secret"
},
"FONT_CDN": "https://dhrlmnmyf2njb.cloudfront.net/",
"CONNECTINGTOSERVICES_BASEURL": "https://connecting-to-services-staging.azurewebsites.net/"
},
"formation": {
},
"addons": [
],
"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-multi.git"
}
]
}
| {
"name": "betahealth",
"description": "",
"scripts": {
},
"env": {
"NODE_MODULES_CACHE": "false",
"SESSION_SECRET": {
"generator": "secret"
},
"FONT_CDN": "https://dhrlmnmyf2njb.cloudfront.net/",
"CONNECTINGTOSERVICES_BASEURL": "https://c2s-staging.trafficmanager.net/"
},
"formation": {
},
"addons": [
],
"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-multi.git"
}
]
}
| Update the staging value for connecting to services base url | Update the staging value for connecting to services base url
| JSON | mit | nhsuk/betahealth,nhsuk/betahealth,nhsuk/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsalpha/betahealth | json | ## Code Before:
{
"name": "betahealth",
"description": "",
"scripts": {
},
"env": {
"NODE_MODULES_CACHE": "false",
"SESSION_SECRET": {
"generator": "secret"
},
"FONT_CDN": "https://dhrlmnmyf2njb.cloudfront.net/",
"CONNECTINGTOSERVICES_BASEURL": "https://connecting-to-services-staging.azurewebsites.net/"
},
"formation": {
},
"addons": [
],
"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-multi.git"
}
]
}
## Instruction:
Update the staging value for connecting to services base url
## Code After:
{
"name": "betahealth",
"description": "",
"scripts": {
},
"env": {
"NODE_MODULES_CACHE": "false",
"SESSION_SECRET": {
"generator": "secret"
},
"FONT_CDN": "https://dhrlmnmyf2njb.cloudfront.net/",
"CONNECTINGTOSERVICES_BASEURL": "https://c2s-staging.trafficmanager.net/"
},
"formation": {
},
"addons": [
],
"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-multi.git"
}
]
}
| {
"name": "betahealth",
"description": "",
"scripts": {
},
"env": {
"NODE_MODULES_CACHE": "false",
"SESSION_SECRET": {
"generator": "secret"
},
"FONT_CDN": "https://dhrlmnmyf2njb.cloudfront.net/",
- "CONNECTINGTOSERVICES_BASEURL": "https://connecting-to-services-staging.azurewebsites.net/"
+ "CONNECTINGTOSERVICES_BASEURL": "https://c2s-staging.trafficmanager.net/"
},
"formation": {
},
"addons": [
],
"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-multi.git"
}
]
} | 2 | 0.086957 | 1 | 1 |
f245b21117583c3e113d5ac6f7c97bdae1096e64 | README.md | README.md |
This library is a wrapper for the [scrypt key-derivation ](http://www.tarsnap.com/scrypt.htm)function created by Colin Percival. The core of the library is a copy of the scrypt KDF routines written in C and distributed by Colin.
### Thanks ###
* To **Colin Percival** for the [scrypt paper](https://www.tarsnap.com/scrypt/scrypt.pdf) and C reference implementation.
* To Replicon for [Replicon.Cryptography.SCrypt](https://github.com/replicon/Replicon.Cryptography.SCrypt) that I heavily used both as an inspiration for the API and as a Copy-Paste source for code and documentation. |
[](https://ci.appveyor.com/project/vbfox/netscrypt/branch/master)
This library is a wrapper for the [scrypt key-derivation ](http://www.tarsnap.com/scrypt.htm)function created by Colin Percival. The core of the library is a copy of the scrypt KDF routines written in C and distributed by Colin.
### Thanks ###
* To **Colin Percival** for the [scrypt paper](https://www.tarsnap.com/scrypt/scrypt.pdf) and C reference implementation.
* To Replicon for [Replicon.Cryptography.SCrypt](https://github.com/replicon/Replicon.Cryptography.SCrypt) that I heavily used both as an inspiration for the API and as a Copy-Paste source for code and documentation. | Add appveyor badge to readme | Add appveyor badge to readme
| Markdown | bsd-3-clause | vbfox/NetScrypt,vbfox/NetScrypt,vbfox/NetScrypt | markdown | ## Code Before:
This library is a wrapper for the [scrypt key-derivation ](http://www.tarsnap.com/scrypt.htm)function created by Colin Percival. The core of the library is a copy of the scrypt KDF routines written in C and distributed by Colin.
### Thanks ###
* To **Colin Percival** for the [scrypt paper](https://www.tarsnap.com/scrypt/scrypt.pdf) and C reference implementation.
* To Replicon for [Replicon.Cryptography.SCrypt](https://github.com/replicon/Replicon.Cryptography.SCrypt) that I heavily used both as an inspiration for the API and as a Copy-Paste source for code and documentation.
## Instruction:
Add appveyor badge to readme
## Code After:
[](https://ci.appveyor.com/project/vbfox/netscrypt/branch/master)
This library is a wrapper for the [scrypt key-derivation ](http://www.tarsnap.com/scrypt.htm)function created by Colin Percival. The core of the library is a copy of the scrypt KDF routines written in C and distributed by Colin.
### Thanks ###
* To **Colin Percival** for the [scrypt paper](https://www.tarsnap.com/scrypt/scrypt.pdf) and C reference implementation.
* To Replicon for [Replicon.Cryptography.SCrypt](https://github.com/replicon/Replicon.Cryptography.SCrypt) that I heavily used both as an inspiration for the API and as a Copy-Paste source for code and documentation. | +
+ [](https://ci.appveyor.com/project/vbfox/netscrypt/branch/master)
This library is a wrapper for the [scrypt key-derivation ](http://www.tarsnap.com/scrypt.htm)function created by Colin Percival. The core of the library is a copy of the scrypt KDF routines written in C and distributed by Colin.
### Thanks ###
* To **Colin Percival** for the [scrypt paper](https://www.tarsnap.com/scrypt/scrypt.pdf) and C reference implementation.
* To Replicon for [Replicon.Cryptography.SCrypt](https://github.com/replicon/Replicon.Cryptography.SCrypt) that I heavily used both as an inspiration for the API and as a Copy-Paste source for code and documentation. | 2 | 0.25 | 2 | 0 |
66c429918bcc5a67b0e341306e05ebf2a9bdd5ff | .github/workflows/dependencies.yml | .github/workflows/dependencies.yml | name: AllDependenciesDeclared
on:
push:
branches:
- master
pull_request:
env:
PHP_VERSION: 7.2
jobs:
composer-require-checker:
name: Check missing composer requirements
runs-on: ubuntu-18.04
steps:
- uses: webfactory/ssh-agent@v0.3.0
with:
ssh-private-key: ${{ secrets.ORG_SSH_PRIVATE_KEY }}
- uses: actions/checkout@v2
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node
run: |
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
echo 'variables_order = "EGPCS"' | sudo tee /etc/php/$PHP_VERSION/cli/conf.d/99-local.ini
- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: vendor/
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ env.PHP_VERSION }}-${{ github.ref }}
composer-${{ env.PHP_VERSION }}-
- run: |
composer install --no-interaction --no-scripts --no-progress --no-suggest
composer show
- name: ComposerRequireChecker
uses: docker://webfactory/composer-require-checker:2.1.0
| name: AllDependenciesDeclared
on:
push:
branches:
- master
pull_request:
env:
PHP_VERSION: 7.2
jobs:
composer-require-checker:
name: Check missing composer requirements
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node
run: |
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
echo 'variables_order = "EGPCS"' | sudo tee /etc/php/$PHP_VERSION/cli/conf.d/99-local.ini
- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: vendor/
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ env.PHP_VERSION }}-${{ github.ref }}
composer-${{ env.PHP_VERSION }}-
- run: |
composer install --no-interaction --no-scripts --no-progress --no-suggest
composer show
- name: ComposerRequireChecker
uses: docker://webfactory/composer-require-checker:2.1.0
| Remove unnecessary ssh agent step | Remove unnecessary ssh agent step
| YAML | mit | webfactory/slimdump | yaml | ## Code Before:
name: AllDependenciesDeclared
on:
push:
branches:
- master
pull_request:
env:
PHP_VERSION: 7.2
jobs:
composer-require-checker:
name: Check missing composer requirements
runs-on: ubuntu-18.04
steps:
- uses: webfactory/ssh-agent@v0.3.0
with:
ssh-private-key: ${{ secrets.ORG_SSH_PRIVATE_KEY }}
- uses: actions/checkout@v2
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node
run: |
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
echo 'variables_order = "EGPCS"' | sudo tee /etc/php/$PHP_VERSION/cli/conf.d/99-local.ini
- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: vendor/
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ env.PHP_VERSION }}-${{ github.ref }}
composer-${{ env.PHP_VERSION }}-
- run: |
composer install --no-interaction --no-scripts --no-progress --no-suggest
composer show
- name: ComposerRequireChecker
uses: docker://webfactory/composer-require-checker:2.1.0
## Instruction:
Remove unnecessary ssh agent step
## Code After:
name: AllDependenciesDeclared
on:
push:
branches:
- master
pull_request:
env:
PHP_VERSION: 7.2
jobs:
composer-require-checker:
name: Check missing composer requirements
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node
run: |
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
echo 'variables_order = "EGPCS"' | sudo tee /etc/php/$PHP_VERSION/cli/conf.d/99-local.ini
- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: vendor/
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ env.PHP_VERSION }}-${{ github.ref }}
composer-${{ env.PHP_VERSION }}-
- run: |
composer install --no-interaction --no-scripts --no-progress --no-suggest
composer show
- name: ComposerRequireChecker
uses: docker://webfactory/composer-require-checker:2.1.0
| name: AllDependenciesDeclared
on:
push:
branches:
- master
pull_request:
env:
PHP_VERSION: 7.2
jobs:
composer-require-checker:
name: Check missing composer requirements
runs-on: ubuntu-18.04
steps:
- - uses: webfactory/ssh-agent@v0.3.0
- with:
- ssh-private-key: ${{ secrets.ORG_SSH_PRIVATE_KEY }}
- uses: actions/checkout@v2
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node
run: |
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
echo 'variables_order = "EGPCS"' | sudo tee /etc/php/$PHP_VERSION/cli/conf.d/99-local.ini
- name: Cache Composer Dependencies
uses: actions/cache@v1
with:
path: vendor/
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ env.PHP_VERSION }}-${{ github.ref }}
composer-${{ env.PHP_VERSION }}-
- run: |
composer install --no-interaction --no-scripts --no-progress --no-suggest
composer show
- name: ComposerRequireChecker
uses: docker://webfactory/composer-require-checker:2.1.0 | 3 | 0.081081 | 0 | 3 |
bdf1073f174d5101fb94a7bd3257da7fec90c9cc | collects/tests/typed-scheme/optimizer/tests/float-real.rkt | collects/tests/typed-scheme/optimizer/tests/float-real.rkt | (
float-real.rkt 13:1 + -- binary float
float-real.rkt 14:1 + -- binary float
5.3
8.7
14.26
)
#lang typed/racket
;; reals within float expressions should be coerced when it's safe to do so
(+ 2.3 (ann 3 Real)) ; safe
(+ 2.3 (* (ann 2 Integer) 3.2)) ; inner = unsafe, outer = safe
(* 2.3 (* (ann 2 Integer) 3.1)) ; all unsafe
| (
float-real.rkt line 13 col 1 - + - binary float
float-real.rkt line 14 col 1 - + - binary float
5.3
8.7
14.26
)
#lang typed/racket
;; reals within float expressions should be coerced when it's safe to do so
(+ 2.3 (ann 3 Real)) ; safe
(+ 2.3 (* (ann 2 Integer) 3.2)) ; inner = unsafe, outer = safe
(* 2.3 (* (ann 2 Integer) 3.1)) ; all unsafe
| Fix optimizer expected log format. | Fix optimizer expected log format.
Optimizer log format was changed on a different branch, and this test
was written using that new format, which is not recognized on current
master.
| Racket | bsd-2-clause | mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket | racket | ## Code Before:
(
float-real.rkt 13:1 + -- binary float
float-real.rkt 14:1 + -- binary float
5.3
8.7
14.26
)
#lang typed/racket
;; reals within float expressions should be coerced when it's safe to do so
(+ 2.3 (ann 3 Real)) ; safe
(+ 2.3 (* (ann 2 Integer) 3.2)) ; inner = unsafe, outer = safe
(* 2.3 (* (ann 2 Integer) 3.1)) ; all unsafe
## Instruction:
Fix optimizer expected log format.
Optimizer log format was changed on a different branch, and this test
was written using that new format, which is not recognized on current
master.
## Code After:
(
float-real.rkt line 13 col 1 - + - binary float
float-real.rkt line 14 col 1 - + - binary float
5.3
8.7
14.26
)
#lang typed/racket
;; reals within float expressions should be coerced when it's safe to do so
(+ 2.3 (ann 3 Real)) ; safe
(+ 2.3 (* (ann 2 Integer) 3.2)) ; inner = unsafe, outer = safe
(* 2.3 (* (ann 2 Integer) 3.1)) ; all unsafe
| (
- float-real.rkt 13:1 + -- binary float
? ^ -
+ float-real.rkt line 13 col 1 - + - binary float
? +++++ ^^^^^ ++
- float-real.rkt 14:1 + -- binary float
? ^ -
+ float-real.rkt line 14 col 1 - + - binary float
? +++++ ^^^^^ ++
5.3
8.7
14.26
)
#lang typed/racket
;; reals within float expressions should be coerced when it's safe to do so
(+ 2.3 (ann 3 Real)) ; safe
(+ 2.3 (* (ann 2 Integer) 3.2)) ; inner = unsafe, outer = safe
(* 2.3 (* (ann 2 Integer) 3.1)) ; all unsafe | 4 | 0.285714 | 2 | 2 |
62a3ab58508ce231264b29982504a45364c578ca | templates/index.html | templates/index.html | {% extends "base.html" %}
{%- block content %}
<header class="pagehead">
<h1>{{ page.title }}</h1>
{%- if page.subtitle %}
<h2>{{ page.subtitle }}</h2>
{%- endif %}
</header>
{{ page.content }}
{% for subpage in page.subpages %}
<div class="post">
<header>
<h2><a href="{{ subpage.url }}">{{ subpage.title }}</a></h2>
<div class="subheader">
Posted on
<span class="date">{{ subpage.date }}</span>
in
<ul class="tags">
{%- for tag in subpage.tags %}
{% if loop.last %} and {% endif %}
<li class="tag">{{tag}}</li>{% if not loop.last %},{% endif %}
{%- endfor %}</ul>.
</div>
</header>
{{ subpage.content }}
</div>
{% endfor %}
{%- endblock %}
| {% extends "base.html" %}
{%- block content %}
<header class="pagehead">
<h1>{{ page.title }}</h1>
{%- if page.subtitle %}
<h2>{{ page.subtitle }}</h2>
{%- endif %}
</header>
{{ page.content }}
{% for subpage in page.subpages|sort(reverse=True, attribute='date') %}
<div class="post">
<header>
<h2><a href="{{ subpage.url }}">{{ subpage.title }}</a></h2>
<div class="subheader">
Posted on
<span class="date">{{ subpage.date }}</span>
in
<ul class="tags">
{%- for tag in subpage.tags %}
{% if loop.last %} and {% endif %}
<li class="tag">{{tag}}</li>{% if not loop.last %},{% endif %}
{%- endfor %}</ul>.
</div>
</header>
{{ subpage.content }}
</div>
{% endfor %}
{%- endblock %}
| Sort blog posts by date, reversed. | Sort blog posts by date, reversed.
| HTML | mit | mythmon/mythmon.com,mythmon/mythmon.com | html | ## Code Before:
{% extends "base.html" %}
{%- block content %}
<header class="pagehead">
<h1>{{ page.title }}</h1>
{%- if page.subtitle %}
<h2>{{ page.subtitle }}</h2>
{%- endif %}
</header>
{{ page.content }}
{% for subpage in page.subpages %}
<div class="post">
<header>
<h2><a href="{{ subpage.url }}">{{ subpage.title }}</a></h2>
<div class="subheader">
Posted on
<span class="date">{{ subpage.date }}</span>
in
<ul class="tags">
{%- for tag in subpage.tags %}
{% if loop.last %} and {% endif %}
<li class="tag">{{tag}}</li>{% if not loop.last %},{% endif %}
{%- endfor %}</ul>.
</div>
</header>
{{ subpage.content }}
</div>
{% endfor %}
{%- endblock %}
## Instruction:
Sort blog posts by date, reversed.
## Code After:
{% extends "base.html" %}
{%- block content %}
<header class="pagehead">
<h1>{{ page.title }}</h1>
{%- if page.subtitle %}
<h2>{{ page.subtitle }}</h2>
{%- endif %}
</header>
{{ page.content }}
{% for subpage in page.subpages|sort(reverse=True, attribute='date') %}
<div class="post">
<header>
<h2><a href="{{ subpage.url }}">{{ subpage.title }}</a></h2>
<div class="subheader">
Posted on
<span class="date">{{ subpage.date }}</span>
in
<ul class="tags">
{%- for tag in subpage.tags %}
{% if loop.last %} and {% endif %}
<li class="tag">{{tag}}</li>{% if not loop.last %},{% endif %}
{%- endfor %}</ul>.
</div>
</header>
{{ subpage.content }}
</div>
{% endfor %}
{%- endblock %}
| {% extends "base.html" %}
{%- block content %}
<header class="pagehead">
<h1>{{ page.title }}</h1>
{%- if page.subtitle %}
<h2>{{ page.subtitle }}</h2>
{%- endif %}
</header>
{{ page.content }}
- {% for subpage in page.subpages %}
+ {% for subpage in page.subpages|sort(reverse=True, attribute='date') %}
<div class="post">
<header>
<h2><a href="{{ subpage.url }}">{{ subpage.title }}</a></h2>
<div class="subheader">
Posted on
<span class="date">{{ subpage.date }}</span>
in
<ul class="tags">
{%- for tag in subpage.tags %}
{% if loop.last %} and {% endif %}
<li class="tag">{{tag}}</li>{% if not loop.last %},{% endif %}
{%- endfor %}</ul>.
</div>
</header>
{{ subpage.content }}
</div>
{% endfor %}
{%- endblock %} | 2 | 0.060606 | 1 | 1 |
24bb2399e551d33819ca0c9a7fa729f7df5a93c1 | app/helpers/sources_helper.rb | app/helpers/sources_helper.rb | module SourcesHelper
# Return HTML with a link to the the external source URL.
def source_url_link(source)
return link_to h(source.url), {}, { :rel => "nofollow", :target => "_BLANK" }
end
end
| module SourcesHelper
# Return HTML with a link to the the external source URL.
def source_url_link(source)
return link_to h(source.url), source.url, { :rel => "nofollow", :target => "_BLANK" }
end
end
| Fix source_url_link to really link to the external link. | Fix source_url_link to really link to the external link.
| Ruby | mit | bencornelis/calagator,Villag/dentonator,VolunteerOdyssey/calagator,oktober/calagator,L2-D2/calagator,Eugator-Wranglers/calagator,bencornelis/calagator,shawnacscott/calagator,shawnacscott/calagator,Eugator-Wranglers/calagator,matthewkmayer/calagator,CorainChicago/ActivateHub,reidab/calagator,shawnacscott/calagator,reidab/calagator,iamBalaji/Calagator,matthewkmayer/calagator,alexbeeken/calagator.org,Villag/dentonator,VolunteerOdyssey/calagator,CorainChicago/ActivateHub,reidab/calagator,kerrizor/calagator,bencornelis/calagator,L2-D2/calagator,oktober/calagator,jmcduffie32/calagator,nblackburn87/calagator,cp/calagator-1,cp/calagator-1,iamBalaji/Calagator,dudleysr/calagator-workspace,nblackburn87/calagator,iamBalaji/Calagator,oktober/calagator,bencornelis/calagator,eeeeeean/windchimes,cp/calagator-1,matthewkmayer/calagator,eeeeeean/windchimes,iamBalaji/Calagator,L2-D2/calagator,CorainChicago/ActivateHub,kerrizor/calagator,shawnacscott/calagator,dudleysr/calagator-workspace,kerrizor/calagator,nblackburn87/calagator,jmcduffie32/calagator,L2-D2/calagator,alexbeeken/calagator.org,Villag/dentonator,jmcduffie32/calagator,cp/calagator-1,jmcduffie32/calagator,kerrizor/calagator,VolunteerOdyssey/calagator,matthewkmayer/calagator,oktober/calagator,reidab/calagator,CorainChicago/ActivateHub | ruby | ## Code Before:
module SourcesHelper
# Return HTML with a link to the the external source URL.
def source_url_link(source)
return link_to h(source.url), {}, { :rel => "nofollow", :target => "_BLANK" }
end
end
## Instruction:
Fix source_url_link to really link to the external link.
## Code After:
module SourcesHelper
# Return HTML with a link to the the external source URL.
def source_url_link(source)
return link_to h(source.url), source.url, { :rel => "nofollow", :target => "_BLANK" }
end
end
| module SourcesHelper
# Return HTML with a link to the the external source URL.
def source_url_link(source)
- return link_to h(source.url), {}, { :rel => "nofollow", :target => "_BLANK" }
? ^^
+ return link_to h(source.url), source.url, { :rel => "nofollow", :target => "_BLANK" }
? ^^^^^^^^^^
end
end | 2 | 0.333333 | 1 | 1 |
b962f1791130a1164522700724530b6a4975caf9 | scripts/centos/post-process.sh | scripts/centos/post-process.sh |
set_hostname() {
default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route | uniq)
printf "Default interface: ${default_iface}\n"
default_iface=`echo ${default_iface} | awk '{ print $1 }'`
mac_addr=`ip addr show dev ${default_iface} | awk '$1 ~ /^link\// { print $2 }'`
printf "Interface: ${default_iface} MAC address: ${mac_addr}\n"
hostname_str=${mac_addr//:/-}
echo ${hostname_str} >/etc/hostname
}
update_kernel() {
# For install multi-kernel, set the first line kernel in grub list as default to boot
grub2-set-default 0
# load overlay for docker storage driver
echo "overlay" > /etc/modules-load.d/overlay.conf
# set overaly as docker storage driver instead of devicemapper (the default one on centos)
sed -i -e '/^ExecStart=/ s/$/ --storage-driver=overlay/' /etc/systemd/system/multi-user.target.wants/docker.service
}
set_hostname
update_kernel
|
set_hostname() {
default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route | uniq)
printf "Default interface: ${default_iface}\n"
default_iface=`echo ${default_iface} | awk '{ print $1 }'`
mac_addr=`ip addr show dev ${default_iface} | awk '$1 ~ /^link\// { print $2 }'`
printf "Interface: ${default_iface} MAC address: ${mac_addr}\n"
hostname_str=${mac_addr//:/-}
echo ${hostname_str} >/etc/hostname
}
update_kernel() {
# For install multi-kernel, set the first line kernel in grub list as default to boot
grub2-set-default 0
# load overlay for docker storage driver
echo "overlay" > /etc/modules-load.d/overlay.conf
# set overaly as docker storage driver instead of devicemapper (the default one on centos)
sed -i -e '/^ExecStart=/ s/$/ --storage-driver=overlay/' /etc/systemd/system/multi-user.target.wants/docker.service
}
set_ssh_config() {
mkdir -p /root/.ssh
chomd 700 /root/.ssh
cat > /root/.ssh/config <<EOF
Host *
GSSAPIAuthentication no
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
EOF
chomd 600 /root/.ssh/config
}
set_hostname
update_kernel
set_ssh_config
| Remove ssh confirm on CentOS | Remove ssh confirm on CentOS
| Shell | apache-2.0 | k8sp/sextant,gaoyw1/sextant,k8sp/sextant,k8sp/sextant,k8sp/sextant,gaoyw1/sextant,gaoyw1/sextant | shell | ## Code Before:
set_hostname() {
default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route | uniq)
printf "Default interface: ${default_iface}\n"
default_iface=`echo ${default_iface} | awk '{ print $1 }'`
mac_addr=`ip addr show dev ${default_iface} | awk '$1 ~ /^link\// { print $2 }'`
printf "Interface: ${default_iface} MAC address: ${mac_addr}\n"
hostname_str=${mac_addr//:/-}
echo ${hostname_str} >/etc/hostname
}
update_kernel() {
# For install multi-kernel, set the first line kernel in grub list as default to boot
grub2-set-default 0
# load overlay for docker storage driver
echo "overlay" > /etc/modules-load.d/overlay.conf
# set overaly as docker storage driver instead of devicemapper (the default one on centos)
sed -i -e '/^ExecStart=/ s/$/ --storage-driver=overlay/' /etc/systemd/system/multi-user.target.wants/docker.service
}
set_hostname
update_kernel
## Instruction:
Remove ssh confirm on CentOS
## Code After:
set_hostname() {
default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route | uniq)
printf "Default interface: ${default_iface}\n"
default_iface=`echo ${default_iface} | awk '{ print $1 }'`
mac_addr=`ip addr show dev ${default_iface} | awk '$1 ~ /^link\// { print $2 }'`
printf "Interface: ${default_iface} MAC address: ${mac_addr}\n"
hostname_str=${mac_addr//:/-}
echo ${hostname_str} >/etc/hostname
}
update_kernel() {
# For install multi-kernel, set the first line kernel in grub list as default to boot
grub2-set-default 0
# load overlay for docker storage driver
echo "overlay" > /etc/modules-load.d/overlay.conf
# set overaly as docker storage driver instead of devicemapper (the default one on centos)
sed -i -e '/^ExecStart=/ s/$/ --storage-driver=overlay/' /etc/systemd/system/multi-user.target.wants/docker.service
}
set_ssh_config() {
mkdir -p /root/.ssh
chomd 700 /root/.ssh
cat > /root/.ssh/config <<EOF
Host *
GSSAPIAuthentication no
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
EOF
chomd 600 /root/.ssh/config
}
set_hostname
update_kernel
set_ssh_config
|
set_hostname() {
default_iface=$(awk '$2 == 00000000 { print $1 }' /proc/net/route | uniq)
printf "Default interface: ${default_iface}\n"
default_iface=`echo ${default_iface} | awk '{ print $1 }'`
mac_addr=`ip addr show dev ${default_iface} | awk '$1 ~ /^link\// { print $2 }'`
printf "Interface: ${default_iface} MAC address: ${mac_addr}\n"
hostname_str=${mac_addr//:/-}
echo ${hostname_str} >/etc/hostname
}
update_kernel() {
# For install multi-kernel, set the first line kernel in grub list as default to boot
grub2-set-default 0
# load overlay for docker storage driver
echo "overlay" > /etc/modules-load.d/overlay.conf
# set overaly as docker storage driver instead of devicemapper (the default one on centos)
sed -i -e '/^ExecStart=/ s/$/ --storage-driver=overlay/' /etc/systemd/system/multi-user.target.wants/docker.service
}
+ set_ssh_config() {
+ mkdir -p /root/.ssh
+ chomd 700 /root/.ssh
+ cat > /root/.ssh/config <<EOF
+ Host *
+ GSSAPIAuthentication no
+ StrictHostKeyChecking no
+ UserKnownHostsFile=/dev/null
+
+ EOF
+
+ chomd 600 /root/.ssh/config
+
+ }
set_hostname
update_kernel
+ set_ssh_config
| 15 | 0.555556 | 15 | 0 |
109e45ffe156d941ec1b6542a98fbb29b9cd78f0 | t/cl-emoji.lisp | t/cl-emoji.lisp | (in-package :cl-user)
(defpackage cl-emoji-test
(:use :cl
:cl-emoji
:prove))
(in-package :cl-emoji-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp.
(with-open-file (s (asdf:system-relative-pathname
:cl-emoji (pathname (format nil "data/emoji_~a.lisp"
cl-emoji::*current-version*))))
(let ((emoji-list (read s)))
(plan (+ 6 (length emoji-list)))
(dolist (u emoji-list)
(is (length u) 12))
(is "😀" (emoji:codepoint '("U+1F600")))
(is "😁" (emoji:name "grinning face with smiling eyes"))
(ok (< 0 (length (emoji:annotation "blue"))))
(ok (< 0 (length (emoji:group "Smileys & People"))))
(ok (< 0 (length (emoji:subgroup "clothing"))))
(with-emoji-list (emoji-list)
(is (emoji:with-emoji-list (el)
(reduce (lambda (s e) (concatenate 'string s (getf e :characters)))
(subseq el 0 5) :initial-value ""))
"😀😁😂🤣😃"))))
(finalize)
| (in-package :cl-user)
(defpackage cl-emoji-test
(:use :cl
:cl-emoji
:prove))
(in-package :cl-emoji-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp.
(with-open-file (s (asdf:system-relative-pathname
:cl-emoji (pathname (format nil "data/emoji_~a.lisp"
cl-emoji::*current-version*))))
(let ((emoji-list (read s)))
(plan (+ 6 (length emoji-list)))
(dolist (u emoji-list)
(is (length u) 12))
(is "😀" (emoji:codepoint '("U+1F600")))
(is "😁" (emoji:name "grinning face with smiling eyes"))
(ok (< 0 (length (emoji:annotation "blue"))))
(ok (< 0 (length (emoji:group "Smileys & People"))))
(ok (< 0 (length (emoji:subgroup "clothing"))))
(is (emoji:with-emoji-list (el)
(reduce (lambda (s e) (concatenate 'string s (getf e :characters)))
(subseq el 0 5) :initial-value ""))
"😀😁😂🤣😃")))
(finalize)
| Reduce over-nesting not be needed | Reduce over-nesting not be needed
| Common Lisp | mit | ta2gch/cl-emoji | common-lisp | ## Code Before:
(in-package :cl-user)
(defpackage cl-emoji-test
(:use :cl
:cl-emoji
:prove))
(in-package :cl-emoji-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp.
(with-open-file (s (asdf:system-relative-pathname
:cl-emoji (pathname (format nil "data/emoji_~a.lisp"
cl-emoji::*current-version*))))
(let ((emoji-list (read s)))
(plan (+ 6 (length emoji-list)))
(dolist (u emoji-list)
(is (length u) 12))
(is "😀" (emoji:codepoint '("U+1F600")))
(is "😁" (emoji:name "grinning face with smiling eyes"))
(ok (< 0 (length (emoji:annotation "blue"))))
(ok (< 0 (length (emoji:group "Smileys & People"))))
(ok (< 0 (length (emoji:subgroup "clothing"))))
(with-emoji-list (emoji-list)
(is (emoji:with-emoji-list (el)
(reduce (lambda (s e) (concatenate 'string s (getf e :characters)))
(subseq el 0 5) :initial-value ""))
"😀😁😂🤣😃"))))
(finalize)
## Instruction:
Reduce over-nesting not be needed
## Code After:
(in-package :cl-user)
(defpackage cl-emoji-test
(:use :cl
:cl-emoji
:prove))
(in-package :cl-emoji-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp.
(with-open-file (s (asdf:system-relative-pathname
:cl-emoji (pathname (format nil "data/emoji_~a.lisp"
cl-emoji::*current-version*))))
(let ((emoji-list (read s)))
(plan (+ 6 (length emoji-list)))
(dolist (u emoji-list)
(is (length u) 12))
(is "😀" (emoji:codepoint '("U+1F600")))
(is "😁" (emoji:name "grinning face with smiling eyes"))
(ok (< 0 (length (emoji:annotation "blue"))))
(ok (< 0 (length (emoji:group "Smileys & People"))))
(ok (< 0 (length (emoji:subgroup "clothing"))))
(is (emoji:with-emoji-list (el)
(reduce (lambda (s e) (concatenate 'string s (getf e :characters)))
(subseq el 0 5) :initial-value ""))
"😀😁😂🤣😃")))
(finalize)
| (in-package :cl-user)
(defpackage cl-emoji-test
(:use :cl
:cl-emoji
:prove))
(in-package :cl-emoji-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp.
(with-open-file (s (asdf:system-relative-pathname
:cl-emoji (pathname (format nil "data/emoji_~a.lisp"
cl-emoji::*current-version*))))
(let ((emoji-list (read s)))
(plan (+ 6 (length emoji-list)))
(dolist (u emoji-list)
(is (length u) 12))
(is "😀" (emoji:codepoint '("U+1F600")))
(is "😁" (emoji:name "grinning face with smiling eyes"))
(ok (< 0 (length (emoji:annotation "blue"))))
(ok (< 0 (length (emoji:group "Smileys & People"))))
(ok (< 0 (length (emoji:subgroup "clothing"))))
- (with-emoji-list (emoji-list)
- (is (emoji:with-emoji-list (el)
? --
+ (is (emoji:with-emoji-list (el)
- (reduce (lambda (s e) (concatenate 'string s (getf e :characters)))
? --
+ (reduce (lambda (s e) (concatenate 'string s (getf e :characters)))
- (subseq el 0 5) :initial-value ""))
? --
+ (subseq el 0 5) :initial-value ""))
- "😀😁😂🤣😃"))))
? -- -
+ "😀😁😂🤣😃")))
(finalize) | 9 | 0.321429 | 4 | 5 |
ed40f7720ea0c48893e965d82191d7cf63f87786 | test/helloEndpoints.spec.ts | test/helloEndpoints.spec.ts | import chaiHttp = require("chai-http");
import * as chai from "chai";
import {server} from "../src/app";
const expect = chai.expect;
chai.use(chaiHttp);
describe("/hello/:name endpoint", () => {
it("should return a welcome message for a name with only alphabetic characters", () => {
chai.request(server)
.get("/hello/ed")
.then((res) => {
expect(res).to.have.status(200);
})
.catch((err) => {
throw err;
});
});
it("should error for a name with numeric characters");
it("should error for a name with special characters");
});
| import chaiHttp = require("chai-http");
import * as chai from "chai";
import {server} from "../src/app";
const expect = chai.expect;
chai.use(chaiHttp);
describe("/hello/:name endpoint", () => {
it("should return a welcome message for a name with only alphabetic characters", (done) => {
chai.request(server)
.get("/hello/ed")
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it("should 400 for a name with numeric characters", (done) => {
chai.request(server)
.get("/hello/ed1")
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it("should 400 for a name with special characters", (done) => {
chai.request(server)
.get("/hello/ed£")
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
});
| Complete full set of hello service tests | Complete full set of hello service tests
| TypeScript | mit | hlouw/node-hack | typescript | ## Code Before:
import chaiHttp = require("chai-http");
import * as chai from "chai";
import {server} from "../src/app";
const expect = chai.expect;
chai.use(chaiHttp);
describe("/hello/:name endpoint", () => {
it("should return a welcome message for a name with only alphabetic characters", () => {
chai.request(server)
.get("/hello/ed")
.then((res) => {
expect(res).to.have.status(200);
})
.catch((err) => {
throw err;
});
});
it("should error for a name with numeric characters");
it("should error for a name with special characters");
});
## Instruction:
Complete full set of hello service tests
## Code After:
import chaiHttp = require("chai-http");
import * as chai from "chai";
import {server} from "../src/app";
const expect = chai.expect;
chai.use(chaiHttp);
describe("/hello/:name endpoint", () => {
it("should return a welcome message for a name with only alphabetic characters", (done) => {
chai.request(server)
.get("/hello/ed")
.end((err, res) => {
expect(res).to.have.status(200);
done();
});
});
it("should 400 for a name with numeric characters", (done) => {
chai.request(server)
.get("/hello/ed1")
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
it("should 400 for a name with special characters", (done) => {
chai.request(server)
.get("/hello/ed£")
.end((err, res) => {
expect(res).to.have.status(400);
done();
});
});
});
| import chaiHttp = require("chai-http");
import * as chai from "chai";
import {server} from "../src/app";
const expect = chai.expect;
chai.use(chaiHttp);
describe("/hello/:name endpoint", () => {
- it("should return a welcome message for a name with only alphabetic characters", () => {
+ it("should return a welcome message for a name with only alphabetic characters", (done) => {
? ++++
chai.request(server)
.get("/hello/ed")
- .then((res) => {
? --
+ .end((err, res) => {
? + +++++
expect(res).to.have.status(200);
+ done();
- })
- .catch((err) => {
- throw err;
});
});
- it("should error for a name with numeric characters");
? ^^^^^ ^
+ it("should 400 for a name with numeric characters", (done) => {
? ^^^ +++++++ ^^^^^
+ chai.request(server)
+ .get("/hello/ed1")
+ .end((err, res) => {
+ expect(res).to.have.status(400);
+ done();
+ });
+ });
+
- it("should error for a name with special characters");
? ^^^^^ ^
+ it("should 400 for a name with special characters", (done) => {
? ^^^ +++++++ ^^^^^
+ chai.request(server)
+ .get("/hello/ed£")
+ .end((err, res) => {
+ expect(res).to.have.status(400);
+ done();
+ });
+ });
}); | 27 | 1.173913 | 20 | 7 |
ff07416d5e79d9c3be9870829cd15e9b7c11cc9a | app/client/admin/js/alert/AlertApp.js | app/client/admin/js/alert/AlertApp.js | 'use strict';
(function(angular) {
var app = angular.module('ov.alert', []);
/**
* Defines a generic alert management system to display one or several messages.
*/
function AlertService($rootScope, $timeout) {
$rootScope.alerts = [];
var alertService = {
add: function(type, msg, timeout) {
var alert = {
type: type,
msg: msg,
close: function() {
if (alert.timeout)
$timeout.cancel(this.timeout);
return alertService.closeAlert(this);
}
};
if (timeout)
alert.timeout = $timeout(function() {
alertService.closeAlert(alert);
}, timeout);
$rootScope.alerts.push(alert);
},
closeAlert: function(alert) {
return this.closeAlertIdx($rootScope.alerts.indexOf(alert));
},
closeAlertIdx: function(index) {
return $rootScope.alerts.splice(index, 1);
}
};
return alertService;
}
app.factory('alertService', AlertService);
AlertService.$inject = ['$rootScope', '$timeout'];
})(angular);
| 'use strict';
(function(angular) {
var app = angular.module('ov.alert', []);
/**
* Defines a generic alert management system to display one or several messages.
*/
function AlertService($rootScope, $timeout) {
$rootScope.alerts = [];
/**
* Close an alert by its position in alerts array
* @param {Integer} index Position in array
* @returns {Array}
*/
function closeAlertIdx(index) {
return $rootScope.alerts.splice(index, 1);
}
/**
* Close an alert
* @param {Object} alert Alert to close
* @returns {Array}
*/
function closeAlert(alert) {
return closeAlertIdx($rootScope.alerts.indexOf(alert));
}
var alertService = {
add: function(type, msg, timeout) {
var alert = {
type: type,
msg: msg,
close: function() {
if (alert.timeout)
$timeout.cancel(this.timeout);
return closeAlert(this);
}
};
if (timeout)
alert.timeout = $timeout(function() {
closeAlert(alert);
}, timeout);
$rootScope.alerts.push(alert);
}
};
return alertService;
}
app.factory('alertService', AlertService);
AlertService.$inject = ['$rootScope', '$timeout'];
})(angular);
| Rewrite Alert to not expose close function | Rewrite Alert to not expose close function
| JavaScript | agpl-3.0 | veo-labs/openveo-core,veo-labs/openveo-core,veo-labs/openveo-core | javascript | ## Code Before:
'use strict';
(function(angular) {
var app = angular.module('ov.alert', []);
/**
* Defines a generic alert management system to display one or several messages.
*/
function AlertService($rootScope, $timeout) {
$rootScope.alerts = [];
var alertService = {
add: function(type, msg, timeout) {
var alert = {
type: type,
msg: msg,
close: function() {
if (alert.timeout)
$timeout.cancel(this.timeout);
return alertService.closeAlert(this);
}
};
if (timeout)
alert.timeout = $timeout(function() {
alertService.closeAlert(alert);
}, timeout);
$rootScope.alerts.push(alert);
},
closeAlert: function(alert) {
return this.closeAlertIdx($rootScope.alerts.indexOf(alert));
},
closeAlertIdx: function(index) {
return $rootScope.alerts.splice(index, 1);
}
};
return alertService;
}
app.factory('alertService', AlertService);
AlertService.$inject = ['$rootScope', '$timeout'];
})(angular);
## Instruction:
Rewrite Alert to not expose close function
## Code After:
'use strict';
(function(angular) {
var app = angular.module('ov.alert', []);
/**
* Defines a generic alert management system to display one or several messages.
*/
function AlertService($rootScope, $timeout) {
$rootScope.alerts = [];
/**
* Close an alert by its position in alerts array
* @param {Integer} index Position in array
* @returns {Array}
*/
function closeAlertIdx(index) {
return $rootScope.alerts.splice(index, 1);
}
/**
* Close an alert
* @param {Object} alert Alert to close
* @returns {Array}
*/
function closeAlert(alert) {
return closeAlertIdx($rootScope.alerts.indexOf(alert));
}
var alertService = {
add: function(type, msg, timeout) {
var alert = {
type: type,
msg: msg,
close: function() {
if (alert.timeout)
$timeout.cancel(this.timeout);
return closeAlert(this);
}
};
if (timeout)
alert.timeout = $timeout(function() {
closeAlert(alert);
}, timeout);
$rootScope.alerts.push(alert);
}
};
return alertService;
}
app.factory('alertService', AlertService);
AlertService.$inject = ['$rootScope', '$timeout'];
})(angular);
| 'use strict';
(function(angular) {
var app = angular.module('ov.alert', []);
/**
* Defines a generic alert management system to display one or several messages.
*/
function AlertService($rootScope, $timeout) {
$rootScope.alerts = [];
+ /**
+ * Close an alert by its position in alerts array
+ * @param {Integer} index Position in array
+ * @returns {Array}
+ */
+ function closeAlertIdx(index) {
+ return $rootScope.alerts.splice(index, 1);
+ }
+
+ /**
+ * Close an alert
+ * @param {Object} alert Alert to close
+ * @returns {Array}
+ */
+ function closeAlert(alert) {
+ return closeAlertIdx($rootScope.alerts.indexOf(alert));
+ }
+
var alertService = {
add: function(type, msg, timeout) {
var alert = {
type: type,
msg: msg,
close: function() {
if (alert.timeout)
$timeout.cancel(this.timeout);
- return alertService.closeAlert(this);
? -------------
+ return closeAlert(this);
}
};
if (timeout)
alert.timeout = $timeout(function() {
- alertService.closeAlert(alert);
? -------------
+ closeAlert(alert);
}, timeout);
$rootScope.alerts.push(alert);
- },
- closeAlert: function(alert) {
- return this.closeAlertIdx($rootScope.alerts.indexOf(alert));
- },
- closeAlertIdx: function(index) {
- return $rootScope.alerts.splice(index, 1);
}
};
return alertService;
}
app.factory('alertService', AlertService);
AlertService.$inject = ['$rootScope', '$timeout'];
})(angular); | 28 | 0.651163 | 20 | 8 |
6de4b413cf0adf83fed6c925c13d7f95e427d84f | run/docker-compose.yml | run/docker-compose.yml | carbonrelay:
image: os/carbon
command: relay
restart: always
ports:
- "2003:2003"
- "2004:2004"
volumes:
- ./carbon/relay:/etc/carbon
volumes_from:
- monitoring_whisper_1
links:
- carboncache1
- carboncache2
carboncache1:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
carboncache2:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
graphite:
image: os/graphite_web
command: graphiteweb
restart: always
ports:
- "80:80"
volumes_from:
- monitoring_whisper_1
volumes:
- ./graphite_web:/etc/graphite
links:
- carboncache1
- carboncache2
| carbonrelay:
image: os/carbon
command: relay
restart: always
ports:
- "2003:2003"
- "2004:2004"
volumes:
- ./carbon/relay:/etc/carbon
volumes_from:
- monitoring_whisper_1
links:
- carboncache1
- carboncache2
carboncache1:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
carboncache2:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
graphite:
image: os/graphite_web
command: graphiteweb
restart: always
ports:
- "80:80"
volumes_from:
- monitoring_whisper_1
volumes:
- ./graphite_web:/etc/graphite
links:
- carboncache1
- carboncache2
grafana:
image: os/grafana
restart: always
ports:
- "81:3000"
links:
- graphite
| Put grafana into docker compose | Put grafana into docker compose
| YAML | mit | Opensoftware/monitoring,Opensoftware/monitoring,Opensoftware/monitoring | yaml | ## Code Before:
carbonrelay:
image: os/carbon
command: relay
restart: always
ports:
- "2003:2003"
- "2004:2004"
volumes:
- ./carbon/relay:/etc/carbon
volumes_from:
- monitoring_whisper_1
links:
- carboncache1
- carboncache2
carboncache1:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
carboncache2:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
graphite:
image: os/graphite_web
command: graphiteweb
restart: always
ports:
- "80:80"
volumes_from:
- monitoring_whisper_1
volumes:
- ./graphite_web:/etc/graphite
links:
- carboncache1
- carboncache2
## Instruction:
Put grafana into docker compose
## Code After:
carbonrelay:
image: os/carbon
command: relay
restart: always
ports:
- "2003:2003"
- "2004:2004"
volumes:
- ./carbon/relay:/etc/carbon
volumes_from:
- monitoring_whisper_1
links:
- carboncache1
- carboncache2
carboncache1:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
carboncache2:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
graphite:
image: os/graphite_web
command: graphiteweb
restart: always
ports:
- "80:80"
volumes_from:
- monitoring_whisper_1
volumes:
- ./graphite_web:/etc/graphite
links:
- carboncache1
- carboncache2
grafana:
image: os/grafana
restart: always
ports:
- "81:3000"
links:
- graphite
| carbonrelay:
image: os/carbon
command: relay
restart: always
ports:
- "2003:2003"
- "2004:2004"
volumes:
- ./carbon/relay:/etc/carbon
volumes_from:
- monitoring_whisper_1
links:
- carboncache1
- carboncache2
carboncache1:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
carboncache2:
image: os/carbon
command: cache
restart: always
volumes_from:
- monitoring_whisper_1
volumes:
- ./carbon/cache:/etc/carbon
graphite:
image: os/graphite_web
command: graphiteweb
restart: always
ports:
- "80:80"
volumes_from:
- monitoring_whisper_1
volumes:
- ./graphite_web:/etc/graphite
links:
- carboncache1
- carboncache2
+
+ grafana:
+ image: os/grafana
+ restart: always
+ ports:
+ - "81:3000"
+ links:
+ - graphite
+ | 9 | 0.195652 | 9 | 0 |
593033dad7637ed9db0ed703a14615ddb3b5ff1c | lib/pausescreen.rb | lib/pausescreen.rb | class PauseScreen
def initialize(window, window_width, window_height)
@window = window
@window_width, @window_height = window_width, window_height
@pause_button = Gosu::Image.new(window, 'media/pause_button.png', false)
@press_q = Gosu::Image.new(window, 'media/press_q.png', false)
end
def draw
draw_rect(@window_width, @window_height, Color::TRANS_BLACK,
ZOrder::PAUSE_BACKGROUND)
@pause_button.draw(160, 144, ZOrder::PAUSE_BUTTON)
@press_q.draw(170, 296, ZOrder::PAUSE_BUTTON)
end
private
def draw_rect(width, height, color, z_order)
# Draws a rectangle by coordinates clockwise from top-left
@window.draw_quad(0, 0, color, width, 0, color, width, height, color,
0, height, color, z_order, :default)
end
end
| class PauseScreen
def initialize(params)
Params.check_params(params, [:window, :window_width, :window_height]
@window = params[:window]
@window_width = params[:window_width]
@window_height = params[:window_height]
@pause_button = Gosu::Image.new(@window, 'media/pause_button.png', false)
@press_q = Gosu::Image.new(@window, 'media/press_q.png', false)
end
def draw
draw_rect(@window_width, @window_height, Color::TRANS_BLACK,
ZOrder::PAUSE_BACKGROUND)
@pause_button.draw(160, 144, ZOrder::PAUSE_BUTTON)
@press_q.draw(170, 296, ZOrder::PAUSE_BUTTON)
end
private
def draw_rect(width, height, color, z_order)
# Draws a rectangle by coordinates clockwise from top-left
@window.draw_quad(0, 0, color, width, 0, color, width, height, color,
0, height, color, z_order, :default)
end
end
| Update PauseScreen to take params hash | Update PauseScreen to take params hash
| Ruby | mit | mybuddymichael/poke | ruby | ## Code Before:
class PauseScreen
def initialize(window, window_width, window_height)
@window = window
@window_width, @window_height = window_width, window_height
@pause_button = Gosu::Image.new(window, 'media/pause_button.png', false)
@press_q = Gosu::Image.new(window, 'media/press_q.png', false)
end
def draw
draw_rect(@window_width, @window_height, Color::TRANS_BLACK,
ZOrder::PAUSE_BACKGROUND)
@pause_button.draw(160, 144, ZOrder::PAUSE_BUTTON)
@press_q.draw(170, 296, ZOrder::PAUSE_BUTTON)
end
private
def draw_rect(width, height, color, z_order)
# Draws a rectangle by coordinates clockwise from top-left
@window.draw_quad(0, 0, color, width, 0, color, width, height, color,
0, height, color, z_order, :default)
end
end
## Instruction:
Update PauseScreen to take params hash
## Code After:
class PauseScreen
def initialize(params)
Params.check_params(params, [:window, :window_width, :window_height]
@window = params[:window]
@window_width = params[:window_width]
@window_height = params[:window_height]
@pause_button = Gosu::Image.new(@window, 'media/pause_button.png', false)
@press_q = Gosu::Image.new(@window, 'media/press_q.png', false)
end
def draw
draw_rect(@window_width, @window_height, Color::TRANS_BLACK,
ZOrder::PAUSE_BACKGROUND)
@pause_button.draw(160, 144, ZOrder::PAUSE_BUTTON)
@press_q.draw(170, 296, ZOrder::PAUSE_BUTTON)
end
private
def draw_rect(width, height, color, z_order)
# Draws a rectangle by coordinates clockwise from top-left
@window.draw_quad(0, 0, color, width, 0, color, width, height, color,
0, height, color, z_order, :default)
end
end
| class PauseScreen
- def initialize(window, window_width, window_height)
- @window = window
- @window_width, @window_height = window_width, window_height
+ def initialize(params)
+ Params.check_params(params, [:window, :window_width, :window_height]
+ @window = params[:window]
+ @window_width = params[:window_width]
+ @window_height = params[:window_height]
- @pause_button = Gosu::Image.new(window, 'media/pause_button.png', false)
+ @pause_button = Gosu::Image.new(@window, 'media/pause_button.png', false)
? +
- @press_q = Gosu::Image.new(window, 'media/press_q.png', false)
+ @press_q = Gosu::Image.new(@window, 'media/press_q.png', false)
? +
end
def draw
draw_rect(@window_width, @window_height, Color::TRANS_BLACK,
ZOrder::PAUSE_BACKGROUND)
@pause_button.draw(160, 144, ZOrder::PAUSE_BUTTON)
@press_q.draw(170, 296, ZOrder::PAUSE_BUTTON)
end
private
def draw_rect(width, height, color, z_order)
# Draws a rectangle by coordinates clockwise from top-left
@window.draw_quad(0, 0, color, width, 0, color, width, height, color,
0, height, color, z_order, :default)
end
end | 12 | 0.461538 | 7 | 5 |
c313f09baf9f04a83771149e5ed39005f51ad858 | vim/vim.symlink/config/50-plugins.vim | vim/vim.symlink/config/50-plugins.vim | " Open Vundle config quickly {{{
nnoremap <Leader>vu :e ~/.dotfiles/vim/vim.symlink/config/00-vundle.vim<CR>
" }}}
" Run Hammer to preview this buffer {{{
nmap <Leader>p :Hammer<CR>
" }}}
" Toggle tagbar {{{
nmap <Leader>t :TagbarToggle<CR>
" }}}
" neocompcache {{{
let g:neocomplcache_auto_completion_start_length = 3
let g:neocomplcache_enable_at_startup = 1
" }}}
" NERDTree {{{
let NERDTreeIgnore=['\.rbc$', '\~$']
map <Leader>n :NERDTreeToggle<CR>
" }}}
" Rake.vim {{{
nmap <Leader>a :AV<CR>
nmap <C-a> :A<CR>
" }}}
" Bufexplorer {{
nnoremap <C-B> :BufExplorer<cr>
" }}
" PickHEX {{{
imap <D-C> <c-o>:PickHEX<CR>
nmap <D-C> :PickHEX<CR>
" }}}
" Syntastic {{{
" Mark syntax errors with :signs
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1
" }}}
" NERDCommenter {{{
let NERDSpaceDelims=1
" }}}
" Powerline {{{
" Use fancy symbols
let g:Powerline_symbols = 'fancy'
" }}}
| " Open Vundle config quickly {{{
nnoremap <Leader>vu :e ~/.dotfiles/vim/vim.symlink/config/00-vundle.vim<CR>
" }}}
" Run Hammer to preview this buffer {{{
nmap <Leader>p :Hammer<CR>
" }}}
" Toggle tagbar {{{
nmap <Leader>t :TagbarToggle<CR>
" }}}
" neocompcache {{{
let g:neocomplcache_enable_at_startup = 1
" }}}
" NERDTree {{{
let NERDTreeIgnore=['\.rbc$', '\~$']
map <Leader>n :NERDTreeToggle<CR>
" }}}
" Rake.vim {{{
nmap <Leader>a :AV<CR>
nmap <C-a> :A<CR>
" }}}
" Bufexplorer {{
nnoremap <C-B> :BufExplorer<cr>
" }}
" PickHEX {{{
imap <D-C> <c-o>:PickHEX<CR>
nmap <D-C> :PickHEX<CR>
" }}}
" Syntastic {{{
" Mark syntax errors with :signs
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1
" }}}
" NERDCommenter {{{
let NERDSpaceDelims=1
" }}}
" Powerline {{{
" Use fancy symbols
let g:Powerline_symbols = 'fancy'
" }}}
| Use default neocompcache start length | Use default neocompcache start length
| VimL | mit | jcf/ansible-dotfiles,jcf/ansible-dotfiles,jcf/ansible-dotfiles,jcf/ansible-dotfiles,jcf/ansible-dotfiles | viml | ## Code Before:
" Open Vundle config quickly {{{
nnoremap <Leader>vu :e ~/.dotfiles/vim/vim.symlink/config/00-vundle.vim<CR>
" }}}
" Run Hammer to preview this buffer {{{
nmap <Leader>p :Hammer<CR>
" }}}
" Toggle tagbar {{{
nmap <Leader>t :TagbarToggle<CR>
" }}}
" neocompcache {{{
let g:neocomplcache_auto_completion_start_length = 3
let g:neocomplcache_enable_at_startup = 1
" }}}
" NERDTree {{{
let NERDTreeIgnore=['\.rbc$', '\~$']
map <Leader>n :NERDTreeToggle<CR>
" }}}
" Rake.vim {{{
nmap <Leader>a :AV<CR>
nmap <C-a> :A<CR>
" }}}
" Bufexplorer {{
nnoremap <C-B> :BufExplorer<cr>
" }}
" PickHEX {{{
imap <D-C> <c-o>:PickHEX<CR>
nmap <D-C> :PickHEX<CR>
" }}}
" Syntastic {{{
" Mark syntax errors with :signs
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1
" }}}
" NERDCommenter {{{
let NERDSpaceDelims=1
" }}}
" Powerline {{{
" Use fancy symbols
let g:Powerline_symbols = 'fancy'
" }}}
## Instruction:
Use default neocompcache start length
## Code After:
" Open Vundle config quickly {{{
nnoremap <Leader>vu :e ~/.dotfiles/vim/vim.symlink/config/00-vundle.vim<CR>
" }}}
" Run Hammer to preview this buffer {{{
nmap <Leader>p :Hammer<CR>
" }}}
" Toggle tagbar {{{
nmap <Leader>t :TagbarToggle<CR>
" }}}
" neocompcache {{{
let g:neocomplcache_enable_at_startup = 1
" }}}
" NERDTree {{{
let NERDTreeIgnore=['\.rbc$', '\~$']
map <Leader>n :NERDTreeToggle<CR>
" }}}
" Rake.vim {{{
nmap <Leader>a :AV<CR>
nmap <C-a> :A<CR>
" }}}
" Bufexplorer {{
nnoremap <C-B> :BufExplorer<cr>
" }}
" PickHEX {{{
imap <D-C> <c-o>:PickHEX<CR>
nmap <D-C> :PickHEX<CR>
" }}}
" Syntastic {{{
" Mark syntax errors with :signs
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1
" }}}
" NERDCommenter {{{
let NERDSpaceDelims=1
" }}}
" Powerline {{{
" Use fancy symbols
let g:Powerline_symbols = 'fancy'
" }}}
| " Open Vundle config quickly {{{
nnoremap <Leader>vu :e ~/.dotfiles/vim/vim.symlink/config/00-vundle.vim<CR>
" }}}
" Run Hammer to preview this buffer {{{
nmap <Leader>p :Hammer<CR>
" }}}
" Toggle tagbar {{{
nmap <Leader>t :TagbarToggle<CR>
" }}}
" neocompcache {{{
- let g:neocomplcache_auto_completion_start_length = 3
let g:neocomplcache_enable_at_startup = 1
" }}}
" NERDTree {{{
let NERDTreeIgnore=['\.rbc$', '\~$']
map <Leader>n :NERDTreeToggle<CR>
" }}}
" Rake.vim {{{
nmap <Leader>a :AV<CR>
nmap <C-a> :A<CR>
" }}}
" Bufexplorer {{
nnoremap <C-B> :BufExplorer<cr>
" }}
" PickHEX {{{
imap <D-C> <c-o>:PickHEX<CR>
nmap <D-C> :PickHEX<CR>
" }}}
" Syntastic {{{
" Mark syntax errors with :signs
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1
" }}}
" NERDCommenter {{{
let NERDSpaceDelims=1
" }}}
" Powerline {{{
" Use fancy symbols
let g:Powerline_symbols = 'fancy'
" }}}
| 1 | 0.019608 | 0 | 1 |
da20a079ae72de4bbc156009e751a39c11926e76 | src/resources/fresh-site/src/documentation/translations/menu_es.xml | src/resources/fresh-site/src/documentation/translations/menu_es.xml | <?xml version="1.0" encoding="UTF-8"?>
<catalogue
xml:lang="es"
><message
key="About"
>Sobre</message
><message
key="Index"
>Indice</message
><message
key="Changes"
>Cambios</message
><message
key="Todo"
>Cosas que hacer</message
><message
key="Samples"
>Ejemplos</message
><message
key="Apache document page"
>Página documento Apache</message
><message
key="Static content"
>Contenido Estatico</message
><message
key="Wiki page"
>Página Wiki</message
><message
key="ihtml page"
>Página ihtml</message
><message
key="ehtml page"
>Página ehtml</message
><message
key="FAQ"
>Preguntas Frecuentes</message
><message
key="Simplifed Docbook page"
>Página Simplifed Docbook</message
><message
key="XSP page"
>Página XSP</message
></catalogue
> | <?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="es" >
<message key="About">Sobre</message >
<message key="Index">Indice</message >
<message key="Changes">Cambios</message>
<message key="Todo" >Cosas que hacer</message>
<message key="Samples" >Ejemplos</message>
<message key="Apache document page" >Página documento Apache</message>
<message key="Static content" >Contenido Estatico</message>
<message key="Wiki page" >Página Wiki</message>
<message key="ihtml page" >Página ihtml</message>
<message key="ehtml page" >Página ehtml</message>
<message key="FAQ" >Preguntas Frecuentes</message>
<message key="Simplifed Docbook page" >Página Simplifed Docbook</message>
<message key="XSP page" >Página XSP</message>
</catalogue >
| Remove eol and tidy up as it was wrong format. | Remove eol and tidy up as it was wrong format.
git-svn-id: fea306228a0c821168c534b698c8fa2a33280b3b@8759 13f79535-47bb-0310-9956-ffa450edef68
| XML | apache-2.0 | apache/forrest,apache/forrest,apache/forrest,apache/forrest,apache/forrest,apache/forrest | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<catalogue
xml:lang="es"
><message
key="About"
>Sobre</message
><message
key="Index"
>Indice</message
><message
key="Changes"
>Cambios</message
><message
key="Todo"
>Cosas que hacer</message
><message
key="Samples"
>Ejemplos</message
><message
key="Apache document page"
>Página documento Apache</message
><message
key="Static content"
>Contenido Estatico</message
><message
key="Wiki page"
>Página Wiki</message
><message
key="ihtml page"
>Página ihtml</message
><message
key="ehtml page"
>Página ehtml</message
><message
key="FAQ"
>Preguntas Frecuentes</message
><message
key="Simplifed Docbook page"
>Página Simplifed Docbook</message
><message
key="XSP page"
>Página XSP</message
></catalogue
>
## Instruction:
Remove eol and tidy up as it was wrong format.
git-svn-id: fea306228a0c821168c534b698c8fa2a33280b3b@8759 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="es" >
<message key="About">Sobre</message >
<message key="Index">Indice</message >
<message key="Changes">Cambios</message>
<message key="Todo" >Cosas que hacer</message>
<message key="Samples" >Ejemplos</message>
<message key="Apache document page" >Página documento Apache</message>
<message key="Static content" >Contenido Estatico</message>
<message key="Wiki page" >Página Wiki</message>
<message key="ihtml page" >Página ihtml</message>
<message key="ehtml page" >Página ehtml</message>
<message key="FAQ" >Preguntas Frecuentes</message>
<message key="Simplifed Docbook page" >Página Simplifed Docbook</message>
<message key="XSP page" >Página XSP</message>
</catalogue >
| <?xml version="1.0" encoding="UTF-8"?>
+ <catalogue xml:lang="es" >
+ <message key="About">Sobre</message >
+ <message key="Index">Indice</message >
+ <message key="Changes">Cambios</message>
+ <message key="Todo" >Cosas que hacer</message>
+ <message key="Samples" >Ejemplos</message>
+ <message key="Apache document page" >Página documento Apache</message>
+ <message key="Static content" >Contenido Estatico</message>
+ <message key="Wiki page" >Página Wiki</message>
+ <message key="ihtml page" >Página ihtml</message>
+ <message key="ehtml page" >Página ehtml</message>
+ <message key="FAQ" >Preguntas Frecuentes</message>
+ <message key="Simplifed Docbook page" >Página Simplifed Docbook</message>
+ <message key="XSP page" >Página XSP</message>
- <catalogue
- xml:lang="es"
- ><message
- key="About"
- >Sobre</message
- ><message
- key="Index"
- >Indice</message
- ><message
- key="Changes"
- >Cambios</message
- ><message
- key="Todo"
- >Cosas que hacer</message
- ><message
- key="Samples"
- >Ejemplos</message
- ><message
- key="Apache document page"
- >Página documento Apache</message
- ><message
- key="Static content"
- >Contenido Estatico</message
- ><message
- key="Wiki page"
- >Página Wiki</message
- ><message
- key="ihtml page"
- >Página ihtml</message
- ><message
- key="ehtml page"
- >Página ehtml</message
- ><message
- key="FAQ"
- >Preguntas Frecuentes</message
- ><message
- key="Simplifed Docbook page"
- >Página Simplifed Docbook</message
- ><message
- key="XSP page"
- >Página XSP</message
- ></catalogue
? -
+ </catalogue >
? ++
- >
+ | 59 | 1.340909 | 16 | 43 |
e12054fdea882a6b4133633481b9607afe462ad3 | blueprints/resource/files/app/services/__resource__.js | blueprints/resource/files/app/services/__resource__.js | import Adapter from '../adapters/<%= entity %>';
import ServiceCache from 'ember-jsonapi-resources/mixins/service-cache';
export default Adapter.extend(ServiceCache);
| import Adapter from '../adapters/<%= entity %>';
import ServiceCache from 'ember-jsonapi-resources/mixins/service-cache';
Adapter.reopenClass({ isServiceFactory: true });
export default Adapter.extend(ServiceCache);
| Add isServiceFactory flag to Adapter blueprint | Add isServiceFactory flag to Adapter blueprint
| JavaScript | mit | pixelhandler/ember-jsonapi-resources,oliverbarnes/ember-jsonapi-resources,Rahien/ember-jsonapi-resources,rwjblue/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,oliverbarnes/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,pixelhandler/ember-jsonapi-resources,kmkamruzzaman/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,Rahien/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,kmkamruzzaman/ember-jsonapi-resources,rwjblue/ember-jsonapi-resources | javascript | ## Code Before:
import Adapter from '../adapters/<%= entity %>';
import ServiceCache from 'ember-jsonapi-resources/mixins/service-cache';
export default Adapter.extend(ServiceCache);
## Instruction:
Add isServiceFactory flag to Adapter blueprint
## Code After:
import Adapter from '../adapters/<%= entity %>';
import ServiceCache from 'ember-jsonapi-resources/mixins/service-cache';
Adapter.reopenClass({ isServiceFactory: true });
export default Adapter.extend(ServiceCache);
| import Adapter from '../adapters/<%= entity %>';
import ServiceCache from 'ember-jsonapi-resources/mixins/service-cache';
+ Adapter.reopenClass({ isServiceFactory: true });
+
export default Adapter.extend(ServiceCache); | 2 | 0.5 | 2 | 0 |
5353077686f1476dae14c50541c9a6651c353b15 | metadata.rb | metadata.rb | name "collectd"
maintainer "Noan Kantrowitz"
maintainer_email "nkantrowitz@crypticstudios.com"
license "Apache 2.0"
description "Install and configure the collectd monitoring daemon and plugins"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.1.5"
supports "ubuntu"
depends "build-essential"
| name 'collectd'
maintainer 'Noan Kantrowitz'
maintainer_email 'nkantrowitz@crypticstudios.com'
license 'Apache 2.0'
description 'Install and configure the collectd monitoring daemon and plugins'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.1.5'
supports 'ubuntu'
depends 'build-essential'
| Replace " with ' quotes | Replace " with ' quotes
| Ruby | apache-2.0 | realityforge/chef-collectd | ruby | ## Code Before:
name "collectd"
maintainer "Noan Kantrowitz"
maintainer_email "nkantrowitz@crypticstudios.com"
license "Apache 2.0"
description "Install and configure the collectd monitoring daemon and plugins"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.1.5"
supports "ubuntu"
depends "build-essential"
## Instruction:
Replace " with ' quotes
## Code After:
name 'collectd'
maintainer 'Noan Kantrowitz'
maintainer_email 'nkantrowitz@crypticstudios.com'
license 'Apache 2.0'
description 'Install and configure the collectd monitoring daemon and plugins'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.1.5'
supports 'ubuntu'
depends 'build-essential'
| - name "collectd"
? ^ ^
+ name 'collectd'
? ^ ^
- maintainer "Noan Kantrowitz"
? ^ ^
+ maintainer 'Noan Kantrowitz'
? ^ ^
- maintainer_email "nkantrowitz@crypticstudios.com"
? ^ ^
+ maintainer_email 'nkantrowitz@crypticstudios.com'
? ^ ^
- license "Apache 2.0"
? ^ ^
+ license 'Apache 2.0'
? ^ ^
- description "Install and configure the collectd monitoring daemon and plugins"
? ^ ^
+ description 'Install and configure the collectd monitoring daemon and plugins'
? ^ ^
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
- version "1.1.5"
? ^ ^
+ version '1.1.5'
? ^ ^
- supports "ubuntu"
? ^ ^
+ supports 'ubuntu'
? ^ ^
- depends "build-essential"
? ^ ^
+ depends 'build-essential'
? ^ ^
| 16 | 1.6 | 8 | 8 |
5a0329a004b3ba8d833057f724e974662ce4771d | .travis.yml | .travis.yml | dist: trusty
sudo: required
os:
- linux
jdk:
- oraclejdk8 # Building Bazel requires JDK8.
language: go
go: 1.10.x
install: true
services:
- docker
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8'
key_url: 'https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg'
packages:
- bazel
- librpm-dev
install:
- go get -u github.com/bazelbuild/buildifier/buildifier
script:
# Run all tests
- cd src && bazel clean && bazel --batch test --test_output=errors //...
# Check for issues with the format of bazel config files.
- buildifier -mode=check $(find . -name BUILD.bazel -type f)
- buildifier -mode=check $(find . -name WORKSPACE -type f)
| dist: trusty
sudo: required
os:
- linux
jdk:
- oraclejdk8 # Building Bazel requires JDK8.
language: go
go: 1.10.x
install: true
services:
- docker
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8'
key_url: 'https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg'
packages:
- bazel
- librpm-dev
install:
- go get -u github.com/bazelbuild/buildifier/buildifier
script:
# Run all tests
- cd src && bazel clean && bazel --batch test --noshow_loading_progress --noshow_progress --features=race --test_verbose_timeout_warnings --test_output=errors //...
# Check for issues with the format of bazel config files.
- buildifier -mode=check $(find . -name BUILD.bazel -type f)
- buildifier -mode=check $(find . -name WORKSPACE -type f)
| Update bazel flags to speed things up and show more errors. | Update bazel flags to speed things up and show more errors.
| YAML | apache-2.0 | google/minions,google/minions,google/minions | yaml | ## Code Before:
dist: trusty
sudo: required
os:
- linux
jdk:
- oraclejdk8 # Building Bazel requires JDK8.
language: go
go: 1.10.x
install: true
services:
- docker
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8'
key_url: 'https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg'
packages:
- bazel
- librpm-dev
install:
- go get -u github.com/bazelbuild/buildifier/buildifier
script:
# Run all tests
- cd src && bazel clean && bazel --batch test --test_output=errors //...
# Check for issues with the format of bazel config files.
- buildifier -mode=check $(find . -name BUILD.bazel -type f)
- buildifier -mode=check $(find . -name WORKSPACE -type f)
## Instruction:
Update bazel flags to speed things up and show more errors.
## Code After:
dist: trusty
sudo: required
os:
- linux
jdk:
- oraclejdk8 # Building Bazel requires JDK8.
language: go
go: 1.10.x
install: true
services:
- docker
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8'
key_url: 'https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg'
packages:
- bazel
- librpm-dev
install:
- go get -u github.com/bazelbuild/buildifier/buildifier
script:
# Run all tests
- cd src && bazel clean && bazel --batch test --noshow_loading_progress --noshow_progress --features=race --test_verbose_timeout_warnings --test_output=errors //...
# Check for issues with the format of bazel config files.
- buildifier -mode=check $(find . -name BUILD.bazel -type f)
- buildifier -mode=check $(find . -name WORKSPACE -type f)
| dist: trusty
sudo: required
os:
- linux
jdk:
- oraclejdk8 # Building Bazel requires JDK8.
language: go
go: 1.10.x
install: true
services:
- docker
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8'
key_url: 'https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg'
packages:
- bazel
- librpm-dev
install:
- go get -u github.com/bazelbuild/buildifier/buildifier
script:
# Run all tests
- - cd src && bazel clean && bazel --batch test --test_output=errors //...
+ - cd src && bazel clean && bazel --batch test --noshow_loading_progress --noshow_progress --features=race --test_verbose_timeout_warnings --test_output=errors //...
# Check for issues with the format of bazel config files.
- buildifier -mode=check $(find . -name BUILD.bazel -type f)
- buildifier -mode=check $(find . -name WORKSPACE -type f) | 2 | 0.057143 | 1 | 1 |
a236747cee13f512f5f1708b41306533b67ebddb | PSET2/caesar.c | PSET2/caesar.c |
int main(void) {
return 0;
} |
int main(int argc, char *argv[]) {
// check entered key
if (argc != 2 || atoi(argv[1]) < 0) {
printf("Usage: ./caesar k\nWhere k is a non negative integer.\n");
return 1;
}
int key = atoi(argv[1]);
return 0;
}
| Add key check and convert key to int | Add key check and convert key to int
| C | unlicense | Implaier/CS50,Implaier/CS50,Implaier/CS50,Implaier/CS50 | c | ## Code Before:
int main(void) {
return 0;
}
## Instruction:
Add key check and convert key to int
## Code After:
int main(int argc, char *argv[]) {
// check entered key
if (argc != 2 || atoi(argv[1]) < 0) {
printf("Usage: ./caesar k\nWhere k is a non negative integer.\n");
return 1;
}
int key = atoi(argv[1]);
return 0;
}
|
- int main(void) {
+ int main(int argc, char *argv[]) {
+
+ // check entered key
+ if (argc != 2 || atoi(argv[1]) < 0) {
+ printf("Usage: ./caesar k\nWhere k is a non negative integer.\n");
+ return 1;
+ }
+
+ int key = atoi(argv[1]);
+
+
return 0;
} | 12 | 2.4 | 11 | 1 |
89a414da5b3e9c498f5c867d92e5ac3e303e7b50 | catalog/Networking/networking_tools.yml | catalog/Networking/networking_tools.yml | name: Networking Tools
description:
projects:
- ipaddress
- macker
- maxminddb
- wifi-wand
| name: Networking Tools
description:
projects:
- ipaddress
- macker
- maxminddb
- wifi-wand
- net-ssh
- net-ssh-cli
- net-scp
- net-sftp
- net-ping
- netsnmp
- oxidized
| Add various net gems to the networking catalog. | Add various net gems to the networking catalog.
I added some networking gems I am using on a daily basis since years. | YAML | mit | rubytoolbox/catalog | yaml | ## Code Before:
name: Networking Tools
description:
projects:
- ipaddress
- macker
- maxminddb
- wifi-wand
## Instruction:
Add various net gems to the networking catalog.
I added some networking gems I am using on a daily basis since years.
## Code After:
name: Networking Tools
description:
projects:
- ipaddress
- macker
- maxminddb
- wifi-wand
- net-ssh
- net-ssh-cli
- net-scp
- net-sftp
- net-ping
- netsnmp
- oxidized
| name: Networking Tools
description:
projects:
- ipaddress
- macker
- maxminddb
- wifi-wand
+ - net-ssh
+ - net-ssh-cli
+ - net-scp
+ - net-sftp
+ - net-ping
+ - netsnmp
+ - oxidized | 7 | 1 | 7 | 0 |
58eb5f3a2e035db8efd20546f043ddbdf455ecff | Magic/src/main/resources/defaults/classes/base.yml | Magic/src/main/resources/defaults/classes/base.yml | base:
storage:
# Path needs to be set first here so we can identify if mana is coming from the path or
# The base class
path: subclass
# mana can be provided by the subclass (path controlled)
# or by the base class (shared between subclasses)
mana_max: subclass,class
mana_regeneration: subclass,class
# Current mana level and timestamp (controls regeneration
# Should get stored in the same place that max/regen come from
mana: mana_regeneration
mana_timestamp: mana_regeneration
spell_levels: class
spells: class
brushes: class
hotbar_count: subclass
| base:
storage:
# Path needs to be set first here so we can identify if mana is coming from the path or
# The base class
path: subclass
# mana can be provided by the subclass (path controlled)
# or by the base class (shared between subclasses)
mana_max: subclass,class
mana_regeneration: subclass,class
# Current mana level and timestamp (controls regeneration
# Should get stored in the same place that max/regen come from
mana: mana_regeneration
mana_timestamp: mana_regeneration
spell_levels: class
spells: class
brushes: class
hotbar_count: subclass
# Attributes are primarily stored on the mage
# But attributes can also be set on wands to provide attribute buffs.
attributes: mage,wand
| Revert "Remove attribute property route, which was causing wands to advertise mage attributes, which then get pulled back in by the mage, effectively doubling the attribute" | Revert "Remove attribute property route, which was causing wands to advertise mage attributes, which then get pulled back in by the mage, effectively doubling the attribute"
This reverts commit 2738c924
| YAML | mit | elBukkit/MagicPlugin,elBukkit/MagicPlugin,elBukkit/MagicPlugin | yaml | ## Code Before:
base:
storage:
# Path needs to be set first here so we can identify if mana is coming from the path or
# The base class
path: subclass
# mana can be provided by the subclass (path controlled)
# or by the base class (shared between subclasses)
mana_max: subclass,class
mana_regeneration: subclass,class
# Current mana level and timestamp (controls regeneration
# Should get stored in the same place that max/regen come from
mana: mana_regeneration
mana_timestamp: mana_regeneration
spell_levels: class
spells: class
brushes: class
hotbar_count: subclass
## Instruction:
Revert "Remove attribute property route, which was causing wands to advertise mage attributes, which then get pulled back in by the mage, effectively doubling the attribute"
This reverts commit 2738c924
## Code After:
base:
storage:
# Path needs to be set first here so we can identify if mana is coming from the path or
# The base class
path: subclass
# mana can be provided by the subclass (path controlled)
# or by the base class (shared between subclasses)
mana_max: subclass,class
mana_regeneration: subclass,class
# Current mana level and timestamp (controls regeneration
# Should get stored in the same place that max/regen come from
mana: mana_regeneration
mana_timestamp: mana_regeneration
spell_levels: class
spells: class
brushes: class
hotbar_count: subclass
# Attributes are primarily stored on the mage
# But attributes can also be set on wands to provide attribute buffs.
attributes: mage,wand
| base:
storage:
# Path needs to be set first here so we can identify if mana is coming from the path or
# The base class
path: subclass
# mana can be provided by the subclass (path controlled)
# or by the base class (shared between subclasses)
mana_max: subclass,class
mana_regeneration: subclass,class
# Current mana level and timestamp (controls regeneration
# Should get stored in the same place that max/regen come from
mana: mana_regeneration
mana_timestamp: mana_regeneration
spell_levels: class
spells: class
brushes: class
hotbar_count: subclass
+
+ # Attributes are primarily stored on the mage
+ # But attributes can also be set on wands to provide attribute buffs.
+ attributes: mage,wand
+ | 5 | 0.294118 | 5 | 0 |
f0f217def87af7f936fb4e6403716dcedccb3516 | src/de/gurkenlabs/litiengine/GameTime.java | src/de/gurkenlabs/litiengine/GameTime.java | package de.gurkenlabs.litiengine;
public class GameTime {
private final IGameLoop gameLoop;
public GameTime(final IGameLoop loop) {
this.gameLoop = loop;
}
public long getDays() {
return this.getMilliseconds() / 1000 / 60 / 60 / 24 % 365;
}
public long getHours() {
return this.getMilliseconds() / 1000 / 60 / 60 % 24;
}
public long getMilliseconds() {
return this.gameLoop.convertToMs(this.gameLoop.getTicks());
}
public long getMinutes() {
return this.getMilliseconds() / 1000 / 60 % 60;
}
public long getSeconds() {
return this.getMilliseconds() / 1000 % 60;
}
public long getYears() {
return this.getMilliseconds() / 1000 / 60 / 60 / 24 / 365;
}
}
| package de.gurkenlabs.litiengine;
public class GameTime {
private final IGameLoop gameLoop;
public GameTime(final IGameLoop loop) {
this.gameLoop = loop;
}
public long getDays() {
return getDays(this.getMilliseconds());
}
public long getHours() {
return getHours(this.getMilliseconds());
}
public long getMilliseconds() {
return this.gameLoop.convertToMs(this.gameLoop.getTicks());
}
public long getMinutes() {
return getMinutes(this.getMilliseconds());
}
public long getSeconds() {
return getSeconds(this.getMilliseconds());
}
public long getYears() {
return getYears(this.getMilliseconds());
}
public static long getDays(long ms) {
return ms / 1000 / 60 / 60 / 24 % 365;
}
public static long getHours(long ms) {
return ms / 1000 / 60 / 60 % 24;
}
public static long getMinutes(long ms) {
return ms / 1000 / 60 % 60;
}
public static long getSeconds(long ms) {
return ms / 1000 % 60;
}
public static long getMilliSeconds(long ms) {
return ms % 1000;
}
public static long getYears(long ms) {
return ms / 1000 / 60 / 60 / 24 / 365;
}
}
| Extend game time by static methods to get parts of a time format | Extend game time by static methods to get parts of a time format
Returns integer values for every time division like hours or minutes with the intention to be used for a "timer" like application
| Java | mit | gurkenlabs/litiengine,gurkenlabs/litiengine | java | ## Code Before:
package de.gurkenlabs.litiengine;
public class GameTime {
private final IGameLoop gameLoop;
public GameTime(final IGameLoop loop) {
this.gameLoop = loop;
}
public long getDays() {
return this.getMilliseconds() / 1000 / 60 / 60 / 24 % 365;
}
public long getHours() {
return this.getMilliseconds() / 1000 / 60 / 60 % 24;
}
public long getMilliseconds() {
return this.gameLoop.convertToMs(this.gameLoop.getTicks());
}
public long getMinutes() {
return this.getMilliseconds() / 1000 / 60 % 60;
}
public long getSeconds() {
return this.getMilliseconds() / 1000 % 60;
}
public long getYears() {
return this.getMilliseconds() / 1000 / 60 / 60 / 24 / 365;
}
}
## Instruction:
Extend game time by static methods to get parts of a time format
Returns integer values for every time division like hours or minutes with the intention to be used for a "timer" like application
## Code After:
package de.gurkenlabs.litiengine;
public class GameTime {
private final IGameLoop gameLoop;
public GameTime(final IGameLoop loop) {
this.gameLoop = loop;
}
public long getDays() {
return getDays(this.getMilliseconds());
}
public long getHours() {
return getHours(this.getMilliseconds());
}
public long getMilliseconds() {
return this.gameLoop.convertToMs(this.gameLoop.getTicks());
}
public long getMinutes() {
return getMinutes(this.getMilliseconds());
}
public long getSeconds() {
return getSeconds(this.getMilliseconds());
}
public long getYears() {
return getYears(this.getMilliseconds());
}
public static long getDays(long ms) {
return ms / 1000 / 60 / 60 / 24 % 365;
}
public static long getHours(long ms) {
return ms / 1000 / 60 / 60 % 24;
}
public static long getMinutes(long ms) {
return ms / 1000 / 60 % 60;
}
public static long getSeconds(long ms) {
return ms / 1000 % 60;
}
public static long getMilliSeconds(long ms) {
return ms % 1000;
}
public static long getYears(long ms) {
return ms / 1000 / 60 / 60 / 24 / 365;
}
}
| package de.gurkenlabs.litiengine;
public class GameTime {
private final IGameLoop gameLoop;
public GameTime(final IGameLoop loop) {
this.gameLoop = loop;
}
public long getDays() {
- return this.getMilliseconds() / 1000 / 60 / 60 / 24 % 365;
+ return getDays(this.getMilliseconds());
}
public long getHours() {
- return this.getMilliseconds() / 1000 / 60 / 60 % 24;
+ return getHours(this.getMilliseconds());
}
public long getMilliseconds() {
return this.gameLoop.convertToMs(this.gameLoop.getTicks());
}
public long getMinutes() {
- return this.getMilliseconds() / 1000 / 60 % 60;
+ return getMinutes(this.getMilliseconds());
}
public long getSeconds() {
- return this.getMilliseconds() / 1000 % 60;
+ return getSeconds(this.getMilliseconds());
}
public long getYears() {
+ return getYears(this.getMilliseconds());
+ }
+
+ public static long getDays(long ms) {
+ return ms / 1000 / 60 / 60 / 24 % 365;
+ }
+
+ public static long getHours(long ms) {
+ return ms / 1000 / 60 / 60 % 24;
+ }
+
+ public static long getMinutes(long ms) {
+ return ms / 1000 / 60 % 60;
+ }
+
+ public static long getSeconds(long ms) {
+ return ms / 1000 % 60;
+ }
+
+ public static long getMilliSeconds(long ms) {
+ return ms % 1000;
+ }
+
+ public static long getYears(long ms) {
- return this.getMilliseconds() / 1000 / 60 / 60 / 24 / 365;
? ^^^ ------------------
+ return ms / 1000 / 60 / 60 / 24 / 365;
? ^
}
} | 34 | 1.030303 | 29 | 5 |
18b63d771068aab6f8ab82c8194805b50f14b50d | lib/generators/forest/block/templates/_block_edit_fields.html.erb | lib/generators/forest/block/templates/_block_edit_fields.html.erb | <%- if attributes.present? -%>
<%- attributes.each do |attribute| -%>
<%- if attribute.reference? -%>
<%%= f.association :<%= attribute.name %> %>
<%- else -%>
<%%= f.input :<%= attribute.name %> %>
<%- end -%>
<%- end -%>
<%- else -%>
<%%#= f.input :attribute_name %>
<%- end -%>
| <%- if attributes.present? -%>
<%- attributes.each do |attribute| -%>
<%- if attribute.reference? -%>
<%- if attribute.name =~ /media_item/ -%>
<%%= f.association :<%= attribute.name %>, as: :image %>
<%- else -%>
<%%= f.association :<%= attribute.name %> %>
<%- end -%>
<%- else -%>
<%- if attribute.name =~ /date/ -%>
<%%= f.input :<%= attribute.name %>, as: :datepicker %>
<%- elsif attribute.name =~ /text/ -%>
<%%= f.input :<%= attribute.name %>, markdown: true %>
<%- else -%>
<%%= f.input :<%= attribute.name %> %>
<%- end -%>
<%- end -%>
<%- end -%>
<%- else -%>
<%%#= f.input :attribute_name %>
<%- end -%>
| Update block generator to infer custom simpleform inputs | Update block generator to infer custom simpleform inputs
| HTML+ERB | mit | dylanfisher/forest,dylanfisher/forest,dylanfisher/forest | html+erb | ## Code Before:
<%- if attributes.present? -%>
<%- attributes.each do |attribute| -%>
<%- if attribute.reference? -%>
<%%= f.association :<%= attribute.name %> %>
<%- else -%>
<%%= f.input :<%= attribute.name %> %>
<%- end -%>
<%- end -%>
<%- else -%>
<%%#= f.input :attribute_name %>
<%- end -%>
## Instruction:
Update block generator to infer custom simpleform inputs
## Code After:
<%- if attributes.present? -%>
<%- attributes.each do |attribute| -%>
<%- if attribute.reference? -%>
<%- if attribute.name =~ /media_item/ -%>
<%%= f.association :<%= attribute.name %>, as: :image %>
<%- else -%>
<%%= f.association :<%= attribute.name %> %>
<%- end -%>
<%- else -%>
<%- if attribute.name =~ /date/ -%>
<%%= f.input :<%= attribute.name %>, as: :datepicker %>
<%- elsif attribute.name =~ /text/ -%>
<%%= f.input :<%= attribute.name %>, markdown: true %>
<%- else -%>
<%%= f.input :<%= attribute.name %> %>
<%- end -%>
<%- end -%>
<%- end -%>
<%- else -%>
<%%#= f.input :attribute_name %>
<%- end -%>
| <%- if attributes.present? -%>
<%- attributes.each do |attribute| -%>
<%- if attribute.reference? -%>
+ <%- if attribute.name =~ /media_item/ -%>
+ <%%= f.association :<%= attribute.name %>, as: :image %>
+ <%- else -%>
<%%= f.association :<%= attribute.name %> %>
+ <%- end -%>
<%- else -%>
+ <%- if attribute.name =~ /date/ -%>
+ <%%= f.input :<%= attribute.name %>, as: :datepicker %>
+ <%- elsif attribute.name =~ /text/ -%>
+ <%%= f.input :<%= attribute.name %>, markdown: true %>
+ <%- else -%>
<%%= f.input :<%= attribute.name %> %>
+ <%- end -%>
<%- end -%>
<%- end -%>
<%- else -%>
<%%#= f.input :attribute_name %>
<%- end -%> | 10 | 0.909091 | 10 | 0 |
000c6c5911dd9c5da7e63c046e742d7053e39aa1 | app/views/admin/poll/active_polls/_form.html.erb | app/views/admin/poll/active_polls/_form.html.erb | <%= render "shared/globalize_locales", resource: @active_poll %>
<%= translatable_form_for(@active_poll, url: form_url) do |f| %>
<%= render "shared/errors", resource: @active_poll %>
<%= f.translatable_fields do |translations_form| %>
<div class="ckeditor">
<span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
<%= translations_form.cktext_area :description,
maxlength: ActivePoll.description_max_length,
label: t("admin.active_polls.form.description.text") %>
</div>
<% end %>
<div class="small-12 medium-4 large-2 margin-top">
<%= f.submit(class: "button success", value: t("shared.save")) %>
</div>
<% end %>
| <%= render "shared/globalize_locales", resource: @active_poll %>
<%= translatable_form_for(@active_poll, url: form_url) do |f| %>
<%= render "shared/errors", resource: @active_poll %>
<div class="row">
<%= f.translatable_fields do |translations_form| %>
<div class="ckeditor column">
<span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
<%= translations_form.cktext_area :description,
maxlength: ActivePoll.description_max_length,
label: t("admin.active_polls.form.description.text") %>
</div>
<% end %>
</div>
<div class="row">
<div class="small-12 medium-4 large-2 margin-top column">
<%= f.submit(class: "button success", value: t("shared.save")) %>
</div>
</div>
<% end %>
| Align admin active polls form fields with new translations interface | Align admin active polls form fields with new translations interface
| HTML+ERB | agpl-3.0 | consul/consul,consul/consul,consul/consul,consul/consul,usabi/consul_san_borondon,usabi/consul_san_borondon,consul/consul,usabi/consul_san_borondon,usabi/consul_san_borondon | html+erb | ## Code Before:
<%= render "shared/globalize_locales", resource: @active_poll %>
<%= translatable_form_for(@active_poll, url: form_url) do |f| %>
<%= render "shared/errors", resource: @active_poll %>
<%= f.translatable_fields do |translations_form| %>
<div class="ckeditor">
<span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
<%= translations_form.cktext_area :description,
maxlength: ActivePoll.description_max_length,
label: t("admin.active_polls.form.description.text") %>
</div>
<% end %>
<div class="small-12 medium-4 large-2 margin-top">
<%= f.submit(class: "button success", value: t("shared.save")) %>
</div>
<% end %>
## Instruction:
Align admin active polls form fields with new translations interface
## Code After:
<%= render "shared/globalize_locales", resource: @active_poll %>
<%= translatable_form_for(@active_poll, url: form_url) do |f| %>
<%= render "shared/errors", resource: @active_poll %>
<div class="row">
<%= f.translatable_fields do |translations_form| %>
<div class="ckeditor column">
<span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
<%= translations_form.cktext_area :description,
maxlength: ActivePoll.description_max_length,
label: t("admin.active_polls.form.description.text") %>
</div>
<% end %>
</div>
<div class="row">
<div class="small-12 medium-4 large-2 margin-top column">
<%= f.submit(class: "button success", value: t("shared.save")) %>
</div>
</div>
<% end %>
| <%= render "shared/globalize_locales", resource: @active_poll %>
<%= translatable_form_for(@active_poll, url: form_url) do |f| %>
<%= render "shared/errors", resource: @active_poll %>
+ <div class="row">
- <%= f.translatable_fields do |translations_form| %>
+ <%= f.translatable_fields do |translations_form| %>
? ++
- <div class="ckeditor">
+ <div class="ckeditor column">
? ++ +++++++
- <span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
+ <span class="help-text"><%= t("admin.active_polls.form.description.help_text") %></span>
? ++
- <%= translations_form.cktext_area :description,
+ <%= translations_form.cktext_area :description,
? ++
- maxlength: ActivePoll.description_max_length,
+ maxlength: ActivePoll.description_max_length,
? ++
- label: t("admin.active_polls.form.description.text") %>
+ label: t("admin.active_polls.form.description.text") %>
? ++
+ </div>
+ <% end %>
+ </div>
+
+ <div class="row">
+ <div class="small-12 medium-4 large-2 margin-top column">
+ <%= f.submit(class: "button success", value: t("shared.save")) %>
</div>
- <% end %>
-
- <div class="small-12 medium-4 large-2 margin-top">
- <%= f.submit(class: "button success", value: t("shared.save")) %>
</div>
<% end %> | 24 | 1.2 | 14 | 10 |
c89b0be227fd541ab5b4e008742598483e2ae3e9 | tests/bootstrap.php | tests/bootstrap.php | <?php
error_reporting(E_ALL);
require_once dirname(__DIR__) . '/vendor/autoload.php';
PHPUnit_Framework_Error_Notice::$enabled = true;
| <?php
error_reporting(E_ALL);
if(is_file(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__) . '/vendor/autoload.php';
}
elseif(is_file(dirname(dirname(__DIR__)) . '/common/code/Data.php')) {
require_once dirname(dirname(__DIR__)) . '/common/code/Data.php';
require_once dirname(__DIR__) . '/code/Calendar.php';
}
PHPUnit_Framework_Error_Notice::$enabled = true;
| Allow executing tests without composer | Allow executing tests without composer
...quite dirty but handy while developing ;)
| PHP | mit | Remo/punic,Remo/punic | php | ## Code Before:
<?php
error_reporting(E_ALL);
require_once dirname(__DIR__) . '/vendor/autoload.php';
PHPUnit_Framework_Error_Notice::$enabled = true;
## Instruction:
Allow executing tests without composer
...quite dirty but handy while developing ;)
## Code After:
<?php
error_reporting(E_ALL);
if(is_file(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__) . '/vendor/autoload.php';
}
elseif(is_file(dirname(dirname(__DIR__)) . '/common/code/Data.php')) {
require_once dirname(dirname(__DIR__)) . '/common/code/Data.php';
require_once dirname(__DIR__) . '/code/Calendar.php';
}
PHPUnit_Framework_Error_Notice::$enabled = true;
| <?php
error_reporting(E_ALL);
+ if(is_file(dirname(__DIR__) . '/vendor/autoload.php')) {
- require_once dirname(__DIR__) . '/vendor/autoload.php';
+ require_once dirname(__DIR__) . '/vendor/autoload.php';
? ++++
+ }
+ elseif(is_file(dirname(dirname(__DIR__)) . '/common/code/Data.php')) {
+ require_once dirname(dirname(__DIR__)) . '/common/code/Data.php';
+ require_once dirname(__DIR__) . '/code/Calendar.php';
+ }
PHPUnit_Framework_Error_Notice::$enabled = true;
| 8 | 1.142857 | 7 | 1 |
43a063da813bd378af51ab2183c4e564ec75e5fa | README.md | README.md | My personal website, just a quick way to link to my github and email info.
| My personal website, just a quick way to link to my github and email info.
[Live version](http://achandran.github.io)
| Add link to live site in readme | Add link to live site in readme
| Markdown | mit | achandran/achandran.github.io | markdown | ## Code Before:
My personal website, just a quick way to link to my github and email info.
## Instruction:
Add link to live site in readme
## Code After:
My personal website, just a quick way to link to my github and email info.
[Live version](http://achandran.github.io)
| My personal website, just a quick way to link to my github and email info.
+ [Live version](http://achandran.github.io) | 1 | 1 | 1 | 0 |
c2439987284f0f6d3799b68d90a450af8829b18c | index.css | index.css | @import "news.css";
#page-header {
margin-top: 1.65em;
margin-bottom: 2em;
}
#page-header h1 {
letter-spacing: 0.15em;
font-size: 4em;
}
#page-header .description {
font-size: x-large;
margin-top: -0.2em;
letter-spacing: 0.05em;
word-spacing: 0.1em;
line-height: 1em;
}
#page-header .author-line {
font-size: large;
letter-spacing: 0.06em;
word-spacing: 0.12em;
line-height: 1em;
}
#unlicense {
margin-top: 2em;
margin-bottom: 2em;
}
| @import "news.css";
#page-header {
margin-top: 1.65em;
margin-bottom: 2em;
}
#page-header h1 {
letter-spacing: 0.15em;
font-size: 4em;
}
#page-header .description {
font-size: x-large;
margin-top: -0.2em;
letter-spacing: 0.05em;
word-spacing: 0.1em;
line-height: 1em;
}
#page-header .author-line {
font-size: large;
letter-spacing: 0.06em;
word-spacing: 0.12em;
line-height: 1em;
}
#unlicense {
margin-top: 2em;
margin-bottom: 2em;
border-color: transparent;
}
| Remove the thick green border around Unlicense promotion on the main page. It makes my eyes bleed and "unbalances" the page. | Remove the thick green border around Unlicense promotion on the main page. It makes my eyes bleed and "unbalances" the page.
| CSS | unlicense | Hexstream/www.hexstreamsoft.com,Hexstream/www.hexstreamsoft.com,Hexstream/www.hexstreamsoft.com,Hexstream/hexstreamsoft.com | css | ## Code Before:
@import "news.css";
#page-header {
margin-top: 1.65em;
margin-bottom: 2em;
}
#page-header h1 {
letter-spacing: 0.15em;
font-size: 4em;
}
#page-header .description {
font-size: x-large;
margin-top: -0.2em;
letter-spacing: 0.05em;
word-spacing: 0.1em;
line-height: 1em;
}
#page-header .author-line {
font-size: large;
letter-spacing: 0.06em;
word-spacing: 0.12em;
line-height: 1em;
}
#unlicense {
margin-top: 2em;
margin-bottom: 2em;
}
## Instruction:
Remove the thick green border around Unlicense promotion on the main page. It makes my eyes bleed and "unbalances" the page.
## Code After:
@import "news.css";
#page-header {
margin-top: 1.65em;
margin-bottom: 2em;
}
#page-header h1 {
letter-spacing: 0.15em;
font-size: 4em;
}
#page-header .description {
font-size: x-large;
margin-top: -0.2em;
letter-spacing: 0.05em;
word-spacing: 0.1em;
line-height: 1em;
}
#page-header .author-line {
font-size: large;
letter-spacing: 0.06em;
word-spacing: 0.12em;
line-height: 1em;
}
#unlicense {
margin-top: 2em;
margin-bottom: 2em;
border-color: transparent;
}
| @import "news.css";
#page-header {
margin-top: 1.65em;
margin-bottom: 2em;
}
#page-header h1 {
letter-spacing: 0.15em;
font-size: 4em;
}
#page-header .description {
font-size: x-large;
margin-top: -0.2em;
letter-spacing: 0.05em;
word-spacing: 0.1em;
line-height: 1em;
}
#page-header .author-line {
font-size: large;
letter-spacing: 0.06em;
word-spacing: 0.12em;
line-height: 1em;
}
#unlicense {
margin-top: 2em;
margin-bottom: 2em;
+ border-color: transparent;
} | 1 | 0.032258 | 1 | 0 |
5ee949626b2d5b132f8ec1ce7d597a7ad401cfa5 | epydemiology/__init__.py | epydemiology/__init__.py | from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData import phjParseDateVar
from .phjCleanUKPostcodes import phjCleanUKPostcodeVariable
from .phjCleanUKPostcodes import phjPostcodeFormat7
from .phjExploreData import phjViewLogOdds
from .phjExploreData import phjCategoriseContinuousVariable
from .phjExtFuncs import getJenksBreaks
from .phjGetData import phjReadDataFromExcelNamedCellRange
from .phjGetDBData import phjGetDataFromDatabase
from .phjMatrices import phjBinaryVarsToSquareMatrix
from .phjMiscFuncs import phjGetStrFromArgOrFile
from .phjMiscFuncs import phjReadTextFromFile
from .phjMiscFuncs import phjCreateNamedGroupRegex
from .phjMiscFuncs import phjFindRegexNamedGroups
from .phjMiscFuncs import phjMaxLevelOfTaxonomicDetail
from .phjRROR import phjOddsRatio
from .phjRROR import phjRelativeRisk
from .phjSelectData import phjSelectCaseControlDataset
from .phjSelectData import phjGenerateCaseControlDataset
from .phjSelectData import phjGetCollapsedPatientDataframeColumns
| from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData import phjParseDateVar
from .phjCleanUKPostcodes import phjCleanUKPostcodeVariable
from .phjCleanUKPostcodes import phjPostcodeFormat7
from .phjExploreData import phjViewLogOdds
from .phjExploreData import phjCategoriseContinuousVariable
from .phjExtFuncs import getJenksBreaks
from .phjGetData import phjReadDataFromExcelNamedCellRange
from .phjGetDBData import phjGetDataFromDatabase
from .phjMatrices import phjBinaryVarsToSquareMatrix
from .phjMiscFuncs import phjGetStrFromArgOrFile
from .phjMiscFuncs import phjReadTextFromFile
from .phjMiscFuncs import phjCreateNamedGroupRegex
from .phjMiscFuncs import phjFindRegexNamedGroups
from .phjMiscFuncs import phjMaxLevelOfTaxonomicDetail
from .phjRROR import phjOddsRatio
from .phjRROR import phjRelativeRisk
from .phjSelectData import phjSelectCaseControlDataset
from .phjSelectData import phjGenerateCaseControlDataset
from .phjSelectData import phjCollapseOnPatientID
| Add phjCollapseOnPatientID and remove phjGetCollapsedPatientDataframeColumns | Add phjCollapseOnPatientID and remove phjGetCollapsedPatientDataframeColumns
| Python | mit | lvphj/epydemiology | python | ## Code Before:
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData import phjParseDateVar
from .phjCleanUKPostcodes import phjCleanUKPostcodeVariable
from .phjCleanUKPostcodes import phjPostcodeFormat7
from .phjExploreData import phjViewLogOdds
from .phjExploreData import phjCategoriseContinuousVariable
from .phjExtFuncs import getJenksBreaks
from .phjGetData import phjReadDataFromExcelNamedCellRange
from .phjGetDBData import phjGetDataFromDatabase
from .phjMatrices import phjBinaryVarsToSquareMatrix
from .phjMiscFuncs import phjGetStrFromArgOrFile
from .phjMiscFuncs import phjReadTextFromFile
from .phjMiscFuncs import phjCreateNamedGroupRegex
from .phjMiscFuncs import phjFindRegexNamedGroups
from .phjMiscFuncs import phjMaxLevelOfTaxonomicDetail
from .phjRROR import phjOddsRatio
from .phjRROR import phjRelativeRisk
from .phjSelectData import phjSelectCaseControlDataset
from .phjSelectData import phjGenerateCaseControlDataset
from .phjSelectData import phjGetCollapsedPatientDataframeColumns
## Instruction:
Add phjCollapseOnPatientID and remove phjGetCollapsedPatientDataframeColumns
## Code After:
from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData import phjParseDateVar
from .phjCleanUKPostcodes import phjCleanUKPostcodeVariable
from .phjCleanUKPostcodes import phjPostcodeFormat7
from .phjExploreData import phjViewLogOdds
from .phjExploreData import phjCategoriseContinuousVariable
from .phjExtFuncs import getJenksBreaks
from .phjGetData import phjReadDataFromExcelNamedCellRange
from .phjGetDBData import phjGetDataFromDatabase
from .phjMatrices import phjBinaryVarsToSquareMatrix
from .phjMiscFuncs import phjGetStrFromArgOrFile
from .phjMiscFuncs import phjReadTextFromFile
from .phjMiscFuncs import phjCreateNamedGroupRegex
from .phjMiscFuncs import phjFindRegexNamedGroups
from .phjMiscFuncs import phjMaxLevelOfTaxonomicDetail
from .phjRROR import phjOddsRatio
from .phjRROR import phjRelativeRisk
from .phjSelectData import phjSelectCaseControlDataset
from .phjSelectData import phjGenerateCaseControlDataset
from .phjSelectData import phjCollapseOnPatientID
| from .phjCalculateProportions import phjCalculateBinomialProportions
from .phjCalculateProportions import phjCalculateMultinomialProportions
from .phjCleanData import phjParseDateVar
from .phjCleanUKPostcodes import phjCleanUKPostcodeVariable
from .phjCleanUKPostcodes import phjPostcodeFormat7
from .phjExploreData import phjViewLogOdds
from .phjExploreData import phjCategoriseContinuousVariable
from .phjExtFuncs import getJenksBreaks
from .phjGetData import phjReadDataFromExcelNamedCellRange
from .phjGetDBData import phjGetDataFromDatabase
from .phjMatrices import phjBinaryVarsToSquareMatrix
from .phjMiscFuncs import phjGetStrFromArgOrFile
from .phjMiscFuncs import phjReadTextFromFile
from .phjMiscFuncs import phjCreateNamedGroupRegex
from .phjMiscFuncs import phjFindRegexNamedGroups
from .phjMiscFuncs import phjMaxLevelOfTaxonomicDetail
from .phjRROR import phjOddsRatio
from .phjRROR import phjRelativeRisk
from .phjSelectData import phjSelectCaseControlDataset
from .phjSelectData import phjGenerateCaseControlDataset
- from .phjSelectData import phjGetCollapsedPatientDataframeColumns
? --- ^ ---------------
+ from .phjSelectData import phjCollapseOnPatientID
? ^^ +
+ | 3 | 0.096774 | 2 | 1 |
b4d40d935309d99d8fd11ab0b950a52969f9c447 | .github/workflows/createPost.yaml | .github/workflows/createPost.yaml | name: Create post
on:
issues:
types:
- opened
- reopened
- edited
jobs:
add-post:
name: Add post
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Get issue
uses: actions/github-script@v4
id: get-issue
with:
script: |
console.log(context)
const body = context.payload.issue.body
return body
result-encoding: string
- name: Create pr
env:
TITLE: ${{ github.event.issues.title }}
BODY: ${{ github.event.issues.body }}
NAME: "issue-" + $TITLE
run: |
# echo "${{steps.get-issue.outputs.result}}" > test/result.txt
echo "$BODY" > POST.TXT
- name: Push changes
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
git add .
git commit -m "add test"
git checkout -b testIssue
git push --set-upstream origin testIssue
git pull
| name: Create post
on:
issues:
types:
- opened
- reopened
- edited
jobs:
add-post:
name: Add post
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Create pr
env:
TITLE: ${{ github.event.issues.title }}
| Remove extra code in workflow | Remove extra code in workflow
| YAML | mit | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | yaml | ## Code Before:
name: Create post
on:
issues:
types:
- opened
- reopened
- edited
jobs:
add-post:
name: Add post
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Get issue
uses: actions/github-script@v4
id: get-issue
with:
script: |
console.log(context)
const body = context.payload.issue.body
return body
result-encoding: string
- name: Create pr
env:
TITLE: ${{ github.event.issues.title }}
BODY: ${{ github.event.issues.body }}
NAME: "issue-" + $TITLE
run: |
# echo "${{steps.get-issue.outputs.result}}" > test/result.txt
echo "$BODY" > POST.TXT
- name: Push changes
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
git add .
git commit -m "add test"
git checkout -b testIssue
git push --set-upstream origin testIssue
git pull
## Instruction:
Remove extra code in workflow
## Code After:
name: Create post
on:
issues:
types:
- opened
- reopened
- edited
jobs:
add-post:
name: Add post
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Create pr
env:
TITLE: ${{ github.event.issues.title }}
| name: Create post
on:
issues:
types:
- opened
- reopened
- edited
jobs:
add-post:
name: Add post
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- - name: Get issue
- uses: actions/github-script@v4
- id: get-issue
- with:
- script: |
- console.log(context)
- const body = context.payload.issue.body
- return body
- result-encoding: string
- name: Create pr
env:
TITLE: ${{ github.event.issues.title }}
- BODY: ${{ github.event.issues.body }}
- NAME: "issue-" + $TITLE
- run: |
- # echo "${{steps.get-issue.outputs.result}}" > test/result.txt
- echo "$BODY" > POST.TXT
- - name: Push changes
- env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: |
- git config --global user.name github-actions
- git config --global user.email github-actions@github.com
- git add .
- git commit -m "add test"
- git checkout -b testIssue
- git push --set-upstream origin testIssue
- git pull | 25 | 0.520833 | 0 | 25 |
cfdbb26fa02c929271dda092571b69c08d184cc7 | test-support/src/main/resources/application.yml | test-support/src/main/resources/application.yml | ---
applications:
root: ../../java-test-applications
distZip:
location: ${applications.root}/dist-zip-application
prefix: dist-zip-application-
ejb:
enabled: false
location: ${applications.root}/ejb-application
prefix: ejb-application-
groovy:
location: ${applications.root}/groovy-application
prefix: groovy-application-
javaMain:
location: ${applications.root}/java-main-application
prefix: java-main-application-
ratpack:
location: ${applications.root}/ratpack-application
prefix: ratpack-application-
springBootCli:
location: ${applications.root}/spring-boot-cli-application
prefix: spring-boot-cli-application-
springBootCliJar:
location: ${applications.root}/spring-boot-cli-jar-application
prefix: spring-boot-cli-jar-application-
web:
location: ${applications.root}/web-application
prefix: web-application-
webServlet2:
location: ${applications.root}/web-servlet-2-application
prefix: web-servlet-2-application-
services:
mongodb:
name: test-mongodb
service: mlab
plan: sandbox
mysql:
name: test-mysql
service: cleardb
plan: boost
postgresql:
name: test-postgresql
service: elephantsql
plan: panda
rabbitmq:
name: test-rabbitmq
service: cloudamqp
plan: lemur
redis:
name: test-redis
service: rediscloud
plan: 30mb
| ---
applications:
root: ../../java-test-applications
distZip:
location: ${applications.root}/dist-zip-application
prefix: dist-zip-application-
ejb:
enabled: false
location: ${applications.root}/ejb-application
prefix: ejb-application-
groovy:
location: ${applications.root}/groovy-application
prefix: groovy-application-
javaMain:
location: ${applications.root}/java-main-application
prefix: java-main-application-
ratpack:
location: ${applications.root}/ratpack-application
prefix: ratpack-application-
springBootCli:
location: ${applications.root}/spring-boot-cli-application
prefix: spring-boot-cli-application-
springBootCliJar:
location: ${applications.root}/spring-boot-cli-jar-application
prefix: spring-boot-cli-jar-application-
web:
location: ${applications.root}/web-application
prefix: web-application-
webServlet2:
location: ${applications.root}/web-servlet-2-application
prefix: web-servlet-2-application-
services:
mongodb:
name: test-mongodb
service: mlab
plan: sandbox
mysql:
name: test-mysql
service: p-mysql
plan: 100mb
postgresql:
name: test-postgresql
service: elephantsql
plan: panda
rabbitmq:
name: test-rabbitmq
service: cloudamqp
plan: lemur
redis:
name: test-redis
service: rediscloud
plan: 30mb
| Allow RGB env instead of PWS | Allow RGB env instead of PWS
| YAML | apache-2.0 | cloudfoundry/java-buildpack-system-test,cloudfoundry/java-buildpack-system-test | yaml | ## Code Before:
---
applications:
root: ../../java-test-applications
distZip:
location: ${applications.root}/dist-zip-application
prefix: dist-zip-application-
ejb:
enabled: false
location: ${applications.root}/ejb-application
prefix: ejb-application-
groovy:
location: ${applications.root}/groovy-application
prefix: groovy-application-
javaMain:
location: ${applications.root}/java-main-application
prefix: java-main-application-
ratpack:
location: ${applications.root}/ratpack-application
prefix: ratpack-application-
springBootCli:
location: ${applications.root}/spring-boot-cli-application
prefix: spring-boot-cli-application-
springBootCliJar:
location: ${applications.root}/spring-boot-cli-jar-application
prefix: spring-boot-cli-jar-application-
web:
location: ${applications.root}/web-application
prefix: web-application-
webServlet2:
location: ${applications.root}/web-servlet-2-application
prefix: web-servlet-2-application-
services:
mongodb:
name: test-mongodb
service: mlab
plan: sandbox
mysql:
name: test-mysql
service: cleardb
plan: boost
postgresql:
name: test-postgresql
service: elephantsql
plan: panda
rabbitmq:
name: test-rabbitmq
service: cloudamqp
plan: lemur
redis:
name: test-redis
service: rediscloud
plan: 30mb
## Instruction:
Allow RGB env instead of PWS
## Code After:
---
applications:
root: ../../java-test-applications
distZip:
location: ${applications.root}/dist-zip-application
prefix: dist-zip-application-
ejb:
enabled: false
location: ${applications.root}/ejb-application
prefix: ejb-application-
groovy:
location: ${applications.root}/groovy-application
prefix: groovy-application-
javaMain:
location: ${applications.root}/java-main-application
prefix: java-main-application-
ratpack:
location: ${applications.root}/ratpack-application
prefix: ratpack-application-
springBootCli:
location: ${applications.root}/spring-boot-cli-application
prefix: spring-boot-cli-application-
springBootCliJar:
location: ${applications.root}/spring-boot-cli-jar-application
prefix: spring-boot-cli-jar-application-
web:
location: ${applications.root}/web-application
prefix: web-application-
webServlet2:
location: ${applications.root}/web-servlet-2-application
prefix: web-servlet-2-application-
services:
mongodb:
name: test-mongodb
service: mlab
plan: sandbox
mysql:
name: test-mysql
service: p-mysql
plan: 100mb
postgresql:
name: test-postgresql
service: elephantsql
plan: panda
rabbitmq:
name: test-rabbitmq
service: cloudamqp
plan: lemur
redis:
name: test-redis
service: rediscloud
plan: 30mb
| ---
applications:
root: ../../java-test-applications
distZip:
location: ${applications.root}/dist-zip-application
prefix: dist-zip-application-
ejb:
enabled: false
location: ${applications.root}/ejb-application
prefix: ejb-application-
groovy:
location: ${applications.root}/groovy-application
prefix: groovy-application-
javaMain:
location: ${applications.root}/java-main-application
prefix: java-main-application-
ratpack:
location: ${applications.root}/ratpack-application
prefix: ratpack-application-
springBootCli:
location: ${applications.root}/spring-boot-cli-application
prefix: spring-boot-cli-application-
springBootCliJar:
location: ${applications.root}/spring-boot-cli-jar-application
prefix: spring-boot-cli-jar-application-
web:
location: ${applications.root}/web-application
prefix: web-application-
webServlet2:
location: ${applications.root}/web-servlet-2-application
prefix: web-servlet-2-application-
services:
mongodb:
name: test-mongodb
service: mlab
plan: sandbox
mysql:
name: test-mysql
- service: cleardb
+ service: p-mysql
- plan: boost
? ----
+ plan: 100mb
? ++++
postgresql:
name: test-postgresql
service: elephantsql
plan: panda
rabbitmq:
name: test-rabbitmq
service: cloudamqp
plan: lemur
redis:
name: test-redis
service: rediscloud
plan: 30mb | 4 | 0.075472 | 2 | 2 |
1dd23a737782ee407ec939e22f20d76c53baf301 | functions/fish_right_prompt.fish | functions/fish_right_prompt.fish | function fish_right_prompt
if status --is-interactive
set -l __paradox_date (command date +%I:%M:%S%P ^/dev/null)
if type ruby >/dev/null ^/dev/null
# have to use the echo inline to prevent obnoxious spaces, i.e. (💎2.3.0 )
set __paradox_rb_version (echo -s "(💎 " (command ruby -e 'print RUBY_VERSION' ^/dev/null) ")")
end
# The \e[1A code below is to move the prompt up a line, so it aligns with the first line of the lprompt.
# The \e[1B code resets to the previous line, so everything renders properly
echo -se "\e[1A" (set_color blue) "$__paradox_rb_version" (set_color green) (__paradox_command_duration) (set_color normal) "[$__paradox_date]" "\e[1B"
end
end
| function fish_right_prompt
if status --is-interactive
set -l __paradox_date (command date +%I:%M:%S%P ^/dev/null)
if type ruby >/dev/null ^/dev/null
# have to use the echo inline to prevent obnoxious spaces, i.e. (💎 2.3.0 )
set __paradox_rb_version (echo -s "(💎 " (command ruby -e 'print RUBY_VERSION' ^/dev/null) ")")
end
echo -se (set_color blue) "$__paradox_rb_version" (set_color green) (__paradox_command_duration) (set_color normal) "[$__paradox_date]"
end
end
| Remove cursor control characters from right prompt | Remove cursor control characters from right prompt
They were fucking up the prompt when it was only 1 line long, as opposed to being 2 lines.
| fish | mit | paradox460/paradox-theme | fish | ## Code Before:
function fish_right_prompt
if status --is-interactive
set -l __paradox_date (command date +%I:%M:%S%P ^/dev/null)
if type ruby >/dev/null ^/dev/null
# have to use the echo inline to prevent obnoxious spaces, i.e. (💎2.3.0 )
set __paradox_rb_version (echo -s "(💎 " (command ruby -e 'print RUBY_VERSION' ^/dev/null) ")")
end
# The \e[1A code below is to move the prompt up a line, so it aligns with the first line of the lprompt.
# The \e[1B code resets to the previous line, so everything renders properly
echo -se "\e[1A" (set_color blue) "$__paradox_rb_version" (set_color green) (__paradox_command_duration) (set_color normal) "[$__paradox_date]" "\e[1B"
end
end
## Instruction:
Remove cursor control characters from right prompt
They were fucking up the prompt when it was only 1 line long, as opposed to being 2 lines.
## Code After:
function fish_right_prompt
if status --is-interactive
set -l __paradox_date (command date +%I:%M:%S%P ^/dev/null)
if type ruby >/dev/null ^/dev/null
# have to use the echo inline to prevent obnoxious spaces, i.e. (💎 2.3.0 )
set __paradox_rb_version (echo -s "(💎 " (command ruby -e 'print RUBY_VERSION' ^/dev/null) ")")
end
echo -se (set_color blue) "$__paradox_rb_version" (set_color green) (__paradox_command_duration) (set_color normal) "[$__paradox_date]"
end
end
| function fish_right_prompt
if status --is-interactive
set -l __paradox_date (command date +%I:%M:%S%P ^/dev/null)
if type ruby >/dev/null ^/dev/null
- # have to use the echo inline to prevent obnoxious spaces, i.e. (💎2.3.0 )
+ # have to use the echo inline to prevent obnoxious spaces, i.e. (💎 2.3.0 )
? +
set __paradox_rb_version (echo -s "(💎 " (command ruby -e 'print RUBY_VERSION' ^/dev/null) ")")
end
- # The \e[1A code below is to move the prompt up a line, so it aligns with the first line of the lprompt.
- # The \e[1B code resets to the previous line, so everything renders properly
- echo -se "\e[1A" (set_color blue) "$__paradox_rb_version" (set_color green) (__paradox_command_duration) (set_color normal) "[$__paradox_date]" "\e[1B"
? -------- ---------
+ echo -se (set_color blue) "$__paradox_rb_version" (set_color green) (__paradox_command_duration) (set_color normal) "[$__paradox_date]"
end
end | 6 | 0.461538 | 2 | 4 |
0badf7efeb05a25c718ca7006b34d0f8f081d7df | _posts/2015-09-21-testing_for_tls_12.markdown | _posts/2015-09-21-testing_for_tls_12.markdown | ---
title: Testing for TLS 1.2
layout: post
date: 2015-09-21
---
iOS 9 requires all `NSURLConnection` connections to support TLS 1.2. So I needed to check my servers to see if this was indeed configured. After looking around a bit I was able to find that you could test for this using `openssl`.
On OS X with homebrew you can test with this command:
```
/usr/local/Cellar/openssl/1.0.2d_1/bin/openssl s_client -tls1_2 -connect www.codeography.com:443
```
If you have linux (with a new enough `openssl`) or have overridden the system `openssl` on OS X you can just leave off the full path:
```
openssl s_client -tls1_2 -connect www.codeography.com:443
```
If it is supported you'll see the Certificate chain as well as some information about the connection. The bit I was looking for was "Protocol: TLSv1.2"
Looked something like this:
```
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
SSL-Session:
Protocol : TLSv1.2
TLS session ticket lifetime hint: 1200 (seconds)
```
| ---
title: Testing for TLS 1.2
layout: post
date: 2015-09-21
---
iOS 9 requires all `NSURLConnection` connections to [support TLS 1.2](https://developer.apple.com/library/ios/technotes/tn2287/_index.html). So I needed to check my servers to see if this was indeed configured. After looking around a bit I was able to find that you could test for this using `openssl`.
On OS X with homebrew you can test with this command:
```
/usr/local/Cellar/openssl/1.0.2d_1/bin/openssl s_client -tls1_2 -connect www.codeography.com:443
```
If you have linux (with a new enough `openssl`) or have overridden the system `openssl` on OS X you can just leave off the full path:
```
openssl s_client -tls1_2 -connect www.codeography.com:443
```
If it is supported you'll see the Certificate chain as well as some information about the connection. The bit I was looking for was "Protocol: TLSv1.2"
Looked something like this:
```
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
SSL-Session:
Protocol : TLSv1.2
TLS session ticket lifetime hint: 1200 (seconds)
```
| Add link to tech note | Add link to tech note
| Markdown | mit | csexton/csexton.github.com,csexton/csexton.github.com | markdown | ## Code Before:
---
title: Testing for TLS 1.2
layout: post
date: 2015-09-21
---
iOS 9 requires all `NSURLConnection` connections to support TLS 1.2. So I needed to check my servers to see if this was indeed configured. After looking around a bit I was able to find that you could test for this using `openssl`.
On OS X with homebrew you can test with this command:
```
/usr/local/Cellar/openssl/1.0.2d_1/bin/openssl s_client -tls1_2 -connect www.codeography.com:443
```
If you have linux (with a new enough `openssl`) or have overridden the system `openssl` on OS X you can just leave off the full path:
```
openssl s_client -tls1_2 -connect www.codeography.com:443
```
If it is supported you'll see the Certificate chain as well as some information about the connection. The bit I was looking for was "Protocol: TLSv1.2"
Looked something like this:
```
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
SSL-Session:
Protocol : TLSv1.2
TLS session ticket lifetime hint: 1200 (seconds)
```
## Instruction:
Add link to tech note
## Code After:
---
title: Testing for TLS 1.2
layout: post
date: 2015-09-21
---
iOS 9 requires all `NSURLConnection` connections to [support TLS 1.2](https://developer.apple.com/library/ios/technotes/tn2287/_index.html). So I needed to check my servers to see if this was indeed configured. After looking around a bit I was able to find that you could test for this using `openssl`.
On OS X with homebrew you can test with this command:
```
/usr/local/Cellar/openssl/1.0.2d_1/bin/openssl s_client -tls1_2 -connect www.codeography.com:443
```
If you have linux (with a new enough `openssl`) or have overridden the system `openssl` on OS X you can just leave off the full path:
```
openssl s_client -tls1_2 -connect www.codeography.com:443
```
If it is supported you'll see the Certificate chain as well as some information about the connection. The bit I was looking for was "Protocol: TLSv1.2"
Looked something like this:
```
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
SSL-Session:
Protocol : TLSv1.2
TLS session ticket lifetime hint: 1200 (seconds)
```
| ---
title: Testing for TLS 1.2
layout: post
date: 2015-09-21
---
- iOS 9 requires all `NSURLConnection` connections to support TLS 1.2. So I needed to check my servers to see if this was indeed configured. After looking around a bit I was able to find that you could test for this using `openssl`.
+ iOS 9 requires all `NSURLConnection` connections to [support TLS 1.2](https://developer.apple.com/library/ios/technotes/tn2287/_index.html). So I needed to check my servers to see if this was indeed configured. After looking around a bit I was able to find that you could test for this using `openssl`.
? + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On OS X with homebrew you can test with this command:
```
/usr/local/Cellar/openssl/1.0.2d_1/bin/openssl s_client -tls1_2 -connect www.codeography.com:443
```
If you have linux (with a new enough `openssl`) or have overridden the system `openssl` on OS X you can just leave off the full path:
```
openssl s_client -tls1_2 -connect www.codeography.com:443
```
If it is supported you'll see the Certificate chain as well as some information about the connection. The bit I was looking for was "Protocol: TLSv1.2"
Looked something like this:
```
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
SSL-Session:
Protocol : TLSv1.2
TLS session ticket lifetime hint: 1200 (seconds)
``` | 2 | 0.066667 | 1 | 1 |
b7eabf3c366fc1e8e62ac3c137de1f9227e220a4 | app/models/answer.rb | app/models/answer.rb | class Answer < ActiveRecord::Base
belongs_to :question
belongs_to :user
has_many :comments, as: :commentable
has_many :votes, as: :votable
validates_presence_of :content, :question_id, :user_id
end
| class Answer < ActiveRecord::Base
belongs_to :question
belongs_to :user
has_many :comments, as: :commentable
has_many :votes, as: :votable
validates_presence_of :content, :question_id, :user_id
def score
count = 0
self.votes.each do |vote|
count = count + vote.status
end
count
end
end
| Add score method to Answer model | Add score method to Answer model
| Ruby | mit | Ricky-Thomas/mac_overflow,Ricky-Thomas/mac_overflow,Ricky-Thomas/mac_overflow | ruby | ## Code Before:
class Answer < ActiveRecord::Base
belongs_to :question
belongs_to :user
has_many :comments, as: :commentable
has_many :votes, as: :votable
validates_presence_of :content, :question_id, :user_id
end
## Instruction:
Add score method to Answer model
## Code After:
class Answer < ActiveRecord::Base
belongs_to :question
belongs_to :user
has_many :comments, as: :commentable
has_many :votes, as: :votable
validates_presence_of :content, :question_id, :user_id
def score
count = 0
self.votes.each do |vote|
count = count + vote.status
end
count
end
end
| class Answer < ActiveRecord::Base
belongs_to :question
belongs_to :user
has_many :comments, as: :commentable
has_many :votes, as: :votable
validates_presence_of :content, :question_id, :user_id
-
+ def score
+ count = 0
+ self.votes.each do |vote|
+ count = count + vote.status
+ end
+ count
+ end
end | 8 | 0.8 | 7 | 1 |
73f952ca83ab548b0e88d7c53d1e26214c4d018e | bin/deploy.sh | bin/deploy.sh | set -e
# host=s3://dev.mockbrian.com/squiggle
# host=s3://mockbrian.com/squiggle
host=s3://squiggle-lang.org
# host=s3://dev.squiggle-lang.org
./bin/build-js.sh
bundle exec jekyll build
# Shouldn't need to sleep here, but if jekyll watch/serve is running, there's a
# timing issue here where jekyll will delete the _site directory after the file
# is gzipped but before it's uploaded.
sleep 3
gzip _site/try/bundle.js
ls -lh _site/try/bundle.js.gz
s3cmd put \
--mime-type="application/javascript" \
--add-header="Content-Encoding: gzip" \
--acl-public \
--no-progress \
"_site/try/bundle.js.gz" \
"$host/try/bundle.js"
s3cmd sync \
--no-mime-magic \
--acl-public \
--no-progress \
--exclude="try/bundle.js.gz" \
"_site/" \
"$host/"
| set -e
# host=s3://dev.mockbrian.com/squiggle
# host=s3://mockbrian.com/squiggle
host=s3://squiggle-lang.org
# host=s3://dev.squiggle-lang.org
./bin/build-js.sh
bundle exec jekyll build
# Shouldn't need to sleep here, but if jekyll watch/serve is running, there's a
# timing issue here where jekyll will delete the _site directory after the file
# is gzipped but before it's uploaded.
sleep 3
gzip <_site/try/bundle.js >_site/try/bundle.js.gz
ls -lh _site/try/bundle.js.gz
s3cmd put \
--mime-type="application/javascript" \
--add-header="Content-Encoding: gzip" \
--acl-public \
--no-progress \
"_site/try/bundle.js.gz" \
"$host/try/bundle.js"
s3cmd sync \
--no-mime-magic \
--acl-public \
--no-progress \
--exclude="try/bundle.js.gz" \
"_site/" \
"$host/"
| Stop removing the unzipped version | Stop removing the unzipped version
| Shell | mit | squiggle-lang/squiggle-lang.org,squiggle-lang/squiggle-lang.org,squiggle-lang/squiggle-lang.org,squiggle-lang/squiggle-lang.org,wavebeem/website-squiggle,wavebeem/website-squiggle,wavebeem/website-squiggle,wavebeem/website-squiggle | shell | ## Code Before:
set -e
# host=s3://dev.mockbrian.com/squiggle
# host=s3://mockbrian.com/squiggle
host=s3://squiggle-lang.org
# host=s3://dev.squiggle-lang.org
./bin/build-js.sh
bundle exec jekyll build
# Shouldn't need to sleep here, but if jekyll watch/serve is running, there's a
# timing issue here where jekyll will delete the _site directory after the file
# is gzipped but before it's uploaded.
sleep 3
gzip _site/try/bundle.js
ls -lh _site/try/bundle.js.gz
s3cmd put \
--mime-type="application/javascript" \
--add-header="Content-Encoding: gzip" \
--acl-public \
--no-progress \
"_site/try/bundle.js.gz" \
"$host/try/bundle.js"
s3cmd sync \
--no-mime-magic \
--acl-public \
--no-progress \
--exclude="try/bundle.js.gz" \
"_site/" \
"$host/"
## Instruction:
Stop removing the unzipped version
## Code After:
set -e
# host=s3://dev.mockbrian.com/squiggle
# host=s3://mockbrian.com/squiggle
host=s3://squiggle-lang.org
# host=s3://dev.squiggle-lang.org
./bin/build-js.sh
bundle exec jekyll build
# Shouldn't need to sleep here, but if jekyll watch/serve is running, there's a
# timing issue here where jekyll will delete the _site directory after the file
# is gzipped but before it's uploaded.
sleep 3
gzip <_site/try/bundle.js >_site/try/bundle.js.gz
ls -lh _site/try/bundle.js.gz
s3cmd put \
--mime-type="application/javascript" \
--add-header="Content-Encoding: gzip" \
--acl-public \
--no-progress \
"_site/try/bundle.js.gz" \
"$host/try/bundle.js"
s3cmd sync \
--no-mime-magic \
--acl-public \
--no-progress \
--exclude="try/bundle.js.gz" \
"_site/" \
"$host/"
| set -e
# host=s3://dev.mockbrian.com/squiggle
# host=s3://mockbrian.com/squiggle
host=s3://squiggle-lang.org
# host=s3://dev.squiggle-lang.org
./bin/build-js.sh
bundle exec jekyll build
# Shouldn't need to sleep here, but if jekyll watch/serve is running, there's a
# timing issue here where jekyll will delete the _site directory after the file
# is gzipped but before it's uploaded.
sleep 3
- gzip _site/try/bundle.js
+ gzip <_site/try/bundle.js >_site/try/bundle.js.gz
ls -lh _site/try/bundle.js.gz
s3cmd put \
--mime-type="application/javascript" \
--add-header="Content-Encoding: gzip" \
--acl-public \
--no-progress \
"_site/try/bundle.js.gz" \
"$host/try/bundle.js"
s3cmd sync \
--no-mime-magic \
--acl-public \
--no-progress \
--exclude="try/bundle.js.gz" \
"_site/" \
"$host/"
| 2 | 0.057143 | 1 | 1 |
45b0c85350d3a75dceb53b37afe619f5c50df02b | app/controllers/carto/api/received_notifications_controller.rb | app/controllers/carto/api/received_notifications_controller.rb |
module Carto
module Api
class ReceivedNotificationsController < ::Api::ApplicationController
include Carto::ControllerHelper
extend Carto::DefaultRescueFroms
ssl_required :update
before_filter :only_owner
before_filter :load_notification, only: [:update]
setup_default_rescues
def update
changed_notification = params[:notification]
if changed_notification
read_at = changed_notification[:read_at]
@received_notification.read_at = DateTime.parse(read_at) if read_at
@received_notification.save!
end
render_jsonp ReceivedNotificationPresenter.new(@received_notification).to_hash
rescue ArgumentError => e
render_jsonp({ errors: { read_at: 'invalid date format' } }, 422)
CartoDB::Logger.warning(exception: e)
end
private
def only_owner
unless current_user.id == params[:user_id]
raise Carto::UnauthorizedError.new('Can only access own notifications')
end
end
def load_notification
@received_notification = ReceivedNotification.where(user_id: current_user.id, id: params[:id]).first!
end
end
end
end
|
module Carto
module Api
class ReceivedNotificationsController < ::Api::ApplicationController
include Carto::ControllerHelper
extend Carto::DefaultRescueFroms
ssl_required :update
before_filter :load_user
before_filter :load_notification, only: [:update]
setup_default_rescues
def update
changed_notification = params[:notification]
if changed_notification
read_at = changed_notification[:read_at]
@received_notification.read_at = DateTime.parse(read_at) if read_at
@received_notification.save!
end
render_jsonp ReceivedNotificationPresenter.new(@received_notification).to_hash
rescue ArgumentError => e
render_jsonp({ errors: { read_at: 'invalid date format' } }, 422)
CartoDB::Logger.warning(exception: e)
end
private
def load_user
@user = Carto::User.find(current_user.id)
raise Carto::UnauthorizedError.new('Can only access own notifications') unless @user.id == params[:user_id]
end
def load_notification
@received_notification = @user.received_notifications.find(params[:id])
end
end
end
end
| Revert "Avoid loading user model" | Revert "Avoid loading user model"
This reverts commit 0990bf5b67d84cb5559145a80c811442233a5676.
| Ruby | bsd-3-clause | splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb | ruby | ## Code Before:
module Carto
module Api
class ReceivedNotificationsController < ::Api::ApplicationController
include Carto::ControllerHelper
extend Carto::DefaultRescueFroms
ssl_required :update
before_filter :only_owner
before_filter :load_notification, only: [:update]
setup_default_rescues
def update
changed_notification = params[:notification]
if changed_notification
read_at = changed_notification[:read_at]
@received_notification.read_at = DateTime.parse(read_at) if read_at
@received_notification.save!
end
render_jsonp ReceivedNotificationPresenter.new(@received_notification).to_hash
rescue ArgumentError => e
render_jsonp({ errors: { read_at: 'invalid date format' } }, 422)
CartoDB::Logger.warning(exception: e)
end
private
def only_owner
unless current_user.id == params[:user_id]
raise Carto::UnauthorizedError.new('Can only access own notifications')
end
end
def load_notification
@received_notification = ReceivedNotification.where(user_id: current_user.id, id: params[:id]).first!
end
end
end
end
## Instruction:
Revert "Avoid loading user model"
This reverts commit 0990bf5b67d84cb5559145a80c811442233a5676.
## Code After:
module Carto
module Api
class ReceivedNotificationsController < ::Api::ApplicationController
include Carto::ControllerHelper
extend Carto::DefaultRescueFroms
ssl_required :update
before_filter :load_user
before_filter :load_notification, only: [:update]
setup_default_rescues
def update
changed_notification = params[:notification]
if changed_notification
read_at = changed_notification[:read_at]
@received_notification.read_at = DateTime.parse(read_at) if read_at
@received_notification.save!
end
render_jsonp ReceivedNotificationPresenter.new(@received_notification).to_hash
rescue ArgumentError => e
render_jsonp({ errors: { read_at: 'invalid date format' } }, 422)
CartoDB::Logger.warning(exception: e)
end
private
def load_user
@user = Carto::User.find(current_user.id)
raise Carto::UnauthorizedError.new('Can only access own notifications') unless @user.id == params[:user_id]
end
def load_notification
@received_notification = @user.received_notifications.find(params[:id])
end
end
end
end
|
module Carto
module Api
class ReceivedNotificationsController < ::Api::ApplicationController
include Carto::ControllerHelper
extend Carto::DefaultRescueFroms
ssl_required :update
- before_filter :only_owner
? ^^^ ^^^
+ before_filter :load_user
? + ^^ ^^
before_filter :load_notification, only: [:update]
setup_default_rescues
def update
changed_notification = params[:notification]
if changed_notification
read_at = changed_notification[:read_at]
@received_notification.read_at = DateTime.parse(read_at) if read_at
@received_notification.save!
end
render_jsonp ReceivedNotificationPresenter.new(@received_notification).to_hash
rescue ArgumentError => e
render_jsonp({ errors: { read_at: 'invalid date format' } }, 422)
CartoDB::Logger.warning(exception: e)
end
private
- def only_owner
- unless current_user.id == params[:user_id]
+ def load_user
+ @user = Carto::User.find(current_user.id)
- raise Carto::UnauthorizedError.new('Can only access own notifications')
? --
+ raise Carto::UnauthorizedError.new('Can only access own notifications') unless @user.id == params[:user_id]
? ++++++++++++++++++++++++++++++++++++
- end
end
def load_notification
- @received_notification = ReceivedNotification.where(user_id: current_user.id, id: params[:id]).first!
+ @received_notification = @user.received_notifications.find(params[:id])
end
end
end
end | 11 | 0.255814 | 5 | 6 |
05bcb9b85ea2f754484aac2375d2584b3c47033f | README.md | README.md | xmltree-rs
==========
[Documention](https://eminence.github.io/xmltree-rs/doc/xmltree/index.html)
A small library for parsing an XML file into an in-memory tree structure.
Not recommended for large XML files, as it will load the entire file into memory.
https://crates.io/crates/xmltree
## Usage
Add the following to your `Cargo.toml` file:
```toml
[dependencies]
xmltree = "0.7"
```
and this to yoru crate root:
```rust
extern crate xmltree;
```
## Example
See the documentation for the latest version:
https://docs.rs/xmltree/
| xmltree-rs
==========
[Documention](https://docs.rs/xmltree/)
A small library for parsing an XML file into an in-memory tree structure.
Not recommended for large XML files, as it will load the entire file into memory.
https://crates.io/crates/xmltree
## Usage
Add the following to your `Cargo.toml` file:
```toml
[dependencies]
xmltree = "0.7"
```
and this to yoru crate root:
```rust
extern crate xmltree;
```
## Example
See the documentation for the latest version:
https://docs.rs/xmltree/
| Update doc URL in readme | Update doc URL in readme
| Markdown | mit | eminence/xmltree-rs | markdown | ## Code Before:
xmltree-rs
==========
[Documention](https://eminence.github.io/xmltree-rs/doc/xmltree/index.html)
A small library for parsing an XML file into an in-memory tree structure.
Not recommended for large XML files, as it will load the entire file into memory.
https://crates.io/crates/xmltree
## Usage
Add the following to your `Cargo.toml` file:
```toml
[dependencies]
xmltree = "0.7"
```
and this to yoru crate root:
```rust
extern crate xmltree;
```
## Example
See the documentation for the latest version:
https://docs.rs/xmltree/
## Instruction:
Update doc URL in readme
## Code After:
xmltree-rs
==========
[Documention](https://docs.rs/xmltree/)
A small library for parsing an XML file into an in-memory tree structure.
Not recommended for large XML files, as it will load the entire file into memory.
https://crates.io/crates/xmltree
## Usage
Add the following to your `Cargo.toml` file:
```toml
[dependencies]
xmltree = "0.7"
```
and this to yoru crate root:
```rust
extern crate xmltree;
```
## Example
See the documentation for the latest version:
https://docs.rs/xmltree/
| xmltree-rs
==========
- [Documention](https://eminence.github.io/xmltree-rs/doc/xmltree/index.html)
+ [Documention](https://docs.rs/xmltree/)
A small library for parsing an XML file into an in-memory tree structure.
Not recommended for large XML files, as it will load the entire file into memory.
https://crates.io/crates/xmltree
## Usage
Add the following to your `Cargo.toml` file:
```toml
[dependencies]
xmltree = "0.7"
```
and this to yoru crate root:
```rust
extern crate xmltree;
```
## Example
See the documentation for the latest version:
https://docs.rs/xmltree/ | 2 | 0.064516 | 1 | 1 |
7fee9b3c541aa37d1730a536243e0b184b8805dc | README.md | README.md | scotch-cli
==========
Node-based shipping tool
| > The Scotch command line interface.
Install this globally and you'll have access to the `scotch` command anywhere on your system.
```shell
npm install -g scotch-cli
```
**Note:** The job of the `scotch` command is to load and run the version of Scotch you have installed locally to your project, irrespective of its version.
## Shell tab auto-completion
To enable tab auto-completion for Scotch, add one of the following lines to your `~/.bashrc` or `~/.zshrc` file.
```bash
# Bash, ~/.bashrc
eval "$(scotch --completion=bash)"
```
```bash
# Zsh, ~/.zshrc
eval "$(scotch --completion=zsh)"
```
## Installing scotch-cli locally
If you prefer the idiomatic Node.js method to get started with a project (`npm install && npm test`) then install scotch-cli locally with `npm install scotch-cli --save-dev`. Then add a script to your `package.json` to run the associated scotch command: `"scripts": { "test": "scotch test" } `. Now `npm test` will use the locally installed `./node_modules/.bin/scotch` executable to run your Scotch commands.
To read more about npm scripts, please visit the npm docs: [https://npmjs.org/doc/misc/npm-scripts.html](https://npmjs.org/doc/misc/npm-scripts.html). | Add readme from grunt-cli since we're based on that. | Add readme from grunt-cli since we're based on that.
| Markdown | mit | ericmann/scotch-cli | markdown | ## Code Before:
scotch-cli
==========
Node-based shipping tool
## Instruction:
Add readme from grunt-cli since we're based on that.
## Code After:
> The Scotch command line interface.
Install this globally and you'll have access to the `scotch` command anywhere on your system.
```shell
npm install -g scotch-cli
```
**Note:** The job of the `scotch` command is to load and run the version of Scotch you have installed locally to your project, irrespective of its version.
## Shell tab auto-completion
To enable tab auto-completion for Scotch, add one of the following lines to your `~/.bashrc` or `~/.zshrc` file.
```bash
# Bash, ~/.bashrc
eval "$(scotch --completion=bash)"
```
```bash
# Zsh, ~/.zshrc
eval "$(scotch --completion=zsh)"
```
## Installing scotch-cli locally
If you prefer the idiomatic Node.js method to get started with a project (`npm install && npm test`) then install scotch-cli locally with `npm install scotch-cli --save-dev`. Then add a script to your `package.json` to run the associated scotch command: `"scripts": { "test": "scotch test" } `. Now `npm test` will use the locally installed `./node_modules/.bin/scotch` executable to run your Scotch commands.
To read more about npm scripts, please visit the npm docs: [https://npmjs.org/doc/misc/npm-scripts.html](https://npmjs.org/doc/misc/npm-scripts.html). | + > The Scotch command line interface.
- scotch-cli
- ==========
- Node-based shipping tool
+ Install this globally and you'll have access to the `scotch` command anywhere on your system.
+
+ ```shell
+ npm install -g scotch-cli
+ ```
+
+ **Note:** The job of the `scotch` command is to load and run the version of Scotch you have installed locally to your project, irrespective of its version.
+
+ ## Shell tab auto-completion
+ To enable tab auto-completion for Scotch, add one of the following lines to your `~/.bashrc` or `~/.zshrc` file.
+
+ ```bash
+ # Bash, ~/.bashrc
+ eval "$(scotch --completion=bash)"
+ ```
+
+ ```bash
+ # Zsh, ~/.zshrc
+ eval "$(scotch --completion=zsh)"
+ ```
+
+ ## Installing scotch-cli locally
+ If you prefer the idiomatic Node.js method to get started with a project (`npm install && npm test`) then install scotch-cli locally with `npm install scotch-cli --save-dev`. Then add a script to your `package.json` to run the associated scotch command: `"scripts": { "test": "scotch test" } `. Now `npm test` will use the locally installed `./node_modules/.bin/scotch` executable to run your Scotch commands.
+
+ To read more about npm scripts, please visit the npm docs: [https://npmjs.org/doc/misc/npm-scripts.html](https://npmjs.org/doc/misc/npm-scripts.html). | 29 | 7.25 | 26 | 3 |
f4d58854ca2ace649bf644d80cad19d4b3b857bc | src/nih_wayfinding/app/scripts/views/locations/locations-controller.js | src/nih_wayfinding/app/scripts/views/locations/locations-controller.js | (function () {
'use strict';
/* ngInject */
function LocationsController($scope, $state, Geocoder, NavbarConfig, Notifications, ProfileService) {
var ctl = this;
initialize();
function initialize() {
ctl.findAddressExpanded = false;
ctl.user = ProfileService.getCurrentUser();
ctl.gridOptions = ctl.user.locations;
ctl.optionClicked = optionClicked;
ctl.search = search;
ctl.suggest = Geocoder.suggest;
var title = ctl.user.username ? ctl.user.username : 'Profile';
NavbarConfig.set({
title: title,
back: false
});
}
function optionClicked(option) {
loadRoute(option.feature);
}
function onGeocoderResponse(data) {
if (data && data.length) {
loadRoute(data[0]);
} else {
Notifications.show({
text: 'Unable to find the selected address. Please try a different one.',
timeout: 3000
});
}
}
function search(searchText, magicKey) {
Geocoder.search(searchText, magicKey).then(onGeocoderResponse);
}
function loadRoute(feature) {
var destination = [
feature.geometry.x,
feature.geometry.y
].join(',');
$state.go('routing', {destination: destination});
}
}
angular.module('nih.views.locations')
.controller('LocationsController', LocationsController);
})();
| (function () {
'use strict';
/* ngInject */
function LocationsController($scope, $state, Geocoder, NavbarConfig, Notifications, ProfileService) {
var ctl = this;
initialize();
function initialize() {
ctl.findAddressExpanded = false;
ctl.user = ProfileService.getCurrentUser();
ctl.gridOptions = ctl.user.locations;
ctl.optionClicked = optionClicked;
ctl.search = search;
ctl.suggest = Geocoder.suggest;
var title = ctl.user.username ? ctl.user.username : 'Profile';
NavbarConfig.set({
title: title,
back: false
});
}
function optionClicked(option) {
loadRoute(option.feature);
}
function search(searchText, magicKey) {
Geocoder.search(searchText, magicKey).then(function(data) {
loadRoute(data[0]);
}, function(error) {
Notifications.show({
text: error,
timeout: 3000
});
});
}
function loadRoute(feature) {
var destination = [
feature.geometry.x,
feature.geometry.y
].join(',');
$state.go('routing', {destination: destination});
}
}
angular.module('nih.views.locations')
.controller('LocationsController', LocationsController);
})();
| Use geocoder reject message in non-profile address search | Use geocoder reject message in non-profile address search
| JavaScript | apache-2.0 | azavea/nih-wayfinding,azavea/nih-wayfinding | javascript | ## Code Before:
(function () {
'use strict';
/* ngInject */
function LocationsController($scope, $state, Geocoder, NavbarConfig, Notifications, ProfileService) {
var ctl = this;
initialize();
function initialize() {
ctl.findAddressExpanded = false;
ctl.user = ProfileService.getCurrentUser();
ctl.gridOptions = ctl.user.locations;
ctl.optionClicked = optionClicked;
ctl.search = search;
ctl.suggest = Geocoder.suggest;
var title = ctl.user.username ? ctl.user.username : 'Profile';
NavbarConfig.set({
title: title,
back: false
});
}
function optionClicked(option) {
loadRoute(option.feature);
}
function onGeocoderResponse(data) {
if (data && data.length) {
loadRoute(data[0]);
} else {
Notifications.show({
text: 'Unable to find the selected address. Please try a different one.',
timeout: 3000
});
}
}
function search(searchText, magicKey) {
Geocoder.search(searchText, magicKey).then(onGeocoderResponse);
}
function loadRoute(feature) {
var destination = [
feature.geometry.x,
feature.geometry.y
].join(',');
$state.go('routing', {destination: destination});
}
}
angular.module('nih.views.locations')
.controller('LocationsController', LocationsController);
})();
## Instruction:
Use geocoder reject message in non-profile address search
## Code After:
(function () {
'use strict';
/* ngInject */
function LocationsController($scope, $state, Geocoder, NavbarConfig, Notifications, ProfileService) {
var ctl = this;
initialize();
function initialize() {
ctl.findAddressExpanded = false;
ctl.user = ProfileService.getCurrentUser();
ctl.gridOptions = ctl.user.locations;
ctl.optionClicked = optionClicked;
ctl.search = search;
ctl.suggest = Geocoder.suggest;
var title = ctl.user.username ? ctl.user.username : 'Profile';
NavbarConfig.set({
title: title,
back: false
});
}
function optionClicked(option) {
loadRoute(option.feature);
}
function search(searchText, magicKey) {
Geocoder.search(searchText, magicKey).then(function(data) {
loadRoute(data[0]);
}, function(error) {
Notifications.show({
text: error,
timeout: 3000
});
});
}
function loadRoute(feature) {
var destination = [
feature.geometry.x,
feature.geometry.y
].join(',');
$state.go('routing', {destination: destination});
}
}
angular.module('nih.views.locations')
.controller('LocationsController', LocationsController);
})();
| (function () {
'use strict';
/* ngInject */
function LocationsController($scope, $state, Geocoder, NavbarConfig, Notifications, ProfileService) {
var ctl = this;
initialize();
function initialize() {
ctl.findAddressExpanded = false;
ctl.user = ProfileService.getCurrentUser();
ctl.gridOptions = ctl.user.locations;
ctl.optionClicked = optionClicked;
ctl.search = search;
ctl.suggest = Geocoder.suggest;
var title = ctl.user.username ? ctl.user.username : 'Profile';
NavbarConfig.set({
title: title,
back: false
});
}
function optionClicked(option) {
loadRoute(option.feature);
}
- function onGeocoderResponse(data) {
- if (data && data.length) {
+ function search(searchText, magicKey) {
+ Geocoder.search(searchText, magicKey).then(function(data) {
loadRoute(data[0]);
- } else {
+ }, function(error) {
Notifications.show({
- text: 'Unable to find the selected address. Please try a different one.',
+ text: error,
timeout: 3000
});
- }
+ });
? ++
- }
-
- function search(searchText, magicKey) {
- Geocoder.search(searchText, magicKey).then(onGeocoderResponse);
}
function loadRoute(feature) {
var destination = [
feature.geometry.x,
feature.geometry.y
].join(',');
$state.go('routing', {destination: destination});
}
}
angular.module('nih.views.locations')
.controller('LocationsController', LocationsController);
})(); | 14 | 0.254545 | 5 | 9 |
6b50e4f5530a814f5520bb762982f1dd9d8dd045 | develop.dockerfile | develop.dockerfile | FROM postgres:9.4
MAINTAINER Hendrikx ITC
RUN apt-get update
RUN apt-get install -y make patch libpq-dev postgresql-server-dev-9.4
ADD https://github.com/hendrikx-itc/db-deps/archive/274f0f3300077a859426912337ffc04983663ff3.tar.gz /db-deps.tar.gz
RUN mkdir /db-deps
RUN tar -xzvf /db-deps.tar.gz -C /db-deps --strip-components=1
ADD scripts /minerva
ADD tests /tests
ADD https://github.com/theory/pgtap/archive/master.tar.gz /pgtap.tar.gz
RUN mkdir /pgtap
RUN tar -xzvf /pgtap.tar.gz -C /pgtap --strip-components=1
RUN cd /pgtap && make && make install
RUN PERL_MM_USE_DEFAULT=1 cpan TAP::Parser::SourceHandler::pgTAP
COPY docker-resources/run-tests /usr/bin/
COPY docker-resources/create-minerva-database /usr/bin/
COPY docker-resources/drop-minerva-database /usr/bin/
COPY docker-resources/recreate-minerva-database /usr/bin/
ADD init-minerva-db.sh /docker-entrypoint-initdb.d/
| FROM postgres:9.4
MAINTAINER Hendrikx ITC
RUN apt-get update
RUN apt-get install -y make patch libpq-dev postgresql-server-dev-9.4
ADD https://github.com/hendrikx-itc/db-deps/archive/7cd7beb062093cff389eb6761fab84bab3f7e285.tar.gz /db-deps.tar.gz
RUN mkdir /db-deps
RUN tar -xzvf /db-deps.tar.gz -C /db-deps --strip-components=1
ADD scripts /minerva
ADD tests /tests
ADD https://github.com/theory/pgtap/archive/master.tar.gz /pgtap.tar.gz
RUN mkdir /pgtap
RUN tar -xzvf /pgtap.tar.gz -C /pgtap --strip-components=1
RUN cd /pgtap && make && make install
RUN PERL_MM_USE_DEFAULT=1 cpan TAP::Parser::SourceHandler::pgTAP
COPY docker-resources/run-tests /usr/bin/
COPY docker-resources/create-minerva-database /usr/bin/
COPY docker-resources/drop-minerva-database /usr/bin/
COPY docker-resources/recreate-minerva-database /usr/bin/
ADD init-minerva-db.sh /docker-entrypoint-initdb.d/
| Use version of db-deps with fixes in dependency tree | Use version of db-deps with fixes in dependency tree
| Dockerfile | agpl-3.0 | hendrikx-itc/minerva,hendrikx-itc/minerva | dockerfile | ## Code Before:
FROM postgres:9.4
MAINTAINER Hendrikx ITC
RUN apt-get update
RUN apt-get install -y make patch libpq-dev postgresql-server-dev-9.4
ADD https://github.com/hendrikx-itc/db-deps/archive/274f0f3300077a859426912337ffc04983663ff3.tar.gz /db-deps.tar.gz
RUN mkdir /db-deps
RUN tar -xzvf /db-deps.tar.gz -C /db-deps --strip-components=1
ADD scripts /minerva
ADD tests /tests
ADD https://github.com/theory/pgtap/archive/master.tar.gz /pgtap.tar.gz
RUN mkdir /pgtap
RUN tar -xzvf /pgtap.tar.gz -C /pgtap --strip-components=1
RUN cd /pgtap && make && make install
RUN PERL_MM_USE_DEFAULT=1 cpan TAP::Parser::SourceHandler::pgTAP
COPY docker-resources/run-tests /usr/bin/
COPY docker-resources/create-minerva-database /usr/bin/
COPY docker-resources/drop-minerva-database /usr/bin/
COPY docker-resources/recreate-minerva-database /usr/bin/
ADD init-minerva-db.sh /docker-entrypoint-initdb.d/
## Instruction:
Use version of db-deps with fixes in dependency tree
## Code After:
FROM postgres:9.4
MAINTAINER Hendrikx ITC
RUN apt-get update
RUN apt-get install -y make patch libpq-dev postgresql-server-dev-9.4
ADD https://github.com/hendrikx-itc/db-deps/archive/7cd7beb062093cff389eb6761fab84bab3f7e285.tar.gz /db-deps.tar.gz
RUN mkdir /db-deps
RUN tar -xzvf /db-deps.tar.gz -C /db-deps --strip-components=1
ADD scripts /minerva
ADD tests /tests
ADD https://github.com/theory/pgtap/archive/master.tar.gz /pgtap.tar.gz
RUN mkdir /pgtap
RUN tar -xzvf /pgtap.tar.gz -C /pgtap --strip-components=1
RUN cd /pgtap && make && make install
RUN PERL_MM_USE_DEFAULT=1 cpan TAP::Parser::SourceHandler::pgTAP
COPY docker-resources/run-tests /usr/bin/
COPY docker-resources/create-minerva-database /usr/bin/
COPY docker-resources/drop-minerva-database /usr/bin/
COPY docker-resources/recreate-minerva-database /usr/bin/
ADD init-minerva-db.sh /docker-entrypoint-initdb.d/
| FROM postgres:9.4
MAINTAINER Hendrikx ITC
RUN apt-get update
RUN apt-get install -y make patch libpq-dev postgresql-server-dev-9.4
- ADD https://github.com/hendrikx-itc/db-deps/archive/274f0f3300077a859426912337ffc04983663ff3.tar.gz /db-deps.tar.gz
+ ADD https://github.com/hendrikx-itc/db-deps/archive/7cd7beb062093cff389eb6761fab84bab3f7e285.tar.gz /db-deps.tar.gz
RUN mkdir /db-deps
RUN tar -xzvf /db-deps.tar.gz -C /db-deps --strip-components=1
ADD scripts /minerva
ADD tests /tests
ADD https://github.com/theory/pgtap/archive/master.tar.gz /pgtap.tar.gz
RUN mkdir /pgtap
RUN tar -xzvf /pgtap.tar.gz -C /pgtap --strip-components=1
RUN cd /pgtap && make && make install
RUN PERL_MM_USE_DEFAULT=1 cpan TAP::Parser::SourceHandler::pgTAP
COPY docker-resources/run-tests /usr/bin/
COPY docker-resources/create-minerva-database /usr/bin/
COPY docker-resources/drop-minerva-database /usr/bin/
COPY docker-resources/recreate-minerva-database /usr/bin/
ADD init-minerva-db.sh /docker-entrypoint-initdb.d/ | 2 | 0.076923 | 1 | 1 |
cb33141dc6882d032a3edb51d6bf03d26a396db1 | src/main/java/com/worldcretornica/plotme_abstractgenerator/bukkit/BukkitBlockRepresentation.java | src/main/java/com/worldcretornica/plotme_abstractgenerator/bukkit/BukkitBlockRepresentation.java | package com.worldcretornica.plotme_abstractgenerator.bukkit;
public class BukkitBlockRepresentation {
private final short id;
private final byte data;
public BukkitBlockRepresentation(short id, byte value) {
this.id = id;
this.data = value;
}
public BukkitBlockRepresentation(String idValue) {
this(getBlockId(idValue), getBlockData(idValue));
}
public static byte getBlockId(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[0]);
} else {
return Byte.parseByte(idValue);
}
}
public static byte getBlockData(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[1]);
} else {
return 0;
}
}
public short getId() {
return id;
}
public byte getData() {
return data;
}
}
| package com.worldcretornica.plotme_abstractgenerator.bukkit;
public class BukkitBlockRepresentation {
private final short id;
private final byte data;
public BukkitBlockRepresentation(short id, byte value) {
this.id = id;
this.data = value;
}
public BukkitBlockRepresentation(String idValue) {
this(getBlockId(idValue), getBlockData(idValue));
}
public static short getBlockId(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Short.parseShort(idValue.split(":")[0]);
} else {
return Short.parseShort(idValue);
}
}
public static byte getBlockData(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[1]);
} else {
return 0;
}
}
public short getId() {
return id;
}
public byte getData() {
return data;
}
}
| Use short instead of bytes for block id | Use short instead of bytes for block id
| Java | mit | WorldCretornica/PlotMe-AbstractGenerator | java | ## Code Before:
package com.worldcretornica.plotme_abstractgenerator.bukkit;
public class BukkitBlockRepresentation {
private final short id;
private final byte data;
public BukkitBlockRepresentation(short id, byte value) {
this.id = id;
this.data = value;
}
public BukkitBlockRepresentation(String idValue) {
this(getBlockId(idValue), getBlockData(idValue));
}
public static byte getBlockId(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[0]);
} else {
return Byte.parseByte(idValue);
}
}
public static byte getBlockData(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[1]);
} else {
return 0;
}
}
public short getId() {
return id;
}
public byte getData() {
return data;
}
}
## Instruction:
Use short instead of bytes for block id
## Code After:
package com.worldcretornica.plotme_abstractgenerator.bukkit;
public class BukkitBlockRepresentation {
private final short id;
private final byte data;
public BukkitBlockRepresentation(short id, byte value) {
this.id = id;
this.data = value;
}
public BukkitBlockRepresentation(String idValue) {
this(getBlockId(idValue), getBlockData(idValue));
}
public static short getBlockId(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Short.parseShort(idValue.split(":")[0]);
} else {
return Short.parseShort(idValue);
}
}
public static byte getBlockData(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[1]);
} else {
return 0;
}
}
public short getId() {
return id;
}
public byte getData() {
return data;
}
}
| package com.worldcretornica.plotme_abstractgenerator.bukkit;
public class BukkitBlockRepresentation {
private final short id;
private final byte data;
public BukkitBlockRepresentation(short id, byte value) {
this.id = id;
this.data = value;
}
public BukkitBlockRepresentation(String idValue) {
this(getBlockId(idValue), getBlockData(idValue));
}
- public static byte getBlockId(String idValue) throws NumberFormatException {
? ^^ -
+ public static short getBlockId(String idValue) throws NumberFormatException {
? ^^^^
if (idValue.indexOf(":") > 0) {
- return Byte.parseByte(idValue.split(":")[0]);
? ^^ - ^^ -
+ return Short.parseShort(idValue.split(":")[0]);
? ^^^^ ^^^^
} else {
- return Byte.parseByte(idValue);
? ^^ - ^^ -
+ return Short.parseShort(idValue);
? ^^^^ ^^^^
}
}
public static byte getBlockData(String idValue) throws NumberFormatException {
if (idValue.indexOf(":") > 0) {
return Byte.parseByte(idValue.split(":")[1]);
} else {
return 0;
}
}
public short getId() {
return id;
}
public byte getData() {
return data;
}
} | 6 | 0.146341 | 3 | 3 |
de87201d73f584025a72e1133dd5ed6eb1cfbc50 | todo/2.0.5 | todo/2.0.5 | SHOW STOPPERS
====================
- Windows Segfaults
- MANIFEST verifications
- rt.cpan.org PRs
NICE TO HAVE
=============
- Smolder, https://issues.apache.org/jira/browse/INFRA-1612
| SHOW STOPPERS
====================
- Windows Segfaults [needs windows developer owner, ]
- MANIFEST verifications [needs detail, ]
- rt.cpan.org PRs [pgollucci, phred, ]
- ModPerl::Bootstrap to handle the unknown mp generation PRS?
- Ship Apache::Test 1.31 official [phred, ]
NICE TO HAVE
=============
- Smolder, https://issues.apache.org/jira/browse/INFRA-1612 [pgollucci, ]
| Add some questions, add Apache::Test 1.31 goal, add current devs who have starting working on those issues. | Add some questions, add Apache::Test 1.31 goal, add current devs who have
starting working on those issues.
git-svn-id: b4be4a41b2a3352907de631eb6da1671a2f7b614@659866 13f79535-47bb-0310-9956-ffa450edef68
| Groff | apache-2.0 | Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl | groff | ## Code Before:
SHOW STOPPERS
====================
- Windows Segfaults
- MANIFEST verifications
- rt.cpan.org PRs
NICE TO HAVE
=============
- Smolder, https://issues.apache.org/jira/browse/INFRA-1612
## Instruction:
Add some questions, add Apache::Test 1.31 goal, add current devs who have
starting working on those issues.
git-svn-id: b4be4a41b2a3352907de631eb6da1671a2f7b614@659866 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
SHOW STOPPERS
====================
- Windows Segfaults [needs windows developer owner, ]
- MANIFEST verifications [needs detail, ]
- rt.cpan.org PRs [pgollucci, phred, ]
- ModPerl::Bootstrap to handle the unknown mp generation PRS?
- Ship Apache::Test 1.31 official [phred, ]
NICE TO HAVE
=============
- Smolder, https://issues.apache.org/jira/browse/INFRA-1612 [pgollucci, ]
| SHOW STOPPERS
====================
- - Windows Segfaults
- - MANIFEST verifications
- - rt.cpan.org PRs
+ - Windows Segfaults [needs windows developer owner, ]
+ - MANIFEST verifications [needs detail, ]
+ - rt.cpan.org PRs [pgollucci, phred, ]
+ - ModPerl::Bootstrap to handle the unknown mp generation PRS?
+ - Ship Apache::Test 1.31 official [phred, ]
NICE TO HAVE
=============
- - Smolder, https://issues.apache.org/jira/browse/INFRA-1612
+ - Smolder, https://issues.apache.org/jira/browse/INFRA-1612 [pgollucci, ]
? ++++++++++++++
| 10 | 0.909091 | 6 | 4 |
9e809908b42b8c45ec2c79e9b19a7674d2392114 | com.github.sormuras.bach/src/main/java/com/github/sormuras/bach/internal/ModuleLayerSupport.java | com.github.sormuras.bach/src/main/java/com/github/sormuras/bach/internal/ModuleLayerSupport.java | package com.github.sormuras.bach.internal;
import static java.lang.ModuleLayer.defineModulesWithOneLoader;
import static java.lang.module.Configuration.resolveAndBind;
import com.github.sormuras.bach.Bach;
import java.lang.module.ModuleFinder;
import java.util.List;
import java.util.Set;
public interface ModuleLayerSupport {
static ModuleLayer layer(ModuleFinder finder, boolean assertions, String... roots) {
var parentClassLoader = Bach.class.getClassLoader();
var parentModuleLayer = ModuleLayer.boot();
var parents = List.of(parentModuleLayer.configuration());
var configuration = resolveAndBind(ModuleFinder.of(), parents, finder, Set.of(roots));
var layers = List.of(parentModuleLayer);
var controller = defineModulesWithOneLoader(configuration, layers, parentClassLoader);
var layer = controller.layer();
if (assertions) for (var root : roots) layer.findLoader(root).setDefaultAssertionStatus(true);
return layer;
}
}
| package com.github.sormuras.bach.internal;
import static java.lang.ModuleLayer.defineModulesWithOneLoader;
import static java.lang.module.Configuration.resolveAndBind;
import java.lang.module.ModuleFinder;
import java.util.List;
import java.util.Set;
public interface ModuleLayerSupport {
static ModuleLayer layer(ModuleFinder finder, boolean assertions, String... roots) {
var parentClassLoader = ModuleLayerSupport.class.getClassLoader();
var parentModuleLayer = ModuleLayer.boot();
var parents = List.of(parentModuleLayer.configuration());
var configuration = resolveAndBind(ModuleFinder.of(), parents, finder, Set.of(roots));
var layers = List.of(parentModuleLayer);
var controller = defineModulesWithOneLoader(configuration, layers, parentClassLoader);
var layer = controller.layer();
if (assertions) for (var root : roots) layer.findLoader(root).setDefaultAssertionStatus(true);
return layer;
}
}
| Use local class to determine parent loader | Use local class to determine parent loader
| Java | mit | sormuras/bach,sormuras/bach | java | ## Code Before:
package com.github.sormuras.bach.internal;
import static java.lang.ModuleLayer.defineModulesWithOneLoader;
import static java.lang.module.Configuration.resolveAndBind;
import com.github.sormuras.bach.Bach;
import java.lang.module.ModuleFinder;
import java.util.List;
import java.util.Set;
public interface ModuleLayerSupport {
static ModuleLayer layer(ModuleFinder finder, boolean assertions, String... roots) {
var parentClassLoader = Bach.class.getClassLoader();
var parentModuleLayer = ModuleLayer.boot();
var parents = List.of(parentModuleLayer.configuration());
var configuration = resolveAndBind(ModuleFinder.of(), parents, finder, Set.of(roots));
var layers = List.of(parentModuleLayer);
var controller = defineModulesWithOneLoader(configuration, layers, parentClassLoader);
var layer = controller.layer();
if (assertions) for (var root : roots) layer.findLoader(root).setDefaultAssertionStatus(true);
return layer;
}
}
## Instruction:
Use local class to determine parent loader
## Code After:
package com.github.sormuras.bach.internal;
import static java.lang.ModuleLayer.defineModulesWithOneLoader;
import static java.lang.module.Configuration.resolveAndBind;
import java.lang.module.ModuleFinder;
import java.util.List;
import java.util.Set;
public interface ModuleLayerSupport {
static ModuleLayer layer(ModuleFinder finder, boolean assertions, String... roots) {
var parentClassLoader = ModuleLayerSupport.class.getClassLoader();
var parentModuleLayer = ModuleLayer.boot();
var parents = List.of(parentModuleLayer.configuration());
var configuration = resolveAndBind(ModuleFinder.of(), parents, finder, Set.of(roots));
var layers = List.of(parentModuleLayer);
var controller = defineModulesWithOneLoader(configuration, layers, parentClassLoader);
var layer = controller.layer();
if (assertions) for (var root : roots) layer.findLoader(root).setDefaultAssertionStatus(true);
return layer;
}
}
| package com.github.sormuras.bach.internal;
import static java.lang.ModuleLayer.defineModulesWithOneLoader;
import static java.lang.module.Configuration.resolveAndBind;
- import com.github.sormuras.bach.Bach;
import java.lang.module.ModuleFinder;
import java.util.List;
import java.util.Set;
public interface ModuleLayerSupport {
static ModuleLayer layer(ModuleFinder finder, boolean assertions, String... roots) {
- var parentClassLoader = Bach.class.getClassLoader();
? ^ ^^
+ var parentClassLoader = ModuleLayerSupport.class.getClassLoader();
? ^^^^^^^ ^^^^^^^^^^
var parentModuleLayer = ModuleLayer.boot();
var parents = List.of(parentModuleLayer.configuration());
var configuration = resolveAndBind(ModuleFinder.of(), parents, finder, Set.of(roots));
var layers = List.of(parentModuleLayer);
var controller = defineModulesWithOneLoader(configuration, layers, parentClassLoader);
var layer = controller.layer();
if (assertions) for (var root : roots) layer.findLoader(root).setDefaultAssertionStatus(true);
return layer;
}
} | 3 | 0.130435 | 1 | 2 |
cefb09616458f1bbd85f1bac719f178472d3ff87 | README.md | README.md | Spotify CLI
# Requirements
See requirements.txt
You will need libspotify, libffi-dev and libasound2-dev installed. Use your distribution's package manager.
You will need a Spotify Premium account.
# Development
1. Create python3.4+ virtualenv
2. Acquire a spotify application key from https://devaccount.spotify.com/my-account/keys/
* Download the Binary key file
3. Create an ENV file containing these values:
* export SPOPPY_USERNAME=your-username
* export SPOPPY_PASSWORD=hunter2
* export SPOPPY_LIBSPOTIFY_APP_KEY=/path/to/spotify_appkey.key
4. Clone this project
5. Activate your virtualenv
6. Source your ENV file
7. Install requirements
* pip install -r requirements.txt
8. Run `python spoppy.py`
# DBus integration
1. Run `make install_dbus`
2. Make sure you have python-gobject2 installed
3. Symlink gobject (and possibly glib) to your virtualenv
* ln -s /usr/lib/python3.5/site-packages/gobject/ $VIRTUAL_ENV/lib/python3.5/site-packages/gobject
* ln -s /usr/lib/python3.5/site-packages/glib/ $VIRTUAL_ENV/lib/python3.5/site-packages/glib
4. The service will be available at "org/mpris/MediaPlayer2/spoppy" | Spotify CLI
# Requirements
See requirements.txt
You will need libspotify, libffi-dev and libasound2-dev installed. Use your distribution's package manager.
You will need a Spotify Premium account.
# Development
1. Create python3.4+ virtualenv
2. Acquire a spotify application key from https://devaccount.spotify.com/my-account/keys/
* Download the Binary key file
3. Create an ENV file containing these values:
* export SPOPPY_USERNAME=your-username
* export SPOPPY_PASSWORD=hunter2
* export SPOPPY_LIBSPOTIFY_APP_KEY=/path/to/spotify_appkey.key
4. Clone this project
5. Activate your virtualenv
6. Source your ENV file
7. Install requirements
* pip install -r requirements.txt
8. Run `python spoppy.py`
# DBus integration
1. Run `make install_dbus`
2. Make sure you have python-gobject2 installed
3. Symlink gobject (and possibly glib) to your virtualenv
* ln -s /usr/lib/python3.5/site-packages/gobject/ $VIRTUAL_ENV/lib/python3.5/site-packages/gobject
* ln -s /usr/lib/python3.5/site-packages/glib/ $VIRTUAL_ENV/lib/python3.5/site-packages/glib
4. The service will be available at "/com/spoppy" (f.x. `qdbus com.spoppy /com/spoppy com.spoppy.PlayPause`)
| Update readme to reflect new location of dbus | Update readme to reflect new location of dbus | Markdown | mit | sindrig/spoppy,sindrig/spoppy | markdown | ## Code Before:
Spotify CLI
# Requirements
See requirements.txt
You will need libspotify, libffi-dev and libasound2-dev installed. Use your distribution's package manager.
You will need a Spotify Premium account.
# Development
1. Create python3.4+ virtualenv
2. Acquire a spotify application key from https://devaccount.spotify.com/my-account/keys/
* Download the Binary key file
3. Create an ENV file containing these values:
* export SPOPPY_USERNAME=your-username
* export SPOPPY_PASSWORD=hunter2
* export SPOPPY_LIBSPOTIFY_APP_KEY=/path/to/spotify_appkey.key
4. Clone this project
5. Activate your virtualenv
6. Source your ENV file
7. Install requirements
* pip install -r requirements.txt
8. Run `python spoppy.py`
# DBus integration
1. Run `make install_dbus`
2. Make sure you have python-gobject2 installed
3. Symlink gobject (and possibly glib) to your virtualenv
* ln -s /usr/lib/python3.5/site-packages/gobject/ $VIRTUAL_ENV/lib/python3.5/site-packages/gobject
* ln -s /usr/lib/python3.5/site-packages/glib/ $VIRTUAL_ENV/lib/python3.5/site-packages/glib
4. The service will be available at "org/mpris/MediaPlayer2/spoppy"
## Instruction:
Update readme to reflect new location of dbus
## Code After:
Spotify CLI
# Requirements
See requirements.txt
You will need libspotify, libffi-dev and libasound2-dev installed. Use your distribution's package manager.
You will need a Spotify Premium account.
# Development
1. Create python3.4+ virtualenv
2. Acquire a spotify application key from https://devaccount.spotify.com/my-account/keys/
* Download the Binary key file
3. Create an ENV file containing these values:
* export SPOPPY_USERNAME=your-username
* export SPOPPY_PASSWORD=hunter2
* export SPOPPY_LIBSPOTIFY_APP_KEY=/path/to/spotify_appkey.key
4. Clone this project
5. Activate your virtualenv
6. Source your ENV file
7. Install requirements
* pip install -r requirements.txt
8. Run `python spoppy.py`
# DBus integration
1. Run `make install_dbus`
2. Make sure you have python-gobject2 installed
3. Symlink gobject (and possibly glib) to your virtualenv
* ln -s /usr/lib/python3.5/site-packages/gobject/ $VIRTUAL_ENV/lib/python3.5/site-packages/gobject
* ln -s /usr/lib/python3.5/site-packages/glib/ $VIRTUAL_ENV/lib/python3.5/site-packages/glib
4. The service will be available at "/com/spoppy" (f.x. `qdbus com.spoppy /com/spoppy com.spoppy.PlayPause`)
| Spotify CLI
# Requirements
See requirements.txt
You will need libspotify, libffi-dev and libasound2-dev installed. Use your distribution's package manager.
You will need a Spotify Premium account.
# Development
1. Create python3.4+ virtualenv
2. Acquire a spotify application key from https://devaccount.spotify.com/my-account/keys/
* Download the Binary key file
3. Create an ENV file containing these values:
* export SPOPPY_USERNAME=your-username
* export SPOPPY_PASSWORD=hunter2
* export SPOPPY_LIBSPOTIFY_APP_KEY=/path/to/spotify_appkey.key
4. Clone this project
5. Activate your virtualenv
6. Source your ENV file
7. Install requirements
* pip install -r requirements.txt
8. Run `python spoppy.py`
# DBus integration
1. Run `make install_dbus`
2. Make sure you have python-gobject2 installed
3. Symlink gobject (and possibly glib) to your virtualenv
* ln -s /usr/lib/python3.5/site-packages/gobject/ $VIRTUAL_ENV/lib/python3.5/site-packages/gobject
* ln -s /usr/lib/python3.5/site-packages/glib/ $VIRTUAL_ENV/lib/python3.5/site-packages/glib
- 4. The service will be available at "org/mpris/MediaPlayer2/spoppy"
+ 4. The service will be available at "/com/spoppy" (f.x. `qdbus com.spoppy /com/spoppy com.spoppy.PlayPause`) | 2 | 0.0625 | 1 | 1 |
ffae6c6f7c935684a132b191b71bae1919ecffab | src/js/config/config.js | src/js/config/config.js | var url = require("url");
var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the UI is served.
apiURL: "../",
// Intervall of API request in ms
updateInterval: 5000,
// Local http server URI while tests run
localTestserverURI: {
address: "localhost",
port: 8181
},
version: ("@@TEAMCITY_UI_VERSION".indexOf("@@TEAMCITY") === -1) ?
"@@TEAMCITY_UI_VERSION" :
`${packageJSON.version}-SNAPSHOT`
};
if (process.env.GULP_ENV === "development") {
try {
var configDev = require("./config.dev");
config = Object.assign(config, configDev);
} catch (e) {
console.info("You could copy config.template.js to config.dev.js " +
"to enable a development configuration.");
}
}
// Convert relative URLs to absolute URLs for node-fetch
if (global.document != null) {
if (config.apiURL.indexOf(":") === -1) {
config.apiURL = url.resolve(
document.location.origin,
document.location.pathname + config.apiURL
);
}
}
module.exports = config;
| var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the UI is served.
apiURL: "../",
// Intervall of API request in ms
updateInterval: 5000,
// Local http server URI while tests run
localTestserverURI: {
address: "localhost",
port: 8181
},
version: ("@@TEAMCITY_UI_VERSION".indexOf("@@TEAMCITY") === -1) ?
"@@TEAMCITY_UI_VERSION" :
`${packageJSON.version}-SNAPSHOT`
};
if (process.env.GULP_ENV === "development") {
try {
var configDev = require("./config.dev");
config = Object.assign(config, configDev);
} catch (e) {
console.info("You could copy config.template.js to config.dev.js " +
"to enable a development configuration.");
}
}
module.exports = config;
| Revert "Convert relative apiURL paths to absolute paths" | Revert "Convert relative apiURL paths to absolute paths"
This reverts commit d4649622aecd8d1cae56963fd4f214acf45b0cf3.
| JavaScript | apache-2.0 | cribalik/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui | javascript | ## Code Before:
var url = require("url");
var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the UI is served.
apiURL: "../",
// Intervall of API request in ms
updateInterval: 5000,
// Local http server URI while tests run
localTestserverURI: {
address: "localhost",
port: 8181
},
version: ("@@TEAMCITY_UI_VERSION".indexOf("@@TEAMCITY") === -1) ?
"@@TEAMCITY_UI_VERSION" :
`${packageJSON.version}-SNAPSHOT`
};
if (process.env.GULP_ENV === "development") {
try {
var configDev = require("./config.dev");
config = Object.assign(config, configDev);
} catch (e) {
console.info("You could copy config.template.js to config.dev.js " +
"to enable a development configuration.");
}
}
// Convert relative URLs to absolute URLs for node-fetch
if (global.document != null) {
if (config.apiURL.indexOf(":") === -1) {
config.apiURL = url.resolve(
document.location.origin,
document.location.pathname + config.apiURL
);
}
}
module.exports = config;
## Instruction:
Revert "Convert relative apiURL paths to absolute paths"
This reverts commit d4649622aecd8d1cae56963fd4f214acf45b0cf3.
## Code After:
var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the UI is served.
apiURL: "../",
// Intervall of API request in ms
updateInterval: 5000,
// Local http server URI while tests run
localTestserverURI: {
address: "localhost",
port: 8181
},
version: ("@@TEAMCITY_UI_VERSION".indexOf("@@TEAMCITY") === -1) ?
"@@TEAMCITY_UI_VERSION" :
`${packageJSON.version}-SNAPSHOT`
};
if (process.env.GULP_ENV === "development") {
try {
var configDev = require("./config.dev");
config = Object.assign(config, configDev);
} catch (e) {
console.info("You could copy config.template.js to config.dev.js " +
"to enable a development configuration.");
}
}
module.exports = config;
| - var url = require("url");
var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the UI is served.
apiURL: "../",
// Intervall of API request in ms
updateInterval: 5000,
// Local http server URI while tests run
localTestserverURI: {
address: "localhost",
port: 8181
},
version: ("@@TEAMCITY_UI_VERSION".indexOf("@@TEAMCITY") === -1) ?
"@@TEAMCITY_UI_VERSION" :
`${packageJSON.version}-SNAPSHOT`
};
if (process.env.GULP_ENV === "development") {
try {
var configDev = require("./config.dev");
config = Object.assign(config, configDev);
} catch (e) {
console.info("You could copy config.template.js to config.dev.js " +
"to enable a development configuration.");
}
}
-
- // Convert relative URLs to absolute URLs for node-fetch
- if (global.document != null) {
- if (config.apiURL.indexOf(":") === -1) {
- config.apiURL = url.resolve(
- document.location.origin,
- document.location.pathname + config.apiURL
- );
- }
- }
-
module.exports = config; | 12 | 0.272727 | 0 | 12 |
a593e3d91726ee12024cf6ea08a683d37e7f7bc8 | brain/spec/lib/humanity_neuron_spec.rb | brain/spec/lib/humanity_neuron_spec.rb | require 'spec_helper'
require_relative '../../lib/humanity_neuron'
describe HumanityNeuron do
include NeuronMatchers
context "greetings" do
[
['Hello', 'Why hello there!'],
['hello', 'Why hello there!'],
['Hi', 'Why hello there!'],
['hi', 'Why hello there!'],
['Hi Adam', 'Why hello there!']
].each do |message_body, confidence, response|
it { should handle_message(message_body).with_confidence(1).and_respond_with(response) }
end
end
context "pleasantries" do
it { should handle_message('How are you?').with_confidence(1).and_respond_with("I'm fine thanks.") }
end
context "invalid messages" do
[nil, 'foo', 'highlight'].each do |message_body|
it { should handle_message(message_body).with_confidence(0) }
end
end
end
| require 'spec_helper'
require_relative '../../lib/humanity_neuron'
describe HumanityNeuron do
include NeuronMatchers
context "greetings" do
[
['Hello', 'Why hello there!'],
['hello', 'Why hello there!'],
['Hi', 'Why hello there!'],
['hi', 'Why hello there!'],
['Hi Adam', 'Why hello there!']
].each do |message_body, response|
it { should handle_message(message_body).with_confidence(1).and_respond_with(response) }
end
end
context "pleasantries" do
it { should handle_message('How are you?').with_confidence(1).and_respond_with("I'm fine thanks.") }
end
context "invalid messages" do
[nil, 'foo', 'highlight'].each do |message_body|
it { should handle_message(message_body).with_confidence(0) }
end
end
end
| Fix a bug in assertions | [BRAIN] Fix a bug in assertions | Ruby | agpl-3.0 | mojolingo/Adam.Snark.Rabbit,mojolingo/Adam.Snark.Rabbit,mojolingo/Adam.Snark.Rabbit,mojolingo/Adam.Snark.Rabbit | ruby | ## Code Before:
require 'spec_helper'
require_relative '../../lib/humanity_neuron'
describe HumanityNeuron do
include NeuronMatchers
context "greetings" do
[
['Hello', 'Why hello there!'],
['hello', 'Why hello there!'],
['Hi', 'Why hello there!'],
['hi', 'Why hello there!'],
['Hi Adam', 'Why hello there!']
].each do |message_body, confidence, response|
it { should handle_message(message_body).with_confidence(1).and_respond_with(response) }
end
end
context "pleasantries" do
it { should handle_message('How are you?').with_confidence(1).and_respond_with("I'm fine thanks.") }
end
context "invalid messages" do
[nil, 'foo', 'highlight'].each do |message_body|
it { should handle_message(message_body).with_confidence(0) }
end
end
end
## Instruction:
[BRAIN] Fix a bug in assertions
## Code After:
require 'spec_helper'
require_relative '../../lib/humanity_neuron'
describe HumanityNeuron do
include NeuronMatchers
context "greetings" do
[
['Hello', 'Why hello there!'],
['hello', 'Why hello there!'],
['Hi', 'Why hello there!'],
['hi', 'Why hello there!'],
['Hi Adam', 'Why hello there!']
].each do |message_body, response|
it { should handle_message(message_body).with_confidence(1).and_respond_with(response) }
end
end
context "pleasantries" do
it { should handle_message('How are you?').with_confidence(1).and_respond_with("I'm fine thanks.") }
end
context "invalid messages" do
[nil, 'foo', 'highlight'].each do |message_body|
it { should handle_message(message_body).with_confidence(0) }
end
end
end
| require 'spec_helper'
require_relative '../../lib/humanity_neuron'
describe HumanityNeuron do
include NeuronMatchers
context "greetings" do
[
['Hello', 'Why hello there!'],
['hello', 'Why hello there!'],
['Hi', 'Why hello there!'],
['hi', 'Why hello there!'],
['Hi Adam', 'Why hello there!']
- ].each do |message_body, confidence, response|
? ------------
+ ].each do |message_body, response|
it { should handle_message(message_body).with_confidence(1).and_respond_with(response) }
end
end
context "pleasantries" do
it { should handle_message('How are you?').with_confidence(1).and_respond_with("I'm fine thanks.") }
end
context "invalid messages" do
[nil, 'foo', 'highlight'].each do |message_body|
it { should handle_message(message_body).with_confidence(0) }
end
end
end | 2 | 0.068966 | 1 | 1 |
f581907321b60c1bfc0db9dff09b9028a8b7f0f6 | src/styles/theme.js | src/styles/theme.js | const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
};
export default theme;
| const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
sizes: {
mobileS: '320px',
mobileM: '375px',
mobileL: '425px',
tablet: '768px',
laptop: '1024px',
laptopL: '1440px',
desktop: '2560px',
},
};
export default theme;
| Add sizes to make it easier @medias | Add sizes to make it easier @medias
| JavaScript | mit | raulfdm/cv | javascript | ## Code Before:
const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
};
export default theme;
## Instruction:
Add sizes to make it easier @medias
## Code After:
const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
sizes: {
mobileS: '320px',
mobileM: '375px',
mobileL: '425px',
tablet: '768px',
laptop: '1024px',
laptopL: '1440px',
desktop: '2560px',
},
};
export default theme;
| const theme = {
color: {
grey: '#DDDDDD',
black: '#111111',
},
font: {
sans: `'Lora', sans-serif`,
serif: `'Raleway', serif`,
},
+ sizes: {
+ mobileS: '320px',
+ mobileM: '375px',
+ mobileL: '425px',
+ tablet: '768px',
+ laptop: '1024px',
+ laptopL: '1440px',
+ desktop: '2560px',
+ },
};
export default theme; | 9 | 0.75 | 9 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.