commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 5
4.84k
| subject
stringlengths 15
778
| message
stringlengths 16
6.86k
| lang
stringlengths 1
30
| license
stringclasses 13
values | repos
stringlengths 5
116k
| config
stringlengths 1
30
| content
stringlengths 105
8.72k
|
---|---|---|---|---|---|---|---|---|---|---|---|
edfd117d4c76ff14e3ab6d9a0bf580acf53264c2
|
app/assets/stylesheets/lib/_functions.scss
|
app/assets/stylesheets/lib/_functions.scss
|
@function u($multiplier) {
$baseline-number: 6;
@if $responsive == true {
@return 16 / ($multiplier * $baseline-number) + rem
}
@return $multiplier * $baseline-number + px
}
|
// function based on the vertical rhythm, used to calculate all proportions without visual clutter
//
// e.g. padding: u(1) u(2) u(3) u(1);
@function u($multiplier) {
$baseline-number: 6;
@if $responsive == true {
@return ($multiplier * $baseline-number) / 16 + rem
}
@return $multiplier * $baseline-number + px
}
|
Add comments to new function
|
Add comments to new function
|
SCSS
|
mit
|
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
|
scss
|
## Code Before:
@function u($multiplier) {
$baseline-number: 6;
@if $responsive == true {
@return 16 / ($multiplier * $baseline-number) + rem
}
@return $multiplier * $baseline-number + px
}
## Instruction:
Add comments to new function
## Code After:
// function based on the vertical rhythm, used to calculate all proportions without visual clutter
//
// e.g. padding: u(1) u(2) u(3) u(1);
@function u($multiplier) {
$baseline-number: 6;
@if $responsive == true {
@return ($multiplier * $baseline-number) / 16 + rem
}
@return $multiplier * $baseline-number + px
}
|
6ee05b36e9bc2df15eb145acab9da156fbca8d84
|
public/stylesheets/sass/_linear-gradient.scss
|
public/stylesheets/sass/_linear-gradient.scss
|
@mixin linear-gradient ($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $from, $to);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, $from), color-stop(1, $to));
}
|
@mixin linear-gradient ($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $from, $to); // FF3.6
background: -ms-linear-gradient(top, $from, $to); // IE10
background: -o-linear-gradient(top, $from, $to); // Opera 11.10+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, $from), color-stop(1, $to)); // Saf4+, Chrome
background: -webkit-linear-gradient(top, $from, $to); // Chrome 10+, Saf5.1+
background: linear-gradient(top, $from, $to);
}
|
Support more vendor specific linear-gradients
|
Support more vendor specific linear-gradients
|
SCSS
|
mit
|
thoughtbot/flutie,diraulo/flutie,diraulo/flutie,fs/styleguides,openeducation/flutie,openeducation/flutie,thoughtbot/flutie
|
scss
|
## Code Before:
@mixin linear-gradient ($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $from, $to);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, $from), color-stop(1, $to));
}
## Instruction:
Support more vendor specific linear-gradients
## Code After:
@mixin linear-gradient ($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $from, $to); // FF3.6
background: -ms-linear-gradient(top, $from, $to); // IE10
background: -o-linear-gradient(top, $from, $to); // Opera 11.10+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, $from), color-stop(1, $to)); // Saf4+, Chrome
background: -webkit-linear-gradient(top, $from, $to); // Chrome 10+, Saf5.1+
background: linear-gradient(top, $from, $to);
}
|
32fbe3dc4686e413886911f5d373137648f08614
|
packages/shim/src/index.js
|
packages/shim/src/index.js
|
/* eslint-disable global-require */
require('@webcomponents/template');
if (!window.customElements) require('@webcomponents/custom-elements');
if (!document.body.attachShadow) require('@webcomponents/shadydom');
require('@webcomponents/shadycss/scoping-shim.min');
require('@webcomponents/shadycss/apply-shim.min');
|
/* eslint-disable global-require */
require('@webcomponents/template');
if (!document.body.attachShadow) require('@webcomponents/shadydom');
if (!window.customElements) require('@webcomponents/custom-elements');
require('@webcomponents/shadycss/scoping-shim.min');
require('@webcomponents/shadycss/apply-shim.min');
|
Fix ShadyDOM before Custom Elements polyfill
|
Fix ShadyDOM before Custom Elements polyfill
|
JavaScript
|
mit
|
hybridsjs/hybrids
|
javascript
|
## Code Before:
/* eslint-disable global-require */
require('@webcomponents/template');
if (!window.customElements) require('@webcomponents/custom-elements');
if (!document.body.attachShadow) require('@webcomponents/shadydom');
require('@webcomponents/shadycss/scoping-shim.min');
require('@webcomponents/shadycss/apply-shim.min');
## Instruction:
Fix ShadyDOM before Custom Elements polyfill
## Code After:
/* eslint-disable global-require */
require('@webcomponents/template');
if (!document.body.attachShadow) require('@webcomponents/shadydom');
if (!window.customElements) require('@webcomponents/custom-elements');
require('@webcomponents/shadycss/scoping-shim.min');
require('@webcomponents/shadycss/apply-shim.min');
|
8cc4640490b7a1e28d322800b0df64005ab0e0ad
|
app/components/widgets/search-bar.scss
|
app/components/widgets/search-bar.scss
|
.search-bar-input {
width: calc(100% - 50px);
padding: 9px;
}
.filter-button {
position: absolute;
right: 17px;
.arrow {
&::before,
&::after {
left: 16px;
}
}
.search-filter {
z-index: 3;
padding: 4px 1em;
border: none;
width: 50px;
height: 39px;
.mdi-filter {
line-height: 30px;
}
type-icon {
margin-left: -6px;
img {
width: 20px;
height: 20px;
}
}
}
}
}
.popover-body {
.filtermenu {
min-width: 235px;
.list-group {
max-height: calc(100vh - 350px) !important;
}
}
}
|
.search-bar-input {
width: calc(100% - 50px);
padding: 9px;
}
.filter-button {
position: absolute;
right: 17px;
.arrow {
&::before,
&::after {
left: 16px;
}
&::after {
border-bottom-color: #eee;
}
}
.search-filter {
z-index: 3;
padding: 4px 1em;
border: none;
width: 50px;
height: 39px;
.mdi-filter {
line-height: 30px;
}
type-icon {
margin-left: -6px;
img {
width: 20px;
height: 20px;
}
}
}
}
}
.popover-body {
.filtermenu {
min-width: 235px;
.list-group {
max-height: calc(100vh - 350px) !important;
}
}
}
|
Adjust filter menu arrow color
|
Adjust filter menu arrow color
|
SCSS
|
apache-2.0
|
codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client
|
scss
|
## Code Before:
.search-bar-input {
width: calc(100% - 50px);
padding: 9px;
}
.filter-button {
position: absolute;
right: 17px;
.arrow {
&::before,
&::after {
left: 16px;
}
}
.search-filter {
z-index: 3;
padding: 4px 1em;
border: none;
width: 50px;
height: 39px;
.mdi-filter {
line-height: 30px;
}
type-icon {
margin-left: -6px;
img {
width: 20px;
height: 20px;
}
}
}
}
}
.popover-body {
.filtermenu {
min-width: 235px;
.list-group {
max-height: calc(100vh - 350px) !important;
}
}
}
## Instruction:
Adjust filter menu arrow color
## Code After:
.search-bar-input {
width: calc(100% - 50px);
padding: 9px;
}
.filter-button {
position: absolute;
right: 17px;
.arrow {
&::before,
&::after {
left: 16px;
}
&::after {
border-bottom-color: #eee;
}
}
.search-filter {
z-index: 3;
padding: 4px 1em;
border: none;
width: 50px;
height: 39px;
.mdi-filter {
line-height: 30px;
}
type-icon {
margin-left: -6px;
img {
width: 20px;
height: 20px;
}
}
}
}
}
.popover-body {
.filtermenu {
min-width: 235px;
.list-group {
max-height: calc(100vh - 350px) !important;
}
}
}
|
6b22784da2375fc24a790b8be87778479d176cdb
|
templates/bio.html
|
templates/bio.html
|
{% extends "base.html" %}
{% block meta %}
<title>{{ pages.get('bio').title }} - Claudio Pastorini</title>
<meta name="description" content="{{ page.subtitle }}">
{% endblock %}
{% block ogmeta %}
{{ super() }}
<meta property="og:title" content="{{ pages.get('bio').title }}"/>
<meta property="og:description" content="{{ pages.get('bio').subtitle }}"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="{{ url_for('bio', _external=True, _scheme='https') }}"/>
<meta property="og:image"
content="{{ url_for('static', filename = 'images/' + pages.get('bio').banner, _external=True, _scheme='https') }}"/>
<meta property="og:image:width" content="2340">
<meta property="og:image:height" content="1276">
<meta property="og:image:type" content="image/jpg">
{% endblock %}
{% block content %}
<h5>{{ pages.get('bio').subtitle }}</h5>
<img class="banner bottom-margin u-max-full-width" alt="Claudio Pastorini" align="middle" src="{{ url_for('static',
filename = 'images/' + pages.get('bio').banner) }}">
{{ pages.get('bio').html|safe }}
{% endblock content %}
|
{% extends "base.html" %}
{% block meta %}
<meta name="google-site-verification" content="IJiK-LS2ThwdodgTy2nrfSzNF66XOQA2H61IYIZXIIY"/>
<title>{{ pages.get('bio').title }} - Claudio Pastorini</title>
<meta name="description" content="{{ page.subtitle }}">
{% endblock %}
{% block ogmeta %}
{{ super() }}
<meta property="og:title" content="{{ pages.get('bio').title }}"/>
<meta property="og:description" content="{{ pages.get('bio').subtitle }}"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="{{ url_for('bio', _external=True, _scheme='https') }}"/>
<meta property="og:image"
content="{{ url_for('static', filename = 'images/' + pages.get('bio').banner, _external=True, _scheme='https') }}"/>
<meta property="og:image:width" content="2340">
<meta property="og:image:height" content="1276">
<meta property="og:image:type" content="image/jpg">
{% endblock %}
{% block content %}
<h5>{{ pages.get('bio').subtitle }}</h5>
<img class="banner bottom-margin u-max-full-width" alt="Claudio Pastorini" align="middle" src="{{ url_for('static',
filename = 'images/' + pages.get('bio').banner) }}">
{{ pages.get('bio').html|safe }}
{% endblock content %}
|
Add Tag HTML for Google verification
|
Add Tag HTML for Google verification
|
HTML
|
mit
|
claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io,claudiopastorini/claudiopastorini.github.io
|
html
|
## Code Before:
{% extends "base.html" %}
{% block meta %}
<title>{{ pages.get('bio').title }} - Claudio Pastorini</title>
<meta name="description" content="{{ page.subtitle }}">
{% endblock %}
{% block ogmeta %}
{{ super() }}
<meta property="og:title" content="{{ pages.get('bio').title }}"/>
<meta property="og:description" content="{{ pages.get('bio').subtitle }}"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="{{ url_for('bio', _external=True, _scheme='https') }}"/>
<meta property="og:image"
content="{{ url_for('static', filename = 'images/' + pages.get('bio').banner, _external=True, _scheme='https') }}"/>
<meta property="og:image:width" content="2340">
<meta property="og:image:height" content="1276">
<meta property="og:image:type" content="image/jpg">
{% endblock %}
{% block content %}
<h5>{{ pages.get('bio').subtitle }}</h5>
<img class="banner bottom-margin u-max-full-width" alt="Claudio Pastorini" align="middle" src="{{ url_for('static',
filename = 'images/' + pages.get('bio').banner) }}">
{{ pages.get('bio').html|safe }}
{% endblock content %}
## Instruction:
Add Tag HTML for Google verification
## Code After:
{% extends "base.html" %}
{% block meta %}
<meta name="google-site-verification" content="IJiK-LS2ThwdodgTy2nrfSzNF66XOQA2H61IYIZXIIY"/>
<title>{{ pages.get('bio').title }} - Claudio Pastorini</title>
<meta name="description" content="{{ page.subtitle }}">
{% endblock %}
{% block ogmeta %}
{{ super() }}
<meta property="og:title" content="{{ pages.get('bio').title }}"/>
<meta property="og:description" content="{{ pages.get('bio').subtitle }}"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="{{ url_for('bio', _external=True, _scheme='https') }}"/>
<meta property="og:image"
content="{{ url_for('static', filename = 'images/' + pages.get('bio').banner, _external=True, _scheme='https') }}"/>
<meta property="og:image:width" content="2340">
<meta property="og:image:height" content="1276">
<meta property="og:image:type" content="image/jpg">
{% endblock %}
{% block content %}
<h5>{{ pages.get('bio').subtitle }}</h5>
<img class="banner bottom-margin u-max-full-width" alt="Claudio Pastorini" align="middle" src="{{ url_for('static',
filename = 'images/' + pages.get('bio').banner) }}">
{{ pages.get('bio').html|safe }}
{% endblock content %}
|
295d570dcc517de13c60f3b7774cf388150bd4c3
|
tools/templates/tools/character_detail.html
|
tools/templates/tools/character_detail.html
|
{% extends 'base.html' %}
{% load static from staticfiles %}
{% load frontend_extras %}
{% block header %}
{{ character.name }}
{% endblock header %}
{% block content %}
<div>
Age: {{ character.age|default:'-' }}
</div>
<div>
Appearance: {{ character.appearance|default:'-' }}
</div>
{% endblock content %}
|
{% extends 'base.html' %}
{% load static from staticfiles %}
{% load frontend_extras %}
{% block header %}
{{ character.name }}
{% endblock header %}
{% block content %}
<div>
Age: {{ character.age|default:'-' }}
</div>
<div>
Appearance: {{ character.appearance|default:'-' }}
</div>
<div class="character-notes">
{% for notes in character.characternotesanswer_set.all %}
<div class="character-note">
<div class="character-note-question">
{{ notes.question.question }}
</div>
<div class="character-note-answer">
{{ notes.answer }}
</div>
</div>
{% endfor %}
</div>
{% endblock content %}
|
Add CharacterNotes response to detail view
|
Add CharacterNotes response to detail view
|
HTML
|
mit
|
Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/fbxnano
|
html
|
## Code Before:
{% extends 'base.html' %}
{% load static from staticfiles %}
{% load frontend_extras %}
{% block header %}
{{ character.name }}
{% endblock header %}
{% block content %}
<div>
Age: {{ character.age|default:'-' }}
</div>
<div>
Appearance: {{ character.appearance|default:'-' }}
</div>
{% endblock content %}
## Instruction:
Add CharacterNotes response to detail view
## Code After:
{% extends 'base.html' %}
{% load static from staticfiles %}
{% load frontend_extras %}
{% block header %}
{{ character.name }}
{% endblock header %}
{% block content %}
<div>
Age: {{ character.age|default:'-' }}
</div>
<div>
Appearance: {{ character.appearance|default:'-' }}
</div>
<div class="character-notes">
{% for notes in character.characternotesanswer_set.all %}
<div class="character-note">
<div class="character-note-question">
{{ notes.question.question }}
</div>
<div class="character-note-answer">
{{ notes.answer }}
</div>
</div>
{% endfor %}
</div>
{% endblock content %}
|
5cfcf4c25ab0118e29915a65c925cca4011da17b
|
.travis.yml
|
.travis.yml
|
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
cache:
directories:
- vendor
before_script:
- composer install
script:
- bin/phpcs --standard=psr2 src/
|
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
cache:
directories:
- vendor
before_script:
- composer install
script:
- bin/phpcs --standard=psr2 bin/projectlint src/
|
Add "projectlint" binary to PHP_CodeSniffer checking
|
Add "projectlint" binary to PHP_CodeSniffer checking
|
YAML
|
bsd-3-clause
|
jmfontaine/projectlint
|
yaml
|
## Code Before:
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
cache:
directories:
- vendor
before_script:
- composer install
script:
- bin/phpcs --standard=psr2 src/
## Instruction:
Add "projectlint" binary to PHP_CodeSniffer checking
## Code After:
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
cache:
directories:
- vendor
before_script:
- composer install
script:
- bin/phpcs --standard=psr2 bin/projectlint src/
|
ad8747a45e070a12204cb2170214c222b5e684a6
|
.travis.yml
|
.travis.yml
|
language: ruby
script: bundle exec rake test
cache: bundler
sudo: false
after_success:
- bundle exec rake test:accuracy
- bundle exec rake benchmark:memory
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby-1.7.21
- jruby-9.0.0.0
- jruby-head
- rbx-2.4.1
- rbx-2.5.8
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
fast_finish: true
|
language: ruby
script: bundle exec rake test
cache: bundler
sudo: false
before_install:
- 'if [[ "$TRAVIS_RUBY_VERSION" =~ "jruby" ]]; then rvm get head && rvm use --install $TRAVIS_RUBY_VERSION; fi'
after_success:
- bundle exec rake test:accuracy
- bundle exec rake benchmark:memory
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby-1.7.21
- jruby-9.0.0.0
- jruby-head
- rbx-2.4.1
- rbx-2.5.8
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
fast_finish: true
|
Make sure to use the latest version of rvm
|
Make sure to use the latest version of rvm
The version of rvm installed on Travis is too old and it installs jruby-9000pre1 which doesn't install the interception gem properly.
|
YAML
|
mit
|
Ye-Yong-Chi/did_you_mean,yui-knk/did_you_mean,yuki24/did_you_mean
|
yaml
|
## Code Before:
language: ruby
script: bundle exec rake test
cache: bundler
sudo: false
after_success:
- bundle exec rake test:accuracy
- bundle exec rake benchmark:memory
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby-1.7.21
- jruby-9.0.0.0
- jruby-head
- rbx-2.4.1
- rbx-2.5.8
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
fast_finish: true
## Instruction:
Make sure to use the latest version of rvm
The version of rvm installed on Travis is too old and it installs jruby-9000pre1 which doesn't install the interception gem properly.
## Code After:
language: ruby
script: bundle exec rake test
cache: bundler
sudo: false
before_install:
- 'if [[ "$TRAVIS_RUBY_VERSION" =~ "jruby" ]]; then rvm get head && rvm use --install $TRAVIS_RUBY_VERSION; fi'
after_success:
- bundle exec rake test:accuracy
- bundle exec rake benchmark:memory
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
- jruby-1.7.21
- jruby-9.0.0.0
- jruby-head
- rbx-2.4.1
- rbx-2.5.8
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
fast_finish: true
|
78cddedf39239d50fbb33b7c5bf3bca68233709d
|
src/main/java/org/joow/elevator2/Actions.java
|
src/main/java/org/joow/elevator2/Actions.java
|
package org.joow.elevator2;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class Actions {
public final List<Action> actions = new CopyOnWriteArrayList<>();
public void add(final Action action) {
actions.add(action);
}
public void remove(final Action action) {
actions.removeAll(Collections2.filter(actions, new Predicate<Action>() {
@Override
public boolean apply(final Action input) {
return input.floor() == action.floor();
}
}));
}
public void clear() {
actions.clear();
}
public Optional<Action> next(final Cabin cabin) {
if (actions.isEmpty()) {
return Optional.absent();
} else {
return Optional.of(Paths.getBestPath(actions, cabin).first());
}
}
}
|
package org.joow.elevator2;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class Actions {
private final List<Action> actions = new CopyOnWriteArrayList<>();
public void add(final Action action) {
actions.add(action);
}
public void remove(final Action action) {
actions.removeAll(Collections2.filter(actions, new FloorPredicate(action.floor())));
}
public void clear() {
actions.clear();
}
public Optional<Action> next(final Cabin cabin) {
if (actions.isEmpty()) {
return Optional.absent();
} else {
return Optional.of(Paths.getBestPath(actions, cabin).first());
}
}
}
|
Use FloorPredicate class to remove actions at given floor.
|
Use FloorPredicate class to remove actions at given floor.
|
Java
|
bsd-2-clause
|
joow/CodeElevator,joow/CodeElevator
|
java
|
## Code Before:
package org.joow.elevator2;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class Actions {
public final List<Action> actions = new CopyOnWriteArrayList<>();
public void add(final Action action) {
actions.add(action);
}
public void remove(final Action action) {
actions.removeAll(Collections2.filter(actions, new Predicate<Action>() {
@Override
public boolean apply(final Action input) {
return input.floor() == action.floor();
}
}));
}
public void clear() {
actions.clear();
}
public Optional<Action> next(final Cabin cabin) {
if (actions.isEmpty()) {
return Optional.absent();
} else {
return Optional.of(Paths.getBestPath(actions, cabin).first());
}
}
}
## Instruction:
Use FloorPredicate class to remove actions at given floor.
## Code After:
package org.joow.elevator2;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class Actions {
private final List<Action> actions = new CopyOnWriteArrayList<>();
public void add(final Action action) {
actions.add(action);
}
public void remove(final Action action) {
actions.removeAll(Collections2.filter(actions, new FloorPredicate(action.floor())));
}
public void clear() {
actions.clear();
}
public Optional<Action> next(final Cabin cabin) {
if (actions.isEmpty()) {
return Optional.absent();
} else {
return Optional.of(Paths.getBestPath(actions, cabin).first());
}
}
}
|
87cf5c61ea9a023d125b59688bd687d1d465d8c3
|
src/sagas.js
|
src/sagas.js
|
/** @babel */
/** global atom */
import { delay } from 'redux-saga'
import { put, call, select, take, fork } from 'redux-saga/effects'
import { run } from 'node-jq'
import { ACTIONS as ACTION } from './constants'
const ONE_SEC = 1000
// const jq = (filter) => {
// return (dispatch, getState) => {
// const { activePaneItem } = getState()
// return run(filter, activePaneItem.getText(), { input: 'string' }).then(
// output => dispatch(jqFilterSuccess(output)),
// error => dispatch(jqFilterFailure(error))
// )
// }
// }
function * jq () {
while (true) {
const action = yield take(ACTION.JQ_FILTER_REQUEST)
const activePaneItem = yield select(state => state.activePaneItem)
const { payload: { filter } } = action
const filePath = activePaneItem.buffer.file.path
try {
const result = yield run(filter, filePath)
yield call(ACTION.OPEN_MODAL, result)
} catch (e) {
yield call(ACTION.JQ_FILTER_FAILURE)
}
yield call(delay, ONE_SEC)
}
}
export default function * sagas () {
yield [
fork(jq)
]
}
|
/** @babel */
/** global atom */
import { delay } from 'redux-saga'
import { put, call, select, take, fork } from 'redux-saga/effects'
import { run } from 'node-jq'
import { ACTIONS as ACTION } from './constants'
const ONE_SEC = 1000
function * jq () {
while (true) {
const action = yield take(ACTION.JQ_FILTER_REQUEST)
const activePaneItem = yield select(state => state.activePaneItem)
const { payload: { filter } } = action
const filePath = activePaneItem.buffer.file.path
try {
const result = yield run(filter, filePath)
yield call(ACTION.OPEN_MODAL, result)
} catch (e) {
yield call(ACTION.JQ_FILTER_FAILURE)
}
yield call(delay, ONE_SEC)
}
}
export default function * sagas () {
yield [
fork(jq)
]
}
|
Remove commented thunk code in saga
|
Remove commented thunk code in saga
|
JavaScript
|
mit
|
sanack/atom-jq
|
javascript
|
## Code Before:
/** @babel */
/** global atom */
import { delay } from 'redux-saga'
import { put, call, select, take, fork } from 'redux-saga/effects'
import { run } from 'node-jq'
import { ACTIONS as ACTION } from './constants'
const ONE_SEC = 1000
// const jq = (filter) => {
// return (dispatch, getState) => {
// const { activePaneItem } = getState()
// return run(filter, activePaneItem.getText(), { input: 'string' }).then(
// output => dispatch(jqFilterSuccess(output)),
// error => dispatch(jqFilterFailure(error))
// )
// }
// }
function * jq () {
while (true) {
const action = yield take(ACTION.JQ_FILTER_REQUEST)
const activePaneItem = yield select(state => state.activePaneItem)
const { payload: { filter } } = action
const filePath = activePaneItem.buffer.file.path
try {
const result = yield run(filter, filePath)
yield call(ACTION.OPEN_MODAL, result)
} catch (e) {
yield call(ACTION.JQ_FILTER_FAILURE)
}
yield call(delay, ONE_SEC)
}
}
export default function * sagas () {
yield [
fork(jq)
]
}
## Instruction:
Remove commented thunk code in saga
## Code After:
/** @babel */
/** global atom */
import { delay } from 'redux-saga'
import { put, call, select, take, fork } from 'redux-saga/effects'
import { run } from 'node-jq'
import { ACTIONS as ACTION } from './constants'
const ONE_SEC = 1000
function * jq () {
while (true) {
const action = yield take(ACTION.JQ_FILTER_REQUEST)
const activePaneItem = yield select(state => state.activePaneItem)
const { payload: { filter } } = action
const filePath = activePaneItem.buffer.file.path
try {
const result = yield run(filter, filePath)
yield call(ACTION.OPEN_MODAL, result)
} catch (e) {
yield call(ACTION.JQ_FILTER_FAILURE)
}
yield call(delay, ONE_SEC)
}
}
export default function * sagas () {
yield [
fork(jq)
]
}
|
2953f0dfce560a7205fad56e455b20e6b3f4bcbb
|
README.md
|
README.md
|
A small set of scripts to set up Raspberry Pi devices to a common configuration
## Installation
To configure preferences (WiFi, keyboard, etc.), first run:
```bash
$ sudo ./setup.sh
```
This script will trigger a reboot. After rebooting, run the update script\*
to get the latest firmware and packages:
```bash
$ cd ~/tmp/
$ sudo ./update.sh
```
\* — For the sake of convenience, this file will be moved to `~/tmp/update.sh` so that you may run the script from a remote machine.
## License
MIT
|
A small set of scripts to set up Raspberry Pi devices to a common configuration
## Installation
To configure preferences (WiFi, keyboard, etc.), first run:
```bash
$ sudo ./bootstrap.sh
```
This script will trigger a reboot. After rebooting, run the setup script\*
to get the latest firmware, install default packages, and add a new user:
```bash
$ cd ~/tmp/
$ sudo ./scripts/setup.sh
```
\* — For the sake of convenience, this file will be moved to `~/tmp/scripts/setup.sh` so that you may run the script from a remote machine.
## License
MIT
|
Update docs to reflect new path changes and nomenclature
|
Update docs to reflect new path changes and nomenclature
|
Markdown
|
mit
|
restlessdesign/raspi-setup
|
markdown
|
## Code Before:
A small set of scripts to set up Raspberry Pi devices to a common configuration
## Installation
To configure preferences (WiFi, keyboard, etc.), first run:
```bash
$ sudo ./setup.sh
```
This script will trigger a reboot. After rebooting, run the update script\*
to get the latest firmware and packages:
```bash
$ cd ~/tmp/
$ sudo ./update.sh
```
\* — For the sake of convenience, this file will be moved to `~/tmp/update.sh` so that you may run the script from a remote machine.
## License
MIT
## Instruction:
Update docs to reflect new path changes and nomenclature
## Code After:
A small set of scripts to set up Raspberry Pi devices to a common configuration
## Installation
To configure preferences (WiFi, keyboard, etc.), first run:
```bash
$ sudo ./bootstrap.sh
```
This script will trigger a reboot. After rebooting, run the setup script\*
to get the latest firmware, install default packages, and add a new user:
```bash
$ cd ~/tmp/
$ sudo ./scripts/setup.sh
```
\* — For the sake of convenience, this file will be moved to `~/tmp/scripts/setup.sh` so that you may run the script from a remote machine.
## License
MIT
|
6b4f7a9c6c01e16e2a777962b7a1f5c3536ced25
|
Data/Aeson/Encode/Functions.hs
|
Data/Aeson/Encode/Functions.hs
|
module Data.Aeson.Encode.Functions
(
brackets
, builder
, char7
, foldable
, list
, pairs
) where
import Data.Aeson.Encode.Builder
import Data.Aeson.Types.Class
import Data.Aeson.Types.Internal
import Data.ByteString.Builder (Builder, char7)
import Data.ByteString.Builder.Prim (primBounded)
import Data.Foldable (Foldable, foldMap)
import Data.Monoid ((<>), mempty)
builder :: ToJSON a => a -> Builder
builder = fromEncoding . toEncoding
{-# INLINE builder #-}
-- | Encode a 'Foldable' as a JSON array.
foldable :: (Foldable t, ToJSON a) => t a -> Encoding
foldable = brackets '[' ']' . foldMap (Value . toEncoding)
{-# INLINE foldable #-}
list :: (ToJSON a) => [a] -> Encoding
list [] = emptyArray_
list (x:xs) = Encoding $
char7 '[' <> builder x <> commas xs <> char7 ']'
where commas = foldr (\v vs -> char7 ',' <> builder v <> vs) mempty
{-# INLINE list #-}
brackets :: Char -> Char -> Series -> Encoding
brackets begin end (Value v) = Encoding $
char7 begin <> fromEncoding v <> char7 end
brackets begin end Empty = Encoding (primBounded (ascii2 (begin,end)) ())
-- | Encode a series of key/value pairs, separated by commas.
pairs :: Series -> Encoding
pairs Empty = mempty
pairs (Value v) = v
|
module Data.Aeson.Encode.Functions
(
brackets
, builder
, char7
, foldable
, list
, pairs
) where
import Data.Aeson.Encode.Builder
import Data.Aeson.Types.Class
import Data.Aeson.Types.Internal
import Data.ByteString.Builder (Builder, char7)
import Data.ByteString.Builder.Prim (primBounded)
import Data.Foldable (Foldable, foldMap)
import Data.Monoid ((<>), mempty)
builder :: ToJSON a => a -> Builder
builder = fromEncoding . toEncoding
{-# INLINE builder #-}
-- | Encode a 'Foldable' as a JSON array.
foldable :: (Foldable t, ToJSON a) => t a -> Encoding
foldable = brackets '[' ']' . foldMap (Value . toEncoding)
{-# INLINE foldable #-}
list :: (ToJSON a) => [a] -> Encoding
list [] = emptyArray_
list (x:xs) = Encoding $
char7 '[' <> builder x <> commas xs <> char7 ']'
where commas = foldr (\v vs -> char7 ',' <> builder v <> vs) mempty
{-# INLINE list #-}
brackets :: Char -> Char -> Series -> Encoding
brackets begin end (Value v) = Encoding $
char7 begin <> fromEncoding v <> char7 end
brackets begin end Empty = Encoding (primBounded (ascii2 (begin,end)) ())
-- | Encode a series of key/value pairs, separated by commas.
pairs :: Series -> Encoding
pairs s = brackets '{' '}' s
{-# INLINE pairs #-}
|
Correct the definition of pairs
|
Correct the definition of pairs
|
Haskell
|
bsd-3-clause
|
bwo/aeson,nurpax/aeson,neobrain/aeson,roelvandijk/aeson,23Skidoo/aeson,aelve/json-x,sol/aeson,roelvandijk/aeson,abbradar/aeson,lykahb/aeson,SeanRBurton/aeson,sol/aeson,dmjio/aeson,sol/aeson,neobrain/aeson,timmytofu/aeson,jkarni/aeson
|
haskell
|
## Code Before:
module Data.Aeson.Encode.Functions
(
brackets
, builder
, char7
, foldable
, list
, pairs
) where
import Data.Aeson.Encode.Builder
import Data.Aeson.Types.Class
import Data.Aeson.Types.Internal
import Data.ByteString.Builder (Builder, char7)
import Data.ByteString.Builder.Prim (primBounded)
import Data.Foldable (Foldable, foldMap)
import Data.Monoid ((<>), mempty)
builder :: ToJSON a => a -> Builder
builder = fromEncoding . toEncoding
{-# INLINE builder #-}
-- | Encode a 'Foldable' as a JSON array.
foldable :: (Foldable t, ToJSON a) => t a -> Encoding
foldable = brackets '[' ']' . foldMap (Value . toEncoding)
{-# INLINE foldable #-}
list :: (ToJSON a) => [a] -> Encoding
list [] = emptyArray_
list (x:xs) = Encoding $
char7 '[' <> builder x <> commas xs <> char7 ']'
where commas = foldr (\v vs -> char7 ',' <> builder v <> vs) mempty
{-# INLINE list #-}
brackets :: Char -> Char -> Series -> Encoding
brackets begin end (Value v) = Encoding $
char7 begin <> fromEncoding v <> char7 end
brackets begin end Empty = Encoding (primBounded (ascii2 (begin,end)) ())
-- | Encode a series of key/value pairs, separated by commas.
pairs :: Series -> Encoding
pairs Empty = mempty
pairs (Value v) = v
## Instruction:
Correct the definition of pairs
## Code After:
module Data.Aeson.Encode.Functions
(
brackets
, builder
, char7
, foldable
, list
, pairs
) where
import Data.Aeson.Encode.Builder
import Data.Aeson.Types.Class
import Data.Aeson.Types.Internal
import Data.ByteString.Builder (Builder, char7)
import Data.ByteString.Builder.Prim (primBounded)
import Data.Foldable (Foldable, foldMap)
import Data.Monoid ((<>), mempty)
builder :: ToJSON a => a -> Builder
builder = fromEncoding . toEncoding
{-# INLINE builder #-}
-- | Encode a 'Foldable' as a JSON array.
foldable :: (Foldable t, ToJSON a) => t a -> Encoding
foldable = brackets '[' ']' . foldMap (Value . toEncoding)
{-# INLINE foldable #-}
list :: (ToJSON a) => [a] -> Encoding
list [] = emptyArray_
list (x:xs) = Encoding $
char7 '[' <> builder x <> commas xs <> char7 ']'
where commas = foldr (\v vs -> char7 ',' <> builder v <> vs) mempty
{-# INLINE list #-}
brackets :: Char -> Char -> Series -> Encoding
brackets begin end (Value v) = Encoding $
char7 begin <> fromEncoding v <> char7 end
brackets begin end Empty = Encoding (primBounded (ascii2 (begin,end)) ())
-- | Encode a series of key/value pairs, separated by commas.
pairs :: Series -> Encoding
pairs s = brackets '{' '}' s
{-# INLINE pairs #-}
|
edf641fede9453d22c0d0ba3880aedbacb8fafec
|
app/scripts-browserify/mobile.js
|
app/scripts-browserify/mobile.js
|
'use strict';
const helpers = require('../../shared/helpers');
function adjustClasses() {
if (helpers.isMobile($) === true) {
$('body').addClass('is-mobile').removeClass('is-desktop');
}
else {
$('body').addClass('is-desktop').removeClass('is-mobile');
}
}
window.addEventListener('resize', adjustClasses, false);
window.addEventListener('load', adjustClasses, false);
document.addEventListener('DOMContentLoaded', adjustClasses, false);
|
'use strict';
const helpers = require('../../shared/helpers');
// General function to add 'is-mobile' and 'is-desktop' class to body.
// Used to adjust styling for mobile/desktop and called on multiple events.
function adjustClasses() {
if (helpers.isMobile($) === true) {
$('body').addClass('is-mobile').removeClass('is-desktop');
}
else {
$('body').addClass('is-desktop').removeClass('is-mobile');
}
}
window.addEventListener('resize', adjustClasses, false);
window.addEventListener('load', adjustClasses, false);
document.addEventListener('DOMContentLoaded', adjustClasses, false);
|
Add comment to adjustClasses function
|
Add comment to adjustClasses function
KB-419
|
JavaScript
|
mit
|
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
|
javascript
|
## Code Before:
'use strict';
const helpers = require('../../shared/helpers');
function adjustClasses() {
if (helpers.isMobile($) === true) {
$('body').addClass('is-mobile').removeClass('is-desktop');
}
else {
$('body').addClass('is-desktop').removeClass('is-mobile');
}
}
window.addEventListener('resize', adjustClasses, false);
window.addEventListener('load', adjustClasses, false);
document.addEventListener('DOMContentLoaded', adjustClasses, false);
## Instruction:
Add comment to adjustClasses function
KB-419
## Code After:
'use strict';
const helpers = require('../../shared/helpers');
// General function to add 'is-mobile' and 'is-desktop' class to body.
// Used to adjust styling for mobile/desktop and called on multiple events.
function adjustClasses() {
if (helpers.isMobile($) === true) {
$('body').addClass('is-mobile').removeClass('is-desktop');
}
else {
$('body').addClass('is-desktop').removeClass('is-mobile');
}
}
window.addEventListener('resize', adjustClasses, false);
window.addEventListener('load', adjustClasses, false);
document.addEventListener('DOMContentLoaded', adjustClasses, false);
|
2de4f371e4174f992b09ffdc27307ea33517f6dd
|
.travis.yml
|
.travis.yml
|
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
cache:
directories:
- ./vendor
- $HOME/.composer/cache
env:
- LARAVEL_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
- LARAVEL_VERSION=6.* TESTBENCH_VERSION=4.*
before_script:
- composer self-update
- composer require "laravel/framework:${LARAVEL_VERSION}" "orchestra/testbench:${TESTBENCH_VERSION}" --no-update
- if [ "$PHPUNIT_VERSION" != "" ]; then composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update; fi;
- composer update
- mkdir -p build/logs
script: vendor/bin/phpunit
|
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
cache:
directories:
- ./vendor
- $HOME/.composer/cache
env:
- LARAVEL_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
- LARAVEL_VERSION=6.* TESTBENCH_VERSION=4.*
matrix:
exclude:
- php: 7.1
env: LARAVEL_VERSION=6.*
before_script:
- composer self-update
- composer require "laravel/framework:${LARAVEL_VERSION}" "orchestra/testbench:${TESTBENCH_VERSION}" --no-update
- if [ "$PHPUNIT_VERSION" != "" ]; then composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update; fi;
- composer update
- mkdir -p build/logs
script: vendor/bin/phpunit
|
Exclude PHP 7.1 setup for Laravel 6
|
Exclude PHP 7.1 setup for Laravel 6
|
YAML
|
mit
|
fntneves/laravel-transactional-events
|
yaml
|
## Code Before:
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
cache:
directories:
- ./vendor
- $HOME/.composer/cache
env:
- LARAVEL_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
- LARAVEL_VERSION=6.* TESTBENCH_VERSION=4.*
before_script:
- composer self-update
- composer require "laravel/framework:${LARAVEL_VERSION}" "orchestra/testbench:${TESTBENCH_VERSION}" --no-update
- if [ "$PHPUNIT_VERSION" != "" ]; then composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update; fi;
- composer update
- mkdir -p build/logs
script: vendor/bin/phpunit
## Instruction:
Exclude PHP 7.1 setup for Laravel 6
## Code After:
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
cache:
directories:
- ./vendor
- $HOME/.composer/cache
env:
- LARAVEL_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
- LARAVEL_VERSION=6.* TESTBENCH_VERSION=4.*
matrix:
exclude:
- php: 7.1
env: LARAVEL_VERSION=6.*
before_script:
- composer self-update
- composer require "laravel/framework:${LARAVEL_VERSION}" "orchestra/testbench:${TESTBENCH_VERSION}" --no-update
- if [ "$PHPUNIT_VERSION" != "" ]; then composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update; fi;
- composer update
- mkdir -p build/logs
script: vendor/bin/phpunit
|
3284ea678b3fdd1fdef23eea9861c1f72783f217
|
README.md
|
README.md
|
Jiff is an implementation of a subset of [JSON Patch RFC6902](https://tools.ietf.org/html/rfc6902), plus a Diff implementation that generates compliant patches.
It currently supports JSON Patch `add`, `replace`, and `remove` operations. It *does not* yet support `move`, `copy`, and `test`.
## Get it
`npm install --save jiff`
`bower install --save jiff`
## API
### diff
```js
var patch = jiff.diff(a, b [, hashFunction]);
```
Computes and returns a JSON Patch from `a` to `b`: `a` and `b` must be valid JSON objects/arrays/values of the same type. If `patch` is applied to `a`, it will yield `b`.
If provided, the optional `hashFunction` will be used to recognize when two objects are the same. If not provided, `JSON.stringify` will be used.
### patch
```js
var b = jiff.patch(patch, a);
```
Given an rfc6902 JSON Patch containing only `add`, `replace`, and `remove` operations, apply it to `a` and return the patched JSON object/array/value.
### clone
```js
var b = jiff.clone(a);
```
Creates a deep copy of `a`, which must be a valid JSON object/array/value.
## License
MIT
|
Jiff is an implementation of a subset of [JSON Patch RFC6902](https://tools.ietf.org/html/rfc6902), plus a Diff implementation that generates compliant patches.
It currently supports JSON Patch `add`, `replace`, and `remove` operations. It *does not* yet support `move`, `copy`, and `test`.
## Get it
`npm install --save jiff`
`bower install --save jiff`
## API
### diff
```js
var patch = jiff.diff(a, b [, hashFunction]);
```
Computes and returns a JSON Patch from `a` to `b`: `a` and `b` must be valid JSON objects/arrays/values of the same type. If `patch` is applied to `a`, it will yield `b`.
If provided, the optional `hashFunction` will be used to recognize when two objects are the same. If not provided, `JSON.stringify` will be used.
### patch
```js
var b = jiff.patch(patch, a);
```
Given an rfc6902 JSON Patch containing only `add`, `replace`, and `remove` operations, apply it to `a` and return the patched JSON object/array/value.
### clone
```js
var b = jiff.clone(a);
```
Creates a deep copy of `a`, which must be a valid JSON object/array/value.
### InvalidPatchOperationError
When any invalid patch operation is encountered, jiff will throw an `InvalidPatchOperationError`. Invalid patch operations are outlined in sections 4.x in RFC 6902.
## License
MIT
|
Add info about InvalidPatchOperationException to API section
|
Add info about InvalidPatchOperationException to API section
|
Markdown
|
mit
|
grncdr/jiff,jaredcacurak/jiff
|
markdown
|
## Code Before:
Jiff is an implementation of a subset of [JSON Patch RFC6902](https://tools.ietf.org/html/rfc6902), plus a Diff implementation that generates compliant patches.
It currently supports JSON Patch `add`, `replace`, and `remove` operations. It *does not* yet support `move`, `copy`, and `test`.
## Get it
`npm install --save jiff`
`bower install --save jiff`
## API
### diff
```js
var patch = jiff.diff(a, b [, hashFunction]);
```
Computes and returns a JSON Patch from `a` to `b`: `a` and `b` must be valid JSON objects/arrays/values of the same type. If `patch` is applied to `a`, it will yield `b`.
If provided, the optional `hashFunction` will be used to recognize when two objects are the same. If not provided, `JSON.stringify` will be used.
### patch
```js
var b = jiff.patch(patch, a);
```
Given an rfc6902 JSON Patch containing only `add`, `replace`, and `remove` operations, apply it to `a` and return the patched JSON object/array/value.
### clone
```js
var b = jiff.clone(a);
```
Creates a deep copy of `a`, which must be a valid JSON object/array/value.
## License
MIT
## Instruction:
Add info about InvalidPatchOperationException to API section
## Code After:
Jiff is an implementation of a subset of [JSON Patch RFC6902](https://tools.ietf.org/html/rfc6902), plus a Diff implementation that generates compliant patches.
It currently supports JSON Patch `add`, `replace`, and `remove` operations. It *does not* yet support `move`, `copy`, and `test`.
## Get it
`npm install --save jiff`
`bower install --save jiff`
## API
### diff
```js
var patch = jiff.diff(a, b [, hashFunction]);
```
Computes and returns a JSON Patch from `a` to `b`: `a` and `b` must be valid JSON objects/arrays/values of the same type. If `patch` is applied to `a`, it will yield `b`.
If provided, the optional `hashFunction` will be used to recognize when two objects are the same. If not provided, `JSON.stringify` will be used.
### patch
```js
var b = jiff.patch(patch, a);
```
Given an rfc6902 JSON Patch containing only `add`, `replace`, and `remove` operations, apply it to `a` and return the patched JSON object/array/value.
### clone
```js
var b = jiff.clone(a);
```
Creates a deep copy of `a`, which must be a valid JSON object/array/value.
### InvalidPatchOperationError
When any invalid patch operation is encountered, jiff will throw an `InvalidPatchOperationError`. Invalid patch operations are outlined in sections 4.x in RFC 6902.
## License
MIT
|
5181e1f5bc4efb1c1dd6682137b3af7079c262a6
|
app/controllers/questions/new.js
|
app/controllers/questions/new.js
|
import Ember from 'ember';
export default Ember.Controller.extend({
needs: ['application'],
selectedPerson: Ember.computed.alias('controllers.application.attrs.person'),
errorMessage: null,
titleIsValid: function() {
var title = this.get('model.title');
return (!Ember.isEmpty(title) && title.length > 2);
}.property('model.title'),
emailIsValid: function() {
var email = this.get('model.user.email'),
re = new RegExp(/\S+@\S+\.\S+/);
return (!Ember.isEmpty(email) && re.test(email));
}.property('model.user.email'),
isValid: function() {
return (this.get('titleIsValid') && this.get('emailIsValid'));
}.property('titleIsValid', 'emailIsValid')
});
|
import Ember from 'ember';
export default Ember.Controller.extend({
needs: ['application'],
selectedPerson: Ember.computed.alias('controllers.application.attrs.person'),
errorMessage: null,
titleIsValid: Ember.computed('model.title', function() {
var title = this.get('model.title');
return (!Ember.isEmpty(title) && title.length > 2);
}),
emailIsValid: Ember.computed('model.user.email', function() {
var email = this.get('model.user.email'),
re = new RegExp(/\S+@\S+\.\S+/);
return (!Ember.isEmpty(email) && re.test(email));
}),
isValid: Ember.computed('titleIsValid', 'emailIsValid', function() {
return (this.get('titleIsValid') && this.get('emailIsValid'));
})
});
|
Switch computed property syntax via ember-watson
|
Switch computed property syntax via ember-watson
|
JavaScript
|
mit
|
opengovernment/person-widget,opengovernment/person-widget
|
javascript
|
## Code Before:
import Ember from 'ember';
export default Ember.Controller.extend({
needs: ['application'],
selectedPerson: Ember.computed.alias('controllers.application.attrs.person'),
errorMessage: null,
titleIsValid: function() {
var title = this.get('model.title');
return (!Ember.isEmpty(title) && title.length > 2);
}.property('model.title'),
emailIsValid: function() {
var email = this.get('model.user.email'),
re = new RegExp(/\S+@\S+\.\S+/);
return (!Ember.isEmpty(email) && re.test(email));
}.property('model.user.email'),
isValid: function() {
return (this.get('titleIsValid') && this.get('emailIsValid'));
}.property('titleIsValid', 'emailIsValid')
});
## Instruction:
Switch computed property syntax via ember-watson
## Code After:
import Ember from 'ember';
export default Ember.Controller.extend({
needs: ['application'],
selectedPerson: Ember.computed.alias('controllers.application.attrs.person'),
errorMessage: null,
titleIsValid: Ember.computed('model.title', function() {
var title = this.get('model.title');
return (!Ember.isEmpty(title) && title.length > 2);
}),
emailIsValid: Ember.computed('model.user.email', function() {
var email = this.get('model.user.email'),
re = new RegExp(/\S+@\S+\.\S+/);
return (!Ember.isEmpty(email) && re.test(email));
}),
isValid: Ember.computed('titleIsValid', 'emailIsValid', function() {
return (this.get('titleIsValid') && this.get('emailIsValid'));
})
});
|
3aac304bfb0bf98e24e48369d5c21bc3ed65c551
|
elements/Pod/Classes/EditProfileViewController.swift
|
elements/Pod/Classes/EditProfileViewController.swift
|
//
// EditProfileViewController.swift
// Pods
//
// Created by John Rikard Nilsen on 23/2/16.
//
//
import UIKit
import Tapglue
class EditProfileViewController: UIViewController {
@IBOutlet weak var userNameTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
userNameTextField.text = TGUser.currentUser().username
let save = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "saveTapped")
navigationItem.rightBarButtonItem = save
}
func saveTapped() {
navigationItem.rightBarButtonItem?.enabled = false
let user = TGUser.currentUser()
user.username = userNameTextField.text
user.saveWithCompletionBlock { (success: Bool, error: NSError!) -> Void in
dispatch_async(dispatch_get_main_queue()) { () -> Void in
self.navigationItem.rightBarButtonItem?.enabled = true
if success {
self.navigationController?.popViewControllerAnimated(true)
} else {
AlertFactory.defaultAlert(self)
}
}
}
}
}
|
//
// EditProfileViewController.swift
// Pods
//
// Created by John Rikard Nilsen on 23/2/16.
//
//
import UIKit
import Tapglue
class EditProfileViewController: UIViewController {
@IBOutlet weak var userNameTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
userNameTextField.text = TGUser.currentUser().username
let save = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "saveTapped")
navigationItem.rightBarButtonItem = save
view.backgroundColor = UIColor.clearColor()
applyConfiguration(TapglueUI.config)
}
func saveTapped() {
navigationItem.rightBarButtonItem?.enabled = false
let user = TGUser.currentUser()
user.username = userNameTextField.text
user.saveWithCompletionBlock { (success: Bool, error: NSError!) -> Void in
dispatch_async(dispatch_get_main_queue()) { () -> Void in
self.navigationItem.rightBarButtonItem?.enabled = true
if success {
self.navigationController?.popViewControllerAnimated(true)
} else {
AlertFactory.defaultAlert(self)
}
}
}
}
}
|
Add background color to edit profile screen
|
Add background color to edit profile screen
|
Swift
|
mit
|
tapglue/elements-ios,tapglue/elements-ios,tapglue/elements-ios
|
swift
|
## Code Before:
//
// EditProfileViewController.swift
// Pods
//
// Created by John Rikard Nilsen on 23/2/16.
//
//
import UIKit
import Tapglue
class EditProfileViewController: UIViewController {
@IBOutlet weak var userNameTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
userNameTextField.text = TGUser.currentUser().username
let save = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "saveTapped")
navigationItem.rightBarButtonItem = save
}
func saveTapped() {
navigationItem.rightBarButtonItem?.enabled = false
let user = TGUser.currentUser()
user.username = userNameTextField.text
user.saveWithCompletionBlock { (success: Bool, error: NSError!) -> Void in
dispatch_async(dispatch_get_main_queue()) { () -> Void in
self.navigationItem.rightBarButtonItem?.enabled = true
if success {
self.navigationController?.popViewControllerAnimated(true)
} else {
AlertFactory.defaultAlert(self)
}
}
}
}
}
## Instruction:
Add background color to edit profile screen
## Code After:
//
// EditProfileViewController.swift
// Pods
//
// Created by John Rikard Nilsen on 23/2/16.
//
//
import UIKit
import Tapglue
class EditProfileViewController: UIViewController {
@IBOutlet weak var userNameTextField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
userNameTextField.text = TGUser.currentUser().username
let save = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "saveTapped")
navigationItem.rightBarButtonItem = save
view.backgroundColor = UIColor.clearColor()
applyConfiguration(TapglueUI.config)
}
func saveTapped() {
navigationItem.rightBarButtonItem?.enabled = false
let user = TGUser.currentUser()
user.username = userNameTextField.text
user.saveWithCompletionBlock { (success: Bool, error: NSError!) -> Void in
dispatch_async(dispatch_get_main_queue()) { () -> Void in
self.navigationItem.rightBarButtonItem?.enabled = true
if success {
self.navigationController?.popViewControllerAnimated(true)
} else {
AlertFactory.defaultAlert(self)
}
}
}
}
}
|
40622d59bcad4688e26f3bfea6578a2554bde9ec
|
docker-dev.sh
|
docker-dev.sh
|
docker run -i --rm -p 4000:4000 -v "$PWD:/srv/jekyll" numascott/jekylldev:latest
# Breaking it down
# docker run ... numascott/jekylldev:latest
# create a container from the latest numascott/jekyll image
# https://hub.docker.com/r/numascott/jekylldev/
# -i
# Use interactive mode so that the output from jekyll is displayed
# --rm
# After exiting, delete the stopped container to keep our Docker space clean
# 4000:4000
# Map port 4000 inside the Docker container to port 4000 inside our computer
# -v "$PWD:/srv/jekyll"
# Allow the current folder of PWD be accessible inside the Docker container
# inside the folder /srv/jekyll. The quotes are necessary to address folder
# names that contain characters such as spaces.
# The files inside the container will change as you change them in the current
# folder
|
docker run -i --rm -p 4000:4000 -v "$PWD:/srv/jekyll" numascott/jekylldev:latest serve --incremental
# Breaking it down
# docker run ... numascott/jekylldev:latest
# create a container from the latest numascott/jekyll image
# https://hub.docker.com/r/numascott/jekylldev/
# -i
# Use interactive mode so that the output from jekyll is displayed
# --rm
# After exiting, delete the stopped container to keep our Docker space clean
# 4000:4000
# Map port 4000 inside the Docker container to port 4000 inside our computer
# -v "$PWD:/srv/jekyll"
# Allow the current folder of PWD be accessible inside the Docker container
# inside the folder /srv/jekyll. The quotes are necessary to address folder
# names that contain characters such as spaces.
# The files inside the container will change as you change them in the current
# folder
|
Update bash script with incremental build
|
Update bash script with incremental build
|
Shell
|
apache-2.0
|
kev-chien/website,pioneers/website,pioneers/website,pioneers/website,kev-chien/website,pioneers/website,kev-chien/website,kev-chien/website,pioneers/website,kev-chien/website
|
shell
|
## Code Before:
docker run -i --rm -p 4000:4000 -v "$PWD:/srv/jekyll" numascott/jekylldev:latest
# Breaking it down
# docker run ... numascott/jekylldev:latest
# create a container from the latest numascott/jekyll image
# https://hub.docker.com/r/numascott/jekylldev/
# -i
# Use interactive mode so that the output from jekyll is displayed
# --rm
# After exiting, delete the stopped container to keep our Docker space clean
# 4000:4000
# Map port 4000 inside the Docker container to port 4000 inside our computer
# -v "$PWD:/srv/jekyll"
# Allow the current folder of PWD be accessible inside the Docker container
# inside the folder /srv/jekyll. The quotes are necessary to address folder
# names that contain characters such as spaces.
# The files inside the container will change as you change them in the current
# folder
## Instruction:
Update bash script with incremental build
## Code After:
docker run -i --rm -p 4000:4000 -v "$PWD:/srv/jekyll" numascott/jekylldev:latest serve --incremental
# Breaking it down
# docker run ... numascott/jekylldev:latest
# create a container from the latest numascott/jekyll image
# https://hub.docker.com/r/numascott/jekylldev/
# -i
# Use interactive mode so that the output from jekyll is displayed
# --rm
# After exiting, delete the stopped container to keep our Docker space clean
# 4000:4000
# Map port 4000 inside the Docker container to port 4000 inside our computer
# -v "$PWD:/srv/jekyll"
# Allow the current folder of PWD be accessible inside the Docker container
# inside the folder /srv/jekyll. The quotes are necessary to address folder
# names that contain characters such as spaces.
# The files inside the container will change as you change them in the current
# folder
|
70c1bfb393752cc62bfc1ff639153c3b6021f220
|
vector/src/main/res/layout/public_room_spinner_item.xml
|
vector/src/main/res/layout/public_room_spinner_item.xml
|
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:textAlignment="inherit"
android:textColor="?attr/list_header_public_room_spinner_text_color"
tools:text="One long text for testing purpose" />
|
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textAlignment="inherit"
android:textColor="?attr/list_header_public_room_spinner_text_color"
tools:text="One long text for testing purpose" />
|
Fix Jenkins build (lint issue)
|
Fix Jenkins build (lint issue)
|
XML
|
apache-2.0
|
vector-im/riot-android,vector-im/vector-android,vector-im/riot-android,vector-im/riot-android,vector-im/vector-android,vector-im/vector-android,vector-im/vector-android,vector-im/riot-android,vector-im/riot-android
|
xml
|
## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:textAlignment="inherit"
android:textColor="?attr/list_header_public_room_spinner_text_color"
tools:text="One long text for testing purpose" />
## Instruction:
Fix Jenkins build (lint issue)
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textAlignment="inherit"
android:textColor="?attr/list_header_public_room_spinner_text_color"
tools:text="One long text for testing purpose" />
|
df779615cd9c7e4ed4b75570c96db8dfdb0e8177
|
Parsimmon/Parsimmon/TaggedToken.swift
|
Parsimmon/Parsimmon/TaggedToken.swift
|
//
// TaggedToken.swift
// Parsimmon
//
// Created by Jordan Kay on 2/19/15.
//
//
import Foundation
//
// ParsimmonTaggedToken.swift
// Parsimmon
//
// Created by Jordan Kay on 2/17/15.
//
//
import Foundation
class TaggedToken: NSObject, Equatable {
let token: String
let tag: String
init(token: String, tag: String) {
self.token = token
self.tag = tag
}
override var hash: Int {
return token.hash ^ tag.hash
}
override func isEqual(object: AnyObject?) -> Bool {
if let taggedToken = object as? TaggedToken {
return isEqualToTaggedToken(taggedToken)
}
return false
}
private func isEqualToTaggedToken(taggedToken: TaggedToken) -> Bool {
return token == taggedToken.token && tag == taggedToken.tag
}
}
extension TaggedToken: Printable {
override var description: String {
return "('\(token)' \(tag))"
}
}
func ==(lhs: TaggedToken, rhs: TaggedToken) -> Bool {
return lhs.token == rhs.token && lhs.tag == rhs.tag
}
|
//
// TaggedToken.swift
// Parsimmon
//
// Created by Jordan Kay on 2/19/15.
//
//
import Foundation
class TaggedToken: NSObject, Equatable {
let token: String
let tag: String
init(token: String, tag: String) {
self.token = token
self.tag = tag
}
override var hash: Int {
return token.hash ^ tag.hash
}
override func isEqual(object: AnyObject?) -> Bool {
if let taggedToken = object as? TaggedToken {
return isEqualToTaggedToken(taggedToken)
}
return false
}
private func isEqualToTaggedToken(taggedToken: TaggedToken) -> Bool {
return token == taggedToken.token && tag == taggedToken.tag
}
}
extension TaggedToken: Printable {
override var description: String {
return "('\(token)' \(tag))"
}
}
func ==(lhs: TaggedToken, rhs: TaggedToken) -> Bool {
return lhs.token == rhs.token && lhs.tag == rhs.tag
}
|
Fix accidental duplicate boilerplate form copy-paste
|
Fix accidental duplicate boilerplate form copy-paste
|
Swift
|
mit
|
tptee/Parsimmon,tptee/Parsimmon,ludovic-coder/Parsimmon,ludovic-coder/Parsimmon,ayanonagon/Parsimmon,jonsimington/Parsimmon,ayanonagon/Parsimmon,jonsimington/Parsimmon
|
swift
|
## Code Before:
//
// TaggedToken.swift
// Parsimmon
//
// Created by Jordan Kay on 2/19/15.
//
//
import Foundation
//
// ParsimmonTaggedToken.swift
// Parsimmon
//
// Created by Jordan Kay on 2/17/15.
//
//
import Foundation
class TaggedToken: NSObject, Equatable {
let token: String
let tag: String
init(token: String, tag: String) {
self.token = token
self.tag = tag
}
override var hash: Int {
return token.hash ^ tag.hash
}
override func isEqual(object: AnyObject?) -> Bool {
if let taggedToken = object as? TaggedToken {
return isEqualToTaggedToken(taggedToken)
}
return false
}
private func isEqualToTaggedToken(taggedToken: TaggedToken) -> Bool {
return token == taggedToken.token && tag == taggedToken.tag
}
}
extension TaggedToken: Printable {
override var description: String {
return "('\(token)' \(tag))"
}
}
func ==(lhs: TaggedToken, rhs: TaggedToken) -> Bool {
return lhs.token == rhs.token && lhs.tag == rhs.tag
}
## Instruction:
Fix accidental duplicate boilerplate form copy-paste
## Code After:
//
// TaggedToken.swift
// Parsimmon
//
// Created by Jordan Kay on 2/19/15.
//
//
import Foundation
class TaggedToken: NSObject, Equatable {
let token: String
let tag: String
init(token: String, tag: String) {
self.token = token
self.tag = tag
}
override var hash: Int {
return token.hash ^ tag.hash
}
override func isEqual(object: AnyObject?) -> Bool {
if let taggedToken = object as? TaggedToken {
return isEqualToTaggedToken(taggedToken)
}
return false
}
private func isEqualToTaggedToken(taggedToken: TaggedToken) -> Bool {
return token == taggedToken.token && tag == taggedToken.tag
}
}
extension TaggedToken: Printable {
override var description: String {
return "('\(token)' \(tag))"
}
}
func ==(lhs: TaggedToken, rhs: TaggedToken) -> Bool {
return lhs.token == rhs.token && lhs.tag == rhs.tag
}
|
6578d26b06121f1e1e87fea267d1e6696b1ddb34
|
js/scrollback.js
|
js/scrollback.js
|
document.addEventListener("wheel", function(e) {
if (e.shiftKey && e.deltaX != 0) {
window.history.go(-Math.sign(e.deltaX));
return e.preventDefault();
}
});
|
document.addEventListener("wheel", function(e) {
if (e.shiftKey && (e.deltaX != 0 || e.deltaY != 0)) {
window.history.go(-Math.sign(e.deltaX ? e.deltaX : e.deltaY));
return e.preventDefault();
}
});
|
Fix a problem of deltaX and deltaY
|
Fix a problem of deltaX and deltaY
Signed-off-by: Dongyun Jin <[email protected]>
|
JavaScript
|
mit
|
jezcope/chrome-scroll-back
|
javascript
|
## Code Before:
document.addEventListener("wheel", function(e) {
if (e.shiftKey && e.deltaX != 0) {
window.history.go(-Math.sign(e.deltaX));
return e.preventDefault();
}
});
## Instruction:
Fix a problem of deltaX and deltaY
Signed-off-by: Dongyun Jin <[email protected]>
## Code After:
document.addEventListener("wheel", function(e) {
if (e.shiftKey && (e.deltaX != 0 || e.deltaY != 0)) {
window.history.go(-Math.sign(e.deltaX ? e.deltaX : e.deltaY));
return e.preventDefault();
}
});
|
e4dd5b9a09dee5e81fd50c05b394746559e32e63
|
ci3/configs/ci3-secret.yaml
|
ci3/configs/ci3-secret.yaml
|
apiVersion: v1
data:
# DOCKER_HUB: ~
# DOCKER_PASSWORD: ~
# DOCKER_USER: ~
#
# All values here are exposed to ci3 server and agents via env variables
# with CI3_SECRET_ prefix
# $CI3_SECRET_GITHUB_TOKEN often used for checkouting submodules,
# example can be found in ../repo-configs/ci3.yaml
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
GITHUB_TOKEN: ~
#
# CHATID and TOKEN should be base64 encoded values you've got from @BotFather
# https://web.telegram.org/#/im?p=@BotFather
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
TELEGRAM_CHATID: - PUT-YOUR-CHATID-HERE -
TELEGRAM_TOKEN: - PUT-YOUR-TOKEN-HERE -
kind: Secret
metadata:
annotations:
name: ci3
namespace: default
type: Opaque
|
apiVersion: v1
data:
# DOCKER_HUB: ~
# DOCKER_PASSWORD: ~
# DOCKER_USER: ~
#
# All values here are exposed to ci3 server and agents via env variables
# with CI3_SECRET_ prefix
# $CI3_SECRET_GITHUB_TOKEN often used for checkouting submodules,
# example can be found in ../repo-configs/ci3.yaml
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
GITHUB_TOKEN: ~
#
# YOUR:TOKEN is a value you've got from @BotFather
# https://web.telegram.org/#/im?p=@BotFather
#
# to get CHATID use following url:
# https://api.telegram.org/botYOUR:TOKEN/getUpdates
#
# Encode to base64 both values and put them to fields
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
TELEGRAM_CHATID: - PUT-YOUR-CHATID-HERE -
TELEGRAM_TOKEN: - PUT-YOUR-TOKEN-HERE -
kind: Secret
metadata:
annotations:
name: ci3
namespace: default
type: Opaque
|
Update info about getting CHATID
|
Update info about getting CHATID
|
YAML
|
epl-1.0
|
HealthSamurai/ci3
|
yaml
|
## Code Before:
apiVersion: v1
data:
# DOCKER_HUB: ~
# DOCKER_PASSWORD: ~
# DOCKER_USER: ~
#
# All values here are exposed to ci3 server and agents via env variables
# with CI3_SECRET_ prefix
# $CI3_SECRET_GITHUB_TOKEN often used for checkouting submodules,
# example can be found in ../repo-configs/ci3.yaml
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
GITHUB_TOKEN: ~
#
# CHATID and TOKEN should be base64 encoded values you've got from @BotFather
# https://web.telegram.org/#/im?p=@BotFather
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
TELEGRAM_CHATID: - PUT-YOUR-CHATID-HERE -
TELEGRAM_TOKEN: - PUT-YOUR-TOKEN-HERE -
kind: Secret
metadata:
annotations:
name: ci3
namespace: default
type: Opaque
## Instruction:
Update info about getting CHATID
## Code After:
apiVersion: v1
data:
# DOCKER_HUB: ~
# DOCKER_PASSWORD: ~
# DOCKER_USER: ~
#
# All values here are exposed to ci3 server and agents via env variables
# with CI3_SECRET_ prefix
# $CI3_SECRET_GITHUB_TOKEN often used for checkouting submodules,
# example can be found in ../repo-configs/ci3.yaml
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
GITHUB_TOKEN: ~
#
# YOUR:TOKEN is a value you've got from @BotFather
# https://web.telegram.org/#/im?p=@BotFather
#
# to get CHATID use following url:
# https://api.telegram.org/botYOUR:TOKEN/getUpdates
#
# Encode to base64 both values and put them to fields
#
# echo -n "YOUR-VALUE" | base64 -w 0
#
TELEGRAM_CHATID: - PUT-YOUR-CHATID-HERE -
TELEGRAM_TOKEN: - PUT-YOUR-TOKEN-HERE -
kind: Secret
metadata:
annotations:
name: ci3
namespace: default
type: Opaque
|
0938ea3964013ec984118e96c7b126cf9db900a5
|
src/prelude/string.ts
|
src/prelude/string.ts
|
export function concat(xs: string[]): string {
return xs.reduce((a, b) => a + b, '');
}
export function capitalize(s: string): string {
return toUpperCase(s.charAt(0)) + toLowerCase(s.slice(1));
}
export function toUpperCase(s: string): string {
return s.toUpperCase();
}
export function toLowerCase(s: string): string {
return s.toLowerCase();
}
|
export function concat(xs: string[]): string {
return xs.join('');
}
export function capitalize(s: string): string {
return toUpperCase(s.charAt(0)) + toLowerCase(s.slice(1));
}
export function toUpperCase(s: string): string {
return s.toUpperCase();
}
export function toLowerCase(s: string): string {
return s.toLowerCase();
}
|
Use join instead of reduce
|
Use join instead of reduce
|
TypeScript
|
mit
|
syuilo/Misskey,syuilo/Misskey
|
typescript
|
## Code Before:
export function concat(xs: string[]): string {
return xs.reduce((a, b) => a + b, '');
}
export function capitalize(s: string): string {
return toUpperCase(s.charAt(0)) + toLowerCase(s.slice(1));
}
export function toUpperCase(s: string): string {
return s.toUpperCase();
}
export function toLowerCase(s: string): string {
return s.toLowerCase();
}
## Instruction:
Use join instead of reduce
## Code After:
export function concat(xs: string[]): string {
return xs.join('');
}
export function capitalize(s: string): string {
return toUpperCase(s.charAt(0)) + toLowerCase(s.slice(1));
}
export function toUpperCase(s: string): string {
return s.toUpperCase();
}
export function toLowerCase(s: string): string {
return s.toLowerCase();
}
|
001084635ab18ec13b3e56042a48e353f6cdf41b
|
patch/andyf-ant-jvmargs-v1.patch
|
patch/andyf-ant-jvmargs-v1.patch
|
diff --git a/build.xml b/build.xml
index 186b666..11a98b6 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,12 @@
<!--<sysproperty key="clojure.compiler.disable-locals-clearing" value="true"/>-->
<!-- <sysproperty key="clojure.compile.warn-on-reflection" value="true"/> -->
<sysproperty key="java.awt.headless" value="true"/>
+ <!-- Found these options in the instructions for JITwatch, here: -->
+ <!-- https://github.com/AdoptOpenJDK/jitwatch/wiki/Instructions -->
+ <!-- <jvmarg value="-XX:+UnlockDiagnosticVMOptions"/> -->
+ <!-- <jvmarg value="-XX:+TraceClassLoading"/> -->
+ <!-- <jvmarg value="-XX:+LogCompilation"/> -->
+ <!-- <jvmarg value="-XX:+PrintAssembly"/> -->
<arg value="clojure.core"/>
<arg value="clojure.core.protocols"/>
<arg value="clojure.main"/>
|
diff --git a/build.xml b/build.xml
index 186b666..df98bdb 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,12 @@
<!--<sysproperty key="clojure.compiler.disable-locals-clearing" value="true"/>-->
<!-- <sysproperty key="clojure.compile.warn-on-reflection" value="true"/> -->
<sysproperty key="java.awt.headless" value="true"/>
+ <!-- Found these options in the instructions for JITwatch, here: -->
+ <!-- https://github.com/AdoptOpenJDK/jitwatch/wiki/Instructions -->
+ <jvmarg value="-XX:+UnlockDiagnosticVMOptions"/>
+ <jvmarg value="-XX:+TraceClassLoading"/>
+ <jvmarg value="-XX:+LogCompilation"/>
+ <jvmarg value="-XX:+PrintAssembly"/>
<arg value="clojure.core"/>
<arg value="clojure.core.protocols"/>
<arg value="clojure.main"/>
|
Patch for Clojure's build.xml to pass extra JVM args for compile-clojure
|
Patch for Clojure's build.xml to pass extra JVM args for compile-clojure
|
Diff
|
epl-1.0
|
jafingerhut/clj1636
|
diff
|
## Code Before:
diff --git a/build.xml b/build.xml
index 186b666..11a98b6 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,12 @@
<!--<sysproperty key="clojure.compiler.disable-locals-clearing" value="true"/>-->
<!-- <sysproperty key="clojure.compile.warn-on-reflection" value="true"/> -->
<sysproperty key="java.awt.headless" value="true"/>
+ <!-- Found these options in the instructions for JITwatch, here: -->
+ <!-- https://github.com/AdoptOpenJDK/jitwatch/wiki/Instructions -->
+ <!-- <jvmarg value="-XX:+UnlockDiagnosticVMOptions"/> -->
+ <!-- <jvmarg value="-XX:+TraceClassLoading"/> -->
+ <!-- <jvmarg value="-XX:+LogCompilation"/> -->
+ <!-- <jvmarg value="-XX:+PrintAssembly"/> -->
<arg value="clojure.core"/>
<arg value="clojure.core.protocols"/>
<arg value="clojure.main"/>
## Instruction:
Patch for Clojure's build.xml to pass extra JVM args for compile-clojure
## Code After:
diff --git a/build.xml b/build.xml
index 186b666..df98bdb 100644
--- a/build.xml
+++ b/build.xml
@@ -53,6 +53,12 @@
<!--<sysproperty key="clojure.compiler.disable-locals-clearing" value="true"/>-->
<!-- <sysproperty key="clojure.compile.warn-on-reflection" value="true"/> -->
<sysproperty key="java.awt.headless" value="true"/>
+ <!-- Found these options in the instructions for JITwatch, here: -->
+ <!-- https://github.com/AdoptOpenJDK/jitwatch/wiki/Instructions -->
+ <jvmarg value="-XX:+UnlockDiagnosticVMOptions"/>
+ <jvmarg value="-XX:+TraceClassLoading"/>
+ <jvmarg value="-XX:+LogCompilation"/>
+ <jvmarg value="-XX:+PrintAssembly"/>
<arg value="clojure.core"/>
<arg value="clojure.core.protocols"/>
<arg value="clojure.main"/>
|
60e35af69803746bcaae62d137e17aebddfdb4a3
|
app/views/advocates/claims/_basic_fees.html.haml
|
app/views/advocates/claims/_basic_fees.html.haml
|
%tr.nested-fields
%td
= f.text_field :description, value: f.object.description, disabled: true
%td
= f.number_field :quantity, value: @claim.new_record? ? nil : f.object.quantity, class: 'quantity'
%td
= f.number_field :rate, value: @claim.new_record? ? nil : number_with_precision(f.object.rate, precision: 2), class: 'rate'
%td
= f.number_field :amount, value: @claim.new_record? ? nil : number_with_precision(f.object.amount, precision: 2), class: 'amount', disabled: true
= f.hidden_field :fee_type_id, value: f.object.fee_type_id
|
%tr.nested-fields
%td
= f.text_field :description, value: f.object.description, disabled: true
%td
= f.number_field :quantity, value: f.object.quantity, class: 'quantity'
%td
= f.number_field :rate, value: number_with_precision(f.object.rate, precision: 2), class: 'rate'
%td
= f.number_field :amount, value: number_with_precision(f.object.amount, precision: 2), class: 'amount', disabled: true
= f.hidden_field :fee_type_id, value: f.object.fee_type_id
|
Set default zero values in basic fees
|
Set default zero values in basic fees
|
Haml
|
mit
|
ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments
|
haml
|
## Code Before:
%tr.nested-fields
%td
= f.text_field :description, value: f.object.description, disabled: true
%td
= f.number_field :quantity, value: @claim.new_record? ? nil : f.object.quantity, class: 'quantity'
%td
= f.number_field :rate, value: @claim.new_record? ? nil : number_with_precision(f.object.rate, precision: 2), class: 'rate'
%td
= f.number_field :amount, value: @claim.new_record? ? nil : number_with_precision(f.object.amount, precision: 2), class: 'amount', disabled: true
= f.hidden_field :fee_type_id, value: f.object.fee_type_id
## Instruction:
Set default zero values in basic fees
## Code After:
%tr.nested-fields
%td
= f.text_field :description, value: f.object.description, disabled: true
%td
= f.number_field :quantity, value: f.object.quantity, class: 'quantity'
%td
= f.number_field :rate, value: number_with_precision(f.object.rate, precision: 2), class: 'rate'
%td
= f.number_field :amount, value: number_with_precision(f.object.amount, precision: 2), class: 'amount', disabled: true
= f.hidden_field :fee_type_id, value: f.object.fee_type_id
|
79c2d182eda37410ea0204e3cb011192dd713d19
|
vim/50-plugins-vim-multiple-cursors.vim
|
vim/50-plugins-vim-multiple-cursors.vim
|
" Disable YouCompleteMe when using vim-multiple-cursors
"
function! Multiple_cursors_before()
if exists('*youcompleteme#EnableCursorMovedAutocommands')
call youcompleteme#DisableCursorMovedAutocommands()
endif
endfunction
function! Multiple_cursors_after()
if exists('*youcompleteme#EnableCursorMovedAutocommands')
call youcompleteme#EnableCursorMovedAutocommands()
endif
endfunction
|
" Disable YouCompleteMe when using vim-multiple-cursors
"
function! Multiple_cursors_before()
let b:deoplete_disable_auto_complete = 1
endfunction
function! Multiple_cursors_after()
let b:deoplete_disable_auto_complete = 0
endfunction
|
Disable deoplete while using multiple cursors
|
[vim] Disable deoplete while using multiple cursors
|
VimL
|
mit
|
solarnz/dotfiles
|
viml
|
## Code Before:
" Disable YouCompleteMe when using vim-multiple-cursors
"
function! Multiple_cursors_before()
if exists('*youcompleteme#EnableCursorMovedAutocommands')
call youcompleteme#DisableCursorMovedAutocommands()
endif
endfunction
function! Multiple_cursors_after()
if exists('*youcompleteme#EnableCursorMovedAutocommands')
call youcompleteme#EnableCursorMovedAutocommands()
endif
endfunction
## Instruction:
[vim] Disable deoplete while using multiple cursors
## Code After:
" Disable YouCompleteMe when using vim-multiple-cursors
"
function! Multiple_cursors_before()
let b:deoplete_disable_auto_complete = 1
endfunction
function! Multiple_cursors_after()
let b:deoplete_disable_auto_complete = 0
endfunction
|
63136264aa4198ee15ffa1fe63601624f0fa59f6
|
pkgs/applications/editors/lifeograph/default.nix
|
pkgs/applications/editors/lifeograph/default.nix
|
{ stdenv, lib, fetchgit, pkg-config, meson, ninja
, enchant, gtkmm3, libchamplain, libgcrypt, shared-mime-info }:
stdenv.mkDerivation rec {
pname = "lifeograph";
version = "2.0.3";
src = fetchgit {
url = "https://git.launchpad.net/lifeograph";
rev = "v${version}";
sha256 = "sha256-RotbTdTtpwXmo+UKOyp93IAC6CCstv++KtnX2doN+nM=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
shared-mime-info # for update-mime-database
];
buildInputs = [
libgcrypt
enchant
gtkmm3
libchamplain
];
postInstall = ''
substituteInPlace $out/share/applications/net.sourceforge.Lifeograph.desktop \
--replace "Exec=" "Exec=$out/bin/"
'';
meta = with lib; {
homepage = "http://lifeograph.sourceforge.net/wiki/Main_Page";
description = "Lifeograph is an off-line and private journal and note taking application";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
platforms = platforms.linux;
};
}
|
{ stdenv, lib, fetchgit, pkg-config, meson, ninja, wrapGAppsHook
, enchant, gtkmm3, libchamplain, libgcrypt, shared-mime-info }:
stdenv.mkDerivation rec {
pname = "lifeograph";
version = "2.0.3";
src = fetchgit {
url = "https://git.launchpad.net/lifeograph";
rev = "v${version}";
sha256 = "sha256-RotbTdTtpwXmo+UKOyp93IAC6CCstv++KtnX2doN+nM=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
shared-mime-info # for update-mime-database
wrapGAppsHook
];
buildInputs = [
libgcrypt
enchant
gtkmm3
libchamplain
];
postInstall = ''
substituteInPlace $out/share/applications/net.sourceforge.Lifeograph.desktop \
--replace "Exec=" "Exec=$out/bin/"
'';
meta = with lib; {
homepage = "http://lifeograph.sourceforge.net/wiki/Main_Page";
description = "Lifeograph is an off-line and private journal and note taking application";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
platforms = platforms.linux;
};
}
|
Add wrapGAppsHook to lifeograph to fix issue with being unable to decrypt diaries when launched from dmenu
|
Add wrapGAppsHook to lifeograph to fix issue with being unable to decrypt diaries when launched from dmenu
Signed-off-by: fly <[email protected]>
|
Nix
|
mit
|
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs
|
nix
|
## Code Before:
{ stdenv, lib, fetchgit, pkg-config, meson, ninja
, enchant, gtkmm3, libchamplain, libgcrypt, shared-mime-info }:
stdenv.mkDerivation rec {
pname = "lifeograph";
version = "2.0.3";
src = fetchgit {
url = "https://git.launchpad.net/lifeograph";
rev = "v${version}";
sha256 = "sha256-RotbTdTtpwXmo+UKOyp93IAC6CCstv++KtnX2doN+nM=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
shared-mime-info # for update-mime-database
];
buildInputs = [
libgcrypt
enchant
gtkmm3
libchamplain
];
postInstall = ''
substituteInPlace $out/share/applications/net.sourceforge.Lifeograph.desktop \
--replace "Exec=" "Exec=$out/bin/"
'';
meta = with lib; {
homepage = "http://lifeograph.sourceforge.net/wiki/Main_Page";
description = "Lifeograph is an off-line and private journal and note taking application";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
platforms = platforms.linux;
};
}
## Instruction:
Add wrapGAppsHook to lifeograph to fix issue with being unable to decrypt diaries when launched from dmenu
Signed-off-by: fly <[email protected]>
## Code After:
{ stdenv, lib, fetchgit, pkg-config, meson, ninja, wrapGAppsHook
, enchant, gtkmm3, libchamplain, libgcrypt, shared-mime-info }:
stdenv.mkDerivation rec {
pname = "lifeograph";
version = "2.0.3";
src = fetchgit {
url = "https://git.launchpad.net/lifeograph";
rev = "v${version}";
sha256 = "sha256-RotbTdTtpwXmo+UKOyp93IAC6CCstv++KtnX2doN+nM=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
shared-mime-info # for update-mime-database
wrapGAppsHook
];
buildInputs = [
libgcrypt
enchant
gtkmm3
libchamplain
];
postInstall = ''
substituteInPlace $out/share/applications/net.sourceforge.Lifeograph.desktop \
--replace "Exec=" "Exec=$out/bin/"
'';
meta = with lib; {
homepage = "http://lifeograph.sourceforge.net/wiki/Main_Page";
description = "Lifeograph is an off-line and private journal and note taking application";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
platforms = platforms.linux;
};
}
|
630eda5ff8bc202b8bf6983ca312f161df6732d5
|
Java/ShoprAlgorithm/src/com/uwetrottmann/shopr/algorithm/model/GenericAttribute.java
|
Java/ShoprAlgorithm/src/com/uwetrottmann/shopr/algorithm/model/GenericAttribute.java
|
package com.uwetrottmann.shopr.algorithm.model;
public abstract class GenericAttribute<T> {
private T currentValue;
double[] mValueWeights;
public double[] getValueWeights() {
return mValueWeights;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
T[] values = getValueSymbols();
builder.append("[");
for (int i = 0; i < mValueWeights.length; i++) {
if (mValueWeights[i] != 0) {
builder.append(values[i]).append(":").append(mValueWeights[i]).append(" ");
}
}
builder.append("]");
return builder.toString();
}
public abstract T[] getValueSymbols();
public T currentValue() {
return currentValue;
}
public GenericAttribute<T> currentValue(T currentValue) {
this.currentValue = currentValue;
return this;
}
}
|
package com.uwetrottmann.shopr.algorithm.model;
public abstract class GenericAttribute<T> {
private T currentValue;
double[] mValueWeights;
public double[] getValueWeights() {
return mValueWeights;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
T[] values = getValueSymbols();
builder.append("[");
for (int i = 0; i < mValueWeights.length; i++) {
if (mValueWeights[i] == 1) {
return "[" + values[i] + ":" + mValueWeights[i] + "]";
}
builder.append(values[i]).append(":").append(mValueWeights[i]).append(" ");
}
builder.append("]");
return builder.toString();
}
public abstract T[] getValueSymbols();
public T currentValue() {
return currentValue;
}
public GenericAttribute<T> currentValue(T currentValue) {
this.currentValue = currentValue;
return this;
}
}
|
Print zero weights if there is no 1.0 weight.
|
Print zero weights if there is no 1.0 weight.
|
Java
|
apache-2.0
|
UweTrottmann/Shopr,adiguzel/Shopr
|
java
|
## Code Before:
package com.uwetrottmann.shopr.algorithm.model;
public abstract class GenericAttribute<T> {
private T currentValue;
double[] mValueWeights;
public double[] getValueWeights() {
return mValueWeights;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
T[] values = getValueSymbols();
builder.append("[");
for (int i = 0; i < mValueWeights.length; i++) {
if (mValueWeights[i] != 0) {
builder.append(values[i]).append(":").append(mValueWeights[i]).append(" ");
}
}
builder.append("]");
return builder.toString();
}
public abstract T[] getValueSymbols();
public T currentValue() {
return currentValue;
}
public GenericAttribute<T> currentValue(T currentValue) {
this.currentValue = currentValue;
return this;
}
}
## Instruction:
Print zero weights if there is no 1.0 weight.
## Code After:
package com.uwetrottmann.shopr.algorithm.model;
public abstract class GenericAttribute<T> {
private T currentValue;
double[] mValueWeights;
public double[] getValueWeights() {
return mValueWeights;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
T[] values = getValueSymbols();
builder.append("[");
for (int i = 0; i < mValueWeights.length; i++) {
if (mValueWeights[i] == 1) {
return "[" + values[i] + ":" + mValueWeights[i] + "]";
}
builder.append(values[i]).append(":").append(mValueWeights[i]).append(" ");
}
builder.append("]");
return builder.toString();
}
public abstract T[] getValueSymbols();
public T currentValue() {
return currentValue;
}
public GenericAttribute<T> currentValue(T currentValue) {
this.currentValue = currentValue;
return this;
}
}
|
331b9254534b57acf026db06096629ab6f33069d
|
app/mailers/georgia/notifier.rb
|
app/mailers/georgia/notifier.rb
|
module Georgia
class Notifier < ActionMailer::Base
include SendGrid
def notify_support(message)
@message = message
mail(
from: "#{@message.name} <#{@message.email}>",
to: '[email protected]',
cc: @message.email,
subject: @message.subject)
end
def notify_admins(message, url)
return if Rails.env.development? or Rails.env.test?
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.admins.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
def notify_editors(message, url)
return if Rails.env.development? or Rails.env.test?
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.editors.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
end
end
|
module Georgia
class Notifier < ActionMailer::Base
include SendGrid
def notify_support(message)
@message = message
mail(
from: "#{@message.name} <#{@message.email}>",
to: '[email protected]',
cc: @message.email,
subject: @message.subject)
end
def notify_admins(message, url)
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.admins.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
def notify_editors(message, url)
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.editors.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
end
end
|
Send emails in dev too, use letter_opener in main app
|
Send emails in dev too, use letter_opener in main app
|
Ruby
|
mit
|
georgia-cms/georgia,georgia-cms/georgia,georgia-cms/georgia
|
ruby
|
## Code Before:
module Georgia
class Notifier < ActionMailer::Base
include SendGrid
def notify_support(message)
@message = message
mail(
from: "#{@message.name} <#{@message.email}>",
to: '[email protected]',
cc: @message.email,
subject: @message.subject)
end
def notify_admins(message, url)
return if Rails.env.development? or Rails.env.test?
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.admins.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
def notify_editors(message, url)
return if Rails.env.development? or Rails.env.test?
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.editors.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
end
end
## Instruction:
Send emails in dev too, use letter_opener in main app
## Code After:
module Georgia
class Notifier < ActionMailer::Base
include SendGrid
def notify_support(message)
@message = message
mail(
from: "#{@message.name} <#{@message.email}>",
to: '[email protected]',
cc: @message.email,
subject: @message.subject)
end
def notify_admins(message, url)
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.admins.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
def notify_editors(message, url)
@message = message
@url = url
domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
emails_to = Georgia::User.editors.map(&:email)
unless emails_to.empty?
mail(
from: "do-not-reply@#{domain_name}",
to: emails_to,
subject: @message
)
end
end
end
end
|
488a596fe5bff9cc2d3ea0b70711223f2798c2a0
|
circle.yml
|
circle.yml
|
machine:
java:
version: oraclejdk8
post:
- pyenv global 2.7.9 3.5.0 3.4.3 2.6.8
environment:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
override:
- ./gradlew downloadDependencies --console plain
test:
override:
- ./gradlew build --console plain --max-workers 1 -Prelease=true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
deployment:
master:
branch: master
commands:
- ./gradlew versionBump -Prelease=true --console plain
- ./gradlew artifactoryPublish distributeBuild -Prelease=true --max-workers 1 --console plain
|
machine:
java:
version: oraclejdk8
post:
- pyenv global 2.7.9 3.5.0 3.4.3 2.6.8
- chmod --recursive a-w ~/.pyenv/versions #Builds fail when we have write permissions, so disableing it
environment:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
override:
- ./gradlew downloadDependencies --console plain
test:
override:
- ./gradlew build --console plain --max-workers 1 -Prelease=true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
deployment:
master:
branch: master
commands:
- ./gradlew versionBump -Prelease=true --console plain
- ./gradlew artifactoryPublish distributeBuild -Prelease=true --max-workers 1 --console plain
|
Disable write permissions on python venv
|
Disable write permissions on python venv
Without this it looks like there's an issue with the install of python
when we try to build a virtual env. I tested this by running the last
build in a ssh mode and ran this as quick as I could in the build.
|
YAML
|
apache-2.0
|
sixninetynine/pygradle,sixninetynine/pygradle,sixninetynine/pygradle,sixninetynine/pygradle
|
yaml
|
## Code Before:
machine:
java:
version: oraclejdk8
post:
- pyenv global 2.7.9 3.5.0 3.4.3 2.6.8
environment:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
override:
- ./gradlew downloadDependencies --console plain
test:
override:
- ./gradlew build --console plain --max-workers 1 -Prelease=true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
deployment:
master:
branch: master
commands:
- ./gradlew versionBump -Prelease=true --console plain
- ./gradlew artifactoryPublish distributeBuild -Prelease=true --max-workers 1 --console plain
## Instruction:
Disable write permissions on python venv
Without this it looks like there's an issue with the install of python
when we try to build a virtual env. I tested this by running the last
build in a ssh mode and ran this as quick as I could in the build.
## Code After:
machine:
java:
version: oraclejdk8
post:
- pyenv global 2.7.9 3.5.0 3.4.3 2.6.8
- chmod --recursive a-w ~/.pyenv/versions #Builds fail when we have write permissions, so disableing it
environment:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
override:
- ./gradlew downloadDependencies --console plain
test:
override:
- ./gradlew build --console plain --max-workers 1 -Prelease=true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
deployment:
master:
branch: master
commands:
- ./gradlew versionBump -Prelease=true --console plain
- ./gradlew artifactoryPublish distributeBuild -Prelease=true --max-workers 1 --console plain
|
ca2814e4c296e3aaf67f0930ee3567a15cbb2b3d
|
client/templates/bets_helper.js
|
client/templates/bets_helper.js
|
Template.betsList.helpers({
bets: function() {
var current_status = Session.get("status");
return Bets.find({$and: [{status: current_status}, {bettors: Session.get("user")}]})
}
});
Template.betsList.events({
"click .open-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "open")
},
"click .pending-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "pending")
},
"click .completed-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "completed")
}
})
|
Template.betsList.helpers({
bets: function() {
var current_status = Session.get( "status" );
return Bets.find({ $and:
[ { status: current_status },
{ bettors: Session.get( "user" ) }
]});
}
});
Template.betsList.events({
"click .open-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "open")
},
"click .pending-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "pending")
},
"click .completed-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "completed")
}
})
|
Refactor template.betsList helper for readability.
|
Refactor template.betsList helper for readability.
|
JavaScript
|
mit
|
nmmascia/webet,nmmascia/webet
|
javascript
|
## Code Before:
Template.betsList.helpers({
bets: function() {
var current_status = Session.get("status");
return Bets.find({$and: [{status: current_status}, {bettors: Session.get("user")}]})
}
});
Template.betsList.events({
"click .open-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "open")
},
"click .pending-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "pending")
},
"click .completed-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "completed")
}
})
## Instruction:
Refactor template.betsList helper for readability.
## Code After:
Template.betsList.helpers({
bets: function() {
var current_status = Session.get( "status" );
return Bets.find({ $and:
[ { status: current_status },
{ bettors: Session.get( "user" ) }
]});
}
});
Template.betsList.events({
"click .open-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "open")
},
"click .pending-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "pending")
},
"click .completed-button": function() {
Session.set("user", Meteor.user().username)
Session.set("status", "completed")
}
})
|
cdc613aba932c61c7c3250f12a8c7fd76db4b70e
|
functest/opnfv_tests/openstack/rally/blacklist.yaml
|
functest/opnfv_tests/openstack/rally/blacklist.yaml
|
---
scenario:
functionality:
-
functions:
- block_migration
tests:
- NovaServers.boot_server_from_volume_and_live_migrate
-
functions:
- no_migration
tests:
- NovaServers.boot_and_live_migrate_server
- NovaServers.boot_server_attach_created_volume_and_live_migrate
- NovaServers.boot_server_from_volume_and_live_migrate
- NovaServers.boot_and_migrate_server
-
functions:
- no_net_trunk_service
tests:
- '^NeutronTrunk'
-
functions:
- no_floating_ip
tests:
- HeatStacks.create_and_delete_stack
- NovaServers.boot_and_associate_floating_ip
- NovaServers.boot_server_associate_and_dissociate_floating_ip
- NeutronNetworks.create_and_delete_floating_ips
- NeutronNetworks.create_and_list_floating_ips
- NeutronNetworks.associate_and_dissociate_floating_ips
- VMTasks.dd_load_test
|
---
scenario:
functionality:
-
functions:
- block_migration
tests:
- NovaServers.boot_server_from_volume_and_live_migrate
-
functions:
- no_migration
tests:
- NovaServers.boot_and_live_migrate_server
- NovaServers.boot_server_attach_created_volume_and_live_migrate
- NovaServers.boot_server_from_volume_and_live_migrate
- NovaServers.boot_and_migrate_server
-
functions:
- no_net_trunk_service
tests:
- '^NeutronTrunk'
-
functions:
- no_floating_ip
tests:
- HeatStacks.create_and_delete_stack
- NovaServers.boot_and_associate_floating_ip
- NovaServers.boot_server_associate_and_dissociate_floating_ip
- NeutronNetworks.create_and_delete_floating_ips
- NeutronNetworks.create_and_list_floating_ips
- NeutronNetworks.associate_and_dissociate_floating_ips
- VMTasks.dd_load_test
- NeutronNetworks.create_and_delete_routers
- NeutronNetworks.create_and_list_routers
- NeutronNetworks.set_and_clear_router_gateway
- Quotas.neutron_update
|
Remove Rally Router testing if no tenant resources
|
Remove Rally Router testing if no tenant resources
It pleases airship which doesn't support neither routers and floating
ips.
Change-Id: I8b9f44c0bccd66d7808e100203f4bfea000ead2f
Signed-off-by: Cédric Ollivier <[email protected]>
|
YAML
|
apache-2.0
|
opnfv/functest,opnfv/functest
|
yaml
|
## Code Before:
---
scenario:
functionality:
-
functions:
- block_migration
tests:
- NovaServers.boot_server_from_volume_and_live_migrate
-
functions:
- no_migration
tests:
- NovaServers.boot_and_live_migrate_server
- NovaServers.boot_server_attach_created_volume_and_live_migrate
- NovaServers.boot_server_from_volume_and_live_migrate
- NovaServers.boot_and_migrate_server
-
functions:
- no_net_trunk_service
tests:
- '^NeutronTrunk'
-
functions:
- no_floating_ip
tests:
- HeatStacks.create_and_delete_stack
- NovaServers.boot_and_associate_floating_ip
- NovaServers.boot_server_associate_and_dissociate_floating_ip
- NeutronNetworks.create_and_delete_floating_ips
- NeutronNetworks.create_and_list_floating_ips
- NeutronNetworks.associate_and_dissociate_floating_ips
- VMTasks.dd_load_test
## Instruction:
Remove Rally Router testing if no tenant resources
It pleases airship which doesn't support neither routers and floating
ips.
Change-Id: I8b9f44c0bccd66d7808e100203f4bfea000ead2f
Signed-off-by: Cédric Ollivier <[email protected]>
## Code After:
---
scenario:
functionality:
-
functions:
- block_migration
tests:
- NovaServers.boot_server_from_volume_and_live_migrate
-
functions:
- no_migration
tests:
- NovaServers.boot_and_live_migrate_server
- NovaServers.boot_server_attach_created_volume_and_live_migrate
- NovaServers.boot_server_from_volume_and_live_migrate
- NovaServers.boot_and_migrate_server
-
functions:
- no_net_trunk_service
tests:
- '^NeutronTrunk'
-
functions:
- no_floating_ip
tests:
- HeatStacks.create_and_delete_stack
- NovaServers.boot_and_associate_floating_ip
- NovaServers.boot_server_associate_and_dissociate_floating_ip
- NeutronNetworks.create_and_delete_floating_ips
- NeutronNetworks.create_and_list_floating_ips
- NeutronNetworks.associate_and_dissociate_floating_ips
- VMTasks.dd_load_test
- NeutronNetworks.create_and_delete_routers
- NeutronNetworks.create_and_list_routers
- NeutronNetworks.set_and_clear_router_gateway
- Quotas.neutron_update
|
ddabc040c4215984c776e4a8fc4be021c4fca1b7
|
README.md
|
README.md
|
Editor2PDF
==========
Overview
--------
This software makes it possible to attach an annotation to an arbitrary MPS editor cell and render the cell to a PDF file output. The software uses iText to output PDF.
Usage
-----
This language provides an annotation that makes it possible to mark an editor cell for rendering to PDF format. Adding the annotation is possible on any MPS concept (BaseConcept and descendants). To render to PDF, you need to provide an output directory and a file basename. After you have completed this step, you can use the intention "Render to PDF" available on the annotation as many times as you need to regenerate the PDF output. The PDF output will display the content of the editor as it appears in MPS.
Credits
-------
PDF files are generated with IText. See http://itext.com/
License
-------
Editor2PDF is distributed under the terms of the AFFERO GENERAL PUBLIC LICENSE, in agreement with the open-source license of iText.
Tutorial
--------
See the following figures to learn how to use the Editor2PDF:



