commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d9bde7237097015f228fc311cba423307ff1d9ee | README.md | README.md |
The common code used by all sqlectron clients.
## Installation
Install via npm:
```bash
$ npm install sqlectron-core
```
## Usage
```js
...
```
## Contributing
It is required to use [editorconfig](http://editorconfig.org/) and please write and run specs before pushing any changes:
```js
npm test
```
## License
Copyright (c) 2015 The SQLECTRON Team. This software is licensed under the [MIT License](http://raw.github.com/sqlectron/sqlectron-core/master/LICENSE).
|
The common code used by all sqlectron clients.
#### Current supported databases
* PostgreSQL
* MySQL
Do you wanna support for another SQL database? Is expected that in the pull request the new database is included in the [db.spec.js](https://github.com/sqlectron/sqlectron-core/blob/master/spec/db.spec.js).
## Installation
Install via npm:
```bash
$ npm install sqlectron-core
```
## Usage
```js
...
```
## Contributing
It is required to use [editorconfig](http://editorconfig.org/) and please write and run specs before pushing any changes:
```js
npm test
```
## License
Copyright (c) 2015 The SQLECTRON Team. This software is licensed under the [MIT License](http://raw.github.com/sqlectron/sqlectron-core/master/LICENSE).
| Add description about the current supported databases | Add description about the current supported databases | Markdown | mit | sqlectron/sqlectron-core,falcon-client/falcon-core,falcon-client/falcon-core | markdown | ## Code Before:
The common code used by all sqlectron clients.
## Installation
Install via npm:
```bash
$ npm install sqlectron-core
```
## Usage
```js
...
```
## Contributing
It is required to use [editorconfig](http://editorconfig.org/) and please write and run specs before pushing any changes:
```js
npm test
```
## License
Copyright (c) 2015 The SQLECTRON Team. This software is licensed under the [MIT License](http://raw.github.com/sqlectron/sqlectron-core/master/LICENSE).
## Instruction:
Add description about the current supported databases
## Code After:
The common code used by all sqlectron clients.
#### Current supported databases
* PostgreSQL
* MySQL
Do you wanna support for another SQL database? Is expected that in the pull request the new database is included in the [db.spec.js](https://github.com/sqlectron/sqlectron-core/blob/master/spec/db.spec.js).
## Installation
Install via npm:
```bash
$ npm install sqlectron-core
```
## Usage
```js
...
```
## Contributing
It is required to use [editorconfig](http://editorconfig.org/) and please write and run specs before pushing any changes:
```js
npm test
```
## License
Copyright (c) 2015 The SQLECTRON Team. This software is licensed under the [MIT License](http://raw.github.com/sqlectron/sqlectron-core/master/LICENSE).
|
The common code used by all sqlectron clients.
+
+
+ #### Current supported databases
+ * PostgreSQL
+ * MySQL
+
+ Do you wanna support for another SQL database? Is expected that in the pull request the new database is included in the [db.spec.js](https://github.com/sqlectron/sqlectron-core/blob/master/spec/db.spec.js).
## Installation
Install via npm:
```bash
$ npm install sqlectron-core
```
## Usage
```js
...
```
## Contributing
It is required to use [editorconfig](http://editorconfig.org/) and please write and run specs before pushing any changes:
```js
npm test
```
## License
Copyright (c) 2015 The SQLECTRON Team. This software is licensed under the [MIT License](http://raw.github.com/sqlectron/sqlectron-core/master/LICENSE). | 7 | 0.25 | 7 | 0 |
dbc6ded131c7c6e46f2fe54a51f4be531e860e0d | app/js/Grouping.jsx | app/js/Grouping.jsx | var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(function(o) {
return <dd key={o[0]} className={"legend legend_" + o[0]}>{o[1]}</dd>
})
return (
<dl className="sub-nav legend">
<dt>Legend: </dt>
{options}
</dl>
)
} else {
return <div className="legend" />
}
},
render: function() {
var legend = this.getLegend()
return (
<div className="group">
<h3>{this.props.options.displayName}</h3>
{legend}
<GroupingContainer type={this.props.type} data={this.state.data} children={[]} />
</div>
)
},
componentDidMount: function() {
var that = this
window.addEventListener("oscilloscope-data", function(e) {
if(e.detail.type == that.props.options.eventType) {
that.setState({data: e.detail.children})
}
})
}
})
module.exports = Grouping
| var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(function(o) {
return <dd key={o[0]} className={"legend legend_" + o[0]}>{o[1]}</dd>
})
return (
<dl className="sub-nav legend">
<dt>Legend: </dt>
{options}
</dl>
)
} else {
return <div className="legend" />
}
},
render: function() {
var legend = this.getLegend()
return (
<div className="group">
<h3>{this.props.options.displayName}</h3>
<hr />
{legend}
<GroupingContainer type={this.props.type} data={this.state.data} children={[]} />
</div>
)
},
componentDidMount: function() {
var that = this
window.addEventListener("oscilloscope-data", function(e) {
if(e.detail.type == that.props.options.eventType) {
that.setState({data: e.detail.children})
}
})
}
})
module.exports = Grouping
| Use a horizontal rule for all grouping headers. | Use a horizontal rule for all grouping headers.
| JSX | apache-2.0 | nuclearfurnace/oscilloscope,nuclearfurnace/oscilloscope,nuclearfurnace/oscilloscope | jsx | ## Code Before:
var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(function(o) {
return <dd key={o[0]} className={"legend legend_" + o[0]}>{o[1]}</dd>
})
return (
<dl className="sub-nav legend">
<dt>Legend: </dt>
{options}
</dl>
)
} else {
return <div className="legend" />
}
},
render: function() {
var legend = this.getLegend()
return (
<div className="group">
<h3>{this.props.options.displayName}</h3>
{legend}
<GroupingContainer type={this.props.type} data={this.state.data} children={[]} />
</div>
)
},
componentDidMount: function() {
var that = this
window.addEventListener("oscilloscope-data", function(e) {
if(e.detail.type == that.props.options.eventType) {
that.setState({data: e.detail.children})
}
})
}
})
module.exports = Grouping
## Instruction:
Use a horizontal rule for all grouping headers.
## Code After:
var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(function(o) {
return <dd key={o[0]} className={"legend legend_" + o[0]}>{o[1]}</dd>
})
return (
<dl className="sub-nav legend">
<dt>Legend: </dt>
{options}
</dl>
)
} else {
return <div className="legend" />
}
},
render: function() {
var legend = this.getLegend()
return (
<div className="group">
<h3>{this.props.options.displayName}</h3>
<hr />
{legend}
<GroupingContainer type={this.props.type} data={this.state.data} children={[]} />
</div>
)
},
componentDidMount: function() {
var that = this
window.addEventListener("oscilloscope-data", function(e) {
if(e.detail.type == that.props.options.eventType) {
that.setState({data: e.detail.children})
}
})
}
})
module.exports = Grouping
| var React = require('react')
var GroupingContainer = require('./GroupingContainer.jsx')
var Grouping = React.createClass({
getInitialState: function() {
return {data: []}
},
getLegend: function() {
if(this.props.options.legend) {
var options = this.props.options.legend.map(function(o) {
return <dd key={o[0]} className={"legend legend_" + o[0]}>{o[1]}</dd>
})
return (
<dl className="sub-nav legend">
<dt>Legend: </dt>
{options}
</dl>
)
} else {
return <div className="legend" />
}
},
render: function() {
var legend = this.getLegend()
return (
<div className="group">
<h3>{this.props.options.displayName}</h3>
+ <hr />
{legend}
<GroupingContainer type={this.props.type} data={this.state.data} children={[]} />
</div>
)
},
componentDidMount: function() {
var that = this
window.addEventListener("oscilloscope-data", function(e) {
if(e.detail.type == that.props.options.eventType) {
that.setState({data: e.detail.children})
}
})
}
})
module.exports = Grouping | 1 | 0.021277 | 1 | 0 |
09a14e2e81c81cb3bcc0485b4eb3afa5351a94c6 | tests/easyprint_tests.cpp | tests/easyprint_tests.cpp |
BOOST_AUTO_TEST_CASE( fieldListFromString_tests )
{
}
|
template <typename T, typename DELIMITER>
std::string easyprint_test(T&& container, DELIMITER d ){
std::stringstream ss;
print_line(ss, std::forward<T>(container), d);
return ss.str();
};
BOOST_AUTO_TEST_CASE( Print_Empty_container )
{
default_delimiter d;
BOOST_CHECK( easyprint_test(std::vector<int>({}), d) == "[]\n" );
std::cout << easyprint_test(std::vector<int>({}), d) << std::endl;
}
| Add first test, trigger Travis CI | Add first test, trigger Travis CI
| C++ | mit | hebaishi/easy-cpp-print | c++ | ## Code Before:
BOOST_AUTO_TEST_CASE( fieldListFromString_tests )
{
}
## Instruction:
Add first test, trigger Travis CI
## Code After:
template <typename T, typename DELIMITER>
std::string easyprint_test(T&& container, DELIMITER d ){
std::stringstream ss;
print_line(ss, std::forward<T>(container), d);
return ss.str();
};
BOOST_AUTO_TEST_CASE( Print_Empty_container )
{
default_delimiter d;
BOOST_CHECK( easyprint_test(std::vector<int>({}), d) == "[]\n" );
std::cout << easyprint_test(std::vector<int>({}), d) << std::endl;
}
|
+ template <typename T, typename DELIMITER>
+ std::string easyprint_test(T&& container, DELIMITER d ){
+ std::stringstream ss;
+ print_line(ss, std::forward<T>(container), d);
+ return ss.str();
+ };
- BOOST_AUTO_TEST_CASE( fieldListFromString_tests )
+ BOOST_AUTO_TEST_CASE( Print_Empty_container )
{
+ default_delimiter d;
+ BOOST_CHECK( easyprint_test(std::vector<int>({}), d) == "[]\n" );
+ std::cout << easyprint_test(std::vector<int>({}), d) << std::endl;
} | 11 | 1.833333 | 10 | 1 |
73535b843763d1f5002b8d955e851e1f50160164 | .travis.yml | .travis.yml | sudo: false
language: ruby
rvm:
- '2.3.8'
- '2.4.5'
- '2.5.3'
- '2.6.1'
before_install: gem install bundler -v 2.0.1
script: bundle exec rspec
addons:
code_climate:
repo_token: 06a44082b0f5a5114eec226952c45443a4ac8c86e59e098869b5c07e420505ab
| sudo: false
language: ruby
rvm:
- '2.3.8'
- '2.4.5'
- '2.5.3'
- '2.6.1'
before_install: gem install bundler -v 2.0.1
script:
- bundle exec rubocop
- bundle exec rspec
| Remove Code Climate repo token from Travis config | Remove Code Climate repo token from Travis config
| YAML | mit | tlux/vnstat-ruby | yaml | ## Code Before:
sudo: false
language: ruby
rvm:
- '2.3.8'
- '2.4.5'
- '2.5.3'
- '2.6.1'
before_install: gem install bundler -v 2.0.1
script: bundle exec rspec
addons:
code_climate:
repo_token: 06a44082b0f5a5114eec226952c45443a4ac8c86e59e098869b5c07e420505ab
## Instruction:
Remove Code Climate repo token from Travis config
## Code After:
sudo: false
language: ruby
rvm:
- '2.3.8'
- '2.4.5'
- '2.5.3'
- '2.6.1'
before_install: gem install bundler -v 2.0.1
script:
- bundle exec rubocop
- bundle exec rspec
| sudo: false
language: ruby
rvm:
- '2.3.8'
- '2.4.5'
- '2.5.3'
- '2.6.1'
before_install: gem install bundler -v 2.0.1
+ script:
+ - bundle exec rubocop
- script: bundle exec rspec
? ^^^^^^^
+ - bundle exec rspec
? ^^^
- addons:
- code_climate:
- repo_token: 06a44082b0f5a5114eec226952c45443a4ac8c86e59e098869b5c07e420505ab | 7 | 0.583333 | 3 | 4 |
46a5a85e72382d804b9e0e9fd48f331270e27e77 | sql/pgq_coop/sql/pgq_coop_init_ext.sql | sql/pgq_coop/sql/pgq_coop_init_ext.sql |
create extension pgq;
\set ECHO none
\i structure/install.sql
\set ECHO all
create extension pgq_coop from 'unpackaged';
drop extension pgq_coop;
-- workaround for postgres bug
drop schema if exists pgq_coop;
create extension pgq_coop;
|
create extension pgq;
\set ECHO none
\i structure/install.sql
\set ECHO all
create extension pgq_coop from 'unpackaged';
drop extension pgq_coop;
create extension pgq_coop;
| Remove 'workaround' as it was pgq_coop own bug | Remove 'workaround' as it was pgq_coop own bug
| SQL | isc | overdrive3000/skytools,overdrive3000/skytools,markokr/skytools,tarvip/skytools,tarvip/skytools,tarvip/skytools,overdrive3000/skytools,markokr/skytools,markokr/skytools | sql | ## Code Before:
create extension pgq;
\set ECHO none
\i structure/install.sql
\set ECHO all
create extension pgq_coop from 'unpackaged';
drop extension pgq_coop;
-- workaround for postgres bug
drop schema if exists pgq_coop;
create extension pgq_coop;
## Instruction:
Remove 'workaround' as it was pgq_coop own bug
## Code After:
create extension pgq;
\set ECHO none
\i structure/install.sql
\set ECHO all
create extension pgq_coop from 'unpackaged';
drop extension pgq_coop;
create extension pgq_coop;
|
create extension pgq;
\set ECHO none
\i structure/install.sql
\set ECHO all
create extension pgq_coop from 'unpackaged';
drop extension pgq_coop;
- -- workaround for postgres bug
- drop schema if exists pgq_coop;
-
create extension pgq_coop;
| 3 | 0.2 | 0 | 3 |
5006c9f9535b42115cfa79e23b2e5b136fe3a7bb | app/views/latest/whp-result.html | app/views/latest/whp-result.html | {% extends "layout.html" %}
{% block content %}
<main id="content" role="main">
{% include "includes/main_nav.html" %}
<div class="main-content">
<h1 class="heading-large">WHP selection - Mr J Smith - Result</h1>
<div class="grid-row">
{% set currentClaimantPage = 'selectionTool' %}
{% include "includes/summary_nav.html" %}
</div>
<div class="grid-row">
<div class="column-full">
<p>From the answers you have supplied the claimant has been put into the <span class="bold">Private control group</span>.</p>
<a class="button" href="/latest/job_record_confirm">Continue</a>
</div>
</div>
</div>
</main>
{% endblock %} | {% extends "layout.html" %}
{% block content %}
<main id="content" role="main">
{% include "includes/main_nav.html" %}
<div class="main-content">
<h1 class="heading-large">WHP selection - Mr J Smith - Result</h1>
<div class="grid-row">
{% set currentClaimantPage = 'selectionTool' %}
{% include "includes/summary_nav.html" %}
</div>
<div class="grid-row">
<div class="column-full">
<p>From the answers you have supplied the claimant has been put into the <span class="bold">Work and health programme</span>.</p>
<a class="button" href="/latest/job_record_confirm">Continue</a>
</div>
</div>
</div>
</main>
{% endblock %} | Update the content on the result page | Update the content on the result page
| HTML | mit | dwpdigitaltech/ejs-prototype,dwpdigitaltech/ejs-prototype,dwpdigitaltech/ejs-prototype | html | ## Code Before:
{% extends "layout.html" %}
{% block content %}
<main id="content" role="main">
{% include "includes/main_nav.html" %}
<div class="main-content">
<h1 class="heading-large">WHP selection - Mr J Smith - Result</h1>
<div class="grid-row">
{% set currentClaimantPage = 'selectionTool' %}
{% include "includes/summary_nav.html" %}
</div>
<div class="grid-row">
<div class="column-full">
<p>From the answers you have supplied the claimant has been put into the <span class="bold">Private control group</span>.</p>
<a class="button" href="/latest/job_record_confirm">Continue</a>
</div>
</div>
</div>
</main>
{% endblock %}
## Instruction:
Update the content on the result page
## Code After:
{% extends "layout.html" %}
{% block content %}
<main id="content" role="main">
{% include "includes/main_nav.html" %}
<div class="main-content">
<h1 class="heading-large">WHP selection - Mr J Smith - Result</h1>
<div class="grid-row">
{% set currentClaimantPage = 'selectionTool' %}
{% include "includes/summary_nav.html" %}
</div>
<div class="grid-row">
<div class="column-full">
<p>From the answers you have supplied the claimant has been put into the <span class="bold">Work and health programme</span>.</p>
<a class="button" href="/latest/job_record_confirm">Continue</a>
</div>
</div>
</div>
</main>
{% endblock %} | {% extends "layout.html" %}
{% block content %}
<main id="content" role="main">
{% include "includes/main_nav.html" %}
<div class="main-content">
<h1 class="heading-large">WHP selection - Mr J Smith - Result</h1>
<div class="grid-row">
{% set currentClaimantPage = 'selectionTool' %}
{% include "includes/summary_nav.html" %}
</div>
<div class="grid-row">
<div class="column-full">
- <p>From the answers you have supplied the claimant has been put into the <span class="bold">Private control group</span>.</p>
? ^ ^^ ^ ^^^^ -- ^^^
+ <p>From the answers you have supplied the claimant has been put into the <span class="bold">Work and health programme</span>.</p>
? ^^ ^^ +++++++ ^ ^ ^^^^
<a class="button" href="/latest/job_record_confirm">Continue</a>
</div>
</div>
</div>
</main>
{% endblock %} | 2 | 0.083333 | 1 | 1 |
481f4444e063d5559d396a5a26154b9ebde27248 | formspree/app.py | formspree/app.py | import json
import stripe
import flask
from flask import g
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager, current_user
from flask_redis import Redis
import settings
DB = SQLAlchemy()
redis_store = Redis()
stripe.api_key = settings.STRIPE_SECRET_KEY
import routes
from users.models import User
def configure_login(app):
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'register'
@login_manager.user_loader
def load_user(id):
return User.query.get(int(id))
@app.before_request
def before_request():
g.user = current_user
def create_app():
app = flask.Flask(__name__)
app.config.from_object(settings)
DB.init_app(app)
redis_store.init_app(app)
routes.configure_routes(app)
configure_login(app)
app.jinja_env.filters['json'] = json.dumps
return app
| import json
import stripe
import os
import flask
from flask import g
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager, current_user
from flask.ext.cdn import CDN
from formspree import log
from flask_redis import Redis
import settings
DB = SQLAlchemy()
redis_store = Redis()
stripe.api_key = settings.STRIPE_SECRET_KEY
cdn = CDN()
import routes
from users.models import User
def configure_login(app):
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'register'
@login_manager.user_loader
def load_user(id):
return User.query.get(int(id))
@app.before_request
def before_request():
g.user = current_user
def create_app():
app = flask.Flask(__name__)
app.config.from_object(settings)
DB.init_app(app)
redis_store.init_app(app)
routes.configure_routes(app)
configure_login(app)
app.jinja_env.filters['json'] = json.dumps
app.config['CDN_DOMAIN'] = os.getenv('CDN_URL')
app.config['CDN_HTTPS'] = True
cdn.init_app(app)
return app
| Allow for static contents served over CDN | Allow for static contents served over CDN
| Python | agpl-3.0 | asm-products/formspree,asm-products/formspree,asm-products/formspree,asm-products/formspree | python | ## Code Before:
import json
import stripe
import flask
from flask import g
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager, current_user
from flask_redis import Redis
import settings
DB = SQLAlchemy()
redis_store = Redis()
stripe.api_key = settings.STRIPE_SECRET_KEY
import routes
from users.models import User
def configure_login(app):
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'register'
@login_manager.user_loader
def load_user(id):
return User.query.get(int(id))
@app.before_request
def before_request():
g.user = current_user
def create_app():
app = flask.Flask(__name__)
app.config.from_object(settings)
DB.init_app(app)
redis_store.init_app(app)
routes.configure_routes(app)
configure_login(app)
app.jinja_env.filters['json'] = json.dumps
return app
## Instruction:
Allow for static contents served over CDN
## Code After:
import json
import stripe
import os
import flask
from flask import g
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager, current_user
from flask.ext.cdn import CDN
from formspree import log
from flask_redis import Redis
import settings
DB = SQLAlchemy()
redis_store = Redis()
stripe.api_key = settings.STRIPE_SECRET_KEY
cdn = CDN()
import routes
from users.models import User
def configure_login(app):
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'register'
@login_manager.user_loader
def load_user(id):
return User.query.get(int(id))
@app.before_request
def before_request():
g.user = current_user
def create_app():
app = flask.Flask(__name__)
app.config.from_object(settings)
DB.init_app(app)
redis_store.init_app(app)
routes.configure_routes(app)
configure_login(app)
app.jinja_env.filters['json'] = json.dumps
app.config['CDN_DOMAIN'] = os.getenv('CDN_URL')
app.config['CDN_HTTPS'] = True
cdn.init_app(app)
return app
| import json
import stripe
+ import os
import flask
from flask import g
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager, current_user
+ from flask.ext.cdn import CDN
+ from formspree import log
from flask_redis import Redis
import settings
DB = SQLAlchemy()
redis_store = Redis()
stripe.api_key = settings.STRIPE_SECRET_KEY
+ cdn = CDN()
import routes
from users.models import User
def configure_login(app):
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.login_view = 'register'
@login_manager.user_loader
def load_user(id):
return User.query.get(int(id))
@app.before_request
def before_request():
g.user = current_user
def create_app():
app = flask.Flask(__name__)
app.config.from_object(settings)
DB.init_app(app)
redis_store.init_app(app)
routes.configure_routes(app)
configure_login(app)
app.jinja_env.filters['json'] = json.dumps
-
+ app.config['CDN_DOMAIN'] = os.getenv('CDN_URL')
+ app.config['CDN_HTTPS'] = True
+ cdn.init_app(app)
return app | 8 | 0.186047 | 7 | 1 |
2fa7e0a98ce8240c7266334512001fb411c1a14d | post.hbs | post.hbs | {{!< default}}
{{#post}}
<article class="{{post_class}}">
<header>
<a id="back-button" class="btn small square" href="javascript:history.back()">« Back</a>
<div class="post meta">
<time datetime="{{date format="DD MMM YYYY"}}">{{date format="DD MMM YYYY"}}</time>
<span class="post tags">{{tags prefix="in " separator=" "}}</span>
{{!-- <span class="post author">
<img src="{{author.image}}" alt="profile image for {{author.name}}"/> by {{author.name}}
</span> --}}
<span class="post reading-time"> – <span></span> read.</span>
</div>
<a id="share_twitter" alt="Tweet '{{title}}'" target="_blank">
{{#if image}}<img id="post-image" src={{image}} alt="{{{title}}}">{{/if}}
<h1 class="icon-reverse icon-social-twitter-post" id="post-title">{{{title}}}.</h1>
</a>
</header>
<section class="{{post_class}}">
{{content}}
</section>
</article>
{{> comments}}
{{/post}}
| {{!< default}}
{{#post}}
<article class="{{post_class}}">
<header>
<a id="back-button" class="btn small square" href="javascript:history.back()">« Back</a>
<div class="post meta">
<time datetime="{{date format="DD MMM YYYY"}}">{{date format="DD MMM YYYY"}}</time>
<span class="post tags">{{tags prefix="in " separator=" "}}</span>
<span class="post reading-time"> – <span></span> read.</span>
</div>
<a id="share_twitter" alt="Tweet '{{title}}'" target="_blank">
{{#if image}}<img id="post-image" src={{image}} alt="{{{title}}}">{{/if}}
<h1 class="icon-reverse icon-social-twitter-post" id="post-title">{{{title}}}.</h1>
</a>
</header>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Header -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7445638370146721"
data-ad-slot="7987647695"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<section class="{{post_class}}">
{{content}}
</section>
</article>
{{> comments}}
{{/post}}
| Add another add between header and content | Add another add between header and content
| Handlebars | mit | kutyel/uno-zen,kutyel/uno-zen | handlebars | ## Code Before:
{{!< default}}
{{#post}}
<article class="{{post_class}}">
<header>
<a id="back-button" class="btn small square" href="javascript:history.back()">« Back</a>
<div class="post meta">
<time datetime="{{date format="DD MMM YYYY"}}">{{date format="DD MMM YYYY"}}</time>
<span class="post tags">{{tags prefix="in " separator=" "}}</span>
{{!-- <span class="post author">
<img src="{{author.image}}" alt="profile image for {{author.name}}"/> by {{author.name}}
</span> --}}
<span class="post reading-time"> – <span></span> read.</span>
</div>
<a id="share_twitter" alt="Tweet '{{title}}'" target="_blank">
{{#if image}}<img id="post-image" src={{image}} alt="{{{title}}}">{{/if}}
<h1 class="icon-reverse icon-social-twitter-post" id="post-title">{{{title}}}.</h1>
</a>
</header>
<section class="{{post_class}}">
{{content}}
</section>
</article>
{{> comments}}
{{/post}}
## Instruction:
Add another add between header and content
## Code After:
{{!< default}}
{{#post}}
<article class="{{post_class}}">
<header>
<a id="back-button" class="btn small square" href="javascript:history.back()">« Back</a>
<div class="post meta">
<time datetime="{{date format="DD MMM YYYY"}}">{{date format="DD MMM YYYY"}}</time>
<span class="post tags">{{tags prefix="in " separator=" "}}</span>
<span class="post reading-time"> – <span></span> read.</span>
</div>
<a id="share_twitter" alt="Tweet '{{title}}'" target="_blank">
{{#if image}}<img id="post-image" src={{image}} alt="{{{title}}}">{{/if}}
<h1 class="icon-reverse icon-social-twitter-post" id="post-title">{{{title}}}.</h1>
</a>
</header>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Header -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7445638370146721"
data-ad-slot="7987647695"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<section class="{{post_class}}">
{{content}}
</section>
</article>
{{> comments}}
{{/post}}
| {{!< default}}
{{#post}}
<article class="{{post_class}}">
<header>
<a id="back-button" class="btn small square" href="javascript:history.back()">« Back</a>
<div class="post meta">
<time datetime="{{date format="DD MMM YYYY"}}">{{date format="DD MMM YYYY"}}</time>
<span class="post tags">{{tags prefix="in " separator=" "}}</span>
- {{!-- <span class="post author">
- <img src="{{author.image}}" alt="profile image for {{author.name}}"/> by {{author.name}}
- </span> --}}
<span class="post reading-time"> – <span></span> read.</span>
</div>
<a id="share_twitter" alt="Tweet '{{title}}'" target="_blank">
{{#if image}}<img id="post-image" src={{image}} alt="{{{title}}}">{{/if}}
<h1 class="icon-reverse icon-social-twitter-post" id="post-title">{{{title}}}.</h1>
</a>
</header>
+
+ <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+ <!-- Header -->
+ <ins class="adsbygoogle"
+ style="display:inline-block;width:728px;height:90px"
+ data-ad-client="ca-pub-7445638370146721"
+ data-ad-slot="7987647695"></ins>
+ <script>
+ (adsbygoogle = window.adsbygoogle || []).push({});
+ </script>
<section class="{{post_class}}">
{{content}}
</section>
</article>
{{> comments}}
{{/post}} | 13 | 0.419355 | 10 | 3 |
1b1b4c18dedb6b9eef1396ffe43e9b37e3cb4db4 | .travis.yml | .travis.yml | language: node_js
node_js:
- "4.4.6"
- "5"
- "6"
sudo: false
script: "npm test"
after_success:
- npm run coveralls
addons:
code_climate:
repo_token: 98bfd4f81ea2ddbdfd3aa5cbe4dacb2ab09c70d86009fa3a5c04eccb77c1b1eb
| language: node_js
node_js:
- "4.4.6"
- "5"
- "6"
sudo: false
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
- export PATH="$HOME/.yarn/bin:$PATH"
cache:
yarn: true
script: "yarn test"
after_success:
- npm run coveralls
addons:
code_climate:
repo_token: 98bfd4f81ea2ddbdfd3aa5cbe4dacb2ab09c70d86009fa3a5c04eccb77c1b1eb
| Update Travis to use Yarn | Update Travis to use Yarn
| YAML | mit | perflint/perflint | yaml | ## Code Before:
language: node_js
node_js:
- "4.4.6"
- "5"
- "6"
sudo: false
script: "npm test"
after_success:
- npm run coveralls
addons:
code_climate:
repo_token: 98bfd4f81ea2ddbdfd3aa5cbe4dacb2ab09c70d86009fa3a5c04eccb77c1b1eb
## Instruction:
Update Travis to use Yarn
## Code After:
language: node_js
node_js:
- "4.4.6"
- "5"
- "6"
sudo: false
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
- export PATH="$HOME/.yarn/bin:$PATH"
cache:
yarn: true
script: "yarn test"
after_success:
- npm run coveralls
addons:
code_climate:
repo_token: 98bfd4f81ea2ddbdfd3aa5cbe4dacb2ab09c70d86009fa3a5c04eccb77c1b1eb
| language: node_js
node_js:
- "4.4.6"
- "5"
- "6"
sudo: false
+ before_install:
+ - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
+ - export PATH="$HOME/.yarn/bin:$PATH"
+ cache:
+ yarn: true
- script: "npm test"
? --
+ script: "yarn test"
? +++
after_success:
- npm run coveralls
addons:
code_climate:
repo_token: 98bfd4f81ea2ddbdfd3aa5cbe4dacb2ab09c70d86009fa3a5c04eccb77c1b1eb | 7 | 0.583333 | 6 | 1 |
5ef156a476e43e9b0395ac2abc49928c3d05c9b8 | spec/routing/socializer/people_routing_spec.rb | spec/routing/socializer/people_routing_spec.rb | require 'rails_helper'
module Socializer
RSpec.describe PeopleController, type: :routing do
routes { Socializer::Engine.routes }
describe 'routing' do
it 'routes to #index' do
expect(:get => '/people').to route_to('socializer/people#index')
end
it 'does not route to #new' do
# expect(get: '/people/new').to_not be_routable
expect(get: '/people/new').to_not route_to('socializer/people#new')
end
it 'routes to #show' do
expect(:get => '/people/1').to route_to('socializer/people#show', :id => '1')
end
it 'routes to #edit' do
expect(:get => '/people/1/edit').to route_to('socializer/people#edit', :id => '1')
end
it 'does not route to #create' do
expect(post: '/people').to_not be_routable
end
it 'routes to #update' do
expect(:put => '/people/1').to route_to('socializer/people#update', :id => '1')
end
it 'does not route to #destroy' do
expect(delete: '/people/1').to_not be_routable
end
end
end
end
| require 'rails_helper'
module Socializer
RSpec.describe PeopleController, type: :routing do
routes { Socializer::Engine.routes }
describe 'routing' do
it 'routes to #index' do
expect(get: '/people').to route_to('socializer/people#index')
end
it 'does not route to #new' do
# expect(get: '/people/new').to_not be_routable
expect(get: '/people/new').to_not route_to('socializer/people#new')
end
it 'routes to #show' do
expect(get: '/people/1').to route_to('socializer/people#show', id: '1')
end
it 'routes to #edit' do
expect(get: '/people/1/edit').to route_to('socializer/people#edit', id: '1')
end
it 'does not route to #create' do
expect(post: '/people').to_not be_routable
end
it 'routes to #update' do
expect(put: '/people/1').to route_to('socializer/people#update', id: '1')
end
it 'does not route to #destroy' do
expect(delete: '/people/1').to_not be_routable
end
end
end
end
| Use the new Ruby 1.9 hash syntax. | Use the new Ruby 1.9 hash syntax.
| Ruby | mit | socializer/socializer,socializer/socializer,socializer/socializer | ruby | ## Code Before:
require 'rails_helper'
module Socializer
RSpec.describe PeopleController, type: :routing do
routes { Socializer::Engine.routes }
describe 'routing' do
it 'routes to #index' do
expect(:get => '/people').to route_to('socializer/people#index')
end
it 'does not route to #new' do
# expect(get: '/people/new').to_not be_routable
expect(get: '/people/new').to_not route_to('socializer/people#new')
end
it 'routes to #show' do
expect(:get => '/people/1').to route_to('socializer/people#show', :id => '1')
end
it 'routes to #edit' do
expect(:get => '/people/1/edit').to route_to('socializer/people#edit', :id => '1')
end
it 'does not route to #create' do
expect(post: '/people').to_not be_routable
end
it 'routes to #update' do
expect(:put => '/people/1').to route_to('socializer/people#update', :id => '1')
end
it 'does not route to #destroy' do
expect(delete: '/people/1').to_not be_routable
end
end
end
end
## Instruction:
Use the new Ruby 1.9 hash syntax.
## Code After:
require 'rails_helper'
module Socializer
RSpec.describe PeopleController, type: :routing do
routes { Socializer::Engine.routes }
describe 'routing' do
it 'routes to #index' do
expect(get: '/people').to route_to('socializer/people#index')
end
it 'does not route to #new' do
# expect(get: '/people/new').to_not be_routable
expect(get: '/people/new').to_not route_to('socializer/people#new')
end
it 'routes to #show' do
expect(get: '/people/1').to route_to('socializer/people#show', id: '1')
end
it 'routes to #edit' do
expect(get: '/people/1/edit').to route_to('socializer/people#edit', id: '1')
end
it 'does not route to #create' do
expect(post: '/people').to_not be_routable
end
it 'routes to #update' do
expect(put: '/people/1').to route_to('socializer/people#update', id: '1')
end
it 'does not route to #destroy' do
expect(delete: '/people/1').to_not be_routable
end
end
end
end
| require 'rails_helper'
module Socializer
RSpec.describe PeopleController, type: :routing do
routes { Socializer::Engine.routes }
describe 'routing' do
it 'routes to #index' do
- expect(:get => '/people').to route_to('socializer/people#index')
? - ^^^
+ expect(get: '/people').to route_to('socializer/people#index')
? ^
end
it 'does not route to #new' do
# expect(get: '/people/new').to_not be_routable
expect(get: '/people/new').to_not route_to('socializer/people#new')
end
it 'routes to #show' do
- expect(:get => '/people/1').to route_to('socializer/people#show', :id => '1')
? - ^^^ - ^^^
+ expect(get: '/people/1').to route_to('socializer/people#show', id: '1')
? ^ ^
end
it 'routes to #edit' do
- expect(:get => '/people/1/edit').to route_to('socializer/people#edit', :id => '1')
? - ^^^ - ^^^
+ expect(get: '/people/1/edit').to route_to('socializer/people#edit', id: '1')
? ^ ^
end
it 'does not route to #create' do
expect(post: '/people').to_not be_routable
end
it 'routes to #update' do
- expect(:put => '/people/1').to route_to('socializer/people#update', :id => '1')
? - ^^^ - ^^^
+ expect(put: '/people/1').to route_to('socializer/people#update', id: '1')
? ^ ^
end
it 'does not route to #destroy' do
expect(delete: '/people/1').to_not be_routable
end
end
end
end | 8 | 0.210526 | 4 | 4 |
d0eed5099512531fa96ec84787f80648092c4775 | index.html | index.html |
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Basic JS App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<!-- // CSS Reset – http://meyerweb.com/eric/tools/css/reset/ -->
<link rel="stylesheet" type="text/css" href="css/reset.css" media="all">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
</head>
<body>
<div class="js-app"></div>
<!-- Development; lazy load with requirejs -->
<script data-main="js/src/main" src="js/third-party/requirejs/require.js"></script>
<!-- Production; run combined minified source -->
<!-- <script src="js/app.min.js"></script> -->
</body>
</html>
|
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Basic JS App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<!-- // CSS Reset – http://meyerweb.com/eric/tools/css/reset/ -->
<link rel="stylesheet" type="text/css" href="css/reset.css" media="all">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
</head>
<body>
<div class="js-app"></div>
<!-- Development; lazy load with requirejs -->
<!-- <script data-main="js/src/main" src="js/third-party/requirejs/require.js"></script> -->
<!-- Production; run combined minified source -->
<script src="js/app.min.js"></script>
</body>
</html>
| Make built app be default | Make built app be default
| HTML | mit | alistairjcbrown/base-js-app,alistairjcbrown/connected-devices-display | html | ## Code Before:
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Basic JS App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<!-- // CSS Reset – http://meyerweb.com/eric/tools/css/reset/ -->
<link rel="stylesheet" type="text/css" href="css/reset.css" media="all">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
</head>
<body>
<div class="js-app"></div>
<!-- Development; lazy load with requirejs -->
<script data-main="js/src/main" src="js/third-party/requirejs/require.js"></script>
<!-- Production; run combined minified source -->
<!-- <script src="js/app.min.js"></script> -->
</body>
</html>
## Instruction:
Make built app be default
## Code After:
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Basic JS App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<!-- // CSS Reset – http://meyerweb.com/eric/tools/css/reset/ -->
<link rel="stylesheet" type="text/css" href="css/reset.css" media="all">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
</head>
<body>
<div class="js-app"></div>
<!-- Development; lazy load with requirejs -->
<!-- <script data-main="js/src/main" src="js/third-party/requirejs/require.js"></script> -->
<!-- Production; run combined minified source -->
<script src="js/app.min.js"></script>
</body>
</html>
|
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Basic JS App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
<!-- // CSS Reset – http://meyerweb.com/eric/tools/css/reset/ -->
<link rel="stylesheet" type="text/css" href="css/reset.css" media="all">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all">
</head>
<body>
<div class="js-app"></div>
<!-- Development; lazy load with requirejs -->
- <script data-main="js/src/main" src="js/third-party/requirejs/require.js"></script>
+ <!-- <script data-main="js/src/main" src="js/third-party/requirejs/require.js"></script> -->
? +++++ ++++
<!-- Production; run combined minified source -->
- <!-- <script src="js/app.min.js"></script> -->
? ----- ----
+ <script src="js/app.min.js"></script>
</body>
</html> | 4 | 0.153846 | 2 | 2 |
3ee01b9cee4acd9f8e55da3e600cc1e20586a5da | app/src/main/res/values/styles.xml | app/src/main/res/values/styles.xml | <resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:background">#5A0003</item>
</style>
</resources>
| <resources>
<!-- Base application theme. -->
<!--<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">-->
<color name="custom_theme_color">#5A0003</color>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@color/custom_theme_color</item>
<item name="android:colorBackground">@color/custom_theme_color</item>
</style>
</resources>
| Clean up style color theme. | Clean up style color theme.
| XML | mit | dillonbly/tworooms-android | xml | ## Code Before:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:background">#5A0003</item>
</style>
</resources>
## Instruction:
Clean up style color theme.
## Code After:
<resources>
<!-- Base application theme. -->
<!--<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">-->
<color name="custom_theme_color">#5A0003</color>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@color/custom_theme_color</item>
<item name="android:colorBackground">@color/custom_theme_color</item>
</style>
</resources>
| <resources>
<!-- Base application theme. -->
+ <!--<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">-->
+ <color name="custom_theme_color">#5A0003</color>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
- <item name="android:background">#5A0003</item>
+ <item name="android:windowBackground">@color/custom_theme_color</item>
+ <item name="android:colorBackground">@color/custom_theme_color</item>
</style>
</resources>
+
+ | 7 | 0.777778 | 6 | 1 |
93bf3a54321d850ef0e8834344a692cd39feb7e2 | examples/callforth.js | examples/callforth.js | var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
setTimeout(function () {
callforth.report(null, Date.now());
callforth.report(null, Date.now());
callforth.report(null, Date.now());
if (Date.now() % 3) {
callforth ( null, [1, 2, 3] );
} else {
callforth ( new Error("bad"), null );
}
}, 0);
} );
forth.good ( function success (callforth, data) {
console.log(["success", data]);
} ).bad( function die (err, callforth) {
console.log(["die", err]);
callforth.apply(null, arguments);
}).last( function end (callforth, err, data) {
console.log(["end", err, data]);
});
forth.bad ( function fail (err, callforth) {
console.log(["fail", err]);
} );
forth.status( function progress (callforth, warn, info) {
console.log(["progress", warn, info]);
} ); | var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
var result = [1, 2, 3];
callforth.report(null, Date.now());
callforth.report(null, Date.now());
callforth.report(null, Date.now());
if (Date.now() % 3) {
callforth ( null, result );
result.push(4); // NOTE: callforth is delayed
} else {
callforth ( new Error("bad"), null );
}
} );
forth.good ( function success (callforth, data) {
console.log(["success", data]);
} ).bad( function die (err, callforth) {
console.log(["die", err]);
callforth(err, [5, 6, 7, 8]);
}).last( function after (callforth, err, data) {
console.log(["after", err, data]);
});
forth.bad ( function fail (err, callforth) {
console.log(["fail", err]);
} );
forth.status( function progress (callforth, warn, info) {
console.log(["progress", warn, info]);
} );
forth = forth.pass ();
forth.bad ( function either (err, callforth) {
console.log(["either", err]);
});
forth.good ( function or (callforth, data) {
console.log(["or", data]);
}).bad ( function not (err, callback) {
console.log(["not", err]);
});
| Support multiple import methods and add Forth.pass. | Support multiple import methods and add Forth.pass.
| JavaScript | mit | jcmoore/forthjs | javascript | ## Code Before:
var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
setTimeout(function () {
callforth.report(null, Date.now());
callforth.report(null, Date.now());
callforth.report(null, Date.now());
if (Date.now() % 3) {
callforth ( null, [1, 2, 3] );
} else {
callforth ( new Error("bad"), null );
}
}, 0);
} );
forth.good ( function success (callforth, data) {
console.log(["success", data]);
} ).bad( function die (err, callforth) {
console.log(["die", err]);
callforth.apply(null, arguments);
}).last( function end (callforth, err, data) {
console.log(["end", err, data]);
});
forth.bad ( function fail (err, callforth) {
console.log(["fail", err]);
} );
forth.status( function progress (callforth, warn, info) {
console.log(["progress", warn, info]);
} );
## Instruction:
Support multiple import methods and add Forth.pass.
## Code After:
var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
var result = [1, 2, 3];
callforth.report(null, Date.now());
callforth.report(null, Date.now());
callforth.report(null, Date.now());
if (Date.now() % 3) {
callforth ( null, result );
result.push(4); // NOTE: callforth is delayed
} else {
callforth ( new Error("bad"), null );
}
} );
forth.good ( function success (callforth, data) {
console.log(["success", data]);
} ).bad( function die (err, callforth) {
console.log(["die", err]);
callforth(err, [5, 6, 7, 8]);
}).last( function after (callforth, err, data) {
console.log(["after", err, data]);
});
forth.bad ( function fail (err, callforth) {
console.log(["fail", err]);
} );
forth.status( function progress (callforth, warn, info) {
console.log(["progress", warn, info]);
} );
forth = forth.pass ();
forth.bad ( function either (err, callforth) {
console.log(["either", err]);
});
forth.good ( function or (callforth, data) {
console.log(["or", data]);
}).bad ( function not (err, callback) {
console.log(["not", err]);
});
| var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
+ var result = [1, 2, 3];
- setTimeout(function () {
- callforth.report(null, Date.now());
- callforth.report(null, Date.now());
- callforth.report(null, Date.now());
+ callforth.report(null, Date.now());
+ callforth.report(null, Date.now());
+ callforth.report(null, Date.now());
+
- if (Date.now() % 3) {
? -
+ if (Date.now() % 3) {
- callforth ( null, [1, 2, 3] );
? - ^^^^^^^^^
+ callforth ( null, result );
? ^^^^^^
+ result.push(4); // NOTE: callforth is delayed
- } else {
? -
+ } else {
- callforth ( new Error("bad"), null );
? -
+ callforth ( new Error("bad"), null );
- }
? -
+ }
- }, 0);
} );
forth.good ( function success (callforth, data) {
console.log(["success", data]);
} ).bad( function die (err, callforth) {
console.log(["die", err]);
- callforth.apply(null, arguments);
+ callforth(err, [5, 6, 7, 8]);
- }).last( function end (callforth, err, data) {
? ^^
+ }).last( function after (callforth, err, data) {
? +++ ^
- console.log(["end", err, data]);
? ^^
+ console.log(["after", err, data]);
? +++ ^
});
forth.bad ( function fail (err, callforth) {
console.log(["fail", err]);
} );
forth.status( function progress (callforth, warn, info) {
console.log(["progress", warn, info]);
} );
+
+ forth = forth.pass ();
+
+ forth.bad ( function either (err, callforth) {
+ console.log(["either", err]);
+ });
+
+ forth.good ( function or (callforth, data) {
+ console.log(["or", data]);
+ }).bad ( function not (err, callback) {
+ console.log(["not", err]);
+ }); | 39 | 1.181818 | 26 | 13 |
d87dd0f7cb14a07ebf93c75af60149bdee99337c | src/index.js | src/index.js | import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import marked from 'marked';
import 'normalize.css';
import prism from 'prismjs';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import config from './config';
import './global.css';
import App from './components/App';
import registerServiceWorker from './utils/registerServiceWorker';
firebase.initializeApp(config[process.env.NODE_ENV]);
prism.languages.js = prism.languages.javascript;
marked.setOptions({
highlight(code, language) {
const grammar = prism.languages[language] || prism.languages.markup;
return prism.highlight(code, grammar);
},
langPrefix: 'language-',
});
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById('app'),
);
registerServiceWorker();
| import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import marked from 'marked';
import 'normalize.css';
import prism from 'prismjs';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import config from './config';
import './global.css';
import App from './components/App';
import { unregister } from './utils/registerServiceWorker';
unregister();
firebase.initializeApp(config[process.env.NODE_ENV]);
prism.languages.js = prism.languages.javascript;
marked.setOptions({
highlight(code, language) {
const grammar = prism.languages[language] || prism.languages.markup;
return prism.highlight(code, grammar);
},
langPrefix: 'language-',
});
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById('app'),
);
| Add code to unregister the service worker for now | Add code to unregister the service worker for now
| JavaScript | mit | hoopr/codework,hoopr/codework | javascript | ## Code Before:
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import marked from 'marked';
import 'normalize.css';
import prism from 'prismjs';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import config from './config';
import './global.css';
import App from './components/App';
import registerServiceWorker from './utils/registerServiceWorker';
firebase.initializeApp(config[process.env.NODE_ENV]);
prism.languages.js = prism.languages.javascript;
marked.setOptions({
highlight(code, language) {
const grammar = prism.languages[language] || prism.languages.markup;
return prism.highlight(code, grammar);
},
langPrefix: 'language-',
});
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById('app'),
);
registerServiceWorker();
## Instruction:
Add code to unregister the service worker for now
## Code After:
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import marked from 'marked';
import 'normalize.css';
import prism from 'prismjs';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import config from './config';
import './global.css';
import App from './components/App';
import { unregister } from './utils/registerServiceWorker';
unregister();
firebase.initializeApp(config[process.env.NODE_ENV]);
prism.languages.js = prism.languages.javascript;
marked.setOptions({
highlight(code, language) {
const grammar = prism.languages[language] || prism.languages.markup;
return prism.highlight(code, grammar);
},
langPrefix: 'language-',
});
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById('app'),
);
| import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import marked from 'marked';
import 'normalize.css';
import prism from 'prismjs';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import config from './config';
import './global.css';
import App from './components/App';
- import registerServiceWorker from './utils/registerServiceWorker';
? ^^^^^^^^^^^^^
+ import { unregister } from './utils/registerServiceWorker';
? ++++ ^^
+
+ unregister();
firebase.initializeApp(config[process.env.NODE_ENV]);
-
prism.languages.js = prism.languages.javascript;
marked.setOptions({
highlight(code, language) {
const grammar = prism.languages[language] || prism.languages.markup;
return prism.highlight(code, grammar);
},
langPrefix: 'language-',
});
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById('app'),
);
- registerServiceWorker(); | 6 | 0.181818 | 3 | 3 |
3acd7d885e6c660c3acb0b584b7ed07c8a1a4df3 | docs/source/_examples/myclient.py | docs/source/_examples/myclient.py | import socket, ssl
import h11
class MyHttpClient:
def __init__(self, host, port):
self.sock = socket.create_connection((host, port))
if port == 443:
self.sock = ssl.wrap_socket(self.sock)
self.conn = h11.Connection(our_role=h11.CLIENT)
def send(self, *events):
for event in events:
data = self.conn.send(event)
if data is None:
# event was a ConnectionClosed(), meaning that we won't be
# sending any more data:
self.sock.shutdown(socket.SHUT_WR)
else:
self.sock.sendall(data)
# max_bytes_per_recv intentionally set low for pedagogical purposes
def next_event(self, max_bytes_per_recv=200):
while True:
# If we already have a complete event buffered internally, just
# return that. Otherwise, read some data, add it to the internal
# buffer, and then try again.
event = self.conn.next_event()
if event is h11.NEED_DATA:
self.conn.receive_data(self.sock.recv(max_bytes_per_recv))
continue
return event
| import socket, ssl
import h11
class MyHttpClient:
def __init__(self, host, port):
self.sock = socket.create_connection((host, port))
if port == 443:
ctx = ssl.create_default_context()
self.sock = ctx.wrap_socket(self.sock, server_hostname=host)
self.conn = h11.Connection(our_role=h11.CLIENT)
def send(self, *events):
for event in events:
data = self.conn.send(event)
if data is None:
# event was a ConnectionClosed(), meaning that we won't be
# sending any more data:
self.sock.shutdown(socket.SHUT_WR)
else:
self.sock.sendall(data)
# max_bytes_per_recv intentionally set low for pedagogical purposes
def next_event(self, max_bytes_per_recv=200):
while True:
# If we already have a complete event buffered internally, just
# return that. Otherwise, read some data, add it to the internal
# buffer, and then try again.
event = self.conn.next_event()
if event is h11.NEED_DATA:
self.conn.receive_data(self.sock.recv(max_bytes_per_recv))
continue
return event
| Support SNI in the example client | Support SNI in the example client
Fixes: gh-36
| Python | mit | python-hyper/h11,njsmith/h11 | python | ## Code Before:
import socket, ssl
import h11
class MyHttpClient:
def __init__(self, host, port):
self.sock = socket.create_connection((host, port))
if port == 443:
self.sock = ssl.wrap_socket(self.sock)
self.conn = h11.Connection(our_role=h11.CLIENT)
def send(self, *events):
for event in events:
data = self.conn.send(event)
if data is None:
# event was a ConnectionClosed(), meaning that we won't be
# sending any more data:
self.sock.shutdown(socket.SHUT_WR)
else:
self.sock.sendall(data)
# max_bytes_per_recv intentionally set low for pedagogical purposes
def next_event(self, max_bytes_per_recv=200):
while True:
# If we already have a complete event buffered internally, just
# return that. Otherwise, read some data, add it to the internal
# buffer, and then try again.
event = self.conn.next_event()
if event is h11.NEED_DATA:
self.conn.receive_data(self.sock.recv(max_bytes_per_recv))
continue
return event
## Instruction:
Support SNI in the example client
Fixes: gh-36
## Code After:
import socket, ssl
import h11
class MyHttpClient:
def __init__(self, host, port):
self.sock = socket.create_connection((host, port))
if port == 443:
ctx = ssl.create_default_context()
self.sock = ctx.wrap_socket(self.sock, server_hostname=host)
self.conn = h11.Connection(our_role=h11.CLIENT)
def send(self, *events):
for event in events:
data = self.conn.send(event)
if data is None:
# event was a ConnectionClosed(), meaning that we won't be
# sending any more data:
self.sock.shutdown(socket.SHUT_WR)
else:
self.sock.sendall(data)
# max_bytes_per_recv intentionally set low for pedagogical purposes
def next_event(self, max_bytes_per_recv=200):
while True:
# If we already have a complete event buffered internally, just
# return that. Otherwise, read some data, add it to the internal
# buffer, and then try again.
event = self.conn.next_event()
if event is h11.NEED_DATA:
self.conn.receive_data(self.sock.recv(max_bytes_per_recv))
continue
return event
| import socket, ssl
import h11
class MyHttpClient:
def __init__(self, host, port):
self.sock = socket.create_connection((host, port))
if port == 443:
+ ctx = ssl.create_default_context()
- self.sock = ssl.wrap_socket(self.sock)
? ^^^
+ self.sock = ctx.wrap_socket(self.sock, server_hostname=host)
? ^^^ ++++++++++++++++++++++
self.conn = h11.Connection(our_role=h11.CLIENT)
def send(self, *events):
for event in events:
data = self.conn.send(event)
if data is None:
# event was a ConnectionClosed(), meaning that we won't be
# sending any more data:
self.sock.shutdown(socket.SHUT_WR)
else:
self.sock.sendall(data)
# max_bytes_per_recv intentionally set low for pedagogical purposes
def next_event(self, max_bytes_per_recv=200):
while True:
# If we already have a complete event buffered internally, just
# return that. Otherwise, read some data, add it to the internal
# buffer, and then try again.
event = self.conn.next_event()
if event is h11.NEED_DATA:
self.conn.receive_data(self.sock.recv(max_bytes_per_recv))
continue
return event | 3 | 0.096774 | 2 | 1 |
6444d64ad4f9e1fe803d83ef40f1e6f08b089863 | lib/MediaWords/Util/Extractor.pm | lib/MediaWords/Util/Extractor.pm | package MediaWords::Util::Extractor;
use Modern::Perl "2012";
use MediaWords::CommonLibs;
use strict;
use Data::Dumper;
use Moose::Role;
requires 'getExtractedLines';
1;
| package MediaWords::Util::Extractor;
use Modern::Perl "2012";
use MediaWords::CommonLibs;
use strict;
use Data::Dumper;
use Moose::Role;
requires 'getExtractedLines';
requires 'getScoresAndLines';
sub extract_preprocessed_lines_for_story
{
my ( $self, $lines, $story_title, $story_description ) = @_;
if ( !defined( $lines ) )
{
return;
}
my $line_info = MediaWords::Crawler::AnalyzeLines::get_info_for_lines( $lines, $story_title, $story_description );
my $scores_and_lines = $self->getScoresAndLines( $line_info );
return {
included_line_numbers => $scores_and_lines->{ included_line_numbers },
download_lines => $lines,
scores => $scores_and_lines->{ scores },
};
}
1;
| Add extract_preprocessed_line_for_story method to base class. | Add extract_preprocessed_line_for_story method to base class.
| Perl | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud | perl | ## Code Before:
package MediaWords::Util::Extractor;
use Modern::Perl "2012";
use MediaWords::CommonLibs;
use strict;
use Data::Dumper;
use Moose::Role;
requires 'getExtractedLines';
1;
## Instruction:
Add extract_preprocessed_line_for_story method to base class.
## Code After:
package MediaWords::Util::Extractor;
use Modern::Perl "2012";
use MediaWords::CommonLibs;
use strict;
use Data::Dumper;
use Moose::Role;
requires 'getExtractedLines';
requires 'getScoresAndLines';
sub extract_preprocessed_lines_for_story
{
my ( $self, $lines, $story_title, $story_description ) = @_;
if ( !defined( $lines ) )
{
return;
}
my $line_info = MediaWords::Crawler::AnalyzeLines::get_info_for_lines( $lines, $story_title, $story_description );
my $scores_and_lines = $self->getScoresAndLines( $line_info );
return {
included_line_numbers => $scores_and_lines->{ included_line_numbers },
download_lines => $lines,
scores => $scores_and_lines->{ scores },
};
}
1;
| package MediaWords::Util::Extractor;
use Modern::Perl "2012";
use MediaWords::CommonLibs;
use strict;
use Data::Dumper;
use Moose::Role;
requires 'getExtractedLines';
+ requires 'getScoresAndLines';
+
+ sub extract_preprocessed_lines_for_story
+ {
+ my ( $self, $lines, $story_title, $story_description ) = @_;
+
+ if ( !defined( $lines ) )
+ {
+ return;
+ }
+
+
+ my $line_info = MediaWords::Crawler::AnalyzeLines::get_info_for_lines( $lines, $story_title, $story_description );
+
+ my $scores_and_lines = $self->getScoresAndLines( $line_info );
+
+ return {
+
+ included_line_numbers => $scores_and_lines->{ included_line_numbers },
+ download_lines => $lines,
+ scores => $scores_and_lines->{ scores },
+ };
+ }
1; | 23 | 1.769231 | 23 | 0 |
c66b33805afb47ffabcd1327f05a8d4a96361917 | rules/variables.js | rules/variables.js | // Variables http://eslint.org/docs/rules/#variables
module.exports = {
"rules": {
"init-declarations": [ "error", "always" ], // enforce or disallow variable initializations at definition
"no-catch-shadow": "error", // disallow the catch clause parameter name being the same as a variable in the outer scope
"no-delete-var": "error", // disallow deletion of variables
"no-label-var": "error", // disallow labels that share a name with a variable
"no-restricted-globals": "off", // disallow specified global variables
"no-shadow-restricted-names": "error", // disallow shadowing of names such as arguments
"no-shadow": "error", // JSHINT disallow declaration of variables already declared in the outer scope
"no-undef-init": "error", // disallow use of undefined when initializing variables
"no-undef": "error", // JSHINT disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undefined": "off", // disallow use of undefined variable
"no-unused-vars": [ "error", { "vars": "all", "args": "none" } ], // JSHINT disallow declaration of variables that are not used in the code
"no-use-before-define": [ "error", "nofunc" ] // JSHINT disallow use of variables before they are defined
}
};
| // Variables http://eslint.org/docs/rules/#variables
module.exports = {
"rules": {
"init-declarations": [ "error", "always" ], // enforce or disallow variable initializations at definition
"no-catch-shadow": "error", // disallow the catch clause parameter name being the same as a variable in the outer scope
"no-delete-var": "error", // disallow deletion of variables
"no-label-var": "error", // disallow labels that share a name with a variable
"no-restricted-globals": "off", // disallow specified global variables
"no-shadow-restricted-names": "error", // disallow shadowing of names such as arguments
"no-shadow": "error", // JSHINT disallow declaration of variables already declared in the outer scope
"no-undef-init": "error", // disallow use of undefined when initializing variables
"no-undef": "error", // JSHINT disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undefined": "off", // disallow use of undefined variable
"no-unused-vars": [ "error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false, "argsIgnorePattern": "^_" } ], // JSHINT disallow declaration of variables that are not used in the code
"no-use-before-define": [ "error", "nofunc" ] // JSHINT disallow use of variables before they are defined
}
};
| Add linting of unused arguments | Add linting of unused arguments
| JavaScript | mit | LeanKit-Labs/eslint-config-leankit | javascript | ## Code Before:
// Variables http://eslint.org/docs/rules/#variables
module.exports = {
"rules": {
"init-declarations": [ "error", "always" ], // enforce or disallow variable initializations at definition
"no-catch-shadow": "error", // disallow the catch clause parameter name being the same as a variable in the outer scope
"no-delete-var": "error", // disallow deletion of variables
"no-label-var": "error", // disallow labels that share a name with a variable
"no-restricted-globals": "off", // disallow specified global variables
"no-shadow-restricted-names": "error", // disallow shadowing of names such as arguments
"no-shadow": "error", // JSHINT disallow declaration of variables already declared in the outer scope
"no-undef-init": "error", // disallow use of undefined when initializing variables
"no-undef": "error", // JSHINT disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undefined": "off", // disallow use of undefined variable
"no-unused-vars": [ "error", { "vars": "all", "args": "none" } ], // JSHINT disallow declaration of variables that are not used in the code
"no-use-before-define": [ "error", "nofunc" ] // JSHINT disallow use of variables before they are defined
}
};
## Instruction:
Add linting of unused arguments
## Code After:
// Variables http://eslint.org/docs/rules/#variables
module.exports = {
"rules": {
"init-declarations": [ "error", "always" ], // enforce or disallow variable initializations at definition
"no-catch-shadow": "error", // disallow the catch clause parameter name being the same as a variable in the outer scope
"no-delete-var": "error", // disallow deletion of variables
"no-label-var": "error", // disallow labels that share a name with a variable
"no-restricted-globals": "off", // disallow specified global variables
"no-shadow-restricted-names": "error", // disallow shadowing of names such as arguments
"no-shadow": "error", // JSHINT disallow declaration of variables already declared in the outer scope
"no-undef-init": "error", // disallow use of undefined when initializing variables
"no-undef": "error", // JSHINT disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undefined": "off", // disallow use of undefined variable
"no-unused-vars": [ "error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false, "argsIgnorePattern": "^_" } ], // JSHINT disallow declaration of variables that are not used in the code
"no-use-before-define": [ "error", "nofunc" ] // JSHINT disallow use of variables before they are defined
}
};
| // Variables http://eslint.org/docs/rules/#variables
module.exports = {
"rules": {
"init-declarations": [ "error", "always" ], // enforce or disallow variable initializations at definition
"no-catch-shadow": "error", // disallow the catch clause parameter name being the same as a variable in the outer scope
"no-delete-var": "error", // disallow deletion of variables
"no-label-var": "error", // disallow labels that share a name with a variable
"no-restricted-globals": "off", // disallow specified global variables
"no-shadow-restricted-names": "error", // disallow shadowing of names such as arguments
"no-shadow": "error", // JSHINT disallow declaration of variables already declared in the outer scope
"no-undef-init": "error", // disallow use of undefined when initializing variables
"no-undef": "error", // JSHINT disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undefined": "off", // disallow use of undefined variable
- "no-unused-vars": [ "error", { "vars": "all", "args": "none" } ], // JSHINT disallow declaration of variables that are not used in the code
? ^^^^
+ "no-unused-vars": [ "error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false, "argsIgnorePattern": "^_" } ], // JSHINT disallow declaration of variables that are not used in the code
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"no-use-before-define": [ "error", "nofunc" ] // JSHINT disallow use of variables before they are defined
}
}; | 2 | 0.111111 | 1 | 1 |
76c6383dba2aae3d9ed6d3daaa607952593b7db7 | src/Blogger/BlogBundle/Tests/Controller/PageControllerTest.php | src/Blogger/BlogBundle/Tests/Controller/PageControllerTest.php | <?php
namespace Blogger\BlogBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class PageControllerTest extends WebTestCase
{
public function testAbout()
{
$client = static::createClient();
$crawler = $client->request('GET', '/about');
$this->assertEquals(1, $crawler->filter('h1:contains("Про автора Blogger 2015")')->count());
}
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
// Check there are some blog entries on the page
$this->assertTrue($crawler->filter('article.blog')->count() >0);
// Find the first link, get the title, ensure this is loaded on the next page
$blogLink = $crawler->filter('article.blog h2 a')->first();
$blogTitle = $blogLink->text();
$crawler = $client->click($blogLink->link());
}
} | <?php
namespace Blogger\BlogBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class PageControllerTest extends WebTestCase
{
public function testAbout()
{
$client = static::createClient();
$crawler = $client->request('GET', '/about');
$this->assertEquals(1, $crawler->filter('h1:contains("Про автора Blogger 2015")')->count());
}
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
// Check there are some blog entries on the page
$this->assertTrue($crawler->filter('article.blog')->count() >0);
// Find the first link, get the title, ensure this is loaded on the next page
$blogLink = $crawler->filter('article.blog h2 a')->first();
$blogTitle = $blogLink->text();
$crawler = $client->click($blogLink->link());
// Check the h2 has the blog title in it
$this->assertEquals(1, $crawler->filter('h2:contains("' . $blogTitle .'")')->count());
}
} | Check the h2 has the blog title in it | Check the h2 has the blog title in it
| PHP | mit | moroztaras/blogger_2015 | php | ## Code Before:
<?php
namespace Blogger\BlogBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class PageControllerTest extends WebTestCase
{
public function testAbout()
{
$client = static::createClient();
$crawler = $client->request('GET', '/about');
$this->assertEquals(1, $crawler->filter('h1:contains("Про автора Blogger 2015")')->count());
}
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
// Check there are some blog entries on the page
$this->assertTrue($crawler->filter('article.blog')->count() >0);
// Find the first link, get the title, ensure this is loaded on the next page
$blogLink = $crawler->filter('article.blog h2 a')->first();
$blogTitle = $blogLink->text();
$crawler = $client->click($blogLink->link());
}
}
## Instruction:
Check the h2 has the blog title in it
## Code After:
<?php
namespace Blogger\BlogBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class PageControllerTest extends WebTestCase
{
public function testAbout()
{
$client = static::createClient();
$crawler = $client->request('GET', '/about');
$this->assertEquals(1, $crawler->filter('h1:contains("Про автора Blogger 2015")')->count());
}
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
// Check there are some blog entries on the page
$this->assertTrue($crawler->filter('article.blog')->count() >0);
// Find the first link, get the title, ensure this is loaded on the next page
$blogLink = $crawler->filter('article.blog h2 a')->first();
$blogTitle = $blogLink->text();
$crawler = $client->click($blogLink->link());
// Check the h2 has the blog title in it
$this->assertEquals(1, $crawler->filter('h2:contains("' . $blogTitle .'")')->count());
}
} | <?php
namespace Blogger\BlogBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class PageControllerTest extends WebTestCase
{
public function testAbout()
{
$client = static::createClient();
$crawler = $client->request('GET', '/about');
$this->assertEquals(1, $crawler->filter('h1:contains("Про автора Blogger 2015")')->count());
}
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
// Check there are some blog entries on the page
$this->assertTrue($crawler->filter('article.blog')->count() >0);
// Find the first link, get the title, ensure this is loaded on the next page
$blogLink = $crawler->filter('article.blog h2 a')->first();
$blogTitle = $blogLink->text();
$crawler = $client->click($blogLink->link());
+
+ // Check the h2 has the blog title in it
+ $this->assertEquals(1, $crawler->filter('h2:contains("' . $blogTitle .'")')->count());
}
} | 3 | 0.09375 | 3 | 0 |
deea5060e95963bbd3475f507139e4ffdb436ae9 | templates/index.html | templates/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<title>Documentation for REST routes</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href=".{{@cssBaseUrl}}/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Route Documentation</a>
</div>
</div>
</div>
<div class="container route-index">
{{#each routes}}
<div class="row route">
<div class="col-md-2 h2">
<span class="{{colorFromMethod this}} full-width-label">
{{this.method}}
</span>
</div>
<div class="col-md-10 h2">
<a href="?path={{this.path}}#{{this.method}}">{{this.path}}</a>
<div class="pull-right">
{{#each this.tags}}
<div class="badge">{{this}}</div>
{{/each}}
</div>
</div>
</div>
{{/each}}
</div>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<title>Documentation for REST routes</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href=".{{@cssBaseUrl}}/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Route Documentation</a>
</div>
</div>
</div>
<div class="container route-index">
{{#each routes}}
<a href="?path={{this.path}}#{{this.method}}">
<div class="row route">
<div class="col-md-2 h2">
<span class="{{colorFromMethod this}} full-width-label">
{{this.method}}
</span>
</div>
<div class="col-md-10 h2">
<div class="pull-right">
{{#each this.tags}}
<div class="badge">{{this}}</div>
{{/each}}
</div>
{{this.path}}
</div>
</div>
</a>
{{/each}}
</div>
</body>
</html>
| Make entire row a link instead of route | Make entire row a link instead of route
in ./templates/index.html the path is the link by default, instead of
the entire row. This provides poor user experience in tiny links to
click for short paths like '/' and unexpected behaviour as the entire
highlights on hover. Fix makes entire row the link.
| HTML | bsd-3-clause | lloydbenson/lout,evdevgit/lout,evdevgit/lout,lloydbenson/lout | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Documentation for REST routes</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href=".{{@cssBaseUrl}}/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Route Documentation</a>
</div>
</div>
</div>
<div class="container route-index">
{{#each routes}}
<div class="row route">
<div class="col-md-2 h2">
<span class="{{colorFromMethod this}} full-width-label">
{{this.method}}
</span>
</div>
<div class="col-md-10 h2">
<a href="?path={{this.path}}#{{this.method}}">{{this.path}}</a>
<div class="pull-right">
{{#each this.tags}}
<div class="badge">{{this}}</div>
{{/each}}
</div>
</div>
</div>
{{/each}}
</div>
</body>
</html>
## Instruction:
Make entire row a link instead of route
in ./templates/index.html the path is the link by default, instead of
the entire row. This provides poor user experience in tiny links to
click for short paths like '/' and unexpected behaviour as the entire
highlights on hover. Fix makes entire row the link.
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Documentation for REST routes</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href=".{{@cssBaseUrl}}/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Route Documentation</a>
</div>
</div>
</div>
<div class="container route-index">
{{#each routes}}
<a href="?path={{this.path}}#{{this.method}}">
<div class="row route">
<div class="col-md-2 h2">
<span class="{{colorFromMethod this}} full-width-label">
{{this.method}}
</span>
</div>
<div class="col-md-10 h2">
<div class="pull-right">
{{#each this.tags}}
<div class="badge">{{this}}</div>
{{/each}}
</div>
{{this.path}}
</div>
</div>
</a>
{{/each}}
</div>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<title>Documentation for REST routes</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href=".{{@cssBaseUrl}}/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Route Documentation</a>
</div>
</div>
</div>
<div class="container route-index">
{{#each routes}}
+ <a href="?path={{this.path}}#{{this.method}}">
- <div class="row route">
+ <div class="row route">
? ++++
- <div class="col-md-2 h2">
+ <div class="col-md-2 h2">
? ++++
- <span class="{{colorFromMethod this}} full-width-label">
+ <span class="{{colorFromMethod this}} full-width-label">
? ++++
- {{this.method}}
+ {{this.method}}
? ++++
- </span>
+ </span>
? ++++
- </div>
+ </div>
? ++++
- <div class="col-md-10 h2">
+ <div class="col-md-10 h2">
? ++++
- <a href="?path={{this.path}}#{{this.method}}">{{this.path}}</a>
- <div class="pull-right">
+ <div class="pull-right">
? ++++
- {{#each this.tags}}
+ {{#each this.tags}}
? ++++
- <div class="badge">{{this}}</div>
+ <div class="badge">{{this}}</div>
? ++++
- {{/each}}
+ {{/each}}
? ++++
+ </div>
+ {{this.path}}
</div>
</div>
- </div>
? ^^^
+ </a>
? ^
{{/each}}
</div>
</body>
</html> | 28 | 0.777778 | 15 | 13 |
8223a053c2153793d0fd56051eee7e039ec393f2 | bit-ring.js | bit-ring.js | var assert = require('assert');
function BitRing(capacity) {
assert.ok(capacity < 32, 'Capacity must be less than 32');
this.capacity = capacity;
this.bits = 0;
this.pos = 0;
this.length = 0;
this._count = 0;
}
// Update the count and set or clear the next bit in the ring
BitRing.prototype.push = function(bool) {
var num = bool === true ? 1 : 0;
this._count += num - ((this.bits >>> this.pos) & 1);
this.bits ^= (-num ^ this.bits) & (1 << this.pos);
this.pos = (this.pos + 1) % this.capacity;
if (this.length < this.capacity) {
this.length++;
}
};
// Return the number of bits set
BitRing.prototype.count = function() {
return this._count;
};
module.exports = BitRing;
| function BitRing(capacity) {
this.capacity = capacity;
this.bits = new Uint8ClampedArray(capacity);
this.pos = 0;
this.length = 0;
this._count = 0;
}
// Update the count and set or clear the next bit in the ring
BitRing.prototype.push = function(bool) {
var num = bool === true ? 1 : 0;
this._count += num - this.bits[this.pos];
this.bits[this.pos] = num;
this.pos = (this.pos + 1) % this.capacity;
if (this.length < this.capacity) {
this.length++;
}
};
// Return the number of bits set
BitRing.prototype.count = function() {
return this._count;
};
module.exports = BitRing;
| Use a TypedArray instead of a number | Use a TypedArray instead of a number
| JavaScript | mit | uber/airlock | javascript | ## Code Before:
var assert = require('assert');
function BitRing(capacity) {
assert.ok(capacity < 32, 'Capacity must be less than 32');
this.capacity = capacity;
this.bits = 0;
this.pos = 0;
this.length = 0;
this._count = 0;
}
// Update the count and set or clear the next bit in the ring
BitRing.prototype.push = function(bool) {
var num = bool === true ? 1 : 0;
this._count += num - ((this.bits >>> this.pos) & 1);
this.bits ^= (-num ^ this.bits) & (1 << this.pos);
this.pos = (this.pos + 1) % this.capacity;
if (this.length < this.capacity) {
this.length++;
}
};
// Return the number of bits set
BitRing.prototype.count = function() {
return this._count;
};
module.exports = BitRing;
## Instruction:
Use a TypedArray instead of a number
## Code After:
function BitRing(capacity) {
this.capacity = capacity;
this.bits = new Uint8ClampedArray(capacity);
this.pos = 0;
this.length = 0;
this._count = 0;
}
// Update the count and set or clear the next bit in the ring
BitRing.prototype.push = function(bool) {
var num = bool === true ? 1 : 0;
this._count += num - this.bits[this.pos];
this.bits[this.pos] = num;
this.pos = (this.pos + 1) % this.capacity;
if (this.length < this.capacity) {
this.length++;
}
};
// Return the number of bits set
BitRing.prototype.count = function() {
return this._count;
};
module.exports = BitRing;
| - var assert = require('assert');
-
function BitRing(capacity) {
- assert.ok(capacity < 32, 'Capacity must be less than 32');
this.capacity = capacity;
- this.bits = 0;
+ this.bits = new Uint8ClampedArray(capacity);
this.pos = 0;
this.length = 0;
this._count = 0;
}
// Update the count and set or clear the next bit in the ring
BitRing.prototype.push = function(bool) {
var num = bool === true ? 1 : 0;
- this._count += num - ((this.bits >>> this.pos) & 1);
? -- ^^^^^ ^^^^^^
+ this._count += num - this.bits[this.pos];
? ^ ^
- this.bits ^= (-num ^ this.bits) & (1 << this.pos);
+ this.bits[this.pos] = num;
this.pos = (this.pos + 1) % this.capacity;
if (this.length < this.capacity) {
this.length++;
}
};
// Return the number of bits set
BitRing.prototype.count = function() {
return this._count;
};
module.exports = BitRing; | 9 | 0.321429 | 3 | 6 |
2ad78e4b4da048ef95def8df02b3008c165975eb | test/test-index.js | test/test-index.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const utils = require('../lib/utils.js');
const testRunner = require('sdk/test');
exports.testGetHostURL = function(assert) {
let url = 'https://www.allizom.org/en-US/firefox/new/';
assert.equal(utils.getHostURL(url), 'https://www.allizom.org');
url = 'http://127.0.0.8000/en-US/';
assert.equal(utils.getHostURL(url), 'http://127.0.0.8000');
};
testRunner.run(exports);
| /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const utils = require('../lib/utils.js');
const testRunner = require('sdk/test');
exports.testGetHostURL = function(assert) {
let url = 'https://www.allizom.org/en-US/firefox/new/';
assert.equal(utils.getHostURL(url), 'https://www.allizom.org');
url = 'http://127.0.0.8000/en-US/';
assert.equal(utils.getHostURL(url), 'http://127.0.0.8000');
url = 'about:home';
assert.equal(utils.getHostURL(url), null);
};
testRunner.run(exports);
| Add null test for getHostURL() | Add null test for getHostURL()
| JavaScript | mpl-2.0 | alexgibson/uitour-config,alexgibson/uitour-config | javascript | ## Code Before:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const utils = require('../lib/utils.js');
const testRunner = require('sdk/test');
exports.testGetHostURL = function(assert) {
let url = 'https://www.allizom.org/en-US/firefox/new/';
assert.equal(utils.getHostURL(url), 'https://www.allizom.org');
url = 'http://127.0.0.8000/en-US/';
assert.equal(utils.getHostURL(url), 'http://127.0.0.8000');
};
testRunner.run(exports);
## Instruction:
Add null test for getHostURL()
## Code After:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const utils = require('../lib/utils.js');
const testRunner = require('sdk/test');
exports.testGetHostURL = function(assert) {
let url = 'https://www.allizom.org/en-US/firefox/new/';
assert.equal(utils.getHostURL(url), 'https://www.allizom.org');
url = 'http://127.0.0.8000/en-US/';
assert.equal(utils.getHostURL(url), 'http://127.0.0.8000');
url = 'about:home';
assert.equal(utils.getHostURL(url), null);
};
testRunner.run(exports);
| /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
const utils = require('../lib/utils.js');
const testRunner = require('sdk/test');
exports.testGetHostURL = function(assert) {
let url = 'https://www.allizom.org/en-US/firefox/new/';
assert.equal(utils.getHostURL(url), 'https://www.allizom.org');
url = 'http://127.0.0.8000/en-US/';
assert.equal(utils.getHostURL(url), 'http://127.0.0.8000');
+
+ url = 'about:home';
+ assert.equal(utils.getHostURL(url), null);
};
testRunner.run(exports); | 3 | 0.157895 | 3 | 0 |
319237cb097de3505e4e2c9f3cf24911bd2140f8 | db/seeds.rb | db/seeds.rb | require 'faker'
10.times do
User.create(username: Faker::Internet.user_name, password: "password", first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, bio: Faker::Lorem.sentence, pic_url: Faker::Avatar.image, url: Faker::Internet.url, email: Faker::Internet.email, country: Faker::Address.country)
end
10.times do
Snippet.create(user_id: rand(1..10), content: Faker::Lorem.sentence)
end
20.times do
published = [true, false].sample
Story.create(title: Faker::Lorem.sentence, author_id: rand(1..10), content: Faker::Lorem.paragraph, parent_id: rand(1..9), snippet_id: rand(1..10), published: published)
end
10.times do
Tag.create(name: Faker::Lorem.word)
end
10.times do
StoryTag.create(tag_id: rand(1..10), story_id: rand(1..20))
end
20.times do
liked = [true, false].sample
Vote.create(story_id: rand(1..20), user_id: rand(1..10), liked: liked)
end
| require 'faker'
10.times do
User.create(username: Faker::Internet.user_name, password: "password", first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, bio: Faker::Lorem.sentence, pic_url: Faker::Avatar.image, url: Faker::Internet.url, email: Faker::Internet.email, country: Faker::Address.country)
end
10.times do
Snippet.create(user_id: rand(1..10), content: Faker::Lorem.sentence)
end
20.times do
published = [true, false].sample
Story.create(title: Faker::Lorem.sentence, author_id: rand(1..10), content: Faker::Lorem.paragraph, parent_id: rand(1..9), snippet_id: rand(1..10), published: published)
end
10.times do
Tag.create(name: Faker::Lorem.word)
end
10.times do
StoryTag.create(tag_id: rand(1..10), story_id: rand(1..20))
end
20.times do
liked = [true, false].sample
Vote.create(story_id: rand(1..20), user_id: rand(1..10), liked: liked)
end
## ADMIN ##
User.create(username: "mai", password: "password", email: "mai@mai.com")
| Create account for me to add admin powers to later | Create account for me to add admin powers to later
| Ruby | mit | mxngyn/StoryVine,SputterPuttRedux/storyvine_clone,SputterPuttRedux/storyvine_clone,mxngyn/StoryVine,pearlshin/StoryVine,mxngyn/StoryVine,pearlshin/StoryVine,pearlshin/StoryVine,SputterPuttRedux/storyvine_clone | ruby | ## Code Before:
require 'faker'
10.times do
User.create(username: Faker::Internet.user_name, password: "password", first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, bio: Faker::Lorem.sentence, pic_url: Faker::Avatar.image, url: Faker::Internet.url, email: Faker::Internet.email, country: Faker::Address.country)
end
10.times do
Snippet.create(user_id: rand(1..10), content: Faker::Lorem.sentence)
end
20.times do
published = [true, false].sample
Story.create(title: Faker::Lorem.sentence, author_id: rand(1..10), content: Faker::Lorem.paragraph, parent_id: rand(1..9), snippet_id: rand(1..10), published: published)
end
10.times do
Tag.create(name: Faker::Lorem.word)
end
10.times do
StoryTag.create(tag_id: rand(1..10), story_id: rand(1..20))
end
20.times do
liked = [true, false].sample
Vote.create(story_id: rand(1..20), user_id: rand(1..10), liked: liked)
end
## Instruction:
Create account for me to add admin powers to later
## Code After:
require 'faker'
10.times do
User.create(username: Faker::Internet.user_name, password: "password", first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, bio: Faker::Lorem.sentence, pic_url: Faker::Avatar.image, url: Faker::Internet.url, email: Faker::Internet.email, country: Faker::Address.country)
end
10.times do
Snippet.create(user_id: rand(1..10), content: Faker::Lorem.sentence)
end
20.times do
published = [true, false].sample
Story.create(title: Faker::Lorem.sentence, author_id: rand(1..10), content: Faker::Lorem.paragraph, parent_id: rand(1..9), snippet_id: rand(1..10), published: published)
end
10.times do
Tag.create(name: Faker::Lorem.word)
end
10.times do
StoryTag.create(tag_id: rand(1..10), story_id: rand(1..20))
end
20.times do
liked = [true, false].sample
Vote.create(story_id: rand(1..20), user_id: rand(1..10), liked: liked)
end
## ADMIN ##
User.create(username: "mai", password: "password", email: "mai@mai.com")
| require 'faker'
10.times do
User.create(username: Faker::Internet.user_name, password: "password", first_name: Faker::Name.first_name, last_name: Faker::Name.last_name, bio: Faker::Lorem.sentence, pic_url: Faker::Avatar.image, url: Faker::Internet.url, email: Faker::Internet.email, country: Faker::Address.country)
end
10.times do
Snippet.create(user_id: rand(1..10), content: Faker::Lorem.sentence)
end
20.times do
published = [true, false].sample
Story.create(title: Faker::Lorem.sentence, author_id: rand(1..10), content: Faker::Lorem.paragraph, parent_id: rand(1..9), snippet_id: rand(1..10), published: published)
end
10.times do
Tag.create(name: Faker::Lorem.word)
end
10.times do
StoryTag.create(tag_id: rand(1..10), story_id: rand(1..20))
end
20.times do
liked = [true, false].sample
Vote.create(story_id: rand(1..20), user_id: rand(1..10), liked: liked)
end
+
+ ## ADMIN ##
+
+ User.create(username: "mai", password: "password", email: "mai@mai.com") | 4 | 0.148148 | 4 | 0 |
4dd98660e2e06f76cde251bd9fc8b00689768a52 | cineapp/configs/settings_test.cfg | cineapp/configs/settings_test.cfg | import os
basedir = os.path.abspath(os.path.dirname(__file__))
# WTForms Config
WTF_CSRF_ENABLED = True
SECRET_KEY = '\xcaVt\xb7u\x91n/\xec\xf8\xc8,\xd4*\xe83\xe4\xe7A_\xf8}0\xaf'
API_URL = "http://api.themoviedb.org/3"
# Database Settings
SQLALCHEMY_DATABASE_URI = 'mysql://root@127.0.0.1/cineapp_ci'
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
# Session Settings
SESSION_TYPE = "filesystem"
# Application Settings
POSTERS_PATH = "/home/travis/cine_app/cineapp/static/posters"
MAIL_SENDER = "CineApp Travis <cineapp-travis@ptitoliv.net>"
# Mail Server settings
MAIL_SERVER = '127.0.0.1'
MAIL_PORT = 25
MAIL_USE_TLS = True
| import os
basedir = os.path.abspath(os.path.dirname(__file__))
# WTForms Config
WTF_CSRF_ENABLED = True
SECRET_KEY = '\xcaVt\xb7u\x91n/\xec\xf8\xc8,\xd4*\xe83\xe4\xe7A_\xf8}0\xaf'
API_URL = "http://api.themoviedb.org/3"
# Database Settings
SQLALCHEMY_DATABASE_URI = 'mysql://root@127.0.0.1/cineapp_ci'
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
# Session Settings
SESSION_TYPE = "filesystem"
# Application Settings
POSTERS_PATH = "/home/travis/cine_app/cineapp/static/posters"
MAIL_SENDER = "CineApp Travis <cineapp-travis@ptitoliv.net>"
# Mail Server settings
MAIL_SERVER = '127.0.0.1'
MAIL_PORT = 25
MAIL_USE_TLS = True
# Logs Directory
LOGDIR="/home/travis/cine_app/logs"
| Define a log directory for Travis configuration. | Define a log directory for Travis configuration.
| INI | mit | ptitoliv/cineapp,ptitoliv/cineapp,ptitoliv/cineapp | ini | ## Code Before:
import os
basedir = os.path.abspath(os.path.dirname(__file__))
# WTForms Config
WTF_CSRF_ENABLED = True
SECRET_KEY = '\xcaVt\xb7u\x91n/\xec\xf8\xc8,\xd4*\xe83\xe4\xe7A_\xf8}0\xaf'
API_URL = "http://api.themoviedb.org/3"
# Database Settings
SQLALCHEMY_DATABASE_URI = 'mysql://root@127.0.0.1/cineapp_ci'
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
# Session Settings
SESSION_TYPE = "filesystem"
# Application Settings
POSTERS_PATH = "/home/travis/cine_app/cineapp/static/posters"
MAIL_SENDER = "CineApp Travis <cineapp-travis@ptitoliv.net>"
# Mail Server settings
MAIL_SERVER = '127.0.0.1'
MAIL_PORT = 25
MAIL_USE_TLS = True
## Instruction:
Define a log directory for Travis configuration.
## Code After:
import os
basedir = os.path.abspath(os.path.dirname(__file__))
# WTForms Config
WTF_CSRF_ENABLED = True
SECRET_KEY = '\xcaVt\xb7u\x91n/\xec\xf8\xc8,\xd4*\xe83\xe4\xe7A_\xf8}0\xaf'
API_URL = "http://api.themoviedb.org/3"
# Database Settings
SQLALCHEMY_DATABASE_URI = 'mysql://root@127.0.0.1/cineapp_ci'
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
# Session Settings
SESSION_TYPE = "filesystem"
# Application Settings
POSTERS_PATH = "/home/travis/cine_app/cineapp/static/posters"
MAIL_SENDER = "CineApp Travis <cineapp-travis@ptitoliv.net>"
# Mail Server settings
MAIL_SERVER = '127.0.0.1'
MAIL_PORT = 25
MAIL_USE_TLS = True
# Logs Directory
LOGDIR="/home/travis/cine_app/logs"
| import os
basedir = os.path.abspath(os.path.dirname(__file__))
# WTForms Config
WTF_CSRF_ENABLED = True
SECRET_KEY = '\xcaVt\xb7u\x91n/\xec\xf8\xc8,\xd4*\xe83\xe4\xe7A_\xf8}0\xaf'
API_URL = "http://api.themoviedb.org/3"
# Database Settings
SQLALCHEMY_DATABASE_URI = 'mysql://root@127.0.0.1/cineapp_ci'
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
# Session Settings
SESSION_TYPE = "filesystem"
# Application Settings
POSTERS_PATH = "/home/travis/cine_app/cineapp/static/posters"
MAIL_SENDER = "CineApp Travis <cineapp-travis@ptitoliv.net>"
# Mail Server settings
MAIL_SERVER = '127.0.0.1'
MAIL_PORT = 25
MAIL_USE_TLS = True
+
+ # Logs Directory
+ LOGDIR="/home/travis/cine_app/logs" | 3 | 0.125 | 3 | 0 |
67cfd96b4ed5bc33d109a8ae7036c7d50a449c88 | test/cookbooks/lxctests/recipes/install_lxc.rb | test/cookbooks/lxctests/recipes/install_lxc.rb | if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12
package 'python-software-properties' do
action :nothing
end.run_action(:install)
end
execute 'add-apt-repository ppa:ubuntu-lxc/daily' do
action :nothing
end.run_action(:run)
execute 'apt-get update' do
action :nothing
end.run_action(:run)
# Needed for Ubuntu 14, not Ubuntu 12
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 14
package 'ruby1.9.1-dev' do
action :nothing
end.run_action(:upgrade)
end
package 'lxc' do
action :nothing
end.run_action(:upgrade)
package 'lxc-dev' do
action :nothing
end.run_action(:upgrade)
package 'lxc-templates' do
action :nothing
end.run_action(:upgrade)
| if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12
execute 'apt-get update' do
action :nothing
end.run_action(:run)
package 'python-software-properties' do
action :nothing
end.run_action(:install)
package 'make' do
action :nothing
end.run_action(:install)
end
execute 'add-apt-repository ppa:ubuntu-lxc/daily' do
action :nothing
end.run_action(:run)
execute 'apt-get update' do
action :nothing
end.run_action(:run)
# Needed for Ubuntu 14, not Ubuntu 12
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 14
package 'ruby1.9.1-dev' do
action :nothing
end.run_action(:upgrade)
end
package 'lxc' do
action :nothing
end.run_action(:upgrade)
package 'lxc-dev' do
action :nothing
end.run_action(:upgrade)
package 'lxc-templates' do
action :nothing
end.run_action(:upgrade)
| Fix LXC install on Ubuntu 12 | Fix LXC install on Ubuntu 12
| Ruby | apache-2.0 | chef/chef-provisioning-lxc | ruby | ## Code Before:
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12
package 'python-software-properties' do
action :nothing
end.run_action(:install)
end
execute 'add-apt-repository ppa:ubuntu-lxc/daily' do
action :nothing
end.run_action(:run)
execute 'apt-get update' do
action :nothing
end.run_action(:run)
# Needed for Ubuntu 14, not Ubuntu 12
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 14
package 'ruby1.9.1-dev' do
action :nothing
end.run_action(:upgrade)
end
package 'lxc' do
action :nothing
end.run_action(:upgrade)
package 'lxc-dev' do
action :nothing
end.run_action(:upgrade)
package 'lxc-templates' do
action :nothing
end.run_action(:upgrade)
## Instruction:
Fix LXC install on Ubuntu 12
## Code After:
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12
execute 'apt-get update' do
action :nothing
end.run_action(:run)
package 'python-software-properties' do
action :nothing
end.run_action(:install)
package 'make' do
action :nothing
end.run_action(:install)
end
execute 'add-apt-repository ppa:ubuntu-lxc/daily' do
action :nothing
end.run_action(:run)
execute 'apt-get update' do
action :nothing
end.run_action(:run)
# Needed for Ubuntu 14, not Ubuntu 12
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 14
package 'ruby1.9.1-dev' do
action :nothing
end.run_action(:upgrade)
end
package 'lxc' do
action :nothing
end.run_action(:upgrade)
package 'lxc-dev' do
action :nothing
end.run_action(:upgrade)
package 'lxc-templates' do
action :nothing
end.run_action(:upgrade)
| if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12
+ execute 'apt-get update' do
+ action :nothing
+ end.run_action(:run)
+
package 'python-software-properties' do
+ action :nothing
+ end.run_action(:install)
+
+ package 'make' do
action :nothing
end.run_action(:install)
end
execute 'add-apt-repository ppa:ubuntu-lxc/daily' do
action :nothing
end.run_action(:run)
execute 'apt-get update' do
action :nothing
end.run_action(:run)
# Needed for Ubuntu 14, not Ubuntu 12
if node['platform'] == 'ubuntu' && node['platform_version'].to_i == 14
package 'ruby1.9.1-dev' do
action :nothing
end.run_action(:upgrade)
end
package 'lxc' do
action :nothing
end.run_action(:upgrade)
package 'lxc-dev' do
action :nothing
end.run_action(:upgrade)
package 'lxc-templates' do
action :nothing
end.run_action(:upgrade) | 8 | 0.25 | 8 | 0 |
117d1b470f8c03b4f4e332a95ccfcfebdadb8f52 | pyproject.toml | pyproject.toml | [build-system]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"
[tool.black]
skip-string-normalization = true
[tool.setuptools_scm]
[tool.pytest-enabler.black]
addopts = "--black"
[tool.pytest-enabler.mypy]
addopts = "--mypy"
[tool.pytest-enabler.flake8]
addopts = "--flake8"
[tool.pytest-enabler.cov]
addopts = "--cov"
| [build-system]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"
[tool.black]
skip-string-normalization = true
[tool.setuptools_scm]
[tool.pytest-enabler.black]
addopts = "--black"
[tool.pytest-enabler.mypy]
addopts = "--mypy"
[tool.pytest-enabler.flake8]
# disabled due to PyCQA/flake8#1438
# addopts = "--flake8"
[tool.pytest-enabler.cov]
addopts = "--cov"
| Disable flake8 due to incompatibility. | Disable flake8 due to incompatibility.
| TOML | apache-2.0 | python/importlib_metadata | toml | ## Code Before:
[build-system]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"
[tool.black]
skip-string-normalization = true
[tool.setuptools_scm]
[tool.pytest-enabler.black]
addopts = "--black"
[tool.pytest-enabler.mypy]
addopts = "--mypy"
[tool.pytest-enabler.flake8]
addopts = "--flake8"
[tool.pytest-enabler.cov]
addopts = "--cov"
## Instruction:
Disable flake8 due to incompatibility.
## Code After:
[build-system]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"
[tool.black]
skip-string-normalization = true
[tool.setuptools_scm]
[tool.pytest-enabler.black]
addopts = "--black"
[tool.pytest-enabler.mypy]
addopts = "--mypy"
[tool.pytest-enabler.flake8]
# disabled due to PyCQA/flake8#1438
# addopts = "--flake8"
[tool.pytest-enabler.cov]
addopts = "--cov"
| [build-system]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
build-backend = "setuptools.build_meta"
[tool.black]
skip-string-normalization = true
[tool.setuptools_scm]
[tool.pytest-enabler.black]
addopts = "--black"
[tool.pytest-enabler.mypy]
addopts = "--mypy"
[tool.pytest-enabler.flake8]
+ # disabled due to PyCQA/flake8#1438
- addopts = "--flake8"
+ # addopts = "--flake8"
? ++
[tool.pytest-enabler.cov]
addopts = "--cov" | 3 | 0.15 | 2 | 1 |
589a9d66803e323c66ef78ebf499cc49a6b65fe7 | Source/World/Block/BlockDatabase.h | Source/World/Block/BlockDatabase.h |
namespace Block
{
class Database
{
public:
static Database& get();
Database();
const BlockType& getBlock(uint8_t id) const;
const BlockType& getBlock(ID blockID) const;
const Texture::Atlas& getTextureAtlas() const;
private:
std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks;
Texture::Atlas m_textures;
};
const BlockType& get(uint8_t id);
const BlockType& get(ID blockID);
}
#endif // BlockDatabase_H_INCLUDED
|
namespace Block
{
class Database
{
public:
static Database& get();
const BlockType& getBlock(uint8_t id) const;
const BlockType& getBlock(ID blockID) const;
const Texture::Atlas& getTextureAtlas() const;
private:
Database();
std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks;
Texture::Atlas m_textures;
};
const BlockType& get(uint8_t id);
const BlockType& get(ID blockID);
}
#endif // BlockDatabase_H_INCLUDED
| Fix the block database singleton | Fix the block database singleton
| C | mit | Hopson97/HopsonCraft,Hopson97/HopsonCraft | c | ## Code Before:
namespace Block
{
class Database
{
public:
static Database& get();
Database();
const BlockType& getBlock(uint8_t id) const;
const BlockType& getBlock(ID blockID) const;
const Texture::Atlas& getTextureAtlas() const;
private:
std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks;
Texture::Atlas m_textures;
};
const BlockType& get(uint8_t id);
const BlockType& get(ID blockID);
}
#endif // BlockDatabase_H_INCLUDED
## Instruction:
Fix the block database singleton
## Code After:
namespace Block
{
class Database
{
public:
static Database& get();
const BlockType& getBlock(uint8_t id) const;
const BlockType& getBlock(ID blockID) const;
const Texture::Atlas& getTextureAtlas() const;
private:
Database();
std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks;
Texture::Atlas m_textures;
};
const BlockType& get(uint8_t id);
const BlockType& get(ID blockID);
}
#endif // BlockDatabase_H_INCLUDED
|
namespace Block
{
class Database
{
public:
static Database& get();
- Database();
-
const BlockType& getBlock(uint8_t id) const;
const BlockType& getBlock(ID blockID) const;
const Texture::Atlas& getTextureAtlas() const;
private:
+ Database();
+
std::array<std::unique_ptr<BlockType>, (int)ID::NUM_BlockTypeS> m_blocks;
Texture::Atlas m_textures;
};
const BlockType& get(uint8_t id);
const BlockType& get(ID blockID);
}
#endif // BlockDatabase_H_INCLUDED | 4 | 0.153846 | 2 | 2 |
a7078e65f1e35b000eb90326232b86568a03f201 | README.md | README.md | openbsd-scripts
===============
Simple OpenBSD shell scripts for various purposes
| openbsd-scripts
===============
Simple OpenBSD shell scripts for various purposes
### cvsn.sh
This script simple checks out whatever version of the OpenBSD source tree is
specified in the variables of the script.
### build_stable.sh
This script is designed to help you build OpenBSD-stable based on whatever you
have in /usr/src and /usr/xenocara. By default it is set to build GENERIC and
not GENERIC.MP although this can be changed.
### build_release.sh
This script takes what has already been done by build_stable.sh and builds a
full release in /usr/rel.
| Update for explanation of scripts. | Update for explanation of scripts.
| Markdown | isc | brycv/openbsd-scripts | markdown | ## Code Before:
openbsd-scripts
===============
Simple OpenBSD shell scripts for various purposes
## Instruction:
Update for explanation of scripts.
## Code After:
openbsd-scripts
===============
Simple OpenBSD shell scripts for various purposes
### cvsn.sh
This script simple checks out whatever version of the OpenBSD source tree is
specified in the variables of the script.
### build_stable.sh
This script is designed to help you build OpenBSD-stable based on whatever you
have in /usr/src and /usr/xenocara. By default it is set to build GENERIC and
not GENERIC.MP although this can be changed.
### build_release.sh
This script takes what has already been done by build_stable.sh and builds a
full release in /usr/rel.
| openbsd-scripts
===============
Simple OpenBSD shell scripts for various purposes
+
+ ### cvsn.sh
+
+ This script simple checks out whatever version of the OpenBSD source tree is
+ specified in the variables of the script.
+
+ ### build_stable.sh
+
+ This script is designed to help you build OpenBSD-stable based on whatever you
+ have in /usr/src and /usr/xenocara. By default it is set to build GENERIC and
+ not GENERIC.MP although this can be changed.
+
+ ### build_release.sh
+
+ This script takes what has already been done by build_stable.sh and builds a
+ full release in /usr/rel. | 16 | 4 | 16 | 0 |
51a427a5dec9d8444bb49c6b8427574f26a1df85 | src/com/dumbster/smtp/SocketWrapper.java | src/com/dumbster/smtp/SocketWrapper.java | package com.dumbster.smtp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
public class SocketWrapper implements IOSource {
private Socket socket;
public SocketWrapper(Socket socket) {
this.socket = socket;
}
public BufferedReader getInputStream() throws IOException {
return new BufferedReader(
new InputStreamReader(socket.getInputStream()));
}
public PrintWriter getOutputStream() throws IOException {
return new PrintWriter(socket.getOutputStream());
}
public void close() throws IOException {
socket.close();
}
}
| package com.dumbster.smtp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
public class SocketWrapper implements IOSource {
private Socket socket;
public SocketWrapper(Socket socket) throws IOException {
this.socket = socket;
this.socket.setSoTimeout(10000); // protects against hanged clients
}
public BufferedReader getInputStream() throws IOException {
return new BufferedReader(
new InputStreamReader(socket.getInputStream()));
}
public PrintWriter getOutputStream() throws IOException {
return new PrintWriter(socket.getOutputStream());
}
public void close() throws IOException {
socket.close();
}
}
| Set the socket timeout so clients can't DoS. Thank you, vladimirdyuzhev! | Set the socket timeout so clients can't DoS. Thank you, vladimirdyuzhev!
| Java | apache-2.0 | rjo1970/dumbster,petershmenos/dumbster,coopernurse/dumbster,pc1pranav/dumbster,MicroWorld/dumbster | java | ## Code Before:
package com.dumbster.smtp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
public class SocketWrapper implements IOSource {
private Socket socket;
public SocketWrapper(Socket socket) {
this.socket = socket;
}
public BufferedReader getInputStream() throws IOException {
return new BufferedReader(
new InputStreamReader(socket.getInputStream()));
}
public PrintWriter getOutputStream() throws IOException {
return new PrintWriter(socket.getOutputStream());
}
public void close() throws IOException {
socket.close();
}
}
## Instruction:
Set the socket timeout so clients can't DoS. Thank you, vladimirdyuzhev!
## Code After:
package com.dumbster.smtp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
public class SocketWrapper implements IOSource {
private Socket socket;
public SocketWrapper(Socket socket) throws IOException {
this.socket = socket;
this.socket.setSoTimeout(10000); // protects against hanged clients
}
public BufferedReader getInputStream() throws IOException {
return new BufferedReader(
new InputStreamReader(socket.getInputStream()));
}
public PrintWriter getOutputStream() throws IOException {
return new PrintWriter(socket.getOutputStream());
}
public void close() throws IOException {
socket.close();
}
}
| package com.dumbster.smtp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
public class SocketWrapper implements IOSource {
private Socket socket;
- public SocketWrapper(Socket socket) {
+ public SocketWrapper(Socket socket) throws IOException {
? ++++++++++++++++++
this.socket = socket;
+ this.socket.setSoTimeout(10000); // protects against hanged clients
}
public BufferedReader getInputStream() throws IOException {
return new BufferedReader(
new InputStreamReader(socket.getInputStream()));
}
public PrintWriter getOutputStream() throws IOException {
return new PrintWriter(socket.getOutputStream());
}
public void close() throws IOException {
socket.close();
}
} | 3 | 0.103448 | 2 | 1 |
941ccc505df6f40c3506caad92d4cc5272f53037 | FrontEnd/src/main/java/Client.java | FrontEnd/src/main/java/Client.java | import webserver.WebServer;
public class Client {
public static void main(String[] args) {
WebServer ws = new WebServer();
}
}
| import org.slf4j.MDC;
import webserver.WebServer;
public class Client {
public static void main(String[] args) {
MDC.put("pid", getPid());
WebServer ws = new WebServer();
MDC.clear();
}
private static String getPid() {
String processName = java.lang.management.ManagementFactory.getRuntimeMXBean().getName();
return processName.split("@")[0];
}
}
| Use process id in log file names to distinguish between different instances of the same component. | Use process id in log file names to distinguish between different instances of the same component.
| Java | apache-2.0 | IrimieBogdan/DistributedMonitoring,IrimieBogdan/DistributedMonitoring,IrimieBogdan/DistributedMonitoring | java | ## Code Before:
import webserver.WebServer;
public class Client {
public static void main(String[] args) {
WebServer ws = new WebServer();
}
}
## Instruction:
Use process id in log file names to distinguish between different instances of the same component.
## Code After:
import org.slf4j.MDC;
import webserver.WebServer;
public class Client {
public static void main(String[] args) {
MDC.put("pid", getPid());
WebServer ws = new WebServer();
MDC.clear();
}
private static String getPid() {
String processName = java.lang.management.ManagementFactory.getRuntimeMXBean().getName();
return processName.split("@")[0];
}
}
| + import org.slf4j.MDC;
import webserver.WebServer;
public class Client {
public static void main(String[] args) {
+ MDC.put("pid", getPid());
WebServer ws = new WebServer();
+ MDC.clear();
+ }
+
+ private static String getPid() {
+ String processName = java.lang.management.ManagementFactory.getRuntimeMXBean().getName();
+ return processName.split("@")[0];
}
} | 8 | 1 | 8 | 0 |
114f06fb7e332246b2ce455c96f4da32d10ffa53 | app/controllers/HomeController.java | app/controllers/HomeController.java | package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.confighelper;
import views.html.index;
/**
* This controller contains an action to handle HTTP requests
* to the application's home page.
*/
public class HomeController extends Controller {
/**
* Renders the main home page and provides the Gnag client ID used to create the GitHub authentication
* link.
* @return
*/
public Result index() {
return ok(index.render());
}
/**
* Will show the page for generating a Gradle config for a specific project. If the user has not authorized GitHub
* this will redirect to start the authentication flow.
* @return
*/
public Result configHelper() {
if (session(GitHubAuthController.TOKEN_KEY) == null) {
return redirect("/startAuth");
} else {
return ok(confighelper.render(session(GitHubAuthController.TOKEN_KEY)));
}
}
} | package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.confighelper;
import views.html.index;
/**
* This controller contains an action to handle HTTP requests
* to the application's home page.
*/
public class HomeController extends Controller {
/**
* Renders the main home page and provides the Gnag client ID used to create the GitHub authentication
* link.
* @return
*/
public Result index() {
session().remove(GitHubAuthController.TOKEN_KEY);
return ok(index.render());
}
/**
* Will show the page for generating a Gradle config for a specific project. If the user has not authorized GitHub
* this will redirect to start the authentication flow.
* @return
*/
public Result configHelper() {
if (session(GitHubAuthController.TOKEN_KEY) == null) {
return redirect("/startAuth");
} else {
return ok(confighelper.render(session(GitHubAuthController.TOKEN_KEY)));
}
}
} | Remove token from session once back on the index page | Remove token from session once back on the index page
| Java | apache-2.0 | btkelly/gnag-website,btkelly/gnag-website,btkelly/gnag-website | java | ## Code Before:
package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.confighelper;
import views.html.index;
/**
* This controller contains an action to handle HTTP requests
* to the application's home page.
*/
public class HomeController extends Controller {
/**
* Renders the main home page and provides the Gnag client ID used to create the GitHub authentication
* link.
* @return
*/
public Result index() {
return ok(index.render());
}
/**
* Will show the page for generating a Gradle config for a specific project. If the user has not authorized GitHub
* this will redirect to start the authentication flow.
* @return
*/
public Result configHelper() {
if (session(GitHubAuthController.TOKEN_KEY) == null) {
return redirect("/startAuth");
} else {
return ok(confighelper.render(session(GitHubAuthController.TOKEN_KEY)));
}
}
}
## Instruction:
Remove token from session once back on the index page
## Code After:
package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.confighelper;
import views.html.index;
/**
* This controller contains an action to handle HTTP requests
* to the application's home page.
*/
public class HomeController extends Controller {
/**
* Renders the main home page and provides the Gnag client ID used to create the GitHub authentication
* link.
* @return
*/
public Result index() {
session().remove(GitHubAuthController.TOKEN_KEY);
return ok(index.render());
}
/**
* Will show the page for generating a Gradle config for a specific project. If the user has not authorized GitHub
* this will redirect to start the authentication flow.
* @return
*/
public Result configHelper() {
if (session(GitHubAuthController.TOKEN_KEY) == null) {
return redirect("/startAuth");
} else {
return ok(confighelper.render(session(GitHubAuthController.TOKEN_KEY)));
}
}
} | package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.confighelper;
import views.html.index;
/**
* This controller contains an action to handle HTTP requests
* to the application's home page.
*/
public class HomeController extends Controller {
/**
* Renders the main home page and provides the Gnag client ID used to create the GitHub authentication
* link.
* @return
*/
public Result index() {
+ session().remove(GitHubAuthController.TOKEN_KEY);
return ok(index.render());
}
/**
* Will show the page for generating a Gradle config for a specific project. If the user has not authorized GitHub
* this will redirect to start the authentication flow.
* @return
*/
public Result configHelper() {
if (session(GitHubAuthController.TOKEN_KEY) == null) {
return redirect("/startAuth");
} else {
return ok(confighelper.render(session(GitHubAuthController.TOKEN_KEY)));
}
}
} | 1 | 0.027778 | 1 | 0 |
fbc0a9e7818174177a96560a873432be5a53de05 | css/main.css | css/main.css | html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.controls {
position: absolute;
top: 10px;
left: 10px;
z-index: 2;
}
.overlay .clock {
font-family: sans-serif;
font-weight: bold;
fill: rgba(255, 255, 255, 0.5);
stroke: none;
stroke-width: 1px;
}
.route path {
fill: none;
stroke: none;
stroke-width: 3px;
}
.route .bus {
stroke: black;
stroke-width: 1.5px;
}
.route circle {
stroke: none;
stroke-width: 1.5px;
}
| html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.controls {
position: absolute;
top: 10px;
left: 10px;
z-index: 2;
}
.overlay, .overlay svg {
height: 100vh;
width: 100%;
}
.overlay .clock {
font-family: sans-serif;
font-weight: bold;
fill: rgba(255, 255, 255, 0.5);
stroke: none;
stroke-width: 1px;
}
.route path {
fill: none;
stroke: none;
stroke-width: 3px;
}
.route .bus {
stroke: black;
stroke-width: 1.5px;
}
.route circle {
stroke: none;
stroke-width: 1.5px;
}
| Fix google maps overlay height/width bug | Fix google maps overlay height/width bug
| CSS | mit | allait/buslane,allait/buslane | css | ## Code Before:
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.controls {
position: absolute;
top: 10px;
left: 10px;
z-index: 2;
}
.overlay .clock {
font-family: sans-serif;
font-weight: bold;
fill: rgba(255, 255, 255, 0.5);
stroke: none;
stroke-width: 1px;
}
.route path {
fill: none;
stroke: none;
stroke-width: 3px;
}
.route .bus {
stroke: black;
stroke-width: 1.5px;
}
.route circle {
stroke: none;
stroke-width: 1.5px;
}
## Instruction:
Fix google maps overlay height/width bug
## Code After:
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.controls {
position: absolute;
top: 10px;
left: 10px;
z-index: 2;
}
.overlay, .overlay svg {
height: 100vh;
width: 100%;
}
.overlay .clock {
font-family: sans-serif;
font-weight: bold;
fill: rgba(255, 255, 255, 0.5);
stroke: none;
stroke-width: 1px;
}
.route path {
fill: none;
stroke: none;
stroke-width: 3px;
}
.route .bus {
stroke: black;
stroke-width: 1.5px;
}
.route circle {
stroke: none;
stroke-width: 1.5px;
}
| html, body, #map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.controls {
position: absolute;
top: 10px;
left: 10px;
z-index: 2;
+ }
+
+
+ .overlay, .overlay svg {
+ height: 100vh;
+ width: 100%;
}
.overlay .clock {
font-family: sans-serif;
font-weight: bold;
fill: rgba(255, 255, 255, 0.5);
stroke: none;
stroke-width: 1px;
}
.route path {
fill: none;
stroke: none;
stroke-width: 3px;
}
.route .bus {
stroke: black;
stroke-width: 1.5px;
}
.route circle {
stroke: none;
stroke-width: 1.5px;
} | 6 | 0.162162 | 6 | 0 |
44496f53689106a1ba8827f7e8eb928988e94f5c | README.adoc | README.adoc | = Edge
Please see the link:app/README.adoc[app/README.adoc] for building and running the app.
| = Edge
Please see the <<app/README#>> for building and running the app.
| Use xref syntax for document links | Use xref syntax for document links
This works across different output types, and is the preferred form for
interdocument links like this. | AsciiDoc | mit | juxt/edge,juxt/edge | asciidoc | ## Code Before:
= Edge
Please see the link:app/README.adoc[app/README.adoc] for building and running the app.
## Instruction:
Use xref syntax for document links
This works across different output types, and is the preferred form for
interdocument links like this.
## Code After:
= Edge
Please see the <<app/README#>> for building and running the app.
| = Edge
- Please see the link:app/README.adoc[app/README.adoc] for building and running the app.
? ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
+ Please see the <<app/README#>> for building and running the app.
? ^^ ^^^
| 2 | 0.666667 | 1 | 1 |
b8fc6cea709c367ca04b5814e69b586ec8eddfc8 | app/views/application/default/_side_heading.html.slim | app/views/application/default/_side_heading.html.slim | ul.text-light-normal
li
a href="http://article-level-metrics.plos.org/" Article Metrics
li
a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report
| ul.text-light-normal
li
a href="http://articlemetrics.github.io" Article Metrics
li
a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report
| Change Article Metrics link to articlemetrics.github.io | Change Article Metrics link to articlemetrics.github.io
| Slim | mit | mfenner/alm-report,lagotto/alm-report,articlemetrics/alm-report,articlemetrics/alm-report,lagotto/alm-report,mfenner/alm-report,lagotto/alm-report,articlemetrics/alm-report,mfenner/alm-report | slim | ## Code Before:
ul.text-light-normal
li
a href="http://article-level-metrics.plos.org/" Article Metrics
li
a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report
## Instruction:
Change Article Metrics link to articlemetrics.github.io
## Code After:
ul.text-light-normal
li
a href="http://articlemetrics.github.io" Article Metrics
li
a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report
| ul.text-light-normal
li
- a href="http://article-level-metrics.plos.org/" Article Metrics
? ------- ^^ ------
+ a href="http://articlemetrics.github.io" Article Metrics
? ^^^^^^^^
li
a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report | 2 | 0.4 | 1 | 1 |
3ecce93bcda56aa89176b6e4260906ab5ae5e648 | README.md | README.md |
Return a data type from a string representing the data type.
Mostly useful for using with [ndarray](https://github.com/mikolalysenko/ndarray)
where you would like instantiate a typed array of the same `array.dtype`.
## example
```js
var dtype = require('dtype')
var ndarray = require('ndarray')
var arr = ndarray(new Int8Array(32))
// some time later
var newarr = ndarray(new (dtype(arr.dtype)))
```
## API
`dtype(string)` will return the following data types based on the strings given:
Data type | String
--------: | :-----
`Int8Array` | "int8"
`Int16Array` | "int16"
`Int32Array` | "int32"
`Uint8Array` | "uint8"
`Uint16Array` | "uint16"
`Uint32Array` | "uint32"
`Float32Array` | "float32"
`Float64Array` | "float64"
`Array` | "array"
## install
With [npm](https://npmjs.org) do:
```
npm install dtype
```
Use [browserify](http://browserify.org) to `require('dtype')`.
## release history
* 0.1.0 - initial release
## license
Copyright (c) 2013 Kyle Robinson Young<br/>
Licensed under the MIT license.
|
Return a data type from a string representing the data type.
Mostly useful for using with [ndarray](https://github.com/mikolalysenko/ndarray)
where you would like instantiate a typed array of the same `array.dtype`.
## example
```js
var dtype = require('dtype')
var ndarray = require('ndarray')
var arr = ndarray(new Int8Array(32))
// some time later
var newarr = ndarray(new (dtype(arr.dtype)))
```
## API
`dtype(string)` will return the following data types based on the strings given:
Data type | String
--------: | :-----
`Int8Array` | "int8"
`Int16Array` | "int16"
`Int32Array` | "int32"
`Uint8Array` | "uint8"
`Uint16Array` | "uint16"
`Uint32Array` | "uint32"
`Float32Array` | "float32"
`Float64Array` | "float64"
`Array` | "array"
`Uint8ClampedArray` | "uint8_clamped"
`ArrayBuffer` | "generic"
`ArrayBuffer` | "buffer"
`ArrayBuffer` | "data"
`ArrayBuffer` | "dataview"
## install
With [npm](https://npmjs.org) do:
```
npm install dtype
```
Use [browserify](http://browserify.org) to `require('dtype')`.
## release history
* 0.1.0 - initial release
## license
Copyright (c) 2013 Kyle Robinson Young<br/>
Licensed under the MIT license.
| Update docs with new types | Update docs with new types
| Markdown | mit | shama/dtype,mattdesl/dtype | markdown | ## Code Before:
Return a data type from a string representing the data type.
Mostly useful for using with [ndarray](https://github.com/mikolalysenko/ndarray)
where you would like instantiate a typed array of the same `array.dtype`.
## example
```js
var dtype = require('dtype')
var ndarray = require('ndarray')
var arr = ndarray(new Int8Array(32))
// some time later
var newarr = ndarray(new (dtype(arr.dtype)))
```
## API
`dtype(string)` will return the following data types based on the strings given:
Data type | String
--------: | :-----
`Int8Array` | "int8"
`Int16Array` | "int16"
`Int32Array` | "int32"
`Uint8Array` | "uint8"
`Uint16Array` | "uint16"
`Uint32Array` | "uint32"
`Float32Array` | "float32"
`Float64Array` | "float64"
`Array` | "array"
## install
With [npm](https://npmjs.org) do:
```
npm install dtype
```
Use [browserify](http://browserify.org) to `require('dtype')`.
## release history
* 0.1.0 - initial release
## license
Copyright (c) 2013 Kyle Robinson Young<br/>
Licensed under the MIT license.
## Instruction:
Update docs with new types
## Code After:
Return a data type from a string representing the data type.
Mostly useful for using with [ndarray](https://github.com/mikolalysenko/ndarray)
where you would like instantiate a typed array of the same `array.dtype`.
## example
```js
var dtype = require('dtype')
var ndarray = require('ndarray')
var arr = ndarray(new Int8Array(32))
// some time later
var newarr = ndarray(new (dtype(arr.dtype)))
```
## API
`dtype(string)` will return the following data types based on the strings given:
Data type | String
--------: | :-----
`Int8Array` | "int8"
`Int16Array` | "int16"
`Int32Array` | "int32"
`Uint8Array` | "uint8"
`Uint16Array` | "uint16"
`Uint32Array` | "uint32"
`Float32Array` | "float32"
`Float64Array` | "float64"
`Array` | "array"
`Uint8ClampedArray` | "uint8_clamped"
`ArrayBuffer` | "generic"
`ArrayBuffer` | "buffer"
`ArrayBuffer` | "data"
`ArrayBuffer` | "dataview"
## install
With [npm](https://npmjs.org) do:
```
npm install dtype
```
Use [browserify](http://browserify.org) to `require('dtype')`.
## release history
* 0.1.0 - initial release
## license
Copyright (c) 2013 Kyle Robinson Young<br/>
Licensed under the MIT license.
|
Return a data type from a string representing the data type.
Mostly useful for using with [ndarray](https://github.com/mikolalysenko/ndarray)
where you would like instantiate a typed array of the same `array.dtype`.
## example
```js
var dtype = require('dtype')
var ndarray = require('ndarray')
var arr = ndarray(new Int8Array(32))
// some time later
var newarr = ndarray(new (dtype(arr.dtype)))
```
## API
`dtype(string)` will return the following data types based on the strings given:
Data type | String
--------: | :-----
`Int8Array` | "int8"
`Int16Array` | "int16"
`Int32Array` | "int32"
`Uint8Array` | "uint8"
`Uint16Array` | "uint16"
`Uint32Array` | "uint32"
`Float32Array` | "float32"
`Float64Array` | "float64"
`Array` | "array"
+ `Uint8ClampedArray` | "uint8_clamped"
+ `ArrayBuffer` | "generic"
+ `ArrayBuffer` | "buffer"
+ `ArrayBuffer` | "data"
+ `ArrayBuffer` | "dataview"
## install
With [npm](https://npmjs.org) do:
```
npm install dtype
```
Use [browserify](http://browserify.org) to `require('dtype')`.
## release history
* 0.1.0 - initial release
## license
Copyright (c) 2013 Kyle Robinson Young<br/>
Licensed under the MIT license. | 5 | 0.1 | 5 | 0 |
f46716f33f024ed66b6d6f72bfd09616b7b4eb63 | src/main/resources/spring/security/applicationContext-security.xml | src/main/resources/spring/security/applicationContext-security.xml | <?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<sec:http create-session="stateless" authentication-manager-ref="authenticationManager">
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
<sec:http-basic entry-point-ref="authenticationEntryPoint"/>
</sec:http>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider user-service-ref="userService">
<sec:password-encoder ref="passwordEncoder"/>
</sec:authentication-provider>
</sec:authentication-manager>
<bean id="authenticationEntryPoint"
class="org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint">
<property name="realmName" value="IRIDA API"/>
</bean>
</beans>
| <?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<sec:http create-session="stateless" authentication-manager-ref="authenticationManager">
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
<sec:http-basic entry-point-ref="authenticationEntryPoint"/>
</sec:http>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider user-service-ref="userService">
<sec:password-encoder ref="passwordEncoder"/>
</sec:authentication-provider>
</sec:authentication-manager>
<bean id="authenticationEntryPoint"
class="ca.corefacility.bioinformatics.irida.web.spring.authentication.BasicAuthenticationEntryPoint"/>
</beans>
| Use the authentication entry point that we have created. | Use the authentication entry point that we have created.
| XML | apache-2.0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<sec:http create-session="stateless" authentication-manager-ref="authenticationManager">
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
<sec:http-basic entry-point-ref="authenticationEntryPoint"/>
</sec:http>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider user-service-ref="userService">
<sec:password-encoder ref="passwordEncoder"/>
</sec:authentication-provider>
</sec:authentication-manager>
<bean id="authenticationEntryPoint"
class="org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint">
<property name="realmName" value="IRIDA API"/>
</bean>
</beans>
## Instruction:
Use the authentication entry point that we have created.
## Code After:
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<sec:http create-session="stateless" authentication-manager-ref="authenticationManager">
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
<sec:http-basic entry-point-ref="authenticationEntryPoint"/>
</sec:http>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider user-service-ref="userService">
<sec:password-encoder ref="passwordEncoder"/>
</sec:authentication-provider>
</sec:authentication-manager>
<bean id="authenticationEntryPoint"
class="ca.corefacility.bioinformatics.irida.web.spring.authentication.BasicAuthenticationEntryPoint"/>
</beans>
| <?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<sec:http create-session="stateless" authentication-manager-ref="authenticationManager">
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
<sec:http-basic entry-point-ref="authenticationEntryPoint"/>
</sec:http>
+
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider user-service-ref="userService">
<sec:password-encoder ref="passwordEncoder"/>
</sec:authentication-provider>
</sec:authentication-manager>
<bean id="authenticationEntryPoint"
+ class="ca.corefacility.bioinformatics.irida.web.spring.authentication.BasicAuthenticationEntryPoint"/>
+
- class="org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint">
- <property name="realmName" value="IRIDA API"/>
- </bean>
</beans> | 6 | 0.25 | 3 | 3 |
ffb497ac013b005aff799cb4523e9b772519636b | connectors/amazon-alexa.js | connectors/amazon-alexa.js | 'use strict';
Connector.playerSelector = '#d-content';
Connector.getArtistTrack = () => {
if (isPlayingLiveRadio()) {
let songTitle = $('.d-queue-info .song-title').text();
return Util.splitArtistTrack(songTitle);
}
let artist = $('#d-info-text .d-sub-text-1').text();
let track = $('#d-info-text .d-main-text').text();
return { artist, track };
};
Connector.albumSelector = '#d-info-text .d-sub-text-2';
Connector.isPlaying = () => $('#d-primary-control .play').size() === 0;
function isPlayingLiveRadio() {
return $('#d-secondary-control-left .disabled').size() === 1 &&
$('#d-secondary-control-right .disabled').size() === 1;
}
| 'use strict';
Connector.playerSelector = '#d-content';
Connector.remainingTimeSelector = '.d-np-time-display.remaining-time';
Connector.currentTimeSelector = '.d-np-time-display.elapsed-time';
Connector.getDuration = () => {
let elapsed = Util.stringToSeconds($(Connector.currentTimeSelector).text());
let remaining = -Util.stringToSeconds($(Connector.remainingTimeSelector).text());
return (remaining + elapsed);
};
Connector.getRemainingTime = () => {
let remaining = -Util.stringToSeconds($(Connector.remainingTimeSelector).text());
return remaining;
};
Connector.getArtistTrack = () => {
if (isPlayingLiveRadio()) {
let songTitle = $('.d-queue-info .song-title').text();
return Util.splitArtistTrack(songTitle);
}
let artist = $('#d-info-text .d-sub-text-1').text();
let track = $('#d-info-text .d-main-text').text();
return { artist, track };
};
Connector.albumSelector = '#d-info-text .d-sub-text-2';
Connector.isPlaying = () => {
let songProgress = $('.d-np-progress-slider .d-slider-container .d-slider-track').attr('aria-valuenow');
let duration = Connector.getDuration();
// The app doesn't update the progress bar or time remaining straight away (and starts counting down from an hour). This is a workaround to avoid detecting an incorrect duration time.
if (duration > 3600 || songProgress == 100) {
return false;
}
return $('#d-primary-control .play').size() === 0;
}
function isPlayingLiveRadio() {
return $('#d-secondary-control-left .disabled').size() === 1 &&
$('#d-secondary-control-right .disabled').size() === 1;
}
| Add duration parsing to Amazon Alexa connector | Add duration parsing to Amazon Alexa connector
| JavaScript | mit | david-sabata/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,carpet-berlin/web-scrobbler,galeksandrp/web-scrobbler,galeksandrp/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,alexesprit/web-scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler,alexesprit/web-scrobbler | javascript | ## Code Before:
'use strict';
Connector.playerSelector = '#d-content';
Connector.getArtistTrack = () => {
if (isPlayingLiveRadio()) {
let songTitle = $('.d-queue-info .song-title').text();
return Util.splitArtistTrack(songTitle);
}
let artist = $('#d-info-text .d-sub-text-1').text();
let track = $('#d-info-text .d-main-text').text();
return { artist, track };
};
Connector.albumSelector = '#d-info-text .d-sub-text-2';
Connector.isPlaying = () => $('#d-primary-control .play').size() === 0;
function isPlayingLiveRadio() {
return $('#d-secondary-control-left .disabled').size() === 1 &&
$('#d-secondary-control-right .disabled').size() === 1;
}
## Instruction:
Add duration parsing to Amazon Alexa connector
## Code After:
'use strict';
Connector.playerSelector = '#d-content';
Connector.remainingTimeSelector = '.d-np-time-display.remaining-time';
Connector.currentTimeSelector = '.d-np-time-display.elapsed-time';
Connector.getDuration = () => {
let elapsed = Util.stringToSeconds($(Connector.currentTimeSelector).text());
let remaining = -Util.stringToSeconds($(Connector.remainingTimeSelector).text());
return (remaining + elapsed);
};
Connector.getRemainingTime = () => {
let remaining = -Util.stringToSeconds($(Connector.remainingTimeSelector).text());
return remaining;
};
Connector.getArtistTrack = () => {
if (isPlayingLiveRadio()) {
let songTitle = $('.d-queue-info .song-title').text();
return Util.splitArtistTrack(songTitle);
}
let artist = $('#d-info-text .d-sub-text-1').text();
let track = $('#d-info-text .d-main-text').text();
return { artist, track };
};
Connector.albumSelector = '#d-info-text .d-sub-text-2';
Connector.isPlaying = () => {
let songProgress = $('.d-np-progress-slider .d-slider-container .d-slider-track').attr('aria-valuenow');
let duration = Connector.getDuration();
// The app doesn't update the progress bar or time remaining straight away (and starts counting down from an hour). This is a workaround to avoid detecting an incorrect duration time.
if (duration > 3600 || songProgress == 100) {
return false;
}
return $('#d-primary-control .play').size() === 0;
}
function isPlayingLiveRadio() {
return $('#d-secondary-control-left .disabled').size() === 1 &&
$('#d-secondary-control-right .disabled').size() === 1;
}
| 'use strict';
Connector.playerSelector = '#d-content';
+ Connector.remainingTimeSelector = '.d-np-time-display.remaining-time';
+ Connector.currentTimeSelector = '.d-np-time-display.elapsed-time';
+
+ Connector.getDuration = () => {
+ let elapsed = Util.stringToSeconds($(Connector.currentTimeSelector).text());
+ let remaining = -Util.stringToSeconds($(Connector.remainingTimeSelector).text());
+ return (remaining + elapsed);
+ };
+
+ Connector.getRemainingTime = () => {
+ let remaining = -Util.stringToSeconds($(Connector.remainingTimeSelector).text());
+ return remaining;
+ };
Connector.getArtistTrack = () => {
if (isPlayingLiveRadio()) {
let songTitle = $('.d-queue-info .song-title').text();
return Util.splitArtistTrack(songTitle);
}
let artist = $('#d-info-text .d-sub-text-1').text();
let track = $('#d-info-text .d-main-text').text();
return { artist, track };
};
Connector.albumSelector = '#d-info-text .d-sub-text-2';
- Connector.isPlaying = () => $('#d-primary-control .play').size() === 0;
+ Connector.isPlaying = () => {
+ let songProgress = $('.d-np-progress-slider .d-slider-container .d-slider-track').attr('aria-valuenow');
+ let duration = Connector.getDuration();
+
+ // The app doesn't update the progress bar or time remaining straight away (and starts counting down from an hour). This is a workaround to avoid detecting an incorrect duration time.
+ if (duration > 3600 || songProgress == 100) {
+ return false;
+ }
+
+ return $('#d-primary-control .play').size() === 0;
+ }
function isPlayingLiveRadio() {
return $('#d-secondary-control-left .disabled').size() === 1 &&
$('#d-secondary-control-right .disabled').size() === 1;
} | 25 | 1.086957 | 24 | 1 |
85ed1e760869c0a3dc05580216cd242811249cb1 | lib/instana/collectors.rb | lib/instana/collectors.rb | require 'timers'
require 'instana/collectors/gc'
require 'instana/collectors/heap'
require 'instana/collectors/memory'
require 'instana/collectors/thread'
module Instana
module Collector
class << self
attr_accessor :interval
end
end
end
Instana.pry!
if ENV.key?('INSTANA_GEM_DEV')
::Instana::Collector.interval = 5
else
::Instana::Collector.interval = 1
end
Instana.collectors << ::Instana::Collector::GC.new
Instana.collectors << ::Instana::Collector::Heap.new
Instana.collectors << ::Instana::Collector::Memory.new
Instana.collectors << ::Instana::Collector::Thread.new
Thread.new do
timers = Timers::Group.new
timers.every(::Instana::Collector.interval) {
::Instana.collectors.each do |c|
c.collect
end
# Report all the collected goodies
Instana.agent.report_entity_data
}
loop { timers.wait }
end
| require 'timers'
require 'instana/collectors/gc'
require 'instana/collectors/heap'
require 'instana/collectors/memory'
require 'instana/collectors/thread'
module Instana
module Collector
class << self
attr_accessor :interval
end
end
end
if ENV.key?('INSTANA_GEM_DEV')
::Instana::Collector.interval = 5
else
::Instana::Collector.interval = 1
end
::Instana.collectors << ::Instana::Collector::GC.new
::Instana.collectors << ::Instana::Collector::Heap.new
::Instana.collectors << ::Instana::Collector::Memory.new
::Instana.collectors << ::Instana::Collector::Thread.new
::Thread.new do
timers = ::Timers::Group.new
timers.every(::Instana::Collector.interval) {
::Instana.collectors.each do |c|
c.collect
end
# Report all the collected goodies
::Instana.agent.report_entity_data
}
loop { timers.wait }
end
| Use fully qualified namespace calls. | Use fully qualified namespace calls.
| Ruby | mit | nguyenquangminh0711/ruby-sensor,nguyenquangminh0711/ruby-sensor,nguyenquangminh0711/ruby-sensor | ruby | ## Code Before:
require 'timers'
require 'instana/collectors/gc'
require 'instana/collectors/heap'
require 'instana/collectors/memory'
require 'instana/collectors/thread'
module Instana
module Collector
class << self
attr_accessor :interval
end
end
end
Instana.pry!
if ENV.key?('INSTANA_GEM_DEV')
::Instana::Collector.interval = 5
else
::Instana::Collector.interval = 1
end
Instana.collectors << ::Instana::Collector::GC.new
Instana.collectors << ::Instana::Collector::Heap.new
Instana.collectors << ::Instana::Collector::Memory.new
Instana.collectors << ::Instana::Collector::Thread.new
Thread.new do
timers = Timers::Group.new
timers.every(::Instana::Collector.interval) {
::Instana.collectors.each do |c|
c.collect
end
# Report all the collected goodies
Instana.agent.report_entity_data
}
loop { timers.wait }
end
## Instruction:
Use fully qualified namespace calls.
## Code After:
require 'timers'
require 'instana/collectors/gc'
require 'instana/collectors/heap'
require 'instana/collectors/memory'
require 'instana/collectors/thread'
module Instana
module Collector
class << self
attr_accessor :interval
end
end
end
if ENV.key?('INSTANA_GEM_DEV')
::Instana::Collector.interval = 5
else
::Instana::Collector.interval = 1
end
::Instana.collectors << ::Instana::Collector::GC.new
::Instana.collectors << ::Instana::Collector::Heap.new
::Instana.collectors << ::Instana::Collector::Memory.new
::Instana.collectors << ::Instana::Collector::Thread.new
::Thread.new do
timers = ::Timers::Group.new
timers.every(::Instana::Collector.interval) {
::Instana.collectors.each do |c|
c.collect
end
# Report all the collected goodies
::Instana.agent.report_entity_data
}
loop { timers.wait }
end
| require 'timers'
require 'instana/collectors/gc'
require 'instana/collectors/heap'
require 'instana/collectors/memory'
require 'instana/collectors/thread'
module Instana
module Collector
class << self
attr_accessor :interval
end
end
end
- Instana.pry!
if ENV.key?('INSTANA_GEM_DEV')
::Instana::Collector.interval = 5
else
::Instana::Collector.interval = 1
end
- Instana.collectors << ::Instana::Collector::GC.new
+ ::Instana.collectors << ::Instana::Collector::GC.new
? ++
- Instana.collectors << ::Instana::Collector::Heap.new
+ ::Instana.collectors << ::Instana::Collector::Heap.new
? ++
- Instana.collectors << ::Instana::Collector::Memory.new
+ ::Instana.collectors << ::Instana::Collector::Memory.new
? ++
- Instana.collectors << ::Instana::Collector::Thread.new
+ ::Instana.collectors << ::Instana::Collector::Thread.new
? ++
- Thread.new do
+ ::Thread.new do
? ++
- timers = Timers::Group.new
+ timers = ::Timers::Group.new
? ++
timers.every(::Instana::Collector.interval) {
::Instana.collectors.each do |c|
c.collect
end
# Report all the collected goodies
- Instana.agent.report_entity_data
+ ::Instana.agent.report_entity_data
? ++
}
loop { timers.wait }
end | 15 | 0.394737 | 7 | 8 |
a8f945f511b5239bc9ad6535355e063cd050d414 | tools/generate-token.sh | tools/generate-token.sh |
cat /dev/urandom | LC_CTYPE=C tr -cd 'a-zA-Z0-9' | head -c 64
echo '' # Add a newline
|
cat /dev/urandom | LC_CTYPE=C tr -cd 'a-z0-9' | tr -d '01oil' | head -c 64
echo '' # Add a newline
| Remove ambiguous characters from tokens | Remove ambiguous characters from tokens
These are handled by humans, and occasionally humans use typefaces
that do not distinguish between certain characters very well.
This is the reason that I and Q are excluded from UK vehicle
registration plates.
Remove the characters zero, one, oh, eye and ell from tokens. Make
them all lowercase, because there's no good reason not to.
| Shell | mit | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | shell | ## Code Before:
cat /dev/urandom | LC_CTYPE=C tr -cd 'a-zA-Z0-9' | head -c 64
echo '' # Add a newline
## Instruction:
Remove ambiguous characters from tokens
These are handled by humans, and occasionally humans use typefaces
that do not distinguish between certain characters very well.
This is the reason that I and Q are excluded from UK vehicle
registration plates.
Remove the characters zero, one, oh, eye and ell from tokens. Make
them all lowercase, because there's no good reason not to.
## Code After:
cat /dev/urandom | LC_CTYPE=C tr -cd 'a-z0-9' | tr -d '01oil' | head -c 64
echo '' # Add a newline
|
- cat /dev/urandom | LC_CTYPE=C tr -cd 'a-zA-Z0-9' | head -c 64
? ---
+ cat /dev/urandom | LC_CTYPE=C tr -cd 'a-z0-9' | tr -d '01oil' | head -c 64
? ++++++++++++++++
echo '' # Add a newline | 2 | 0.5 | 1 | 1 |
61b8f0103b5cef524567e9b7de8530ba18369e05 | less/components/modals.less | less/components/modals.less | .modal-backdrop {
background: rgba(0, 0, 0, 0.55);
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: @gb-zindex-modal;
}
.modalSize(@size) {
width: @size;
margin: 30px auto;
}
.modal {
border: 1px solid @gb-modal-border;
border-radius: @gb-modal-radius;
background: @gb-modal-background;
.box-shadow(@gb-modal-shadow);
.modal-heading {
padding: @gb-modal-padding;
border-bottom: 1px solid @gb-modal-innerborder;
h4 {
margin: 0px;
}
}
.modal-body {
padding: @gb-modal-padding;
}
.modal-footer {
border-top: 1px solid @gb-modal-innerborder;
padding: @gb-modal-padding;
text-align: right;
}
.modalSize(@gb-modal-size-medium);
&.modal-sm {
.modalSize(@gb-modal-size-small);
}
&.modal-lg {
.modalSize(@gb-modal-size-large);
}
} | .modal-backdrop {
background: rgba(0, 0, 0, 0.55);
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: @gb-zindex-modal;
}
.modalSize(@size) {
width: @size;
margin: 30px auto;
}
.modal {
border: 1px solid @gb-modal-border;
border-radius: @gb-modal-radius;
background: @gb-modal-background;
.box-shadow(@gb-modal-shadow);
.modal-heading {
padding: @gb-modal-padding;
border-bottom: 1px solid @gb-modal-innerborder;
h4 {
margin: 0px;
}
}
.modal-body {
padding: @gb-modal-padding;
}
.modal-footer {
border-top: 1px solid @gb-modal-innerborder;
padding: @gb-modal-padding;
text-align: right;
.btn+.btn {
margin-bottom: 0;
margin-left: 5px;
}
}
.modalSize(@gb-modal-size-medium);
&.modal-sm {
.modalSize(@gb-modal-size-small);
}
&.modal-lg {
.modalSize(@gb-modal-size-large);
}
} | Handle buttons on modal footer | Handle buttons on modal footer
| Less | apache-2.0 | GitbookIO/styleguide,rlugojr/styleguide,GitbookIO/styleguide,rlugojr/styleguide | less | ## Code Before:
.modal-backdrop {
background: rgba(0, 0, 0, 0.55);
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: @gb-zindex-modal;
}
.modalSize(@size) {
width: @size;
margin: 30px auto;
}
.modal {
border: 1px solid @gb-modal-border;
border-radius: @gb-modal-radius;
background: @gb-modal-background;
.box-shadow(@gb-modal-shadow);
.modal-heading {
padding: @gb-modal-padding;
border-bottom: 1px solid @gb-modal-innerborder;
h4 {
margin: 0px;
}
}
.modal-body {
padding: @gb-modal-padding;
}
.modal-footer {
border-top: 1px solid @gb-modal-innerborder;
padding: @gb-modal-padding;
text-align: right;
}
.modalSize(@gb-modal-size-medium);
&.modal-sm {
.modalSize(@gb-modal-size-small);
}
&.modal-lg {
.modalSize(@gb-modal-size-large);
}
}
## Instruction:
Handle buttons on modal footer
## Code After:
.modal-backdrop {
background: rgba(0, 0, 0, 0.55);
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: @gb-zindex-modal;
}
.modalSize(@size) {
width: @size;
margin: 30px auto;
}
.modal {
border: 1px solid @gb-modal-border;
border-radius: @gb-modal-radius;
background: @gb-modal-background;
.box-shadow(@gb-modal-shadow);
.modal-heading {
padding: @gb-modal-padding;
border-bottom: 1px solid @gb-modal-innerborder;
h4 {
margin: 0px;
}
}
.modal-body {
padding: @gb-modal-padding;
}
.modal-footer {
border-top: 1px solid @gb-modal-innerborder;
padding: @gb-modal-padding;
text-align: right;
.btn+.btn {
margin-bottom: 0;
margin-left: 5px;
}
}
.modalSize(@gb-modal-size-medium);
&.modal-sm {
.modalSize(@gb-modal-size-small);
}
&.modal-lg {
.modalSize(@gb-modal-size-large);
}
} | .modal-backdrop {
background: rgba(0, 0, 0, 0.55);
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
z-index: @gb-zindex-modal;
}
.modalSize(@size) {
width: @size;
margin: 30px auto;
}
.modal {
border: 1px solid @gb-modal-border;
border-radius: @gb-modal-radius;
background: @gb-modal-background;
.box-shadow(@gb-modal-shadow);
.modal-heading {
padding: @gb-modal-padding;
border-bottom: 1px solid @gb-modal-innerborder;
h4 {
margin: 0px;
}
}
.modal-body {
padding: @gb-modal-padding;
}
.modal-footer {
border-top: 1px solid @gb-modal-innerborder;
padding: @gb-modal-padding;
text-align: right;
+
+ .btn+.btn {
+ margin-bottom: 0;
+ margin-left: 5px;
+ }
}
.modalSize(@gb-modal-size-medium);
&.modal-sm {
.modalSize(@gb-modal-size-small);
}
&.modal-lg {
.modalSize(@gb-modal-size-large);
}
} | 5 | 0.1 | 5 | 0 |
c98a9834653f190158a737b820ea816df7c2b491 | src/main/java/com/mooo/aimmac23/node/VideoRecordController.java | src/main/java/com/mooo/aimmac23/node/VideoRecordController.java | package com.mooo.aimmac23.node;
import java.io.File;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class VideoRecordController {
private ThreadPoolExecutor executor;
RecordVideoCallable currentCallable;
private Future<File> currentFuture;
public VideoRecordController() {
executor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(5));
executor.setThreadFactory(new RecorderThreadFactory());
executor.prestartAllCoreThreads();
}
public void startRecording() {
if(currentCallable != null) {
throw new IllegalStateException("Video recording currently in progress, cannot record again");
}
currentCallable = new RecordVideoCallable();
currentFuture = executor.submit(currentCallable);
}
public File stopRecording() throws Exception {
if(currentCallable == null) {
throw new IllegalStateException("Video recording not currently in progress, cannot stop!");
}
currentCallable.stopRecording();
currentCallable = null;
return currentFuture.get();
}
class RecorderThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
thread.setName("VideoRecordingThread");
return thread;
}
}
}
| package com.mooo.aimmac23.node;
import java.io.File;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class VideoRecordController {
private ThreadPoolExecutor executor;
RecordVideoCallable currentCallable;
private Future<File> currentFuture;
public VideoRecordController() {
executor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(5));
executor.setThreadFactory(new RecorderThreadFactory());
executor.prestartAllCoreThreads();
}
public void startRecording() {
if(currentCallable != null) {
throw new IllegalStateException("Video recording currently in progress, cannot record again");
}
currentCallable = new RecordVideoCallable();
currentFuture = executor.submit(currentCallable);
}
public File stopRecording() throws Exception {
if(currentCallable == null) {
throw new IllegalStateException("Video recording not currently in progress, cannot stop!");
}
// sleep for one second, to make sure we catch the end of the test
Thread.sleep(1000);
currentCallable.stopRecording();
currentCallable = null;
return currentFuture.get();
}
class RecorderThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
thread.setName("VideoRecordingThread");
return thread;
}
}
}
| Add a 1 second sleep before we stop recording, so we can hopefully see the browser closing | Add a 1 second sleep before we stop recording, so we can hopefully see the browser closing
| Java | mit | saikrishna321/selenium-video-node,saikrishna321/selenium-video-node,saikrishna321/selenium-video-node | java | ## Code Before:
package com.mooo.aimmac23.node;
import java.io.File;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class VideoRecordController {
private ThreadPoolExecutor executor;
RecordVideoCallable currentCallable;
private Future<File> currentFuture;
public VideoRecordController() {
executor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(5));
executor.setThreadFactory(new RecorderThreadFactory());
executor.prestartAllCoreThreads();
}
public void startRecording() {
if(currentCallable != null) {
throw new IllegalStateException("Video recording currently in progress, cannot record again");
}
currentCallable = new RecordVideoCallable();
currentFuture = executor.submit(currentCallable);
}
public File stopRecording() throws Exception {
if(currentCallable == null) {
throw new IllegalStateException("Video recording not currently in progress, cannot stop!");
}
currentCallable.stopRecording();
currentCallable = null;
return currentFuture.get();
}
class RecorderThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
thread.setName("VideoRecordingThread");
return thread;
}
}
}
## Instruction:
Add a 1 second sleep before we stop recording, so we can hopefully see the browser closing
## Code After:
package com.mooo.aimmac23.node;
import java.io.File;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class VideoRecordController {
private ThreadPoolExecutor executor;
RecordVideoCallable currentCallable;
private Future<File> currentFuture;
public VideoRecordController() {
executor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(5));
executor.setThreadFactory(new RecorderThreadFactory());
executor.prestartAllCoreThreads();
}
public void startRecording() {
if(currentCallable != null) {
throw new IllegalStateException("Video recording currently in progress, cannot record again");
}
currentCallable = new RecordVideoCallable();
currentFuture = executor.submit(currentCallable);
}
public File stopRecording() throws Exception {
if(currentCallable == null) {
throw new IllegalStateException("Video recording not currently in progress, cannot stop!");
}
// sleep for one second, to make sure we catch the end of the test
Thread.sleep(1000);
currentCallable.stopRecording();
currentCallable = null;
return currentFuture.get();
}
class RecorderThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
thread.setName("VideoRecordingThread");
return thread;
}
}
}
| package com.mooo.aimmac23.node;
import java.io.File;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class VideoRecordController {
private ThreadPoolExecutor executor;
RecordVideoCallable currentCallable;
private Future<File> currentFuture;
public VideoRecordController() {
executor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(5));
executor.setThreadFactory(new RecorderThreadFactory());
executor.prestartAllCoreThreads();
}
public void startRecording() {
if(currentCallable != null) {
throw new IllegalStateException("Video recording currently in progress, cannot record again");
}
currentCallable = new RecordVideoCallable();
currentFuture = executor.submit(currentCallable);
}
public File stopRecording() throws Exception {
if(currentCallable == null) {
throw new IllegalStateException("Video recording not currently in progress, cannot stop!");
}
+
+ // sleep for one second, to make sure we catch the end of the test
+ Thread.sleep(1000);
+
currentCallable.stopRecording();
currentCallable = null;
return currentFuture.get();
}
class RecorderThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
thread.setName("VideoRecordingThread");
return thread;
}
}
} | 4 | 0.083333 | 4 | 0 |
d89a6ca6d80bf31edc0f85a6e362a66ea1857745 | jumpstart/templates/jumpstart/wait.html | jumpstart/templates/jumpstart/wait.html | {% extends "jumpstart/base.html" %}
{% block content %}
<div id="wait">
<h2>Now configuring your PANDA...</h2>
<p>Please enjoy some Rush while we set things up for you!</p>
<iframe width="420" height="315" src="http://www.youtube.com/embed/KNZru4JG_Uo" frameborder="0" allowfullscreen></iframe>
<div class="checking">This page will automatically update when your PANDA is ready.</div>
<div class="ready">
<h2>Your PANDA is ready!<br />
<a href="javascript:location.reload(true)">Go to your PANDA »</a>
</h2>
Or, <a href="/admin/settings">visit the admin settings page to configure email and set a domain name</a> (you can always do this later).
</div>
<script type="text/javascript">
var timer_id = null;
window.check_finished = function() {
$.getJSON("/api/1.0/", null, function() {
$(".checking").hide();
$(".ready").show();
clearInterval(timer_id);
});
}
timer_id = setInterval(check_finished, 2500);
</script>
</div>
{% endblock %}
| {% extends "jumpstart/base.html" %}
{% block content %}
<div id="wait">
<h2>Now configuring your PANDA...</h2>
<p>Please enjoy some Rush while we set things up for you!</p>
<iframe width="420" height="315" src="http://www.youtube.com/embed/KNZru4JG_Uo" frameborder="0" allowfullscreen></iframe>
<div class="checking">This page will automatically update when your PANDA is ready.</div>
<div class="ready">
<h2>Your PANDA is ready!<br />
<a href="/">Go to your PANDA »</a>
</h2>
Or, <a href="/admin/settings">visit the admin settings page to configure email and set a domain name</a> (you can always do this later).
</div>
<script type="text/javascript">
var timer_id = null;
window.check_finished = function() {
$.getJSON("/api/1.0/", null, function() {
$(".checking").hide();
$(".ready").show();
clearInterval(timer_id);
});
}
timer_id = setInterval(check_finished, 2500);
</script>
</div>
{% endblock %}
| Fix go to PANDA link. | Fix go to PANDA link.
| HTML | mit | PalmBeachPost/panda,ibrahimcesar/panda,PalmBeachPost/panda,newsapps/panda,datadesk/panda,datadesk/panda,NUKnightLab/panda,NUKnightLab/panda,ibrahimcesar/panda,ibrahimcesar/panda,pandaproject/panda,pandaproject/panda,NUKnightLab/panda,newsapps/panda,PalmBeachPost/panda,newsapps/panda,datadesk/panda,NUKnightLab/panda,newsapps/panda,PalmBeachPost/panda,datadesk/panda,pandaproject/panda,pandaproject/panda,datadesk/panda,pandaproject/panda,ibrahimcesar/panda,PalmBeachPost/panda,ibrahimcesar/panda | html | ## Code Before:
{% extends "jumpstart/base.html" %}
{% block content %}
<div id="wait">
<h2>Now configuring your PANDA...</h2>
<p>Please enjoy some Rush while we set things up for you!</p>
<iframe width="420" height="315" src="http://www.youtube.com/embed/KNZru4JG_Uo" frameborder="0" allowfullscreen></iframe>
<div class="checking">This page will automatically update when your PANDA is ready.</div>
<div class="ready">
<h2>Your PANDA is ready!<br />
<a href="javascript:location.reload(true)">Go to your PANDA »</a>
</h2>
Or, <a href="/admin/settings">visit the admin settings page to configure email and set a domain name</a> (you can always do this later).
</div>
<script type="text/javascript">
var timer_id = null;
window.check_finished = function() {
$.getJSON("/api/1.0/", null, function() {
$(".checking").hide();
$(".ready").show();
clearInterval(timer_id);
});
}
timer_id = setInterval(check_finished, 2500);
</script>
</div>
{% endblock %}
## Instruction:
Fix go to PANDA link.
## Code After:
{% extends "jumpstart/base.html" %}
{% block content %}
<div id="wait">
<h2>Now configuring your PANDA...</h2>
<p>Please enjoy some Rush while we set things up for you!</p>
<iframe width="420" height="315" src="http://www.youtube.com/embed/KNZru4JG_Uo" frameborder="0" allowfullscreen></iframe>
<div class="checking">This page will automatically update when your PANDA is ready.</div>
<div class="ready">
<h2>Your PANDA is ready!<br />
<a href="/">Go to your PANDA »</a>
</h2>
Or, <a href="/admin/settings">visit the admin settings page to configure email and set a domain name</a> (you can always do this later).
</div>
<script type="text/javascript">
var timer_id = null;
window.check_finished = function() {
$.getJSON("/api/1.0/", null, function() {
$(".checking").hide();
$(".ready").show();
clearInterval(timer_id);
});
}
timer_id = setInterval(check_finished, 2500);
</script>
</div>
{% endblock %}
| {% extends "jumpstart/base.html" %}
{% block content %}
<div id="wait">
<h2>Now configuring your PANDA...</h2>
<p>Please enjoy some Rush while we set things up for you!</p>
<iframe width="420" height="315" src="http://www.youtube.com/embed/KNZru4JG_Uo" frameborder="0" allowfullscreen></iframe>
<div class="checking">This page will automatically update when your PANDA is ready.</div>
<div class="ready">
<h2>Your PANDA is ready!<br />
- <a href="javascript:location.reload(true)">Go to your PANDA »</a>
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ <a href="/">Go to your PANDA »</a>
? ^
</h2>
Or, <a href="/admin/settings">visit the admin settings page to configure email and set a domain name</a> (you can always do this later).
</div>
<script type="text/javascript">
var timer_id = null;
window.check_finished = function() {
$.getJSON("/api/1.0/", null, function() {
$(".checking").hide();
$(".ready").show();
clearInterval(timer_id);
});
}
timer_id = setInterval(check_finished, 2500);
</script>
</div>
{% endblock %} | 2 | 0.060606 | 1 | 1 |
2ce934b338e1fce7ed62f37d7e049b40ec62a1c0 | source/chip/STM32/STM32F1/Tupfile.lua | source/chip/STM32/STM32F1/Tupfile.lua | --
-- file: Tupfile.lua
--
-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
--
-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
-- distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
if CONFIG_CHIP_STM32F1 == "y" then
local stm32f1LdSh = "STM32F1.ld.sh"
local ldscriptOutputs = {LDSCRIPT, filenameToGroup(LDSCRIPT)}
tup.rule(DISTORTOS_CONFIGURATION_MK, "^ SH " .. stm32f1LdSh .. "^ ./" .. stm32f1LdSh .. " \"%f\" > \"%o\"",
ldscriptOutputs)
CFLAGS += STANDARD_INCLUDES
CXXFLAGS += STANDARD_INCLUDES
CXXFLAGS += ARCHITECTURE_INCLUDES
CXXFLAGS += CHIP_INCLUDES
tup.include(DISTORTOS_TOP .. "compile.lua")
end -- if CONFIG_CHIP_STM32F1 == "y" then
| --
-- file: Tupfile.lua
--
-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
--
-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
-- distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
if CONFIG_CHIP_STM32F1 == "y" then
local ldScriptGenerator = TOP .. "source/architecture/ARM/ARMv7-M/ARMv7-M.ld.sh"
local ldscriptOutputs = {LDSCRIPT, filenameToGroup(LDSCRIPT)}
tup.rule("^ SH " .. ldScriptGenerator .. "^ ./" .. ldScriptGenerator .. " \"" .. CONFIG_CHIP .. "\" \"" ..
CONFIG_CHIP_STM32F1_FLASH_ADDRESS .. "," .. CONFIG_CHIP_STM32F1_FLASH_SIZE .. "\" \"" ..
CONFIG_CHIP_STM32F1_SRAM_ADDRESS .. "," .. CONFIG_CHIP_STM32F1_SRAM_SIZE .. "\" \"" ..
CONFIG_ARCHITECTURE_ARMV7_M_MAIN_STACK_SIZE .. "\" \"" .. CONFIG_MAIN_THREAD_STACK_SIZE .. "\" > \"%o\"",
ldscriptOutputs)
CFLAGS += STANDARD_INCLUDES
CXXFLAGS += STANDARD_INCLUDES
CXXFLAGS += ARCHITECTURE_INCLUDES
CXXFLAGS += CHIP_INCLUDES
tup.include(DISTORTOS_TOP .. "compile.lua")
end -- if CONFIG_CHIP_STM32F1 == "y" then
| Use ARMv7-M.ld.sh linker script generator for STM32F1 in tup build | Use ARMv7-M.ld.sh linker script generator for STM32F1 in tup build | Lua | mpl-2.0 | jasmin-j/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,jasmin-j/distortos,jasmin-j/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,jasmin-j/distortos,jasmin-j/distortos | lua | ## Code Before:
--
-- file: Tupfile.lua
--
-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
--
-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
-- distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
if CONFIG_CHIP_STM32F1 == "y" then
local stm32f1LdSh = "STM32F1.ld.sh"
local ldscriptOutputs = {LDSCRIPT, filenameToGroup(LDSCRIPT)}
tup.rule(DISTORTOS_CONFIGURATION_MK, "^ SH " .. stm32f1LdSh .. "^ ./" .. stm32f1LdSh .. " \"%f\" > \"%o\"",
ldscriptOutputs)
CFLAGS += STANDARD_INCLUDES
CXXFLAGS += STANDARD_INCLUDES
CXXFLAGS += ARCHITECTURE_INCLUDES
CXXFLAGS += CHIP_INCLUDES
tup.include(DISTORTOS_TOP .. "compile.lua")
end -- if CONFIG_CHIP_STM32F1 == "y" then
## Instruction:
Use ARMv7-M.ld.sh linker script generator for STM32F1 in tup build
## Code After:
--
-- file: Tupfile.lua
--
-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
--
-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
-- distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
if CONFIG_CHIP_STM32F1 == "y" then
local ldScriptGenerator = TOP .. "source/architecture/ARM/ARMv7-M/ARMv7-M.ld.sh"
local ldscriptOutputs = {LDSCRIPT, filenameToGroup(LDSCRIPT)}
tup.rule("^ SH " .. ldScriptGenerator .. "^ ./" .. ldScriptGenerator .. " \"" .. CONFIG_CHIP .. "\" \"" ..
CONFIG_CHIP_STM32F1_FLASH_ADDRESS .. "," .. CONFIG_CHIP_STM32F1_FLASH_SIZE .. "\" \"" ..
CONFIG_CHIP_STM32F1_SRAM_ADDRESS .. "," .. CONFIG_CHIP_STM32F1_SRAM_SIZE .. "\" \"" ..
CONFIG_ARCHITECTURE_ARMV7_M_MAIN_STACK_SIZE .. "\" \"" .. CONFIG_MAIN_THREAD_STACK_SIZE .. "\" > \"%o\"",
ldscriptOutputs)
CFLAGS += STANDARD_INCLUDES
CXXFLAGS += STANDARD_INCLUDES
CXXFLAGS += ARCHITECTURE_INCLUDES
CXXFLAGS += CHIP_INCLUDES
tup.include(DISTORTOS_TOP .. "compile.lua")
end -- if CONFIG_CHIP_STM32F1 == "y" then
| --
-- file: Tupfile.lua
--
-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
--
-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
-- distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
--
if CONFIG_CHIP_STM32F1 == "y" then
- local stm32f1LdSh = "STM32F1.ld.sh"
+ local ldScriptGenerator = TOP .. "source/architecture/ARM/ARMv7-M/ARMv7-M.ld.sh"
local ldscriptOutputs = {LDSCRIPT, filenameToGroup(LDSCRIPT)}
- tup.rule(DISTORTOS_CONFIGURATION_MK, "^ SH " .. stm32f1LdSh .. "^ ./" .. stm32f1LdSh .. " \"%f\" > \"%o\"",
+ tup.rule("^ SH " .. ldScriptGenerator .. "^ ./" .. ldScriptGenerator .. " \"" .. CONFIG_CHIP .. "\" \"" ..
+ CONFIG_CHIP_STM32F1_FLASH_ADDRESS .. "," .. CONFIG_CHIP_STM32F1_FLASH_SIZE .. "\" \"" ..
+ CONFIG_CHIP_STM32F1_SRAM_ADDRESS .. "," .. CONFIG_CHIP_STM32F1_SRAM_SIZE .. "\" \"" ..
+ CONFIG_ARCHITECTURE_ARMV7_M_MAIN_STACK_SIZE .. "\" \"" .. CONFIG_MAIN_THREAD_STACK_SIZE .. "\" > \"%o\"",
ldscriptOutputs)
CFLAGS += STANDARD_INCLUDES
CXXFLAGS += STANDARD_INCLUDES
CXXFLAGS += ARCHITECTURE_INCLUDES
CXXFLAGS += CHIP_INCLUDES
tup.include(DISTORTOS_TOP .. "compile.lua")
end -- if CONFIG_CHIP_STM32F1 == "y" then | 7 | 0.269231 | 5 | 2 |
c49aa7f2f6bd622eb2d2ba8d5ea30f135aaccb87 | tests/run_tests.sh | tests/run_tests.sh | npm install soda
npm install assert
npm install nano
git clone https://github.com/daleharvey/CORS-Proxy.git
cd CORS-Proxy
export PORT=2020
node server.js &
node_pid=$!
cd ..
python -m SimpleHTTPServer &
python_pid=$!
sleep 3
java -jar tests/Sauce-Connect.jar pouchdb 97de9ee0-2712-49f0-9b17-4b9751d79073 &
java_pid=$!
sleep 60
git_hash=`git rev-list HEAD --max-count=1`
echo ${git_hash}
node tests/run_saucelabs.js ${git_hash}
kill -9 $node_pid
kill -9 $python_pid
kill $java_pid | cd CORS-Proxy
node server.js &
node_pid=$!
cd ..
python -m SimpleHTTPServer &
python_pid=$!
sleep 3
java -jar tests/Sauce-Connect.jar pouchdb 97de9ee0-2712-49f0-9b17-4b9751d79073 &
java_pid=$!
sleep 60
git_hash=`git rev-list HEAD --max-count=1`
echo ${git_hash}
node tests/run_saucelabs.js ${git_hash}
kill -9 $node_pid
kill -9 $python_pid
kill $java_pid | Remove the npm install and git clone from the test script. | Remove the npm install and git clone from the test script.
| Shell | apache-2.0 | cshum/pouchdb,nicolasbrugneaux/pouchdb,lakhansamani/pouchdb,pouchdb/pouchdb,slaskis/pouchdb,daleharvey/pouchdb,mattbailey/pouchdb,tohagan/pouchdb,shimaore/pouchdb,ramdhavepreetam/pouchdb,slang800/pouchdb,daleharvey/pouchdb,KlausTrainer/pouchdb,janraasch/pouchdb,mwksl/pouchdb,evidenceprime/pouchdb,nickcolley/pouchdb,marcusandre/pouchdb,marcusandre/pouchdb,janl/pouchdb,p5150j/pouchdb,mikeymckay/pouchdb,Charlotteis/pouchdb,seigel/pouchdb,shimaore/pouchdb,patrickgrey/pouchdb,ntwcklng/pouchdb,Charlotteis/pouchdb,caolan/pouchdb,slang800/pouchdb,spMatti/pouchdb,h4ki/pouchdb,Actonate/pouchdb,microlv/pouchdb,cesarmarinhorj/pouchdb,bbenezech/pouchdb,patrickgrey/pouchdb,crissdev/pouchdb,slaskis/pouchdb,crissdev/pouchdb,optikfluffel/pouchdb,p5150j/pouchdb,elkingtonmcb/pouchdb,garrensmith/pouchdb,tyler-johnson/pouchdb,jhs/pouchdb,marcusandre/pouchdb,adamvert/pouchdb,jhs/pouchdb,spMatti/pouchdb,TechnicalPursuit/pouchdb,daleharvey/pouchdb,adamvert/pouchdb,seigel/pouchdb,p5150j/pouchdb,crissdev/pouchdb,Actonate/pouchdb,cdaringe/pouchdb,callahanchris/pouchdb,Dashed/pouchdb,TechnicalPursuit/pouchdb,nickcolley/pouchdb,johnofkorea/pouchdb,janraasch/pouchdb,willholley/pouchdb,lukevanhorn/pouchdb,callahanchris/pouchdb,yaronyg/pouchdb,garrensmith/pouchdb,slaskis/pouchdb,tohagan/pouchdb,garrensmith/pouchdb,mattbailey/pouchdb,Dashed/pouchdb,johnofkorea/pouchdb,janraasch/pouchdb,ramdhavepreetam/pouchdb,patrickgrey/pouchdb,adamvert/pouchdb,tyler-johnson/pouchdb,pouchdb/pouchdb,colinskow/pouchdb,KlausTrainer/pouchdb,nicolasbrugneaux/pouchdb,mikeymckay/pouchdb,ntwcklng/pouchdb,janl/pouchdb,lukevanhorn/pouchdb,h4ki/pouchdb,microlv/pouchdb,olafura/pouchdb,bbenezech/pouchdb,tyler-johnson/pouchdb,cshum/pouchdb,seigel/pouchdb,HospitalRun/pouchdb,optikfluffel/pouchdb,bbenezech/pouchdb,johnofkorea/pouchdb,lakhansamani/pouchdb,tohagan/pouchdb,jhs/pouchdb,cdaringe/pouchdb,willholley/pouchdb,colinskow/pouchdb,mikeymckay/pouchdb,Knowledge-OTP/pouchdb,mainerror/pouchdb,yaronyg/pouchdb,lakhansamani/pouchdb,nickcolley/pouchdb,mwksl/pouchdb,slang800/pouchdb,Dashed/pouchdb,cshum/pouchdb,lukevanhorn/pouchdb,janl/pouchdb,optikfluffel/pouchdb,willholley/pouchdb,HospitalRun/pouchdb,elkingtonmcb/pouchdb,cesarmarinhorj/pouchdb,microlv/pouchdb,elkingtonmcb/pouchdb,asmiller/pouchdb,h4ki/pouchdb,spMatti/pouchdb,TechnicalPursuit/pouchdb,Charlotteis/pouchdb,mwksl/pouchdb,Knowledge-OTP/pouchdb,asmiller/pouchdb,cdaringe/pouchdb,callahanchris/pouchdb,ntwcklng/pouchdb,HospitalRun/pouchdb,mainerror/pouchdb,Actonate/pouchdb,mikeal/pouchdb,colinskow/pouchdb,pouchdb/pouchdb,greyhwndz/pouchdb,KlausTrainer/pouchdb,greyhwndz/pouchdb,Knowledge-OTP/pouchdb,maxogden/pouchdb,shimaore/pouchdb,cesarmarinhorj/pouchdb,mattbailey/pouchdb,yaronyg/pouchdb,ramdhavepreetam/pouchdb,asmiller/pouchdb,nicolasbrugneaux/pouchdb,mainerror/pouchdb,greyhwndz/pouchdb | shell | ## Code Before:
npm install soda
npm install assert
npm install nano
git clone https://github.com/daleharvey/CORS-Proxy.git
cd CORS-Proxy
export PORT=2020
node server.js &
node_pid=$!
cd ..
python -m SimpleHTTPServer &
python_pid=$!
sleep 3
java -jar tests/Sauce-Connect.jar pouchdb 97de9ee0-2712-49f0-9b17-4b9751d79073 &
java_pid=$!
sleep 60
git_hash=`git rev-list HEAD --max-count=1`
echo ${git_hash}
node tests/run_saucelabs.js ${git_hash}
kill -9 $node_pid
kill -9 $python_pid
kill $java_pid
## Instruction:
Remove the npm install and git clone from the test script.
## Code After:
cd CORS-Proxy
node server.js &
node_pid=$!
cd ..
python -m SimpleHTTPServer &
python_pid=$!
sleep 3
java -jar tests/Sauce-Connect.jar pouchdb 97de9ee0-2712-49f0-9b17-4b9751d79073 &
java_pid=$!
sleep 60
git_hash=`git rev-list HEAD --max-count=1`
echo ${git_hash}
node tests/run_saucelabs.js ${git_hash}
kill -9 $node_pid
kill -9 $python_pid
kill $java_pid | - npm install soda
- npm install assert
- npm install nano
- git clone https://github.com/daleharvey/CORS-Proxy.git
cd CORS-Proxy
- export PORT=2020
node server.js &
node_pid=$!
cd ..
python -m SimpleHTTPServer &
python_pid=$!
sleep 3
java -jar tests/Sauce-Connect.jar pouchdb 97de9ee0-2712-49f0-9b17-4b9751d79073 &
java_pid=$!
sleep 60
git_hash=`git rev-list HEAD --max-count=1`
echo ${git_hash}
node tests/run_saucelabs.js ${git_hash}
kill -9 $node_pid
kill -9 $python_pid
kill $java_pid | 5 | 0.238095 | 0 | 5 |
badddd6aa9533a01e07477174dc7422ee4941014 | wsgi.py | wsgi.py |
from newrelic import agent
agent.initialize()
from paste.deploy import loadapp
from raven.middleware import Sentry
application = loadapp('config:production.ini',
relative_to='yithlibraryserver/config-templates')
application = agent.WSGIApplicationWrapper(Sentry(application))
|
import os
import os.path
from newrelic import agent
agent.initialize()
from paste.deploy import loadapp
from pyramid.paster import setup_logging
from raven.middleware import Sentry
from waitress import serve
basedir= os.path.dirname(os.path.realpath(__file__))
conf_file = os.path.join(
basedir,
'yithlibraryserver', 'config-templates', 'production.ini'
)
application = loadapp('config:%s' % conf_file)
application = agent.WSGIApplicationWrapper(Sentry(application))
if __name__ == "__main__":
port = int(os.environ.get("PORT", 5000))
scheme = os.environ.get("SCHEME", "https")
setup_logging(conf_file)
serve(application, host='0.0.0.0', port=port, url_scheme=scheme)
| Read the conf file using absolute paths | Read the conf file using absolute paths
| Python | agpl-3.0 | lorenzogil/yith-library-server,lorenzogil/yith-library-server,lorenzogil/yith-library-server | python | ## Code Before:
from newrelic import agent
agent.initialize()
from paste.deploy import loadapp
from raven.middleware import Sentry
application = loadapp('config:production.ini',
relative_to='yithlibraryserver/config-templates')
application = agent.WSGIApplicationWrapper(Sentry(application))
## Instruction:
Read the conf file using absolute paths
## Code After:
import os
import os.path
from newrelic import agent
agent.initialize()
from paste.deploy import loadapp
from pyramid.paster import setup_logging
from raven.middleware import Sentry
from waitress import serve
basedir= os.path.dirname(os.path.realpath(__file__))
conf_file = os.path.join(
basedir,
'yithlibraryserver', 'config-templates', 'production.ini'
)
application = loadapp('config:%s' % conf_file)
application = agent.WSGIApplicationWrapper(Sentry(application))
if __name__ == "__main__":
port = int(os.environ.get("PORT", 5000))
scheme = os.environ.get("SCHEME", "https")
setup_logging(conf_file)
serve(application, host='0.0.0.0', port=port, url_scheme=scheme)
| +
+ import os
+ import os.path
from newrelic import agent
agent.initialize()
from paste.deploy import loadapp
+ from pyramid.paster import setup_logging
from raven.middleware import Sentry
+ from waitress import serve
- application = loadapp('config:production.ini',
- relative_to='yithlibraryserver/config-templates')
+ basedir= os.path.dirname(os.path.realpath(__file__))
+ conf_file = os.path.join(
+ basedir,
+ 'yithlibraryserver', 'config-templates', 'production.ini'
+ )
+
+ application = loadapp('config:%s' % conf_file)
application = agent.WSGIApplicationWrapper(Sentry(application))
+
+ if __name__ == "__main__":
+ port = int(os.environ.get("PORT", 5000))
+ scheme = os.environ.get("SCHEME", "https")
+ setup_logging(conf_file)
+ serve(application, host='0.0.0.0', port=port, url_scheme=scheme) | 20 | 2 | 18 | 2 |
f332af468e92df800bcd6685344427c7bcb36961 | config/settings.yml | config/settings.yml | mail_from: no-reply@helpwithcourtfees.dsd.io
mail_reply_to: enquiries@helpwithcourtfees.dsd.io
mail_tech_support: fee-remissions@digital.justice.gov.uk
mail_feedback: trial-feedback@digital.justice.gov.uk
| mail_from: no-reply@helpwithcourtfees.dsd.io
mail_reply_to: enquiries@helpwithcourtfees.dsd.io
mail_tech_support: helpwithfees.support@digital.justice.gov.uk
mail_feedback: trial-feedback@digital.justice.gov.uk
| Update the tech support email address | Update the tech support email address
| YAML | mit | ministryofjustice/fr-staffapp,ministryofjustice/fr-staffapp,ministryofjustice/fr-staffapp,ministryofjustice/fr-staffapp | yaml | ## Code Before:
mail_from: no-reply@helpwithcourtfees.dsd.io
mail_reply_to: enquiries@helpwithcourtfees.dsd.io
mail_tech_support: fee-remissions@digital.justice.gov.uk
mail_feedback: trial-feedback@digital.justice.gov.uk
## Instruction:
Update the tech support email address
## Code After:
mail_from: no-reply@helpwithcourtfees.dsd.io
mail_reply_to: enquiries@helpwithcourtfees.dsd.io
mail_tech_support: helpwithfees.support@digital.justice.gov.uk
mail_feedback: trial-feedback@digital.justice.gov.uk
| mail_from: no-reply@helpwithcourtfees.dsd.io
mail_reply_to: enquiries@helpwithcourtfees.dsd.io
- mail_tech_support: fee-remissions@digital.justice.gov.uk
? ^ ^^^^^^^^^
+ mail_tech_support: helpwithfees.support@digital.justice.gov.uk
? ++++++++ ^^^^^^^ ^
mail_feedback: trial-feedback@digital.justice.gov.uk | 2 | 0.5 | 1 | 1 |
7862a79487aa10adc768d31b4f96ad475747b1a5 | core/src/main/scala/com/lynbrookrobotics/potassium/events/ContinuousEvent.scala | core/src/main/scala/com/lynbrookrobotics/potassium/events/ContinuousEvent.scala | package com.lynbrookrobotics.potassium.events
import com.lynbrookrobotics.potassium.Clock
import squants.Time
case class EventPolling(clock: Clock, period: Time)
class ContinuousEvent(condition: => Boolean)(implicit polling: EventPolling) {
val onStartSource = new ImpulseEventSource
val onEndSource = new ImpulseEventSource
val onStart = onStartSource.event
val onEnd = onEndSource.event
private var tickingCallbacks: List[() => Unit] = List.empty
private var isRunning = false
polling.clock(polling.period) { dt =>
if (condition) {
tickingCallbacks.foreach(_.apply())
if (!isRunning) {
onStartSource.fire()
isRunning = true
}
} else if (isRunning) {
onEndSource.fire()
isRunning = false
}
}
def foreach(onTicking: () => Unit): Unit = {
tickingCallbacks = onTicking :: tickingCallbacks
}
}
| package com.lynbrookrobotics.potassium.events
import com.lynbrookrobotics.potassium.Clock
import com.lynbrookrobotics.potassium.tasks.{ContinuousTask, Task}
import squants.Time
case class EventPolling(clock: Clock, period: Time)
class ContinuousEvent(condition: => Boolean)(implicit polling: EventPolling) {
val onStartSource = new ImpulseEventSource
val onEndSource = new ImpulseEventSource
val onStart = onStartSource.event
val onEnd = onEndSource.event
private var tickingCallbacks: List[() => Unit] = List.empty
private var isRunning = false
polling.clock(polling.period) { dt =>
if (condition) {
tickingCallbacks.foreach(_.apply())
if (!isRunning) {
onStartSource.fire()
isRunning = true
}
} else if (isRunning) {
onEndSource.fire()
isRunning = false
}
}
def foreach(onTicking: () => Unit): Unit = {
tickingCallbacks = onTicking :: tickingCallbacks
}
def foreach(task: ContinuousTask): Unit = {
onStart.foreach(() => Task.executeTask(task))
onEnd.foreach(() => Task.abortTask(task))
}
}
| Add ability to trigger a continuous task from a continuous event | Add ability to trigger a continuous task from a continuous event
| Scala | mit | Team846/potassium,Team846/potassium | scala | ## Code Before:
package com.lynbrookrobotics.potassium.events
import com.lynbrookrobotics.potassium.Clock
import squants.Time
case class EventPolling(clock: Clock, period: Time)
class ContinuousEvent(condition: => Boolean)(implicit polling: EventPolling) {
val onStartSource = new ImpulseEventSource
val onEndSource = new ImpulseEventSource
val onStart = onStartSource.event
val onEnd = onEndSource.event
private var tickingCallbacks: List[() => Unit] = List.empty
private var isRunning = false
polling.clock(polling.period) { dt =>
if (condition) {
tickingCallbacks.foreach(_.apply())
if (!isRunning) {
onStartSource.fire()
isRunning = true
}
} else if (isRunning) {
onEndSource.fire()
isRunning = false
}
}
def foreach(onTicking: () => Unit): Unit = {
tickingCallbacks = onTicking :: tickingCallbacks
}
}
## Instruction:
Add ability to trigger a continuous task from a continuous event
## Code After:
package com.lynbrookrobotics.potassium.events
import com.lynbrookrobotics.potassium.Clock
import com.lynbrookrobotics.potassium.tasks.{ContinuousTask, Task}
import squants.Time
case class EventPolling(clock: Clock, period: Time)
class ContinuousEvent(condition: => Boolean)(implicit polling: EventPolling) {
val onStartSource = new ImpulseEventSource
val onEndSource = new ImpulseEventSource
val onStart = onStartSource.event
val onEnd = onEndSource.event
private var tickingCallbacks: List[() => Unit] = List.empty
private var isRunning = false
polling.clock(polling.period) { dt =>
if (condition) {
tickingCallbacks.foreach(_.apply())
if (!isRunning) {
onStartSource.fire()
isRunning = true
}
} else if (isRunning) {
onEndSource.fire()
isRunning = false
}
}
def foreach(onTicking: () => Unit): Unit = {
tickingCallbacks = onTicking :: tickingCallbacks
}
def foreach(task: ContinuousTask): Unit = {
onStart.foreach(() => Task.executeTask(task))
onEnd.foreach(() => Task.abortTask(task))
}
}
| package com.lynbrookrobotics.potassium.events
import com.lynbrookrobotics.potassium.Clock
+ import com.lynbrookrobotics.potassium.tasks.{ContinuousTask, Task}
import squants.Time
case class EventPolling(clock: Clock, period: Time)
class ContinuousEvent(condition: => Boolean)(implicit polling: EventPolling) {
val onStartSource = new ImpulseEventSource
val onEndSource = new ImpulseEventSource
val onStart = onStartSource.event
val onEnd = onEndSource.event
private var tickingCallbacks: List[() => Unit] = List.empty
private var isRunning = false
polling.clock(polling.period) { dt =>
if (condition) {
tickingCallbacks.foreach(_.apply())
if (!isRunning) {
onStartSource.fire()
isRunning = true
}
} else if (isRunning) {
onEndSource.fire()
isRunning = false
}
}
def foreach(onTicking: () => Unit): Unit = {
tickingCallbacks = onTicking :: tickingCallbacks
}
+
+ def foreach(task: ContinuousTask): Unit = {
+ onStart.foreach(() => Task.executeTask(task))
+ onEnd.foreach(() => Task.abortTask(task))
+ }
} | 6 | 0.166667 | 6 | 0 |
2e7cdc80f1dda9046f02c97d457826cbab077aa7 | .travis.yml | .travis.yml | language: cpp
compiler: gcc
before_install: sudo apt-get install -qq libx11-dev libxrandr-dev libasound2-dev libgl1-mesa-dev
doxygen graphviz
script: exit 0 && ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUAJIT=1 -DENABLE_LUAJIT_AMALG=1
-DENABLE_SAMPLES=1 -DENABLE_TOOLS=1 -DENABLE_EXTRAS=1 -DENABLE_DOCS_QUIET=1 && cd
Build && make
after_success: rake travis
env:
global:
secure: Bg7YyGEd7KXP8TFm9FEFpW5mg/OS0sQmlQlFmD6Y4I2rCFikwF/qoeLmIJ5fu8hpt/69tYiG/ivTyXjntNlOCqFztK4LeYY8RicAlfAbY73XtvWoq5uhXACmjev3nsBsVfcNu8dJyXUW0L7LAerSbhJP7V2CdvoEGAlN5mOMgJc=
| language: cpp
compiler: gcc
before_install: sudo apt-get install -qq libx11-dev libxrandr-dev libasound2-dev libgl1-mesa-dev doxygen graphviz
#script: ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUAJIT=1 -DENABLE_LUAJIT_AMALG=1 -DENABLE_SAMPLES=1 -DENABLE_TOOLS=1 -DENABLE_EXTRAS=1 -DENABLE_DOCS_QUIET=1 && cd Build && make
script: echo Bypass
after_success: rake travis
env:
global:
secure: Bg7YyGEd7KXP8TFm9FEFpW5mg/OS0sQmlQlFmD6Y4I2rCFikwF/qoeLmIJ5fu8hpt/69tYiG/ivTyXjntNlOCqFztK4LeYY8RicAlfAbY73XtvWoq5uhXACmjev3nsBsVfcNu8dJyXUW0L7LAerSbhJP7V2CdvoEGAlN5mOMgJc=
| Test site documentation deployment using Travis CI. | Test site documentation deployment using Travis CI.
| YAML | mit | SuperWangKai/Urho3D,tommy3/Urho3D,victorholt/Urho3D,kostik1337/Urho3D,codedash64/Urho3D,SuperWangKai/Urho3D,c4augustus/Urho3D,urho3d/Urho3D,PredatorMF/Urho3D,rokups/Urho3D,eugeneko/Urho3D,helingping/Urho3D,fire/Urho3D-1,bacsmar/Urho3D,bacsmar/Urho3D,carnalis/Urho3D,iainmerrick/Urho3D,fire/Urho3D-1,MonkeyFirst/Urho3D,orefkov/Urho3D,codemon66/Urho3D,helingping/Urho3D,eugeneko/Urho3D,bacsmar/Urho3D,codedash64/Urho3D,xiliu98/Urho3D,PredatorMF/Urho3D,henu/Urho3D,iainmerrick/Urho3D,helingping/Urho3D,iainmerrick/Urho3D,kostik1337/Urho3D,xiliu98/Urho3D,tommy3/Urho3D,victorholt/Urho3D,weitjong/Urho3D,codedash64/Urho3D,PredatorMF/Urho3D,weitjong/Urho3D,helingping/Urho3D,abdllhbyrktr/Urho3D,bacsmar/Urho3D,MeshGeometry/Urho3D,cosmy1/Urho3D,codedash64/Urho3D,rokups/Urho3D,c4augustus/Urho3D,luveti/Urho3D,MeshGeometry/Urho3D,rokups/Urho3D,iainmerrick/Urho3D,luveti/Urho3D,xiliu98/Urho3D,victorholt/Urho3D,c4augustus/Urho3D,eugeneko/Urho3D,kostik1337/Urho3D,abdllhbyrktr/Urho3D,carnalis/Urho3D,codedash64/Urho3D,weitjong/Urho3D,codemon66/Urho3D,codemon66/Urho3D,codemon66/Urho3D,abdllhbyrktr/Urho3D,299299/Urho3D,tommy3/Urho3D,cosmy1/Urho3D,rokups/Urho3D,orefkov/Urho3D,fire/Urho3D-1,henu/Urho3D,carnalis/Urho3D,henu/Urho3D,carnalis/Urho3D,cosmy1/Urho3D,SirNate0/Urho3D,helingping/Urho3D,victorholt/Urho3D,tommy3/Urho3D,weitjong/Urho3D,urho3d/Urho3D,rokups/Urho3D,fire/Urho3D-1,SirNate0/Urho3D,rokups/Urho3D,299299/Urho3D,SirNate0/Urho3D,carnalis/Urho3D,MonkeyFirst/Urho3D,luveti/Urho3D,c4augustus/Urho3D,fire/Urho3D-1,luveti/Urho3D,codemon66/Urho3D,abdllhbyrktr/Urho3D,299299/Urho3D,eugeneko/Urho3D,abdllhbyrktr/Urho3D,PredatorMF/Urho3D,urho3d/Urho3D,MeshGeometry/Urho3D,weitjong/Urho3D,299299/Urho3D,cosmy1/Urho3D,c4augustus/Urho3D,SirNate0/Urho3D,kostik1337/Urho3D,SuperWangKai/Urho3D,MonkeyFirst/Urho3D,iainmerrick/Urho3D,cosmy1/Urho3D,henu/Urho3D,victorholt/Urho3D,xiliu98/Urho3D,kostik1337/Urho3D,MonkeyFirst/Urho3D,luveti/Urho3D,xiliu98/Urho3D,MonkeyFirst/Urho3D,henu/Urho3D,SuperWangKai/Urho3D,SuperWangKai/Urho3D,MeshGeometry/Urho3D,299299/Urho3D,orefkov/Urho3D,SirNate0/Urho3D,urho3d/Urho3D,tommy3/Urho3D,299299/Urho3D,orefkov/Urho3D,MeshGeometry/Urho3D | yaml | ## Code Before:
language: cpp
compiler: gcc
before_install: sudo apt-get install -qq libx11-dev libxrandr-dev libasound2-dev libgl1-mesa-dev
doxygen graphviz
script: exit 0 && ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUAJIT=1 -DENABLE_LUAJIT_AMALG=1
-DENABLE_SAMPLES=1 -DENABLE_TOOLS=1 -DENABLE_EXTRAS=1 -DENABLE_DOCS_QUIET=1 && cd
Build && make
after_success: rake travis
env:
global:
secure: Bg7YyGEd7KXP8TFm9FEFpW5mg/OS0sQmlQlFmD6Y4I2rCFikwF/qoeLmIJ5fu8hpt/69tYiG/ivTyXjntNlOCqFztK4LeYY8RicAlfAbY73XtvWoq5uhXACmjev3nsBsVfcNu8dJyXUW0L7LAerSbhJP7V2CdvoEGAlN5mOMgJc=
## Instruction:
Test site documentation deployment using Travis CI.
## Code After:
language: cpp
compiler: gcc
before_install: sudo apt-get install -qq libx11-dev libxrandr-dev libasound2-dev libgl1-mesa-dev doxygen graphviz
#script: ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUAJIT=1 -DENABLE_LUAJIT_AMALG=1 -DENABLE_SAMPLES=1 -DENABLE_TOOLS=1 -DENABLE_EXTRAS=1 -DENABLE_DOCS_QUIET=1 && cd Build && make
script: echo Bypass
after_success: rake travis
env:
global:
secure: Bg7YyGEd7KXP8TFm9FEFpW5mg/OS0sQmlQlFmD6Y4I2rCFikwF/qoeLmIJ5fu8hpt/69tYiG/ivTyXjntNlOCqFztK4LeYY8RicAlfAbY73XtvWoq5uhXACmjev3nsBsVfcNu8dJyXUW0L7LAerSbhJP7V2CdvoEGAlN5mOMgJc=
| language: cpp
compiler: gcc
- before_install: sudo apt-get install -qq libx11-dev libxrandr-dev libasound2-dev libgl1-mesa-dev
+ before_install: sudo apt-get install -qq libx11-dev libxrandr-dev libasound2-dev libgl1-mesa-dev doxygen graphviz
? +++++++++++++++++
+ #script: ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUAJIT=1 -DENABLE_LUAJIT_AMALG=1 -DENABLE_SAMPLES=1 -DENABLE_TOOLS=1 -DENABLE_EXTRAS=1 -DENABLE_DOCS_QUIET=1 && cd Build && make
+ script: echo Bypass
- doxygen graphviz
- script: exit 0 && ./cmake_gcc.sh -DENABLE_64BIT=1 -DENABLE_LUAJIT=1 -DENABLE_LUAJIT_AMALG=1
- -DENABLE_SAMPLES=1 -DENABLE_TOOLS=1 -DENABLE_EXTRAS=1 -DENABLE_DOCS_QUIET=1 && cd
- Build && make
after_success: rake travis
env:
global:
secure: Bg7YyGEd7KXP8TFm9FEFpW5mg/OS0sQmlQlFmD6Y4I2rCFikwF/qoeLmIJ5fu8hpt/69tYiG/ivTyXjntNlOCqFztK4LeYY8RicAlfAbY73XtvWoq5uhXACmjev3nsBsVfcNu8dJyXUW0L7LAerSbhJP7V2CdvoEGAlN5mOMgJc= | 8 | 0.727273 | 3 | 5 |
36c6b7e70c21b261dcb39568a17fd1cd353a25db | htmlify.py | htmlify.py | def getHTML(tag, contents=None, newLine=True, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
construct += " " + paramName + "=" + paramContent
if contents is not None:
construct += ">" + contents + "</" + tag + ">"
else:
construct += ">" + "</" + tag + ">"
if newLine:
return construct + "\n"
else:
return construct
def dispHTML(tag, contents=None, **parameters):
construct = getHTML(tag, contents=contents, **parameters)
print(construct)
def startTag(tag, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
construct += " " + paramName + "=" + paramContent
construct += ">"
print(construct + "\n")
def endTag(tag):
print("</" + tag + ">")
| def getHTML(tag, contents=None, newLine=True, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
if type(paramContent) == str:
construct += " " + paramName + "=\"" + paramContent + "\""
if contents is not None:
construct += ">" + contents + "</" + tag + ">"
else:
construct += ">" + "</" + tag + ">"
if newLine:
return construct + "\n"
else:
return construct
def dispHTML(tag, contents=None, **parameters):
construct = getHTML(tag, contents=contents, **parameters)
print(construct)
def startTag(tag, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
if type(paramContent) == str:
construct += " " + paramName + "=\"" + paramContent + "\""
construct += ">"
print(construct + "\n")
def endTag(tag):
print("</" + tag + ">")
| Add quotes to values htmlified | Add quotes to values htmlified
| Python | apache-2.0 | ISD-Sound-and-Lights/InventoryControl | python | ## Code Before:
def getHTML(tag, contents=None, newLine=True, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
construct += " " + paramName + "=" + paramContent
if contents is not None:
construct += ">" + contents + "</" + tag + ">"
else:
construct += ">" + "</" + tag + ">"
if newLine:
return construct + "\n"
else:
return construct
def dispHTML(tag, contents=None, **parameters):
construct = getHTML(tag, contents=contents, **parameters)
print(construct)
def startTag(tag, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
construct += " " + paramName + "=" + paramContent
construct += ">"
print(construct + "\n")
def endTag(tag):
print("</" + tag + ">")
## Instruction:
Add quotes to values htmlified
## Code After:
def getHTML(tag, contents=None, newLine=True, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
if type(paramContent) == str:
construct += " " + paramName + "=\"" + paramContent + "\""
if contents is not None:
construct += ">" + contents + "</" + tag + ">"
else:
construct += ">" + "</" + tag + ">"
if newLine:
return construct + "\n"
else:
return construct
def dispHTML(tag, contents=None, **parameters):
construct = getHTML(tag, contents=contents, **parameters)
print(construct)
def startTag(tag, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
if type(paramContent) == str:
construct += " " + paramName + "=\"" + paramContent + "\""
construct += ">"
print(construct + "\n")
def endTag(tag):
print("</" + tag + ">")
| def getHTML(tag, contents=None, newLine=True, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
+ if type(paramContent) == str:
- construct += " " + paramName + "=" + paramContent
+ construct += " " + paramName + "=\"" + paramContent + "\""
? + ++ +++++++
if contents is not None:
construct += ">" + contents + "</" + tag + ">"
else:
construct += ">" + "</" + tag + ">"
if newLine:
return construct + "\n"
else:
return construct
def dispHTML(tag, contents=None, **parameters):
construct = getHTML(tag, contents=contents, **parameters)
print(construct)
def startTag(tag, **parameters):
construct = "<" + tag
for paramName, paramContent in parameters.items():
+ if type(paramContent) == str:
- construct += " " + paramName + "=" + paramContent
+ construct += " " + paramName + "=\"" + paramContent + "\""
? + ++ +++++++
construct += ">"
print(construct + "\n")
def endTag(tag):
print("</" + tag + ">") | 6 | 0.206897 | 4 | 2 |
111af0d784e61756810ccbb1f199f62d26210714 | conf/trunk_coverage_test-select.cfg | conf/trunk_coverage_test-select.cfg | [exclude]
# upgrade_through_versions_test runs as a standalone job
upgrade_through_versions_test.py
offline_tools_test.py:TestOfflineTools.sstableofflinerelevel_test
| [exclude]
# upgrade_through_versions_test runs as a standalone job
upgrade_through_versions_test.py
# CSTAR-218 - server hang on these tests:
offline_tools_test.py:TestOfflineTools.sstableofflinerelevel_test
materialized_views_test.py:TestMaterializedViewsConsistency.single_partition_consistent_reads_after_write_test
| Exclude single_partition_consistent_reads_after_write_test during coverage run | Exclude single_partition_consistent_reads_after_write_test during coverage run
| INI | apache-2.0 | spodkowinski/cassandra-dtest,beobal/cassandra-dtest,thobbs/cassandra-dtest,spodkowinski/cassandra-dtest,thobbs/cassandra-dtest,krummas/cassandra-dtest,mambocab/cassandra-dtest,iamaleksey/cassandra-dtest,riptano/cassandra-dtest,stef1927/cassandra-dtest,snazy/cassandra-dtest,carlyeks/cassandra-dtest,stef1927/cassandra-dtest,carlyeks/cassandra-dtest,aweisberg/cassandra-dtest,aweisberg/cassandra-dtest,mambocab/cassandra-dtest,beobal/cassandra-dtest,iamaleksey/cassandra-dtest,bdeggleston/cassandra-dtest,blerer/cassandra-dtest,pcmanus/cassandra-dtest,krummas/cassandra-dtest,riptano/cassandra-dtest,bdeggleston/cassandra-dtest,blerer/cassandra-dtest,snazy/cassandra-dtest,pauloricardomg/cassandra-dtest,pauloricardomg/cassandra-dtest | ini | ## Code Before:
[exclude]
# upgrade_through_versions_test runs as a standalone job
upgrade_through_versions_test.py
offline_tools_test.py:TestOfflineTools.sstableofflinerelevel_test
## Instruction:
Exclude single_partition_consistent_reads_after_write_test during coverage run
## Code After:
[exclude]
# upgrade_through_versions_test runs as a standalone job
upgrade_through_versions_test.py
# CSTAR-218 - server hang on these tests:
offline_tools_test.py:TestOfflineTools.sstableofflinerelevel_test
materialized_views_test.py:TestMaterializedViewsConsistency.single_partition_consistent_reads_after_write_test
| [exclude]
# upgrade_through_versions_test runs as a standalone job
upgrade_through_versions_test.py
+ # CSTAR-218 - server hang on these tests:
offline_tools_test.py:TestOfflineTools.sstableofflinerelevel_test
+ materialized_views_test.py:TestMaterializedViewsConsistency.single_partition_consistent_reads_after_write_test | 2 | 0.5 | 2 | 0 |
0c72ade74c9ee33ae47d112052e197d989bcc795 | app/views/cache/cache-simpleidb.html | app/views/cache/cache-simpleidb.html | <div ng-include="'views/cache/cache-simpleidb-code.html'"></div>
<div>
<tabset>
<tab heading="simpleidb-view.html">
<pre hljs include="'views/cache/cache-simpleidb-code.html'" language="html"></pre>
</tab>
<tab heading="simpleidb-controller.js">
<pre hljs include="'scripts/controllers/simpleidb-controller-code.js'" language="javascript"></pre>
</tab>
</tabset>
</div>
| <div class="row">
<div class="col-md-6">
<div ng-include="'views/cache/cache-simpleidb-code.html'"></div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">Explanation</div>
<div class="panel-body">
<p>IndexedDB is a way for you to persistently store data inside a user's browser.</p>
<p>Fill in the input form fields and select create/update to add a new item to the database.</p>
<p>Select an item in the list and edit it within the input form fields, then select create/update to see the changes persist to the database.</p>
</div>
</div>
</div>
</div>
<div>
<tabset>
<tab heading="simpleidb-view.html">
<pre hljs include="'views/cache/cache-simpleidb-code.html'" language="html"></pre>
</tab>
<tab heading="simpleidb-controller.js">
<pre hljs include="'scripts/controllers/simpleidb-controller-code.js'" language="javascript"></pre>
</tab>
</tabset>
</div>
| Add explanation panel for IndexedDB with explanation. | Add explanation panel for IndexedDB with explanation.
| HTML | mpl-2.0 | Appverse/appverse-web-html5-showcase,Appverse/appverse-web-html5-showcase | html | ## Code Before:
<div ng-include="'views/cache/cache-simpleidb-code.html'"></div>
<div>
<tabset>
<tab heading="simpleidb-view.html">
<pre hljs include="'views/cache/cache-simpleidb-code.html'" language="html"></pre>
</tab>
<tab heading="simpleidb-controller.js">
<pre hljs include="'scripts/controllers/simpleidb-controller-code.js'" language="javascript"></pre>
</tab>
</tabset>
</div>
## Instruction:
Add explanation panel for IndexedDB with explanation.
## Code After:
<div class="row">
<div class="col-md-6">
<div ng-include="'views/cache/cache-simpleidb-code.html'"></div>
</div>
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">Explanation</div>
<div class="panel-body">
<p>IndexedDB is a way for you to persistently store data inside a user's browser.</p>
<p>Fill in the input form fields and select create/update to add a new item to the database.</p>
<p>Select an item in the list and edit it within the input form fields, then select create/update to see the changes persist to the database.</p>
</div>
</div>
</div>
</div>
<div>
<tabset>
<tab heading="simpleidb-view.html">
<pre hljs include="'views/cache/cache-simpleidb-code.html'" language="html"></pre>
</tab>
<tab heading="simpleidb-controller.js">
<pre hljs include="'scripts/controllers/simpleidb-controller-code.js'" language="javascript"></pre>
</tab>
</tabset>
</div>
| + <div class="row">
+ <div class="col-md-6">
- <div ng-include="'views/cache/cache-simpleidb-code.html'"></div>
+ <div ng-include="'views/cache/cache-simpleidb-code.html'"></div>
? ++++++++
+ </div>
+
+ <div class="col-md-6">
+ <div class="panel panel-primary">
+ <div class="panel-heading">Explanation</div>
+ <div class="panel-body">
+ <p>IndexedDB is a way for you to persistently store data inside a user's browser.</p>
+
+ <p>Fill in the input form fields and select create/update to add a new item to the database.</p>
+ <p>Select an item in the list and edit it within the input form fields, then select create/update to see the changes persist to the database.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+
<div>
<tabset>
<tab heading="simpleidb-view.html">
<pre hljs include="'views/cache/cache-simpleidb-code.html'" language="html"></pre>
</tab>
<tab heading="simpleidb-controller.js">
<pre hljs include="'scripts/controllers/simpleidb-controller-code.js'" language="javascript"></pre>
</tab>
</tabset>
</div>
| 19 | 1.055556 | 18 | 1 |
d2debb5ab6a9c38a0e8ca207c768d37165397ee7 | source/tests/tests-main.cpp | source/tests/tests-main.cpp |
int main(int argc, char** argv)
{
const char* input = "Hello World!";
static const size_t output_size = 256;
char output[output_size];
wchar_t output_wide[output_size];
const char* input_seek;
size_t converted_size;
int32_t errors;
memset(output, 0, output_size * sizeof(char));
memset(output_wide, 0, output_size * sizeof(wchar_t));
/*
Convert input to uppercase:
"Hello World!" -> "HELLO WORLD!"
*/
converted_size = utf8toupper(
input, strlen(input),
output, output_size - 1,
&errors);
if (converted_size == 0 ||
errors != UTF8_ERR_NONE)
{
return -1;
}
/*
Convert UTF-8 input to wide (UTF-16 or UTF-32) encoded text:
"HELLO WORLD!" -> L"HELLO WORLD!"
*/
converted_size = utf8towide(
output, strlen(output),
output_wide, (output_size - 1) * sizeof(wchar_t),
&errors);
if (converted_size == 0 ||
errors != UTF8_ERR_NONE)
{
return -1;
}
/*
Seek in input:
"Hello World!" -> "World!"
*/
input_seek = utf8seek(input, input, 6, SEEK_SET);
::testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
return result;
} |
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
if (result != 0)
{
std::cout << "Press any key to continue.";
int wait = 0;
std::cin >> wait;
}
return result;
} | Clean up main entry point. | Clean up main entry point.
| C++ | mit | tkelman/utf8rewind,tkelman/utf8rewind,tkelman/utf8rewind,tkelman/utf8rewind | c++ | ## Code Before:
int main(int argc, char** argv)
{
const char* input = "Hello World!";
static const size_t output_size = 256;
char output[output_size];
wchar_t output_wide[output_size];
const char* input_seek;
size_t converted_size;
int32_t errors;
memset(output, 0, output_size * sizeof(char));
memset(output_wide, 0, output_size * sizeof(wchar_t));
/*
Convert input to uppercase:
"Hello World!" -> "HELLO WORLD!"
*/
converted_size = utf8toupper(
input, strlen(input),
output, output_size - 1,
&errors);
if (converted_size == 0 ||
errors != UTF8_ERR_NONE)
{
return -1;
}
/*
Convert UTF-8 input to wide (UTF-16 or UTF-32) encoded text:
"HELLO WORLD!" -> L"HELLO WORLD!"
*/
converted_size = utf8towide(
output, strlen(output),
output_wide, (output_size - 1) * sizeof(wchar_t),
&errors);
if (converted_size == 0 ||
errors != UTF8_ERR_NONE)
{
return -1;
}
/*
Seek in input:
"Hello World!" -> "World!"
*/
input_seek = utf8seek(input, input, 6, SEEK_SET);
::testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
return result;
}
## Instruction:
Clean up main entry point.
## Code After:
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
if (result != 0)
{
std::cout << "Press any key to continue.";
int wait = 0;
std::cin >> wait;
}
return result;
} |
int main(int argc, char** argv)
{
- const char* input = "Hello World!";
-
- static const size_t output_size = 256;
- char output[output_size];
- wchar_t output_wide[output_size];
- const char* input_seek;
- size_t converted_size;
- int32_t errors;
-
- memset(output, 0, output_size * sizeof(char));
- memset(output_wide, 0, output_size * sizeof(wchar_t));
-
- /*
- Convert input to uppercase:
-
- "Hello World!" -> "HELLO WORLD!"
- */
-
- converted_size = utf8toupper(
- input, strlen(input),
- output, output_size - 1,
- &errors);
- if (converted_size == 0 ||
- errors != UTF8_ERR_NONE)
- {
- return -1;
- }
-
- /*
- Convert UTF-8 input to wide (UTF-16 or UTF-32) encoded text:
-
- "HELLO WORLD!" -> L"HELLO WORLD!"
- */
-
- converted_size = utf8towide(
- output, strlen(output),
- output_wide, (output_size - 1) * sizeof(wchar_t),
- &errors);
- if (converted_size == 0 ||
- errors != UTF8_ERR_NONE)
- {
- return -1;
- }
-
- /*
- Seek in input:
-
- "Hello World!" -> "World!"
- */
-
- input_seek = utf8seek(input, input, 6, SEEK_SET);
-
::testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
+ if (result != 0)
+ {
+ std::cout << "Press any key to continue.";
+
+ int wait = 0;
+ std::cin >> wait;
+ }
+
return result;
} | 60 | 0.983607 | 8 | 52 |
7222c346de697df299f6dd02bd2e9c8cc43d59f7 | README.md | README.md |
Adding patch right under the master
One more patch
HotFix - Patch
it was not enoough
|
Adding patch right under the master
One more patch
Third patch
| Revert "Cherry-picking >>>>>>> d58f144... Adding more details" | Revert "Cherry-picking >>>>>>> d58f144... Adding more details"
This reverts commit 674e524f356a0a294cd8ff73eed119b372466370.
| Markdown | mit | ivaylosharkov/eos-demo | markdown | ## Code Before:
Adding patch right under the master
One more patch
HotFix - Patch
it was not enoough
## Instruction:
Revert "Cherry-picking >>>>>>> d58f144... Adding more details"
This reverts commit 674e524f356a0a294cd8ff73eed119b372466370.
## Code After:
Adding patch right under the master
One more patch
Third patch
|
Adding patch right under the master
One more patch
+ Third patch
- HotFix - Patch
-
- it was not enoough | 4 | 0.5 | 1 | 3 |
3e0bf925f86b00256549597a85216ff6c9faba18 | cmd/influxd/run/command_test.go | cmd/influxd/run/command_test.go | package run_test
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/influxdata/influxdb/cmd/influxd/run"
)
func TestCommand_PIDFile(t *testing.T) {
tmpdir, err := ioutil.TempDir(os.TempDir(), "influxd-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
pidFile := filepath.Join(tmpdir, "influxdb.pid")
cmd := run.NewCommand()
if err := cmd.Run("-pidfile", pidFile); err != nil {
t.Fatalf("unexpected error: %s", err)
}
if _, err := os.Stat(pidFile); err != nil {
t.Fatalf("could not stat pid file: %s", err)
}
go cmd.Close()
timeout := time.NewTimer(100 * time.Millisecond)
select {
case <-timeout.C:
t.Fatal("unexpected timeout")
case <-cmd.Closed:
timeout.Stop()
}
if _, err := os.Stat(pidFile); err == nil {
t.Fatal("expected pid file to be removed")
}
}
| package run_test
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/influxdata/influxdb/cmd/influxd/run"
)
func TestCommand_PIDFile(t *testing.T) {
tmpdir, err := ioutil.TempDir(os.TempDir(), "influxd-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
pidFile := filepath.Join(tmpdir, "influxdb.pid")
cmd := run.NewCommand()
cmd.Getenv = func(key string) string {
switch key {
case "INFLUXDB_BIND_ADDRESS", "INFLUXDB_HTTP_BIND_ADDRESS":
return "127.0.0.1:0"
default:
return os.Getenv(key)
}
}
if err := cmd.Run("-pidfile", pidFile); err != nil {
t.Fatalf("unexpected error: %s", err)
}
if _, err := os.Stat(pidFile); err != nil {
t.Fatalf("could not stat pid file: %s", err)
}
go cmd.Close()
timeout := time.NewTimer(100 * time.Millisecond)
select {
case <-timeout.C:
t.Fatal("unexpected timeout")
case <-cmd.Closed:
timeout.Stop()
}
if _, err := os.Stat(pidFile); err == nil {
t.Fatal("expected pid file to be removed")
}
}
| Use random port in PID file test | Use random port in PID file test
| Go | mit | vladlopes/influxdb,li-ang/influxdb,benbjohnson/influxdb,influxdb/influxdb,linearb/influxdb,influxdb/influxdb,influxdata/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,benbjohnson/influxdb,benbjohnson/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,vladlopes/influxdb,linearb/influxdb,vladlopes/influxdb,nooproblem/influxdb,linearb/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,vladlopes/influxdb,linearb/influxdb,linearb/influxdb,benbjohnson/influxdb,nooproblem/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb | go | ## Code Before:
package run_test
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/influxdata/influxdb/cmd/influxd/run"
)
func TestCommand_PIDFile(t *testing.T) {
tmpdir, err := ioutil.TempDir(os.TempDir(), "influxd-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
pidFile := filepath.Join(tmpdir, "influxdb.pid")
cmd := run.NewCommand()
if err := cmd.Run("-pidfile", pidFile); err != nil {
t.Fatalf("unexpected error: %s", err)
}
if _, err := os.Stat(pidFile); err != nil {
t.Fatalf("could not stat pid file: %s", err)
}
go cmd.Close()
timeout := time.NewTimer(100 * time.Millisecond)
select {
case <-timeout.C:
t.Fatal("unexpected timeout")
case <-cmd.Closed:
timeout.Stop()
}
if _, err := os.Stat(pidFile); err == nil {
t.Fatal("expected pid file to be removed")
}
}
## Instruction:
Use random port in PID file test
## Code After:
package run_test
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/influxdata/influxdb/cmd/influxd/run"
)
func TestCommand_PIDFile(t *testing.T) {
tmpdir, err := ioutil.TempDir(os.TempDir(), "influxd-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
pidFile := filepath.Join(tmpdir, "influxdb.pid")
cmd := run.NewCommand()
cmd.Getenv = func(key string) string {
switch key {
case "INFLUXDB_BIND_ADDRESS", "INFLUXDB_HTTP_BIND_ADDRESS":
return "127.0.0.1:0"
default:
return os.Getenv(key)
}
}
if err := cmd.Run("-pidfile", pidFile); err != nil {
t.Fatalf("unexpected error: %s", err)
}
if _, err := os.Stat(pidFile); err != nil {
t.Fatalf("could not stat pid file: %s", err)
}
go cmd.Close()
timeout := time.NewTimer(100 * time.Millisecond)
select {
case <-timeout.C:
t.Fatal("unexpected timeout")
case <-cmd.Closed:
timeout.Stop()
}
if _, err := os.Stat(pidFile); err == nil {
t.Fatal("expected pid file to be removed")
}
}
| package run_test
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
"github.com/influxdata/influxdb/cmd/influxd/run"
)
func TestCommand_PIDFile(t *testing.T) {
tmpdir, err := ioutil.TempDir(os.TempDir(), "influxd-test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpdir)
pidFile := filepath.Join(tmpdir, "influxdb.pid")
cmd := run.NewCommand()
+ cmd.Getenv = func(key string) string {
+ switch key {
+ case "INFLUXDB_BIND_ADDRESS", "INFLUXDB_HTTP_BIND_ADDRESS":
+ return "127.0.0.1:0"
+ default:
+ return os.Getenv(key)
+ }
+ }
if err := cmd.Run("-pidfile", pidFile); err != nil {
t.Fatalf("unexpected error: %s", err)
}
if _, err := os.Stat(pidFile); err != nil {
t.Fatalf("could not stat pid file: %s", err)
}
go cmd.Close()
timeout := time.NewTimer(100 * time.Millisecond)
select {
case <-timeout.C:
t.Fatal("unexpected timeout")
case <-cmd.Closed:
timeout.Stop()
}
if _, err := os.Stat(pidFile); err == nil {
t.Fatal("expected pid file to be removed")
}
} | 8 | 0.186047 | 8 | 0 |
1d1261f030c0987fed7d4f8abaad46edcfe21ca7 | assets/css/custom.css | assets/css/custom.css | /**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
}
.icon > svg path {
fill: $grey-color;
}
| /**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
}
.icon > svg path {
fill: $grey-color;
}
.page-title {
text-shadow: 0 0 15px rgba(0,0,0,0.5);
}
| Include text-shadow for homepage title | Include text-shadow for homepage title
| CSS | mit | eleanorakh/eleanorakh.github.io,eleanorakh/eleanorakh.github.io,eleanorakh/eleanorakh.github.io | css | ## Code Before:
/**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
}
.icon > svg path {
fill: $grey-color;
}
## Instruction:
Include text-shadow for homepage title
## Code After:
/**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
}
.icon > svg path {
fill: $grey-color;
}
.page-title {
text-shadow: 0 0 15px rgba(0,0,0,0.5);
}
| /**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
}
.icon > svg path {
fill: $grey-color;
}
+
+ .page-title {
+ text-shadow: 0 0 15px rgba(0,0,0,0.5);
+ } | 4 | 0.307692 | 4 | 0 |
c269647f7081d5a4f90608a9b10c2bba1d976f68 | test-ci.ps1 | test-ci.ps1 | $testProjects = Get-ChildItem test/HTTPlease*.csproj -File -Recurse
ForEach ($testProject In $testProjects) {
dotnet test $testProject
}
| $testDir = Join-Path $PSScriptRoot 'test'
$testProjects = Get-ChildItem $testDir -Recurse -File -Filter '*.Tests.csproj'
ForEach ($testProject In $testProjects) {
dotnet test --no-build $testProject.FullName
}
| Improve running of tests during CI build. | Improve running of tests during CI build.
| PowerShell | mit | tintoy/HTTPlease,tintoy/HTTPlease | powershell | ## Code Before:
$testProjects = Get-ChildItem test/HTTPlease*.csproj -File -Recurse
ForEach ($testProject In $testProjects) {
dotnet test $testProject
}
## Instruction:
Improve running of tests during CI build.
## Code After:
$testDir = Join-Path $PSScriptRoot 'test'
$testProjects = Get-ChildItem $testDir -Recurse -File -Filter '*.Tests.csproj'
ForEach ($testProject In $testProjects) {
dotnet test --no-build $testProject.FullName
}
| - $testProjects = Get-ChildItem test/HTTPlease*.csproj -File -Recurse
+ $testDir = Join-Path $PSScriptRoot 'test'
+ $testProjects = Get-ChildItem $testDir -Recurse -File -Filter '*.Tests.csproj'
ForEach ($testProject In $testProjects) {
- dotnet test $testProject
+ dotnet test --no-build $testProject.FullName
} | 5 | 1 | 3 | 2 |
0cc601758dfd01b3f6dd413d356e90988f2821cb | web/app/components/Wallet/BalanceClaimAssetTotal.jsx | web/app/components/Wallet/BalanceClaimAssetTotal.jsx | import React, {Component, PropTypes} from "react";
import connectToStores from "alt/utils/connectToStores"
import BalanceClaimActiveStore from "stores/BalanceClaimActiveStore"
import FormattedAsset from "components/Utility/FormattedAsset";
@connectToStores
export default class BalanceClaimAssetTotals extends Component {
static getStores() {
return [BalanceClaimActiveStore]
}
static getPropsFromStores() {
var props = BalanceClaimActiveStore.getState()
return props
}
render() {
var total_by_asset = this.props.balances
.groupBy( v => v.balance.asset_id )
.map( l => l.reduce( (r,v) => r + Number(v.balance.amount), 0 ))
if( ! total_by_asset.size)
return <div>No Balances</div>
return <div>
{total_by_asset.map( (total, asset_id) =>
<div key={asset_id}>
<FormattedAsset color="info" amount={total} asset={asset_id} />
</div>
).toArray()}
</div>
}
}
| import React, {Component, PropTypes} from "react";
import connectToStores from "alt/utils/connectToStores"
import BalanceClaimActiveStore from "stores/BalanceClaimActiveStore"
import FormattedAsset from "components/Utility/FormattedAsset";
@connectToStores
export default class BalanceClaimAssetTotals extends Component {
static getStores() {
return [BalanceClaimActiveStore]
}
static getPropsFromStores() {
var props = BalanceClaimActiveStore.getState()
return props
}
render() {
var total_by_asset = this.props.balances
.groupBy( v => v.balance.asset_id )
.map( l => l.reduce( (r,v) => r + Number(v.balance.amount), 0 ))
if( ! total_by_asset.size)
return <div>No balances to claim</div>
return <div>
{total_by_asset.map( (total, asset_id) =>
<div key={asset_id}>
<FormattedAsset color="info" amount={total} asset={asset_id} />
</div>
).toArray()}
</div>
}
}
| Clarify working: no balance claims | Clarify working: no balance claims
| JSX | mit | BitSharesEurope/testnet.bitshares.eu,BunkerChainLabsInc/freedomledger-wallet,bitshares/bitshares-ui,openledger/graphene-ui,poqdavid/graphene-ui,openledger/graphene-ui,poqdavid/graphene-ui,poqdavid/graphene-ui,BunkerChainLabsInc/freedomledger-wallet,BitSharesEurope/testnet.bitshares.eu,BitSharesEurope/graphene-ui-testnet,BunkerChainLabsInc/freedomledger-wallet,cryptonomex/graphene-ui,trendever/bitshares-ui,merivercap/bitshares-2-ui,valzav/graphene-ui,merivercap/bitshares-2-ui,merivercap/bitshares-2-ui,trendever/bitshares-ui,bitshares/bitshares-2-ui,BitSharesEurope/testnet.bitshares.eu,trendever/bitshares-ui,bitshares/bitshares-ui,poqdavid/graphene-ui,valzav/graphene-ui,openledger/graphene-ui,BunkerChainLabsInc/freedomledger-wallet,BitSharesEurope/graphene-ui-testnet,bitshares/bitshares-ui,valzav/graphene-ui,cryptonomex/graphene-ui,merivercap/bitshares-2-ui,bitshares/bitshares-2-ui,bitshares/bitshares-2-ui,BitSharesEurope/wallet.bitshares.eu,BitSharesEurope/graphene-ui-testnet,trendever/bitshares-ui,cryptonomex/graphene-ui,BitSharesEurope/wallet.bitshares.eu,BitSharesEurope/graphene-ui-testnet,bitshares/bitshares-ui,BitSharesEurope/testnet.bitshares.eu,BitSharesEurope/wallet.bitshares.eu,BitSharesEurope/wallet.bitshares.eu,valzav/graphene-ui | jsx | ## Code Before:
import React, {Component, PropTypes} from "react";
import connectToStores from "alt/utils/connectToStores"
import BalanceClaimActiveStore from "stores/BalanceClaimActiveStore"
import FormattedAsset from "components/Utility/FormattedAsset";
@connectToStores
export default class BalanceClaimAssetTotals extends Component {
static getStores() {
return [BalanceClaimActiveStore]
}
static getPropsFromStores() {
var props = BalanceClaimActiveStore.getState()
return props
}
render() {
var total_by_asset = this.props.balances
.groupBy( v => v.balance.asset_id )
.map( l => l.reduce( (r,v) => r + Number(v.balance.amount), 0 ))
if( ! total_by_asset.size)
return <div>No Balances</div>
return <div>
{total_by_asset.map( (total, asset_id) =>
<div key={asset_id}>
<FormattedAsset color="info" amount={total} asset={asset_id} />
</div>
).toArray()}
</div>
}
}
## Instruction:
Clarify working: no balance claims
## Code After:
import React, {Component, PropTypes} from "react";
import connectToStores from "alt/utils/connectToStores"
import BalanceClaimActiveStore from "stores/BalanceClaimActiveStore"
import FormattedAsset from "components/Utility/FormattedAsset";
@connectToStores
export default class BalanceClaimAssetTotals extends Component {
static getStores() {
return [BalanceClaimActiveStore]
}
static getPropsFromStores() {
var props = BalanceClaimActiveStore.getState()
return props
}
render() {
var total_by_asset = this.props.balances
.groupBy( v => v.balance.asset_id )
.map( l => l.reduce( (r,v) => r + Number(v.balance.amount), 0 ))
if( ! total_by_asset.size)
return <div>No balances to claim</div>
return <div>
{total_by_asset.map( (total, asset_id) =>
<div key={asset_id}>
<FormattedAsset color="info" amount={total} asset={asset_id} />
</div>
).toArray()}
</div>
}
}
| import React, {Component, PropTypes} from "react";
import connectToStores from "alt/utils/connectToStores"
import BalanceClaimActiveStore from "stores/BalanceClaimActiveStore"
import FormattedAsset from "components/Utility/FormattedAsset";
@connectToStores
export default class BalanceClaimAssetTotals extends Component {
static getStores() {
return [BalanceClaimActiveStore]
}
static getPropsFromStores() {
var props = BalanceClaimActiveStore.getState()
return props
}
render() {
var total_by_asset = this.props.balances
.groupBy( v => v.balance.asset_id )
.map( l => l.reduce( (r,v) => r + Number(v.balance.amount), 0 ))
if( ! total_by_asset.size)
- return <div>No Balances</div>
? ^
+ return <div>No balances to claim</div>
? ^ +++++++++
return <div>
{total_by_asset.map( (total, asset_id) =>
<div key={asset_id}>
<FormattedAsset color="info" amount={total} asset={asset_id} />
</div>
).toArray()}
</div>
}
}
| 2 | 0.054054 | 1 | 1 |
a5288e8c7b997f1f4116bd35e9d8dade533a0add | src/errors.coffee | src/errors.coffee | class ConsumerError extends Error
constructor: ->
super
class StoreError extends Error
constructor: ->
super
class ParameterError extends Error
constructor: ->
super
class SignatureError extends Error
constructor: ->
super
class NonceError extends Error
constructor: ->
super
module.exports =
ConsumerError: ConsumerError
StoreError: StoreError
ParameterError: ParameterError
SignatureError: SignatureError
NonceError: NonceError
| class ConsumerError extends Error
constructor: ->
super
class StoreError extends Error
constructor: ->
super
class ParameterError extends Error
constructor: ->
super
class SignatureError extends Error
constructor: ->
super
class NonceError extends Error
constructor: ->
super
class OutcomeResponseError extends Error
constructor: ->
super
module.exports =
ConsumerError: ConsumerError
StoreError: StoreError
ParameterError: ParameterError
SignatureError: SignatureError
NonceError: NonceError
OutcomeResponseError: OutcomeResponseError
| Add a new error for the outcomes service | Add a new error for the outcomes service
| CoffeeScript | mit | dmapper/ims-lti | coffeescript | ## Code Before:
class ConsumerError extends Error
constructor: ->
super
class StoreError extends Error
constructor: ->
super
class ParameterError extends Error
constructor: ->
super
class SignatureError extends Error
constructor: ->
super
class NonceError extends Error
constructor: ->
super
module.exports =
ConsumerError: ConsumerError
StoreError: StoreError
ParameterError: ParameterError
SignatureError: SignatureError
NonceError: NonceError
## Instruction:
Add a new error for the outcomes service
## Code After:
class ConsumerError extends Error
constructor: ->
super
class StoreError extends Error
constructor: ->
super
class ParameterError extends Error
constructor: ->
super
class SignatureError extends Error
constructor: ->
super
class NonceError extends Error
constructor: ->
super
class OutcomeResponseError extends Error
constructor: ->
super
module.exports =
ConsumerError: ConsumerError
StoreError: StoreError
ParameterError: ParameterError
SignatureError: SignatureError
NonceError: NonceError
OutcomeResponseError: OutcomeResponseError
| class ConsumerError extends Error
constructor: ->
super
class StoreError extends Error
constructor: ->
super
class ParameterError extends Error
constructor: ->
super
class SignatureError extends Error
constructor: ->
super
class NonceError extends Error
constructor: ->
super
+ class OutcomeResponseError extends Error
+ constructor: ->
+ super
module.exports =
ConsumerError: ConsumerError
StoreError: StoreError
ParameterError: ParameterError
SignatureError: SignatureError
NonceError: NonceError
+ OutcomeResponseError: OutcomeResponseError | 4 | 0.181818 | 4 | 0 |
99d37fba3ceaa0287efaa5e6fb7c270304961c0b | src/main/resources/pl1tb10.sql | src/main/resources/pl1tb10.sql | version https://git-lfs.github.com/spec/v1
oid sha256:acee4ec99930c401f2a9078a246ba54f8758d119dbd7b87fdbeec2af33dcad4e
size 2916070
| version https://git-lfs.github.com/spec/v1
oid sha256:bbf3c2458396e1b5e1f7ec9a228f16c91eb36e227e4a9d01730b04297fc0c516
size 52540217
| Update SQL dump with latest release | Update SQL dump with latest release
| SQL | apache-2.0 | ProgrammingLife2016/PL1-2016,ProgrammingLife2016/PL1-2016,ProgrammingLife2016/PL1-2016 | sql | ## Code Before:
version https://git-lfs.github.com/spec/v1
oid sha256:acee4ec99930c401f2a9078a246ba54f8758d119dbd7b87fdbeec2af33dcad4e
size 2916070
## Instruction:
Update SQL dump with latest release
## Code After:
version https://git-lfs.github.com/spec/v1
oid sha256:bbf3c2458396e1b5e1f7ec9a228f16c91eb36e227e4a9d01730b04297fc0c516
size 52540217
| version https://git-lfs.github.com/spec/v1
- oid sha256:acee4ec99930c401f2a9078a246ba54f8758d119dbd7b87fdbeec2af33dcad4e
- size 2916070
+ oid sha256:bbf3c2458396e1b5e1f7ec9a228f16c91eb36e227e4a9d01730b04297fc0c516
+ size 52540217 | 4 | 1.333333 | 2 | 2 |
727674673e36fbe262011c80d59c25c06b0d5201 | client/app/components/dashboards/edit-dashboard-dialog.html | client/app/components/dashboards/edit-dashboard-dialog.html | <div class="modal-header">
<button type="button" class="close" ng-click="$ctrl.dismiss()" ng-disabled="$ctrl.saveInProgress" aria-hidden="true">×</button>
<h4 class="modal-title">Edit: {{$ctrl.dashboard.name}}</h4>
</div>
<div class="modal-body">
<p>
<input type="text" class="form-control" placeholder="Dashboard Name" ng-model="$ctrl.dashboard.name" autofocus>
</p>
<p ng-if="$ctrl.dashboard.id">
<label>
<input name="input" type="checkbox" ng-model="$ctrl.dashboard.dashboard_filters_enabled">
Use Dashboard Level Filters
</label>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.dismiss()">Close</button>
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress || !$ctrl.isFormValid()" ng-click="$ctrl.saveDashboard()">Save</button>
</div>
| <div class="modal-header">
<button type="button" class="close" ng-click="$ctrl.dismiss()" ng-disabled="$ctrl.saveInProgress" aria-hidden="true">×</button>
<h4 class="modal-title">Dashboard name: {{$ctrl.dashboard.name}}</h4>
</div>
<div class="modal-body">
<p>
<input type="text" class="form-control" placeholder="Dashboard Name" ng-model="$ctrl.dashboard.name" autofocus>
</p>
<p ng-if="$ctrl.dashboard.id">
<label>
<input name="input" type="checkbox" ng-model="$ctrl.dashboard.dashboard_filters_enabled">
Use Dashboard Level Filters
</label>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.dismiss()">Close</button>
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress || !$ctrl.isFormValid()" ng-click="$ctrl.saveDashboard()">Save</button>
</div>
| Make Edit/New dashboard modal more obvious | Make Edit/New dashboard modal more obvious
| HTML | bsd-2-clause | getredash/redash,moritz9/redash,alexanderlz/redash,moritz9/redash,44px/redash,hudl/redash,getredash/redash,getredash/redash,hudl/redash,moritz9/redash,denisov-vlad/redash,crowdworks/redash,denisov-vlad/redash,chriszs/redash,hudl/redash,alexanderlz/redash,alexanderlz/redash,44px/redash,crowdworks/redash,chriszs/redash,moritz9/redash,44px/redash,denisov-vlad/redash,denisov-vlad/redash,chriszs/redash,denisov-vlad/redash,alexanderlz/redash,crowdworks/redash,chriszs/redash,crowdworks/redash,getredash/redash,getredash/redash,44px/redash,hudl/redash | html | ## Code Before:
<div class="modal-header">
<button type="button" class="close" ng-click="$ctrl.dismiss()" ng-disabled="$ctrl.saveInProgress" aria-hidden="true">×</button>
<h4 class="modal-title">Edit: {{$ctrl.dashboard.name}}</h4>
</div>
<div class="modal-body">
<p>
<input type="text" class="form-control" placeholder="Dashboard Name" ng-model="$ctrl.dashboard.name" autofocus>
</p>
<p ng-if="$ctrl.dashboard.id">
<label>
<input name="input" type="checkbox" ng-model="$ctrl.dashboard.dashboard_filters_enabled">
Use Dashboard Level Filters
</label>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.dismiss()">Close</button>
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress || !$ctrl.isFormValid()" ng-click="$ctrl.saveDashboard()">Save</button>
</div>
## Instruction:
Make Edit/New dashboard modal more obvious
## Code After:
<div class="modal-header">
<button type="button" class="close" ng-click="$ctrl.dismiss()" ng-disabled="$ctrl.saveInProgress" aria-hidden="true">×</button>
<h4 class="modal-title">Dashboard name: {{$ctrl.dashboard.name}}</h4>
</div>
<div class="modal-body">
<p>
<input type="text" class="form-control" placeholder="Dashboard Name" ng-model="$ctrl.dashboard.name" autofocus>
</p>
<p ng-if="$ctrl.dashboard.id">
<label>
<input name="input" type="checkbox" ng-model="$ctrl.dashboard.dashboard_filters_enabled">
Use Dashboard Level Filters
</label>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.dismiss()">Close</button>
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress || !$ctrl.isFormValid()" ng-click="$ctrl.saveDashboard()">Save</button>
</div>
| <div class="modal-header">
<button type="button" class="close" ng-click="$ctrl.dismiss()" ng-disabled="$ctrl.saveInProgress" aria-hidden="true">×</button>
- <h4 class="modal-title">Edit: {{$ctrl.dashboard.name}}</h4>
? ^ ^^
+ <h4 class="modal-title">Dashboard name: {{$ctrl.dashboard.name}}</h4>
? ^^^^^^^^ ^^^^^
</div>
<div class="modal-body">
<p>
<input type="text" class="form-control" placeholder="Dashboard Name" ng-model="$ctrl.dashboard.name" autofocus>
</p>
<p ng-if="$ctrl.dashboard.id">
<label>
<input name="input" type="checkbox" ng-model="$ctrl.dashboard.dashboard_filters_enabled">
Use Dashboard Level Filters
</label>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.dismiss()">Close</button>
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress || !$ctrl.isFormValid()" ng-click="$ctrl.saveDashboard()">Save</button>
</div> | 2 | 0.1 | 1 | 1 |
29b3976575e5952e44be9d0be2890f24a4170393 | doc/ex/opacity.rb | doc/ex/opacity.rb | require 'RMagick'
canvas = Magick::Image.new(260, 125)
gc = Magick::Draw.new
gc.fill('black')
gc.rectangle(10,20, 250,90)
gc.stroke('blue')
gc.fill('yellow')
gc.stroke_width(10)
gc.opacity('25%')
gc.roundrectangle(20,20, 60,90, 5,5)
gc.opacity('50%')
gc.roundrectangle(80,20, 120,90, 5,5)
gc.opacity(0.75)
gc.roundrectangle(140,20, 180,90, 5,5)
gc.opacity(1)
gc.roundrectangle(200,20, 240,90, 5,5)
gc.font_weight(Magick::NormalWeight)
gc.font_style(Magick::NormalStyle)
gc.stroke('transparent')
gc.fill('black')
gc.gravity(Magick::SouthGravity)
gc.text(-90,15, '"25%"')
gc.text(-30,15, '"50%"')
gc.text( 30,15, '"75%"')
gc.text( 90,15, '"100%"')
gc.draw(canvas)
canvas.matte = false
canvas.write("opacity.gif")
exit
| require 'RMagick'
canvas = Magick::Image.new(260, 125)
gc = Magick::Draw.new
gc.fill('black')
gc.rectangle(10,20, 250,90)
gc.stroke('blue')
gc.fill('yellow')
gc.stroke_width(10)
gc.opacity('25%')
gc.roundrectangle(20,20, 60,90, 5,5)
gc.opacity('50%')
gc.roundrectangle(80,20, 120,90, 5,5)
gc.opacity(0.75)
gc.roundrectangle(140,20, 180,90, 5,5)
gc.opacity(1)
gc.roundrectangle(200,20, 240,90, 5,5)
gc.font_weight(Magick::NormalWeight)
gc.font_style(Magick::NormalStyle)
gc.stroke('transparent')
gc.fill('black')
gc.gravity(Magick::SouthGravity)
gc.text(-90,15, '"25%"')
gc.text(-30,15, '"50%"')
gc.text( 30,15, '"75%"')
gc.text( 90,15, '"100%"')
gc.draw(canvas)
canvas.write("opacity.png")
exit
| Reset matte channel for better rendering | Reset matte channel for better rendering
| Ruby | mit | prognostikos/rmagick,apecherin/rmagick,mockdeep/rmagick,rmagick/rmagick,antonifs/rmagick,pecha7x/rmagick,apecherin/rmagick,chand3040/Rmagic,antonifs/rmagick,carsonreinke/rmagick,carsonreinke/rmagick,prognostikos/rmagick,jonmartindell/rmagick,antonifs/rmagick,carsonreinke/rmagick,pecha7x/rmagick,prognostikos/rmagick,rmagick-temp/rmagick,rmagick/rmagick,mockdeep/rmagick,tvon/rmagick,btakita/rmagick,jonmartindell/rmagick,tvon/rmagick,rmagick-temp/rmagick,tvon/rmagick,mockdeep/rmagick,chand3040/Rmagic,chand3040/Rmagic,modulexcite/rmagick,btakita/rmagick,modulexcite/rmagick,btakita/rmagick,rmagick-temp/rmagick,jonmartindell/rmagick,rmagick/rmagick,mockdeep/rmagick | ruby | ## Code Before:
require 'RMagick'
canvas = Magick::Image.new(260, 125)
gc = Magick::Draw.new
gc.fill('black')
gc.rectangle(10,20, 250,90)
gc.stroke('blue')
gc.fill('yellow')
gc.stroke_width(10)
gc.opacity('25%')
gc.roundrectangle(20,20, 60,90, 5,5)
gc.opacity('50%')
gc.roundrectangle(80,20, 120,90, 5,5)
gc.opacity(0.75)
gc.roundrectangle(140,20, 180,90, 5,5)
gc.opacity(1)
gc.roundrectangle(200,20, 240,90, 5,5)
gc.font_weight(Magick::NormalWeight)
gc.font_style(Magick::NormalStyle)
gc.stroke('transparent')
gc.fill('black')
gc.gravity(Magick::SouthGravity)
gc.text(-90,15, '"25%"')
gc.text(-30,15, '"50%"')
gc.text( 30,15, '"75%"')
gc.text( 90,15, '"100%"')
gc.draw(canvas)
canvas.matte = false
canvas.write("opacity.gif")
exit
## Instruction:
Reset matte channel for better rendering
## Code After:
require 'RMagick'
canvas = Magick::Image.new(260, 125)
gc = Magick::Draw.new
gc.fill('black')
gc.rectangle(10,20, 250,90)
gc.stroke('blue')
gc.fill('yellow')
gc.stroke_width(10)
gc.opacity('25%')
gc.roundrectangle(20,20, 60,90, 5,5)
gc.opacity('50%')
gc.roundrectangle(80,20, 120,90, 5,5)
gc.opacity(0.75)
gc.roundrectangle(140,20, 180,90, 5,5)
gc.opacity(1)
gc.roundrectangle(200,20, 240,90, 5,5)
gc.font_weight(Magick::NormalWeight)
gc.font_style(Magick::NormalStyle)
gc.stroke('transparent')
gc.fill('black')
gc.gravity(Magick::SouthGravity)
gc.text(-90,15, '"25%"')
gc.text(-30,15, '"50%"')
gc.text( 30,15, '"75%"')
gc.text( 90,15, '"100%"')
gc.draw(canvas)
canvas.write("opacity.png")
exit
| require 'RMagick'
canvas = Magick::Image.new(260, 125)
gc = Magick::Draw.new
gc.fill('black')
gc.rectangle(10,20, 250,90)
gc.stroke('blue')
gc.fill('yellow')
gc.stroke_width(10)
gc.opacity('25%')
gc.roundrectangle(20,20, 60,90, 5,5)
gc.opacity('50%')
gc.roundrectangle(80,20, 120,90, 5,5)
gc.opacity(0.75)
gc.roundrectangle(140,20, 180,90, 5,5)
gc.opacity(1)
gc.roundrectangle(200,20, 240,90, 5,5)
gc.font_weight(Magick::NormalWeight)
gc.font_style(Magick::NormalStyle)
gc.stroke('transparent')
gc.fill('black')
gc.gravity(Magick::SouthGravity)
gc.text(-90,15, '"25%"')
gc.text(-30,15, '"50%"')
gc.text( 30,15, '"75%"')
gc.text( 90,15, '"100%"')
gc.draw(canvas)
- canvas.matte = false
- canvas.write("opacity.gif")
? --
+ canvas.write("opacity.png")
? ++
exit | 3 | 0.081081 | 1 | 2 |
37aaf42f8c6325bf37d8b1f6266f49ae9d7c7d4a | .travis.yml | .travis.yml | language: php
php:
- '5.6'
- '7.0'
install:
- composer install
| language: php
script: phpunit --bootstrap src/autoload.php tests
php:
- '5.6'
- '7.0'
install:
- composer install
| Make Travis run phpunit with required args. | Make Travis run phpunit with required args.
| YAML | bsd-2-clause | imgix/imgix-php | yaml | ## Code Before:
language: php
php:
- '5.6'
- '7.0'
install:
- composer install
## Instruction:
Make Travis run phpunit with required args.
## Code After:
language: php
script: phpunit --bootstrap src/autoload.php tests
php:
- '5.6'
- '7.0'
install:
- composer install
| language: php
+ script: phpunit --bootstrap src/autoload.php tests
php:
- '5.6'
- '7.0'
install:
- composer install | 1 | 0.166667 | 1 | 0 |
5f4870eadd82ae09ffd01d419166c054ced2196b | app/templates/birdfeeder/index-signed-in.html | app/templates/birdfeeder/index-signed-in.html | {% extends "base/page.html" %}
{% block title %}{{ APP_NAME}} : Bird Feeder{% endblock %}
{% block subtitle %}Bird Feeder{% endblock %}
{% block intro %}
{% include "intro.snippet" %}
<p>You're signed in as {{ twitter_user.screen_name}}.
<a href="{{ sign_out_path }}">Sign out</a>.</p>
{% endblock %}
{% block body %}
<div id="birdfeeder-feed-container">
<a href="{{ timeline_feed_url }}" class="feed-link">@{{ twitter_user.screen_name }} timeline feed</a>
-
<a href="{{ timeline_reader_url }}">View in Google Reader</a>
</div>
{% endblock %}
{% block footer %}
{% include "footer.snippet" %}
If that happens, you may wish to <span class="link"
id="birdfeeder-reset-feed-id">reset</span> your feed URL (the old items will
still be available under the old URL, but new items will only come in on the
new URL).
<script>streamspigot.birdfeeder.init();</script>
{% endblock %}
| {% extends "base/page.html" %}
{% block title %}{{ APP_NAME}} : Bird Feeder{% endblock %}
{% block subtitle %}Bird Feeder{% endblock %}
{% block intro %}
{% include "intro.snippet" %}
<p>You're signed in as {{ twitter_user.screen_name}}.
<a href="{{ sign_out_path }}">Sign out</a>.</p>
{% endblock %}
{% block body %}
<div id="birdfeeder-feed-container">
<a href="{{ timeline_feed_url }}" class="feed-link">@{{ twitter_user.screen_name }} timeline feed</a>
-
<a href="{{ timeline_reader_url }}">View in Google Reader</a>
</div>
{% endblock %}
{% block footer %}
{% include "footer.snippet" %}
If that happens, you may wish to <span class="link"
id="birdfeeder-reset-feed-id">reset</span> your feed URL (the old items will
still be cached by Reader under the old URL, but new items will only come in
on the new URL).
<script>streamspigot.birdfeeder.init();</script>
{% endblock %}
| Clarify what happens when a Bird Feeder feed URL is reset. | Clarify what happens when a Bird Feeder feed URL is reset.
| HTML | apache-2.0 | mihaip/streamspigot,mihaip/streamspigot,mihaip/streamspigot,mihaip/streamspigot | html | ## Code Before:
{% extends "base/page.html" %}
{% block title %}{{ APP_NAME}} : Bird Feeder{% endblock %}
{% block subtitle %}Bird Feeder{% endblock %}
{% block intro %}
{% include "intro.snippet" %}
<p>You're signed in as {{ twitter_user.screen_name}}.
<a href="{{ sign_out_path }}">Sign out</a>.</p>
{% endblock %}
{% block body %}
<div id="birdfeeder-feed-container">
<a href="{{ timeline_feed_url }}" class="feed-link">@{{ twitter_user.screen_name }} timeline feed</a>
-
<a href="{{ timeline_reader_url }}">View in Google Reader</a>
</div>
{% endblock %}
{% block footer %}
{% include "footer.snippet" %}
If that happens, you may wish to <span class="link"
id="birdfeeder-reset-feed-id">reset</span> your feed URL (the old items will
still be available under the old URL, but new items will only come in on the
new URL).
<script>streamspigot.birdfeeder.init();</script>
{% endblock %}
## Instruction:
Clarify what happens when a Bird Feeder feed URL is reset.
## Code After:
{% extends "base/page.html" %}
{% block title %}{{ APP_NAME}} : Bird Feeder{% endblock %}
{% block subtitle %}Bird Feeder{% endblock %}
{% block intro %}
{% include "intro.snippet" %}
<p>You're signed in as {{ twitter_user.screen_name}}.
<a href="{{ sign_out_path }}">Sign out</a>.</p>
{% endblock %}
{% block body %}
<div id="birdfeeder-feed-container">
<a href="{{ timeline_feed_url }}" class="feed-link">@{{ twitter_user.screen_name }} timeline feed</a>
-
<a href="{{ timeline_reader_url }}">View in Google Reader</a>
</div>
{% endblock %}
{% block footer %}
{% include "footer.snippet" %}
If that happens, you may wish to <span class="link"
id="birdfeeder-reset-feed-id">reset</span> your feed URL (the old items will
still be cached by Reader under the old URL, but new items will only come in
on the new URL).
<script>streamspigot.birdfeeder.init();</script>
{% endblock %}
| {% extends "base/page.html" %}
{% block title %}{{ APP_NAME}} : Bird Feeder{% endblock %}
{% block subtitle %}Bird Feeder{% endblock %}
{% block intro %}
{% include "intro.snippet" %}
<p>You're signed in as {{ twitter_user.screen_name}}.
<a href="{{ sign_out_path }}">Sign out</a>.</p>
{% endblock %}
{% block body %}
<div id="birdfeeder-feed-container">
<a href="{{ timeline_feed_url }}" class="feed-link">@{{ twitter_user.screen_name }} timeline feed</a>
-
<a href="{{ timeline_reader_url }}">View in Google Reader</a>
</div>
{% endblock %}
{% block footer %}
{% include "footer.snippet" %}
If that happens, you may wish to <span class="link"
id="birdfeeder-reset-feed-id">reset</span> your feed URL (the old items will
- still be available under the old URL, but new items will only come in on the
? ^ ^^^^^ -------
+ still be cached by Reader under the old URL, but new items will only come in
? + ^^^^^^^^^^ ^ +
- new URL).
+ on the new URL).
? +++++++
<script>streamspigot.birdfeeder.init();</script>
{% endblock %} | 4 | 0.125 | 2 | 2 |
ad92334950a29dbae2388c795bc086c71cc5649b | build/mocha-test.js | build/mocha-test.js | 'use strict';
require('../node_modules/babel-core/register');
var src = [
'tests/lib/*.js',
'tests/lib/parser/properties/*.js',
'tests/lib/parser/l20n/*.js',
'tests/lib/resolver/*.js',
'tests/lib/context/*.js',
'tests/lib/env/*.js',
];
module.exports = {
dot: {
options: {
reporter: 'dot',
},
src: src,
}
};
| 'use strict';
require('babel-register')({
presets: ['es2015']
});
var src = [
'tests/lib/*.js',
'tests/lib/parser/properties/*.js',
'tests/lib/parser/l20n/*.js',
'tests/lib/resolver/*.js',
'tests/lib/context/*.js',
'tests/lib/env/*.js',
];
module.exports = {
dot: {
options: {
reporter: 'dot',
},
src: src,
}
};
| Make mocha work with babel6 | Make mocha work with babel6
| JavaScript | apache-2.0 | projectfluent/fluent.js,projectfluent/fluent.js,stasm/l20n.js,projectfluent/fluent.js,zbraniecki/l20n.js,zbraniecki/fluent.js,zbraniecki/fluent.js,l20n/l20n.js | javascript | ## Code Before:
'use strict';
require('../node_modules/babel-core/register');
var src = [
'tests/lib/*.js',
'tests/lib/parser/properties/*.js',
'tests/lib/parser/l20n/*.js',
'tests/lib/resolver/*.js',
'tests/lib/context/*.js',
'tests/lib/env/*.js',
];
module.exports = {
dot: {
options: {
reporter: 'dot',
},
src: src,
}
};
## Instruction:
Make mocha work with babel6
## Code After:
'use strict';
require('babel-register')({
presets: ['es2015']
});
var src = [
'tests/lib/*.js',
'tests/lib/parser/properties/*.js',
'tests/lib/parser/l20n/*.js',
'tests/lib/resolver/*.js',
'tests/lib/context/*.js',
'tests/lib/env/*.js',
];
module.exports = {
dot: {
options: {
reporter: 'dot',
},
src: src,
}
};
| 'use strict';
- require('../node_modules/babel-core/register');
+ require('babel-register')({
+ presets: ['es2015']
+ });
var src = [
'tests/lib/*.js',
'tests/lib/parser/properties/*.js',
'tests/lib/parser/l20n/*.js',
'tests/lib/resolver/*.js',
'tests/lib/context/*.js',
'tests/lib/env/*.js',
];
module.exports = {
dot: {
options: {
reporter: 'dot',
},
src: src,
}
}; | 4 | 0.190476 | 3 | 1 |
cd3656cb067fe6eaa035a5bc8cbbec8eff6fd47b | composer.json | composer.json | {
"name": "sschiau/particle",
"version": "2.2.2",
"repositories": [{
"type": "git",
"url": "git@github.com:sschiau/Particle.git"
}],
"license": "LICENSE.MD",
"authors": [{
"name": "Silviu Schiau",
"email": "pr@silviu.co",
"homepage": "http://www.silviu.co"
}],
"support": {
"issues": "https://github.com/sschiau/Particle/issues"
},
"require": {
"php": "^7.1.7"
},
"autoload": {
"files": [
"Sources/Particle.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
}
| {
"name": "sschiau/particle",
"version": "2.2.3",
"repositories": [{
"type": "git",
"url": "git@github.com:sschiau/Particle.git"
}],
"license": "MIT",
"authors": [{
"name": "Silviu Schiau",
"email": "pr@silviu.co",
"homepage": "http://www.silviu.co"
}],
"support": {
"issues": "https://github.com/sschiau/Particle/issues"
},
"require": {
"php": "^7.1.7"
},
"autoload": {
"files": [
"Sources/Particle.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
}
| Change to valid SPDX license identifier | Change to valid SPDX license identifier
+ bump version to 2.2.3 | JSON | apache-2.0 | sschiau/Particle.php,sschiau/Particle | json | ## Code Before:
{
"name": "sschiau/particle",
"version": "2.2.2",
"repositories": [{
"type": "git",
"url": "git@github.com:sschiau/Particle.git"
}],
"license": "LICENSE.MD",
"authors": [{
"name": "Silviu Schiau",
"email": "pr@silviu.co",
"homepage": "http://www.silviu.co"
}],
"support": {
"issues": "https://github.com/sschiau/Particle/issues"
},
"require": {
"php": "^7.1.7"
},
"autoload": {
"files": [
"Sources/Particle.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
}
## Instruction:
Change to valid SPDX license identifier
+ bump version to 2.2.3
## Code After:
{
"name": "sschiau/particle",
"version": "2.2.3",
"repositories": [{
"type": "git",
"url": "git@github.com:sschiau/Particle.git"
}],
"license": "MIT",
"authors": [{
"name": "Silviu Schiau",
"email": "pr@silviu.co",
"homepage": "http://www.silviu.co"
}],
"support": {
"issues": "https://github.com/sschiau/Particle/issues"
},
"require": {
"php": "^7.1.7"
},
"autoload": {
"files": [
"Sources/Particle.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
}
| {
"name": "sschiau/particle",
- "version": "2.2.2",
? ^
+ "version": "2.2.3",
? ^
"repositories": [{
"type": "git",
"url": "git@github.com:sschiau/Particle.git"
}],
- "license": "LICENSE.MD",
? ^ ^^^^^^^^
+ "license": "MIT",
? ^ ^
"authors": [{
"name": "Silviu Schiau",
"email": "pr@silviu.co",
"homepage": "http://www.silviu.co"
}],
"support": {
"issues": "https://github.com/sschiau/Particle/issues"
},
"require": {
"php": "^7.1.7"
},
"autoload": {
"files": [
"Sources/Particle.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
} | 4 | 0.142857 | 2 | 2 |
38460a9fe52b1e60ce65bb2c17df9c6578ee26dc | app/templates/src/main/resources/config/_application.yml | app/templates/src/main/resources/config/_application.yml | management.security.enabled: true
security.basic.enabled: false
# Disable Jolokia - An http/json bridge for remote JMX access
endpoints.jolokia.enabled: false
# security configuration (this key should be unique for your application, and kept secret)
jhipster.security.rememberme.key: <%= baseName %>
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
spring:
mail:
host: localhost
port: 25
user:
password:
protocol: smtp
tls: false
auth: false
from: <%= baseName %>@localhost
messageSource:
cacheSeconds: 1<% if (authenticationType == 'token') { %>
authentication:
oauth:
clientid: <%= baseName %>app
secret: mySecretOAuthSecret
# Token is valid 30 minutes
tokenValidityInSeconds: 1800<% } %>
swagger:
title: <%=baseName%> API
description: <%=baseName%> applications and beyond!
termsOfServiceUrl: http://jhipster.github.io/
contact:
license: Apache 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.html
| management.security.enabled: true
security.basic.enabled: false
# Disable Jolokia - An http/json bridge for remote JMX access
endpoints.jolokia.enabled: false
# security configuration (this key should be unique for your application, and kept secret)
jhipster.security.rememberme.key: <%= baseName %>
# Disable the check on unknown properties
spring.jackson.deserialization:
FAIL_ON_UNKNOWN_PROPERTIES: false
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
spring:
mail:
host: localhost
port: 25
user:
password:
protocol: smtp
tls: false
auth: false
from: <%= baseName %>@localhost
messageSource:
cacheSeconds: 1<% if (authenticationType == 'token') { %>
authentication:
oauth:
clientid: <%= baseName %>app
secret: mySecretOAuthSecret
# Token is valid 30 minutes
tokenValidityInSeconds: 1800<% } %>
swagger:
title: <%=baseName%> API
description: <%=baseName%> applications and beyond!
termsOfServiceUrl: http://jhipster.github.io/
contact:
license: Apache 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.html
| Remove the validation of unknow properties | Remove the validation of unknow properties
| YAML | apache-2.0 | ctamisier/generator-jhipster,atomfrede/generator-jhipster,xetys/generator-jhipster,wmarques/generator-jhipster,dalbelap/generator-jhipster,xetys/generator-jhipster,jkutner/generator-jhipster,sendilkumarn/generator-jhipster,dimeros/generator-jhipster,cbornet/generator-jhipster,siliconharborlabs/generator-jhipster,danielpetisme/generator-jhipster,maniacneron/generator-jhipster,robertmilowski/generator-jhipster,atomfrede/generator-jhipster,maniacneron/generator-jhipster,dimeros/generator-jhipster,nkolosnjaji/generator-jhipster,lrkwz/generator-jhipster,yongli82/generator-jhipster,siliconharborlabs/generator-jhipster,sohibegit/generator-jhipster,gmarziou/generator-jhipster,pascalgrimaud/generator-jhipster,eosimosu/generator-jhipster,sendilkumarn/generator-jhipster,mosoft521/generator-jhipster,ziogiugno/generator-jhipster,atomfrede/generator-jhipster,duderoot/generator-jhipster,PierreBesson/generator-jhipster,robertmilowski/generator-jhipster,dynamicguy/generator-jhipster,jhipster/generator-jhipster,sohibegit/generator-jhipster,pascalgrimaud/generator-jhipster,pascalgrimaud/generator-jhipster,PierreBesson/generator-jhipster,jkutner/generator-jhipster,erikkemperman/generator-jhipster,robertmilowski/generator-jhipster,yongli82/generator-jhipster,rkohel/generator-jhipster,JulienMrgrd/generator-jhipster,Tcharl/generator-jhipster,wmarques/generator-jhipster,deepu105/generator-jhipster,ziogiugno/generator-jhipster,siliconharborlabs/generator-jhipster,ctamisier/generator-jhipster,erikkemperman/generator-jhipster,pascalgrimaud/generator-jhipster,yongli82/generator-jhipster,siliconharborlabs/generator-jhipster,vivekmore/generator-jhipster,deepu105/generator-jhipster,jhipster/generator-jhipster,dimeros/generator-jhipster,rkohel/generator-jhipster,ziogiugno/generator-jhipster,vivekmore/generator-jhipster,PierreBesson/generator-jhipster,stevehouel/generator-jhipster,wmarques/generator-jhipster,xetys/generator-jhipster,mosoft521/generator-jhipster,hdurix/generator-jhipster,jkutner/generator-jhipster,mraible/generator-jhipster,yongli82/generator-jhipster,rifatdover/generator-jhipster,cbornet/generator-jhipster,yongli82/generator-jhipster,gmarziou/generator-jhipster,dynamicguy/generator-jhipster,danielpetisme/generator-jhipster,nkolosnjaji/generator-jhipster,eosimosu/generator-jhipster,PierreBesson/generator-jhipster,gzsombor/generator-jhipster,gzsombor/generator-jhipster,siliconharborlabs/generator-jhipster,vivekmore/generator-jhipster,jhipster/generator-jhipster,jhipster/generator-jhipster,gzsombor/generator-jhipster,vivekmore/generator-jhipster,dimeros/generator-jhipster,liseri/generator-jhipster,baskeboler/generator-jhipster,mraible/generator-jhipster,duderoot/generator-jhipster,deepu105/generator-jhipster,dalbelap/generator-jhipster,erikkemperman/generator-jhipster,hdurix/generator-jhipster,maniacneron/generator-jhipster,dynamicguy/generator-jhipster,mraible/generator-jhipster,ramzimaalej/generator-jhipster,ctamisier/generator-jhipster,cbornet/generator-jhipster,JulienMrgrd/generator-jhipster,ctamisier/generator-jhipster,rkohel/generator-jhipster,baskeboler/generator-jhipster,dalbelap/generator-jhipster,deepu105/generator-jhipster,danielpetisme/generator-jhipster,PierreBesson/generator-jhipster,JulienMrgrd/generator-jhipster,ramzimaalej/generator-jhipster,erikkemperman/generator-jhipster,sohibegit/generator-jhipster,jhipster/generator-jhipster,maniacneron/generator-jhipster,JulienMrgrd/generator-jhipster,Tcharl/generator-jhipster,vivekmore/generator-jhipster,danielpetisme/generator-jhipster,dalbelap/generator-jhipster,robertmilowski/generator-jhipster,hdurix/generator-jhipster,lrkwz/generator-jhipster,jkutner/generator-jhipster,dynamicguy/generator-jhipster,baskeboler/generator-jhipster,stevehouel/generator-jhipster,stevehouel/generator-jhipster,eosimosu/generator-jhipster,duderoot/generator-jhipster,sohibegit/generator-jhipster,gmarziou/generator-jhipster,mraible/generator-jhipster,lrkwz/generator-jhipster,pascalgrimaud/generator-jhipster,eosimosu/generator-jhipster,ramzimaalej/generator-jhipster,gzsombor/generator-jhipster,gmarziou/generator-jhipster,dalbelap/generator-jhipster,ziogiugno/generator-jhipster,ruddell/generator-jhipster,nkolosnjaji/generator-jhipster,JulienMrgrd/generator-jhipster,deepu105/generator-jhipster,gzsombor/generator-jhipster,mosoft521/generator-jhipster,liseri/generator-jhipster,ziogiugno/generator-jhipster,Tcharl/generator-jhipster,ruddell/generator-jhipster,liseri/generator-jhipster,mosoft521/generator-jhipster,maniacneron/generator-jhipster,stevehouel/generator-jhipster,mraible/generator-jhipster,lrkwz/generator-jhipster,cbornet/generator-jhipster,wmarques/generator-jhipster,sendilkumarn/generator-jhipster,gmarziou/generator-jhipster,jkutner/generator-jhipster,atomfrede/generator-jhipster,xetys/generator-jhipster,sendilkumarn/generator-jhipster,mosoft521/generator-jhipster,dimeros/generator-jhipster,eosimosu/generator-jhipster,cbornet/generator-jhipster,rkohel/generator-jhipster,stevehouel/generator-jhipster,liseri/generator-jhipster,baskeboler/generator-jhipster,rkohel/generator-jhipster,hdurix/generator-jhipster,robertmilowski/generator-jhipster,nkolosnjaji/generator-jhipster,rifatdover/generator-jhipster,duderoot/generator-jhipster,baskeboler/generator-jhipster,wmarques/generator-jhipster,ruddell/generator-jhipster,ruddell/generator-jhipster,Tcharl/generator-jhipster,atomfrede/generator-jhipster,Tcharl/generator-jhipster,erikkemperman/generator-jhipster,liseri/generator-jhipster,hdurix/generator-jhipster,nkolosnjaji/generator-jhipster,duderoot/generator-jhipster,sohibegit/generator-jhipster,danielpetisme/generator-jhipster,sendilkumarn/generator-jhipster,rifatdover/generator-jhipster,ctamisier/generator-jhipster,ruddell/generator-jhipster,lrkwz/generator-jhipster | yaml | ## Code Before:
management.security.enabled: true
security.basic.enabled: false
# Disable Jolokia - An http/json bridge for remote JMX access
endpoints.jolokia.enabled: false
# security configuration (this key should be unique for your application, and kept secret)
jhipster.security.rememberme.key: <%= baseName %>
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
spring:
mail:
host: localhost
port: 25
user:
password:
protocol: smtp
tls: false
auth: false
from: <%= baseName %>@localhost
messageSource:
cacheSeconds: 1<% if (authenticationType == 'token') { %>
authentication:
oauth:
clientid: <%= baseName %>app
secret: mySecretOAuthSecret
# Token is valid 30 minutes
tokenValidityInSeconds: 1800<% } %>
swagger:
title: <%=baseName%> API
description: <%=baseName%> applications and beyond!
termsOfServiceUrl: http://jhipster.github.io/
contact:
license: Apache 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.html
## Instruction:
Remove the validation of unknow properties
## Code After:
management.security.enabled: true
security.basic.enabled: false
# Disable Jolokia - An http/json bridge for remote JMX access
endpoints.jolokia.enabled: false
# security configuration (this key should be unique for your application, and kept secret)
jhipster.security.rememberme.key: <%= baseName %>
# Disable the check on unknown properties
spring.jackson.deserialization:
FAIL_ON_UNKNOWN_PROPERTIES: false
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
spring:
mail:
host: localhost
port: 25
user:
password:
protocol: smtp
tls: false
auth: false
from: <%= baseName %>@localhost
messageSource:
cacheSeconds: 1<% if (authenticationType == 'token') { %>
authentication:
oauth:
clientid: <%= baseName %>app
secret: mySecretOAuthSecret
# Token is valid 30 minutes
tokenValidityInSeconds: 1800<% } %>
swagger:
title: <%=baseName%> API
description: <%=baseName%> applications and beyond!
termsOfServiceUrl: http://jhipster.github.io/
contact:
license: Apache 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.html
| management.security.enabled: true
security.basic.enabled: false
# Disable Jolokia - An http/json bridge for remote JMX access
endpoints.jolokia.enabled: false
# security configuration (this key should be unique for your application, and kept secret)
jhipster.security.rememberme.key: <%= baseName %>
+
+ # Disable the check on unknown properties
+ spring.jackson.deserialization:
+ FAIL_ON_UNKNOWN_PROPERTIES: false
+
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
spring:
mail:
host: localhost
port: 25
user:
password:
protocol: smtp
tls: false
auth: false
from: <%= baseName %>@localhost
messageSource:
cacheSeconds: 1<% if (authenticationType == 'token') { %>
authentication:
oauth:
clientid: <%= baseName %>app
secret: mySecretOAuthSecret
# Token is valid 30 minutes
tokenValidityInSeconds: 1800<% } %>
swagger:
title: <%=baseName%> API
description: <%=baseName%> applications and beyond!
termsOfServiceUrl: http://jhipster.github.io/
contact:
license: Apache 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.html | 5 | 0.119048 | 5 | 0 |
0c52ce47db4b79e7f1a08ea58296b69fbc58501a | README.md | README.md | Learning tool for basic arithmetic
Version 1.0 Features
====================
1. Choice of operators (+,-, *, /)
2. Displays helper tables after second incorrect guess for a question
3. Displays the number of questions, guesses and correct answers
4. Displays a grade on test completion
Future Releases
===============
1. Add unit tests
2. Use a configurable range of factors (beyond 1 to 12) - take data types (byte,int) into account
3. Have a configurable number of questions
4. Have a random operator to test multiple operators in same test
5. Better error handling
| Learning tool for basic arithmetic
Version 1.0 Features
====================
1. Choice of operators (+,-, *, /)
2. Displays helper tables after second incorrect guess for a question
3. Displays the number of questions, guesses and correct answers
4. Displays a grade on test completion
Version 1.1 Features
====================
1. Better error handling
Future Releases
===============
1. Add unit tests
2. Use a configurable range of factors (beyond 1 to 12) - take data types (byte,int) into account
3. Have a configurable number of questions
4. Have a random operator to test multiple operators in same test
| Update Readme with v1.1 features | Update Readme with v1.1 features
| Markdown | mit | wiganlatics/arithmetic-tester | markdown | ## Code Before:
Learning tool for basic arithmetic
Version 1.0 Features
====================
1. Choice of operators (+,-, *, /)
2. Displays helper tables after second incorrect guess for a question
3. Displays the number of questions, guesses and correct answers
4. Displays a grade on test completion
Future Releases
===============
1. Add unit tests
2. Use a configurable range of factors (beyond 1 to 12) - take data types (byte,int) into account
3. Have a configurable number of questions
4. Have a random operator to test multiple operators in same test
5. Better error handling
## Instruction:
Update Readme with v1.1 features
## Code After:
Learning tool for basic arithmetic
Version 1.0 Features
====================
1. Choice of operators (+,-, *, /)
2. Displays helper tables after second incorrect guess for a question
3. Displays the number of questions, guesses and correct answers
4. Displays a grade on test completion
Version 1.1 Features
====================
1. Better error handling
Future Releases
===============
1. Add unit tests
2. Use a configurable range of factors (beyond 1 to 12) - take data types (byte,int) into account
3. Have a configurable number of questions
4. Have a random operator to test multiple operators in same test
| Learning tool for basic arithmetic
Version 1.0 Features
====================
1. Choice of operators (+,-, *, /)
2. Displays helper tables after second incorrect guess for a question
3. Displays the number of questions, guesses and correct answers
4. Displays a grade on test completion
+ Version 1.1 Features
+ ====================
+ 1. Better error handling
+
Future Releases
===============
1. Add unit tests
2. Use a configurable range of factors (beyond 1 to 12) - take data types (byte,int) into account
3. Have a configurable number of questions
4. Have a random operator to test multiple operators in same test
- 5. Better error handling | 5 | 0.3125 | 4 | 1 |
963f38a31ae7dd6966af603d7b1e638ed3842e81 | _posts/help/2015-01-14-shortcuts.md | _posts/help/2015-01-14-shortcuts.md | ---
layout: post
title: "Shortcuts"
date: 2015-06-11 04:23:18 MDT
categories: help
position: 6
---
`1` Toggle Drawer
`2` Focus Omnibar
`F` Navigate to Friends stream
`N` Navigate to Noise stream
`R` Open notifications
`=` Toggle grid mode for main content
`+` Toggle grid mode for drawer content
`?` Show help modal
`CMD/CTRL + Enter` Submit a post or comment.
| ---
layout: post
title: "Shortcuts"
date: 2015-06-11 04:23:18 MDT
categories: help
position: 6
---
`2` Focus Omnibar
`F` Navigate to Friends stream
`N` Navigate to Noise stream
`R` Navigate to Notifications
`S` Navigate to Search
`D` Navigate to Discover
`=` Toggle grid mode for main content
`+` Toggle grid mode for drawer content
`?` Show help modal
`CMD/CTRL + Enter` Submit a post or comment.
| Update shortcuts for fast panels release. | Update shortcuts for fast panels release. | Markdown | mit | ello/wtf,ello/wtf,ello/wtf | markdown | ## Code Before:
---
layout: post
title: "Shortcuts"
date: 2015-06-11 04:23:18 MDT
categories: help
position: 6
---
`1` Toggle Drawer
`2` Focus Omnibar
`F` Navigate to Friends stream
`N` Navigate to Noise stream
`R` Open notifications
`=` Toggle grid mode for main content
`+` Toggle grid mode for drawer content
`?` Show help modal
`CMD/CTRL + Enter` Submit a post or comment.
## Instruction:
Update shortcuts for fast panels release.
## Code After:
---
layout: post
title: "Shortcuts"
date: 2015-06-11 04:23:18 MDT
categories: help
position: 6
---
`2` Focus Omnibar
`F` Navigate to Friends stream
`N` Navigate to Noise stream
`R` Navigate to Notifications
`S` Navigate to Search
`D` Navigate to Discover
`=` Toggle grid mode for main content
`+` Toggle grid mode for drawer content
`?` Show help modal
`CMD/CTRL + Enter` Submit a post or comment.
| ---
layout: post
title: "Shortcuts"
date: 2015-06-11 04:23:18 MDT
categories: help
position: 6
---
- `1` Toggle Drawer
-
`2` Focus Omnibar
`F` Navigate to Friends stream
`N` Navigate to Noise stream
- `R` Open notifications
+ `R` Navigate to Notifications
+
+ `S` Navigate to Search
+
+ `D` Navigate to Discover
`=` Toggle grid mode for main content
`+` Toggle grid mode for drawer content
`?` Show help modal
`CMD/CTRL + Enter` Submit a post or comment. | 8 | 0.32 | 5 | 3 |
1c5b2be934de38ad34d75ac443da434cc4eeef13 | tutorials-master.md | tutorials-master.md | *Last Modified: INSERT_DATE*
## Getting Started
[tutorials/_getting_started.md]
## Data Collection
[tutorials/_data_collection.md]
## Data Viewing
[tutorials/_data_viewing.md]
## Data Analysis
[tutorials/_data_analysis.md]
## Protocols
[tutorials/_building_a_protocol.md]
## Macros
[tutorials/_building_a_macro.md]
## More
+ [Tutorials](https://photosynq.org/tutorials)
+ [Forums](https://photosynq.org/forums)
+ [Frequently Asked Questions](https://photosynq.org/faq)
+ [Latest Updates (Blog)](https://blog.photosynq.org/)
+ [Documentation](https://photosynq.org/documentation)
+ [Videos (<i class="fa fa-youtube"></i> YouTube)](https://www.youtube.com/channel/UCvJrVf_OUX8ukD01AjmDwSg)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | *Last Modified: INSERT_DATE*
## Getting Started
[tutorials/_getting_started.md]
## Data Collection
[tutorials/_data_collection.md]
## Data Viewing
[tutorials/_data_viewing.md]
## Data Analysis
[tutorials/_data_analysis.md]
## Protocols
[tutorials/_building_a_protocol.md]
## Macros
[tutorials/_building_a_macro.md]
## Help More
+ [Help](https://photosynq.org/help)
+ [Forums](https://photosynq.org/forums)
+ [Latest Updates (Blog)](https://blog.photosynq.org/)
+ [API (Documentation)](https://photosynq.org/rdoc)
+ [Videos (YouTube)](https://www.youtube.com/channel/UCvJrVf_OUX8ukD01AjmDwSg)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | Update footer for tutorials master | Update footer for tutorials master
| Markdown | mit | Photosynq/PhotosynQ-Documentation | markdown | ## Code Before:
*Last Modified: INSERT_DATE*
## Getting Started
[tutorials/_getting_started.md]
## Data Collection
[tutorials/_data_collection.md]
## Data Viewing
[tutorials/_data_viewing.md]
## Data Analysis
[tutorials/_data_analysis.md]
## Protocols
[tutorials/_building_a_protocol.md]
## Macros
[tutorials/_building_a_macro.md]
## More
+ [Tutorials](https://photosynq.org/tutorials)
+ [Forums](https://photosynq.org/forums)
+ [Frequently Asked Questions](https://photosynq.org/faq)
+ [Latest Updates (Blog)](https://blog.photosynq.org/)
+ [Documentation](https://photosynq.org/documentation)
+ [Videos (<i class="fa fa-youtube"></i> YouTube)](https://www.youtube.com/channel/UCvJrVf_OUX8ukD01AjmDwSg)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
## Instruction:
Update footer for tutorials master
## Code After:
*Last Modified: INSERT_DATE*
## Getting Started
[tutorials/_getting_started.md]
## Data Collection
[tutorials/_data_collection.md]
## Data Viewing
[tutorials/_data_viewing.md]
## Data Analysis
[tutorials/_data_analysis.md]
## Protocols
[tutorials/_building_a_protocol.md]
## Macros
[tutorials/_building_a_macro.md]
## Help More
+ [Help](https://photosynq.org/help)
+ [Forums](https://photosynq.org/forums)
+ [Latest Updates (Blog)](https://blog.photosynq.org/)
+ [API (Documentation)](https://photosynq.org/rdoc)
+ [Videos (YouTube)](https://www.youtube.com/channel/UCvJrVf_OUX8ukD01AjmDwSg)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | *Last Modified: INSERT_DATE*
## Getting Started
[tutorials/_getting_started.md]
## Data Collection
[tutorials/_data_collection.md]
## Data Viewing
[tutorials/_data_viewing.md]
## Data Analysis
[tutorials/_data_analysis.md]
## Protocols
[tutorials/_building_a_protocol.md]
## Macros
[tutorials/_building_a_macro.md]
- ## More
- + [Tutorials](https://photosynq.org/tutorials)
+ ## Help More
+ + [Help](https://photosynq.org/help)
+ [Forums](https://photosynq.org/forums)
- + [Frequently Asked Questions](https://photosynq.org/faq)
+ [Latest Updates (Blog)](https://blog.photosynq.org/)
- + [Documentation](https://photosynq.org/documentation)
? ----------
+ + [API (Documentation)](https://photosynq.org/rdoc)
? +++++ + +
- + [Videos (<i class="fa fa-youtube"></i> YouTube)](https://www.youtube.com/channel/UCvJrVf_OUX8ukD01AjmDwSg)
? ------------------------------
+ + [Videos (YouTube)](https://www.youtube.com/channel/UCvJrVf_OUX8ukD01AjmDwSg)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | 9 | 0.257143 | 4 | 5 |
633f84411e26201233e3c68c584b236363f79f62 | server/conf/vhosts/available/token.py | server/conf/vhosts/available/token.py | import core.provider.authentication as authentication
import core.notify.dispatcher as notify
import core.notify.plugins.available.changes as changes
import core.provider.storage as storage
import core.resource.base as resource
import conf.vhosts.available.default as default
class VHost(default.VHost):
host = ['localhost']
port = '8888'
def build(self):
"""
Build the resource tree
"""
default.VHost.build(self)
# [Change the notifiers] #
self.root.notifier = notify.Manual([changes.Plugin()])
# plain propfind xslt replaces the other one
xsltResource = resource.StaticResource(
storage.FileStorageProvider(self.config['basePath']+'/static/public/propfind-plain.xslt'),
expirationDays = 2
)
xsltResource.isLeaf = True
self.root.children['~static'].putChild('propfind.xslt', xsltResource)
tree = resource.TokenAccessResourceDecorator(self.root)
self.root = resource.TokenResource(
authProvider=authentication.TokenAuthProvider(secret=self.config['share']['secret'],
userProvider=self.user
),
tree=tree) | import core.provider.authentication as authentication
import core.notify.dispatcher as notify
import core.notify.plugins.available.changes as changes
import core.provider.storage as storage
import core.resource.base as resource
import conf.vhosts.available.default as default
class VHost(default.VHost):
host = ['localhost']
port = '8888'
def build(self):
"""
Build the resource tree
"""
default.VHost.build(self)
# [Change the notifiers] #
self.root.notifier = notify.Manual([changes.Plugin()])
# plain propfind xslt replaces the other one
xsltResource = resource.StaticResource(
storage.FileStorageProvider(self.config['basePath']+'/static/public/propfind-plain.xslt'),
expirationDays = 2
)
xsltResource.isLeaf = True
self.root.children['~static'].putChild('propfind.xslt', xsltResource)
leaves = {}
for path, child in self.root.children.items():
if child.isLeaf == True:
leaves[path] = child
tree = resource.TokenAccessResourceDecorator(self.root)
self.root = resource.TokenResource(
authProvider=authentication.TokenAuthProvider(secret=self.config['share']['secret'],
userProvider=self.user
),
tree=tree)
for path, child in leaves.items():
self.root.putChild(path, child) | Allow access to root leaves. | Allow access to root leaves.
| Python | mit | slaff/attachix,slaff/attachix,slaff/attachix | python | ## Code Before:
import core.provider.authentication as authentication
import core.notify.dispatcher as notify
import core.notify.plugins.available.changes as changes
import core.provider.storage as storage
import core.resource.base as resource
import conf.vhosts.available.default as default
class VHost(default.VHost):
host = ['localhost']
port = '8888'
def build(self):
"""
Build the resource tree
"""
default.VHost.build(self)
# [Change the notifiers] #
self.root.notifier = notify.Manual([changes.Plugin()])
# plain propfind xslt replaces the other one
xsltResource = resource.StaticResource(
storage.FileStorageProvider(self.config['basePath']+'/static/public/propfind-plain.xslt'),
expirationDays = 2
)
xsltResource.isLeaf = True
self.root.children['~static'].putChild('propfind.xslt', xsltResource)
tree = resource.TokenAccessResourceDecorator(self.root)
self.root = resource.TokenResource(
authProvider=authentication.TokenAuthProvider(secret=self.config['share']['secret'],
userProvider=self.user
),
tree=tree)
## Instruction:
Allow access to root leaves.
## Code After:
import core.provider.authentication as authentication
import core.notify.dispatcher as notify
import core.notify.plugins.available.changes as changes
import core.provider.storage as storage
import core.resource.base as resource
import conf.vhosts.available.default as default
class VHost(default.VHost):
host = ['localhost']
port = '8888'
def build(self):
"""
Build the resource tree
"""
default.VHost.build(self)
# [Change the notifiers] #
self.root.notifier = notify.Manual([changes.Plugin()])
# plain propfind xslt replaces the other one
xsltResource = resource.StaticResource(
storage.FileStorageProvider(self.config['basePath']+'/static/public/propfind-plain.xslt'),
expirationDays = 2
)
xsltResource.isLeaf = True
self.root.children['~static'].putChild('propfind.xslt', xsltResource)
leaves = {}
for path, child in self.root.children.items():
if child.isLeaf == True:
leaves[path] = child
tree = resource.TokenAccessResourceDecorator(self.root)
self.root = resource.TokenResource(
authProvider=authentication.TokenAuthProvider(secret=self.config['share']['secret'],
userProvider=self.user
),
tree=tree)
for path, child in leaves.items():
self.root.putChild(path, child) | import core.provider.authentication as authentication
import core.notify.dispatcher as notify
import core.notify.plugins.available.changes as changes
import core.provider.storage as storage
import core.resource.base as resource
import conf.vhosts.available.default as default
class VHost(default.VHost):
host = ['localhost']
port = '8888'
def build(self):
"""
Build the resource tree
"""
default.VHost.build(self)
# [Change the notifiers] #
self.root.notifier = notify.Manual([changes.Plugin()])
# plain propfind xslt replaces the other one
xsltResource = resource.StaticResource(
storage.FileStorageProvider(self.config['basePath']+'/static/public/propfind-plain.xslt'),
expirationDays = 2
)
xsltResource.isLeaf = True
self.root.children['~static'].putChild('propfind.xslt', xsltResource)
+ leaves = {}
+ for path, child in self.root.children.items():
+ if child.isLeaf == True:
+ leaves[path] = child
+
tree = resource.TokenAccessResourceDecorator(self.root)
self.root = resource.TokenResource(
authProvider=authentication.TokenAuthProvider(secret=self.config['share']['secret'],
userProvider=self.user
),
tree=tree)
+
+ for path, child in leaves.items():
+ self.root.putChild(path, child) | 8 | 0.228571 | 8 | 0 |
331a18bcdc3016b05602119b7ddd1441809b9583 | test/browser.js | test/browser.js | var assert = chai.assert,
html = React.DOM.html,
title = React.DOM.title,
FrozenHead = ReactFrozenHead;
var page = function (pageTitle) {
return (
html(null,
FrozenHead(null,
title(null, pageTitle)
)
)
);
};
var App = React.createClass({
getDefaultProps: function () {
return {title: 'HOME'};
},
render: function () {
return page(this.props.title);
}
});
describe('react-frozenhead', function () {
it('renders the initial title', function () {
var app = App({title: 'INITIAL'}),
html = React.renderComponentToString(app);
assert.include(html, '<title>INITIAL</title>');
});
it("doesn't update the DOM title after mounting", function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
var titleEl = container.querySelector('title');
assert.equal(titleEl.text, 'INITIAL');
done();
});
});
});
| var assert = chai.assert,
html = React.DOM.html,
title = React.DOM.title,
FrozenHead = ReactFrozenHead;
var page = function (pageTitle) {
return (
html(null,
FrozenHead(null,
title(null, pageTitle)
)
)
);
};
var App = React.createClass({
getDefaultProps: function () {
return {title: 'HOME'};
},
render: function () {
return page(this.props.title);
}
});
describe('react-frozenhead', function () {
beforeEach(function () { document.title = 'NONE'; });
it('renders the initial title', function () {
var app = App({title: 'INITIAL'}),
html = React.renderComponentToString(app);
assert.include(html, '<title>INITIAL</title>');
});
it("doesn't update the DOM title after mounting", function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
var titleEl = container.querySelector('title');
assert.equal(titleEl.text, 'INITIAL');
done();
});
});
it('changes the page title using document.title after mounting', function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
assert.equal(document.title, 'NEW');
done();
});
});
});
| Test that mounted heads change the title correctly | Test that mounted heads change the title correctly
| JavaScript | mit | matthewwithanm/react-frozenhead | javascript | ## Code Before:
var assert = chai.assert,
html = React.DOM.html,
title = React.DOM.title,
FrozenHead = ReactFrozenHead;
var page = function (pageTitle) {
return (
html(null,
FrozenHead(null,
title(null, pageTitle)
)
)
);
};
var App = React.createClass({
getDefaultProps: function () {
return {title: 'HOME'};
},
render: function () {
return page(this.props.title);
}
});
describe('react-frozenhead', function () {
it('renders the initial title', function () {
var app = App({title: 'INITIAL'}),
html = React.renderComponentToString(app);
assert.include(html, '<title>INITIAL</title>');
});
it("doesn't update the DOM title after mounting", function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
var titleEl = container.querySelector('title');
assert.equal(titleEl.text, 'INITIAL');
done();
});
});
});
## Instruction:
Test that mounted heads change the title correctly
## Code After:
var assert = chai.assert,
html = React.DOM.html,
title = React.DOM.title,
FrozenHead = ReactFrozenHead;
var page = function (pageTitle) {
return (
html(null,
FrozenHead(null,
title(null, pageTitle)
)
)
);
};
var App = React.createClass({
getDefaultProps: function () {
return {title: 'HOME'};
},
render: function () {
return page(this.props.title);
}
});
describe('react-frozenhead', function () {
beforeEach(function () { document.title = 'NONE'; });
it('renders the initial title', function () {
var app = App({title: 'INITIAL'}),
html = React.renderComponentToString(app);
assert.include(html, '<title>INITIAL</title>');
});
it("doesn't update the DOM title after mounting", function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
var titleEl = container.querySelector('title');
assert.equal(titleEl.text, 'INITIAL');
done();
});
});
it('changes the page title using document.title after mounting', function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
assert.equal(document.title, 'NEW');
done();
});
});
});
| var assert = chai.assert,
html = React.DOM.html,
title = React.DOM.title,
FrozenHead = ReactFrozenHead;
var page = function (pageTitle) {
return (
html(null,
FrozenHead(null,
title(null, pageTitle)
)
)
);
};
var App = React.createClass({
getDefaultProps: function () {
return {title: 'HOME'};
},
render: function () {
return page(this.props.title);
}
});
describe('react-frozenhead', function () {
+ beforeEach(function () { document.title = 'NONE'; });
+
it('renders the initial title', function () {
var app = App({title: 'INITIAL'}),
html = React.renderComponentToString(app);
assert.include(html, '<title>INITIAL</title>');
});
it("doesn't update the DOM title after mounting", function (done) {
var container = document.createElement('div');
app = React.renderComponent(App({title: 'INITIAL'}), container);
app.setProps({title: 'NEW'}, function () {
var titleEl = container.querySelector('title');
assert.equal(titleEl.text, 'INITIAL');
done();
});
});
+
+ it('changes the page title using document.title after mounting', function (done) {
+ var container = document.createElement('div');
+ app = React.renderComponent(App({title: 'INITIAL'}), container);
+ app.setProps({title: 'NEW'}, function () {
+ assert.equal(document.title, 'NEW');
+ done();
+ });
+ });
}); | 11 | 0.268293 | 11 | 0 |
4787189407ac810d39f835a21c0ac6f3d470d96a | docs/using.rst | docs/using.rst | .. _ref-using:
====================
Sites using Pipeline
====================
The following sites are a partial list of people using Pipeline.
Are you using pipeline and not being in this list? Drop us a line.
20 Minutes
----------
For their internal tools: http://www.20minutes.fr
The Molly Project
-----------------
Molly is a framework for the rapid development of information and service
portals targeted at mobile internet devices: http://mollyproject.org
It powers the University of Oxford's mobile portal: http://m.ox.ac.uk/
Croisé dans le Métro
--------------------
For their main and mobile website:
* http://www.croisedanslemetro.com
* http://m.croisedanslemetro.com
Ulule
-----
For their main and forum website:
* http://www.ulule.com
* http://vox.ulule.com
Borsala
-------
Borsala is the social investment plaform. You can follow stock markets that are traded in Turkey:
http://borsala.com
Novapost
--------
For PeopleDoc suite products: http://www.people-doc.com/
Sophicware
----------
Sophicware offers web hosting and DevOps as a service: http://sophicware.com
| .. _ref-using:
====================
Sites using Pipeline
====================
The following sites are a partial list of people using Pipeline.
Are you using pipeline and not being in this list? Drop us a line.
20 Minutes
----------
For their internal tools: http://www.20minutes.fr
Borsala
-------
Borsala is the social investment plaform. You can follow stock markets that are traded in Turkey: http://borsala.com
Croisé dans le Métro
--------------------
For their main and mobile website:
* http://www.croisedanslemetro.com
* http://m.croisedanslemetro.com
The Molly Project
-----------------
Molly is a framework for the rapid development of information and service
portals targeted at mobile internet devices: http://mollyproject.org
It powers the University of Oxford's mobile portal: http://m.ox.ac.uk/
Mozilla
-------
Powering mozilla.org:
* https://www.mozilla.org
* https://github.com/mozilla/bedrock
Novapost
--------
For PeopleDoc suite products: http://www.people-doc.com/
Sophicware
----------
Sophicware offers web hosting and DevOps as a service: http://sophicware.com
Ulule
-----
For their main and forum website:
* http://www.ulule.com
* http://vox.ulule.com
| Add Mozilla and re-order projects. | Add Mozilla and re-order projects.
| reStructuredText | mit | cyberdelia/django-pipeline,kronion/django-pipeline,beedesk/django-pipeline,lydell/django-pipeline,kronion/django-pipeline,d9pouces/django-pipeline,botify-labs/django-pipeline,jazzband/django-pipeline,skirsdeda/django-pipeline,sideffect0/django-pipeline,skolsuper/django-pipeline,d9pouces/django-pipeline,botify-labs/django-pipeline,beedesk/django-pipeline,chipx86/django-pipeline,perdona/django-pipeline,leonardoo/django-pipeline,simudream/django-pipeline,sideffect0/django-pipeline,theatlantic/django-pipeline,leonardoo/django-pipeline,perdona/django-pipeline,lexqt/django-pipeline,simudream/django-pipeline,lydell/django-pipeline,botify-labs/django-pipeline,beedesk/django-pipeline,jazzband/django-pipeline,sideffect0/django-pipeline,skolsuper/django-pipeline,cyberdelia/django-pipeline,skolsuper/django-pipeline,lexqt/django-pipeline,lydell/django-pipeline,skirsdeda/django-pipeline,leonardoo/django-pipeline,chipx86/django-pipeline,perdona/django-pipeline,d9pouces/django-pipeline,theatlantic/django-pipeline,cyberdelia/django-pipeline,skirsdeda/django-pipeline,kronion/django-pipeline,theatlantic/django-pipeline,jazzband/django-pipeline,lexqt/django-pipeline,simudream/django-pipeline,chipx86/django-pipeline | restructuredtext | ## Code Before:
.. _ref-using:
====================
Sites using Pipeline
====================
The following sites are a partial list of people using Pipeline.
Are you using pipeline and not being in this list? Drop us a line.
20 Minutes
----------
For their internal tools: http://www.20minutes.fr
The Molly Project
-----------------
Molly is a framework for the rapid development of information and service
portals targeted at mobile internet devices: http://mollyproject.org
It powers the University of Oxford's mobile portal: http://m.ox.ac.uk/
Croisé dans le Métro
--------------------
For their main and mobile website:
* http://www.croisedanslemetro.com
* http://m.croisedanslemetro.com
Ulule
-----
For their main and forum website:
* http://www.ulule.com
* http://vox.ulule.com
Borsala
-------
Borsala is the social investment plaform. You can follow stock markets that are traded in Turkey:
http://borsala.com
Novapost
--------
For PeopleDoc suite products: http://www.people-doc.com/
Sophicware
----------
Sophicware offers web hosting and DevOps as a service: http://sophicware.com
## Instruction:
Add Mozilla and re-order projects.
## Code After:
.. _ref-using:
====================
Sites using Pipeline
====================
The following sites are a partial list of people using Pipeline.
Are you using pipeline and not being in this list? Drop us a line.
20 Minutes
----------
For their internal tools: http://www.20minutes.fr
Borsala
-------
Borsala is the social investment plaform. You can follow stock markets that are traded in Turkey: http://borsala.com
Croisé dans le Métro
--------------------
For their main and mobile website:
* http://www.croisedanslemetro.com
* http://m.croisedanslemetro.com
The Molly Project
-----------------
Molly is a framework for the rapid development of information and service
portals targeted at mobile internet devices: http://mollyproject.org
It powers the University of Oxford's mobile portal: http://m.ox.ac.uk/
Mozilla
-------
Powering mozilla.org:
* https://www.mozilla.org
* https://github.com/mozilla/bedrock
Novapost
--------
For PeopleDoc suite products: http://www.people-doc.com/
Sophicware
----------
Sophicware offers web hosting and DevOps as a service: http://sophicware.com
Ulule
-----
For their main and forum website:
* http://www.ulule.com
* http://vox.ulule.com
| .. _ref-using:
====================
Sites using Pipeline
====================
The following sites are a partial list of people using Pipeline.
Are you using pipeline and not being in this list? Drop us a line.
20 Minutes
----------
For their internal tools: http://www.20minutes.fr
- The Molly Project
- -----------------
+ Borsala
+ -------
+ Borsala is the social investment plaform. You can follow stock markets that are traded in Turkey: http://borsala.com
- Molly is a framework for the rapid development of information and service
- portals targeted at mobile internet devices: http://mollyproject.org
- It powers the University of Oxford's mobile portal: http://m.ox.ac.uk/
Croisé dans le Métro
--------------------
For their main and mobile website:
* http://www.croisedanslemetro.com
* http://m.croisedanslemetro.com
- Ulule
- -----
+ The Molly Project
+ -----------------
- For their main and forum website:
+ Molly is a framework for the rapid development of information and service
+ portals targeted at mobile internet devices: http://mollyproject.org
+ It powers the University of Oxford's mobile portal: http://m.ox.ac.uk/
- * http://www.ulule.com
- * http://vox.ulule.com
- Borsala
+ Mozilla
-------
- Borsala is the social investment plaform. You can follow stock markets that are traded in Turkey:
-
- http://borsala.com
+ Powering mozilla.org:
+
+ * https://www.mozilla.org
+ * https://github.com/mozilla/bedrock
Novapost
--------
For PeopleDoc suite products: http://www.people-doc.com/
Sophicware
----------
Sophicware offers web hosting and DevOps as a service: http://sophicware.com
+
+ Ulule
+ -----
+
+ For their main and forum website:
+
+ * http://www.ulule.com
+ * http://vox.ulule.com | 35 | 0.636364 | 21 | 14 |
486e9743c486cc68e69744e6f9b5c56e639f3058 | components/DappDetailBodyContentDescription.vue | components/DappDetailBodyContentDescription.vue | <template>
<div class="component-DappDetailBodyContentDescription">
<div class="description">
<p v-for="(paragraph, index) in formattedDescription" :key="index" class="paragraph">{{ paragraph }}</p>
</div>
</div>
</template>
<script>
export default {
computed: {
formattedDescription () {
const value = this.description || []
const formattedValue = value.split('\n\n')
return formattedValue
}
},
props: {
description: {
required: true
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.description {
text-align: center;
padding: 20px 10px 5px 10px;
font-size: 1.2rem;
line-height: 1.4;
margin-top: 0;
@include tweakpoint('min-width', 1000px) {
text-align: left;
padding: 0 10px 5px 10px;
}
}
.paragraph {
margin: 0;
margin-bottom: 1rem;
}
</style>
| <template>
<div class="component-DappDetailBodyContentDescription">
<div class="description">
<p v-for="(paragraph, index) in formattedDescription" :key="index" class="paragraph">{{ paragraph }}</p>
</div>
</div>
</template>
<script>
export default {
computed: {
formattedDescription () {
const value = this.description || []
const formattedValue = value.split('\n\n')
return formattedValue
}
},
props: {
description: {
required: true
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.description {
word-break: break-all;
text-align: center;
padding: 20px 10px 5px 10px;
font-size: 1.2rem;
line-height: 1.4;
margin-top: 0;
@include tweakpoint('min-width', 1000px) {
text-align: left;
padding: 0 10px 5px 10px;
}
}
.paragraph {
margin: 0;
margin-bottom: 1rem;
}
</style>
| Break paragraphs with nbsp text | Break paragraphs with nbsp text
| Vue | mit | state-of-the-dapps/sotd-www,state-of-the-dapps/sotd-www | vue | ## Code Before:
<template>
<div class="component-DappDetailBodyContentDescription">
<div class="description">
<p v-for="(paragraph, index) in formattedDescription" :key="index" class="paragraph">{{ paragraph }}</p>
</div>
</div>
</template>
<script>
export default {
computed: {
formattedDescription () {
const value = this.description || []
const formattedValue = value.split('\n\n')
return formattedValue
}
},
props: {
description: {
required: true
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.description {
text-align: center;
padding: 20px 10px 5px 10px;
font-size: 1.2rem;
line-height: 1.4;
margin-top: 0;
@include tweakpoint('min-width', 1000px) {
text-align: left;
padding: 0 10px 5px 10px;
}
}
.paragraph {
margin: 0;
margin-bottom: 1rem;
}
</style>
## Instruction:
Break paragraphs with nbsp text
## Code After:
<template>
<div class="component-DappDetailBodyContentDescription">
<div class="description">
<p v-for="(paragraph, index) in formattedDescription" :key="index" class="paragraph">{{ paragraph }}</p>
</div>
</div>
</template>
<script>
export default {
computed: {
formattedDescription () {
const value = this.description || []
const formattedValue = value.split('\n\n')
return formattedValue
}
},
props: {
description: {
required: true
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.description {
word-break: break-all;
text-align: center;
padding: 20px 10px 5px 10px;
font-size: 1.2rem;
line-height: 1.4;
margin-top: 0;
@include tweakpoint('min-width', 1000px) {
text-align: left;
padding: 0 10px 5px 10px;
}
}
.paragraph {
margin: 0;
margin-bottom: 1rem;
}
</style>
| <template>
<div class="component-DappDetailBodyContentDescription">
<div class="description">
<p v-for="(paragraph, index) in formattedDescription" :key="index" class="paragraph">{{ paragraph }}</p>
</div>
</div>
</template>
<script>
export default {
computed: {
formattedDescription () {
const value = this.description || []
const formattedValue = value.split('\n\n')
return formattedValue
}
},
props: {
description: {
required: true
}
}
}
</script>
<style lang="scss" scoped>
@import '~assets/css/settings';
.description {
+ word-break: break-all;
text-align: center;
padding: 20px 10px 5px 10px;
font-size: 1.2rem;
line-height: 1.4;
margin-top: 0;
@include tweakpoint('min-width', 1000px) {
text-align: left;
padding: 0 10px 5px 10px;
}
}
.paragraph {
margin: 0;
margin-bottom: 1rem;
}
</style> | 1 | 0.021739 | 1 | 0 |
a57fc87fe12a8941fecae8483870532026e3ee8f | roles/apigee-tls-keystore/tasks/main.yml | roles/apigee-tls-keystore/tasks/main.yml | ---
- block:
- block:
- name: Copy keystore to {{ inventory_hostname }}:{{ apigee_tls_keystore_dest }}
copy:
src: '{{ apigee_tls_keystore_src }}'
dest: '{{ apigee_tls_keystore_dest }}'
when: apigee_tls_keystore_src is not none
- block:
- name: Remove keystore
file:
path: '{{ apigee_tls_keystore_dest }}'
state: absent
- name: Generate keystore
command: "{{ apigee_tls_keystore_keytool_path }} -genkeypair -keyalg RSA -sigalg SHA256withRSA -keystore {{ apigee_tls_keystore_dest }} -alias {{ apigee_tls_keystore_keyalias or 'apigee' }} -dname CN={{ apigee_tls_keystore_keyalias or 'apigee' }} -validity {{ apigee_tls_keystore_validity }} -storepass {{ apigee_tls_keystore_password or apigee_admin_password }} -keypass {{ apigee_tls_keystore_password or apigee_admin_password }}"
when: apigee_tls_keystore_src is none
- name: Set keystore ownership and permissions
file:
path: '{{ apigee_tls_keystore_dest }}'
owner: apigee
group: apigee
mode: 0600
become: true
become_user: '{{ apigee_become_user }}'
| ---
- block:
- block:
- name: Copy keystore to {{ inventory_hostname }}:{{ apigee_tls_keystore_dest }}
copy:
src: '{{ apigee_tls_keystore_src }}'
dest: '{{ apigee_tls_keystore_dest }}'
when: apigee_tls_keystore_src is not none
- block:
- name: Remove keystore
file:
path: '{{ apigee_tls_keystore_dest }}'
state: absent
- name: Generate keystore
command: "{{ apigee_tls_keystore_keytool_path }} -genkeypair -keyalg RSA -sigalg SHA256withRSA -keystore {{ apigee_tls_keystore_dest }} -alias {{ apigee_tls_keystore_keyalias }} -dname CN={{ apigee_tls_keystore_keyalias }} -validity {{ apigee_tls_keystore_validity }} -storepass {{ apigee_tls_keystore_password }} -keypass {{ apigee_tls_keystore_password }}"
when: apigee_tls_keystore_src is none
- name: Set keystore ownership and permissions
file:
path: '{{ apigee_tls_keystore_dest }}'
owner: apigee
group: apigee
mode: 0600
become: true
become_user: '{{ apigee_become_user }}'
| Remove redundant variables passed to keytool | Remove redundant variables passed to keytool
| YAML | apache-2.0 | apigee/ansible-install,apigee/ansible-install | yaml | ## Code Before:
---
- block:
- block:
- name: Copy keystore to {{ inventory_hostname }}:{{ apigee_tls_keystore_dest }}
copy:
src: '{{ apigee_tls_keystore_src }}'
dest: '{{ apigee_tls_keystore_dest }}'
when: apigee_tls_keystore_src is not none
- block:
- name: Remove keystore
file:
path: '{{ apigee_tls_keystore_dest }}'
state: absent
- name: Generate keystore
command: "{{ apigee_tls_keystore_keytool_path }} -genkeypair -keyalg RSA -sigalg SHA256withRSA -keystore {{ apigee_tls_keystore_dest }} -alias {{ apigee_tls_keystore_keyalias or 'apigee' }} -dname CN={{ apigee_tls_keystore_keyalias or 'apigee' }} -validity {{ apigee_tls_keystore_validity }} -storepass {{ apigee_tls_keystore_password or apigee_admin_password }} -keypass {{ apigee_tls_keystore_password or apigee_admin_password }}"
when: apigee_tls_keystore_src is none
- name: Set keystore ownership and permissions
file:
path: '{{ apigee_tls_keystore_dest }}'
owner: apigee
group: apigee
mode: 0600
become: true
become_user: '{{ apigee_become_user }}'
## Instruction:
Remove redundant variables passed to keytool
## Code After:
---
- block:
- block:
- name: Copy keystore to {{ inventory_hostname }}:{{ apigee_tls_keystore_dest }}
copy:
src: '{{ apigee_tls_keystore_src }}'
dest: '{{ apigee_tls_keystore_dest }}'
when: apigee_tls_keystore_src is not none
- block:
- name: Remove keystore
file:
path: '{{ apigee_tls_keystore_dest }}'
state: absent
- name: Generate keystore
command: "{{ apigee_tls_keystore_keytool_path }} -genkeypair -keyalg RSA -sigalg SHA256withRSA -keystore {{ apigee_tls_keystore_dest }} -alias {{ apigee_tls_keystore_keyalias }} -dname CN={{ apigee_tls_keystore_keyalias }} -validity {{ apigee_tls_keystore_validity }} -storepass {{ apigee_tls_keystore_password }} -keypass {{ apigee_tls_keystore_password }}"
when: apigee_tls_keystore_src is none
- name: Set keystore ownership and permissions
file:
path: '{{ apigee_tls_keystore_dest }}'
owner: apigee
group: apigee
mode: 0600
become: true
become_user: '{{ apigee_become_user }}'
| ---
- block:
- block:
- name: Copy keystore to {{ inventory_hostname }}:{{ apigee_tls_keystore_dest }}
copy:
src: '{{ apigee_tls_keystore_src }}'
dest: '{{ apigee_tls_keystore_dest }}'
when: apigee_tls_keystore_src is not none
- block:
- name: Remove keystore
file:
path: '{{ apigee_tls_keystore_dest }}'
state: absent
- name: Generate keystore
- command: "{{ apigee_tls_keystore_keytool_path }} -genkeypair -keyalg RSA -sigalg SHA256withRSA -keystore {{ apigee_tls_keystore_dest }} -alias {{ apigee_tls_keystore_keyalias or 'apigee' }} -dname CN={{ apigee_tls_keystore_keyalias or 'apigee' }} -validity {{ apigee_tls_keystore_validity }} -storepass {{ apigee_tls_keystore_password or apigee_admin_password }} -keypass {{ apigee_tls_keystore_password or apigee_admin_password }}"
? ------------ ------------ ^^^^^^^^^^^^^^^ ---------------------------------------------------------------------
+ command: "{{ apigee_tls_keystore_keytool_path }} -genkeypair -keyalg RSA -sigalg SHA256withRSA -keystore {{ apigee_tls_keystore_dest }} -alias {{ apigee_tls_keystore_keyalias }} -dname CN={{ apigee_tls_keystore_keyalias }} -validity {{ apigee_tls_keystore_validity }} -storepass {{ apigee_tls_keystore_password }} -keypass {{ apigee_tls_keystore_password }}"
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
when: apigee_tls_keystore_src is none
- name: Set keystore ownership and permissions
file:
path: '{{ apigee_tls_keystore_dest }}'
owner: apigee
group: apigee
mode: 0600
become: true
become_user: '{{ apigee_become_user }}' | 2 | 0.057143 | 1 | 1 |
efd527f3da0b5151dfe9eead87f99c9fd2f2b552 | client/views/pages/pages_show/pages_show.html | client/views/pages/pages_show/pages_show.html | <template name="PagesShow">
<ol class="breadcrumb">
<li><a href="/">Letterhead</a></li>
<li><a href="{{pathFor 'pages.index'}}">Pages</a></li>
<li>{{title}}</li>
</ol>
<article>
{{#if editTitle}}
{{> PageTitleEdit}}
{{else}}
{{> PageTitleShow}}
{{/if}}
{{#each paragraphs}}
<p>{{{content}}}</p>
<a href="#">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
Edit paragraph
</a>
<br />
<br />
{{/each}}
<a href="#">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Add paragraph
</a>
</article>
</template>
| <template name="PagesShow">
<ol class="breadcrumb">
<li><a href="/">Letterhead</a></li>
<li><a href="{{pathFor 'pages.index'}}">Pages</a></li>
<li>{{title}}</li>
</ol>
<article>
{{#if editTitle}}
{{> PageTitleEdit}}
{{else}}
{{> PageTitleShow}}
{{/if}}
{{#each paragraphs}}
<p>
{{{content}}}
{{#if currentUser}}
<a href="#">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
</a>
{{/if}}
</p>
{{/each}}
{{#if currentUser}}
<a href="#">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Add paragraph
</a>
{{/if}}
</article>
</template>
| Hide editing elements when logged out | Hide editing elements when logged out
| HTML | mit | bojicas/letterhead,bojicas/letterhead | html | ## Code Before:
<template name="PagesShow">
<ol class="breadcrumb">
<li><a href="/">Letterhead</a></li>
<li><a href="{{pathFor 'pages.index'}}">Pages</a></li>
<li>{{title}}</li>
</ol>
<article>
{{#if editTitle}}
{{> PageTitleEdit}}
{{else}}
{{> PageTitleShow}}
{{/if}}
{{#each paragraphs}}
<p>{{{content}}}</p>
<a href="#">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
Edit paragraph
</a>
<br />
<br />
{{/each}}
<a href="#">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Add paragraph
</a>
</article>
</template>
## Instruction:
Hide editing elements when logged out
## Code After:
<template name="PagesShow">
<ol class="breadcrumb">
<li><a href="/">Letterhead</a></li>
<li><a href="{{pathFor 'pages.index'}}">Pages</a></li>
<li>{{title}}</li>
</ol>
<article>
{{#if editTitle}}
{{> PageTitleEdit}}
{{else}}
{{> PageTitleShow}}
{{/if}}
{{#each paragraphs}}
<p>
{{{content}}}
{{#if currentUser}}
<a href="#">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
</a>
{{/if}}
</p>
{{/each}}
{{#if currentUser}}
<a href="#">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Add paragraph
</a>
{{/if}}
</article>
</template>
| <template name="PagesShow">
<ol class="breadcrumb">
<li><a href="/">Letterhead</a></li>
<li><a href="{{pathFor 'pages.index'}}">Pages</a></li>
<li>{{title}}</li>
</ol>
<article>
{{#if editTitle}}
{{> PageTitleEdit}}
{{else}}
{{> PageTitleShow}}
{{/if}}
{{#each paragraphs}}
+ <p>
- <p>{{{content}}}</p>
? ^^^ ----
+ {{{content}}}
? ^^
+ {{#if currentUser}}
- <a href="#">
+ <a href="#">
? ++++
- <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
+ <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
? ++++
- Edit paragraph
+ </a>
+ {{/if}}
- </a>
? ^
+ </p>
? ^
- <br />
- <br />
{{/each}}
+ {{#if currentUser}}
- <a href="#">
+ <a href="#">
? ++
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
+ <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
? ++
- Add paragraph
+ Add paragraph
? ++
- </a>
+ </a>
? ++
+ {{/if}}
</article>
</template> | 25 | 0.833333 | 14 | 11 |
d6435071d4e2305bd39d4c3f26b0bd59672f0254 | app/views/intellectual_objects/_facets.html.erb | app/views/intellectual_objects/_facets.html.erb | <% # main container for facets/limits menu -%>
<% if has_facet_values? %>
<div id="facets" class="facets sidenav">
<h4 data-toggle="collapse" data-target=".facets-collapse">
<a class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<%= t('blacklight.search.facets.title') %>
</h4>
<div class="facets-collapse">
<%= render_facet_partials %>
</div>
</div>
<% end %> | <%= render 'catalog/facets' %>
| Add the active/all widget to the intellectual_object view. | Add the active/all widget to the intellectual_object view.
| HTML+ERB | apache-2.0 | APTrust/fluctus,APTrust/fluctus,APTrust/fluctus | html+erb | ## Code Before:
<% # main container for facets/limits menu -%>
<% if has_facet_values? %>
<div id="facets" class="facets sidenav">
<h4 data-toggle="collapse" data-target=".facets-collapse">
<a class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<%= t('blacklight.search.facets.title') %>
</h4>
<div class="facets-collapse">
<%= render_facet_partials %>
</div>
</div>
<% end %>
## Instruction:
Add the active/all widget to the intellectual_object view.
## Code After:
<%= render 'catalog/facets' %>
| + <%= render 'catalog/facets' %>
- <% # main container for facets/limits menu -%>
- <% if has_facet_values? %>
- <div id="facets" class="facets sidenav">
-
-
- <h4 data-toggle="collapse" data-target=".facets-collapse">
-
- <a class="btn btn-navbar">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
- <%= t('blacklight.search.facets.title') %>
-
- </h4>
- <div class="facets-collapse">
- <%= render_facet_partials %>
- </div>
- </div>
- <% end %> | 20 | 1.052632 | 1 | 19 |
60646c4d16c675bc222a7b9311218bdda4e4b5a1 | README.md | README.md | openprocurement.client.python
=============================
Reference implementation of a client for OpenProcurement API.
This product may contain traces of nuts.
| [](https://travis-ci.org/openprocurement/openprocurement.client.python)
[](https://coveralls.io/github/openprocurement/openprocurement.client.python?branch=master)
openprocurement.client.python
=============================
Reference implementation of a client for OpenProcurement API.
This product may contain traces of nuts.
| Add badges for Travis and Coveralls | Add badges for Travis and Coveralls
| Markdown | apache-2.0 | openprocurement/openprocurement.client.python,mykhaly/openprocurement.client.python,Leits/openprocurement.client.python | markdown | ## Code Before:
openprocurement.client.python
=============================
Reference implementation of a client for OpenProcurement API.
This product may contain traces of nuts.
## Instruction:
Add badges for Travis and Coveralls
## Code After:
[](https://travis-ci.org/openprocurement/openprocurement.client.python)
[](https://coveralls.io/github/openprocurement/openprocurement.client.python?branch=master)
openprocurement.client.python
=============================
Reference implementation of a client for OpenProcurement API.
This product may contain traces of nuts.
| + [](https://travis-ci.org/openprocurement/openprocurement.client.python)
+ [](https://coveralls.io/github/openprocurement/openprocurement.client.python?branch=master)
+
openprocurement.client.python
=============================
Reference implementation of a client for OpenProcurement API.
This product may contain traces of nuts. | 3 | 0.5 | 3 | 0 |
13a61a73f41a8e275d17c164e1b300677d1ed8c7 | clone_and_start.sh | clone_and_start.sh | set -e
GIT_BRANCH=${GIT_BRANCH:-master}
echo '+++ Welcome to node-from-git'
echo '+++ GIT_URL ' $GIT_URL
echo '+++ GIT_BRANCH ' $GIT_BRANCH
if [ ! -z "$GIT_SSH_KEY" ]
then
echo '+++ GIT_SSH_KEY provided'
echo "$GIT_SSH_KEY"
echo "$GIT_SSH_KEY" > git_ssh_key
chmod 600 git_ssh_key
export GIT_SSH_COMMAND='ssh -i git_ssh_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
else
echo '+++ GIT_SSH_KEY not set'
fi
echo '+++'
set -v
node --version
npm --version
git --version
git clone $GIT_URL --branch $GIT_BRANCH --single-branch --depth 1 node-app
cd node-app
export NODE_ENV=production
npm install
npm start
| set -e
GIT_BRANCH=${GIT_BRANCH:-master}
echo '+++ Welcome to node-from-git'
echo '+++ GIT_URL ' $GIT_URL
echo '+++ GIT_BRANCH ' $GIT_BRANCH
if [ ! -z "$GIT_SSH_KEY_BASE64" ]
then
echo '+++ GIT_SSH_KEY_BASE64 provided'
echo "$GIT_SSH_KEY_BASE64" > git_ssh_key.b64
base64 -d git_ssh_key.b64 > git_ssh_key
chmod 600 git_ssh_key
export GIT_SSH_COMMAND='ssh -i git_ssh_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
else
echo '+++ GIT_SSH_KEY_BASE64 not set'
fi
echo '+++'
set -v
node --version
npm --version
git --version
git clone $GIT_URL --branch $GIT_BRANCH --single-branch --depth 1 node-app
cd node-app
export NODE_ENV=production
npm install
npm start
| Switch to base64 encoding of SSH key | Switch to base64 encoding of SSH key
| Shell | mit | henkel/docker-node-from-git | shell | ## Code Before:
set -e
GIT_BRANCH=${GIT_BRANCH:-master}
echo '+++ Welcome to node-from-git'
echo '+++ GIT_URL ' $GIT_URL
echo '+++ GIT_BRANCH ' $GIT_BRANCH
if [ ! -z "$GIT_SSH_KEY" ]
then
echo '+++ GIT_SSH_KEY provided'
echo "$GIT_SSH_KEY"
echo "$GIT_SSH_KEY" > git_ssh_key
chmod 600 git_ssh_key
export GIT_SSH_COMMAND='ssh -i git_ssh_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
else
echo '+++ GIT_SSH_KEY not set'
fi
echo '+++'
set -v
node --version
npm --version
git --version
git clone $GIT_URL --branch $GIT_BRANCH --single-branch --depth 1 node-app
cd node-app
export NODE_ENV=production
npm install
npm start
## Instruction:
Switch to base64 encoding of SSH key
## Code After:
set -e
GIT_BRANCH=${GIT_BRANCH:-master}
echo '+++ Welcome to node-from-git'
echo '+++ GIT_URL ' $GIT_URL
echo '+++ GIT_BRANCH ' $GIT_BRANCH
if [ ! -z "$GIT_SSH_KEY_BASE64" ]
then
echo '+++ GIT_SSH_KEY_BASE64 provided'
echo "$GIT_SSH_KEY_BASE64" > git_ssh_key.b64
base64 -d git_ssh_key.b64 > git_ssh_key
chmod 600 git_ssh_key
export GIT_SSH_COMMAND='ssh -i git_ssh_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
else
echo '+++ GIT_SSH_KEY_BASE64 not set'
fi
echo '+++'
set -v
node --version
npm --version
git --version
git clone $GIT_URL --branch $GIT_BRANCH --single-branch --depth 1 node-app
cd node-app
export NODE_ENV=production
npm install
npm start
| set -e
GIT_BRANCH=${GIT_BRANCH:-master}
echo '+++ Welcome to node-from-git'
- echo '+++ GIT_URL ' $GIT_URL
+ echo '+++ GIT_URL ' $GIT_URL
? +++++++
- echo '+++ GIT_BRANCH ' $GIT_BRANCH
+ echo '+++ GIT_BRANCH ' $GIT_BRANCH
? +++++++
- if [ ! -z "$GIT_SSH_KEY" ]
+ if [ ! -z "$GIT_SSH_KEY_BASE64" ]
? +++++++
then
- echo '+++ GIT_SSH_KEY provided'
+ echo '+++ GIT_SSH_KEY_BASE64 provided'
? +++++++
- echo "$GIT_SSH_KEY"
- echo "$GIT_SSH_KEY" > git_ssh_key
+ echo "$GIT_SSH_KEY_BASE64" > git_ssh_key.b64
? +++++++ ++++
+ base64 -d git_ssh_key.b64 > git_ssh_key
chmod 600 git_ssh_key
export GIT_SSH_COMMAND='ssh -i git_ssh_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
else
- echo '+++ GIT_SSH_KEY not set'
+ echo '+++ GIT_SSH_KEY_BASE64 not set'
? +++++++
fi
echo '+++'
set -v
node --version
npm --version
git --version
git clone $GIT_URL --branch $GIT_BRANCH --single-branch --depth 1 node-app
cd node-app
export NODE_ENV=production
npm install
npm start | 14 | 0.482759 | 7 | 7 |
372ff487c068da2b31cd25e550e8dcd7bd12d17d | openprocurement/tender/esco/adapters.py | openprocurement/tender/esco/adapters.py | from openprocurement.tender.openeu.adapters import TenderAboveThresholdEUConfigurator
from openprocurement.tender.esco.models import Tender
class TenderESCOConfigurator(TenderAboveThresholdEUConfigurator):
""" ESCO Tender configuration adapter """
name = "esco Tender configurator"
model = Tender
# Param to configure award criteria - awards are generated from higher to lower by value.amount
reverse_awarding_criteria = True
| from openprocurement.tender.openeu.adapters import TenderAboveThresholdEUConfigurator
from openprocurement.tender.esco.models import Tender
class TenderESCOConfigurator(TenderAboveThresholdEUConfigurator):
""" ESCO Tender configuration adapter """
name = "esco Tender configurator"
model = Tender
# Param to configure award criteria - awards are generated from higher to lower by value.amount
reverse_awarding_criteria = True
# Param to set awarding criteria field
awarding_criteria_key = 'amountPerfomance'
| Add awarding criteria field to configurator | Add awarding criteria field to configurator
| Python | apache-2.0 | openprocurement/openprocurement.tender.esco | python | ## Code Before:
from openprocurement.tender.openeu.adapters import TenderAboveThresholdEUConfigurator
from openprocurement.tender.esco.models import Tender
class TenderESCOConfigurator(TenderAboveThresholdEUConfigurator):
""" ESCO Tender configuration adapter """
name = "esco Tender configurator"
model = Tender
# Param to configure award criteria - awards are generated from higher to lower by value.amount
reverse_awarding_criteria = True
## Instruction:
Add awarding criteria field to configurator
## Code After:
from openprocurement.tender.openeu.adapters import TenderAboveThresholdEUConfigurator
from openprocurement.tender.esco.models import Tender
class TenderESCOConfigurator(TenderAboveThresholdEUConfigurator):
""" ESCO Tender configuration adapter """
name = "esco Tender configurator"
model = Tender
# Param to configure award criteria - awards are generated from higher to lower by value.amount
reverse_awarding_criteria = True
# Param to set awarding criteria field
awarding_criteria_key = 'amountPerfomance'
| from openprocurement.tender.openeu.adapters import TenderAboveThresholdEUConfigurator
from openprocurement.tender.esco.models import Tender
class TenderESCOConfigurator(TenderAboveThresholdEUConfigurator):
""" ESCO Tender configuration adapter """
name = "esco Tender configurator"
model = Tender
# Param to configure award criteria - awards are generated from higher to lower by value.amount
reverse_awarding_criteria = True
+
+ # Param to set awarding criteria field
+ awarding_criteria_key = 'amountPerfomance' | 3 | 0.25 | 3 | 0 |
0d9881039b97b55423c58627f08b34a6db861af2 | test/Primitive/StringgTest.php | test/Primitive/StringgTest.php | <?php
namespace test\Widmogrod\Primitive;
use Widmogrod\FantasyLand\Monoid;
use Widmogrod\Helpful\MonoidLaws;
use Widmogrod\Primitive\Stringg;
use Widmogrod\Functional as f;
class StringgTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideRandomizedData
*/
public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
{
MonoidLaws::test(
f\curryN(3, [$this, 'assertEquals']),
$x,
$y,
$z
);
}
private function randomize()
{
return Stringg::of(md5(random_int(0, 100)));
}
public function provideRandomizedData()
{
return array_map(function () {
return [
$this->randomize(),
$this->randomize(),
$this->randomize(),
];
}, array_fill(0, 50, null));
}
}
| <?php
namespace test\Widmogrod\Primitive;
use Widmogrod\FantasyLand\Monoid;
use Widmogrod\Functional as f;
use Widmogrod\Helpful\MonoidLaws;
use Widmogrod\Primitive\Product;
use Widmogrod\Primitive\Stringg;
class StringgTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideRandomizedData
*/
public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
{
MonoidLaws::test(
f\curryN(3, [$this, 'assertEquals']),
$x,
$y,
$z
);
}
/**
* @expectedException \Widmogrod\Primitive\TypeMismatchError
* @expectedExceptionMessage Expected type is Widmogrod\Primitive\Stringg but given Widmogrod\Primitive\Product
* @dataProvider provideRandomizedData
*/
public function test_it_should_reject_concat_on_different_type(Stringg $a)
{
$a->concat(Product::of(1));
}
private function randomize()
{
return Stringg::of(md5(random_int(0, 100)));
}
public function provideRandomizedData()
{
return array_map(function () {
return [
$this->randomize(),
$this->randomize(),
$this->randomize(),
];
}, array_fill(0, 50, null));
}
}
| Improve code coverage for String | Improve code coverage for String
| PHP | mit | widmogrod/php-functional | php | ## Code Before:
<?php
namespace test\Widmogrod\Primitive;
use Widmogrod\FantasyLand\Monoid;
use Widmogrod\Helpful\MonoidLaws;
use Widmogrod\Primitive\Stringg;
use Widmogrod\Functional as f;
class StringgTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideRandomizedData
*/
public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
{
MonoidLaws::test(
f\curryN(3, [$this, 'assertEquals']),
$x,
$y,
$z
);
}
private function randomize()
{
return Stringg::of(md5(random_int(0, 100)));
}
public function provideRandomizedData()
{
return array_map(function () {
return [
$this->randomize(),
$this->randomize(),
$this->randomize(),
];
}, array_fill(0, 50, null));
}
}
## Instruction:
Improve code coverage for String
## Code After:
<?php
namespace test\Widmogrod\Primitive;
use Widmogrod\FantasyLand\Monoid;
use Widmogrod\Functional as f;
use Widmogrod\Helpful\MonoidLaws;
use Widmogrod\Primitive\Product;
use Widmogrod\Primitive\Stringg;
class StringgTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideRandomizedData
*/
public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
{
MonoidLaws::test(
f\curryN(3, [$this, 'assertEquals']),
$x,
$y,
$z
);
}
/**
* @expectedException \Widmogrod\Primitive\TypeMismatchError
* @expectedExceptionMessage Expected type is Widmogrod\Primitive\Stringg but given Widmogrod\Primitive\Product
* @dataProvider provideRandomizedData
*/
public function test_it_should_reject_concat_on_different_type(Stringg $a)
{
$a->concat(Product::of(1));
}
private function randomize()
{
return Stringg::of(md5(random_int(0, 100)));
}
public function provideRandomizedData()
{
return array_map(function () {
return [
$this->randomize(),
$this->randomize(),
$this->randomize(),
];
}, array_fill(0, 50, null));
}
}
| <?php
namespace test\Widmogrod\Primitive;
use Widmogrod\FantasyLand\Monoid;
+ use Widmogrod\Functional as f;
use Widmogrod\Helpful\MonoidLaws;
+ use Widmogrod\Primitive\Product;
use Widmogrod\Primitive\Stringg;
- use Widmogrod\Functional as f;
class StringgTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideRandomizedData
*/
public function test_it_should_obey_monoid_laws(Monoid $x, Monoid $y, Monoid $z)
{
MonoidLaws::test(
f\curryN(3, [$this, 'assertEquals']),
$x,
$y,
$z
);
+ }
+
+ /**
+ * @expectedException \Widmogrod\Primitive\TypeMismatchError
+ * @expectedExceptionMessage Expected type is Widmogrod\Primitive\Stringg but given Widmogrod\Primitive\Product
+ * @dataProvider provideRandomizedData
+ */
+ public function test_it_should_reject_concat_on_different_type(Stringg $a)
+ {
+ $a->concat(Product::of(1));
}
private function randomize()
{
return Stringg::of(md5(random_int(0, 100)));
}
public function provideRandomizedData()
{
return array_map(function () {
return [
$this->randomize(),
$this->randomize(),
$this->randomize(),
];
}, array_fill(0, 50, null));
}
} | 13 | 0.325 | 12 | 1 |
828ec4dd81c992cf9475ed243485378b6c8b7cab | app/controllers/login.js | app/controllers/login.js | import Ember from 'ember';
import ajax from 'ic-ajax';
export default Ember.Controller.extend({
needs: 'application',
auth_token: Ember.computed.alias('controllers.application.auth_token'),
currentUser: Ember.computed.alias('controllers.application.currentUser'),
email: null,
password: null,
response: null,
hidden: true,
actions: {
authenticate: function() {
var self = this;
ajax('/api/sign_in', {
type: 'POST',
data: this.getProperties('email', 'password')
}).then(function(response) {
self.set('response', response);
self.set('auth_token', response.auth_token);
var currentUser = response.user;
currentUser.id = 'current';
self.store.createRecord('user', currentUser);
self.set('currentUser', self.store.find('user', 'current'));
self.set('role', currentUser.role);
self.set('email', null);
self.set('password', null);
self.transitionToRoute('dashboard');
});
},
recover_password: function() {
var self = this;
ajax('/api/password_reset', {
type: 'POST',
data: {user: {email: this.get('email')}}
}).then(function(response) {
self.set('email', null);
self.set('hidden', false);
});
},
toggle_recovery: function() {
Ember.$('.password-recovery').toggle();
Ember.$('.login-modal').toggle();
}
}
});
| import Ember from 'ember';
import ajax from 'ic-ajax';
export default Ember.Controller.extend({
needs: 'application',
auth_token: Ember.computed.alias('controllers.application.auth_token'),
currentUser: Ember.computed.alias('controllers.application.currentUser'),
email: null,
password: null,
response: null,
hidden: true,
actions: {
authenticate: function() {
var self = this;
ajax('/api/sign_in', {
type: 'POST',
data: this.getProperties('email', 'password')
}).then(function(response) {
self.set('response', response);
self.set('auth_token', response.auth_token);
var currentUser = response.user;
currentUser.id = 'current';
self.store.createRecord('user', currentUser);
self.set('currentUser', self.store.find('user', 'current'));
self.set('role', currentUser.role);
self.set('email', null);
self.set('password', null);
self.transitionToRoute('dashboard');
});
},
recover_password: function() {
var self = this;
ajax('/api/password_reset', {
type: 'POST',
data: {user: {email: this.get('email')}}
}).then(function(response) {
self.set('email', null);
self.set('hidden', false);
Ember.run.later(function() {
self.set('hidden', true);
}, 3000);
});
},
toggle_recovery: function() {
Ember.$('.password-recovery').toggle();
Ember.$('.login-modal').toggle();
}
}
});
| Hide password reset instruction alert after 3 seconds | Hide password reset instruction alert after 3 seconds
| JavaScript | mit | stevenwu/er-ember | javascript | ## Code Before:
import Ember from 'ember';
import ajax from 'ic-ajax';
export default Ember.Controller.extend({
needs: 'application',
auth_token: Ember.computed.alias('controllers.application.auth_token'),
currentUser: Ember.computed.alias('controllers.application.currentUser'),
email: null,
password: null,
response: null,
hidden: true,
actions: {
authenticate: function() {
var self = this;
ajax('/api/sign_in', {
type: 'POST',
data: this.getProperties('email', 'password')
}).then(function(response) {
self.set('response', response);
self.set('auth_token', response.auth_token);
var currentUser = response.user;
currentUser.id = 'current';
self.store.createRecord('user', currentUser);
self.set('currentUser', self.store.find('user', 'current'));
self.set('role', currentUser.role);
self.set('email', null);
self.set('password', null);
self.transitionToRoute('dashboard');
});
},
recover_password: function() {
var self = this;
ajax('/api/password_reset', {
type: 'POST',
data: {user: {email: this.get('email')}}
}).then(function(response) {
self.set('email', null);
self.set('hidden', false);
});
},
toggle_recovery: function() {
Ember.$('.password-recovery').toggle();
Ember.$('.login-modal').toggle();
}
}
});
## Instruction:
Hide password reset instruction alert after 3 seconds
## Code After:
import Ember from 'ember';
import ajax from 'ic-ajax';
export default Ember.Controller.extend({
needs: 'application',
auth_token: Ember.computed.alias('controllers.application.auth_token'),
currentUser: Ember.computed.alias('controllers.application.currentUser'),
email: null,
password: null,
response: null,
hidden: true,
actions: {
authenticate: function() {
var self = this;
ajax('/api/sign_in', {
type: 'POST',
data: this.getProperties('email', 'password')
}).then(function(response) {
self.set('response', response);
self.set('auth_token', response.auth_token);
var currentUser = response.user;
currentUser.id = 'current';
self.store.createRecord('user', currentUser);
self.set('currentUser', self.store.find('user', 'current'));
self.set('role', currentUser.role);
self.set('email', null);
self.set('password', null);
self.transitionToRoute('dashboard');
});
},
recover_password: function() {
var self = this;
ajax('/api/password_reset', {
type: 'POST',
data: {user: {email: this.get('email')}}
}).then(function(response) {
self.set('email', null);
self.set('hidden', false);
Ember.run.later(function() {
self.set('hidden', true);
}, 3000);
});
},
toggle_recovery: function() {
Ember.$('.password-recovery').toggle();
Ember.$('.login-modal').toggle();
}
}
});
| import Ember from 'ember';
import ajax from 'ic-ajax';
export default Ember.Controller.extend({
needs: 'application',
auth_token: Ember.computed.alias('controllers.application.auth_token'),
currentUser: Ember.computed.alias('controllers.application.currentUser'),
email: null,
password: null,
response: null,
hidden: true,
actions: {
authenticate: function() {
var self = this;
ajax('/api/sign_in', {
type: 'POST',
data: this.getProperties('email', 'password')
}).then(function(response) {
self.set('response', response);
self.set('auth_token', response.auth_token);
var currentUser = response.user;
currentUser.id = 'current';
self.store.createRecord('user', currentUser);
self.set('currentUser', self.store.find('user', 'current'));
self.set('role', currentUser.role);
self.set('email', null);
self.set('password', null);
self.transitionToRoute('dashboard');
});
},
recover_password: function() {
var self = this;
ajax('/api/password_reset', {
type: 'POST',
data: {user: {email: this.get('email')}}
}).then(function(response) {
self.set('email', null);
self.set('hidden', false);
+ Ember.run.later(function() {
+ self.set('hidden', true);
+ }, 3000);
});
},
toggle_recovery: function() {
Ember.$('.password-recovery').toggle();
Ember.$('.login-modal').toggle();
}
}
}); | 3 | 0.06383 | 3 | 0 |
abeba3df022368c8802664bd67f696642efbc96b | webpack.config.js | webpack.config.js | var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
webcrypto: 'crypto'
},
devtool: 'source-map'
}
| var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
'text-encoding': 'TextEncoder',
webcrypto: 'crypto'
},
devtool: 'source-map'
}
| Add 'text-encoding' to webpack externals | chore(npm): Add 'text-encoding' to webpack externals
| JavaScript | mit | anvilresearch/jose | javascript | ## Code Before:
var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
webcrypto: 'crypto'
},
devtool: 'source-map'
}
## Instruction:
chore(npm): Add 'text-encoding' to webpack externals
## Code After:
var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
'text-encoding': 'TextEncoder',
webcrypto: 'crypto'
},
devtool: 'source-map'
}
| var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
+ 'text-encoding': 'TextEncoder',
webcrypto: 'crypto'
},
devtool: 'source-map'
} | 1 | 0.058824 | 1 | 0 |
9b6a4ea80b366d54296764dfbd9d8a98276e265a | themes/mao/src/scss/components/_section-headline.scss | themes/mao/src/scss/components/_section-headline.scss | .c-section-headline {
// color: setting-color(c, gray);
text-transform: uppercase;
font-size: setting-font-size(m);
}
| .c-section-headline {
text-transform: uppercase;
font-size: setting-font-size(m);
}
| Remove left over code comment | Remove left over code comment
| SCSS | mit | maoberlehner/markus-oberlehner-net,maoberlehner/markus-oberlehner-net | scss | ## Code Before:
.c-section-headline {
// color: setting-color(c, gray);
text-transform: uppercase;
font-size: setting-font-size(m);
}
## Instruction:
Remove left over code comment
## Code After:
.c-section-headline {
text-transform: uppercase;
font-size: setting-font-size(m);
}
| .c-section-headline {
- // color: setting-color(c, gray);
text-transform: uppercase;
font-size: setting-font-size(m);
} | 1 | 0.2 | 0 | 1 |
38709e7f84b3a72c7a50cd4e3a92c9f1b05f4e4a | .github/workflows/reviewdog.yml | .github/workflows/reviewdog.yml | name: reviewdog on GitHub Action
on: [pull_request]
jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install linters
run: '( cd linters && go get golang.org/x/lint/golint )'
- name: Setup reviewdog
run: |
# curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
go install ./cmd/reviewdog
- name: Run reviewdog
env:
CI_PULL_REQUEST: ${{ github.event.number }}
CI_COMMIT: ${{ github.event.pull_request.head.sha }}
CI_REPO_OWNER: ${{ github.event.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_BRANCH: ${{ github.event.pull_request.head.ref }}
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$(go env GOPATH)/bin:$PATH
golint ./... | reviewdog -f=golint -name=golint-via-github-actions -reporter=github-pr-check
| name: reviewdog on GitHub Action
on: [pull_request]
jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install linters
run: '( cd linters && go get golang.org/x/lint/golint )'
- name: Setup reviewdog
run: |
# curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
go install ./cmd/reviewdog
- name: Run reviewdog
env:
CI_PULL_REQUEST: ${{ github.event.number }}
CI_COMMIT: ${{ github.event.pull_request.head.sha }}
CI_REPO_OWNER: ${{ github.event.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_BRANCH: ${{ github.event.pull_request.head.ref }}
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$(go env GOPATH)/bin:$PATH
reviewdog -reporter=github-pr-check -runners=golint
| Use -runners=golint for GitHub Actions | Use -runners=golint for GitHub Actions
| YAML | mit | haya14busa/reviewdog,haya14busa/reviewdog,haya14busa/reviewdog | yaml | ## Code Before:
name: reviewdog on GitHub Action
on: [pull_request]
jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install linters
run: '( cd linters && go get golang.org/x/lint/golint )'
- name: Setup reviewdog
run: |
# curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
go install ./cmd/reviewdog
- name: Run reviewdog
env:
CI_PULL_REQUEST: ${{ github.event.number }}
CI_COMMIT: ${{ github.event.pull_request.head.sha }}
CI_REPO_OWNER: ${{ github.event.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_BRANCH: ${{ github.event.pull_request.head.ref }}
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$(go env GOPATH)/bin:$PATH
golint ./... | reviewdog -f=golint -name=golint-via-github-actions -reporter=github-pr-check
## Instruction:
Use -runners=golint for GitHub Actions
## Code After:
name: reviewdog on GitHub Action
on: [pull_request]
jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install linters
run: '( cd linters && go get golang.org/x/lint/golint )'
- name: Setup reviewdog
run: |
# curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
go install ./cmd/reviewdog
- name: Run reviewdog
env:
CI_PULL_REQUEST: ${{ github.event.number }}
CI_COMMIT: ${{ github.event.pull_request.head.sha }}
CI_REPO_OWNER: ${{ github.event.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_BRANCH: ${{ github.event.pull_request.head.ref }}
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$(go env GOPATH)/bin:$PATH
reviewdog -reporter=github-pr-check -runners=golint
| name: reviewdog on GitHub Action
on: [pull_request]
jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install linters
run: '( cd linters && go get golang.org/x/lint/golint )'
- name: Setup reviewdog
run: |
# curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
go install ./cmd/reviewdog
- name: Run reviewdog
env:
CI_PULL_REQUEST: ${{ github.event.number }}
CI_COMMIT: ${{ github.event.pull_request.head.sha }}
CI_REPO_OWNER: ${{ github.event.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_BRANCH: ${{ github.event.pull_request.head.ref }}
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PATH=$(go env GOPATH)/bin:$PATH
- golint ./... | reviewdog -f=golint -name=golint-via-github-actions -reporter=github-pr-check
+ reviewdog -reporter=github-pr-check -runners=golint | 2 | 0.05 | 1 | 1 |
e399b804b022d21855aa81510e106d96214071b3 | pylearn2/scripts/datasets/download_cifar10.sh | pylearn2/scripts/datasets/download_cifar10.sh | set -e
[ -z "$PYLEARN2_DATA_PATH" ] && echo "PYLEARN2_DATA_PATH is not set" && exit 1
CIFAR10_DIR=$PYLEARN2_DATA_PATH/cifar10
[ -d $CIFAR10_DIR ] && echo "$CIFAR10_DIR already exists." && exit 1
mkdir -p $CIFAR10_DIR
echo "Downloading and unzipping CIFAR-10 dataset into $CIFAR10_DIR..."
pushd $CIFAR10_DIR > /dev/null
wget --no-verbose -O - http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xvzf -
popd > /dev/null
| [ -z "$PYLEARN2_DATA_PATH" ] && echo "PYLEARN2_DATA_PATH is not set" && exit 1
CIFAR10_DIR=$PYLEARN2_DATA_PATH/cifar10
which wget > /dev/null
WGET=$?
which curl > /dev/null
CURL=$?
if [ "$WGET" -eq 0 ]; then
DL_CMD="wget --no-verbose -O -"
elif [ "$CURL" -eq 0 ]; then
DL_CMD="curl --silent -o -"
else
echo "You need wget or curl installed to download"
exit 1
fi
[ -d $CIFAR10_DIR ] && echo "$CIFAR10_DIR already exists." && exit 1
mkdir -p $CIFAR10_DIR
echo "Downloading and unzipping CIFAR-10 dataset into $CIFAR10_DIR..."
pushd $CIFAR10_DIR > /dev/null
$DL_CMD http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xvzf -
popd > /dev/null
| Add curl as a download option. | Add curl as a download option.
| Shell | bsd-3-clause | woozzu/pylearn2,kose-y/pylearn2,fishcorn/pylearn2,jeremyfix/pylearn2,Refefer/pylearn2,pkainz/pylearn2,caidongyun/pylearn2,shiquanwang/pylearn2,goodfeli/pylearn2,matrogers/pylearn2,abergeron/pylearn2,junbochen/pylearn2,KennethPierce/pylearnk,lisa-lab/pylearn2,bartvm/pylearn2,jeremyfix/pylearn2,pkainz/pylearn2,ashhher3/pylearn2,lamblin/pylearn2,KennethPierce/pylearnk,goodfeli/pylearn2,cosmoharrigan/pylearn2,mclaughlin6464/pylearn2,caidongyun/pylearn2,msingh172/pylearn2,theoryno3/pylearn2,CIFASIS/pylearn2,lancezlin/pylearn2,hyqneuron/pylearn2-maxsom,lamblin/pylearn2,mclaughlin6464/pylearn2,alexjc/pylearn2,daemonmaker/pylearn2,alexjc/pylearn2,w1kke/pylearn2,matrogers/pylearn2,pkainz/pylearn2,sandeepkbhat/pylearn2,mclaughlin6464/pylearn2,se4u/pylearn2,goodfeli/pylearn2,mkraemer67/pylearn2,jamessergeant/pylearn2,woozzu/pylearn2,jeremyfix/pylearn2,se4u/pylearn2,CIFASIS/pylearn2,JesseLivezey/pylearn2,lancezlin/pylearn2,shiquanwang/pylearn2,kose-y/pylearn2,bartvm/pylearn2,TNick/pylearn2,hantek/pylearn2,JesseLivezey/plankton,JesseLivezey/plankton,skearnes/pylearn2,JesseLivezey/pylearn2,TNick/pylearn2,woozzu/pylearn2,caidongyun/pylearn2,sandeepkbhat/pylearn2,hyqneuron/pylearn2-maxsom,theoryno3/pylearn2,cosmoharrigan/pylearn2,ashhher3/pylearn2,daemonmaker/pylearn2,w1kke/pylearn2,lunyang/pylearn2,lisa-lab/pylearn2,fulmicoton/pylearn2,jamessergeant/pylearn2,chrish42/pylearn,matrogers/pylearn2,se4u/pylearn2,skearnes/pylearn2,fulmicoton/pylearn2,KennethPierce/pylearnk,nouiz/pylearn2,ddboline/pylearn2,fulmicoton/pylearn2,lancezlin/pylearn2,lunyang/pylearn2,JesseLivezey/pylearn2,nouiz/pylearn2,pkainz/pylearn2,junbochen/pylearn2,mkraemer67/pylearn2,daemonmaker/pylearn2,sandeepkbhat/pylearn2,fyffyt/pylearn2,chrish42/pylearn,theoryno3/pylearn2,junbochen/pylearn2,skearnes/pylearn2,aalmah/pylearn2,TNick/pylearn2,junbochen/pylearn2,cosmoharrigan/pylearn2,w1kke/pylearn2,lamblin/pylearn2,goodfeli/pylearn2,pombredanne/pylearn2,chrish42/pylearn,ddboline/pylearn2,hyqneuron/pylearn2-maxsom,kose-y/pylearn2,msingh172/pylearn2,CIFASIS/pylearn2,fulmicoton/pylearn2,pombredanne/pylearn2,lisa-lab/pylearn2,ddboline/pylearn2,bartvm/pylearn2,fishcorn/pylearn2,cosmoharrigan/pylearn2,caidongyun/pylearn2,mkraemer67/pylearn2,aalmah/pylearn2,nouiz/pylearn2,TNick/pylearn2,hantek/pylearn2,Refefer/pylearn2,jamessergeant/pylearn2,fishcorn/pylearn2,sandeepkbhat/pylearn2,msingh172/pylearn2,lancezlin/pylearn2,mclaughlin6464/pylearn2,abergeron/pylearn2,fyffyt/pylearn2,Refefer/pylearn2,CIFASIS/pylearn2,ddboline/pylearn2,kastnerkyle/pylearn2,chrish42/pylearn,lunyang/pylearn2,JesseLivezey/plankton,KennethPierce/pylearnk,woozzu/pylearn2,ashhher3/pylearn2,kastnerkyle/pylearn2,hyqneuron/pylearn2-maxsom,msingh172/pylearn2,w1kke/pylearn2,ashhher3/pylearn2,se4u/pylearn2,fyffyt/pylearn2,jeremyfix/pylearn2,hantek/pylearn2,shiquanwang/pylearn2,kose-y/pylearn2,lamblin/pylearn2,abergeron/pylearn2,JesseLivezey/plankton,nouiz/pylearn2,JesseLivezey/pylearn2,abergeron/pylearn2,aalmah/pylearn2,lunyang/pylearn2,daemonmaker/pylearn2,fishcorn/pylearn2,pombredanne/pylearn2,alexjc/pylearn2,pombredanne/pylearn2,mkraemer67/pylearn2,hantek/pylearn2,theoryno3/pylearn2,skearnes/pylearn2,kastnerkyle/pylearn2,alexjc/pylearn2,kastnerkyle/pylearn2,fyffyt/pylearn2,bartvm/pylearn2,matrogers/pylearn2,aalmah/pylearn2,lisa-lab/pylearn2,Refefer/pylearn2,jamessergeant/pylearn2,shiquanwang/pylearn2 | shell | ## Code Before:
set -e
[ -z "$PYLEARN2_DATA_PATH" ] && echo "PYLEARN2_DATA_PATH is not set" && exit 1
CIFAR10_DIR=$PYLEARN2_DATA_PATH/cifar10
[ -d $CIFAR10_DIR ] && echo "$CIFAR10_DIR already exists." && exit 1
mkdir -p $CIFAR10_DIR
echo "Downloading and unzipping CIFAR-10 dataset into $CIFAR10_DIR..."
pushd $CIFAR10_DIR > /dev/null
wget --no-verbose -O - http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xvzf -
popd > /dev/null
## Instruction:
Add curl as a download option.
## Code After:
[ -z "$PYLEARN2_DATA_PATH" ] && echo "PYLEARN2_DATA_PATH is not set" && exit 1
CIFAR10_DIR=$PYLEARN2_DATA_PATH/cifar10
which wget > /dev/null
WGET=$?
which curl > /dev/null
CURL=$?
if [ "$WGET" -eq 0 ]; then
DL_CMD="wget --no-verbose -O -"
elif [ "$CURL" -eq 0 ]; then
DL_CMD="curl --silent -o -"
else
echo "You need wget or curl installed to download"
exit 1
fi
[ -d $CIFAR10_DIR ] && echo "$CIFAR10_DIR already exists." && exit 1
mkdir -p $CIFAR10_DIR
echo "Downloading and unzipping CIFAR-10 dataset into $CIFAR10_DIR..."
pushd $CIFAR10_DIR > /dev/null
$DL_CMD http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xvzf -
popd > /dev/null
| - set -e
[ -z "$PYLEARN2_DATA_PATH" ] && echo "PYLEARN2_DATA_PATH is not set" && exit 1
CIFAR10_DIR=$PYLEARN2_DATA_PATH/cifar10
+
+ which wget > /dev/null
+ WGET=$?
+ which curl > /dev/null
+ CURL=$?
+
+ if [ "$WGET" -eq 0 ]; then
+ DL_CMD="wget --no-verbose -O -"
+ elif [ "$CURL" -eq 0 ]; then
+ DL_CMD="curl --silent -o -"
+ else
+ echo "You need wget or curl installed to download"
+ exit 1
+ fi
[ -d $CIFAR10_DIR ] && echo "$CIFAR10_DIR already exists." && exit 1
mkdir -p $CIFAR10_DIR
echo "Downloading and unzipping CIFAR-10 dataset into $CIFAR10_DIR..."
pushd $CIFAR10_DIR > /dev/null
- wget --no-verbose -O - http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xvzf -
? ^^^^^^^^^^^^^^^^^^^^^^
+ $DL_CMD http://www.cs.utoronto.ca/~kriz/cifar-10-python.tar.gz | tar xvzf -
? ^^^^^^^
popd > /dev/null | 17 | 1.545455 | 15 | 2 |
20c94bea3d2648df41b137b8096a4b2b0983d05f | update-imported-docs.sh | update-imported-docs.sh | git clone https://github.com/kubernetes/kubernetes.git k8s
cd k8s
git checkout gh-pages
cd ..
while read line || [[ -n ${line} ]]; do
IFS=': ' read -a myarray <<< "${line}"
# echo "arraypos0: ${myarray[0]}"
# echo "arraypos1: ${myarray[1]}"
# echo "arraypos2: ${myarray[2]}"
if [ "${myarray[1]}" = "path" ]; then
TARGET="${myarray[2]}"
CLEARPATH="${TARGET}"
K8SSOURCE='k8s/_'${TARGET}
DESTINATION=${TARGET%/*}
rm -rf ${CLEARPATH}
mv -f ${K8SSOURCE} ${DESTINATION}
fi
done <_data/overrides.yml
mv -f k8s/_includes/v1.1 _includes/
cd _includes/v1.1
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
cd ..
cd ..
rm -rf k8s
git add .
git commit -m "Ran update-imported-docs.sh"
echo "Docs imported! Run 'git push' to upload them" | git clone https://github.com/kubernetes/kubernetes.git k8s
cd k8s
git checkout gh-pages
cd ..
while read line || [[ -n ${line} ]]; do
IFS=': ' read -a myarray <<< "${line}"
# echo "arraypos0: ${myarray[0]}"
# echo "arraypos1: ${myarray[1]}"
# echo "arraypos2: ${myarray[2]}"
if [ "${myarray[1]}" = "path" ]; then
TARGET="${myarray[2]}"
CLEARPATH="${TARGET}"
K8SSOURCE='k8s/_'${TARGET}
DESTINATION=${TARGET%/*}
rm -rf ${CLEARPATH}
mv -f ${K8SSOURCE} ${DESTINATION}
fi
done <_data/overrides.yml
rm -rf _includes/v1.1
mv -f k8s/_includes/v1.1 _includes/
cd _includes/v1.1
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
cd ..
cd ..
rm -rf k8s
git add .
git commit -m "Ran update-imported-docs.sh"
echo "Docs imported! Run 'git push' to upload them" | Fix for Directory not empty error | Fix for Directory not empty error
| Shell | apache-2.0 | AlainRoy/alainroy.github.io,rata/kubernetes.github.io,aidevops/kubernetes.github.io,erictune/erictune.github.io,hurf/kubernetes-docs-cn,hurf/kubernetes-docs-cn,erictune/erictune.github.io,aidevops/kubernetes.github.io,rata/kubernetes.github.io,rata/kubernetes.github.io,erictune/erictune.github.io,mfanjie/kubernetes.github.io,aidevops/kubernetes.github.io,erictune/erictune.github.io,AlainRoy/alainroy.github.io,mfanjie/kubernetes.github.io,AlainRoy/alainroy.github.io,ronaldpetty/kubernetes.github.io,rata/kubernetes.github.io,ronaldpetty/kubernetes.github.io,erictune/erictune.github.io,aidevops/kubernetes.github.io,hurf/kubernetes-docs-cn,ronaldpetty/kubernetes.github.io,rata/kubernetes.github.io,mfanjie/kubernetes.github.io,aidevops/kubernetes.github.io | shell | ## Code Before:
git clone https://github.com/kubernetes/kubernetes.git k8s
cd k8s
git checkout gh-pages
cd ..
while read line || [[ -n ${line} ]]; do
IFS=': ' read -a myarray <<< "${line}"
# echo "arraypos0: ${myarray[0]}"
# echo "arraypos1: ${myarray[1]}"
# echo "arraypos2: ${myarray[2]}"
if [ "${myarray[1]}" = "path" ]; then
TARGET="${myarray[2]}"
CLEARPATH="${TARGET}"
K8SSOURCE='k8s/_'${TARGET}
DESTINATION=${TARGET%/*}
rm -rf ${CLEARPATH}
mv -f ${K8SSOURCE} ${DESTINATION}
fi
done <_data/overrides.yml
mv -f k8s/_includes/v1.1 _includes/
cd _includes/v1.1
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
cd ..
cd ..
rm -rf k8s
git add .
git commit -m "Ran update-imported-docs.sh"
echo "Docs imported! Run 'git push' to upload them"
## Instruction:
Fix for Directory not empty error
## Code After:
git clone https://github.com/kubernetes/kubernetes.git k8s
cd k8s
git checkout gh-pages
cd ..
while read line || [[ -n ${line} ]]; do
IFS=': ' read -a myarray <<< "${line}"
# echo "arraypos0: ${myarray[0]}"
# echo "arraypos1: ${myarray[1]}"
# echo "arraypos2: ${myarray[2]}"
if [ "${myarray[1]}" = "path" ]; then
TARGET="${myarray[2]}"
CLEARPATH="${TARGET}"
K8SSOURCE='k8s/_'${TARGET}
DESTINATION=${TARGET%/*}
rm -rf ${CLEARPATH}
mv -f ${K8SSOURCE} ${DESTINATION}
fi
done <_data/overrides.yml
rm -rf _includes/v1.1
mv -f k8s/_includes/v1.1 _includes/
cd _includes/v1.1
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
cd ..
cd ..
rm -rf k8s
git add .
git commit -m "Ran update-imported-docs.sh"
echo "Docs imported! Run 'git push' to upload them" | git clone https://github.com/kubernetes/kubernetes.git k8s
cd k8s
git checkout gh-pages
cd ..
while read line || [[ -n ${line} ]]; do
IFS=': ' read -a myarray <<< "${line}"
# echo "arraypos0: ${myarray[0]}"
# echo "arraypos1: ${myarray[1]}"
# echo "arraypos2: ${myarray[2]}"
if [ "${myarray[1]}" = "path" ]; then
TARGET="${myarray[2]}"
CLEARPATH="${TARGET}"
K8SSOURCE='k8s/_'${TARGET}
DESTINATION=${TARGET%/*}
rm -rf ${CLEARPATH}
mv -f ${K8SSOURCE} ${DESTINATION}
fi
done <_data/overrides.yml
+ rm -rf _includes/v1.1
mv -f k8s/_includes/v1.1 _includes/
cd _includes/v1.1
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
cd ..
cd ..
rm -rf k8s
git add .
git commit -m "Ran update-imported-docs.sh"
echo "Docs imported! Run 'git push' to upload them" | 1 | 0.033333 | 1 | 0 |
03257aa14d1930e44c83f797c8a4fb0df3bd85b0 | .travis.yml | .travis.yml | language: php
php:
- '5.6'
install:
- composer install
services:
- postgresql
addons:
postgresql: "9.3"
before_script:
- cp test/php/.travis.config.php test/php/config.php
- npm install
- bower install
script:
- phpunit
- grunt jasmine
| language: php
php:
- '5.6'
install:
- composer install
services:
- postgresql
addons:
postgresql: "9.3"
before_script:
- cp test/php/.travis.config.php test/php/config.php
- npm install
- node_modules/bower/bin/bower install
script:
- phpunit
- grunt jasmine
| Adjust bower command to use local node version | Adjust bower command to use local node version
| YAML | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec | yaml | ## Code Before:
language: php
php:
- '5.6'
install:
- composer install
services:
- postgresql
addons:
postgresql: "9.3"
before_script:
- cp test/php/.travis.config.php test/php/config.php
- npm install
- bower install
script:
- phpunit
- grunt jasmine
## Instruction:
Adjust bower command to use local node version
## Code After:
language: php
php:
- '5.6'
install:
- composer install
services:
- postgresql
addons:
postgresql: "9.3"
before_script:
- cp test/php/.travis.config.php test/php/config.php
- npm install
- node_modules/bower/bin/bower install
script:
- phpunit
- grunt jasmine
| language: php
php:
- '5.6'
install:
- composer install
services:
- postgresql
addons:
postgresql: "9.3"
before_script:
- cp test/php/.travis.config.php test/php/config.php
- npm install
- - bower install
+ - node_modules/bower/bin/bower install
script:
- phpunit
- grunt jasmine | 2 | 0.095238 | 1 | 1 |
bae8761a1b54bd3a26a3de2b4e013b9082684c81 | lib/builderator/util.rb | lib/builderator/util.rb | module Builderator
module Util
class << self
def to_array(arg)
arg.is_a?(Array) ? arg : [arg]
end
def from_tags(aws_tags)
{}.tap { |tt| aws_tags.each { |t| tt[t.key.to_s] = t.value } }
end
def filter(resources, filters = {})
resources.select do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
end
def filter!(resources, filters = {})
resources.select! do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
resources
end
def region(arg = nil)
return @region || 'us-east-1' if arg.nil?
@region = arg
end
def ec2
@ec2 ||= Aws::EC2::Client.new(:region => region)
end
def asg
@asg ||= Aws::AutoScaling::Client.new(:region => region)
end
end
end
end
require_relative './util/aws_exception'
require_relative './util/limit_exception'
| module Builderator
module Util
class << self
def to_array(arg)
arg.is_a?(Array) ? arg : [arg]
end
def from_tags(aws_tags)
{}.tap { |tt| aws_tags.each { |t| tt[t.key.to_s] = t.value } }
end
def filter(resources, filters = {})
resources.select do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
end
def filter!(resources, filters = {})
resources.select! do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
resources
end
def region(arg = nil)
return @region || 'us-east-1' if arg.nil?
@region = arg
end
def ec2
@ec2 ||= Aws::EC2::Client.new(:region => region)
end
def asg
@asg ||= Aws::AutoScaling::Client.new(:region => region)
end
def working_dir(relative = '.')
File.expand_path(relative, Dir.pwd)
end
end
end
end
require_relative './util/aws_exception'
require_relative './util/limit_exception'
| Add a helper to reference files relative to pwd | Add a helper to reference files relative to pwd
| Ruby | mit | rapid7/builderator,rapid7/builderator | ruby | ## Code Before:
module Builderator
module Util
class << self
def to_array(arg)
arg.is_a?(Array) ? arg : [arg]
end
def from_tags(aws_tags)
{}.tap { |tt| aws_tags.each { |t| tt[t.key.to_s] = t.value } }
end
def filter(resources, filters = {})
resources.select do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
end
def filter!(resources, filters = {})
resources.select! do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
resources
end
def region(arg = nil)
return @region || 'us-east-1' if arg.nil?
@region = arg
end
def ec2
@ec2 ||= Aws::EC2::Client.new(:region => region)
end
def asg
@asg ||= Aws::AutoScaling::Client.new(:region => region)
end
end
end
end
require_relative './util/aws_exception'
require_relative './util/limit_exception'
## Instruction:
Add a helper to reference files relative to pwd
## Code After:
module Builderator
module Util
class << self
def to_array(arg)
arg.is_a?(Array) ? arg : [arg]
end
def from_tags(aws_tags)
{}.tap { |tt| aws_tags.each { |t| tt[t.key.to_s] = t.value } }
end
def filter(resources, filters = {})
resources.select do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
end
def filter!(resources, filters = {})
resources.select! do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
resources
end
def region(arg = nil)
return @region || 'us-east-1' if arg.nil?
@region = arg
end
def ec2
@ec2 ||= Aws::EC2::Client.new(:region => region)
end
def asg
@asg ||= Aws::AutoScaling::Client.new(:region => region)
end
def working_dir(relative = '.')
File.expand_path(relative, Dir.pwd)
end
end
end
end
require_relative './util/aws_exception'
require_relative './util/limit_exception'
| module Builderator
module Util
class << self
def to_array(arg)
arg.is_a?(Array) ? arg : [arg]
end
def from_tags(aws_tags)
{}.tap { |tt| aws_tags.each { |t| tt[t.key.to_s] = t.value } }
end
def filter(resources, filters = {})
resources.select do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
end
def filter!(resources, filters = {})
resources.select! do |_, r|
filters.reduce(true) do |memo, (k, v)|
memo && r[:properties].include?(k.to_s) &&
r[:properties][k.to_s] == v
end
end
resources
end
def region(arg = nil)
return @region || 'us-east-1' if arg.nil?
@region = arg
end
def ec2
@ec2 ||= Aws::EC2::Client.new(:region => region)
end
def asg
@asg ||= Aws::AutoScaling::Client.new(:region => region)
end
+
+ def working_dir(relative = '.')
+ File.expand_path(relative, Dir.pwd)
+ end
end
end
end
require_relative './util/aws_exception'
require_relative './util/limit_exception' | 4 | 0.081633 | 4 | 0 |
128c25babff0c82b71fe429ee9c30379d1a56145 | init-package/init-org.el | init-package/init-org.el | (use-package org
:mode ("\\.org$" . org-mode)
:config
(progn
(require 'org-install)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-trello
:config
(add-hook 'org-mode-hook 'org-trello-mode))))
| (use-package org
:mode ("\\.org$" . org-mode)
:config
(progn
(require 'org-install)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(setq org-agenda-files '("~/Dropbox/org"))
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-trello
:config
(add-hook 'org-mode-hook 'org-trello-mode))))
| Add org files to agenda files list | Add org files to agenda files list
| Emacs Lisp | mit | tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs | emacs-lisp | ## Code Before:
(use-package org
:mode ("\\.org$" . org-mode)
:config
(progn
(require 'org-install)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-trello
:config
(add-hook 'org-mode-hook 'org-trello-mode))))
## Instruction:
Add org files to agenda files list
## Code After:
(use-package org
:mode ("\\.org$" . org-mode)
:config
(progn
(require 'org-install)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(setq org-agenda-files '("~/Dropbox/org"))
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-trello
:config
(add-hook 'org-mode-hook 'org-trello-mode))))
| (use-package org
:mode ("\\.org$" . org-mode)
:config
(progn
(require 'org-install)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
+ (setq org-agenda-files '("~/Dropbox/org"))
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package org-trello
:config
(add-hook 'org-mode-hook 'org-trello-mode)))) | 1 | 0.071429 | 1 | 0 |
ad91e370da3464acfb5d9c3a172da75a83f858c6 | app/controllers/admin/profiles_controller.rb | app/controllers/admin/profiles_controller.rb | class Admin::ProfilesController < Admin::BaseController
helper Admin::UsersHelper
def index
@user = current_user
@profiles = Profile.find(:all, :order => 'id')
@user.attributes = params[:user]
if request.post? and @user.save
current_user = @user
flash[:notice] = _('User was successfully updated.')
redirect_to '/admin'
end
end
end
| class Admin::ProfilesController < Admin::BaseController
helper Admin::UsersHelper
def index
@user = current_user
@profiles = Profile.find(:all, :order => 'id')
@user.attributes = params[:user]
if request.post? and @user.save
current_user = @user
flash[:notice] = _('User was successfully updated.')
redirect_to :controller => '/admin', :action => 'index'
end
end
end
| Fix redirect to work with sub-urls. If anyone knows how to adjust the specs so this gets tested throughout the application, please! do so ... | Fix redirect to work with sub-urls.
If anyone knows how to adjust the specs so this gets tested
throughout the application, please! do so ...
| Ruby | mit | leminhtuan2015/nginx_capuchino_rails,kildem/blog,saasbook/typo,hmallett/publify,natesholland/typo,Juuro/publify,backpackerhh/typo,ACPK/typo,kmathew96/typo,freeranger/typo,freibuis/publify,Endymion1977/typo,shaomingtan/publify,kmathew96/typo,leminhtuan2015/portal_staging,zsstor/Typo,leminhtuan2015/portal_staging,kildem/blog,leminhtuan2015/test_temona,burakicel/Burakicel.com,leminhtuan2015/test_temona,saasbook/typo,natesholland/typo,sf-wdi-25/publify_debugging_lab,framgia/publify,solanolabs/publify,faraazkhan/myblog,hmallett/publify,aren19/HW_5,shimolshah/typo-backup,tinnywang/typo,amba178/legacy_code,lbiedinger/cs_typo,hmallett/publify,gvaquez/typo,lbiedinger/cs_typo,randyramadhana/typo,xwang191/-edX.CS169.2x.hw1,publify/publify,kmathew96/typo,moneyadviceservice/publify,kryptykfysh/saas_typo,shrayus/hw-refactoring-legecy-code,mozzan/publify,P5hil/typo,leminhtuan2015/nginx_capuchino_rails,nvgit/typo1,zsstor/Typo,leminhtuan2015/portal_staging,felixitous/typoo,vivekv009/inuni-blog,leminhtuan2015/nginx_capuchino_rails,ndueber/cs-169_hw5,leminhtuan2015/test_temona,jcfausto/publify,saasbook/typo,leminhtuan2015/temona_staging,Endymion1977/typo,mrfosip/typo,moneyadviceservice/publify,K-and-R/publify,burakicel/Burakicel.com,waruboy/publify,telekomatrix/publify,moneyadviceservice/publify,Juuro/publify,freibuis/publify,sbstn-jmnz/typo,blairanderson/that-music-blog,lbiedinger/cs_typo,agiamas/publify,nguyenduyta/deploy-test,mozzan/publify,backpackerhh/typo,ashleymichal/typo,agiamas/publify,sf-wdi-25/publify_debugging_lab,faraazkhan/myblog,solanolabs/publify,alexhuang91/typo,mozzan/publify,nvgit/typo1,K-and-R/publify,whithajess/publify,freibuis/publify,kryptykfysh/saas_typo,waruboy/publify,wizzro/CS169.2x-hw1-2,seyedrazavi/publify,bsiebz/legacyhw,mplstar/blog,mrfosip/typo,vincenttian/cs169hw5,arramos84/cs169-hw5,seyedrazavi/publify,silygose/typo,moneyadviceservice/publify,babaa/foodblog,robinparadise/typo,bsiebz/legacyhw,LOSDev/CS169-Homework-5,Chickey2/typo,congchen5/typo,ashrob/typo,vincenttian/cs169hw5,solanolabs/publify,SF-WDI-LABS/publify_debugging_lab,leminhtuan2015/nginx_capuchino_rails,nvgit/typo1,tedfrazier/saas_typo,bikmaeff/CS169.2_hw12,sbstn-jmnz/typo,ndueber/cs-169_hw5,ashrob/typo,bikmaeff/CS169.2_hw12,babaa/foodblog,P5hil/typo,Chickey2/typo,amba178/legacy_code,xwang191/-edX.CS169.2x.hw1,freeranger/typo,tedfrazier/saas_typo,nvgit/typo1,whithajess/publify,ashleymichal/typo,shrayus/hw-refactoring-legecy-code,alexhuang91/typo,nguyenduyta/deploy-test,leminhtuan2015/temona_staging,SF-WDI-LABS/publify_debugging_lab,boostsup/HW5_typo,randyramadhana/typo,totzYuta/coding-diary-of-totz,khlumzeemee/typo,ACPK/typo,backpackerhh/typo,kildem/blog,natesholland/typo,mplstar/blog,P5hil/typo,blairanderson/that-music-blog,publify/publify,ACPK/typo,telekomatrix/publify,felixitous/typoo,vivekv009/inuni-blog,felixitous/typoo,arramos84/cs169-hw5,leminhtuan2015/portal_staging,shimolshah/typo-backup,edgarpng/typo-blog,shimolshah/typo-backup,publify/publify,drakontia/publify,seyedrazavi/publify,whithajess/publify,framgia/publify,nguyenduyta/deploy-test,sbstn-jmnz/typo,Juuro/publify,zsstor/Typo,waruboy/publify,khlumzeemee/typo,matthewliu/saas_hw5,tinnywang/typo,robinparadise/typo,silygose/typo,LOSDev/CS169-Homework-5,ndueber/cs-169_hw5,matthewliu/saas_hw5,mplstar/blog,LOSDev/CS169-Homework-5,silygose/typo,totzYuta/coding-diary-of-totz,drakontia/publify,gvaquez/typo,jcfausto/publify,bsiebz/legacyhw,sf-wdi-25/publify_debugging_lab,vivekv009/inuni-blog,wizzro/CS169.2x-hw1-2,ashleymichal/typo,telekomatrix/publify,aren19/HW_5,leminhtuan2015/temona_staging,K-and-R/publify,jcfausto/publify,agiamas/publify,SF-WDI-LABS/publify_debugging_lab,arramos84/cs169-hw5,blairanderson/that-music-blog,freeranger/typo,bikmaeff/CS169.2_hw12,vincenttian/cs169hw5,randyramadhana/typo,shaomingtan/publify,congchen5/typo,boostsup/HW5_typo,shrayus/hw-refactoring-legecy-code,kildem/blog,LOSDev/CS169-Homework-5,boostsup/HW5_typo,edgarpng/typo-blog | ruby | ## Code Before:
class Admin::ProfilesController < Admin::BaseController
helper Admin::UsersHelper
def index
@user = current_user
@profiles = Profile.find(:all, :order => 'id')
@user.attributes = params[:user]
if request.post? and @user.save
current_user = @user
flash[:notice] = _('User was successfully updated.')
redirect_to '/admin'
end
end
end
## Instruction:
Fix redirect to work with sub-urls.
If anyone knows how to adjust the specs so this gets tested
throughout the application, please! do so ...
## Code After:
class Admin::ProfilesController < Admin::BaseController
helper Admin::UsersHelper
def index
@user = current_user
@profiles = Profile.find(:all, :order => 'id')
@user.attributes = params[:user]
if request.post? and @user.save
current_user = @user
flash[:notice] = _('User was successfully updated.')
redirect_to :controller => '/admin', :action => 'index'
end
end
end
| class Admin::ProfilesController < Admin::BaseController
helper Admin::UsersHelper
def index
@user = current_user
@profiles = Profile.find(:all, :order => 'id')
@user.attributes = params[:user]
if request.post? and @user.save
current_user = @user
flash[:notice] = _('User was successfully updated.')
- redirect_to '/admin'
+ redirect_to :controller => '/admin', :action => 'index'
end
end
end | 2 | 0.133333 | 1 | 1 |
863267f6234591f7e140a83b724294d0518f73ae | ruru/src/lib.rs | ruru/src/lib.rs | extern crate ruru;
use ruru::VM;
use ruru::Hash;
use ruru::Fixnum;
use ruru::Class;
use ruru::types::Argc;
use ruru::AnyObject;
#[no_mangle]
pub extern fn pow_3(argc: Argc, argv: *const AnyObject, _: Fixnum) -> Hash {
let argv = VM::parse_arguments(argc, argv);
let num = argv[0].as_fixnum().to_i64();
let mut hash = Hash::new();
for i in 1..num + 1 {
hash.store(Fixnum::new(i), Fixnum::new(i.pow(3)));
}
hash
}
#[no_mangle]
pub extern fn initialize_my_app() {
Class::new("Calculator").define(|itself| {
itself.def("pow_3", pow_3);
});
}
| extern crate ruru;
use ruru::VM;
use ruru::Hash;
use ruru::Fixnum;
use ruru::Class;
use ruru::AnyObject;
use ruru::types::{Argc, Value};
use ruru::traits::Object;
class!(Calculator);
methods!(
Calculator,
itself,
pow_3(num: Fixnum) -> Hash {
let mut hash = Hash::new();
for i in 1..num.to_i64() + 1 {
hash.store(Fixnum::new(i), Fixnum::new(i.pow(3)));
}
hash
}
);
#[no_mangle]
pub extern fn initialize_my_app() {
Class::new("Calculator").define(|itself| {
itself.def("pow_3", pow_3);
});
}
| Use macros for creating ruby methods | Use macros for creating ruby methods
| Rust | mit | steveklabnik/rust_example,steveklabnik/rust_example,steveklabnik/rust_example,steveklabnik/rust_example,steveklabnik/rust_example,steveklabnik/rust_example | rust | ## Code Before:
extern crate ruru;
use ruru::VM;
use ruru::Hash;
use ruru::Fixnum;
use ruru::Class;
use ruru::types::Argc;
use ruru::AnyObject;
#[no_mangle]
pub extern fn pow_3(argc: Argc, argv: *const AnyObject, _: Fixnum) -> Hash {
let argv = VM::parse_arguments(argc, argv);
let num = argv[0].as_fixnum().to_i64();
let mut hash = Hash::new();
for i in 1..num + 1 {
hash.store(Fixnum::new(i), Fixnum::new(i.pow(3)));
}
hash
}
#[no_mangle]
pub extern fn initialize_my_app() {
Class::new("Calculator").define(|itself| {
itself.def("pow_3", pow_3);
});
}
## Instruction:
Use macros for creating ruby methods
## Code After:
extern crate ruru;
use ruru::VM;
use ruru::Hash;
use ruru::Fixnum;
use ruru::Class;
use ruru::AnyObject;
use ruru::types::{Argc, Value};
use ruru::traits::Object;
class!(Calculator);
methods!(
Calculator,
itself,
pow_3(num: Fixnum) -> Hash {
let mut hash = Hash::new();
for i in 1..num.to_i64() + 1 {
hash.store(Fixnum::new(i), Fixnum::new(i.pow(3)));
}
hash
}
);
#[no_mangle]
pub extern fn initialize_my_app() {
Class::new("Calculator").define(|itself| {
itself.def("pow_3", pow_3);
});
}
| extern crate ruru;
use ruru::VM;
use ruru::Hash;
use ruru::Fixnum;
use ruru::Class;
- use ruru::types::Argc;
use ruru::AnyObject;
+ use ruru::types::{Argc, Value};
+ use ruru::traits::Object;
+ class!(Calculator);
- #[no_mangle]
- pub extern fn pow_3(argc: Argc, argv: *const AnyObject, _: Fixnum) -> Hash {
- let argv = VM::parse_arguments(argc, argv);
- let num = argv[0].as_fixnum().to_i64();
- let mut hash = Hash::new();
+ methods!(
+ Calculator,
+ itself,
+ pow_3(num: Fixnum) -> Hash {
+ let mut hash = Hash::new();
+
- for i in 1..num + 1 {
+ for i in 1..num.to_i64() + 1 {
? ++++ +++++++++
- hash.store(Fixnum::new(i), Fixnum::new(i.pow(3)));
+ hash.store(Fixnum::new(i), Fixnum::new(i.pow(3)));
? ++++
+ }
+
+ hash
}
+ );
-
- hash
- }
-
#[no_mangle]
pub extern fn initialize_my_app() {
Class::new("Calculator").define(|itself| {
itself.def("pow_3", pow_3);
});
} | 27 | 0.9 | 15 | 12 |
545682bb5f6f32bf680eace06471dce43c461151 | package.json | package.json | {
"name": "broccoli-tsc",
"description": "TypeScript filter for Broccoli",
"version": "0.1.1",
"author": "Mario Vejlupek <mario@vejlupek.cz>",
"main": "index.js",
"license": "MIT",
"repository": "angie-party/broccoli-tsc",
"keywords": [
"broccoli-plugin",
"typescript",
"javascript"
],
"dependencies": {
"broccoli-filter": "0.1.12",
"typescript": "1.5.0-beta"
},
"scripts": {
"prepublish": "tsc index.ts;echo",
"pretest": "broccoli build tmp/test && tsc index.ts --out tmp/test/index-tsc.js;echo",
"test": "diff tmp/test/index-tsc.js tmp/test/index.js",
"posttest": "rimraf tmp/test"
},
"devDependencies": {
"broccoli-cli": "^1.0.0",
"rimraf": "^2.3.3"
}
}
| {
"name": "broccoli-tsc",
"description": "TypeScript filter for Broccoli",
"version": "0.1.1",
"author": "Mario Vejlupek <mario@vejlupek.cz>",
"main": "index.js",
"license": "MIT",
"repository": "angie-party/broccoli-tsc",
"keywords": [
"broccoli-plugin",
"typescript",
"javascript"
],
"dependencies": {
"broccoli-filter": "0.1.12",
"typescript": "1.5.0-beta"
},
"scripts": {
"prepublish": "tsc index.ts;echo",
"pretest": "broccoli build tmp/test && tsc index.ts --out tmp/test/index-tsc.js;echo",
"test": "diff tmp/test/index-tsc.js tmp/test/index.js",
"posttest": "rimraf tmp/test"
},
"devDependencies": {
"broccoli": "^0.16.2",
"broccoli-cli": "^1.0.0",
"rimraf": "^2.3.3"
}
}
| Add broccoli dependency for travis build | Add broccoli dependency for travis build
| JSON | mit | ngParty/broccoli-tsc,angie-party/broccoli-tsc | json | ## Code Before:
{
"name": "broccoli-tsc",
"description": "TypeScript filter for Broccoli",
"version": "0.1.1",
"author": "Mario Vejlupek <mario@vejlupek.cz>",
"main": "index.js",
"license": "MIT",
"repository": "angie-party/broccoli-tsc",
"keywords": [
"broccoli-plugin",
"typescript",
"javascript"
],
"dependencies": {
"broccoli-filter": "0.1.12",
"typescript": "1.5.0-beta"
},
"scripts": {
"prepublish": "tsc index.ts;echo",
"pretest": "broccoli build tmp/test && tsc index.ts --out tmp/test/index-tsc.js;echo",
"test": "diff tmp/test/index-tsc.js tmp/test/index.js",
"posttest": "rimraf tmp/test"
},
"devDependencies": {
"broccoli-cli": "^1.0.0",
"rimraf": "^2.3.3"
}
}
## Instruction:
Add broccoli dependency for travis build
## Code After:
{
"name": "broccoli-tsc",
"description": "TypeScript filter for Broccoli",
"version": "0.1.1",
"author": "Mario Vejlupek <mario@vejlupek.cz>",
"main": "index.js",
"license": "MIT",
"repository": "angie-party/broccoli-tsc",
"keywords": [
"broccoli-plugin",
"typescript",
"javascript"
],
"dependencies": {
"broccoli-filter": "0.1.12",
"typescript": "1.5.0-beta"
},
"scripts": {
"prepublish": "tsc index.ts;echo",
"pretest": "broccoli build tmp/test && tsc index.ts --out tmp/test/index-tsc.js;echo",
"test": "diff tmp/test/index-tsc.js tmp/test/index.js",
"posttest": "rimraf tmp/test"
},
"devDependencies": {
"broccoli": "^0.16.2",
"broccoli-cli": "^1.0.0",
"rimraf": "^2.3.3"
}
}
| {
"name": "broccoli-tsc",
"description": "TypeScript filter for Broccoli",
"version": "0.1.1",
"author": "Mario Vejlupek <mario@vejlupek.cz>",
"main": "index.js",
"license": "MIT",
"repository": "angie-party/broccoli-tsc",
"keywords": [
"broccoli-plugin",
"typescript",
"javascript"
],
"dependencies": {
"broccoli-filter": "0.1.12",
"typescript": "1.5.0-beta"
},
"scripts": {
"prepublish": "tsc index.ts;echo",
"pretest": "broccoli build tmp/test && tsc index.ts --out tmp/test/index-tsc.js;echo",
"test": "diff tmp/test/index-tsc.js tmp/test/index.js",
"posttest": "rimraf tmp/test"
},
"devDependencies": {
+ "broccoli": "^0.16.2",
"broccoli-cli": "^1.0.0",
"rimraf": "^2.3.3"
}
} | 1 | 0.035714 | 1 | 0 |
49d7dff97e01f797c113d336abd82f06bf5e99ef | test/integration/default/default.yml | test/integration/default/default.yml | ---
- hosts: test-kitchen
vars:
domain_xml_file: /tmp/domain.xml
pre_tasks:
- file: path={{ domain_xml_file }} state=touch
- copy: dest={{ domain_xml_file }} content="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<java-config/>"
roles:
- role: dynatrace.Dynatrace-Glassfish-Agent
dynatrace_glassfish_agent_glassfish_domain_xml_file: "{{ domain_xml_file }}"
dynatrace_agents_linux_installer_file_url: http://10.0.2.2/dynatrace/dynatrace-agents.jar
| ---
- hosts: test-kitchen
vars:
domain_xml_file: /tmp/domain.xml
pre_tasks:
- file: path={{ domain_xml_file }} state=touch
- copy: dest={{ domain_xml_file }} content="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<java-config/>"
roles:
- role: dynatrace.Dynatrace-Glassfish-Agent
dynatrace_glassfish_agent_glassfish_domain_xml_file: "{{ domain_xml_file }}"
dynatrace_agents_linux_installer_file_url: http://downloads.dynatracesaas.com/6.2/dynatrace-agent-unix.jar
| Integrate download links from downloads.dynatracesaas.com. | Integrate download links from downloads.dynatracesaas.com.
| YAML | mit | dynaTrace/Dynatrace-Glassfish-Agent-Ansible | yaml | ## Code Before:
---
- hosts: test-kitchen
vars:
domain_xml_file: /tmp/domain.xml
pre_tasks:
- file: path={{ domain_xml_file }} state=touch
- copy: dest={{ domain_xml_file }} content="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<java-config/>"
roles:
- role: dynatrace.Dynatrace-Glassfish-Agent
dynatrace_glassfish_agent_glassfish_domain_xml_file: "{{ domain_xml_file }}"
dynatrace_agents_linux_installer_file_url: http://10.0.2.2/dynatrace/dynatrace-agents.jar
## Instruction:
Integrate download links from downloads.dynatracesaas.com.
## Code After:
---
- hosts: test-kitchen
vars:
domain_xml_file: /tmp/domain.xml
pre_tasks:
- file: path={{ domain_xml_file }} state=touch
- copy: dest={{ domain_xml_file }} content="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<java-config/>"
roles:
- role: dynatrace.Dynatrace-Glassfish-Agent
dynatrace_glassfish_agent_glassfish_domain_xml_file: "{{ domain_xml_file }}"
dynatrace_agents_linux_installer_file_url: http://downloads.dynatracesaas.com/6.2/dynatrace-agent-unix.jar
| ---
- hosts: test-kitchen
vars:
domain_xml_file: /tmp/domain.xml
pre_tasks:
- file: path={{ domain_xml_file }} state=touch
- copy: dest={{ domain_xml_file }} content="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<java-config/>"
roles:
- role: dynatrace.Dynatrace-Glassfish-Agent
dynatrace_glassfish_agent_glassfish_domain_xml_file: "{{ domain_xml_file }}"
- dynatrace_agents_linux_installer_file_url: http://10.0.2.2/dynatrace/dynatrace-agents.jar
? ^^ ------ ^
+ dynatrace_agents_linux_installer_file_url: http://downloads.dynatracesaas.com/6.2/dynatrace-agent-unix.jar
? ^^^^^^^^^ ++++++++++++ ^^^^^
| 2 | 0.181818 | 1 | 1 |
ced164c8710cb017638c2f56509c238dd9f4e038 | client/app/bundles/DenpaioApp/components/AppLayout.jsx | client/app/bundles/DenpaioApp/components/AppLayout.jsx | import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
handleSearch = (keyword) => {
this.setState({ keyword });
this.props.router.push(`/search?q=${keyword}`);
};
render() {
backgroundStyle['backgroundImage'] = `url(${this.props.route.backgroundImage})`;
return (
<div id="denpaio-app" style={backgroundStyle}>
<header className="player">
<audio src="https://stream.denpa.io/denpaio.ogg" preload="none" controls />
<SearchBar
onSearch={this.handleSearch}
/>
</header>
<section className="container">
{this.props.children}
</section>
<footer className="navbar">
<DanmakuBar />
</footer>
</div>
);
}
}
const backgroundStyle = {
backgroundSize: 'cover',
backgroundPosition: '50% 30%',
};
| import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
currentStyle() {
let pathname = this.props.location.pathname;
let defaultStyle = {
backgroundColor: 'rgba(0, 0, 0, 0.4)'
};
return pathname === '/' ? {} : defaultStyle;
}
handleSearch = (keyword) => {
this.setState({ keyword });
this.props.router.push(`/search?q=${keyword}`);
};
render() {
backgroundStyle['backgroundImage'] = `url(${this.props.route.backgroundImage})`;
return (
<div id="denpaio-app" style={backgroundStyle}>
<header className="player">
<audio src="https://stream.denpa.io/denpaio.ogg" preload="none" controls />
<SearchBar
onSearch={this.handleSearch}
/>
</header>
<section className="container" style={this.currentStyle()}>
{this.props.children}
</section>
<footer className="navbar">
<DanmakuBar />
</footer>
</div>
);
}
}
const backgroundStyle = {
backgroundSize: 'cover',
backgroundPosition: '50% 30%',
};
| Add background color to non-index pages | Add background color to non-index pages
| JSX | mit | denpaio/denpaio,denpaio/denpaio,denpaio/denpaio,denpaio/denpaio | jsx | ## Code Before:
import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
handleSearch = (keyword) => {
this.setState({ keyword });
this.props.router.push(`/search?q=${keyword}`);
};
render() {
backgroundStyle['backgroundImage'] = `url(${this.props.route.backgroundImage})`;
return (
<div id="denpaio-app" style={backgroundStyle}>
<header className="player">
<audio src="https://stream.denpa.io/denpaio.ogg" preload="none" controls />
<SearchBar
onSearch={this.handleSearch}
/>
</header>
<section className="container">
{this.props.children}
</section>
<footer className="navbar">
<DanmakuBar />
</footer>
</div>
);
}
}
const backgroundStyle = {
backgroundSize: 'cover',
backgroundPosition: '50% 30%',
};
## Instruction:
Add background color to non-index pages
## Code After:
import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
currentStyle() {
let pathname = this.props.location.pathname;
let defaultStyle = {
backgroundColor: 'rgba(0, 0, 0, 0.4)'
};
return pathname === '/' ? {} : defaultStyle;
}
handleSearch = (keyword) => {
this.setState({ keyword });
this.props.router.push(`/search?q=${keyword}`);
};
render() {
backgroundStyle['backgroundImage'] = `url(${this.props.route.backgroundImage})`;
return (
<div id="denpaio-app" style={backgroundStyle}>
<header className="player">
<audio src="https://stream.denpa.io/denpaio.ogg" preload="none" controls />
<SearchBar
onSearch={this.handleSearch}
/>
</header>
<section className="container" style={this.currentStyle()}>
{this.props.children}
</section>
<footer className="navbar">
<DanmakuBar />
</footer>
</div>
);
}
}
const backgroundStyle = {
backgroundSize: 'cover',
backgroundPosition: '50% 30%',
};
| import React from 'react';
import SearchBar from './SearchBar';
import DanmakuBar from './DanmakuBar';
export default class AppLayout extends React.Component {
constructor(props) {
super(props);
this.state = {};
+ }
+
+ currentStyle() {
+ let pathname = this.props.location.pathname;
+ let defaultStyle = {
+ backgroundColor: 'rgba(0, 0, 0, 0.4)'
+ };
+ return pathname === '/' ? {} : defaultStyle;
}
handleSearch = (keyword) => {
this.setState({ keyword });
this.props.router.push(`/search?q=${keyword}`);
};
render() {
backgroundStyle['backgroundImage'] = `url(${this.props.route.backgroundImage})`;
return (
<div id="denpaio-app" style={backgroundStyle}>
<header className="player">
<audio src="https://stream.denpa.io/denpaio.ogg" preload="none" controls />
<SearchBar
onSearch={this.handleSearch}
/>
</header>
- <section className="container">
+ <section className="container" style={this.currentStyle()}>
{this.props.children}
</section>
<footer className="navbar">
<DanmakuBar />
</footer>
</div>
);
}
}
const backgroundStyle = {
backgroundSize: 'cover',
backgroundPosition: '50% 30%',
}; | 10 | 0.243902 | 9 | 1 |
117b70c3eeee05ff12053635f5727c6fc94ce677 | lib/active_interaction/filters/time_filter.rb | lib/active_interaction/filters/time_filter.rb | module ActiveInteraction
class Base
# Creates accessors for the attributes and ensures that values passed to
# the attributes are Times. Numeric values are processed using `at`.
# Strings are processed using `parse` unless the format option is given,
# in which case they will be processed with `strptime`. If `Time.zone` is
# available it will be used so that the values are time zone aware.
#
# @macro attribute_method_params
# @option options [String] :format Parse strings using this format string.
#
# @example
# time :start_date
#
# @example
# date_time :start_date, format: '%Y-%m-%dT%H:%M:%S'
#
# @method self.time(*attributes, options = {})
end
# @private
class TimeFilter < AbstractDateTimeFilter
def self.prepare(key, value, options = {}, &block)
if value.is_a?(Numeric)
time.at(value)
else
super(key, value, options.merge(class: time), &block)
end
end
def self.time
if Time.respond_to?(:zone) && !Time.zone.nil?
Time.zone
else
Time
end
end
private_class_method :time
end
end
| module ActiveInteraction
class Base
# Creates accessors for the attributes and ensures that values passed to
# the attributes are Times. Numeric values are processed using `at`.
# Strings are processed using `parse` unless the format option is given,
# in which case they will be processed with `strptime`. If `Time.zone` is
# available it will be used so that the values are time zone aware.
#
# @macro attribute_method_params
# @option options [String] :format Parse strings using this format string.
#
# @example
# time :start_date
#
# @example
# date_time :start_date, format: '%Y-%m-%dT%H:%M:%S'
#
# @method self.time(*attributes, options = {})
end
# @private
class TimeFilter < AbstractDateTimeFilter
def self.prepare(key, value, options = {}, &block)
case value
when Numeric
time.at(value)
else
super(key, value, options.merge(class: time), &block)
end
end
def self.time
if Time.respond_to?(:zone) && !Time.zone.nil?
Time.zone
else
Time
end
end
private_class_method :time
end
end
| Use a case statement for the time filter | Use a case statement for the time filter
This keeps all the filters consistent.
| Ruby | mit | antoinefinkelstein/active_interaction,AaronLasseigne/active_interaction,antoinefinkelstein/active_interaction,frbl/active_interaction,frbl/active_interaction,JasOXIII/active_interaction,orgsync/active_interaction,AaronLasseigne/active_interaction,JasOXIII/active_interaction,orgsync/active_interaction | ruby | ## Code Before:
module ActiveInteraction
class Base
# Creates accessors for the attributes and ensures that values passed to
# the attributes are Times. Numeric values are processed using `at`.
# Strings are processed using `parse` unless the format option is given,
# in which case they will be processed with `strptime`. If `Time.zone` is
# available it will be used so that the values are time zone aware.
#
# @macro attribute_method_params
# @option options [String] :format Parse strings using this format string.
#
# @example
# time :start_date
#
# @example
# date_time :start_date, format: '%Y-%m-%dT%H:%M:%S'
#
# @method self.time(*attributes, options = {})
end
# @private
class TimeFilter < AbstractDateTimeFilter
def self.prepare(key, value, options = {}, &block)
if value.is_a?(Numeric)
time.at(value)
else
super(key, value, options.merge(class: time), &block)
end
end
def self.time
if Time.respond_to?(:zone) && !Time.zone.nil?
Time.zone
else
Time
end
end
private_class_method :time
end
end
## Instruction:
Use a case statement for the time filter
This keeps all the filters consistent.
## Code After:
module ActiveInteraction
class Base
# Creates accessors for the attributes and ensures that values passed to
# the attributes are Times. Numeric values are processed using `at`.
# Strings are processed using `parse` unless the format option is given,
# in which case they will be processed with `strptime`. If `Time.zone` is
# available it will be used so that the values are time zone aware.
#
# @macro attribute_method_params
# @option options [String] :format Parse strings using this format string.
#
# @example
# time :start_date
#
# @example
# date_time :start_date, format: '%Y-%m-%dT%H:%M:%S'
#
# @method self.time(*attributes, options = {})
end
# @private
class TimeFilter < AbstractDateTimeFilter
def self.prepare(key, value, options = {}, &block)
case value
when Numeric
time.at(value)
else
super(key, value, options.merge(class: time), &block)
end
end
def self.time
if Time.respond_to?(:zone) && !Time.zone.nil?
Time.zone
else
Time
end
end
private_class_method :time
end
end
| module ActiveInteraction
class Base
# Creates accessors for the attributes and ensures that values passed to
# the attributes are Times. Numeric values are processed using `at`.
# Strings are processed using `parse` unless the format option is given,
# in which case they will be processed with `strptime`. If `Time.zone` is
# available it will be used so that the values are time zone aware.
#
# @macro attribute_method_params
# @option options [String] :format Parse strings using this format string.
#
# @example
# time :start_date
#
# @example
# date_time :start_date, format: '%Y-%m-%dT%H:%M:%S'
#
# @method self.time(*attributes, options = {})
end
# @private
class TimeFilter < AbstractDateTimeFilter
def self.prepare(key, value, options = {}, &block)
- if value.is_a?(Numeric)
+ case value
+ when Numeric
- time.at(value)
+ time.at(value)
? ++
- else
+ else
? ++
- super(key, value, options.merge(class: time), &block)
+ super(key, value, options.merge(class: time), &block)
? ++
end
end
def self.time
if Time.respond_to?(:zone) && !Time.zone.nil?
Time.zone
else
Time
end
end
private_class_method :time
end
end | 9 | 0.225 | 5 | 4 |
83e3632b527bd5bf7451e7c29257cef702b2fe9b | demo/app/color-selector/color-selector-demo.ts | demo/app/color-selector/color-selector-demo.ts | /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import { Color } from '../../../src/common/core/graphics/color';
import { ColorEvent } from '../../../src/common/core/graphics/color-event';
import { MaterialColors } from '../../../src/common/core/style/material-colors';
@Component({
selector: 'deja-color-selector-demo',
styleUrls: ['./color-selector-demo.scss'],
templateUrl: './color-selector-demo.html',
})
export class DejaColorSelectorDemoComponent {
public tabIndex = 1;
protected selectedColor = Color.fromHex('#FFA000');
protected invalidColor = Color.fromHex('#FFA012');
private hoveredColor: Color;
constructor(protected materialColors: MaterialColors) { }
protected onColorPickerHover(event: ColorEvent) {
this.hoveredColor = event.color;
}
protected onColorPickerChange(event: ColorEvent) {
this.hoveredColor = event.color;
}
}
| /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import { Color } from '../../../src/common/core/graphics/color';
import { ColorEvent } from '../../../src/common/core/graphics/color-event';
import { MaterialColors } from '../../../src/common/core/style/material-colors';
@Component({
selector: 'deja-color-selector-demo',
styleUrls: ['./color-selector-demo.scss'],
templateUrl: './color-selector-demo.html',
})
export class DejaColorSelectorDemoComponent {
public tabIndex = 1;
protected selectedColor = Color.fromHex('#25C337');
protected invalidColor = Color.fromHex('#D02D06');
private hoveredColor: Color;
constructor(protected materialColors: MaterialColors) { }
protected onColorPickerHover(event: ColorEvent) {
this.hoveredColor = event.color;
}
protected onColorPickerChange(event: ColorEvent) {
this.hoveredColor = event.color;
}
}
| Change colors to see a problem more quickly | quiet(DejaColorSelector): Change colors to see a problem more quickly
| TypeScript | apache-2.0 | DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components | typescript | ## Code Before:
/*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import { Color } from '../../../src/common/core/graphics/color';
import { ColorEvent } from '../../../src/common/core/graphics/color-event';
import { MaterialColors } from '../../../src/common/core/style/material-colors';
@Component({
selector: 'deja-color-selector-demo',
styleUrls: ['./color-selector-demo.scss'],
templateUrl: './color-selector-demo.html',
})
export class DejaColorSelectorDemoComponent {
public tabIndex = 1;
protected selectedColor = Color.fromHex('#FFA000');
protected invalidColor = Color.fromHex('#FFA012');
private hoveredColor: Color;
constructor(protected materialColors: MaterialColors) { }
protected onColorPickerHover(event: ColorEvent) {
this.hoveredColor = event.color;
}
protected onColorPickerChange(event: ColorEvent) {
this.hoveredColor = event.color;
}
}
## Instruction:
quiet(DejaColorSelector): Change colors to see a problem more quickly
## Code After:
/*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import { Color } from '../../../src/common/core/graphics/color';
import { ColorEvent } from '../../../src/common/core/graphics/color-event';
import { MaterialColors } from '../../../src/common/core/style/material-colors';
@Component({
selector: 'deja-color-selector-demo',
styleUrls: ['./color-selector-demo.scss'],
templateUrl: './color-selector-demo.html',
})
export class DejaColorSelectorDemoComponent {
public tabIndex = 1;
protected selectedColor = Color.fromHex('#25C337');
protected invalidColor = Color.fromHex('#D02D06');
private hoveredColor: Color;
constructor(protected materialColors: MaterialColors) { }
protected onColorPickerHover(event: ColorEvent) {
this.hoveredColor = event.color;
}
protected onColorPickerChange(event: ColorEvent) {
this.hoveredColor = event.color;
}
}
| /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import { Color } from '../../../src/common/core/graphics/color';
import { ColorEvent } from '../../../src/common/core/graphics/color-event';
import { MaterialColors } from '../../../src/common/core/style/material-colors';
@Component({
selector: 'deja-color-selector-demo',
styleUrls: ['./color-selector-demo.scss'],
templateUrl: './color-selector-demo.html',
})
export class DejaColorSelectorDemoComponent {
public tabIndex = 1;
- protected selectedColor = Color.fromHex('#FFA000');
? ^^^^^^
+ protected selectedColor = Color.fromHex('#25C337');
? ^^^^^^
- protected invalidColor = Color.fromHex('#FFA012');
? ^^^ -
+ protected invalidColor = Color.fromHex('#D02D06');
? ^ +++
private hoveredColor: Color;
constructor(protected materialColors: MaterialColors) { }
protected onColorPickerHover(event: ColorEvent) {
this.hoveredColor = event.color;
}
protected onColorPickerChange(event: ColorEvent) {
this.hoveredColor = event.color;
}
} | 4 | 0.114286 | 2 | 2 |
dbdf9ce70294e15fc35559af5e99ec3598b07282 | packages/ha/haskell-disque.yaml | packages/ha/haskell-disque.yaml | homepage: https://github.com/ArekCzarnik/haskell-disque#readme
changelog-type: ''
hash: e30ee64d5786e8882abc1d9e8d078a6aa18b660dda717686174a022123278673
test-bench-deps:
base: -any
haskell-disque: -any
maintainer: arekczarnik@gmail.com
synopsis: Client library for the Disque datastore
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=4.7 && <5'
hedis: -any
string-conversions: -any
haskell-disque: -any
all-versions:
- '0.0.1.0'
author: Arek Czarnik
latest: '0.0.1.0'
description-type: markdown
description: ! '# haskell-disque a client for Disque
Disque is a distributed, in memory, message broker.
NOTE: this is a early state , most of the functionality in this package are not
tested and not production ready
'
license-name: BSD3
| homepage: https://github.com/ArekCzarnik/haskell-disque#readme
changelog-type: ''
hash: bd724108c46b07b6bdcc5ea796b4de826bc2db672012ed21a2a6fc2bf08cd6e1
test-bench-deps:
base: -any
haskell-disque: -any
maintainer: arekczarnik@gmail.com
synopsis: Client library for the Disque datastore
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=4.7 && <5'
transformers: -any
hedis: -any
string-conversions: -any
all-versions:
- '0.0.1.0'
- '0.0.1.1'
author: Arek Czarnik
latest: '0.0.1.1'
description-type: markdown
description: ! '# haskell-disque a client for Disque
Disque is a distributed, in memory, message broker.
NOTE: this is a early state , most of the functionality in this package are not
tested and not production ready
'
license-name: BSD3
| Update from Hackage at 2017-07-08T08:16:23Z | Update from Hackage at 2017-07-08T08:16:23Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/ArekCzarnik/haskell-disque#readme
changelog-type: ''
hash: e30ee64d5786e8882abc1d9e8d078a6aa18b660dda717686174a022123278673
test-bench-deps:
base: -any
haskell-disque: -any
maintainer: arekczarnik@gmail.com
synopsis: Client library for the Disque datastore
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=4.7 && <5'
hedis: -any
string-conversions: -any
haskell-disque: -any
all-versions:
- '0.0.1.0'
author: Arek Czarnik
latest: '0.0.1.0'
description-type: markdown
description: ! '# haskell-disque a client for Disque
Disque is a distributed, in memory, message broker.
NOTE: this is a early state , most of the functionality in this package are not
tested and not production ready
'
license-name: BSD3
## Instruction:
Update from Hackage at 2017-07-08T08:16:23Z
## Code After:
homepage: https://github.com/ArekCzarnik/haskell-disque#readme
changelog-type: ''
hash: bd724108c46b07b6bdcc5ea796b4de826bc2db672012ed21a2a6fc2bf08cd6e1
test-bench-deps:
base: -any
haskell-disque: -any
maintainer: arekczarnik@gmail.com
synopsis: Client library for the Disque datastore
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=4.7 && <5'
transformers: -any
hedis: -any
string-conversions: -any
all-versions:
- '0.0.1.0'
- '0.0.1.1'
author: Arek Czarnik
latest: '0.0.1.1'
description-type: markdown
description: ! '# haskell-disque a client for Disque
Disque is a distributed, in memory, message broker.
NOTE: this is a early state , most of the functionality in this package are not
tested and not production ready
'
license-name: BSD3
| homepage: https://github.com/ArekCzarnik/haskell-disque#readme
changelog-type: ''
- hash: e30ee64d5786e8882abc1d9e8d078a6aa18b660dda717686174a022123278673
+ hash: bd724108c46b07b6bdcc5ea796b4de826bc2db672012ed21a2a6fc2bf08cd6e1
test-bench-deps:
base: -any
haskell-disque: -any
maintainer: arekczarnik@gmail.com
synopsis: Client library for the Disque datastore
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=4.7 && <5'
+ transformers: -any
hedis: -any
string-conversions: -any
- haskell-disque: -any
all-versions:
- '0.0.1.0'
+ - '0.0.1.1'
author: Arek Czarnik
- latest: '0.0.1.0'
? ^
+ latest: '0.0.1.1'
? ^
description-type: markdown
description: ! '# haskell-disque a client for Disque
Disque is a distributed, in memory, message broker.
NOTE: this is a early state , most of the functionality in this package are not
tested and not production ready
'
license-name: BSD3 | 7 | 0.205882 | 4 | 3 |
e6f1488cdba617e2a4b04f0049a7e2f300e04229 | apps/mbug/manifest.mobile.json | apps/mbug/manifest.mobile.json | {
"packageId": "com.foamdev.apps.MBug",
"versionCode": 37,
"oauth2": {
"client_id": "18229540903-q3jf1svejrq2usts6k25p37aigsvde21.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/projecthosting"
]
},
"webview": "system"
}
| {
"packageId": "com.foamdev.apps.MBug",
"versionCode": 37,
"oauth2": {
"client_id": "18229540903-q3jf1svejrq2usts6k25p37aigsvde21.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/projecthosting"
]
}
}
| Switch to crosswalk based web-view for increased compatibility and performance. | Switch to crosswalk based web-view for increased compatibility and performance.
| JSON | apache-2.0 | mdittmer/foam,mdittmer/foam,foam-framework/foam,jacksonic/foam,mdittmer/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,jacksonic/foam,osric-the-knight/foam,jacksonic/foam,osric-the-knight/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,mdittmer/foam,jlhughes/foam,foam-framework/foam,foam-framework/foam,jacksonic/foam,jlhughes/foam | json | ## Code Before:
{
"packageId": "com.foamdev.apps.MBug",
"versionCode": 37,
"oauth2": {
"client_id": "18229540903-q3jf1svejrq2usts6k25p37aigsvde21.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/projecthosting"
]
},
"webview": "system"
}
## Instruction:
Switch to crosswalk based web-view for increased compatibility and performance.
## Code After:
{
"packageId": "com.foamdev.apps.MBug",
"versionCode": 37,
"oauth2": {
"client_id": "18229540903-q3jf1svejrq2usts6k25p37aigsvde21.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/projecthosting"
]
}
}
| {
"packageId": "com.foamdev.apps.MBug",
"versionCode": 37,
"oauth2": {
"client_id": "18229540903-q3jf1svejrq2usts6k25p37aigsvde21.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/projecthosting"
]
- },
? -
+ }
- "webview": "system"
} | 3 | 0.25 | 1 | 2 |
29db453f84d5f2942591873f48837b66cec7f8a3 | doc/release_process.md | doc/release_process.md | 0. Update the [changelog](CHANGELOG.md).
1. One final Travis CI build for `develop`.
2. Update version number in code.
3. Build the conda package for Mac as follows:
```
cd conda-recipe
conda build --python 3.4 rsmtool
```
4. Convert the package for both linux and windows:
```
conda convert -p win-64 -p linux-64 <mac package tarball>
```
5. Test all three conda packages in fresh conda environments.
6. Install conda package on ETS linux servers in the python 3 environment.
7. Merge `develop` into `master`.
8. Tag the latest commit to master with the appropriate release tag.
| 0. Update the [changelog](CHANGELOG.md).
1. One final Circle CI build for `develop`.
2. Update version number in code.
3. Build and upload the conda package for Mac as follows:
```
cd conda-recipe/unix
conda build --python 3.4 rsmtool
anaconda upload <mac package tarball>
```
4. Convert the package for linux and upload it:
```
conda convert -p linux-64 <mac package tarball>
anaconda upload linux-64/<tarball>
```
5. Build the conda package using the `windows` recipe on Mac/Linux, then convert it for the Windows platform, and then upload it:
```
cd conda-recipe/windows
conda build --python 3.4 rsmtool
conda convert -p win-64 <package tarball>
anaconda upload win-64/<tarball>
```
6. Test all three conda packages in fresh conda environments.
7. Install conda package on ETS linux servers in the python 3 environment.
8. Merge `develop` into `master`.
9. Tag the latest commit to master with the appropriate release tag.
| Update the release process document. | Update the release process document.
| Markdown | apache-2.0 | EducationalTestingService/rsmtool | markdown | ## Code Before:
0. Update the [changelog](CHANGELOG.md).
1. One final Travis CI build for `develop`.
2. Update version number in code.
3. Build the conda package for Mac as follows:
```
cd conda-recipe
conda build --python 3.4 rsmtool
```
4. Convert the package for both linux and windows:
```
conda convert -p win-64 -p linux-64 <mac package tarball>
```
5. Test all three conda packages in fresh conda environments.
6. Install conda package on ETS linux servers in the python 3 environment.
7. Merge `develop` into `master`.
8. Tag the latest commit to master with the appropriate release tag.
## Instruction:
Update the release process document.
## Code After:
0. Update the [changelog](CHANGELOG.md).
1. One final Circle CI build for `develop`.
2. Update version number in code.
3. Build and upload the conda package for Mac as follows:
```
cd conda-recipe/unix
conda build --python 3.4 rsmtool
anaconda upload <mac package tarball>
```
4. Convert the package for linux and upload it:
```
conda convert -p linux-64 <mac package tarball>
anaconda upload linux-64/<tarball>
```
5. Build the conda package using the `windows` recipe on Mac/Linux, then convert it for the Windows platform, and then upload it:
```
cd conda-recipe/windows
conda build --python 3.4 rsmtool
conda convert -p win-64 <package tarball>
anaconda upload win-64/<tarball>
```
6. Test all three conda packages in fresh conda environments.
7. Install conda package on ETS linux servers in the python 3 environment.
8. Merge `develop` into `master`.
9. Tag the latest commit to master with the appropriate release tag.
| 0. Update the [changelog](CHANGELOG.md).
- 1. One final Travis CI build for `develop`.
? ^ ^^^^
+ 1. One final Circle CI build for `develop`.
? ^^ ^^^
2. Update version number in code.
- 3. Build the conda package for Mac as follows:
+ 3. Build and upload the conda package for Mac as follows:
? +++++++++++
```
- cd conda-recipe
+ cd conda-recipe/unix
? +++++
conda build --python 3.4 rsmtool
+ anaconda upload <mac package tarball>
```
- 4. Convert the package for both linux and windows:
? ----- ^ ^^^^^
+ 4. Convert the package for linux and upload it:
? ^^^^^^^ ^
```
- conda convert -p win-64 -p linux-64 <mac package tarball>
? ----------
+ conda convert -p linux-64 <mac package tarball>
+ anaconda upload linux-64/<tarball>
```
+ 5. Build the conda package using the `windows` recipe on Mac/Linux, then convert it for the Windows platform, and then upload it:
- 5. Test all three conda packages in fresh conda environments.
- 6. Install conda package on ETS linux servers in the python 3 environment.
- 7. Merge `develop` into `master`.
- 8. Tag the latest commit to master with the appropriate release tag.
+ ```
+ cd conda-recipe/windows
+ conda build --python 3.4 rsmtool
+ conda convert -p win-64 <package tarball>
+ anaconda upload win-64/<tarball>
+ ```
+
+ 6. Test all three conda packages in fresh conda environments.
+ 7. Install conda package on ETS linux servers in the python 3 environment.
+ 8. Merge `develop` into `master`.
+ 9. Tag the latest commit to master with the appropriate release tag.
+ | 29 | 1.380952 | 20 | 9 |
4c5550420b8a9f1bf88f4329952f6e2a161cd20f | test/test_panels/test_navigation.py | test/test_panels/test_navigation.py | from pyqode.core.api import TextHelper
from pyqode.qt.QtTest import QTest
def test_toggle_button(editor):
editor.file.open('test/files/example.json')
editor.show()
TextHelper(editor).goto_line(6)
QTest.qWait(500)
panel = editor.panels.get('NavigationPanel')
assert len(panel._widgets) == 4
assert panel._widgets[1].text() == 'window'
panel._widgets[1].toggled.emit(True)
QTest.qWait(500)
assert TextHelper(editor).cursor_position()[0] == 3
| from pyqode.core.api import TextHelper
from pyqode.qt.QtTest import QTest
def test_toggle_button(editor):
editor.file.open('test/files/example.json')
editor.show()
TextHelper(editor).goto_line(6)
QTest.qWait(500)
panel = editor.panels.get('NavigationPanel')
assert len(panel._widgets) == 4
assert panel._widgets[1].text().replace('&', '').lower() == 'window'
panel._widgets[1].toggled.emit(True)
QTest.qWait(500)
assert TextHelper(editor).cursor_position()[0] == 3
| Fix test on kaos with latest qt5 | Fix test on kaos with latest qt5
| Python | mit | pyQode/pyqode.json,pyQode/pyqode.json | python | ## Code Before:
from pyqode.core.api import TextHelper
from pyqode.qt.QtTest import QTest
def test_toggle_button(editor):
editor.file.open('test/files/example.json')
editor.show()
TextHelper(editor).goto_line(6)
QTest.qWait(500)
panel = editor.panels.get('NavigationPanel')
assert len(panel._widgets) == 4
assert panel._widgets[1].text() == 'window'
panel._widgets[1].toggled.emit(True)
QTest.qWait(500)
assert TextHelper(editor).cursor_position()[0] == 3
## Instruction:
Fix test on kaos with latest qt5
## Code After:
from pyqode.core.api import TextHelper
from pyqode.qt.QtTest import QTest
def test_toggle_button(editor):
editor.file.open('test/files/example.json')
editor.show()
TextHelper(editor).goto_line(6)
QTest.qWait(500)
panel = editor.panels.get('NavigationPanel')
assert len(panel._widgets) == 4
assert panel._widgets[1].text().replace('&', '').lower() == 'window'
panel._widgets[1].toggled.emit(True)
QTest.qWait(500)
assert TextHelper(editor).cursor_position()[0] == 3
| from pyqode.core.api import TextHelper
from pyqode.qt.QtTest import QTest
def test_toggle_button(editor):
editor.file.open('test/files/example.json')
editor.show()
TextHelper(editor).goto_line(6)
QTest.qWait(500)
panel = editor.panels.get('NavigationPanel')
assert len(panel._widgets) == 4
- assert panel._widgets[1].text() == 'window'
+ assert panel._widgets[1].text().replace('&', '').lower() == 'window'
? +++++++++++++++++++++++++
panel._widgets[1].toggled.emit(True)
QTest.qWait(500)
assert TextHelper(editor).cursor_position()[0] == 3 | 2 | 0.133333 | 1 | 1 |
19a90284ff55d16290a25ddd65ea006dfea80b2e | README.md | README.md | Planning Poker
==============
A free, online agile estimation tool for distributed or colocated project teams.
|
A free, online agile estimation tool for distributed or colocated project teams.
## Installing Locally
#### Installing all project code and dependencies
1. Fork/Clone this repository on your local machine
1. Make sure you have [node js][node] installed
1. Install the Grunt Command Line Interface globally
* `$ npm install -g grunt-cli`
1. In your planning-poker root directory, install project dependencies
* `$ npm install`
#### Building and Deploying the application
1. Run the Grunt dev build task. The task will continue to run, watching for js or css changes. This is the default grunt task
* `$ grunt [default]`
* There is also a Grunt prod build. This task minifies js and css files, and terminates once complete (no watch)
* `$ grunt prod`
1. Start a local server. Uses port 4000 by default. Can be configured in `Gruntfile.js`
* `$ grunt serve`
1. Application should now be available at [localhost:4000][local]
[node]: http://nodejs.org/
[local]: http://localhost:4000/
| Add local install instructions to readme | Add local install instructions to readme | Markdown | mit | thorsenty/planning-poker,thorsenty/planning-poker | markdown | ## Code Before:
Planning Poker
==============
A free, online agile estimation tool for distributed or colocated project teams.
## Instruction:
Add local install instructions to readme
## Code After:
A free, online agile estimation tool for distributed or colocated project teams.
## Installing Locally
#### Installing all project code and dependencies
1. Fork/Clone this repository on your local machine
1. Make sure you have [node js][node] installed
1. Install the Grunt Command Line Interface globally
* `$ npm install -g grunt-cli`
1. In your planning-poker root directory, install project dependencies
* `$ npm install`
#### Building and Deploying the application
1. Run the Grunt dev build task. The task will continue to run, watching for js or css changes. This is the default grunt task
* `$ grunt [default]`
* There is also a Grunt prod build. This task minifies js and css files, and terminates once complete (no watch)
* `$ grunt prod`
1. Start a local server. Uses port 4000 by default. Can be configured in `Gruntfile.js`
* `$ grunt serve`
1. Application should now be available at [localhost:4000][local]
[node]: http://nodejs.org/
[local]: http://localhost:4000/
| - Planning Poker
- ==============
A free, online agile estimation tool for distributed or colocated project teams.
+
+ ## Installing Locally
+
+ #### Installing all project code and dependencies
+
+ 1. Fork/Clone this repository on your local machine
+ 1. Make sure you have [node js][node] installed
+ 1. Install the Grunt Command Line Interface globally
+ * `$ npm install -g grunt-cli`
+ 1. In your planning-poker root directory, install project dependencies
+ * `$ npm install`
+
+ #### Building and Deploying the application
+
+ 1. Run the Grunt dev build task. The task will continue to run, watching for js or css changes. This is the default grunt task
+ * `$ grunt [default]`
+ * There is also a Grunt prod build. This task minifies js and css files, and terminates once complete (no watch)
+ * `$ grunt prod`
+ 1. Start a local server. Uses port 4000 by default. Can be configured in `Gruntfile.js`
+ * `$ grunt serve`
+ 1. Application should now be available at [localhost:4000][local]
+
+
+ [node]: http://nodejs.org/
+ [local]: http://localhost:4000/ | 27 | 6.75 | 25 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.