And the result can be seen [here](figures/MyClass.pdf)
|
Editor2PDF
==========
Overview
--------
This software makes it possible to attach an annotation to an arbitrary MPS editor cell and render the cell to a PDF file output. The software uses iText to output PDF.
Usage
-----
This language provides an annotation that makes it possible to mark an editor cell for rendering to PDF format. Adding the annotation is possible on any MPS concept (BaseConcept and descendants). To render to PDF, you need to provide an output directory and a file basename. After you have completed this step, you can use the intention "Render to PDF" available on the annotation as many times as you need to regenerate the PDF output. The PDF output will display the content of the editor as it appears in MPS.
Credits
-------
PDF files are generated with IText. See http://itext.com/
License
-------
Editor2PDF is distributed under the terms of the AFFERO GENERAL PUBLIC LICENSE, in agreement with the open-source license of iText.
Tutorial
--------
See the following figures to learn how to use the Editor2PDF:



And the result can be seen [here](figures/MyClass.pdf)
New to MPS?
-----------
See this book:
The MPS Language Workbench: Volume I. 2014. Fabien Campagne (http://books.campagnelab.org).

|
Add an ad for the book
|
Add an ad for the book
|
Markdown
|
agpl-3.0
|
CampagneLaboratory/Editor2PDF
|
markdown
|
## Code Before:
Editor2PDF
==========
Overview
--------
This software makes it possible to attach an annotation to an arbitrary MPS editor cell and render the cell to a PDF file output. The software uses iText to output PDF.
Usage
-----
This language provides an annotation that makes it possible to mark an editor cell for rendering to PDF format. Adding the annotation is possible on any MPS concept (BaseConcept and descendants). To render to PDF, you need to provide an output directory and a file basename. After you have completed this step, you can use the intention "Render to PDF" available on the annotation as many times as you need to regenerate the PDF output. The PDF output will display the content of the editor as it appears in MPS.
Credits
-------
PDF files are generated with IText. See http://itext.com/
License
-------
Editor2PDF is distributed under the terms of the AFFERO GENERAL PUBLIC LICENSE, in agreement with the open-source license of iText.
Tutorial
--------
See the following figures to learn how to use the Editor2PDF:



And the result can be seen [here](figures/MyClass.pdf)
## Instruction:
Add an ad for the book
## Code After:
Editor2PDF
==========
Overview
--------
This software makes it possible to attach an annotation to an arbitrary MPS editor cell and render the cell to a PDF file output. The software uses iText to output PDF.
Usage
-----
This language provides an annotation that makes it possible to mark an editor cell for rendering to PDF format. Adding the annotation is possible on any MPS concept (BaseConcept and descendants). To render to PDF, you need to provide an output directory and a file basename. After you have completed this step, you can use the intention "Render to PDF" available on the annotation as many times as you need to regenerate the PDF output. The PDF output will display the content of the editor as it appears in MPS.
Credits
-------
PDF files are generated with IText. See http://itext.com/
License
-------
Editor2PDF is distributed under the terms of the AFFERO GENERAL PUBLIC LICENSE, in agreement with the open-source license of iText.
Tutorial
--------
See the following figures to learn how to use the Editor2PDF:



And the result can be seen [here](figures/MyClass.pdf)
New to MPS?
-----------
See this book:
The MPS Language Workbench: Volume I. 2014. Fabien Campagne (http://books.campagnelab.org).

|
60da2bdd3a0ba3c259a1fee62b5f6b122116cbd5
|
spec/support/shared_examples.rb
|
spec/support/shared_examples.rb
|
shared_examples :node_set do |options|
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.length.should == options[:length]
end
end
shared_examples :empty_node_set do
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.empty?.should == true
end
end
|
RSpec.shared_examples :node_set do |options|
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.length.should == options[:length]
end
end
RSpec.shared_examples :empty_node_set do
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.empty?.should == true
end
end
|
Use RSpec.shared_example vs just shared_example.
|
Use RSpec.shared_example vs just shared_example.
|
Ruby
|
mpl-2.0
|
altmetric/oga,dfockler/oga,jeffreybaird/oga,altmetric/oga,altmetric/oga,jeffreybaird/oga,dfockler/oga,jeffreybaird/oga,YorickPeterse/oga,altmetric/oga,altmetric/oga,YorickPeterse/oga,YorickPeterse/oga,dfockler/oga,jeffreybaird/oga,dfockler/oga,YorickPeterse/oga,ttasanen/oga,ttasanen/oga,jeffreybaird/oga,dfockler/oga,ttasanen/oga,ttasanen/oga,ttasanen/oga,YorickPeterse/oga
|
ruby
|
## Code Before:
shared_examples :node_set do |options|
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.length.should == options[:length]
end
end
shared_examples :empty_node_set do
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.empty?.should == true
end
end
## Instruction:
Use RSpec.shared_example vs just shared_example.
## Code After:
RSpec.shared_examples :node_set do |options|
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.length.should == options[:length]
end
end
RSpec.shared_examples :empty_node_set do
example 'return a NodeSet instance' do
@set.is_a?(Oga::XML::NodeSet).should == true
end
example 'return the right amount of rows' do
@set.empty?.should == true
end
end
|
16745bf68c8f6fa0d967cae8a8c0bf884709c5f5
|
doc/source/api.rst
|
doc/source/api.rst
|
API
===
This page contains a comprehensive list of all functions within ``toolz``.
Docstrings should provide sufficient understanding for any individual function.
Itertoolz
---------
.. currentmodule:: toolz.itertoolz
.. autosummary::
accumulate
concat
concatv
cons
count
drop
first
frequencies
get
groupby
interleave
interpose
isdistinct
isiterable
iterate
last
mapcat
merge_sorted
nth
partition
partition_all
reduceby
remove
second
sliding_window
take
take_nth
unique
.. currentmodule:: toolz.recipes
.. autosummary::
countby
partitionby
Functoolz
---------
.. currentmodule:: toolz.functoolz
.. autosummary::
complement
compose
memoize
pipe
thread_first
thread_last
Dicttoolz
---------
.. currentmodule:: toolz.dicttoolz
.. autosummary::
assoc
keymap
merge
merge_with
update_in
valmap
Sandbox
-------
.. currentmodule:: toolz.sandbox
.. autosummary::
parallel.fold
core.jackknife
core.side_effects
Definitions
-----------
.. automodule:: toolz.itertoolz
:members:
.. automodule:: toolz.itertoolz.recipes
:members:
.. automodule:: toolz.functoolz
:members:
.. automodule:: toolz.dicttoolz
:members:
.. automodule:: toolz.sandbox.core
:members:
.. automodule:: toolz.sandbox.parallel
:members:
|
API
===
This page contains a comprehensive list of all functions within ``toolz``.
Docstrings should provide sufficient understanding for any individual function.
Itertoolz
---------
.. currentmodule:: toolz.itertoolz
.. autosummary::
accumulate
concat
concatv
cons
count
drop
first
frequencies
get
groupby
interleave
interpose
isdistinct
isiterable
iterate
last
mapcat
merge_sorted
nth
partition
partition_all
reduceby
remove
second
sliding_window
take
take_nth
unique
.. currentmodule:: toolz.recipes
.. autosummary::
countby
partitionby
Functoolz
---------
.. currentmodule:: toolz.functoolz
.. autosummary::
complement
compose
memoize
pipe
thread_first
thread_last
Dicttoolz
---------
.. currentmodule:: toolz.dicttoolz
.. autosummary::
assoc
keymap
merge
merge_with
update_in
valmap
Sandbox
-------
.. currentmodule:: toolz.sandbox
.. autosummary::
parallel.fold
core.side_effects
Definitions
-----------
.. automodule:: toolz.itertoolz
:members:
.. automodule:: toolz.itertoolz.recipes
:members:
.. automodule:: toolz.functoolz
:members:
.. automodule:: toolz.dicttoolz
:members:
.. automodule:: toolz.sandbox.core
:members:
.. automodule:: toolz.sandbox.parallel
:members:
|
Remove `jackknife` from docs too.
|
Remove `jackknife` from docs too.
|
reStructuredText
|
bsd-3-clause
|
jdmcbr/toolz,machinelearningdeveloper/toolz,berrytj/toolz,llllllllll/toolz,machinelearningdeveloper/toolz,jcrist/toolz,simudream/toolz,jdmcbr/toolz,karansag/toolz,pombredanne/toolz,berrytj/toolz,bartvm/toolz,llllllllll/toolz,bartvm/toolz,simudream/toolz,karansag/toolz,cpcloud/toolz,jcrist/toolz,quantopian/toolz,cpcloud/toolz,pombredanne/toolz,quantopian/toolz
|
restructuredtext
|
## Code Before:
API
===
This page contains a comprehensive list of all functions within ``toolz``.
Docstrings should provide sufficient understanding for any individual function.
Itertoolz
---------
.. currentmodule:: toolz.itertoolz
.. autosummary::
accumulate
concat
concatv
cons
count
drop
first
frequencies
get
groupby
interleave
interpose
isdistinct
isiterable
iterate
last
mapcat
merge_sorted
nth
partition
partition_all
reduceby
remove
second
sliding_window
take
take_nth
unique
.. currentmodule:: toolz.recipes
.. autosummary::
countby
partitionby
Functoolz
---------
.. currentmodule:: toolz.functoolz
.. autosummary::
complement
compose
memoize
pipe
thread_first
thread_last
Dicttoolz
---------
.. currentmodule:: toolz.dicttoolz
.. autosummary::
assoc
keymap
merge
merge_with
update_in
valmap
Sandbox
-------
.. currentmodule:: toolz.sandbox
.. autosummary::
parallel.fold
core.jackknife
core.side_effects
Definitions
-----------
.. automodule:: toolz.itertoolz
:members:
.. automodule:: toolz.itertoolz.recipes
:members:
.. automodule:: toolz.functoolz
:members:
.. automodule:: toolz.dicttoolz
:members:
.. automodule:: toolz.sandbox.core
:members:
.. automodule:: toolz.sandbox.parallel
:members:
## Instruction:
Remove `jackknife` from docs too.
## Code After:
API
===
This page contains a comprehensive list of all functions within ``toolz``.
Docstrings should provide sufficient understanding for any individual function.
Itertoolz
---------
.. currentmodule:: toolz.itertoolz
.. autosummary::
accumulate
concat
concatv
cons
count
drop
first
frequencies
get
groupby
interleave
interpose
isdistinct
isiterable
iterate
last
mapcat
merge_sorted
nth
partition
partition_all
reduceby
remove
second
sliding_window
take
take_nth
unique
.. currentmodule:: toolz.recipes
.. autosummary::
countby
partitionby
Functoolz
---------
.. currentmodule:: toolz.functoolz
.. autosummary::
complement
compose
memoize
pipe
thread_first
thread_last
Dicttoolz
---------
.. currentmodule:: toolz.dicttoolz
.. autosummary::
assoc
keymap
merge
merge_with
update_in
valmap
Sandbox
-------
.. currentmodule:: toolz.sandbox
.. autosummary::
parallel.fold
core.side_effects
Definitions
-----------
.. automodule:: toolz.itertoolz
:members:
.. automodule:: toolz.itertoolz.recipes
:members:
.. automodule:: toolz.functoolz
:members:
.. automodule:: toolz.dicttoolz
:members:
.. automodule:: toolz.sandbox.core
:members:
.. automodule:: toolz.sandbox.parallel
:members:
|
a1410f1c0d85b1a0a7f74156447edf65bd74c57b
|
Package.swift
|
Package.swift
|
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let pkgName = "gir2swift"
let package = Package(
name: pkgName,
dependencies: [ .package(url: "https://github.com/rhx/SwiftLibXML.git", from: "2.0.0"), ],
targets: [
.target(name: pkgName, dependencies: ["SwiftLibXML"]),
.testTarget(name: "\(pkgName)Tests", dependencies: [.byNameItem(name: pkgName)]),
]
)
|
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let pkgName = "gir2swift"
let package = Package(
name: pkgName,
dependencies: [ .package(url: "https://github.com/rhx/SwiftLibXML.git", .branch("master")) ],
targets: [
.target(name: pkgName, dependencies: ["SwiftLibXML"]),
.testTarget(name: "\(pkgName)Tests", dependencies: [.byNameItem(name: pkgName)]),
]
)
|
Use SwiftLibXML from master branch
|
Use SwiftLibXML from master branch
|
Swift
|
bsd-2-clause
|
rhx/gir2swift,rhx/gir2swift
|
swift
|
## Code Before:
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let pkgName = "gir2swift"
let package = Package(
name: pkgName,
dependencies: [ .package(url: "https://github.com/rhx/SwiftLibXML.git", from: "2.0.0"), ],
targets: [
.target(name: pkgName, dependencies: ["SwiftLibXML"]),
.testTarget(name: "\(pkgName)Tests", dependencies: [.byNameItem(name: pkgName)]),
]
)
## Instruction:
Use SwiftLibXML from master branch
## Code After:
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let pkgName = "gir2swift"
let package = Package(
name: pkgName,
dependencies: [ .package(url: "https://github.com/rhx/SwiftLibXML.git", .branch("master")) ],
targets: [
.target(name: pkgName, dependencies: ["SwiftLibXML"]),
.testTarget(name: "\(pkgName)Tests", dependencies: [.byNameItem(name: pkgName)]),
]
)
|
b54ba570fbb835d67a5a2f3b58fdde20ac6489a4
|
config/tagging-apps.yml
|
config/tagging-apps.yml
|
a-migrated-app: content-tagger # for testing puposes
businesssupportfinder: content-tagger
calculators: content-tagger
calendars: content-tagger
collections-publisher: content-tagger
contacts: panopticon
contacts-admin:
design-principles:
email-campaign-frontend:
external-link-tracker:
feedback:
frontend:
govuk_content_api:
hmrc-manuals-api: content-tagger
info-frontend:
licencefinder: content-tagger
manuals-frontend:
performanceplatform-big-screen-view:
policy-publisher: content-tagger
publisher: publisher
rummager:
service-manual-publisher:
short-url-manager:
smartanswers: content-tagger
specialist-publisher: specialist-publisher
spotlight:
static:
tariff:
travel-advice-publisher:
whitehall: whitehall
|
a-migrated-app: content-tagger # for testing puposes
businesssupportfinder: content-tagger
calculators: content-tagger
calendars: content-tagger
collections-publisher: content-tagger
contacts: content-tagger
contacts-admin: content-tagger
design-principles:
email-campaign-frontend:
external-link-tracker:
feedback:
frontend:
govuk_content_api:
hmrc-manuals-api: content-tagger
info-frontend:
licencefinder: content-tagger
manuals-frontend:
performanceplatform-big-screen-view:
policy-publisher: content-tagger
publisher: publisher
rummager:
service-manual-publisher:
short-url-manager:
smartanswers: content-tagger
specialist-publisher: specialist-publisher
spotlight:
static:
tariff:
travel-advice-publisher:
whitehall: whitehall
|
Allow contacts pages to be tagged
|
Allow contacts pages to be tagged
contacts-admin has been migrated since alphagov/contacts-admin#231.
|
YAML
|
mit
|
alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger
|
yaml
|
## Code Before:
a-migrated-app: content-tagger # for testing puposes
businesssupportfinder: content-tagger
calculators: content-tagger
calendars: content-tagger
collections-publisher: content-tagger
contacts: panopticon
contacts-admin:
design-principles:
email-campaign-frontend:
external-link-tracker:
feedback:
frontend:
govuk_content_api:
hmrc-manuals-api: content-tagger
info-frontend:
licencefinder: content-tagger
manuals-frontend:
performanceplatform-big-screen-view:
policy-publisher: content-tagger
publisher: publisher
rummager:
service-manual-publisher:
short-url-manager:
smartanswers: content-tagger
specialist-publisher: specialist-publisher
spotlight:
static:
tariff:
travel-advice-publisher:
whitehall: whitehall
## Instruction:
Allow contacts pages to be tagged
contacts-admin has been migrated since alphagov/contacts-admin#231.
## Code After:
a-migrated-app: content-tagger # for testing puposes
businesssupportfinder: content-tagger
calculators: content-tagger
calendars: content-tagger
collections-publisher: content-tagger
contacts: content-tagger
contacts-admin: content-tagger
design-principles:
email-campaign-frontend:
external-link-tracker:
feedback:
frontend:
govuk_content_api:
hmrc-manuals-api: content-tagger
info-frontend:
licencefinder: content-tagger
manuals-frontend:
performanceplatform-big-screen-view:
policy-publisher: content-tagger
publisher: publisher
rummager:
service-manual-publisher:
short-url-manager:
smartanswers: content-tagger
specialist-publisher: specialist-publisher
spotlight:
static:
tariff:
travel-advice-publisher:
whitehall: whitehall
|
821a0a97f549c8130a0f3944c6d076385fee328b
|
templates/syn-groupsearchlist.tpl
|
templates/syn-groupsearchlist.tpl
|
{foreach $results as $result}
<div class="col-md-6">
{assign var=grpname value="syn_organicgrp_`$result.object_id`"}
{if not $grpname|in_group}
{include file="syn-groupsbox.tpl" private="{if $result.status == 'o'}n{elseif $result.status == 'p'}y{/if}"}
{/if}
</div>
{/foreach}
|
{foreach $results as $result}
{assign var=grpname value="syn_organicgrp_`$result.object_id`"}
{if not $grpname|in_group}
<div class="col-md-6">
{include file="syn-groupsbox.tpl" private="{if $result.status == 'o'}n{elseif $result.status == 'p'}y{/if}"}
</div>
{/if}
{/foreach}
|
Join Collaborations - The first search result starts at the wrong location.
|
Join Collaborations - The first search result starts at the wrong location.
|
Smarty
|
lgpl-2.1
|
citadelrock/organicgrp,rjsmelo/syn_organicgrp,citadelrock/syn_organicgrp
|
smarty
|
## Code Before:
{foreach $results as $result}
<div class="col-md-6">
{assign var=grpname value="syn_organicgrp_`$result.object_id`"}
{if not $grpname|in_group}
{include file="syn-groupsbox.tpl" private="{if $result.status == 'o'}n{elseif $result.status == 'p'}y{/if}"}
{/if}
</div>
{/foreach}
## Instruction:
Join Collaborations - The first search result starts at the wrong location.
## Code After:
{foreach $results as $result}
{assign var=grpname value="syn_organicgrp_`$result.object_id`"}
{if not $grpname|in_group}
<div class="col-md-6">
{include file="syn-groupsbox.tpl" private="{if $result.status == 'o'}n{elseif $result.status == 'p'}y{/if}"}
</div>
{/if}
{/foreach}
|
3543329984af5f97fa27b7785e15e40e203382ef
|
plugins/flowdock/config.json
|
plugins/flowdock/config.json
|
{
"name": "Flowdock",
"description": "Post to a Flowdock inbox",
"supportedTriggers": "all",
"fields": [
{
"name": "apiToken",
"label": "Flow API token",
"description": "The API token of the Flow to send notifications to"
}
]
}
|
{
"name": "Flowdock",
"description": "Post to a Flowdock inbox",
"supportedTriggers": "all",
"fields": [
{
"name": "apiToken",
"label": "Flow API token",
"description": "The API token of the Flow to send notifications to",
"link": "https://www.flowdock.com/account/tokens"
}
]
}
|
Add link to flowdock apiToken
|
Add link to flowdock apiToken
|
JSON
|
mit
|
kstream001/bugsnag-notification-plugins,sharesight/bugsnag-notification-plugins,korealert/bugsnag-notification-plugins,jacobmarshall/bugsnag-notification-plugins,cagedata/bugsnag-notification-plugins,6wunderkinder/bugsnag-notification-plugins,6wunderkinder/bugsnag-notification-plugins,indirect/bugsnag-notification-plugins,korealert/bugsnag-notification-plugins,pushed/bugsnag-notification-plugins
|
json
|
## Code Before:
{
"name": "Flowdock",
"description": "Post to a Flowdock inbox",
"supportedTriggers": "all",
"fields": [
{
"name": "apiToken",
"label": "Flow API token",
"description": "The API token of the Flow to send notifications to"
}
]
}
## Instruction:
Add link to flowdock apiToken
## Code After:
{
"name": "Flowdock",
"description": "Post to a Flowdock inbox",
"supportedTriggers": "all",
"fields": [
{
"name": "apiToken",
"label": "Flow API token",
"description": "The API token of the Flow to send notifications to",
"link": "https://www.flowdock.com/account/tokens"
}
]
}
|
9be0fc0a90a2893a6b82ef55bf37aa4c0e8784dc
|
README.md
|
README.md
|
String phone
============
.. image:: https://travis-ci.org/skorokithakis/stringphone.png?branch=master
:target: https://travis-ci.org/skorokithakis/stringphone
String phone is a secure communications library and protocol geared towards embedded devices. It is still a prototype.
Be warned that anything may change at any point right now.
* License: String phone is released under the BSD license.
* Documentation: Documentation can be found at https://stringphone.readthedocs.org/
|
String phone
============
[](https://travis-ci.org/skorokithakis/stringphone)
String phone is a secure communications library and protocol geared towards embedded devices. It is still a prototype.
Be warned that anything may change at any point right now.
* License: String phone is released under the BSD license.
* Documentation: Documentation can be found at https://stringphone.readthedocs.org/
|
Use the correct build badge.
|
Use the correct build badge.
|
Markdown
|
bsd-3-clause
|
skorokithakis/stringphone
|
markdown
|
## Code Before:
String phone
============
.. image:: https://travis-ci.org/skorokithakis/stringphone.png?branch=master
:target: https://travis-ci.org/skorokithakis/stringphone
String phone is a secure communications library and protocol geared towards embedded devices. It is still a prototype.
Be warned that anything may change at any point right now.
* License: String phone is released under the BSD license.
* Documentation: Documentation can be found at https://stringphone.readthedocs.org/
## Instruction:
Use the correct build badge.
## Code After:
String phone
============
[](https://travis-ci.org/skorokithakis/stringphone)
String phone is a secure communications library and protocol geared towards embedded devices. It is still a prototype.
Be warned that anything may change at any point right now.
* License: String phone is released under the BSD license.
* Documentation: Documentation can be found at https://stringphone.readthedocs.org/
|
55b90e8839148197deb0cabaced5c7788fcf8933
|
lib/upstreamer/cli.rb
|
lib/upstreamer/cli.rb
|
require 'octokit'
require 'rugged'
module Upstreamer
class CLI
def self.run(argv = ARGV)
self.new(argv).run
end
def initialize(argv = ARGV)
@argv = argv
end
def run
directory = specified_directory || current_directory
repo = Rugged::Repository.new(directory)
if repo.remotes['upstream']
puts "Error: Remote 'upstream' already exists. (#{repo.remotes['upstream'].url})"
return
end
remote = repo.remotes['origin'] # https://github.com/meganemura/bundler.git
username_repository = remote.url[/github.com\/(.*)\.git/, 1] # meganemura/bundler
repository = Octokit.repository(username_repository)
unless repository.fork?
puts 'Error: this repository is not forked repository'
return
end
upstream_url = repository.parent.clone_url
repo.remotes.create('upstream', upstream_url)
puts "git remote add upstream #{upstream_url}"
end
def specified_directory
@argv.first
end
def current_directory
Dir.pwd
end
end
end
|
require 'octokit'
require 'rugged'
module Upstreamer
class CLI
def self.run(argv = ARGV)
self.new(argv).run
end
def initialize(argv = ARGV)
@argv = argv
end
def run
directory = specified_directory || current_directory
repo = Rugged::Repository.new(directory)
if repo.remotes['upstream']
STDERR.puts "Error: Remote 'upstream' already exists. (#{repo.remotes['upstream'].url})"
return
end
remote = repo.remotes['origin'] # https://github.com/meganemura/bundler.git
username_repository = remote.url[/github.com\/(.*)\.git/, 1] # meganemura/bundler
repository = Octokit.repository(username_repository)
unless repository.fork?
STDERR.puts 'Error: this repository is not forked repository'
return
end
upstream_url = repository.parent.clone_url
repo.remotes.create('upstream', upstream_url)
puts "git remote add upstream #{upstream_url}"
end
def specified_directory
@argv.first
end
def current_directory
Dir.pwd
end
end
end
|
Modify error message to write to STDERR
|
Modify error message to write to STDERR
|
Ruby
|
mit
|
meganemura/upstreamer
|
ruby
|
## Code Before:
require 'octokit'
require 'rugged'
module Upstreamer
class CLI
def self.run(argv = ARGV)
self.new(argv).run
end
def initialize(argv = ARGV)
@argv = argv
end
def run
directory = specified_directory || current_directory
repo = Rugged::Repository.new(directory)
if repo.remotes['upstream']
puts "Error: Remote 'upstream' already exists. (#{repo.remotes['upstream'].url})"
return
end
remote = repo.remotes['origin'] # https://github.com/meganemura/bundler.git
username_repository = remote.url[/github.com\/(.*)\.git/, 1] # meganemura/bundler
repository = Octokit.repository(username_repository)
unless repository.fork?
puts 'Error: this repository is not forked repository'
return
end
upstream_url = repository.parent.clone_url
repo.remotes.create('upstream', upstream_url)
puts "git remote add upstream #{upstream_url}"
end
def specified_directory
@argv.first
end
def current_directory
Dir.pwd
end
end
end
## Instruction:
Modify error message to write to STDERR
## Code After:
require 'octokit'
require 'rugged'
module Upstreamer
class CLI
def self.run(argv = ARGV)
self.new(argv).run
end
def initialize(argv = ARGV)
@argv = argv
end
def run
directory = specified_directory || current_directory
repo = Rugged::Repository.new(directory)
if repo.remotes['upstream']
STDERR.puts "Error: Remote 'upstream' already exists. (#{repo.remotes['upstream'].url})"
return
end
remote = repo.remotes['origin'] # https://github.com/meganemura/bundler.git
username_repository = remote.url[/github.com\/(.*)\.git/, 1] # meganemura/bundler
repository = Octokit.repository(username_repository)
unless repository.fork?
STDERR.puts 'Error: this repository is not forked repository'
return
end
upstream_url = repository.parent.clone_url
repo.remotes.create('upstream', upstream_url)
puts "git remote add upstream #{upstream_url}"
end
def specified_directory
@argv.first
end
def current_directory
Dir.pwd
end
end
end
|
a58ca51f48b168cfc6d0539868bf477643eed37b
|
README.md
|
README.md
|
Default settings assign users by id to one of two equally sized buckets, "a" and "b", and pass the bucket name to the app via the env object.
**Note:** This code contains no logging. We would need to log bucket impressions and subsequent actions to compare performance between buckets.
## Basic usage
1. Set the user id in a cookie called _user_id_
1. Add Rack::AB to your code
use Rack::AB
# ...
if 'a' == env['rack.ab.bucket_name']
body = 'content for bucket a'
else
body = 'content for bucket b'
end
# ...
[200, {}, body]
1. Call app
In development, we can force a bucket by setting a cookie named _rack_ab_ to the bucket name.
## Configuration
* set buckets, e.g. 10% "control" and 10% "fancy_bucket"
* set user id cookie name
* set override cookie name
Configure like this
use Rack::AB, :buckets => [{'control' => 10}, {'new_feature' => 10}]
# ...
Any and all feedback welcome.
|
Default settings assign users by id to one of two equally sized buckets, "a" and "b", and pass the bucket name to the app via the env object.
**Note:** This code contains no logging. We would need to log bucket impressions and subsequent actions to compare performance between buckets.
## Basic usage
1. Set the user id in a cookie called _user_id_
1. Add Rack::AB to your code
use Rack::AB
# ...
if 'a' == env['rack.ab.bucket_name']
body = 'content for bucket a'
else
body = 'content for bucket b'
end
# ...
[200, {}, body]
1. Call app
In development, we can force a bucket by setting a cookie named _rack_ab_ to the bucket name.
## Configuration
* set buckets, e.g. 10% "control" and 10% "fancy_bucket"
* set user id cookie name
* set override cookie name
Configure like this
use Rack::AB, :buckets => [{'control' => 10}, {'new_feature' => 10}]
# ...
Any and all feedback welcome.
|
Adjust formatting of code block in list
|
Adjust formatting of code block in list
|
Markdown
|
apache-2.0
|
erikeldridge/rack-ab
|
markdown
|
## Code Before:
Default settings assign users by id to one of two equally sized buckets, "a" and "b", and pass the bucket name to the app via the env object.
**Note:** This code contains no logging. We would need to log bucket impressions and subsequent actions to compare performance between buckets.
## Basic usage
1. Set the user id in a cookie called _user_id_
1. Add Rack::AB to your code
use Rack::AB
# ...
if 'a' == env['rack.ab.bucket_name']
body = 'content for bucket a'
else
body = 'content for bucket b'
end
# ...
[200, {}, body]
1. Call app
In development, we can force a bucket by setting a cookie named _rack_ab_ to the bucket name.
## Configuration
* set buckets, e.g. 10% "control" and 10% "fancy_bucket"
* set user id cookie name
* set override cookie name
Configure like this
use Rack::AB, :buckets => [{'control' => 10}, {'new_feature' => 10}]
# ...
Any and all feedback welcome.
## Instruction:
Adjust formatting of code block in list
## Code After:
Default settings assign users by id to one of two equally sized buckets, "a" and "b", and pass the bucket name to the app via the env object.
**Note:** This code contains no logging. We would need to log bucket impressions and subsequent actions to compare performance between buckets.
## Basic usage
1. Set the user id in a cookie called _user_id_
1. Add Rack::AB to your code
use Rack::AB
# ...
if 'a' == env['rack.ab.bucket_name']
body = 'content for bucket a'
else
body = 'content for bucket b'
end
# ...
[200, {}, body]
1. Call app
In development, we can force a bucket by setting a cookie named _rack_ab_ to the bucket name.
## Configuration
* set buckets, e.g. 10% "control" and 10% "fancy_bucket"
* set user id cookie name
* set override cookie name
Configure like this
use Rack::AB, :buckets => [{'control' => 10}, {'new_feature' => 10}]
# ...
Any and all feedback welcome.
|
789acb55b2747f7ba274127c05f8350969ce14e9
|
tests/get_focus_callback.rs
|
tests/get_focus_callback.rs
|
/* Copyright 2016 Jordan Miner
*
* Licensed under the MIT license <LICENSE or
* http://opensource.org/licenses/MIT>. This file may not be copied,
* modified, or distributed except according to those terms.
*/
#[macro_use]
extern crate clear_coat;
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering};
use std::cell::RefCell;
use std::rc::Rc;
use clear_coat::*;
use clear_coat::common_attrs_cbs::*;
// Tests that the get_focus callback works (which is most likely a test that the `simple_callback` function works).
static COUNTER: AtomicIsize = ATOMIC_ISIZE_INIT;
#[test]
fn test_get_focus_callback() {
let button = Button::new();
button.get_focus_event().add(move || { COUNTER.store(2, Ordering::Release); exit_loop(); });
let dialog = Dialog::with_child(&vbox!(&button));
//dialog.show_event().add(|_| CallbackAction::Close);
dialog.show_xy(ScreenPosition::Center, ScreenPosition::Center).expect("could not show dialog");
main_loop();
assert_eq!(COUNTER.load(Ordering::Acquire), 2);
}
|
/* Copyright 2016 Jordan Miner
*
* Licensed under the MIT license <LICENSE or
* http://opensource.org/licenses/MIT>. This file may not be copied,
* modified, or distributed except according to those terms.
*/
#[macro_use]
extern crate clear_coat;
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering};
use clear_coat::*;
use clear_coat::common_attrs_cbs::*;
// Tests that the get_focus callback works (which is most likely a test that the `simple_callback` function works).
static COUNTER: AtomicIsize = ATOMIC_ISIZE_INIT;
#[test]
fn test_get_focus_callback() {
let button = Button::new();
button.get_focus_event().add(move || { COUNTER.store(2, Ordering::Release); exit_loop(); });
let dialog = Dialog::with_child(&vbox!(&button));
//dialog.show_event().add(|_| CallbackAction::Close);
dialog.show_xy(ScreenPosition::Center, ScreenPosition::Center).expect("could not show dialog");
main_loop();
assert_eq!(COUNTER.load(Ordering::Acquire), 2);
}
|
Remove a couple of unused imports
|
Remove a couple of unused imports
|
Rust
|
mit
|
jminer/clear-coat
|
rust
|
## Code Before:
/* Copyright 2016 Jordan Miner
*
* Licensed under the MIT license <LICENSE or
* http://opensource.org/licenses/MIT>. This file may not be copied,
* modified, or distributed except according to those terms.
*/
#[macro_use]
extern crate clear_coat;
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering};
use std::cell::RefCell;
use std::rc::Rc;
use clear_coat::*;
use clear_coat::common_attrs_cbs::*;
// Tests that the get_focus callback works (which is most likely a test that the `simple_callback` function works).
static COUNTER: AtomicIsize = ATOMIC_ISIZE_INIT;
#[test]
fn test_get_focus_callback() {
let button = Button::new();
button.get_focus_event().add(move || { COUNTER.store(2, Ordering::Release); exit_loop(); });
let dialog = Dialog::with_child(&vbox!(&button));
//dialog.show_event().add(|_| CallbackAction::Close);
dialog.show_xy(ScreenPosition::Center, ScreenPosition::Center).expect("could not show dialog");
main_loop();
assert_eq!(COUNTER.load(Ordering::Acquire), 2);
}
## Instruction:
Remove a couple of unused imports
## Code After:
/* Copyright 2016 Jordan Miner
*
* Licensed under the MIT license <LICENSE or
* http://opensource.org/licenses/MIT>. This file may not be copied,
* modified, or distributed except according to those terms.
*/
#[macro_use]
extern crate clear_coat;
use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering};
use clear_coat::*;
use clear_coat::common_attrs_cbs::*;
// Tests that the get_focus callback works (which is most likely a test that the `simple_callback` function works).
static COUNTER: AtomicIsize = ATOMIC_ISIZE_INIT;
#[test]
fn test_get_focus_callback() {
let button = Button::new();
button.get_focus_event().add(move || { COUNTER.store(2, Ordering::Release); exit_loop(); });
let dialog = Dialog::with_child(&vbox!(&button));
//dialog.show_event().add(|_| CallbackAction::Close);
dialog.show_xy(ScreenPosition::Center, ScreenPosition::Center).expect("could not show dialog");
main_loop();
assert_eq!(COUNTER.load(Ordering::Acquire), 2);
}
|
c2f3776d68d86441a264acea244c6b7fe40b2b9f
|
README.md
|
README.md
|
[](http://travis-ci.org/realityforge/gwt-mmvp)
[<img src="https://img.shields.io/maven-central/v/org.realityforge.gwt.mmvp/gwt-mmvp.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.mmvp%22%20a%3A%22gwt-mmvp%22)
A micro MVP library that enhances the Activities and Places library.
|
[](http://travis-ci.org/realityforge/gwt-mmvp)
[<img src="https://img.shields.io/maven-central/v/org.realityforge.gwt.mmvp/gwt-mmvp.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.mmvp%22%20a%3A%22gwt-mmvp%22)
A micro MVP library that enhances the Activities and Places library.
## Quick Start
The simplest way to use the library is to add the following dependency
into the build system. i.e.
```xml
<dependency>
<groupId>org.realityforge.gwt.mmvp</groupId>
<artifactId>gwt-mmvp</artifactId>
<version>0.6</version>
<scope>provided</scope>
</dependency>
```
Then you add the following snippet into the .gwt.xml file.
```xml
<module rename-to='myapp'>
...
<!-- Enable the mmvp library -->
<inherits name="org.realityforge.gwt.mmvp.MMVP"/>
</module>
```
|
Add a bit more documentation
|
Add a bit more documentation
|
Markdown
|
apache-2.0
|
realityforge/gwt-mmvp,realityforge/gwt-mmvp
|
markdown
|
## Code Before:
[](http://travis-ci.org/realityforge/gwt-mmvp)
[<img src="https://img.shields.io/maven-central/v/org.realityforge.gwt.mmvp/gwt-mmvp.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.mmvp%22%20a%3A%22gwt-mmvp%22)
A micro MVP library that enhances the Activities and Places library.
## Instruction:
Add a bit more documentation
## Code After:
[](http://travis-ci.org/realityforge/gwt-mmvp)
[<img src="https://img.shields.io/maven-central/v/org.realityforge.gwt.mmvp/gwt-mmvp.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.mmvp%22%20a%3A%22gwt-mmvp%22)
A micro MVP library that enhances the Activities and Places library.
## Quick Start
The simplest way to use the library is to add the following dependency
into the build system. i.e.
```xml
<dependency>
<groupId>org.realityforge.gwt.mmvp</groupId>
<artifactId>gwt-mmvp</artifactId>
<version>0.6</version>
<scope>provided</scope>
</dependency>
```
Then you add the following snippet into the .gwt.xml file.
```xml
<module rename-to='myapp'>
...
<!-- Enable the mmvp library -->
<inherits name="org.realityforge.gwt.mmvp.MMVP"/>
</module>
```
|
d5377e06ae059a9d478c3fe06652a353f1a8359c
|
address_book/address_book.py
|
address_book/address_book.py
|
from person import Person
__all__ = ['AddressBook']
class AddressBook(object):
def __init__(self):
self.persons = []
self.groups = []
def add_person(self, person):
self.persons.append(person)
def add_group(self, group):
self.groups.append(group)
def __contains__(self, item):
if isinstance(item, Person):
return item in self.persons
return False
|
from group import Group
from person import Person
__all__ = ['AddressBook']
class AddressBook(object):
def __init__(self):
self.persons = []
self.groups = []
def add_person(self, person):
self.persons.append(person)
def add_group(self, group):
self.groups.append(group)
def __contains__(self, item):
if isinstance(item, Person):
return item in self.persons
if isinstance(item, Group):
return item in self.groups
return False
|
Make it possible to check if some group is in the AddressBook or not
|
Make it possible to check if some group is in the AddressBook or not
|
Python
|
mit
|
dizpers/python-address-book-assignment
|
python
|
## Code Before:
from person import Person
__all__ = ['AddressBook']
class AddressBook(object):
def __init__(self):
self.persons = []
self.groups = []
def add_person(self, person):
self.persons.append(person)
def add_group(self, group):
self.groups.append(group)
def __contains__(self, item):
if isinstance(item, Person):
return item in self.persons
return False
## Instruction:
Make it possible to check if some group is in the AddressBook or not
## Code After:
from group import Group
from person import Person
__all__ = ['AddressBook']
class AddressBook(object):
def __init__(self):
self.persons = []
self.groups = []
def add_person(self, person):
self.persons.append(person)
def add_group(self, group):
self.groups.append(group)
def __contains__(self, item):
if isinstance(item, Person):
return item in self.persons
if isinstance(item, Group):
return item in self.groups
return False
|
f5166577a90e10c62d23623cb12d37cb8909872f
|
src/appc/schema/ac_name.h
|
src/appc/schema/ac_name.h
|
namespace appc {
namespace schema {
const unsigned int max_ac_name_length = 512;
template<typename T>
struct ACName : StringType<T> {
explicit ACName<T>(const std::string& name)
: StringType<T>(name) {}
virtual Status validate() const {
if (this->value.empty()) {
return Invalid("ACName must not be empty.");
}
if (this->value.size() > max_ac_name_length) {
return Invalid("ACName must not be longer than " + max_ac_name_length);
}
const std::regex pattern("^[a-z0-9]+([a-z0-9-\\./]*[a-z0-9])*$",
std::regex::ECMAScript);
if (!std::regex_match(this->value, pattern)) {
return Invalid("ACName must comply with rfc1123 + allow '/'");
}
return Valid();
}
};
} // namespace schema
} // namespace appc
|
namespace appc {
namespace schema {
const unsigned int max_ac_name_length = 512;
template<typename T>
struct ACName : StringType<T> {
explicit ACName<T>(const std::string& name)
: StringType<T>(name) {}
virtual Status validate() const {
if (this->value.empty()) {
return Invalid("ACName must not be empty.");
}
if (this->value.size() > max_ac_name_length) {
return Invalid("ACName must not be longer than " + max_ac_name_length);
}
const std::regex pattern("^[A-Za-z0-9]+([\\-\\.\\/][A-Za-z0-9]+)*$",
std::regex::ECMAScript);
if (!std::regex_match(this->value, pattern)) {
return Invalid("ACName must comply with rfc1123 + allow '/'");
}
return Valid();
}
};
} // namespace schema
} // namespace appc
|
Fix for AC Name type adherence to rfc1123
|
schema: Fix for AC Name type adherence to rfc1123
|
C
|
apache-2.0
|
cdaylward/libappc,cdaylward/libappc
|
c
|
## Code Before:
namespace appc {
namespace schema {
const unsigned int max_ac_name_length = 512;
template<typename T>
struct ACName : StringType<T> {
explicit ACName<T>(const std::string& name)
: StringType<T>(name) {}
virtual Status validate() const {
if (this->value.empty()) {
return Invalid("ACName must not be empty.");
}
if (this->value.size() > max_ac_name_length) {
return Invalid("ACName must not be longer than " + max_ac_name_length);
}
const std::regex pattern("^[a-z0-9]+([a-z0-9-\\./]*[a-z0-9])*$",
std::regex::ECMAScript);
if (!std::regex_match(this->value, pattern)) {
return Invalid("ACName must comply with rfc1123 + allow '/'");
}
return Valid();
}
};
} // namespace schema
} // namespace appc
## Instruction:
schema: Fix for AC Name type adherence to rfc1123
## Code After:
namespace appc {
namespace schema {
const unsigned int max_ac_name_length = 512;
template<typename T>
struct ACName : StringType<T> {
explicit ACName<T>(const std::string& name)
: StringType<T>(name) {}
virtual Status validate() const {
if (this->value.empty()) {
return Invalid("ACName must not be empty.");
}
if (this->value.size() > max_ac_name_length) {
return Invalid("ACName must not be longer than " + max_ac_name_length);
}
const std::regex pattern("^[A-Za-z0-9]+([\\-\\.\\/][A-Za-z0-9]+)*$",
std::regex::ECMAScript);
if (!std::regex_match(this->value, pattern)) {
return Invalid("ACName must comply with rfc1123 + allow '/'");
}
return Valid();
}
};
} // namespace schema
} // namespace appc
|
f4fd7eb87d688cf61fa922e1a1894abcae60a976
|
.travis.yml
|
.travis.yml
|
language: ruby
rvm:
- 2.2.2
branches:
only:
- master
before_install:
- mysql -e "create database IF NOT EXISTS transam_spatial_testing;" -uroot
addons:
code_climate:
repo_token: ce7c157104b0cf1f2babf66d9cc10bbe598607781e8eeb1ba1593fec1d1fc5c1
before_script:
- cp spec/dummy/config/database.travis.yml spec/dummy/config/database.yml
script:
- bundle exec rake app:transam_spatial:prepare_rspec
- bundle exec rspec
|
language: ruby
rvm:
- 2.2.2
branches:
only:
- master
before_install:
- sudo apt-get update
- gem update bundler
- sudo apt-get install libgeos-dev libproj-dev
- mysql -e "create database IF NOT EXISTS transam_spatial_testing;" -uroot
addons:
code_climate:
repo_token: ce7c157104b0cf1f2babf66d9cc10bbe598607781e8eeb1ba1593fec1d1fc5c1
before_script:
- cp spec/dummy/config/database.travis.yml spec/dummy/config/database.yml
script:
- bundle exec rake app:transam_spatial:prepare_rspec
- bundle exec rspec
|
Configure Travis to install geos and proj libs before test
|
Configure Travis to install geos and proj libs before test
|
YAML
|
mit
|
camsys/transam_spatial,camsys/transam_spatial,camsys/transam_spatial
|
yaml
|
## Code Before:
language: ruby
rvm:
- 2.2.2
branches:
only:
- master
before_install:
- mysql -e "create database IF NOT EXISTS transam_spatial_testing;" -uroot
addons:
code_climate:
repo_token: ce7c157104b0cf1f2babf66d9cc10bbe598607781e8eeb1ba1593fec1d1fc5c1
before_script:
- cp spec/dummy/config/database.travis.yml spec/dummy/config/database.yml
script:
- bundle exec rake app:transam_spatial:prepare_rspec
- bundle exec rspec
## Instruction:
Configure Travis to install geos and proj libs before test
## Code After:
language: ruby
rvm:
- 2.2.2
branches:
only:
- master
before_install:
- sudo apt-get update
- gem update bundler
- sudo apt-get install libgeos-dev libproj-dev
- mysql -e "create database IF NOT EXISTS transam_spatial_testing;" -uroot
addons:
code_climate:
repo_token: ce7c157104b0cf1f2babf66d9cc10bbe598607781e8eeb1ba1593fec1d1fc5c1
before_script:
- cp spec/dummy/config/database.travis.yml spec/dummy/config/database.yml
script:
- bundle exec rake app:transam_spatial:prepare_rspec
- bundle exec rspec
|
cd691f75bd60da21c01e1b45830fb90f936fbf73
|
[email protected]/metadata.json
|
[email protected]/metadata.json
|
{
"shell-version": ["3.12.2", "3.14.1"],
"uuid": "[email protected]",
"name": "Random Wallpaper",
"description": "Fetches random wallpaper from desktopper.co and sets it as desktop background"
}
|
{
"shell-version": [
"3.12.2",
"3.14.1",
"3.16.3",
"3.18.0",
"3.18.1",
"3.18.2"],
"uuid": "[email protected]",
"name": "Random Wallpaper",
"description": "Fetches random wallpaper from desktopper.co and sets it as desktop background"
}
|
Add support for 3.18.0, 3.18.1, 3.18.2
|
Add support for 3.18.0, 3.18.1, 3.18.2
|
JSON
|
mit
|
ifl0w/RandomWallpaperGnome3,ifl0w/RandomWallpaperGnome3
|
json
|
## Code Before:
{
"shell-version": ["3.12.2", "3.14.1"],
"uuid": "[email protected]",
"name": "Random Wallpaper",
"description": "Fetches random wallpaper from desktopper.co and sets it as desktop background"
}
## Instruction:
Add support for 3.18.0, 3.18.1, 3.18.2
## Code After:
{
"shell-version": [
"3.12.2",
"3.14.1",
"3.16.3",
"3.18.0",
"3.18.1",
"3.18.2"],
"uuid": "[email protected]",
"name": "Random Wallpaper",
"description": "Fetches random wallpaper from desktopper.co and sets it as desktop background"
}
|
804ed81acbd6e6d03bb725f76deb1dd1ecce2b79
|
app/views/spree/admin/shared/_calculator_fields.html.haml
|
app/views/spree/admin/shared/_calculator_fields.html.haml
|
%fieldset#calculator_fields.no-border-bottom
%legend{align: "center"}= t(:calculator)
#preference-settings
.row
.alpha.four.columns
= f.label(:calculator_type, t(:calculator), for: 'calc_type')
.omega.twelve.columns
= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
- if [email protected]_record?
.row
.calculator-settings
= f.fields_for :calculator do |calculator_form|
- preference_fields(@object.calculator, calculator_form).each do |field|
.alpha.four.columns
= field[:label]
.field.twelve.eight.columns
= field[:field]
- if @object.calculator.respond_to?(:preferences)
%span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)
|
%fieldset#calculator_fields.no-border-bottom
%legend{align: "center"}= t(:fees)
#preference-settings
.row
.alpha.four.columns
= f.label(:calculator_type, t(:calculator), for: 'calc_type')
.omega.twelve.columns
= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
- if [email protected]_record?
.row
.calculator-settings
= f.fields_for :calculator do |calculator_form|
- preference_fields(@object.calculator, calculator_form).each do |field|
.alpha.four.columns
= field[:label]
.field.twelve.eight.columns
= field[:field]
- if @object.calculator.respond_to?(:preferences)
%span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)
|
Change translation for calculator section from Calculator to Fees
|
Change translation for calculator section from Calculator to Fees
|
Haml
|
agpl-3.0
|
mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork
|
haml
|
## Code Before:
%fieldset#calculator_fields.no-border-bottom
%legend{align: "center"}= t(:calculator)
#preference-settings
.row
.alpha.four.columns
= f.label(:calculator_type, t(:calculator), for: 'calc_type')
.omega.twelve.columns
= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
- if [email protected]_record?
.row
.calculator-settings
= f.fields_for :calculator do |calculator_form|
- preference_fields(@object.calculator, calculator_form).each do |field|
.alpha.four.columns
= field[:label]
.field.twelve.eight.columns
= field[:field]
- if @object.calculator.respond_to?(:preferences)
%span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)
## Instruction:
Change translation for calculator section from Calculator to Fees
## Code After:
%fieldset#calculator_fields.no-border-bottom
%legend{align: "center"}= t(:fees)
#preference-settings
.row
.alpha.four.columns
= f.label(:calculator_type, t(:calculator), for: 'calc_type')
.omega.twelve.columns
= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
- if [email protected]_record?
.row
.calculator-settings
= f.fields_for :calculator do |calculator_form|
- preference_fields(@object.calculator, calculator_form).each do |field|
.alpha.four.columns
= field[:label]
.field.twelve.eight.columns
= field[:field]
- if @object.calculator.respond_to?(:preferences)
%span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)
|
346762ae521f99c4fdad4865b39ff6c497d171d1
|
doc/toc.xml
|
doc/toc.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<!--
Convention is: Omit prefixes for "SVN" (as in "SVN Resource History View") and don't use
menu qualifiers (such as "Team -> Foo". Just put "Foo".) We have enough context.
-->
<toc label="Subclipse - Subversion Eclipse Plugin" topic="html/toc.html">
<topic label="Getting Started">
<anchor id="gettingstarted"/>
</topic>
<topic label="Tasks">
<anchor id="dailywork"/>
</topic>
<topic label="Reference">
<anchor id="reference"/>
</topic>
<topic label="Quick Reference for Command Line Users" href="html/faq/subversion-mapping.html"/>
<topic label="Glossary" href="html/reference/glossary.html"/>
<topic label="Tips and tricks" href="html/faq/tips-and-tricks.html"/>
<topic label="FAQ" href="html/faq/faq.html"/>
<topic label="Changelog" href="html/subclipse_1.2.x/changes.html"/>
</toc>
|
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<!--
Convention is: Omit prefixes for "SVN" (as in "SVN Resource History View") and don't use
menu qualifiers (such as "Team -> Foo". Just put "Foo".) We have enough context.
-->
<toc label="Subclipse - Subversion Eclipse Plugin" topic="html/toc.html">
<topic label="Getting Started">
<anchor id="gettingstarted"/>
</topic>
<topic label="Tasks">
<anchor id="dailywork"/>
</topic>
<topic label="Reference">
<anchor id="reference"/>
</topic>
<topic label="Quick Reference for Command Line Users" href="html/faq/subversion-mapping.html"/>
<topic label="Glossary" href="html/reference/glossary.html"/>
<topic label="Tips and tricks" href="html/faq/tips-and-tricks.html"/>
<topic label="FAQ" href="html/faq/faq.html"/>
<topic label="Changelog" href="http://subclipse.tigris.org/subclipse_1.2.x/changes.html"/>
</toc>
|
Move reference to changelog out of plugin and just point to web site. That way, we do not have to update the doc plugin for every release. Just when there are changes. This will save 2MB or so from the download of updates.
|
Move reference to changelog out of plugin and just point to web site. That way, we do
not have to update the doc plugin for every release. Just when there are changes.
This will save 2MB or so from the download of updates.
|
XML
|
epl-1.0
|
subclipse/subclipse,subclipse/subclipse,subclipse/subclipse
|
xml
|
## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<!--
Convention is: Omit prefixes for "SVN" (as in "SVN Resource History View") and don't use
menu qualifiers (such as "Team -> Foo". Just put "Foo".) We have enough context.
-->
<toc label="Subclipse - Subversion Eclipse Plugin" topic="html/toc.html">
<topic label="Getting Started">
<anchor id="gettingstarted"/>
</topic>
<topic label="Tasks">
<anchor id="dailywork"/>
</topic>
<topic label="Reference">
<anchor id="reference"/>
</topic>
<topic label="Quick Reference for Command Line Users" href="html/faq/subversion-mapping.html"/>
<topic label="Glossary" href="html/reference/glossary.html"/>
<topic label="Tips and tricks" href="html/faq/tips-and-tricks.html"/>
<topic label="FAQ" href="html/faq/faq.html"/>
<topic label="Changelog" href="html/subclipse_1.2.x/changes.html"/>
</toc>
## Instruction:
Move reference to changelog out of plugin and just point to web site. That way, we do
not have to update the doc plugin for every release. Just when there are changes.
This will save 2MB or so from the download of updates.
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
<!--
Convention is: Omit prefixes for "SVN" (as in "SVN Resource History View") and don't use
menu qualifiers (such as "Team -> Foo". Just put "Foo".) We have enough context.
-->
<toc label="Subclipse - Subversion Eclipse Plugin" topic="html/toc.html">
<topic label="Getting Started">
<anchor id="gettingstarted"/>
</topic>
<topic label="Tasks">
<anchor id="dailywork"/>
</topic>
<topic label="Reference">
<anchor id="reference"/>
</topic>
<topic label="Quick Reference for Command Line Users" href="html/faq/subversion-mapping.html"/>
<topic label="Glossary" href="html/reference/glossary.html"/>
<topic label="Tips and tricks" href="html/faq/tips-and-tricks.html"/>
<topic label="FAQ" href="html/faq/faq.html"/>
<topic label="Changelog" href="http://subclipse.tigris.org/subclipse_1.2.x/changes.html"/>
</toc>
|
643eab7ef6cde9a797f3ad7646accedffb0070bf
|
source/setup/sass/ConnectArchiveDialog.sass
|
source/setup/sass/ConnectArchiveDialog.sass
|
.connectArchiveDialog
display: flex
flex-direction: row
flex-wrap: nowrap
justify-content: flex-start
align-items: flex-start
.configuration
flex-grow: 0
order: 1
width: 300px
.options
padding-left: 8px
.explorer
flex-grow: 1
order: 2
position: relative
.dialogButtonView
display: inline-block
.rodal-close
z-index: 10
|
.connectArchiveDialog
display: flex
flex-direction: row
flex-wrap: nowrap
justify-content: flex-start
align-items: flex-start
height: 100%
.configuration
flex-grow: 0
order: 1
width: 300px
.options
padding-left: 8px
.explorer
flex-grow: 1
order: 2
position: relative
height: 100%
.explorerContainer
height: 100%
overflow: scroll
.dialogButtonView
display: inline-block
.rodal-close
z-index: 10
|
Fix scroll overflow in remote file explorer
|
Fix scroll overflow in remote file explorer
|
Sass
|
mit
|
perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension
|
sass
|
## Code Before:
.connectArchiveDialog
display: flex
flex-direction: row
flex-wrap: nowrap
justify-content: flex-start
align-items: flex-start
.configuration
flex-grow: 0
order: 1
width: 300px
.options
padding-left: 8px
.explorer
flex-grow: 1
order: 2
position: relative
.dialogButtonView
display: inline-block
.rodal-close
z-index: 10
## Instruction:
Fix scroll overflow in remote file explorer
## Code After:
.connectArchiveDialog
display: flex
flex-direction: row
flex-wrap: nowrap
justify-content: flex-start
align-items: flex-start
height: 100%
.configuration
flex-grow: 0
order: 1
width: 300px
.options
padding-left: 8px
.explorer
flex-grow: 1
order: 2
position: relative
height: 100%
.explorerContainer
height: 100%
overflow: scroll
.dialogButtonView
display: inline-block
.rodal-close
z-index: 10
|
9ee8605af644bd9b6489d8b648247730c9569750
|
test/integration/index.js
|
test/integration/index.js
|
'use strict'
var childProcess = require('child_process')
childProcess.exec('./index.js', function onBoot (err) {
if (err) {
throw err
}
})
|
'use strict'
var childProcess = require('child_process')
var path = require('path')
var assert = require('chai').assert
var TREAD = path.join(process.cwd(), 'index.js')
var proc = childProcess.fork(TREAD, ['-h'])
proc.on('error', function onError (error) {
assert.fail(error)
})
proc.on('exit', function onExit (code, signal) {
assert.equal(code, 0, 'should exit 0')
assert.isNull(signal, 'should not have exit signal')
})
|
Add assertions to integration tests
|
Add assertions to integration tests
|
JavaScript
|
isc
|
wraithan/tread
|
javascript
|
## Code Before:
'use strict'
var childProcess = require('child_process')
childProcess.exec('./index.js', function onBoot (err) {
if (err) {
throw err
}
})
## Instruction:
Add assertions to integration tests
## Code After:
'use strict'
var childProcess = require('child_process')
var path = require('path')
var assert = require('chai').assert
var TREAD = path.join(process.cwd(), 'index.js')
var proc = childProcess.fork(TREAD, ['-h'])
proc.on('error', function onError (error) {
assert.fail(error)
})
proc.on('exit', function onExit (code, signal) {
assert.equal(code, 0, 'should exit 0')
assert.isNull(signal, 'should not have exit signal')
})
|
a74e89ef84180f72535322afe3d8f6086088cfb6
|
docs/release-guide.md
|
docs/release-guide.md
|
First, test your build:
./gradlew clean test
If everything went ok, tag your release:
git tag v1.2.3
Now publish your changes:
./gradlew publish
Go to [Sonatype Nexus](https://oss.sonatype.org/) _Staging Repositories_ section, close and release the repository.
After a while, the artifacts will be synced to Maven Central.
Finally, create [release notes in GitHub](https://github.com/EvidentSolutions/dalesbred/releases) using data from
the CHANGELOG.
|
First, test your build:
./gradlew clean test
If everything went ok, tag your release:
git tag v1.2.3
Now publish your changes:
./gradlew publish
Go to [Sonatype Nexus](https://oss.sonatype.org/) _Staging Repositories_ section, close and release the repository.
After a while, the artifacts will be synced to Maven Central.
Finally, create [release notes in GitHub](https://github.com/EvidentSolutions/dalesbred/releases) using data from
the [CHANGELOG.md](../CHANGELOG.md).
|
Add link to CHANGELOG.md from release guide
|
Add link to CHANGELOG.md from release guide
|
Markdown
|
mit
|
EvidentSolutions/dalesbred,EvidentSolutions/dalesbred,EvidentSolutions/dalesbred
|
markdown
|
## Code Before:
First, test your build:
./gradlew clean test
If everything went ok, tag your release:
git tag v1.2.3
Now publish your changes:
./gradlew publish
Go to [Sonatype Nexus](https://oss.sonatype.org/) _Staging Repositories_ section, close and release the repository.
After a while, the artifacts will be synced to Maven Central.
Finally, create [release notes in GitHub](https://github.com/EvidentSolutions/dalesbred/releases) using data from
the CHANGELOG.
## Instruction:
Add link to CHANGELOG.md from release guide
## Code After:
First, test your build:
./gradlew clean test
If everything went ok, tag your release:
git tag v1.2.3
Now publish your changes:
./gradlew publish
Go to [Sonatype Nexus](https://oss.sonatype.org/) _Staging Repositories_ section, close and release the repository.
After a while, the artifacts will be synced to Maven Central.
Finally, create [release notes in GitHub](https://github.com/EvidentSolutions/dalesbred/releases) using data from
the [CHANGELOG.md](../CHANGELOG.md).
|
bb5c498f73e3cebb9fe04e69ed188ad0eaae1bd2
|
metadata/in.sunilpaulmathew.izzyondroid.yml
|
metadata/in.sunilpaulmathew.izzyondroid.yml
|
Categories:
- System
License: GPL-3.0-or-later
AuthorName: sunilpaulmathew
AuthorEmail: [email protected]
AuthorWebSite: https://smartpack.github.io/
SourceCode: https://gitlab.com/sunilpaulmathew/izzyondroid
IssueTracker: https://gitlab.com/sunilpaulmathew/izzyondroid/-/issues
Donate: https://smartpack.github.io/donation/
Liberapay: sunilpaulmathew
AutoName: IzzyOnDroid
RepoType: git
Repo: https://gitlab.com/sunilpaulmathew/izzyondroid
Builds:
- versionName: v0.5
versionCode: 5
commit: v0.5
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: v0.5
CurrentVersionCode: 5
|
Categories:
- System
License: GPL-3.0-or-later
AuthorName: sunilpaulmathew
AuthorEmail: [email protected]
AuthorWebSite: https://smartpack.github.io/
SourceCode: https://gitlab.com/sunilpaulmathew/izzyondroid
IssueTracker: https://gitlab.com/sunilpaulmathew/izzyondroid/-/issues
Donate: https://smartpack.github.io/donation/
Liberapay: sunilpaulmathew
AutoName: IzzyOnDroid
RepoType: git
Repo: https://gitlab.com/sunilpaulmathew/izzyondroid
Builds:
- versionName: v0.5
versionCode: 5
commit: v0.5
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- yes
- versionName: v0.6
versionCode: 6
commit: cf7294f0285b0caf60ddd6190998dfb4a17031d3
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: v0.6
CurrentVersionCode: 6
|
Update IzzyOnDroid to v0.6 (6)
|
Update IzzyOnDroid to v0.6 (6)
|
YAML
|
agpl-3.0
|
f-droid/fdroiddata,f-droid/fdroiddata
|
yaml
|
## Code Before:
Categories:
- System
License: GPL-3.0-or-later
AuthorName: sunilpaulmathew
AuthorEmail: [email protected]
AuthorWebSite: https://smartpack.github.io/
SourceCode: https://gitlab.com/sunilpaulmathew/izzyondroid
IssueTracker: https://gitlab.com/sunilpaulmathew/izzyondroid/-/issues
Donate: https://smartpack.github.io/donation/
Liberapay: sunilpaulmathew
AutoName: IzzyOnDroid
RepoType: git
Repo: https://gitlab.com/sunilpaulmathew/izzyondroid
Builds:
- versionName: v0.5
versionCode: 5
commit: v0.5
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: v0.5
CurrentVersionCode: 5
## Instruction:
Update IzzyOnDroid to v0.6 (6)
## Code After:
Categories:
- System
License: GPL-3.0-or-later
AuthorName: sunilpaulmathew
AuthorEmail: [email protected]
AuthorWebSite: https://smartpack.github.io/
SourceCode: https://gitlab.com/sunilpaulmathew/izzyondroid
IssueTracker: https://gitlab.com/sunilpaulmathew/izzyondroid/-/issues
Donate: https://smartpack.github.io/donation/
Liberapay: sunilpaulmathew
AutoName: IzzyOnDroid
RepoType: git
Repo: https://gitlab.com/sunilpaulmathew/izzyondroid
Builds:
- versionName: v0.5
versionCode: 5
commit: v0.5
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- yes
- versionName: v0.6
versionCode: 6
commit: cf7294f0285b0caf60ddd6190998dfb4a17031d3
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: v0.6
CurrentVersionCode: 6
|
0db9c4161a7687cd57c4301e93e69458ccd322d5
|
Mk/macports.tea.mk
|
Mk/macports.tea.mk
|
.SUFFIXES: .m
.m.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${OBJCFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
.c.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${CFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
all:: ${SHLIB_NAME} pkgIndex.tcl
$(SHLIB_NAME): ${OBJS}
${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS}
pkgIndex.tcl: $(SHLIB_NAME)
$(SILENT) ../pkg_mkindex.sh . || ( rm -rf $@ && exit 1 )
clean::
rm -f ${OBJS} ${SHLIB_NAME} so_locations pkgIndex.tcl
distclean:: clean
install:: all
$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
|
.SUFFIXES: .m
.m.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${OBJCFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
.c.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${CFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
all:: ${SHLIB_NAME} pkgIndex.tcl
$(SHLIB_NAME): ${OBJS}
${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS}
pkgIndex.tcl: $(SHLIB_NAME)
$(SILENT) ../pkg_mkindex.sh . || ( rm -rf $@ && exit 1 )
clean::
rm -f ${OBJS} ${SHLIB_NAME} so_locations pkgIndex.tcl
distclean:: clean
install:: all
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 ${SHLIB_NAME} "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
|
Add missing quotes around Makefile variables
|
Mk: Add missing quotes around Makefile variables
Put quotes around some variables which can contain special characters.
These are quoted in other makefiles.
Closes: #12
|
Makefile
|
bsd-3-clause
|
danchr/macports-base,macports/macports-base,neverpanic/macports-base,neverpanic/macports-base,macports/macports-base,danchr/macports-base
|
makefile
|
## Code Before:
.SUFFIXES: .m
.m.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${OBJCFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
.c.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${CFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
all:: ${SHLIB_NAME} pkgIndex.tcl
$(SHLIB_NAME): ${OBJS}
${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS}
pkgIndex.tcl: $(SHLIB_NAME)
$(SILENT) ../pkg_mkindex.sh . || ( rm -rf $@ && exit 1 )
clean::
rm -f ${OBJS} ${SHLIB_NAME} so_locations pkgIndex.tcl
distclean:: clean
install:: all
$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
## Instruction:
Mk: Add missing quotes around Makefile variables
Put quotes around some variables which can contain special characters.
These are quoted in other makefiles.
Closes: #12
## Code After:
.SUFFIXES: .m
.m.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${OBJCFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
.c.o:
${CC} -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED ${CFLAGS} ${CPPFLAGS} ${SHLIB_CFLAGS} $< -o $@
all:: ${SHLIB_NAME} pkgIndex.tcl
$(SHLIB_NAME): ${OBJS}
${SHLIB_LD} ${OBJS} -o ${SHLIB_NAME} ${TCL_STUB_LIB_SPEC} ${SHLIB_LDFLAGS} ${LIBS}
pkgIndex.tcl: $(SHLIB_NAME)
$(SILENT) ../pkg_mkindex.sh . || ( rm -rf $@ && exit 1 )
clean::
rm -f ${OBJS} ${SHLIB_NAME} so_locations pkgIndex.tcl
distclean:: clean
install:: all
$(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 ${SHLIB_NAME} "${INSTALLDIR}"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
|
4ad4784472813ddec18a507aef478e40dd57020b
|
gulpfile.js/tasks/watch.js
|
gulpfile.js/tasks/watch.js
|
const gulp = require('gulp');
gulp.task('watch', ['watch:sass', 'watch:scripts', 'watch:app', 'watch:components']);
gulp.task('watch:sass', function() {
return gulp.watch('timestrap/static_src/sass/**/*.scss', ['styles:sass']);
});
gulp.task('watch:scripts', function() {
return gulp.watch('timestrap/static_src/scripts/**/*.js', ['scripts:vendor']);
});
gulp.task('watch:app', function() {
return gulp.watch('timestrap/static_src/app.js', ['scripts:app']);
});
gulp.task('watch:components', function() {
return gulp.watch('timestrap/static_src/components/**/*.vue', ['scripts:app']);
});
|
const gulp = require('gulp');
gulp.task('watch', ['watch:sass', 'watch:scripts', 'watch:app', 'watch:components', 'watch:plugins']);
gulp.task('watch:sass', function() {
return gulp.watch('timestrap/static_src/sass/**/*.scss', ['styles:sass']);
});
gulp.task('watch:scripts', function() {
return gulp.watch('timestrap/static_src/scripts/**/*.js', ['scripts:vendor']);
});
gulp.task('watch:app', function() {
return gulp.watch('timestrap/static_src/app.js', ['scripts:app']);
});
gulp.task('watch:components', function() {
return gulp.watch('timestrap/static_src/components/**/*.vue', ['scripts:app']);
});
gulp.task('watch:plugins', function() {
return gulp.watch('timestrap/static_src/plugins/**/*.js', ['scripts:app']);
});
|
Watch for changes to plugin files.
|
Watch for changes to plugin files.
|
JavaScript
|
bsd-2-clause
|
overshard/timestrap,overshard/timestrap,overshard/timestrap,cdubz/timestrap,muhleder/timestrap,cdubz/timestrap,muhleder/timestrap,muhleder/timestrap,cdubz/timestrap
|
javascript
|
## Code Before:
const gulp = require('gulp');
gulp.task('watch', ['watch:sass', 'watch:scripts', 'watch:app', 'watch:components']);
gulp.task('watch:sass', function() {
return gulp.watch('timestrap/static_src/sass/**/*.scss', ['styles:sass']);
});
gulp.task('watch:scripts', function() {
return gulp.watch('timestrap/static_src/scripts/**/*.js', ['scripts:vendor']);
});
gulp.task('watch:app', function() {
return gulp.watch('timestrap/static_src/app.js', ['scripts:app']);
});
gulp.task('watch:components', function() {
return gulp.watch('timestrap/static_src/components/**/*.vue', ['scripts:app']);
});
## Instruction:
Watch for changes to plugin files.
## Code After:
const gulp = require('gulp');
gulp.task('watch', ['watch:sass', 'watch:scripts', 'watch:app', 'watch:components', 'watch:plugins']);
gulp.task('watch:sass', function() {
return gulp.watch('timestrap/static_src/sass/**/*.scss', ['styles:sass']);
});
gulp.task('watch:scripts', function() {
return gulp.watch('timestrap/static_src/scripts/**/*.js', ['scripts:vendor']);
});
gulp.task('watch:app', function() {
return gulp.watch('timestrap/static_src/app.js', ['scripts:app']);
});
gulp.task('watch:components', function() {
return gulp.watch('timestrap/static_src/components/**/*.vue', ['scripts:app']);
});
gulp.task('watch:plugins', function() {
return gulp.watch('timestrap/static_src/plugins/**/*.js', ['scripts:app']);
});
|
0c10a827ac28283a3b330fd82118431c4239896c
|
bower.json
|
bower.json
|
{
"name": "j.point.me",
"dependencies": {
"angular": "~1.3.*",
"angular-sanitize": "~1.3.*",
"angular-resource": "~1.3.*",
"angular-touch": "1.3.*",
"bootstrap": "~3.1.1"
},
"devDependencies": {
"angular-mocks": "~1.3.*",
"jasmine-jquery": "1.7.0"
}
}
|
{
"name": "j.point.me",
"dependencies": {
"angular": "~1.3.*",
"angular-sanitize": "~1.3.*",
"angular-resource": "~1.3.*",
"angular-touch": "1.3.*",
"angularfire": "0.9.0",
"bootstrap": "~3.1.1",
"firebase": "2.0.5"
},
"devDependencies": {
"angular-mocks": "~1.3.*",
"jasmine-jquery": "1.7.0"
}
}
|
Add firebase and angularfire dependencies
|
Add firebase and angularfire dependencies
|
JSON
|
mit
|
bertjan/jpointme,bertjan/jpointme
|
json
|
## Code Before:
{
"name": "j.point.me",
"dependencies": {
"angular": "~1.3.*",
"angular-sanitize": "~1.3.*",
"angular-resource": "~1.3.*",
"angular-touch": "1.3.*",
"bootstrap": "~3.1.1"
},
"devDependencies": {
"angular-mocks": "~1.3.*",
"jasmine-jquery": "1.7.0"
}
}
## Instruction:
Add firebase and angularfire dependencies
## Code After:
{
"name": "j.point.me",
"dependencies": {
"angular": "~1.3.*",
"angular-sanitize": "~1.3.*",
"angular-resource": "~1.3.*",
"angular-touch": "1.3.*",
"angularfire": "0.9.0",
"bootstrap": "~3.1.1",
"firebase": "2.0.5"
},
"devDependencies": {
"angular-mocks": "~1.3.*",
"jasmine-jquery": "1.7.0"
}
}
|
daae60016f341197d5eea9bc8addab919cdec5a7
|
src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/Services/SyntaxFacts/VisualBasicFileBanner.vb
|
src/Workspaces/SharedUtilitiesAndExtensions/Compiler/VisualBasic/Services/SyntaxFacts/VisualBasicFileBanner.vb
|
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports Microsoft.CodeAnalysis.LanguageServices
#If CODE_STYLE Then
Imports Microsoft.CodeAnalysis.Internal.Editing
#Else
Imports Microsoft.CodeAnalysis.Editing
#End If
Namespace Microsoft.CodeAnalysis.VisualBasic.LanguageServices
Friend Class VisualBasicFileBanner
Inherits AbstractFileBanner
Public Shared ReadOnly Instance As IFileBanner = New VisualBasicFileBanner()
Protected Sub New()
End Sub
Protected Overrides ReadOnly Property SyntaxFacts As ISyntaxFacts = VisualBasicSyntaxFacts.Instance
Protected Overrides ReadOnly Property DocumentationCommentService As IDocumentationCommentService = VisualBasicDocumentationCommentService.Instance
End Class
End Namespace
|
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports Microsoft.CodeAnalysis.LanguageServices
#If CODE_STYLE Then
Imports Microsoft.CodeAnalysis.Internal.Editing
#Else
Imports Microsoft.CodeAnalysis.Editing
#End If
Namespace Microsoft.CodeAnalysis.VisualBasic.LanguageServices
Friend Class VisualBasicFileBanner
Inherits AbstractFileBanner
Public Shared ReadOnly Instance As IFileBanner = New VisualBasicFileBanner()
Protected Sub New()
End Sub
Protected Overrides ReadOnly Property SyntaxFacts As ISyntaxFacts
Get
Return VisualBasicSyntaxFacts.Instance
End Get
End Property
Protected Overrides ReadOnly Property DocumentationCommentService As IDocumentationCommentService
Get
Return VisualBasicDocumentationCommentService.Instance
End Get
End Property
End Class
End Namespace
|
Fix uninitialized values during construction
|
Fix uninitialized values during construction
|
Visual Basic
|
mit
|
CyrusNajmabadi/roslyn,KevinRansom/roslyn,shyamnamboodiripad/roslyn,shyamnamboodiripad/roslyn,diryboy/roslyn,mavasani/roslyn,diryboy/roslyn,shyamnamboodiripad/roslyn,dotnet/roslyn,jasonmalinowski/roslyn,bartdesmet/roslyn,sharwell/roslyn,bartdesmet/roslyn,KevinRansom/roslyn,CyrusNajmabadi/roslyn,weltkante/roslyn,weltkante/roslyn,CyrusNajmabadi/roslyn,mavasani/roslyn,bartdesmet/roslyn,weltkante/roslyn,dotnet/roslyn,jasonmalinowski/roslyn,sharwell/roslyn,diryboy/roslyn,mavasani/roslyn,KevinRansom/roslyn,dotnet/roslyn,sharwell/roslyn,jasonmalinowski/roslyn
|
visual-basic
|
## Code Before:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports Microsoft.CodeAnalysis.LanguageServices
#If CODE_STYLE Then
Imports Microsoft.CodeAnalysis.Internal.Editing
#Else
Imports Microsoft.CodeAnalysis.Editing
#End If
Namespace Microsoft.CodeAnalysis.VisualBasic.LanguageServices
Friend Class VisualBasicFileBanner
Inherits AbstractFileBanner
Public Shared ReadOnly Instance As IFileBanner = New VisualBasicFileBanner()
Protected Sub New()
End Sub
Protected Overrides ReadOnly Property SyntaxFacts As ISyntaxFacts = VisualBasicSyntaxFacts.Instance
Protected Overrides ReadOnly Property DocumentationCommentService As IDocumentationCommentService = VisualBasicDocumentationCommentService.Instance
End Class
End Namespace
## Instruction:
Fix uninitialized values during construction
## Code After:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports Microsoft.CodeAnalysis.LanguageServices
#If CODE_STYLE Then
Imports Microsoft.CodeAnalysis.Internal.Editing
#Else
Imports Microsoft.CodeAnalysis.Editing
#End If
Namespace Microsoft.CodeAnalysis.VisualBasic.LanguageServices
Friend Class VisualBasicFileBanner
Inherits AbstractFileBanner
Public Shared ReadOnly Instance As IFileBanner = New VisualBasicFileBanner()
Protected Sub New()
End Sub
Protected Overrides ReadOnly Property SyntaxFacts As ISyntaxFacts
Get
Return VisualBasicSyntaxFacts.Instance
End Get
End Property
Protected Overrides ReadOnly Property DocumentationCommentService As IDocumentationCommentService
Get
Return VisualBasicDocumentationCommentService.Instance
End Get
End Property
End Class
End Namespace
|
ff6e4c8b4ee1b320da114ed4b4fbbbf89d446110
|
src/Annotation/index.js
|
src/Annotation/index.js
|
class Annotation {
constructor(objectOf) {
this.value = null;
this.objectOf = objectOf;
}
value() { return this.value; }
objectOf() { return this.objectOf; }
set(name, value) {
if (name !== "value" && typeof this[name] !== "function") {
let err = new Error("Invalid Argument "+name);
throw err;
} else {
this[name] = value;
}
}
}
module.exports = Annotation;
|
class Annotation {
constructor(objectOf) {
if (objectOf == undefined) {
throw new Error("Call to super(String annotationName) is required ");
}
this.value = null;
this.objectOf = objectOf;
}
value() { return this.value; }
objectOf() { return this.objectOf; }
set(name, value) {
if (name !== "value" && typeof this[name] !== "function") {
let err = new Error("Invalid Argument "+name);
throw err;
} else {
this[name] = value;
}
}
}
module.exports = Annotation;
|
Throw Error if subclass doesn't call super
|
Throw Error if subclass doesn't call super
|
JavaScript
|
mit
|
anupam-git/nodeannotations
|
javascript
|
## Code Before:
class Annotation {
constructor(objectOf) {
this.value = null;
this.objectOf = objectOf;
}
value() { return this.value; }
objectOf() { return this.objectOf; }
set(name, value) {
if (name !== "value" && typeof this[name] !== "function") {
let err = new Error("Invalid Argument "+name);
throw err;
} else {
this[name] = value;
}
}
}
module.exports = Annotation;
## Instruction:
Throw Error if subclass doesn't call super
## Code After:
class Annotation {
constructor(objectOf) {
if (objectOf == undefined) {
throw new Error("Call to super(String annotationName) is required ");
}
this.value = null;
this.objectOf = objectOf;
}
value() { return this.value; }
objectOf() { return this.objectOf; }
set(name, value) {
if (name !== "value" && typeof this[name] !== "function") {
let err = new Error("Invalid Argument "+name);
throw err;
} else {
this[name] = value;
}
}
}
module.exports = Annotation;
|
177a49dd8f4b8d53c10e8f7cc5f1e66ba04c9946
|
get-router-address-list.sh
|
get-router-address-list.sh
|
set -e
die() {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "Usage: $0 <SSH address of router>"
ssh "$1" '/ip firewall address-list export' | grep -F 'list=spamhaus-drop' | grep -oE 'address=((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(/([1-2]?[0-9]|3[0-2]))?' | cut -d '=' -f2
|
set -e
die() {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "Usage: $0 <SSH address of router>"
#ssh "$1" '/ip firewall address-list export compact' | grep -F 'list=spamhaus-drop' | grep -oE 'address=((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(/([1-2]?[0-9]|3[0-2]))?' | cut -d '=' -f2
ssh "$1" ':foreach entry in=[/ip firewall address-list find list=spamhaus-drop] do={:put [/ip firewall address-list get $entry address]}'
|
Use more reliable method to get router address list contents
|
Use more reliable method to get router address list contents
|
Shell
|
mit
|
nightexcessive/routeros-spamhaus-drop
|
shell
|
## Code Before:
set -e
die() {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "Usage: $0 <SSH address of router>"
ssh "$1" '/ip firewall address-list export' | grep -F 'list=spamhaus-drop' | grep -oE 'address=((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(/([1-2]?[0-9]|3[0-2]))?' | cut -d '=' -f2
## Instruction:
Use more reliable method to get router address list contents
## Code After:
set -e
die() {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "Usage: $0 <SSH address of router>"
#ssh "$1" '/ip firewall address-list export compact' | grep -F 'list=spamhaus-drop' | grep -oE 'address=((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])(/([1-2]?[0-9]|3[0-2]))?' | cut -d '=' -f2
ssh "$1" ':foreach entry in=[/ip firewall address-list find list=spamhaus-drop] do={:put [/ip firewall address-list get $entry address]}'
|
7dc812dac6f2ce6cc71e0d41b096b8c20d743081
|
ansible/roles/ckan/files/patches/remove_old_fontawesome.patch
|
ansible/roles/ckan/files/patches/remove_old_fontawesome.patch
|
diff --git a/ckan/public/base/vendor/webassets.yml b/ckan/public/base/vendor/webassets.yml
index 45ea87b74..8a89ee5c1 100644
--- a/ckan/public/base/vendor/webassets.yml
+++ b/ckan/public/base/vendor/webassets.yml
@@ -4,12 +4,6 @@ select2-css:
contents:
- select2/select2.css
-font-awesome:
- output: vendor/%(version)s_font-awesome.css
- filters: cssrewrite
- contents:
- - font-awesome/css/font-awesome.css
-
jquery:
filters: rjsmin
output: vendor/%(version)s_jquery.js
|
diff --git a/ckan/public/base/vendor/webassets.yml b/ckan/public/base/vendor/webassets.yml
index 45ea87b74..8f7b253de 100644
--- a/ckan/public/base/vendor/webassets.yml
+++ b/ckan/public/base/vendor/webassets.yml
@@ -4,12 +4,6 @@ select2-css:
contents:
- select2/select2.css
-font-awesome:
- output: vendor/%(version)s_font-awesome.css
- filters: cssrewrite
- contents:
- - font-awesome/css/font-awesome.css
-
jquery:
filters: rjsmin
output: vendor/%(version)s_jquery.js
@@ -40,7 +34,6 @@ bootstrap:
output: vendor/%(version)s_bootstrap.js
extra:
preload:
- - vendor/font-awesome
- vendor/jquery
contents:
- bootstrap/js/bootstrap.js
|
Remove preload of old font awesome
|
LIKA-332: Remove preload of old font awesome
|
Diff
|
mit
|
vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog
|
diff
|
## Code Before:
diff --git a/ckan/public/base/vendor/webassets.yml b/ckan/public/base/vendor/webassets.yml
index 45ea87b74..8a89ee5c1 100644
--- a/ckan/public/base/vendor/webassets.yml
+++ b/ckan/public/base/vendor/webassets.yml
@@ -4,12 +4,6 @@ select2-css:
contents:
- select2/select2.css
-font-awesome:
- output: vendor/%(version)s_font-awesome.css
- filters: cssrewrite
- contents:
- - font-awesome/css/font-awesome.css
-
jquery:
filters: rjsmin
output: vendor/%(version)s_jquery.js
## Instruction:
LIKA-332: Remove preload of old font awesome
## Code After:
diff --git a/ckan/public/base/vendor/webassets.yml b/ckan/public/base/vendor/webassets.yml
index 45ea87b74..8f7b253de 100644
--- a/ckan/public/base/vendor/webassets.yml
+++ b/ckan/public/base/vendor/webassets.yml
@@ -4,12 +4,6 @@ select2-css:
contents:
- select2/select2.css
-font-awesome:
- output: vendor/%(version)s_font-awesome.css
- filters: cssrewrite
- contents:
- - font-awesome/css/font-awesome.css
-
jquery:
filters: rjsmin
output: vendor/%(version)s_jquery.js
@@ -40,7 +34,6 @@ bootstrap:
output: vendor/%(version)s_bootstrap.js
extra:
preload:
- - vendor/font-awesome
- vendor/jquery
contents:
- bootstrap/js/bootstrap.js
|
07a89c48c25851b4e711d655d567c109b14937b5
|
cloud/aws/courses/met.yaml
|
cloud/aws/courses/met.yaml
|
---
master:
ami: "ami-9a0ec2fa"
type: "m4.large"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
lon-agent-1234:
ami: "ami-13988772"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1743:
ami: "ami-13988772"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1663:
ami: "ami-05cf2265"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
nyc-agent-1234:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
gitlab:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
|
---
master:
ami: "ami-9a0ec2fa"
type: "m4.large"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
lon-agent-1234:
ami: "ami-86e0ffe7"
type: "t1.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1743:
ami: "ami-86e0ffe7"
type: "t1.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1663:
ami: "ami-05cf2265"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
nyc-agent-1234:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
gitlab:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
|
Select supported instance type for 14.04 vm
|
Select supported instance type for 14.04 vm
|
YAML
|
apache-2.0
|
samuelson/puppetlabs-training-bootstrap,marrero984/education-builds,samuelson/puppetlabs-training-bootstrap,joshsamuelson/puppetlabs-training-bootstrap,puppetlabs/puppetlabs-training-bootstrap,joshsamuelson/puppetlabs-training-bootstrap,carthik/puppetlabs-training-bootstrap,samuelson/puppetlabs-training-bootstrap,joshsamuelson/puppetlabs-training-bootstrap,carthik/puppetlabs-training-bootstrap,puppetlabs/puppetlabs-training-bootstrap,puppetlabs/puppetlabs-training-bootstrap,carthik/puppetlabs-training-bootstrap,kjhenner/puppetlabs-training-bootstrap,kjhenner/puppetlabs-training-bootstrap,marrero984/education-builds,samuelson/education-builds,marrero984/education-builds,samuelson/education-builds,kjhenner/puppetlabs-training-bootstrap,samuelson/education-builds
|
yaml
|
## Code Before:
---
master:
ami: "ami-9a0ec2fa"
type: "m4.large"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
lon-agent-1234:
ami: "ami-13988772"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1743:
ami: "ami-13988772"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1663:
ami: "ami-05cf2265"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
nyc-agent-1234:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
gitlab:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
## Instruction:
Select supported instance type for 14.04 vm
## Code After:
---
master:
ami: "ami-9a0ec2fa"
type: "m4.large"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
lon-agent-1234:
ami: "ami-86e0ffe7"
type: "t1.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1743:
ami: "ami-86e0ffe7"
type: "t1.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
pdx-agent-1663:
ami: "ami-05cf2265"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
nyc-agent-1234:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
gitlab:
ami: "ami-d2c924b2"
type: "t2.micro"
key_name: "training"
security_group_ids:
- "sg-ee9abc89"
|
db7c550e88e71ab7906754f613d12e2dd1ddeb96
|
gitlab-pipeline/stage/trigger-packages.yml
|
gitlab-pipeline/stage/trigger-packages.yml
|
trigger:mender-dist-packages:
stage: trigger:packages
needs: []
rules:
- if: $BUILD_MENDER_DIST_PACKAGES == "true"
variables:
# Mender release tagged versions:
MENDER_VERSION: $MENDER_REV
MENDER_CONNECT_VERSION: $MENDER_CONNECT_REV
MENDER_MONITOR_VERSION: $MONITOR_CLIENT_REV
MENDER_CONFIGURE_VERSION: $MENDER_CONFIGURE_MODULE_REV
# Mode: "build and publish" or "build and test"
TEST_MENDER_DIST_PACKAGES: $TEST_MENDER_DIST_PACKAGES
PUBLISH_MENDER_DIST_PACKAGES_AUTOMATIC: $PUBLISH_RELEASE_AUTOMATIC
trigger:
project: Northern.tech/Mender/mender-dist-packages
branch: $MENDER_DIST_PACKAGES_REV
strategy: depend
|
trigger:mender-dist-packages:
stage: trigger:packages
needs: []
rules:
- if: $BUILD_MENDER_DIST_PACKAGES == "true"
variables:
# Mender release tagged versions:
MENDER_VERSION: $MENDER_REV
MENDER_CONNECT_VERSION: $MENDER_CONNECT_REV
MENDER_MONITOR_VERSION: $MONITOR_CLIENT_REV
MENDER_CONFIGURE_VERSION: $MENDER_CONFIGURE_MODULE_REV
MENDER_GATEWAY_VERSION: $MENDER_GATEWAY_REV
# Mode: "build and publish" or "build and test"
TEST_MENDER_DIST_PACKAGES: $TEST_MENDER_DIST_PACKAGES
PUBLISH_MENDER_DIST_PACKAGES_AUTOMATIC: $PUBLISH_RELEASE_AUTOMATIC
trigger:
project: Northern.tech/Mender/mender-dist-packages
branch: $MENDER_DIST_PACKAGES_REV
strategy: depend
|
Add missing translation for the Debian package build trigger
|
chore: Add missing translation for the Debian package build trigger
Signed-off-by: Ole Petter <[email protected]>
|
YAML
|
apache-2.0
|
mendersoftware/meta-mender-qemu
|
yaml
|
## Code Before:
trigger:mender-dist-packages:
stage: trigger:packages
needs: []
rules:
- if: $BUILD_MENDER_DIST_PACKAGES == "true"
variables:
# Mender release tagged versions:
MENDER_VERSION: $MENDER_REV
MENDER_CONNECT_VERSION: $MENDER_CONNECT_REV
MENDER_MONITOR_VERSION: $MONITOR_CLIENT_REV
MENDER_CONFIGURE_VERSION: $MENDER_CONFIGURE_MODULE_REV
# Mode: "build and publish" or "build and test"
TEST_MENDER_DIST_PACKAGES: $TEST_MENDER_DIST_PACKAGES
PUBLISH_MENDER_DIST_PACKAGES_AUTOMATIC: $PUBLISH_RELEASE_AUTOMATIC
trigger:
project: Northern.tech/Mender/mender-dist-packages
branch: $MENDER_DIST_PACKAGES_REV
strategy: depend
## Instruction:
chore: Add missing translation for the Debian package build trigger
Signed-off-by: Ole Petter <[email protected]>
## Code After:
trigger:mender-dist-packages:
stage: trigger:packages
needs: []
rules:
- if: $BUILD_MENDER_DIST_PACKAGES == "true"
variables:
# Mender release tagged versions:
MENDER_VERSION: $MENDER_REV
MENDER_CONNECT_VERSION: $MENDER_CONNECT_REV
MENDER_MONITOR_VERSION: $MONITOR_CLIENT_REV
MENDER_CONFIGURE_VERSION: $MENDER_CONFIGURE_MODULE_REV
MENDER_GATEWAY_VERSION: $MENDER_GATEWAY_REV
# Mode: "build and publish" or "build and test"
TEST_MENDER_DIST_PACKAGES: $TEST_MENDER_DIST_PACKAGES
PUBLISH_MENDER_DIST_PACKAGES_AUTOMATIC: $PUBLISH_RELEASE_AUTOMATIC
trigger:
project: Northern.tech/Mender/mender-dist-packages
branch: $MENDER_DIST_PACKAGES_REV
strategy: depend
|
c7571042af6465e59678db65542650eb1e6e5472
|
packages/de/deburr.yaml
|
packages/de/deburr.yaml
|
homepage: https://github.com/pinktrink/deburr
changelog-type: ''
hash: 72ad4e75ed688e775978eb4dfc9f39d80c27a96095183d07cc37f35123ae4b61
test-bench-deps:
base: -any
hspec: -any
QuickCheck: -any
deburr: -any
maintainer: [email protected]
synopsis: Convert Unicode characters with burrs to their ASCII counterparts.
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
all-versions:
- '0.1.0.0'
author: Chloe Kever
latest: '0.1.0.0'
description-type: markdown
description: ! '# deburr
'
license-name: MIT
|
homepage: https://github.com/pinktrink/deburr
changelog-type: ''
hash: 165ae1b143ce573b5da4663bd758b6b7096b2396d45f36c8b4750c23a3056029
test-bench-deps:
base: -any
hspec: -any
QuickCheck: -any
deburr: -any
maintainer: [email protected]
synopsis: Convert Unicode characters with burrs to their ASCII counterparts.
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
all-versions:
- '0.1.0.0'
- '0.1.0.1'
author: Chloe Kever
latest: '0.1.0.1'
description-type: markdown
description: ! '# deburr
A small package exposing the deburr function, which converts unicode
characters with burrs (umlauts, accents, etc) to their ASCII counterparts.
The function intelligently handles capitals and some other edge cases.
'
license-name: MIT
|
Update from Hackage at 2017-08-28T19:55:54Z
|
Update from Hackage at 2017-08-28T19:55:54Z
|
YAML
|
mit
|
commercialhaskell/all-cabal-metadata
|
yaml
|
## Code Before:
homepage: https://github.com/pinktrink/deburr
changelog-type: ''
hash: 72ad4e75ed688e775978eb4dfc9f39d80c27a96095183d07cc37f35123ae4b61
test-bench-deps:
base: -any
hspec: -any
QuickCheck: -any
deburr: -any
maintainer: [email protected]
synopsis: Convert Unicode characters with burrs to their ASCII counterparts.
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
all-versions:
- '0.1.0.0'
author: Chloe Kever
latest: '0.1.0.0'
description-type: markdown
description: ! '# deburr
'
license-name: MIT
## Instruction:
Update from Hackage at 2017-08-28T19:55:54Z
## Code After:
homepage: https://github.com/pinktrink/deburr
changelog-type: ''
hash: 165ae1b143ce573b5da4663bd758b6b7096b2396d45f36c8b4750c23a3056029
test-bench-deps:
base: -any
hspec: -any
QuickCheck: -any
deburr: -any
maintainer: [email protected]
synopsis: Convert Unicode characters with burrs to their ASCII counterparts.
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
all-versions:
- '0.1.0.0'
- '0.1.0.1'
author: Chloe Kever
latest: '0.1.0.1'
description-type: markdown
description: ! '# deburr
A small package exposing the deburr function, which converts unicode
characters with burrs (umlauts, accents, etc) to their ASCII counterparts.
The function intelligently handles capitals and some other edge cases.
'
license-name: MIT
|
04f0ca2cfe48423bdacef90ad4103fc1b2202194
|
wellspring.gemspec
|
wellspring.gemspec
|
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "wellspring/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "wellspring"
s.version = Wellspring::VERSION
s.authors = ["Piotr Chmolowski"]
s.email = ["[email protected]"]
s.homepage = "TODO"
s.summary = "TODO: Summary of Wellspring."
s.description = "TODO: Description of Wellspring."
s.license = "MIT"
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
s.add_dependency "rails", "~> 4.2.4"
s.add_dependency "bcrypt", "~> 3.1.7"
s.add_dependency "sass-rails", "~> 5.0"
s.add_dependency "jquery-rails"
s.add_dependency "jquery-ui-rails"
s.add_dependency "font-awesome-rails"
s.add_dependency "autoprefixer-rails"
s.add_dependency "simple_form", "~>3.1.0"
s.add_dependency "pygments.rb"
s.add_dependency "redcarpet"
s.add_development_dependency "pg"
end
|
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "wellspring/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "wellspring"
s.version = Wellspring::VERSION
s.authors = ["Piotr Chmolowski"]
s.email = ["[email protected]"]
s.homepage = "http://pchm.co"
s.summary = "Rails & Postgres CMS Engine"
s.description = "Rails & Postgres CMS Engine (from the turorial on my blog)."
s.license = "MIT"
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
s.add_dependency "rails", "~> 4.2.4"
s.add_dependency "bcrypt", "~> 3.1.7"
s.add_dependency "sass-rails", "~> 5.0"
s.add_dependency "jquery-rails"
s.add_dependency "jquery-ui-rails"
s.add_dependency "font-awesome-rails"
s.add_dependency "autoprefixer-rails"
s.add_dependency "simple_form", "~>3.1.0"
s.add_dependency "pygments.rb"
s.add_dependency "redcarpet"
s.add_development_dependency "pg"
end
|
Add valid gemspec metadata to fix bundle errors
|
Add valid gemspec metadata to fix bundle errors
Solves:
https://github.com/pch/wellspring-example-blog/issues/2
|
Ruby
|
mit
|
pch/wellspring,pch/wellspring,pch/wellspring
|
ruby
|
## Code Before:
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "wellspring/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "wellspring"
s.version = Wellspring::VERSION
s.authors = ["Piotr Chmolowski"]
s.email = ["[email protected]"]
s.homepage = "TODO"
s.summary = "TODO: Summary of Wellspring."
s.description = "TODO: Description of Wellspring."
s.license = "MIT"
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
s.add_dependency "rails", "~> 4.2.4"
s.add_dependency "bcrypt", "~> 3.1.7"
s.add_dependency "sass-rails", "~> 5.0"
s.add_dependency "jquery-rails"
s.add_dependency "jquery-ui-rails"
s.add_dependency "font-awesome-rails"
s.add_dependency "autoprefixer-rails"
s.add_dependency "simple_form", "~>3.1.0"
s.add_dependency "pygments.rb"
s.add_dependency "redcarpet"
s.add_development_dependency "pg"
end
## Instruction:
Add valid gemspec metadata to fix bundle errors
Solves:
https://github.com/pch/wellspring-example-blog/issues/2
## Code After:
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "wellspring/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "wellspring"
s.version = Wellspring::VERSION
s.authors = ["Piotr Chmolowski"]
s.email = ["[email protected]"]
s.homepage = "http://pchm.co"
s.summary = "Rails & Postgres CMS Engine"
s.description = "Rails & Postgres CMS Engine (from the turorial on my blog)."
s.license = "MIT"
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
s.add_dependency "rails", "~> 4.2.4"
s.add_dependency "bcrypt", "~> 3.1.7"
s.add_dependency "sass-rails", "~> 5.0"
s.add_dependency "jquery-rails"
s.add_dependency "jquery-ui-rails"
s.add_dependency "font-awesome-rails"
s.add_dependency "autoprefixer-rails"
s.add_dependency "simple_form", "~>3.1.0"
s.add_dependency "pygments.rb"
s.add_dependency "redcarpet"
s.add_development_dependency "pg"
end
|
175e143acba4f2a122aba6d3b96ed16f4b323605
|
app/components/SearchResultItem.js
|
app/components/SearchResultItem.js
|
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import ALL_DATA from '../fixtures/alldata.js';
class SearchResultItem extends Component {
render() {
const { id, title, previewText, authors, year, currentSearch} = this.props;
const boldTerms = function(text, term){
return text.split(' ').map(function(word){
if(word === term) {
return (<b>{word} </b>);
} else {
return (<span>{word} </span>);
}
});
}
const boldedPreviewText = boldTerms(previewText, currentSearch);
const boldedTitle = boldTerms(title, currentSearch);
return (
<div className="searchResultItem">
{boldedTitle}
{authors}
{year}
{boldedPreviewText}
</div>
);
}
}
export default SearchResultItem;
|
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import ALL_DATA from '../fixtures/alldata.js';
class SearchResultItem extends Component {
render() {
const { id, title, previewText, authors, year, currentSearch} = this.props;
const boldTerms = function(text, term){
return text.split(' ').map(function(word){
if(word === term) {
return (<b>{word} </b>);
} else {
return (<span>{word} </span>);
}
});
}
const boldedPreviewText = boldTerms(previewText, currentSearch);
const boldedTitle = boldTerms(title, currentSearch);
return (
<div className="searchResultItem" >
{boldedTitle}<br/>
{authors}<br/>
{year}<br/>
{boldedPreviewText}<br/><br/>
</div>
);
}
}
export default SearchResultItem;
|
Add some spacing to search results
|
Add some spacing to search results
|
JavaScript
|
mit
|
Fresh-maker/razor-client,Fresh-maker/razor-client
|
javascript
|
## Code Before:
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import ALL_DATA from '../fixtures/alldata.js';
class SearchResultItem extends Component {
render() {
const { id, title, previewText, authors, year, currentSearch} = this.props;
const boldTerms = function(text, term){
return text.split(' ').map(function(word){
if(word === term) {
return (<b>{word} </b>);
} else {
return (<span>{word} </span>);
}
});
}
const boldedPreviewText = boldTerms(previewText, currentSearch);
const boldedTitle = boldTerms(title, currentSearch);
return (
<div className="searchResultItem">
{boldedTitle}
{authors}
{year}
{boldedPreviewText}
</div>
);
}
}
export default SearchResultItem;
## Instruction:
Add some spacing to search results
## Code After:
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import ALL_DATA from '../fixtures/alldata.js';
class SearchResultItem extends Component {
render() {
const { id, title, previewText, authors, year, currentSearch} = this.props;
const boldTerms = function(text, term){
return text.split(' ').map(function(word){
if(word === term) {
return (<b>{word} </b>);
} else {
return (<span>{word} </span>);
}
});
}
const boldedPreviewText = boldTerms(previewText, currentSearch);
const boldedTitle = boldTerms(title, currentSearch);
return (
<div className="searchResultItem" >
{boldedTitle}<br/>
{authors}<br/>
{year}<br/>
{boldedPreviewText}<br/><br/>
</div>
);
}
}
export default SearchResultItem;
|
ac4fbad2d96a711666c797d05f1d80a52811fab1
|
src/core/_variables.scss
|
src/core/_variables.scss
|
/*--------------------------------------------------------*\
* Core Font Size
* This font size will determine the typography size of
* all elements on this page that use the em or rem function
* These functions can be found in:
* ../functions/_px-to-rem.scss
*--------------------------------------------------------*/
$font-base-size: 16px;
/*--------------------------------------------------------*\
* Layout
*--------------------------------------------------------*/
// The maximum page width of all content
$layout-fullpage-width: 1090px;
$layout-max-page-width: 1420px;
$mobile-side-padding: 7%;
/*--------------------------------------------------------*\
* Animation
*--------------------------------------------------------*/
// Custom easings
// https://matthewlein.com/ceaser/
$ease-fast-in-out: cubic-bezier(0.835, 0.010, 0.220, 1.000);
/*--------------------------------------------------------*\
* Paths
* When the folder structure changes you can quickly adapt
* the variables here.
\*--------------------------------------------------------*/
$img-root: '../img';
$svg-root: '../svg';
$font-root: '../fonts';
|
/*--------------------------------------------------------*\
* Core Font Size
* This font size will determine the typography size of
* all elements on this page that use the em or rem function
* These functions can be found in:
* ../functions/_px-to-rem.scss
*--------------------------------------------------------*/
$font-base-size: 16px;
/*--------------------------------------------------------*\
* Paths
* When the folder structure changes you can quickly adapt
* the variables here.
\*--------------------------------------------------------*/
$img-root: '../img';
$svg-root: '../svg';
$font-root: '../fonts';
/*--------------------------------------------------------*\
* Layout
*--------------------------------------------------------*/
// The maximum page width of all content
$layout-fullpage-width: 1090px;
$layout-max-page-width: 1420px;
$mobile-side-padding: 7%;
/*--------------------------------------------------------*\
* Animation
*--------------------------------------------------------*/
// Custom easings
// https://matthewlein.com/ceaser/
$ease-fast-in-out: cubic-bezier(0.835, 0.010, 0.220, 1.000);
|
Move paths variables below core font size var
|
Move paths variables below core font size var
|
SCSS
|
mit
|
floscr/SASS-Starter-Kit,floscr/SASS-Starter-Kit
|
scss
|
## Code Before:
/*--------------------------------------------------------*\
* Core Font Size
* This font size will determine the typography size of
* all elements on this page that use the em or rem function
* These functions can be found in:
* ../functions/_px-to-rem.scss
*--------------------------------------------------------*/
$font-base-size: 16px;
/*--------------------------------------------------------*\
* Layout
*--------------------------------------------------------*/
// The maximum page width of all content
$layout-fullpage-width: 1090px;
$layout-max-page-width: 1420px;
$mobile-side-padding: 7%;
/*--------------------------------------------------------*\
* Animation
*--------------------------------------------------------*/
// Custom easings
// https://matthewlein.com/ceaser/
$ease-fast-in-out: cubic-bezier(0.835, 0.010, 0.220, 1.000);
/*--------------------------------------------------------*\
* Paths
* When the folder structure changes you can quickly adapt
* the variables here.
\*--------------------------------------------------------*/
$img-root: '../img';
$svg-root: '../svg';
$font-root: '../fonts';
## Instruction:
Move paths variables below core font size var
## Code After:
/*--------------------------------------------------------*\
* Core Font Size
* This font size will determine the typography size of
* all elements on this page that use the em or rem function
* These functions can be found in:
* ../functions/_px-to-rem.scss
*--------------------------------------------------------*/
$font-base-size: 16px;
/*--------------------------------------------------------*\
* Paths
* When the folder structure changes you can quickly adapt
* the variables here.
\*--------------------------------------------------------*/
$img-root: '../img';
$svg-root: '../svg';
$font-root: '../fonts';
/*--------------------------------------------------------*\
* Layout
*--------------------------------------------------------*/
// The maximum page width of all content
$layout-fullpage-width: 1090px;
$layout-max-page-width: 1420px;
$mobile-side-padding: 7%;
/*--------------------------------------------------------*\
* Animation
*--------------------------------------------------------*/
// Custom easings
// https://matthewlein.com/ceaser/
$ease-fast-in-out: cubic-bezier(0.835, 0.010, 0.220, 1.000);
|
3eaeeb0e1a98fe1fdecb8eca648cbef96268292b
|
.travis.yml
|
.travis.yml
|
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
before_install:
- composer self-update
install:
- composer install --no-interaction --prefer-source
script:
- vendor/bin/phpunit
notifications:
email: false
|
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: nightly
- php: hhvm
before_install:
- composer self-update
install:
- composer install --no-interaction --prefer-source
script:
- vendor/bin/phpunit
notifications:
email: false
|
Add further PHP versions to test
|
Add further PHP versions to test
|
YAML
|
mit
|
tommy-muehle/error-log-parser
|
yaml
|
## Code Before:
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
before_install:
- composer self-update
install:
- composer install --no-interaction --prefer-source
script:
- vendor/bin/phpunit
notifications:
email: false
## Instruction:
Add further PHP versions to test
## Code After:
language: php
sudo: false
php:
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: nightly
- php: hhvm
before_install:
- composer self-update
install:
- composer install --no-interaction --prefer-source
script:
- vendor/bin/phpunit
notifications:
email: false
|
8e91301d9f2629647bbeac5d56b12d36a34c7908
|
awa/plugins/awa-images/dynamo.xml
|
awa/plugins/awa-images/dynamo.xml
|
<project>
<name>awa-images</name>
<property name="author_email">[email protected]</property>
<property name="author">Stephane Carrez</property>
</project>
|
<project>
<name>awa-images</name>
<property name="author_email">[email protected]</property>
<property name="search_dirs">.;../awa-storages;../awa-workspaces;../../../asf;../../../security;../../../ado;../../</property>
<property name="author">Stephane Carrez</property>
<module name="awa"></module>
<module name="ado"></module>
<module name="security"></module>
<module name="asf"></module>
<module name="awa-workspaces"></module>
<module name="awa-storages"></module>
</project>
|
Update and ignore some files
|
Update and ignore some files
|
XML
|
apache-2.0
|
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
|
xml
|
## Code Before:
<project>
<name>awa-images</name>
<property name="author_email">[email protected]</property>
<property name="author">Stephane Carrez</property>
</project>
## Instruction:
Update and ignore some files
## Code After:
<project>
<name>awa-images</name>
<property name="author_email">[email protected]</property>
<property name="search_dirs">.;../awa-storages;../awa-workspaces;../../../asf;../../../security;../../../ado;../../</property>
<property name="author">Stephane Carrez</property>
<module name="awa"></module>
<module name="ado"></module>
<module name="security"></module>
<module name="asf"></module>
<module name="awa-workspaces"></module>
<module name="awa-storages"></module>
</project>
|
1819d471f7e46d00d8f0fd1e030ce3fecbbd0875
|
src/themes/backend/default/layouts/error.blade.php
|
src/themes/backend/default/layouts/error.blade.php
|
<!DOCTYPE html>
<html>
<head>
{{Asset::css()}}
<link rel="stylesheet" href="/themes/admin-lte/css/AdminLTE.min.css">
<link rel="stylesheet" href="/themes/admin-lte/css/skins/skin-{{config('site.admin_theme')}}.css">
<style>
h1 {
font-size: 120px;
text-align: center;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="@yield('body')">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
@yield('content')
</div>
</div>
</div>
</body>
</html>
|
<!DOCTYPE html>
<html>
<head>
@include('system.meta')
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
{{ Asset::css() }}
<link rel="stylesheet" href="{{asset('themes/admin-lte/css/AdminLTE.min.css')}}">
<link rel="stylesheet" href="{{asset('themes/admin-lte/css/skins/skin-'.config('site.admin_theme').'.css')}}">
<style>
h1 {
font-size: 120px;
text-align: center;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="@yield('body')">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
@yield('content')
</div>
</div>
</div>
</body>
</html>
|
Fix admin error page styles.
|
Fix admin error page styles.
|
PHP
|
mit
|
yajra/cms-themes,yajra/cms-themes
|
php
|
## Code Before:
<!DOCTYPE html>
<html>
<head>
{{Asset::css()}}
<link rel="stylesheet" href="/themes/admin-lte/css/AdminLTE.min.css">
<link rel="stylesheet" href="/themes/admin-lte/css/skins/skin-{{config('site.admin_theme')}}.css">
<style>
h1 {
font-size: 120px;
text-align: center;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="@yield('body')">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
@yield('content')
</div>
</div>
</div>
</body>
</html>
## Instruction:
Fix admin error page styles.
## Code After:
<!DOCTYPE html>
<html>
<head>
@include('system.meta')
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
{{ Asset::css() }}
<link rel="stylesheet" href="{{asset('themes/admin-lte/css/AdminLTE.min.css')}}">
<link rel="stylesheet" href="{{asset('themes/admin-lte/css/skins/skin-'.config('site.admin_theme').'.css')}}">
<style>
h1 {
font-size: 120px;
text-align: center;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="@yield('body')">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
@yield('content')
</div>
</div>
</div>
</body>
</html>
|
9daabfd6976002791c0ee4cf679bb92508de74b4
|
src/actions/index.js
|
src/actions/index.js
|
const types = {
USERNAME: 'USERNAME',
GET_EVENTS: 'GET_EVENTS',
GET_PUSH_EVENTS: 'GET_PUSH_EVENTS',
GET_OPENED_PULL_REQUESTS: 'GET_OPENED_PULL_REQUESTS',
GET_ISSUES_CREATED: 'GET_ISSUES_CREATED',
GET_ISSUES_CLOSED: 'GET_ISSUES_CLOSED',
GET_COMMITS: 'GET_COMMITS',
};
export const submitUserName = (inputVal) => {
return {
type: types.USERNAME,
username: inputVal
};
};
export const getEvents = (data) => {
return {
type: types.GET_EVENTS,
data: data
};
};
export const getPushEvents = (data) => {
return {
type: types.GET_PUSH_EVENTS,
data: data
};
};
export const getOpenedPullRequests = (data) => {
return {
type: types.GET_OPENED_PULL_REQUESTS,
data: data
};
};
export const getIssuesCreated = (data) => {
return {
type: types.GET_ISSUES_CREATED,
data: data
};
};
export const getIssuesClosed = (data) => {
return {
type: types.GET_ISSUES_CLOSED,
data: data
};
};
export const getCommits = (data) => {
return {
type: types.GET_COMMITS,
data: data
};
};
|
const types = {
USERNAME: 'USERNAME',
GET_EVENTS: 'GET_EVENTS'
};
export const submitUserName = (inputVal) => {
return {
type: types.USERNAME,
username: inputVal
};
};
export const getEvents = (data) => {
return {
type: types.GET_EVENTS,
data: data
};
};
|
Remove actions that we are no longer using post-refactor
|
Remove actions that we are no longer using post-refactor
|
JavaScript
|
mit
|
bcgodfrey91/git-in-the-game,bcgodfrey91/git-in-the-game
|
javascript
|
## Code Before:
const types = {
USERNAME: 'USERNAME',
GET_EVENTS: 'GET_EVENTS',
GET_PUSH_EVENTS: 'GET_PUSH_EVENTS',
GET_OPENED_PULL_REQUESTS: 'GET_OPENED_PULL_REQUESTS',
GET_ISSUES_CREATED: 'GET_ISSUES_CREATED',
GET_ISSUES_CLOSED: 'GET_ISSUES_CLOSED',
GET_COMMITS: 'GET_COMMITS',
};
export const submitUserName = (inputVal) => {
return {
type: types.USERNAME,
username: inputVal
};
};
export const getEvents = (data) => {
return {
type: types.GET_EVENTS,
data: data
};
};
export const getPushEvents = (data) => {
return {
type: types.GET_PUSH_EVENTS,
data: data
};
};
export const getOpenedPullRequests = (data) => {
return {
type: types.GET_OPENED_PULL_REQUESTS,
data: data
};
};
export const getIssuesCreated = (data) => {
return {
type: types.GET_ISSUES_CREATED,
data: data
};
};
export const getIssuesClosed = (data) => {
return {
type: types.GET_ISSUES_CLOSED,
data: data
};
};
export const getCommits = (data) => {
return {
type: types.GET_COMMITS,
data: data
};
};
## Instruction:
Remove actions that we are no longer using post-refactor
## Code After:
const types = {
USERNAME: 'USERNAME',
GET_EVENTS: 'GET_EVENTS'
};
export const submitUserName = (inputVal) => {
return {
type: types.USERNAME,
username: inputVal
};
};
export const getEvents = (data) => {
return {
type: types.GET_EVENTS,
data: data
};
};
|
4d841ab4595b28b9fd9a516379634489d368704d
|
wcfsetup/install/files/lib/page/AccountSecurityPage.class.php
|
wcfsetup/install/files/lib/page/AccountSecurityPage.class.php
|
<?php
namespace wcf\page;
use wcf\system\menu\user\UserMenu;
use wcf\system\session\Session;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
/**
* Shows the account security page.
*
* @author Joshua Ruesweg
* @copyright 2001-2020 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Page
* @since 5.4
*/
class AccountSecurityPage extends AbstractPage {
/**
* @inheritDoc
*/
public $loginRequired = true;
/**
* @var Session[]
*/
private $activeSessions;
/**
* @inheritDoc
*/
public function readData() {
parent::readData();
$this->activeSessions = SessionHandler::getInstance()->getUserSessions(WCF::getUser());
}
/**
* @inheritDoc
*/
public function assignVariables() {
parent::assignVariables();
WCF::getTPL()->assign([
'activeSessions' => $this->activeSessions
]);
}
/**
* @inheritDoc
*/
public function show() {
// set active tab
UserMenu::getInstance()->setActiveMenuItem('wcf.user.menu.profile.security');
parent::show();
}
}
|
<?php
namespace wcf\page;
use wcf\system\menu\user\UserMenu;
use wcf\system\session\Session;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
/**
* Shows the account security page.
*
* @author Joshua Ruesweg
* @copyright 2001-2020 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Page
* @since 5.4
*/
class AccountSecurityPage extends AbstractPage {
/**
* @inheritDoc
*/
public $loginRequired = true;
/**
* @var Session[]
*/
private $activeSessions;
/**
* @inheritDoc
*/
public function readData() {
parent::readData();
$this->activeSessions = SessionHandler::getInstance()->getUserSessions(WCF::getUser());
usort($this->activeSessions, function ($a, $b) {
return $b->getLastActivityTime() <=> $a->getLastActivityTime();
});
}
/**
* @inheritDoc
*/
public function assignVariables() {
parent::assignVariables();
WCF::getTPL()->assign([
'activeSessions' => $this->activeSessions
]);
}
/**
* @inheritDoc
*/
public function show() {
// set active tab
UserMenu::getInstance()->setActiveMenuItem('wcf.user.menu.profile.security');
parent::show();
}
}
|
Sort active sessions by last activity time
|
Sort active sessions by last activity time
|
PHP
|
lgpl-2.1
|
SoftCreatR/WCF,WoltLab/WCF,Cyperghost/WCF,SoftCreatR/WCF,SoftCreatR/WCF,WoltLab/WCF,SoftCreatR/WCF,Cyperghost/WCF,Cyperghost/WCF,WoltLab/WCF,WoltLab/WCF,Cyperghost/WCF,Cyperghost/WCF
|
php
|
## Code Before:
<?php
namespace wcf\page;
use wcf\system\menu\user\UserMenu;
use wcf\system\session\Session;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
/**
* Shows the account security page.
*
* @author Joshua Ruesweg
* @copyright 2001-2020 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Page
* @since 5.4
*/
class AccountSecurityPage extends AbstractPage {
/**
* @inheritDoc
*/
public $loginRequired = true;
/**
* @var Session[]
*/
private $activeSessions;
/**
* @inheritDoc
*/
public function readData() {
parent::readData();
$this->activeSessions = SessionHandler::getInstance()->getUserSessions(WCF::getUser());
}
/**
* @inheritDoc
*/
public function assignVariables() {
parent::assignVariables();
WCF::getTPL()->assign([
'activeSessions' => $this->activeSessions
]);
}
/**
* @inheritDoc
*/
public function show() {
// set active tab
UserMenu::getInstance()->setActiveMenuItem('wcf.user.menu.profile.security');
parent::show();
}
}
## Instruction:
Sort active sessions by last activity time
## Code After:
<?php
namespace wcf\page;
use wcf\system\menu\user\UserMenu;
use wcf\system\session\Session;
use wcf\system\session\SessionHandler;
use wcf\system\WCF;
/**
* Shows the account security page.
*
* @author Joshua Ruesweg
* @copyright 2001-2020 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Page
* @since 5.4
*/
class AccountSecurityPage extends AbstractPage {
/**
* @inheritDoc
*/
public $loginRequired = true;
/**
* @var Session[]
*/
private $activeSessions;
/**
* @inheritDoc
*/
public function readData() {
parent::readData();
$this->activeSessions = SessionHandler::getInstance()->getUserSessions(WCF::getUser());
usort($this->activeSessions, function ($a, $b) {
return $b->getLastActivityTime() <=> $a->getLastActivityTime();
});
}
/**
* @inheritDoc
*/
public function assignVariables() {
parent::assignVariables();
WCF::getTPL()->assign([
'activeSessions' => $this->activeSessions
]);
}
/**
* @inheritDoc
*/
public function show() {
// set active tab
UserMenu::getInstance()->setActiveMenuItem('wcf.user.menu.profile.security');
parent::show();
}
}
|
e5586458a7f00d9e891289b53e4827342b4d4f2a
|
blog/categories/index.html
|
blog/categories/index.html
|
---
layout: post-index
title: Blog Categories
description: "An archive of posts sorted by category."
comments: false
---
{% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign cats_list = site_cats | split:',' | sort %}
<ul class="entry-meta inline-list">
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<li><a href="#{{ this_word }}" class="tag"><span class="term">{{ this_word }}</span> <span class="count">{{ site.categories[this_word].size }}</span></a></li>
{% endunless %}{% endfor %}
</ul>
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<article>
<h2 id="{{ this_word }}" class="tag-heading">{{ this_word }}</h2>
<ul>
{% for post in site.categories[this_word] %}{% if post.title != null %}
<li class="entry-title"><a href="{{ site.url }}{{ post_url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endif %}{% endfor %}
</ul>
</article><!-- /.hentry -->
{% endunless %}{% endfor %}
|
---
layout: post-index
title: Blog Categories
description: "An archive of posts sorted by category."
comments: false
---
{% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign cats_list = site_cats | split:',' | sort %}
<ul class="entry-meta inline-list">
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<li><a href="#{{ this_word }}" class="tag"><span class="term">{{ this_word }}</span> <span class="count">{{ site.categories[this_word].size }}</span></a></li>
{% endunless %}{% endfor %}
</ul>
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<article>
<h2 id="{{ this_word }}" class="tag-heading">{{ this_word }}</h2>
<ul>
{% for post in site.categories[this_word] %}{% if post.title != null %}
<li class="entry-title"><a href="{{ post_url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endif %}{% endfor %}
</ul>
</article><!-- /.hentry -->
{% endunless %}{% endfor %}
|
Fix links in tag and categories
|
Fix links in tag and categories
|
HTML
|
apache-2.0
|
TechRapport/techrapport.github.io,TechRapport/techrapport.github.io,TechRapport/techrapport.github.io
|
html
|
## Code Before:
---
layout: post-index
title: Blog Categories
description: "An archive of posts sorted by category."
comments: false
---
{% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign cats_list = site_cats | split:',' | sort %}
<ul class="entry-meta inline-list">
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<li><a href="#{{ this_word }}" class="tag"><span class="term">{{ this_word }}</span> <span class="count">{{ site.categories[this_word].size }}</span></a></li>
{% endunless %}{% endfor %}
</ul>
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<article>
<h2 id="{{ this_word }}" class="tag-heading">{{ this_word }}</h2>
<ul>
{% for post in site.categories[this_word] %}{% if post.title != null %}
<li class="entry-title"><a href="{{ site.url }}{{ post_url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endif %}{% endfor %}
</ul>
</article><!-- /.hentry -->
{% endunless %}{% endfor %}
## Instruction:
Fix links in tag and categories
## Code After:
---
layout: post-index
title: Blog Categories
description: "An archive of posts sorted by category."
comments: false
---
{% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign cats_list = site_cats | split:',' | sort %}
<ul class="entry-meta inline-list">
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<li><a href="#{{ this_word }}" class="tag"><span class="term">{{ this_word }}</span> <span class="count">{{ site.categories[this_word].size }}</span></a></li>
{% endunless %}{% endfor %}
</ul>
{% for item in (0..site.categories.size) %}{% unless forloop.last %}
{% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
<article>
<h2 id="{{ this_word }}" class="tag-heading">{{ this_word }}</h2>
<ul>
{% for post in site.categories[this_word] %}{% if post.title != null %}
<li class="entry-title"><a href="{{ post_url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endif %}{% endfor %}
</ul>
</article><!-- /.hentry -->
{% endunless %}{% endfor %}
|
6bd668af3fd098bdd07a1bedd399564141e275da
|
README.md
|
README.md
|
**lowdown** is a fork of [hoedown](https://github.com/hoedown/hoedown),
although the parser and front-ends have changed significantly.
This is a read-only repository for tracking development of the system
and managing bug reports and patches. (Feature requests will be just be
closed, sorry!) Stable releases, documentation, and general information
are all available at the [website](https://kristaps.bsd.lv/lowdown).
If you have any comments or patches, please feel free to post them here.
# License
All sources use the ISC license.
See the [LICENSE.md](LICENSE.md) file for details.
|
**lowdown** is a fork of [hoedown](https://github.com/hoedown/hoedown),
although the parser and front-ends have changed significantly.
For stable releases, documentation, and general information, please visit
https://kristaps.bsd.lv/lowdown.
## License
All sources use the ISC license.
See the [LICENSE.md](LICENSE.md) file for details.
|
Remove mention of the CVS repository.
|
Remove mention of the CVS repository.
|
Markdown
|
isc
|
kristapsdz/lowdown,kristapsdz/lowdown,kristapsdz/lowdown
|
markdown
|
## Code Before:
**lowdown** is a fork of [hoedown](https://github.com/hoedown/hoedown),
although the parser and front-ends have changed significantly.
This is a read-only repository for tracking development of the system
and managing bug reports and patches. (Feature requests will be just be
closed, sorry!) Stable releases, documentation, and general information
are all available at the [website](https://kristaps.bsd.lv/lowdown).
If you have any comments or patches, please feel free to post them here.
# License
All sources use the ISC license.
See the [LICENSE.md](LICENSE.md) file for details.
## Instruction:
Remove mention of the CVS repository.
## Code After:
**lowdown** is a fork of [hoedown](https://github.com/hoedown/hoedown),
although the parser and front-ends have changed significantly.
For stable releases, documentation, and general information, please visit
https://kristaps.bsd.lv/lowdown.
## License
All sources use the ISC license.
See the [LICENSE.md](LICENSE.md) file for details.
|
94beba55dfa57cc71998cd2e5c8fa4ecdf359b15
|
README.md
|
README.md
|
Simple and FAST family budget organizer. Very easy to use, no training necessary.
## Change log
### Juno 13, 2016
- Add view/edit expense detail page (no save yet)
- Refactor application into multiple components
- Add routing for list vs view/edit, based on elm-lang/navigation
- Some routing code is ugly, I'm considering changing it to use sporto/hop.
### May 16, 2016
- Upgraded to Elm 0.17, yay!
- Size of compiled JS reduced by 40% - just due to Elm upgrade
|
Simple and FAST family budget organizer. Very easy to use, no training necessary.
## Change log
### June 17, 2016
- Add full expense editing
- Add full budget list editing
- Cancel the switch to React/Redux LOL!
### June 13, 2016
- Add view/edit expense detail page (no save yet)
- Refactor application into multiple components
- Add routing for list vs view/edit, based on elm-lang/navigation
- Some routing code is ugly, I'm considering changing it to use sporto/hop.
### May 16, 2016
- Upgraded to Elm 0.17, yay!
- Size of compiled JS reduced by 40% - just due to Elm upgrade
|
Add changelog entry to Readme
|
Add changelog entry to Readme
|
Markdown
|
agpl-3.0
|
aspushkinus/hobo-elm,aspushkinus/hobo-elm,aspushkinus/hobo-elm
|
markdown
|
## Code Before:
Simple and FAST family budget organizer. Very easy to use, no training necessary.
## Change log
### Juno 13, 2016
- Add view/edit expense detail page (no save yet)
- Refactor application into multiple components
- Add routing for list vs view/edit, based on elm-lang/navigation
- Some routing code is ugly, I'm considering changing it to use sporto/hop.
### May 16, 2016
- Upgraded to Elm 0.17, yay!
- Size of compiled JS reduced by 40% - just due to Elm upgrade
## Instruction:
Add changelog entry to Readme
## Code After:
Simple and FAST family budget organizer. Very easy to use, no training necessary.
## Change log
### June 17, 2016
- Add full expense editing
- Add full budget list editing
- Cancel the switch to React/Redux LOL!
### June 13, 2016
- Add view/edit expense detail page (no save yet)
- Refactor application into multiple components
- Add routing for list vs view/edit, based on elm-lang/navigation
- Some routing code is ugly, I'm considering changing it to use sporto/hop.
### May 16, 2016
- Upgraded to Elm 0.17, yay!
- Size of compiled JS reduced by 40% - just due to Elm upgrade
|
d7b5afd3ee499b154a013e389318fb7b253d94b0
|
README.md
|
README.md
|
giv2giv-jquery
==============
`https://giv2giv.org` user interface using jquery, history.js, crossroads.js
##Setup:##
*Step 1*: Install nginx
sudo apt-get install nginx
*Step 2*: Edit example-nginx.conf to point to your local git folder
root /home/my_user/giv2giv-jquery;
*Step 3*: Make a link to *your* `example-nginx.conf` in your nginx `sites-available` directory (default: `/etc/nginx/sites-enabled`)
cd /etc/nginx/sites-enabled
sudo ln -s ~my_user/giv2giv-jquery/example-nginx.conf
*Step 4*: Start or restart nginx
sudo service nginx start
*Step 5*: Edit `js/app.js` to point to your giv2giv API. Options include:
The giv2giv test server:
var server_url = "https://apitest.giv2giv.org"
A local development copy of the giv2giv Ruby on Rails API from [giv2giv-rails](https://github.com/giv2giv/giv2giv-rails):
var server_url = "http://localhost:3000"
*Step 6*: Using a browser navigate to `http://localhost`
|
giv2giv-jquery
==============
`https://giv2giv.org` user interface using jquery, history.js, crossroads.js
##Setup:##
**Step 1**: Install nginx
sudo apt-get install nginx
**Step 2**: Edit example-nginx.conf to point to your local git folder
root /home/my_user/giv2giv-jquery;
**Step 3**: Make a link to *your* `example-nginx.conf` in your nginx `sites-available` directory (default: `/etc/nginx/sites-enabled`)
cd /etc/nginx/sites-enabled
sudo ln -s ~my_user/giv2giv-jquery/example-nginx.conf
**Step 4**: Start or restart nginx
sudo service nginx start
**Step 5**: Edit `js/app.js` to point to your giv2giv API. Options include:
The giv2giv test server:
var server_url = "https://apitest.giv2giv.org"
A local development copy of the giv2giv Ruby on Rails API from [giv2giv-rails](https://github.com/giv2giv/giv2giv-rails):
var server_url = "http://localhost:3000"
**Step 6**: Using a browser navigate to `http://localhost`
|
Make headers bold instead of italics
|
Make headers bold instead of italics
|
Markdown
|
mit
|
giv2giv/giv2giv-jquery,giv2giv/giv2giv-jquery
|
markdown
|
## Code Before:
giv2giv-jquery
==============
`https://giv2giv.org` user interface using jquery, history.js, crossroads.js
##Setup:##
*Step 1*: Install nginx
sudo apt-get install nginx
*Step 2*: Edit example-nginx.conf to point to your local git folder
root /home/my_user/giv2giv-jquery;
*Step 3*: Make a link to *your* `example-nginx.conf` in your nginx `sites-available` directory (default: `/etc/nginx/sites-enabled`)
cd /etc/nginx/sites-enabled
sudo ln -s ~my_user/giv2giv-jquery/example-nginx.conf
*Step 4*: Start or restart nginx
sudo service nginx start
*Step 5*: Edit `js/app.js` to point to your giv2giv API. Options include:
The giv2giv test server:
var server_url = "https://apitest.giv2giv.org"
A local development copy of the giv2giv Ruby on Rails API from [giv2giv-rails](https://github.com/giv2giv/giv2giv-rails):
var server_url = "http://localhost:3000"
*Step 6*: Using a browser navigate to `http://localhost`
## Instruction:
Make headers bold instead of italics
## Code After:
giv2giv-jquery
==============
`https://giv2giv.org` user interface using jquery, history.js, crossroads.js
##Setup:##
**Step 1**: Install nginx
sudo apt-get install nginx
**Step 2**: Edit example-nginx.conf to point to your local git folder
root /home/my_user/giv2giv-jquery;
**Step 3**: Make a link to *your* `example-nginx.conf` in your nginx `sites-available` directory (default: `/etc/nginx/sites-enabled`)
cd /etc/nginx/sites-enabled
sudo ln -s ~my_user/giv2giv-jquery/example-nginx.conf
**Step 4**: Start or restart nginx
sudo service nginx start
**Step 5**: Edit `js/app.js` to point to your giv2giv API. Options include:
The giv2giv test server:
var server_url = "https://apitest.giv2giv.org"
A local development copy of the giv2giv Ruby on Rails API from [giv2giv-rails](https://github.com/giv2giv/giv2giv-rails):
var server_url = "http://localhost:3000"
**Step 6**: Using a browser navigate to `http://localhost`
|
01939bee685831667426a30fb63a001174689fdd
|
src/components/about/about-body.jsx
|
src/components/about/about-body.jsx
|
import React from 'react';
import Icon from '../partials/icon.jsx';
import linebreakToBr from "../../helpers/linebreak-to-br";
export default class AboutBody extends React.PureComponent {
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
(element, i) => <a className="flex flex-cross-center" key={i} href={element.url} target="_blank"><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.text}</a>
)
return (
<div className="pt-content-card__body pt-content-card__body__about flex flex-main-center">
<div className="pt-content-card__body__about__presentation flex flex-dc flex-full-center">
<img src="./assets/avatar.svg" alt="WEBSITE OWNER's Image" />
<h1 className="ta-c">{linebreakToBr(about.title)}</h1>
</div>
<div className="pt-content-card__body__about__details flex flex-dc flex-full-center">
<p>
{linebreakToBr(about.description)}
</p>
<h3>You'll find me on:</h3>
<div className="pt-content-card__body__about__details__net-icons flex-sa">
{findMeOnElements}
</div>
</div>
</div>
);
}
}
|
import React from 'react';
import Icon from '../partials/icon.jsx';
import linebreakToBr from "../../helpers/linebreak-to-br";
export default class AboutBody extends React.PureComponent {
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
(element, i) => (element.url ?
<a className="flex flex-cross-center" key={i} href={element.url} target="_blank"><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.text}</a>
:
<span className="flex flex-cross-center" key={i}><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.text}</span>
)
)
return (
<div className="pt-content-card__body pt-content-card__body__about flex flex-main-center">
<div className="pt-content-card__body__about__presentation flex flex-dc flex-full-center">
<img src="./assets/avatar.svg" alt="WEBSITE OWNER's Image" />
<h1 className="ta-c">{linebreakToBr(about.title)}</h1>
</div>
<div className="pt-content-card__body__about__details flex flex-dc flex-full-center">
<p>
{linebreakToBr(about.description)}
</p>
<h3>You'll find me on:</h3>
<div className="pt-content-card__body__about__details__net-icons flex-sa">
{findMeOnElements}
</div>
</div>
</div>
);
}
}
|
Replace a for span in findMeOnElements which hasn't any link
|
Replace a for span in findMeOnElements which hasn't any link
|
JSX
|
mit
|
nethruster/ptemplate,nethruster/ptemplate
|
jsx
|
## Code Before:
import React from 'react';
import Icon from '../partials/icon.jsx';
import linebreakToBr from "../../helpers/linebreak-to-br";
export default class AboutBody extends React.PureComponent {
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
(element, i) => <a className="flex flex-cross-center" key={i} href={element.url} target="_blank"><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.text}</a>
)
return (
<div className="pt-content-card__body pt-content-card__body__about flex flex-main-center">
<div className="pt-content-card__body__about__presentation flex flex-dc flex-full-center">
<img src="./assets/avatar.svg" alt="WEBSITE OWNER's Image" />
<h1 className="ta-c">{linebreakToBr(about.title)}</h1>
</div>
<div className="pt-content-card__body__about__details flex flex-dc flex-full-center">
<p>
{linebreakToBr(about.description)}
</p>
<h3>You'll find me on:</h3>
<div className="pt-content-card__body__about__details__net-icons flex-sa">
{findMeOnElements}
</div>
</div>
</div>
);
}
}
## Instruction:
Replace a for span in findMeOnElements which hasn't any link
## Code After:
import React from 'react';
import Icon from '../partials/icon.jsx';
import linebreakToBr from "../../helpers/linebreak-to-br";
export default class AboutBody extends React.PureComponent {
render() {
const {about} = this.props.profile;
const findMeOnElements = about.findMeOn.map(
(element, i) => (element.url ?
<a className="flex flex-cross-center" key={i} href={element.url} target="_blank"><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.text}</a>
:
<span className="flex flex-cross-center" key={i}><Icon iconName={element.iconName} iconColor={element.hoverColor} /> {element.text}</span>
)
)
return (
<div className="pt-content-card__body pt-content-card__body__about flex flex-main-center">
<div className="pt-content-card__body__about__presentation flex flex-dc flex-full-center">
<img src="./assets/avatar.svg" alt="WEBSITE OWNER's Image" />
<h1 className="ta-c">{linebreakToBr(about.title)}</h1>
</div>
<div className="pt-content-card__body__about__details flex flex-dc flex-full-center">
<p>
{linebreakToBr(about.description)}
</p>
<h3>You'll find me on:</h3>
<div className="pt-content-card__body__about__details__net-icons flex-sa">
{findMeOnElements}
</div>
</div>
</div>
);
}
}
|
e2b7dc6c6d85c3478d95814a4c712657c32d8f5b
|
leetcode/409_longest_palindrome.go
|
leetcode/409_longest_palindrome.go
|
package leetcode
// 409. Longest Palindrome
func longestPalindrome(s string) int {
bytes := make(map[byte]int, 0)
for i := 0; i < len(s); i++ {
b := s[i]
count := bytes[b]
bytes[b] = count + 1
}
res := 0
hasPrime := false
for _, count := range bytes {
x, y := count/2, count%2
res += x * 2
if y == 1 {
hasPrime = true
}
}
if hasPrime {
res++
}
return res
}
|
package leetcode
// 409. Longest Palindrome
func longestPalindrome(s string) int {
bytes := make(map[byte]int, 0)
count := 0
for i := 0; i < len(s); i++ {
b := s[i]
_, ok := bytes[b]
if ok {
count++
delete(bytes, b)
} else {
bytes[b] = 1
}
}
if len(bytes) > 0 {
return count*2 + 1
}
return count * 2
}
|
Fix 409. Longest Palindrome to use single loop
|
Fix 409. Longest Palindrome to use single loop
|
Go
|
mit
|
motomux/go-algo
|
go
|
## Code Before:
package leetcode
// 409. Longest Palindrome
func longestPalindrome(s string) int {
bytes := make(map[byte]int, 0)
for i := 0; i < len(s); i++ {
b := s[i]
count := bytes[b]
bytes[b] = count + 1
}
res := 0
hasPrime := false
for _, count := range bytes {
x, y := count/2, count%2
res += x * 2
if y == 1 {
hasPrime = true
}
}
if hasPrime {
res++
}
return res
}
## Instruction:
Fix 409. Longest Palindrome to use single loop
## Code After:
package leetcode
// 409. Longest Palindrome
func longestPalindrome(s string) int {
bytes := make(map[byte]int, 0)
count := 0
for i := 0; i < len(s); i++ {
b := s[i]
_, ok := bytes[b]
if ok {
count++
delete(bytes, b)
} else {
bytes[b] = 1
}
}
if len(bytes) > 0 {
return count*2 + 1
}
return count * 2
}
|
2bf8c5d96335aea58730094c66fa28438d0ee859
|
README.md
|
README.md
|
R Code for analysis of PBR Tier System simulations.
|
R Code for analysis of PBR Tier System simulations.
See if syntax highlighting works for R code:
```R
x = 4
y = sqrt(x)
```
|
Test edit to .md in RStudio
|
Test edit to .md in RStudio
|
Markdown
|
mit
|
John-Brandon/pbrr
|
markdown
|
## Code Before:
R Code for analysis of PBR Tier System simulations.
## Instruction:
Test edit to .md in RStudio
## Code After:
R Code for analysis of PBR Tier System simulations.
See if syntax highlighting works for R code:
```R
x = 4
y = sqrt(x)
```
|
e8f4df09baca31917a9dedb1b1e74359bdda32f1
|
app/components/Header/index.js
|
app/components/Header/index.js
|
import React from 'react';
import styled from 'styled-components';
import theme from 'theme';
import Hamburger, { Bar } from 'components/Hamburger';
const Logo = styled.h1`
font-family: Poppins, sans-serif;
letter-spacing: 1px;
font-size: 30px;
margin: 0;
display: inline;
flex: 0 0 calc(100% - 130px);
text-align: center;
`;
const MenuButton = styled.div`
display: inline-flex;
cursor: pointer;
justify-content: center;
align-items: center;
height: 100%;
width: 65px;
border-right: 1px solid ${theme.lightGray};
flex: 0 0 65px;
&:hover {
${Bar} {
&::after {
left: 0;
}
}
}
`;
const StyledHeader = styled.header`
border-bottom: 1px solid ${theme.lightGray};
height: 70px;
display: flex;
align-items: center;
`;
class Header extends React.PureComponent {
render() {
return (
<StyledHeader role="banner">
<MenuButton>
<Hamburger />
</MenuButton>
<Logo>MMDb</Logo>
</StyledHeader>
);
}
}
Header.propTypes = {
};
export default Header;
|
import React from 'react';
import styled from 'styled-components';
import theme from 'theme';
import Hamburger, { Bar } from 'components/Hamburger';
import SearchButton from 'components/SearchButton';
const Logo = styled.h1`
font-family: Poppins, sans-serif;
letter-spacing: 1px;
font-size: 30px;
margin: 0;
display: inline;
flex: 0 0 calc(100% - 130px);
text-align: center;
`;
const MenuButton = styled.div`
display: inline-flex;
cursor: pointer;
justify-content: center;
align-items: center;
height: 100%;
width: 65px;
border-right: 1px solid ${theme.lightGray};
flex: 0 0 65px;
&:hover {
${Bar} {
&::after {
left: 0;
}
}
}
`;
const StyledHeader = styled.header`
border-bottom: 1px solid ${theme.lightGray};
height: 70px;
display: flex;
align-items: center;
`;
class Header extends React.PureComponent {
render() {
return (
<StyledHeader role="banner">
<MenuButton>
<Hamburger />
</MenuButton>
<Logo>MMDb</Logo>
<MenuButton>
<SearchButton />
</MenuButton>
</StyledHeader>
);
}
}
Header.propTypes = {
};
export default Header;
|
Add SearchButton component to Header component
|
Add SearchButton component to Header component
|
JavaScript
|
mit
|
nathanhood/mmdb,nathanhood/mmdb
|
javascript
|
## Code Before:
import React from 'react';
import styled from 'styled-components';
import theme from 'theme';
import Hamburger, { Bar } from 'components/Hamburger';
const Logo = styled.h1`
font-family: Poppins, sans-serif;
letter-spacing: 1px;
font-size: 30px;
margin: 0;
display: inline;
flex: 0 0 calc(100% - 130px);
text-align: center;
`;
const MenuButton = styled.div`
display: inline-flex;
cursor: pointer;
justify-content: center;
align-items: center;
height: 100%;
width: 65px;
border-right: 1px solid ${theme.lightGray};
flex: 0 0 65px;
&:hover {
${Bar} {
&::after {
left: 0;
}
}
}
`;
const StyledHeader = styled.header`
border-bottom: 1px solid ${theme.lightGray};
height: 70px;
display: flex;
align-items: center;
`;
class Header extends React.PureComponent {
render() {
return (
<StyledHeader role="banner">
<MenuButton>
<Hamburger />
</MenuButton>
<Logo>MMDb</Logo>
</StyledHeader>
);
}
}
Header.propTypes = {
};
export default Header;
## Instruction:
Add SearchButton component to Header component
## Code After:
import React from 'react';
import styled from 'styled-components';
import theme from 'theme';
import Hamburger, { Bar } from 'components/Hamburger';
import SearchButton from 'components/SearchButton';
const Logo = styled.h1`
font-family: Poppins, sans-serif;
letter-spacing: 1px;
font-size: 30px;
margin: 0;
display: inline;
flex: 0 0 calc(100% - 130px);
text-align: center;
`;
const MenuButton = styled.div`
display: inline-flex;
cursor: pointer;
justify-content: center;
align-items: center;
height: 100%;
width: 65px;
border-right: 1px solid ${theme.lightGray};
flex: 0 0 65px;
&:hover {
${Bar} {
&::after {
left: 0;
}
}
}
`;
const StyledHeader = styled.header`
border-bottom: 1px solid ${theme.lightGray};
height: 70px;
display: flex;
align-items: center;
`;
class Header extends React.PureComponent {
render() {
return (
<StyledHeader role="banner">
<MenuButton>
<Hamburger />
</MenuButton>
<Logo>MMDb</Logo>
<MenuButton>
<SearchButton />
</MenuButton>
</StyledHeader>
);
}
}
Header.propTypes = {
};
export default Header;
|
2770d499cc3d3e47bc7c5d30a272e860c18cff73
|
test/validate-config.js
|
test/validate-config.js
|
var test = require('tape')
test('load config in eslint to validate all rule syntax is correct', function (t) {
var CLIEngine = require('eslint').CLIEngine
var cli = new CLIEngine({
useEslintrc: false,
configFile: 'eslintrc.json'
})
t.ok(cli.executeOnText('var foo\n'))
t.end()
})
|
var test = require('tape')
test('load config in eslint to validate all rule syntax is correct', function (t) {
var CLIEngine = require('eslint').CLIEngine
var cli = new CLIEngine({
useEslintrc: false,
configFile: 'eslintrc.json'
})
var code = 'var foo = 1\nvar bar = function () {}\nbar(foo)\n'
t.ok(cli.executeOnText(code).errorCount === 0)
t.end()
})
|
Make test check for errorCount of 0
|
Make test check for errorCount of 0
|
JavaScript
|
mit
|
valedaemon/eslint-config-postmodern,feross/eslint-config-standard
|
javascript
|
## Code Before:
var test = require('tape')
test('load config in eslint to validate all rule syntax is correct', function (t) {
var CLIEngine = require('eslint').CLIEngine
var cli = new CLIEngine({
useEslintrc: false,
configFile: 'eslintrc.json'
})
t.ok(cli.executeOnText('var foo\n'))
t.end()
})
## Instruction:
Make test check for errorCount of 0
## Code After:
var test = require('tape')
test('load config in eslint to validate all rule syntax is correct', function (t) {
var CLIEngine = require('eslint').CLIEngine
var cli = new CLIEngine({
useEslintrc: false,
configFile: 'eslintrc.json'
})
var code = 'var foo = 1\nvar bar = function () {}\nbar(foo)\n'
t.ok(cli.executeOnText(code).errorCount === 0)
t.end()
})
|
d4683f71ad6cbdf7836cec2c55e2e889d4f2f0e9
|
.travis.yml
|
.travis.yml
|
language: node_js
sudo: false
node_js:
- "0.10"
- "0.11"
before_install:
- npm config set spin false
- npm install -g npm@^2
- npm install -g sails
before_script:
- npm install -g ember-cli
script: npm run-script test-all
|
language: node_js
sudo: false
node_js:
- "0.10.34"
- "0.11.14"
before_install:
- npm config set spin false
- npm install -g npm@^2
- npm install -g ember-cli
- npm install -g sails
- export PATH=$PATH:/home/travis/.nvm/v0.11.14/bin/:/home/travis/.nvm/v0.10.34/bin/
script: npm run-script test-all
|
Fix node versions and add ember to path manually.
|
Fix node versions and add ember to path manually.
|
YAML
|
mit
|
kriswill/sane,codepreneur/sane,devinus/sane,sane/sane,kriswill/sane,artificialio/sane,codepreneur/sane,imfly/sane,devinus/sane,ndufreche/sane,ndufreche/sane,sane/sane,IanVS/sane,artificialio/sane,imfly/sane,IanVS/sane
|
yaml
|
## Code Before:
language: node_js
sudo: false
node_js:
- "0.10"
- "0.11"
before_install:
- npm config set spin false
- npm install -g npm@^2
- npm install -g sails
before_script:
- npm install -g ember-cli
script: npm run-script test-all
## Instruction:
Fix node versions and add ember to path manually.
## Code After:
language: node_js
sudo: false
node_js:
- "0.10.34"
- "0.11.14"
before_install:
- npm config set spin false
- npm install -g npm@^2
- npm install -g ember-cli
- npm install -g sails
- export PATH=$PATH:/home/travis/.nvm/v0.11.14/bin/:/home/travis/.nvm/v0.10.34/bin/
script: npm run-script test-all
|
fd88b90aa3f455edd59d4ad3892aaf0e37164132
|
recipes/default.rb
|
recipes/default.rb
|
if data_bag(node['omnibus-gitlab']['data_bag'])
environment_secrets = data_bag_item(node['omnibus-gitlab']['data_bag'], node.chef_environment)
if environment_secrets
node.consume_attributes(environment_secrets)
end
end
pkg_source = node['omnibus-gitlab']['package']['url']
pkg_path = File.join(Chef::Config[:file_cache_path], File.basename(pkg_source))
remote_file pkg_path do
source pkg_source
checksum node['omnibus-gitlab']['package']['sha256']
end
case File.extname(pkg_source)
when ".deb"
dpkg_package "gitlab" do
source pkg_path
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
else
raise "Unsupported package format: #{pkg_source}"
end
directory "/etc/gitlab"
template "/etc/gitlab/gitlab.rb" do
mode "0600"
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
execute "gitlab-ctl reconfigure" do
action :nothing
end
|
data_bag_name = node['omnibus-gitlab']['data_bag']
data_bag_item = node.chef_environment
if search(data_bag_name, "id:#{data_bag_item}").any?
environment_secrets = data_bag_item(data_bag_name, data_bag_item)
node.consume_attributes(environment_secrets)
end
pkg_source = node['omnibus-gitlab']['package']['url']
pkg_path = File.join(Chef::Config[:file_cache_path], File.basename(pkg_source))
remote_file pkg_path do
source pkg_source
checksum node['omnibus-gitlab']['package']['sha256']
end
case File.extname(pkg_source)
when ".deb"
dpkg_package "gitlab" do
source pkg_path
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
else
raise "Unsupported package format: #{pkg_source}"
end
directory "/etc/gitlab"
template "/etc/gitlab/gitlab.rb" do
mode "0600"
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
execute "gitlab-ctl reconfigure" do
action :nothing
end
|
Use `search` to check if the data bag exists
|
Use `search` to check if the data bag exists
|
Ruby
|
mit
|
mattyjones/cookbook-omnibus-gitlab,mattyjones/cookbook-omnibus-gitlab,mattyjones/cookbook-omnibus-gitlab
|
ruby
|
## Code Before:
if data_bag(node['omnibus-gitlab']['data_bag'])
environment_secrets = data_bag_item(node['omnibus-gitlab']['data_bag'], node.chef_environment)
if environment_secrets
node.consume_attributes(environment_secrets)
end
end
pkg_source = node['omnibus-gitlab']['package']['url']
pkg_path = File.join(Chef::Config[:file_cache_path], File.basename(pkg_source))
remote_file pkg_path do
source pkg_source
checksum node['omnibus-gitlab']['package']['sha256']
end
case File.extname(pkg_source)
when ".deb"
dpkg_package "gitlab" do
source pkg_path
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
else
raise "Unsupported package format: #{pkg_source}"
end
directory "/etc/gitlab"
template "/etc/gitlab/gitlab.rb" do
mode "0600"
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
execute "gitlab-ctl reconfigure" do
action :nothing
end
## Instruction:
Use `search` to check if the data bag exists
## Code After:
data_bag_name = node['omnibus-gitlab']['data_bag']
data_bag_item = node.chef_environment
if search(data_bag_name, "id:#{data_bag_item}").any?
environment_secrets = data_bag_item(data_bag_name, data_bag_item)
node.consume_attributes(environment_secrets)
end
pkg_source = node['omnibus-gitlab']['package']['url']
pkg_path = File.join(Chef::Config[:file_cache_path], File.basename(pkg_source))
remote_file pkg_path do
source pkg_source
checksum node['omnibus-gitlab']['package']['sha256']
end
case File.extname(pkg_source)
when ".deb"
dpkg_package "gitlab" do
source pkg_path
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
else
raise "Unsupported package format: #{pkg_source}"
end
directory "/etc/gitlab"
template "/etc/gitlab/gitlab.rb" do
mode "0600"
notifies :run, 'execute[gitlab-ctl reconfigure]'
end
execute "gitlab-ctl reconfigure" do
action :nothing
end
|
de8a3e47fd77172a67d5f1f6fb8cb33f1fc70ce7
|
src/libclient/channel.cpp
|
src/libclient/channel.cpp
|
class Channel::Private
{
public:
Private()
: id(0)
{
}
int id;
QString target;
QString certificate;
TimingPtr timing;
};
Channel::Channel()
: d(new Private)
{
}
Channel::Channel(const int &id, const QString &target, const QString &certificate, const TimingPtr &timing)
: d(new Private)
{
d->id = id;
d->target = target;
d->certificate = certificate;
d->timing = timing;
}
Channel::~Channel()
{
delete d;
}
ChannelPtr Channel::fromVariant(const QVariant &variant)
{
QVariantMap hash = variant.toMap();
return ChannelPtr(new Channel(hash.value("id").toInt(),
hash.value("target").toString(),
hash.value("certificate").toString(),
TimingFactory::timingFromVariant(hash.value("timing"))));
}
QVariant Channel::toVariant() const
{
QVariantMap hash;
hash.insert("id", d->id);
hash.insert("target", d->target);
hash.insert("certificate", d->certificate);
hash.insert("timing", d->timing->toVariant());
return hash;
}
void Channel::setTarget(const QString &target)
{
d->target = target;
}
QString Channel::target() const
{
return d->target;
}
TimingPtr Channel::timing() const
{
return d->timing;
}
|
class Channel::Private
{
public:
Private()
: id(0)
{
}
int id;
QString target;
QString certificate;
TimingPtr timing;
};
Channel::Channel()
: d(new Private)
{
}
Channel::Channel(const int &id, const QString &target, const QString &certificate, const TimingPtr &timing)
: d(new Private)
{
d->id = id;
d->target = target;
d->certificate = certificate;
d->timing = timing;
}
Channel::~Channel()
{
delete d;
}
ChannelPtr Channel::fromVariant(const QVariant &variant)
{
QVariantMap hash = variant.toMap();
return ChannelPtr(new Channel(hash.value("id").toInt(),
hash.value("target").toString(),
hash.value("certificate").toString(),
TimingFactory::timingFromVariant(hash.value("timing"))));
}
QVariant Channel::toVariant() const
{
QVariantMap hash;
hash.insert("id", d->id);
hash.insert("target", d->target);
hash.insert("certificate", d->certificate);
if(d->timing)
{
hash.insert("timing", d->timing->toVariant());
}
return hash;
}
void Channel::setTarget(const QString &target)
{
d->target = target;
}
QString Channel::target() const
{
return d->target;
}
TimingPtr Channel::timing() const
{
return d->timing;
}
|
Fix bug when timing is not set inc hannel
|
Fix bug when timing is not set inc hannel
|
C++
|
bsd-3-clause
|
HSAnet/glimpse_client,HSAnet/glimpse_client,Kri-7-q/glimpse_client-1,personalunion/glimpse_client-1,Kri-7-q/glimpse_client-1,MKV21/glimpse_client,HSAnet/glimpse_client,Kri-7-q/glimpse_client-1,Kri-7-q/glimpse_client-1,personalunion/glimpse_client-1,HSAnet/glimpse_client,HSAnet/glimpse_client,Kri-7-q/glimpse_client-1,MKV21/glimpse_client,personalunion/glimpse_client-1,MKV21/glimpse_client,MKV21/glimpse_client,personalunion/glimpse_client-1,personalunion/glimpse_client-1,MKV21/glimpse_client
|
c++
|
## Code Before:
class Channel::Private
{
public:
Private()
: id(0)
{
}
int id;
QString target;
QString certificate;
TimingPtr timing;
};
Channel::Channel()
: d(new Private)
{
}
Channel::Channel(const int &id, const QString &target, const QString &certificate, const TimingPtr &timing)
: d(new Private)
{
d->id = id;
d->target = target;
d->certificate = certificate;
d->timing = timing;
}
Channel::~Channel()
{
delete d;
}
ChannelPtr Channel::fromVariant(const QVariant &variant)
{
QVariantMap hash = variant.toMap();
return ChannelPtr(new Channel(hash.value("id").toInt(),
hash.value("target").toString(),
hash.value("certificate").toString(),
TimingFactory::timingFromVariant(hash.value("timing"))));
}
QVariant Channel::toVariant() const
{
QVariantMap hash;
hash.insert("id", d->id);
hash.insert("target", d->target);
hash.insert("certificate", d->certificate);
hash.insert("timing", d->timing->toVariant());
return hash;
}
void Channel::setTarget(const QString &target)
{
d->target = target;
}
QString Channel::target() const
{
return d->target;
}
TimingPtr Channel::timing() const
{
return d->timing;
}
## Instruction:
Fix bug when timing is not set inc hannel
## Code After:
class Channel::Private
{
public:
Private()
: id(0)
{
}
int id;
QString target;
QString certificate;
TimingPtr timing;
};
Channel::Channel()
: d(new Private)
{
}
Channel::Channel(const int &id, const QString &target, const QString &certificate, const TimingPtr &timing)
: d(new Private)
{
d->id = id;
d->target = target;
d->certificate = certificate;
d->timing = timing;
}
Channel::~Channel()
{
delete d;
}
ChannelPtr Channel::fromVariant(const QVariant &variant)
{
QVariantMap hash = variant.toMap();
return ChannelPtr(new Channel(hash.value("id").toInt(),
hash.value("target").toString(),
hash.value("certificate").toString(),
TimingFactory::timingFromVariant(hash.value("timing"))));
}
QVariant Channel::toVariant() const
{
QVariantMap hash;
hash.insert("id", d->id);
hash.insert("target", d->target);
hash.insert("certificate", d->certificate);
if(d->timing)
{
hash.insert("timing", d->timing->toVariant());
}
return hash;
}
void Channel::setTarget(const QString &target)
{
d->target = target;
}
QString Channel::target() const
{
return d->target;
}
TimingPtr Channel::timing() const
{
return d->timing;
}
|
de6d22bc04255da642a9fba83f6b02fb9df271f7
|
app/models/peoplefinder/concerns/searchable.rb
|
app/models/peoplefinder/concerns/searchable.rb
|
require 'peoplefinder'
module Peoplefinder::Concerns::Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name [Rails.env, model_name.collection.gsub(/\//, '-')].join('_')
def self.delete_indexes
__elasticsearch__.delete_index! index: Peoplefinder::Person.index_name
end
def self.fuzzy_search(query)
search(
size: 100,
query: {
fuzzy_like_this: {
fields: [:name, :description, :location, :role_and_group],
like_text: query, prefix_length: 3, ignore_tf: true
}
}
)
end
def as_indexed_json(_options = {})
as_json(
only: [:description, :location],
methods: [:name, :role_and_group]
)
end
end
end
|
require 'peoplefinder'
module Peoplefinder::Concerns::Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name [Rails.env, model_name.collection.gsub(/\//, '-')].join('_')
def self.delete_indexes
__elasticsearch__.delete_index! index: Peoplefinder::Person.index_name
end
def self.fuzzy_search(query)
search(
size: 100,
query: {
fuzzy_like_this: {
fields: [:name, :tags, :description, :location, :role_and_group],
like_text: query, prefix_length: 3, ignore_tf: true
}
}
)
end
def as_indexed_json(_options = {})
as_json(
only: [:tags, :description, :location],
methods: [:name, :role_and_group]
)
end
end
end
|
Add tags to elasticsearch index
|
Add tags to elasticsearch index
|
Ruby
|
mit
|
MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder
|
ruby
|
## Code Before:
require 'peoplefinder'
module Peoplefinder::Concerns::Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name [Rails.env, model_name.collection.gsub(/\//, '-')].join('_')
def self.delete_indexes
__elasticsearch__.delete_index! index: Peoplefinder::Person.index_name
end
def self.fuzzy_search(query)
search(
size: 100,
query: {
fuzzy_like_this: {
fields: [:name, :description, :location, :role_and_group],
like_text: query, prefix_length: 3, ignore_tf: true
}
}
)
end
def as_indexed_json(_options = {})
as_json(
only: [:description, :location],
methods: [:name, :role_and_group]
)
end
end
end
## Instruction:
Add tags to elasticsearch index
## Code After:
require 'peoplefinder'
module Peoplefinder::Concerns::Searchable
extend ActiveSupport::Concern
included do
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
index_name [Rails.env, model_name.collection.gsub(/\//, '-')].join('_')
def self.delete_indexes
__elasticsearch__.delete_index! index: Peoplefinder::Person.index_name
end
def self.fuzzy_search(query)
search(
size: 100,
query: {
fuzzy_like_this: {
fields: [:name, :tags, :description, :location, :role_and_group],
like_text: query, prefix_length: 3, ignore_tf: true
}
}
)
end
def as_indexed_json(_options = {})
as_json(
only: [:tags, :description, :location],
methods: [:name, :role_and_group]
)
end
end
end
|
bfc7ae42c589838f6ae04b3d2e944d585e8382bb
|
www/app/app.js
|
www/app/app.js
|
'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
'ngCookies',
'ngMessages',
'angular-md5',
'api.v1',
'rcDirectives',
'rcCart',
'app.config',
'app.router',
'app.run',
'app.run.dev',
'app.filters',
'app.services'
]);
|
'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
'ngCookies',
'ngMessages',
'ngFileUpload',
'ngImgCrop',
'angular-md5',
'api.v1',
'rcDirectives',
'rcCart',
'app.config',
'app.router',
'app.run',
'app.run.dev',
'app.filters',
'app.services'
]);
|
Include new libraries in the project.
|
Include new libraries in the project.
|
JavaScript
|
mit
|
rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed
|
javascript
|
## Code Before:
'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
'ngCookies',
'ngMessages',
'angular-md5',
'api.v1',
'rcDirectives',
'rcCart',
'app.config',
'app.router',
'app.run',
'app.run.dev',
'app.filters',
'app.services'
]);
## Instruction:
Include new libraries in the project.
## Code After:
'use strict';
/*
* Angular Seed - v0.1
* https://github.com/rachellcarbone/angular-seed/
* Copyright (c) 2015 Rachel L Carbone; Licensed MIT
*/
// Include modules, and run application.
angular.module('theApp', [
'ui.bootstrap',
'ui.bootstrap.showErrors',
'datatables',
'datatables.bootstrap',
'ngCookies',
'ngMessages',
'ngFileUpload',
'ngImgCrop',
'angular-md5',
'api.v1',
'rcDirectives',
'rcCart',
'app.config',
'app.router',
'app.run',
'app.run.dev',
'app.filters',
'app.services'
]);
|
918c679d941d9384c6beee3db4487361b4a64b6e
|
lettre/examples/smtp.rs
|
lettre/examples/smtp.rs
|
extern crate lettre;
use lettre::{EmailTransport, SimpleSendableEmail};
use lettre::smtp::SmtpTransportBuilder;
fn main() {
let email = SimpleSendableEmail::new(
"user@localhost",
vec!["root@localhost"],
"file_id",
"Hello file",
);
// Open a local connection on port 25
let mut mailer = SmtpTransportBuilder::localhost().unwrap().build();
// Send the email
let result = mailer.send(email);
if result.is_ok() {
println!("Email sent");
} else {
println!("Could not send email: {:?}", result);
}
assert!(result.is_ok());
}
|
extern crate lettre;
use lettre::{EmailTransport, SimpleSendableEmail};
use lettre::smtp::{SecurityLevel, SmtpTransportBuilder};
fn main() {
let email = SimpleSendableEmail::new(
"user@localhost",
vec!["root@localhost"],
"file_id",
"Hello ß☺ example",
);
// Open a local connection on port 25
let mut mailer = SmtpTransportBuilder::localhost().unwrap().security_level(SecurityLevel::Opportunistic).build();
// Send the email
let result = mailer.send(email);
if result.is_ok() {
println!("Email sent");
} else {
println!("Could not send email: {:?}", result);
}
assert!(result.is_ok());
}
|
Use utf-8 chars in example email
|
feat(transport): Use utf-8 chars in example email
|
Rust
|
mit
|
amousset/lettre,amousset/rust-smtp,lettre/lettre,amousset/lettre
|
rust
|
## Code Before:
extern crate lettre;
use lettre::{EmailTransport, SimpleSendableEmail};
use lettre::smtp::SmtpTransportBuilder;
fn main() {
let email = SimpleSendableEmail::new(
"user@localhost",
vec!["root@localhost"],
"file_id",
"Hello file",
);
// Open a local connection on port 25
let mut mailer = SmtpTransportBuilder::localhost().unwrap().build();
// Send the email
let result = mailer.send(email);
if result.is_ok() {
println!("Email sent");
} else {
println!("Could not send email: {:?}", result);
}
assert!(result.is_ok());
}
## Instruction:
feat(transport): Use utf-8 chars in example email
## Code After:
extern crate lettre;
use lettre::{EmailTransport, SimpleSendableEmail};
use lettre::smtp::{SecurityLevel, SmtpTransportBuilder};
fn main() {
let email = SimpleSendableEmail::new(
"user@localhost",
vec!["root@localhost"],
"file_id",
"Hello ß☺ example",
);
// Open a local connection on port 25
let mut mailer = SmtpTransportBuilder::localhost().unwrap().security_level(SecurityLevel::Opportunistic).build();
// Send the email
let result = mailer.send(email);
if result.is_ok() {
println!("Email sent");
} else {
println!("Could not send email: {:?}", result);
}
assert!(result.is_ok());
}
|
0fc8c491ae313fea18dd71a0d843e95521ce48bd
|
public/javascripts/projectDetail.js
|
public/javascripts/projectDetail.js
|
var projectOwner = null;
var projectSlug = null;
var alreadyStarred = false;
$(function() {
// setup star button
var increment = alreadyStarred ? -1 : 1;
$('.btn-star').click(function() {
var starred = $(this).find('.starred');
starred.html(' ' + (parseInt(starred.text()) + increment).toString());
$.ajax('/' + projectOwner + '/' + projectSlug + '/star/' + (increment > 0));
var icon = $('#icon-star');
if (increment > 0) {
icon.removeClass('fa-star-o').addClass('fa-star');
} else {
icon.removeClass('fa-star').addClass('fa-star-o');
}
increment *= -1;
});
});
|
var projectOwner = null;
var projectSlug = null;
var alreadyStarred = false;
var KEY_TAB = 9;
$(function() {
// setup star button
var increment = alreadyStarred ? -1 : 1;
$('.btn-star').click(function() {
var starred = $(this).find('.starred');
starred.html(' ' + (parseInt(starred.text()) + increment).toString());
$.ajax('/' + projectOwner + '/' + projectSlug + '/star/' + (increment > 0));
var icon = $('#icon-star');
if (increment > 0) {
icon.removeClass('fa-star-o').addClass('fa-star');
} else {
icon.removeClass('fa-star').addClass('fa-star-o');
}
increment *= -1;
});
$('body').keydown(function(event) {
var target = $(event.target);
if (target.is('body')) {
switch (event.keyCode) {
case KEY_TAB:
event.preventDefault();
var navBar = $('.project-navbar');
var activeTab = navBar.find('li.active');
console.log(activeTab);
var nextTab = activeTab.next();
console.log(nextTab);
if (nextTab.is('li')) {
window.location = nextTab.find('a').attr('href');
} else {
window.location = navBar.find('li:first').find('a').attr('href');
}
break;
default:
break;
}
}
});
});
|
Add tab navigation to project page
|
Add tab navigation to project page
Signed-off-by: Walker Crouse <[email protected]>
|
JavaScript
|
mit
|
SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore
|
javascript
|
## Code Before:
var projectOwner = null;
var projectSlug = null;
var alreadyStarred = false;
$(function() {
// setup star button
var increment = alreadyStarred ? -1 : 1;
$('.btn-star').click(function() {
var starred = $(this).find('.starred');
starred.html(' ' + (parseInt(starred.text()) + increment).toString());
$.ajax('/' + projectOwner + '/' + projectSlug + '/star/' + (increment > 0));
var icon = $('#icon-star');
if (increment > 0) {
icon.removeClass('fa-star-o').addClass('fa-star');
} else {
icon.removeClass('fa-star').addClass('fa-star-o');
}
increment *= -1;
});
});
## Instruction:
Add tab navigation to project page
Signed-off-by: Walker Crouse <[email protected]>
## Code After:
var projectOwner = null;
var projectSlug = null;
var alreadyStarred = false;
var KEY_TAB = 9;
$(function() {
// setup star button
var increment = alreadyStarred ? -1 : 1;
$('.btn-star').click(function() {
var starred = $(this).find('.starred');
starred.html(' ' + (parseInt(starred.text()) + increment).toString());
$.ajax('/' + projectOwner + '/' + projectSlug + '/star/' + (increment > 0));
var icon = $('#icon-star');
if (increment > 0) {
icon.removeClass('fa-star-o').addClass('fa-star');
} else {
icon.removeClass('fa-star').addClass('fa-star-o');
}
increment *= -1;
});
$('body').keydown(function(event) {
var target = $(event.target);
if (target.is('body')) {
switch (event.keyCode) {
case KEY_TAB:
event.preventDefault();
var navBar = $('.project-navbar');
var activeTab = navBar.find('li.active');
console.log(activeTab);
var nextTab = activeTab.next();
console.log(nextTab);
if (nextTab.is('li')) {
window.location = nextTab.find('a').attr('href');
} else {
window.location = navBar.find('li:first').find('a').attr('href');
}
break;
default:
break;
}
}
});
});
|
bd01ff260d6a4eadd984340997ed80a01018873c
|
app/static/models/barcharts/timehistory.ts
|
app/static/models/barcharts/timehistory.ts
|
import {ExerciseHistory} from "./exercisehistory";
export class TimeHistory extends ExerciseHistory {
private distance: number;
private duration: number;
getHistoryId(): number {
return this.historyId;
}
getWidth(): number {
return this.distance;
}
setWidth(value: number): void {
this.distance = value;
}
getHeight(): number {
return this.duration;
}
setHeight(value: number): void {
this.duration = value;
}
getXOffset(): number {
return this.x_offset;
}
setXOffset(value: number): void {
this.x_offset = value;
}
getYOffset(): number {
return this.y_offset;
}
setYOffset(value: number): void {
this.y_offset = value;
}
getDatestamp(): string {
return this.dateStamp;
}
setDatestamp(value: string): void {
this.dateStamp = value;
}
getWidthBuffer(): number {
return 0;
}
getSets(): number {
return 1;
}
}
|
import {ExerciseHistory} from "./exercisehistory";
export class TimeHistory extends ExerciseHistory {
private distance: number;
private duration: number;
constructor(jsonObject: any) {
super(jsonObject);
this.distance = jsonObject.history_distance;
this.duration = jsonObject.history_duration;
}
getWidth(): number {
return this.distance;
}
setWidth(value: number): void {
this.distance = value;
}
getHeight(): number {
return this.duration;
}
setHeight(value: number): void {
this.duration = value;
}
getWidthBuffer(): number {
return 0;
}
getSets(): number {
return 1;
}
}
|
Add constructor to time history model
|
Add constructor to time history model
|
TypeScript
|
mit
|
pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise
|
typescript
|
## Code Before:
import {ExerciseHistory} from "./exercisehistory";
export class TimeHistory extends ExerciseHistory {
private distance: number;
private duration: number;
getHistoryId(): number {
return this.historyId;
}
getWidth(): number {
return this.distance;
}
setWidth(value: number): void {
this.distance = value;
}
getHeight(): number {
return this.duration;
}
setHeight(value: number): void {
this.duration = value;
}
getXOffset(): number {
return this.x_offset;
}
setXOffset(value: number): void {
this.x_offset = value;
}
getYOffset(): number {
return this.y_offset;
}
setYOffset(value: number): void {
this.y_offset = value;
}
getDatestamp(): string {
return this.dateStamp;
}
setDatestamp(value: string): void {
this.dateStamp = value;
}
getWidthBuffer(): number {
return 0;
}
getSets(): number {
return 1;
}
}
## Instruction:
Add constructor to time history model
## Code After:
import {ExerciseHistory} from "./exercisehistory";
export class TimeHistory extends ExerciseHistory {
private distance: number;
private duration: number;
constructor(jsonObject: any) {
super(jsonObject);
this.distance = jsonObject.history_distance;
this.duration = jsonObject.history_duration;
}
getWidth(): number {
return this.distance;
}
setWidth(value: number): void {
this.distance = value;
}
getHeight(): number {
return this.duration;
}
setHeight(value: number): void {
this.duration = value;
}
getWidthBuffer(): number {
return 0;
}
getSets(): number {
return 1;
}
}
|
550a702dc84a332c212926c59c513dce3fa9b72c
|
Controller/TagController.php
|
Controller/TagController.php
|
<?php
namespace Coosos\TagBundle\Controller;
use Coosos\TagBundle\Entity\Tag;
use Coosos\TagBundle\Repository\TagRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
/**
* Class TagController
* @package Coosos\TagBundle\Controller
* @Route("/tag")
*/
class TagController extends Controller
{
/**
* @Route("/tag-list", name="coosos_tag_tag_tagList")
* @Method("GET")
* @param Request $request
* @return Response
*/
public function tagListAction(Request $request)
{
$searchTag = ($request->query->has("tag")) ? $request->query->get("tag") : null;
$categoryTag = ($request->query->has("category")) ? $request->query->get("category") : null;
$em = $this->getDoctrine()->getManager();
/** @var TagRepository $repository */
$repository = $em->getRepository("CoososTagBundle:Tag");
$results = $repository->getTagList($searchTag, $categoryTag, 5);
$tags = [];
/** @var Tag $result */
foreach ($results as $result) {
$tags[] = $result->getName();
}
return new JsonResponse(json_encode($tags), 200);
}
}
|
<?php
namespace Coosos\TagBundle\Controller;
use Coosos\TagBundle\Entity\Tag;
use Coosos\TagBundle\Repository\TagRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
/**
* Class TagController
* @package Coosos\TagBundle\Controller
* @Route("/tag")
*/
class TagController extends Controller
{
/**
* @Route("/tag-list", name="coosos_tag_tag_tagList")
* @Method("GET")
* @param Request $request
* @return Response
*/
public function tagListAction(Request $request)
{
$searchTag = ($request->query->has("term")) ? $request->query->get("term") : null;
$categoryTag = ($request->query->has("category")) ? $request->query->get("category") : "default";
$em = $this->getDoctrine()->getManager();
/** @var TagRepository $repository */
$repository = $em->getRepository("CoososTagBundle:Tag");
$results = $repository->getTagList($searchTag, $categoryTag, 5);
$tags = [];
/** @var Tag $result */
foreach ($results as $result) {
$tags[] = $result->getName();
}
return new JsonResponse($tags, 200);
}
}
|
Return array, change param name
|
Return array, change param name
|
PHP
|
mit
|
Coosos/TagBundle,Coosos/TagBundle
|
php
|
## Code Before:
<?php
namespace Coosos\TagBundle\Controller;
use Coosos\TagBundle\Entity\Tag;
use Coosos\TagBundle\Repository\TagRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
/**
* Class TagController
* @package Coosos\TagBundle\Controller
* @Route("/tag")
*/
class TagController extends Controller
{
/**
* @Route("/tag-list", name="coosos_tag_tag_tagList")
* @Method("GET")
* @param Request $request
* @return Response
*/
public function tagListAction(Request $request)
{
$searchTag = ($request->query->has("tag")) ? $request->query->get("tag") : null;
$categoryTag = ($request->query->has("category")) ? $request->query->get("category") : null;
$em = $this->getDoctrine()->getManager();
/** @var TagRepository $repository */
$repository = $em->getRepository("CoososTagBundle:Tag");
$results = $repository->getTagList($searchTag, $categoryTag, 5);
$tags = [];
/** @var Tag $result */
foreach ($results as $result) {
$tags[] = $result->getName();
}
return new JsonResponse(json_encode($tags), 200);
}
}
## Instruction:
Return array, change param name
## Code After:
<?php
namespace Coosos\TagBundle\Controller;
use Coosos\TagBundle\Entity\Tag;
use Coosos\TagBundle\Repository\TagRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
/**
* Class TagController
* @package Coosos\TagBundle\Controller
* @Route("/tag")
*/
class TagController extends Controller
{
/**
* @Route("/tag-list", name="coosos_tag_tag_tagList")
* @Method("GET")
* @param Request $request
* @return Response
*/
public function tagListAction(Request $request)
{
$searchTag = ($request->query->has("term")) ? $request->query->get("term") : null;
$categoryTag = ($request->query->has("category")) ? $request->query->get("category") : "default";
$em = $this->getDoctrine()->getManager();
/** @var TagRepository $repository */
$repository = $em->getRepository("CoososTagBundle:Tag");
$results = $repository->getTagList($searchTag, $categoryTag, 5);
$tags = [];
/** @var Tag $result */
foreach ($results as $result) {
$tags[] = $result->getName();
}
return new JsonResponse($tags, 200);
}
}
|
675e3615255054550bfa98c342f5761428619fc5
|
CRYPTO.md
|
CRYPTO.md
|
groundstation uses RSA under the hood with (planned for now) experimental
support for ECDSA.
The rationale for this is that while other algorithms are more practical in
many ways, RSA keys are the most widespread amongst developers, and being able
to use your ssh keys as an identity will hopefully make significant strides
toward adoption. (See for example https://github.com/richo.keys)
We make sweeping assumptions about how we can verify data, namely that we can
ignore hashing algorithms and length extension attacks. Where it's reasonable
we assert that you not only have a 40 character SHA1 hash, but also one that
points to a valid object
|
groundstation uses RSA under the hood with (planned for now) experimental
support for ECDSA.
The rationale for this is that while other algorithms are more practical in
many ways, RSA keys are the most widespread amongst developers, and being able
to use your ssh keys as an identity will hopefully make significant strides
toward adoption. (See for example https://github.com/richo.keys)
We make sweeping assumptions about how we can verify data, namely that we can
ignore hashing algorithms and length extension attacks. Where it's reasonable
we assert that you not only have a 40 character SHA1 hash, but also one that
points to a valid object
## Sync Strategy
In the name of being reasonable, it should probably be possible to run a node
with two different sync stragegies, to match both your intent and some security
concerns:
#### Paranoid
In this mode, the sync procedure should be as follows:
1. LISTALLCHANNELS from peer
2. Inspect all tips, discard all signatures that aren't trusted
3. Fetch all missing objects in that set of tips
4. Fetch all their parents which are missing, etc.
This leaves you with a fairly git-ish lazy sync, but with some protection
against people feeding you terrabyte long objects.
#### Eager
Basically, sync as it currently stands.
|
Update crypto doc with potential sync strategies
|
Update crypto doc with potential sync strategies
|
Markdown
|
mit
|
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
|
markdown
|
## Code Before:
groundstation uses RSA under the hood with (planned for now) experimental
support for ECDSA.
The rationale for this is that while other algorithms are more practical in
many ways, RSA keys are the most widespread amongst developers, and being able
to use your ssh keys as an identity will hopefully make significant strides
toward adoption. (See for example https://github.com/richo.keys)
We make sweeping assumptions about how we can verify data, namely that we can
ignore hashing algorithms and length extension attacks. Where it's reasonable
we assert that you not only have a 40 character SHA1 hash, but also one that
points to a valid object
## Instruction:
Update crypto doc with potential sync strategies
## Code After:
groundstation uses RSA under the hood with (planned for now) experimental
support for ECDSA.
The rationale for this is that while other algorithms are more practical in
many ways, RSA keys are the most widespread amongst developers, and being able
to use your ssh keys as an identity will hopefully make significant strides
toward adoption. (See for example https://github.com/richo.keys)
We make sweeping assumptions about how we can verify data, namely that we can
ignore hashing algorithms and length extension attacks. Where it's reasonable
we assert that you not only have a 40 character SHA1 hash, but also one that
points to a valid object
## Sync Strategy
In the name of being reasonable, it should probably be possible to run a node
with two different sync stragegies, to match both your intent and some security
concerns:
#### Paranoid
In this mode, the sync procedure should be as follows:
1. LISTALLCHANNELS from peer
2. Inspect all tips, discard all signatures that aren't trusted
3. Fetch all missing objects in that set of tips
4. Fetch all their parents which are missing, etc.
This leaves you with a fairly git-ish lazy sync, but with some protection
against people feeding you terrabyte long objects.
#### Eager
Basically, sync as it currently stands.
|
1490bbb380114d7b8651f2d6356cf1bb917e3f62
|
docker-compose.yml
|
docker-compose.yml
|
version: "3.5"
networks:
proxy:
external: true
volumes:
app: {}
asset: {}
db: {}
services:
db:
image: akilli/postgres
restart: unless-stopped
volumes:
- source: asset
target: /app
type: volume
- source: db
target: /data
type: volume
app:
image: akilli/cms
depends_on:
- db
restart: unless-stopped
volumes:
- source: app
target: /app
type: volume
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
www:
image: akilli/nginx
depends_on:
- db
- app
restart: unless-stopped
labels:
traefik.enable: "true"
traefik.port: "80"
traefik.frontend.rule: "Host: cms.app.loc"
traefik.docker.network: "proxy"
networks:
default: {}
proxy:
aliases:
- cms
volumes:
- source: app
target: /app
type: volume
volume:
nocopy: true
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
|
version: "3.5"
networks:
proxy:
external: true
volumes:
app: {}
asset: {}
db: {}
tmp: {}
services:
db:
image: akilli/postgres
restart: unless-stopped
volumes:
- source: asset
target: /app
type: volume
- source: db
target: /data
type: volume
app:
image: akilli/cms
depends_on:
- db
restart: unless-stopped
volumes:
- source: app
target: /app
type: volume
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
- source: tmp
target: /tmp
type: volume
www:
image: akilli/nginx
depends_on:
- db
- app
restart: unless-stopped
labels:
traefik.enable: "true"
traefik.port: "80"
traefik.frontend.rule: "Host: cms.app.loc"
traefik.docker.network: "proxy"
networks:
default: {}
proxy:
aliases:
- cms
volumes:
- source: app
target: /app
type: volume
volume:
nocopy: true
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
|
Add tmp volume to share session amongst multiple app containers
|
Add tmp volume to share session amongst multiple app containers
|
YAML
|
mit
|
akilli/cms,akilli/cms,akilli/cms
|
yaml
|
## Code Before:
version: "3.5"
networks:
proxy:
external: true
volumes:
app: {}
asset: {}
db: {}
services:
db:
image: akilli/postgres
restart: unless-stopped
volumes:
- source: asset
target: /app
type: volume
- source: db
target: /data
type: volume
app:
image: akilli/cms
depends_on:
- db
restart: unless-stopped
volumes:
- source: app
target: /app
type: volume
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
www:
image: akilli/nginx
depends_on:
- db
- app
restart: unless-stopped
labels:
traefik.enable: "true"
traefik.port: "80"
traefik.frontend.rule: "Host: cms.app.loc"
traefik.docker.network: "proxy"
networks:
default: {}
proxy:
aliases:
- cms
volumes:
- source: app
target: /app
type: volume
volume:
nocopy: true
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
## Instruction:
Add tmp volume to share session amongst multiple app containers
## Code After:
version: "3.5"
networks:
proxy:
external: true
volumes:
app: {}
asset: {}
db: {}
tmp: {}
services:
db:
image: akilli/postgres
restart: unless-stopped
volumes:
- source: asset
target: /app
type: volume
- source: db
target: /data
type: volume
app:
image: akilli/cms
depends_on:
- db
restart: unless-stopped
volumes:
- source: app
target: /app
type: volume
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
- source: tmp
target: /tmp
type: volume
www:
image: akilli/nginx
depends_on:
- db
- app
restart: unless-stopped
labels:
traefik.enable: "true"
traefik.port: "80"
traefik.frontend.rule: "Host: cms.app.loc"
traefik.docker.network: "proxy"
networks:
default: {}
proxy:
aliases:
- cms
volumes:
- source: app
target: /app
type: volume
volume:
nocopy: true
- source: asset
target: /data/asset
type: volume
volume:
nocopy: true
|
0f28b5f70e1f8d3489321e72e0a5aaa3656f6bcd
|
.travis.yml
|
.travis.yml
|
language: ruby
rvm:
- 1.9.3
- 2.1
- 2.2
before_install:
- gem update bundler
script:
- bundle exec rake
branches:
except:
- release
notifications:
email: false
|
language: ruby
sudo: false
rvm:
- 1.9.3
- 2.1
- 2.2
script:
- bundle exec rake
branches:
except:
- release
notifications:
email: false
|
Move to Travis's container-based infrastructure
|
Move to Travis's container-based infrastructure
https://docs.travis-ci.com/user/workers/container-based-infrastructure/
Alternative to:
https://github.com/guidance-guarantee-programme/govspeak/commit/1135adab
9d1e4404b9a903ee1ffb35f7ebbeb21e
|
YAML
|
mit
|
alphagov/govspeak,alphagov/govspeak,met-office-lab/govspeak,met-office-lab/govspeak
|
yaml
|
## Code Before:
language: ruby
rvm:
- 1.9.3
- 2.1
- 2.2
before_install:
- gem update bundler
script:
- bundle exec rake
branches:
except:
- release
notifications:
email: false
## Instruction:
Move to Travis's container-based infrastructure
https://docs.travis-ci.com/user/workers/container-based-infrastructure/
Alternative to:
https://github.com/guidance-guarantee-programme/govspeak/commit/1135adab
9d1e4404b9a903ee1ffb35f7ebbeb21e
## Code After:
language: ruby
sudo: false
rvm:
- 1.9.3
- 2.1
- 2.2
script:
- bundle exec rake
branches:
except:
- release
notifications:
email: false
|
db9907c3b7875d921cca610c5b304cf440b4df8e
|
services/stock_info.rb
|
services/stock_info.rb
|
require 'date'
class StockInfo
attr_accessor :symbol
def initialize(symbol)
self.symbol = symbol
end
def last_prices
quotes.map { |quote| quote[:close].to_f }
end
def last_prices_days
quotes.map { |quote| quote[:date].strftime("%a") }
end
def to_hash
{ company: company,
last_price: last_price,
opening_price: opening_price,
point_change: point_change,
percent_change: percent_change,
quotes: quotes,
status: status,
symbol: symbol }
end
def company
@_company ||= MarketBeat.company symbol
end
def quotes
today = Date.today
start_of_week = today - 5
end_of_week = today - 1
@_quotes ||= MarketBeat.quotes(symbol, start_of_week, end_of_week)
end
def status
point_change.to_f < 0 ? 'loss' : 'gain'
end
def point_change
change_and_percent_change.first
end
def percent_change
change_and_percent_change.last
end
def last_price
@_last_trade_price ||= MarketBeat.last_trade_real_time symbol
end
def opening_price
@_opening_price ||= MarketBeat.opening_price symbol
end
private
def change_and_percent_change
@_change_and_percent_change ||= MarketBeat.change_and_percent_change symbol
end
end
|
require 'date'
class StockInfo
attr_accessor :symbol
def initialize(symbol)
self.symbol = symbol
end
def last_prices
quotes.map { |quote| quote[:close].to_f }
end
def last_prices_days
quotes.map { |quote| quote[:date].strftime("%a") }
end
def to_hash
{ company: company,
last_price: last_price,
opening_price: opening_price,
point_change: point_change,
percent_change: percent_change,
quotes: quotes,
status: status,
symbol: symbol }
end
def company
@_company ||= MarketBeat.company symbol
end
def quotes
today = Date.today
start_of_week = today - 5
@_quotes ||= MarketBeat.quotes(symbol, start_of_week, today)
end
def status
point_change.to_f < 0 ? 'loss' : 'gain'
end
def point_change
change_and_percent_change.first
end
def percent_change
change_and_percent_change.last
end
def last_price
@_last_trade_price ||= MarketBeat.last_trade_real_time symbol
end
def opening_price
@_opening_price ||= MarketBeat.opening_price symbol
end
private
def change_and_percent_change
@_change_and_percent_change ||= MarketBeat.change_and_percent_change symbol
end
end
|
Make sure to include today in chart history
|
Make sure to include today in chart history
|
Ruby
|
apache-2.0
|
kunalbhat/stocky,kunalbhat/stocky
|
ruby
|
## Code Before:
require 'date'
class StockInfo
attr_accessor :symbol
def initialize(symbol)
self.symbol = symbol
end
def last_prices
quotes.map { |quote| quote[:close].to_f }
end
def last_prices_days
quotes.map { |quote| quote[:date].strftime("%a") }
end
def to_hash
{ company: company,
last_price: last_price,
opening_price: opening_price,
point_change: point_change,
percent_change: percent_change,
quotes: quotes,
status: status,
symbol: symbol }
end
def company
@_company ||= MarketBeat.company symbol
end
def quotes
today = Date.today
start_of_week = today - 5
end_of_week = today - 1
@_quotes ||= MarketBeat.quotes(symbol, start_of_week, end_of_week)
end
def status
point_change.to_f < 0 ? 'loss' : 'gain'
end
def point_change
change_and_percent_change.first
end
def percent_change
change_and_percent_change.last
end
def last_price
@_last_trade_price ||= MarketBeat.last_trade_real_time symbol
end
def opening_price
@_opening_price ||= MarketBeat.opening_price symbol
end
private
def change_and_percent_change
@_change_and_percent_change ||= MarketBeat.change_and_percent_change symbol
end
end
## Instruction:
Make sure to include today in chart history
## Code After:
require 'date'
class StockInfo
attr_accessor :symbol
def initialize(symbol)
self.symbol = symbol
end
def last_prices
quotes.map { |quote| quote[:close].to_f }
end
def last_prices_days
quotes.map { |quote| quote[:date].strftime("%a") }
end
def to_hash
{ company: company,
last_price: last_price,
opening_price: opening_price,
point_change: point_change,
percent_change: percent_change,
quotes: quotes,
status: status,
symbol: symbol }
end
def company
@_company ||= MarketBeat.company symbol
end
def quotes
today = Date.today
start_of_week = today - 5
@_quotes ||= MarketBeat.quotes(symbol, start_of_week, today)
end
def status
point_change.to_f < 0 ? 'loss' : 'gain'
end
def point_change
change_and_percent_change.first
end
def percent_change
change_and_percent_change.last
end
def last_price
@_last_trade_price ||= MarketBeat.last_trade_real_time symbol
end
def opening_price
@_opening_price ||= MarketBeat.opening_price symbol
end
private
def change_and_percent_change
@_change_and_percent_change ||= MarketBeat.change_and_percent_change symbol
end
end
|
962fc49f734b04e717bf936745013ab0c19c4ee1
|
utils.py
|
utils.py
|
import cv2
import itertools
import numpy as np
def partition(pred, iterable):
"""
Partition the iterable into two disjoint entries based
on the predicate.
@return: Tuple (iterable1, iterable2)
"""
iter1, iter2 = itertools.tee(iterable)
return itertools.filterfalse(pred, iter1), filter(pred, iter2)
def decay(val, min_val, decay_rate):
return max(val * decay_rate, min_val)
def one_hot(i, n):
"""
One-hot encoder. Returns a numpy array of length n with i-th entry
set to 1, and all others set to 0."
@return: numpy.array
"""
assert i < n, "Invalid args to one_hot"
enc = np.zeros(n)
enc[i] = 1
return enc
def resize_image(image, width, height):
"""
Resize the image screen to the configured width and height and
convert it to grayscale.
"""
grayscale = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
return cv2.resize(grayscale, (width, height))
|
from six.moves import filterfalse
import cv2
import itertools
import numpy as np
def partition(pred, iterable):
"""
Partition the iterable into two disjoint entries based
on the predicate.
@return: Tuple (iterable1, iterable2)
"""
iter1, iter2 = itertools.tee(iterable)
return filterfalse(pred, iter1), filter(pred, iter2)
def decay(val, min_val, decay_rate):
return max(val * decay_rate, min_val)
def one_hot(i, n):
"""
One-hot encoder. Returns a numpy array of length n with i-th entry
set to 1, and all others set to 0."
@return: numpy.array
"""
assert i < n, "Invalid args to one_hot"
enc = np.zeros(n)
enc[i] = 1
return enc
def resize_image(image, width, height):
"""
Resize the image screen to the configured width and height and
convert it to grayscale.
"""
grayscale = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
return cv2.resize(grayscale, (width, height))
|
Fix python 2.7 compatibility issue
|
Fix python 2.7 compatibility issue
|
Python
|
mit
|
viswanathgs/dist-dqn,viswanathgs/dist-dqn
|
python
|
## Code Before:
import cv2
import itertools
import numpy as np
def partition(pred, iterable):
"""
Partition the iterable into two disjoint entries based
on the predicate.
@return: Tuple (iterable1, iterable2)
"""
iter1, iter2 = itertools.tee(iterable)
return itertools.filterfalse(pred, iter1), filter(pred, iter2)
def decay(val, min_val, decay_rate):
return max(val * decay_rate, min_val)
def one_hot(i, n):
"""
One-hot encoder. Returns a numpy array of length n with i-th entry
set to 1, and all others set to 0."
@return: numpy.array
"""
assert i < n, "Invalid args to one_hot"
enc = np.zeros(n)
enc[i] = 1
return enc
def resize_image(image, width, height):
"""
Resize the image screen to the configured width and height and
convert it to grayscale.
"""
grayscale = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
return cv2.resize(grayscale, (width, height))
## Instruction:
Fix python 2.7 compatibility issue
## Code After:
from six.moves import filterfalse
import cv2
import itertools
import numpy as np
def partition(pred, iterable):
"""
Partition the iterable into two disjoint entries based
on the predicate.
@return: Tuple (iterable1, iterable2)
"""
iter1, iter2 = itertools.tee(iterable)
return filterfalse(pred, iter1), filter(pred, iter2)
def decay(val, min_val, decay_rate):
return max(val * decay_rate, min_val)
def one_hot(i, n):
"""
One-hot encoder. Returns a numpy array of length n with i-th entry
set to 1, and all others set to 0."
@return: numpy.array
"""
assert i < n, "Invalid args to one_hot"
enc = np.zeros(n)
enc[i] = 1
return enc
def resize_image(image, width, height):
"""
Resize the image screen to the configured width and height and
convert it to grayscale.
"""
grayscale = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
return cv2.resize(grayscale, (width, height))
|
4fbf43d24d5c391de3d4b6abf964d361ad0f55e0
|
Realization/backend/core/core-api/src/main/java/eu/bcvsolutions/idm/core/api/rest/lookup/AbstractEntityLookup.java
|
Realization/backend/core/core-api/src/main/java/eu/bcvsolutions/idm/core/api/rest/lookup/AbstractEntityLookup.java
|
package eu.bcvsolutions.idm.core.api.rest.lookup;
import org.springframework.core.GenericTypeResolver;
import eu.bcvsolutions.idm.core.api.entity.BaseEntity;
/**
* Lookup support
*
* @author Radek Tomiška
*
* @param <E>
*/
public abstract class AbstractEntityLookup<E extends BaseEntity> implements EntityLookup<E> {
private final Class<?> domainType;
/**
* Creates a new {@link AbstractEntityLookup} instance discovering the supported type from the generics signature.
*/
public AbstractEntityLookup() {
this.domainType = GenericTypeResolver.resolveTypeArgument(getClass(), EntityLookup.class);
}
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/
@Override
public boolean supports(Class<?> delimiter) {
return domainType.isAssignableFrom(delimiter);
}
}
|
package eu.bcvsolutions.idm.core.api.rest.lookup;
import org.springframework.core.GenericTypeResolver;
import eu.bcvsolutions.idm.core.api.entity.BaseEntity;
import eu.bcvsolutions.idm.core.api.script.ScriptEnabled;
/**
* Lookup support
*
* @author Radek Tomiška
*
* @param <E>
*/
public abstract class AbstractEntityLookup<E extends BaseEntity> implements EntityLookup<E>, ScriptEnabled {
private final Class<?> domainType;
/**
* Creates a new {@link AbstractEntityLookup} instance discovering the supported type from the generics signature.
*/
public AbstractEntityLookup() {
this.domainType = GenericTypeResolver.resolveTypeArgument(getClass(), EntityLookup.class);
}
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/
@Override
public boolean supports(Class<?> delimiter) {
return domainType.isAssignableFrom(delimiter);
}
}
|
Add temporary scrip enabled for lookup services
|
Add temporary scrip enabled for lookup services
|
Java
|
mit
|
bcvsolutions/CzechIdMng,bcvsolutions/CzechIdMng,bcvsolutions/CzechIdMng,bcvsolutions/CzechIdMng
|
java
|
## Code Before:
package eu.bcvsolutions.idm.core.api.rest.lookup;
import org.springframework.core.GenericTypeResolver;
import eu.bcvsolutions.idm.core.api.entity.BaseEntity;
/**
* Lookup support
*
* @author Radek Tomiška
*
* @param <E>
*/
public abstract class AbstractEntityLookup<E extends BaseEntity> implements EntityLookup<E> {
private final Class<?> domainType;
/**
* Creates a new {@link AbstractEntityLookup} instance discovering the supported type from the generics signature.
*/
public AbstractEntityLookup() {
this.domainType = GenericTypeResolver.resolveTypeArgument(getClass(), EntityLookup.class);
}
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/
@Override
public boolean supports(Class<?> delimiter) {
return domainType.isAssignableFrom(delimiter);
}
}
## Instruction:
Add temporary scrip enabled for lookup services
## Code After:
package eu.bcvsolutions.idm.core.api.rest.lookup;
import org.springframework.core.GenericTypeResolver;
import eu.bcvsolutions.idm.core.api.entity.BaseEntity;
import eu.bcvsolutions.idm.core.api.script.ScriptEnabled;
/**
* Lookup support
*
* @author Radek Tomiška
*
* @param <E>
*/
public abstract class AbstractEntityLookup<E extends BaseEntity> implements EntityLookup<E>, ScriptEnabled {
private final Class<?> domainType;
/**
* Creates a new {@link AbstractEntityLookup} instance discovering the supported type from the generics signature.
*/
public AbstractEntityLookup() {
this.domainType = GenericTypeResolver.resolveTypeArgument(getClass(), EntityLookup.class);
}
/*
* (non-Javadoc)
* @see org.springframework.plugin.core.Plugin#supports(java.lang.Object)
*/
@Override
public boolean supports(Class<?> delimiter) {
return domainType.isAssignableFrom(delimiter);
}
}
|
d2c0444ade109ca25bb07fe0b0ad9c1efa1b9ba6
|
packages/ember-data/lib/system/application_ext.js
|
packages/ember-data/lib/system/application_ext.js
|
var set = Ember.set;
Ember.onLoad('application', function(app) {
app.registerInjection(function(app, stateManager, property) {
if (property === 'Store') {
set(stateManager, 'store', app[property].create());
}
});
});
|
var set = Ember.set;
Ember.onLoad('application', function(app) {
app.registerInjection({
name: "store",
before: "controllers",
injection: function(app, stateManager, property) {
if (property === 'Store') {
set(stateManager, 'store', app[property].create());
}
}
});
});
|
Update to new injection syntax
|
Update to new injection syntax
|
JavaScript
|
mit
|
jmurphyau/data,gniquil/data,heathharrelson/data,sebweaver/data,tarzan/data,rwjblue/data,nickiaconis/data,splattne/data,tarzan/data,thaume/data,andrejunges/data,Kuzirashi/data,swarmbox/data,sebweaver/data,simaob/data,greyhwndz/data,sebweaver/data,trisrael/em-data,faizaanshamsi/data,k-fish/data,kappiah/data,hibariya/data,knownasilya/data,trisrael/em-data,greyhwndz/data,EmberSherpa/data,duggiefresh/data,dustinfarris/data,eriktrom/data,danmcclain/data,wecc/data,splattne/data,flowjzh/data,nickiaconis/data,PrecisionNutrition/data,acburdine/data,simaob/data,sebweaver/data,Robdel12/data,topaxi/data,BBLN/data,arenoir/data,topaxi/data,Kuzirashi/data,splattne/data,offirgolan/data,Kuzirashi/data,vikram7/data,workmanw/data,H1D/data,offirgolan/data,basho/ember-data,rwjblue/data,usecanvas/data,in4mates/ember-data,hjdivad/data,martndemus/data,usecanvas/data,tonywok/data,davidpett/data,InboxHealth/data,fpauser/data,nickiaconis/data,duggiefresh/data,courajs/data,jmurphyau/data,tstirrat/ember-data,HeroicEric/data,yaymukund/data,sebastianseilund/data,knownasilya/data,yaymukund/data,k-fish/data,jgwhite/data,greyhwndz/data,workmanw/data,XrXr/data,courajs/data,intuitivepixel/data,XrXr/data,FinSync/ember-data,bcardarella/data,minasmart/data,danmcclain/data,seanpdoyle/data,nickiaconis/data,martndemus/data,whatthewhat/data,danmcclain/data,sandstrom/ember-data,tonywok/data,seanpdoyle/data,Turbo87/ember-data,knownasilya/data,jgwhite/data,BBLN/data,fsmanuel/data,H1D/data,Eric-Guo/data,mphasize/data,rtablada/data,hibariya/data,radiumsoftware/data,intuitivepixel/data,eriktrom/data,BBLN/data,wecc/data,hibariya/data,courajs/data,pdud/data,ryanpatrickcook/data,minasmart/data,rtablada/data,swarmbox/data,sandstrom/ember-data,FinSync/ember-data,thaume/data,webPapaya/data,FinSync/ember-data,BookingSync/data,zoeesilcock/data,tstirrat/ember-data,Robdel12/data,topaxi/data,kappiah/data,kimroen/data,acburdine/data,in4mates/ember-data,duggiefresh/data,dustinfarris/data,stefanpenner/data,yaymukund/data,EmberSherpa/data,rtablada/data,fpauser/data,davidpett/data,Addepar/ember-data,Robdel12/data,bf4/data,andrejunges/data,gabriel-letarte/data,whatthewhat/data,workmanw/data,offirgolan/data,intuitivepixel/data,gkaran/data,jmurphyau/data,Turbo87/ember-data,fsmanuel/data,ryanpatrickcook/data,Globegitter/ember-data-evolution,EmberSherpa/data,eriktrom/data,flowjzh/data,funtusov/data,duggiefresh/data,greyhwndz/data,usecanvas/data,gniquil/data,dustinfarris/data,hjdivad/data,yaymukund/data,tarzan/data,lostinpatterns/data,dustinfarris/data,Addepar/ember-data,Eric-Guo/data,bf4/data,davidpett/data,Kuzirashi/data,arenoir/data,stefanpenner/data,fpauser/data,webPapaya/data,Turbo87/ember-data,pdud/data,jgwhite/data,BookingSync/data,Addepar/ember-data,HeroicEric/data,minasmart/data,HeroicEric/data,kimroen/data,thaume/data,InboxHealth/data,jmurphyau/data,k-fish/data,vikram7/data,sammcgrail/data,heathharrelson/data,seanpdoyle/data,andrejunges/data,flowjzh/data,tonywok/data,gabriel-letarte/data,sebastianseilund/data,seanpdoyle/data,arenoir/data,FinSync/ember-data,XrXr/data,martndemus/data,acburdine/data,gabriel-letarte/data,Turbo87/ember-data,flowjzh/data,acburdine/data,teddyzeenny/data,fsmanuel/data,wecc/data,Globegitter/ember-data-evolution,thaume/data,lostinpatterns/data,PrecisionNutrition/data,teddyzeenny/data,funtusov/data,swarmbox/data,simaob/data,mphasize/data,jgwhite/data,gabriel-letarte/data,BookingSync/data,funtusov/data,minasmart/data,stefanpenner/data,in4mates/ember-data,PrecisionNutrition/data,gkaran/data,intuitivepixel/data,tarzan/data,sammcgrail/data,bf4/data,heathharrelson/data,sebastianseilund/data,tonywok/data,simaob/data,Robdel12/data,gkaran/data,vikram7/data,stefanpenner/data,swarmbox/data,BookingSync/data,faizaanshamsi/data,gniquil/data,tstirrat/ember-data,fsmanuel/data,HeroicEric/data,danmcclain/data,lostinpatterns/data,kappiah/data,heathharrelson/data,kimroen/data,zoeesilcock/data,Eric-Guo/data,mphasize/data,kappiah/data,pdud/data,mphasize/data,funtusov/data,bcardarella/data,trisrael/em-data,slindberg/data,PrecisionNutrition/data,courajs/data,faizaanshamsi/data,ryanpatrickcook/data,whatthewhat/data,webPapaya/data,Eric-Guo/data,gkaran/data,offirgolan/data,lostinpatterns/data,whatthewhat/data,davidpett/data,vikram7/data,sammcgrail/data,sebastianseilund/data,bcardarella/data,BBLN/data,arenoir/data,ryanpatrickcook/data,splattne/data,usecanvas/data,wecc/data,zoeesilcock/data,slindberg/data,workmanw/data,tstirrat/ember-data,pdud/data,zoeesilcock/data,hibariya/data,H1D/data,k-fish/data,gniquil/data,radiumsoftware/data,faizaanshamsi/data,eriktrom/data,rtablada/data,XrXr/data,andrejunges/data,topaxi/data,H1D/data,InboxHealth/data,sammcgrail/data,slindberg/data,fpauser/data,martndemus/data,EmberSherpa/data,webPapaya/data,InboxHealth/data,bcardarella/data,basho/ember-data,bf4/data
|
javascript
|
## Code Before:
var set = Ember.set;
Ember.onLoad('application', function(app) {
app.registerInjection(function(app, stateManager, property) {
if (property === 'Store') {
set(stateManager, 'store', app[property].create());
}
});
});
## Instruction:
Update to new injection syntax
## Code After:
var set = Ember.set;
Ember.onLoad('application', function(app) {
app.registerInjection({
name: "store",
before: "controllers",
injection: function(app, stateManager, property) {
if (property === 'Store') {
set(stateManager, 'store', app[property].create());
}
}
});
});
|
1583b3d71310e60f85064557db991de7617d47dd
|
app/src/main/java/com/koustuvsinha/benchmarker/utils/Constants.java
|
app/src/main/java/com/koustuvsinha/benchmarker/utils/Constants.java
|
package com.koustuvsinha.benchmarker.utils;
import com.koustuvsinha.benchmarker.models.DbFactoryModel;
import java.util.ArrayList;
/**
* Created by koustuv on 24/5/15.
*/
public class Constants {
public static ArrayList<DbFactoryModel> DB_LIST = new ArrayList<DbFactoryModel>() {{
add(new DbFactoryModel("Realm","v0.83.3","Realm",true));
add(new DbFactoryModel("ORM Lite Android","v4.48","ORM Lite",true));
add(new DbFactoryModel("Sugar ORM","v1.4","Satya Narayan",true));
add(new DbFactoryModel("Green DAO","v1.3","Green DAO",true));
add(new DbFactoryModel("Active Android","v3.0","Michael Pardo",true));
}};
}
|
package com.koustuvsinha.benchmarker.utils;
import com.koustuvsinha.benchmarker.models.DbFactoryModel;
import java.util.ArrayList;
/**
* Created by koustuv on 24/5/15.
*/
public class Constants {
public static ArrayList<DbFactoryModel> DB_LIST = new ArrayList<DbFactoryModel>() {{
add(new DbFactoryModel("Realm","v0.83.3","Realm",true));
add(new DbFactoryModel("ORM Lite Android","v4.48","ORM Lite",true));
add(new DbFactoryModel("Sugar ORM","v1.4","Satya Narayan",true));
add(new DbFactoryModel("Green DAO","v1.3","Green DAO",true));
add(new DbFactoryModel("Active Android","v3.0","Michael Pardo",true));
add(new DbFactoryModel("Android SQLite","v1.0","Android",true));
}};
public static int DB_TYPE_REALM = 1;
public static int DB_TYPE_ORMLITE = 2;
public static int DB_TYPE_SUGARORM = 3;
public static int DB_TYPE_GREENDAO = 4;
public static int DB_TYPE_ACTIVEANDROID = 5;
public static int DB_TYPE_DEFAULT = 6;
}
|
Update constants as per db list
|
Update constants as per db list
|
Java
|
mit
|
koustuvsinha/benchmarker
|
java
|
## Code Before:
package com.koustuvsinha.benchmarker.utils;
import com.koustuvsinha.benchmarker.models.DbFactoryModel;
import java.util.ArrayList;
/**
* Created by koustuv on 24/5/15.
*/
public class Constants {
public static ArrayList<DbFactoryModel> DB_LIST = new ArrayList<DbFactoryModel>() {{
add(new DbFactoryModel("Realm","v0.83.3","Realm",true));
add(new DbFactoryModel("ORM Lite Android","v4.48","ORM Lite",true));
add(new DbFactoryModel("Sugar ORM","v1.4","Satya Narayan",true));
add(new DbFactoryModel("Green DAO","v1.3","Green DAO",true));
add(new DbFactoryModel("Active Android","v3.0","Michael Pardo",true));
}};
}
## Instruction:
Update constants as per db list
## Code After:
package com.koustuvsinha.benchmarker.utils;
import com.koustuvsinha.benchmarker.models.DbFactoryModel;
import java.util.ArrayList;
/**
* Created by koustuv on 24/5/15.
*/
public class Constants {
public static ArrayList<DbFactoryModel> DB_LIST = new ArrayList<DbFactoryModel>() {{
add(new DbFactoryModel("Realm","v0.83.3","Realm",true));
add(new DbFactoryModel("ORM Lite Android","v4.48","ORM Lite",true));
add(new DbFactoryModel("Sugar ORM","v1.4","Satya Narayan",true));
add(new DbFactoryModel("Green DAO","v1.3","Green DAO",true));
add(new DbFactoryModel("Active Android","v3.0","Michael Pardo",true));
add(new DbFactoryModel("Android SQLite","v1.0","Android",true));
}};
public static int DB_TYPE_REALM = 1;
public static int DB_TYPE_ORMLITE = 2;
public static int DB_TYPE_SUGARORM = 3;
public static int DB_TYPE_GREENDAO = 4;
public static int DB_TYPE_ACTIVEANDROID = 5;
public static int DB_TYPE_DEFAULT = 6;
}
|
d140c7079dc729f33adc73eb247d4b533ebf39de
|
features/step_definitions/filesystem_steps.rb
|
features/step_definitions/filesystem_steps.rb
|
require 'fileutils'
require 'tempfile'
require 'tmpdir'
Given /^an empty home directory$/ do
@homedir = Dir.mktmpdir
end
And /^an empty config directory$/ do
@configdir = Dir.mktmpdir
end
Given /^a file named "(.*?)" in the home directory$/ do |file|
filepath = File.expand_path File.join(@homedir, file)
@file = FileUtils.touch filepath
end
And /^"(.*?)" in the home directory should be a "(.*?)"$/ do |file, filetype|
filepath = File.expand_path File.join(@homedir, file)
case filetype
when "symlink"
File.symlink?(filepath).should be_true
else
raise ArgumentError
end
end
Then /^"(.*?)" in the home directory should point to the file in the config directory$/ do |file|
filepath = File.expand_path File.join(@homedir, file)
end
After do
FileUtils.rmtree @homedir
FileUtils.rmtree @configdir
end
Then /^there should be "(.*?)" files? in the config directory$/ do |number|
count = number.to_i
files_in_config = Dir.entries(@configdir)
# Magic number alert! This includes ., .., and .git
files_in_config.size.should eq count + 3
end
|
require 'pathname'
require 'fileutils'
require 'tempfile'
require 'tmpdir'
Given /^an empty home directory$/ do
@homedir = Dir.mktmpdir
end
And /^an empty config directory$/ do
@configdir = Dir.mktmpdir
end
Given /^a file named "(.*?)" in the home directory$/ do |file|
filepath = File.expand_path File.join(@homedir, file)
@file = FileUtils.touch filepath
end
And /^"(.*?)" in the home directory should be a "(.*?)"$/ do |file, filetype|
filepath = File.expand_path File.join(@homedir, file)
case filetype
when 'symlink'
File.symlink?(filepath).should be_true
else
raise ArgumentError
end
end
Then /^"(.*?)" in the home directory should point to the file in the config directory$/ do |file|
destpath = File.expand_path File.join(@configdir, file)
orig_dir = Dir.pwd
Dir.chdir @configdir
symlink_destination = Pathname.new(file).realpath.to_s
Dir.chdir orig_dir
symlink_destination.should match Regexp.escape(destpath)
end
After do
FileUtils.rmtree @homedir
FileUtils.rmtree @configdir
end
Then /^there should be "(.*?)" files? in the config directory$/ do |number|
count = number.to_i
files_in_config = Dir.entries(@configdir)
# Magic number alert! This includes ., .., and .git
files_in_config.size.should eq count + 3
end
|
Make sure we properly create symlinks in feature
|
Make sure we properly create symlinks in feature
|
Ruby
|
mit
|
Trevoke/pipboy
|
ruby
|
## Code Before:
require 'fileutils'
require 'tempfile'
require 'tmpdir'
Given /^an empty home directory$/ do
@homedir = Dir.mktmpdir
end
And /^an empty config directory$/ do
@configdir = Dir.mktmpdir
end
Given /^a file named "(.*?)" in the home directory$/ do |file|
filepath = File.expand_path File.join(@homedir, file)
@file = FileUtils.touch filepath
end
And /^"(.*?)" in the home directory should be a "(.*?)"$/ do |file, filetype|
filepath = File.expand_path File.join(@homedir, file)
case filetype
when "symlink"
File.symlink?(filepath).should be_true
else
raise ArgumentError
end
end
Then /^"(.*?)" in the home directory should point to the file in the config directory$/ do |file|
filepath = File.expand_path File.join(@homedir, file)
end
After do
FileUtils.rmtree @homedir
FileUtils.rmtree @configdir
end
Then /^there should be "(.*?)" files? in the config directory$/ do |number|
count = number.to_i
files_in_config = Dir.entries(@configdir)
# Magic number alert! This includes ., .., and .git
files_in_config.size.should eq count + 3
end
## Instruction:
Make sure we properly create symlinks in feature
## Code After:
require 'pathname'
require 'fileutils'
require 'tempfile'
require 'tmpdir'
Given /^an empty home directory$/ do
@homedir = Dir.mktmpdir
end
And /^an empty config directory$/ do
@configdir = Dir.mktmpdir
end
Given /^a file named "(.*?)" in the home directory$/ do |file|
filepath = File.expand_path File.join(@homedir, file)
@file = FileUtils.touch filepath
end
And /^"(.*?)" in the home directory should be a "(.*?)"$/ do |file, filetype|
filepath = File.expand_path File.join(@homedir, file)
case filetype
when 'symlink'
File.symlink?(filepath).should be_true
else
raise ArgumentError
end
end
Then /^"(.*?)" in the home directory should point to the file in the config directory$/ do |file|
destpath = File.expand_path File.join(@configdir, file)
orig_dir = Dir.pwd
Dir.chdir @configdir
symlink_destination = Pathname.new(file).realpath.to_s
Dir.chdir orig_dir
symlink_destination.should match Regexp.escape(destpath)
end
After do
FileUtils.rmtree @homedir
FileUtils.rmtree @configdir
end
Then /^there should be "(.*?)" files? in the config directory$/ do |number|
count = number.to_i
files_in_config = Dir.entries(@configdir)
# Magic number alert! This includes ., .., and .git
files_in_config.size.should eq count + 3
end
|
fbb2611d73edd5290c1f6d8f0f53f3c6de2179c8
|
sample/src/main/res/values/strings.xml
|
sample/src/main/res/values/strings.xml
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ZXing Sample</string>
<string name="scan_barcode">Scan Barcode</string>
<string name="any_orientation">1D Any Orientation</string>
<string name="scan_from_fragment">Scan from fragment</string>
<string name="front_camera">Front Camera</string>
<string name="custom_activity">Continuous Scan</string>
<string name="toolbar_activity">Activity with Toolbar</string>
<string name="custom_scanner">Custom Scanner Activity</string>
<string name="scanner_with_margin">Scanner with Margin</string>
<string name="turn_on_flashlight">Turn on Flashlight</string>
<string name="turn_off_flashlight">Turn off Flashlight</string>
</resources>
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">TO Code</string>
<string name="scan_barcode">Scan Barcode</string>
<string name="any_orientation">1D Any Orientation</string>
<string name="scan_from_fragment">Scan from fragment</string>
<string name="front_camera">Front Camera</string>
<string name="custom_activity">Continuous Scan</string>
<string name="toolbar_activity">Activity with Toolbar</string>
<string name="custom_scanner">Custom Scanner Activity</string>
<string name="scanner_with_margin">Scanner with Margin</string>
<string name="turn_on_flashlight">Turn on Flashlight</string>
<string name="turn_off_flashlight">Turn off Flashlight</string>
</resources>
|
Update app name for 0.0.3 release
|
Update app name for 0.0.3 release
|
XML
|
apache-2.0
|
movedon2otherthings/zxing-android-embedded
|
xml
|
## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ZXing Sample</string>
<string name="scan_barcode">Scan Barcode</string>
<string name="any_orientation">1D Any Orientation</string>
<string name="scan_from_fragment">Scan from fragment</string>
<string name="front_camera">Front Camera</string>
<string name="custom_activity">Continuous Scan</string>
<string name="toolbar_activity">Activity with Toolbar</string>
<string name="custom_scanner">Custom Scanner Activity</string>
<string name="scanner_with_margin">Scanner with Margin</string>
<string name="turn_on_flashlight">Turn on Flashlight</string>
<string name="turn_off_flashlight">Turn off Flashlight</string>
</resources>
## Instruction:
Update app name for 0.0.3 release
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">TO Code</string>
<string name="scan_barcode">Scan Barcode</string>
<string name="any_orientation">1D Any Orientation</string>
<string name="scan_from_fragment">Scan from fragment</string>
<string name="front_camera">Front Camera</string>
<string name="custom_activity">Continuous Scan</string>
<string name="toolbar_activity">Activity with Toolbar</string>
<string name="custom_scanner">Custom Scanner Activity</string>
<string name="scanner_with_margin">Scanner with Margin</string>
<string name="turn_on_flashlight">Turn on Flashlight</string>
<string name="turn_off_flashlight">Turn off Flashlight</string>
</resources>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.